-
zhangwei
2024-09-10 38130802e3fd55080f518f4128ef20ddfdd907c3
src/pages/checkin/workdetail.vue
@@ -7,7 +7,7 @@
                  {{dakaList.orderName}}
               </text>
               <text class="">
                  日期:{{$util.formatDate(dakaList.workDate)}}
                  打卡日期:{{$util.formatDate(dakaList.workDate)}}
               </text>
            </view>
         </view>
@@ -36,7 +36,7 @@
               </view>
            </view>
         </view>
         <up-cell title="工作时长" :border='false'>
         <up-cell title="时长" :border='false'>
            <template #right-icon>
               {{dakaList.workTime}} 小时
            </template>
@@ -53,8 +53,7 @@
         </up-cell>
         <up-cell title="数量" :border='false'  v-if="dakaList.workerType==1" >
            <template #right-icon v-if="dakaList.isShenPiName!=='已结算'">
               <up-input v-model="dakaList.workCount"
                  @blur='(val) => {dakaList.todaySalary=$util.roundToTwo(dakaList.workCount*dakaList.workPrice)}'
               <up-input v-model="dakaList.workCount" type="digit" @blur='(val) => {dakaList.todaySalary=$util.roundToTwo(dakaList.workCount*dakaList.workPrice)}'
                  border="none" placeholder="请填写数量"></up-input>
            </template>
            <template #value v-else>
@@ -70,7 +69,7 @@
            <tem-steps></tem-steps>
         </view> -->
         <view class="tabbtns">
            <up-button color='#fece01' class="text-69" text="工资申报" v-if="dakaList.isShenPiName!=='已结算'" @click="saveDakaDetail"></up-button>
            <up-button color='#fece01' class="text-69" text="工资申报" :loading='isLoading' loadingText="申报中" v-if="dakaList.isShenPiName!=='已结算'" @click="saveDakaDetail"></up-button>
         </view>
      </view>
   </view>
@@ -88,7 +87,8 @@
               workTime: '', //工作时长
               workCount: '', //计件数量
               todaySalary: '' //当日工资
            }
            },
            isLoading:false
         }
      },
      onLoad(options) {
@@ -135,14 +135,20 @@
            if (this.dakaList.workCount) {
               obj.workCount = this.dakaList.workCount
            }
            this.isLoading = true
            this.$api.saveDakaDetail(obj).then(res => {
               console.log(res);
               if(res.code==1){
                  this.$util.showToast({
                     title: '申报成功!',
                     icon: 'success'
                  })
               }else{
                  this.$util.showToast({
                     title: res.error?res.error:'失败!'
                  })
               }
               console.log(res, '----');
               this.isLoading = false
            })
         },
      }