Przeglądaj źródła

维修管理工单,非完成报工后执行人接收后报工

huang_an 1 rok temu
rodzic
commit
84221c7385

+ 8 - 1
src/api/maintenance/repair.js

@@ -37,7 +37,7 @@ export async function save(data) {
   return Promise.reject(new Error(res.data.message));
 }
 // // 详情
-export async function details (id) {
+export async function details(id) {
   const res = await request.get(`/eam/spare_parts_apply/details/${id}`);
   if (res.data.code == 0) {
     return res.data.data;
@@ -45,6 +45,13 @@ export async function details (id) {
   return Promise.reject(new Error(res.data.message));
 }
 
+export async function startExecuting(params) {
+  const data = await request.post(`/eam/PdaWorkOrder/startExecuting`, params);
+  if (data.code == 0) {
+    return data.data;
+  }
+  return Promise.reject(new Error(data.message));
+}
 
 // // 保存
 // export async function save (data) {

+ 18 - 23
src/views/maintenance/components/redeployOther2.vue

@@ -72,7 +72,6 @@
           @select-all="handleSelectAll"
           @selection-change="handleSelectionChange"
           cache-key="redeployOther"
-          @done="handleDone"
           :header-cell-class-name="headerCellClassName"
         >
         </ele-pro-table>
@@ -176,7 +175,7 @@
         tabValue: '',
         selectedRowDataId: '',
         tableData: [],
-        arry: [],
+        // arry: [],
         entranceValue: ''
       };
     },
@@ -202,20 +201,19 @@
         this.$refs.tableRef2.clearSelection();
       },
       open(row, val) {
-        console.log(row, val);
         this.entranceValue = val;
+
+        //非完成报工
         if (val == 'noFinishSubmit') {
           this.tabValue = '1';
         }
+        // 转派
         if (val == 'transfer') {
           if (row.assistsName == '') {
             this.tabValue = '2';
           } else {
             this.tabValue = '1';
           }
-          if (row.assists) {
-            this.arry = row.assists.split(',');
-          }
         }
         this.row = row;
         this.name = '';
@@ -224,19 +222,19 @@
         this.visible = true;
         this.$refs.tableRef2.clearSelection();
       },
-      handleDone() {
-        console.log('handDone');
-        // this.$nextTick(() => {
-        //   this.arry.forEach((item) => {
-        //     this.tableData.find((item2) => {
-        //       if (item == item2.id) {
-        //         console.log(item2, 'item2');
-        //         this.$refs.tableRef2.toggleRowSelection(item2, true);
-        //       }
-        //     });
-        //   });
-        // });
-      },
+      // handleDone() {
+      //   console.log('handDone');
+      //   this.$nextTick(() => {
+      //     this.arry.forEach((item) => {
+      //       this.tableData.find((item2) => {
+      //         if (item == item2.id) {
+      //           console.log(item2, 'item2');
+      //           this.$refs.tableRef2.toggleRowSelection(item2, true);
+      //         }
+      //       });
+      //     });
+      //   });
+      // },
       //重置
       reset() {
         this.name = '';
@@ -322,10 +320,7 @@
       },
       confirm() {
         this.visible = false;
-        this.$emit('confirm', {
-          id: this.selectedRow.id,
-          name: this.selectedRow.name
-        });
+        this.$emit('confirm', this.selectedRow);
       },
       cancel() {
         this.tabValue = '1';

+ 1 - 1
src/views/maintenance/equipment/workOrder/index.vue

@@ -290,7 +290,7 @@
         this.$refs.printRef11.open(row.id, val);
       },
       handleExport(row) {
-        const url = `http://192.168.1.251:8085/jmreport/view/1057242475693346816?token=${getToken()}&id=${
+        const url = `http://192.168.120.128:8085/jmreport/view/1059771706421719040?token=${getToken()}&id=${
           row.id
         }`;
         window.open(url, '_blank');

+ 1 - 1
src/views/maintenance/patrol/workOrder/index.vue

@@ -274,7 +274,7 @@
         this.$refs.signingUpWorkRef.open(row);
       },
       handleExport(row) {
-        const url = `http://192.168.1.251:8085/jmreport/view/1058892076053696512?token=${getToken()}&id=${
+        const url = `http://192.168.120.128:8085/jmreport/view/1059768834820845568?token=${getToken()}&id=${
           row.id
         }`;
         window.open(url, '_blank');

