From 2d43a1df3f5ba42710e6d21c27d1e13bdb8dfd56 Mon Sep 17 00:00:00 2001 From: zhangwei <1504152376@qq.com> Date: 星期一, 24 三月 2025 09:23:08 +0800 Subject: [PATCH] - --- src/pages/order/order.vue | 62 ++++++++++++++++++++++-------- 1 files changed, 45 insertions(+), 17 deletions(-) diff --git a/src/pages/order/order.vue b/src/pages/order/order.vue index f77d326..22b8ba7 100644 --- a/src/pages/order/order.vue +++ b/src/pages/order/order.vue @@ -26,7 +26,10 @@ </text> --> <!-- <up-tag class='c-m-r-10' :text="item.orderStatusName" shape="circle" type="success" plain plainFill size='mini'></up-tag> --> - <up-text :type="item.orderStatus==0?'primary':'success'" :text="item.orderStatusName" size='12'></up-text> + <up-text v-if="item.isEn" :type="item.orderStatus==0?'primary':'success'" + :text="item.orderStatusName" size='12'></up-text> + <up-text v-else type="error" text="宸蹭笅鏋�" size='12'></up-text> + <!-- <up-button class='c-m-r-10' :text="item.isEn?'涓嬫灦':'涓婃灦'" disabled shape="circle" v-if="item.orderStatus==0" :type="item.isEn?'error':'primary'" size='mini' @click.stop="manageOrder(item)"></up-button> --> @@ -49,11 +52,21 @@ </text> </view> <view class="chuany-width50"> - 宸ヤ环锛歿{item.workPrice}}<template v-if="item.workPriceMax">~{{item.workPriceMax}}</template> + 宸叉嫑浜烘暟锛歿{item.worderCounted}} 浜� + </view> + <view class="chuany-width50"> + <text> + 寰呭鏍镐汉鏁帮細{{item.workerDaiCount}} 浜� + </text> + </view> + <view class="chuany-width50"> + 宸ヤ环锛歿{item.workPrice}}<template + v-if="item.workPriceMax">~{{item.workPriceMax}}</template> {{item.workerType==0?'鍏�/灏忔椂':'鍏�/浠�'}} </view> <view class=""> - <up-button hoverStopPropagation :text="item.isEn?'涓嬫灦':'涓婃灦'" shape="circle" :loading='item.isLoading' :loadingText="item.isEn?'涓嬫灦涓�':'涓婃灦涓�'" + <up-button hoverStopPropagation :text="item.isEn?'涓嬫灦':'涓婃灦'" shape="circle" + :loading='item.isLoading' :loadingText="item.isEn?'涓嬫灦涓�':'涓婃灦涓�'" v-if="item.orderStatus==0" :type="item.isEn?'error':'primary'" size='mini' @tap.stop="manageOrder(item)"></up-button> </view> @@ -122,7 +135,7 @@ uni.stopPullDownRefresh(); }) const current4 = ref(0); - const list = ref(['鍏ㄩ儴', '宸蹭笂鏋�', '宸蹭笅鏋�']); + const list = ref(['鍏ㄩ儴', '鍙戝竷涓�', '宸蹭笅鏋�']); const changePicker = (val) => { console.log(val); workTime.value = val.startDate.result + '鑷�' + val.endDate.result @@ -202,22 +215,37 @@ orderId: item.id } console.log(obj); - item.isLoading = true if (item.isEn) { - $api.deleteOrder(obj).then(res => { - if (res.code == 1) { - $util.showToast({ - title: '涓嬫灦鎴愬姛锛�' - }) - PostMyListPageCompany() - } else { - $util.showToast({ - title: res.error - }) - } - item.isLoading = false + uni.showModal({ + title: '鎻愮ず', + content: '纭涓嬫灦璇ュ伐浣滃悧锛熶笅鏋跺悗灏嗗垹闄ょ浉鍏虫暟鎹紒', + success: function(res) { + if (res.confirm) { + // 鎵ц纭鍚庣殑鎿嶄綔 + item.isLoading = true + $api.deleteOrder(obj).then(req => { + if (req.code == 1) { + $util.showToast({ + title: '涓嬫灦鎴愬姛锛�' + }) + PostMyListPageCompany() + } else { + $util.showToast({ + title: req.error + }) + } + item.isLoading = false + }) + } + else { + // 鎵ц鍙栨秷鍚庣殑鎿嶄綔 + } + } }) + } else { + item.OldId = item.id + item.id = 0 $api.saveOrder(item).then(res => { if (res.code == 1) { $util.showToast({ -- Gitblit v1.9.1