Commit 92235744 by zhangxw

嘀加成本 第三方成本修改

1 parent 014f1a04
......@@ -218,7 +218,8 @@
<td class="lb">
商品成本
</td>
<td>{{ detail.goodsCost?('¥ '+detail.goodsCost):'¥0' }}</td>
<!-- 有嘀加成本或第三方成本 商品成本显示- -->
<td>{{ !filterEmpty(detail.djCost) || !filterEmpty(detail.thirdPartyCost) ? '¥0' : (detail.goodsCost?('¥ '+detail.goodsCost):'¥0') }}</td>
<td class="lb">
回收成本
</td>
......@@ -421,6 +422,9 @@ export default {
async getBaseData() {
this.positionTypeList = await this.get(BaseData.positionTypeList)
},
filterEmpty(data) {
return (data ?? '') === ''
},
getDetail(row) {
if (this.$route.params.from && this.$route.params.from == 'orderSupplement') { // 从待补录订单列表跳转过来
mainOrderDetail({ orderCode: row.inputtedOrderCode }).then(res => {
......
......@@ -1130,11 +1130,15 @@ export default {
item.subOrderProfitAllocations
) {
item.subOrderProfitAllocations.forEach(subItem => {
// 有嘀加成本或第三方成本 商品成本显示-
if (!this.filterEmpty(subItem.djCost) || !this.filterEmpty(subItem.thirdPartyCost)) subItem.goodsCost = ''
subItem.uniqueKey = temp++
subItem = this.numAddPrefix(subItem)
subItem.positionStr = this.positionTypeList?.filter(val => val.position == subItem.goodsPosition)[0]?.confName || '-'
})
}
// 有嘀加成本或第三方成本 商品成本显示-
if (!this.filterEmpty(item.djCost) || !this.filterEmpty(item.thirdPartyCost)) item.goodsCost = ''
item = this.numAddPrefix(item)
return item
})
......@@ -1145,6 +1149,9 @@ export default {
}
})
},
filterEmpty(data) {
return (data ?? '') === ''
},
numAddPrefix(item) {
const moneyLabels = [
'goodsCost',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!