Commit 3f7f90f2 by 前端

第二轮BUG修复

1 parent 81a3abb1
......@@ -210,7 +210,11 @@
<td class="lb">
商品成本
</td>
<td>{{ detail.goodsCost ? '¥ ' + detail.goodsCost : '¥0' }}</td>
<!-- 子订单有嘀加成本或第三方成本 商品成本显示- -->
<td v-if="isSubOrder">
{{ !filterEmpty(detail.djCost) || !filterEmpty(detail.thirdPartyCost) ? '-' : detail.goodsCost ? '¥ ' + detail.goodsCost : '¥0' }}
</td>
<td v-else>{{ detail.goodsCostForShow ? '¥ ' + detail.goodsCostForShow : '-' }}</td>
<td class="lb">
回收成本
</td>
......@@ -357,6 +361,9 @@ export default {
},
methods: {
filterEmpty(data) {
return (data ?? '') === ''
},
getDetail(row) {
if (this.isSubOrder) {
this.$apis.finance.subOrderDetail({ subOrderCode: row.orderCode }).then(res => {
......
......@@ -84,11 +84,11 @@
<span>{{ scope.row.packageName || '-' }}</span>
</template>
</el-table-column>
<el-table-column prop="goodsName"
<el-table-column prop="goodsPositionName"
label="部位"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.positionStr || '-' }}</span>
<span>{{ scope.row.goodsPositionName || '-' }}</span>
</template>
</el-table-column>
<el-table-column prop="upgradeGoodsAlias"
......@@ -518,8 +518,8 @@ export default {
1: '毛利',
2: '收入'
},
sceneList: sceneList,
positionTypeList: [] // 商品部位数据
sceneList: sceneList
// positionTypeList: [] // 商品部位数据
}
},
mounted() {
......@@ -580,14 +580,14 @@ export default {
},
methods: {
async getBaseData() {
this.getPositionList()
// this.getPositionList()
this.getOptionsList()
},
getPositionList() {
this.$apis.sysBase.getPositionList({ goodsType: 1 }).then(res => {
this.positionTypeList = res
})
},
// getPositionList() {
// this.$apis.sysBase.getPositionList({ goodsType: 1 }).then(res => {
// this.positionTypeList = res
// })
// },
getServiceStore(merchantId) {
this.$apis.public
......@@ -718,6 +718,8 @@ export default {
item.uniqueKey = temp++
if (item.hasOwnProperty('subOrderProfitAllocations') && 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.positionValue == subItem.goodsPosition)[0]?.positionName || '-'
......@@ -789,6 +791,10 @@ export default {
// window.location.href = res
exportFn(res)
})
},
filterEmpty(data) {
return (data ?? '') === ''
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!