Browse Source

[feat] 销售管理

解决:修改售后通知单的前端新增页面
解决:修改售后通知单修改页面
解决:新增售后通知单VO类。加上流程相关字段
解决:修改后端售后通知单列表查询接口
解决:修改后端售后通知单列表导出接口
解决:修改后端保存售后通知单单接口:新增开始审核方法和审核状态
解决:新增 加载审批弹窗后端接口
解决:新增 自动绑定页面字段后端接口
解决:新增 完成任务后端接口
解决:修改查询售后通知单详情接口
解决:修改查询售后通知单集合接口
解决:修改售后通知单的resultMap为vo类型
解决:新增发起人节点判断后端接口,加入需要的角色节点人
解决:新增售后通知单驳回调整页面
解决:新增售后通知单业务经理审核页面
解决:新增售后通知单业务主管审核页面
dev
liuxiaoxu 4 months ago
parent
commit
8ec842bdf0
  1. 128
      ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SalesAftersalesNoticeController.java
  2. 33
      ruoyi-admin/src/main/java/com/ruoyi/sales/domain/VO/SalesAftersalesNoticeVO.java
  3. 5
      ruoyi-admin/src/main/java/com/ruoyi/sales/mapper/SalesAftersalesNoticeMapper.java
  4. 15
      ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISalesAftersalesNoticeService.java
  5. 167
      ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SalesAftersalesNoticeServiceImpl.java
  6. 26
      ruoyi-admin/src/main/resources/mapper/sales/SalesAftersalesNoticeMapper.xml
  7. 104
      ruoyi-admin/src/main/resources/templates/sales/afterSalesNotice/add.html
  8. 113
      ruoyi-admin/src/main/resources/templates/sales/afterSalesNotice/afterSalesNotice.html
  9. 130
      ruoyi-admin/src/main/resources/templates/sales/afterSalesNotice/taskModifyApply.html
  10. 155
      ruoyi-admin/src/main/resources/templates/sales/afterSalesNotice/taskYwjlVerify.html
  11. 155
      ruoyi-admin/src/main/resources/templates/sales/afterSalesNotice/taskYwzgVerify.html

128
ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SalesAftersalesNoticeController.java

