孤鹤 2 gadi atpakaļ
vecāks
revīzija
e3aebce43c
1 mainītis faili ar 41 papildinājumiem un 38 dzēšanām
  1. 41 38
      pages/views/salesSlip/orderDetails.vue

+ 41 - 38
pages/views/salesSlip/orderDetails.vue

@@ -101,7 +101,7 @@
 		<view v-if="isDisabled"
 			style="width: 100%;position: fixed;bottom: 0;background-color: #fff;border-top: 1rpx solid #ccc;padding-bottom: env(safe-area-inset-bottom);z-index: 10;">
 			<view style="width: 100%;display: flex;font-size: 24rpx;height: 80rpx;">
-				<view @click="requestRefund" v-if="!form.status == '已收货'"
+				<view @click="requestRefund" v-if="form.status == '已发货'"
 					style="width: 50%;display: grid;background-color: #b3b3b3;justify-items: center;height: 100%;align-items: center;">
 					<!-- <u-icon name="close" color="#fff"></u-icon> -->
 					<view style="color: #fff;">申请退款</view>
@@ -169,11 +169,12 @@
 				console.log(234324324);
 				this.form = res.data
 				console.log(this.form);
-				if (this.form.status == '已发货' ) {
+				if (this.form.status == '已发货') {
 					_this.isDisabled = true;
 					_this.order = "确认收货";
 				} else if (this.form.status == '录入' || this.form.status == '退款中' || this.form.status == '已取消' ||
-					this.form.status == '退款请核' || this.form.status == '已收货' || this.form.status == '待发货' || this.form.status == '待确认') {
+					this.form.status == '退款请核' || this.form.status == '已收货' || this.form.status == '待发货' || this
+					.form.status == '待确认') {
 					_this.order = "申请退款";
 					_this.isDisabled = true;
 				} else {
@@ -201,7 +202,7 @@
 								title: '退款中',
 								mask: true
 							});
-							
+
 							checkOrder({
 								id: _this.form.id,
 								pageLabel: "销售订单",
@@ -234,41 +235,43 @@
 			},
 			orderClosing() {
 				console.log(123);
-				this.requestRefund()
-				return
 				if (this.order == "申请退款") {
-					uni.showLoading({
-						title: '退款中',
-						mask: true
-					});
-					checkOrder({
-						id: this.form.id,
-						pageLabel: "销售订单",
-						pageStatus: "this.$store.getters.domSaleStatus",
-						url: "/tirePartsMall/salesManagement/saleOrder/index",
-					}).then(res => {
-						uni.showToast({
-							icon: "none",
-							title: '提交申请成功',
-							mask: true
-						});
-						let _this = this
-						setTimeout(function() {
-							// appDetail({
-							// 	id: res.data.id
-							// }).then(res => {
-							// 	this.form = res.data
-							// 	console.log(this.form);
-							// }).catch(err => {
-							// 	uni.hideLoading();
-							// })
-							if (res.code == 200) {
-								_this.isDisabled = false
-							}
-							uni.hideLoading();
-						}, 1000);
-					})
-				} else {
+					this.requestRefund()
+				}
+				// if (this.order == "申请退款") {
+				// 	uni.showLoading({
+				// 		title: '退款中',
+				// 		mask: true
+				// 	});
+				// 	checkOrder({
+				// 		id: this.form.id,
+				// 		pageLabel: "销售订单",
+				// 		pageStatus: "this.$store.getters.domSaleStatus",
+				// 		url: "/tirePartsMall/salesManagement/saleOrder/index",
+				// 	}).then(res => {
+				// 		uni.showToast({
+				// 			icon: "none",
+				// 			title: '提交申请成功',
+				// 			mask: true
+				// 		});
+				// 		let _this = this
+				// 		setTimeout(function() {
+				// 			// appDetail({
+				// 			// 	id: res.data.id
+				// 			// }).then(res => {
+				// 			// 	this.form = res.data
+				// 			// 	console.log(this.form);
+				// 			// }).catch(err => {
+				// 			// 	uni.hideLoading();
+				// 			// })
+				// 			if (res.code == 200) {
+				// 				_this.isDisabled = false
+				// 			}
+				// 			uni.hideLoading();
+				// 		}, 1000);
+				// 	})
+				// } 
+				else {
 					//确认收货
 					let this_ = this
 					uni.showModal({