lilei 6 months ago
parent
commit
8cf9396b7d

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

@@ -3,11 +3,12 @@
   <a-spin :spinning="spinning" tip="Loading...">
     <div :style="{position:'relative'}">
       <!-- 总计 -->
-      <div style="padding:5px 0;" v-if="countData">
+      <div style="padding:5px 0;" v-if="activeList.length && countData">
         总款数:<strong>{{ countData&&(countData.totalCategory || countData.totalCategory==0) ? countData.totalCategory : 0 }}</strong>;
         总数量:<strong>{{ countData&&(countData.totalQty || countData.totalQty==0) ? countData.totalQty : 0 }}</strong>;
         <span v-if="$hasPermissions('B_salesDetail_salesPrice')">总金额:<strong>{{ countData&&(countData.totalAmount || countData.totalAmount==0) ? toThousands(countData.totalAmount) : '0.00' }}</strong>;</span>
       </div>
+      <div else style="padding:5px 0;"></div>
       <ve-table
         border-y
         :scroll-width="0"

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

@@ -255,9 +255,10 @@ export default {
       this.showEmpty = this.dataSource.length <= 0
       const len = this.dataSource.length
       if (len < 8) {
-        this.maxHeight = len * 42
+        this.tableHeight = (len + 1) * 34
+      } else {
+        this.tableHeight = (this.showEmpty ? 300 : this.maxHeight) + 'px'
       }
-      this.tableHeight = (this.showEmpty ? 300 : this.maxHeight) + 'px'
       this.spinning = false
       this.disabled = false
     },

+ 2 - 1
src/views/salesManagement/waitDispatchNew/edit.vue

@@ -26,7 +26,6 @@
             待下推产品
           </div>
         </div>
-
         <!-- 已选配件列表 -->
         <detailProductList ref="waitProduct" @refashTable="refashTable">
           <!-- 统计数据 -->
@@ -241,8 +240,10 @@ export default {
     // 页面初始化
     async pageInit () {
       // 已参与活动列表
+      this.spinning = true
       const list = await salesPromoQueryList({ salesBillSn: this.$route.params.sn || this.bizSn }).then(res => res.data || [])
       this.activeList = list.filter(item => item.promotion && item.promotionRule)
+      this.spinning = false
       // 查询表格数据
       this.$refs.partQuery.clearSelectTable()
       this.salesBillSn = this.$route.params.salesBillSn

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

@@ -129,7 +129,6 @@
     <a-spin :spinning="spinning" tip="Loading...">
       <ve-table
         border-y
-        v-show="!showEmpty"
         :scroll-width="0"
         :max-height="tableHeight"
         :show-header="showTableHead"
@@ -144,7 +143,7 @@
         :column-width-resize-option="columnWidthResizeOption"
         :checkbox-option="checkboxOption"
       />
-      <div v-show="showEmpty" class="empty-data"><a-empty description="暂无产品" :image="simpleImage"/></div>
+      <div v-show="showEmpty" class="empty-data-0"><a-empty description="暂无数据" :image="simpleImage"/></div>
       <!-- 活动规则详情 -->
       <detailModal :openModal="openDetailModal" :itemSn="detailSn" @close="closeDetailModal"></detailModal>
       <!-- 转采购单 -->
@@ -803,12 +802,12 @@ export default {
 }
 </script>
 <style lang="less">
-    .empty-data{
+    .empty-data-0{
         color: #999;
         text-align: center;
-        padding: 20px;
+        padding: 10px;
         position: absolute;
-        bottom: 50px;
+        bottom: 0;
         width: 100%;
     }
   .ve-table-body-td{