Commit a2a5db79 authored by Bill's avatar Bill

Merge branch 'fix418' into 'v2-220418'

处理销售订单详情显示总计金额异常 See merge request linkseeks-design/pro-platform!364
parents e09ef2b4 acdc6b86
......@@ -24,6 +24,9 @@ export const fileChangeStringArray = (arr) => arr.map(item => {
return param
})
const isAll = (element) => {
return element.some(item => item['provinceCode'] === '0' && item['cityCode'] === '0')
}
/** 传参 数据转换 id:判断是否编辑 */
export const paramsConversionFn = (value) => {
......@@ -80,26 +83,29 @@ export const paramsConversionFn = (value) => {
return param
})
}
// 增加不限区域和城市字段
if (value?.inviteTenderAreaList?.length > 0) {
// if (value?.inviteTenderAreaList?.length > 0) {
if (value?.inviteTenderAreaList?.length > 0 && !isAll(value.inviteTenderAreaList)) {
value.isAllArea = false
value['inviteTenderAreaList'] = _value.inviteTenderAreaList.map(item => {
let param = {
id: item.id,
provinceCode: item.provinceCode,
provinceName: item.province,
cityCode: item.cityCode,
cityName: item.city,
isAllCity: item?.cityCode ? false : true
}
if(pageStatus === PageStatus.ADD) {
delete param.id
}
return param
})
} else {
value.isAllArea = true
}
value['inviteTenderAreaList'] = _value.inviteTenderAreaList.map(item => {
let param = {
id: item.id,
provinceCode: item.provinceCode,
provinceName: item.province,
cityCode: item.cityCode,
cityName: item.city,
isAllCity: (item?.cityCode !== '0' ) ? false : true
}
if(pageStatus === PageStatus.ADD) {
delete param.id
}
return param
})
return value
}
......
......@@ -197,7 +197,8 @@ export const MoneyTotalBox = ({ dataSource, isEditData, setCouponModalVisible })
// 总计金额
useEffect(() => {
setAmountMoney(() => (sum * 1000 + freePrice * 1000) / 1000)
// setAmountMoney(() => (sum * 1000 + freePrice * 1000) / 1000)
setAmountMoney(() => totalAmount)
}, [sum, freePrice])
// // 待审核详情设置运费
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment