瀏覽代碼

溢付款、积分增加查询功能

lichao 3 年之前
父節點
當前提交
eab15d9970

+ 3 - 3
src/views/maintenance/integral/config/mainList.json

@@ -26,7 +26,7 @@
       "searchSpan": 8
     },{
       "label": "积分",
-      "prop": "a",
+      "prop": "inPoints",
       "search": false,
       "index": 2,
       "minWidth": 80,
@@ -34,7 +34,7 @@
       "searchSpan": 8
     },{
       "label": "兑换",
-      "prop": "b",
+      "prop": "outPoints",
       "search": false,
       "index": 3,
       "minWidth": 80,
@@ -42,7 +42,7 @@
       "searchSpan": 8
     },{
       "label": "积分余额",
-      "prop": "c",
+      "prop": "balancePoints",
       "search": false,
       "index": 4,
       "minWidth": 80,

+ 28 - 3
src/views/maintenance/integral/index.vue

@@ -15,13 +15,24 @@
         @on-load="onLoad"
         :table-loading="loading"
         @saveColumn="saveColumn"
-      ></avue-crud>
+      >
+        <template slot="corpIdSearch">
+          <crop-select
+            v-model="search.corpId"
+            corpType="KH"
+          ></crop-select>
+        </template>
+        <template slot-scope="scope" slot="corpId">
+          {{ scope.row.corpName }}
+        </template>
+      </avue-crud>
     </basic-container>
   </div>
 </template>
 
 <script>
-import option from './config/mainList.json'
+import option from './config/mainList.json';
+import {getList} from '@/api/maintenance/integral';
 
 export default {
   name: "index",
@@ -53,6 +64,7 @@ export default {
   },
   methods: {
     searchChange(params, done) {
+      this.onLoad(this.page, params);
       done();
     },
     currentChange(val) {
@@ -65,7 +77,20 @@ export default {
     refreshChange() {
       this.onLoad(this.page, this.search);
     },
-    onLoad(page, params) {},
+    onLoad(page, params) {
+      this.loading = true;
+      getList(page.currentPage, page.pageSize, params)
+        .then(res => {
+          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;
+          }
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
     async saveColumn() {},
   },
 }

+ 3 - 3
src/views/maintenance/overpayment/config/mainList.json

@@ -26,7 +26,7 @@
       "searchSpan": 8
     },{
       "label": "增加",
-      "prop": "a",
+      "prop": "inOverpayment",
       "search": false,
       "index": 2,
       "minWidth": 80,
@@ -34,7 +34,7 @@
       "searchSpan": 8
     },{
       "label": "使用",
-      "prop": "b",
+      "prop": "outOverpaymen",
       "search": false,
       "index": 3,
       "minWidth": 80,
@@ -42,7 +42,7 @@
       "searchSpan": 8
     },{
       "label": "余额",
-      "prop": "c",
+      "prop": "balanceOverpaymen",
       "search": false,
       "index": 4,
       "minWidth": 80,

+ 27 - 2
src/views/maintenance/overpayment/index.vue

@@ -15,13 +15,24 @@
         @on-load="onLoad"
         :table-loading="loading"
         @saveColumn="saveColumn"
-      ></avue-crud>
+      >
+        <template slot="corpIdSearch">
+          <crop-select
+            v-model="search.corpId"
+            corpType="KH"
+          ></crop-select>
+        </template>
+        <template slot-scope="scope" slot="corpId">
+          {{ scope.row.corpName }}
+        </template>
+      </avue-crud>
     </basic-container>
   </div>
 </template>
 
 <script>
 import option from './config/mainList.json';
+import {getList} from '@/api/maintenance/overpayment';
 
 export default {
   name: "index",
@@ -53,6 +64,7 @@ export default {
   },
   methods: {
     searchChange(params, done) {
+      this.onLoad(this.page, params);
       done();
     },
     currentChange(val) {
@@ -65,7 +77,20 @@ export default {
     refreshChange() {
       this.onLoad(this.page, this.search);
     },
-    onLoad(page, params) {},
+    onLoad(page, params) {
+      this.loading = true;
+      getList(page.currentPage, page.pageSize, params)
+        .then(res => {
+          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;
+          }
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
     async saveColumn() {},
   },
 }