Browse Source

[feat]供应商资料: 添加采购经理审核页面,采购主管审核页面,协调添加调整申请页面,新增供应商资料serviceImpl实现层新增调整方法updateSysSupplier,调整供应商查询新增审核相关查询方法,供应商各审核节点已在本测试,通过可行。

dev
zhangsiqi 7 months ago
parent
commit
891593d336
  1. 118
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSupplierController.java
  2. 11
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSupplier.java
  3. 12
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/Vo/SysSupplierVo.java
  4. 2
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSupplierMapper.java
  5. 271
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSupplierServiceImpl.java
  6. 1
      ruoyi-admin/src/main/resources/mapper/system/SysCustomerMapper.xml
  7. 10
      ruoyi-admin/src/main/resources/mapper/system/SysCustomerQuoteMapper.xml
  8. 45
      ruoyi-admin/src/main/resources/mapper/system/SysSupplierMapper.xml
  9. 2
      ruoyi-admin/src/main/resources/templates/system/supplier/add.html
  10. 59
      ruoyi-admin/src/main/resources/templates/system/supplier/detail.html
  11. 12
      ruoyi-admin/src/main/resources/templates/system/supplier/edit.html
  12. 42
      ruoyi-admin/src/main/resources/templates/system/supplier/supplier.html
  13. 324
      ruoyi-admin/src/main/resources/templates/system/supplier/taskCgjlVerify.html
  14. 324
      ruoyi-admin/src/main/resources/templates/system/supplier/taskCgzgVerify.html
  15. 366
      ruoyi-admin/src/main/resources/templates/system/supplier/taskModifyApply.html

118
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSupplierController.java

@ -14,10 +14,10 @@ import com.ruoyi.common.core.domain.entity.SysDictData;
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.process.general.service.IProcessService; import com.ruoyi.process.general.service.IProcessService;
import com.ruoyi.system.domain.SysSalesOrderVo; import com.ruoyi.system.domain.*;
import com.ruoyi.system.domain.SysSupplier;
import com.ruoyi.system.domain.Vo.SysSupplierVo; import com.ruoyi.system.domain.Vo.SysSupplierVo;
import com.ruoyi.system.domain.exportDto.SysSupplierDto; import com.ruoyi.system.domain.exportDto.SysSupplierDto;
import com.ruoyi.system.service.ISysDictTypeService; import com.ruoyi.system.service.ISysDictTypeService;
@ -26,16 +26,23 @@ import com.ruoyi.system.service.ISysSupplierService;
import com.ruoyi.system.service.ISysUserService; import com.ruoyi.system.service.ISysUserService;
import org.activiti.engine.RuntimeService; import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService; 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.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException; import java.io.IOException;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
@ -97,23 +104,17 @@ public class SysSupplierController extends BaseController
Set<String> roleKeys = roleService.selectRoleKeys(userId); Set<String> roleKeys = roleService.selectRoleKeys(userId);
List<SysUser> sysUserlist = sysUserService.selectRoleToUserList("cgyRole"); List<SysUser> sysUserlist = sysUserService.selectRoleToUserList("cgyRole");
sysUserlist.add(curUser); sysUserlist.add(curUser);
if (curUser.getUserName().contains("admin")) {
SysSupplier sysSupplier2 = new SysSupplier();
startPage();
List<SysSupplierVo> list2 = sysSupplierService.selectSysSupplierList(sysSupplier2);
return getDataTable(list2);
}
//如果主管审批,查看当前自己部门的审核 //如果主管审批,查看当前自己部门的审核
//如果经理审计需要查询自己部门下所有业务员的提交的订单,以及自身的提交的订单 //如果经理审计需要查询自己部门下所有业务员的提交的订单,以及自身的提交的订单
if (roleKeys.contains("cgyRole")) { // if (roleKeys.contains("cgjlRole")) {
List<SysUser> findUser = sysUserlist.stream().filter(item -> (item.getDeptId().equals(curUser.getDeptId()))).collect(Collectors.toList()); // List<SysUser> findUser = sysUserlist.stream().filter(item -> (item.getDeptId().equals(curUser.getDeptId()))).collect(Collectors.toList());
Set<String> user = findUser.stream().map(SysUser::getLoginName).collect(Collectors.toSet()); // Set<String> user = findUser.stream().map(SysUser::getLoginName).collect(Collectors.toSet());
startPage(); // startPage();
List<SysSupplier> list2 = list.stream().filter(item -> user.contains(item.getCreateBy())).collect(Collectors.toList()); // List<SysSupplier> list2 = list.stream().filter(item -> user.contains(item.getCreateBy())).collect(Collectors.toList());
return getDataTable(list2); // return getDataTable(list2);
} // }
// 业务员角色只能看到自己创建的数据 // 业务员角色只能看到自己创建的数据
if (roleKeys.contains("cgjlRole")) { if (roleKeys.contains("cgyRole")) {
sysSupplier.setCreateBy(curUser.getLoginName()); sysSupplier.setCreateBy(curUser.getLoginName());
startPage(); startPage();
List<SysSupplierVo> list2 = sysSupplierService.selectSysSupplierList(sysSupplier); List<SysSupplierVo> list2 = sysSupplierService.selectSysSupplierList(sysSupplier);
@ -157,7 +158,10 @@ public class SysSupplierController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult addSave(SysSupplier sysSupplier) public AjaxResult addSave(SysSupplier sysSupplier)
{ {
return toAjax(sysSupplierService.insertSysSupplier(sysSupplier)); sysSupplier.setAuditStatus("0");
sysSupplier.setUseStatus("0");
sysSupplierService.submitApply(sysSupplier);
return AjaxResult.success();
} }
/** /**
@ -188,7 +192,10 @@ public class SysSupplierController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult editSave(SysSupplier sysSupplier) public AjaxResult editSave(SysSupplier sysSupplier)
{ {
return toAjax(sysSupplierService.updateSysSupplier(sysSupplier)); sysSupplier.setAuditStatus("0");
sysSupplier.setUseStatus("0");
sysSupplierService.submitApply(sysSupplier);
return AjaxResult.success();
} }
/** /**
@ -287,4 +294,79 @@ public class SysSupplierController extends BaseController
List<SysSupplier> list = sysSupplierService.getSupplierCodes(); List<SysSupplier> list = sysSupplierService.getSupplierCodes();
return list; return list;
} }
/**
* 加载审批弹窗
* @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();
SysSupplierVo sysSupplierVo = sysSupplierService.selectSysSupplierById(new Long(processInstance.getBusinessKey()));
sysSupplierVo.setTaskId(taskId);
mmap.put("formData", sysSupplierVo);
mmap.put("taskId", taskId);
String verifyName = task.getTaskDefinitionKey().substring(0, 1).toUpperCase() + task.getTaskDefinitionKey().substring(1);
return prefix + "/task" + verifyName;
}
/**
* 完成任务
*
* @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") SysSupplierVo sysSupplierVo, HttpServletRequest request) {
boolean saveEntityBoolean = BooleanUtils.toBoolean(saveEntity);
String instanceId = sysSupplierVo.getInstanceId();
String instanceType = sysSupplierVo.getInstanceType();
boolean approvedFlag = processService.complete(taskId, instanceId, sysSupplierVo.getApplyTitle(),
sysSupplierVo.getSupplierCode(), "supplier", new HashMap<String, Object>(), request);
SysUser sysUser = ShiroUtils.getSysUser();
if(!approvedFlag){
// 审核状态-审核拒绝
sysSupplierVo.setAuditStatus("2");
}
// 如果任务已结束更新业务表状态
boolean processIsFinish = processService.judgeProcessIsFinish(instanceId);
if (processIsFinish) {
// 审核通过
sysSupplierVo.setAuditStatus("1");
// 提交
if("submit".equals(instanceType)){
// 使用状态-是
sysSupplierVo.setUseStatus("1");
}
// 作废
else if("cancel".equals(instanceType)){
// 使用状态-已作废
sysSupplierVo.setUseStatus("2");
}
// 恢复
else if("restore".equals(instanceType)){
// 使用状态-是
sysSupplierVo.setUseStatus("1");
}
sysSupplierVo.setUseStatus("1");
}
sysSupplierService.updateSysSupplier(sysSupplierVo);
// 驳回申请后继续申请,可能修改表单
if (saveEntityBoolean) {
sysSupplierService.updateSysSupplierById(sysSupplierVo);
return success("重新申请");
}
return success("任务已完成");
}
@ModelAttribute("/preloadObj")
public SysSupplierVo getObj(@RequestParam(value = "id", required = false) Long id, HttpSession session) {
if (id != null) {
return sysSupplierService.selectSysSupplierById(id);
}
return new SysSupplierVo();
}
} }

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

@ -192,6 +192,17 @@ public class SysSupplier extends BaseEntity
private String delFlag; private String delFlag;
private String keyword;
public String getKeyword() {
return keyword;
}
public void setKeyword(String keyword) {
this.keyword = keyword;
}
public String getDelFlag() { public String getDelFlag() {
return delFlag; return delFlag;
} }

12
ruoyi-admin/src/main/java/com/ruoyi/system/domain/Vo/SysSupplierVo.java

@ -29,10 +29,6 @@ public class SysSupplierVo extends SysSupplier {
/** 流程实例类型名称 */ /** 流程实例类型名称 */
private String instanceTypeName; private String instanceTypeName;
/**
* 关键词
*/
private String keyword;
public String getApplyUserName() { public String getApplyUserName() {
return applyUserName; return applyUserName;
@ -98,13 +94,6 @@ public class SysSupplierVo extends SysSupplier {
this.instanceTypeName = instanceTypeName; this.instanceTypeName = instanceTypeName;
} }
public String getKeyword() {
return keyword;
}
public void setKeyword(String keyword) {
this.keyword = keyword;
}
@Override @Override
public String toString() { public String toString() {
@ -117,7 +106,6 @@ public class SysSupplierVo extends SysSupplier {
", suspendState='" + suspendState + '\'' + ", suspendState='" + suspendState + '\'' +
", todoUserId='" + todoUserId + '\'' + ", todoUserId='" + todoUserId + '\'' +
", instanceTypeName='" + instanceTypeName + '\'' + ", instanceTypeName='" + instanceTypeName + '\'' +
", keyword='" + keyword + '\'' +
super.toString() + super.toString() +
"} " ; "} " ;
} }

2
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSupplierMapper.java

@ -85,4 +85,6 @@ public interface SysSupplierMapper
Integer updateSysSupplierBySupplierCode(String delFlag,String sysSupplierCode); Integer updateSysSupplierBySupplierCode(String delFlag,String sysSupplierCode);
Integer updateSysSupplierBySupplierCodes(String delFlag,SysSupplier[] sysSupplierCodes); Integer updateSysSupplierBySupplierCodes(String delFlag,SysSupplier[] sysSupplierCodes);
SysSupplierVo cancelSysSupplierById(Long id);
} }

271
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSupplierServiceImpl.java

@ -1,23 +1,34 @@
package com.ruoyi.system.service.impl; package com.ruoyi.system.service.impl;
import com.github.pagehelper.Page;
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.core.redis.RedisCache;
import com.ruoyi.common.core.text.Convert; import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.service.ICommonService; import com.ruoyi.common.service.ICommonService;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.process.general.service.IProcessService;
import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper;
import com.ruoyi.system.domain.SysAttach; import com.ruoyi.system.domain.SysAttach;
import com.ruoyi.system.domain.SysSupplier; import com.ruoyi.system.domain.SysSupplier;
import com.ruoyi.system.domain.Vo.SysSupplierVo; import com.ruoyi.system.domain.Vo.SysSupplierVo;
import com.ruoyi.system.mapper.SysSupplierMapper; import com.ruoyi.system.mapper.SysSupplierMapper;
import com.ruoyi.system.service.ISysAttachFileService; import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.service.ISysAttachService; import com.ruoyi.system.service.*;
import com.ruoyi.system.service.ISysSupplierService; 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.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.Arrays; import java.util.*;
import java.util.Date;
import java.util.List;
/** /**
* 供应商资料Service业务层处理 * 供应商资料Service业务层处理
@ -26,8 +37,8 @@ import java.util.List;
* @date 2022-11-02 * @date 2022-11-02
*/ */
@Service("supplierItems") @Service("supplierItems")
public class SysSupplierServiceImpl implements ISysSupplierService public class SysSupplierServiceImpl implements ISysSupplierService{
{
@Autowired @Autowired
private SysSupplierMapper sysSupplierMapper; private SysSupplierMapper sysSupplierMapper;
@ -42,10 +53,23 @@ public class SysSupplierServiceImpl implements ISysSupplierService
@Autowired @Autowired
private ICommonService commonService; private ICommonService commonService;
@Autowired
private SysUserMapper userMapper;
@Autowired
private TaskService taskService;
@Autowired
private BizTodoItemMapper todoItemMapper;
@Autowired
private IProcessService processService;
@Autowired
private ISysRoleService roleService;
/** /**
* 查询供应商资料 * 查询供应商资料
* *
* @param supplierId 供应商资料ID * @param supplierId 供应商资料ID
* @return 供应商资料 * @return 供应商资料
*/ */
@ -64,24 +88,100 @@ public class SysSupplierServiceImpl implements ISysSupplierService
@Override @Override
public List<SysSupplierVo> selectSysSupplierList(SysSupplier sysSupplier) public List<SysSupplierVo> selectSysSupplierList(SysSupplier sysSupplier)
{ {
return sysSupplierMapper.selectSysSupplierList(sysSupplier); PageDomain pageDomain = TableSupport.buildPageRequest();
Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize();
Page<SysSupplierVo> list = (Page<SysSupplierVo>) sysSupplierMapper.selectSysSupplierList(sysSupplier);
Page<SysSupplierVo> returnList = new Page<>();
//PageHelper 仅对第一List分页有效
for(SysSupplierVo sysSupplierVo : list){
SysUser sysUser = userMapper.selectUserByLoginName(sysSupplierVo.getCreateBy());
if (sysUser != null) {
sysSupplierVo.setCreateBy(sysUser.getUserName());
}
SysUser sysUser2 = userMapper.selectUserByLoginName(sysSupplierVo.getApplyUser());
if (sysUser2!=null){
sysSupplierVo.setApplyUserName(sysUser2.getUserName());
}
String instanceId = sysSupplierVo.getInstanceId();
// 当前环节
if (StringUtils.isNotBlank(instanceId)) {
List<Task> taskList = taskService.createTaskQuery()
.processInstanceId(instanceId)
// .singleResult();
.list(); // 例如请假会签,会同时拥有多个任务
if (!CollectionUtils.isEmpty(taskList)) {
TaskEntityImpl task = (TaskEntityImpl) taskList.get(0);
String taskId = task.getId();
sysSupplierVo.setTaskId(taskId);
// 设置待办用户
List<String> todoUserList = todoItemMapper.selectUndealTodoUserList(taskId);
if(!CollectionUtils.isEmpty(taskList)){
sysSupplierVo.setTodoUserId(String.join(",",todoUserList));
}
if (task.getSuspensionState() == 2) {
sysSupplierVo.setTaskName("已挂起");
sysSupplierVo.setSuspendState("2");
} else {
sysSupplierVo.setTaskName(task.getName());
sysSupplierVo.setSuspendState("1");
}
} else {
// 已办结或者已撤销
sysSupplierVo.setTaskName("已结束");
}
} else {
sysSupplierVo.setTaskName("未启动");
}
returnList.add(sysSupplierVo);
}
returnList.setTotal(CollectionUtils.isEmpty(list) ? 0 : list.getTotal());
returnList.setPageNum(pageNum);
returnList.setPageSize(pageSize);
return returnList;
} }
/** /**
* 新增供应商资料 * 新增供应商资料
* *
* @param sysSupplier 供应商资料 * @param sysSupplier 供应商资料
* @return 结果 * @return 结果
*/ */
@Override @Override
public int insertSysSupplier(SysSupplier sysSupplier) public int insertSysSupplier(SysSupplier sysSupplier)
{ {
String loginName = ShiroUtils.getLoginName();
Long id = sysSupplier.getSupplierId();
String fileIdStr = sysSupplier.getFileIdStr();
Long photoAttachId = sysSupplier.getPhotoAttachId();
String removeFileIdStr = sysSupplier.getRemoveFileIdStr();
sysSupplier.setCreateBy(loginName);
sysSupplier.setPurchaseBuyer(loginName);
sysSupplier.setCreateTime(DateUtils.getNowDate());
if(StringUtils.isNotBlank(removeFileIdStr)){
List<String> removeFileIdList = Arrays.asList(removeFileIdStr.split(";"));
commonService.deleteByIds(removeFileIdList);
}
if(StringUtils.isNotBlank(fileIdStr)) {
List<String> fileIdList = Arrays.asList(fileIdStr.split(";"));
if (photoAttachId == null) {
SysAttach attach = new SysAttach();
attach.setCreateBy(loginName);
attach.setCreateTime(new Date());
attach.setSourceType("erpMaterial");
attach.setSourceSubType("photo");
attach.setRelId(id);
attachService.insertSysAttach(attach);
photoAttachId = attach.getId();
}
attachFileService.updateAttachIdByIdList(photoAttachId, fileIdList);
}
return sysSupplierMapper.insertSysSupplier(sysSupplier); return sysSupplierMapper.insertSysSupplier(sysSupplier);
} }
/** /**
* 修改供应商资料 * 修改供应商资料
* *
* @param sysSupplier 供应商资料 * @param sysSupplier 供应商资料
* @return 结果 * @return 结果
*/ */
@ -93,6 +193,7 @@ public class SysSupplierServiceImpl implements ISysSupplierService
String fileIdStr = sysSupplier.getFileIdStr(); String fileIdStr = sysSupplier.getFileIdStr();
Long photoAttachId = sysSupplier.getPhotoAttachId(); Long photoAttachId = sysSupplier.getPhotoAttachId();
String removeFileIdStr = sysSupplier.getRemoveFileIdStr(); String removeFileIdStr = sysSupplier.getRemoveFileIdStr();
sysSupplier.setUpdateBy(loginName);
sysSupplier.setUpdateTime(new Date()); sysSupplier.setUpdateTime(new Date());
if(StringUtils.isNotBlank(removeFileIdStr)){ if(StringUtils.isNotBlank(removeFileIdStr)){
List<String> removeFileIdList = Arrays.asList(removeFileIdStr.split(";")); List<String> removeFileIdList = Arrays.asList(removeFileIdStr.split(";"));
@ -118,7 +219,7 @@ public class SysSupplierServiceImpl implements ISysSupplierService
/** /**
* 删除供应商资料对象 * 删除供应商资料对象
* *
* @param ids 需要删除的数据ID * @param ids 需要删除的数据ID
* @return 结果 * @return 结果
*/ */
@ -130,7 +231,7 @@ public class SysSupplierServiceImpl implements ISysSupplierService
/** /**
* 删除供应商资料信息 * 删除供应商资料信息
* *
* @param supplierId 供应商资料ID * @param supplierId 供应商资料ID
* @return 结果 * @return 结果
*/ */
@ -180,9 +281,149 @@ public class SysSupplierServiceImpl implements ISysSupplierService
* */ * */
@Override @Override
public List<SysSupplier> getSupplierCodes() { public List<SysSupplier> getSupplierCodes() {
List<SysSupplier> list = sysSupplierMapper.getSupplierCodes(); List<SysSupplier> list = sysSupplierMapper.getSupplierCodes();
return list; return list;
} }
@Override
@Transactional(rollbackFor = Exception.class)
public ProcessInstance updateSysSupplierById(SysSupplierVo sysSupplierVo) {
// 审核状态-待审核
sysSupplierVo.setAuditStatus("0");
SysUser user = ShiroUtils.getSysUser();
// 启动流程
String applyTitle = user.getUserName()+"发起了客户信息重新申请审批-"+ DateUtils.dateTimeNow();
String instanceType = "submit";
SysSupplier sysSupplier = new SysSupplier();
BeanUtils.copyProperties(sysSupplierVo,sysSupplier);
ProcessInstance processInstance = startProcessInstance(applyTitle,instanceType,sysSupplier, user);
String processInstanceId = processInstance.getProcessInstanceId();
// 作废实例id
sysSupplier.setCancelInstanceId(processInstanceId);
// 存在提交完就流程结束的情况
boolean processIsFinish = processService.judgeProcessIsFinish(processInstanceId);
if(processIsFinish){
// 审核状态-
sysSupplier.setAuditStatus("1");
// 使用状态-已作废
sysSupplier.setUseStatus("1");
}
sysSupplierMapper.updateSysSupplier(sysSupplier);
return processInstance;
}
@Override
@Transactional(rollbackFor = Exception.class)
public ProcessInstance cancelSysSupplierById(Long id) {
SysSupplierVo sysSupplierVo = sysSupplierMapper.cancelSysSupplierById(id);
// 审核状态-待审核
sysSupplierVo.setAuditStatus("0");
SysUser user = ShiroUtils.getSysUser();
// 启动流程
String applyTitle = user.getUserName()+"发起了客户信息作废审批-"+ DateUtils.dateTimeNow();
String instanceType = "cancel";
SysSupplier sysSupplier = new SysSupplier();
BeanUtils.copyProperties(sysSupplierVo,sysSupplier);
ProcessInstance processInstance = startProcessInstance(applyTitle,instanceType,sysSupplier, user);
String processInstanceId = processInstance.getProcessInstanceId();
// 作废实例id
sysSupplier.setCancelInstanceId(processInstanceId);
// 存在提交完就流程结束的情况
boolean processIsFinish = processService.judgeProcessIsFinish(processInstanceId);
if(processIsFinish){
// 审核状态-审核通过
sysSupplier.setAuditStatus("1");
// 使用状态-已作废
sysSupplier.setUseStatus("2");
}
sysSupplierMapper.updateSysSupplier(sysSupplier);
return processInstance;
}
@Override
@Transactional(rollbackFor = Exception.class)
public ProcessInstance restoreSysSupplierById(Long id) {
SysSupplierVo sysSupplierVo = sysSupplierMapper.selectSysSupplierById(id);
// 审核状态-待审核
sysSupplierVo.setAuditStatus("0");
SysUser user = ShiroUtils.getSysUser();
// 启动流程
String applyTitle = user.getUserName()+"发起了客户恢复审批-"+DateUtils.dateTimeNow();
String instanceType = "restore";
SysSupplier sysSupplier = new SysSupplier();
BeanUtils.copyProperties(sysSupplierVo,sysSupplier);
ProcessInstance processInstance = startProcessInstance(applyTitle,instanceType,sysSupplier, user);
String processInstanceId = processInstance.getProcessInstanceId();
// 恢复实例id
sysSupplier.setRestoreInstanceId(processInstanceId);
// 存在提交完就流程结束的情况
boolean processIsFinish = processService.judgeProcessIsFinish(processInstanceId);
if(processIsFinish){
// 审核状态-审核通过
sysSupplier.setAuditStatus("1");
// 使用状态-是
sysSupplier.setUseStatus("1");
}
sysSupplierMapper.updateSysSupplier(sysSupplier);
return processInstance;
}
/**
* 提交申请
* @param sysSupplier
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public ProcessInstance submitApply(SysSupplier sysSupplier) {
SysUser user = ShiroUtils.getSysUser();
sysSupplier.setApplyUser(user.getLoginName());
sysSupplier.setApplyTime(DateUtils.getNowDate());
insertSysSupplier(sysSupplier);
// 启动流程
String applyTitle = user.getUserName()+"发起了客户信息提交审批-"+DateUtils.dateTimeNow();
String instanceType = "submit";
ProcessInstance processInstance = startProcessInstance(applyTitle,instanceType,sysSupplier, user);
String processInstanceId = processInstance.getProcessInstanceId();
// 提交实例id
sysSupplier.setSubmitInstanceId(processInstanceId);
// 存在提交完就流程结束的情况
boolean processIsFinish = processService.judgeProcessIsFinish(processInstanceId);
if(processIsFinish){
// 审核状态-审核通过
sysSupplier.setAuditStatus("1");
// 使用状态-是
sysSupplier.setUseStatus("1");
}
sysSupplierMapper.updateSysSupplier(sysSupplier);
return processInstance;
}
private ProcessInstance startProcessInstance(String applyTitle, String instanceType, SysSupplier sysSupplier, SysUser user) {
Long customerId = sysSupplier.getSupplierId();
String businessKey = customerId.toString(); // 实体类 ID,作为流程的业务 key
String key = "supplier";
Map<String,Object> variables = new HashMap<>();
// 构造authority传参
buildAuthority(user, variables);
sysSupplier.setApplyTitle(applyTitle);
// 启动流程
ProcessInstance processInstance = processService.submitApply(user.getLoginName(), businessKey, applyTitle,
sysSupplier.getSupplierCode(), key, variables);
String processInstanceId = processInstance.getId();
sysSupplier.setInstanceId(processInstanceId); // 建立双向关系
sysSupplier.setInstanceType(instanceType);
return processInstance;
}
private void buildAuthority(SysUser user, Map<String, Object> variables) {
Set<String> roleKeys = roleService.selectRoleKeys(user.getUserId());
if(roleKeys.contains("cgyRole")){
variables.put("authority",1);
}
// 角色不同审核人不同
if(roleKeys.contains("admin")){
variables.put("authority",4);
}
}
} }

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

@ -103,6 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
) as p ) as p
on s.instance_type = p.dict_value on s.instance_type = p.dict_value
<where> <where>
<if test="id != null and id != ''"> and s.id = #{id}</if>
<if test="exportSales != null and exportSales != ''"> and s.export_sales = #{exportSales}</if> <if test="exportSales != null and exportSales != ''"> and s.export_sales = #{exportSales}</if>
<if test="auditStatus!=null and auditStatus != ''"> and s.audit_status = #{auditStatus}</if> <if test="auditStatus!=null and auditStatus != ''"> and s.audit_status = #{auditStatus}</if>
<if test="useStatus!=null and useStatus != ''"> and s.use_status = #{useStatus}</if> <if test="useStatus!=null and useStatus != ''"> and s.use_status = #{useStatus}</if>

10
ruoyi-admin/src/main/resources/mapper/system/SysCustomerQuoteMapper.xml

@ -43,14 +43,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="applyTitle" column="apply_title" /> <result property="applyTitle" column="apply_title" />
<result property="applyUser" column="apply_user" /> <result property="applyUser" column="apply_user" />
<result property="applyTime" column="apply_time" /> <result property="applyTime" column="apply_time" />
<result property="delFlag" column="del_flag" />
</resultMap> </resultMap>
<sql id="selectSysCustomerQuoteVo"> <sql id="selectSysCustomerQuoteVo">
select id,supplierCode,customerCode,customerName,pricingDate,enterprise,enterpriseSum,common_currency, select id,supplierCode,customerCode,customerName,pricingDate,enterprise,enterpriseSum,common_currency,
confirm_fax,rmbTax,usdTax,noRmb,noRmbSum,rmb,rmbSum,noUsd,noUsdSum,usd,usdSum,business_members, confirm_fax,rmbTax,usdTax,noRmb,noRmbSum,rmb,rmbSum,noUsd,noUsdSum,usd,usdSum,business_members,
degin_flag,del_flag,create_by,create_time,update_by,update_time,remark, degin_flag,del_flag,create_by,create_time,update_by,update_time,remark,audit_status,use_status,
audit_status,use_status,instance_id,instance_type, instance_id,instance_type,submit_instance_id,cancel_instance_id,restore_instance_id,apply_title,apply_user,apply_time,del_flag
submit_instance_id,cancel_instance_id,restore_instance_id,apply_time,apply_user,apply_title
from sys_customer_quote from sys_customer_quote
</sql> </sql>
@ -89,6 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="params.beginCreateTime1 != null and params.beginCreateTime1 != '' and params.endCreateTime1 != null and params.endCreateTime1 != ''"> <if test="params.beginCreateTime1 != null and params.beginCreateTime1 != '' and params.endCreateTime1 != null and params.endCreateTime1 != ''">
and s.create_time between #{params.beginCreateTime} and #{params.endCreateTime} and s.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
</if> </if>
<if test="keyword != null and keyword != ''"> and ((s.customerCode like concat('%',#{keyword},'%') or s.customerName like concat('%',#{keyword},'%'))</if>
</where> </where>
order by s.create_time desc order by s.create_time desc
</select> </select>
@ -143,6 +144,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="useStatus != null">use_status,</if> <if test="useStatus != null">use_status,</if>
<if test="auditStatus != null">audit_status,</if> <if test="auditStatus != null">audit_status,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="delFlag != null">del_flag</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="supplierCode != null and supplierCode != ''" >#{supplierCode},</if> <if test="supplierCode != null and supplierCode != ''" >#{supplierCode},</if>
@ -179,6 +181,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="useStatus != null">#{useStatus},</if> <if test="useStatus != null">#{useStatus},</if>
<if test="auditStatus != null">#{auditStatus},</if> <if test="auditStatus != null">#{auditStatus},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="delFlag != null">#{delFlag}</if>
</trim> </trim>
</insert> </insert>
@ -218,6 +221,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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>
<if test="updateTime != null" >update_time = #{updateTime},</if> <if test="updateTime != null" >update_time = #{updateTime},</if>
<if test="delFlag != null">del_flag = #{delFlag}</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>

45
ruoyi-admin/src/main/resources/mapper/system/SysSupplierMapper.xml

@ -85,20 +85,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sup.settlement_bank, sup.exchange_settlement_account, sup.deposit_bank, sup.bank_account, sup.settlement_bank, sup.exchange_settlement_account, sup.deposit_bank, sup.bank_account,
sup.rmb_registered_capital, sup.Industry_code, sup.merchandiser, sup.merchandiser_telephone, sup.rmb_registered_capital, sup.Industry_code, sup.merchandiser, sup.merchandiser_telephone,
sup.financial_contact, sup.confirm_tax, sup.tax_rate, sup.first_add_time, sup.update_info_time, sup.financial_contact, sup.confirm_tax, sup.tax_rate, sup.first_add_time, sup.update_info_time,
sup.photo_attach_id, sup.create_by, sup.create_time, sup.update_by, sup.update_time, sup.remark,sup.del_flag, sup.create_by, sup.create_time, sup.update_by, sup.update_time, sup.remark,sup.del_flag,
sup.instance_type, sup.instance_id, sup.restore_instance_id, sup.cancel_instance_id, sup.submit_instance_id, sup.instance_type, sup.instance_id, sup.restore_instance_id, sup.cancel_instance_id, sup.submit_instance_id,
sup.apply_title, sup.apply_user, sup.apply_time,p.dict_value as instance_type_name,file.url as photo_url sup.apply_title, sup.apply_user, sup.apply_time,p.dict_value as instance_type_name,file.url as photo_url
from sys_supplier as sup from sys_supplier as sup
left join( left join(
select dict_value,dict_label from sys_dict_data select dict_value,dict_label from sys_dict_data
where dict_type = 'processType' where dict_type = 'processType'
) as p on sup.instance_type = p.dict_value ) as p
left join ( on sup.instance_type = p.dict_value
select att.rel_id,file.url,min(file.create_time) as create_time left join (
from sys_attach as att left join sys_attach_file as file on att.id = file.attach_id select att.rel_id,file.url,min(file.create_time) as create_time
where att.source_type = 'supplier' and att.source_sub_type = 'photo' from sys_attach as att
group by att.rel_id left join sys_attach_file as file
) as file on sup.supplier_id = file.rel_id on att.id = file.attach_id
where att.source_type = 'supplier' and att.source_sub_type = 'photo'
group by att.rel_id
) as file
on sup.supplier_id = file.rel_id
<where> <where>
<if test="supplierCode != null and supplierCode != ''"> and sup.supplier_code like concat('%', #{supplierCode}, '%')</if> <if test="supplierCode != null and supplierCode != ''"> and sup.supplier_code like concat('%', #{supplierCode}, '%')</if>
<if test="supplierName != null and supplierName != ''"> and sup.supplier_name like concat('%', #{supplierName}, '%')</if> <if test="supplierName != null and supplierName != ''"> and sup.supplier_name like concat('%', #{supplierName}, '%')</if>
@ -123,7 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if> </if>
<if test="keyword != null and keyword != ''"> and ((sup.supplierCode like concat('%',#{keyword},'%') or sup.suppplierName like concat('%',#{keyword},'%'))</if> <if test="keyword != null and keyword != ''"> and ((sup.supplierCode like concat('%',#{keyword},'%') or sup.suppplierName like concat('%',#{keyword},'%'))</if>
</where> </where>
order by sup.create_time,sup.supplier_id desc order by sup.create_time desc
</select> </select>
<select id="selectSysSupplierById" parameterType="Long" resultMap="SysSupplierResult"> <select id="selectSysSupplierById" parameterType="Long" resultMap="SysSupplierResult">
select sup.supplier_id, sup.supplier_code, sup.supplier_name, sup.export_sales, select sup.supplier_id, sup.supplier_code, sup.supplier_name, sup.export_sales,
@ -135,21 +139,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sup.settlement_bank, sup.exchange_settlement_account, sup.deposit_bank, sup.bank_account, sup.settlement_bank, sup.exchange_settlement_account, sup.deposit_bank, sup.bank_account,
sup.rmb_registered_capital, sup.Industry_code, sup.merchandiser, sup.merchandiser_telephone, sup.rmb_registered_capital, sup.Industry_code, sup.merchandiser, sup.merchandiser_telephone,
sup.financial_contact, sup.confirm_tax, sup.tax_rate, sup.first_add_time, sup.update_info_time, sup.financial_contact, sup.confirm_tax, sup.tax_rate, sup.first_add_time, sup.update_info_time,
sup.photo_attach_id, sup.create_by, sup.create_time, sup.update_by, sup.update_time, sup.remark,sup.del_flag, sup.create_by, sup.create_time, sup.update_by, sup.update_time, sup.remark,sup.del_flag,
sup.instance_type, sup.instance_id, sup.restore_instance_id, sup.cancel_instance_id, sup.submit_instance_id, sup.instance_type, sup.instance_id, sup.restore_instance_id, sup.cancel_instance_id, sup.submit_instance_id,
sup.apply_title, sup.apply_user, sup.apply_time,p.dict_value as instance_type_name,file.url as photo_url sup.apply_title, sup.apply_user, sup.apply_time,p.dict_value as instance_type_name,file.url as photo_url
from sys_supplier as sup from sys_supplier as sup
left join( left join(
select dict_value,dict_label from sys_dict_data select dict_value,dict_label from sys_dict_data
where dict_type = 'processType' where dict_type = 'processType'
) as p on sup.instance_type = p.dict_value ) as p
on sup.instance_type = p.dict_value
left join ( left join (
select att.rel_id,file.url,min(file.create_time) as create_time select att.rel_id,file.url,min(file.create_time) as create_time
from sys_attach as att from sys_attach as att
left join sys_attach_file as file on att.id = file.attach_id left join sys_attach_file as file
where att.source_type = 'supplier' and att.source_sub_type = 'photo' on att.id = file.attach_id
where att.source_type = 'supplier' and att.source_sub_type = 'photo'
group by att.rel_id group by att.rel_id
) as file on sup.supplier_id = file.rel_id where sup.supplier_id = #{supplierId} ) as file
on sup.supplier_id = file.rel_id
where sup.supplier_id = #{supplierId}
</select> </select>
<select id="selectSysSupplierBycode" resultMap="SysSupplierResult"> <select id="selectSysSupplierBycode" resultMap="SysSupplierResult">
<include refid="selectSysSupplierVo"/> <include refid="selectSysSupplierVo"/>
@ -221,12 +229,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createBy != null and createBy != ''" >create_by,</if> <if test="createBy != null and createBy != ''" >create_by,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="remark != null and remark != ''" >remark,</if> <if test="remark != null and remark != ''" >remark,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="supplierType !=null and supplierType != ''">#{supplierType},</if> <if test="supplierType !=null and supplierType != ''">#{supplierType},</if>
<if test="useStatus != null and useStatus != ''">#{useStatus},</if>
<if test="auditStatus != null and auditStatus != ''">#{auditStatus},</if>
<if test="purchaseBuyer != null and purchaseBuyer != ''">#{purchaseBuyer},</if> <if test="purchaseBuyer != null and purchaseBuyer != ''">#{purchaseBuyer},</if>
<if test="supplierQualification != null and supplierQualification != ''">#{supplierQualification},</if> <if test="supplierQualification != null and supplierQualification != ''">#{supplierQualification},</if>
<if test="supplierCode != null and supplierCode != ''">#{supplierCode},</if> <if test="supplierCode != null and supplierCode != ''">#{supplierCode},</if>
@ -280,8 +285,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update sys_supplier update sys_supplier
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="supplierType !=null and supplierType != ''">supplier_type = #{supplierType},</if> <if test="supplierType !=null and supplierType != ''">supplier_type = #{supplierType},</if>
<if test="useStatus != null and useStatus != ''">use_status = #{useStatus},</if>
<if test="auditStatus != null and auditStatus != ''">audit_status = #{auditStatus},</if>
<if test="purchaseBuyer != null and purchaseBuyer != ''">purchase_buyer = #{purchaseBuyer},</if> <if test="purchaseBuyer != null and purchaseBuyer != ''">purchase_buyer = #{purchaseBuyer},</if>
<if test="supplierQualification != null and supplierQualification != ''">supplier_qualification = #{supplierQualification},</if> <if test="supplierQualification != null and supplierQualification != ''">supplier_qualification = #{supplierQualification},</if>
<if test="supplierCode != null and supplierCode != ''">supplier_code = #{supplierCode},</if> <if test="supplierCode != null and supplierCode != ''">supplier_code = #{supplierCode},</if>
@ -354,10 +357,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<update id="updateSysSupplierBySupplierCode" parameterType="String"> <update id="updateSysSupplierBySupplierCode" parameterType="String">
update sys_supplier set del_falg = #{delFlag} where supplier_code = #{supplierCode} update sys_supplier set del_flag = #{delFlag} where supplier_code = #{supplierCode}
</update> </update>
<update id="updateSysSupplierBySupplierCodes" parameterType="String"> <update id="updateSysSupplierBySupplierCodes" parameterType="String">
update sys_supplier set del_falg = #{delFlag} where supplier_code in update sys_supplier set del_flag = #{delFlag} where supplier_code in
<foreach item="supplierCode" collection="array" open="(" separator="," close=")"> <foreach item="supplierCode" collection="array" open="(" separator="," close=")">
#{supplierCode} #{supplierCode}
</foreach> </foreach>

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

@ -11,7 +11,7 @@
<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="supplierCode" class="form-control" type="text" required> <input name="supplierCode" class="form-control" type="text" required readonly>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">

59
ruoyi-admin/src/main/resources/templates/system/supplier/detail.html

@ -2,10 +2,12 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head> <head>
<th:block th:include="include :: header('详情供应商资料')" /> <th:block th:include="include :: header('详情供应商资料')" />
<th:block th:include="include :: select2-css" />
<link th:href="@{/ajax/libs/element-ui/element-ui.css}" rel="stylesheet"/>
</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-supplier-edit" th:object="${sysSupplier}"> <form class="form-horizontal m" id="form-supplier-detail" th:object="${sysSupplier}">
<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">
@ -263,7 +265,60 @@
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "system/supplier"; var prefix = ctx + "system/supplier";
var sysSupplier = [[${sysSupplier}]]; var sysSupplier = [[${sysSupplier}]];
$("#form-supplier-edit").validate({ new Vue({
el: '#app',
data: function() {
return {
fileList: [],
fileUploadUrl: ctx + "common/uploadSingleFile",
fileDeleteUrl: ctx + "common/deleteFile",
fileIdList:[],
}
},
methods: {
uploadSuccess(response, file, fileList) {
console.log(response);
if(response.code == web_status.SUCCESS){
var attachFileId = response.data.id;
file.attachFileId = attachFileId;
this.fileIdList.push(attachFileId);
$("#fileIdStr").val(this.fileIdList.join(";"));
$.modal.msgSuccess("上传成功");
}else{
$.modal.alertError(response.msg);
}
},
uploadRemove(file, fileList) {
console.log(file, fileList);
var attachFileId = file.attachFileId;
$.ajax({
type: "get",
url: this.fileDeleteUrl,
data: {id:attachFileId},
cache: false,
async: false, // 设置成同步
dataType: 'json',
success: function(result) {
if (result.code == web_status.SUCCESS) {
var index = this.fileIdList.indexOf(attachFileId);
if(index!=-1){
this.fileIdList.splice(index,1);
$("#fileIdStr").val(this.fileIdList.join(";"));
}
$.modal.msgSuccess("删除附件成功。");
} else {
$.modal.alertError(result.msg);
}
},
error: function(error) {
$.modal.alertError("删除附件失败。");
}
});
},
}
})
$("#form-supplier-detail").validate({
focusCleanup: true focusCleanup: true
}); });
$(function(){ $(function(){

12
ruoyi-admin/src/main/resources/templates/system/supplier/edit.html

@ -2,6 +2,8 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head> <head>
<th:block th:include="include :: header('修改供应商资料')" /> <th:block th:include="include :: header('修改供应商资料')" />
<th:block th:include="include :: select2-css" />
<link th:href="@{/ajax/libs/element-ui/element-ui.css}" rel="stylesheet"/>
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content"> <div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content">
@ -9,7 +11,7 @@
<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="supplierCode" th:field="*{supplierCode}" class="form-control" type="text" required> <input name="supplierCode" th:field="*{supplierCode}" class="form-control" type="text" required readonly>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -216,9 +218,7 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">证件:</label> <label class="col-sm-3 control-label">证件:</label>
<div class="form-group">
<label class="col-sm-3 control-label">照片:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<el-upload <el-upload
:action="fileUploadUrl" :action="fileUploadUrl"
@ -237,7 +237,6 @@
<input id="fileIdStr" type="text" name="fileIdStr" th:field="*{fileIdStr}" hidden /> <input id="fileIdStr" type="text" name="fileIdStr" th:field="*{fileIdStr}" hidden />
<input id="removeFileIdStr" type="text" name="removeFileIdStr" hidden /> <input id="removeFileIdStr" type="text" name="removeFileIdStr" hidden />
</div> </div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">供应商:</label> <label class="col-sm-3 control-label">供应商:</label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -253,11 +252,12 @@
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js"/> <th:block th:include="include :: select2-js"/>
<th:block th:include="include :: datetimepicker-js"/> <th:block th:include="include :: datetimepicker-js"/>
<script th:src="@{/js/activiti.js}"></script>
<script th:src="@{/ajax/libs/vue/vue.js}"></script> <script th:src="@{/ajax/libs/vue/vue.js}"></script>
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script> <script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "system/supplier"; var prefix = ctx + "system/supplier";
var sysSupplier = [[${supplier}]]; var sysSupplier = [[${sysSupplier}]];
new Vue({ new Vue({
el: '#app', el: '#app',
data: function() { data: function() {

42
ruoyi-admin/src/main/resources/templates/system/supplier/supplier.html

@ -64,6 +64,12 @@
</div> </div>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<th:block th:include="include :: bootstrap-table-editable-js" />
<th:block th:include="include :: datetimepicker-js" />
<script th:src="@{/js/activiti.js}"></script>
<script th:src="@{/ajax/libs/vue/vue.js}"></script>
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>
<script th:inline="javascript"> <script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:supplier:edit')}]]; var editFlag = [[${@permission.hasPermi('system:supplier:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:supplier:remove')}]]; var removeFlag = [[${@permission.hasPermi('system:supplier:remove')}]];
@ -77,7 +83,7 @@
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var useStatusDatas = [[${@dict.getType('useStatus')}]]; var useStatusDatas = [[${@dict.getType('useStatus')}]];
var prefix = ctx + "system/supplier"; var prefix = ctx + "system/supplier";
var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
$(function() { $(function() {
var options = { var options = {
url: prefix + "/list", url: prefix + "/list",
@ -85,6 +91,17 @@
updateUrl: prefix + "/edit/{id}", updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove", removeUrl: prefix + "/remove",
exportUrl: prefix + "/export", exportUrl: prefix + "/export",
detailUrl: prefix + "/detail/{id}",
search: false,
showExport: true,
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
showExport: false,
showExport: true,
showColumns: true,
showToggle: true,
pageList: [10, 25, "all"], pageList: [10, 25, "all"],
clickToSelect: true, clickToSelect: true,
modalName: "供应商资料", modalName: "供应商资料",
@ -98,6 +115,29 @@
{title: '使用状态',field: 'useStatus',formatter: function(value, row, index) { {title: '使用状态',field: 'useStatus',formatter: function(value, row, index) {
return $.table.selectDictLabel(useStatusDatas, value); return $.table.selectDictLabel(useStatusDatas, value);
}}, }},
{title: '流程实例ID',field: 'instanceId',visible: false},
{ title: '流程提交实例ID',field: 'submitInstanceId',visible: false},
{ title:'流程作废实例ID',field: 'cancelInstanceId',visible: false},
{title: '流程恢复实例ID',field: 'restoreInstanceId', visible: false},
{ title: '流程实例类型', field: 'instanceTypeName',visible: false},
{title: '申请人ID',field: 'applyUser', 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: '申请时间'
},
{title: '当前任务ID',field: 'taskId',visible: false},
{ title: '待办用户ID',field: 'todoUserId', visible: false},
{ title: '当前任务名称',field: 'taskName',
align: 'center',
formatter: function(value, row, index) {
return '<span class="badge badge-primary">' + value + '</span>';
}
},
{ title: '供应商编号',field: 'supplierCode'}, { title: '供应商编号',field: 'supplierCode'},
{title: '供应商名称',field: 'supplierName'}, {title: '供应商名称',field: 'supplierName'},
{title: '供应商类型',field: 'supplierType',formatter: function(value, row, index) { {title: '供应商类型',field: 'supplierType',formatter: function(value, row, index) {

324
ruoyi-admin/src/main/resources/templates/system/supplier/taskCgjlVerify.html

@ -0,0 +1,324 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('采购经理审核')" />
<th:block th:include="include :: select2-css" />
<th:block th:include="include :: datetimepicker-css" />
<link th:href="@{/ajax/libs/element-ui/element-ui.css}" rel="stylesheet"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-supplier-cgjl-audit" th:object="${formData}">
<input name="supplierId" th:field="*{supplierId}" type="hidden">
<input name="taskId" th:field="*{taskId}" type="hidden">
<input name="taskName" th:field="*{taskName}" type="hidden">
<input name="instanceId" th:field="*{instanceId}" type="hidden">
<input name="instanceType" th:field="*{instanceType}" 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="applyUser" th:field="*{applyUser}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">申请时间:</label>
<div class="col-sm-8">
<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>
<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="title" th:field="*{applyTitle}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">供应商编号:</label>
<div class="col-sm-8">
<input name="supplierCode" th:field="*{supplierCode}" class="form-control" type="text" disabled required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">供应商名称:</label>
<div class="col-sm-8">
<input name="supplierName" th:field="*{supplierName}" class="form-control" type="text" disabled required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">内外销:</label>
<div class="col-sm-8">
<select name="exportSales" class="form-control m-b" th:with="type=${@dict.getType('sys_export_sales')}" disabled required>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">企业名称:</label>
<div class="col-sm-8">
<input name="enterpriseName" th:field="*{enterpriseName}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">供应商类型:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_supplier_type')}">
<input type="radio" th:id="${'supplierType_' + dict.dictCode}"
name="supplierType" th:value="${dict.dictValue}" th:checked="${dict.default}" disabled required>
<label th:for="${'supplierType_' + 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">
<select name="enterpriseNature" th:field="*{enterpriseNature}" class="form-control m-b"
th:with="type=${@dict.getType('sys_enterprise_nature')}" disabled>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">企业地址:</label>
<div class="col-sm-8">
<input name="customerAddress" th:field="*{customerAddress}"
class="form-control" type="text" required disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">厂商类别:</label>
<div class="col-sm-8">
<input name="manufacturerCategory" th:field="*{manufacturerCategory}"
class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">邮编:</label>
<div class="col-sm-8">
<input name="postalCode" th:field="*{postalCode}" disabled 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="businessScope" th:field="*{businessScope}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">国家:</label>
<div class="col-sm-8">
<select name="customerCountry" th:field="*{customerCountry}" class="form-control m-b"
th:with="type=${@dict.getType('sys_country')}" disabled>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">成立日期:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="establishedTime" th:field="*{establishedTime}"
class="form-control" placeholder="yyyy-mm-dd" type="text" disabled>
<span class="input-group-addon" disabled><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="legalRepresentative" disabled
th:field="*{legalRepresentative}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">主联系人:</label>
<div class="col-sm-8">
<input name="customerContact" th:field="*{customerContact}" disabled
class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">联系电话:</label>
<div class="col-sm-8">
<input name="contactNumber" th:field="*{contactNumber}" disabled
class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">传真:</label>
<div class="col-sm-8">
<input name="customerFax" th:field="*{customerFax}" disabled class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Email:</label>
<div class="col-sm-8">
<input name="customerEmail" th:field="*{customerEmail}" disabled 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="website" th:field="*{website}" disabled 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="paymentTerms" th:field="*{paymentTerms}" disabled 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="supplierDays" th:field="*{supplierDays}" disabled 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="actualPaymentDays" th:field="*{actualPaymentDays}" disabled 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="settlementBank" th:field="*{settlementBank}" disabled 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="exchangeSettlementAccount" disabled th:field="*{exchangeSettlementAccount}" 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="depositBank" disabled th:field="*{depositBank}" 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="bankAccount" disabled th:field="*{bankAccount}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">RMB注册资金:</label>
<div class="col-sm-8">
<input name="rmbRegisteredCapital" disabled th:field="*{rmbRegisteredCapital}" 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="industryCode" disabled th:field="*{industryCode}" 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="merchandiser" disabled th:field="*{merchandiser}" 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="merchandiserTelephone" disabled th:field="*{merchandiserTelephone}" 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 id="purchaseBuyer_add" name="purchaseBuyer" class="form-control" disabled></select>
</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('sys_confirm_tax')}">
<input type="radio" th:id="${'confirmTax_' + dict.dictCode}" name="confirmTax" disabled
th:value="${dict.dictValue}" th:checked="${dict.default}">
<label th:for="${'confirmTax_' + 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="taxRate" th:field="*{taxRate}" disabled
class="form-control" type="text" placeholder="%">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">证件:</label>
<div class="col-sm-10">
<el-upload
:action="fileUploadUrl"
:on-success="uploadSuccess"
:on-remove="uploadRemove"
:file-list="fileList"
list-type="picture"
accept=".jpg,.png"
multiple>
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,第一张图片为主图</div>
</el-upload>
</div>
<input id="fileIdStr" type="text" name="fileIdStr" hidden>
</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('sys_supplier_qualification')}">
<input required type="radio" th:id="${'supplierQualification_' + dict.dictCode}" disabled
name="supplierQualification" th:value="${dict.dictValue}" th:checked="${dict.default}">
<label th:for="${'confirmTax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="cgjlVerifyApproved"><span style="color: red; ">*</span>审批意见:</label>
<div class="col-sm-8">
<select name="p_B_cgjlVerifyApproved" id="cgjlVerifyApproved" class="form-control m-b" required>
<option value=""></option>
<option value="true">同意</option>
<option value="false">拒绝</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">批注:</label>
<div class="col-sm-8">
<textarea name="comment" class="form-control"></textarea>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: datetimepicker-js"/>
<th:block th:include="include :: bootstrap-fileinput-js"/>
<script th:src="@{/js/activiti.js}"></script>
<script th:src="@{/ajax/libs/vue/vue.js}"></script>
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>
<script th:inline="javascript">
var prefix = ctx + "system/supplier";
$("#form-supplier-cgjl-audit").validate({focusCleanup: true});
function submitHandler() {
var taskId = [[${taskId}]];
if ($.validate.form()) {
if ($('textarea[name="comment"]').val()) {
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
}
var formData = $("#form-supplier-cgjl-audit").serialize();
$.operate.save(prefix + "/complete/" + taskId,formData);
}
}
</script>
</body>
</html>

324
ruoyi-admin/src/main/resources/templates/system/supplier/taskCgzgVerify.html

@ -0,0 +1,324 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('采购主管审核')" />
<th:block th:include="include :: select2-css" />
<th:block th:include="include :: datetimepicker-css" />
<link th:href="@{/ajax/libs/element-ui/element-ui.css}" rel="stylesheet"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-supplier-cgzg-audit" th:object="${formData}">
<input name="supplierId" th:field="*{supplierId}" type="hidden">
<input name="taskId" th:field="*{taskId}" type="hidden">
<input name="taskName" th:field="*{taskName}" type="hidden">
<input name="instanceId" th:field="*{instanceId}" type="hidden">
<input name="instanceType" th:field="*{instanceType}" 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="applyUser" th:field="*{applyUser}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">申请时间:</label>
<div class="col-sm-8">
<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>
<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="title" th:field="*{applyTitle}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">供应商编号:</label>
<div class="col-sm-8">
<input name="supplierCode" th:field="*{supplierCode}" class="form-control" type="text" disabled required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">供应商名称:</label>
<div class="col-sm-8">
<input name="supplierName" th:field="*{supplierName}" class="form-control" type="text" disabled required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">内外销:</label>
<div class="col-sm-8">
<select name="exportSales" class="form-control m-b" th:with="type=${@dict.getType('sys_export_sales')}" disabled required>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">企业名称:</label>
<div class="col-sm-8">
<input name="enterpriseName" th:field="*{enterpriseName}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">供应商类型:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_supplier_type')}">
<input type="radio" th:id="${'supplierType_' + dict.dictCode}"
name="supplierType" th:value="${dict.dictValue}" th:checked="${dict.default}" disabled required>
<label th:for="${'supplierType_' + 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">
<select name="enterpriseNature" th:field="*{enterpriseNature}" class="form-control m-b"
th:with="type=${@dict.getType('sys_enterprise_nature')}" disabled>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">企业地址:</label>
<div class="col-sm-8">
<input name="customerAddress" th:field="*{customerAddress}"
class="form-control" type="text" required disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">厂商类别:</label>
<div class="col-sm-8">
<input name="manufacturerCategory" th:field="*{manufacturerCategory}"
class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">邮编:</label>
<div class="col-sm-8">
<input name="postalCode" th:field="*{postalCode}" disabled 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="businessScope" th:field="*{businessScope}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">国家:</label>
<div class="col-sm-8">
<select name="customerCountry" th:field="*{customerCountry}" class="form-control m-b"
th:with="type=${@dict.getType('sys_country')}" disabled>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">成立日期:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="establishedTime" th:field="*{establishedTime}"
class="form-control" placeholder="yyyy-mm-dd" type="text" disabled>
<span class="input-group-addon" disabled><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="legalRepresentative" disabled
th:field="*{legalRepresentative}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">主联系人:</label>
<div class="col-sm-8">
<input name="customerContact" th:field="*{customerContact}" disabled
class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">联系电话:</label>
<div class="col-sm-8">
<input name="contactNumber" th:field="*{contactNumber}" disabled
class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">传真:</label>
<div class="col-sm-8">
<input name="customerFax" th:field="*{customerFax}" disabled class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Email:</label>
<div class="col-sm-8">
<input name="customerEmail" th:field="*{customerEmail}" disabled 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="website" th:field="*{website}" disabled 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="paymentTerms" th:field="*{paymentTerms}" disabled 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="supplierDays" th:field="*{supplierDays}" disabled 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="actualPaymentDays" th:field="*{actualPaymentDays}" disabled 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="settlementBank" th:field="*{settlementBank}" disabled 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="exchangeSettlementAccount" disabled th:field="*{exchangeSettlementAccount}" 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="depositBank" disabled th:field="*{depositBank}" 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="bankAccount" disabled th:field="*{bankAccount}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">RMB注册资金:</label>
<div class="col-sm-8">
<input name="rmbRegisteredCapital" disabled th:field="*{rmbRegisteredCapital}" 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="industryCode" disabled th:field="*{industryCode}" 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="merchandiser" disabled th:field="*{merchandiser}" 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="merchandiserTelephone" disabled th:field="*{merchandiserTelephone}" 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 id="purchaseBuyer_add" name="purchaseBuyer" class="form-control" disabled></select>
</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('sys_confirm_tax')}">
<input type="radio" th:id="${'confirmTax_' + dict.dictCode}" name="confirmTax" disabled
th:value="${dict.dictValue}" th:checked="${dict.default}">
<label th:for="${'confirmTax_' + 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="taxRate" th:field="*{taxRate}" disabled
class="form-control" type="text" placeholder="%">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">证件:</label>
<div class="col-sm-10">
<el-upload
:action="fileUploadUrl"
:on-success="uploadSuccess"
:on-remove="uploadRemove"
:file-list="fileList"
list-type="picture"
accept=".jpg,.png"
multiple>
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,第一张图片为主图</div>
</el-upload>
</div>
<input id="fileIdStr" type="text" name="fileIdStr" hidden>
</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('sys_supplier_qualification')}">
<input required type="radio" th:id="${'supplierQualification_' + dict.dictCode}" disabled
name="supplierQualification" th:value="${dict.dictValue}" th:checked="${dict.default}">
<label th:for="${'confirmTax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="cgzgVerifyApproved"><span style="color: red; ">*</span>审批意见:</label>
<div class="col-sm-8">
<select name="p_B_cgzgVerifyApproved" id="cgzgVerifyApproved" class="form-control m-b" required>
<option value=""></option>
<option value="true">同意</option>
<option value="false">拒绝</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">批注:</label>
<div class="col-sm-8">
<textarea name="comment" class="form-control"></textarea>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: datetimepicker-js"/>
<th:block th:include="include :: bootstrap-fileinput-js"/>
<script th:src="@{/js/activiti.js}"></script>
<script th:src="@{/ajax/libs/vue/vue.js}"></script>
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>
<script th:inline="javascript">
var prefix = ctx + "system/supplier";
$("#form-supplier-cgzg-audit").validate({focusCleanup: true});
function submitHandler() {
var taskId = [[${taskId}]];
if ($.validate.form()) {
if ($('textarea[name="comment"]').val()) {
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
}
var formData = $("#form-supplier-cgzg-audit").serialize();
$.operate.save(prefix + "/complete/" + taskId,formData);
}
}
</script>
</body>
</html>

366
ruoyi-admin/src/main/resources/templates/system/supplier/taskModifyApply.html

@ -0,0 +1,366 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('驳回调整')" />
<th:block th:include="include :: select2-css" />
<th:block th:include="include :: datetimepicker-css" />
<link th:href="@{/ajax/libs/element-ui/element-ui.css}" rel="stylesheet"/>
</head>
<body class="white-bg">
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-supplier-modify" th:object="${formData}">
<input name="supplierId" th:field="*{supplierId}" type="hidden">
<input name="taskId" th:field="*{taskId}" type="hidden">
<input name="taskName" th:field="*{taskName}" type="hidden">
<input name="instanceId" th:field="*{instanceId}" type="hidden">
<input name="instanceType" th:field="*{instanceType}" type="hidden">
<!--驳回调整允许更新内容-->
<input type="hidden" name="saveEntity" value="true" />
<input type="hidden" name="p_B_reApply" class="form-control m-b" />
<div class="form-group">
<label class="col-sm-3 control-label is-required">供应商编号:</label>
<div class="col-sm-8">
<input name="supplierCode" th:field="*{supplierCode}" class="form-control" type="text" required readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">供应商名称:</label>
<div class="col-sm-8">
<input name="supplierName" th:field="*{supplierName}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">内外销:</label>
<div class="col-sm-8">
<select name="exportSales" class="form-control m-b" th:with="type=${@dict.getType('sys_export_sales')}" required>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">企业名称:</label>
<div class="col-sm-8">
<input name="enterpriseName" th:field="*{enterpriseName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">供应商类型:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_supplier_type')}">
<input type="radio" th:id="${'supplierType_' + dict.dictCode}"
name="supplierType" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
<label th:for="${'supplierType_' + 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">
<select name="enterpriseNature" th:field="*{enterpriseNature}" class="form-control m-b" th:with="type=${@dict.getType('sys_enterprise_nature')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">企业地址:</label>
<div class="col-sm-8">
<input name="customerAddress" th:field="*{customerAddress}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">厂商类别:</label>
<div class="col-sm-8">
<input name="manufacturerCategory" th:field="*{manufacturerCategory}" 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="postalCode" th:field="*{postalCode}" 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="businessScope" th:field="*{businessScope}" 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="customerCountry" th:field="*{customerCountry}" class="form-control m-b" th:with="type=${@dict.getType('sys_country')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">成立日期:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="establishedTime" th:field="*{establishedTime}" class="form-control" placeholder="yyyy-mm-dd" type="text">
<span class="input-group-addon" disabled><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="legalRepresentative" th:field="*{legalRepresentative}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">主联系人:</label>
<div class="col-sm-8">
<input name="customerContact" th:field="*{customerContact}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">联系电话:</label>
<div class="col-sm-8">
<input name="contactNumber" th:field="*{contactNumber}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">传真:</label>
<div class="col-sm-8">
<input name="customerFax" th:field="*{customerFax}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Email:</label>
<div class="col-sm-8">
<input name="customerEmail" th:field="*{customerEmail}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">网站:</label>
<div class="col-sm-8">
<input name="website" th:field="*{website}" 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="paymentTerms" th:field="*{paymentTerms}" 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="supplierDays" th:field="*{supplierDays}" 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="actualPaymentDays" th:field="*{actualPaymentDays}" 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="settlementBank" th:field="*{settlementBank}" 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="exchangeSettlementAccount" th:field="*{exchangeSettlementAccount}" 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="depositBank" th:field="*{depositBank}" 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="bankAccount" th:field="*{bankAccount}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">RMB注册资金:</label>
<div class="col-sm-8">
<input name="rmbRegisteredCapital" th:field="*{rmbRegisteredCapital}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">行业代码:</label>
<div class="col-sm-8">
<input name="industryCode" th:field="*{industryCode}" 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="merchandiser" th:field="*{merchandiser}" 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="merchandiserTelephone" th:field="*{merchandiserTelephone}" 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 id="purchaseBuyer_add" name="purchaseBuyer" class="form-control" >
</select>
</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('sys_confirm_tax')}">
<input type="radio" th:id="${'confirmTax_' + dict.dictCode}" name="confirmTax" th:value="${dict.dictValue}" th:checked="${dict.default}">
<label th:for="${'confirmTax_' + 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="taxRate" th:field="*{taxRate}" class="form-control" type="text" placeholder="%">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">证件:</label>
<div class="col-sm-8">
<el-upload
:action="fileUploadUrl"
:on-success="uploadSuccess"
:on-remove="uploadRemove"
:file-list="fileList"
list-type="picture"
limit="5"
accept=".jpg,.png"
multiple>
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,第一张图片为主图</div>
</el-upload>
</div>
<input id="photoAttachId" name = "photoAttachId" hidden th:field="*{photoAttachId}" />
<input id="fileIdStr" type="text" name="fileIdStr" th:field="*{fileIdStr}" hidden />
<input id="removeFileIdStr" type="text" name="removeFileIdStr" hidden />
</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('sys_supplier_qualification')}">
<input required type="radio" th:id="${'supplierQualification_' + dict.dictCode}"
name="supplierQualification" th:value="${dict.dictValue}" th:checked="${dict.default}">
<label th:for="${'confirmTax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="container">
<div class="form-group">
<label class="col-sm-3 control-label" for="reApply">是否继续申请:</label>
<div class="col-sm-8">
<select id="reApply" name="reApply" class="form-control m-b">
<option value="true">重新申请</option>
<option value="false">结束流程</option>
</select>
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: datetimepicker-js"/>
<script th:src="@{/js/activiti.js}"></script>
<script th:src="@{/ajax/libs/vue/vue.js}"></script>
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>
<script th:inline="javascript">
var prefix = ctx + "system/supplier";
new Vue({
el: '#app',
data: function() {
return {
fileList: [],
fileUploadUrl: ctx + "common/uploadSingleFile",
fileDeleteUrl: ctx + "common/deleteFile",
fileIdList:[],
}
},
methods: {
uploadSuccess(response, file, fileList) {
console.log(response);
if(response.code == web_status.SUCCESS){
var attachFileId = response.data.id;
file.attachFileId = attachFileId;
this.fileIdList.push(attachFileId);
$("#fileIdStr").val(this.fileIdList.join(";"));
$.modal.msgSuccess("上传成功");
}else{
$.modal.alertError(response.msg);
}
},
uploadRemove(file, fileList) {
console.log(file, fileList);
var attachFileId = file.attachFileId;
$.ajax({
type: "get",
url: this.fileDeleteUrl,
data: {id:attachFileId},
cache: false,
async: false, // 设置成同步
dataType: 'json',
success: function(result) {
if (result.code == web_status.SUCCESS) {
var index = this.fileIdList.indexOf(attachFileId);
if(index!=-1){
this.fileIdList.splice(index,1);
$("#fileIdStr").val(this.fileIdList.join(";"));
}
$.modal.msgSuccess("删除附件成功。");
} else {
$.modal.alertError(result.msg);
}
},
error: function(error) {
$.modal.alertError("删除附件失败。");
}
});
},
}
})
var sysSupplier = [[formData]];
$("#form-supplier-modify").validate({focusCleanup: true});
function submitHandler() {
$("#p_B_reApply").val($("#reApply").val());
var taskId = [[${taskId}]];
if ($.validate.form()) {
$.operate.save(prefix + "/complete/" + taskId, $('#form-supplier-modify').serialize());
}
}
$(function(){
$.ajax({
url: ctx + 'system/user/list',
type: 'post',
success: function (res) {
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("#form-supplier-modify select[name='purchaseBuyer']").append(
"<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
}
$("#form-supplier-modify select[name='purchaseBuyer']").val(sysSupplier.purchaseBuyer).trigger("change");
} else {
$.modal.msgError(res.msg);
}
}
});
$("input[name='confirmFax']").val(sysSupplier.confirmFax);
$("input[name='supplierType']").val(sysSupplier.supplierType);
$("input[name='supplierQualification']").val(sysSupplier.supplierQualification);
})
</script>
</body>
</html>
Loading…
Cancel
Save