Commit 4e42c5fd by zhangxw

后端数据类型返回修改

1 parent 810a467c
...@@ -110,7 +110,7 @@ export const handleGradeData = (dataFromApi, salePeriodList = []) => { ...@@ -110,7 +110,7 @@ export const handleGradeData = (dataFromApi, salePeriodList = []) => {
_gradeObj.gradeConfigList.push({ _gradeObj.gradeConfigList.push({
maxPrice: NP.divide(maxPrice || 0, 1000000), maxPrice: NP.divide(maxPrice || 0, 1000000),
minPrice: NP.divide(minPrice || 0, 1000000), minPrice: NP.divide(minPrice || 0, 1000000),
priceCoefficient: priceCoefficient?.toFixed(16).replace(/\.?0+$/, ''), priceCoefficient: priceCoefficient,
computeFlag, computeFlag,
id id
}) })
...@@ -126,7 +126,7 @@ export const handleGradeData = (dataFromApi, salePeriodList = []) => { ...@@ -126,7 +126,7 @@ export const handleGradeData = (dataFromApi, salePeriodList = []) => {
let arr = [] let arr = []
salePeriodList?.forEach(it => { salePeriodList?.forEach(it => {
let _obj = gradeConfigList.find(o => o.servicePeriod == it && NP.divide(o.minPrice || 0, 1000000) == item.minPrice && NP.divide(o.maxPrice || 0, 1000000) == item.maxPrice) let _obj = gradeConfigList.find(o => o.servicePeriod == it && NP.divide(o.minPrice || 0, 1000000) == item.minPrice && NP.divide(o.maxPrice || 0, 1000000) == item.maxPrice)
arr.push({ id: _obj?.id, servicePeriod: it, shelfCost: _obj?.shelfCost?.toFixed(16).replace(/\.?0+$/, ''), salesCost: _obj?.salesCost?.toFixed(16).replace(/\.?0+$/, '') }) arr.push({ id: _obj?.id, servicePeriod: it, shelfCost: _obj?.shelfCost, salesCost: _obj?.salesCost })
}) })
item.childSalePeriodData = arr item.childSalePeriodData = arr
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!