|
|
|
|
@ -18,7 +18,7 @@ |
|
|
|
|
<!-- status 客服角色下 1839536982874193922: 状态 0-客服待接单 1,2,3-待维修 4-维修完成 5-待评价 6-已完成 |
|
|
|
|
维修负责人 1839537055389515777:1-待接单 2,3-待维修 4-维修完成 5-待评价 6-已完成 维修人:2-待确认 3-待维修 4-维修完成 5-待评价 6-已完成 领导:4-待审批 5-待评价 6-已完成 |
|
|
|
|
--> |
|
|
|
|
<el-tag :type="getStatus('maintain',role_id,row.status).type">{{ getStatus('maintain',role_id,row.status).name }}</el-tag> |
|
|
|
|
<el-tag v-if="getStatus('maintain',role_id,row.status)" :type="getStatus('maintain',role_id,row.status).type">{{ getStatus('maintain',role_id,row.status).name }}</el-tag> |
|
|
|
|
</template> |
|
|
|
|
<template slot-scope="scope" slot="menuLeft"> |
|
|
|
|
<el-button type="primary" size="small" @click="handleAccept" v-show="role_id != '1839600115013713921'">{{ |
|
|
|
|
@ -34,8 +34,8 @@ |
|
|
|
|
<el-button v-show="permission.ordinaryConfirm && row.status == 201" @click="reciveOrder(row)">确认</el-button> |
|
|
|
|
<el-button v-show="permission.ordinaryRefuse && row.status == 201" @click="repairReject(row)">驳回</el-button> |
|
|
|
|
<el-button v-show="permission.ordinarySubmit && (row.status == 401 || row.status == 300)" @click="handleRepair(row)">提交</el-button> |
|
|
|
|
<el-button v-show="permission.ordinaryFinish && row.status == 103" @click="handleRepairFinish(row)">维修完成</el-button> |
|
|
|
|
<el-button v-show="permission.ordinaryExamine && row.status == 402 || row.status == 102" @click="handleExamine(row)">审批</el-button> |
|
|
|
|
<el-button v-show="permission.ordinaryFinish && (row.status == 103 || row.status == 401)" @click="handleRepairFinish(row)">维修完成</el-button> |
|
|
|
|
<el-button v-show="permission.ordinaryExamine && (row.status == 402 || row.status == 102)" @click="handleExamine(row)">审批</el-button> |
|
|
|
|
<el-button v-show="row.status == 104" @click="handlePayment(row)">确认付款</el-button> |
|
|
|
|
<el-button @click="handleExport(row)">导出</el-button> |
|
|
|
|
</template> |
|
|
|
|
@ -237,7 +237,7 @@ |
|
|
|
|
<el-form-item label="故障位置" prop="faultLocation"> |
|
|
|
|
<el-input placeholder="请输入故障位置" disabled v-model="repairForm.faultLocation" style="width:98%;"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="设备名称" prop="deviceId"> |
|
|
|
|
<el-form-item label="设备名称" prop="deviceName"> |
|
|
|
|
<el-input style="width:98%;" disabled v-model="repairForm.deviceName"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="故障专业类型" prop="faultType"> |
|
|
|
|
@ -289,9 +289,10 @@ |
|
|
|
|
<!-- <el-input |
|
|
|
|
v-show="role_id == '1839600115013713921' || (repairForm.status == 402 || repairForm.status == 103 || repairForm.status == 301) || repairForm.status == 3 || dialogType != 'view'" |
|
|
|
|
style="width: 98%" disabled v-model="repairForm.deviceName"></el-input> --> |
|
|
|
|
<el-select placeholder="请选择设备" v-model="repairForm.deviceId" style="width:98%;" :disabled="dialogType == 'view' || dialogType == 'examine'"> |
|
|
|
|
<el-select v-if="dialogType != 'view' && dialogType != 'examine'" placeholder="请选择设备" v-model="repairForm.deviceId" style="width:98%;" :disabled="dialogType == 'view' || dialogType == 'examine'" @change="changeDevice"> |
|
|
|
|
<el-option v-for="item in deviceList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<el-input v-if="dialogType == 'view' || dialogType == 'examine'" v-model="repairForm.deviceName" disabled style="width:98%;"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="故障原因" prop="faultCause"> |
|
|
|
|
<el-input placeholder="请输入故障原因" |
|
|
|
|
@ -608,6 +609,18 @@ |
|
|
|
|
<el-button @click="handleCloneSub">提 交</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
<!-- 维修完成弹窗 --> |
|
|
|
|
<el-dialog title="关闭" :visible.sync="finishVisible" :append-to-body="true" width="70%"> |
|
|
|
|
<el-form ref="finishForm" :model="finishForm" :rules="finishRules"> |
|
|
|
|
<el-form-item label="关闭原因" prop="closeReason" label-position="left" label-width="80px"> |
|
|
|
|
<el-input type="textarea" placeholder="请填写关闭原因" v-model="finishForm.closeReason"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button @click="handleCancelFinish">取 消</el-button> |
|
|
|
|
<el-button @click="handleFinishSub">提 交</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
<!-- 报告导出页面 --> |
|
|
|
|
<div id="pdfDom" style="padding: 20px;"> |
|
|
|
|
<requirement :detailForm="requireForm"></requirement> |
|
|
|
|
@ -628,7 +641,7 @@ import { nextTick } from 'vue'; |
|
|
|
|
import { getDeviceList } from '@/api/device/device' |
|
|
|
|
import { applyGoods } from '@/api/goodsManagement/goods' |
|
|
|
|
import { getList, getDetail, editData, getDeptList, getRepairPeople, repairReject, submitReject, clone,serviceman,servicemanReceive,servicemanReject,servicemanSubmit,supervisorConfirm,supervisorReject, |
|
|
|
|
servicemanRepairSubmit,serviceInvoice |
|
|
|
|
servicemanRepairSubmit,serviceInvoice,serviceSubmit,sendMess |
|
|
|
|
} from '@/api/operation/hand' |
|
|
|
|
import { getGoodsList } from '@/api/goodsManagement/goods' |
|
|
|
|
export default { |
|
|
|
|
@ -645,6 +658,8 @@ export default { |
|
|
|
|
return v.getTime() < new Date().getTime() - 86400000;// - 86400000是否包括当天 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
finishForm:{}, |
|
|
|
|
finishVisible:false, |
|
|
|
|
rejectVisible: false, |
|
|
|
|
rejectForm: {}, |
|
|
|
|
materialsData: [], |
|
|
|
|
@ -854,7 +869,6 @@ export default { |
|
|
|
|
mounted() { |
|
|
|
|
this.role_id = this.userInfo.role_id |
|
|
|
|
console.log('role_id---------->', this.role_id) |
|
|
|
|
this.getDeviceList() |
|
|
|
|
getRepairPeople({ isRepair: this.role_id == '1839537055389515777' ? true : false }).then(res => { |
|
|
|
|
this.repairPersonList = res.data.data |
|
|
|
|
}) |
|
|
|
|
@ -879,8 +893,11 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
getDeviceList(){ |
|
|
|
|
getDeviceList({current:1,size:100}).then(res =>{ |
|
|
|
|
changeDevice(val){ |
|
|
|
|
this.repairForm.deviceName = this.deviceList.find(item => item.id == val).name |
|
|
|
|
}, |
|
|
|
|
getDeviceList(limsId){ |
|
|
|
|
getDeviceList({current:1,size:100,limsId:limsId}).then(res =>{ |
|
|
|
|
this.deviceList = res.data.data.records |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
@ -1049,7 +1066,9 @@ export default { |
|
|
|
|
this.dialogType = 'repair' |
|
|
|
|
this.repairForm.errorVideo = res.data.data.videoAttaches.length > 0 ? res.data.data.videoAttaches[0].link : '' |
|
|
|
|
this.repairForm.errorImg = res.data.data.picAttaches.map(item => { return { name: item.originalName, url: item.link } }) |
|
|
|
|
this.repairForm.deviceId = this.repairForm.deviceId == -1 ? '' : this.repairForm.deviceId |
|
|
|
|
this.repairForm.isNeedMaterial = (this.repairForm.status == 201 || this.repairForm.status == 401 || this.repairForm.status == 402) && this.repairForm.isNeedMaterial == -1 ? '' : this.repairForm.isNeedMaterial |
|
|
|
|
this.getDeviceList(res.data.data.createDept) |
|
|
|
|
if (this.repairForm.isNeedMaterial != '') { |
|
|
|
|
this.tableData = [] |
|
|
|
|
this.repairForm.materials.map(item => { |
|
|
|
|
@ -1118,20 +1137,28 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 维修人员提交维修结果 |
|
|
|
|
handleRepairFinish(row){ |
|
|
|
|
this.$confirm('请确认当前工单是否维修完成?', '提示', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning' |
|
|
|
|
}).then(() => { |
|
|
|
|
servicemanRepairSubmit({id:row.id}).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
this.$message.success('维修完成') |
|
|
|
|
this.onLoad() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}).catch(() =>{ |
|
|
|
|
if(row.status == 401){ |
|
|
|
|
this.finishVisible = true |
|
|
|
|
this.finishForm = { |
|
|
|
|
id:row.id |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
this.$confirm('请确认当前工单是否维修完成?', '提示', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning' |
|
|
|
|
}).then(() => { |
|
|
|
|
servicemanRepairSubmit({id:row.id}).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
this.$message.success('维修完成') |
|
|
|
|
this.onLoad() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}).catch(() =>{ |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
async getProductList(val) { |
|
|
|
|
let data = await getGoodsList({ |
|
|
|
|
@ -1356,13 +1383,31 @@ export default { |
|
|
|
|
this.cloneForm = {} |
|
|
|
|
this.cloneVisible = false |
|
|
|
|
}, |
|
|
|
|
handleCancelFinish(){ |
|
|
|
|
this.finishForm = {} |
|
|
|
|
this.finishVisible = false |
|
|
|
|
}, |
|
|
|
|
handleFinishSub(){ |
|
|
|
|
let query = { |
|
|
|
|
id: this.finishForm.id, |
|
|
|
|
closeReason: this.finishForm.closeReason, |
|
|
|
|
} |
|
|
|
|
servicemanRepairSubmit(query).then(res =>{ |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
this.$message.success('关闭成功') |
|
|
|
|
this.finishForm = {} |
|
|
|
|
this.finishVisible = false |
|
|
|
|
this.onLoad() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 点击关闭弹窗提交按钮 |
|
|
|
|
handleCloneSub() { |
|
|
|
|
let query = { |
|
|
|
|
id: this.cloneForm.id, |
|
|
|
|
closeReason: this.cloneForm.reason, |
|
|
|
|
} |
|
|
|
|
clone(query).then(res => { |
|
|
|
|
serviceSubmit(query).then(res => { |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
this.$message.success('关闭成功') |
|
|
|
|
this.cloneForm = {} |
|
|
|
|
@ -1471,12 +1516,16 @@ export default { |
|
|
|
|
processMethod: this.repairForm.processMethod, |
|
|
|
|
isNeedMaterial: this.repairForm.isNeedMaterial, |
|
|
|
|
deviceId:this.repairForm.deviceId, |
|
|
|
|
deviceName:this.repairForm.deviceName, |
|
|
|
|
materials: data |
|
|
|
|
} |
|
|
|
|
console.log('query---------->', query) |
|
|
|
|
editData(query).then(res => { |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
servicemanSubmit({id:this.repairForm.id}).then(res =>{ |
|
|
|
|
servicemanSubmit({id:this.repairForm.id, |
|
|
|
|
deviceId:this.repairForm.deviceId, |
|
|
|
|
deviceName:this.repairForm.deviceName, |
|
|
|
|
}).then(res =>{ |
|
|
|
|
this.$message.success("提交成功") |
|
|
|
|
this.repairVisible = false |
|
|
|
|
this.onLoad() |
|
|
|
|
@ -1493,9 +1542,14 @@ export default { |
|
|
|
|
} |
|
|
|
|
editData(query).then(res => { |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
this.$message.success("提交成功") |
|
|
|
|
this.repairVisible = false |
|
|
|
|
this.onLoad() |
|
|
|
|
servicemanSubmit({id:this.repairForm.id, |
|
|
|
|
deviceId:this.repairForm.deviceId, |
|
|
|
|
deviceName:this.repairForm.deviceName, |
|
|
|
|
}).then(res =>{ |
|
|
|
|
this.$message.success("提交成功") |
|
|
|
|
this.repairVisible = false |
|
|
|
|
this.onLoad() |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|