From d0fd00436448dd7b82031f840e22d9e6aecb6053 Mon Sep 17 00:00:00 2001 From: zhangwei <1504152376@qq.com> Date: 星期二, 31 十二月 2024 15:41:22 +0800 Subject: [PATCH] - --- src/pages/company/record.vue | 24 +++++++++++++++--------- 1 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/pages/company/record.vue b/src/pages/company/record.vue index fe7ecde..edcb938 100644 --- a/src/pages/company/record.vue +++ b/src/pages/company/record.vue @@ -49,9 +49,9 @@ <!-- <template #right-icon> {{dakaList.workTime}} 灏忔椂 </template> --> - <template #right-icon v-if="dakaList.isShenPiName!=='宸茬粨绠�'"> + <template #right-icon v-if="dakaList.workerType!=1 && (dakaList.isShenPi!==2||dakaList.isModify)"> <up-input v-model="dakaList.workTime" type="digit" - @blur='(val) => {dakaList.todaySalary=$util.roundToTwo(dakaList.workTime*dakaList.workPrice)}' + @change='(val) => {dakaList.todaySalary=$util.roundToTwo(val*dakaList.workPrice)}' border="none" placeholder="璇峰~鍐欐椂闀�"></up-input> </template> <template #value v-else> @@ -77,9 +77,9 @@ </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> @@ -90,7 +90,7 @@ <!-- <template #right-icon> {{dakaList.todaySalary}} 鍏� </template> --> - <template #right-icon v-if="dakaList.isShenPiName!=='宸茬粨绠�'"> + <template #right-icon v-if="dakaList.isShenPiName!=='宸茬粨绠�'||isModify"> <up-input v-model="dakaList.todaySalary" type="digit" border="none" placeholder="璇峰~鍐欏伐璧�"></up-input> </template> @@ -102,9 +102,9 @@ <tem-steps></tem-steps> </view> --> </up-list> - <view class="tabbtns" v-if="dakaList.isShenPiName!=='宸茬粨绠�'"> - <up-button color='#fece01' class="text-69" :text="dakaList.isShenPiName!=='宸茬粨绠�'?'纭':'淇敼'" - :loading='isLoading' :loadingText="dakaList.isShenPiName!=='宸茬粨绠�'?'纭涓�':'淇敼涓�'" + <view class="tabbtns" v-if="dakaList.isShenPiName!=='宸茬粨绠�'||isModify"> + <up-button color='#fece01' class="text-69" :text="dakaList.isShenPiName!=='宸茬粨绠�'?'鏍稿噯宸ヨ祫':'淇敼'" + :loading='isLoading' :loadingText="dakaList.isShenPiName!=='宸茬粨绠�'?'鏍稿噯涓�':'淇敼涓�'" @click="saveDakaDetailCompany"></up-button> </view> </view> @@ -125,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) { @@ -179,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