lilei 6 months ago
parent
commit
2c785049f2

+ 3 - 2
src/views/salesManagement/salesQueryNew/comps/activeStatisticsList.vue

@@ -3,7 +3,7 @@
     <a-spin :spinning="spinning" tip="Loading...">
       <ve-table
         style="width:100%"
-        :max-height="300"
+        :max-height="tableHeight"
         :scroll-width="0"
         border-y
         border-x
@@ -139,7 +139,8 @@ export default {
       disabledActiveOption: null, // 禁用规则选项
       enableActiveOption: null, // 启用规则选项
       openGuideModal: false, //  导入产品引导
-      buyGiftsInfo: null // 买赠产品弹窗详情信息
+      buyGiftsInfo: null, // 买赠产品弹窗详情信息
+      tableHeight: 302
     }
   },
   computed: {

+ 5 - 1
src/views/salesManagement/salesQueryNew/comps/productActiveList.vue

@@ -116,7 +116,7 @@
         border-y
         border-x
         border-around
-        :max-height="300"
+        :max-height="tableHeight"
         :scroll-width="0"
         :column-width-resize-option="columnWidthResizeOption"
         :row-style-option="{clickHighlight: true}"
@@ -239,6 +239,10 @@ export default {
     selectTotal () {
       return this.selectedRowKeys.length || 0
     },
+    tableHeight () {
+      const len = this.dataSource.length
+      return len <= 10 ? ((len + 2) * 30 + 2) + 'px' : '302px'
+    },
     // 表格复选框设置
     checkboxOption () {
       return {

+ 8 - 11
src/views/salesManagement/salesQueryNew/comps/productNormalList.vue

@@ -175,18 +175,15 @@
           @click="handleDel(record)"
         >删除</a-button>
       </template>
-      <template slot="footer">
-        <!-- 总计 -->
-        <a-alert type="info" v-if="showTotal" banner :showIcon="false">
-          <div slot="message" style="text-align: right;">
-            款数:<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_salesEdit_salesPrice')">总金额:<strong>{{ countData&&(countData.totalAmount || countData.totalAmount==0) ? toThousands(countData.totalAmount) : '0.00' }}</strong>;</span>
-          </div>
-        </a-alert>
-      </template>
     </s-table>
-
+    <!-- 总计 -->
+    <a-alert type="info" v-if="showTotal" banner :showIcon="false" style="width: auto;display: inline-block;bottom: 10px;position: absolute;">
+      <div slot="message">
+        款数:<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_salesEdit_salesPrice')">总金额:<strong>{{ countData&&(countData.totalAmount || countData.totalAmount==0) ? toThousands(countData.totalAmount) : '0.00' }}</strong>;</span>
+      </div>
+    </a-alert>
     <!-- 导入产品 -->
     <importGuideModal :openModal="openGuideModal" :params="{salesBillSn: salesBillSn}" @close="closeGuideModel" @ok="hanldeOk" />
     <!-- 仓库设置 -->