28 changed files with 2247 additions and 16 deletions
@ -0,0 +1,151 @@ |
|||
package com.ruoyi.system.controller; |
|||
|
|||
import java.util.List; |
|||
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.ui.ModelMap; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.ResponseBody; |
|||
import com.ruoyi.common.annotation.Log; |
|||
import com.ruoyi.common.enums.BusinessType; |
|||
import com.ruoyi.system.domain.SysMakeorderDept; |
|||
import com.ruoyi.system.service.ISysMakeorderDeptService; |
|||
import com.ruoyi.common.core.controller.BaseController; |
|||
import com.ruoyi.common.core.domain.AjaxResult; |
|||
import com.ruoyi.common.utils.poi.ExcelUtil; |
|||
import com.ruoyi.common.core.page.TableDataInfo; |
|||
|
|||
/** |
|||
* 生产订单部门Controller |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-04-01 |
|||
*/ |
|||
@Controller |
|||
@RequestMapping("/system/makeorderdept") |
|||
public class SysMakeorderDeptController extends BaseController |
|||
{ |
|||
private String prefix = "system/makeorderdept"; |
|||
|
|||
@Autowired |
|||
private ISysMakeorderDeptService sysMakeorderDeptService; |
|||
|
|||
@RequiresPermissions("system:makeorderdept:view") |
|||
@GetMapping() |
|||
public String dept() |
|||
{ |
|||
return prefix + "/dept"; |
|||
} |
|||
|
|||
/** |
|||
* 查询生产订单部门列表 |
|||
*/ |
|||
// @RequiresPermissions("system:makeorderdept:list")
|
|||
@PostMapping("/list") |
|||
@ResponseBody |
|||
public TableDataInfo list(SysMakeorderDept sysMakeorderDept) |
|||
{ |
|||
startPage(); |
|||
List<SysMakeorderDept> list = sysMakeorderDeptService.selectSysMakeorderDeptList(sysMakeorderDept); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
/** |
|||
* 导出生产订单部门列表 |
|||
*/ |
|||
// @RequiresPermissions("system:makeorderdept:export")
|
|||
// @Log(title = "生产订单部门", businessType = BusinessType.EXPORT)
|
|||
@PostMapping("/export") |
|||
@ResponseBody |
|||
public AjaxResult export(SysMakeorderDept sysMakeorderDept) |
|||
{ |
|||
List<SysMakeorderDept> list = sysMakeorderDeptService.selectSysMakeorderDeptList(sysMakeorderDept); |
|||
ExcelUtil<SysMakeorderDept> util = new ExcelUtil<SysMakeorderDept>(SysMakeorderDept.class); |
|||
return util.exportExcel(list, "生产订单部门数据"); |
|||
} |
|||
|
|||
/** |
|||
* 新增生产订单部门 |
|||
*/ |
|||
@GetMapping("/add") |
|||
public String add() |
|||
{ |
|||
return prefix + "/add"; |
|||
} |
|||
|
|||
/** |
|||
* 新增保存生产订单部门 |
|||
*/ |
|||
// @RequiresPermissions("system:makeorderdept:add")
|
|||
// @Log(title = "生产订单部门", businessType = BusinessType.INSERT)
|
|||
@PostMapping("/add") |
|||
@ResponseBody |
|||
public AjaxResult addSave(SysMakeorderDept sysMakeorderDept) |
|||
{ |
|||
return toAjax(sysMakeorderDeptService.insertSysMakeorderDept(sysMakeorderDept)); |
|||
} |
|||
|
|||
/** |
|||
* 修改生产订单部门 |
|||
*/ |
|||
@GetMapping("/edit/{id}") |
|||
public String edit(@PathVariable("id") Long id, ModelMap mmap) |
|||
{ |
|||
SysMakeorderDept sysMakeorderDept = sysMakeorderDeptService.selectSysMakeorderDeptById(id); |
|||
mmap.put("sysMakeorderDept", sysMakeorderDept); |
|||
return prefix + "/edit"; |
|||
} |
|||
|
|||
/** |
|||
* 修改保存生产订单部门 |
|||
*/ |
|||
// @RequiresPermissions("system:makeorderdept:edit")
|
|||
// @Log(title = "生产订单部门", businessType = BusinessType.UPDATE)
|
|||
@PostMapping("/edit") |
|||
@ResponseBody |
|||
public AjaxResult editSave(SysMakeorderDept sysMakeorderDept) |
|||
{ |
|||
return toAjax(sysMakeorderDeptService.updateSysMakeorderDept(sysMakeorderDept)); |
|||
} |
|||
|
|||
/** |
|||
* 删除生产订单部门 |
|||
*/ |
|||
// @RequiresPermissions("system:makeorderdept:remove")
|
|||
// @Log(title = "生产订单部门", businessType = BusinessType.DELETE)
|
|||
@PostMapping( "/remove") |
|||
@ResponseBody |
|||
public AjaxResult remove(String ids) |
|||
{ |
|||
return toAjax(sysMakeorderDeptService.deleteSysMakeorderDeptByIds(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 作废生产订单部门 |
|||
*/ |
|||
// @RequiresPermissions("system:makeorderdept:cancel")
|
|||
// @Log(title = "生产订单部门", businessType = BusinessType.CANCEL)
|
|||
@GetMapping( "/cancel/{id}") |
|||
@ResponseBody |
|||
public AjaxResult cancel(@PathVariable("id") Long id){ |
|||
return toAjax(sysMakeorderDeptService.cancelSysMakeorderDeptById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 恢复生产订单部门 |
|||
*/ |
|||
// @RequiresPermissions("system:makeorderdept:restore")
|
|||
// @Log(title = "生产订单部门", businessType = BusinessType.RESTORE)
|
|||
@GetMapping( "/restore/{id}") |
|||
@ResponseBody |
|||
public AjaxResult restore(@PathVariable("id")Long id) |
|||
{ |
|||
return toAjax(sysMakeorderDeptService.restoreSysMakeorderDeptById(id)); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,262 @@ |
|||
package com.ruoyi.system.controller; |
|||
|
|||
import com.ruoyi.common.annotation.Log; |
|||
import com.ruoyi.common.core.controller.BaseController; |
|||
import com.ruoyi.common.core.domain.AjaxResult; |
|||
import com.ruoyi.common.core.page.TableDataInfo; |
|||
import com.ruoyi.common.enums.BusinessType; |
|||
import com.ruoyi.common.utils.ShiroUtils; |
|||
import com.ruoyi.common.utils.poi.ExcelUtil; |
|||
import com.ruoyi.process.general.service.IProcessService; |
|||
import com.ruoyi.system.domain.SysMakeorderPick; |
|||
import com.ruoyi.system.domain.SysMakeorderPickVo; |
|||
import com.ruoyi.system.service.ISysMakeorderPickService; |
|||
import org.activiti.engine.RuntimeService; |
|||
import org.activiti.engine.TaskService; |
|||
import org.activiti.engine.runtime.ProcessInstance; |
|||
import org.activiti.engine.task.Task; |
|||
import org.apache.commons.lang3.BooleanUtils; |
|||
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.ui.ModelMap; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
import javax.servlet.http.HttpSession; |
|||
import java.util.HashMap; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 生产领料单Controller |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-04-05 |
|||
*/ |
|||
@Controller |
|||
@RequestMapping("/system/makeorderpick") |
|||
public class SysMakeorderPickController extends BaseController |
|||
{ |
|||
private String prefix = "system/makeorderpick"; |
|||
|
|||
@Autowired |
|||
private ISysMakeorderPickService sysMakeorderPickService; |
|||
|
|||
@Autowired |
|||
private TaskService taskService; |
|||
|
|||
@Autowired |
|||
private RuntimeService runtimeService; |
|||
|
|||
@Autowired |
|||
private IProcessService processService; |
|||
|
|||
|
|||
|
|||
@RequiresPermissions("system:makeorderpick:view") |
|||
@GetMapping() |
|||
public String makeorderpick(ModelMap mmap) |
|||
{ |
|||
mmap.put("currentUser", ShiroUtils.getSysUser()); |
|||
return prefix + "/makeorderpick"; |
|||
} |
|||
|
|||
/** |
|||
* 查询生产领料单列表 |
|||
*/ |
|||
@RequiresPermissions("system:makeorderpick:list") |
|||
@PostMapping("/list") |
|||
@ResponseBody |
|||
public TableDataInfo list(SysMakeorderPickVo makeorderPickVo) |
|||
{ |
|||
startPage(); |
|||
List<SysMakeorderPickVo> list = sysMakeorderPickService.selectSysMakeorderPickList(makeorderPickVo); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
/** |
|||
* 导出生产领料单列表 |
|||
*/ |
|||
@RequiresPermissions("system:makeorderpick:export") |
|||
@Log(title = "生产领料单", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
@ResponseBody |
|||
public AjaxResult export(SysMakeorderPickVo sysMakeorderPickVo) |
|||
{ |
|||
List<SysMakeorderPickVo> list = sysMakeorderPickService.selectSysMakeorderPickList(sysMakeorderPickVo); |
|||
ExcelUtil<SysMakeorderPickVo> util = new ExcelUtil<SysMakeorderPickVo>(SysMakeorderPickVo.class); |
|||
return util.exportExcel(list, "生产领料单数据"); |
|||
} |
|||
|
|||
/** |
|||
* 新增生产领料单 |
|||
*/ |
|||
@GetMapping("/add") |
|||
public String add() |
|||
{ |
|||
return prefix + "/add"; |
|||
} |
|||
|
|||
/** |
|||
* 新增保存生产领料单 |
|||
*/ |
|||
@RequiresPermissions("system:makeorderpick:add") |
|||
@Log(title = "生产领料单", businessType = BusinessType.INSERT) |
|||
@PostMapping("/add") |
|||
@ResponseBody |
|||
public AjaxResult addSave(SysMakeorderPick sysMakeorderPick) |
|||
{ |
|||
// 审核状态-待审核
|
|||
sysMakeorderPick.setAuditStatus("0"); |
|||
sysMakeorderPickService.submitApply(sysMakeorderPick); |
|||
return AjaxResult.success(); |
|||
} |
|||
|
|||
/** |
|||
* 加载审批弹窗 |
|||
* @param taskId |
|||
* @param mmap |
|||
* @return |
|||
*/ |
|||
@GetMapping("/showVerifyDialog/{taskId}") |
|||
public String showVerifyDialog(@PathVariable("taskId") String taskId, ModelMap mmap) { |
|||
Task task = taskService.createTaskQuery().taskId(taskId).singleResult(); |
|||
String processInstanceId = task.getProcessInstanceId(); |
|||
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult(); |
|||
SysMakeorderPick makeorderPick = sysMakeorderPickService.selectSysMakeorderPickById(new Long(processInstance.getBusinessKey())); |
|||
mmap.put("formData", makeorderPick); |
|||
mmap.put("taskId", taskId); |
|||
String verifyName = task.getTaskDefinitionKey().substring(0, 1).toUpperCase() + task.getTaskDefinitionKey().substring(1); |
|||
return prefix + "/task" + verifyName; |
|||
} |
|||
|
|||
/** |
|||
* 自动绑定页面字段 |
|||
*/ |
|||
@ModelAttribute("preloadObj") |
|||
public SysMakeorderPickVo getObj(@RequestParam(value = "id", required = false) Long id, HttpSession session) { |
|||
if (id != null) { |
|||
return sysMakeorderPickService.selectSysMakeorderPickById(id); |
|||
} |
|||
return new SysMakeorderPickVo(); |
|||
} |
|||
|
|||
/** |
|||
* 完成任务 |
|||
* |
|||
* @return |
|||
*/ |
|||
@RequestMapping(value = "/complete/{taskId}", method = {RequestMethod.POST, RequestMethod.GET}) |
|||
@ResponseBody |
|||
public AjaxResult complete(@PathVariable("taskId") String taskId, @RequestParam(value = "saveEntity", required = false) String saveEntity, |
|||
@ModelAttribute("preloadObj") SysMakeorderPickVo makeorderPickVo, HttpServletRequest request) { |
|||
boolean saveEntityBoolean = BooleanUtils.toBoolean(saveEntity); |
|||
//获取实例id
|
|||
String instanceId = makeorderPickVo.getInstanceId(); |
|||
//获取实例类型
|
|||
String instanceType = makeorderPickVo.getInstanceType(); |
|||
boolean approvedFlag = processService.complete(taskId, instanceId, makeorderPickVo.getApplyTitle(), makeorderPickVo.getPickNo(), "makeorderpick", new HashMap<String, Object>(), request); |
|||
if(!approvedFlag){ |
|||
// 审核状态-审核拒绝
|
|||
makeorderPickVo.setAuditStatus("2"); |
|||
} |
|||
// 如果任务已结束更新业务表状态
|
|||
boolean processIsFinish = processService.judgeProcessIsFinish(instanceId); |
|||
if (processIsFinish) { |
|||
// 审核通过
|
|||
makeorderPickVo.setAuditStatus("1"); |
|||
// 提交
|
|||
if("submit".equals(instanceType)){ |
|||
// 使用状态-是
|
|||
// erpBomVo.setUseStatus("1");
|
|||
} |
|||
// 作废
|
|||
else if("cancel".equals(instanceType)){ |
|||
// 使用状态-已作废
|
|||
// erpBomVo.setUseStatus("2");
|
|||
} |
|||
// 恢复
|
|||
else if("restore".equals(instanceType)){ |
|||
// 使用状态-是
|
|||
// erpBomVo.setUseStatus("1");
|
|||
} |
|||
} |
|||
sysMakeorderPickService.updateSysMakeorderPick(makeorderPickVo); |
|||
// 驳回申请后继续申请,可能修改表单
|
|||
if (saveEntityBoolean) { |
|||
sysMakeorderPickService.updateSysMakeorderPick(makeorderPickVo); |
|||
} |
|||
return success("任务已完成"); |
|||
} |
|||
|
|||
/** |
|||
* 修改生产领料单 |
|||
*/ |
|||
@GetMapping("/edit/{id}") |
|||
public String edit(@PathVariable("id") Long id, ModelMap mmap) |
|||
{ |
|||
SysMakeorderPick sysMakeorderPick = sysMakeorderPickService.selectSysMakeorderPickById(id); |
|||
mmap.put("sysMakeorderPick", sysMakeorderPick); |
|||
return prefix + "/edit"; |
|||
} |
|||
|
|||
@GetMapping("/detail/{id}") |
|||
public String detail(@PathVariable("id") Long id, ModelMap mmap) |
|||
{ |
|||
SysMakeorderPick sysMakeorderPick = sysMakeorderPickService.selectSysMakeorderPickById(id); |
|||
mmap.put("sysMakeorderPick", sysMakeorderPick); |
|||
return prefix + "/detail"; |
|||
} |
|||
|
|||
/** |
|||
* 修改保存生产领料单 |
|||
*/ |
|||
@RequiresPermissions("system:makeorderpick:edit") |
|||
@Log(title = "生产领料单", businessType = BusinessType.UPDATE) |
|||
@PostMapping("/edit") |
|||
@ResponseBody |
|||
public AjaxResult editSave(SysMakeorderPick sysMakeorderPick) |
|||
{ |
|||
// 审核状态-待审核
|
|||
sysMakeorderPick.setAuditStatus("0"); |
|||
sysMakeorderPickService.submitApply(sysMakeorderPick); |
|||
return AjaxResult.success(); |
|||
} |
|||
|
|||
/** |
|||
* 删除生产领料单 |
|||
*/ |
|||
@RequiresPermissions("system:makeorderpick:remove") |
|||
@Log(title = "生产领料单", businessType = BusinessType.DELETE) |
|||
@PostMapping( "/remove") |
|||
@ResponseBody |
|||
public AjaxResult remove(String ids) |
|||
{ |
|||
return toAjax(sysMakeorderPickService.deleteSysMakeorderPickByIds(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 作废生产领料单 |
|||
*/ |
|||
@RequiresPermissions("system:makeorderpick:cancel") |
|||
@Log(title = "生产领料单", businessType = BusinessType.CANCEL) |
|||
@GetMapping( "/cancel/{id}") |
|||
@ResponseBody |
|||
public AjaxResult cancel(@PathVariable("id") Long id){ |
|||
return toAjax(sysMakeorderPickService.cancelSysMakeorderPickById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 恢复生产领料单 |
|||
*/ |
|||
@RequiresPermissions("system:makeorderpick:restore") |
|||
@Log(title = "生产领料单", businessType = BusinessType.RESTORE) |
|||
@GetMapping( "/restore/{id}") |
|||
@ResponseBody |
|||
public AjaxResult restore(@PathVariable("id")Long id) |
|||
{ |
|||
return toAjax(sysMakeorderPickService.restoreSysMakeorderPickById(id)); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,254 @@ |
|||
package com.ruoyi.system.domain; |
|||
|
|||
import java.util.Date; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import org.apache.commons.lang3.builder.ToStringBuilder; |
|||
import org.apache.commons.lang3.builder.ToStringStyle; |
|||
import com.ruoyi.common.annotation.Excel; |
|||
import com.ruoyi.common.core.domain.BaseEntity; |
|||
|
|||
/** |
|||
* 生产领料单对象 sys_makeorder_pick |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-04-05 |
|||
*/ |
|||
public class SysMakeorderPick extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 主键ID */ |
|||
private Long id; |
|||
|
|||
/** 删除标志(0代表存在 1代表删除) */ |
|||
private String delFlag; |
|||
|
|||
/** 生产订单号 */ |
|||
@Excel(name = "生产订单号") |
|||
private String makeNo; |
|||
|
|||
/** 关联销售订单号 */ |
|||
@Excel(name = "关联销售订单号") |
|||
private String saleNo; |
|||
|
|||
/** 生产领料单号 */ |
|||
@Excel(name = "生产领料单号") |
|||
private String pickNo; |
|||
|
|||
/** 领料状态 0-待领料 1-部分领料 2-全部领料 */ |
|||
@Excel(name = "领料状态 0-待领料 1-部分领料 2-全部领料") |
|||
private String pickStatus; |
|||
|
|||
/** 领料员 */ |
|||
@Excel(name = "领料员") |
|||
private String pickUser; |
|||
|
|||
/** 审核状态 0-待审核 1-审核通过 2-审核拒绝 */ |
|||
@Excel(name = "审核状态 0-待审核 1-审核通过 2-审核拒绝") |
|||
private String auditStatus; |
|||
|
|||
/** 流程实例ID */ |
|||
@Excel(name = "流程实例ID") |
|||
private String instanceId; |
|||
|
|||
/** 流程实例类型 */ |
|||
@Excel(name = "流程实例类型") |
|||
private String instanceType; |
|||
|
|||
/** 流程提交实例ID */ |
|||
@Excel(name = "流程提交实例ID") |
|||
private String submitInstanceId; |
|||
|
|||
/** 流程作废实例ID */ |
|||
@Excel(name = "流程作废实例ID") |
|||
private String cancelInstanceId; |
|||
|
|||
/** 流程恢复实例ID */ |
|||
@Excel(name = "流程恢复实例ID") |
|||
private String restoreInstanceId; |
|||
|
|||
/** 申请标题 */ |
|||
@Excel(name = "申请标题") |
|||
private String applyTitle; |
|||
|
|||
/** 申请人 */ |
|||
@Excel(name = "申请人") |
|||
private String applyUser; |
|||
|
|||
/** 申请时间 */ |
|||
@JsonFormat(pattern = "yyyy-MM-dd") |
|||
@Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd") |
|||
private Date applyTime; |
|||
|
|||
public void setId(Long id) |
|||
{ |
|||
this.id = id; |
|||
} |
|||
|
|||
public Long getId() |
|||
{ |
|||
return id; |
|||
} |
|||
public void setDelFlag(String delFlag) |
|||
{ |
|||
this.delFlag = delFlag; |
|||
} |
|||
|
|||
public String getDelFlag() |
|||
{ |
|||
return delFlag; |
|||
} |
|||
public void setMakeNo(String makeNo) |
|||
{ |
|||
this.makeNo = makeNo; |
|||
} |
|||
|
|||
public String getMakeNo() |
|||
{ |
|||
return makeNo; |
|||
} |
|||
public void setSaleNo(String saleNo) |
|||
{ |
|||
this.saleNo = saleNo; |
|||
} |
|||
|
|||
public String getSaleNo() |
|||
{ |
|||
return saleNo; |
|||
} |
|||
public void setPickNo(String pickNo) |
|||
{ |
|||
this.pickNo = pickNo; |
|||
} |
|||
|
|||
public String getPickNo() |
|||
{ |
|||
return pickNo; |
|||
} |
|||
public void setPickStatus(String pickStatus) |
|||
{ |
|||
this.pickStatus = pickStatus; |
|||
} |
|||
|
|||
public String getPickStatus() |
|||
{ |
|||
return pickStatus; |
|||
} |
|||
public void setPickUser(String pickUser) |
|||
{ |
|||
this.pickUser = pickUser; |
|||
} |
|||
|
|||
public String getPickUser() |
|||
{ |
|||
return pickUser; |
|||
} |
|||
public void setAuditStatus(String auditStatus) |
|||
{ |
|||
this.auditStatus = auditStatus; |
|||
} |
|||
|
|||
public String getAuditStatus() |
|||
{ |
|||
return auditStatus; |
|||
} |
|||
public void setInstanceId(String instanceId) |
|||
{ |
|||
this.instanceId = instanceId; |
|||
} |
|||
|
|||
public String getInstanceId() |
|||
{ |
|||
return instanceId; |
|||
} |
|||
public void setInstanceType(String instanceType) |
|||
{ |
|||
this.instanceType = instanceType; |
|||
} |
|||
|
|||
public String getInstanceType() |
|||
{ |
|||
return instanceType; |
|||
} |
|||
public void setSubmitInstanceId(String submitInstanceId) |
|||
{ |
|||
this.submitInstanceId = submitInstanceId; |
|||
} |
|||
|
|||
public String getSubmitInstanceId() |
|||
{ |
|||
return submitInstanceId; |
|||
} |
|||
public void setCancelInstanceId(String cancelInstanceId) |
|||
{ |
|||
this.cancelInstanceId = cancelInstanceId; |
|||
} |
|||
|
|||
public String getCancelInstanceId() |
|||
{ |
|||
return cancelInstanceId; |
|||
} |
|||
public void setRestoreInstanceId(String restoreInstanceId) |
|||
{ |
|||
this.restoreInstanceId = restoreInstanceId; |
|||
} |
|||
|
|||
public String getRestoreInstanceId() |
|||
{ |
|||
return restoreInstanceId; |
|||
} |
|||
public void setApplyTitle(String applyTitle) |
|||
{ |
|||
this.applyTitle = applyTitle; |
|||
} |
|||
|
|||
public String getApplyTitle() |
|||
{ |
|||
return applyTitle; |
|||
} |
|||
public void setApplyUser(String applyUser) |
|||
{ |
|||
this.applyUser = applyUser; |
|||
} |
|||
|
|||
public String getApplyUser() |
|||
{ |
|||
return applyUser; |
|||
} |
|||
public void setApplyTime(Date applyTime) |
|||
{ |
|||
this.applyTime = applyTime; |
|||
} |
|||
|
|||
public Date getApplyTime() |
|||
{ |
|||
return applyTime; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|||
.append("id", getId()) |
|||
.append("delFlag", getDelFlag()) |
|||
.append("createBy", getCreateBy()) |
|||
.append("createTime", getCreateTime()) |
|||
.append("updateBy", getUpdateBy()) |
|||
.append("updateTime", getUpdateTime()) |
|||
.append("remark", getRemark()) |
|||
.append("makeNo", getMakeNo()) |
|||
.append("saleNo", getSaleNo()) |
|||
.append("pickNo", getPickNo()) |
|||
.append("pickStatus", getPickStatus()) |
|||
.append("pickUser", getPickUser()) |
|||
.append("auditStatus", getAuditStatus()) |
|||
.append("instanceId", getInstanceId()) |
|||
.append("instanceType", getInstanceType()) |
|||
.append("submitInstanceId", getSubmitInstanceId()) |
|||
.append("cancelInstanceId", getCancelInstanceId()) |
|||
.append("restoreInstanceId", getRestoreInstanceId()) |
|||
.append("applyTitle", getApplyTitle()) |
|||
.append("applyUser", getApplyUser()) |
|||
.append("applyTime", getApplyTime()) |
|||
.toString(); |
|||
} |
|||
} |
@ -0,0 +1,39 @@ |
|||
package com.ruoyi.system.domain; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @author xiguniang |
|||
* @description SysMakeorderPickVo |
|||
* @date 2024/4/6 16:10 |
|||
*/ |
|||
@Data |
|||
public class SysMakeorderPickVo extends SysMakeorderPick { |
|||
private static final long serialVersionUID = -3627380777050403384L; |
|||
|
|||
/** 领料员姓名 */ |
|||
private String pickUserName; |
|||
/** 申请人姓名 */ |
|||
private String applyUserName; |
|||
/** 任务ID */ |
|||
private String taskId; |
|||
/** 任务名称 */ |
|||
private String taskName; |
|||
/** 办理时间 */ |
|||
private Date doneTime; |
|||
/** 创建人 */ |
|||
private String createUserName; |
|||
/** 流程实例状态 1 激活 2 挂起 */ |
|||
private String suspendState; |
|||
/** 待办用户id */ |
|||
private String todoUserId; |
|||
/** 流程实例类型名称 */ |
|||
private String instanceTypeName; |
|||
|
|||
/** |
|||
* 关键词 |
|||
*/ |
|||
private String keyword; |
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.ruoyi.system.dto; |
|||
|
|||
import com.ruoyi.system.domain.SysMakeorderDept; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author youjianchi |
|||
* @description SysMakeorderDeptDto |
|||
* @date 2024/4/4 14:14 |
|||
*/ |
|||
@Data |
|||
public class SysMakeorderDeptDto implements Serializable { |
|||
private static final long serialVersionUID = 9089739788908492404L; |
|||
List<SysMakeorderDept> makeorderDeptList; |
|||
} |
@ -0,0 +1,78 @@ |
|||
package com.ruoyi.system.mapper; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.system.domain.SysMakeorderPick; |
|||
import com.ruoyi.system.domain.SysMakeorderPickVo; |
|||
|
|||
/** |
|||
* 生产领料单Mapper接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-04-05 |
|||
*/ |
|||
public interface SysMakeorderPickMapper |
|||
{ |
|||
/** |
|||
* 查询生产领料单 |
|||
* |
|||
* @param id 生产领料单ID |
|||
* @return 生产领料单 |
|||
*/ |
|||
public SysMakeorderPickVo selectSysMakeorderPickById(Long id); |
|||
|
|||
/** |
|||
* 查询生产领料单列表 |
|||
* |
|||
* @param sysMakeorderPick 生产领料单 |
|||
* @return 生产领料单集合 |
|||
*/ |
|||
public List<SysMakeorderPickVo> selectSysMakeorderPickList(SysMakeorderPick sysMakeorderPick); |
|||
|
|||
/** |
|||
* 新增生产领料单 |
|||
* |
|||
* @param sysMakeorderPick 生产领料单 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertSysMakeorderPick(SysMakeorderPick sysMakeorderPick); |
|||
|
|||
/** |
|||
* 修改生产领料单 |
|||
* |
|||
* @param sysMakeorderPick 生产领料单 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateSysMakeorderPick(SysMakeorderPick sysMakeorderPick); |
|||
|
|||
/** |
|||
* 删除生产领料单 |
|||
* |
|||
* @param id 生产领料单ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteSysMakeorderPickById(Long id); |
|||
|
|||
/** |
|||
* 批量删除生产领料单 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteSysMakeorderPickByIds(String[] ids); |
|||
|
|||
/** |
|||
* 作废生产领料单 |
|||
* |
|||
* @param id 生产领料单ID |
|||
* @return 结果 |
|||
*/ |
|||
public int cancelSysMakeorderPickById(Long id); |
|||
|
|||
/** |
|||
* 恢复生产领料单 |
|||
* |
|||
* @param id 生产领料单ID |
|||
* @return 结果 |
|||
*/ |
|||
public int restoreSysMakeorderPickById(Long id); |
|||
} |
@ -0,0 +1,79 @@ |
|||
package com.ruoyi.system.service; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.system.domain.SysMakeorderPick; |
|||
import com.ruoyi.system.domain.SysMakeorderPickVo; |
|||
import org.activiti.engine.runtime.ProcessInstance; |
|||
|
|||
/** |
|||
* 生产领料单Service接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-04-05 |
|||
*/ |
|||
public interface ISysMakeorderPickService |
|||
{ |
|||
/** |
|||
* 查询生产领料单 |
|||
* |
|||
* @param id 生产领料单ID |
|||
* @return 生产领料单 |
|||
*/ |
|||
public SysMakeorderPickVo selectSysMakeorderPickById(Long id); |
|||
|
|||
/** |
|||
* 查询生产领料单列表 |
|||
* |
|||
* @param makeorderPickVo 生产领料单 |
|||
* @return 生产领料单集合 |
|||
*/ |
|||
public List<SysMakeorderPickVo> selectSysMakeorderPickList(SysMakeorderPickVo makeorderPickVo); |
|||
|
|||
/** |
|||
* 新增生产领料单 |
|||
* |
|||
* @param sysMakeorderPick 生产领料单 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertSysMakeorderPick(SysMakeorderPick sysMakeorderPick); |
|||
|
|||
/** |
|||
* 修改生产领料单 |
|||
* |
|||
* @param sysMakeorderPick 生产领料单 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateSysMakeorderPick(SysMakeorderPick sysMakeorderPick); |
|||
|
|||
/** |
|||
* 批量删除生产领料单 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteSysMakeorderPickByIds(String ids); |
|||
|
|||
/** |
|||
* 删除生产领料单信息 |
|||
* |
|||
* @param id 生产领料单ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteSysMakeorderPickById(Long id); |
|||
|
|||
/** |
|||
* 作废生产领料单 |
|||
* @param id 生产领料单ID |
|||
* @return |
|||
*/ |
|||
int cancelSysMakeorderPickById(Long id); |
|||
|
|||
/** |
|||
* 恢复生产领料单 |
|||
* @param id 生产领料单ID |
|||
* @return |
|||
*/ |
|||
int restoreSysMakeorderPickById(Long id); |
|||
|
|||
ProcessInstance submitApply(SysMakeorderPick makeorderPick); |
|||
} |
@ -0,0 +1,284 @@ |
|||
package com.ruoyi.system.service.impl; |
|||
|
|||
import com.github.pagehelper.Page; |
|||
import com.ruoyi.common.core.domain.entity.SysUser; |
|||
import com.ruoyi.common.core.page.PageDomain; |
|||
import com.ruoyi.common.core.page.TableSupport; |
|||
import com.ruoyi.common.core.redis.RedisCache; |
|||
import com.ruoyi.common.core.text.Convert; |
|||
import com.ruoyi.common.utils.DateUtils; |
|||
import com.ruoyi.common.utils.ShiroUtils; |
|||
import com.ruoyi.common.utils.StringUtils; |
|||
import com.ruoyi.process.general.service.IProcessService; |
|||
import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper; |
|||
import com.ruoyi.system.domain.SysMakeorderPick; |
|||
import com.ruoyi.system.domain.SysMakeorderPickVo; |
|||
import com.ruoyi.system.mapper.SysMakeorderPickMapper; |
|||
import com.ruoyi.system.mapper.SysUserMapper; |
|||
import com.ruoyi.system.service.ISysMakeorderPickService; |
|||
import com.ruoyi.system.service.ISysRoleService; |
|||
import org.activiti.engine.TaskService; |
|||
import org.activiti.engine.impl.persistence.entity.TaskEntityImpl; |
|||
import org.activiti.engine.runtime.ProcessInstance; |
|||
import org.activiti.engine.task.Task; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.HashMap; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.Set; |
|||
|
|||
/** |
|||
* 生产领料单Service业务层处理 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-04-05 |
|||
*/ |
|||
@Service |
|||
public class SysMakeorderPickServiceImpl implements ISysMakeorderPickService |
|||
{ |
|||
@Autowired |
|||
private SysMakeorderPickMapper sysMakeorderPickMapper; |
|||
|
|||
@Autowired |
|||
private RedisCache redisCache; |
|||
|
|||
@Autowired |
|||
private IProcessService processService; |
|||
|
|||
@Autowired |
|||
private ISysRoleService roleService; |
|||
|
|||
@Autowired |
|||
private SysUserMapper userMapper; |
|||
|
|||
@Autowired |
|||
private TaskService taskService; |
|||
|
|||
@Autowired |
|||
private BizTodoItemMapper todoItemMapper; |
|||
|
|||
/** |
|||
* 查询生产领料单 |
|||
* |
|||
* @param id 生产领料单ID |
|||
* @return 生产领料单 |
|||
*/ |
|||
@Override |
|||
public SysMakeorderPickVo selectSysMakeorderPickById(Long id) |
|||
{ |
|||
SysMakeorderPickVo makeorderPickVo = sysMakeorderPickMapper.selectSysMakeorderPickById(id); |
|||
SysUser pickUser = userMapper.selectUserByLoginName(makeorderPickVo.getPickUser()); |
|||
makeorderPickVo.setPickUserName(pickUser.getUserName()); |
|||
SysUser applyUser = userMapper.selectUserByLoginName(makeorderPickVo.getApplyUser()); |
|||
makeorderPickVo.setApplyUserName(applyUser.getUserName()); |
|||
return makeorderPickVo; |
|||
} |
|||
|
|||
/** |
|||
* 查询生产领料单列表 |
|||
* |
|||
* @param makeorderPickVo 生产领料单 |
|||
* @return 生产领料单 |
|||
*/ |
|||
@Override |
|||
public List<SysMakeorderPickVo> selectSysMakeorderPickList(SysMakeorderPickVo makeorderPickVo) |
|||
{ |
|||
PageDomain pageDomain = TableSupport.buildPageRequest(); |
|||
Integer pageNum = pageDomain.getPageNum(); |
|||
Integer pageSize = pageDomain.getPageSize(); |
|||
|
|||
// PageHelper 仅对第一个 List 分页
|
|||
Page<SysMakeorderPickVo> list = (Page<SysMakeorderPickVo>) sysMakeorderPickMapper.selectSysMakeorderPickList(makeorderPickVo); |
|||
Page<SysMakeorderPickVo> returnList = new Page<>(); |
|||
for (SysMakeorderPickVo pickVo: list) { |
|||
SysUser sysUser = userMapper.selectUserByLoginName(pickVo.getCreateBy()); |
|||
if (sysUser != null) { |
|||
pickVo.setCreateUserName(sysUser.getUserName()); |
|||
} |
|||
SysUser sysUser2 = userMapper.selectUserByLoginName(pickVo.getApplyUser()); |
|||
if (sysUser2 != null) { |
|||
pickVo.setApplyUserName(sysUser2.getUserName()); |
|||
} |
|||
String instanceId = pickVo.getInstanceId(); |
|||
// 当前环节
|
|||
if (StringUtils.isNotBlank(instanceId)) { |
|||
List<Task> taskList = taskService.createTaskQuery() |
|||
.processInstanceId(instanceId) |
|||
// .singleResult();
|
|||
.list(); // 例如请假会签,会同时拥有多个任务
|
|||
if (!org.springframework.util.CollectionUtils.isEmpty(taskList)) { |
|||
TaskEntityImpl task = (TaskEntityImpl) taskList.get(0); |
|||
String taskId = task.getId(); |
|||
pickVo.setTaskId(taskId); |
|||
// 设置待办用户
|
|||
List<String> todoUserList = todoItemMapper.selectUndealTodoUserList(taskId); |
|||
if(!org.springframework.util.CollectionUtils.isEmpty(taskList)){ |
|||
pickVo.setTodoUserId(String.join(",",todoUserList)); |
|||
} |
|||
if (task.getSuspensionState() == 2) { |
|||
pickVo.setTaskName("已挂起"); |
|||
pickVo.setSuspendState("2"); |
|||
} else { |
|||
pickVo.setTaskName(task.getName()); |
|||
pickVo.setSuspendState("1"); |
|||
} |
|||
} else { |
|||
// 已办结或者已撤销
|
|||
pickVo.setTaskName("已结束"); |
|||
} |
|||
} else { |
|||
pickVo.setTaskName("未启动"); |
|||
} |
|||
returnList.add(pickVo); |
|||
} |
|||
returnList.setTotal(org.springframework.util.CollectionUtils.isEmpty(list) ? 0 : list.getTotal()); |
|||
returnList.setPageNum(pageNum); |
|||
returnList.setPageSize(pageSize); |
|||
return returnList; |
|||
} |
|||
|
|||
/** |
|||
* 新增生产领料单 |
|||
* |
|||
* @param sysMakeorderPick 生产领料单 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int insertSysMakeorderPick(SysMakeorderPick sysMakeorderPick) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
sysMakeorderPick.setCreateBy(loginName); |
|||
sysMakeorderPick.setCreateTime(DateUtils.getNowDate()); |
|||
// 生成编号,年月日规则
|
|||
String billNo = redisCache.generateBillNo("SCLL"); |
|||
sysMakeorderPick.setPickNo(billNo); |
|||
int id = sysMakeorderPickMapper.insertSysMakeorderPick(sysMakeorderPick); |
|||
// yjc todo 子表插入领料数量
|
|||
return id; |
|||
} |
|||
|
|||
/** |
|||
* 修改生产领料单 |
|||
* |
|||
* @param sysMakeorderPick 生产领料单 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int updateSysMakeorderPick(SysMakeorderPick sysMakeorderPick) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
sysMakeorderPick.setUpdateBy(loginName); |
|||
sysMakeorderPick.setUpdateTime(DateUtils.getNowDate()); |
|||
return sysMakeorderPickMapper.updateSysMakeorderPick(sysMakeorderPick); |
|||
} |
|||
|
|||
/** |
|||
* 删除生产领料单对象 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteSysMakeorderPickByIds(String ids) |
|||
{ |
|||
return sysMakeorderPickMapper.deleteSysMakeorderPickByIds(Convert.toStrArray(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 删除生产领料单信息 |
|||
* |
|||
* @param id 生产领料单ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteSysMakeorderPickById(Long id) |
|||
{ |
|||
return sysMakeorderPickMapper.deleteSysMakeorderPickById(id); |
|||
} |
|||
|
|||
/** |
|||
* 作废生产领料单 |
|||
* |
|||
* @param id 生产领料单ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int cancelSysMakeorderPickById(Long id) |
|||
{ |
|||
return sysMakeorderPickMapper.cancelSysMakeorderPickById(id); |
|||
} |
|||
|
|||
/** |
|||
* 恢复生产领料单信息 |
|||
* |
|||
* @param id 生产领料单ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int restoreSysMakeorderPickById(Long id) |
|||
{ |
|||
return sysMakeorderPickMapper.restoreSysMakeorderPickById(id); |
|||
} |
|||
|
|||
@Override |
|||
public ProcessInstance submitApply(SysMakeorderPick makeorderPick) { |
|||
SysUser user = ShiroUtils.getSysUser(); |
|||
makeorderPick.setApplyUser(user.getLoginName()); |
|||
makeorderPick.setApplyTime(DateUtils.getNowDate()); |
|||
//获取插入的Bom列表的id
|
|||
insertSysMakeorderPick(makeorderPick); |
|||
// 启动流程
|
|||
String applyTitle = user.getUserName()+"发起了生产领料单提交审批-"+DateUtils.dateTimeNow(); |
|||
String instanceType = "submit"; |
|||
ProcessInstance processInstance = startProcessInstance(applyTitle,instanceType,makeorderPick, user); |
|||
String processInstanceId = processInstance.getProcessInstanceId(); |
|||
// 提交实例id
|
|||
makeorderPick.setSubmitInstanceId(processInstanceId); |
|||
// 存在提交完就流程结束的情况
|
|||
boolean processIsFinish = processService.judgeProcessIsFinish(processInstanceId); |
|||
if(processIsFinish){ |
|||
// 审核状态-审核通过
|
|||
makeorderPick.setAuditStatus("1"); |
|||
} |
|||
sysMakeorderPickMapper.updateSysMakeorderPick(makeorderPick); |
|||
return processInstance; |
|||
} |
|||
|
|||
/** |
|||
* 创建erpBom审核流程 |
|||
* @param applyTitle |
|||
* @param instanceType |
|||
* @param makeorderPick |
|||
* @param user |
|||
* @return |
|||
*/ |
|||
private ProcessInstance startProcessInstance(String applyTitle, String instanceType, SysMakeorderPick makeorderPick, SysUser user) { |
|||
Long pickId = makeorderPick.getId(); |
|||
String businessKey = pickId.toString(); // 实体类 ID,作为流程的业务 key
|
|||
String key = "makeorderpick"; |
|||
Map<String,Object> variables = new HashMap<>(); |
|||
// 构造authority传参
|
|||
buildAuthority(user, variables); |
|||
makeorderPick.setApplyTitle(applyTitle); |
|||
// 启动流程
|
|||
ProcessInstance processInstance = processService.submitApply(user.getLoginName(), businessKey, applyTitle, makeorderPick.getPickNo(), key, variables); |
|||
String processInstanceId = processInstance.getId(); |
|||
makeorderPick.setInstanceId(processInstanceId); // 建立双向关系
|
|||
makeorderPick.setInstanceType(instanceType); |
|||
return processInstance; |
|||
} |
|||
|
|||
private void buildAuthority(SysUser user, Map<String, Object> variables) { |
|||
Set<String> roleKeys = roleService.selectRoleKeys(user.getUserId()); |
|||
// 角色不同审核人不同
|
|||
if(roleKeys.contains("scyRole")){ |
|||
variables.put("authority",1); |
|||
}else if(roleKeys.contains("scjlRole")){ |
|||
variables.put("authority",2); |
|||
}else if(roleKeys.contains("sczgRole")){ |
|||
variables.put("authority",3); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,161 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper |
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ruoyi.system.mapper.SysMakeorderPickMapper"> |
|||
|
|||
<resultMap type="SysMakeorderPickVo" id="SysMakeorderPickResult"> |
|||
<result property="id" column="id" /> |
|||
<result property="delFlag" column="del_flag" /> |
|||
<result property="createBy" column="create_by" /> |
|||
<result property="createTime" column="create_time" /> |
|||
<result property="updateBy" column="update_by" /> |
|||
<result property="updateTime" column="update_time" /> |
|||
<result property="remark" column="remark" /> |
|||
<result property="makeNo" column="make_no" /> |
|||
<result property="saleNo" column="sale_no" /> |
|||
<result property="pickNo" column="pick_no" /> |
|||
<result property="pickStatus" column="pick_status" /> |
|||
<result property="pickUser" column="pick_user" /> |
|||
<result property="auditStatus" column="audit_status" /> |
|||
<result property="instanceId" column="instance_id" /> |
|||
<result property="instanceType" column="instance_type" /> |
|||
<result property="instanceTypeName" column="instance_type_name" /> |
|||
<result property="submitInstanceId" column="submit_instance_id" /> |
|||
<result property="cancelInstanceId" column="cancel_instance_id" /> |
|||
<result property="restoreInstanceId" column="restore_instance_id" /> |
|||
<result property="applyTitle" column="apply_title" /> |
|||
<result property="applyUser" column="apply_user" /> |
|||
<result property="applyTime" column="apply_time" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectSysMakeorderPickVo"> |
|||
select id, del_flag, create_by, create_time, update_by, update_time, remark, make_no, sale_no, pick_no, pick_status, pick_user, audit_status, instance_id, instance_type, submit_instance_id, cancel_instance_id, restore_instance_id, apply_title, apply_user, apply_time from sys_makeorder_pick |
|||
</sql> |
|||
|
|||
<select id="selectSysMakeorderPickList" parameterType="SysMakeorderPick" resultMap="SysMakeorderPickResult"> |
|||
<include refid="selectSysMakeorderPickVo"/> |
|||
<where> |
|||
<if test="makeNo != null and makeNo != ''"> and make_no = #{makeNo}</if> |
|||
<if test="saleNo != null and saleNo != ''"> and sale_no = #{saleNo}</if> |
|||
<if test="pickNo != null and pickNo != ''"> and pick_no = #{pickNo}</if> |
|||
<if test="pickStatus != null and pickStatus != ''"> and pick_status = #{pickStatus}</if> |
|||
<if test="pickUser != null and pickUser != ''"> and pick_user = #{pickUser}</if> |
|||
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</if> |
|||
<if test="instanceId != null and instanceId != ''"> and instance_id = #{instanceId}</if> |
|||
<if test="instanceType != null and instanceType != ''"> and instance_type = #{instanceType}</if> |
|||
<if test="submitInstanceId != null and submitInstanceId != ''"> and submit_instance_id = #{submitInstanceId}</if> |
|||
<if test="cancelInstanceId != null and cancelInstanceId != ''"> and cancel_instance_id = #{cancelInstanceId}</if> |
|||
<if test="restoreInstanceId != null and restoreInstanceId != ''"> and restore_instance_id = #{restoreInstanceId}</if> |
|||
<if test="applyTitle != null and applyTitle != ''"> and apply_title = #{applyTitle}</if> |
|||
<if test="applyUser != null and applyUser != ''"> and apply_user = #{applyUser}</if> |
|||
<if test="applyTime != null "> and apply_time = #{applyTime}</if> |
|||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
|||
AND date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') |
|||
</if> |
|||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
|||
AND date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') |
|||
</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectSysMakeorderPickById" parameterType="Long" resultMap="SysMakeorderPickResult"> |
|||
<include refid="selectSysMakeorderPickVo"/> |
|||
where id = #{id} |
|||
</select> |
|||
|
|||
<insert id="insertSysMakeorderPick" parameterType="SysMakeorderPick" useGeneratedKeys="true" keyProperty="id"> |
|||
insert into sys_makeorder_pick |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="delFlag != null">del_flag,</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="remark != null">remark,</if> |
|||
<if test="makeNo != null">make_no,</if> |
|||
<if test="saleNo != null">sale_no,</if> |
|||
<if test="pickNo != null">pick_no,</if> |
|||
<if test="pickStatus != null">pick_status,</if> |
|||
<if test="pickUser != null">pick_user,</if> |
|||
<if test="auditStatus != null">audit_status,</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> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="delFlag != null">#{delFlag},</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="remark != null">#{remark},</if> |
|||
<if test="makeNo != null">#{makeNo},</if> |
|||
<if test="saleNo != null">#{saleNo},</if> |
|||
<if test="pickNo != null">#{pickNo},</if> |
|||
<if test="pickStatus != null">#{pickStatus},</if> |
|||
<if test="pickUser != null">#{pickUser},</if> |
|||
<if test="auditStatus != null">#{auditStatus},</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> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateSysMakeorderPick" parameterType="SysMakeorderPick"> |
|||
update sys_makeorder_pick |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="delFlag != null">del_flag = #{delFlag},</if> |
|||
<if test="createBy != null">create_by = #{createBy},</if> |
|||
<if test="createTime != null">create_time = #{createTime},</if> |
|||
<if test="updateBy != null">update_by = #{updateBy},</if> |
|||
<if test="updateTime != null">update_time = #{updateTime},</if> |
|||
<if test="remark != null">remark = #{remark},</if> |
|||
<if test="makeNo != null">make_no = #{makeNo},</if> |
|||
<if test="saleNo != null">sale_no = #{saleNo},</if> |
|||
<if test="pickNo != null">pick_no = #{pickNo},</if> |
|||
<if test="pickStatus != null">pick_status = #{pickStatus},</if> |
|||
<if test="pickUser != null">pick_user = #{pickUser},</if> |
|||
<if test="auditStatus != null">audit_status = #{auditStatus},</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> |
|||
</trim> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<delete id="deleteSysMakeorderPickById" parameterType="Long"> |
|||
delete from sys_makeorder_pick where id = #{id} |
|||
</delete> |
|||
|
|||
<delete id="deleteSysMakeorderPickByIds" parameterType="String"> |
|||
delete from sys_makeorder_pick where id in |
|||
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<update id="cancelSysMakeorderPickById" parameterType="Long"> |
|||
update sys_makeorder_pick set del_flag = '1' where id = #{id} |
|||
</update> |
|||
|
|||
<update id="restoreSysMakeorderPickById" parameterType="Long"> |
|||
update sys_makeorder_pick set del_flag = '0' where id = #{id} |
|||
</update> |
|||
|
|||
</mapper> |
@ -0,0 +1,54 @@ |
|||
<!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-makeorderpick-add"> |
|||
<input class="form-control" name="id" type="hidden"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">生产订单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="makeNo" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">关联销售订单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="saleNo" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">业务员:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="pickUser" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<!--缺订单类型--> |
|||
<!--缺表格--> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "system/makeorderpick" |
|||
$("#form-makeorderpick-add").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/add", $('#form-makeorderpick-add').serialize()); |
|||
} |
|||
} |
|||
|
|||
$("input[name='applyTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,61 @@ |
|||
<!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-makeorderpick-edit" th:object="${sysMakeorderPick}"> |
|||
<input name="id" th:field="*{id}" type="hidden"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">生产订单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="makeNo" th:field="*{makeNo}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">关联销售订单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="saleNo" th:field="*{saleNo}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">生产领料单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="pickNo" th:field="*{pickNo}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">领料员:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="pickUser" th:field="*{pickUser}" class="form-control hidden" type="text" readonly> |
|||
<input name="pickUserName" th:field="*{pickUserName}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<!--缺订单类型--> |
|||
<!--缺表格--> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "system/makeorderpick"; |
|||
$("#form-makeorderpick-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/edit", $('#form-makeorderpick-edit').serialize()); |
|||
} |
|||
} |
|||
|
|||
$("input[name='applyTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,61 @@ |
|||
<!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-makeorderpick-edit" th:object="${sysMakeorderPick}"> |
|||
<input name="id" th:field="*{id}" type="hidden"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">生产订单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="makeNo" th:field="*{makeNo}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">关联销售订单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="saleNo" th:field="*{saleNo}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">生产领料单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="pickNo" th:field="*{pickNo}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">领料员:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="pickUser" th:field="*{pickUser}" class="form-control hidden" type="text" readonly> |
|||
<input name="pickUserName" th:field="*{pickUserName}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<!--缺订单类型--> |
|||
<!--缺表格--> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "system/makeorderpick"; |
|||
$("#form-makeorderpick-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/edit", $('#form-makeorderpick-edit').serialize()); |
|||
} |
|||
} |
|||
|
|||
$("input[name='applyTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,218 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> |
|||
<head> |
|||
<th:block th:include="include :: header('生产领料单列表')" /> |
|||
</head> |
|||
<body class="gray-bg"> |
|||
<div class="container-div"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 search-collapse"> |
|||
<form id="formId"> |
|||
<div class="select-list"> |
|||
<ul> |
|||
<li> |
|||
<label>生产领料单号:</label> |
|||
<input type="text" name="pickNo"/> |
|||
</li> |
|||
<li> |
|||
<label>关联销售订单号:</label> |
|||
<input type="text" name="saleNo"/> |
|||
</li> |
|||
<li> |
|||
<label>领料员:</label> |
|||
<input type="text" name="pickUser"/> |
|||
</li> |
|||
<li class="select-time"> |
|||
<label>创建时间: </label> |
|||
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/> |
|||
<span>-</span> |
|||
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/> |
|||
</li> |
|||
<li> |
|||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
|||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
|
|||
<div class="btn-group-sm" id="toolbar" role="group"> |
|||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:makeorderpick:add"> |
|||
<i class="fa fa-plus"></i> 添加 |
|||
</a> |
|||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:makeorderpick:edit"> |
|||
<i class="fa fa-edit"></i> 修改 |
|||
</a> |
|||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:makeorderpick:remove"> |
|||
<i class="fa fa-remove"></i> 删除 |
|||
</a> |
|||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:makeorderpick:export"> |
|||
<i class="fa fa-download"></i> 导出 |
|||
</a> |
|||
</div> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-table"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:src="@{/js/activiti.js}"></script> |
|||
<script th:inline="javascript"> |
|||
var editFlag = [[${@permission.hasPermi('system:makeorderpick:edit')}]]; |
|||
var removeFlag = [[${@permission.hasPermi('system:makeorderpick:remove')}]]; |
|||
var cancelFlag = [[${@permission.hasPermi('system:makeorderpick:cancel')}]]; |
|||
var restoreFlag = [[${@permission.hasPermi('system:makeorderpick:restore')}]]; |
|||
var pickStatusDatas = [[${@dict.getType('pickStatus')}]]; |
|||
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; |
|||
var currentUser = [[${currentUser}]]; |
|||
var loginName = currentUser.loginName; |
|||
var prefix = ctx + "system/makeorderpick"; |
|||
|
|||
$(function() { |
|||
var options = { |
|||
url: prefix + "/list", |
|||
createUrl: prefix + "/add", |
|||
updateUrl: prefix + "/edit/{id}", |
|||
removeUrl: prefix + "/remove", |
|||
detailUrl: prefix + "/detail/{id}", |
|||
cancelUrl: prefix + "/cancel/{id}", |
|||
restoreUrl: prefix + "/restore/{id}", |
|||
exportUrl: prefix + "/export", |
|||
modalName: "生产领料单", |
|||
fixedColumns: true, |
|||
fixedNumber: 1, |
|||
fixedRightNumber: 1, |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
title: '主键ID', |
|||
field: 'id', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'instanceId', |
|||
title: '流程实例ID', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'submitInstanceId', |
|||
title: '流程提交实例ID', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'cancelInstanceId', |
|||
title: '流程作废实例ID', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'restoreInstanceId', |
|||
title: '流程恢复实例ID', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'instanceTypeName', |
|||
title: '流程实例类型', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'applyUser', |
|||
title: '申请人ID', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'applyUserName', |
|||
title: '<span style="color: red;">申请人</span>', |
|||
formatter: function(value, row, index) { |
|||
return '<span style="color: red;">' + (value ? value : "-") + '</span>'; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'applyTime', |
|||
title: '申请时间' |
|||
}, |
|||
{ |
|||
field: 'taskId', |
|||
title: '当前任务ID', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'todoUserId', |
|||
title: '待办用户ID', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'taskName', |
|||
title: '当前任务名称', |
|||
align: 'center', |
|||
formatter: function(value, row, index) { |
|||
return '<span class="badge badge-primary">' + value + '</span>'; |
|||
} |
|||
}, |
|||
{ |
|||
title: '生产订单号', |
|||
field: 'makeNo', |
|||
}, |
|||
{ |
|||
title: '关联销售订单号', |
|||
field: 'saleNo', |
|||
}, |
|||
{ |
|||
title: '生产领料单号', |
|||
field: 'pickNo', |
|||
}, |
|||
{ |
|||
title: '领料状态', |
|||
field: 'pickStatus', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(pickStatusDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
title: '领料员', |
|||
field: 'pickUser', |
|||
}, |
|||
{ |
|||
title: '审核状态', |
|||
field: 'auditStatus', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(auditStatusDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
title: '操作', |
|||
align: 'center', |
|||
formatter: function(value, row, index) { |
|||
var actions = []; |
|||
// 审核状态-审核通过 |
|||
if(row.auditStatus=="1"){ |
|||
// 编辑 |
|||
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i> 编辑</a> '); |
|||
} |
|||
// 有流程实例id |
|||
if (row.instanceId) { |
|||
// 有待办人展示审批按钮, |
|||
if (row.todoUserId) { |
|||
var todoUserIdList = row.todoUserId.split(","); |
|||
if(todoUserIdList.includes(loginName) || loginName == 'admin'){ |
|||
var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批'; |
|||
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="showVerifyDialog(\'' + prefix + '\',\'' + row.taskId + '\', \'' + row.taskName+"-"+"申请" + '\')"><i class="fa fa-edit"></i> '+nodeName+'</a> '); |
|||
} |
|||
} |
|||
// 审批历史 |
|||
actions.push('<a class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="showHistoryDialog(\'' + row.instanceId + '\')"><i class="fa fa-list"></i> 审批历史</a> '); |
|||
// 进度查看 |
|||
actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="showProcessImgDialog(\'' + row.instanceId + '\')"><i class="fa fa-image"></i> 进度查看</a> '); |
|||
} |
|||
// 详情 |
|||
actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-eye"></i> 详情</a> '); |
|||
return actions.join(''); |
|||
} |
|||
}] |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,96 @@ |
|||
<!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-makeorderpick-edit" th:object="${formData}"> |
|||
<input name="id" th:field="*{id}" type="hidden"> |
|||
<input name="taskId" th:field="*{taskId}" type="hidden"> |
|||
<!--驳回调整允许更新内容--> |
|||
<input type="hidden" name="saveEntity" value="true" /> |
|||
<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"> |
|||
<label class="col-sm-3 control-label">生产订单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="makeNo" th:field="*{makeNo}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">关联销售订单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="saleNo" th:field="*{saleNo}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">生产领料单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="pickNo" th:field="*{pickNo}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">领料员:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="pickUser" th:field="*{pickUser}" class="form-control hidden" type="text" readonly> |
|||
<input name="pickUserName" th:field="*{pickUserName}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<!--缺订单类型--> |
|||
<!--缺表格--> |
|||
<hr /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label" for="reApply">是否继续申请:</label> |
|||
<div class="col-sm-8"> |
|||
<select id="reApply" name="p_B_reApply" class="form-control m-b"> |
|||
<option value="true">重新申请</option> |
|||
<!-- <option value="false">结束流程</option>--> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "system/makeorderpick"; |
|||
$("#form-makeorderpick-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
var taskId = [[${taskId}]]; |
|||
$.operate.save(prefix + "/complete/" + taskId, $('#form-makeorderpick-edit').serialize()); |
|||
} |
|||
} |
|||
|
|||
$("input[name='applyTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,105 @@ |
|||
<!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-makeorderpick-edit" th:object="${formData}"> |
|||
<input name="id" th:field="*{id}" type="hidden"> |
|||
<input name="taskId" th:field="*{taskId}" type="hidden"> |
|||
<input type="hidden" name="p_COM_comment" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">申请人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="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"> |
|||
<label class="col-sm-3 control-label">生产订单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="makeNo" th:field="*{makeNo}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">关联销售订单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="saleNo" th:field="*{saleNo}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">生产领料单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="pickNo" th:field="*{pickNo}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">领料员:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="pickUser" th:field="*{pickUser}" class="form-control hidden" type="text" readonly> |
|||
<input name="pickUserName" th:field="*{pickUserName}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<!--缺订单类型--> |
|||
<!--缺表格--> |
|||
<hr /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label" for="scjlVerifyApproved"><span style="color: red; ">*</span>审批意见:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="p_B_scjlVerifyApproved" id="scjlVerifyApproved" class="form-control m-b" required> |
|||
<option value=""></option> |
|||
<option value="true">同意</option> |
|||
<option value="false">拒绝</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">批注:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="comment" class="form-control"></textarea> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "system/makeorderpick"; |
|||
$("#form-makeorderpick-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
if ($('textarea[name="comment"]').val()) { |
|||
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val()); |
|||
} |
|||
var taskId = [[${taskId}]]; |
|||
$.operate.save(prefix + "/complete/" + taskId, $('#form-makeorderpick-edit').serialize()); |
|||
} |
|||
} |
|||
|
|||
$("input[name='applyTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,105 @@ |
|||
<!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-makeorderpick-edit" th:object="${formData}"> |
|||
<input name="id" th:field="*{id}" type="hidden"> |
|||
<input name="taskId" th:field="*{taskId}" type="hidden"> |
|||
<input type="hidden" name="p_COM_comment" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">申请人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="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"> |
|||
<label class="col-sm-3 control-label">生产订单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="makeNo" th:field="*{makeNo}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">关联销售订单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="saleNo" th:field="*{saleNo}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">生产领料单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="pickNo" th:field="*{pickNo}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">领料员:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="pickUser" th:field="*{pickUser}" class="form-control hidden" type="text" readonly> |
|||
<input name="pickUserName" th:field="*{pickUserName}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<!--缺订单类型--> |
|||
<!--缺表格--> |
|||
<hr /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label" for="sczgVerifyApproved"><span style="color: red; ">*</span>审批意见:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="p_B_sczgVerifyApproved" id="sczgVerifyApproved" class="form-control m-b" required> |
|||
<option value=""></option> |
|||
<option value="true">同意</option> |
|||
<option value="false">拒绝</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">批注:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="comment" class="form-control"></textarea> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "system/makeorderpick"; |
|||
$("#form-makeorderpick-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
if ($('textarea[name="comment"]').val()) { |
|||
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val()); |
|||
} |
|||
var taskId = [[${taskId}]]; |
|||
$.operate.save(prefix + "/complete/" + taskId, $('#form-makeorderpick-edit').serialize()); |
|||
} |
|||
} |
|||
|
|||
$("input[name='applyTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue