|
@@ -24,13 +24,22 @@
|
|
|
style="margin-left: 8px" type="default" @click="handleOut">委外</a-button>
|
|
style="margin-left: 8px" type="default" @click="handleOut">委外</a-button>
|
|
|
<a-button
|
|
<a-button
|
|
|
v-if="$auth('repair-application-forms-dispatch') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status"
|
|
v-if="$auth('repair-application-forms-dispatch') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status"
|
|
|
- style="margin-left: 8px" type="default" @click="handleDispatch">转派</a-button>
|
|
|
|
|
|
|
+ style="margin-left: 8px" type="default" @click="handleDispatch">二次派工</a-button>
|
|
|
<a-button
|
|
<a-button
|
|
|
v-if="$auth('repair-application-forms-transfer') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status"
|
|
v-if="$auth('repair-application-forms-transfer') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status"
|
|
|
style="margin-left: 8px" type="default" @click="handleTransfer">转派</a-button>
|
|
style="margin-left: 8px" type="default" @click="handleTransfer">转派</a-button>
|
|
|
<a-button
|
|
<a-button
|
|
|
v-if="$auth('repair-application-forms-finish') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status"
|
|
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>
|
|
style="margin-left: 8px" type="default" @click="handleFinish()">完成</a-button>
|
|
|
|
|
+ <!-- 新增维修开始、暂停、继续维修、结束按钮 -->
|
|
|
|
|
+ <a-button v-if=" DictCache.VALUE.REPAIR_ASSISTANT_STATUS.init === model.assistantStatus "
|
|
|
|
|
+ style="margin-left: 8px" @click="handleStartRepair">开始维修</a-button>
|
|
|
|
|
+ <a-button v-if=" DictCache.VALUE.REPAIR_ASSISTANT_STATUS.repair === model.assistantStatus "
|
|
|
|
|
+ style="margin-left: 8px" @click="handlePauseRepair">暂停维修</a-button>
|
|
|
|
|
+ <a-button v-if=" DictCache.VALUE.REPAIR_ASSISTANT_STATUS.pause === model.assistantStatus "
|
|
|
|
|
+ style="margin-left: 8px" @click="handleContinueRepair">继续维修</a-button>
|
|
|
|
|
+ <a-button v-if=" DictCache.VALUE.REPAIR_ASSISTANT_STATUS.pause === model.assistantStatus "
|
|
|
|
|
+ style="margin-left: 8px" @click="handleEndRepair">结束维修</a-button>
|
|
|
<!-- 隐藏查看工单中的修改按钮 -->
|
|
<!-- 隐藏查看工单中的修改按钮 -->
|
|
|
<!-- <a-button v-if="$auth('repair-application-forms-edit')" style="margin-left: 8px" type="default" @click="handleEdit()">修改</a-button> -->
|
|
<!-- <a-button v-if="$auth('repair-application-forms-edit')" style="margin-left: 8px" type="default" @click="handleEdit()">修改</a-button> -->
|
|
|
<a-popconfirm v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.WAIT_SUBMIT === model.status"
|
|
<a-popconfirm v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.WAIT_SUBMIT === model.status"
|
|
@@ -88,9 +97,10 @@
|
|
|
<a-divider orientation="left">维修详情</a-divider>
|
|
<a-divider orientation="left">维修详情</a-divider>
|
|
|
<detail-list title="" :col="3">
|
|
<detail-list title="" :col="3">
|
|
|
<!-- <detail-list-item term="故障类别">{{ model.repairErrorTypeName }}</detail-list-item>-->
|
|
<!-- <detail-list-item term="故障类别">{{ model.repairErrorTypeName }}</detail-list-item>-->
|
|
|
|
|
+<!-- <detail-list-item term="派工/接单时间">{{ model.repairDispatchTime }}</detail-list-item>-->
|
|
|
<detail-list-item term="维修开始时间">{{ model.repairStartTime }}</detail-list-item>
|
|
<detail-list-item term="维修开始时间">{{ model.repairStartTime }}</detail-list-item>
|
|
|
<detail-list-item term="维修结束时间">{{ model.repairEndTime }}</detail-list-item>
|
|
<detail-list-item term="维修结束时间">{{ model.repairEndTime }}</detail-list-item>
|
|
|
- <detail-list-item term="维修耗时">{{ model.repairMinutes }}小时</detail-list-item>
|
|
|
|
|
|
|
+ <detail-list-item term="维修耗时">{{ model.repairMinutes ? model.repairMinutes + '小时' : '/' }}</detail-list-item>
|
|
|
<detail-list-item term="维修人员">{{ model.repairUserName }}</detail-list-item>
|
|
<detail-list-item term="维修人员">{{ model.repairUserName }}</detail-list-item>
|
|
|
<!--<detail-list-item term="维修次数">{{ model.repairTimes }}</detail-list-item>-->
|
|
<!--<detail-list-item term="维修次数">{{ model.repairTimes }}</detail-list-item>-->
|
|
|
</detail-list>
|
|
</detail-list>
|
|
@@ -110,7 +120,7 @@
|
|
|
</detail-list>
|
|
</detail-list>
|
|
|
<a-divider orientation="left">委外记录</a-divider>
|
|
<a-divider orientation="left">委外记录</a-divider>
|
|
|
<a-table :data-source="entrustList" :columns="columnsEntrust" tableLayout="auto" rowKey="id"
|
|
<a-table :data-source="entrustList" :columns="columnsEntrust" tableLayout="auto" rowKey="id"
|
|
|
- v-if="entrustList.length > 0">
|
|
|
|
|
|
|
+ v-if="entrustList != null && entrustList.length > 0">
|
|
|
<span slot="entrustStatus" slot-scope="text">
|
|
<span slot="entrustStatus" slot-scope="text">
|
|
|
<badge :text="text === 1 ? '委外维修中' : '已完成'" :status="text === 1 ? 'processing' : 'success'" />
|
|
<badge :text="text === 1 ? '委外维修中' : '已完成'" :status="text === 1 ? 'processing' : 'success'" />
|
|
|
</span>
|
|
</span>
|
|
@@ -121,12 +131,21 @@
|
|
|
<a @click="handleViewEntrust(record)">查看</a>
|
|
<a @click="handleViewEntrust(record)">查看</a>
|
|
|
</span>
|
|
</span>
|
|
|
</a-table>
|
|
</a-table>
|
|
|
- <div v-if="entrustList.length === 0" style="margin-bottom: 16px; color: #999;">暂无委外记录</div>
|
|
|
|
|
- <a-divider v-if="dispatchList != null" orientation="left">转派详情</a-divider>
|
|
|
|
|
|
|
+ <div v-if="entrustList == null || entrustList.length === 0" style="margin-bottom: 16px; color: #999;">暂无委外记录</div>
|
|
|
|
|
+ <a-divider v-if="dispatchList != null" orientation="left">派工记录</a-divider>
|
|
|
<detail-list v-for="(item, index) in dispatchList" title="" :key="index" :col="3">
|
|
<detail-list v-for="(item, index) in dispatchList" title="" :key="index" :col="3">
|
|
|
- <detail-list-item term="转派人">{{ item.username }}</detail-list-item>
|
|
|
|
|
|
|
+ <detail-list-item term="派工人">{{ item.operatorName }}</detail-list-item>
|
|
|
|
|
+ <detail-list-item term="派工时间">{{ item.time }}</detail-list-item>
|
|
|
|
|
+ <detail-list-item term="派工备注">{{ item.remark }}</detail-list-item>
|
|
|
|
|
+ <detail-list-item v-if="item.approverName" term="派工对象">{{ item.username }}</detail-list-item>
|
|
|
|
|
+ </detail-list>
|
|
|
|
|
+ <div v-if="dispatchList == null || dispatchList.length === 0" style="margin-bottom: 16px; color: #999;">暂无派工记录</div>
|
|
|
|
|
+ <a-divider v-if="transferList != null" orientation="left">转派记录</a-divider>
|
|
|
|
|
+ <detail-list v-for="(item, index) in transferList" title="" :key="index" :col="3">
|
|
|
|
|
+ <detail-list-item term="转派人">{{ item.operatorName }}</detail-list-item>
|
|
|
<detail-list-item term="转派时间">{{ item.time }}</detail-list-item>
|
|
<detail-list-item term="转派时间">{{ item.time }}</detail-list-item>
|
|
|
<detail-list-item term="转派备注">{{ item.remark }}</detail-list-item>
|
|
<detail-list-item term="转派备注">{{ item.remark }}</detail-list-item>
|
|
|
|
|
+ <detail-list-item term="转派对象">{{ item.username }}</detail-list-item>
|
|
|
<detail-list-item term="审批状态" v-if="item.type === 'transfer'">
|
|
<detail-list-item term="审批状态" v-if="item.type === 'transfer'">
|
|
|
<badge :text="getTransferStatusText(item.status)" :status="getTransferBadgeStatus(item.status)" />
|
|
<badge :text="getTransferStatusText(item.status)" :status="getTransferBadgeStatus(item.status)" />
|
|
|
</detail-list-item>
|
|
</detail-list-item>
|
|
@@ -134,6 +153,7 @@
|
|
|
<detail-list-item v-if="item.approveTime" term="审批时间">{{ item.approveTime }}</detail-list-item>
|
|
<detail-list-item v-if="item.approveTime" term="审批时间">{{ item.approveTime }}</detail-list-item>
|
|
|
<detail-list-item v-if="item.approveRemark" term="审批意见">{{ item.approveRemark }}</detail-list-item>
|
|
<detail-list-item v-if="item.approveRemark" term="审批意见">{{ item.approveRemark }}</detail-list-item>
|
|
|
</detail-list>
|
|
</detail-list>
|
|
|
|
|
+ <div v-if="transferList == null || transferList.length === 0" style="margin-bottom: 16px; color: #999;">暂无转派记录</div>
|
|
|
<a-divider orientation="left">审核详情</a-divider>
|
|
<a-divider orientation="left">审核详情</a-divider>
|
|
|
<detail-list title="" :col="3">
|
|
<detail-list title="" :col="3">
|
|
|
<detail-list-item term="审核开始时间">{{ model.checkStartTime }}</detail-list-item>
|
|
<detail-list-item term="审核开始时间">{{ model.checkStartTime }}</detail-list-item>
|
|
@@ -149,6 +169,7 @@
|
|
|
<div style="margin-top: 30px;margin-left: 30px;">
|
|
<div style="margin-top: 30px;margin-left: 30px;">
|
|
|
<a-steps progress-dot :current="6" direction="vertical">
|
|
<a-steps progress-dot :current="6" direction="vertical">
|
|
|
<a-step title="报修时间:" :description="'' + model.applyTime ? model.applyTime : ''" />
|
|
<a-step title="报修时间:" :description="'' + model.applyTime ? model.applyTime : ''" />
|
|
|
|
|
+ <a-step title="派工/接单时间:" :description="'' + model.repairDispatchTime ? model.repairDispatchTime : ''" />
|
|
|
<a-step title="维修开始时间:" :description="'' + model.repairStartTime ? model.repairStartTime : ''" />
|
|
<a-step title="维修开始时间:" :description="'' + model.repairStartTime ? model.repairStartTime : ''" />
|
|
|
<a-step title="维修结束时间:" :description="'' + model.repairEndTime ? model.repairEndTime : ''" />
|
|
<a-step title="维修结束时间:" :description="'' + model.repairEndTime ? model.repairEndTime : ''" />
|
|
|
<a-step title="审核开始时间:" :description="'' + model.checkStartTime ? model.checkStartTime : ''" />
|
|
<a-step title="审核开始时间:" :description="'' + model.checkStartTime ? model.checkStartTime : ''" />
|
|
@@ -260,7 +281,14 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import DetailList from '@/components/tools/DetailList'
|
|
import DetailList from '@/components/tools/DetailList'
|
|
|
-import { fetchRepairApplicationForm, examine, approve, receive } from '@/api/repair/application-form'
|
|
|
|
|
|
|
+import {
|
|
|
|
|
+ fetchRepairApplicationForm,
|
|
|
|
|
+ examine,
|
|
|
|
|
+ approve,
|
|
|
|
|
+ receive,
|
|
|
|
|
+ startRepair,
|
|
|
|
|
+ pauseRepair, continueRepair, endRepair
|
|
|
|
|
+} from '@/api/repair/application-form'
|
|
|
import { getRepairEntrustByRepairId } from '@/api/repair/entrust'
|
|
import { getRepairEntrustByRepairId } from '@/api/repair/entrust'
|
|
|
import DetailOut from './DetailRepairOut'
|
|
import DetailOut from './DetailRepairOut'
|
|
|
import CheckForm from './CheckForm'
|
|
import CheckForm from './CheckForm'
|
|
@@ -336,6 +364,7 @@ export default {
|
|
|
needStopMap: {},
|
|
needStopMap: {},
|
|
|
planFlagMap: {},
|
|
planFlagMap: {},
|
|
|
dispatchList: [],
|
|
dispatchList: [],
|
|
|
|
|
+ transferList: [],
|
|
|
visible: false,
|
|
visible: false,
|
|
|
showSbFlag: false,
|
|
showSbFlag: false,
|
|
|
sbInfo: {},
|
|
sbInfo: {},
|
|
@@ -576,6 +605,7 @@ export default {
|
|
|
updateUserName: null,
|
|
updateUserName: null,
|
|
|
repairFormVO: null,
|
|
repairFormVO: null,
|
|
|
repairCheckVO: null,
|
|
repairCheckVO: null,
|
|
|
|
|
+ repairDispatchTime: null
|
|
|
},
|
|
},
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -606,7 +636,8 @@ export default {
|
|
|
this.entrustList = []
|
|
this.entrustList = []
|
|
|
// 收起上一条工单可能残留的委外详情卡片
|
|
// 收起上一条工单可能残留的委外详情卡片
|
|
|
this.closeEntrustDetail()
|
|
this.closeEntrustDetail()
|
|
|
- this.dispatchList = JSON.parse(record.repairDispatchList)
|
|
|
|
|
|
|
+ this.dispatchList = JSON.parse(record.repairDispatchList || '[]')
|
|
|
|
|
+ this.transferList = JSON.parse(record.repairTransferList || '[]')
|
|
|
const sbId = record.sbId
|
|
const sbId = record.sbId
|
|
|
if (sbId) {
|
|
if (sbId) {
|
|
|
fetchSbInfo({ id: sbId }).then((res) => {
|
|
fetchSbInfo({ id: sbId }).then((res) => {
|
|
@@ -790,7 +821,8 @@ export default {
|
|
|
this.loading = false
|
|
this.loading = false
|
|
|
this.model = res.data
|
|
this.model = res.data
|
|
|
this.visible = true
|
|
this.visible = true
|
|
|
- this.dispatchList = JSON.parse(this.model.repairDispatchList)
|
|
|
|
|
|
|
+ this.dispatchList = JSON.parse(this.model.repairDispatchList || '[]')
|
|
|
|
|
+ this.transferList = JSON.parse(this.model.repairTransferList || '[]')
|
|
|
})
|
|
})
|
|
|
this.init()
|
|
this.init()
|
|
|
},
|
|
},
|
|
@@ -807,7 +839,51 @@ export default {
|
|
|
})
|
|
})
|
|
|
this.init()
|
|
this.init()
|
|
|
},
|
|
},
|
|
|
- handleDispatch() {
|
|
|
|
|
|
|
+ // 开始维修
|
|
|
|
|
+ handleStartRepair () {
|
|
|
|
|
+ startRepair({ id: this.model.id }).then((res) => {
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ this.visible = true
|
|
|
|
|
+ this.model.assistantStatus = this.DictCache.VALUE.REPAIR_ASSISTANT_STATUS.repair
|
|
|
|
|
+ this.$message.info('维修开始计时')
|
|
|
|
|
+ })
|
|
|
|
|
+ this.init()
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // 暂停维修
|
|
|
|
|
+ handlePauseRepair () {
|
|
|
|
|
+ pauseRepair({ id: this.model.id }).then((res) => {
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ this.visible = true
|
|
|
|
|
+ this.model.assistantStatus = this.DictCache.VALUE.REPAIR_ASSISTANT_STATUS.pause
|
|
|
|
|
+ this.$message.info('维修暂停计时')
|
|
|
|
|
+ })
|
|
|
|
|
+ this.init()
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // 继续维修
|
|
|
|
|
+ handleContinueRepair () {
|
|
|
|
|
+ continueRepair({ id: this.model.id }).then((res) => {
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ this.visible = true
|
|
|
|
|
+ this.model.assistantStatus = this.DictCache.VALUE.REPAIR_ASSISTANT_STATUS.repair
|
|
|
|
|
+ this.$message.info('维修继续计时')
|
|
|
|
|
+ })
|
|
|
|
|
+ this.init()
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // 结束维修
|
|
|
|
|
+ handleEndRepair () {
|
|
|
|
|
+ endRepair({ id: this.model.id }).then((res) => {
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ this.visible = true
|
|
|
|
|
+ this.model.assistantStatus = this.DictCache.VALUE.REPAIR_ASSISTANT_STATUS.end
|
|
|
|
|
+ this.$message.info('维修结束计时')
|
|
|
|
|
+ })
|
|
|
|
|
+ this.init()
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ handleDispatch () {
|
|
|
const modal = this.$refs.dispatchForm
|
|
const modal = this.$refs.dispatchForm
|
|
|
modal.base(this.model)
|
|
modal.base(this.model)
|
|
|
},
|
|
},
|