lilei 2 سال پیش
والد
کامیت
291ffa64b2
2فایلهای تغییر یافته به همراه36 افزوده شده و 24 حذف شده
  1. 26 19
      src/views/reportData/productRebateReport/detailList.vue
  2. 10 5
      src/views/reportData/productRebateReport/list.vue

+ 26 - 19
src/views/reportData/productRebateReport/detailList.vue

@@ -1,7 +1,7 @@
 <template>
   <a-spin :spinning="spinning" tip="Loading...">
     <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
+    <div ref="tableSearch" class="table-page-search-wrapper">
       <a-form-model
         id="rebateDetailReport-form"
         ref="ruleForm"
@@ -89,12 +89,14 @@
     
     <!-- 列表 -->
     <s-table
-      class="sTable"
+      class="sTable fixPagination"
       ref="table"
+      :style="{ height: tableHeight+84.5+'px' }"
       size="small"
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
+      :scroll="{ y: tableHeight, x: 2000}"
       :defaultLoadData="false"
       bordered>·
       <template slot="footer">
@@ -182,23 +184,23 @@ export default {
     columns () {
       const _this = this
       const arr = [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '订单号', dataIndex: 'bizNo', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '类型', dataIndex: 'bizTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客户级别', dataIndex: 'buyerLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客户名称', dataIndex: 'indirectDealerName', width: '6%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '直接绑定客户名称', dataIndex: 'directDealerName', width: '6%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '间接绑定客户名称', dataIndex: 'buyerName', width: '6%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '品牌', dataIndex: 'productEntity.productBrandName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品分类', width: '6%', align: 'center', customRender: function (text,record) { return record.productTypeName1 + (record.productTypeName2 ? '>' : '') + (record.productTypeName2 || '') } },
-        { title: '产品编码', dataIndex: 'productEntity.code', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productEntity.name', width: '6%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '数量', dataIndex: 'qty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '分公司金额', dataIndex: 'price', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '加盟商金额', dataIndex: 'discountAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '特约加盟店金额', dataIndex: 'discountedAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '直接差价', dataIndex: 'directRebate', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '间接差价', dataIndex: 'indirectRebate', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+        { title: '序号', dataIndex: 'no', width: '60px', align: 'center' },
+        { title: '订单号', dataIndex: 'bizNo', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '类型', dataIndex: 'rebateBill.bizTypeDictValue', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户级别', dataIndex: 'rebateBill.buyerLevelDictValue', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'rebateBill.indirectDealerName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '直接绑定客户名称', dataIndex: 'rebateBill.directDealerName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '间接绑定客户名称', dataIndex: 'rebateBill.buyerName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '品牌', dataIndex: 'productEntity.productBrandName', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', width: '200px', align: 'center', customRender: function (text,record) { return record.productEntity.productTypeName1 + (record.productEntity.productTypeName2 ? '>' : '') + (record.productEntity.productTypeName2 || '') } },
+        { title: '产品编码', dataIndex: 'productEntity.code', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '数量', dataIndex: 'qty', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '分公司金额', dataIndex: 'wholesalePrice1', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '加盟商金额', dataIndex: 'wholesalePrice2', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '特约加盟店金额', dataIndex: 'wholesalePrice3', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '直接差价', dataIndex: 'directRebateAmount', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '间接差价', dataIndex: 'indirectRebateAmount', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
       ]
       return arr
     }
@@ -308,6 +310,11 @@ export default {
     pageInit () {
       this.disabled = false
       this.spinning = false
+      this.setTableH()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 340
     }
   },
   mounted () {

+ 10 - 5
src/views/reportData/productRebateReport/list.vue

@@ -1,7 +1,7 @@
 <template>
   <a-spin :spinning="spinning" tip="Loading...">
     <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
+    <div ref="tableSearch" class="table-page-search-wrapper">
       <a-form-model
         id="srebateReport-form"
         ref="ruleForm"
@@ -68,9 +68,11 @@
   
     <!-- 列表 -->
     <s-table
-      class="sTable"
+      class="sTable fixPagination"
       ref="table"
+      :style="{ height: tableHeight+84.5+'px' }"
       size="small"
+      :scroll="{ y: tableHeight }"
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
@@ -251,18 +253,21 @@ export default {
         }
       })
     },
-    pageInit () {}
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 240
+    }
   },
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
+      this.setTableH()
       this.resetSearchForm()
     }
   },
   activated () {
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
-      this.pageInit()
+      this.setTableH()
       this.resetSearchForm()
     }
   },