From c4e67a8942e514b65ab41bb19781d50576c15725 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Fri, 24 Sep 2021 19:56:52 +0800
Subject: [PATCH] 用户

---
 src/views/securityUnitChild/index.vue |   95 ++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 81 insertions(+), 14 deletions(-)

diff --git a/src/views/securityUnitChild/index.vue b/src/views/securityUnitChild/index.vue
index 604437e..58e1696 100644
--- a/src/views/securityUnitChild/index.vue
+++ b/src/views/securityUnitChild/index.vue
@@ -42,6 +42,47 @@
         </avue-form>
       </basic-container>
     </span>
+    <span v-if="typeTABS.prop === 'tab11'" class="tab">
+      <!-- <avue-crud
+        :option="option"
+        :data="data"
+        :page.sync="page"
+        ref="crudrec"
+        @on-load="onLoad"
+        :table-loading="loading"
+        @row-save="rowSave"
+        @search-change="searchChange"
+        @search-reset="searchReset"
+        @row-update="rowUpdate"
+        @row-del="rowDel"
+        @selection-change="selectionChange"
+        @refresh-change="refreshChange"
+      >
+        <template slot="menuLeft">
+          <el-button
+            type="danger"
+            size="small"
+            plain
+            icon="el-icon-delete"
+            @click="handleDelete"
+            >删 除
+          </el-button>
+        </template>
+      </avue-crud>-->
+      <!-- 表单组件 -->
+      <basic-container>
+        <avue-form
+          ref="form"
+          v-model="obj0"
+          :option="option01"
+          @submit="submit0"
+        >
+          <!-- <template slot-scope="scope" slot="menuForm">
+          <el-button @click="tip">自定义按钮</el-button>
+        </template> -->
+        </avue-form>
+      </basic-container>
+    </span>
     <span v-else-if="typeTABS.prop === 'tab2'" class="tab">
       <!-- <span v-if="typeTABS.prop === 'tab2'"> -->
       <basic-container>
@@ -183,7 +224,7 @@
 </template> 
 
 <script>
-import { column, column1, column2 } from "./data";
+import { column11, column, column1, column2 } from "./data";
 import {
   getOncedata,
   // getdata,
@@ -262,7 +303,7 @@
               res: "data",
             },
             tip: "请上传 .xls,.xlsx 标准格式文件",
-            action: "/api/car/import-examSubject",
+            action: "/api/shareholder/import-share",
           },
           {
             label: "模板下载",
@@ -290,7 +331,7 @@
               res: "data",
             },
             tip: "请上传 .xls,.xlsx 标准格式文件",
-            action: "/api/examSubjectChoices/import-examSubject",
+            action: "/api/member/import-member",
           },
           {
             label: "模板下载",
@@ -308,6 +349,11 @@
             // icon: "el-icon-info",
             label: "保安单位基本信息",
             prop: "tab1",
+          },
+          {
+            // icon: "el-icon-info",
+            label: "工商信息",
+            prop: "tab11",
           },
           {
             // icon: "el-icon-info",
@@ -364,6 +410,14 @@
         submitText: "保存",
         gutter: 30,
         column: column,
+      },
+
+      option01: {
+        emptyBtn: false,
+        submitBtn: false,
+        submitText: "保存",
+        gutter: 30,
+        column: column11,
       },
 
       loading1: true, //派遣记录
@@ -445,7 +499,7 @@
       update(row).then(
         () => {
           // this.onLoad(this.page);
-          this.onloads();
+          // this.onloads();
           this.$message({
             type: "success",
             message: "操作成功!",
@@ -467,11 +521,11 @@
     uploadAfter(res, done, loading, column) {
       window.console.log(column);
       this.excelBox = false;
-      this.refreshChange();
+      this.refreshChange1();
       done();
     },
     handleTemplate() {
-      window.open(`/api/car/export-template`);
+      window.open(`/api/shareholder/export-template`);
     },
 
     handleImport1() {
@@ -481,11 +535,11 @@
     uploadAfter1(res, done, loading, column) {
       window.console.log(column);
       this.excelBox1 = false;
-      // this.refreshChange();
+      this.refreshChange2();
       done();
     },
     handleTemplate1() {
-      window.open(`/api/examSubjectChoices/export-template`);
+      window.open(`/api/member/export-template`);
     },
 
     handleChangeTABS(column) {
@@ -622,7 +676,6 @@
       this.loading1 = true;
       console.log(page, params, 3435434);
       params["creditcode"] = this.creditcode;
-      params["deptId"] = this.departmentid;
       getdataOnce1(
         page.currentPage,
         page.pageSize,
@@ -769,7 +822,6 @@
       // console.log(page);
       // getdata2(
       params["creditcode"] = this.creditcode;
-      params["deptId"] = this.departmentid;
       getdataOnce2(
         page.currentPage,
         page.pageSize,
@@ -803,7 +855,11 @@
           for (var k in row) {
             that.obj0[k] = row[k];
           }
-          that.creditcode = row.creditcode;
+          if (row.creditcode == "") {
+            that.creditcode = 111;
+          } else {
+            that.creditcode = row.creditcode;
+          }
           if (that.readLock("danweidataS") != null && a == 1) {
             var b = JSON.parse(that.readLock("danweidataS"));
             var i = 0;
@@ -872,19 +928,30 @@
         getRoleDetail(roleId).then((res) => {
           var roleAlias = res.data.data.roleAlias;
           var d = that.option0.column;
+          var e = that.option01.column;
           // console.log(roleAlias);
           if (roleAlias == "保安公司管理员") {
             that.option0.submitBtn = true;
+            that.option01.submitBtn = true;
             for (var k in d) {
-              if (d[k].label != "企业类型") {
-                d[k].disabled = false;
-              }
+              // if (d[k].label != "企业类型") {
+              d[k].disabled = false;
+              // }
+            }
+            for (var n in e) {
+              // if (d[k].label != "企业类型") {
+              e[n].disabled = false;
+              // }
             }
           } else {
             that.option0.submitBtn = false;
+            that.option01.submitBtn = false;
             for (var k in d) {
               d[k].disabled = true;
             }
+            for (var n in e) {
+              e[n].disabled = true;
+            }
           }
           getdatas(roleAlias);
         });

--
Gitblit v1.9.3