|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<trade-card title="费用信息">
|
|
|
- <el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
+ <el-tabs v-model="activeNameTwo" @tab-click="handleClick">
|
|
|
<el-tab-pane label="应收" name="first" :key="'first'" v-if="tabShow == 1 || tabShow == 2">
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="应付" name="second" :key="'second'" v-if="tabShow == 1 || tabShow == 3">
|
|
@@ -463,27 +463,27 @@ export default {
|
|
|
placeholder: "请点击右边按钮选择",
|
|
|
dicData: []
|
|
|
},
|
|
|
- activeName: "first"
|
|
|
+ activeNameTwo: "first"
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
listData(newVla, oldVal) {
|
|
|
this.data_one = newVla.filter(item => item.feesType === 1); //应收
|
|
|
this.data_two = newVla.filter(item => item.feesType === 2); //应付
|
|
|
- if (this.activeName === "first") {
|
|
|
+ if (this.activeNameTwo === "first") {
|
|
|
this.dataList = this.data_one;
|
|
|
} else {
|
|
|
this.dataList = this.data_two;
|
|
|
}
|
|
|
+ this.key++
|
|
|
},
|
|
|
code(newVla, oldVal) {
|
|
|
if (this.code){
|
|
|
this.findObject(this.option.column, "code").dicUrl = `/api/blade-box-tube/archives/selectArchivesByCodeList?code=${this.code}`
|
|
|
}
|
|
|
- console.log(this.code)
|
|
|
this.key++
|
|
|
},
|
|
|
- activeName(newVla, oldVal) {
|
|
|
+ activeNameTwo(newVla, oldVal) {
|
|
|
if (newVla !== oldVal) {
|
|
|
if (newVla === "first") {
|
|
|
this.data_two = this.dataList;
|
|
@@ -534,10 +534,10 @@ export default {
|
|
|
this.optionBack = this.boxTube
|
|
|
}
|
|
|
if (!this.codeValue) this.codeValue = 235.2
|
|
|
- // 判断tabShow的activeName默认的显示
|
|
|
- this.activeName = this.tabShow == 1 ? "first" : this.tabShow == 2 ? "first" : "second";
|
|
|
+ // 判断activeNameTwo默认的显示
|
|
|
+ this.activeNameTwo = this.activeName
|
|
|
this.option = await this.getColumnData(this.getColumnName(this.codeValue), this.optionBack);
|
|
|
- if (this.activeName === "first") {
|
|
|
+ if (this.activeNameTwo === "first") {
|
|
|
this.findObject(this.option.column, "corpName").label = "收款对象"
|
|
|
} else {
|
|
|
this.findObject(this.option.column, "corpName").label = "付款对象"
|
|
@@ -574,7 +574,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
handleClick(tab, event) {
|
|
|
- // this.activeName = tab.name
|
|
|
+ this.activeNameTwo = tab.name
|
|
|
if (tab.name === "first") {
|
|
|
this.findObject(this.option.column, "corpName").label = "收款对象"
|
|
|
} else {
|
|
@@ -584,18 +584,20 @@ export default {
|
|
|
rowSave(form, done, loading) {
|
|
|
done({
|
|
|
...form,
|
|
|
- feesType: this.activeName === "first" ? 1 : 2,
|
|
|
+ feesType: this.activeNameTwo === "first" ? 1 : 2,
|
|
|
sort: this.dataList.length
|
|
|
})
|
|
|
- if (this.activeName === "first") {
|
|
|
- this.$emit("callBack", this.dataList.concat(this.data_two));
|
|
|
+ if (this.activeNameTwo === "first") {
|
|
|
+ this.dataList = this.dataList.concat(this.data_two)
|
|
|
+ this.$emit("callBack", this.dataList);
|
|
|
} else {
|
|
|
- this.$emit("callBack", this.data_one.concat(this.dataList));
|
|
|
+ this.dataList = this.dataList.concat(this.data_one)
|
|
|
+ this.$emit("callBack", this.dataList);
|
|
|
}
|
|
|
},
|
|
|
rowUpdate(form, index, done, loading) {
|
|
|
done(form)
|
|
|
- if (this.activeName === "first") {
|
|
|
+ if (this.activeNameTwo === "first") {
|
|
|
this.$emit("callBack", this.dataList.concat(this.data_two));
|
|
|
} else {
|
|
|
this.$emit("callBack", this.data_one.concat(this.dataList));
|
|
@@ -613,7 +615,7 @@ export default {
|
|
|
if (res.data.success) {
|
|
|
this.dataList.splice(index, 1);
|
|
|
this.$message.success("操作成功!");
|
|
|
- if (this.activeName === "first") {
|
|
|
+ if (this.activeNameTwo === "first") {
|
|
|
this.$emit("callBack", this.dataList.concat(this.data_two));
|
|
|
} else {
|
|
|
this.$emit("callBack", this.data_one.concat(this.dataList));
|
|
@@ -623,7 +625,7 @@ export default {
|
|
|
} else {
|
|
|
this.dataList.splice(index, 1);
|
|
|
this.$message.success("操作成功!");
|
|
|
- if (this.activeName === "first") {
|
|
|
+ if (this.activeNameTwo === "first") {
|
|
|
this.$emit("callBack", this.dataList.concat(this.data_two));
|
|
|
} else {
|
|
|
this.$emit("callBack", this.data_one.concat(this.dataList));
|