From 062c05b2d43514e86ec451f3c9fb1bd48ba42249 Mon Sep 17 00:00:00 2001 From: zhangzq Date: Thu, 25 Jul 2024 15:58:06 +0800 Subject: [PATCH] =?UTF-8?q?add:c=E5=87=BA=E5=85=A5=E5=BA=93=E5=8D=95?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E9=9D=9E=E7=A9=BA=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/org/nl/AppRun.java | 2 +- .../org/nl/common/utils/SecurityUtils.java | 2 +- .../handler/impl/GroupDickInStorageTask.java | 6 ++++ .../StIvtIostorinvOutController.java | 6 ++++ .../views/wms/stor_manage/in/AddDialog.vue | 21 +++++++++++-- .../views/wms/stor_manage/out/AddDialog.vue | 30 +++++++++++++++++++ .../wms/stor_manage/warehouse/pick/index.vue | 20 +++++++++---- 7 files changed, 77 insertions(+), 10 deletions(-) diff --git a/wms_pro/hd/nladmin-system/src/main/java/org/nl/AppRun.java b/wms_pro/hd/nladmin-system/src/main/java/org/nl/AppRun.java index ba0ad790..a564271c 100644 --- a/wms_pro/hd/nladmin-system/src/main/java/org/nl/AppRun.java +++ b/wms_pro/hd/nladmin-system/src/main/java/org/nl/AppRun.java @@ -30,7 +30,7 @@ import org.springframework.web.bind.annotation.RestController; @ServletComponentScan @EnableTransactionManagement @MapperScan("org.nl.**.mapper") -//@EnableDynamicTp +@EnableDynamicTp public class AppRun implements CommandLineRunner { public static void main(String[] args) { SpringApplication.run(AppRun.class, args); diff --git a/wms_pro/hd/nladmin-system/src/main/java/org/nl/common/utils/SecurityUtils.java b/wms_pro/hd/nladmin-system/src/main/java/org/nl/common/utils/SecurityUtils.java index 9593f2ac..1044adf0 100644 --- a/wms_pro/hd/nladmin-system/src/main/java/org/nl/common/utils/SecurityUtils.java +++ b/wms_pro/hd/nladmin-system/src/main/java/org/nl/common/utils/SecurityUtils.java @@ -82,7 +82,7 @@ public class SecurityUtils { * @return 权限列表 */ public static List getCurrentUserPermissions() { - JSONObject json = (JSONObject) StpUtil.getExtra("loginInfo"); + JSONObject json =JSONObject.parseObject(String.valueOf(StpUtil.getExtra("loginInfo"))); JSONArray permissions = json.getJSONArray("permissions"); if (permissions.size() > 0) { return permissions.toJavaList(String.class); diff --git a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/dispatch_manage/task/handler/impl/GroupDickInStorageTask.java b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/dispatch_manage/task/handler/impl/GroupDickInStorageTask.java index a16b8972..51622de9 100644 --- a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/dispatch_manage/task/handler/impl/GroupDickInStorageTask.java +++ b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/dispatch_manage/task/handler/impl/GroupDickInStorageTask.java @@ -71,6 +71,12 @@ public class GroupDickInStorageTask extends AbstractTask { if (CollectionUtils.isEmpty(item)){ throw new BadRequestException("申请任务失败:载具"+vehicle_code+"组盘信息不存在"); } + SchBaseTask schBaseTask = iSchBaseTaskService.getOne(new QueryWrapper() + .eq("vehicle_code", vehicle_code).select("task_code") + .lt("status",StatusEnum.FORM_STATUS.code("完成"))); + if (schBaseTask!=null){ + throw new BadRequestException("申请任务失败:载具"+vehicle_code+"已经存任务"+schBaseTask.getTask_code()); + } JSONObject mstJ = (JSONObject) JSONObject.toJSON(mst); MdPbVehicleMaterVo vehicleMater = item.get(0); mstJ.put("stor_code", vehicleMater.getStor_code()); diff --git a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/stor_manage/io/controller/StIvtIostorinvOutController.java b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/stor_manage/io/controller/StIvtIostorinvOutController.java index 4b7a3137..8b22fee6 100644 --- a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/stor_manage/io/controller/StIvtIostorinvOutController.java +++ b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/stor_manage/io/controller/StIvtIostorinvOutController.java @@ -44,17 +44,20 @@ public class StIvtIostorinvOutController { return new ResponseEntity<>(TableDataInfo.build(result), HttpStatus.OK); } @PostMapping("delete") + @Log("删除出库单") public ResponseEntity delete(@RequestBody List ids) { iStIvtIostorinvService.removeByIds(ids); return new ResponseEntity<>(HttpStatus.OK); } @PostMapping + @Log("创建出库单") public ResponseEntity save(@RequestBody JSONObject form) { iStIvtIostorinvService.save(form); return new ResponseEntity<>(HttpStatus.OK); } @PostMapping("/update") + @Log("更新出库单") public ResponseEntity update(@RequestBody JSONObject form) { iStIvtIostorinvService.update(form); return new ResponseEntity<>(HttpStatus.OK); @@ -72,6 +75,7 @@ public class StIvtIostorinvOutController { * @return */ @PostMapping("/outDecision") + @Log("出库单明细分配") public ResponseEntity outDecision(@RequestBody JSONObject dtl) { String vechicle_codes = iStIvtIostorinvService.outDispense(dtl); return new ResponseEntity<>(vechicle_codes,HttpStatus.OK); @@ -83,6 +87,7 @@ public class StIvtIostorinvOutController { * @return */ @PostMapping("/cancelDecision") + @Log("出库单取消分配") public ResponseEntity cancelDecision(@RequestBody JSONObject dtl) { iStIvtIostorinvService.canceldispense(dtl); return new ResponseEntity<>(HttpStatus.OK); @@ -95,6 +100,7 @@ public class StIvtIostorinvOutController { } @PostMapping("/taskOpen") + @Log("出库单作业下发") public ResponseEntity taskOpen(@RequestBody JSONObject dtl) { iStIvtIostorinvService.taskOpen(dtl); return new ResponseEntity<>(TableDataInfo.build(),HttpStatus.OK); diff --git a/wms_pro/qd/src/views/wms/stor_manage/in/AddDialog.vue b/wms_pro/qd/src/views/wms/stor_manage/in/AddDialog.vue index f2ce88ea..a26e8bea 100644 --- a/wms_pro/qd/src/views/wms/stor_manage/in/AddDialog.vue +++ b/wms_pro/qd/src/views/wms/stor_manage/in/AddDialog.vue @@ -283,8 +283,6 @@ export default { measureunit.getSelect().then(res => { this.unitDict = res.content }) - console.log(this.id) - console.log(2222222) if (this.id !== '' && this.id !== null && this.id !== undefined) { crudProductIn.getIosInvDtl(this.id).then(res => { this.tableData = res @@ -319,6 +317,25 @@ export default { this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO) return false } + for (let i = 0; i < this.tableData.length; i++) { + let itemDtl = this.tableData[i]; + if (!itemDtl.unit_id) { + this.crud.notify('单位不能为空', CRUD.NOTIFICATION_TYPE.INFO) + return false + } + if (!itemDtl.stor_code) { + this.crud.notify('仓库不能为空', CRUD.NOTIFICATION_TYPE.INFO) + return false + } + if (!itemDtl.pcsn) { + this.crud.notify('物料批次不能为空', CRUD.NOTIFICATION_TYPE.INFO) + return false + } + if (!itemDtl.qty) { + this.crud.notify('物料出库数量不能为空', CRUD.NOTIFICATION_TYPE.INFO) + return false + } + } this.form.item = this.tableData }, diff --git a/wms_pro/qd/src/views/wms/stor_manage/out/AddDialog.vue b/wms_pro/qd/src/views/wms/stor_manage/out/AddDialog.vue index a65c40a8..feafa0c2 100644 --- a/wms_pro/qd/src/views/wms/stor_manage/out/AddDialog.vue +++ b/wms_pro/qd/src/views/wms/stor_manage/out/AddDialog.vue @@ -62,6 +62,7 @@ placeholder="车间" class="filter-item" style="width: 120px" + @change="areaChange" > 0) { + this.tableData.forEach(a=>{ + this.$set(a.form_data, 'product_area', val) + }) + } + }, + [CRUD.HOOK.beforeSubmit]() { // 提交前校验 if (this.tableData.length === 0) { @@ -344,6 +354,25 @@ export default { this.crud.notify('车间不能为空', CRUD.NOTIFICATION_TYPE.INFO) return false } + for (let i = 0; i < this.tableData.length; i++) { + let itemDtl = this.tableData[i]; + if (!itemDtl.unit_id) { + this.crud.notify('单位不能为空', CRUD.NOTIFICATION_TYPE.INFO) + return false + } + if (!itemDtl.stor_code) { + this.crud.notify('仓库不能为空', CRUD.NOTIFICATION_TYPE.INFO) + return false + } + if (!itemDtl.pcsn) { + this.crud.notify('物料批次不能为空', CRUD.NOTIFICATION_TYPE.INFO) + return false + } + if (!itemDtl.qty) { + this.crud.notify('物料出库数量不能为空', CRUD.NOTIFICATION_TYPE.INFO) + return false + } + } this.form.item = this.tableData }, @@ -370,6 +399,7 @@ export default { } this.$set(data.form_data,a.value,item) }) + this.$set(data.form_data,'product_area',this.form.form_data.product_area) this.tableData.splice(-1, 0, data) }) }, diff --git a/wms_pro/qd/src/views/wms/stor_manage/warehouse/pick/index.vue b/wms_pro/qd/src/views/wms/stor_manage/warehouse/pick/index.vue index 5560f8a1..fc7ebe85 100644 --- a/wms_pro/qd/src/views/wms/stor_manage/warehouse/pick/index.vue +++ b/wms_pro/qd/src/views/wms/stor_manage/warehouse/pick/index.vue @@ -219,7 +219,7 @@ export default { sort: 'id,desc', crudMethod: {...crudFormData}, optShow: { - add: true, + add: false, reset: true }, query: { @@ -291,14 +291,22 @@ export default { } }, handleSelectionChange(val, row) { - if (val.length === 1) { - this.task_flag = false - this.dis_flag = false - this.currentRow = row - } else { + if (val.length > 1) { this.task_flag = true this.dis_flag = true this.currentRow = null + } else { + this.currentRow = val[0] + if (this.currentRow.status == '10' || this.currentRow.status == '13'){ + this.dis_flag = false + }else { + this.dis_flag = true + } + if (this.currentRow.status == '13'){ + this.task_flag = false + }else { + this.task_flag = true + } } },