chenrui 8 mesi fa
parent
commit
75446b8cfe

+ 3 - 1
src/views/easyPassManagement/promotionalActivities/edit.vue

@@ -474,10 +474,12 @@ export default {
             // 获取产品列表 有分页
             this.$refs.chooseProductList.pageInit()
           } else {
+            const tipArr = res.data ? res.data.split(';') : []
+            const newTipArr = tipArr.filter(item => { return item != '' })
             const _this = this
             this.$confirm({
               title: '提示',
-              content: res.data,
+              content: newTipArr.map((item, i) => { return <p>{i * 1 + 1}、{item}</p> }),
               centered: true,
               okText: '知道了',
               cancelText: '取消', // 将cancelText设置为空字符串或去掉该属性可以隐藏取消按钮

+ 6 - 3
src/views/easyPassManagement/promotionalProducts/list.vue

@@ -117,14 +117,17 @@
           <!-- 活动规则 -->
           <template slot="promoRules" slot-scope="text, record">
             <span v-if="record.promoType==='BUY_PROD_GIVE_PROD'&&record.conditionValue&&record.resultValue">买{{ record.conditionValue }}赠{{ record.resultValue }}</span>
-            <span v-else-if="record.promoType==='PROMO_PROD'&&record.shopProductPrice&&record.resultValue">优惠了{{ (record.shopProductPrice - record.resultValue)?(record.shopProductPrice - record.resultValue).toFixed(2):'--' }}元</span>
+            <div v-else-if="record.promoType==='PROMO_PROD'&&(record.shopProductPrice||record.shopProductPrice ==0)&&(record.conditionValue||record.conditionValue==0)">
+              <span v-if="record.shopProductPrice - record.conditionValue>0">优惠{{ (record.shopProductPrice - record.conditionValue).toFixed(2) }}元</span>
+              <span v-else style="color:#ED1C24;">优惠{{ (record.shopProductPrice - record.conditionValue).toFixed(2) }}元</span>
+            </div>
             <span v-else-if="record.promoType==='BUY_PROD_GIVE_VALID'&&record.resultValue">返{{ record.resultValue ? record.resultValue.toFixed(2):'--' }}元</span>
             <span v-else>--</span>
           </template>
           <!-- 促销售价 -->
           <template slot="promoPrice" slot-scope="text, record">
             <span v-if="record.promoType==='BUY_PROD_GIVE_PROD'&&record.shopProductPrice">{{ record.shopProductPrice ?record.shopProductPrice.toFixed(2):'--' }}</span>
-            <span v-else-if="record.promoType==='PROMO_PROD'&&record.shopProductPrice&&record.resultValue">{{ record.shopProductPrice?record.shopProductPrice.toFixed(2):'--' }}</span>
+            <span v-else-if="record.promoType==='PROMO_PROD'&&record.conditionValue">{{ record.conditionValue?record.conditionValue.toFixed(2):'--' }}</span>
             <span v-else-if="record.promoType==='BUY_PROD_GIVE_VALID'&&record.shopProductPrice">{{ record.shopProductPrice?record.shopProductPrice.toFixed(2):'--' }}</span>
             <span v-else>--</span>
           </template>
@@ -190,7 +193,7 @@ export default {
         { title: '品牌', dataIndex: 'productBrandName', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
         { title: '产品分类', align: 'center', width: '15%', scopedSlots: { customRender: 'productType' } },
         { title: '促销名称', dataIndex: 'promoName', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '促销时间', dataIndex: 'promoStartDate', align: 'center', width: '20%', scopedSlots: { customRender: 'promoTime' } },
+        { title: '促销时间', dataIndex: 'promoStartDate', align: 'center', width: '16%', scopedSlots: { customRender: 'promoTime' } },
         { title: '促销类型', dataIndex: 'promoTypeDictValue', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
         { title: '活动规则', align: 'center', width: '7%', scopedSlots: { customRender: 'promoRules' } },
         { title: '促销状态', dataIndex: 'promoStateDictValue', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },