10 changed files with 0 additions and 1114 deletions
@ -1,172 +0,0 @@ |
|||||
package com.ruoyi.manufacture.controller; |
|
||||
|
|
||||
import com.alibaba.fastjson.JSONObject; |
|
||||
import com.ruoyi.common.annotation.Log; |
|
||||
import com.ruoyi.common.core.controller.BaseController; |
|
||||
import com.ruoyi.common.core.domain.AjaxResult; |
|
||||
import com.ruoyi.common.core.page.TableDataInfo; |
|
||||
import com.ruoyi.common.enums.BusinessType; |
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil; |
|
||||
import com.ruoyi.manufacture.domain.MaterialRequisitionDetail; |
|
||||
import com.ruoyi.manufacture.service.IMaterialRequisitionDetailService; |
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.stereotype.Controller; |
|
||||
import org.springframework.ui.ModelMap; |
|
||||
import org.springframework.web.bind.annotation.*; |
|
||||
|
|
||||
import java.util.Arrays; |
|
||||
import java.util.List; |
|
||||
import java.util.Objects; |
|
||||
|
|
||||
import static com.ruoyi.common.core.domain.AjaxResult.Type.SUCCESS; |
|
||||
|
|
||||
/** |
|
||||
* 领料物料Controller |
|
||||
* |
|
||||
* @author ruoyi |
|
||||
* @date 2023-04-06 |
|
||||
*/ |
|
||||
@Controller |
|
||||
@RequestMapping("/manufacture/materialRequisitionDetail") |
|
||||
public class MaterialRequisitionDetailController extends BaseController |
|
||||
{ |
|
||||
private String prefix = "manufacture/materialRequisitionDetail"; |
|
||||
|
|
||||
@Autowired |
|
||||
private IMaterialRequisitionDetailService materialRequisitionDetailService; |
|
||||
|
|
||||
@RequiresPermissions("manufacture:materialRequisitionDetail:view") |
|
||||
@GetMapping() |
|
||||
public String materialRequisitionDetail() |
|
||||
{ |
|
||||
return prefix + "/materialRequisitionDetail"; |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 查询领料物料列表 |
|
||||
*/ |
|
||||
@RequiresPermissions("manufacture:materialRequisitionDetail:list") |
|
||||
@PostMapping("/list") |
|
||||
@ResponseBody |
|
||||
public TableDataInfo list(MaterialRequisitionDetail materialRequisitionDetail) |
|
||||
{ |
|
||||
startPage(); |
|
||||
List<MaterialRequisitionDetail> list = materialRequisitionDetailService.selectMaterialRequisitionDetailList(materialRequisitionDetail); |
|
||||
return getDataTable(list); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 导出领料物料列表 |
|
||||
*/ |
|
||||
@RequiresPermissions("manufacture:materialRequisitionDetail:export") |
|
||||
@Log(title = "领料物料", businessType = BusinessType.EXPORT) |
|
||||
@PostMapping("/export") |
|
||||
@ResponseBody |
|
||||
public AjaxResult export(MaterialRequisitionDetail materialRequisitionDetail) |
|
||||
{ |
|
||||
List<MaterialRequisitionDetail> list = materialRequisitionDetailService.selectMaterialRequisitionDetailList(materialRequisitionDetail); |
|
||||
ExcelUtil<MaterialRequisitionDetail> util = new ExcelUtil<MaterialRequisitionDetail>(MaterialRequisitionDetail.class); |
|
||||
return util.exportExcel(list, "领料物料数据"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 新增领料物料 |
|
||||
*/ |
|
||||
@GetMapping("/add") |
|
||||
public String add() |
|
||||
{ |
|
||||
return prefix + "/add"; |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 新增保存领料物料 |
|
||||
*/ |
|
||||
@RequiresPermissions("manufacture:materialRequisitionDetail:add") |
|
||||
@Log(title = "领料物料", businessType = BusinessType.INSERT) |
|
||||
@PostMapping("/add") |
|
||||
@ResponseBody |
|
||||
public AjaxResult addSave(MaterialRequisitionDetail materialRequisitionDetail) |
|
||||
{ |
|
||||
return toAjax(materialRequisitionDetailService.insertMaterialRequisitionDetail(materialRequisitionDetail)); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 新增保存领料物料 |
|
||||
*/ |
|
||||
@RequiresPermissions("manufacture:materialRequisitionDetail:add") |
|
||||
@Log(title = "领料物料", businessType = BusinessType.INSERT) |
|
||||
@PostMapping("/addEditSave") |
|
||||
@ResponseBody |
|
||||
public AjaxResult addEditSave(@RequestParam(value = "data") String data) |
|
||||
{ |
|
||||
// 反序列化
|
|
||||
List<MaterialRequisitionDetail> materialRequisitionDetailList = JSONObject.parseArray(data, MaterialRequisitionDetail.class); |
|
||||
|
|
||||
|
|
||||
for (int i=0;i<materialRequisitionDetailList.size();i++) { |
|
||||
|
|
||||
String id = String.valueOf(materialRequisitionDetailService.selectMaterialRequisitionDetailById(materialRequisitionDetailList.get(i).getMaterialRequisitionDetailId())); |
|
||||
if (Objects.equals(id, "null")) { |
|
||||
materialRequisitionDetailService.insertMaterialRequisitionDetail(materialRequisitionDetailList.get(i)); |
|
||||
} else { |
|
||||
materialRequisitionDetailService.updateMaterialRequisitionDetail(materialRequisitionDetailList.get(i)); |
|
||||
} |
|
||||
} |
|
||||
return new AjaxResult(SUCCESS, "test done"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 修改领料物料 |
|
||||
*/ |
|
||||
@GetMapping("/edit/{materialRequisitionDetailId}") |
|
||||
public String edit(@PathVariable("materialRequisitionDetailId") Long materialRequisitionDetailId, ModelMap mmap) |
|
||||
{ |
|
||||
MaterialRequisitionDetail materialRequisitionDetail = materialRequisitionDetailService.selectMaterialRequisitionDetailById(materialRequisitionDetailId); |
|
||||
mmap.put("materialRequisitionDetail", materialRequisitionDetail); |
|
||||
return prefix + "/edit"; |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 修改保存领料物料 |
|
||||
*/ |
|
||||
@RequiresPermissions("manufacture:materialRequisitionDetail:edit") |
|
||||
@Log(title = "领料物料", businessType = BusinessType.UPDATE) |
|
||||
@PostMapping("/edit") |
|
||||
@ResponseBody |
|
||||
public AjaxResult editSave(MaterialRequisitionDetail materialRequisitionDetail) |
|
||||
{ |
|
||||
return toAjax(materialRequisitionDetailService.updateMaterialRequisitionDetail(materialRequisitionDetail)); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 删除领料物料 |
|
||||
*/ |
|
||||
@RequiresPermissions("manufacture:materialRequisitionDetail:remove") |
|
||||
@Log(title = "领料物料", businessType = BusinessType.DELETE) |
|
||||
@PostMapping( "/remove") |
|
||||
@ResponseBody |
|
||||
public AjaxResult remove(String ids) |
|
||||
{ |
|
||||
return toAjax(materialRequisitionDetailService.deleteMaterialRequisitionDetailByIds(ids)); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 删除 |
|
||||
* @param ids |
|
||||
* @return |
|
||||
*/ |
|
||||
@PostMapping("/removeMaterial") |
|
||||
@ResponseBody |
|
||||
public AjaxResult removeMaterial(@RequestParam(value = "ids") String ids) { |
|
||||
// System.out.println(ids);
|
|
||||
ids=ids.replace("[","").replace("]",""); |
|
||||
List<String> idList = Arrays.asList(ids.split(",")); |
|
||||
for (int i=0;i<idList.size();i++) { |
|
||||
if (!("null".equals(idList.get(i)))) { |
|
||||
materialRequisitionDetailService.deleteMaterialRequisitionDetailById(Long.valueOf(idList.get(i))); |
|
||||
} |
|
||||
} |
|
||||
return new AjaxResult(SUCCESS, "test done"); |
|
||||
} |
|
||||
} |
|
@ -1,265 +0,0 @@ |
|||||
package com.ruoyi.manufacture.domain; |
|
||||
|
|
||||
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; |
|
||||
|
|
||||
/** |
|
||||
* 领料物料对象 material_requisition_detail |
|
||||
* |
|
||||
* @author ruoyi |
|
||||
* @date 2023-04-06 |
|
||||
*/ |
|
||||
public class MaterialRequisitionDetail extends BaseEntity |
|
||||
{ |
|
||||
private static final long serialVersionUID = 1L; |
|
||||
|
|
||||
/** 领料物料id */ |
|
||||
private Long materialRequisitionDetailId; |
|
||||
|
|
||||
/** 领料单号 */ |
|
||||
@Excel(name = "领料单号") |
|
||||
private String materialRequisitionNumber; |
|
||||
|
|
||||
/** 物料代码 */ |
|
||||
@Excel(name = "物料代码") |
|
||||
private String materialCode; |
|
||||
|
|
||||
/** 物料名称 */ |
|
||||
@Excel(name = "物料名称") |
|
||||
private String materialName; |
|
||||
|
|
||||
/** 规格型号 */ |
|
||||
@Excel(name = "规格型号") |
|
||||
private String specificationModel; |
|
||||
|
|
||||
/** 料号 */ |
|
||||
@Excel(name = "料号") |
|
||||
private String itemNumber; |
|
||||
|
|
||||
/** 机种 */ |
|
||||
@Excel(name = "机种") |
|
||||
private String typeMachine; |
|
||||
|
|
||||
/** 单位 */ |
|
||||
@Excel(name = "单位") |
|
||||
private String inventoryUnit; |
|
||||
|
|
||||
/** 计划数量 */ |
|
||||
@Excel(name = "计划数量") |
|
||||
private String planQuantity; |
|
||||
|
|
||||
/** 说明 */ |
|
||||
@Excel(name = "说明") |
|
||||
private String description; |
|
||||
|
|
||||
/** 单位用量 */ |
|
||||
@Excel(name = "单位用量") |
|
||||
private String unitUsage; |
|
||||
|
|
||||
/** 存放位置 */ |
|
||||
@Excel(name = "存放位置") |
|
||||
private String storageLocation; |
|
||||
|
|
||||
/** 物料类别 */ |
|
||||
@Excel(name = "物料类别") |
|
||||
private String materialType; |
|
||||
|
|
||||
/** 备用一 */ |
|
||||
private String standbyOne; |
|
||||
|
|
||||
/** 备用二 */ |
|
||||
private String standbyTwo; |
|
||||
|
|
||||
/** bom阶 */ |
|
||||
@Excel(name = "bom阶") |
|
||||
private String bomRank; |
|
||||
|
|
||||
/** 上级半成品代码 */ |
|
||||
@Excel(name = "上级半成品代码") |
|
||||
private String upFinishProductCode; |
|
||||
|
|
||||
public MaterialRequisitionDetail() { |
|
||||
} |
|
||||
|
|
||||
public MaterialRequisitionDetail(String materialRequisitionNumber, String upFinishProductCode) { |
|
||||
this.materialRequisitionNumber = materialRequisitionNumber; |
|
||||
this.upFinishProductCode = upFinishProductCode; |
|
||||
} |
|
||||
|
|
||||
public void setMaterialRequisitionDetailId(Long materialRequisitionDetailId) |
|
||||
{ |
|
||||
this.materialRequisitionDetailId = materialRequisitionDetailId; |
|
||||
} |
|
||||
|
|
||||
public Long getMaterialRequisitionDetailId() |
|
||||
{ |
|
||||
return materialRequisitionDetailId; |
|
||||
} |
|
||||
public void setMaterialRequisitionNumber(String materialRequisitionNumber) |
|
||||
{ |
|
||||
this.materialRequisitionNumber = materialRequisitionNumber; |
|
||||
} |
|
||||
|
|
||||
public String getMaterialRequisitionNumber() |
|
||||
{ |
|
||||
return materialRequisitionNumber; |
|
||||
} |
|
||||
public void setMaterialCode(String materialCode) |
|
||||
{ |
|
||||
this.materialCode = materialCode; |
|
||||
} |
|
||||
|
|
||||
public String getMaterialCode() |
|
||||
{ |
|
||||
return materialCode; |
|
||||
} |
|
||||
public void setMaterialName(String materialName) |
|
||||
{ |
|
||||
this.materialName = materialName; |
|
||||
} |
|
||||
|
|
||||
public String getMaterialName() |
|
||||
{ |
|
||||
return materialName; |
|
||||
} |
|
||||
public void setSpecificationModel(String specificationModel) |
|
||||
{ |
|
||||
this.specificationModel = specificationModel; |
|
||||
} |
|
||||
|
|
||||
public String getSpecificationModel() |
|
||||
{ |
|
||||
return specificationModel; |
|
||||
} |
|
||||
|
|
||||
public String getItemNumber() { |
|
||||
return itemNumber; |
|
||||
} |
|
||||
|
|
||||
public void setItemNumber(String itemNumber) { |
|
||||
this.itemNumber = itemNumber; |
|
||||
} |
|
||||
|
|
||||
public void setTypeMachine(String typeMachine) |
|
||||
{ |
|
||||
this.typeMachine = typeMachine; |
|
||||
} |
|
||||
|
|
||||
public String getTypeMachine() |
|
||||
{ |
|
||||
return typeMachine; |
|
||||
} |
|
||||
public void setInventoryUnit(String inventoryUnit) |
|
||||
{ |
|
||||
this.inventoryUnit = inventoryUnit; |
|
||||
} |
|
||||
|
|
||||
public String getInventoryUnit() |
|
||||
{ |
|
||||
return inventoryUnit; |
|
||||
} |
|
||||
public void setPlanQuantity(String planQuantity) |
|
||||
{ |
|
||||
this.planQuantity = planQuantity; |
|
||||
} |
|
||||
|
|
||||
public String getPlanQuantity() |
|
||||
{ |
|
||||
return planQuantity; |
|
||||
} |
|
||||
public void setDescription(String description) |
|
||||
{ |
|
||||
this.description = description; |
|
||||
} |
|
||||
|
|
||||
public String getDescription() |
|
||||
{ |
|
||||
return description; |
|
||||
} |
|
||||
public void setUnitUsage(String unitUsage) |
|
||||
{ |
|
||||
this.unitUsage = unitUsage; |
|
||||
} |
|
||||
|
|
||||
public String getUnitUsage() |
|
||||
{ |
|
||||
return unitUsage; |
|
||||
} |
|
||||
public void setStorageLocation(String storageLocation) |
|
||||
{ |
|
||||
this.storageLocation = storageLocation; |
|
||||
} |
|
||||
|
|
||||
public String getStorageLocation() |
|
||||
{ |
|
||||
return storageLocation; |
|
||||
} |
|
||||
public void setMaterialType(String materialType) |
|
||||
{ |
|
||||
this.materialType = materialType; |
|
||||
} |
|
||||
|
|
||||
public String getMaterialType() |
|
||||
{ |
|
||||
return materialType; |
|
||||
} |
|
||||
public void setStandbyOne(String standbyOne) |
|
||||
{ |
|
||||
this.standbyOne = standbyOne; |
|
||||
} |
|
||||
|
|
||||
public String getStandbyOne() |
|
||||
{ |
|
||||
return standbyOne; |
|
||||
} |
|
||||
public void setStandbyTwo(String standbyTwo) |
|
||||
{ |
|
||||
this.standbyTwo = standbyTwo; |
|
||||
} |
|
||||
|
|
||||
public String getStandbyTwo() |
|
||||
{ |
|
||||
return standbyTwo; |
|
||||
} |
|
||||
|
|
||||
public String getBomRank() { |
|
||||
return bomRank; |
|
||||
} |
|
||||
|
|
||||
public void setBomRank(String bomRank) { |
|
||||
this.bomRank = bomRank; |
|
||||
} |
|
||||
|
|
||||
public String getUpFinishProductCode() { |
|
||||
return upFinishProductCode; |
|
||||
} |
|
||||
|
|
||||
public void setUpFinishProductCode(String upFinishProductCode) { |
|
||||
this.upFinishProductCode = upFinishProductCode; |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public String toString() { |
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|
||||
.append("materialRequisitionDetailId", getMaterialRequisitionDetailId()) |
|
||||
.append("materialRequisitionNumber", getMaterialRequisitionNumber()) |
|
||||
.append("materialCode", getMaterialCode()) |
|
||||
.append("materialName", getMaterialName()) |
|
||||
.append("specificationModel", getSpecificationModel()) |
|
||||
.append("itemNumber", getItemNumber()) |
|
||||
.append("typeMachine", getTypeMachine()) |
|
||||
.append("inventoryUnit", getInventoryUnit()) |
|
||||
.append("planQuantity", getPlanQuantity()) |
|
||||
.append("description", getDescription()) |
|
||||
.append("unitUsage", getUnitUsage()) |
|
||||
.append("storageLocation", getStorageLocation()) |
|
||||
.append("materialType", getMaterialType()) |
|
||||
.append("standbyOne", getStandbyOne()) |
|
||||
.append("standbyTwo", getStandbyTwo()) |
|
||||
.append("bomRank", getBomRank()) |
|
||||
.append("upFinishProductCode", getUpFinishProductCode()) |
|
||||
.toString(); |
|
||||
} |
|
||||
} |
|
@ -1,62 +0,0 @@ |
|||||
package com.ruoyi.manufacture.mapper; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
import com.ruoyi.manufacture.domain.MaterialRequisitionDetail; |
|
||||
|
|
||||
/** |
|
||||
* 领料物料Mapper接口 |
|
||||
* |
|
||||
* @author ruoyi |
|
||||
* @date 2023-04-06 |
|
||||
*/ |
|
||||
public interface MaterialRequisitionDetailMapper |
|
||||
{ |
|
||||
/** |
|
||||
* 查询领料物料 |
|
||||
* |
|
||||
* @param materialRequisitionDetailId 领料物料ID |
|
||||
* @return 领料物料 |
|
||||
*/ |
|
||||
public MaterialRequisitionDetail selectMaterialRequisitionDetailById(Long materialRequisitionDetailId); |
|
||||
|
|
||||
/** |
|
||||
* 查询领料物料列表 |
|
||||
* |
|
||||
* @param materialRequisitionDetail 领料物料 |
|
||||
* @return 领料物料集合 |
|
||||
*/ |
|
||||
public List<MaterialRequisitionDetail> selectMaterialRequisitionDetailList(MaterialRequisitionDetail materialRequisitionDetail); |
|
||||
|
|
||||
/** |
|
||||
* 新增领料物料 |
|
||||
* |
|
||||
* @param materialRequisitionDetail 领料物料 |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int insertMaterialRequisitionDetail(MaterialRequisitionDetail materialRequisitionDetail); |
|
||||
|
|
||||
/** |
|
||||
* 修改领料物料 |
|
||||
* |
|
||||
* @param materialRequisitionDetail 领料物料 |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int updateMaterialRequisitionDetail(MaterialRequisitionDetail materialRequisitionDetail); |
|
||||
|
|
||||
/** |
|
||||
* 删除领料物料 |
|
||||
* |
|
||||
* @param materialRequisitionDetailId 领料物料ID |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int deleteMaterialRequisitionDetailById(Long materialRequisitionDetailId); |
|
||||
|
|
||||
/** |
|
||||
* 批量删除领料物料 |
|
||||
* |
|
||||
* @param materialRequisitionDetailIds 需要删除的数据ID |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int deleteMaterialRequisitionDetailByIds(String[] materialRequisitionDetailIds); |
|
||||
} |
|
@ -1,62 +0,0 @@ |
|||||
package com.ruoyi.manufacture.service; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
import com.ruoyi.manufacture.domain.MaterialRequisitionDetail; |
|
||||
|
|
||||
/** |
|
||||
* 领料物料Service接口 |
|
||||
* |
|
||||
* @author ruoyi |
|
||||
* @date 2023-04-06 |
|
||||
*/ |
|
||||
public interface IMaterialRequisitionDetailService |
|
||||
{ |
|
||||
/** |
|
||||
* 查询领料物料 |
|
||||
* |
|
||||
* @param materialRequisitionDetailId 领料物料ID |
|
||||
* @return 领料物料 |
|
||||
*/ |
|
||||
public MaterialRequisitionDetail selectMaterialRequisitionDetailById(Long materialRequisitionDetailId); |
|
||||
|
|
||||
/** |
|
||||
* 查询领料物料列表 |
|
||||
* |
|
||||
* @param materialRequisitionDetail 领料物料 |
|
||||
* @return 领料物料集合 |
|
||||
*/ |
|
||||
public List<MaterialRequisitionDetail> selectMaterialRequisitionDetailList(MaterialRequisitionDetail materialRequisitionDetail); |
|
||||
|
|
||||
/** |
|
||||
* 新增领料物料 |
|
||||
* |
|
||||
* @param materialRequisitionDetail 领料物料 |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int insertMaterialRequisitionDetail(MaterialRequisitionDetail materialRequisitionDetail); |
|
||||
|
|
||||
/** |
|
||||
* 修改领料物料 |
|
||||
* |
|
||||
* @param materialRequisitionDetail 领料物料 |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int updateMaterialRequisitionDetail(MaterialRequisitionDetail materialRequisitionDetail); |
|
||||
|
|
||||
/** |
|
||||
* 批量删除领料物料 |
|
||||
* |
|
||||
* @param ids 需要删除的数据ID |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int deleteMaterialRequisitionDetailByIds(String ids); |
|
||||
|
|
||||
/** |
|
||||
* 删除领料物料信息 |
|
||||
* |
|
||||
* @param materialRequisitionDetailId 领料物料ID |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int deleteMaterialRequisitionDetailById(Long materialRequisitionDetailId); |
|
||||
} |
|
@ -1,95 +0,0 @@ |
|||||
package com.ruoyi.manufacture.service.impl; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
import com.ruoyi.manufacture.domain.MaterialRequisitionDetail; |
|
||||
import com.ruoyi.manufacture.mapper.MaterialRequisitionDetailMapper; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.stereotype.Service; |
|
||||
import com.ruoyi.manufacture.service.IMaterialRequisitionDetailService; |
|
||||
import com.ruoyi.common.core.text.Convert; |
|
||||
|
|
||||
/** |
|
||||
* 领料物料Service业务层处理 |
|
||||
* |
|
||||
* @author ruoyi |
|
||||
* @date 2023-04-06 |
|
||||
*/ |
|
||||
@Service |
|
||||
public class MaterialRequisitionDetailServiceImpl implements IMaterialRequisitionDetailService |
|
||||
{ |
|
||||
@Autowired |
|
||||
private MaterialRequisitionDetailMapper materialRequisitionDetailMapper; |
|
||||
|
|
||||
/** |
|
||||
* 查询领料物料 |
|
||||
* |
|
||||
* @param materialRequisitionDetailId 领料物料ID |
|
||||
* @return 领料物料 |
|
||||
*/ |
|
||||
@Override |
|
||||
public MaterialRequisitionDetail selectMaterialRequisitionDetailById(Long materialRequisitionDetailId) |
|
||||
{ |
|
||||
return materialRequisitionDetailMapper.selectMaterialRequisitionDetailById(materialRequisitionDetailId); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 查询领料物料列表 |
|
||||
* |
|
||||
* @param materialRequisitionDetail 领料物料 |
|
||||
* @return 领料物料 |
|
||||
*/ |
|
||||
@Override |
|
||||
public List<MaterialRequisitionDetail> selectMaterialRequisitionDetailList(MaterialRequisitionDetail materialRequisitionDetail) |
|
||||
{ |
|
||||
return materialRequisitionDetailMapper.selectMaterialRequisitionDetailList(materialRequisitionDetail); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 新增领料物料 |
|
||||
* |
|
||||
* @param materialRequisitionDetail 领料物料 |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
@Override |
|
||||
public int insertMaterialRequisitionDetail(MaterialRequisitionDetail materialRequisitionDetail) |
|
||||
{ |
|
||||
return materialRequisitionDetailMapper.insertMaterialRequisitionDetail(materialRequisitionDetail); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 修改领料物料 |
|
||||
* |
|
||||
* @param materialRequisitionDetail 领料物料 |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
@Override |
|
||||
public int updateMaterialRequisitionDetail(MaterialRequisitionDetail materialRequisitionDetail) |
|
||||
{ |
|
||||
return materialRequisitionDetailMapper.updateMaterialRequisitionDetail(materialRequisitionDetail); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 删除领料物料对象 |
|
||||
* |
|
||||
* @param ids 需要删除的数据ID |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
@Override |
|
||||
public int deleteMaterialRequisitionDetailByIds(String ids) |
|
||||
{ |
|
||||
return materialRequisitionDetailMapper.deleteMaterialRequisitionDetailByIds(Convert.toStrArray(ids)); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 删除领料物料信息 |
|
||||
* |
|
||||
* @param materialRequisitionDetailId 领料物料ID |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
@Override |
|
||||
public int deleteMaterialRequisitionDetailById(Long materialRequisitionDetailId) |
|
||||
{ |
|
||||
return materialRequisitionDetailMapper.deleteMaterialRequisitionDetailById(materialRequisitionDetailId); |
|
||||
} |
|
||||
} |
|
@ -1,121 +0,0 @@ |
|||||
<?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.manufacture.mapper.MaterialRequisitionDetailMapper"> |
|
||||
|
|
||||
<resultMap type="MaterialRequisitionDetail" id="MaterialRequisitionDetailResult"> |
|
||||
<result property="materialRequisitionDetailId" column="material_requisition_detail_id" /> |
|
||||
<result property="materialRequisitionNumber" column="material_requisition_number" /> |
|
||||
<result property="materialCode" column="material_code" /> |
|
||||
<result property="materialName" column="material_name" /> |
|
||||
<result property="specificationModel" column="specification_model" /> |
|
||||
<result property="itemNumber" column="item_number" /> |
|
||||
<result property="typeMachine" column="type_machine" /> |
|
||||
<result property="inventoryUnit" column="inventory_unit" /> |
|
||||
<result property="planQuantity" column="plan_quantity" /> |
|
||||
<result property="description" column="description" /> |
|
||||
<result property="unitUsage" column="unit_usage" /> |
|
||||
<result property="storageLocation" column="storage_location" /> |
|
||||
<result property="materialType" column="material_type" /> |
|
||||
<result property="standbyOne" column="standby_one" /> |
|
||||
<result property="standbyTwo" column="standby_two" /> |
|
||||
<result property="bomRank" column="bom_rank" /> |
|
||||
<result property="upFinishProductCode" column="up_finish_product_code" /> |
|
||||
</resultMap> |
|
||||
|
|
||||
<sql id="selectMaterialRequisitionDetailVo"> |
|
||||
select material_requisition_detail_id, material_requisition_number, material_code, material_name, specification_model, item_number, type_machine, inventory_unit, plan_quantity, description, unit_usage, storage_location, material_type, standby_one, standby_two, bom_rank, up_finish_product_code from material_requisition_detail |
|
||||
</sql> |
|
||||
|
|
||||
<select id="selectMaterialRequisitionDetailList" parameterType="MaterialRequisitionDetail" resultMap="MaterialRequisitionDetailResult"> |
|
||||
<include refid="selectMaterialRequisitionDetailVo"/> |
|
||||
<where> |
|
||||
<if test="materialRequisitionNumber != null and materialRequisitionNumber != ''"> and material_requisition_number like concat('%', #{materialRequisitionNumber}, '%')</if> |
|
||||
<if test="materialCode != null and materialCode != ''"> and material_code like concat('%', #{materialCode}, '%')</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="upFinishProductCode != null and upFinishProductCode != ''"> and up_finish_product_code = #{upFinishProductCode}</if> |
|
||||
</where> |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectMaterialRequisitionDetailById" parameterType="Long" resultMap="MaterialRequisitionDetailResult"> |
|
||||
<include refid="selectMaterialRequisitionDetailVo"/> |
|
||||
where material_requisition_detail_id = #{materialRequisitionDetailId} |
|
||||
</select> |
|
||||
|
|
||||
<insert id="insertMaterialRequisitionDetail" parameterType="MaterialRequisitionDetail" useGeneratedKeys="true" keyProperty="materialRequisitionDetailId"> |
|
||||
insert into material_requisition_detail |
|
||||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
||||
<if test="materialRequisitionNumber != null">material_requisition_number,</if> |
|
||||
<if test="materialCode != null">material_code,</if> |
|
||||
<if test="materialName != null">material_name,</if> |
|
||||
<if test="specificationModel != null">specification_model,</if> |
|
||||
<if test="itemNumber != null">item_number,</if> |
|
||||
<if test="typeMachine != null">type_machine,</if> |
|
||||
<if test="inventoryUnit != null">inventory_unit,</if> |
|
||||
<if test="planQuantity != null">plan_quantity,</if> |
|
||||
<if test="description != null">description,</if> |
|
||||
<if test="unitUsage != null">unit_usage,</if> |
|
||||
<if test="storageLocation != null">storage_location,</if> |
|
||||
<if test="materialType != null">material_type,</if> |
|
||||
<if test="standbyOne != null">standby_one,</if> |
|
||||
<if test="standbyTwo != null">standby_two,</if> |
|
||||
<if test="bomRank != null">bom_rank,</if> |
|
||||
<if test="upFinishProductCode != null">up_finish_product_code,</if> |
|
||||
</trim> |
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
||||
<if test="materialRequisitionNumber != null">#{materialRequisitionNumber},</if> |
|
||||
<if test="materialCode != null">#{materialCode},</if> |
|
||||
<if test="materialName != null">#{materialName},</if> |
|
||||
<if test="specificationModel != null">#{specificationModel},</if> |
|
||||
<if test="itemNumber != null">#{itemNumber},</if> |
|
||||
<if test="typeMachine != null">#{typeMachine},</if> |
|
||||
<if test="inventoryUnit != null">#{inventoryUnit},</if> |
|
||||
<if test="planQuantity != null">#{planQuantity},</if> |
|
||||
<if test="description != null">#{description},</if> |
|
||||
<if test="unitUsage != null">#{unitUsage},</if> |
|
||||
<if test="storageLocation != null">#{storageLocation},</if> |
|
||||
<if test="materialType != null">#{materialType},</if> |
|
||||
<if test="standbyOne != null">#{standbyOne},</if> |
|
||||
<if test="standbyTwo != null">#{standbyTwo},</if> |
|
||||
<if test="bomRank != null">#{bomRank},</if> |
|
||||
<if test="upFinishProductCode != null">#{upFinishProductCode},</if> |
|
||||
</trim> |
|
||||
</insert> |
|
||||
|
|
||||
<update id="updateMaterialRequisitionDetail" parameterType="MaterialRequisitionDetail"> |
|
||||
update material_requisition_detail |
|
||||
<trim prefix="SET" suffixOverrides=","> |
|
||||
<if test="materialRequisitionNumber != null">material_requisition_number = #{materialRequisitionNumber},</if> |
|
||||
<if test="materialCode != null">material_code = #{materialCode},</if> |
|
||||
<if test="materialName != null">material_name = #{materialName},</if> |
|
||||
<if test="specificationModel != null">specification_model = #{specificationModel},</if> |
|
||||
<if test="itemNumber != null">item_number = #{itemNumber},</if> |
|
||||
<if test="typeMachine != null">type_machine = #{typeMachine},</if> |
|
||||
<if test="inventoryUnit != null">inventory_unit = #{inventoryUnit},</if> |
|
||||
<if test="planQuantity != null">plan_quantity = #{planQuantity},</if> |
|
||||
<if test="description != null">description = #{description},</if> |
|
||||
<if test="unitUsage != null">unit_usage = #{unitUsage},</if> |
|
||||
<if test="storageLocation != null">storage_location = #{storageLocation},</if> |
|
||||
<if test="materialType != null">material_type = #{materialType},</if> |
|
||||
<if test="standbyOne != null">standby_one = #{standbyOne},</if> |
|
||||
<if test="standbyTwo != null">standby_two = #{standbyTwo},</if> |
|
||||
<if test="bomRank != null">bom_rank = #{bomRank},</if> |
|
||||
<if test="upFinishProductCode != null">up_finish_product_code = #{upFinishProductCode},</if> |
|
||||
</trim> |
|
||||
where material_requisition_detail_id = #{materialRequisitionDetailId} |
|
||||
</update> |
|
||||
|
|
||||
<delete id="deleteMaterialRequisitionDetailById" parameterType="Long"> |
|
||||
delete from material_requisition_detail where material_requisition_detail_id = #{materialRequisitionDetailId} |
|
||||
</delete> |
|
||||
|
|
||||
<delete id="deleteMaterialRequisitionDetailByIds" parameterType="String"> |
|
||||
delete from material_requisition_detail where material_requisition_detail_id in |
|
||||
<foreach item="materialRequisitionDetailId" collection="array" open="(" separator="," close=")"> |
|
||||
#{materialRequisitionDetailId} |
|
||||
</foreach> |
|
||||
</delete> |
|
||||
|
|
||||
</mapper> |
|
@ -1,93 +0,0 @@ |
|||||
<!DOCTYPE html> |
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|
||||
<head> |
|
||||
<th:block th:include="include :: header('新增领料物料')" /> |
|
||||
</head> |
|
||||
<body class="white-bg"> |
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|
||||
<form class="form-horizontal m" id="form-materialRequisitionDetail-add"> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">领料单号:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="materialRequisitionNumber" 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="materialCode" 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"> |
|
||||
<input name="specificationModel" 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="typeMachine" 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="inventoryUnit" 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="planQuantity" 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="description" 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="unitUsage" 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="storageLocation" 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" th:with="type=${@dict.getType('sys_wl_class')}"> |
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|
||||
</select> |
|
||||
</div> |
|
||||
</div> |
|
||||
</form> |
|
||||
</div> |
|
||||
<th:block th:include="include :: footer" /> |
|
||||
<script th:inline="javascript"> |
|
||||
var prefix = ctx + "manufacture/materialRequisitionDetail" |
|
||||
$("#form-materialRequisitionDetail-add").validate({ |
|
||||
focusCleanup: true |
|
||||
}); |
|
||||
|
|
||||
function submitHandler() { |
|
||||
if ($.validate.form()) { |
|
||||
$.operate.save(prefix + "/add", $('#form-materialRequisitionDetail-add').serialize()); |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
</body> |
|
||||
</html> |
|
@ -1,94 +0,0 @@ |
|||||
<!DOCTYPE html> |
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|
||||
<head> |
|
||||
<th:block th:include="include :: header('修改领料物料')" /> |
|
||||
</head> |
|
||||
<body class="white-bg"> |
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|
||||
<form class="form-horizontal m" id="form-materialRequisitionDetail-edit" th:object="${materialRequisitionDetail}"> |
|
||||
<input name="materialRequisitionDetailId" th:field="*{materialRequisitionDetailId}" type="hidden"> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">领料单号:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="materialRequisitionNumber" th:field="*{materialRequisitionNumber}" 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="materialCode" th:field="*{materialCode}" 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"> |
|
||||
<input name="specificationModel" th:field="*{specificationModel}" 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="typeMachine" th:field="*{typeMachine}" 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="inventoryUnit" th:field="*{inventoryUnit}" 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="planQuantity" th:field="*{planQuantity}" 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="description" th:field="*{description}" 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="unitUsage" th:field="*{unitUsage}" 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="storageLocation" th:field="*{storageLocation}" 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" th:with="type=${@dict.getType('sys_wl_class')}"> |
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{materialType}"></option> |
|
||||
</select> |
|
||||
</div> |
|
||||
</div> |
|
||||
</form> |
|
||||
</div> |
|
||||
<th:block th:include="include :: footer" /> |
|
||||
<script th:inline="javascript"> |
|
||||
var prefix = ctx + "manufacture/materialRequisitionDetail"; |
|
||||
$("#form-materialRequisitionDetail-edit").validate({ |
|
||||
focusCleanup: true |
|
||||
}); |
|
||||
|
|
||||
function submitHandler() { |
|
||||
if ($.validate.form()) { |
|
||||
$.operate.save(prefix + "/edit", $('#form-materialRequisitionDetail-edit').serialize()); |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
</body> |
|
||||
</html> |
|
@ -1,145 +0,0 @@ |
|||||
<!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="materialRequisitionNumber"/> |
|
||||
</li> |
|
||||
<li> |
|
||||
<label>物料代码:</label> |
|
||||
<input type="text" name="materialCode"/> |
|
||||
</li> |
|
||||
<li> |
|
||||
<label>物料名称:</label> |
|
||||
<input type="text" name="materialName"/> |
|
||||
</li> |
|
||||
<li> |
|
||||
<label>物料类别:</label> |
|
||||
<select name="materialType" th:with="type=${@dict.getType('sys_wl_class')}"> |
|
||||
<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="manufacture:materialRequisitionDetail:add"> |
|
||||
<i class="fa fa-plus"></i> 添加 |
|
||||
</a> |
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="manufacture:materialRequisitionDetail:edit"> |
|
||||
<i class="fa fa-edit"></i> 修改 |
|
||||
</a> |
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="manufacture:materialRequisitionDetail:remove"> |
|
||||
<i class="fa fa-remove"></i> 删除 |
|
||||
</a> |
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="manufacture:materialRequisitionDetail: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('manufacture:materialRequisitionDetail:edit')}]]; |
|
||||
var removeFlag = [[${@permission.hasPermi('manufacture:materialRequisitionDetail:remove')}]]; |
|
||||
var materialTypeDatas = [[${@dict.getType('sys_wl_class')}]]; |
|
||||
var prefix = ctx + "manufacture/materialRequisitionDetail"; |
|
||||
|
|
||||
$(function() { |
|
||||
var options = { |
|
||||
url: prefix + "/list", |
|
||||
createUrl: prefix + "/add", |
|
||||
updateUrl: prefix + "/edit/{id}", |
|
||||
removeUrl: prefix + "/remove", |
|
||||
exportUrl: prefix + "/export", |
|
||||
modalName: "领料物料", |
|
||||
columns: [{ |
|
||||
checkbox: true |
|
||||
}, |
|
||||
{ |
|
||||
field: 'materialRequisitionDetailId', |
|
||||
title: '领料物料id', |
|
||||
visible: false |
|
||||
}, |
|
||||
{ |
|
||||
field: 'materialRequisitionNumber', |
|
||||
title: '领料单号' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'materialCode', |
|
||||
title: '物料代码' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'materialName', |
|
||||
title: '物料名称' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'specificationModel', |
|
||||
title: '规格型号' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'typeMachine', |
|
||||
title: '机种' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'inventoryUnit', |
|
||||
title: '单位' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'planQuantity', |
|
||||
title: '计划数量' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'description', |
|
||||
title: '说明' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'unitUsage', |
|
||||
title: '单位用量' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'storageLocation', |
|
||||
title: '存放位置' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'materialType', |
|
||||
title: '物料类别', |
|
||||
formatter: function(value, row, index) { |
|
||||
return $.table.selectDictLabel(materialTypeDatas, 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.materialRequisitionDetailId + '\')"><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.materialRequisitionDetailId + '\')"><i class="fa fa-remove"></i>删除</a>'); |
|
||||
return actions.join(''); |
|
||||
} |
|
||||
}] |
|
||||
}; |
|
||||
$.table.init(options); |
|
||||
}); |
|
||||
</script> |
|
||||
</body> |
|
||||
</html> |
|
Loading…
Reference in new issue