guarantee-lsq 2 years ago
parent
commit
b9002c83e4

+ 11 - 7
src/views/repair/application-form/modules/DetailRepair.vue

@@ -272,7 +272,7 @@
           <a-button style="margin-left: 8px" type="default">接单</a-button>
           <a-button style="margin-left: 8px" type="default">接单</a-button>
         </a-popconfirm>
         </a-popconfirm>
         <a-button v-if="$auth('repair-application-forms-dispatch') && (DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.RECEIVED === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.MM_DISPATCH === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.DISPATCH_REPAIR === model.status)" style="margin-left: 16px" type="default" @click="handleAssign">派单</a-button>
         <a-button v-if="$auth('repair-application-forms-dispatch') && (DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.RECEIVED === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.MM_DISPATCH === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.DISPATCH_REPAIR === model.status)" style="margin-left: 16px" type="default" @click="handleAssign">派单</a-button>
-        <a-button v-if="(DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REPAIR_FAIL === model.status)" style="margin-left: 16px" type="default" @click="reportRepair">维修上报</a-button>
+        <a-button v-if="(DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status )" style="margin-left: 16px" type="default" @click="reportRepair">维修上报</a-button>
         <a-button v-if="(DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REPAIR_FAIL === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.MM_REPAIR_FAIL === model.status)" style="margin-left: 16px" type="default" @click="handleReportRepair">处理维修上报</a-button>
         <a-button v-if="(DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REPAIR_FAIL === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.MM_REPAIR_FAIL === model.status)" style="margin-left: 16px" type="default" @click="handleReportRepair">处理维修上报</a-button>
         <a-button v-if="$auth('repair-application-forms-finish') && (DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.WAIT_SUBMIT === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REPAIR_FAIL === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.MM_REPAIR_FAIL === 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.WAIT_SUBMIT === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REPAIR_FAIL === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.MM_REPAIR_FAIL === model.status)" style="margin-left: 8px" type="default" @click="handleTransfer()">转派</a-button>
         <a-button v-if="$auth('repair-application-forms-examine') && 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-examine') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status" style="margin-left: 8px" type="default" @click="handleFinish()">完成维修</a-button>
@@ -289,16 +289,15 @@
         <a-popconfirm v-if="$auth('repair-application-forms-reback') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ACCEPTANCE === model.status" title="是否要拒绝?" @confirm="handleReturn">
         <a-popconfirm v-if="$auth('repair-application-forms-reback') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ACCEPTANCE === model.status" title="是否要拒绝?" @confirm="handleReturn">
           <a-button style="margin-left: 8px" type="error">拒绝</a-button>
           <a-button style="margin-left: 8px" type="error">拒绝</a-button>
         </a-popconfirm>
         </a-popconfirm>
-        <!-- <a-button v-show="model.level!==6 && model.status!==6 && model.status!==14" style="margin-left: 8px" type="primary" >转大修</a-button> -->
+        <a-button v-show=" model.status===10" style="margin-left: 8px" type="primary" @click="recoverPause">挂起解除</a-button>
+        <a-button v-show="model.level!==6 && model.status!==6 && model.status!==14" style="margin-left: 8px" type="primary" >转大修</a-button>
+        <a-button v-show="model.status===21" style="margin-left: 8px" type="primary" >大修审核</a-button>
         <a-button style="margin-left: 8px" type="primary" @click="handleCancel">返回</a-button>
         <a-button style="margin-left: 8px" type="primary" @click="handleCancel">返回</a-button>
       </div>
       </div>
       <div class="btn" v-else>
       <div class="btn" v-else>
         <a-button style="margin-left: 8px" type="primary" @click="handleCancel">返回</a-button>
         <a-button style="margin-left: 8px" type="primary" @click="handleCancel">返回</a-button>
         <a-button v-show="model.status===15 || model.status===17 || model.status === 19 " style="margin-left: 8px" type="primary" @click="handleCheck">审核</a-button>
         <a-button v-show="model.status===15 || model.status===17 || model.status === 19 " style="margin-left: 8px" type="primary" @click="handleCheck">审核</a-button>
