Browse Source

列表和编辑页样式(列表:表格高度占满页面剩余高度,页码固定在底部。编辑:提交等操作按钮固定在最底部)

chenrui 3 years ago
parent
commit
684d150b1e
49 changed files with 1690 additions and 1272 deletions
  1. 17 11
      src/views/allocationManagement/transferOut/edit.vue
  2. 38 21
      src/views/allocationManagement/transferOut/list.vue
  3. 16 7
      src/views/basicData/transferTypeManagement/list.vue
  4. 15 5
      src/views/basicData/warehouse/list.vue
  5. 15 5
      src/views/basicData/warehouse/storingLocation/list.vue
  6. 24 14
      src/views/dealerManagement/dealerAccountManagement/list.vue
  7. 11 0
      src/views/dealerManagement/dealerRelationshipBinding/list.vue
  8. 21 7
      src/views/dealerManagement/marketingDivisionSet/list.vue
  9. 17 11
      src/views/dealerManagement/merchantInfoManagement/edit.vue
  10. 40 27
      src/views/dealerManagement/merchantInfoManagement/list.vue
  11. 43 82
      src/views/dealerManagement/merchantInfoManagement/permissionSetting.vue
  12. 74 61
      src/views/dealerManagement/rebateSettings/list.vue
  13. 24 11
      src/views/financialManagement/financialCollection/list.vue
  14. 34 17
      src/views/financialManagement/returnConfirmation/list.vue
  15. 23 13
      src/views/financialManagement/warehousingConfirmation/list.vue
  16. 19 1
      src/views/inventoryManagement/intelligentReplenishment/edit.vue
  17. 17 2
      src/views/inventoryManagement/intelligentReplenishment/list.vue
  18. 5 1
      src/views/inventoryManagement/intelligentReplenishment/productRange.vue
  19. 32 13
      src/views/inventoryManagement/inventoryQuery/list.vue
  20. 119 94
      src/views/inventoryManagement/inventoryQuery/warehouseDetail.vue
  21. 66 85
      src/views/inventoryManagement/inventoryWarning/list.vue
  22. 19 13
      src/views/power/OperateJournal/OperateJournal.vue
  23. 24 46
      src/views/power/role/roleList.vue
  24. 19 26
      src/views/power/user/userList.vue
  25. 45 37
      src/views/productManagement/priceChangeRecord/list.vue
  26. 18 8
      src/views/productManagement/productBrand/list.vue
  27. 1 0
      src/views/productManagement/productCategory/list.vue
  28. 17 11
      src/views/productManagement/productInfo/edit.vue
  29. 39 20
      src/views/productManagement/productInfo/list.vue
  30. 24 14
      src/views/productManagement/productLaunchAudit/list.vue
  31. 34 17
      src/views/productManagement/productLevel/list.vue
  32. 36 17
      src/views/productManagement/productOfflineAudit/list.vue
  33. 138 122
      src/views/productManagement/productPricing/list.vue
  34. 33 16
      src/views/productManagement/productUniversal/list.vue
  35. 113 96
      src/views/promotionRulesManagement/orderStatistics/list.vue
  36. 114 94
      src/views/promotionRulesManagement/productStatistics/list.vue
  37. 19 17
      src/views/promotionRulesManagement/promotionRules/choosePriceProductsModal.vue
  38. 85 58
      src/views/promotionRulesManagement/promotionRules/detail.vue
  39. 23 17
      src/views/promotionRulesManagement/promotionRules/list.vue
  40. 17 4
      src/views/promotionRulesManagement/promotionRules/rule.vue
  41. 0 8
      src/views/purchasingManagement/bulkWarehousingOrder/list.vue
  42. 0 8
      src/views/salesManagement/backorder/list.vue
  43. 0 8
      src/views/salesManagement/salesReturn/salesReturnCheck.vue
  44. 19 2
      src/views/setting/notice/list.vue
  45. 25 15
      src/views/setting/noticeManagement/list.vue
  46. 31 13
      src/views/supplierManagement/associatedProduct/add.vue
  47. 84 65
      src/views/supplierManagement/associatedProductDetails/list.vue
  48. 23 17
      src/views/supplierManagement/supplierInfo/edit.vue
  49. 20 15
      src/views/supplierManagement/supplierInfo/list.vue

+ 17 - 11
src/views/allocationManagement/transferOut/edit.vue

@@ -144,18 +144,16 @@
           </a-collapse-panel>
         </a-collapse>
       </a-card>
-      <a-affix :offset-bottom="0">
-        <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-          <a-button
-            type="primary"
-            id="allocateBillEdit-submit"
-            size="large"
-            class="button-primary"
-            @click="handleSubmit"
-            style="padding: 0 60px;">提交</a-button>
-        </div>
-      </a-affix>
     </a-spin>
+    <div class="affix-cont">
+      <a-button
+        type="primary"
+        id="allocateBillEdit-submit"
+        size="large"
+        class="button-primary"
+        @click="handleSubmit"
+        style="padding: 0 60px;">提交</a-button>
+    </div>
     <!-- 打印 -->
     <div id="print"></div>
   </div>
@@ -455,6 +453,14 @@ export default {
 
 <style lang="less">
   .allocateBillEdit-wrap{
+    position: relative;
+    height: 100%;
+    padding-bottom: 51px;
+    box-sizing: border-box;
+    >.ant-spin-nested-loading{
+      overflow-y: scroll;
+      height: 100%;
+    }
     .allocateBillEdit-back{
       margin-bottom: 10px;
     }

+ 38 - 21
src/views/allocationManagement/transferOut/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="allocateBillList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
@@ -66,13 +66,14 @@
       </div>
       <!-- 列表 -->
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 1940, y: tableHeight }"
+        :scroll="{ x: 1540, y: tableHeight }"
         bordered>
         <!-- 单号 -->
         <template slot="allocateNo" slot-scope="text, record">
@@ -127,6 +128,7 @@ export default {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0,
       time: [
         moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
         moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
@@ -142,24 +144,25 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调拨单号', scopedSlots: { customRender: 'allocateNo' }, align: 'center' },
-        { title: '调往对象', dataIndex: 'targetName', width: 220, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '客户类型', dataIndex: 'dealerLevelDictValue', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '总数量', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总成本', dataIndex: 'totalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总售价', dataIndex: 'totalPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调拨类型', dataIndex: 'allocateTypeName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '业务状态', dataIndex: 'stateDictValue', width: 110, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '打印状态', dataIndex: 'printStateDictValue', width: 110, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '打印次数', dataIndex: 'printCount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 180, align: 'center', fixed: 'right' }
+        { title: '调往对象', dataIndex: 'targetName', width: 180, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '客户类型', dataIndex: 'dealerLevelDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '总数量', dataIndex: 'totalQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总成本', dataIndex: 'totalCost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总售价', dataIndex: 'totalPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调拨类型', dataIndex: 'allocateTypeName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'stateDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '打印状态', dataIndex: 'printStateDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '打印次数', dataIndex: 'printCount', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return allocateBillList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -167,6 +170,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -177,11 +181,6 @@ export default {
       openModal: false //  新增编辑  弹框
     }
   },
-  computed: {
-    tableHeight () {
-      return window.innerHeight - (this.advanced ? 330 : 290)
-    }
-  },
   methods: {
     //  创建时间  change
     dateChange (date) {
@@ -287,6 +286,24 @@ export default {
           this.allocateTypeList = []
         }
       })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 245
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   },
   beforeRouteEnter (to, from, next) {

+ 16 - 7
src/views/basicData/transferTypeManagement/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="transferTypeManagementList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 操作按钮 -->
-      <div class="table-operator-nobor">
+      <div ref="tableSearch" class="table-operator-nobor">
         <a-button
           id="transferTypeManagementList-add"
           type="primary"
@@ -12,8 +12,9 @@
       </div>
       <!-- 列表 -->
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         :rowKey="(record) => record.id"
         :columns="columns"
@@ -54,6 +55,7 @@ export default {
   data () {
     return {
       spinning: false,
+      tableHeight: 0,
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
@@ -63,12 +65,14 @@ export default {
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
+        this.spinning = true
         return allocateTypeList(Object.assign(parameter, {})).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
           }
+          this.spinning = false
           return data
         })
       },
@@ -77,11 +81,6 @@ export default {
       nowData: null //  当前记录数据
     }
   },
-  computed: {
-    tableHeight () {
-      return window.innerHeight - 240
-    }
-  },
   methods: {
     //  新增/编辑
     handleEdit (row) {
@@ -115,7 +114,17 @@ export default {
       this.itemSn = ''
       this.openModal = false
       this.$refs.table.refresh(true)
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 195
     }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
   }
 }
 </script>

+ 15 - 5
src/views/basicData/warehouse/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="warehouseList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
@@ -23,8 +23,9 @@
       </div>
       <!-- 列表 -->
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         :rowKey="(record) => record.id"
         :columns="columns"
@@ -85,9 +86,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 290
-        }
+        this.spinning = true
         return warehouseList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -95,6 +94,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -150,7 +150,17 @@ export default {
     //  查看仓位
     goStoringLocation (row) {
       this.$router.push({ path: `/basicData/storingLocation/${row.warehouseSn}`, query: { name: row.name } })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 245
     }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
   }
 }
 </script>

+ 15 - 5
src/views/basicData/warehouse/storingLocation/list.vue

@@ -10,7 +10,7 @@
       </a-page-header>
       <a-card size="small" :bordered="false" class="storingLocationList-cont">
         <!-- 搜索条件 -->
-        <div class="table-page-search-wrapper">
+        <div ref="tableSearch" class="table-page-search-wrapper">
           <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
             <a-row :gutter="15">
               <a-col :md="6" :sm="24">
@@ -31,8 +31,9 @@
         </div>
         <!-- 列表 -->
         <s-table
-          class="sTable"
+          class="sTable fixPagination"
           ref="table"
+          :style="{ height: tableHeight+84.5+'px' }"
           size="small"
           :rowKey="(record) => record.id"
           :columns="columns"
@@ -88,9 +89,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 330
-        }
+        this.spinning = true
         return warehouseLocList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -98,6 +97,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -160,7 +160,17 @@ export default {
     //  返回列表
     handleBack () {
       this.$router.push({ path: '/basicData/warehouse/list', query: { closeLastOldTab: true } })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 285
     }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
   }
 }
 </script>

+ 24 - 14
src/views/dealerManagement/dealerAccountManagement/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="dealerAccountList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
@@ -22,7 +22,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="dealerAccountList-refresh">查询</a-button>
-              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="dealerAccountList-reset">重置</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="dealerAccountList-reset">重置</a-button>
             </a-col>
           </a-row>
         </a-form>
@@ -33,13 +33,14 @@
       </div>
       <!-- 列表 -->
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 1310, y: tableHeight }"
+        :scroll="{ x: 1030, y: tableHeight }"
         bordered>
         <!-- 账号状态 -->
         <template slot="loginFlag" slot-scope="text, record">
@@ -106,21 +107,19 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center' },
         { title: '经销商名称', dataIndex: 'org.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '管理员姓名', dataIndex: 'name', width: 220, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '管理员账号', dataIndex: 'loginName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '授权用户数', dataIndex: 'org.childUserMaxNum', width: 140, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '状态', scopedSlots: { customRender: 'loginFlag' }, width: 150, align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center', fixed: 'right' }
+        { title: '管理员姓名', dataIndex: 'name', width: 180, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '管理员账号', dataIndex: 'loginName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '授权用户数', dataIndex: 'org.childUserMaxNum', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '状态', scopedSlots: { customRender: 'loginFlag' }, width: 100, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 160, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 290
-        }
+        this.spinning = true
         return dealerUserList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -129,6 +128,7 @@ export default {
             data.list[i].loginFlag = Number(data.list[i].loginFlag)
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -207,7 +207,17 @@ export default {
           this.spinning = false
         }
       })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 245
     }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
   }
 }
 </script>

+ 11 - 0
src/views/dealerManagement/dealerRelationshipBinding/list.vue

@@ -244,3 +244,14 @@ export default {
   }
 }
 </script>
+<style lang="less">
+  .relationshipBindingList-wrap{
+    position: relative;
+    height: 100%;
+    box-sizing: border-box;
+    >.ant-spin-nested-loading{
+      overflow-y: scroll;
+      height: 100%;
+    }
+  }
+</style>

+ 21 - 7
src/views/dealerManagement/marketingDivisionSet/list.vue

@@ -2,13 +2,14 @@
   <a-card size="small" :bordered="false" class="marketingDivisionSetList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 操作按钮 -->
-      <div class="table-operator" style="border: 0;">
+      <div ref="tableSearch" class="table-operator" style="border: 0;">
         <a-button id="marketingDivisionSetList-add" type="primary" v-if="$hasPermissions('B_marketingDivisionSet_add')" class="button-error" @click="handleEdit()">新增</a-button>
       </div>
       <!-- 列表 -->
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         :rowKey="(record) => record.id"
         :columns="columns"
