Forráskód Böngészése

报表样式优化

chenrui 1 éve
szülő
commit
e2963164ba

+ 105 - 77
src/views/reportData/allocationPresentation/list.vue

@@ -1,77 +1,80 @@
 <template>
-  <a-card size="small" :bordered="false" class="allocationPresentationList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
-      <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
-        <a-form-model
-          id="allocationPresentationList-form"
-          ref="ruleForm"
-          class="form-model-con"
-          layout="inline"
-          :model="queryParam"
-          :rules="rules"
-          @keyup.enter.native="handleSearch">
-          <a-row :gutter="15">
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="调拨日期" prop="time">
-                <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
-              </a-form-model-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="客户名称">
-                <a-input id="allocationPresentationList-targetName" v-model.trim="queryParam.targetName" allowClear placeholder="请输入客户名称"/>
-              </a-form-model-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="客户级别">
-                <v-select
-                  v-model="queryParam.dealer.dealerLevel"
-                  ref="dealerLevel"
-                  id="allocationPresentationList-dealerLevel"
-                  code="DEALER_LEVEL"
-                  placeholder="请选择客户级别"
-                  allowClear></v-select>
-              </a-form-model-item>
-            </a-col>
-            <template v-if="advanced">
+  <div>
+    <a-card size="small" :bordered="false" class="searchBottomSpace">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 搜索条件 -->
+        <div class="table-page-search-wrapper" ref="tableSearch">
+          <a-form-model
+            id="allocationPresentationList-form"
+            ref="ruleForm"
+            class="form-model-con"
+            layout="inline"
+            :model="queryParam"
+            :rules="rules"
+            @keyup.enter.native="handleSearch">
+            <a-row :gutter="15">
               <a-col :md="6" :sm="24">
-                <a-form-model-item label="调拨单号">
-                  <a-input id="allocationPresentationList-allocateNo" v-model.trim="queryParam.allocateNo" allowClear placeholder="请输入调拨单号"/>
+                <a-form-model-item label="调拨日期" prop="time">
+                  <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-model-item label="所在区域">
-                  <subarea id="allocationPresentationList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
+                <a-form-model-item label="客户名称">
+                  <a-input id="allocationPresentationList-targetName" v-model.trim="queryParam.targetName" allowClear placeholder="请输入客户名称"/>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-model-item label="地区">
-                    <AreaList id="allocationPresentationList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+                <a-form-model-item label="客户级别">
+                  <v-select
+                    v-model="queryParam.dealer.dealerLevel"
+                    ref="dealerLevel"
+                    id="allocationPresentationList-dealerLevel"
+                    code="DEALER_LEVEL"
+                    placeholder="请选择客户级别"
+                    allowClear></v-select>
                 </a-form-model-item>
               </a-col>
-            </template>
-            <a-col :md="6" :sm="24">
-              <a-button type="primary" @click="handleSearch" :disabled="disabled" id="allocationPresentationList-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="allocationPresentationList-reset">重置</a-button>
-              <a-button
-                style="margin-left: 5px"
-                type="primary"
-                class="button-warning"
-                @click="handleExport"
-                :disabled="disabled"
-                :loading="exportLoading"
-                v-if="$hasPermissions('B_allocationPresentationExport')"
-                id="allocationPresentationList-export">导出</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 5px">
-                {{ advanced ? '收起' : '展开' }}
-                <a-icon :type="advanced ? 'up' : 'down'"/>
-              </a>
-            </a-col>
-          </a-row>
-        </a-form-model>
-      </div>
-      <a-tabs>
-        <a-tab-pane key="1" tab="费用/调拨类型列表">
+              <template v-if="advanced">
+                <a-col :md="6" :sm="24">
+                  <a-form-model-item label="调拨单号">
+                    <a-input id="allocationPresentationList-allocateNo" v-model.trim="queryParam.allocateNo" allowClear placeholder="请输入调拨单号"/>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-model-item label="所在区域">
+                    <subarea id="allocationPresentationList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-model-item label="地区">
+                    <AreaList id="allocationPresentationList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+                  </a-form-model-item>
+                </a-col>
+              </template>
+              <a-col :md="6" :sm="24">
+                <a-button type="primary" @click="handleSearch" :disabled="disabled" id="allocationPresentationList-refresh">查询</a-button>
+                <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="allocationPresentationList-reset">重置</a-button>
+                <a-button
+                  style="margin-left: 5px"
+                  type="primary"
+                  class="button-warning"
+                  @click="handleExport"
+                  :disabled="disabled"
+                  :loading="exportLoading"
+                  v-if="$hasPermissions('B_allocationPresentationExport')"
+                  id="allocationPresentationList-export">导出</a-button>
+                <a @click="advanced=!advanced" style="margin-left: 5px">
+                  {{ advanced ? '收起' : '展开' }}
+                  <a-icon :type="advanced ? 'up' : 'down'"/>
+                </a>
+              </a-col>
+            </a-row>
+          </a-form-model>
+        </div>
+      </a-spin></a-card>
+    <a-tabs :tabBarStyle="{'background':'#fff'}">
+      <a-tab-pane key="1" tab="费用/调拨类型列表">
+        <a-card size="small" :bordered="false" class="allocationPresentationList-wrap">
           <!-- 列表 -->
           <s-table
             class="sTable"
@@ -82,11 +85,14 @@
             rowKeyName="no"
             :columns="columns"
             :data="loadData"
-            :scroll="{ x: 680 + tableWidth }"
+            :style="{ height: tableHeight+84.5+'px' }"
+            :scroll="{ x: 680 + tableWidth,y: tableHeight-40}"
             bordered>
           </s-table>
-        </a-tab-pane>
-        <a-tab-pane key="2" tab="费用/调拨类型合计" force-render>
+        </a-card>
+      </a-tab-pane>
+      <a-tab-pane key="2" tab="费用/调拨类型合计" force-render>
+        <a-card size="small" :bordered="false" class="allocationPresentationList-wrap" :style="{'height':tableHeight*1+110*1+'px'}">
           <div class="h-title">
             <div><div>费用类型</div></div>
             <div><div>调拨类别</div></div>
@@ -129,12 +135,14 @@
             </div>
           </div>
           <div v-if="!totalData" style="text-align: center;padding:100px 0;">暂无合计数据</div>
-        </a-tab-pane>
-      </a-tabs>
+        </a-card>
+      </a-tab-pane>
+    </a-tabs>
     </a-spin>
     <!-- 导出提示框 -->
     <reportModal :visible="showExport" @close="showExport=false"></reportModal>
-  </a-card>
+
+  </div>
 </template>
 
 <script>
