-
zhangwei
2024-09-12 f7aa204aa8d20b090d7943969ddeb9871a1fad76
src/pages/checkin/workdetail.vue
@@ -3,11 +3,11 @@
      <view class="coreshop-ff">
         <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-font34">
                  {{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>
@@ -51,9 +51,10 @@
               {{dakaList.workPrice}} {{dakaList.workerType==0?'元/小时':'元/件'}}
            </template>
         </up-cell>
         <up-cell title="数量" :border='false'  v-if="dakaList.workerType==1" >
         <up-cell title="数量" :border='false' v-if="dakaList.workerType==1">
            <template #right-icon v-if="dakaList.isShenPiName!=='已结算'">
               <up-input v-model="dakaList.workCount" type="digit" @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>
@@ -69,7 +70,8 @@
            <tem-steps></tem-steps>
         </view> -->
         <view class="tabbtns">
            <up-button color='#fece01' class="text-69" text="工资申报" :loading='isLoading' loadingText="申报中" 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 +90,7 @@
               workCount: '', //计件数量
               todaySalary: '' //当日工资
            },
            isLoading:false
            isLoading: false
         }
      },
      onLoad(options) {
@@ -137,14 +139,15 @@
            }
            this.isLoading = true
            this.$api.saveDakaDetail(obj).then(res => {
               if(res.code==1){
               console.log(res);
               if (res.code == 1) {
                  this.$util.showToast({
                     title: '申报成功!',
                     icon: 'success'
                  })
               }else{
               } else {
                  this.$util.showToast({
                     title: res.msg?res.msg:'失败!'
                     title: res.error ? res.error : '失败!'
                  })
               }
               this.isLoading = false
@@ -214,7 +217,8 @@
         background-color: #2979ff;
      }
   }
   .u-cell__body{
   .u-cell__body {
      padding: 6px 15px !important;
   }
</style>