Browse Source

[update:]客户表操作记录,修改。

erp、
zhangsiqi 10 months ago
parent
commit
52c82ea3c6
  1. 117
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java
  2. 16
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysCustomer.java
  3. 74
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysCustomerOper.java
  4. 9
      ruoyi-admin/src/main/resources/application-druid.yml
  5. 6
      ruoyi-admin/src/main/resources/mapper/system/SysCustomerMapper.xml
  6. 53
      ruoyi-admin/src/main/resources/mapper/system/SysCustomerOperMapper.xml
  7. 41
      ruoyi-admin/src/main/resources/templates/system/customer/add.html
  8. 157
      ruoyi-admin/src/main/resources/templates/system/customer/customer.html
  9. BIN
      ruoyi-framework/target/classes/com/ruoyi/framework/web/service/DictService.class
  10. BIN
      ruoyi-generator/target/classes/com/ruoyi/generator/controller/GenController.class

117
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java

@ -5,51 +5,33 @@ import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.util.MapUtils;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONException;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.flow.domain.BizRequestItem;
import com.ruoyi.flow.service.FlowService;
import com.ruoyi.framework.shiro.realm.UserRealm;
import com.ruoyi.remind.domain.Remind;
import com.ruoyi.remind.mapper.RemindMapper;
import com.ruoyi.remind.service.RemindService;
import com.ruoyi.system.domain.SysCustomer;
import com.ruoyi.system.domain.SysCustomerOper;
import com.ruoyi.system.domain.exportDto.SysCustomerDto;
import com.ruoyi.system.mapper.SysCustomerMapper;
import com.ruoyi.system.mapper.SysCustomerOperMapper;
import com.ruoyi.system.mapper.SysDeptMapper;
import com.ruoyi.system.service.ISysCustomerOperService;
import com.ruoyi.system.service.ISysCustomerService;
import com.ruoyi.system.service.ISysDictTypeService;
import org.activiti.engine.IdentityService;
import org.activiti.engine.TaskService;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.omg.PortableInterceptor.INACTIVE;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mapping.IdentifierAccessor;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.net.URLEncoder;
import java.util.*;
import java.util.List;
import java.util.Map;
/**
* 客户基本信息Controller
@ -68,9 +50,9 @@ public class SysCustomerController extends BaseController
@Autowired
private ISysDictTypeService sysDictTypeService;
@Autowired
private RemindMapper remindMapper;
private RemindService remindService;
@Autowired
private SysCustomerOperMapper sysCustomerOperMapper;
private ISysCustomerOperService sysCustomerOperService;
@RequiresPermissions("system:customer:view")
@GetMapping()
@ -142,17 +124,17 @@ public class SysCustomerController extends BaseController
int ok = sysCustomerService.updateSysCustomer(sysCustomer);
//添加操作记录
SysCustomerOper sysCustomerOper = new SysCustomerOper();
sysCustomerOper.setSysCustomerPuser(sysCustomer.getCustomerPurser());
sysCustomerOper.setSysCustomerEnterPriseName(sysCustomer.getEnterpriseName());
sysCustomerOper.setPurser(sysCustomer.getCustomerPurser());
sysCustomerOper.setEnterpriseCode(sysCustomerOper.getEnterpriseCode());
sysCustomerOper.setEnterpriseName(sysCustomer.getEnterpriseName());
sysCustomerOper.setOper("新增");
sysCustomerOper.setUpdateBy(ShiroUtils.getLoginName());
sysCustomerOper.setUpdateTime(DateUtils.getNowDate());
sysCustomerOper.setOperPeople(ShiroUtils.getLoginName());
if(ok==1){
sysCustomerOper.setUpdateStatus("0");
sysCustomerOper.setOperStatus("0");
}else{
sysCustomerOper.setUpdateStatus("1");
sysCustomerOper.setOperStatus("1");
}
sysCustomerOperMapper.insertSysCustomerOper(sysCustomerOper);
sysCustomerOperService.insertSysCustomerOper(sysCustomerOper);
return AjaxResult.success("添加成功,等待审核");
}
return AjaxResult.success("");
@ -169,7 +151,6 @@ public class SysCustomerController extends BaseController
mmap.put("sysCustomer", sysCustomer);
return prefix + "/edit";
}
/**
* 修改保存客户基本信息
*/
@ -179,6 +160,16 @@ public class SysCustomerController extends BaseController
@ResponseBody
public AjaxResult editSave(SysCustomer sysCustomer)
{
//添加操作记录
SysCustomerOper sysCustomerOper = new SysCustomerOper();
sysCustomerOper.setPurser(sysCustomer.getCustomerPurser());
sysCustomerOper.setEnterpriseCode(sysCustomerOper.getEnterpriseCode());
sysCustomerOper.setEnterpriseName(sysCustomer.getEnterpriseName());
sysCustomerOper.setOper("审核");
sysCustomerOper.setOperPeople(ShiroUtils.getLoginName());
sysCustomerOper.setOperStatus(sysCustomer.getDeginflag());
sysCustomerOperService.insertSysCustomerOper(sysCustomerOper);
//审核客户表
return toAjax(sysCustomerService.updateSysCustomer(sysCustomer));
}
@ -202,7 +193,15 @@ public class SysCustomerController extends BaseController
return list;
}
@RequiresPermissions("system:customer:audit")
@PostMapping("/operList")
@ResponseBody
public TableDataInfo list(SysCustomerOper sysCustomerOper)
{
startPage();
List<SysCustomerOper> list = sysCustomerOperService.selectSysCustomerOperList(sysCustomerOper);
return getDataTable(list);
}
@RequiresPermissions("system:customer:export")
@Log(title = "客户基本信息", businessType = BusinessType.EXPORT)
@RequestMapping("/exportCustomerInfo")
@ -262,57 +261,5 @@ public class SysCustomerController extends BaseController
}
}
// 添加修改客户表
@RequiresPermissions("system:customer:add")
@Log(title = "客户基本信息", businessType = BusinessType.INSERT)
@PostMapping("/addCustomer")
@ResponseBody
public AjaxResult add(HttpServletRequest request) {
String keyNo = request.getParameter("enterpriseCode");
SysUser user = ShiroUtils.getSysUser();
SysCustomer sysCustomer = new SysCustomer();
sysCustomer.setEnterpriseName(request.getParameter("enterpriseName"));
sysCustomer.setCustomerPurser(request.getParameter("customerPurser"));
sysCustomer.setEnterpriseCode(request.getParameter("enterpriseCode"));
//业务员
sysCustomer.setBusinessMembers(request.getParameter("businessMembers"));
List<SysCustomer> sysCustomerList = sysCustomerService.selectSysCustomerList(sysCustomer);
if (sysCustomerList.size() == 0){
sysCustomerService.insertSysCustomer(sysCustomer);
Long customer_id = sysCustomerService.selectSysCustomerList(sysCustomer).get(0).getCustomerId();
keyNo = "KH" + 00 + customer_id;
sysCustomer.setCustomsCode(keyNo);
sysCustomer.setCreateBy(ShiroUtils.getLoginName());
sysCustomerService.updateSysCustomer(sysCustomer);
//添加时间
sysCustomer.setCreateTime(new Date());
//发送添加客户提醒给上级
Remind remind = new Remind();
//接收人
remind.setReceiverName("");
//提示信息
remind.setRemindContent(sysCustomer.getBusinessMembers()+"申请:客户"+sysCustomer.getEnterpriseName()+"事务部"+sysCustomer.getCustomerPurser()+"");
remindMapper.add(remind);
}
else{
return AjaxResult.error("该客户已被其他业务员添加"+"客户名称 :" + sysCustomerList.get(0).getEnterpriseName() + "事业部: "+
"" + sysCustomerList.get(0).getCustomerPurser() + " 业务员" + sysCustomerList.get(0).getBusinessMembers());
}
//添加的时候插入记录到我的请求
// if (add) {
// BizRequestItem bizRequestItem = new BizRequestItem();
// bizRequestItem.setCreateBy(sysCustomer.getCreateBy());
// bizRequestItem.setCreateTime(sysCustomer.getCreateTime()+"");
// bizRequestItem.setTitle(sysCustomer.getBusinessMembers() + "_" + sysCustomer.getEnterpriseName());
// bizRequestItem.setModuleUrl("Syscustom");
// bizRequestItem.setModuleName("客户表");
// bizRequestItem.setKeyNo(sysCustomer.getCustomerId()+"");
// bizRequestItem.setDelSign("0");
// flowService.add(bizRequestItem);
//
//
// }
return AjaxResult.success("添加成功," +1 +"一条数据");
}
}

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

