|
|
@@ -11,6 +11,7 @@
|
|
|
@row-update="rowUpdate"
|
|
|
@row-save="rowSave"
|
|
|
@row-del="rowDel"
|
|
|
+ :search.sync="search"
|
|
|
@search-change="searchChange"
|
|
|
@search-reset="searchReset"
|
|
|
@selection-change="selectionChange"
|
|
|
@@ -33,21 +34,33 @@
|
|
|
<template slot="handoverPersonNameForm">
|
|
|
<select-dialog-user :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="true" multiple v-model="search.category" placeholder="请选择内容" type="tree" :dic="typeList" :props="props"></avue-input-tree>
|
|
|
+ </template>
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import {getList, getDetail, add, update, remove, getByCategoryAndType} from "@/api/bank/keypwd";
|
|
|
+ import {getList, getDetail, add, update, remove, getByCategoryAndType, getKeyType} 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} from "@/api/system/dept";
|
|
|
|
|
|
export default {
|
|
|
components: {SelectDialogUser},
|
|
|
data() {
|
|
|
return {
|
|
|
+ search: {},
|
|
|
+ typeList: [],
|
|
|
+ props:{
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictKey",
|
|
|
+ },
|
|
|
+
|
|
|
form: {},
|
|
|
query: {},
|
|
|
loading: true,
|
|
|
@@ -79,6 +92,8 @@
|
|
|
label: "銀行號",
|
|
|
prop: "bankNo",
|
|
|
disabled: true,
|
|
|
+ search: true,
|
|
|
+ searchSpan: 4,
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: "请输入銀行號",
|
|
|
@@ -98,41 +113,16 @@
|
|
|
{
|
|
|
label: "分類種類",
|
|
|
prop: "category",
|
|
|
+ search: true,
|
|
|
+ checkStrictly: true,
|
|
|
type: "tree",
|
|
|
- dicUrl: "/api/blade-system/dict/dictionary?code=key_type",
|
|
|
+ // dicUrl: "/api/blade-system/dict/dictionary?code=key_type",
|
|
|
+ dicData: [],
|
|
|
props:{
|
|
|
label: "dictValue",
|
|
|
value: "dictKey",
|
|
|
},
|
|
|
- dicFormatter: (res)=>{
|
|
|
- let data = res.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;
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- return arr;
|
|
|
- },
|
|
|
+ searchslot: true,
|
|
|
change: ({value, column}) => {
|
|
|
if (!value || this.type == 'view' || this.type == 'edit') return;
|
|
|
getByCategoryAndType(value, this.form.orgNo).then(res => {
|
|
|
@@ -156,6 +146,44 @@
|
|
|
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",
|
|
|
+ searchRange:true,
|
|
|
+ hide: true,
|
|
|
+ addDisplay: false,
|
|
|
+ editDisplay: false,
|
|
|
+ viewDisplay: false,
|
|
|
+ search: true,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入通知时间",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
/*{
|
|
|
label: "種類",
|
|
|
prop: "type",
|
|
|
@@ -319,7 +347,48 @@
|
|
|
return ids.join(",");
|
|
|
}
|
|
|
},
|
|
|
+ created() {
|
|
|
+ this.initTypeDict();
|
|
|
+ getDeptTree().then(res => {
|
|
|
+ const column = this.findObject(this.option.column, "orgNos");
|
|
|
+ column.dicData = res.data.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ 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;
|
|
|
+ this.findObject(this.option.column, 'category').dicData = arr;
|
|
|
+ return arr;
|
|
|
+ })
|
|
|
+ },
|
|
|
handoverSelectCallback(value){
|
|
|
this.form.handoverPersonNo = value.ehr;
|
|
|
this.form.handoverPersonName = value.name;
|
|
|
@@ -417,6 +486,17 @@
|
|
|
this.onLoad(this.page);
|
|
|
},
|
|
|
searchChange(params, done) {
|
|
|
+ if (params.category){
|
|
|
+ params.category = params.category.join();
|
|
|
+ }
|
|
|
+ if (params.orgNos){
|
|
|
+ params.orgNos = params.orgNos.join();
|
|
|
+ }
|
|
|
+ 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);
|