|
|
|
@ -14,8 +14,8 @@
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="关联故障报修">
|
|
|
|
<el-form-item label="关联故障报修">
|
|
|
|
<el-input v-model="form.faultInstanceId" placeholder="选择故障报修单" readonly @click.native="selectFaultInstance">
|
|
|
|
<el-input v-model="faultInstanceDisplay" placeholder="选择故障报修单" readonly :disabled="isView" @click.native="selectFaultInstance">
|
|
|
|
<el-button slot="append" icon="el-icon-search" @click="selectFaultInstance"></el-button>
|
|
|
|
<el-button slot="append" icon="el-icon-search" @click="selectFaultInstance" :disabled="isView"></el-button>
|
|
|
|
</el-input>
|
|
|
|
</el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
@ -272,12 +272,62 @@
|
|
|
|
<el-button @click="goBack">返 回</el-button>
|
|
|
|
<el-button @click="goBack">返 回</el-button>
|
|
|
|
<el-button type="primary" @click="handleSubmit" v-if="!isView">保 存</el-button>
|
|
|
|
<el-button type="primary" @click="handleSubmit" v-if="!isView">保 存</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 故障报修选择对话框 -->
|
|
|
|
|
|
|
|
<el-dialog title="选择故障报修单" :visible.sync="faultInstanceDialogVisible" width="900px" append-to-body>
|
|
|
|
|
|
|
|
<el-form :model="faultInstanceQuery" ref="faultInstanceQueryForm" :inline="true" size="small">
|
|
|
|
|
|
|
|
<el-form-item label="报修单号" prop="billsFaultCode">
|
|
|
|
|
|
|
|
<el-input v-model="faultInstanceQuery.billsFaultCode" placeholder="请输入报修单号" clearable @keyup.enter.native="loadFaultInstanceList" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="设备" prop="deviceCode">
|
|
|
|
|
|
|
|
<el-input v-model="faultInstanceQuery.deviceCode" placeholder="请输入设备编号" clearable />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item>
|
|
|
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" @click="loadFaultInstanceList">搜索</el-button>
|
|
|
|
|
|
|
|
<el-button icon="el-icon-refresh" @click="resetFaultInstanceQuery">重置</el-button>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-table
|
|
|
|
|
|
|
|
:data="faultInstanceList"
|
|
|
|
|
|
|
|
border
|
|
|
|
|
|
|
|
highlight-current-row
|
|
|
|
|
|
|
|
@current-change="handleFaultInstanceSelect"
|
|
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
|
|
max-height="400">
|
|
|
|
|
|
|
|
<el-table-column label="报修单号" align="center" prop="billsFaultCode" width="160" />
|
|
|
|
|
|
|
|
<el-table-column label="设备编号" align="center" prop="deviceCode" width="120" />
|
|
|
|
|
|
|
|
<el-table-column label="设备名称" align="center" prop="deviceName" width="150" show-overflow-tooltip />
|
|
|
|
|
|
|
|
<el-table-column label="故障类型" align="center" prop="faultType" width="100">
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
<dict-tag :options="dict.type.dms_fault_type" :value="scope.row.faultType"/>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column label="故障描述" align="center" prop="faultDescription" show-overflow-tooltip />
|
|
|
|
|
|
|
|
<el-table-column label="报修人" align="center" prop="applyUser" width="100" />
|
|
|
|
|
|
|
|
<el-table-column label="报修时间" align="center" prop="applyTime" width="160" />
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<pagination
|
|
|
|
|
|
|
|
v-show="faultInstanceTotal > 0"
|
|
|
|
|
|
|
|
:total="faultInstanceTotal"
|
|
|
|
|
|
|
|
:page.sync="faultInstanceQuery.pageNum"
|
|
|
|
|
|
|
|
:limit.sync="faultInstanceQuery.pageSize"
|
|
|
|
|
|
|
|
@pagination="loadFaultInstanceList"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
|
|
|
<el-button @click="faultInstanceDialogVisible = false">取 消</el-button>
|
|
|
|
|
|
|
|
<el-button type="primary" @click="confirmFaultInstance">确 定</el-button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { getRepairWorkOrder, addRepairWorkOrder, updateRepairWorkOrder } from '@/api/dms/repairWorkOrder'
|
|
|
|
import { getRepairWorkOrder, addRepairWorkOrder, updateRepairWorkOrder } from '@/api/dms/repairWorkOrder'
|
|
|
|
import { getDeviceLedgerList } from '@/api/base/deviceLedger'
|
|
|
|
import { getDeviceLedgerList } from '@/api/base/deviceLedger'
|
|
|
|
|
|
|
|
import { listDmsBillsFaultInstance } from '@/api/dms/dmsBillsFaultInstance'
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: 'RepairWorkOrderDetail',
|
|
|
|
name: 'RepairWorkOrderDetail',
|
|
|
|
@ -307,6 +357,19 @@ export default {
|
|
|
|
repairProjects: [],
|
|
|
|
repairProjects: [],
|
|
|
|
repairMaterials: []
|
|
|
|
repairMaterials: []
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// 故障报修选择对话框
|
|
|
|
|
|
|
|
faultInstanceDialogVisible: false,
|
|
|
|
|
|
|
|
faultInstanceList: [],
|
|
|
|
|
|
|
|
faultInstanceTotal: 0,
|
|
|
|
|
|
|
|
faultInstanceQuery: {
|
|
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
|
|
|
billsFaultCode: null,
|
|
|
|
|
|
|
|
deviceCode: null
|
|
|
|
|
|
|
|
// 不限制billsStatus,显示所有可用的故障报修
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
selectedFaultInstance: null,
|
|
|
|
|
|
|
|
faultInstanceDisplay: null,
|
|
|
|
rules: {
|
|
|
|
rules: {
|
|
|
|
deviceId: [
|
|
|
|
deviceId: [
|
|
|
|
{ required: true, message: '请选择设备', trigger: 'change' }
|
|
|
|
{ required: true, message: '请选择设备', trigger: 'change' }
|
|
|
|
@ -345,6 +408,10 @@ export default {
|
|
|
|
Object.assign(this.form, response.data)
|
|
|
|
Object.assign(this.form, response.data)
|
|
|
|
if (!this.form.repairProjects) this.form.repairProjects = []
|
|
|
|
if (!this.form.repairProjects) this.form.repairProjects = []
|
|
|
|
if (!this.form.repairMaterials) this.form.repairMaterials = []
|
|
|
|
if (!this.form.repairMaterials) this.form.repairMaterials = []
|
|
|
|
|
|
|
|
// 设置关联故障报修显示
|
|
|
|
|
|
|
|
if (response.data.billsFaultCode) {
|
|
|
|
|
|
|
|
this.faultInstanceDisplay = response.data.billsFaultCode
|
|
|
|
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 设备改变 */
|
|
|
|
/** 设备改变 */
|
|
|
|
@ -359,7 +426,52 @@ export default {
|
|
|
|
/** 选择故障报修 */
|
|
|
|
/** 选择故障报修 */
|
|
|
|
selectFaultInstance() {
|
|
|
|
selectFaultInstance() {
|
|
|
|
if (this.isView) return
|
|
|
|
if (this.isView) return
|
|
|
|
this.$message.info('功能开发中...')
|
|
|
|
this.selectedFaultInstance = null
|
|
|
|
|
|
|
|
this.faultInstanceDialogVisible = true
|
|
|
|
|
|
|
|
this.loadFaultInstanceList()
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/** 加载故障报修列表 */
|
|
|
|
|
|
|
|
loadFaultInstanceList() {
|
|
|
|
|
|
|
|
listDmsBillsFaultInstance(this.faultInstanceQuery).then(response => {
|
|
|
|
|
|
|
|
this.faultInstanceList = response.rows || []
|
|
|
|
|
|
|
|
this.faultInstanceTotal = response.total || 0
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/** 重置故障报修查询 */
|
|
|
|
|
|
|
|
resetFaultInstanceQuery() {
|
|
|
|
|
|
|
|
this.faultInstanceQuery = {
|
|
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
|
|
|
billsFaultCode: null,
|
|
|
|
|
|
|
|
deviceCode: null,
|
|
|
|
|
|
|
|
billsStatus: '0'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.loadFaultInstanceList()
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/** 选择故障报修记录 */
|
|
|
|
|
|
|
|
handleFaultInstanceSelect(row) {
|
|
|
|
|
|
|
|
this.selectedFaultInstance = row
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/** 确认选择故障报修 */
|
|
|
|
|
|
|
|
confirmFaultInstance() {
|
|
|
|
|
|
|
|
if (!this.selectedFaultInstance) {
|
|
|
|
|
|
|
|
this.$message.warning('请选择一条故障报修记录')
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const fault = this.selectedFaultInstance
|
|
|
|
|
|
|
|
// 填充表单数据
|
|
|
|
|
|
|
|
this.form.faultInstanceId = fault.repairInstanceId
|
|
|
|
|
|
|
|
this.form.deviceId = fault.deviceId
|
|
|
|
|
|
|
|
this.form.deviceCode = fault.deviceCode
|
|
|
|
|
|
|
|
this.form.deviceName = fault.deviceName
|
|
|
|
|
|
|
|
this.form.faultType = fault.faultType
|
|
|
|
|
|
|
|
this.form.faultDescription = fault.faultDescription
|
|
|
|
|
|
|
|
this.form.planEndTime = fault.requireEndTime
|
|
|
|
|
|
|
|
// 显示报修单号
|
|
|
|
|
|
|
|
this.faultInstanceDisplay = fault.billsFaultCode
|
|
|
|
|
|
|
|
// 关闭对话框
|
|
|
|
|
|
|
|
this.faultInstanceDialogVisible = false
|
|
|
|
|
|
|
|
this.$message.success('已关联故障报修单:' + fault.billsFaultCode)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 添加工程 */
|
|
|
|
/** 添加工程 */
|
|
|
|
handleAddProject() {
|
|
|
|
handleAddProject() {
|
|
|
|
|