fangq 4 anos atrás
pai
commit
54e51666b5

+ 44 - 40
src/components/confirmed/confirmed-keypwd.vue

@@ -143,7 +143,7 @@
           currentPage: 1,
           total: 0
         },
-        disabeldReceiver: false,
+        disabeldReceiver: true,
         disabeldHandover: true,
         selectionList: [],
         selectReceiver: '',
@@ -549,6 +549,9 @@
       turnInChange(value){
         this.findObject(this.option.column, "receiverNo").rules[0].required = !value;
         this.findObject(this.option.column, "receiverName").rules[0].required = !value;
+        // this.findObject(this.option.column, "receiverNo").disabled = !value;
+        this.disabeldReceiver = !value;
+
         this.form.receiverNo = null,this.form.receiverName = null;
       },
       handleDownload(){
@@ -590,7 +593,6 @@
       },
       initTypeDict(){
         getKeyType().then(res => {
-
           let data = res.data.data;
           let pid = new Set();
           for (let i = 0; i < data.length; i++) {
@@ -715,47 +717,48 @@
           this.form.number = 1;
           this.form.handoverDate = dateFormat(new Date(), "yyyy-MM-dd hh:mm");
 
-          const data =  this.currentDept;
-          this.form.bankNo = data.bankNo;
-          if (data.deptCategory != 1){
-            //非管理部门
-            this.form.orgNo = data.orgNo;
-            this.form.orgName = data.deptName;
-            this.form.handoverPersonName = this.userInfo.user_name;
-            this.form.handoverPersonNo = this.userInfo.user_ehr;
-            this.form.handoverPersonId = this.userInfo.user_id;
+            const data =  this.currentDept;
+            this.form.bankNo = data.bankNo;
+            if (data.deptCategory != 1){
+              //非管理部门
+              this.form.orgNo = data.orgNo;
+              this.form.orgName = data.deptName;
+              this.form.handoverPersonName = this.userInfo.user_name;
+              this.form.handoverPersonNo = this.userInfo.user_ehr;
+              this.form.handoverPersonId = this.userInfo.user_id;
 
-            let $category = this.findObject(this.option.column, 'category');
-            let dicDataOld = this.findObject(this.option.column, 'categoryShow').dicData;
-            $category.dicData = [];
-            getCurrentUserKeepCategory().then(res => {
-              let data = res.data.data;
-              if (!data){
-                // this.$message.warning("當前用戶暫時並無持有相關鑰匙/密碼/實物!");
-              }else{
-                let dicDataNew = [];
-                dicDataOld.forEach(item => {
-                  item.disabled = true;
-                  if (item.hasChildren){
-                    item.children.forEach(child => {
-                      child.disabled = child.isSealed == 1;
-                      if (data.indexOf(child.dictKey) != -1){
-                        dicDataNew.push(child)
-                      }
-                    })
-                  }
-                })
-                $category.dicData = dicDataNew;
-                this.userKeepList = dicDataNew;
-              }
+              let $category = this.findObject(this.option.column, 'category');
+              let dicDataOld = this.findObject(this.option.column, 'categoryShow').dicData;
+              $category.dicData = [];
+              getCurrentUserKeepCategory().then(res => {
+                let data = res.data.data;
+                if (!data){
+                  // this.$message.warning("當前用戶暫時並無持有相關鑰匙/密碼/實物!");
+                }else{
+                  data += ",";
+                  let dicDataNew = [];
+                  dicDataOld.forEach(item => {
+                    item.disabled = true;
+                    if (item.hasChildren){
+                      item.children.forEach(child => {
+                        child.disabled = child.isSealed == 1;
+                        if (data.indexOf(child.dictKey) != -1){
+                          dicDataNew.push(child)
+                        }
+                      })
+                    }
+                  })
+                  $category.dicData = dicDataNew;
+                  this.userKeepList = dicDataNew;
+                }
+                done();
+              });
+            }else{
+              this.findObject(this.option.column, 'orgNo').disabled = false;
+              this.findObject(this.option.column, 'orgName').disabled = false;
               done();
-            });
-          }else{
-            this.findObject(this.option.column, 'orgNo').disabled = false;
-            this.findObject(this.option.column, 'orgName').disabled = false;
-            done();
 
-          }
+            }
 
           /*// 支行用户自行添加交接,需要获取当前用户持有的列表作为下拉内容
           this.findObject(this.option.column, 'sealType').dicData = this.userKeepList;*/
@@ -764,6 +767,7 @@
         if (["edit", "view"].includes(type)) {
           getDetail(this.form.id).then(res => {
             this.form = res.data.data;
+            this.form.categoryShow = this.form.category;
             done();
           });
         }

+ 39 - 35
src/components/confirmed/confirmed-sealhandover.vue

@@ -268,23 +268,23 @@
                 if (!value || this.type == 'view') return;
                 if (!this.form.sealNo){
                   getByNoAndType(this.form.sealNo, value, this.form.orgNo).then(res => {
-                    const data = res.data.data;
-                    if (Object.keys(data).length == 0){
+                  const data = res.data.data;
+                  if (Object.keys(data).length == 0){
+                    this.receiverDisabled = false;
+                  } else {
+                    // 編輯時,若記錄為自己,則跳過
+                    if (this.form.id == data.id){
+                      return;
+                    }
+                    if (data.isTurnIn == 1){
+                      this.$message.warning("此印章已上繳,請重新選擇!");
+                      this.receiverDisabled = true;
+                      this.form.sealNo = null;
+                    }else{
                       this.receiverDisabled = false;
-                    } else {
-                      // 編輯時,若記錄為自己,則跳過
-                      if (this.form.id == data.id){
-                        return;
-                      }
-                      if (data.isTurnIn == 1){
-                        this.$message.warning("此印章已上繳,請重新選擇!");
-                        this.receiverDisabled = true;
-                        this.form.sealNo = null;
-                      }else{
-                        this.receiverDisabled = false;
-                      }
                     }
-                  });
+                  }
+                });
                 }
 
                 //支行用户添加交接
@@ -674,6 +674,11 @@
       beforeOpen(done, type) {
         this.type = type;
         if (type === 'add'){
+          //恢复必填
+          this.findObject(this.option.column, "receiverNo").rules[0].required = true;
+          this.findObject(this.option.column, "receiverName").rules[0].required = true;
+          this.receiverDisabled = false;
+
           this.form.handoverPersonId = this.userInfo.user_id;
           this.form.handoverPersonNo = this.userInfo.user_ehr;
           this.form.handoverPersonName = this.userInfo.user_name;
@@ -695,21 +700,13 @@
             this.form.orgNo = data.orgNo;
             this.form.orgName = data.deptName;
 
-            // 支行用户自行添加交接,需要获取当前用户持有的列表作为下拉内容
-            this.findObject(this.option.column, 'sealType').dicData = this.userKeepList;
+            getCurrentUserKeepList().then(res => {
+              this.userKeepList = res.data.data;
+              // 支行用户自行添加交接,需要获取当前用户持有的列表作为下拉内容
+              this.findObject(this.option.column, 'sealType').dicData = this.userKeepList;
+              done();
+            });
           }
-
-
-          //恢复必填
-          this.findObject(this.option.column, "receiverNo").rules[0].required = true;
-          this.findObject(this.option.column, "receiverName").rules[0].required = true;
-          this.receiverDisabled = false;
-        }
-        if (type == 'edit'){
-          this.findObject(this.option.column, 'sealType').disabled = true;
-          this.findObject(this.option.column, 'sealNo').disabled = true;
-          // 支行用户自行添加交接,需要获取当前用户持有的列表作为下拉内容
-          this.findObject(this.option.column, 'sealType').dicData = this.userKeepList;
         }
         if (this.form.isTurnIn){
           this.turnInChange(true)
@@ -717,13 +714,20 @@
         if (type == 'edit' && this.form.sealType.indexOf('-') == -1){
           this.form.sealType = this.form.sealType + '-' + this.form.sealNo;
         }
-        /*if (["edit", "view"].includes(type)) {
-          getDetail(this.form.id).then(res => {
-            this.form = res.data.data;
-          });
-        }*/
         this.turnInDisabled = type == 'edit'
-        done();
+        if (type == 'edit'){
+          this.findObject(this.option.column, 'sealType').disabled = true;
+          this.findObject(this.option.column, 'sealNo').disabled = true;
+          getCurrentUserKeepList().then(res => {
+            this.userKeepList = res.data.data;
+            // 支行用户自行添加交接,需要获取当前用户持有的列表作为下拉内容
+            this.findObject(this.option.column, 'sealType').dicData = this.userKeepList;
+            done();
+          });
+
+        }
+
+        // done();
       },
       searchReset() {
         this.query = {};

+ 198 - 26
src/components/initiated/init-keypwd.vue

@@ -45,19 +45,36 @@
       </template>
 
       <template slot="menu" slot-scope="{row, index}">
-        <el-button size="small" class="el-button--text" v-if="permission.keypwd_edit && userInfo.user_id == row.createUser" @click="$refs.crud.rowEdit(row, index)"><i class="el-icon-edit"></i> 編 輯</el-button>
-        <el-button size="small" class="el-button--text" v-if="permission.keypwd_delete && userInfo.user_id == row.createUser" @click="$refs.crud.rowDel(row, index)"><i class="el-icon-delete"></i> 刪 除</el-button>
+        <el-button size="small" class="el-button--text" v-if="permission.keypwd_edit && userInfo.user_id == row.createUser && row.process == 2" @click="$refs.crud.rowEdit(row, index)"><i class="el-icon-edit"></i> 編 輯</el-button>
+        <el-button size="small" class="el-button--text" v-if="permission.keypwd_delete && userInfo.user_id == row.createUser && row.process == 2" @click="$refs.crud.rowDel(row, index)"><i class="el-icon-delete"></i> 刪 除</el-button>
+        <el-button size="small" class="el-button--text" v-if="permission.keypwd_sure && row.process == 2 && row.receiverId == userInfo.user_id" @click="approveForm=row,approveVisible=true"><i class="el-icon-check"></i> 確 認</el-button>
       </template>
 
       <template slot="receiverNameForm">
-        <select-dialog-user :name="form.receiverName" :ehr="form.receiverNo" :disabled="disabeldReceiver" :callback="selectCallback"></select-dialog-user>
+        <select-dialog-user :id="form.receiverId" :name="form.receiverName" :ehr="form.receiverNo" :disabled="disabeldReceiver" :callback="selectCallback"></select-dialog-user>
       </template>
       <template slot="handoverPersonNameForm">
-        <select-dialog-user :name="form.handoverPersonName" :ehr="form.handoverPersonNo" :disabled="disabeldHandover" :callback="handoverSelectCallback"></select-dialog-user>
+        <select-dialog-user :id="form.handoverPersonId" :name="form.handoverPersonName" :ehr="form.handoverPersonNo" :disabled="disabeldHandover" :callback="handoverSelectCallback"></select-dialog-user>
       </template>
 
       <template slot-scope="{disabled,size}" slot="categorySearch">
-        <avue-input-tree :check-strictly="false" multiple v-model="search.category" placeholder="請選擇內容" type="tree" :dic="typeList" :props="props"></avue-input-tree>
+        <avue-input-tree :check-strictly="false" v-model="search.category" placeholder="請選擇內容" type="tree" :dic="typeList" :props="props"></avue-input-tree>
+      </template>
+
+      <template slot="isTurnIn" slot-scope="{row}">
+        <el-tag size="small " type="success" plain v-if="row.isTurnIn">上繳</el-tag>
+        <el-tag size="small " type="danger" plain v-if="!row.isTurnIn">非上繳</el-tag>
+      </template>
+
+      <template slot="isTurnInForm" slot-scope="{row}">
+        <el-checkbox v-model="row.isTurnIn" @change="turnInChange"></el-checkbox>
+        <el-tag size="small " type="success" plain v-if="row.isTurnIn">上繳</el-tag>
+        <el-tag size="small " type="danger" plain v-if="!row.isTurnIn">非上繳</el-tag>
+      </template>
+
+      <template slot="process" slot-scope="{row, index}">
+        <el-tag size="small " type="warning" plain v-if="row.process == 2">待確認</el-tag>
+        <el-tag size="small " type="success" plain v-if="row.process == 3">已確認</el-tag>
       </template>
 
       <template slot="titleForm" slot-scope="{row, index}">
@@ -67,16 +84,26 @@
         <span style="color: red;font-weight: bold;">注意事項:</span>
       </template>
 
+
     </avue-crud>
 
     <el-dialog :append-to-body="true" :modal-append-to-body="false" :destroy-on-close="true" :fullscreen="true" :visible.sync="keepVisible" title="保管人查詢">
-      <keypwd-keep></keypwd-keep>
+      <div v-if="keepVisible">
+        <keypwd-keep></keypwd-keep>
+      </div>
+    </el-dialog>
+
+    <el-dialog title="信息確認"
+               append-to-body
+               :visible.sync="approveVisible"
+               width="70%">
+      <keypwd-sure :form="approveForm" @close="approveVisible = false, onLoad(page)"></keypwd-sure>
     </el-dialog>
   </basic-container>
 </template>
 
 <script>
-  import {getList, getDetail, add, update, remove, getByCategoryAndType, getKeyType, getDownloadList} from "@/api/bank/keypwd";
+  import {getList, getDetail, add, update, remove, getByCategoryAndType, getKeyType, getDownloadList, getCurrentUserKeepCategory} from "@/api/bank/keypwd";
   import {mapGetters} from "vuex";
   import {dateFormat} from "../../util/date";
   import SelectDialogUser from "../select-dialog/select-dialog-user";
@@ -84,14 +111,17 @@
   import {getDeptTree, getTree} from "@/api/system/dept";
   import KeypwdKeep from "../../views/bank/keypwd-keep";
   import {getStandardByCode} from "@/api/bank/handoverstandard";
-
-  let _today = dateFormat(new Date(), 'yyyy-MM-dd');
+  import KeypwdSure from "@/components/common/keypwd-sure";
 
   export default {
     name: "init-keypwd",
-    components: {KeypwdKeep, SelectDialogUser},
+    components: {KeypwdSure, KeypwdKeep, SelectDialogUser},
     data() {
       return {
+        isManageUser: false,
+        userKeepList: [],
+        currentDept: [],
+
         title: "",
         search: {},
         typeList: [],
@@ -100,6 +130,9 @@
           value: "dictKey",
         },
 
+        approveForm: {},
+        approveVisible: false,
+
         delBatchBtn: true,
         keepVisible: false,
         form: {},
@@ -159,8 +192,24 @@
             {
               label: "機構號",
               prop: "orgNo",
+              type: "select",
               hide: true,
               disabled: true,
+              filterable: true,
+              dicData: [],
+              props: {
+                label: "orgNo",
+                value: "orgNo"
+              },
+              change: ({value, column}) => {
+                if (!value) return;
+                let dicData = this.findObject(this.option.column, 'orgNo').dicData;
+                dicData.forEach(item => {
+                  if (item.orgNo == value){
+                    this.form.orgName = item.deptName;
+                  }
+                })
+              },
               rules: [{
                 required: true,
                 message: "請輸入機構號",
@@ -177,21 +226,44 @@
                 trigger: "blur"
               }]
             },
+            {
+              label: "分類種類",
+              prop: "categoryShow",
+              checkStrictly: true,
+              type: "tree",
+              multiple: true,
+              addDisplay: false,
+              editDisplay: false,
+              viewDisplay: true,
+              // dicUrl: "/api/blade-system/dict/dictionary?code=key_type",
+              dicData: [],
+              dataType: "string",
+              props:{
+                label: "dictValue",
+                value: "dictKey",
+              },
+            },
             {
               label: "分類種類",
               prop: "category",
+              hide: true,
+              addDisplay: true,
+              editDisplay: true,
+              viewDisplay: false,
               search: true,
               checkStrictly: true,
               type: "tree",
+              multiple: true,
               // dicUrl: "/api/blade-system/dict/dictionary?code=key_type",
               dicData: [],
+              dataType: "string",
               props:{
                 label: "dictValue",
                 value: "dictKey",
               },
               searchslot: true,
               change: ({value, column}) => {
-                if (!value || this.type == 'view' || this.type == 'edit') return;
+                /*if (!value || value.length == 0 || this.type == 'view' || this.form.category == value) return;
                 getByCategoryAndType(value, this.form.orgNo).then(res => {
                   const data = res.data.data;
                   let $handoverNo = this.findObject(this.option.column, 'handoverPersonNo');
@@ -205,7 +277,7 @@
                     this.form.handoverPersonNo = data.receiverNo;
                     this.form.handoverPersonName = data.receiverName;
                   }
-                });
+                });*/
               },
               rules: [{
                 required: true,
@@ -290,12 +362,24 @@
               prop: "number",
               type: "number",
               disabled: true,
+              hide: true,
+              display: false,
               rules: [{
                 required: true,
                 message: "請輸入數量",
                 trigger: "blur"
               }]
             },
+            {
+              label: "是否上繳",
+              prop: "isTurnIn",
+              formslot: true,
+              rules: [{
+                required: false,
+                message: "請勾選是否上繳",
+                trigger: "blur"
+              }]
+            },
             {
               label: "交出人",
               prop: "handoverPersonName",
@@ -316,14 +400,15 @@
                 trigger: "blur"
               }]
             },
+
             {
               label: "接收人",
               prop: "receiverName",
+              disabled: true,
               search: true,
-              // searchPlaceholder: "保管人",
-              // searchTip: "保管人",
               searchSpan: 4,
-              formslot:  true,
+              // formslot:  true,
+              disabled:  true,
               rules: [{
                 required: true,
                 message: "請輸入接收人員工號",
@@ -395,6 +480,11 @@
                 trigger: "blur"
               }]
             },
+            {
+              label: "進度",
+              prop: "process",
+              display: false,
+            },
           ]
         },
         data: []
@@ -434,8 +524,36 @@
           this.option.column.splice(0,1)
         }
       });
+      getChildsDept().then(res => {
+        let dicData = [];
+        let data = res.data.data;
+        data.forEach(item => {
+          if (item.orgNo.indexOf("999") == -1){
+            dicData.push(item)
+          }
+        })
+        this.findObject(this.option.column, "orgNo").dicData = dicData;
+      });
+
+      // this.initCurrentDeptAndKeepCategroy();
     },
     methods: {
+      initCurrentDeptAndKeepCategroy(){
+        getCurrentDept().then(res => {
+          const data =  res.data.data;
+          this.currentDept = data;
+          this.isManageUser = data.deptCategory == 1;
+
+        });
+      },
+      turnInChange(value){
+        this.findObject(this.option.column, "receiverNo").rules[0].required = !value;
+        this.findObject(this.option.column, "receiverName").rules[0].required = !value;
+        // this.findObject(this.option.column, "receiverNo").disabled = !value;
+        this.disabeldReceiver = !value;
+
+        this.form.receiverNo = null,this.form.receiverName = null;
+      },
       handleDownload(){
         if (this.selectionList.length === 0) {
           let tip = "確定下載篩選的" + this.page.total + "條數據嗎?"
@@ -446,7 +564,9 @@
           })
             .then(() => {
               getDownloadList(this.query).then(res => {
-                this.downLoadData(res.data.data, true)
+                let data = res.data.data;
+                data.forEach(item => {item.isTurnIn = item.isTurnIn == 1 ? true : false;item.categoryShow = item.category;})
+                this.downLoadData(data, true)
               });
             })
         }else{
@@ -473,7 +593,6 @@
       },
       initTypeDict(){
         getKeyType().then(res => {
-
           let data = res.data.data;
           let pid = new Set();
           for (let i = 0; i < data.length; i++) {
@@ -489,6 +608,7 @@
             })
           })
           arr.forEach(item => {
+            item.disabled = true;
             data.forEach(it => {
               if (item.id == it.parentId){
                 if (!item.children){
@@ -511,6 +631,7 @@
             }
           });
           this.findObject(this.option.column, 'category').dicData = formDicData;
+          this.findObject(this.option.column, 'categoryShow').dicData = formDicData;
           return arr;
         })
       },
