Commit 095ee1e9 by 张立顺

fix bug修复

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