Browse Source

[update]销售模块:客户基本资料,添加联系人弹窗页面隐藏生日、家中电话字段,审批添加收货人信息,

客户资料:编辑新增审核提交方法。添加客户资料审核流程。
dev
zhangsiqi 10 months ago
parent
commit
b3bb50e780
  1. 94
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java
  2. 17
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysCustomerOper.java
  3. 5
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerService.java
  4. 4
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerOperServiceImpl.java
  5. 60
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java
  6. 24
      ruoyi-admin/src/main/resources/mapper/system/SysCustomerMapper.xml
  7. 54
      ruoyi-admin/src/main/resources/mapper/system/SysCustomerOperMapper.xml
  8. 60
      ruoyi-admin/src/main/resources/templates/system/contacts/add.html
  9. 2
      ruoyi-admin/src/main/resources/templates/system/contacts/contacts.html
  10. 9
      ruoyi-admin/src/main/resources/templates/system/contacts/edit.html
  11. 4
      ruoyi-admin/src/main/resources/templates/system/customer/customer.html
  12. 196
      ruoyi-admin/src/main/resources/templates/system/customer/detail.html
  13. 41
      ruoyi-admin/src/main/resources/templates/system/customer/edit.html
  14. 37
      ruoyi-admin/src/main/resources/templates/system/customer/taskModifyApply.html
  15. 36
      ruoyi-admin/src/main/resources/templates/system/customer/taskYwjlVerify.html
  16. 40
      ruoyi-admin/src/main/resources/templates/system/customer/taskYwzgVerify.html
  17. 39
      ruoyi-admin/src/main/resources/templates/system/customer/taskZozjVerify.html
  18. 2
      ruoyi-admin/src/main/resources/templates/system/invoice/invoice.html
  19. 30
      ruoyi-admin/src/main/resources/templates/system/shippingaddress/shippingaddress.html

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

