|
|
|
@ -128,9 +128,13 @@
|
|
|
|
|
>巡检详情
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
|
|
<el-button :disabled="!(scope.row.finishFlag && scope.row.exceptionCount>0&&!scope.row.repairId)" type="text"
|
|
|
|
|
<el-button v-if="(scope.row.finishFlag && scope.row.exceptionCount>0 && !(scope.row.repairId || scope.row.applyId) )" type="text"
|
|
|
|
|
@click="createRepair(scope.row)"
|
|
|
|
|
>维修
|
|
|
|
|
>报修
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button v-if="scope.row.applyId" type="text"
|
|
|
|
|
@click="applyIdSelect(scope.row)"
|
|
|
|
|
>报修单
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button v-if="scope.row.repairId" type="text"
|
|
|
|
|
@click="repairId = scope.row.repairId"
|
|
|
|
@ -253,7 +257,7 @@
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
:visible="true"
|
|
|
|
|
title="创建维修单"
|
|
|
|
|
title="创建报修单"
|
|
|
|
|
v-if="repairRow"
|
|
|
|
|
width="80%"
|
|
|
|
|
@close="repairRow = null"
|
|
|
|
@ -289,46 +293,45 @@
|
|
|
|
|
maxlength="300" v-model.trim="repairRow.description"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="维修方式" :span="3">
|
|
|
|
|
<el-form-item label=" " prop="innerFlag" style="margin-bottom: 0">
|
|
|
|
|
<el-radio-group v-model="repairRow.innerFlag">
|
|
|
|
|
<el-radio :label="true">内部维修</el-radio>
|
|
|
|
|
<el-radio :label="false">外部维修</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
|
|
|
|
|
<el-descriptions-item label="维修部门" :span="3">
|
|
|
|
|
<el-form-item label=" " prop="repairDeptCode" style="margin-bottom: 10px">
|
|
|
|
|
<deptSelect :value.sync="repairRow.repairDeptCode" :maintenance="true" placeholder="请选择报修部门" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="维修人姓名" :span="3">
|
|
|
|
|
<el-form-item label=" " prop="repairUserName" style="margin-bottom: 10px">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="repairRow.repairUserName"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="(item, index) in userlist"
|
|
|
|
|
:key="index"
|
|
|
|
|
:label="item.employeeName"
|
|
|
|
|
:value="item.employeeName"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="维修人电话" :span="3">
|
|
|
|
|
<!-- <el-descriptions-item label="维修方式" :span="3">-->
|
|
|
|
|
<!-- <el-form-item label=" " prop="innerFlag" style="margin-bottom: 0">-->
|
|
|
|
|
<!-- <el-radio-group v-model="repairRow.innerFlag">-->
|
|
|
|
|
<!-- <el-radio :label="true">内部维修</el-radio>-->
|
|
|
|
|
<!-- <el-radio :label="false">外部维修</el-radio>-->
|
|
|
|
|
<!-- </el-radio-group>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- </el-descriptions-item>-->
|
|
|
|
|
<!-- <el-descriptions-item label="维修部门" :span="3">-->
|
|
|
|
|
<!-- <el-form-item label=" " prop="repairDeptCode" style="margin-bottom: 10px">-->
|
|
|
|
|
<!-- <deptSelect :value.sync="repairRow.repairDeptCode" :maintenance="true" placeholder="请选择报修部门" />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- </el-descriptions-item>-->
|
|
|
|
|
<!-- <el-descriptions-item label="维修人姓名" :span="3">-->
|
|
|
|
|
<!-- <el-form-item label=" " prop="repairUserName" style="margin-bottom: 10px">-->
|
|
|
|
|
<!-- <el-select-->
|
|
|
|
|
<!-- v-model="repairRow.repairUserName"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- <el-option-->
|
|
|
|
|
<!-- v-for="(item, index) in userlist"-->
|
|
|
|
|
<!-- :key="index"-->
|
|
|
|
|
<!-- :label="item.employeeName"-->
|
|
|
|
|
<!-- :value="item.employeeName"-->
|
|
|
|
|
<!-- />-->
|
|
|
|
|
<!-- </el-select>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- </el-descriptions-item>-->
|
|
|
|
|
<el-descriptions-item label="报修人电话" :span="3">
|
|
|
|
|
<el-form-item label=" " prop="repairUserPhone" style="margin-bottom: 10px">
|
|
|
|
|
<el-input v-model.trim="repairRow.repairUserPhone" placeholder="请输入维修人电话"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="诊断信息" :label-style="{'height': '100px'}" :span="3">
|
|
|
|
|
<el-form-item label=" " prop="diagnosisInfo" style="margin-bottom: 10px">
|
|
|
|
|
<el-input type="textarea" resize="none" :autosize="{ minRows: 4, maxRows: 4 }" clearable
|
|
|
|
|
show-word-limit
|
|
|
|
|
maxlength="300" v-model.trim="repairRow.diagnosisInfo"/>
|
|
|
|
|
<el-input v-model.trim="repairRow.repairUserPhone" placeholder="请输入报修人电话"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<!-- <el-descriptions-item label="诊断信息" :label-style="{'height': '100px'}" :span="3">-->
|
|
|
|
|
<!-- <el-form-item label=" " prop="diagnosisInfo" style="margin-bottom: 10px">-->
|
|
|
|
|
<!-- <el-input type="textarea" resize="none" :autosize="{ minRows: 4, maxRows: 4 }" clearable-->
|
|
|
|
|
<!-- show-word-limit-->
|
|
|
|
|
<!-- maxlength="300" v-model.trim="repairRow.diagnosisInfo"/>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- </el-descriptions-item>-->
|
|
|
|
|
</el-descriptions>
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-card>
|
|
|
|
@ -342,6 +345,53 @@
|
|
|
|
|
width="80%"
|
|
|
|
|
>
|
|
|
|
|
<deviceRepairDialog :repairId="repairId"/>
|
|
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
visible
|
|
|
|
|
v-if="applyId"
|
|
|
|
|
@close="applyId=null"
|
|
|
|
|
title="报修单信息"
|
|
|
|
|
width="80%"
|
|
|
|
|
>
|
|
|
|
|
<el-card>
|
|
|
|
|
<div slot="header" class="clearfix">
|
|
|
|
|
<div class="fl">
|
|
|
|
|
{{ `巡检设备--${selectRepairRow.deviceCode}--${selectRepairRow.productName}(${selectRepairRow.ggxh})` }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<el-form :model="selectRepairRow" label-width="auto" disabled>
|
|
|
|
|
<el-descriptions border label-style="width:90px" :column="3">
|
|
|
|
|
<el-descriptions-item label="名称">{{ selectRepairRow.productName }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="规格">{{ selectRepairRow.ggxh }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="销售标识">{{ selectRepairRow.nameCode }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="注册/备案号">{{ selectRepairRow.zczbhhzbapzbh }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="生产企业">{{ selectRepairRow.manufactory }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="供应商">{{ selectRepairRow.supName }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="批次号">{{ selectRepairRow.batchNo }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="序列号">{{ selectRepairRow.serialNo }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="udi码">{{ selectRepairRow.udi }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="生产日期">{{ selectRepairRow.productionDate }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="过期时间">{{ selectRepairRow.expireDate }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label=""></el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="问题描述" :label-style="{'height': '100px'}" :span="3">
|
|
|
|
|
<el-form-item label=" " prop="description" style="margin-bottom: 10px">
|
|
|
|
|
<el-input type="textarea" resize="none" :autosize="{ minRows: 4, maxRows: 4 }" clearable
|
|
|
|
|
show-word-limit
|
|
|
|
|
maxlength="300" v-model.trim="selectRepairRow.description"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="报修人电话" :span="3">
|
|
|
|
|
<el-form-item label=" " prop="repairUserPhone" style="margin-bottom: 10px">
|
|
|
|
|
<el-input v-model.trim="selectRepairRow.repairUserPhone" placeholder="请输入报修人电话"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
</el-descriptions>
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-card>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
@ -370,6 +420,8 @@ import {deviceCheckDetailItemFinish, deviceCheckDetailItemPage} from "@/api/dev/
|
|
|
|
|
import {copyProperties, getLoading} from "@/utils";
|
|
|
|
|
import deptDeviceCheckDetail from "@/views/dev/deptDeviceCheckDetail";
|
|
|
|
|
import {filterListByDeptCode} from "@/api/system/deptUser";
|
|
|
|
|
import {deviceRepairApplyAdd} from "@/api/dev/deviceRepairApplyApi";
|
|
|
|
|
import {listByIdAndCode} from "@/api/dev/deviceRepairApplyDetailApi.js";
|
|
|
|
|
|
|
|
|
|
let query = {
|
|
|
|
|
page: 1,
|
|
|
|
@ -436,6 +488,7 @@ export default {
|
|
|
|
|
suggestion: [{required: true, message: "巡检意见不能为空", trigger: ["change", "blur"]}],
|
|
|
|
|
},
|
|
|
|
|
repairRow: null,
|
|
|
|
|
selectRepairRow: null,
|
|
|
|
|
repairRules: {
|
|
|
|
|
innerFlag: [{
|
|
|
|
|
required: true,
|
|
|
|
@ -461,6 +514,7 @@ export default {
|
|
|
|
|
diagnosisInfo: [{required: true, message: "诊断信息不能为空", trigger: ["change", "blur"]}],
|
|
|
|
|
},
|
|
|
|
|
repairId: null,
|
|
|
|
|
applyId: null,
|
|
|
|
|
|
|
|
|
|
// 开始巡检
|
|
|
|
|
checkTipDialogVisible: false,
|
|
|
|
@ -480,13 +534,40 @@ watch: {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
applyIdSelect(row){
|
|
|
|
|
this.applyId = row.applyId;
|
|
|
|
|
//查询赋值
|
|
|
|
|
let load = getLoading(this)
|
|
|
|
|
listByIdAndCode({applyId:row.applyId,deviceCode:row.deviceCode}).then(res => {
|
|
|
|
|
load.close()
|
|
|
|
|
if (res.code != 20000) {
|
|
|
|
|
// this.$message.error(res.message)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
// this.$message.success(res.message)
|
|
|
|
|
this.selectRepairRow = res.data
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
load.close()
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
commitRepair() {
|
|
|
|
|
this.$refs.repairForm.validate(b => {
|
|
|
|
|
if (!b) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
let load = getLoading(this)
|
|
|
|
|
deviceCheckDetailRepair(this.repairRow).then(res => {
|
|
|
|
|
let pData = {
|
|
|
|
|
applyUserPhone:"",
|
|
|
|
|
taskId:"",
|
|
|
|
|
details: []
|
|
|
|
|
}
|
|
|
|
|
pData.details.push({
|
|
|
|
|
deviceCode: this.repairRow.deviceCode,
|
|
|
|
|
description: this.repairRow.description
|
|
|
|
|
})
|
|
|
|
|
pData.applyUserPhone = this.repairRow.repairUserPhone
|
|
|
|
|
pData.taskId = this.repairRow.taskId
|
|
|
|
|
deviceRepairApplyAdd(pData).then(res => {
|
|
|
|
|
load.close()
|
|
|
|
|
if (res.code != 20000) {
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|