shish 3 лет назад
Родитель
Сommit
bb509f4ce2
1 измененных файлов с 40 добавлено и 12 удалено
  1. 40 12
      ghsApp/src/admin/stat/clear.vue

+ 40 - 12
ghsApp/src/admin/stat/clear.vue

@@ -2,13 +2,13 @@
 <view class="app-content">
 <view class="app-content">
 	<view class="ex-page">
 	<view class="ex-page">
 		<view class="top-bar">
 		<view class="top-bar">
-			<DateSelect class="bar" top="0" defaultShowName="开单时间" @selectDateFn="selectDateFn" />
-			<DateSelect class="bar" top="0" defaultShowName="结账时间" @selectDateFn="selectDateFn" />
+			<DateSelect class="bar" top="0" defaultShowName="开单时间" @selectDateFn="selectKdDateFn" />
+			<DateSelect class="bar" top="0" defaultShowName="结账时间" @selectDateFn="selectClearDateFn" />
 		</view>
 		</view>
 		<view style="position:absolute;top:80upx;">
 		<view style="position:absolute;top:80upx;">
-			<text style="margin-left:140upx;color:#333333;">选客户</text>
-			<text style="margin-left:130upx;color:#333333;">待结清</text>
-			<text style="margin-left:130upx;color:#333333;">重置</text>
+			<text style="margin-left:140upx;color:#666666;" @click="selectCustom()">选客户</text>
+			<text style="margin-left:130upx;color:#666666;" @click="showUnClear()">待结清</text>
+			<text style="margin-left:130upx;color:#666666;" @click="resetData()">重置</text>
 		</view>
 		</view>
 		<view class="main-view">
 		<view class="main-view">
 			<view class="space-view ex-table">
 			<view class="space-view ex-table">
@@ -46,7 +46,7 @@
 											<t-td>
 											<t-td>
 												<block v-if="item.debtPrice && Number(item.debtPrice)>0">
 												<block v-if="item.debtPrice && Number(item.debtPrice)>0">
 													<view style="color:#CCCCCC;font-weight:bold;" v-if="item.clearId && Number(item.clearId)>0">已结清</view>
 													<view style="color:#CCCCCC;font-weight:bold;" v-if="item.clearId && Number(item.clearId)>0">已结清</view>
-													<view style="color:red;font-weight:bold;font-size:30upx;" v-else>欠款</view>
+													<view style="color:red;font-weight:bold;font-size:30upx;" v-else>待结清</view>
 												</block>
 												</block>
 												<block v-else>
 												<block v-else>
 													<view style="color:red;font-weight:bold;">-</view>
 													<view style="color:red;font-weight:bold;">-</view>
@@ -78,10 +78,14 @@ export default {
 	computed: {		...mapGetters(["getDictionariesInfo","getLoginInfo"])	},
 	computed: {		...mapGetters(["getDictionariesInfo","getLoginInfo"])	},
 	data() {
 	data() {
 		return {
 		return {
-			params:{
-				searchTime:'',
+			form:{
+				payTime:'',
 				startTime: "",
 				startTime: "",
 				endTime: "",
 				endTime: "",
+				customId:0,
+				customName:'',
+				unClear:0,
+				timeStyle:0
 			},
 			},
 			profile:[],
 			profile:[],
 			searchText:'',
 			searchText:'',
@@ -93,17 +97,41 @@ export default {
 			uni.stopPullDownRefresh();
 			uni.stopPullDownRefresh();
 		});
 		});
 	},
 	},
+	onShow(){
+		if(this.form.customId && Number(this.form.customId)>0){
+			this.getList()
+		}
+	},
 	methods: {
 	methods: {
 		...mapActions(['setUserShopAll']),
 		...mapActions(['setUserShopAll']),
+		resetData(){
+			this.form.unClear = 0
+			this.form.customId = 0
+			this.form.customName = ''
+			this.getList()
+		},
+		showUnClear(){
+			this.form.unClear = 1
+			this.getList()
+		},
 		goClear(order){
 		goClear(order){
 			this.$util.pageTo({ url: '/pagesArrears/details?id='+order.customId})
 			this.$util.pageTo({ url: '/pagesArrears/details?id='+order.customId})
 		},
 		},
+		selectCustom(){
+			this.pageTo({ url: '/admin/custom/selectCustom?style=2'})
+		},
 		searchFn(e){
 		searchFn(e){
 			this.searchText = e;
 			this.searchText = e;
 		},
 		},
-		selectDateFn(val) {
-			this.params = {...this.params,...val}
-			this.init();			
+		selectKdDateFn(val) {
+			this.form.timeStyle = 0
+			this.form = {...this.form,...val}
+			this.init();
+		},
+		selectClearDateFn(val){
+			this.form.timeStyle = 1
+			this.form = {...this.form,...val}
+			this.init();
 		},
 		},
 		async init() {
 		async init() {
 			this.getList();
 			this.getList();
@@ -111,7 +139,7 @@ export default {
 		getList() {
 		getList() {
 			let that = this
 			let that = this
 			uni.showLoading()
 			uni.showLoading()
-			getStatOrderClear(this.params).then(res => {
+			getStatOrderClear(this.form).then(res => {
 				uni.hideLoading()
 				uni.hideLoading()
 				that.profile = res.data
 				that.profile = res.data
 			});
 			});