Browse Source

[fix] 销售管理

按照万材调整:客户报价编号去掉从前端生成,解决无论是否添加都会浪费一个编号的问题,改为从后端生成客户报价编号
修复前端备注不能添加问题,修复客户报价详情和修改页面备注没有值的问题
dev
liuxiaoxu 5 days ago
parent
commit
e1d19b270e
  1. 6
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteServiceImpl.java
  2. 50
      ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html
  3. 2
      ruoyi-admin/src/main/resources/templates/system/customerQuote/detail.html
  4. 2
      ruoyi-admin/src/main/resources/templates/system/customerQuote/edit.html

6
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteServiceImpl.java

@ -190,6 +190,10 @@ public class SysCustomerQuoteServiceImpl implements ISysCustomerQuoteService {
sysCustomerQuote.setCreateBy(loginName);
sysCustomerQuote.setCreateTime(DateUtils.getNowDate());
String commonCurrency = sysCustomerQuote.getCommonCurrency();
//后台获取客户报价编号
String quoteCode = redisCache.generateBillNo("KHBJ");
sysCustomerQuote.setSupplierCode(quoteCode);
if (RMB.equals(commonCurrency)){
sysCustomerQuote.setConfirmTax("1");
}else {
@ -202,7 +206,7 @@ public class SysCustomerQuoteServiceImpl implements ISysCustomerQuoteService {
return result;
}
for (SysCustomerQuoteChild sysCustomerQuoteChild : sysCustomerQuoteChildList) {
sysCustomerQuoteChild.setQuoteId(sysCustomerQuote.getSupplierCode());
sysCustomerQuoteChild.setQuoteId(quoteCode);
sysCustomerQuoteChild.setCreateTime(new Date());
sysCustomerQuoteChild.setCreateBy(loginName);
sysCustomerQuoteChildMapper.insertSysCustomerQuoteChild(sysCustomerQuoteChild);

50
ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html

@ -11,12 +11,12 @@
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-customerQuote-add">
<div class="form-group">
<label class="col-sm-4 control-label">客户报价编号:</label>
<div class="col-sm-8">
<input name="supplierCode" class="form-control" type="text" readonly>
</div>
</div>
<!-- <div class="form-group">-->
<!-- <label class="col-sm-4 control-label">客户报价编号:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <input name="supplierCode" class="form-control" type="text" readonly>-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group" shiro:hasPermission="system:customerQuote:edit">
<label class="col-sm-4 control-label">业务员:</label>
<div class="col-sm-8">
@ -113,7 +113,7 @@
<div class="form-group">
<label class="col-sm-4 control-label">备注说明:</label>
<div class="col-sm-8">
<textarea name="remark" class="form-control" readonly></textarea>
<textarea name="remark" class="form-control"></textarea>
</div>
</div>
@ -607,24 +607,24 @@
}
});
});
function getCustomerCode(){
//获取单号
$.ajax({
url: prefix + "/getId",
type: "post",
dateType: "json",
success: function (resp) {
if (resp.code === 0) {
$("input[name='supplierCode']").val(resp.data);
} else {
$.modal.msgError("失败啦");
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
});
}
// function getCustomerCode(){
// //获取单号
// $.ajax({
// url: prefix + "/getId",
// type: "post",
// dateType: "json",
// success: function (resp) {
// if (resp.code === 0) {
// $("input[name='supplierCode']").val(resp.data);
// } else {
// $.modal.msgError("失败啦");
// }
// },
// error: function () {
// $.modal.msgError("后台出错啦!");
// }
// });
// }
function getBusinessMembers(){
/*业务员列表*/
$.ajax({

2
ruoyi-admin/src/main/resources/templates/system/customerQuote/detail.html

@ -89,7 +89,7 @@
<div class="form-group">
<label class="col-sm-4 control-label">备注说明:</label>
<div class="col-sm-8">
<textarea readonly name="remark" th:field="*{remark}" class="form-control"></textarea>
<textarea readonly name="remark" th:text="*{remark}" class="form-control"></textarea>
</div>
</div>
<div class="container" style="display: none;">

2
ruoyi-admin/src/main/resources/templates/system/customerQuote/edit.html

@ -89,7 +89,7 @@
<div class="form-group">
<label class="col-sm-4 control-label">备注说明:</label>
<div class="col-sm-8">
<textarea readonly name="remark" th:field="*{remark}" class="form-control"></textarea>
<textarea readonly name="remark" th:text="*{remark}" class="form-control"></textarea>
</div>
</div>
<div class="container" style="display: none;">

Loading…
Cancel
Save