Browse Source

Merge branch 'develop_yh48-1' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into develop_yh48-1

lilei 8 months ago
parent
commit
7b5e248374

+ 2 - 2
src/views/promotionManagement/promotionInfo/list.vue

@@ -68,14 +68,14 @@
           <span v-else>--</span>
           <span v-else>--</span>
         </template>
         </template>
         <!-- 操作 -->
         <!-- 操作 -->
-        <!-- state  PUBLISH 已开启 END 已结束 CLOSE 已关闭 UNPUBLISH 未开启 -->
+        <!-- state  HAVE_RELEASE 已开启 IS_OVER已结束 IS_CLOSE 已关闭 NOT_RELEASE 未开启 -->
         <template slot="action" slot-scope="text, record">
         <template slot="action" slot-scope="text, record">
           <a-button
           <a-button
             size="small"
             size="small"
             type="link"
             type="link"
             class="button-primary"
             class="button-primary"
             @click="handleOpenOrClose(record,'1')"
             @click="handleOpenOrClose(record,'1')"
-            v-if="record.dealerOpenFlag==='1'&&record.dealerOpenState=='0'&&record.promoState=='IS_CLOSE'&&$hasPermissions('B_publishActiveBtn')"
+            v-if="record.dealerOpenFlag==='1'&&record.dealerOpenState=='0'&&(record.promoState=='IS_CLOSE'||record.promoState=='NOT_RELEASE')&&$hasPermissions('B_publishActiveBtn')"
             id="productOnlineInfoList-detail-btn">开启</a-button>
             id="productOnlineInfoList-detail-btn">开启</a-button>
           <a-button
           <a-button
             size="small"
             size="small"

+ 18 - 11
src/views/promotionManagement/promotionalProducts/list.vue

@@ -47,6 +47,7 @@
                   <v-select
                   <v-select
                     v-model="queryParam.promoState"
                     v-model="queryParam.promoState"
                     ref="promoState"
                     ref="promoState"
+                    :notIn="['HAVE_DISCARD','IS_OVER']"
                     id="promoProducts-promoState"
                     id="promoProducts-promoState"
                     code="SHOP_PROMO_PROMO_STATE"
                     code="SHOP_PROMO_PROMO_STATE"
                     placeholder="请选择促销状态"
                     placeholder="请选择促销状态"
@@ -116,16 +117,18 @@
           </template>
           </template>
           <!-- 活动规则 -->
           <!-- 活动规则 -->
           <template slot="promoRules" slot-scope="text, record">
           <template slot="promoRules" slot-scope="text, record">
-            <span v-if="record.promoType==='BUY_PROD_GIVE_PROD'">买{{ record.conditionValue }}赠{{ record.resultValue }}</span>
-            <span v-else-if="record.promoType==='PROMO_PROD'">优惠了{{ (record.shopProductPrice - record.resultValue)?(record.shopProductPrice - record.resultValue).toFixed(2):'--' }}元</span>
-            <span v-else-if="record.promoType==='BUY_PROD_GIVE_VALID'">返{{ record.resultValue ? record.resultValue.toFixed(2):'--' }}元</span>
+            <span v-if="record.promoType==='BUY_PROD_GIVE_PROD'&&record.conditionValue&&record.resultValue">买{{ record.conditionValue }}赠{{ record.resultValue }}</span>
+            <div v-else-if="record.promoType==='PROMO_PROD'&&(record.shopProductPrice||record.shopProductPrice ==0)&&(record.conditionValue||record.conditionValue==0)">
+              <span>优惠{{ (record.shopProductPrice - record.conditionValue).toFixed(2) }}元</span>s
+            </div>
+            <span v-else-if="record.promoType==='BUY_PROD_GIVE_VALID'&&record.resultValue">返{{ record.resultValue ? record.resultValue.toFixed(2):'--' }}元</span>
             <span v-else>--</span>
             <span v-else>--</span>
           </template>
           </template>
           <!-- 促销售价 -->
           <!-- 促销售价 -->
           <template slot="promoPrice" slot-scope="text, record">
           <template slot="promoPrice" slot-scope="text, record">
