|
@@ -76,14 +76,14 @@
|
|
|
<a-descriptions-item label="报修单号">{{ model.no }}</a-descriptions-item>
|
|
|
<a-descriptions-item label="设备编号">{{ model.sbNo }}</a-descriptions-item>
|
|
|
<a-descriptions-item label="设备名称">{{ model.sbName }}</a-descriptions-item>
|
|
|
- <a-descriptions-item label="送修部门">{{ model.name }}</a-descriptions-item>
|
|
|
<a-descriptions-item label="使用位置">{{ model.sbCph }}</a-descriptions-item>
|
|
|
<a-descriptions-item label="工单类别">{{ BaseTool.Object.getField(planFlagMap,model.category) }}</a-descriptions-item>
|
|
|
<a-descriptions-item label="报修状态"><badge :text="BaseTool.Object.getField(statusMap,model.status)" :status="DictCache.COLOR.REPAIR_APPLICATION_FORM_STATUS[model.status]"/></a-descriptions-item>
|
|
|
<a-descriptions-item label="报修时间">{{ model.applyTime }}</a-descriptions-item>
|
|
|
<a-descriptions-item label="报修人">{{ model.actualUser }}</a-descriptions-item>
|
|
|
<a-descriptions-item label="要求时间">{{ model.limitHours }}小时</a-descriptions-item>
|
|
|
- <a-descriptions-item label="维修主管" >{{ model.checkUserName }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="送修部门">{{ model.name }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="维修工程师" >{{ model.checkUserName }}</a-descriptions-item>
|
|
|
<a-descriptions-item label="故障描述" :span="3">{{ model.content }}</a-descriptions-item>
|
|
|
<a-descriptions-item label="报修图片" :span="3">
|
|
|
<div v-if="model.applicationFileList != null && model.applicationFileList.length > 0">
|
|
@@ -104,7 +104,7 @@
|
|
|
<div class="main gutter-color" v-show="current == 1">
|
|
|
<div class="title">维修数据</div>
|
|
|
<div>
|
|
|
- <a-descriptions :column="3" bordered>
|
|
|
+ <a-descriptions :column="2" bordered>
|
|
|
<a-descriptions-item label="维修开始时间">{{ model.repairStartTime }}</a-descriptions-item>
|
|
|
<a-descriptions-item label="维修结束时间">{{ model.repairEndTime }}</a-descriptions-item>
|
|
|
<a-descriptions-item label="维修耗时">{{ model.repairMinutes }}小时</a-descriptions-item>
|
|
@@ -233,7 +233,7 @@
|
|
|
<div class="main gutter-color" v-show="current == 7">
|
|
|
<div class="title">维修方案</div>
|
|
|
<div style="margin:20px;margin-left:45%;" class="table-operator" >
|
|
|
- <a-button type="primary" @click="handleAddRepairResolve">
|
|
|
+ <a-button v-if="$auth('repair-repairs-add')" type="primary" @click="handleAddRepairResolve">
|
|
|
<a-icon type="plus"/>
|
|
|
添加方案
|
|
|
</a-button>
|
|
@@ -248,20 +248,22 @@
|
|
|
<a @click="handleViewRepairResolve(record)">方案详情</a>
|
|
|
<operation-button
|
|
|
@click="handleEditRepairResolve(record)" >修改</operation-button>
|
|
|
- <!-- <operation-button
|
|
|
- title="确认该条维修记录?"
|
|
|
- @confirm="deleteRepairResolve(record.id)" >删除</operation-button>-->
|
|
|
</template>
|
|
|
</span>
|
|
|
</a-table>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="btn">
|
|
|
- <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-popconfirm v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === model.status " title="是否要接单?" @confirm="receiveRepair">
|
|
|
+ <a-button style="margin-left: 8px" type="default">接单</a-button>
|
|
|
+ </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)" 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.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)" 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 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">
|
|
|
<a-button :loading="confirmLoading" style="margin-left: 8px" type="default">接受</a-button>
|
|
@@ -295,13 +297,14 @@
|
|
|
<transfer-form ref="transferForm" @ok="handleOk"/>
|
|
|
<detail-check-new ref='detailCheckNew' @ok='handleVerifyRecordOk'/>
|
|
|
<repair-record-form ref='repairRecordForm' @ok='handleRepairRecordOk' />
|
|
|
+ <report-up-form ref='reportUpForm' @ok='handleOk' />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
// import { stringify } from 'qs'
|
|
|
import DetailList from '@/components/tools/DetailList'
|
|
|
-import { fetchRepairApplicationForm, approve, receive } from '@/api/repair/application-form'
|
|
|
+import { fetchRepairApplicationForm, approve, receive, receiveRepair } from '@/api/repair/application-form'
|
|
|
import CheckForm from './CheckForm'
|
|
|
import BaseOutForm from './BaseOutForm'
|
|
|
import FinishForm from './FinishForm'
|
|
@@ -321,6 +324,7 @@ import BaseTool from '@/utils/tool'
|
|
|
import FeeBaseForm from '@/views/repair/fee/modules/BaseForm'
|
|
|
import FeeDetail from '@/views/repair/fee/modules/Detail'
|
|
|
import { deleteRepairFees, fetchRepairFee, queryRepairFee } from '@/api/repair/fee'
|
|
|
+import {getSelfRole } from '@/api/upms/role'
|
|
|
import ReasonBaseForm from '@/views/repair/repair-reason/modules/BaseForm'
|
|
|
import ReasonDetail from '@/views/repair/repair-reason/modules/Detail'
|
|
|
import { deleteRepairReasons, fetchRepairReason, queryRepairReason } from '@/api/repair/repair-reason'
|
|
@@ -337,6 +341,7 @@ import DetailRepairRecord from './DetailRepairRecord'
|
|
|
import TransferForm from './TransferForm'
|
|
|
import DetailCheckNew from './DetailCheckNew'
|
|
|
import RepairRecordForm from './RepairRecordForm'
|
|
|
+import ReportUpForm from './ReportUpForm'
|
|
|
const DetailListItem = DetailList.Item
|
|
|
|
|
|
export default {
|
|
@@ -370,7 +375,8 @@ export default {
|
|
|
DetailRepairRecord,
|
|
|
TransferForm,
|
|
|
DetailCheckNew,
|
|
|
- RepairRecordForm
|
|
|
+ RepairRecordForm,
|
|
|
+ ReportUpForm
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
@@ -735,7 +741,12 @@ export default {
|
|
|
'repairFormVO': null,
|
|
|
'repairCheckVO': null,
|
|
|
'checkUserName': null,
|
|
|
- 'remarkTwo': null
|
|
|
+ 'remarkTwo': null,
|
|
|
+ 'repairMinutes': null,
|
|
|
+ 'repairDeptId': null,
|
|
|
+ 'userId': null,
|
|
|
+ 'sbCph': null,
|
|
|
+ 'actualUser': null
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -760,8 +771,6 @@ export default {
|
|
|
this.showSbFlag = false
|
|
|
this.modalTitle = '详情'
|
|
|
this.model = record
|
|
|
- console.log(111)
|
|
|
- console.log(record)
|
|
|
this.activeKey = 'a'
|
|
|
const sbId = record.sbId
|
|
|
if (sbId) {
|
|
@@ -770,7 +779,9 @@ export default {
|
|
|
this.showSbFlag = true
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+ if (record.repairMinutes === null) {
|
|
|
+ this.model.repairMinutes = '?'
|
|
|
+ }
|
|
|
this.init()
|
|
|
},
|
|
|
init () {
|
|
@@ -950,6 +961,58 @@ export default {
|
|
|
this.handleOk()
|
|
|
})
|
|
|
},
|
|
|
+ receiveRepair () {
|
|
|
+ const params = {}
|
|
|
+ params.id = this.model.id
|
|
|
+ params.repairDeptId = this.model.repairDeptId
|
|
|
+ params.applyTime = this.model.applyTime
|
|
|
+ params.userId = this.model.userId
|
|
|
+ params.no = this.model.no
|
|
|
+ receiveRepair(params).then(() => {
|
|
|
+ this.$message.info('接单成功')
|
|
|
+ this.handleOk()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ reportRepair () {
|
|
|
+ const params = {}
|
|
|
+ params.id = this.model.id
|
|
|
+ params.repairDeptId = this.model.repairDeptId
|
|
|
+ params.applyTime = this.model.applyTime
|
|
|
+ params.userId = this.model.userId
|
|
|
+ params.no = this.model.no
|
|
|
+ params.sbId = this.model.sbId
|
|
|
+ params.sbCph = this.model.sbCph
|
|
|
+ params.actualUser = this.model.actualUser
|
|
|
+ params.content = this.model.content
|
|
|
+ params.repairUserId = this.model.repairUserId
|
|
|
+ params.remark = this.model.remark
|
|
|
+ params.reportHandleType = 2 // 维修上报
|
|
|
+ getSelfRole().then(res => {
|
|
|
+ const modal = this.$refs.reportUpForm
|
|
|
+ params.roleType = res.data
|
|
|
+ modal.base(params)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleReportRepair () {
|
|
|
+ const params = {}
|
|
|
+ params.id = this.model.id
|
|
|
+ params.repairDeptId = this.model.repairDeptId
|
|
|
+ params.applyTime = this.model.applyTime
|
|
|
+ params.userId = this.model.userId
|
|
|
+ params.no = this.model.no
|
|
|
+ params.sbId = this.model.sbId
|
|
|
+ params.sbCph = this.model.sbCph
|
|
|
+ params.actualUser = this.model.actualUser
|
|
|
+ params.content = this.model.content
|
|
|
+ params.repairUserId = this.model.repairUserId
|
|
|
+ params.remark = this.model.remarkTwo
|
|
|
+ params.reportHandleType = 1 // 处理维修上报
|
|
|
+ getSelfRole().then(res => {
|
|
|
+ const modal = this.$refs.reportUpForm
|
|
|
+ params.roleType = res.data
|
|
|
+ modal.base(params)
|
|
|
+ })
|
|
|
+ },
|
|
|
handleEditRecord (record) {
|
|
|
this.visible = false
|
|
|
fetchCustomDataForRepairRecord({ id: record.id }).then(res => {
|