Pārlūkot izejas kodu

```前端銀行號、機構號顯隱控制

fangq 4 gadi atpakaļ
vecāks
revīzija
63088d7aa3

+ 4 - 1
src/components/common/returns-comfire.vue

@@ -29,6 +29,7 @@
       return {
         loading: false,
         data: [],
+
         form: {},
         option: {
           height:'auto',
@@ -251,7 +252,8 @@
       },
 
     },
-    mounted() {
+    created() {
+
 
     },
     methods: {
@@ -288,6 +290,7 @@
       selectionChange(list) {
         this.selectionList = list;
       },
+
     }
   }
 </script>

+ 1 - 0
src/views/bank/cardswallow.vue

@@ -171,6 +171,7 @@
               span: 24,
               hide: true,
               disabled: true,
+              display: false,
               search: true,
               searchSpan: 4,
               rules: [{

+ 9 - 0
src/views/bank/checklist.vue

@@ -88,6 +88,7 @@
   export default {
     data() {
       return {
+        isManageUser: false,
 
         titleDay: '',
         titleWeek: '',
@@ -456,6 +457,14 @@
           this.titleMonth = data.content;
         }
       });
+      getCurrentDept().then(res => {
+        const data =  res.data.data;
+        this.isManageUser = data.deptCategory == 1;
+        //控制字段顯隱
+        this.findObject(this.option.column, "bankNo").display = this.isManageUser;
+        this.findObject(this.option.column, "orgNo").display = this.isManageUser;
+        this.findObject(this.option.column, "orgName").span = this.isManageUser ? 12 : 24;
+      });
     },
     methods: {
       handleDownload(){

+ 10 - 0
src/views/bank/checkwarehouse.vue

@@ -86,6 +86,8 @@
         }
       };
       return {
+        isManageUser: false,
+
         title: "",
         attachBox: false,
         attachForm: {},
@@ -481,6 +483,14 @@
           this.option.column.splice(0,1)
         }
       });
+      getCurrentDept().then(res => {
+        const data =  res.data.data;
+        this.isManageUser = data.deptCategory == 1;
+        //控制字段顯隱
+        this.findObject(this.option.column, "bankNo").display = this.isManageUser;
+        this.findObject(this.option.column, "orgNo").display = this.isManageUser;
+        this.findObject(this.option.column, "orgName").span = this.isManageUser ? 12 : 24;
+      });
     },
     methods: {
       fileDownload(row){

+ 2 - 0
src/views/bank/goodsuse.vue

@@ -110,6 +110,8 @@
     components: {GoodsuseBalance, GoodsuseSure, SelectDialogUser, FlowSettings},
     data() {
       return {
+        isManageUser: false,
+
         balanceVisible: false,
         transferVisible: false,
         delBatchBtn: true,

+ 24 - 1
src/views/bank/keypwd.vue

@@ -180,6 +180,7 @@
               span: 24,
               hide: true,
               disabled: true,
+              display: false,
               search: true,
               searchSpan: 4,
               rules: [{
@@ -194,6 +195,7 @@
               type: "select",
               hide: true,
               disabled: true,
+              display: true,
               filterable: true,
               dicData: [],
               props: {
@@ -202,7 +204,7 @@
               },
               change: ({value, column}) => {
                 if (!value) return;
-                let dicData = this.findObject(this.option.column, 'orgNo').dicData;
+                let dicData = column.dicData;
                 dicData.forEach(item => {
                   if (item.orgNo == value){
                     this.form.orgName = item.deptName;
@@ -219,6 +221,22 @@
               label: "機構名稱",
               prop: "orgName",
               disabled: true,
+              type: "select",
+              filterable: true,
+              dicData: [],
+              props: {
+                label: "deptName",
+                value: "deptName"
+              },
+              change: ({value, column}) => {
+                if (!value) return;
+                let dicData = column.dicData;
+                dicData.forEach(item => {
+                  if (item.deptName == value){
+                    this.form.orgNo = item.orgNo;
+                  }
+                })
+              },
               rules: [{
                 required: true,
                 message: "請輸入機構號",
@@ -542,6 +560,7 @@
           }
         })
         this.findObject(this.option.column, "orgNo").dicData = dicData;
+        this.findObject(this.option.column, "orgName").dicData = dicData;
       });
 
       // this.initCurrentDeptAndKeepCategroy();
@@ -553,6 +572,10 @@
           this.currentDept = data;
           this.isManageUser = data.deptCategory == 1;
 
+          //控制字段顯隱
+          this.findObject(this.option.column, "bankNo").display = false;
+          this.findObject(this.option.column, "orgNo").display = this.isManageUser;
+          this.findObject(this.option.column, "orgName").span = this.isManageUser ? 12 : 24;
         });
       },
       turnInChange(value){

+ 11 - 0
src/views/bank/postchange.vue

@@ -354,6 +354,8 @@
     components: {SelectDialogUser, FlowSettings},
     data() {
       return {
+        isManageUser: false,
+
         dicts: [],
         transferVisible: false,
 
@@ -954,6 +956,15 @@
         })*/
         this.initForm();
       })
+
+      getCurrentDept().then(res => {
+        const data =  res.data.data;
+        this.isManageUser = data.deptCategory == 1;
+        //控制字段顯隱
+        this.findObject(this.option.column, "bankNo").display = this.isManageUser;
+        this.findObject(this.option.column, "orgNo").display = this.isManageUser;
+        this.findObject(this.option.column, "orgName").span = this.isManageUser ? 12 : 24;
+      });
     },
     mounted() {
       // this.initForm();

+ 35 - 4
src/views/bank/returns.vue

@@ -126,11 +126,15 @@
   import {getStandardByCode} from "@/api/bank/handoverstandard";
   import ReturnsApproveBatch from "../../components/common/returns-approve-batch";
   import {getDictValue} from "../../api/system/dict";
+  import {getDictByCodes} from "../../api/system/dict";
 
   export default {
     components: {ReturnsApproveBatch, ReturnsIssue, FlowSettings, ReturnsApprove, ReturnsComfire},
     data() {
       return {
+        dictReturnsStatus: [],
+        dictBusinessType: [],
+
         personId: null,
         personNo: null,
         personName: null,
@@ -214,6 +218,7 @@
               prop: "bankNo",
               span: 24,
               hide: true,
+              display: false,
               search: true,
               searchSpan: 4,
               rules: [{
@@ -226,7 +231,7 @@
               label: "機構號",
               prop: "orgNo",
               hide: true,
-              viewDisplay: false,
+              display: false,
               rules: [{
                 required: true,
                 message: "請輸入機構號",
@@ -238,7 +243,7 @@
               prop: "orgName",
               hide: true,
               disabled: true,
-              viewDisplay: false,
+              display: false,
               rules: [{
                 required: true,
                 message: "請輸入機構號",
@@ -558,6 +563,19 @@
           this.option.viewTitle = data.content;
         }
       });
+      if (this.dictReturnsStatus.length == 0){
+        getDictByCodes('returns_status').then(res => {
+          let data = res.data.data;
+          this.dictReturnsStatus = data;
+        })
+      }
+      if (this.dictBusinessType.length == 0){
+        getDictByCodes('business_type').then(res => {
+          let data = res.data.data;
+          this.dictBusinessType = data;
+        })
+      }
+
     },
     methods: {
       settingCallback(row){
@@ -684,18 +702,31 @@
         this.approveVisible = true;
         this.approveForm = row;
       },
+      getDictValueByLabel(dict, label){
+        for (let i = 0; i < dict.length; i++) {
+          let item = dict[i];
+          if (item.dictValue == label){
+            return item.dictKey;
+          }
+        }
+        return null;
+      },
       infoFormat(row){
-        row.isPublic = row.isPublic == '對公' ? 1 : 0;
         let arr = row.subBank.split(' ');
         row.subOrgNo = arr[0];
         row.subBank = arr[1];
+        /*row.isPublic = row.isPublic == '對公' ? 1 : 0;
         if (row.status == '退件'){
           row.status = '1';
         }else if (row.status == 'HOLD'){
           row.status = '2';
         }else if (row.status == '完成'){
           row.status = '3';
-        }
+        }*/
+        row.isPublic = this.getDictValueByLabel(this.dictBusinessType, row.isPublic);
+        row.status = this.getDictValueByLabel(this.dictReturnsStatus, row.status);
+        debugger
+
         /*let userInfoStr = localStorage.getItem("saber-userInfo");
         let userInfo = JSON.parse(userInfoStr);
         row.bankConfirmNo = userInfo.content.user_ehr;

+ 24 - 1
src/views/bank/sealhandover.vue

@@ -205,7 +205,7 @@
               },
               change: ({value, column}) => {
                 if (!value) return;
-                let dicData = this.findObject(this.option.column, 'orgNo').dicData;
+                let dicData = column.dicData;
                 dicData.forEach(item => {
                   if (item.orgNo == value){
                     this.form.orgName = item.deptName;
@@ -222,6 +222,22 @@
               label: "機構名稱",
               prop: "orgName",
               disabled: true,
+              type: "select",
+              filterable: true,
+              dicData: [],
+              props: {
+                label: "deptName",
+                value: "deptName"
+              },
+              change: ({value, column}) => {
+                if (!value) return;
+                let dicData = column.dicData;
+                dicData.forEach(item => {
+                  if (item.deptName == value){
+                    this.form.orgNo = item.orgNo;
+                  }
+                })
+              },
               rules: [{
                 required: true,
                 message: "請輸入機構號",
@@ -524,6 +540,7 @@
           }
         })
         this.findObject(this.option.column, "orgNo").dicData = dicData;
+        this.findObject(this.option.column, "orgName").dicData = dicData;
       });
       getStandardByCode("sealhandover").then(res => {
         const data = res.data.data;
@@ -539,6 +556,12 @@
       getCurrentDept().then(res => {
         const data = res.data.data;
         this.currentDept = data;
+
+        this.isManageUser = data.deptCategory == 1;
+        //控制字段顯隱
+        this.findObject(this.option.column, "bankNo").display = false;
+        this.findObject(this.option.column, "orgNo").display = this.isManageUser;
+        this.findObject(this.option.column, "orgName").span = this.isManageUser ? 12 : 24;
       })
     },
     methods: {

+ 10 - 0
src/views/bank/tellertrunk.vue

@@ -81,6 +81,8 @@
         }
       };
       return {
+        isManageUser: false,
+
         title: "",
         attachBox: false,
         attachForm: {},
@@ -497,6 +499,14 @@
           this.option.column.splice(0,1)
         }
       });
+      getCurrentDept().then(res => {
+        const data =  res.data.data;
+        this.isManageUser = data.deptCategory == 1;
+        //控制字段顯隱
+        this.findObject(this.option.column, "bankNo").display = this.isManageUser;
+        this.findObject(this.option.column, "orgNo").display = this.isManageUser;
+        this.findObject(this.option.column, "orgName").span = this.isManageUser ? 12 : 24;
+      });
     },
     methods: {
       fileDownload(row){