+ 276 - 0
src/views/maintenance/repair/components/notice.vue

@@ -0,0 +1,276 @@
+<template>
+  <el-dialog
+    :visible.sync="visible"
+    :before-close="close"
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    width="60%"
+    title="注意事项"
+  >
+    <div>
+      <div class="table_box">
+        <div class="title">维护修理作业职业健康安全、环保注意事项</div>
+
+        <div class="one_content"
+          >1、进人维修作业区的维修人员按规定穿戴劳动防护用品,有规定要戴安全帽、口罩的场所要戴好;</div
+        >
+        <div class="one_content"
+          >2、维修前应进行现场安全检查,检查内容包括设备、电气装置、机重机械、吊具、安全用具等;施工维修现场应有明显的提示标志,并保持现场道路畅通;</div
+        >
+        <div class="one_content">
+          3、办理好动力停供单、工作票、操作票、危险作业票证等维修许可证,需停水、停电、停气时要做好相应的准备工作,所拉开(或关闭)的各种开关、阀门必须挂标示牌,在易燃、易爆区域动火作业时,在动火前要办理好动火证;
+        </div>
+        <div class="one_content"
+          >4、检修人员应熟悉并认真执行本工种的安全技术操作规程,进人维修现场必须集中精力,随时注意自身和他人的安全;</div
+        >
+        <div class="one_content"
+          >5、凡有两人以上共同作业的维修,必须指定其中一人负责安全;</div
+        >
+        <div class="one_content"
+          >6、检修时需要搭接临时电源,需得到对方同意,并按要求搭接:</div
+        >
+        <div class="one_content">
+          7、脚手架和起重设备上空及邻近空间如有管网、电线,应控制好安全距离,上、下层垂直线同时作业时,各层之间应设遮挡板,具堆放要稳固,禁止从高处向下推掷料具,传递工具和材料禁止抛掷,传递绳索强度要满足要求;
+        </div>
+        <div class="one_content"
+          >8、高处作业用梯子要有人扶,梯子斜度一般以 60
+          度为宜,禁止两人在一个梯子上作业,超过
+          2米要系安全带,地面应有安全护人指挥;</div
+        >
+        <div class="one_content"
+          >9、维修现场的电焊机、氧气瓶、乙炔瓶摆放要符合安全规定,严禁在带压的压力容器和压力管道上作业,焊接时保持通风良好潮湿地点要有防触电保护措施;</div
+        >
+        <div class="one_content"
+          >10、起重设备时起吊人员不得站在吊物下,搬抬设备时要防止滚动和滑动,要统一指挥;</div
+        >
+        <div class="one_content">
+          11、在粉尘、有毒有害的环境下检修,要符合安全规定,做好个人防护措施;废石棉、含油抹布、含油草纸的处置根据对方要求定点投放,设备漏油必须及时告知对方,维修完毕后,必须清理现场,搞好现场卫生;
+        </div>
+        <div class="one_content"
+          >12、严格执行操作规程,不得违章指挥和违章作业,对违章作业的指令有权拒绝并有责任制止他人违章作业;</div
+        >
+        <div class="one_content">13、</div>
+        <div class="one_content">14、</div>
+        <div class="one_content">15、</div>
+
+        <div class="title">安 全 交 底 单</div>
+
+        <div class="item_box">
+          <div class="left">委托单位:</div>
+          <div class="rigth">
+            <div class="need">需实施</div>
+            <div class="stop">已实施</div>
+          </div>
+        </div>
+
+        <div class="item_box">
+          <div class="left"
+            >1、进人施工现场时应得到委托方的安全交底和检修许可,所拉开(或关闭)的各种开关、阀门经双方确实无误,由维修人员挂好标示牌后,方可作业;</div
+          >
+          <div class="rigth">
+            <div class="need">√</div>
+            <div class="stop"></div>
+          </div>
+        </div>
+
+        <div class="item_box">
+          <div class="left"
+            >2、维修人员动用委托方设备,需征得对方同意,委托方须保证维修设备与运行设备之间有足够的安全距离并做好安全防护措施;</div
+          >
+          <div class="rigth">
+            <div class="need">√</div>
+            <div class="stop"></div>
+          </div>
+        </div>
+
+        <div class="item_box">
+          <div class="left"
+            >3、作业人员维修过程中办理完工作票、操作票及危险作业票证,确认安全措施落实后,方可进行作业。</div
+          >
+          <div class="rigth">
+            <div class="need">√</div>
+            <div class="stop"></div>
+          </div>
+        </div>
+
+        <div class="item_box">
+          <div class="left"
+            >4、起重、搬拾设备时,所有人员不得在吊物下通过,吊钩下不准站人,不得靠近搬拾设备,维修人员捆绑设备须经生产厂检查认可,严禁私自动用生产厂叉车;</div
+          >
+          <div class="rigth">
+            <div class="need">√</div>
+            <div class="stop"></div>
+          </div>
+        </div>
+
+        <div class="item_box">
+          <div class="left"
+            >5、因维修作业需设置的警戒线或防护隔栏,非维修人员进入维修区必须得到维修单位安全同意,并在安全员陪同下方可进人;</div
+          >
+          <div class="rigth">
+            <div class="need">√</div>
+            <div class="stop"></div>
+          </div>
+        </div>
+
+        <div class="item_box">
+          <div class="left"
+            >6、在委托单位动火作业,动火证由生产厂负责签发,且签发给动火场地生产厂所属班组安全责任人,维修人员负责核实动火证的内容。</div
+          >
+          <div class="rigth">
+            <div class="need">√</div>
+            <div class="stop"></div>
+          </div>
+        </div>
+
+        <div class="item_box">
+          <div class="left">7、维修前对设备维修告知书的内容进行核实;</div>
+          <div class="rigth">
+            <div class="need">√</div>
+            <div class="stop"></div>
+          </div>
+        </div>
+
+        <div class="item_box">
+          <div class="left"
+            >8、维修作业将产生废石棉、含油抹布、含油草纸等危险固体废弃物,处置根据生产厂要求定点投放。补充交底内容:</div
+          >
+          <div class="rigth">
+            <div class="need">√</div>
+            <div class="stop"></div>
+          </div>
+        </div>
+
+        <div class="one_content">补充交底内容:</div>
+
+        <div class="item_box">
+          <div class="left">1、</div>
+          <div class="rigth">
+            <div class="need"></div>
+            <div class="stop"></div>
+          </div>
+        </div>
+
+        <div class="item_box">
+          <div class="left">2、</div>
+          <div class="rigth">
+            <div class="need"></div>
+            <div class="stop"></div>
+          </div>
+        </div>
+
+        <div class="item_box">
+          <div class="left">3、</div>
+          <div class="rigth">
+            <div class="need"></div>
+            <div class="stop"></div>
+          </div>
+        </div>
+
+        <div class="item_box">
+          <div class="left" style="width: 50%">交底时间:</div>
+          <div class="rigth" style="width: 50%; text-align: left; padding: 6px"
+            >委托单位交底负责人:{{ repairInfo.repairUserName }}</div
+          >
+        </div>
+
+        <div class="one_content no_border">接受交底负责人:</div>
+      </div>
+      <div style="display: flex; justify-content: end; margin-top: 12px">
+        <el-button @click="close">取消</el-button>
+        <el-button type="primary" @click="handleAgree()">接受交底</el-button>
+      </div>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+  export default {
+    props: {
+      repairInfo: {
+        type: Object,
+        default: () => {}
+      }
+    },
+    data() {
+      return {
+        visible: false
+      };
+    },
+
+    methods: {
+      close() {
+        this.visible = false;
+      },
+      open(row) {
+        this.visible = true;
+      },
+      handleAgree() {
+        this.$emit('agree');
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .table_box {
+    border: 1px solid #000;
+
+    .title {
+      text-align: center;
+      font-size: 14px;
+      font-weight: 600;
+      border-bottom: 1px solid #000;
+      padding: 6px;
+    }
+
+    .one_content {
+      text-align: left;
+      font-size: 14px;
+      font-weight: 500;
+      border-bottom: 1px solid #000;
+      padding: 6px;
+    }
+    .no_border {
+      border-right: none;
+      border-bottom: none;
+    }
+    .item_box {
+      width: 100%;
+      font-size: 14px;
+      font-weight: 500;
+      border-bottom: 1px solid #000;
+
+      display: flex;
+      flex-direction: row;
+      justify-content: space-between;
+
+      .left {
+        width: 80%;
+        text-align: left;
+        border-right: 1px solid #000;
+        padding: 6px;
+      }
+
+      .rigth {
+        width: 20%;
+        display: flex;
+
+        .need {
+          width: 40%;
+          border-right: 1px solid #000;
+          // padding: 6px;
+          display: flex;
+          align-items: center;
+          justify-content: center;
+        }
+
+        .stop {
+          width: 60%;
+          // padding: 6px;
+          text-align: center;
+        }
+      }
+    }
+  }
+</style>

+ 21 - 52
src/views/maintenance/repair/components/repairReportingWork.vue

@@ -152,11 +152,6 @@
           </div>
         </div>
       </div>
-      <el-row v-if="acceptUserName">
-        <el-form-item label="执行人:" prop="attachments">
-          {{ acceptUserName }}
-        </el-form-item></el-row
-      >
       <el-row>
         <el-row>
           <el-form-item label="附件:" prop="attachments">
@@ -175,17 +170,20 @@
     </el-form>
     <div slot="footer" class="footer">
       <el-button @click="cancel">返回</el-button>
-      <el-button :loading="btnLoading" type="primary" @click="submit('1')"
+      <el-button
+        :loading="btnLoading"
+        type="primary"
+        @click="nonCompletionReport()"
         >非完成报工</el-button
       >
-      <el-button :loading="btnLoading" type="primary" @click="submit('2')"
+      <el-button :loading="btnLoading" type="primary" @click="handlenReport()"
         >报工</el-button
       >
     </div>
     <redeployOther
       ref="redeployOtherRef"
       @refresh="onClose"
-      @confirm="onConfirm"
+      @confirm="handlenReport"
     />
   </el-dialog>
 </template>
@@ -234,10 +232,7 @@
             { required: true, message: '请选择实际起始时间', trigger: 'blur' }
           ]
         },
-        rowData: {},
-        acceptUserId: '',
-        acceptUserName: '',
-        hasClickOnce: false
+        rowData: {}
       };
     },
     methods: {
@@ -249,7 +244,6 @@
         };
         this.rowData = row;
         this.getInfo(row, isRepaire);
