lilei 1 week ago
parent
commit
6c600b333c

+ 6 - 5
src/views/salesManagement/salesQueryNew/comps/activeStatisticsList.vue

@@ -169,7 +169,8 @@ export default {
       // 格式化数字金额单元格
       const formatTd = (row, column, rowIndex, uniKey, fun) => {
         const ismktj = column.field == 'specialPriceSelected' && row.totalPromoOrigAmount
-        if (column.field != 'regularBaseVal' && column.field != 'regularNextVal' ? row[column.field] : (row[column.field] || row[column.field] == 0)) {
+        console.log(row[column.field], column.field)
+        if (row[column.field] != undefined) {
           return (<div onClick={() => fun ? fun(row, uniKey) : false}><span class={fun ? 'table-link-btn' : (column.field == 'geteBalance' || column.field == 'regularBaseVal') ? 'table-word-color' : ''}>{row[column.field]}</span>{ismktj ? <span>({row.totalPromoOrigAmount})</span> : ''}<span style="font-size:10px;zoom:0.7;margin-left:3px;">{row[uniKey]}</span></div>)
         } else {
           return ''
@@ -607,11 +608,11 @@ export default {
         // 正价统计
         const isYuan1 = item.regularRuleUnit == 'YUAN'
         const regularUnit = isYuan1 ? '元' : '个' // 单位
-        const regularSelected = isYuan1 ? (item.regularAmount || item.regularAmount == 0 ? Number(item.regularAmount).toFixed(2) : undefined) : item.regularQty // 已选
-        const regularTotal = isYuan1 ? (item.regularBorrowAmount || item.regularBorrowAmount == 0 ? Number(item.regularBorrowAmount).toFixed(2) : undefined) : item.regularBorrowQty // 累计
+        const regularSelected = isYuan1 ? (item.regularAmount || item.regularAmount == 0 ? Number(item.regularAmount).toFixed(2) : undefined) : (item.regularQty || item.regularQty == 0 ? item.regularQty : undefined)// 已选
+        const regularTotal = isYuan1 ? (item.regularBorrowAmount || item.regularBorrowAmount == 0 ? Number(item.regularBorrowAmount).toFixed(2) : undefined) : (item.regularBorrowQty || item.regularBorrowQty == 0 ? item.regularBorrowQty : undefined) // 累计
         const regularPromotionSameFlag = item.promotionRule.promotionRuleType === 'BUY_PROD_GIVE_PROD' && item.promotionRule.regularPromotionSameFlag == 1 // 促销品是否与正品一致
-        const baseVal1 = isYuan1 ? (item.regularRuleValue || item.regularRuleValue == 0 ? Number(item.regularRuleValue).toFixed(2) : undefined) : item.regularRuleValue
-        const nextVal1 = isYuan1 ? (item.regularShortfallValue || item.regularShortfallValue == 0 ? Number(item.regularShortfallValue).toFixed(2) : undefined) : item.regularShortfallValue
+        const baseVal1 = item.regularRuleValue || item.regularRuleValue == 0 ? (isYuan1 ? Number(item.regularRuleValue).toFixed(2) : item.regularRuleValue) : undefined
+        const nextVal1 = item.regularShortfallValue || item.regularShortfallValue == 0 ? (isYuan1 ? Number(item.regularShortfallValue).toFixed(2) : item.regularShortfallValue) : undefined
         const regularBaseVal = regularPromotionSameFlag ? undefined : baseVal1 // 基础差
         const regularNextVal = regularPromotionSameFlag ? undefined : nextVal1 // 下级差
         // 促销品