@ -1,15 +1,21 @@
package com.ruoyi.sales.controller;
import java.util.HashMap;
import java.util.List;
import com.ruoyi.aftersales.domain.vo.AftersalesOrderVO;
import com.ruoyi.process.general.service.IProcessService;
import com.ruoyi.sales.domain.VO.SalesAftersalesNoticeVO;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.task.Task;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.sales.domain.SalesAftersalesNotice;
@ -19,6 +25,9 @@ import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
/**
* 售后通知单Controller
*
@ -34,6 +43,16 @@ public class SalesAftersalesNoticeController extends BaseController
@Autowired
private ISalesAftersalesNoticeService salesAftersalesNoticeService;
@Autowired
private TaskService taskService;
@Autowired
private RuntimeService runtimeService;
@Autowired
private IProcessService processService;
@RequiresPermissions("sales:afterSalesNotice:view")
@GetMapping()
public String afterSalesNotice()
@ -47,10 +66,10 @@ public class SalesAftersalesNoticeController extends BaseController
@RequiresPermissions("sales:afterSalesNotice:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(SalesAftersalesNotice salesAftersalesNotice)
public TableDataInfo list(SalesAftersalesNoticeVO salesAftersalesNoticeVO)
{
startPage();
List<SalesAftersalesNotice> list = salesAftersalesNoticeService.selectSalesAftersalesNoticeList(salesAftersalesNotice);
List<SalesAftersalesNoticeVO> list = salesAftersalesNoticeService.selectSalesAftersalesNoticeList(salesAftersalesNoticeVO);
return getDataTable(list);
}
@ -61,10 +80,10 @@ public class SalesAftersalesNoticeController extends BaseController
@Log(title = "售后通知单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SalesAftersalesNotice salesAftersalesNotice)
public AjaxResult export(SalesAftersalesNoticeVO salesAftersalesNoticeVO)
{
List<SalesAftersalesNotice> list = salesAftersalesNoticeService.selectSalesAftersalesNoticeList(salesAftersalesNotice);
ExcelUtil<SalesAftersalesNotice> util = new ExcelUtil<SalesAftersalesNotice>(SalesAftersalesNotice.class);
List<SalesAftersalesNoticeVO> list = salesAftersalesNoticeService.selectSalesAftersalesNoticeList(salesAftersalesNoticeVO);
ExcelUtil<SalesAftersalesNoticeVO> util = new ExcelUtil<SalesAftersalesNoticeVO>(SalesAftersalesNoticeVO.class);
return util.exportExcel(list, "售后通知单数据");
}
@ -86,9 +105,96 @@ public class SalesAftersalesNoticeController extends BaseController
@ResponseBody
public AjaxResult addSave(SalesAftersalesNotice salesAftersalesNotice)
{
return toAjax(salesAftersalesNoticeService.insertSalesAftersalesNotice(salesAftersalesNotice));
// 审核状态-待审核
salesAftersalesNotice.setAuditStatus("0");
salesAftersalesNoticeService.submitApply(salesAftersalesNotice);
return AjaxResult.success();
}
/**
* 加载审批弹窗
* @param taskId
* @param mmap
* @return
*/
@GetMapping("/showVerifyDialog/{taskId}")
public String showVerifyDialog(@PathVariable("taskId") String taskId, ModelMap mmap) {
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
String processInstanceId = task.getProcessInstanceId();
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
SalesAftersalesNoticeVO aftersalesNoticeVO = salesAftersalesNoticeService.selectSalesAftersalesNoticeById(new Long(processInstance.getBusinessKey()));
mmap.put("formData", aftersalesNoticeVO);
mmap.put("taskId", taskId);
String verifyName = task.getTaskDefinitionKey().substring(0, 1).toUpperCase() + task.getTaskDefinitionKey().substring(1);
return prefix + "/task" + verifyName;
}
/**
* 自动绑定页面字段
*/
@ModelAttribute("preloadObj")
public SalesAftersalesNoticeVO getObj(@RequestParam(value = "aftersalesNoticeId", required = false) Long aftersalesNoticeId, HttpSession session) {
if (aftersalesNoticeId != null) {
return salesAftersalesNoticeService.selectSalesAftersalesNoticeById(aftersalesNoticeId);
}
return new SalesAftersalesNoticeVO();
}
/**
* 完成任务
*
* @return
*/
@RequestMapping(value = "/complete/{taskId}", method = {RequestMethod.POST, RequestMethod.GET})
@ResponseBody
public AjaxResult complete(@PathVariable("taskId") String taskId, @RequestParam(value = "saveEntity", required = false) String saveEntity,
@ModelAttribute("preloadObj") SalesAftersalesNoticeVO aftersalesNoticeVO, HttpServletRequest request) {
boolean saveEntityBoolean = BooleanUtils.toBoolean(saveEntity);
//获取实例id
String instanceId = aftersalesNoticeVO.getInstanceId();
//获取实例类型
String instanceType = aftersalesNoticeVO.getInstanceType();
boolean approvedFlag = processService.complete(taskId, instanceId, aftersalesNoticeVO.getApplyTitle(), aftersalesNoticeVO.getAftersalesNoticeCode(), "aftersalesNotice", new HashMap<String, Object>(), request);
if(!approvedFlag){
// 审核状态-审核拒绝
aftersalesNoticeVO.setAuditStatus("2");
}
// 如果任务已结束更新业务表状态
boolean processIsFinish = processService.judgeProcessIsFinish(instanceId);
if (processIsFinish) {
// 审核通过
aftersalesNoticeVO.setAuditStatus("1");
// 提交
if("submit".equals(instanceType)){
// 使用状态-是
// erpBomVo.setUseStatus("1");
}
// 作废
else if("cancel".equals(instanceType)){
// 使用状态-已作废
// erpBomVo.setUseStatus("2");
}
// 恢复
else if("restore".equals(instanceType)){
// 使用状态-是
// erpBomVo.setUseStatus("1");
}
}
salesAftersalesNoticeService.updateSalesAftersalesNotice(aftersalesNoticeVO);
// 驳回申请后继续申请,可能修改表单
if (saveEntityBoolean) {
salesAftersalesNoticeService.updateSalesAftersalesNotice(aftersalesNoticeVO);
}
return success("任务已完成");
}
/**
* 修改售后通知单
*/

33
ruoyi-admin/src/main/java/com/ruoyi/sales/domain/VO/SalesAftersalesNoticeVO.java

@ -0,0 +1,33 @@
package com.ruoyi.sales.domain.VO;
import com.ruoyi.sales.domain.SalesAftersalesNotice;
import lombok.Data;
import java.util.Date;
@Data
public class SalesAftersalesNoticeVO extends SalesAftersalesNotice {
private static final long serialVersionUID = -3627380777050403384L;
/** 申请人姓名 */
private String applyUserName;
/** 任务ID */
private String taskId;
/** 任务名称 */
private String taskName;
/** 办理时间 */
private Date doneTime;
/** 创建人 */
private String createUserName;
/** 流程实例状态 1 激活 2 挂起 */
private String suspendState;
/** 待办用户id */
private String todoUserId;
/** 流程实例类型名称 */
private String instanceTypeName;
/**
* 关键词
*/
private String keyword;
}

5
ruoyi-admin/src/main/java/com/ruoyi/sales/mapper/SalesAftersalesNoticeMapper.java

