Browse Source

[add] 添加开发修改单页面,添加产品型号管理,添加开发修改单领料列表,添加生产订单

gsw
zhangsiqi 11 months ago
parent
commit
6cb151780f
  1. 50
      ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpBomController.java
  2. 3
      ruoyi-admin/src/main/java/com/ruoyi/erp/mapper/ErpBomMapper.java
  3. 3
      ruoyi-admin/src/main/java/com/ruoyi/erp/mapper/ErpMaterialMapper.java
  4. 4
      ruoyi-admin/src/main/java/com/ruoyi/erp/service/IErpBomService.java
  5. 2
      ruoyi-admin/src/main/java/com/ruoyi/erp/service/IErpMaterialService.java
  6. 22
      ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpBomServiceImpl.java
  7. 4
      ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpMaterialServiceImpl.java
  8. 148
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeOrderController.java
  9. 148
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysPickingController.java
  10. 148
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysProductModelController.java
  11. 279
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMakeOrder.java
  12. 153
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysPicking.java
  13. 139
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysProductModel.java
  14. 78
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysMakeOrderMapper.java
  15. 78
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysPickingMapper.java
  16. 78
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysProductModelMapper.java
  17. 76
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysMakeOrderService.java
  18. 76
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysPickingService.java
  19. 76
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysProductModelService.java
  20. 127
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMakeOrderServiceImpl.java
  21. 127
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysPickingServiceImpl.java
  22. 125
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysProductModelServiceImpl.java
  23. 12
      ruoyi-admin/src/main/resources/mapper/erp/ErpBomMapper.xml
  24. 10
      ruoyi-admin/src/main/resources/mapper/erp/ErpMaterialMapper.xml
  25. 159
      ruoyi-admin/src/main/resources/mapper/system/SysMakeOrderMapper.xml
  26. 120
      ruoyi-admin/src/main/resources/mapper/system/SysPickingMapper.xml
  27. 114
      ruoyi-admin/src/main/resources/mapper/system/SysProductModelMapper.xml
  28. 2
      ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/fixed-columns/css/bootstrap-table-fixed-columns.css
  29. 377
      ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/fixed-columns/js/bootstrap-table-fixed-columns.js
  30. 6
      ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
  31. 55
      ruoyi-admin/src/main/resources/templates/erp/bom/add.html
  32. 363
      ruoyi-admin/src/main/resources/templates/erp/bom/bom.html
  33. 32
      ruoyi-admin/src/main/resources/templates/erp/bom/edit.html
  34. 143
      ruoyi-admin/src/main/resources/templates/erp/bom/equals.html
  35. 13
      ruoyi-admin/src/main/resources/templates/include.html
  36. 52
      ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html
  37. 7
      ruoyi-admin/src/main/resources/templates/system/developReviseOrder/add.html
  38. 141
      ruoyi-admin/src/main/resources/templates/system/makeorder/add.html
  39. 136
      ruoyi-admin/src/main/resources/templates/system/makeorder/edit.html
  40. 229
      ruoyi-admin/src/main/resources/templates/system/makeorder/makeorder.html
  41. 73
      ruoyi-admin/src/main/resources/templates/system/model/add.html
  42. 74
      ruoyi-admin/src/main/resources/templates/system/model/edit.html
  43. 161
      ruoyi-admin/src/main/resources/templates/system/model/model.html
  44. 79
      ruoyi-admin/src/main/resources/templates/system/picking/add.html
  45. 68
      ruoyi-admin/src/main/resources/templates/system/picking/edit.html
  46. 161
      ruoyi-admin/src/main/resources/templates/system/picking/picking.html

50
ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpBomController.java

@ -14,6 +14,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
/**
@ -169,4 +170,53 @@ public class ErpBomController extends BaseController
return "审核成功";
}
}
@RequiresPermissions("erp:bom:equals")
@GetMapping( "/equals")
public String bomEqulas()
{
return prefix + "/equals";
}
@RequiresPermissions("erp:bom:equals")
@GetMapping("/euqalsBom")
public ModelMap equalsBom(@RequestBody String bomNo1,String bomNo2){
ModelMap map = new ModelMap();
System.out.println("bomNo1:" + bomNo1+ " bomNo2:" +bomNo2);
//获取要比对的两个bom 获取下面的1物料信息
ErpBom erpBom = erpBomService.selectBomByBomNo(bomNo1);
ErpBom erpbom1 = erpBomService.selectBomByBomNo(bomNo2);
List<ErpBom> list = erpBomService.selectErpBomSubList(erpBom);
List<ErpBom> list1 = erpBomService.selectErpBomSubList(erpbom1);
//相同的信息
List tongList = new ArrayList<>();
//不同的信息
List bom1list = new ArrayList<>();
List bom2list = new ArrayList<>();
for (ErpBom erpBom3:list){
for (ErpBom erpBom4:list1){
String bom1 = erpBom3.getMaterialNo()+"-"+erpBom3.getMaterialName()+"-"+erpBom3.getUseNum();
String bom2 = erpBom4.getMaterialNo()+"-"+erpBom4.getMaterialName()+"-"+erpBom4.getUseNum();
if (bom1 == bom2){
boolean contains = tongList.stream().anyMatch(item-> item.equals(bom1));
if (!contains){
tongList.add(bom1);
}
}else{
boolean contains = bom1list.stream().anyMatch(item-> item.equals(bom1));
if (!contains){
bom1list.add(bom1);
}
boolean contains1 = bom2list.stream().anyMatch(item-> item.equals(bom2));
if (!contains1){
bom2list.add(bom1);
}
}
}
}
map.put("tongList",tongList);
map.put("bom1list",bom1list);
map.put("bom2list",bom2list);
return map;
}
}

3
ruoyi-admin/src/main/java/com/ruoyi/erp/mapper/ErpBomMapper.java

@ -118,4 +118,7 @@ public interface ErpBomMapper
* @return
*/
public List<ErpBom> selectErpBomByIds(String[] ids);
public ErpBom selectBomByBomNo(String bomNo);
}

3
ruoyi-admin/src/main/java/com/ruoyi/erp/mapper/ErpMaterialMapper.java

@ -1,7 +1,6 @@
package com.ruoyi.erp.mapper;
import com.ruoyi.erp.domain.ErpMaterial;
import io.lettuce.core.dynamic.annotation.Param;
import java.util.List;
@ -90,5 +89,5 @@ public interface ErpMaterialMapper
/**
* 修改物料的关联bom
*/
public int updateMaterialBomNo(@Param("bomNo") String bomNo, @Param("materialNo") String materialNo);
public int updateMaterialBomNo(ErpMaterial erpMaterial);
}

4
ruoyi-admin/src/main/java/com/ruoyi/erp/service/IErpBomService.java

@ -92,4 +92,8 @@ public interface IErpBomService
* @return
*/
public List<ErpBom> selectErpBomByIds(String ids);
/**
* bom对象查询以bomNo作为条件
*/
public ErpBom selectBomByBomNo(String bomNo);
}

2
ruoyi-admin/src/main/java/com/ruoyi/erp/service/IErpMaterialService.java

@ -88,5 +88,5 @@ public interface IErpMaterialService
/**
* 修改物料的关联bom
*/
public int updateMaterialBomNo( String bomNo, String materialNo);
public int updateMaterialBomNo( ErpMaterial erpMaterial);
}

22
ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpBomServiceImpl.java

