Commit 3f7f90f2 by 前端

第二轮BUG修复

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