Browse Source

修改:添加请购单审核,已添加请购单经理审核,主管审核,副总经理审核页面。已通过请购单经理审核,主管审核,副总经理审核。修改流程图对象,新增变量surpass 金额大于3000 节点。

dev
zhangsiqi 5 months ago
parent
commit
6c60884dba
  1. 7
      ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/service/impl/BizTodoItemServiceImpl.java
  2. 24
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseRequisitioningOrderChildController.java
  3. 19
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseRequisitioningOrderController.java
  4. 17
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseRequisitioningOrder.java
  5. 53
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseRequisitioningOrderChild.java
  6. 32
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseRequisitioningOrderChildMapper.java
  7. 42
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseRequisitioningOrderMapper.java
  8. 16
      ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseRequisitioningOrderChildService.java
  9. 2
      ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseRequisitioningOrderService.java
  10. 20
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseRequisitioningOrderChildServiceImpl.java
  11. 113
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseRequisitioningOrderServiceImpl.java
  12. 51
      ruoyi-admin/src/main/resources/mapper/system/BaseRequisitioningOrderChildMapper.xml
  13. 128
      ruoyi-admin/src/main/resources/mapper/system/BaseRequisitioningOrderMapper.xml
  14. 10
      ruoyi-admin/src/main/resources/templates/system/requesitioningChild/add.html
  15. 10
      ruoyi-admin/src/main/resources/templates/system/requesitioningChild/edit.html
  16. 16
      ruoyi-admin/src/main/resources/templates/system/requesitioningChild/requesitioningChild.html
  17. 56
      ruoyi-admin/src/main/resources/templates/system/requisitioning/add.html
  18. 18
      ruoyi-admin/src/main/resources/templates/system/requisitioning/detail.html
  19. 27
      ruoyi-admin/src/main/resources/templates/system/requisitioning/edit.html
  20. 62
      ruoyi-admin/src/main/resources/templates/system/requisitioning/requisitioning.html
  21. 40
      ruoyi-admin/src/main/resources/templates/system/requisitioning/taksFzjlVerify.html
  22. 180
      ruoyi-admin/src/main/resources/templates/system/requisitioning/taskFzjlVerify.html
  23. 237
      ruoyi-admin/src/main/resources/templates/system/requisitioning/taskModifyApply.html
  24. 106
      ruoyi-admin/src/main/resources/templates/system/requisitioning/taskQgjlVerify.html
  25. 171
      ruoyi-admin/src/main/resources/templates/system/requisitioning/taskQgzgVerify.html
  26. 230
      ruoyi-admin/src/main/resources/templates/system/requisitioning/taskZozjVerify.html

7
ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/service/impl/BizTodoItemServiceImpl.java

@ -183,6 +183,7 @@ public class BizTodoItemServiceImpl implements IBizTodoItemService {
} else {
// 查询候选用户组,系统用户角色视图,group是角色
List<String> todoUserIdList = bizTodoItemMapper.selectTodoUserListByTaskId(task.getId());
//如果是查询初始化的
if (!CollectionUtils.isEmpty(todoUserIdList)) {
for (String todoUserId: todoUserIdList) {
SysUser todoUser = userMapper.selectUserByLoginName(todoUserId);
@ -206,6 +207,8 @@ public class BizTodoItemServiceImpl implements IBizTodoItemService {
}
@Override
public int insertTodoItem2(String instanceId, String itemName, String itemContent, String module) {
//获取当前请购人的部分信息,需要获取到的为当前节点,申请人,采购员,采购经理
//查询待办项目
BizTodoItem todoItem = new BizTodoItem();
todoItem.setItemName(itemName);
todoItem.setItemContent(itemContent);
@ -286,17 +289,16 @@ public class BizTodoItemServiceImpl implements IBizTodoItemService {
List<Task> taskList = taskService.createTaskQuery().processInstanceId(instanceId).active().list();
int counter = 0;
for (Task task: taskList) {
// todoitem 去重
List<BizTodoItem> bizTodoItem = bizTodoItemMapper.selectTodoItemByTaskId(task.getId(),"0");
if (bizTodoItem != null) continue;
BizTodoItem newItem = new BizTodoItem();
BeanUtils.copyProperties(todoItem, newItem);
newItem.setInstanceId(instanceId);
newItem.setTaskId(task.getId());
newItem.setTaskName("task" + task.getTaskDefinitionKey().substring(0, 1).toUpperCase() + task.getTaskDefinitionKey().substring(1));
newItem.setNodeName(task.getName());
//如果获取代理人
String assignee = task.getAssignee();
if (StringUtils.isNotBlank(assignee)) {
newItem.setTodoUserId(assignee);
@ -307,7 +309,6 @@ public class BizTodoItemServiceImpl implements IBizTodoItemService {
} else {
List<String> todoUserIdList = processMapper.selectTodoUserListByTaskId(task.getId());
System.out.println("todoUserIdList="+todoUserIdList);
for (String todoUserId: todoUserIdList) {
SysUser todoUser = userMapper.selectUserByLoginName(todoUserId);
newItem.setTodoUserId(todoUser.getLoginName());

24
ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseRequisitioningOrderChildController.java

@ -26,25 +26,25 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @date 2024-05-13
*/
@Controller
@RequestMapping("/system/requesitioningChild")
@RequestMapping("/system/requisitioningChild")
public class BaseRequisitioningOrderChildController extends BaseController
{
private String prefix = "system/requesitioningChild";
private String prefix = "system/requisitioningChild";
@Autowired
private IBaseRequisitioningOrderChildService baseRequisitioningOrderChildService;
// @RequiresPermissions("system:requesitioningChild:view")
// @RequiresPermissions("system:requisitioningChild:view")
@GetMapping()
public String requesitioningChild()
public String requisitioningChild()
{
return prefix + "/requesitioningChild";
return prefix + "/requisitioningChild";
}
/**
* 查询请购单列表
*/
@RequiresPermissions("system:requesitioningChild:list")
// @RequiresPermissions("system:requisitioningChild:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(BaseRequisitioningOrderChild baseRequisitioningOrderChild)
@ -57,7 +57,7 @@ public class BaseRequisitioningOrderChildController extends BaseController
/**
* 导出请购单列表
*/
// @RequiresPermissions("system:requesitioningChild:export")
// @RequiresPermissions("system:requisitioninggChild:export")
@Log(title = "请购单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
@ -80,7 +80,7 @@ public class BaseRequisitioningOrderChildController extends BaseController
/**
* 新增保存请购单
*/
// @RequiresPermissions("system:requesitioningChild:add")
// @RequiresPermissions("system:requisitioninggChild:add")
@Log(title = "请购单", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
@ -103,7 +103,7 @@ public class BaseRequisitioningOrderChildController extends BaseController
/**
* 修改保存请购单
*/
// @RequiresPermissions("system:requesitioningChild:edit")
// @RequiresPermissions("system:requisitioningChild:edit")
@Log(title = "请购单", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
@ -115,7 +115,7 @@ public class BaseRequisitioningOrderChildController extends BaseController
/**
* 删除请购单
*/
// @RequiresPermissions("system:requesitioningChild:remove")
// @RequiresPermissions("system:requisitioningChild:remove")
@Log(title = "请购单", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
@ -127,7 +127,7 @@ public class BaseRequisitioningOrderChildController extends BaseController
/**
* 作废请购单
*/
// @RequiresPermissions("system:requesitioningChild:cancel")
// @RequiresPermissions("system:requisitioningChild:cancel")
@Log(title = "请购单", businessType = BusinessType.CANCEL)
@GetMapping( "/cancel/{id}")
@ResponseBody
@ -138,7 +138,7 @@ public class BaseRequisitioningOrderChildController extends BaseController
/**
* 恢复请购单
*/
// @RequiresPermissions("system:requesitioningChild:restore")
// @RequiresPermissions("system:requisitioningChild:restore")
@Log(title = "请购单", businessType = BusinessType.RESTORE)
@GetMapping( "/restore/{id}")
@ResponseBody

19
ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseRequisitioningOrderController.java

@ -7,6 +7,7 @@ import java.util.Set;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSON;
import com.ruoyi.ck.utils.Result;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.exception.base.BaseException;
@ -147,7 +148,10 @@ public class BaseRequisitioningOrderController extends BaseController
@ResponseBody
public AjaxResult addSave(@RequestBody BaseRequisitioningOrder baseRequisitioningOrder)
{
baseRequisitioningOrderService.insertBaseRequisitioningOrder(baseRequisitioningOrder);
baseRequisitioningOrder.setCreateBy(ShiroUtils.getLoginName());
baseRequisitioningOrder.setUseStatus("0");
baseRequisitioningOrder.setAuditStatus("0");
baseRequisitioningOrderService.submitApply(baseRequisitioningOrder);
return AjaxResult.success();
}
@ -171,7 +175,11 @@ public class BaseRequisitioningOrderController extends BaseController
@ResponseBody
public AjaxResult editSave(@RequestBody BaseRequisitioningOrder baseRequisitioningOrder)
{
return toAjax(baseRequisitioningOrderService.updateBaseRequisitioningOrder(baseRequisitioningOrder));
baseRequisitioningOrder.setCreateBy(ShiroUtils.getLoginName());
baseRequisitioningOrder.setUseStatus("0");
baseRequisitioningOrder.setAuditStatus("0");
baseRequisitioningOrderService.submitApply(baseRequisitioningOrder);
return AjaxResult.success();
}
/**
@ -220,7 +228,7 @@ public class BaseRequisitioningOrderController extends BaseController
SysDept dept = sysDeptMapper.selectDeptById(curUser.getDeptId());
String postName = "";
String deptName = "";
if(sysPostList.size() <= 0){
if(sysPostList.size() == 0){
deptName = dept.getDeptName();
}else{
postName = sysPostList.get(0).getPostName();
@ -317,4 +325,9 @@ public class BaseRequisitioningOrderController extends BaseController
return success("任务已完成");
}
@GetMapping("/getId")
@ResponseBody
public Result getId(HttpServletRequest request) throws Exception {
return Result.getSuccessResult(baseRequisitioningOrderService.getId());
}
}

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

@ -42,7 +42,7 @@ public class BaseRequisitioningOrder extends BaseEntity
/** 物料合计 */
@Excel(name = "物料合计")
private Long materialAmount;
private Integer materialAmount;
/** 数量总计 */
@Excel(name = "数量总计")
@ -87,12 +87,23 @@ public class BaseRequisitioningOrder extends BaseEntity
/** 申请人 */
private String applyTitle;
private String delFlag;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date applyTime;
private List<BaseRequisitioningOrderChild> baseRequisitioningOrderChildList;
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getInstanceId() {
return instanceId;
}
@ -227,12 +238,12 @@ public class BaseRequisitioningOrder extends BaseEntity
{
return correlationCode;
}
public void setMaterialAmount(Long materialAmount)
public void setMaterialAmount(Integer materialAmount)
{
this.materialAmount = materialAmount;
}
public Long getMaterialAmount()
public Integer getMaterialAmount()
{
return materialAmount;
}

53
ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseRequisitioningOrderChild.java

@ -22,7 +22,7 @@ public class BaseRequisitioningOrderChild extends BaseEntity
/** 关联请购单编号字段 */
@Excel(name = "关联请购单编号字段")
private String quoteId;
private String requisitioningCode;
/** 物料表中的id */
@Excel(name = "物料表中的id")
@ -56,10 +56,17 @@ public class BaseRequisitioningOrderChild extends BaseEntity
@Excel(name = "物料的品牌")
private String brand;
/** 物料的单位 */
@Excel(name = "物料的单位")
private String unit;
/** 物料的描述 */
@Excel(name = "物料的描述")
private String describe;
@Excel(name = "入库部门")
private String warehouseDept;
/** 物料的数量 */
@Excel(name = "物料的数量")
private Long materialNum;
@ -88,6 +95,17 @@ public class BaseRequisitioningOrderChild extends BaseEntity
@Excel(name = "审核状态")
private String auditStatus;
private String delFlag;
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public void setRequisitioningChildId(Long requisitioningChildId)
{
this.requisitioningChildId = requisitioningChildId;
@ -97,15 +115,15 @@ public class BaseRequisitioningOrderChild extends BaseEntity
{
return requisitioningChildId;
}
public void setQuoteId(String quoteId)
{
this.quoteId = quoteId;
public String getRequisitioningCode() {
return requisitioningCode;
}
public String getQuoteId()
{
return quoteId;
public void setRequisitioningCode(String requisitioningCode) {
this.requisitioningCode = requisitioningCode;
}
public void setMaterialId(Long materialId)
{
this.materialId = materialId;
@ -187,11 +205,28 @@ public class BaseRequisitioningOrderChild extends BaseEntity
{
return describe;
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
public void setMaterialNum(Long materialNum)
{
this.materialNum = materialNum;
}
public String getWarehouseDept() {
return warehouseDept;
}
public void setWarehouseDept(String warehouseDept) {
this.warehouseDept = warehouseDept;
}
public Long getMaterialNum()
{
return materialNum;
@ -255,7 +290,7 @@ public class BaseRequisitioningOrderChild extends BaseEntity
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("requisitioningChildId", getRequisitioningChildId())
.append("quoteId", getQuoteId())
.append("requisitioningCode", getRequisitioningCode())
.append("materialId", getMaterialId())
.append("materialCode", getMaterialCode())
.append("photoUrl", getPhotoUrl())
@ -264,6 +299,8 @@ public class BaseRequisitioningOrderChild extends BaseEntity
.append("materialModel", getMaterialModel())
.append("specifications", getSpecifications())
.append("brand", getBrand())
.append("unit", getUnit())
.append("warehouseDept", getWarehouseDept())
.append("describe", getDescribe())
.append("materialNum", getMaterialNum())
.append("materialRmb", getMaterialRmb())

32
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseRequisitioningOrderChildMapper.java

@ -75,8 +75,36 @@ public interface BaseRequisitioningOrderChildMapper
*/
public int restoreBaseRequisitioningOrderChildById(Long requisitioningChildId);
/**
* 根据请购单号删除请购单
* @param requisitioningCode 请购单号
* @return
*/
public int deleteBaseRequisitioningOrderChildByRequisitioningCode(String requisitioningCode);
/**
* 根据请购单号批量删除请购单
* @param requisitioningCodes 请购单号组
* @return
*/
public int deleteBaseRequisitioningOrderChildByRequisitioningCodes(String[] requisitioningCodes);
public int deleteBaseRequisitioningOrderChildByQuoteId(String quoteId);
/**
* 根据请购单号批量修改请购单是否删除
* @param delFlag 0 未删除 1 已删除
* @param requisitioningCodes 请购单号组
* @return
*/
public int updateBaseRequisitioningOrderChildByRequisitioningCodes(String delFlag,String[] requisitioningCodes);
/**
* 根据请购单号修改请购单是否删除
* @param delFlag 0 未删除 1 已删除
* @param requisitioningCode 请购单号
* @return
*/
public int deleteBaseRequisitioningOrderChildByQuoteIds(String[] quoteIds);
public int updateBaseRequisitioningOrderChildByRequisitioningCode(String delFlag,String requisitioningCode);
}

42
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseRequisitioningOrderMapper.java

@ -3,6 +3,7 @@ package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.BaseRequisitioningOrder;
import com.ruoyi.system.domain.Vo.BaseRequisitioningOrderVo;
import io.swagger.models.auth.In;
/**
* 请购单Mapper接口
@ -76,9 +77,46 @@ public interface BaseRequisitioningOrderMapper
* @param requisitioningId 请购单ID
* @return 结果
*/
public int restoreBaseRequisitioningOrderById(Long requisitioningId);
public Integer restoreBaseRequisitioningOrderById(Long requisitioningId);
int deleteBaseRequisitioningOrderByCode(String requisitioningCode);
/**
* 根据编码删除请购单
* @param requisitioningCode
* @return
*/
Integer deleteBaseRequisitioningOrderByCode(String requisitioningCode);
/**
* 根据编码批量删除请购单
* @param requisitioningCodes
* @return
*/
Integer deleteBaseRequisitioningOrderByCodes(String[] requisitioningCodes);
/**
* 根据编码批量修改请购单
* @param delFlag 0 未删除 1 已删除
* @param requisitioningCodes
* @return
*/
Integer updateBaseRequisitioningOrderByCodes(String delFlag,String[] requisitioningCodes);
/**
* 根据编码修改请购单
* @param delFlag
* @param requisitioningCode
* @return
*/
Integer updateBaseRequisitioningOrderByCode(String delFlag,String requisitioningCode);
/**
* 根据id批量查询请购单
* @param ids
* @return
*/
List<BaseRequisitioningOrder> selectBaseRequisitioningOrderByIds(String[] ids);
}

16
ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseRequisitioningOrderChildService.java

@ -33,7 +33,7 @@ public interface IBaseRequisitioningOrderChildService
* @param baseRequisitioningOrderChild 请购单
* @return 结果
*/
public int insertBaseRequisitioningOrderChild(BaseRequisitioningOrderChild baseRequisitioningOrderChild);
public Integer insertBaseRequisitioningOrderChild(BaseRequisitioningOrderChild baseRequisitioningOrderChild);
/**
* 修改请购单
@ -41,7 +41,7 @@ public interface IBaseRequisitioningOrderChildService
* @param baseRequisitioningOrderChild 请购单
* @return 结果
*/
public int updateBaseRequisitioningOrderChild(BaseRequisitioningOrderChild baseRequisitioningOrderChild);
public Integer updateBaseRequisitioningOrderChild(BaseRequisitioningOrderChild baseRequisitioningOrderChild);
/**
* 批量删除请购单
@ -49,7 +49,7 @@ public interface IBaseRequisitioningOrderChildService
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteBaseRequisitioningOrderChildByIds(String ids);
public Integer deleteBaseRequisitioningOrderChildByIds(String ids);
/**
* 删除请购单信息
@ -57,23 +57,23 @@ public interface IBaseRequisitioningOrderChildService
* @param requisitioningChildId 请购单ID
* @return 结果
*/
public int deleteBaseRequisitioningOrderChildById(Long requisitioningChildId);
public Integer deleteBaseRequisitioningOrderChildById(Long requisitioningChildId);
/**
* 作废请购单
* @param requisitioningChildId 请购单ID
* @return
*/
int cancelBaseRequisitioningOrderChildById(Long requisitioningChildId);
Integer cancelBaseRequisitioningOrderChildById(Long requisitioningChildId);
/**
* 恢复请购单
* @param requisitioningChildId 请购单ID
* @return
*/
int restoreBaseRequisitioningOrderChildById(Long requisitioningChildId);
Integer restoreBaseRequisitioningOrderChildById(Long requisitioningChildId);
int deleteBaseRequisitioningOrderChildByQuoteId(String quoteId);
Integer deleteBaseRequisitioningOrderChildByRequisitioningCode(String requisitioningCode);
int deleteBaseRequisitioningOrderChildByQuoteIds(String quoteIds);
Integer deleteBaseRequisitioningOrderChildByRequisitioningCodes(String requisitioningCodes);
}

2
ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseRequisitioningOrderService.java

@ -95,4 +95,6 @@ public interface IBaseRequisitioningOrderService
* 提交申请*/
public ProcessInstance submitApply(BaseRequisitioningOrder baseRequisitioningOrder);
Object getRequisitioningOrder();
}

20
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseRequisitioningOrderChildServiceImpl.java

@ -53,7 +53,7 @@ public class BaseRequisitioningOrderChildServiceImpl implements IBaseRequisition
* @return 结果
*/
@Override
public int insertBaseRequisitioningOrderChild(BaseRequisitioningOrderChild baseRequisitioningOrderChild)
public Integer insertBaseRequisitioningOrderChild(BaseRequisitioningOrderChild baseRequisitioningOrderChild)
{
String loginName = ShiroUtils.getLoginName();
baseRequisitioningOrderChild.setCreateBy(loginName);
@ -68,7 +68,7 @@ public class BaseRequisitioningOrderChildServiceImpl implements IBaseRequisition
* @return 结果
*/
@Override
public int updateBaseRequisitioningOrderChild(BaseRequisitioningOrderChild baseRequisitioningOrderChild)
public Integer updateBaseRequisitioningOrderChild(BaseRequisitioningOrderChild baseRequisitioningOrderChild)
{
String loginName = ShiroUtils.getLoginName();
baseRequisitioningOrderChild.setUpdateBy(loginName);
@ -83,7 +83,7 @@ public class BaseRequisitioningOrderChildServiceImpl implements IBaseRequisition
* @return 结果
*/
@Override
public int deleteBaseRequisitioningOrderChildByIds(String ids)
public Integer deleteBaseRequisitioningOrderChildByIds(String ids)
{
return baseRequisitioningOrderChildMapper.deleteBaseRequisitioningOrderChildByIds(Convert.toStrArray(ids));
}
@ -95,7 +95,7 @@ public class BaseRequisitioningOrderChildServiceImpl implements IBaseRequisition
* @return 结果
*/
@Override
public int deleteBaseRequisitioningOrderChildById(Long requisitioningChildId)
public Integer deleteBaseRequisitioningOrderChildById(Long requisitioningChildId)
{
return baseRequisitioningOrderChildMapper.deleteBaseRequisitioningOrderChildById(requisitioningChildId);
}
@ -107,7 +107,7 @@ public class BaseRequisitioningOrderChildServiceImpl implements IBaseRequisition
* @return 结果
*/
@Override
public int cancelBaseRequisitioningOrderChildById(Long requisitioningChildId)
public Integer cancelBaseRequisitioningOrderChildById(Long requisitioningChildId)
{
return baseRequisitioningOrderChildMapper.cancelBaseRequisitioningOrderChildById(requisitioningChildId);
}
@ -119,17 +119,17 @@ public class BaseRequisitioningOrderChildServiceImpl implements IBaseRequisition
* @return 结果
*/
@Override
public int restoreBaseRequisitioningOrderChildById(Long requisitioningChildId)
public Integer restoreBaseRequisitioningOrderChildById(Long requisitioningChildId)
{
return baseRequisitioningOrderChildMapper.restoreBaseRequisitioningOrderChildById(requisitioningChildId);
}
@Override
public int deleteBaseRequisitioningOrderChildByQuoteId(String quoteId) {
return baseRequisitioningOrderChildMapper.deleteBaseRequisitioningOrderChildByQuoteId(quoteId);
public Integer deleteBaseRequisitioningOrderChildByRequisitioningCode(String requisitioningCode) {
return baseRequisitioningOrderChildMapper.deleteBaseRequisitioningOrderChildByRequisitioningCode(requisitioningCode);
}
@Override
public int deleteBaseRequisitioningOrderChildByQuoteIds(String quoteIds) {
return baseRequisitioningOrderChildMapper.deleteBaseRequisitioningOrderChildByQuoteIds(Convert.toStrArray(quoteIds));
public Integer deleteBaseRequisitioningOrderChildByRequisitioningCodes(String requisitioningCodes) {
return baseRequisitioningOrderChildMapper.deleteBaseRequisitioningOrderChildByRequisitioningCodes(Convert.toStrArray(requisitioningCodes));
}
}

113
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseRequisitioningOrderServiceImpl.java

@ -38,6 +38,7 @@ import com.ruoyi.system.service.IBaseRequisitioningOrderService;
import com.ruoyi.common.core.text.Convert;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
/**
* 请购单Service业务层处理
@ -57,6 +58,7 @@ public class BaseRequisitioningOrderServiceImpl implements IBaseRequisitioningOr
@Autowired
private RedisCache redisCache;
@Autowired
private ISysRoleService roleService;
@Autowired
@ -180,23 +182,30 @@ public class BaseRequisitioningOrderServiceImpl implements IBaseRequisitioningOr
for (BaseRequisitioningOrderChild child : childList) {
//物料数量
materialSum += child.getMaterialNum();
if (child.getMaterialRmbSum() == null){
child.setMaterialRmbSum(new BigDecimal(0));
}
if (child.getMaterialNoRmbSum() == null){
child.setMaterialNoRmbSum(new BigDecimal(0));
}
//物料不含税总价(RMB)
materialRmbSum = child.getMaterialRmbSum().setScale(2, RoundingMode.HALF_UP).add(materialNoRmbSum);
//物料含税总价(RMB)
materialNoRmbSum = child.getMaterialNoRmbSum().setScale(2, RoundingMode.HALF_UP).add(materialNoRmbSum);
child.setQuoteId(baseRequisitioningOrder.getRequisitioningCode());
child.setRequisitioningCode(baseRequisitioningOrder.getRequisitioningCode());
child.setCreateBy(loginName);
child.setCreateTime(DateUtils.getNowDate());
baseRequisitioningOrderChildMapper.insertBaseRequisitioningOrderChild(child);
}
}
baseRequisitioningOrder.setAuditStatus("1");
baseRequisitioningOrder.setUseStatus("1");
baseRequisitioningOrder.setMaterialAmount(Long.valueOf(childSize));
baseRequisitioningOrder.setMaterialAmount(childSize);
baseRequisitioningOrder.setMaterialSum(materialSum);
baseRequisitioningOrder.setRmbSum(materialRmbSum);
baseRequisitioningOrder.setNoRmbSum(materialNoRmbSum);
return baseRequisitioningOrderMapper.insertBaseRequisitioningOrder(baseRequisitioningOrder);
int result = baseRequisitioningOrderMapper.insertBaseRequisitioningOrder(baseRequisitioningOrder);
//如要获取请购单ID,作为key
baseRequisitioningOrder.getRequisitioningId();
return result;
}
/**
@ -213,18 +222,21 @@ public class BaseRequisitioningOrderServiceImpl implements IBaseRequisitioningOr
baseRequisitioningOrder.setUpdateBy(loginName);
baseRequisitioningOrder.setUpdateTime(DateUtils.getNowDate());
String requisitioningCode = baseRequisitioningOrder.getRequisitioningCode();
baseRequisitioningOrderChildMapper.deleteBaseRequisitioningOrderChildByQuoteId(baseRequisitioningOrder.getRequisitioningCode());
List<BaseRequisitioningOrderChild> childList = baseRequisitioningOrder.getBaseRequisitioningOrderChildList();
Long materialSum = 0L;
BigDecimal materialRmbSum = new BigDecimal(0);
BigDecimal materialNoRmbSum = new BigDecimal(0);
int childSize = childList.size();
if(ObjectUtils.isEmpty(childList)) {
return 0;
}
Integer childSize = childList.size();
if (childSize > 0) {
baseRequisitioningOrderChildMapper.deleteBaseRequisitioningOrderChildByRequisitioningCode(baseRequisitioningOrder.getRequisitioningCode());
for (BaseRequisitioningOrderChild child: childList) {
materialSum += child.getMaterialNum();
materialRmbSum = child.getMaterialRmbSum().setScale(2, RoundingMode.HALF_UP).add(materialNoRmbSum);
materialNoRmbSum = child.getMaterialNoRmbSum().setScale(2, RoundingMode.HALF_UP).add(materialNoRmbSum);
child.setQuoteId(requisitioningCode);
child.setRequisitioningCode(requisitioningCode);
child.setCreateBy(loginName);
child.setCreateTime(DateUtils.getNowDate());
child.setUpdateBy(loginName);
@ -232,9 +244,7 @@ public class BaseRequisitioningOrderServiceImpl implements IBaseRequisitioningOr
baseRequisitioningOrderChildMapper.insertBaseRequisitioningOrderChild(child);
}
}
baseRequisitioningOrder.setAuditStatus("1");
baseRequisitioningOrder.setUseStatus("1");
baseRequisitioningOrder.setMaterialAmount(Long.valueOf(childSize));
baseRequisitioningOrder.setMaterialAmount(childSize);
baseRequisitioningOrder.setMaterialSum(materialSum);
baseRequisitioningOrder.setRmbSum(materialRmbSum);
baseRequisitioningOrder.setNoRmbSum(materialNoRmbSum);
@ -291,7 +301,7 @@ public class BaseRequisitioningOrderServiceImpl implements IBaseRequisitioningOr
@Override
public int deleteBaseRequisitioningOrderByCode(String requisitioningCode) {
baseRequisitioningOrderChildMapper.deleteBaseRequisitioningOrderChildByQuoteId(requisitioningCode);
baseRequisitioningOrderChildMapper.deleteBaseRequisitioningOrderChildByRequisitioningCode(requisitioningCode);
return baseRequisitioningOrderMapper.deleteBaseRequisitioningOrderByCode(requisitioningCode);
}
@Override
@ -393,12 +403,34 @@ public class BaseRequisitioningOrderServiceImpl implements IBaseRequisitioningOr
return processInstance;
}
@Override
public Object getRequisitioningOrder() {
return redisCache.generateBillNo("QG");
}
private ProcessInstance startProcessInstance(String applyTitle,String instanceType,BaseRequisitioningOrder baseRequisitioningOrder, SysUser user) {
Long nessKey = baseRequisitioningOrder.getRequisitioningId();
String businessKey = String.valueOf(nessKey); // 实体类 ID,作为流程的业务 key
String key = "requsition";
String businessKey = String.valueOf(nessKey);; // 实体类 ID,作为流程的业务 key
String key = "requisitioning";
Map<String,Object> variables = new HashMap<>();
BigDecimal rmbSum = baseRequisitioningOrder.getRmbSum();
BigDecimal surpassPrice = new BigDecimal(3000.00);
int result = rmbSum.compareTo(surpassPrice);
Boolean surpass = false;
if (result > 0) {
surpass = true;
// rmbSum 大于 surpassPrice
variables.put("surpass",surpass);
} else if (result < 0) {
surpass = true;
// rmbSum 小于 surpassPrice
variables.put("surpass",surpass);
} else {
surpass = false;
// rmbSum 等于 surpassPrice
variables.put("surpass",surpass);
}
// 构造authority传参
buildAuthority(user, variables);
baseRequisitioningOrder.setApplyTitle(applyTitle);
@ -411,22 +443,53 @@ public class BaseRequisitioningOrderServiceImpl implements IBaseRequisitioningOr
}
private void buildAuthority(SysUser user, Map<String, Object> variables) {
System.out.println("请购单启动流程");
System.out.println("user = " + user + ", variables = " + variables);
//查询当前请购人的角色
Set<String> roleKeys = roleService.selectRoleKeys(user.getUserId());
if(roleKeys.contains("zg")){
// 超级管理员
variables.put("authority",1);
}
if(roleKeys.contains("cg")){
if(roleKeys.contains("cg_zj")){
//判断请购人的角色,进入相应的逻辑,设置节点审批人变量
if(roleKeys.contains("ywyRole") || roleKeys.contains("ywjlRole") || roleKeys.contains("ywzgRole")){
// 业务经理
variables.put("qgjlRole","ywjlRole");
// 业务主管
variables.put("qgzgRole","ywzgRole");
}else if(roleKeys.contains("cgyRole") || roleKeys.contains("cgjlRole") || roleKeys.contains("cgzgRole")){
// 采购经理
variables.put("qgjlRole","cgjlRole");
// 采购主管
variables.put("authority",2);
variables.put("qgzgRole","cgzgRole");
}else if (roleKeys.contains("gcwyRole") || roleKeys.contains("gcjlRole") || roleKeys.contains("gczgRole")){
// 工程经理
variables.put("qgjlRole","gcjlRole");
// 工程主管
variables.put("qgzgRole","gczgRole");
} else if (roleKeys.contains("scyRole") || roleKeys.contains("scjlRole") || roleKeys.contains("sczgRole")){
// 生产经理
variables.put("qgjlRole","scjlRoe");
// 生产主管
variables.put("qgzgRole","sczgRole");
}else if (roleKeys.contains("shgcsRole") || roleKeys.contains("shjlRole") || roleKeys.contains("shzgRole")){
// 售后经理
variables.put("qgjlRole","shjlRole");
// 售后主管
variables.put("qgzgRole","shzgRole");
}else if(roleKeys.contains("cgyyRole") || roleKeys.contains("ckzgRole")){
variables.put("qgjlRole","shzgRole");
// 售后主管
variables.put("qgzgRole","shzgRole");
}else if (roleKeys.contains("cwRole") || roleKeys.contains("cwjlRole")){
variables.put("qgjlRole","cwjlRole");
// 售后主管
variables.put("qgzgRole","cwJlRole");
}else{
// 采购员
variables.put("authority",3);
variables.put("authority",2);
}
if(roleKeys.contains("admin") ){
// 角色包含业务经理、采购经理、工程经理、生产经理
variables.put("authority",2);
}
// 角色不同审核人不同
variables.put("authority",1);
variables.put("qgje",3000);
}
}

51
ruoyi-admin/src/main/resources/mapper/system/BaseRequisitioningOrderChildMapper.xml

@ -6,7 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="BaseRequisitioningOrderChild" id="BaseRequisitioningOrderChildResult">
<result property="requisitioningChildId" column="requisitioning_child_id" />
<result property="quoteId" column="quote_id" />
<result property="requisitioningCode" column="requisitioning_code" />
<result property="materialId" column="material_id" />
<result property="materialCode" column="material_code" />
<result property="photoUrl" column="photoUrl" />
@ -16,6 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="specifications" column="specifications" />
<result property="brand" column="brand" />
<result property="describe" column="describe" />
<result property="unit" column="unit" />
<result property="materialNum" column="materialNum" />
<result property="materialRmb" column="materialRmb" />
<result property="materialNoRmb" column="materialNoRmb" />
@ -28,20 +29,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" />
<result property="useStatus" column="use_status" />
<result property="auditStatus" column="audit_status" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectBaseRequisitioningOrderChildVo">
select requisitioning_child_id, quote_id, material_id, material_code, photoUrl,
material_name, material_type, material_model, specifications, brand,
select requisitioning_child_id, requisitioning_code, material_id, material_code, photoUrl,
material_name, material_type, material_model, specifications, brand,unit,warehouseDept,
`describe`, materialNum, materialRmb, materialNoRmb, materialNoRmbSum, materialRmbSum, remark,
create_by, create_time, update_by, update_time, use_status, audit_status
create_by, create_time, update_by, update_time, use_status, audit_status,del_flag
from base_requisitioning_order_child
</sql>
<select id="selectBaseRequisitioningOrderChildList" parameterType="BaseRequisitioningOrderChild" resultMap="BaseRequisitioningOrderChildResult">
<include refid="selectBaseRequisitioningOrderChildVo"/>
<where>
<if test="quoteId != null and quoteId != ''"> and quote_id = #{quoteId}</if>
del_flag = '0'
<if test="requisitioningCode != null and requisitioningCode != ''"> and requisitioning_code = #{requisitioningCode}</if>
<if test="materialId != null "> and material_id = #{materialId}</if>
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
<if test="photoUrl != null and photoUrl != ''"> and photoUrl = #{photoUrl}</if>
@ -73,7 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="insertBaseRequisitioningOrderChild" parameterType="BaseRequisitioningOrderChild" useGeneratedKeys="true" keyProperty="requisitioningChildId">
insert into base_requisitioning_order_child
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="quoteId != null">quote_id,</if>
<if test="requisitioningCode != null">requisitioning_code,</if>
<if test="materialId != null">material_id,</if>
<if test="materialCode != null">material_code,</if>
<if test="photoUrl != null">photoUrl,</if>
@ -82,6 +85,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="materialModel != null">material_model,</if>
<if test="specifications != null">specifications,</if>
<if test="brand != null">brand,</if>
<if test="unit != null">unit,</if>
<if test="warehouseDept != null">warehouseDept,</if>
<if test="describe != null">`describe`,</if>
<if test="materialNum != null">materialNum,</if>
<if test="materialRmb != null">materialRmb,</if>
@ -95,9 +100,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time,</if>
<if test="useStatus != null">use_status,</if>
<if test="auditStatus != null">audit_status,</if>
<if test="delFlag != null">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="quoteId != null">#{quoteId},</if>
<if test="requisitioningCode != null">#{requisitioningCode},</if>
<if test="materialId != null">#{materialId},</if>
<if test="materialCode != null">#{materialCode},</if>
<if test="photoUrl != null">#{photoUrl},</if>
@ -106,6 +112,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="materialModel != null">#{materialModel},</if>
<if test="specifications != null">#{specifications},</if>
<if test="brand != null">#{brand},</if>
<if test="unit != null">#{unit},</if>
<if test="warehouseDept != null">#{warehouseDept},</if>
<if test="describe != null">#{describe},</if>
<if test="materialNum != null">#{materialNum},</if>
<if test="materialRmb != null">#{materialRmb},</if>
@ -119,13 +127,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">#{updateTime},</if>
<if test="useStatus != null">#{useStatus},</if>
<if test="auditStatus != null">#{auditStatus},</if>
<if test="delFlag != null">#{delFlag},</if>
</trim>
</insert>
<update id="updateBaseRequisitioningOrderChild" parameterType="BaseRequisitioningOrderChild">
update base_requisitioning_order_child
<trim prefix="SET" suffixOverrides=",">
<if test="quoteId != null">quote_id = #{quoteId},</if>
<if test="requisitioningCode != null">requisitioning_code = #{requisitioningCode},</if>
<if test="materialId != null">material_id = #{materialId},</if>
<if test="materialCode != null">material_code = #{materialCode},</if>
<if test="photoUrl != null">photoUrl = #{photoUrl},</if>
@ -134,6 +143,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="materialModel != null">material_model = #{materialModel},</if>
<if test="specifications != null">specifications = #{specifications},</if>
<if test="brand != null">brand = #{brand},</if>
<if test="unit != null">unit = #{unit},</if>
<if test="warehouseDept != null">warehouseDept = #{warehouseDept},</if>
<if test="describe != null">`describe` = #{describe},</if>
<if test="materialNum != null">materialNum = #{materialNum},</if>
<if test="materialRmb != null">materialRmb = #{materialRmb},</if>
@ -154,16 +165,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<delete id="deleteBaseRequisitioningOrderChildById" parameterType="Long">
delete from base_requisitioning_order_child where requisitioning_child_id = #{requisitioningChildId}
</delete>
<delete id="deleteBaseRequisitioningOrderChildByQuoteId" parameterType="String">
delete from base_requisitioning_order_child where quote_id = #{qoteId}
<delete id="deleteBaseRequisitioningOrderChildByRequisitioningCode" parameterType="String">
delete from base_requisitioning_order_child where requisitioning_code = #{requisitioningCode}
</delete>
<delete id="deleteBaseRequisitioningOrderChildByQuoteIds" parameterType="String">
delete from base_requisitioning_order_child where quote_id in
<foreach item="quoteId" collection="array" open="(" separator="," close=")">
#{quoteId}
<delete id="deleteBaseRequisitioningOrderChildByRequisitioningCodes" parameterType="String">
delete from base_requisitioning_order_child where requisitioning_code in
<foreach item="requisitioningCode" collection="array" open="(" separator="," close=")">
#{requisitioningCode}
</foreach>
</delete>
<update id="updateBaseRequisitioningOrderChildByRequisitioningCodes" parameterType="String">
update base_requisitioning_order_child set del_flag = #{delFlag} base_requisitioning_order_child
where requisitioning_code in
<foreach item="requisitioningCode" collection="array" open="(" separator="," close=")">
#{requisitioningCode}
</foreach>
</update>
<update id="updateBaseRequisitioningOrderChildByRequisitioningCode" parameterType="String">
update base_requisitioning_order_child set del_flag = #{delFlag} base_requisitioning_order_child
where requisitioning_code = #{requisitioningCode}
</update>
<delete id="deleteBaseRequisitioningOrderChildByIds" parameterType="String">
delete from base_requisitioning_order_child where requisitioning_child_id in
<foreach item="requisitioningChildId" collection="array" open="(" separator="," close=")">

128
ruoyi-admin/src/main/resources/mapper/system/BaseRequisitioningOrderMapper.xml

@ -3,7 +3,6 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.BaseRequisitioningOrderMapper">
<resultMap type="BaseRequisitioningOrderVo" id="BaseRequisitioningOrderResult">
<result property="requisitioningId" column="requisitioning_id" />
<result property="auditStatus" column="audit_status" />
@ -26,35 +25,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="instanceTypeName" column="instance_type_name" />
<result property="submitInstanceId" column="submit_instance_id" />
<result property="cancelInstanceId" column="cancel_instance_id" />
<result property="restoreInstanceId" column="restore_instance_id"/>
<result property="restoreInstanceId" column="restore_instance_id" />
<result property="applyTitle" column="apply_title" />
<result property="applyUser" column="apply_user" />
<result property="applyTime" column="apply_time" />
<result property="deptName" column="dept_name" />
<result property="postName" column="post_name" />
</resultMap>
<sql id="selectBaseRequisitioningOrderVo">
select requisitioning_id, audit_status, requisitioning_status, requisitioning_code,
correlation_code, material_amount, materialSum, noRmbSum, rmbSum, apply_user,
create_by, create_time, update_by, update_time, remark, use_status,
instance_id, instance_type, instance_type_name, submit_instance_id, cancel_instance_id, restore_instance_id,
apply_title, apply_user, apply_time
instance_id, instance_type, submit_instance_id, cancel_instance_id, restore_instance_id,
apply_title, apply_user, apply_time, dept_name, post_name
from base_requisitioning_order
</sql>
<select id="selectBaseRequisitioningOrderList" parameterType="BaseRequisitioningOrder" resultMap="BaseRequisitioningOrderResult">
select r.requisitioning_id, r.requisitioning_status, r.requisitioning_code,
r.correlation_code, r.material_amount, r.materialSum, r.noRmbSum, r.rmbSum,
r.update_by, r.update_time, r.remark,r.instance_id, p.dict_value as instance_type_name,
r.correlation_code, r.material_amount, r.materialSum, r.noRmbSum, r.rmbSum,r.create_by,
r.create_time,r.update_by, r.update_time, r.remark,r.instance_id, p.dict_value as instance_type_name,
r.instance_type,r.submit_instance_id, r.cancel_instance_id,
r.restore_instance_id, r.apply_title, r.apply_user, r.apply_time,r.apply_user,
r.create_by, r.create_time, r.audit_status, r.use_status
r.create_by, r.create_time, r.audit_status, r.use_status,r.dept_name,r.post_name
from base_requisitioning_order as r
left join(
select dict_value,dict_label from sys_dict_data
where dict_type = 'processType'
) as p
on r.instance_type = p.dict_value
) as p on r.instance_type = p.dict_value
<where>
r.del_flag = '0'
<if test="requisitioningId != null and requisitioningId != ''"> and r.requisitioning_id = #{requisitioningId}</if>
<if test="requisitioningStatus != null and requisitioningStatus != ''"> and r.requisitioning_status = #{requisitioningStatus}</if>
<if test="requisitioningCode != null and requisitioningCode != ''"> and r.requisitioning_code = #{requisitioningCode}</if>
<if test="auditStatus!= null and auditStatus != ''"> and r.audit_status = #{auditStatus}</if>
@ -71,19 +73,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
and r.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
</if>
<if test="params.materialCode != null and params.materialCode != '' or params.materialName !=null and params.materialName != ''">
and r.requisitioning_code in (
select quote_id from base_requisitioning_order_child
<where>
<if test="params.materialCode != null and params.materialCode != ''">
and material_code = #{params,materialCode}
</if>
<if test="params.materialName != null and params.materialName != ''">
and material_name = #{params.materialName}
</if>
</where>
)
</if>
<!-- <if test="params.materialCode != null and params.materialCode != '' or params.materialName !=null and params.materialName != ''">-->
<!-- and r.requisitioning_code in (-->
<!-- select requisitioning_code from base_requisitioning_order_child-->
<!-- <where>-->
<!-- <if test="params.materialCode != null and params.materialCode != ''">-->
<!-- and material_code = #{params.materialCode}-->
<!-- </if>-->
<!-- <if test="params.materialName != null and params.materialName != ''">-->
<!-- and material_name = #{params.materialName}-->
<!-- </if>-->
<!-- </where>-->
<!-- )-->
<!-- </if>-->
</where>
</select>
@ -108,6 +110,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="materialSum != null">materialSum,</if>
<if test="noRmbSum != null">noRmbSum,</if>
<if test="rmbSum != null">rmbSum,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="deptName != null">dept_name,</if>
<if test="postName != null">post_name,</if>
<if test="instanceId != null">instance_id,</if>
<if test="instanceType != null">instance_type,</if>
<if test="submitInstanceId != null">submit_instance_id,</if>
@ -116,10 +124,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="applyTitle != null">apply_title,</if>
<if test="applyUser != null">apply_user,</if>
<if test="applyTime != null">apply_time,</if>
<if test="useStatus != null">use_status,</if>
<if test="auditStatus != null">audit_status,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="useStatus != null">use_status,</if>
<if test="delFlag != null">del_flag,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
@ -130,18 +137,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="materialSum != null">#{materialSum},</if>
<if test="noRmbSum != null">#{noRmbSum},</if>
<if test="rmbSum != null">#{rmbSum},</if>
<if test="instanceId != null">#{instance_id},</if>
<if test="instanceType != null">#{instance_type},</if>
<if test="submitInstanceId != null">#{submit_instance_id},</if>
<if test="cancelInstanceId != null">#{cancel_instance_id},</if>
<if test="restoreInstanceId != null">#{restore_instance_id},</if>
<if test="applyTitle != null">#{apply_title},</if>
<if test="applyUser != null">#{apply_user},</if>
<if test="applyTime != null">#{apply_time},</if>
<if test="useStatus != null">#{use_status},</if>
<if test="auditStatus != null">#{audit_status},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="deptName != null">#{deptName},</if>
<if test="postName != null">#{postName},</if>
<if test="instanceId != null">#{instanceId},</if>
<if test="instanceType != null">#{instanceType},</if>
<if test="submitInstanceId != null">#{submitInstanceId},</if>
<if test="cancelInstanceId != null">#{cancelInstanceId},</if>
<if test="restoreInstanceId != null">#{restoreInstanceId},</if>
<if test="applyTitle != null">#{applyTitle},</if>
<if test="applyUser != null">#{applyUser},</if>
<if test="applyTime != null">#{applyTime},</if>
<if test="useStatus != null">#{useStatus},</if>
<if test="auditStatus != null">#{auditStatus},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
@ -156,19 +168,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="materialSum != null">materialSum = #{materialSum},</if>
<if test="noRmbSum != null">noRmbSum = #{noRmbSum},</if>
<if test="rmbSum != null">rmbSum = #{rmbSum},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="instanceId != null">#{instanceId},</if>
<if test="instanceType != null">#{instanceType},</if>
<if test="submitInstanceId != null">#{submitInstanceId},</if>
<if test="cancelInstanceId != null">#{cancelInstanceId},</if>
<if test="restoreInstanceId != null">#{restoreInstanceId},</if>
<if test="applyTitle != null">#{applyTitle},</if>
<if test="applyUser != null">#{applyUser},</if>
<if test="applyTime != null">#{applyTime},</if>
<if test="useStatus != null">#{useStatus},</if>
<if test="auditStatus != null">#{auditStatus},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="deptName != null">dept_name = #{deptName},</if>
<if test="postName != null">post_name = #{postName},</if>
<if test="instanceId != null">instance_id = #{instanceId},</if>
<if test="instanceType != null"> instance_type = #{instanceType},</if>
<if test="submitInstanceId != null">submit_instance_id = #{submitInstanceId},</if>
<if test="cancelInstanceId != null"> cancel_instance_id = #{cancelInstanceId},</if>
<if test="restoreInstanceId != null"> restore_instance_id =#{restoreInstanceId},</if>
<if test="applyTitle != null"> apply_title = #{applyTitle},</if>
<if test="applyUser != null">apply_user = #{applyUser},</if>
<if test="applyTime != null">apply_time = #{applyTime},</if>
<if test="useStatus != null">use_status = #{useStatus},</if>
<if test="auditStatus != null"> audit_status = #{auditStatus},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
</trim>
where requisitioning_id = #{requisitioningId}
</update>
@ -176,7 +194,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<delete id="deleteBaseRequisitioningOrderById" parameterType="Long">
delete from base_requisitioning_order where requisitioning_id = #{requisitioningId}
</delete>
<delete id="deleteBaseRequisitioningOrderByIds" parameterType="String">
delete from base_requisitioning_order where requisitioning_id in
<foreach item="requisitioningId" collection="array" open="(" separator="," close=")">
@ -184,8 +201,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
<delete id="deleteBaseRequisitioningOrderByCode" parameterType="String">
delete from base_requisitioning_order where requisitioning_code = #{requisitioningId}
delete from base_requisitioning_order where requisitioning_code = #{requisitioningCode}
</delete>
<delete id="deleteBaseRequisitioningOrderByCodes" parameterType="String">
delete from base_requisitioning_order where requisitioning_code in
<foreach item="requisitioningCode" collection="array" open="(" separator="," close=")">
#{requisitioningCode}
</foreach>
</delete>
<update id="updateBaseRequisitioningOrderByCode" parameterType="String">
update base_requisitioning_order set del_flag = #{delFlag} where requisitioning_code = #{requisitioningCode}
</update>
<update id="updateBaseRequisitioningOrderByCodes" parameterType="String">
update base_requisitioning_order set del_flag = #{delFlag} where requisitioning_code in
<foreach item="requisitioningCode" collection="array" open="(" separator="," close=")">
#{requisitioningCode}
</foreach>
</update>
<update id="cancelBaseRequisitioningOrderById" parameterType="Long">
update base_requisitioning_order set del_flag = '1' where requisitioning_id = #{requisitioningId}

10
ruoyi-admin/src/main/resources/templates/system/requesitioningChild/add.html

@ -5,11 +5,11 @@
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-requesitioningChild-add">
<form class="form-horizontal m" id="form-requisitioningChild-add">
<div class="form-group">
<label class="col-sm-3 control-label">关联请购单编号字段:</label>
<div class="col-sm-8">
<input name="quoteId" class="form-control" type="text">
<input name="requisitioningCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
@ -128,14 +128,14 @@
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/requesitioningChild"
$("#form-requesitioningChild-add").validate({
var prefix = ctx + "system/requisitioningChild"
$("#form-requisitioningChild-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-requesitioningChild-add').serialize());
$.operate.save(prefix + "/add", $('#form-requisitioningChild-add').serialize());
}
}
</script>

10
ruoyi-admin/src/main/resources/templates/system/requesitioningChild/edit.html

@ -5,12 +5,12 @@
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-requesitioningChild-edit" th:object="${baseRequisitioningOrderChild}">
<form class="form-horizontal m" id="form-requisitioningChild-edit" th:object="${baseRequisitioningOrderChild}">
<input name="requisitioningChildId" th:field="*{requisitioningChildId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">关联请购单编号字段:</label>
<div class="col-sm-8">
<input name="quoteId" th:field="*{quoteId}" class="form-control" type="text">
<input name="requisitioningCode" th:field="*{requisitioningCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
@ -130,14 +130,14 @@
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/requesitioningChild";
$("#form-requesitioningChild-edit").validate({
var prefix = ctx + "system/requisitioningChild";
$("#form-requisitioningChild-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-requesitioningChild-edit').serialize());
$.operate.save(prefix + "/edit", $('#form-requisitioningChild-edit').serialize());
}
}
</script>

16
ruoyi-admin/src/main/resources/templates/system/requesitioningChild/requesitioningChild.html

@ -54,10 +54,10 @@
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="requesitioningChild:requesitioningChild:add">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="requisitioningChild:requisitioningChild:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="requesitioningChild:requesitioningChild:export">
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="requisitioningChild:requisitioningChild:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
@ -68,11 +68,11 @@
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('requesitioningChild:requesitioningChild:edit')}]];
var removeFlag = [[${@permission.hasPermi('requesitioningChild:requesitioningChild:remove')}]];
var cancelFlag = [[${@permission.hasPermi('requesitioningChild:requesitioningChild:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('requesitioningChild:requesitioningChild:restore')}]];
var prefix = ctx + "system/requesitioningChild";
var editFlag = [[${@permission.hasPermi('requisitioningChild:requisitioningChild:edit')}]];
var removeFlag = [[${@permission.hasPermi('requisitioningChild:requisitioningChild:remove')}]];
var cancelFlag = [[${@permission.hasPermi('requisitioningChild:requisitioningChild:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('requisitioningChild:requisitioningChild:restore')}]];
var prefix = ctx + "system/requisitioningChild";
$(function() {
var options = {
@ -94,7 +94,7 @@
},
{
title: '关联请购单编号字段',
field: 'quoteId',
field: 'requisitioningCode',
},
{
title: '物料表中的id',

56
ruoyi-admin/src/main/resources/templates/system/requisitioning/add.html

@ -8,22 +8,23 @@
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-requisitioning-add">
<input id="id" name="requisitioningCode" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">部门:</label>
<div class="col-sm-8">
<select name="deptName" class="form-control" required></select>
<select id="deptName" name="deptName" class="form-control" disabled required></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required" >岗位:</label>
<label class="col-sm-3 control-label" >岗位:</label>
<div class="col-sm-8">
<select name="postName" class="form-control" required></select>
<select id="postName" name="postName" class="form-control" disabled></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">姓名:</label>
<div class="col-sm-8">
<select name="userName" class="form-control" required></select>
<select id="userName" name="userName" class="form-control" disabled required></select>
</div>
</div>
<div class="form-group">
@ -57,7 +58,7 @@
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var user = [[${user}]];
var warehouseDeptDatas = [[${@dict.getType('warehouseDept')}]];
var prefix = ctx + "system/requisitioning";
$("#form-requisitioning-add").validate({focusCleanup: true});
//获取子表信息
@ -71,7 +72,7 @@
{checkbox: true},
{field: 'materialIndex',align: 'center', title: "序号",
formatter: function (value, row, index) {
return index+1;
return index + 1;
}
},
{title: '物料索引id',field: 'materialId',align: 'center',visible: false},
@ -96,11 +97,14 @@
return $.table.selectDictLabel(sysUnitClassDatas, value);
}
},
{title: '半成品类型',field: 'processMethod',align: 'center',
{title: '加工方式',field: 'processMethod',align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
{title: '入库部门',field: 'warehouseDept',align: 'center',function(value, row, index) {
return $.table.selectDictLabel(warehouseDeptDatas, value);
}},
{title: '物料的数量', field: 'materialNum',align: 'center',
editable : {
type : 'text',
@ -168,13 +172,33 @@
}
};
$.table.init(options);
getRequisitionNo();
getSelections();
});
//生成请购单号
function getRequisitionNo(){
//获取单号
$.ajax({
url: prefix + "/getId",
type: "get",
dateType: "json",
success: function (resp) {
if (resp.code === 0) {
$("input[name='requisitioningCode']").val(resp.data);
} else {
$.modal.msgError("失败啦");
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
});
}
function doSubmit(index, layero,uniqueId){
console.log(uniqueId);
var iframeWin = window[layero.find('iframe')[0]['name']];
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0];
console.log("rowData: "+rowData);
var rows = $("#bootstrap-sub-table-requisitionChild").bootstrapTable('getData').length;
for(var i=0;i<rows;i++){
var data = $("#bootstrap-sub-table-requisitionChild").bootstrapTable('getData')[i];
@ -194,6 +218,7 @@
brand: rowData.brand,
unit: rowData.unit,
processMethod: rowData.processMethod,
warehouseDept:rowData.warehouseDept,
photoUrl: rowData.photoUrl,
materialNum: 1,
materialRmb: rowData.materialRmb,
@ -223,11 +248,13 @@
}
function submitHandler() {
if ($.validate.form()) {
$("#userName").removeAttr("disabled");
$("#postName").removeAttr("disabled");
$("#deptName").removeAttr("disabled");
var formData = $("#form-requisitioning-add").serializeArray();
console.log("formData",formData);
var tableData = $("#bootstrap-sub-table-requisitionChild").bootstrapTable('getData');
let rows = tableData.length;
if(rows==0){
if(rows===0){
$.modal.msgError("子表数据不能为空!");
}else{
formData.push({"name": "baseRequisitioningOrderChildList", "value": tableData});
@ -242,12 +269,11 @@
type: "get",
dataType: "json",
success: function (data) {
$("select[name='deptName']").append($('<option></option>').val(data.deptName).html(data.deptName));
$("select[name='userName']").append($('<option></option>').val(data.userName).html(data.userName));
$("select[name='postName']").append($('<option></option>').val(data.postName).html(data.postName));
$("#deptName").append($('<option></option>').val(data.deptName).html(data.deptName));
$("#userName").append($('<option></option>').val(data.userName).html(data.userName));
$("#postName").append($('<option></option>').val(data.postName).html(data.postName));
}
});
}
</script>
</body>

18
ruoyi-admin/src/main/resources/templates/system/requisitioning/detail.html

@ -71,12 +71,7 @@
url: ctx + "system/requesitioningChild/list",
pagination: false,
sidePagination: "client",
queryParams: function(params) {
var temp = {
requisitioningCode: baseRequisitioningOrder.requisitioningCode,
};
return temp;
},
queryParams:queryParams,
model: "物料报价信息",
columns: [
{checkbox: true},
@ -111,7 +106,7 @@
return $.table.selectDictLabel(processMethodDatas, value);
}
},
{title: '物料的数量', field: 'materialNum',align: 'center',editable: true,},
{title: '物料的数量', field: 'materialNum',align: 'center'},
{title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',},
{title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center',},
{title: '物料的含税总价(RMB)',field: 'materialNoRmbSum',align: 'center',},
@ -129,6 +124,15 @@
};
$.table.init(options);
});
function queryParams(params) {
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
requisitioningCode: baseRequisitioningOrder.requisitioningCode
};
return curParams;
}
function doSubmit(index, layero,uniqueId){
console.log(uniqueId);
var iframeWin = window[layero.find('iframe')[0]['name']];

27
ruoyi-admin/src/main/resources/templates/system/requisitioning/edit.html

@ -4,6 +4,7 @@
<th:block th:include="include :: header('修改请购单')" />
<th:block th:include="include :: select2-css" />
<th:block th:include="include :: bootstrap-editable-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">
@ -18,19 +19,19 @@
<div class="form-group">
<label class="col-sm-3 control-label">部门:</label>
<div class="col-sm-8">
<select name="deptName" class="form-control"></select>
<select name="deptName" th:field="*{deptName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">岗位:</label>
<div class="col-sm-8">
<select name="postName" class="form-control"></select>
<select name="postName" th:field="*{postName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">姓名:</label>
<div class="col-sm-8">
<select name="userName" class="form-control"></select>
<select name="userName" th:field="*{userName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
@ -59,27 +60,24 @@
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<th:block th:include="include :: bootstrap-table-editable-js" />
<script th:src="@{/js/activiti.js}"></script>
<script th:inline="javascript">
var baseRequisitioningOrder = [[${baseRequisitioningOrder}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var warehouseDeptDatas = [[${@dict.getType('warehouseDept')}]];
var prefix = ctx + "system/requisitioning";
$("#form-requisitioning-edit").validate({focusCleanup: true});
$(function() {
getSelections();
var options = {
id:'bootstrap-sub-table-requisitionChild',
url: ctx + "system/requesitioningChild/list",
url: ctx + "system/requisitioningChild/list",
pagination: false,
sidePagination: "client",
queryParams: function(params) {
var temp = {
requisitioningCode: baseRequisitioningOrder.requisitioningCode,
};
return temp;
},
queryParams:queryParams,
model: "物料报价信息",
columns: [
{checkbox: true},
@ -139,6 +137,15 @@
};
$.table.init(options);
});
function queryParams(params) {
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
requisitioningCode: baseRequisitioningOrder.requisitioningCode
};
return curParams;
}
function doSubmit(index, layero,uniqueId){
console.log(uniqueId);
var iframeWin = window[layero.find('iframe')[0]['name']];

62
ruoyi-admin/src/main/resources/templates/system/requisitioning/requisitioning.html

@ -70,6 +70,9 @@
<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">
var editFlag = [[${@permission.hasPermi('system:requisitioning:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:requisitioning:remove')}]];
@ -77,8 +80,8 @@
var restoreFlag = [[${@permission.hasPermi('system:requisitioning:restore')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var requisitioningStatusDatas = [[${@dict.getType('sys_requisitioning_status')}]];
var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var prefix = ctx + "system/requisitioning";
$(function() {
var options = {
url: prefix + "/list",
@ -94,13 +97,36 @@
pageSize: 10,
sortable: true, // 是否启用排序
sortStable: true, // 设置为 true 将获得稳定的排序
detailView: true,
detailView: false,
fixedColumns: true, // 启用冻结列
rightFixedColumns:1,
fixedRightNumber: 1, // 冻结右列个数
columns: [
{checkbox: true},
{title: '请购单索引id',field: 'requisitioningId',visible: false},
{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: 'auditStatus',
formatter: function(value, row, index) {
return $.table.selectDictLabel(auditStatusDatas, value);
@ -120,10 +146,38 @@
{title: '请购人',field: 'createBy',},
{title: '备注',field: 'remark',},
{title: '操作',align: 'center',
formatter: function(value, row, index) {
formatter: function (value, row, index) {
var actions = [];
if(row.auditStatus=="1" && row.useStatus=="1" && !row.cancelInstanceId) {
// 作废
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.requisitioningId + '\')"><i class="fa fa-remove"></i> 作废</a>');
// 编辑
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.requisitioningId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.requisitioningId + '\')"><i class="fa fa-edit"></i> 编辑</a> ');
// 已作废
}
else{
actions.push('<a class="btn btn-default btn-xs" href="javascript:void(0)" disabled><i class="fa fa-edit"></i> 编辑</a> ');
}
// 有流程实例id
if(row.useStatus=="2" && !row.restoreInstanceId){
// 恢复
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.requisitioningId + '\')"><i class="fa fa-window-restore"></i> 恢复</a> ');
}
// 有流程实例id
if (row.instanceId) {
// 有待办人展示审批按钮,
if (row.todoUserId) {
var todoUserIdList = row.todoUserId.split(",");
if(todoUserIdList.includes(loginName)){
var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批';
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="showVerifyDialog(\'' + prefix + '\',\'' + row.taskId + '\', \'' + row.taskName+"-"+ row.instanceTypeName +"申请" + '\')"><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-primary btn-xs" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.requisitioningId + '\')"><i class="fa fa-eye"></i> 详情</a> ');
return actions.join('');

40
ruoyi-admin/src/main/resources/templates/system/requisitioning/taksFzjlVerify.html

@ -1,40 +0,0 @@
<!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-requisitioning-fzjl-audit" th:object="${formData}">
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "system/requisitioning";
$("#form-requisitioning-fzjl-audit").validate({focusCleanup: true});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/complete/"+taskId, $('#form-requisitioning-fzjl-audit').serialize());
}
}
function getSelections(){
$.ajax({
url: ctx + "system/requisitioning/getEmpUserName",
type: "get",
dataType: "json",
success: function (data) {
$("select[name='deptName']").append($('<option></option>').val(data.deptName).html(data.deptName));
$("select[name='evectionBy']").append($('<option></option>').val(data.userName).html(data.userName));
$("select[name='postName']").append($('<option></option>').val(data.postName).html(data.postName));
}
});
}
</script>
</body>
</html>

180
ruoyi-admin/src/main/resources/templates/system/requisitioning/taskFzjlVerify.html

@ -0,0 +1,180 @@
<!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">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-requisitioning-fzjl-audit" th:object="${formData}">
<input name="requisitioningId" th:field="*{requisitioningId}" 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="applyUserName" th:field="*{applyUserName}" 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">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input name="applyTime" th:value="${#dates.format(formData.applyTime, 'yyyy-MM-dd HH:mm')}" class="form-control" type="text" disabled>
</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" readonly>
</div>
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">请购单号:</label>
<div class="col-sm-8">
<input name="code" th:field="*{requisitioningCode}" 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="deptName" th:field="*{deptName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">岗位:</label>
<div class="col-sm-8">
<select name="postName" th:field="*{postName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">姓名:</label>
<div class="col-sm-8">
<select name="userName" th:field="*{userName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">关联单号:</label>
<div class="col-sm-8">
<input name="correlationCode" th:field="*{correlationCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="fzjlVerifyApproved"><span style="color: red; ">*</span>审批意见:</label>
<div class="col-sm-8">
<select name="p_B_fzjlVerifyApproved" id="fzjlVerifyApproved" 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 class="container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span>选择报价信息</span>
</div>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-requisitionChild"></table>
</div>
</div>
</div>
</div>
</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 + "system/requisitioning";
var taskId = [[${taskId}]];
var requisitioningCode = [[${formData.requisitioningCode}]];
$("#form-requisitioning-fzjl-audit").validate({focusCleanup: true});
function submitHandler() {
if ($.validate.form()) {
if ($('textarea[name="comment"]').val()) {
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
}
$.operate.save(prefix + "/complete/"+taskId, $('#form-requisitioning-fzjl-audit').serialize());
}
}
$(function() {
var options = {
id:'bootstrap-sub-table-requisitionChild',
url: ctx + "system/requisitioningChild/list",
pagination: false,
sidePagination: "client",
queryParams: queryParams,
model: "物料报价信息",
columns: [
{checkbox: true},
{field: 'index',align: 'center', title: "序号",
formatter: function (value, row, index,column) {
return $.table.serialNumber(index) - 1;
}
},
{title: '物料索引id',field: 'materialId',align: 'center',visible: false},
{title: '料号',field: 'materialCode',align: 'center'},
{title: '物料名称',field: 'materialName',align: 'center'},
{title: '图片',field: 'photoUrl',
formatter: function(value, row, index) {
return $.table.imageView(value);
}
},
{title: '物料类型',field: 'materialType',align: 'center',
formatter: function(value, row, index) {
return $.table.selectCategoryLabel(materialTypeDatas, value);
}
},
{ title: '描述',field: 'describe',align: 'center'},
{title: '品牌',field: 'brand',align: 'center'},
{ title: '单位',field: 'unit',align: 'center',},
{title: '加工方式',field: 'processMethod',align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
{title: '入库部门',field: 'warehouseDept',align: 'center',},
{title: '物料的数量', field: 'materialNum',align: 'center',},
{title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',},
{title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center',},
{title: '物料的含税总价(RMB)',field: 'materialNoRmbSum',align: 'center',},
{title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center',},
{title: '录入人',field: 'createBy',align: 'center',visible: false},
{title: '录入时间',field: 'createTime',align: 'center',visible: false },
{title: '更新人',field: 'updateBy',align: 'center',visible: false},
{title: '上次更新时间',field: 'updateTime',align: 'center',visible: false},
{title: '备注',field: 'remark',align: 'center'},
]
};
$.table.init(options);
});
function queryParams(params) {
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
requisitioningCode: requisitioningCode
};
return curParams;
}
</script>
</body>
</html>

237
ruoyi-admin/src/main/resources/templates/system/requisitioning/taskModifyApply.html

@ -1,27 +1,257 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改出差单')" />
<th:block th:include="include :: header('修改请购单')" />
<th:block th:include="include :: datetimepicker-css" />
<th:block th:include="include :: select2-css" />
<th:block th:include="include :: bootstrap-editable-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-requisitioning-modifyApply" th:object="${formData}">
<input name="requisitioningId" th:field="*{requisitioningId}" 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">申请人:</label>
<div class="col-sm-8">
<input name="applyUserName" th:field="*{applyUserName}" 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">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input name="applyTime" th:value="${#dates.format(formData.applyTime, 'yyyy-MM-dd HH:mm')}" class="form-control" type="text" disabled>
</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" readonly>
</div>
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">请购单号:</label>
<div class="col-sm-8">
<input name="requisitioningCode" th:field="*{requisitioningCode}" 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="deptName" th:field="*{deptName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">岗位:</label>
<div class="col-sm-8">
<select name="postName" th:field="*{postName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">姓名:</label>
<div class="col-sm-8">
<select name="userName" th:field="*{userName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">关联单号:</label>
<div class="col-sm-8">
<input name="correlationCode" th:field="*{correlationCode}" class="form-control" type="text">
</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>
<div class="form-group">
<input name="requisitionChildList" type="hidden">
</div>
</form>
<div class="container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span>选择报价信息</span>
<a class="btn btn-success" onclick="insertRow()">
<i class="fa fa-plus"></i> 添加物料
</a>
</div>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-requisitionChild"></table>
</div>
</div>
</div>
</div>
<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:inline="javascript">
var baseRequisitioningOrder = [[${baseRequisitioningOrder}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var warehouseDeptDatas = [[${@dict.getType('warehouseDept')}]];
var taskId = [[${taskId}]];
var requisitioningCode = [[${formData.requisitioningCode}]];
var prefix = ctx + "system/requisitioning";
$("#form-requisitioning-modifyApply").validate({focusCleanup: true});
function submitHandler() {
if ($.validate.form()) {
var taskId = [[${taskId}]];
if ($('textarea[name="comment"]').val()) {
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
}
var tableData = $("#bootstrap-sub-table-requisitionChild").bootstrapTable("getData");
if(tableData.length == 0){
$.modal.alertWarning("请购物料不能为空");
return;
}
$("input[name='requisitioningChildList']").val(JSON.stringify(tableData));
$.operate.save(prefix + "/complete/"+taskId, $('#form-requisitioning-modifyApply').serialize());
}
}
$("#form-requisitioning-edit").validate({focusCleanup: true});
$(function() {
getSelections();
var options = {
id:'bootstrap-sub-table-requisitionChild',
url: ctx + "system/requisitioningChild/list",
pagination: false,
sidePagination: "client",
queryParams: queryParams,
model: "物料报价信息",
columns: [
{checkbox: true},
{field: 'index',align: 'center', title: "序号",
formatter: function (value, row, index) {
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
return columnIndex + $.table.serialNumber(index);
}
},
{title: '物料索引id',field: 'materialId',align: 'center',visible: false},
{title: '料号',field: 'materialCode',align: 'center'},
{title: '物料名称',field: 'materialName',align: 'center'},
{title: '图片',field: 'photoUrl',
formatter: function(value, row, index) {
return $.table.imageView(value);
}
},
{title: '物料类型',field: 'materialType',align: 'center',
formatter: function(value, row, index) {
return $.table.selectCategoryLabel(materialTypeDatas, value);
}
},
{ title: '描述',field: 'describe',align: 'center'},
{title: '品牌',field: 'brand',align: 'center'},
{ title: '单位',field: 'unit',align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(sysUnitClassDatas, value);
}
},
{title: '半成品类型',field: 'processMethod',align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
{title: '物料的数量', field: 'materialNum',align: 'center',editable: true,},
{title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',},
{title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center',},
{title: '物料的含税总价(RMB)',field: 'materialNoRmbSum',align: 'center',},
{title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center',},
{title: '录入人',field: 'createBy',align: 'center',visible: false},
{title: '录入时间',field: 'createTime',align: 'center',visible: false },
{title: '更新人',field: 'updateBy',align: 'center',visible: false},
{title: '上次更新时间',field: 'updateTime',align: 'center',visible: false},
{title: '备注',field: 'remark',align: 'center'},
{title: '操作', align: 'center',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
return actions.join('');
}
}
],
onEditableSave:function(field, row, oldValue, $el){
row.materialNoRmbSum = Number(row.materialNum * Number(row.materialNoRmb)).toFixed(2);
row.materialRmbSum = Number(row.materialRmb * row.materialNum).toFixed(2);
},
};
$.table.init(options);
});
function queryParams(params) {
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
requisitioningCode: requisitioningCode
};
return curParams;
}
function doSubmit(index, layero,uniqueId){
console.log(uniqueId);
var iframeWin = window[layero.find('iframe')[0]['name']];
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0];
console.log("rowData: "+rowData);
$("#bootstrap-sub-table-requisitionChild").bootstrapTable('insertRow', {
index:1,
row: {
materialId:rowData.id,
materialCode: rowData.materialNo,
materialName: rowData.materialName,
materialType: rowData.materialType,
describe: rowData.describe,
brand: rowData.brand,
unit: rowData.unit,
processMethod: rowData.processMethod,
photoUrl: rowData.photoUrl,
materialNum: "",
materialRmb: "",
materialNoRmb: "",
materialNoRmbSum: "",
materialRmbSum: "",
remark: ""
}
})
layer.close(index);
}
function insertRow() {
var url = ctx + "erp/material/select";
var options = {
title: '选择料号',
url: url,
callBack: doSubmit
};
$.modal.openOptions(options);
}
/* 删除指定表格行 */
function removeRow(id){
$("#bootstrap-sub-table-requisitionChild").bootstrapTable('remove', {
field: 'id',
values: id
})
}
function getSelections(){
$.ajax({
url: ctx + "system/requisitioning/getEmpUserName",
@ -29,11 +259,10 @@
dataType: "json",
success: function (data) {
$("select[name='deptName']").append($('<option></option>').val(data.deptName).html(data.deptName));
$("select[name='evectionBy']").append($('<option></option>').val(data.userName).html(data.userName));
$("select[name='userName']").append($('<option></option>').val(data.userName).html(data.userName));
$("select[name='postName']").append($('<option></option>').val(data.postName).html(data.postName));
}
});
}
</script>
</body>

106
ruoyi-admin/src/main/resources/templates/system/requisitioning/taskQgjlVerify.html

@ -12,8 +12,8 @@
<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" />
<!--驳回调整允许更新内容-->
<input type="hidden" name="saveEntity" value="true" />
<div class="form-group">
<label class="col-sm-3 control-label">申请人:</label>
<div class="col-sm-8">
@ -38,25 +38,25 @@
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">请购单号:</label>
<div class="col-sm-8">
<input name="code" th:field="*{requisitioningCode}" class="form-control" type="text">
<input name="requisitioningCode" th:field="*{requisitioningCode}" 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="deptName" th:field="*{deptName}" class="form-control"></select>
<select name="deptName" th:field="*{deptName}" class="form-control" disabled></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">岗位:</label>
<div class="col-sm-8">
<select name="postName" th:field="*{postName}" class="form-control"></select>
<select name="postName" th:field="*{postName}" class="form-control" disabled></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">姓名:</label>
<div class="col-sm-8">
<select name="userName" th:field="*{userName}" class="form-control"></select>
<select name="userName" th:field="*{userName}" class="form-control" disabled></select>
</div>
</div>
<div class="form-group">
@ -65,14 +65,27 @@
<input name="correlationCode" th:field="*{correlationCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="qgjlVerifyApproved"><span style="color: red; ">*</span>审批意见:</label>
<div class="col-sm-8">
<select name="p_B_qgjlVerifyApproved" id="qgjlVerifyApproved" 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 class="container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span>选择报价信息</span>
<a class="btn btn-success" onclick="insertRow()">
<i class="fa fa-plus"></i> 添加物料
</a>
</div>
</div>
<div class="row">
@ -84,28 +97,81 @@
</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 + "system/requisitioning";
var taskId = [[${taskId}]];
var requisitioningCode = [[${formData.requisitioningCode}]];
$("#form-requisitioning-qgjl-audit").validate({focusCleanup: true});
$(function() {
var options = {
id:'bootstrap-sub-table-requisitionChild',
url: ctx + "system/requisitioningChild/list",
pagination: false,
sidePagination: "client",
queryParams: queryParams,
model: "物料报价信息",
columns: [
{checkbox: true},
{field: 'index',align: 'center', title: "序号",
formatter: function (value, row, index,column) {
return $.table.serialNumber(index) - 1;
}
},
{title: '物料索引id',field: 'materialId',align: 'center',visible: false},
{title: '料号',field: 'materialCode',align: 'center'},
{title: '物料名称',field: 'materialName',align: 'center'},
{title: '图片',field: 'photoUrl',
formatter: function(value, row, index) {
return $.table.imageView(value);
}
},
{title: '物料类型',field: 'materialType',align: 'center',
formatter: function(value, row, index) {
return $.table.selectCategoryLabel(materialTypeDatas, value);
}
},
{ title: '描述',field: 'describe',align: 'center'},
{title: '品牌',field: 'brand',align: 'center'},
{ title: '单位',field: 'unit',align: 'center',},
{title: '加工方式',field: 'processMethod',align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
{title: '入库部门',field: 'warehouseDept',align: 'center',},
{title: '物料的数量', field: 'materialNum',align: 'center',},
{title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',},
{title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center',},
{title: '物料的含税总价(RMB)',field: 'materialNoRmbSum',align: 'center',},
{title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center',},
{title: '录入人',field: 'createBy',align: 'center',visible: false},
{title: '录入时间',field: 'createTime',align: 'center',visible: false },
{title: '更新人',field: 'updateBy',align: 'center',visible: false},
{title: '上次更新时间',field: 'updateTime',align: 'center',visible: false},
{title: '备注',field: 'remark',align: 'center'},
]
};
$.table.init(options);
});
function queryParams(params) {
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
requisitioningCode: requisitioningCode
};
return curParams;
}
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/complete/"+taskId, $('#form-requisitioning-qgjl-audit').serialize());
if ($('textarea[name="comment"]').val()) {
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
}
$.operate.save(prefix + "/complete/"+taskId, $('#form-requisitioning-qgjl-audit').serialize());
}
function getSelections(){
$.ajax({
url: ctx + "system/requisitioning/getEmpUserName",
type: "get",
dataType: "json",
success: function (data) {
$("select[name='deptName']").append($('<option></option>').val(data.deptName).html(data.deptName));
$("select[name='evectionBy']").append($('<option></option>').val(data.userName).html(data.userName));
$("select[name='postName']").append($('<option></option>').val(data.postName).html(data.postName));
}
});
}
</script>
</body>
</html>

171
ruoyi-admin/src/main/resources/templates/system/requisitioning/taskQgzgVerify.html

@ -1,41 +1,176 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改出差单')" />
<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">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-requisitioning-qgzg-audit" th:object="${formData}">
<input name="requisitioningId" th:field="*{requisitioningId}" 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="applyUserName" th:field="*{applyUserName}" 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">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input name="applyTime" th:value="${#dates.format(formData.applyTime, 'yyyy-MM-dd HH:mm')}" class="form-control" type="text" disabled>
</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" readonly>
</div>
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">请购单号:</label>
<div class="col-sm-8">
<input name="code" th:field="*{requisitioningCode}" 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="deptName" th:field="*{deptName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">岗位:</label>
<div class="col-sm-8">
<select name="postName" th:field="*{postName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">姓名:</label>
<div class="col-sm-8">
<select name="userName" th:field="*{userName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">关联单号:</label>
<div class="col-sm-8">
<input name="correlationCode" th:field="*{correlationCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="qgzgVerifyApproved"><span style="color: red; ">*</span>审批意见:</label>
<div class="col-sm-8">
<select name="p_B_qgzgVerifyApproved" id="qgzgVerifyApproved" 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 class="container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span>选择报价信息</span>
</div>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-requisitionChild"></table>
</div>
</div>
</div>
</div>
</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 + "system/baseEvectionForm";
var prefix = ctx + "system/requisitioning";
var taskId = [[${taskId}]];
var requisitioningCode = [[${formData.requisitioningCode}]];
$("#form-requisitioning-qgzg-audit").validate({focusCleanup: true});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/complete/"+taskId, $('#form-requisitioning-qgzg-audit').serialize());
$(function() {
var options = {
id:'bootstrap-sub-table-requisitionChild',
url: ctx + "system/requisitioningChild/list",
pagination: false,
sidePagination: "client",
queryParams: queryParams,
model: "物料报价信息",
columns: [
{checkbox: true},
{field: 'index',align: 'center', title: "序号",
formatter: function (value, row, index,column) {
return $.table.serialNumber(index) - 1;
}
},
{title: '物料索引id',field: 'materialId',align: 'center',visible: false},
{title: '料号',field: 'materialCode',align: 'center'},
{title: '物料名称',field: 'materialName',align: 'center'},
{title: '图片',field: 'photoUrl',
formatter: function(value, row, index) {
return $.table.imageView(value);
}
},
{title: '物料类型',field: 'materialType',align: 'center',
formatter: function(value, row, index) {
return $.table.selectCategoryLabel(materialTypeDatas, value);
}
function getSelections(){
$.ajax({
url: ctx + "system/requisitioning/getEmpUserName",
type: "get",
dataType: "json",
success: function (data) {
$("select[name='deptName']").append($('<option></option>').val(data.deptName).html(data.deptName));
$("select[name='evectionBy']").append($('<option></option>').val(data.userName).html(data.userName));
$("select[name='postName']").append($('<option></option>').val(data.postName).html(data.postName));
},
{ title: '描述',field: 'describe',align: 'center'},
{title: '品牌',field: 'brand',align: 'center'},
{ title: '单位',field: 'unit',align: 'center',},
{title: '加工方式',field: 'processMethod',align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
{title: '入库部门',field: 'warehouseDept',align: 'center',},
{title: '物料的数量', field: 'materialNum',align: 'center',},
{title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',},
{title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center',},
{title: '物料的含税总价(RMB)',field: 'materialNoRmbSum',align: 'center',},
{title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center',},
{title: '录入人',field: 'createBy',align: 'center',visible: false},
{title: '录入时间',field: 'createTime',align: 'center',visible: false },
{title: '更新人',field: 'updateBy',align: 'center',visible: false},
{title: '上次更新时间',field: 'updateTime',align: 'center',visible: false},
{title: '备注',field: 'remark',align: 'center'},
]
};
$.table.init(options);
});
function queryParams(params) {
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
requisitioningCode: requisitioningCode
};
return curParams;
}
function submitHandler() {
if ($.validate.form()) {
if ($('textarea[name="comment"]').val()) {
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
}
$.operate.save(prefix + "/complete/"+taskId, $('#form-requisitioning-qgzg-audit').serialize());
}
}
</script>
</body>

230
ruoyi-admin/src/main/resources/templates/system/requisitioning/taskZozjVerify.html

@ -7,34 +7,236 @@
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-requisitioning-zozj-audit" th:object="${formData}">
<input name="requisitioningId" th:field="*{requisitioningId}" 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="applyUserName" th:field="*{applyUserName}" 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">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input name="applyTime" th:value="${#dates.format(formData.applyTime, 'yyyy-MM-dd HH:mm')}" class="form-control" type="text" disabled>
</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" readonly>
</div>
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">请购单号:</label>
<div class="col-sm-8">
<input name="requisitioningCode" th:field="*{requisitioningCode}" 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="deptName" th:field="*{deptName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">岗位:</label>
<div class="col-sm-8">
<select name="postName" th:field="*{postName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">姓名:</label>
<div class="col-sm-8">
<select name="userName" th:field="*{userName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">关联单号:</label>
<div class="col-sm-8">
<input name="correlationCode" th:field="*{correlationCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="zozjVerifyApproved"><span style="color: red; ">*</span>审批意见:</label>
<div class="col-sm-8">
<select name="p_B_zozjVerifyApproved" id="zozjVerifyApproved" 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 class="container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span>选择报价信息</span>
</div>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-requisitionChild"></table>
</div>
</div>
</div>
</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 + "system/requisitioning";
var taskId = [[${taskId}]];
var requisitioningCode = [[${formData.requisitioningCode}]];
$("#form-requisitioning-zozj-audit").validate({focusCleanup: true});
$(function() {
var options = {
id:'bootstrap-sub-table-requisitionChild',
url: ctx + "system/requisitioningChild/list",
pagination: false,
sidePagination: "client",
queryParams: queryParams,
model: "物料报价信息",
columns: [
{checkbox: true},
{field: 'index',align: 'center', title: "序号",
formatter: function (value, row, index,column) {
return $.table.serialNumber(index) - 1;
}
},
{title: '物料索引id',field: 'materialId',align: 'center',visible: false},
{title: '料号',field: 'materialCode',align: 'center'},
{title: '物料名称',field: 'materialName',align: 'center'},
{title: '图片',field: 'photoUrl',
formatter: function(value, row, index) {
return $.table.imageView(value);
}
},
{title: '物料类型',field: 'materialType',align: 'center',
formatter: function(value, row, index) {
return $.table.selectCategoryLabel(materialTypeDatas, value);
}
},
{ title: '描述',field: 'describe',align: 'center'},
{title: '品牌',field: 'brand',align: 'center'},
{ title: '单位',field: 'unit',align: 'center',},
{title: '加工方式',field: 'processMethod',align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
{title: '入库部门',field: 'warehouseDept',align: 'center',},
{title: '物料的数量', field: 'materialNum',align: 'center',},
{title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',},
{title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center',},
{title: '物料的含税总价(RMB)',field: 'materialNoRmbSum',align: 'center',},
{title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center',},
{title: '录入人',field: 'createBy',align: 'center',visible: false},
{title: '录入时间',field: 'createTime',align: 'center',visible: false },
{title: '更新人',field: 'updateBy',align: 'center',visible: false},
{title: '上次更新时间',field: 'updateTime',align: 'center',visible: false},
{title: '备注',field: 'remark',align: 'center'},
]
};
$.table.init(options);
});
function queryParams(params) {
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
requisitioningCode: requisitioningCode
};
return curParams;
}
function submitHandler() {
if ($.validate.form()) {
if ($('textarea[name="comment"]').val()) {
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
}
$.operate.save(prefix + "/complete/"+taskId, $('#form-requisitioning-zozj-audit').serialize());
}
}
function getSelections(){
$.ajax({
url: ctx + "system/requisitioning/getEmpUserName",
type: "get",
dataType: "json",
success: function (data) {
$("select[name='deptName']").append($('<option></option>').val(data.deptName).html(data.deptName));
$("select[name='evectionBy']").append($('<option></option>').val(data.userName).html(data.userName));
$("select[name='postName']").append($('<option></option>').val(data.postName).html(data.postName));
$(function() {
getSelections();
var options = {
id:'bootstrap-sub-table-requisitionChild',
url: ctx + "system/requisitioningChild/list",
pagination: false,
sidePagination: "client",
queryParams: function(params) {
var temp = {
requisitioningCode: requisitioningCode,
};
return temp;
},
model: "物料报价信息",
columns: [
{checkbox: true},
{field: 'index',align: 'center', title: "序号",
formatter: function (value, row, index) {
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
return columnIndex + $.table.serialNumber(index);
}
});
},
{title: '物料索引id',field: 'materialId',align: 'center',visible: false},
{title: '料号',field: 'materialCode',align: 'center'},
{title: '物料名称',field: 'materialName',align: 'center'},
{title: '图片',field: 'photoUrl',
formatter: function(value, row, index) {
return $.table.imageView(value);
}
},
{title: '物料类型',field: 'materialType',align: 'center',
formatter: function(value, row, index) {
return $.table.selectCategoryLabel(materialTypeDatas, value);
}
},
{ title: '描述',field: 'describe',align: 'center'},
{title: '品牌',field: 'brand',align: 'center'},
{ title: '单位',field: 'unit',align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(sysUnitClassDatas, value);
}
},
{title: '加工方式',field: 'processMethod',align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
{title: '入库部门',field: 'warehouseDept',align: 'center',},
{title: '物料的数量', field: 'materialNum',align: 'center',editable: true,},
{title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',},
{title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center',},
{title: '物料的含税总价(RMB)',field: 'materialNoRmbSum',align: 'center',},
{title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center',},
{title: '录入人',field: 'createBy',align: 'center',visible: false},
{title: '录入时间',field: 'createTime',align: 'center',visible: false },
{title: '更新人',field: 'updateBy',align: 'center',visible: false},
{title: '上次更新时间',field: 'updateTime',align: 'center',visible: false},
{title: '备注',field: 'remark',align: 'center'},
],
onEditableSave:function(field, row, oldValue, $el){
row.materialNoRmbSum = Number(row.materialNum * Number(row.materialNoRmb)).toFixed(2);
row.materialRmbSum = Number(row.materialRmb * row.materialNum).toFixed(2);
},
};
$.table.init(options);
});
</script>
</body>
</html>
Loading…
Cancel
Save