@@ -162,7 +170,7 @@ export default {
         endDate: '',
         allocateNo: '',
         targetName: '',
-        subareaArea:{
+        subareaArea: {
           subareaSn: undefined,
           subareaAreaSn: undefined
         },
@@ -173,6 +181,7 @@ export default {
           dealerLevel: undefined
         }
       },
+      tableHeight: 0,
       rules: {
         'time': [{ required: true, message: '请选择调拨日期', trigger: 'change' }]
       },
@@ -219,6 +228,17 @@ export default {
       return arr
     }
   },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
   methods: {
     getCol (data, key) {
       const ret = []
@@ -307,7 +327,7 @@ export default {
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },
-    subareaChange(val){
+    subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
     },
@@ -320,9 +340,9 @@ export default {
       this.queryParam.allocateNo = ''
       this.queryParam.targetName = ''
       this.queryParam.subareaArea = {
-          subareaSn: undefined,
-          subareaAreaSn: undefined
-        }
+        subareaSn: undefined,
+        subareaAreaSn: undefined
+      }
       this.queryParam.dealer = {
         provinceSn: undefined,
         citySn: undefined,
@@ -337,7 +357,7 @@ export default {
       this.$refs.ruleForm.resetFields()
       this.$refs.table.clearTable()
     },
-    areaChange(val){
+    areaChange (val) {
       this.queryParam.dealer.provinceSn = val[0] ? val[0] : ''
       this.queryParam.dealer.citySn = val[1] ? val[1] : ''
       this.queryParam.dealer.districtSn = val[2] ? val[2] : ''
@@ -345,6 +365,11 @@ export default {
     pageInit () {
       this.getAllocateType()
       this.resetSearchForm()
+      this.setTableH()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 280
     }
   },
   mounted () {
@@ -363,7 +388,7 @@ export default {
   }
 }
 </script>
-<style lang="less">
+<style lang="less" scoped>
   .allocationPresentationList-wrap{
     .h-title{
       display: flex;
@@ -458,5 +483,8 @@ export default {
     .leve1,.leve2,.leve3{
       display:flex;
     }
+    /deep/.ant-card-body{
+      margin-top:-11px !important;
+    }
   }
 </style>

+ 45 - 33
src/views/reportData/expenseAccountReport/bearerList.vue

@@ -1,7 +1,7 @@
 <template>
-  <a-card>
-    <a-spin :spinning="spinning" tip="Loading...">
-      <div class="table-page-search-wrapper">
+  <div>
+    <a-card size="small" :bordered="false" class="searchBottomSpace">
+      <div class="table-page-search-wrapper" ref="tableSearch">
         <a-form-model
           id="returnGoodsPresentationList-form"
           ref="ruleForm"
@@ -62,33 +62,39 @@
           </a-row>
         </a-form-model>
       </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :defaultLoadData="false"
-        :rowKey="(record) => record.no"
-        rowKeyName = 'no'
-        :columns="columns"
-        :showPagination="false"
-        :data="loadData"
-        bordered>
-        <template slot="footer">
-          <table v-if="totalData">
-            <tr>
-              <th colspan="5" width="42%" style="text-align: right;">汇总:</th>
-              <th v-for="item in totalMData" width="6%" style="text-align: center;">{{ toThousands(item) }}</th>
-              <th width="6%" style="text-align: center;">{{ toThousands(totalData['COUNT_PRICE']) }}</th>
-            </tr>
-          </table>
-        </template>
-      </s-table>
-    </a-spin>
-    <!-- 导出提示框 -->
-    <reportModal :visible="showExport" @close="showExport=false"></reportModal>
-    <selectMonth ref="months" @ok="getDateValue"></selectMonth>
-  </a-card>
+    </a-card>
+    <a-card>
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :defaultLoadData="false"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :columns="columns"
+          :showPagination="false"
+          :data="loadData"
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ y: tableHeight-30}"
+          bordered>
+          <template slot="footer">
+            <table v-if="totalData">
+              <tr>
+                <th colspan="5" width="42%" style="text-align: right;">汇总:</th>
+                <th v-for="item in totalMData" width="6%" style="text-align: center;">{{ toThousands(item) }}</th>
+                <th width="6%" style="text-align: center;">{{ toThousands(totalData['COUNT_PRICE']) }}</th>
+              </tr>
+            </table>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 导出提示框 -->
+      <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+      <selectMonth ref="months" @ok="getDateValue"></selectMonth>
+    </a-card>
+  </div>
 </template>
 
 <script>
@@ -146,7 +152,8 @@ export default {
         })
       },
       totalData: null,
-      totalMData: []
+      totalMData: [],
+      tableHeight: 0
     }
   },
   methods: {
@@ -255,7 +262,7 @@ export default {
           _this.getColumns()
           _this.$refs.table.refresh(true)
         } else {
-          _this.$message.error("请选择查询条件")
+          _this.$message.error('请选择查询条件')
           return false
         }
       })
@@ -307,6 +314,11 @@ export default {
     },
     pageInit () {
       this.getColumns()
+      this.setTableH()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 260
     }
   },
   mounted () {
@@ -327,5 +339,5 @@ export default {
 </script>
 
 <style style="less">
-   
+
 </style>

+ 45 - 33
src/views/reportData/expenseAccountReport/categoryList.vue

@@ -1,7 +1,7 @@
 <template>
-  <a-card>
-    <a-spin :spinning="spinning" tip="Loading...">
-      <div class="table-page-search-wrapper">
+  <div>
+    <a-card size="small" :bordered="false" class="searchBottomSpace">
+      <div class="table-page-search-wrapper" ref="tableSearch">
         <a-form-model
           id="returnGoodsPresentationList-form"
           ref="ruleForm"
@@ -41,33 +41,39 @@
           </a-row>
         </a-form-model>
       </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :defaultLoadData="false"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :showPagination="false"
-        :data="loadData"
-        bordered>
-        <template slot="footer">
-          <table v-if="totalData">
-            <tr>
-              <th colspan="4" width="32%" style="text-align: right;">{{ totalData['PRODUCT_TYPE_NAME2'] }}汇总:</th>
-              <th width="8%" style="text-align: center;"></th>
-              <th v-for="item in totalMData" width="6%" style="text-align: center;">{{ toThousands(item) }}</th>
-              <th width="6%" style="text-align: center;">{{ toThousands(totalData['COUNT_PRICE']) }}</th>
-            </tr>
-          </table>
-        </template>
-      </s-table>
-    </a-spin>
-    <!-- 导出提示框 -->
-    <reportModal :visible="showExport" @close="showExport=false"></reportModal>
-    <selectMonth ref="months" @ok="getDateValue"></selectMonth>
-  </a-card>
+    </a-card>
+    <!-- 列表 -->
+    <a-card>
+      <a-spin :spinning="spinning" tip="Loading...">
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :defaultLoadData="false"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :showPagination="false"
+          :data="loadData"
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ y: tableHeight-30}"
+          bordered>
+          <template slot="footer">
+            <table v-if="totalData">
+              <tr>
+                <th colspan="4" width="32%" style="text-align: right;">{{ totalData['PRODUCT_TYPE_NAME2'] }}汇总:</th>
+                <th width="8%" style="text-align: center;"></th>
+                <th v-for="item in totalMData" width="6%" style="text-align: center;">{{ toThousands(item) }}</th>
+                <th width="6%" style="text-align: center;">{{ toThousands(totalData['COUNT_PRICE']) }}</th>
+              </tr>
+            </table>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 导出提示框 -->
+      <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+      <selectMonth ref="months" @ok="getDateValue"></selectMonth>
+    </a-card>
+  </div>
 </template>
 
 <script>
@@ -123,7 +129,8 @@ export default {
         })
       },
       totalData: null,
-      totalMData: []
+      totalMData: [],
+      tableHeight: 0
     }
   },
   methods: {
@@ -226,7 +233,7 @@ export default {
           _this.getColumns()
           _this.$refs.table.refresh(true)
         } else {
-          _this.$message.error("请选择查询条件")
+          _this.$message.error('请选择查询条件')
           return false
         }
       })
@@ -278,6 +285,11 @@ export default {
     },
     pageInit () {
       this.getColumns()
+      this.setTableH()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 260
     }
   },
   mounted () {
@@ -298,5 +310,5 @@ export default {
 </script>
 
 <style style="less">
-   
+
 </style>

+ 56 - 33
src/views/reportData/hPriceDifferenceDetailReport/list.vue

@@ -1,8 +1,8 @@
 <template>
-  <a-card size="small" :bordered="false" class="hPriceDifferenceDetailList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
+  <div>
+    <a-card size="small" :bordered="false" class="hPriceDifferenceDetailList-wrap searchBottomSpace">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div class="table-page-search-wrapper" ref="tableSearch">
         <a-form-model
           id="hPriceDifferenceDetailList-form"
           ref="ruleForm"
@@ -44,7 +44,7 @@
                   <v-select code="BRAND_TYPE" id="hPriceDifferenceDetailList-brandType" v-model="queryParam.product.brandType" allowClear placeholder="请选择品牌分类"></v-select>
                 </a-form-model-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="5" :sm="24">
                 <a-form-model-item label="产品品牌">
                   <ProductBrand id="hPriceDifferenceDetailList-productBrandSn" v-model="queryParam.product.productBrandSn"></ProductBrand>
                 </a-form-model-item>
@@ -54,7 +54,7 @@
                   <ProductType id="hPriceDifferenceDetailList-productType" v-model="productType" @change="changeProductType"></ProductType>
                 </a-form-model-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="7" :sm="24">
                 <a-form-model-item label="所在区域">
                   <subarea id="hPriceDifferenceDetailList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
                 </a-form-model-item>
@@ -64,7 +64,7 @@
                   <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
                 </a-form-model-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="5" :sm="24">
                 <a-form-model-item label="省级区域">
                   <Area id="hPriceDifferenceDetailList-provinceSn" v-model="queryParam.dealer.provinceSn" placeholder="请选择省"></Area>
                 </a-form-model-item>
@@ -101,32 +101,37 @@
           </a-row>
         </a-form-model>
       </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.no"
-        rowKeyName="no"
-        :columns="columns"
-        :data="loadData"
-        :defaultLoadData="false"
-        :scroll="{ x: 1850 }"
-        bordered>
-        <template slot="footer">
-          <a-row :gutter="15">
-            <a-col :md="6" :sm="24" >分公司金额:{{ (totalData && (totalData.wholesalePrice1 || totalData.wholesalePrice1==0)) ? toThousands(totalData.wholesalePrice1) : '--' }}</a-col>
-            <a-col :md="6" :sm="24" >加盟商金额:{{ (totalData && (totalData.wholesalePrice2 || totalData.wholesalePrice2==0)) ? toThousands(totalData.wholesalePrice2) : '--' }}</a-col>
-            <a-col :md="6" :sm="24" >特约加盟店金额:{{ (totalData && (totalData.wholesalePrice3 || totalData.wholesalePrice3==0)) ? toThousands(totalData.wholesalePrice3) : '--' }}</a-col>
-            <a-col :md="6" :sm="24" >直接差价金额:{{ (totalData && (totalData.directRebateAmount || totalData.directRebateAmount==0)) ? toThousands(totalData.directRebateAmount) : '--' }}</a-col>
-            <a-col :md="6" :sm="24" >间接差价金额:{{ (totalData && (totalData.indirectRebateAmount || totalData.indirectRebateAmount==0)) ? toThousands(totalData.indirectRebateAmount) : '--' }}</a-col>
-          </a-row>
-        </template>
-      </s-table>
-    </a-spin>
-    <!-- 导出提示框 -->
-    <reportModal :visible="showExport" @close="showExport=false"></reportModal>
-  </a-card>
+    </a-card>
+    <!-- 列表 -->
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :columns="columns"
+          :data="loadData"
+          :defaultLoadData="false"
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ x: 1850 ,y: tableHeight-50 }"
+          bordered>
+          <template slot="footer">
+            <a-row :gutter="15">
+              <a-col :md="6" :sm="24" >分公司金额:{{ (totalData && (totalData.wholesalePrice1 || totalData.wholesalePrice1==0)) ? toThousands(totalData.wholesalePrice1) : '--' }}</a-col>
+              <a-col :md="6" :sm="24" >加盟商金额:{{ (totalData && (totalData.wholesalePrice2 || totalData.wholesalePrice2==0)) ? toThousands(totalData.wholesalePrice2) : '--' }}</a-col>
+              <a-col :md="6" :sm="24" >特约加盟店金额:{{ (totalData && (totalData.wholesalePrice3 || totalData.wholesalePrice3==0)) ? toThousands(totalData.wholesalePrice3) : '--' }}</a-col>
+              <a-col :md="6" :sm="24" >直接差价金额:{{ (totalData && (totalData.directRebateAmount || totalData.directRebateAmount==0)) ? toThousands(totalData.directRebateAmount) : '--' }}</a-col>
+              <a-col :md="6" :sm="24" >间接差价金额:{{ (totalData && (totalData.indirectRebateAmount || totalData.indirectRebateAmount==0)) ? toThousands(totalData.indirectRebateAmount) : '--' }}</a-col>
+            </a-row>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 导出提示框 -->
+      <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+    </a-card>
+  </div>
 </template>
 
 <script>
@@ -216,7 +221,8 @@ export default {
         { value: 'SALES', name: '采购差价' },
         { value: 'SALES_RETURN', name: '退货差价' }
       ],
-      totalData: null
+      totalData: null,
+      tableHeight: 0
     }
   },
   computed: {
@@ -251,6 +257,17 @@ export default {
       return arr
     }
   },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
   methods: {
     //  导出
     handleExport () {
@@ -349,17 +366,23 @@ export default {
       this.$refs.custList.resetForm()
       this.$refs.ruleForm.resetFields()
       this.$refs.table.clearTable()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 230
     }
   },
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
       this.resetSearchForm()
+      this.setTableH()
     }
   },
   activated () {
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
       this.resetSearchForm()
+      this.setTableH()
     }
   },
   beforeRouteEnter (to, from, next) {

+ 52 - 39
src/views/reportData/priceDifferenceDetailReport/list.vue

@@ -1,6 +1,6 @@
 <template>
-  <a-card size="small" :bordered="false" class="priceDifferenceDetailList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
+  <div>
+    <a-card size="small" :bordered="false" class="priceDifferenceDetailList-wrap searchBottomSpace">
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form-model
@@ -54,39 +54,45 @@
           </a-row>
         </a-form-model>
       </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.no"
-        rowKeyName="no"
-        :columns="columns"
-        :data="loadData"
-        :defaultLoadData="false"
-        bordered>
-        <template slot="footer">
-          <table>
-            <tr>
-              <td width="51%" colspan="4"></td>
-              <td width="8%">
-                <div>实售金额:{{ (totalData && (totalData.totalRealAmount || totalData.totalRealAmount==0)) ? toThousands(totalData.totalRealAmount) : '--' }}</div>
-              </td>
-              <td width="8%">
-                <div>开单金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? toThousands(totalData.totalAmount) : '--' }}</div>
-              </td>
-              <td width="8%">
-                <div>差价金额:{{ (totalData && (totalData.rebateAmount || totalData.rebateAmount==0)) ? toThousands(totalData.rebateAmount) : '--' }}</div>
-              </td>
-              <td width="25%" colspan="2"></td>
-            </tr>
-          </table>
-        </template>
-      </s-table>
-    </a-spin>
-    <!-- 导出提示框 -->
-    <reportModal :visible="showExport" @close="showExport=false"></reportModal>
-  </a-card>
+    </a-card>
+    <!-- 列表 -->
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :columns="columns"
+          :data="loadData"
+          :defaultLoadData="false"
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ y: tableHeight-50 }"
+          bordered>
+          <template slot="footer">
+            <table>
+              <tr>
+                <td width="51%" colspan="4"></td>
+                <td width="8%">
+                  <div>实售金额:{{ (totalData && (totalData.totalRealAmount || totalData.totalRealAmount==0)) ? toThousands(totalData.totalRealAmount) : '--' }}</div>
+                </td>
+                <td width="8%">
+                  <div>开单金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? toThousands(totalData.totalAmount) : '--' }}</div>
+                </td>
+                <td width="8%">
+                  <div>差价金额:{{ (totalData && (totalData.rebateAmount || totalData.rebateAmount==0)) ? toThousands(totalData.rebateAmount) : '--' }}</div>
+                </td>
+                <td width="25%" colspan="2"></td>
+              </tr>
+            </table>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 导出提示框 -->
+      <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+    </a-card>
+  </div>
 </template>
 
 <script>
@@ -146,7 +152,8 @@ export default {
           return data
         })
       },
-      totalData: null
+      totalData: null,
+      tableHeight: 0
     }
   },
   computed: {
@@ -160,9 +167,9 @@ export default {
         { title: '产品品牌+二级分类', dataIndex: 'productBrandAndType2', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '类型', dataIndex: 'bizType', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
-        arr.splice(4, 0, { title: '实售金额', dataIndex: 'totalRealAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(5, 0, { title: '开单金额', dataIndex: 'totalAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(6, 0, { title: '差价金额', dataIndex: 'rebateAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+      arr.splice(4, 0, { title: '实售金额', dataIndex: 'totalRealAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+      arr.splice(5, 0, { title: '开单金额', dataIndex: 'totalAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+      arr.splice(6, 0, { title: '差价金额', dataIndex: 'rebateAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       return arr
     }
   },
@@ -234,17 +241,23 @@ export default {
           return false
         }
       })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 230
     }
   },
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
       this.resetSearchForm()
+      this.setTableH()
     }
   },
   activated () {
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
       this.resetSearchForm()
+      this.setTableH()
     }
   },
   beforeRouteEnter (to, from, next) {

+ 123 - 123
src/views/reportData/productRebateReport/detailList.vue

@@ -1,114 +1,119 @@
 <template>
-  <a-spin :spinning="spinning" tip="Loading...">
-    <!-- 搜索条件 -->
-    <div ref="tableSearch" class="table-page-search-wrapper">
-      <a-form-model
-        id="rebateDetailReport-form"
-        ref="ruleForm"
-        class="form-model-con"
-        layout="inline"
-        :model="queryParam"
-        :rules="rules"
-        :labelCol="labelCol"
-        :wrapperCol="wrapperCol"
-        @keyup.enter.native="handleSearch" >
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="日期" prop="time">
-              <rangeDate ref="rangeDate" @change="dateChange" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="单号">
-              <a-input id="srebateReport-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入单号"/>
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="客户名称">
-              <dealerSearchList ref="dealer" id="srebateReport-buyerName" @change="dealerChange" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="直接绑定客户名称">
-              <dealerSearchList ref="directDealer" id="srebateReport-buyerName" @change="directDealerChange" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="间接绑定客户名称">
-              <dealerSearchList ref="indirectDealer" id="srebateReport-buyerName" @change="indirectDealerChange" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="类型">
-              <v-select
-                v-model="queryParam.bizType"
-                ref="bizType"
-                id="srebateReport-bizType"
-                code="REBATE_BILL_BIZ_TYPE"
-                placeholder="请选择类型"
-                allowClear></v-select>
-            </a-form-model-item>
-          </a-col>
-          <template v-if="advanced">
+  <div>
+    <a-card size="small" :bordered="false" class="searchBottomSpace">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form-model
+          id="rebateDetailReport-form"
+          ref="ruleForm"
+          class="form-model-con"
+          layout="inline"
+          :model="queryParam"
+          :rules="rules"
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          @keyup.enter.native="handleSearch" >
+          <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品品牌">
-                <ProductBrand id="rebateDetailReport-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
-              </a-form-item>
+              <a-form-model-item label="日期" prop="time">
+                <rangeDate ref="rangeDate" @change="dateChange" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="单号">
+                <a-input id="srebateReport-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入单号"/>
+              </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="产品分类">
-                <ProductType id="rebateDetailReport-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="queryParam.productType"></ProductType>
+              <a-form-model-item label="客户名称">
+                <dealerSearchList ref="dealer" id="srebateReport-buyerName" @change="dealerChange" />
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="产品编码">
-                <a-input id="rebateDetailReport-code" v-model.trim="queryParam.productEntity.code" allowClear placeholder="请输入产品编码"/>
+              <a-form-model-item label="直接绑定客户名称">
+                <dealerSearchList ref="directDealer" id="srebateReport-buyerName" @change="directDealerChange" />
               </a-form-model-item>
             </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="间接绑定客户名称">
+                <dealerSearchList ref="indirectDealer" id="srebateReport-buyerName" @change="indirectDealerChange" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="类型">
+                <v-select
+                  v-model="queryParam.bizType"
+                  ref="bizType"
+                  id="srebateReport-bizType"
+                  code="REBATE_BILL_BIZ_TYPE"
+                  placeholder="请选择类型"
+                  allowClear></v-select>
+              </a-form-model-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品品牌">
+                  <ProductBrand id="rebateDetailReport-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="产品分类">
+                  <ProductType id="rebateDetailReport-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="queryParam.productType"></ProductType>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="产品编码">
+                  <a-input id="rebateDetailReport-code" v-model.trim="queryParam.productEntity.code" allowClear placeholder="请输入产品编码"/>
+                </a-form-model-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+              <a-button type="primary" @click="handleSearch" :disabled="disabled" id="rebateDetailReport-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="rebateDetailReport-reset">重置</a-button>
+              <a-button
+                type="primary"
+                style="margin-left: 5px"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                v-if="$hasPermissions('M_salesReturnReportExport')"
+                class="button-warning"
+                id="rebateDetailReport-export-btn">导出</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 5px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'"/>
+              </a>
+            </a-col>
+          </a-row>
+        </a-form-model>
+      </div>
+    </a-card>
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ x: 2200,y: tableHeight-20 }"
+          :defaultLoadData="false"
+          bordered>
+          <template slot="footer">
+            <a-row type="flex" justify="end" :gutter="10">
+              <a-col flex="10%" >总开单金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? toThousands(totalData.totalAmount) : '--' }}</a-col>
+              <a-col flex="10%" >总实售金额:{{ (totalData && (totalData.totalRealAmount || totalData.totalRealAmount==0)) ? toThousands(totalData.totalRealAmount) : '--' }}</a-col>
+              <a-col flex="10%" >直接差价金额:{{ (totalData && (totalData.directRebateAmount || totalData.directRebateAmount==0)) ? toThousands(totalData.directRebateAmount) : '--' }}</a-col>
+              <a-col flex="10%" >间接差价金额:{{ (totalData && (totalData.indirectRebateAmount || totalData.indirectRebateAmount==0)) ? toThousands(totalData.indirectRebateAmount) : '--' }}</a-col>
+            </a-row>
           </template>
