zhangwei
2024-09-23 208b5a9f559dd2c7298759fdfe37d07c926cbd4d
src/pages/company/index.vue
@@ -16,9 +16,9 @@
                     打卡日期:{{$util.formatDate(item.workDate)}}
                  </text>
               </view>
               <view class="c-p-26">
               <view class="c-p-18 chuany-font28">
                  <view class="chuany-flex chuany-justify-between">
                     <text class="chuany-font34 ">
                     <text class="chuany-font32">
                        {{item.orderName}}
                     </text>
                     <view class="chuany-flex chuany-justify-between">
@@ -30,19 +30,22 @@
                        <!-- <up-tag text="已确认" shape="circle" type="success" plain plainFill size='mini'></up-tag> -->
                     </view>
                  </view>
                  <view class="c-p-t-14">
                     姓名:{{item.workerUserName}}
                  <view class="text-69">
                     <view class="c-p-t-8">
                        姓名:{{item.workerUserName}}
                     </view>
                     <view class="c-p-t-8">
                        打卡记录:{{item.dakaMingxi}}
                     </view>
                  </view>
                  <view class="c-p-t-14">
                     打卡记录:{{item.dakaMingxi}}
                  </view>
                  <view class="chuany-flex chuany-justify-between chuany-flex-wrap">
                     <view class="chuany-width48 c-p-t-14">
                  <view class="chuany-flex chuany-justify-between chuany-flex-wrap text-69 c-p-t-8">
                     <view class="chuany-width48">
                        <text>
                           方式:{{item.workerTypeName}}
                        </text>
                     </view>
                     <view class="chuany-width48 chuany-flex c-p-t-14">
                     <view class="chuany-width48 chuany-flex">
                        <text>
                           工价:{{item.workPrice}}{{item.workerType==0?'元/小时':'元/件'}}
                        </text>
@@ -52,7 +55,7 @@
                        <text v-else>{{item.workPrice}}{{item.workerType==0?'元/小时':'元/件'}}</text> -->
                     </view>
                     <view class="chuany-width48 chuany-flex c-p-t-14">
                     <view class="chuany-width48 chuany-flex c-p-t-8">
                        <text>
                           时长:
                        </text>
@@ -61,7 +64,7 @@
                           border="surround" v-model="item.workTime"></up-input>
                     </view>
                     <view class="chuany-width48 chuany-flex c-p-t-14" v-if="item.workerType==1">
                     <view class="chuany-width48 chuany-flex c-p-t-8" v-if="item.workerType==1">
                        <text>
                           数量:
                        </text>
@@ -69,7 +72,7 @@
                           @blur='(val) => {item.todaySalary=$util.roundToTwo(item.workCount*item.workPrice)}'
                           v-model="item.workCount"></up-input>
                     </view>
                     <view class="chuany-width48 chuany-flex c-p-t-14">
                     <view class="chuany-width48 chuany-flex c-p-t-8">
                        <text>
                           工资:
                        </text>
@@ -77,10 +80,11 @@
                           v-model="item.todaySalary"></up-input>
                        <!-- <text v-else>{{item.todaySalary}} 元</text> -->
                     </view>
                     <view class="chuany-width48 c-p-t-14">
                     <view class="chuany-width48 c-p-t-8">
                        <view class="chuany-width10">
                           <up-button class="button-layout__item" :text="item.isShenPiName!=='已结算'?'确认':'修改'" size="mini"
                              :loading='item.isLoading' :loadingText="item.isShenPiName!=='已结算'?'确认中':'修改中'"
                           <up-button class="button-layout__item" :text="item.isShenPiName!=='已结算'?'确认':'修改'"
                              size="mini" :loading='item.isLoading'
                              :loadingText="item.isShenPiName!=='已结算'?'确认中':'修改中'"
                              @tap.stop='saveDakaDetailCompany(item)' type="warning"></up-button>
                        </view>
                     </view>
@@ -153,15 +157,15 @@
               obj.workCount = item.workCount
            }
            item.isLoading = true
            console.log(item.isShenPiName,'item.isShenPiName’');
            console.log(item.isShenPiName, 'item.isShenPiName’');
            this.$api.saveDakaDetailCompany(obj).then(res => {
               if (res.code == 1) {
                  this.$util.showToast({
                     title: item.isShenPiName=='已结算'?'修改成功!':'确认成功!',
                     title: item.isShenPiName == '已结算' ? '修改成功!' : '确认成功!',
                     icon: 'success'
                  })
                  this.PostMyComDakaListPage();
               }else {
               } else {
                  this.$util.showToast({
                     title: res.error ? res.error : '失败!'
                  })
@@ -196,10 +200,10 @@
                  if (this.pageIndex == 1) {
                     this.viewList = res.data.items
                  } else {
                     this.viewList.concat(...res.data.items)
                     this.viewList = this.viewList.concat(...res.data.items)
                  }
                  console.log(this.viewList, this.viewList.length, 'this.viewList');
                  this.viewList.forEach(item=>{
                  this.viewList.forEach(item => {
                     item.isLoading = false
                  })
                  // totalPages.value = res.data.totalCount