@ -11,10 +11,13 @@ import com.ruoyi.ck.utils.Result;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysDictData; import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.process.general.service.IProcessService; import com.ruoyi.process.general.service.IProcessService;
@ -78,6 +81,10 @@ public class SysCustomerController extends BaseController
@Autowired @Autowired
private IProcessService processService; private IProcessService processService;
@Autowired
private ISysUserService userService;
@Autowired
private ISysPostService sysPostService;
@RequiresPermissions("system:customer:view") @RequiresPermissions("system:customer:view")
@GetMapping() @GetMapping()
@ -96,7 +103,6 @@ public class SysCustomerController extends BaseController
{ {
SysUser curUser = ShiroUtils.getSysUser(); SysUser curUser = ShiroUtils.getSysUser();
Long userId = curUser.getUserId(); Long userId = curUser.getUserId();
Set<String> roleKeys = roleService.selectRoleKeys(userId);
// 业务员角色只能看到自己创建的数据 // 业务员角色只能看到自己创建的数据
startPage(); startPage();
List<SysCustomerVo> list = sysCustomerService.selectSysCustomerList(sysCustomerVo); List<SysCustomerVo> list = sysCustomerService.selectSysCustomerList(sysCustomerVo);
@ -137,6 +143,7 @@ public class SysCustomerController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult addSave(SysCustomer sysCustomer) public AjaxResult addSave(SysCustomer sysCustomer)
{ {
//判断是否客户对象增加重复
SysCustomerVo sysCustomer1 = new SysCustomerVo(); SysCustomerVo sysCustomer1 = new SysCustomerVo();
sysCustomer1.setEnterpriseName(sysCustomer.getEnterpriseName()); sysCustomer1.setEnterpriseName(sysCustomer.getEnterpriseName());
sysCustomer1.setCustomerPurser(sysCustomer.getCustomerPurser()); sysCustomer1.setCustomerPurser(sysCustomer.getCustomerPurser());
@ -147,22 +154,31 @@ public class SysCustomerController extends BaseController
"事业部 : "+ sysCustomerVo2.getCustomerPurser() + "事业部 : "+ sysCustomerVo2.getCustomerPurser() +
" 业务员 : " + sysCustomerVo2.getBusinessMembers()); " 业务员 : " + sysCustomerVo2.getBusinessMembers());
} }
Integer ok = sysCustomerService.insertSysCustomer(sysCustomer); SysUser sysUser = ShiroUtils.getSysUser();
List<SysPost> sysPostsList = sysPostService.selectPostsByUserId(sysUser.getUserId());
sysPostsList.get(0).getPostName();
String operPeople = sysUser.getDept().getDeptName() + "/" + sysPostsList.get(0).getPostName()+"/" + sysUser.getUserName();
//通过用户获取部门信息
// 使用状态-否
sysCustomer.setUseStatus("0");
// 审核状态-待审核
sysCustomer.setAuditStatus("0");
//添加操作记录 //添加操作记录
SysCustomerOper sysCustomerOper = new SysCustomerOper(); SysCustomerOper sysCustomerOper = new SysCustomerOper();
sysCustomerOper.setPurser(sysCustomer.getCustomerPurser()); sysCustomerOper.setPurser(sysCustomer.getCustomerPurser());
sysCustomerOper.setEnterpriseCode(sysCustomer.getEnterpriseCode()); sysCustomerOper.setEnterpriseCode(sysCustomer.getEnterpriseCode());
sysCustomerOper.setEnterpriseName(sysCustomer.getEnterpriseName()); sysCustomerOper.setEnterpriseName(sysCustomer.getEnterpriseName());
sysCustomerOper.setOper("新增"); sysCustomerOper.setOper("新");
sysCustomerOper.setOperPeople(ShiroUtils.getLoginName()); sysCustomerOper.setOperPeople(operPeople);
sysCustomerOper.setOperStatus(sysCustomer.getAuditStatus()); sysCustomerOper.setOperStatus(sysCustomer.getAuditStatus());
sysCustomerOper.setCreateTime(new Date()); sysCustomerOper.setCreateTime(DateUtils.getNowDate());
sysCustomerOper.setOperStatus(ok > 0?"0":"1"); //根据是否有流程实例,判断是否新增成功
// 使用状态-否 ProcessInstance processInstance = sysCustomerService.submitApply(sysCustomer);
sysCustomer.setUseStatus("0"); if(processInstance != null){
// 审核状态-待审核 sysCustomerOper.setOperStatus("0");
sysCustomer.setAuditStatus("0"); }else{
sysCustomerService.submitApply(sysCustomer); sysCustomerOper.setOperStatus("1");
}
sysCustomerOperService.insertSysCustomerOper(sysCustomerOper); sysCustomerOperService.insertSysCustomerOper(sysCustomerOper);
return AjaxResult.success("添加成功,等待审核"); return AjaxResult.success("添加成功,等待审核");
} }
@ -199,35 +215,35 @@ public class SysCustomerController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult editSave(SysCustomer sysCustomer) public AjaxResult editSave(SysCustomer sysCustomer)
{ {
SysUser sysUser = ShiroUtils.getSysUser();
List<SysPost> sysPostsList = sysPostService.selectPostsByUserId(sysUser.getUserId());
String operPeople = sysUser.getDept().getDeptName() + "/" + sysPostsList.get(0).getPostName()+"/" + sysUser.getUserName();
//添加操作记录 //添加操作记录
sysCustomer.setUseStatus("0");
sysCustomer.setAuditStatus("0");
SysCustomerOper sysCustomerOper = new SysCustomerOper(); SysCustomerOper sysCustomerOper = new SysCustomerOper();
sysCustomerOper.setPurser(sysCustomer.getCustomerPurser()); sysCustomerOper.setPurser(sysCustomer.getCustomerPurser());
sysCustomerOper.setEnterpriseCode(sysCustomerOper.getEnterpriseCode()); sysCustomerOper.setEnterpriseCode(sysCustomerOper.getEnterpriseCode());
sysCustomerOper.setEnterpriseName(sysCustomer.getEnterpriseName()); sysCustomerOper.setEnterpriseName(sysCustomer.getEnterpriseName());
sysCustomerOper.setOper("修改"); sysCustomerOper.setOper("修改");
sysCustomerOper.setOperPeople(ShiroUtils.getLoginName()); sysCustomerOper.setOperPeople(operPeople);
sysCustomerOper.setOperStatus(sysCustomer.getAuditStatus()); sysCustomerOper.setOperStatus(sysCustomer.getAuditStatus());
ProcessInstance processInstance = sysCustomerService.updateSysCustomerVo(sysCustomer);
if(processInstance != null){
sysCustomerOper.setOperStatus("0");
}else{
sysCustomerOper.setOperStatus("1");
}
sysCustomerOperService.insertSysCustomerOper(sysCustomerOper); sysCustomerOperService.insertSysCustomerOper(sysCustomerOper);
//审核客户表 return AjaxResult.success("编辑成功,等待审核");
return toAjax(sysCustomerService.updateSysCustomer(sysCustomer));
} }
@RequiresPermissions("system:customer:audit") @RequiresPermissions("system:customer:audit")
@Log(title = "客户基本信息", businessType = BusinessType.UPDATE) @Log(title = "客户基本信息", businessType = BusinessType.UPDATE)
@PostMapping("/audit") @PostMapping("/audit")
@ResponseBody @ResponseBody
public AjaxResult editaudit(SysCustomer sysCustomer) public AjaxResult editaudit(SysCustomerVo 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.getAuditStatus());
sysCustomerOper.setRemark(sysCustomer.getRemark());
sysCustomerOperService.insertSysCustomerOper(sysCustomerOper);
//审核客户表 //审核客户表
return toAjax(sysCustomerService.updateSysCustomer(sysCustomer)); return toAjax(sysCustomerService.updateSysCustomer(sysCustomer));
} }
@ -369,10 +385,17 @@ public class SysCustomerController extends BaseController
boolean saveEntityBoolean = BooleanUtils.toBoolean(saveEntity); boolean saveEntityBoolean = BooleanUtils.toBoolean(saveEntity);
String instanceId = sysCustomerVo.getInstanceId(); String instanceId = sysCustomerVo.getInstanceId();
String instanceType = sysCustomerVo.getInstanceType(); String instanceType = sysCustomerVo.getInstanceType();
boolean approvedFlag = processService.complete(taskId, instanceId, sysCustomerVo.getApplyTitle(), sysCustomerVo.getCustomsCode(), "SysCustomer", new HashMap<String, Object>(), request); boolean approvedFlag = processService.complete(taskId, instanceId, sysCustomerVo.getApplyTitle(),
sysCustomerVo.getCustomsCode(), "customer", new HashMap<String, Object>(), request);
SysUser sysUser = ShiroUtils.getSysUser();
SysCustomerOper sysCustomerOper = new SysCustomerOper();
List<SysPost> sysPostsList = sysPostService.selectPostsByUserId(sysUser.getUserId());
String operPeople = sysUser.getDept().getDeptName() + "/" + sysPostsList.get(0).getPostName()+"/" + sysUser.getUserName();
sysCustomerOper.setOper("审核通过");
if(!approvedFlag){ if(!approvedFlag){
// 审核状态-审核拒绝 // 审核状态-审核拒绝
sysCustomerVo.setAuditStatus("2"); sysCustomerVo.setAuditStatus("2");
sysCustomerOper.setOper("审核拒绝");
} }
// 如果任务已结束更新业务表状态 // 如果任务已结束更新业务表状态
boolean processIsFinish = processService.judgeProcessIsFinish(instanceId); boolean processIsFinish = processService.judgeProcessIsFinish(instanceId);
@ -381,25 +404,42 @@ public class SysCustomerController extends BaseController
sysCustomerVo.setAuditStatus("1"); sysCustomerVo.setAuditStatus("1");
// 提交 // 提交
if("submit".equals(instanceType)){ if("submit".equals(instanceType)){
sysCustomerOper.setOper("审核通过");
// 使用状态-是 // 使用状态-是
sysCustomerVo.setUseStatus("1"); sysCustomerVo.setUseStatus("1");
} }
// 作废 // 作废
else if("cancel".equals(instanceType)){ else if("cancel".equals(instanceType)){
sysCustomerOper.setOper("作废");
// 使用状态-已作废 // 使用状态-已作废
sysCustomerVo.setUseStatus("2"); sysCustomerVo.setUseStatus("2");
} }
// 恢复 // 恢复
else if("restore".equals(instanceType)){ else if("restore".equals(instanceType)){
sysCustomerOper.setOper("恢复");
// 使用状态-是 // 使用状态-是
sysCustomerVo.setUseStatus("1"); sysCustomerVo.setUseStatus("1");
} }
sysCustomerVo.setUseStatus("1");
sysCustomerOper.setPurser(sysCustomerVo.getCustomerPurser());
sysCustomerOper.setEnterpriseCode(sysCustomerOper.getEnterpriseCode());
sysCustomerOper.setEnterpriseName(sysCustomerVo.getEnterpriseName());
sysCustomerOper.setOper(instanceType);
sysCustomerOper.setOperPeople(operPeople);
} }
sysCustomerService.updateSysCustomer(sysCustomerVo); sysCustomerService.updateSysCustomer(sysCustomerVo);
// 驳回申请后继续申请,可能修改表单 // 驳回申请后继续申请,可能修改表单
if (saveEntityBoolean) { if (saveEntityBoolean) {
sysCustomerOper.setOper("驳回申请");
sysCustomerService.updateSysCustomer(sysCustomerVo); sysCustomerService.updateSysCustomer(sysCustomerVo);
} }
sysCustomerOper.setPurser(sysCustomerVo.getCustomerPurser());
sysCustomerOper.setEnterpriseCode(sysCustomerOper.getEnterpriseCode());
sysCustomerOper.setEnterpriseName(sysCustomerVo.getEnterpriseName());
sysCustomerOper.setOperPeople(operPeople);
sysCustomerOper.setOperStatus(sysCustomerVo.getAuditStatus());
sysCustomerOper.setCreateTime(DateUtils.getNowDate());
sysCustomerOperService.insertSysCustomerOper(sysCustomerOper);
return success("任务已完成"); return success("任务已完成");
} }
@ModelAttribute("/preloadObj") @ModelAttribute("/preloadObj")

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

@ -15,7 +15,6 @@ public class SysCustomerOper extends BaseEntity {
private String enterpriseName; private String enterpriseName;
//操作 //操作
private String oper; private String oper;
private Date createTime;
private String operPeople; private String operPeople;
private String operStatus; private String operStatus;
@ -80,14 +79,14 @@ public class SysCustomerOper extends BaseEntity {
@Override @Override
public String toString() { public String toString() {
return "SysCustomerOper{" + return "SysCustomerOper{" +
"id=" + id + "id=" + getId() +
", purser='" + purser + '\'' + ", purser='" + getPurser() + '\'' +
", enterpriseCode='" + enterpriseCode + '\'' + ", enterpriseCode='" + getEnterpriseCode() + '\'' +
", enterpriseName='" + enterpriseName + '\'' + ", enterpriseName='" + getEnterpriseName() + '\'' +
", oper='" + oper + '\'' + ", oper='" + getOper() + '\'' +
", createTime=" + createTime + ", createTime=" + getCreateTime() +
", operPeople='" + operPeople + '\'' + ", operPeople='" + getOperPeople() + '\'' +
", operStatus='" + operStatus + '\'' + ", operStatus='" + getOperStatus() + '\'' +
'}'; '}';
} }
} }

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

@ -44,10 +44,10 @@ public interface ISysCustomerService
/** /**
* 修改客户基本信息 * 修改客户基本信息
* *
* @param sysCustomer 客户基本信息 * @param sysCustomerVo 客户基本信息
* @return 结果 * @return 结果
*/ */
public int updateSysCustomer(SysCustomer sysCustomer); public int updateSysCustomer(SysCustomerVo sysCustomerVo);
/** /**
* 批量删除客户基本信息 * 批量删除客户基本信息
@ -87,4 +87,5 @@ public interface ISysCustomerService
public ProcessInstance submitApply(SysCustomer sysCustomer); public ProcessInstance submitApply(SysCustomer sysCustomer);
ProcessInstance updateSysCustomerVo(SysCustomer sysCustomer);
} }

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

@ -1,5 +1,7 @@
package com.ruoyi.system.service.impl; package com.ruoyi.system.service.impl;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.SysCustomerOper; import com.ruoyi.system.domain.SysCustomerOper;
import com.ruoyi.system.mapper.SysCustomerOperMapper; import com.ruoyi.system.mapper.SysCustomerOperMapper;
import com.ruoyi.system.service.ISysCustomerOperService; import com.ruoyi.system.service.ISysCustomerOperService;
@ -34,6 +36,8 @@ public class SysCustomerOperServiceImpl implements ISysCustomerOperService
@Override @Override
public int insertSysCustomerOper(SysCustomerOper sysCustomerOper) { public int insertSysCustomerOper(SysCustomerOper sysCustomerOper) {
sysCustomerOper.setCreateTime(DateUtils.getNowDate());
sysCustomerOper.setCreateBy(ShiroUtils.getLoginName());
return sysCustomerOperMapper.insertSysCustomerOper(sysCustomerOper); return sysCustomerOperMapper.insertSysCustomerOper(sysCustomerOper);
} }

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

@ -16,6 +16,7 @@ import com.ruoyi.system.domain.*;
import com.ruoyi.system.mapper.SysCustomerMapper; import com.ruoyi.system.mapper.SysCustomerMapper;
import com.ruoyi.system.mapper.SysUserMapper; import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.service.ISysCustomerService; import com.ruoyi.system.service.ISysCustomerService;
import com.ruoyi.system.service.ISysInvoiceService;
import com.ruoyi.system.service.ISysRoleService; import com.ruoyi.system.service.ISysRoleService;
import org.activiti.engine.TaskService; import org.activiti.engine.TaskService;
import org.activiti.engine.impl.persistence.entity.TaskEntityImpl; import org.activiti.engine.impl.persistence.entity.TaskEntityImpl;
@ -27,10 +28,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import java.util.HashMap; import java.util.*;
import java.util.List;
import java.util.Map;
import java.util.Set;
/** /**
* 客户基本信息Service业务层处理 * 客户基本信息Service业务层处理
@ -54,6 +52,9 @@ public class SysCustomerServiceImpl implements ISysCustomerService
private SysContactsServiceImpl sysContacts; private SysContactsServiceImpl sysContacts;
@Autowired @Autowired
private SysShippingAddressServiceImpl sysShippingAddressService; private SysShippingAddressServiceImpl sysShippingAddressService;
@Autowired
private ISysInvoiceService sysInvoiceService;
@Autowired @Autowired
private SysUserMapper userMapper; private SysUserMapper userMapper;
@ -181,6 +182,16 @@ public class SysCustomerServiceImpl implements ISysCustomerService
sysShippingAddress.setEnterpriseName(sysCustomer.getEnterpriseName()); sysShippingAddress.setEnterpriseName(sysCustomer.getEnterpriseName());
sysShippingAddressService.insertSysShippingAddress(sysShippingAddress); sysShippingAddressService.insertSysShippingAddress(sysShippingAddress);
sysCustomer.setDeliveryAddressId(sysShippingAddress.getDeliveryId()); sysCustomer.setDeliveryAddressId(sysShippingAddress.getDeliveryId());
SysInvoice invoice = new SysInvoice();
invoice.setEnterpriseCode(sysCustomer.getEnterpriseCode());
invoice.setEnterpriseName(sysCustomer.getEnterpriseName());
invoice.setInvoiceCompanyCode(sysCustomer.getInvoiceCode());
invoice.setInvoiceCompanyName(sysCustomer.getInvoicingCompanyName());
invoice.setDepositBank(sysCustomer.getDepositBank());
invoice.setBankAccount(sysCustomer.getBankAccount());
invoice.setCreateBy(loginName);
invoice.setCreateTime(DateUtils.getNowDate());
sysInvoiceService.insertSysInvoice(invoice);
int result = sysCustomerMapper.insertSysCustomer(sysCustomer); int result = sysCustomerMapper.insertSysCustomer(sysCustomer);
sysCustomer.getCustomerId(); sysCustomer.getCustomerId();
return result; return result;
@ -189,15 +200,42 @@ public class SysCustomerServiceImpl implements ISysCustomerService
/** /**
* 修改客户基本信息 * 修改客户基本信息
* *
* @param sysCustomer 客户基本信息 * @param sysCustomerVo 客户基本信息
* @return 结果 * @return 结果
*/ */
@Override @Override
public int updateSysCustomer(SysCustomer sysCustomer) public int updateSysCustomer(SysCustomerVo sysCustomerVo){
{ String loginName = ShiroUtils.getLoginName();
return sysCustomerMapper.updateSysCustomer(sysCustomer); sysCustomerVo.setUpdateBy(loginName);
sysCustomerVo.setUpdateTime(DateUtils.getNowDate());
return sysCustomerMapper.updateSysCustomer(sysCustomerVo);
} }
@Transactional(rollbackFor = Exception.class)
public ProcessInstance updateSysCustomerVo(SysCustomer sysCustomer){
SysUser user = ShiroUtils.getSysUser();
sysCustomer.setApplyUser(user.getLoginName());
sysCustomer.setApplyTime(DateUtils.getNowDate());
// 启动流程
String applyTitle = user.getUserName()+"发起了客户信息修改审批-"+DateUtils.dateTimeNow();
String instanceType = "submit";
ProcessInstance processInstance = startProcessInstance(applyTitle,instanceType,sysCustomer, user);
String processInstanceId = processInstance.getProcessInstanceId();
// 提交实例id
sysCustomer.setSubmitInstanceId(processInstanceId);
// 存在提交完就流程结束的情况
boolean processIsFinish = processService.judgeProcessIsFinish(processInstanceId);
if(processIsFinish){
// 审核状态-审核通过
sysCustomer.setAuditStatus("1");
// 使用状态-是
sysCustomer.setUseStatus("1");
}
sysCustomerMapper.updateSysCustomer(sysCustomer);
return processInstance;
}
@Override @Override
public int deleteSysCustomerByIds(String[] ids) { public int deleteSysCustomerByIds(String[] ids) {
return sysCustomerMapper.deleteSysCustomerByIds(ids); return sysCustomerMapper.deleteSysCustomerByIds(ids);
@ -244,6 +282,7 @@ public class SysCustomerServiceImpl implements ISysCustomerService
@Override @Override
public int add(SysCustomer sysCustomer) { public int add(SysCustomer sysCustomer) {
return sysCustomerMapper.insertSysCustomer(sysCustomer); return sysCustomerMapper.insertSysCustomer(sysCustomer);
} }
@ -325,7 +364,9 @@ public class SysCustomerServiceImpl implements ISysCustomerService
SysUser user = ShiroUtils.getSysUser(); SysUser user = ShiroUtils.getSysUser();
sysCustomer.setApplyUser(user.getLoginName()); sysCustomer.setApplyUser(user.getLoginName());
sysCustomer.setApplyTime(DateUtils.getNowDate()); sysCustomer.setApplyTime(DateUtils.getNowDate());
insertSysCustomer(sysCustomer); if (sysCustomer.getCustomerId() == null || sysCustomer.getCustomerId() == 0){
insertSysCustomer(sysCustomer);
}
// 启动流程 // 启动流程
String applyTitle = user.getUserName()+"发起了客户信息提交审批-"+DateUtils.dateTimeNow(); String applyTitle = user.getUserName()+"发起了客户信息提交审批-"+DateUtils.dateTimeNow();
String instanceType = "submit"; String instanceType = "submit";
@ -351,7 +392,6 @@ public class SysCustomerServiceImpl implements ISysCustomerService
String businessKey = materialId.toString(); // 实体类 ID,作为流程的业务 key String businessKey = materialId.toString(); // 实体类 ID,作为流程的业务 key
String key = "customer"; String key = "customer";
Map<String,Object> variables = new HashMap<>(); Map<String,Object> variables = new HashMap<>();
insertSysCustomer(sysCustomer);
// 构造authority传参 // 构造authority传参
buildAuthority(user, variables); buildAuthority(user, variables);
sysCustomer.setApplyTitle(applyTitle); sysCustomer.setApplyTitle(applyTitle);

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

@ -102,6 +102,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="identifyingPeople" column="identifying_people" /> <result property="identifyingPeople" column="identifying_people" />
<result property="auditStatus" column="audit_status" /> <result property="auditStatus" column="audit_status" />
<result property="useStatus" column="use_status" /> <result property="useStatus" column="use_status" />
<result property="updateBy" column="update_by" />
<result property="customerSign" column="customer_sign" />
<result property="instanceId" column="instance_id" />
<result property="instanceType" column="instance_type" />
<result property="instanceTypeName" column="instance_type_name" />
<result property="submitInstanceId" column="submit_instance_id" />
<result property="cancelInstanceId" column="cancel_instance_id" />
<result property="restoreInstanceId" column="restore_instance_id" />
<result property="applyTitle" column="apply_title" />
<result property="applyUser" column="apply_user" />
<result property="applyTime" column="apply_time" />
</resultMap> </resultMap>
<sql id="selectSysCustomerVo"> <sql id="selectSysCustomerVo">
select id,enterprise_code,enterprise_name,english_name,customer_abbreviation ,customer_purser , select id,enterprise_code,enterprise_name,english_name,customer_abbreviation ,customer_purser ,
@ -226,10 +237,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="applyTitle != null">apply_title,</if> <if test="applyTitle != null">apply_title,</if>
<if test="applyUser != null">apply_user,</if> <if test="applyUser != null">apply_user,</if>
<if test="applyTime != null">apply_time,</if> <if test="applyTime != null">apply_time,</if>
use_status, <if test="useStatus != null">use_status,</if>
audit_status, <if test="auditStatus != null">audit_status,</if>
del_flag,
first_add_time,
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseCode!=null and enterpriseCode != ''">#{enterpriseCode},</if> <if test="enterpriseCode!=null and enterpriseCode != ''">#{enterpriseCode},</if>
@ -279,10 +288,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="applyTitle != null">#{applyTitle},</if> <if test="applyTitle != null">#{applyTitle},</if>
<if test="applyUser != null">#{applyUser},</if> <if test="applyUser != null">#{applyUser},</if>
<if test="applyTime != null">#{applyTime},</if> <if test="applyTime != null">#{applyTime},</if>
0, <if test="useStatus != null"> #{useStatus},</if>
0, <if test="auditStatus != null"> #{auditStatus},</if>
0,
now()
</trim> </trim>
</insert> </insert>
@ -340,7 +347,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="applyTitle != null">apply_title = #{applyTitle},</if> <if test="applyTitle != null">apply_title = #{applyTitle},</if>
<if test="applyUser != null">apply_user = #{applyUser},</if> <if test="applyUser != null">apply_user = #{applyUser},</if>
<if test="applyTime != null">apply_time = #{applyTime},</if> <if test="applyTime != null">apply_time = #{applyTime},</if>
update_info_time = now(),
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>

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

@ -5,27 +5,27 @@
<mapper namespace="com.ruoyi.system.mapper.SysCustomerOperMapper"> <mapper namespace="com.ruoyi.system.mapper.SysCustomerOperMapper">
<resultMap type="SysCustomerOper" id="SysCustomerOperResult"> <resultMap type="SysCustomerOper" id="SysCustomerOperResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="purser" column="purser" /> <result property="purser" column="purser" />
<result property="enterpriseCode" column="enterpriseCode" /> <result property="enterpriseCode" column="enterprise_code" />
<result property="enterpriseName" column="enterpriseName" /> <result property="enterpriseName" column="enterprise_name" />
<result property="oper" column="oper" /> <result property="oper" column="opertion" />
<result property="createTime" column="createTime" /> <result property="createTime" column="create_time" />
<result property="operPeople" column="operPeople" /> <result property="operPeople" column="oper_user" />
<result property="operStatus" column="operStatus" /> <result property="operStatus" column="oper_status" />
</resultMap> </resultMap>
<sql id="selectSysCustomerOperVo"> <sql id="selectSysCustomerOperVo">
select id,purser,enterpriseName,enterpriseCode,oper,createTime,operPeople,operStatus from sys_customer_oper select id,purser,enterprise_name,enterprise_code,opertion,create_time,oper_user,oper_status from sys_customer_oper
</sql> </sql>
<select id="selectSysCustomerOperList" parameterType="SysCustomerOper" resultMap="SysCustomerOperResult"> <select id="selectSysCustomerOperList" parameterType="SysCustomerOper" resultMap="SysCustomerOperResult">
<include refid="selectSysCustomerOperVo"/> <include refid="selectSysCustomerOperVo"/>
<where> <where>
<if test="purser != null and purser != ''"> and purser like concat('%', #{purser}, '%')</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 enterpriseName != ''"> and enterprise_name = #{enterpriseName}</if>
<if test="enterpriseName!= null and enterpriseCode != ''"> and enterpriseCode = #{enterpriseCode}</if> <if test="enterpriseCode!= null and enterpriseCode != ''"> and enterprise_code = #{enterpriseCode}</if>
<if test="operPeople != null and operPeople != ''"> and operPeople like concat('%', #{operPeople}, '%')</if> <if test="operPeople != null and operPeople != ''"> and oper_user like concat('%', #{operPeople}, '%')</if>
</where> </where>
</select> </select>
@ -37,33 +37,33 @@
<update id="updateSysCustomerOper" parameterType="SysCustomerOper"> <update id="updateSysCustomerOper" parameterType="SysCustomerOper">
update sys_customer_oper set update sys_customer_oper set
<if test="purser != null and purser != ''">purser = #{purser},</if> <if test="purser != null and purser != ''">purser = #{purser},</if>
<if test="enterpriseName!= null">enterpriseName = #{enterpriseName},</if> <if test="enterpriseName!= null">enterprise_name = #{enterpriseName},</if>
<if test="enterpriseCode!= null">enterprseCode = #{enterpriseCode},</if> <if test="enterpriseCode!= null">enterprse_code = #{enterpriseCode},</if>
<if test="oper != null and oper != ''"> oper = #{oper},</if> <if test="oper != null and oper != ''"> opertion = #{oper},</if>
<if test="operPeople != null">operPeople = #{operPeople},</if> <if test="operPeople != null">oper_user = #{operPeople},</if>
<if test="operStatus != null">operStatus = #{operStatus},</if> <if test="operStatus != null">oper_status = #{operStatus},</if>
<if test="createTime != null"> createTime = #{ createTime},</if> <if test="createTime != null"> create_time = #{ createTime},</if>
where id = #{id} where id = #{id}
</update> </update>
<insert id="insertSysCustomerOper" parameterType="SysCustomerOper" useGeneratedKeys="true" keyProperty="id"> <insert id="insertSysCustomerOper" parameterType="SysCustomerOper" useGeneratedKeys="true" keyProperty="id">
insert into sys_customer_oper insert into sys_customer_oper
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="purser != null and purser != ''">purser,</if> <if test="purser != null and purser != ''">purser,</if>
<if test="enterpriseCode!= null">enterpriseCode,</if> <if test="enterpriseCode!= null">enterprise_code,</if>
<if test="enterpriseName!= null">enterpriseName,</if> <if test="enterpriseName!= null">enterprise_name,</if>
<if test="oper != null and oper != ''">oper,</if> <if test="oper != null">opertion,</if>
<if test="operPeople != null">operPeople,</if> <if test="operPeople != null">oper_user,</if>
<if test="operStatus != null">operStatus,</if> <if test="operStatus != null">oper_status,</if>
createTime, <if test="createTime != null">create_time,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="purser != null and purser != ''">#{purser},</if> <if test="purser != null">#{purser},</if>
<if test="enterpriseCode!= null">#{enterpriseCode},</if> <if test="enterpriseCode!= null">#{enterpriseCode},</if>
<if test="enterpriseName!= null">#{enterpriseName},</if> <if test="enterpriseName!= null">#{enterpriseName},</if>
<if test="oper != null and oper != ''">#{oper},</if> <if test="oper != null">#{oper},</if>
<if test="operPeople != null">#{operPeople},</if> <if test="operPeople != null">#{operPeople},</if>
<if test="operStatus != null">#{operStatus},</if> <if test="operStatus != null">#{operStatus},</if>
now(), <if test="createTime != null">#{createTime},</if>
</trim> </trim>
</insert> </insert>
</mapper> </mapper>

60
ruoyi-admin/src/main/resources/templates/system/contacts/add.html

@ -9,8 +9,8 @@
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-contacts-add"> <form class="form-horizontal m" id="form-contacts-add">
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">客户/企业代码:</label> <label class="col-sm-6 control-label is-required">客户/企业代码:</label>
<div class="col-sm-8"> <div class="col-sm-6">
<select name="enterpriseCode" class="form-control m-b" required> <select name="enterpriseCode" class="form-control m-b" required>
<option value="">请选择客户代码</option> <option value="">请选择客户代码</option>
</select> </select>
@ -18,80 +18,80 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">客户/企业名称:</label> <label class="col-sm-6 control-label is-required">客户/企业名称:</label>
<div class="col-sm-8"> <div class="col-sm-6">
<input name="enterpriseName" class="form-control" type="text" required readonly> <input name="enterpriseName" class="form-control" type="text" required readonly>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">姓名:</label> <label class="col-sm-6 control-label is-required">姓名:</label>
<div class="col-sm-8"> <div class="col-sm-6">
<input name="customerName" class="form-control" type="text" required> <input name="customerName" class="form-control" type="text" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">职务:</label> <label class="col-sm-6 control-label">职务:</label>
<div class="col-sm-8"> <div class="col-sm-6">
<input name="customerPosition" class="form-control" type="text"> <input name="customerPosition" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group" hidden>
<label class="col-sm-3 control-label">生日:</label> <label class="col-sm-6 control-label">生日:</label>
<div class="col-sm-8"> <div class="col-sm-6">
<input name="customerBirthday" class="form-control" type="text"> <input name="customerBirthday" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">办公电话:</label> <label class="col-sm-6 control-label">办公电话:</label>
<div class="col-sm-8"> <div class="col-sm-6">
<input name="officeTelephone" class="form-control" type="text"> <input name="officeTelephone" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group" hidden>
<label class="col-sm-3 control-label">家中电话:</label> <label class="col-sm-6 control-label">家中电话:</label>
<div class="col-sm-8"> <div class="col-sm-6">
<input name="homePhone" class="form-control" type="text"> <input name="homePhone" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">手机号:</label> <label class="col-sm-6 control-label">手机号:</label>
<div class="col-sm-8"> <div class="col-sm-6">
<input name="cellPhone" class="form-control" type="text"> <input name="cellPhone" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">传真:</label> <label class="col-sm-6 control-label">传真:</label>
<div class="col-sm-8"> <div class="col-sm-6">
<input name="customerFax" class="form-control" type="text"> <input name="customerFax" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">备用电话1:</label> <label class="col-sm-6 control-label">备用电话1:</label>
<div class="col-sm-8"> <div class="col-sm-6">
<input name="standbyTelephoneOne" class="form-control" type="text"> <input name="standbyTelephoneOne" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">备用电话2:</label> <label class="col-sm-6 control-label">备用电话2:</label>
<div class="col-sm-8"> <div class="col-sm-6">
<input name="standbyTelephoneTwo" class="form-control" type="text"> <input name="standbyTelephoneTwo" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">常用Email:</label> <label class="col-sm-6 control-label">常用Email:</label>
<div class="col-sm-8"> <div class="col-sm-6">
<input name="commonEmail" class="form-control" type="text"> <input name="commonEmail" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">备用Email:</label> <label class="col-sm-6 control-label">备用Email:</label>
<div class="col-sm-8"> <div class="col-sm-6">
<input name="alternateEmail" class="form-control" type="text"> <input name="alternateEmail" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">备注:</label> <label class="col-sm-6 control-label">备注:</label>
<div class="col-sm-8"> <div class="col-sm-6">
<input name="customerRemarks" class="form-control" type="text"> <input name="customerRemarks" class="form-control" type="text">
</div> </div>
</div> </div>

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

@ -58,6 +58,8 @@
updateUrl: prefix + "/edit/{id}", updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove", removeUrl: prefix + "/remove",
exportUrl: prefix + "/export", exportUrl: prefix + "/export",
fixedColumns:true,
fixedRightNumber:1,
modalName: "联系人明细", modalName: "联系人明细",
columns: [{ columns: [{
checkbox: true checkbox: true

9
ruoyi-admin/src/main/resources/templates/system/contacts/edit.html

@ -10,9 +10,6 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">客户/企业代码:</label> <label class="col-sm-3 control-label is-required">客户/企业代码:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<!-- <select name="enterpriseCode" class="form-control m-b">-->
<!-- <option value="">所有</option>-->
<!-- </select>-->
<input name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" readonly required> <input name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" readonly required>
</div> </div>
@ -24,7 +21,7 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label" is-required>姓名:</label> <label class="col-sm-3 control-label is-required" >姓名:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="customerName" th:field="*{customerName}" class="form-control" type="text" required> <input name="customerName" th:field="*{customerName}" class="form-control" type="text" required>
</div> </div>
@ -35,7 +32,7 @@
<input name="customerPosition" th:field="*{customerPosition}" class="form-control" type="text"> <input name="customerPosition" th:field="*{customerPosition}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group" hidden>
<label class="col-sm-3 control-label">生日:</label> <label class="col-sm-3 control-label">生日:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="customerBirthday" th:field="*{customerBirthday}" class="form-control" type="text"> <input name="customerBirthday" th:field="*{customerBirthday}" class="form-control" type="text">
@ -47,7 +44,7 @@
<input name="officeTelephone" th:field="*{officeTelephone}" class="form-control" type="text"> <input name="officeTelephone" th:field="*{officeTelephone}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group" hidden>
<label class="col-sm-3 control-label">家中电话:</label> <label class="col-sm-3 control-label">家中电话:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="homePhone" th:field="*{homePhone}" class="form-control" type="text"> <input name="homePhone" th:field="*{homePhone}" class="form-control" type="text">

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

@ -633,13 +633,13 @@
}); });
$.ajax({ $.ajax({
url: ctx + 'system/salesOrder/getBinessMembers', url: ctx + 'system/salesOrder/getBinessMembers',
type: 'post', type: 'get',
success: function (res) { success: function (res) {
console.log(res) console.log(res)
if (res.rows.length > 0) { if (res.rows.length > 0) {
var usertData = res.rows; var usertData = res.rows;
for (let i in usertData) { for (let i in usertData) {
$("#select[name='businessMembers']").append("<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>"); $("select[name='businessMembers']").append("<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
} }
} else { } else {
$.modal.msgError(res.msg); $.modal.msgError(res.msg);

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

@ -66,10 +66,10 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label" is-required>法人代表:</label> <label class="col-sm-6 control-label is-required" >法人代表:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input disabled name="legalRepresentative" class="form-control" <input disabled name="legalRepresentative" class="form-control"
type="text" th:field="*{legalRepresentative}"> type="text" th:field="*{legalRepresentative}" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -83,7 +83,7 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label" is-required>开票公司名称:</label> <label class="col-sm-6 control-label is-required" >开票公司名称:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input name="invoicingCompanyName" th:field="*{invoicingCompanyName}" class="form-control" <input name="invoicingCompanyName" th:field="*{invoicingCompanyName}" class="form-control"
type="text" disabled required> type="text" disabled required>
@ -258,18 +258,6 @@
<input type="radio" name="customerSign" th:value="${dict.dictValue}" th:checked="${dict.default}" disabled /> <input type="radio" name="customerSign" th:value="${dict.dictValue}" th:checked="${dict.default}" disabled />
</div> </div>
</div> </div>
<div class="container">
<label class="control-label">联系人</label>
<div class="col-sm-12 select-table table-striped">
<table id="contacts-table"></table>
</div>
</div>
<div class="container">
<label class="control-label">送货地址</label>
<div class="col-sm-12 select-table table-striped">
<table id="address-table"></table>
</div>
</div>
<div class="container"> <div class="container">
<label class=" control-label">操作记录</label> <label class=" control-label">操作记录</label>
<div class="col-sm-12 select-table table-striped"> <div class="col-sm-12 select-table table-striped">
@ -385,170 +373,6 @@
format: "yyyy-mm-dd", format: "yyyy-mm-dd",
minView: "month", minView: "month",
autoclose: true, autoclose: true,
defaultDate: customer.establishedTime,
});
$("input[name='establishedTime']").val(customer.establishedTime);
// 联系人列表
$('#contacts-table').bootstrapTable('destroy');
$('#contacts-table').bootstrapTable({
url: '/system/contacts/list',
pagination: true,
pageNumber: 1,
pageSize: 10,
pageList: [10, 25, 50, 100],
showRefresh: false,
maxHeight: 70,
method: "post",
contentType: "application/x-www-form-urlencoded",
striped: true, // 是否显示行间隔色
cache: false, // 是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
sidePagination: "server", // 分页方式:client客户端分页,server服务端分页(*)
queryParams: function (params) {
//console.log("123");
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
enterpriseCode: $("#enterpriseCode").val()
};
// console.log(data[0].enterpriseCode)
return curParams
},
columns: [
{
field: 'enterpriseCode',
title: '客户/企业代码',
visible: false
},
{
field: 'enterpriseName',
title: '客户/企业名称',
visible: false
},
{
field: 'customerName',
title: '姓名'
},
{
field: 'customerPosition',
title: '职务'
},
{
field: 'customerBirthday',
title: '生日'
},
{
field: 'officeTelephone',
title: '办公电话'
},
{
field: 'homePhone',
title: '家中电话'
},
{
field: 'cellPhone',
title: '手机号'
},
{
field: 'customerFax',
title: '传真'
},
{
field: 'standbyTelephoneOne',
title: '备用电话1'
},
{
field: 'standbyTelephoneTwo',
title: '备用电话2'
},
{
field: 'commonEmail',
title: '常用Email'
},
{
field: 'alternateEmail',
title: '备用Email'
},
{
field: 'customerRemarks',
title: '备注'
},
]
});
// 送货地址列表
$('#address-table').bootstrapTable('destroy');
$('#address-table').bootstrapTable({
url: '/system/shippingaddress/addresslist',
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服务端分页(*)
singleSelect: true,
maxHeight: 70,
queryParams: function (params) {
//console.log("123");
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
enterpriseCode: $("#enterpriseCode").val()
};
// console.log(data[0].enterpriseCode)
return curParams
},
columns: [
{
field: 'enterpriseCode',
title: '客户/企业代码',
visible: false
},
{
field: 'enterpriseName',
title: '客户/企业名称',
visible: false
},
{
field: 'customerPhone',
title: '联系人电话'
},
{
field: 'customerName',
title: '联系人'
},
{
field: 'customerNameTwo',
title: '联系人2'
},
{
field: 'deliveryAddress',
title: '送货地址'
},
{
field: 'detailedDescription',
title: '详细描述'
},
{
field: 'postalCode',
title: '邮编'
},
{
field: 'customerFax',
title: '传真'
},
]
}); });
// 客户表操作历史 // 客户表操作历史
@ -591,11 +415,17 @@
{ {
field: 'enterpriseName', field: 'enterpriseName',
title: '客户/企业名称', title: '客户/企业名称',
visible: false
}, },
{ {
field: 'purser', field: 'purser',
title: '事业部' title: '事业部',
visible: false
}, },
{
field: 'createTime',
title: '操作时间'
},
{ {
field: 'operPeople', field: 'operPeople',
title: '操作人' title: '操作人'
@ -605,9 +435,6 @@
title: '操作' title: '操作'
}, },
{ {
field: 'createTime',
title: '操作时间'
},{
field: 'operStatus', field: 'operStatus',
title: '操作状态', title: '操作状态',
formatter:function (value,index,row){ formatter:function (value,index,row){
@ -620,9 +447,6 @@
} }
] ]
}); });
// $("#detailsModal").modal("show");
</script> </script>
</body> </body>
</html> </html>

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

@ -8,14 +8,13 @@
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-customer-add" th:object="${sysCustomer}"> <form class="form-horizontal m" id="form-customer-edit" th:object="${sysCustomer}">
<div class="form-group" hidden="hidden"> <div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label">客户ID:</label> <label class="col-sm-6 control-label">客户ID:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input name="customerId" th:field="*{id}" class="form-control" type="number" required > <input name="customerId" th:field="*{id}" class="form-control" type="number" required >
</div> </div>
</div> </div>
<div class="form-group" hidden="hidden"> <div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label is-required">客户代码:</label> <label class="col-sm-6 control-label is-required">客户代码:</label>
<div class="col-sm-6"> <div class="col-sm-6">
@ -76,9 +75,9 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label" is-required>法人代表:</label> <label class="col-sm-6 control-label is-required" >法人代表:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input required name="legalRepresentative" class="form-control" type="text"> <input name="legalRepresentative" class="form-control" type="text" required th:field="*{legalRepresentative}">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -91,7 +90,7 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label" is-required>开票公司名称:</label> <label class="col-sm-6 control-label is-required" >开票公司名称:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input required name="invoicingCompanyName" th:field="*{invoicingCompanyName}" class="form-control" type="text"> <input required name="invoicingCompanyName" th:field="*{invoicingCompanyName}" class="form-control" type="text">
</div> </div>
@ -118,15 +117,16 @@
<label class="col-sm-6 control-label is-required">报价币种:</label> <label class="col-sm-6 control-label is-required">报价币种:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_common_currency')}"> <div class="radio-box" th:each="dict : ${@dict.getType('sys_common_currency')}">
<input required type="radio" th:id="${'commonCurrency_' + dict.dictCode}" name="commonCurrency" th:value="${dict.dictValue}" th:checked="${dict.default}"> <input required type="radio" th:id="${'commonCurrency_' + dict.dictCode}"
<label th:for="${'commonCurrency_' + dict.dictCode}" th:text="${dict.dictLabel}" th:field="*{commonCurrency}"></label> name="commonCurrency" th:value="${dict.dictValue}" th:checked="${dict.default}" th:field="*{commonCurrency}">
<label th:for="${'commonCurrency_' + dict.dictCode}" th:text="${dict.dictLabel}" ></label>
</div> </div>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label">诚信评级:</label> <label class="col-sm-6 control-label">诚信评级:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<select name="integrityRating" class="form-control m-b" th:with="type=${@dict.getType('sys_integrity_rating')}" disabled> <select name="integrityRating" class="form-control m-b" th:with="type=${@dict.getType('sys_integrity_rating')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{integrityRating}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{integrityRating}"></option>
</select> </select>
</div> </div>
@ -187,7 +187,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label is-required">第一联系人电话:</label> <label class="col-sm-6 control-label is-required">第一联系人电话:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input name="contactNumber" th:field="*{contactNumber}" class="form-control" type="text" required disabled /> <input name="contactNumber" th:field="*{contactNumber}" class="form-control" type="text" required />
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -205,13 +205,13 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label is-required">客户第一收货人:</label> <label class="col-sm-6 control-label is-required">客户第一收货人:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input name="deliveryCustomerPerson" class="form-control" type="text" th:field="*{deliveryCustomerPerson}" disabled required/> <input name="deliveryCustomerPerson" class="form-control" type="text" th:field="*{deliveryCustomerPerson}" required/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label is-required">第一收货人电话:</label> <label class="col-sm-6 control-label is-required">第一收货人电话:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input name="客户第一收货人联系电话" th:field="*{deliveryCustomerPhone}" class="form-control" type="text" disabled required> <input name="客户第一收货人联系电话" th:field="*{deliveryCustomerPhone}" class="form-control" type="text" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -235,13 +235,28 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label">业务员:</label> <label class="col-sm-6 control-label">业务员:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input name="businessMembers" th:field="*{businessMembers}" class="form-control m-b" th:field="*{businessMembers}" disabled/> <select name="businessMembers" th:field="*{businessMembers}" class="form-control m-b"
shiro:haspermission="customer:selectBusinessMembers"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">是否作废:</label>
<div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}">
<label th:for="${'useStatus_' + dict.dictCode}" th:text="${dict.dictLabel}" th:field="*{useStatus}"></label>
<input type="radio" name="useStatus" th:value="${dict.dictValue}" th:checked="${dict.default}" disabled>
</div>
</div>
<div class="col-xs-12">
<label class="col-sm-4 control-label">客户标识:</label>
<div class="radio-box" th:each="dict : ${@dict.getType('sys_customer_sign')}">
<label th:for="${'customerSign_' + dict.dictCode}" th:text="${dict.dictLabel}" th:field="*{customerSign}"></label>
<input type="radio" name="customerSign" th:value="${dict.dictValue}" th:checked="${dict.default}" disabled />
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label">备注内容:</label> <label class="col-sm-6 control-label">备注内容:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<textarea th:field="*{customerRemarks}" name="customerRemarks" class="form-control" disabled></textarea> <textarea th:field="*{customerRemarks}" name="customerRemarks" class="form-control"></textarea>
</div> </div>
</div> </div>
</form> </form>

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

@ -24,8 +24,8 @@
<label class="col-sm-3 control-label">申请时间:</label> <label class="col-sm-3 control-label">申请时间:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group date"> <div class="input-group date">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input name="applyTime" th:value="${#dates.format(formData.applyTime, 'yyyy-MM-dd HH:mm')}" class="form-control" type="text" disabled> <input name="applyTime" th:value="${#dates.format(formData.applyTime, 'yyyy-MM-dd HH:mm')}" class="form-control" type="text" disabled>
<span class="input-group-addon" disabled><i class="fa fa-calendar"></i></span>
</div> </div>
</div> </div>
</div> </div>
@ -264,7 +264,22 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label">业务员:</label> <label class="col-sm-6 control-label">业务员:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input name="businessMembers" class="form-control m-b" th:field="*{businessMembers}" shiro:partial="customer:selectBusinessMembers" /> <select name="businessMembers" class="form-control m-b"
th:field="*{businessMembers}" shiro:haspermission="customer:selectBusinessMembers" disabled></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">是否作废:</label>
<div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}">
<label th:for="${'useStatus_' + dict.dictCode}" th:text="${dict.dictLabel}" th:field="*{useStatus}"></label>
<input type="radio" name="useStatus" th:value="${dict.dictValue}" th:checked="${dict.default}" disabled>
</div>
</div>
<div class="col-xs-12">
<label class="col-sm-4 control-label">客户标识:</label>
<div class="radio-box" th:each="dict : ${@dict.getType('sys_customer_sign')}">
<label th:for="${'customerSign_' + dict.dictCode}" th:text="${dict.dictLabel}" th:field="*{customerSign}"></label>
<input type="radio" name="customerSign" th:value="${dict.dictValue}" th:checked="${dict.default}" disabled />
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -299,6 +314,24 @@
<script th:src="javascript"> <script th:src="javascript">
var prefix = ctx + "system/customer"; var prefix = ctx + "system/customer";
$("#form-edit").validate({onkeyup: false, rules:{}, messages: {},focusCleanup: true}); $("#form-edit").validate({onkeyup: false, rules:{}, messages: {},focusCleanup: true});
$(function(){
$.ajax({
url: ctx + 'system/salesOrder/getBinessMembers',
type: 'get',
success: function (res) {
console.log(res)
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("select[name='businessMembers']").append("<option value='"
+ usertData[i].userName + "'>" + usertData[i].userName + "</option>");
}
} else {
$.modal.msgError(res.msg);
}
}
});
})
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
var taskId = [[${taskId}]]; var taskId = [[${taskId}]];

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

@ -26,7 +26,6 @@
<div class="input-group date"> <div class="input-group date">
<input name="applyTime" th:value="${#dates.format(formData.applyTime, 'yyyy-MM-dd HH:mm')}" class="form-control" type="text" disabled> <input name="applyTime" th:value="${#dates.format(formData.applyTime, 'yyyy-MM-dd HH:mm')}" class="form-control" type="text" disabled>
<span class="input-group-addon" disabled><i class="fa fa-calendar"></i></span> <span class="input-group-addon" disabled><i class="fa fa-calendar"></i></span>
</div> </div>
</div> </div>
</div> </div>
@ -265,7 +264,22 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label">业务员:</label> <label class="col-sm-6 control-label">业务员:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input name="businessMembers" class="form-control m-b" th:field="*{businessMembers}" shiro:partial="customer:selectBusinessMembers" /> <select name="businessMembers" class="form-control m-b"
th:field="*{businessMembers}" shiro:hasPermission="customer:selectBusinessMembers"disabled > </select>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">是否作废:</label>
<div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}">
<label th:for="${'useStatus_' + dict.dictCode}" th:text="${dict.dictLabel}" th:field="*{useStatus}"></label>
<input type="radio" name="useStatus" th:value="${dict.dictValue}" th:checked="${dict.default}" disabled>
</div>
</div>
<div class="col-xs-12">
<label class="col-sm-4 control-label">客户标识:</label>
<div class="radio-box" th:each="dict : ${@dict.getType('sys_customer_sign')}">
<label th:for="${'customerSign_' + dict.dictCode}" th:text="${dict.dictLabel}" th:field="*{customerSign}"></label>
<input type="radio" name="customerSign" th:value="${dict.dictValue}" th:checked="${dict.default}" disabled />
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -301,6 +315,24 @@
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "system/customer"; var prefix = ctx + "system/customer";
$("#form-edit").validate({focusCleanup: true}); $("#form-edit").validate({focusCleanup: true});
$(function(){
$.ajax({
url: ctx + 'system/salesOrder/getBinessMembers',
type: 'get',
success: function (res) {
console.log(res)
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("select[name='businessMembers']").append("<option value='"
+ usertData[i].userName + "'>" + usertData[i].userName + "</option>");
}
} else {
$.modal.msgError(res.msg);
}
}
});
})
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
if ($('textarea[name="comment"]').val()) { if ($('textarea[name="comment"]').val()) {

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

@ -24,8 +24,9 @@
<label class="col-sm-6 control-label">申请时间:</label> <label class="col-sm-6 control-label">申请时间:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="input-group date"> <div class="input-group date">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input name="applyTime" th:value="${#dates.format(formData.applyTime, 'yyyy-MM-dd HH:mm')}" class="form-control" type="text" disabled> <input name="applyTime" th:value="${#dates.format(formData.applyTime, 'yyyy-MM-dd HH:mm')}" class="form-control" type="text" disabled>
<span class="input-group-addon" disabled><i class="fa fa-calendar"></i></span>
</div> </div>
</div> </div>
</div> </div>
@ -264,13 +265,28 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label">业务员:</label> <label class="col-sm-6 control-label">业务员:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input name="businessMembers" class="form-control m-b" th:field="*{businessMembers}" shiro:partial="customer:selectBusinessMembers" /> <select name="businessMembers" class="form-control m-b" th:field="*{businessMembers}"
shiro:hasPermission="customer:selectBusinessMembers" disabled></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">是否作废:</label>
<div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}">
<label th:for="${'useStatus_' + dict.dictCode}" th:text="${dict.dictLabel}" th:field="*{useStatus}"></label>
<input type="radio" name="useStatus" th:value="${dict.dictValue}" th:checked="${dict.default}" disabled>
</div>
</div>
<div class="col-xs-12">
<label class="col-sm-4 control-label">客户标识:</label>
<div class="radio-box" th:each="dict : ${@dict.getType('sys_customer_sign')}">
<label th:for="${'customerSign_' + dict.dictCode}" th:text="${dict.dictLabel}" th:field="*{customerSign}"></label>
<input type="radio" name="customerSign" th:value="${dict.dictValue}" th:checked="${dict.default}" disabled />
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label">备注内容:</label> <label class="col-sm-6 control-label">备注内容:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<textarea name="customerRemarks" class="form-control"></textarea> <textarea name="customerRemarks" class="form-control" disabled></textarea>
</div> </div>
</div> </div>
<hr /> <hr />
@ -300,6 +316,24 @@
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "system/customer"; var prefix = ctx + "system/customer";
$("#form-edit").validate({focusCleanup: true }); $("#form-edit").validate({focusCleanup: true });
$(function(){
$.ajax({
url: ctx + 'system/salesOrder/getBinessMembers',
type: 'get',
success: function (res) {
console.log(res)
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("select[name='businessMembers']").append("<option value='"
+ usertData[i].userName + "'>" + usertData[i].userName + "</option>");
}
} else {
$.modal.msgError(res.msg);
}
}
});
})
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
if ($('textarea[name="comment"]').val()) { if ($('textarea[name="comment"]').val()) {

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

@ -24,8 +24,8 @@
<label class="col-sm-6 control-label">申请时间:</label> <label class="col-sm-6 control-label">申请时间:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="input-group date"> <div class="input-group date">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input name="applyTime" th:value="${#dates.format(formData.applyTime, 'yyyy-MM-dd HH:mm')}" class="form-control" type="text" disabled> <input name="applyTime" th:value="${#dates.format(formData.applyTime, 'yyyy-MM-dd HH:mm')}" class="form-control" type="text" disabled>
<span class="input-group-addon" disabled><i class="fa fa-calendar"></i></span>
</div> </div>
</div> </div>
</div> </div>
@ -264,13 +264,28 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label">业务员:</label> <label class="col-sm-6 control-label">业务员:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input name="businessMembers" class="form-control m-b" th:field="*{businessMembers}" shiro:partial="customer:selectBusinessMembers" /> <select name="businessMembers" class="form-control m-b" th:field="*{businessMembers}"
shiro:hasPermission="customer:selectBusinessMembers" disabled></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">是否作废:</label>
<div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}">
<label th:for="${'useStatus_' + dict.dictCode}" th:text="${dict.dictLabel}" th:field="*{useStatus}"></label>
<input type="radio" name="useStatus" th:value="${dict.dictValue}" th:checked="${dict.default}" disabled>
</div>
</div>
<div class="col-xs-12">
<label class="col-sm-4 control-label">客户标识:</label>
<div class="radio-box" th:each="dict : ${@dict.getType('sys_customer_sign')}">
<label th:for="${'customerSign_' + dict.dictCode}" th:text="${dict.dictLabel}" th:field="*{customerSign}"></label>
<input type="radio" name="customerSign" th:value="${dict.dictValue}" th:checked="${dict.default}" disabled />
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label">备注内容:</label> <label class="col-sm-6 control-label">备注内容:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<textarea name="customerRemarks" class="form-control"></textarea> <textarea name="customerRemarks" class="form-control" disabled></textarea>
</div> </div>
</div> </div>
<hr /> <hr />
@ -301,6 +316,24 @@
var prefix = ctx + "system/customer"; var prefix = ctx + "system/customer";
$("#form-edit").validate({focusCleanup: true}); $("#form-edit").validate({focusCleanup: true});
$(function(){
$.ajax({
url: ctx + 'system/salesOrder/getBinessMembers',
type: 'get',
success: function (res) {
console.log(res)
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("select[name='businessMembers']").append("<option value='"
+ usertData[i].userName + "'>" + usertData[i].userName + "</option>");
}
} else {
$.modal.msgError(res.msg);
}
}
});
})
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
if ($('textarea[name="comment"]').val()) { if ($('textarea[name="comment"]').val()) {

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

@ -54,6 +54,8 @@
restoreUrl: prefix + "/restore/{id}", restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export", exportUrl: prefix + "/export",
detailUrl: prefix + "/detail/{id}", detailUrl: prefix + "/detail/{id}",
fixedColumns:true,
fixedRightNumber:1,
modalName: "其他开票信息", modalName: "其他开票信息",
columns: [{ columns: [{
checkbox: true checkbox: true

30
ruoyi-admin/src/main/resources/templates/system/shippingaddress/shippingaddress.html

@ -41,14 +41,6 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:shippingaddress:add"> <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:shippingaddress:add">
<i class="fa fa-plus"></i> 添加 <i class="fa fa-plus"></i> 添加
</a> </a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()"
shiro:hasPermission="system:shippingaddress:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()"
shiro:hasPermission="system:shippingaddress:remove">
<i class="fa fa-remove"></i> 删除
</a>
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()"--> <!-- <a class="btn btn-warning" onclick="$.table.exportExcel()"-->
<!-- shiro:hasPermission="system:shippingaddress:export">--> <!-- shiro:hasPermission="system:shippingaddress:export">-->
<!-- <i class="fa fa-download"></i> 导出--> <!-- <i class="fa fa-download"></i> 导出-->
@ -73,6 +65,8 @@
removeUrl: prefix + "/remove", removeUrl: prefix + "/remove",
exportUrl: prefix + "/export", exportUrl: prefix + "/export",
clickToSelect: true, clickToSelect: true,
fixedColumns:true,
fixedRightNumber:1,
modalName: "送货地址", modalName: "送货地址",
columns: [ columns: [
{checkbox: true}, {checkbox: true},
@ -92,17 +86,17 @@
}, },
{title: '上次修改时间',field: 'updateInfoTime', {title: '上次修改时间',field: 'updateInfoTime',
formatter: function (value, row, index) {if (value == null) {return " ";} else {var vArr = value.split(','); return vArr[0];}} formatter: function (value, row, index) {if (value == null) {return " ";} else {var vArr = value.split(','); return vArr[0];}}
},
{
title: '操作',
align: 'center',
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.deliveryId + '\')"><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.deliveryId + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
} }
// {
// title: '操作',
// align: 'center',
// 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.deliveryId + '\')"><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.deliveryId + '\')"><i class="fa fa-remove"></i>删除</a>');
// return actions.join('');
// }
// }
] ]
}; };
$.table.init(options); $.table.init(options);

Loading…
Cancel
Save