From b7ae3f69ae6706a692284d2f12835d213debfb1a Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期二, 07 四月 2026 17:21:41 +0800
Subject: [PATCH] -
---
src/pages/order/detail.vue | 76 +++++++++++++++++++++++++++++++++++---
1 files changed, 70 insertions(+), 6 deletions(-)
diff --git a/src/pages/order/detail.vue b/src/pages/order/detail.vue
index e5c8e79..be0d101 100644
--- a/src/pages/order/detail.vue
+++ b/src/pages/order/detail.vue
@@ -83,11 +83,10 @@
</template> -->
<template #right-icon v-if="!item.isSelected" class="chuany-flex">
<up-tag class="button-layout__item" text="褰曠敤" size="mini" type="success"
- @click="selectBtn(item,true)"></up-tag>
+ @click="selectBtnGuding(item,true)"></up-tag>
<up-tag class="button-layout__item c-m-l-18" text="鎷掔粷" size="mini" type="error"
@click="selectBtn(item,false)"></up-tag>
</template>
-
<template #right-icon v-else class="chuany-flex">
<template class="" v-if="item.workPrice&&!item.showEdit">
<up-text type="error"
@@ -95,6 +94,8 @@
size='14'></up-text>
<up-icon name="star-fill" color="#fece01" @click='collectWorker(item)' v-if="item.isCollect"></up-icon>
<up-icon name="star" @click='collectWorker(item)' v-else></up-icon>
+ <up-icon name="lock-fill" color="#fece01" @click='linghuoWorker(item)' v-if="item.isGuding"></up-icon>
+ <up-icon name="lock" @click='linghuoWorker(item)' v-else></up-icon>
<up-icon name="edit-pen" @click='isShow(item)'></up-icon>
<up-icon name="trash" @click='deleteWorker(item)'></up-icon>
</template>
@@ -153,8 +154,11 @@
</up-list>
</view>
</scroll-view>
- <up-modal :show="modalShow" :asyncClose="true" showCancelButton closeOnClickOverlay :content="content"
- @confirm="modalConfirm" @cancel="modalCancel">
+ <up-modal :show="modalShowGuding" :asyncClose="true" showCancelButton :closeOnClickOverlay="true" :content="content" confirmText='鏄�' cancelText='鍚�'
+ @confirm="modalConfirm" @cancel="modalCancelGuding" @close='modalShowGuding=false'>
+ </up-modal>
+ <up-modal :show="modalShow" :asyncClose="true" showCancelButton :closeOnClickOverlay="true" :content="content"
+ @confirm="modalConfirm" @cancel="modalCancel" @close='modalShow=false'>
</up-modal>
</view>
</template>
@@ -197,6 +201,36 @@
}
const isShow = (item) => {
item.showEdit = true
+ }
+ const linghuoWorker= (item)=>{
+ uni.showModal({
+ title: '鎻愮ず',
+ content: `${item.isGuding?'鍙栨秷':'娣诲姞'}${item.workerName}鐏垫椿鐢ㄥ伐锛焋,
+ success: function(res) {
+ if (res.confirm) {
+ // 鎵ц纭鍚庣殑鎿嶄綔
+ isLoading.value = true
+ $api.GudingGongren({
+ orderBiddingId: item.id,
+ isGuding:!item.isGuding
+ }).then(req => {
+ if (req.code == 1) {
+ $util.showToast({
+ title: `${item.isGuding?'鍙栨秷':'娣诲姞'}鎴愬姛锛乣
+ })
+ getOrder(orderIdVal)
+ } else {
+ $util.showToast({
+ title: req.error
+ })
+ }
+ isLoading.value = false
+ })
+ } else {
+ // 鎵ц鍙栨秷鍚庣殑鎿嶄綔
+ }
+ }
+ })
}
const collectWorker = (item)=>{
uni.showModal({
@@ -286,6 +320,7 @@
})
}
let modalShow = ref(false)
+ let modalShowGuding = ref(false)
let content = ref('')
const toView = (item) => {
uni.navigateTo({
@@ -313,11 +348,18 @@
content.value = `纭畾鎷掔粷${item.workerName}鍚楋紵`
}
}
+ const selectBtnGuding = (item,val)=>{
+ workerItem.value = item
+ modalShowGuding.value = true
+ selectVal.value = val
+ content.value = `褰曠敤${item.workerName}涓虹伒娲荤敤宸ュ悧锛焋
+ }
const modalConfirm = () => {
if (selectVal.value) {
console.log('3333333333');
$api.saveQueRen({
- orderBiddingId: workerItem.value.id
+ orderBiddingId: workerItem.value.id,
+ isGuding:true
}).then(res => {
if (res.code == 1) {
$util.showToast({
@@ -330,7 +372,8 @@
title: res.error ? res.error : '澶辫触锛�'
})
}
- modalShow.value = false
+ modalShowGuding.value = false
+ workerItem.value = {}
})
} else {
@@ -350,6 +393,7 @@
})
}
modalShow.value = false
+ workerItem.value = {}
})
}
}
@@ -357,6 +401,26 @@
modalShow.value = false
workerItem.value = {}
}
+ const modalCancelGuding = () => {
+ $api.saveQueRen({
+ orderBiddingId: workerItem.value.id,
+ isGuding:false
+ }).then(res => {
+ if (res.code == 1) {
+ $util.showToast({
+ title: "褰曠敤鎴愬姛锛�",
+ icon: "success"
+ })
+ getOrder(orderIdVal)
+ } else {
+ $util.showToast({
+ title: res.error ? res.error : '澶辫触锛�'
+ })
+ }
+ modalShowGuding.value = false
+ workerItem.value = {}
+ })
+ }
const getOrder = (orderid, id) => {
$api.getOrder(orderid).then(res => {
if (res.code == 1) {
--
Gitblit v1.9.1