会计事项平台更新
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",
|
||||
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>
|
||||
<!-- 权限设置弹框 -->
|
||||
<!-- :style="{'margin':isCenter?'auto':''}"> -->
|
||||
|
||||
<div v-loading="treeLoading" flex style="margin:auto;height: 100%;">
|
||||
<div style="height: 100%">
|
||||
<div flex="cross:center" v-if="filterShow" style="margin-bottom: 5px">
|
||||
<el-input
|
||||
placeholder="输入关键字进行过滤"
|
||||
v-model="filterText"
|
||||
style="margin-right: 13px"
|
||||
></el-input>
|
||||
<el-button
|
||||
icon="el-icon-plus"
|
||||
style="height: 32px; line-height: 32px; padding: 0 13px !important"
|
||||
@click="add"
|
||||
v-if="filterButtonShow"
|
||||
>
|
||||
</el-button>
|
||||
</div>
|
||||
<div
|
||||
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"
|
||||
@node-click="handleNodeClick" :expand-on-click-node="false" :default-expand-all="expandAll"
|
||||
:key="new Date().getTime()" :props="treeProps" style="width: 100%;background-color:white;height: 100%;"
|
||||
@check-change="checkChange" node-key="id" ref="elTree" :show-checkbox="showCheckbox"
|
||||
<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 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>
|
||||
</template>
|
||||
|
@ -31,54 +111,103 @@ export default {
|
|||
// 是否默认展开所有节点
|
||||
expandAll: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
default: true,
|
||||
},
|
||||
// 操作按钮
|
||||
treeButton: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// 操作按钮
|
||||
filterButtonShow: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// 是否显示保存按钮
|
||||
isSaveBtn: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
default: false,
|
||||
},
|
||||
// 是否显示全选按钮
|
||||
Allshow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
default: false,
|
||||
},
|
||||
// 是否显示多选按钮
|
||||
showCheckbox: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
default: false,
|
||||
},
|
||||
// 是否居中
|
||||
isCenter: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
default: true,
|
||||
},
|
||||
// 是否显示筛选
|
||||
filterShow: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
menuData: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
return [];
|
||||
},
|
||||
},
|
||||
setting: {
|
||||
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: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
default() {
|
||||
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() {
|
||||
return {
|
||||
theme: '',
|
||||
filterText: "",
|
||||
theme: "",
|
||||
powerDlog: false,
|
||||
// 菜单数据
|
||||
// menuData: [],
|
||||
// 回显选中ids
|
||||
selectData: [],
|
||||
// 树状图设置
|
||||
|
@ -86,50 +215,75 @@ export default {
|
|||
// label: 'menuName',
|
||||
// children: 'id',
|
||||
// },
|
||||
// treeProps: {
|
||||
// children: 'children',
|
||||
// label: 'label'
|
||||
// },
|
||||
|
||||
// PC菜单全选
|
||||
checkedAllPc: false,
|
||||
// 防连点
|
||||
outing: false,
|
||||
treeLoading: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
mounted() {
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
mounted() {},
|
||||
computed: {
|
||||
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: {
|
||||
//选中第一个
|
||||
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) {
|
||||
el.active = !el.active
|
||||
this.$forceUpdate()
|
||||
el.active = !el.active;
|
||||
this.$forceUpdate();
|
||||
},
|
||||
setData(id) {
|
||||
this.selectData.push(id)
|
||||
this.selectData.push(id);
|
||||
},
|
||||
saveMenuUser() {
|
||||
let allKeys = this.getKey()
|
||||
this.$emit('onSaveMenu', allKeys)
|
||||
let allKeys = this.getKey();
|
||||
this.$emit("onSaveMenu", allKeys);
|
||||
},
|
||||
// 获取选中的key值
|
||||
getKey() {
|
||||
return this.$refs.elTree.getCheckedKeys()
|
||||
return this.$refs.elTree.getCheckedKeys();
|
||||
},
|
||||
// 初始数据
|
||||
initData() {
|
||||
|
@ -137,21 +291,21 @@ export default {
|
|||
// this.menuData = [];
|
||||
|
||||
// 回显选中ids
|
||||
this.selectData = []
|
||||
this.selectData = [];
|
||||
},
|
||||
// 关闭弹窗
|
||||
handleClose() {
|
||||
this.powerDlog = false
|
||||
this.initData()
|
||||
this.powerDlog = false;
|
||||
this.initData();
|
||||
},
|
||||
// 全选、反选
|
||||
changePcAll() {
|
||||
this.checkedAllPc = !this.checkedAllPc
|
||||
let selectData = []
|
||||
this.checkedAllPc = !this.checkedAllPc;
|
||||
let selectData = [];
|
||||
if (this.checkedAllPc) {
|
||||
selectData = this.cycleData(this.menuData)
|
||||
selectData = this.cycleData(this.menuData);
|
||||
}
|
||||
this.selectData = selectData
|
||||
this.selectData = selectData;
|
||||
},
|
||||
/**
|
||||
* @description 递归获取菜单id(树状 多叉树结构)
|
||||
|
@ -161,46 +315,46 @@ export default {
|
|||
* @param {Boolean} isSelect: false返回所有id,true返回已选择id
|
||||
*/
|
||||
cycleData(outData, isSelect) {
|
||||
let newData = []
|
||||
let newData = [];
|
||||
|
||||
function cycle(data) {
|
||||
if (!data || data.length == 0) {
|
||||
return false
|
||||
return false;
|
||||
} else {
|
||||
for (var i = 0, len = data.length; i < len; i++) {
|
||||
let item = data[i]
|
||||
let item = data[i];
|
||||
if (isSelect && item.selected == 1) {
|
||||
newData.push(item.id)
|
||||
newData.push(item.id);
|
||||
}
|
||||
if (!isSelect) {
|
||||
newData.push(item.id)
|
||||
newData.push(item.id);
|
||||
}
|
||||
cycle(item.id)
|
||||
cycle(item.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cycle(outData)
|
||||
return newData
|
||||
cycle(outData);
|
||||
return newData;
|
||||
},
|
||||
getData(childIds) {
|
||||
let newData = []
|
||||
let newData = [];
|
||||
|
||||
function cycle(data) {
|
||||
data.forEach(el => {
|
||||
childIds.forEach(item => {
|
||||
data.forEach((el) => {
|
||||
childIds.forEach((item) => {
|
||||
if (el.id == item) {
|
||||
newData.push(el)
|
||||
newData.push(el);
|
||||
}
|
||||
})
|
||||
});
|
||||
if (el.children != null && el.children && el.children.length) {
|
||||
cycle(el.children, childIds)
|
||||
cycle(el.children, childIds);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
cycle(this.menuData, childIds)
|
||||
return newData
|
||||
cycle(this.menuData, childIds);
|
||||
return newData;
|
||||
},
|
||||
/**
|
||||
* @description 节点选中状态发生变化时的回调
|
||||
|
@ -210,38 +364,46 @@ export default {
|
|||
* @param { Boolean } 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 childIds = getHalfCheckedKeys.length != 0 ? getHalfCheckedKeys : this.selectData
|
||||
let checkdata = this.getData(childIds)
|
||||
this.$emit('checkChange', childIds, checkdata)
|
||||
return
|
||||
|
||||
let id = nodeDode.id
|
||||
let childIds =
|
||||
getHalfCheckedKeys.length != 0 ? getHalfCheckedKeys : this.selectData;
|
||||
let checkdata = this.getData(childIds);
|
||||
this.$emit("checkChange", childIds, checkdata);
|
||||
return;
|
||||
let id = nodeDode.id;
|
||||
// let childIds = this.cycleData(id)
|
||||
console.log(id)
|
||||
// 循环设置子项是否选中
|
||||
childIds.forEach(item => {
|
||||
this.$refs.elTree.setChecked(item, checked)
|
||||
})
|
||||
childIds.forEach((item) => {
|
||||
this.$refs.elTree.setChecked(item, checked);
|
||||
});
|
||||
},
|
||||
// 点击事件
|
||||
handleNodeClick(data, b, c) {
|
||||
this.$emit('handleNodeClick', data, b.parent.data)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
this.$emit("handleNodeClick", data, b, c);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
// $activeColor:val(--activeColor, "#00aaff");
|
||||
.nowrap {
|
||||
/*让长段文本不换行*/
|
||||
white-space: nowrap;
|
||||
/*设置文本超出元素宽度部分隐藏*/
|
||||
overflow-x: hidden;
|
||||
/*设置文本超出部分用省略号显示*/
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.el-tree-node__content {
|
||||
height: 32px !important;
|
||||
}
|
||||
|
||||
.el-tree-node__label {
|
||||
font-size: 14px !important;
|
||||
// font-size: 16px !important;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
|
@ -262,9 +424,31 @@ export default {
|
|||
}
|
||||
</style>
|
||||
<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 {
|
||||
width: 100%;
|
||||
// margin-bottom: 24px;
|
||||
height: 100%;
|
||||
|
||||
&-f {
|
||||
color: #52575a;
|
||||
|
@ -275,10 +459,10 @@ export default {
|
|||
|
||||
&-t {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
// height: 450px;
|
||||
// border: 1px solid #d8d8d8;
|
||||
overflow-y: auto;
|
||||
height: 100%;
|
||||
// overflow-y: auto;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -298,7 +482,7 @@ export default {
|
|||
transition: all 0.3s ease-in-out;
|
||||
|
||||
&:hover {
|
||||
color: #4570fc;
|
||||
color: #ecf5ff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -2,38 +2,44 @@
|
|||
<div flex>
|
||||
<div class="treeBody" v-if="menuData.length > 0">
|
||||
<base-tree ref="baseTree" :isCenter="false" :isSaveBtn="false" :Allshow="false" :showCheckbox="false"
|
||||
:menuData="menuData" @handleNodeClick="handleNodeClick">
|
||||
:menuData="menuData" @handleNodeClick="handleNodeClick"
|
||||
>
|
||||
</base-tree>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
<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"
|
||||
:tableData="tableData" :tableColumn="tableColumn" :funData="[]" @onCellClick="getCell" :tableHeight="tableHeightLog"
|
||||
@onSelectionChange="getSelect" :highlightCurrent="true" @radioChange="radioChange">
|
||||
:tableData="tableData" :tableColumn="tableColumn" :funData="[]" @onCellClick="getCell"
|
||||
:tableHeight="tableHeightLog"
|
||||
@onSelectionChange="getSelect" :highlightCurrent="true" @radioChange="radioChange"
|
||||
>
|
||||
<!-- 单选 -->
|
||||
<template v-slot:option="{row}">
|
||||
<el-radio v-model="radio" :label="row.$index" ></el-radio>
|
||||
<el-radio v-model="radio" :label="row.$index"></el-radio>
|
||||
</template>
|
||||
</base-table>
|
||||
<base-page :pageModel.sync="pageModel" @onPageChange="pageChange" :pageSizesList='[10 , 20, 80, 100, 150]'></base-page>
|
||||
<base-page :pageModel.sync="pageModel" @onPageChange="pageChange" :pageSizesList="[10 , 20, 80, 100, 150]"
|
||||
v-if="pageShow"
|
||||
></base-page>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import baseTable from "@/components/base/baseTable";
|
||||
import baseLayout from "@/components/base/baseLayout";
|
||||
import baseJurisdiction from "@/components/base/baseJurisdiction/index.vue";
|
||||
import baseTree from "@/components/base/BaseMenuTree/index.vue";
|
||||
import basePage from '@/components/base/basePage'
|
||||
import configData from "./configData";
|
||||
export default {
|
||||
name: "review",
|
||||
import baseTable from '@/components/base/baseTable'
|
||||
import baseLayout from '@/components/base/baseLayout'
|
||||
import baseJurisdiction from '@/components/base/baseJurisdiction/index.vue'
|
||||
import baseTree from '@/components/base/BaseMenuTree/index.vue'
|
||||
import basePage from '@/components/base/basePage'
|
||||
import configData from './configData'
|
||||
|
||||
export default {
|
||||
name: 'review',
|
||||
components: {
|
||||
baseLayout,
|
||||
baseTable,
|
||||
|
@ -53,32 +59,42 @@
|
|||
},
|
||||
tableColumn: {
|
||||
type: Array,
|
||||
default () {
|
||||
default() {
|
||||
return []
|
||||
},
|
||||
}
|
||||
},
|
||||
menuData: {
|
||||
type: Array,
|
||||
default () {
|
||||
default() {
|
||||
return []
|
||||
},
|
||||
}
|
||||
},
|
||||
tableData: {
|
||||
type: Array,
|
||||
default () {
|
||||
default() {
|
||||
return []
|
||||
}
|
||||
},
|
||||
pageShow: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
showSearch: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
watch: {
|
||||
choiceDialog: {
|
||||
deep: true, //深度监听设置为 true
|
||||
handler: function(newV, oldV) {
|
||||
if(this.choiceDialog){
|
||||
if (this.choiceDialog) {
|
||||
this.reset()
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -88,7 +104,7 @@
|
|||
pageModel: {
|
||||
total: 0,
|
||||
page: 1,
|
||||
limit: 10,
|
||||
limit: 10
|
||||
},
|
||||
write: '',
|
||||
nowBtns: [{
|
||||
|
@ -98,8 +114,8 @@
|
|||
tabLoading: false,
|
||||
selectTable: [], //多选
|
||||
settingsDialog: false,
|
||||
settingCenter: "left",
|
||||
tableHeightLog: "calc(100vh - 416px)",
|
||||
settingCenter: 'left',
|
||||
tableHeightLog: 'calc(100vh - 416px)'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -124,7 +140,8 @@
|
|||
goInfo(type = 1, id) {
|
||||
|
||||
},
|
||||
getElSelect(event, index, indexItem, param) {},
|
||||
getElSelect(event, index, indexItem, param) {
|
||||
},
|
||||
// 按钮点击事件
|
||||
getFuncBtn(btnEven) {
|
||||
console.log(btnEven)
|
||||
|
@ -140,7 +157,7 @@
|
|||
handleNodeClick(data) {
|
||||
this.organizationForm = {
|
||||
o_OrganCode: data.o_OrganCode,
|
||||
ParentOrganName: data.label,
|
||||
ParentOrganName: data.label
|
||||
}
|
||||
this.propvalue = data.label
|
||||
this.optionData = ''
|
||||
|
@ -149,19 +166,24 @@
|
|||
},
|
||||
// 页数或每页条数更改时触发
|
||||
pageChange() {
|
||||
this.$emit('onQuery', this.mergeParam())
|
||||
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;
|
||||
this.pageModel.page = 1
|
||||
}
|
||||
let page = {
|
||||
page: this.pageModel.page,
|
||||
limit: this.pageModel.limit,
|
||||
limit: this.pageModel.limit
|
||||
}
|
||||
for (let i in this.model) {
|
||||
if (!this.model[i]) {
|
||||
this.model[i] = null;
|
||||
this.model[i] = null
|
||||
}
|
||||
}
|
||||
let search = Object.assign({}, page, this.model)
|
||||
|
@ -173,7 +195,7 @@
|
|||
},
|
||||
//查询
|
||||
search() {
|
||||
this.$emit('getTableList', this.write);
|
||||
this.$emit('getTableList', this.write)
|
||||
},
|
||||
radioChange(val) {
|
||||
this.optionData = val
|
||||
|
@ -186,25 +208,25 @@
|
|||
},
|
||||
mounted() {
|
||||
// this.$refs.choice.reset()
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.treeBody {
|
||||
.treeBody {
|
||||
background-color: #f2f3f4;
|
||||
width: 25%;
|
||||
margin-top: 10px;
|
||||
height: calc(100vh - 360px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
|
||||
/* >>>.el-table__body-wrapper {
|
||||
/* >>>.el-table__body-wrapper {
|
||||
height: 300px !important;
|
||||
} */
|
||||
} */
|
||||
|
||||
.app-container {
|
||||
.app-container {
|
||||
height: calc(100% - 52px);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -89,6 +89,25 @@
|
|||
<div v-if="row.tag === 'elLook'">
|
||||
{{ ruleForm[row.prop] }}
|
||||
</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
|
||||
@change="selectChange($event, index, indexRow, row.options,row)"
|
||||
:disabled="row.disabled?row.disabled:false"
|
||||
|
@ -106,6 +125,8 @@
|
|||
:clearable="row.clearable" :placeholder="!row.placeholder ? '请选择' : row.placeholder"
|
||||
@change="selectChange($event, index, indexRow, row.options, row)"
|
||||
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]"
|
||||
:label="!row.optionLabel ? el['label'] : el[row.optionLabel]"
|
||||
|
@ -217,6 +238,51 @@ export default {
|
|||
},
|
||||
computed: {},
|
||||
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() {
|
||||
this.$emit('changeRemind', this.ruleForm)
|
||||
},
|
||||
|
@ -399,7 +465,7 @@ export default {
|
|||
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) {
|
||||
this.$emit('changeRemind', this.ruleForm)
|
||||
}
|
||||
|
|
|
@ -179,6 +179,9 @@
|
|||
</span>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
v4 as uuidv4
|
||||
} from 'uuid'
|
||||
import Sortable from "sortablejs";
|
||||
export default {
|
||||
props: {
|
||||
|
@ -399,7 +402,7 @@ export default {
|
|||
},
|
||||
// 保存选中的数据id,row-key就是要指定一个key标识这一行的数据
|
||||
getRowKey(row) {
|
||||
return row.id;
|
||||
return row.id ? row.id : uuidv4()
|
||||
},
|
||||
// 多选事件
|
||||
handleSelectionChange(selectTable) {
|
||||
|
|
|
@ -1,101 +1,357 @@
|
|||
<!--
|
||||
* @name: 弹窗配置
|
||||
* @author: zhangpengcheng
|
||||
* @date: 2022-08-25
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<div v-for="(item, index) in parentTreeData" :key="index" class="classifyButtonList">
|
||||
<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>
|
||||
<!-- 权限设置弹框 -->
|
||||
<!-- :style="{'margin':isCenter?'auto':''}"> -->
|
||||
|
||||
<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>
|
||||
<menu-tree v-if="item.isShow && item.children" :parent-tree-data="item.children"></menu-tree>
|
||||
<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>
|
||||
export default {
|
||||
name: "menuTree",
|
||||
// import { queryMenuList, menuListSave } from '@/api/apis/auth'
|
||||
export default {
|
||||
props: {
|
||||
parentTreeData: {
|
||||
// 是否默认展开所有节点
|
||||
expandAll: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
// 是否显示保存按钮
|
||||
isSaveBtn: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// 是否显示全选按钮
|
||||
Allshow: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// 是否显示多选按钮
|
||||
showCheckbox: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// 是否居中
|
||||
isCenter: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
currentNodeKey: {
|
||||
type: [String, Number],
|
||||
default: '',
|
||||
},
|
||||
keyWord: {
|
||||
type: [String, Number],
|
||||
default: '',
|
||||
},
|
||||
menuData: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
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: {
|
||||
// 展开或者隐藏下级目录
|
||||
showHidden(item, index) {
|
||||
// this.parentTreeData.forEach(value => {
|
||||
// // parentTreeData[i]的show属性不等于当前数据的isShow属性那么menuList[i]等于false
|
||||
// if (value.isShow !== this.parentTreeData[index].isShow) {
|
||||
// value.isShow = false;
|
||||
// }
|
||||
//选中第一个
|
||||
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;
|
||||
// });
|
||||
item.isShow = !item.isShow;
|
||||
this.$forceUpdate()
|
||||
},
|
||||
setCheck(menuIDs){
|
||||
this.setButtonName(this.parentTreeData,menuIDs)
|
||||
// this.$forceUpdate()
|
||||
// 初始数据
|
||||
initData() {
|
||||
// 菜单数据
|
||||
// this.menuData = [];
|
||||
|
||||
// 回显选中ids
|
||||
this.selectData = [];
|
||||
},
|
||||
setButtonName(menuData,data) {
|
||||
menuData.forEach((el, index) => {
|
||||
data.forEach(item=>{
|
||||
// 关闭弹窗
|
||||
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) {
|
||||
el.checked = true
|
||||
newData.push(el);
|
||||
}
|
||||
})
|
||||
});
|
||||
if (el.children != null && el.children && el.children.length) {
|
||||
this.setButtonName(el.children,data)
|
||||
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>
|
||||
<style lang="scss">
|
||||
$activeColor: var(--bg-color, "#00aaff");
|
||||
// $activeColor:val(--activeColor, "#00aaff");
|
||||
|
||||
.el-icon-star-on {
|
||||
/* color: #00aa00; */
|
||||
color: $activeColor;
|
||||
}
|
||||
.recordText {
|
||||
border: 1px solid #fff;
|
||||
padding: 3px 10px;
|
||||
.el-tree-node__content {
|
||||
height: 32px !important;
|
||||
}
|
||||
|
||||
.el-tree-node__label {
|
||||
font-size: 14px !important;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.el-tree-node__content > label.el-checkbox {
|
||||
transform: scale(1.3);
|
||||
}
|
||||
|
||||
.el-tree-node__content > .el-tree-node__expand-icon {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.el-checkbox__label {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.checkBox .el-checkbox__inner {
|
||||
transform: scale(1.3);
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
.menu-i {
|
||||
width: 100%;
|
||||
// margin-bottom: 24px;
|
||||
|
||||
&-f {
|
||||
color: #333;
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
&-t {
|
||||
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;
|
||||
background: #f2f2f2;
|
||||
color: #4e4e4e;
|
||||
margin:5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.recordText.active {
|
||||
background-color: $activeColor;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
.tree-div {
|
||||
|
||||
}
|
||||
.classifyButtonList{
|
||||
// margin-bottom: 10px;
|
||||
padding: 0 0 0 10px;
|
||||
// cursor: pointer;
|
||||
line-height: 25px;
|
||||
.title{
|
||||
// text-align: right;
|
||||
// width: 20%;
|
||||
}
|
||||
transition: all 0.3s ease-in-out;
|
||||
|
||||
&:hover {
|
||||
color: #4570fc;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -36,7 +36,7 @@ export function openLoading(loadingName='加载中') {
|
|||
})
|
||||
setTimeout(() => {
|
||||
appLoading.close();
|
||||
}, 10000)
|
||||
}, 1000000)
|
||||
}
|
||||
export function closeLoading() {
|
||||
if (appLoading) {
|
||||
|
|
|
@ -17,6 +17,14 @@ export function getNowTime() {
|
|||
|
||||
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) {
|
||||
if (!str) {
|
||||
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
|
||||
.dispatch("Login", this.loginForm)
|
||||
.then(() => {
|
||||
console.log(123,'123')
|
||||
this.loading = false;
|
||||
this.$router
|
||||
.push({
|
||||
|
|
|
@ -71,6 +71,7 @@
|
|||
v-model="ruleForm[row.id]"
|
||||
v-if="row.type == 'onecheck'"
|
||||
:disabled="disabled"
|
||||
:true-label="row.options ? row.options[0].id : true"
|
||||
>是
|
||||
</el-checkbox>
|
||||
<el-input
|
||||
|
|
|
@ -12,6 +12,19 @@ const addForm = [
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'select',
|
||||
title: '外部档案映射',
|
||||
id: 'u8cDbPk',
|
||||
row: 24,
|
||||
disabled: false,
|
||||
required: false,
|
||||
fontSize: 16
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
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数据
|
||||
//type选中后的表
|
||||
|
@ -767,6 +824,9 @@ export default {
|
|||
this.$set(params, 'enName', this.optionRuleForm.enName)
|
||||
this.$set(params, 'filedType', this.optionRuleForm.filedType)
|
||||
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 => {
|
||||
if (tempDist[item.elCol[0].id]) {
|
||||
tempArr.push({
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
<main>
|
||||
<div class="tableData">
|
||||
<div class="tableChunk" v-for="(row,index) in tableData" :key="index">
|
||||
|
||||
<div class="topInfo">
|
||||
<div class="left">
|
||||
<div class="icon">
|
||||
|
@ -43,7 +44,11 @@
|
|||
<div class="tableName">
|
||||
<div class="name">{{ row.mdmName }}</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">
|
||||
{{ row.remark }}
|
||||
</div>
|
||||
|
@ -51,7 +56,7 @@
|
|||
<!-- 遮罩层(显示两按钮)-->
|
||||
|
||||
</div>
|
||||
<div class="shade">
|
||||
<div class="shade" v-if="row.tag !== '0'">
|
||||
<div class="btnList">
|
||||
<div class="setting" @click="tableButtonHandle(row,{type:'setting'})">
|
||||
<div class="icon">
|
||||
|
|
|
@ -98,6 +98,7 @@ import configData from './configData'
|
|||
import baseNewForm from '@/views/intergrationTask/compoments/baseNewForm'
|
||||
import request from '@/utils/request'
|
||||
import { authApi } from '@/api/apis/auth'
|
||||
import { queryBdInfoAPI } from '@/api/apis/classifyDefinition'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
@ -206,23 +207,14 @@ export default {
|
|||
},
|
||||
// 获取下拉数据(作废)
|
||||
async initSelectOptions() {
|
||||
let params = {
|
||||
tab_name: 'mdm',
|
||||
column_name: 'mdm_type'
|
||||
}
|
||||
const res = await getApiModuleApi({
|
||||
tl: 'generalServiceImpl',
|
||||
as: 'dictionaryshop',
|
||||
dj: 'selectDictionaryshop'
|
||||
}, params)
|
||||
const res = await queryBdInfoAPI({})
|
||||
this.formRow[1].elCol[0].options = []
|
||||
res.attribute.forEach((item) => {
|
||||
this.formRow[1].elCol[0].options.push({
|
||||
label: item.column_content,
|
||||
id: item.column_value
|
||||
label: item.bdname,
|
||||
id: item.pkDdinfo
|
||||
})
|
||||
})
|
||||
console.log(this.formRow[1].elCol[0].options)
|
||||
},
|
||||
// 复制-获取表单数据
|
||||
async initCopyFormData() {
|
||||
|
@ -281,7 +273,7 @@ export default {
|
|||
},
|
||||
created() {
|
||||
// 请求下拉options
|
||||
// this.initSelectOptions()
|
||||
this.initSelectOptions()
|
||||
// 判断是什么类型进来的
|
||||
if (this.$route.query.id) {
|
||||
this.billid = this.$route.query.id
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
<div class="right">
|
||||
<div class="topBox">
|
||||
<div class="searchBox">
|
||||
|
||||
</div>
|
||||
<div style="display: flex;align-items: center;justify-content: flex-end;">
|
||||
<el-button
|
||||
|
@ -100,7 +101,7 @@
|
|||
@handleConfirmClick="masterPickDialog"
|
||||
>
|
||||
<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>
|
||||
</base-dialog>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<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>-->
|
||||
<!-- <i class="el-icon-plus"></i>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="showList">
|
||||
|
@ -14,8 +14,8 @@
|
|||
>
|
||||
<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>-->
|
||||
<!-- <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>
|
||||
|
@ -99,13 +99,15 @@
|
|||
:dialogVisible.sync="masterDialog"
|
||||
:closeModal="false"
|
||||
:footerShow="true"
|
||||
title="选择主数据"
|
||||
title="选择映射档案"
|
||||
width="80%"
|
||||
top="10vh"
|
||||
@handleConfirmClick="masterPickDialog"
|
||||
>
|
||||
<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>
|
||||
</base-dialog>
|
||||
|
@ -128,7 +130,7 @@ import {
|
|||
businessModuleMdmupdateListAPI,
|
||||
businessModulequeryAllAPI,
|
||||
businessModuleUpdateAPI, deleteAPI, influenceFactorqueryAllAPI, influenceFactorsaveAPI, influenceFactorupdateAPI,
|
||||
queryAllAPI,
|
||||
queryAllAPI, queryBdinfoListAPI,
|
||||
queryByIdAPI,
|
||||
queryMdmsByModuleIdAPI
|
||||
} from '@/api/apis/operationalModule'
|
||||
|
@ -142,22 +144,14 @@ export default {
|
|||
masterTableData: [],
|
||||
masterTableColumn: [
|
||||
{
|
||||
label: '影响因素名称',
|
||||
prop: 'factorName'
|
||||
label: '基础数据编码',
|
||||
prop: 'bdcode'
|
||||
},
|
||||
{
|
||||
label: '映射档案',
|
||||
prop: ''
|
||||
label: '基础数据名称',
|
||||
prop: 'bdname'
|
||||
},
|
||||
{
|
||||
label: '备注',
|
||||
prop: 'remark'
|
||||
},
|
||||
{
|
||||
label: '操作',
|
||||
prop: 'operation',
|
||||
width: 60
|
||||
}
|
||||
|
||||
],
|
||||
masterDialog: false,
|
||||
basicFormForm: [
|
||||
|
@ -172,7 +166,7 @@ export default {
|
|||
},
|
||||
{
|
||||
label: '映射档案',
|
||||
prop: 'mdmName',
|
||||
prop: 'mappingFileName',
|
||||
tag: 'elDialog',
|
||||
span: 24,
|
||||
disabled: false,
|
||||
|
@ -212,6 +206,9 @@ export default {
|
|||
],
|
||||
targetDataCode: [
|
||||
{ required: true, message: '请输入目标数据编码', trigger: 'blur' }
|
||||
],
|
||||
mappingFileName: [
|
||||
{ required: true, message: '请选择映射档案', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
nowBtns: [],
|
||||
|
@ -250,7 +247,7 @@ export default {
|
|||
},
|
||||
{
|
||||
label: '映射档案',
|
||||
prop: ''
|
||||
prop: 'mappingFileName'
|
||||
},
|
||||
{
|
||||
label: '备注',
|
||||
|
@ -273,20 +270,33 @@ export default {
|
|||
}
|
||||
},
|
||||
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() {
|
||||
if (!this.$refs.baseChoice.optionData.id) {
|
||||
this.$vmNews('请选择主数据')
|
||||
if (!this.$refs.baseChoice.optionData.bdname) {
|
||||
this.$vmNews('请选择映射档案')
|
||||
return
|
||||
}
|
||||
let row = this.$refs.baseChoice.optionData
|
||||
this.$set(this.$refs.basicFormRefsName.ruleForm, 'mdmName', row.mdmName)
|
||||
this.$set(this.$refs.basicFormRefsName.ruleForm, 'mdmId', row.id)
|
||||
this.$set(this.$refs.basicFormRefsName.ruleForm, 'mdmCode', row.mdmCode)
|
||||
this.$set(this.$refs.basicFormRefsName.ruleForm, 'mappingFileName', row.bdname)
|
||||
this.$set(this.$refs.basicFormRefsName.ruleForm, 'mappingFileCode', row.tablename)
|
||||
this.$set(this.$refs.basicFormRefsName.ruleForm, 'mappingFileId', row.pkBdinfo)
|
||||
this.masterDialog = false
|
||||
},
|
||||
async elDialogClick(row, index) {
|
||||
this.masterDialog = true
|
||||
const res = await businessModulequeryAllAPI({})
|
||||
this.openLoading()
|
||||
const res = await queryBdinfoListAPI({})
|
||||
this.masterTableData = res.attribute
|
||||
},
|
||||
delRightTitle(item) {
|
||||
|
|
Loading…
Reference in New Issue