-          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="rebateDetailReport-refresh">查询</a-button>
-            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="rebateDetailReport-reset">重置</a-button>
-            <a-button
-              type="primary"
-              style="margin-left: 5px"
-              @click="handleExport"
-              :disabled="disabled"
-              :loading="exportLoading"
-              v-if="$hasPermissions('M_salesReturnReportExport')"
-              class="button-warning"
-              id="rebateDetailReport-export-btn">导出</a-button>
-            <a @click="advanced=!advanced" style="margin-left: 5px">
-              {{ advanced ? '收起' : '展开' }}
-              <a-icon :type="advanced ? 'up' : 'down'"/>
-            </a>
-          </a-col>
-        </a-row>
-      </a-form-model>
-    </div>
-
-    <!-- 列表 -->
-    <s-table
-      class="sTable fixPagination"
-      ref="table"
-      :style="{ height: tableHeight+114.5+'px' }"
-      size="small"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ y: tableHeight, x: 2200}"
-      :defaultLoadData="false"
-      bordered>·
-      <template slot="footer">
-        <a-row type="flex" justify="end" :gutter="10">
-          <a-col flex="10%" >总开单金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? toThousands(totalData.totalAmount) : '--' }}</a-col>
-          <a-col flex="10%" >总实售金额:{{ (totalData && (totalData.totalRealAmount || totalData.totalRealAmount==0)) ? toThousands(totalData.totalRealAmount) : '--' }}</a-col>
-          <a-col flex="10%" >直接差价金额:{{ (totalData && (totalData.directRebateAmount || totalData.directRebateAmount==0)) ? toThousands(totalData.directRebateAmount) : '--' }}</a-col>
-          <a-col flex="10%" >间接差价金额:{{ (totalData && (totalData.indirectRebateAmount || totalData.indirectRebateAmount==0)) ? toThousands(totalData.indirectRebateAmount) : '--' }}</a-col>
-        </a-row>
-      </template>
-    </s-table>
-  </a-spin>
+        </s-table>
+      </a-spin>
+    </a-card>
+  </div>
 </template>
 
 <script>
@@ -206,6 +211,17 @@ export default {
       return arr
     }
   },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
   methods: {
     // 合计
     getCount (params) {
@@ -282,26 +298,6 @@ export default {
       this.totalData = null
       this.$refs.table.clearTable()
     },
-    // 导出
-    handleExport () {
-      const _this = this
-      this.$refs.ruleForm.validate(valid => {
-        if (valid) {
-          const params = _this.queryParam
-          params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
-          _this.exportLoading = true
-          _this.spinning = true
-          reportSalesReturnDetailExport(params).then(res => {
-            downloadExcel(res, '销售退货明细报表')
-            _this.exportLoading = false
-            _this.spinning = false
-          })
-        } else {
-          console.log('error submit!!')
-          return false
-        }
-      })
-    },
     //  产品分类  change
     changeProductType (val, opt) {
       this.queryParam.productEntity.productTypeSn1 = val[0] ? val[0] : ''
@@ -311,11 +307,15 @@ export default {
     pageInit () {
       this.disabled = false
       this.spinning = false
-      this.setTableH()
+      this.setTableStartH()
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 380
+      this.tableHeight = window.innerHeight - tableSearchH - 265
+    },
+    setTableStartH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 360
     }
   },
   mounted () {

+ 2 - 2
src/views/reportData/productRebateReport/index.vue

@@ -6,10 +6,10 @@
         <a-tab-pane key="2" tab="返利明细报表" force-render></a-tab-pane>
       </a-tabs>
     </div>
-    <a-card size="small" :bordered="false">
+    <div>
       <report v-show="curTab==1"></report>
       <detailReport v-show="curTab==2"></detailReport>
-    </a-card>
+    </div>
   </div>
 </template>
 

+ 95 - 90
src/views/reportData/productRebateReport/list.vue

@@ -1,93 +1,98 @@
 <template>
-  <a-spin :spinning="spinning" tip="Loading...">
-    <!-- 搜索条件 -->
-    <div ref="tableSearch" class="table-page-search-wrapper">
-      <a-form-model
-        id="srebateReport-form"
-        ref="ruleForm"
-        class="form-model-con"
-        layout="inline"
-        :model="queryParam"
-        :rules="rules"
-        :labelCol="labelCol"
-        :wrapperCol="wrapperCol"
-        @keyup.enter.native="handleSearch" >
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="日期" prop="time">
-              <rangeDate ref="rangeDate" @change="dateChange" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="单号">
-              <a-input id="srebateReport-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入单号"/>
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="客户名称">
-              <dealerSearchList ref="dealer" id="srebateReport-buyerName" @change="dealerChange" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="直接绑定客户名称">
-              <dealerSearchList ref="directDealer" id="srebateReport-buyerName" @change="directDealerChange" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="间接绑定客户名称">
-              <dealerSearchList ref="indirectDealer" id="srebateReport-buyerName" @change="indirectDealerChange" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="类型">
-              <v-select
-                v-model="queryParam.bizType"
-                ref="bizType"
-                id="srebateReport-bizType"
-                code="REBATE_BILL_BIZ_TYPE"
-                placeholder="请选择类型"
-                allowClear></v-select>
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="srebateReport-refresh">查询</a-button>
-            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="srebateReport-reset">重置</a-button>
-            <a-button
-              type="primary"
-              style="margin-left: 5px"
-              @click="handleExport"
-              :disabled="disabled"
-              :loading="exportLoading"
-              v-if="$hasPermissions('M_salesReturnReportExport')"
-              class="button-warning"
-              id="srebateReport-export-btn">导出</a-button>
-          </a-col>
-        </a-row>
-      </a-form-model>
-    </div>
-
-    <!-- 列表 -->
-    <s-table
-      class="sTable fixPagination"
-      ref="table"
-      :style="{ height: tableHeight+114.5+'px' }"
-      size="small"
-      :scroll="{ y: tableHeight }"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :defaultLoadData="false"
-      bordered>
-      <template slot="footer">
-        <a-row type="flex" justify="end" :gutter="10">
-          <a-col flex="10%">总开单金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? toThousands(totalData.totalAmount) : '--' }}</a-col>
-          <a-col flex="10%">直接差价金额:{{ (totalData && (totalData.directRebate || totalData.directRebate==0)) ? toThousands(totalData.directRebate) : '--' }}</a-col>
-          <a-col flex="10%">间接差价金额:{{ (totalData && (totalData.indirectRebate || totalData.indirectRebate==0)) ? toThousands(totalData.indirectRebate) : '--' }}</a-col>
-          <a-col flex="10%">总实售价金额:{{ (totalData && (totalData.totalRealAmount || totalData.totalRealAmount==0)) ? toThousands(totalData.totalRealAmount) : '--' }}</a-col>
-        </a-row>
-      </template>
-    </s-table>
-  </a-spin>
+  <div>
+    <a-card size="small" :bordered="false" class="searchBottomSpace">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form-model
+          id="srebateReport-form"
+          ref="ruleForm"
+          class="form-model-con"
+          layout="inline"
+          :model="queryParam"
+          :rules="rules"
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          @keyup.enter.native="handleSearch" >
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="日期" prop="time">
+                <rangeDate ref="rangeDate" @change="dateChange" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="单号">
+                <a-input id="srebateReport-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入单号"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="客户名称">
+                <dealerSearchList ref="dealer" id="srebateReport-buyerName" @change="dealerChange" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="直接绑定客户名称">
+                <dealerSearchList ref="directDealer" id="srebateReport-buyerName" @change="directDealerChange" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="间接绑定客户名称">
+                <dealerSearchList ref="indirectDealer" id="srebateReport-buyerName" @change="indirectDealerChange" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="类型">
+                <v-select
+                  v-model="queryParam.bizType"
+                  ref="bizType"
+                  id="srebateReport-bizType"
+                  code="REBATE_BILL_BIZ_TYPE"
+                  placeholder="请选择类型"
+                  allowClear></v-select>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+              <a-button type="primary" @click="handleSearch" :disabled="disabled" id="srebateReport-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="srebateReport-reset">重置</a-button>
+              <a-button
+                type="primary"
+                style="margin-left: 5px"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                v-if="$hasPermissions('M_salesReturnReportExport')"
+                class="button-warning"
+                id="srebateReport-export-btn">导出</a-button>
+            </a-col>
+          </a-row>
+        </a-form-model>
+      </div>
+    </a-card>
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          size="small"
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ y: tableHeight-20 }"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :defaultLoadData="false"
+          bordered>
+          <template slot="footer">
+            <a-row type="flex" justify="end" :gutter="10">
+              <a-col flex="10%">总开单金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? toThousands(totalData.totalAmount) : '--' }}</a-col>
+              <a-col flex="10%">直接差价金额:{{ (totalData && (totalData.directRebate || totalData.directRebate==0)) ? toThousands(totalData.directRebate) : '--' }}</a-col>
+              <a-col flex="10%">间接差价金额:{{ (totalData && (totalData.indirectRebate || totalData.indirectRebate==0)) ? toThousands(totalData.indirectRebate) : '--' }}</a-col>
+              <a-col flex="10%">总实售价金额:{{ (totalData && (totalData.totalRealAmount || totalData.totalRealAmount==0)) ? toThousands(totalData.totalRealAmount) : '--' }}</a-col>
+            </a-row>
+          </template>
+        </s-table>
+      </a-spin>
+    </a-card>
+  </div>
 </template>
 
 <script>
