瀏覽代碼

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

chenrui 3 年之前
父節點
當前提交
3a8f241646
共有 40 個文件被更改,包括 1430 次插入1245 次删除
  1. 28 0
      src/components/custom.less
  2. 83 121
      src/views/allocationManagement/chainTransferIn/edit.vue
  3. 37 19
      src/views/allocationManagement/chainTransferIn/list.vue
  4. 56 114
      src/views/allocationManagement/chainTransferOut/edit.vue
  5. 36 18
      src/views/allocationManagement/chainTransferOut/list.vue
  6. 55 114
      src/views/allocationManagement/storeTransferOut/edit.vue
  7. 23 5
      src/views/allocationManagement/storeTransferOut/list.vue
  8. 92 201
      src/views/allocationManagement/warehouseAllocation/edit.vue
  9. 35 18
      src/views/allocationManagement/warehouseAllocation/list.vue
  10. 24 6
      src/views/financialManagement/companyCollectionPayment/list.vue
  11. 33 4
      src/views/financialManagement/companyReceivablePayable/chooseBillModal.vue
  12. 26 17
      src/views/financialManagement/companyReceivablePayable/collectionPayment.vue
  13. 24 6
      src/views/financialManagement/companyReceivablePayable/list.vue
  14. 10 0
      src/views/financialManagement/expenseManagement/edit.vue
  15. 24 6
      src/views/financialManagement/expenseManagement/list.vue
  16. 60 5
      src/views/financialManagement/financialCollection/list.vue
  17. 70 15
      src/views/financialManagement/financialPayment/list.vue
  18. 23 2
      src/views/financialManagement/ledgerRecord/list.vue
  19. 23 5
      src/views/financialManagement/warehousingAudit/list.vue
  20. 21 5
      src/views/financialManagement/withdrawalManagement/list.vue
  21. 23 5
      src/views/inventoryManagement/inventoryQuery/list.vue
  22. 22 6
      src/views/inventoryManagement/inventoryQuery/warehouseDetail.vue
  23. 101 85
      src/views/inventoryManagement/inventoryWarning/list.vue
  24. 44 74
      src/views/inventoryManagement/satelliteWarehouseInventory/list.vue
  25. 23 5
      src/views/inventoryManagement/warehouse/list.vue
  26. 23 5
      src/views/inventoryManagement/warehouse/storingLocation/list.vue
  27. 18 20
      src/views/purchasingManagement/purchaseOrder/edit.vue
  28. 23 5
      src/views/purchasingManagement/purchaseOrder/list.vue
  29. 6 0
      src/views/purchasingManagement/purchaseOrder/warehousing.vue
  30. 76 185
      src/views/purchasingManagement/purchaseReturn/edit.vue
  31. 23 5
      src/views/purchasingManagement/purchaseReturn/list.vue
  32. 23 5
      src/views/salesManagement/giftRecord/list.vue
  33. 23 23
      src/views/salesManagement/outboundOrder/list.vue
  34. 6 13
      src/views/salesManagement/salesQuery/edit.vue
  35. 23 5
      src/views/salesManagement/salesQuery/list.vue
  36. 23 5
      src/views/salesManagement/salesReturn/list.vue
  37. 35 28
      src/views/salesManagement/salesReturn/salesReturnEdit.vue
  38. 33 26
      src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue
  39. 17 3
      src/views/salesManagement/urgentItemsOffset/detail.vue
  40. 82 61
      src/views/salesManagement/urgentItemsOffset/list.vue

+ 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;
+        }
+      }
+    }
+  }
 }

+ 83 - 121
src/views/allocationManagement/chainTransferIn/edit.vue

@@ -12,12 +12,12 @@
             <a-radio value="NEEDLE">针式</a-radio>
             <a-radio value="INK">喷墨</a-radio>
           </a-radio-group>
-          <a-button key="2" id="chainTransferInEdit-preview-btn" :disabled="loadData.length==0" @click="handlePrint('preview')">打印预览</a-button>
-          <a-button key="1" type="primary" id="chainTransferInEdit-print-btn" :disabled="loadData.length==0" @click="handlePrint('print')">快捷打印</a-button>
+          <a-button key="2" id="chainTransferInEdit-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
+          <a-button key="1" type="primary" id="chainTransferInEdit-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
         </template>
       </a-page-header>
       <!-- 基础信息 -->
-      <a-card size="small" :bordered="false" class="chainTransferInDetail-cont">
+      <a-card size="small" :bordered="false" class="chainTransferInEdit-cont">
         <a-collapse :activeKey="['1']">
           <a-collapse-panel key="1" header="基础信息">
             <a-descriptions :column="3">
@@ -29,18 +29,18 @@
           </a-collapse-panel>
         </a-collapse>
       </a-card>
-      <!-- 总计 -->
-      <a-alert type="info" style="margin-bottom:10px">
-        <div slot="message">
-          总款数 <strong>{{ (basicInfoData&&(basicInfoData.productTotalCategory || basicInfoData.productTotalCategory==0)) ? basicInfoData.productTotalCategory : '--' }}</strong> ,
-          总数量 <strong>{{ (basicInfoData&&(basicInfoData.productTotalQty || basicInfoData.productTotalQty==0)) ? basicInfoData.productTotalQty : '--' }}</strong> ,
-          总成本 <strong>{{ (basicInfoData&&(basicInfoData.productTotalCost || basicInfoData.productTotalCost==0)) ? '¥'+basicInfoData.productTotalCost : '--' }}</strong>
-        </div>
-      </a-alert>
       <a-card size="small" :bordered="false" class="chainTransferInEdit-cont">
+        <!-- 总计 -->
+        <a-alert type="info" style="margin-bottom: 10px">
+          <div slot="message">
+            总款数 <strong>{{ (basicInfoData&&(basicInfoData.productTotalCategory || basicInfoData.productTotalCategory==0)) ? basicInfoData.productTotalCategory : '--' }}</strong> ,
+            总数量 <strong>{{ (basicInfoData&&(basicInfoData.productTotalQty || basicInfoData.productTotalQty==0)) ? basicInfoData.productTotalQty : '--' }}</strong> ,
+            总成本 <strong>{{ (basicInfoData&&(basicInfoData.productTotalCost || basicInfoData.productTotalCost==0)) ? '¥'+basicInfoData.productTotalCost : '--' }}</strong>
+          </div>
+        </a-alert>
         <!-- 筛选条件 -->
         <div class="table-page-search-wrapper">
-          <a-form layout="inline" @keyup.enter.native="getProductList(1)">
+          <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="产品编码" prop="productCode">
@@ -67,23 +67,21 @@
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-                <a-button type="primary" @click="getProductList(1)" :disabled="disabled" id="chainTransferInEdit-refresh">查询</a-button>
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="chainTransferInEdit-refresh">查询</a-button>
                 <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="chainTransferInEdit-reset">重置</a-button>
               </a-col>
             </a-row>
           </a-form>
         </div>
         <!-- 列表 -->
-        <a-table
+        <s-table
           class="sTable"
           ref="table"
           size="small"
           :rowKey="(record) => record.id"
           :columns="columns"
-          :dataSource="loadData"
-          :loading="loading"
-          :scroll="{ x: 1415 }"
-          :pagination="false"
+          :data="loadData"
+          :scroll="{ x: 1110 }"
           bordered>
           <!-- 仓库仓位 -->
           <template slot="warehouse" slot-scope="text, record, index">
@@ -99,28 +97,18 @@
               placeholder="请选择仓库仓位"
               style="width: 100%;" />
           </template>
-        </a-table>
-        <!-- 分页 -->
-        <tablePagination
-          ref="tablePagination"
-          :total="paginationProps.total"
-          :current="paginationProps.current"
-          :pageSize="paginationProps.pageSize"
-          @changePageSize="changePageSize"
-          @changePage="changePage" />
+        </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="chainTransferInEdit-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="chainTransferInEdit-submit"
+        size="large"
+        class="button-primary"
+        @click="handleSubmit"
+        style="padding: 0 60px;">提交入库</a-button>
+    </div>
     <!-- 打印 -->
     <div id="print"></div>
   </div>
@@ -128,13 +116,12 @@
 
 <script>
 import { STable, VSelect } from '@/components'
-import tablePagination from '@/views/common/tablePagination.vue'
 import { getOperationalPrecision } from '@/libs/tools.js'
 import { dealerProductTypeList } from '@/api/dealerProductType'
 import { warehouseCascadeList } from '@/api/warehouse'
 import { allocLinkagePutDetailSn, allocLinkagePutDetailList, allocLinkagePutDetailCount, allocLinkagePutDetailUpdate, allocLinkagePutSubmit, allocLinkagePutDetailPrint } from '@/api/allocLinkagePut'
 export default {
-  components: { STable, VSelect, tablePagination },
+  components: { STable, VSelect },
   data () {
     return {
       spinning: false,
@@ -146,28 +133,51 @@ export default {
         productTypeSn3: '' //  产品分类3
       },
       disabled: false, //  查询、重置按钮是否可操作
-      loading: false, //  表格加载中
       productTypeList: [], //  产品分类  下拉数据
       productType: [],
       warehouseCascadeData: [], //  仓库仓位
       // 表头
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
-        { title: '产品编码', dataIndex: 'productCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center', fixed: 'left' },
+        { title: '产品编码', dataIndex: 'productCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '成本价(¥)', dataIndex: 'putCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '调入数量', dataIndex: 'putQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '成本小计(¥)', dataIndex: 'costSubtotal', width: 115, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '仓库仓位', scopedSlots: { customRender: 'warehouse' }, width: 280, align: 'center' }
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本价', dataIndex: 'putCost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '调入数量', dataIndex: 'putQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本小计', dataIndex: 'costSubtotal', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '仓库仓位', scopedSlots: { customRender: 'warehouse' }, width: 200, align: 'center' }
       ],
-      loadData: [],
-      paginationProps: {
-        total: 0, //  分页总条数
-        current: 1,
-        pageSize: 20
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const params = Object.assign(parameter, this.queryParam, { allocationLinkagePutSn: this.$route.params.sn })
+        return allocLinkagePutDetailList(params).then(res => {
+          this.getDetailCount(params)
+          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 warehouseSn = data.list[i].warehouseSn || undefined
+            const warehouseLocationSn = data.list[i].warehouseLocationSn || undefined
+            data.list[i].warehouseSnBackups = warehouseSn
+            data.list[i].warehouseLocationSnBackups = warehouseLocationSn
+            if (warehouseSn || warehouseLocationSn) {
+              data.list[i].warehouseCascade = [warehouseSn, warehouseLocationSn]
+            } else {
+              data.list[i].warehouseCascade = undefined
+            }
+            // 成本小计  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
+            data.list[i].costSubtotal = getOperationalPrecision(data.list[i].putCost, data.list[i].putQty)
+          }
+          this.localDataSource = data.list || []
+          this.disabled = false
+          this.spinning = false
+          return data
+        })
       },
+      localDataSource: [],
       basicInfoData: null, //  基本信息
       productTotal: null, //  合计
       printerType: 'NEEDLE' //  打印机类型
@@ -182,10 +192,7 @@ export default {
       this.queryParam.productTypeSn2 = ''
       this.queryParam.productTypeSn3 = ''
       this.productType = []
-      this.paginationProps.total = 0
-      this.paginationProps.current = 1
-      this.paginationProps.pageSize = 20
-      this.getProductList(1)
+      this.$refs.table.refresh(true)
     },
     // 基本信息
     getDetail () {
@@ -211,55 +218,6 @@ export default {
         }
       })
     },
