-
zhangwei
2026-04-07 b7ae3f69ae6706a692284d2f12835d213debfb1a
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">
                  <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,7 +38,7 @@
                              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>
@@ -49,13 +49,14 @@
               <!-- <template #right-icon>
                  {{dakaList.workTime}} 小时
               </template> -->
               <template #right-icon>
               <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>
               <template #value v-else>
                  {{dakaList.workTime}} 小时
               </template> -->
               </template>
            </up-cell>
            <up-cell title="方式" :border='false'>
               <template #right-icon>
@@ -76,34 +77,35 @@
               </template> -->
            </up-cell>
            <up-cell title="数量" :border='false' v-if="dakaList.workerType==1">
               <template #right-icon>
               <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>
               <template #value v-else>
                  {{dakaList.workCount}}
               </template> -->
               </template>
            </up-cell>
            <up-cell title="工资" :border='false'>
            <up-cell title="报酬" :border='false'>
               <!-- <template #right-icon>
                  {{dakaList.todaySalary}} 元
               </template> -->
               <template #right-icon>
                  <up-input v-model="dakaList.todaySalary" type="digit"
                     border="none" placeholder="请填写工资"></up-input>
               <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>
               <template #value v-else>
                  {{dakaList.todaySalary}} 元
               </template> -->
               </template>
            </up-cell>
            <!-- <view class="stepwit">
               <tem-steps></tem-steps>
            </view> -->
         </up-list>
         <view class="tabbtns">
            <up-button color='#fece01' class="text-69" :text="dakaList.isShenPiName!=='已结算'?'确认':'修改'" :loading='isLoading' loadingText="确认中"
            :loadingText="dakaList.isShenPiName!=='已结算'?'确认中':'修改中'" @click="saveDakaDetailCompany"></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>
@@ -116,12 +118,6 @@
            orderBiddingDetailId: '',
            dakaList: {},
            workCount: '',
            confirmObj: {
               orderBiddingDetailId: '', //招工打卡Id
               workTime: '', //工作时长
               workCount: '', //计件数量
               todaySalary: '' //当日工资
            },
            workerInfo: '',
            isLoading: false
         }
@@ -129,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) {
@@ -157,7 +158,7 @@
               if (this.dakaList.orderBiddingDetailCheck.length % 2 !== 0) {
                  this.dakaList.orderBiddingDetailCheck.push({})
               }
               console.log(res, '打卡');
               console.log(res, this.dakaList.workTime, '计时');
            })
         },
         saveDakaDetailCompany() {
@@ -169,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
@@ -183,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