-        this.hasClickOnce = false;
         this.visible = true;
       },
       cancel() {
@@ -259,41 +253,21 @@
         this.$refs.redeployOtherRef.visible = false;
         this.getInfo(this.rowData);
       },
-      onConfirm(val) {
-        console.log(val, 'val');
-        this.acceptUserId = val.id;
-        this.acceptUserName = val.name;
-      },
-      async submit(val) {
-        console.log(val, 'val');
-        if (val == '1') {
-          console.log(
-            '非完成报工',
-            this.hasClickOnce,
-            this.formData.time.length,
-            this.formData.reason
-          );
-
-          if (!this.hasClickOnce) {
-            if (this.formData.time.length < 1 || this.formData.reason == '') {
-              this.$message.error('请选择实际起始时间或处理说明');
-              return;
-            }
-            this.hasClickOnce = true;
-            this.$refs.redeployOtherRef.open(this.rowData, 'noFinishSubmit');
+      async nonCompletionReport() {
+        this.$refs.ruleForm.validate(async (valid) => {
+          if (!valid) {
+            console.log('error submit!!');
+            return false;
           } else {
-            console.log('非完成报工确认', this.hasClickOnce);
-            // this.submitForm(val);
+            this.$refs.redeployOtherRef.open(this.rowData, 'noFinishSubmit');
           }
-        } else {
-          this.submitForm(val);
-        }
+        });
       },
 
-      async submitForm(val) {
+      async handlenReport(val) {
+        console.log(val, '确认');
         this.$refs.ruleForm.validate(async (valid) => {
           if (valid) {
-            // if (this.formData.time.length > 0) {
             this.infoData.acceptTime = this.formData.time[0];
             this.infoData.finishTime = this.formData.time[1];
             this.infoData.deviceList = this.infoData.planDeviceList;
@@ -308,17 +282,18 @@
               .flat();
             let boolen = deviceList.every((item) => item.status > -1);
             this.infoData.isAbnormal = boolen ? 1 : 0;
-            this.infoData.acceptUserId = this.acceptUserId;
-            if (val == '1') {
+
+            if (val) {
+              this.infoData.acceptUserId = val.id;
               loseReport(this.infoData).then((res) => {
                 if (res.code == 0) {
-                  // this.$message.success('非报工成功');
                   this.visible = false;
                   this.btnLoading = false;
                   this.$emit('refresh');
                 }
               });
             } else {
+              this.infoData.acceptUserId = '';
               report(this.infoData).then((res) => {
                 if (res.code == 0) {
                   this.$message.success('报工成功');
@@ -328,10 +303,6 @@
                 }
               });
             }
-
-            // } else {
-            //   this.$message.error('请选择实际起始时间');
-            // }
           } else {
             console.log('error submit!!');
             return false;
@@ -364,9 +335,7 @@
       width: 80px;
     }
   }
-  .page {
-    // padding: 10px;
-  }
+
   .page-title {
     background: #fff;
     font-size: 18px;

+ 51 - 4
src/views/maintenance/repair/workOrder/index.vue

@@ -27,6 +27,15 @@
         >
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
+          <el-link
+            v-if="row.orderStatus == 0"
+            type="primary"
+            :underline="false"
+            icon="el-icon-edit"
+            @click="handleNotice(row)"
+          >
+            接收
+          </el-link>
           <el-link
             v-if="row.orderStatus !== 3 && row.orderStatus !== 4"
             type="primary"
@@ -37,7 +46,11 @@
             申请备品备件
           </el-link>
           <el-link
-            v-if="row.orderStatus !== 3 && row.orderStatus !== 4"
+            v-if="
+              row.orderStatus !== 3 &&
+              row.orderStatus !== 4 &&
+              row.orderStatus != 0
+            "
             type="primary"
             :underline="false"
             icon="el-icon-edit"
@@ -91,6 +104,8 @@
     <redeployOther ref="redeployOtherRef" @refresh="reload" />
     <!-- 备件弹窗 -->
     <edit @refresh="reload" ref="edit" />
+    <!-- 非完成报工接收  注意事项-->
+    <Notice ref="noticeShow" :repairInfo="repairInfo" @agree="agree" />
     <!-- <AddSpareDialog
       ref="addSpareDialogRef"
       :selectedSpare="selectedSpare"
@@ -103,14 +118,18 @@
   import { workorderStatus, resultStatus } from '@/utils/dict/operationManage';
   import WorkorderSearch from './components/workorder-search.vue';
   import AddSpareDialog from '@/components/addSpareDialog';
+  import Notice from '../components/notice.vue';
   import edit from '@/views/sparePartsApply/components/edit';
   import RepairReportingWork from '../components/repairReportingWork.vue';
   import RepairDetailsDialog from '../components/RepairDetailsDialog.vue';
   import redeployOther from '@/views/maintenance/components/redeployOther2.vue';
+
   import {
     getWorkOrderList,
     applySpareParts,
-    save
+    save,
+    getWorkOrderDetail,
+    startExecuting
   } from '@/api/maintenance/repair';
   import outin from '@/api/maintenance/outin';
   import { getToken } from '@/utils/token-util';
@@ -125,7 +144,8 @@
       redeployOther,
       AddSpareDialog,
       RepairReportingWork,
-      edit
+      edit,
+      Notice
     },
     data() {
       return {
@@ -288,7 +308,9 @@
         dialogTitle: '',
         isBindPlan: false,
         warehouseList: [],
-        warehouseId: ''
+        warehouseId: '',
+        repairInfo: {},
+        id: ''
       };
     },
     created() {},
@@ -412,6 +434,31 @@
       // 报工
       toReport(row) {
         this.$refs.repairReportingWorkRef.open(row, true);
+      },
+      async handleNotice(row) {
+        this.id = row.id;
+        const res = await getWorkOrderDetail(row.code);
+        console.log(res, 'resresresresres');
+        this.repairInfo = res.repairRequestResponse;
+        this.$refs.noticeShow.open(row);
+      },
+      agree() {
+        this.$refs.noticeShow.close();
+        this.handleExecute();
+      },
+
+      // 执行工单
+      handleExecute() {
+        startExecuting({
+          id: this.id
+        }).then(() => {
+          uni.showToast({
+            icon: 'success',
+            title: '操作成功!',
+            duration: 2000
+          });
+        });
+        this.reload();
       }
     }
   };