guarantee-lsq преди 2 години
родител
ревизия
edb3c17fe3
променени са 2 файла, в които са добавени 23 реда и са изтрити 1 реда
  1. 6 0
      src/api/repair/application-form.js
  2. 17 1
      src/views/repair/application-form/modules/DetailRepair.vue

+ 6 - 0
src/api/repair/application-form.js

@@ -534,3 +534,9 @@ export function checkBigRepair (parameter) {
     data: parameter
   })
 }
+export function repairCancel (parameter) {
+  return axios({
+    url: '/repair/application-forms/repair/delete/' + parameter.id,
+    method: 'PUT'
+  })
+}

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

@@ -300,6 +300,16 @@
         <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 && model.status!==21" style="margin-left: 8px" type="primary" @click="handleBigRepair">转大修</a-button>
         <a-button v-show="model.status===21" style="margin-left: 8px" type="primary" @click="handleCheckBigRepair">大修审核</a-button>
+        <a-popconfirm
+          v-show=" model.status===1||model.status===9"
+          title="确定撤回?"
+          ok-text="是"
+          cancel-text="否"
+          @confirm="handleRepairCancel"
+          style="margin-left: 8px"
+        >
+          <a-button type="primary" >撤回</a-button>
+        </a-popconfirm>
         <a-button style="margin-left: 8px" type="primary" @click="handleCancel">返回</a-button>
       </div>
       <div class="btn" v-else>
@@ -356,7 +366,7 @@
 <script>
 // import { stringify } from 'qs'
 import DetailList from '@/components/tools/DetailList'
-import { fetchRepairApplicationForm, approve, receive, receiveRepair, closeRepair } from '@/api/repair/application-form'
+import { fetchRepairApplicationForm, approve, receive, receiveRepair, closeRepair, repairCancel } from '@/api/repair/application-form'
 import CheckForm from './CheckForm'
 import ToPlanForm from './ToPlanForm'
 import BaseOutForm from './BaseOutForm'
@@ -1409,6 +1419,12 @@ export default {
     handleCheck () {
       const modal = this.$refs.planCheckForm
       modal.base(this.model, this.model.status)
+    },
+    handleRepairCancel () {
+      repairCancel({ id: this.model.id }).then(res => {
+        this.$message.info('操作成功!')
+        this.handleCancel()
+      })
     }
 
   }