Browse Source

维修完善

guarantee-lsq 2 years ago
parent
commit
4cd1ce9395

+ 8 - 5
src/views/repair/application-form/modules/CheckForm.vue

@@ -131,24 +131,25 @@ export default {
           return
         }
         values.verifyImages = this.verifyImages
-        const self = this
         // 日期处理
         if (this.model.type === 1) {
           returnRepair(values)
             .then(() => {
               this.$message.info('已驳回维修,2s后返回【报修审核】')
-              setTimeout(() => {
+              this.handleCancel(values)
+              /* setTimeout(() => {
                 self.$router.push({ path: '/repair/caller/check' })
-              }, 2000)
+              }, 2000) */
             }).catch(() => {
               this.confirmLoading = false
             })
         } else if (this.model.type === 2) {
           examine(values).then(() => {
             this.$message.info('已提交,请等待审核')
-            setTimeout(() => {
+            this.handleCancel(values)
+            /* setTimeout(() => {
               self.$router.push({ path: '/repair/manager/check' })
-            }, 1000)
+            }, 1000) */
           }).catch(() => {
             this.confirmLoading = false
           })
@@ -161,6 +162,8 @@ export default {
       this.form.resetFields()
       if (this.BaseTool.Object.isNotBlank(values)) {
         this.$emit('ok')
+      } else {
+        this.$emit('ok')
       }
     }
 

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

@@ -260,10 +260,10 @@
         </div>
       </div>
       <div class="btn">
-        <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-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-popconfirm v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.WAIT_SUBMIT === model.status" title="是否要提交审核该条数据?" @confirm="handleExamine">
+        <a-button v-if="$auth('repair-application-forms-dispatch') && (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-button v-if="$auth('repair-application-forms-transfer-apply') && (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-examine') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status" style="margin-left: 8px" type="default" @click="handleFinish()">完成维修</a-button>
+        <a-popconfirm v-if="$auth('repair-application-forms-finish') && (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>
         <a-popconfirm v-if="$auth('repair-application-forms-approve') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ACCEPTANCE === model.status" title="是否要接受?" @confirm="handleApprove">

+ 3 - 3
src/views/repair/application-form/modules/FinishForm.vue

@@ -205,12 +205,12 @@ export default {
         // 日期处理
         values.repairFileList = this.repairFileList
         values.repairEndTime = this.BaseTool.Date.formatter(values.repairEndTime, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN)
-        const self = this
         finish(values).then(() => {
           this.$message.info('维修已提交,等待主管审核')
-          setTimeout(() => {
+          this.handleCancel(values);
+          /*setTimeout(() => {
             self.$router.push({ path: '/repair/form/mine' })
-          }, 1000)
+          }, 1000)*/
         }).catch(() => {
           this.confirmLoading = false
         })