|
|
@@ -45,13 +45,14 @@
|
|
|
</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" @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">
|
|
|
+ <template slot="receiverNameForm">
|
|
|
<select-dialog-user :name="form.receiverName" :ehr="form.receiverNo" :disabled="disabeldReceiver" :callback="selectCallback"></select-dialog-user>
|
|
|
- </template>-->
|
|
|
+ </template>
|
|
|
<template slot="handoverPersonNameForm">
|
|
|
<select-dialog-user :name="form.handoverPersonName" :ehr="form.handoverPersonNo" :disabled="disabeldHandover" :callback="handoverSelectCallback"></select-dialog-user>
|
|
|
</template>
|
|
|
@@ -60,6 +61,17 @@
|
|
|
<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="titleForm" slot-scope="{row, index}">
|
|
|
<div v-html="title" style="white-space: pre-line;color: red;font-weight: bold;"></div>
|
|
|
</template>
|
|
|
@@ -72,11 +84,18 @@
|
|
|
<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} 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 "../../components/select-dialog/select-dialog-user";
|
|
|
@@ -84,11 +103,10 @@
|
|
|
import {getDeptTree, getTree} from "@/api/system/dept";
|
|
|
import KeypwdKeep from "./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 {
|
|
|
- components: {KeypwdKeep, SelectDialogUser},
|
|
|
+ components: {KeypwdSure, KeypwdKeep, SelectDialogUser},
|
|
|
data() {
|
|
|
return {
|
|
|
title: "",
|
|
|
@@ -99,6 +117,9 @@
|
|
|
value: "dictKey",
|
|
|
},
|
|
|
|
|
|
+ approveForm: {},
|
|
|
+ approveVisible: false,
|
|
|
+
|
|
|
delBatchBtn: true,
|
|
|
keepVisible: false,
|
|
|
form: {},
|
|
|
@@ -181,15 +202,17 @@
|
|
|
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.form.category == value) 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');
|
|
|
@@ -203,7 +226,7 @@
|
|
|
this.form.handoverPersonNo = data.receiverNo;
|
|
|
this.form.handoverPersonName = data.receiverName;
|
|
|
}
|
|
|
- });
|
|
|
+ });*/
|
|
|
},
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
@@ -294,6 +317,16 @@
|
|
|
trigger: "blur"
|
|
|
}]
|
|
|
},
|
|
|
+ {
|
|
|
+ label: "是否上繳",
|
|
|
+ prop: "isTurnIn",
|
|
|
+ formslot: true,
|
|
|
+ rules: [{
|
|
|
+ required: false,
|
|
|
+ message: "請勾選是否上繳",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
{
|
|
|
label: "交出人",
|
|
|
prop: "handoverPersonName",
|
|
|
@@ -314,6 +347,7 @@
|
|
|
trigger: "blur"
|
|
|
}]
|
|
|
},
|
|
|
+
|
|
|
{
|
|
|
label: "接收人",
|
|
|
prop: "receiverName",
|
|
|
@@ -434,6 +468,11 @@
|
|
|
});
|
|
|
},
|
|
|
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 + "條數據嗎?"
|
|
|
@@ -444,10 +483,13 @@
|
|
|
})
|
|
|
.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})
|
|
|
+ this.downLoadData(data, true)
|
|
|
});
|
|
|
})
|
|
|
}else{
|
|
|
+ debugger
|
|
|
this.downLoadData(this.selectionList, false)
|
|
|
}
|
|
|
},
|
|
|
@@ -517,6 +559,7 @@
|
|
|
this.form.handoverPersonName = value.name;
|
|
|
},
|
|
|
selectCallback(value){
|
|
|
+ this.form.receiverId = value.id;
|
|
|
this.form.receiverNo = value.ehr;
|
|
|
this.form.receiverName = value.name;
|
|
|
},
|
|
|
@@ -588,16 +631,47 @@
|
|
|
beforeOpen(done, type) {
|
|
|
this.type = type;
|
|
|
if (type === 'add'){
|
|
|
- this.form.receiverNo = this.userInfo.user_ehr;
|
|
|
- this.form.receiverName = 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;
|
|
|
- this.form.orgNo = data.orgNo;
|
|
|
- this.form.orgName = data.deptName;
|
|
|
- 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 = $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)) {
|
|
|
@@ -661,6 +735,9 @@
|
|
|
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;
|
|
|
+ })
|
|
|
this.data = data.records;
|
|
|
this.loading = false;
|
|
|
this.selectionClear();
|