@ -2,6 +2,7 @@ package com.ruoyi.sales.mapper;
import java.util.List;
import com.ruoyi.sales.domain.SalesAftersalesNotice;
import com.ruoyi.sales.domain.VO.SalesAftersalesNoticeVO;
/**
* 售后通知单Mapper接口
@ -17,7 +18,7 @@ public interface SalesAftersalesNoticeMapper
* @param aftersalesNoticeId 售后通知单ID
* @return 售后通知单
*/
public SalesAftersalesNotice selectSalesAftersalesNoticeById(Long aftersalesNoticeId);
public SalesAftersalesNoticeVO selectSalesAftersalesNoticeById(Long aftersalesNoticeId);
/**
* 查询售后通知单列表
@ -25,7 +26,7 @@ public interface SalesAftersalesNoticeMapper
* @param salesAftersalesNotice 售后通知单
* @return 售后通知单集合
*/
public List<SalesAftersalesNotice> selectSalesAftersalesNoticeList(SalesAftersalesNotice salesAftersalesNotice);
public List<SalesAftersalesNoticeVO> selectSalesAftersalesNoticeList(SalesAftersalesNotice salesAftersalesNotice);
/**
* 新增售后通知单

15
ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISalesAftersalesNoticeService.java

@ -1,7 +1,11 @@
package com.ruoyi.sales.service;
import java.util.List;
import com.ruoyi.aftersales.domain.AftersalesOrder;
import com.ruoyi.sales.domain.SalesAftersalesNotice;
import com.ruoyi.sales.domain.VO.SalesAftersalesNoticeVO;
import org.activiti.engine.runtime.ProcessInstance;
/**
* 售后通知单Service接口
@ -17,7 +21,7 @@ public interface ISalesAftersalesNoticeService
* @param aftersalesNoticeId 售后通知单ID
* @return 售后通知单
*/
public SalesAftersalesNotice selectSalesAftersalesNoticeById(Long aftersalesNoticeId);
public SalesAftersalesNoticeVO selectSalesAftersalesNoticeById(Long aftersalesNoticeId);
/**
* 查询售后通知单列表
@ -25,7 +29,7 @@ public interface ISalesAftersalesNoticeService
* @param salesAftersalesNotice 售后通知单
* @return 售后通知单集合
*/
public List<SalesAftersalesNotice> selectSalesAftersalesNoticeList(SalesAftersalesNotice salesAftersalesNotice);
public List<SalesAftersalesNoticeVO> selectSalesAftersalesNoticeList(SalesAftersalesNoticeVO salesAftersalesNoticeVO);
/**
* 新增售后通知单
@ -72,4 +76,11 @@ public interface ISalesAftersalesNoticeService
* @return
*/
int restoreSalesAftersalesNoticeById(Long aftersalesNoticeId);
/**
* 审批流程启动
* */
ProcessInstance submitApply(SalesAftersalesNotice salesAftersalesNotice);
}

167
ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SalesAftersalesNoticeServiceImpl.java