@@ -255,7 +260,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 280
+      this.tableHeight = window.innerHeight - tableSearchH - 270
     }
   },
   mounted () {

+ 119 - 109
src/views/reportData/receivedSendStorageReport/index.vue

@@ -1,120 +1,127 @@
 <template>
-  <a-card size="small" :bordered="false" class="receivedSendStorageReport-wrap">
-    <div ref="tableSearch" class="table-page-search-wrapper newTableSearchName">
-      <a-form-model
-        layout="inline"
-        ref="ruleForm"
-        :rules="rules"
-        :model="form">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="选择周期" prop="time">
-              <div class="monthBox" style="display:flex;align-item:center;">
-                <a-month-picker
-                  :disabled-date="disabledStartDate"
-                  format="YYYY-MM"
-                  v-model="startValue"
-                  placeholder="开始月份"
-                  @openChange="handleStartOpenChange"
-                  @change="getStartDate"
-                />
-                <span>~</span>
-                <a-month-picker
-                  :disabled-date="disabledEndDate"
-                  format="YYYY-MM"
-                  v-model="endValue"
-                  placeholder="结束月份"
-                  :open="endOpen"
-                  @openChange="handleEndOpenChange"
-                  @change="getEndDate"
-                />
-              </div>
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="产品编码">
-              <a-input id="receivedSendStorageReport-queryWord" v-model.trim="queryParam.product.code" allowClear placeholder="请输入产品编码"/>
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="产品名称">
-              <a-input id="receivedSendStorageReport-name" v-model.trim="queryParam.product.name" allowClear placeholder="请输入产品名称"/>
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="产品品牌">
-              <ProductBrand id="receivedSendStorageReport-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="产品分类">
-              <productTypeAll placeholder="请选择产品分类" @change="changeProductType" v-model="productType" id="receivedSendStorageReport-productType"></productTypeAll>
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="仓库">
-              <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
-            </a-form-item>
-          </a-col>
-          <a-col :md="24" :sm="24" style="margin-bottom: 10px;display:flex;align-item:center;justify-content:center;">
-            <a-button type="primary" @click="testForm('search')" :disabled="disabled" id="receivedSendStorageReport-refresh">查询</a-button>
-            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="receivedSendStorageReport-reset">重置</a-button>
-            <a-button
-              style="margin-left: 5px"
-              type="primary"
-              class="button-warning"
-              @click="testForm('export')"
-              :disabled="disabled"
-              v-if="$hasPermissions('B_ProductPriceExoprt')"
-              id="productInfoList-export">导出</a-button>
-          </a-col>
-        </a-row>
-      </a-form-model>
-    </div>
-    <a-tabs default-active-key="1" @change="handleChange" :style="{ height: tableHeight+84.5+'px' }">
+  <div>
+    <a-card size="small" :bordered="false" class="receivedSendStorageReport-wrap searchBottomSpace">
+      <div ref="tableSearch" class="table-page-search-wrapper newTableSearchName">
+        <a-form-model
+          layout="inline"
+          ref="ruleForm"
+          :rules="rules"
+          :model="form">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="选择周期" prop="time">
+                <div class="monthBox" style="display:flex;align-item:center;">
+                  <a-month-picker
+                    :disabled-date="disabledStartDate"
+                    format="YYYY-MM"
+                    v-model="startValue"
+                    placeholder="开始月份"
+                    @openChange="handleStartOpenChange"
+                    @change="getStartDate"
+                  />
+                  <span>~</span>
+                  <a-month-picker
+                    :disabled-date="disabledEndDate"
+                    format="YYYY-MM"
+                    v-model="endValue"
+                    placeholder="结束月份"
+                    :open="endOpen"
+                    @openChange="handleEndOpenChange"
+                    @change="getEndDate"
+                  />
+                </div>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品编码">
+                <a-input id="receivedSendStorageReport-queryWord" v-model.trim="queryParam.product.code" allowClear placeholder="请输入产品编码"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品名称">
+                <a-input id="receivedSendStorageReport-name" v-model.trim="queryParam.product.name" allowClear placeholder="请输入产品名称"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品品牌">
+                <ProductBrand id="receivedSendStorageReport-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品分类">
+                <productTypeAll placeholder="请选择产品分类" @change="changeProductType" v-model="productType" id="receivedSendStorageReport-productType"></productTypeAll>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="仓库">
+                <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+              <a-button type="primary" @click="testForm('search')" :disabled="disabled" id="receivedSendStorageReport-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="receivedSendStorageReport-reset">重置</a-button>
+              <a-button
+                style="margin-left: 5px"
+                type="primary"
+                class="button-warning"
+                @click="testForm('export')"
+                :disabled="disabled"
+                v-if="$hasPermissions('B_ProductPriceExoprt')"
+                id="productInfoList-export">导出</a-button>
+            </a-col>
+          </a-row>
+        </a-form-model>
+      </div>
+    </a-card>
+    <a-tabs default-active-key="1" @change="handleChange" :tabBarStyle="{'background':'#fff'}">
       <a-tab-pane key="1" tab="明细">
         <!-- 列表 -->
-        <s-table
-          class="sTable"
-          ref="table"
-          size="small"
-          :rowKey="(record) => record.no"
-          rowKeyName="no"
-          :columns="columns"
-          :data="loadData"
-          :scroll="{ y: tableHeight-120 }"
-          :defaultLoadData="false"
-          bordered>
-          <template slot="footer">
-            <a-row>
-              <a-col span="2">合计:</a-col>
-              <a-col span="22">
-                <a-row>
-                  <a-col span="3">期初结存数量:{{ (totalData && (totalData.beginQty || totalData.beginQty==0)) ? totalData.beginQty : '--' }}</a-col>
-                  <!-- <a-col span="4">期初结存单价:{{ (totalData && (totalData.beginPrice || totalData.beginPrice==0)) ? toThousands(totalData.beginPrice) : '--' }}</a-col> -->
-                  <a-col span="3">期初结存金额:{{ (totalData && (totalData.beginAmount || totalData.beginAmount==0)) ? toThousands(totalData.beginAmount) : '--' }}</a-col>
-                  <a-col span="3">本期收入数量:{{ (totalData && (totalData.putQty || totalData.putQty==0)) ?totalData.putQty : '--' }}</a-col>
-                  <!-- <a-col span="4">本期收入单价:{{ (totalData && (totalData.putPrice || totalData.putPrice==0)) ? toThousands(totalData.putPrice) : '--' }}</a-col> -->
-                  <a-col span="3">本期收入金额:{{ (totalData && (totalData.putAmount || totalData.putAmount==0)) ? toThousands(totalData.putAmount) : '--' }}</a-col>
-                  <a-col span="3">本期发出数量:{{ (totalData && (totalData.outQty || totalData.outQty==0)) ? totalData.outQty : '--' }}</a-col>
-                  <!-- <a-col span="4">本期发出单价:{{ (totalData && (totalData.outPrice || totalData.outPrice==0)) ? toThousands(totalData.outPrice) : '--' }}</a-col> -->
-                  <a-col span="3">本期发出金额:{{ (totalData && (totalData.outAmount || totalData.outAmount==0)) ? toThousands(totalData.outAmount) : '--' }}</a-col>
-                  <a-col span="3">本期结存数量:{{ (totalData && (totalData.endQty || totalData.endQty==0)) ? totalData.endQty : '--' }}</a-col>
-                  <!-- <a-col span="4">本期结存单价:{{ (totalData && (totalData.endPrice || totalData.endPrice==0)) ? toThousands(totalData.endPrice) : '--' }}</a-col> -->
-                  <a-col span="3">本期结存金额:{{ (totalData && (totalData.endAmount || totalData.endAmount==0)) ? toThousands(totalData.endAmount) : '--' }}</a-col>
-                </a-row>
-              </a-col>
-            </a-row>
-          </template>
-        </s-table>
+        <a-card size="small" :bordered="false">
+          <s-table
+            class="sTable"
+            ref="table"
+            size="small"
+            :rowKey="(record) => record.no"
+            rowKeyName="no"
+            :columns="columns"
+            :data="loadData"
+            :style="{ height: tableHeight+84.5+'px' }"
+            :scroll="{ y: tableHeight-50 }"
+            :defaultLoadData="false"
+            bordered>
+            <template slot="footer">
+              <a-row>
+                <a-col span="2">合计:</a-col>
+                <a-col span="22">
+                  <a-row>
+                    <a-col span="3">期初结存数量:{{ (totalData && (totalData.beginQty || totalData.beginQty==0)) ? totalData.beginQty : '--' }}</a-col>
+                    <!-- <a-col span="4">期初结存单价:{{ (totalData && (totalData.beginPrice || totalData.beginPrice==0)) ? toThousands(totalData.beginPrice) : '--' }}</a-col> -->
+                    <a-col span="3">期初结存金额:{{ (totalData && (totalData.beginAmount || totalData.beginAmount==0)) ? toThousands(totalData.beginAmount) : '--' }}</a-col>
+                    <a-col span="3">本期收入数量:{{ (totalData && (totalData.putQty || totalData.putQty==0)) ?totalData.putQty : '--' }}</a-col>
+                    <!-- <a-col span="4">本期收入单价:{{ (totalData && (totalData.putPrice || totalData.putPrice==0)) ? toThousands(totalData.putPrice) : '--' }}</a-col> -->
+                    <a-col span="3">本期收入金额:{{ (totalData && (totalData.putAmount || totalData.putAmount==0)) ? toThousands(totalData.putAmount) : '--' }}</a-col>
+                    <a-col span="3">本期发出数量:{{ (totalData && (totalData.outQty || totalData.outQty==0)) ? totalData.outQty : '--' }}</a-col>
+                    <!-- <a-col span="4">本期发出单价:{{ (totalData && (totalData.outPrice || totalData.outPrice==0)) ? toThousands(totalData.outPrice) : '--' }}</a-col> -->
+                    <a-col span="3">本期发出金额:{{ (totalData && (totalData.outAmount || totalData.outAmount==0)) ? toThousands(totalData.outAmount) : '--' }}</a-col>
+                    <a-col span="3">本期结存数量:{{ (totalData && (totalData.endQty || totalData.endQty==0)) ? totalData.endQty : '--' }}</a-col>
+                    <!-- <a-col span="4">本期结存单价:{{ (totalData && (totalData.endPrice || totalData.endPrice==0)) ? toThousands(totalData.endPrice) : '--' }}</a-col> -->
+                    <a-col span="3">本期结存金额:{{ (totalData && (totalData.endAmount || totalData.endAmount==0)) ? toThousands(totalData.endAmount) : '--' }}</a-col>
+                  </a-row>
+                </a-col>
+              </a-row>
+            </template>
+          </s-table>
+        </a-card>
       </a-tab-pane>
       <a-tab-pane key="2" tab="汇总" force-render>
-        <gatherList ref="gatherBox" :tableHeight="tableHeight" :totalData="totalData" :queryParam="queryParam"></gatherList>
+        <a-card size="small" :bordered="false">
+          <gatherList ref="gatherBox" :tableHeight="tableHeight" :totalData="totalData" :queryParam="queryParam"></gatherList>
+        </a-card>
       </a-tab-pane>
     </a-tabs>
     <!-- 导出提示框 -->
     <reportModal :visible="showExport" @close="showExport=false"></reportModal>
-  </a-card>
+  </div>
 </template>
 
 <script>
@@ -327,7 +334,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 200
+      this.tableHeight = window.innerHeight - tableSearchH - 270
     }
   },
   mounted () {
@@ -354,4 +361,7 @@ export default {
       text-align:center;
     }
   }
