Browse Source

[feat] 销售管理

修改销售估价列表页面:新增添加经营成本模板权限注解
修改添加经营成本模板前端页面:所有字段加上非空校验,都设置为必填选项
新增销售估价 修改保存销售估价经营成本模板后端接口
dev
liuxiaoxu 4 months ago
parent
commit
9b4c3444bb
  1. 14
      ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SalesEstimateController.java
  2. 68
      ruoyi-admin/src/main/resources/templates/sales/estimate/addOperatingCostTemplate.html
  3. 2
      ruoyi-admin/src/main/resources/templates/sales/estimate/estimate.html

14
ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SalesEstimateController.java

@ -173,6 +173,20 @@ public class SalesEstimateController extends BaseController
}
/**
* 修改保存销售估价经营成本模板
*/
@RequiresPermissions("sales:estimate:addOperatingCostTemplate")
@Log(title = "销售估价", businessType = BusinessType.UPDATE)
@ResponseBody
@PostMapping("/editOperatingCostTemplate")
public AjaxResult editOperatingCostTemplate(SalesEstimateTemplate salesEstimateTemplate)
{
return toAjax(estimateTemplateService.updateSalesEstimateTemplate(salesEstimateTemplate));
}
/**
* 删除销售估价
*/

68
ruoyi-admin/src/main/resources/templates/sales/estimate/addOperatingCostTemplate.html

@ -37,28 +37,28 @@
<br>
</div>
<div class="form-group">
<label class="col-sm-5 control-label">不含税人工成本:</label>
<div class="col-sm-7">
<input name="noTaxLaborCosts" th:field="*{noTaxLaborCosts}" class="form-control" type="text">
<label class="col-sm-7 control-label is-required">不含税人工成本(RMB)</label>
<div class="col-sm-5">
<input name="noTaxLaborCosts" th:field="*{noTaxLaborCosts}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-5 control-label">不含税推广成本:</label>
<div class="col-sm-7">
<input name="noTaxPromotionalCosts" th:field="*{noTaxPromotionalCosts}" class="form-control" type="text">
<label class="col-sm-7 control-label is-required">不含税推广成本(RMB)</label>
<div class="col-sm-5">
<input name="noTaxPromotionalCosts" th:field="*{noTaxPromotionalCosts}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-5 control-label">不含税业务成本:</label>
<div class="col-sm-7">
<input name="noTaxBusinessCosts" th:field="*{noTaxBusinessCosts}" class="form-control" type="text">
<label class="col-sm-7 control-label is-required">不含税业务成本(RMB)</label>
<div class="col-sm-5">
<input name="noTaxBusinessCosts" th:field="*{noTaxBusinessCosts}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-5 control-label">不含税管理成本:</label>
<div class="col-sm-7">
<input name="noTaxManagesCosts" th:field="*{noTaxManagesCosts}" class="form-control" type="text">
<label class="col-sm-7 control-label is-required">不含税管理成本(RMB)</label>
<div class="col-sm-5">
<input name="noTaxManagesCosts" th:field="*{noTaxManagesCosts}" class="form-control" type="text" required>
</div>
</div>
@ -71,9 +71,9 @@
<br>
</div>
<div class="form-group">
<label class="col-sm-5 control-label">不含税总物料成本:</label>
<div class="col-sm-7">
<input name="noTaxMaterialCosts" th:field="*{noTaxMaterialCosts}" class="form-control" type="text">
<label class="col-sm-7 control-label is-required">不含税总物料成本(RMB)</label>
<div class="col-sm-5">
<input name="noTaxMaterialCosts" th:field="*{noTaxMaterialCosts}" class="form-control" type="text" required>
</div>
</div>
@ -86,55 +86,55 @@
</div>
<div class="container">
<div class="form-group">
<label class="col-sm-4 control-label">A挡利润率:</label>
<div class="col-sm-7">
<label class="col-sm-7 control-label is-required">A挡利润率:</label>
<div class="col-sm-5">
<div class="input-group">
<input name="aProfitRate" th:field="*{aProfitRate}" class="form-control" type="text">
<input name="aProfitRate" th:field="*{aProfitRate}" class="form-control" type="text" required>
<span class="input-group-addon">%</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">B挡利润率:</label>
<div class="col-sm-7">
<label class="col-sm-7 control-label is-required">B挡利润率:</label>
<div class="col-sm-5">
<div class="input-group">
<input name="bProfitRate" th:field="*{bProfitRate}" class="form-control" type="text">
<input name="bProfitRate" th:field="*{bProfitRate}" class="form-control" type="text" required>
<span class="input-group-addon">%</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">C挡利润率:</label>
<div class="col-sm-7">
<label class="col-sm-7 control-label is-required">C挡利润率:</label>
<div class="col-sm-5">
<div class="input-group">
<input name="cProfitRate" th:field="*{cProfitRate}" class="form-control" type="text">
<input name="cProfitRate" th:field="*{cProfitRate}" class="form-control" type="text" required>
<span class="input-group-addon">%</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">D挡利润率:</label>
<div class="col-sm-7">
<label class="col-sm-7 control-label is-required">D挡利润率:</label>
<div class="col-sm-5">
<div class="input-group">
<input name="dProfitRate" th:field="*{dProfitRate}" class="form-control" type="text">
<input name="dProfitRate" th:field="*{dProfitRate}" class="form-control" type="text" required>
<span class="input-group-addon">%</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">E挡利润率:</label>
<div class="col-sm-7">
<label class="col-sm-7 control-label is-required">E挡利润率:</label>
<div class="col-sm-5">
<div class="input-group">
<input name="eProfitRate" th:field="*{eProfitRate}" class="form-control" type="text">
<input name="eProfitRate" th:field="*{eProfitRate}" class="form-control" type="text" required>
<span class="input-group-addon">%</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">F挡利润率:</label>
<div class="col-sm-7">
<label class="col-sm-7 control-label is-required">F挡利润率:</label>
<div class="col-sm-5">
<div class="input-group">
<input name="fProfitRate" th:field="*{fProfitRate}" class="form-control" type="text">
<input name="fProfitRate" th:field="*{fProfitRate}" class="form-control" type="text" required>
<span class="input-group-addon">%</span>
</div>
</div>
@ -151,7 +151,7 @@
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-template-edit').serialize());
$.operate.save(prefix + "/editOperatingCostTemplate", $('#form-template-edit').serialize());
}
}
</script>

2
ruoyi-admin/src/main/resources/templates/sales/estimate/estimate.html

@ -52,7 +52,7 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="sales:estimate:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-success" onclick="addTemplate()" shiro:hasPermission="sales:estimate:addTemplate">
<a class="btn btn-success" onclick="addTemplate()" shiro:hasPermission="sales:estimate:addOperatingCostTemplate">
<i class="fa fa-plus"></i> 经营成本模板
</a>
</div>

Loading…
Cancel
Save