@ -1,14 +1,36 @@
package com.ruoyi.sales.service.impl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.github.pagehelper.Page;
import com.ruoyi.aftersales.domain.AftersalesOrder;
import com.ruoyi.aftersales.domain.vo.AftersalesOrderVO;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.PageDomain;
import com.ruoyi.common.core.page.TableSupport;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.process.general.service.IProcessService;
import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper;
import com.ruoyi.sales.domain.VO.SalesAftersalesNoticeVO;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.service.ISysRoleService;
import org.activiti.engine.TaskService;
import org.activiti.engine.impl.persistence.entity.TaskEntityImpl;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.task.Task;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.sales.mapper.SalesAftersalesNoticeMapper;
import com.ruoyi.sales.domain.SalesAftersalesNotice;
import com.ruoyi.sales.service.ISalesAftersalesNoticeService;
import com.ruoyi.common.core.text.Convert;
import org.springframework.transaction.annotation.Transactional;
/**
* 售后通知单Service业务层处理
@ -22,6 +44,25 @@ public class SalesAftersalesNoticeServiceImpl implements ISalesAftersalesNoticeS
@Autowired
private SalesAftersalesNoticeMapper salesAftersalesNoticeMapper;
@Autowired
private RedisCache redisCache;
@Autowired
private IProcessService processService;
@Autowired
private ISysRoleService roleService;
@Autowired
private SysUserMapper userMapper;
@Autowired
private TaskService taskService;
@Autowired
private BizTodoItemMapper todoItemMapper;
/**
* 查询售后通知单
*
@ -29,7 +70,7 @@ public class SalesAftersalesNoticeServiceImpl implements ISalesAftersalesNoticeS
* @return 售后通知单
*/
@Override
public SalesAftersalesNotice selectSalesAftersalesNoticeById(Long aftersalesNoticeId)
public SalesAftersalesNoticeVO selectSalesAftersalesNoticeById(Long aftersalesNoticeId)
{
return salesAftersalesNoticeMapper.selectSalesAftersalesNoticeById(aftersalesNoticeId);
}
@ -37,13 +78,64 @@ public class SalesAftersalesNoticeServiceImpl implements ISalesAftersalesNoticeS
/**
* 查询售后通知单列表
*
* @param salesAftersalesNotice 售后通知单
* @param salesAftersalesNoticeVO 售后通知单
* @return 售后通知单
*/
@Override
public List<SalesAftersalesNotice> selectSalesAftersalesNoticeList(SalesAftersalesNotice salesAftersalesNotice)
public List<SalesAftersalesNoticeVO> selectSalesAftersalesNoticeList(SalesAftersalesNoticeVO salesAftersalesNoticeVO)
{
return salesAftersalesNoticeMapper.selectSalesAftersalesNoticeList(salesAftersalesNotice);
PageDomain pageDomain = TableSupport.buildPageRequest();
Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize();
// PageHelper 仅对第一个 List 分页
Page<SalesAftersalesNoticeVO> list = (Page<SalesAftersalesNoticeVO>) salesAftersalesNoticeMapper.selectSalesAftersalesNoticeList(salesAftersalesNoticeVO);
Page<SalesAftersalesNoticeVO> returnList = new Page<>();
for (SalesAftersalesNoticeVO tempSalesAftersalesNoticeVO: list) {
SysUser sysUser = userMapper.selectUserByLoginName(tempSalesAftersalesNoticeVO.getCreateBy());
if (sysUser != null) {
tempSalesAftersalesNoticeVO.setCreateUserName(sysUser.getUserName());
}
SysUser sysUser2 = userMapper.selectUserByLoginName(tempSalesAftersalesNoticeVO.getApplyUser());
if (sysUser2 != null) {
tempSalesAftersalesNoticeVO.setApplyUserName(sysUser2.getUserName());
}
String instanceId = tempSalesAftersalesNoticeVO.getInstanceId();
// 当前环节
if (StringUtils.isNotBlank(instanceId)) {
List<Task> taskList = taskService.createTaskQuery()
.processInstanceId(instanceId)
// .singleResult();
.list(); // 例如请假会签,会同时拥有多个任务
if (!org.springframework.util.CollectionUtils.isEmpty(taskList)) {
TaskEntityImpl task = (TaskEntityImpl) taskList.get(0);
String taskId = task.getId();
tempSalesAftersalesNoticeVO.setTaskId(taskId);
// 设置待办用户
List<String> todoUserList = todoItemMapper.selectUndealTodoUserList(taskId);
if(!org.springframework.util.CollectionUtils.isEmpty(taskList)){
tempSalesAftersalesNoticeVO.setTodoUserId(String.join(",",todoUserList));
}
if (task.getSuspensionState() == 2) {
tempSalesAftersalesNoticeVO.setTaskName("已挂起");
tempSalesAftersalesNoticeVO.setSuspendState("2");
} else {
tempSalesAftersalesNoticeVO.setTaskName(task.getName());
tempSalesAftersalesNoticeVO.setSuspendState("1");
}
} else {
// 已办结或者已撤销
tempSalesAftersalesNoticeVO.setTaskName("已结束");
}
} else {
tempSalesAftersalesNoticeVO.setTaskName("未启动");
}
returnList.add(tempSalesAftersalesNoticeVO);
}
returnList.setTotal(org.springframework.util.CollectionUtils.isEmpty(list) ? 0 : list.getTotal());
returnList.setPageNum(pageNum);
returnList.setPageSize(pageSize);
return returnList;
}
/**
@ -123,4 +215,71 @@ public class SalesAftersalesNoticeServiceImpl implements ISalesAftersalesNoticeS
{
return salesAftersalesNoticeMapper.restoreSalesAftersalesNoticeById(aftersalesNoticeId);
}
@Transactional(rollbackFor = Exception.class)
@Override
public ProcessInstance submitApply(SalesAftersalesNotice salesAftersalesNotice) {
SysUser user = ShiroUtils.getSysUser();
salesAftersalesNotice.setApplyUser(user.getLoginName());
salesAftersalesNotice.setApplyTime(DateUtils.getNowDate());
salesAftersalesNotice.setAftersalesNoticeCode(redisCache.generateBillNo("SH"));
// 保存
insertSalesAftersalesNotice(salesAftersalesNotice);
// 启动流程
String applyTitle = user.getUserName()+"发起了售后单提交审批-"+DateUtils.dateTimeNow();
String instanceType = "submit";
ProcessInstance processInstance = startProcessInstance(applyTitle,instanceType,salesAftersalesNotice, user);
String processInstanceId = processInstance.getProcessInstanceId();
// 提交实例id
salesAftersalesNotice.setSubmitInstanceId(processInstanceId);
// 存在提交完就流程结束的情况
boolean processIsFinish = processService.judgeProcessIsFinish(processInstanceId);
if(processIsFinish){
// 审核状态-审核通过
salesAftersalesNotice.setAuditStatus("1");
}
salesAftersalesNoticeMapper.updateSalesAftersalesNotice(salesAftersalesNotice);
return processInstance;
}
/**
* 创建售后单审核流程
* @param applyTitle
* @param instanceType
* @param user
* @return
*/
private ProcessInstance startProcessInstance(String applyTitle, String instanceType, SalesAftersalesNotice salesAftersalesNotice, SysUser user) {
Long aftersalesNoticeId = salesAftersalesNotice.getAftersalesNoticeId();
String businessKey = aftersalesNoticeId.toString(); // 实体类 ID,作为流程的业务 key
String key = "aftersalesNotice";
Map<String,Object> variables = new HashMap<>();
// 构造authority传参
buildAuthority(user, variables);
salesAftersalesNotice.setApplyTitle(applyTitle);
// 启动流程
ProcessInstance processInstance = processService.submitApply(user.getLoginName(), businessKey, applyTitle, salesAftersalesNotice.getAftersalesNoticeCode(), key, variables);
String processInstanceId = processInstance.getId();
salesAftersalesNotice.setInstanceId(processInstanceId); // 建立双向关系
salesAftersalesNotice.setInstanceType(instanceType);
return processInstance;
}
/**
* 发起人节点判断
* */
private void buildAuthority(SysUser user, Map<String, Object> variables) {
Set<String> roleKeys = roleService.selectRoleKeys(user.getUserId());
// 角色不同审核人不同
if(roleKeys.contains("ywyRole")){
variables.put("authority",1);
}else if(roleKeys.contains("ywjlRole")){
variables.put("authority",2);
}else if(roleKeys.contains("ywzgRole")){
variables.put("authority",3);
}
}
}

