Commit 7ee16a9b by 李伟康

Merge branch 'feature/584/lwk' into 'SAAS+V5.8.4'

refactor(SplitPaymentTable): 优化表格组件数据处理逻辑

See merge request !900
2 parents 8aed27ee f505b9cb
...@@ -34,7 +34,6 @@ export default { ...@@ -34,7 +34,6 @@ export default {
}, },
shelfType: Number, shelfType: Number,
currentTrafficParty: Object, currentTrafficParty: Object,
trafficParty: Array,
parentName: String, parentName: String,
}, },
data() { data() {
...@@ -86,10 +85,9 @@ export default { ...@@ -86,10 +85,9 @@ export default {
tableRows() { tableRows() {
const rows = [], const rows = [],
{ currentTrafficParty, shelfType, nameMap, trafficParty ,parentName} = this { currentTrafficParty, shelfType, nameMap ,parentName , componentData} = this
// 固定的业务对象类型(平台方、服务商、4s店) // 固定的业务对象类型(平台方、服务商、4s店)
const fixedMerchantTypes = [1, 2, 3] const fixedMerchantTypes = [1, 2, 3]
let hasService2 = trafficParty.every(item => item.serviceMerchant2fId !== null && item.serviceMerchant2fId !== undefined)
// 添加固定的三行 // 添加固定的三行
fixedMerchantTypes.forEach(type => { fixedMerchantTypes.forEach(type => {
let merchantTypeName = this.merchantTypeMap[type] || '' let merchantTypeName = this.merchantTypeMap[type] || ''
...@@ -103,7 +101,7 @@ export default { ...@@ -103,7 +101,7 @@ export default {
rows.push(row) rows.push(row)
}) })
let hasService2 = componentData.some(item => item.targetMerchantType == 5)
if (hasService2) { if (hasService2) {
let service2Name = this.merchantTypeMap[5] || '' let service2Name = this.merchantTypeMap[5] || ''
if (shelfType == 1) { if (shelfType == 1) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!