+/deep/.ant-tabs-tabpane.ant-tabs-tabpane-active{
+  margin-top:-11px;
+}
 </style>

+ 2 - 1
src/views/reportData/receivedSendStorageReport/list.vue

@@ -10,7 +10,8 @@
       :columns="columns"
       :data="loadData"
       :showPagination="false"
-      :scroll="{ y: tableHeight-120 }"
+      :style="{ height: tableHeight+84.5+'px' }"
+      :scroll="{ y: tableHeight }"
       :defaultLoadData="false"
       bordered>
       <template slot="footer">

+ 78 - 62
src/views/reportData/regionTypeSalesReport/list.vue

@@ -1,85 +1,90 @@
 <template>
-  <a-card size="small">
+  <div>
     <a-spin :spinning="spinning" tip="Loading...">
-      <a-tabs v-model="activeKey" type="card" @change="callback">
+      <a-tabs v-model="activeKey" @change="callback" :tabBarStyle="{'background':'#fff'}">
         <a-tab-pane :key="item.id" :tab="item.name" v-for="item in tabsList">
         </a-tab-pane>
       </a-tabs>
-      <div class="table-page-search-wrapper newTableSearchName">
-        <a-form-model
-          id="returnGoodsPresentationList-form"
-          ref="ruleForm"
-          class="form-model-con"
-          layout="inline"
-          :rules="rules"
-          :model="queryParam"
-          @keyup.enter.native="handleSearch">
-          <a-row :gutter="15">
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="审核时间" prop="time">
-                <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange"/>
-              </a-form-model-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="销售状态" prop="salesStatusType">
-                <v-select
+      <a-card size="small" style="margin-bottom:15px;">
+        <div class="table-page-search-wrapper newTableSearchName" ref="tableSearch">
+          <a-form-model
+            id="returnGoodsPresentationList-form"
+            ref="ruleForm"
+            class="form-model-con"
+            layout="inline"
+            :rules="rules"
+            :model="queryParam"
+            @keyup.enter.native="handleSearch">
+            <a-row :gutter="15">
+              <a-col :md="5" :sm="24">
+                <a-form-model-item label="审核时间" prop="time">
+                  <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange"/>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-model-item label="销售状态" prop="salesStatusType">
+                  <v-select
                     v-model="queryParam.salesStatusType"
                     code="SALES_STATUS"
                     placeholder="请选择销售状态"
                     allowClear></v-select>
-              </a-form-model-item>
-            </a-col>
-            <a-col :md="6" :sm="24" v-if="activeKey==0">
-              <a-form-model-item label="所在区域">
-                <subarea id="returnGoodsPresentationList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
-              </a-form-model-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="5" :sm="24" v-if="activeKey==0">
+                <a-form-model-item label="所在区域">
+                  <subarea id="returnGoodsPresentationList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="5" :sm="24">
                 <a-form-model-item label="区域负责人">
-                    <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
+                  <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
                 </a-form-model-item>
               </a-col>
-            <!--  <template v-if="advanced && activeKey==0">
+              <!--  <template v-if="advanced && activeKey==0">
               <a-col :md="6" :sm="24">
                 <a-form-model-item prop="dealerProvinceSn" style="margin: 0;" label="地区">
                   <Area id="returnGoodsPresentationList-dealerProvinceSn" v-model="queryParam.dealerProvinceSn" placeholder="请选择省"></Area>
                 </a-form-model-item>
               </a-col>
             </template> -->
-            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-              <a-button type="primary" @click="handleSearch" :disabled="disabled" id="returnGoodsPresentationList-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="returnGoodsPresentationList-reset">重置</a-button>
-              <a-button
-                style="margin-left: 5px"
-                type="primary"
-                class="button-warning"
-                @click="handleExport"
-                :disabled="disabled"
-                :loading="exportLoading"
-                v-if="$hasPermissions('B_regionTypeSalesReportExport')"
-                id="returnGoodsPresentationList-export">导出</a-button>
-            </a-col>
-          </a-row>
-        </a-form-model>
-      </div>
+              <a-col :md="5" :sm="24" style="margin-bottom: 10px;">
+                <a-button type="primary" @click="handleSearch" :disabled="disabled" id="returnGoodsPresentationList-refresh">查询</a-button>
+                <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="returnGoodsPresentationList-reset">重置</a-button>
+                <a-button
+                  style="margin-left: 5px"
+                  type="primary"
+                  class="button-warning"
+                  @click="handleExport"
+                  :disabled="disabled"
+                  :loading="exportLoading"
+                  v-if="$hasPermissions('B_regionTypeSalesReportExport')"
+                  id="returnGoodsPresentationList-export">导出</a-button>
+              </a-col>
+            </a-row>
+          </a-form-model>
+        </div>
+      </a-card>
       <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :defaultLoadData="false"
-        :rowKey="(record) => record.no"
-        rowKeyName="no"
-        :columns="columns"
-        :data="loadData"
-        :showPagination="false"
-        :scroll="{ x: 1550 }"
-        bordered>
-      </s-table>
+      <a-card size="small">
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :defaultLoadData="false"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :columns="columns"
+          :data="loadData"
+          :showPagination="false"
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ x:1550,y: tableHeight}"
+          bordered>
+        </s-table>
+      </a-card>
     </a-spin>
     <!-- 导出提示框 -->
     <reportModal :visible="showExport" @close="showExport=false"></reportModal>
-  </a-card>
+  </div>
 </template>
 
 <script>
@@ -120,6 +125,7 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
+      tableHeight: 0,
       rules: {
         'time': [{ required: true, message: '请选择审核时间', trigger: 'change' }],
         'salesStatusType': [{ required: true, message: '请选择销售状态', trigger: 'change' }]
@@ -230,11 +236,11 @@ export default {
         if (item.customRender == 'amount') {
           mw = 15
           item.customRender = function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' }
-        }else{
+        } else {
           item.customRender = function (text) { return text || '--' }
         }
         const w = item.title.length * mw
-        const tw = w <= 80 ? mw*5 : w
+        const tw = w <= 80 ? mw * 5 : w
         item.width = tw + 'px'
         this.tableWidth = this.tableWidth + tw
       })
@@ -243,6 +249,11 @@ export default {
     pageInit () {
       this.activeKey = 0
       this.getTableTitle()
+      this.setTableH()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 280
     }
   },
   mounted () {
@@ -261,3 +272,8 @@ export default {
   }
 }
 </script>
+<style lang="less" scoped>
+  /deep/.ant-card.ant-card-bordered.ant-card-small{
+    margin-top:-12px !important;
+  }
+</style>

+ 70 - 48
src/views/reportData/returnGoodsPresentation/list.vue

@@ -1,8 +1,8 @@
 <template>
-  <a-card size="small" :bordered="false" class="returnGoodsPresentationList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
+  <div>
+    <a-card size="small" :bordered="false" class="returnGoodsPresentationList-wrap searchBottomSpace">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper newTableSearchName">
+      <div class="table-page-search-wrapper newTableSearchName" ref="tableSearch">
         <a-form-model
           id="returnGoodsPresentationList-form"
           ref="ruleForm"
@@ -34,13 +34,13 @@
                   allowClear></v-select>
               </a-form-model-item>
             </a-col>
-            
+
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
-              <a-form-model-item label="退货单号">
-                <a-input id="returnGoodsPresentationList-salesReturnBillNo" v-model.trim="queryParam.salesReturnBillNo" allowClear placeholder="请输入退货单号"/>
-              </a-form-model-item>
-            </a-col>
+                <a-form-model-item label="退货单号">
+                  <a-input id="returnGoodsPresentationList-salesReturnBillNo" v-model.trim="queryParam.salesReturnBillNo" allowClear placeholder="请输入退货单号"/>
+                </a-form-model-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="所在区域">
                   <subarea id="returnGoodsPresentationList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