26
ruoyi-admin/src/main/resources/mapper/sales/SalesAftersalesNoticeMapper.xml

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.sales.mapper.SalesAftersalesNoticeMapper">
<resultMap type="SalesAftersalesNotice" id="SalesAftersalesNoticeResult">
<resultMap type="SalesAftersalesNoticeVO" id="SalesAftersalesNoticeResult">
<result property="aftersalesNoticeId" column="aftersales_notice_id" />
<result property="aftersalesNoticeCode" column="aftersales_notice_code" />
<result property="salesOrderCode" column="sales_order_code" />
@ -33,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="applyUser" column="apply_user" />
<result property="cancelInstanceId" column="cancel_instance_id" />
<result property="restoreInstanceId" column="restore_instance_id" />
<result property="instanceTypeName" column="instance_type_name" />
<result property="remark" column="remark" />
</resultMap>
@ -40,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select aftersales_notice_id, aftersales_notice_code, sales_order_code, user_id, audit_status, aftersales_status, business_members, aftersales_members, enterprise_code, enterprise_name, material_sum, enterprise_sum, start_time, customer_contact, contact_number, company_address, create_by, create_time, update_by, update_time, instance_id, instance_type, submit_instance_id, apply_title, apply_time, apply_user, cancel_instance_id, restore_instance_id, remark from sales_aftersales_notice
</sql>
<select id="selectSalesAftersalesNoticeList" parameterType="SalesAftersalesNotice" resultMap="SalesAftersalesNoticeResult">
<select id="selectSalesAftersalesNoticeList" parameterType="SalesAftersalesNoticeVO" resultMap="SalesAftersalesNoticeResult">
<include refid="selectSalesAftersalesNoticeVo"/>
<where>
<if test="aftersalesNoticeCode != null and aftersalesNoticeCode != ''"> and aftersales_notice_code = #{aftersalesNoticeCode}</if>
@ -52,24 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="aftersalesMembers != null and aftersalesMembers != ''"> and aftersales_members like concat('%', #{aftersalesMembers}, '%')</if>
<if test="enterpriseCode != null and enterpriseCode != ''"> and enterprise_code = #{enterpriseCode}</if>
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="materialSum != null and materialSum != ''"> and material_sum = #{materialSum}</if>
<if test="enterpriseSum != null and enterpriseSum != ''"> and enterprise_sum = #{enterpriseSum}</if>
<if test="startTime != null and startTime != ''"> and start_time = #{startTime}</if>
<if test="customerContact != null and customerContact != ''"> and customer_contact = #{customerContact}</if>
<if test="contactNumber != null and contactNumber != ''"> and contact_number = #{contactNumber}</if>
<if test="companyAddress != null and companyAddress != ''"> and company_address = #{companyAddress}</if>
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
<if test="updateBy != null and updateBy != ''"> and update_by = #{updateBy}</if>
<if test="params.beginUpdateTime != null and params.beginUpdateTime != '' and params.endUpdateTime != null and params.endUpdateTime != ''"> and update_time between #{params.beginUpdateTime} and #{params.endUpdateTime}</if>
<if test="instanceId != null and instanceId != ''"> and instance_id = #{instanceId}</if>
<if test="instanceType != null and instanceType != ''"> and instance_type = #{instanceType}</if>
<if test="submitInstanceId != null and submitInstanceId != ''"> and submit_instance_id = #{submitInstanceId}</if>
<if test="applyTitle != null and applyTitle != ''"> and apply_title = #{applyTitle}</if>
<if test="applyTime != null "> and apply_time = #{applyTime}</if>
<if test="applyUser != null and applyUser != ''"> and apply_user = #{applyUser}</if>
<if test="cancelInstanceId != null and cancelInstanceId != ''"> and cancel_instance_id = #{cancelInstanceId}</if>
<if test="restoreInstanceId != null and restoreInstanceId != ''"> and restore_instance_id = #{restoreInstanceId}</if>
</where>
</select>
@ -78,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where aftersales_notice_id = #{aftersalesNoticeId}
</select>
<insert id="insertSalesAftersalesNotice" parameterType="SalesAftersalesNotice" useGeneratedKeys="true" keyProperty="aftersalesNoticeId">
<insert id="insertSalesAftersalesNotice" parameterType="SalesAftersalesNoticeVO" useGeneratedKeys="true" keyProperty="aftersalesNoticeId">
insert into sales_aftersales_notice
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="aftersalesNoticeCode != null">aftersales_notice_code,</if>
@ -142,7 +126,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
</insert>
<update id="updateSalesAftersalesNotice" parameterType="SalesAftersalesNotice">
<update id="updateSalesAftersalesNotice" parameterType="SalesAftersalesNoticeVO">
update sales_aftersales_notice
<trim prefix="SET" suffixOverrides=",">
<if test="aftersalesNoticeCode != null">aftersales_notice_code = #{aftersalesNoticeCode},</if>

104
ruoyi-admin/src/main/resources/templates/sales/afterSalesNotice/add.html

@ -7,12 +7,6 @@
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-afterSalesNotice-add">
<div class="form-group">
<label class="col-sm-3 control-label">售后单号:</label>
<div class="col-sm-8">
<input name="aftersalesNoticeCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">关联销售订单编号:</label>
<div class="col-sm-8">
@ -25,15 +19,6 @@
<input name="userId" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">审核状态:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('auditStatus')}">
<input type="radio" th:id="${'auditStatus_' + dict.dictCode}" name="auditStatus" th:value="${dict.dictValue}" th:checked="${dict.default}">
<label th:for="${'auditStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">售后状态:</label>
<div class="col-sm-8">
@ -67,95 +52,6 @@
<input name="enterpriseName" 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="materialSum" 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="enterpriseSum" 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="startTime" 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" 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="contactNumber" 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="companyAddress" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">流程实例ID:</label>
<div class="col-sm-8">
<input name="instanceId" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">流程实例类型:</label>
<div class="col-sm-8">
<select name="instanceType" class="form-control m-b">
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">流程提交实例ID:</label>
<div class="col-sm-8">
<input name="submitInstanceId" 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="applyTitle" class="form-control" type="text">
</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 name="applyTime" class="form-control" placeholder="yyyy-MM-dd" 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 name="applyUser" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">流程作废实例ID:</label>
<div class="col-sm-8">
<input name="cancelInstanceId" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">流程恢复实例ID:</label>
<div class="col-sm-8">
<input name="restoreInstanceId" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注信息:</label>
<div class="col-sm-8">

113
ruoyi-admin/src/main/resources/templates/sales/afterSalesNotice/afterSalesNotice.html

@ -59,12 +59,6 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="sales:afterSalesNotice:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="sales:afterSalesNotice:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="sales:afterSalesNotice:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="sales:afterSalesNotice:export">
<i class="fa fa-download"></i> 导出
</a>
@ -75,6 +69,7 @@
</div>
</div>
<th:block th:include="include :: footer" />
<script th:src="@{/js/activiti.js}"></script>
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('sales:afterSalesNotice:edit')}]];
var removeFlag = [[${@permission.hasPermi('sales:afterSalesNotice:remove')}]];
@ -82,6 +77,9 @@
var restoreFlag = [[${@permission.hasPermi('sales:afterSalesNotice:restore')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var aftersalesStatusDatas = [[${@dict.getType('sales_aftersales_status')}]];
var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var prefix = ctx + "sales/afterSalesNotice";
$(function() {
@ -102,6 +100,65 @@
field: 'aftersalesNoticeId',
visible: false
},
{
field: 'instanceId',
title: '流程实例ID',
visible: false
},
{
field: 'submitInstanceId',
title: '流程提交实例ID',
visible: false
},
{
field: 'cancelInstanceId',
title: '流程作废实例ID',
visible: false
},
{
field: 'restoreInstanceId',
title: '流程恢复实例ID',
visible: false
},
{
field: 'instanceTypeName',
title: '流程实例类型',
visible: false
},
{
field: 'applyUser',
title: '申请人ID',
visible: false
},
{
field: 'applyUserName',
title: '<span style="color: red;">申请人</span>',
formatter: function(value, row, index) {
return '<span style="color: red;">' + (value ? value : "-") + '</span>';
}
},
{
field: 'applyTime',
title: '申请时间'
},
{
field: 'taskId',
title: '当前任务ID',
visible: false
},
{
field: 'todoUserId',
title: '待办用户ID',
visible: false
},
{
field: 'taskName',
title: '当前任务名称',
align: 'center',
formatter: function(value, row, index) {
return '<span class="badge badge-primary">' + value + '</span>';
}
},
{
title: '审核状态',
field: 'auditStatus',
@ -176,22 +233,36 @@
title: '上次更新时间',
field: 'updateTime',
},
{
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.aftersalesNoticeId + '\')"><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.aftersalesNoticeId + '\')"><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> ');
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
// 审核状态-审核通过
if(row.auditStatus=="1"){
// 编辑
// actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i> 编辑</a> ');
}
// 有流程实例id
if (row.instanceId) {
// 有待办人展示审批按钮,
if (row.todoUserId) {
var todoUserIdList = row.todoUserId.split(",");
if(todoUserIdList.includes(loginName) || loginName == 'admin'){
var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批';
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="showVerifyDialog(\'' + prefix + '\',\'' + row.taskId + '\', \'' + row.taskName+"-"+"申请" + '\')"><i class="fa fa-edit"></i> '+nodeName+'</a> ');
}
}
// 审批历史
actions.push('<a class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="showHistoryDialog(\'' + row.instanceId + '\')"><i class="fa fa-list"></i> 审批历史</a> ');
// 进度查看
actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="showProcessImgDialog(\'' + row.instanceId + '\')"><i class="fa fa-image"></i> 进度查看</a> ');
}
// 详情
// actions.push('<a class="btn btn-success btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="detail(\'' + row.aftersalesNoticeId + '\')"><i class="fa fa-edit"></i>详情</a> ');
return actions.join('');
}
return actions.join('');
}
}]
}]
};
$.table.init(options);
});

