Commit 095ee1e9 by 张立顺

fix bug修复

1 parent ae66c789
......@@ -838,7 +838,7 @@ export default {
const node =
this.$refs[`classification${this.editableTabs[index].name}`][0]
this.errorIndex = index
const res = node.getBackendFormat()
const res = node.getBackendFormat(false)
// if (res) {
this.goodsTypeGroupRulesAll.push(res)
// }
......
......@@ -334,7 +334,7 @@ export default {
return {
merchantRow: {},
classificationObj: {
temporaryArr: [], //保留之前的逻辑,新增一个数组单独处理数据
temporaryArr: [], // 保留之前的逻辑,新增一个数组单独处理数据
goodsTypeGroupRelations: [], // 分账品类(特殊分类有多个,全部没有)
// 流量方
flowCostArr: [],
......@@ -1259,6 +1259,7 @@ export default {
const that = this
// 赋值
const checkRecordItem = res && res[+that.tabindex]
// console.log(checkRecordItem, that.tabindex, res, "checkRecordItem")
if (checkRecordItem) {
that.classificationObj.categoryType = checkRecordItem?.categoryType
that.classificationObj.goodsTypeGroupRelations =
......@@ -1296,7 +1297,7 @@ export default {
// })
},
// 换成后端数据结构
getBackendFormat() {
getBackendFormat(needFilter = true) {
let flowServiceCostArr = [
...this.classificationObj.temporaryArr,
...this.classificationObj.flowCostArr,
......@@ -1311,9 +1312,11 @@ export default {
})
return item
})
flowServiceCostArr = flowServiceCostArr.filter(
(item) => item.expenseCategoryValue
)
if (needFilter) {
flowServiceCostArr = flowServiceCostArr.filter(
(item) => item.expenseCategoryValue
)
}
// 按具体商品
this.classificationObj.upgradeGoods?.map((val) => {
val.categoryType = this.classificationObj.categoryType
......@@ -1328,6 +1331,7 @@ export default {
val.categoryType = this.classificationObj.categoryType
return val
})
console.log(flowServiceCostArr, "flowServiceCostArr")
const expenseCategoryRulesObj = {
groupType: this.tabindex == 0 ? 1 : 2,
categoryType: this.classificationObj.categoryType,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!