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 fe293a93..4ba47ae1 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 @@ -121,6 +121,9 @@ public class PurchasePlanController extends BaseController List purchasePlanList = purchasePlanService.selectPurchasePlanByPlanCode(purchasePlanCode); //根据采购计划编号查询对应的采购报价数据 List purchasePlanChildList = purchasePlanChildService.getPurchasePlanChildByPlanCodes(purchasePlanCode); + for(PurchasePlanChild purchasePlanChild : purchasePlanChildList){ + List purchaseQuoteChildList = purchasePlanChild.getPurchaseQuoteChildList(); + } //再根据采购计划编号分组查询对应的采购报价数据分组 purchasePlanCodes = purchasePlanCodes.replace("[","").replace("]",""); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java index 7aac7fd9..78ffd5fa 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java @@ -125,7 +125,7 @@ public class PurchaseQuoteServiceImpl implements IPurchaseQuoteService for(PurchaseQuoteChild child : purchaseQuote.getPurchaseQuoteChildList()){ child.setPurchaseQuoteCode(purchaseQuote.getPurchaseQuoteCode()); child.setCreateBy(loginName); - child.setSupplierCode(purchaseQuote.getPurchaseQuoteCode()); + child.setSupplierCode(purchaseQuote.getSupplierQuoteCode()); child.setSupplierName(purchaseQuote.getSupplierName()); child.setCreateTime(DateUtils.getNowDate()); child.setTaxRate(purchaseQuote.getTaxRate()); @@ -177,7 +177,7 @@ public class PurchaseQuoteServiceImpl implements IPurchaseQuoteService if(childResult > 0){ for(PurchaseQuoteChild child : purchaseQuote.getPurchaseQuoteChildList()){ child.setPurchaseQuoteCode(purchaseQuote.getPurchaseQuoteCode()); - child.setSupplierCode(purchaseQuote.getPurchaseQuoteCode()); + child.setSupplierCode(purchaseQuote.getSupplierQuoteCode()); child.setSupplierName(purchaseQuote.getSupplierName()); child.setCreateBy(loginName); child.setCreateTime(DateUtils.getNowDate()); diff --git a/ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanChildMapper.xml b/ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanChildMapper.xml index 20916f8c..29c4e5cc 100644 --- a/ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanChildMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanChildMapper.xml @@ -29,16 +29,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - - - - - - - - - select purchase_plan_child_id, purchase_plan_code, material_id, material_code, material_name, material_type, process_method, brand, @@ -174,20 +164,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" diff --git a/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/addPurchaseOrder.html b/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/addPurchaseOrder.html index 4f6c8e46..ba410a1a 100644 --- a/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/addPurchaseOrder.html +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/addPurchaseOrder.html @@ -93,8 +93,22 @@ ''+ '' ); + foreach(material.supplierList, function(supplier, index) { + var $supplier = $('
'); + $supplier.append(''); + var headerContent = + '' + var $header = $('
' + headerContent + '
'); + var $inputsWrapper = $('
'); // 用于存放输入框等表单元素 + $('#supplierCode' + tableId).append($inputsWrapper.append($header)); + }) + var $supplier = $('
'); + $tableWrapper.append($table); var $formGroup = $('
'); - var supplierName = + var supplierSum = '
' + '' + '
' + diff --git a/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/edit.html b/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/edit.html index 73fd9c42..d3b00715 100644 --- a/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/edit.html +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/edit.html @@ -176,6 +176,7 @@ sortName: params.sort, sortOrder: params.order, purchaseQuoteCode: purchaseQuote.purchaseQuoteCode, + delFlag: 0 } return temp; },