Browse Source

客户列表模块,增加一个事业部字段,一个职务字段,新增客户表操作记录。

erp、
zhangsiqi 10 months ago
parent
commit
f3b0753473
  1. 4
      ruoyi-admin/src/main/java/com/ruoyi/remind/domain/Remind.java
  2. 115
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java
  3. 48
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysCustomer.java
  4. 5
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerService.java
  5. 22
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java
  6. 6
      ruoyi-admin/src/main/resources/application-druid.yml
  7. 18
      ruoyi-admin/src/main/resources/mapper/system/SysCustomerMapper.xml
  8. 124
      ruoyi-admin/src/main/resources/templates/system/customer/add.html
  9. 179
      ruoyi-admin/src/main/resources/templates/system/customer/customer.html
  10. 72
      ruoyi-admin/src/main/resources/templates/system/customer/edit.html
  11. 8
      ruoyi-admin/src/main/resources/templates/system/supplierquotation/supplierquotation.html
  12. BIN
      ruoyi-framework/target/classes/com/ruoyi/framework/config/ShiroConfig.class
  13. BIN
      ruoyi-framework/target/classes/com/ruoyi/framework/manager/ShutdownManager.class
  14. BIN
      ruoyi-framework/target/classes/com/ruoyi/framework/manager/factory/AsyncFactory$1.class
  15. BIN
      ruoyi-framework/target/classes/com/ruoyi/framework/manager/factory/AsyncFactory$2.class
  16. BIN
      ruoyi-framework/target/classes/com/ruoyi/framework/manager/factory/AsyncFactory$3.class
  17. BIN
      ruoyi-framework/target/classes/com/ruoyi/framework/manager/factory/AsyncFactory.class
  18. BIN
      ruoyi-framework/target/classes/com/ruoyi/framework/shiro/service/SysPasswordService.class
  19. BIN
      ruoyi-framework/target/classes/com/ruoyi/framework/shiro/service/SysShiroService.class
  20. BIN
      ruoyi-framework/target/classes/com/ruoyi/framework/shiro/session/OnlineSessionDAO.class
  21. BIN
      ruoyi-framework/target/classes/com/ruoyi/framework/shiro/web/filter/LogoutFilter.class
  22. BIN
      ruoyi-framework/target/classes/com/ruoyi/framework/shiro/web/filter/online/OnlineSessionFilter.class
  23. BIN
      ruoyi-framework/target/classes/com/ruoyi/framework/shiro/web/filter/sync/SyncOnlineSessionFilter.class
  24. BIN
      ruoyi-framework/target/classes/com/ruoyi/framework/shiro/web/session/OnlineWebSessionManager.class
  25. BIN
      ruoyi-framework/target/classes/com/ruoyi/framework/shiro/web/session/SpringSessionValidationScheduler$1.class
  26. BIN
      ruoyi-framework/target/classes/com/ruoyi/framework/shiro/web/session/SpringSessionValidationScheduler.class
  27. BIN
      ruoyi-framework/target/classes/com/ruoyi/framework/web/service/CacheService.class
  28. 2
      ruoyi-generator/target/classes/templates/tool/gen/edit.html
  29. 11
      ruoyi-generator/target/classes/vm/html/list.html.vm
  30. 25
      ruoyi-generator/target/classes/vm/java/controller.java.vm
  31. 19
      ruoyi-generator/target/classes/vm/java/mapper.java.vm
  32. 14
      ruoyi-generator/target/classes/vm/java/service.java.vm
  33. 38
      ruoyi-generator/target/classes/vm/java/serviceImpl.java.vm
  34. 6
      ruoyi-generator/target/classes/vm/sql/sql.vm
  35. 8
      ruoyi-generator/target/classes/vm/xml/mapper.xml.vm
  36. BIN
      ruoyi-system/target/classes/com/ruoyi/system/mapper/SysUserOnlineMapper.class
  37. BIN
      ruoyi-system/target/classes/com/ruoyi/system/service/ISysConfigService.class
  38. BIN
      ruoyi-system/target/classes/com/ruoyi/system/service/ISysDictTypeService.class
  39. BIN
      ruoyi-system/target/classes/com/ruoyi/system/service/ISysUserOnlineService.class
  40. BIN
      ruoyi-system/target/classes/com/ruoyi/system/service/impl/SysConfigServiceImpl.class
  41. BIN
      ruoyi-system/target/classes/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.class
  42. BIN
      ruoyi-system/target/classes/com/ruoyi/system/service/impl/SysUserOnlineServiceImpl.class
  43. 57
      ruoyi-system/target/classes/mapper/system/SysUserOnlineMapper.xml

4
ruoyi-admin/src/main/java/com/ruoyi/remind/domain/Remind.java

@ -130,8 +130,4 @@ public class Remind {
+ receiver + "]";
}
}

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