@ -6,6 +6,7 @@ import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.erp.domain.ErpBom;
import com.ruoyi.erp.domain.ErpMaterial;
import com.ruoyi.erp.mapper.ErpBomMapper;
import com.ruoyi.erp.service.IErpBomService;
import com.ruoyi.erp.service.IErpMaterialService;
@ -81,8 +82,11 @@ public class ErpBomServiceImpl implements IErpBomService
erpBom.setBomNo(billNo);
int rows = erpBomMapper.insertErpBom(erpBom);
insertErpBomSub(erpBom);
ErpMaterial erpMaterial = new ErpMaterial();
erpMaterial.setMaterialNo(erpBom.getMaterialNo());
erpMaterial.setBomNo(erpBom.getBomNo());
//添加物料关联的bom信息
iErpMaterialService.updateMaterialBomNo(erpBom.getBomNo(),erpBom.getMaterialNo());
iErpMaterialService.updateMaterialBomNo(erpMaterial);
return rows;
}
@ -130,6 +134,17 @@ public class ErpBomServiceImpl implements IErpBomService
public int deleteErpBomByIds(String ids)
{
erpBomMapper.deleteErpBomByParentIds(Convert.toStrArray(ids));
List<ErpBom> erpBomList = erpBomMapper.selectErpBomByIds(Convert.toStrArray(ids));
for (ErpBom erpBom:erpBomList){
//清除物料关联的bom信息
ErpMaterial erpMaterial = new ErpMaterial();
erpMaterial.setMaterialNo(erpBom.getMaterialNo());
erpMaterial.setBomNo(erpBom.getBomNo());
iErpMaterialService.updateMaterialBomNo(erpMaterial);
}
return erpBomMapper.deleteErpBomByIds(Convert.toStrArray(ids));
}
@ -190,6 +205,11 @@ public class ErpBomServiceImpl implements IErpBomService
return erpBomMapper.selectErpBomByIds(Convert.toStrArray(ids));
}
@Override
public ErpBom selectBomByBomNo(String bomNo) {
return erpBomMapper.selectBomByBomNo(bomNo);
}
/**
* 新增bom信息
*

4
ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpMaterialServiceImpl.java

@ -187,7 +187,7 @@ public class ErpMaterialServiceImpl implements IErpMaterialService
}
@Override
public int updateMaterialBomNo(String bomNo, String materialNo) {
return erpMaterialMapper.updateMaterialBomNo(bomNo,materialNo);
public int updateMaterialBomNo(ErpMaterial erpMaterial) {
return erpMaterialMapper.updateMaterialBomNo(erpMaterial);
}
}

148
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeOrderController.java

@ -0,0 +1,148 @@
package com.ruoyi.system.controller;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.SysMakeOrder;
import com.ruoyi.system.service.ISysMakeOrderService;
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.List;
/**
* 生产订单Controller
*
* @author zhang
* @date 2023-12-18
*/
@Controller
@RequestMapping("/system/makeorder")
public class SysMakeOrderController extends BaseController
{
private String prefix = "system/makeorder";
@Autowired
private ISysMakeOrderService sysMakeOrderService;
@RequiresPermissions("system:makeorder:view")
@GetMapping()
public String makeorder()
{
return prefix + "/makeorder";
}
/**
* 查询生产订单列表
*/
@RequiresPermissions("system:makeorder:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(SysMakeOrder sysMakeOrder)
{
startPage();
List<SysMakeOrder> list = sysMakeOrderService.selectSysMakeOrderList(sysMakeOrder);
return getDataTable(list);
}
/**
* 导出生产订单列表
*/
@RequiresPermissions("system:makeorder:export")
@Log(title = "生产订单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysMakeOrder sysMakeOrder)
{
List<SysMakeOrder> list = sysMakeOrderService.selectSysMakeOrderList(sysMakeOrder);
ExcelUtil<SysMakeOrder> util = new ExcelUtil<SysMakeOrder>(SysMakeOrder.class);
return util.exportExcel(list, "生产订单数据");
}
/**
* 新增生产订单
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存生产订单
*/
@RequiresPermissions("system:makeorder:add")
@Log(title = "生产订单", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(SysMakeOrder sysMakeOrder)
{
return toAjax(sysMakeOrderService.insertSysMakeOrder(sysMakeOrder));
}
/**
* 修改生产订单
*/
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Long id, ModelMap mmap)
{
SysMakeOrder sysMakeOrder = sysMakeOrderService.selectSysMakeOrderById(id);
mmap.put("sysMakeOrder", sysMakeOrder);
return prefix + "/edit";
}
/**
* 修改保存生产订单
*/
@RequiresPermissions("system:makeorder:edit")
@Log(title = "生产订单", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysMakeOrder sysMakeOrder)
{
return toAjax(sysMakeOrderService.updateSysMakeOrder(sysMakeOrder));
}
/**
* 删除生产订单
*/
@RequiresPermissions("system:makeorder:remove")
@Log(title = "生产订单", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(sysMakeOrderService.deleteSysMakeOrderByIds(ids));
}
/**
* 作废生产订单
*/
@RequiresPermissions("system:makeorder:cancel")
@Log(title = "生产订单", businessType = BusinessType.CANCEL)
@GetMapping( "/cancel/{id}")
@ResponseBody
public AjaxResult cancel(@PathVariable("id") Long id){
return toAjax(sysMakeOrderService.cancelSysMakeOrderById(id));
}
/**
* 恢复生产订单
*/
@RequiresPermissions("system:makeorder:restore")
@Log(title = "生产订单", businessType = BusinessType.RESTORE)
@GetMapping( "/restore/{id}")
@ResponseBody
public AjaxResult restore(@PathVariable("id")Long id)
{
return toAjax(sysMakeOrderService.restoreSysMakeOrderById(id));
}
}

148
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysPickingController.java

@ -0,0 +1,148 @@
package com.ruoyi.system.controller;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.SysPicking;
import com.ruoyi.system.service.ISysPickingService;
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.List;
/**
* 开发修改单领料列表Controller
*
* @author ruoyi
* @date 2023-12-15
*/
@Controller
@RequestMapping("/system/picking")
public class SysPickingController extends BaseController
{
private String prefix = "system/picking";
@Autowired
private ISysPickingService sysPickingService;
@RequiresPermissions("system:picking:view")
@GetMapping()
public String picking()
{
return prefix + "/picking";
}
/**
* 查询开发修改单领料列表列表
*/
@RequiresPermissions("system:picking:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(SysPicking sysPicking)
{
startPage();
List<SysPicking> list = sysPickingService.selectSysPickingList(sysPicking);
return getDataTable(list);
}
/**
* 导出开发修改单领料列表列表
*/
@RequiresPermissions("system:picking:export")
@Log(title = "开发修改单领料列表", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysPicking sysPicking)
{
List<SysPicking> list = sysPickingService.selectSysPickingList(sysPicking);
ExcelUtil<SysPicking> util = new ExcelUtil<SysPicking>(SysPicking.class);
return util.exportExcel(list, "开发修改单领料列表数据");
}
/**
* 新增开发修改单领料列表
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存开发修改单领料列表
*/
@RequiresPermissions("system:picking:add")
@Log(title = "开发修改单领料列表", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(SysPicking sysPicking)
{
return toAjax(sysPickingService.insertSysPicking(sysPicking));
}
/**
* 修改开发修改单领料列表
*/
@GetMapping("/edit/{pickId}")
public String edit(@PathVariable("pickId") Long pickId, ModelMap mmap)
{
SysPicking sysPicking = sysPickingService.selectSysPickingById(pickId);
mmap.put("sysPicking", sysPicking);
return prefix + "/edit";
}
/**
* 修改保存开发修改单领料列表
*/
@RequiresPermissions("system:picking:edit")
@Log(title = "开发修改单领料列表", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysPicking sysPicking)
{
return toAjax(sysPickingService.updateSysPicking(sysPicking));
}
/**
* 删除开发修改单领料列表
*/
@RequiresPermissions("system:picking:remove")
@Log(title = "开发修改单领料列表", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(sysPickingService.deleteSysPickingByIds(ids));
}
/**
* 作废开发修改单领料列表
*/
@RequiresPermissions("system:picking:cancel")
@Log(title = "开发修改单领料列表", businessType = BusinessType.CANCEL)
@GetMapping( "/cancel/{id}")
@ResponseBody
public AjaxResult cancel(@PathVariable("id") Long id){
return toAjax(sysPickingService.cancelSysPickingById(id));
}
/**
* 恢复开发修改单领料列表
*/
@RequiresPermissions("system:picking:restore")
@Log(title = "开发修改单领料列表", businessType = BusinessType.RESTORE)
@GetMapping( "/restore/{id}")
@ResponseBody
public AjaxResult restore(@PathVariable("id")Long id)
{
return toAjax(sysPickingService.restoreSysPickingById(id));
}
}

148
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysProductModelController.java

@ -0,0 +1,148 @@
package com.ruoyi.system.controller;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.SysProductModel;
import com.ruoyi.system.service.ISysProductModelService;
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.List;
/**
* 产品型号管理Controller
*
* @author zhang
* @date 2023-12-15
*/
@Controller
@RequestMapping("/system/model")
public class SysProductModelController extends BaseController
{
private String prefix = "system/model";
@Autowired
private ISysProductModelService sysProductModelService;
@RequiresPermissions("system:model:view")
@GetMapping()
public String model()
{
return prefix + "/model";
}
/**
* 查询产品型号管理列表
*/
@RequiresPermissions("system:model:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(SysProductModel sysProductModel)
{
startPage();
List<SysProductModel> list = sysProductModelService.selectSysProductModelList(sysProductModel);
return getDataTable(list);
}
/**
* 导出产品型号管理列表
*/
@RequiresPermissions("system:model:export")
@Log(title = "产品型号管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysProductModel sysProductModel)
{
List<SysProductModel> list = sysProductModelService.selectSysProductModelList(sysProductModel);
ExcelUtil<SysProductModel> util = new ExcelUtil<SysProductModel>(SysProductModel.class);
return util.exportExcel(list, "产品型号管理数据");
}
/**
* 新增产品型号管理
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存产品型号管理
*/
@RequiresPermissions("system:model:add")
@Log(title = "产品型号管理", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(SysProductModel sysProductModel)
{
return toAjax(sysProductModelService.insertSysProductModel(sysProductModel));
}
/**
* 修改产品型号管理
*/
@GetMapping("/edit/{Pid}")
public String edit(@PathVariable("Pid") Long Pid, ModelMap mmap)
{
SysProductModel sysProductModel = sysProductModelService.selectSysProductModelById(Pid);
mmap.put("sysProductModel", sysProductModel);
return prefix + "/edit";
}
/**
* 修改保存产品型号管理
*/
@RequiresPermissions("system:model:edit")
@Log(title = "产品型号管理", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysProductModel sysProductModel)
{
return toAjax(sysProductModelService.updateSysProductModel(sysProductModel));
}
/**
* 删除产品型号管理
*/
@RequiresPermissions("system:model:remove")
@Log(title = "产品型号管理", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(sysProductModelService.deleteSysProductModelByIds(ids));
}
/**
* 作废产品型号管理
*/
@RequiresPermissions("system:model:cancel")
@Log(title = "产品型号管理", businessType = BusinessType.CANCEL)
@GetMapping( "/cancel/{id}")
@ResponseBody
public AjaxResult cancel(@PathVariable("id") Long id){
return toAjax(sysProductModelService.cancelSysProductModelById(id));
}
/**
* 恢复产品型号管理
*/
@RequiresPermissions("system:model:restore")
@Log(title = "产品型号管理", businessType = BusinessType.RESTORE)
@GetMapping( "/restore/{id}")
@ResponseBody
public AjaxResult restore(@PathVariable("id")Long id)
{
return toAjax(sysProductModelService.restoreSysProductModelById(id));
}
}

279
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMakeOrder.java

@ -0,0 +1,279 @@
package com.ruoyi.system.domain;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 生产订单对象 sys_makeorder
*
* @author zhang
* @date 2023-12-18
*/
public class SysMakeOrder extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 生产订单id */
private Long id;
/** 生产状态 */
@Excel(name = "生产状态")
private String makeStatus;
/** 入库状态 */
@Excel(name = "入库状态")
private String eceiptStatus;
/** 品质状态 */
@Excel(name = "品质状态")
private String qualityStatus;
/** 使用状态 */
@Excel(name = "使用状态")
private String useStatus;
/** 生产订单号 */
@Excel(name = "生产订单号")
private String makeNo;
/** 关联销售订单号 */
@Excel(name = "关联销售订单号")
private String saleNo;
/** 业务员 */
@Excel(name = "业务员")
private String Salesman;
/** 客户ID */
@Excel(name = "客户ID")
private String customerId;
/** 客户名称 */
@Excel(name = "客户名称")
private String customerName;
/** 客户订单号 */
@Excel(name = "客户订单号")
private String customerOderCode;
/** 物料合计 */
@Excel(name = "物料合计")
private String material;
/** 数量合计 */
@Excel(name = "数量合计")
private Long materialSum;
/** 已完成数量 */
@Excel(name = "已完成数量")
private Long finishNum;
/** 已入库数量 */
@Excel(name = "已入库数量")
private Long eceiptNum;
/** 不含税生产成本(RMB) */
@Excel(name = "不含税生产成本(RMB)")
private Long noRate;
/** 含税生产成本(RMB) */
@Excel(name = "含税生产成本(RMB)")
private Long rate;
/** 使用状态 */
private String delFlag;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setMakeStatus(String makeStatus)
{
this.makeStatus = makeStatus;
}
public String getMakeStatus()
{
return makeStatus;
}
public void setEceiptStatus(String eceiptStatus)
{
this.eceiptStatus = eceiptStatus;
}
public String getEceiptStatus()
{
return eceiptStatus;
}
public void setQualityStatus(String qualityStatus)
{
this.qualityStatus = qualityStatus;
}
public String getQualityStatus()
{
return qualityStatus;
}
public void setUseStatus(String useStatus)
{
this.useStatus = useStatus;
}
public String getUseStatus()
{
return useStatus;
}
public void setMakeNo(String makeNo)
{
this.makeNo = makeNo;
}
public String getMakeNo()
{
return makeNo;
}
public void setSaleNo(String saleNo)
{
this.saleNo = saleNo;
}
public String getSaleNo()
{
return saleNo;
}
public void setSalesman(String Salesman)
{
this.Salesman = Salesman;
}
public String getSalesman()
{
return Salesman;
}
public void setCustomerId(String customerId)
{
this.customerId = customerId;
}
public String getCustomerId()
{
return customerId;
}
public void setCustomerName(String customerName)
{
this.customerName = customerName;
}
public String getCustomerName()
{
return customerName;
}
public void setCustomerOderCode(String customerOderCode)
{
this.customerOderCode = customerOderCode;
}
public String getCustomerOderCode()
{
return customerOderCode;
}
public void setMaterial(String material)
{
this.material = material;
}
public String getMaterial()
{
return material;
}
public void setMaterialSum(Long materialSum)
{
this.materialSum = materialSum;
}
public Long getMaterialSum()
{
return materialSum;
}
public void setFinishNum(Long finishNum)
{
this.finishNum = finishNum;
}
public Long getFinishNum()
{
return finishNum;
}
public void setEceiptNum(Long eceiptNum)
{
this.eceiptNum = eceiptNum;
}
public Long getEceiptNum()
{
return eceiptNum;
}
public void setNoRate(Long noRate)
{
this.noRate = noRate;
}
public Long getNoRate()
{
return noRate;
}
public void setRate(Long rate)
{
this.rate = rate;
}
public Long getRate()
{
return rate;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public String getDelFlag()
{
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("makeStatus", getMakeStatus())
.append("eceiptStatus", getEceiptStatus())
.append("qualityStatus", getQualityStatus())
.append("useStatus", getUseStatus())
.append("makeNo", getMakeNo())
.append("saleNo", getSaleNo())
.append("Salesman", getSalesman())
.append("customerId", getCustomerId())
.append("customerName", getCustomerName())
.append("customerOderCode", getCustomerOderCode())
.append("material", getMaterial())
.append("materialSum", getMaterialSum())
.append("finishNum", getFinishNum())
.append("eceiptNum", getEceiptNum())
.append("noRate", getNoRate())
.append("rate", getRate())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("delFlag", getDelFlag())
.toString();
}
}

153
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysPicking.java

@ -0,0 +1,153 @@
package com.ruoyi.system.domain;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 开发修改单领料列表对象 sys_picking
*
* @author ruoyi
* @date 2023-12-15
*/
public class SysPicking extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 领料单id */
private Long pickId;
/** 领料单号 */
@Excel(name = "领料单号")
private String pickNo;
/** 领料状态 */
@Excel(name = "领料状态")
private String pickStaus;
/** 关联销售单号 */
@Excel(name = "关联销售单号")
private String saleNo;
/** 类型 */
@Excel(name = "类型")
private String types;
/** 物料合计 */
@Excel(name = "物料合计")
private String materialM;
/** 合计量 */
@Excel(name = "合计量")
private String materialSum;
/** 操作 */
@Excel(name = "操作")
private String opers;
/** */
private String pickBy;
public void setPickId(Long pickId)
{
this.pickId = pickId;
}
public Long getPickId()
{
return pickId;
}
public void setPickNo(String pickNo)
{
this.pickNo = pickNo;
}
public String getPickNo()
{
return pickNo;
}
public void setPickStaus(String pickStaus)
{
this.pickStaus = pickStaus;
}
public String getPickStaus()
{
return pickStaus;
}
public void setSaleNo(String saleNo)
{
this.saleNo = saleNo;
}
public String getSaleNo()
{
return saleNo;
}
public void setTypes(String types)
{
this.types = types;
}
public String getTypes()
{
return types;
}
public void setMaterialM(String materialM)
{
this.materialM = materialM;
}
public String getMaterialM()
{
return materialM;
}
public void setMaterialSum(String materialSum)
{
this.materialSum = materialSum;
}
public String getMaterialSum()
{
return materialSum;
}
public void setOpers(String opers)
{
this.opers = opers;
}
public String getOpers()
{
return opers;
}
public void setPickBy(String pickBy)
{
this.pickBy = pickBy;
}
public String getPickBy()
{
return pickBy;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("pickId", getPickId())
.append("pickNo", getPickNo())
.append("pickStaus", getPickStaus())
.append("createBy", getCreateBy())
.append("saleNo", getSaleNo())
.append("types", getTypes())
.append("materialM", getMaterialM())
.append("materialSum", getMaterialSum())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("opers", getOpers())
.append("remark", getRemark())
.append("pickBy", getPickBy())
.toString();
}
}

139
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysProductModel.java

@ -0,0 +1,139 @@
package com.ruoyi.system.domain;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 产品型号管理对象 sys_product_model
*
* @author zhang
* @date 2023-12-15
*/
public class SysProductModel extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 产品型号管理表id */
private Long Pid;
/** 产品型号ID */
@Excel(name = "产品型号ID")
private String Pcode;
/** 设备型号 */
@Excel(name = "设备型号")
private String equipModel;
/** 设备名称 */
@Excel(name = "设备名称")
private String equipName;
/** 规格说明 */
@Excel(name = "规格说明")
private String specification;
/** 差异说明 */
@Excel(name = "差异说明")
private String differences;
/** 更新人 */
@Excel(name = "更新人")
private String udpateBy;
/** 图片地址 */
@Excel(name = "图片地址")
private String photoUrl;
public void setPid(Long Pid)
{
this.Pid = Pid;
}
public Long getPid()
{
return Pid;
}
public void setPcode(String Pcode)
{
this.Pcode = Pcode;
}
public String getPcode()
{
return Pcode;
}
public void setEquipModel(String equipModel)
{
this.equipModel = equipModel;
}
public String getEquipModel()
{
return equipModel;
}
public void setEquipName(String equipName)
{
this.equipName = equipName;
}
public String getEquipName()
{
return equipName;
}
public void setSpecification(String specification)
{
this.specification = specification;
}
public String getSpecification()
{
return specification;
}
public void setDifferences(String differences)
{
this.differences = differences;
}
public String getDifferences()
{
return differences;
}
public void setUdpateBy(String udpateBy)
{
this.udpateBy = udpateBy;
}
public String getUdpateBy()
{
return udpateBy;
}
public void setPhotoUrl(String photoUrl)
{
this.photoUrl = photoUrl;
}
public String getPhotoUrl()
{
return photoUrl;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("Pid", getPid())
.append("Pcode", getPcode())
.append("createBy", getCreateBy())
.append("equipModel", getEquipModel())
.append("equipName", getEquipName())
.append("specification", getSpecification())
.append("differences", getDifferences())
.append("remark", getRemark())
.append("createTime", getCreateTime())
.append("udpateBy", getUdpateBy())
.append("updateTime", getUpdateTime())
.append("photoUrl", getPhotoUrl())
.toString();
}
}

78
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysMakeOrderMapper.java

@ -0,0 +1,78 @@
package com.ruoyi.system.mapper;
import com.ruoyi.system.domain.SysMakeOrder;
import java.util.List;
/**
* 生产订单Mapper接口
*
* @author zhang
* @date 2023-12-18
*/
public interface SysMakeOrderMapper
{
/**
* 查询生产订单
*
* @param id 生产订单ID
* @return 生产订单
*/
public SysMakeOrder selectSysMakeOrderById(Long id);
/**
* 查询生产订单列表
*
* @param sysMakeOrder 生产订单
* @return 生产订单集合
*/
public List<SysMakeOrder> selectSysMakeOrderList(SysMakeOrder sysMakeOrder);
/**
* 新增生产订单
*
* @param sysMakeOrder 生产订单
* @return 结果
*/
public int insertSysMakeOrder(SysMakeOrder sysMakeOrder);
/**
* 修改生产订单
*
* @param sysMakeOrder 生产订单
* @return 结果
*/
public int updateSysMakeOrder(SysMakeOrder sysMakeOrder);
/**
* 删除生产订单
*
* @param id 生产订单ID
* @return 结果
*/
public int deleteSysMakeOrderById(Long id);
/**
* 批量删除生产订单
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteSysMakeOrderByIds(String[] ids);
/**
* 作废生产订单
*
* @param id 生产订单ID
* @return 结果
*/
public int cancelSysMakeOrderById(Long id);
/**
* 恢复生产订单
*
* @param id 生产订单ID
* @return 结果
*/
public int restoreSysMakeOrderById(Long id);
}

78
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysPickingMapper.java

@ -0,0 +1,78 @@
package com.ruoyi.system.mapper;
import com.ruoyi.system.domain.SysPicking;
import java.util.List;
/**
* 开发修改单领料列表Mapper接口
*
* @author ruoyi
* @date 2023-12-15
*/
public interface SysPickingMapper
{
/**
* 查询开发修改单领料列表
*
* @param pickId 开发修改单领料列表ID
* @return 开发修改单领料列表
*/
public SysPicking selectSysPickingById(Long pickId);
/**
* 查询开发修改单领料列表列表
*
* @param sysPicking 开发修改单领料列表
* @return 开发修改单领料列表集合
*/
public List<SysPicking> selectSysPickingList(SysPicking sysPicking);
/**
* 新增开发修改单领料列表
*
* @param sysPicking 开发修改单领料列表
* @return 结果
*/
public int insertSysPicking(SysPicking sysPicking);
/**
* 修改开发修改单领料列表
*
* @param sysPicking 开发修改单领料列表
* @return 结果
*/
public int updateSysPicking(SysPicking sysPicking);
/**
* 删除开发修改单领料列表
*
* @param pickId 开发修改单领料列表ID
* @return 结果
*/
public int deleteSysPickingById(Long pickId);
/**
* 批量删除开发修改单领料列表
*
* @param pickIds 需要删除的数据ID
* @return 结果
*/
public int deleteSysPickingByIds(String[] pickIds);
/**
* 作废开发修改单领料列表
*
* @param pickId 开发修改单领料列表ID
* @return 结果
*/
public int cancelSysPickingById(Long pickId);
/**
* 恢复开发修改单领料列表
*
* @param pickId 开发修改单领料列表ID
* @return 结果
*/
public int restoreSysPickingById(Long pickId);
}

78
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysProductModelMapper.java

@ -0,0 +1,78 @@
package com.ruoyi.system.mapper;
import com.ruoyi.system.domain.SysProductModel;
import java.util.List;
/**
* 产品型号管理Mapper接口
*
* @author zhang
* @date 2023-12-15
*/
public interface SysProductModelMapper
{
/**
* 查询产品型号管理
*
* @param Pid 产品型号管理ID
* @return 产品型号管理
*/
public SysProductModel selectSysProductModelById(Long Pid);
/**
* 查询产品型号管理列表
*
* @param sysProductModel 产品型号管理
* @return 产品型号管理集合
*/
public List<SysProductModel> selectSysProductModelList(SysProductModel sysProductModel);
/**
* 新增产品型号管理
*
* @param sysProductModel 产品型号管理
* @return 结果
*/
public int insertSysProductModel(SysProductModel sysProductModel);
/**
* 修改产品型号管理
*
* @param sysProductModel 产品型号管理
* @return 结果
*/
public int updateSysProductModel(SysProductModel sysProductModel);
/**
* 删除产品型号管理
*
* @param Pid 产品型号管理ID
* @return 结果
*/
public int deleteSysProductModelById(Long Pid);
/**
* 批量删除产品型号管理
*
* @param Pids 需要删除的数据ID
* @return 结果
*/
public int deleteSysProductModelByIds(String[] Pids);
/**
* 作废产品型号管理
*
* @param Pid 产品型号管理ID
* @return 结果
*/
public int cancelSysProductModelById(Long Pid);
/**
* 恢复产品型号管理
*
* @param Pid 产品型号管理ID
* @return 结果
*/
public int restoreSysProductModelById(Long Pid);
}

76
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysMakeOrderService.java

@ -0,0 +1,76 @@
package com.ruoyi.system.service;
import com.ruoyi.system.domain.SysMakeOrder;
import java.util.List;
/**
* 生产订单Service接口
*
* @author zhang
* @date 2023-12-18
*/
public interface ISysMakeOrderService
{
/**
* 查询生产订单
*
* @param id 生产订单ID
* @return 生产订单
*/
public SysMakeOrder selectSysMakeOrderById(Long id);
/**
* 查询生产订单列表
*
* @param sysMakeOrder 生产订单
* @return 生产订单集合
*/
public List<SysMakeOrder> selectSysMakeOrderList(SysMakeOrder sysMakeOrder);
/**
* 新增生产订单
*
* @param sysMakeOrder 生产订单
* @return 结果
*/
public int insertSysMakeOrder(SysMakeOrder sysMakeOrder);
/**
* 修改生产订单
*
* @param sysMakeOrder 生产订单
* @return 结果
*/
public int updateSysMakeOrder(SysMakeOrder sysMakeOrder);
/**
* 批量删除生产订单
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteSysMakeOrderByIds(String ids);
/**
* 删除生产订单信息
*
* @param id 生产订单ID
* @return 结果
*/
public int deleteSysMakeOrderById(Long id);
/**
* 作废生产订单
* @param id 生产订单ID
* @return
*/
int cancelSysMakeOrderById(Long id);
/**
* 恢复生产订单
* @param id 生产订单ID
* @return
*/
int restoreSysMakeOrderById(Long id);
}

76
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysPickingService.java

@ -0,0 +1,76 @@
package com.ruoyi.system.service;
import com.ruoyi.system.domain.SysPicking;
import java.util.List;
/**
* 开发修改单领料列表Service接口
*
* @author ruoyi
* @date 2023-12-15
*/
public interface ISysPickingService
{
/**
* 查询开发修改单领料列表
*
* @param pickId 开发修改单领料列表ID
* @return 开发修改单领料列表
*/
public SysPicking selectSysPickingById(Long pickId);
/**
* 查询开发修改单领料列表列表
*
* @param sysPicking 开发修改单领料列表
* @return 开发修改单领料列表集合
*/
public List<SysPicking> selectSysPickingList(SysPicking sysPicking);
/**
* 新增开发修改单领料列表
*
* @param sysPicking 开发修改单领料列表
* @return 结果
*/
public int insertSysPicking(SysPicking sysPicking);
/**
* 修改开发修改单领料列表
*
* @param sysPicking 开发修改单领料列表
* @return 结果
*/
public int updateSysPicking(SysPicking sysPicking);
/**
* 批量删除开发修改单领料列表
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteSysPickingByIds(String ids);
/**
* 删除开发修改单领料列表信息
*
* @param pickId 开发修改单领料列表ID
* @return 结果
*/
public int deleteSysPickingById(Long pickId);
/**
* 作废开发修改单领料列表
* @param pickId 开发修改单领料列表ID
* @return
*/
int cancelSysPickingById(Long pickId);
/**
* 恢复开发修改单领料列表
* @param pickId 开发修改单领料列表ID
* @return
*/
int restoreSysPickingById(Long pickId);
}

76
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysProductModelService.java

@ -0,0 +1,76 @@
package com.ruoyi.system.service;
import com.ruoyi.system.domain.SysProductModel;
import java.util.List;
/**
* 产品型号管理Service接口
*
* @author zhang
* @date 2023-12-15
*/
public interface ISysProductModelService
{
/**
* 查询产品型号管理
*
* @param Pid 产品型号管理ID
* @return 产品型号管理
*/
public SysProductModel selectSysProductModelById(Long Pid);
/**
* 查询产品型号管理列表
*
* @param sysProductModel 产品型号管理
* @return 产品型号管理集合
*/
public List<SysProductModel> selectSysProductModelList(SysProductModel sysProductModel);
/**
* 新增产品型号管理
*
* @param sysProductModel 产品型号管理
* @return 结果
*/
public int insertSysProductModel(SysProductModel sysProductModel);
/**
* 修改产品型号管理
*
* @param sysProductModel 产品型号管理
* @return 结果
*/
public int updateSysProductModel(SysProductModel sysProductModel);
/**
* 批量删除产品型号管理
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteSysProductModelByIds(String ids);
/**
* 删除产品型号管理信息
*
* @param Pid 产品型号管理ID
* @return 结果
*/
public int deleteSysProductModelById(Long Pid);
/**
* 作废产品型号管理
* @param Pid 产品型号管理ID
* @return
*/
int cancelSysProductModelById(Long Pid);
/**
* 恢复产品型号管理
* @param Pid 产品型号管理ID
* @return
*/
int restoreSysProductModelById(Long Pid);
}

127
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMakeOrderServiceImpl.java

@ -0,0 +1,127 @@
package com.ruoyi.system.service.impl;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.SysMakeOrder;
import com.ruoyi.system.mapper.SysMakeOrderMapper;
import com.ruoyi.system.service.ISysMakeOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 生产订单Service业务层处理
*
* @author zhang
* @date 2023-12-18
*/
@Service
public class SysMakeOrderServiceImpl implements ISysMakeOrderService
{
@Autowired
private SysMakeOrderMapper sysMakeOrderMapper;
/**
* 查询生产订单
*
* @param id 生产订单ID
* @return 生产订单
*/
@Override
public SysMakeOrder selectSysMakeOrderById(Long id)
{
return sysMakeOrderMapper.selectSysMakeOrderById(id);
}
/**
* 查询生产订单列表
*
* @param sysMakeOrder 生产订单
* @return 生产订单
*/
@Override
public List<SysMakeOrder> selectSysMakeOrderList(SysMakeOrder sysMakeOrder)
{
return sysMakeOrderMapper.selectSysMakeOrderList(sysMakeOrder);
}
/**
* 新增生产订单
*
* @param sysMakeOrder 生产订单
* @return 结果
*/
@Override
public int insertSysMakeOrder(SysMakeOrder sysMakeOrder)
{
String loginName = ShiroUtils.getLoginName();
sysMakeOrder.setCreateBy(loginName);
sysMakeOrder.setCreateTime(DateUtils.getNowDate());
return sysMakeOrderMapper.insertSysMakeOrder(sysMakeOrder);
}
/**
* 修改生产订单
*
* @param sysMakeOrder 生产订单
* @return 结果
*/
@Override
public int updateSysMakeOrder(SysMakeOrder sysMakeOrder)
{
String loginName = ShiroUtils.getLoginName();
sysMakeOrder.setUpdateBy(loginName);
sysMakeOrder.setUpdateTime(DateUtils.getNowDate());
return sysMakeOrderMapper.updateSysMakeOrder(sysMakeOrder);
}
/**
* 删除生产订单对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteSysMakeOrderByIds(String ids)
{
return sysMakeOrderMapper.deleteSysMakeOrderByIds(Convert.toStrArray(ids));
}
/**
* 删除生产订单信息
*
* @param id 生产订单ID
* @return 结果
*/
@Override
public int deleteSysMakeOrderById(Long id)
{
return sysMakeOrderMapper.deleteSysMakeOrderById(id);
}
/**
* 作废生产订单
*
* @param id 生产订单ID
* @return 结果
*/
@Override
public int cancelSysMakeOrderById(Long id)
{
return sysMakeOrderMapper.cancelSysMakeOrderById(id);
}
/**
* 恢复生产订单信息
*
* @param id 生产订单ID
* @return 结果
*/
@Override
public int restoreSysMakeOrderById(Long id)
{
return sysMakeOrderMapper.restoreSysMakeOrderById(id);
}
}

127
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysPickingServiceImpl.java

@ -0,0 +1,127 @@
package com.ruoyi.system.service.impl;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.SysPicking;
import com.ruoyi.system.mapper.SysPickingMapper;
import com.ruoyi.system.service.ISysPickingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 开发修改单领料列表Service业务层处理
*
* @author ruoyi
* @date 2023-12-15
*/
@Service
public class SysPickingServiceImpl implements ISysPickingService
{
@Autowired
private SysPickingMapper sysPickingMapper;
/**
* 查询开发修改单领料列表
*
* @param pickId 开发修改单领料列表ID
* @return 开发修改单领料列表
*/
@Override
public SysPicking selectSysPickingById(Long pickId)
{
return sysPickingMapper.selectSysPickingById(pickId);
}
/**
* 查询开发修改单领料列表列表
*
* @param sysPicking 开发修改单领料列表
* @return 开发修改单领料列表
*/
@Override
public List<SysPicking> selectSysPickingList(SysPicking sysPicking)
{
return sysPickingMapper.selectSysPickingList(sysPicking);
}
/**
* 新增开发修改单领料列表
*
* @param sysPicking 开发修改单领料列表
* @return 结果
*/
@Override
public int insertSysPicking(SysPicking sysPicking)
{
String loginName = ShiroUtils.getLoginName();
sysPicking.setCreateBy(loginName);
sysPicking.setCreateTime(DateUtils.getNowDate());
return sysPickingMapper.insertSysPicking(sysPicking);
}
/**
* 修改开发修改单领料列表
*
* @param sysPicking 开发修改单领料列表
* @return 结果
*/
@Override
public int updateSysPicking(SysPicking sysPicking)
{
String loginName = ShiroUtils.getLoginName();
sysPicking.setUpdateBy(loginName);
sysPicking.setUpdateTime(DateUtils.getNowDate());
return sysPickingMapper.updateSysPicking(sysPicking);
}
/**
* 删除开发修改单领料列表对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteSysPickingByIds(String ids)
{
return sysPickingMapper.deleteSysPickingByIds(Convert.toStrArray(ids));
}
/**
* 删除开发修改单领料列表信息
*
* @param pickId 开发修改单领料列表ID
* @return 结果
*/
@Override
public int deleteSysPickingById(Long pickId)
{
return sysPickingMapper.deleteSysPickingById(pickId);
}
/**
* 作废开发修改单领料列表
*
* @param pickId 开发修改单领料列表ID
* @return 结果
*/
@Override
public int cancelSysPickingById(Long pickId)
{
return sysPickingMapper.cancelSysPickingById(pickId);
}
/**
* 恢复开发修改单领料列表信息
*
* @param pickId 开发修改单领料列表ID
* @return 结果
*/
@Override
public int restoreSysPickingById(Long pickId)
{
return sysPickingMapper.restoreSysPickingById(pickId);
}
}

125
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysProductModelServiceImpl.java

@ -0,0 +1,125 @@
package com.ruoyi.system.service.impl;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.SysProductModel;
import com.ruoyi.system.mapper.SysProductModelMapper;
import com.ruoyi.system.service.ISysProductModelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 产品型号管理Service业务层处理
*
* @author zhang
* @date 2023-12-15
*/
@Service
public class SysProductModelServiceImpl implements ISysProductModelService
{
@Autowired
private SysProductModelMapper sysProductModelMapper;
/**
* 查询产品型号管理
*
* @param Pid 产品型号管理ID
* @return 产品型号管理
*/
@Override
public SysProductModel selectSysProductModelById(Long Pid)
{
return sysProductModelMapper.selectSysProductModelById(Pid);
}
/**
* 查询产品型号管理列表
*
* @param sysProductModel 产品型号管理
* @return 产品型号管理
*/
@Override
public List<SysProductModel> selectSysProductModelList(SysProductModel sysProductModel)
{
return sysProductModelMapper.selectSysProductModelList(sysProductModel);
}
/**
* 新增产品型号管理
*
* @param sysProductModel 产品型号管理
* @return 结果
*/
@Override
public int insertSysProductModel(SysProductModel sysProductModel)
{
String loginName = ShiroUtils.getLoginName();
sysProductModel.setCreateBy(loginName);
sysProductModel.setCreateTime(DateUtils.getNowDate());
return sysProductModelMapper.insertSysProductModel(sysProductModel);
}
/**
* 修改产品型号管理
*
* @param sysProductModel 产品型号管理
* @return 结果
*/
@Override
public int updateSysProductModel(SysProductModel sysProductModel)
{
sysProductModel.setUpdateTime(DateUtils.getNowDate());
return sysProductModelMapper.updateSysProductModel(sysProductModel);
}
/**
* 删除产品型号管理对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteSysProductModelByIds(String ids)
{
return sysProductModelMapper.deleteSysProductModelByIds(Convert.toStrArray(ids));
}
/**
* 删除产品型号管理信息
*
* @param Pid 产品型号管理ID
* @return 结果
*/
@Override
public int deleteSysProductModelById(Long Pid)
{
return sysProductModelMapper.deleteSysProductModelById(Pid);
}
/**
* 作废产品型号管理
*
* @param Pid 产品型号管理ID
* @return 结果
*/
@Override
public int cancelSysProductModelById(Long Pid)
{
return sysProductModelMapper.cancelSysProductModelById(Pid);
}
/**
* 恢复产品型号管理信息
*
* @param Pid 产品型号管理ID
* @return 结果
*/
@Override
public int restoreSysProductModelById(Long Pid)
{
return sysProductModelMapper.restoreSysProductModelById(Pid);
}
}

12
ruoyi-admin/src/main/resources/mapper/erp/ErpBomMapper.xml

@ -67,6 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if test="id != null "> and id = #{id}</if>
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and erp.create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="updateBy != null and updateBy != ''"> and update_by = #{updateBy}</if>
@ -152,6 +153,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
@ -205,7 +207,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
delete from erp_bom where id = #{id}
</delete>
<delete id="deleteErpBomByIds" parameterType="String">
<delete id="deleteErpBomByIds" parameterType="String" >
delete from erp_bom where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
@ -220,7 +222,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update erp_bom set del_flag = '0' where id = #{id}
</update>
<delete id="deleteErpBomByParentIds" parameterType="String">
<delete id="deleteErpBomByParentIds" parameterType="String" >
delete from erp_bom where parent_id in
<foreach item="parentId" collection="array" open="(" separator="," close=")">
#{parentId}
@ -252,10 +254,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="useStatusErpBom" parameterType="ErpBom">
update erp_bom set use_status = #{useStatus} where id = #{id}
</update>
<select id="selectErpBomByIds">
<select id="selectErpBomByIds" resultMap="ErpBomResult">
select * from erp_bom where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<select id="selectBomByBomNo" resultMap="ErpBomResult">
select * from erp_bom where bomNo = #{bomNo}
</select>
</mapper>

10
ruoyi-admin/src/main/resources/mapper/erp/ErpMaterialMapper.xml

@ -30,11 +30,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectErpMaterialVo">
select id, del_flag, create_by, create_time, update_by, update_time, remark, material_no, material_name, audit_status, use_status, hava_product_tem,product_item,itemName, material_type, process_method, unit, brand, `describe`, warehouse_dept from erp_material
select id, del_flag, create_by, create_time, update_by, update_time, remark,bomNo, material_no, material_name, audit_status, use_status, hava_product_tem,product_item,itemName, material_type, process_method, unit, brand, `describe`, warehouse_dept from erp_material
</sql>
<select id="selectErpMaterialList" parameterType="ErpMaterial" resultMap="ErpMaterialResult">
select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time, erp.remark, erp.material_no
select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time, erp.remark,erp.bomNo, erp.material_no
, erp.material_name, erp.audit_status, erp.use_status, erp.hava_product_tem, erp.product_item,erp.`itemName`, erp.material_type, erp.process_method
, erp.unit, erp.brand, erp.`describe`, erp.warehouse_dept
,file.url as photo_url
@ -73,7 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectErpMaterialById" parameterType="Long" resultMap="ErpMaterialResult">
select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time, erp.remark, erp.material_no
select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time, erp.remark,erp.bomNo, erp.material_no
, erp.material_name, erp.audit_status, erp.use_status, erp.hava_product_tem,erp.product_item,erp.itemName, erp.material_type
, erp.process_method, erp.unit, erp.brand, erp.describe, erp.warehouse_dept
,att.id as photo_attach_id
@ -191,7 +191,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update erp_material set use_status = #{useStatus} where id = #{id}
</update>
<update id="updateMaterialBomNo" parameterType="String">
update erp_material set bomNo = #{bomNo} where materialNo = #{materialNo}
<update id="updateMaterialBomNo" parameterType="ErpMaterial">
update erp_material set bomNo = #{bomNo} where material_no = #{materialNo}
</update>
</mapper>

159
ruoyi-admin/src/main/resources/mapper/system/SysMakeOrderMapper.xml

@ -0,0 +1,159 @@
<?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.SysMakeOrderMapper">
<resultMap type="SysMakeOrder" id="SysMakeOrderResult">
<result property="id" column="id" />
<result property="makeStatus" column="make_status" />
<result property="eceiptStatus" column="eceipt_status" />
<result property="qualityStatus" column="quality_status" />
<result property="useStatus" column="use_status" />
<result property="makeNo" column="makeNo" />
<result property="saleNo" column="saleNo" />
<result property="Salesman" column="Salesman" />
<result property="customerId" column="customerId" />
<result property="customerName" column="customerName" />
<result property="customerOderCode" column="customerOderCode" />
<result property="material" column="material" />
<result property="materialSum" column="materialSum" />
<result property="finishNum" column="finishNum" />
<result property="eceiptNum" column="eceiptNum" />
<result property="noRate" column="noRate" />
<result property="rate" column="rate" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectSysMakeOrderVo">
select id, make_status, eceipt_status, quality_status, use_status, makeNo, saleNo, Salesman, customerId, customerName, customerOderCode, material, materialSum, finishNum, eceiptNum, noRate, rate, create_by, create_time, update_by, update_time, remark, del_flag from sys_makeorder
</sql>
<select id="selectSysMakeOrderList" parameterType="SysMakeOrder" resultMap="SysMakeOrderResult">
<include refid="selectSysMakeOrderVo"/>
<where>
<if test="makeStatus != null and makeStatus != ''"> and make_status = #{makeStatus}</if>
<if test="eceiptStatus != null and eceiptStatus != ''"> and eceipt_status = #{eceiptStatus}</if>
<if test="qualityStatus != null and qualityStatus != ''"> and quality_status = #{qualityStatus}</if>
<if test="useStatus != null and useStatus != ''"> and use_status = #{useStatus}</if>
<if test="makeNo != null and makeNo != ''"> and makeNo = #{makeNo}</if>
<if test="saleNo != null and saleNo != ''"> and saleNo = #{saleNo}</if>
<if test="Salesman != null and Salesman != ''"> and Salesman = #{Salesman}</if>
<if test="customerId != null and customerId != ''"> and customerId = #{customerId}</if>
<if test="customerName != null and customerName != ''"> and customerName like concat('%', #{customerName}, '%')</if>
<if test="customerOderCode != null and customerOderCode != ''"> and customerOderCode = #{customerOderCode}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
</where>
</select>
<select id="selectSysMakeOrderById" parameterType="Long" resultMap="SysMakeOrderResult">
<include refid="selectSysMakeOrderVo"/>
where id = #{id}
</select>
<insert id="insertSysMakeOrder" parameterType="SysMakeOrder" useGeneratedKeys="true" keyProperty="id">
insert into sys_makeorder
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="makeStatus != null">make_status,</if>
<if test="eceiptStatus != null">eceipt_status,</if>
<if test="qualityStatus != null">quality_status,</if>
<if test="useStatus != null">use_status,</if>
<if test="makeNo != null">makeNo,</if>
<if test="saleNo != null">saleNo,</if>
<if test="Salesman != null">Salesman,</if>
<if test="customerId != null">customerId,</if>
<if test="customerName != null">customerName,</if>
<if test="customerOderCode != null">customerOderCode,</if>
<if test="material != null">material,</if>
<if test="materialSum != null">materialSum,</if>
<if test="finishNum != null">finishNum,</if>
<if test="eceiptNum != null">eceiptNum,</if>
<if test="noRate != null">noRate,</if>
<if test="rate != null">rate,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
<if test="delFlag != null">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="makeStatus != null">#{makeStatus},</if>
<if test="eceiptStatus != null">#{eceiptStatus},</if>
<if test="qualityStatus != null">#{qualityStatus},</if>
<if test="useStatus != null">#{useStatus},</if>
<if test="makeNo != null">#{makeNo},</if>
<if test="saleNo != null">#{saleNo},</if>
<if test="Salesman != null">#{Salesman},</if>
<if test="customerId != null">#{customerId},</if>
<if test="customerName != null">#{customerName},</if>
<if test="customerOderCode != null">#{customerOderCode},</if>
<if test="material != null">#{material},</if>
<if test="materialSum != null">#{materialSum},</if>
<if test="finishNum != null">#{finishNum},</if>
<if test="eceiptNum != null">#{eceiptNum},</if>
<if test="noRate != null">#{noRate},</if>
<if test="rate != null">#{rate},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
<if test="delFlag != null">#{delFlag},</if>
</trim>
</insert>
<update id="updateSysMakeOrder" parameterType="SysMakeOrder">
update sys_makeorder
<trim prefix="SET" suffixOverrides=",">
<if test="makeStatus != null">make_status = #{makeStatus},</if>
<if test="eceiptStatus != null">eceipt_status = #{eceiptStatus},</if>
<if test="qualityStatus != null">quality_status = #{qualityStatus},</if>
<if test="useStatus != null">use_status = #{useStatus},</if>
<if test="makeNo != null">makeNo = #{makeNo},</if>
<if test="saleNo != null">saleNo = #{saleNo},</if>
<if test="Salesman != null">Salesman = #{Salesman},</if>
<if test="customerId != null">customerId = #{customerId},</if>
<if test="customerName != null">customerName = #{customerName},</if>
<if test="customerOderCode != null">customerOderCode = #{customerOderCode},</if>
<if test="material != null">material = #{material},</if>
<if test="materialSum != null">materialSum = #{materialSum},</if>
<if test="finishNum != null">finishNum = #{finishNum},</if>
<if test="eceiptNum != null">eceiptNum = #{eceiptNum},</if>
<if test="noRate != null">noRate = #{noRate},</if>
<if test="rate != null">rate = #{rate},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSysMakeOrderById" parameterType="Long">
delete from sys_makeorder where id = #{id}
</delete>
<delete id="deleteSysMakeOrderByIds" parameterType="String">
delete from sys_makeorder where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<update id="cancelSysMakeOrderById" parameterType="Long">
update sys_makeorder set del_flag = '1' where id = #{id}
</update>
<update id="restoreSysMakeOrderById" parameterType="Long">
update sys_makeorder set del_flag = '0' where id = #{id}
</update>
</mapper>

120
ruoyi-admin/src/main/resources/mapper/system/SysPickingMapper.xml

@ -0,0 +1,120 @@
<?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.SysPickingMapper">
<resultMap type="SysPicking" id="SysPickingResult">
<result property="pickId" column="pickId" />
<result property="pickNo" column="pickNo" />
<result property="pickStaus" column="pickStaus" />
<result property="createBy" column="create_by" />
<result property="saleNo" column="saleNo" />
<result property="types" column="types" />
<result property="materialM" column="materialM" />
<result property="materialSum" column="materialSum" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="opers" column="opers" />
<result property="remark" column="remark" />
<result property="pickBy" column="pick_by" />
</resultMap>
<sql id="selectSysPickingVo">
select pickId, pickNo, pickStaus, create_by, saleNo, types, materialM, materialSum, create_time, update_by, update_time, opers, remark, pick_by from sys_picking
</sql>
<select id="selectSysPickingList" parameterType="SysPicking" resultMap="SysPickingResult">
<include refid="selectSysPickingVo"/>
<where>
<if test="pickNo != null and pickNo != ''"> and pickNo = #{pickNo}</if>
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
<if test="saleNo != null and saleNo != ''"> and saleNo = #{saleNo}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
<if test="opers != null and opers != ''"> and opers = #{opers}</if>
<if test="pickBy != null and pickBy != ''"> and pick_by = #{pickBy}</if>
</where>
</select>
<select id="selectSysPickingById" parameterType="Long" resultMap="SysPickingResult">
<include refid="selectSysPickingVo"/>
where pickId = #{pickId}
</select>
<insert id="insertSysPicking" parameterType="SysPicking">
insert into sys_picking
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="pickId != null">pickId,</if>
<if test="pickNo != null">pickNo,</if>
<if test="pickStaus != null">pickStaus,</if>
<if test="createBy != null">create_by,</if>
<if test="saleNo != null">saleNo,</if>
<if test="types != null">types,</if>
<if test="materialM != null">materialM,</if>
<if test="materialSum != null">materialSum,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="opers != null">opers,</if>
<if test="remark != null">remark,</if>
<if test="pickBy != null">pick_by,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="pickId != null">#{pickId},</if>
<if test="pickNo != null">#{pickNo},</if>
<if test="pickStaus != null">#{pickStaus},</if>
<if test="createBy != null">#{createBy},</if>
<if test="saleNo != null">#{saleNo},</if>
<if test="types != null">#{types},</if>
<if test="materialM != null">#{materialM},</if>
<if test="materialSum != null">#{materialSum},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="opers != null">#{opers},</if>
<if test="remark != null">#{remark},</if>
<if test="pickBy != null">#{pickBy},</if>
</trim>
</insert>
<update id="updateSysPicking" parameterType="SysPicking">
update sys_picking
<trim prefix="SET" suffixOverrides=",">
<if test="pickNo != null">pickNo = #{pickNo},</if>
<if test="pickStaus != null">pickStaus = #{pickStaus},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="saleNo != null">saleNo = #{saleNo},</if>
<if test="types != null">types = #{types},</if>
<if test="materialM != null">materialM = #{materialM},</if>
<if test="materialSum != null">materialSum = #{materialSum},</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="opers != null">opers = #{opers},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="pickBy != null">pick_by = #{pickBy},</if>
</trim>
where pickId = #{pickId}
</update>
<delete id="deleteSysPickingById" parameterType="Long">
delete from sys_picking where pickId = #{pickId}
</delete>
<delete id="deleteSysPickingByIds" parameterType="String">
delete from sys_picking where pickId in
<foreach item="pickId" collection="array" open="(" separator="," close=")">
#{pickId}
</foreach>
</delete>
<update id="cancelSysPickingById" parameterType="Long">
update sys_picking set del_flag = '1' where pickId = #{pickId}
</update>
<update id="restoreSysPickingById" parameterType="Long">
update sys_picking set del_flag = '0' where pickId = #{pickId}
</update>
</mapper>

114
ruoyi-admin/src/main/resources/mapper/system/SysProductModelMapper.xml

@ -0,0 +1,114 @@
<?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.SysProductModelMapper">
<resultMap type="SysProductModel" id="SysProductModelResult">
<result property="Pid" column="Pid" />
<result property="Pcode" column="Pcode" />
<result property="createBy" column="create_by" />
<result property="equipModel" column="equipModel" />
<result property="equipName" column="equipName" />
<result property="specification" column="specification" />
<result property="differences" column="differences" />
<result property="remark" column="remark" />
<result property="createTime" column="create_time" />
<result property="udpateBy" column="udpate_by" />
<result property="updateTime" column="update_time" />
<result property="photoUrl" column="photoUrl" />
</resultMap>
<sql id="selectSysProductModelVo">
select Pid, Pcode, create_by, equipModel, equipName, specification, differences, remark, create_time, udpate_by, update_time, photoUrl from sys_product_model
</sql>
<select id="selectSysProductModelList" parameterType="SysProductModel" resultMap="SysProductModelResult">
<include refid="selectSysProductModelVo"/>
<where>
<if test="Pcode != null and Pcode != ''"> and Pcode = #{Pcode}</if>
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
<if test="equipModel != null and equipModel != ''"> and equipModel = #{equipModel}</if>
<if test="equipName != null and equipName != ''"> and equipName like concat('%', #{equipName}, '%')</if>
<if test="specification != null and specification != ''"> and specification = #{specification}</if>
<if test="differences != null and differences != ''"> and differences = #{differences}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
<if test="udpateBy != null and udpateBy != ''"> and udpate_by = #{udpateBy}</if>
<if test="photoUrl != null and photoUrl != ''"> and photoUrl = #{photoUrl}</if>
</where>
</select>
<select id="selectSysProductModelById" parameterType="Long" resultMap="SysProductModelResult">
<include refid="selectSysProductModelVo"/>
where Pid = #{Pid}
</select>
<insert id="insertSysProductModel" parameterType="SysProductModel">
insert into sys_product_model
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="Pid != null">Pid,</if>
<if test="Pcode != null">Pcode,</if>
<if test="createBy != null">create_by,</if>
<if test="equipModel != null">equipModel,</if>
<if test="equipName != null">equipName,</if>
<if test="specification != null">specification,</if>
<if test="differences != null">differences,</if>
<if test="remark != null">remark,</if>
<if test="createTime != null">create_time,</if>
<if test="udpateBy != null">udpate_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="photoUrl != null">photoUrl,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="Pid != null">#{Pid},</if>
<if test="Pcode != null">#{Pcode},</if>
<if test="createBy != null">#{createBy},</if>
<if test="equipModel != null">#{equipModel},</if>
<if test="equipName != null">#{equipName},</if>
<if test="specification != null">#{specification},</if>
<if test="differences != null">#{differences},</if>
<if test="remark != null">#{remark},</if>
<if test="createTime != null">#{createTime},</if>
<if test="udpateBy != null">#{udpateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="photoUrl != null">#{photoUrl},</if>
</trim>
</insert>
<update id="updateSysProductModel" parameterType="SysProductModel">
update sys_product_model
<trim prefix="SET" suffixOverrides=",">
<if test="Pcode != null">Pcode = #{Pcode},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="equipModel != null">equipModel = #{equipModel},</if>
<if test="equipName != null">equipName = #{equipName},</if>
<if test="specification != null">specification = #{specification},</if>
<if test="differences != null">differences = #{differences},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="udpateBy != null">udpate_by = #{udpateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="photoUrl != null">photoUrl = #{photoUrl},</if>
</trim>
where Pid = #{Pid}
</update>
<delete id="deleteSysProductModelById" parameterType="Long">
delete from sys_product_model where Pid = #{Pid}
</delete>
<delete id="deleteSysProductModelByIds" parameterType="String">
delete from sys_product_model where Pid in
<foreach item="Pid" collection="array" open="(" separator="," close=")">
#{Pid}
</foreach>
</delete>
<update id="cancelSysProductModelById" parameterType="Long">
update sys_product_model set del_flag = '1' where Pid = #{Pid}
</update>
<update id="restoreSysProductModelById" parameterType="Long">
update sys_product_model set del_flag = '0' where Pid = #{Pid}
</update>
</mapper>

2
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/fixed-columns/css/bootstrap-table-fixed-columns.css

@ -35,6 +35,6 @@
animation: none;
}
.bootstrap-table .table-hover > tbody > tr.hover > td{
.bootstrap-table .table-hover > tbody > tr.hover > td {
background-color: #f5f5f5;
}

377
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/fixed-columns/js/bootstrap-table-fixed-columns.js

@ -1,14 +1,11 @@
/**
* @author zhixin wen <wenzhixin2010@gmail.com>
* @version: v1.0.1
*/
(function ($) {
'use strict';
$.extend($.fn.bootstrapTable.defaults, {
fixedColumns: tr,
fixedRightNumber:1,
leftFixedColumns: false,
leftFixedNumber: 1,
rightFixedColumns: false,
rightFixedNumber: 1
});
var BootstrapTable = $.fn.bootstrapTable.Constructor,
@ -17,83 +14,169 @@
_resetView = BootstrapTable.prototype.resetView;
BootstrapTable.prototype.initFixedColumns = function () {
this.$fixedHeader = $([
'<div class="fixed-table-header-columns">',
'<table>',
'<thead></thead>',
'</table>',
'</div>'].join(''));
this.timeoutHeaderColumns_ = 0;
this.$fixedHeader.find('table').attr('class', this.$el.attr('class'));
this.$fixedHeaderColumns = this.$fixedHeader.find('thead');
this.$tableHeader.before(this.$fixedHeader);
this.$fixedBody = $([
'<div class="fixed-table-body-columns">',
'<table>',
'<tbody></tbody>',
'</table>',
'</div>'].join(''));
this.timeoutBodyColumns_ = 0;
this.$fixedBody.find('table').attr('class', this.$el.attr('class'));
this.$fixedBodyColumns = this.$fixedBody.find('tbody');
this.$tableBody.before(this.$fixedBody);
if (this.options.leftFixedColumns) {
this.$fixedHeader = $([
'<div class="fixed-table-header-columns">',
'<table>',
'<thead></thead>',
'</table>',
'</div>'].join(''));
this.$fixedHeader.find('table').attr('class', this.$el.attr('class'));
this.$fixedHeaderColumns = this.$fixedHeader.find('thead');
this.$tableHeader.before(this.$fixedHeader);
this.$fixedBody = $([
'<div class="fixed-table-body-columns">',
'<table>',
'<tbody></tbody>',
'</table>',
'</div>'].join(''));
this.$fixedBody.find('table').attr('class', this.$el.attr('class'));
this.$fixedBodyColumns = this.$fixedBody.find('tbody');
this.$tableBody.before(this.$fixedBody);
//this.$fixedBody = $([
// '<div class="fixed-table-column" style="position: absolute; background-color: #fff; border-right:1px solid #ddd;z-index:100;">',
// '<table>',
// '<thead></thead>',
// '<tbody></tbody>',
// '</table>',
// '</div>'].join(''));
//this.$fixedBody.find('table').attr('class', this.$el.attr('class'));
//this.$fixedHeaderColumns = this.$fixedBody.find('thead');
//this.$fixedBodyColumns = this.$fixedBody.find('tbody');
//this.$tableBody.before(this.$fixedBody);
}
if (this.options.rightFixedColumns) {
this.$rightfixedHeader = $([
'<div class="fixed-table-header-columns" style="right:14px;z-index:100;background:#fff;">',
'<table>',
'<thead></thead>',
'</table>',
'</div>'].join(''));
this.$rightfixedHeader.find('table').attr('class', this.$el.attr('class'));
this.$rightfixedHeaderColumns = this.$rightfixedHeader.find('thead');
this.$tableHeader.before(this.$rightfixedHeader);
this.$rightfixedBody = $([
'<div class="fixed-table-body-columns" style="right:14px;z-index:100;background:#fff;">',
'<table>',
'<tbody></tbody>',
'</table>',
'</div>'].join(''));
this.$rightfixedBody.find('table').attr('class', this.$el.attr('class'));
this.$rightfixedBodyColumns = this.$rightfixedBody.find('tbody');
this.$tableBody.before(this.$rightfixedBody);
//this.$rightfixedBody = $([
// '<div class="fixed-table-column" style="position: absolute;right:14px; background-color: #fff; top:0px;border-right:1px solid #ddd;z-index:100;">',
// '<table>',
// '<thead></thead>',
// '<tbody></tbody>',
// '</table>',
// '</div>'].join(''));
//this.$rightfixedBody.find('table').attr('class', this.$el.attr('class')).css('position', 'relative').css('border', '1px solid #ddd');
//this.$rightfixedHeaderColumns = this.$rightfixedBody.find('thead');
//this.$rightfixedBodyColumns = this.$rightfixedBody.find('tbody');
//this.$tableBody.before(this.$rightfixedBody);
}
};
BootstrapTable.prototype.initHeader = function () {
_initHeader.apply(this, Array.prototype.slice.apply(arguments));
if (!this.options.fixedColumns) {
if (!this.options.leftFixedColumns && !this.options.rightFixedColumns) {
return;
}
this.initFixedColumns();
var that = this, $trs = this.$header.find('tr').clone();
$trs.each(function () {
$(this).find('th:gt(' + that.options.fixedNumber + ')').remove();
});
this.$fixedHeaderColumns.html('').append($trs);
var $tr = this.$header.find('tr:eq(0)').clone(),
$ths = $tr.clone().find('th');
//$tr.html('');
//左边列冻结
if (this.options.leftFixedColumns) {
var $newtr = $('<tr></tr>');
$newtr.attr('data-index', $tr.attr('data-index'));
$newtr.attr('data-uniqueid', $tr.attr('data-uniqueid'));
debugger;
for (var i = 0; i < this.options.leftFixedNumber; i++) {
$newtr.append($ths.eq(i).clone());
}
this.$fixedHeaderColumns.html('').append($newtr);
}
//$tr.html('');
//右边列冻结
if (this.options.rightFixedColumns) {
debugger;
var $newtr2 = $('<tr></tr>');
$newtr2.attr('data-index', $tr.attr('data-index'));
$newtr2.attr('data-uniqueid', $tr.attr('data-uniqueid'));
for (var i = 0; i < this.options.rightFixedNumber; i++) {
$newtr2.append($ths.eq($ths.length - this.options.rightFixedNumber + i).clone());
}
this.$rightfixedHeaderColumns.html('').append($newtr2);
}
};
BootstrapTable.prototype.initBody = function () {
_initBody.apply(this, Array.prototype.slice.apply(arguments));
if (!this.options.fixedColumns) {
if (!this.options.leftFixedColumns && !this.options.rightFixedColumns) {
return;
}
var that = this,
rowspan = 0;
this.$fixedBodyColumns.html('');
this.$body.find('> tr[data-index]').each(function () {
var $tr = $(this).clone(),
$tds = $tr.find('td');
$tr.html('');
var end = that.options.fixedNumber;
if (rowspan > 0) {
--end;
--rowspan;
}
for (var i = 0; i < end; i++) {
$tr.append($tds.eq(i).clone());
}
that.$fixedBodyColumns.append($tr);
if ($tds.eq(0).attr('rowspan')){
rowspan = $tds.eq(0).attr('rowspan') - 1;
}
});
var that = this;
if (this.options.leftFixedColumns) {
this.$fixedBodyColumns.html('');
this.$body.find('> tr[data-index]').each(function () {
var $tr = $(this).clone(),
$tds = $tr.clone().find('td');
$tr.html('');
for (var i = 0; i < that.options.leftFixedNumber; i++) {
$tr.append($tds.eq(i).clone());
}
that.$fixedBodyColumns.append($tr);
});
}
if (this.options.rightFixedColumns) {
this.$rightfixedBodyColumns.html('');
this.$body.find('> tr[data-index]').each(function () {
var $tr = $(this).clone(),
$tds = $tr.clone().find('td');
$tr.html('');
for (var i = 0; i < that.options.rightFixedNumber; i++) {
var indexTd = $tds.length - that.options.rightFixedNumber + i;
var oldTd = $tds.eq(indexTd);
var fixTd = oldTd.clone();
var buttons = fixTd.find('button');
//事件转移:冻结列里面的事件转移到实际按钮的事件
buttons.each(function (key, item) {
$(item).click(function () {
that.$body.find("tr[data-index=" + $tr.attr('data-index') + "] td:eq(" + indexTd + ") button:eq(" + key + ")").click();
});
});
$tr.append(fixTd);
}
that.$rightfixedBodyColumns.append($tr);
});
}
};
BootstrapTable.prototype.resetView = function () {
_resetView.apply(this, Array.prototype.slice.apply(arguments));
if (!this.options.fixedColumns) {
if (!this.options.leftFixedColumns && !this.options.rightFixedColumns) {
return;
}
@ -108,70 +191,134 @@
var that = this,
visibleFields = this.getVisibleFields(),
headerWidth = 0;
this.$body.find('tr:first-child:not(.no-records-found) > *').each(function (i) {
var $this = $(this),
index = i;
if (i >= that.options.fixedNumber) {
return false;
}
if (that.options.detailView && !that.options.cardView) {
index = i - 1;
}
that.$fixedHeader.find('th[data-field="' + visibleFields[index] + '"]')
.find('.fht-cell').width($this.innerWidth());
headerWidth += $this.outerWidth();
});
this.$fixedHeader.width(headerWidth + 1).show();
if (that.options.leftFixedColumns) {
this.$body.find('tr:first-child:not(.no-records-found) > *').each(function (i) {
var $this = $(this),
index = i;
if (i >= that.options.leftFixedNumber) {
return false;
}
if (that.options.detailView && !that.options.cardView) {
index = i - 1;
}
that.$fixedHeader.find('thead th[data-field="' + visibleFields[index] + '"]')
.find('.fht-cell').width($this.innerWidth() - 1);
headerWidth += $this.outerWidth();
});
this.$fixedHeader.width(headerWidth - 1).show();
}
if (that.options.rightFixedColumns) {
this.$body.find('tr:first-child:not(.no-records-found) > *').each(function (i) {
var $this = $(this),
index = i;
if (i >= visibleFields.length - that.options.rightFixedNumber) {
//return false;
//if (that.options.detailView && !that.options.cardView) {
// index = i - 1;
//}
debugger;
that.$rightfixedHeader.find('thead th[data-field="' + visibleFields[index] + '"]')
.find('.fht-cell').width($this.innerWidth());
headerWidth += $this.outerWidth();
}
});
debugger;
this.$rightfixedHeader.width(headerWidth - 1).show();
}
};
BootstrapTable.prototype.fitBodyColumns = function () {
var that = this,
top = -(parseInt(this.$el.css('margin-top')) - 2),
// the fixed height should reduce the scorll-x height
height = this.$tableBody.height() - 14;
height = this.$tableBody.height() - 2;
if (!this.$body.find('> tr[data-index]').length) {
this.$fixedBody.hide();
return;
}
if (that.options.leftFixedColumns) {
if (!this.$body.find('> tr[data-index]').length) {
this.$fixedBody.hide();
return;
}
if (!this.options.height) {
top = this.$fixedHeader.height() - 1;
height = height - top;
}
if (!this.options.height) {
top = this.$fixedHeader.height();
height = height - top;
this.$fixedBody.css({
width: this.$fixedHeader.width(),
height: height,
top: top + 1
}).show();
this.$body.find('> tr').each(function (i) {
that.$fixedBody.find('tbody tr:eq(' + i + ')').height($(this).height());
});
//// events
this.$tableBody.on('scroll', function () {
that.$fixedBody.find('table').css('top', -$(this).scrollTop());
});
this.$body.find('> tr[data-index]').off('hover').hover(function () {
var index = $(this).data('index');
that.$fixedBody.find('tr[data-index="' + index + '"]').addClass('hover');
}, function () {
var index = $(this).data('index');
that.$fixedBody.find('tr[data-index="' + index + '"]').removeClass('hover');
});
this.$fixedBody.find('tr[data-index]').off('hover').hover(function () {
var index = $(this).data('index');
that.$body.find('tr[data-index="' + index + '"]').addClass('hover');
}, function () {
var index = $(this).data('index');
that.$body.find('> tr[data-index="' + index + '"]').removeClass('hover');
});
}
if (that.options.rightFixedColumns) {
if (!this.$body.find('> tr[data-index]').length) {
this.$rightfixedBody.hide();
return;
}
if (!this.options.height) {
top = this.$rightfixedHeader.height() - 1;
height = height - top;
}
this.$fixedBody.css({
width: this.$fixedHeader.width(),
height: height,
top: top
}).show();
this.$body.find('> tr').each(function (i) {
that.$fixedBody.find('tr:eq(' + i + ')').height($(this).height() - 1);
});
// events
this.$tableBody.on('scroll', function () {
that.$fixedBody.find('table').css('top', -$(this).scrollTop());
});
this.$body.find('> tr[data-index]').off('hover').hover(function () {
var index = $(this).data('index');
that.$fixedBody.find('tr[data-index="' + index + '"]').addClass('hover');
}, function () {
var index = $(this).data('index');
that.$fixedBody.find('tr[data-index="' + index + '"]').removeClass('hover');
});
this.$fixedBody.find('tr[data-index]').off('hover').hover(function () {
var index = $(this).data('index');
that.$body.find('tr[data-index="' + index + '"]').addClass('hover');
}, function () {
var index = $(this).data('index');
that.$body.find('> tr[data-index="' + index + '"]').removeClass('hover');
});
this.$rightfixedBody.css({
width: this.$rightfixedHeader.width(),
height: height - 13,
//top: top + 1
}).show();
this.$body.find('> tr').each(function (i) {
that.$rightfixedBody.find('tbody tr:eq(' + i + ')').height($(this).height());
});
//// events
this.$tableBody.on('scroll', function () {
that.$rightfixedBody.find('table').css('top', -$(this).scrollTop());
});
this.$body.find('> tr[data-index]').off('hover').hover(function () {
var index = $(this).data('index');
that.$rightfixedBody.find('tr[data-index="' + index + '"]').addClass('hover');
}, function () {
var index = $(this).data('index');
that.$rightfixedBody.find('tr[data-index="' + index + '"]').removeClass('hover');
});
this.$rightfixedBody.find('tr[data-index]').off('hover').hover(function () {
var index = $(this).data('index');
that.$body.find('tr[data-index="' + index + '"]').addClass('hover');
}, function () {
var index = $(this).data('index');
that.$body.find('> tr[data-index="' + index + '"]').removeClass('hover');
});
}
};
})(jQuery);

6
ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js

@ -129,9 +129,9 @@ var table = {
onPostBody: options.onPostBody, // 渲染完成后执行的事件
maintainSelected: options.maintainSelected, // 前端翻页时保留所选行
rememberSelected: options.rememberSelected, // 启用翻页记住前面的选择
fixedColumns: true, // 是否启用冻结列(左侧)
fixedNumber: 0, // 列冻结的个数(左侧)
fixedRightNumber: 5, // 列冻结的个数(右侧)
fixedColumns: options.fixedColumns, // 是否启用冻结列(左侧)
fixedNumber: options.fixedRightNumber, // 列冻结的个数(左侧)
fixedRightNumber: options.fixedRightNumber, // 列冻结的个数(右侧)
onReorderRow: options.onReorderRow, // 当拖拽结束后处理函数
queryParams: options.queryParams, // 传递参数(*)
rowStyle: options.rowStyle, // 通过自定义函数设置行样式

55
ruoyi-admin/src/main/resources/templates/erp/bom/add.html

@ -10,6 +10,7 @@
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-bom-add">
<input class="form-control" name="id" hidden="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">料号:</label>
<div class="col-sm-8">
@ -27,35 +28,35 @@
<div class="form-group">
<label class="col-sm-3 control-label">物料类型:</label>
<div class="col-sm-8">
<input name="materialType" class="form-control" readonly />
<!-- <select id="selectMaterialType" class="form-control m-b select2-multiple" th:with="childList=${@category.getChildByCode('materialType')}" readonly>
<!-- <input name="materialType" class="form-control" readonly />-->
<select disabled id="selectMaterialType" class="form-control m-b select2-multiple" th:with="childList=${@category.getChildByCode('materialType')}" readonly>
<option value=""></option>
</optgroup>
<optgroup th:each="child: ${childList}" th:label="${child.name}" readonly>
<option th:each="childSon: ${child.children}" th:value="${childSon.code}" th:text="${#strings.concat(child.name,'-',childSon.name)}"></option>
</optgroup>
</select>-->
</select>
</div>
<input type="text" readonly id="materialType" name="materialType" hidden />
</div>
<div class="form-group">
<label class="col-sm-3 control-label">加工方式:</label>
<div class="col-sm-8">
<input name="processMethod" class="form-control" type="text" readonly/>
<!-- <select id="selectProcessMethod" name="processMethod" class="form-control m-b" th:with="type=${@dict.getType('processMethod')}" readonly>
<!-- <input name="processMethod" class="form-control" type="text" readonly/>-->
<select disabled id="selectProcessMethod" name="processMethod" class="form-control m-b" th:with="type=${@dict.getType('processMethod')}" readonly>
<option value="" ></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>-->
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">单位:</label>
<div class="col-sm-8">
<input name="unit" class="form-control" type="text" readonly/>
<!-- <select id="selectUnit" name="unit" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_class')}" readonly>
<!-- <input name="unit" class="form-control" type="text" readonly/>-->
<select disabled id="selectUnit" name="unit" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_class')}" readonly>
<option value=""></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>-->
</select>
</div>
</div>
<div class="form-group">
@ -145,9 +146,9 @@
$("input[name='materialName']").val(data.materialName);
$("input[name='brand']").val(data.brand);
$("textarea[name='describe']").val(data.describe);
$("input[name='materialType']").val(data.materialType);
$("input[name='processMethod']").val([data.processMethod]).trigger("change");
$("input[name='unit']").val([data.unit]).trigger("change");
$("#selectMaterialType").val([data.materialType]).trigger("change");
$("#selectProcessMethod").val([data.processMethod]).trigger("change");
$("#selectUnit").val([data.unit]).trigger("change");
});
var options = {
id: 'bootstrap-sub-table-1',
@ -175,17 +176,30 @@
return columnIndex + $.table.serialNumber(index);
}
},
/**{
title: '选择料号',
events: optEvent,
formatter: optFormatter
},*/
{
field: 'level',
align: 'center',
title: '层级',
visible: false,
formatter: function(value, row, index) {
if (value==null){
value = 1;
}
return $.table.selectCategoryLabel(bomLevelSelectDatas, value);
}
},
{
field: 'bomNo',
title: '关联bom号',
visible: false
},
{
field: 'photoUrl',
title: '图片',
visible: false,
formatter: function(value, row, index) {
return $.table.imageView(value);
}
},
{
field: 'materialNo',
@ -323,17 +337,14 @@
row: {
id:rowData.id,
bomNo:rowData.bomNo,
level: 1,
materialNo: rowData.materialNo,
materialName: rowData.materialName,
materialType: rowData.materialType,
describe: rowData.describe,
brand: rowData.brand,
unit: rowData.unit,
processMethod: rowData.processMethod,
unit: rowData.unit,
brand: rowData.brand,
level: "..1",
level: "1",
useNum:'',
lossRate:''
}

363
ruoyi-admin/src/main/resources/templates/erp/bom/bom.html

@ -3,6 +3,7 @@
<head>
<th:block th:include="include :: header('bom列表')" />
<th:block th:include="include :: select2-css" />
<th:block th:include="include :: bootstrap-table-fixed-columns-css" />
</head>
<body class="gray-bg">
<div class="container-div">
@ -49,6 +50,16 @@
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>工程员:</label>
<input type="text" id="createBy" name="createBy"/>
</li>
<li class="select-time">
<label>录入时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/>
</li>
<!--默认查询层级0-->
<input type="text" name="parentId" value="0" hidden/>
<li>
@ -73,7 +84,7 @@
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="erp:bom:export">
<i class="fa fa-download"></i> 导出
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.equals()" shiro:hasPermission="erp:bom:equals">
<a class="btn btn-success" onclick="bomEqulas()" shiro:hasPermission="erp:bom:equals">
<i class="fa fa-edit"></i> bom对比
</a>
</div>
@ -84,6 +95,7 @@
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<th:block th:include="include :: bootstrap-table-fixed-columns-js" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('erp:bom:edit')}]];
var removeFlag = [[${@permission.hasPermi('erp:bom:remove')}]];
@ -108,8 +120,12 @@
cancelUrl: prefix + "/cancel/{id}",
restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export",
fixedColumns:true,
fixedRightNumber:1,
fixedNumber:1,
modalName: "bom",
detailView: true,
//指定父id列
onExpandRow : function(index, row, $detail) {
initChildTable(index, row, $detail);
},
@ -118,16 +134,43 @@
},
{
field: 'id',
title: '主键ID',
visible: false
title: '主键ID'
},
{
field: 'auditStatus',
title: '审核状态',
formatter: function(value, row, index) {
return $.table.selectDictLabel(auditStatusDatas, value);
}
},
{
field: 'useStatus',
title: '使用状态',
formatter: function(value, row, index) {
return $.table.selectDictLabel(useStatusDatas, value);
}
},
{
field: 'bomNo',
title: 'bom号'
title: 'bom号',
formatter:function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value;
}
}
},
{
field: 'materialNo',
title: '关联料号'
title: '关联料号',
formatter:function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value;
}
}
},
{
field: 'photoUrl',
@ -138,7 +181,14 @@
},
{
field: 'materialName',
title: '物料名称'
title: '物料名称',
formatter:function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value;
}
}
},
{
field: 'materialType',
@ -156,52 +206,76 @@
},
{
field: 'unit',
title: '单位'
title: '单位',
formatter:function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value;
}
}
},
{
field: 'brand',
title: '品牌'
title: '品牌',
formatter:function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value;
}
}
},
{
field: 'describe',
title: '描述'
title: '描述',
formatter:function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value;
}
}
},
{
field: 'useNum',
title: '用量'
title: '用量',
formatter:function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value;
}
}
},
{
field: 'lossRate',
title: '损耗率'
title: '损耗率',
formatter:function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
},
{
field: 'parentId',
title: '父级id'
title: '父级id',
visible:false
},
{
field: 'level',
title: '层级',
visible:false,
formatter: function(value, row, index) {
return $.table.selectDictLabel(levelDatas, value);
}
},
{
field: 'sortNo',
title: '排序'
},
{
field: 'auditStatus',
title: '审核状态',
formatter: function(value, row, index) {
return $.table.selectDictLabel(auditStatusDatas, value);
}
},
{
field: 'useStatus',
title: '使用状态',
formatter: function(value, row, index) {
return $.table.selectDictLabel(useStatusDatas, value);
}
title: '排序',
visible: false
},
{
title: '操作',
@ -232,10 +306,12 @@
queryParams : {
parentId: row.id
},
onExpandRow : function(index, row, $detail) {
initChildSonTable(index, row, $detail);
},
columns: [{
field: 'id',
title: '主键id',
visible: false
title: '主键id'
},
{
field: 'level',
@ -264,11 +340,179 @@
},
{
field: 'materialNo',
title: '料号'
title: '料号',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'materialName',
title: '物料名称',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'materialType',
title: '物料类型',
formatter: function(value, row, index) {
return $.table.selectCategoryLabel(materialTypeDatas, value);
}
},
{
field: 'describe',
title: '描述',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'brand',
title: '品牌',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'unit',
title: '单位',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'useNum',
title: '用量',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'processMethod',
title: '加工方式',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
{
field: 'parentId',
title: '父级id',
visible: false,
},
{
field: 'sortNo',
title: '排序',
visible: false
}]
});
};
initChildSonTable = function(index, row, $detail) {
var childSonTable = $detail.html('<table style="table-layout:fixed"></table>').find('table');
$(childSonTable).bootstrapTable({
url: prefix + "/subList",
method: 'post',
detailView: true,
sidePagination: "server",
contentType: "application/x-www-form-urlencoded",
queryParams : {
parentId: row.id
},
onExpandRow : function(index, row, $detail) {
initChildSonTable(index, row, $detail);
},
columns: [{
field: 'id',
title: '主键id'
},
{
field: 'level',
title: '层级',
formatter: function(value, row, index) {
return $.table.selectDictLabel(levelDatas, value);
}
},
{
field: 'bomNo',
title: 'bom号',
formatter:function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value;
}
}
},
{
field: 'photoUrl',
title: '图片',
formatter:function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return $.table.imageView(value);
}
}
},
{
field: 'materialNo',
title: '料号',
formatter:function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value;
}
}
},
{
field: 'materialName',
title: '物料名称'
title: '物料名称',
formatter:function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value;
}
}
},
{
field: 'materialType',
@ -279,24 +523,63 @@
},
{
field: 'describe',
title: '描述'
title: '描述',
formatter:function (value,row,index){
if (value == null || value == ''){
return '/';
}else {
return value;
}
}
},
{
field: 'brand',
title: '品牌'
title: '品牌',
formatter:function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value;
}
}
},
{
field: 'unit',
title: '单位'
title: '单位',
formatter:function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value;
}
}
},
{
field: 'useNum',
title: '用量'
title: '用量',
formatter:function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value;
}
}
},
{
field: 'lossRate',
title: '损耗率'
title: '损耗率',
formatter:function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value;
}
}
},
{
field: 'processMethod',
@ -317,6 +600,14 @@
}]
});
};
function bomEqulas(){
var url = ctx + "erp/bom/equals";
var options = {
title: '打开bom对比',
url: url
};
$.modal.openOptions(options);
}
</script>
</body>
</html>

