|
@@ -18,6 +18,7 @@
|
|
|
>
|
|
>
|
|
|
<template slot="menuLeft">
|
|
<template slot="menuLeft">
|
|
|
<el-button size="small" type="text" :disabled="disabled" @click="allClick('确认选定行')" style="color: #409eff">确认选定行</el-button>
|
|
<el-button size="small" type="text" :disabled="disabled" @click="allClick('确认选定行')" style="color: #409eff">确认选定行</el-button>
|
|
|
|
|
+ <el-button type="text" size="small" :disabled="pageData.length == 0" style="color: #409eff" @click="allClick('一键编辑')">一键编辑</el-button>
|
|
|
<el-tag type="danger" style="margin-right: 2px">应收(CNY):{{ amountDSubSum || 0 }}</el-tag>
|
|
<el-tag type="danger" style="margin-right: 2px">应收(CNY):{{ amountDSubSum || 0 }}</el-tag>
|
|
|
<el-tag type="danger" style="margin-right: 2px">应收(USD):{{ amountDSubUsdSum || 0 }}</el-tag>
|
|
<el-tag type="danger" style="margin-right: 2px">应收(USD):{{ amountDSubUsdSum || 0 }}</el-tag>
|
|
|
<el-tag type="success" style="margin-right: 2px; color: #000000">应付(CNY):{{ amountCSubSum || 0 }}</el-tag>
|
|
<el-tag type="success" style="margin-right: 2px; color: #000000">应付(CNY):{{ amountCSubSum || 0 }}</el-tag>
|
|
@@ -25,6 +26,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
<template slot="currentStlAmountRMB" slot-scope="{ row }">
|
|
<template slot="currentStlAmountRMB" slot-scope="{ row }">
|
|
|
<el-input-number
|
|
<el-input-number
|
|
|
|
|
+ v-if="row.$cellEdit"
|
|
|
v-model="row.currentStlAmountRMB"
|
|
v-model="row.currentStlAmountRMB"
|
|
|
@change="armbChange(row)"
|
|
@change="armbChange(row)"
|
|
|
:controls="false"
|
|
:controls="false"
|
|
@@ -33,9 +35,11 @@
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
:disabled="row.currentStlCurCode != 'CNY' || (row.currentStlAmountRMB == 0 && row.currentStlAmountUSD == 0)"
|
|
:disabled="row.currentStlCurCode != 'CNY' || (row.currentStlAmountRMB == 0 && row.currentStlAmountUSD == 0)"
|
|
|
></el-input-number>
|
|
></el-input-number>
|
|
|
|
|
+ <span v-else>{{ row.currentStlAmountRMB }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
<template slot="currentStlAmountUSD" slot-scope="{ row }">
|
|
<template slot="currentStlAmountUSD" slot-scope="{ row }">
|
|
|
<el-input-number
|
|
<el-input-number
|
|
|
|
|
+ v-if="row.$cellEdit"
|
|
|
v-model="row.currentStlAmountUSD"
|
|
v-model="row.currentStlAmountUSD"
|
|
|
@change="ausdChange(row)"
|
|
@change="ausdChange(row)"
|
|
|
:controls="false"
|
|
:controls="false"
|
|
@@ -44,6 +48,7 @@
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
:disabled="row.currentStlCurCode != 'USD' || (row.currentStlAmountRMB == 0 && row.currentStlAmountUSD == 0)"
|
|
:disabled="row.currentStlCurCode != 'USD' || (row.currentStlAmountRMB == 0 && row.currentStlAmountUSD == 0)"
|
|
|
></el-input-number>
|
|
></el-input-number>
|
|
|
|
|
+ <span v-else>{{ row.currentStlAmountUSD }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
<template slot="reconciliationAmount" slot-scope="{ row }">
|
|
<template slot="reconciliationAmount" slot-scope="{ row }">
|
|
|
<el-popover trigger="click" v-if="Number(row.reconciliationAmount)">
|
|
<el-popover trigger="click" v-if="Number(row.reconciliationAmount)">
|
|
@@ -81,6 +86,9 @@
|
|
|
</el-popover>
|
|
</el-popover>
|
|
|
<span v-else>{{ row.stlAmountDrUSD }}</span>
|
|
<span v-else>{{ row.stlAmountDrUSD }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
+ <template slot-scope="{ row, index }" slot="menu">
|
|
|
|
|
+ <el-button type="text" size="small" @click="rowCell(row, index)"> {{ row.$cellEdit ? "保存" : "编辑" }} </el-button>
|
|
|
|
|
+ </template>
|
|
|
</avue-crud>
|
|
</avue-crud>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -139,7 +147,7 @@ export default {
|
|
|
calcHeight: 30,
|
|
calcHeight: 30,
|
|
|
menuWidth: 60,
|
|
menuWidth: 60,
|
|
|
tip: false,
|
|
tip: false,
|
|
|
- menu: false,
|
|
|
|
|
|
|
+ menu: true,
|
|
|
border: true,
|
|
border: true,
|
|
|
addBtn: false,
|
|
addBtn: false,
|
|
|
viewBtn: false,
|
|
viewBtn: false,
|
|
@@ -157,12 +165,14 @@ export default {
|
|
|
label: "账单编号",
|
|
label: "账单编号",
|
|
|
prop: "accBillNo",
|
|
prop: "accBillNo",
|
|
|
width: 120,
|
|
width: 120,
|
|
|
|
|
+ sortable:true,
|
|
|
overHidden: true,
|
|
overHidden: true,
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
label: "业务编号",
|
|
label: "业务编号",
|
|
|
prop: "billNo",
|
|
prop: "billNo",
|
|
|
width: 120,
|
|
width: 120,
|
|
|
|
|
+ sortable:true,
|
|
|
overHidden: true,
|
|
overHidden: true,
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -175,12 +185,14 @@ export default {
|
|
|
label: "对账单位",
|
|
label: "对账单位",
|
|
|
prop: "corpCnName",
|
|
prop: "corpCnName",
|
|
|
width: 140,
|
|
width: 140,
|
|
|
|
|
+ sortable:true,
|
|
|
overHidden: true,
|
|
overHidden: true,
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
label: "主单号",
|
|
label: "主单号",
|
|
|
prop: "mblno",
|
|
prop: "mblno",
|
|
|
width: 100,
|
|
width: 100,
|
|
|
|
|
+ sortable:true,
|
|
|
overHidden: true,
|
|
overHidden: true,
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -387,7 +399,7 @@ export default {
|
|
|
page: {
|
|
page: {
|
|
|
currentPage: 1,
|
|
currentPage: 1,
|
|
|
total: 0,
|
|
total: 0,
|
|
|
- pageSize: 50,
|
|
|
|
|
|
|
+ pageSize: 200,
|
|
|
pageSizes: [20, 50, 100, 200, 500, "ALL"],
|
|
pageSizes: [20, 50, 100, 200, 500, "ALL"],
|
|
|
},
|
|
},
|
|
|
pageData: [],
|
|
pageData: [],
|
|
@@ -422,7 +434,7 @@ export default {
|
|
|
this.roleName = localStorage.getItem("roleName").split(",");
|
|
this.roleName = localStorage.getItem("roleName").split(",");
|
|
|
this.option = await this.getColumnData(this.getColumnName(487), this.optionBack);
|
|
this.option = await this.getColumnData(this.getColumnName(487), this.optionBack);
|
|
|
},
|
|
},
|
|
|
- mounted() {
|
|
|
|
|
|
|
+ mounted() {
|
|
|
document.addEventListener("keydown", this.handleKeyDown);
|
|
document.addEventListener("keydown", this.handleKeyDown);
|
|
|
document.addEventListener("keyup", this.handleKeyUp);
|
|
document.addEventListener("keyup", this.handleKeyUp);
|
|
|
},
|
|
},
|
|
@@ -503,6 +515,13 @@ export default {
|
|
|
const end = start + this.page.pageSize;
|
|
const end = start + this.page.pageSize;
|
|
|
this.pageData = this.queryData.slice(start, end);
|
|
this.pageData = this.queryData.slice(start, end);
|
|
|
},
|
|
},
|
|
|
|
|
+ rowCell(row, index) {
|
|
|
|
|
+ if (row.$cellEdit == true) {
|
|
|
|
|
+ this.$set(row, "$cellEdit", false);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$set(row, "$cellEdit", true);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
armbChange(row) {
|
|
armbChange(row) {
|
|
|
if (Number(row.amount - row.reconciliationAmount) > 0) {
|
|
if (Number(row.amount - row.reconciliationAmount) > 0) {
|
|
|
if (Number(row.currentStlAmountRMB) < 0) {
|
|
if (Number(row.currentStlAmountRMB) < 0) {
|
|
@@ -540,6 +559,11 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
allClick(name) {
|
|
allClick(name) {
|
|
|
|
|
+ if (name == "一键编辑") {
|
|
|
|
|
+ for (let row of this.queryData) {
|
|
|
|
|
+ this.$set(row, "$cellEdit", true);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
if (name == "确认选定行") {
|
|
if (name == "确认选定行") {
|
|
|
if (this.selectionList.length == 0) {
|
|
if (this.selectionList.length == 0) {
|
|
|
return this.$message.error("请选择明细");
|
|
return this.$message.error("请选择明细");
|
|
@@ -654,22 +678,6 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
selectionChange(list) {
|
|
selectionChange(list) {
|
|
|
- this.amountDSubSum = 0;
|
|
|
|
|
- this.amountDSubUsdSum = 0;
|
|
|
|
|
- this.amountCSubSum = 0;
|
|
|
|
|
- this.amountCSubUsdSum = 0;
|
|
|
|
|
- if (list.length) {
|
|
|
|
|
- list.forEach((e) => {
|
|
|
|
|
- if (e.dc == "D") {
|
|
|
|
|
- this.amountDSubSum += Number(e.currentStlAmountRMB ? e.currentStlAmountRMB : 0);
|
|
|
|
|
- this.amountDSubUsdSum += Number(e.currentStlAmountUSD ? e.currentStlAmountUSD : 0);
|
|
|
|
|
- }
|
|
|
|
|
- if (e.dc == "C") {
|
|
|
|
|
- this.amountCSubSum += Number(e.currentStlAmountRMB ? e.currentStlAmountRMB : 0);
|
|
|
|
|
- this.amountCSubUsdSum += Number(e.currentStlAmountUSD ? e.currentStlAmountUSD : 0);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
this.selectionList = list;
|
|
this.selectionList = list;
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -683,9 +691,9 @@ export default {
|
|
|
}
|
|
}
|
|
|
return rowStyle + "padding:0px;fontSize:12px";
|
|
return rowStyle + "padding:0px;fontSize:12px";
|
|
|
},
|
|
},
|
|
|
- rowClassName({ row, rowIndex }) {
|
|
|
|
|
|
|
+ rowClassName({ row, rowIndex }) {
|
|
|
let rowName = "",
|
|
let rowName = "",
|
|
|
- findRow = this.selectionList.find((c) => c.$index === rowIndex);
|
|
|
|
|
|
|
+ findRow = this.selectionList.find((c) => c.$index === rowIndex);
|
|
|
if (findRow) {
|
|
if (findRow) {
|
|
|
rowName = "current-row "; // elementUI 默认高亮行的class类 不用再样式了^-^,也可通过css覆盖改变背景颜色
|
|
rowName = "current-row "; // elementUI 默认高亮行的class类 不用再样式了^-^,也可通过css覆盖改变背景颜色
|
|
|
}
|
|
}
|
|
@@ -721,6 +729,29 @@ export default {
|
|
|
// deep: true, // 深度监听
|
|
// deep: true, // 深度监听
|
|
|
// immediate: true, // 第一次改变就执行
|
|
// immediate: true, // 第一次改变就执行
|
|
|
// },
|
|
// },
|
|
|
|
|
+ selectionList: {
|
|
|
|
|
+ // 执行方法
|
|
|
|
|
+ handler(oldValue, newValue) {
|
|
|
|
|
+ this.amountDSubSum = 0;
|
|
|
|
|
+ this.amountDSubUsdSum = 0;
|
|
|
|
|
+ this.amountCSubSum = 0;
|
|
|
|
|
+ this.amountCSubUsdSum = 0;
|
|
|
|
|
+ if (oldValue.length) {
|
|
|
|
|
+ oldValue.forEach((e) => {
|
|
|
|
|
+ if (e.dc == "D") {
|
|
|
|
|
+ this.amountDSubSum += Number(e.currentStlAmountRMB ? e.currentStlAmountRMB : 0);
|
|
|
|
|
+ this.amountDSubUsdSum += Number(e.currentStlAmountUSD ? e.currentStlAmountUSD : 0);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (e.dc == "C") {
|
|
|
|
|
+ this.amountCSubSum += Number(e.currentStlAmountRMB ? e.currentStlAmountRMB : 0);
|
|
|
|
|
+ this.amountCSubUsdSum += Number(e.currentStlAmountUSD ? e.currentStlAmountUSD : 0);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ deep: true, // 深度监听
|
|
|
|
|
+ immediate: true, // 第一次改变就执行
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|