From 642be697261821ba8b11043fd32601b0b9e964b8 Mon Sep 17 00:00:00 2001 From: zhangsiqi <2825463979@qq.com> Date: Tue, 2 Jul 2024 19:07:26 +0800 Subject: [PATCH] =?UTF-8?q?feat]=20=E9=87=87=E8=B4=AD=E6=8A=A5=E4=BB=B7?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=87=87=E8=B4=AD=E6=8A=A5=E4=BB=B7=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=A1=B5=E9=9D=A2=EF=BC=8C=E4=BE=9B=E5=BA=94=E5=95=86?= =?UTF-8?q?=E7=89=A9=E6=96=99=E4=BB=B7=E6=A0=BC=E6=8A=A5=E4=BB=B7=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=8F=AF=E7=BC=96=E8=BE=91=E3=80=82=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=90=8E=E7=9B=B4=E6=8E=A5=E9=80=9A=E8=BF=87=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/purchase/controller/PurchaseQuoteController.java | 4 ++++ .../purchase/service/impl/PurchaseQuoteServiceImpl.java | 7 ++++++- .../resources/templates/purchase/purchaseQuote/add.html | 6 +++--- .../resources/templates/purchase/purchaseQuote/edit.html | 2 +- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteController.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteController.java index 0accde92..835c74a6 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteController.java @@ -84,6 +84,8 @@ public class PurchaseQuoteController extends BaseController @ResponseBody public AjaxResult addSave(@RequestBody PurchaseQuote purchaseQuote) { + purchaseQuote.setAuditStatus("1"); + purchaseQuote.setUseStatus("1"); purchaseQuoteService.insertPurchaseQuote(purchaseQuote); return AjaxResult.success(); } @@ -108,6 +110,8 @@ public class PurchaseQuoteController extends BaseController @ResponseBody public AjaxResult editSave(@RequestBody PurchaseQuote purchaseQuote) { + purchaseQuote.setAuditStatus("1"); + purchaseQuote.setUseStatus("1"); purchaseQuoteService.updatePurchaseQuote(purchaseQuote); return AjaxResult.success(); } 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 78ffd5fa..1e34c359 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 @@ -102,7 +102,8 @@ public class PurchaseQuoteServiceImpl implements IPurchaseQuoteService String loginName = ShiroUtils.getLoginName(); purchaseQuote.setCreateBy(loginName); purchaseQuote.setCreateTime(DateUtils.getNowDate()); - int result = purchaseQuoteMapper.insertPurchaseQuote(purchaseQuote); + //采购员 + purchaseQuote.setPurchaseBuyer(loginName); Long id = purchaseQuote.getPurchaseQuoteId(); String fileIdStr = purchaseQuote.getFileIdStr(); if(StringUtils.isNotBlank(fileIdStr)){ @@ -129,9 +130,12 @@ public class PurchaseQuoteServiceImpl implements IPurchaseQuoteService child.setSupplierName(purchaseQuote.getSupplierName()); child.setCreateTime(DateUtils.getNowDate()); child.setTaxRate(purchaseQuote.getTaxRate()); + child.setDelFlag("0"); purchaseQuoteChildService.insertPurchaseQuoteChild(child); } } + purchaseQuote.setMaterialAmount(String.valueOf(childResult)); + int result = purchaseQuoteMapper.insertPurchaseQuote(purchaseQuote); return result; } @@ -180,6 +184,7 @@ public class PurchaseQuoteServiceImpl implements IPurchaseQuoteService child.setSupplierCode(purchaseQuote.getSupplierQuoteCode()); child.setSupplierName(purchaseQuote.getSupplierName()); child.setCreateBy(loginName); + child.setDelFlag("0"); child.setCreateTime(DateUtils.getNowDate()); child.setTaxRate(purchaseQuote.getTaxRate()); purchaseQuoteChildService.insertPurchaseQuoteChild(child); 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 4dffe6a5..9ab0ced3 100644 --- a/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/add.html +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/add.html @@ -158,9 +158,9 @@ } }, {title: '最新报价',field: 'materialSole',align: 'center',}, - {title: '物料的数量', field: 'materialNum',align: 'center',editable: true}, - {title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',}, - {title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center',}, + {title: '物料的数量', field: 'materialNum',align: 'center',editable: true,visible: false}, + {title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',editable: true}, + {title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center',editable: true}, {title: '录入人',field: 'createBy',align: 'center',visible: false}, {title: '录入时间',field: 'createTime',align: 'center',visible: false }, {title: '更新人',field: 'updateBy',align: 'center',visible: false}, 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 d3b00715..85b9b421 100644 --- a/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/edit.html +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/edit.html @@ -210,7 +210,7 @@ } }, {title:'最新报价',field: 'materialSole',align: 'center',}, - {title: '物料的数量', field: 'materialNum',align: 'center',editable: true,}, + {title: '物料的数量', field: 'materialNum',align: 'center',editable: true,visible: false}, {title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',editable: true,}, {title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center',editable: true,}, {title: '录入人',field: 'createBy',align: 'center',visible: false},