32
ruoyi-admin/src/main/resources/templates/erp/bom/edit.html

@ -14,48 +14,49 @@
<label class="col-sm-3 control-label">料号:</label>
<div class="col-sm-8">
<input type="text" id="materialNo" name="materialNo" th:field="*{materialNo}" readonly />
<input type="text" class="form-control" id="materialNo" name="materialNo" th:field="*{materialNo}" readonly />
</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" readonly>
<input name="materialName" th:field="*{materialName}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料类型:</label>
<div class="col-sm-8">
<!-- <select id="selectMaterialType" class="form-control m-b select2-multiple" th:with="childList=${@category.getChildByCode('materialType')}" readonly>
<!-- <input type="text" class="form-control" id="materialType" name="materialType" th:field="*{materialType}" readonly/>-->
<select disabled id="selectMaterialType" class="form-control m-b select2-multiple" th:with="childList=${@category.getChildByCode('materialType')}" readonly>
<optgroup>
<option value=""></option>
</optgroup>
<optgroup th:each="child: ${childList}" th:label="${child.name}">
<option th:each="childSon: ${child.children}" th:value="${childSon.code}" th:text="${#strings.concat(child.name,'-',childSon.name)}" th:field="*{materialType}"></option>
</optgroup>
</select> -->
</select>
</div>
<input type="text" id="materialType" name="materialType" th:field="*{materialType}" readonly/>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">加工方式:</label>
<div class="col-sm-8">
<input type="text" name="materialType" th:field="*{processMethod}" readonly/>
<!-- <select name="processMethod" class="form-control m-b" th:with="type=${@dict.getType('processMethod')}" readonly>
<!-- <input type="text" class="form-control" name="materialType" th:field="*{processMethod}" readonly/>-->
<select disabled name="processMethod" class="form-control m-b" th:with="type=${@dict.getType('processMethod')}" readonly>
<option value=""></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{processMethod}"></option>
</select> -->
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">单位:</label>
<div class="col-sm-8">
<input name="unit" th:field="*{unit}" type="text" class="form-control" readonly>
<!-- <select name="unit" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_class')}" readonly>
<!-- <input name="unit" th:field="*{unit}" type="text" class="form-control" readonly>-->
<select disabled name="unit" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_class')}" readonly>
<option value=""></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{unit}"></option>
</select>
-->
</div>
</div>
<div class="form-group">
@ -105,7 +106,6 @@
$("#treeName").val(body.find('#treeName').val());
layer.close(index);
}
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
@ -118,7 +118,6 @@
function submitHandler() {
if ($.validate.form()) {
var formData = $("#form-bom-edit").serializeArray();
console.log("formData",formData);
var tableData = $("#bootstrap-sub-table-1").bootstrapTable('getData');
@ -185,14 +184,12 @@
$('#selMaterialNo').on('select2:select', function (e) {
var data = e.params.data;
$("input[name='materialNo']").val(data.materialNo);
$("input[name='materialName']").val(data.materialName);
$("input[name='brand']").val(data.brand);
$("textarea[name='describe']").val(data.describe);
$("#selectMaterialType").val([data.materialType]).trigger("change");
$("input[name='materialType']").val(data.materialType);
$("input[name='processMethod']").val([data.processMethod]).trigger("change");
$("input[name='unit']").val([data.unit]).trigger("change");
$("#selectProcessMethod").val([data.processMethod]).trigger("change");
$("#selectUnit").val([data.unit]).trigger("change");
});
@ -353,6 +350,7 @@
id:rowData.subId,
materialNo: rowData.materialNo,
bomNo: rowData.bomNo,
level:rowData.level,
materialName: rowData.materialName,
materialType: rowData.materialType,
describe: rowData.describe,

143
ruoyi-admin/src/main/resources/templates/erp/bom/equals.html

@ -0,0 +1,143 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('bom对比')" />
<th:block th:include="include :: select2-css" />
<th:block th:include="include :: bootstrap-editable-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-bom-add">
<div class="form-group">
<label class="col-sm-4 control-label is-required">第一项 bom号:</label>
<div class="col-sm-4">
<select class="form-control m-b select2-multiple" id="bomNo1" name="bomNo" required>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label is-required">第二项 bom号</label>
<div class="col-sm-4">
<select class="form-control m-b select2-multiple" id="bomNo2" name="bomNo" required>
</select>
</div>
<div class="btn-group-sm" id="toolbar" role="row">
<a class="btn btn-success" onclick="seacher()">
<i class="fa fa-plus"></i> 搜索
</a>
<a class="btn btn-danger multiple disabled" onclick="refresh()">
<i class="fa fa-remove"></i> 重置
</a>
</div>
</div>
<div class="col-sm-12">
<div class="row">
<div class="col-xs-6">
<input class="form-control" name="bomNo" id="bom1-t">
</div>
<div class="col-xs-6">
<input class="form-control" name="bomNo" id="bom2-t">
</div>
</div>
<div class="col-xs-12" id="bom-to">
</div>
</div>
<div class="col-sm-12">
<h5 class="form-control">相同项</h5>
<div class="row">
<div class="col-xs-6" id="bom-ton">
</div>
</div>
</div>
<div class="col-sm-12">
<h5 class="form-control">不同项</h5>
<div class="row">
<div class="col-xs-6" id="bom1-dif">
左列内容
</div>
<div class="col-xs-6" id="bom2-dif">
右列内容
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-table-editable-js" />
<th:block th:include="include :: select2-js" />
<script th:inline="javascript">
var prefix = ctx + "erp/bom"
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var bomLevelSelectDatas = [[${@dict.getTypeSelect('bomLevel')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
$("#form-bom-add").validate({
focusCleanup: true
});
$("#bomNo1","#bomNo2").select2({
allowClear: true,
placeholder: "请选择bom",
ajax:{
type: "post",
url:ctx + "erp/bom/list",
dataType:"json",
delay:250,
cache:true,
processResults: function (res, params) {
var resultList = res.rows;
console.log("传输的数值");
console.log(resultList);
var options = [];
for(var i= 0, len=resultList.length;i<len;i++){
var option = resultList[i];
option.id = resultList[i]["bomNo"];
option.text = resultList[i]["bomNo"];
options.push(option);
}
return {
results: options,
pagination: {
// more:res["data"]["more"]
}
};
},
escapeMarkup: function (markup) { return markup; },
// minimumInputLength: 1
}
});
function seacher(){
$.ajax({
url: ctx + "equalsBom",
method:'post',
data:{
bomNo1:$("bomNo1").val(),
bomNo2:$("bomNo2").val()
},
success:function (res){
console.log(res);
for (let i = 0; i < res.data.bomList; i++) {
$('#bom-ton').join('');
}
},
error:function (res){
},
})
}
function refresh(){
$("bomNo1").val('');
$("bomNo2").val('');
}
</script>
</body>
</html>

13
ruoyi-admin/src/main/resources/templates/include.html

@ -13,11 +13,10 @@
<link th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
<!-- bootstrap-table 表格插件样式 -->
<link th:href="@{/ajax/libs/bootstrap-table/bootstrap-table.min.css?v=20210202}" rel="stylesheet"/>
<link th:href="@{/css/animate.css}" rel="stylesheet"/>
<link th:href="@{/css/style.css?v=20200903}" rel="stylesheet"/>
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.6.1}" rel="stylesheet"/>
<link th:src="@{/ajax/libs/bootstrap-table/extensions/fixed-columns/css/bootstrap-table-fixed-columns.css?v=20210202}" />
<!-- <link th:href="@{/css/style2.css}">-->
<!-- <link th:href="@{/fonts/datta/datta-icon.css}">-->
@ -36,8 +35,6 @@
<script th:src="@{/ajax/libs/bootstrap-table/bootstrap-table.min.js?v=20210202}"></script>
<script th:src="@{/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.min.js?v=20210202}"></script>
<script th:src="@{/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js?v=20210202}"></script>
<script th:src="@{/ajax/libs/bootstrap-table/extensions/fixed-columns/js/bootstrap-table-fixed-columns.js?v=20210202}"></script>
<!-- jquery-validate 表单验证插件 -->
<script th:src="@{/ajax/libs/validate/jquery.validate.min.js}"></script>
<script th:src="@{/ajax/libs/validate/messages_zh.min.js}"></script>
@ -51,6 +48,7 @@
<script th:src="@{/ajax/libs/layui/layui.js?v=20210516}"></script>
<script th:src="@{/ruoyi/js/common.js?v=4.6.1}"></script>
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.6.1}"></script>
</div>
<!-- ztree树插件 -->
@ -216,10 +214,15 @@
</div>
<!-- 表格冻结列插件 -->
<div th:fragment="bootstrap-table-fixed-columns-css">
<link th:href="@{/ajax/libs/bootstrap-table/extensions/fixed-columns/css/bootstrap-table-fixed-columns.css}" rel="stylesheet"/>
</div>
<div th:fragment="bootstrap-table-fixed-columns-js">
<script th:src="@{/ajax/libs/bootstrap-table/extensions/fixed-columns/js/bootstrap-table-fixed-columns.js?v=20210202}"></script>
</div>
<div th:fragment="bootstrap-table-fixed-columns-min-js">
<script th:src="@{/ajax/libs/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.min.js?v=20210202}"></script>
</div>
<!-- 表格自动刷新插件 -->
<div th:fragment="bootstrap-table-auto-refresh-js">
<script th:src="@{/ajax/libs/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.min.js?v=20210202}"></script>

52
ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html

@ -2,6 +2,8 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增客户报价')" />
<th:block th:include="include :: select2-css" />
<th:block th:include="include :: bootstrap-editable-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
@ -13,7 +15,7 @@
</div>
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">客户报价编号</label>
<label class="col-sm-3 control-label">业务员</label>
<div class="col-sm-8">
<input name="createBy" class="form-control" type="text" th:value="${@permission.getPrincipalProperty('userName')}" readonly>
</div>
@ -21,8 +23,8 @@
<div class="form-group">
<label class="col-sm-3 control-label">客户编号:</label>
<div class="col-sm-8">
<select name="customerCode" class="form-control m-b">
<option></option>
<select class="form-control" onclick="selMaterialTb()" id="customerCode" name="customerCode" required>
</select>
</div>
</div>
@ -122,14 +124,46 @@
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-table-editable-js" />
<th:block th:include="include :: select2-js" />
<script th:inline="javascript">
var prefix = ctx + "system/customerQuote"
$("#form-customerQuote-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-customerQuote-add').serialize());
var formData = $("#form-bom-add").serializeArray();
console.log("formData",formData);
var tableData = $("#bootstrap-sub-table-1").bootstrapTable('getData');
console.log("tableData",JSON.stringify(tableData))
var rows = tableData.length;
if(rows==0){
$.modal.alertWarning("子表数据不能为空!");
}else{
formData.push({"name": "erpBomList", "value": tableData});
var jsonData = $.common.formDataToJson(formData);
console.log("jsonData");
console.log(jsonData);
$.operate.saveJson(prefix + "/add", jsonData);
}
}
if ($.validate.form()) {
var formData = $('#form-customerQuote-add').serializeArray();
console.log("formData",formData);
var tableData = $("#bootstrap-sub-table-1").bootstrapTable('getData');
console.log("tableData",JSON.stringify(tableData))
var rows = tableData.length;
if(rows==0){
$.modal.alertWarning("子表数据不能为空!");
}else{
formData.push({"name": "customerList", "value": tableData});
var jsonData = $.common.formDataToJson(formData);
console.log("jsonData");
console.log(jsonData);
$.operate.saveJson(prefix + "/add", jsonData);
}
}
}
//获取客户信息
@ -186,13 +220,14 @@
});
$(function() {
var options = {
id:'bootstarp-sub-table-1',
url: ctx + "system/quoteChild/list",
pagination: false,
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
sidePagination: "server",
sidePagination: "client",
columns: [{
checkbox: true
},
@ -205,11 +240,6 @@
return columnIndex + $.table.serialNumber(index);
}
},
/**{
title: '选择料号',
events: optEvent,
formatter: optFormatter
},*/
{
field: 'materialNo',
align: 'center',
@ -356,7 +386,7 @@
}
}]
};
$.table.init(options);
$table.init(options);
});
//获取单号
$.ajax({

7
ruoyi-admin/src/main/resources/templates/system/developReviseOrder/add.html

@ -5,11 +5,14 @@
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-developReviseOrder-add">
<input name="developOdercode" class="form-control" type="text" hidden="hidden">
<h5>添加开发修改单</h5>
<div class="form-group">
<label class="col-sm-3 control-label">开发修改单单号:</label>
<label class="col-sm-3 control-label is-required" >生产单号:</label>
<div class="col-sm-8">
<input name="developOdercode" class="form-control" type="text">
<input name="developOdercode" class="form-control" type="text" re>
</div>
</div>
<div class="form-group">

141
ruoyi-admin/src/main/resources/templates/system/makeorder/add.html

@ -0,0 +1,141 @@
<!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-makeorder-add">
<div class="form-group">
<label class="col-sm-3 control-label">生产状态:</label>
<div class="col-sm-8">
<select name="makeStatus" class="form-control m-b" th:with="type=${@dict.getType('sys_erp_makeStatus')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库状态:</label>
<div class="col-sm-8">
<select name="eceiptStatus" class="form-control m-b" th:with="type=${@dict.getType('eceiptStatus')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">品质状态:</label>
<div class="col-sm-8">
<select name="qualityStatus" class="form-control m-b" th:with="type=${@dict.getType('qualityStatus')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">使用状态:</label>
<div class="col-sm-8">
<select name="useStatus" class="form-control m-b" th:with="type=${@dict.getType('useStatus')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">生产订单号:</label>
<div class="col-sm-8">
<input name="makeNo" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">关联销售订单号:</label>
<div class="col-sm-8">
<input name="saleNo" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">业务员:</label>
<div class="col-sm-8">
<input name="Salesman" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户ID:</label>
<div class="col-sm-8">
<input name="customerId" 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="customerName" 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="customerOderCode" 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="material" 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="materialSum" 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="finishNum" 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="eceiptNum" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">不含税生产成本(RMB):</label>
<div class="col-sm-8">
<input name="noRate" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">含税生产成本(RMB):</label>
<div class="col-sm-8">
<input name="rate" 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="remark" 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="delFlag" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/makeorder"
$("#form-makeorder-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-makeorder-add').serialize());
}
}
</script>
</body>
</html>

136
ruoyi-admin/src/main/resources/templates/system/makeorder/edit.html

@ -0,0 +1,136 @@
<!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-makeorder-edit" th:object="${sysMakeOrder}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">生产状态:</label>
<div class="col-sm-8">
<select name="makeStatus" class="form-control m-b" th:with="type=${@dict.getType('sys_erp_makeStatus')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{makeStatus}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库状态:</label>
<div class="col-sm-8">
<select name="eceiptStatus" class="form-control m-b" th:with="type=${@dict.getType('eceiptStatus')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{eceiptStatus}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">品质状态:</label>
<div class="col-sm-8">
<select name="qualityStatus" class="form-control m-b" th:with="type=${@dict.getType('qualityStatus')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{qualityStatus}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">使用状态:</label>
<div class="col-sm-8">
<select name="useStatus" class="form-control m-b" th:with="type=${@dict.getType('useStatus')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{useStatus}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">生产订单号:</label>
<div class="col-sm-8">
<input name="makeNo" th:field="*{makeNo}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">关联销售订单号:</label>
<div class="col-sm-8">
<input name="saleNo" th:field="*{saleNo}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">业务员:</label>
<div class="col-sm-8">
<input name="Salesman" th:field="*{Salesman}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户ID:</label>
<div class="col-sm-8">
<input name="customerId" th:field="*{customerId}" 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="customerName" th:field="*{customerName}" 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="customerOderCode" th:field="*{customerOderCode}" 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="material" th:field="*{material}" 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="materialSum" th:field="*{materialSum}" 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="finishNum" th:field="*{finishNum}" 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="eceiptNum" th:field="*{eceiptNum}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">不含税生产成本(RMB):</label>
<div class="col-sm-8">
<input name="noRate" th:field="*{noRate}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">含税生产成本(RMB):</label>
<div class="col-sm-8">
<input name="rate" th:field="*{rate}" 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="remark" th:field="*{remark}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/makeorder";
$("#form-makeorder-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-makeorder-edit').serialize());
}
}
</script>
</body>
</html>

