Houjie
2025-07-07 0a48655d2162b709ecb80d249a4085971add6140
pages/ToDoList/ToDoBaoZhouSure/ToDoBaoZhouSure.vue
@@ -14,16 +14,25 @@
               <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="maintenanceStatus_dictText" label="工单状态:">
                  <uni-easyinput v-model="formData.maintenanceStatus_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="maintenanceDate" label="保养日期:">
                  <uni-easyinput v-model="formData.maintenanceDate" :disabled="true" />
               </uni-forms-item>
               <uni-forms-item :label-width="80" name="operator" label="保养人:">
                  <uni-easyinput v-model="formData.operator" :disabled="true" />
               </uni-forms-item>
               <uni-forms-item :label-width="100" name="operator" label="保养人电话:">
                  <uni-easyinput v-model="formData.operatorPhone_dictText" :disabled="true" />
               </uni-forms-item>
               <uni-forms-item :label-width="80" name="remark" label="备注:">
                  <uni-easyinput v-model="formData.remark" :disabled="true" />
@@ -60,33 +69,14 @@
                     <view class="flex-sub bg-white padding-xs margin-xs radius text-right">
                        {{item.subItemName}}
                     </view>
                     <!-- <view class="flex-sub bg-white padding-xs margin-xs radius text-right"
                        v-if="item.subItemName!=null && item.subItemName.length>10">
                        {{(item.subItemName).toString().substr(0,10)+'...'}}
                     </view> -->
                     <!-- <view class="flex-sub bg-white padding-xs margin-xs radius text-right" v-else>
                        {{item.subItemName}}
                     </view> -->
                  </view>
                  <view class="flex">
                     <view class="flex-sub text-light bg-white  padding-xs margin-xs radius">保养要求:</view>
                     <view class="flex-sub bg-white padding-xs margin-xs radius text-right">
                        {{item.itemDemand}}
                     </view>
                     <!-- <zb-tooltip placement="left" ref="tooltip7"  >
                        <view slot="content">
                           <view class="flex-sub bg-white padding-xs margin-xs radius text-right">
                              {{item.itemDemand}}
                           </view>
                        </view>
                        <view >
                           <button size="mini">更多</button >
                        </view>
                     </zb-tooltip> -->
                     <!-- <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>
@@ -114,16 +104,17 @@
         </uni-collapse>
         <uni-forms  v-show="isShowSure"  ref="form" :modelValue="ScanData" validate-trigger="bind" err-show-type="undertext">
         <uni-forms v-show="isShowSure" ref="form" :modelValue="ScanData" validate-trigger="bind"
            err-show-type="undertext">
            <uni-group top="1">
               <view class="divider"><text>班组长确认信息</text></view>
               <!--    <view class="text-gray margin-bottom-lg">—————————班组长确认信息——————————</view> -->
               <uni-forms-item :label-width="80" required name="typeName" label="确认类型:">
                  <uni-data-select v-model="ScanData.typeName" :localdata="ScanData.handlingType"
                     @change="changehandlingType" placeholder="请选择" :disabled="isShowSure" />
                     @change="changehandlingType" placeholder="请选择" :disabled="isShowSureBtn" />
               </uni-forms-item>
               <uni-forms-item :label-width="80" required name="handlingSuggestion" label="确认意见:">
                  <uni-easyinput type="textarea" v-model="ScanData.handlingSuggestion" :disabled="isShowSure" />
                  <uni-easyinput type="textarea" v-model="ScanData.handlingSuggestion" :disabled="isShowSureBtn"/>
               </uni-forms-item>
            </uni-group>
@@ -137,10 +128,10 @@
                  <uni-easyinput type="textarea" v-model="ScanData.initialAcceptanceComment" placeholder="请输入意见"
                     :disabled="isShowLast" />
               </uni-forms-item>
               <uni-forms-item :label-width="80"  name="randomInspectionFlag" label="抽检标记:">
               <uni-forms-item :label-width="80" name="randomInspectionFlag" label="抽检标记:">
                  <uni-data-select v-model="ScanData.InspectionFlagName"
                     :localdata="ScanData.randomInspectionFlagList" @change="changehandlingInspectionFlag"
                     placeholder="请选择"    :disabled="isShowLast"/>
                     placeholder="请选择" :disabled="isShowLast" />
               </uni-forms-item>
               <uni-forms-item :label-width="80" name="outNum" label="初验收附件:">
                  <uni-file-picker limit="9" :value="fileList" :image-styles="imageStyles"
@@ -157,7 +148,7 @@
                  <uni-easyinput type="textarea" v-model="ScanData.finalAcceptanceComment" placeholder="请输入意见"
                     :disabled="isfinal" />
               </uni-forms-item>
               <uni-forms-item :label-width="80"  name="finalFlagName" label="抽检标记:">
               <uni-forms-item :label-width="80" name="finalFlagName" label="抽检标记:">
                  <uni-data-select v-model="ScanData.finalFlagName" :localdata="ScanData.finalInspectionFlagList"
                     @change="changehandlingFinalFlag" placeholder="请选择" :disabled="isfinal" />
               </uni-forms-item>
