Explorar o código

余额变动明细

shish hai 1 ano
pai
achega
2341c18a5f
Modificáronse 1 ficheiros con 79 adicións e 10 borrados
  1. 79 10
      ghs/src/views/member/custom-balance-list.vue

+ 79 - 10
ghs/src/views/member/custom-balance-list.vue

@@ -13,11 +13,18 @@
 				<span> {{ scope.row.io == 1 ? '+' : '-' }} {{ scope.row.amount }} </span>
 				<span> {{ scope.row.io == 1 ? '+' : '-' }} {{ scope.row.amount }} </span>
 			</template>
 			</template>
 
 
-			<template #slot-cp-term-list="{scope}">
+			<template #slot-search-list="{scope}">
+
 				<el-select @change="getCurrentCp" v-model="currentCustomName" filterable remote reserve-keyword placeholder="搜索客户" clearable 
 				<el-select @change="getCurrentCp" v-model="currentCustomName" filterable remote reserve-keyword placeholder="搜索客户" clearable 
 				:remote-method="searchCpInfo" :loading="loading" style="width:200px;margin-right:10px;" size="mini">
 				:remote-method="searchCpInfo" :loading="loading" style="width:200px;margin-right:10px;" size="mini">
     				<el-option v-for="item in customInfoList" :key="item.id" :label="`${item.name}(${item.id})`" :value="item.id"> </el-option>
     				<el-option v-for="item in customInfoList" :key="item.id" :label="`${item.name}(${item.id})`" :value="item.id"> </el-option>
   				</el-select>
   				</el-select>
+
+				<span style="margin-left:9px;font-size:20px;">充值时间:</span>
+				<el-date-picker v-model="currentDateList" type="daterange" align="right" unlink-panels range-separator="至" start-placeholder="开始日期" @change="getSearchDate" value-format="yyyy-MM-dd"
+				class="custom-date-picker" end-placeholder="结束日期" :picker-options="pickerOptions" size="mini" style="margin-right:8px;">
+				</el-date-picker>
+
 			</template>
 			</template>
 
 
 
 
@@ -43,18 +50,47 @@ export default {
 			customInfoList: [],
 			customInfoList: [],
 			loading: false,
 			loading: false,
 			currentCustomName:'',
 			currentCustomName:'',
-			customId:0
+			customId:0,
+			pickerOptions: {
+            shortcuts: [{
+                text: '最近一周',
+                onClick(picker) {
+                const end = new Date();
+                const start = new Date();
+                start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+                picker.$emit('pick', [start, end]);
+                }
+            }, {
+                text: '最近一个月',
+                onClick(picker) {
+                const end = new Date();
+                const start = new Date();
+                start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+                picker.$emit('pick', [start, end]);
+                }
+            }, {
+                text: '最近三个月',
+                onClick(picker) {
+                const end = new Date();
+                const start = new Date();
+                start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+                picker.$emit('pick', [start, end]);
+                }
+            }]
+      		},
+			startTime:'',
+			endTime:'',
+			searchTime:'',
+			currentDateList:[],
 		};
 		};
 	},
 	},
 	methods: {
 	methods: {
 		onLoad({ ctx, app }) {
 		onLoad({ ctx, app }) {
 			this.app = app;
 			this.app = app;
-
 			if (this.$route.query.customId) {
 			if (this.$route.query.customId) {
 				this.customId = this.$route.query.customId;
 				this.customId = this.$route.query.customId;
 				this.currentCustomName = this.$route.query.customName ? this.$route.query.customName : ''
 				this.currentCustomName = this.$route.query.customName ? this.$route.query.customName : ''
 			}
 			}
-
 			ctx.service(this.$service.customBalanceChange)
 			ctx.service(this.$service.customBalanceChange)
 				.set('table', {
 				.set('table', {
 					columns: [
 					columns: [
@@ -74,13 +110,31 @@ export default {
 							prop: 'customId',
 							prop: 'customId',
 							label: '客户ID',
 							label: '客户ID',
 							align: 'center',
 							align: 'center',
+							width: 100
+						},
+						{
+							prop: 'customName',
+							label: '客户名称',
+							align: 'center',
 							width: 150
 							width: 150
 						},
 						},
+						{
+							prop: 'capitalType',
+							label: '类型',
+							align: 'center',
+							width: 120
+						},
+						{
+							prop: 'payWay',
+							label: '渠道',
+							align: 'center',
+							width: 120
+						},
 						{
 						{
 							prop: 'event',
 							prop: 'event',
 							label: '事项',
 							label: '事项',
 							align: 'center',
 							align: 'center',
-							width: 260
+							width: 200
 						},
 						},
 						{
 						{
 							prop: 'staffName',
 							prop: 'staffName',
@@ -104,13 +158,13 @@ export default {
 							prop: 'remark',
 							prop: 'remark',
 							label: '备注',
 							label: '备注',
 							align: 'center',
 							align: 'center',
-							width: 280
+							width: 200
 						}
 						}
 					],
 					],
 					op: {
 					op: {
 						visible: true,
 						visible: true,
 						props: {
 						props: {
-							width: 220,
+							width: 100,
 							align: 'center',
 							align: 'center',
 							fixed: 'right',
 							fixed: 'right',
 							label: '操作'
 							label: '操作'
@@ -128,17 +182,20 @@ export default {
 				})
 				})
 				.set('layout', [
 				.set('layout', [
 					['slot-tabs'],
 					['slot-tabs'],
-					['slot-cp-term-list','slot-billing'],
+					['slot-search-list'],
 					['data-table'],
 					['data-table'],
 					['flex1', 'pagination']
 					['flex1', 'pagination']
 				])
 				])
 				.done();
 				.done();
-				app.refresh({type:0,customId:this.customId })
+				this.refreshData()
 		},
 		},
 		getCurrentCp(e){
 		getCurrentCp(e){
 			this.customId = e
 			this.customId = e
-			this.app.refresh({ customId:this.customId,type:0 })
+			this.refreshData()
 		},
 		},
+		refreshData(){
+      		this.app.refresh({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,customId:this.customId})
+    	},
 		searchCpInfo(query) {
 		searchCpInfo(query) {
 			let that = this
 			let that = this
 			if (query !== '') {
 			if (query !== '') {
@@ -151,6 +208,18 @@ export default {
 				this.customInfoList = []
 				this.customInfoList = []
 			}
 			}
 		},
 		},
+		getSearchDate(){
+			if (this.$util.isEmpty(this.currentDateList)) {
+				this.searchTime = ''
+				this.startTime = ''
+				this.endTime = ''
+			}else{
+				this.searchTime = 'custom'
+				this.startTime = this.currentDateList[0]
+				this.endTime = this.currentDateList[1]
+			}
+			this.refreshData()
+		}
 	}
 	}
 };
 };
 </script>
 </script>