会计事项平台更新
This commit is contained in:
parent
c33b219346
commit
dfd7440144
|
@ -0,0 +1,65 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
// 表格数据获取
|
||||||
|
export function confTempSaveAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: "/kangarooDataCenterV3/ae/conf/temp/save",
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function queryVoucherTypeAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: "/kangarooDataCenterV3/ae/conf/bd/queryVoucherType",
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}export function tempupdateAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: "/kangarooDataCenterV3/ae/conf/temp/update",
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}export function tempqueryAllAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: "/kangarooDataCenterV3/ae/conf/temp/queryAll",
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function tempdeleteAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: "/kangarooDataCenterV3/ae/conf/temp/delete",
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}export function tempcheckAbstractAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: "/kangarooDataCenterV3/ae/conf/temp/checkAbstract",
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}export function tempQueryAllAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: "/kangarooDataCenterV3/ae/conf/temp/type/queryAll",
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}export function typeSaveAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: "/kangarooDataCenterV3/ae/conf/temp/type/save",
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}export function typeUpdateAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: "/kangarooDataCenterV3/ae/conf/temp/type/update",
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}export function typeDeleteAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: "/kangarooDataCenterV3/ae/conf/temp/type/delete",
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
|
@ -0,0 +1,80 @@
|
||||||
|
//会计科技
|
||||||
|
|
||||||
|
import request from "@/utils/request";
|
||||||
|
|
||||||
|
//业务模块
|
||||||
|
|
||||||
|
//新增模块
|
||||||
|
export function subjectContrastQueryAll(data) {
|
||||||
|
return request({
|
||||||
|
url: "/kangarooDataCenterV3/ae/conf/subjectContrast/queryAll",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}export function queryOrgBookVOAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: "/kangarooDataCenterV3/ae/conf/bd/queryOrgBookVO",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}export function queryBdinfoListAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: "/kangarooDataCenterV3/ae/conf/bd/queryBdinfoList",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}export function subjectContrastSaveAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: "/kangarooDataCenterV3/ae/conf/subjectContrast/save",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}export function subjectContrastqueryAll(data) {
|
||||||
|
return request({
|
||||||
|
url: "/kangarooDataCenterV3/ae/conf/subjectContrast/queryAll",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}export function subjectContrastdeleteAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: "/kangarooDataCenterV3/ae/conf/subjectContrast/delete",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}export function subjectContrastupdateAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: "/kangarooDataCenterV3/ae/conf/subjectContrast/update",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}export function queryDataByMapAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: "/kangarooDataCenterV3/ae/conf/bd/queryDataByMap",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}export function queryDataPagedByMapAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: "/kangarooDataCenterV3/ae/conf/bd/queryDataPagedByMap",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}export function queryAccSubjByOrgBookIdAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: "/kangarooDataCenterV3/ae/conf/bd/queryAccSubjByOrgBookId",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}export function subjectContrastBDelete(data) {
|
||||||
|
return request({
|
||||||
|
url: "/kangarooDataCenterV3/ae/conf/subjectContrastB/delete",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}export function queryGlsubrelationAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: "/kangarooDataCenterV3/ae/conf/bd/queryGlsubrelation",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
|
@ -116,4 +116,22 @@ export function queryByIdAPI(data) {
|
||||||
method: "post",
|
method: "post",
|
||||||
data,
|
data,
|
||||||
});
|
});
|
||||||
|
}export function queryBdinfoListAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: "/kangarooDataCenterV3/ae/conf/bd/queryBdinfoList",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}export function queryCashFlowMapAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: "/kangarooDataCenterV3/ae/conf/bd/queryCashFlowMap",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}export function queryMdmAndFiledssByMdmIdAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: "/kangarooDataCenterV3/ae/conf/mdmfile/queryMdmAndFiledssByMdmId",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,21 +6,101 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- 权限设置弹框 -->
|
<!-- 权限设置弹框 -->
|
||||||
<!-- :style="{'margin':isCenter?'auto':''}"> -->
|
<!-- :style="{'margin':isCenter?'auto':''}"> -->
|
||||||
|
<div style="height: 100%">
|
||||||
<div v-loading="treeLoading" flex style="margin:auto;height: 100%;">
|
<div flex="cross:center" v-if="filterShow" style="margin-bottom: 5px">
|
||||||
<div class="menu-i" flex="cross:center main:center">
|
<el-input
|
||||||
<div class="menu-i-t" flex="cross:top main:justify">
|
placeholder="输入关键字进行过滤"
|
||||||
<el-tree :data="menuData" :check-strictly="true" :default-checked-keys="selectData"
|
v-model="filterText"
|
||||||
@node-click="handleNodeClick" :expand-on-click-node="false" :default-expand-all="expandAll"
|
style="margin-right: 13px"
|
||||||
:key="new Date().getTime()" :props="treeProps" style="width: 100%;background-color:white;height: 100%;"
|
></el-input>
|
||||||
@check-change="checkChange" node-key="id" ref="elTree" :show-checkbox="showCheckbox"
|
<el-button
|
||||||
>
|
icon="el-icon-plus"
|
||||||
</el-tree>
|
style="height: 32px; line-height: 32px; padding: 0 13px !important"
|
||||||
<div @click="changePcAll" class="checkText" v-if="Allshow">全选</div>
|
@click="add"
|
||||||
</div>
|
v-if="filterButtonShow"
|
||||||
|
>
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div flex="cross:center main:center" style="width:100%" v-if="isSaveBtn">
|
<div
|
||||||
<el-button style="width:40%" type="primary" @click="saveMenuUser">保存</el-button>
|
flex="dir:top cross:center main:center"
|
||||||
|
style="margin: auto; height: calc(100% - 22px); overflow: auto"
|
||||||
|
class="treeBodyHeight"
|
||||||
|
>
|
||||||
|
<div class="menu-i" flex="cross:center main:center">
|
||||||
|
<div class="menu-i-t" flex="cross:top main:justify">
|
||||||
|
<el-tree
|
||||||
|
:data="menuData"
|
||||||
|
:check-strictly="true"
|
||||||
|
:default-checked-keys="selectData"
|
||||||
|
v-loading="treeLoading"
|
||||||
|
@node-click="handleNodeClick"
|
||||||
|
:expand-on-click-node="false"
|
||||||
|
:default-expand-all="expandAll"
|
||||||
|
:filter-node-method="filterNode"
|
||||||
|
:props="treeProps"
|
||||||
|
style="width: 100%; background-color: transparent"
|
||||||
|
@check-change="checkChange"
|
||||||
|
node-key="id"
|
||||||
|
ref="elTree"
|
||||||
|
:show-checkbox="showCheckbox"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
flex="cross:center main:justify"
|
||||||
|
class="treeItem"
|
||||||
|
style="width: calc(100% - 31px)"
|
||||||
|
slot-scope="{ node, data }"
|
||||||
|
>
|
||||||
|
<p
|
||||||
|
class="nowrap"
|
||||||
|
style="
|
||||||
|
flex: 1;
|
||||||
|
font-size: 14px;
|
||||||
|
height: 32px;
|
||||||
|
line-height: 32px;
|
||||||
|
"
|
||||||
|
@dblclick="dbTree(node, data)"
|
||||||
|
>
|
||||||
|
{{ nodeLabel == "" ? node.label : node.label[nodeLabel] }}
|
||||||
|
</p>
|
||||||
|
<div style="width: 60px" v-if="treeButton" class="treeItemBtn">
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
size="mini"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
v-if="appendButton"
|
||||||
|
@click.stop="() => append(node, data)"
|
||||||
|
style="color: #333"
|
||||||
|
>
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
size="mini"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
v-if="reviseButton && data.id != 80"
|
||||||
|
@click.stop="() => revise(node, data)"
|
||||||
|
style="color: #333"
|
||||||
|
>
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
size="mini"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
v-if="removeButton && data.id != 80"
|
||||||
|
@click.stop="() => remove(node, data)"
|
||||||
|
style="color: #ff3b30"
|
||||||
|
>
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-tree>
|
||||||
|
<div @click="changePcAll" class="checkText" v-if="Allshow">全选</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div flex="cross:center main:center" style="width: 100%" v-if="isSaveBtn">
|
||||||
|
<el-button style="width: 40%" type="primary" @click="saveMenuUser"
|
||||||
|
>保存
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -31,54 +111,103 @@ export default {
|
||||||
// 是否默认展开所有节点
|
// 是否默认展开所有节点
|
||||||
expandAll: {
|
expandAll: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true,
|
||||||
|
},
|
||||||
|
// 操作按钮
|
||||||
|
treeButton: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
// 操作按钮
|
||||||
|
filterButtonShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
},
|
},
|
||||||
// 是否显示保存按钮
|
// 是否显示保存按钮
|
||||||
isSaveBtn: {
|
isSaveBtn: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false,
|
||||||
},
|
},
|
||||||
// 是否显示全选按钮
|
// 是否显示全选按钮
|
||||||
Allshow: {
|
Allshow: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false,
|
||||||
},
|
},
|
||||||
// 是否显示多选按钮
|
// 是否显示多选按钮
|
||||||
showCheckbox: {
|
showCheckbox: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false,
|
||||||
},
|
},
|
||||||
// 是否居中
|
// 是否居中
|
||||||
isCenter: {
|
isCenter: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true,
|
||||||
|
},
|
||||||
|
// 是否显示筛选
|
||||||
|
filterShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
},
|
},
|
||||||
menuData: {
|
menuData: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => {
|
default: () => {
|
||||||
return []
|
return [];
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
setting: {
|
setting: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false,
|
||||||
|
},
|
||||||
|
treeLoading: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
appendButton: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
reviseButton: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
removeButton: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
nodeLabel: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
},
|
},
|
||||||
treeProps: {
|
treeProps: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => {
|
default() {
|
||||||
return {
|
return {
|
||||||
label: 'menuName',
|
children: "children",
|
||||||
children: 'children'
|
label: "label",
|
||||||
}
|
};
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
defaultTheme: {
|
||||||
|
handler: function (val, oldVal) {
|
||||||
|
this.theme = val;
|
||||||
|
// document.getElementsByTagName('body')[0].style.setProperty('--active', val)
|
||||||
|
|
||||||
|
// let arr = document.getElementsByClassName('.el-tree-node:focus>.el-tree-node__content')
|
||||||
|
// $('.el-tree-node:focus>.el-tree-node__content').css('color',val)
|
||||||
|
},
|
||||||
|
immediate: true,
|
||||||
|
},
|
||||||
|
filterText(val) {
|
||||||
|
this.$refs.elTree.filter(val);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
theme: '',
|
filterText: "",
|
||||||
|
theme: "",
|
||||||
powerDlog: false,
|
powerDlog: false,
|
||||||
// 菜单数据
|
|
||||||
// menuData: [],
|
|
||||||
// 回显选中ids
|
// 回显选中ids
|
||||||
selectData: [],
|
selectData: [],
|
||||||
// 树状图设置
|
// 树状图设置
|
||||||
|
@ -86,50 +215,75 @@ export default {
|
||||||
// label: 'menuName',
|
// label: 'menuName',
|
||||||
// children: 'id',
|
// children: 'id',
|
||||||
// },
|
// },
|
||||||
|
// treeProps: {
|
||||||
|
// children: 'children',
|
||||||
|
// label: 'label'
|
||||||
|
// },
|
||||||
|
|
||||||
// PC菜单全选
|
// PC菜单全选
|
||||||
checkedAllPc: false,
|
checkedAllPc: false,
|
||||||
// 防连点
|
// 防连点
|
||||||
outing: false,
|
outing: false,
|
||||||
treeLoading: false
|
};
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
},
|
},
|
||||||
|
created() {},
|
||||||
|
mounted() {},
|
||||||
computed: {
|
computed: {
|
||||||
defaultTheme() {
|
defaultTheme() {
|
||||||
return this.$store.state.settings.theme
|
return this.$store.state.settings.theme;
|
||||||
}
|
},
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
defaultTheme: {
|
|
||||||
handler: function(val, oldVal) {
|
|
||||||
this.theme = val
|
|
||||||
// document.getElementsByTagName('body')[0].style.setProperty('--active', val)
|
|
||||||
|
|
||||||
// let arr = document.getElementsByClassName('.el-tree-node:focus>.el-tree-node__content')
|
|
||||||
// $('.el-tree-node:focus>.el-tree-node__content').css('color',val)
|
|
||||||
},
|
|
||||||
immediate: true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//选中第一个
|
||||||
|
clickFirst() {
|
||||||
|
document.querySelectorAll(".is-focusable")[0].click();
|
||||||
|
},
|
||||||
|
setCurrentKey(selectId) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.elTree.setCurrentKey(selectId);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
dbTree(node, data) {
|
||||||
|
console.log(node, data, "node");
|
||||||
|
this.setCurrentKey(null);
|
||||||
|
},
|
||||||
|
// 添加
|
||||||
|
append(node, data) {
|
||||||
|
this.$emit("append", data, node);
|
||||||
|
},
|
||||||
|
// 编辑
|
||||||
|
revise(node, data) {
|
||||||
|
this.$emit("revise", data, node);
|
||||||
|
},
|
||||||
|
// 删除
|
||||||
|
remove(node, data) {
|
||||||
|
this.$emit("remove", data, node);
|
||||||
|
},
|
||||||
|
add() {
|
||||||
|
this.$emit("add");
|
||||||
|
},
|
||||||
|
filterNode(value, data, node) {
|
||||||
|
if (!value) return true;
|
||||||
|
let nodeData =
|
||||||
|
this.nodeLabel == ""
|
||||||
|
? data[this.treeProps.label]
|
||||||
|
: data[this.treeProps.label][this.nodeLabel];
|
||||||
|
return nodeData.indexOf(value) !== -1;
|
||||||
|
},
|
||||||
buttonL(el) {
|
buttonL(el) {
|
||||||
el.active = !el.active
|
el.active = !el.active;
|
||||||
this.$forceUpdate()
|
this.$forceUpdate();
|
||||||
},
|
},
|
||||||
setData(id) {
|
setData(id) {
|
||||||
this.selectData.push(id)
|
this.selectData.push(id);
|
||||||
},
|
},
|
||||||
saveMenuUser() {
|
saveMenuUser() {
|
||||||
let allKeys = this.getKey()
|
let allKeys = this.getKey();
|
||||||
this.$emit('onSaveMenu', allKeys)
|
this.$emit("onSaveMenu", allKeys);
|
||||||
},
|
},
|
||||||
// 获取选中的key值
|
// 获取选中的key值
|
||||||
getKey() {
|
getKey() {
|
||||||
return this.$refs.elTree.getCheckedKeys()
|
return this.$refs.elTree.getCheckedKeys();
|
||||||
},
|
},
|
||||||
// 初始数据
|
// 初始数据
|
||||||
initData() {
|
initData() {
|
||||||
|
@ -137,21 +291,21 @@ export default {
|
||||||
// this.menuData = [];
|
// this.menuData = [];
|
||||||
|
|
||||||
// 回显选中ids
|
// 回显选中ids
|
||||||
this.selectData = []
|
this.selectData = [];
|
||||||
},
|
},
|
||||||
// 关闭弹窗
|
// 关闭弹窗
|
||||||
handleClose() {
|
handleClose() {
|
||||||
this.powerDlog = false
|
this.powerDlog = false;
|
||||||
this.initData()
|
this.initData();
|
||||||
},
|
},
|
||||||
// 全选、反选
|
// 全选、反选
|
||||||
changePcAll() {
|
changePcAll() {
|
||||||
this.checkedAllPc = !this.checkedAllPc
|
this.checkedAllPc = !this.checkedAllPc;
|
||||||
let selectData = []
|
let selectData = [];
|
||||||
if (this.checkedAllPc) {
|
if (this.checkedAllPc) {
|
||||||
selectData = this.cycleData(this.menuData)
|
selectData = this.cycleData(this.menuData);
|
||||||
}
|
}
|
||||||
this.selectData = selectData
|
this.selectData = selectData;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @description 递归获取菜单id(树状 多叉树结构)
|
* @description 递归获取菜单id(树状 多叉树结构)
|
||||||
|
@ -161,46 +315,46 @@ export default {
|
||||||
* @param {Boolean} isSelect: false返回所有id,true返回已选择id
|
* @param {Boolean} isSelect: false返回所有id,true返回已选择id
|
||||||
*/
|
*/
|
||||||
cycleData(outData, isSelect) {
|
cycleData(outData, isSelect) {
|
||||||
let newData = []
|
let newData = [];
|
||||||
|
|
||||||
function cycle(data) {
|
function cycle(data) {
|
||||||
if (!data || data.length == 0) {
|
if (!data || data.length == 0) {
|
||||||
return false
|
return false;
|
||||||
} else {
|
} else {
|
||||||
for (var i = 0, len = data.length; i < len; i++) {
|
for (var i = 0, len = data.length; i < len; i++) {
|
||||||
let item = data[i]
|
let item = data[i];
|
||||||
if (isSelect && item.selected == 1) {
|
if (isSelect && item.selected == 1) {
|
||||||
newData.push(item.id)
|
newData.push(item.id);
|
||||||
}
|
}
|
||||||
if (!isSelect) {
|
if (!isSelect) {
|
||||||
newData.push(item.id)
|
newData.push(item.id);
|
||||||
}
|
}
|
||||||
cycle(item.id)
|
cycle(item.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cycle(outData)
|
cycle(outData);
|
||||||
return newData
|
return newData;
|
||||||
},
|
},
|
||||||
getData(childIds) {
|
getData(childIds) {
|
||||||
let newData = []
|
let newData = [];
|
||||||
|
|
||||||
function cycle(data) {
|
function cycle(data) {
|
||||||
data.forEach(el => {
|
data.forEach((el) => {
|
||||||
childIds.forEach(item => {
|
childIds.forEach((item) => {
|
||||||
if (el.id == item) {
|
if (el.id == item) {
|
||||||
newData.push(el)
|
newData.push(el);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
if (el.children != null && el.children && el.children.length) {
|
if (el.children != null && el.children && el.children.length) {
|
||||||
cycle(el.children, childIds)
|
cycle(el.children, childIds);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
cycle(this.menuData, childIds)
|
cycle(this.menuData, childIds);
|
||||||
return newData
|
return newData;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @description 节点选中状态发生变化时的回调
|
* @description 节点选中状态发生变化时的回调
|
||||||
|
@ -210,38 +364,46 @@ export default {
|
||||||
* @param { Boolean } checked 当前节点是否选中
|
* @param { Boolean } checked 当前节点是否选中
|
||||||
*/
|
*/
|
||||||
checkChange(nodeDode, checked) {
|
checkChange(nodeDode, checked) {
|
||||||
let getHalfCheckedKeys = this.$refs.elTree.getCheckedKeys().concat(this.$refs.elTree.getHalfCheckedKeys())
|
let getHalfCheckedKeys = this.$refs.elTree
|
||||||
|
.getCheckedKeys()
|
||||||
|
.concat(this.$refs.elTree.getHalfCheckedKeys());
|
||||||
// let getHalfCheckedKeys = this.$refs.elTree.getHalfCheckedKeys()
|
// let getHalfCheckedKeys = this.$refs.elTree.getHalfCheckedKeys()
|
||||||
let childIds = getHalfCheckedKeys.length != 0 ? getHalfCheckedKeys : this.selectData
|
let childIds =
|
||||||
let checkdata = this.getData(childIds)
|
getHalfCheckedKeys.length != 0 ? getHalfCheckedKeys : this.selectData;
|
||||||
this.$emit('checkChange', childIds, checkdata)
|
let checkdata = this.getData(childIds);
|
||||||
return
|
this.$emit("checkChange", childIds, checkdata);
|
||||||
|
return;
|
||||||
let id = nodeDode.id
|
let id = nodeDode.id;
|
||||||
// let childIds = this.cycleData(id)
|
// let childIds = this.cycleData(id)
|
||||||
console.log(id)
|
|
||||||
// 循环设置子项是否选中
|
// 循环设置子项是否选中
|
||||||
childIds.forEach(item => {
|
childIds.forEach((item) => {
|
||||||
this.$refs.elTree.setChecked(item, checked)
|
this.$refs.elTree.setChecked(item, checked);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 点击事件
|
// 点击事件
|
||||||
handleNodeClick(data, b, c) {
|
handleNodeClick(data, b, c) {
|
||||||
this.$emit('handleNodeClick', data, b.parent.data)
|
this.$emit("handleNodeClick", data, b, c);
|
||||||
}
|
},
|
||||||
|
},
|
||||||
}
|
};
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
// $activeColor:val(--activeColor, "#00aaff");
|
// $activeColor:val(--activeColor, "#00aaff");
|
||||||
|
.nowrap {
|
||||||
|
/*让长段文本不换行*/
|
||||||
|
white-space: nowrap;
|
||||||
|
/*设置文本超出元素宽度部分隐藏*/
|
||||||
|
overflow-x: hidden;
|
||||||
|
/*设置文本超出部分用省略号显示*/
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
.el-tree-node__content {
|
.el-tree-node__content {
|
||||||
height: 32px !important;
|
height: 32px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-tree-node__label {
|
.el-tree-node__label {
|
||||||
font-size: 14px !important;
|
// font-size: 16px !important;
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -262,9 +424,31 @@ export default {
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.treeItem {
|
||||||
|
.treeItemBtn {
|
||||||
|
display: none;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
.treeItemBtn {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-button--mini {
|
||||||
|
padding: 0 !important;
|
||||||
|
margin: 4px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-tree-node.is-current > .el-tree-node__content .el-button--text {
|
||||||
|
}
|
||||||
|
|
||||||
.menu-i {
|
.menu-i {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
// margin-bottom: 24px;
|
// margin-bottom: 24px;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
&-f {
|
&-f {
|
||||||
color: #52575a;
|
color: #52575a;
|
||||||
|
@ -275,10 +459,10 @@ export default {
|
||||||
|
|
||||||
&-t {
|
&-t {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
// height: 450px;
|
// height: 450px;
|
||||||
// border: 1px solid #d8d8d8;
|
// border: 1px solid #d8d8d8;
|
||||||
overflow-y: auto;
|
// overflow-y: auto;
|
||||||
height: 100%;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,7 +482,7 @@ export default {
|
||||||
transition: all 0.3s ease-in-out;
|
transition: all 0.3s ease-in-out;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: #4570fc;
|
color: #ecf5ff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,210 +1,232 @@
|
||||||
<template>
|
<template>
|
||||||
<div flex>
|
<div flex>
|
||||||
<div class="treeBody" v-if="menuData.length > 0">
|
<div class="treeBody" v-if="menuData.length > 0">
|
||||||
<base-tree ref="baseTree" :isCenter="false" :isSaveBtn="false" :Allshow="false" :showCheckbox="false"
|
<base-tree ref="baseTree" :isCenter="false" :isSaveBtn="false" :Allshow="false" :showCheckbox="false"
|
||||||
:menuData="menuData" @handleNodeClick="handleNodeClick">
|
:menuData="menuData" @handleNodeClick="handleNodeClick"
|
||||||
</base-tree>
|
>
|
||||||
</div>
|
</base-tree>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div style="overflow: hidden;padding: 10px;flex: 1;">
|
<div style="overflow: hidden;padding: 10px;flex: 1;">
|
||||||
<!-- <div flex="cross:center" style="margin-bottom: 10px;">
|
<div flex="cross:center" style="margin-bottom: 10px;" v-if="showSearch">
|
||||||
<el-input v-model="write" :placeholder="placeholder" style="width: 200px;margin-right: 10px;">
|
<el-input v-model="write" :placeholder="placeholder" style="width: 200px;margin-right: 10px;">
|
||||||
</el-input>
|
</el-input>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="search">查询</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="search">查询</el-button>
|
||||||
</div> -->
|
</div>
|
||||||
<base-table ref="customtable" :border="true" :showIndex="false" :tabLoading.sync="tabLoading" :slotrow="true"
|
<base-table ref="customtable" :border="true" :showIndex="false" :tabLoading.sync="tabLoading" :slotrow="true"
|
||||||
:tableData="tableData" :tableColumn="tableColumn" :funData="[]" @onCellClick="getCell" :tableHeight="tableHeightLog"
|
:tableData="tableData" :tableColumn="tableColumn" :funData="[]" @onCellClick="getCell"
|
||||||
@onSelectionChange="getSelect" :highlightCurrent="true" @radioChange="radioChange">
|
:tableHeight="tableHeightLog"
|
||||||
<!-- 单选 -->
|
@onSelectionChange="getSelect" :highlightCurrent="true" @radioChange="radioChange"
|
||||||
<template v-slot:option="{row}">
|
>
|
||||||
<el-radio v-model="radio" :label="row.$index" ></el-radio>
|
<!-- 单选 -->
|
||||||
</template>
|
<template v-slot:option="{row}">
|
||||||
</base-table>
|
<el-radio v-model="radio" :label="row.$index"></el-radio>
|
||||||
<base-page :pageModel.sync="pageModel" @onPageChange="pageChange" :pageSizesList='[10 , 20, 80, 100, 150]'></base-page>
|
</template>
|
||||||
</div>
|
</base-table>
|
||||||
</div>
|
<base-page :pageModel.sync="pageModel" @onPageChange="pageChange" :pageSizesList="[10 , 20, 80, 100, 150]"
|
||||||
|
v-if="pageShow"
|
||||||
|
></base-page>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import baseTable from "@/components/base/baseTable";
|
import baseTable from '@/components/base/baseTable'
|
||||||
import baseLayout from "@/components/base/baseLayout";
|
import baseLayout from '@/components/base/baseLayout'
|
||||||
import baseJurisdiction from "@/components/base/baseJurisdiction/index.vue";
|
import baseJurisdiction from '@/components/base/baseJurisdiction/index.vue'
|
||||||
import baseTree from "@/components/base/BaseMenuTree/index.vue";
|
import baseTree from '@/components/base/BaseMenuTree/index.vue'
|
||||||
import basePage from '@/components/base/basePage'
|
import basePage from '@/components/base/basePage'
|
||||||
import configData from "./configData";
|
import configData from './configData'
|
||||||
export default {
|
|
||||||
name: "review",
|
|
||||||
components: {
|
|
||||||
baseLayout,
|
|
||||||
baseTable,
|
|
||||||
baseTree,
|
|
||||||
baseJurisdiction,
|
|
||||||
basePage
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
// 表格尺寸
|
|
||||||
placeholder: {
|
|
||||||
type: String,
|
|
||||||
default: '请输入内容'
|
|
||||||
},
|
|
||||||
choiceDialog: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
},
|
|
||||||
tableColumn: {
|
|
||||||
type: Array,
|
|
||||||
default () {
|
|
||||||
return []
|
|
||||||
},
|
|
||||||
},
|
|
||||||
menuData: {
|
|
||||||
type: Array,
|
|
||||||
default () {
|
|
||||||
return []
|
|
||||||
},
|
|
||||||
},
|
|
||||||
tableData: {
|
|
||||||
type: Array,
|
|
||||||
default () {
|
|
||||||
return []
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
choiceDialog: {
|
|
||||||
deep: true, //深度监听设置为 true
|
|
||||||
handler: function(newV, oldV) {
|
|
||||||
if(this.choiceDialog){
|
|
||||||
this.reset()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
radio: false,
|
|
||||||
optionData: '',
|
|
||||||
// 分页数据
|
|
||||||
pageModel: {
|
|
||||||
total: 0,
|
|
||||||
page: 1,
|
|
||||||
limit: 10,
|
|
||||||
},
|
|
||||||
write: '',
|
|
||||||
nowBtns: [{
|
|
||||||
'routeUrl': 'button_jurisdiction',
|
|
||||||
'menuName': '权限设置'
|
|
||||||
}],
|
|
||||||
tabLoading: false,
|
|
||||||
selectTable: [], //多选
|
|
||||||
settingsDialog: false,
|
|
||||||
settingCenter: "left",
|
|
||||||
tableHeightLog: "calc(100vh - 416px)",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
// 表头配置
|
|
||||||
// tableColumn() {
|
|
||||||
// return configData.tableColumnJson
|
|
||||||
// },
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
// this.$refs.customtable.clearRadioIndex()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 查询、筛选事件
|
|
||||||
getQuery(model) {
|
|
||||||
console.log(model)
|
|
||||||
},
|
|
||||||
// 单元格点击事件
|
|
||||||
getCell(row, label) {
|
|
||||||
|
|
||||||
},
|
|
||||||
// 详情页 type: 1 新增 2编辑
|
|
||||||
goInfo(type = 1, id) {
|
|
||||||
|
|
||||||
},
|
export default {
|
||||||
getElSelect(event, index, indexItem, param) {},
|
name: 'review',
|
||||||
// 按钮点击事件
|
components: {
|
||||||
getFuncBtn(btnEven) {
|
baseLayout,
|
||||||
console.log(btnEven)
|
baseTable,
|
||||||
if (btnEven.routeUrl == 'button_jurisdiction') {
|
baseTree,
|
||||||
this.settingsDialog = true
|
baseJurisdiction,
|
||||||
}
|
basePage
|
||||||
},
|
},
|
||||||
// 表格多选
|
props: {
|
||||||
getSelect(selectTable) {
|
// 表格尺寸
|
||||||
this.selectTable = selectTable
|
placeholder: {
|
||||||
},
|
type: String,
|
||||||
// 树状图点击事件
|
default: '请输入内容'
|
||||||
handleNodeClick(data) {
|
},
|
||||||
this.organizationForm = {
|
choiceDialog: {
|
||||||
o_OrganCode: data.o_OrganCode,
|
type: Boolean,
|
||||||
ParentOrganName: data.label,
|
default: false
|
||||||
}
|
},
|
||||||
this.propvalue = data.label
|
tableColumn: {
|
||||||
this.optionData = ''
|
type: Array,
|
||||||
this.$refs.customtable.clearRadioIndex()
|
default() {
|
||||||
this.$emit('handleNodeClick', data)
|
return []
|
||||||
},
|
}
|
||||||
// 页数或每页条数更改时触发
|
},
|
||||||
pageChange() {
|
menuData: {
|
||||||
this.$emit('onQuery', this.mergeParam())
|
type: Array,
|
||||||
},
|
default() {
|
||||||
mergeParam(state) {
|
return []
|
||||||
if (state) {
|
}
|
||||||
this.pageModel.page = 1;
|
},
|
||||||
}
|
tableData: {
|
||||||
let page = {
|
type: Array,
|
||||||
page: this.pageModel.page,
|
default() {
|
||||||
limit: this.pageModel.limit,
|
return []
|
||||||
}
|
}
|
||||||
for (let i in this.model) {
|
},
|
||||||
if (!this.model[i]) {
|
pageShow: {
|
||||||
this.model[i] = null;
|
type: Boolean,
|
||||||
}
|
default: true
|
||||||
}
|
},
|
||||||
let search = Object.assign({}, page, this.model)
|
showSearch: {
|
||||||
return Object.assign({}, page, this.model)
|
type: Boolean,
|
||||||
},
|
default: false
|
||||||
// 设置分页total值
|
},
|
||||||
setPageTotal(total) {
|
|
||||||
this.$set(this.pageModel, 'total', total)
|
|
||||||
},
|
|
||||||
//查询
|
|
||||||
search() {
|
|
||||||
this.$emit('getTableList', this.write);
|
|
||||||
},
|
|
||||||
radioChange(val) {
|
|
||||||
this.optionData = val
|
|
||||||
this.radio = val.index
|
|
||||||
},
|
|
||||||
reset() {
|
|
||||||
this.write = ''
|
|
||||||
this.radio = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
// this.$refs.choice.reset()
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
choiceDialog: {
|
||||||
|
deep: true, //深度监听设置为 true
|
||||||
|
handler: function(newV, oldV) {
|
||||||
|
if (this.choiceDialog) {
|
||||||
|
this.reset()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
radio: false,
|
||||||
|
optionData: '',
|
||||||
|
// 分页数据
|
||||||
|
pageModel: {
|
||||||
|
total: 0,
|
||||||
|
page: 1,
|
||||||
|
limit: 10
|
||||||
|
},
|
||||||
|
write: '',
|
||||||
|
nowBtns: [{
|
||||||
|
'routeUrl': 'button_jurisdiction',
|
||||||
|
'menuName': '权限设置'
|
||||||
|
}],
|
||||||
|
tabLoading: false,
|
||||||
|
selectTable: [], //多选
|
||||||
|
settingsDialog: false,
|
||||||
|
settingCenter: 'left',
|
||||||
|
tableHeightLog: 'calc(100vh - 416px)'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
// 表头配置
|
||||||
|
// tableColumn() {
|
||||||
|
// return configData.tableColumnJson
|
||||||
|
// },
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
// this.$refs.customtable.clearRadioIndex()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 查询、筛选事件
|
||||||
|
getQuery(model) {
|
||||||
|
console.log(model)
|
||||||
|
},
|
||||||
|
// 单元格点击事件
|
||||||
|
getCell(row, label) {
|
||||||
|
|
||||||
|
},
|
||||||
|
// 详情页 type: 1 新增 2编辑
|
||||||
|
goInfo(type = 1, id) {
|
||||||
|
|
||||||
|
},
|
||||||
|
getElSelect(event, index, indexItem, param) {
|
||||||
|
},
|
||||||
|
// 按钮点击事件
|
||||||
|
getFuncBtn(btnEven) {
|
||||||
|
console.log(btnEven)
|
||||||
|
if (btnEven.routeUrl == 'button_jurisdiction') {
|
||||||
|
this.settingsDialog = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 表格多选
|
||||||
|
getSelect(selectTable) {
|
||||||
|
this.selectTable = selectTable
|
||||||
|
},
|
||||||
|
// 树状图点击事件
|
||||||
|
handleNodeClick(data) {
|
||||||
|
this.organizationForm = {
|
||||||
|
o_OrganCode: data.o_OrganCode,
|
||||||
|
ParentOrganName: data.label
|
||||||
|
}
|
||||||
|
this.propvalue = data.label
|
||||||
|
this.optionData = ''
|
||||||
|
this.$refs.customtable.clearRadioIndex()
|
||||||
|
this.$emit('handleNodeClick', data)
|
||||||
|
},
|
||||||
|
// 页数或每页条数更改时触发
|
||||||
|
pageChange() {
|
||||||
|
let pageModel ={
|
||||||
|
page: this.pageModel.pageIndex ? this.pageModel.pageIndex : 1,
|
||||||
|
limit: this.pageModel.pageSize? this.pageModel.pageSize : 10
|
||||||
|
}
|
||||||
|
this.$emit('onQuery', this.mergeParam(), pageModel)
|
||||||
|
},
|
||||||
|
mergeParam(state) {
|
||||||
|
|
||||||
|
if (state) {
|
||||||
|
this.pageModel.page = 1
|
||||||
|
}
|
||||||
|
let page = {
|
||||||
|
page: this.pageModel.page,
|
||||||
|
limit: this.pageModel.limit
|
||||||
|
}
|
||||||
|
for (let i in this.model) {
|
||||||
|
if (!this.model[i]) {
|
||||||
|
this.model[i] = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let search = Object.assign({}, page, this.model)
|
||||||
|
return Object.assign({}, page, this.model)
|
||||||
|
},
|
||||||
|
// 设置分页total值
|
||||||
|
setPageTotal(total) {
|
||||||
|
this.$set(this.pageModel, 'total', total)
|
||||||
|
},
|
||||||
|
//查询
|
||||||
|
search() {
|
||||||
|
this.$emit('getTableList', this.write)
|
||||||
|
},
|
||||||
|
radioChange(val) {
|
||||||
|
this.optionData = val
|
||||||
|
this.radio = val.index
|
||||||
|
},
|
||||||
|
reset() {
|
||||||
|
this.write = ''
|
||||||
|
this.radio = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
// this.$refs.choice.reset()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.treeBody {
|
.treeBody {
|
||||||
background-color: #f2f3f4;
|
background-color: #f2f3f4;
|
||||||
width: 25%;
|
width: 25%;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
height: calc(100vh - 360px);
|
height: calc(100vh - 360px);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* >>>.el-table__body-wrapper {
|
/* >>>.el-table__body-wrapper {
|
||||||
height: 300px !important;
|
height: 300px !important;
|
||||||
} */
|
} */
|
||||||
|
|
||||||
.app-container {
|
.app-container {
|
||||||
height: calc(100% - 52px);
|
height: calc(100% - 52px);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -89,6 +89,25 @@
|
||||||
<div v-if="row.tag === 'elLook'">
|
<div v-if="row.tag === 'elLook'">
|
||||||
{{ ruleForm[row.prop] }}
|
{{ ruleForm[row.prop] }}
|
||||||
</div>
|
</div>
|
||||||
|
<el-cascader class="w-100" v-if="row.tag === 'elCascader'"
|
||||||
|
v-model="ruleForm[row.prop]" :options="row.options"
|
||||||
|
:disabled="row.disabled ? row.disabled : false"
|
||||||
|
:show-all-levels="row.showAllLevels == false ? false : true"
|
||||||
|
:clearable="row.clearable ? row.clearable : true" @change="
|
||||||
|
cascaderChange(ruleForm[row.prop], row.options, row)
|
||||||
|
" :placeholder="!row.placeholder ? '请选择' : row.placeholder" :props="
|
||||||
|
row.props
|
||||||
|
? row.props
|
||||||
|
: { expandTrigger: 'hover', checkStrictly: true }
|
||||||
|
" popper-class="search_choose" ref="searchUnit" filterable>
|
||||||
|
<div slot-scope="{ data }" @click="clickNode" style="z-index: 99999"
|
||||||
|
v-if="row.props && row.props.label">
|
||||||
|
{{ data[row.props.label] }}
|
||||||
|
</div>
|
||||||
|
<div slot-scope="{ data }" @click="clickNode" style="z-index: 99999" v-else>
|
||||||
|
{{ data.label }}
|
||||||
|
</div>
|
||||||
|
</el-cascader>
|
||||||
<el-select class="w-100" v-model="ruleForm[row.prop]" filterable
|
<el-select class="w-100" v-model="ruleForm[row.prop]" filterable
|
||||||
@change="selectChange($event, index, indexRow, row.options,row)"
|
@change="selectChange($event, index, indexRow, row.options,row)"
|
||||||
:disabled="row.disabled?row.disabled:false"
|
:disabled="row.disabled?row.disabled:false"
|
||||||
|
@ -106,6 +125,8 @@
|
||||||
:clearable="row.clearable" :placeholder="!row.placeholder ? '请选择' : row.placeholder"
|
:clearable="row.clearable" :placeholder="!row.placeholder ? '请选择' : row.placeholder"
|
||||||
@change="selectChange($event, index, indexRow, row.options, row)"
|
@change="selectChange($event, index, indexRow, row.options, row)"
|
||||||
v-if="row.tag === 'elMultiple'"
|
v-if="row.tag === 'elMultiple'"
|
||||||
|
filterable
|
||||||
|
:multiple-limit="row.limit ? row.limit :0"
|
||||||
>
|
>
|
||||||
<el-option v-for="el in row.options" :key="!row.optionValue ? el['value'] : el[row.optionValue]"
|
<el-option v-for="el in row.options" :key="!row.optionValue ? el['value'] : el[row.optionValue]"
|
||||||
:label="!row.optionLabel ? el['label'] : el[row.optionLabel]"
|
:label="!row.optionLabel ? el['label'] : el[row.optionLabel]"
|
||||||
|
@ -217,6 +238,51 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
methods: {
|
methods: {
|
||||||
|
cascaderChange(val, options, row) {
|
||||||
|
console.log(row,'row')
|
||||||
|
let valLabel = "";
|
||||||
|
let obj = {}
|
||||||
|
function getLabelPath(el, data, path = []) {
|
||||||
|
for (let i = 0; i < data.length; i++) {
|
||||||
|
const item = data[i];
|
||||||
|
path.push(item[row.props.label]);
|
||||||
|
|
||||||
|
if (el === item[row.props.value]) {
|
||||||
|
obj = item
|
||||||
|
return [...path]; // 找到了
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item[row.props.children] && item[row.props.children].length > 0) {
|
||||||
|
const result = getLabelPath(el, item[row.props.children], path);
|
||||||
|
if (result) return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
path.pop(); // 回退
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 🧠 只处理最后一个值,不遍历 val(val 是一个“路径数组”)
|
||||||
|
const lastValue = Array.isArray(val) ? val[val.length - 1] : val;
|
||||||
|
|
||||||
|
const labelPath = getLabelPath(lastValue, options);
|
||||||
|
valLabel = labelPath ? labelPath.join('.') : '';
|
||||||
|
|
||||||
|
this.$emit("cascaderChange", val, options, row, valLabel,obj);
|
||||||
|
},
|
||||||
|
// 这行代码可复用
|
||||||
|
clickNode($event) {
|
||||||
|
console.log(123, "?");
|
||||||
|
console.log(
|
||||||
|
$event.target.parentElement.parentElement.firstElementChild,
|
||||||
|
"$event.target.parentElement.parentElement.firstElementChild"
|
||||||
|
);
|
||||||
|
$event.target.parentElement.parentElement.firstElementChild.click();
|
||||||
|
},
|
||||||
|
addHandle(){
|
||||||
|
|
||||||
|
},
|
||||||
changeRemind() {
|
changeRemind() {
|
||||||
this.$emit('changeRemind', this.ruleForm)
|
this.$emit('changeRemind', this.ruleForm)
|
||||||
},
|
},
|
||||||
|
@ -399,7 +465,7 @@ export default {
|
||||||
obj = item
|
obj = item
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.$emit('onSelect', val, index, indexRow, obj,options,this.ruleForm,row)
|
this.$emit('onSelect', val, index, indexRow, obj, options, this.ruleForm, row)
|
||||||
if (row.changeRemind) {
|
if (row.changeRemind) {
|
||||||
this.$emit('changeRemind', this.ruleForm)
|
this.$emit('changeRemind', this.ruleForm)
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @author: Zhangpengcheng
|
* @author: Zhangpengcheng
|
||||||
* @date: 2022-08-30
|
* @date: 2022-08-30
|
||||||
* tabLoading 加载 headerStyle表头格式 tableData数据 border纵向边框 @current-change单选触发 summary-method合计 @cell-click某个单元格点击触发事件 @sort-change触发后台排序
|
* tabLoading 加载 headerStyle表头格式 tableData数据 border纵向边框 @current-change单选触发 summary-method合计 @cell-click某个单元格点击触发事件 @sort-change触发后台排序
|
||||||
* @row-click 当某一行被点击时会触发该事件 highlight-current-row是否高亮 show-summary是否合计 SummariesIndex合计需要的index @selection-change多选 tableHeight高度
|
* @row-click 当某一行被点击时会触发该事件 highlight-current-row是否高亮 show-summary是否合计 SummariesIndex合计需要的index @selection-change多选 tableHeight高度
|
||||||
* :style="'height:'+ tableHeight + '!important'"
|
* :style="'height:'+ tableHeight + '!important'"
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
|
@ -179,6 +179,9 @@
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
v4 as uuidv4
|
||||||
|
} from 'uuid'
|
||||||
import Sortable from "sortablejs";
|
import Sortable from "sortablejs";
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
|
@ -347,7 +350,7 @@ export default {
|
||||||
})
|
})
|
||||||
this.$emit("select", selection, row, flag);
|
this.$emit("select", selection, row, flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
selectAll(selection) {
|
selectAll(selection) {
|
||||||
this.$emit("selectAll", selection);
|
this.$emit("selectAll", selection);
|
||||||
|
@ -399,7 +402,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 保存选中的数据id,row-key就是要指定一个key标识这一行的数据
|
// 保存选中的数据id,row-key就是要指定一个key标识这一行的数据
|
||||||
getRowKey(row) {
|
getRowKey(row) {
|
||||||
return row.id;
|
return row.id ? row.id : uuidv4()
|
||||||
},
|
},
|
||||||
// 多选事件
|
// 多选事件
|
||||||
handleSelectionChange(selectTable) {
|
handleSelectionChange(selectTable) {
|
||||||
|
|
|
@ -1,101 +1,357 @@
|
||||||
|
<!--
|
||||||
|
* @name: 弹窗配置
|
||||||
|
* @author: zhangpengcheng
|
||||||
|
* @date: 2022-08-25
|
||||||
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<!-- 权限设置弹框 -->
|
||||||
<div v-for="(item, index) in parentTreeData" :key="index" class="classifyButtonList">
|
<!-- :style="{'margin':isCenter?'auto':''}"> -->
|
||||||
<div flex="cross:center" flex-wrap style="height: 100%;">
|
|
||||||
<div class="title">
|
|
||||||
<!-- <i class="el-icon-caret-bottom" @click="showHidden(item, index)"></i> -->
|
|
||||||
<i v-if="item.children" :class="item.isShow?'el-icon-caret-top':'el-icon-caret-bottom'"@click="showHidden(item, index)"></i>
|
|
||||||
<!-- <el-checkbox v-model="item.checked">{{item.label}}</el-checkbox> -->
|
|
||||||
{{item.label}}
|
|
||||||
</div>
|
|
||||||
<div flex flex-wrap="cross:center" style="width: 79%;">
|
|
||||||
<p class="recordText" v-for="(el,index) in item.buttonList">{{el.NameCN}}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<menu-tree v-if="item.isShow && item.children" :parent-tree-data="item.children"></menu-tree>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
|
<div v-loading="treeLoading" flex style="margin: auto; height: 100%">
|
||||||
|
<div class="menu-i" flex="cross:center main:center">
|
||||||
|
<div class="menu-i-t" flex="cross:top main:justify">
|
||||||
|
<el-tree
|
||||||
|
:data="menuData"
|
||||||
|
:check-strictly="true"
|
||||||
|
:current-node-key="currentNodeKey"
|
||||||
|
:default-checked-keys="selectData"
|
||||||
|
@node-click="handleNodeClick"
|
||||||
|
:expand-on-click-node="false"
|
||||||
|
:default-expand-all="expandAll"
|
||||||
|
:key="keyWord ? keyWord :new Date().getTime()"
|
||||||
|
:props="treeProps"
|
||||||
|
style="width: 100%; background-color: white; height: 100%"
|
||||||
|
@check-change="checkChange"
|
||||||
|
:default-expanded-keys="defaultExpandedKeys"
|
||||||
|
node-key="pkAccsubj"
|
||||||
|
ref="elTree"
|
||||||
|
:show-checkbox="showCheckbox"
|
||||||
|
>
|
||||||
|
</el-tree>
|
||||||
|
<div @click="changePcAll" class="checkText" v-if="Allshow">全选</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div flex="cross:center main:center" style="width: 100%" v-if="isSaveBtn">
|
||||||
|
<el-button style="width: 40%" type="primary" @click="saveMenuUser"
|
||||||
|
>保存
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
// import { queryMenuList, menuListSave } from '@/api/apis/auth'
|
||||||
name: "menuTree",
|
export default {
|
||||||
props: {
|
props: {
|
||||||
parentTreeData: {
|
// 是否默认展开所有节点
|
||||||
type: Array,
|
expandAll: {
|
||||||
default: () => {
|
type: Boolean,
|
||||||
return []
|
default: true,
|
||||||
}
|
},
|
||||||
},
|
// 是否显示保存按钮
|
||||||
},
|
isSaveBtn: {
|
||||||
methods: {
|
type: Boolean,
|
||||||
// 展开或者隐藏下级目录
|
default: false,
|
||||||
showHidden(item, index) {
|
},
|
||||||
// this.parentTreeData.forEach(value => {
|
// 是否显示全选按钮
|
||||||
// // parentTreeData[i]的show属性不等于当前数据的isShow属性那么menuList[i]等于false
|
Allshow: {
|
||||||
// if (value.isShow !== this.parentTreeData[index].isShow) {
|
type: Boolean,
|
||||||
// value.isShow = false;
|
default: false,
|
||||||
// }
|
},
|
||||||
// });
|
// 是否显示多选按钮
|
||||||
item.isShow = !item.isShow;
|
showCheckbox: {
|
||||||
this.$forceUpdate()
|
type: Boolean,
|
||||||
},
|
default: false,
|
||||||
setCheck(menuIDs){
|
},
|
||||||
this.setButtonName(this.parentTreeData,menuIDs)
|
// 是否居中
|
||||||
// this.$forceUpdate()
|
isCenter: {
|
||||||
},
|
type: Boolean,
|
||||||
setButtonName(menuData,data) {
|
default: true,
|
||||||
menuData.forEach((el, index) => {
|
},
|
||||||
data.forEach(item=>{
|
currentNodeKey: {
|
||||||
if (el.id == item) {
|
type: [String, Number],
|
||||||
el.checked = true
|
default: '',
|
||||||
}
|
},
|
||||||
})
|
keyWord: {
|
||||||
if (el.children != null && el.children && el.children.length) {
|
type: [String, Number],
|
||||||
this.setButtonName(el.children,data)
|
default: '',
|
||||||
}
|
},
|
||||||
})
|
menuData: {
|
||||||
},
|
type: Array,
|
||||||
}
|
default: () => {
|
||||||
}
|
return [];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
defaultExpandedKeys: {
|
||||||
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return [];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
defaultCheckedKeys: {
|
||||||
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return [];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
setting: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
treeProps: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {
|
||||||
|
children: "children",
|
||||||
|
label: "label",
|
||||||
|
value:'id',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
theme: "",
|
||||||
|
powerDlog: false,
|
||||||
|
// 菜单数据
|
||||||
|
// menuData: [],
|
||||||
|
// 回显选中ids
|
||||||
|
selectData: [],
|
||||||
|
// 树状图设置
|
||||||
|
// treeProps: {
|
||||||
|
// label: 'menuName',
|
||||||
|
// children: 'id',
|
||||||
|
// },
|
||||||
|
|
||||||
|
// PC菜单全选
|
||||||
|
checkedAllPc: false,
|
||||||
|
// 防连点
|
||||||
|
outing: false,
|
||||||
|
treeLoading: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
defaultTheme() {
|
||||||
|
return this.$store.state.settings.theme;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
defaultTheme: {
|
||||||
|
handler: function (val, oldVal) {
|
||||||
|
this.theme = val;
|
||||||
|
// document.getElementsByTagName('body')[0].style.setProperty('--active', val)
|
||||||
|
|
||||||
|
// let arr = document.getElementsByClassName('.el-tree-node:focus>.el-tree-node__content')
|
||||||
|
// $('.el-tree-node:focus>.el-tree-node__content').css('color',val)
|
||||||
|
},
|
||||||
|
immediate: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//选中第一个
|
||||||
|
clickFirst() {
|
||||||
|
document.querySelectorAll(".is-focusable")[0].click();
|
||||||
|
},
|
||||||
|
buttonL(el) {
|
||||||
|
el.active = !el.active;
|
||||||
|
this.$forceUpdate();
|
||||||
|
},
|
||||||
|
setData(id) {
|
||||||
|
this.selectData.push(id);
|
||||||
|
},
|
||||||
|
saveMenuUser() {
|
||||||
|
let allKeys = this.getKey();
|
||||||
|
this.$emit("onSaveMenu", allKeys);
|
||||||
|
},
|
||||||
|
// 获取选中的key值
|
||||||
|
getKey() {
|
||||||
|
return this.$refs.elTree.getCheckedKeys();
|
||||||
|
},
|
||||||
|
clearKey() {
|
||||||
|
// this.nodeKey = new Date().getTime(); // 更新node-key,清空选中状态
|
||||||
|
this.$refs.elTree.store.nodesMap = {}; // 清空nodesMap,移除高亮
|
||||||
|
this.$forceUpdate(); // 强制更新,使组件重新渲染
|
||||||
|
// const nodes = this.$refs.tree.getNodes();
|
||||||
|
// nodes.forEach(node => {
|
||||||
|
// node.checked = false;
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
// 初始数据
|
||||||
|
initData() {
|
||||||
|
// 菜单数据
|
||||||
|
// this.menuData = [];
|
||||||
|
|
||||||
|
// 回显选中ids
|
||||||
|
this.selectData = [];
|
||||||
|
},
|
||||||
|
// 关闭弹窗
|
||||||
|
handleClose() {
|
||||||
|
this.powerDlog = false;
|
||||||
|
this.initData();
|
||||||
|
},
|
||||||
|
// 全选、反选
|
||||||
|
changePcAll() {
|
||||||
|
this.checkedAllPc = !this.checkedAllPc;
|
||||||
|
let selectData = [];
|
||||||
|
if (this.checkedAllPc) {
|
||||||
|
selectData = this.cycleData(this.menuData);
|
||||||
|
}
|
||||||
|
this.selectData = selectData;
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* @description 递归获取菜单id(树状 多叉树结构)
|
||||||
|
* @author duanyipeng
|
||||||
|
* @createDate 2020/7/31 20:54
|
||||||
|
* @param {Array} outData 需要递归的数组
|
||||||
|
* @param {Boolean} isSelect: false返回所有id,true返回已选择id
|
||||||
|
*/
|
||||||
|
cycleData(outData, isSelect) {
|
||||||
|
let newData = [];
|
||||||
|
|
||||||
|
function cycle(data) {
|
||||||
|
if (!data || data.length == 0) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
for (var i = 0, len = data.length; i < len; i++) {
|
||||||
|
let item = data[i];
|
||||||
|
if (isSelect && item.selected == 1) {
|
||||||
|
newData.push(item.id);
|
||||||
|
}
|
||||||
|
if (!isSelect) {
|
||||||
|
newData.push(item.id);
|
||||||
|
}
|
||||||
|
cycle(item.id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
cycle(outData);
|
||||||
|
return newData;
|
||||||
|
},
|
||||||
|
getData(childIds) {
|
||||||
|
let newData = [];
|
||||||
|
|
||||||
|
function cycle(data) {
|
||||||
|
data.forEach((el) => {
|
||||||
|
childIds.forEach((item) => {
|
||||||
|
if (el.id == item) {
|
||||||
|
newData.push(el);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (el.children != null && el.children && el.children.length) {
|
||||||
|
cycle(el.children, childIds);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
cycle(this.menuData, childIds);
|
||||||
|
return newData;
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* @description 节点选中状态发生变化时的回调
|
||||||
|
* @author duanyipeng
|
||||||
|
* @createDate 2020/7/31 20:53
|
||||||
|
* @param { Object } nodeDode 当前节点对象
|
||||||
|
* @param { Boolean } checked 当前节点是否选中
|
||||||
|
*/
|
||||||
|
checkChange(nodeDode, checked) {
|
||||||
|
let getHalfCheckedKeys = this.$refs.elTree
|
||||||
|
.getCheckedKeys()
|
||||||
|
.concat(this.$refs.elTree.getHalfCheckedKeys());
|
||||||
|
// let getHalfCheckedKeys = this.$refs.elTree.getHalfCheckedKeys()
|
||||||
|
let nodeList = this.$refs.elTree.getCheckedNodes();
|
||||||
|
let childIds =
|
||||||
|
getHalfCheckedKeys.length != 0 ? getHalfCheckedKeys : this.selectData;
|
||||||
|
let checkdata = this.getData(childIds);
|
||||||
|
this.$emit("checkChange", childIds, checkdata, nodeList);
|
||||||
|
return;
|
||||||
|
|
||||||
|
let id = nodeDode.id;
|
||||||
|
// let childIds = this.cycleData(id)
|
||||||
|
console.log(id);
|
||||||
|
// 循环设置子项是否选中
|
||||||
|
childIds.forEach((item) => {
|
||||||
|
this.$refs.elTree.setChecked(item, checked);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 点击事件
|
||||||
|
handleNodeClick(data) {
|
||||||
|
this.$emit("handleNodeClick", data);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
$activeColor: var(--bg-color, "#00aaff");
|
// $activeColor:val(--activeColor, "#00aaff");
|
||||||
|
|
||||||
.el-icon-star-on {
|
.el-tree-node__content {
|
||||||
/* color: #00aa00; */
|
height: 32px !important;
|
||||||
color: $activeColor;
|
}
|
||||||
}
|
|
||||||
.recordText {
|
.el-tree-node__label {
|
||||||
border: 1px solid #fff;
|
font-size: 14px !important;
|
||||||
padding: 3px 10px;
|
margin-left: 4px;
|
||||||
text-align: center;
|
}
|
||||||
font-size: 14px;
|
|
||||||
cursor: pointer;
|
.el-tree-node__content > label.el-checkbox {
|
||||||
background: #f2f2f2;
|
transform: scale(1.3);
|
||||||
color: #4e4e4e;
|
}
|
||||||
margin:5px;
|
|
||||||
border-radius: 5px;
|
.el-tree-node__content > .el-tree-node__expand-icon {
|
||||||
}
|
font-size: 18px;
|
||||||
|
}
|
||||||
.recordText.active {
|
|
||||||
background-color: $activeColor;
|
.el-checkbox__label {
|
||||||
color: white;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.checkBox .el-checkbox__inner {
|
||||||
|
transform: scale(1.3);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<style scoped lang="scss">
|
<style lang="scss" scoped>
|
||||||
.tree-div {
|
.menu-i {
|
||||||
|
width: 100%;
|
||||||
|
// margin-bottom: 24px;
|
||||||
|
|
||||||
}
|
&-f {
|
||||||
.classifyButtonList{
|
color: #333;
|
||||||
// margin-bottom: 10px;
|
font-size: 18px;
|
||||||
padding: 0 0 0 10px;
|
text-align: center;
|
||||||
// cursor: pointer;
|
margin-bottom: 12px;
|
||||||
line-height: 25px;
|
}
|
||||||
.title{
|
|
||||||
// text-align: right;
|
|
||||||
// width: 20%;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
&-t {
|
||||||
</style>
|
width: 100%;
|
||||||
|
// height: 450px;
|
||||||
|
// border: 1px solid #d8d8d8;
|
||||||
|
overflow-y: auto;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkBox {
|
||||||
|
margin-top: 6px;
|
||||||
|
margin-right: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkText {
|
||||||
|
width: 60px;
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
text-align: center;
|
||||||
|
color: #333;
|
||||||
|
font-size: 16px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.3s ease-in-out;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: #4570fc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -36,7 +36,7 @@ export function openLoading(loadingName='加载中') {
|
||||||
})
|
})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
appLoading.close();
|
appLoading.close();
|
||||||
}, 10000)
|
}, 1000000)
|
||||||
}
|
}
|
||||||
export function closeLoading() {
|
export function closeLoading() {
|
||||||
if (appLoading) {
|
if (appLoading) {
|
||||||
|
|
|
@ -17,6 +17,14 @@ export function getNowTime() {
|
||||||
|
|
||||||
return nowTime;
|
return nowTime;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 根据数组对象的某个字段去重
|
||||||
|
* item.name 是[{name:1}] 根据每条数据的name值来去重
|
||||||
|
* */
|
||||||
|
export function unique(arr, val) {
|
||||||
|
const res = new Map();
|
||||||
|
return arr.filter(item => !res.has(item[val]) && res.set(item[val], 1))
|
||||||
|
}
|
||||||
export function getEditHtml(str) {
|
export function getEditHtml(str) {
|
||||||
if (!str) {
|
if (!str) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -0,0 +1,634 @@
|
||||||
|
<template>
|
||||||
|
<div class="recordContrast">
|
||||||
|
<div class="left">
|
||||||
|
<div class="leftTitle" style="display: flex;align-items: center;justify-content: space-between">
|
||||||
|
<div>单据类型</div>
|
||||||
|
<div class="icon" style="cursor: pointer" @click="rightAddHandle()">
|
||||||
|
<i class="el-icon-plus"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="showList">
|
||||||
|
<div class="showItem" v-for="(item,index) in billTypeList" :key="index"
|
||||||
|
:class="{active:item.id === billTypeClickID}" @click="billTypeClickHandle(item.id,item.name)"
|
||||||
|
>
|
||||||
|
<div class="name">{{ item.name }}</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="el-icon-edit" @click.stop="editRightTitle(item)" style="margin-right: 10px"></i>
|
||||||
|
<i class="el-icon-delete" style="color: red" @click.stop="delRightTitle(item)"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="right">
|
||||||
|
<div class="topBox">
|
||||||
|
<div class="searchBox">
|
||||||
|
<div>
|
||||||
|
<el-input v-model="searchObj.sourceAppName" :placeholder="'来源应用'" @keydown.native.enter="resetTable"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-input v-model="searchObj.targetAppName" :placeholder="'目标应用'" @keydown.native.enter="resetTable"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-input v-model="searchObj.sourceAppCode" :placeholder="'来源应用编码'" @keydown.native.enter="resetTable"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-input v-model="searchObj.targetAppCode" :placeholder="'目标应用编码'" @keydown.native.enter="resetTable"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="btnBox">
|
||||||
|
<el-button type="primary" size="small" icon="el-icon-search" @click="resetTable">查询</el-button>
|
||||||
|
<el-button type="primary" size="small" icon="el-icon-refresh" @click="refresh">重置</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="display: flex;align-items: center;justify-content: flex-end;">
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
:icon="item.icon"
|
||||||
|
@click="clickSave(item)"
|
||||||
|
:type="item.type ? item.type : 'primary'"
|
||||||
|
v-for="(item, index) in nowBtns"
|
||||||
|
:key="index"
|
||||||
|
>{{ item.menuName }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="table">
|
||||||
|
<base-table ref="customtable" :showIndex="false" :slotrow="true"
|
||||||
|
tableHeight="calc(100vh - 170px)" :tableData="tableData" :tableColumn="tableColumn"
|
||||||
|
@radioChange="radioChange" id="printMe"
|
||||||
|
>
|
||||||
|
</base-table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="page">
|
||||||
|
<base-page :pageSizesList="[20,50,100,150]" :pageModel.sync="pageModel" @onPageChange="pageChange"
|
||||||
|
layout="total, sizes,prev, pager, next,jumper"
|
||||||
|
></base-page>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<base-right-dialog
|
||||||
|
@handleClose="examineOperateDialog = false"
|
||||||
|
@handleConfirmClick="handleConfirmClick"
|
||||||
|
:dialogVisible="examineOperateDialog"
|
||||||
|
size="900px"
|
||||||
|
:appendBody="true"
|
||||||
|
:loading="true"
|
||||||
|
:footerShow="true"
|
||||||
|
:submitShow="true"
|
||||||
|
:title="dialogTitle +'档案对照'"
|
||||||
|
submitTitle="保存"
|
||||||
|
>
|
||||||
|
<div class="rightDialogClass_main" style="background-color: #fff;" v-if="examineOperateDialog">
|
||||||
|
<base-form
|
||||||
|
ref="basicFormRefsName"
|
||||||
|
:formRow="basicFormForm"
|
||||||
|
:isFunBtn="false"
|
||||||
|
:spanWidth="'100px'"
|
||||||
|
justifyContent="flex-end"
|
||||||
|
:rules="basicFormRulers"
|
||||||
|
@onSelect="onSelect"
|
||||||
|
:view-status="statusView"
|
||||||
|
>
|
||||||
|
</base-form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</base-right-dialog>
|
||||||
|
<base-dialog
|
||||||
|
:dialogVisible.sync="passwordDialogShow"
|
||||||
|
:closeModal="false"
|
||||||
|
:footerShow="true"
|
||||||
|
:title="passwordDialogTitle+'单据类型'"
|
||||||
|
width="400px"
|
||||||
|
top="20vh"
|
||||||
|
@handleConfirmClick="passwordChangeHandle"
|
||||||
|
>
|
||||||
|
<div class="rightDialogClass_main" style="background-color: #fff;">
|
||||||
|
<div class="addDialog">
|
||||||
|
<div class="nameTitle">单据类型名称:</div>
|
||||||
|
<el-input v-model="billTypeADDName"></el-input>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</base-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
DelArcCompareDataAPI,
|
||||||
|
DelArcTypeDataAPI,
|
||||||
|
GetArcCompareList,
|
||||||
|
GetArcCompareListAPI,
|
||||||
|
GetArcTypeListAPI,
|
||||||
|
GetBillListAPI,
|
||||||
|
GetLoginUserButtonsAPI, SaveArcCompareDataAPI, SaveArcTypeDataAPI
|
||||||
|
} from '@/api/apis/buttonList'
|
||||||
|
import basePage from '@/components/base/basePage/index.vue'
|
||||||
|
import baseChoice from '@/components/base/baseChoice/index.vue'
|
||||||
|
import baseDialog from '@/components/base/BaseNewDialog/index.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'recordContrast',
|
||||||
|
components: { baseDialog, baseChoice, basePage },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
basicFormForm: [
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
label: '档案类型',
|
||||||
|
prop: 'arcTypeName',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 24,
|
||||||
|
disabled: true,
|
||||||
|
placeholder: '自动带出'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源应用编码',
|
||||||
|
prop: 'sourceAppCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
disabled: true,
|
||||||
|
placeholder: '自动带出'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源应用名称',
|
||||||
|
prop: 'sourceAppID',
|
||||||
|
tag: 'elSelect',
|
||||||
|
options: [],
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请选择'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源数据名称',
|
||||||
|
prop: 'sourceDataName',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请输入'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源数据编码',
|
||||||
|
prop: 'sourceDataCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请输入'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标应用编码',
|
||||||
|
prop: 'targetAppCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
disabled: true,
|
||||||
|
placeholder: '自动带出'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标应用名称',
|
||||||
|
prop: 'targetAppID',
|
||||||
|
tag: 'elSelect',
|
||||||
|
options: [],
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请选择'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标数据名称',
|
||||||
|
prop: 'targetDataName',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请输入'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标数据编码',
|
||||||
|
prop: 'targetDataCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请输入'
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
basicFormRulers: {
|
||||||
|
sourceAppCode: [
|
||||||
|
{ required: true, message: '请选择来源应用', trigger: 'change' }
|
||||||
|
],
|
||||||
|
sourceAppID: [
|
||||||
|
{ required: true, message: '请选择来源应用', trigger: 'change' }
|
||||||
|
],
|
||||||
|
sourceDataName: [
|
||||||
|
{ required: true, message: '请输入来源数据名称', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
sourceDataCode: [
|
||||||
|
{ required: true, message: '请输入来源数据编码', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
targetAppCode: [
|
||||||
|
{ required: true, message: '请选择目标应用', trigger: 'change' }
|
||||||
|
],
|
||||||
|
targetAppID: [
|
||||||
|
{ required: true, message: '请选择目标应用', trigger: 'change' }
|
||||||
|
],
|
||||||
|
targetDataName: [
|
||||||
|
{ required: true, message: '请输入目标数据名称', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
targetDataCode: [
|
||||||
|
{ required: true, message: '请输入目标数据编码', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
nowBtns: [],
|
||||||
|
billTypeName: '',
|
||||||
|
billTypeClickID: '',
|
||||||
|
billTypeClickName: '',
|
||||||
|
billTypeList: [
|
||||||
|
{
|
||||||
|
name: '人员对照',
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '人员对照',
|
||||||
|
id: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '人员对照',
|
||||||
|
id: 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '人员对照',
|
||||||
|
id: 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
searchObj: {},
|
||||||
|
pageModel: {
|
||||||
|
page: 1, //当前页码
|
||||||
|
limit: 20 //每页显示多少
|
||||||
|
},
|
||||||
|
selected: [],
|
||||||
|
|
||||||
|
tableColumn: [
|
||||||
|
{
|
||||||
|
label: '档案类型',
|
||||||
|
prop: 'arcTypeName',
|
||||||
|
width: '150px'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源应用',
|
||||||
|
prop: 'sourceAppName',
|
||||||
|
width: '150px'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源数据编码',
|
||||||
|
prop: 'sourceDataCode',
|
||||||
|
width: '150px'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源数据名称',
|
||||||
|
prop: 'sourceDataName'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标应用',
|
||||||
|
prop: 'targetAppName',
|
||||||
|
width: '150px'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标数据编码',
|
||||||
|
prop: 'targetDataCode',
|
||||||
|
width: '150px'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标数据名称',
|
||||||
|
prop: 'targetDataName'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
tableData: [],
|
||||||
|
dialogTitle: '新增',
|
||||||
|
examineOperateDialog: false,
|
||||||
|
statusView: false,
|
||||||
|
passwordDialogShow: false,
|
||||||
|
passwordDialogTitle: '新增',
|
||||||
|
billTypeADDName: '',
|
||||||
|
billTypeADDID: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
delRightTitle(item) {
|
||||||
|
this.$confirm('确认删除吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(async() => {
|
||||||
|
const res = await DelArcTypeDataAPI({
|
||||||
|
arcTypeID: item.id
|
||||||
|
})
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.$vmNews('删除成功', 'success')
|
||||||
|
this.billTypeClickName = ''
|
||||||
|
this.billTypeClickID = ''
|
||||||
|
this.getLeftList()
|
||||||
|
this.resetTable()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
editRightTitle(item) {
|
||||||
|
this.billTypeADDName = item.name
|
||||||
|
this.billTypeADDID = item.id
|
||||||
|
this.passwordDialogTitle = '编辑'
|
||||||
|
this.passwordDialogShow = true
|
||||||
|
},
|
||||||
|
rightAddHandle() {
|
||||||
|
this.passwordDialogShow = true
|
||||||
|
this.passwordDialogTitle = '新增'
|
||||||
|
this.billTypeADDName = ''
|
||||||
|
this.billTypeADDID = ''
|
||||||
|
},
|
||||||
|
async passwordChangeHandle() {
|
||||||
|
if (!this.billTypeADDName) {
|
||||||
|
this.$vmNews('请输入单据类型名称')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let params = {
|
||||||
|
dataMain: {
|
||||||
|
'arcTypeName': this.billTypeADDName
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.passwordDialogTitle === '编辑') {
|
||||||
|
params.dataMain.arcTypeID = this.billTypeADDID
|
||||||
|
}
|
||||||
|
const res = await SaveArcTypeDataAPI(params)
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.$vmNews('保存成功', 'success')
|
||||||
|
this.passwordDialogShow = false
|
||||||
|
this.getLeftList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getSelect() {
|
||||||
|
const res = await GetBillListAPI({
|
||||||
|
page: 1,
|
||||||
|
limit: 9999
|
||||||
|
})
|
||||||
|
res.data[1].forEach(item => {
|
||||||
|
item.label = item.appName
|
||||||
|
item.value = item.appID
|
||||||
|
})
|
||||||
|
this.basicFormForm[0].elCol[2].options = res.data[1]
|
||||||
|
this.basicFormForm[0].elCol[6].options = res.data[1]
|
||||||
|
},
|
||||||
|
async getLeftList() {
|
||||||
|
const res = await GetArcTypeListAPI({
|
||||||
|
arcTypeName: this.billTypeName
|
||||||
|
})
|
||||||
|
res.data[0].forEach((el) => {
|
||||||
|
el.name = el.arcTypeName
|
||||||
|
el.id = el.arcTypeID
|
||||||
|
})
|
||||||
|
this.billTypeList = res.data[0]
|
||||||
|
},
|
||||||
|
onSelect(val, index, indexRow, obj, row, form) {
|
||||||
|
if (row.prop === 'sourceAppID') {
|
||||||
|
this.$set(this.$refs.basicFormRefsName.ruleForm, 'sourceAppCode', obj.appCode)
|
||||||
|
}
|
||||||
|
if (row.prop === 'targetAppID') {
|
||||||
|
this.$set(this.$refs.basicFormRefsName.ruleForm, 'targetAppCode', obj.appCode)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async handleConfirmClick() {
|
||||||
|
await this.$refs.basicFormRefsName.$refs.ruleForm.validate()
|
||||||
|
const res = await SaveArcCompareDataAPI({
|
||||||
|
dataMain: {
|
||||||
|
...this.$refs.basicFormRefsName.ruleForm
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.$vmNews('保存成功', 'success')
|
||||||
|
this.examineOperateDialog = false
|
||||||
|
this.resetTable()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pageChange(model) {
|
||||||
|
this.pageModel.page = model.page
|
||||||
|
this.pageModel.limit = model.limit
|
||||||
|
this.getTableData()
|
||||||
|
},
|
||||||
|
async getTableData() {
|
||||||
|
const res = await GetArcCompareList({
|
||||||
|
...this.pageModel,
|
||||||
|
...this.searchObj,
|
||||||
|
arcTypeID: this.billTypeClickID
|
||||||
|
})
|
||||||
|
this.pageModel.total = res.data[0]
|
||||||
|
this.tableData = res.data[1]
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.customtable.clearRadioIndex()
|
||||||
|
this.selected = []
|
||||||
|
})
|
||||||
|
},
|
||||||
|
resetTable() {
|
||||||
|
this.tableData = []
|
||||||
|
this.pageModel.page = 1
|
||||||
|
this.selected = []
|
||||||
|
this.getTableData()
|
||||||
|
},
|
||||||
|
// 点击某条数据
|
||||||
|
radioChange(val) {
|
||||||
|
this.selected = []
|
||||||
|
this.selected.push(val)
|
||||||
|
},
|
||||||
|
// 删除
|
||||||
|
delOperate() {
|
||||||
|
if (!this.selected.length) {
|
||||||
|
this.$vmNews('请至少选择一条数据')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$confirm('确认删除吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(async() => {
|
||||||
|
const res = await DelArcCompareDataAPI({
|
||||||
|
arcCompareID: this.selected[0].arcCompareID
|
||||||
|
})
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.$vmNews('删除成功', 'success')
|
||||||
|
this.resetTable()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 编辑
|
||||||
|
editOperate() {
|
||||||
|
if (!this.selected.length) {
|
||||||
|
this.$vmNews('请至少选择一条数据')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.dialogTitle = '编辑'
|
||||||
|
this.examineOperateDialog = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.basicFormRefsName.ruleForm = {
|
||||||
|
...this.selected[0]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//新增
|
||||||
|
Operate() {
|
||||||
|
if (!this.billTypeClickName) {
|
||||||
|
this.$vmNews('请选择单据类型')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.dialogTitle = '新增'
|
||||||
|
this.examineOperateDialog = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$set(this.$refs.basicFormRefsName.ruleForm, 'arcTypeName', this.billTypeClickName)
|
||||||
|
this.$set(this.$refs.basicFormRefsName.ruleForm, 'arcTypeID', this.billTypeClickID)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
refresh() {
|
||||||
|
this.searchObj = {}
|
||||||
|
},
|
||||||
|
//获取按钮(头部)
|
||||||
|
async buttonPermissions() {
|
||||||
|
const res = await GetLoginUserButtonsAPI({
|
||||||
|
page: 1, //当前页码
|
||||||
|
limit: 999, //每页显示多少
|
||||||
|
menuId: this.$route.meta.id, //树形分类id
|
||||||
|
Sequence: '', //排列方式
|
||||||
|
SequenceName: '', //需要排列的字段名
|
||||||
|
route: this.$route.path
|
||||||
|
})
|
||||||
|
if (res.code == 1) {
|
||||||
|
res.data[0].forEach((el) => {
|
||||||
|
el.menuName = el.nameCN
|
||||||
|
el.icon = el.icoName
|
||||||
|
el.type = el.style
|
||||||
|
el.name = el.nameCN
|
||||||
|
})
|
||||||
|
this.nowBtns = res.data[0]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
billTypeClickHandle(id, name) {
|
||||||
|
this.billTypeClickID = id
|
||||||
|
this.billTypeClickName = name
|
||||||
|
this.resetTable()
|
||||||
|
},
|
||||||
|
//头部按钮统一调用方法
|
||||||
|
clickSave(item) {
|
||||||
|
this[item.btnFunction]()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.buttonPermissions()
|
||||||
|
this.getLeftList()
|
||||||
|
this.getTableData()
|
||||||
|
this.getSelect()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.addDialog {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.nameTitle {
|
||||||
|
padding: 10px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333;
|
||||||
|
margin-right: 10px;
|
||||||
|
width: 180px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.recordContrast {
|
||||||
|
display: flex;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
|
||||||
|
.left {
|
||||||
|
width: 270px;
|
||||||
|
padding: 10px;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-right: 5px;
|
||||||
|
|
||||||
|
.leftTitle {
|
||||||
|
color: #333;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
flex: 1;
|
||||||
|
padding: 10px;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
.topBox {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.searchBox {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
> div {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.table {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.searchBtn {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
|
margin-top: 20px;
|
||||||
|
|
||||||
|
.input {
|
||||||
|
flex: 1;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.showList {
|
||||||
|
height: calc(100vh - 200px);
|
||||||
|
overflow: auto;
|
||||||
|
margin-top: 10px;
|
||||||
|
|
||||||
|
.showItem {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 10px 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #ebeced;
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
background-color: #ebeced !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,634 @@
|
||||||
|
<template>
|
||||||
|
<div class="recordContrast">
|
||||||
|
<div class="left">
|
||||||
|
<div class="leftTitle" style="display: flex;align-items: center;justify-content: space-between">
|
||||||
|
<div>单据类型</div>
|
||||||
|
<div class="icon" style="cursor: pointer" @click="rightAddHandle()">
|
||||||
|
<i class="el-icon-plus"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="showList">
|
||||||
|
<div class="showItem" v-for="(item,index) in billTypeList" :key="index"
|
||||||
|
:class="{active:item.id === billTypeClickID}" @click="billTypeClickHandle(item.id,item.name)"
|
||||||
|
>
|
||||||
|
<div class="name">{{ item.name }}</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="el-icon-edit" @click.stop="editRightTitle(item)" style="margin-right: 10px"></i>
|
||||||
|
<i class="el-icon-delete" style="color: red" @click.stop="delRightTitle(item)"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="right">
|
||||||
|
<div class="topBox">
|
||||||
|
<div class="searchBox">
|
||||||
|
<div>
|
||||||
|
<el-input v-model="searchObj.sourceAppName" :placeholder="'来源应用'" @keydown.native.enter="resetTable"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-input v-model="searchObj.targetAppName" :placeholder="'目标应用'" @keydown.native.enter="resetTable"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-input v-model="searchObj.sourceAppCode" :placeholder="'来源应用编码'" @keydown.native.enter="resetTable"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-input v-model="searchObj.targetAppCode" :placeholder="'目标应用编码'" @keydown.native.enter="resetTable"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="btnBox">
|
||||||
|
<el-button type="primary" size="small" icon="el-icon-search" @click="resetTable">查询</el-button>
|
||||||
|
<el-button type="primary" size="small" icon="el-icon-refresh" @click="refresh">重置</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="display: flex;align-items: center;justify-content: flex-end;">
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
:icon="item.icon"
|
||||||
|
@click="clickSave(item)"
|
||||||
|
:type="item.type ? item.type : 'primary'"
|
||||||
|
v-for="(item, index) in nowBtns"
|
||||||
|
:key="index"
|
||||||
|
>{{ item.menuName }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="table">
|
||||||
|
<base-table ref="customtable" :showIndex="false" :slotrow="true"
|
||||||
|
tableHeight="calc(100vh - 170px)" :tableData="tableData" :tableColumn="tableColumn"
|
||||||
|
@radioChange="radioChange" id="printMe"
|
||||||
|
>
|
||||||
|
</base-table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="page">
|
||||||
|
<base-page :pageSizesList="[20,50,100,150]" :pageModel.sync="pageModel" @onPageChange="pageChange"
|
||||||
|
layout="total, sizes,prev, pager, next,jumper"
|
||||||
|
></base-page>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<base-right-dialog
|
||||||
|
@handleClose="examineOperateDialog = false"
|
||||||
|
@handleConfirmClick="handleConfirmClick"
|
||||||
|
:dialogVisible="examineOperateDialog"
|
||||||
|
size="900px"
|
||||||
|
:appendBody="true"
|
||||||
|
:loading="true"
|
||||||
|
:footerShow="true"
|
||||||
|
:submitShow="true"
|
||||||
|
:title="dialogTitle +'档案对照'"
|
||||||
|
submitTitle="保存"
|
||||||
|
>
|
||||||
|
<div class="rightDialogClass_main" style="background-color: #fff;" v-if="examineOperateDialog">
|
||||||
|
<base-form
|
||||||
|
ref="basicFormRefsName"
|
||||||
|
:formRow="basicFormForm"
|
||||||
|
:isFunBtn="false"
|
||||||
|
:spanWidth="'100px'"
|
||||||
|
justifyContent="flex-end"
|
||||||
|
:rules="basicFormRulers"
|
||||||
|
@onSelect="onSelect"
|
||||||
|
:view-status="statusView"
|
||||||
|
>
|
||||||
|
</base-form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</base-right-dialog>
|
||||||
|
<base-dialog
|
||||||
|
:dialogVisible.sync="passwordDialogShow"
|
||||||
|
:closeModal="false"
|
||||||
|
:footerShow="true"
|
||||||
|
:title="passwordDialogTitle+'单据类型'"
|
||||||
|
width="400px"
|
||||||
|
top="20vh"
|
||||||
|
@handleConfirmClick="passwordChangeHandle"
|
||||||
|
>
|
||||||
|
<div class="rightDialogClass_main" style="background-color: #fff;">
|
||||||
|
<div class="addDialog">
|
||||||
|
<div class="nameTitle">单据类型名称:</div>
|
||||||
|
<el-input v-model="billTypeADDName"></el-input>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</base-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
DelArcCompareDataAPI,
|
||||||
|
DelArcTypeDataAPI,
|
||||||
|
GetArcCompareList,
|
||||||
|
GetArcCompareListAPI,
|
||||||
|
GetArcTypeListAPI,
|
||||||
|
GetBillListAPI,
|
||||||
|
GetLoginUserButtonsAPI, SaveArcCompareDataAPI, SaveArcTypeDataAPI
|
||||||
|
} from '@/api/apis/buttonList'
|
||||||
|
import basePage from '@/components/base/basePage/index.vue'
|
||||||
|
import baseChoice from '@/components/base/baseChoice/index.vue'
|
||||||
|
import baseDialog from '@/components/base/BaseNewDialog/index.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'recordContrast',
|
||||||
|
components: { baseDialog, baseChoice, basePage },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
basicFormForm: [
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
label: '档案类型',
|
||||||
|
prop: 'arcTypeName',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 24,
|
||||||
|
disabled: true,
|
||||||
|
placeholder: '自动带出'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源应用编码',
|
||||||
|
prop: 'sourceAppCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
disabled: true,
|
||||||
|
placeholder: '自动带出'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源应用名称',
|
||||||
|
prop: 'sourceAppID',
|
||||||
|
tag: 'elSelect',
|
||||||
|
options: [],
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请选择'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源数据名称',
|
||||||
|
prop: 'sourceDataName',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请输入'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源数据编码',
|
||||||
|
prop: 'sourceDataCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请输入'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标应用编码',
|
||||||
|
prop: 'targetAppCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
disabled: true,
|
||||||
|
placeholder: '自动带出'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标应用名称',
|
||||||
|
prop: 'targetAppID',
|
||||||
|
tag: 'elSelect',
|
||||||
|
options: [],
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请选择'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标数据名称',
|
||||||
|
prop: 'targetDataName',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请输入'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标数据编码',
|
||||||
|
prop: 'targetDataCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请输入'
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
basicFormRulers: {
|
||||||
|
sourceAppCode: [
|
||||||
|
{ required: true, message: '请选择来源应用', trigger: 'change' }
|
||||||
|
],
|
||||||
|
sourceAppID: [
|
||||||
|
{ required: true, message: '请选择来源应用', trigger: 'change' }
|
||||||
|
],
|
||||||
|
sourceDataName: [
|
||||||
|
{ required: true, message: '请输入来源数据名称', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
sourceDataCode: [
|
||||||
|
{ required: true, message: '请输入来源数据编码', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
targetAppCode: [
|
||||||
|
{ required: true, message: '请选择目标应用', trigger: 'change' }
|
||||||
|
],
|
||||||
|
targetAppID: [
|
||||||
|
{ required: true, message: '请选择目标应用', trigger: 'change' }
|
||||||
|
],
|
||||||
|
targetDataName: [
|
||||||
|
{ required: true, message: '请输入目标数据名称', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
targetDataCode: [
|
||||||
|
{ required: true, message: '请输入目标数据编码', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
nowBtns: [],
|
||||||
|
billTypeName: '',
|
||||||
|
billTypeClickID: '',
|
||||||
|
billTypeClickName: '',
|
||||||
|
billTypeList: [
|
||||||
|
{
|
||||||
|
name: '人员对照',
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '人员对照',
|
||||||
|
id: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '人员对照',
|
||||||
|
id: 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '人员对照',
|
||||||
|
id: 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
searchObj: {},
|
||||||
|
pageModel: {
|
||||||
|
page: 1, //当前页码
|
||||||
|
limit: 20 //每页显示多少
|
||||||
|
},
|
||||||
|
selected: [],
|
||||||
|
|
||||||
|
tableColumn: [
|
||||||
|
{
|
||||||
|
label: '档案类型',
|
||||||
|
prop: 'arcTypeName',
|
||||||
|
width: '150px'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源应用',
|
||||||
|
prop: 'sourceAppName',
|
||||||
|
width: '150px'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源数据编码',
|
||||||
|
prop: 'sourceDataCode',
|
||||||
|
width: '150px'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源数据名称',
|
||||||
|
prop: 'sourceDataName'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标应用',
|
||||||
|
prop: 'targetAppName',
|
||||||
|
width: '150px'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标数据编码',
|
||||||
|
prop: 'targetDataCode',
|
||||||
|
width: '150px'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标数据名称',
|
||||||
|
prop: 'targetDataName'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
tableData: [],
|
||||||
|
dialogTitle: '新增',
|
||||||
|
examineOperateDialog: false,
|
||||||
|
statusView: false,
|
||||||
|
passwordDialogShow: false,
|
||||||
|
passwordDialogTitle: '新增',
|
||||||
|
billTypeADDName: '',
|
||||||
|
billTypeADDID: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
delRightTitle(item) {
|
||||||
|
this.$confirm('确认删除吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(async() => {
|
||||||
|
const res = await DelArcTypeDataAPI({
|
||||||
|
arcTypeID: item.id
|
||||||
|
})
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.$vmNews('删除成功', 'success')
|
||||||
|
this.billTypeClickName = ''
|
||||||
|
this.billTypeClickID = ''
|
||||||
|
this.getLeftList()
|
||||||
|
this.resetTable()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
editRightTitle(item) {
|
||||||
|
this.billTypeADDName = item.name
|
||||||
|
this.billTypeADDID = item.id
|
||||||
|
this.passwordDialogTitle = '编辑'
|
||||||
|
this.passwordDialogShow = true
|
||||||
|
},
|
||||||
|
rightAddHandle() {
|
||||||
|
this.passwordDialogShow = true
|
||||||
|
this.passwordDialogTitle = '新增'
|
||||||
|
this.billTypeADDName = ''
|
||||||
|
this.billTypeADDID = ''
|
||||||
|
},
|
||||||
|
async passwordChangeHandle() {
|
||||||
|
if (!this.billTypeADDName) {
|
||||||
|
this.$vmNews('请输入单据类型名称')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let params = {
|
||||||
|
dataMain: {
|
||||||
|
'arcTypeName': this.billTypeADDName
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.passwordDialogTitle === '编辑') {
|
||||||
|
params.dataMain.arcTypeID = this.billTypeADDID
|
||||||
|
}
|
||||||
|
const res = await SaveArcTypeDataAPI(params)
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.$vmNews('保存成功', 'success')
|
||||||
|
this.passwordDialogShow = false
|
||||||
|
this.getLeftList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getSelect() {
|
||||||
|
const res = await GetBillListAPI({
|
||||||
|
page: 1,
|
||||||
|
limit: 9999
|
||||||
|
})
|
||||||
|
res.data[1].forEach(item => {
|
||||||
|
item.label = item.appName
|
||||||
|
item.value = item.appID
|
||||||
|
})
|
||||||
|
this.basicFormForm[0].elCol[2].options = res.data[1]
|
||||||
|
this.basicFormForm[0].elCol[6].options = res.data[1]
|
||||||
|
},
|
||||||
|
async getLeftList() {
|
||||||
|
const res = await GetArcTypeListAPI({
|
||||||
|
arcTypeName: this.billTypeName
|
||||||
|
})
|
||||||
|
res.data[0].forEach((el) => {
|
||||||
|
el.name = el.arcTypeName
|
||||||
|
el.id = el.arcTypeID
|
||||||
|
})
|
||||||
|
this.billTypeList = res.data[0]
|
||||||
|
},
|
||||||
|
onSelect(val, index, indexRow, obj, row, form) {
|
||||||
|
if (row.prop === 'sourceAppID') {
|
||||||
|
this.$set(this.$refs.basicFormRefsName.ruleForm, 'sourceAppCode', obj.appCode)
|
||||||
|
}
|
||||||
|
if (row.prop === 'targetAppID') {
|
||||||
|
this.$set(this.$refs.basicFormRefsName.ruleForm, 'targetAppCode', obj.appCode)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async handleConfirmClick() {
|
||||||
|
await this.$refs.basicFormRefsName.$refs.ruleForm.validate()
|
||||||
|
const res = await SaveArcCompareDataAPI({
|
||||||
|
dataMain: {
|
||||||
|
...this.$refs.basicFormRefsName.ruleForm
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.$vmNews('保存成功', 'success')
|
||||||
|
this.examineOperateDialog = false
|
||||||
|
this.resetTable()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pageChange(model) {
|
||||||
|
this.pageModel.page = model.page
|
||||||
|
this.pageModel.limit = model.limit
|
||||||
|
this.getTableData()
|
||||||
|
},
|
||||||
|
async getTableData() {
|
||||||
|
const res = await GetArcCompareList({
|
||||||
|
...this.pageModel,
|
||||||
|
...this.searchObj,
|
||||||
|
arcTypeID: this.billTypeClickID
|
||||||
|
})
|
||||||
|
this.pageModel.total = res.data[0]
|
||||||
|
this.tableData = res.data[1]
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.customtable.clearRadioIndex()
|
||||||
|
this.selected = []
|
||||||
|
})
|
||||||
|
},
|
||||||
|
resetTable() {
|
||||||
|
this.tableData = []
|
||||||
|
this.pageModel.page = 1
|
||||||
|
this.selected = []
|
||||||
|
this.getTableData()
|
||||||
|
},
|
||||||
|
// 点击某条数据
|
||||||
|
radioChange(val) {
|
||||||
|
this.selected = []
|
||||||
|
this.selected.push(val)
|
||||||
|
},
|
||||||
|
// 删除
|
||||||
|
delOperate() {
|
||||||
|
if (!this.selected.length) {
|
||||||
|
this.$vmNews('请至少选择一条数据')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$confirm('确认删除吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(async() => {
|
||||||
|
const res = await DelArcCompareDataAPI({
|
||||||
|
arcCompareID: this.selected[0].arcCompareID
|
||||||
|
})
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.$vmNews('删除成功', 'success')
|
||||||
|
this.resetTable()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 编辑
|
||||||
|
editOperate() {
|
||||||
|
if (!this.selected.length) {
|
||||||
|
this.$vmNews('请至少选择一条数据')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.dialogTitle = '编辑'
|
||||||
|
this.examineOperateDialog = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.basicFormRefsName.ruleForm = {
|
||||||
|
...this.selected[0]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//新增
|
||||||
|
Operate() {
|
||||||
|
if (!this.billTypeClickName) {
|
||||||
|
this.$vmNews('请选择单据类型')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.dialogTitle = '新增'
|
||||||
|
this.examineOperateDialog = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$set(this.$refs.basicFormRefsName.ruleForm, 'arcTypeName', this.billTypeClickName)
|
||||||
|
this.$set(this.$refs.basicFormRefsName.ruleForm, 'arcTypeID', this.billTypeClickID)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
refresh() {
|
||||||
|
this.searchObj = {}
|
||||||
|
},
|
||||||
|
//获取按钮(头部)
|
||||||
|
async buttonPermissions() {
|
||||||
|
const res = await GetLoginUserButtonsAPI({
|
||||||
|
page: 1, //当前页码
|
||||||
|
limit: 999, //每页显示多少
|
||||||
|
menuId: this.$route.meta.id, //树形分类id
|
||||||
|
Sequence: '', //排列方式
|
||||||
|
SequenceName: '', //需要排列的字段名
|
||||||
|
route: this.$route.path
|
||||||
|
})
|
||||||
|
if (res.code == 1) {
|
||||||
|
res.data[0].forEach((el) => {
|
||||||
|
el.menuName = el.nameCN
|
||||||
|
el.icon = el.icoName
|
||||||
|
el.type = el.style
|
||||||
|
el.name = el.nameCN
|
||||||
|
})
|
||||||
|
this.nowBtns = res.data[0]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
billTypeClickHandle(id, name) {
|
||||||
|
this.billTypeClickID = id
|
||||||
|
this.billTypeClickName = name
|
||||||
|
this.resetTable()
|
||||||
|
},
|
||||||
|
//头部按钮统一调用方法
|
||||||
|
clickSave(item) {
|
||||||
|
this[item.btnFunction]()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.buttonPermissions()
|
||||||
|
this.getLeftList()
|
||||||
|
this.getTableData()
|
||||||
|
this.getSelect()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.addDialog {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.nameTitle {
|
||||||
|
padding: 10px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333;
|
||||||
|
margin-right: 10px;
|
||||||
|
width: 180px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.recordContrast {
|
||||||
|
display: flex;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
|
||||||
|
.left {
|
||||||
|
width: 270px;
|
||||||
|
padding: 10px;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-right: 5px;
|
||||||
|
|
||||||
|
.leftTitle {
|
||||||
|
color: #333;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
flex: 1;
|
||||||
|
padding: 10px;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
.topBox {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.searchBox {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
> div {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.table {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.searchBtn {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
|
margin-top: 20px;
|
||||||
|
|
||||||
|
.input {
|
||||||
|
flex: 1;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.showList {
|
||||||
|
height: calc(100vh - 200px);
|
||||||
|
overflow: auto;
|
||||||
|
margin-top: 10px;
|
||||||
|
|
||||||
|
.showItem {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 10px 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #ebeced;
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
background-color: #ebeced !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,149 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<base-dialog
|
||||||
|
:dialogVisible.sync="billDialog"
|
||||||
|
:closeModal="false"
|
||||||
|
:footerShow="true"
|
||||||
|
title="选择单据项目"
|
||||||
|
width="400px"
|
||||||
|
top="10vh"
|
||||||
|
@handleConfirmClick="billClickHandle"
|
||||||
|
>
|
||||||
|
<div class="rightDialogClass_main" style="background-color: #fff;" v-if="billDialog">
|
||||||
|
<div class="showList" style="height: 60vh;overflow: auto">
|
||||||
|
<base-tree ref="baseTree" :isCenter="false" :isSaveBtn="false" :Allshow="false" :showCheckbox="true"
|
||||||
|
:expandAll="false" :menuData="billTableData"
|
||||||
|
:treeProps="billTreeProps"
|
||||||
|
@checkChange="checkChange"
|
||||||
|
@handleNodeClick="handleNodeClick"
|
||||||
|
></base-tree>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</base-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import baseDialog from '@/components/base/BaseNewDialog/index.vue'
|
||||||
|
import baseTree from '@/components/base/baseTree/index.vue'
|
||||||
|
import { queryAccSubjByOrgBookIdAPI } from '@/api/apis/accountingSubject'
|
||||||
|
import { unique } from '@/utils/util'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'treePickDialog',
|
||||||
|
components: { baseTree, baseDialog },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
billDialog: false,
|
||||||
|
billTableData: [],
|
||||||
|
billTreeProps: {
|
||||||
|
children: 'children',
|
||||||
|
label: 'dispname',
|
||||||
|
value: 'pkAccsubj'
|
||||||
|
},
|
||||||
|
checkBoxList: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//多选删除
|
||||||
|
removeHandle(item, index) {
|
||||||
|
this.checkBoxList.splice(index, 1)
|
||||||
|
this.$refs.baseTree.$refs.elTree.setCheckedNodes(this.checkBoxList)
|
||||||
|
},
|
||||||
|
// 菜单树选中
|
||||||
|
handleNodeClick(data) {
|
||||||
|
if (data.disabled) return
|
||||||
|
let uniIndex = this.checkBoxList.findIndex(el => {
|
||||||
|
return el.pkAccsubj == data.pkAccsubj
|
||||||
|
})
|
||||||
|
if (uniIndex == -1) {
|
||||||
|
this.organizationForm = data
|
||||||
|
this.checkChange([], [], unique([...this.checkBoxList, data], 'pkAccsubj'))
|
||||||
|
} else {
|
||||||
|
this.removeHandle(data, uniIndex)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//basetree传上来的多选事件
|
||||||
|
checkChange(childIds, checkdata, nodeList) {
|
||||||
|
console.log(nodeList, 'nodeList')
|
||||||
|
//首先先判断需不需要限制选中个数
|
||||||
|
if (true) {
|
||||||
|
//如果需要并且发现 这个数已经大于的限制数
|
||||||
|
if (1 < nodeList.length) {
|
||||||
|
console.log('进来了')
|
||||||
|
nodeList.forEach((item, index) => {
|
||||||
|
if (this.checkBoxList[0].pkAccsubj === item.pkAccsubj) {
|
||||||
|
nodeList.splice(index, 1)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.checkBoxList = nodeList
|
||||||
|
console.log(this.checkBoxList, 'this.checkBoxList???')
|
||||||
|
console.log(this.$refs.baseTree.$refs.elTree, 'this.$refs.baseTree.$refs.elTree?')
|
||||||
|
this.$refs.baseTree.$refs.elTree.setCheckedNodes(this.checkBoxList)
|
||||||
|
} else {
|
||||||
|
this.checkBoxList = nodeList
|
||||||
|
this.$refs.baseTree.$refs.elTree.setCheckedNodes(this.checkBoxList)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.checkBoxList = nodeList
|
||||||
|
this.$refs.baseTree.$refs.elTree.setCheckedNodes(this.checkBoxList)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
billClickHandle() {
|
||||||
|
if (!this.checkBoxList.length) {
|
||||||
|
this.$vmNews('请选择一条数据')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$emit('handleNodeClick', this.checkBoxList)
|
||||||
|
this.billDialog = false
|
||||||
|
},
|
||||||
|
billTreeClick(item, row) {
|
||||||
|
if (item.disabled) {
|
||||||
|
this.$vmNews('已禁用')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.billTreeActive = item
|
||||||
|
this.billTreeActiveFather = row
|
||||||
|
},
|
||||||
|
async openDialog() {
|
||||||
|
this.billDialog = true
|
||||||
|
const res = await queryAccSubjByOrgBookIdAPI({
|
||||||
|
pkGlorgbook: this.nameClickRow.pkglorgbook
|
||||||
|
})
|
||||||
|
console.log(res, 'res')
|
||||||
|
let arr = this.dataDispose(res.attribute)
|
||||||
|
this.billTableData = res.attribute
|
||||||
|
console.log(this.billTableData, 'this.billTableData', arr)
|
||||||
|
},
|
||||||
|
dataDispose(arr) {
|
||||||
|
arr.forEach(item => {
|
||||||
|
const rawData = item.data || {}
|
||||||
|
item.disabled = rawData.endflag === 'N'
|
||||||
|
|
||||||
|
// 把 data 里的内容平铺到 item 上
|
||||||
|
Object.assign(item, rawData)
|
||||||
|
|
||||||
|
// children 保留,避免被 data 里的 children 覆盖
|
||||||
|
if (item.children && item.children.length > 0) {
|
||||||
|
this.dataDispose(item.children)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return arr
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
nameClickRow: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,634 @@
|
||||||
|
<template>
|
||||||
|
<div class="recordContrast">
|
||||||
|
<div class="left">
|
||||||
|
<div class="leftTitle" style="display: flex;align-items: center;justify-content: space-between">
|
||||||
|
<div>单据类型</div>
|
||||||
|
<div class="icon" style="cursor: pointer" @click="rightAddHandle()">
|
||||||
|
<i class="el-icon-plus"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="showList">
|
||||||
|
<div class="showItem" v-for="(item,index) in billTypeList" :key="index"
|
||||||
|
:class="{active:item.id === billTypeClickID}" @click="billTypeClickHandle(item.id,item.name)"
|
||||||
|
>
|
||||||
|
<div class="name">{{ item.name }}</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="el-icon-edit" @click.stop="editRightTitle(item)" style="margin-right: 10px"></i>
|
||||||
|
<i class="el-icon-delete" style="color: red" @click.stop="delRightTitle(item)"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="right">
|
||||||
|
<div class="topBox">
|
||||||
|
<div class="searchBox">
|
||||||
|
<div>
|
||||||
|
<el-input v-model="searchObj.sourceAppName" :placeholder="'来源应用'" @keydown.native.enter="resetTable"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-input v-model="searchObj.targetAppName" :placeholder="'目标应用'" @keydown.native.enter="resetTable"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-input v-model="searchObj.sourceAppCode" :placeholder="'来源应用编码'" @keydown.native.enter="resetTable"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-input v-model="searchObj.targetAppCode" :placeholder="'目标应用编码'" @keydown.native.enter="resetTable"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="btnBox">
|
||||||
|
<el-button type="primary" size="small" icon="el-icon-search" @click="resetTable">查询</el-button>
|
||||||
|
<el-button type="primary" size="small" icon="el-icon-refresh" @click="refresh">重置</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="display: flex;align-items: center;justify-content: flex-end;">
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
:icon="item.icon"
|
||||||
|
@click="clickSave(item)"
|
||||||
|
:type="item.type ? item.type : 'primary'"
|
||||||
|
v-for="(item, index) in nowBtns"
|
||||||
|
:key="index"
|
||||||
|
>{{ item.menuName }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="table">
|
||||||
|
<base-table ref="customtable" :showIndex="false" :slotrow="true"
|
||||||
|
tableHeight="calc(100vh - 170px)" :tableData="tableData" :tableColumn="tableColumn"
|
||||||
|
@radioChange="radioChange" id="printMe"
|
||||||
|
>
|
||||||
|
</base-table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="page">
|
||||||
|
<base-page :pageSizesList="[20,50,100,150]" :pageModel.sync="pageModel" @onPageChange="pageChange"
|
||||||
|
layout="total, sizes,prev, pager, next,jumper"
|
||||||
|
></base-page>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<base-right-dialog
|
||||||
|
@handleClose="examineOperateDialog = false"
|
||||||
|
@handleConfirmClick="handleConfirmClick"
|
||||||
|
:dialogVisible="examineOperateDialog"
|
||||||
|
size="900px"
|
||||||
|
:appendBody="true"
|
||||||
|
:loading="true"
|
||||||
|
:footerShow="true"
|
||||||
|
:submitShow="true"
|
||||||
|
:title="dialogTitle +'档案对照'"
|
||||||
|
submitTitle="保存"
|
||||||
|
>
|
||||||
|
<div class="rightDialogClass_main" style="background-color: #fff;" v-if="examineOperateDialog">
|
||||||
|
<base-form
|
||||||
|
ref="basicFormRefsName"
|
||||||
|
:formRow="basicFormForm"
|
||||||
|
:isFunBtn="false"
|
||||||
|
:spanWidth="'100px'"
|
||||||
|
justifyContent="flex-end"
|
||||||
|
:rules="basicFormRulers"
|
||||||
|
@onSelect="onSelect"
|
||||||
|
:view-status="statusView"
|
||||||
|
>
|
||||||
|
</base-form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</base-right-dialog>
|
||||||
|
<base-dialog
|
||||||
|
:dialogVisible.sync="passwordDialogShow"
|
||||||
|
:closeModal="false"
|
||||||
|
:footerShow="true"
|
||||||
|
:title="passwordDialogTitle+'单据类型'"
|
||||||
|
width="400px"
|
||||||
|
top="20vh"
|
||||||
|
@handleConfirmClick="passwordChangeHandle"
|
||||||
|
>
|
||||||
|
<div class="rightDialogClass_main" style="background-color: #fff;">
|
||||||
|
<div class="addDialog">
|
||||||
|
<div class="nameTitle">单据类型名称:</div>
|
||||||
|
<el-input v-model="billTypeADDName"></el-input>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</base-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
DelArcCompareDataAPI,
|
||||||
|
DelArcTypeDataAPI,
|
||||||
|
GetArcCompareList,
|
||||||
|
GetArcCompareListAPI,
|
||||||
|
GetArcTypeListAPI,
|
||||||
|
GetBillListAPI,
|
||||||
|
GetLoginUserButtonsAPI, SaveArcCompareDataAPI, SaveArcTypeDataAPI
|
||||||
|
} from '@/api/apis/buttonList'
|
||||||
|
import basePage from '@/components/base/basePage/index.vue'
|
||||||
|
import baseChoice from '@/components/base/baseChoice/index.vue'
|
||||||
|
import baseDialog from '@/components/base/BaseNewDialog/index.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'recordContrast',
|
||||||
|
components: { baseDialog, baseChoice, basePage },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
basicFormForm: [
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
label: '档案类型',
|
||||||
|
prop: 'arcTypeName',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 24,
|
||||||
|
disabled: true,
|
||||||
|
placeholder: '自动带出'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源应用编码',
|
||||||
|
prop: 'sourceAppCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
disabled: true,
|
||||||
|
placeholder: '自动带出'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源应用名称',
|
||||||
|
prop: 'sourceAppID',
|
||||||
|
tag: 'elSelect',
|
||||||
|
options: [],
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请选择'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源数据名称',
|
||||||
|
prop: 'sourceDataName',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请输入'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源数据编码',
|
||||||
|
prop: 'sourceDataCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请输入'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标应用编码',
|
||||||
|
prop: 'targetAppCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
disabled: true,
|
||||||
|
placeholder: '自动带出'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标应用名称',
|
||||||
|
prop: 'targetAppID',
|
||||||
|
tag: 'elSelect',
|
||||||
|
options: [],
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请选择'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标数据名称',
|
||||||
|
prop: 'targetDataName',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请输入'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标数据编码',
|
||||||
|
prop: 'targetDataCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请输入'
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
basicFormRulers: {
|
||||||
|
sourceAppCode: [
|
||||||
|
{ required: true, message: '请选择来源应用', trigger: 'change' }
|
||||||
|
],
|
||||||
|
sourceAppID: [
|
||||||
|
{ required: true, message: '请选择来源应用', trigger: 'change' }
|
||||||
|
],
|
||||||
|
sourceDataName: [
|
||||||
|
{ required: true, message: '请输入来源数据名称', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
sourceDataCode: [
|
||||||
|
{ required: true, message: '请输入来源数据编码', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
targetAppCode: [
|
||||||
|
{ required: true, message: '请选择目标应用', trigger: 'change' }
|
||||||
|
],
|
||||||
|
targetAppID: [
|
||||||
|
{ required: true, message: '请选择目标应用', trigger: 'change' }
|
||||||
|
],
|
||||||
|
targetDataName: [
|
||||||
|
{ required: true, message: '请输入目标数据名称', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
targetDataCode: [
|
||||||
|
{ required: true, message: '请输入目标数据编码', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
nowBtns: [],
|
||||||
|
billTypeName: '',
|
||||||
|
billTypeClickID: '',
|
||||||
|
billTypeClickName: '',
|
||||||
|
billTypeList: [
|
||||||
|
{
|
||||||
|
name: '人员对照',
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '人员对照',
|
||||||
|
id: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '人员对照',
|
||||||
|
id: 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '人员对照',
|
||||||
|
id: 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
searchObj: {},
|
||||||
|
pageModel: {
|
||||||
|
page: 1, //当前页码
|
||||||
|
limit: 20 //每页显示多少
|
||||||
|
},
|
||||||
|
selected: [],
|
||||||
|
|
||||||
|
tableColumn: [
|
||||||
|
{
|
||||||
|
label: '档案类型',
|
||||||
|
prop: 'arcTypeName',
|
||||||
|
width: '150px'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源应用',
|
||||||
|
prop: 'sourceAppName',
|
||||||
|
width: '150px'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源数据编码',
|
||||||
|
prop: 'sourceDataCode',
|
||||||
|
width: '150px'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源数据名称',
|
||||||
|
prop: 'sourceDataName'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标应用',
|
||||||
|
prop: 'targetAppName',
|
||||||
|
width: '150px'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标数据编码',
|
||||||
|
prop: 'targetDataCode',
|
||||||
|
width: '150px'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标数据名称',
|
||||||
|
prop: 'targetDataName'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
tableData: [],
|
||||||
|
dialogTitle: '新增',
|
||||||
|
examineOperateDialog: false,
|
||||||
|
statusView: false,
|
||||||
|
passwordDialogShow: false,
|
||||||
|
passwordDialogTitle: '新增',
|
||||||
|
billTypeADDName: '',
|
||||||
|
billTypeADDID: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
delRightTitle(item) {
|
||||||
|
this.$confirm('确认删除吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(async() => {
|
||||||
|
const res = await DelArcTypeDataAPI({
|
||||||
|
arcTypeID: item.id
|
||||||
|
})
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.$vmNews('删除成功', 'success')
|
||||||
|
this.billTypeClickName = ''
|
||||||
|
this.billTypeClickID = ''
|
||||||
|
this.getLeftList()
|
||||||
|
this.resetTable()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
editRightTitle(item) {
|
||||||
|
this.billTypeADDName = item.name
|
||||||
|
this.billTypeADDID = item.id
|
||||||
|
this.passwordDialogTitle = '编辑'
|
||||||
|
this.passwordDialogShow = true
|
||||||
|
},
|
||||||
|
rightAddHandle() {
|
||||||
|
this.passwordDialogShow = true
|
||||||
|
this.passwordDialogTitle = '新增'
|
||||||
|
this.billTypeADDName = ''
|
||||||
|
this.billTypeADDID = ''
|
||||||
|
},
|
||||||
|
async passwordChangeHandle() {
|
||||||
|
if (!this.billTypeADDName) {
|
||||||
|
this.$vmNews('请输入单据类型名称')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let params = {
|
||||||
|
dataMain: {
|
||||||
|
'arcTypeName': this.billTypeADDName
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.passwordDialogTitle === '编辑') {
|
||||||
|
params.dataMain.arcTypeID = this.billTypeADDID
|
||||||
|
}
|
||||||
|
const res = await SaveArcTypeDataAPI(params)
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.$vmNews('保存成功', 'success')
|
||||||
|
this.passwordDialogShow = false
|
||||||
|
this.getLeftList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getSelect() {
|
||||||
|
const res = await GetBillListAPI({
|
||||||
|
page: 1,
|
||||||
|
limit: 9999
|
||||||
|
})
|
||||||
|
res.data[1].forEach(item => {
|
||||||
|
item.label = item.appName
|
||||||
|
item.value = item.appID
|
||||||
|
})
|
||||||
|
this.basicFormForm[0].elCol[2].options = res.data[1]
|
||||||
|
this.basicFormForm[0].elCol[6].options = res.data[1]
|
||||||
|
},
|
||||||
|
async getLeftList() {
|
||||||
|
const res = await GetArcTypeListAPI({
|
||||||
|
arcTypeName: this.billTypeName
|
||||||
|
})
|
||||||
|
res.data[0].forEach((el) => {
|
||||||
|
el.name = el.arcTypeName
|
||||||
|
el.id = el.arcTypeID
|
||||||
|
})
|
||||||
|
this.billTypeList = res.data[0]
|
||||||
|
},
|
||||||
|
onSelect(val, index, indexRow, obj, row, form) {
|
||||||
|
if (row.prop === 'sourceAppID') {
|
||||||
|
this.$set(this.$refs.basicFormRefsName.ruleForm, 'sourceAppCode', obj.appCode)
|
||||||
|
}
|
||||||
|
if (row.prop === 'targetAppID') {
|
||||||
|
this.$set(this.$refs.basicFormRefsName.ruleForm, 'targetAppCode', obj.appCode)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async handleConfirmClick() {
|
||||||
|
await this.$refs.basicFormRefsName.$refs.ruleForm.validate()
|
||||||
|
const res = await SaveArcCompareDataAPI({
|
||||||
|
dataMain: {
|
||||||
|
...this.$refs.basicFormRefsName.ruleForm
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.$vmNews('保存成功', 'success')
|
||||||
|
this.examineOperateDialog = false
|
||||||
|
this.resetTable()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pageChange(model) {
|
||||||
|
this.pageModel.page = model.page
|
||||||
|
this.pageModel.limit = model.limit
|
||||||
|
this.getTableData()
|
||||||
|
},
|
||||||
|
async getTableData() {
|
||||||
|
const res = await GetArcCompareList({
|
||||||
|
...this.pageModel,
|
||||||
|
...this.searchObj,
|
||||||
|
arcTypeID: this.billTypeClickID
|
||||||
|
})
|
||||||
|
this.pageModel.total = res.data[0]
|
||||||
|
this.tableData = res.data[1]
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.customtable.clearRadioIndex()
|
||||||
|
this.selected = []
|
||||||
|
})
|
||||||
|
},
|
||||||
|
resetTable() {
|
||||||
|
this.tableData = []
|
||||||
|
this.pageModel.page = 1
|
||||||
|
this.selected = []
|
||||||
|
this.getTableData()
|
||||||
|
},
|
||||||
|
// 点击某条数据
|
||||||
|
radioChange(val) {
|
||||||
|
this.selected = []
|
||||||
|
this.selected.push(val)
|
||||||
|
},
|
||||||
|
// 删除
|
||||||
|
delOperate() {
|
||||||
|
if (!this.selected.length) {
|
||||||
|
this.$vmNews('请至少选择一条数据')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$confirm('确认删除吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(async() => {
|
||||||
|
const res = await DelArcCompareDataAPI({
|
||||||
|
arcCompareID: this.selected[0].arcCompareID
|
||||||
|
})
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.$vmNews('删除成功', 'success')
|
||||||
|
this.resetTable()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 编辑
|
||||||
|
editOperate() {
|
||||||
|
if (!this.selected.length) {
|
||||||
|
this.$vmNews('请至少选择一条数据')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.dialogTitle = '编辑'
|
||||||
|
this.examineOperateDialog = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.basicFormRefsName.ruleForm = {
|
||||||
|
...this.selected[0]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//新增
|
||||||
|
Operate() {
|
||||||
|
if (!this.billTypeClickName) {
|
||||||
|
this.$vmNews('请选择单据类型')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.dialogTitle = '新增'
|
||||||
|
this.examineOperateDialog = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$set(this.$refs.basicFormRefsName.ruleForm, 'arcTypeName', this.billTypeClickName)
|
||||||
|
this.$set(this.$refs.basicFormRefsName.ruleForm, 'arcTypeID', this.billTypeClickID)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
refresh() {
|
||||||
|
this.searchObj = {}
|
||||||
|
},
|
||||||
|
//获取按钮(头部)
|
||||||
|
async buttonPermissions() {
|
||||||
|
const res = await GetLoginUserButtonsAPI({
|
||||||
|
page: 1, //当前页码
|
||||||
|
limit: 999, //每页显示多少
|
||||||
|
menuId: this.$route.meta.id, //树形分类id
|
||||||
|
Sequence: '', //排列方式
|
||||||
|
SequenceName: '', //需要排列的字段名
|
||||||
|
route: this.$route.path
|
||||||
|
})
|
||||||
|
if (res.code == 1) {
|
||||||
|
res.data[0].forEach((el) => {
|
||||||
|
el.menuName = el.nameCN
|
||||||
|
el.icon = el.icoName
|
||||||
|
el.type = el.style
|
||||||
|
el.name = el.nameCN
|
||||||
|
})
|
||||||
|
this.nowBtns = res.data[0]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
billTypeClickHandle(id, name) {
|
||||||
|
this.billTypeClickID = id
|
||||||
|
this.billTypeClickName = name
|
||||||
|
this.resetTable()
|
||||||
|
},
|
||||||
|
//头部按钮统一调用方法
|
||||||
|
clickSave(item) {
|
||||||
|
this[item.btnFunction]()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.buttonPermissions()
|
||||||
|
this.getLeftList()
|
||||||
|
this.getTableData()
|
||||||
|
this.getSelect()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.addDialog {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.nameTitle {
|
||||||
|
padding: 10px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333;
|
||||||
|
margin-right: 10px;
|
||||||
|
width: 180px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.recordContrast {
|
||||||
|
display: flex;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
|
||||||
|
.left {
|
||||||
|
width: 270px;
|
||||||
|
padding: 10px;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-right: 5px;
|
||||||
|
|
||||||
|
.leftTitle {
|
||||||
|
color: #333;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
flex: 1;
|
||||||
|
padding: 10px;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
.topBox {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.searchBox {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
> div {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.table {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.searchBtn {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
|
margin-top: 20px;
|
||||||
|
|
||||||
|
.input {
|
||||||
|
flex: 1;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.showList {
|
||||||
|
height: calc(100vh - 200px);
|
||||||
|
overflow: auto;
|
||||||
|
margin-top: 10px;
|
||||||
|
|
||||||
|
.showItem {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 10px 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #ebeced;
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
background-color: #ebeced !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,608 @@
|
||||||
|
<template>
|
||||||
|
<div class="recordContrast">
|
||||||
|
<div class="left">
|
||||||
|
<div class="showList">
|
||||||
|
<div class="showItem" v-for="(item,index) in billTypeList" :key="index"
|
||||||
|
:class="{active:item.id === billTypeClickID}" @click="billTypeClickHandle(item.id,item.name)"
|
||||||
|
>
|
||||||
|
<div class="name">{{ item.name }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="right">
|
||||||
|
<div class="topBox">
|
||||||
|
<div class="searchBox">
|
||||||
|
<div style="margin-left: 10px;display: flex;align-items: center">
|
||||||
|
账簿:
|
||||||
|
<el-select
|
||||||
|
class="w-100"
|
||||||
|
v-model="pkglbook"
|
||||||
|
filterable
|
||||||
|
:clearable="true"
|
||||||
|
placeholder="请选择"
|
||||||
|
@change="changepkglbookHandle"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="(el, index) in pkglbookOptions"
|
||||||
|
:key="el.value"
|
||||||
|
:label="el.label"
|
||||||
|
:value="el.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="btnBox">-->
|
||||||
|
<!-- <el-button type="primary" size="small" icon="el-icon-search" @click="resetTable">查询</el-button>-->
|
||||||
|
<!-- <el-button type="primary" size="small" icon="el-icon-refresh" @click="refresh">重置</el-button>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
</div>
|
||||||
|
<div style="display: flex;align-items: center;justify-content: flex-end;">
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
:icon="item.icon"
|
||||||
|
@click="clickSave(item)"
|
||||||
|
:type="item.type ? item.type : 'primary'"
|
||||||
|
v-for="(item, index) in nowBtns"
|
||||||
|
:key="index"
|
||||||
|
>{{ item.menuName }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="table">
|
||||||
|
<base-table ref="customtable" :showIndex="false" :slotrow="false"
|
||||||
|
tableHeight="calc(100vh - 170px)" :tableData="tableData" :tableColumn="tableColumn"
|
||||||
|
@radioChange="radioChange" id="printMe"
|
||||||
|
>
|
||||||
|
<template #iscd="{row}">
|
||||||
|
<div>
|
||||||
|
<i class="el-icon-check" v-if="row.iscd === 'Y'"></i>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #isdd="{row}">
|
||||||
|
<div>
|
||||||
|
<i class="el-icon-check" v-if="row.isdd === 'Y'"></i>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</base-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
DelArcCompareDataAPI,
|
||||||
|
DelArcTypeDataAPI,
|
||||||
|
GetArcCompareList,
|
||||||
|
GetArcCompareListAPI,
|
||||||
|
GetArcTypeListAPI,
|
||||||
|
GetBillListAPI,
|
||||||
|
GetLoginUserButtonsAPI, SaveArcCompareDataAPI, SaveArcTypeDataAPI
|
||||||
|
} from '@/api/apis/buttonList'
|
||||||
|
import basePage from '@/components/base/basePage/index.vue'
|
||||||
|
import baseChoice from '@/components/base/baseChoice/index.vue'
|
||||||
|
import baseDialog from '@/components/base/BaseNewDialog/index.vue'
|
||||||
|
import baseTable from '@/components/base/baseTable/index.vue'
|
||||||
|
import { queryAllAPI, queryByIdAPI, queryCashFlowMapAPI } from '@/api/apis/operationalModule'
|
||||||
|
import { queryGlsubrelationAPI, queryOrgBookVOAPI } from '@/api/apis/accountingSubject'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'recordContrast',
|
||||||
|
components: { baseDialog, baseChoice, basePage, baseTable },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pkglbook:'',
|
||||||
|
pkglbookOptions: [],
|
||||||
|
basicFormForm: [
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
label: '档案类型',
|
||||||
|
prop: 'arcTypeName',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 24,
|
||||||
|
disabled: true,
|
||||||
|
placeholder: '自动带出'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源应用编码',
|
||||||
|
prop: 'sourceAppCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
disabled: true,
|
||||||
|
placeholder: '自动带出'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源应用名称',
|
||||||
|
prop: 'sourceAppID',
|
||||||
|
tag: 'elSelect',
|
||||||
|
options: [],
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请选择'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源数据名称',
|
||||||
|
prop: 'sourceDataName',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请输入'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源数据编码',
|
||||||
|
prop: 'sourceDataCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请输入'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标应用编码',
|
||||||
|
prop: 'targetAppCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
disabled: true,
|
||||||
|
placeholder: '自动带出'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标应用名称',
|
||||||
|
prop: 'targetAppID',
|
||||||
|
tag: 'elSelect',
|
||||||
|
options: [],
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请选择'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标数据名称',
|
||||||
|
prop: 'targetDataName',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请输入'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标数据编码',
|
||||||
|
prop: 'targetDataCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请输入'
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
basicFormRulers: {
|
||||||
|
sourceAppCode: [
|
||||||
|
{ required: true, message: '请选择来源应用', trigger: 'change' }
|
||||||
|
],
|
||||||
|
sourceAppID: [
|
||||||
|
{ required: true, message: '请选择来源应用', trigger: 'change' }
|
||||||
|
],
|
||||||
|
sourceDataName: [
|
||||||
|
{ required: true, message: '请输入来源数据名称', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
sourceDataCode: [
|
||||||
|
{ required: true, message: '请输入来源数据编码', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
targetAppCode: [
|
||||||
|
{ required: true, message: '请选择目标应用', trigger: 'change' }
|
||||||
|
],
|
||||||
|
targetAppID: [
|
||||||
|
{ required: true, message: '请选择目标应用', trigger: 'change' }
|
||||||
|
],
|
||||||
|
targetDataName: [
|
||||||
|
{ required: true, message: '请输入目标数据名称', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
targetDataCode: [
|
||||||
|
{ required: true, message: '请输入目标数据编码', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
nowBtns: [],
|
||||||
|
billTypeName: '',
|
||||||
|
billTypeClickID: '',
|
||||||
|
billTypeClickName: '',
|
||||||
|
billTypeList: [
|
||||||
|
{
|
||||||
|
name: '人员对照',
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '人员对照',
|
||||||
|
id: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '人员对照',
|
||||||
|
id: 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '人员对照',
|
||||||
|
id: 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
searchObj: {},
|
||||||
|
pageModel: {
|
||||||
|
page: 1, //当前页码
|
||||||
|
limit: 20 //每页显示多少
|
||||||
|
},
|
||||||
|
selected: [],
|
||||||
|
|
||||||
|
tableColumn: [
|
||||||
|
{
|
||||||
|
label: '借方科目',
|
||||||
|
prop: 'jdispname',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '辅助核算',
|
||||||
|
prop: 'dfreevaluename',
|
||||||
|
width: '150px'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '是否默认',
|
||||||
|
prop: 'isdd',
|
||||||
|
width: '150px'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '贷方科目',
|
||||||
|
prop: 'ddispname'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '辅助核算',
|
||||||
|
prop: 'cfreevaluename',
|
||||||
|
width: '150px'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '是否默认',
|
||||||
|
prop: 'iscd',
|
||||||
|
width: '150px'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
tableData: [],
|
||||||
|
dialogTitle: '新增',
|
||||||
|
examineOperateDialog: false,
|
||||||
|
statusView: false,
|
||||||
|
passwordDialogShow: false,
|
||||||
|
passwordDialogTitle: '新增',
|
||||||
|
billTypeADDName: '',
|
||||||
|
billTypeADDID: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async queryOrgBookVOHandle() {
|
||||||
|
const res = await queryOrgBookVOAPI({
|
||||||
|
pkentityorg: ''
|
||||||
|
})
|
||||||
|
res.attribute.forEach(el => {
|
||||||
|
el.label = el.glorgbookname
|
||||||
|
el.value = el.pkglorgbook
|
||||||
|
})
|
||||||
|
this.pkglbookOptions = res.attribute
|
||||||
|
// if (this.pkglbookOptions.length) {
|
||||||
|
// this.pkglbookClickObj = this.pkglbookOptions[0]
|
||||||
|
// this.pkglbook = this.pkglbookClickObj.value
|
||||||
|
// }
|
||||||
|
// this.getTableData()
|
||||||
|
// console.log(res, 'res')
|
||||||
|
},
|
||||||
|
changepkglbookHandle() {
|
||||||
|
console.log(this.billTypeClickID,this.pkglbook)
|
||||||
|
console.log(this.billTypeClickID && this.pkglbook,'this.billTypeClickID && this.pkglbook')
|
||||||
|
if (this.billTypeClickID && this.pkglbook) {
|
||||||
|
this.resetTable()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
delRightTitle(item) {
|
||||||
|
this.$confirm('确认删除吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(async() => {
|
||||||
|
const res = await DelArcTypeDataAPI({
|
||||||
|
arcTypeID: item.id
|
||||||
|
})
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.$vmNews('删除成功', 'success')
|
||||||
|
this.billTypeClickName = ''
|
||||||
|
this.billTypeClickID = ''
|
||||||
|
this.getLeftList()
|
||||||
|
this.resetTable()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
editRightTitle(item) {
|
||||||
|
this.billTypeADDName = item.name
|
||||||
|
this.billTypeADDID = item.id
|
||||||
|
this.passwordDialogTitle = '编辑'
|
||||||
|
this.passwordDialogShow = true
|
||||||
|
},
|
||||||
|
rightAddHandle() {
|
||||||
|
this.passwordDialogShow = true
|
||||||
|
this.passwordDialogTitle = '新增'
|
||||||
|
this.billTypeADDName = ''
|
||||||
|
this.billTypeADDID = ''
|
||||||
|
},
|
||||||
|
async passwordChangeHandle() {
|
||||||
|
if (!this.billTypeADDName) {
|
||||||
|
this.$vmNews('请输入单据类型名称')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let params = {
|
||||||
|
dataMain: {
|
||||||
|
'moduleName': this.billTypeADDName
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.passwordDialogTitle === '编辑') {
|
||||||
|
params.dataMain.arcTypeID = this.billTypeADDID
|
||||||
|
}
|
||||||
|
const res = await queryByIdAPI(params)
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.$vmNews('保存成功', 'success')
|
||||||
|
this.passwordDialogShow = false
|
||||||
|
this.getLeftList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getSelect() {
|
||||||
|
const res = await GetBillListAPI({
|
||||||
|
page: 1,
|
||||||
|
limit: 9999
|
||||||
|
})
|
||||||
|
res.data[1].forEach(item => {
|
||||||
|
item.label = item.appName
|
||||||
|
item.value = item.appID
|
||||||
|
})
|
||||||
|
this.basicFormForm[0].elCol[2].options = res.data[1]
|
||||||
|
this.basicFormForm[0].elCol[6].options = res.data[1]
|
||||||
|
},
|
||||||
|
async getLeftList() {
|
||||||
|
const res = await queryCashFlowMapAPI({})
|
||||||
|
res.attribute.forEach((el) => {
|
||||||
|
el.name = `[${el.cfitemcode}] ${el.cfitemname}`
|
||||||
|
el.id = el.pkCashflow
|
||||||
|
})
|
||||||
|
this.billTypeList = res.attribute
|
||||||
|
},
|
||||||
|
onSelect(val, index, indexRow, obj, row, form) {
|
||||||
|
if (row.prop === 'sourceAppID') {
|
||||||
|
this.$set(this.$refs.basicFormRefsName.ruleForm, 'sourceAppCode', obj.appCode)
|
||||||
|
}
|
||||||
|
if (row.prop === 'targetAppID') {
|
||||||
|
this.$set(this.$refs.basicFormRefsName.ruleForm, 'targetAppCode', obj.appCode)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async handleConfirmClick() {
|
||||||
|
await this.$refs.basicFormRefsName.$refs.ruleForm.validate()
|
||||||
|
const res = await SaveArcCompareDataAPI({
|
||||||
|
dataMain: {
|
||||||
|
...this.$refs.basicFormRefsName.ruleForm
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.$vmNews('保存成功', 'success')
|
||||||
|
this.examineOperateDialog = false
|
||||||
|
this.resetTable()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pageChange(model) {
|
||||||
|
this.pageModel.page = model.page
|
||||||
|
this.pageModel.limit = model.limit
|
||||||
|
this.getTableData()
|
||||||
|
},
|
||||||
|
async getTableData() {
|
||||||
|
const res = await queryGlsubrelationAPI({
|
||||||
|
...this.pageModel,
|
||||||
|
pkGlorgbook: this.pkglbook,
|
||||||
|
pkCashflow: this.billTypeClickID
|
||||||
|
})
|
||||||
|
// this.pageModel.total = res.data[0]
|
||||||
|
this.tableData = res.attribute
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.customtable.clearRadioIndex()
|
||||||
|
this.selected = []
|
||||||
|
})
|
||||||
|
},
|
||||||
|
resetTable() {
|
||||||
|
this.tableData = []
|
||||||
|
this.pageModel.page = 1
|
||||||
|
this.selected = []
|
||||||
|
this.getTableData()
|
||||||
|
},
|
||||||
|
// 点击某条数据
|
||||||
|
radioChange(val) {
|
||||||
|
this.selected = []
|
||||||
|
this.selected.push(val)
|
||||||
|
},
|
||||||
|
// 删除
|
||||||
|
delOperate() {
|
||||||
|
if (!this.selected.length) {
|
||||||
|
this.$vmNews('请至少选择一条数据')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$confirm('确认删除吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(async() => {
|
||||||
|
const res = await DelArcCompareDataAPI({
|
||||||
|
arcCompareID: this.selected[0].arcCompareID
|
||||||
|
})
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.$vmNews('删除成功', 'success')
|
||||||
|
this.resetTable()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 编辑
|
||||||
|
editOperate() {
|
||||||
|
if (!this.selected.length) {
|
||||||
|
this.$vmNews('请至少选择一条数据')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.dialogTitle = '编辑'
|
||||||
|
this.examineOperateDialog = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.basicFormRefsName.ruleForm = {
|
||||||
|
...this.selected[0]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//新增
|
||||||
|
Operate() {
|
||||||
|
if (!this.billTypeClickName) {
|
||||||
|
this.$vmNews('请选择单据类型')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.dialogTitle = '新增'
|
||||||
|
this.examineOperateDialog = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$set(this.$refs.basicFormRefsName.ruleForm, 'arcTypeName', this.billTypeClickName)
|
||||||
|
this.$set(this.$refs.basicFormRefsName.ruleForm, 'arcTypeID', this.billTypeClickID)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
refresh() {
|
||||||
|
this.searchObj = {}
|
||||||
|
},
|
||||||
|
//获取按钮(头部)
|
||||||
|
async buttonPermissions() {
|
||||||
|
const res = await GetLoginUserButtonsAPI({
|
||||||
|
page: 1, //当前页码
|
||||||
|
limit: 999, //每页显示多少
|
||||||
|
menuId: this.$route.meta.id, //树形分类id
|
||||||
|
Sequence: '', //排列方式
|
||||||
|
SequenceName: '', //需要排列的字段名
|
||||||
|
route: this.$route.path
|
||||||
|
})
|
||||||
|
if (res.code == 1) {
|
||||||
|
res.data[0].forEach((el) => {
|
||||||
|
el.menuName = el.nameCN
|
||||||
|
el.icon = el.icoName
|
||||||
|
el.type = el.style
|
||||||
|
el.name = el.nameCN
|
||||||
|
})
|
||||||
|
this.nowBtns = res.data[0]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
billTypeClickHandle(id, name) {
|
||||||
|
this.billTypeClickID = id
|
||||||
|
this.billTypeClickName = name
|
||||||
|
if (this.billTypeClickID && this.pkglbook) {
|
||||||
|
this.resetTable()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//头部按钮统一调用方法
|
||||||
|
clickSave(item) {
|
||||||
|
this[item.btnFunction]()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.queryOrgBookVOHandle()
|
||||||
|
// this.buttonPermissions()
|
||||||
|
this.getLeftList()
|
||||||
|
// this.getTableData()
|
||||||
|
// this.getSelect()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.addDialog {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.nameTitle {
|
||||||
|
padding: 10px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333;
|
||||||
|
margin-right: 10px;
|
||||||
|
width: 180px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.recordContrast {
|
||||||
|
display: flex;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
|
||||||
|
.left {
|
||||||
|
width: 370px;
|
||||||
|
padding: 10px;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-right: 5px;
|
||||||
|
|
||||||
|
.leftTitle {
|
||||||
|
color: #333;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
flex: 1;
|
||||||
|
padding: 10px;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
.topBox {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.searchBox {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
> div {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.table {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.searchBtn {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
|
margin-top: 20px;
|
||||||
|
|
||||||
|
.input {
|
||||||
|
flex: 1;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.showList {
|
||||||
|
height: calc(100vh - 150px);
|
||||||
|
overflow: auto;
|
||||||
|
margin-top: 10px;
|
||||||
|
|
||||||
|
.showItem {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 10px 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #ebeced;
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
background-color: #ebeced !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,634 @@
|
||||||
|
<template>
|
||||||
|
<div class="recordContrast">
|
||||||
|
<div class="left">
|
||||||
|
<div class="leftTitle" style="display: flex;align-items: center;justify-content: space-between">
|
||||||
|
<div>单据类型</div>
|
||||||
|
<div class="icon" style="cursor: pointer" @click="rightAddHandle()">
|
||||||
|
<i class="el-icon-plus"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="showList">
|
||||||
|
<div class="showItem" v-for="(item,index) in billTypeList" :key="index"
|
||||||
|
:class="{active:item.id === billTypeClickID}" @click="billTypeClickHandle(item.id,item.name)"
|
||||||
|
>
|
||||||
|
<div class="name">{{ item.name }}</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="el-icon-edit" @click.stop="editRightTitle(item)" style="margin-right: 10px"></i>
|
||||||
|
<i class="el-icon-delete" style="color: red" @click.stop="delRightTitle(item)"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="right">
|
||||||
|
<div class="topBox">
|
||||||
|
<div class="searchBox">
|
||||||
|
<div>
|
||||||
|
<el-input v-model="searchObj.sourceAppName" :placeholder="'来源应用'" @keydown.native.enter="resetTable"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-input v-model="searchObj.targetAppName" :placeholder="'目标应用'" @keydown.native.enter="resetTable"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-input v-model="searchObj.sourceAppCode" :placeholder="'来源应用编码'" @keydown.native.enter="resetTable"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-input v-model="searchObj.targetAppCode" :placeholder="'目标应用编码'" @keydown.native.enter="resetTable"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="btnBox">
|
||||||
|
<el-button type="primary" size="small" icon="el-icon-search" @click="resetTable">查询</el-button>
|
||||||
|
<el-button type="primary" size="small" icon="el-icon-refresh" @click="refresh">重置</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="display: flex;align-items: center;justify-content: flex-end;">
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
:icon="item.icon"
|
||||||
|
@click="clickSave(item)"
|
||||||
|
:type="item.type ? item.type : 'primary'"
|
||||||
|
v-for="(item, index) in nowBtns"
|
||||||
|
:key="index"
|
||||||
|
>{{ item.menuName }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="table">
|
||||||
|
<base-table ref="customtable" :showIndex="false" :slotrow="true"
|
||||||
|
tableHeight="calc(100vh - 170px)" :tableData="tableData" :tableColumn="tableColumn"
|
||||||
|
@radioChange="radioChange" id="printMe"
|
||||||
|
>
|
||||||
|
</base-table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="page">
|
||||||
|
<base-page :pageSizesList="[20,50,100,150]" :pageModel.sync="pageModel" @onPageChange="pageChange"
|
||||||
|
layout="total, sizes,prev, pager, next,jumper"
|
||||||
|
></base-page>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<base-right-dialog
|
||||||
|
@handleClose="examineOperateDialog = false"
|
||||||
|
@handleConfirmClick="handleConfirmClick"
|
||||||
|
:dialogVisible="examineOperateDialog"
|
||||||
|
size="900px"
|
||||||
|
:appendBody="true"
|
||||||
|
:loading="true"
|
||||||
|
:footerShow="true"
|
||||||
|
:submitShow="true"
|
||||||
|
:title="dialogTitle +'档案对照'"
|
||||||
|
submitTitle="保存"
|
||||||
|
>
|
||||||
|
<div class="rightDialogClass_main" style="background-color: #fff;" v-if="examineOperateDialog">
|
||||||
|
<base-form
|
||||||
|
ref="basicFormRefsName"
|
||||||
|
:formRow="basicFormForm"
|
||||||
|
:isFunBtn="false"
|
||||||
|
:spanWidth="'100px'"
|
||||||
|
justifyContent="flex-end"
|
||||||
|
:rules="basicFormRulers"
|
||||||
|
@onSelect="onSelect"
|
||||||
|
:view-status="statusView"
|
||||||
|
>
|
||||||
|
</base-form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</base-right-dialog>
|
||||||
|
<base-dialog
|
||||||
|
:dialogVisible.sync="passwordDialogShow"
|
||||||
|
:closeModal="false"
|
||||||
|
:footerShow="true"
|
||||||
|
:title="passwordDialogTitle+'单据类型'"
|
||||||
|
width="400px"
|
||||||
|
top="20vh"
|
||||||
|
@handleConfirmClick="passwordChangeHandle"
|
||||||
|
>
|
||||||
|
<div class="rightDialogClass_main" style="background-color: #fff;">
|
||||||
|
<div class="addDialog">
|
||||||
|
<div class="nameTitle">单据类型名称:</div>
|
||||||
|
<el-input v-model="billTypeADDName"></el-input>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</base-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
DelArcCompareDataAPI,
|
||||||
|
DelArcTypeDataAPI,
|
||||||
|
GetArcCompareList,
|
||||||
|
GetArcCompareListAPI,
|
||||||
|
GetArcTypeListAPI,
|
||||||
|
GetBillListAPI,
|
||||||
|
GetLoginUserButtonsAPI, SaveArcCompareDataAPI, SaveArcTypeDataAPI
|
||||||
|
} from '@/api/apis/buttonList'
|
||||||
|
import basePage from '@/components/base/basePage/index.vue'
|
||||||
|
import baseChoice from '@/components/base/baseChoice/index.vue'
|
||||||
|
import baseDialog from '@/components/base/BaseNewDialog/index.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'recordContrast',
|
||||||
|
components: { baseDialog, baseChoice, basePage },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
basicFormForm: [
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
label: '档案类型',
|
||||||
|
prop: 'arcTypeName',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 24,
|
||||||
|
disabled: true,
|
||||||
|
placeholder: '自动带出'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源应用编码',
|
||||||
|
prop: 'sourceAppCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
disabled: true,
|
||||||
|
placeholder: '自动带出'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源应用名称',
|
||||||
|
prop: 'sourceAppID',
|
||||||
|
tag: 'elSelect',
|
||||||
|
options: [],
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请选择'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源数据名称',
|
||||||
|
prop: 'sourceDataName',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请输入'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源数据编码',
|
||||||
|
prop: 'sourceDataCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请输入'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标应用编码',
|
||||||
|
prop: 'targetAppCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
disabled: true,
|
||||||
|
placeholder: '自动带出'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标应用名称',
|
||||||
|
prop: 'targetAppID',
|
||||||
|
tag: 'elSelect',
|
||||||
|
options: [],
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请选择'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标数据名称',
|
||||||
|
prop: 'targetDataName',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请输入'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标数据编码',
|
||||||
|
prop: 'targetDataCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12,
|
||||||
|
placeholder: '请输入'
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
basicFormRulers: {
|
||||||
|
sourceAppCode: [
|
||||||
|
{ required: true, message: '请选择来源应用', trigger: 'change' }
|
||||||
|
],
|
||||||
|
sourceAppID: [
|
||||||
|
{ required: true, message: '请选择来源应用', trigger: 'change' }
|
||||||
|
],
|
||||||
|
sourceDataName: [
|
||||||
|
{ required: true, message: '请输入来源数据名称', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
sourceDataCode: [
|
||||||
|
{ required: true, message: '请输入来源数据编码', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
targetAppCode: [
|
||||||
|
{ required: true, message: '请选择目标应用', trigger: 'change' }
|
||||||
|
],
|
||||||
|
targetAppID: [
|
||||||
|
{ required: true, message: '请选择目标应用', trigger: 'change' }
|
||||||
|
],
|
||||||
|
targetDataName: [
|
||||||
|
{ required: true, message: '请输入目标数据名称', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
targetDataCode: [
|
||||||
|
{ required: true, message: '请输入目标数据编码', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
nowBtns: [],
|
||||||
|
billTypeName: '',
|
||||||
|
billTypeClickID: '',
|
||||||
|
billTypeClickName: '',
|
||||||
|
billTypeList: [
|
||||||
|
{
|
||||||
|
name: '人员对照',
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '人员对照',
|
||||||
|
id: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '人员对照',
|
||||||
|
id: 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '人员对照',
|
||||||
|
id: 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
searchObj: {},
|
||||||
|
pageModel: {
|
||||||
|
page: 1, //当前页码
|
||||||
|
limit: 20 //每页显示多少
|
||||||
|
},
|
||||||
|
selected: [],
|
||||||
|
|
||||||
|
tableColumn: [
|
||||||
|
{
|
||||||
|
label: '档案类型',
|
||||||
|
prop: 'arcTypeName',
|
||||||
|
width: '150px'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源应用',
|
||||||
|
prop: 'sourceAppName',
|
||||||
|
width: '150px'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源数据编码',
|
||||||
|
prop: 'sourceDataCode',
|
||||||
|
width: '150px'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '来源数据名称',
|
||||||
|
prop: 'sourceDataName'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标应用',
|
||||||
|
prop: 'targetAppName',
|
||||||
|
width: '150px'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标数据编码',
|
||||||
|
prop: 'targetDataCode',
|
||||||
|
width: '150px'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '目标数据名称',
|
||||||
|
prop: 'targetDataName'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
tableData: [],
|
||||||
|
dialogTitle: '新增',
|
||||||
|
examineOperateDialog: false,
|
||||||
|
statusView: false,
|
||||||
|
passwordDialogShow: false,
|
||||||
|
passwordDialogTitle: '新增',
|
||||||
|
billTypeADDName: '',
|
||||||
|
billTypeADDID: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
delRightTitle(item) {
|
||||||
|
this.$confirm('确认删除吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(async() => {
|
||||||
|
const res = await DelArcTypeDataAPI({
|
||||||
|
arcTypeID: item.id
|
||||||
|
})
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.$vmNews('删除成功', 'success')
|
||||||
|
this.billTypeClickName = ''
|
||||||
|
this.billTypeClickID = ''
|
||||||
|
this.getLeftList()
|
||||||
|
this.resetTable()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
editRightTitle(item) {
|
||||||
|
this.billTypeADDName = item.name
|
||||||
|
this.billTypeADDID = item.id
|
||||||
|
this.passwordDialogTitle = '编辑'
|
||||||
|
this.passwordDialogShow = true
|
||||||
|
},
|
||||||
|
rightAddHandle() {
|
||||||
|
this.passwordDialogShow = true
|
||||||
|
this.passwordDialogTitle = '新增'
|
||||||
|
this.billTypeADDName = ''
|
||||||
|
this.billTypeADDID = ''
|
||||||
|
},
|
||||||
|
async passwordChangeHandle() {
|
||||||
|
if (!this.billTypeADDName) {
|
||||||
|
this.$vmNews('请输入单据类型名称')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let params = {
|
||||||
|
dataMain: {
|
||||||
|
'arcTypeName': this.billTypeADDName
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.passwordDialogTitle === '编辑') {
|
||||||
|
params.dataMain.arcTypeID = this.billTypeADDID
|
||||||
|
}
|
||||||
|
const res = await SaveArcTypeDataAPI(params)
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.$vmNews('保存成功', 'success')
|
||||||
|
this.passwordDialogShow = false
|
||||||
|
this.getLeftList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getSelect() {
|
||||||
|
const res = await GetBillListAPI({
|
||||||
|
page: 1,
|
||||||
|
limit: 9999
|
||||||
|
})
|
||||||
|
res.data[1].forEach(item => {
|
||||||
|
item.label = item.appName
|
||||||
|
item.value = item.appID
|
||||||
|
})
|
||||||
|
this.basicFormForm[0].elCol[2].options = res.data[1]
|
||||||
|
this.basicFormForm[0].elCol[6].options = res.data[1]
|
||||||
|
},
|
||||||
|
async getLeftList() {
|
||||||
|
const res = await GetArcTypeListAPI({
|
||||||
|
arcTypeName: this.billTypeName
|
||||||
|
})
|
||||||
|
res.data[0].forEach((el) => {
|
||||||
|
el.name = el.arcTypeName
|
||||||
|
el.id = el.arcTypeID
|
||||||
|
})
|
||||||
|
this.billTypeList = res.data[0]
|
||||||
|
},
|
||||||
|
onSelect(val, index, indexRow, obj, row, form) {
|
||||||
|
if (row.prop === 'sourceAppID') {
|
||||||
|
this.$set(this.$refs.basicFormRefsName.ruleForm, 'sourceAppCode', obj.appCode)
|
||||||
|
}
|
||||||
|
if (row.prop === 'targetAppID') {
|
||||||
|
this.$set(this.$refs.basicFormRefsName.ruleForm, 'targetAppCode', obj.appCode)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async handleConfirmClick() {
|
||||||
|
await this.$refs.basicFormRefsName.$refs.ruleForm.validate()
|
||||||
|
const res = await SaveArcCompareDataAPI({
|
||||||
|
dataMain: {
|
||||||
|
...this.$refs.basicFormRefsName.ruleForm
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.$vmNews('保存成功', 'success')
|
||||||
|
this.examineOperateDialog = false
|
||||||
|
this.resetTable()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pageChange(model) {
|
||||||
|
this.pageModel.page = model.page
|
||||||
|
this.pageModel.limit = model.limit
|
||||||
|
this.getTableData()
|
||||||
|
},
|
||||||
|
async getTableData() {
|
||||||
|
const res = await GetArcCompareList({
|
||||||
|
...this.pageModel,
|
||||||
|
...this.searchObj,
|
||||||
|
arcTypeID: this.billTypeClickID
|
||||||
|
})
|
||||||
|
this.pageModel.total = res.data[0]
|
||||||
|
this.tableData = res.data[1]
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.customtable.clearRadioIndex()
|
||||||
|
this.selected = []
|
||||||
|
})
|
||||||
|
},
|
||||||
|
resetTable() {
|
||||||
|
this.tableData = []
|
||||||
|
this.pageModel.page = 1
|
||||||
|
this.selected = []
|
||||||
|
this.getTableData()
|
||||||
|
},
|
||||||
|
// 点击某条数据
|
||||||
|
radioChange(val) {
|
||||||
|
this.selected = []
|
||||||
|
this.selected.push(val)
|
||||||
|
},
|
||||||
|
// 删除
|
||||||
|
delOperate() {
|
||||||
|
if (!this.selected.length) {
|
||||||
|
this.$vmNews('请至少选择一条数据')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$confirm('确认删除吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(async() => {
|
||||||
|
const res = await DelArcCompareDataAPI({
|
||||||
|
arcCompareID: this.selected[0].arcCompareID
|
||||||
|
})
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.$vmNews('删除成功', 'success')
|
||||||
|
this.resetTable()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 编辑
|
||||||
|
editOperate() {
|
||||||
|
if (!this.selected.length) {
|
||||||
|
this.$vmNews('请至少选择一条数据')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.dialogTitle = '编辑'
|
||||||
|
this.examineOperateDialog = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.basicFormRefsName.ruleForm = {
|
||||||
|
...this.selected[0]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//新增
|
||||||
|
Operate() {
|
||||||
|
if (!this.billTypeClickName) {
|
||||||
|
this.$vmNews('请选择单据类型')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.dialogTitle = '新增'
|
||||||
|
this.examineOperateDialog = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$set(this.$refs.basicFormRefsName.ruleForm, 'arcTypeName', this.billTypeClickName)
|
||||||
|
this.$set(this.$refs.basicFormRefsName.ruleForm, 'arcTypeID', this.billTypeClickID)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
refresh() {
|
||||||
|
this.searchObj = {}
|
||||||
|
},
|
||||||
|
//获取按钮(头部)
|
||||||
|
async buttonPermissions() {
|
||||||
|
const res = await GetLoginUserButtonsAPI({
|
||||||
|
page: 1, //当前页码
|
||||||
|
limit: 999, //每页显示多少
|
||||||
|
menuId: this.$route.meta.id, //树形分类id
|
||||||
|
Sequence: '', //排列方式
|
||||||
|
SequenceName: '', //需要排列的字段名
|
||||||
|
route: this.$route.path
|
||||||
|
})
|
||||||
|
if (res.code == 1) {
|
||||||
|
res.data[0].forEach((el) => {
|
||||||
|
el.menuName = el.nameCN
|
||||||
|
el.icon = el.icoName
|
||||||
|
el.type = el.style
|
||||||
|
el.name = el.nameCN
|
||||||
|
})
|
||||||
|
this.nowBtns = res.data[0]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
billTypeClickHandle(id, name) {
|
||||||
|
this.billTypeClickID = id
|
||||||
|
this.billTypeClickName = name
|
||||||
|
this.resetTable()
|
||||||
|
},
|
||||||
|
//头部按钮统一调用方法
|
||||||
|
clickSave(item) {
|
||||||
|
this[item.btnFunction]()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.buttonPermissions()
|
||||||
|
this.getLeftList()
|
||||||
|
this.getTableData()
|
||||||
|
this.getSelect()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.addDialog {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.nameTitle {
|
||||||
|
padding: 10px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333;
|
||||||
|
margin-right: 10px;
|
||||||
|
width: 180px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.recordContrast {
|
||||||
|
display: flex;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
|
||||||
|
.left {
|
||||||
|
width: 270px;
|
||||||
|
padding: 10px;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-right: 5px;
|
||||||
|
|
||||||
|
.leftTitle {
|
||||||
|
color: #333;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
flex: 1;
|
||||||
|
padding: 10px;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
.topBox {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.searchBox {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
> div {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.table {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.searchBtn {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
|
margin-top: 20px;
|
||||||
|
|
||||||
|
.input {
|
||||||
|
flex: 1;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.showList {
|
||||||
|
height: calc(100vh - 200px);
|
||||||
|
overflow: auto;
|
||||||
|
margin-top: 10px;
|
||||||
|
|
||||||
|
.showItem {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 10px 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #ebeced;
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
background-color: #ebeced !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,149 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<base-dialog
|
||||||
|
:dialogVisible.sync="billDialog"
|
||||||
|
:closeModal="false"
|
||||||
|
:footerShow="true"
|
||||||
|
title="选择单据项目"
|
||||||
|
width="400px"
|
||||||
|
top="10vh"
|
||||||
|
@handleConfirmClick="billClickHandle"
|
||||||
|
>
|
||||||
|
<div class="rightDialogClass_main" style="background-color: #fff;" v-if="billDialog">
|
||||||
|
<div class="showList" style="height: 60vh;overflow: auto">
|
||||||
|
<base-tree ref="baseTree" :isCenter="false" :isSaveBtn="false" :Allshow="false" :showCheckbox="true"
|
||||||
|
:expandAll="false" :menuData="billTableData"
|
||||||
|
:treeProps="billTreeProps"
|
||||||
|
@checkChange="checkChange"
|
||||||
|
@handleNodeClick="handleNodeClick"
|
||||||
|
></base-tree>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</base-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import baseDialog from '@/components/base/BaseNewDialog/index.vue'
|
||||||
|
import baseTree from '@/components/base/baseTree/index.vue'
|
||||||
|
import { queryAccSubjByOrgBookIdAPI } from '@/api/apis/accountingSubject'
|
||||||
|
import { unique } from '@/utils/util'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'treePickDialog',
|
||||||
|
components: { baseTree, baseDialog },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
billDialog: false,
|
||||||
|
billTableData: [],
|
||||||
|
billTreeProps: {
|
||||||
|
children: 'children',
|
||||||
|
label: 'dispname',
|
||||||
|
value: 'pkAccsubj'
|
||||||
|
},
|
||||||
|
checkBoxList: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//多选删除
|
||||||
|
removeHandle(item, index) {
|
||||||
|
this.checkBoxList.splice(index, 1)
|
||||||
|
this.$refs.baseTree.$refs.elTree.setCheckedNodes(this.checkBoxList)
|
||||||
|
},
|
||||||
|
// 菜单树选中
|
||||||
|
handleNodeClick(data) {
|
||||||
|
if (data.disabled) return
|
||||||
|
let uniIndex = this.checkBoxList.findIndex(el => {
|
||||||
|
return el.pkAccsubj == data.pkAccsubj
|
||||||
|
})
|
||||||
|
if (uniIndex == -1) {
|
||||||
|
this.organizationForm = data
|
||||||
|
this.checkChange([], [], unique([...this.checkBoxList, data], 'pkAccsubj'))
|
||||||
|
} else {
|
||||||
|
this.removeHandle(data, uniIndex)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//basetree传上来的多选事件
|
||||||
|
checkChange(childIds, checkdata, nodeList) {
|
||||||
|
console.log(nodeList, 'nodeList')
|
||||||
|
//首先先判断需不需要限制选中个数
|
||||||
|
if (true) {
|
||||||
|
//如果需要并且发现 这个数已经大于的限制数
|
||||||
|
if (1 < nodeList.length) {
|
||||||
|
console.log('进来了')
|
||||||
|
nodeList.forEach((item, index) => {
|
||||||
|
if (this.checkBoxList[0].pkAccsubj === item.pkAccsubj) {
|
||||||
|
nodeList.splice(index, 1)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.checkBoxList = nodeList
|
||||||
|
console.log(this.checkBoxList, 'this.checkBoxList???')
|
||||||
|
console.log(this.$refs.baseTree.$refs.elTree, 'this.$refs.baseTree.$refs.elTree?')
|
||||||
|
this.$refs.baseTree.$refs.elTree.setCheckedNodes(this.checkBoxList)
|
||||||
|
} else {
|
||||||
|
this.checkBoxList = nodeList
|
||||||
|
this.$refs.baseTree.$refs.elTree.setCheckedNodes(this.checkBoxList)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.checkBoxList = nodeList
|
||||||
|
this.$refs.baseTree.$refs.elTree.setCheckedNodes(this.checkBoxList)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
billClickHandle() {
|
||||||
|
if (!this.checkBoxList.length) {
|
||||||
|
this.$vmNews('请选择一条数据')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$emit('handleNodeClick', this.checkBoxList)
|
||||||
|
this.billDialog = false
|
||||||
|
},
|
||||||
|
billTreeClick(item, row) {
|
||||||
|
if (item.disabled) {
|
||||||
|
this.$vmNews('已禁用')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.billTreeActive = item
|
||||||
|
this.billTreeActiveFather = row
|
||||||
|
},
|
||||||
|
async openDialog() {
|
||||||
|
this.billDialog = true
|
||||||
|
const res = await queryAccSubjByOrgBookIdAPI({
|
||||||
|
pkGlorgbook: this.nameClickRow.pkglorgbook
|
||||||
|
})
|
||||||
|
console.log(res, 'res')
|
||||||
|
let arr = this.dataDispose(res.attribute)
|
||||||
|
this.billTableData = res.attribute
|
||||||
|
console.log(this.billTableData, 'this.billTableData', arr)
|
||||||
|
},
|
||||||
|
dataDispose(arr) {
|
||||||
|
arr.forEach(item => {
|
||||||
|
const rawData = item.data || {}
|
||||||
|
item.disabled = rawData.endflag === 'N'
|
||||||
|
|
||||||
|
// 把 data 里的内容平铺到 item 上
|
||||||
|
Object.assign(item, rawData)
|
||||||
|
|
||||||
|
// children 保留,避免被 data 里的 children 覆盖
|
||||||
|
if (item.children && item.children.length > 0) {
|
||||||
|
this.dataDispose(item.children)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return arr
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
nameClickRow: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
File diff suppressed because it is too large
Load Diff
|
@ -259,6 +259,7 @@ export default {
|
||||||
this.$store
|
this.$store
|
||||||
.dispatch("Login", this.loginForm)
|
.dispatch("Login", this.loginForm)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
console.log(123,'123')
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$router
|
this.$router
|
||||||
.push({
|
.push({
|
||||||
|
|
|
@ -71,6 +71,7 @@
|
||||||
v-model="ruleForm[row.id]"
|
v-model="ruleForm[row.id]"
|
||||||
v-if="row.type == 'onecheck'"
|
v-if="row.type == 'onecheck'"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
|
:true-label="row.options ? row.options[0].id : true"
|
||||||
>是
|
>是
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
<el-input
|
<el-input
|
||||||
|
|
|
@ -12,6 +12,19 @@ const addForm = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
title: '外部档案映射',
|
||||||
|
id: 'u8cDbPk',
|
||||||
|
row: 24,
|
||||||
|
disabled: false,
|
||||||
|
required: false,
|
||||||
|
fontSize: 16
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
elCol: [
|
elCol: [
|
||||||
{
|
{
|
||||||
|
|
|
@ -338,7 +338,64 @@ export default {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'onecheck',
|
||||||
|
title: '是否系统数据主键',
|
||||||
|
id: 'isSysPk',
|
||||||
|
row: 24,
|
||||||
|
disabled: false,
|
||||||
|
required: false,
|
||||||
|
fontSize: 16,
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
label: '是',
|
||||||
|
id: 'Y'
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'onecheck',
|
||||||
|
title: '系统数据编码',
|
||||||
|
id: 'isSysCode',
|
||||||
|
row: 24,
|
||||||
|
disabled: false,
|
||||||
|
required: false,
|
||||||
|
fontSize: 16,
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
label: '是',
|
||||||
|
id: 'Y'
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'onecheck',
|
||||||
|
title: '系统数据名称',
|
||||||
|
id: 'isSysName',
|
||||||
|
row: 24,
|
||||||
|
disabled: false,
|
||||||
|
required: false,
|
||||||
|
fontSize: 16,
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
label: '是',
|
||||||
|
id: 'Y'
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
],
|
],
|
||||||
optionRuleForm: {},//表字段options数据
|
optionRuleForm: {},//表字段options数据
|
||||||
//type选中后的表
|
//type选中后的表
|
||||||
|
@ -767,6 +824,9 @@ export default {
|
||||||
this.$set(params, 'enName', this.optionRuleForm.enName)
|
this.$set(params, 'enName', this.optionRuleForm.enName)
|
||||||
this.$set(params, 'filedType', this.optionRuleForm.filedType)
|
this.$set(params, 'filedType', this.optionRuleForm.filedType)
|
||||||
this.$set(params, 'filedLength', this.optionRuleForm.filedLength)
|
this.$set(params, 'filedLength', this.optionRuleForm.filedLength)
|
||||||
|
this.$set(params, 'isSysPk', this.optionRuleForm.isSysPk)
|
||||||
|
this.$set(params, 'isSysCode', this.optionRuleForm.isSysCode)
|
||||||
|
this.$set(params, 'isSysName', this.optionRuleForm.isSysName)
|
||||||
this.optionFormRow.forEach(item => {
|
this.optionFormRow.forEach(item => {
|
||||||
if (tempDist[item.elCol[0].id]) {
|
if (tempDist[item.elCol[0].id]) {
|
||||||
tempArr.push({
|
tempArr.push({
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
<main>
|
<main>
|
||||||
<div class="tableData">
|
<div class="tableData">
|
||||||
<div class="tableChunk" v-for="(row,index) in tableData" :key="index">
|
<div class="tableChunk" v-for="(row,index) in tableData" :key="index">
|
||||||
|
|
||||||
<div class="topInfo">
|
<div class="topInfo">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
|
@ -43,7 +44,11 @@
|
||||||
<div class="tableName">
|
<div class="tableName">
|
||||||
<div class="name">{{ row.mdmName }}</div>
|
<div class="name">{{ row.mdmName }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tableType">{{ row.mdmType == 1 ? '档案' : '数据' }}</div>
|
<div style="display: flex;align-items: center">
|
||||||
|
<div class="tableType" style="margin-right: 10px">{{ row.mdmType == 1 ? '档案' : '数据' }}</div>
|
||||||
|
<div class="tableType" style="background: #dca550" >{{ row.tag == 1 ? '手工' : '预制' }}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="tableContent">
|
<div class="tableContent">
|
||||||
{{ row.remark }}
|
{{ row.remark }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -51,7 +56,7 @@
|
||||||
<!-- 遮罩层(显示两按钮)-->
|
<!-- 遮罩层(显示两按钮)-->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="shade">
|
<div class="shade" v-if="row.tag !== '0'">
|
||||||
<div class="btnList">
|
<div class="btnList">
|
||||||
<div class="setting" @click="tableButtonHandle(row,{type:'setting'})">
|
<div class="setting" @click="tableButtonHandle(row,{type:'setting'})">
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
|
|
|
@ -98,6 +98,7 @@ import configData from './configData'
|
||||||
import baseNewForm from '@/views/intergrationTask/compoments/baseNewForm'
|
import baseNewForm from '@/views/intergrationTask/compoments/baseNewForm'
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
import { authApi } from '@/api/apis/auth'
|
import { authApi } from '@/api/apis/auth'
|
||||||
|
import { queryBdInfoAPI } from '@/api/apis/classifyDefinition'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
|
@ -206,23 +207,14 @@ export default {
|
||||||
},
|
},
|
||||||
// 获取下拉数据(作废)
|
// 获取下拉数据(作废)
|
||||||
async initSelectOptions() {
|
async initSelectOptions() {
|
||||||
let params = {
|
const res = await queryBdInfoAPI({})
|
||||||
tab_name: 'mdm',
|
|
||||||
column_name: 'mdm_type'
|
|
||||||
}
|
|
||||||
const res = await getApiModuleApi({
|
|
||||||
tl: 'generalServiceImpl',
|
|
||||||
as: 'dictionaryshop',
|
|
||||||
dj: 'selectDictionaryshop'
|
|
||||||
}, params)
|
|
||||||
this.formRow[1].elCol[0].options = []
|
this.formRow[1].elCol[0].options = []
|
||||||
res.attribute.forEach((item) => {
|
res.attribute.forEach((item) => {
|
||||||
this.formRow[1].elCol[0].options.push({
|
this.formRow[1].elCol[0].options.push({
|
||||||
label: item.column_content,
|
label: item.bdname,
|
||||||
id: item.column_value
|
id: item.pkDdinfo
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
console.log(this.formRow[1].elCol[0].options)
|
|
||||||
},
|
},
|
||||||
// 复制-获取表单数据
|
// 复制-获取表单数据
|
||||||
async initCopyFormData() {
|
async initCopyFormData() {
|
||||||
|
@ -281,7 +273,7 @@ export default {
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// 请求下拉options
|
// 请求下拉options
|
||||||
// this.initSelectOptions()
|
this.initSelectOptions()
|
||||||
// 判断是什么类型进来的
|
// 判断是什么类型进来的
|
||||||
if (this.$route.query.id) {
|
if (this.$route.query.id) {
|
||||||
this.billid = this.$route.query.id
|
this.billid = this.$route.query.id
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<div class="topBox">
|
<div class="topBox">
|
||||||
<div class="searchBox">
|
<div class="searchBox">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex;align-items: center;justify-content: flex-end;">
|
<div style="display: flex;align-items: center;justify-content: flex-end;">
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -100,7 +101,7 @@
|
||||||
@handleConfirmClick="masterPickDialog"
|
@handleConfirmClick="masterPickDialog"
|
||||||
>
|
>
|
||||||
<div class="rightDialogClass_main" style="background-color: #fff;" v-if="masterDialog">
|
<div class="rightDialogClass_main" style="background-color: #fff;" v-if="masterDialog">
|
||||||
<baseChoice ref="baseChoice" :tableData="masterTableData" :tableColumn="masterTableColumn"></baseChoice>
|
<baseChoice ref="baseChoice" :tableData="masterTableData" :tableColumn="masterTableColumn" :pageShow="false"></baseChoice>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<div class="leftTitle" style="display: flex;align-items: center;justify-content: space-between">
|
<div class="leftTitle" style="display: flex;align-items: center;justify-content: space-between">
|
||||||
<div>业务模块</div>
|
<div>业务模块</div>
|
||||||
<div class="icon" style="cursor: pointer" @click="rightAddHandle()">
|
<div class="icon" style="cursor: pointer" @click="rightAddHandle()">
|
||||||
<!-- <i class="el-icon-plus"></i>-->
|
<!-- <i class="el-icon-plus"></i>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="showList">
|
<div class="showList">
|
||||||
|
@ -14,8 +14,8 @@
|
||||||
>
|
>
|
||||||
<div class="name">{{ item.name }}</div>
|
<div class="name">{{ item.name }}</div>
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<!-- <i class="el-icon-edit" @click.stop="editRightTitle(item)" style="margin-right: 10px"></i>-->
|
<!-- <i class="el-icon-edit" @click.stop="editRightTitle(item)" style="margin-right: 10px"></i>-->
|
||||||
<!-- <i class="el-icon-delete" style="color: red" @click.stop="delRightTitle(item)"></i>-->
|
<!-- <i class="el-icon-delete" style="color: red" @click.stop="delRightTitle(item)"></i>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -99,13 +99,15 @@
|
||||||
:dialogVisible.sync="masterDialog"
|
:dialogVisible.sync="masterDialog"
|
||||||
:closeModal="false"
|
:closeModal="false"
|
||||||
:footerShow="true"
|
:footerShow="true"
|
||||||
title="选择主数据"
|
title="选择映射档案"
|
||||||
width="80%"
|
width="80%"
|
||||||
top="10vh"
|
top="10vh"
|
||||||
@handleConfirmClick="masterPickDialog"
|
@handleConfirmClick="masterPickDialog"
|
||||||
>
|
>
|
||||||
<div class="rightDialogClass_main" style="background-color: #fff;" v-if="masterDialog">
|
<div class="rightDialogClass_main" style="background-color: #fff;" v-if="masterDialog">
|
||||||
<baseChoice ref="baseChoice" :tableData="masterTableData" :tableColumn="masterTableColumn"></baseChoice>
|
<baseChoice ref="baseChoice" @getTableList="getTableList" placeholder="基础数据名称"
|
||||||
|
:tableData="masterTableData" :showSearch="true" :tableColumn="masterTableColumn" :pageShow="false"
|
||||||
|
></baseChoice>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
|
@ -128,7 +130,7 @@ import {
|
||||||
businessModuleMdmupdateListAPI,
|
businessModuleMdmupdateListAPI,
|
||||||
businessModulequeryAllAPI,
|
businessModulequeryAllAPI,
|
||||||
businessModuleUpdateAPI, deleteAPI, influenceFactorqueryAllAPI, influenceFactorsaveAPI, influenceFactorupdateAPI,
|
businessModuleUpdateAPI, deleteAPI, influenceFactorqueryAllAPI, influenceFactorsaveAPI, influenceFactorupdateAPI,
|
||||||
queryAllAPI,
|
queryAllAPI, queryBdinfoListAPI,
|
||||||
queryByIdAPI,
|
queryByIdAPI,
|
||||||
queryMdmsByModuleIdAPI
|
queryMdmsByModuleIdAPI
|
||||||
} from '@/api/apis/operationalModule'
|
} from '@/api/apis/operationalModule'
|
||||||
|
@ -142,22 +144,14 @@ export default {
|
||||||
masterTableData: [],
|
masterTableData: [],
|
||||||
masterTableColumn: [
|
masterTableColumn: [
|
||||||
{
|
{
|
||||||
label: '影响因素名称',
|
label: '基础数据编码',
|
||||||
prop: 'factorName'
|
prop: 'bdcode'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '映射档案',
|
label: '基础数据名称',
|
||||||
prop: ''
|
prop: 'bdname'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '备注',
|
|
||||||
prop: 'remark'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '操作',
|
|
||||||
prop: 'operation',
|
|
||||||
width: 60
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
masterDialog: false,
|
masterDialog: false,
|
||||||
basicFormForm: [
|
basicFormForm: [
|
||||||
|
@ -172,7 +166,7 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '映射档案',
|
label: '映射档案',
|
||||||
prop: 'mdmName',
|
prop: 'mappingFileName',
|
||||||
tag: 'elDialog',
|
tag: 'elDialog',
|
||||||
span: 24,
|
span: 24,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
|
@ -212,6 +206,9 @@ export default {
|
||||||
],
|
],
|
||||||
targetDataCode: [
|
targetDataCode: [
|
||||||
{ required: true, message: '请输入目标数据编码', trigger: 'blur' }
|
{ required: true, message: '请输入目标数据编码', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
mappingFileName: [
|
||||||
|
{ required: true, message: '请选择映射档案', trigger: 'change' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
nowBtns: [],
|
nowBtns: [],
|
||||||
|
@ -250,7 +247,7 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '映射档案',
|
label: '映射档案',
|
||||||
prop: ''
|
prop: 'mappingFileName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '备注',
|
label: '备注',
|
||||||
|
@ -273,20 +270,33 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async getTableList(val) {
|
||||||
|
this.openLoading()
|
||||||
|
const res = await queryBdinfoListAPI({
|
||||||
|
bdname: val
|
||||||
|
})
|
||||||
|
this.masterTableData = res.attribute
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.baseChoice.optionData = ''
|
||||||
|
this.$refs.baseChoice.$refs.customtable.clearRadioIndex()
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
masterPickDialog() {
|
masterPickDialog() {
|
||||||
if (!this.$refs.baseChoice.optionData.id) {
|
if (!this.$refs.baseChoice.optionData.bdname) {
|
||||||
this.$vmNews('请选择主数据')
|
this.$vmNews('请选择映射档案')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let row = this.$refs.baseChoice.optionData
|
let row = this.$refs.baseChoice.optionData
|
||||||
this.$set(this.$refs.basicFormRefsName.ruleForm, 'mdmName', row.mdmName)
|
this.$set(this.$refs.basicFormRefsName.ruleForm, 'mappingFileName', row.bdname)
|
||||||
this.$set(this.$refs.basicFormRefsName.ruleForm, 'mdmId', row.id)
|
this.$set(this.$refs.basicFormRefsName.ruleForm, 'mappingFileCode', row.tablename)
|
||||||
this.$set(this.$refs.basicFormRefsName.ruleForm, 'mdmCode', row.mdmCode)
|
this.$set(this.$refs.basicFormRefsName.ruleForm, 'mappingFileId', row.pkBdinfo)
|
||||||
this.masterDialog = false
|
this.masterDialog = false
|
||||||
},
|
},
|
||||||
async elDialogClick(row, index) {
|
async elDialogClick(row, index) {
|
||||||
this.masterDialog = true
|
this.masterDialog = true
|
||||||
const res = await businessModulequeryAllAPI({})
|
this.openLoading()
|
||||||
|
const res = await queryBdinfoListAPI({})
|
||||||
this.masterTableData = res.attribute
|
this.masterTableData = res.attribute
|
||||||
},
|
},
|
||||||
delRightTitle(item) {
|
delRightTitle(item) {
|
||||||
|
|
Loading…
Reference in New Issue