From 7682c0a787b7335a914061249f3e5fd40152e3a6 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Mon, 27 Dec 2021 09:48:41 +0800
Subject: [PATCH] 培训学校主要管理人修改为展示师资力量
---
src/views/securityUnitChild/manager.vue | 67 +++++++++++++++++++++
src/api/securityUnit/securityUnit.js | 8 ++
src/views/securityUnitChild/index.vue | 68 ++++++++++++++++++++--
3 files changed, 133 insertions(+), 10 deletions(-)
diff --git a/src/api/securityUnit/securityUnit.js b/src/api/securityUnit/securityUnit.js
index ba2d3db..8dbdbd0 100644
--- a/src/api/securityUnit/securityUnit.js
+++ b/src/api/securityUnit/securityUnit.js
@@ -103,6 +103,14 @@
})
}
+export const submit = (row) => {
+ return request({
+ url: '/api/business/submit',
+ method: 'post',
+ data: row
+ })
+}
+
export const update1 = (row) => {
return request({
url: '/api/shareholder/update',
diff --git a/src/views/securityUnitChild/index.vue b/src/views/securityUnitChild/index.vue
index 265a313..d1f1138 100644
--- a/src/views/securityUnitChild/index.vue
+++ b/src/views/securityUnitChild/index.vue
@@ -44,7 +44,7 @@
</el-tab-pane>
<!-- 主要管理人信息 -->
<el-tab-pane :label="managerLabel" name="tab3">
- <manager v-if="overmanager" :deptid="departmentid"></manager>
+ <manager v-if="overmanager" :deptid="departmentid" :stats="stats"></manager>
</el-tab-pane>
<!-- 装备管理列表 -->
<el-tab-pane label="装备管理" name="tab4" v-if="equipmentVisiable">
@@ -89,7 +89,7 @@
<script>
import { column11, column } from "./data";
-import { getOncedata, update,getBusinessInfo } from "@/api/securityUnit/securityUnit";
+import { getOncedata, update,getBusinessInfo,submit } from "@/api/securityUnit/securityUnit";
import manager from "./manager.vue";
import shareholder from "./shareholder.vue";
import equipments from "../securityEquipment/equipments.vue";
@@ -135,6 +135,7 @@
social: false,
overHtp: false,
activeName: "tab1",
+ stats:"",
departmentid: "",
//全局单位统一社会信用代码
creditcode: "",
@@ -315,23 +316,54 @@
methods: {
//分公司工商信息修改
businessSubmit(row, done, loading){
- alert(1);
var that = this;
+ console.log(row,11111);
if (
this.userInfo.role_name == "保安公司管理员" ||
this.userInfo.role_name == "培训公司管理员" ||
this.userInfo.role_name == "分公司管理员"
) {
- row["departmentid"] = this.userInfo.dept_id;
- row["id"] = this.formData.id;
+ //分公司
+ var f = {
+ departmentid:this.userInfo.dept_id,
+ id:this.formData.id,
+ businessLicense:row.businessLicense,
+ establishtime:row.establishtime,
+ creditcode:row.creditcode,
+ registeredcapital:row.registeredcapital,
+ business:row.business,
+ }
+ //总公司
+ var z = {
+ id:row.id,
+ deptId:this.userInfo.dept_id,
+ registerTime:row.registerTime,
+ socialCreditCode:row.socialCreditCode,
+ capital:row.capital,
+ businessScope:row.businessScope,
+ trading:row.trading,
+ }
}
- update(row).then(
+
+ //分公司工商信息修改
+ update(f).then(
() => {
this.$message({
type: "success",
message: "操作成功!",
});
- that.formData = row;
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ //总公司工商信息修改
+ submit(z).then(
+ (res) => {
+ that.businessObj = row;
+ that.businessObj.id = res.data.data.id;
done();
},
(error) => {
@@ -427,6 +459,10 @@
var roleAlias = res.data.data.roleAlias;
var d = that.optionBase.column;
var e = that.option01.column;
+ var f = that.businessOption.group;
+ var g = f[0].column;
+ var h = f[1].column;
+ console.log(g,33333);
//控制按钮,编辑状态
if (
roleAlias == "保安公司管理员" ||
@@ -442,6 +478,12 @@
for (var n in e) {
e[n].disabled = false;
}
+ for (var l in g) {
+ g[l].disabled = false;
+ }
+ for (var m in h) {
+ h[m].disabled = false;
+ }
} else {
that.optionBase.submitBtn = false;
that.option01.submitBtn = false;
@@ -451,6 +493,12 @@
}
for (var b in e) {
e[b].disabled = true;
+ }
+ for (var c in g) {
+ g[c].disabled = true;
+ }
+ for (var z in h) {
+ h[z].disabled = true;
}
}
});
@@ -558,6 +606,7 @@
},
//tab 初始设置
initController(stats,deptId) {
+ this.stats = stats;
var that = this;
// 判断按进入的公司类型
if (stats == "2") {
@@ -580,8 +629,11 @@
that.businessVisiable = false;
//查询分公司(及总公司)工商信息
getBusinessInfo(deptId).then((res)=>{
- console.log(res.data.data,1234546);
that.businessObj = res.data.data;
+ if(that.businessObj.id==-1){
+ that.businessObj.id=null;
+ }
+ // console.log(that.businessObj,1234546);
})
}
if (stats == "1") {
diff --git a/src/views/securityUnitChild/manager.vue b/src/views/securityUnitChild/manager.vue
index e6f1947..784b0ce 100644
--- a/src/views/securityUnitChild/manager.vue
+++ b/src/views/securityUnitChild/manager.vue
@@ -74,7 +74,7 @@
import { mapGetters } from "vuex";
import { getToken } from "@/util/auth";
export default {
- props: ["deptid"],
+ props: ["deptid","stats"],
data() {
var deptid = this.deptid;
if (deptid == undefined) {
@@ -126,11 +126,21 @@
label: "姓名",
prop: "name",
search: true,
+ rules: [{
+ required: true,
+ message: "请输入姓名",
+ trigger: "blur"
+ }],
},
{
label: "职务",
prop: "post",
search: true,
+ rules: [{
+ required: true,
+ message: "请输入职务",
+ trigger: "blur"
+ }],
},
{
label: "身份证",
@@ -139,6 +149,42 @@
{
label: "联系电话",
prop: "cell",
+ },
+ {
+ label: "学历",
+ prop: "education",
+ display:false,
+ row:true,
+ hide:true,
+ rules: [{
+ required: false,
+ message: "请输入车辆类型",
+ trigger: "blur"
+ }],
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationTypes",
+ search: false,
+ searchSpan: 4,
+ type: "select",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ dataType: "number",
+ },
+ {
+ label: "证书",
+ prop: "paper",
+ type: "upload",
+ dataType:"string",
+ listType: "picture-card",
+ span: 24,
+ propsHttp: {
+ res: "data",
+ },
+ tip: "只能上传jpg/png格式图片,且不超过2Mb",
+ action: "/api/blade-resource/oss/endpoint/put-files",
+ display:false,
+ hide:true,
},
],
},
@@ -173,6 +219,23 @@
},
created() {
this.option.height = this.windowHeight - 320;
+ if (this.stats == "1") {
+ //分公司
+ const educationcolumn = this.findObject(
+ this.option.column,
+ "education"
+ );
+ const papercolumn = this.findObject(
+ this.option.column,
+ "paper"
+ );
+ //法人及电话不可见
+ educationcolumn.display = true;
+ educationcolumn.hide = false;
+ educationcolumn.search = true;
+ papercolumn.display = true;
+ papercolumn.hide = false;
+ }
},
computed: {
...mapGetters(["permission", "userInfo", "windowHeight"]),
@@ -250,7 +313,7 @@
);
},
uploadAfter(res, done, loading, column) {
- window.console.log(column);
+ // window.console.log(column);
this.excelBox = false;
this.refreshChange();
done();
--
Gitblit v1.9.3