@@ -48,7 +48,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="区域负责人">
-                    <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
+                  <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -77,43 +77,48 @@
           </a-row>
         </a-form-model>
       </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :defaultLoadData="false"
-        :rowKey="(record) => record.no"
-        rowKeyName="no"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 2370 }"
-        bordered>
-        <template slot="footer" v-if="countLabel.length||countBrandLabel.length">
-          <a-row>
-            <a-col span="2">合计:</a-col>
-            <a-col span="22">
-              <a-row>
-                <a-col span="4" v-for="item in countLabel" :key="item.key">
-                  {{ item.title }}:{{ totalData?(totalData[item.dataIndex]||totalData[item.dataIndex]==0)?toThousands(totalData[item.dataIndex]):'--':'--' }}
-                </a-col>
-              </a-row>
-              <a-row>
-                <a-col span="24" style="padding:8px;"></a-col>
-              </a-row>
-              <a-row>
-                <a-col span="4" v-for="item in countBrandLabel" :key="item.key">
-                  {{ item.title }}:{{ totalData?(totalData[item.dataIndex] ||totalData[item.dataIndex]==0)?toThousands(totalData[item.dataIndex]):'--':'--' }}
-                </a-col>
-              </a-row>
-            </a-col>
-          </a-row>
-        </template>
-      </s-table>
-    </a-spin>
-    <!-- 导出提示框 -->
-    <reportModal :visible="showExport" @close="showExport=false"></reportModal>
-  </a-card>
+    </a-card>
+    <!-- 列表 -->
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :defaultLoadData="false"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :columns="columns"
+          :data="loadData"
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ x:2370,y: tableHeight-134}"
+          bordered>
+          <template slot="footer" v-if="countLabel.length||countBrandLabel.length">
+            <a-row>
+              <a-col span="2">合计:</a-col>
+              <a-col span="22">
+                <a-row>
+                  <a-col span="4" v-for="item in countLabel" :key="item.key">
+                    {{ item.title }}:{{ totalData?(totalData[item.dataIndex]||totalData[item.dataIndex]==0)?toThousands(totalData[item.dataIndex]):'--':'--' }}
+                  </a-col>
+                </a-row>
+                <a-row>
+                  <a-col span="24" style="padding:8px;"></a-col>
+                </a-row>
+                <a-row>
+                  <a-col span="4" v-for="item in countBrandLabel" :key="item.key">
+                    {{ item.title }}:{{ totalData?(totalData[item.dataIndex] ||totalData[item.dataIndex]==0)?toThousands(totalData[item.dataIndex]):'--':'--' }}
+                  </a-col>
+                </a-row>
+              </a-col>
+            </a-row>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 导出提示框 -->
+      <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+    </a-card>
+  </div>
 </template>
 
 <script>
@@ -154,6 +159,7 @@ export default {
           'dealerLevel': undefined
         }
       },
+      tableHeight: 0,
       columns: [],
       countLabel: [],
       countBrandLabel: [],
@@ -185,6 +191,17 @@ export default {
       totalData: null
     }
   },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
   methods: {
     //  导出
     handleExport () {
@@ -290,11 +307,11 @@ export default {
         if (item.customRender == 'amount') {
           mw = 15
           item.customRender = function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' }
-        }else{
+        } else {
           item.customRender = function (text) { return text || '--' }
         }
         const w = item.title.length * mw
-        const tw = w <= 80 ? mw*5 : w
+        const tw = w <= 80 ? mw * 5 : w
         item.width = tw + 'px'
         this.tableWidth = this.tableWidth + tw
       })
@@ -302,6 +319,11 @@ export default {
     },
     pageInit () {
       this.getTableTitle()
+      this.setTableH()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 230
     }
   },
   mounted () {

+ 83 - 60
src/views/reportData/salesPresentation/list.vue

@@ -1,8 +1,8 @@
 <template>
-  <a-card size="small" :bordered="false" class="salesPresentationList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
+  <div>
+    <a-card size="small" :bordered="false" class="salesPresentationList-wrap searchBottomSpace">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper newTableSearchName">
+      <div class="table-page-search-wrapper newTableSearchName" ref="tableSearch">
         <a-form-model
           id="salesPresentationList-form"
           ref="ruleForm"
@@ -33,13 +33,13 @@
                   allowClear></v-select>
               </a-form-model-item>
             </a-col>
-            
+
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
-              <a-form-model-item label="销售单号">
-                <a-input id="salesPresentationList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
-              </a-form-model-item>
-            </a-col>
+                <a-form-model-item label="销售单号">
+                  <a-input id="salesPresentationList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
+                </a-form-model-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="所在区域">
                   <subarea id="salesPresentationList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
@@ -47,7 +47,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="区域负责人">
-                    <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
+                  <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -76,43 +76,48 @@
           </a-row>
         </a-form-model>
       </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :defaultLoadData="false"
-        :rowKey="(record) => record.no"
-        rowKeyName="no"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 2370 }"
-        bordered>
-        <template slot="footer" v-if="countLabel.length||countBrandLabel.length">
-          <a-row>
-            <a-col span="2">合计:</a-col>
-            <a-col span="22">
-              <a-row>
-                <a-col span="4" v-for="item in countLabel" :key="item.key">
-                  {{ item.title }}:{{ totalData?(totalData[item.dataIndex]||totalData[item.dataIndex]==0)?toThousands(totalData[item.dataIndex]):'--':'--' }}
-                </a-col>
-              </a-row>
-              <a-row>
-                <a-col span="24" style="padding:8px;"></a-col>
-              </a-row>
-              <a-row>
-                <a-col span="4" v-for="item in countBrandLabel" :key="item.key">
-                  {{ item.title }}:{{ totalData?(totalData[item.dataIndex] ||totalData[item.dataIndex]==0)?toThousands(totalData[item.dataIndex]):'--':'--' }}
-                </a-col>
-              </a-row>
-            </a-col>
-          </a-row>
-        </template>
-      </s-table>
-    </a-spin>
-    <!-- 导出提示框 -->
-    <reportModal :visible="showExport" @close="showExport=false"></reportModal>
-  </a-card>
+    </a-card>
+    <!-- 列表 -->
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :defaultLoadData="false"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :columns="columns"
+          :data="loadData"
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ x:2370,y: tableHeight-134}"
+          bordered>
+          <template slot="footer" v-if="countLabel.length||countBrandLabel.length">
+            <a-row>
+              <a-col span="2">合计:</a-col>
+              <a-col span="22">
+                <a-row>
+                  <a-col span="4" v-for="item in countLabel" :key="item.key">
+                    {{ item.title }}:{{ totalData?(totalData[item.dataIndex]||totalData[item.dataIndex]==0)?toThousands(totalData[item.dataIndex]):'--':'--' }}
+                  </a-col>
+                </a-row>
+                <a-row>
+                  <a-col span="24" style="padding:8px;"></a-col>
+                </a-row>
+                <a-row>
+                  <a-col span="4" v-for="item in countBrandLabel" :key="item.key">
+                    {{ item.title }}:{{ totalData?(totalData[item.dataIndex] ||totalData[item.dataIndex]==0)?toThousands(totalData[item.dataIndex]):'--':'--' }}
+                  </a-col>
+                </a-row>
+              </a-col>
+            </a-row>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 导出提示框 -->
+      <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+    </a-card>
+  </div>
 </template>
 
 <script>
