lilei 1 rok temu
rodzic
commit
3b6a02909d

+ 8 - 3
src/views/salesManagement/salesQueryNew/comps/detailProductList.vue

@@ -280,16 +280,18 @@
                 showStock: this.showStock,
                 warehouseSn: this.warehouseSn
             }
+            const active = this.activeList
+
             // 正常产品
             const proList = await salesDetailAllList(params).then(res => res.data)
             const norTotal = await salesDetaiCount(params).then(res => res.data)
-            let listData = proList.length ? [{
+            // 没有活动时,表格不显示统计数据
+            let listData = active.length ? (proList.length ? [{
                 id: 'promo-normal',
                 total: norTotal
-              },...proList] : []
+              },...proList] : []) : proList
             
             // 循环获取活动产品
-            const active = this.activeList
             for(let i=0;i<active.length;i++){
               const promo = active[i]
               const activeParams = {
@@ -369,4 +371,7 @@
     .ve-table .ve-table-container .ve-table-content-wrapper table.ve-table-content tbody.ve-table-body tr.ve-table-expand-tr td.table-body-cell-no{
       padding: 0;
     } 
+    .ve-table .ve-table-container .ve-table-content-wrapper{
+      border-bottom: 1px solid #ddd;
+    }
   </style>

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

@@ -230,7 +230,7 @@
                 </div>
                 <div>
                   <div v-if="$hasPermissions('B_salesEdit_salesPrice')">总金额:<strong>{{ countData&&(countData.totalAmount || countData.totalAmount==0) ? toThousands(countData.totalAmount) : '--' }}</strong></div>
-                  <div v-if="$hasPermissions('B_salesEdit_salesPrice')">优惠金额:<strong>{{ countData&&(countData.lossAmount || countData.lossAmount==0) ? toThousands(countData.lossAmount) : '--' }}</strong></div>
+                  <div v-if="$hasPermissions('B_salesEdit_salesPrice')&&countData&&countData.lossAmount">优惠金额:<strong>{{ toThousands(countData.lossAmount) }}</strong></div>
                 </div>
               </div>
             </div>

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

@@ -83,7 +83,7 @@
                 <span v-if="$hasPermissions(authCode + '_salesPrice')">已发货金额:<strong>{{ detailData&&(detailData.totalDispatchAmount || detailData.totalDispatchAmount==0) ? toThousands(detailData.totalDispatchAmount) : '--' }}</strong>;</span>
                 <span v-if="$hasPermissions(authCode + '_salesPrice')">待发货金额:<strong>{{ detailData&&(detailData.totalUndispatchAmount || detailData.totalUndispatchAmount==0) ? toThousands(detailData.totalUndispatchAmount) : '--' }}</strong>;</span>
                 <span v-if="isCityPrice">市级总售价:<strong>{{ detailData&&(detailData.totalCityAmount || detailData.totalCityAmount==0) ? toThousands(detailData.totalCityAmount) : '--' }}</strong>;</span>
-                <span v-if="$hasPermissions(authCode + '_salesPrice')" style="color: red;">优惠金额:<strong>{{ detailData&&(detailData.totalLossAmount || detailData.totalLossAmount==0) ? toThousands(detailData.totalLossAmount) : '--' }}</strong>;</span>
+                <span v-if="$hasPermissions(authCode + '_salesPrice')&&detailData&&detailData.totalLossAmount" style="color: red;">优惠金额:<strong>{{ toThousands(detailData.totalLossAmount) }}</strong>;</span>
               </div>
               <div>
                 <a-button v-if="detailData && (detailData.billStatus == 'WAIT_AUDIT' || detailData.billStatus == 'HQ_CHANGE')" type="link" @click="openStockOut">缺货明细</a-button>

+ 4 - 4
src/views/salesManagement/salesQueryNew/edit.vue

@@ -79,11 +79,11 @@
         <div v-if="detailData">
           <div class="totalPrice">总售价:¥<span>{{ toThousands(detailData.totalAmount) }}</span></div>
           <div>
-            产品总款数:<strong>{{ detailData.totalCategory }}</strong>
-            总数量:<strong>{{ detailData.totalQty }}</strong>
-            <span style="margin-right:10px;">优惠金额:<strong>{{ toThousands(detailData.totalLossAmount) }}</strong></span>
+            产品总款数:<strong style="margin-right: 10px;"> {{ detailData.totalCategory }} </strong>
+            总数量:<strong> {{ detailData.totalQty }} </strong>
+            <span style="margin:0 0 0 10px;" v-if="detailData.totalLossAmount">优惠金额:<strong>{{ toThousands(detailData.totalLossAmount) }}</strong></span>
             <a-popover title="优惠明细" @visibleChange="(visible)=>{visible&&getPromYhDetail()}">
-              <a-button shape="round" size="small">优惠明细</a-button>
+              <a-button shape="round" size="small" v-if="detailData.totalLossAmount">优惠明细</a-button>
               <div slot="content">
                 <div v-if="yhDetail">
                     <div class="yhdetail" style="min-width:300px;margin-bottom: 5px;" v-for="(item,index) in yhDetail.promoMapList" :key="index">

+ 3 - 0
src/views/salesManagement/waitDispatchNew/detailProductList.vue

@@ -366,4 +366,7 @@
     .ve-table .ve-table-container .ve-table-content-wrapper table.ve-table-content tbody.ve-table-body tr.ve-table-expand-tr td.table-body-cell-no{
       padding: 0;
     } 
+    .ve-table .ve-table-container .ve-table-content-wrapper{
+      border-bottom: 1px solid #ddd;
+    }
   </style>

+ 8 - 3
src/views/salesManagement/waitDispatchNew/queryPart.vue

@@ -380,16 +380,18 @@ export default {
         this.queryParam.salesBillSn = this.salesBillSn
         this.queryParam.showStock = true
         const params = this.queryParam
+        const active = this.activeList
+
         // 正常产品
         const proList = await salesDetailAllList(params).then(res => res.data)
         const norTotal = await salesDetaiCount(params).then(res => res.data)
-        let listData = [{
+        //没有活动时不显示统计
+        let listData = active.length ? [{
             id: 'promo-normal',
             total: norTotal
-          },...proList]
+          },...proList] : proList
         
         // 循环获取活动产品
-        const active = this.activeList
         for(let i=0;i<active.length;i++){
           const promo = active[i]
           const activeParams = {
@@ -545,4 +547,7 @@ export default {
   .ve-table .ve-table-container .ve-table-content-wrapper table.ve-table-content tbody.ve-table-body tr.ve-table-expand-tr td.table-body-cell-no{
     padding: 0;
   } 
+  .ve-table .ve-table-container .ve-table-content-wrapper{
+      border-bottom: 1px solid #ddd;
+    }
 </style>