diff --git a/src/api/operation/hand.js b/src/api/operation/hand.js index 992bd81..dc1c466 100644 --- a/src/api/operation/hand.js +++ b/src/api/operation/hand.js @@ -259,3 +259,21 @@ export const getAllUser = (query) =>{ params:query }) } + + +// 客服直接关闭接口 +export const serviceSubmit = (data) =>{ + return request({ + url:'/api/lab-ops/work-order/service-repair-submit', + method:'post', + data + }) +} + +export const sendMess = (data) =>{ + return request({ + url:"/api/lab-ops/maintenance/task-supervisor-confirm", + method:"post", + data + }) +} \ No newline at end of file diff --git a/src/views/businessManagement/ordinary.vue b/src/views/businessManagement/ordinary.vue index 3e358a5..3ba816c 100644 --- a/src/views/businessManagement/ordinary.vue +++ b/src/views/businessManagement/ordinary.vue @@ -18,7 +18,7 @@ - {{ getStatus('maintain',role_id,row.status).name }} + {{ getStatus('maintain',role_id,row.status).name }} @@ -237,7 +237,7 @@ - + @@ -289,9 +289,10 @@ - + + 提 交 + + + + + + + + + 取 消 + 提 交 + +
@@ -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() + }) } }) } diff --git a/src/views/device/deviceSystem.vue b/src/views/device/deviceSystem.vue index 4c4a0e1..ef2ab9e 100644 --- a/src/views/device/deviceSystem.vue +++ b/src/views/device/deviceSystem.vue @@ -34,11 +34,11 @@ "> {{ row.runStatus == 0 - ? "关机" + ? "" : row.runStatus == 1 ? "运行中" : row.runStatus == 2 - ? '报警中' + ? '故障中' : "" }} @@ -360,11 +360,7 @@ export default { value: "1", }, { - label: "关机", - value: "0", - }, - { - label: "报警中", + label: "故障中", value: "2", } ] @@ -413,7 +409,7 @@ export default { res.data.data.map(item => { firstNode.push({ value: item.id, - label: item.fullName, + label: item.title, leaf: level >= 2 }) }) @@ -628,7 +624,7 @@ export default { // 点击新增按钮 handleAdd() { this.dialogTitle = '设备新增' - this.addForm = { position: { node: undefined, data: {} } } + this.addForm = { position: { node: undefined, data: {} },isWarran:false } this.viewType = 'add' this.tableData = [] this.fileList = [] @@ -658,6 +654,7 @@ export default { this.addForm.requirement = this.tableData.length > 0 ? this.tableData.map(item => item.craft).join(';') : '' this.addForm.cycle = this.tableData.length > 0 ? this.tableData.find(item => item.period).period : '' this.addForm.startTime = this.tableData.length > 0 ? this.tableData.find(item => item.startTime).startTime : '' + this.addForm.isWarran = this.addForm.isWarran == 0 ? true : false this.dialogTitle = '设备查看' this.dialogVisible = true this.addForm.isMaintain = res.data.data.isMaintain//是否在保 @@ -715,6 +712,7 @@ export default { cycle: this.tableData.length > 0 ? this.tableData.find(item => item.period).period : '', startTime: this.tableData.length > 0 ? this.tableData.find(item => item.startTime).startTime : '' } + this.addForm.isWarran = this.addForm.isWarran == 0 ? true : false this.dialogTitle = '设备编辑' this.dialogVisible = true }) @@ -797,26 +795,26 @@ export default { floorId: this.addForm.lab[1], //楼层id roomId: this.addForm.lab[2], //房间id brand:this.addForm.brand,//品牌 - isWarran:this.addForm.isWarran + isWarran:this.addForm.isWarran ? 0 : 1 } console.log('query----------------->',query) - // if (this.viewType == 'add') { - // addDevice(query).then(res => { - // if (res.data.code == 200) { - // this.$message.success('新增成功!') - // this.dialogVisible = false - // this.onLoad() - // } - // }) - // } else if (this.viewType == 'edit') { - // editDevice(query).then(res => { - // if (res.data.code == 200) { - // this.$message.success('修改成功!') - // this.dialogVisible = false - // this.onLoad() - // } - // }) - // } + if (this.viewType == 'add') { + addDevice(query).then(res => { + if (res.data.code == 200) { + this.$message.success('新增成功!') + this.dialogVisible = false + this.onLoad() + } + }) + } else if (this.viewType == 'edit') { + editDevice(query).then(res => { + if (res.data.code == 200) { + this.$message.success('修改成功!') + this.dialogVisible = false + this.onLoad() + } + }) + } } }) }, diff --git a/src/views/labManagement/inspectionManagement.vue b/src/views/labManagement/inspectionManagement.vue index a09661d..247d1ee 100644 --- a/src/views/labManagement/inspectionManagement.vue +++ b/src/views/labManagement/inspectionManagement.vue @@ -42,7 +42,6 @@ 取 消 - 保 存 提 交 diff --git a/src/views/operation/hand.vue b/src/views/operation/hand.vue index 3bccd57..696007c 100644 --- a/src/views/operation/hand.vue +++ b/src/views/operation/hand.vue @@ -82,7 +82,7 @@ 编辑 提交 确认 - 评价 + 评价 导出 @@ -153,7 +153,7 @@
-
+
- +
-
+
+ v-show="rowStatus != 100 && rowStatus != 202 && rowStatus != 101 && rowStatus != 401 && rowStatus != 402 && detailForm.closeReason == ''">
+ v-show="((rowStatus == 403 || isEvalute ) && detailForm.approveResult1 == 1) || rowStatus == 104 || rowStatus == 203 || rowStatus == 202">
+ v-show="((rowStatus == 6 || isEvalute) && detailForm.approveResult1 == 1) || rowStatus == 104 || rowStatus == 203 || rowStatus == 202">
` ).join('') + return ` +
${params[0].axisValue}
+ ${rander} + ` + } }, legend: { //图例组件 data: ['维修数量','好评率'], @@ -813,9 +823,9 @@ export default { }, { type: 'value', - name: '好评率', + name: '好评率(%)', min: 0, - max: 100, + max: 100 } ], series: [ @@ -903,10 +913,10 @@ export default { }, legend: { type: 'scroll', - left: 'center', top: 0, + right:5, + orient: 'vertical', }, - series: [ { type: 'pie', @@ -1223,16 +1233,16 @@ export default { .tablebox_item_warp { height: 90%; - margin-top: 15px; overflow: hidden; .left_item { width: 94%; height: 128px; background: #fff; + border: 1px solid #EBEEF5; border-radius: 10px; margin: 0 auto; - margin-top: 20px; + margin-bottom: 20px; display: flex; justify-content: space-between;