130
ruoyi-admin/src/main/resources/templates/sales/afterSalesNotice/taskModifyApply.html

@ -0,0 +1,130 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('驳回调整')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-afterSalesNotice-modify" th:object="${formData}">
<input name="aftersalesNoticeId" th:field="*{aftersalesNoticeId}" type="hidden">
<input name="taskId" th:field="*{taskId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">售后单号:</label>
<div class="col-sm-8">
<input name="aftersalesNoticeCode" th:field="*{aftersalesNoticeCode}" 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="salesOrderCode" th:field="*{salesOrderCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">用户ID:</label>
<div class="col-sm-8">
<input name="userId" th:field="*{userId}" 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="businessMembers" th:field="*{businessMembers}" 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="aftersalesMembers" th:field="*{aftersalesMembers}" 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="enterpriseCode" th:field="*{enterpriseCode}" 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="enterpriseName" th:field="*{enterpriseName}" 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="materialSum" th:field="*{materialSum}" 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="enterpriseSum" th:field="*{enterpriseSum}" 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="startTime" th:field="*{startTime}" 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>
<div class="col-sm-8">
<input name="contactNumber" th:field="*{contactNumber}" 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="companyAddress" th:field="*{companyAddress}" 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="remark" th:field="*{remark}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="reApply">是否继续申请:</label>
<div class="col-sm-8">
<select id="reApply" name="p_B_reApply" class="form-control m-b">
<option value="true">重新申请</option>
<!-- <option value="false">结束流程</option>-->
</select>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:src="@{/js/activiti.js}"></script>
<script th:inline="javascript">
var prefix = ctx + "sales/afterSalesNotice";
$("#form-afterSalesNotice-modify").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
var taskId = [[${taskId}]];
$.operate.save(prefix + "/complete/" + taskId, $('#form-afterSalesNotice-modify').serialize());
}
}
$("input[name='applyTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

155
ruoyi-admin/src/main/resources/templates/sales/afterSalesNotice/taskYwjlVerify.html

@ -0,0 +1,155 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改售后通知单')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-afterSalesNotice-ywjl" th:object="${formData}">
<input name="aftersalesNoticeId" th:field="*{aftersalesNoticeId}" type="hidden">
<input name="taskId" th:field="*{taskId}" type="hidden">
<input type="hidden" name="p_COM_comment" />
<div class="form-group">
<label class="col-sm-3 control-label">售后单号:</label>
<div class="col-sm-8">
<input name="aftersalesNoticeCode" th:field="*{aftersalesNoticeCode}" 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="salesOrderCode" th:field="*{salesOrderCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">用户ID:</label>
<div class="col-sm-8">
<input name="userId" th:field="*{userId}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">审核状态:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('auditStatus')}">
<input type="radio" th:id="${'auditStatus_' + dict.dictCode}" name="auditStatus" th:value="${dict.dictValue}" th:field="*{auditStatus}">
<label th:for="${'auditStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">售后状态:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sales_aftersales_status')}">
<input type="radio" th:id="${'aftersalesStatus_' + dict.dictCode}" name="aftersalesStatus" th:value="${dict.dictValue}" th:field="*{aftersalesStatus}">
<label th:for="${'aftersalesStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">业务人员:</label>
<div class="col-sm-8">
<input name="businessMembers" th:field="*{businessMembers}" 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="aftersalesMembers" th:field="*{aftersalesMembers}" 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="enterpriseCode" th:field="*{enterpriseCode}" 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="enterpriseName" th:field="*{enterpriseName}" 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="materialSum" th:field="*{materialSum}" 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="enterpriseSum" th:field="*{enterpriseSum}" 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="startTime" th:field="*{startTime}" 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>
<div class="col-sm-8">
<input name="contactNumber" th:field="*{contactNumber}" 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="companyAddress" th:field="*{companyAddress}" 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="remark" th:field="*{remark}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required" for="ywjlVerifyApproved">审批意见:</label>
<div class="col-sm-6">
<select name="p_B_ywjlVerifyApproved" id="ywjlVerifyApproved" class="form-control" required>
<option value=""></option>
<option value="true">同意</option>
<option value="false">拒绝</option>
</select>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:src="@{/js/activiti.js}"></script>
<script th:inline="javascript">
var prefix = ctx + "sales/afterSalesNotice";
$("#form-afterSalesNotice-ywjl").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
if ($('textarea[name="comment"]').val()) {
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
}
var taskId = [[${taskId}]];
$.operate.save(prefix + "/complete/" + taskId, $('#form-afterSalesNotice-ywjl').serialize());
}
}
$("input[name='applyTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

155
ruoyi-admin/src/main/resources/templates/sales/afterSalesNotice/taskYwzgVerify.html

@ -0,0 +1,155 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改售后通知单')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-afterSalesNotice-ywzg" th:object="${formData}">
<input name="aftersalesNoticeId" th:field="*{aftersalesNoticeId}" type="hidden">
<input name="taskId" th:field="*{taskId}" type="hidden">
<input type="hidden" name="p_COM_comment" />
<div class="form-group">
<label class="col-sm-3 control-label">售后单号:</label>
<div class="col-sm-8">
<input name="aftersalesNoticeCode" th:field="*{aftersalesNoticeCode}" 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="salesOrderCode" th:field="*{salesOrderCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">用户ID:</label>
<div class="col-sm-8">
<input name="userId" th:field="*{userId}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">审核状态:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('auditStatus')}">
<input type="radio" th:id="${'auditStatus_' + dict.dictCode}" name="auditStatus" th:value="${dict.dictValue}" th:field="*{auditStatus}">
<label th:for="${'auditStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">售后状态:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sales_aftersales_status')}">
<input type="radio" th:id="${'aftersalesStatus_' + dict.dictCode}" name="aftersalesStatus" th:value="${dict.dictValue}" th:field="*{aftersalesStatus}">
<label th:for="${'aftersalesStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">业务人员:</label>
<div class="col-sm-8">
<input name="businessMembers" th:field="*{businessMembers}" 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="aftersalesMembers" th:field="*{aftersalesMembers}" 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="enterpriseCode" th:field="*{enterpriseCode}" 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="enterpriseName" th:field="*{enterpriseName}" 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="materialSum" th:field="*{materialSum}" 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="enterpriseSum" th:field="*{enterpriseSum}" 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="startTime" th:field="*{startTime}" 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>
<div class="col-sm-8">
<input name="contactNumber" th:field="*{contactNumber}" 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="companyAddress" th:field="*{companyAddress}" 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="remark" th:field="*{remark}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required" for="ywzgVerifyApproved">审批意见:</label>
<div class="col-sm-6">
<select name="p_B_ywzgVerifyApproved" id="ywzgVerifyApproved" class="form-control" required>
<option value=""></option>
<option value="true">同意</option>
<option value="false">拒绝</option>
</select>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:src="@{/js/activiti.js}"></script>
<script th:inline="javascript">
var prefix = ctx + "sales/afterSalesNotice";
$("#form-afterSalesNotice-ywzg").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
if ($('textarea[name="comment"]').val()) {
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
}
var taskId = [[${taskId}]];
$.operate.save(prefix + "/complete/" + taskId, $('#form-afterSalesNotice-ywzg').serialize());
}
}
$("input[name='applyTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>
Loading…
Cancel
Save