lilei 1 ano atrás
pai
commit
b9abfcf9a5

+ 4 - 1
src/views/salesManagement/salesQueryNew/detail.vue

@@ -100,7 +100,7 @@
                       <chooseWarehouse ref="warehouse" v-model="warehouseSn"></chooseWarehouse>
                     </a-form-item>
                   </a-col>
-                  <a-col flex="300px">
+                  <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">
@@ -288,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)
     }

+ 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)
     },