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/company/record.vue | 72 ++++++++++++++++++++++++------------
1 files changed, 48 insertions(+), 24 deletions(-)
diff --git a/src/pages/company/record.vue b/src/pages/company/record.vue
index 4cc13c3..70bd741 100644
--- a/src/pages/company/record.vue
+++ b/src/pages/company/record.vue
@@ -12,18 +12,18 @@
</up-list-item>
<view class="c-p-20">
<view class="chuany-flex chuany-justify-between chuany-flex-wrap">
- <text class="chuany-font34 chuany-text-bold">
+ <text class="chuany-font32">
{{dakaList.orderName}}
</text>
<text class="">
- 鏃ユ湡锛歿{$util.formatDate(dakaList.workDate)}}
+ 璁℃椂鏃ユ湡锛歿{$util.formatDate(dakaList.workDate)}}
</text>
</view>
</view>
- <view class="c-p-20">
+ <view class="c-p-l-20 c-p-r-20">
<view class="">
<text class="">
- 鎵撳崱璁板綍锛�
+ 璁℃椂璁板綍锛�
</text>
<view class="chuany-flex chuany-justify-evenly chuany-flex-wrap c-p-t-20">
<view
@@ -38,15 +38,23 @@
v-if="index!==dakaList.length-1&&index%2==0">
</view>
</view>
- <text>{{item.checktime?'宸叉墦鍗�':'鏈墦鍗�'}}</text>
+ <text>{{item.checktime?'宸茶鏃�':'鏈鏃�'}}</text>
<text
:class="$util.formatDate(item.checktime,true)=='-'?'core-opa':''">{{$util.formatDate(item.checktime,true)}}</text>
</view>
</view>
</view>
</view>
- <up-cell title="宸ヤ綔鏃堕暱" :border='false'>
- <template #right-icon>
+ <up-cell title="鏃堕暱" :border='false'>
+ <!-- <template #right-icon>
+ {{dakaList.workTime}} 灏忔椂
+ </template> -->
+ <template #right-icon v-if="dakaList.workerType!=1 && (dakaList.isShenPi!==2||dakaList.isModify)">
+ <up-input v-model="dakaList.workTime" type="digit"
+ @change='(val) => {dakaList.todaySalary=$util.roundToTwo(val*dakaList.workPrice)}'
+ border="none" placeholder="璇峰~鍐欐椂闀�"></up-input>
+ </template>
+ <template #value v-else>
{{dakaList.workTime}} 灏忔椂
</template>
</up-cell>
@@ -59,19 +67,34 @@
<template #right-icon>
{{dakaList.workPrice}} {{dakaList.workerType==0?'鍏�/灏忔椂':'鍏�/浠�'}}
</template>
+ <!--
+ <template #right-icon v-if="dakaList.isShenPiName!=='宸茬粨绠�'">
+ <up-input v-model="dakaList.workPrice" type="digit"
+ border="none" placeholder="璇峰~鍐欏伐浠�"></up-input>
+ </template>
+ <template #value v-else>
+ {{dakaList.workPrice}} {{dakaList.workerType==0?'鍏�/灏忔椂':'鍏�/浠�'}}
+ </template> -->
</up-cell>
<up-cell title="鏁伴噺" :border='false' v-if="dakaList.workerType==1">
- <template #right-icon v-if="dakaList.isShenPiName!=='宸茬粨绠�'">
+ <template #right-icon v-if="dakaList.isShenPiName!=='宸茬粨绠�'||isModify">
<up-input v-model="dakaList.workCount" type="digit"
- @blur='(val) => {dakaList.todaySalary=$util.roundToTwo(dakaList.workCount*dakaList.workPrice)}'
+ @change='(val) => {dakaList.todaySalary=$util.roundToTwo(val*dakaList.workPrice)}'
border="none" placeholder="璇峰~鍐欐暟閲�"></up-input>
</template>
<template #value v-else>
{{dakaList.workCount}}
</template>
</up-cell>
- <up-cell title="宸ヨ祫" :border='false'>
- <template #right-icon>
+ <up-cell title="鎶ラ叕" :border='false'>
+ <!-- <template #right-icon>
+ {{dakaList.todaySalary}} 鍏�
+ </template> -->
+ <template #right-icon v-if="dakaList.isShenPiName!=='宸茬粨绠�'||isModify">
+ <up-input v-model="dakaList.todaySalary" type="digit" border="none"
+ placeholder="璇峰~鍐欐姤閰�"></up-input>
+ </template>
+ <template #value v-else>
{{dakaList.todaySalary}} 鍏�
</template>
</up-cell>
@@ -79,9 +102,10 @@
<tem-steps></tem-steps>
</view> -->
</up-list>
- <view class="tabbtns">
- <up-button color='#fece01' class="text-69" text="纭" :loading='isLoading' loadingText="纭涓�"
- @click="saveDakaDetailCompany" v-if="dakaList.isShenPiName!=='宸茬粨绠�'"></up-button>
+ <view class="tabbtns" v-if="dakaList.isShenPiName!=='宸茬粨绠�'||isModify">
+ <up-button color='#fece01' :text="dakaList.isShenPiName!=='宸茬粨绠�'?'鏍稿噯鎶ラ叕':'淇敼'"
+ :loading='isLoading' :loadingText="dakaList.isShenPiName!=='宸茬粨绠�'?'鏍稿噯涓�':'淇敼涓�'"
+ @click="saveDakaDetailCompany"></up-button>
</view>
</view>
</view>
@@ -94,12 +118,6 @@
orderBiddingDetailId: '',
dakaList: {},
workCount: '',
- confirmObj: {
- orderBiddingDetailId: '', //鎷涘伐鎵撳崱Id
- workTime: '', //宸ヤ綔鏃堕暱
- workCount: '', //璁′欢鏁伴噺
- todaySalary: '' //褰撴棩宸ヨ祫
- },
workerInfo: '',
isLoading: false
}
@@ -107,6 +125,11 @@
onLoad(options) {
this.orderBiddingDetailId = options.id
this.getDakaDetail(this.orderBiddingDetailId)
+ },
+ computed: {
+ isModify() {
+ return this.$util.minutesBetweenDates(this.dakaList.shenPitime, new Date()) <= 5 ? true : false
+ }
},
methods: {
getWorkerInfo(id) {
@@ -135,7 +158,7 @@
if (this.dakaList.orderBiddingDetailCheck.length % 2 !== 0) {
this.dakaList.orderBiddingDetailCheck.push({})
}
- console.log(res, '鎵撳崱');
+ console.log(res, this.dakaList.workTime, '璁℃椂');
})
},
saveDakaDetailCompany() {
@@ -147,9 +170,9 @@
return
}
let obj = {
- orderBiddingDetailId: this.dakaList.orderBiddingDetailId, //鎷涘伐鎵撳崱Id
+ orderBiddingDetailId: this.dakaList.orderBiddingDetailId, //鎷涘伐璁℃椂Id
workTime: this.dakaList.workTime, //宸ヤ綔鏃堕暱
- todaySalary: this.dakaList.todaySalary //褰撴棩宸ヨ祫
+ todaySalary: this.dakaList.todaySalary //褰撴棩鎶ラ叕
}
if (this.dakaList.workCount) {
obj.workCount = this.dakaList.workCount
@@ -161,9 +184,10 @@
title: '纭鎴愬姛锛�',
icon: 'success'
})
+ this.getDakaDetail(this.orderBiddingDetailId)
} else {
this.$util.showToast({
- title: res.msg ? res.msg : '澶辫触锛�'
+ title: res.error ? res.error : '澶辫触锛�'
})
}
this.isLoading = false
--
Gitblit v1.9.1