|
@@ -276,6 +276,9 @@
|
|
|
<a-popconfirm v-if="$auth('repair-application-forms-approve') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ACCEPTANCE === model.status" title="是否要接受?" @confirm="handleApprove">
|
|
|
<a-button :loading="confirmLoading" style="margin-left: 8px" type="default">接受</a-button>
|
|
|
</a-popconfirm>
|
|
|
+ <a-popconfirm v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.FINISHED === model.status" title="是否要关闭工单?" @confirm="handleClose">
|
|
|
+ <a-button :loading="confirmLoading" style="margin-left: 8px" type="default">关闭工单</a-button>
|
|
|
+ </a-popconfirm>
|
|
|
<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-popconfirm>
|
|
@@ -315,7 +318,7 @@
|
|
|
<script>
|
|
|
// import { stringify } from 'qs'
|
|
|
import DetailList from '@/components/tools/DetailList'
|
|
|
-import { fetchRepairApplicationForm, approve, receive, receiveRepair } from '@/api/repair/application-form'
|
|
|
+import { fetchRepairApplicationForm, approve, receive, receiveRepair, closeRepair } from '@/api/repair/application-form'
|
|
|
import CheckForm from './CheckForm'
|
|
|
import BaseOutForm from './BaseOutForm'
|
|
|
import FinishForm from './FinishForm'
|
|
@@ -870,6 +873,19 @@ export default {
|
|
|
receive(this.model).then(() => {
|
|
|
})
|
|
|
},
|
|
|
+ handleClose () {
|
|
|
+ // 判断是否具备关闭工单条件
|
|
|
+ if (this.dataReason.length === 0 || this.dataRepairResolve.length === 0) {
|
|
|
+ this.$message.error('维修方案或维修报告不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const params = { id: this.model.id, category: this.model.category }
|
|
|
+ alert(this.model.id + this.model.category)
|
|
|
+ closeRepair(params).then(res => {
|
|
|
+ this.$message.info('操作成功')
|
|
|
+ this.handleOk()
|
|
|
+ })
|
|
|
+ },
|
|
|
batchDeleteFee (id) {
|
|
|
let ids = []
|
|
|
if (this.BaseTool.String.isBlank(id)) {
|