Browse Source

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

chenrui 3 years ago
parent
commit
61b816f947

+ 28 - 0
src/components/custom.less

@@ -73,6 +73,17 @@ body{
       margin-right: 5px;
     }
   }
+  .affix-cont{
+    z-index: 99;
+    position: absolute;
+    bottom: 0;
+    left: 0;
+    width: 100%;
+    text-align: center;
+    background-color: #fff;
+    padding: 7px 0 4px;
+    box-shadow: 0 0 20px #dcdee2;
+  }
 }
 // 页签样式
 .multi-tab-con{
@@ -131,4 +142,21 @@ body{
   .ant-table-small > .ant-table-content > .ant-table-body{
     margin: 0;
   }
+}
+.sTable.fixPagination{
+  >.ant-table-wrapper{
+    height: 100%;
+    >.ant-spin-nested-loading{
+      height: 100%;
+      >.ant-spin-container{
+        height: 100%;
+        position: relative;
+        .ant-pagination.ant-table-pagination{
+          position: absolute;
+          right: 0;
+          bottom: 0;
+        }
+      }
+    }
+  }
 }

+ 8 - 2
src/layouts/PageView.vue

@@ -38,7 +38,7 @@
         </div>
       </div>
     </page-header>
-    <div class="content">
+    <div class="content" :style="{ height: contHeight+'px' }">
       <div class="page-header-index-wide">
         <slot>
           <!-- keep-alive  -->
@@ -92,7 +92,10 @@ export default {
   computed: {
     ...mapState({
       multiTab: state => state.app.multiTab
-    })
+    }),
+    contHeight () {
+      return window.innerHeight - 80
+    }
   },
   mounted () {
     this.tabs = this.directTabs
@@ -126,6 +129,9 @@ export default {
 <style lang="less" scoped>
   .content {
     margin: 12px 12px 0;
+    .page-header-index-wide{
+      height: 100%;
+    }
     .link {
       margin-top: 16px;
       &:not(:empty) {

+ 17 - 11
src/views/purchasingManagement/bulkWarehousingOrder/edit.vue

@@ -66,18 +66,16 @@
           </template>
         </s-table>
       </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="bulkWarehousingOrderEdit-submit"
-            size="large"
-            class="button-primary"
-            @click="handleBack"
-            style="padding: 0 60px;">保存并返回</a-button>
-        </div>
-      </a-affix>
     </a-spin>
+    <div class="affix-cont">
+      <a-button
+        type="primary"
+        id="bulkWarehousingOrderEdit-submit"
+        size="large"
+        class="button-primary"
+        @click="handleBack"
+        style="padding: 0 60px;">保存并返回</a-button>
+    </div>
     <spare-parts-product-modal :openModal="openModal" :itemSn="itemSn" :nowData="productTotal" @ok="$refs.table.refresh(true)" @close="closeModal" />
   </div>
 </template>
@@ -180,6 +178,14 @@ export default {
 
 <style lang="less">
   .bulkWarehousingOrderEdit-wrap{
+    position: relative;
+    height: 100%;
+    padding-bottom: 51px;
+    box-sizing: border-box;
+    >.ant-spin-nested-loading{
+      overflow-y: scroll;
+      height: 100%;
+    }
     .bulkWarehousingOrderEdit-cont{
       margin-bottom: 10px;
       .table-operator{

+ 34 - 16
src/views/purchasingManagement/bulkWarehousingOrder/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="bulkWarehousingOrderList-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 @@
       </div>
       <!-- 列表 -->
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         :row-selection="rowSelection"
         :rowKey="(record) => record.sparePartsSn"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 1960, y: tableHeight }"
+        :scroll="{ x: 1550, y: tableHeight }"
         bordered>
         <!-- 入库单号 -->
         <template slot="sparePartsNo" slot-scope="text, record">
@@ -100,17 +101,17 @@ export default {
       },
       // 表头
       columns: [
-        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '入库单号', scopedSlots: { customRender: 'sparePartsNo' }, width: 220, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入库单号', scopedSlots: { customRender: 'sparePartsNo' }, width: 180, align: 'center' },
         { title: '商户名称', dataIndex: 'supplierName', 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: 'sparePartsTypeDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '关联单号', dataIndex: 'relationNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '金蝶单号', dataIndex: 'kingdeeNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '状态', dataIndex: 'stateDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '备注', dataIndex: 'remark', width: 200, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 130, align: 'center', fixed: 'right' }
+        { 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: 'sparePartsTypeDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '关联单号', dataIndex: 'relationNo', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '金蝶单号', dataIndex: 'kingdeeNo', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', dataIndex: 'stateDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '备注', dataIndex: 'remark', width: 180, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
       ],
       selectedRowKeys: [], // Check here to configure the default column
       selectedRows: [],
@@ -118,9 +119,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 285
-        }
+        this.spinning = true
         return sparePartsList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -128,6 +127,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -278,6 +278,24 @@ export default {
           })
         }
       })
+    },
+    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) {

+ 68 - 47
src/views/salesManagement/backorder/list.vue

@@ -1,42 +1,45 @@
 <template>
   <a-card size="small" :bordered="false" class="backorderList-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" @change="dateChange" />
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="客户名称">
-              <custList ref="custList" id="backorderList-buyerSn" @change="custChange"></custList>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="backorderList-refresh">查询</a-button>
-            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="backorderList-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="{ x: 1120, y: tableHeight }"
-      bordered>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="link" @click="handleDetail(record)" v-if="$hasPermissions('B_oosDetail')" id="backorderList-detail-btn">详情</a-button>
-        <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="创建时间">
+                <rangeDate ref="rangeDate" @change="dateChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="客户名称">
+                <custList ref="custList" id="backorderList-buyerSn" @change="custChange"></custList>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="backorderList-refresh">查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="backorderList-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="{ x: 890, y: tableHeight }"
+        bordered>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button size="small" type="link" @click="handleDetail(record)" v-if="$hasPermissions('B_oosDetail')" id="backorderList-detail-btn">详情</a-button>
+          <span v-else>--</span>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 详情 -->
     <backorder-detail-modal :openModal="openModal" :itemSn="itemSn" @close="closeModal" />
   </a-card>
@@ -52,6 +55,7 @@ export default {
   components: { STable, VSelect, custList, backorderDetailModal, rangeDate },
   data () {
     return {
+      spinning: false,
       tableHeight: 0, // 表格高度
       queryParam: { //  查询条件
         beginDate: '',
@@ -60,21 +64,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: 'salesBillNo', 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: 'salesBillNo', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '客户名称', dataIndex: 'dealerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '缺货款数', dataIndex: 'totalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { 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: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
+        { title: '缺货款数', dataIndex: 'totalCategory', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? 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: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 240
-        }
+        this.spinning = true
         return oosList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -82,6 +84,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -115,6 +118,24 @@ export default {
     handleDetail (row) {
       this.itemSn = row.oosBillSn
       this.openModal = true
+    },
+    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)
     }
   }
 }

+ 37 - 20
src/views/salesManagement/examineVerify/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="examineVerifyList-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">
@@ -90,13 +90,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: 2000, y:tableHeight }"
+        :scroll="{ x: 1570, y:tableHeight }"
         bordered>
         <!-- 下推单号 -->
         <template slot="dispatchBillNo" slot-scope="text, record">
@@ -137,6 +138,7 @@ export default {
     return {
       spinning: false,
       advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
       time: [
         moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
         moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
@@ -155,19 +157,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: 'salesBillEntity.salesBillSourceDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售单号', dataIndex: 'salesBillNo', width: 230, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: 230, align: 'center' },
-        { title: '出库单号', dataIndex: 'stockOutNo', 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: 'salesBillEntity.salesBillSourceDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '销售单号', dataIndex: 'salesBillNo', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, align: 'center' },
+        { title: '出库单号', dataIndex: 'stockOutNo', align: 'center', customRender: function (text) { return text || '--' } },
         { 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: 'stockUpDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '业务状态', dataIndex: 'billStatusDictValue', width: 110, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '打印次数', dataIndex: 'stockUpPrintTimes', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 170, align: 'center', fixed: 'right' }
+        { 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: 'stockUpDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'billStatusDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '打印次数', dataIndex: 'stockUpPrintTimes', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
       ],
       selectedRowKeys: [], // Check here to configure the default column
       loading: false,
@@ -179,6 +181,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         // 查询总计
         dispatchQueryCount(Object.assign(parameter, this.queryParam)).then(res => {
           this.totalData = Object.assign(this.totalData, res.data || {})
@@ -190,6 +193,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -199,11 +203,6 @@ export default {
       spinningAudit: false
     }
   },
-  computed: {
-    tableHeight () {
-      return window.innerHeight - (this.advanced ? 315 : 272)
-    }
-  },
   methods: {
     custChange (val) {
       this.queryParam.buyerSn = val.key
@@ -282,6 +281,24 @@ export default {
           }
         }
       })
+    },
+    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) {

+ 35 - 16
src/views/salesManagement/outboundOrder/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="outboundOrderList-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">
@@ -82,14 +82,15 @@
         </span>
       </div>
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         :row-selection="$hasPermissions('B_stockOut')?rowSelection:null"
         :rowKey="(record) => record.stockOutSn"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 1760, y: tableHeight }"
+        :scroll="{ x: 1440, y: tableHeight }"
         bordered>
         <!-- 单号 -->
         <template slot="stockOutNo" slot-scope="text, record">
@@ -142,6 +143,7 @@ export default {
     return {
       spinning: false,
       advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
       queryParam: { //  查询条件
         beginDate: '',
         endDate: '',
@@ -155,17 +157,17 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
-        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '出库单号', scopedSlots: { customRender: 'stockOutNo' }, width: 220, align: 'center' },
-        { title: '业务单号', dataIndex: 'outBizNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '出库类型', dataIndex: 'outBizTypeDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核时间', dataIndex: 'auditTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '出库单号', scopedSlots: { customRender: 'stockOutNo' }, width: 180, align: 'center' },
+        { title: '业务单号', dataIndex: 'outBizNo', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '出库类型', dataIndex: 'outBizTypeDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '客户名称', dataIndex: 'demanderName', 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: 'productTotalPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '出库时间', dataIndex: 'outTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '出库状态', dataIndex: 'stateDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
+        { title: '数量', dataIndex: 'productTotalQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '售价', dataIndex: 'productTotalPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '出库时间', dataIndex: 'outTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '出库状态', dataIndex: 'stateDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
       ],
       selectedRowKeys: [], // Check here to configure the default column
       selectedRows: [],
@@ -173,6 +175,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return stockOutList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -180,6 +183,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -190,9 +194,6 @@ export default {
     }
   },
   computed: {
-    tableHeight () {
-      return window.innerHeight - (this.advanced ? 320 : 280)
-    },
     hasSelected () {
       return this.selectedRowKeys.length > 0
     },
@@ -388,6 +389,24 @@ export default {
           }
         }
       })
+    },
+    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) {

+ 116 - 96
src/views/salesManagement/pushOrderManagement/list.vue

@@ -1,98 +1,101 @@
 <template>
   <a-card size="small" :bordered="false" class="pushOrder-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline">
-        <a-row :gutter="15">
-          <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="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
-              <custList id="pushOrder-buyerName" ref="custList" @change="custChange"></custList>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="关联销售单号">
-              <a-input id="pushOrder-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">
+          <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="备货单号">
-                <a-input id="pushOrder-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入备货单号"/>
+              <a-form-item label="创建时间">
+                <rangeDate ref="rangeDate" @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="pushOrder-billStatus"
-                  code="DISPATCH_BILL_STATUS"
-                  placeholder="请选择业务状态"
-                  allowClear></v-select>
+              <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+                <custList id="pushOrder-buyerName" ref="custList" @change="custChange"></custList>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="所在区域">
-                <subarea id="pushOrder-subarea" v-model="queryParam.subareaSn"></subarea>
-              </a-form-model-item>
+              <a-form-item label="关联销售单号">
+                <a-input id="pushOrder-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
+              </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="地区">
-                <a-form-model-item prop="shippingAddrProvinceSn">
-                  <a-select id="pushOrder-shippingAddrProvinceSn" allowClear v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省">
-                    <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
-                  </a-select>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="备货单号">
+                  <a-input id="pushOrder-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入备货单号"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="业务状态">
+                  <v-select
+                    v-model="queryParam.billStatus"
+                    ref="billStatus"
+                    id="pushOrder-billStatus"
+                    code="DISPATCH_BILL_STATUS"
+                    placeholder="请选择业务状态"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="所在区域">
+                  <subarea id="pushOrder-subarea" v-model="queryParam.subareaSn"></subarea>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="地区">
+                  <a-form-model-item prop="shippingAddrProvinceSn">
+                    <a-select id="pushOrder-shippingAddrProvinceSn" allowClear v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省">
+                      <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
+                    </a-select>
+                  </a-form-model-item>
                 </a-form-model-item>
-              </a-form-model-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <span class="table-page-search-submitButtons">
+                <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
+                <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
+                <a @click="advanced=!advanced" style="margin-left: 8px">
+                  {{ advanced ? '收起' : '展开' }}
+                  <a-icon :type="advanced ? 'up' : 'down'"/>
+                </a>
+              </span>
             </a-col>
-          </template>
-          <a-col :md="6" :sm="24">
-            <span class="table-page-search-submitButtons">
-              <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
-              <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 8px">
-                {{ 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>{{ totalData&&(totalData.totalRecord || totalData.totalRecord==0) ? totalData.totalRecord : '--' }}</strong>;
-        下推总数量:<strong>{{ totalData&&(totalData.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong>;
-        下推总金额:<strong>{{ totalData&&(totalData.totalAmount || totalData.totalAmount==0) ? totalData.totalAmount : '--' }}</strong>元;
+          </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: 1510, y:tableHeight }"
-      bordered>
-      <!-- 销售单号 -->
-      <template slot="salesBillNo" slot-scope="text, record">
-        <span style="color: #ed1c24;cursor: pointer;" v-if="$hasPermissions('B_salesDetail')" @click="handleDetail(record,0)">{{ record.salesBillNo }}</span>
-        <span v-else>{{ record.salesBillNo }}</span>
-      </template>
-      <!-- 备货单号 -->
-      <template slot="dispatchBillNo" slot-scope="text, record">
-        <span style="color: #ed1c24;cursor: pointer;" v-if="$hasPermissions('B_dispatchDetail')" @click="handleDetail(record,1)">{{ record.dispatchBillNo }}</span>
-        <span v-else>{{ record.dispatchBillNo }}</span>
-      </template>
-    </s-table>
+      <!-- alert -->
+      <a-alert type="info" style="margin-bottom:10px">
+        <div slot="message">
+          下推总单数::<strong>{{ totalData&&(totalData.totalRecord || totalData.totalRecord==0) ? totalData.totalRecord : '--' }}</strong>;
+          下推总数量:<strong>{{ totalData&&(totalData.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong>;
+          下推总金额:<strong>{{ totalData&&(totalData.totalAmount || totalData.totalAmount==0) ? totalData.totalAmount : '--' }}</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: 1270, y:tableHeight }"
+        bordered>
+        <!-- 销售单号 -->
+        <template slot="salesBillNo" slot-scope="text, record">
+          <span style="color: #ed1c24;cursor: pointer;" v-if="$hasPermissions('B_salesDetail')" @click="handleDetail(record,0)">{{ record.salesBillNo }}</span>
+          <span v-else>{{ record.salesBillNo }}</span>
+        </template>
+        <!-- 备货单号 -->
+        <template slot="dispatchBillNo" slot-scope="text, record">
+          <span style="color: #ed1c24;cursor: pointer;" v-if="$hasPermissions('B_dispatchDetail')" @click="handleDetail(record,1)">{{ record.dispatchBillNo }}</span>
+          <span v-else>{{ record.dispatchBillNo }}</span>
+        </template>
+      </s-table>
+    </a-spin>
   </a-card>
 </template>
 
@@ -108,8 +111,10 @@ export default {
   components: { STable, VSelect, custList, rangeDate, subarea },
   data () {
     return {
+      spinning: false,
       advanced: true, // 高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
+      tableHeight: 0,
       // 查询参数
       queryParam: {
         beginDate: '',
@@ -128,22 +133,23 @@ export default {
       },
       // 表头
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
         // { title: '区域', dataIndex: 'shippingAddrCountyName', width: 120, align: 'center' },
         // { title: '省份', dataIndex: 'shippingAddrProvinceName', width: 120, align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: 210, align: 'center' },
-        { title: '关联销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: 210, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: 180, align: 'center' },
+        { title: '关联销售单号', scopedSlots: { customRender: 'salesBillNo' }, 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: 'stockUpDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '出库时间', dataIndex: 'stockOutDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '业务状态', dataIndex: 'billStatusDictValue', width: 110, align: 'center' }
+        { 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: 'stockUpDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '出库时间', dataIndex: 'stockOutDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'billStatusDictValue', width: 80, align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         // 查询总计
         dispatchQueryCount(Object.assign(parameter, this.queryParam)).then(res => {
           this.totalData = Object.assign(this.totalData, res.data || {})
@@ -155,17 +161,13 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
       addrProvinceList: [] //  省下拉
     }
   },
-  computed: {
-    tableHeight () {
-      return window.innerHeight - (this.advanced ? 320 : 280)
-    }
-  },
   methods: {
     //  时间  change
     dateChange (date) {
@@ -226,6 +228,24 @@ export default {
           }
         }
       })
+    },
+    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) {

+ 30 - 25
src/views/salesManagement/salesQuery/edit.vue

@@ -1,19 +1,19 @@
 <template>
   <div class="salesEdit-wrap">
-    <a-page-header :ghost="false" :backIcon="false" @back="handleBack" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="salesEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <span style="margin: 0 15px;color: #666;">客户名称:{{ detailData&&detailData.buyerName }}</span>
-        <!-- <a-button id="salesEdit-edit-btn" size="small" @click="handleEdit" style="margin-left:10px" key="0">编辑</a-button> -->
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <!-- <template slot="extra">
-        <a-button key="2" id="salesEdit-preview-btn">打印预览</a-button>
-        <a-button key="1" type="primary" id="salesEdit-print-btn">快速打印</a-button>
-      </template> -->
-    </a-page-header>
     <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" @back="handleBack" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="salesEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <span style="margin: 0 15px;color: #666;">客户名称:{{ detailData&&detailData.buyerName }}</span>
+          <!-- <a-button id="salesEdit-edit-btn" size="small" @click="handleEdit" style="margin-left:10px" key="0">编辑</a-button> -->
+        </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <!-- <template slot="extra">
+          <a-button key="2" id="salesEdit-preview-btn">打印预览</a-button>
+          <a-button key="1" type="primary" id="salesEdit-print-btn">快速打印</a-button>
+        </template> -->
+      </a-page-header>
       <a-card size="small" :bordered="false" class="salesEdit-cont">
         <div slot="title">
           <div class="p-title">
@@ -131,19 +131,16 @@
         <!-- 已选促销品列表 -->
         <queryPromotable ref="promotable" :salesBillSn="$route.params.sn" :delLoading="delLoading" @onCellBlur="onCellBlur" @del="handleDel"></queryPromotable>
       </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
-            size="large"
-            style="width: 150px;"
-            type="primary"
-            class="button-primary"
-            @click="handleSubmit()"
-            id="productInfoList-handleSubmit">提交</a-button>
-        </div>
-      </a-affix>
     </a-spin>
+    <div class="affix-cont">
+      <a-button
+        size="large"
+        style="padding: 0 60px;"
+        type="primary"
+        class="button-primary"
+        @click="handleSubmit()"
+        id="productInfoList-handleSubmit">提交</a-button>
+    </div>
     <!-- 选择客户弹框 -->
     <choose-custom-modal ref="custModal" :show="openModal" @cancel="openModal=false" />
     <!-- 添加产品 -->
@@ -427,6 +424,14 @@ export default {
 
 <style lang="less">
   .salesEdit-wrap{
+    position: relative;
+    height: 100%;
+    padding-bottom: 51px;
+    box-sizing: border-box;
+    >.ant-spin-nested-loading{
+      overflow-y: scroll;
+      height: 100%;
+    }
     .salesEdit-cont{
       margin-top: 10px;
     }

+ 24 - 7
src/views/salesManagement/salesQuery/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="salesManagementList-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">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
@@ -114,8 +114,9 @@
       </a-alert>
       <!-- 列表 -->
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+102.5+'px' }"
         size="small"
         :rowKey="(record) => record.id"
         :columns="columns"
@@ -220,6 +221,7 @@ export default {
       advanced: false, // 高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
       openModal: false, // 选择客户弹框是否显示
+      tableHeight: 0,
       time: [
         moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
         moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
@@ -276,6 +278,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         delete parameter.tableId
         delete parameter.index
         // 查询总计
@@ -289,6 +292,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -298,11 +302,6 @@ export default {
       spinningAudit: false
     }
   },
-  computed: {
-    tableHeight () {
-      return window.innerHeight - (this.advanced ? 355 : 313)
-    }
-  },
   methods: {
     //  时间  change
     dateChange (date) {
@@ -428,6 +427,24 @@ export default {
           }
         }
       })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 270
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   },
   beforeRouteEnter (to, from, next) {

+ 38 - 21
src/views/salesManagement/salesReturn/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="salesReturn-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">
@@ -95,13 +95,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: 2220, y: tableHeight }"
+        :scroll="{ x: 1600, y: tableHeight }"
         bordered>
         <!-- 单号 -->
         <template slot="salesReturnBillNo" slot-scope="text, record">
@@ -194,6 +195,7 @@ export default {
       spinning: false,
       // 高级搜索 展开/关闭
       advanced: false,
+      tableHeight: 0,
       disabled: false, //  查询、重置按钮是否可操作
       createDate: [
         moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
@@ -217,25 +219,26 @@ export default {
       countData: null, // 统计数据
       // 表头
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单据来源', dataIndex: 'salesReturnBillSourceDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客户采退单号', dataIndex: 'purchaseReturnBillNo', width: 260, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '总部销退单号', scopedSlots: { customRender: 'salesReturnBillNo' }, width: 260, 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: '客户采退单号', dataIndex: 'purchaseReturnBillNo', width: 180, 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: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '坏件数量', dataIndex: 'totalBadQty', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '返库数量', dataIndex: 'totalBackStockQty', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '退款金额', dataIndex: 'totalAmount', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
-        { title: '是否抓单', dataIndex: 'grabFlag', width: 100, align: 'center', customRender: function (text) { return ['否', '是'][text] } },
-        { title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '业务状态', dataIndex: 'billStatusDictValue', width: 110, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货数量', dataIndex: 'totalQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '坏件数量', dataIndex: 'totalBadQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '返库数量', dataIndex: 'totalBackStockQty', 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: 'grabFlag', width: 80, align: 'center', customRender: function (text) { return ['否', '是'][text] } },
+        { title: '审核时间', dataIndex: 'auditTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'billStatusDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
         // { title: '财务状态', dataIndex: 'financialStatusDictValue', scopedSlots: { customRender: 'financialStatus' }, width: 110, align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 180, align: 'center', fixed: 'right' }
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         // 查询总计
         this.getQueryCount(Object.assign(parameter, this.queryParam))
         return salesReturnList(Object.assign(parameter, this.queryParam)).then(res => {
@@ -245,6 +248,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -254,11 +258,6 @@ export default {
       spinningAudit: false
     }
   },
-  computed: {
-    tableHeight () {
-      return window.innerHeight - (this.advanced ? 365 : 325)
-    }
-  },
   methods: {
     //  创建时间  change
     dateCreateChange (date) {
@@ -383,6 +382,24 @@ export default {
           }
         }
       })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 280
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   },
   beforeRouteEnter (to, from, next) {

+ 62 - 40
src/views/salesManagement/salesReturn/salesReturnCheck.vue

@@ -1,14 +1,14 @@
 <template>
-  <div>
-    <a-page-header :ghost="false" :backIcon="false" class="salesReturnCheck-back" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="salesReturnCheck-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <span style="margin: 0 15px;color: #666;">客户名称:{{ ordeDetail&&ordeDetail.buyerName || '--' }}</span>
-      </template>
-    </a-page-header>
+  <div class="salesReturnCheck-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
-      <a-card size="small" :bordered="false" class="pages-wrap">
+      <a-page-header :ghost="false" :backIcon="false" class="salesReturnCheck-back" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="salesReturnCheck-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <span style="margin: 0 15px;color: #666;">客户名称:{{ ordeDetail&&ordeDetail.buyerName || '--' }}</span>
+        </template>
+      </a-page-header>
+      <a-card size="small" :bordered="false" class="salesReturnCheck-cont">
         <div>
           <a-button type="primary" :loading="loading" class="button-error" @click="backStock">批量返库</a-button>
         </div>
@@ -16,12 +16,13 @@
         <s-table
           class="sTable"
           ref="table"
+          :style="{ height: tableHeight+84.5+'px' }"
           size="small"
           :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onChange, onSelect: onSelectChange, onSelectAll: onSelectAllChange }"
           :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
-          :scroll="{ x: 710, y: 300 }"
+          :scroll="{ x: 710, y: tableHeight }"
           bordered>
           <!-- 返库数量 -->
           <template slot="backStockQty" slot-scope="text, record">
@@ -38,19 +39,16 @@
           </template>
         </s-table>
       </a-card>
-      <a-affix :offset-bottom="0">
-        <div
-          style="text-align: center;width: 100%;background-color: #fff;padding: 0 0 40px;box-shadow: 0 0 20px #dcdee2;">
-          <a-button
-            size="large"
-            style="width: 150px;"
-            type="primary"
-            class="button-primary"
-            @click="handleSubmit()"
-            id="salesReturn-handleSubmit">提交</a-button>
-        </div>
-      </a-affix>
     </a-spin>
+    <div class="affix-cont">
+      <a-button
+        size="large"
+        style="padding: 0 60px;"
+        type="primary"
+        class="button-primary"
+        @click="handleSubmit()"
+        id="salesReturn-handleSubmit">提交</a-button>
+    </div>
   </div>
 </template>
 
@@ -72,6 +70,7 @@ export default {
   data () {
     return {
       spinning: false,
+      tableHeight: 0, // 表格高度
       orderId: null,
       orderSn: null,
       buyerSn: null,
@@ -235,38 +234,61 @@ export default {
           this.spinning = false
         }
       })
+    },
+    setTableH () {
+      this.tableHeight = window.innerHeight - 340
     }
   },
   mounted () {
     this.orderSn = this.$route.params.sn
     this.buyerSn = this.$route.params.buyerSn
     this.getOrderDetail()
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
+    }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      console.log('beforeRouteEnter')
-    })
+    next(vm => {})
   }
 }
 </script>
 
 <style lang="less">
-  .pages-wrap{
-    margin-top: 10px;
-    .sTable{
-      margin-top: 10px;
+  .salesReturnCheck-wrap{
+    position: relative;
+    height: 100%;
+    padding-bottom: 51px;
+    box-sizing: border-box;
+    >.ant-spin-nested-loading{
+      overflow-y: scroll;
+      height: 100%;
     }
-    .total-bar{
-      display: flex;
-      align-items: center;
-      justify-content: space-between;
-      > div{
-        &:last-child{
-          display: flex;
-          align-items: center;
-          justify-content: space-between;
-          > div{
-            padding: 0 10px;
+    .salesReturnCheck-cont{
+      margin-top: 10px;
+      .sTable{
+        margin-top: 10px;
+      }
+      .total-bar{
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        > div{
+          &:last-child{
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+            > div{
+              padding: 0 10px;
+            }
           }
         }
       }

+ 47 - 40
src/views/salesManagement/salesReturn/salesReturnEdit.vue

@@ -1,23 +1,23 @@
 <template>
-  <div>
-    <a-page-header :ghost="false" :backIcon="false" class="salesReturnEdit-back" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="salesReturnEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <span style="margin: 0 15px;color: #666;">客户名称:{{ ordeDetail&&ordeDetail.buyerName || '--' }}</span>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <!-- <template slot="extra">
-        <a-button key="2" id="salesReturnEdit-preview-btn">打印预览</a-button>
-        <a-button key="1" type="primary" id="salesReturnEdit-print-btn">快速打印</a-button>
-      </template> -->
-    </a-page-header>
+  <div class="salesReturnEdit-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
-      <a-card size="small" :bordered="false" class="pages-wrap" v-if="ordeDetail&&ordeDetail.salesReturnBillSource=='SALES'">
+      <a-page-header :ghost="false" :backIcon="false" class="salesReturnEdit-back" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="salesReturnEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <span style="margin: 0 15px;color: #666;">客户名称:{{ ordeDetail&&ordeDetail.buyerName || '--' }}</span>
+        </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <!-- <template slot="extra">
+          <a-button key="2" id="salesReturnEdit-preview-btn">打印预览</a-button>
+          <a-button key="1" type="primary" id="salesReturnEdit-print-btn">快速打印</a-button>
+        </template> -->
+      </a-page-header>
+      <a-card size="small" :bordered="false" class="salesReturnEdit-cont" v-if="ordeDetail&&ordeDetail.salesReturnBillSource=='SALES'">
         <!-- 查询配件列表 -->
         <queryPart :buyerSn="$route.params.buyerSn" grabFlag="0" :newLoading="isInster" @add="saveProduct"></queryPart>
       </a-card>
-      <a-card size="small" :bordered="false" class="pages-wrap">
+      <a-card size="small" :bordered="false" class="salesReturnEdit-cont">
         <!-- alert -->
         <a-alert style="margin-bottom: 10px;" type="info">
           <div slot="message" class="total-bar">
@@ -68,19 +68,16 @@
           </template>
         </s-table>
       </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
-            size="large"
-            style="width: 150px;"
-            type="primary"
-            class="button-primary"
-            @click="handleSubmit()"
-            id="salesReturn-handleSubmit">提交</a-button>
-        </div>
-      </a-affix>
     </a-spin>
+    <div class="affix-cont">
+      <a-button
+        size="large"
+        style="padding: 0 60px;"
+        type="primary"
+        class="button-primary"
+        @click="handleSubmit()"
+        id="salesReturn-handleSubmit">提交</a-button>
+    </div>
   </div>
 </template>
 
@@ -280,19 +277,29 @@ export default {
 </script>
 
 <style lang="less">
-  .pages-wrap{
-    margin-top: 10px;
-    .total-bar{
-      display: flex;
-      align-items: center;
-      justify-content: space-between;
-      > div{
-        &:last-child{
-          display: flex;
-          align-items: center;
-          justify-content: space-between;
-          > div{
-            padding: 0 10px;
+  .salesReturnEdit-wrap{
+    position: relative;
+    height: 100%;
+    padding-bottom: 51px;
+    box-sizing: border-box;
+    >.ant-spin-nested-loading{
+      overflow-y: scroll;
+      height: 100%;
+    }
+    .salesReturnEdit-cont{
+      margin-top: 10px;
+      .total-bar{
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        > div{
+          &:last-child{
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+            > div{
+              padding: 0 10px;
+            }
           }
         }
       }

+ 47 - 40
src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue

@@ -1,23 +1,23 @@
 <template>
-  <div>
-    <a-page-header :ghost="false" :backIcon="false" class="salesReturnEdit-back" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="salesReturnEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <span style="margin: 0 15px;color: #666;">客户名称:{{ ordeDetail&&ordeDetail.buyerName || '--' }}</span>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <!-- <template slot="extra">
-        <a-button key="2" id="salesReturnEdit-preview-btn">打印预览</a-button>
-        <a-button key="1" type="primary" id="salesReturnEdit-print-btn">快速打印</a-button>
-      </template> -->
-    </a-page-header>
+  <div class="salesReturnEdit-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
-      <a-card size="small" :bordered="false" class="pages-wrap" v-if="ordeDetail&&ordeDetail.salesReturnBillSource=='SALES'">
+      <a-page-header :ghost="false" :backIcon="false" class="salesReturnEdit-back" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="salesReturnEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <span style="margin: 0 15px;color: #666;">客户名称:{{ ordeDetail&&ordeDetail.buyerName || '--' }}</span>
+        </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <!-- <template slot="extra">
+          <a-button key="2" id="salesReturnEdit-preview-btn">打印预览</a-button>
+          <a-button key="1" type="primary" id="salesReturnEdit-print-btn">快速打印</a-button>
+        </template> -->
+      </a-page-header>
+      <a-card size="small" :bordered="false" class="salesReturnEdit-cont" v-if="ordeDetail&&ordeDetail.salesReturnBillSource=='SALES'">
         <!-- 查询配件列表 -->
         <queryPart ref="queryPart" :buyerSn="$route.params.buyerSn" grabFlag="1" :newLoading="isInster" @add="saveProduct"></queryPart>
       </a-card>
-      <a-card size="small" :bordered="false" class="pages-wrap">
+      <a-card size="small" :bordered="false" class="salesReturnEdit-cont">
         <!-- alert -->
         <a-alert style="margin-bottom: 10px;" type="info">
           <div slot="message" class="total-bar">
@@ -66,19 +66,16 @@
           </template>
         </s-table>
       </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
-            size="large"
-            style="width: 150px;"
-            type="primary"
-            class="button-primary"
-            @click="handleSubmit()"
-            id="salesReturn-handleSubmit">提交</a-button>
-        </div>
-      </a-affix>
     </a-spin>
+    <div class="affix-cont">
+      <a-button
+        size="large"
+        style="padding: 0 60px;"
+        type="primary"
+        class="button-primary"
+        @click="handleSubmit()"
+        id="salesReturn-handleSubmit">提交</a-button>
+    </div>
   </div>
 </template>
 
@@ -288,19 +285,29 @@ export default {
 </script>
 
 <style lang="less">
-  .pages-wrap{
-    margin-top: 10px;
-    .total-bar{
-      display: flex;
-      align-items: center;
-      justify-content: space-between;
-      > div{
-        &:last-child{
-          display: flex;
-          align-items: center;
-          justify-content: space-between;
-          > div{
-            padding: 0 10px;
+  .salesReturnEdit-wrap{
+    position: relative;
+    height: 100%;
+    padding-bottom: 51px;
+    box-sizing: border-box;
+    >.ant-spin-nested-loading{
+      overflow-y: scroll;
+      height: 100%;
+    }
+    .salesReturnEdit-cont{
+      margin-top: 10px;
+      .total-bar{
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        > div{
+          &:last-child{
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+            > div{
+              padding: 0 10px;
+            }
           }
         }
       }

+ 29 - 12
src/views/salesManagement/shortageStatisticsC/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="shortageStatisticsCList-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">
@@ -91,13 +91,14 @@
         </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: 1210, y: tableHeight }"
+        :scroll="{ x: 1010, y: tableHeight }"
         bordered>
         <!-- 单号 -->
         <template slot="salesBillNo" slot-scope="text, record">
@@ -124,6 +125,7 @@ export default {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0, // 表格高度
       queryParam: { //  查询条件
         beginDate: getDate.getCurrMonthDays().starttime,
         endDate: getDate.getCurrMonthDays().endtime,
@@ -143,17 +145,18 @@ export default {
         getDate.getCurrMonthDays().endtime
       ], //  创建时间
       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: 'salesBillNo' }, align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '缺货数量', dataIndex: 'qty', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '缺货数量', dataIndex: 'qty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '客户名称', dataIndex: 'buyerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         const paramsPage = Object.assign(this.queryParam, { pageNo: parameter.pageNo, pageSize: parameter.pageSize }) //  有分页
         const params = Object.assign(parameter, this.queryParam) //  无分页
         return oosBuyerList(params).then(res => {
@@ -163,6 +166,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           this.getCount(params)
           this.getCurrentCount(paramsPage)
           return data
@@ -174,11 +178,6 @@ export default {
       currentTotal: null
     }
   },
-  computed: {
-    tableHeight () {
-      return window.innerHeight - (this.advanced ? 335 : 295)
-    }
-  },
   methods: {
     //  创建时间  change
     dateChange (date) {
@@ -279,6 +278,24 @@ export default {
           this.productTypeList = []
         }
       })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 250
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   },
   beforeRouteEnter (to, from, next) {

+ 88 - 69
src/views/salesManagement/shortageStatisticsP/list.vue

@@ -1,70 +1,72 @@
 <template>
   <a-card size="small" :bordered="false" class="shortageStatisticsPList-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="shortageStatisticsPList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="产品名称">
-              <a-input id="shortageStatisticsPList-productName" v-model.trim="queryParam.productName" 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-input id="shortageStatisticsPList-productOrigCode" v-model.trim="queryParam.productOrigCode" allowClear placeholder="请输入原厂编码"/>
+              <a-form-item label="创建时间">
+                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
               </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="shortageStatisticsPList-refresh">查询</a-button>
-            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="shortageStatisticsPList-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">
-        <div>
-          总缺货数量:<strong>{{ productTotal && (productTotal.totalQty || productTotal.totalQty==0) ? productTotal.totalQty : '--' }}</strong>,
-          总缺货金额(¥):<strong>{{ productTotal && (productTotal.totalAmount || productTotal.totalAmount==0) ? productTotal.totalAmount : '--' }}</strong>
-        </div>
-        <div>
-          本页缺货数量:<strong>{{ currentTotal && (currentTotal.totalQty || currentTotal.totalQty==0) ? currentTotal.totalQty : '--' }}</strong>,
-          本页缺货金额(¥):<strong>{{ currentTotal && (currentTotal.totalAmount || currentTotal.totalAmount==0) ? currentTotal.totalAmount : '--' }}</strong>
-        </div>
-      </div></a-alert>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="small"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1280, y: tableHeight }"
-      bordered>
-    </s-table>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品编码">
+                <a-input id="shortageStatisticsPList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品名称">
+                <a-input id="shortageStatisticsPList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
+              </a-form-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="原厂编码">
+                  <a-input id="shortageStatisticsPList-productOrigCode" v-model.trim="queryParam.productOrigCode" 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="shortageStatisticsPList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="shortageStatisticsPList-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">
+          <div>
+            总缺货数量:<strong>{{ productTotal && (productTotal.totalQty || productTotal.totalQty==0) ? productTotal.totalQty : '--' }}</strong>,
+            总缺货金额(¥):<strong>{{ productTotal && (productTotal.totalAmount || productTotal.totalAmount==0) ? productTotal.totalAmount : '--' }}</strong>
+          </div>
+          <div>
+            本页缺货数量:<strong>{{ currentTotal && (currentTotal.totalQty || currentTotal.totalQty==0) ? currentTotal.totalQty : '--' }}</strong>,
+            本页缺货金额(¥):<strong>{{ currentTotal && (currentTotal.totalAmount || currentTotal.totalAmount==0) ? currentTotal.totalAmount : '--' }}</strong>
+          </div>
+        </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: 1010, y: tableHeight }"
+        bordered>
+      </s-table>
+    </a-spin>
   </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'
@@ -73,7 +75,9 @@ export default {
   components: { STable, VSelect, rangeDate },
   data () {
     return {
+      spinning: false,
       advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0,
       queryParam: { //  查询条件
         beginDate: getDate.getCurrMonthDays().starttime,
         endDate: getDate.getCurrMonthDays().endtime,
@@ -87,18 +91,19 @@ export default {
         getDate.getCurrMonthDays().endtime
       ], //  创建时间
       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', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '原厂编码', dataIndex: 'origCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单位', dataIndex: 'unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '缺货数量', dataIndex: 'qty', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '缺货金额', dataIndex: 'totalAmount', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '原厂编码', dataIndex: 'origCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单位', dataIndex: 'unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '缺货数量', dataIndex: 'qty', 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: 'buyerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         const paramsPage = Object.assign(this.queryParam, { pageNo: parameter.pageNo, pageSize: parameter.pageSize }) //  有分页
         const params = Object.assign(parameter, this.queryParam) //  无分页
         return oosProductList(params).then(res => {
@@ -108,6 +113,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           this.getCount(params)
           this.getCurrentCount(paramsPage)
           return data
@@ -119,11 +125,6 @@ export default {
       currentTotal: null
     }
   },
-  computed: {
-    tableHeight () {
-      return window.innerHeight - (this.advanced ? 335 : 295)
-    }
-  },
   methods: {
     //  创建时间  change
     dateChange (date) {
@@ -159,6 +160,24 @@ export default {
       this.queryParam.productCode = ''
       this.queryParam.productOrigCode = ''
       this.$refs.table.refresh(true)
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 250
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   },
   beforeRouteEnter (to, from, next) {

+ 31 - 26
src/views/salesManagement/waitDispatch/edit.vue

@@ -1,19 +1,19 @@
 <template>
   <div class="waitDispatch-wrap">
-    <a-page-header :ghost="false" :backIcon="false" @back="handleBack" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="waitDispatch-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <span style="margin: 0 15px;color: #666;">客户名称:{{ detailData&&detailData.buyerName || '--' }}</span>
-        <!-- <a-button id="waitDispatch-edit-btn" size="small" @click="handleEdit" style="margin-left:10px" key="0">编辑</a-button> -->
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <!-- <template slot="extra">
-        <a-button key="2" id="waitDispatch-preview-btn">打印预览</a-button>
-        <a-button key="1" type="primary" id="waitDispatch-print-btn">快速打印</a-button>
-      </template> -->
-    </a-page-header>
     <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" @back="handleBack" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="waitDispatch-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <span style="margin: 0 15px;color: #666;">客户名称:{{ detailData&&detailData.buyerName || '--' }}</span>
+          <!-- <a-button id="waitDispatch-edit-btn" size="small" @click="handleEdit" style="margin-left:10px" key="0">编辑</a-button> -->
+        </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <!-- <template slot="extra">
+          <a-button key="2" id="waitDispatch-preview-btn">打印预览</a-button>
+          <a-button key="1" type="primary" id="waitDispatch-print-btn">快速打印</a-button>
+        </template> -->
+      </a-page-header>
       <a-card size="small" :bordered="false" class="waitDispatch-cont" v-if="salesBillSn">
         <!-- 查询配件列表 -->
         <queryPart
@@ -95,19 +95,16 @@
         </s-table>
       </a-card>
     </a-spin>
-    <a-affix v-if="dataSource.length>0" :offset-bottom="0">
-      <div
-        style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-        <a-button
-          size="large"
-          style="width: 150px;"
-          type="primary"
-          class="button-primary"
-          @click="handleSubmit()"
-          :loading="loading"
-          id="productInfoList-handleSubmit">下推</a-button>
-      </div>
-    </a-affix>
+    <div class="affix-cont">
+      <a-button
+        size="large"
+        style="width: 150px;"
+        type="primary"
+        class="button-primary"
+        @click="handleSubmit()"
+        :loading="loading"
+        id="productInfoList-handleSubmit">下推</a-button>
+    </div>
   </div>
 </template>
 
@@ -411,6 +408,14 @@ export default {
 
 <style lang="less">
   .waitDispatch-wrap{
+    position: relative;
+    height: 100%;
+    padding-bottom: 51px;
+    box-sizing: border-box;
+    >.ant-spin-nested-loading{
+      overflow-y: scroll;
+      height: 100%;
+    }
     .waitDispatch-cont{
       margin-top: 10px;
     }