@@ -519,10 +640,12 @@
         this.form.handoverPersonName = value.name;
       },
       selectCallback(value){
+        this.form.receiverId = value.id;
         this.form.receiverNo = value.ehr;
         this.form.receiverName = value.name;
       },
       rowSave(row, done, loading) {
+        row.isTurnIn = !row.isTurnIn ? 0 : 1;
         add(row).then(() => {
           this.onLoad(this.page);
           this.$message({
@@ -536,6 +659,7 @@
         });
       },
       rowUpdate(row, index, done, loading) {
+        row.isTurnIn = !row.isTurnIn ? 0 : 1;
         update(row).then(() => {
           this.onLoad(this.page);
           this.$message({
@@ -590,31 +714,73 @@
       beforeOpen(done, type) {
         this.type = type;
         if (type === 'add'){
-          let userInfo = localStorage.getItem("saber-userInfo");
           this.form.number = 1;
           this.form.handoverDate = dateFormat(new Date(), "yyyy-MM-dd hh:mm");
-          getCurrentDept().then(res => {
-            const data =  res.data.data;
+
+            const data =  this.currentDept;
             this.form.bankNo = data.bankNo;
-            this.form.orgNo = data.orgNo;
-            this.form.orgName = data.deptName;
-          });
+            if (data.deptCategory != 1){
+              //非管理部门
+              this.form.orgNo = data.orgNo;
+              this.form.orgName = data.deptName;
+              this.form.handoverPersonName = this.userInfo.user_name;
+              this.form.handoverPersonNo = this.userInfo.user_ehr;
+              this.form.handoverPersonId = this.userInfo.user_id;
+
+              let $category = this.findObject(this.option.column, 'category');
+              let dicDataOld = this.findObject(this.option.column, 'categoryShow').dicData;
+              $category.dicData = [];
+              getCurrentUserKeepCategory().then(res => {
+                let data = res.data.data;
+                if (!data){
+                  // this.$message.warning("當前用戶暫時並無持有相關鑰匙/密碼/實物!");
+                }else{
+                  data += ",";
+                  let dicDataNew = [];
+                  dicDataOld.forEach(item => {
+                    item.disabled = true;
+                    if (item.hasChildren){
+                      item.children.forEach(child => {
+                        child.disabled = child.isSealed == 1;
+                        if (data.indexOf(child.dictKey) != -1){
+                          dicDataNew.push(child)
+                        }
+                      })
+                    }
+                  })
+                  $category.dicData = dicDataNew;
+                  this.userKeepList = dicDataNew;
+                }
+                done();
+              });
+            }else{
+              this.findObject(this.option.column, 'orgNo').disabled = false;
+              this.findObject(this.option.column, 'orgName').disabled = false;
+              done();
+
+            }
+
+          /*// 支行用户自行添加交接,需要获取当前用户持有的列表作为下拉内容
+          this.findObject(this.option.column, 'sealType').dicData = this.userKeepList;*/
+
         }
         if (["edit", "view"].includes(type)) {
           getDetail(this.form.id).then(res => {
             this.form = res.data.data;
+            this.form.categoryShow = this.form.category;
+            done();
           });
         }
-        done();
+        /*done();*/
       },
       searchReset() {
         this.query = {};
         this.onLoad(this.page);
       },
       searchChange(params, done) {
-        if (params.category){
+        /*if (params.category){
           params.category = params.category.join();
-        }
+        }*/
         if (params.orgNos){
           params.orgNostr = params.orgNos.join();
           params.orgNos = '';
@@ -663,10 +829,16 @@
         getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
           const data = res.data.data;
           this.page.total = data.total;
+          data.records.forEach(item => {
+            item.isTurnIn = item.isTurnIn == 1;
+            item.categoryShow = item.category;
+          })
           this.data = data.records;
           this.loading = false;
           this.selectionClear();
         });
+
+        this.initCurrentDeptAndKeepCategroy();
       }
     }
   };

+ 208 - 51
src/components/initiated/init-sealhandover.vue

@@ -45,16 +45,22 @@
       </template>
 
       <template slot="menu" slot-scope="{row, index}">
-        <el-button size="small" class="el-button--text" v-if="permission.sealhandover_edit && userInfo.user_id == row.createUser" @click="$refs.crud.rowEdit(row, index)"><i class="el-icon-edit"></i> 編 輯</el-button>
-        <el-button size="small" class="el-button--text" v-if="permission.sealhandover_delete && userInfo.user_id == row.createUser" @click="$refs.crud.rowDel(row, index)"><i class="el-icon-delete"></i> 刪 除</el-button>
+        <el-button size="small" class="el-button--text" v-if="permission.sealhandover_edit && userInfo.user_id == row.createUser && row.process == 2" @click="$refs.crud.rowEdit(row, index)"><i class="el-icon-edit"></i> 編 輯</el-button>
+        <el-button size="small" class="el-button--text" v-if="permission.sealhandover_delete && userInfo.user_id == row.createUser && row.process == 2" @click="$refs.crud.rowDel(row, index)"><i class="el-icon-delete"></i> 刪 除</el-button>
+        <el-button size="small" class="el-button--text" v-if="permission.sealhandover_sure && row.process == 2 && row.receiverId == userInfo.user_id" @click="approveForm=row,approveVisible=true"><i class="el-icon-check"></i> 確 認</el-button>
       </template>
 
       <template slot="receiverNameForm">
-        <select-dialog-user :name="form.receiverName" :ehr="form.receiverNo" :disabled="receiverDisabled" :callback="selectCallback"></select-dialog-user>
-      </template>
-      <template slot="handoverPersonNameForm">
-        <select-dialog-user :name="form.handoverPersonName" :ehr="form.handoverPersonNo" :disabled="true" :callback="handoverSelectCallback"></select-dialog-user>
+        <div v-if="!hasOrgNo">
+          <select-dialog-user :id="form.receiverId" :name="form.receiverName" :ehr="form.receiverNo" :disabled="receiverDisabled" :callback="selectCallback"></select-dialog-user>
+        </div>
+        <div v-if="hasOrgNo">
+          <select-dialog-user v-if="hasOrgNo" :id="form.receiverId" :name="form.receiverName" :ehr="form.receiverNo" :disabled="receiverDisabled" :has-org-no="hasOrgNo" :callback="selectCallback"></select-dialog-user>
+        </div>
       </template>
+      <!--<template slot="handoverPersonNameForm">
+        <select-dialog-user :name="form.handoverPersonName" :ehr="form.handoverPersonNo" :callback="handoverSelectCallback"></select-dialog-user>
+      </template>-->
 
       <template slot-scope="{disabled,size}" slot="sealNoSearch">
         <!--        <avue-input placeholder="請選擇內容" v-model="search.sealNos"></avue-input>-->
@@ -75,42 +81,67 @@
       </template>
 
       <template slot="isTurnInForm" slot-scope="{row, index}">
-        <el-checkbox v-model="row.isTurnIn" @change="turnInChange"></el-checkbox>
+        <el-checkbox v-model="row.isTurnIn" :disabled="turnInDisabled" @change="turnInChange"></el-checkbox>
         <el-tag size="small " type="success" plain v-if="row.isTurnIn">上繳至上級單位</el-tag>
         <el-tag size="small " type="danger" plain v-if="!row.isTurnIn">非上繳</el-tag>
       </template>
 
+      <template slot="process" slot-scope="{row, index}">
+        <el-tag size="small " type="warning" plain v-if="row.process == 2">待確認</el-tag>
+        <el-tag size="small " type="success" plain v-if="row.process == 3">已確認</el-tag>
+      </template>
+
     </avue-crud>
 
     <el-dialog :append-to-body="true" :modal-append-to-body="false" :destroy-on-close="true" :fullscreen="true" :visible.sync="keepVisible" title="保管人查詢">
-      <sealhandover-keep></sealhandover-keep>
+      <div v-if="keepVisible">
+        <sealhandover-keep></sealhandover-keep>
+      </div>
+    </el-dialog>
+
+    <el-dialog title="信息確認"
+               append-to-body
+               :visible.sync="approveVisible"
+               width="70%">
+      <sealhandover-sure :form="approveForm" @close="approveVisible = false, onLoad(page)"></sealhandover-sure>
     </el-dialog>
 
   </basic-container>
 </template>
 
 <script>
-  import {getList, getDetail, add, update, remove, getByNoAndType, getDownloadList} from "@/api/bank/sealhandover";
+  import {getList, getDetail, add, update, remove, getByNoAndType, getDownloadList, getCurrentUserKeepList} from "@/api/bank/sealhandover";
   import {mapGetters} from "vuex";
   import { getCurrentDept } from "@/api/system/dept";
-  import {dateFormat} from "../../util/date";
-  import SelectDialogUser from "../../components/select-dialog/select-dialog-user";
-  import {getDeptTree, getTree} from "@/api/system/dept";
+  import {dateFormat} from "@/util/date";
+  import SelectDialogUser from "@/components/select-dialog/select-dialog-user";
+  import {getDeptTree, getTree, getChildsDept} from "@/api/system/dept";
   import {getStandardByCode} from "@/api/bank/handoverstandard";
-  import SealhandoverKeep from "../../views/bank/sealhandover-keep";
+  import SealhandoverSure from "@/components/common/sealhandover-sure";
+  import SealhandoverKeep from "@/views/bank/sealhandover-keep";
 
   export default {
     name: "init-sealhandover",
-    components: {SealhandoverKeep, SelectDialogUser},
+    components: {SealhandoverKeep, SealhandoverSure, SelectDialogUser},
     data() {
       return {
+        turnInDisabled: false,
+
+        isManageUser: false,
+        userKeepList: [],
+        currentDept: [],
+
         title: "",
         search: {},
         receiverDisabled: false,
         keepVisible: false,
         delBatchBtn: true,
 
+        approveForm: {},
+        approveVisible: false,
+
         type: '',
+        hasOrgNo: null,
         form: {},
         query: {},
         loading: true,
@@ -151,6 +182,7 @@
               span: 24,
               hide: true,
               disabled: true,
+              span: 24,
               search: true,
               searchSpan: 4,
               rules: [{
@@ -164,6 +196,23 @@
               prop: "orgNo",
               hide: true,
               disabled: true,
+              filterable: true,
+              type: "select",
+              // dicUrl: `/api/blade-system/expand/dept/getChildsDept`,
+              dicData: [],
+              props: {
+                label: "orgNo",
+                value: "orgNo"
+              },
+              change: ({value, column}) => {
+                if (!value) return;
+                let dicData = this.findObject(this.option.column, 'orgNo').dicData;
+                dicData.forEach(item => {
+                  if (item.orgNo == value){
+                    this.form.orgName = item.deptName;
+                  }
+                })
+              },
               rules: [{
                 required: true,
                 message: "請輸入機構號",
@@ -188,27 +237,62 @@
               props:{
                 label: "dictValue",
                 value: "dictKey",
-              },dicFormatter: (res) => {
-                res.data.forEach(item => {item.disabled = item.isSealed == 1;})
+              },
+              dicFormatter: (res) => {
+                let dicData = this.deepClone(res.data);
+                // 处理完封存的,再填充给印章类型下拉
+                dicData.forEach(item => {item.disabled = item.isSealed == 1;})
+                this.findObject(this.option.column, 'sealType').dicData = dicData;
                 return res.data;
               },
               search: true,
-              hide: true,
-              display: false,
+              // hide: true,
+              addDisplay: false,
+              editDisplay: false,
+              viewDisplay: true,
               searchMultiple: true,
             },
             {
               label: "印章類型",
               prop: "sealType",
               type: "select",
-              dicUrl: "/api/blade-system/dict/dictionary?code=seal_type",
+              hide: true,
+              addDisplay: true,
+              editDisplay: true,
+              viewDisplay: false,
               props:{
                 label: "dictValue",
                 value: "dictKey",
               },
-              dicFormatter: (res) => {
-                res.data.forEach(item => {item.disabled = item.isSealed == 1;})
-                return res.data;
+              change: ({value, column}) => {
+                if (!value || this.type == 'view') return;
+                if (!this.form.sealNo){
+                  getByNoAndType(this.form.sealNo, value, this.form.orgNo).then(res => {
+                  const data = res.data.data;
+                  if (Object.keys(data).length == 0){
+                    this.receiverDisabled = false;
+                  } else {
+                    // 編輯時,若記錄為自己,則跳過
+                    if (this.form.id == data.id){
+                      return;
+                    }
+                    if (data.isTurnIn == 1){
+                      this.$message.warning("此印章已上繳,請重新選擇!");
+                      this.receiverDisabled = true;
+                      this.form.sealNo = null;
+                    }else{
+                      this.receiverDisabled = false;
+                    }
+                  }
+                });
+                }
+
+                //支行用户添加交接
+                if (!this.isManageUser && this.type == 'add'){
+                  let sealObj = value.split('-');
+                  this.form.sealType = sealObj[0];
+                  this.form.sealNo = sealObj[1];
+                }
               },
               rules: [{
                 required: true,
@@ -223,17 +307,13 @@
               searchSpan: 4,
               searchslot: true,
               change: ({value, column}) => {
-                if (!value) return;
+                if (!value ||!this.form.sealType || this.type == 'view') return;
                 getByNoAndType(value, this.form.sealType, this.form.orgNo).then(res => {
                   const data = res.data.data;
                   let $handoverNo = this.findObject(this.option.column, 'handoverPersonNo');
                   if (Object.keys(data).length == 0){
-                    // $handoverNo.disabled = false;
-                    this.form.handoverPersonNo = '';
-                    delete this.form.handoverPersonName;
                     this.receiverDisabled = false;
                   } else {
-                    // $handoverNo.disabled = true;
                     // 編輯時,若記錄為自己,則跳過
                     if (this.form.id == data.id){
                       return;
@@ -241,11 +321,10 @@
                     if (data.isTurnIn == 1){
                       this.$message.warning("此印章已上繳,請重新選擇!");
                       this.receiverDisabled = true;
+                      this.form.sealNo = null;
                     }else{
                       this.receiverDisabled = false;
                     }
-                    this.form.handoverPersonNo = data.receiverNo;
-                    this.form.handoverPersonName = data.receiverName;
                   }
                 });
               },
@@ -279,7 +358,8 @@
             {
               label: "交出人",
               prop: "handoverPersonName",
-              formslot: true,
+              // formslot: true,
+              disabled: true,
               rules: [{
                 required: false,
                 message: "請輸入交出人姓名",
@@ -321,11 +401,10 @@
             {
               label: "接收人",
               prop: "receiverName",
+              disabled: true,
               search: true,
-              searchPlaceholder: "保管人",
-              searchTip: "保管人",
               searchSpan: 4,
-              formslot: true,
+              // formslot: true,
               rules: [{
                 required: true,
                 message: "請輸入接收人姓名",
@@ -391,6 +470,21 @@
                 trigger: "blur"
               }]
             },
+            {
+              label: "進度",
+              prop: "process",
+              display: false,
+            },
+            {
+              label: "確認時間",
+              prop: "sureTime",
+              hide: true,
+              addDisplay: false,
+              editDisplay: false,
+              type: "datetime",
+              format: "yyyy-MM-dd HH:mm:ss",
+              valueFormat: "yyyy-MM-dd HH:mm:ss",
+            },
           ]
         },
         data: []
@@ -420,6 +514,17 @@
         const column = this.findObject(this.option.column, "orgNos");
         let treeData = getTree(res.data.data, this.userInfo.dept_id);
         column.dicData = treeData;
+        // this.findObject(this.option.column, "orgNo").dicData = treeData;
+      });
+      getChildsDept().then(res => {
+        let dicData = [];
+        let data = res.data.data;
+        data.forEach(item => {
+          if (item.orgNo.indexOf("999") == -1){
+            dicData.push(item)
+          }
+        })
+        this.findObject(this.option.column, "orgNo").dicData = dicData;
       });
       getStandardByCode("sealhandover").then(res => {
         const data = res.data.data;
@@ -429,12 +534,20 @@
           this.option.column.splice(0,1)
         }
       });
+      getCurrentUserKeepList().then(res => {
+        this.userKeepList = res.data.data;
+      });
+      getCurrentDept().then(res => {
+        const data = res.data.data;
+        this.currentDept = data;
+      })
     },
     methods: {
       turnInChange(value){
         // this.findObject(this.option.column, "receiverNo").rules[0].required = !value;
         // this.findObject(this.option.column, "receiverName").rules[0].required = !value;
-        this.receiverDisabled = !!value;
+        this.hasOrgNo = value == true ? "51007" : null;
+        this.form.receiverNo = null,this.form.receiverName = null;
       },
       handleDownload(){
         if (this.selectionList.length === 0) {
@@ -446,7 +559,9 @@
           })
             .then(() => {
               getDownloadList(this.query).then(res => {
-                this.downLoadData(res.data.data, true)
+                let data = res.data.data;
+                data.forEach(item => {item.isTurnIn = item.isTurnIn == 1 ? true : false;item.sealTypeSearch = item.sealType;})
+                this.downLoadData(data, true)
               });
             })
         }else{
@@ -472,15 +587,21 @@
         });
       },
       handoverSelectCallback(value){
+        this.form.handoverPersonId = value.id;
         this.form.handoverPersonNo = value.ehr;
         this.form.handoverPersonName = value.name;
       },
       selectCallback(value){
+        this.form.receiverId = value.id;
         this.form.receiverNo = value.ehr;
         this.form.receiverName = value.name;
       },
       rowSave(row, done, loading) {
         row.isTurnIn = !row.isTurnIn ? 0 : 1;
+        if (row.sealType.indexOf('-') != -1){
+          let sealObj = row.sealType.split('-');
+          row.sealType = sealObj[0];
+        }
         add(row).then(() => {
           this.onLoad(this.page);
           this.$message({
@@ -495,6 +616,10 @@
       },
       rowUpdate(row, index, done, loading) {
         row.isTurnIn = !row.isTurnIn ? 0 : 1;
+        if (row.sealType.indexOf('-') != -1){
+          let sealObj = row.sealType.split('-');
+          row.sealType = sealObj[0];
+        }
         update(row).then(() => {
           this.onLoad(this.page);
           this.$message({
@@ -549,30 +674,60 @@
       beforeOpen(done, type) {
         this.type = type;
         if (type === 'add'){
-          let userInfo = localStorage.getItem("saber-userInfo");
+          //恢复必填
+          this.findObject(this.option.column, "receiverNo").rules[0].required = true;
+          this.findObject(this.option.column, "receiverName").rules[0].required = true;
+          this.receiverDisabled = false;
+
+          this.form.handoverPersonId = this.userInfo.user_id;
+          this.form.handoverPersonNo = this.userInfo.user_ehr;
+          this.form.handoverPersonName = this.userInfo.user_name;
           this.form.number = 1;
           this.form.handoverDate = dateFormat(new Date(), "yyyy-MM-dd hh:mm");
-          getCurrentDept().then(res => {
-            const data =  res.data.data;
-            this.form.bankNo = data.bankNo;
+
+          const data =  this.currentDept;
+          this.form.bankNo = data.bankNo;
+          if (data.deptCategory == 1){
+            this.isManageUser = true;
+            this.findObject(this.option.column, 'orgNo').disabled = false;
+            this.findObject(this.option.column, 'sealType').disabled = false;
+            this.findObject(this.option.column, 'sealNo').disabled = false;
+          }else{
+            this.isManageUser = false;
+            this.findObject(this.option.column, 'orgNo').disabled = true;
+            this.findObject(this.option.column, 'sealType').disabled = false;
+            this.findObject(this.option.column, 'sealNo').disabled = true;
             this.form.orgNo = data.orgNo;
             this.form.orgName = data.deptName;
-          });
+
+            getCurrentUserKeepList().then(res => {
+              this.userKeepList = res.data.data;
+              // 支行用户自行添加交接,需要获取当前用户持有的列表作为下拉内容
+              this.findObject(this.option.column, 'sealType').dicData = this.userKeepList;
+              done();
+            });
+          }
         }
-        //恢复必填
-        this.findObject(this.option.column, "receiverNo").rules[0].required = true;
-        this.findObject(this.option.column, "receiverName").rules[0].required = true;
-        this.receiverDisabled = false;
         if (this.form.isTurnIn){
           this.turnInChange(true)
         }
-
-        /*if (["edit", "view"].includes(type)) {
-          getDetail(this.form.id).then(res => {
-            this.form = res.data.data;
+        if (type == 'edit' && this.form.sealType.indexOf('-') == -1){
+          this.form.sealType = this.form.sealType + '-' + this.form.sealNo;
+        }
+        this.turnInDisabled = type == 'edit'
+        if (type == 'edit'){
+          this.findObject(this.option.column, 'sealType').disabled = true;
+          this.findObject(this.option.column, 'sealNo').disabled = true;
+          getCurrentUserKeepList().then(res => {
+            this.userKeepList = res.data.data;
+            // 支行用户自行添加交接,需要获取当前用户持有的列表作为下拉内容
+            this.findObject(this.option.column, 'sealType').dicData = this.userKeepList;
+            done();
           });
-        }*/
-        done();
+
+        }
+
+        // done();
       },
       searchReset() {
         this.query = {};
@@ -627,12 +782,14 @@
       onLoad(page, params = {}) {
         this.loading = true;
         params.status = 1;
-        params.createUser = this.userInfo.user_id;
+        params.process = 2;
+        params.receiverId = this.userInfo.user_id;
         getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
           const data = res.data.data;
           this.page.total = data.total;
           data.records.forEach(item => {
             item.isTurnIn = item.isTurnIn == 1;
+            item.sealTypeSearch = item.sealType;
           })
           this.data = data.records;
           this.loading = false;

+ 6 - 2
src/components/tobeconfirm/tobeconfirm-keypwd.vue

@@ -143,7 +143,7 @@
           currentPage: 1,
           total: 0
         },
-        disabeldReceiver: false,
+        disabeldReceiver: true,
         disabeldHandover: true,
         selectionList: [],
         selectReceiver: '',
@@ -549,6 +549,9 @@
       turnInChange(value){
         this.findObject(this.option.column, "receiverNo").rules[0].required = !value;
         this.findObject(this.option.column, "receiverName").rules[0].required = !value;
+        // this.findObject(this.option.column, "receiverNo").disabled = !value;
+        this.disabeldReceiver = !value;
+
         this.form.receiverNo = null,this.form.receiverName = null;
       },
       handleDownload(){
@@ -590,7 +593,6 @@
       },
       initTypeDict(){
         getKeyType().then(res => {
-
           let data = res.data.data;
           let pid = new Set();
           for (let i = 0; i < data.length; i++) {
@@ -733,6 +735,7 @@
                 if (!data){
                   // this.$message.warning("當前用戶暫時並無持有相關鑰匙/密碼/實物!");
                 }else{
+                  data += ",";
                   let dicDataNew = [];
                   dicDataOld.forEach(item => {
                     item.disabled = true;
@@ -764,6 +767,7 @@
         if (["edit", "view"].includes(type)) {
           getDetail(this.form.id).then(res => {
             this.form = res.data.data;
+            this.form.categoryShow = this.form.category;
             done();
           });
         }

+ 24 - 20
src/components/tobeconfirm/tobeconfirm-sealhandover.vue

@@ -674,6 +674,11 @@
       beforeOpen(done, type) {
         this.type = type;
         if (type === 'add'){
+          //恢复必填
+          this.findObject(this.option.column, "receiverNo").rules[0].required = true;
+          this.findObject(this.option.column, "receiverName").rules[0].required = true;
+          this.receiverDisabled = false;
+
           this.form.handoverPersonId = this.userInfo.user_id;
           this.form.handoverPersonNo = this.userInfo.user_ehr;
           this.form.handoverPersonName = this.userInfo.user_name;
@@ -695,21 +700,13 @@
             this.form.orgNo = data.orgNo;
             this.form.orgName = data.deptName;
 
-            // 支行用户自行添加交接,需要获取当前用户持有的列表作为下拉内容
-            this.findObject(this.option.column, 'sealType').dicData = this.userKeepList;
+            getCurrentUserKeepList().then(res => {
+              this.userKeepList = res.data.data;
+              // 支行用户自行添加交接,需要获取当前用户持有的列表作为下拉内容
+              this.findObject(this.option.column, 'sealType').dicData = this.userKeepList;
+              done();
+            });
           }
-
-
-          //恢复必填
-          this.findObject(this.option.column, "receiverNo").rules[0].required = true;
-          this.findObject(this.option.column, "receiverName").rules[0].required = true;
-          this.receiverDisabled = false;
-        }
-        if (type == 'edit'){
-          this.findObject(this.option.column, 'sealType').disabled = true;
-          this.findObject(this.option.column, 'sealNo').disabled = true;
-          // 支行用户自行添加交接,需要获取当前用户持有的列表作为下拉内容
-          this.findObject(this.option.column, 'sealType').dicData = this.userKeepList;
         }
         if (this.form.isTurnIn){
           this.turnInChange(true)
@@ -717,13 +714,20 @@
         if (type == 'edit' && this.form.sealType.indexOf('-') == -1){
           this.form.sealType = this.form.sealType + '-' + this.form.sealNo;
         }
-        /*if (["edit", "view"].includes(type)) {
-          getDetail(this.form.id).then(res => {
-            this.form = res.data.data;
-          });
-        }*/
         this.turnInDisabled = type == 'edit'
-        done();
+        if (type == 'edit'){
+          this.findObject(this.option.column, 'sealType').disabled = true;
+          this.findObject(this.option.column, 'sealNo').disabled = true;
+          getCurrentUserKeepList().then(res => {
+            this.userKeepList = res.data.data;
+            // 支行用户自行添加交接,需要获取当前用户持有的列表作为下拉内容
+            this.findObject(this.option.column, 'sealType').dicData = this.userKeepList;
+            done();
+          });
+
+        }
+
+        // done();
       },
       searchReset() {
         this.query = {};

+ 14 - 2
src/util/util.js

@@ -351,7 +351,19 @@ export const downloadFileBase64 = (path, name) => {
   xhr.send();
   xhr.onload = function () {
     if (this.status === 200 || this.status === 304) {
-      const fileReader = new FileReader();
+
+      let blob = this.response; //使用response作为返回,而非responseText
+      const objectURL = URL.createObjectURL(new Blob([blob], { type: 'text/xls' })) // chrome不受文件你大小限制导出文件
+      // let reader = new FileReader();
+      // reader.readAsDataURL(blob); // 转换为base64,可以直接放入a标签href
+      // objectURL.onload = function(e) {
+      // 转换完成,创建一个a标签用于下载
+      let a = document.createElement("a");
+      a.download = name;
+      a.href = objectURL
+      a.click();
+
+      /*const fileReader = new FileReader();
       fileReader.readAsDataURL(this.response);
       fileReader.onload = function () {
         const a = document.createElement('a');
@@ -361,7 +373,7 @@ export const downloadFileBase64 = (path, name) => {
         document.body.appendChild(a);
         a.click();
         document.body.removeChild(a);
-      };
+      };*/
     }
   };
 }

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

@@ -548,6 +548,9 @@
       turnInChange(value){
         this.findObject(this.option.column, "receiverNo").rules[0].required = !value;
         this.findObject(this.option.column, "receiverName").rules[0].required = !value;
+        // this.findObject(this.option.column, "receiverNo").disabled = !value;
+        this.disabeldReceiver = !value;
+
         this.form.receiverNo = null,this.form.receiverName = null;
       },
       handleDownload(){
@@ -731,13 +734,14 @@
                 if (!data){
                   // this.$message.warning("當前用戶暫時並無持有相關鑰匙/密碼/實物!");
                 }else{
+                  data += ",";
                   let dicDataNew = [];
                   dicDataOld.forEach(item => {
                     item.disabled = true;
                     if (item.hasChildren){
                       item.children.forEach(child => {
                         child.disabled = child.isSealed == 1;
-                        if (data.indexOf(child.dictKey) != -1 && data.indexOf(child.dictKey + "**") != -1){
+                        if (data.indexOf(child.dictKey + ',') != -1){
                           dicDataNew.push(child)
                         }
                       })
@@ -762,6 +766,7 @@
         if (["edit", "view"].includes(type)) {
           getDetail(this.form.id).then(res => {
             this.form = res.data.data;
+            this.form.categoryShow = this.form.category;
             done();
           });
         }

+ 19 - 4
src/views/bank/postchange.vue

@@ -310,6 +310,13 @@
         </div>
       </template>
 
+      <template slot="titleForm" slot-scope="{row, index}">
+        <div v-html="title" style="white-space: pre-line;color: red;font-weight: bold;"></div>
+      </template>
+      <template slot="titleLabel" slot-scope="{row, index}">
+        <span style="color: red;font-weight: bold;">注意事項:</span>
+      </template>
+
     </avue-crud>
 
     <el-dialog :append-to-body="true" :modal-append-to-body="false" :visible.sync="settingVisible" title="設置審批人">
@@ -389,6 +396,14 @@
           selection: true,
           dialogClickModal: false,
           column: [
+            {
+              label: '注意事項',
+              prop: 'title',
+              hide: true,
+              formslot: true,
+              type: 'text',
+              span: 24
+            },
             {
               label: "銀行號",
               prop: "bankNo",
@@ -948,10 +963,10 @@
       });
       getStandardByCode("postchange").then(res => {
         const data = res.data.data;
-        if (data){
-          this.option.addTitle = data.content;
-          this.option.editTitle = data.content;
-          this.option.viewTitle = data.content;
+        if (Object.keys(data).length > 0){
+          this.title = data.content;
+        }else {
+          this.option.column.splice(0,1)
         }
       });
     },

+ 27 - 19
src/views/bank/sealhandover.vue

@@ -672,7 +672,13 @@
       },
       beforeOpen(done, type) {
         this.type = type;
+        debugger
         if (type === 'add'){
+          //恢复必填
+          this.findObject(this.option.column, "receiverNo").rules[0].required = true;
+          this.findObject(this.option.column, "receiverName").rules[0].required = true;
+          this.receiverDisabled = false;
+
           this.form.handoverPersonId = this.userInfo.user_id;
           this.form.handoverPersonNo = this.userInfo.user_ehr;
           this.form.handoverPersonName = this.userInfo.user_name;
@@ -686,6 +692,7 @@
             this.findObject(this.option.column, 'orgNo').disabled = false;
             this.findObject(this.option.column, 'sealType').disabled = false;
             this.findObject(this.option.column, 'sealNo').disabled = false;
+            done();
           }else{
             this.isManageUser = false;
             this.findObject(this.option.column, 'orgNo').disabled = true;
@@ -694,20 +701,13 @@
             this.form.orgNo = data.orgNo;
             this.form.orgName = data.deptName;
 
-            // 支行用户自行添加交接,需要获取当前用户持有的列表作为下拉内容
-            this.findObject(this.option.column, 'sealType').dicData = this.userKeepList;
+            getCurrentUserKeepList().then(res => {
+              this.userKeepList = res.data.data;
+              // 支行用户自行添加交接,需要获取当前用户持有的列表作为下拉内容
+              this.findObject(this.option.column, 'sealType').dicData = this.userKeepList;
+              done();
+            });
           }
-
-          //恢复必填
-          this.findObject(this.option.column, "receiverNo").rules[0].required = true;
-          this.findObject(this.option.column, "receiverName").rules[0].required = true;
-          this.receiverDisabled = false;
-        }
-        if (type == 'edit'){
-          this.findObject(this.option.column, 'sealType').disabled = true;
-          this.findObject(this.option.column, 'sealNo').disabled = true;
-          // 支行用户自行添加交接,需要获取当前用户持有的列表作为下拉内容
-          this.findObject(this.option.column, 'sealType').dicData = this.userKeepList;
         }
         if (this.form.isTurnIn){
           this.turnInChange(true)
@@ -715,13 +715,21 @@
         if (type == 'edit' && this.form.sealType.indexOf('-') == -1){
           this.form.sealType = this.form.sealType + '-' + this.form.sealNo;
         }
-        /*if (["edit", "view"].includes(type)) {
-          getDetail(this.form.id).then(res => {
-            this.form = res.data.data;
-          });
-        }*/
         this.turnInDisabled = type == 'edit'
-        done();
+        if (type == 'edit'){
+          this.findObject(this.option.column, 'sealType').disabled = true;
+          this.findObject(this.option.column, 'sealNo').disabled = true;
+          getCurrentUserKeepList().then(res => {
+            this.userKeepList = res.data.data;
+            // 支行用户自行添加交接,需要获取当前用户持有的列表作为下拉内容
+            this.findObject(this.option.column, 'sealType').dicData = this.userKeepList;
+            done();
+          });
+        }
+        if (type == 'view'){
+          done();
+        }
+        // done();
       },
       searchReset() {
         this.query = {};