@@ -62,6 +63,7 @@ export default {
     return {
       spinning: false,
       disabled: false, //  查询、重置按钮是否可操作
+      tableHeight: 0,
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '分区名', dataIndex: 'subareaName', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
@@ -71,6 +73,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return subareaQueryIncludeAreaAll(parameter).then(res => {
           const data = res.data
           const no = 0
@@ -78,6 +81,7 @@ export default {
             data[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -86,11 +90,6 @@ export default {
       itemId: null //  当前产品id
     }
   },
-  computed: {
-    tableHeight () {
-      return window.innerHeight - 200
-    }
-  },
   methods: {
     //  重置
     resetSearchForm () {
@@ -128,11 +127,26 @@ export default {
       this.itemId = null
       this.nowData = null
       this.openModal = false
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 195
     }
   },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
   beforeRouteEnter (to, from, next) {
     next(vm => {
     })
   }
 }
 </script>
+<style lang="less">
+  .marketingDivisionSetList-wrap{
+    height: 100%;
+  }
+</style>

+ 17 - 11
src/views/dealerManagement/merchantInfoManagement/edit.vue

@@ -369,18 +369,16 @@
           </a-collapse>
         </a-card>
       </a-form-model>
-      <a-affix :offset-bottom="0">
-        <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-          <a-button
-            type="primary"
-            class="button-primary"
-            id="merchantInfoManagementEdit-submit-btn"
-            size="large"
-            @click="handleSubmit"
-            style="padding: 0 60px;">提交</a-button>
-        </div>
-      </a-affix>
     </a-spin>
+    <div class="affix-cont">
+      <a-button
+        type="primary"
+        class="button-primary"
+        id="merchantInfoManagementEdit-submit-btn"
+        size="large"
+        @click="handleSubmit"
+        style="padding: 0 60px;">提交</a-button>
+    </div>
   </div>
 </template>
 
@@ -690,6 +688,14 @@ export default {
 
 <style lang="less">
   .merchantInfoManagementEdit-wrap{
+    position: relative;
+    height: 100%;
+    padding-bottom: 51px;
+    box-sizing: border-box;
+    >.ant-spin-nested-loading{
+      overflow-y: scroll;
+      height: 100%;
+    }
     .merchantInfoManagementEdit-cont{
       margin-bottom: 10px;
     }

+ 40 - 27
src/views/dealerManagement/merchantInfoManagement/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="merchantInfoManagementList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
@@ -15,13 +15,13 @@
                 <a-input id="merchantInfoManagementList-nameLike" v-model.trim="queryParam.nameLike" allowClear placeholder="请输入商户名称/别名"/>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="5" :sm="24">
               <a-form-item label="商户类型">
                 <v-select code="DEALER_TYPE" id="merchantInfoManagementList-dealerType" v-model="queryParam.dealerType" allowClear placeholder="请选择商户类型"></v-select>
               </a-form-item>
             </a-col>
             <template v-if="advanced">
-              <a-col :md="6" :sm="24">
+              <a-col :md="7" :sm="24">
                 <a-form-item label="审核状态">
                   <v-select code="AUDIT_STATE" id="merchantInfoManagementList-auditState" v-model="queryParam.auditState" allowClear placeholder="请选择审核状态"></v-select>
                 </a-form-item>
@@ -32,7 +32,7 @@
                 </a-form-item>
               </a-col>
             </template>
-            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-col :md="7" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="merchantInfoManagementList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="merchantInfoManagementList-reset">重置</a-button>
               <a-button
@@ -56,19 +56,16 @@
       <div class="table-operator">
         <a-button id="merchantInfoManagementList-add" type="primary" v-if="$hasPermissions('B_merchantInfo_add')" class="button-error" @click="handleAdd">新增</a-button>
       </div>
-      <!-- 总计 -->
-      <!-- <a-alert type="info" style="margin-bottom:15px">
-        <div slot="message">合计:<strong>{{ total }}</strong>条</div>
-      </a-alert> -->
       <!-- 列表 -->
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 2240, y: tableHeight }"
+        :scroll="{ x: 1870, y: tableHeight }"
         bordered>
         <!-- 经销商 -->
         <template slot="dealerName" slot-scope="text, record">
@@ -116,6 +113,7 @@ export default {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0,
       queryParam: { //  查询条件
         nameLike: '', //  商户名称、别名
         dealerType: undefined, //  商户类型
@@ -128,25 +126,26 @@ export default {
       dateFormat: 'YYYY-MM-DD',
       total: 0,
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '区域', scopedSlots: { customRender: 'area' }, width: 200, align: 'center' },
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '区域', scopedSlots: { customRender: 'area' }, width: 180, align: 'center' },
         { title: '商户名称', scopedSlots: { customRender: 'dealerName' }, align: 'center', ellipsis: true },
-        { title: '商户别名', dataIndex: 'dealerAlias', width: 200, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '商户类型', dataIndex: 'dealerTypeDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '商户级别', dataIndex: 'dealerLevelDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '联系人', dataIndex: 'contact', width: 200, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '联系电话', dataIndex: 'dealerTelephone', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '绑定手机号码', dataIndex: 'managerMobile', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '审核状态', dataIndex: 'auditStateDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '合作状态', dataIndex: 'cooperateFlagDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '生效时间', dataIndex: 'cooperateEffectiveTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '商户别名', dataIndex: 'dealerAlias', width: 180, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '商户类型', dataIndex: 'dealerTypeDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '商户级别', dataIndex: 'dealerLevelDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '联系人', dataIndex: 'contact', width: 180, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '联系电话', dataIndex: 'dealerTelephone', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '绑定手机号码', dataIndex: 'managerMobile', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核状态', dataIndex: 'auditStateDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '合作状态', dataIndex: 'cooperateFlagDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '生效时间', dataIndex: 'cooperateEffectiveTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 240, align: 'center', fixed: 'right' }
       ],
       loading: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return dealerQueryList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -155,6 +154,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -165,11 +165,6 @@ export default {
       isAudit: false
     }
   },
-  computed: {
-    tableHeight () {
-      return window.innerHeight - (this.advanced ? 330 : 290)
-    }
-  },
   methods: {
     //  重置列表
     resetSearchForm () {
@@ -264,6 +259,24 @@ export default {
       link.setAttribute('download', fname + '.xlsx')
       document.body.appendChild(link)
       link.click()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 245
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   },
   beforeRouteEnter (to, from, next) {

+ 43 - 82
src/views/dealerManagement/merchantInfoManagement/permissionSetting.vue

@@ -9,7 +9,7 @@
       </a-page-header>
       <a-card size="small" :bordered="false" class="permissionSetting-main">
         <!-- 搜索条件 -->
-        <div class="table-page-search-wrapper">
+        <div ref="tableSearch" class="table-page-search-wrapper">
           <a-form-model
             id="permissionSetting-form"
             ref="ruleForm"
@@ -48,30 +48,21 @@
           <a-button id="permissionSetting-product" type="primary" class="button-success" @click="choosePModal('PRODUCT')">选择产品</a-button>
         </div>
         <!-- 列表 -->
-        <a-table
-          class="sTable"
+        <s-table
+          class="sTable fixPagination"
           ref="table"
+          :style="{ height: tableHeight+84.5+'px' }"
           size="small"
           :rowKey="(record) => record.id"
           :columns="columns"
-          :data-source="loadData"
-          :pagination="false"
-          :loading="loading"
-          :scroll="{ x: 1200, y: tableHeight }"
+          :data="loadData"
+          :scroll="{ x: 930, y: tableHeight }"
           bordered>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
             <a-button size="small" type="link" class="button-error" @click="handleDel(record)">删除</a-button>
           </template>
-        </a-table>
-        <!-- 分页 -->
-        <tablePagination
-          ref="tablePagination"
-          :total="paginationProps.total"
-          :current="paginationProps.current"
-          :pageSize="paginationProps.pageSize"
-          @changePageSize="changePageSize"
-          @changePage="changePage" />
+        </s-table>
       </a-card>
     </a-spin>
     <!-- 选择产品品牌 -->
@@ -91,13 +82,12 @@
 
 <script>
 import { STable, VSelect } from '@/components'
-import tablePagination from '@/views/common/tablePagination.vue'
 import ChooseProductsModal from '@/views/common/chooseProductsModal.vue'
 import ChooseBrandModal from '@/views/common/chooseBrandModal.vue'
 import ChooseTypeModal from '@/views/common/chooseTypeModal.vue'
 import { dealerScopeList, dealerScopeSave, dealerScopeDel, dealerScopeQueryList } from '@/api/dealerScope'
 export default {
-  components: { STable, VSelect, ChooseProductsModal, ChooseBrandModal, ChooseTypeModal, tablePagination },
+  components: { STable, VSelect, ChooseProductsModal, ChooseBrandModal, ChooseTypeModal },
   data () {
     return {
       spinning: false,
@@ -113,19 +103,30 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       loading: false, //  表格加载中
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '添加时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '添加时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '类型', dataIndex: 'type', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '类型名称', dataIndex: 'goodsName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品名称', dataIndex: 'product.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品编码', dataIndex: 'product.code', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
+        { title: '产品编码', dataIndex: 'product.code', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
       ],
-      loadData: [],
-      paginationProps: {
-        total: 0, //  分页总条数
-        current: 1,
-        pageSize: 20
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return dealerScopeList(Object.assign(parameter, this.queryParam, { dealerSn: this.$route.params.sn })).then(res => {
+          const data = res.data
+          const no = (data.pageNo - 1) * data.pageSize
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = no + i + 1
+            const goodsType = data.list[i].goodsType
+            data.list[i].type = goodsType == 'PRODUCT' ? '产品' : goodsType == 'BRAND' ? '品牌' : goodsType == 'CATEGORY' ? '分类' : '--'
+          }
+          this.disabled = false
+          this.spinning = false
+          return data
+        })
       },
       openBrandModal: false, //  选择产品品牌
       openTypeModal: false, //  选择产品分类
@@ -141,57 +142,12 @@ export default {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
-          _this.getProductList(1)
+          _this.$refs.table.refresh(true)
         } else {
           return false
         }
       })
     },
-    // 经销权 列表
-    getProductList (pageNo) {
-      this.paginationProps.current = pageNo || this.paginationProps.current
-      this.disabled = true
-      if (this.tableHeight == 0) {
-        this.tableHeight = window.innerHeight - 320
-      }
-      const params = {
-        pageNo: this.paginationProps.current,
-        pageSize: this.paginationProps.pageSize
-      }
-      this.loading = true
-      dealerScopeList(Object.assign(params, this.queryParam, { dealerSn: this.$route.params.sn })).then(res => {
-        this.loading = false
-        if (res.status == 200) {
-          const data = res.data
-          this.paginationProps.total = Number(res.data.count) || 0
-          this.paginationProps.current = data.pageNo
-          const no = (data.pageNo - 1) * data.pageSize
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = no + i + 1
-            const goodsType = data.list[i].goodsType
-            data.list[i].type = goodsType == 'PRODUCT' ? '产品' : goodsType == 'BRAND' ? '品牌' : goodsType == 'CATEGORY' ? '分类' : '--'
-          }
-          this.loadData = data.list
-          this.disabled = false
-        } else {
-          this.paginationProps.total = 0
-          this.paginationProps.current = 1
-          this.paginationProps.pageSize = 20
-          this.loadData = []
-        }
-      })
-    },
-    //  分页  一页多少条change
-    changePageSize (current, pageSize) {
-      this.paginationProps.current = current
-      this.paginationProps.pageSize = pageSize
-      this.getProductList()
-    },
-    //  分页 页码change
-    changePage (current) {
-      this.paginationProps.current = current
-      this.getProductList()
-    },
     // 选择产品
     choosePModal (type) {
       const productList = []
@@ -279,7 +235,7 @@ export default {
       dealerScopeSave(params).then(res => {
         if (res.status == 200) {
           _this.$message.success(res.message)
-          _this.getProductList(1)
+          _this.$refs.table.refresh(true)
           _this.spinning = false
         } else {
           _this.spinning = false
@@ -298,7 +254,7 @@ export default {
           dealerScopeDel({ sn: row.dealerScopeSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
-              _this.getProductList()
+              _this.$refs.table.refresh()
               _this.spinning = false
             } else {
               _this.spinning = false
@@ -312,10 +268,7 @@ export default {
       this.queryParam.goodsType = undefined
       this.queryParam.goodsName = ''
       this.queryParam.goodsCode = ''
-      this.paginationProps.total = 0
-      this.paginationProps.current = 1
-      this.paginationProps.pageSize = 20
-      this.getProductList(1)
+      this.$refs.table.refresh(true)
     },
     // 返回
     handleBack () {
@@ -325,12 +278,20 @@ export default {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 295
     }
   },
-  beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.getProductList(1)
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
     })
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
   }
 }
 </script>

+ 74 - 61
src/views/dealerManagement/rebateSettings/list.vue

@@ -1,63 +1,66 @@
 <template>
   <a-card size="small" :bordered="false" class="rebateSettingsList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="经销商名称">
-              <a-input id="rebateSettingsList-dealerName" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入经销商名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="rebateSettingsList-refresh">查询</a-button>
-            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="rebateSettingsList-reset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="small"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ y: tableHeight }"
-      bordered>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          type="link"
-          v-if="$hasPermissions('B_rebateSettings_edit')"
-          class="button-info"
-          @click="handleEdit(record)"
-          id="rebateSettingsList-edit-btn">编辑</a-button>
-        <span v-else>--</span>
-      </template>
-      <!-- 经销商名称 -->
-      <template slot="jxs" slot-scope="text, record">
-        <span v-if="record.subDealer">{{ record.subDealer.dealerName }}</span>
-        <span v-else>--</span>
-      </template>
-      <!-- 经销商级别 -->
-      <template slot="dealerLevel" slot-scope="text, record">
-        <span v-if="record.subDealer">{{ record.subDealer.provinceName }} > {{ record.subDealer.dealerLevelDictValue }}</span>
-        <span v-else>--</span>
-      </template>
-      <!-- 差价归属 -->
-      <template slot="cjgs" slot-scope="text, record">
-        <span v-if="record.supDealer">{{ record.supDealer.dealerName }}</span>
-        <span v-else>--</span>
-      </template>
-      <!-- 归属经销商级别 -->
-      <template slot="gsjxsjb" slot-scope="text, record">
-        <span v-if="record.supDealer">{{ record.supDealer.provinceName }} > {{ record.supDealer.dealerLevelDictValue }}</span>
-        <span v-else>--</span>
-      </template>
-    </s-table>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="经销商名称">
+                <a-input id="rebateSettingsList-dealerName" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入经销商名称"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="rebateSettingsList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="rebateSettingsList-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y: tableHeight }"
+        bordered>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            v-if="$hasPermissions('B_rebateSettings_edit')"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="rebateSettingsList-edit-btn">编辑</a-button>
+          <span v-else>--</span>
+        </template>
+        <!-- 经销商名称 -->
+        <template slot="jxs" slot-scope="text, record">
+          <span v-if="record.subDealer">{{ record.subDealer.dealerName }}</span>
+          <span v-else>--</span>
+        </template>
+        <!-- 经销商级别 -->
+        <template slot="dealerLevel" slot-scope="text, record">
+          <span v-if="record.subDealer">{{ record.subDealer.provinceName }} > {{ record.subDealer.dealerLevelDictValue }}</span>
+          <span v-else>--</span>
+        </template>
+        <!-- 差价归属 -->
+        <template slot="cjgs" slot-scope="text, record">
+          <span v-if="record.supDealer">{{ record.supDealer.dealerName }}</span>
+          <span v-else>--</span>
+        </template>
+        <!-- 归属经销商级别 -->
+        <template slot="gsjxsjb" slot-scope="text, record">
+          <span v-if="record.supDealer">{{ record.supDealer.provinceName }} > {{ record.supDealer.dealerLevelDictValue }}</span>
+          <span v-else>--</span>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 关联下级 -->
     <associate-modal :openModal="openModal" :nowData="nowData" @ok="$refs.table.refresh(true)" @close="closeModal" />
   </a-card>
@@ -71,6 +74,7 @@ export default {
   components: { STable, VSelect, associateModal },
   data () {
     return {
+      spinning: false,
       tableHeight: 0,
       formItemLayout: {
         labelCol: { span: 6 },
@@ -90,9 +94,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 240
-        }
+        this.spinning = true
         return queryRebatePage(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -100,6 +102,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -123,7 +126,17 @@ export default {
     closeModal () {
       this.nowData = null
       this.openModal = false
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 195
     }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
   }
 }
 </script>

+ 24 - 11
src/views/financialManagement/financialCollection/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="financialCollectionList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
@@ -109,14 +109,11 @@
           </a-row>
         </a-form>
       </div>
-      <!-- 总计 -->
-      <!-- <a-alert type="info" style="margin-bottom:10px">
-        <div slot="message">合计:<strong>{{ total }}</strong>条</div>
-      </a-alert> -->
       <!-- 列表 -->
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         :rowKey="(record) => record.id"
         :columns="columns"
@@ -156,6 +153,7 @@ export default {
   data () {
     return {
       spinning: false,
+      tableHeight: 0,
       queryParam: { //  查询条件
         beginAuditDate: getDate.getThreeMonthDays().starttime,
         endAuditDate: getDate.getCurrMonthDays().endtime,
@@ -195,6 +193,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return salesReceiptList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -203,6 +202,7 @@ export default {
           }
           this.total = data.count || 0
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -212,11 +212,6 @@ export default {
       addrDistrictList: [] //  区下拉
     }
   },
-  computed: {
-    tableHeight () {
-      return window.innerHeight - (this.advanced ? 340 : 255)
-    }
-  },
   methods: {
     //  审核时间  change
     dateAuditChange (date) {
@@ -321,6 +316,24 @@ export default {
           }
         }
       })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 195
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   },
   beforeRouteEnter (to, from, next) {

+ 34 - 17
src/views/financialManagement/returnConfirmation/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="returnConfirmationList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
@@ -57,13 +57,14 @@
       </div>
       <!-- 列表 -->
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 1460, y: tableHeight }"
+        :scroll="{ x: 1210, y: tableHeight }"
         bordered>
         <!-- 销退单号 -->
         <template slot="salesReturnBillNo" slot-scope="text, record">
@@ -98,6 +99,7 @@ export default {
   data () {
     return {
       spinning: false,
+      tableHeight: 0,
       queryParam: { //  查询条件
         beginDate: '',
         endDate: '',
@@ -109,21 +111,22 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       advanced: true,
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单据来源', dataIndex: 'salesReturnBillSourceDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '总部销退单号', scopedSlots: { customRender: 'salesReturnBillNo' }, width: 220, align: 'center' },
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单据来源', dataIndex: 'salesReturnBillSourceDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '总部销退单号', scopedSlots: { customRender: 'salesReturnBillNo' }, width: 180, align: 'center' },
         { title: '退货客户', dataIndex: 'buyerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '退货数量', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '退货金额', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '是否抓单', dataIndex: 'grabFlagDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '确认时间', dataIndex: 'confirmTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '状态', dataIndex: 'billStatusDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货数量', dataIndex: 'totalQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货金额', dataIndex: 'totalAmount', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '是否抓单', dataIndex: 'grabFlagDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '确认时间', dataIndex: 'confirmTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', dataIndex: 'billStatusDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return salesReturnFinancialList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -131,6 +134,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -138,11 +142,6 @@ export default {
       itemSn: ''
     }
   },
-  computed: {
-    tableHeight () {
-      return window.innerHeight - (this.advanced ? 280 : 240)
-    }
-  },
   methods: {
     //  创建时间  change
     dateChange (date) {
@@ -207,6 +206,24 @@ export default {
           _this.spinning = false
         }
       })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 195
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   }
 }

+ 23 - 13
src/views/financialManagement/warehousingConfirmation/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="warehousingConfirmationList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
@@ -36,14 +36,15 @@
         </span>
       </div>
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         :row-selection="rowSelection"
         :rowKey="(record) => record.stockPutSn"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 1530, y: tableHeight }"
+        :scroll="{ x: 1280, y: tableHeight }"
         bordered>
         <!-- 入库单号 -->
         <template slot="stockPutNo" slot-scope="text, record">
@@ -104,14 +105,14 @@ export default {
       tableHeight: 0,
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
-        { title: '入库时间', dataIndex: 'putTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '入库单号', scopedSlots: { customRender: 'stockPutNo' }, width: 220, align: 'center' },
+        { title: '入库时间', dataIndex: 'putTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入库单号', scopedSlots: { customRender: 'stockPutNo' }, width: 180, align: 'center' },
         { title: '商户名称', dataIndex: 'providerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '入库数量', dataIndex: 'productTotalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库成本', dataIndex: 'productTotalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单据状态', dataIndex: 'auditStateDictValue', width: 110, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '财务审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入库数量', dataIndex: 'productTotalQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库成本', dataIndex: 'productTotalCost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单据状态', dataIndex: 'auditStateDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '财务审核时间', dataIndex: 'auditTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '备注', dataIndex: 'remark', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
       ],
@@ -120,12 +121,11 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 280
-        }
+        this.spinning = true
         return stockPutList(Object.assign(parameter, this.queryParam, { confirm: true })).then(res => {
           const data = res.data
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -239,7 +239,17 @@ export default {
     onSelectChange (selectedRowKeys) {
       console.log('selectedRowKeys changed: ', selectedRowKeys)
       this.selectedRowKeys = selectedRowKeys
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 235
     }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
   }
 }
 </script>

+ 19 - 1
src/views/inventoryManagement/intelligentReplenishment/edit.vue

@@ -33,7 +33,7 @@
                   <a-radio :value="0">自选产品</a-radio>
                 </a-radio-group>
               </a-form-model-item>
-              <productRange v-if="form.stockPredictRange==0" ref="productRange" :itemSn="$route.params.sn" @ok="handleProductOk" />
+              <productRange v-if="form.stockPredictRange==0" ref="productRange" :tableHeight="tableHeight" :itemSn="$route.params.sn" @ok="handleProductOk" />
             </div>
           </div>
           <!-- 参数设置 -->
@@ -91,6 +91,7 @@ export default {
   data () {
     return {
       spinning: false,
+      tableHeight: 0,
       formItemLayout: {
         labelCol: { span: 2 },
         wrapperCol: { span: 16 }
@@ -220,8 +221,17 @@ export default {
           this.form.safetyFactor = ''
         }
       })
+    },
+    setTableH () {
+      this.tableHeight = window.innerHeight - 550
     }
   },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
   beforeRouteEnter (to, from, next) {
     next(vm => {
       vm.getDetail()
@@ -234,10 +244,18 @@ export default {
 
 <style lang="less">
   .intelligentReplenishmentEdit-wrap{
+    height: 100%;
+    >.ant-spin-nested-loading{
+      height: 100%;
+      .ant-spin-container{
+        height: 93%;
+      }
+    }
     .intelligentReplenishmentEdit-back{
       margin-bottom: 10px;
     }
     .intelligentReplenishmentEdit-cont{
+      height: 100%;
       .steps-cont{
         width: 50%;
         margin: 30px auto 10px;

+ 17 - 2
src/views/inventoryManagement/intelligentReplenishment/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="intelligentReplenishmentList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 操作按钮 -->
-      <div class="table-operator">
+      <div ref="tableSearch" class="table-operator">
         <a-button v-if="$hasPermissions('B_intelligentReplenishment_add')" id="intelligentReplenishmentList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
         <a-button v-if="$hasPermissions('B_intelligentReplenishment_set')" id="intelligentReplenishmentList-set" type="primary" class="button-warning" @click="handleSet">基础信息设置</a-button>
       </div>
@@ -11,12 +11,14 @@
       </a-alert>
       <!-- 列表 -->
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
+        :scroll="{ y: tableHeight }"
         :showPagination="false"
         bordered>
         <!-- 操作 -->
@@ -68,6 +70,7 @@ export default {
   data () {
     return {
       spinning: false,
+      tableHeight: 0,
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
@@ -77,11 +80,13 @@ export default {
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
+        this.spinning = true
         return predictList({}).then(res => {
           const data = res.data
           for (var i = 0; i < data.length; i++) {
             data[i].no = i + 1
           }
+          this.spinning = false
           return data
         })
       },
@@ -172,7 +177,17 @@ export default {
       link.setAttribute('download', fname + '.xlsx')
       document.body.appendChild(link)
       link.click()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 230
     }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
   }
 }
 </script>

+ 5 - 1
src/views/inventoryManagement/intelligentReplenishment/productRange.vue

@@ -22,7 +22,7 @@
         :columns="columns"
         :data="loadData"
         :showPagination="false"
-        :scroll="{ y: 400 }"
+        :scroll="{ y: tableHeight }"
         bordered>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
@@ -50,6 +50,10 @@ export default {
     itemSn: {
       type: [String, Number],
       default: ''
+    },
+    tableHeight: {
+      type: [String, Number],
+      default: 400
     }
   },
   data () {

+ 32 - 13
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="inventoryQueryList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
@@ -83,13 +83,14 @@
       </a-alert>
       <!-- 列表 -->
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 1450, y: tableHeight }"
+        :scroll="{ x: 1170, y: tableHeight }"
         bordered>
         <!-- 现有库存数量 -->
         <template slot="currentStockQty" slot-scope="text, record">
@@ -137,6 +138,7 @@ export default {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0,
       queryParam: { //  查询条件
         productCode: '', //  产品编码
         productName: '', //  产品名称
@@ -157,19 +159,20 @@ export default {
         { name: '库存数量不为0', id: '0' }
       ],
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '最后入库时间', dataIndex: 'lastStockTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单位', dataIndex: 'productUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '最后入库时间', dataIndex: 'lastStockTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单位', dataIndex: 'productUnit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品品牌', dataIndex: 'productBrandName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '库存数量(个)', dataIndex: 'currentStockQty', scopedSlots: { customRender: 'currentStockQty' }, width: 165, align: 'center', sorter: true },
-        { title: '库存成本(¥)', dataIndex: 'currentStockCost', scopedSlots: { customRender: 'currentStockCost' }, width: 165, align: 'center', sorter: true },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center', fixed: 'right' }
+        { title: '库存数量(个)', dataIndex: 'currentStockQty', scopedSlots: { customRender: 'currentStockQty' }, width: 120, align: 'center', sorter: true },
+        { title: '库存成本(¥)', dataIndex: 'currentStockCost', scopedSlots: { customRender: 'currentStockCost' }, width: 120, align: 'center', sorter: true },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 160, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         // 排序
         if (parameter.sortField == 'currentStockQty') {
           parameter.sortField = 'qty'
@@ -186,6 +189,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           // 总计
           this.getTotal(Object.assign(parameter, this.queryParam))
           // 产品分类
@@ -205,9 +209,6 @@ export default {
     }
   },
   computed: {
-    tableHeight () {
-      return window.innerHeight - (this.advanced ? 315 : 275)
-    },
     stockQty () { //  库存总数量 合计
       const currentStockQty = this.currentStock && this.currentStock.currentStockQty ? Number(this.currentStock.currentStockQty) : 0
       const freezeQty = this.currentStock && this.currentStock.freezeQty ? Number(this.currentStock.freezeQty) : 0
@@ -335,6 +336,24 @@ export default {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 230
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   }
 }

+ 119 - 94
src/views/inventoryManagement/inventoryQuery/warehouseDetail.vue

@@ -1,94 +1,97 @@
 <template>
   <div class="inventoryQueryWarehouseDetail-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="inventoryQueryWarehouseDetail-back">
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="inventoryQueryWarehouseDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-      </template>
-    </a-page-header>
-    <a-card size="small" :bordered="false" class="inventoryQueryWarehouseDetail-cont">
-      <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
-        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-          <a-row :gutter="15">
-            <a-col :md="6" :sm="24">
-              <a-form-item label="变动类型">
-                <v-select
-                  v-model="queryParam.flowType"
-                  ref="flowType"
-                  id="inventoryQueryWarehouseDetail-flowType"
-                  code="STOCK_FLOW_TYPE"
-                  placeholder="请选择变动类型"
-                  allowClear></v-select>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="单据类型">
-                <v-select
-                  v-model="queryParam.bizType"
-                  ref="bizType"
-                  id="inventoryQueryWarehouseDetail-bizType"
-                  code="STOCK_FLOW_BIZ_TYPE"
-                  placeholder="请选择单据类型"
-                  allowClear></v-select>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="仓库">
-                <a-select id="inventoryQueryWarehouseDetail-warehouseSn" allowClear placeholder="请选择仓库" v-model="queryParam.warehouseSn" >
-                  <a-select-option v-for="item in warehouseList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
-                </a-select>
-              </a-form-item>
-            </a-col>
-            <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="inventoryQueryWarehouseDetail-back">
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="inventoryQueryWarehouseDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+        </template>
+      </a-page-header>
+      <a-card size="small" :bordered="false" class="inventoryQueryWarehouseDetail-cont">
+        <!-- 搜索条件 -->
+        <div ref="tableSearch" class="table-page-search-wrapper">
+          <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+            <a-row :gutter="15">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="变动类型">
+                  <v-select
+                    v-model="queryParam.flowType"
+                    ref="flowType"
+                    id="inventoryQueryWarehouseDetail-flowType"
+                    code="STOCK_FLOW_TYPE"
+                    placeholder="请选择变动类型"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-item label="单据审核时间">
-                  <rangeDate ref="rangeDate" @change="dateChange" />
+                <a-form-item label="单据类型">
+                  <v-select
+                    v-model="queryParam.bizType"
+                    ref="bizType"
+                    id="inventoryQueryWarehouseDetail-bizType"
+                    code="STOCK_FLOW_BIZ_TYPE"
+                    placeholder="请选择单据类型"
+                    allowClear></v-select>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-item label="单位名称">
-                  <a-input id="inventoryQueryWarehouseDetail-unitName" v-model.trim="queryParam.unitName" allowClear placeholder="请输入单位名称"/>
+                <a-form-item label="仓库">
+                  <a-select id="inventoryQueryWarehouseDetail-warehouseSn" allowClear placeholder="请选择仓库" v-model="queryParam.warehouseSn" >
+                    <a-select-option v-for="item in warehouseList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
+                  </a-select>
                 </a-form-item>
               </a-col>
-            </template>
-            <a-col :md="6" :sm="24">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryQueryWarehouseDetail-refresh">查询</a-button>
-              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="inventoryQueryWarehouseDetail-reset">重置</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 8px">
-                {{ advanced ? '收起' : '展开' }}
-                <a-icon :type="advanced ? 'up' : 'down'"/>
-              </a>
-            </a-col>
-          </a-row>
-        </a-form>
-      </div>
-      <!-- 合计 -->
-      <a-alert type="info" style="margin-bottom:10px">
-        <div class="ftext" slot="message">
-          当前库存总数量(个):<strong>{{ (productTotal&&(productTotal.totalQty || productTotal.totalQty==0)) ? productTotal.totalQty : '--' }}</strong>;
-          当前库存总成本(¥):<strong>{{ (productTotal&&(productTotal.totalCost || productTotal.totalCost==0)) ? productTotal.totalCost : '--' }}</strong>。
+              <template v-if="advanced">
+                <a-col :md="6" :sm="24">
+                  <a-form-item label="单据审核时间">
+                    <rangeDate ref="rangeDate" @change="dateChange" />
+                  </a-form-item>
+                </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-item label="单位名称">
+                    <a-input id="inventoryQueryWarehouseDetail-unitName" v-model.trim="queryParam.unitName" allowClear placeholder="请输入单位名称"/>
+                  </a-form-item>
+                </a-col>
+              </template>
+              <a-col :md="6" :sm="24">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryQueryWarehouseDetail-refresh">查询</a-button>
+                <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="inventoryQueryWarehouseDetail-reset">重置</a-button>
+                <a @click="advanced=!advanced" style="margin-left: 8px">
+                  {{ advanced ? '收起' : '展开' }}
+                  <a-icon :type="advanced ? 'up' : 'down'"/>
+                </a>
+              </a-col>
+            </a-row>
+          </a-form>
         </div>
-      </a-alert>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 1980 }"
-        bordered>
-        <!-- 数量 -->
-        <template slot="qty" slot-scope="text, record">
-          <p :class="record.flowType=='PUT' ? 'green':'red'" style="margin: 0;">
-            <span v-if="record.qty!=0">{{ record.flowType=='PUT' ? '+':'-' }}</span>
-            {{ record.qty }}
-          </p>
-        </template>
-      </s-table>
-    </a-card>
+        <!-- 合计 -->
+        <a-alert type="info" style="margin-bottom:10px">
+          <div class="ftext" slot="message">
+            当前库存总数量(个):<strong>{{ (productTotal&&(productTotal.totalQty || productTotal.totalQty==0)) ? productTotal.totalQty : '--' }}</strong>;
+            当前库存总成本(¥):<strong>{{ (productTotal&&(productTotal.totalCost || productTotal.totalCost==0)) ? productTotal.totalCost : '--' }}</strong>。
+          </div>
+        </a-alert>
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          :style="{ height: tableHeight+84.5+'px' }"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ x: 1590, y: tableHeight }"
+          bordered>
+          <!-- 数量 -->
+          <template slot="qty" slot-scope="text, record">
+            <p :class="record.flowType=='PUT' ? 'green':'red'" style="margin: 0;">
+              <span v-if="record.qty!=0">{{ record.flowType=='PUT' ? '+':'-' }}</span>
+              {{ record.qty }}
+            </p>
+          </template>
+        </s-table>
+      </a-card>
+    </a-spin>
   </div>
 </template>
 
@@ -101,7 +104,9 @@ export default {
   components: { STable, VSelect, rangeDate },
   data () {
     return {
+      spinning: false,
       advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
       queryParam: { //  查询条件
         beginDate: '',
         endDate: '',
@@ -112,23 +117,24 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
-        { title: '产品编码', dataIndex: 'productCode', width: 220, align: 'center', fixed: 'left', customRender: function (text) { return text || '--' } },
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center', fixed: 'left' },
+        { title: '产品编码', dataIndex: 'productCode', width: 180, align: 'center', fixed: 'left', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '批次号', dataIndex: 'stockBatchNo', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单据类型', dataIndex: 'bizTypeDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单据审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单位名称', dataIndex: 'unitName', width: 200, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '仓库', dataIndex: 'warehouseName', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '仓位', dataIndex: 'warehouseLocationName', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '数量', scopedSlots: { customRender: 'qty' }, width: 100, align: 'center' },
-        { title: '总成本', dataIndex: 'totalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总售价', dataIndex: 'totalPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '批次号', dataIndex: 'stockBatchNo', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单据类型', dataIndex: 'bizTypeDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单据审核时间', dataIndex: 'auditTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单位名称', dataIndex: 'unitName', width: 180, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '仓库', dataIndex: 'warehouseName', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '数量', scopedSlots: { customRender: 'qty' }, width: 80, align: 'center' },
+        { title: '总成本', dataIndex: 'totalCost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总售价', dataIndex: 'totalPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         const params = Object.assign(parameter, this.queryParam, { productSn: this.$route.params.sn })
         return stockFlowList(params).then(res => {
           const data = res.data
@@ -142,6 +148,7 @@ export default {
             }
           }
           this.disabled = false
+          this.spinning = false
           this.getTotal(params)
           return data
         })
@@ -192,6 +199,24 @@ export default {
           this.warehouseList = []
         }
       })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 230 - 52
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   },
   beforeRouteEnter (to, from, next) {

+ 66 - 85
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -2,8 +2,8 @@
   <a-card size="small" :bordered="false" class="inventoryWarningList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
-        <a-form layout="inline" @keyup.enter.native="pageInit(1)">
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="产品编码">
@@ -63,7 +63,7 @@
               </a-col>
             </template>
             <a-col :md="6" :sm="24">
-              <a-button type="primary" @click="pageInit(1)" :disabled="disabled" id="inventoryWarningList-refresh">查询</a-button>
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryWarningList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryWarningList-reset">重置</a-button>
               <!-- <a-button
                 style="margin-left: 8px"
@@ -88,17 +88,16 @@
         </span>
       </div>
       <!-- 列表 -->
-      <a-table
-        class="sTable"
+      <s-table
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         :row-selection="$hasPermissions('B_inventoryWarning_refresh')?{ selectedRowKeys: selectedRowKeys, onChange: onChange, onSelect: onSelectChange, onSelectAll: onSelectAllChange }:null"
         :rowKey="(record) => record.id"
         :columns="columns"
-        :dataSource="loadData"
-        :scroll="{ x: 2220, y: tableHeight }"
-        :pagination="false"
-        :loading="tableLoading"
+        :data="loadData"
+        :scroll="{ x: 1800, y: tableHeight }"
         bordered>
         <!-- 产品分类 -->
         <template slot="productType" slot-scope="text, record">
@@ -165,15 +164,7 @@
             id="inventoryWarningList-add-btn">保存</a-button>
           <span v-else>--</span>
         </template>
-      </a-table>
-      <!-- 分页 -->
-      <tablePagination
-        ref="tablePagination"
-        :total="paginationProps.total"
-        :current="paginationProps.current"
-        :pageSize="paginationProps.pageSize"
-        @changePageSize="changePageSize"
-        @changePage="changePage" />
+      </s-table>
     </a-spin>
   </a-card>
 </template>
@@ -181,16 +172,16 @@
 <script>
 import moment from 'moment'
 import { STable, VSelect } from '@/components'
-import tablePagination from '@/views/common/tablePagination.vue'
 import { productBrandQuery } from '@/api/productBrand'
 import { productTypeQuery } from '@/api/productType'
 import { stockWarnList, stockWarnSaveBatch } from '@/api/stock'
 export default {
-  components: { STable, VSelect, tablePagination },
+  components: { STable, VSelect },
   data () {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0,
       queryParam: { //  查询条件
         productCode: '',
         productName: '',
@@ -203,31 +194,47 @@ export default {
       },
       exportLoading: false, // 导出loading
       disabled: false, //  查询、重置按钮是否可操作
-      tableLoading: false, //  表格加载中
       productBrandList: [], //  产品品牌下拉数据
       productTypeList: [], //  产品类别下拉数据
       productType: [],
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品品牌', dataIndex: 'productBrandName', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
-        { title: '实时库存数(个)', scopedSlots: { customRender: 'stockQty' }, width: 180, align: 'center' },
-        { title: '在途数(个)', scopedSlots: { customRender: 'inTransit' }, width: 130, align: 'center' },
-        { title: '总库存数(个)', dataIndex: 'totalQty', width: 130, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '最大库存数(个)', scopedSlots: { customRender: 'upperLimit' }, width: 130, align: 'center' },
-        { title: '最小库存数(个)', scopedSlots: { customRender: 'lowerLimit' }, width: 130, align: 'center' },
-        { title: '差异数量', dataIndex: 'differenceNum', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '预警提示', scopedSlots: { customRender: 'stockState' }, width: 100, align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品品牌', dataIndex: 'productBrandName', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 180, align: 'center' },
+        { title: '实时库存数(个)', scopedSlots: { customRender: 'stockQty' }, width: 110, align: 'center' },
+        { title: '在途数(个)', scopedSlots: { customRender: 'inTransit' }, width: 100, align: 'center' },
+        { title: '总库存数(个)', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '最大库存数(个)', scopedSlots: { customRender: 'upperLimit' }, width: 110, align: 'center' },
+        { title: '最小库存数(个)', scopedSlots: { customRender: 'lowerLimit' }, width: 110, align: 'center' },
+        { title: '差异数量', dataIndex: 'differenceNum', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '预警提示', scopedSlots: { customRender: 'stockState' }, width: 80, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
       ],
-      loadData: [],
-      paginationProps: {
-        total: 0, //  分页总条数
-        current: 1,
-        pageSize: 20
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return stockWarnList(Object.assign(parameter, this.queryParam)).then(res => {
+          const data = res.data
+          const no = (data.pageNo - 1) * data.pageSize
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = no + i + 1
+            if (this.selectedRowKeys) { //  处理切换页码后 上页已选已输数据保留
+              const ind = this.selectedRowKeys.indexOf(data.list[i].id)
+              if (ind >= 0) {
+                data.list[i].inTransit = this.selectedRows[ind].inTransit
+                data.list[i].upperLimit = this.selectedRows[ind].upperLimit
+                data.list[i].lowerLimit = this.selectedRows[ind].lowerLimit
+              }
+            }
+          }
+          this.disabled = false
+          this.spinning = false
+          return data
+        })
       },
       selectedRowKeys: [],
       selectedRows: [],
@@ -235,51 +242,11 @@ export default {
     }
   },
   computed: {
-    tableHeight () {
-      return window.innerHeight - (this.advanced ? 330 : 290)
-    },
     hasSelected () {
       return this.selectedRowKeys.length > 0
     }
   },
   methods: {
-    //  分页  一页多少条change
-    changePageSize (current, pageSize) {
-      this.paginationProps.current = current
-      this.paginationProps.pageSize = pageSize
-      this.pageInit()
-    },
-    //  分页 页码change
-    changePage (current) {
-      this.paginationProps.current = current
-      this.pageInit()
-    },
-    //  列表数据
-    pageInit (pageNo) {
-      this.disabled = true
-      this.paginationProps.current = pageNo || this.paginationProps.current
-      const params = Object.assign({ pageNo: this.paginationProps.current, pageSize: this.paginationProps.pageSize }, this.queryParam)
-      this.tableLoading = true
-      stockWarnList(params).then(res => {
-        this.tableLoading = false
-        if (res.status == 200) {
-          const data = res.data
-          this.paginationProps.total = Number(res.data.count) || 0
-          this.paginationProps.current = data.pageNo
-          const no = (data.pageNo - 1) * data.pageSize
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = no + i + 1
-          }
-          this.loadData = data.list
-          this.disabled = false
-        } else {
-          this.paginationProps.total = 0
-          this.paginationProps.current = 1
-          this.paginationProps.pageSize = 20
-          this.loadData = []
-        }
-      })
-    },
     //  保存
     handleSave (row, isBatch) {
       const params = []
@@ -329,7 +296,7 @@ export default {
       stockWarnSaveBatch(params).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
-          this.pageInit()
+          this.$refs.table.refresh()
           this.selectedRowKeys = []
           this.selectedRows = []
           this.spinning = false
@@ -387,10 +354,7 @@ export default {
       this.queryParam.productTypeSn3 = undefined
       this.queryParam.stockState = undefined
       this.productType = []
-      this.paginationProps.total = 0
-      this.paginationProps.current = 1
-      this.paginationProps.pageSize = 20
-      this.pageInit(1)
+      this.$refs.table.refresh(true)
     },
     //  批量更新
     handleupdate () {
@@ -460,11 +424,28 @@ export default {
       link.setAttribute('download', fname + '.xlsx')
       document.body.appendChild(link)
       link.click()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 245
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {
-      vm.pageInit(1)
       vm.getProductType()
       vm.getProductBrand()
     })

+ 19 - 13
src/views/power/OperateJournal/OperateJournal.vue

@@ -1,8 +1,8 @@
 <template>
-  <a-card :bordered="false">
+  <a-card size="small" :bordered="false">
     <div class="operateJournal">
       <!-- 搜索框 -->
-      <div class="table-page-search-wrapper">
+      <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
@@ -29,8 +29,9 @@
       </div>
       <!-- 列表 -->
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         rowKey="id"
         :columns="columns"
@@ -45,7 +46,6 @@
 </template>
 
 <script>
-import moment from 'moment'
 import getDate from '@/libs/getDate'
 import { STable } from '@/components'
 import { journalList } from '@/api/OperateJournal.js'
@@ -57,9 +57,10 @@ export default {
     return {
       advanced: false, // 高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
+      tableHeight: 0,
       time: [
-        moment(getDate.getThreeday().starttime, this.dateFormat),
-        moment(getDate.getThreeday().endtime, this.dateFormat)
+        getDate.getThreeday().starttime,
+        getDate.getThreeday().endtime
       ],
       queryParam: {
         beginDate: getDate.getThreeday().starttime, // 查询的开始时间
@@ -69,8 +70,8 @@ export default {
       },
       dateFormat: 'YYYY-MM-DD',
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
-        { title: '操作时间', dataIndex: 'actDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '操作时间', dataIndex: 'actDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: 'IP', dataIndex: 'ip', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作人', dataIndex: 'actorName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '操作信息', dataIndex: 'actDesc', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true }
@@ -92,11 +93,6 @@ export default {
       }
     }
   },
-  computed: {
-    tableHeight () {
-      return window.innerHeight - 340
-    }
-  },
   methods: {
     //  时间  change
     dateChange (date) {
@@ -111,7 +107,17 @@ export default {
       this.queryParam.actDesc = ''
       this.queryParam.actorName = ''
       this.$refs.table.refresh(true)
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 195
     }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
   }
 }
 </script>

+ 24 - 46
src/views/power/role/roleList.vue

@@ -1,7 +1,7 @@
 <template>
   <a-card size="small" :bordered="false">
     <a-spin :spinning="spinning" tip="Loading...">
-      <div class="table-page-search-wrapper">
+      <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline">
           <a-row :gutter="48">
             <a-col :md="6" :sm="24">
@@ -31,11 +31,14 @@
         <a-button type="primary" v-if="$hasPermissions('B_power_role_add')" class="button-error" @click="openModal" id="roleList-openModal">新增</a-button>
       </div>
       <s-table
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         rowKey="id"
         :columns="columns"
         :data="loadData"
+        :scroll="{ y: tableHeight }"
         style="word-break: break-all;"
         bordered>
         <!-- 启用禁用 -->
@@ -96,6 +99,7 @@ export default {
   data () {
     return {
       spinning: false,
+      tableHeight: 0,
       // 查询参数
       queryParam: {
         name: '',
@@ -106,52 +110,17 @@ export default {
       itemData: {}, // 编辑行数据
       menuData: {},
       // 表头
-      columns: [{
-        title: '序号',
-        dataIndex: 'no',
-        width: 60,
-        align: 'center'
-      },
-      {
-        title: '创建时间',
-        dataIndex: 'createDate',
-        width: 150,
-        align: 'center'
-      },
-      {
-        title: '角色名称',
-        dataIndex: 'name',
-        width: 150,
-        align: 'center'
-      },
-      {
-        title: '角色描述',
-        dataIndex: 'remarks',
-        width: 200,
-        align: 'center',
-        scopedSlots: {
-          customRender: 'remarks'
-        }
-      },
-      {
-        title: '状态',
-        width: 150,
-        align: 'center',
-        scopedSlots: {
-          customRender: 'status'
-        }
-      },
-      {
-        title: '操作',
-        width: 150,
-        align: 'center',
-        scopedSlots: {
-          customRender: 'action'
-        }
-      }
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center' },
+        { title: '角色名称', dataIndex: 'name', align: 'center' },
+        { title: '角色描述', dataIndex: 'remarks', width: 200, align: 'center', scopedSlots: { customRender: 'remarks' } },
+        { title: '状态', width: 100, align: 'center', scopedSlots: { customRender: 'status' } },
+        { title: '操作', width: 150, align: 'center', scopedSlots: { customRender: 'action' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
+        this.spinning = true
         return getPowerRoleList(Object.assign(parameter, this.queryParam)).then(res => {
           const no = (res.data.pageNo - 1) * res.data.pageSize
           for (let i = 0; i < res.data.list.length; i++) {
@@ -159,6 +128,7 @@ export default {
             _item.no = no + i + 1
             _item.isEnable = _item.isEnable + '' === '1'
           }
+          this.spinning = false
           return res.data
         })
       },
@@ -246,7 +216,17 @@ export default {
           this.spinning = false
         }
       })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 245
     }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
   }
 }
 </script>
@@ -260,11 +240,9 @@ export default {
 		color: #fff;
 		margin-right: 5px;
 	}
-
 	.red-text {
 		background-color: red;
 	}
-
 	.menu-text {
 		background-color: #f90;
 	}

+ 19 - 26
src/views/power/user/userList.vue

@@ -1,7 +1,7 @@
 <template>
   <a-card size="small" :bordered="false">
     <a-spin :spinning="spinning" tip="Loading...">
-      <div class="table-page-search-wrapper">
+      <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
@@ -27,46 +27,26 @@
         </a-form>
       </div>
       <div class="table-operator">
-        <!-- <a-button v-if="$hasPermissions('B_powerMD_user_add')" type="primary" class="button-error" @click="openModal">新增</a-button> -->
         <a-button type="primary" v-if="$hasPermissions('B_power_user_add')" class="button-error" @click="openModal">新增</a-button>
       </div>
       <s-table
+        class="sTable fixPagination"
         ref="table"
         size="small"
+        :style="{ height: tableHeight+84.5+'px' }"
         rowKey="id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 1350 }"
+        :scroll="{ x: 1350, y: tableHeight }"
         style="word-break: break-all;"
         bordered
       >
         <span slot="status" slot-scope="text, record">
-          <!-- <a-switch v-if="$hasPermissions('B_powerMD_user_enable')" checkedChildren="启用" unCheckedChildren="禁用" v-model="record.loginFlag" @change="changeFlagHandle(text, record)"/>
-          <span v-else>{{ record.loginFlag==1?'已启用':'已禁用' }}</span> -->
           <!-- 超级管理员不可删除不可编辑不可启禁用 -->
           <a-switch v-if="record.superAdmin!=1 && $hasPermissions('B_power_user_enable')" checkedChildren="启用" unCheckedChildren="禁用" v-model="record.loginFlag" @change="changeFlagHandle(text, record)"/>
           <span v-else>{{ record.loginFlag==1?'已启用':'已禁用' }}</span>
         </span>
         <span slot="action" slot-scope="text, record">
-          <!-- <a-icon
-            type="edit"
-            title="编辑"
-            :style="{fontSize: '20px',color:' #1890FF',padding:' 0 10px'}"
-            v-if="$hasPermissions('B_powerMD_user_edit')"
-            @click="handleEdit(record)"
-          />
-          <a-icon
-            type="unlock"
-            title="重置密码"
-            v-if="record.loginFlag==1 && $hasPermissions('B_powerMD_user_restPwd')"
-            :style="{fontSize: '20px',color:' #ffaa00',padding: '0 10px'}"
-            @click="resetPassword(record)" />
-          <a-icon
-            type="delete"
-            title="删除"
-            :style="{fontSize: '20px',color: '#f00',padding: '0 10px'}"
-            v-if="record.loginFlag==0 && $hasPermissions('B_powerMD_user_del')"
-            @click="delect(record)"/> -->
           <a-icon
             type="edit"
             title="编辑"
@@ -114,6 +94,7 @@ export default {
   data () {
     return {
       spinning: false,
+      tableHeight: 0,
       // 查询参数
       queryParam: {
         name: '',
@@ -125,8 +106,8 @@ export default {
       itemData: null, // 编辑行数据
       // 表头
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '用户名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '手机号码', dataIndex: 'phone', width: 150, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '用户账号', dataIndex: 'loginName', width: 150, align: 'center', customRender: function (text) { return text || '--' } },
@@ -137,6 +118,7 @@ export default {
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
+        this.spinning = true
         return getPowerUserList(Object.assign(parameter, this.queryParam)).then(res => {
           const no = (res.data.pageNo - 1) * res.data.pageSize
           for (let i = 0; i < res.data.list.length; i++) {
@@ -144,6 +126,7 @@ export default {
             _item.no = no + i + 1
             _item.loginFlag = _item.loginFlag + '' === '1'
           }
+          this.spinning = false
           return res.data
         })
       },
@@ -236,7 +219,17 @@ export default {
           this.spinning = false
         }
       })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 255
     }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
   }
 }
 </script>

+ 45 - 37
src/views/productManagement/priceChangeRecord/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="productChangeRecordList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
@@ -15,13 +15,13 @@
                 <a-input id="productChangeRecordList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="5" :sm="24">
               <a-form-item label="产品编码">
                 <a-input id="productChangeRecordList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
               </a-form-item>
             </a-col>
             <template v-if="advanced">
-              <a-col :md="6" :sm="24">
+              <a-col :md="7" :sm="24">
                 <a-form-item label="品牌">
                   <a-select
                     placeholder="请选择"
@@ -50,7 +50,7 @@
                 </a-form-item>
               </a-col>
             </template>
-            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-col :md="7" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productChangeRecordList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productChangeRecordList-reset">重置</a-button>
               <a-button
@@ -69,19 +69,16 @@
           </a-row>
         </a-form>
       </div>
-      <!-- 总计 -->
-      <!-- <a-alert type="info" style="margin-bottom:10px">
-        <div slot="message">合计:<strong>{{ total }}</strong>条</div>
-      </a-alert> -->
       <!-- 列表 -->
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+122.5+'px' }"
         size="small"
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 2340, y: tableHeight }"
+        :scroll="{ x: 1810, y: tableHeight }"
         bordered>
         <!-- 产品分类 -->
         <template slot="productType" slot-scope="text, record">
@@ -132,6 +129,7 @@ export default {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0,
       queryParam: { //  查询条件
         beginDate: getDate.getThreeMonthDays().starttime,
         endDate: getDate.getCurrMonthDays().endtime,
@@ -150,68 +148,64 @@ export default {
       ], //  变更时间
       exportLoading: false, // 导出loading
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
-        { title: '变更时间', dataIndex: 'updateDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center', fixed: 'left' },
+        { title: '变更时间', dataIndex: 'updateDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'productEntity.code', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '品牌', dataIndex: 'productEntity.productBrandName', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
-        { title: '单位', dataIndex: 'productEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productEntity.code', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '品牌', dataIndex: 'productEntity.productBrandName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 140, align: 'center' },
+        { title: '单位', dataIndex: 'productEntity.unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
         {
           title: '省级价',
           dataIndex: 'sdtermindfaldsdPrice',
-          width: 200,
           align: 'center',
           children: [
-            { title: '变更前', dataIndex: 'beforeProvincePrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-            { title: '变更后', scopedSlots: { customRender: 'afterProvincePrice' }, width: 100, align: 'center' }
+            { title: '变更前', dataIndex: 'beforeProvincePrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '变更后', scopedSlots: { customRender: 'afterProvincePrice' }, width: 80, align: 'center' }
           ]
         },
         {
           title: '市级价',
           dataIndex: 'sdterminaldsdPrice',
-          width: 200,
           align: 'center',
           children: [
-            { title: '变更前', dataIndex: 'beforeCityPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-            { title: '变更后', scopedSlots: { customRender: 'afterCityPrice' }, width: 100, align: 'center' }
+            { title: '变更前', dataIndex: 'beforeCityPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '变更后', scopedSlots: { customRender: 'afterCityPrice' }, width: 80, align: 'center' }
           ]
         },
         {
           title: '特约价',
           dataIndex: 'gterminaldsdPrice',
-          width: 200,
           align: 'center',
           children: [
-            { title: '变更前', dataIndex: 'beforeSpecialPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-            { title: '变更后', scopedSlots: { customRender: 'afterSpecialPrice' }, width: 100, align: 'center' }
+            { title: '变更前', dataIndex: 'beforeSpecialPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '变更后', scopedSlots: { customRender: 'afterSpecialPrice' }, width: 80, align: 'center' }
           ]
         },
         {
           title: '终端价',
           dataIndex: 'hterminaldsdPrice',
-          width: 200,
           align: 'center',
           children: [
-            { title: '变更前', dataIndex: 'beforeTerminalPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-            { title: '变更后', scopedSlots: { customRender: 'afterTerminalPrice' }, width: 100, align: 'center' }
+            { title: '变更前', dataIndex: 'beforeTerminalPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '变更后', scopedSlots: { customRender: 'afterTerminalPrice' }, width: 80, align: 'center' }
           ]
         },
         {
           title: '车主价',
           dataIndex: 'sterminaldsdPrice',
-          width: 200,
           align: 'center',
           children: [
-            { title: '变更前', dataIndex: 'beforeCarOwnersPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-            { title: '变更后', scopedSlots: { customRender: 'afterCarOwnersPrice' }, width: 100, align: 'center' }
+            { title: '变更前', dataIndex: 'beforeCarOwnersPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '变更后', scopedSlots: { customRender: 'afterCarOwnersPrice' }, width: 80, align: 'center' }
           ]
         },
-        { title: '变更原因', dataIndex: 'changeReason', width: 160, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
+        { title: '变更原因', dataIndex: 'changeReason', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return productPriceChangeList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -220,6 +214,7 @@ export default {
           }
           this.total = data.count || 0
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -228,11 +223,6 @@ export default {
       productTypeList: [] //  分类下拉数据
     }
   },
-  computed: {
-    tableHeight () {
-      return window.innerHeight - (this.advanced ? 320 : 280)
-    }
-  },
   methods: {
     //  创建时间  change
     dateChange (date) {
@@ -339,6 +329,24 @@ export default {
           this.productTypeList = []
         }
       })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 233
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   },
   beforeRouteEnter (to, from, next) {

+ 18 - 8
src/views/productManagement/productBrand/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="productBrandList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
@@ -35,8 +35,9 @@
       </div>
       <!-- 列表 -->
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         :rowKey="(record) => record.id"
         :columns="columns"
@@ -45,7 +46,7 @@
         bordered>
         <!-- 产品图片 -->
         <template slot="imageUrl" slot-scope="text, record">
-          <img :src="record.imageUrl" width="30" height="30" class="imageUrl" @click="lookPic(record.imageUrl)" />
+          <img :src="record.imageUrl+'?x-oss-process=image/resize,h_30,m_lfit' || ''" width="30" height="30" class="imageUrl" @click="lookPic(record.imageUrl)" />
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
@@ -112,8 +113,8 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '品牌图片', scopedSlots: { customRender: 'imageUrl' }, width: 140, align: 'center' },
         { title: '品牌名称', dataIndex: 'brandName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '品牌分类', dataIndex: 'brandTypeDictValue', align: 'center', customRender: function (text) { return text || '--' } },
@@ -123,9 +124,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 290
-        }
+        this.spinning = true
         return productBrandList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -133,6 +132,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -199,7 +199,17 @@ export default {
           })
         }
       })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 245
     }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
   }
 }
 </script>

+ 1 - 0
src/views/productManagement/productCategory/list.vue

@@ -163,6 +163,7 @@ export default {
 
 <style lang="less">
   .productCategoryList-wrap{
+    height: 100%;
     // 表格
     .s-table{
       .btn-edit-s{

+ 17 - 11
src/views/productManagement/productInfo/edit.vue

@@ -196,18 +196,16 @@
           </a-row>
         </a-card>
       </a-form-model>
-      <a-affix :offset-bottom="0" class="affix">
-        <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-          <a-button
-            type="primary"
-            class="button-primary"
-            id="productInfoEdit-submit-btn"
-            size="large"
-            @click="handleSubmit"
-            style="padding: 0 60px;">提交</a-button>
-        </div>
-      </a-affix>
     </a-spin>
+    <div class="affix-cont">
+      <a-button
+        type="primary"
+        class="button-primary"
+        id="productInfoEdit-submit-btn"
+        size="large"
+        @click="handleSubmit"
+        style="padding: 0 60px;">提交</a-button>
+    </div>
   </div>
 </template>
 
@@ -432,6 +430,14 @@ export default {
 
 <style lang="less">
   .productInfoEdit-wrap{
+    position: relative;
+    height: 100%;
+    padding-bottom: 51px;
+    box-sizing: border-box;
+    >.ant-spin-nested-loading{
+      overflow-y: scroll;
+      height: 100%;
+    }
     .productInfoEdit-cont{
       margin-bottom: 10px;
     }

+ 39 - 20
src/views/productManagement/productInfo/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="productInfoList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
@@ -15,7 +15,7 @@
                 <a-input id="productInfoList-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入产品编码/原厂编码"/>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="5" :sm="24">
               <a-form-item label="品牌">
                 <a-select
                   placeholder="请选择"
@@ -30,7 +30,7 @@
               </a-form-item>
             </a-col>
             <template v-if="advanced">
-              <a-col :md="6" :sm="24">
+              <a-col :md="7" :sm="24">
                 <a-form-item label="产品分类">
                   <a-cascader
                     @change="changeProductType"
@@ -55,7 +55,7 @@
                 </a-form-item>
               </a-col>
             </template>
-            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-col :md="7" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productInfoList-reset">重置</a-button>
               <a-button
@@ -107,14 +107,15 @@
         </span>
       </div>
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         :row-selection=" showSelect ?{ selectedRowKeys: selectedRowKeys, onChange: onChange, onSelect: onSelectChange, onSelectAll: onSelectAllChange }:null"
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 2150, y: tableHeight }"
+        :scroll="{ x: 1650, y: tableHeight }"
         bordered>
         <!-- 自定义表头 -->
         <template slot="arrowFalgTitle">
@@ -203,6 +204,7 @@ export default {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0,
       queryParam: { //  查询条件
         name: '', //  产品名称
         queryWord: '', // 产品编码/原厂编码
@@ -217,18 +219,18 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'code', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'origCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '品牌', dataIndex: 'productBrandName', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
-        { slots: { title: 'arrowFalgTitle' }, scopedSlots: { customRender: 'arrowFalg' }, width: 100, align: 'center' },
-        { title: '最近修改时间', dataIndex: 'updateDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品状态', dataIndex: 'stateDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '定价状态', dataIndex: 'pricingStateDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 250, align: 'center', fixed: 'right' }
+        { title: '产品编码', dataIndex: 'code', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'origCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '品牌', dataIndex: 'productBrandName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 140, align: 'center' },
+        { slots: { title: 'arrowFalgTitle' }, scopedSlots: { customRender: 'arrowFalg' }, width: 80, align: 'center' },
+        { title: '最近修改时间', dataIndex: 'updateDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品状态', dataIndex: 'stateDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '定价状态', dataIndex: 'pricingStateDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 180, align: 'center', fixed: 'right' }
       ],
       selectedRowKeys: [], // Check here to configure the default column
       selectedRows: [],
@@ -238,6 +240,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return productList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -245,6 +248,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -257,9 +261,6 @@ export default {
     }
   },
   computed: {
-    tableHeight () {
-      return window.innerHeight - (this.advanced ? 330 : 290)
-    },
     hasSelected () {
       return this.selectedRowKeys.length > 0
     },
@@ -582,6 +583,24 @@ export default {
           this.productTypeList = []
         }
       })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 245
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   },
   beforeRouteEnter (to, from, next) {

+ 24 - 14
src/views/productManagement/productLaunchAudit/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="productLaunchAuditList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
@@ -41,14 +41,15 @@
         </span>
       </div>
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         :row-selection="rowSelection"
         :rowKey="(record) => record.productSn"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 1510, y: tableHeight }"
+        :scroll="{ x: 1200, y: tableHeight }"
         bordered>
         <!-- 产品分类 -->
         <template slot="productType" slot-scope="text, record">
@@ -88,26 +89,25 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
         { title: '产品名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品编码', dataIndex: 'code', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
-        { title: '提交时间', dataIndex: 'onlineSubmitTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '提交人', dataIndex: 'onlineSubmitPerson', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '审核状态', dataIndex: 'stateDictValue', width: 110, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '审核时间', dataIndex: 'onlineAuditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '审核人', dataIndex: 'onlineAuditPerson', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
+        { title: '产品编码', dataIndex: 'code', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 140, align: 'center' },
+        { title: '提交时间', dataIndex: 'onlineSubmitTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '提交人', dataIndex: 'onlineSubmitPerson', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '审核状态', dataIndex: 'stateDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核时间', dataIndex: 'onlineAuditTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核人', dataIndex: 'onlineAuditPerson', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
       ],
       selectedRowKeys: [], // Check here to configure the default column
       loading: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 280
-        }
+        this.spinning = true
         return productOnlineList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           this.disabled = false
+          this.spinning = false
           return data
         })
       }
@@ -196,7 +196,17 @@ export default {
     onSelectChange (selectedRowKeys) {
       console.log('selectedRowKeys changed: ', selectedRowKeys)
       this.selectedRowKeys = selectedRowKeys
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 235
     }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
   }
 }
 </script>

+ 34 - 17
src/views/productManagement/productLevel/list.vue

@@ -1,7 +1,7 @@
 <template>
   <a-card size="small" :bordered="false" class="productLevelList-wrap">
     <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
+    <div ref="tableSearch" class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
@@ -67,13 +67,14 @@
     </div> -->
     <!-- 列表 -->
     <s-table
-      class="sTable"
+      class="sTable fixPagination"
       ref="table"
+      :style="{ height: tableHeight+84.5+'px' }"
       size="small"
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
-      :scroll="{ x: 1590, y: tableHeight }"
+      :scroll="{ x: 1210, y: tableHeight }"
       bordered>
       <!-- 产品分类 -->
       <template slot="productType" slot-scope="text, record">
@@ -109,6 +110,7 @@ export default {
   data () {
     return {
       advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0,
       queryParam: { //  查询条件
         name: '', //  产品名称
         queryWord: '', // 产品编码/原厂编码
@@ -122,20 +124,21 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false, // 导出loading
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
         { title: '产品名称', dataIndex: 'name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'code', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'origCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '品牌', dataIndex: 'productBrandName', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
-        { title: '包装数', dataIndex: 'packQtyV', width: 150, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品级别', dataIndex: 'level', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
+        { title: '产品编码', dataIndex: 'code', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'origCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '品牌', dataIndex: 'productBrandName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 140, align: 'center' },
+        { title: '包装数', dataIndex: 'packQtyV', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品级别', dataIndex: 'level', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return productLevelList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -147,6 +150,7 @@ export default {
             data.list[i].packQtyV = packQty + unit + '/' + packQtyUnit
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -157,11 +161,6 @@ export default {
       nowData: null
     }
   },
-  computed: {
-    tableHeight () {
-      return window.innerHeight - (this.advanced ? 280 : 240)
-    }
-  },
   methods: {
     //  重置
     resetSearchForm () {
@@ -240,6 +239,24 @@ export default {
           this.productTypeList = []
         }
       })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 195
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   },
   beforeRouteEnter (to, from, next) {

+ 36 - 17
src/views/productManagement/productOfflineAudit/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="productOfflineAuditList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
@@ -86,14 +86,15 @@
         </span>
       </div>
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         :row-selection="rowSelection"
         :rowKey="(record) => record.productSn"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 2070, y: tableHeight }"
+        :scroll="{ x: 1600, y: tableHeight }"
         bordered>
         <!-- 产品分类 -->
         <template slot="productType" slot-scope="text, record">
@@ -127,6 +128,7 @@ export default {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0,
       queryParam: { //  查询条件
         name: '', //  产品名称
         code: '', // 产品编码
@@ -141,26 +143,28 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
         { title: '产品名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品编码', dataIndex: 'code', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
-        { title: '提交时间', dataIndex: 'offlineSubmitTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '提交人', dataIndex: 'offlineSubmitPerson', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '下线选项', dataIndex: 'offlineReasonType', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '通用编码', dataIndex: 'commonCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '下线原因', dataIndex: 'offlineRemark', width: 200, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '审核状态', dataIndex: 'stateDictValue', width: 110, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '审核时间', dataIndex: 'offlineAuditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '审核人', dataIndex: 'offlineAuditPerson', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 140, align: 'center', fixed: 'right' }
+        { title: '产品编码', dataIndex: 'code', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 140, align: 'center' },
+        { title: '提交时间', dataIndex: 'offlineSubmitTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '提交人', dataIndex: 'offlineSubmitPerson', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '下线选项', dataIndex: 'offlineReasonType', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '通用编码', dataIndex: 'commonCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '下线原因', dataIndex: 'offlineRemark', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '审核状态', dataIndex: 'stateDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核时间', dataIndex: 'offlineAuditTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核人', dataIndex: 'offlineAuditPerson', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
       ],
       selectedRowKeys: [], // Check here to configure the default column
       loading: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return productOfflineList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -169,9 +173,6 @@ export default {
     }
   },
   computed: {
-    tableHeight () {
-      return window.innerHeight - (this.advanced ? 320 : 280)
-    },
     hasSelected () {
       return this.selectedRowKeys.length > 0
     },
@@ -287,6 +288,24 @@ export default {
           this.productTypeList = []
         }
       })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 235
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   },
   beforeRouteEnter (to, from, next) {

+ 138 - 122
src/views/productManagement/productPricing/list.vue

@@ -1,113 +1,112 @@
 <template>
   <a-card size="small" :bordered="false" class="productPricingList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="产品名称">
-              <a-input id="productPricingList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="产品编码/原厂编码">
-              <a-input id="productPricingList-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入产品编码/原厂编码"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="品牌">
-              <a-select
-                placeholder="请选择"
-                id="productPricingList-productBrandSn"
-                allowClear
-                v-model="queryParam.productBrandSn"
-                :showSearch="true"
-                option-filter-prop="children"
-                :filter-option="filterOption">
-                <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-          <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品分类">
-                <a-cascader
-                  @change="changeProductType"
-                  expand-trigger="hover"
-                  change-on-select
-                  :options="productTypeList"
-                  :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                  id="productPricingList-productType"
-                  placeholder="请选择产品分类"
-                  allowClear
-                  v-model="productType" />
+              <a-form-item label="产品名称">
+                <a-input id="productPricingList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="定价状态">
-                <v-select code="PRICING_STATUS" id="productPricingList-pricingState" v-model="queryParam.pricingState" allowClear placeholder="请选择定价状态"></v-select>
+              <a-form-item label="产品编码/原厂编码">
+                <a-input id="productPricingList-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入产品编码/原厂编码"/>
               </a-form-item>
             </a-col>
-          </template>
-          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productPricingList-refresh">查询</a-button>
-            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productPricingList-reset">重置</a-button>
-            <a @click="advanced=!advanced" style="margin-left: 5px">
-              {{ advanced ? '收起' : '展开' }}
-              <a-icon :type="advanced ? 'up' : 'down'"/>
-            </a>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 总计 -->
-    <!-- <a-alert type="info" style="margin-bottom:10px">
-      <div slot="message">合计:<strong>{{ total }}</strong>条</div>
-    </a-alert> -->
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="small"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 2430, y: tableHeight }"
-      bordered>
-      <!-- 产品分类 -->
-      <template slot="productType" slot-scope="text, record">
-        <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
-        <span v-else>--</span>
-      </template>
-      <!-- 成本价 -->
-      <template slot="sterminaldsdPrice" slot-scope="text, record">
-        <div v-if="record.supplierProductList">
-          <p v-for="(item, index) in record.supplierProductList" :key="index" style="margin: 0;">
-            <span>{{ (item.cost || item.cost==0) ? item.cost.toFixed(2):'--' }}</span>元 -
-            <span>{{ (item.supplierName||'') }}</span>;
-          </p>
-        </div>
-        <span v-else>--</span>
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          type="link"
-          v-if="record.pricingState=='WAIT_PRICING_AUDIT' && $hasPermissions('B_productPricing_audit')"
-          class="button-warning"
-          @click="handleAudit(record)"
-          id="productPricingList-audit-btn">审核</a-button>
-        <a-button
-          size="small"
-          type="link"
-          v-if="$hasPermissions('B_productPricing_edit')"
-          class="button-info"
-          @click="handleEdit(record)"
-          id="productPricingList-edit-btn">编辑</a-button>
-        <span v-if="!(record.pricingState=='WAIT_PRICING_AUDIT' && $hasPermissions('B_productPricing_audit')) && !$hasPermissions('B_productPricing_edit')">--</span>
-      </template>
-    </s-table>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="品牌">
+                <a-select
+                  placeholder="请选择"
+                  id="productPricingList-productBrandSn"
+                  allowClear
+                  v-model="queryParam.productBrandSn"
+                  :showSearch="true"
+                  option-filter-prop="children"
+                  :filter-option="filterOption">
+                  <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品分类">
+                  <a-cascader
+                    @change="changeProductType"
+                    expand-trigger="hover"
+                    change-on-select
+                    :options="productTypeList"
+                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                    id="productPricingList-productType"
+                    placeholder="请选择产品分类"
+                    allowClear
+                    v-model="productType" />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="定价状态">
+                  <v-select code="PRICING_STATUS" id="productPricingList-pricingState" v-model="queryParam.pricingState" allowClear placeholder="请选择定价状态"></v-select>
+                </a-form-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productPricingList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productPricingList-reset">重置</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 5px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'"/>
+              </a>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1870, y: tableHeight }"
+        bordered>
+        <!-- 产品分类 -->
+        <template slot="productType" slot-scope="text, record">
+          <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
+          <span v-else>--</span>
+        </template>
+        <!-- 成本价 -->
+        <template slot="sterminaldsdPrice" slot-scope="text, record">
+          <div v-if="record.supplierProductList">
+            <p v-for="(item, index) in record.supplierProductList" :key="index" style="margin: 0;">
+              <span>{{ (item.cost || item.cost==0) ? item.cost.toFixed(2):'--' }}</span>元 -
+              <span>{{ (item.supplierName||'') }}</span>;
+            </p>
+          </div>
+          <span v-else>--</span>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.pricingState=='WAIT_PRICING_AUDIT' && $hasPermissions('B_productPricing_audit')"
+            class="button-warning"
+            @click="handleAudit(record)"
+            id="productPricingList-audit-btn">审核</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="$hasPermissions('B_productPricing_edit')"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="productPricingList-edit-btn">编辑</a-button>
+          <span v-if="!(record.pricingState=='WAIT_PRICING_AUDIT' && $hasPermissions('B_productPricing_audit')) && !$hasPermissions('B_productPricing_edit')">--</span>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 编辑价格 -->
     <product-pricing-edit-modal :openModal="openModal" :itemSn="itemSn" @close="closeModal" @ok="$refs.table.refresh()" />
     <!-- 审核价格 -->
@@ -126,7 +125,9 @@ export default {
   components: { STable, VSelect, productPricingEditModal, productPricingAuditModal },
   data () {
     return {
+      spinning: false,
       advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0,
       queryParam: { //  查询条件
         name: '', //  产品名称
         queryWord: '', // 产品编码/原厂编码
@@ -139,26 +140,27 @@ export default {
       productType: [],
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品编码', dataIndex: 'code', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'origCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '品牌', dataIndex: 'productBrandName', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
-        { title: '产品状态', dataIndex: 'stateDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '定价状态', dataIndex: 'pricingStateDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '成本价', scopedSlots: { customRender: 'sterminaldsdPrice' }, width: 200, align: 'center' },
-        { title: '省级价', dataIndex: 'provincePrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '市级价', dataIndex: 'cityPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '特约价', dataIndex: 'specialPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '终端价', dataIndex: 'terminalPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '车主价', dataIndex: 'carOwnersPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center', fixed: 'right' }
+        { title: '产品编码', dataIndex: 'code', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'origCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '品牌', dataIndex: 'productBrandName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 140, align: 'center' },
+        { title: '产品状态', dataIndex: 'stateDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '定价状态', dataIndex: 'pricingStateDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本价', scopedSlots: { customRender: 'sterminaldsdPrice' }, width: 180, align: 'center' },
+        { title: '省级价', dataIndex: 'provincePrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '市级价', dataIndex: 'cityPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '特约价', dataIndex: 'specialPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '终端价', dataIndex: 'terminalPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '车主价', dataIndex: 'carOwnersPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return productPricingList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -167,6 +169,7 @@ export default {
           }
           this.total = data.count || 0
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -178,11 +181,6 @@ export default {
       productTypeList: [] //  分类下拉数据
     }
   },
-  computed: {
-    tableHeight () {
-      return window.innerHeight - (this.advanced ? 280 : 240)
-    }
-  },
   methods: {
     //  重置
     resetSearchForm () {
@@ -246,6 +244,24 @@ export default {
           this.productTypeList = []
         }
       })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 195
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   },
   beforeRouteEnter (to, from, next) {

+ 33 - 16
src/views/productManagement/productUniversal/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="productUniversalList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
@@ -49,13 +49,14 @@
       </div>
       <!-- 列表 -->
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 1580, y: tableHeight }"
+        :scroll="{ x: 1230, y: tableHeight }"
         bordered>
         <!-- 产品分类 -->
         <template slot="productType" slot-scope="text, record">
@@ -98,6 +99,7 @@ export default {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0,
       queryParam: { //  查询条件
         productCode: '',
         productName: '',
@@ -109,19 +111,20 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false, // 导出loading
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'product.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品状态', dataIndex: 'product.stateDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '通用产品编码', dataIndex: 'productCommonCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '通用产品名称', dataIndex: 'productCommont.name', width: 200, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '通用产品分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
-        { title: '通用产品状态', dataIndex: 'productCommont.stateDictValue', width: 150, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center', fixed: 'right' }
+        { title: '产品状态', dataIndex: 'product.stateDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '通用产品编码', dataIndex: 'productCommonCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '通用产品名称', dataIndex: 'productCommont.name', width: 180, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '通用产品分类', scopedSlots: { customRender: 'productType' }, width: 140, align: 'center' },
+        { title: '通用产品状态', dataIndex: 'productCommont.stateDictValue', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return productUniversalCodeList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -129,6 +132,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -136,11 +140,6 @@ export default {
       itemId: '' //  当前id
     }
   },
-  computed: {
-    tableHeight () {
-      return window.innerHeight - (this.advanced ? 330 : 290)
-    }
-  },
   methods: {
     //  重置
     resetSearchForm () {
@@ -206,6 +205,24 @@ export default {
       link.setAttribute('download', fname + '.xlsx')
       document.body.appendChild(link)
       link.click()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 245
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   },
   beforeRouteEnter (to, from, next) {

+ 113 - 96
src/views/promotionRulesManagement/orderStatistics/list.vue

@@ -1,96 +1,98 @@
 <template>
   <a-card size="small" :bordered="false" class="orderStatisticsList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="创建时间">
-              <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
-              <custList ref="custList" id="orderStatisticsList-buyerSn" @change="custChange"></custList>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="销售单号">
-              <a-input id="orderStatisticsList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
-            </a-form-item>
-          </a-col>
-          <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="促销名称">
-                <promoList ref="promoList" id="orderStatisticsList-promoActiveSn" @change="promoChange"></promoList>
+              <a-form-item label="创建时间">
+                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="业务状态">
-                <v-select
-                  v-model="queryParam.billStatus"
-                  ref="billStatus"
-                  id="orderStatisticsList-billStatus"
-                  code="SALES_BILL_STATUS"
-                  placeholder="请选择业务状态"
-                  allowClear
-                ></v-select>
+              <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+                <custList ref="custList" id="orderStatisticsList-buyerSn" @change="custChange"></custList>
               </a-form-item>
             </a-col>
-          </template>
-          <a-col :md="6" :sm="24">
-            <span class="table-page-search-submitButtons">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="orderStatisticsList-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm()" :disabled="disabled" id="orderStatisticsList-reset">重置</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 5px">
-                {{ advanced ? '收起' : '展开' }}
-                <a-icon :type="advanced ? 'up' : 'down'"/>
-              </a>
-            </span>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- alert -->
-    <a-alert type="info" style="margin-bottom:10px">
-      <div slot="message">
-        促销品原价总额:<strong>{{ productTotal && (productTotal.totalOrigAmount || productTotal.totalOrigAmount==0) ? productTotal.totalOrigAmount : '--' }}</strong>,
-        促销品促销价总额:<strong>{{ productTotal && (productTotal.totalAmount || productTotal.totalAmount==0) ? productTotal.totalAmount : '--' }}</strong>,
-        节省总额:<strong>{{ productTotal && (productTotal.totalEconomizeAmount || productTotal.totalEconomizeAmount==0) ? productTotal.totalEconomizeAmount : '--' }}</strong>,
-        总单数:<strong>{{ productTotal && (productTotal.totalRecord || productTotal.totalRecord==0) ? productTotal.totalRecord : '--' }}</strong>,
-        总款数:<strong>{{ productTotal && (productTotal.totalCategory || productTotal.totalCategory==0) ? productTotal.totalCategory : '--' }}</strong>,
-        总数量:<strong>{{ productTotal && (productTotal.totalQty || productTotal.totalQty==0) ? productTotal.totalQty : '--' }}</strong>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="销售单号">
+                <a-input id="orderStatisticsList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
+              </a-form-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="促销名称">
+                  <promoList ref="promoList" id="orderStatisticsList-promoActiveSn" @change="promoChange"></promoList>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="业务状态">
+                  <v-select
+                    v-model="queryParam.billStatus"
+                    ref="billStatus"
+                    id="orderStatisticsList-billStatus"
+                    code="SALES_BILL_STATUS"
+                    placeholder="请选择业务状态"
+                    allowClear
+                  ></v-select>
+                </a-form-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <span class="table-page-search-submitButtons">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="orderStatisticsList-refresh">查询</a-button>
+                <a-button style="margin-left: 5px" @click="resetSearchForm()" :disabled="disabled" id="orderStatisticsList-reset">重置</a-button>
+                <a @click="advanced=!advanced" style="margin-left: 5px">
+                  {{ advanced ? '收起' : '展开' }}
+                  <a-icon :type="advanced ? 'up' : 'down'"/>
+                </a>
+              </span>
+            </a-col>
+          </a-row>
+        </a-form>
       </div>
-    </a-alert>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="small"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1690, y: tableHeight }"
-      bordered>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          type="link"
-          v-if="$hasPermissions('B_orderStatistics_detail')"
-          @click="handleDetail(record)"
-          class="button-success"
-          id="orderStatisticsList-edit-btn">详情</a-button>
-        <span v-else>--</span>
-      </template>
-    </s-table>
+      <!-- alert -->
+      <a-alert type="info" style="margin-bottom:10px">
+        <div slot="message">
+          促销品原价总额:<strong>{{ productTotal && (productTotal.totalOrigAmount || productTotal.totalOrigAmount==0) ? productTotal.totalOrigAmount : '--' }}</strong>,
+          促销品促销价总额:<strong>{{ productTotal && (productTotal.totalAmount || productTotal.totalAmount==0) ? productTotal.totalAmount : '--' }}</strong>,
+          节省总额:<strong>{{ productTotal && (productTotal.totalEconomizeAmount || productTotal.totalEconomizeAmount==0) ? productTotal.totalEconomizeAmount : '--' }}</strong>,
+          总单数:<strong>{{ productTotal && (productTotal.totalRecord || productTotal.totalRecord==0) ? productTotal.totalRecord : '--' }}</strong>,
+          总款数:<strong>{{ productTotal && (productTotal.totalCategory || productTotal.totalCategory==0) ? productTotal.totalCategory : '--' }}</strong>,
+          总数量:<strong>{{ productTotal && (productTotal.totalQty || productTotal.totalQty==0) ? productTotal.totalQty : '--' }}</strong>
+        </div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1510, y: tableHeight }"
+        bordered>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            v-if="$hasPermissions('B_orderStatistics_detail')"
+            @click="handleDetail(record)"
+            class="button-success"
+            id="orderStatisticsList-edit-btn">详情</a-button>
+          <span v-else>--</span>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 详情 -->
     <orderStatisticsDetailModal :openModal="openModal" :itemSn="itemSn" :nowData="nowData" @close="closeModal" />
   </a-card>
 </template>
 
 <script>
-import moment from 'moment'
 import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
@@ -102,6 +104,8 @@ export default {
   components: { STable, VSelect, orderStatisticsDetailModal, custList, promoList, rangeDate },
   data () {
     return {
+      spinning: false,
+      tableHeight: 0,
       advanced: true, // 高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
       // 查询参数
@@ -119,23 +123,24 @@ export default {
       ],
       // 表头
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单据来源', dataIndex: 'salesBillSourceDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售单号', dataIndex: 'salesBillNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单据来源', dataIndex: 'salesBillSourceDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '销售单号', dataIndex: 'salesBillNo', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '促销名称', dataIndex: 'promoName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '客户名称', dataIndex: 'buyerName', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '促销品款数', dataIndex: 'totalPromoCategory', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '促销品数量', dataIndex: 'totalPromoQty', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '客户名称', dataIndex: 'buyerName', width: 180, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '促销品款数', dataIndex: 'totalPromoCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '促销品数量', dataIndex: 'totalPromoQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '原价总额', dataIndex: 'promoTotal', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '促销品总额', dataIndex: 'totalPromoAmount', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '促销品总额', dataIndex: 'totalPromoAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '节省总额', dataIndex: 'totalEconomizeAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '业务状态', dataIndex: 'billStatusDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
+        { title: '业务状态', dataIndex: 'billStatusDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return salesPromoList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -148,6 +153,7 @@ export default {
             data.list[i].promoTotal = Number(totalPromoAmount) + Number(totalEconomizeAmount)
           }
           this.disabled = false
+          this.spinning = false
           this.getTotal(Object.assign(parameter, this.queryParam))
           return data
         })
@@ -158,11 +164,6 @@ export default {
       productTotal: null
     }
   },
-  computed: {
-    tableHeight () {
-      return window.innerHeight - (this.advanced ? 430 : 375)
-    }
-  },
   methods: {
     //  创建时间  change
     dateChange (date) {
@@ -211,12 +212,28 @@ export default {
       this.openModal = false
       this.itemSn = ''
       this.nowData = null
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 230
     }
   },
-  beforeRouteEnter (to, from, next) {
-    next(vm => {
-
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
     })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
   }
 }
 </script>

+ 114 - 94
src/views/promotionRulesManagement/productStatistics/list.vue

@@ -1,94 +1,97 @@
 <template>
   <a-card size="small" :bordered="false" class="productStatisticsList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="统计时间">
-              <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="产品名称">
-              <a-input id="productStatisticsList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="产品编码">
-              <a-input id="productStatisticsList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
-            </a-form-item>
-          </a-col>
-          <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品分类">
-                <a-cascader
-                  @change="changeProductType"
-                  expand-trigger="hover"
-                  change-on-select
-                  :options="productTypeList"
-                  :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                  id="productStatisticsList-productType"
-                  placeholder="请选择产品分类"
-                  allowClear
-                  v-model="productType" />
+              <a-form-item label="统计时间">
+                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品品牌">
-                <a-select
-                  placeholder="请选择产品品牌"
-                  id="productStatisticsList-productBrandSn"
-                  allowClear
-                  v-model="queryParam.productBrandSn"
-                  :showSearch="true"
-                  option-filter-prop="children"
-                  :filter-option="filterOption">
-                  <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
-                </a-select>
+              <a-form-item label="产品名称">
+                <a-input id="productStatisticsList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
               </a-form-item>
             </a-col>
-          </template>
-          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productStatisticsList-refresh">查询</a-button>
-            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productStatisticsList-reset">重置</a-button>
-            <a @click="advanced=!advanced" style="margin-left: 5px">
-              {{ advanced ? '收起' : '展开' }}
-              <a-icon :type="advanced ? 'up' : 'down'"/>
-            </a>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- alert -->
-    <a-alert type="info" style="margin-bottom:10px">
-      <div slot="message">
-        节省总金额:<strong>{{ productTotal && (productTotal.totalEconomizeAmount || productTotal.totalEconomizeAmount==0) ? productTotal.totalEconomizeAmount : '--' }}</strong>,
-        总数量:<strong>{{ productTotal && (productTotal.totalQty || productTotal.totalQty==0) ? productTotal.totalQty : '--' }}</strong>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品编码">
+                <a-input id="productStatisticsList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
+              </a-form-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品分类">
+                  <a-cascader
+                    @change="changeProductType"
+                    expand-trigger="hover"
+                    change-on-select
+                    :options="productTypeList"
+                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                    id="productStatisticsList-productType"
+                    placeholder="请选择产品分类"
+                    allowClear
+                    v-model="productType" />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品品牌">
+                  <a-select
+                    placeholder="请选择产品品牌"
+                    id="productStatisticsList-productBrandSn"
+                    allowClear
+                    v-model="queryParam.productBrandSn"
+                    :showSearch="true"
+                    option-filter-prop="children"
+                    :filter-option="filterOption">
+                    <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
+                  </a-select>
+                </a-form-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productStatisticsList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productStatisticsList-reset">重置</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 5px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'"/>
+              </a>
+            </a-col>
+          </a-row>
+        </a-form>
       </div>
-    </a-alert>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="small"
-      :rowKey="(record, index) => index"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1140, y: tableHeight }"
-      bordered>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          type="link"
-          v-if="$hasPermissions('B_productStatistics_detail')"
-          class="button-success"
-          @click="handleDetail(record)"
-          id="productStatisticsList-detail-btn">详情</a-button>
-        <span v-else>--</span>
-      </template>
-    </s-table>
+      <!-- alert -->
+      <a-alert type="info" style="margin-bottom:10px">
+        <div slot="message">
+          节省总金额:<strong>{{ productTotal && (productTotal.totalEconomizeAmount || productTotal.totalEconomizeAmount==0) ? productTotal.totalEconomizeAmount : '--' }}</strong>,
+          总数量:<strong>{{ productTotal && (productTotal.totalQty || productTotal.totalQty==0) ? productTotal.totalQty : '--' }}</strong>
+        </div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
+        size="small"
+        :rowKey="(record, index) => index"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y: tableHeight }"
+        bordered>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            v-if="$hasPermissions('B_productStatistics_detail')"
+            class="button-success"
+            @click="handleDetail(record)"
+            id="productStatisticsList-detail-btn">详情</a-button>
+          <span v-else>--</span>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 详情 -->
     <productStatisticsDetailModal :openModal="openModal" :itemSn="itemSn" :nowData="nowData" @close="closeModal" />
   </a-card>
@@ -106,7 +109,9 @@ export default {
   components: { STable, VSelect, productStatisticsDetailModal, rangeDate },
   data () {
     return {
+      spinning: false,
       advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0,
       productType: [],
       queryParam: { //  查询条件
         beginDate: getDate.getCurrMonthDays().starttime,
@@ -124,18 +129,19 @@ export default {
       ],
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '品牌', dataIndex: 'productEntity.productBrandName', width: 220, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '品牌', dataIndex: 'productEntity.productBrandName', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品编码', dataIndex: 'productEntity.code', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '数量', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'productEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '节省金额', dataIndex: 'totalEconomizeAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? '¥' + text : '--') } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
+        { title: '产品编码', dataIndex: 'productEntity.code', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '数量', dataIndex: 'qty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'productEntity.unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '节省金额', dataIndex: 'totalEconomizeAmount', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? '¥' + text : '--') } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return salesDetailPromoList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -143,6 +149,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           this.getTotal(Object.assign(parameter, this.queryParam))
           return data
         })
@@ -155,11 +162,6 @@ export default {
       productTotal: null
     }
   },
-  computed: {
-    tableHeight () {
-      return window.innerHeight - (this.advanced ? 315 : 272)
-    }
-  },
   methods: {
     //  时间  change
     dateChange (date) {
@@ -232,6 +234,24 @@ export default {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 230
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   },
   beforeRouteEnter (to, from, next) {

+ 19 - 17
src/views/promotionRulesManagement/promotionRules/choosePriceProductsModal.vue

@@ -57,7 +57,7 @@
         :rowKey="(record, index) => index"
         :columns="nowColumns"
         :dataSource="loadData"
-        :scroll="{ x: goodsType == 'normal' ? 1380 : null, y: 500 }"
+        :scroll="{ x: goodsType == 'normal' ? 1090 : null, y: 500 }"
         :pagination="false"
         bordered>
         <!-- 序号 -->
@@ -66,10 +66,11 @@
         </template>
         <!-- 起订量限制 -->
         <template slot="orderGoodsUnit" slot-scope="text, record">
-          <a-select id="choosePosPriceProducts-orderGoodsUnit" v-model="record.orderGoodsUnit" placeholder="请选择" allowClear style="width: 40%;" >
+          <a-select id="choosePosPriceProducts-orderGoodsUnit" size="small" v-model="record.orderGoodsUnit" placeholder="请选择" allowClear style="width: 40%;" >
             <a-select-option v-for="item in orderGoodsUnitData" :key="item.code" :value="item.code">{{ item.dispName }}</a-select-option>
           </a-select>
           <a-input-number
+            size="small"
             v-if="record.orderGoodsUnit=='PROD_UNIT'"
             id="choosePosPriceProducts-orderGoodsQty"
             v-model="record.orderGoodsQty"
@@ -82,6 +83,7 @@
         <!-- 特惠单价 / 换购单价 -->
         <template slot="goodsPrice" slot-scope="text, record">
           <a-input-number
+            size="small"
             id="choosePosPriceProducts-goodsPrice"
             v-model="record.goodsPrice"
             :precision="2"
@@ -160,28 +162,28 @@ export default {
       orderGoodsQty: '', //  限制数量
       // 表头
       columns: [ //  正品
-        { title: '序号', scopedSlots: { customRender: 'no' }, width: 80, align: 'center' },
-        { title: '类型', dataIndex: 'goodsTypeName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '类型名称', dataIndex: 'goodsName', width: 220, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '序号', scopedSlots: { customRender: 'no' }, width: 70, align: 'center' },
+        { title: '类型', dataIndex: 'goodsTypeName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '类型名称', dataIndex: 'goodsName', width: 180, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品编码', dataIndex: 'goodsCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '起订量限制', scopedSlots: { customRender: 'orderGoodsUnit' }, width: 400, align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
+        { title: '产品编码', dataIndex: 'goodsCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '起订量限制', scopedSlots: { customRender: 'orderGoodsUnit' }, width: 300, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
       ],
       promoColumns: [ //  促销品
-        { title: '序号', scopedSlots: { customRender: 'no' }, width: 80, align: 'center' },
-        { title: '类型', dataIndex: 'goodsTypeName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '类型名称', dataIndex: 'goodsName', width: 220, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '序号', scopedSlots: { customRender: 'no' }, width: 70, align: 'center' },
+        { title: '类型', dataIndex: 'goodsTypeName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '类型名称', dataIndex: 'goodsName', width: 180, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品编码', dataIndex: 'goodsCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
+        { title: '产品编码', dataIndex: 'goodsCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
       ],
       promoSpecialColumns: [ //  特价产品/加价促销品
-        { title: '序号', scopedSlots: { customRender: 'no' }, width: 80, align: 'center' },
+        { title: '序号', scopedSlots: { customRender: 'no' }, width: 70, align: 'center' },
         { title: '产品名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品编码', dataIndex: 'goodsCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: this.ruleType == 'PROMO_PROD' ? '特惠单价(¥)' : '换购单价(¥)', scopedSlots: { customRender: 'goodsPrice' }, width: 200, align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
+        { title: '产品编码', dataIndex: 'goodsCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: this.ruleType == 'PROMO_PROD' ? '特惠单价(¥)' : '换购单价(¥)', scopedSlots: { customRender: 'goodsPrice' }, width: 180, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
       ],
       loadData: [],
       openBrandModal: false, //  选择产品品牌

+ 85 - 58
src/views/promotionRulesManagement/promotionRules/detail.vue

@@ -1,63 +1,66 @@
 <template>
   <div class="promotionRulesDetail-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="promotionRulesDetail-back" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="promotionRulesDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-      </template>
-    </a-page-header>
-    <a-card size="small" :bordered="false" class="promotionRulesDetail-cont">
-      <a-descriptions bordered :column="2" v-if="detailsData">
-        <a-descriptions-item label="活动名称:">{{ detailsData.name || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="活动时间:">
-          <span v-if="detailsData.activeDateEnable=='0'">不限</span>
-          <span v-else>{{ detailsData.activeDateStart }} ~ {{ detailsData.activeDateEnd }}</span>
-        </a-descriptions-item>
-        <a-descriptions-item label="参与客户:">
-          <span v-if="detailsData.buyerLimitEnable=='0'">全部客户</span>
-          <p v-else style="margin: 0;">部分客户,共{{ detailsData.promoBuyerList.length }}个  <a-button id="promotionRules-rule-normalGoodsList" type="primary" size="small" class="button-success" @click="handleLook(detailsData.promoBuyerList)">查看</a-button></p>
-        </a-descriptions-item>
-        <a-descriptions-item label="活动经费上限:">
-          <span v-if="detailsData.activeAmountEnable=='0'">不限</span>
-          <span v-else>{{ detailsData.activeAmount }} 万元</span>
-        </a-descriptions-item>
-        <a-descriptions-item label="订单起订金额:">
-          <span v-if="detailsData.orderAmountEnable=='0'">不限</span>
-          <span v-else>{{ detailsData.orderAmount }} 万元</span>
-        </a-descriptions-item>
-        <a-descriptions-item label="备注:">{{ detailsData.remark || '--' }}</a-descriptions-item>
-      </a-descriptions>
-      <a-divider />
-      <!-- 列表 -->
-      <p style="font-weight: bold;">促销规则:</p>
-      <a-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data-source="promoRuleList"
-        :loading="loading"
-        :pagination="false"
-        bordered>
-        <!-- 操作 -->
-        <template slot="action" slot-scope="text, record">
-          <a-button
-            v-if="record.promoRuleType!='PROMO_PROD'"
-            size="small"
-            type="link"
-            class="button-info"
-            @click="handleLookP(record.normalGoodsList, record.promoRuleType, 'normal')"
-            id="promotionRulesDetail-edit-btn">查看正价品</a-button>
-          <a-button
-            size="small"
-            type="link"
-            class="button-warning"
-            @click="handleLookP(record.promoGoodsList, record.promoRuleType, 'promo')"
-            id="promotionRulesDetail-del-btn">查看{{ record.promoRuleType=='PROMO_PROD' ? '特价品' : record.promoRuleType=='ADD_PRICE_PURCH' ? '换购品' : '促销品' }}</a-button>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="promotionRulesDetail-back" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="promotionRulesDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
         </template>
-      </a-table>
-    </a-card>
+      </a-page-header>
+      <a-card size="small" :bordered="false" class="promotionRulesDetail-cont">
+        <a-descriptions bordered :column="2" size="small" v-if="detailsData">
+          <a-descriptions-item label="活动名称:">{{ detailsData.name || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="活动时间:">
+            <span v-if="detailsData.activeDateEnable=='0'">不限</span>
+            <span v-else>{{ detailsData.activeDateStart }} ~ {{ detailsData.activeDateEnd }}</span>
+          </a-descriptions-item>
+          <a-descriptions-item label="参与客户:">
+            <span v-if="detailsData.buyerLimitEnable=='0'">全部客户</span>
+            <p v-else style="margin: 0;">部分客户,共{{ detailsData.promoBuyerList.length }}个  <a-button id="promotionRules-rule-normalGoodsList" type="primary" size="small" class="button-success" @click="handleLook(detailsData.promoBuyerList)">查看</a-button></p>
+          </a-descriptions-item>
+          <a-descriptions-item label="活动经费上限:">
+            <span v-if="detailsData.activeAmountEnable=='0'">不限</span>
+            <span v-else>{{ detailsData.activeAmount }} 万元</span>
+          </a-descriptions-item>
+          <a-descriptions-item label="订单起订金额:">
+            <span v-if="detailsData.orderAmountEnable=='0'">不限</span>
+            <span v-else>{{ detailsData.orderAmount }} 万元</span>
+          </a-descriptions-item>
+          <a-descriptions-item label="备注:">{{ detailsData.remark || '--' }}</a-descriptions-item>
+        </a-descriptions>
+        <a-divider />
+        <!-- 列表 -->
+        <p style="font-weight: bold;">促销规则:</p>
+        <a-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data-source="promoRuleList"
+          :scroll="{ y: tableHeight }"
+          :loading="loading"
+          :pagination="false"
+          bordered>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              v-if="record.promoRuleType!='PROMO_PROD'"
+              size="small"
+              type="link"
+              class="button-info"
+              @click="handleLookP(record.normalGoodsList, record.promoRuleType, 'normal')"
+              id="promotionRulesDetail-edit-btn">查看正价品</a-button>
+            <a-button
+              size="small"
+              type="link"
+              class="button-warning"
+              @click="handleLookP(record.promoGoodsList, record.promoRuleType, 'promo')"
+              id="promotionRulesDetail-del-btn">查看{{ record.promoRuleType=='PROMO_PROD' ? '特价品' : record.promoRuleType=='ADD_PRICE_PURCH' ? '换购品' : '促销品' }}</a-button>
+          </template>
+        </a-table>
+      </a-card>
+    </a-spin>
     <!-- 查看客户/正价品/促销品 -->
     <a-modal
       centered
@@ -97,13 +100,15 @@ import { promoActiveDetailD } from '@/api/promoActive'
 export default {
   data () {
     return {
+      spinning: false,
+      tableHeight: 0,
       detailsData: null,
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '促销类型', dataIndex: 'promoRuleTypeDictValue', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '促销规则', dataIndex: 'promoRule', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center', fixed: 'right' }
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center' }
       ],
       loadData: [],
       openModal: false,
@@ -143,9 +148,11 @@ export default {
     //  详情
     getDetail () {
       const _this = this
+      this.spinning = true
       this.loading = true
       promoActiveDetailD({ sn: this.$route.params.sn }).then(res => {
         this.loading = false
+        this.spinning = false
         if (res.status == 200) {
           _this.detailsData = res.data
           if (_this.detailsData.promoRuleList) {
@@ -214,8 +221,17 @@ export default {
     //  返回列表
     handleBack () {
       this.$router.push({ path: '/promotionRulesManagement/promotionRules/list', query: { closeLastOldTab: true } })
+    },
+    setTableH () {
+      this.tableHeight = window.innerHeight - 400
     }
   },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
   watch: {
     detailsData: {
       handler (newValue, oldValue) {
@@ -236,6 +252,17 @@ export default {
 
 <style lang="less">
   .promotionRulesDetail-wrap{
+    position: relative;
+    height: 100%;
+    >.ant-spin-nested-loading{
+      height: 100%;
+      .ant-spin-container{
+        height: 100%;
+        .promotionRulesDetail-cont{
+          min-height: 90%;
+        }
+      }
+    }
     .promotionRulesDetail-back{
       margin-bottom: 10px;
     }

+ 23 - 17
src/views/promotionRulesManagement/promotionRules/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="promotionRulesList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
@@ -31,19 +31,16 @@
       <div class="table-operator">
         <a-button id="promotionRulesList-add" type="primary" v-if="$hasPermissions('B_promotionRules_add')" class="button-error" @click="openModal=true">新增</a-button>
       </div>
-      <!-- 总计 -->
-      <!-- <a-alert type="info" style="margin-bottom:10px">
-        <div slot="message">合计: <strong>{{ total }}</strong>条</div>
-      </a-alert> -->
       <!-- 列表 -->
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 1440, y: tableHeight }"
+        :scroll="{ x: 1210, y: tableHeight }"
         bordered>
         <!-- 促销时间 -->
         <template slot="activeDate" slot-scope="text, record">
@@ -115,21 +112,19 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '促销名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '促销时间', scopedSlots: { customRender: 'activeDate' }, width: 200, align: 'center' },
-        { title: '参与客户', dataIndex: 'promoBuyerName', width: 220, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '备注', dataIndex: 'remark', width: 220, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '状态', scopedSlots: { customRender: 'enabledFlag' }, width: 140, align: 'center', fixed: 'right' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center', fixed: 'right' }
+        { title: '促销时间', scopedSlots: { customRender: 'activeDate' }, width: 170, align: 'center' },
+        { title: '参与客户', dataIndex: 'promoBuyerName', width: 180, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '备注', dataIndex: 'remark', width: 200, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '状态', scopedSlots: { customRender: 'enabledFlag' }, width: 100, align: 'center', fixed: 'right' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 170, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 290
-        }
+        this.spinning = true
         return promoActiveList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -145,6 +140,7 @@ export default {
           }
           this.total = data.count || 0
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -207,7 +203,17 @@ export default {
           this.spinning = false
         }
       })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 245
     }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
   }
 }
 </script>

+ 17 - 4
src/views/promotionRulesManagement/promotionRules/rule.vue

@@ -7,7 +7,7 @@
           <a id="promotionRulesList-rule-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
         </template>
       </a-page-header>
-      <a-card size="small" :bordered="false" class="promotionRulesList-rule-wrap">
+      <a-card size="small" :bordered="false" class="promotionRulesList-rule-cont">
         <!-- 操作按钮 -->
         <div class="table-operator">
           <a-button id="promotionRulesList-rule-add" type="primary" class="button-error" @click="openModal=true">新增</a-button>
@@ -20,6 +20,7 @@
           :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
+          :scroll="{ y: tableHeight }"
           :showPagination="false"
           bordered>
           <!-- 操作 -->
@@ -55,16 +56,18 @@ export default {
     return {
       spinning: false,
       disabled: false, //  查询、重置按钮是否可操作
+      tableHeight: 0,
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '促销类型', dataIndex: 'promoRuleTypeDictValue', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '促销规则', dataIndex: 'promoRule', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center', fixed: 'right' }
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return promoRuleQueryList({ promoActiveSn: this.$route.params.sn }).then(res => {
           const data = res.data
           for (var i = 0; i < data.length; i++) {
@@ -82,6 +85,7 @@ export default {
             }
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -132,7 +136,16 @@ export default {
     //  返回列表
     handleBack () {
       this.$router.push({ path: '/promotionRulesManagement/promotionRules/list', query: { closeLastOldTab: true } })
+    },
+    setTableH () {
+      this.tableHeight = window.innerHeight - 250
     }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
   }
 }
 </script>

+ 0 - 8
src/views/purchasingManagement/bulkWarehousingOrder/list.vue

@@ -290,14 +290,6 @@ export default {
       _this.setTableH()
     })
   },
-  watch: {
-    advanced (newValue, oldValue) {
-      const _this = this
-      setTimeout(() => {
-        _this.setTableH()
-      }, 400)
-    }
-  },
   beforeRouteEnter (to, from, next) {
     next(vm => {
       vm.openModal = false

+ 0 - 8
src/views/salesManagement/backorder/list.vue

@@ -129,14 +129,6 @@ export default {
     this.$nextTick(() => { // 页面渲染完成后的回调
       _this.setTableH()
     })
-  },
-  watch: {
-    advanced (newValue, oldValue) {
-      const _this = this
-      setTimeout(() => {
-        _this.setTableH()
-      }, 400)
-    }
   }
 }
 </script>

+ 0 - 8
src/views/salesManagement/salesReturn/salesReturnCheck.vue

@@ -248,14 +248,6 @@ export default {
       _this.setTableH()
     })
   },
-  watch: {
-    advanced (newValue, oldValue) {
-      const _this = this
-      setTimeout(() => {
-        _this.setTableH()
-      }, 400)
-    }
-  },
   beforeRouteEnter (to, from, next) {
     next(vm => {})
   }

+ 19 - 2
src/views/setting/notice/list.vue

@@ -1,7 +1,7 @@
 <template>
   <a-card size="small" :bordered="false" class="noticeList-wrap">
     <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
+    <div ref="tableSearch" class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="handelSearch(1)">
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
@@ -23,8 +23,9 @@
     </div>
     <!-- 列表 -->
     <a-table
-      class="sTable"
+      class="sTable fixPagination"
       ref="table"
+      :style="{ height: tableHeight+84.5+'px' }"
       size="small"
       :rowKey="(record) => record.id"
       :columns="columns"
@@ -62,6 +63,7 @@ export default {
   components: { STable, noticeDetailModal, rangeDate, tablePagination },
   data () {
     return {
+      tableHeight: 0,
       queryParam: { //  查询条件
         beginDate: '',
         endDate: '',
@@ -193,8 +195,18 @@ export default {
     closeModal () {
       this.itemId = ''
       this.openModal = false
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 195
     }
   },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
   beforeRouteEnter (to, from, next) {
     next(vm => {
       vm.openModal = false
@@ -203,3 +215,8 @@ export default {
   }
 }
 </script>
+<style lang="less">
+  .noticeList-wrap{
+    margin: -12px -12px 0px;
+  }
+</style>

+ 25 - 15
src/views/setting/noticeManagement/list.vue

@@ -1,35 +1,35 @@
 <template>
-  <a-card size="small" :bordered="false" class="noticeList-wrap">
+  <a-card size="small" :bordered="false" class="noticeManagementList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="标题">
-                <a-input id="noticeList-title" v-model.trim="queryParam.title" allowClear placeholder="请输入标题"/>
+                <a-input id="noticeManagementList-title" v-model.trim="queryParam.title" allowClear placeholder="请输入标题"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="类别">
-                <v-select code="NOTITY_BIZ_TYPE" id="noticeList-type" v-model="queryParam.type" allowClear placeholder="请选择类别"></v-select>
+                <v-select code="NOTITY_BIZ_TYPE" id="noticeManagementList-type" v-model="queryParam.type" allowClear placeholder="请选择类别"></v-select>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="发布状态">
-                <v-select code="NOTITY_SEND_STATUS" id="noticeList-sendStatus" v-model="queryParam.sendStatus" allowClear placeholder="请选择发布状态"></v-select>
+                <v-select code="NOTITY_SEND_STATUS" id="noticeManagementList-sendStatus" v-model="queryParam.sendStatus" allowClear placeholder="请选择发布状态"></v-select>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="noticeList-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="noticeList-reset">重置</a-button>
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="noticeManagementList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="noticeManagementList-reset">重置</a-button>
             </a-col>
           </a-row>
         </a-form>
       </div>
       <!-- 操作按钮 -->
       <div class="table-operator">
-        <a-button id="noticeList-add" type="primary" class="button-error" @click="handleAdd">新增</a-button>
+        <a-button id="noticeManagementList-add" type="primary" class="button-error" @click="handleAdd">新增</a-button>
       </div>
       <!-- 总计 -->
       <!-- <a-alert type="info" style="margin-bottom:10px">
@@ -37,8 +37,9 @@
       </a-alert> -->
       <!-- 列表 -->
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         :rowKey="(record) => record.id"
         :columns="columns"
@@ -53,21 +54,21 @@
             class="button-info"
             v-if="record.sendStatus=='0'"
             @click="handleEdit(record)"
-            id="noticeList-edit-btn">编辑</a-button>
+            id="noticeManagementList-edit-btn">编辑</a-button>
           <a-button
             size="small"
             type="link"
             class="button-success"
             v-if="record.sendStatus=='1'"
             @click="handleDetail(record)"
-            id="noticeList-detail-btn">详情</a-button>
+            id="noticeManagementList-detail-btn">详情</a-button>
           <a-button
             size="small"
             type="link"
             class="button-error"
             v-if="record.sendStatus=='0'"
             @click="handleDel(record)"
-            id="noticeList-del-btn">删除</a-button>
+            id="noticeManagementList-del-btn">删除</a-button>
         </template>
       </s-table>
     </a-spin>
@@ -108,9 +109,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 340
-        }
+        this.spinning = true
         return noticeList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -122,6 +121,7 @@ export default {
           }
           this.total = data.count || 0
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -184,7 +184,17 @@ export default {
           })
         }
       })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 245
     }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
   }
 }
 </script>

+ 31 - 13
src/views/supplierManagement/associatedProduct/add.vue

@@ -11,7 +11,7 @@
       <!-- 列表 -->
       <a-card size="small" :bordered="false">
         <!-- 搜索条件 -->
-        <div class="table-page-search-wrapper">
+        <div ref="tableSearch" class="table-page-search-wrapper">
           <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
             <a-row :gutter="15">
               <a-col :md="6" :sm="24">
@@ -54,13 +54,14 @@
         </div>
         <!-- 列表 -->
         <s-table
-          class="sTable"
+          class="sTable fixPagination"
           ref="table"
+          :style="{ height: tableHeight+84.5+'px' }"
           size="small"
           :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
-          :scroll="{ x: 1410, y: tableHeight }"
+          :scroll="{ x: 1120, y: tableHeight }"
           bordered>
           <!-- 产品分类 -->
           <template slot="productType" slot-scope="text, record">
@@ -121,21 +122,19 @@ export default {
       },
       productType: [],
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '产品品牌', dataIndex: 'product.productBrandName', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '产品品牌', dataIndex: 'product.productBrandName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 140, align: 'center' },
         { title: '产品名称', dataIndex: 'product.name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'product.code', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'product.origCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '成本价', dataIndex: 'cost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? '¥' + text : '--') } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 170, align: 'center', fixed: 'right' }
+        { title: '产品编码', dataIndex: 'product.code', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'product.origCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本价', dataIndex: 'cost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 380
-        }
+        this.spinning = true
         this.queryParam.supplierSn = this.$route.params.sn
         return supplierProductList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
@@ -144,6 +143,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -236,6 +236,24 @@ export default {
           this.spinning = false
         }
       })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 295
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   }
 }

+ 84 - 65
src/views/supplierManagement/associatedProductDetails/list.vue

@@ -1,63 +1,66 @@
 <template>
   <a-card size="small" :bordered="false" class="associatedProductList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="供应商名称">
-              <a-input id="associatedProductList-productName" v-model.trim="queryParam.supplierName" allowClear placeholder="请输入供应商名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="产品名称">
-              <a-input id="associatedProductList-productName" v-model.trim="queryParam.product.name" allowClear placeholder="请输入产品名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="产品编码/原厂编码">
-              <a-input id="associatedProductList-productCode" v-model.trim="queryParam.product.queryWord" allowClear placeholder="请输入产品编码"/>
-            </a-form-item>
-          </a-col>
-          <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品分类">
-                <ProductType id="associatedProduct-productType" v-model="productType" @change="changeProductType"></ProductType>
+              <a-form-item label="供应商名称">
+                <a-input id="associatedProductList-productName" v-model.trim="queryParam.supplierName" allowClear placeholder="请输入供应商名称"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="品牌">
-                <ProductBrand id="associatedProduct-productBrandSn" v-model="queryParam.product.productBrandSn"></ProductBrand>
+              <a-form-item label="产品名称">
+                <a-input id="associatedProductList-productName" v-model.trim="queryParam.product.name" allowClear placeholder="请输入产品名称"/>
               </a-form-item>
             </a-col>
-          </template>
-          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="associatedProductList-refresh">查询</a-button>
-            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="associatedProductList-reset">重置</a-button>
-            <a @click="advanced=!advanced" style="margin-left: 5px">
-              {{ advanced ? '收起' : '展开' }}
-              <a-icon :type="advanced ? 'up' : 'down'"/>
-            </a>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="small"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1010, y: tableHeight }"
-      bordered>
-      <!-- 产品分类 -->
-      <template slot="productType" slot-scope="text, record">
-        <span v-if="record.product.productTypeName2 || record.product.productTypeName3">{{ record.product.productTypeName2 }} {{ record.product.productTypeName3 ? '>' : '' }} {{ record.product.productTypeName3 }}</span>
-        <span v-else>--</span>
-      </template>
-    </s-table>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品编码/原厂编码">
+                <a-input id="associatedProductList-productCode" v-model.trim="queryParam.product.queryWord" allowClear placeholder="请输入产品编码"/>
+              </a-form-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品分类">
+                  <ProductType id="associatedProduct-productType" v-model="productType" @change="changeProductType"></ProductType>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="品牌">
+                  <ProductBrand id="associatedProduct-productBrandSn" v-model="queryParam.product.productBrandSn"></ProductBrand>
+                </a-form-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="associatedProductList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="associatedProductList-reset">重置</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 5px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'"/>
+              </a>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1150, y: tableHeight }"
+        bordered>
+        <!-- 产品分类 -->
+        <template slot="productType" slot-scope="text, record">
+          <span v-if="record.product.productTypeName2 || record.product.productTypeName3">{{ record.product.productTypeName2 }} {{ record.product.productTypeName3 ? '>' : '' }} {{ record.product.productTypeName3 }}</span>
+          <span v-else>--</span>
+        </template>
+      </s-table>
+    </a-spin>
   </a-card>
 </template>
 
@@ -70,7 +73,9 @@ export default {
   components: { STable, VSelect, ProductBrand, ProductType },
   data () {
     return {
+      spinning: false,
       advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0,
       queryParam: { //  查询条件
         supplierName: '',
         product: {
@@ -87,16 +92,17 @@ export default {
       columns: [
         { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
         { title: '供应商名称', dataIndex: 'supplierName', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '品牌', dataIndex: 'product.productBrandName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 100, align: 'center' },
-        { title: '产品名称', dataIndex: 'product.name', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'product.code', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '成本价(¥)', dataIndex: 'cost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '原厂编码', dataIndex: 'product.origCode', width: 120, align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '品牌', dataIndex: 'product.productBrandName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 140, align: 'center' },
+        { title: '产品名称', dataIndex: 'product.name', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'product.code', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本价(¥)', dataIndex: 'cost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '原厂编码', dataIndex: 'product.origCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return supplierProductList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -104,16 +110,12 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       }
     }
   },
-  computed: {
-    tableHeight () {
-      return window.innerHeight - (this.advanced ? 300 : 240)
-    }
-  },
   methods: {
     //  重置
     resetSearchForm () {
@@ -132,11 +134,28 @@ export default {
       this.queryParam.product.productTypeSn1 = val[0] ? val[0] : ''
       this.queryParam.product.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.product.productTypeSn3 = val[2] ? val[2] : ''
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 195
     }
   },
-  beforeRouteEnter (to, from, next) {
-    next(vm => {
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
     })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
   }
 }
 </script>

+ 23 - 17
src/views/supplierManagement/supplierInfo/edit.vue

@@ -1,12 +1,12 @@
 <template>
   <div class="supplierInfoEdit-wrap">
-    <a-page-header :ghost="false" :backIcon="false" @back="handleBack" class="supplierInfoEdit-cont">
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="merchantInfoManagement-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-      </template>
-    </a-page-header>
     <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" @back="handleBack" class="supplierInfoEdit-cont">
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="merchantInfoManagement-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+        </template>
+      </a-page-header>
       <a-form-model
         id="supplierInfoEdit-form"
         ref="ruleForm"
@@ -237,18 +237,16 @@
           </a-collapse>
         </a-card>
       </a-form-model>
-      <a-affix :offset-bottom="0">
-        <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-          <a-button
-            type="primary"
-            class="button-primary"
-            id="supplierInfoEdit-submit-btn"
-            size="large"
-            @click="handleSubmit"
-            style="padding: 0 60px;">提交</a-button>
-        </div>
-      </a-affix>
     </a-spin>
+    <div class="affix-cont">
+      <a-button
+        type="primary"
+        class="button-primary"
+        id="supplierInfoEdit-submit-btn"
+        size="large"
+        @click="handleSubmit"
+        style="padding: 0 60px;">提交</a-button>
+    </div>
   </div>
 </template>
 
@@ -459,6 +457,14 @@ export default {
 
 <style lang="less">
   .supplierInfoEdit-wrap{
+    position: relative;
+    height: 100%;
+    padding-bottom: 51px;
+    box-sizing: border-box;
+    >.ant-spin-nested-loading{
+      overflow-y: scroll;
+      height: 100%;
+    }
     .supplierInfoEdit-cont{
       margin-bottom: 10px;
     }

+ 20 - 15
src/views/supplierManagement/supplierInfo/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="supplierInfoList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
@@ -21,14 +21,11 @@
       <div class="table-operator">
         <a-button id="supplierInfoList-add" type="primary" v-if="$hasPermissions('B_supplierInfo_add')" class="button-error" @click="handleEdit()">新增</a-button>
       </div>
-      <!-- 总计 -->
-      <!-- <a-alert type="info" style="margin-bottom:10px">
-        <div slot="message">合计:<strong>{{ total }}</strong>条</div>
-      </a-alert> -->
       <!-- 列表 -->
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         :rowKey="(record) => record.id"
         :columns="columns"
@@ -71,23 +68,25 @@ export default {
   data () {
     return {
       spinning: false,
+      tableHeight: 0,
       queryParam: { //  查询条件
         supplierName: '' //  供应商名称
       },
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '供应商名称', dataIndex: 'supplierName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '联系人', dataIndex: 'contact', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '产品款数', dataIndex: 'totalProductCategory', width: 140, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '状态', scopedSlots: { customRender: 'enabledFlag' }, width: 150, align: 'center' },
+        { title: '产品款数', dataIndex: 'totalProductCategory', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '状态', scopedSlots: { customRender: 'enabledFlag' }, width: 100, align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center' }
       ],
       total: 0,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return supplierList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           this.total = data.count || 0
@@ -97,16 +96,12 @@ export default {
             data.list[i].enableFlag = data.list[i].enableFlag + '' === '1'
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       }
     }
   },
-  computed: {
-    tableHeight () {
-      return window.innerHeight - 290
-    }
-  },
   methods: {
     //  重置
     resetSearchForm () {
@@ -142,7 +137,17 @@ export default {
           this.spinning = false
         }
       })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 245
     }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
   }
 }
 </script>