229
ruoyi-admin/src/main/resources/templates/system/makeorder/makeorder.html

@ -0,0 +1,229 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('生产订单列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>生产状态:</label>
<select name="makeStatus" th:with="type=${@dict.getType('sys_erp_makeStatus')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>入库状态:</label>
<select name="eceiptStatus" th:with="type=${@dict.getType('eceiptStatus')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>品质状态:</label>
<select name="qualityStatus" th:with="type=${@dict.getType('qualityStatus')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>使用状态:</label>
<select name="useStatus" th:with="type=${@dict.getType('useStatus')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>生产订单号:</label>
<input type="text" name="makeNo"/>
</li>
<li>
<label>关联销售订单号:</label>
<input type="text" name="saleNo"/>
</li>
<li>
<label>业务员:</label>
<input type="text" name="Salesman"/>
</li>
<li>
<label>客户ID:</label>
<input type="text" name="customerId"/>
</li>
<li>
<label>客户名称:</label>
<input type="text" name="customerName"/>
</li>
<li>
<label>客户订单号:</label>
<input type="text" name="customerOderCode"/>
</li>
<li class="select-time">
<label>录入时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:makeorder:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:makeorder:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:makeorder:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:makeorder: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:makeorder:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:makeorder:remove')}]];
var cancelFlag = [[${@permission.hasPermi('system:makeorder:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('system:makeorder:restore')}]];
var makeStatusDatas = [[${@dict.getType('sys_erp_makeStatus')}]];
var eceiptStatusDatas = [[${@dict.getType('eceiptStatus')}]];
var qualityStatusDatas = [[${@dict.getType('qualityStatus')}]];
var useStatusDatas = [[${@dict.getType('useStatus')}]];
var prefix = ctx + "system/makeorder";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
cancelUrl: prefix + "/cancel/{id}",
restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export",
modalName: "生产订单",
columns: [{
checkbox: true
},
{
field: 'id',
title: '生产订单id',
visible: false
},
{
field: 'makeStatus',
title: '生产状态',
formatter: function(value, row, index) {
return $.table.selectDictLabel(makeStatusDatas, value);
}
},
{
field: 'eceiptStatus',
title: '入库状态',
formatter: function(value, row, index) {
return $.table.selectDictLabel(eceiptStatusDatas, value);
}
},
{
field: 'qualityStatus',
title: '品质状态',
formatter: function(value, row, index) {
return $.table.selectDictLabel(qualityStatusDatas, value);
}
},
{
field: 'useStatus',
title: '使用状态',
formatter: function(value, row, index) {
return $.table.selectDictLabel(useStatusDatas, value);
}
},
{
field: 'makeNo',
title: '生产订单号'
},
{
field: 'saleNo',
title: '关联销售订单号'
},
{
field: 'Salesman',
title: '业务员'
},
{
field: 'customerId',
title: '客户ID'
},
{
field: 'customerName',
title: '客户名称'
},
{
field: 'customerOderCode',
title: '客户订单号'
},
{
field: 'material',
title: '物料合计'
},
{
field: 'materialSum',
title: '数量合计'
},
{
field: 'finishNum',
title: '已完成数量'
},
{
field: 'eceiptNum',
title: '已入库数量'
},
{
field: 'noRate',
title: '不含税生产成本(RMB)'
},
{
field: 'rate',
title: '含税生产成本(RMB)'
},
{
field: 'remark',
title: '备注'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
if(row.delFlag == '0'){
actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i>作废</a> ');
}else{
actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i>恢复</a> ');
}
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

73
ruoyi-admin/src/main/resources/templates/system/model/add.html

@ -0,0 +1,73 @@
<!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-model-add">
<div class="form-group">
<label class="col-sm-3 control-label">产品型号ID:</label>
<div class="col-sm-8">
<input name="Pcode" 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="equipModel" 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="equipName" 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="specification" 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="differences" 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="remark" 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="udpateBy" 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="photoUrl" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/model"
$("#form-model-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-model-add').serialize());
}
}
</script>
</body>
</html>

74
ruoyi-admin/src/main/resources/templates/system/model/edit.html

@ -0,0 +1,74 @@
<!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-model-edit" th:object="${sysProductModel}">
<input name="Pid" th:field="*{Pid}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">产品型号ID:</label>
<div class="col-sm-8">
<input name="Pcode" th:field="*{Pcode}" 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="equipModel" th:field="*{equipModel}" 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="equipName" th:field="*{equipName}" 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="specification" th:field="*{specification}" 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="differences" th:field="*{differences}" 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="remark" th:field="*{remark}" 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="udpateBy" th:field="*{udpateBy}" 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="photoUrl" th:field="*{photoUrl}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/model";
$("#form-model-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-model-edit').serialize());
}
}
</script>
</body>
</html>

161
ruoyi-admin/src/main/resources/templates/system/model/model.html

@ -0,0 +1,161 @@
<!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>产品型号ID:</label>
<input type="text" name="Pcode"/>
</li>
<li>
<label>工程员:</label>
<input type="text" name="createBy"/>
</li>
<li>
<label>设备型号:</label>
<input type="text" name="equipModel"/>
</li>
<li>
<label>设备名称:</label>
<input type="text" name="equipName"/>
</li>
<li>
<label>规格说明:</label>
<input type="text" name="specification"/>
</li>
<li>
<label>差异说明:</label>
<input type="text" name="differences"/>
</li>
<li class="select-time">
<label>录入时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/>
</li>
<li>
<label>更新人:</label>
<input type="text" name="udpateBy"/>
</li>
<li>
<label>图片地址:</label>
<input type="text" name="photoUrl"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:model:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:model:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:model:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:model: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:model:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:model:remove')}]];
var cancelFlag = [[${@permission.hasPermi('system:model:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('system:model:restore')}]];
var prefix = ctx + "system/model";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
cancelUrl: prefix + "/cancel/{id}",
restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export",
modalName: "产品型号管理",
columns: [{
checkbox: true
},
{
field: 'Pid',
title: '产品型号管理表id',
visible: false
},
{
field: 'Pcode',
title: '产品型号ID'
},
{
field: 'createBy',
title: '工程员'
},
{
field: 'equipModel',
title: '设备型号'
},
{
field: 'equipName',
title: '设备名称'
},
{
field: 'specification',
title: '规格说明'
},
{
field: 'differences',
title: '差异说明'
},
{
field: 'remark',
title: '备注'
},
{
field: 'udpateBy',
title: '更新人'
},
{
field: 'photoUrl',
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.Pid + '\')"><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.Pid + '\')"><i class="fa fa-remove"></i>删除</a> ');
if(row.delFlag == '0'){
actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i>作废</a> ');
}else{
actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i>恢复</a> ');
}
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

79
ruoyi-admin/src/main/resources/templates/system/picking/add.html

@ -0,0 +1,79 @@
<!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-picking-add">
<div class="form-group">
<label class="col-sm-3 control-label">领料单号:</label>
<div class="col-sm-8">
<input name="pickNo" 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="pickStaus" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">关联销售单号:</label>
<div class="col-sm-8">
<input name="saleNo" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">类型:</label>
<div class="col-sm-8">
<input name="types" 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="materialM" 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="materialSum" 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="opers" 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="remark" 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="pickBy" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/picking"
$("#form-picking-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-picking-add').serialize());
}
}
</script>
</body>
</html>

68
ruoyi-admin/src/main/resources/templates/system/picking/edit.html

@ -0,0 +1,68 @@
<!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-picking-edit" th:object="${sysPicking}">
<input name="pickId" th:field="*{pickId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">领料单号:</label>
<div class="col-sm-8">
<input name="pickNo" th:field="*{pickNo}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">关联销售单号:</label>
<div class="col-sm-8">
<input name="saleNo" th:field="*{saleNo}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">类型:</label>
<div class="col-sm-8">
<input name="types" th:field="*{types}" 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="materialM" th:field="*{materialM}" 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="materialSum" th:field="*{materialSum}" 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="remark" th:field="*{remark}" 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="pickBy" th:field="*{pickBy}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/picking";
$("#form-picking-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-picking-edit').serialize());
}
}
</script>
</body>
</html>

161
ruoyi-admin/src/main/resources/templates/system/picking/picking.html

@ -0,0 +1,161 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('开发修改单领料列表列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>领料单号:</label>
<input type="text" name="pickNo"/>
</li>
<li>
<label>领料员:</label>
<input type="text" name="createBy"/>
</li>
<li>
<label>关联销售单号:</label>
<input type="text" name="saleNo"/>
</li>
<li class="select-time">
<label>录入时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/>
</li>
<li>
<label>操作:</label>
<input type="text" name="opers"/>
</li>
<li>
<label></label>
<input type="text" name="pickBy"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:picking:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:picking:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:picking:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:picking: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:picking:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:picking:remove')}]];
var cancelFlag = [[${@permission.hasPermi('system:picking:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('system:picking:restore')}]];
var prefix = ctx + "system/picking";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
cancelUrl: prefix + "/cancel/{id}",
restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export",
modalName: "开发修改单领料列表",
columns: [{
checkbox: true
},
{
field: 'pickId',
title: '领料单id',
visible: false
},
{
field: 'pickNo',
title: '领料单号'
},
{
field: 'pickStaus',
title: '领料状态'
},
{
field: 'createBy',
title: '领料员'
},
{
field: 'saleNo',
title: '关联销售单号'
},
{
field: 'types',
title: '类型'
},
{
field: 'materialM',
title: '物料合计'
},
{
field: 'materialSum',
title: '合计量'
},
{
field: 'createTime',
title: '录入时间'
},
{
field: 'updateBy',
title: '更新人'
},
{
field: 'updateTime',
title: '上次更新时间'
},
{
field: 'opers',
title: '操作'
},
{
field: 'remark',
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.pickId + '\')"><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.pickId + '\')"><i class="fa fa-remove"></i>删除</a> ');
if(row.delFlag == '0'){
actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i>作废</a> ');
}else{
actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i>恢复</a> ');
}
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>
Loading…
Cancel
Save