From 77f01e81da1d562f90d391d2115cc509920fbabc Mon Sep 17 00:00:00 2001 From: Gitea Date: Sat, 7 Jan 2023 11:10:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=AE=A1=E7=90=86=E6=89=80?= =?UTF-8?q?=E6=9C=89=E6=A8=A1=E5=9D=97=E4=BB=A5=E5=8F=8A=E5=95=86=E5=93=81?= =?UTF-8?q?=E7=AE=A1=E7=90=86BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../goodsaccessories/GoodsAccessoriesList.vue | 27 +- .../modules/GoodsAccessoriesForm.vue | 249 ++++++++++----- .../modules/GoodsAccessoriesModal.vue | 31 +- .../src/views/goodsfabric/GoodsFabricList.vue | 27 +- .../goodsfabric/modules/GoodsFabricForm.vue | 301 +++++++++++++----- .../goodsfabric/modules/GoodsFabricModal.vue | 31 +- .../src/views/zyorders/ZyOrdersList.vue | 19 ++ .../GoodsAccessoriesController.java | 15 +- .../controller/GoodsFabricController.java | 15 +- .../controller/ZyOrdersController.java | 30 +- 10 files changed, 518 insertions(+), 227 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/goodsaccessories/GoodsAccessoriesList.vue b/ant-design-vue-jeecg/src/views/goodsaccessories/GoodsAccessoriesList.vue index c6817e6c..c856a740 100644 --- a/ant-design-vue-jeecg/src/views/goodsaccessories/GoodsAccessoriesList.vue +++ b/ant-design-vue-jeecg/src/views/goodsaccessories/GoodsAccessoriesList.vue @@ -81,28 +81,18 @@ - 编辑 - + + + 删除 + - - + @@ -197,6 +187,9 @@ } }); }, + valueChange(value) { + if (value) this.loadData() + }, initDictConfig(){ }, getSuperFieldList(){ diff --git a/ant-design-vue-jeecg/src/views/goodsaccessories/modules/GoodsAccessoriesForm.vue b/ant-design-vue-jeecg/src/views/goodsaccessories/modules/GoodsAccessoriesForm.vue index 148ff6df..de289f27 100644 --- a/ant-design-vue-jeecg/src/views/goodsaccessories/modules/GoodsAccessoriesForm.vue +++ b/ant-design-vue-jeecg/src/views/goodsaccessories/modules/GoodsAccessoriesForm.vue @@ -1,115 +1,188 @@ \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/goodsfabric/GoodsFabricList.vue b/ant-design-vue-jeecg/src/views/goodsfabric/GoodsFabricList.vue index 33991483..f5cb3666 100644 --- a/ant-design-vue-jeecg/src/views/goodsfabric/GoodsFabricList.vue +++ b/ant-design-vue-jeecg/src/views/goodsfabric/GoodsFabricList.vue @@ -81,28 +81,18 @@ - 编辑 - + + + 删除 + - - + @@ -199,6 +189,9 @@ }, initDictConfig(){ }, + valueChange(value) { + if (value) this.loadData() + }, getSuperFieldList(){ let fieldList=[]; fieldList.push({type:'string',value:'goodsId',text:'商品',dictCode:'zy_goods,goods_name,id'}) diff --git a/ant-design-vue-jeecg/src/views/goodsfabric/modules/GoodsFabricForm.vue b/ant-design-vue-jeecg/src/views/goodsfabric/modules/GoodsFabricForm.vue index 1ffa010a..878b510d 100644 --- a/ant-design-vue-jeecg/src/views/goodsfabric/modules/GoodsFabricForm.vue +++ b/ant-design-vue-jeecg/src/views/goodsfabric/modules/GoodsFabricForm.vue @@ -1,116 +1,243 @@ \ No newline at end of file + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/goodsfabric/modules/GoodsFabricModal.vue b/ant-design-vue-jeecg/src/views/goodsfabric/modules/GoodsFabricModal.vue index e839f0b3..f1ed1ea1 100644 --- a/ant-design-vue-jeecg/src/views/goodsfabric/modules/GoodsFabricModal.vue +++ b/ant-design-vue-jeecg/src/views/goodsfabric/modules/GoodsFabricModal.vue @@ -8,13 +8,14 @@ :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" @cancel="handleCancel" cancelText="关闭"> - + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/zyorders/ZyOrdersList.vue b/ant-design-vue-jeecg/src/views/zyorders/ZyOrdersList.vue index 40d3efa2..a47256a5 100644 --- a/ant-design-vue-jeecg/src/views/zyorders/ZyOrdersList.vue +++ b/ant-design-vue-jeecg/src/views/zyorders/ZyOrdersList.vue @@ -139,6 +139,8 @@ 拆单 + 生产 + 编辑 详情 @@ -374,6 +376,7 @@ exportXlsUrl: "/zyorders/zyOrders/exportXls", importExcelUrl: "zyorders/zyOrders/importExcel", chaidan:"/zyorders/zyOrders/chaidan", + shengchan:"zyorders/zyOrders/shengchan", }, dictOptions:{}, @@ -405,6 +408,22 @@ this.$message.warning("该订单为子单,不可进行拆单!"); } }, + shengchan(record){ + console.log(record) + if(record.goodsQuantity===1&&record.deliveryStatus===1){ + getAction(this.url.shengchan,{id:record.id}).then((res) => { + if (res.success) { + this.$message.success("生产成功!"); + this.loadData(); + }else{ + this.$message.error(res.message); + } + }) + }else{ + this.$message.warning("该订单不可生产!"); + } + + }, getPcaText(code){ return this.pcaData.getText(code); }, diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/goodsaccessories/controller/GoodsAccessoriesController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/goodsaccessories/controller/GoodsAccessoriesController.java index 75b400f5..3fe266ad 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/goodsaccessories/controller/GoodsAccessoriesController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/goodsaccessories/controller/GoodsAccessoriesController.java @@ -82,8 +82,19 @@ public class GoodsAccessoriesController extends JeecgController add(@RequestBody GoodsAccessories goodsAccessories) { - goodsAccessoriesService.save(goodsAccessories); + public Result add(@RequestBody GoodsAccessories goodsAccessories,HttpServletRequest req) { + String[] split = goodsAccessories.getAccessoriesId().split(","); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(goodsAccessories, req.getParameterMap()); + queryWrapper.eq("goods_id",goodsAccessories.getGoodsId()); + for (String s : split) { + goodsAccessories.setAccessoriesId(s); + goodsAccessories.setId(null); + queryWrapper.eq("accessories_id", goodsAccessories.getAccessoriesId()); + int a = goodsAccessoriesService.count(queryWrapper); + if (a >= 1) + return Result.error("存在已添加过的数据!"); + goodsAccessoriesService.save(goodsAccessories); + } return Result.OK("添加成功!"); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/goodsfabric/controller/GoodsFabricController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/goodsfabric/controller/GoodsFabricController.java index ccdd9de1..385a140a 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/goodsfabric/controller/GoodsFabricController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/goodsfabric/controller/GoodsFabricController.java @@ -82,8 +82,19 @@ public class GoodsFabricController extends JeecgController add(@RequestBody GoodsFabric goodsFabric) { - goodsFabricService.save(goodsFabric); + public Result add(@RequestBody GoodsFabric goodsFabric,HttpServletRequest req) { + String[] split = goodsFabric.getFabricId().split(","); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(goodsFabric, req.getParameterMap()); + queryWrapper.eq("goods_id",goodsFabric.getGoodsId()); + for (String s : split) { + goodsFabric.setFabricId(s); + goodsFabric.setId(null); + queryWrapper.eq("fabric_id", goodsFabric.getFabricId()); + int a = goodsFabricService.count(queryWrapper); + if (a >= 1) + return Result.error("存在已添加过的数据!"); + goodsFabricService.save(goodsFabric); + } return Result.OK("添加成功!"); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/controller/ZyOrdersController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/controller/ZyOrdersController.java index 58349ca7..ebb6cc66 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/controller/ZyOrdersController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/controller/ZyOrdersController.java @@ -133,21 +133,39 @@ public class ZyOrdersController extends JeecgController queryById(@RequestParam(name="id",required=true) String id) { + @AutoLog(value = "生产") + @ApiOperation(value="生产", notes="生产") + @GetMapping(value = "/shengchan") + public Result shengchan(@RequestParam(name="id",required=true) String id) { ZyOrders zyOrders = zyOrdersService.getById(id); if(zyOrders==null) { return Result.error("未找到对应数据"); } - return Result.OK(zyOrders); + zyOrders.setDeliveryStatus(2); + zyOrdersService.updateById(zyOrders); + return Result.OK("成功"); } + /** + * 通过id查询 + * + * @param id + * @return + */ + @AutoLog(value = "订单基本信息管理-通过id查询") + @ApiOperation(value="订单基本信息管理-通过id查询", notes="订单基本信息管理-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + ZyOrders zyOrders = zyOrdersService.getById(id); + if(zyOrders==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(zyOrders); + } /** * 生成订单编号 *