Commit afb49f7e authored by dcy's avatar dcy

Merge remote-tracking branch 'origin/dev' into dev

parents 5aa0b34d 12e6c35f
...@@ -280,7 +280,7 @@ ...@@ -280,7 +280,7 @@
</el-card> </el-card>
<el-card class="card"> <el-card class="card">
<div slot="header" class="card-title">应收账单</div> <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"> <el-table-column label="应收币种" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
...@@ -430,7 +430,7 @@ ...@@ -430,7 +430,7 @@
</el-card> --> </el-card> -->
</el-form> </el-form>
<div slot="footer" style="margin: 20px 0"> <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> <el-button type="primary" @click="submitForm(0)">{{ id ? '修 改' : '新 增' }}</el-button>
</div> </div>
<el-dialog <el-dialog
...@@ -579,7 +579,19 @@ ...@@ -579,7 +579,19 @@
></dict-tag> ></dict-tag>
</template> </template>
</el-table-column> </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> </el-table>
<pagination <pagination
v-show="total > 0" v-show="total > 0"
...@@ -663,7 +675,8 @@ export default { ...@@ -663,7 +675,8 @@ export default {
tradeCityList: [], tradeCityList: [],
id: 0, id: 0,
receiptId: 0, receiptId: 0,
currencyList: [] currencyList: [],
saveBtnLoading: false
}; };
}, },
async created() { async created() {
...@@ -1009,6 +1022,7 @@ export default { ...@@ -1009,6 +1022,7 @@ export default {
this.open = false; this.open = false;
}, },
submitForm(addType) { submitForm(addType) {
this.saveBtnLoading = true
const params = {...this.form, addType} const params = {...this.form, addType}
params.receiptAccountList.length = params.receiptAccountList.length - 1 params.receiptAccountList.length = params.receiptAccountList.length - 1
// params.receiptAccountList = params.receiptAccountList.map(v => Object.assign(v, { })) // params.receiptAccountList = params.receiptAccountList.map(v => Object.assign(v, { }))
...@@ -1018,6 +1032,7 @@ export default { ...@@ -1018,6 +1032,7 @@ export default {
} }
if (params.receivableVOList.length === 0) { if (params.receivableVOList.length === 0) {
this.$modal.msgError("请添加未收客户款项"); this.$modal.msgError("请添加未收客户款项");
this.saveBtnLoading = false
return return
} }
if (addType === 1) { if (addType === 1) {
...@@ -1038,11 +1053,13 @@ export default { ...@@ -1038,11 +1053,13 @@ export default {
if (this.id && this.id !== '0') { if (this.id && this.id !== '0') {
updateReceipt(params).then(res => { updateReceipt(params).then(res => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.saveBtnLoading = false
this.$router.back(); this.$router.back();
}) })
} else { } else {
createReceipt(params).then(res => { createReceipt(params).then(res => {
this.$modal.msgSuccess("保存成功"); this.$modal.msgSuccess("保存成功");
this.saveBtnLoading = false
this.$router.back(); this.$router.back();
}) })
} }
...@@ -1066,11 +1083,13 @@ export default { ...@@ -1066,11 +1083,13 @@ export default {
if (this.id && this.id !== '0') { if (this.id && this.id !== '0') {
updateReceipt(params).then(res => { updateReceipt(params).then(res => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.saveBtnLoading = false
this.$router.back(); this.$router.back();
}) })
} else { } else {
createReceipt(params).then(res => { createReceipt(params).then(res => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.saveBtnLoading = false
this.$router.back(); this.$router.back();
}) })
} }
......
...@@ -113,7 +113,11 @@ ...@@ -113,7 +113,11 @@
<span>{{ scope.$index + 1 }}</span> <span>{{ scope.$index + 1 }}</span>
</template> </template>
</el-table-column> </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="orderNo" /> <el-table-column label="订单号" align="center" prop="orderNo" />
<el-table-column label="客户名称" align="center" prop="customerName" /> <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