From 900b4a9e1e0e97ff0acef51330eabba0e8151a9d Mon Sep 17 00:00:00 2001 From: zds <2388969634@qq.com> Date: Mon, 10 Oct 2022 19:35:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DevicerepairrequestServiceImpl.java | 103 +++++++++++------- .../basedata/em/equipmentfile/AddDialog.vue | 68 ++++++------ .../wms/basedata/em/equipmentfile/index.vue | 4 +- .../repair/devicerepairpa/ExecuteDialog.vue | 2 +- .../sb/repair/devicerepairrequest/index.vue | 23 ++-- .../wms/sb/run/devicerunrecord/index.vue | 8 +- 6 files changed, 116 insertions(+), 92 deletions(-) diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/sb/repair/service/impl/DevicerepairrequestServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/sb/repair/service/impl/DevicerepairrequestServiceImpl.java index 846c5ef5..eadf9ef4 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/sb/repair/service/impl/DevicerepairrequestServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/sb/repair/service/impl/DevicerepairrequestServiceImpl.java @@ -200,7 +200,7 @@ public class DevicerepairrequestServiceImpl implements DevicerepairrequestServic @Override @Transactional(rollbackFor = Exception.class) public void repair(JSONObject whereJson) { - String devicerecord_id = whereJson.getString("devicerecord_id"); + JSONArray rows = whereJson.getJSONArray("rows"); Long currentUserId = SecurityUtils.getCurrentUserId(); String nickName = SecurityUtils.getNickName(); JwtUserDto currentUser = (JwtUserDto) SecurityUtils.getCurrentUser(); @@ -210,42 +210,52 @@ public class DevicerepairrequestServiceImpl implements DevicerepairrequestServic WQLObject requestTab = WQLObject.getWQLObject("EM_BI_DeviceRepairRequest"); // 设备报修单 WQLObject reMstTab = WQLObject.getWQLObject("EM_BI_DeviceRepairMst"); // 设备维修单主表 - // 1.更新设备档案表 - JSONObject jsonFile = fileTab.query("devicerecord_id = '" + devicerecord_id + "' and is_delete = '0'").uniqueResult(0); - if (ObjectUtil.isEmpty(jsonFile)) throw new BadRequestException("设备档案不存在"); - jsonFile.put("status","20"); - fileTab.update(jsonFile); + for(int i=0;i - + @@ -29,50 +29,50 @@ - + - + - + - + - + - + - + - + - + - + @@ -107,7 +107,7 @@ v-model="form.use_groupid" :options="depts" :load-options="loadDepts" - style="width: 210px" + style="width: 300px" placeholder="使用班组" /> @@ -115,7 +115,7 @@ - + - + - + + + + + - - - - - + - + - + @@ -211,7 +211,7 @@ :controls="false" :precision="3" :min="0" - style="width: 210px" + style="width: 300px" /> @@ -221,7 +221,7 @@ :controls="false" :precision="3" :min="0" - style="width: 210px" + style="width: 300px" /> diff --git a/mes/qd/src/views/wms/basedata/em/equipmentfile/index.vue b/mes/qd/src/views/wms/basedata/em/equipmentfile/index.vue index 4beb97b0..456d9936 100644 --- a/mes/qd/src/views/wms/basedata/em/equipmentfile/index.vue +++ b/mes/qd/src/views/wms/basedata/em/equipmentfile/index.vue @@ -17,7 +17,7 @@ :options="depts" :load-options="loadDepts" clearable - style="width: 200px" + style="width: 300px" placeholder="选择部门" /> @@ -27,7 +27,7 @@ :options="classes" clearable :load-options="loadClass" - style="width: 200px" + style="width: 300px" placeholder="设备类别" /> diff --git a/mes/qd/src/views/wms/sb/repair/devicerepairpa/ExecuteDialog.vue b/mes/qd/src/views/wms/sb/repair/devicerepairpa/ExecuteDialog.vue index e49dafca..d6cd2bac 100644 --- a/mes/qd/src/views/wms/sb/repair/devicerepairpa/ExecuteDialog.vue +++ b/mes/qd/src/views/wms/sb/repair/devicerepairpa/ExecuteDialog.vue @@ -56,7 +56,7 @@ - + diff --git a/mes/qd/src/views/wms/sb/repair/devicerepairrequest/index.vue b/mes/qd/src/views/wms/sb/repair/devicerepairrequest/index.vue index 37a67744..3be366b3 100644 --- a/mes/qd/src/views/wms/sb/repair/devicerepairrequest/index.vue +++ b/mes/qd/src/views/wms/sb/repair/devicerepairrequest/index.vue @@ -68,7 +68,6 @@ type="success" icon="el-icon-position" size="mini" - :disabled="crud.selections.length !== 1" @click="repair" > 维修 @@ -79,7 +78,6 @@ type="success" icon="el-icon-position" size="mini" - :disabled="crud.selections.length !== 1" @click="notRepair" > 不维修 @@ -155,6 +153,7 @@ export default { data() { return { classes: [], + checkrows: [], class_idStr: null, materOpt_code: '23', statusList: [ @@ -240,23 +239,23 @@ export default { } }, repair() { - const _selectData = this.$refs.table.selection - const data = _selectData[0] - if (data.status !== '01') { - return this.crud.notify('只能对生成状态的单据进行维修', CRUD.NOTIFICATION_TYPE.INFO) + this.checkrows = this.$refs.table.selection + if(this.checkrows.length === 0 ){ + this.crud.notify('请勾选需要操作的记录!') + return false } - crudDevicerepairrequest.repair(data).then(res => { + crudDevicerepairrequest.repair({ rows: this.checkrows}).then(res => { this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS) this.crud.toQuery() }) }, notRepair() { - const _selectData = this.$refs.table.selection - const data = _selectData[0] - if (data.status !== '01') { - return this.crud.notify('只能对生成状态的单据进行操作', CRUD.NOTIFICATION_TYPE.INFO) + this.checkrows = this.$refs.table.selection + if(this.checkrows.length === 0 ){ + this.crud.notify('请勾选需要操作的记录!') + return false } - crudDevicerepairrequest.notRepair(data).then(res => { + crudDevicerepairrequest.notRepair({ rows: this.checkrows}).then(res => { this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS) this.crud.toQuery() }) diff --git a/mes/qd/src/views/wms/sb/run/devicerunrecord/index.vue b/mes/qd/src/views/wms/sb/run/devicerunrecord/index.vue index c635c807..7487bbb2 100644 --- a/mes/qd/src/views/wms/sb/run/devicerunrecord/index.vue +++ b/mes/qd/src/views/wms/sb/run/devicerunrecord/index.vue @@ -128,7 +128,9 @@ - + @@ -312,6 +314,10 @@ export default { }) }) }, + mydb(row){ + this.openParam = row + this.addPaDialog = true + }, addPa() { const _selectData = this.$refs.table.selection const data = _selectData[0]