fangq 4 năm trước cách đây
mục cha
commit
393c954e12

+ 2 - 0
src/components/common/returns-comfire.vue

@@ -82,6 +82,7 @@
               label: "機構號",
               prop: "orgNo",
               hide: true,
+              display: false,
               rules: [{
                 required: true,
                 message: "請輸入機構號",
@@ -92,6 +93,7 @@
               label: "機構名稱",
               prop: "orgName",
               disabled: true,
+              display: false,
               rules: [{
                 required: true,
                 message: "請輸入機構號",

+ 831 - 0
src/components/confirmed/confirmed-keypwd.vue

@@ -0,0 +1,831 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               :search.sync="search"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   :disabled="delBatchBtn"
+                   plain
+                   v-if="permission.keypwd_delete"
+                   @click="handleDelete">刪 除
+        </el-button>
+        <el-button type="success"
+                   size="small"
+                   icon="el-icon-search"
+                   plain
+                   v-if="permission.keypwd_keep_view"
+                   @click="keepVisible = true">保管人查詢
+        </el-button>
+        <el-button type="primary"
+                   size="small"
+                   icon="el-icon-download"
+                   plain
+                   v-if="permission.keypwd_download"
+                   @click="handleDownload">下載
+        </el-button>
+      </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 && 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 :id="form.receiverId" :name="form.receiverName" :ehr="form.receiverNo" :disabled="disabeldReceiver" :callback="selectCallback"></select-dialog-user>
+      </template>
+      <template slot="handoverPersonNameForm">
+        <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>
+      </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}">
+        <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" :destroy-on-close="true" :fullscreen="true" :visible.sync="keepVisible" title="保管人查詢">
+      <keypwd-keep></keypwd-keep>
+    </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, getCurrentUserKeepCategory} from "@/api/bank/keypwd";
+  import {mapGetters} from "vuex";
+  import {dateFormat} from "@/util/date";
+  import SelectDialogUser from "@/components/select-dialog/select-dialog-user";
+  import { getCurrentDept } from "@/api/system/dept";
+  import {getDeptTree, getTree} from "@/api/system/dept";
+  import KeypwdKeep from "@/views/bank/keypwd-keep";
+  import {getStandardByCode} from "@/api/bank/handoverstandard";
+  import KeypwdSure from "@/components/common/keypwd-sure";
+
+  export default {
+    name: "confirmed-keypwd",
+    components: {KeypwdSure, KeypwdKeep, SelectDialogUser},
+    data() {
+      return {
+        isManageUser: false,
+        userKeepList: [],
+        currentDept: [],
+
+        title: "",
+        search: {},
+        typeList: [],
+        props:{
+          label: "dictValue",
+          value: "dictKey",
+        },
+
+        approveForm: {},
+        approveVisible: false,
+
+        delBatchBtn: true,
+        keepVisible: false,
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        disabeldReceiver: false,
+        disabeldHandover: true,
+        selectionList: [],
+        selectReceiver: '',
+        selectHandover: '',
+        type: '',
+        option: {
+          addTitle: '新增【網點鎖匙/密碼/實物交接登記表】',
+          editTitle: '編輯【網點鎖匙/密碼/實物交接登記表】',
+          viewTitle: '查看【網點鎖匙/密碼/實物交接登記表】',
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          editBtn: false,
+          delBtn: false,
+          selection: true,
+
+          dialogClickModal: false,
+          column: [
+            {
+              label: '注意事項',
+              prop: 'title',
+              formslot: true,
+              hide: true,
+              type: 'text',
+              span: 24
+            },
+            {
+              label: "銀行號",
+              prop: "bankNo",
+              span: 24,
+              hide: true,
+              disabled: true,
+              search: true,
+              searchSpan: 4,
+              rules: [{
+                required: true,
+                message: "請輸入銀行號",
+                trigger: "blur"
+              }]
+            },
+            {
+              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: "請輸入機構號",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "機構名稱",
+              prop: "orgName",
+              disabled: true,
+              rules: [{
+                required: true,
+                message: "請輸入機構號",
+                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 || 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');
+                  let $handoverName = this.findObject(this.option.column, 'handoverPersonName');
+                  if (Object.keys(data).length == 0){
+                    // $handoverNo.disabled = false;
+                    this.form.handoverPersonNo = '';
+                    this.form.handoverPersonName = '';
+                  } else {
+                    $handoverNo.disabled = true;
+                    this.form.handoverPersonNo = data.receiverNo;
+                    this.form.handoverPersonName = data.receiverName;
+                  }
+                });*/
+              },
+              rules: [{
+                required: true,
+                message: "請輸入分類",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "區域/支行",
+              prop: "orgNos",
+              hide: true,
+              display: false,
+              searchMultiple: true,
+              search: true,
+              type: "tree",
+              dicData: [],
+              props: {
+                label: "title",
+                value: "key"
+              },
+              checkStrictly: true,
+              rules: [{
+                required: true,
+                message: "請輸入機構號",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "交接日期",
+              prop: "handoverDateRange",
+              type: "datetime",
+              format: "yyyy-MM-dd HH:mm",
+              valueFormat: "yyyy-MM-dd HH:mm",
+              // searchValue: [_today + ' 00:00', _today + ' 23:59'],
+              // searchTime: ['00:00', '23:59'],
+              searchRange:true,
+              hide: true,
+              addDisplay: false,
+              editDisplay: false,
+              viewDisplay: false,
+              search: true,
+              rules: [{
+                required: true,
+                message: "請輸入交接日期",
+                trigger: "blur"
+              }]
+            },
+            /*{
+              label: "種類",
+              prop: "type",
+              type: "select",
+              dicUrl: "/api/blade-system/dict/dictionary?code={{key}}",
+              props:{
+                label: "dictValue",
+                value: "dictKey",
+              },
+              change: ({value, column}) => {
+                if (!value || this.type == 'view' || this.type == 'edit') return;
+                getByCategoryAndType(this.form.category, value, this.form.orgNo).then(res => {
+                  const data = res.data.data;
+                  let $handoverNo = this.findObject(this.option.column, 'handoverPersonNo');
+                  let $handoverName = this.findObject(this.option.column, 'handoverPersonName');
+                  if (Object.keys(data).length == 0){
+                    // $handoverNo.disabled = false;
+                    this.form.handoverPersonNo = '';
+                    this.form.handoverPersonName = '';
+                  } else {
+                    $handoverNo.disabled = true;
+                    this.form.handoverPersonNo = data.receiverNo;
+                    this.form.handoverPersonName = data.receiverName;
+                  }
+                });
+              },
+              rules: [{
+                required: true,
+                message: "請輸入種類",
+                trigger: "blur"
+              }]
+            },*/
+            {
+              label: "數量",
+              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",
+              formslot:  true,
+              rules: [{
+                required: false,
+                message: "請輸入交出人姓名",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "交出人員工號",
+              prop: "handoverPersonNo",
+              disabled: true,
+              rules: [{
+                required: false,
+                message: "請輸入交出人員工號",
+                trigger: "blur"
+              }]
+            },
+
+            {
+              label: "接收人",
+              prop: "receiverName",
+              disabled: true,
+              search: true,
+              searchSpan: 4,
+              // formslot:  true,
+              disabled:  true,
+              rules: [{
+                required: true,
+                message: "請輸入接收人員工號",
+                trigger: "focus"
+              }]
+            },
+            {
+              label: "接收人員工號",
+              prop: "receiverNo",
+              disabled: true,
+              rules: [{
+                required: true,
+                message: "請輸入接收人員工號",
+                trigger: "change"
+              }]
+            },
+            {
+              label: "交接日期",
+              prop: "handoverDate",
+              type: "datetime",
+              format: "yyyy-MM-dd HH:mm",
+              valueFormat: "yyyy-MM-dd HH:mm",
+              change: ({value, culumn}) => {
+                if (!value) return;
+              },
+              rules: [{
+                required: true,
+                message: "請輸入交接日期",
+                trigger: "blur"
+              }]
+            },
+            /* {
+               label: "接收人姓名",
+               prop: "receiverName",
+               rules: [{
+                 required: true,
+                 message: "請輸入接收人姓名",
+                 trigger: "change  "
+               }]
+             },*/
+            {
+              label: "備註",
+              prop: "remark",
+              rules: [{
+                required: false,
+                message: "請輸入備註",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "填報時間",
+              prop: "fillingDate",
+              addDisplay: false,
+              editDisplay: false,
+              rules: [{
+                required: true,
+                message: "請輸入填報時間",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "填報人",
+              prop: "fillingPerson",
+              addDisplay: false,
+              editDisplay: false,
+              rules: [{
+                required: true,
+                message: "請輸入填報人",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "進度",
+              prop: "process",
+              display: false,
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      ...mapGetters(["userInfo"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.keypwd_add, false),
+          viewBtn: this.vaildData(this.permission.keypwd_view, false),
+          delBtn: this.vaildData(this.permission.keypwd_delete, false),
+          editBtn: this.vaildData(this.permission.keypwd_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    created() {
+      this.initTypeDict();
+      getDeptTree().then(res => {
+        const column = this.findObject(this.option.column, "orgNos");
+        let treeData = getTree(res.data.data, this.userInfo.dept_id);
+        column.dicData = treeData;
+      });
+      getStandardByCode("keypwd").then(res => {
+        const data = res.data.data;
+        if (Object.keys(data).length > 0){
+          this.title = data.content;
+        }else {
+          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;
+      });
+      getCurrentDept().then(res => {
+        const data =  res.data.data;
+        this.currentDept = data;
+        this.isManageUser = data.deptCategory == 1;
+        if (data.deptCategory != 1){
+          //非管理部门
+          let $category = this.findObject(this.option.column, 'category');
+          let dicDataOld = $category.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;
+            }
+          });
+        }else{
+          this.findObject(this.option.column, 'orgNo').disabled = false;
+          this.findObject(this.option.column, 'orgName').disabled = false;
+        }
+
+      });
+    },
+    methods: {
+      turnInChange(value){
+        this.findObject(this.option.column, "receiverNo").rules[0].required = !value;
+        this.findObject(this.option.column, "receiverName").rules[0].required = !value;
+        this.form.receiverNo = null,this.form.receiverName = null;
+      },
+      handleDownload(){
+        if (this.selectionList.length === 0) {
+          let tip = "確定下載篩選的" + this.page.total + "條數據嗎?"
+          this.$confirm(tip, {
+            confirmButtonText: "確定",
+            cancelButtonText: "取消",
+            type: "warning"
+          })
+            .then(() => {
+              getDownloadList(this.query).then(res => {
+                let data = res.data.data;
+                data.forEach(item => {item.isTurnIn = item.isTurnIn == 1 ? true : false})
+                this.downLoadData(data, true)
+              });
+            })
+        }else{
+          this.downLoadData(this.selectionList, false)
+        }
+      },
+      downLoadData(data, isAll){
+        let columns = this.deepClone(this.option.column);
+        for (let i = 0; i < columns.length; i++) {
+          let item = columns[i];
+          if (item.hide || item.prop == 'process'){
+            columns.splice(i, 1);
+            i--;
+          }
+          if (!isAll && (item.type == 'select' || item.type == 'tree')){
+            item.prop = '$' + item.prop;
+          }
+        }
+        this.$Export.excel({
+          title: "網點鎖匙密碼實物交接登記表" || new Date().getTime(),
+          columns: columns,
+          data: data
+        });
+      },
+      initTypeDict(){
+        getKeyType().then(res => {
+
+          let data = res.data.data;
+          let pid = new Set();
+          for (let i = 0; i < data.length; i++) {
+            let item = data[i];
+            pid.add(item.parentId);
+          }
+          let arr = [];
+          pid.forEach(id => {
+            data.forEach(item => {
+              if (id == item.id){
+                arr.push(item)
+              }
+            })
+          })
+          arr.forEach(item => {
+            data.forEach(it => {
+              if (item.id == it.parentId){
+                if (!item.children){
+                  item.children = [];
+                }
+                it.dictValue = item.dictValue + '-' + it.dictValue;
+                item.children.push(it)
+                item.hasChildren = true;
+              }
+            })
+          })
+          this.typeList = arr;
+          let formDicData = this.deepClone(arr);
+          formDicData.forEach(item => {
+            item.disabled = true;
+            if (item.hasChildren){
+              item.children.forEach(child => {
+                child.disabled = child.isSealed == 1;
+              })
+            }
+          });
+          debugger
+          this.findObject(this.option.column, 'category').dicData = formDicData;
+          this.findObject(this.option.column, 'categoryShow').dicData = formDicData;
+          return arr;
+        })
+      },
+      handoverSelectCallback(value){
+        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;
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        row.isTurnIn = !row.isTurnIn ? 0 : 1;
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("確定將選擇數據刪除?", {
+          confirmButtonText: "確定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("請選擇至少一條數據");
+          return;
+        }
+        this.$confirm("確定將選擇數據刪除?", {
+          confirmButtonText: "確定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        this.type = type;
+        if (type === 'add'){
+          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;
+            }else{
+              this.findObject(this.option.column, 'orgNo').disabled = false;
+              this.findObject(this.option.column, 'orgName').disabled = false;
+            }
+
+        }
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        if (params.category){
+          params.category = params.category.join();
+        }
+        if (params.orgNos){
+          params.orgNostr = params.orgNos.join();
+          params.orgNos = '';
+        }
+        if (params.handoverDateRange){
+          params.handoverDate_begin = params.handoverDateRange[0], params.handoverDate_end = params.handoverDateRange[1];
+          params.handoverDateRange = null;
+        }
+
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+        if (list && list.length > 0){
+          let delFlag = true;
+          // permission.keypwd_delete && userInfo.user_id == row.createUser
+          for (let i = 0; i < list.length; i++) {
+            let item = list[i];
+            delFlag = delFlag && item.createUser == this.userInfo.user_id;
+          }
+          this.delBatchBtn = !delFlag;
+        }else{
+          this.delBatchBtn = true;
+        }
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        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();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 792 - 0
src/components/confirmed/confirmed-sealhandover.vue

@@ -0,0 +1,792 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               :search.sync="search"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   :disabled="delBatchBtn"
+                   v-if="permission.sealhandover_delete"
+                   @click="handleDelete">刪 除
+        </el-button>
+        <el-button type="success"
+                   size="small"
+                   icon="el-icon-search"
+                   plain
+                   v-if="permission.sealhandover_keep_view"
+                   @click="keepVisible = true">保管人查詢
+        </el-button>
+        <el-button type="primary"
+                   size="small"
+                   icon="el-icon-download"
+                   plain
+                   v-if="permission.sealhandover_download"
+                   @click="handleDownload">下載
+        </el-button>
+      </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 && 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">
+        <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>-->
+        <el-input placeholder="請輸入印章編號" v-model="search.sealNo"></el-input>
+      </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>
+
+      <template slot="isTurnIn" slot-scope="{row, index}">
+        <!--        <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="isTurnInForm" slot-scope="{row, index}">
+        <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>
+
+    </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>
+    </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, 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, getChildsDept} from "@/api/system/dept";
+  import {getStandardByCode} from "@/api/bank/handoverstandard";
+  import SealhandoverSure from "@/components/common/sealhandover-sure";
+  import SealhandoverKeep from "@/views/bank/sealhandover-keep";
+
+  export default {
+    name: "confirmed-sealhandover",
+    components: {SealhandoverKeep, SealhandoverSure,  SelectDialogUser},
+    data() {
+      return {
+        isManageUser: false,
+        userKeepList: [],
+        currentDept: [],
+
+        title: "",
+        search: {},
+        receiverDisabled: false,
+        keepVisible: false,
+        delBatchBtn: true,
+
+        approveForm: {},
+        approveVisible: false,
+
+        type: '',
+        hasOrgNo: null,
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          addTitle: '新增【業務印章交接登記表】',
+          editTitle: '編輯【業務印章交接登記表】',
+          viewTitle: '查看【業務印章交接登記表】',
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          editBtn: false,
+          delBtn: false,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: '注意事項',
+              prop: 'title',
+              hide: true,
+              formslot: true,
+              type: 'text',
+              span: 24
+            },
+            {
+              label: "銀行號",
+              prop: "bankNo",
+              span: 24,
+              hide: true,
+              disabled: true,
+              span: 24,
+              search: true,
+              searchSpan: 4,
+              rules: [{
+                required: true,
+                message: "請輸入銀行號",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "機構號",
+              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: "請輸入機構號",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "機構名稱",
+              prop: "orgName",
+              disabled: true,
+              rules: [{
+                required: true,
+                message: "請輸入機構號",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "印章類型",
+              prop: "sealTypeSearch",
+              type: "select",
+              dicUrl: "/api/blade-system/dict/dictionary?code=seal_type",
+              props:{
+                label: "dictValue",
+                value: "dictKey",
+              },
+              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,
+              addDisplay: false,
+              editDisplay: false,
+              viewDisplay: true,
+              searchMultiple: true,
+            },
+            {
+              label: "印章類型",
+              prop: "sealType",
+              type: "select",
+              hide: true,
+              addDisplay: true,
+              editDisplay: true,
+              viewDisplay: false,
+              props:{
+                label: "dictValue",
+                value: "dictKey",
+              },
+              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,
+                message: "請輸入印章類型",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "印章編號",
+              prop: "sealNo",
+              search: true,
+              searchSpan: 4,
+              searchslot: true,
+              change: ({value, column}) => {
+                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){
+                    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;
+                    }
+                  }
+                });
+              },
+              rules: [{
+                required: true,
+                message: "請輸入印章編號",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "區域/支行",
+              prop: "orgNos",
+              hide: true,
+              display: false,
+              searchMultiple: true,
+              search: true,
+              type: "tree",
+              dicData: [],
+              props: {
+                label: "title",
+                value: "key"
+              },
+              checkStrictly: true,
+              rules: [{
+                required: true,
+                message: "請輸入機構號",
+                trigger: "blur"
+              }]
+            },
+
+            {
+              label: "交出人",
+              prop: "handoverPersonName",
+              // formslot: true,
+              disabled: true,
+              rules: [{
+                required: false,
+                message: "請輸入交出人姓名",
+                trigger: "change"
+              }]
+            },
+            {
+              label: "交出人員工號",
+              prop: "handoverPersonNo",
+              disabled: true,
+              rules: [{
+                required: false,
+                message: "請輸入交出人員工號",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "交接日期",
+              prop: "handoverDate",
+              type: "datetime",
+              format: "yyyy-MM-dd HH:mm",
+              valueFormat: "yyyy-MM-dd HH:mm",
+              rules: [{
+                required: true,
+                message: "請輸入交接日期",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "是否上繳",
+              prop: "isTurnIn",
+              formslot: true,
+              rules: [{
+                required: false,
+                message: "請勾選是否上繳",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "接收人",
+              prop: "receiverName",
+              disabled: true,
+              search: true,
+              searchSpan: 4,
+              // formslot: true,
+              rules: [{
+                required: true,
+                message: "請輸入接收人姓名",
+                trigger: "change"
+              }]
+            },
+            {
+              label: "交接日期",
+              prop: "handoverDateRange",
+              type: "datetime",
+              format: "yyyy-MM-dd HH:mm",
+              valueFormat: "yyyy-MM-dd HH:mm",
+              searchRange:true,
+              hide: true,
+              addDisplay: false,
+              editDisplay: false,
+              viewDisplay: false,
+              search: true,
+              rules: [{
+                required: true,
+                message: "請輸入交接日期",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "接收人員工號",
+              prop: "receiverNo",
+              disabled: true,
+              rules: [{
+                required: true,
+                message: "請輸入接收人員工號",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "備註",
+              prop: "remark",
+              rules: [{
+                required: false,
+                message: "請輸入備註",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "填報時間",
+              prop: "fillingDate",
+              addDisplay: false,
+              editDisplay: false,
+              rules: [{
+                required: true,
+                message: "請輸入填報時間",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "填報人",
+              prop: "fillingPerson",
+              addDisplay: false,
+              editDisplay: false,
+              rules: [{
+                required: true,
+                message: "請輸入填報人",
+                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: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      ...mapGetters(["userInfo"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.sealhandover_add, false),
+          viewBtn: this.vaildData(this.permission.sealhandover_view, false),
+          delBtn: this.vaildData(this.permission.sealhandover_delete, false),
+          editBtn: this.vaildData(this.permission.sealhandover_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    created() {
+      getDeptTree().then(res => {
+        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;
+        if (Object.keys(data).length > 0){
+          this.title = data.content;
+        }else {
+          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.hasOrgNo = value == true ? "51007" : null;
+        this.form.receiverNo = null,this.form.receiverName = null;
+      },
+      handleDownload(){
+        if (this.selectionList.length === 0) {
+          let tip = "確定下載篩選的" + this.page.total + "條數據嗎?"
+          this.$confirm(tip, {
+            confirmButtonText: "確定",
+            cancelButtonText: "取消",
+            type: "warning"
+          })
+            .then(() => {
+              getDownloadList(this.query).then(res => {
+                let data = res.data.data;
+                data.forEach(item => {item.isTurnIn = item.isTurnIn == 1 ? true : false})
+                this.downLoadData(data, true)
+              });
+            })
+        }else{
+          this.downLoadData(this.selectionList, false)
+        }
+      },
+      downLoadData(data, isAll){
+        let columns = this.deepClone(this.option.column);
+        for (let i = 0; i < columns.length; i++) {
+          let item = columns[i];
+          if (item.hide || item.prop == 'process'){
+            columns.splice(i, 1);
+            i--;
+          }
+          if (!isAll && (item.type == 'select' || item.type == 'tree')){
+            item.prop = '$' + item.prop;
+          }
+        }
+        this.$Export.excel({
+          title: "業務印章交接登記表" || new Date().getTime(),
+          columns: columns,
+          data: data
+        });
+      },
+      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({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      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({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("確定將選擇數據刪除?", {
+          confirmButtonText: "確定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("請選擇至少一條數據");
+          return;
+        }
+        this.$confirm("確定將選擇數據刪除?", {
+          confirmButtonText: "確定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        this.type = type;
+        if (type === 'add'){
+          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");
+
+          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;
+
+            // 支行用户自行添加交接,需要获取当前用户持有的列表作为下拉内容
+            this.findObject(this.option.column, 'sealType').dicData = this.userKeepList;
+          }
+
+
+          //恢复必填
+          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)
+        }
+        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;
+          });
+        }*/
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        if (params.sealTypeSearch){
+          params.sealType = params.sealTypeSearch.join();
+          params.sealTypeSearch = [];
+        }
+        if (params.orgNos){
+          params.orgNostr = params.orgNos.join();
+          params.orgNos = '';
+        }
+        if (params.handoverDateRange){
+          params.handoverDate_begin = params.handoverDateRange[0], params.handoverDate_end = params.handoverDateRange[1];
+          params.handoverDateRange = null;
+        }
+
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+        if (list && list.length > 0){
+          let delFlag = true;
+          // permission.keypwd_delete && userInfo.user_id == row.createUser
+          for (let i = 0; i < list.length; i++) {
+            let item = list[i];
+            delFlag = delFlag && item.createUser == this.userInfo.user_id;
+          }
+          this.delBatchBtn = !delFlag;
+        }else{
+          this.delBatchBtn = true;
+        }
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        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;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 91 - 28
src/components/tobeconfirm/tobeconfirm-keypwd.vue

@@ -116,6 +116,10 @@
     components: {KeypwdSure, KeypwdKeep, SelectDialogUser},
     data() {
       return {
+        isManageUser: false,
+        userKeepList: [],
+        currentDept: [],
+
         title: "",
         search: {},
         typeList: [],
@@ -186,8 +190,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: "請輸入機構號",
@@ -204,9 +224,30 @@
                 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",
@@ -481,10 +522,54 @@
           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;
+      });
+      getCurrentDept().then(res => {
+        const data =  res.data.data;
+        this.currentDept = data;
+        this.isManageUser = data.deptCategory == 1;
+        if (data.deptCategory != 1){
+          //非管理部门
+          let $category = this.findObject(this.option.column, 'category');
+          let dicDataOld = $category.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;
+            }
+          });
+        }else{
+          this.findObject(this.option.column, 'orgNo').disabled = false;
+          this.findObject(this.option.column, 'orgName').disabled = false;
+        }
+
+      });
     },
     methods: {
       turnInChange(value){
-        debugger
         this.findObject(this.option.column, "receiverNo").rules[0].required = !value;
         this.findObject(this.option.column, "receiverName").rules[0].required = !value;
         this.form.receiverNo = null,this.form.receiverName = null;
@@ -565,7 +650,9 @@
               })
             }
           });
+          debugger
           this.findObject(this.option.column, 'category').dicData = formDicData;
+          this.findObject(this.option.column, 'categoryShow').dicData = formDicData;
           return arr;
         })
       },
@@ -650,8 +737,8 @@
         if (type === 'add'){
           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;
             if (data.deptCategory != 1){
               //非管理部门
@@ -660,36 +747,11 @@
               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 = $category.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;
-                }
-              });
             }else{
               this.findObject(this.option.column, 'orgNo').disabled = false;
               this.findObject(this.option.column, 'orgName').disabled = false;
             }
 
-          });
         }
         if (["edit", "view"].includes(type)) {
           getDetail(this.form.id).then(res => {
@@ -754,6 +816,7 @@
           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;

+ 33 - 8
src/components/tobeconfirm/tobeconfirm-sealhandover.vue

@@ -123,7 +123,7 @@
     components: {SealhandoverKeep, SealhandoverSure,  SelectDialogUser},
     data() {
       return {
-        isManegeUser: false,
+        isManageUser: false,
         userKeepList: [],
         currentDept: [],
 
@@ -242,14 +242,20 @@
                 return res.data;
               },
               search: true,
-              hide: true,
-              display: false,
+              // hide: true,
+              addDisplay: false,
+              editDisplay: false,
+              viewDisplay: true,
               searchMultiple: true,
             },
             {
               label: "印章類型",
               prop: "sealType",
               type: "select",
+              hide: true,
+              addDisplay: true,
+              editDisplay: true,
+              viewDisplay: false,
               props:{
                 label: "dictValue",
                 value: "dictKey",
@@ -278,7 +284,7 @@
                 }
 
                 //支行用户添加交接
-                if (!this.isManegeUser){
+                if (!this.isManageUser && this.type == 'add'){
                   let sealObj = value.split('-');
                   this.form.sealType = sealObj[0];
                   this.form.sealNo = sealObj[1];
@@ -588,6 +594,10 @@
       },
       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({
@@ -602,6 +612,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({
@@ -664,14 +678,15 @@
 
           const data =  this.currentDept;
           this.form.bankNo = data.bankNo;
-          if (data.orgNo == '51007'){
-            this.isManegeUser = true;
+          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{
-            debugger
-            this.isManegeUser = false;
+            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;
@@ -686,9 +701,18 @@
           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)
         }
+        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;
@@ -753,6 +777,7 @@
           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;

+ 1 - 0
src/views/bank/keypwd-keep.vue

@@ -220,6 +220,7 @@
               prop: "number",
               type: "number",
               disabled: true,
+              hide: true,
               rules: [{
                 required: true,
                 message: "請輸入數量",

+ 42 - 36
src/views/bank/keypwd.vue

@@ -88,7 +88,9 @@
     </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="信息確認"
@@ -531,43 +533,46 @@
         })
         this.findObject(this.option.column, "orgNo").dicData = dicData;
       });
-      getCurrentDept().then(res => {
-        const data =  res.data.data;
-        this.currentDept = data;
-        this.isManageUser = data.deptCategory == 1;
-        if (data.deptCategory != 1){
-          //非管理部门
-          let $category = this.findObject(this.option.column, 'category');
-          let dicDataOld = $category.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;
-            }
-          });
-        }else{
-          this.findObject(this.option.column, 'orgNo').disabled = false;
-          this.findObject(this.option.column, 'orgName').disabled = false;
-        }
 
-      });
+      // this.initCurrentDeptAndKeepCategroy();
     },
     methods: {
+      initCurrentDeptAndKeepCategroy(){
+        getCurrentDept().then(res => {
+          const data =  res.data.data;
+          this.currentDept = data;
+          this.isManageUser = data.deptCategory == 1;
+          if (data.deptCategory != 1){
+            //非管理部门
+            let $category = this.findObject(this.option.column, 'category');
+            let dicDataOld = $category.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;
+              }
+            });
+          }else{
+            this.findObject(this.option.column, 'orgNo').disabled = false;
+            this.findObject(this.option.column, 'orgName').disabled = false;
+          }
+        });
+      },
       turnInChange(value){
         this.findObject(this.option.column, "receiverNo").rules[0].required = !value;
         this.findObject(this.option.column, "receiverName").rules[0].required = !value;
@@ -648,7 +653,6 @@
               })
             }
           });
-          debugger
           this.findObject(this.option.column, 'category').dicData = formDicData;
           this.findObject(this.option.column, 'categoryShow').dicData = formDicData;
           return arr;
@@ -820,6 +824,8 @@
           this.loading = false;
           this.selectionClear();
         });
+
+        this.initCurrentDeptAndKeepCategroy();
       }
     }
   };

+ 7 - 5
src/views/bank/message.vue

@@ -45,7 +45,7 @@
       <template slot-scope="{row}" slot="menu">
         <el-button size="small" class="el-button--text" v-if="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="userInfo.user_id == row.createUser" @click="$refs.crud.rowDel(row, index)"><i class="el-icon-delete"></i> 刪 除</el-button>
-        <el-button type="text" icon="el-icon-download" size="small" v-if="permission.message_download" @click="handleDownload(row)">下載</el-button>
+        <el-button type="text" icon="el-icon-download" size="small" v-if="permission.message_download && row.file" @click="handleDownload(row)">下載</el-button>
       </template>
     </avue-crud>
 
@@ -439,10 +439,12 @@
         if (["edit", "view"].includes(type)) {
           getDetail(this.form.id).then(res => {
             const data = res.data.data;
-            data.name = data.originalName;
-            this.attachForm.attachFile = [
-              {label: data.name, value: data.originalName}
-            ];
+            if (data.file){
+              data.name = data.originalName;
+              this.attachForm.attachFile = [
+                {label: data.name, value: data.originalName}
+              ];
+            }
             this.form = data;
           });
         }

+ 7 - 2
src/views/bank/sealhandover.vue

@@ -81,7 +81,7 @@
       </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>
@@ -94,7 +94,9 @@
     </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="信息確認"
@@ -122,6 +124,8 @@
     components: {SealhandoverSure, SealhandoverKeep, SelectDialogUser},
     data() {
       return {
+        turnInDisabled: false,
+
         isManageUser: false,
         userKeepList: [],
         currentDept: [],
@@ -716,6 +720,7 @@
             this.form = res.data.data;
           });
         }*/
+        this.turnInDisabled = type == 'edit'
         done();
       },
       searchReset() {

+ 17 - 17
src/views/bank/user-log-view.vue

@@ -116,6 +116,9 @@
                 {
                   label: "新增", value: "add"
                 },
+                {
+                  label: "上繳", value: "turnin"
+                },
                 {
                   label: "編輯", value: "edit"
                 },
@@ -207,7 +210,7 @@
               prop: "handoverDate",
               type: "datetime",
               format: "yyyy-MM-dd HH:mm",
-              valueFormat: "yyyy-MM-dd HH:mm",
+              // valueFormat: "yyyy-MM-dd HH:mm",
             },
             {
               label: "備註",
@@ -261,7 +264,7 @@
               prop: "handoverDate",
               type: "datetime",
               format: "yyyy-MM-dd HH:mm",
-              valueFormat: "yyyy-MM-dd HH:mm",
+              // valueFormat: "yyyy-MM-dd HH:mm",
             },
             {
               label: "接收人",
@@ -316,14 +319,14 @@
               prop: "applyDate",
               type: "datetime",
               format: "yyyy-MM-dd",
-              valueFormat: "yyyy-MM-dd",
+              // valueFormat: "yyyy-MM-dd",
             },
             {
               label: "生效日期",
               prop: "effectiveDate",
               type: "datetime",
               format: "yyyy-MM-dd",
-              valueFormat: "yyyy-MM-dd",
+              // valueFormat: "yyyy-MM-dd",
             },
             {
               label: "審批人",
@@ -347,7 +350,7 @@
               prop: "checkTimeBegin",
               type: "datetime",
               format: "yyyy-MM-dd HH:mm",
-              valueFormat: "yyyy-MM-dd HH:mm",
+              // valueFormat: "yyyy-MM-dd HH:mm",
 
             },
             {
@@ -355,7 +358,7 @@
               prop: "checkTimeEnd",
               type: "datetime",
               format: "yyyy-MM-dd HH:mm",
-              valueFormat: "yyyy-MM-dd HH:mm",
+              // valueFormat: "yyyy-MM-dd HH:mm",
 
             },
             {
@@ -460,7 +463,7 @@
               prop: "checkTimeBegin",
               type: "datetime",
               format: "yyyy-MM-dd HH:mm",
-              valueFormat: "yyyy-MM-dd HH:mm",
+              // valueFormat: "yyyy-MM-dd HH:mm",
 
             },
             {
@@ -468,7 +471,7 @@
               prop: "checkTimeEnd",
               type: "datetime",
               format: "yyyy-MM-dd HH:mm",
-              valueFormat: "yyyy-MM-dd HH:mm",
+              // valueFormat: "yyyy-MM-dd HH:mm",
 
             },
             {
@@ -570,12 +573,7 @@
               prop: "checkDate",
               type: "datetime",
               format: "yyyy-MM-dd",
-              valueFormat: "yyyy-MM-dd",
-              rules: [{
-                required: true,
-                message: "請輸入核對日期",
-                trigger: "blur"
-              }]
+              // valueFormat: "yyyy-MM-dd",
             },
             {
               label: "分類",
@@ -658,7 +656,7 @@
               prop: "date",
               type: "datetime",
               format: "yyyy-MM-dd",
-              valueFormat: "yyyy-MM-dd",
+              // valueFormat: "yyyy-MM-dd",
               placeholder: "",
             },
             {
@@ -831,7 +829,7 @@
               prop: "handlingDate",
               type: "datetime",
               format: "yyyy-MM-dd",
-              valueFormat: "yyyy-MM-dd",
+              // valueFormat: "yyyy-MM-dd",
             },
             {
               label: "經辦",
@@ -869,7 +867,7 @@
               prop: "bankConfirmTime",
               type: "datetime",
               format: "yyyy-MM-dd HH:mm:ss",
-              valueFormat: "yyyy-MM-dd HH:mm:ss",
+              // valueFormat: "yyyy-MM-dd HH:mm:ss",
             },
             /*{
               label: "待辦人",
@@ -1035,6 +1033,7 @@
         })
       },
       initForm(dictObj) {
+        debugger
         const newData = JSON.parse(!this.form.newData ? "{}" : this.form.newData);
         const oldData = JSON.parse(!this.form.oldData ? "{}" : this.form.oldData);
         const tableName = this.form.tableName;
@@ -1067,6 +1066,7 @@
         this[tableName + 'Group'][0].column = arr;
         delete this.option.group;
         this.option.group = this[tableName + 'Group'];
+        debugger
         if (this.form.operationType == 'del'){
           Object.assign(this.form, oldData)
         }else{

+ 28 - 1
src/views/report/abnormal-reportlist.vue

@@ -14,6 +14,11 @@
                @size-change="sizeChange"
                @refresh-change="refreshChange"
                @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="primary" size="small" icon="el-icon-download"
+                   plain @click="handleDownload">下載
+        </el-button>
+      </template>
     </avue-crud>
 
   </basic-container>
@@ -57,7 +62,7 @@ export default {
         editBtn: false,
         delBtn: false,
         selection: false,
-        header: false,
+        header: true,
         refreshBtn: false,
         align: 'center',
         columnBtn: false,
@@ -123,6 +128,28 @@ export default {
         }
       }*/
     },
+    handleDownload(){
+      /*if (this.selectionList.length === 0) {
+        this.$message.warning("請選擇至少一條數據");
+        return;
+      }*/
+      let columns = this.deepClone(this.option.column);
+      for (let i = 0; i < columns.length; i++) {
+        let item = columns[i];
+        if (item.hide || item.prop == 'process'){
+          columns.splice(i, 1);
+          i--;
+        }
+        if (item.type == 'select' || item.type == 'tree'){
+          item.prop = '$' + item.prop;
+        }
+      }
+      this.$Export.excel({
+        title: "業務印章持有量匯總表" || new Date().getTime(),
+        columns: columns,
+        data: this.data
+      });
+    },
     beforeOpen(done, type) {
       let arr = [];
       arr.push(this.form.isChecked)

+ 3 - 0
src/views/report/userlog.vue

@@ -184,6 +184,9 @@
                 {
                   label: "新增", value: "add"
                 },
+                {
+                  label: "上繳", value: "turnin"
+                },
                 {
                   label: "編輯", value: "edit"
                 },

+ 5 - 6
src/views/system/login-test.vue

@@ -41,21 +41,17 @@
         submit(){
           testLogin(this.form).then(res => {
             console.log('testLogin')
-            console.log(res)
             this.$Log.primary('testLogin' + res)
             this.$alert("驗證成功!")
           });
         },
         test1(){
           findAllUser(this.form).then(res => {
-            console.log('findAllUser')
-            console.log(res)
             this.$Log.primary('findAllUser' + res)
           });
         },
         test2(){
           let account = this.encryptByDES(this.form.account, "cyzh2020");
-          console.log(account)
           findByCn(account).then(res => {
             console.log('findByCn')
             console.log(res)
@@ -64,8 +60,11 @@
         },
         test3(){
           testNotice("123").then(res => {
-            console.log('testNotice');
-            console.log(res)
+            console.log('testNotice-test3');
+            const data = res.data.data;
+            if (res.data.code == 200){
+              this.$message.success(data.msg);
+            }
           });
         },
         encryptByDES(message, key){

+ 14 - 2
src/views/system/user.vue

@@ -45,13 +45,13 @@
                        icon="el-icon-user"
                        @click="handleGrant">角色配置
             </el-button>
-            <!--<el-button type="info"
+            <el-button type="info"
                        size="small"
                        plain
                        v-if="permission.user_reset"
                        icon="el-icon-refresh"
                        @click="handleReset">密碼重置
-            </el-button>-->
+            </el-button>
             <!-- <el-button type="info"
                         size="small"
                         plain
@@ -971,6 +971,18 @@
           this.$message.warning("請選擇至少一條數據");
           return;
         }
+
+        let flag = false;
+        for (let i = 0; i < this.selectionList.length; i++) {
+          let item = this.selectionList[i];
+          if (item.isLdapuser);
+          flag = flag || item.isLdapuser == 1;
+        }
+        if (flag){
+          this.$message.warning("重置密碼只針對非ldap用戶,請選擇非ldap用戶再進行操作!");
+          return;
+        }
+
         this.$confirm("確定將選擇帳號密碼重置為123456?", {
           confirmButtonText: "確定",
           cancelButtonText: "取消",