From 8fa31da977a7daf76b02bf185dd7230bb743e846 Mon Sep 17 00:00:00 2001 From: zhangsiqi <2825463979@qq.com> Date: Wed, 29 May 2024 19:47:31 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=E9=87=87=E8=B4=AD=E6=A8=A1=E5=9D=97:?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=87=87=E8=B4=AD=E6=8A=A5=E4=BB=B7=E5=8D=95?= =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E4=B8=8B=E6=8B=89=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E8=8E=B7=E5=8F=96,=20=E8=B4=A2=E5=8A=A1=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9=E8=8E=B7=E5=8F=96=E7=89=A9=E6=96=99?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=9A=84=E4=B8=8B=E6=8B=89=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E3=80=82=E4=BF=AE=E6=94=B9=E9=87=87=E8=B4=AD?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E9=A1=B5=E9=9D=A2=E5=AD=97=E6=AE=B5=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=9F=A5=E8=AF=A2=EF=BC=8C=E6=96=B0=E5=A2=9E=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=A0=B9=E6=8D=AE=E9=87=87=E8=B4=AD=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=8F=B7=E6=9F=A5=E8=AF=A2=E7=89=A9=E6=96=99?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=96=B9=E6=B3=95=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/PurchasePlanController.java | 6 ++ .../purchase/mapper/PurchasePlanMapper.java | 2 + .../service/IPurchasePlanService.java | 2 + .../service/impl/PurchasePlanServiceImpl.java | 6 ++ .../mapper/purchase/PurchasePlanMapper.xml | 9 +- .../templates/purchase/purchaseOrder/add.html | 2 +- .../templates/purchase/purchasePlan/add.html | 42 --------- .../purchasePlan/addPurchaseOrder.html | 35 +++++++ .../purchase/purchasePlan/purchasePlan.html | 10 +- .../templates/purchase/purchaseQuote/add.html | 93 +++++++++++++------ 10 files changed, 132 insertions(+), 75 deletions(-) create mode 100644 ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/addPurchaseOrder.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchasePlanController.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchasePlanController.java index cbad3563..901a95b0 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchasePlanController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchasePlanController.java @@ -100,6 +100,12 @@ public class PurchasePlanController extends BaseController mmap.put("purchasePlan", purchasePlan); return prefix + "/edit"; } + @GetMapping("/addPurchaseOrder") + public String purChaseOrder(String planCode,ModelMap mmap){ + List purchasePlanList = purchasePlanService.selectPurchasePlanByPlanCode(planCode); + mmap.put("purchasePlanList", purchasePlanList); + return prefix + "/addPurchaseOrder"; + } @GetMapping("/detail/{purchasePlanId}") public String detail(@PathVariable("purchasePlanId") Long purchasePlanId, ModelMap mmap) { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchasePlanMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchasePlanMapper.java index a333c037..5f4e95e2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchasePlanMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchasePlanMapper.java @@ -75,4 +75,6 @@ public interface PurchasePlanMapper * @return 结果 */ public int restorePurchasePlanById(Long purchasePlanId); + + public List selectPurchasePlanByPlanCode(String[] planCode); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchasePlanService.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchasePlanService.java index 8f518fed..5a354584 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchasePlanService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchasePlanService.java @@ -73,4 +73,6 @@ public interface IPurchasePlanService * @return */ int restorePurchasePlanById(Long purchasePlanId); + + public List selectPurchasePlanByPlanCode(String planCode); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchasePlanServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchasePlanServiceImpl.java index e573f3ad..9f1d29e4 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchasePlanServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchasePlanServiceImpl.java @@ -123,4 +123,10 @@ public class PurchasePlanServiceImpl implements IPurchasePlanService { return purchasePlanMapper.restorePurchasePlanById(purchasePlanId); } + + @Override + public List selectPurchasePlanByPlanCode(String planCodes) { + return purchasePlanMapper.selectPurchasePlanByPlanCode(Convert.toStrArray(planCodes)); + } + } diff --git a/ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanMapper.xml b/ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanMapper.xml index ffe6d06d..29472848 100644 --- a/ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanMapper.xml @@ -47,6 +47,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where purchase_plan_id = #{purchasePlanId} + insert into purchase_plan @@ -122,7 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from purchase_plan where purchase_plan_id in + delete from purchase_plan where purchase_plan_id in #{purchasePlanId} diff --git a/ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/add.html b/ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/add.html index 37907344..238f4ec0 100644 --- a/ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/add.html +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/add.html @@ -37,7 +37,7 @@
- +
diff --git a/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/add.html b/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/add.html index ec8747dd..de0e4ead 100644 --- a/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/add.html +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/add.html @@ -12,14 +12,6 @@
-
- -
- -
-
@@ -59,40 +51,6 @@
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
diff --git a/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/addPurchaseOrder.html b/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/addPurchaseOrder.html new file mode 100644 index 00000000..d71b9189 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/addPurchaseOrder.html @@ -0,0 +1,35 @@ + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/purchasePlan.html b/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/purchasePlan.html index fe00df57..5bbf0d02 100644 --- a/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/purchasePlan.html +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/purchasePlan.html @@ -52,8 +52,8 @@
@@ -99,10 +99,10 @@ columns: [ {checkbox: true}, {title: '采购计划索引id',field: 'purchasePlanId',visible: false}, - {title: '采购计划单号',field: 'purchasePlanCode'}, {title: '采购计划状态',field: 'purchasePlanStatus', formatter: function(value, row, index) {return $.table.selectDictLabel(purchasePlanStatusDatas, value);} }, + {title: '采购计划单号',field: 'purchasePlanCode'}, {title: '关联单号', field: 'correlationCode',}, {title: '采购来源',field: 'purchasePlanType',}, {title: '物料合计',field: 'materialAmount',}, @@ -159,7 +159,9 @@ ] }); }; - + function addPurchaseOrder(){ + $.modal.open("新增采购订单", prefix + "/addPurchaseOrder"); + } \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/add.html b/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/add.html index d050020e..1470e76e 100644 --- a/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/add.html +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/add.html @@ -2,9 +2,9 @@ - + @@ -16,17 +16,19 @@
-
- +
+
- +
- +
- +
@@ -94,9 +96,9 @@
- +