Commit 8a7c611d authored by dragondean@qq.com's avatar dragondean@qq.com

修复几个bug

parent 5d57b2db
...@@ -282,9 +282,9 @@ export default { ...@@ -282,9 +282,9 @@ export default {
couponList: [], // 优惠券列表 couponList: [], // 优惠券列表
couponIds:[], couponIds:[],
fee:{ fee:{
1: [{type:1},{type:1}], // 运费 1: [],
2: [{type:2},{type:2}], // 清关费 2: [],
3: [{}] // 优惠券专用 3: []
} }
}; };
}, },
...@@ -313,13 +313,13 @@ export default { ...@@ -313,13 +313,13 @@ export default {
return 3 return 3
} }
let costType = null let costType = null
for(let type in this.fee){ for(let type in this.fee){
let feeList = this.fee[type] let feeList = this.fee[type]
feeList.forEach(item => { feeList.forEach(item => {
if(item.reduceAmount){ if(item.reduceAmount){
costType = type costType = type
return false return false
} }
}) })
} }
return costType return costType
...@@ -389,36 +389,46 @@ export default { ...@@ -389,36 +389,46 @@ export default {
this.readonly = true this.readonly = true
} }
getCurrencyList().then(res => this.currencyList = res.data) getCurrencyList().then(res => this.currencyList = res.data)
if (this.$route.query.id) { if (this.$route.query.id) {
getCoupon(this.$route.query.id).then((res) => { getCoupon(this.$route.query.id).then((res) => {
this.form = res.data this.form = res.data
if(this.form.couponIds){ if(this.form.couponIds){
let couponIds = this.form.couponIds.split(',').filter(item => item && item != '') let couponIds = this.form.couponIds.split(',').filter(item => item && item != '')
console.log({couponIds}) console.log({couponIds})
this.$nextTick(res => { this.$nextTick(res => {
this.couponIds = couponIds.map(item => parseInt(item)) this.couponIds = couponIds.map(item => parseInt(item))
}) })
} }
if(this.form.discountDetailedVOs){ if(this.form.discountDetailedVOs){
/* this[['clearanceFeeList', 'freightFeeList', 'discountList'][]] */ /* this[['clearanceFeeList', 'freightFeeList', 'discountList'][]] */
this.fee[this.form.costType] = this.form.discountDetailedVOs // this.fee[this.form.costType] = this.form.discountDetailedVOs.filter(item => item.type == this.form.costType)
} }
if(this.costType != this.form.costType){ this.form.discountDetailedVOs.forEach(item => {
console.error(`费用类型冲突,计算出来的类型为${this.costType},接口费用类型为${res.data.costType},类型为${res.data.type}`) this.fee[item.type].push(item)
this.$alert(this.$t('费用类型冲突')) })
} /* if(this.costType != this.form.costType){
// 非优惠券需要查询出优惠券作为叠加备选 console.error(`费用类型冲突,计算出来的类型为${this.costType},接口费用类型为${res.data.costType},类型为${res.data.type}`)
if(this.form.type != 1){ this.$alert(this.$t('费用类型冲突'))
this.getCouponSelect() } */
} // 非优惠券需要查询出优惠券作为叠加备选
if(this.form.type != 1){
this.getCouponSelect()
}
// 如果是复制,则需要去掉id // 如果是复制,则需要去掉id
if(this.$route.query.action == 'copy'){ if(this.$route.query.action == 'copy'){
this.form.couponId = null this.form.couponId = null
}
} }
); })
}
// 不是编辑查看则给默认的费用表格
else{
this.fee = {
1: [{type:1},{type:1}], // 运费
2: [{type:2},{type:2}], // 清关费
3: [{}] // 优惠券专用
}
} }
this.reset() this.reset()
}, },
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
</div> </div>
<el-table :data="[formData]" border class="release-table"> <el-table :data="[formData]" border class="release-table">
<el-table-column :label="$t('控货箱数')"> <el-table-column :label="$t('控货箱数')">
{{detail.sumNum}} {{detail.sumNum - detail.releaseNum }}
</el-table-column> </el-table-column>
<el-table-column :label="$t('放货箱数')"> <el-table-column :label="$t('放货箱数')">
<template slot-scope="{row}"> <template slot-scope="{row}">
......
...@@ -201,10 +201,14 @@ ...@@ -201,10 +201,14 @@
{{objective.titleZh || '-'}} {{objective.titleZh || '-'}}
</el-table-column> </el-table-column>
<el-table-column :label="$t('品名')" prop="titleZh"></el-table-column> <el-table-column :label="$t('品名')" prop="titleZh"></el-table-column>
<el-table-column :label="$t('箱数')" prop="num"></el-table-column> <el-table-column :label="$t('箱数')" prop="num">
<template slot-scope="{row}">
{{row.num || '-'}}
</template>
</el-table-column>
<el-table-column :label="$t('体积/重量')"> <el-table-column :label="$t('体积/重量')">
<template slot-scope="{row}"> <template slot-scope="{row}">
{{row.volume}} / {{row.weight}} {{row.volume || '-'}} / {{row.weight || '-'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('收款类型')"> <el-table-column :label="$t('收款类型')">
......
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