|
|
@@ -4,11 +4,16 @@
|
|
|
<a-row :gutter="48" slot="extra">
|
|
|
<a-col :md="48" :sm="48">
|
|
|
<span class="table-page-search-submitButtons" style="float: right">
|
|
|
- <a-button v-if="$auth('repair-application-forms-edit')" style="margin-left: 8px" type="primary" @click="handleEdit()">修改</a-button>
|
|
|
- <a-popconfirm v-if="$auth('repair-application-forms-approve') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ACCEPTANCE === model.status" title="是否要接受?" @confirm="handleApprove">
|
|
|
+ <a-button v-if="$auth('repair-application-forms-edit')" style="margin-left: 8px" type="primary"
|
|
|
+ @click="handleEdit()">修改</a-button>
|
|
|
+ <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="primary">接受</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-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>
|
|
|
<a-button style="margin-left: 8px" @click="handleCancel">返回</a-button>
|
|
|
@@ -24,13 +29,22 @@
|
|
|
<detail-list-item term="设备名称">{{ model.sbName }}</detail-list-item>
|
|
|
<detail-list-item term="使用位置">{{ model.sbCph }}</detail-list-item>
|
|
|
<!--<detail-list-item term="部件名称">{{ model.partName }}</detail-list-item>-->
|
|
|
- <detail-list-item term="工单类别">{{ BaseTool.Object.getField(planFlagMap,model.category) }}</detail-list-item>
|
|
|
+ <detail-list-item term="工单类别">{{ BaseTool.Object.getField(planFlagMap, model.category) }}</detail-list-item>
|
|
|
<!-- <detail-list-item term="是否停机">{{ BaseTool.Object.getField(needStopMap,model.needStop) }}</detail-list-item>-->
|
|
|
<detail-list-item term="报修人">{{ model.actualUser }}</detail-list-item>
|
|
|
+ <detail-list-item term="紧急程度">
|
|
|
+ <badge :text="BaseTool.Object.getField(levelMap, model.level)"
|
|
|
+ :status="DictCache.COLOR.REPAIR_APPLICATION_FORM_LEVEL[model.level]" />
|
|
|
+ </detail-list-item>
|
|
|
+ <detail-list-item term="故障类型">{{ BaseTool.Object.getField(faultTypeMap, model.repairErrorTypeId)
|
|
|
+ }}</detail-list-item>
|
|
|
<!-- <detail-list-item term="报修来源">{{ BaseTool.Object.getField(this.sourceMap, model.source) }}</detail-list-item>
|
|
|
<detail-list-item term="紧急等级"><badge :text="BaseTool.Object.getField(levelMap,model.level)" :status="DictCache.COLOR.REPAIR_APPLICATION_FORM_LEVEL[model.applicationLevel]"/></detail-list-item>-->
|
|
|
<detail-list-item term="报修时间">{{ model.applyTime }}</detail-list-item>
|
|
|
- <detail-list-item term="报修状态"><badge :text="BaseTool.Object.getField(statusMap, model.status)" :status="DictCache.COLOR.REPAIR_APPLICATION_FORM_STATUS[model.status]"/></detail-list-item>
|
|
|
+ <detail-list-item term="报修状态">
|
|
|
+ <badge :text="BaseTool.Object.getField(statusMap, model.status)"
|
|
|
+ :status="DictCache.COLOR.REPAIR_APPLICATION_FORM_STATUS[model.status]" />
|
|
|
+ </detail-list-item>
|
|
|
<detail-list-item term="要求完成时间">{{ model.limitHours }}小时</detail-list-item>
|
|
|
<detail-list-item term="预计完成日期">{{ model.limitDate }}</detail-list-item>
|
|
|
</detail-list>
|
|
|
@@ -41,11 +55,12 @@
|
|
|
<title-divider title="报修图片" width="90px"></title-divider>
|
|
|
<detail-list title="" :col="1">
|
|
|
<detail-list-item term="" v-if="model.applicationFileList != null && model.applicationFileList.length > 0">
|
|
|
- <viewer :images="model.applicationFileList" @inited="inited" ref="viewer" :index="1" >
|
|
|
+ <viewer :images="model.applicationFileList" @inited="inited" ref="viewer" :index="1">
|
|
|
<img v-for="item in model.applicationFileList" :src="item.url" :key="item.id" class="image">
|
|
|
</viewer>
|
|
|
</detail-list-item>
|
|
|
- <detail-list-item term="" v-if="model.applicationFileList == null || model.applicationFileList.length === 0">
|
|
|
+ <detail-list-item term=""
|
|
|
+ v-if="model.applicationFileList == null || model.applicationFileList.length === 0">
|
|
|
暂无
|
|
|
</detail-list-item>
|
|
|
</detail-list>
|
|
|
@@ -64,7 +79,7 @@
|
|
|
<title-divider title="维修图片" width="90px"></title-divider>
|
|
|
<detail-list title="" :col="1">
|
|
|
<detail-list-item term="" v-if="model.repairFileList != null && model.repairFileList.length > 0">
|
|
|
- <viewer :images="model.repairFileList" @inited="inited" ref="viewer" :index="1" >
|
|
|
+ <viewer :images="model.repairFileList" @inited="inited" ref="viewer" :index="1">
|
|
|
<img v-for="item in model.repairFileList" :src="item.url" :key="item.id" class="image">
|
|
|
</viewer>
|
|
|
</detail-list-item>
|
|
|
@@ -91,18 +106,18 @@
|
|
|
<detail-list-item term="审核人员">{{ model.checkUserName }}</detail-list-item>
|
|
|
<detail-list-item term="审核描述">{{ model.checkContent }}</detail-list-item>
|
|
|
</detail-list>
|
|
|
-<!-- <detail-list title="审核图片:" :col="6">
|
|
|
+ <!-- <detail-list title="审核图片:" :col="6">
|
|
|
<upload-image-detail :images-list="model.checkFileList"/>
|
|
|
</detail-list>-->
|
|
|
</a-layout-content>
|
|
|
<a-layout-sider style="background-color: rgb(255, 255, 255)">
|
|
|
<div style="margin-top: 30px;margin-left: 30px;">
|
|
|
- <a-steps progress-dot :current="6" direction="vertical" >
|
|
|
- <a-step title="报修时间:" :description="''+model.applyTime?model.applyTime:''" />
|
|
|
- <a-step title="维修开始时间:" :description="''+model.repairStartTime?model.repairStartTime:''" />
|
|
|
- <a-step title="维修结束时间:" :description="''+model.repairEndTime?model.repairEndTime:''" />
|
|
|
- <a-step title="审核开始时间:" :description="''+model.checkStartTime?model.checkStartTime:''" />
|
|
|
- <a-step title="审核结束时间:" :description="''+model.checkEndTime?model.checkEndTime:''" />
|
|
|
+ <a-steps progress-dot :current="6" direction="vertical">
|
|
|
+ <a-step title="报修时间:" :description="'' + model.applyTime ? model.applyTime : ''" />
|
|
|
+ <a-step title="维修开始时间:" :description="'' + model.repairStartTime ? model.repairStartTime : ''" />
|
|
|
+ <a-step title="维修结束时间:" :description="'' + model.repairEndTime ? model.repairEndTime : ''" />
|
|
|
+ <a-step title="审核开始时间:" :description="'' + model.checkStartTime ? model.checkStartTime : ''" />
|
|
|
+ <a-step title="审核结束时间:" :description="'' + model.checkEndTime ? model.checkEndTime : ''" />
|
|
|
</a-steps>
|
|
|
</div>
|
|
|
</a-layout-sider>
|
|
|
@@ -110,65 +125,47 @@
|
|
|
<title-divider title="配件清单" width="90px"></title-divider>
|
|
|
<div class="table-operator" v-if="$auth('repair-application-forms-finish')">
|
|
|
<a-button type="primary" @click="handleSpareSelect">
|
|
|
- <a-icon type="plus"/>
|
|
|
+ <a-icon type="plus" />
|
|
|
添加
|
|
|
</a-button>
|
|
|
</div>
|
|
|
- <a-table
|
|
|
- :data-source="dataSpare"
|
|
|
- :columns="columnsSpare"
|
|
|
- tableLayout="auto"
|
|
|
- rowKey="id">
|
|
|
+ <a-table :data-source="dataSpare" :columns="columnsSpare" tableLayout="auto" rowKey="id">
|
|
|
</a-table>
|
|
|
<title-divider title="费用清单" width="90px"></title-divider>
|
|
|
- <div class="table-operator" v-if="$auth('repair-application-forms-finish') ">
|
|
|
+ <div class="table-operator" v-if="$auth('repair-application-forms-finish')">
|
|
|
<a-button type="primary" @click="handleAddFee">
|
|
|
- <a-icon type="plus"/>
|
|
|
+ <a-icon type="plus" />
|
|
|
添加
|
|
|
</a-button>
|
|
|
</div>
|
|
|
- <a-table
|
|
|
- :data-source="dataFee"
|
|
|
- :columns="columnsFee"
|
|
|
- tableLayout="auto"
|
|
|
- rowKey="id">
|
|
|
+ <a-table :data-source="dataFee" :columns="columnsFee" tableLayout="auto" rowKey="id">
|
|
|
<span slot="action" slot-scope="record">
|
|
|
<template>
|
|
|
<a @click="handleViewFee(record)">查看</a>
|
|
|
- <operation-button
|
|
|
- v-if="$auth('repair-application-forms-finish')"
|
|
|
- @click="handleEditFee(record)" >修改</operation-button>
|
|
|
- <operation-button
|
|
|
- v-if="$auth('repair-application-forms-finish')"
|
|
|
- :type="2"
|
|
|
- title="确认删除该笔费用?"
|
|
|
- @confirm="batchDeleteFee(record.id)" >删除</operation-button>
|
|
|
+ <operation-button v-if="$auth('repair-application-forms-finish')"
|
|
|
+ @click="handleEditFee(record)">修改</operation-button>
|
|
|
+ <operation-button v-if="$auth('repair-application-forms-finish')" :type="2" title="确认删除该笔费用?"
|
|
|
+ @confirm="batchDeleteFee(record.id)">删除</operation-button>
|
|
|
</template>
|
|
|
</span>
|
|
|
</a-table>
|
|
|
<title-divider title="维修报告" width="90px"></title-divider>
|
|
|
- <div class="table-operator" >
|
|
|
- <a-button type="primary" v-if="$auth('repair-repair-reasons-add') && ((dataReason === null) || (dataReason.length===0))" @click="handleAddReason">
|
|
|
- <a-icon type="plus"/>
|
|
|
+ <div class="table-operator">
|
|
|
+ <a-button type="primary"
|
|
|
+ v-if="$auth('repair-repair-reasons-add') && ((dataReason === null) || (dataReason.length === 0))"
|
|
|
+ @click="handleAddReason">
|
|
|
+ <a-icon type="plus" />
|
|
|
添加
|
|
|
</a-button>
|
|
|
</div>
|
|
|
- <a-table
|
|
|
- :data-source="dataReason"
|
|
|
- :columns="columnsReason"
|
|
|
- tableLayout="fixed"
|
|
|
- rowKey="id">
|
|
|
+ <a-table :data-source="dataReason" :columns="columnsReason" tableLayout="fixed" rowKey="id">
|
|
|
<span slot="action" slot-scope="record">
|
|
|
<template>
|
|
|
<a @click="handleViewReason(record)">查看</a>
|
|
|
- <operation-button
|
|
|
- v-if="$auth('repair-repair-reasons-edit')"
|
|
|
- @click="handleEditReason(record)" >修改</operation-button>
|
|
|
- <operation-button
|
|
|
- v-if="$auth('repair-repair-reasons-del')"
|
|
|
- :type="2"
|
|
|
- title="确认删除该记录?"
|
|
|
- @confirm="batchDeleteReason(record.id)" >删除</operation-button>
|
|
|
+ <operation-button v-if="$auth('repair-repair-reasons-edit')"
|
|
|
+ @click="handleEditReason(record)">修改</operation-button>
|
|
|
+ <operation-button v-if="$auth('repair-repair-reasons-del')" :type="2" title="确认删除该记录?"
|
|
|
+ @confirm="batchDeleteReason(record.id)">删除</operation-button>
|
|
|
</template>
|
|
|
</span>
|
|
|
</a-table>
|
|
|
@@ -216,7 +213,7 @@ export default {
|
|
|
SparePartUsedSelectTable,
|
|
|
SparePickFormSelectTable
|
|
|
},
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
confirmLoading: false,
|
|
|
mdl: {},
|
|
|
@@ -230,6 +227,7 @@ export default {
|
|
|
// 下拉框map
|
|
|
sourceMap: {},
|
|
|
levelMap: {},
|
|
|
+ faultTypeMap: {},
|
|
|
descripitionMap: {},
|
|
|
statusMap: {},
|
|
|
typeMap: {},
|
|
|
@@ -418,10 +416,11 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- created () {
|
|
|
+ created() {
|
|
|
// 下拉框map
|
|
|
this.sourceMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_SOURCE)
|
|
|
this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_LEVEL)
|
|
|
+ this.faultTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_ERROR_TYPE)
|
|
|
this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_STATUS)
|
|
|
this.statusRepairMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_FORM_STATUS)
|
|
|
this.statusCheckMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_CHECK_STATUS)
|
|
|
@@ -434,14 +433,14 @@ export default {
|
|
|
this.planFlagMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_CATEGORY)
|
|
|
},
|
|
|
methods: {
|
|
|
- base (record) {
|
|
|
+ base(record) {
|
|
|
this.visible = true
|
|
|
this.modalTitle = '详情'
|
|
|
this.model = record
|
|
|
this.dispatchList = JSON.parse(record.repairDispatchList)
|
|
|
this.init()
|
|
|
},
|
|
|
- init () {
|
|
|
+ init() {
|
|
|
selectRepairProjectListByRepairId({ id: this.model.id }).then(res => {
|
|
|
this.data = res.data
|
|
|
})
|
|
|
@@ -455,18 +454,18 @@ export default {
|
|
|
this.dataReason = res.data
|
|
|
})
|
|
|
},
|
|
|
- handleCancel () {
|
|
|
+ handleCancel() {
|
|
|
this.visible = false
|
|
|
this.confirmLoading = false
|
|
|
this.$emit('ok')
|
|
|
},
|
|
|
- receive () {
|
|
|
+ receive() {
|
|
|
receive(this.model).then(() => {
|
|
|
this.$message.info('任务接收成功,请及时维修')
|
|
|
this.handleOk()
|
|
|
})
|
|
|
},
|
|
|
- batchDeleteFee (id) {
|
|
|
+ batchDeleteFee(id) {
|
|
|
let ids = []
|
|
|
if (this.BaseTool.String.isBlank(id)) {
|
|
|
const length = this.selectedRows.length
|
|
|
@@ -484,23 +483,23 @@ export default {
|
|
|
this.$refs.table.clearSelected()
|
|
|
})
|
|
|
},
|
|
|
- handleAddFee () {
|
|
|
+ handleAddFee() {
|
|
|
const modal = this.$refs.feeForm
|
|
|
modal.base(null, this.model)
|
|
|
},
|
|
|
- handleEditFee (record) {
|
|
|
+ handleEditFee(record) {
|
|
|
fetchRepairFee({ id: record.id }).then(res => {
|
|
|
const modal = this.$refs.feeForm
|
|
|
modal.base(res.data, this.model)
|
|
|
})
|
|
|
},
|
|
|
- handleViewFee (record) {
|
|
|
+ handleViewFee(record) {
|
|
|
fetchRepairFee({ id: record.id }).then(res => {
|
|
|
const modal = this.$refs.feeDetail
|
|
|
modal.base(res.data)
|
|
|
})
|
|
|
},
|
|
|
- batchDeleteReason (id) {
|
|
|
+ batchDeleteReason(id) {
|
|
|
let ids = []
|
|
|
if (this.BaseTool.String.isBlank(id)) {
|
|
|
const length = this.selectedRows.length
|
|
|
@@ -518,25 +517,25 @@ export default {
|
|
|
this.$refs.table.clearSelected()
|
|
|
})
|
|
|
},
|
|
|
- handleAddReason () {
|
|
|
+ handleAddReason() {
|
|
|
const modal = this.$refs.reasonForm
|
|
|
this.visible = false
|
|
|
modal.base(null, this.model)
|
|
|
},
|
|
|
- handleEditReason (record) {
|
|
|
+ handleEditReason(record) {
|
|
|
fetchRepairReason({ id: record.id }).then(res => {
|
|
|
const modal = this.$refs.reasonForm
|
|
|
this.visible = false
|
|
|
modal.base(res.data, this.model)
|
|
|
})
|
|
|
},
|
|
|
- handleViewReason (record) {
|
|
|
+ handleViewReason(record) {
|
|
|
fetchRepairReason({ id: record.id }).then(res => {
|
|
|
const modal = this.$refs.reasonDetail
|
|
|
modal.base(res.data)
|
|
|
})
|
|
|
},
|
|
|
- handleApprove () {
|
|
|
+ handleApprove() {
|
|
|
this.confirmLoading = true
|
|
|
approve(this.model).then(() => {
|
|
|
this.$message.info('操作成功')
|
|
|
@@ -544,11 +543,11 @@ export default {
|
|
|
this.handleOk()
|
|
|
})
|
|
|
},
|
|
|
- handleReturn () {
|
|
|
+ handleReturn() {
|
|
|
const modal = this.$refs.checkForm
|
|
|
modal.base(this.model)
|
|
|
},
|
|
|
- handleOk () {
|
|
|
+ handleOk() {
|
|
|
this.loading = true
|
|
|
fetchRepairApplicationForm({ id: this.model.id }).then(res => {
|
|
|
this.loading = false
|
|
|
@@ -558,18 +557,18 @@ export default {
|
|
|
this.init()
|
|
|
})
|
|
|
},
|
|
|
- handleEdit () {
|
|
|
+ handleEdit() {
|
|
|
const modal = this.$refs.editForm
|
|
|
modal.base(this.model)
|
|
|
},
|
|
|
- handleSpareSelect () {
|
|
|
+ handleSpareSelect() {
|
|
|
this.$refs.spareSelectModal.base()
|
|
|
},
|
|
|
- handleDispatch () {
|
|
|
+ handleDispatch() {
|
|
|
const modal = this.$refs.dispatchForm
|
|
|
modal.base(this.model)
|
|
|
},
|
|
|
- changeTab (activeKey) {
|
|
|
+ changeTab(activeKey) {
|
|
|
this.activeKey = activeKey
|
|
|
if (this.activeKey === 'a' && this.BaseTool.Object.isNotBlank(this.$refs.sparePartUsedSelectTable)) {
|
|
|
const modal = this.$refs.sparePartUsedSelectTable
|
|
|
@@ -581,16 +580,16 @@ export default {
|
|
|
modal.handleOk()
|
|
|
}
|
|
|
},
|
|
|
- inited (viewer) {
|
|
|
+ inited(viewer) {
|
|
|
this.$viewer = viewer
|
|
|
},
|
|
|
// 转派记录审批状态文字:pending-待审批 approved-已通过 rejected-已驳回;老数据无 status 字段时按已通过展示(早期转派无审批流程)
|
|
|
- getTransferStatusText (status) {
|
|
|
+ getTransferStatusText(status) {
|
|
|
if (status === 'pending') return '待审批'
|
|
|
if (status === 'rejected') return '已驳回'
|
|
|
return '已通过'
|
|
|
},
|
|
|
- getTransferBadgeStatus (status) {
|
|
|
+ getTransferBadgeStatus(status) {
|
|
|
if (status === 'pending') return 'warning'
|
|
|
if (status === 'rejected') return 'error'
|
|
|
return 'success'
|
|
|
@@ -604,14 +603,15 @@ export default {
|
|
|
width: 300px;
|
|
|
height: 300px;
|
|
|
}
|
|
|
-.ant-carousel >>> .slick-slide {
|
|
|
+
|
|
|
+.ant-carousel>>>.slick-slide {
|
|
|
text-align: center;
|
|
|
height: 300px;
|
|
|
line-height: 300px;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
|
|
|
-.ant-carousel >>> .slick-slide h3 {
|
|
|
+.ant-carousel>>>.slick-slide h3 {
|
|
|
color: #fff;
|
|
|
}
|
|
|
|