lilei 1 week ago
parent
commit
94e54a52a7

+ 10 - 9
src/views/salesManagement/salesQueryNew/comps/activeStatisticsList.vue

@@ -171,7 +171,8 @@ export default {
         const ismktj = column.field == 'specialPriceSelected' && row.totalPromoOrigAmount
         console.log(row[column.field], row[column.field] != undefined, 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>)
+          const isred = column.field == 'regularNextVal' && row[column.field] > 0
+          return (<div onClick={() => fun ? fun(row, uniKey) : false}><span class={fun ? 'table-link-btn' : (column.field == 'geteBalance' || isred) ? '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 ''
         }
@@ -592,19 +593,19 @@ export default {
         // 门槛统计
         const isYuan = item.gateRuleUnit == 'YUAN'
         const gateUnit = isYuan ? '元' : '个' // 单位
-        const gateSelected = isYuan ? (item.gateAmount || item.gateAmount == 0 ? Number(item.gateAmount).toFixed(2) : undefined) : item.gateQty // 已选
-        const gateTotal = isYuan ? (item.gateBorrowAmount || item.gateBorrowAmount == 0 ? Number(item.gateBorrowAmount).toFixed(2) : undefined) : item.gateBorrowQty // 累计
+        const gateSelected = isYuan ? (item.gateAmount || item.gateAmount == 0 ? Number(item.gateAmount).toFixed(2) : undefined) : (item.gateQty || item.gateQty == 0 ? item.gateQty : undefined) // 已选
+        const gateTotal = isYuan ? (item.gateBorrowAmount || item.gateBorrowAmount == 0 ? Number(item.gateBorrowAmount).toFixed(2) : undefined) : (item.gateBorrowQty || item.gateBorrowQty == 0 ? item.gateBorrowQty : undefined) // 累计
         const geteBalance = item.gateShortfallValue || item.gateShortfallValue == 0 ? item.gateShortfallValue : undefined // 差额
         const quotaUnit = item.quotaRuleUnit == 'YUAN' ? '元' : '个' // 配额单位
-        const gateQuota = item.gateQuotaAmount || item.gateQuotaAmount == 0 ? Number(item.gateQuotaAmount).toFixed(2) : undefined // 配额
-        const unUseGateQuota = item.unUseAmount || item.unUseAmount == 0 ? Number(item.unUseAmount).toFixed(2) : undefined // 未用配额
+        const gateQuota = item.gateQuotaAmount || item.gateQuotaAmount == 0 ? (item.quotaRuleUnit == 'YUAN' ? Number(item.gateQuotaAmount).toFixed(2) : item.gateQuotaAmount) : undefined // 配额
+        const unUseGateQuota = item.unUseAmount || item.unUseAmount == 0 ? (item.quotaRuleUnit == 'YUAN' ? Number(item.unUseAmount).toFixed(2) : item.unUseAmount) : undefined // 未用配额
         // 特价产品
         const isYuan2 = item.discountRuleUnit == 'YUAN'
         const discountRuleUnit = isYuan2 ? '元' : '个' // 单位
-        const specialPriceSelected = isYuan2 ? (item.discountAmount || item.discountAmount == 0 ? Number(item.discountAmount).toFixed(2) : undefined) : item.discountQty || 0 // 已选
-        const totalPromoOrigAmount = isYuan2 && (item.totalPromoOrigAmount || item.totalPromoOrigAmount == 0) ? Number(item.totalPromoOrigAmount).toFixed(2) : undefined
-        const discountRuleValue = isYuan2 ? (item.discountRuleValue || item.discountRuleValue == 0 ? Number(item.discountRuleValue).toFixed(2) : undefined) : item.discountRuleValue // 基础
-        const discountRuleNextValue = isYuan2 ? (item.discountShortfallValue || item.discountShortfallValue == 0 ? Number(item.discountShortfallValue).toFixed(2) : undefined) : item.discountShortfallValue // 下阶差
+        const specialPriceSelected = isYuan2 ? (item.discountAmount || item.discountAmount == 0 ? Number(item.discountAmount).toFixed(2) : undefined) : (item.discountQty || item.discountQty == 0 ? item.discountQty : undefined) // 已选
+        const totalPromoOrigAmount = isYuan2 && (item.totalPromoOrigAmount || item.totalPromoOrigAmount == 0) ? Number(item.totalPromoOrigAmount).toFixed(2) : undefined // 原价
+        const discountRuleValue = item.discountRuleValue || item.discountRuleValue == 0 ? (isYuan2 ? Number(item.discountRuleValue).toFixed(2) : item.discountRuleValue) : undefined// 基础
+        const discountRuleNextValue = item.discountShortfallValue || item.discountShortfallValue == 0 ? (isYuan2 ? Number(item.discountShortfallValue).toFixed(2) : item.discountShortfallValue) : undefined// 下阶差
         // 正价统计
         const isYuan1 = item.regularRuleUnit == 'YUAN'
         const regularUnit = isYuan1 ? '元' : '个' // 单位