408249787 2 years ago
parent
commit
bfd2e170aa
2 changed files with 27 additions and 13 deletions
  1. 13 0
      src/utils/dict.js
  2. 14 13
      src/views/repair/application-form/modules/DetailRepair.vue

+ 13 - 0
src/utils/dict.js

@@ -846,6 +846,7 @@ DictCache.VALUE = {
     B: 2, // 二级
     C: 3 // 三级
   },
+
   /**
    * 报修状态
    */
@@ -1264,6 +1265,18 @@ DictCache.VALUE = {
  * @type {{LIQUIDATE_TASK_STATUS: {'1': string, '3': string}}}
  */
 DictCache.COLOR = {
+  // 维修进度
+  REPAIR_STATUS: {
+    1: '报修时间',
+    2: '维修开始时间',
+    3: '维修结束时间',
+    4: '审核开始时间',
+    5: '审核驳回时间',
+    6: '维修完成时间',
+    7: '报修驳回时间',
+    8: '转派开始时间'
+
+  },
   WHETHER: {
     0: 'error',
     1: 'success'

+ 14 - 13
src/views/repair/application-form/modules/DetailRepair.vue

@@ -6,11 +6,7 @@
           <div class="gutter-box gutter-color center">
             <div style=" overflow: auto;height: 300px;">
               <a-steps :current="0" direction="vertical" >
-                <a-step title="报修时间:" :description="''+model.applyTime?model.applyTime:''" />
-                <a-step title="维修开始时间:" :description="''+model.repairStartTime?model.repairStartTime:''" />
-                <a-step title="维修结束时间:" :description="''+model.repairEndTime?model.repairEndTime:''" />
-                <a-step title="审核开始时间:" :description="''+model.checkStartTime?model.checkStartTime:''" />
-                <a-step title="审核结束时间:" :description="''+model.checkEndTime?model.checkEndTime:''" />
+                <a-step v-for="item in repairStatus" :key="item.id" :title="DictCache.COLOR.REPAIR_STATUS[item.status]" :description="item.createdTime" />
               </a-steps>
             </div>
           </div>
@@ -286,7 +282,7 @@
                 <a @click="handleViewRepairResolve(record)">方案详情</a>
                 <operation-button
                   @click="handleEditRepairResolve(record)" >修改</operation-button>
-<!--                <operation-button
+                <!--                <operation-button
                   title="确认该条维修记录?"
                   @confirm="deleteRepairResolve(record.id)" >删除</operation-button>-->
               </template>
@@ -295,17 +291,17 @@
         </div>
       </div>
       <div class="btn">
-<!--        <a-button v-if="$auth('repair-application-forms-finish')" style="margin-left: 16px" type="default" @ok="handleOk" @click="handleViewBom()">备件BOM</a-button>
+        <!--        <a-button v-if="$auth('repair-application-forms-finish')" style="margin-left: 16px" type="default" @ok="handleOk" @click="handleViewBom()">备件BOM</a-button>
         <a-button v-if="$auth('repair-application-forms-finish')" style="margin-left: 16px" type="default" @ok="handleOk" @click="handleViewCheck()">维护项目</a-button>-->
         <a-button v-if="$auth('repair-application-forms-assign') && (DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)" style="margin-left: 16px" type="default" @click="handleAssign">派工</a-button>
         <!-- <a-popconfirm v-if="$auth('repair-application-forms-deal') && (DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === model.status)" title="是否要接收?" @confirm="receive">
         <a-button style="margin-left: 8px">接收</a-button>
       </a-popconfirm> -->
-<!--        <a-button v-if="$auth('repair-application-forms-out') && (DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING >= model.status) && model.type != 2" style="margin-left: 8px" type="default" @click="handleOut">委外</a-button>
+        <!--        <a-button v-if="$auth('repair-application-forms-out') && (DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING >= model.status) && model.type != 2" style="margin-left: 8px" type="default" @click="handleOut">委外</a-button>
         <a-button v-if="$auth('repair-application-forms-dispatch') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status" style="margin-left: 8px" type="default" @click="handleDispatch">转派</a-button>-->
         <a-button v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status" style="margin-left: 8px" type="default" @click="handleTransfer()">转派申请</a-button>
         <a-button v-if="$auth('repair-application-forms-finish') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status" style="margin-left: 8px" type="default" @click="handleFinish()">完成</a-button>
-<!--        <a-button v-if="$auth('repair-application-forms-edit')" style="margin-left: 8px" type="default" @click="handleEdit()">修改</a-button>-->
+        <!--        <a-button v-if="$auth('repair-application-forms-edit')" style="margin-left: 8px" type="default" @click="handleEdit()">修改</a-button>-->
         <a-popconfirm v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.WAIT_SUBMIT === model.status" title="是否要提交审核该条数据?" @confirm="handleExamine">
           <a-button style="margin-left: 8px" type="default">提交审核</a-button>
         </a-popconfirm>
@@ -335,10 +331,10 @@
     <base-form ref="baseRepairProjectModal" @ok="handleOk"/>
     <detail ref="detailRepairProjectModal"/>
     <edit-form ref="editForm" @ok="handleOk" />
-    <resolve-base-form ref='resolveBaseForm' @ok='handleResolveOk'/>
-    <resolve-detail ref='resolveDetail' @ok='handleResolveOk'/>
-    <detail-repair-record ref='detailRepairRecord' @ok='handleRepairRecordOk'/>
-    <transfer-form ref='transferForm' @ok='handleOk'/>
+    <resolve-base-form ref="resolveBaseForm" @ok="handleResolveOk"/>
+    <resolve-detail ref="resolveDetail" @ok="handleResolveOk"/>
+    <detail-repair-record ref="detailRepairRecord" @ok="handleRepairRecordOk"/>
+    <transfer-form ref="transferForm" @ok="handleOk"/>
   </div>
 </template>
 
@@ -427,6 +423,7 @@ export default {
       // 下拉框map
       sourceMap: {},
       typeMap: {},
+      repairStatus: [],
       levelMap: {},
       descripitionMap: {},
       selectedRowKeys: [],
@@ -758,6 +755,10 @@ export default {
       queryRepairRecord({ objId: this.model.id, remark: 'repair_record' }).then(res => {
         this.dataRecord = res.data.rows
       })
+      queryRepairRecord({ objId: this.model.id, pageSize: 20, remark: 'repair_status_record' }).then(res => {
+        console.log(res)
+        this.repairStatus = res.data.rows
+      })
       getRepairSchemePage({ repairId: this.model.id }).then(res => {
         this.dataRepairResolve = res.data.rows
       })