lilei 1 年之前
父节点
当前提交
4f3679099f

+ 20 - 12
src/views/salesManagement/salesQueryNew/comps/productList.vue

@@ -81,7 +81,7 @@
         <a-col :md="12" :sm="24" style="text-align:left;">
           <a-dropdown>
             <a-menu slot="overlay" @click="handleMenuClick">
-              <a-menu-item key="0">
+              <a-menu-item key="0" :disabled="disablePromo">
                 仓库设置
               </a-menu-item>
               <a-menu-item key="1">
@@ -102,6 +102,7 @@
           <a-button
             type="link"
             class="button-info"
+            :disabled="disablePromo"
              @click="showSearchBox=!showSearchBox" ><a-icon type="search"/> 筛选</a-button>
           <a-dropdown>
             <a-menu slot="overlay" @click="handleImportClick">
@@ -118,11 +119,13 @@
             <a-button
               type="link"
               class="button-info"
+              :disabled="disablePromo"
             > 导入产品 <a-icon type="down" /> </a-button>
           </a-dropdown>
           <a-button
             type="link"
             class="button-info"
+            :disabled="disablePromo"
             @click="openCpModal"><a-icon type="plus" /> 添加产品</a-button>
         </a-col>
       </a-row>
@@ -142,10 +145,11 @@
       bordered>
       <!-- 产品编码 -->
       <template slot="productCode" slot-scope="text, record">
-        <a-badge count="缺" v-if="Number(record.stockQty||0) < Number(record.unpushedQty||0)">
-          <div style="padding-right: 15px;">{{ text }}</div>
-        </a-badge>
-        <span v-if="!(Number(record.stockQty||0) < Number(record.unpushedQty||0))">{{ text }}</span>
+        <span style="padding-right: 15px;">{{ text }}</span>
+        <a-badge count="促" v-if="record.promotionFlag=='GIFT'" :number-style="{ backgroundColor: '#52c41a', zoom:'80%' }"></a-badge>
+        <a-badge count="正" v-if="record.promotionFlag=='REGULAR'" :number-style="{ backgroundColor: '#108ee9', zoom:'80%' }"></a-badge>
+        <a-badge count="特" v-if="record.promotionFlag=='DISCOUNT'" :number-style="{ backgroundColor: '#faad14', zoom:'80%' }"></a-badge>
+        <a-badge count="缺" v-if="Number(record.stockQty||0) < Number(record.unpushedQty||0)" :number-style="{ zoom:'80%' }"></a-badge>
       </template>
       <!-- 产品名称 -->
       <template slot="productName" slot-scope="text, record">
@@ -341,6 +345,7 @@
         openUpActiveModal: false,
         descDetail: null,
         promoProductClz: null, // 活动产品分类
+        disablePromo: false
       }
     },
     computed: {
@@ -401,6 +406,11 @@
         this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
         this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
       },
+      // 禁用活动
+      disableActive(){
+        this.resetSearchForm()
+        this.disablePromo = true
+      },
       //  重置
       resetSearchForm (flag) {
         this.queryParam.productCode = ''
@@ -573,7 +583,7 @@
       },
       // 添加产品
       insterProduct (row, promotionFlag, promoProductClz) {
-        console.log(row, promotionFlag)
+        console.log(row, promotionFlag, promoProductClz)
         // 防止多次添加产品
         if (this.isInster) { return }
         const _this = this
@@ -585,12 +595,10 @@
         this.isInster = true
         this.spinning = true
         salesDetailInsert({
-          salesPromoDetailDTO:{
-            salesPromoSn: this.promo.salesPromoSn,
-            promoRuleSn: this.promo.promoRuleSn,
-            promoSn: this.promo.promoSn,
-            promoProductClz: promoProductClz
-          },
+          salesPromoSn: this.promo.salesPromoSn,
+          promoRuleSn: this.promo.promoRuleSn,
+          promoSn: this.promo.promoSn,
+          promoProductClz: promoProductClz,
           packQty: row.productPackQty,
           productSn: row.productSn,
           showCost: row.lastStockCost,

+ 1 - 1
src/views/salesManagement/salesQueryNew/comps/productNormalList.vue

@@ -90,7 +90,7 @@
       bordered>
       <!-- 产品编码 -->
       <template slot="productCode" slot-scope="text, record">
-        <a-badge count="缺" v-if="Number(record.stockQty||0) < Number(record.unpushedQty||0)">
+        <a-badge count="缺" v-if="Number(record.stockQty||0) < Number(record.unpushedQty||0)" :number-style="{ zoom:'80%' }">
           <div style="padding-right: 15px;">{{ text }}</div>
         </a-badge>
         <span v-if="!(Number(record.stockQty||0) < Number(record.unpushedQty||0))">{{ text }}</span>

+ 3 - 2
src/views/salesManagement/salesQueryNew/edit.vue

@@ -319,11 +319,12 @@ export default {
           if(_this.disabledActiveOption){
             salesDisablePromo({
               salesBillSn: _this.salesBillSn,
-              salesPromoSn: item.promo.salesPromoSn,
+              salesPromoSn: item.salesPromoSn,
+              promoRuleSn: item.promoRuleSn,
               salesDisableType: _this.disabledActiveOption
             }).then(res => {
               if(res.status == 200){
-                _this.$refs[item.promoRuleSn][0].resetSearchForm()
+                _this.$refs['productList-'+item.promoRuleSn][0].disableActive()
                 _this.disabledActiveOption = null
               }
             })

+ 1 - 1
vue.config.js

@@ -108,7 +108,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remosve the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        target: 'http://192.168.2.111/ocs-admin',
+        target: 'http://192.168.2.113:8660/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
         // target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,