@ -5,29 +5,51 @@ 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.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.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.List;
import java.util.Map;
import java.util.*;
/**
* 客户基本信息Controller
@ -45,6 +67,10 @@ public class SysCustomerController extends BaseController
private ISysCustomerService sysCustomerService;
@Autowired
private ISysDictTypeService sysDictTypeService;
@Autowired
private RemindMapper remindMapper;
@Autowired
private SysCustomerOperMapper sysCustomerOperMapper;
@RequiresPermissions("system:customer:view")
@GetMapping()
@ -100,9 +126,39 @@ public class SysCustomerController extends BaseController
@ResponseBody
public AjaxResult addSave(SysCustomer sysCustomer)
{
return toAjax(sysCustomerService.insertSysCustomer(sysCustomer));
SysCustomer sysCustomer1 = new SysCustomer();
sysCustomer1.setEnterpriseName(sysCustomer.getEnterpriseName());
sysCustomer1.setCustomerPurser(sysCustomer.getCustomerPurser());
List<SysCustomer> sysCustomerList = sysCustomerService.selectSysCustomerList(sysCustomer1);
if (sysCustomerList.size() == 1){
SysCustomer sysCustomer2 = sysCustomerList.get(0);
return AjaxResult.error("该客户已被其他业务员添加"+"客户名称 :" + sysCustomerList.get(0).getEnterpriseName() + "事业部: "+
"" + sysCustomerList.get(0).getCustomerPurser() + " 业务员" + sysCustomerList.get(0).getBusinessMembers());
}else if (sysCustomerList.size() == 0){
sysCustomerService.insertSysCustomer(sysCustomer);
Long customer_id = sysCustomerService.selectSysCustomerList(sysCustomer).get(0).getCustomerId();
String keyNo = "KH" + 00 + customer_id;
sysCustomer.setEnterpriseCode(keyNo);
int ok = sysCustomerService.updateSysCustomer(sysCustomer);
//添加操作记录
SysCustomerOper sysCustomerOper = new SysCustomerOper();
sysCustomerOper.setSysCustomerPuser(sysCustomer.getCustomerPurser());
sysCustomerOper.setSysCustomerEnterPriseName(sysCustomer.getEnterpriseName());
sysCustomerOper.setOper("新增");
sysCustomerOper.setUpdateBy(ShiroUtils.getLoginName());
sysCustomerOper.setUpdateTime(DateUtils.getNowDate());
if(ok==1){
sysCustomerOper.setUpdateStatus("0");
}else{
sysCustomerOper.setUpdateStatus("1");
}
sysCustomerOperMapper.insertSysCustomerOper(sysCustomerOper);
return AjaxResult.success("添加成功,等待审核");
}
return AjaxResult.success("");
}
/**
* 修改客户基本信息
*/
@ -206,4 +262,57 @@ 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 +"一条数据");
}
}

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

@ -100,6 +100,12 @@ public class SysCustomer extends BaseEntity
@Excel(name = "客户简称")
private String customerAbbreviation;
/** 事业部 */
@Excel(name = "事业部")
private String customerPurser;
/** 职务 */
@Excel(name = "职务")
private String customerOffice;
/** 海关代码 */
@Excel(name = "海关代码")
private String customsCode;
@ -204,7 +210,41 @@ public class SysCustomer extends BaseEntity
@Excel(name = "修改时间")
private String updateInfoTime;
public void setCustomerId(Long customerId)
@Excel(name = "客户审核状态表示") //0表示审核中,1标识审核通过,2表示审核拒绝
private int deginflag;
@Excel(name = "客户的状态")
private int delflag;
public int getDeginflag() {
return deginflag;
}
public void setDeginflag(int deginflag) {
this.deginflag = deginflag;
}
public int getDelflag() {
return delflag;
}
public void setDelflag(int delflag) {
this.delflag = delflag;
}
public String getCustomerPurser() {
return customerPurser;
}
public void setCustomerPurser(String customerPurser) {
this.customerPurser = customerPurser;
}
public String getCustomerOffice() {
return customerOffice;
}
public void setCustomerOffice(String customerOffice) {
this.customerOffice = customerOffice;
}
public void setCustomerId(Long customerId)
{
this.customerId = customerId;
}
@ -626,6 +666,8 @@ public class SysCustomer extends BaseEntity
this.updateInfoTime = updateInfoTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -650,6 +692,8 @@ public class SysCustomer extends BaseEntity
.append("customerFax", getCustomerFax())
.append("customerEmail", getCustomerEmail())
.append("customerAbbreviation", getCustomerAbbreviation())
.append("customerOffice", getCustomerOffice())
.append("customerPurser", getCustomerPurser())
.append("customsCode", getCustomsCode())
.append("paymentTerms", getPaymentTerms())
.append("invoiceCode", getInvoiceCode())
@ -676,6 +720,8 @@ public class SysCustomer extends BaseEntity
.append("countryNumber", getCountryNumber())
.append("firstAddTime", getFirstAddTime())
.append("updateInfoTime", getUpdateInfoTime())
.append("deginflag", getDeginflag())
.append("delflag", getDelflag())
.toString();
}
}

5
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerService.java

@ -1,8 +1,10 @@
package com.ruoyi.system.service;
import com.ruoyi.system.domain.SysCustomer;
import org.activiti.engine.runtime.ProcessInstance;
import java.util.List;
import java.util.Map;
/**
* 客户基本信息Service接口
@ -63,4 +65,7 @@ public interface ISysCustomerService
public List selectSysCustomerBycode();
public SysCustomer selectSysCustomerByEnterpriseCode(String enterpriseCode);
public int add(SysCustomer sysCustomer);
}

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

@ -1,13 +1,29 @@
package com.ruoyi.system.service.impl;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.text.Convert;
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.process.leave.domain.BizLeaveVo;
import com.ruoyi.process.todoitem.domain.BizTodoItem;
import com.ruoyi.process.todoitem.service.IBizTodoItemService;
import com.ruoyi.system.domain.SysCustomer;
import com.ruoyi.system.mapper.SysCustomerMapper;
import com.ruoyi.system.service.ISysCustomerService;
import org.activiti.engine.IdentityService;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService;
import org.activiti.engine.runtime.ProcessInstance;
import org.apache.commons.lang3.BooleanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.ui.ModelMap;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 客户基本信息Service业务层处理
@ -102,4 +118,10 @@ public class SysCustomerServiceImpl implements ISysCustomerService
public SysCustomer selectSysCustomerByEnterpriseCode(String enterpriseCode) {
return sysCustomerMapper.selectSysCustomerByEnterpriseCode(enterpriseCode);
}
@Override
public int add(SysCustomer sysCustomer) {
return sysCustomerMapper.insertSysCustomer(sysCustomer);
}
}

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

@ -23,10 +23,12 @@ 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://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: Read-in2023
password: RuiYi@2023
# username: root
# password: RuiYi2022
# 从库数据源

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

@ -26,8 +26,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="customerFax" column="customer_fax" />
<result property="customerEmail" column="customer_email" />
<result property="customerAbbreviation" column="customer_abbreviation" />
<result property="customerPurser" column="customer_purser" />
<result property="customsCode" column="customs_code" />
<result property="paymentTerms" column="payment_terms" />
<result property="customerOffice" column="customer_office" />
<result property="invoiceCode" column="invoice_code" />
<result property="portOfDestination" column="port_of_destination" />
<result property="establishedTime" column="established_time" />
@ -52,10 +54,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="countryNumber" column="country_number" />
<result property="firstAddTime" column="first_add_time" />
<result property="updateInfoTime" column="update_info_time" />
<result property="deginflag" column="degin_flag" />
<result property="delflag" column="del_flag" />
</resultMap>
<sql id="selectSysCustomerVo">
select customer_id, enterprise_code, export_sales, enterprise_name, english_name, customer_address, delivery_address, postal_code, customer_country, common_currency, customer_remarks, legal_representative, invoicing_customer_name, invoicing_company_name, credit_limit, integrity_rating, customer_contact, contact_number, customer_fax, customer_email, customer_abbreviation, customs_code, payment_terms, invoice_code, port_of_destination, established_time, settlement_bank, exchange_settlement_account, deposit_bank, bank_account, rmb_registered_capital, registered_capital, order_length, shipping_template, business_members, destination_port_code, departure_potential_name, departure_potential_code, unified_numbering, shipment_usage, voucher_preparation, identifying_people, confirm_tax, tax_rate, country_number, first_add_time, update_info_time from sys_customer
select customer_id, enterprise_code, export_sales, enterprise_name, english_name, customer_address, delivery_address, postal_code, customer_country, common_currency, customer_remarks, legal_representative, invoicing_customer_name, invoicing_company_name, credit_limit, integrity_rating, customer_contact, contact_number, customer_fax, customer_email, customer_abbreviation,customer_purser,customer_office, customs_code, payment_terms, invoice_code, port_of_destination, established_time, settlement_bank, exchange_settlement_account, deposit_bank, bank_account, rmb_registered_capital, registered_capital, order_length, shipping_template, business_members, destination_port_code, departure_potential_name, departure_potential_code, unified_numbering, shipment_usage, voucher_preparation, identifying_people, confirm_tax, tax_rate, country_number, first_add_time, update_info_time,degin_flag,del_flag from sys_customer
</sql>
<select id="selectSysCustomerList" parameterType="SysCustomer" resultMap="SysCustomerResult">
@ -106,6 +110,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="customerFax != null">customer_fax,</if>
<if test="customerEmail != null">customer_email,</if>
<if test="customerAbbreviation != null">customer_abbreviation,</if>
<if test="customerPurser != null">customer_purser,</if>
<if test="customerOffice != null">customer_office,</if>
<if test="customsCode != null">customs_code,</if>
<if test="paymentTerms != null">payment_terms,</if>
<if test="invoiceCode != null">invoice_code,</if>
@ -130,6 +136,8 @@ 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>
first_add_time,
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
@ -153,6 +161,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="customerFax != null">#{customerFax},</if>
<if test="customerEmail != null">#{customerEmail},</if>
<if test="customerAbbreviation != null">#{customerAbbreviation},</if>
<if test="customerPurser != null">#{customerPurser},</if>
<if test="customerOffice != null">#{customerOffice},</if>
<if test="customsCode != null">#{customsCode},</if>
<if test="paymentTerms != null">#{paymentTerms},</if>
<if test="invoiceCode != null">#{invoiceCode},</if>
@ -177,6 +187,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="confirmTax != null">#{confirmTax},</if>
<if test="taxRate != null">#{taxRate},</if>
<if test="countryNumber != null">#{countryNumber},</if>
<if test="deginflag != null">#{deginflag},</if>
<if test="delflag != null">#{delflag},</if>
now(),
</trim>
</insert>
@ -204,6 +216,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="customerFax != null">customer_fax = #{customerFax},</if>
<if test="customerEmail != null">customer_email = #{customerEmail},</if>
<if test="customerAbbreviation != null">customer_abbreviation = #{customerAbbreviation},</if>
<if test="customerPurser != null">customer_purser = #{customerPurser},</if>
<if test="customerOffice != null">customer_office = #{customerOffice},</if>
<if test="customsCode != null">customs_code = #{customsCode},</if>
<if test="paymentTerms != null">payment_terms = #{paymentTerms},</if>
<if test="invoiceCode != null">invoice_code = #{invoiceCode},</if>
@ -228,6 +242,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="confirmTax != null">confirm_tax = #{confirmTax},</if>
<if test="taxRate != null">tax_rate = #{taxRate},</if>
<if test="countryNumber != null">country_number = #{countryNumber},</if>
<if test="deginflag != null">degin_flag = #{deginflag},</if>
<if test="delflag!= null">del_flag = #{delflag},</if>
update_info_time = CONCAT_WS(',',NOW(),update_info_time),
</trim>
where customer_id = #{customerId}

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

@ -9,10 +9,10 @@
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-customer-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">客户/企业代码</label>
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">客户ID</label>
<div class="col-sm-8">
<input name="enterpriseCode" class="form-control" type="text" required >
<input name="customerId" class="form-control" type="text" required >
</div>
</div>
<div class="form-group">
@ -35,6 +35,18 @@
<input name="englishName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户公司简称:</label>
<div class="col-sm-8">
<input name="customerAbbreviation" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">事业部:</label>
<div class="col-sm-8">
<input name="customerPurser" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">地址:</label>
<div class="col-sm-8">
@ -62,33 +74,33 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系人:</label>
<label class="col-sm-3 control-label is-required">联系人:</label>
<div class="col-sm-8">
<input name="customerContact" class="form-control" type="text">
<input name="customerContact" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系电话</label>
<label class="col-sm-3 control-label" >职务</label>
<div class="col-sm-8">
<input name="contactNumber" class="form-control" type="text">
<input name="customerOffice" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">传真</label>
<label class="col-sm-3 control-label is-required" >联系电话</label>
<div class="col-sm-8">
<input name="customerFax" class="form-control" type="text">
<input name="contactNumber" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Email</label>
<label class="col-sm-3 control-label">传真</label>
<div class="col-sm-8">
<input name="customerEmail" class="form-control" type="text">
<input name="customerFax" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户简称</label>
<label class="col-sm-3 control-label">Email</label>
<div class="col-sm-8">
<input name="customerAbbreviation" class="form-control" type="text">
<input name="customerEmail" class="form-control" type="text">
</div>
</div>
<div class="form-group">
@ -145,7 +157,7 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">开票公司名称</label>
<label class="col-sm-3 control-label">开票公司税号</label>
<div class="col-sm-8">
<input name="invoicingCompanyName" class="form-control" type="text">
</div>
@ -165,26 +177,26 @@
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">发票代码:</label>
<div class="col-sm-8">
<input name="invoiceCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">目的港:</label>
<div class="col-sm-8">
<input name="portOfDestination" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">结汇银行:</label>
<div class="col-sm-8">
<input name="settlementBank" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">结汇账号:</label>
<div class="col-sm-8">
<input name="exchangeSettlementAccount" class="form-control" type="text">
@ -203,7 +215,7 @@
<input name="registeredCapital" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">订单号长度:</label>
<div class="col-sm-8">
<input name="orderLength" class="form-control" type="text">
@ -217,35 +229,35 @@
</select>
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">业务员:</label>
<div class="col-sm-8">
<!-- <select name="businessMembers" class="form-control m-b">-->
<!-- <option value="">业务员</option>-->
<!-- </select>-->
<input name="businessMembers" class="form-control" type="text">
<!-- <select name="businessMembers" class="form-control m-b">
<option value="">业务员</option>
</select> -->
<input name="businessMembers" readonly th:value="${@permission.getPrincipalProperty('userName')}" required class="form-control businessMembers is-required" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">目的地港代号:</label>
<div class="col-sm-8">
<input name="destinationPortCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">起运潜名:</label>
<div class="col-sm-8">
<input name="departurePotentialName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">起运潜代号:</label>
<div class="col-sm-8">
<input name="departurePotentialCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">统一编号:</label>
<div class="col-sm-8">
<input name="unifiedNumbering" class="form-control" type="text">
@ -257,7 +269,7 @@
<textarea name="customerRemarks" class="form-control"></textarea>
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">出货需录入使用量:</label>
<div class="col-sm-8">
<!-- <input name="shipmentUsage" class="form-control" type="text">-->
@ -266,16 +278,16 @@
</select>
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">制单人:</label>
<div class="col-sm-8">
<input name="voucherPreparation" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">确认人:</label>
<div class="col-sm-8">
<input name="identifyingPeople" class="form-control" type="text">
<input readonly name="identifyingPeople" class="form-control" type="text">
</div>
</div>
<div class="form-group">
@ -293,7 +305,7 @@
<input name="taxRate" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">国家/地区编号:</label>
<div class="col-sm-8">
<select name="countryNumber" class="form-control m-b" th:with="type=${@dict.getType('sys_country_number')}">
@ -305,18 +317,55 @@
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "system/customer"
var prefixShippingaddress = ctx + "system/shippingaddress";
$("#form-customer-add").validate({
focusCleanup: true
});
focusCleanup: true,
//配置验证规则,key就是被验证的dom对象,value就是调用验证的方法(也是json格式)
rules: {
//这里的customerPurser 指的是上面标签的name属性
customerPurser: {
required: true,
},
taxRate:{
required:function(){
if($("#name").val()=="含税"){
return true;
}else{
return false;
}
},
}
},
// 验证失败的提示信息
messages: {
customerPurser: {
required: "必填" //自定义required的错误信息内容
}
},
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-customer-add').serialize());
// $.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);
}
})
}
}
@ -325,7 +374,6 @@
minView: "month",
autoclose: true
});
</script>
</body>
</html>

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

@ -325,7 +325,8 @@
<div class="modal-body details-body">
<div class="row">
<div class="base-customer">
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">客户/企业代码:</label>
<div class="col-sm-8">
<input id="enterpriseCode" name="enterpriseCode" class="form-control" type="text"
@ -355,6 +356,18 @@
<input name="englishName" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户简称:</label>
<div class="col-sm-8">
<input name="customerAbbreviation" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">事业部:</label>
<div class="col-sm-8">
<input name="customerPurser" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">地址:</label>
<div class="col-sm-8">
@ -413,7 +426,7 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">开票公司名称:</label>
<label class="col-sm-3 control-label">开票公司代码/label>
<div class="col-sm-8">
<input name="invoicingCompanyName" class="form-control" type="text" readonly>
</div>
@ -434,6 +447,12 @@
<!-- </select>-->
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">职务:</label>
<div class="col-sm-8">
<input name="customerOffice" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系人:</label>
<div class="col-sm-8">
@ -458,12 +477,6 @@
<input name="customerEmail" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户简称:</label>
<div class="col-sm-8">
<input name="customerAbbreviation" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">海关代码:</label>
<div class="col-sm-8">
@ -476,13 +489,13 @@
<input name="paymentTerms" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">发票代码:</label>
<div class="col-sm-8">
<input name="invoiceCode" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">目的港:</label>
<div class="col-sm-8">
<input name="portOfDestination" class="form-control" type="text" readonly>
@ -497,13 +510,13 @@
</div>
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">结汇银行:</label>
<div class="col-sm-8">
<input name="settlementBank" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">结汇账号:</label>
<div class="col-sm-8">
<input name="exchangeSettlementAccount" class="form-control" type="text" readonly>
@ -557,43 +570,43 @@
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">目的地港代号:</label>
<div class="col-sm-8">
<input name="destinationPortCode" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">起运潜名:</label>
<div class="col-sm-8">
<input name="departurePotentialName" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">起运潜代号:</label>
<div class="col-sm-8">
<input name="departurePotentialCode" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">统一编号:</label>
<div class="col-sm-8">
<input name="unifiedNumbering" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">出货需录入使用量:</label>
<div class="col-sm-8">
<input name="shipmentUsage" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">制单人:</label>
<div class="col-sm-8">
<input name="voucherPreparation" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">确认人:</label>
<div class="col-sm-8">
<input name="identifyingPeople" class="form-control" type="text" readonly>
@ -610,13 +623,13 @@
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">税率:</label>
<div class="col-sm-8">
<input name="taxRate" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">国家/地区编号:</label>
<div class="col-sm-8">
<!-- <select name="countryNumber" class="form-control m-b" th:with="type=${@dict.getType('sys_country_number')}">-->
@ -650,7 +663,61 @@
</div>
</div>
</div>
<div class="modal fade" id="AuditModel">
<div class="modal-dialog">
<div class="modal-content message_align">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">×</span></button>
<h4 class="modal-title">审核信息</h4>
</div>
<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>
<div class="col-sm-8">
<input id="supplierQuotationId" name="supplierQuotationId" class="form-control" type="text"
required
readonly>
</div>
</div>
<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"
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">
</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>
</div>
</div>
</div>
</div>
<div class="alert alert-success hide">审核成功</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: select2-js"/>
@ -680,6 +747,36 @@
columns: [{
checkbox: true
},
{
field: 'deginflag',
title: '审核状态',
formatter: function (value, row, index) {
if (value == 0){
return "待审核";
}
if(value==1){
return "审核通过";
}
if (value == 2){
return "审核拒绝";
}
},
},
{
field: 'delflag',
title: '客户状态',
formatter: function (value, row, index) {
if (value == 0){
return "否";
}
if(value==1){
return "是";
}
if (value == 2){
return "作废";
}
},
},
{
field: 'customerId',
title: '客户id',
@ -1545,7 +1642,45 @@
});
$("#detailsModal").modal("show");
})
function quotationAudit() {
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());
$("#AuditModel").modal("show");
} else {
$.modal.alert("请选择一条数据");
}
}
function AuditConfirmSubmit() {
var auditNo = $("#auditNo").val()
$.ajax({
url: prefix + "/edit",
type: "post",
resultType: "json",
data: $('#form-audit-edit').serialize(),
success: function (resp) {
console.log(resp)
$("#bootstrap-table").bootstrapTable('refresh');
// $(".alert-success").addClass("show");
// window.setTimeout(function () {
// $(".alert-success").removeClass("show");
// }, 1000);//显示的时间
if (auditNo == 1) {
$.modal.msgSuccess("审核成功!")
} else if (auditNo == 0) {
$.modal.msgSuccess("取消审核成功!")
}
},
error: function () {
$.modal.msgError("出错了!");
}
});
}
//导出
function exportCustomerInfo() {
// rows为选中行的id

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

@ -10,7 +10,7 @@
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-customer-edit" th:object="${sysCustomer}">
<input name="customerId" th:field="*{customerId}" type="hidden">
<div class="form-group">
<div class="form-group" hidden="hidden" readonly>
<label class="col-sm-3 control-label is-required">客户/企业代码:</label>
<div class="col-sm-8">
<input name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" required>
@ -36,6 +36,18 @@
<input name="englishName" th:field="*{englishName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户公司简称:</label>
<div class="col-sm-8">
<input name="customerAbbreviation" th:field="*{customerAbbreviation}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">事业部:</label>
<div class="col-sm-8">
<input name="customerPurser" th:field="*{customerPurser}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">地址:</label>
<div class="col-sm-8">
@ -71,15 +83,21 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系人:</label>
<label class="col-sm-3 control-label">职务:</label>
<div class="col-sm-8">
<input name="customerOffice" th:field="*{customerOffice}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label ">联系人:</label>
<div class="col-sm-8">
<input name="customerContact" th:field="*{customerContact}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系电话:</label>
<label class="col-sm-3 control-label" >联系电话:</label>
<div class="col-sm-8">
<input name="contactNumber" th:field="*{contactNumber}" class="form-control" type="text">
<input name="contactNumber" required th:field="*{contactNumber}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
@ -94,12 +112,6 @@
<input name="customerEmail" th:field="*{customerEmail}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户简称:</label>
<div class="col-sm-8">
<input name="customerAbbreviation" th:field="*{customerAbbreviation}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">海关代码:</label>
<div class="col-sm-8">
@ -138,7 +150,7 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">开票公司名称</label>
<label class="col-sm-3 control-label">开票公司税号</label>
<div class="col-sm-8">
<input name="invoicingCompanyName" th:field="*{invoicingCompanyName}" class="form-control" type="text">
</div>
@ -164,13 +176,13 @@
<input name="invoiceCode" th:field="*{invoiceCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">目的港:</label>
<div class="col-sm-8">
<input name="portOfDestination" th:field="*{portOfDestination}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">成立日期:</label>
<div class="col-sm-8">
<div class="input-group date">
@ -179,20 +191,20 @@
</div>
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">结汇银行:</label>
<div class="col-sm-8">
<input name="settlementBank" th:field="*{settlementBank}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group"hidden="hidden">
<label class="col-sm-3 control-label">结汇账号:</label>
<div class="col-sm-8">
<input name="exchangeSettlementAccount" th:field="*{exchangeSettlementAccount}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">RMB注册资金:</label>
<div class="col-sm-8">
<input name="rmbRegisteredCapital" th:field="*{rmbRegisteredCapital}" class="form-control" type="text">
@ -204,7 +216,7 @@
<input name="registeredCapital" th:field="*{registeredCapital}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">订单号长度:</label>
<div class="col-sm-8">
<input name="orderLength" th:field="*{orderLength}" class="form-control" type="text">
@ -219,34 +231,34 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">业务员:</label>
<label class="col-sm-3 control-label is-required">业务员:</label>
<div class="col-sm-8">
<!-- <select name="businessMembers" class="form-control m-b">-->
<!-- <option value="">所有</option>-->
<!-- </select>-->
<input name="businessMembers" th:field="*{businessMembers}" class="form-control" type="text">
<input name="businessMembers" th:field="*{businessMembers}" required class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">目的地港代号:</label>
<div class="col-sm-8">
<input name="destinationPortCode" th:field="*{destinationPortCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">起运潜名:</label>
<div class="col-sm-8">
<input name="departurePotentialName" th:field="*{departurePotentialName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">起运潜代号:</label>
<div class="col-sm-8">
<input name="departurePotentialCode" th:field="*{departurePotentialCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">统一编号:</label>
<div class="col-sm-8">
<input name="unifiedNumbering" th:field="*{unifiedNumbering}" class="form-control" type="text">
@ -258,7 +270,7 @@
<textarea name="customerRemarks" class="form-control">[[*{customerRemarks}]]</textarea>
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">出货需录入使用量:</label>
<div class="col-sm-8">
<!-- <input name="shipmentUsage" th:field="*{shipmentUsage}" class="form-control" type="text">-->
@ -273,8 +285,8 @@
<input name="voucherPreparation" th:field="*{voucherPreparation}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">确认人:</label>
<div class="form-group">
<label class="col-sm-3 control-label" readonly>确认人:</label>
<div class="col-sm-8">
<input name="identifyingPeople" th:field="*{identifyingPeople}" class="form-control" type="text">
</div>
@ -302,13 +314,19 @@
</select>
</div>
</div>
</form>
<div class="col-sm-6">
<button class="btn-primary">审批通过</button>
<button class="btn-danger">审批拒绝</button>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "system/customer";
$("#form-customer-edit").validate({
focusCleanup: true
@ -316,7 +334,7 @@
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-customer-edit').serialize());
$.operate.save(prefix + "/add", $('#form-customer-edit').serialize());
}
}

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

@ -540,10 +540,10 @@
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)
$("#deginfalg").val(1).trigger("change")
$("#updateby").val(userName)
$("#updateTime").datetimepicker("setDate", new Date());
$("#AuditModel").modal("show");
} else {
$.modal.alert("请选择一条数据");

BIN
ruoyi-framework/target/classes/com/ruoyi/framework/config/ShiroConfig.class

Binary file not shown.

BIN
ruoyi-framework/target/classes/com/ruoyi/framework/manager/ShutdownManager.class

Binary file not shown.

BIN
ruoyi-framework/target/classes/com/ruoyi/framework/manager/factory/AsyncFactory$1.class

Binary file not shown.

BIN
ruoyi-framework/target/classes/com/ruoyi/framework/manager/factory/AsyncFactory$2.class

Binary file not shown.

BIN
ruoyi-framework/target/classes/com/ruoyi/framework/manager/factory/AsyncFactory$3.class

Binary file not shown.

BIN
ruoyi-framework/target/classes/com/ruoyi/framework/manager/factory/AsyncFactory.class

Binary file not shown.

BIN
ruoyi-framework/target/classes/com/ruoyi/framework/shiro/service/SysPasswordService.class

Binary file not shown.

BIN
ruoyi-framework/target/classes/com/ruoyi/framework/shiro/service/SysShiroService.class

Binary file not shown.

BIN
ruoyi-framework/target/classes/com/ruoyi/framework/shiro/session/OnlineSessionDAO.class

Binary file not shown.

BIN
ruoyi-framework/target/classes/com/ruoyi/framework/shiro/web/filter/LogoutFilter.class

Binary file not shown.

BIN
ruoyi-framework/target/classes/com/ruoyi/framework/shiro/web/filter/online/OnlineSessionFilter.class

Binary file not shown.

BIN
ruoyi-framework/target/classes/com/ruoyi/framework/shiro/web/filter/sync/SyncOnlineSessionFilter.class

Binary file not shown.

BIN
ruoyi-framework/target/classes/com/ruoyi/framework/shiro/web/session/OnlineWebSessionManager.class

Binary file not shown.

BIN
ruoyi-framework/target/classes/com/ruoyi/framework/shiro/web/session/SpringSessionValidationScheduler$1.class

Binary file not shown.

BIN
ruoyi-framework/target/classes/com/ruoyi/framework/shiro/web/session/SpringSessionValidationScheduler.class

Binary file not shown.

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

Binary file not shown.

2
ruoyi-generator/target/classes/templates/tool/gen/edit.html

@ -521,6 +521,7 @@
var options = {
title: '选择字典类型',
width: "380",
height: "580",
url: url,
callBack: doDictSubmit
};
@ -535,6 +536,7 @@
var options = {
title: '菜单选择',
width: "380",
height: "580",
url: url,
callBack: doMenuSubmit
};

11
ruoyi-generator/target/classes/vm/html/list.html.vm

@ -88,6 +88,8 @@
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('${permissionPrefix}:edit')}]];
var removeFlag = [[${@permission.hasPermi('${permissionPrefix}:remove')}]];
var cancelFlag = [[${@permission.hasPermi('${permissionPrefix}:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('${permissionPrefix}:restore')}]];
#foreach($column in $columns)
#if(${column.dictType} != '')
var ${column.javaField}Datas = [[${@dict.getType('${column.dictType}')}]];
@ -101,6 +103,8 @@
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
cancelUrl: prefix + "/cancel/{id}",
restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export",
modalName: "${functionName}",
columns: [{
@ -142,7 +146,12 @@
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.${pkColumn.javaField} + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.${pkColumn.javaField} + '\')"><i class="fa fa-remove"></i>删除</a>');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.${pkColumn.javaField} + '\')"><i class="fa fa-remove"></i>删除</a> ');
if(row.delFlag == '0'){
actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i>作废</a> ');
}else{
actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i>恢复</a> ');
}
return actions.join('');
}
}]

25
ruoyi-generator/target/classes/vm/java/controller.java.vm

@ -158,6 +158,31 @@ public class ${ClassName}Controller extends BaseController
{
return toAjax(${className}Service.delete${ClassName}ByIds(ids));
}
/**
* 作废${functionName}
*/
@RequiresPermissions("${permissionPrefix}:cancel")
@Log(title = "${functionName}", businessType = BusinessType.CANCEL)
@GetMapping( "/cancel/{id}")
@ResponseBody
public AjaxResult cancel(@PathVariable("id") Long id){
return toAjax(${className}Service.cancel${ClassName}ById(id));
}
/**
* 恢复${functionName}
*/
@RequiresPermissions("${permissionPrefix}:restore")
@Log(title = "${functionName}", businessType = BusinessType.RESTORE)
@GetMapping( "/restore/{id}")
@ResponseBody
public AjaxResult restore(@PathVariable("id")Long id)
{
return toAjax(${className}Service.restore${ClassName}ById(id));
}
#elseif($table.tree)
/**
* 删除

19
ruoyi-generator/target/classes/vm/java/mapper.java.vm

@ -61,6 +61,22 @@ public interface ${ClassName}Mapper
* @return 结果
*/
public int delete${ClassName}ByIds(String[] ${pkColumn.javaField}s);
/**
* 作废${functionName}
*
* @param ${pkColumn.javaField} ${functionName}ID
* @return 结果
*/
public int cancel${ClassName}ById(${pkColumn.javaType} ${pkColumn.javaField});
/**
* 恢复${functionName}
*
* @param ${pkColumn.javaField} ${functionName}ID
* @return 结果
*/
public int restore${ClassName}ById(${pkColumn.javaType} ${pkColumn.javaField});
#if($table.sub)
/**
@ -70,7 +86,7 @@ public interface ${ClassName}Mapper
* @return 结果
*/
public int delete${subClassName}By${subTableFkClassName}s(String[] ${pkColumn.javaField}s);
/**
* 批量新增${subTable.functionName}
*
@ -78,7 +94,6 @@ public interface ${ClassName}Mapper
* @return 结果
*/
public int batch${subClassName}(List<${subClassName}> ${subclassName}List);
/**
* 通过${functionName}ID删除${subTable.functionName}信息

14
ruoyi-generator/target/classes/vm/java/service.java.vm

@ -61,6 +61,20 @@ public interface I${ClassName}Service
* @return 结果
*/
public int delete${ClassName}ById(${pkColumn.javaType} ${pkColumn.javaField});
/**
* 作废${functionName}
* @param ${pkColumn.javaField} ${functionName}ID
* @return
*/
int cancel${ClassName}ById(${pkColumn.javaType} ${pkColumn.javaField});
/**
* 恢复${functionName}
* @param ${pkColumn.javaField} ${functionName}ID
* @return
*/
int restore${ClassName}ById(${pkColumn.javaType} ${pkColumn.javaField});
#if($table.tree)
/**

38
ruoyi-generator/target/classes/vm/java/serviceImpl.java.vm

@ -11,6 +11,12 @@ import com.ruoyi.common.utils.DateUtils;
#break
#end
#end
#foreach ($column in $columns)
#if($column.javaField == 'createBy' || $column.javaField == 'updateBy')
import com.ruoyi.common.utils.ShiroUtils;
#break
#end
#end
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
#if($table.sub)
@ -73,6 +79,10 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service
public int insert${ClassName}(${ClassName} ${className})
{
#foreach ($column in $columns)
#if($column.javaField == 'createBy')
String loginName = ShiroUtils.getLoginName();
${className}.setCreateBy(loginName);
#end
#if($column.javaField == 'createTime')
${className}.setCreateTime(DateUtils.getNowDate());
#end
@ -99,6 +109,10 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service
public int update${ClassName}(${ClassName} ${className})
{
#foreach ($column in $columns)
#if($column.javaField == 'updateBy')
String loginName = ShiroUtils.getLoginName();
${className}.setUpdateBy(loginName);
#end
#if($column.javaField == 'updateTime')
${className}.setUpdateTime(DateUtils.getNowDate());
#end
@ -142,6 +156,30 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service
#end
return ${className}Mapper.delete${ClassName}ById(${pkColumn.javaField});
}
/**
* 作废${functionName}
*
* @param ${pkColumn.javaField} ${functionName}ID
* @return 结果
*/
@Override
public int cancel${ClassName}ById(${pkColumn.javaType} ${pkColumn.javaField})
{
return ${className}Mapper.cancel${ClassName}ById(${pkColumn.javaField});
}
/**
* 恢复${functionName}信息
*
* @param ${pkColumn.javaField} ${functionName}ID
* @return 结果
*/
@Override
public int restore${ClassName}ById(${pkColumn.javaType} ${pkColumn.javaField})
{
return ${className}Mapper.restore${ClassName}ById(${pkColumn.javaField});
}
#if($table.tree)
/**

6
ruoyi-generator/target/classes/vm/sql/sql.vm

@ -18,5 +18,11 @@ values('${functionName}修改', @parentId, '3', '#', 'F', '0', '${permissionPr
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('${functionName}删除', @parentId, '4', '#', 'F', '0', '${permissionPrefix}:remove', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('${functionName}作废', @parentId, '4', '#', 'F', '0', '${permissionPrefix}:cancel', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('${functionName}恢复', @parentId, '4', '#', 'F', '0', '${permissionPrefix}:restore', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('${functionName}导出', @parentId, '5', '#', 'F', '0', '${permissionPrefix}:export', '#', 'admin', sysdate(), '', null, '');

8
ruoyi-generator/target/classes/vm/xml/mapper.xml.vm

@ -123,6 +123,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{${pkColumn.javaField}}
</foreach>
</delete>
<update id="cancel${ClassName}ById" parameterType="${pkColumn.javaType}">
update ${tableName} set del_flag = '1' where ${pkColumn.columnName} = #{${pkColumn.javaField}}
</update>
<update id="restore${ClassName}ById" parameterType="${pkColumn.javaType}">
update ${tableName} set del_flag = '0' where ${pkColumn.columnName} = #{${pkColumn.javaField}}
</update>
#if($table.sub)
<delete id="delete${subClassName}By${subTableFkClassName}s" parameterType="String">

BIN
ruoyi-system/target/classes/com/ruoyi/system/mapper/SysUserOnlineMapper.class

Binary file not shown.

BIN
ruoyi-system/target/classes/com/ruoyi/system/service/ISysConfigService.class

Binary file not shown.

BIN
ruoyi-system/target/classes/com/ruoyi/system/service/ISysDictTypeService.class

Binary file not shown.

BIN
ruoyi-system/target/classes/com/ruoyi/system/service/ISysUserOnlineService.class

Binary file not shown.

BIN
ruoyi-system/target/classes/com/ruoyi/system/service/impl/SysConfigServiceImpl.class

Binary file not shown.

BIN
ruoyi-system/target/classes/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.class

Binary file not shown.

BIN
ruoyi-system/target/classes/com/ruoyi/system/service/impl/SysUserOnlineServiceImpl.class

Binary file not shown.

57
ruoyi-system/target/classes/mapper/system/SysUserOnlineMapper.xml

@ -1,57 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysUserOnlineMapper">
<resultMap type="SysUserOnline" id="SysUserOnlineResult">
<id property="sessionId" column="sessionId" />
<result property="loginName" column="login_name" />
<result property="deptName" column="dept_name" />
<result property="ipaddr" column="ipaddr" />
<result property="loginLocation" column="login_location" />
<result property="browser" column="browser" />
<result property="os" column="os" />
<result property="status" column="status" />
<result property="startTimestamp" column="start_timestamp" />
<result property="lastAccessTime" column="last_access_time" />
<result property="expireTime" column="expire_time" />
</resultMap>
<sql id="selectOnlineVo">
select sessionId, login_name, dept_name, ipaddr, login_location, browser, os, status, start_timestamp, last_access_time, expire_time
from sys_user_online
</sql>
<select id="selectOnlineById" parameterType="String" resultMap="SysUserOnlineResult">
<include refid="selectOnlineVo"/>
where sessionId = #{sessionId}
</select>
<insert id="saveOnline" parameterType="SysUserOnline">
replace into sys_user_online(sessionId, login_name, dept_name, ipaddr, login_location, browser, os, status, start_timestamp, last_access_time, expire_time)
values (#{sessionId}, #{loginName}, #{deptName}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{status}, #{startTimestamp}, #{lastAccessTime}, #{expireTime})
</insert>
<delete id="deleteOnlineById" parameterType="String">
delete from sys_user_online where sessionId = #{sessionId}
</delete>
<select id="selectUserOnlineList" parameterType="SysUserOnline" resultMap="SysUserOnlineResult">
<include refid="selectOnlineVo"/>
<where>
<if test="ipaddr != null and ipaddr != ''">
AND ipaddr like concat('%', #{ipaddr}, '%')
</if>
<if test="loginName != null and loginName != ''">
AND login_name like concat('%', #{loginName}, '%')
</if>
</where>
</select>
<select id="selectOnlineByExpired" parameterType="String" resultMap="SysUserOnlineResult">
<include refid="selectOnlineVo"/> o
WHERE o.last_access_time <![CDATA[ <= ]]> #{lastAccessTime} ORDER BY o.last_access_time ASC
</select>
</mapper>
Loading…
Cancel
Save