Lou
2023-11-11 d29d2c6e64ea80a3794e9f69e31f2e35cac097ac
subPackage/workbench/views/bailReportDetail.vue
@@ -52,7 +52,7 @@
                     inputAlign="right"></u-input>
                  <u-icon slot="right" name="arrow-right"></u-icon>
               </u-form-item>
               <u-form-item label="报备位置" prop="checkUserName" borderBottom  @click="getLocation('returnLocation')">
               <u-form-item label="报备位置" prop="checkUserName" borderBottom  @click="getLocation('startLocation')">
                  <u-input v-model="goOutInfo.startLocation" disabled disabledColor="#ffffff"
                     border="none" placeholder="请获取当前位置" placeholderClass="f-28 c-99"
                     inputAlign="right"></u-input>
@@ -66,7 +66,7 @@
                     inputAlign="right"></u-input>
                  <u-icon slot="right" name="arrow-right"></u-icon>
               </u-form-item>
               <u-form-item label="到达位置" prop="reachLocation" borderBottom  @click="getLocation('returnLocation')">
               <u-form-item label="到达位置" prop="reachLocation" borderBottom  @click="getLocation('reachLocation')">
                  <u-input v-model="goOutInfo.reachLocation" disabled disabledColor="#ffffff"
                     border="none" placeholder="请获取当前位置" placeholderClass="f-28 c-99"
                     inputAlign="right"></u-input>
@@ -124,8 +124,11 @@
      </view>
      <view class="bottom-btn"    v-if="(roleType == 1 && status == 1) || (roleType == 2 && status == 2)">
      <view class="bottom-btn"    v-if="roleType == 1 && status == 1">
         <u-button type="primary" @click="submit">提交审核</u-button>
      </view>
      <view class="bottom-btn"    v-if="roleType == 2 && status == 2">
         <u-button type="primary" @click="submit">提交</u-button>
      </view>
      <u-datetime-picker ref="datetimePicker" :show="showSelectDate" v-model="goOutDate[tabIndex]" mode="datetime"
         :formatter="formatter" @confirm="confirmDate" @cancel="cancelPickerDate"></u-datetime-picker>
@@ -229,7 +232,7 @@
               }
            ],
            tabIndex:0,
            goOutDate:["","",""],
            goOutDate:[new Date(),new Date(),new Date()],
            showSelectDate:false,
            status:1     ,//当前状态   1待审核  2审核通过   3审核不通过
            id:""
@@ -247,6 +250,9 @@
         } else {
            this.roleType = 1;
         }
         // this.goOutDate.forEach(item=>{
         //    item = new Date()
         // })
      },
      methods: {
@@ -256,14 +262,14 @@
         },
         
         showPickerDate(){
            if(this.roleType == 2) return;
            if(this.roleType == 2 && this.status != 2) return;
            this.showSelectDate = true;
         },
         cancelPickerDate(){
            this.showSelectDate = false;
         },
         showPicker(){
            if(this.roleType == 2) return;
            if(this.roleType == 2 && this.status != 2) return;
            this.isPickerShow = true
         },
         
@@ -291,7 +297,8 @@
         },
         
         getLocation(key){
            if(this.roleType == 2) return;
            console.log(key)
            if(this.roleType == 2 &&  this.status != 2) return;
            uni.chooseLocation({
               success:(res)=>{
                  console.log(res);
@@ -362,7 +369,7 @@
         
         checkImages() {
            if (this.startImageUrls.length) {
               this.$set(this.goOutInfo, "startImageUrls", this.setGoOutImages(this.fireImageUrls))
               this.$set(this.goOutInfo, "startImageUrls", this.setGoOutImages(this.startImageUrls))
            }
            if (this.reachImageUrls.length) {
               this.$set(this.goOutInfo, "reachImageUrls", this.setGoOutImages(this.reachImageUrls))
@@ -401,6 +408,10 @@
                     icon: 'error'
                  })
               }else {
                  uni.showToast({
                     title: '提交成功!',
                     icon: 'success'
                  })
                  this.getDetailInfo(this.taskId)
               }
               // uni.navigateBack()
@@ -465,5 +476,10 @@
   
   
   }
   .upload-item {
      width: 140rpx;
      height: 140rpx;
      border: 1px solid #EEEEEE;
   }
   
</style>