Browse Source

Merge branch 'develop_yh30' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh30

chenrui 1 year ago
parent
commit
0651dec20e

+ 3 - 3
src/views/reportData/regionTypeSalesReport/list.vue

@@ -17,7 +17,7 @@
             @keyup.enter.native="handleSearch">
             <a-row :gutter="15">
               <a-col :md="6" :sm="24">
-                <a-form-model-item label="销售审核时间" prop="time">
+                <a-form-model-item label="时间" prop="time">
                   <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange"/>
                 </a-form-model-item>
               </a-col>
@@ -127,7 +127,7 @@ export default {
       exportLoading: false,
       tableHeight: 0,
       rules: {
-        'time': [{ required: true, message: '请选择销售审核时间', trigger: 'change' }],
+        'time': [{ required: true, message: '请选择时间', trigger: 'change' }],
         'salesStatusType': [{ required: true, message: '请选择销售状态', trigger: 'change' }]
       },
       // 加载数据方法 必须为 Promise 对象
@@ -177,7 +177,7 @@ export default {
         if (valid) {
           _this.$refs.table.refresh(true)
         } else {
-          _this.$message.error('请选择销售审核时间和销售状态')
+          _this.$message.error('请选择时间和销售状态')
           return false
         }
       })

+ 6 - 1
src/views/salesManagement/salesQueryNew/comps/detailProductList.vue

@@ -51,6 +51,10 @@
           type: String,
           default: ''
         },
+        promoFlag: {
+          type: String,
+          default: ''
+        },
         salesBillSn: {
           type: String,
           default: ''
@@ -278,7 +282,8 @@
             const params = {
                 salesBillSn: this.salesBillSn,
                 showStock: this.showStock,
-                warehouseSn: this.warehouseSn
+                warehouseSn: this.warehouseSn,
+                promoFlag: this.promoFlag
             }
             const active = this.activeList.filter(item => item.enabledFlag == 1)
 

+ 29 - 2
src/views/salesManagement/salesQueryNew/detail.vue

@@ -95,11 +95,32 @@
             <div style="flex-grow: 1;width: 60%;">
               <a-form layout="inline" @keyup.enter.native="searchTable">
                 <a-row :gutter="15" type="flex">
-                  <a-col flex="350px">
+                  <a-col flex="300px">
                     <a-form-item label="出库仓库">
                       <chooseWarehouse ref="warehouse" v-model="warehouseSn"></chooseWarehouse>
                     </a-form-item>
                   </a-col>
+                  <a-col flex="300px" v-if="hasPrompActive">
+                    <a-form-item label="产品类型">
+                      <a-select v-model.trim="promoFlag" :dropdownMatchSelectWidth="false" placeholder="请选择产品类型">
+                        <a-select-option value="0">
+                          正常产品
+                        </a-select-option>
+                        <a-select-option value="REGULAR">
+                          正价产品(活动)
+                        </a-select-option>
+                        <a-select-option value="DISCOUNT">
+                          特价产品
+                        </a-select-option>
+                        <a-select-option value="GIFT">
+                          促销产品
+                        </a-select-option>
+                        <a-select-option value="GATE">
+                          门槛产品
+                        </a-select-option>
+                      </a-select>
+                    </a-form-item>
+                  </a-col>
                   <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
                     <a-button type="primary" @click="searchTable" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
                     <a-button style="margin-left: 5px" @click="resetSearchForm" id="productInfoList-reset">重置</a-button>
@@ -119,6 +140,7 @@
             ref="productList"
             :detailData="detailData"
             :warehouseSn="warehouseSn"
+            :promoFlag="promoFlag"
             :salesBillSn="$route.params.sn || bizSn"
             :authCode="authCode"
             :maxHeight="pageHeight"
@@ -245,7 +267,8 @@ export default {
       spinningAudit: false,
       auditText: null,
       fromRouter: null,
-      warehouseSn: undefined
+      warehouseSn: undefined,
+      promoFlag: undefined
     }
   },
   computed: {
@@ -265,6 +288,9 @@ export default {
       const detailData = this.detailData
       return detailData&&(detailData.billStatus == 'HQ_CHANGE'|| (detailData.salesBillSource != 'SALES'&&detailData.billStatus == 'AUDIT_REJECT') ||detailData.billStatus == 'FINISH'||detailData.billStatus == 'OUTING_WAREHOUSE')
     },
+    hasPrompActive(){
+      return this.detailData&&this.detailData.promoFlag==1
+    },
     pageHeight () {
       return window.innerHeight - 305 + (this.hideFooter ? 45 : 0)
     }
@@ -282,6 +308,7 @@ export default {
     //  重置
     resetSearchForm () {
       this.warehouseSn = undefined
+      this.promoFlag = undefined
       setTimeout(() => {
         this.searchTable()
       }, 100)

+ 4 - 4
src/views/salesManagement/waitDispatchNew/queryPart.vue

@@ -14,7 +14,7 @@
               <a-input id="productInfoList-code" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
             </a-form-item>
           </a-col>
-          <a-col :md="4" :sm="24">
+          <a-col :md="4" :sm="24" v-if="hasPrompActive">
             <a-form-item label="产品类型">
               <a-select v-model.trim="queryParam.promoFlag" :dropdownMatchSelectWidth="false" placeholder="请选择产品类型">
                 <a-select-option value="0">
@@ -71,8 +71,8 @@
       <div style="display: flex;align-items: center;">
         <a-button type="primary" :disabled="newLoading" class="button-info" @click="handlePlAdd">批量添加</a-button>
         <a-button type="primary" v-if="hasNormalProduct" ghost style="margin-left:6px;" :disabled="newLoading" @click="handlePlCancel">批量取消</a-button>
-        <a-button type="primary" v-if="hasPrompActive&&hasPushedActive" ghost style="margin-left:6px;" :disabled="newLoading" @click="handleAllCancel">整单取消</a-button>
-        <a-tooltip placement="top" v-if="hasPrompActive&&hasPushedActive" style="margin-left:6px;">
+        <a-button type="primary" v-if="hasPrompActive&&hasNoPushedActive" ghost style="margin-left:6px;" :disabled="newLoading" @click="handleAllCancel">整单取消</a-button>
+        <a-tooltip placement="top" v-if="hasPrompActive&&hasNoPushedActive" style="margin-left:6px;">
           <template slot="title">
             <span>参加促销活动的销售单,不能单个取消产品,只能整单取消。</span>
           </template>
@@ -201,7 +201,7 @@ export default {
     hasPrompActive(){
       return this.detailData&&this.detailData.promoFlag==1&&!this.detailData.totalCancelQty
     },
-    hasPushedActive(){
+    hasNoPushedActive(){
       const a = this.dataSource.filter(item => item.promotionFlag != 0).filter(item => item.pushedQty>0)
       return this.dataSource.length==0 ? false : !(a.length > 0)
     },