@@ -140,10 +145,10 @@ export default {
         beginDate: '',
         endDate: '',
         salesBillNo: '',
-        'subareaArea':{
-            'subareaSn': undefined,
-            'subareaAreaSn': undefined,
-            'bizUserSn': undefined
+        'subareaArea': {
+          'subareaSn': undefined,
+          'subareaAreaSn': undefined,
+          'bizUserSn': undefined
         },
         dealer: {
           'dealerSn': undefined,
@@ -155,12 +160,13 @@ export default {
       },
       columns: [],
       countLabel: [],
-      countBrandLabel:[],
+      countBrandLabel: [],
       rules: {
         'time': [{ required: true, message: '请选择备货销售日期', trigger: 'change' }]
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
+      tableHeight: 0,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -184,6 +190,17 @@ export default {
       totalData: null
     }
   },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
   methods: {
     //  导出
     handleExport () {
@@ -240,7 +257,7 @@ export default {
     custChange (val) {
       this.queryParam.dealer.dealerSn = val.key
     },
-    subareaChange(val){
+    subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
     },
@@ -252,10 +269,10 @@ export default {
       this.queryParam.endDate = ''
       this.queryParam.salesBillNo = ''
       this.queryParam.subareaArea = {
-          'subareaSn': undefined,
-          'subareaAreaSn': undefined,
-          'bizUserSn': undefined
-         }
+        'subareaSn': undefined,
+        'subareaAreaSn': undefined,
+        'bizUserSn': undefined
+      }
       this.queryParam.dealer = {
         'dealerSn': undefined,
         'provinceSn': undefined,
@@ -282,33 +299,39 @@ export default {
       const _this = this
       const tableTitle = await salesXsjdReportTitle().then(res => res.data)
       this.columns = tableTitle.list
-      this.countLabel = tableTitle.count.filter(item => item.title.indexOf('品牌')<0)
-      this.countBrandLabel = tableTitle.count.filter(item => item.title.indexOf('品牌')>=0)
+      this.countLabel = tableTitle.count.filter(item => item.title.indexOf('品牌') < 0)
+      this.countBrandLabel = tableTitle.count.filter(item => item.title.indexOf('品牌') >= 0)
       this.columns.map(item => {
         let mw = 20
         if (item.customRender == 'amount') {
           mw = 15
           item.customRender = function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' }
-        }else{
+        } else {
           item.customRender = function (text) { return text || '--' }
         }
         const w = item.title.length * mw
-        const tw = w <= 80 ? mw*5 : w
+        const tw = w <= 80 ? mw * 5 : w
         item.width = tw + 'px'
         this.tableWidth = this.tableWidth + tw
       })
       this.resetSearchForm()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 230
     }
   },
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
       this.getTableTitle()
+      this.setTableH()
     }
   },
   activated () {
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
       this.getTableTitle()
+      this.setTableH()
     }
   },
   beforeRouteEnter (to, from, next) {

+ 63 - 41
src/views/reportData/warehousingOrder/list.vue

@@ -1,8 +1,8 @@
 <template>
-  <a-card size="small" :bordered="false" class="warehousingOrderList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
+  <div>
+    <a-card size="small" :bordered="false" class="warehousingOrderList-wrap searchBottomSpace">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div class="table-page-search-wrapper" ref="tableSearch">
         <a-form-model
           id="warehousingOrderList-form"
           ref="ruleForm"
@@ -12,23 +12,23 @@
           :rules="rules"
           @keyup.enter.native="handleSearch">
           <a-row :gutter="15">
-            <a-col :md="6" :sm="24">
+            <a-col :md="7" :sm="24">
               <a-form-model-item label="完成日期" prop="time">
                 <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
               </a-form-model-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="5" :sm="24">
               <a-form-model-item label="入库单号">
                 <a-input id="warehousingOrderList-stockPutNo" v-model.trim="queryParam.stockPutNo" allowClear placeholder="请输入入库单号"/>
               </a-form-model-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="5" :sm="24">
               <a-form-model-item label="单位名称">
                 <a-input id="warehousingOrderList-supplierName" v-model.trim="queryParam.supplierName" allowClear placeholder="请输入单位名称"/>
               </a-form-model-item>
             </a-col>
             <template v-if="advanced">
-              <a-col :md="6" :sm="24">
+              <a-col :md="7" :sm="24">
                 <a-form-model-item label="入库类型">
                   <v-select
                     v-model="queryParam.putBizType"
@@ -39,7 +39,7 @@
                     allowClear></v-select>
                 </a-form-model-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="7" :sm="24">
                 <a-form-model-item label="散件入库子类型">
                   <v-select
                     v-model="queryParam.sparePartsType"
@@ -50,13 +50,13 @@
                     allowClear></v-select>
                 </a-form-model-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="5" :sm="24">
                 <a-form-model-item label="入库仓库">
                   <chooseWarehouse ref="warehouse" isPermission v-model="queryParam.warehouseSn"></chooseWarehouse>
                 </a-form-model-item>
               </a-col>
             </template>
-            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-col :md="7" :sm="24" style="margin-bottom: 10px;">
               <a-button
                 type="primary"
                 class="button-info"
@@ -82,34 +82,40 @@
           </a-row>
         </a-form-model>
       </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.no"
-        rowKeyName = 'no'
-        :columns="columns"
-        :data="loadData"
-        :defaultLoadData="false"
-        bordered>
-        <template slot="footer">
-          <a-row :gutter="15">
-            <a-col :md="2" :sm="24">
-            </a-col>
-            <a-col :md="4" :sm="24">
-              总数量:{{ (totalData && (totalData.productTotalQty || totalData.productTotalQty==0)) ? totalData.productTotalQty : '--' }}
-            </a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_warehousingOrderList_costPrice')">
-              总金额:{{ (totalData && (totalData.productTotalCost || totalData.productTotalCost==0)) ? toThousands(totalData.productTotalCost) : '--' }}
-            </a-col>
-          </a-row>
-        </template>
-      </s-table>
-    </a-spin>
-    <!-- 导出提示框 -->
-    <reportModal :visible="showExport" @close="showExport=false"></reportModal>
-  </a-card>
+    </a-card>
+    <!-- 列表 -->
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :columns="columns"
+          :data="loadData"
+          :defaultLoadData="false"
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ y: tableHeight-30}"
+          bordered>
+          <template slot="footer">
+            <a-row :gutter="15">
+              <a-col :md="2" :sm="24">
+              </a-col>
+              <a-col :md="4" :sm="24">
+                总数量:{{ (totalData && (totalData.productTotalQty || totalData.productTotalQty==0)) ? totalData.productTotalQty : '--' }}
+              </a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_warehousingOrderList_costPrice')">
+                总金额:{{ (totalData && (totalData.productTotalCost || totalData.productTotalCost==0)) ? toThousands(totalData.productTotalCost) : '--' }}
+              </a-col>
+            </a-row>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 导出提示框 -->
+      <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+    </a-card>
+  </div>
 </template>
 
 <script>
@@ -188,6 +194,17 @@ export default {
       return arr
     }
   },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
   methods: {
     // 盘点库存日期
     handleStock () {
@@ -264,19 +281,24 @@ export default {
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
     },
-    pageInit () {}
+    pageInit () {
+      this.setTableH()
+      this.resetSearchForm()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 230
+    }
   },
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
       this.pageInit()
-      this.resetSearchForm()
     }
   },
   activated () {
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
       this.pageInit()
-      this.resetSearchForm()
     }
   },
   beforeRouteEnter (to, from, next) {

+ 66 - 44
src/views/reportData/warehousingOrderDetail/list.vue

@@ -1,8 +1,8 @@
 <template>
-  <a-card size="small" :bordered="false" class="warehousingOrderDetailList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
+  <div>
+    <a-card size="small" :bordered="false" class="warehousingOrderDetailList-wrap searchBottomSpace">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div class="table-page-search-wrapper" ref="tableSearch">
         <a-form-model
           id="warehousingOrderDetailList-form"
           ref="ruleForm"
@@ -34,22 +34,22 @@
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-                <a-form-model-item label="散件入库子类型">
-                  <v-select
-                    v-model="queryParam.sparePartsType"
-                    ref="sparePartsType"
-                    id="warehousingOrderDetailList-sparePartsType"
-                    code="SPARE_PARTS_TYPE"
-                    placeholder="请选择散件入库子类型"
-                    allowClear></v-select>
-                </a-form-model-item>
-              </a-col>
+              <a-form-model-item label="散件入库子类型">
+                <v-select
+                  v-model="queryParam.sparePartsType"
+                  ref="sparePartsType"
+                  id="warehousingOrderDetailList-sparePartsType"
+                  code="SPARE_PARTS_TYPE"
+                  placeholder="请选择散件入库子类型"
+                  allowClear></v-select>
+              </a-form-model-item>
+            </a-col>
+            <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="入库仓库">
                   <chooseWarehouse ref="warehouse" isPermission v-model="queryParam.warehouseSn"></chooseWarehouse>
                 </a-form-model-item>
               </a-col>
-            <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="单位名称">
                   <a-input id="warehousingOrderDetailList-supplierName" v-model.trim="queryParam.supplierName" allowClear placeholder="请输入单位名称"/>
@@ -66,7 +66,7 @@
                 </a-form-model-item>
               </a-col>
             </template>
-            <a-col :md="8" :sm="24" style="margin-bottom: 10px;">
+            <a-col :md="24" :sm="24" style="margin-bottom: 10px;text-align:center;">
               <a-button
                 type="primary"
                 class="button-info"
@@ -92,32 +92,38 @@
           </a-row>
         </a-form-model>
       </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.no"
-        rowKeyName = 'no'
-        :columns="columns"
-        :data="loadData"
-        :defaultLoadData="false"
-        bordered>
-        <template slot="footer">
-          <a-row :gutter="15">
-            <a-col :md="4" :sm="24">
-              总数量:{{ (totalData && (totalData.totalPutQty || totalData.totalPutQty==0)) ? totalData.totalPutQty : '--' }}
-            </a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_warehousingOrderDetailList_costPrice')">
-              总金额:{{ (totalData && (totalData.totalPutAmount || totalData.totalPutAmount==0)) ? totalData.totalPutAmount : '--' }}
-            </a-col>
-          </a-row>
-        </template>
-      </s-table>
-    </a-spin>
-    <!-- 导出提示框 -->
-    <reportModal :visible="showExport" @close="showExport=false"></reportModal>
-  </a-card>
+    </a-card>
+    <!-- 列表 -->
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :columns="columns"
+          :data="loadData"
+          :defaultLoadData="false"
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ x:1890,y: tableHeight-34}"
+          bordered>
+          <template slot="footer">
+            <a-row :gutter="15">
+              <a-col :md="4" :sm="24">
+                总数量:{{ (totalData && (totalData.totalPutQty || totalData.totalPutQty==0)) ? totalData.totalPutQty : '--' }}
+              </a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_warehousingOrderDetailList_costPrice')">
+                总金额:{{ (totalData && (totalData.totalPutAmount || totalData.totalPutAmount==0)) ? totalData.totalPutAmount : '--' }}
+              </a-col>
+            </a-row>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 导出提示框 -->
+      <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+    </a-card>
+  </div>
 </template>
 
 <script>
@@ -203,6 +209,17 @@ export default {
       return arr
     }
   },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
   methods: {
     // 盘点库存日期
     handleStock () {
@@ -280,19 +297,24 @@ export default {
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
     },
-    pageInit () {}
+    pageInit () {
+      this.resetSearchForm()
+      this.setTableH()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 230
+    }
   },
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
       this.pageInit()
-      this.resetSearchForm()
     }
   },
   activated () {
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
       this.pageInit()
-      this.resetSearchForm()
     }
   },
   beforeRouteEnter (to, from, next) {