Browse Source

列表收缩展开高度配置增加

lichao 3 years ago
parent
commit
9a145c82f1
26 changed files with 158 additions and 26 deletions
  1. 0 1
      src/views/businessManagement/deliveryNotice/configuration/mainList.json
  2. 13 1
      src/views/businessManagement/deliveryNotice/index.vue
  3. 0 1
      src/views/businessManagement/purchaseOrder/configuration/mainList.json
  4. 13 1
      src/views/businessManagement/purchaseOrder/index.vue
  5. 0 1
      src/views/businessManagement/receipt/configuration/mainList.json
  6. 13 1
      src/views/businessManagement/receipt/index.vue
  7. 0 1
      src/views/businessManagement/salesOrder/configuration/mainList.json
  8. 12 0
      src/views/businessManagement/salesOrder/index.vue
  9. 12 0
      src/views/financialManagement/billDetails/billDetails.vue
  10. 0 1
      src/views/financialManagement/billDetails/configuration/mainList.json
  11. 0 1
      src/views/financialManagement/incomeInvoice/configuration/mainList.json
  12. 13 2
      src/views/financialManagement/incomeInvoice/incomeInvoice.vue
  13. 0 1
      src/views/financialManagement/outputInvoice/configuration/mainList.json
  14. 13 2
      src/views/financialManagement/outputInvoice/outputInvoice.vue
  15. 0 1
      src/views/financialManagement/paymentSettle/configuration/mainList.json
  16. 13 1
      src/views/financialManagement/paymentSettle/paymentSettle.vue
  17. 0 1
      src/views/financialManagement/receiptSettle/configuration/mainList.json
  18. 13 1
      src/views/financialManagement/receiptSettle/receiptSettle.vue
  19. 1 1
      src/views/maintenance/integral/index.vue
  20. 1 1
      src/views/maintenance/overpayment/index.vue
  21. 0 1
      src/views/maintenance/panicBuyingInformation/configuration/mainList.json
  22. 3 1
      src/views/maintenance/priceManagement/configuration/mainList.json
  23. 24 1
      src/views/maintenance/priceManagement/index.vue
  24. 1 1
      src/views/maintenance/rebate/index.vue
  25. 0 1
      src/views/maintenance/salesPolicy/configuration/mainList.json
  26. 13 1
      src/views/maintenance/salesPolicy/index.vue

+ 0 - 1
src/views/businessManagement/deliveryNotice/configuration/mainList.json

@@ -4,7 +4,6 @@
   "tip": false,
   "stripe": true,
   "addBtnText": "创建单据",
-  "simplePage": true,
   "searchShow": true,
   "searchMenuPosition": "right",
   "dialogWidth": "60%",

+ 13 - 1
src/views/businessManagement/deliveryNotice/index.vue

@@ -22,7 +22,8 @@
                  @on-load="onLoad"
                  @tree-load="treeLoad"
                  @saveColumn="saveColumn"
-                 @resetColumn="resetColumn">
+                 @resetColumn="resetColumn"
+                 @search-criteria-switch="searchCriteriaSwitch">
         <template slot="menuLeft" slot-scope="{size}">
           <el-button type="success" :size="size" @click="copyOrder" :disabled="single">复制单据</el-button>
           <el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