@@ -184,6 +175,7 @@
      mixins: [MescrollMixin], // 使用mixin
      data() {
         return {
            isShowSureBtn:false,
            readonly: false,
            readonlyFirstFanl: false,
            readonlyFirst: false,
@@ -293,11 +285,13 @@
            procInstId: '',
            values: '',
            flag: '',
            from: '',
            imageFiles: '',
            imageObjectInIt: [],
            imageFilesList: [],
            imageObjectFinal: [],
            imageFilesnitialAcceptList: []
            imageFilesnitialAcceptList: [],
            todoName: ''
         }
      },
      computed: {
@@ -314,9 +308,19 @@
      onLoad(options) {
         const annItem = JSON.parse(decodeURIComponent(options.item));
         this.flag = options.flag
         console.log(this.flag)
         this.from = options.from
         if (this.flag == 'task') {
            this.todoName = annItem.taskName
         } else {
            this.todoName = annItem.name
         }
         if (this.from === 'detils') {
            this.id = annItem.id;
            console.log(annItem.id);
         } else {
            this.id = annItem.dataId;
         }
         this.variables = annItem.variables
         this.id = annItem.dataId
         this.taskId = annItem.id
         this.procInstId = annItem.procInstId
         this.assignee = annItem.assignee
@@ -328,7 +332,7 @@
      },
      methods: {
         changehandlingFinalFlag(e) {
            this.ScanData.finalFlagName = e;
         },
@@ -430,6 +434,14 @@
                  // })
                  this.$Router.replaceAll({
                     name: 'ToDoList'
                  })
               } else {
                  uni.showModal({
                     title: "提示",
                     content: res.data.message,
                     confirmText: '确定',
                     showCancel: false,
                  })
               }
            }).catch(() => {
@@ -671,16 +683,22 @@
               //设置列表数据
               if (res.data.success) {
                  console.log("res", res.data.result.equipmentCode)
                  this.title = this.todoName ?? '详情'
                  this.formData.num = this.announcement1.equipmentId
                  this.formData.orderNum = this.announcement1.orderNum
                  this.formData.maintenanceStatus_dictText = this.announcement1.maintenanceStatus_dictText
                  this.formData.installationPosition_dictText = this.announcement1
                     .installationPosition_dictText
                  this.formData.operator = this.announcement1.operator_dictText
                  this.formData.operatorPhone_dictText = this.announcement1.operatorPhone_dictText
                  this.formData.maintenanceDate = this.announcement1.maintenanceDate
                  this.formData.remark = this.announcement1.remark
                  this.ScanData.finalAcceptanceComment = this.announcement1.finalAcceptanceComment
                  if (this.announcement1.randomInspectionFlag != null) {
                     this.ScanData.InspectionFlagName = this.announcement1.randomInspectionFlag
                  }
                  if (this.announcement1.finalRandomInspectionFlag != null) {
                     this.ScanData.finalFlagName = this.announcement1.finalRandomInspectionFlag
                  }
@@ -692,18 +710,20 @@
                      */
                     case 'WAIT_INITIAL_ACCEPTANCE':
                        if (this.flag == 'task') {
                           this.title = '详情'
                           this.readonly = true;
                           this.readonlyFirst = true;
                           this.isShowSure = true;
                           this.isHideFist = true;
                           this.isShowLast = true;
                           this.isShowBtn = false;
                        } else {
                           this.title = '初检'
                           // this.title = '详情'
                           this.readonly = true
                           this.isShowSure = true;
                           this.isHideFist = true;
                           this.isShowSureBtn=true
                           this.readonlyFirst = true
                           this.isShowSure = true
                           this.isHideFist = true
                           this.isShowLast = true
                           this.isShowBtn = false
                        } else {
                           // this.title = '初检'
                           this.readonly = true
                           this.isShowSureBtn=true
                           this.isShowSure = true
                           this.isHideFist = true
                        }
                        break
@@ -712,24 +732,26 @@
                         */
                     case 'WAIT_FINAL_ACCEPTANCE':
                        if (this.flag == 'task') {
                           this.title = '详情'
                           // this.title = '详情'
                           this.readonly = true
                           this.readonlyFirst = true
                           this.isHideFist = true;
                           this.isShowLast = true;
                           this.isShowSure = true;
                           this.isHideLast = true;
                           this.isShowBtn = false;
                           this.isfinal = true;
                           this.readonlyFirstFanl = true;
                           this.isHideFist = true
                           this.isShowLast = true
                           this.isShowSure = true
                           this.isHideLast = true
                           this.isShowBtn = false
                           this.isfinal = true
                           this.isShowSureBtn=true
                           this.readonlyFirstFanl = true
                        } else {
                           this.title = '设能部终验'
                           // this.title = '设能部终验'
                           this.readonly = true
                           this.isShowSureBtn=true
                           this.readonlyFirst = true
                           this.isHideFist = true;
                           this.isShowLast = true;
                           this.isShowSure = true;
                           this.isHideLast = true;
                           this.isHideFist = true
                           this.isShowLast = true
                           this.isShowSure = true
                           this.isHideLast = true
                        }
                        break
@@ -739,19 +761,21 @@
                     case 'WAIT_CONFIRM':
                        if (this.flag == 'task') {
                           this.title = '详情'
                           // this.title = '详情'
                           this.readonly = true
                           this.isHideLast = false
                           this.isHideFist = false
                           this.isShowBtn = false
                           this.isShowSure = true
                        } else {
                           this.title = '班组长确认'
                           // this.title = '班组长确认'
                           this.isHideLast = false
                           this.readonly = true
                           this.isHideFist = false
                           this.isShowBtn = true
                           this.isShowSure = false
                           this.isShowSure = true
                        }
                        break
@@ -761,23 +785,26 @@
                        this.isHideFist = true
                        this.isShowLast = true
                        this.isfinal = true
                        this.isShowSureBtn=true
                        this.readonlyFirst = true
                        this.readonly = true
                        this.readonlyFirstFanl = true
                        this.isShowBtn = false
                        this.title = '详情'
                        // this.title = '详情'
                        break
                     case 'UNDER_MAINTENANCE':
                        this.isfinal = true
                        this.readonlyFirst = true
                        this.readonly = true
                        this.readonlyFirstFanl = true
                        this.isShowBtn = false
                        this.title = '详情'
                        break
                     case 'WAIT_MAINTENANCE':
                        if (this.flag == 'task')
                           this.readonly = true
                        this.isShowBtn = false
                        break
                  }
                  this.ScanData.initialAcceptanceComment = this.announcement1.initialAcceptanceComment
                  this.ScanData.typeName = this.announcement1.confirmDealType