Commit ecf1b9ec authored by dragondean@qq.com's avatar dragondean@qq.com

修复新增收款单异常

parent 756b93ff
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</el-radio-group> </el-radio-group>
</div> </div>
<el-row class="" :gutter="10"> <el-row class="" :gutter="10">
<template v-for="item in filteredRouterList"> <template v-for="(item, index) in filteredRouterList">
<el-col :span="12" :key="item.value"> <el-col :span="12" :key="item.value">
<el-card class="mb-10"> <el-card class="mb-10">
<div slot="header"> <div slot="header">
...@@ -51,6 +51,9 @@ ...@@ -51,6 +51,9 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')" prop=""> <el-table-column :label="$t('操作')" prop="">
<template slot="header">
<el-checkbox @change="toggleGroupChecker(index, $event)"></el-checkbox>
</template>
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-checkbox :checked="getSelectedIndex(row) > -1" @change="toggleChecker(row, $event)"></el-checkbox> <el-checkbox :checked="getSelectedIndex(row) > -1" @change="toggleChecker(row, $event)"></el-checkbox>
</template> </template>
...@@ -197,6 +200,14 @@ export default { ...@@ -197,6 +200,14 @@ export default {
}, },
methods:{ methods:{
// 全选、全不选 某个运输方式所有线路
toggleGroupChecker(index, selected){
let routerList = this.filteredRouterList[index].routerList
console.log(routerList.length, selected)
routerList.forEach(router => {
this.toggleChecker(router, selected)
})
},
getOpenedRouterList(){ getOpenedRouterList(){
let params = {} let params = {}
if(this.exportCity){ if(this.exportCity){
......
...@@ -266,7 +266,7 @@ ...@@ -266,7 +266,7 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('应收金额')" align="center" prop="receivableAmount"> <el-table-column :label="$t('应收金额')" align="center" prop="receivableAmount">
<template slot-scope="scope" v-if="scope.row.type !== 'total'"> <template slot-scope="scope" v-if="scope.row.type !== 'total'">
{{ `${NP.minus(scope.row.receivableAmount, scope.row.discountTotal)}${scope.row.discountTotal > 0 ? `(${scope.row.receivableAmount} - ${scope.row.discountTotal})` : ''}` }} {{ `${NP.minus(scope.row.receivableAmount, scope.row.discountTotal || 0)}${scope.row.discountTotal > 0 ? `(${scope.row.receivableAmount} - ${scope.row.discountTotal})` : ''}` }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" width="220"> <el-table-column align="center" width="220">
...@@ -1147,6 +1147,7 @@ export default { ...@@ -1147,6 +1147,7 @@ export default {
this.saveBtnLoading = false this.saveBtnLoading = false
}) })
} else { } else {
params.currencyId = this.showCurrencyId
createReceipt(params).then(res => { createReceipt(params).then(res => {
this.$modal.msgSuccess(this.$t('保存成功')); this.$modal.msgSuccess(this.$t('保存成功'));
this.$router.back(); this.$router.back();
...@@ -1170,6 +1171,7 @@ export default { ...@@ -1170,6 +1171,7 @@ export default {
this.saveBtnLoading = false this.saveBtnLoading = false
}) })
} else { } else {
params.currencyId = this.showCurrencyId
createReceipt(params).then(res => { createReceipt(params).then(res => {
this.$modal.msgSuccess(this.$t('新增成功')); this.$modal.msgSuccess(this.$t('新增成功'));
this.$router.back(); this.$router.back();
......
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