|
|
@@ -408,7 +408,7 @@
|
|
|
>
|
|
|
<template slot="menuLeft">
|
|
|
<div>
|
|
|
- <el-button size="small" type="success" :disabled="editSave" :loading="saveLoading" @click="SelectedRows">确认选定行 </el-button>
|
|
|
+ <el-button size="small" type="success" :disabled="editSave||generateStatus" :loading="saveLoading" @click="SelectedRows">确认选定行 </el-button>
|
|
|
<span style="font-size: 18px;font-weight: 600;margin-left: 50px;">
|
|
|
<span style="color: #67C23A;margin-right: 10px;"> CNY:¥{{ Number(amountSubSum).toFixed(2) }}元 </span>
|
|
|
<span style="color: #E6A23C;"> USD:${{ Number(amountSubUsdSum).toFixed(2) }}元 </span>
|
|
|
@@ -609,6 +609,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ generateStatus: false,
|
|
|
amountSubSum: 0,
|
|
|
amountDSubSum: 0,
|
|
|
amountCSubSum: 0,
|
|
|
@@ -1010,13 +1011,16 @@ export default {
|
|
|
editCustomer(type) {
|
|
|
this.$refs.form.validate(valid => {
|
|
|
if (!valid) return;
|
|
|
- if (!this.form.id) {
|
|
|
- // 是否选择从表数据
|
|
|
- if (this.addData.length == 0) {
|
|
|
- this.$message.warning("请选择结算数据");
|
|
|
- return;
|
|
|
+ if (!this.generateStatus) {
|
|
|
+ if (!this.form.id) {
|
|
|
+ // 是否选择从表数据
|
|
|
+ if (this.addData.length == 0) {
|
|
|
+ this.$message.warning("请选择结算数据");
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
if (type == "结算") {
|
|
|
if (this.auditing == 1) {
|
|
|
for (let [index, row] of this.tableData.entries()) {
|
|
|
@@ -1149,6 +1153,21 @@ export default {
|
|
|
this.saveLoading = false;
|
|
|
});
|
|
|
} else {
|
|
|
+ if (this.generateStatus) {
|
|
|
+ this.form.finStlBillsItemsList = this.tableData.map((item, index) => {
|
|
|
+ if (item.currentStlCurCode == "CNY") {
|
|
|
+ item.currentStlAmount = item.currentStlAmountRMB;
|
|
|
+ } else {
|
|
|
+ item.currentStlAmount = item.currentStlAmountUSD;
|
|
|
+ }
|
|
|
+ if (!this.form.id) {
|
|
|
+ // delete item.businessType
|
|
|
+ delete item.billDate;
|
|
|
+ delete item.accountDc;
|
|
|
+ }
|
|
|
+ return item;
|
|
|
+ });
|
|
|
+ }
|
|
|
finstlbillsSubmit(this.form)
|
|
|
.then(res => {
|
|
|
this.$message.success("操作成功");
|
|
|
@@ -1225,6 +1244,7 @@ export default {
|
|
|
// 结算按钮
|
|
|
generateFinStlBillsfun(id, dc, type) {
|
|
|
let typeName = null;
|
|
|
+ this.generateStatus = true;
|
|
|
this.pageLoading = true;
|
|
|
this.settlementType = dc;
|
|
|
if (type == "CHK") {
|