Browse Source
整合新增委外领料 controller 整合新增委外领料 Service 整合新增委外领料 ServiceImpl 整合新增委外领料 Mapper 整合新增委外领料 Mapper.xml 整合新增委外领料 相关前端页面dev
liuxiaoxu
4 months ago
10 changed files with 1225 additions and 0 deletions
@ -0,0 +1,128 @@ |
|||
package com.ruoyi.system.controller; |
|||
|
|||
import java.util.List; |
|||
|
|||
import com.ruoyi.common.utils.poi.ExcelUtil; |
|||
import com.ruoyi.system.domain.OutsourceRequisition; |
|||
import com.ruoyi.system.service.IOutsourceRequisitionService; |
|||
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 com.ruoyi.common.annotation.Log; |
|||
import com.ruoyi.common.enums.BusinessType; |
|||
|
|||
import com.ruoyi.common.core.controller.BaseController; |
|||
import com.ruoyi.common.core.domain.AjaxResult; |
|||
|
|||
import com.ruoyi.common.core.page.TableDataInfo; |
|||
|
|||
/** |
|||
* 委外领料Controller |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-07-06 |
|||
*/ |
|||
@Controller |
|||
@RequestMapping("/system/outsource_requisition") |
|||
public class OutsourceRequisitionController extends BaseController |
|||
{ |
|||
private String prefix = "system/outsource_requisition"; |
|||
|
|||
@Autowired |
|||
private IOutsourceRequisitionService outsourceRequisitionService; |
|||
|
|||
@RequiresPermissions("system:outsource_requisition:view") |
|||
@GetMapping() |
|||
public String outsource_requisition() |
|||
{ |
|||
return prefix + "/outsource_requisition"; |
|||
} |
|||
|
|||
/** |
|||
* 查询委外领料列表 |
|||
*/ |
|||
@RequiresPermissions("system:outsource_requisition:list") |
|||
@PostMapping("/list") |
|||
@ResponseBody |
|||
public TableDataInfo list(OutsourceRequisition outsourceRequisition) |
|||
{ |
|||
startPage(); |
|||
List<OutsourceRequisition> list = outsourceRequisitionService.selectOutsourceRequisitionList(outsourceRequisition); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
/** |
|||
* 导出委外领料列表 |
|||
*/ |
|||
@RequiresPermissions("system:outsource_requisition:export") |
|||
@Log(title = "委外领料", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
@ResponseBody |
|||
public AjaxResult export(OutsourceRequisition outsourceRequisition) |
|||
{ |
|||
List<OutsourceRequisition> list = outsourceRequisitionService.selectOutsourceRequisitionList(outsourceRequisition); |
|||
ExcelUtil<OutsourceRequisition> util = new ExcelUtil<OutsourceRequisition>(OutsourceRequisition.class); |
|||
return util.exportExcel(list, "委外领料数据"); |
|||
} |
|||
|
|||
/** |
|||
* 新增委外领料 |
|||
*/ |
|||
@GetMapping("/add") |
|||
public String add() |
|||
{ |
|||
return prefix + "/add"; |
|||
} |
|||
|
|||
/** |
|||
* 新增保存委外领料 |
|||
*/ |
|||
@RequiresPermissions("system:outsource_requisition:add") |
|||
@Log(title = "委外领料", businessType = BusinessType.INSERT) |
|||
@PostMapping("/addRequisition") |
|||
@ResponseBody |
|||
public AjaxResult addSave(@RequestBody OutsourceRequisition outsourceRequisition) |
|||
{ |
|||
System.out.println(outsourceRequisition); |
|||
return toAjax(outsourceRequisitionService.insertOutsourceRequisition(outsourceRequisition)); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 修改委外领料 |
|||
*/ |
|||
@RequiresPermissions("system:outsource_requisition:edit") |
|||
@GetMapping("/edit/{outsourceRequisitionId}") |
|||
public String edit(@PathVariable("outsourceRequisitionId") Long outsourceRequisitionId, ModelMap mmap) |
|||
{ |
|||
OutsourceRequisition outsourceRequisition = outsourceRequisitionService.selectOutsourceRequisitionByOutsourceRequisitionId(outsourceRequisitionId); |
|||
mmap.put("outsourceRequisition", outsourceRequisition); |
|||
return prefix + "/edit"; |
|||
} |
|||
|
|||
/** |
|||
* 修改保存委外领料 |
|||
*/ |
|||
@RequiresPermissions("system:outsource_requisition:edit") |
|||
@Log(title = "委外领料", businessType = BusinessType.UPDATE) |
|||
@PostMapping("/edit") |
|||
@ResponseBody |
|||
public AjaxResult editSave(OutsourceRequisition outsourceRequisition) |
|||
{ |
|||
return toAjax(outsourceRequisitionService.updateOutsourceRequisition(outsourceRequisition)); |
|||
} |
|||
|
|||
/** |
|||
* 删除委外领料 |
|||
*/ |
|||
@RequiresPermissions("system:outsource_requisition:remove") |
|||
@Log(title = "委外领料", businessType = BusinessType.DELETE) |
|||
@PostMapping( "/remove") |
|||
@ResponseBody |
|||
public AjaxResult remove(String ids) |
|||
{ |
|||
return toAjax(outsourceRequisitionService.deleteOutsourceRequisitionByOutsourceRequisitionIds(ids)); |
|||
} |
|||
} |
@ -0,0 +1,144 @@ |
|||
package com.ruoyi.system.domain; |
|||
|
|||
import java.util.List; |
|||
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; |
|||
|
|||
/** |
|||
* 委外领料对象 outsource_requisition |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-07-06 |
|||
*/ |
|||
public class OutsourceRequisition extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 委外领料id */ |
|||
private Long outsourceRequisitionId; |
|||
|
|||
/** 委外领料编号 */ |
|||
@Excel(name = "委外领料编号") |
|||
private String outsourceRequisitionNo; |
|||
|
|||
/** 委外订单编号 */ |
|||
@Excel(name = "委外订单编号") |
|||
private String outsourceOrderNo; |
|||
|
|||
/** 领料员 */ |
|||
@Excel(name = "领料员") |
|||
private String requisitionPerson; |
|||
|
|||
/** 物料合计 */ |
|||
@Excel(name = "物料合计") |
|||
private Long materialAmount; |
|||
|
|||
/** 数量总计 */ |
|||
@Excel(name = "数量总计") |
|||
private Long totalAmount; |
|||
|
|||
/** 审核状态 */ |
|||
@Excel(name = "审核状态") |
|||
private String auditStatus; |
|||
|
|||
/** 领料状态 */ |
|||
@Excel(name = "领料状态") |
|||
private String requisitionStatus; |
|||
|
|||
public String getRequisitionStatus() { |
|||
return requisitionStatus; |
|||
} |
|||
|
|||
public void setRequisitionStatus(String requisitionStatus) { |
|||
this.requisitionStatus = requisitionStatus; |
|||
} |
|||
|
|||
/** 委外领料详情信息 */ |
|||
private List<OutsourceRequisitionDetail> outsourceRequisitionDetailList; |
|||
|
|||
public Long getOutsourceRequisitionId() { |
|||
return outsourceRequisitionId; |
|||
} |
|||
|
|||
public void setOutsourceRequisitionId(Long outsourceRequisitionId) { |
|||
this.outsourceRequisitionId = outsourceRequisitionId; |
|||
} |
|||
|
|||
public String getOutsourceRequisitionNo() { |
|||
return outsourceRequisitionNo; |
|||
} |
|||
|
|||
public void setOutsourceRequisitionNo(String outsourceRequisitionNo) { |
|||
this.outsourceRequisitionNo = outsourceRequisitionNo; |
|||
} |
|||
|
|||
public String getOutsourceOrderNo() { |
|||
return outsourceOrderNo; |
|||
} |
|||
|
|||
public void setOutsourceOrderNo(String outsourceOrderNo) { |
|||
this.outsourceOrderNo = outsourceOrderNo; |
|||
} |
|||
|
|||
public String getRequisitionPerson() { |
|||
return requisitionPerson; |
|||
} |
|||
|
|||
public void setRequisitionPerson(String requisitionPerson) { |
|||
this.requisitionPerson = requisitionPerson; |
|||
} |
|||
|
|||
public Long getMaterialAmount() { |
|||
return materialAmount; |
|||
} |
|||
|
|||
public void setMaterialAmount(Long materialAmount) { |
|||
this.materialAmount = materialAmount; |
|||
} |
|||
|
|||
public Long getTotalAmount() { |
|||
return totalAmount; |
|||
} |
|||
|
|||
public void setTotalAmount(Long totalAmount) { |
|||
this.totalAmount = totalAmount; |
|||
} |
|||
|
|||
public String getAuditStatus() { |
|||
return auditStatus; |
|||
} |
|||
|
|||
public void setAuditStatus(String auditStatus) { |
|||
this.auditStatus = auditStatus; |
|||
} |
|||
|
|||
public List<OutsourceRequisitionDetail> getOutsourceRequisitionDetailList() { |
|||
return outsourceRequisitionDetailList; |
|||
} |
|||
|
|||
public void setOutsourceRequisitionDetailList(List<OutsourceRequisitionDetail> outsourceRequisitionDetailList) |
|||
{ |
|||
this.outsourceRequisitionDetailList = outsourceRequisitionDetailList; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|||
.append("outsourceRequisitionId", getOutsourceRequisitionId()) |
|||
.append("outsourceRequisitionNo", getOutsourceRequisitionNo()) |
|||
.append("outsourceOrderNo", getOutsourceOrderNo()) |
|||
.append("requisitionPerson", getRequisitionPerson()) |
|||
.append("createBy", getCreateBy()) |
|||
.append("createTime", getCreateTime()) |
|||
.append("updateBy", getUpdateBy()) |
|||
.append("updateTime", getUpdateTime()) |
|||
.append("materialAmount", getMaterialAmount()) |
|||
.append("totalAmount", getTotalAmount()) |
|||
.append("auditStatus", getAuditStatus()) |
|||
.append("requisitionStatus", getRequisitionStatus()) |
|||
.append("outsourceRequisitionDetailList", getOutsourceRequisitionDetailList()) |
|||
.toString(); |
|||
} |
|||
} |
@ -0,0 +1,93 @@ |
|||
package com.ruoyi.system.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; |
|||
|
|||
/** |
|||
* 委外领料详情对象 outsource_requisition_detail |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-07-06 |
|||
*/ |
|||
public class OutsourceRequisitionDetail extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 委外领料详情id */ |
|||
private Long outsourceRequisitionDetailId; |
|||
|
|||
/** 委外领料编号 */ |
|||
@Excel(name = "委外领料编号") |
|||
private String outsourceRequisitionNo; |
|||
|
|||
/** 料号 */ |
|||
@Excel(name = "料号") |
|||
private String materialNo; |
|||
|
|||
/** 已委外领料数 */ |
|||
@Excel(name = "已委外领料数") |
|||
private Long takenMaterial; |
|||
|
|||
/** 本次委外领料数 */ |
|||
@Excel(name = "本次委外领料数") |
|||
private Long takingMaterial; |
|||
|
|||
public void setOutsourceRequisitionDetailId(Long outsourceRequisitionDetailId) |
|||
{ |
|||
this.outsourceRequisitionDetailId = outsourceRequisitionDetailId; |
|||
} |
|||
|
|||
public Long getOutsourceRequisitionDetailId() |
|||
{ |
|||
return outsourceRequisitionDetailId; |
|||
} |
|||
public void setOutsourceRequisitionNo(String outsourceRequisitionNo) |
|||
{ |
|||
this.outsourceRequisitionNo = outsourceRequisitionNo; |
|||
} |
|||
|
|||
public String getOutsourceRequisitionNo() |
|||
{ |
|||
return outsourceRequisitionNo; |
|||
} |
|||
public void setMaterialNo(String materialNo) |
|||
{ |
|||
this.materialNo = materialNo; |
|||
} |
|||
|
|||
public String getMaterialNo() |
|||
{ |
|||
return materialNo; |
|||
} |
|||
public void setTakenMaterial(Long takenMaterial) |
|||
{ |
|||
this.takenMaterial = takenMaterial; |
|||
} |
|||
|
|||
public Long getTakenMaterial() |
|||
{ |
|||
return takenMaterial; |
|||
} |
|||
public void setTakingMaterial(Long takingMaterial) |
|||
{ |
|||
this.takingMaterial = takingMaterial; |
|||
} |
|||
|
|||
public Long getTakingMaterial() |
|||
{ |
|||
return takingMaterial; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|||
.append("outsourceRequisitionDetailId", getOutsourceRequisitionDetailId()) |
|||
.append("outsourceRequisitionNo", getOutsourceRequisitionNo()) |
|||
.append("materialNo", getMaterialNo()) |
|||
.append("takenMaterial", getTakenMaterial()) |
|||
.append("takingMaterial", getTakingMaterial()) |
|||
.toString(); |
|||
} |
|||
} |
@ -0,0 +1,89 @@ |
|||
package com.ruoyi.system.mapper; |
|||
|
|||
import com.ruoyi.system.domain.OutsourceRequisition; |
|||
import com.ruoyi.system.domain.OutsourceRequisitionDetail; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* 委外领料Mapper接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-07-06 |
|||
*/ |
|||
public interface OutsourceRequisitionMapper |
|||
{ |
|||
/** |
|||
* 查询委外领料 |
|||
* |
|||
* @param outsourceRequisitionId 委外领料主键 |
|||
* @return 委外领料 |
|||
*/ |
|||
public OutsourceRequisition selectOutsourceRequisitionByOutsourceRequisitionId(Long outsourceRequisitionId); |
|||
|
|||
/** |
|||
* 查询委外领料列表 |
|||
* |
|||
* @param outsourceRequisition 委外领料 |
|||
* @return 委外领料集合 |
|||
*/ |
|||
public List<OutsourceRequisition> selectOutsourceRequisitionList(OutsourceRequisition outsourceRequisition); |
|||
|
|||
/** |
|||
* 新增委外领料 |
|||
* |
|||
* @param outsourceRequisition 委外领料 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertOutsourceRequisition(OutsourceRequisition outsourceRequisition); |
|||
|
|||
/** |
|||
* 修改委外领料 |
|||
* |
|||
* @param outsourceRequisition 委外领料 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateOutsourceRequisition(OutsourceRequisition outsourceRequisition); |
|||
|
|||
/** |
|||
* 删除委外领料 |
|||
* |
|||
* @param outsourceRequisitionId 委外领料主键 |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteOutsourceRequisitionByOutsourceRequisitionId(Long outsourceRequisitionId); |
|||
|
|||
/** |
|||
* 批量删除委外领料 |
|||
* |
|||
* @param outsourceRequisitionIds 需要删除的数据主键集合 |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteOutsourceRequisitionByOutsourceRequisitionIds(String[] outsourceRequisitionIds); |
|||
|
|||
/** |
|||
* 批量删除委外领料详情 |
|||
* |
|||
* @param outsourceRequisitionIds 需要删除的数据主键集合 |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteOutsourceRequisitionDetailByOutsourceRequisitionNos(String[] outsourceRequisitionIds); |
|||
|
|||
/** |
|||
* 批量新增委外领料详情 |
|||
* |
|||
* @param outsourceRequisitionDetailList 委外领料详情列表 |
|||
* @return 结果 |
|||
*/ |
|||
public int batchOutsourceRequisitionDetail(List<OutsourceRequisitionDetail> outsourceRequisitionDetailList); |
|||
|
|||
|
|||
/** |
|||
* 通过委外领料主键删除委外领料详情信息 |
|||
* |
|||
* @param outsourceRequisitionId 委外领料ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteOutsourceRequisitionDetailByOutsourceRequisitionNo(Long outsourceRequisitionId); |
|||
} |
@ -0,0 +1,63 @@ |
|||
package com.ruoyi.system.service; |
|||
|
|||
import com.ruoyi.system.domain.OutsourceRequisition; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* 委外领料Service接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-07-06 |
|||
*/ |
|||
public interface IOutsourceRequisitionService |
|||
{ |
|||
/** |
|||
* 查询委外领料 |
|||
* |
|||
* @param outsourceRequisitionId 委外领料主键 |
|||
* @return 委外领料 |
|||
*/ |
|||
public OutsourceRequisition selectOutsourceRequisitionByOutsourceRequisitionId(Long outsourceRequisitionId); |
|||
|
|||
/** |
|||
* 查询委外领料列表 |
|||
* |
|||
* @param outsourceRequisition 委外领料 |
|||
* @return 委外领料集合 |
|||
*/ |
|||
public List<OutsourceRequisition> selectOutsourceRequisitionList(OutsourceRequisition outsourceRequisition); |
|||
|
|||
/** |
|||
* 新增委外领料 |
|||
* |
|||
* @param outsourceRequisition 委外领料 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertOutsourceRequisition(OutsourceRequisition outsourceRequisition); |
|||
|
|||
/** |
|||
* 修改委外领料 |
|||
* |
|||
* @param outsourceRequisition 委外领料 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateOutsourceRequisition(OutsourceRequisition outsourceRequisition); |
|||
|
|||
/** |
|||
* 批量删除委外领料 |
|||
* |
|||
* @param outsourceRequisitionIds 需要删除的委外领料主键集合 |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteOutsourceRequisitionByOutsourceRequisitionIds(String outsourceRequisitionIds); |
|||
|
|||
/** |
|||
* 删除委外领料信息 |
|||
* |
|||
* @param outsourceRequisitionId 委外领料主键 |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteOutsourceRequisitionByOutsourceRequisitionId(Long outsourceRequisitionId); |
|||
} |
@ -0,0 +1,140 @@ |
|||
package com.ruoyi.system.service.impl; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.common.utils.DateUtils; |
|||
import com.ruoyi.system.domain.OutsourceRequisition; |
|||
import com.ruoyi.system.domain.OutsourceRequisitionDetail; |
|||
import com.ruoyi.system.mapper.OutsourceRequisitionMapper; |
|||
import com.ruoyi.system.service.IOutsourceRequisitionService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import java.util.ArrayList; |
|||
import com.ruoyi.common.utils.StringUtils; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import com.ruoyi.common.core.text.Convert; |
|||
|
|||
/** |
|||
* 委外领料Service业务层处理 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-07-06 |
|||
*/ |
|||
@Service |
|||
public class OutsourceRequisitionServiceImpl implements IOutsourceRequisitionService |
|||
{ |
|||
@Autowired |
|||
private OutsourceRequisitionMapper outsourceRequisitionMapper; |
|||
|
|||
/** |
|||
* 查询委外领料 |
|||
* |
|||
* @param outsourceRequisitionId 委外领料主键 |
|||
* @return 委外领料 |
|||
*/ |
|||
@Override |
|||
public OutsourceRequisition selectOutsourceRequisitionByOutsourceRequisitionId(Long outsourceRequisitionId) |
|||
{ |
|||
return outsourceRequisitionMapper.selectOutsourceRequisitionByOutsourceRequisitionId(outsourceRequisitionId); |
|||
} |
|||
|
|||
/** |
|||
* 查询委外领料列表 |
|||
* |
|||
* @param outsourceRequisition 委外领料 |
|||
* @return 委外领料 |
|||
*/ |
|||
@Override |
|||
public List<OutsourceRequisition> selectOutsourceRequisitionList(OutsourceRequisition outsourceRequisition) |
|||
{ |
|||
return outsourceRequisitionMapper.selectOutsourceRequisitionList(outsourceRequisition); |
|||
} |
|||
|
|||
/** |
|||
* 新增委外领料 |
|||
* |
|||
* @param outsourceRequisition 委外领料 |
|||
* @return 结果 |
|||
*/ |
|||
@Transactional |
|||
@Override |
|||
public int insertOutsourceRequisition(OutsourceRequisition outsourceRequisition) |
|||
{ |
|||
outsourceRequisition.setCreateTime(DateUtils.getNowDate()); |
|||
outsourceRequisition.setAuditStatus("0"); |
|||
outsourceRequisition.setRequisitionStatus("0"); |
|||
outsourceRequisition.setOutsourceRequisitionNo("WWLL20231103003"); |
|||
outsourceRequisition.setRequisitionPerson("张三"); |
|||
int rows = outsourceRequisitionMapper.insertOutsourceRequisition(outsourceRequisition); |
|||
insertOutsourceRequisitionDetail(outsourceRequisition); |
|||
return rows; |
|||
} |
|||
|
|||
/** |
|||
* 修改委外领料 |
|||
* |
|||
* @param outsourceRequisition 委外领料 |
|||
* @return 结果 |
|||
*/ |
|||
@Transactional |
|||
@Override |
|||
public int updateOutsourceRequisition(OutsourceRequisition outsourceRequisition) |
|||
{ |
|||
outsourceRequisition.setUpdateTime(DateUtils.getNowDate()); |
|||
outsourceRequisitionMapper.deleteOutsourceRequisitionDetailByOutsourceRequisitionNo(outsourceRequisition.getOutsourceRequisitionId()); |
|||
insertOutsourceRequisitionDetail(outsourceRequisition); |
|||
return outsourceRequisitionMapper.updateOutsourceRequisition(outsourceRequisition); |
|||
} |
|||
|
|||
/** |
|||
* 批量删除委外领料 |
|||
* |
|||
* @param outsourceRequisitionIds 需要删除的委外领料主键 |
|||
* @return 结果 |
|||
*/ |
|||
@Transactional |
|||
@Override |
|||
public int deleteOutsourceRequisitionByOutsourceRequisitionIds(String outsourceRequisitionIds) |
|||
{ |
|||
outsourceRequisitionMapper.deleteOutsourceRequisitionDetailByOutsourceRequisitionNos(Convert.toStrArray(outsourceRequisitionIds)); |
|||
return outsourceRequisitionMapper.deleteOutsourceRequisitionByOutsourceRequisitionIds(Convert.toStrArray(outsourceRequisitionIds)); |
|||
} |
|||
|
|||
/** |
|||
* 删除委外领料信息 |
|||
* |
|||
* @param outsourceRequisitionId 委外领料主键 |
|||
* @return 结果 |
|||
*/ |
|||
@Transactional |
|||
@Override |
|||
public int deleteOutsourceRequisitionByOutsourceRequisitionId(Long outsourceRequisitionId) |
|||
{ |
|||
outsourceRequisitionMapper.deleteOutsourceRequisitionDetailByOutsourceRequisitionNo(outsourceRequisitionId); |
|||
return outsourceRequisitionMapper.deleteOutsourceRequisitionByOutsourceRequisitionId(outsourceRequisitionId); |
|||
} |
|||
|
|||
/** |
|||
* 新增委外领料详情信息 |
|||
* |
|||
* @param outsourceRequisition 委外领料对象 |
|||
*/ |
|||
public void insertOutsourceRequisitionDetail(OutsourceRequisition outsourceRequisition) |
|||
{ |
|||
List<OutsourceRequisitionDetail> outsourceRequisitionDetailList = outsourceRequisition.getOutsourceRequisitionDetailList(); |
|||
String outsourceRequisitionNo = outsourceRequisition.getOutsourceRequisitionNo(); |
|||
if (StringUtils.isNotNull(outsourceRequisitionDetailList)) |
|||
{ |
|||
List<OutsourceRequisitionDetail> list = new ArrayList<OutsourceRequisitionDetail>(); |
|||
for (OutsourceRequisitionDetail outsourceRequisitionDetail : outsourceRequisitionDetailList) |
|||
{ |
|||
outsourceRequisitionDetail.setOutsourceRequisitionNo(outsourceRequisitionNo); |
|||
list.add(outsourceRequisitionDetail); |
|||
} |
|||
if (list.size() > 0) |
|||
{ |
|||
outsourceRequisitionMapper.batchOutsourceRequisitionDetail(list); |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,137 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper |
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ruoyi.system.mapper.OutsourceRequisitionMapper"> |
|||
|
|||
<resultMap type="OutsourceRequisition" id="OutsourceRequisitionResult"> |
|||
<result property="outsourceRequisitionId" column="outsource_requisition_id" /> |
|||
<result property="outsourceRequisitionNo" column="outsource_requisition_no" /> |
|||
<result property="outsourceOrderNo" column="outsource_order_no" /> |
|||
<result property="requisitionPerson" column="requisition_person" /> |
|||
<result property="createBy" column="create_by" /> |
|||
<result property="createTime" column="create_time" /> |
|||
<result property="updateBy" column="update_by" /> |
|||
<result property="updateTime" column="update_time" /> |
|||
<result property="materialAmount" column="material_amount" /> |
|||
<result property="totalAmount" column="total_amount" /> |
|||
<result property="auditStatus" column="audit_status" /> |
|||
<result property="requisitionStatus" column="requisition_status" /> |
|||
</resultMap> |
|||
|
|||
<resultMap id="OutsourceRequisitionOutsourceRequisitionDetailResult" type="OutsourceRequisition" extends="OutsourceRequisitionResult"> |
|||
<collection property="outsourceRequisitionDetailList" ofType="OutsourceRequisitionDetail" column="outsource_requisition_id" select="selectOutsourceRequisitionDetailList" /> |
|||
</resultMap> |
|||
|
|||
<resultMap type="OutsourceRequisitionDetail" id="OutsourceRequisitionDetailResult"> |
|||
<result property="outsourceRequisitionDetailId" column="outsource_requisition_detail_id" /> |
|||
<result property="outsourceRequisitionNo" column="outsource_requisition_no" /> |
|||
<result property="materialNo" column="material_no" /> |
|||
<result property="takenMaterial" column="taken_material" /> |
|||
<result property="takingMaterial" column="taking_material" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectOutsourceRequisitionVo"> |
|||
select outsource_requisition_id, outsource_requisition_no, outsource_order_no, requisition_person, create_by, create_time, update_by, update_time, material_amount, total_amount, audit_status,requisition_status from outsource_requisition |
|||
</sql> |
|||
|
|||
<select id="selectOutsourceRequisitionList" parameterType="OutsourceRequisition" resultMap="OutsourceRequisitionResult"> |
|||
<include refid="selectOutsourceRequisitionVo"/> |
|||
<where> |
|||
<if test="outsourceRequisitionNo != null and outsourceRequisitionNo != ''"> and outsource_requisition_no = #{outsourceRequisitionNo}</if> |
|||
<if test="outsourceOrderNo != null and outsourceOrderNo != ''"> and outsource_order_no = #{outsourceOrderNo}</if> |
|||
<if test="requisitionPerson != null and requisitionPerson != ''"> and requisition_person = #{requisitionPerson}</if> |
|||
<if test="createTime != null "> and create_time = #{createTime}</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectOutsourceRequisitionByOutsourceRequisitionId" parameterType="Long" resultMap="OutsourceRequisitionOutsourceRequisitionDetailResult"> |
|||
select outsource_requisition_id, outsource_requisition_no, outsource_order_no, requisition_person, create_by, create_time, update_by, update_time, material_amount, total_amount, audit_status,requisition_status |
|||
from outsource_requisition |
|||
where outsource_requisition_id = #{outsourceRequisitionId} |
|||
</select> |
|||
|
|||
<select id="selectOutsourceRequisitionDetailList" resultType="OutsourceRequisitionDetail" resultMap="OutsourceRequisitionDetailResult"> |
|||
select outsource_requisition_detail_id, outsource_requisition_no, material_no, taken_material, taking_material |
|||
from outsource_requisition_detail |
|||
where outsource_requisition_no = #{outsource_requisition_no} |
|||
</select> |
|||
|
|||
<insert id="insertOutsourceRequisition" parameterType="OutsourceRequisition" useGeneratedKeys="true" keyProperty="outsourceRequisitionId"> |
|||
insert into outsource_requisition |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="outsourceRequisitionNo != null and outsourceRequisitionNo != ''">outsource_requisition_no,</if> |
|||
<if test="outsourceOrderNo != null and outsourceOrderNo != ''">outsource_order_no,</if> |
|||
<if test="requisitionPerson != null">requisition_person,</if> |
|||
<if test="createBy != null">create_by,</if> |
|||
<if test="createTime != null">create_time,</if> |
|||
<if test="updateBy != null">update_by,</if> |
|||
<if test="updateTime != null">update_time,</if> |
|||
<if test="materialAmount != null">material_amount,</if> |
|||
<if test="totalAmount != null">total_amount,</if> |
|||
<if test="auditStatus != null">audit_status,</if> |
|||
<if test="requisitionStatus != null">requisition_status,</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="outsourceRequisitionNo != null and outsourceRequisitionNo != ''">#{outsourceRequisitionNo},</if> |
|||
<if test="outsourceOrderNo != null and outsourceOrderNo != ''">#{outsourceOrderNo},</if> |
|||
<if test="requisitionPerson != null">#{requisitionPerson},</if> |
|||
<if test="createBy != null">#{createBy},</if> |
|||
<if test="createTime != null">#{createTime},</if> |
|||
<if test="updateBy != null">#{updateBy},</if> |
|||
<if test="updateTime != null">#{updateTime},</if> |
|||
<if test="materialAmount != null">#{materialAmount},</if> |
|||
<if test="totalAmount != null">#{totalAmount},</if> |
|||
<if test="auditStatus != null">#{auditStatus},</if> |
|||
<if test="requisitionStatus != null">#{requisitionStatus},</if> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateOutsourceRequisition" parameterType="OutsourceRequisition"> |
|||
update outsource_requisition |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="outsourceRequisitionNo != null and outsourceRequisitionNo != ''">outsource_requisition_no = #{outsourceRequisitionNo},</if> |
|||
<if test="outsourceOrderNo != null and outsourceOrderNo != ''">outsource_order_no = #{outsourceOrderNo},</if> |
|||
<if test="requisitionPerson != null">requisition_person = #{requisitionPerson},</if> |
|||
<if test="createBy != null">create_by = #{createBy},</if> |
|||
<if test="createTime != null">create_time = #{createTime},</if> |
|||
<if test="updateBy != null">update_by = #{updateBy},</if> |
|||
<if test="updateTime != null">update_time = #{updateTime},</if> |
|||
<if test="materialAmount != null">material_amount = #{materialAmount},</if> |
|||
<if test="totalAmount != null">total_amount = #{totalAmount},</if> |
|||
<if test="auditStatus != null">audit_status = #{auditStatus},</if> |
|||
<if test="requisitionStatus != null">requsition_status = #{requisitionStatus},</if> |
|||
</trim> |
|||
where outsource_requisition_id = #{outsourceRequisitionId} |
|||
</update> |
|||
|
|||
<delete id="deleteOutsourceRequisitionByOutsourceRequisitionId" parameterType="Long"> |
|||
delete from outsource_requisition where outsource_requisition_id = #{outsourceRequisitionId} |
|||
</delete> |
|||
|
|||
<delete id="deleteOutsourceRequisitionByOutsourceRequisitionIds" parameterType="String"> |
|||
delete from outsource_requisition where outsource_requisition_id in |
|||
<foreach item="outsourceRequisitionId" collection="array" open="(" separator="," close=")"> |
|||
#{outsourceRequisitionId} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<delete id="deleteOutsourceRequisitionDetailByOutsourceRequisitionNos" parameterType="String"> |
|||
delete from outsource_requisition_detail where outsource_requisition_no in |
|||
<foreach item="outsourceRequisitionNo" collection="array" open="(" separator="," close=")"> |
|||
#{outsourceRequisitionNo} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<delete id="deleteOutsourceRequisitionDetailByOutsourceRequisitionNo" parameterType="Long"> |
|||
delete from outsource_requisition_detail where outsource_requisition_no = #{outsourceRequisitionNo} |
|||
</delete> |
|||
|
|||
<insert id="batchOutsourceRequisitionDetail"> |
|||
insert into outsource_requisition_detail( outsource_requisition_detail_id, outsource_requisition_no, material_no, taken_material, taking_material) values |
|||
<foreach item="item" index="index" collection="list" separator=","> |
|||
( #{item.outsourceRequisitionDetailId}, #{item.outsourceRequisitionNo}, #{item.materialNo}, #{item.takenMaterial}, #{item.takingMaterial}) |
|||
</foreach> |
|||
</insert> |
|||
|
|||
</mapper> |
@ -0,0 +1,146 @@ |
|||
<!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-outsource_requisition-add"> |
|||
<h4 class="form-header h4">委外领料信息</h4> |
|||
<div class="col-xs-12"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">委外领料编号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="outsourceRequisitionNo" class="form-control" type="text" required> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-xs-12"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">委外订单编号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="outsourceOrderNo" class="form-control" type="text" required> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-xs-12"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">领料员:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="requisitionPerson" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-xs-12"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">物料合计:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="materialAmount" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-xs-12"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">数量总计:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="totalAmount" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<h4 class="form-header h4">委外领料详情信息</h4> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<button type="button" class="btn btn-white btn-sm" onclick="addRow()"><i class="fa fa-plus"> 增加</i></button> |
|||
<button type="button" class="btn btn-white btn-sm" onclick="sub.delRow()"><i class="fa fa-minus"> 删除</i></button> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-table"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "system/outsource_requisition" |
|||
$("#form-outsource_requisition-add").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/add", $('#form-outsource_requisition-add').serialize()); |
|||
} |
|||
} |
|||
|
|||
$(function() { |
|||
var options = { |
|||
pagination: false, |
|||
showSearch: false, |
|||
showRefresh: false, |
|||
showToggle: false, |
|||
showColumns: false, |
|||
sidePagination: "client", |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
field: 'index', |
|||
align: 'center', |
|||
title: "序号", |
|||
formatter: function (value, row, index) { |
|||
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index)); |
|||
return columnIndex + $.table.serialNumber(index); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'materialNo', |
|||
align: 'center', |
|||
title: '料号', |
|||
formatter: function(value, row, index) { |
|||
var html = $.common.sprintf("<input class='form-control' type='text' name='outsourceRequisitionDetailList[%s].materialNo' value='%s'>", index, value); |
|||
return html; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'takenMaterial', |
|||
align: 'center', |
|||
title: '已委外领料数', |
|||
formatter: function(value, row, index) { |
|||
var html = $.common.sprintf("<input class='form-control' type='text' name='outsourceRequisitionDetailList[%s].takenMaterial' value='%s'>", index, value); |
|||
return html; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'takingMaterial', |
|||
align: 'center', |
|||
title: '本次委外领料数', |
|||
formatter: function(value, row, index) { |
|||
var html = $.common.sprintf("<input class='form-control' type='text' name='outsourceRequisitionDetailList[%s].takingMaterial' value='%s'>", index, value); |
|||
return html; |
|||
} |
|||
}, |
|||
{ |
|||
title: '操作', |
|||
align: 'center', |
|||
formatter: function(value, row, index) { |
|||
var value = $.common.isNotEmpty(row.index) ? row.index : $.table.serialNumber(index); |
|||
return '<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="sub.delRowByIndex(\'' + value + '\')"><i class="fa fa-remove"></i>删除</a>'; |
|||
} |
|||
}] |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
|
|||
function addRow() { |
|||
var count = $("#" + table.options.id).bootstrapTable('getData').length; |
|||
var row = { |
|||
index: $.table.serialNumber(count), |
|||
materialNo: "", |
|||
takenMaterial: "", |
|||
takingMaterial: "", |
|||
} |
|||
sub.addRow(row); |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,151 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('修改委外领料')" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-outsource_requisition-edit" th:object="${outsourceRequisition}"> |
|||
<h4 class="form-header h4">委外领料信息</h4> |
|||
<input name="outsourceRequisitionId" th:field="*{outsourceRequisitionId}" type="hidden"> |
|||
<div class="col-xs-12"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">委外领料编号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="outsourceRequisitionNo" th:field="*{outsourceRequisitionNo}" class="form-control" type="text" required> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-xs-12"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">委外订单编号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="outsourceOrderNo" th:field="*{outsourceOrderNo}" class="form-control" type="text" required> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-xs-12"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">领料员:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="requisitionPerson" th:field="*{requisitionPerson}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-xs-12"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">物料合计:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="materialAmount" th:field="*{materialAmount}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-xs-12"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">数量总计:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="totalAmount" th:field="*{totalAmount}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<h4 class="form-header h4">委外领料详情信息</h4> |
|||
<div class="row"> |
|||
<div class="col-sm-12"> |
|||
<button type="button" class="btn btn-white btn-sm" onclick="addRow()"><i class="fa fa-plus"> 增加</i></button> |
|||
<button type="button" class="btn btn-white btn-sm" onclick="sub.delRow()"><i class="fa fa-minus"> 删除</i></button> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-table"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "system/outsource_requisition"; |
|||
$("#form-outsource_requisition-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/edit", $('#form-outsource_requisition-edit').serialize()); |
|||
} |
|||
} |
|||
|
|||
$(function() { |
|||
var options = { |
|||
data: [[${outsourceRequisition.outsourceRequisitionDetailList}]], |
|||
pagination: false, |
|||
showSearch: false, |
|||
showRefresh: false, |
|||
showToggle: false, |
|||
showColumns: false, |
|||
sidePagination: "client", |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
field: 'index', |
|||
align: 'center', |
|||
title: "序号", |
|||
formatter: function (value, row, index) { |
|||
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index)); |
|||
return columnIndex + $.table.serialNumber(index); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'materialNo', |
|||
align: 'center', |
|||
title: '料号', |
|||
formatter: function(value, row, index) { |
|||
var html = $.common.sprintf("<input class='form-control' type='text' name='outsourceRequisitionDetailList[%s].materialNo' value='%s'>", index, value); |
|||
return html; |
|||
} |
|||
}, |
|||
|
|||
{ |
|||
field: 'takenMaterial', |
|||
align: 'center', |
|||
title: '已委外领料数', |
|||
formatter: function(value, row, index) { |
|||
var html = $.common.sprintf("<input class='form-control' type='text' name='outsourceRequisitionDetailList[%s].takenMaterial' value='%s'>", index, value); |
|||
return html; |
|||
} |
|||
}, |
|||
|
|||
{ |
|||
field: 'takingMaterial', |
|||
align: 'center', |
|||
title: '本次委外领料数', |
|||
formatter: function(value, row, index) { |
|||
var html = $.common.sprintf("<input class='form-control' type='text' name='outsourceRequisitionDetailList[%s].takingMaterial' value='%s'>", index, value); |
|||
return html; |
|||
} |
|||
}, |
|||
|
|||
{ |
|||
title: '操作', |
|||
align: 'center', |
|||
formatter: function(value, row, index) { |
|||
var value = $.common.isNotEmpty(row.index) ? row.index : $.table.serialNumber(index); |
|||
return '<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="sub.delRowByIndex(\'' + value + '\')"><i class="fa fa-remove"></i>删除</a>'; |
|||
} |
|||
}] |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
|
|||
function addRow() { |
|||
var count = $("#" + table.options.id).bootstrapTable('getData').length; |
|||
var row = { |
|||
index: $.table.serialNumber(count), |
|||
materialNo: "", |
|||
takenMaterial: "", |
|||
takingMaterial: "", |
|||
} |
|||
sub.addRow(row); |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,134 @@ |
|||
<!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="outsourceRequisitionNo"/> |
|||
</li> |
|||
<li> |
|||
<label>委外订单编号:</label> |
|||
<input type="text" name="outsourceOrderNo"/> |
|||
</li> |
|||
<li> |
|||
<label>领料员:</label> |
|||
<input type="text" name="requisitionPerson"/> |
|||
</li> |
|||
<li> |
|||
<label>录入时间:</label> |
|||
<input type="text" class="time-input" placeholder="请选择录入时间" name="createTime"/> |
|||
</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-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:outsource_requisition: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('system:outsource_requisition:edit')}]]; |
|||
var removeFlag = [[${@permission.hasPermi('system:outsource_requisition:remove')}]]; |
|||
var prefix = ctx + "system/outsource_requisition"; |
|||
var auditStatusDatas = [[${@dict.getType('audit_status')}]]; |
|||
var requisitionStatusDatas = [[${@dict.getType('requisition_status')}]]; |
|||
|
|||
|
|||
$(function() { |
|||
var options = { |
|||
url: prefix + "/list", |
|||
createUrl: prefix + "/add", |
|||
updateUrl: prefix + "/edit/{id}", |
|||
removeUrl: prefix + "/remove", |
|||
exportUrl: prefix + "/export", |
|||
modalName: "委外领料", |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
field: 'auditStatus', |
|||
title: '审核状态', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(auditStatusDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'requisitionStatus', |
|||
title: '领料状态', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(requisitionStatusDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'outsourceRequisitionId', |
|||
title: '委外领料id', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'outsourceRequisitionNo', |
|||
title: '委外领料单号' |
|||
}, |
|||
{ |
|||
field: 'outsourceOrderNo', |
|||
title: '委外单号' |
|||
}, |
|||
{ |
|||
field: 'requisitionPerson', |
|||
title: '领料员' |
|||
}, |
|||
{ |
|||
field: 'materialAmount', |
|||
title: '物料合计' |
|||
}, |
|||
{ |
|||
field: 'totalAmount', |
|||
title: '数量总计' |
|||
}, |
|||
{ |
|||
field: 'createTime', |
|||
title: '录入时间' |
|||
}, |
|||
{ |
|||
field: 'updateBy', |
|||
title: '更新人' |
|||
}, |
|||
{ |
|||
field: 'updateTime', |
|||
title: '上次更新时间' |
|||
}, |
|||
{ |
|||
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.outsourceRequisitionId + '\')"><i class="fa fa-edit"></i>编辑</a> '); |
|||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.outsourceRequisitionId + '\')"><i class="fa fa-detail"></i>详情</a>'); |
|||
return actions.join(''); |
|||
} |
|||
}] |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue