Browse Source

[feat]: 新增库存报损物料信息子表对象,新增对象mapper,Controller,service,新增报损数据子表信息列表字段。

dev
zhangsiqi 3 weeks ago
parent
commit
38e2747f1e
  1. 151
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseInventoryReportDamageChildController.java
  2. 102
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/VO/WarehouseInventoryReportDamegeVo.java
  3. 120
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseInventoryReportDamage.java
  4. 309
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseInventoryReportDamageChild.java
  5. 100
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseInventoryReportDamageChildMapper.java
  6. 2
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseInventoryReportDamageMapper.java
  7. 91
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseInventoryReportDamageChildService.java
  8. 136
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseInventoryReportDamageChildServiceImpl.java
  9. 70
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseInventoryReportDamageServiceImpl.java
  10. 195
      ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseInventoryReportDamageChildMapper.xml
  11. 3
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryCheck/add.html
  12. 5
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryCheck/detail.html
  13. 121
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryReportDamage/add.html
  14. 99
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryReportDamage/detail.html
  15. 122
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryReportDamage/edit.html
  16. 124
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryReportDamage/inventoryReportDamage.html

151
ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseInventoryReportDamageChildController.java

@ -0,0 +1,151 @@
package com.ruoyi.warehouse.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.warehouse.domain.WarehouseInventoryReportDamageChild;
import com.ruoyi.warehouse.service.IWarehouseInventoryReportDamageChildService;
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 zhang
* @date 2024-08-29
*/
@Controller
@RequestMapping("/warehouse/inventoryReportDamageChild")
public class WarehouseInventoryReportDamageChildController extends BaseController
{
private String prefix = "warehouse/inventoryReportDamageChild";
@Autowired
private IWarehouseInventoryReportDamageChildService warehouseInventoryReportDamageChildService;
@RequiresPermissions("warehouse:inventoryReportDamageChild:view")
@GetMapping()
public String inventoryReportDamageChild()
{
return prefix + "/inventoryReportDamageChild";
}
/**
* 查询仓库库存报损物料信息列表
*/
// @RequiresPermissions("warehouse:inventoryReportDamageChild:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(WarehouseInventoryReportDamageChild warehouseInventoryReportDamageChild)
{
startPage();
List<WarehouseInventoryReportDamageChild> list = warehouseInventoryReportDamageChildService.selectWarehouseInventoryReportDamageChildList(warehouseInventoryReportDamageChild);
return getDataTable(list);
}
/**
* 导出仓库库存报损物料信息列表
*/
// @RequiresPermissions("warehouse:inventoryReportDamageChild:export")
@Log(title = "仓库库存报损物料信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(WarehouseInventoryReportDamageChild warehouseInventoryReportDamageChild)
{
List<WarehouseInventoryReportDamageChild> list = warehouseInventoryReportDamageChildService.selectWarehouseInventoryReportDamageChildList(warehouseInventoryReportDamageChild);
ExcelUtil<WarehouseInventoryReportDamageChild> util = new ExcelUtil<WarehouseInventoryReportDamageChild>(WarehouseInventoryReportDamageChild.class);
return util.exportExcel(list, "仓库库存报损物料信息数据");
}
/**
* 新增仓库库存报损物料信息
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存仓库库存报损物料信息
*/
// @RequiresPermissions("warehouse:inventoryReportDamageChild:add")
@Log(title = "仓库库存报损物料信息", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(WarehouseInventoryReportDamageChild warehouseInventoryReportDamageChild)
{
return toAjax(warehouseInventoryReportDamageChildService.insertWarehouseInventoryReportDamageChild(warehouseInventoryReportDamageChild));
}
/**
* 修改仓库库存报损物料信息
*/
// @GetMapping("/edit/{reportDamageChildId}")
public String edit(@PathVariable("reportDamageChildId") Long reportDamageChildId, ModelMap mmap)
{
WarehouseInventoryReportDamageChild warehouseInventoryReportDamageChild = warehouseInventoryReportDamageChildService.selectWarehouseInventoryReportDamageChildById(reportDamageChildId);
mmap.put("warehouseInventoryReportDamageChild", warehouseInventoryReportDamageChild);
return prefix + "/edit";
}
/**
* 修改保存仓库库存报损物料信息
*/
// @RequiresPermissions("warehouse:inventoryReportDamageChild:edit")
@Log(title = "仓库库存报损物料信息", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(WarehouseInventoryReportDamageChild warehouseInventoryReportDamageChild)
{
return toAjax(warehouseInventoryReportDamageChildService.updateWarehouseInventoryReportDamageChild(warehouseInventoryReportDamageChild));
}
/**
* 删除仓库库存报损物料信息
*/
// @RequiresPermissions("warehouse:inventoryReportDamageChild:remove")
@Log(title = "仓库库存报损物料信息", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(warehouseInventoryReportDamageChildService.deleteWarehouseInventoryReportDamageChildByIds(ids));
}
/**
* 作废仓库库存报损物料信息
*/
// @RequiresPermissions("warehouse:inventoryReportDamageChild:cancel")
@Log(title = "仓库库存报损物料信息", businessType = BusinessType.CANCEL)
@GetMapping( "/cancel/{id}")
@ResponseBody
public AjaxResult cancel(@PathVariable("id") Long id){
return toAjax(warehouseInventoryReportDamageChildService.cancelWarehouseInventoryReportDamageChildById(id));
}
/**
* 恢复仓库库存报损物料信息
*/
// @RequiresPermissions("warehouse:inventoryReportDamageChild:restore")
@Log(title = "仓库库存报损物料信息", businessType = BusinessType.RESTORE)
@GetMapping( "/restore/{id}")
@ResponseBody
public AjaxResult restore(@PathVariable("id")Long id)
{
return toAjax(warehouseInventoryReportDamageChildService.restoreWarehouseInventoryReportDamageChildById(id));
}
}

102
ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/VO/WarehouseInventoryReportDamegeVo.java

@ -0,0 +1,102 @@
package com.ruoyi.warehouse.domain.VO;
import com.ruoyi.warehouse.domain.WarehouseInventoryReportDamage;
import java.util.Date;
public class WarehouseInventoryReportDamegeVo extends WarehouseInventoryReportDamage {
private static final long serialVersionUID = 1L;
/** 申请人姓名 */
private String applyUserName;
/** 任务ID */
private String taskId;
/** 任务名称 */
private String taskName;
/** 办理时间 */
private Date doneTime;
/** 创建人 */
private String createUserName;
/** 流程实例状态 1 激活 2 挂起 */
private String suspendState;
/** 待办用户id */
private String todoUserId;
/** 流程实例类型名称 */
private String instanceTypeName;
/**
* 关键词
*/
private String keyword;
public String getApplyUserName() {
return applyUserName;
}
public void setApplyUserName(String applyUserName) {
this.applyUserName = applyUserName;
}
public String getTaskId() {
return taskId;
}
public void setTaskId(String taskId) {
this.taskId = taskId;
}
public String getTaskName() {
return taskName;
}
public void setTaskName(String taskName) {
this.taskName = taskName;
}
public Date getDoneTime() {
return doneTime;
}
public void setDoneTime(Date doneTime) {
this.doneTime = doneTime;
}
public String getCreateUserName() {
return createUserName;
}
public void setCreateUserName(String createUserName) {
this.createUserName = createUserName;
}
public String getSuspendState() {
return suspendState;
}
public void setSuspendState(String suspendState) {
this.suspendState = suspendState;
}
public String getTodoUserId() {
return todoUserId;
}
public void setTodoUserId(String todoUserId) {
this.todoUserId = todoUserId;
}
public String getInstanceTypeName() {
return instanceTypeName;
}
public void setInstanceTypeName(String instanceTypeName) {
this.instanceTypeName = instanceTypeName;
}
public String getKeyword() {
return keyword;
}
public void setKeyword(String keyword) {
this.keyword = keyword;
}
}

120
ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseInventoryReportDamage.java

@ -1,6 +1,8 @@
package com.ruoyi.warehouse.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;
@ -73,6 +75,36 @@ public class WarehouseInventoryReportDamage extends BaseEntity
@Excel(name = "仓库存放地址")
private String warehouseStoreAddress;
/** 流程实例ID */
private String instanceId;
/** 流程实例类型 */
private String instanceType;
/** 提交流程实例ID */
private String submitInstanceId;
/** 作废流程实例ID */
private String cancelInstanceId;
/** 恢复流程实例ID */
private String restoreInstanceId;
/** 申请人 */
private String applyTitle;
/** 申请人 */
@Excel(name = "申请人",sort = 10)
private String applyUser;
private Long photoAttachId;
private String fileIdStr;
private String removeFileIdStr;
private List<WarehouseInventoryReportDamageChild> warehouseInventoryReportDamageChildList;
public void setReportDamageId(Long reportDamageId)
{
this.reportDamageId = reportDamageId;
@ -200,6 +232,94 @@ public class WarehouseInventoryReportDamage extends BaseEntity
return warehouseStoreAddress;
}
public List<WarehouseInventoryReportDamageChild> getWarehouseInventoryReportDamageChildList() {
return warehouseInventoryReportDamageChildList;
}
public void setWarehouseInventoryReportDamageChildList(List<WarehouseInventoryReportDamageChild> warehouseInventoryReportDamageChildList) {
this.warehouseInventoryReportDamageChildList = warehouseInventoryReportDamageChildList;
}
public String getInstanceId() {
return instanceId;
}
public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
}
public String getInstanceType() {
return instanceType;
}
public void setInstanceType(String instanceType) {
this.instanceType = instanceType;
}
public String getSubmitInstanceId() {
return submitInstanceId;
}
public void setSubmitInstanceId(String submitInstanceId) {
this.submitInstanceId = submitInstanceId;
}
public String getCancelInstanceId() {
return cancelInstanceId;
}
public void setCancelInstanceId(String cancelInstanceId) {
this.cancelInstanceId = cancelInstanceId;
}
public String getRestoreInstanceId() {
return restoreInstanceId;
}
public void setRestoreInstanceId(String restoreInstanceId) {
this.restoreInstanceId = restoreInstanceId;
}
public String getApplyTitle() {
return applyTitle;
}
public void setApplyTitle(String applyTitle) {
this.applyTitle = applyTitle;
}
public String getApplyUser() {
return applyUser;
}
public void setApplyUser(String applyUser) {
this.applyUser = applyUser;
}
public Long getPhotoAttachId() {
return photoAttachId;
}
public void setPhotoAttachId(Long photoAttachId) {
this.photoAttachId = photoAttachId;
}
public String getFileIdStr() {
return fileIdStr;
}
public void setFileIdStr(String fileIdStr) {
this.fileIdStr = fileIdStr;
}
public String getRemoveFileIdStr() {
return removeFileIdStr;
}
public void setRemoveFileIdStr(String removeFileIdStr) {
this.removeFileIdStr = removeFileIdStr;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

309
ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseInventoryReportDamageChild.java

@ -0,0 +1,309 @@
package com.ruoyi.warehouse.domain;
import java.math.BigDecimal;
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;
/**
* 仓库库存报损物料信息对象 warehouse_inventory_report_damage_child
*
* @author zhang
* @date 2024-08-29
*/
public class WarehouseInventoryReportDamageChild extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 库存报损id */
private Long reportDamageChildId;
/** 关联生产单号 */
@Excel(name = "关联生产单号")
private String makeNo;
/** 报损单号 */
@Excel(name = "报损单号")
private String reportDamageCode;
/** 料号 */
@Excel(name = "料号")
private String materialNo;
/** 图片 */
@Excel(name = "图片")
private String materialPhotourl;
/** 物料名称 */
@Excel(name = "物料名称")
private String materialName;
/** 物料类型 */
@Excel(name = "物料类型")
private String materialType;
/** 描述 */
@Excel(name = "描述")
private String materialDescribe;
/** 品牌 */
@Excel(name = "品牌")
private String materialBrand;
/** 实际报废数量 */
@Excel(name = "实际报废数量")
private BigDecimal actualScrapQuantity;
/** 报废类型 */
@Excel(name = "报废类型")
private String scrapType;
/** 报废明细 */
@Excel(name = "报废明细")
private String scrapDetail;
/** 品质判定 */
@Excel(name = "品质判定")
private String qualityAssessment;
/** 预估价值(RMB) */
@Excel(name = "预估价值(RMB)")
private BigDecimal estimatedValueRmb;
/** 责任单位 */
@Excel(name = "责任单位")
private String responsibleUnit;
/** 仓库ID */
@Excel(name = "仓库ID")
private String warehouseCode;
/** 仓库名称 */
@Excel(name = "仓库名称")
private String warehouseName;
/** 仓库存放地址 */
@Excel(name = "仓库存放地址")
private String warehouseStoreAddress;
/** 申请部门ID */
@Excel(name = "申请部门ID")
private String applyDeptId;
/** 申请部门 */
@Excel(name = "申请部门")
private String applyDept;
public void setReportDamageChildId(Long reportDamageChildId)
{
this.reportDamageChildId = reportDamageChildId;
}
public Long getReportDamageChildId()
{
return reportDamageChildId;
}
public void setMakeNo(String makeNo)
{
this.makeNo = makeNo;
}
public String getMakeNo()
{
return makeNo;
}
public void setReportDamageCode(String reportDamageCode)
{
this.reportDamageCode = reportDamageCode;
}
public String getReportDamageCode()
{
return reportDamageCode;
}
public void setMaterialNo(String materialNo)
{
this.materialNo = materialNo;
}
public String getMaterialNo()
{
return materialNo;
}
public void setMaterialPhotourl(String materialPhotourl)
{
this.materialPhotourl = materialPhotourl;
}
public String getMaterialPhotourl()
{
return materialPhotourl;
}
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 setMaterialDescribe(String materialDescribe)
{
this.materialDescribe = materialDescribe;
}
public String getMaterialDescribe()
{
return materialDescribe;
}
public void setMaterialBrand(String materialBrand)
{
this.materialBrand = materialBrand;
}
public String getMaterialBrand()
{
return materialBrand;
}
public void setActualScrapQuantity(BigDecimal actualScrapQuantity)
{
this.actualScrapQuantity = actualScrapQuantity;
}
public BigDecimal getActualScrapQuantity()
{
return actualScrapQuantity;
}
public void setScrapType(String scrapType)
{
this.scrapType = scrapType;
}
public String getScrapType()
{
return scrapType;
}
public void setScrapDetail(String scrapDetail)
{
this.scrapDetail = scrapDetail;
}
public String getScrapDetail()
{
return scrapDetail;
}
public void setQualityAssessment(String qualityAssessment)
{
this.qualityAssessment = qualityAssessment;
}
public String getQualityAssessment()
{
return qualityAssessment;
}
public void setEstimatedValueRmb(BigDecimal estimatedValueRmb)
{
this.estimatedValueRmb = estimatedValueRmb;
}
public BigDecimal getEstimatedValueRmb()
{
return estimatedValueRmb;
}
public void setResponsibleUnit(String responsibleUnit)
{
this.responsibleUnit = responsibleUnit;
}
public String getResponsibleUnit()
{
return responsibleUnit;
}
public void setWarehouseCode(String warehouseCode)
{
this.warehouseCode = warehouseCode;
}
public String getWarehouseCode()
{
return warehouseCode;
}
public void setWarehouseName(String warehouseName)
{
this.warehouseName = warehouseName;
}
public String getWarehouseName()
{
return warehouseName;
}
public void setWarehouseStoreAddress(String warehouseStoreAddress)
{
this.warehouseStoreAddress = warehouseStoreAddress;
}
public String getWarehouseStoreAddress()
{
return warehouseStoreAddress;
}
public void setApplyDeptId(String applyDeptId)
{
this.applyDeptId = applyDeptId;
}
public String getApplyDeptId()
{
return applyDeptId;
}
public void setApplyDept(String applyDept)
{
this.applyDept = applyDept;
}
public String getApplyDept()
{
return applyDept;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("reportDamageChildId", getReportDamageChildId())
.append("makeNo", getMakeNo())
.append("reportDamageCode", getReportDamageCode())
.append("materialNo", getMaterialNo())
.append("materialPhotourl", getMaterialPhotourl())
.append("materialName", getMaterialName())
.append("materialType", getMaterialType())
.append("materialDescribe", getMaterialDescribe())
.append("materialBrand", getMaterialBrand())
.append("actualScrapQuantity", getActualScrapQuantity())
.append("scrapType", getScrapType())
.append("scrapDetail", getScrapDetail())
.append("qualityAssessment", getQualityAssessment())
.append("estimatedValueRmb", getEstimatedValueRmb())
.append("responsibleUnit", getResponsibleUnit())
.append("remark", getRemark())
.append("warehouseCode", getWarehouseCode())
.append("warehouseName", getWarehouseName())
.append("warehouseStoreAddress", getWarehouseStoreAddress())
.append("applyDeptId", getApplyDeptId())
.append("applyDept", getApplyDept())
.append("createTime", getCreateTime())
.append("createBy", getCreateBy())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

100
ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseInventoryReportDamageChildMapper.java

@ -0,0 +1,100 @@
package com.ruoyi.warehouse.mapper;
import java.util.List;
import com.ruoyi.warehouse.domain.WarehouseInventoryReportDamageChild;
import org.apache.ibatis.annotations.Mapper;
/**
* 仓库库存报损物料信息Mapper接口
*
* @author zhang
* @date 2024-08-29
*/
@Mapper
public interface WarehouseInventoryReportDamageChildMapper
{
/**
* 查询仓库库存报损物料信息
*
* @param reportDamageChildId 仓库库存报损物料信息ID
* @return 仓库库存报损物料信息
*/
public WarehouseInventoryReportDamageChild selectWarehouseInventoryReportDamageChildById(Long reportDamageChildId);
/**
* 查询仓库库存报损物料信息
*
* @param reportDamageCode 仓库库存报损物料信息code
* @return 仓库库存报损物料信息
*/
public WarehouseInventoryReportDamageChild selectWarehouseInventoryReportDamageChildByCode(String reportDamageCode);
/**
* 查询仓库库存报损物料信息列表
*
* @param warehouseInventoryReportDamageChild 仓库库存报损物料信息
* @return 仓库库存报损物料信息集合
*/
public List<WarehouseInventoryReportDamageChild> selectWarehouseInventoryReportDamageChildList(WarehouseInventoryReportDamageChild warehouseInventoryReportDamageChild);
/**
* 新增仓库库存报损物料信息
*
* @param warehouseInventoryReportDamageChild 仓库库存报损物料信息
* @return 结果
*/
public int insertWarehouseInventoryReportDamageChild(WarehouseInventoryReportDamageChild warehouseInventoryReportDamageChild);
/**
* 修改仓库库存报损物料信息
*
* @param warehouseInventoryReportDamageChild 仓库库存报损物料信息
* @return 结果
*/
public int updateWarehouseInventoryReportDamageChild(WarehouseInventoryReportDamageChild warehouseInventoryReportDamageChild);
/**
* 删除仓库库存报损物料信息
*
* @param reportDamageChildId 仓库库存报损物料信息ID
* @return 结果
*/
public int deleteWarehouseInventoryReportDamageChildById(Long reportDamageChildId);
/**
* 删除仓库库存报损物料信息
*
* @param reportDamageCode 仓库库存报损物料信息关联单号
* @return 结果
*/
public int deleteWarehouseInventoryReportDamageChildByCode(String reportDamageCode);
/**
* 批量删除仓库库存报损物料信息
*
* @param reportDamageChildIds 需要删除的数据ID
* @return 结果
*/
public int deleteWarehouseInventoryReportDamageChildByIds(String[] reportDamageChildIds);
/**
* 批量删除仓库库存报损物料信息
*
* @param reportDamageCodes 需要删除的数据关联单号
* @return 结果
*/
public int deleteWarehouseInventoryReportDamageChildByCodes(String[] reportDamageCodes);
/**
* 作废仓库库存报损物料信息
*
* @param reportDamageChildId 仓库库存报损物料信息ID
* @return 结果
*/
public int cancelWarehouseInventoryReportDamageChildById(Long reportDamageChildId);
/**
* 恢复仓库库存报损物料信息
*
* @param reportDamageChildId 仓库库存报损物料信息ID
* @return 结果
*/
public int restoreWarehouseInventoryReportDamageChildById(Long reportDamageChildId);
}

2
ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseInventoryReportDamageMapper.java

@ -2,6 +2,7 @@ package com.ruoyi.warehouse.mapper;
import java.util.List;
import com.ruoyi.warehouse.domain.WarehouseInventoryReportDamage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
@ -10,6 +11,7 @@ import org.apache.ibatis.annotations.Param;
* @author 刘晓旭
* @date 2024-05-31
*/
@Mapper
public interface WarehouseInventoryReportDamageMapper
{
/**

91
ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseInventoryReportDamageChildService.java

@ -0,0 +1,91 @@
package com.ruoyi.warehouse.service;
import java.util.List;
import com.ruoyi.warehouse.domain.WarehouseInventoryReportDamageChild;
import org.apache.ibatis.annotations.Mapper;
/**
* 仓库库存报损物料信息Service接口
*
* @author zhang
* @date 2024-08-29
*/
public interface IWarehouseInventoryReportDamageChildService
{
/**
* 查询仓库库存报损物料信息
*
* @param reportDamageChildId 仓库库存报损物料信息ID
* @return 仓库库存报损物料信息
*/
public WarehouseInventoryReportDamageChild selectWarehouseInventoryReportDamageChildById(Long reportDamageChildId);
/**
* 查询仓库库存报损物料信息列表
*
* @param warehouseInventoryReportDamageChild 仓库库存报损物料信息
* @return 仓库库存报损物料信息集合
*/
public List<WarehouseInventoryReportDamageChild> selectWarehouseInventoryReportDamageChildList(WarehouseInventoryReportDamageChild warehouseInventoryReportDamageChild);
/**
* 新增仓库库存报损物料信息
*
* @param warehouseInventoryReportDamageChild 仓库库存报损物料信息
* @return 结果
*/
public int insertWarehouseInventoryReportDamageChild(WarehouseInventoryReportDamageChild warehouseInventoryReportDamageChild);
/**
* 修改仓库库存报损物料信息
*
* @param warehouseInventoryReportDamageChild 仓库库存报损物料信息
* @return 结果
*/
public int updateWarehouseInventoryReportDamageChild(WarehouseInventoryReportDamageChild warehouseInventoryReportDamageChild);
/**
* 批量删除仓库库存报损物料信息
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteWarehouseInventoryReportDamageChildByIds(String ids);
/**
* 批量删除仓库库存报损物料信息
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteWarehouseInventoryReportDamageChildByCodes(String ids);
/**
* 删除仓库库存报损物料信息信息
*
* @param reportDamageChildId 仓库库存报损物料信息ID
* @return 结果
*/
public int deleteWarehouseInventoryReportDamageChildById(Long reportDamageChildId);
/**
* 删除仓库库存报损物料信息信息
*
* @param reportDamageCode 仓库库存报损物料信息Code
* @return 结果
*/
public int deleteWarehouseInventoryReportDamageChildByCode(String reportDamageCode);
/**
* 作废仓库库存报损物料信息
* @param reportDamageChildId 仓库库存报损物料信息ID
* @return
*/
int cancelWarehouseInventoryReportDamageChildById(Long reportDamageChildId);
/**
* 恢复仓库库存报损物料信息
* @param reportDamageChildId 仓库库存报损物料信息ID
* @return
*/
int restoreWarehouseInventoryReportDamageChildById(Long reportDamageChildId);
}

136
ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseInventoryReportDamageChildServiceImpl.java

@ -0,0 +1,136 @@
package com.ruoyi.warehouse.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.warehouse.domain.WarehouseInventoryReportDamageChild;
import com.ruoyi.warehouse.mapper.WarehouseInventoryReportDamageChildMapper;
import com.ruoyi.warehouse.service.IWarehouseInventoryReportDamageChildService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.core.text.Convert;
/**
* 仓库库存报损物料信息Service业务层处理
*
* @author zhang
* @date 2024-08-29
*/
@Service
public class WarehouseInventoryReportDamageChildServiceImpl implements IWarehouseInventoryReportDamageChildService
{
@Autowired
private WarehouseInventoryReportDamageChildMapper warehouseInventoryReportDamageChildMapper;
/**
* 查询仓库库存报损物料信息
*
* @param reportDamageChildId 仓库库存报损物料信息ID
* @return 仓库库存报损物料信息
*/
@Override
public WarehouseInventoryReportDamageChild selectWarehouseInventoryReportDamageChildById(Long reportDamageChildId)
{
return warehouseInventoryReportDamageChildMapper.selectWarehouseInventoryReportDamageChildById(reportDamageChildId);
}
/**
* 查询仓库库存报损物料信息列表
*
* @param warehouseInventoryReportDamageChild 仓库库存报损物料信息
* @return 仓库库存报损物料信息
*/
@Override
public List<WarehouseInventoryReportDamageChild> selectWarehouseInventoryReportDamageChildList(WarehouseInventoryReportDamageChild warehouseInventoryReportDamageChild)
{
return warehouseInventoryReportDamageChildMapper.selectWarehouseInventoryReportDamageChildList(warehouseInventoryReportDamageChild);
}
/**
* 新增仓库库存报损物料信息
*
* @param warehouseInventoryReportDamageChild 仓库库存报损物料信息
* @return 结果
*/
@Override
public int insertWarehouseInventoryReportDamageChild(WarehouseInventoryReportDamageChild warehouseInventoryReportDamageChild)
{
warehouseInventoryReportDamageChild.setCreateTime(DateUtils.getNowDate());
String loginName = ShiroUtils.getLoginName();
warehouseInventoryReportDamageChild.setCreateBy(loginName);
return warehouseInventoryReportDamageChildMapper.insertWarehouseInventoryReportDamageChild(warehouseInventoryReportDamageChild);
}
/**
* 修改仓库库存报损物料信息
*
* @param warehouseInventoryReportDamageChild 仓库库存报损物料信息
* @return 结果
*/
@Override
public int updateWarehouseInventoryReportDamageChild(WarehouseInventoryReportDamageChild warehouseInventoryReportDamageChild)
{
String loginName = ShiroUtils.getLoginName();
warehouseInventoryReportDamageChild.setUpdateBy(loginName);
warehouseInventoryReportDamageChild.setUpdateTime(DateUtils.getNowDate());
return warehouseInventoryReportDamageChildMapper.updateWarehouseInventoryReportDamageChild(warehouseInventoryReportDamageChild);
}
/**
* 删除仓库库存报损物料信息对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteWarehouseInventoryReportDamageChildByIds(String ids)
{
return warehouseInventoryReportDamageChildMapper.deleteWarehouseInventoryReportDamageChildByIds(Convert.toStrArray(ids));
}
@Override
public int deleteWarehouseInventoryReportDamageChildByCodes(String ids) {
return warehouseInventoryReportDamageChildMapper.deleteWarehouseInventoryReportDamageChildByCodes(Convert.toStrArray(ids));
}
/**
* 删除仓库库存报损物料信息信息
*
* @param reportDamageChildId 仓库库存报损物料信息ID
* @return 结果
*/
@Override
public int deleteWarehouseInventoryReportDamageChildById(Long reportDamageChildId)
{
return warehouseInventoryReportDamageChildMapper.deleteWarehouseInventoryReportDamageChildById(reportDamageChildId);
}
@Override
public int deleteWarehouseInventoryReportDamageChildByCode(String reportDamageCode) {
return warehouseInventoryReportDamageChildMapper.deleteWarehouseInventoryReportDamageChildByCode(reportDamageCode);
}
/**
* 作废仓库库存报损物料信息
*
* @param reportDamageChildId 仓库库存报损物料信息ID
* @return 结果
*/
@Override
public int cancelWarehouseInventoryReportDamageChildById(Long reportDamageChildId)
{
return warehouseInventoryReportDamageChildMapper.cancelWarehouseInventoryReportDamageChildById(reportDamageChildId);
}
/**
* 恢复仓库库存报损物料信息信息
*
* @param reportDamageChildId 仓库库存报损物料信息ID
* @return 结果
*/
@Override
public int restoreWarehouseInventoryReportDamageChildById(Long reportDamageChildId)
{
return warehouseInventoryReportDamageChildMapper.restoreWarehouseInventoryReportDamageChildById(reportDamageChildId);
}
}

70
ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseInventoryReportDamageServiceImpl.java

@ -2,6 +2,7 @@ package com.ruoyi.warehouse.service.impl;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -9,12 +10,15 @@ import com.ruoyi.common.exception.BusinessException;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.warehouse.domain.WarehouseInventoryReportDamageChild;
import com.ruoyi.warehouse.service.IWarehouseInventoryReportDamageChildService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.warehouse.mapper.WarehouseInventoryReportDamageMapper;
import com.ruoyi.warehouse.domain.WarehouseInventoryReportDamage;
import com.ruoyi.warehouse.service.IWarehouseInventoryReportDamageService;
import com.ruoyi.common.core.text.Convert;
import org.springframework.transaction.annotation.Transactional;
/**
* 仓库库存报损Service业务层处理
@ -28,6 +32,9 @@ public class WarehouseInventoryReportDamageServiceImpl implements IWarehouseInve
@Autowired
private WarehouseInventoryReportDamageMapper warehouseInventoryReportDamageMapper;
@Autowired
private IWarehouseInventoryReportDamageChildService warehouseInventoryReportDamageChildService;
/**
* 查询仓库库存报损
*
@ -59,26 +66,39 @@ public class WarehouseInventoryReportDamageServiceImpl implements IWarehouseInve
* @return 结果
*/
@Override
@Transactional(rollbackFor = Exception.class)
public int insertWarehouseInventoryReportDamage(WarehouseInventoryReportDamage warehouseInventoryReportDamage)
{
//更改日期格式,以提高可读性
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
String dataPart = df.format(new Date());
//移除日期中的分隔符以便于后续处理
String prefix = "BS"+dataPart.replace("-","");
String prefix = "BS"+DateUtils.getDate().replace("-","");
//查询数据库中最大的编号
String maxCode = warehouseInventoryReportDamageMapper.findMaxRoundCode(prefix);
String newCode = generateNewCode(prefix,maxCode);
warehouseInventoryReportDamage.setReportDamageCode(newCode);
warehouseInventoryReportDamage.setCreateTime(DateUtils.getNowDate());
String loginName = ShiroUtils.getLoginName();
warehouseInventoryReportDamage.setCreateBy(loginName);
//报损子表数据
//判断子表数据是否为空
if(StringUtils.isNotEmpty(warehouseInventoryReportDamage.getWarehouseInventoryReportDamageChildList())){
for(WarehouseInventoryReportDamageChild warehouseInventoryReportDamageChild:warehouseInventoryReportDamage.getWarehouseInventoryReportDamageChildList()) {
//子表数据不为空,则插入子表数据
warehouseInventoryReportDamageChild.setMakeNo(warehouseInventoryReportDamage.getMakeNo());
warehouseInventoryReportDamageChild.setReportDamageCode(newCode);
warehouseInventoryReportDamageChild.setCreateTime(DateUtils.getNowDate());
warehouseInventoryReportDamageChild.setCreateBy(loginName);
warehouseInventoryReportDamageChild.setWarehouseCode(warehouseInventoryReportDamage.getWarehouseCode());
warehouseInventoryReportDamageChild.setWarehouseName(warehouseInventoryReportDamage.getWarehouseName());
warehouseInventoryReportDamageChild.setWarehouseStoreAddress(warehouseInventoryReportDamage.getWarehouseStoreAddress());
warehouseInventoryReportDamageChild.setApplyDeptId(String.valueOf(ShiroUtils.getSysUser().getDeptId()));
warehouseInventoryReportDamageChild.setApplyDept(ShiroUtils.getSysUser().getDept().getDeptName());
warehouseInventoryReportDamageChildService.insertWarehouseInventoryReportDamageChild(warehouseInventoryReportDamageChild);
}
}else{
//子表数据为空,则抛出异常
throw new BusinessException("报损子表数据为空");
}
return warehouseInventoryReportDamageMapper.insertWarehouseInventoryReportDamage(warehouseInventoryReportDamage);
}
@ -94,6 +114,27 @@ public class WarehouseInventoryReportDamageServiceImpl implements IWarehouseInve
String loginName = ShiroUtils.getLoginName();
warehouseInventoryReportDamage.setUpdateBy(loginName);
warehouseInventoryReportDamage.setUpdateTime(DateUtils.getNowDate());
if(StringUtils.isNotEmpty(warehouseInventoryReportDamage.getWarehouseInventoryReportDamageChildList())){
//清除现在的子表信息
warehouseInventoryReportDamageChildService.deleteWarehouseInventoryReportDamageChildByCode(warehouseInventoryReportDamage.getReportDamageCode());
for(WarehouseInventoryReportDamageChild warehouseInventoryReportDamageChild:warehouseInventoryReportDamage.getWarehouseInventoryReportDamageChildList()){
//子表数据不为空,则插入子表数据
warehouseInventoryReportDamageChild.setMakeNo(warehouseInventoryReportDamage.getMakeNo());
warehouseInventoryReportDamageChild.setReportDamageCode(warehouseInventoryReportDamage.getReportDamageCode());
warehouseInventoryReportDamageChild.setCreateTime(DateUtils.getNowDate());
warehouseInventoryReportDamageChild.setCreateBy(loginName);
warehouseInventoryReportDamageChild.setWarehouseCode(warehouseInventoryReportDamage.getWarehouseCode());
warehouseInventoryReportDamageChild.setWarehouseName(warehouseInventoryReportDamage.getWarehouseName());
warehouseInventoryReportDamageChild.setWarehouseStoreAddress(warehouseInventoryReportDamage.getWarehouseStoreAddress());
warehouseInventoryReportDamageChild.setApplyDeptId(String.valueOf(ShiroUtils.getSysUser().getDeptId()));
warehouseInventoryReportDamageChild.setApplyDept(ShiroUtils.getSysUser().getDept().getDeptName());
warehouseInventoryReportDamageChildService.insertWarehouseInventoryReportDamageChild(warehouseInventoryReportDamageChild);
}
}else{
//子表数据为空,则抛出异常
throw new BusinessException("报损子表数据为空");
}
return warehouseInventoryReportDamageMapper.updateWarehouseInventoryReportDamage(warehouseInventoryReportDamage);
}
@ -106,6 +147,15 @@ public class WarehouseInventoryReportDamageServiceImpl implements IWarehouseInve
@Override
public int deleteWarehouseInventoryReportDamageByIds(String ids)
{
String[] code = Convert.toStrArray(ids);
List<String> codes = new ArrayList<String>();
for(String id:code){
WarehouseInventoryReportDamage warehouseInventoryReportDamage = warehouseInventoryReportDamageMapper.selectWarehouseInventoryReportDamageById(Long.valueOf(id));
//删除子表数据
codes.add(warehouseInventoryReportDamage.getReportDamageCode());
}
String reportDamageCodes = StringUtils.join(codes,",");
warehouseInventoryReportDamageChildService.deleteWarehouseInventoryReportDamageChildByCodes(reportDamageCodes);
return warehouseInventoryReportDamageMapper.deleteWarehouseInventoryReportDamageByIds(Convert.toStrArray(ids));
}
@ -158,12 +208,10 @@ public class WarehouseInventoryReportDamageServiceImpl implements IWarehouseInve
}
//解析并递增编号
int sequence = Integer.parseInt(maxCode.substring(5)) + 1 ;
//检查序列号是否溢出
if (sequence > 999){
throw new BusinessException("当日编号已达到最大值999,请检查或调整策略");
}
//格式化序列号,自动补零至三位
DecimalFormat df = new DecimalFormat("000");

195
ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseInventoryReportDamageChildMapper.xml

@ -0,0 +1,195 @@
<?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.warehouse.mapper.WarehouseInventoryReportDamageChildMapper">
<resultMap type="WarehouseInventoryReportDamageChild" id="WarehouseInventoryReportDamageChildResult">
<result property="reportDamageChildId" column="report_damage_child_id" />
<result property="makeNo" column="make_no" />
<result property="reportDamageCode" column="report_damage_code" />
<result property="materialNo" column="material_no" />
<result property="materialPhotourl" column="material_photoUrl" />
<result property="materialName" column="material_name" />
<result property="materialType" column="material_type" />
<result property="materialDescribe" column="material_describe" />
<result property="materialBrand" column="material_brand" />
<result property="actualScrapQuantity" column="actual_scrap_quantity" />
<result property="scrapType" column="scrap_type" />
<result property="scrapDetail" column="scrap_detail" />
<result property="qualityAssessment" column="quality_assessment" />
<result property="estimatedValueRmb" column="estimated_value_rmb" />
<result property="responsibleUnit" column="responsible_unit" />
<result property="remark" column="remark" />
<result property="warehouseCode" column="warehouse_code" />
<result property="warehouseName" column="warehouse_name" />
<result property="warehouseStoreAddress" column="warehouse_store_address" />
<result property="applyDeptId" column="apply_dept_id" />
<result property="applyDept" column="apply_dept" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectWarehouseInventoryReportDamageChildVo">
select report_damage_child_id, make_no, report_damage_code, material_no,
material_photoUrl, material_name, material_type, material_describe, material_brand,
actual_scrap_quantity, scrap_type, scrap_detail, quality_assessment,
estimated_value_rmb, responsible_unit, remark, warehouse_code, warehouse_name,
warehouse_store_address, apply_dept_id, apply_dept, create_time, create_by,
update_by, update_time
from warehouse_inventory_report_damage_child
</sql>
<select id="selectWarehouseInventoryReportDamageChildList" parameterType="WarehouseInventoryReportDamageChild" resultMap="WarehouseInventoryReportDamageChildResult">
<include refid="selectWarehouseInventoryReportDamageChildVo"/>
<where>
<if test="makeNo != null and makeNo != ''"> and make_no = #{makeNo}</if>
<if test="reportDamageCode != null and reportDamageCode != ''"> and report_damage_code = #{reportDamageCode}</if>
<if test="materialNo != null and materialNo != ''"> and material_no = #{materialNo}</if>
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
<if test="materialType != null and materialType != ''"> and material_type = #{materialType}</if>
<if test="materialDescribe != null and materialDescribe != ''"> and material_describe = #{materialDescribe}</if>
<if test="materialBrand != null and materialBrand != ''"> and material_brand = #{materialBrand}</if>
<if test="actualScrapQuantity != null "> and actual_scrap_quantity = #{actualScrapQuantity}</if>
<if test="scrapType != null and scrapType != ''"> and scrap_type = #{scrapType}</if>
<if test="scrapDetail != null and scrapDetail != ''"> and scrap_detail = #{scrapDetail}</if>
<if test="qualityAssessment != null and qualityAssessment != ''"> and quality_assessment = #{qualityAssessment}</if>
<if test="estimatedValueRmb != null "> and estimated_value_rmb = #{estimatedValueRmb}</if>
<if test="responsibleUnit != null and responsibleUnit != ''"> and responsible_unit = #{responsibleUnit}</if>
<if test="warehouseCode != null and warehouseCode != ''"> and warehouse_code = #{warehouseCode}</if>
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name = #{warehouseName}</if>
<if test="warehouseStoreAddress != null and warehouseStoreAddress != ''"> and warehouse_store_address = #{warehouseStoreAddress}</if>
<if test="applyDeptId != null and applyDeptId != ''"> and apply_dept_id = #{applyDeptId}</if>
<if test="applyDept != null and applyDept != ''"> and apply_dept = #{applyDept}</if>
</where>
</select>
<select id="selectWarehouseInventoryReportDamageChildById" parameterType="Long" resultMap="WarehouseInventoryReportDamageChildResult">
<include refid="selectWarehouseInventoryReportDamageChildVo"/>
where report_damage_child_id = #{reportDamageChildId}
</select>
<select id="selectWarehouseInventoryReportDamageChildByCode" parameterType="Long" resultMap="WarehouseInventoryReportDamageChildResult">
<include refid="selectWarehouseInventoryReportDamageChildVo"/>
where report_damage_code = #{reportDamageCode}
</select>
<insert id="insertWarehouseInventoryReportDamageChild" parameterType="WarehouseInventoryReportDamageChild" useGeneratedKeys="true" keyProperty="reportDamageChildId">
insert into warehouse_inventory_report_damage_child
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="makeNo != null">make_no,</if>
<if test="reportDamageCode != null">report_damage_code,</if>
<if test="materialNo != null">material_no,</if>
<if test="materialPhotourl != null">material_photoUrl,</if>
<if test="materialName != null">material_name,</if>
<if test="materialType != null">material_type,</if>
<if test="materialDescribe != null">material_describe,</if>
<if test="materialBrand != null">material_brand,</if>
<if test="actualScrapQuantity != null">actual_scrap_quantity,</if>
<if test="scrapType != null">scrap_type,</if>
<if test="scrapDetail != null">scrap_detail,</if>
<if test="qualityAssessment != null">quality_assessment,</if>
<if test="estimatedValueRmb != null">estimated_value_rmb,</if>
<if test="responsibleUnit != null">responsible_unit,</if>
<if test="remark != null">remark,</if>
<if test="warehouseCode != null">warehouse_code,</if>
<if test="warehouseName != null">warehouse_name,</if>
<if test="warehouseStoreAddress != null">warehouse_store_address,</if>
<if test="applyDeptId != null">apply_dept_id,</if>
<if test="applyDept != null">apply_dept,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="makeNo != null">#{makeNo},</if>
<if test="reportDamageCode != null">#{reportDamageCode},</if>
<if test="materialNo != null">#{materialNo},</if>
<if test="materialPhotourl != null">#{materialPhotourl},</if>
<if test="materialName != null">#{materialName},</if>
<if test="materialType != null">#{materialType},</if>
<if test="materialDescribe != null">#{materialDescribe},</if>
<if test="materialBrand != null">#{materialBrand},</if>
<if test="actualScrapQuantity != null">#{actualScrapQuantity},</if>
<if test="scrapType != null">#{scrapType},</if>
<if test="scrapDetail != null">#{scrapDetail},</if>
<if test="qualityAssessment != null">#{qualityAssessment},</if>
<if test="estimatedValueRmb != null">#{estimatedValueRmb},</if>
<if test="responsibleUnit != null">#{responsibleUnit},</if>
<if test="remark != null">#{remark},</if>
<if test="warehouseCode != null">#{warehouseCode},</if>
<if test="warehouseName != null">#{warehouseName},</if>
<if test="warehouseStoreAddress != null">#{warehouseStoreAddress},</if>
<if test="applyDeptId != null">#{applyDeptId},</if>
<if test="applyDept != null">#{applyDept},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateWarehouseInventoryReportDamageChild" parameterType="WarehouseInventoryReportDamageChild">
update warehouse_inventory_report_damage_child
<trim prefix="SET" suffixOverrides=",">
<if test="makeNo != null">make_no = #{makeNo},</if>
<if test="reportDamageCode != null">report_damage_code = #{reportDamageCode},</if>
<if test="materialNo != null">material_no = #{materialNo},</if>
<if test="materialPhotourl != null">material_photoUrl = #{materialPhotourl},</if>
<if test="materialName != null">material_name = #{materialName},</if>
<if test="materialType != null">material_type = #{materialType},</if>
<if test="materialDescribe != null">material_describe = #{materialDescribe},</if>
<if test="materialBrand != null">material_brand = #{materialBrand},</if>
<if test="actualScrapQuantity != null">actual_scrap_quantity = #{actualScrapQuantity},</if>
<if test="scrapType != null">scrap_type = #{scrapType},</if>
<if test="scrapDetail != null">scrap_detail = #{scrapDetail},</if>
<if test="qualityAssessment != null">quality_assessment = #{qualityAssessment},</if>
<if test="estimatedValueRmb != null">estimated_value_rmb = #{estimatedValueRmb},</if>
<if test="responsibleUnit != null">responsible_unit = #{responsibleUnit},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="warehouseCode != null">warehouse_code = #{warehouseCode},</if>
<if test="warehouseName != null">warehouse_name = #{warehouseName},</if>
<if test="warehouseStoreAddress != null">warehouse_store_address = #{warehouseStoreAddress},</if>
<if test="applyDeptId != null">apply_dept_id = #{applyDeptId},</if>
<if test="applyDept != null">apply_dept = #{applyDept},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where report_damage_child_id = #{reportDamageChildId}
</update>
<delete id="deleteWarehouseInventoryReportDamageChildById" parameterType="Long">
delete from warehouse_inventory_report_damage_child where report_damage_child_id = #{reportDamageChildId}
</delete>
<delete id="deleteWarehouseInventoryReportDamageChildByCode" parameterType="String">
delete from warehouse_inventory_report_damage_child where report_damage_code = #{reportDamageCode}
</delete>
<delete id="deleteWarehouseInventoryReportDamageChildByIds" parameterType="String">
delete from warehouse_inventory_report_damage_child where report_damage_child_id in
<foreach item="reportDamageChildId" collection="array" open="(" separator="," close=")">
#{reportDamageChildId}
</foreach>
</delete>
<delete id="deleteWarehouseInventoryReportDamageChildByCodes" parameterType="String">
delete from warehouse_inventory_report_damage_child where report_damage_code in
<foreach item="reportDamageCode" collection="array" open="(" separator="," close=")">
#{reportDamageCode}
</foreach>
</delete>
<update id="cancelWarehouseInventoryReportDamageChildById" parameterType="Long">
update warehouse_inventory_report_damage_child set del_flag = '1' where report_damage_child_id = #{reportDamageChildId}
</update>
<update id="restoreWarehouseInventoryReportDamageChildById" parameterType="Long">
update warehouse_inventory_report_damage_child set del_flag = '0' where report_damage_child_id = #{reportDamageChildId}
</update>
<update id="cancelWarehouseInventoryReportDamageChildByCode" parameterType="String">
update warehouse_inventory_report_damage_child set del_flag = '1' where report_damage_code = #{reportDamageCode}
</update>
<update id="restoreWarehouseInventoryReportDamageChildByCode" parameterType="String">
update warehouse_inventory_report_damage_child set del_flag = '0' where report_damage_code = #{reportDamageCode}
</update>
</mapper>

3
ruoyi-admin/src/main/resources/templates/warehouse/inventoryCheck/add.html

@ -70,14 +70,11 @@
var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var prefix = ctx + "warehouse/inventoryCheck"
$("#form-inventoryCheck-add").validate({focusCleanup: true});
$("input[name='inventoryCheckDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
// 新增提交
function submitHandler() {
// 获取表单数据

5
ruoyi-admin/src/main/resources/templates/warehouse/inventoryCheck/detail.html

@ -3,6 +3,9 @@
<head>
<th:block th:include="include :: header('修改仓库库存盘点')" />
<th:block th:include="include :: datetimepicker-css" />
<th:block th:include="include :: select2-css" />
<th:block th:include="include :: bootstrap-fileinput-css" />
<th:block th:include="include :: bootstrap-editable-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
@ -62,6 +65,8 @@
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: select2-js" />
<th:block th:include="include :: bootstrap-fileinput-js" />
<!--用于可以修改列表字段的插件-->
<th:block th:include="include :: bootstrap-table-editable-js" />
<script th:inline="javascript">

121
ruoyi-admin/src/main/resources/templates/warehouse/inventoryReportDamage/add.html

@ -4,6 +4,8 @@
<th:block th:include="include :: header('新增仓库库存报损')" />
<th:block th:include="include :: datetimepicker-css" />
<th:block th:include="include :: select2-css" />
<th:block th:include="include :: bootstrap-fileinput-css" />
<th:block th:include="include :: bootstrap-editable-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
@ -70,18 +72,21 @@
<input name="numTotal" class="form-control" type="text">
</div>
</div> -->
<div class="form-group is-required">
<label class="col-sm-3 control-label">仓库ID</label>
<div class="form-group">
<label class="col-sm-3 control-label is-required">仓库名称</label>
<div class="col-sm-8">
<select id="stockNoSelct" name="warehouseCode" class="form-control" required></select>
<select id="stockNameSelct" name="warehouseName" class="form-control" type="text" required>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">仓库名称</label>
<div class="form-group is-required">
<label class="col-sm-3 control-label">仓库ID</label>
<div class="col-sm-8">
<input name="warehouseName" class="form-control" type="text" required>
<input name="warehouseCode" class="form-control" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库存放地址:</label>
<div class="col-sm-8">
@ -95,18 +100,118 @@
</div>
</div>
</form>
<!-- 物料信息 -->
<div class="container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span>选择物料</span>
<a class="btn btn-success" onclick="insertRow()">
<i class="fa fa-plus"></i> 选择物料
</a>
</div>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table-reportDamage-child" style="white-space:nowrap"></table>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: select2-js" />
<th:block th:include="include :: bootstrap-fileinput-js" />
<th:block th:include="include :: bootstrap-table-editable-js" />
<script th:inline="javascript">
var prefix = ctx + "warehouse/inventoryReportDamage"
$("#form-inventoryReportDamage-add").validate({focusCleanup: true});
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var warehouseDeptDatas = [[${@dict.getType('warehouseDept')}]];
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-inventoryReportDamage-add').serialize());
}
}
var options = {
id : 'bootstrap-table-reportDamage-child',
modalName: "仓库库存报损物料信息",
columns: [
{checkbox: true},
{title: '库存报损id', field: 'reportDamageChildId', visible: false},
{title: '报损单号', field: 'reportDamageCode',},
{title: '料号', field: 'materialNo',},
{title: '图片', field: 'materialPhotourl',},
{title: '物料名称', field: 'materialName',},
{title: '物料类型', field: 'materialType',},
{title: '描述', field: 'materialDescribe',},
{title: '品牌', field: 'materialBrand',},
{title: '实际报废数量', field: 'actualScrapQuantity',},
{title: '报废类型', field: 'scrapType',},
{title: '报废明细', field: 'scrapDetail',},
{title: '品质判定', field: 'qualityAssessment',},
{title: '预估价值(RMB)', field: 'estimatedValueRmb',},
{title: '责任单位', field: 'responsibleUnit',},
{title: '备注', field: 'remark',},
{title: '关联生产单号', field: 'makeNo',},
{title: '仓库ID', field: 'warehouseCode',},
{title: '仓库名称', field: 'warehouseName',},
{title: '仓库存放地址', field: 'warehouseStoreAddress',},
{title: '申请部门ID', field: 'applyDeptId',},
{title: '申请部门', field: 'applyDept',},
{title: '操作', align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.materialNo + '\')"><i class="fa fa-edit"></i>删除</a> ');
return actions.join('');
}
}
]
};
$.table.init(options);
function insertRow() {
var url = ctx + 'warehouse/inventoryCheck/materialSelect';
var options = {
title: '选择物料',
url: url,
callBack: doSubmit
};
$.modal.openOptions(options);
}
function doSubmit(index, layero,uniqueId){
console.log(uniqueId);
var iframeWin = window[layero.find('iframe')[0]['name']];
var rowData = iframeWin.$('#bootstrap-materialSelect-table').bootstrapTable('getSelections')[0];
console.log("rowData: "+rowData);
$("#bootstrap-table-reportDamage-child").bootstrapTable('insertRow', {
index:1,
row: {
materialNo:rowData.materialNo,
materialName: rowData.materialName,
materialType: rowData.materialType,
materialBrand: rowData.materialBrand,
materialPhotourl: rowData.materialPhotourl,
materialDescribe: rowData.materialDescribe,
materialUnit: rowData.materialUnit,
inventoryCheckNum : "",
inventoryAccountNum : "",
warehouseStoreAddress : "",
batchNumber : "",
remark : ""
}
})
layer.close(index);
}
// 逻辑删除前端的一行数据
function removeRow(materialNo){
$("#bootstrap-table").bootstrapTable('remove', {field: 'materialNo', values: materialNo})
}
$(function () {
loadWarehouseCodes();
changeWhetherMakeNo();
@ -134,7 +239,7 @@
});
function loadWarehouseCodes() {
var url = ctx + 'stock/stockInfo/getAllWarehouseCode';
$("#stockNoSelct").select2({
$("#stockNameSelct").select2({
ajax: {
theme: "bootstrap",
allowClear: true,
@ -171,7 +276,7 @@
}
});
}
$('#stockNoSelct').on('select2:select', function(e) {
$('#stockNameSelct').on('select2:select', function(e) {
var data = e.params.data;
$("input[name='warehouseCode']").val(data.stockNO);
$("input[name='warehouseStoreAddress']").val(data.stockAddress);

99
ruoyi-admin/src/main/resources/templates/warehouse/inventoryReportDamage/detail.html

@ -101,21 +101,112 @@
</div>
</div>
</form>
<!-- 物料信息 -->
<div class="container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span>选择物料</span>
<a class="btn btn-success" onclick="insertRow()">
<i class="fa fa-plus"></i> 选择物料
</a>
</div>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table-reportDamage-child" style="white-space:nowrap"></table>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var warehouseDeptDatas = [[${@dict.getType('warehouseDept')}]];
var warehousScrapTypeDatas = [[${@dict.getType('warehous_scrap_type')}]];
var prefix = ctx + "warehouse/inventoryReportDamage";
$("#form-inventoryReportDamage-edit").validate({
focusCleanup: true
});
$("#form-inventoryReportDamage-edit").validate({focusCleanup: true});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-inventoryReportDamage-edit').serialize());
}
}
var options = {
id : 'bootstrap-table-reportDamage-child',
modalName: "仓库库存报损物料信息",
columns: [
{checkbox: true},
{title: '库存报损id', field: 'reportDamageChildId', visible: false},
{title: '报损单号', field: 'reportDamageCode',},
{title: '料号', field: 'materialNo',},
{title: '图片', field: 'materialPhotourl',},
{title: '物料名称', field: 'materialName',},
{title: '物料类型', field: 'materialType',},
{title: '描述', field: 'materialDescribe',},
{title: '品牌', field: 'materialBrand',},
{title: '实际报废数量', field: 'actualScrapQuantity',},
{title: '报废类型', field: 'scrapType',},
{title: '报废明细', field: 'scrapDetail',},
{title: '品质判定', field: 'qualityAssessment',},
{title: '预估价值(RMB)', field: 'estimatedValueRmb',},
{title: '责任单位', field: 'responsibleUnit',},
{title: '备注', field: 'remark',},
{title: '关联生产单号', field: 'makeNo',},
{title: '仓库ID', field: 'warehouseCode',},
{title: '仓库名称', field: 'warehouseName',},
{title: '仓库存放地址', field: 'warehouseStoreAddress',},
{title: '申请部门ID', field: 'applyDeptId',},
{title: '申请部门', field: 'applyDept',},
{title: '操作', align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.materialNo + '\')"><i class="fa fa-edit"></i>删除</a> ');
return actions.join('');
}
}
]
};
$.table.init(options);
function insertRow() {
var url = ctx + 'warehouse/inventoryCheck/materialSelect';
var options = {
title: '选择物料',
url: url,
callBack: doSubmit
};
$.modal.openOptions(options);
}
function doSubmit(index, layero,uniqueId){
console.log(uniqueId);
var iframeWin = window[layero.find('iframe')[0]['name']];
var rowData = iframeWin.$('#bootstrap-materialSelect-table').bootstrapTable('getSelections')[0];
console.log("rowData: "+rowData);
$("#bootstrap-table-reportDamage-child").bootstrapTable('insertRow', {
index:1,
row: {
materialNo:rowData.materialNo,
materialName: rowData.materialName,
materialDescribe: rowData.materialDescribe,
materialUnit: rowData.materialUnit,
inventoryCheckNum : "",
inventoryAccountNum : "",
warehouseStoreAddress : "",
batchNumber : "",
remark : ""
}
})
layer.close(index);
}
// 逻辑删除前端的一行数据
function removeRow(materialNo){
$("#bootstrap-table").bootstrapTable('remove', {field: 'materialNo', values: materialNo})
}
$("input[name='applyTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",

122
ruoyi-admin/src/main/resources/templates/warehouse/inventoryReportDamage/edit.html

@ -95,21 +95,135 @@
</div>
</div>
</form>
<!-- 物料信息 -->
<div class="container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span>选择物料</span>
<a class="btn btn-success" onclick="insertRow()">
<i class="fa fa-plus"></i> 选择物料
</a>
</div>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table-reportDamage-child" style="white-space:nowrap"></table>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "warehouse/inventoryReportDamage";
$("#form-inventoryReportDamage-edit").validate({
focusCleanup: true
});
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var warehouseDeptDatas = [[${@dict.getType('warehouseDept')}]];
var warehousScrapTypeDatas = [[${@dict.getType('warehous_scrap_type')}]];
$("#form-inventoryReportDamage-edit").validate({focusCleanup: true});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-inventoryReportDamage-edit').serialize());
}
}
var options = {
id : 'bootstrap-table-reportDamage-child',
modalName: "仓库库存报损物料信息",
columns: [
{checkbox: true},
{title: '库存报损id', field: 'reportDamageChildId', visible: false},
{title: '报损单号', field: 'reportDamageCode',visible: false},
{title: '料号', field: 'materialNo',},
{title: '图片', field: 'materialPhotourl',},
{title: '物料名称', field: 'materialName',},
{title: '物料类型', field: 'materialType',},
{title: '描述', field: 'materialDescribe',},
{title: '品牌', field: 'materialBrand',},
{title: '单位', field: 'materialUnit',},
{title: '实际报废数量', field: 'actualScrapQuantity',
editable: {
type: 'text',
mode: 'inline', // 设定为行内编辑模式
events: {
blur: function(e) {
var value = $(this).val();
var errorMessage = validateActualScrapQuantity(value);
if (errorMessage) {alert(errorMessage);}
}
},
},
},
{title: '报废类型', field: 'scrapType',},
{title: '报废明细', field: 'scrapDetail',},
{title: '品质判定', field: 'qualityAssessment',},
{title: '预估价值(RMB)', field: 'estimatedValueRmb',},
{title: '责任单位', field: 'responsibleUnit',},
{title: '备注', field: 'remark',},
{title: '关联生产单号', field: 'makeNo',},
{title: '仓库ID', field: 'warehouseCode',},
{title: '仓库名称', field: 'warehouseName',},
{title: '仓库存放地址', field: 'warehouseStoreAddress',},
{title: '申请部门ID', field: 'applyDeptId',},
{title: '申请部门', field: 'applyDept',},
{title: '操作', align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.materialNo + '\')"><i class="fa fa-edit"></i>删除</a> ');
return actions.join('');
}
}
]
};
$.table.init(options);
function validateActualScrapQuantity(v) {
if ($.common.isEmpty(v)) {
return '实际报废数量不能为空';
}
var num = parseInt(v);
if (num <= 0) {
return '实际报废数量必须大于0';
}
}
function insertRow() {
var url = ctx + 'warehouse/inventoryCheck/materialSelect';
var options = {
title: '选择物料',
url: url,
callBack: doSubmit
};
$.modal.openOptions(options);
}
function doSubmit(index, layero,uniqueId){
console.log(uniqueId);
var iframeWin = window[layero.find('iframe')[0]['name']];
var rowData = iframeWin.$('#bootstrap-materialSelect-table').bootstrapTable('getSelections')[0];
console.log("rowData: "+rowData);
$("#bootstrap-table-reportDamage-child").bootstrapTable('insertRow', {
index:1,
row: {
materialNo:rowData.materialNo,
materialName: rowData.materialName,
materialDescribe: rowData.materialDescribe,
materialUnit: rowData.materialUnit,
inventoryCheckNum : "",
inventoryAccountNum : "",
warehouseStoreAddress : "",
batchNumber : "",
remark : ""
}
})
layer.close(index);
}
// 逻辑删除前端的一行数据
function removeRow(materialNo){
$("#bootstrap-table").bootstrapTable('remove', {field: 'materialNo', values: materialNo})
}
$("input[name='applyTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",

124
ruoyi-admin/src/main/resources/templates/warehouse/inventoryReportDamage/inventoryReportDamage.html

@ -77,11 +77,15 @@
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('warehouse:inventoryReportDamage:edit')}]];
var detailFlag = [[${@permission.hasPermi('warehouse:inventoryReportDamage:detail')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var warehouseDeptDatas = [[${@dict.getType('warehouseDept')}]];
var warehousScrapTypeDatas = [[${@dict.getType('warehous_scrap_type')}]];
var whetherMakeNoDatas = [[${@dict.getType('yes_or_no')}]];
var prefix = ctx + "warehouse/inventoryReportDamage";
$(function() {
var options = {
url: prefix + "/list",
@ -92,104 +96,42 @@
restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export",
modalName: "仓库库存报损",
columns: [{
checkbox: true
},
{
title: '库存报损id',
field: 'reportDamageId',
visible: false
},
{
title: '报损单号',
field: 'reportDamageCode',
},
{
title: '申请部门',
field: 'applyDept',
},
{
title: '申请时间',
field: 'applyTime',
},
{
title: '报废类型',
field: 'warehousScrapType',
formatter: function(value, row, index) {
return $.table.selectDictLabel(warehousScrapTypeDatas, value);
}
},
{
title: '是否关联生产单号',
field: 'whetherMakeNo',
formatter: function(value, row, index) {
return $.table.selectDictLabel(whetherMakeNoDatas, value);
}
},
{
title: '生产单号',
field: 'makeNo',
},
{
title: '料号',
field: 'materialNo',
},
{
title: '物料名称',
field: 'materialName',
},
{
title: '物料数合计',
field: 'materialTotal',
},
{
title: '数量合计',
field: 'numTotal',
},
{
title: '仓库ID',
field: 'warehouseCode',
},
{
title: '仓库名称',
field: 'warehouseName',
},
{
title: '仓库存放地址',
field: 'warehouseStoreAddress',
},
{
title: '备注',
field: 'remark',
},
{
title: '录入时间',
field: 'createTime',
},
{
title: '录入人',
field: 'createBy',
},
{
title: '更新人',
field: 'updateBy',
},
{
title: '操作',
align: 'center',
columns: [
{checkbox: true},
{title: '库存报损id', field: 'reportDamageId', visible: false},
{title: '报损单号', field: 'reportDamageCode',},
{title: '申请部门', field: 'applyDept',},
{title: '申请时间', field: 'applyTime',},
{title: '报废类型', field: 'warehousScrapType',
formatter: function(value, row, index) {return $.table.selectDictLabel(warehousScrapTypeDatas, value);}
},
{title: '是否关联生产单号', field: 'whetherMakeNo',
formatter: function(value, row, index) {return $.table.selectDictLabel(whetherMakeNoDatas, value);}
},
{title: '生产单号', field: 'makeNo',},
{title: '料号', field: 'materialNo',},
{title: '物料名称', field: 'materialName',},
{title: '物料数合计', field: 'materialTotal',},
{title: '数量合计', field: 'numTotal',},
{title: '仓库ID', field: 'warehouseCode',},
{title: '仓库名称', field: 'warehouseName',},
{title: '仓库存放地址', field: 'warehouseStoreAddress',},
{title: '备注', field: 'remark',},
{title: '录入时间', field: 'createTime',},
{title: '录入人', field: 'createBy',},
{title: '更新人', field: 'updateBy',},
{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.reportDamageId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-success btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="detail(\'' + row.reportDamageId + '\')"><i class="fa fa-edit"></i>详情</a> ');
return actions.join('');
}
}]
}
]
};
$.table.init(options);
});
/*库存报损详情*/
function detail(reportDamageId){
url = ctx + 'warehouse/inventoryReportDamage/detail/' + reportDamageId;

Loading…
Cancel
Save