-        <a-button v-show="model.status===21" style="margin-left: 8px" type="primary" >大修审核</a-button>
-        <a-button v-show="model.status===20" style="margin-left: 8px" type="primary" >再次发起审核</a-button>
-        <a-button v-show="model.status===8" style="margin-left: 8px" type="primary" >维修挂起</a-button>
-
+        <a-button v-show="model.status===20" style="margin-left: 8px" type="primary" @click="handleCheck">再次发起审核</a-button>
       </div>
       </div>
     </div>
     </div>
     <check-form ref="checkForm" @ok="handleOk" />
     <check-form ref="checkForm" @ok="handleOk" />
@@ -336,7 +335,7 @@
 <script>
 <script>
 // import { stringify } from 'qs'
 // import { stringify } from 'qs'
 import DetailList from '@/components/tools/DetailList'
 import DetailList from '@/components/tools/DetailList'
-import { fetchRepairApplicationForm, approve, receive, receiveRepair, closeRepair } from '@/api/repair/application-form'
+import { fetchRepairApplicationForm, approve, receive, receiveRepair, closeRepair, recoverRepair } from '@/api/repair/application-form'
 import CheckForm from './CheckForm'
 import CheckForm from './CheckForm'
 import BaseOutForm from './BaseOutForm'
 import BaseOutForm from './BaseOutForm'
 import FinishForm from './FinishForm'
 import FinishForm from './FinishForm'
@@ -913,6 +912,11 @@ export default {
         this.handleOk()
         this.handleOk()
       })
       })
     },
     },
+    recoverPause () {
+      recoverRepair({ id: this.model.id }).then(res => {
+        this.$message.info('操作成功')
+      })
+    },
     batchDeleteFee (id) {
     batchDeleteFee (id) {
       let ids = []
       let ids = []
       if (this.BaseTool.String.isBlank(id)) {
       if (this.BaseTool.String.isBlank(id)) {

+ 9 - 2
src/views/repair/application-form/modules/PlanCheckForm.vue

@@ -15,7 +15,7 @@
 
 
       </a-form-item>
       </a-form-item>
 
 
-      <row-list :col="1">
+      <row-list :col="1" v-if="type!==20">
         <row-item>
         <row-item>
           <a-form-item
           <a-form-item
             label="审核"
             label="审核"
@@ -61,7 +61,8 @@ import {
   verifyPassRepair,
   verifyPassRepair,
   verifyRefusedRepair,
   verifyRefusedRepair,
   verifyProduceRefusedRepair,
   verifyProduceRefusedRepair,
-  verifyProduceRepair
+  verifyProduceRepair,
+  applyVerifyRepair
 } from '@/api/repair/application-form'
 } from '@/api/repair/application-form'
 
 
 export default {
 export default {
@@ -145,6 +146,12 @@ export default {
               this.handleCancel()
               this.handleCancel()
             })
             })
             break
             break
+          case this.type === 20:
+            applyVerifyRepair(values).then(res => {
+              this.$message.success(res.message)
+              this.handleCancel()
+            })
+            break
         }
         }
       })
       })
     },
     },

+ 61 - 16
src/views/repair/application-form/modules/ReportUpForm.vue

@@ -8,12 +8,34 @@
     @cancel="handleCancel"
     @cancel="handleCancel"
   >
   >
     <a-form :form="form">
     <a-form :form="form">
-      <a-form-item v-show="false" >
-        <a-input v-decorator="['id']" type="hidden"/>
-      </a-form-item>
+      <row-list :col="2">
+
+        <a-form-item v-show="false" >
+          <a-input v-decorator="['id']" type="hidden"/>
+        </a-form-item>
+        <row-item v-show="!visibleReport">
+          <a-form-item
+            label="上报处理"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-select
+              v-decorator="['reportHandleType']"
+              @change="changeReportFlag"
+              placeholder="请选择">
+              <a-select-option
+                v-for="item in reportHandleTypeMap"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">{{ item.label }}
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+        </row-item>
+      </row-list>
 
 
       <row-list :col="2">
       <row-list :col="2">
-        <row-item v-show='visibleReport'>
+        <row-item v-show="visibleReport|| model.reportHandleType===3">
           <a-form-item
           <a-form-item
             label="上报对象"
             label="上报对象"
             :labelCol="BaseTool.Constant.labelCol"
             :labelCol="BaseTool.Constant.labelCol"
@@ -33,7 +55,7 @@
           </a-form-item>
           </a-form-item>
         </row-item>
         </row-item>
 
 
-        <row-item v-show='!visibleReport'>
+        <row-item v-show="!visibleReport&&model.reportHandleType===1">
           <a-form-item
           <a-form-item
             label="派工对象"
             label="派工对象"
             :labelCol="BaseTool.Constant.labelCol"
             :labelCol="BaseTool.Constant.labelCol"
