Browse Source

修改bug

chenrui 8 months ago
parent
commit
0555b221cd

+ 10 - 0
src/components/Select/index.js

@@ -25,6 +25,12 @@ export default {
     isEnable: { // 是否只获取已启用的数据
       type: Boolean,
       default: true
+    },
+    notIn: {
+      type: Array,
+      default: function () {
+        return []
+      }
     }
   }),
   created () {
@@ -33,6 +39,10 @@ export default {
     const data = allLookup.find(item => item.code == _this.code)
     // 判断是否是省仓用户
     _this.dataList = _this.$store.state.user.dealerSupplierFlag == '1' ? data.itemList : data.itemList.filter(item => item.dispName != '省级批发价')
+    // 判断是否不显示指定选项
+    if (_this.notIn) {
+      _this.dataList = _this.dataList.filter(item => _this.notIn.indexOf(item.code) < 0)
+    }
     setTimeout(() => {
       _this.$emit('loadDataFinish', _this.dataList)
     }, 100)

+ 1 - 0
src/views/promotionManagement/promotionInfo/list.vue

@@ -135,6 +135,7 @@ export default {
         promoState: undefined// 促销状态
       },
       descInfo: '', // 促销描述
+      itemId: null, // 促销当前行sn
       disabled: false, //  查询、重置按钮是否可操作
       openDetailModal: false,
       columns: [

+ 4 - 4
src/views/promotionManagement/promotionalProducts/list.vue

@@ -47,7 +47,7 @@
                   <v-select
                     v-model="queryParam.promoState"
                     ref="promoState"
-                    :notIn="['HAVE_DISCARD','IS_OVER']"
+                    :notIn="['IS_OVER']"
                     id="promoProducts-promoState"
                     code="SHOP_PROMO_PROMO_STATE"
                     placeholder="请选择促销状态"
@@ -119,7 +119,7 @@
           <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>
             <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
+              <span>优惠{{ (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>
@@ -181,7 +181,7 @@ export default {
         categorySn: undefined, // 商城类目
         shopProductStatus: undefined, // 商城状态
         shopProductDelFlag: 0, // 促销产品标志
-        promoStateList: ['NOT_RELEASE', 'HAVE_RELEASE']// 促销列表只查询这两种状态
+        promoStateList: ['NOT_RELEASE', 'HAVE_RELEASE', 'IS_CLOSE']// 促销列表只查询这两种状态
       },
       categoryOptions: [], // 产品类目列表
       fieldNames: { label: 'categoryName', value: 'categorySn', children: 'shopCategoryList' },
@@ -249,7 +249,7 @@ export default {
       this.queryParam.shopProductStatus = undefined
       this.queryParam.categorySn = undefined
       this.queryParam.shopProductDelFlag = 0
-      this.queryParam.promoStateList = ['NOT_RELEASE', 'HAVE_RELEASE']
+      this.queryParam.promoStateList = ['NOT_RELEASE', 'HAVE_RELEASE', 'IS_CLOSE']
       this.productType = []
       this.category = []
       this.$refs.table.refresh()