@@ -194,6 +195,14 @@ export default {
     }, 100);
   },
   methods: {
+    searchCriteriaSwitch(type){
+      if (type){
+        this.option.height = this.option.height - 140
+      }else {
+        this.option.height = this.option.height + 140
+      }
+      this.$refs.crud.getTableHeight()
+    },
     //删除列表后面的删除按钮触发触发(row, index, done)
     rowDel(row, index, done) {
       this.$confirm("确定将选择数据删除?", {
@@ -359,6 +368,9 @@ export default {
       customerList(queryParams).then(res => {
         this.dataList = res.data.data.records
         this.page.total = res.data.data.total
+        if (this.page.total) {
+          this.option.height = window.innerHeight - 240;
+        }
       }).finally(() => {
         this.loading = false;
       })

+ 0 - 1
src/views/businessManagement/purchaseOrder/configuration/mainList.json

@@ -4,7 +4,6 @@
   "tip": false,
   "stripe": true,
   "addBtnText": "创建单据",
-  "simplePage": true,
   "searchShow": true,
   "searchMenuPosition": "right",
   "dialogWidth": "60%",

+ 13 - 1
src/views/businessManagement/purchaseOrder/index.vue

@@ -20,7 +20,8 @@
                  @on-load="onLoad"
                  @tree-load="treeLoad"
                  @saveColumn="saveColumn"
-                 @resetColumn="resetColumn">
+                 @resetColumn="resetColumn"
+                 @search-criteria-switch="searchCriteriaSwitch">
         <template slot="menuLeft" slot-scope="{size}">
           <el-button type="success" :size="size" icon="el-icon-copy-document" @click="copyOrder" :disabled="single">复制单据</el-button>
           <el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
@@ -238,6 +239,14 @@ export default {
     }
   },
   methods: {
+    searchCriteriaSwitch(type){
+      if (type){
+        this.option.height = this.option.height - 90
+      }else {
+        this.option.height = this.option.height + 90
+      }
+      this.$refs.crud.getTableHeight()
+    },
     //删除列表后面的删除按钮触发触发(row, index, done)
     rowDel(row, index, done) {
       this.$confirm("确定将选择数据删除?", {
@@ -396,6 +405,9 @@ export default {
       customerList(queryParams).then(res => {
         this.dataList = res.data.data.records
         this.page.total = res.data.data.total
+        if (this.page.total) {
+          this.option.height = window.innerHeight - 240;
+        }
       }).finally(() => {
         this.loading = false;
       })

+ 0 - 1
src/views/businessManagement/receipt/configuration/mainList.json

@@ -4,7 +4,6 @@
   "tip": false,
   "stripe": true,
   "addBtnText": "创建单据",
-  "simplePage": true,
   "searchShow": true,
   "searchMenuPosition": "right",
   "dialogWidth": "60%",

+ 13 - 1
src/views/businessManagement/receipt/index.vue

@@ -22,7 +22,8 @@
                  @on-load="onLoad"
                  @tree-load="treeLoad"
                  @saveColumn="saveColumn"
-                 @resetColumn="resetColumn">
+                 @resetColumn="resetColumn"
+                 @search-criteria-switch="searchCriteriaSwitch">
         <template slot="menuLeft" slot-scope="{size}">
           <el-button type="success" :size="size" @click="copyOrder" :disabled="single">复制单据</el-button>
           <el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
@@ -196,6 +197,14 @@ export default {
     }, 100);
   },
   methods: {
+    searchCriteriaSwitch(type){
+      if (type){
+        this.option.height = this.option.height - 190
+      }else {
+        this.option.height = this.option.height + 190
+      }
+      this.$refs.crud.getTableHeight()
+    },
     //删除列表后面的删除按钮触发触发(row, index, done)
     rowDel(row, index, done) {
       this.$confirm("确定将选择数据删除?", {
@@ -354,6 +363,9 @@ export default {
       customerList(queryParams).then(res => {
         this.dataList = res.data.data.records
         this.page.total = res.data.data.total
+        if (this.page.total) {
+          this.option.height = window.innerHeight - 240;
+        }
       }).finally(() => {
         this.loading = false;
       })

+ 0 - 1
src/views/businessManagement/salesOrder/configuration/mainList.json

@@ -6,7 +6,6 @@
   "lazy": true,
   "tip": false,
   "searchMenuPosition": "right",
-  "simplePage": true,
   "searchShow": true,
   "dialogWidth": "60%",
   "tree": true,

+ 12 - 0
src/views/businessManagement/salesOrder/index.vue

@@ -26,6 +26,7 @@
                  :table-loading="loading"
                  @expand-change="expandChange"
                  @resetColumn="resetColumn"
+                 @search-criteria-switch="searchCriteriaSwitch"
       >
         <template slot-scope="scope" slot="expand">
           <el-table :data="scope.row.insideList" v-loading="scope.row.loading">
@@ -202,6 +203,14 @@ export default {
     }, 100)
   },
   methods: {
+    searchCriteriaSwitch(type){
+      if (type){
+        this.option.height = this.option.height - 190
+      }else {
+        this.option.height = this.option.height + 190
+      }
+      this.$refs.crud.getTableHeight()
+    },
     tableRowClassName({row, column, rowIndex, columnIndex}) {
       if (row.orderStatus == '录入' && columnIndex == 19){
         return {
@@ -415,6 +424,9 @@ export default {
           this.$set(item,'loading', true)
         })
         this.page.total = res.data.data.total
+        if (this.page.total) {
+          this.option.height = window.innerHeight - 240;
+        }
       }).finally(() => {
         this.loading = false;
       })

+ 12 - 0
src/views/financialManagement/billDetails/billDetails.vue

@@ -17,6 +17,7 @@
                @on-load="onLoad"
                @saveColumn="saveColumn"
                @resetColumn="resetColumn"
+               @search-criteria-switch="searchCriteriaSwitch"
     >
       <template slot="corpIdSearch">
         <select-component
@@ -154,10 +155,21 @@
         getBillList(page.currentPage, page.pageSize,params).then(res=>{
           this.dataList = res.data.data.records
           this.page.total = res.data.data.total
+          if (this.page.total) {
+            this.option.height = window.innerHeight - 240;
+          }
         }).finally(()=>{
           this.loading = false;
         })
       },
+      searchCriteriaSwitch(type){
+        if (type){
+          this.option.height = this.option.height - 96
+        }else {
+          this.option.height = this.option.height + 96
+        }
+        this.$refs.crud.getTableHeight()
+      },
       //列保存触发
       async saveColumn() {
         const inSave = await this.saveColumnData(

+ 0 - 1
src/views/financialManagement/billDetails/configuration/mainList.json

@@ -1,7 +1,6 @@
 {
   "lazy": true,
   "tip": false,
-  "simplePage": true,
   "searchShow": true,
   "searchMenuSpan": 24,
   "dialogWidth": "60%",

+ 0 - 1
src/views/financialManagement/incomeInvoice/configuration/mainList.json

@@ -1,7 +1,6 @@
 {
   "lazy": true,
   "tip": false,
-  "simplePage": true,
   "searchShow": true,
   "searchMenuSpan": 16,
   "dialogWidth": "60%",

+ 13 - 2
src/views/financialManagement/incomeInvoice/incomeInvoice.vue

@@ -15,7 +15,8 @@
                @refresh-change="refreshChange"
                @saveColumn="saveColumn"
                @resetColumn="resetColumn"
-               @on-load="onLoad">
+               @on-load="onLoad"
+               @search-criteria-switch="searchCriteriaSwitch">
       <template slot="corpIdSearch">
         <select-component
           v-model="search.corpId"
@@ -190,11 +191,21 @@
         getList(page.currentPage, page.pageSize,params).then(res =>{
           this.dataList = res.data.data.records
           this.page.total = res.data.data.total
+          if (this.page.total) {
+            this.option.height = window.innerHeight - 240;
+          }
         }).finally(()=>{
           this.loading = false
         })
       },
-
+      searchCriteriaSwitch(type){
+        if (type){
+          this.option.height = this.option.height - 96
+        }else {
+          this.option.height = this.option.height + 96
+        }
+        this.$refs.crud.getTableHeight()
+      },
       goBack() {
         this.detailData=this.$options.data().detailData
         this.show = true;

+ 0 - 1
src/views/financialManagement/outputInvoice/configuration/mainList.json

@@ -1,7 +1,6 @@
 {
   "lazy": true,
   "tip": false,
-  "simplePage": true,
   "searchShow": true,
   "searchMenuSpan": 16,
   "dialogWidth": "60%",

+ 13 - 2
src/views/financialManagement/outputInvoice/outputInvoice.vue

@@ -15,7 +15,8 @@
                @refresh-change="refreshChange"
                @saveColumn="saveColumn"
                @resetColumn="resetColumn"
-               @on-load="onLoad">
+               @on-load="onLoad"
+               @search-criteria-switch="searchCriteriaSwitch">
       <template slot="corpIdSearch">
         <select-component
           v-model="search.corpId"
@@ -196,11 +197,21 @@
         getList(page.currentPage, page.pageSize,params).then(res =>{
           this.dataList = res.data.data.records
           this.page.total = res.data.data.total
+          if (this.page.total) {
+            this.option.height = window.innerHeight - 240;
+          }
         }).finally(()=>{
           this.loading = false
         })
       },
-
+      searchCriteriaSwitch(type){
+        if (type){
+          this.option.height = this.option.height - 96
+        }else {
+          this.option.height = this.option.height + 96
+        }
+        this.$refs.crud.getTableHeight()
+      },
       goBack() {
         this.detailData=this.$options.data().detailData
         this.show = true;

+ 0 - 1
src/views/financialManagement/paymentSettle/configuration/mainList.json

@@ -1,7 +1,6 @@
 {
   "lazy": true,
   "tip": false,
-  "simplePage": true,
   "searchShow": true,
   "searchMenuSpan": 16,
   "dialogWidth": "60%",

+ 13 - 1
src/views/financialManagement/paymentSettle/paymentSettle.vue

@@ -15,7 +15,8 @@
                @refresh-change="refreshChange"
                @saveColumn="saveColumn"
                @resetColumn="resetColumn"
-               @on-load="onLoad">
+               @on-load="onLoad"
+               @search-criteria-switch="searchCriteriaSwitch">
       <template slot="corpIdSearch">
         <select-component
           v-model="search.corpId"
@@ -208,10 +209,21 @@
         getList(page.currentPage, page.pageSize,params).then(res =>{
           this.dataList = res.data.data.records
           this.page.total = res.data.data.total
+          if (this.page.total) {
+            this.option.height = window.innerHeight - 240;
+          }
         }).finally(()=>{
           this.loading = false
         })
       },
+      searchCriteriaSwitch(type){
+        if (type){
+          this.option.height = this.option.height - 90
+        }else {
+          this.option.height = this.option.height + 90
+        }
+        this.$refs.crud.getTableHeight()
+      },
 
       goBack() {
         this.detailData=this.$options.data().detailData

+ 0 - 1
src/views/financialManagement/receiptSettle/configuration/mainList.json

@@ -1,7 +1,6 @@
 {
   "lazy": true,
   "tip": false,
-  "simplePage": true,
   "searchShow": true,
   "searchMenuSpan": 16,
   "dialogWidth": "60%",

+ 13 - 1
src/views/financialManagement/receiptSettle/receiptSettle.vue

@@ -15,7 +15,8 @@
                @refresh-change="refreshChange"
                @saveColumn="saveColumn"
                @resetColumn="resetColumn"
-               @on-load="onLoad">
+               @on-load="onLoad"
+               @search-criteria-switch="searchCriteriaSwitch">
       <template slot="corpIdSearch">
         <select-component
           v-model="search.corpId"
@@ -105,6 +106,14 @@
       // this.option.height = window.innerHeight - 200;
     },
     methods: {
+      searchCriteriaSwitch(type){
+        if (type){
+          this.option.height = this.option.height - 90
+        }else {
+          this.option.height = this.option.height + 90
+        }
+        this.$refs.crud.getTableHeight()
+      },
       //新单打开
       addReceipt(row){
         this.detailData = {
@@ -193,6 +202,9 @@
         getList(page.currentPage, page.pageSize,params).then(res =>{
           this.dataList = res.data.data.records
           this.page.total = res.data.data.total
+          if (this.page.total) {
+            this.option.height = window.innerHeight - 240;
+          }
         }).finally(()=>{
           this.loading = false
         })

+ 1 - 1
src/views/maintenance/integral/index.vue

@@ -157,7 +157,7 @@ export default {
           this.dataList = res.data.data.records ? res.data.data.records : [];
           this.page.total = res.data.data.total;
           if (this.page.total) {
-            this.option.height = window.innerHeight - 260;
+            this.option.height = window.innerHeight - 240;
           }
           this.dataList.forEach(item => {
             this.$set(item,'insideList',[])

+ 1 - 1
src/views/maintenance/overpayment/index.vue

@@ -108,7 +108,7 @@ export default {
           this.dataList = res.data.data.records ? res.data.data.records : [];
           this.page.total = res.data.data.total;
           if (this.page.total) {
-            this.option.height = window.innerHeight - 260;
+            this.option.height = window.innerHeight - 240;
           }
           this.dataList.forEach(item => {
             this.$set(item,'insideList',[])

+ 0 - 1
src/views/maintenance/panicBuyingInformation/configuration/mainList.json

@@ -2,7 +2,6 @@
     "lazy": true,
     "tip": false,
     "stripe": true,
-    "simplePage": true,
     "searchShow": true,
     "searchMenuSpan": 6,
     "dialogWidth": "60%",

+ 3 - 1
src/views/maintenance/priceManagement/configuration/mainList.json

@@ -3,7 +3,9 @@
     "tip": false,
     "stripe": true,
     "searchMenuPosition": "right",
-    "simplePage": true,
+  "searchIcon": true,
+  "searchIndex": 2,
+  "searchSpan": 8,
     "searchShow": true,
     "dialogWidth": "60%",
     "addBtn": false,

+ 24 - 1
src/views/maintenance/priceManagement/index.vue

@@ -7,7 +7,8 @@
         :page.sync="page"
         @search-change="searchChange"
         @on-load="onLoad"
-        @row-update="rowUpdate">
+        @row-update="rowUpdate"
+        @search-criteria-switch="searchCriteriaSwitch">
       <template slot-scope="{ row, index }" slot="salesPrice">
         <el-input
           v-if="row.$cellEdit"
@@ -130,6 +131,17 @@ export default {
       }
     }
   },
+  created() {
+    let i = 0;
+    this.option.column.forEach(item => {
+      if (item.search) i++
+    })
+    if (i % 3 !== 0){
+      const num = 3 - Number(i % 3)
+      this.option.searchMenuSpan = num * 8;
+      this.option.searchMenuPosition = "right";
+    }
+  },
   methods: {
     derivation() {
       this.$confirm("是否下载模板?", "提示", {
@@ -184,8 +196,19 @@ export default {
       customerList(queryParams).then(res => {
         this.data = res.data.data.records
         this.page.total = res.data.data.total
+        if (this.page.total) {
+          this.option.height = window.innerHeight - 240;
+        }
       })
     },
+    searchCriteriaSwitch(type){
+      if (type){
+        this.option.height = this.option.height - 90
+      }else {
+        this.option.height = this.option.height + 90
+      }
+      this.$refs.crud.getTableHeight()
+    },
     rowUpdate(form, index, done) {
       console.log(form)
       typeSave(form).then(res => {

+ 1 - 1
src/views/maintenance/rebate/index.vue

@@ -144,7 +144,7 @@ export default {
         this.dataList = res.data.data.records;
         this.page.total = res.data.data.total;
         if (this.page.total) {
-          this.option.height = window.innerHeight - 260;
+          this.option.height = window.innerHeight - 240;
         }
         this.dataList.forEach(item => {
           this.$set(item,'insideList',[])

+ 0 - 1
src/views/maintenance/salesPolicy/configuration/mainList.json

@@ -2,7 +2,6 @@
   "lazy": true,
   "tip": false,
   "stripe": true,
-  "simplePage": true,
   "searchShow": true,
   "searchIcon": true,
   "searchIndex": 2,

+ 13 - 1
src/views/maintenance/salesPolicy/index.vue

@@ -19,7 +19,8 @@
                  @size-change="sizeChange"
                  @refresh-change="refreshChange"
                  @on-load="onLoad"
-                 @tree-load="treeLoad">
+                 @tree-load="treeLoad"
+                 @search-criteria-switch="searchCriteriaSwitch">
         <template slot-scope="{}" slot="startTimeSearchLabel">
           <span>有效日期:</span>
         </template>
@@ -113,6 +114,14 @@ export default {
     }
   },
   methods: {
+    searchCriteriaSwitch(type){
+      if (type){
+        this.option.height = this.option.height - 95
+      }else {
+        this.option.height = this.option.height + 95
+      }
+      this.$refs.crud.getTableHeight()
+    },
     //删除列表后面的删除按钮触发触发(row, index, done)
     rowDel(row, index, done) {
       this.$confirm("确定将选择数据删除?", {
@@ -246,6 +255,9 @@ export default {
       customerList(queryParams).then(res => {
         this.dataList = res.data.data.records
         this.page.total = res.data.data.total
+        if (this.page.total) {
+          this.option.height = window.innerHeight - 240;
+        }
       })
     },
     //树桩列点击展开触发