From 98494fda33f6dd116ef3ce641b32937b7d83b4c1 Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期三, 12 三月 2025 17:15:07 +0800
Subject: [PATCH] -

---
 src/pages/delivergoods/arrange.vue |   65 +++++++++++++++++++++++++-------
 1 files changed, 51 insertions(+), 14 deletions(-)

diff --git a/src/pages/delivergoods/arrange.vue b/src/pages/delivergoods/arrange.vue
index 371503a..e51504a 100644
--- a/src/pages/delivergoods/arrange.vue
+++ b/src/pages/delivergoods/arrange.vue
@@ -17,22 +17,31 @@
 	</up-sticky>
 	<view class="c-p-b-100">
 		<view class="c-p-l-20 c-p-r-20" v-if="orderList&&orderList.length>0">
-			<view class="listrecord c-p-t-20" v-for="(item,index) in orderList" :key="item.keyid"
-				@click='goDetail(item)'>
+			<view class="listrecord c-p-t-20" v-for="(item,index) in orderList" :key="item.keyid">
 				<view class="coreshop-ff chuany-bradius20">
 					<view class="chuany-font26">
 						<view class="chuany-flex chuany-justify-between">
-							<text class="chuany-width7">{{index+1}}</text>
+							<text class="chuany-width6">{{index+1}}</text>
 							<view class="chuany-width15">
 								{{$util.formatDate(item.deliverTime,'riqi')}}
 							</view>
-							<view class="chuany-width73">
+							<view :class="item.deliveredstatus == 'Delivered'?'chuany-width67':'chuany-width79'"
+								@click='goDetail(item)'>
 								<u-text size='14' :text="item.remark||item.companyName" lines="1">
 								</u-text>
 							</view>
-							<view class="chuany-width5" @tap.stop='editOrder(item)'>
-								<up-icon name="edit-pen"></up-icon>
-							</view>
+							<template v-if="item.deliveredstatus == 'Delivered'">
+								<view class="chuany-width6 chuany-paddingright-10" @tap.stop='editOrder(item)'>
+									<up-icon name="edit-pen" size='18'></up-icon>
+								</view>
+								<view class="chuany-width6" @tap.stop='UndoDeliverPlans(item)'>
+									<up-icon name="reload" size='19'></up-icon>
+								</view>
+							</template>
+							<!-- <view class="chuany-width6" v-else>
+								<u-text size='14' type="" text="" lines="1">
+								</u-text>
+							</view> -->
 						</view>
 					</view>
 				</view>
@@ -85,7 +94,7 @@
 				</up-form-item>
 			</up-form>
 		</up-modal>
-		<fui-date-picker range :show="datePickerShow" :value="getFirstDayOfMonth()" type="3" zIndex="10000"
+		<fui-date-picker :show="datePickerShow" :value="getFirstDayOfMonth()" type="3" zIndex="10000"
 			@change="changePicker" :minDate='minDate' :maxDate='maxDate' @cancel="clickTime"></fui-date-picker>
 		<up-action-sheet :show="showActions" :actions="actions" title="璇烽�夋嫨" @close="showActions = false"
 			wrapMaxHeight='500px' @select="selectItem">
@@ -209,9 +218,9 @@
 			}
 		},
 		onPullDownRefresh() {
-			this.timeStart = ''
-			this.timeEnd = ''
-			this.workTime = ''
+			this.timeStart = new Date()
+			this.timeEnd = new Date()
+			this.workTime = this.$util.formatDate(new Date())
 			this.deliverKeyName = ''
 			this.init()
 			uni.stopPullDownRefresh();
@@ -230,9 +239,10 @@
 				})
 			},
 			changePicker(val) {
-				this.workTime = val.startDate.result + '鑷�' + val.endDate.result
-				this.timeStart = new Date(val.startDate.result) //宸ヤ綔寮�濮嬫椂闂�
-				this.timeEnd = new Date(val.endDate.result)
+				console.log(val, '-=-=鈥�');
+				this.workTime = val.result
+				this.timeStart = new Date(val.result) //宸ヤ綔寮�濮嬫椂闂�
+				this.timeEnd = new Date(val.result)
 				this.datePickerShow = !this.datePickerShow
 				this.init()
 			},
@@ -317,6 +327,33 @@
 				// })
 				// this.buyerName = obj.companyName
 			},
+			UndoDeliverPlans(item) {
+				let that = this
+				uni.showModal({
+					title: '鎻愮ず',
+					content: '纭鎾ら攢璇ヨ鍗曞悧锛�',
+					success: function(res) {
+						if (res.confirm) {
+							// 鎵ц纭鍚庣殑鎿嶄綔
+							that.$api.UndoDeliverPlans(item.keyid).then(res => {
+								if (res.code == 1) {
+									that.$util.showToast({
+										title: '鎾ら攢鎴愬姛锛�'
+									})
+									that.init()
+								} else {
+									that.$util.showToast({
+										title: res.error
+									})
+								}
+							})
+						} else {
+							// 鎵ц鍙栨秷鍚庣殑鎿嶄綔
+						}
+					}
+				})
+
+			},
 			delOrder(item) {
 				let that = this
 				uni.showModal({

--
Gitblit v1.9.1