-    // 产品列表数据
-    getProductList (pageNo) {
-      this.disabled = true
-      this.loading = true
-      this.paginationProps.current = pageNo || this.paginationProps.current
-      const params = Object.assign({ pageNo: this.paginationProps.current, pageSize: this.paginationProps.pageSize }, this.queryParam, { allocationLinkagePutSn: this.$route.params.sn })
-      allocLinkagePutDetailList(params).then(res => {
-        this.loading = false
-        if (res.status == 200) {
-          this.getDetailCount(params)
-          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 warehouseSn = data.list[i].warehouseSn || undefined
-            const warehouseLocationSn = data.list[i].warehouseLocationSn || undefined
-            data.list[i].warehouseSnBackups = warehouseSn
-            data.list[i].warehouseLocationSnBackups = warehouseLocationSn
-            if (warehouseSn || warehouseLocationSn) {
-              data.list[i].warehouseCascade = [warehouseSn, warehouseLocationSn]
-            } else {
-              data.list[i].warehouseCascade = undefined
-            }
-            // 成本小计  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
-            data.list[i].costSubtotal = getOperationalPrecision(data.list[i].putCost, data.list[i].putQty)
-          }
-          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()
-    },
     // 合计
     getDetailCount (params) {
       allocLinkagePutDetailCount(params).then(res => {
@@ -283,19 +241,19 @@ export default {
     changeWarehouseCascade (val, opt, ind) {
       if (val.length < 2) {
         this.$message.warning('当前仓库无仓位,请选择其他仓库')
-        const warehouseSnBackups = this.loadData[ind].warehouseSnBackups || undefined
-        const warehouseLocationSnBackups = this.loadData[ind].warehouseLocationSnBackups || undefined
-        this.loadData[ind].warehouseSn = warehouseSnBackups
-        this.loadData[ind].warehouseLocationSn = warehouseLocationSnBackups
+        const warehouseSnBackups = this.localDataSource[ind].warehouseSnBackups || undefined
+        const warehouseLocationSnBackups = this.localDataSource[ind].warehouseLocationSnBackups || undefined
+        this.localDataSource[ind].warehouseSn = warehouseSnBackups
+        this.localDataSource[ind].warehouseLocationSn = warehouseLocationSnBackups
         if (warehouseSnBackups || warehouseLocationSnBackups) {
-          this.loadData[ind].warehouseCascade = [warehouseSnBackups, warehouseLocationSnBackups]
+          this.localDataSource[ind].warehouseCascade = [warehouseSnBackups, warehouseLocationSnBackups]
         } else {
-          this.loadData[ind].warehouseCascade = undefined
+          this.localDataSource[ind].warehouseCascade = undefined
         }
       } else {
-        this.loadData[ind].warehouseSn = val[0] ? val[0] : ''
-        this.loadData[ind].warehouseLocationSn = val[1] ? val[1] : ''
-        this.handleAdd(this.loadData[ind])
+        this.localDataSource[ind].warehouseSn = val[0] ? val[0] : ''
+        this.localDataSource[ind].warehouseLocationSn = val[1] ? val[1] : ''
+        this.handleAdd(this.localDataSource[ind])
       }
     },
     //  添加/编辑
@@ -318,7 +276,7 @@ export default {
       allocLinkagePutDetailUpdate(params).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
-          this.getProductList()
+          this.$refs.table.refresh()
           this.spinning = false
         } else {
           this.spinning = false
@@ -390,7 +348,6 @@ export default {
   beforeRouteEnter (to, from, next) {
     next(vm => {
       vm.getDetail()
-      vm.getProductList(1)
       vm.getWarehouseCascade()
     })
   }
@@ -399,11 +356,16 @@ export default {
 
 <style lang="less">
   .chainTransferInEdit-wrap{
-    .chainTransferInEdit-back{
+    position: relative;
+    height: 100%;
+    padding-bottom: 51px;
+    box-sizing: border-box;
+    .chainTransferInEdit-back, .chainTransferInEdit-cont{
       margin-bottom: 10px;
     }
-    .chainTransferInEdit-cont{
-      margin-bottom: 10px;
+    >.ant-spin-nested-loading{
+      overflow-y: scroll;
+      height: 100%;
     }
   }
 </style>

+ 37 - 19
src/views/allocationManagement/chainTransferIn/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="chainTransferInList-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">
@@ -72,13 +72,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: 1650, y: tableHeight }"
+        :scroll="{ x: 1230, y: tableHeight }"
         bordered>
         <!-- 连锁调入单号 -->
         <template slot="allocationLinkagePutNo" slot-scope="text, record">
@@ -125,8 +126,8 @@ export default {
   data () {
     return {
       spinning: false,
-      tableHeight: 0,
       advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0,
       queryParam: { //  查询条件
         beginDate: '',
         endDate: '',
@@ -137,25 +138,23 @@ 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: '连锁调入单号', scopedSlots: { customRender: 'allocationLinkagePutNo' }, width: 220, align: 'center' },
-        { title: '调出对象', dataIndex: 'outTenantName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '总款数', dataIndex: 'productTotalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { 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: 'putWarehouseTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调拨产品类型', dataIndex: 'allocationTypeDictValue', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '业务状态', dataIndex: 'stateDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '财务状态', dataIndex: 'settleStateDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 170, align: 'center', fixed: 'right' }
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '连锁调入单号', scopedSlots: { customRender: 'allocationLinkagePutNo' }, width: 140, align: 'center' },
+        { title: '调出对象', dataIndex: 'outTenantName', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '总款数', dataIndex: 'productTotalCategory', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? 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: 'putWarehouseTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调拨产品类型', dataIndex: 'allocationTypeDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'stateDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '财务状态', dataIndex: 'settleStateDictValue', 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
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 80
-        }
+        this.spinning = true
         return allocLinkagePutList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -163,13 +162,24 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
       outTenantSnData: []
     }
   },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
   methods: {
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 197
+    },
     //  时间  change
     dateChange (date) {
       this.queryParam.beginDate = date[0]
@@ -231,6 +241,14 @@ export default {
       )
     }
   },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
+    }
+  },
   beforeRouteEnter (to, from, next) {
     next(vm => {
       vm.getPutTenantList()

+ 56 - 114
src/views/allocationManagement/chainTransferOut/edit.vue

@@ -23,7 +23,7 @@
           <a-collapse-panel key="1" header="选择产品">
             <!-- 筛选条件 -->
             <div class="table-page-search-wrapper">
-              <a-form layout="inline" @keyup.enter.native="getProductList(1)">
+              <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="产品编码" prop="productCode">
@@ -78,7 +78,7 @@
                     </a-col>
                   </template>
                   <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-                    <a-button type="primary" @click="getProductList(1)" :disabled="disabled" id="chainTransferOutEdit-refresh">查询</a-button>
+                    <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="chainTransferOutEdit-refresh">查询</a-button>
                     <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="chainTransferOutEdit-reset">重置</a-button>
                     <a @click="advanced=!advanced" style="margin-left: 8px">
                       {{ advanced ? '收起' : '展开' }}
@@ -89,17 +89,16 @@
               </a-form>
             </div>
             <!-- 列表 -->
-            <a-table
+            <s-table
               class="sTable"
               ref="table"
               size="small"
               :rowKey="(record) => record.stockSn+record.productSn+record.warehouseSn+record.warehouseLocationSn"
               :columns="columns"
               :customRow="handleClickRow"
-              :dataSource="loadData"
-              :loading="loading"
-              :scroll="{ x: 1680, y: 300 }"
-              :pagination="false"
+              :data="loadData"
+              :defaultLoadData="false"
+              :scroll="{ x: 1310, y: 300 }"
               bordered>
               <!-- 调出数量 -->
               <template slot="outQty" slot-scope="text, record">
@@ -117,15 +116,7 @@
               <template slot="action" slot-scope="text, record">
                 <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="chainTransferOutEdit-add-btn">添加</a-button>
               </template>
-            </a-table>
-            <!-- 分页 -->
-            <tablePagination
-              ref="tablePagination"
-              :total="paginationProps.total"
-              :current="paginationProps.current"
-              :pageSize="paginationProps.pageSize"
-              @changePageSize="changePageSize"
-              @changePage="changePage" />
+            </s-table>
           </a-collapse-panel>
         </a-collapse>
       </a-card>
@@ -188,18 +179,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="chainTransferOutEdit-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="chainTransferOutEdit-submit"
+        size="large"
+        class="button-primary"
+        @click="handleSubmit"
+        style="padding: 0 60px;">提交</a-button>
+    </div>
     <!-- 打印 -->
     <div id="print"></div>
   </div>
@@ -207,7 +196,6 @@
 
 <script>
 import { STable, VSelect } from '@/components'
-import tablePagination from '@/views/common/tablePagination.vue'
 import { getOperationalPrecision } from '@/libs/tools.js'
 import { allocLinkageOutDetailSn, allocLinkageOutDetailList, allocLinkageOutDetailSave, allocLinkageOutDetailDel, allocLinkageOutDetailCount, allocLinkageOutSubmit, allocLinkageOutDetailDelAll, allocLinkageOutDetailPrint } from '@/api/allocLinkageOut'
 import { productQuery } from '@/api/allocWarehouse'
@@ -215,7 +203,7 @@ import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
 import { dealerProductTypeList } from '@/api/dealerProductType'
 import { warehouseAllList } from '@/api/warehouse'
 export default {
-  components: { STable, VSelect, tablePagination },
+  components: { STable, VSelect },
   data () {
     return {
       spinning: false,
@@ -234,29 +222,38 @@ export default {
       productType: [],
       warehouseList: [], //  仓库  下拉数据
       disabled: false, //  查询、重置按钮是否可操作
-      loading: false, //  表格加载中
       chooseDisabled: false,
       advanced: false, // 高级搜索 展开/关闭
       // 表头
       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: 'productOrigCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '品牌', dataIndex: 'brandName', width: 140, 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: '成本价(¥)', dataIndex: 'putCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '库存数量', dataIndex: 'currentQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调出数量', scopedSlots: { customRender: 'outQty' }, width: 140, align: 'center', fixed: 'right' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '品牌', dataIndex: 'brandName', width: 100, 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: '成本价', dataIndex: 'putCost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '库存数量', dataIndex: 'currentQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调出数量', scopedSlots: { customRender: 'outQty' }, width: 100, align: 'center', fixed: 'right' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
       ],
-      loadData: [],
-      paginationProps: {
-        total: 0, //  分页总条数
-        current: 1,
-        pageSize: 20
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        // 箭冠品牌 sysFlag传1,非箭冠品牌传0。与新增时所选调出产品类型有关
+        this.queryParam.sysFlag = this.basicInfoData.allocationType == 'JIANGUAN' ? '1' : '0'
+        const params = Object.assign(parameter, this.queryParam)
+        return productQuery(params).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.disabled = false
+          return data
+        })
       },
       chooseQueryParam: {
         productCode: '',
@@ -313,10 +310,7 @@ export default {
       this.queryParam.productTypeSn2 = undefined
       this.queryParam.productTypeSn3 = undefined
       this.productType = []
-      this.paginationProps.total = 0
-      this.paginationProps.current = 1
-      this.paginationProps.pageSize = 20
-      this.getProductList(1)
+      this.$refs.table.refresh(true)
     },
     // 已选产品  重置
     chooseResetSearchForm () {
@@ -339,7 +333,7 @@ export default {
       allocLinkageOutDetailSn({ sn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.basicInfoData = res.data
-          this.getProductList(1)
+          this.$refs.table.refresh(true)
           this.getProductBrand()
           this.getProductType()
         } else {
@@ -368,7 +362,7 @@ export default {
       allocLinkageOutDetailSave(params).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
-          this.getProductList()
+          this.$refs.table.refresh()
           this.$refs.chooseTable.refresh()
           this.spinning = false
         } else {
@@ -390,7 +384,7 @@ export default {
             allocLinkageOutDetailDelAll({ sn: _this.$route.params.sn }).then(res => {
               if (res.status == 200) {
                 _this.$message.success(res.message)
-                _this.getProductList()
+                _this.$refs.table.refresh()
                 _this.$refs.chooseTable.refresh()
                 _this.spinning = false
               } else {
@@ -402,7 +396,7 @@ export default {
             allocLinkageOutDetailDel({ id: row.id }).then(res => {
               if (res.status == 200) {
                 _this.$message.success(res.message)
-                _this.getProductList()
+                _this.$refs.table.refresh()
                 _this.$refs.chooseTable.refresh()
                 _this.spinning = false
               } else {
@@ -442,34 +436,6 @@ export default {
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
     },
-    // 产品列表数据
-    getProductList (pageNo) {
-      this.disabled = true
-      this.loading = true
-      this.paginationProps.current = pageNo || this.paginationProps.current
-      // 箭冠品牌 sysFlag传1,非箭冠品牌传0。与新增时所选调出产品类型有关
-      this.queryParam.sysFlag = this.basicInfoData.allocationType == 'JIANGUAN' ? '1' : '0'
-      const params = Object.assign({ pageNo: this.paginationProps.current, pageSize: this.paginationProps.pageSize }, this.queryParam)
-      productQuery(params).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
-          }
-          this.loadData = data.list
-          this.disabled = false
-        } else {
-          this.paginationProps.total = 0
-          this.paginationProps.current = 1
-          this.paginationProps.pageSize = 20
-          this.loadData = []
-        }
-      })
-    },
     // 合计
     getDetailCount (params) {
       allocLinkageOutDetailCount(params).then(res => {
@@ -480,17 +446,6 @@ export default {
         }
       })
     },
-    //  分页  一页多少条change
-    changePageSize (current, pageSize) {
-      this.paginationProps.current = current
-      this.paginationProps.pageSize = pageSize
-      this.getProductList()
-    },
-    //  分页 页码change
-    changePage (current) {
-      this.paginationProps.current = current
-      this.getProductList()
-    },
     //  产品分类  change
     changeProductType (val, opt) {
       this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
@@ -574,29 +529,16 @@ export default {
 
 <style lang="less">
   .chainTransferOutEdit-wrap{
-    .chainTransferOutEdit-back{
+    position: relative;
+    height: 100%;
+    padding-bottom: 51px;
+    box-sizing: border-box;
+    .chainTransferOutEdit-back, .chainTransferOutEdit-cont{
       margin-bottom: 10px;
     }
-    .chainTransferOutEdit-cont{
-      margin-bottom: 10px;
-      .sub-title{
-        font-size: 12px;
-        color: #808695;
-        margin-left: 10px;
-      }
-      .tag-txt{
-        font-size: 12px;
-        color: #ed1c24;
-      }
-      .edit-circle-btn{
-        margin-left: 15px;
-        i{
-          vertical-align: text-bottom;
-        }
-      }
-      .import-btn{
-        margin-left: 15px;
-      }
+    >.ant-spin-nested-loading{
+      overflow-y: scroll;
+      height: 100%;
     }
   }
 </style>

+ 36 - 18
src/views/allocationManagement/chainTransferOut/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="chainTransferOutList-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">
@@ -76,13 +76,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: 1670, y: tableHeight }"
+        :scroll="{ x: 1300, y: tableHeight }"
         bordered>
         <!-- 连锁调出单号 -->
         <template slot="allocationLinkageOutNo" slot-scope="text, record">
@@ -150,25 +151,23 @@ 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: '连锁调出单号', scopedSlots: { customRender: 'allocationLinkageOutNo' }, align: 'center' },
-        { title: '调往对象', dataIndex: 'putTenantName', width: 180, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '总款数', dataIndex: 'productTotalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { 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: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调拨类型', dataIndex: 'allocationTypeDictValue', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '业务状态', dataIndex: 'stateDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '财务状态', dataIndex: 'settleStateDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 210, align: 'center', fixed: 'right' }
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '连锁调出单号', scopedSlots: { customRender: 'allocationLinkageOutNo' }, width: 140, align: 'center' },
+        { title: '调往对象', dataIndex: 'putTenantName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '总款数', dataIndex: 'productTotalCategory', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? 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: 'auditTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调拨类型', dataIndex: 'allocationTypeDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'stateDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '财务状态', dataIndex: 'settleStateDictValue', width: 80, align: 'center', customRender: function (text) { return 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 - 360
-        }
+        this.spinning = true
         return allocLinkageOutList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -176,6 +175,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -290,6 +290,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 - 245
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   },
   beforeRouteEnter (to, from, next) {

+ 55 - 114
src/views/allocationManagement/storeTransferOut/edit.vue

@@ -13,8 +13,8 @@
             <a-radio value="NEEDLE">针式</a-radio>
             <a-radio value="INK">喷墨</a-radio>
           </a-radio-group>
-          <a-button key="2" id="storeTransferOutEdit-preview-btn" :disabled="chooseLoadData.length==0" @click="handlePrint('preview')">打印预览</a-button>
-          <a-button key="1" type="primary" id="storeTransferOutEdit-print-btn" :disabled="chooseLoadData.length==0" @click="handlePrint('print')">快捷打印</a-button>
+          <a-button key="2" id="storeTransferOutEdit-preview-btn" :disabled="chooseLoadDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
+          <a-button key="1" type="primary" id="storeTransferOutEdit-print-btn" :disabled="chooseLoadDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
         </template>
       </a-page-header>
       <!-- 选择产品 -->
@@ -74,8 +74,8 @@
                   </template>
                   <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
                     <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="storeTransferOutList-refresh">查询</a-button>
-                    <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="storeTransferOutList-reset">重置</a-button>
-                    <a @click="advanced=!advanced" style="margin-left: 8px">
+                    <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="storeTransferOutList-reset">重置</a-button>
+                    <a @click="advanced=!advanced" style="margin-left: 5px">
                       {{ advanced ? '收起' : '展开' }}
                       <a-icon :type="advanced ? 'up' : 'down'"/>
                     </a>
@@ -119,20 +119,20 @@
             <a-row :gutter="15">
               <a-col :span="20">
                 <div class="table-page-search-wrapper">
-                  <a-form layout="inline" @keyup.enter.native="getChooseProductList(1)">
+                  <a-form layout="inline" @keyup.enter.native="$refs.chooseTable.refresh(true)">
                     <a-row :gutter="15">
-                      <a-col :md="6" :sm="24">
+                      <a-col :md="8" :sm="24">
                         <a-form-item label="产品编码" prop="productCode">
                           <a-input id="storeTransferOutEdit-productCode" v-model="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
                         </a-form-item>
                       </a-col>
-                      <a-col :md="6" :sm="24">
+                      <a-col :md="8" :sm="24">
                         <a-form-item label="产品名称" prop="productName">
                           <a-input id="storeTransferOutEdit-productName" v-model="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
                         </a-form-item>
                       </a-col>
-                      <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-                        <a-button type="primary" @click="getChooseProductList(1)" :disabled="chooseDisabled" id="storeTransferOutList-refresh">查询</a-button>
+                      <a-col :md="8" :sm="24" style="margin-bottom: 10px;">
+                        <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="chooseDisabled" id="storeTransferOutList-refresh">查询</a-button>
                         <a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="storeTransferOutList-reset">重置</a-button>
                       </a-col>
                     </a-row>
@@ -144,16 +144,14 @@
               </a-col>
             </a-row>
             <!-- 列表 -->
-            <a-table
+            <s-table
               class="sTable"
               ref="chooseTable"
               size="small"
               :rowKey="(record) => record.id"
               :columns="chooseColumns"
-              :dataSource="chooseLoadData"
-              :loading="loading"
+              :data="chooseLoadData"
               :scroll="{ x: 1335, y: 300 }"
-              :pagination="false"
               bordered>
               <!-- 调出数量 -->
               <template slot="outQty" slot-scope="text, record">
@@ -172,30 +170,20 @@
               <template slot="action" slot-scope="text, record">
                 <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="storeTransferOutEdit-del-btn">删除</a-button>
               </template>
-            </a-table>
-            <!-- 分页 -->
-            <tablePagination
-              ref="tablePagination"
-              :total="choosePaginationProps.total"
-              :current="choosePaginationProps.current"
-              :pageSize="choosePaginationProps.pageSize"
-              @changePageSize="changeChoosePageSize"
-              @changePage="changeChoosePage" />
+            </s-table>
           </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="storeTransferOutEdit-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="storeTransferOutEdit-submit"
+        size="large"
+        class="button-primary"
+        @click="handleSubmit"
+        style="padding: 0 60px;">提交</a-button>
+    </div>
     <!-- 打印 -->
     <div id="print"></div>
   </div>
@@ -203,7 +191,6 @@
 
 <script>
 import { STable, VSelect } from '@/components'
-import tablePagination from '@/views/common/tablePagination.vue'
 import { getOperationalPrecision } from '@/libs/tools.js'
 import { storeCallOutDetailList, storeCallOutDetail, storeCallOutDetailCount, storeCallOutDetailSave, storeCallOutDetailDel, storeCallOutSubmit, storeCallOutDetailPrint } from '@/api/storeCallOut'
 import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
@@ -211,7 +198,7 @@ import { dealerProductTypeList } from '@/api/dealerProductType'
 import { warehouseAllList } from '@/api/warehouse'
 import { productQuery } from '@/api/allocWarehouse'
 export default {
-  components: { STable, VSelect, tablePagination },
+  components: { STable, VSelect },
   data () {
     return {
       spinning: false,
@@ -274,12 +261,32 @@ export default {
         { title: '成本小计(¥)', dataIndex: 'costSubtotal', width: 115, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
       ],
-      chooseLoadData: [],
-      choosePaginationProps: {
-        total: 0, //  分页总条数
-        current: 1,
-        pageSize: 20
+      // chooseLoadData: [],
+      // choosePaginationProps: {
+      //   total: 0, //  分页总条数
+      //   current: 1,
+      //   pageSize: 20
+      // },
+      // 加载数据方法 必须为 Promise 对象
+      chooseLoadData: parameter => {
+        this.chooseDisabled = true
+        const params = Object.assign(this.chooseQueryParam, { storeCallOutSn: this.$route.params.sn })
+        return storeCallOutDetailList(Object.assign(parameter, params)).then(res => {
+          this.getDetailCount(params)
+          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
+            data.list[i].outQtyBackups = data.list[i].outQty
+            // 成本小计  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
+            data.list[i].costSubtotal = getOperationalPrecision(data.list[i].outCost, data.list[i].outQty)
+          }
+          this.chooseLoadDataSource = data.list || []
+          this.chooseDisabled = false
+          return data
+        })
       },
+      chooseLoadDataSource: [],
       basicInfoData: null, //  基本信息
       productTotal: null, //  合计
       printerType: 'NEEDLE' //  打印机类型
@@ -346,10 +353,7 @@ export default {
     chooseResetSearchForm () {
       this.chooseQueryParam.productCode = ''
       this.chooseQueryParam.productName = ''
-      this.choosePaginationProps.total = 0
-      this.choosePaginationProps.current = 1
-      this.choosePaginationProps.pageSize = 20
-      this.getChooseProductList(1)
+      this.$refs.chooseTable.refresh(true)
     },
     // 基本信息
     getDetail () {
@@ -390,7 +394,7 @@ export default {
         if (res.status == 200) {
           this.$message.success(res.message)
           this.$refs.table.refresh()
-          this.getChooseProductList()
+          this.$refs.chooseTable.refresh()
           this.spinning = false
         } else {
           this.spinning = false
@@ -410,7 +414,7 @@ export default {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
-              _this.getChooseProductList()
+              _this.$refs.chooseTable.refresh()
               _this.spinning = false
             } else {
               _this.spinning = false
@@ -453,51 +457,6 @@ export default {
     handleBack () {
       this.$router.push({ path: '/allocationManagement/storeTransferOut/list', query: { closeLastOldTab: true } })
     },
-    //  已选产品 分页  一页多少条change
-    changeChoosePageSize (current, pageSize) {
-      this.choosePaginationProps.current = current
-      this.choosePaginationProps.pageSize = pageSize
-      this.getChooseProductList()
-    },
-    //  已选产品 分页 页码change
-    changeChoosePage (current) {
-      this.choosePaginationProps.current = current
-      this.getChooseProductList()
-    },
-    // 已选产品列表数据
-    getChooseProductList (pageNo) {
-      this.choosePaginationProps.current = pageNo || this.choosePaginationProps.current
-      this.chooseDisabled = true
-      this.loading = true
-      const params = {
-        pageNo: this.choosePaginationProps.current,
-        pageSize: this.choosePaginationProps.pageSize,
-        storeCallOutSn: this.$route.params.sn
-      }
-      storeCallOutDetailList(Object.assign(params, this.chooseQueryParam)).then(res => {
-        this.loading = false
-        if (res.status == 200) {
-          //  合计
-          this.getDetailCount(Object.assign(params, this.chooseQueryParam))
-          const data = res.data
-          this.choosePaginationProps.total = Number(res.data.count) || 0
-          this.choosePaginationProps.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
-            data.list[i].outQtyBackups = data.list[i].outQty
-            // 成本小计  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
-            data.list[i].costSubtotal = getOperationalPrecision(data.list[i].outCost, data.list[i].outQty)
-          }
-          this.chooseLoadData = data.list
-          this.chooseDisabled = false
-        } else {
-          this.choosePaginationProps.total = 0
-          this.choosePaginationProps.current = 1
-          this.chooseLoadData = []
-        }
-      })
-    },
     // 已选产品 调出数量  blur
     outQtyBlur (val, record) {
       //  光标移出,值发生改变再调用编辑接口
@@ -551,7 +510,6 @@ export default {
   beforeRouteEnter (to, from, next) {
     next(vm => {
       vm.getDetail()
-      vm.getChooseProductList(1)
       vm.getWarehouseList()
       vm.getProductBrand()
       vm.getProductType()
@@ -562,29 +520,12 @@ export default {
 
 <style lang="less">
   .storeTransferOutEdit-wrap{
-    .storeTransferOutEdit-back{
+    position: relative;
+    height: 100%;
+    padding-bottom: 51px;
+    box-sizing: border-box;
+    .storeTransferOutEdit-back, .storeTransferOutEdit-cont{
       margin-bottom: 10px;
     }
-    .storeTransferOutEdit-cont{
-      margin-bottom: 10px;
-      .sub-title{
-        font-size: 12px;
-        color: #808695;
-        margin-left: 10px;
-      }
-      .tag-txt{
-        font-size: 12px;
-        color: #ed1c24;
-      }
-      .edit-circle-btn{
-        margin-left: 15px;
-        i{
-          vertical-align: text-bottom;
-        }
-      }
-      .import-btn{
-        margin-left: 15px;
-      }
-    }
   }
 </style>

+ 23 - 5
src/views/allocationManagement/storeTransferOut/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="storeTransferOutList-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">
@@ -65,8 +65,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"
@@ -156,9 +157,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 330
-        }
+        this.spinning = true
         return storeCallOutList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -166,6 +165,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -275,6 +275,24 @@ export default {
           this.storeCallOutTypeList = []
         }
       })
+    },
+    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) {

+ 92 - 201
src/views/allocationManagement/warehouseAllocation/edit.vue

@@ -20,7 +20,7 @@
           <a-collapse-panel key="1" header="选择产品">
             <!-- 筛选条件 -->
             <div class="table-page-search-wrapper">
-              <a-form layout="inline" @keyup.enter.native="getProductList(1)">
+              <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="产品编码" prop="productCode">
@@ -75,9 +75,9 @@
                     </a-col>
                   </template>
                   <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-                    <a-button type="primary" @click="getProductList(1)" :disabled="disabled" id="warehouseAllocationList-refresh">查询</a-button>
-                    <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="warehouseAllocationList-reset">重置</a-button>
-                    <a @click="advanced=!advanced" style="margin-left: 8px">
+                    <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="warehouseAllocationList-refresh">查询</a-button>
+                    <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="warehouseAllocationList-reset">重置</a-button>
+                    <a @click="advanced=!advanced" style="margin-left: 5px">
                       {{ advanced ? '收起' : '展开' }}
                       <a-icon :type="advanced ? 'up' : 'down'"/>
                     </a>
@@ -86,17 +86,16 @@
               </a-form>
             </div>
             <!-- 列表 -->
-            <a-table
+            <s-table
               class="sTable"
               ref="table"
               size="small"
               :rowKey="(record) => record.stockSn+record.productSn+record.warehouseSn+record.warehouseLocationSn"
               :columns="columns"
               :customRow="handleClickRow"
-              :dataSource="loadData"
-              :scroll="{ x: 1880, y: 300 }"
-              :loading="loading"
-              :pagination="false"
+              :data="loadData"
+              :defaultLoadData="false"
+              :scroll="{ x: 1330, y: 300 }"
               bordered>
               <!-- 产品分类 -->
               <template slot="productType" slot-scope="text, record">
@@ -125,16 +124,7 @@
               <template slot="action" slot-scope="text, record">
                 <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="warehouseAllocationEdit-add-btn">添加</a-button>
               </template>
-              </s-table>
-            </a-table>
-            <!-- 分页 -->
-            <tablePagination
-              ref="tablePagination"
-              :total="paginationProps.total"
-              :current="paginationProps.current"
-              :pageSize="paginationProps.pageSize"
-              @changePageSize="changePageSize"
-              @changePage="changePage" />
+            </s-table>
           </a-collapse-panel>
         </a-collapse>
       </a-card>
@@ -154,7 +144,7 @@
             <a-row :gutter="15" justify="space-between">
               <a-col :span="17">
                 <div class="table-page-search-wrapper">
-                  <a-form layout="inline" @keyup.enter.native="getChooseProductList(1)">
+                  <a-form layout="inline" @keyup.enter.native="$refs.chooseTable.refresh(true)">
                     <a-row :gutter="15">
                       <a-col :md="9" :sm="24">
                         <a-form-item label="产品编码" prop="productCode">
@@ -167,7 +157,7 @@
                         </a-form-item>
                       </a-col>
                       <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-                        <a-button type="primary" @click="getChooseProductList(1)" :disabled="chooseDisabled" id="warehouseAllocationList-refresh">查询</a-button>
+                        <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="chooseDisabled" id="warehouseAllocationList-refresh">查询</a-button>
                         <a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="warehouseAllocationList-reset">重置</a-button>
                       </a-col>
                     </a-row>
@@ -182,16 +172,14 @@
               </a-col>
             </a-row>
             <!-- 列表 -->
-            <a-table
+            <s-table
               class="sTable"
               ref="chooseTable"
               size="small"
               :rowKey="(record) => record.id"
               :columns="chooseColumns"
-              :dataSource="chooseLoadData"
-              :scroll="{ x: 1680, y: 300 }"
-              :loading="chooseLoading"
-              :pagination="false"
+              :data="chooseLoadData"
+              :scroll="{ x: 1130, y: 300 }"
               bordered>
               <!-- 产品分类 -->
               <template slot="productType" slot-scope="text, record">
@@ -227,47 +215,34 @@
               <template slot="action" slot-scope="text, record">
                 <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="warehouseAllocationEdit-del-btn">删除</a-button>
               </template>
-            </a-table>
-            <!-- 分页 -->
-            <tablePagination
-              ref="chooseTablePagination"
-              :total="choosePaginationProps.total"
-              :current="choosePaginationProps.current"
-              :pageSize="choosePaginationProps.pageSize"
-              @changePageSize="changeChoosePageSize"
-              @changePage="changeChoosePage" />
+            </s-table>
           </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="warehouseAllocationEdit-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="warehouseAllocationEdit-submit"
+        size="large"
+        class="button-primary"
+        @click="handleSubmit"
+        style="padding: 0 60px;">提交</a-button>
+    </div>
   </div>
 </template>
 
 <script>
 import { STable, VSelect } from '@/components'
-import tablePagination from '@/views/common/tablePagination.vue'
 import { allocWarehouseDetailList, allocWarehouseDetail, productQuery, allocWarehouseDetailCount, allocWarehouseDetailSave, allocWarehouseDetailDel, allocWarehouseSubmit } from '@/api/allocWarehouse'
 import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
 import { dealerProductTypeList } from '@/api/dealerProductType'
 import { warehouseLocAllList } from '@/api/warehouse'
-
 export default {
-  components: { STable, VSelect, tablePagination },
+  components: { STable, VSelect },
   data () {
     return {
       spinning: false,
-      loading: false,
       chooseLoading: false,
       queryParam: {
         productCode: '',
@@ -293,45 +268,66 @@ export default {
       warehouseOutLocData: [], //  调出仓位  下拉数据
       // 表头
       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: 140, align: 'center', 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: 'brandName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center', ellipsis: true },
-        { title: '调出仓位', dataIndex: 'warehouseLocationName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调入仓位', scopedSlots: { customRender: 'putWarehouseLocationSn' }, width: 140, align: 'center' },
-        { title: '调出数量', scopedSlots: { customRender: 'outQty' }, width: 140, align: 'center' },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '品牌', dataIndex: 'brandName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '分类', scopedSlots: { customRender: 'productType' }, width: 100, align: 'center', ellipsis: true },
+        { title: '调出仓位', dataIndex: 'warehouseLocationName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调入仓位', scopedSlots: { customRender: 'putWarehouseLocationSn' }, width: 100, align: 'center' },
+        { title: '调出数量', scopedSlots: { customRender: 'outQty' }, width: 100, align: 'center' },
         { title: '可用库存数', dataIndex: 'currentQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '冻结库存数', dataIndex: 'freezeQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
+        { title: '单位', dataIndex: 'unit', width: 60, 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
+        const params = Object.assign(parameter, this.queryParam)
+        params.enabledFlag = 1
+        params.warehouseSn = this.basicInfoData.outWarehouseSn
+        return productQuery(params).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.disabled = false
+          return data
+        })
       },
       // 表头
       chooseColumns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: 220, align: 'center', 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: 'brandName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center', ellipsis: true },
-        { title: '调出仓位', dataIndex: 'outWarehouseLocationName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调入仓位', scopedSlots: { customRender: 'putWarehouseLocationSn' }, width: 140, align: 'center' },
-        { title: '调出数量', scopedSlots: { customRender: 'outQty' }, width: 140, align: 'center' },
-        { title: '单位', dataIndex: 'productUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '品牌', dataIndex: 'brandName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '分类', scopedSlots: { customRender: 'productType' }, width: 100, align: 'center' },
+        { title: '调出仓位', dataIndex: 'outWarehouseLocationName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调入仓位', scopedSlots: { customRender: 'putWarehouseLocationSn' }, width: 100, align: 'center' },
+        { title: '调出数量', scopedSlots: { customRender: 'outQty' }, width: 100, align: 'center' },
+        { title: '单位', dataIndex: 'productUnit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
       ],
-      chooseLoadData: [],
-      choosePaginationProps: {
-        total: 0, //  分页总条数
-        current: 1,
-        pageSize: 20
+      // 加载数据方法 必须为 Promise 对象
+      chooseLoadData: parameter => {
+        this.chooseDisabled = true
+        const params = Object.assign(parameter, this.chooseQueryParam, { allocationWarehouseSn: this.$route.params.sn })
+        return allocWarehouseDetailList(params).then(res => {
+          this.getDetailCount(Object.assign(params, this.chooseQueryParam))
+          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
+            data.list[i].outQty = data.list[i].allocationQty
+            data.list[i].outQtyBackups = data.list[i].allocationQty
+          }
+          this.chooseDisabled = false
+          return data
+        })
       },
       basicInfoData: null, //  基本信息
       productTotal: null //  合计
@@ -349,10 +345,7 @@ export default {
       this.queryParam.productTypeSn3 = undefined
       this.queryParam.warehouseLocationSn = undefined
       this.productType = []
-      this.paginationProps.total = 0
-      this.paginationProps.current = 1
-      this.paginationProps.pageSize = 20
-      this.getProductList(1)
+      this.$refs.table.refresh(true)
     },
     // 双击快速添加
     handleClickRow (record) {
@@ -368,17 +361,14 @@ export default {
     chooseResetSearchForm () {
       this.chooseQueryParam.productCode = ''
       this.chooseQueryParam.productName = ''
-      this.choosePaginationProps.total = 0
-      this.choosePaginationProps.current = 1
-      this.choosePaginationProps.pageSize = 20
-      this.getChooseProductList(1)
+      this.$refs.chooseTable.refresh(true)
     },
     // 基本信息
     getDetail () {
       allocWarehouseDetail({ id: this.$route.params.id }).then(res => {
         if (res.status == 200) {
           this.basicInfoData = res.data
-          this.getProductList(1)
+          this.$refs.table.refresh(true)
           this.getWarehouseLoc(res.data.putWarehouseSn, 'put')
           this.getWarehouseLoc(res.data.outWarehouseSn, 'out')
         } else {
@@ -422,8 +412,8 @@ export default {
       allocWarehouseDetailSave(params).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
-          this.getProductList()
-          this.getChooseProductList()
+          this.$refs.table.refresh()
+          this.$refs.chooseTable.refresh()
           this.spinning = false
         } else {
           this.spinning = false
@@ -449,8 +439,8 @@ export default {
           allocWarehouseDetailDel(params).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
-              _this.getProductList()
-              _this.getChooseProductList()
+              _this.$refs.table.refresh()
+              _this.$refs.chooseTable.refresh()
               _this.spinning = false
             } else {
               _this.spinning = false
@@ -493,90 +483,6 @@ export default {
     handleBack () {
       this.$router.push({ path: '/allocationManagement/warehouseAllocation/list', query: { closeLastOldTab: true } })
     },
-    // 产品列表数据
-    getProductList (pageNo) {
-      this.disabled = true
-      this.loading = true
-      this.paginationProps.current = pageNo || this.paginationProps.current
-      const params = Object.assign({ pageNo: this.paginationProps.current, pageSize: this.paginationProps.pageSize }, this.queryParam)
-      params.enabledFlag = 1
-      params.warehouseSn = this.basicInfoData.outWarehouseSn
-      productQuery(params).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
-          }
-          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()
-    },
-    //  已选产品 分页  一页多少条change
-    changeChoosePageSize (current, pageSize) {
-      this.choosePaginationProps.current = current
-      this.choosePaginationProps.pageSize = pageSize
-      this.getChooseProductList()
-    },
-    //  已选产品 分页 页码change
-    changeChoosePage (current) {
-      this.choosePaginationProps.current = current
-      this.getChooseProductList()
-    },
-    // 已选产品列表数据
-    getChooseProductList (pageNo) {
-      this.choosePaginationProps.current = this.choosePaginationProps.current || pageNo
-      this.chooseDisabled = true
-      this.chooseLoading = true
-      const params = {
-        pageNo: this.choosePaginationProps.current,
-        pageSize: this.choosePaginationProps.pageSize,
-        allocationWarehouseSn: this.$route.params.sn
-      }
-      allocWarehouseDetailList(Object.assign(params, this.chooseQueryParam)).then(res => {
-        this.chooseLoading = false
-        if (res.status == 200) {
-          //  合计
-          this.getDetailCount(Object.assign(params, this.chooseQueryParam))
-          const data = res.data
-          this.choosePaginationProps.total = Number(res.data.count) || 0
-          this.choosePaginationProps.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
-            data.list[i].outQty = data.list[i].allocationQty
-            data.list[i].outQtyBackups = data.list[i].allocationQty
-          }
-          this.chooseLoadData = data.list
-          this.chooseDisabled = false
-        } else {
-          this.choosePaginationProps.total = 0
-          this.choosePaginationProps.current = 1
-          this.choosePaginationProps.pageSize = 20
-          this.chooseLoadData = []
-        }
-      })
-    },
     // 已选产品 调出数量  blur
     outQtyBlur (val, record) {
       //  光标移出,值发生改变再调用编辑接口
@@ -586,7 +492,6 @@ export default {
     },
     // 已选产品 仓位  change
     chooseWarehouseLocChange (record) {
-      console.log('调入仓位--------------')
       this.handleAdd(record, 'edit')
     },
     //  产品分类  change
@@ -635,7 +540,6 @@ export default {
   beforeRouteEnter (to, from, next) {
     next(vm => {
       vm.getDetail()
-      vm.getChooseProductList(1)
       vm.getProductBrand()
       vm.getProductType()
     })
@@ -645,29 +549,16 @@ export default {
 
 <style lang="less">
   .warehouseAllocationEdit-wrap{
-    .warehouseAllocationEdit-back{
+    position: relative;
+    height: 100%;
+    padding-bottom: 51px;
+    box-sizing: border-box;
+    .warehouseAllocationEdit-back, .warehouseAllocationEdit-cont{
       margin-bottom: 10px;
     }
-    .warehouseAllocationEdit-cont{
-      margin-bottom: 10px;
-      .sub-title{
-        font-size: 12px;
-        color: #808695;
-        margin-left: 10px;
-      }
-      .tag-txt{
-        font-size: 12px;
-        color: #ed1c24;
-      }
-      .edit-circle-btn{
-        margin-left: 15px;
-        i{
-          vertical-align: text-bottom;
-        }
-      }
-      .import-btn{
-        margin-left: 15px;
-      }
+    >.ant-spin-nested-loading{
+      overflow-y: scroll;
+      height: 100%;
     }
   }
 </style>

+ 35 - 18
src/views/allocationManagement/warehouseAllocation/list.vue

@@ -1,9 +1,8 @@
 <template>
   <a-card size="small" :bordered="false" class="warehouseAllocationList-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" ref="searchForm" :model="queryParam" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
@@ -54,13 +53,14 @@
       <div class="table-operator"><a-button id="warehouseAllocationList-add" v-if="$hasPermissions('B_warehouseAllocationNews')" type="primary" class="button-error" @click="openModal = true">新增</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"
         :data="loadData"
-        :scroll="{ x: 1500, y: tableHeight }"
+        :scroll="{ x: 1260, y: tableHeight }"
         bordered>
         <!-- 单号 -->
         <template slot="allocationWarehouseNo" slot-scope="text, record">
@@ -128,24 +128,22 @@ 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: '单号', scopedSlots: { customRender: 'allocationWarehouseNo' }, align: 'center' },
-        { title: '调出仓库', dataIndex: 'outWarehouseName', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '调入仓库', dataIndex: 'putWarehouseName', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '总款数', dataIndex: 'productTotalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { 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: 'auditTime', 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: 200, align: 'center', fixed: 'right' }
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单号', scopedSlots: { customRender: 'allocationWarehouseNo' }, width: 140, align: 'center' },
+        { title: '调出仓库', dataIndex: 'outWarehouseName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '调入仓库', dataIndex: 'putWarehouseName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '总款数', dataIndex: 'productTotalCategory', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? 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: 'auditTime', 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: 150, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 330
-        }
+        this.spinning = true
         return allocWarehouseList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -153,6 +151,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -234,6 +233,24 @@ export default {
     //  新增/编辑
     handleEdit (row) {
       this.$router.push({ path: `/allocationManagement/warehouseAllocation/edit/${row.id}/${row.allocationWarehouseSn}` })
+    },
+    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 - 6
src/views/financialManagement/companyCollectionPayment/list.vue

@@ -1,7 +1,7 @@
 <template>
   <a-card size="small" :bordered="false" class="companyCollectionPaymentList-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">
@@ -75,8 +75,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"
@@ -128,9 +129,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 420
-        }
+        this.spinning = true
         return settleUnitList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -138,7 +137,8 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
-          this.total = data.count
+          this.spinning = false
+          this.total = data.count || 0
           this.getTotal(Object.assign(parameter, this.queryParam))
           return data
         })
@@ -193,6 +193,24 @@ export default {
           this.settleStyleList = []
         }
       })
+    },
+    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) {

+ 33 - 4
src/views/financialManagement/companyReceivablePayable/chooseBillModal.vue

@@ -45,7 +45,7 @@
       class="sTable"
       ref="table"
       size="small"
-      :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+      :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onChange, onSelect: onSelectChange, onSelectAll: onSelectAllChange }"
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
@@ -152,10 +152,39 @@ export default {
       this.queryParam.bizType = undefined
       this.$refs.table.refresh(true)
     },
-    onSelectChange (selectedRowKeys, selectedRows) {
-      console.log('selectedRowKeys changed: ', selectedRowKeys, selectedRows)
+    onChange (selectedRowKeys, selectedRows) {
       this.selectedRowKeys = selectedRowKeys
-      this.selectedRows = selectedRows
+    },
+    onSelectChange (record, selected, selectedRows, nativeEvent) {
+      const _this = this
+      if (selected) { //  选择
+        this.selectedRows.push(record)
+      } else { //  取消
+        this.selectedRows.map((item, index) => {
+          if (item.id == record.id) {
+            _this.selectedRows.splice(index, 1)
+          }
+        })
+      }
+    },
+    // 本页全选/取消全选
+    onSelectAllChange (selected, selectedRows, changeRows) {
+      const _this = this
+      if (selected) { //  选择
+        this.selectedRows = [...this.selectedRows, ...changeRows]
+      } else { //  取消
+        const arrId = []
+        this.selectedRows.map((item, index) => {
+          this.selectedRows.map((subItem, ind) => {
+            if (item.id == subItem.id) {
+              arrId.push(index)
+            }
+          })
+        })
+        arrId.map((item, index) => {
+          _this.selectedRows = _this.selectedRows.slice(item, item + 1)
+        })
+      }
     }
   },
   watch: {

+ 26 - 17
src/views/financialManagement/companyReceivablePayable/collectionPayment.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="collectionPayment-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
-      <a-page-header :ghost="false" :backIcon="false" class="collectionPayment-cont" >
+      <a-page-header :ghost="false" :backIcon="false" class="collectionPayment-back" >
         <!-- 自定义的二级文字标题 -->
         <template slot="subTitle">
           <a id="collectionPayment-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
@@ -129,18 +129,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="collectionPayment-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="collectionPayment-submit"
+        size="large"
+        class="button-primary"
+        @click="handleSubmit"
+        style="padding: 0 60px;">提交</a-button>
+    </div>
     <choose-bill-modal :openModal="openModal" :nowChoose="chooseLoadData" :settleClientSn="$route.params.sn" @ok="handleOk" @close="handleClose" />
   </div>
 </template>
@@ -315,13 +313,24 @@ export default {
 </script>
 
 <style lang="less">
-  .collectionPayment-cont{
+  .collectionPayment-wrap{
+    position: relative;
+    height: 100%;
+    padding-bottom: 51px;
+    box-sizing: border-box;
     margin-bottom: 10px;
-    .green{
-      color: #19be6b;
+    >.ant-spin-nested-loading{
+      overflow-y: scroll;
+      height: 100%;
     }
-    .red{
-      color: #ed1c24;
+    .collectionPayment-cont{
+      margin-top: 10px;
+      .green{
+        color: #19be6b;
+      }
+      .red{
+        color: #ed1c24;
+      }
     }
   }
 </style>

+ 24 - 6
src/views/financialManagement/companyReceivablePayable/list.vue

@@ -1,7 +1,7 @@
 <template>
   <a-card size="small" :bordered="false" class="companyReceivablePayableList-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">
@@ -39,8 +39,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"
@@ -95,9 +96,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 380
-        }
+        this.spinning = true
         return settleUnitClientList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -107,7 +106,8 @@ export default {
             data.list[i].unSettleAmountPay = Math.abs(data.list[i].unSettleAmountPay) || 0
           }
           this.disabled = false
-          this.total = data.count
+          this.spinning = false
+          this.total = data.count || 0
           this.getTotal(Object.assign(parameter, this.queryParam))
           return data
         })
@@ -140,6 +140,24 @@ export default {
       this.queryParam.settleClientName = ''
       this.queryParam.settleClientType = undefined
       this.$refs.table.refresh(true)
+    },
+    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)
     }
   }
 }

+ 10 - 0
src/views/financialManagement/expenseManagement/edit.vue

@@ -206,8 +206,18 @@ export default {
 
 <style lang="less">
 .expenseManagementEdit-wrap {
+  height: 100%;
+  >.ant-spin-nested-loading{
+    height: 100%;
+    .ant-spin-container{
+      height: 90%;
+    }
+  }
   .expenseManagementEdit-back {
     margin-bottom: 10px;
   }
+  .expenseManagementEdit-table-page-wrapper{
+    height: 100%;
+  }
 }
 </style>

+ 24 - 6
src/views/financialManagement/expenseManagement/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="expenseManagementList-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">
@@ -68,8 +68,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"
@@ -161,9 +162,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 370
-        }
+        this.spinning = true
         return settleExpenseQuery(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -171,6 +170,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           // 费用类型
           if (this.costTypeList.length == 0) {
             this.getCostTypeList()
@@ -302,6 +302,24 @@ export default {
       this.queryParam.endDate = ''
       this.costType = []
       this.$refs.table.refresh(true)
+    },
+    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)
     }
   }
 }
@@ -309,7 +327,7 @@ export default {
 <style lang="less">
   .expenseManagementList-wrap{
     .sTable{
-      margin-top: 15px;
+      margin-top: 10px;
     }
 	.active{
 		color: #ed1c24;

+ 60 - 5
src/views/financialManagement/financialCollection/list.vue

@@ -8,7 +8,7 @@
         </a-tab-pane>
       </a-tabs>
       <!-- 搜索条件 -->
-      <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">
@@ -77,8 +77,9 @@
       </div>
       <!-- 列表 -->
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         :row-selection="$hasPermissions('B_financialCollectionPl') ? rowSelection : null"
         :rowKey="record => record.id"
@@ -165,9 +166,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 450
-        }
+        this.spinning = true
         return settleReceiptQuery(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -175,6 +174,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           this.totalData.count = data.count || 0
           // 查询总计
           this.settleReceiptQuerySum(Object.assign(parameter, this.queryParam))
@@ -195,6 +195,12 @@ export default {
           onChange: (selectedRowKeys, selectedRows) => {
             this.selectedRowKeys = selectedRowKeys
           },
+          onSelect: (record, selected, selectedRows, nativeEvent) => {
+            this.onSelectChange(record, selected, selectedRows, nativeEvent)
+          },
+          onSelectAll: (selected, selectedRows, changeRows) => {
+            this.onSelectAllChange(selected, selectedRows, changeRows)
+          },
           getCheckboxProps: record => ({
             props: {
               disabled: record.settleState == 'SETTLED'
@@ -296,6 +302,55 @@ export default {
         auditEndDate: ''
       }
       this.$refs.table.refresh(true)
+    },
+    onSelectChange (record, selected, selectedRows, nativeEvent) {
+      const _this = this
+      if (selected) { //  选择
+        this.selectedRows.push(record)
+      } else { //  取消
+        this.selectedRows.map((item, index) => {
+          if (item.id == record.id) {
+            _this.selectedRows.splice(index, 1)
+          }
+        })
+      }
+    },
+    // 本页全选/取消全选
+    onSelectAllChange (selected, selectedRows, changeRows) {
+      const _this = this
+      if (selected) { //  选择
+        this.selectedRows = [...this.selectedRows, ...changeRows]
+      } else { //  取消
+        const arrId = []
+        this.selectedRows.map((item, index) => {
+          this.selectedRows.map((subItem, ind) => {
+            if (item.id == subItem.id) {
+              arrId.push(index)
+            }
+          })
+        })
+        arrId.map((item, index) => {
+          _this.selectedRows = _this.selectedRows.slice(item, item + 1)
+        })
+      }
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 330
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   }
 }

+ 70 - 15
src/views/financialManagement/financialPayment/list.vue

@@ -8,7 +8,7 @@
         </a-tab-pane>
       </a-tabs>
       <!-- 搜索条件 -->
-      <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">
@@ -76,8 +76,9 @@
       </div>
       <!-- 列表 -->
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         :row-selection="$hasPermissions('B_financialPaymentPl') ? rowSelection : null"
         :rowKey="record => record.id"
@@ -164,9 +165,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 450
-        }
+        this.spinning = true
         return settlePayQuery(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -174,7 +173,8 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
-          this.totalData.count = data.count
+          this.spinning = false
+          this.totalData.count = data.count || 0
           // 查询总计
           this.settlePayQuerySum(Object.assign(parameter, this.queryParam))
           return data
@@ -190,15 +190,21 @@ export default {
     rowSelection () {
       if (this.$hasPermissions('B_financialPaymentPl')) {
         return {
-			  selectedRowKeys: this.selectedRowKeys,
-			  onChange: (selectedRowKeys, selectedRows) => {
-			    this.selectedRowKeys = selectedRowKeys
-			  },
-			  getCheckboxProps: record => ({
-			    props: {
-			      disabled: record.settleState == 'SETTLED'
-			    }
-			  })
+          selectedRowKeys: this.selectedRowKeys,
+          onChange: (selectedRowKeys, selectedRows) => {
+            this.selectedRowKeys = selectedRowKeys
+          },
+          onSelect: (record, selected, selectedRows, nativeEvent) => {
+            this.onSelectChange(record, selected, selectedRows, nativeEvent)
+          },
+          onSelectAll: (selected, selectedRows, changeRows) => {
+            this.onSelectAllChange(selected, selectedRows, changeRows)
+          },
+          getCheckboxProps: record => ({
+            props: {
+              disabled: record.settleState == 'SETTLED'
+            }
+          })
         }
       } else {
         return null
@@ -295,6 +301,55 @@ export default {
         auditEndDate: ''
       }
       this.$refs.table.refresh(true)
+    },
+    onSelectChange (record, selected, selectedRows, nativeEvent) {
+      const _this = this
+      if (selected) { //  选择
+        this.selectedRows.push(record)
+      } else { //  取消
+        this.selectedRows.map((item, index) => {
+          if (item.id == record.id) {
+            _this.selectedRows.splice(index, 1)
+          }
+        })
+      }
+    },
+    // 本页全选/取消全选
+    onSelectAllChange (selected, selectedRows, changeRows) {
+      const _this = this
+      if (selected) { //  选择
+        this.selectedRows = [...this.selectedRows, ...changeRows]
+      } else { //  取消
+        const arrId = []
+        this.selectedRows.map((item, index) => {
+          this.selectedRows.map((subItem, ind) => {
+            if (item.id == subItem.id) {
+              arrId.push(index)
+            }
+          })
+        })
+        arrId.map((item, index) => {
+          _this.selectedRows = _this.selectedRows.slice(item, item + 1)
+        })
+      }
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 330
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   }
 }

+ 23 - 2
src/views/financialManagement/ledgerRecord/list.vue

@@ -1,7 +1,7 @@
 <template>
   <a-card size="small" :bordered="false" class="ledgerRecordList-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">
@@ -48,8 +48,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"
@@ -104,6 +105,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return satelliteWHSeparateList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -111,6 +113,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           this.total = data.count || 0
           this.getTotal(Object.assign(parameter, this.queryParam))
           return data
@@ -149,6 +152,24 @@ export default {
       this.queryParam.dealerProduct.code = ''
       this.$refs.custSatelliteList.resetForm()
       this.$refs.table.refresh(true)
+    },
+    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)
     }
   }
 }

+ 23 - 5
src/views/financialManagement/warehousingAudit/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="warehousingAuditList-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">
@@ -55,8 +55,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"
@@ -133,9 +134,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 370
-        }
+        this.spinning = true
         const params = Object.assign(parameter, this.queryParam)
         return receivingList(params).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
           this.getTotal(params)
           return data
         })
@@ -203,6 +203,24 @@ export default {
       this.queryParam.receivingBillNo = ''
       this.queryParam.auditState = undefined
       this.$refs.table.refresh(true)
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 238
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   }
 }

+ 21 - 5
src/views/financialManagement/withdrawalManagement/list.vue

@@ -1,7 +1,7 @@
 <template>
   <a-card size="small" :bordered="false" class="withdrawalManagementList-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">
@@ -25,8 +25,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"
@@ -136,6 +137,24 @@ export default {
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
       this.$refs.table.refresh(true)
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 245 - 217.5
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   },
   beforeRouteEnter (to, from, next) {
@@ -147,9 +166,6 @@ export default {
 </script>
 <style lang="less">
   .withdrawalManagementList-wrap{
-    .sTable{
-      margin-top: 15px;
-    }
     .descriptions{
       margin-top: 45px;
       .descriptions-tit{

+ 23 - 5
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,8 +83,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"
@@ -176,9 +177,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 320
-        }
+        this.spinning = true
         // 排序
         if (parameter.sortField == 'currentStockQty') {
           parameter.sortField = 'qty'
@@ -195,6 +194,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           // 总计
           this.getTotal(Object.assign(parameter, this.queryParam))
           // 产品分类
@@ -332,6 +332,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)
     }
   }
 }

+ 22 - 6
src/views/inventoryManagement/inventoryQuery/warehouseDetail.vue

@@ -8,7 +8,7 @@
     </a-page-header>
     <a-card size="small" :bordered="false" class="inventoryQueryWarehouseDetail-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">
@@ -72,8 +72,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"
@@ -192,6 +193,24 @@ export default {
           this.warehouseList = []
         }
       })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 285
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   },
   beforeRouteEnter (to, from, next) {
@@ -204,10 +223,7 @@ export default {
 
 <style lang="less">
   .inventoryQueryWarehouseDetail-wrap{
-    .inventoryQueryWarehouseDetail-back{
-      margin-bottom: 10px;
-    }
-    .inventoryQueryWarehouseDetail-cont{
+    .inventoryQueryWarehouseDetail-back, .inventoryQueryWarehouseDetail-cont{
       margin-bottom: 10px;
     }
     .green{

+ 101 - 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: 8px" @click="resetSearchForm" :disabled="disabled" id="inventoryWarningList-reset">重置</a-button>
               <!-- <a-button
                 style="margin-left: 8px"
@@ -89,17 +89,21 @@
         </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_inventoryWarningBatchSave') ? { selectedRowKeys: selectedRowKeys, onChange: onSelectChange } : null"
+        :row-selection="$hasPermissions('B_inventoryWarningBatchSave') ? {
+          selectedRowKeys: selectedRowKeys,
+          onChange: onChange,
+          onSelect: onSelectChange,
+          onSelectAll: onSelectAllChange
+        } : null"
         :rowKey="(record) => record.id"
         :columns="columns"
-        :dataSource="loadData"
-        :scroll="{ x: 2200, y: tableHeight }"
-        :pagination="false"
-        :loading="loading"
+        :data="loadData"
+        :scroll="{ x: 1600, y: tableHeight }"
         bordered>
         <!-- 产品分类 -->
         <template slot="productType" slot-scope="text, record">
@@ -166,15 +170,7 @@
             id="inventoryWarningList-add-btn">保存</a-button>
           <span v-if="!$hasPermissions('B_inventoryWarningSave')">--</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>
@@ -182,12 +178,11 @@
 <script>
 import moment from 'moment'
 import { STable, VSelect } from '@/components'
-import tablePagination from '@/views/common/tablePagination.vue'
 import { stockWarnList, stockWarnSaveBatch } from '@/api/stockWarn'
 import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
 import { dealerProductTypeList } from '@/api/dealerProductType'
 export default {
-  components: { STable, VSelect, tablePagination },
+  components: { STable, VSelect },
   data () {
     return {
       spinning: false,
@@ -209,26 +204,43 @@ export default {
       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: 120, 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: 'brandName', 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: 'totalStockQty', 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: '原厂编码', dataIndex: 'productOrigCode', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品品牌', dataIndex: 'brandName', width: 150, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 150, align: 'center' },
+        { title: '实时库存数(个)', scopedSlots: { customRender: 'stockQty' }, width: 110, align: 'center' },
+        { title: '在途数(个)', scopedSlots: { customRender: 'inTransit' }, width: 100, align: 'center' },
+        { title: '总库存数(个)', dataIndex: 'totalStockQty', 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: 100, align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, 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: [],
@@ -241,46 +253,6 @@ export default {
     }
   },
   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) {
-      if (this.tableHeight == 0) {
-        this.tableHeight = window.innerHeight - 330
-      }
-      this.disabled = true
-      this.loading = true
-      this.paginationProps.current = pageNo || this.paginationProps.current
-      const params = Object.assign({ pageNo: this.paginationProps.current, pageSize: this.paginationProps.pageSize }, this.queryParam)
-      stockWarnList(params).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
-          }
-          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 = []
@@ -330,7 +302,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
@@ -339,9 +311,39 @@ export default {
         }
       })
     },
-    onSelectChange (selectedRowKeys, selectedRows) {
+    onChange (selectedRowKeys, selectedRows) {
       this.selectedRowKeys = selectedRowKeys
-      this.selectedRows = selectedRows
+    },
+    onSelectChange (record, selected, selectedRows, nativeEvent) {
+      const _this = this
+      if (selected) { //  选择
+        this.selectedRows.push(record)
+      } else { //  取消
+        this.selectedRows.map((item, index) => {
+          if (item.id == record.id) {
+            _this.selectedRows.splice(index, 1)
+          }
+        })
+      }
+    },
+    // 本页全选/取消全选
+    onSelectAllChange (selected, selectedRows, changeRows) {
+      const _this = this
+      if (selected) { //  选择
+        this.selectedRows = [...this.selectedRows, ...changeRows]
+      } else { //  取消
+        const arrId = []
+        this.selectedRows.map((item, index) => {
+          this.selectedRows.map((subItem, ind) => {
+            if (item.id == subItem.id) {
+              arrId.push(index)
+            }
+          })
+        })
+        arrId.map((item, index) => {
+          _this.selectedRows = _this.selectedRows.slice(item, item + 1)
+        })
+      }
     },
     //  重置
     resetSearchForm () {
@@ -354,10 +356,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 () {
@@ -428,11 +427,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()
     })

+ 44 - 74
src/views/inventoryManagement/satelliteWarehouseInventory/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="satelliteWarehouseInventoryList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form-model
           id="satelliteWarehouseInventoryList-form"
           ref="ruleForm"
@@ -41,15 +41,15 @@
         <a-button v-if="$hasPermissions('B_satelliteWarehouseInventoryDetail')" id="satelliteWarehouseInventoryList-replenishment" type="primary" class="button-error" @click="handleReplenishment">补货清单</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"
+        :data="loadData"
+        :defaultLoadData="false"
         :scroll="{ x: 1210, y: tableHeight }"
         bordered>
         <!-- 操作 -->
@@ -57,15 +57,7 @@
           <a-button size="small" v-if="$hasPermissions('B_satelliteWarehouseInventoryAdd')" type="link" @click="handleAdd(record)" id="satelliteWarehouseInventoryList-add-btn">加入补货单</a-button>
           <span v-if="!$hasPermissions('B_satelliteWarehouseInventoryAdd')">--</span>
         </template>
-      </a-table>
-      <!-- 分页 -->
-      <tablePagination
-        ref="tablePagination"
-        :total="paginationProps.total"
-        :current="paginationProps.current"
-        :pageSize="paginationProps.pageSize"
-        @changePageSize="changePageSize"
-        @changePage="changePage" />
+      </s-table>
     </a-spin>
     <!-- 补货单 -->
     <satellite-warehouse-inventory-add-modal :openModal="openModal" :nowData="nowData" @close="closeModal" />
@@ -74,12 +66,11 @@
 
 <script>
 import { STable, VSelect } from '@/components'
-import tablePagination from '@/views/common/tablePagination.vue'
 import satelliteWarehouseInventoryAddModal from './addModal.vue'
 import custSatelliteList from '@/views/common/custSatelliteList.vue'
 import { satelliteWHStockList, satelliteWHSupplyInsert } from '@/api/satelliteWH'
 export default {
-  components: { STable, VSelect, satelliteWarehouseInventoryAddModal, custSatelliteList, tablePagination },
+  components: { STable, VSelect, satelliteWarehouseInventoryAddModal, custSatelliteList },
   data () {
     return {
       spinning: false,
@@ -109,11 +100,20 @@ export default {
         { title: '当前库存', dataIndex: 'currentStockQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center', fixed: 'right' }
       ],
-      loadData: [],
-      paginationProps: {
-        total: 0, //  分页总条数
-        current: 1,
-        pageSize: 20
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return satelliteWHStockList(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
+          }
+          this.disabled = false
+          this.spinning = false
+          return data
+        })
       },
       openModal: false,
       nowData: null
@@ -129,54 +129,11 @@ export default {
       this.nowData.customerName = val.label
       this.nowData.customerSn = val.key
     },
-    // 列表
-    getStockList (pageNo) {
-      this.paginationProps.current = pageNo || this.paginationProps.current
-      this.disabled = true
-      if (this.tableHeight == 0) {
-        this.tableHeight = window.innerHeight - 380
-      }
-      const params = {
-        pageNo: this.paginationProps.current,
-        pageSize: this.paginationProps.pageSize
-      }
-      this.loading = true
-      satelliteWHStockList(Object.assign(params, this.queryParam)).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
-          }
-          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.getStockList()
-    },
-    //  分页 页码change
-    changePage (current) {
-      this.paginationProps.current = current
-      this.getStockList()
-    },
     //  查询
     handleSearch () {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
-          this.getStockList(1)
+          this.$refs.table.refresh(true)
         } else {
           console.log('error submit!!')
           return false
@@ -190,11 +147,8 @@ export default {
       this.queryParam.dealerProduct.queryWord = ''
       this.$refs.custSatelliteList.resetForm()
       this.nowData = null
-      this.paginationProps.total = 0
-      this.paginationProps.current = 1
-      this.paginationProps.pageSize = 20
-      this.loadData = []
-      this.getStockList(1)
+      this.$refs.ruleForm.resetFields()
+      this.$refs.table.clearTable()
     },
     //  补货清单
     handleReplenishment () {
@@ -230,12 +184,28 @@ export default {
     //  关闭弹框
     closeModal () {
       this.openModal = false
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 245
     }
   },
-  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 - 5
src/views/inventoryManagement/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"
@@ -87,9 +88,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 285
-        }
+        this.spinning = true
         return warehouseList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -97,6 +96,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -152,6 +152,24 @@ export default {
     //  查看仓位
     goStoringLocation (row) {
       this.$router.push({ path: `/inventoryManagement/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()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   }
 }

+ 23 - 5
src/views/inventoryManagement/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"
@@ -90,9 +91,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
@@ -100,6 +99,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -163,6 +163,24 @@ export default {
     //  返回列表
     handleBack () {
       this.$router.push({ path: '/inventoryManagement/warehouse/list', query: { closeLastOldTab: true } })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 290
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   }
 }

+ 18 - 20
src/views/purchasingManagement/purchaseOrder/edit.vue

@@ -23,14 +23,6 @@
           <a-collapse-panel key="1">
             <template slot="header">
               基础信息
-              <!-- <a-button
-                type="primary"
-                shape="circle"
-                size="small"
-                icon="edit"
-                class="edit-circle-btn"
-                id="purchaseOrderEdit-edit-circle-btn"
-                @click.stop="handleEditInfo" /> -->
             </template>
             <a-descriptions :column="2">
               <a-descriptions-item label="供应商">{{ detail&&detail.purchaseTargetName || '--' }}</a-descriptions-item>
@@ -192,19 +184,17 @@
           </a-collapse-panel>
         </a-collapse>
       </a-card>
-      <a-affix :offset-bottom="0" v-if="detail">
-        <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-          <a-button
-            type="primary"
-            id="purchaseOrderEdit-submit-btn"
-            size="large"
-            class="button-primary"
-            :loading="subLoading"
-            @click="handleSubmit"
-            style="padding: 0 60px;">提交</a-button>
-        </div>
-      </a-affix>
     </a-spin>
+    <div class="affix-cont">
+      <a-button
+        type="primary"
+        id="purchaseOrderEdit-submit-btn"
+        size="large"
+        class="button-primary"
+        :loading="subLoading"
+        @click="handleSubmit"
+        style="padding: 0 60px;">提交</a-button>
+    </div>
     <!-- 选择基本信息弹框 -->
     <basic-info-modal ref="baseInfo" :openModal="openModal" @ok="handleOk" @cancel="openModal=false" />
     <!-- 打印 -->
@@ -497,6 +487,14 @@ export default {
 
 <style lang="less">
   .purchaseOrderEdit-wrap{
+    position: relative;
+    height: 100%;
+    padding-bottom: 51px;
+    box-sizing: border-box;
+    >.ant-spin-nested-loading{
+      overflow-y: scroll;
+      height: 100%;
+    }
     .billno{
       margin: 0 0 0 30px;
       font-size: 18px;

+ 23 - 5
src/views/purchasingManagement/purchaseOrder/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="purchaseOrderList-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">
@@ -79,8 +79,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"
@@ -171,9 +172,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 370
-        }
+        this.spinning = true
         // 获取统计数据
         this.getTotalData(Object.assign(parameter, this.queryParam))
         return purchaseList(Object.assign(parameter, this.queryParam)).then(res => {
@@ -183,6 +182,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       }
@@ -276,6 +276,24 @@ export default {
           this.supplierList = []
         }
       })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 285
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   },
   beforeRouteEnter (to, from, next) {

+ 6 - 0
src/views/purchasingManagement/purchaseOrder/warehousing.vue

@@ -258,6 +258,12 @@ export default {
 
 <style lang="less">
   .purchaseOrderWarehousing-wrap{
+    position: relative;
+    height: 100%;
+    >.ant-spin-nested-loading{
+      overflow-y: scroll;
+      height: 100%;
+    }
     .btn-cont {
       text-align: center;
       margin: 35px 0 10px;

+ 76 - 185
src/views/purchasingManagement/purchaseReturn/edit.vue

@@ -14,7 +14,7 @@
           <a-collapse-panel key="1" header="选择产品">
             <!-- 筛选条件 -->
             <div class="table-page-search-wrapper">
-              <a-form layout="inline" @keyup.enter.native="getPurchaseBillDetailList(1)">
+              <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="采购单号" prop="purchaseBillNo">
@@ -32,23 +32,21 @@
                     </a-form-item>
                   </a-col>
                   <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-                    <a-button type="primary" @click="getPurchaseBillDetailList(1)" :disabled="disabled" id="purchaseReturnList-refresh">查询</a-button>
+                    <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="purchaseReturnList-refresh">查询</a-button>
                     <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="purchaseReturnList-reset">重置</a-button>
                   </a-col>
                 </a-row>
               </a-form>
             </div>
             <!-- 列表 -->
-            <a-table
+            <s-table
               class="sTable"
               ref="table"
               size="small"
               :rowKey="(record) => record.id"
               :columns="columns"
-              :dataSource="loadData"
-              :loading="loading"
-              :scroll="{ x: 1320, y: 300 }"
-              :pagination="false"
+              :data="loadData"
+              :scroll="{ x: 990, y: 300 }"
               bordered>
               <!-- 数量 -->
               <template slot="returnQty" slot-scope="text, record">
@@ -66,15 +64,7 @@
               <template slot="action" slot-scope="text, record">
                 <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="purchaseReturnEdit-add-btn">添加</a-button>
               </template>
-            </a-table>
-            <!-- 分页 -->
-            <tablePagination
-              ref="tablePagination"
-              :total="paginationProps.total"
-              :current="paginationProps.current"
-              :pageSize="paginationProps.pageSize"
-              @changePageSize="changePageSize"
-              @changePage="changePage" />
+            </s-table>
           </a-collapse-panel>
         </a-collapse>
       </a-card>
@@ -94,16 +84,14 @@
                 style="margin-left: 10px;">整单删除</a-button>
             </template>
             <!-- 列表 -->
-            <a-table
+            <s-table
               class="sTable"
               ref="chooseTable"
               size="small"
               :rowKey="(record) => record.id"
               :columns="chooseColumns"
-              :dataSource="chooseLoadData"
-              :loading="chooseLoading"
-              :scroll="{ x: 1420, y: 300 }"
-              :pagination="false"
+              :data="chooseLoadData"
+              :scroll="{ x: 1110, y: 300 }"
               bordered>
               <!-- 退货数量 -->
               <template slot="qty" slot-scope="text, record">
@@ -133,44 +121,31 @@
               <template slot="action" slot-scope="text, record">
                 <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="purchaseReturnEdit-del-btn">删除</a-button>
               </template>
-            </a-table>
-            <!-- 分页 -->
-            <tablePagination
-              ref="chooseTablePagination"
-              :total="choosePaginationProps.total"
-              :current="choosePaginationProps.current"
-              :pageSize="choosePaginationProps.pageSize"
-              @changePageSize="changeChoosePageSize"
-              @changePage="changeChoosePage" />
+            </s-table>
           </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="purchaseReturnEdit-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="purchaseReturnEdit-submit"
+        size="large"
+        class="button-primary"
+        @click="handleSubmit"
+        style="padding: 0 60px;">提交</a-button>
+    </div>
   </div>
 </template>
 
 <script>
 import { STable, VSelect } from '@/components'
-import tablePagination from '@/views/common/tablePagination.vue'
 import { purchaseReturnPurchaseBillDetailList, purchaseReturnDetailList, purchaseReturnDetailSave, purchaseReturnDetailDel, purchaseReturnSubmit, purchaseReturnDelAll } from '@/api/purchaseReturn'
 export default {
-  components: { STable, VSelect, tablePagination },
+  components: { STable, VSelect },
   data () {
     return {
       spinning: false,
-      loading: false,
-      chooseLoading: false,
       queryParam: {
         purchaseBillNo: '',
         productCode: '',
@@ -180,41 +155,56 @@ export default {
       advanced: false, // 高级搜索 展开/关闭
       // 表头
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '采购单号', dataIndex: 'purchaseBillNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '采购单号', dataIndex: 'purchaseBillNo', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '采购总数', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '可退数量', dataIndex: 'refundableQty', width: 100, 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: 'refundableQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '退货数量', scopedSlots: { customRender: 'returnQty' }, width: 100, align: 'center' },
-        { title: '采购价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
+        { title: '采购价', dataIndex: 'price', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: 60, 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
+        return purchaseReturnPurchaseBillDetailList(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
+          }
+          this.disabled = false
+          return data
+        })
       },
       // 表头
       chooseColumns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '采购单号', dataIndex: 'purchaseBillNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '采购单号', dataIndex: 'purchaseBillNo', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '采购总数', dataIndex: 'purchaseBillQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '采购总数', dataIndex: 'purchaseBillQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '退货数量', scopedSlots: { customRender: 'qty' }, width: 100, align: 'center' },
-        { title: '采购价', dataIndex: 'cost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '采购价', dataIndex: 'cost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '退货原因', scopedSlots: { customRender: 'remarks' }, width: 200, align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
       ],
-      chooseLoadData: [],
-      choosePaginationProps: {
-        total: 0, //  分页总条数
-        current: 1,
-        pageSize: 20
+      // 加载数据方法 必须为 Promise 对象
+      chooseLoadData: parameter => {
+        return purchaseReturnDetailList(Object.assign(parameter, { purchaseReturnSn: 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
+            data.list[i].qtyBackups = data.list[i].qty
+            data.list[i].remarksBackups = data.list[i].remarks
+            data.list[i].refundableQty = data.list[i].purchaseBillRefundableQty + data.list[i].qty
+          }
+          return data
+        })
       }
     }
   },
@@ -224,10 +214,7 @@ export default {
       this.queryParam.purchaseBillNo = ''
       this.queryParam.productCode = ''
       this.queryParam.productName = ''
-      this.paginationProps.total = 0
-      this.paginationProps.current = 1
-      this.paginationProps.pageSize = 20
-      this.getPurchaseBillDetailList(1)
+      this.$refs.table.refresh(true)
     },
     //  添加/编辑
     handleAdd (row, isEdit) {
@@ -248,7 +235,6 @@ export default {
         remarks: row.remarks,
         promotionFlag: row.promotionFlag
       }
-      console.log(params)
       if (isEdit) { // 编辑
         // 清空退货数量时,值应保持未清空前的值,因退货数量都不可为空
         if (!row.qty) {
@@ -260,8 +246,8 @@ export default {
       purchaseReturnDetailSave(params).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
-          this.getPurchaseBillDetailList()
-          this.getChooseProductList()
+          this.$refs.table.refresh()
+          this.$refs.chooseTable.refresh()
           this.spinning = false
         } else {
           this.spinning = false
@@ -294,8 +280,8 @@ export default {
             purchaseReturnDelAll({ purchaseReturnSn: _this.$route.params.sn }).then(res => {
               if (res.status == 200) {
                 _this.$message.success(res.message)
-                _this.getPurchaseBillDetailList()
-                _this.getChooseProductList()
+                _this.$refs.table.refresh()
+                _this.$refs.chooseTable.refresh()
                 _this.spinning = false
               } else {
                 _this.spinning = false
@@ -306,8 +292,8 @@ export default {
             purchaseReturnDetailDel({ id: row.id }).then(res => {
               if (res.status == 200) {
                 _this.$message.success(res.message)
-                _this.getPurchaseBillDetailList()
-                _this.getChooseProductList()
+                _this.$refs.table.refresh()
+                _this.$refs.chooseTable.refresh()
                 _this.spinning = false
               } else {
                 _this.spinning = false
@@ -337,85 +323,6 @@ export default {
     handleBack () {
       this.$router.push({ path: '/purchasingManagement/purchaseReturn/list', query: { closeLastOldTab: true } })
     },
-    //  已选产品 分页  一页多少条change
-    changePageSize (current, pageSize) {
-      this.paginationProps.current = current
-      this.paginationProps.pageSize = pageSize
-      this.getPurchaseBillDetailList()
-    },
-    //  已选产品 分页 页码change
-    changePage (current) {
-      this.paginationProps.current = current
-      this.getPurchaseBillDetailList()
-    },
-    // 选择产品  列表
-    getPurchaseBillDetailList (pageNo) {
-      this.paginationProps.current = pageNo || this.paginationProps.current
-      this.disabled = true
-      this.loading = true
-      const params = Object.assign({ pageNo: this.paginationProps.current, pageSize: this.paginationProps.pageSize }, this.queryParam)
-      purchaseReturnPurchaseBillDetailList(params).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
-          }
-          this.loadData = data.list
-          this.disabled = false
-        } else {
-          this.paginationProps.total = 0
-          this.paginationProps.current = 1
-          this.paginationProps.pageSize = 20
-          this.loadData = []
-        }
-      })
-    },
-    //  已选产品 分页  一页多少条change
-    changeChoosePageSize (current, pageSize) {
-      this.choosePaginationProps.current = current
-      this.choosePaginationProps.pageSize = pageSize
-      this.getChooseProductList()
-    },
-    //  已选产品 分页 页码change
-    changeChoosePage (current) {
-      this.choosePaginationProps.current = current
-      this.getChooseProductList()
-    },
-    // 已选产品列表数据
-    getChooseProductList (pageNo) {
-      this.choosePaginationProps.current = this.choosePaginationProps.current || pageNo
-      const params = {
-        pageNo: this.choosePaginationProps.current,
-        pageSize: this.choosePaginationProps.pageSize,
-        purchaseReturnSn: this.$route.params.sn
-      }
-      this.chooseLoading = true
-      purchaseReturnDetailList(params).then(res => {
-        this.chooseLoading = false
-        if (res.status == 200) {
-          const data = res.data
-          this.choosePaginationProps.total = Number(res.data.count) || 0
-          this.choosePaginationProps.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
-            data.list[i].qtyBackups = data.list[i].qty
-            data.list[i].remarksBackups = data.list[i].remarks
-            data.list[i].refundableQty = data.list[i].purchaseBillRefundableQty + data.list[i].qty
-          }
-          this.chooseLoadData = data.list
-        } else {
-          this.choosePaginationProps.total = 0
-          this.choosePaginationProps.current = 1
-          this.choosePaginationProps.pageSize = 20
-          this.chooseLoadData = []
-        }
-      })
-    },
     // 已选产品 退货数量  blur
     qtyBlur (val, record) {
       //  光标移出,值发生改变再调用编辑接口
@@ -436,39 +343,23 @@ export default {
     }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.getPurchaseBillDetailList(1)
-      vm.getChooseProductList(1)
-    })
+    next(vm => {})
   }
 }
 </script>
 
 <style lang="less">
   .purchaseReturnEdit-wrap{
-    .purchaseReturnEdit-back{
-      margin-bottom: 10px;
+    position: relative;
+    height: 100%;
+    padding-bottom: 51px;
+    box-sizing: border-box;
+    >.ant-spin-nested-loading{
+      overflow-y: scroll;
+      height: 100%;
     }
-    .purchaseReturnEdit-cont{
+    .purchaseReturnEdit-back, .purchaseReturnEdit-cont{
       margin-bottom: 10px;
-      .sub-title{
-        font-size: 12px;
-        color: #808695;
-        margin-left: 10px;
-      }
-      .tag-txt{
-        font-size: 12px;
-        color: #ed1c24;
-      }
-      .edit-circle-btn{
-        margin-left: 15px;
-        i{
-          vertical-align: text-bottom;
-        }
-      }
-      .import-btn{
-        margin-left: 15px;
-      }
     }
   }
 </style>

+ 23 - 5
src/views/purchasingManagement/purchaseReturn/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="purchaseReturnList-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,8 +57,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"
@@ -127,9 +128,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 330
-        }
+        this.spinning = true
         return purchaseReturnList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -137,6 +136,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -228,6 +228,24 @@ export default {
           this.purchaseTragetType = []
         }
       })
+    },
+    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) {

+ 23 - 5
src/views/salesManagement/giftRecord/list.vue

@@ -1,7 +1,7 @@
 <template>
   <a-card size="small" :bordered="false" class="giftRecordList-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">
@@ -44,8 +44,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"
@@ -91,9 +92,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 275
-        }
+        this.spinning = true
         return giftsDetailList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -101,6 +100,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       }
@@ -129,6 +129,24 @@ export default {
         this.$refs.custList.resetForm()
       }
       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()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   },
   beforeRouteEnter (to, from, next) {

+ 23 - 23
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">
@@ -51,27 +51,10 @@
         </a-form>
       </div>
       <!-- 列表 -->
-      <!-- 暂不做 -->
-      <!-- <div style="margin-bottom: 10px">
-        <a-button type="primary" id="outboundOrder-export" :disabled="!hasSelected" :loading="loading" @click="handleOutbounds">批量出库</a-button>
-        <span style="margin-left: 8px">
-          <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
-        </span>
-      </div> -->
-      <!-- <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :row-selection="rowSelection"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :showPagination="false"
-        :scroll="{ x: 1710 }"
-        bordered> -->
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         :rowKey="(record) => record.id"
         :columns="columns"
@@ -166,9 +149,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 275
-        }
+        this.spinning = true
         return stockOutList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -176,6 +157,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -319,6 +301,24 @@ export default {
     },
     onSelectChange (selectedRowKeys) {
       this.selectedRowKeys = selectedRowKeys
+    },
+    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) {

+ 6 - 13
src/views/salesManagement/salesQuery/edit.vue

@@ -140,10 +140,7 @@
         </s-table>
       </a-card>
     </a-spin>
-    <!-- <a-affix :offset-bottom="0"> -->
-    <div
-      class="affix-cont"
-      style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
+    <div class="affix-cont">
       <a-button
         size="large"
         style="width: 150px;"
@@ -152,7 +149,6 @@
         @click="handleSubmit()"
         id="productInfoList-handleSubmit">提交</a-button>
     </div>
-    <!-- </a-affix> -->
     <!-- 选择客户弹框 -->
     <choose-custom-modal ref="custModal" :show="openModal" @updateData="updateData" @cancel="openModal=false" />
     <!-- 打印 -->
@@ -494,8 +490,12 @@ export default {
   .salesEdit-wrap{
     position: relative;
     height: 100%;
-    padding-bottom: 64px;
+    padding-bottom: 51px;
     box-sizing: border-box;
+    >.ant-spin-nested-loading{
+      overflow-y: scroll;
+      height: 100%;
+    }
     .salesEdit-cont{
       margin-top: 10px;
     }
@@ -517,12 +517,5 @@ export default {
     .redBg-row{
       background-color: #f5cdc8;
     }
-    .affix-cont{
-      position: absolute;
-      bottom: 0;
-      left: 0;
-      width: 100%;
-    }
   }
-
 </style>

+ 23 - 5
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">
@@ -86,8 +86,9 @@
       </a-alert>
       <!-- 列表 -->
       <s-table
-        class="sTable"
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+87+'px' }"
         size="small"
         :rowKey="(record) => record.id"
         :columns="columns"
@@ -224,9 +225,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 365
-        }
+        this.spinning = true
         // 查询总计
         salesCount(Object.assign(parameter, this.queryParam)).then(res => {
           this.totalData = Object.assign(this.totalData, res.data || {})
@@ -238,6 +237,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -366,6 +366,24 @@ export default {
           this.settleStyleList = res.data
         }
       })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 285
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   },
   beforeRouteEnter (to, from, next) {

+ 23 - 5
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">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
@@ -66,8 +66,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"
@@ -163,9 +164,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 370
-        }
+        this.spinning = true
         // 查询总计
         this.getQueryCount(Object.assign(parameter, this.queryParam))
         return salesReturnList(Object.assign(parameter, this.queryParam)).then(res => {
@@ -175,6 +174,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       }
@@ -265,6 +265,24 @@ export default {
     // 客户 change
     custChange (obj) {
       this.queryParam.buyerSn = obj.key || undefined
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 285
+    }
+  },
+  mounted () {
+    const _this = this
+    this.$nextTick(() => { // 页面渲染完成后的回调
+      _this.setTableH()
+    })
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
     }
   },
   beforeRouteEnter (to, from, next) {

+ 35 - 28
src/views/salesManagement/salesReturn/salesReturnEdit.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>
+  <div class="salesReturnEdit-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <a-page-header :ghost="false" :backIcon="false" class="salesReturnEdit-back" >
         <!-- 自定义的二级文字标题 -->
@@ -161,19 +161,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="width: 150px;"
+        type="primary"
+        class="button-primary"
+        @click="handleSubmit()"
+        id="salesReturn-handleSubmit">提交</a-button>
+    </div>
     <!-- 选择客户弹框 -->
     <choose-custom-modal :show="openModal" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
     <!-- 打印 -->
@@ -534,22 +531,32 @@ export default {
 </script>
 
 <style lang="less">
-  .pages-wrap{
-    margin-top: 10px;
-    .sTable{
-      margin-top: 10px;
+  .salesReturnEdit-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;
+    .pages-wrap{
+      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;
+            }
           }
         }
       }

+ 33 - 26
src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>
+  <div class="salesReturnEdit-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <a-page-header :ghost="false" :backIcon="false" class="salesReturnGrabEdit-back" >
         <!-- 自定义的二级文字标题 -->
@@ -155,19 +155,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="width: 150px;"
+        type="primary"
+        class="button-primary"
+        @click="handleSubmit()"
+        id="salesReturn-handleSubmit">提交</a-button>
+    </div>
     <!-- 选择客户弹框 -->
     <choose-custom-modal :show="openModal" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
     <!-- 打印 -->
@@ -526,19 +523,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%;
+    }
+    .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;
+            }
           }
         }
       }

+ 17 - 3
src/views/salesManagement/urgentItemsOffset/detail.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="urgentItemsOffsetDetail-page-wrapper">
+  <div class="urgentItemsOffsetDetail-page-wrapper" :style="{'paddingBottom': (!isWriteDown&&$hasPermissions('B_urgentWriteDown')) ? '64px' : '0px'}">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 操作 -->
       <a-page-header :ghost="false" :backIcon="false" class="urgentItemsOffsetDetail-operation-wrapper" :style="{ padding: !outBizSn ? '16px 24px' : '0px 24px' }" >
@@ -9,7 +9,6 @@
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra">
-          <a-button key="3" type="danger" v-if="!isWriteDown&&$hasPermissions('B_urgentWriteDown')" @click="handleSubmit" id="urgentItemsOffsetDetail-btn-submit">冲减</a-button>
           <!-- <a-button key="2" @click="handlePreview" id="urgentItemsOffsetDetail-btn-preview">打印预览</a-button>
           <a-button key="1" type="primary" @click="handlePrint" id="urgentItemsOffsetDetail-btn-print">快速打印</a-button> -->
         </template>
@@ -63,8 +62,16 @@
         </s-table>
       </a-card>
     </a-spin>
+    <div class="affix-cont" v-if="!isWriteDown&&$hasPermissions('B_urgentWriteDown')">
+      <a-button
+        size="large"
+        style="width: 150px;"
+        type="primary"
+        class="button-primary"
+        @click="handleSubmit"
+        id="urgentItemsOffsetDetail-btn-submit">冲减</a-button>
+    </div>
   </div>
-
 </template>
 
 <script>
@@ -180,6 +187,13 @@ export default {
 
 <style lang="less">
   .urgentItemsOffsetDetail-page-wrapper{
+    position: relative;
+    height: 100%;
+    box-sizing: border-box;
+    >.ant-spin-nested-loading{
+      overflow-y: scroll;
+      height: 100%;
+    }
     .urgentItemsOffsetDetail-info-wrapper{
       margin: 10px 0;
       .item-cont {

+ 82 - 61
src/views/salesManagement/urgentItemsOffset/list.vue

@@ -1,69 +1,72 @@
 <template>
   <a-card size="small" :bordered="false" class="urgentItemsOffsetList-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" @change="custChange" v-model="queryParam.buyerSn"></custList>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="销售单号">
-              <a-input id="urgentItemsOffsetList-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="急件单号">
-                <a-input id="urgentItemsOffsetList-urgentBillNo" v-model.trim="queryParam.urgentBillNo" 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.status"
-                  ref="status"
-                  id="chainTransferInList-status"
-                  code="URGENT_STATUS"
-                  placeholder="请选择状态"
-                  allowClear></v-select>
+              <a-form-item label="客户名称">
+                <custList ref="custList" @change="custChange" v-model="queryParam.buyerSn"></custList>
               </a-form-item>
             </a-col>
-          </template>
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="urgentItemsOffsetList-refresh">查询</a-button>
-            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="urgentItemsOffsetList-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>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="small"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1100, y: tableHeight }"
-      bordered>
-      <!-- 单号 -->
-      <template slot="urgentBillNo" slot-scope="text, record">
-        <span style="color: #ed1c24;cursor: pointer;" v-if="$hasPermissions('M_urgentDetail')" @click="handleDetail(record)">{{ record.urgentBillNo }}</span>
-        <span v-else>{{ record.urgentBillNo }}</span>
-      </template>
-    </s-table>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="销售单号">
+                <a-input id="urgentItemsOffsetList-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="急件单号">
+                  <a-input id="urgentItemsOffsetList-urgentBillNo" v-model.trim="queryParam.urgentBillNo" allowClear placeholder="请输入急件单号"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="状态">
+                  <v-select
+                    v-model="queryParam.status"
+                    ref="status"
+                    id="chainTransferInList-status"
+                    code="URGENT_STATUS"
+                    placeholder="请选择状态"
+                    allowClear></v-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="urgentItemsOffsetList-refresh">查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="urgentItemsOffsetList-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>
+      <!-- 列表 -->
+      <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: 1100, y: tableHeight }"
+        bordered>
+        <!-- 单号 -->
+        <template slot="urgentBillNo" slot-scope="text, record">
+          <span style="color: #ed1c24;cursor: pointer;" v-if="$hasPermissions('M_urgentDetail')" @click="handleDetail(record)">{{ record.urgentBillNo }}</span>
+          <span v-else>{{ record.urgentBillNo }}</span>
+        </template>
+      </s-table>
+    </a-spin>
   </a-card>
 </template>
 
@@ -76,6 +79,7 @@ export default {
   components: { STable, VSelect, rangeDate, custList },
   data () {
     return {
+      spinning: false,
       tableHeight: 0,
       advanced: true, // 高级搜索 展开/关闭
       queryParam: { //  查询条件
@@ -101,9 +105,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 260
-        }
+        this.spinning = true
         return urgentList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -111,6 +113,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.spinning = false
           return data
         })
       }
@@ -141,6 +144,24 @@ export default {
     // 客户 change
     custChange (obj) {
       this.queryParam.buyerSn = obj.key || undefined
+    },
+    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) {