Houjie
2025-07-07 0a48655d2162b709ecb80d249a4085971add6140
pages/ToDoList/ToDoListCheckSure/ToDoListCheckSure.vue
@@ -1,6 +1,6 @@
<template>
   <view class="container">
      <cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="productionTask">
      <cu-custom :bgColor="NavBarColor" :isBack="true">
         <block slot="backText">返回</block>
         <block slot="content">{{title}}</block>
      </cu-custom>
@@ -12,7 +12,8 @@
                  <!-- 关闭按钮 -->
                  <text class="close-btn" @tap.stop="showPreview = false">&times;</text>
                  <!-- 图片展示 -->
                  <image :src="previewImageSrc" mode="aspectFit" class="preview-image" />
                  <image :src="previewImageSrc" mode="aspectFit" class="preview-image" @error="handleImageError"
                     :show-menu-by-longpress="false" />
               </view>
            </view>
@@ -25,9 +26,16 @@
               <uni-forms-item :label-width="80" name="num" label="工单号:">
                  <uni-easyinput v-model="formData.orderNum" :disabled="true" />
               </uni-forms-item>
               <uni-forms-item :label-width="80" required name="num" label="设备编号:">
               <uni-forms-item :label-width="80" name="inspectionStatus_dictText" label="工单状态:">
                  <uni-easyinput v-model="formData.inspectionStatus_dictText" :disabled="true" />
               </uni-forms-item>
               <uni-forms-item :label-width="80" name="num" label="设备编号:">
                  <uni-data-select v-model="formData.num" :localdata="equipmentList" @change="changeEquipmentList"
                     placeholder="请选择" :disabled="true" />
               </uni-forms-item>
               <uni-forms-item :label-width="80" name="installationPosition_dictText" label="安装位置:">
                  <uni-easyinput v-model="formData.installationPosition_dictText" :disabled="true" />
               </uni-forms-item>
               <uni-forms-item :label-width="80" name="remark" label="点检日期:">
@@ -35,6 +43,12 @@
               </uni-forms-item>
               <uni-forms-item :label-width="80" name="outNum" label="点检人:">
                  <uni-easyinput v-model="formData.operator" :disabled="true" />
               </uni-forms-item>
               <uni-forms-item :label-width="80" name="operatorPhone_dictText" label="点检人电话:">
                  <uni-easyinput v-model="formData.operatorPhone_dictText" :disabled="true" />
               </uni-forms-item>
               <uni-forms-item :label-width="80" name="formData.remark" label="备注:">
                  <uni-easyinput v-model="formData.remark" :disabled="true" />
               </uni-forms-item>
               <uni-forms-item :label-width="80" name="outNum" label="点检图片:">
@@ -72,15 +86,6 @@
                     <view class="flex-sub bg-white padding-xs margin-xs radius text-right">
                        {{item.itemDemand}}
                     </view>
                     <!-- <view class="flex-sub bg-white padding-xs margin-xs radius text-right"
                        v-if="item.itemDemand!=null && item.itemDemand.length>10">
                        {{(item.itemDemand).toString().substr(0,10)+'...'}}
                     </view>
                     <view class="flex-sub bg-white padding-xs margin-xs radius text-right" v-else>
                        {{item.itemDemand}}
                     </view> -->
                  </view>
                  <view class="flex">
                     <view class="flex-sub text-light bg-white  padding-xs margin-xs radius">点检结果:</view>
@@ -221,8 +226,10 @@
            procInstId: '',
            values: '',
            flag: '',
            from: '',
            standardId: '',
            previewImageSrc: ''
            previewImageSrc: '',
            todoName: ''
         }
@@ -241,8 +248,18 @@
      onLoad(options) {
         const annItem = JSON.parse(decodeURIComponent(options.item));
         this.flag = options.flag
         console.log(this.flag)
         this.id = annItem.dataId
         if (this.flag == 'task') {
            this.todoName = annItem.taskName
         } else {
            this.todoName = annItem.name
         }
         this.from = options.from
         if (this.from === 'detils') {
            this.id = annItem.id;
            console.log(annItem.id);
         } else {
            this.id = annItem.dataId;
         }
         this.taskId = annItem.id
         this.procInstId = annItem.procInstId
         this.values = annItem.values
@@ -256,6 +273,10 @@
      },
      methods: {
         handleImageError(e) {
            const icon_prefix = "/static/";
            this.previewImageSrc = icon_prefix + "icn_erro.png"
         },
         changehandlingType(e) {
            this.ScanData.typeName = e;
         },
@@ -275,7 +296,8 @@
                     });
                     return false;
                  }
                  if (this.ScanData.handlingSuggestion == undefined || this.ScanData.handlingSuggestion == null ||
                  if (this.ScanData.handlingSuggestion == undefined || this.ScanData.handlingSuggestion ==
                     null ||
                     this
                     .ScanData.handlingSuggestion ==
                     '') {
@@ -321,6 +343,13 @@
                     // })
                     this.$Router.replaceAll({
                        name: 'ToDoList'
                     })
                  } else {
                     uni.showModal({
                        title: "提示",
                        content: res.data.message,
                        confirmText: '确定',
                        showCancel: false,
                     })
                  }
               }).catch(() => {
@@ -466,19 +495,32 @@
                  console.log(this.announcement1.operator_dictText)
                  this.formData.operator = this.announcement1.operator_dictText
                  this.formData.num = this.announcement1.equipmentId
                  this.formData.remark = this.announcement1.remark
                  this.formData.installationPosition_dictText = this.announcement1
                     .installationPosition_dictText
                  this.formData.inspectionStatus_dictText = this.announcement1.inspectionStatus_dictText
                  this.formData.operatorPhone_dictText = this.announcement1.operatorPhone_dictText
                  this.formData.orderNum = this.announcement1.orderNum
                  this.formData.inspectionDate = this.announcement1.inspectionDate
                  this.formData.inspectionStatus = this.announcement1.inspectionStatus
                  this.ScanData.typeName = this.announcement1.confirmDealType
                  this.formData.confirmComment = this.announcement1.confirmDealType_dictText
                  this.ScanData.handlingSuggestion = this.announcement1.confirmComment
                  this.title = this.todoName ?? '详情';
                  if (this.announcement1.standardId !== null) {
                     this.standardId = this.announcement1.standardId
                     this.getStandardFile()
                  }
                  if (this.formData.inspectionStatus == 'WAIT_INSPECTION') {
                     if (this.flag == 'task') {
                        // this.title = '班组长确认'
                        this.readonly = true
                        this.isShowBtn = false
                     }
                  }
                  if (this.formData.inspectionStatus == 'COMPLETE') {
                     if (this.flag == 'task') {
                        this.title = '班组长确认'
                        // this.title = '班组长确认'
                        this.isTouch = true
                        this.readonly = true
                        this.isShowTeam = true
@@ -486,13 +528,13 @@
                     }
                  } else if (this.formData.inspectionStatus == 'WAIT_CONFIRM') {
                     if (this.flag == 'task') {
                        this.title = '点检执行';
                        // this.title = '班组长确认';
                        this.readonly = true
                        this.isShowTeam = true
                        this.isTouch = true
                        this.isShowBtn = false
                     } else {
                        this.title = '点检开始';
                        // this.title = '点检开始';
                        this.isShowTeam = true
                        this.isTouch = false
                        this.readonly = true
@@ -501,7 +543,7 @@
                  } else if (this.formData.inspectionStatus == 'UNDER_INSPECTION') {
                     if (this.flag == 'task') {
                        this.title = '点检开始';
                        // this.title = '点检开始';
                        this.isShowBtn = false;
                     }