Bläddra i källkod

开单下退单报表样式修改

chenrui 1 år sedan
förälder
incheckning
24f26d7694

+ 54 - 33
src/views/reportData/allocationDetails/list.vue

@@ -1,8 +1,8 @@
 <template>
-  <a-card size="small" :bordered="false" class="allocationDetailsList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
+  <div>
+    <a-card size="small" :bordered="false" class="allocationDetailsList-wrap searchBottomSpace">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div class="table-page-search-wrapper" ref="tableSearch">
         <a-form-model
           id="allocationDetailsList-form"
           ref="ruleForm"
@@ -115,30 +115,35 @@
           </a-row>
         </a-form-model>
       </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :defaultLoadData="false"
-        :scroll="{ x: 2610 }"
-        bordered>
-        <template slot="footer">
-          <a-row :gutter="15">
-            <a-col :md="4" :sm="24">总数量:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_allocationDetailsList_costPrice')">总成本价:{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? toThousands(totalData.totalCost) : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_allocationDetailsList_salesPrice')&&$hasPermissions('M_allocationDetailsList_costPrice')">总毛利:{{ (totalData && (totalData.totalGrossProfit || totalData.totalGrossProfit==0)) ? toThousands(totalData.totalGrossProfit) : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_allocationDetailsList_salesPrice')">总售价:{{ (totalData && (totalData.totalPrice || totalData.totalPrice==0)) ? toThousands(totalData.totalPrice) : '--' }}</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" class="allocationDetailsList-wrap">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :defaultLoadData="false"
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ x: 2610 ,y: tableHeight-40 }"
+          bordered>
+          <template slot="footer">
+            <a-row :gutter="15">
+              <a-col :md="4" :sm="24">总数量:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_allocationDetailsList_costPrice')">总成本价:{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? toThousands(totalData.totalCost) : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_allocationDetailsList_salesPrice')&&$hasPermissions('M_allocationDetailsList_costPrice')">总毛利:{{ (totalData && (totalData.totalGrossProfit || totalData.totalGrossProfit==0)) ? toThousands(totalData.totalGrossProfit) : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_allocationDetailsList_salesPrice')">总售价:{{ (totalData && (totalData.totalPrice || totalData.totalPrice==0)) ? toThousands(totalData.totalPrice) : '--' }}</a-col>
+            </a-row>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 导出提示框 -->
+      <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+    </a-card>
+  </div>
 </template>
 
 <script>