-            <span v-if="record.promoType==='BUY_PROD_GIVE_PROD'">{{ record.shopProductPrice ?record.shopProductPrice.toFixed(2):'--' }}</span>
-            <span v-else-if="record.promoType==='PROMO_PROD'">{{ (record.shopProductPrice - record.resultValue)?(record.shopProductPrice - record.resultValue).toFixed(2):'--' }}</span>
-            <span v-else-if="record.promoType==='BUY_PROD_GIVE_VALID'">{{ record.shopProductPrice?record.shopProductPrice.toFixed(2):'--' }}</span>
+            <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.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>
             <span v-else>--</span>
           </template>
           </template>
           <!-- 商城类目 -->
           <!-- 商城类目 -->
@@ -176,7 +179,9 @@ export default {
         promoType: undefined, // 促销状态
         promoType: undefined, // 促销状态
         promoState: undefined, // 促销状态
         promoState: undefined, // 促销状态
         categorySn: undefined, // 商城类目
         categorySn: undefined, // 商城类目
-        shopProductStatus: undefined// 商城状态
+        shopProductStatus: undefined, // 商城状态
+        shopProductDelFlag: 0, // 促销产品标志
+        promoStateList: ['NOT_RELEASE', 'HAVE_RELEASE']// 促销列表只查询这两种状态
       },
       },
       categoryOptions: [], // 产品类目列表
       categoryOptions: [], // 产品类目列表
       fieldNames: { label: 'categoryName', value: 'categorySn', children: 'shopCategoryList' },
       fieldNames: { label: 'categoryName', value: 'categorySn', children: 'shopCategoryList' },
@@ -189,13 +194,13 @@ export default {
         { title: '品牌', dataIndex: 'productBrandName', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
         { title: '品牌', dataIndex: 'productBrandName', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
         { title: '产品分类', align: 'center', width: '15%', scopedSlots: { customRender: 'productType' } },
         { title: '产品分类', align: 'center', width: '15%', scopedSlots: { customRender: 'productType' } },
         { title: '促销名称', dataIndex: 'promoName', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { 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: '13%', scopedSlots: { customRender: 'promoTime' } },
         { title: '促销类型', dataIndex: 'promoTypeDictValue', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
         { 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 || '--' } },
+        { title: '活动规则', align: 'center', width: '12%', scopedSlots: { customRender: 'promoRules' } },
+        { title: '促销状态', dataIndex: 'promoStateDictValue', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
         { title: '促销售价', width: '8%', align: 'right', scopedSlots: { customRender: 'promoPrice' } },
         { title: '促销售价', width: '8%', align: 'right', scopedSlots: { customRender: 'promoPrice' } },
         { title: '商城类目', scopedSlots: { customRender: 'categoryName' }, width: '15%', align: 'center' },
         { title: '商城类目', scopedSlots: { customRender: 'categoryName' }, width: '15%', align: 'center' },
-        { title: '产品商城状态', dataIndex: 'shopProductStatusDictValue', align: 'center', width: '8%', customRender: function (text) { return text || '--' } }
+        { title: '产品商城状态', dataIndex: 'shopProductStatusDictValue', align: 'center', width: '11%', customRender: function (text) { return text || '--' } }
       ],
       ],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
@@ -243,6 +248,8 @@ export default {
       this.queryParam.promoState = undefined
       this.queryParam.promoState = undefined
       this.queryParam.shopProductStatus = undefined
       this.queryParam.shopProductStatus = undefined
       this.queryParam.categorySn = undefined
       this.queryParam.categorySn = undefined
+      this.queryParam.shopProductDelFlag = 0
+      this.queryParam.promoStateList = ['NOT_RELEASE', 'HAVE_RELEASE']
       this.productType = []
       this.productType = []
       this.category = []
       this.category = []
       this.$refs.table.refresh()
       this.$refs.table.refresh()