Commit 3738d6b5 authored by 吴滔's avatar 吴滔

修复提交收款单问题/应收账单优化/收款列表优化

parent 7fcbd165
......@@ -280,7 +280,7 @@
</el-card>
<el-card class="card">
<div slot="header" class="card-title">应收账单</div>
<el-table :data="form.receiptAccountList" border>
<el-table :data="form.receiptAccountList" border :key="form.receiptAccountList.length">
<el-table-column label="应收币种" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
......@@ -430,7 +430,7 @@
</el-card> -->
</el-form>
<div slot="footer" style="margin: 20px 0">
<el-button type="primary" @click="submitForm(1)">保 存</el-button>
<el-button type="primary" :loading="saveBtnLoading" @click="submitForm(1)">保 存</el-button>
<el-button type="primary" @click="submitForm(0)">{{ id ? '修 改' : '新 增' }}</el-button>
</div>
<el-dialog
......@@ -579,7 +579,19 @@
></dict-tag>
</template>
</el-table-column>
<el-table-column label="单价美元" align="center" prop="unitPrice" />
<!-- <el-table-column label="单价美元" align="center" prop="unitPrice" /> -->
<el-table-column label="单价" align="center" prop="unitPrice">
<template slot-scope="scope">
<span>{{ scope.row.unitPrice }}</span>
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
</template>
</el-table-column>
<el-table-column label="总金额" align="center" prop="totalAmount">
<template slot-scope="scope">
<span>{{ scope.row.totalAmount }}</span>
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
......@@ -663,7 +675,8 @@ export default {
tradeCityList: [],
id: 0,
receiptId: 0,
currencyList: []
currencyList: [],
saveBtnLoading: false
};
},
async created() {
......@@ -1009,6 +1022,7 @@ export default {
this.open = false;
},
submitForm(addType) {
this.saveBtnLoading = true
const params = {...this.form, addType}
params.receiptAccountList.length = params.receiptAccountList.length - 1
// params.receiptAccountList = params.receiptAccountList.map(v => Object.assign(v, { }))
......@@ -1018,6 +1032,7 @@ export default {
}
if (params.receivableVOList.length === 0) {
this.$modal.msgError("请添加未收客户款项");
this.saveBtnLoading = false
return
}
if (addType === 1) {
......@@ -1038,11 +1053,13 @@ export default {
if (this.id && this.id !== '0') {
updateReceipt(params).then(res => {
this.$modal.msgSuccess("修改成功");
this.saveBtnLoading = false
this.$router.back();
})
} else {
createReceipt(params).then(res => {
this.$modal.msgSuccess("保存成功");
this.saveBtnLoading = false
this.$router.back();
})
}
......@@ -1066,11 +1083,13 @@ export default {
if (this.id && this.id !== '0') {
updateReceipt(params).then(res => {
this.$modal.msgSuccess("修改成功");
this.saveBtnLoading = false
this.$router.back();
})
} else {
createReceipt(params).then(res => {
this.$modal.msgSuccess("新增成功");
this.saveBtnLoading = false
this.$router.back();
})
}
......
......@@ -113,7 +113,11 @@
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="收款单号" align="center" prop="receiptNo" />
<el-table-column label="收款单号" align="center" prop="receiptNo">
<template slot-scope="scope">
<el-button size="mini" type="text" @click="verificationCancelClick(scope.row)">{{ scope.row.receiptNo }}</el-button>
</template>
</el-table-column>
<!-- <el-table-column label="自编号" align="center" prop="orderNo" /> -->
<el-table-column label="订单号" align="center" prop="orderNo" />
<el-table-column label="客户名称" align="center" prop="customerName" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment