shish 4 年之前
父節點
當前提交
77e400c410

+ 3 - 3
ghsApp/src/admin/home/order.vue

@@ -115,7 +115,7 @@ export default {
       },
       searchType:0,
       searchTypeName:'客户',
-      selectTime:'',
+      searchTime:'',
       startTime:'',
       endTime:''
     };
@@ -165,7 +165,7 @@ export default {
       })
     },
     selectDateFn(val) {
-      this.selectTime = val.selectTime
+      this.searchTime = val.searchTime
       this.startTime = val.startTime
       this.endTime = val.endTime
       this.resetList();
@@ -178,7 +178,7 @@ export default {
     },
     _list() {
       return getListB({
-        searchTime: this.selectTime,
+        searchTime: this.searchTime,
         startTime: this.startTime,
         endTime: this.endTime,
         status: this.tabs[this.tabIndex].id,

+ 0 - 1
ghsApp/src/admin/statistics/incomeStat.vue

@@ -42,7 +42,6 @@ export default {
 		return {
 			isShow:false,
 			customizationTime:'',
-			selectTimeId:'',//选择时间id
 			shopId:'',//选择分店id
 			itemId:'',
 			nowTime: "",

+ 0 - 1
ghsApp/src/admin/statistics/kdIncome.vue

@@ -46,7 +46,6 @@ export default {
 			customizationTime:'',
 			menuTimeObj:'',
 			menuShopObj:'',
-			selectTimeId:'',
 			shopId:'',
 			itemId:'',
 			nowTime: "",

+ 5 - 0
ghsApp/src/api/arrears/index.js

@@ -23,3 +23,8 @@ export const getOrderDebtListApi = id => {
 export const clearOrderApi = id => {
 	return https.post("/order-clear/clear", id);
 };
+
+//获取欠款单列表 ssh 20220116
+export const getDebtOrderList = data => {
+	return https.get("/order/debt-list", data);
+};

+ 2 - 2
ghsApp/src/components/module/dateSelect.vue

@@ -125,7 +125,7 @@ export default {
             }
             this.dropdownShow = false
             this.defaultDateName = '时间段'
-            this.$emit('selectDateFn',{selectTime:'custom',startTime:this.startDate,endTime:this.endDate})
+            this.$emit('selectDateFn',{searchTime:'custom',startTime:this.startDate,endTime:this.endDate})
         },
         cancelPicker(){
             this.showPicker = false;
@@ -136,7 +136,7 @@ export default {
         changeDateOption(val){
             this.dropdownShow = false;
             this.defaultDateName = val.name;
-            this.$emit('selectDateFn',{selectTime:val.value})
+            this.$emit('selectDateFn',{searchTime:val.value})
         }
     }
 }

+ 50 - 55
ghsApp/src/pagesArrears/details.vue

@@ -3,10 +3,10 @@
 		<view class="top-view">
 			<view class="top-row">
 				<view class="info-item">
-					<text class="name">客户:</text>
 					<image class="logo" :src="customInfo.smallAvatar"/>
 					<text class="name">{{ customInfo.name || "" }}</text>
 				</view>
+				<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" defaultShowName='时间' />
 			</view>
 		</view>
 		<view scroll-y class="shop-list">
@@ -27,22 +27,15 @@
 		<view class="bar-view">
 			<template>
 				<view class="info-view">
-          <view
-            class="details-select"
-            @click="allCheck"
-          >
-            <text
-              class="iconfont iconxuanzhong"
-              v-if="isAllCheck"
-            > </text>
-            <text
-              class="iconfont iconweixuanzhong"
-              v-else
-            > </text>
-          </view>
-					已选 <text class="price">{{ selectList.length }}</text> 笔,
+					<view class="details-select" @click="checkFn()" >
+
+						<button class="admin-button-com blue mini-btn" v-if="isAllCheck">全不选</button>
+						<button class="admin-button-com blue mini-btn" v-else>全选</button>
+
+					</view>
+					已选 <text class="price">{{ selectList.length }}</text> 笔
 					<text class="unit">¥</text>
-					<text class="price">{{ selectTotalAmount }}</text>
+					<text class="price">{{ parseFloat(selectTotalAmount) }}</text>
 				</view>
 			</template>
 			<view class="btn-view">
@@ -70,11 +63,11 @@
 <script>
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import DetailsItem from "./detailsItem";
-import { getOrderDebtListApi,clearOrderApi } from "@/api/arrears/index";
+import { getDebtOrderList,clearOrderApi } from "@/api/arrears/index";
+import DateSelect from "@/components/module/dateSelect";
 import ModalModule from "@/components/plugin/modal";
-
 export default {
-	components: { AppWrapperEmpty, ModalModule,DetailsItem },
+	components: { AppWrapperEmpty, ModalModule,DetailsItem,DateSelect },
 	data() {
 		return {
 			modifyPrice:null,
@@ -86,7 +79,10 @@ export default {
 			isModel: false,
 			payWayList:[{name:"微信",id:0},{name:"支付宝",id:1},{name:"现金",id:4},{name:"银行卡",id:5}],
 			payWayindex:0,
-			payWay:0
+			payWay:0,
+			searchTime:'',
+			startTime:'',
+			endTime:''
 		};
 	},
 	onPullDownRefresh() {
@@ -109,7 +105,6 @@ export default {
 					}
 				}
 			}
-			console.log(list)
 			return list;
 		},
 		selectTotalAmount() {
@@ -125,15 +120,15 @@ export default {
 			return amount.toFixed(2);
 		}
 	},
-  watch: {
-    selectList () {
-      if (this.selectList.length === this.detailsList.length) {
-        this.isAllCheck = true
-      } else {
-        this.isAllCheck = false
-      }
-    }
-  },
+	watch: {
+		selectList () {
+		if (this.selectList.length === this.detailsList.length) {
+			this.isAllCheck = true
+		} else {
+			this.isAllCheck = false
+		}
+		}
+	},
 	methods: {
 		payWayChange(e){
 			let index = e.detail.value
@@ -150,9 +145,7 @@ export default {
 		affirm(val) {
 			if (val.index === 0) {
 				this.isModel = false;
-				console.log('取消')
 			} else {
-
 				let ids = this.selectList.map(ele => {
 					return {id:ele.id};
 				});
@@ -162,17 +155,22 @@ export default {
 					payWay:this.payWay
 				}
 				this.paySuccess(parameter)
-				console.log('确认')
 			}
 		},
+		selectDateFn(val){
+			this.searchTime = val.searchTime
+			this.startTime = val.startTime
+			this.endTime = val.endTime
+			this.initData().then(res => {
+				uni.stopPullDownRefresh()
+			})
+		},
 		async initData() {
 			try {
-				this.listLoading = true;
-				const {
-					data: { customInfo, num, list }
-				} = await getOrderDebtListApi(this.option.id);
-				this.customInfo = customInfo;
-				this.num = num;
+				this.listLoading = true
+				const {data: { customInfo, num, list }} = await getDebtOrderList({id:this.option.id,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime})
+				this.customInfo = customInfo
+				this.num = num
 				this.detailsList = list.map(ele => {
 					return {
 						...ele,
@@ -180,23 +178,20 @@ export default {
 					};
 				});
 			} catch (error) {
+
 			} finally {
 				this.listLoading = false;
 			}
 		},
-    // 全选
-    allCheck () {
-      this.isAllCheck = !this.isAllCheck
-      if (this.isAllCheck) {
-        this.detailsList.map(ele => {
-          ele.checked = true
-        });
-      } else {
-        this.detailsList.map(ele => {
-          ele.checked = false
-        });
-      }
-    },
+		//全选与全不选
+		checkFn() {
+			this.isAllCheck = !this.isAllCheck
+			if (this.isAllCheck) {
+				this.detailsList.map(ele => { ele.checked = true })
+			} else {
+				this.detailsList.map(ele => { ele.checked = false })
+			}
+		},
 		checkItemEvent(item) {
 			for (let index = 0; index < this.detailsList.length; index++) {
 				const element = this.detailsList[index].id;
@@ -312,14 +307,14 @@ export default {
 				color: #dddddd;
 			}
 			.price {
-				margin: 0 5upx;
+				margin: 0 3upx;
 				color: $redColor;
 				font-size: 32upx;
 			}
 			.unit {
-				margin: 0 10upx;
+				margin: 0 3upx;
 				color: $redColor;
-				font-size: 16upx;
+				font-size: 25upx;
 			}
 		}
 		.btn-view {

+ 4 - 4
ghsApp/src/pagesArrears/detailsItem.vue

@@ -6,14 +6,14 @@
 		</view>
 		<view class="details-main">
 			<view class="item-header">
-				<text class="name">销售单 | {{info.orderSn}} </text>
+				<text class="name">订单 {{info.orderSn}} </text>
 			</view>
 			<view class="item-row">
-				<view class="mark">{{ info.addTime }}</view>
+				<view class="mark">{{ info.addTime.substr(0,16) }}</view>
 			</view>
 			<view class="item-row">
-				<view class="price">金额:{{ info.realPrice }}</view>
-				<view class="price" style="font-weight:normal;color:#3385FF;font-size:30upx;" @click.stop="goToDetai(info)">查看明细</view>
+				<view class="price">金额:{{ parseFloat(info.realPrice) }}</view>
+				<view class="price" style="font-weight:normal;color:#3385FF;font-size:33upx;" @click.stop="goToDetai(info)">查看明细</view>
 			</view>
 		</view>
 	</view>

+ 0 - 30
ghsApp/src/pagesStorehouse/stockWarn/detailed.vue

@@ -161,36 +161,6 @@ export default {
 	},
 	methods: {
 		...mapActions(['setUserShopAll']),
-		// 选择分店
-		selectShopSussess(val){
-			this.params.shopId = val.selectItem.id;
-			this.init();
-		},
-		//选择时间
-		selectSussess(val) {
-			this.params.selectTime = this.selectTimeId;
-			if(val.select=='自定义'){
-				this.selectTime();
-			}else{
-				this.init();
-			}
-
-		},
-		//选择时间-自定义时间
-		selectTime(){
-			this.customizationTime = [time,time],
-				this.isShow = true;
-		},
-		//选择自定义时间确定
-		timeChange(e){
-			this.isShow = false;
-			this.params.startTime = e[0]
-			this.params.endTime = e[1]
-			this.init();
-		},
-		//选择自定义时间取消
-		timeCancel(e){this.isShow = false;},
-
 		async init() {
 			this._list();
 		},