Browse Source

[feat]修改:修改销售订单信息,销售物料子表信息,新增业务人员名称,在查询是根据业务人员字段查询系统用户信息,获取对象的用户名称

dev
zhangsiqi 3 months ago
parent
commit
11a9aefad7
  1. 8
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysCustomer.java
  2. 11
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrder.java
  3. 4
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java
  4. 1
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesOrderServiceImpl.java
  5. 8
      ruoyi-admin/src/main/resources/templates/system/customer/edit.html
  6. 4
      ruoyi-admin/src/main/resources/templates/system/customer/taskModifyApply.html

8
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysCustomer.java

@ -147,6 +147,8 @@ public class SysCustomer extends BaseEntity
/** 业务员 */
@Excel(name = "业务员")
private String businessMembers;
/*业务人员名称*/
private String businessMembersName;
/** 确认人 */
@Excel(name = "确认人")
private String identifyingPeople;
@ -241,7 +243,13 @@ public class SysCustomer extends BaseEntity
this.customerSign = customerSign;
}
public String getBusinessMembersName() {
return businessMembersName;
}
public void setBusinessMembersName(String businessMembersName) {
this.businessMembersName = businessMembersName;
}
public String getAuditStatus() {
return auditStatus;

11
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrder.java

@ -150,6 +150,8 @@ public class SysSalesOrder extends BaseEntity {
/*业务人员*/
@Excel(name = "业务人员")
private String businessMembers;
/*业务人员名称*/
private String businessMembersName;
/*是否含税*/
@Excel(name = "是否含税")
private String confirmTax;
@ -214,6 +216,15 @@ public class SysSalesOrder extends BaseEntity {
private String customerDeliveryBillto;
/*客户收货人电话(Bill to)*/
private String deliveryPhoneBillto;
public String getBusinessMembersName() {
return businessMembersName;
}
public void setBusinessMembersName(String businessMembersName) {
this.businessMembersName = businessMembersName;
}
public Long getSalesOrderId() {
return salesOrderId;
}

4
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java

@ -108,6 +108,10 @@ public class SysCustomerServiceImpl implements ISysCustomerService
if (sysUser2!=null){
sysCustomerVo.setApplyUserName(sysUser2.getUserName());
}
SysUser sysUser3 = userMapper.selectUserByLoginName(sysCustomerVo.getBusinessMembers());
if (sysUser3!=null){
sysCustomerVo.setBusinessMembersName(sysUser3.getUserName());
}
String instanceId = sysCustomerVo.getInstanceId();
// 当前环节
if (StringUtils.isNotBlank(instanceId)) {

1
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesOrderServiceImpl.java

@ -160,6 +160,7 @@ public class SysSalesOrderServiceImpl implements ISysSalesOrderService
if (sysUser2!=null){
sysSalesOrderVo.setApplyUserName(sysUser2.getUserName());
}
String instanceId = sysSalesOrderVo.getInstanceId();
// 当前环节
if (StringUtils.isNotBlank(instanceId)) {

8
ruoyi-admin/src/main/resources/templates/system/customer/edit.html

@ -233,7 +233,7 @@
<div class="form-group">
<label class="col-sm-6 control-label">业务员:</label>
<div class="col-sm-6">
<select name="businessMembers" th:field="*{businessMembers}" class="form-control"
<select id="edit_businessMembers" name="businessMembers" class="form-control"
shiro:haspermission="customer:selectBusinessMembers"></select>
</div>
</div>
@ -336,11 +336,11 @@
console.log(res)
if (res.rows.length > 0) {
var usertData = res.rows;
var select = $("#edit_businessMembers");
for (let i in usertData) {
$("select[name='businessMembers']").append("<option value='"
+ usertData[i].userName + "'>" + usertData[i].userName + "</option>");
select.append("<option value='" + usertData[i].loginName + "'>" + usertData[i].userName + "</option>");
}
$("select[name='businessMembers']").val(customer.businessMembers);
select.val(customer.businessMembers).trigger("change");
} else {
$.modal.msgError(res.msg);
}

4
ruoyi-admin/src/main/resources/templates/system/customer/taskModifyApply.html

@ -258,7 +258,7 @@
<div class="form-group">
<label class="col-sm-6 control-label">业务员:</label>
<div class="col-sm-6">
<select name="businessMembers" th:field="*{businessMembers}" class="form-control"
<select name="businessMembers" class="form-control"
shiro:haspermission="customer:selectBusinessMembers"></select>
</div>
</div>
@ -324,7 +324,7 @@
$("select[name='businessMembers']").append("<option value='"
+ usertData[i].loginName + "'>" + usertData[i].userName + "</option>");
}
$("select[name='businessMembers']").val(customer.businessMembers);
$("select[name='businessMembers']").val(customer.businessMembers).trigger("change");
} else {
$.modal.msgError(res.msg);
}

Loading…
Cancel
Save