@@ -190,7 +195,7 @@ export default {
         productTypeSn3: '', //  产品三级分类
         dealerName: '',
         dealerLevel: undefined,
-        subareaArea:{
+        subareaArea: {
           subareaSn: undefined,
           subareaAreaSn: undefined
         },
@@ -264,7 +269,7 @@ export default {
         { title: '产品名称', dataIndex: 'productName', width: 260, align: 'left', sorter: true, customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品编码', dataIndex: 'productCode', width: 150, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
         { title: '调拨数量', dataIndex: 'qty', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'productUnit', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单位', dataIndex: 'productUnit', width: 50, align: 'center', customRender: function (text) { return text || '--' } }
         // { title: '成本价', dataIndex: 'cost', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '售价', dataIndex: 'price', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '总成本价', dataIndex: 'totalCost', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -279,7 +284,7 @@ export default {
       if (this.$hasPermissions('M_allocationDetailsList_costPrice')) { //  成本价权限
         arr.push({ title: '总成本价', dataIndex: 'totalCost', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
         if (this.$hasPermissions('M_allocationDetailsList_salesPrice')) {
-         arr.push({ title: '毛利', dataIndex: 'grossProfit', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+          arr.push({ title: '毛利', dataIndex: 'grossProfit', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
         }
       }
       arr = arr.concat([
@@ -295,6 +300,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 () {
@@ -333,12 +349,12 @@ export default {
         if (valid) {
           _this.$refs.table.refresh(true)
         } else {
-          _this.$message.error("请选择调拨开单日期")
+          _this.$message.error('请选择调拨开单日期')
           return false
         }
       })
     },
-    subareaChange(val){
+    subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
     },
@@ -371,7 +387,7 @@ export default {
       this.queryParam.warehouseSn = undefined
       this.productType = []
       this.allocateTypeVal = []
-      if(this.advanced){
+      if (this.advanced) {
         this.$refs.subarea.clearData()
       }
       this.$refs.ruleForm.resetFields()
@@ -429,6 +445,11 @@ export default {
       this.getAllocateTypeAllList()
       this.getUserList()
       this.resetSearchForm()
+      this.setTableH()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 230
     }
   },
   mounted () {

+ 57 - 49
src/views/reportData/allocationOrderTotal/list.vue

@@ -1,8 +1,8 @@
 <template>
-  <a-card size="small" :bordered="false" class="allocationOrderTotalList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
+  <div>
+    <a-card size="small" :bordered="false" class="allocationOrderTotalList-wrap searchBottomSpace">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div class="table-page-search-wrapper" ref="tableSearch">
         <a-form-model
           id="allocationOrderTotalList-form"
           ref="ruleForm"
@@ -14,17 +14,17 @@
           :wrapperCol="wrapperCol"
           @keyup.enter.native="handleSearch" >
           <a-row :gutter="15">
-            <a-col :md="7" :sm="24">
+            <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="5" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-model-item label="调拨单号">
                 <a-input id="allocationOrderTotalList-allocateNo" v-model.trim="queryParam.allocateNo" allowClear placeholder="请输入调拨单号"/>
               </a-form-model-item>
             </a-col>
-            <a-col :md="5" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-model-item label="操作员">
                 <a-select
                   id="allocationOrderTotalList-creatorId"
@@ -38,14 +38,12 @@
                 </a-select>
               </a-form-model-item>
             </a-col>
-            <template v-if="advanced">
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="费用/调拨类型">
-                  <AllocateType id="allocationDetailsList-allocateTypeSn" v-model="allocateTypeVal" :changeOnSelect="true" placeholder="请选择费用/调拨类型" @change="changeAllocatype"></AllocateType>
-                </a-form-model-item>
-              </a-col>
-            </template>
-            <a-col :md="7" :sm="24" style="margin-bottom: 10px;">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="费用/调拨类型">
+                <AllocateType id="allocationDetailsList-allocateTypeSn" v-model="allocateTypeVal" :changeOnSelect="true" placeholder="请选择费用/调拨类型" @change="changeAllocatype"></AllocateType>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="24" :sm="24" style="margin-bottom: 10px;text-align:center;">
               <a-button
                 type="primary"
                 class="button-info"
@@ -54,40 +52,42 @@
                 id="allocationOrderTotalList-stockDate">盘点区间日期</a-button>
               <a-button style="margin-left: 5px" type="primary" @click="handleSearch" :disabled="disabled" id="allocationOrderTotalList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="allocationOrderTotalList-reset">重置</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 5px">
-                {{ advanced ? '收起' : '展开' }}
-                <a-icon :type="advanced ? 'up' : 'down'"/>
-              </a>
             </a-col>
           </a-row>
         </a-form-model>
       </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :defaultLoadData="false"
-        bordered>
-        <template slot="footer">
-          <table>
-            <tr>
-              <td style="width:15%"></td>
-              <td style="width:15%"></td>
-              <td style="width:20%"></td>
-              <td style="width:12%;text-align: center;">总数量:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</td>
-              <td style="width:12%;text-align: right;"><span v-if="$hasPermissions('M_allocationOrderTotalList_costPrice')">总成本价:{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? toThousands(totalData.totalCost) : '--' }}</span></td>
-              <td style="width:12%;text-align: right;"><span v-if="$hasPermissions('M_allocationOrderTotalList_costPrice')">总毛利:{{ (totalData && (totalData.totalGrossProfit || totalData.totalGrossProfit==0)) ? toThousands(totalData.totalGrossProfit) : '--' }}</span></td>
-              <td style="width:14%"></td>
-            </tr>
-          </table>
-        </template>
-      </s-table>
-    </a-spin>
-  </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.id"
+          :columns="columns"
+          :data="loadData"
+          :defaultLoadData="false"
+          bordered
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ y: tableHeight - 20 }">
+          <template slot="footer">
+            <table>
+              <tr>
+                <td style="width:15%"></td>
+                <td style="width:15%"></td>
+                <td style="width:20%"></td>
+                <td style="width:12%;text-align: center;">总数量:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</td>
+                <td style="width:12%;text-align: right;"><span v-if="$hasPermissions('M_allocationOrderTotalList_costPrice')">总成本价:{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? toThousands(totalData.totalCost) : '--' }}</span></td>
+                <td style="width:12%;text-align: right;"><span v-if="$hasPermissions('M_allocationOrderTotalList_costPrice')">总毛利:{{ (totalData && (totalData.totalGrossProfit || totalData.totalGrossProfit==0)) ? toThousands(totalData.totalGrossProfit) : '--' }}</span></td>
+                <td style="width:14%"></td>
+              </tr>
+            </table>
+          </template>
+        </s-table>
+      </a-spin>
+    </a-card>
+  </div>
 </template>
 
 <script>
@@ -106,7 +106,6 @@ export default {
   data () {
     return {
       spinning: false,
-      advanced: true, // 高级搜索 展开/关闭
       allocateTypeVal: [],
       queryParam: { //  查询条件
         time: [
@@ -151,7 +150,8 @@ export default {
       },
       allocateTypeList: [], //  调拨类型
       operatorList: [], //  操作员下拉数据
-      totalData: null //  合计
+      totalData: null, //  合计
+      tableHeight: 0
     }
   },
   computed: {
@@ -211,7 +211,7 @@ export default {
         if (valid) {
           _this.$refs.table.refresh(true)
         } else {
-          _this.$message.error("请选择调拨开单日期")
+          _this.$message.error('请选择调拨开单日期')
           return false
         }
       })
@@ -261,8 +261,16 @@ export default {
       )
     },
     pageInit () {
-      this.getAllocateTypeAllList()
-      this.getUserList()
+      const _this = this
+      _this.getAllocateTypeAllList()
+      _this.getUserList()
+      this.$nextTick(() => {
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 230
     }
   },
   mounted () {

+ 52 - 42
src/views/reportData/billingBackReport/list.vue

@@ -1,7 +1,7 @@
 <template>
-  <a-card size="small">
-    <a-spin :spinning="spinning" tip="Loading...">
-      <div class="table-page-search-wrapper newTableSearchName">
+  <div>
+    <a-card size="small" :bordered="false" class="searchBottomSpace">
+      <div class="table-page-search-wrapper newTableSearchName" ref="tableSearch">
         <a-form-model
           id="billingBackReportList-form"
           ref="ruleForm"
@@ -42,43 +42,48 @@
           </a-row>
         </a-form-model>
       </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :defaultLoadData="false"
-        :rowKey="(record,index) => record.no"
-        rowKeyName="no"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 1550 }"
-        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,index) => record.no"
+          rowKeyName="no"
+          :columns="columns"
+          :data="loadData"
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ x: 1550 ,y: tableHeight-136 }"
+          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>
@@ -241,11 +246,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
       })
@@ -253,6 +258,11 @@ export default {
     },
     pageInit () {
       this.getTableTitle()
+      this.setTableH()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 230
     }
   },
   mounted () {

+ 54 - 43
src/views/reportData/billingOrderReport/list.vue

@@ -1,7 +1,7 @@
 <template>
-  <a-card size="small">
-    <a-spin :spinning="spinning" tip="Loading...">
-      <div class="table-page-search-wrapper newTableSearchName">
+  <div>
+    <a-card size="small" :bordered="false" class="searchBottomSpace">
+      <div class="table-page-search-wrapper newTableSearchName" ref="tableSearch">
         <a-form-model
           id="billingOrderReport-form"
           ref="ruleForm"
@@ -31,7 +31,7 @@
                 <AreaList id="returnSlipReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
               </a-form-model-item>
             </a-col>
-            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-col :md="24" :sm="24" style="margin-bottom: 10px;text-align:center;">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="billingOrderReport-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="billingOrderReport-reset">重置</a-button>
               <a-button
@@ -47,43 +47,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: 1550 }"
-        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: 1550 ,y: tableHeight-136 }"
+          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>
@@ -104,6 +109,7 @@ export default {
     return {
       spinning: false,
       showExport: false, // 导出弹窗
+      tableHeight: 0,
       queryParam: {
         time: [
           getDate.getCurrMonthDays().starttime,
@@ -247,11 +253,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
       })
@@ -259,6 +265,11 @@ export default {
     },
     pageInit () {
       this.getTableTitle()
+      this.setTableH()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 230
     }
   },
   mounted () {

+ 77 - 57
src/views/reportData/billingReturnReport/list.vue

@@ -1,8 +1,8 @@
 <template>
-  <a-card size="small" :bordered="false" class="billingReturnReportList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
+  <div>
+    <a-card size="small" :bordered="false" class="billingReturnReportList-wrap searchBottomSpace">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper newTableSearchName">
+      <div class="table-page-search-wrapper newTableSearchName" ref="tableSearch">
         <a-form-model
           id="returnSlipReportList-form"
           ref="ruleForm"
@@ -33,16 +33,16 @@
                   allowClear></v-select>
               </a-form-model-item>
             </a-col>
-           
+
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
-              <a-form-model-item label="所在区域">
-                <subarea id="billingReturnReportList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
-              </a-form-model-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
+                <a-form-model-item label="所在区域">
+                  <subarea id="billingReturnReportList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
+                </a-form-model-item>
+              </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">
@@ -71,43 +71,48 @@
           </a-row>
         </a-form-model>
       </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.no"
-        rowKeyName="no"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 2250, y: tableHeight }"
-        :defaultLoadData="false"
-        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"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :columns="columns"
+          :data="loadData"
+          :style="{ height: tableHeight + 84.5+'px' }"
+          :scroll="{ x: 2250, y: tableHeight-136 }"
+          :defaultLoadData="false"
+          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>
@@ -143,7 +148,7 @@ export default {
         provinceSn: undefined,
         citySn: undefined,
         districtSn: undefined,
-        subareaArea:{
+        subareaArea: {
           subareaSn: undefined,
           subareaAreaSn: undefined,
           bizUserSn: undefined
@@ -159,9 +164,6 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 380
-        }
         const params = Object.assign(parameter, this.queryParam) //  无分页
         delete params.time
         return salesReportReturnList(params).then(res => {
@@ -182,10 +184,21 @@ export default {
       productType: [],
       columns: [],
       countLabel: [],
-      countBrandLabel:[],
+      countBrandLabel: [],
       totalData: null
     }
   },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
   methods: {
     //  导出
     handleExport () {
@@ -241,7 +254,7 @@ export default {
     custChange (val) {
       this.queryParam.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
     },
@@ -281,22 +294,29 @@ export default {
       const _this = this
       const tableTitle = await salesReturnReportTitle().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()
+      this.$nextTick(() => {
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 230
     }
   },
   mounted () {

+ 142 - 135
src/views/reportData/promotionSalesRealTimeReport/index.vue

@@ -1,152 +1,156 @@
 <template>
-  <a-card size="small" :bordered="false" class="promotionSalesRealTimeReport-wrap">
+  <div>
     <a-spin :spinning="spinning" tip="Loading...">
-      <a-tabs default-active-key="1" @change="handleChange">
+      <a-tabs default-active-key="1" @change="handleChange" :tabBarStyle="{'background':'#fff'}">
         <a-tab-pane key="1" tab="促销销售单报表">
-          <div ref="tableSearch" class="table-page-search-wrapper newTableSearchName">
-            <a-form-model
-              layout="inline"
-              ref="ruleForm"
-              :rules="rules"
-              :model="queryParam">
-              <a-row :gutter="15">
-                <a-col :md="6" :sm="24">
-                  <a-form-model-item label="销售审核日期" prop="salesDate">
-                    <rangeDate ref="rangeDate" :value="queryParam.salesDate" @change="salesDateChange" />
-                  </a-form-model-item>
-                </a-col>
-                <a-col :md="6" :sm="24">
-                  <!-- :disabledDate="disabledDate" -->
-                  <a-form-model-item label="促销开始时间">
-                    <a-range-picker
-                      style="width:100%"
-                      v-model="time"
-                      :format="dateFormat"
-                      :placeholder="['开始时间', '结束时间']"
-                      @change="dateChange"></a-range-picker>
-                  </a-form-model-item>
-                </a-col>
-                <a-col :md="6" :sm="24">
-                  <a-form-model-item label="促销名称">
-                    <a-input id="promotionSalesRealTimeReport-title" v-model.trim="queryParam.promoRuleReport.title" allowClear placeholder="请输入促销名称"/>
-                  </a-form-model-item>
-                </a-col>
-                <template v-if="advanced">
+          <a-card size="small" :bordered="false" class="promotionSalesRealTimeReport-wrap searchBottomSpace">
+            <div ref="tableSearch" class="table-page-search-wrapper newTableSearchName">
+              <a-form-model
+                layout="inline"
+                ref="ruleForm"
+                :rules="rules"
+                :model="queryParam">
+                <a-row :gutter="15">
                   <a-col :md="6" :sm="24">
-                    <a-form-model-item label="促销类型">
-                      <v-select
-                        v-model="queryParam.promoRuleReport.promotionRuleType"
-                        ref="ruleType"
-                        id="promotionSalesRealTimeReport-ruleType"
-                        code="PROMOTION_RULE_TYPE"
-                        placeholder="请选择促销类型"
-                        allowClear></v-select>
+                    <a-form-model-item label="销售审核日期" prop="salesDate">
+                      <rangeDate ref="rangeDate" :value="queryParam.salesDate" @change="salesDateChange" />
                     </a-form-model-item>
                   </a-col>
                   <a-col :md="6" :sm="24">
-                    <a-form-model-item label="规则">
-                      <a-input id="promotionSalesRealTimeReport-ruleInfo" v-model.trim="queryParam.promoRuleReport.ruleInfo" allowClear placeholder="请输入规则关键字"/>
+                    <!-- :disabledDate="disabledDate" -->
+                    <a-form-model-item label="促销开始时间">
+                      <a-range-picker
+                        style="width:100%"
+                        v-model="time"
+                        :format="dateFormat"
+                        :placeholder="['开始时间', '结束时间']"
+                        @change="dateChange"></a-range-picker>
                     </a-form-model-item>
                   </a-col>
                   <a-col :md="6" :sm="24">
-                    <a-form-model-item label="销售单号">
-                      <a-input id="promotionSalesRealTimeReport-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
+                    <a-form-model-item label="促销名称">
+                      <a-input id="promotionSalesRealTimeReport-title" v-model.trim="queryParam.promoRuleReport.title" allowClear placeholder="请输入促销名称"/>
                     </a-form-model-item>
                   </a-col>
+                  <template v-if="advanced">
+                    <a-col :md="6" :sm="24">
+                      <a-form-model-item label="促销类型">
+                        <v-select
+                          v-model="queryParam.promoRuleReport.promotionRuleType"
+                          ref="ruleType"
+                          id="promotionSalesRealTimeReport-ruleType"
+                          code="PROMOTION_RULE_TYPE"
+                          placeholder="请选择促销类型"
+                          allowClear></v-select>
+                      </a-form-model-item>
+                    </a-col>
+                    <a-col :md="6" :sm="24">
+                      <a-form-model-item label="规则">
+                        <a-input id="promotionSalesRealTimeReport-ruleInfo" v-model.trim="queryParam.promoRuleReport.ruleInfo" allowClear placeholder="请输入规则关键字"/>
+                      </a-form-model-item>
+                    </a-col>
+                    <a-col :md="6" :sm="24">
+                      <a-form-model-item label="销售单号">
+                        <a-input id="promotionSalesRealTimeReport-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="客户级别">
+                        <v-select
+                          v-model="queryParam.buyerLevel"
+                          ref="buyerLevel"
+                          id="promotionSalesRealTimeReport-buyerLevel"
+                          code="DEALER_LEVEL"
+                          placeholder="请选择客户级别"
+                          allowClear></v-select>
+                      </a-form-model-item>
+                    </a-col>
+                    <a-col :md="6" :sm="24">
+                      <a-form-model-item label="客户名称">
+                        <a-input id="promotionSalesRealTimeReport-buyerName" v-model.trim="queryParam.buyerName" allowClear placeholder="请输入客户名称"/>
+                      </a-form-model-item>
+                    </a-col>
+                    <a-col :md="6" :sm="24">
+                      <a-form-model-item label="所在区域">
+                        <subarea ref="subarea" id="promotionSalesRealTimeReport-subarea" @change="subareaChange"></subarea>
+                      </a-form-model-item>
+                    </a-col>
+                    <a-col :md="6" :sm="24">
+                      <a-form-model-item label="地区">
+                        <AreaList id="promotionSalesRealTimeReport-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+                      </a-form-model-item>
+                    </a-col>
+                  </template>
                   <a-col :md="6" :sm="24">
-                    <a-form-model-item label="客户级别">
-                      <v-select
-                        v-model="queryParam.buyerLevel"
-                        ref="buyerLevel"
-                        id="promotionSalesRealTimeReport-buyerLevel"
-                        code="DEALER_LEVEL"
-                        placeholder="请选择客户级别"
-                        allowClear></v-select>
-                    </a-form-model-item>
-                  </a-col>
-                  <a-col :md="6" :sm="24">
-                    <a-form-model-item label="客户名称">
-                      <a-input id="promotionSalesRealTimeReport-buyerName" v-model.trim="queryParam.buyerName" allowClear placeholder="请输入客户名称"/>
-                    </a-form-model-item>
-                  </a-col>
-                  <a-col :md="6" :sm="24">
-                    <a-form-model-item label="所在区域">
-                      <subarea ref="subarea" id="promotionSalesRealTimeReport-subarea" @change="subareaChange"></subarea>
-                    </a-form-model-item>
-                  </a-col>
-                  <a-col :md="6" :sm="24">
-                    <a-form-model-item label="地区">
-                      <AreaList id="promotionSalesRealTimeReport-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
-                    </a-form-model-item>
+                    <span class="table-page-search-submitButtons">
+                      <a-button type="primary" :disabled="disabled" @click="testForm('search')" >查询</a-button>
+                      <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm">重置</a-button>
+                      <a-button
+                        style="margin-left: 10px"
+                        type="primary"
+                        class="button-warning"
+                        @click="testForm('export')"
+                        :disabled="disabled"
+                        :loading="exportLoading"
+                        v-if="$hasPermissions('B_promotionSalesExport')"
+                      >导出</a-button>
+                      <a @click="advanced=!advanced" style="margin-left: 8px">
+                        {{ advanced ? '收起' : '展开' }}
+                        <a-icon :type="advanced ? 'up' : 'down'"/>
+                      </a>
+                    </span>
                   </a-col>
-                </template>
-                <a-col :md="6" :sm="24">
-                  <span class="table-page-search-submitButtons">
-                    <a-button type="primary" :disabled="disabled" @click="testForm('search')" >查询</a-button>
-                    <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm">重置</a-button>
-                    <a-button
-                      style="margin-left: 10px"
-                      type="primary"
-                      class="button-warning"
-                      @click="testForm('export')"
-                      :disabled="disabled"
-                      :loading="exportLoading"
-                      v-if="$hasPermissions('B_promotionSalesExport')"
-                    >导出</a-button>
-                    <a @click="advanced=!advanced" style="margin-left: 8px">
-                      {{ advanced ? '收起' : '展开' }}
-                      <a-icon :type="advanced ? 'up' : 'down'"/>
-                    </a>
-                  </span>
-                </a-col>
-              </a-row>
-            </a-form-model>
-          </div>
+                </a-row>
+              </a-form-model>
+            </div>
+          </a-card>
           <!-- 列表 -->
-          <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-40,x:1890}"
-            :defaultLoadData="false"
-            bordered>
-            <!-- 促销时间 -->
-            <template slot="promotionTime" slot-scope="text, record">
-              <span>{{ record.promotion.promotionDateStart }}-{{ record.promotion.promotionDateEnd }}</span>
-            </template>
-            <!-- 规则 -->
-            <!-- <template slot="promotionDesc" slot-scope="text, record">
+          <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="{ x:1890,y: tableHeight-34}"
+              :defaultLoadData="false"
+              bordered>
+              <!-- 促销时间 -->
+              <template slot="promotionTime" slot-scope="text, record">
+                <span>{{ record.promotion.promotionDateStart }}-{{ record.promotion.promotionDateEnd }}</span>
+              </template>
+              <!-- 规则 -->
+              <!-- <template slot="promotionDesc" slot-scope="text, record">
               <span v-if="record.promotionRule.promotionRuleType=='PROMO_PROD'">{{ record.promotionRule.promotionRuleTypeDictValue }}</span>
               <span v-else-if="record.promotionRule.promotionRuleType=='RATIO_AMOUNT'">{{ record.promotionRule.regularSameFlag==1?'同款':'不同款' }}产品购买满{{ record.promotionRule.regularQty }}个正价产品,送{{ record.promotionQty }}个促销产品</span>
               <span v-else>购买满{{ record.promotionRule.regularAmount }}元正价产品,送{{ record.promotionRule.giveAmount }}元促销品采购额{{ record.promotionRule.accrualFlag&&record.promotionRule.accrualFlag==1?'(金额叠加)':'(金额不叠加)' }}</span>
             </template> -->
-            <!-- 地区 -->
-            <template slot="addressInfo" slot-scope="text, record">
-              <span>{{ record.provinceName }}{{ record.cityName?'/'+record.cityName:'' }}{{ record.districtName?'/'+record.districtName :'' }}</span>
-            </template>
-            <template slot="footer">
-              <a-row>
-                <a-col span="24">
-                  <a-row>
-                    <a-col span="4">数量(非促):{{ (totalData && (totalData.notGiftQty || totalData.notGiftQty==0)) ? totalData.notGiftQty : '--' }}</a-col>
-                    <a-col span="4">数量(促):{{ (totalData && (totalData.giftQty || totalData.giftQty==0)) ? totalData.giftQty: '--' }}</a-col>
-                    <a-col span="4">实售金额:{{ (totalData && (totalData.totalRealAmount || totalData.totalRealAmount==0)) ? toThousands(totalData.totalRealAmount) : '--' }}</a-col>
-                    <a-col span="4">开单金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? toThousands(totalData.totalAmount) : '--' }}</a-col>
-                    <a-col span="4">成本金额:{{ (totalData && (totalData.totalRealCost || totalData.totalRealCost==0)) ? totalData.totalRealCost : '--' }}</a-col>
-                    <a-col span="4">损失成本:{{ (totalData && (totalData.lossCost || totalData.lossCost==0)) ? toThousands(totalData.lossCost) : '--' }}</a-col>
-                    <a-col span="4">损失费用:{{ (totalData && (totalData.lossAmount || totalData.lossAmount==0)) ? toThousands(totalData.lossAmount) : '--' }}</a-col>
-                    <a-col span="4">采购额结余:{{ (totalData && (totalData.surplusPromoGiftsAmount || totalData.surplusPromoGiftsAmount==0)) ? toThousands(totalData.surplusPromoGiftsAmount) : '--' }}</a-col>
-                    <a-col span="4">采购额超出:{{ (totalData && (totalData.outPromoGiftsAmount || totalData.outPromoGiftsAmount==0)) ? toThousands(totalData.outPromoGiftsAmount) : '--' }}</a-col>
-                  </a-row>
-                </a-col>
-              </a-row>
-            </template>
-          </s-table>
+              <!-- 地区 -->
+              <template slot="addressInfo" slot-scope="text, record">
+                <span>{{ record.provinceName }}{{ record.cityName?'/'+record.cityName:'' }}{{ record.districtName?'/'+record.districtName :'' }}</span>
+              </template>
+              <template slot="footer">
+                <a-row>
+                  <a-col span="24">
+                    <a-row>
+                      <a-col span="4">数量(非促):{{ (totalData && (totalData.notGiftQty || totalData.notGiftQty==0)) ? totalData.notGiftQty : '--' }}</a-col>
+                      <a-col span="4">数量(促):{{ (totalData && (totalData.giftQty || totalData.giftQty==0)) ? totalData.giftQty: '--' }}</a-col>
+                      <a-col span="4">实售金额:{{ (totalData && (totalData.totalRealAmount || totalData.totalRealAmount==0)) ? toThousands(totalData.totalRealAmount) : '--' }}</a-col>
+                      <a-col span="4">开单金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? toThousands(totalData.totalAmount) : '--' }}</a-col>
+                      <a-col span="4">成本金额:{{ (totalData && (totalData.totalRealCost || totalData.totalRealCost==0)) ? totalData.totalRealCost : '--' }}</a-col>
+                      <a-col span="4">损失成本:{{ (totalData && (totalData.lossCost || totalData.lossCost==0)) ? toThousands(totalData.lossCost) : '--' }}</a-col>
+                      <a-col span="4">损失费用:{{ (totalData && (totalData.lossAmount || totalData.lossAmount==0)) ? toThousands(totalData.lossAmount) : '--' }}</a-col>
+                      <a-col span="4">采购额结余:{{ (totalData && (totalData.surplusPromoGiftsAmount || totalData.surplusPromoGiftsAmount==0)) ? toThousands(totalData.surplusPromoGiftsAmount) : '--' }}</a-col>
+                      <a-col span="4">采购额超出:{{ (totalData && (totalData.outPromoGiftsAmount || totalData.outPromoGiftsAmount==0)) ? toThousands(totalData.outPromoGiftsAmount) : '--' }}</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></gatherList>
@@ -155,7 +159,7 @@
       <!-- 导出提示框 -->
       <reportModal :visible="showExport" @close="showExport=false"></reportModal>
     </a-spin>
-  </a-card>
+  </div>
 </template>
 
 <script>
@@ -169,7 +173,7 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import getDate from '@/libs/getDate.js'
 import subarea from '@/views/common/subarea.js'
 import AreaList from '@/views/common/areaList.js'
-import moment from 'moment'
+// import moment from 'moment'
 export default {
   name: 'PriceDifferenceDetailReportList',
   mixins: [commonMixin],
@@ -216,11 +220,11 @@ export default {
       exportLoading: false,
       showExport: false,
       columns: [
-        { title: '促销名称', dataIndex: 'promotion.title', width: '160px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left', ellipsis: true },
+        { title: '促销名称', dataIndex: 'promotion.title', width: '160px', align: 'left', customRender: function (text) { return text || '--' }, fixed: 'left', ellipsis: true },
         { title: '促销时间', scopedSlots: { customRender: 'promotionTime' }, width: '130px', align: 'center', fixed: 'left' },
         { title: '费用所属部门', dataIndex: 'departmentName', width: '160px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true, fixed: 'left' },
         { title: '促销类型', dataIndex: 'promotionRule.promotionRuleTypeDictValue', width: '100px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left' },
-        { title: '规则', dataIndex: 'promotionRule.ruleInfo', width: '180px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left' },
+        { title: '规则', dataIndex: 'promotionRule.ruleInfo', width: '180px', align: 'left', customRender: function (text) { return text || '--' }, fixed: 'left' },
         { title: '销售单号', dataIndex: 'salesBillNo', width: '120px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left' },
         { title: '区域', dataIndex: 'subareaArea.subareaName', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
@@ -396,7 +400,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 260
+      this.tableHeight = window.innerHeight - tableSearchH - 280
     }
   },
   watch: {
@@ -434,4 +438,7 @@ export default {
       text-align:center;
     }
   }
+  .ant-tabs-tabpane.ant-tabs-tabpane-active{
+    margin-top:-11px !important;
+  }
 </style>

+ 149 - 145
src/views/reportData/promotionSalesRealTimeReport/list.vue

@@ -1,166 +1,170 @@
 <template>
   <a-spin :spinning="spinning" tip="Loading...">
     <div class="productInfoList-wrap">
-      <div ref="tableSearch" class="table-page-search-wrapper newTableSearchName">
-        <a-form-model layout="inline" ref="ruleForm" :rules="rules" :model="newQueryParam">
-          <a-row :gutter="15">
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="销售审核日期" prop="salesDate">
-                <rangeDate ref="rangeDate" :value="newQueryParam.salesDate" @change="salesDateChange" />
-              </a-form-model-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <!-- :disabledDate="disabledDate" -->
-              <a-form-model-item label="促销开始时间">
-                <a-range-picker
-                  style="width:100%"
-                  v-model="time"
-                  :format="dateFormat"
-                  :placeholder="['开始时间', '结束时间']"
-                  @change="dateChange"></a-range-picker>
-              </a-form-model-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="促销名称">
-                <a-input
-                  id="promotionSalesRealTimeReport-title"
-                  v-model.trim="newQueryParam.promoRuleReport.title"
-                  allowClear
-                  placeholder="请输入促销名称" />
-              </a-form-model-item>
-            </a-col>
-            <template v-if="advanced">
+      <a-card size="small" :bordered="false" class="productInfoList-wrap searchBottomSpace">
+        <div ref="tableSearch" class="table-page-search-wrapper newTableSearchName">
+          <a-form-model layout="inline" ref="ruleForm" :rules="rules" :model="newQueryParam">
+            <a-row :gutter="15">
               <a-col :md="6" :sm="24">
-                <a-form-model-item label="促销类型">
-                  <v-select
-                    v-model="newQueryParam.promoRuleReport.promotionRuleType"
-                    ref="ruleType"
-                    id="promotionSalesRealTimeReport-ruleType"
-                    code="PROMOTION_RULE_TYPE"
-                    placeholder="请选择促销类型"
-                    allowClear></v-select>
+                <a-form-model-item label="销售审核日期" prop="salesDate">
+                  <rangeDate ref="rangeDate" :value="newQueryParam.salesDate" @change="salesDateChange" />
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-model-item label="规则">
-                  <a-input
-                    id="promotionSalesRealTimeReport-ruleInfo"
-                    v-model.trim="newQueryParam.promoRuleReport.ruleInfo"
-                    allowClear
-                    placeholder="请输入规则关键字" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="销售单号">
-                  <a-input
-                    id="promotionSalesRealTimeReport-salesBillNo"
-                    v-model.trim="newQueryParam.salesBillNo"
-                    allowClear
-                    placeholder="请输入销售单号" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="客户级别">
-                  <v-select
-                    v-model="newQueryParam.buyerLevel"
-                    ref="buyerLevel"
-                    id="promotionSalesRealTimeReport-buyerLevel"
-                    code="DEALER_LEVEL"
-                    placeholder="请选择客户级别"
-                    allowClear></v-select>
+                <!-- :disabledDate="disabledDate" -->
+                <a-form-model-item label="促销开始时间">
+                  <a-range-picker
+                    style="width:100%"
+                    v-model="time"
+                    :format="dateFormat"
+                    :placeholder="['开始时间', '结束时间']"
+                    @change="dateChange"></a-range-picker>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-model-item label="客户名称">
+                <a-form-model-item label="促销名称">
                   <a-input
-                    id="promotionSalesRealTimeReport-buyerName"
-                    v-model.trim="newQueryParam.buyerName"
+                    id="promotionSalesRealTimeReport-title"
+                    v-model.trim="newQueryParam.promoRuleReport.title"
                     allowClear
-                    placeholder="请输入客户名称" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="所在区域">
-                  <subarea ref="subarea" id="promotionSalesRealTimeReport-subarea" @change="subareaChange"></subarea>
+                    placeholder="请输入促销名称" />
                 </a-form-model-item>
               </a-col>
+              <template v-if="advanced">
+                <a-col :md="6" :sm="24">
+                  <a-form-model-item label="促销类型">
+                    <v-select
+                      v-model="newQueryParam.promoRuleReport.promotionRuleType"
+                      ref="ruleType"
+                      id="promotionSalesRealTimeReport-ruleType"
+                      code="PROMOTION_RULE_TYPE"
+                      placeholder="请选择促销类型"
+                      allowClear></v-select>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-model-item label="规则">
+                    <a-input
+                      id="promotionSalesRealTimeReport-ruleInfo"
+                      v-model.trim="newQueryParam.promoRuleReport.ruleInfo"
+                      allowClear
+                      placeholder="请输入规则关键字" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-model-item label="销售单号">
+                    <a-input
+                      id="promotionSalesRealTimeReport-salesBillNo"
+                      v-model.trim="newQueryParam.salesBillNo"
+                      allowClear
+                      placeholder="请输入销售单号" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-model-item label="客户级别">
+                    <v-select
+                      v-model="newQueryParam.buyerLevel"
+                      ref="buyerLevel"
+                      id="promotionSalesRealTimeReport-buyerLevel"
+                      code="DEALER_LEVEL"
+                      placeholder="请选择客户级别"
+                      allowClear></v-select>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-model-item label="客户名称">
+                    <a-input
+                      id="promotionSalesRealTimeReport-buyerName"
+                      v-model.trim="newQueryParam.buyerName"
+                      allowClear
+                      placeholder="请输入客户名称" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-model-item label="所在区域">
+                    <subarea ref="subarea" id="promotionSalesRealTimeReport-subarea" @change="subareaChange"></subarea>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-model-item label="地区">
+                    <AreaList id="promotionSalesRealTimeReport-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+                  </a-form-model-item>
+                </a-col>
+              </template>
               <a-col :md="6" :sm="24">
-                <a-form-model-item label="地区">
-                  <AreaList id="promotionSalesRealTimeReport-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
-                </a-form-model-item>
+                <span class="table-page-search-submitButtons">
+                  <a-button type="primary" :disabled="disabled" @click="testForm('search')">查询</a-button>
+                  <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm">重置</a-button>
+                  <a-button
+                    style="margin-left: 10px"
+                    type="primary"
+                    class="button-warning"
+                    @click="testForm('export')"
+                    :disabled="disabled"
+                    :loading="exportLoading"
+                    v-if="$hasPermissions('B_promotionSalesExport')">导出</a-button>
+                  <a @click="advanced=!advanced" style="margin-left: 8px">
+                    {{ advanced ? '收起' : '展开' }}
+                    <a-icon :type="advanced ? 'up' : 'down'" />
+                  </a>
+                </span>
               </a-col>
-            </template>
-            <a-col :md="6" :sm="24">
-              <span class="table-page-search-submitButtons">
-                <a-button type="primary" :disabled="disabled" @click="testForm('search')">查询</a-button>
-                <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm">重置</a-button>
-                <a-button
-                  style="margin-left: 10px"
-                  type="primary"
-                  class="button-warning"
-                  @click="testForm('export')"
-                  :disabled="disabled"
-                  :loading="exportLoading"
-                  v-if="$hasPermissions('B_promotionSalesExport')">导出</a-button>
-                <a @click="advanced=!advanced" style="margin-left: 8px">
-                  {{ advanced ? '收起' : '展开' }}
-                  <a-icon :type="advanced ? 'up' : 'down'" />
-                </a>
-              </span>
-            </a-col>
-          </a-row>
-        </a-form-model>
-      </div>
+            </a-row>
+          </a-form-model>
+        </div>
+      </a-card>
       <!-- 列表 -->
-      <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-40,x:1890}"
-        :defaultLoadData="false"
-        bordered>
-        <!-- 促销时间 -->
-        <template slot="promotionTime" slot-scope="text, record">
-          <span>{{ record.promotion.promotionDateStart }}-{{ record.promotion.promotionDateEnd }}</span>
-        </template>
-        <!-- 规则 -->
-        <!-- <template slot="promotionDesc" slot-scope="text, record">
+      <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-30,x:1890}"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 促销时间 -->
+          <template slot="promotionTime" slot-scope="text, record">
+            <span>{{ record.promotion.promotionDateStart }}-{{ record.promotion.promotionDateEnd }}</span>
+          </template>
+          <!-- 规则 -->
+          <!-- <template slot="promotionDesc" slot-scope="text, record">
           <span v-if="record.promotionRule.promotionRuleType=='PROMO_PROD'">{{ record.promotionRule.promotionRuleTypeDictValue }}</span>
           <span v-else-if="record.promotionRule.promotionRuleType=='RATIO_AMOUNT'">{{ record.promotionRule.regularSameFlag==1?'同款':'不同款' }}产品购买满{{ record.promotionRule.regularQty }}个正价产品,送{{ record.promotionQty }}个促销产品</span>
           <span v-else>购买满{{ record.promotionRule.regularAmount }}元正价产品,送{{ record.promotionRule.giveAmount }}元促销品采购额{{ record.promotionRule.accrualFlag&&record.promotionRule.accrualFlag==1?'(金额叠加)':'(金额不叠加)' }}</span>
         </template> -->
-        <!-- 地区 -->
-        <template slot="addressInfo" slot-scope="text, record">
-          <span>{{ record.provinceName }}{{ record.cityName?'/'+record.cityName:'' }}{{ record.districtName?'/'+record.districtName :'' }}</span>
-        </template>
-        <template slot="footer">
-          <a-row>
-            <a-col span="24">
-              <a-row>
-                <a-col
-                  span="3">实时数量(非促):{{ (totalData && (totalData.notGiftQty || totalData.notGiftQty==0)) ? totalData.notGiftQty : '--' }}</a-col>
-                <a-col
-                  span="3">实时数量(促):{{ (totalData && (totalData.giftQty || totalData.giftQty==0)) ? totalData.giftQty : '--' }}</a-col>
-                <a-col
-                  span="3">实时实售金额:{{ (totalData && (totalData.totalRealAmount || totalData.totalRealAmount==0)) ? toThousands(totalData.totalRealAmount) : '--' }}</a-col>
-                <a-col
-                  span="3">实时开单金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? toThousands(totalData.totalAmount) : '--' }}</a-col>
-                <a-col
-                  span="3">实时成本金额:{{ (totalData && (totalData.totalRealCost || totalData.totalRealCost==0)) ? toThousands(totalData.totalRealCost) : '--' }}</a-col>
-                <a-col
-                  span="4">实时损失成本:{{ (totalData && (totalData.lossCost || totalData.lossCost==0)) ? toThousands(totalData.lossCost) : '--' }}</a-col>
-                <a-col
-                  span="5">实时损失费用:{{ (totalData && (totalData.lossAmount || totalData.lossAmount==0)) ? toThousands(totalData.lossAmount) : '--' }}</a-col>
-              </a-row>
-            </a-col>
-          </a-row>
-        </template>
-      </s-table>
+          <!-- 地区 -->
+          <template slot="addressInfo" slot-scope="text, record">
+            <span>{{ record.provinceName }}{{ record.cityName?'/'+record.cityName:'' }}{{ record.districtName?'/'+record.districtName :'' }}</span>
+          </template>
+          <template slot="footer">
+            <a-row>
+              <a-col span="24">
+                <a-row>
+                  <a-col
+                    span="3">实时数量(非促):{{ (totalData && (totalData.notGiftQty || totalData.notGiftQty==0)) ? totalData.notGiftQty : '--' }}</a-col>
+                  <a-col
+                    span="3">实时数量(促):{{ (totalData && (totalData.giftQty || totalData.giftQty==0)) ? totalData.giftQty : '--' }}</a-col>
+                  <a-col
+                    span="3">实时实售金额:{{ (totalData && (totalData.totalRealAmount || totalData.totalRealAmount==0)) ? toThousands(totalData.totalRealAmount) : '--' }}</a-col>
+                  <a-col
+                    span="3">实时开单金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? toThousands(totalData.totalAmount) : '--' }}</a-col>
+                  <a-col
+                    span="3">实时成本金额:{{ (totalData && (totalData.totalRealCost || totalData.totalRealCost==0)) ? toThousands(totalData.totalRealCost) : '--' }}</a-col>
+                  <a-col
+                    span="4">实时损失成本:{{ (totalData && (totalData.lossCost || totalData.lossCost==0)) ? toThousands(totalData.lossCost) : '--' }}</a-col>
+                  <a-col
+                    span="5">实时损失费用:{{ (totalData && (totalData.lossAmount || totalData.lossAmount==0)) ? toThousands(totalData.lossAmount) : '--' }}</a-col>
+                </a-row>
+              </a-col>
+            </a-row>
+          </template>
+        </s-table>
+      </a-card>
     </div>
     <!-- 导出提示框 -->
     <reportModal :visible="showExport" @close="showExport=false"></reportModal>
@@ -247,7 +251,7 @@ export default {
         title: '促销名称',
         dataIndex: 'promotion.title',
         width: '160px',
-        align: 'center',
+        align: 'left',
         customRender: function (text) {
           return text || '--'
         },
@@ -284,7 +288,7 @@ export default {
         },
         fixed: 'left'
       },
-      { title: '规则', dataIndex: 'promotionRule.ruleInfo', width: '180px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left' },
+      { title: '规则', dataIndex: 'promotionRule.ruleInfo', width: '180px', align: 'left', customRender: function (text) { return text || '--' }, fixed: 'left' },
       {
         title: '销售单号',
         dataIndex: 'salesBillNo',
@@ -565,7 +569,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 260
+      this.tableHeight = window.innerHeight - tableSearchH - 280
     }
   },
   mounted () {

+ 61 - 41
src/views/reportData/returnSlipReport/list.vue

@@ -1,8 +1,8 @@
 <template>
-  <a-card size="small" :bordered="false" class="returnSlipReportList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
+  <div>
+    <a-card size="small" :bordered="false" class="returnSlipReportList-wrap searchBottomSpace">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper newTableSearchName">
+      <div class="table-page-search-wrapper newTableSearchName" ref="tableSearch">
         <a-form-model
           id="returnSlipReportList-form"
           ref="ruleForm"
@@ -97,43 +97,48 @@
           </a-row>
         </a-form-model>
       </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.no"
-        rowKeyName="no"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: tableWidth, y: tableHeight }"
-        :defaultLoadData="false"
-        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"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :columns="columns"
+          :data="loadData"
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ x: tableWidth ,y: tableHeight-136 }"
+          :defaultLoadData="false"
+          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>
@@ -218,7 +223,17 @@ export default {
       tableWidth: 0
     }
   },
-
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
   methods: {
     //  导出
     handleExport () {
@@ -336,6 +351,11 @@ export default {
     },
     pageInit () {
       this.getTableTitle()
+      this.setTableH()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 230
     }
   },
   mounted () {

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

@@ -1,8 +1,8 @@
 <template>
-  <a-card size="small" :bordered="false" class="salesReturnDetailList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
+  <div>
+    <a-card size="small" :bordered="false" class="salesReturnDetailList-wrap searchBottomSpace">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div class="table-page-search-wrapper" ref="tableSearch">
         <a-form-model
           id="salesSlipReportList-form"
           ref="ruleForm"
@@ -27,12 +27,13 @@
                 <a-input id="salesReturnDetailList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
               </a-form-model-item>
             </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="产品名称">
-                <a-input id="salesReturnDetailList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
-              </a-form-model-item>
-            </a-col>
+
             <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="产品名称">
+                  <a-input id="salesReturnDetailList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
+                </a-form-model-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="客户名称">
                   <a-input id="salesReturnDetailList-dealerName" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入客户名称"/>
@@ -106,7 +107,7 @@
                 </a-form-model-item>
               </a-col>
             </template>
-            <a-col :md="8" :sm="24" style="margin-bottom: 10px;">
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button
                 type="primary"
                 class="button-info"
@@ -132,38 +133,43 @@
           </a-row>
         </a-form-model>
       </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.no"
-        rowKeyName="no"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 2960 }"
-        :defaultLoadData="false"
-        bordered>
-        <template slot="footer">
-          <a-row :gutter="15">
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesReturnDetailReportList_salesPrice')">开单退货金额:{{ (totalData && (totalData.totalPrice || totalData.totalPrice==0)) ? toThousands(totalData.totalPrice) : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesReturnDetailReportList_salesPrice')">实售退货金额:{{ (totalData && (totalData.totalRealAmount || totalData.totalRealAmount==0)) ? toThousands(totalData.totalRealAmount) : '--' }}</a-col>
-            <a-col :md="4" :sm="24">仓库实收数量:{{ (totalData && (totalData.receiveQty || totalData.receiveQty==0)) ? totalData.receiveQty : '--' }}</a-col>
-            <a-col :md="4" :sm="24">坏件数量:{{ (totalData && (totalData.totalBadQty || totalData.totalBadQty==0)) ? totalData.totalBadQty : '--' }}</a-col>
-            <a-col :md="4" :sm="24">良品数量:{{ (totalData && (totalData.goodQty || totalData.goodQty==0)) ? totalData.goodQty : '--' }}</a-col>
-            <a-col :md="4" :sm="24">返库数量:{{ (totalData && (totalData.totalBackStockQty || totalData.totalBackStockQty==0)) ? totalData.totalBackStockQty : '--' }}</a-col>
-            <a-col :md="4" :sm="24">正常退货数量:{{ (totalData && (totalData.totalNormalQty || totalData.totalNormalQty==0)) ? totalData.totalNormalQty : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesReturnDetailReportList_salesPrice')">成本金额:{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? toThousands(totalData.totalCost) : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesReturnDetailReportList_salesPrice')">正常退货金额:{{ (totalData && (totalData.totalNormalPrice || totalData.totalNormalPrice==0)) ? toThousands(totalData.totalNormalPrice) : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesReturnDetailReportList_salesPrice')">正常再入库金额:{{ (totalData && (totalData.totalNormalCost || totalData.totalNormalCost==0)) ? toThousands(totalData.totalNormalCost) : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesReturnDetailReportList_salesPrice')">正常退货入库差额:{{ (totalData && (totalData.totalNormalBalance || totalData.totalNormalBalance==0)) ? toThousands(totalData.totalNormalBalance) : '--' }}</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"
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ x: 2960, y: tableHeight - 60 }"
+          :defaultLoadData="false"
+          bordered>
+          <template slot="footer">
+            <a-row :gutter="15">
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesReturnDetailReportList_salesPrice')">开单退货金额:{{ (totalData && (totalData.totalPrice || totalData.totalPrice==0)) ? toThousands(totalData.totalPrice) : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesReturnDetailReportList_salesPrice')">实售退货金额:{{ (totalData && (totalData.totalRealAmount || totalData.totalRealAmount==0)) ? toThousands(totalData.totalRealAmount) : '--' }}</a-col>
+              <a-col :md="4" :sm="24">仓库实收数量:{{ (totalData && (totalData.receiveQty || totalData.receiveQty==0)) ? totalData.receiveQty : '--' }}</a-col>
+              <a-col :md="4" :sm="24">坏件数量:{{ (totalData && (totalData.totalBadQty || totalData.totalBadQty==0)) ? totalData.totalBadQty : '--' }}</a-col>
+              <a-col :md="4" :sm="24">良品数量:{{ (totalData && (totalData.goodQty || totalData.goodQty==0)) ? totalData.goodQty : '--' }}</a-col>
+              <a-col :md="4" :sm="24">返库数量:{{ (totalData && (totalData.totalBackStockQty || totalData.totalBackStockQty==0)) ? totalData.totalBackStockQty : '--' }}</a-col>
+              <a-col :md="4" :sm="24">正常退货数量:{{ (totalData && (totalData.totalNormalQty || totalData.totalNormalQty==0)) ? totalData.totalNormalQty : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesReturnDetailReportList_salesPrice')">成本金额:{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? toThousands(totalData.totalCost) : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesReturnDetailReportList_salesPrice')">正常退货金额:{{ (totalData && (totalData.totalNormalPrice || totalData.totalNormalPrice==0)) ? toThousands(totalData.totalNormalPrice) : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesReturnDetailReportList_salesPrice')">正常再入库金额:{{ (totalData && (totalData.totalNormalCost || totalData.totalNormalCost==0)) ? toThousands(totalData.totalNormalCost) : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesReturnDetailReportList_salesPrice')">正常退货入库差额:{{ (totalData && (totalData.totalNormalBalance || totalData.totalNormalBalance==0)) ? toThousands(totalData.totalNormalBalance) : '--' }}</a-col>
+            </a-row>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 导出提示框 -->
+      <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+    </a-card>
+  </div>
 </template>
 
 <script>
@@ -317,6 +323,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 () {
@@ -430,6 +447,11 @@ export default {
     },
     pageInit () {
       this.resetSearchForm()
+      this.setTableH()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 230
     }
   },
   mounted () {

+ 75 - 56
src/views/reportData/salesReturnReport/list.vue

@@ -1,8 +1,8 @@
 <template>
-  <a-card size="small" :bordered="false" class="salesReturnReportList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
+  <div>
+    <a-card size="small" :bordered="false" class="salesReturnReportList-wrap searchBottomSpace">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper newTableSearchName">
+      <div class="table-page-search-wrapper newTableSearchName" ref="tableSearch">
         <a-form-model
           id="salesReturnReportList-form"
           ref="ruleForm"
@@ -33,16 +33,16 @@
                   allowClear></v-select>
               </a-form-model-item>
             </a-col>
-           
+
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
-              <a-form-model-item label="所在区域">
-                <subarea id="salesReturnReportList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
-              </a-form-model-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
+                <a-form-model-item label="所在区域">
+                  <subarea id="salesReturnReportList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
+                </a-form-model-item>
+              </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">
@@ -71,43 +71,48 @@
           </a-row>
         </a-form-model>
       </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.no"
-        rowKeyName="no"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 2250, y: tableHeight }"
-        :defaultLoadData="false"
-        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"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :columns="columns"
+          :data="loadData"
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ x: 2250, y: tableHeight-136 }"
+          :defaultLoadData="false"
+          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>
@@ -144,7 +149,7 @@ export default {
         provinceSn: undefined,
         citySn: undefined,
         districtSn: undefined,
-        subareaArea:{
+        subareaArea: {
           subareaSn: undefined,
           subareaAreaSn: undefined,
           bizUserSn: undefined
@@ -163,9 +168,6 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 380
-        }
         const params = Object.assign(parameter, this.queryParam) //  无分页
         delete params.time
         return salesReportReturnRebateList(params).then(res => {
@@ -187,7 +189,18 @@ export default {
       totalData: null,
       columns: [],
       countLabel: [],
-      countBrandLabel:[]
+      countBrandLabel: []
+    }
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
     }
   },
   methods: {
@@ -285,33 +298,39 @@ export default {
       const _this = this
       const tableTitle = await salesReportReturnRebateTitle().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) {

+ 52 - 30
src/views/reportData/salesReturnsReport/list.vue

@@ -1,8 +1,8 @@
 <template>
-  <a-card size="small" :bordered="false" class="salesReturnsReportList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
+  <div>
+    <a-card size="small" :bordered="false" class="salesReturnsReportList-wrap searchBottomSpace">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div class="table-page-search-wrapper" ref="tableSearch">
         <a-form-model
           id="salesReturnsReportList-form"
           ref="ruleForm"
@@ -102,33 +102,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"
-        :scroll="{ x: 1740 }"
-        :defaultLoadData="false"
-        bordered>
-        <template slot="footer">
-          <a-row :gutter="15">
-            <a-col :md="4" :sm="24">总数量:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesReturnsReportList_salesPrice')">开单退货金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? toThousands(totalData.totalAmount) : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesReturnsReportList_salesPrice')">实售退货金额:{{ (totalData && (totalData.totalRealAmount || totalData.totalRealAmount==0)) ? toThousands(totalData.totalRealAmount) : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesReturnsReportList_cityPrice')">经销商金额:{{ (totalData && (totalData.totalWholesalePrice2 || totalData.totalWholesalePrice2==0)) ? toThousands(totalData.totalWholesalePrice2) : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesReturnsReportList_provincePrice')">服务中心金额:{{ (totalData && (totalData.totalWholesalePrice1 || totalData.totalWholesalePrice1==0)) ? toThousands(totalData.totalWholesalePrice1) : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesReturnsReportList_specialPrice')">特约加盟店金额:{{ (totalData && (totalData.totalWholesalePrice3 || totalData.totalWholesalePrice3==0)) ? toThousands(totalData.totalWholesalePrice3) : '--' }}</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"
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ x: 1740, y: tableHeight - 30 }"
+          :defaultLoadData="false"
+          bordered>
+          <template slot="footer">
+            <a-row :gutter="15">
+              <a-col :md="4" :sm="24">总数量:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesReturnsReportList_salesPrice')">开单退货金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? toThousands(totalData.totalAmount) : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesReturnsReportList_salesPrice')">实售退货金额:{{ (totalData && (totalData.totalRealAmount || totalData.totalRealAmount==0)) ? toThousands(totalData.totalRealAmount) : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesReturnsReportList_cityPrice')">经销商金额:{{ (totalData && (totalData.totalWholesalePrice2 || totalData.totalWholesalePrice2==0)) ? toThousands(totalData.totalWholesalePrice2) : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesReturnsReportList_provincePrice')">服务中心金额:{{ (totalData && (totalData.totalWholesalePrice1 || totalData.totalWholesalePrice1==0)) ? toThousands(totalData.totalWholesalePrice1) : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesReturnsReportList_specialPrice')">特约加盟店金额:{{ (totalData && (totalData.totalWholesalePrice3 || totalData.totalWholesalePrice3==0)) ? toThousands(totalData.totalWholesalePrice3) : '--' }}</a-col>
+            </a-row>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 导出提示框 -->
+      <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+    </a-card>
+  </div>
 </template>
 
 <script>
@@ -248,6 +253,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 () {
@@ -344,17 +360,23 @@ export default {
       this.queryParam.dealerProvinceSn = val[0] ? val[0] : ''
       this.queryParam.dealerCitySn = val[1] ? val[1] : ''
       this.queryParam.dealerCountySn = val[2] ? val[2] : ''
+    },
+    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) {

+ 79 - 55
src/views/reportData/transferReturnDetailReport/list.vue

@@ -1,8 +1,8 @@
 <template>
-  <a-card size="small" :bordered="false" class="allocateReturnDetailReport-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
+  <div>
+    <a-card size="small" :bordered="false" class="allocateReturnDetailReport-wrap searchBottomSpace">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div class="table-page-search-wrapper" ref="tableSearch">
         <a-form-model
           id="salesSlipReportList-form"
           ref="ruleForm"
@@ -47,39 +47,39 @@
                 <subarea id="allocateReturnDetailReport-subareaSn" ref="subarea" @change="subareaChange"></subarea>
               </a-form-model-item>
             </a-col>
-            <a-col :md="4" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-model-item label="所在省份">
                 <Area id="allocateReturnDetailReport-provinceSn" defValKey="id" v-model="queryParam.provinceSn" placeholder="请选择省"></Area>
               </a-form-model-item>
             </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品品牌">
+                <ProductBrand id="allocateReturnDetailReport-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
+              </a-form-model-item>
+            </a-col>
             <template v-if="advanced">
-              <a-col :md="4" :sm="24">
-                <a-form-model-item label="产品品牌">
-                  <ProductBrand id="allocateReturnDetailReport-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="4" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-model-item label="品牌分类">
                   <v-select code="BRAND_TYPE" id="allocateReturnDetailReport-productBrandTypeSn" v-model="queryParam.productBrandTypeSn" allowClear placeholder="请选择品牌分类"></v-select>
                 </a-form-model-item>
               </a-col>
-              <a-col :md="4" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-model-item label="产品分类">
                   <ProductType id="allocateReturnDetailReport-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
                 </a-form-model-item>
               </a-col>
-              <a-col :md="5" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-model-item label="产品名称">
                   <a-input id="allocateReturnDetailReport-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
                 </a-form-model-item>
               </a-col>
-              <a-col :md="5" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-model-item label="产品编码">
                   <a-input id="allocateReturnDetailReport-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
                 </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 style="margin-left: 5px" type="primary" @click="handleSearch" :disabled="disabled" id="allocateReturnDetailReport-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="allocateReturnDetailReport-reset">重置</a-button>
               <a-button
@@ -99,40 +99,45 @@
           </a-row>
         </a-form-model>
       </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 3050 }"
-        :defaultLoadData="false"
-        bordered>
-        <!-- 调拨类型 -->
-        <template slot="allocateType" slot-scope="text, record">
-          <div>
-            <span v-if="record.allocateSortName">{{ record.allocateSortName }}</span>
-            <span v-if="record.allocateSortName&&record.allocateReturnTypeName">/</span>
-            <span v-if="record.allocateReturnTypeName">{{ record.allocateReturnTypeName }}</span>
-          </div>
-        </template>
-        <template slot="footer">
-          <a-row :gutter="15">
-            <a-col :md="4" :sm="24"></a-col>
-            <a-col :md="4" :sm="24">退货总数量:{{ (totalData && (totalData.returnQty || totalData.returnQty==0)) ? totalData.returnQty : '--' }}</a-col>
-            <a-col :md="4" :sm="24">坏件总数量:{{ (totalData && (totalData.badQty || totalData.badQty==0)) ? totalData.badQty : '--' }}</a-col>
-            <a-col :md="4" :sm="24">返库总数量:{{ (totalData && (totalData.backStockQty || totalData.backStockQty==0)) ? totalData.backStockQty : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_transferReturnDetailReportList_salesPrice')">退货总金额:{{ (totalData && (totalData.totalPrice || totalData.totalPrice==0)) ? toThousands(totalData.totalPrice) : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_transferReturnDetailReportList_costPrice')">退货总成本:{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? toThousands(totalData.totalCost) : '--' }}</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.id"
+          :columns="columns"
+          :data="loadData"
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ x: 3050 ,y: tableHeight-30 }"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 调拨类型 -->
+          <template slot="allocateType" slot-scope="text, record">
+            <div>
+              <span v-if="record.allocateSortName">{{ record.allocateSortName }}</span>
+              <span v-if="record.allocateSortName&&record.allocateReturnTypeName">/</span>
+              <span v-if="record.allocateReturnTypeName">{{ record.allocateReturnTypeName }}</span>
+            </div>
+          </template>
+          <template slot="footer">
+            <a-row :gutter="15">
+              <a-col :md="4" :sm="24"></a-col>
+              <a-col :md="4" :sm="24">退货总数量:{{ (totalData && (totalData.returnQty || totalData.returnQty==0)) ? totalData.returnQty : '--' }}</a-col>
+              <a-col :md="4" :sm="24">坏件总数量:{{ (totalData && (totalData.badQty || totalData.badQty==0)) ? totalData.badQty : '--' }}</a-col>
+              <a-col :md="4" :sm="24">返库总数量:{{ (totalData && (totalData.backStockQty || totalData.backStockQty==0)) ? totalData.backStockQty : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_transferReturnDetailReportList_salesPrice')">退货总金额:{{ (totalData && (totalData.totalPrice || totalData.totalPrice==0)) ? toThousands(totalData.totalPrice) : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_transferReturnDetailReportList_costPrice')">退货总成本:{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? toThousands(totalData.totalCost) : '--' }}</a-col>
+            </a-row>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 导出提示框 -->
+      <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+    </a-card>
+  </div>
 </template>
 
 <script>
@@ -178,7 +183,7 @@ export default {
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
         productTypeSn3: '', //  产品三级分类
-        subareaArea:{
+        subareaArea: {
           subareaSn: undefined,
           subareaAreaSn: undefined
         },
@@ -249,7 +254,7 @@ export default {
         { title: '单位', dataIndex: 'productEntity.unit', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '退货数量', dataIndex: 'returnQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '坏件数量', dataIndex: 'badQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '返库数量', dataIndex: 'backStockQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '返库数量', dataIndex: 'backStockQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
       if (this.$hasPermissions('M_transferReturnDetailReportList_salesPrice')) { //  售价权限
         arr.push({ title: '退货单价', dataIndex: 'price', width: 80, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
@@ -258,10 +263,21 @@ export default {
       if (this.$hasPermissions('M_transferReturnDetailReportList_costPrice')) { //  成本价权限
         arr.push({ title: '退货入库成本', dataIndex: 'totalCost', width: 90, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
-      
+
       return arr
     }
   },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
   methods: {
     changeAllocatype (val, opts) {
       this.allocateTypeVal = val || []
@@ -289,7 +305,7 @@ export default {
         if (valid) {
           _this.$refs.table.refresh(true)
         } else {
-          _this.$message.error("请选择退货完成日期")
+          _this.$message.error('请选择退货完成日期')
           return false
         }
       })
@@ -307,7 +323,7 @@ export default {
     custChange (val) {
       this.queryParam.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
     },
@@ -375,12 +391,20 @@ export default {
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
     pageInit () {
-      this.resetSearchForm()
+      const _this = this
+      this.$nextTick(() => {
+        _this.setTableH()
+      })
+      _this.resetSearchForm()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 230
     }
   },
   mounted () {
     // 页签刷新时调用
-    if (!this.$store.state.app.isNewTab) { 
+    if (!this.$store.state.app.isNewTab) {
       this.pageInit()
     }
   },

+ 68 - 45
src/views/reportData/transferReturnReport/list.vue

@@ -1,8 +1,8 @@
 <template>
-  <a-card size="small" :bordered="false" class="allocateReturnReport-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
+  <div>
+    <a-card size="small" :bordered="false" class="allocateReturnReport-wrap searchBottomSpace">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div class="table-page-search-wrapper" ref="tableSearch">
         <a-form-model
           id="allocateReturnReport-form"
           ref="ruleForm"
@@ -69,40 +69,45 @@
           </a-row>
         </a-form-model>
       </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 1100 }"
-        :defaultLoadData="false"
-        bordered>
-        <!-- 调拨类型 -->
-        <template slot="allocateType" slot-scope="text, record">
-          <div>
-            <span v-if="record.allocateSortName">{{ record.allocateSortName }}</span>
-            <span v-if="record.allocateSortName&&record.allocateReturnTypeName">/</span>
-            <span v-if="record.allocateReturnTypeName">{{ record.allocateReturnTypeName }}</span>
-          </div>
-        </template>
-        <template slot="footer">
-          <a-row :gutter="15">
-            <a-col :md="4" :sm="24"></a-col>
-            <a-col :md="4" :sm="24">退货总数量:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</a-col>
-            <a-col :md="4" :sm="24">坏件总数量:{{ (totalData && (totalData.totalBadQty || totalData.totalBadQty==0)) ? totalData.totalBadQty : '--' }}</a-col>
-            <a-col :md="4" :sm="24">返库总数量:{{ (totalData && (totalData.totalBackStockQty || totalData.totalBackStockQty==0)) ? totalData.totalBackStockQty : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_transferReturnReportList_salesPrice')">退货总金额:{{ (totalData && (totalData.totalPrice || totalData.totalPrice==0)) ? toThousands(totalData.totalPrice) : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_transferReturnReportList_costPrice')">退货总成本:{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? toThousands(totalData.totalCost) : '--' }}</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.id"
+          :columns="columns"
+          :data="loadData"
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ x: 1100 ,y: tableHeight-30 }"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 调拨类型 -->
+          <template slot="allocateType" slot-scope="text, record">
+            <div>
+              <span v-if="record.allocateSortName">{{ record.allocateSortName }}</span>
+              <span v-if="record.allocateSortName&&record.allocateReturnTypeName">/</span>
+              <span v-if="record.allocateReturnTypeName">{{ record.allocateReturnTypeName }}</span>
+            </div>
+          </template>
+          <template slot="footer">
+            <a-row :gutter="15">
+              <a-col :md="4" :sm="24"></a-col>
+              <a-col :md="4" :sm="24">退货总数量:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</a-col>
+              <a-col :md="4" :sm="24">坏件总数量:{{ (totalData && (totalData.totalBadQty || totalData.totalBadQty==0)) ? totalData.totalBadQty : '--' }}</a-col>
+              <a-col :md="4" :sm="24">返库总数量:{{ (totalData && (totalData.totalBackStockQty || totalData.totalBackStockQty==0)) ? totalData.totalBackStockQty : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_transferReturnReportList_salesPrice')">退货总金额:{{ (totalData && (totalData.totalPrice || totalData.totalPrice==0)) ? toThousands(totalData.totalPrice) : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_transferReturnReportList_costPrice')">退货总成本:{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? toThousands(totalData.totalCost) : '--' }}</a-col>
+            </a-row>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 导出提示框 -->
+      <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+    </a-card>
+  </div>
 </template>
 
 <script>
@@ -139,10 +144,10 @@ export default {
         allocateSortSn: undefined,
         allocateReturnTypeSn: undefined,
         targetType: undefined,
-        subareaArea:{
+        subareaArea: {
           subareaSn: undefined,
           subareaAreaSn: undefined
-        },
+        }
       },
       rules: {
         'time': [{ required: true, message: '请选择退货完成日期', trigger: 'change' }]
@@ -185,7 +190,7 @@ export default {
         { title: '调拨退货类型', scopedSlots: { customRender: 'allocateType' }, width: 120, align: 'center' },
         { title: '退货总数量', dataIndex: 'totalQty', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '坏件数量', dataIndex: 'totalBadQty', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '返库数量', dataIndex: 'totalBackStockQty', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '返库数量', dataIndex: 'totalBackStockQty', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
         // { title: '退货总金额', dataIndex: 'totalPrice', width: 90, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
         // { title: '退货总成本', dataIndex: 'totalCost', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
@@ -198,6 +203,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: {
     changeAllocatype (val, opts) {
       this.allocateTypeVal = val || []
@@ -245,7 +261,7 @@ export default {
         if (valid) {
           _this.$refs.table.refresh(true)
         } else {
-          _this.$message.error("请选择退货完成日期")
+          _this.$message.error('请选择退货完成日期')
           return false
         }
       })
@@ -260,7 +276,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
     },
@@ -282,7 +298,7 @@ export default {
       this.queryParam.subareaArea.subareaSn = undefined
       this.queryParam.subareaArea.subareaAreaSn = undefined
       this.totalData = null
-      if(this.advanced){
+      if (this.advanced) {
         this.$refs.subarea.clearData()
       }
       this.allocateTypeVal = []
@@ -290,19 +306,26 @@ export default {
       this.$refs.table.clearTable()
     },
     pageInit () {
+      const _this = this
+      this.$nextTick(() => {
+        _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) {

+ 68 - 46
src/views/reportData/urchaseDetailReturn/detailList.vue

@@ -1,8 +1,8 @@
 <template>
-  <a-card size="small" :bordered="false" class="salesReturnDetailList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
+  <div>
+    <a-card size="small" :bordered="false" class="salesReturnDetailList-wrap searchBottomSpace">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div class="table-page-search-wrapper" ref="tableSearch">
         <a-form-model
           id="salesSlipReportList-form"
           ref="ruleForm"
@@ -38,7 +38,7 @@
                     allowClear></v-select>
                 </a-form-item>
               </a-col>
-              <a-col :md="5" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-model-item label="产品编码">
                   <a-input id="urchaseDetailReturn-productCode" v-model.trim="queryParam.product.code" allowClear placeholder="请输入产品编码"/>
                 </a-form-model-item>
@@ -65,7 +65,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="地区">
-                    <AreaList id="salesSlipReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+                  <AreaList id="salesSlipReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
                 </a-form-model-item>
               </a-col>
             </template>
@@ -89,44 +89,49 @@
           </a-row>
         </a-form-model>
       </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 2960 }"
-        :defaultLoadData="false"
-        bordered>
-        <!-- 附件 -->
-        <template slot="attachmentList" slot-scope="text, record">
-          <span v-if="record.attachmentList && record.attachmentList.length > 0">
-            <a
-              target="_blank"
-              style="color: #00aaff;text-decoration: underline;margin-right: 15px;"
-              :href="item.filePath"
-              v-for="item in record.attachmentList"
-              :key="item.id"
-            >
-              {{ item.fileName }}
-            </a>
-          </span>
-          <span v-else>--</span>
-        </template>
-         
-        <template slot="footer">
-          <a-row :gutter="15">
-            <a-col :md="4" :sm="24">申请退货数量:{{ (totalData && (totalData.qty || totalData.qty==0)) ? totalData.qty : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_urchaseDetailReturnList_costPrice')">退货金额:{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? toThousands(totalData.totalCost,2) : '--' }}</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" class="salesReturnDetailList-wrap">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ x: 2960 ,y: tableHeight-30 }"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 附件 -->
+          <template slot="attachmentList" slot-scope="text, record">
+            <span v-if="record.attachmentList && record.attachmentList.length > 0">
+              <a
+                target="_blank"
+                style="color: #00aaff;text-decoration: underline;margin-right: 15px;"
+                :href="item.filePath"
+                v-for="item in record.attachmentList"
+                :key="item.id"
+              >
+                {{ item.fileName }}
+              </a>
+            </span>
+            <span v-else>--</span>
+          </template>
+
+          <template slot="footer">
+            <a-row :gutter="15">
+              <a-col :md="4" :sm="24">申请退货数量:{{ (totalData && (totalData.qty || totalData.qty==0)) ? totalData.qty : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_urchaseDetailReturnList_costPrice')">退货金额:{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? toThousands(totalData.totalCost,2) : '--' }}</a-col>
+            </a-row>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 导出提示框 -->
+      <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+    </a-card>
+  </div>
 </template>
 
 <script>
@@ -233,6 +238,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) {
@@ -257,7 +273,7 @@ export default {
           }
           _this.$refs.table.refresh(true)
         } else {
-          _this.$message.error("请选择退货完成日期")
+          _this.$message.error('请选择退货完成日期')
           return false
         }
       })
@@ -294,7 +310,7 @@ export default {
       this.queryParam.supplier.districtSn = undefined
       this.queryParam.warehouseSn = undefined
       this.totalData = null
-      if(this.advanced){
+      if (this.advanced) {
         this.$refs.areaList.clearData()
       }
       this.$refs.ruleForm.resetFields()
@@ -320,21 +336,27 @@ export default {
         }
       })
     },
-    areaChange(val){
+    areaChange (val) {
       this.queryParam.supplier.provinceSn = val[0] ? val[0] : ''
       this.queryParam.supplier.citySn = val[1] ? val[1] : ''
       this.queryParam.supplier.districtSn = val[2] ? val[2] : ''
+    },
+    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) {

+ 56 - 45
src/views/reportData/urchaseReturn/list.vue

@@ -1,8 +1,8 @@
 <template>
-  <a-card size="small" :bordered="false" class="urchaseReturn-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
+  <div>
+    <a-card size="small" :bordered="false" class="urchaseReturn-wrap searchBottomSpace">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div class="table-page-search-wrapper" ref="tableSearch">
         <a-form-model
           id="urchaseReturn-form"
           ref="ruleForm"
@@ -28,10 +28,10 @@
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-                <a-form-model-item label="退货仓库">
-                  <chooseWarehouse isPermission ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
-                </a-form-model-item>
-              </a-col>
+              <a-form-model-item label="退货仓库">
+                <chooseWarehouse isPermission ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
+              </a-form-model-item>
+            </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="退货原因">
                 <v-select
@@ -59,43 +59,48 @@
           </a-row>
         </a-form-model>
       </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 1740 }"
-        :defaultLoadData="false"
-        bordered>
-        <!-- 附件 -->
-        <template slot="attachmentList" slot-scope="text, record">
-          <span v-if="record.attachmentList && record.attachmentList.length > 0">
-            <a
-              target="_blank"
-              style="color: #00aaff;text-decoration: underline;margin-right: 15px;"
-              :href="item.filePath"
-              v-for="item in record.attachmentList"
-              :key="item.id"
-            >
-              {{ item.fileName }}
-            </a>
-          </span>
-          <span v-else>--</span>
-        </template>
-        <template slot="footer">
-          <a-row :gutter="15">
-            <a-col :md="4" :sm="24">申请退货数量:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_urchaseReturnList_costPrice')">退货金额:{{ (totalData && (totalData.totalCost || totalData.totalCost==0))?totalData.totalCost : '--' }}</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.id"
+          :columns="columns"
+          :data="loadData"
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ x: 1740 ,y: tableHeight-30 }"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 附件 -->
+          <template slot="attachmentList" slot-scope="text, record">
+            <span v-if="record.attachmentList && record.attachmentList.length > 0">
+              <a
+                target="_blank"
+                style="color: #00aaff;text-decoration: underline;margin-right: 15px;"
+                :href="item.filePath"
+                v-for="item in record.attachmentList"
+                :key="item.id"
+              >
+                {{ item.fileName }}
+              </a>
+            </span>
+            <span v-else>--</span>
+          </template>
+          <template slot="footer">
+            <a-row :gutter="15">
+              <a-col :md="4" :sm="24">申请退货数量:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_urchaseReturnList_costPrice')">退货金额:{{ (totalData && (totalData.totalCost || totalData.totalCost==0))?totalData.totalCost : '--' }}</a-col>
+            </a-row>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 导出提示框 -->
+      <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+    </a-card>
+  </div>
 </template>
 
 <script>
@@ -213,7 +218,7 @@ export default {
         if (valid) {
           _this.$refs.table.refresh(true)
         } else {
-          _this.$message.error("请选择退货完成日期")
+          _this.$message.error('请选择退货完成日期')
           return false
         }
       })
@@ -244,17 +249,23 @@ export default {
       this.totalData = null
       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) {