@@ -54,7 +76,16 @@
         </row-item>
         </row-item>
       </row-list>
       </row-list>
       <row-list :col="1">
       <row-list :col="1">
-        <row-item v-show='visibleReport'>
+        <row-item v-show="model.reportHandleType===4">
+          <a-form-item
+            label="挂起原因"
+            :labelCol="BaseTool.Constant.labelCol2"
+            :wrapperCol="BaseTool.Constant.wrapperCol2"
+          >
+            <a-textarea v-decorator="['remark']"/>
+          </a-form-item>
+        </row-item>
+        <row-item v-show="(visibleReport&&model.reportHandleType===1) || (!visibleReport&&model.reportHandleType===3)">
           <a-form-item
           <a-form-item
             label="上报原因"
             label="上报原因"
             :labelCol="BaseTool.Constant.labelCol2"
             :labelCol="BaseTool.Constant.labelCol2"
@@ -63,13 +94,13 @@
             <a-textarea v-decorator="['remark']"/>
             <a-textarea v-decorator="['remark']"/>
           </a-form-item>
           </a-form-item>
         </row-item>
         </row-item>
-        <row-item v-show='!visibleReport'>
+        <row-item v-show="!visibleReport&&model.reportHandleType===1">
           <a-form-item
           <a-form-item
             label="上报备注"
             label="上报备注"
             :labelCol="BaseTool.Constant.labelCol2"
             :labelCol="BaseTool.Constant.labelCol2"
             :wrapperCol="BaseTool.Constant.wrapperCol2"
             :wrapperCol="BaseTool.Constant.wrapperCol2"
           >
           >
-            <a-textarea disabled='disabled' v-decorator="['remark']"/>
+            <a-textarea disabled="disabled" v-decorator="['remark']"/>
           </a-form-item>
           </a-form-item>
         </row-item>
         </row-item>
       </row-list>
       </row-list>
@@ -100,7 +131,21 @@ export default {
       roleUserMap: [],
       roleUserMap: [],
       // 下拉框map
       // 下拉框map
       reportLeaderId: null,
       reportLeaderId: null,
-      visibleReport: false
+      visibleReport: false,
+      reportHandleTypeMap: [
+        {
+          label: '派工',
+          value: 1
+        },
+        {
+          label: '上报',
+          value: 3
+        },
+        {
+          label: '挂起',
+          value: 4
+        }
+      ]
     }
     }
   },
   },
   components: {
   components: {
@@ -119,10 +164,6 @@ export default {
       if (record.reportHandleType === 2) {
       if (record.reportHandleType === 2) {
         this.modalTitle = '维修上报'
         this.modalTitle = '维修上报'
         this.visibleReport = true
         this.visibleReport = true
-        if (record.roleType === 1) {
-          // 维修人上报,type 3
-          record.reportHandleType = 3
-        }
       } else {
       } else {
         this.modalTitle = '上报处理'
         this.modalTitle = '上报处理'
         this.visibleReport = false
         this.visibleReport = false
@@ -136,7 +177,8 @@ export default {
       this.$nextTick(() => {
       this.$nextTick(() => {
         setFieldsValue(Object.assign(pick(record, [
         setFieldsValue(Object.assign(pick(record, [
           'id',
           'id',
-          'remark'
+          'remark',
+          'reportHandleType'
         ])))
         ])))
       })
       })
     },
     },
@@ -148,6 +190,9 @@ export default {
     changePlanFlag (value) {
     changePlanFlag (value) {
       this.reportLeaderId = value
       this.reportLeaderId = value
     },
     },
+    changeReportFlag (value) {
+      this.model.reportHandleType = value
+    },
     save () {
     save () {
       const { form: { validateFieldsAndScroll } } = this
       const { form: { validateFieldsAndScroll } } = this
       this.confirmLoading = true
       this.confirmLoading = true
@@ -189,11 +234,11 @@ export default {
       } else {
       } else {
         this.$emit('okk')
         this.$emit('okk')
       }
       }
-      /*if (this.BaseTool.Object.isNotBlank(values)) {
+      /* if (this.BaseTool.Object.isNotBlank(values)) {
         this.$emit('ok')
         this.$emit('ok')
       } else {
       } else {
         this.$emit('ok')
         this.$emit('ok')
-      }*/
+      } */
     }
     }
   }
   }
 }
 }