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 @@
- +