From 376ac09a54e8c95190d06bf39f295c890829c103 Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期二, 03 九月 2024 15:43:25 +0800
Subject: [PATCH] 查看工人详情
---
src/pages/checkin/workdetail.vue | 30 +++++++++++++++++++++---------
1 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/src/pages/checkin/workdetail.vue b/src/pages/checkin/workdetail.vue
index 61a51c5..ab11db5 100644
--- a/src/pages/checkin/workdetail.vue
+++ b/src/pages/checkin/workdetail.vue
@@ -52,8 +52,13 @@
</template>
</up-cell>
<up-cell title="鏁伴噺" :border='false' v-if="dakaList.workerType==1" >
- <template #right-icon>
- <up-input v-model="workCount" border="none" placeholder="璇峰~鍐欐暟閲�"></up-input>
+ <template #right-icon v-if="dakaList.isShenPiName!=='宸茬粨绠�'">
+ <up-input v-model="dakaList.workCount"
+ @blur='(val) => {dakaList.todaySalary=$util.roundToTwo(dakaList.workCount*dakaList.workPrice)}'
+ border="none" placeholder="璇峰~鍐欐暟閲�"></up-input>
+ </template>
+ <template #value v-else>
+ {{dakaList.workCount}}
</template>
</up-cell>
<up-cell title="宸ヨ祫" :border='false'>
@@ -65,7 +70,7 @@
<tem-steps></tem-steps>
</view> -->
<view class="tabbtns">
- <up-button color='#fece01' class="text-69" text="宸ヨ祫鐢虫姤" @click="saveDakaDetail"></up-button>
+ <up-button color='#fece01' class="text-69" text="宸ヨ祫鐢虫姤" v-if="dakaList.isShenPiName!=='宸茬粨绠�'" @click="saveDakaDetail"></up-button>
</view>
</view>
</view>
@@ -101,6 +106,7 @@
orderBiddingDetailId: id
}).then(res => {
this.dakaList = res.data
+ this.dakaList.workCount = res.data.workCount
if (this.dakaList.orderBiddingDetailCheck.length == 0) {
this.dakaList.orderBiddingDetailCheck.length = 2
}
@@ -114,7 +120,7 @@
})
},
saveDakaDetail() {
- if (dakaList.workerType == 1 && this.workCount) {
+ if (this.dakaList.workerType == 1 && !this.dakaList.workCount) {
this.$util.showToast({
title: '璇峰~鍐欐暟閲忥紒',
icon: 'error'
@@ -122,14 +128,20 @@
return
}
let obj = {
- orderBiddingDetailId: dakaList.orderBiddingDetailId, //鎷涘伐鎵撳崱Id
- workTime: dakaList.workTime, //宸ヤ綔鏃堕暱
- todaySalary: dakaList.todaySalary //褰撴棩宸ヨ祫
+ orderBiddingDetailId: this.dakaList.orderBiddingDetailId, //鎷涘伐鎵撳崱Id
+ workTime: this.dakaList.workTime, //宸ヤ綔鏃堕暱
+ todaySalary: this.dakaList.todaySalary //褰撴棩宸ヨ祫
}
- if (this.workCount) {
- obj.workCount = this.workCount
+ if (this.dakaList.workCount) {
+ obj.workCount = this.dakaList.workCount
}
this.$api.saveDakaDetail(obj).then(res => {
+ if(res.code==1){
+ this.$util.showToast({
+ title: '鐢虫姤鎴愬姛锛�',
+ icon: 'success'
+ })
+ }
console.log(res, '----');
})
},
--
Gitblit v1.9.1