youjianchi
7 months ago
26 changed files with 3492 additions and 0 deletions
@ -0,0 +1,151 @@ |
|||
package com.ruoyi.erp.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.erp.domain.ErpMaterialReturnInspection; |
|||
import com.ruoyi.erp.service.IErpMaterialReturnInspectionService; |
|||
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-05-06 |
|||
*/ |
|||
@Controller |
|||
@RequestMapping("/erp/materialReturnInspection") |
|||
public class ErpMaterialReturnInspectionController extends BaseController |
|||
{ |
|||
private String prefix = "erp/materialReturnInspection"; |
|||
|
|||
@Autowired |
|||
private IErpMaterialReturnInspectionService erpMaterialReturnInspectionService; |
|||
|
|||
@RequiresPermissions("erp:materialReturnInspection:view") |
|||
@GetMapping() |
|||
public String materialReturnInspection() |
|||
{ |
|||
return prefix + "/materialReturnInspection"; |
|||
} |
|||
|
|||
/** |
|||
* 查询物料退检单列表 |
|||
*/ |
|||
@RequiresPermissions("erp:materialReturnInspection:list") |
|||
@PostMapping("/list") |
|||
@ResponseBody |
|||
public TableDataInfo list(ErpMaterialReturnInspection erpMaterialReturnInspection) |
|||
{ |
|||
startPage(); |
|||
List<ErpMaterialReturnInspection> list = erpMaterialReturnInspectionService.selectErpMaterialReturnInspectionList(erpMaterialReturnInspection); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
/** |
|||
* 导出物料退检单列表 |
|||
*/ |
|||
@RequiresPermissions("erp:materialReturnInspection:export") |
|||
@Log(title = "物料退检单", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
@ResponseBody |
|||
public AjaxResult export(ErpMaterialReturnInspection erpMaterialReturnInspection) |
|||
{ |
|||
List<ErpMaterialReturnInspection> list = erpMaterialReturnInspectionService.selectErpMaterialReturnInspectionList(erpMaterialReturnInspection); |
|||
ExcelUtil<ErpMaterialReturnInspection> util = new ExcelUtil<ErpMaterialReturnInspection>(ErpMaterialReturnInspection.class); |
|||
return util.exportExcel(list, "物料退检单数据"); |
|||
} |
|||
|
|||
/** |
|||
* 新增物料退检单 |
|||
*/ |
|||
@GetMapping("/add") |
|||
public String add() |
|||
{ |
|||
return prefix + "/add"; |
|||
} |
|||
|
|||
/** |
|||
* 新增保存物料退检单 |
|||
*/ |
|||
@RequiresPermissions("erp:materialReturnInspection:add") |
|||
@Log(title = "物料退检单", businessType = BusinessType.INSERT) |
|||
@PostMapping("/add") |
|||
@ResponseBody |
|||
public AjaxResult addSave(ErpMaterialReturnInspection erpMaterialReturnInspection) |
|||
{ |
|||
return toAjax(erpMaterialReturnInspectionService.insertErpMaterialReturnInspection(erpMaterialReturnInspection)); |
|||
} |
|||
|
|||
/** |
|||
* 修改物料退检单 |
|||
*/ |
|||
@GetMapping("/edit/{id}") |
|||
public String edit(@PathVariable("id") Long id, ModelMap mmap) |
|||
{ |
|||
ErpMaterialReturnInspection erpMaterialReturnInspection = erpMaterialReturnInspectionService.selectErpMaterialReturnInspectionById(id); |
|||
mmap.put("erpMaterialReturnInspection", erpMaterialReturnInspection); |
|||
return prefix + "/edit"; |
|||
} |
|||
|
|||
/** |
|||
* 修改保存物料退检单 |
|||
*/ |
|||
@RequiresPermissions("erp:materialReturnInspection:edit") |
|||
@Log(title = "物料退检单", businessType = BusinessType.UPDATE) |
|||
@PostMapping("/edit") |
|||
@ResponseBody |
|||
public AjaxResult editSave(ErpMaterialReturnInspection erpMaterialReturnInspection) |
|||
{ |
|||
return toAjax(erpMaterialReturnInspectionService.updateErpMaterialReturnInspection(erpMaterialReturnInspection)); |
|||
} |
|||
|
|||
/** |
|||
* 删除物料退检单 |
|||
*/ |
|||
@RequiresPermissions("erp:materialReturnInspection:remove") |
|||
@Log(title = "物料退检单", businessType = BusinessType.DELETE) |
|||
@PostMapping( "/remove") |
|||
@ResponseBody |
|||
public AjaxResult remove(String ids) |
|||
{ |
|||
return toAjax(erpMaterialReturnInspectionService.deleteErpMaterialReturnInspectionByIds(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 作废物料退检单 |
|||
*/ |
|||
@RequiresPermissions("erp:materialReturnInspection:cancel") |
|||
@Log(title = "物料退检单", businessType = BusinessType.CANCEL) |
|||
@GetMapping( "/cancel/{id}") |
|||
@ResponseBody |
|||
public AjaxResult cancel(@PathVariable("id") Long id){ |
|||
return toAjax(erpMaterialReturnInspectionService.cancelErpMaterialReturnInspectionById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 恢复物料退检单 |
|||
*/ |
|||
@RequiresPermissions("erp:materialReturnInspection:restore") |
|||
@Log(title = "物料退检单", businessType = BusinessType.RESTORE) |
|||
@GetMapping( "/restore/{id}") |
|||
@ResponseBody |
|||
public AjaxResult restore(@PathVariable("id")Long id) |
|||
{ |
|||
return toAjax(erpMaterialReturnInspectionService.restoreErpMaterialReturnInspectionById(id)); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,151 @@ |
|||
package com.ruoyi.erp.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.erp.domain.ErpMaterialReturnInspectionDetail; |
|||
import com.ruoyi.erp.service.IErpMaterialReturnInspectionDetailService; |
|||
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-05-06 |
|||
*/ |
|||
@Controller |
|||
@RequestMapping("/erp/materialReturnInspectionDetail") |
|||
public class ErpMaterialReturnInspectionDetailController extends BaseController |
|||
{ |
|||
private String prefix = "erp/materialReturnInspectionDetail"; |
|||
|
|||
@Autowired |
|||
private IErpMaterialReturnInspectionDetailService erpMaterialReturnInspectionDetailService; |
|||
|
|||
@RequiresPermissions("erp:materialReturnInspectionDetail:view") |
|||
@GetMapping() |
|||
public String materialReturnInspectionDetail() |
|||
{ |
|||
return prefix + "/materialReturnInspectionDetail"; |
|||
} |
|||
|
|||
/** |
|||
* 查询物料退检单明细列表 |
|||
*/ |
|||
// @RequiresPermissions("erp:materialReturnInspectionDetail:list")
|
|||
@PostMapping("/list") |
|||
@ResponseBody |
|||
public TableDataInfo list(ErpMaterialReturnInspectionDetail erpMaterialReturnInspectionDetail) |
|||
{ |
|||
startPage(); |
|||
List<ErpMaterialReturnInspectionDetail> list = erpMaterialReturnInspectionDetailService.selectErpMaterialReturnInspectionDetailList(erpMaterialReturnInspectionDetail); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
/** |
|||
* 导出物料退检单明细列表 |
|||
*/ |
|||
@RequiresPermissions("erp:materialReturnInspectionDetail:export") |
|||
@Log(title = "物料退检单明细", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
@ResponseBody |
|||
public AjaxResult export(ErpMaterialReturnInspectionDetail erpMaterialReturnInspectionDetail) |
|||
{ |
|||
List<ErpMaterialReturnInspectionDetail> list = erpMaterialReturnInspectionDetailService.selectErpMaterialReturnInspectionDetailList(erpMaterialReturnInspectionDetail); |
|||
ExcelUtil<ErpMaterialReturnInspectionDetail> util = new ExcelUtil<ErpMaterialReturnInspectionDetail>(ErpMaterialReturnInspectionDetail.class); |
|||
return util.exportExcel(list, "物料退检单明细数据"); |
|||
} |
|||
|
|||
/** |
|||
* 新增物料退检单明细 |
|||
*/ |
|||
@GetMapping("/add") |
|||
public String add() |
|||
{ |
|||
return prefix + "/add"; |
|||
} |
|||
|
|||
/** |
|||
* 新增保存物料退检单明细 |
|||
*/ |
|||
@RequiresPermissions("erp:materialReturnInspectionDetail:add") |
|||
@Log(title = "物料退检单明细", businessType = BusinessType.INSERT) |
|||
@PostMapping("/add") |
|||
@ResponseBody |
|||
public AjaxResult addSave(ErpMaterialReturnInspectionDetail erpMaterialReturnInspectionDetail) |
|||
{ |
|||
return toAjax(erpMaterialReturnInspectionDetailService.insertErpMaterialReturnInspectionDetail(erpMaterialReturnInspectionDetail)); |
|||
} |
|||
|
|||
/** |
|||
* 修改物料退检单明细 |
|||
*/ |
|||
@GetMapping("/edit/{id}") |
|||
public String edit(@PathVariable("id") Long id, ModelMap mmap) |
|||
{ |
|||
ErpMaterialReturnInspectionDetail erpMaterialReturnInspectionDetail = erpMaterialReturnInspectionDetailService.selectErpMaterialReturnInspectionDetailById(id); |
|||
mmap.put("erpMaterialReturnInspectionDetail", erpMaterialReturnInspectionDetail); |
|||
return prefix + "/edit"; |
|||
} |
|||
|
|||
/** |
|||
* 修改保存物料退检单明细 |
|||
*/ |
|||
@RequiresPermissions("erp:materialReturnInspectionDetail:edit") |
|||
@Log(title = "物料退检单明细", businessType = BusinessType.UPDATE) |
|||
@PostMapping("/edit") |
|||
@ResponseBody |
|||
public AjaxResult editSave(ErpMaterialReturnInspectionDetail erpMaterialReturnInspectionDetail) |
|||
{ |
|||
return toAjax(erpMaterialReturnInspectionDetailService.updateErpMaterialReturnInspectionDetail(erpMaterialReturnInspectionDetail)); |
|||
} |
|||
|
|||
/** |
|||
* 删除物料退检单明细 |
|||
*/ |
|||
@RequiresPermissions("erp:materialReturnInspectionDetail:remove") |
|||
@Log(title = "物料退检单明细", businessType = BusinessType.DELETE) |
|||
@PostMapping( "/remove") |
|||
@ResponseBody |
|||
public AjaxResult remove(String ids) |
|||
{ |
|||
return toAjax(erpMaterialReturnInspectionDetailService.deleteErpMaterialReturnInspectionDetailByIds(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 作废物料退检单明细 |
|||
*/ |
|||
@RequiresPermissions("erp:materialReturnInspectionDetail:cancel") |
|||
@Log(title = "物料退检单明细", businessType = BusinessType.CANCEL) |
|||
@GetMapping( "/cancel/{id}") |
|||
@ResponseBody |
|||
public AjaxResult cancel(@PathVariable("id") Long id){ |
|||
return toAjax(erpMaterialReturnInspectionDetailService.cancelErpMaterialReturnInspectionDetailById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 恢复物料退检单明细 |
|||
*/ |
|||
@RequiresPermissions("erp:materialReturnInspectionDetail:restore") |
|||
@Log(title = "物料退检单明细", businessType = BusinessType.RESTORE) |
|||
@GetMapping( "/restore/{id}") |
|||
@ResponseBody |
|||
public AjaxResult restore(@PathVariable("id")Long id) |
|||
{ |
|||
return toAjax(erpMaterialReturnInspectionDetailService.restoreErpMaterialReturnInspectionDetailById(id)); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,169 @@ |
|||
package com.ruoyi.erp.domain; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
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; |
|||
|
|||
/** |
|||
* 物料退检单对象 erp_material_return_inspection |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-05-06 |
|||
*/ |
|||
public class ErpMaterialReturnInspection extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 主键ID */ |
|||
private Long id; |
|||
|
|||
/** 删除标志(0代表存在 1代表删除) */ |
|||
private String delFlag; |
|||
|
|||
/** 退检单号 */ |
|||
@Excel(name = "退检单号") |
|||
private String returnInspectionNo; |
|||
|
|||
/** 关联生产单号 */ |
|||
@Excel(name = "关联生产单号") |
|||
private String makeNo; |
|||
|
|||
/** 退料时间 */ |
|||
@JsonFormat(pattern = "yyyy-MM-dd") |
|||
@Excel(name = "退料时间", width = 30, dateFormat = "yyyy-MM-dd") |
|||
private Date returnMaterialTime; |
|||
|
|||
/** 紧急程度 */ |
|||
@Excel(name = "紧急程度") |
|||
private String urgencyLevel; |
|||
|
|||
/** 是否结案 */ |
|||
@Excel(name = "是否结案") |
|||
private String isClosed; |
|||
|
|||
// 退检类型
|
|||
private String returnInspectionType; |
|||
private String materialNo; |
|||
private String materialName; |
|||
|
|||
private List<ErpMaterialReturnInspectionDetail> inspectionDetails; |
|||
|
|||
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 setReturnInspectionNo(String returnInspectionNo) |
|||
{ |
|||
this.returnInspectionNo = returnInspectionNo; |
|||
} |
|||
|
|||
public String getReturnInspectionNo() |
|||
{ |
|||
return returnInspectionNo; |
|||
} |
|||
public void setMakeNo(String makeNo) |
|||
{ |
|||
this.makeNo = makeNo; |
|||
} |
|||
|
|||
public String getMakeNo() |
|||
{ |
|||
return makeNo; |
|||
} |
|||
public void setReturnMaterialTime(Date returnMaterialTime) |
|||
{ |
|||
this.returnMaterialTime = returnMaterialTime; |
|||
} |
|||
|
|||
public Date getReturnMaterialTime() |
|||
{ |
|||
return returnMaterialTime; |
|||
} |
|||
public void setUrgencyLevel(String urgencyLevel) |
|||
{ |
|||
this.urgencyLevel = urgencyLevel; |
|||
} |
|||
|
|||
public String getUrgencyLevel() |
|||
{ |
|||
return urgencyLevel; |
|||
} |
|||
public void setIsClosed(String isClosed) |
|||
{ |
|||
this.isClosed = isClosed; |
|||
} |
|||
|
|||
public String getIsClosed() |
|||
{ |
|||
return isClosed; |
|||
} |
|||
|
|||
public String getReturnInspectionType() { |
|||
return returnInspectionType; |
|||
} |
|||
|
|||
public void setReturnInspectionType(String returnInspectionType) { |
|||
this.returnInspectionType = returnInspectionType; |
|||
} |
|||
|
|||
public String getMaterialNo() { |
|||
return materialNo; |
|||
} |
|||
|
|||
public void setMaterialNo(String materialNo) { |
|||
this.materialNo = materialNo; |
|||
} |
|||
|
|||
public String getMaterialName() { |
|||
return materialName; |
|||
} |
|||
|
|||
public void setMaterialName(String materialName) { |
|||
this.materialName = materialName; |
|||
} |
|||
|
|||
public List<ErpMaterialReturnInspectionDetail> getInspectionDetails() { |
|||
return inspectionDetails; |
|||
} |
|||
|
|||
public void setInspectionDetails(List<ErpMaterialReturnInspectionDetail> inspectionDetails) { |
|||
this.inspectionDetails = inspectionDetails; |
|||
} |
|||
|
|||
@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("returnInspectionNo", getReturnInspectionNo()) |
|||
.append("makeNo", getMakeNo()) |
|||
.append("returnMaterialTime", getReturnMaterialTime()) |
|||
.append("urgencyLevel", getUrgencyLevel()) |
|||
.append("isClosed", getIsClosed()) |
|||
.toString(); |
|||
} |
|||
} |
@ -0,0 +1,296 @@ |
|||
package com.ruoyi.erp.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; |
|||
|
|||
/** |
|||
* 物料退检单明细对象 erp_material_return_inspection_detail |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-05-06 |
|||
*/ |
|||
public class ErpMaterialReturnInspectionDetail extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 主键ID */ |
|||
private Long id; |
|||
|
|||
/** 删除标志(0代表存在 1代表删除) */ |
|||
private String delFlag; |
|||
|
|||
/** 退检单号 */ |
|||
@Excel(name = "退检单号") |
|||
private String returnInspectionNo; |
|||
|
|||
/** 料号 */ |
|||
@Excel(name = "料号") |
|||
private String materialNo; |
|||
|
|||
/** 物料名称 */ |
|||
@Excel(name = "物料名称") |
|||
private String materialName; |
|||
|
|||
/** 物料类型 */ |
|||
@Excel(name = "物料类型") |
|||
private String materialType; |
|||
|
|||
/** 加工方式 */ |
|||
@Excel(name = "加工方式") |
|||
private String processMethod; |
|||
|
|||
/** 单位 */ |
|||
@Excel(name = "单位") |
|||
private String unit; |
|||
|
|||
/** 品牌 */ |
|||
@Excel(name = "品牌") |
|||
private String brand; |
|||
|
|||
/** 描述 */ |
|||
@Excel(name = "描述") |
|||
private String describe; |
|||
|
|||
/** 订单用量 */ |
|||
@Excel(name = "订单用量") |
|||
private Long orderNum; |
|||
|
|||
/** 退检数量 */ |
|||
@Excel(name = "退检数量") |
|||
private Long returnInspectionNum; |
|||
|
|||
/** 退检类型 */ |
|||
@Excel(name = "退检类型") |
|||
private String returnInspectionType; |
|||
|
|||
/** 紧急程度 */ |
|||
@Excel(name = "紧急程度") |
|||
private String urgencyLevel; |
|||
|
|||
/** 领料时间 */ |
|||
@JsonFormat(pattern = "yyyy-MM-dd") |
|||
@Excel(name = "领料时间", width = 30, dateFormat = "yyyy-MM-dd") |
|||
private Date pickMaterialTime; |
|||
|
|||
/** 退检备注 */ |
|||
@Excel(name = "退检备注") |
|||
private String returnInspectionRemark; |
|||
|
|||
/** 异常原因 */ |
|||
@Excel(name = "异常原因") |
|||
private String abnormalCause; |
|||
|
|||
/** 责任单位 */ |
|||
@Excel(name = "责任单位") |
|||
private String dutyUnit; |
|||
|
|||
/** 复检备注 */ |
|||
@Excel(name = "复检备注") |
|||
private String recheckRemark; |
|||
|
|||
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 setReturnInspectionNo(String returnInspectionNo) |
|||
{ |
|||
this.returnInspectionNo = returnInspectionNo; |
|||
} |
|||
|
|||
public String getReturnInspectionNo() |
|||
{ |
|||
return returnInspectionNo; |
|||
} |
|||
public void setMaterialNo(String materialNo) |
|||
{ |
|||
this.materialNo = materialNo; |
|||
} |
|||
|
|||
public String getMaterialNo() |
|||
{ |
|||
return materialNo; |
|||
} |
|||
public void setMaterialName(String materialName) |
|||
{ |
|||
this.materialName = materialName; |
|||
} |
|||
|
|||
public String getMaterialName() |
|||
{ |
|||
return materialName; |
|||
} |
|||
public void setMaterialType(String materialType) |
|||
{ |
|||
this.materialType = materialType; |
|||
} |
|||
|
|||
public String getMaterialType() |
|||
{ |
|||
return materialType; |
|||
} |
|||
public void setProcessMethod(String processMethod) |
|||
{ |
|||
this.processMethod = processMethod; |
|||
} |
|||
|
|||
public String getProcessMethod() |
|||
{ |
|||
return processMethod; |
|||
} |
|||
public void setUnit(String unit) |
|||
{ |
|||
this.unit = unit; |
|||
} |
|||
|
|||
public String getUnit() |
|||
{ |
|||
return unit; |
|||
} |
|||
public void setBrand(String brand) |
|||
{ |
|||
this.brand = brand; |
|||
} |
|||
|
|||
public String getBrand() |
|||
{ |
|||
return brand; |
|||
} |
|||
public void setDescribe(String describe) |
|||
{ |
|||
this.describe = describe; |
|||
} |
|||
|
|||
public String getDescribe() |
|||
{ |
|||
return describe; |
|||
} |
|||
public void setOrderNum(Long orderNum) |
|||
{ |
|||
this.orderNum = orderNum; |
|||
} |
|||
|
|||
public Long getOrderNum() |
|||
{ |
|||
return orderNum; |
|||
} |
|||
public void setReturnInspectionNum(Long returnInspectionNum) |
|||
{ |
|||
this.returnInspectionNum = returnInspectionNum; |
|||
} |
|||
|
|||
public Long getReturnInspectionNum() |
|||
{ |
|||
return returnInspectionNum; |
|||
} |
|||
public void setReturnInspectionType(String returnInspectionType) |
|||
{ |
|||
this.returnInspectionType = returnInspectionType; |
|||
} |
|||
|
|||
public String getReturnInspectionType() |
|||
{ |
|||
return returnInspectionType; |
|||
} |
|||
public void setUrgencyLevel(String urgencyLevel) |
|||
{ |
|||
this.urgencyLevel = urgencyLevel; |
|||
} |
|||
|
|||
public String getUrgencyLevel() |
|||
{ |
|||
return urgencyLevel; |
|||
} |
|||
public void setPickMaterialTime(Date pickMaterialTime) |
|||
{ |
|||
this.pickMaterialTime = pickMaterialTime; |
|||
} |
|||
|
|||
public Date getPickMaterialTime() |
|||
{ |
|||
return pickMaterialTime; |
|||
} |
|||
public void setReturnInspectionRemark(String returnInspectionRemark) |
|||
{ |
|||
this.returnInspectionRemark = returnInspectionRemark; |
|||
} |
|||
|
|||
public String getReturnInspectionRemark() |
|||
{ |
|||
return returnInspectionRemark; |
|||
} |
|||
public void setAbnormalCause(String abnormalCause) |
|||
{ |
|||
this.abnormalCause = abnormalCause; |
|||
} |
|||
|
|||
public String getAbnormalCause() |
|||
{ |
|||
return abnormalCause; |
|||
} |
|||
public void setDutyUnit(String dutyUnit) |
|||
{ |
|||
this.dutyUnit = dutyUnit; |
|||
} |
|||
|
|||
public String getDutyUnit() |
|||
{ |
|||
return dutyUnit; |
|||
} |
|||
public void setRecheckRemark(String recheckRemark) |
|||
{ |
|||
this.recheckRemark = recheckRemark; |
|||
} |
|||
|
|||
public String getRecheckRemark() |
|||
{ |
|||
return recheckRemark; |
|||
} |
|||
|
|||
@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("returnInspectionNo", getReturnInspectionNo()) |
|||
.append("materialNo", getMaterialNo()) |
|||
.append("materialName", getMaterialName()) |
|||
.append("materialType", getMaterialType()) |
|||
.append("processMethod", getProcessMethod()) |
|||
.append("unit", getUnit()) |
|||
.append("brand", getBrand()) |
|||
.append("describe", getDescribe()) |
|||
.append("orderNum", getOrderNum()) |
|||
.append("returnInspectionNum", getReturnInspectionNum()) |
|||
.append("returnInspectionType", getReturnInspectionType()) |
|||
.append("urgencyLevel", getUrgencyLevel()) |
|||
.append("pickMaterialTime", getPickMaterialTime()) |
|||
.append("returnInspectionRemark", getReturnInspectionRemark()) |
|||
.append("abnormalCause", getAbnormalCause()) |
|||
.append("dutyUnit", getDutyUnit()) |
|||
.append("recheckRemark", getRecheckRemark()) |
|||
.toString(); |
|||
} |
|||
} |
@ -0,0 +1,83 @@ |
|||
package com.ruoyi.erp.mapper; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.erp.domain.ErpMaterialReturnInspectionDetail; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
/** |
|||
* 物料退检单明细Mapper接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-05-06 |
|||
*/ |
|||
public interface ErpMaterialReturnInspectionDetailMapper |
|||
{ |
|||
/** |
|||
* 查询物料退检单明细 |
|||
* |
|||
* @param id 物料退检单明细ID |
|||
* @return 物料退检单明细 |
|||
*/ |
|||
public ErpMaterialReturnInspectionDetail selectErpMaterialReturnInspectionDetailById(Long id); |
|||
|
|||
/** |
|||
* 查询物料退检单明细列表 |
|||
* |
|||
* @param erpMaterialReturnInspectionDetail 物料退检单明细 |
|||
* @return 物料退检单明细集合 |
|||
*/ |
|||
public List<ErpMaterialReturnInspectionDetail> selectErpMaterialReturnInspectionDetailList(ErpMaterialReturnInspectionDetail erpMaterialReturnInspectionDetail); |
|||
|
|||
/** |
|||
* 新增物料退检单明细 |
|||
* |
|||
* @param erpMaterialReturnInspectionDetail 物料退检单明细 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertErpMaterialReturnInspectionDetail(ErpMaterialReturnInspectionDetail erpMaterialReturnInspectionDetail); |
|||
|
|||
/** |
|||
* 修改物料退检单明细 |
|||
* |
|||
* @param erpMaterialReturnInspectionDetail 物料退检单明细 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateErpMaterialReturnInspectionDetail(ErpMaterialReturnInspectionDetail erpMaterialReturnInspectionDetail); |
|||
|
|||
/** |
|||
* 删除物料退检单明细 |
|||
* |
|||
* @param id 物料退检单明细ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteErpMaterialReturnInspectionDetailById(Long id); |
|||
|
|||
/** |
|||
* 批量删除物料退检单明细 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteErpMaterialReturnInspectionDetailByIds(String[] ids); |
|||
|
|||
int deleteErpMaterialReturnInspectionDetailByIdList(@Param("idList") List<Long> idList); |
|||
|
|||
|
|||
int deleteByReturnInspectionNo(String returnInspectionNo); |
|||
|
|||
/** |
|||
* 作废物料退检单明细 |
|||
* |
|||
* @param id 物料退检单明细ID |
|||
* @return 结果 |
|||
*/ |
|||
public int cancelErpMaterialReturnInspectionDetailById(Long id); |
|||
|
|||
/** |
|||
* 恢复物料退检单明细 |
|||
* |
|||
* @param id 物料退检单明细ID |
|||
* @return 结果 |
|||
*/ |
|||
public int restoreErpMaterialReturnInspectionDetailById(Long id); |
|||
} |
@ -0,0 +1,77 @@ |
|||
package com.ruoyi.erp.mapper; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.erp.domain.ErpMaterialReturnInspection; |
|||
|
|||
/** |
|||
* 物料退检单Mapper接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-05-06 |
|||
*/ |
|||
public interface ErpMaterialReturnInspectionMapper |
|||
{ |
|||
/** |
|||
* 查询物料退检单 |
|||
* |
|||
* @param id 物料退检单ID |
|||
* @return 物料退检单 |
|||
*/ |
|||
public ErpMaterialReturnInspection selectErpMaterialReturnInspectionById(Long id); |
|||
|
|||
/** |
|||
* 查询物料退检单列表 |
|||
* |
|||
* @param erpMaterialReturnInspection 物料退检单 |
|||
* @return 物料退检单集合 |
|||
*/ |
|||
public List<ErpMaterialReturnInspection> selectErpMaterialReturnInspectionList(ErpMaterialReturnInspection erpMaterialReturnInspection); |
|||
|
|||
/** |
|||
* 新增物料退检单 |
|||
* |
|||
* @param erpMaterialReturnInspection 物料退检单 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertErpMaterialReturnInspection(ErpMaterialReturnInspection erpMaterialReturnInspection); |
|||
|
|||
/** |
|||
* 修改物料退检单 |
|||
* |
|||
* @param erpMaterialReturnInspection 物料退检单 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateErpMaterialReturnInspection(ErpMaterialReturnInspection erpMaterialReturnInspection); |
|||
|
|||
/** |
|||
* 删除物料退检单 |
|||
* |
|||
* @param id 物料退检单ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteErpMaterialReturnInspectionById(Long id); |
|||
|
|||
/** |
|||
* 批量删除物料退检单 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteErpMaterialReturnInspectionByIds(String[] ids); |
|||
|
|||
/** |
|||
* 作废物料退检单 |
|||
* |
|||
* @param id 物料退检单ID |
|||
* @return 结果 |
|||
*/ |
|||
public int cancelErpMaterialReturnInspectionById(Long id); |
|||
|
|||
/** |
|||
* 恢复物料退检单 |
|||
* |
|||
* @param id 物料退检单ID |
|||
* @return 结果 |
|||
*/ |
|||
public int restoreErpMaterialReturnInspectionById(Long id); |
|||
} |
@ -0,0 +1,79 @@ |
|||
package com.ruoyi.erp.service; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.erp.domain.ErpMaterialReturnInspectionDetail; |
|||
|
|||
/** |
|||
* 物料退检单明细Service接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-05-06 |
|||
*/ |
|||
public interface IErpMaterialReturnInspectionDetailService |
|||
{ |
|||
/** |
|||
* 查询物料退检单明细 |
|||
* |
|||
* @param id 物料退检单明细ID |
|||
* @return 物料退检单明细 |
|||
*/ |
|||
public ErpMaterialReturnInspectionDetail selectErpMaterialReturnInspectionDetailById(Long id); |
|||
|
|||
/** |
|||
* 查询物料退检单明细列表 |
|||
* |
|||
* @param erpMaterialReturnInspectionDetail 物料退检单明细 |
|||
* @return 物料退检单明细集合 |
|||
*/ |
|||
public List<ErpMaterialReturnInspectionDetail> selectErpMaterialReturnInspectionDetailList(ErpMaterialReturnInspectionDetail erpMaterialReturnInspectionDetail); |
|||
|
|||
/** |
|||
* 新增物料退检单明细 |
|||
* |
|||
* @param erpMaterialReturnInspectionDetail 物料退检单明细 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertErpMaterialReturnInspectionDetail(ErpMaterialReturnInspectionDetail erpMaterialReturnInspectionDetail); |
|||
|
|||
/** |
|||
* 修改物料退检单明细 |
|||
* |
|||
* @param erpMaterialReturnInspectionDetail 物料退检单明细 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateErpMaterialReturnInspectionDetail(ErpMaterialReturnInspectionDetail erpMaterialReturnInspectionDetail); |
|||
|
|||
/** |
|||
* 批量删除物料退检单明细 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteErpMaterialReturnInspectionDetailByIds(String ids); |
|||
|
|||
int deleteErpMaterialReturnInspectionDetailByIdList(List<Long> ids); |
|||
|
|||
/** |
|||
* 删除物料退检单明细信息 |
|||
* |
|||
* @param id 物料退检单明细ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteErpMaterialReturnInspectionDetailById(Long id); |
|||
|
|||
/** |
|||
* 作废物料退检单明细 |
|||
* @param id 物料退检单明细ID |
|||
* @return |
|||
*/ |
|||
int cancelErpMaterialReturnInspectionDetailById(Long id); |
|||
|
|||
/** |
|||
* 恢复物料退检单明细 |
|||
* @param id 物料退检单明细ID |
|||
* @return |
|||
*/ |
|||
int restoreErpMaterialReturnInspectionDetailById(Long id); |
|||
|
|||
int deleteByReturnInspectionNo(String returnInspectionNo); |
|||
} |
@ -0,0 +1,75 @@ |
|||
package com.ruoyi.erp.service; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.erp.domain.ErpMaterialReturnInspection; |
|||
|
|||
/** |
|||
* 物料退检单Service接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-05-06 |
|||
*/ |
|||
public interface IErpMaterialReturnInspectionService |
|||
{ |
|||
/** |
|||
* 查询物料退检单 |
|||
* |
|||
* @param id 物料退检单ID |
|||
* @return 物料退检单 |
|||
*/ |
|||
public ErpMaterialReturnInspection selectErpMaterialReturnInspectionById(Long id); |
|||
|
|||
/** |
|||
* 查询物料退检单列表 |
|||
* |
|||
* @param erpMaterialReturnInspection 物料退检单 |
|||
* @return 物料退检单集合 |
|||
*/ |
|||
public List<ErpMaterialReturnInspection> selectErpMaterialReturnInspectionList(ErpMaterialReturnInspection erpMaterialReturnInspection); |
|||
|
|||
/** |
|||
* 新增物料退检单 |
|||
* |
|||
* @param erpMaterialReturnInspection 物料退检单 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertErpMaterialReturnInspection(ErpMaterialReturnInspection erpMaterialReturnInspection); |
|||
|
|||
/** |
|||
* 修改物料退检单 |
|||
* |
|||
* @param erpMaterialReturnInspection 物料退检单 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateErpMaterialReturnInspection(ErpMaterialReturnInspection erpMaterialReturnInspection); |
|||
|
|||
/** |
|||
* 批量删除物料退检单 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteErpMaterialReturnInspectionByIds(String ids); |
|||
|
|||
/** |
|||
* 删除物料退检单信息 |
|||
* |
|||
* @param id 物料退检单ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteErpMaterialReturnInspectionById(Long id); |
|||
|
|||
/** |
|||
* 作废物料退检单 |
|||
* @param id 物料退检单ID |
|||
* @return |
|||
*/ |
|||
int cancelErpMaterialReturnInspectionById(Long id); |
|||
|
|||
/** |
|||
* 恢复物料退检单 |
|||
* @param id 物料退检单ID |
|||
* @return |
|||
*/ |
|||
int restoreErpMaterialReturnInspectionById(Long id); |
|||
} |
@ -0,0 +1,138 @@ |
|||
package com.ruoyi.erp.service.impl; |
|||
|
|||
import java.util.List; |
|||
import java.util.stream.Collectors; |
|||
|
|||
import com.ruoyi.common.utils.DateUtils; |
|||
import com.ruoyi.common.utils.ShiroUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import com.ruoyi.erp.mapper.ErpMaterialReturnInspectionDetailMapper; |
|||
import com.ruoyi.erp.domain.ErpMaterialReturnInspectionDetail; |
|||
import com.ruoyi.erp.service.IErpMaterialReturnInspectionDetailService; |
|||
import com.ruoyi.common.core.text.Convert; |
|||
|
|||
/** |
|||
* 物料退检单明细Service业务层处理 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-05-06 |
|||
*/ |
|||
@Service |
|||
public class ErpMaterialReturnInspectionDetailServiceImpl implements IErpMaterialReturnInspectionDetailService |
|||
{ |
|||
@Autowired |
|||
private ErpMaterialReturnInspectionDetailMapper erpMaterialReturnInspectionDetailMapper; |
|||
|
|||
/** |
|||
* 查询物料退检单明细 |
|||
* |
|||
* @param id 物料退检单明细ID |
|||
* @return 物料退检单明细 |
|||
*/ |
|||
@Override |
|||
public ErpMaterialReturnInspectionDetail selectErpMaterialReturnInspectionDetailById(Long id) |
|||
{ |
|||
return erpMaterialReturnInspectionDetailMapper.selectErpMaterialReturnInspectionDetailById(id); |
|||
} |
|||
|
|||
/** |
|||
* 查询物料退检单明细列表 |
|||
* |
|||
* @param erpMaterialReturnInspectionDetail 物料退检单明细 |
|||
* @return 物料退检单明细 |
|||
*/ |
|||
@Override |
|||
public List<ErpMaterialReturnInspectionDetail> selectErpMaterialReturnInspectionDetailList(ErpMaterialReturnInspectionDetail erpMaterialReturnInspectionDetail) |
|||
{ |
|||
return erpMaterialReturnInspectionDetailMapper.selectErpMaterialReturnInspectionDetailList(erpMaterialReturnInspectionDetail); |
|||
} |
|||
|
|||
/** |
|||
* 新增物料退检单明细 |
|||
* |
|||
* @param erpMaterialReturnInspectionDetail 物料退检单明细 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int insertErpMaterialReturnInspectionDetail(ErpMaterialReturnInspectionDetail erpMaterialReturnInspectionDetail) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
erpMaterialReturnInspectionDetail.setCreateBy(loginName); |
|||
erpMaterialReturnInspectionDetail.setCreateTime(DateUtils.getNowDate()); |
|||
return erpMaterialReturnInspectionDetailMapper.insertErpMaterialReturnInspectionDetail(erpMaterialReturnInspectionDetail); |
|||
} |
|||
|
|||
/** |
|||
* 修改物料退检单明细 |
|||
* |
|||
* @param erpMaterialReturnInspectionDetail 物料退检单明细 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int updateErpMaterialReturnInspectionDetail(ErpMaterialReturnInspectionDetail erpMaterialReturnInspectionDetail) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
erpMaterialReturnInspectionDetail.setUpdateBy(loginName); |
|||
erpMaterialReturnInspectionDetail.setUpdateTime(DateUtils.getNowDate()); |
|||
return erpMaterialReturnInspectionDetailMapper.updateErpMaterialReturnInspectionDetail(erpMaterialReturnInspectionDetail); |
|||
} |
|||
|
|||
/** |
|||
* 删除物料退检单明细对象 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteErpMaterialReturnInspectionDetailByIds(String ids) |
|||
{ |
|||
return erpMaterialReturnInspectionDetailMapper.deleteErpMaterialReturnInspectionDetailByIds(Convert.toStrArray(ids)); |
|||
} |
|||
|
|||
@Override |
|||
public int deleteErpMaterialReturnInspectionDetailByIdList(List<Long> ids) { |
|||
return erpMaterialReturnInspectionDetailMapper.deleteErpMaterialReturnInspectionDetailByIdList(ids); |
|||
} |
|||
|
|||
/** |
|||
* 删除物料退检单明细信息 |
|||
* |
|||
* @param id 物料退检单明细ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteErpMaterialReturnInspectionDetailById(Long id) |
|||
{ |
|||
return erpMaterialReturnInspectionDetailMapper.deleteErpMaterialReturnInspectionDetailById(id); |
|||
} |
|||
|
|||
/** |
|||
* 作废物料退检单明细 |
|||
* |
|||
* @param id 物料退检单明细ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int cancelErpMaterialReturnInspectionDetailById(Long id) |
|||
{ |
|||
return erpMaterialReturnInspectionDetailMapper.cancelErpMaterialReturnInspectionDetailById(id); |
|||
} |
|||
|
|||
/** |
|||
* 恢复物料退检单明细信息 |
|||
* |
|||
* @param id 物料退检单明细ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int restoreErpMaterialReturnInspectionDetailById(Long id) |
|||
{ |
|||
return erpMaterialReturnInspectionDetailMapper.restoreErpMaterialReturnInspectionDetailById(id); |
|||
} |
|||
|
|||
@Override |
|||
public int deleteByReturnInspectionNo(String returnInspectionNo) { |
|||
return erpMaterialReturnInspectionDetailMapper.deleteByReturnInspectionNo(returnInspectionNo); |
|||
} |
|||
} |
@ -0,0 +1,181 @@ |
|||
package com.ruoyi.erp.service.impl; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
import java.util.stream.Collectors; |
|||
|
|||
import cn.hutool.core.collection.CollectionUtil; |
|||
import com.ruoyi.common.core.redis.RedisCache; |
|||
import com.ruoyi.common.utils.DateUtils; |
|||
import com.ruoyi.common.utils.ShiroUtils; |
|||
import com.ruoyi.erp.domain.ErpMaterialReturnInspectionDetail; |
|||
import com.ruoyi.erp.service.IErpMaterialReturnInspectionDetailService; |
|||
import com.ruoyi.system.domain.SysMakeorderPickDetail; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import com.ruoyi.erp.mapper.ErpMaterialReturnInspectionMapper; |
|||
import com.ruoyi.erp.domain.ErpMaterialReturnInspection; |
|||
import com.ruoyi.erp.service.IErpMaterialReturnInspectionService; |
|||
import com.ruoyi.common.core.text.Convert; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
/** |
|||
* 物料退检单Service业务层处理 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-05-06 |
|||
*/ |
|||
@Service |
|||
public class ErpMaterialReturnInspectionServiceImpl implements IErpMaterialReturnInspectionService |
|||
{ |
|||
@Autowired |
|||
private ErpMaterialReturnInspectionMapper erpMaterialReturnInspectionMapper; |
|||
|
|||
@Autowired |
|||
private RedisCache redisCache; |
|||
|
|||
@Autowired |
|||
private IErpMaterialReturnInspectionDetailService materialReturnInspectionDetailService; |
|||
|
|||
/** |
|||
* 查询物料退检单 |
|||
* |
|||
* @param id 物料退检单ID |
|||
* @return 物料退检单 |
|||
*/ |
|||
@Override |
|||
public ErpMaterialReturnInspection selectErpMaterialReturnInspectionById(Long id) |
|||
{ |
|||
return erpMaterialReturnInspectionMapper.selectErpMaterialReturnInspectionById(id); |
|||
} |
|||
|
|||
/** |
|||
* 查询物料退检单列表 |
|||
* |
|||
* @param erpMaterialReturnInspection 物料退检单 |
|||
* @return 物料退检单 |
|||
*/ |
|||
@Override |
|||
public List<ErpMaterialReturnInspection> selectErpMaterialReturnInspectionList(ErpMaterialReturnInspection erpMaterialReturnInspection) |
|||
{ |
|||
return erpMaterialReturnInspectionMapper.selectErpMaterialReturnInspectionList(erpMaterialReturnInspection); |
|||
} |
|||
|
|||
/** |
|||
* 新增物料退检单 |
|||
* |
|||
* @param erpMaterialReturnInspection 物料退检单 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public int insertErpMaterialReturnInspection(ErpMaterialReturnInspection erpMaterialReturnInspection) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
erpMaterialReturnInspection.setCreateBy(loginName); |
|||
erpMaterialReturnInspection.setCreateTime(DateUtils.getNowDate()); |
|||
// 生成编号,年月日规则
|
|||
String billNo = redisCache.generateBillNo("TJ"); |
|||
erpMaterialReturnInspection.setReturnInspectionNo(billNo); |
|||
int id = erpMaterialReturnInspectionMapper.insertErpMaterialReturnInspection(erpMaterialReturnInspection); |
|||
List<ErpMaterialReturnInspectionDetail> inspectionDetails = erpMaterialReturnInspection.getInspectionDetails(); |
|||
// 插入子表
|
|||
for (int i = 0; i < inspectionDetails.size(); i++) { |
|||
ErpMaterialReturnInspectionDetail inspectionDetail = inspectionDetails.get(i); |
|||
inspectionDetail.setReturnInspectionNo(billNo); |
|||
materialReturnInspectionDetailService.insertErpMaterialReturnInspectionDetail(inspectionDetail); |
|||
} |
|||
return id; |
|||
} |
|||
|
|||
/** |
|||
* 修改物料退检单 |
|||
* |
|||
* @param erpMaterialReturnInspection 物料退检单 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public int updateErpMaterialReturnInspection(ErpMaterialReturnInspection erpMaterialReturnInspection) |
|||
{ |
|||
String returnInspectionNo = erpMaterialReturnInspection.getReturnInspectionNo(); |
|||
ErpMaterialReturnInspectionDetail detailQueryObj = new ErpMaterialReturnInspectionDetail(); |
|||
detailQueryObj.setReturnInspectionNo(returnInspectionNo); |
|||
List<ErpMaterialReturnInspectionDetail> oldDetails = materialReturnInspectionDetailService.selectErpMaterialReturnInspectionDetailList(detailQueryObj); |
|||
List<Long> oldDetailIds = new ArrayList<>(); |
|||
if(CollectionUtil.isNotEmpty(oldDetails)){ |
|||
oldDetailIds = oldDetails.stream().map(t->t.getId()).collect(Collectors.toList()); |
|||
}else{ |
|||
materialReturnInspectionDetailService.deleteByReturnInspectionNo(returnInspectionNo); |
|||
} |
|||
List<ErpMaterialReturnInspectionDetail> inspectionDetails = erpMaterialReturnInspection.getInspectionDetails(); |
|||
List<Long> finalOldDetailIds = oldDetailIds; |
|||
inspectionDetails.forEach(detail->{ |
|||
Long id = detail.getId(); |
|||
if(finalOldDetailIds.contains(id)){ |
|||
materialReturnInspectionDetailService.updateErpMaterialReturnInspectionDetail(detail); |
|||
finalOldDetailIds.remove(id); |
|||
}else{ |
|||
detail.setReturnInspectionNo(returnInspectionNo); |
|||
materialReturnInspectionDetailService.insertErpMaterialReturnInspectionDetail(detail); |
|||
} |
|||
}); |
|||
if(CollectionUtil.isNotEmpty(finalOldDetailIds)){ |
|||
materialReturnInspectionDetailService.deleteErpMaterialReturnInspectionDetailByIdList(finalOldDetailIds); |
|||
} |
|||
|
|||
String loginName = ShiroUtils.getLoginName(); |
|||
erpMaterialReturnInspection.setUpdateBy(loginName); |
|||
erpMaterialReturnInspection.setUpdateTime(DateUtils.getNowDate()); |
|||
int updateFlag = erpMaterialReturnInspectionMapper.updateErpMaterialReturnInspection(erpMaterialReturnInspection); |
|||
return updateFlag; |
|||
} |
|||
|
|||
/** |
|||
* 删除物料退检单对象 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteErpMaterialReturnInspectionByIds(String ids) |
|||
{ |
|||
return erpMaterialReturnInspectionMapper.deleteErpMaterialReturnInspectionByIds(Convert.toStrArray(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 删除物料退检单信息 |
|||
* |
|||
* @param id 物料退检单ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteErpMaterialReturnInspectionById(Long id) |
|||
{ |
|||
return erpMaterialReturnInspectionMapper.deleteErpMaterialReturnInspectionById(id); |
|||
} |
|||
|
|||
/** |
|||
* 作废物料退检单 |
|||
* |
|||
* @param id 物料退检单ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int cancelErpMaterialReturnInspectionById(Long id) |
|||
{ |
|||
return erpMaterialReturnInspectionMapper.cancelErpMaterialReturnInspectionById(id); |
|||
} |
|||
|
|||
/** |
|||
* 恢复物料退检单信息 |
|||
* |
|||
* @param id 物料退检单ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int restoreErpMaterialReturnInspectionById(Long id) |
|||
{ |
|||
return erpMaterialReturnInspectionMapper.restoreErpMaterialReturnInspectionById(id); |
|||
} |
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.ruoyi.system.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author xiguniang |
|||
* @description SysMakerorderMaterialDto |
|||
* @date 2024/5/10 19:47 |
|||
*/ |
|||
@Data |
|||
public class SysMakeorderMaterialDto implements Serializable { |
|||
private String makeNo; |
|||
private String saleNo; |
|||
private String materialNo; |
|||
private String materialName; |
|||
private String materialType; |
|||
private String processMethod; |
|||
private String brand; |
|||
private String photoUrl; |
|||
private String unit; |
|||
private String describe; |
|||
} |
@ -0,0 +1,178 @@ |
|||
<?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.erp.mapper.ErpMaterialReturnInspectionDetailMapper"> |
|||
|
|||
<resultMap type="ErpMaterialReturnInspectionDetail" id="ErpMaterialReturnInspectionDetailResult"> |
|||
<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="returnInspectionNo" column="return_inspection_no" /> |
|||
<result property="materialNo" column="material_no" /> |
|||
<result property="materialName" column="material_name" /> |
|||
<result property="materialType" column="material_type" /> |
|||
<result property="processMethod" column="process_method" /> |
|||
<result property="unit" column="unit" /> |
|||
<result property="brand" column="brand" /> |
|||
<result property="describe" column="describe" /> |
|||
<result property="orderNum" column="order_num" /> |
|||
<result property="returnInspectionNum" column="return_inspection_num" /> |
|||
<result property="returnInspectionType" column="return_inspection_type" /> |
|||
<result property="urgencyLevel" column="urgency_level" /> |
|||
<result property="pickMaterialTime" column="pick_material_time" /> |
|||
<result property="returnInspectionRemark" column="return_inspection_remark" /> |
|||
<result property="abnormalCause" column="abnormal_cause" /> |
|||
<result property="dutyUnit" column="duty_unit" /> |
|||
<result property="recheckRemark" column="recheck_remark" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectErpMaterialReturnInspectionDetailVo"> |
|||
select a.id, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, a.return_inspection_no, a.material_no, a.material_name, a.material_type, a.process_method, a.unit, a.brand, a.`describe`, a.order_num, a.return_inspection_num, a.return_inspection_type, a.urgency_level, a.pick_material_time, a.return_inspection_remark, a.abnormal_cause, a.duty_unit, a.recheck_remark from erp_material_return_inspection_detail a |
|||
</sql> |
|||
|
|||
<select id="selectErpMaterialReturnInspectionDetailList" parameterType="ErpMaterialReturnInspectionDetail" resultMap="ErpMaterialReturnInspectionDetailResult"> |
|||
<include refid="selectErpMaterialReturnInspectionDetailVo"/> |
|||
<where> |
|||
<if test="returnInspectionNo != null and returnInspectionNo != ''"> and a.return_inspection_no = #{returnInspectionNo}</if> |
|||
<if test="materialNo != null and materialNo != ''"> and a.material_no = #{materialNo}</if> |
|||
<if test="materialName != null and materialName != ''"> and a.material_name like concat('%', #{materialName}, '%')</if> |
|||
<if test="materialType != null and materialType != ''"> and a.material_type = #{materialType}</if> |
|||
<if test="processMethod != null and processMethod != ''"> and a.process_method = #{processMethod}</if> |
|||
<if test="unit != null and unit != ''"> and a.unit = #{unit}</if> |
|||
<if test="brand != null and brand != ''"> and a.brand = #{brand}</if> |
|||
<if test="describe != null and describe != ''"> and a.describe = #{describe}</if> |
|||
<if test="orderNum != null "> and a.order_num = #{orderNum}</if> |
|||
<if test="returnInspectionNum != null "> and a.return_inspection_num = #{returnInspectionNum}</if> |
|||
<if test="returnInspectionType != null and returnInspectionType != ''"> and a.return_inspection_type = #{returnInspectionType}</if> |
|||
<if test="urgencyLevel != null and urgencyLevel != ''"> and a.urgency_level = #{urgencyLevel}</if> |
|||
<if test="pickMaterialTime != null "> and a.pick_material_time = #{pickMaterialTime}</if> |
|||
<if test="returnInspectionRemark != null and returnInspectionRemark != ''"> and a.return_inspection_remark = #{returnInspectionRemark}</if> |
|||
<if test="abnormalCause != null and abnormalCause != ''"> and a.abnormal_cause = #{abnormalCause}</if> |
|||
<if test="dutyUnit != null and dutyUnit != ''"> and a.duty_unit = #{dutyUnit}</if> |
|||
<if test="recheckRemark != null and recheckRemark != ''"> and a.recheck_remark = #{recheckRemark}</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectErpMaterialReturnInspectionDetailById" parameterType="Long" resultMap="ErpMaterialReturnInspectionDetailResult"> |
|||
<include refid="selectErpMaterialReturnInspectionDetailVo"/> |
|||
where a.id = #{id} |
|||
</select> |
|||
|
|||
<insert id="insertErpMaterialReturnInspectionDetail" parameterType="ErpMaterialReturnInspectionDetail" useGeneratedKeys="true" keyProperty="id"> |
|||
insert into erp_material_return_inspection_detail |
|||
<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="returnInspectionNo != null">return_inspection_no,</if> |
|||
<if test="materialNo != null">material_no,</if> |
|||
<if test="materialName != null">material_name,</if> |
|||
<if test="materialType != null">material_type,</if> |
|||
<if test="processMethod != null">process_method,</if> |
|||
<if test="unit != null">unit,</if> |
|||
<if test="brand != null">brand,</if> |
|||
<if test="describe != null">`describe`,</if> |
|||
<if test="orderNum != null">order_num,</if> |
|||
<if test="returnInspectionNum != null">return_inspection_num,</if> |
|||
<if test="returnInspectionType != null">return_inspection_type,</if> |
|||
<if test="urgencyLevel != null">urgency_level,</if> |
|||
<if test="pickMaterialTime != null">pick_material_time,</if> |
|||
<if test="returnInspectionRemark != null">return_inspection_remark,</if> |
|||
<if test="abnormalCause != null">abnormal_cause,</if> |
|||
<if test="dutyUnit != null">duty_unit,</if> |
|||
<if test="recheckRemark != null">recheck_remark,</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="returnInspectionNo != null">#{returnInspectionNo},</if> |
|||
<if test="materialNo != null">#{materialNo},</if> |
|||
<if test="materialName != null">#{materialName},</if> |
|||
<if test="materialType != null">#{materialType},</if> |
|||
<if test="processMethod != null">#{processMethod},</if> |
|||
<if test="unit != null">#{unit},</if> |
|||
<if test="brand != null">#{brand},</if> |
|||
<if test="describe != null">#{describe},</if> |
|||
<if test="orderNum != null">#{orderNum},</if> |
|||
<if test="returnInspectionNum != null">#{returnInspectionNum},</if> |
|||
<if test="returnInspectionType != null">#{returnInspectionType},</if> |
|||
<if test="urgencyLevel != null">#{urgencyLevel},</if> |
|||
<if test="pickMaterialTime != null">#{pickMaterialTime},</if> |
|||
<if test="returnInspectionRemark != null">#{returnInspectionRemark},</if> |
|||
<if test="abnormalCause != null">#{abnormalCause},</if> |
|||
<if test="dutyUnit != null">#{dutyUnit},</if> |
|||
<if test="recheckRemark != null">#{recheckRemark},</if> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateErpMaterialReturnInspectionDetail" parameterType="ErpMaterialReturnInspectionDetail"> |
|||
update erp_material_return_inspection_detail |
|||
<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="returnInspectionNo != null">return_inspection_no = #{returnInspectionNo},</if> |
|||
<if test="materialNo != null">material_no = #{materialNo},</if> |
|||
<if test="materialName != null">material_name = #{materialName},</if> |
|||
<if test="materialType != null">material_type = #{materialType},</if> |
|||
<if test="processMethod != null">process_method = #{processMethod},</if> |
|||
<if test="unit != null">unit = #{unit},</if> |
|||
<if test="brand != null">brand = #{brand},</if> |
|||
<if test="describe != null">`describe` = #{describe},</if> |
|||
<if test="orderNum != null">order_num = #{orderNum},</if> |
|||
<if test="returnInspectionNum != null">return_inspection_num = #{returnInspectionNum},</if> |
|||
<if test="returnInspectionType != null">return_inspection_type = #{returnInspectionType},</if> |
|||
<if test="urgencyLevel != null">urgency_level = #{urgencyLevel},</if> |
|||
<if test="pickMaterialTime != null">pick_material_time = #{pickMaterialTime},</if> |
|||
<if test="returnInspectionRemark != null">return_inspection_remark = #{returnInspectionRemark},</if> |
|||
<if test="abnormalCause != null">abnormal_cause = #{abnormalCause},</if> |
|||
<if test="dutyUnit != null">duty_unit = #{dutyUnit},</if> |
|||
<if test="recheckRemark != null">recheck_remark = #{recheckRemark},</if> |
|||
</trim> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<delete id="deleteErpMaterialReturnInspectionDetailById" parameterType="Long"> |
|||
delete from erp_material_return_inspection_detail where id = #{id} |
|||
</delete> |
|||
|
|||
<delete id="deleteErpMaterialReturnInspectionDetailByIds" parameterType="String"> |
|||
delete from erp_material_return_inspection_detail where id in |
|||
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
<delete id="deleteByReturnInspectionNo"> |
|||
delete from erp_material_return_inspection_detail where retrun_inspection_no = #{returnInspectionNo} |
|||
</delete> |
|||
<delete id="deleteErpMaterialReturnInspectionDetailByIdList" parameterType="Long"> |
|||
delete from erp_material_return_inspection_detail where id in |
|||
<foreach collection="idList" item="item" open="(" separator="," close=")"> |
|||
#{item} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<update id="cancelErpMaterialReturnInspectionDetailById" parameterType="Long"> |
|||
update erp_material_return_inspection_detail set del_flag = '1' where id = #{id} |
|||
</update> |
|||
|
|||
<update id="restoreErpMaterialReturnInspectionDetailById" parameterType="Long"> |
|||
update erp_material_return_inspection_detail set del_flag = '0' where id = #{id} |
|||
</update> |
|||
|
|||
</mapper> |
@ -0,0 +1,129 @@ |
|||
<?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.erp.mapper.ErpMaterialReturnInspectionMapper"> |
|||
|
|||
<resultMap type="ErpMaterialReturnInspection" id="ErpMaterialReturnInspectionResult"> |
|||
<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="returnInspectionNo" column="return_inspection_no" /> |
|||
<result property="makeNo" column="make_no" /> |
|||
<result property="returnMaterialTime" column="return_material_time" /> |
|||
<result property="urgencyLevel" column="urgency_level" /> |
|||
<result property="isClosed" column="is_closed" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectErpMaterialReturnInspectionVo"> |
|||
select a.id, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, a.return_inspection_no, a.make_no, a.return_material_time, a.urgency_level, a.is_closed from erp_material_return_inspection a |
|||
</sql> |
|||
|
|||
<select id="selectErpMaterialReturnInspectionList" parameterType="ErpMaterialReturnInspection" resultMap="ErpMaterialReturnInspectionResult"> |
|||
<include refid="selectErpMaterialReturnInspectionVo"/> |
|||
<where> |
|||
<if test="returnInspectionNo != null and returnInspectionNo != ''"> and a.return_inspection_no = #{returnInspectionNo}</if> |
|||
<if test="makeNo != null and makeNo != ''"> and a.make_no = #{makeNo}</if> |
|||
<if test="urgencyLevel != null and urgencyLevel != ''"> and a.urgency_level = #{urgencyLevel}</if> |
|||
<if test="isClosed != null and isClosed != ''"> and a.is_closed = #{isClosed}</if> |
|||
<if test="params.beginCreateTime != null and params.beginCreateTime != ''"><!-- 开始时间检索 --> |
|||
and date_format(a.create_time,'%y%m%d') >= date_format(#{params.beginCreateTime},'%y%m%d') |
|||
</if> |
|||
<if test="params.endCreateTime != null and params.endCreateTime != ''"><!-- 结束时间检索 --> |
|||
and date_format(a.create_time,'%y%m%d') <= date_format(#{params.endCreateTime},'%y%m%d') |
|||
</if> |
|||
<if test="(returnInspectionType != null and returnInspectionType != '') or (materialNo != null and materialNo != '') or (materialName != null and materialName != '')"> |
|||
and exists( |
|||
select 1 from erp_material_return_inspection_detail b |
|||
where a.return_inspection_no = b.return_inspection_no |
|||
<if test="returnInspectionType != null and returnInspectionType != ''"> |
|||
and b.return_inspection_type = #{returnInspectionType} |
|||
</if> |
|||
<if test="materialNo != null and materialNo != ''"> |
|||
and b.material_no = #{materialNo} |
|||
</if> |
|||
<if test="materialName != null and materialName != ''"> |
|||
and b.material_name = #{materialName} |
|||
</if> |
|||
) |
|||
</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectErpMaterialReturnInspectionById" parameterType="Long" resultMap="ErpMaterialReturnInspectionResult"> |
|||
<include refid="selectErpMaterialReturnInspectionVo"/> |
|||
where a.id = #{id} |
|||
</select> |
|||
|
|||
<insert id="insertErpMaterialReturnInspection" parameterType="ErpMaterialReturnInspection" useGeneratedKeys="true" keyProperty="id"> |
|||
insert into erp_material_return_inspection |
|||
<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="returnInspectionNo != null">return_inspection_no,</if> |
|||
<if test="makeNo != null">make_no,</if> |
|||
<if test="returnMaterialTime != null">return_material_time,</if> |
|||
<if test="urgencyLevel != null">urgency_level,</if> |
|||
<if test="isClosed != null">is_closed,</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="returnInspectionNo != null">#{returnInspectionNo},</if> |
|||
<if test="makeNo != null">#{makeNo},</if> |
|||
<if test="returnMaterialTime != null">#{returnMaterialTime},</if> |
|||
<if test="urgencyLevel != null">#{urgencyLevel},</if> |
|||
<if test="isClosed != null">#{isClosed},</if> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateErpMaterialReturnInspection" parameterType="ErpMaterialReturnInspection"> |
|||
update erp_material_return_inspection |
|||
<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="returnInspectionNo != null">return_inspection_no = #{returnInspectionNo},</if> |
|||
<if test="makeNo != null">make_no = #{makeNo},</if> |
|||
<if test="returnMaterialTime != null">return_material_time = #{returnMaterialTime},</if> |
|||
<if test="urgencyLevel != null">urgency_level = #{urgencyLevel},</if> |
|||
<if test="isClosed != null">is_closed = #{isClosed},</if> |
|||
</trim> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<delete id="deleteErpMaterialReturnInspectionById" parameterType="Long"> |
|||
delete from erp_material_return_inspection where id = #{id} |
|||
</delete> |
|||
|
|||
<delete id="deleteErpMaterialReturnInspectionByIds" parameterType="String"> |
|||
delete from erp_material_return_inspection where id in |
|||
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<update id="cancelErpMaterialReturnInspectionById" parameterType="Long"> |
|||
update erp_material_return_inspection set del_flag = '1' where id = #{id} |
|||
</update> |
|||
|
|||
<update id="restoreErpMaterialReturnInspectionById" parameterType="Long"> |
|||
update erp_material_return_inspection set del_flag = '0' where id = #{id} |
|||
</update> |
|||
|
|||
</mapper> |
@ -0,0 +1,349 @@ |
|||
<!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" id="form-materialReturnInspection-add"> |
|||
<div class="row"> |
|||
<div class="col-sm-6"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-4 control-label is-required">生产单号:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group"> |
|||
<input id="makeNo" name="makeNo" onclick="selectMakeOrder()" class="form-control" type="text" placeholder="请选择生产单号" required> |
|||
<span class="input-group-addon"><i class="fa fa-search"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-4 control-label">退料时间:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="returnMaterialTime" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-6"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-4 control-label is-required">紧急程度:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="urgencyLevel" class="form-control m-b" th:with="type=${@dict.getType('urgency_level')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-4 control-label">是否结案:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="radio-box" th:each="dict : ${@dict.getType('yes_or_no')}"> |
|||
<input type="radio" th:id="${'isClosed_' + dict.dictCode}" name="isClosed" th:value="${dict.dictValue}" th:checked="${dict.default}"> |
|||
<label th:for="${'isClosed_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="row"> |
|||
<div class="col-sm-12"> |
|||
<a class="btn btn-success btn-sm" onclick="insertRow()"> |
|||
<i class="fa fa-plus"></i> 新增行 |
|||
</a> |
|||
<a class="btn btn-danger multiple btn-sm" onclick="removeRow()"> |
|||
<i class="fa fa-remove"></i> 删除选择行 |
|||
</a> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-sub-table-1"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<script th:src="@{/js/jquery.tmpl.js}"></script> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "erp/materialReturnInspection"; |
|||
|
|||
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; |
|||
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; |
|||
var bomLevelSelectDatas = [[${@dict.getTypeSelect('bomLevel')}]]; |
|||
var processMethodDatas = [[${@dict.getType('processMethod')}]]; |
|||
|
|||
|
|||
$(function(){ |
|||
var options = { |
|||
id: 'bootstrap-sub-table-1', |
|||
showSearch: false, |
|||
showRefresh: false, |
|||
showToggle: false, |
|||
showColumns: false, |
|||
uniqueId: "id", |
|||
pagination: false, // 设置不分页 |
|||
sidePagination: "client", |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
field: 'id', |
|||
title: '主键id', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'materialNo', |
|||
align: 'center', |
|||
title: '料号', |
|||
formatter: function (value,row,index){ |
|||
var curIndex = index; |
|||
var columnInput = $.common.sprintf("<input type='hidden' name='inspectionDetails[%s].materialNo' value='%s'>", curIndex, value); |
|||
return value + columnInput; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'photoUrl', |
|||
title: '图片', |
|||
formatter: function(value, row, index) { |
|||
var curIndex = index; |
|||
var columnInput = $.common.sprintf("<input type='hidden' name='inspectionDetails[%s].photoUrl' value='%s'>", curIndex, value); |
|||
return $.table.imageView(value) + columnInput; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'materialName', |
|||
align: 'center', |
|||
title: '物料名称', |
|||
formatter: function (value,row,index){ |
|||
var curIndex = index; |
|||
var columnInput = $.common.sprintf("<input type='hidden' name='inspectionDetails[%s].materialName' value='%s'>", curIndex, value); |
|||
return value + columnInput; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'materialType', |
|||
align: 'center', |
|||
title: '物料类型', |
|||
formatter: function(value, row, index) { |
|||
var curIndex = index; |
|||
var columnInput = $.common.sprintf("<input type='hidden' name='inspectionDetails[%s].materialType' value='%s'>", curIndex, value); |
|||
return $.table.selectCategoryLabel(materialTypeDatas, value) + columnInput; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'describe', |
|||
align: 'center', |
|||
title: '描述', |
|||
formatter: function (value,row,index){ |
|||
var curIndex = index; |
|||
var columnInput = $.common.sprintf("<input type='hidden' name='inspectionDetails[%s].describe' value='%s'>", curIndex, value); |
|||
return value + columnInput; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'brand', |
|||
align: 'center', |
|||
title: '品牌', |
|||
formatter: function (value,row,index){ |
|||
var curIndex = index; |
|||
var columnInput = $.common.sprintf("<input type='hidden' name='inspectionDetails[%s].brand' value='%s'>", curIndex, value); |
|||
return value + columnInput; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'unit', |
|||
align: 'center', |
|||
title: '单位', |
|||
formatter: function(value, row, index) { |
|||
var curIndex = index; |
|||
var columnInput = $.common.sprintf("<input type='hidden' name='inspectionDetails[%s].unit' value='%s'>", curIndex, value); |
|||
return $.table.selectDictLabel(sysUnitClassDatas, value) + columnInput; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'processMethod', |
|||
align: 'center', |
|||
title: '加工方式', |
|||
formatter: function(value, row, index) { |
|||
var curIndex = index; |
|||
var columnInput = $.common.sprintf("<input type='hidden' name='inspectionDetails[%s].processMethod' value='%s'>", curIndex, value); |
|||
return $.table.selectDictLabel(processMethodDatas, value) + columnInput; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'returnInspectionNum', |
|||
align: 'center', |
|||
title: '退检数量', |
|||
formatter: function (value,row,index){ |
|||
var curIndex = index; |
|||
return '<input class = "form-control" data-id = "returnInspectionNum_'+curIndex+'" name="inspectionDetails['+curIndex+'].returnInspectionNum" value="'+value+'">'; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'returnInspectionType', |
|||
align: 'center', |
|||
title: '退检类型', |
|||
formatter: function (value,row,index){ |
|||
var curIndex = index; |
|||
return '<input class = "form-control" data-id = "returnInspectionType_'+curIndex+'" name="inspectionDetails['+curIndex+'].returnInspectionType" value="'+value+'">'; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'urgencyLevel', |
|||
align: 'center', |
|||
title: '紧急程度', |
|||
formatter: function (value,row,index){ |
|||
var curIndex = index; |
|||
// return '<input class = "form-control" data-id = "urgencyLevel_'+curIndex+'" name="inspectionDetails['+curIndex+'].urgencyLevel" value="'+value+'">'; |
|||
var data = [{ index: curIndex, type: value }]; |
|||
return $("#urgencyLevelTpl").tmpl(data).html(); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'pickMaterialTime', |
|||
align: 'center', |
|||
title: '领料时间', |
|||
formatter: function (value,row,index){ |
|||
var curIndex = index; |
|||
var html = $.common.sprintf("<input class='form-control' type='text' name='inspectionDetails[%s].pickMaterialTime' value='%s' placeholder='yyyy-MM-dd'>", curIndex, value); |
|||
return html; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'returnInspectionRemark', |
|||
align: 'center', |
|||
title: '退检备注', |
|||
formatter: function (value,row,index){ |
|||
var curIndex = index; |
|||
return '<input class = "form-control" data-id = "returnInspectionRemark_'+curIndex+'" name="inspectionDetails['+curIndex+'].returnInspectionRemark" value="'+value+'">'; |
|||
} |
|||
} |
|||
] |
|||
}; |
|||
$.table.init(options); |
|||
}) |
|||
|
|||
function selectMakeOrder() { |
|||
var url = ctx + "system/makeorder/selectMakeorder"; |
|||
var options = { |
|||
title: '选择生产订单', |
|||
url: url, |
|||
callBack: doSubmit1 |
|||
}; |
|||
$.modal.openOptions(options); |
|||
} |
|||
|
|||
function doSubmit1(index, layero){ |
|||
debugger |
|||
var iframeWin = window[layero.find('iframe')[0]['name']]; |
|||
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0]; |
|||
$("#makeNo").val(rowData.makeNo); |
|||
$.modal.close(index); |
|||
} |
|||
|
|||
|
|||
/* 新增表格行 */ |
|||
function insertRow(){ |
|||
var makeNo = $("#makeNo").val(); |
|||
if(!makeNo){ |
|||
$.modal.msgWarning("请先选择生产单号!"); |
|||
return; |
|||
} |
|||
var url = ctx + "system/makeorder/selectMakeorderDetail/"+makeNo; |
|||
var options = { |
|||
title: '选择料号', |
|||
url: url, |
|||
callBack: doSubmit |
|||
}; |
|||
$.modal.openOptions(options); |
|||
} |
|||
/* 删除指定表格行 */ |
|||
function removeRow(){ |
|||
var ids = $.table.selectColumns("id"); |
|||
if (ids.length == 0) { |
|||
$.modal.alertWarning("请至少选择一条记录"); |
|||
return; |
|||
} |
|||
$("#bootstrap-sub-table-1").bootstrapTable('remove', { |
|||
field: 'id', |
|||
values: ids |
|||
}) |
|||
} |
|||
|
|||
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]; |
|||
var totalNum = $("#bootstrap-sub-table-1").bootstrapTable('getData').length; |
|||
console.log("rowData:"+rowData); |
|||
$("#bootstrap-sub-table-1").bootstrapTable('insertRow',{ |
|||
index: 1, |
|||
row: { |
|||
id: totalNum+1, |
|||
materialNo: rowData.materialNo, |
|||
photoUrl: rowData.photoUrl, |
|||
materialName: rowData.materialName, |
|||
materialType: rowData.materialType, |
|||
describe: rowData.describe, |
|||
brand: rowData.brand, |
|||
unit: rowData.unit, |
|||
processMethod: rowData.processMethod, |
|||
returnInspectionNum: '', |
|||
returnInspectionType: '', |
|||
urgencyLevel: '', |
|||
pickMaterialTime: '', |
|||
returnInspectionRemark: '' |
|||
} |
|||
}) |
|||
layer.close(index); |
|||
} |
|||
|
|||
|
|||
$("#form-materialReturnInspection-add").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/add", $('#form-materialReturnInspection-add').serialize()); |
|||
} |
|||
} |
|||
|
|||
$("input[name='returnMaterialTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
$("#bootstrap-sub-table-1").on("post-body.bs.table", function (e, args) { |
|||
$("input[name$='Time']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true, |
|||
pickerPosition:'top-right' |
|||
}); |
|||
}); |
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
|||
|
|||
<!-- 紧急程度 --> |
|||
<script id="urgencyLevelTpl" type="text/x-jquery-tmpl"> |
|||
<div> |
|||
<select class='form-control' name='inspectionDetails[${index}].urgencyLevel'> |
|||
<option value=""></option> |
|||
<option value="0" {{if type==="0"}}selected{{/if}}>一般</option> |
|||
<option value="1" {{if type==="1"}}selected{{/if}}>紧急</option> |
|||
</select> |
|||
</div> |
|||
</script> |
@ -0,0 +1,384 @@ |
|||
<!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" id="form-materialReturnInspection-edit" th:object="${erpMaterialReturnInspection}"> |
|||
<div class="row"> |
|||
<div class="col-sm-6"> |
|||
<input name="id" th:field="*{id}" type="hidden"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-4 control-label">退检单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="returnInspectionNo" name="returnInspectionNo" th:field="*{returnInspectionNo}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-4 control-label">生产单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input readonly id="makeNo" name="makeNo" th:field="*{makeNo}" class="form-control" type="text" required> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-6"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-4 control-label">退料时间:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="returnMaterialTime" th:value="${#dates.format(erpMaterialReturnInspection.returnMaterialTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-4 control-label">紧急程度:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="urgencyLevel" class="form-control" th:with="type=${@dict.getType('urgency_level')}"> |
|||
<option value=""></option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{urgencyLevel}"></option> |
|||
</select> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-6"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-4 control-label">是否结案:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="radio-box" th:each="dict : ${@dict.getType('yes_or_no')}"> |
|||
<input type="radio" th:id="${'isClosed_' + dict.dictCode}" name="isClosed" th:value="${dict.dictValue}" th:field="*{isClosed}"> |
|||
<label th:for="${'isClosed_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-12"> |
|||
<a class="btn btn-success btn-sm" onclick="insertRow()"> |
|||
<i class="fa fa-plus"></i> 新增行 |
|||
</a> |
|||
<a class="btn btn-danger multiple btn-sm" onclick="removeRow()"> |
|||
<i class="fa fa-remove"></i> 删除选择行 |
|||
</a> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-sub-table-1"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<script th:src="@{/js/jquery.tmpl.js}"></script> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "erp/materialReturnInspection"; |
|||
|
|||
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; |
|||
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; |
|||
var bomLevelSelectDatas = [[${@dict.getTypeSelect('bomLevel')}]]; |
|||
var processMethodDatas = [[${@dict.getType('processMethod')}]]; |
|||
|
|||
$(function(){ |
|||
var options = { |
|||
url: ctx + "erp/materialReturnInspectionDetail/list", |
|||
id: 'bootstrap-sub-table-1', |
|||
showSearch: false, |
|||
showRefresh: false, |
|||
showToggle: false, |
|||
showColumns: false, |
|||
uniqueId: "id", |
|||
pagination: false, // 设置不分页 |
|||
sidePagination: "client", |
|||
queryParams: queryParams, |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
field: 'id', |
|||
title: '主键id', |
|||
formatter: function (value,row,index){ |
|||
var curIndex = index; |
|||
var columnInput = $.common.sprintf("<input type='hidden' name='inspectionDetails[%s].id' value='%s'>", curIndex, value); |
|||
return value + columnInput; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'materialNo', |
|||
align: 'center', |
|||
title: '料号', |
|||
formatter: function (value,row,index){ |
|||
var curIndex = index; |
|||
var columnInput = $.common.sprintf("<input type='hidden' name='inspectionDetails[%s].materialNo' value='%s'>", curIndex, value); |
|||
return value + columnInput; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'photoUrl', |
|||
title: '图片', |
|||
formatter: function(value, row, index) { |
|||
var curIndex = index; |
|||
var columnInput = $.common.sprintf("<input type='hidden' name='inspectionDetails[%s].photoUrl' value='%s'>", curIndex, value); |
|||
return $.table.imageView(value) + columnInput; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'materialName', |
|||
align: 'center', |
|||
title: '物料名称', |
|||
formatter: function (value,row,index){ |
|||
var curIndex = index; |
|||
var columnInput = $.common.sprintf("<input type='hidden' name='inspectionDetails[%s].materialName' value='%s'>", curIndex, value); |
|||
return value + columnInput; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'materialType', |
|||
align: 'center', |
|||
title: '物料类型', |
|||
formatter: function(value, row, index) { |
|||
var curIndex = index; |
|||
var columnInput = $.common.sprintf("<input type='hidden' name='inspectionDetails[%s].materialType' value='%s'>", curIndex, value); |
|||
return $.table.selectCategoryLabel(materialTypeDatas, value) + columnInput; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'describe', |
|||
align: 'center', |
|||
title: '描述', |
|||
formatter: function (value,row,index){ |
|||
var curIndex = index; |
|||
var columnInput = $.common.sprintf("<input type='hidden' name='inspectionDetails[%s].describe' value='%s'>", curIndex, value); |
|||
if(value){ |
|||
return value + columnInput; |
|||
} |
|||
return columnInput; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'brand', |
|||
align: 'center', |
|||
title: '品牌', |
|||
formatter: function (value,row,index){ |
|||
var curIndex = index; |
|||
var columnInput = $.common.sprintf("<input type='hidden' name='inspectionDetails[%s].brand' value='%s'>", curIndex, value); |
|||
if(value){ |
|||
return value + columnInput; |
|||
} |
|||
return columnInput; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'unit', |
|||
align: 'center', |
|||
title: '单位', |
|||
formatter: function(value, row, index) { |
|||
var curIndex = index; |
|||
var columnInput = $.common.sprintf("<input type='hidden' name='inspectionDetails[%s].unit' value='%s'>", curIndex, value); |
|||
return $.table.selectDictLabel(sysUnitClassDatas, value) + columnInput; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'processMethod', |
|||
align: 'center', |
|||
title: '加工方式', |
|||
formatter: function(value, row, index) { |
|||
var curIndex = index; |
|||
var columnInput = $.common.sprintf("<input type='hidden' name='inspectionDetails[%s].processMethod' value='%s'>", curIndex, value); |
|||
return $.table.selectDictLabel(processMethodDatas, value) + columnInput; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'returnInspectionNum', |
|||
align: 'center', |
|||
title: '退检数量', |
|||
formatter: function (value,row,index){ |
|||
var curIndex = index; |
|||
return '<input class = "form-control" data-id = "returnInspectionNum_'+curIndex+'" name="inspectionDetails['+curIndex+'].returnInspectionNum" value="'+value+'">'; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'returnInspectionType', |
|||
align: 'center', |
|||
title: '退检类型', |
|||
formatter: function (value,row,index){ |
|||
var curIndex = index; |
|||
return '<input class = "form-control" data-id = "returnInspectionType_'+curIndex+'" name="inspectionDetails['+curIndex+'].returnInspectionType" value="'+value+'">'; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'urgencyLevel', |
|||
align: 'center', |
|||
title: '紧急程度', |
|||
formatter: function (value,row,index){ |
|||
var curIndex = index; |
|||
// return '<input class = "form-control" data-id = "urgencyLevel_'+curIndex+'" name="inspectionDetails['+curIndex+'].urgencyLevel" value="'+value+'">'; |
|||
var data = [{ index: curIndex, type: value }]; |
|||
return $("#urgencyLevelTpl").tmpl(data).html(); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'pickMaterialTime', |
|||
align: 'center', |
|||
title: '领料时间', |
|||
formatter: function (value,row,index){ |
|||
var curIndex = index; |
|||
var html = $.common.sprintf("<input class='form-control' type='text' name='inspectionDetails[%s].pickMaterialTime' value='%s' placeholder='yyyy-MM-dd'>", curIndex, value); |
|||
return html; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'returnInspectionRemark', |
|||
align: 'center', |
|||
title: '退检备注', |
|||
formatter: function (value,row,index){ |
|||
var curIndex = index; |
|||
return '<input class = "form-control" data-id = "returnInspectionRemark_'+curIndex+'" name="inspectionDetails['+curIndex+'].returnInspectionRemark" value="'+value+'">'; |
|||
} |
|||
} |
|||
] |
|||
}; |
|||
$.table.init(options); |
|||
}) |
|||
|
|||
function queryParams(params) { |
|||
var curParams = { |
|||
// 传递参数查询参数 |
|||
pageSize: params.limit, |
|||
pageNum: params.offset / params.limit + 1, |
|||
searchValue: params.search, |
|||
orderByColumn: params.sort, |
|||
isAsc: params.order |
|||
}; |
|||
// 额外传参 |
|||
curParams.returnInspectionNo = $("#returnInspectionNo").val(); |
|||
return curParams; |
|||
} |
|||
|
|||
|
|||
|
|||
function selectMakeOrder() { |
|||
var url = ctx + "system/makeorder/selectMakeorder"; |
|||
var options = { |
|||
title: '选择生产订单', |
|||
url: url, |
|||
callBack: doSubmit1 |
|||
}; |
|||
$.modal.openOptions(options); |
|||
} |
|||
|
|||
function doSubmit1(index, layero){ |
|||
debugger |
|||
var iframeWin = window[layero.find('iframe')[0]['name']]; |
|||
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0]; |
|||
$("#makeNo").val(rowData.makeNo); |
|||
$.modal.close(index); |
|||
} |
|||
|
|||
|
|||
/* 新增表格行 */ |
|||
function insertRow(){ |
|||
var makeNo = $("#makeNo").val(); |
|||
if(!makeNo){ |
|||
$.modal.msgWarning("请先选择生产单号!"); |
|||
return; |
|||
} |
|||
var url = ctx + "system/makeorder/selectMakeorderDetail/"+makeNo; |
|||
var options = { |
|||
title: '选择料号', |
|||
url: url, |
|||
callBack: doSubmit |
|||
}; |
|||
$.modal.openOptions(options); |
|||
} |
|||
/* 删除指定表格行 */ |
|||
function removeRow(){ |
|||
var ids = $.table.selectColumns("id"); |
|||
if (ids.length == 0) { |
|||
$.modal.alertWarning("请至少选择一条记录"); |
|||
return; |
|||
} |
|||
$("#bootstrap-sub-table-1").bootstrapTable('remove', { |
|||
field: 'id', |
|||
values: ids |
|||
}) |
|||
} |
|||
|
|||
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]; |
|||
var totalNum = $("#bootstrap-sub-table-1").bootstrapTable('getData').length; |
|||
console.log("rowData:"+rowData); |
|||
$("#bootstrap-sub-table-1").bootstrapTable('insertRow',{ |
|||
index: 1, |
|||
row: { |
|||
id: totalNum+1, |
|||
materialNo: rowData.materialNo, |
|||
photoUrl: rowData.photoUrl, |
|||
materialName: rowData.materialName, |
|||
materialType: rowData.materialType, |
|||
describe: rowData.describe, |
|||
brand: rowData.brand, |
|||
unit: rowData.unit, |
|||
processMethod: rowData.processMethod, |
|||
returnInspectionNum: '', |
|||
returnInspectionType: '', |
|||
urgencyLevel: '', |
|||
pickMaterialTime: '', |
|||
returnInspectionRemark: '' |
|||
} |
|||
}) |
|||
layer.close(index); |
|||
} |
|||
|
|||
$("#form-materialReturnInspection-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/edit", $('#form-materialReturnInspection-edit').serialize()); |
|||
} |
|||
} |
|||
|
|||
$("input[name='returnMaterialTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
$("#bootstrap-sub-table-1").on("post-body.bs.table", function (e, args) { |
|||
$("input[name$='Time']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true, |
|||
pickerPosition:'top-right' |
|||
}); |
|||
}); |
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
|||
|
|||
<!-- 紧急程度 --> |
|||
<script id="urgencyLevelTpl" type="text/x-jquery-tmpl"> |
|||
<div> |
|||
<select class='form-control' name='inspectionDetails[${index}].urgencyLevel'> |
|||
<option value=""></option> |
|||
<option value="0" {{if type==="0"}}selected{{/if}}>一般</option> |
|||
<option value="1" {{if type==="1"}}selected{{/if}}>紧急</option> |
|||
</select> |
|||
</div> |
|||
</script> |
@ -0,0 +1,138 @@ |
|||
<!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="returnInspectionNo"/> |
|||
</li> |
|||
<li> |
|||
<label>退检类型:</label> |
|||
<input type="text" name="returnInspectionType"/> |
|||
</li> |
|||
<li> |
|||
<label>生产单号:</label> |
|||
<input type="text" name="makeNo"/> |
|||
</li> |
|||
<li> |
|||
<label>料号:</label> |
|||
<input type="text" name="materialNo"/> |
|||
</li> |
|||
<li> |
|||
<label>物料名称:</label> |
|||
<input type="text" name="materialName"/> |
|||
</li> |
|||
<li class="select-time"> |
|||
<label>录入时间:</label> |
|||
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/> |
|||
<span>-</span> |
|||
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/> |
|||
</li> |
|||
<li> |
|||
<label>紧急程度:</label> |
|||
<select name="urgencyLevel" th:with="type=${@dict.getType('urgency_level')}"> |
|||
<option value="">所有</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</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="erp:materialReturnInspection:add"> |
|||
<i class="fa fa-plus"></i> 添加 |
|||
</a> |
|||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="erp:materialReturnInspection: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:inline="javascript"> |
|||
var editFlag = [[${@permission.hasPermi('erp:materialReturnInspection:edit')}]]; |
|||
var removeFlag = [[${@permission.hasPermi('erp:materialReturnInspection:remove')}]]; |
|||
var cancelFlag = [[${@permission.hasPermi('erp:materialReturnInspection:cancel')}]]; |
|||
var restoreFlag = [[${@permission.hasPermi('erp:materialReturnInspection:restore')}]]; |
|||
// 字典 |
|||
var urgencyLevelDatas = [[${@dict.getType('urgency_level')}]]; |
|||
var yesOrNoDatas = [[${@dict.getType('yes_or_no')}]]; |
|||
var prefix = ctx + "erp/materialReturnInspection"; |
|||
|
|||
$(function() { |
|||
var options = { |
|||
url: prefix + "/list", |
|||
createUrl: prefix + "/add", |
|||
updateUrl: prefix + "/edit/{id}", |
|||
removeUrl: prefix + "/remove", |
|||
cancelUrl: prefix + "/cancel/{id}", |
|||
restoreUrl: prefix + "/restore/{id}", |
|||
exportUrl: prefix + "/export", |
|||
modalName: "物料退检单", |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
title: '主键ID', |
|||
field: 'id', |
|||
visible: false |
|||
}, |
|||
{ |
|||
title: '退检单号', |
|||
field: 'returnInspectionNo' |
|||
}, |
|||
{ |
|||
title: '是否结案', |
|||
field: 'isClosed', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(yesOrNoDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
title: '关联生产单号', |
|||
field: 'makeNo', |
|||
}, |
|||
{ |
|||
title: '退料时间', |
|||
field: 'returnMaterialTime', |
|||
}, |
|||
{ |
|||
title: '紧急程度', |
|||
field: 'urgencyLevel', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(urgencyLevelDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
title: '操作', |
|||
align: 'center', |
|||
formatter: function(value, row, index) { |
|||
var actions = []; |
|||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); |
|||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> '); |
|||
return actions.join(''); |
|||
} |
|||
}] |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,156 @@ |
|||
<!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-materialReturnInspectionDetail-add"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">删除标志:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="delFlag" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">备注:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="remark" class="form-control"></textarea> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">退检单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="returnInspectionNo" 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="materialNo" 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="materialName" 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="materialType" class="form-control m-b"> |
|||
<option value="">所有</option> |
|||
</select> |
|||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">加工方式:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="processMethod" 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="unit" 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="brand" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">描述:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="describe" class="form-control"></textarea> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">订单用量:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="orderNum" 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="returnInspectionNum" 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="returnInspectionType" class="form-control m-b"> |
|||
<option value="">所有</option> |
|||
</select> |
|||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">紧急程度:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="urgencyLevel" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">领料时间:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="pickMaterialTime" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">退检备注:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="returnInspectionRemark" 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="abnormalCause" 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="dutyUnit" 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="recheckRemark" 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 + "erp/materialReturnInspectionDetail" |
|||
$("#form-materialReturnInspectionDetail-add").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/add", $('#form-materialReturnInspectionDetail-add').serialize()); |
|||
} |
|||
} |
|||
|
|||
$("input[name='pickMaterialTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,151 @@ |
|||
<!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-materialReturnInspectionDetail-edit" th:object="${erpMaterialReturnInspectionDetail}"> |
|||
<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"> |
|||
<textarea name="remark" class="form-control">[[*{remark}]]</textarea> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">退检单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="returnInspectionNo" th:field="*{returnInspectionNo}" 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="materialNo" th:field="*{materialNo}" 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="materialName" th:field="*{materialName}" 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="materialType" class="form-control m-b"> |
|||
<option value="">所有</option> |
|||
</select> |
|||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">加工方式:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="processMethod" th:field="*{processMethod}" 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="unit" th:field="*{unit}" 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="brand" th:field="*{brand}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">描述:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="describe" class="form-control">[[*{describe}]]</textarea> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">订单用量:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="orderNum" th:field="*{orderNum}" 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="returnInspectionNum" th:field="*{returnInspectionNum}" 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="returnInspectionType" class="form-control m-b"> |
|||
<option value="">所有</option> |
|||
</select> |
|||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">紧急程度:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="urgencyLevel" th:field="*{urgencyLevel}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">领料时间:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="pickMaterialTime" th:value="${#dates.format(erpMaterialReturnInspectionDetail.pickMaterialTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">退检备注:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="returnInspectionRemark" th:field="*{returnInspectionRemark}" 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="abnormalCause" th:field="*{abnormalCause}" 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="dutyUnit" th:field="*{dutyUnit}" 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="recheckRemark" th:field="*{recheckRemark}" 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 + "erp/materialReturnInspectionDetail"; |
|||
$("#form-materialReturnInspectionDetail-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/edit", $('#form-materialReturnInspectionDetail-edit').serialize()); |
|||
} |
|||
} |
|||
|
|||
$("input[name='pickMaterialTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,229 @@ |
|||
<!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="returnInspectionNo"/> |
|||
</li> |
|||
<li> |
|||
<label>料号:</label> |
|||
<input type="text" name="materialNo"/> |
|||
</li> |
|||
<li> |
|||
<label>物料名称:</label> |
|||
<input type="text" name="materialName"/> |
|||
</li> |
|||
<li> |
|||
<label>物料类型:</label> |
|||
<select name="materialType"> |
|||
<option value="">所有</option> |
|||
<option value="-1">代码生成请选择字典属性</option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<label>加工方式:</label> |
|||
<input type="text" name="processMethod"/> |
|||
</li> |
|||
<li> |
|||
<label>单位:</label> |
|||
<input type="text" name="unit"/> |
|||
</li> |
|||
<li> |
|||
<label>品牌:</label> |
|||
<input type="text" name="brand"/> |
|||
</li> |
|||
<li> |
|||
<label>订单用量:</label> |
|||
<input type="text" name="orderNum"/> |
|||
</li> |
|||
<li> |
|||
<label>退检数量:</label> |
|||
<input type="text" name="returnInspectionNum"/> |
|||
</li> |
|||
<li> |
|||
<label>退检类型:</label> |
|||
<select name="returnInspectionType"> |
|||
<option value="">所有</option> |
|||
<option value="-1">代码生成请选择字典属性</option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<label>紧急程度:</label> |
|||
<input type="text" name="urgencyLevel"/> |
|||
</li> |
|||
<li> |
|||
<label>领料时间:</label> |
|||
<input type="text" class="time-input" placeholder="请选择领料时间" name="pickMaterialTime"/> |
|||
</li> |
|||
<li> |
|||
<label>退检备注:</label> |
|||
<input type="text" name="returnInspectionRemark"/> |
|||
</li> |
|||
<li> |
|||
<label>异常原因:</label> |
|||
<input type="text" name="abnormalCause"/> |
|||
</li> |
|||
<li> |
|||
<label>责任单位:</label> |
|||
<input type="text" name="dutyUnit"/> |
|||
</li> |
|||
<li> |
|||
<label>复检备注:</label> |
|||
<input type="text" name="recheckRemark"/> |
|||
</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="erp:materialReturnInspectionDetail:add"> |
|||
<i class="fa fa-plus"></i> 添加 |
|||
</a> |
|||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="erp:materialReturnInspectionDetail:edit"> |
|||
<i class="fa fa-edit"></i> 修改 |
|||
</a> |
|||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="erp:materialReturnInspectionDetail:remove"> |
|||
<i class="fa fa-remove"></i> 删除 |
|||
</a> |
|||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="erp:materialReturnInspectionDetail: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:inline="javascript"> |
|||
var editFlag = [[${@permission.hasPermi('erp:materialReturnInspectionDetail:edit')}]]; |
|||
var removeFlag = [[${@permission.hasPermi('erp:materialReturnInspectionDetail:remove')}]]; |
|||
var cancelFlag = [[${@permission.hasPermi('erp:materialReturnInspectionDetail:cancel')}]]; |
|||
var restoreFlag = [[${@permission.hasPermi('erp:materialReturnInspectionDetail:restore')}]]; |
|||
var prefix = ctx + "erp/materialReturnInspectionDetail"; |
|||
|
|||
$(function() { |
|||
var options = { |
|||
url: prefix + "/list", |
|||
createUrl: prefix + "/add", |
|||
updateUrl: prefix + "/edit/{id}", |
|||
removeUrl: prefix + "/remove", |
|||
cancelUrl: prefix + "/cancel/{id}", |
|||
restoreUrl: prefix + "/restore/{id}", |
|||
exportUrl: prefix + "/export", |
|||
modalName: "物料退检单明细", |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
title: '主键ID', |
|||
field: 'id', |
|||
visible: false |
|||
}, |
|||
{ |
|||
title: '备注', |
|||
field: 'remark', |
|||
}, |
|||
{ |
|||
title: '退检单号', |
|||
field: 'returnInspectionNo', |
|||
}, |
|||
{ |
|||
title: '料号', |
|||
field: 'materialNo', |
|||
}, |
|||
{ |
|||
title: '物料名称', |
|||
field: 'materialName', |
|||
}, |
|||
{ |
|||
title: '物料类型', |
|||
field: 'materialType', |
|||
}, |
|||
{ |
|||
title: '加工方式', |
|||
field: 'processMethod', |
|||
}, |
|||
{ |
|||
title: '单位', |
|||
field: 'unit', |
|||
}, |
|||
{ |
|||
title: '品牌', |
|||
field: 'brand', |
|||
}, |
|||
{ |
|||
title: '描述', |
|||
field: 'describe', |
|||
}, |
|||
{ |
|||
title: '订单用量', |
|||
field: 'orderNum', |
|||
}, |
|||
{ |
|||
title: '退检数量', |
|||
field: 'returnInspectionNum', |
|||
}, |
|||
{ |
|||
title: '退检类型', |
|||
field: 'returnInspectionType', |
|||
}, |
|||
{ |
|||
title: '紧急程度', |
|||
field: 'urgencyLevel', |
|||
}, |
|||
{ |
|||
title: '领料时间', |
|||
field: 'pickMaterialTime', |
|||
}, |
|||
{ |
|||
title: '退检备注', |
|||
field: 'returnInspectionRemark', |
|||
}, |
|||
{ |
|||
title: '异常原因', |
|||
field: 'abnormalCause', |
|||
}, |
|||
{ |
|||
title: '责任单位', |
|||
field: 'dutyUnit', |
|||
}, |
|||
{ |
|||
title: '复检备注', |
|||
field: 'recheckRemark', |
|||
}, |
|||
{ |
|||
title: '操作', |
|||
align: 'center', |
|||
formatter: function(value, row, index) { |
|||
var actions = []; |
|||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); |
|||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> '); |
|||
if(row.delFlag == '0'){ |
|||
actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i>作废</a> '); |
|||
}else{ |
|||
actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i>恢复</a> '); |
|||
} |
|||
return actions.join(''); |
|||
} |
|||
}] |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,152 @@ |
|||
<!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="makeNo"/> |
|||
</li> |
|||
<li> |
|||
<label>关联销售订单号:</label> |
|||
<input type="text" name="saleNo"/> |
|||
</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="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-select-table"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var editFlag = [[${@permission.hasPermi('system:makeorder:edit')}]]; |
|||
var removeFlag = [[${@permission.hasPermi('system:makeorder:remove')}]]; |
|||
var cancelFlag = [[${@permission.hasPermi('system:makeorder:cancel')}]]; |
|||
var restoreFlag = [[${@permission.hasPermi('system:makeorder:restore')}]]; |
|||
var makeStatusDatas = [[${@dict.getType('sys_erp_makeStatus')}]]; |
|||
var eceiptStatusDatas = [[${@dict.getType('eceiptStatus')}]]; |
|||
var qualityStatusDatas = [[${@dict.getType('qualityStatus')}]]; |
|||
var useStatusDatas = [[${@dict.getType('useStatus')}]]; |
|||
var prefix = ctx + "system/makeorder"; |
|||
|
|||
$(function() { |
|||
var options = { |
|||
id: "bootstrap-select-table", |
|||
url: prefix + "/list", |
|||
modalName: "生产订单", |
|||
clickToSelect: true, // 点击选中行 |
|||
singleSelect: true, // 单选 |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
field: 'id', |
|||
title: '生产订单id', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'makeStatus', |
|||
title: '生产状态', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(makeStatusDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'eceiptStatus', |
|||
title: '入库状态', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(eceiptStatusDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'qualityStatus', |
|||
title: '品质状态', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(qualityStatusDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'useStatus', |
|||
title: '使用状态', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(useStatusDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'makeNo', |
|||
title: '生产订单号' |
|||
}, |
|||
{ |
|||
field: 'saleNo', |
|||
title: '关联销售订单号' |
|||
}, |
|||
{ |
|||
field: 'Salesman', |
|||
title: '业务员' |
|||
}, |
|||
{ |
|||
field: 'customerId', |
|||
title: '客户ID' |
|||
}, |
|||
{ |
|||
field: 'customerName', |
|||
title: '客户名称' |
|||
}, |
|||
{ |
|||
field: 'customerOderCode', |
|||
title: '客户订单号' |
|||
}, |
|||
{ |
|||
field: 'material', |
|||
title: '物料合计' |
|||
}, |
|||
{ |
|||
field: 'materialSum', |
|||
title: '数量合计' |
|||
}, |
|||
{ |
|||
field: 'finishNum', |
|||
title: '已完成数量' |
|||
}, |
|||
{ |
|||
field: 'eceiptNum', |
|||
title: '已入库数量' |
|||
}, |
|||
{ |
|||
field: 'noRate', |
|||
title: '不含税生产成本(RMB)' |
|||
}, |
|||
{ |
|||
field: 'rate', |
|||
title: '含税生产成本(RMB)' |
|||
}, |
|||
{ |
|||
field: 'remark', |
|||
title: '备注' |
|||
}, |
|||
{ |
|||
field: 'deptLeaderConfirmStatus', |
|||
title: '部门主管确认状态', |
|||
visible: false |
|||
}] |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,133 @@ |
|||
<!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="makeNo"/> |
|||
</li> |
|||
<li> |
|||
<label>关联销售订单号:</label> |
|||
<input type="text" name="saleNo"/> |
|||
</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="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-select-table"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var makeNo = [[${makeNo}]]; |
|||
var prefix = ctx + "system/makeorder"; |
|||
|
|||
var processMethodDatas = [[${@dict.getType('processMethod')}]]; |
|||
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; |
|||
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; |
|||
var levelDatas = [[${@dict.getType('bomLevel')}]]; |
|||
var processMethodDatas = [[${@dict.getType('processMethod')}]]; |
|||
|
|||
$(function() { |
|||
var options = { |
|||
id: "bootstrap-select-table", |
|||
url: prefix + "/materialList", |
|||
modalName: "生产订单", |
|||
clickToSelect: true, // 点击选中行 |
|||
singleSelect: true, // 单选 |
|||
queryParams:queryParams, |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
field: 'id', |
|||
title: '序号', |
|||
formatter: function (value, row, index) { |
|||
return $.table.serialNumber(index); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'makeNo', |
|||
title: '生产订单号' |
|||
}, |
|||
{ |
|||
field: 'saleNo', |
|||
title: '关联销售订单号' |
|||
}, |
|||
{ |
|||
field: 'materialNo', |
|||
title: '料号' |
|||
}, |
|||
{ |
|||
field: 'photoUrl', |
|||
title: '图片', |
|||
formatter: function(value, row, index) { |
|||
return $.table.imageView(value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'materialName', |
|||
title: '物料名称', |
|||
}, |
|||
{ |
|||
field: 'materialType', |
|||
align: 'center', |
|||
title: '物料类型', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectCategoryLabel(materialTypeDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'unit', |
|||
align: 'center', |
|||
title: '单位', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(sysUnitClassDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'brand', |
|||
align: 'center', |
|||
title: '品牌' |
|||
}, |
|||
{ |
|||
field: 'describe', |
|||
align: 'center', |
|||
title: '描述' |
|||
}, |
|||
{ |
|||
field: 'processMethod', |
|||
align: 'center', |
|||
title: '加工方式', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(processMethodDatas, value); |
|||
} |
|||
}, |
|||
] |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
|
|||
function queryParams(params) { |
|||
var search = $.table.queryParams(params); |
|||
search.makeNo = makeNo; |
|||
return search; |
|||
} |
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue