loki 3 anni fa
parent
commit
f1e282c770

+ 7 - 2
src/api/scene/index.js

@@ -4,8 +4,13 @@ export const getPage = params =>
 	api.post(`/yxl-back-end/admin/kindergarten/page`, params);
 export const getItem = ({ id, ...params }) =>
 	api.get(`/yxl-back-end/admin/kindergarten/${id}`, params);
-export const saveItem = params =>
-	api.post(`/yxl-back-end/admin/kindergarten/save`, params);
+export const saveItem = ({ id, ...params }) => {
+	if (id) {
+		return api.put(`/yxl-back-end/admin/kindergarten/${id}`, params);
+		// } else {
+		// 	return api.post(`/yxl-back-end/admin/kindergarten`, params);
+	}
+};
 export const delItem = ({ id, ...params }) =>
 	api.del(`/yxl-back-end/admin/kindergarten/${id}`, params);
 export const auditItem = ({ id, ...params }) =>

+ 1 - 1
src/api/statistics/withdrawalRecord.js

@@ -1,6 +1,6 @@
 import api from '@/utils/request';
 
-export const getList = params =>
+export const getPage = params =>
 	api.post(`/yxl-back-end/admin/withdrawal/record/page`, params);
 export const getItem = ({ id, ...params }) =>
 	api.get(`/yxl-back-end/admin/withdrawal/record/${id}`, params);

+ 15 - 15
src/views/statistics/withdrawalRecord/index.vue

@@ -15,7 +15,7 @@
 <script>
 import toolbar from './toolbar';
 import mxFilterList from '@/mixins/filterList';
-import { getList } from '@/api/statistics/withdrawalRecord';
+import { getPage } from '@/api/statistics/withdrawalRecord';
 
 export default {
   name: 'WithdrawalRecord',
@@ -24,7 +24,7 @@ export default {
 
   mixins: [
     mxFilterList({
-      fetchList: getList // 在下方data再声明一个 fetchList: iGetList 同等效果
+      fetchList: getPage // 在下方data再声明一个 fetchList: iGetList 同等效果
     })
   ],
 
@@ -34,33 +34,38 @@ export default {
         {
           key: 'id',
           name: '提现编号',
-          width: '160'
+          minWidth: this.$col.m
         },
         {
           key: 'accountName',
           name: '提现用户',
-          width: '160'
+          width: this.$col.m
         },
         {
           key: 'phonenumber',
-          name: '手机号',
-          width: '120'
+          minWidth: '手机号',
+          width: this.$col.b
         },
         {
           key: 'channels',
-          name: '提现渠道',
-          width: '120'
+          minWidth: '提现渠道',
+          width: this.$col.s
         },
         {
           key: 'value',
           name: '提现金额',
-          minWidth: '80',
+          minWidth: this.$col.s,
           render: (h, { row }) => h('span', `¥${row.value}`)
         },
         {
+          key: 'createAt',
+          name: '提现时间',
+          width: this.$col.b
+        },
+        {
           key: 'auditStatus',
           name: '状态',
-          width: '80',
+          width: this.$col.s,
           type: 'tag',
           fetchTagType: val => {
             switch (val) {
@@ -88,11 +93,6 @@ export default {
           }
         },
         {
-          key: 'createAt',
-          name: '提现时间',
-          width: '140'
-        },
-        {
           key: 'action',
           name: '操作',
           width: '120',

+ 13 - 3
src/views/statistics/withdrawalRecord/toolbar.vue

@@ -3,6 +3,8 @@
 </template>
 
 <script>
+import AUDITTYPE from '@/const/auditType';
+
 export default {
   name: 'WithdrawalRecordToolbar',
 
@@ -11,20 +13,28 @@ export default {
       fields: [
         {
           type: 'text',
-          name: 'title',
+          name: 'nickname',
           label: '用户名称'
         },
         {
           type: 'text',
-          name: 'status',
+          name: 'phonenumber',
           label: '用户手机号',
           labelWidth: '100px'
         },
         {
+          type: 'select',
+          name: 'status',
+          label: '状态',
+          options: AUDITTYPE,
+          format: val => val,
+          defaultValue: 0
+        },
+        {
           type: 'dateArray',
           name: 'date',
           label: '反馈日期',
-          apiName: ['start', 'end']
+          apiName: ['startTime', 'endTime']
         }
       ]
     };