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},