Browse Source

feat] 采购报价修复采购报价添加页面,供应商物料价格报价修改为可编辑。添加后直接通过审核。

dev
zhangsiqi 5 months ago
parent
commit
642be69726
  1. 4
      ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteController.java
  2. 7
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java
  3. 6
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/add.html
  4. 2
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/edit.html

4
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();
}

7
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);

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

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

Loading…
Cancel
Save