@ -1,9 +1,9 @@
package com.ruoyi.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.stereotype.Repository;
/**
@ -211,21 +211,21 @@ public class SysCustomer extends BaseEntity
private String updateInfoTime;
@Excel(name = "客户审核状态表示") //0表示审核中,1标识审核通过,2表示审核拒绝
private int deginflag;
private String deginflag;
@Excel(name = "客户的状态")
private int delflag;
public int getDeginflag() {
private String delflag;
public String getDeginflag() {
return deginflag;
}
public void setDeginflag(int deginflag) {
public void setDeginflag(String deginflag) {
this.deginflag = deginflag;
}
public int getDelflag() {
public String getDelflag() {
return delflag;
}
public void setDelflag(int delflag) {
public void setDelflag(String delflag) {
this.delflag = delflag;
}
public String getCustomerPurser() {

74
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysCustomerOper.java

@ -1,22 +1,20 @@
package com.ruoyi.system.domain;
import lombok.Data;
import java.util.Date;
import java.util.Formatter;
public class SysCustomerOper {
//客户表的操作记录id
private int id;
//客户表中的业务员信息
private String sysCustomerPuser;
private String purser;
private String enterpriseCode;
//客户表中的客户名称
private String sysCustomerEnterPriseName;
private String enterpriseName;
//操作
private String oper;
private Date updateTime;
private String updateBy;
private String updateStatus;
private Date createTime;
private String operPeople;
private String operStatus;
public int getId() {
return id;
@ -26,20 +24,28 @@ public class SysCustomerOper {
this.id = id;
}
public String getSysCustomerPuser() {
return sysCustomerPuser;
public String getPurser() {
return purser;
}
public void setPurser(String purser) {
this.purser = purser;
}
public void setSysCustomerPuser(String sysCustomerPuser) {
this.sysCustomerPuser = sysCustomerPuser;
public String getEnterpriseCode() {
return enterpriseCode;
}
public String getSysCustomerEnterPriseName() {
return sysCustomerEnterPriseName;
public void setEnterpriseCode(String enterpriseCode) {
this.enterpriseCode = enterpriseCode;
}
public void setSysCustomerEnterPriseName(String sysCustomerEnterPriseName) {
this.sysCustomerEnterPriseName = sysCustomerEnterPriseName;
public String getEnterpriseName() {
return enterpriseName;
}
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
}
public String getOper() {
@ -50,40 +56,42 @@ public class SysCustomerOper {
this.oper = oper;
}
public Date getUpdateTime() {
return updateTime;
public Date getCreateTime() {
return createTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
public String getOperStatus() {
return operStatus;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
public void setOperStatus(String operStatus) {
this.operStatus = operStatus;
}
public String getUpdateStatus() {
return updateStatus;
public String getOperPeople() {
return operPeople;
}
public void setUpdateStatus(String updateStatus) {
this.updateStatus = updateStatus;
public void setOperPeople(String operPeople) {
this.operPeople = operPeople;
}
@Override
public String toString() {
return "SysCustomerOper{" +
"id=" + id +
", sysCustomerPuser='" + sysCustomerPuser + '\'' +
", sysCustomerEnterPriseName='" + sysCustomerEnterPriseName + '\'' +
", purser='" + purser + '\'' +
", enterpriseCode='" + enterpriseCode + '\'' +
", enterpriseName='" + enterpriseName + '\'' +
", oper='" + oper + '\'' +
", updateTime=" + updateTime +
", updateBy='" + updateBy + '\'' +
", updateStatus='" + updateStatus + '\'' +
", createTime=" + createTime +
", operPeople='" + operPeople + '\'' +
", operStatus='" + operStatus + '\'' +
'}';
}
}

9
ruoyi-admin/src/main/resources/application-druid.yml

@ -23,12 +23,11 @@ spring:
# username: root
# password: RuiYi123
# url: jdbc:mysql://39.104.169.14:3306/wancaierpdemo?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
# url: jdbc:mysql://120.24.213.253:3306/wancaierpdemo?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
url: jdbc:mysql://localhost:3306/wancaierpdemo?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
url: jdbc:mysql://120.24.213.253:3306/wancaierpdemo?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
# url: jdbc:mysql://localhost:3306/wancaierpdemo?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
username: root
# password: RuiYi2022
# password: Read-in2023
password: RuiYi@2023
password: Read-in2023
# password: RuiYi@2023
# username: root
# password: RuiYi2022
# 从库数据源

6
ruoyi-admin/src/main/resources/mapper/system/SysCustomerMapper.xml

@ -136,8 +136,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="confirmTax != null">confirm_tax,</if>
<if test="taxRate != null">tax_rate,</if>
<if test="countryNumber != null">country_number,</if>
<if test="deginflag != null">degin_flag,</if>
<if test="del_flag!= null">del_flag,</if>
del_flag,
first_add_time,
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
@ -188,7 +187,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="taxRate != null">#{taxRate},</if>
<if test="countryNumber != null">#{countryNumber},</if>
<if test="deginflag != null">#{deginflag},</if>
<if test="delflag != null">#{delflag},</if>
0,
now(),
</trim>
</insert>
@ -248,7 +247,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
where customer_id = #{customerId}
</update>
<delete id="deleteSysCustomerById" parameterType="Long">
delete from sys_customer where customer_id = #{customerId}
</delete>

53
ruoyi-admin/src/main/resources/mapper/system/SysCustomerOperMapper.xml

@ -6,24 +6,26 @@
<resultMap type="SysCustomerOper" id="SysCustomerOperResult">
<result property="id" column="id" />
<result property="sysCustomerPuser" column="sys_customer_purser" />
<result property="sysCustomerEnterPriseName" column="sys_customer_enterpriseName" />
<result property="purser" column="purser" />
<result property="enterpriseCode" column="enterpriseCode" />
<result property="enterpriseName" column="enterpriseName" />
<result property="oper" column="oper" />
<result property="updateTime" column="updateTime" />
<result property="updateBy" column="updateBy" />
<result property="updateStatus" column="operStatus" />
<result property="createTime" column="createTime" />
<result property="operPeople" column="operPeople" />
<result property="operStatus" column="operStatus" />
</resultMap>
<sql id="selectSysCustomerOperVo">
select id,sys_customer_purser,sys_customer_enterpriseName,oper,updateTime,updateBy,operStatus from sys_customer_oper
select id,purser,enterpriseName,enterpriseCode,oper,createTime,operPeople,operStatus from sys_customer_oper
</sql>
<select id="selectSysCustomerOperList" parameterType="SysCustomerOper" resultMap="SysCustomerOperResult">
<include refid="selectSysCustomerVo"/>
<include refid="selectSysCustomerOperVo"/>
<where>
<if test="sysCustomerPuser != null and sysCustomerPuser != ''"> and sys_customer_purser like concat('%', #{sysCustomerPuser}, '%')</if>
<if test="sysCustomerEnterPriseName!= null and sysCustomerEnterPriseName != ''"> and sys_customer_enterpriseName = #{sysCustomerEnterPriseName}</if>
<if test="updateBy != null and updateBy != ''"> and updateBy like concat('%', #{updateBy}, '%')</if>
<if test="purser != null and purser != ''"> and purser like concat('%', #{purser}, '%')</if>
<if test="enterpriseName!= null and enterpriseName != ''"> and enterpriseName = #{enterpriseName}</if>
<if test="enterpriseName!= null and enterpriseCode != ''"> and enterpriseCode = #{enterpriseCode}</if>
<if test="operPeople != null and operPeople != ''"> and operPeople like concat('%', #{operPeople}, '%')</if>
</where>
</select>
@ -31,16 +33,35 @@
<include refid="selectSysCustomerOperVo"/>
where id = #{id}
</select>
<update id="updateSysCustomerOper" parameterType="SysCustomerOper">
update sys_customer_oper set
<if test="purser != null and purser != ''">purser = #{purser},</if>
<if test="enterpriseName!= null">enterpriseName = #{enterpriseName},</if>
<if test="enterpriseCode!= null">enterprseCode = #{enterpriseCode},</if>
<if test="oper != null and oper != ''"> oper = #{oper},</if>
<if test="operPeople != null">operPeople = #{operPeople},</if>
<if test="operStatus != null">operStatus = #{operStatus},</if>
<if test="createTime != null"> createTime = #{ createTime},</if>
where id = #{id}
</update>
<insert id="insertSysCustomerOper" parameterType="SysCustomerOper" useGeneratedKeys="true" keyProperty="id">
insert into sys_customer_oper
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="purser != null and purser != ''">purser,</if>
<if test="enterpriseCode!= null">enterpriseCode,</if>
<if test="enterpriseName!= null">enterpriseName,</if>
<if test="oper != null and oper != ''">oper,</if>
<if test="operPeople != null">operPeople,</if>
<if test="operStatus != null">operStatus,</if>
createTime,
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="sysCustomerPuser != null and sysCustomerPuser != ''">#{sysCustomerPuser},</if>
<if test="sysCustomerEnterPriseName!= null">#{sysCustomerEnterPriseName},</if>
<if test="purser != null and purser != ''">#{purser},</if>
<if test="enterpriseCode!= null">#{enterpriseCode},</if>
<if test="enterpriseName!= null">#{enterpriseName},</if>
<if test="oper != null and oper != ''">#{oper},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateStatus != null">#{updateStatus},</if>
<if test="operPeople != null">#{operPeople},</if>
<if test="operStatus != null">#{operStatus},</if>
now(),
</trim>
</insert>

41
ruoyi-admin/src/main/resources/templates/system/customer/add.html

@ -313,6 +313,13 @@
</select>
</div>
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">国家/地区编号:</label>
<div class="col-sm-8">
<input name="delflag" class="form-control m-b" value="0"/>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
@ -349,23 +356,23 @@
});
function submitHandler() {
if ($.validate.form()) {
// $.operate.save(prefix + "/add",$('#form-customer-add').serialize());
$.ajax({
url: prefix + "/add",
mothod:'post',
data: {
data: $('#form-customer-add').serialize(),
},
beforeSend: function () {
$.modal.loading("正在处理中,请稍后...");
$.modal.disable();
},
success: function (res) {
$("#bootstrap-table").bootstrapTable("refresh");
$.modal.closeLoading();
$.modal.msgSuccess(res.msg);
}
})
$.operate.save(prefix + "/add",$('#form-customer-add').serialize());
// $.ajax({
// url: prefix + "/add",
// mothod:'post',
// data: {
// data: $('#form-customer-add').serialize(),
// },
// beforeSend: function () {
// $.modal.loading("正在处理中,请稍后...");
// $.modal.disable();
// },
// success: function (res) {
// $("#bootstrap-table").bootstrapTable("refresh");
// $.modal.closeLoading();
// $.modal.msgSuccess(res.msg);
// }
// })
}
}

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

@ -92,10 +92,10 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:customer:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()"
shiro:hasPermission="system:customer:edit">
<i class="fa fa-edit"></i> 修改
</a>
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()"-->
<!-- shiro:hasPermission="system:customer:edit">-->
<!-- <i class="fa fa-edit"></i> 修改-->
<!-- </a>-->
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()"
shiro:hasPermission="system:customer:remove">
<i class="fa fa-remove"></i> 删除
@ -116,6 +116,9 @@
<i class="fa fa-ambulance"></i> 添加送货地址
</a>
<a class="btn btn-primary" onclick="showCustomerAudit()" shiro:hasPermission="system:customer:audit">
<i class="fa fa-edit"></i> 审核
</a>
<a class="btn btn-success" onclick="showdetails()" >
<i class="fa fa-file-text"></i> 详情列表
</a>
@ -654,6 +657,12 @@
</div>
</div>
<div class="addressList sh">
<div class="col-sm-12 select-table table-striped">
<div class="details" style="padding: 8px 0;font-size: 18px">操作记录</div>
<table id="oper-table"></table>
</div>
</div>
</div>
</div>
@ -674,9 +683,9 @@
<div class="modal-body" style="height: 180px">
<form id="form-audit-edit">
<div class="form-group" style="display: none">
<label class="col-sm-3 control-label is-required">供应商报价id:</label>
<label class="col-sm-3 control-label is-required">客户表id:</label>
<div class="col-sm-8">
<input id="supplierQuotationId" name="supplierQuotationId" class="form-control" type="text"
<input id="customerId" name="customerId" class="form-control" type="text"
required
readonly>
</div>
@ -684,35 +693,26 @@
<div class="form-group">
<label class="col-sm-3 control-label">审核否:</label>
<div class="col-sm-8">
<select id="auditNo" name="auditNo" class="form-control"
<select id="deginflag" name="deginflag" class="form-control"
th:with="type=${@dict.getType('sys_whether')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">审核时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input id="auditTime" name="auditTime" class="form-control "
placeholder="yyyy-MM-dd HH:mm:ss" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">审核人:</label>
<div class="col-sm-8">
<input id="auditName" name="auditName" class="form-control" type="text">
<input id="identifyingPeople" name="identifyingPeople" class="form-control" type="text" readonly>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button type="button" onclick="AuditConfirmSubmit()" class="btn btn-danger" data-dismiss="modal">审核拒绝</button>
<button type="button" onclick="AuditConfirmSubmit2()" class="btn btn-success" data-dismiss="modal">审核通过</button>
<button type="button" onclick="AuditConfirmSubmit(1)" class="btn btn-danger" data-dismiss="modal" editFlag>审核拒绝</button>
<button type="button" onclick="AuditConfirmSubmit(2)" class="btn btn-success" data-dismiss="modal" editFlag>审核通过</button>
</div>
</div>
</div>
@ -754,7 +754,7 @@
if (value == 0){
return "待审核";
}
if(value==1){
if (value == 1){
return "审核通过";
}
if (value == 2){
@ -769,7 +769,7 @@
if (value == 0){
return "否";
}
if(value==1){
if (value==1){
return "是";
}
if (value == 2){
@ -1071,11 +1071,9 @@
function submitHandler() {
if ($.validate.form('form-contacts-add')) {
$.operate.save(prefix1 + "/add", $('#form-contacts-add').serialize());
$.operate.save(prefix + "/add", $('#form-contacts-add').serialize());
$('#infoModal').modal("hide")
}
}
// 列表联系人明细
@ -1460,7 +1458,7 @@
}
// 联系人
// 联系人
$('#contacts-table').bootstrapTable('destroy');
$('#contacts-table').bootstrapTable({
url: '/system/contacts/list',
@ -1640,40 +1638,123 @@
},
]
});
//客户表操作记录
$('#oper-table').bootstrapTable('destroy');
$('#oper-table').bootstrapTable({
url: '/system/customer/operList',
pagination: true,
pageNumber: 1,
pageSize: 10,
pageList: [10, 25, 50, 100],
showRefresh: false,
method: "post",
contentType: "application/x-www-form-urlencoded",
striped: true, // 是否显示行间隔色
cache: false, // 是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
sidePagination: "server", // 分页方式:client客户端分页,server服务端分页(*)
clickToSelect: true, // 是否启用点击选中行
showToggle: false, // 是否显示详细视图和列表视图的切换按钮
cardView: false, // 是否显示详细视图
detailView: false, // 是否显示父子表
smartDisplay: false, // 加了这个才显示每页显示的行数
showExport: false, // 是否显示导出按钮
singleSelect: true,
paginationDetailHAlign: ' hiddenDetailInfo',
height: 150,
queryParams: function (params) {
//console.log("123");
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
enterpriseCode: row.enterpriseCode,
enterpriseName: row.enterpriseName,
purser: row.customerPurser
};
// console.log(data[0].enterpriseCode)
return curParams
},
columns: [
{
field: 'id',
title: '操作id',
visible: false
},
{
field: 'enterpriseCode',
title: '客户/代码',
},
{
field: 'enterpriseName',
title: '客户/企业名称',
},
{
field: 'purser',
title: '事业部'
},
{
field: 'oper',
title: '操作'
},
{
field: 'operPeople',
title: '操作人'
},
{
field: 'createTime',
title: '操作时间'
},
{
field: 'operStatus',
title: '操作的状态',
formatter : function(value, row, index) {
if (value == 0){
return "成功";
}else{
return "失败"
}
}
},
]
});
$("#detailsModal").modal("show");
})
function quotationAudit() {
function showCustomerAudit() {
let data = $("#bootstrap-table").bootstrapTable("getSelections");
let userName = [[${@permission.getPrincipalProperty('userName')}]];
if (data.length === 1) {
$("#supplierQuotationId").val(data[0].supplierQuotationId)
$("#auditNo").val(1).trigger("change")
$("#auditName").val(userName)
$("#auditTime").datetimepicker("setDate", new Date());
$("#customerId").val(data[0].customerId)
$("#deginflag").val(1).trigger("change")
$("#identifyingPeople").val(userName);
$("#AuditModel").modal("show");
} else {
$.modal.alert("请选择一条数据");
}
}
function AuditConfirmSubmit() {
var auditNo = $("#auditNo").val()
function AuditConfirmSubmit(number) {
$("#deginflag").val(number).trigger("change");
var auditNo = $("#deginflag").val() + "";
var formData = $('#form-audit-edit').serialize();
formData = formData + "&" +"deginflag=" + auditNo;
console.log(auditNo);
$.ajax({
url: prefix + "/edit",
type: "post",
resultType: "json",
data: $('#form-audit-edit').serialize(),
data: formData,
success: function (resp) {
console.log(resp)
console.log(resp);
$("#bootstrap-table").bootstrapTable('refresh');
// $(".alert-success").addClass("show");
// window.setTimeout(function () {
// $(".alert-success").removeClass("show");
// }, 1000);//显示的时间
if (auditNo == 1) {
if(resp.msg == 0){
$.modal.msgSuccess("审核成功!")
} else if (auditNo == 0) {
$.modal.msgSuccess("取消审核成功!")
}else{
$.modal.msgError("审核失败!")
}
},
error: function () {

BIN
ruoyi-framework/target/classes/com/ruoyi/framework/web/service/DictService.class

Binary file not shown.

BIN
ruoyi-generator/target/classes/com/ruoyi/generator/controller/GenController.class

Binary file not shown.
Loading…
Cancel
Save