Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dev
zhangsiqi 4 months ago
parent
commit
356d29bca6
  1. 106
      ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpInboundOrderController.java
  2. 78
      ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityOrderController.java
  3. 12
      ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityOrder.java
  4. 13
      ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityOrderDetail.java
  5. 4
      ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityOrderMapper.java
  6. 12
      ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityOrderService.java
  7. 129
      ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderServiceImpl.java
  8. 16
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeOrderController.java
  9. 6
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMakeorderPickDetail.java
  10. 5
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysMakeOrderService.java
  11. 135
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMakeOrderServiceImpl.java
  12. 2
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseStorageOrderController.java
  13. 6
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseOutOrderDetailMapper.java
  14. 10
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseStorageOrderService.java
  15. 77
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java
  16. 116
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java
  17. 5
      ruoyi-admin/src/main/resources/mapper/quality/QualityOrderDetailMapper.xml
  18. 43
      ruoyi-admin/src/main/resources/mapper/quality/QualityOrderMapper.xml
  19. 9
      ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderDetailMapper.xml
  20. 14
      ruoyi-admin/src/main/resources/templates/erp/inboundOrder/add.html
  21. 56
      ruoyi-admin/src/main/resources/templates/erp/inboundOrder/inboundOrder.html
  22. 207
      ruoyi-admin/src/main/resources/templates/erp/inboundOrder/inboundOrderDetail.html
  23. 14
      ruoyi-admin/src/main/resources/templates/erp/inboundOrder/processInboundDetail.html
  24. 14
      ruoyi-admin/src/main/resources/templates/erp/inboundOrder/produceInboundDetail.html
  25. 8
      ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeInOrderReport.html
  26. 1
      ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeInStartingQuality.html
  27. 2
      ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeInStartingQualityDetail.html
  28. 311
      ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeOrderReport.html
  29. 255
      ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeStartingQuality.html
  30. 25
      ruoyi-admin/src/main/resources/templates/quality/qualityOrder/qualityOrder.html
  31. 21
      ruoyi-admin/src/main/resources/templates/system/makeorder/addProduceInbound.html
  32. 7
      ruoyi-admin/src/main/resources/templates/system/makeorder/addpick.html
  33. 14
      ruoyi-admin/src/main/resources/templates/system/makeorder/bmps.html
  34. 14
      ruoyi-admin/src/main/resources/templates/system/makeorder/bmzgqr.html
  35. 14
      ruoyi-admin/src/main/resources/templates/system/makeorder/detail.html
  36. 14
      ruoyi-admin/src/main/resources/templates/system/makeorder/gcsh.html
  37. 14
      ruoyi-admin/src/main/resources/templates/system/makeorderpick/detail.html
  38. 14
      ruoyi-admin/src/main/resources/templates/system/makeorderpick/edit.html
  39. 14
      ruoyi-admin/src/main/resources/templates/system/makeorderpick/taskModifyApply.html
  40. 14
      ruoyi-admin/src/main/resources/templates/system/makeorderpick/taskScjlVerify.html
  41. 14
      ruoyi-admin/src/main/resources/templates/system/makeorderpick/taskSczgVerify.html

106
ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpInboundOrderController.java

@ -62,9 +62,8 @@ public class ErpInboundOrderController extends BaseController
public TableDataInfo list(QualityOrder qualityOrder)
{
startPage();
List<QualityOrder> list = qualityOrderService.selectQualityOrderList(qualityOrder);
List<QualityOrder> qualityOrderList = list.stream().filter(q -> q.getQualityStorageStatus().equals("1") || q.getQualityStorageStatus().equals("4")).collect(Collectors.toList());
return getDataTable(qualityOrderList);
List<QualityOrder> list = qualityOrderService.selectAllMakeQualityOrderList(qualityOrder);
return getDataTable(list);
}
/**
@ -76,10 +75,9 @@ public class ErpInboundOrderController extends BaseController
@ResponseBody
public AjaxResult export(QualityOrder qualityOrder)
{
List<QualityOrder> list = qualityOrderService.selectQualityOrderList(qualityOrder);
List<QualityOrder> list = qualityOrderService.selectAllMakeQualityOrderList(qualityOrder);
ExcelUtil<QualityOrder> util = new ExcelUtil<QualityOrder>(QualityOrder.class);
List<QualityOrder> qualityOrderList = list.stream().filter(q -> q.getQualityStorageStatus().equals("1") || q.getQualityStorageStatus().equals("4")).collect(Collectors.toList());
return util.exportExcel(qualityOrderList, "入库单数据");
return util.exportExcel(list, "入库单数据");
}
/**
@ -127,55 +125,67 @@ public class ErpInboundOrderController extends BaseController
}
// /**
// * 委内入库单详情页面
// */
// @GetMapping("/detail/{qualityOrderId}")
// public String detail(@PathVariable("qualityOrderId") Long qualityOrderId, ModelMap mmap)
// {
// QualityOrder qualityOrder = qualityOrderService.selectQualityOrderById(qualityOrderId);
// mmap.put("qualityOrder", qualityOrder);
// return prefix + "/edit";
// }
@GetMapping("/detail/{id}")
public String detail(@PathVariable("id") Long id, ModelMap mmap)
/**
* 委内入库单详情页面
*/
@GetMapping("/inboundOrderDetail/{qualityOrderId}")
public String inboundOrderDetail(@PathVariable("qualityOrderId") Long qualityOrderId, ModelMap mmap)
{
mmap.put("currentUser", ShiroUtils.getSysUser());
ErpInboundOrder erpInboundOrder = erpInboundOrderService.selectErpInboundOrderById(id);
String inboundType = erpInboundOrder.getInboundType();
mmap.put("erpInboundOrder", erpInboundOrder);
// 生产入库
if("0".equals(inboundType)){
return prefix + "/produceInboundDetail";
}
// 委内入库
else if("1".equals(inboundType)){
return prefix + "/processInboundDetail";
}
return "";
QualityOrder qualityOrder = qualityOrderService.selectQualityOrderById(qualityOrderId);
mmap.put("qualityOrder", qualityOrder);
return prefix + "/inboundOrderDetail";
}
@GetMapping("/detailEquipmentResume")
public String detailEquipmentResume(@RequestParam("curIndex")Integer curIndex
,@RequestParam("makeNo")String makeNo
,@RequestParam("saleNo")String saleNo
,@RequestParam("materialNo")String materialNo
,@RequestParam("inboundOrderNo")String inboundOrderNo, ModelMap mmap)
/**
* 委内入库单详情页面
*/
@ResponseBody
@GetMapping("/inboundOrderDetail")
public AjaxResult inboundOrderDetailSave(QualityOrder qualityOrder)
{
SysEquipMaterialDto equipMaterialDto = new SysEquipMaterialDto();
mmap.put("currentUser", ShiroUtils.getSysUser());
SysSalesOrderChild salesOrderChild = salesOrderChildService.selectOneByQuoteIdAndMaterialCode(saleNo, materialNo);
BeanUtils.copyProperties(salesOrderChild,equipMaterialDto);
equipMaterialDto.setMakeNo(makeNo);
equipMaterialDto.setCurIndex(curIndex);
equipMaterialDto.setInboundOrderNo(inboundOrderNo);
mmap.put("equipMaterial", equipMaterialDto);
return prefix + "/equipmentResumeDetail";
return toAjax(qualityOrderService.qualityOrderDetailSave(qualityOrder));
}
// @GetMapping("/detail/{id}")
// public String detail(@PathVariable("id") Long id, ModelMap mmap)
// {
// mmap.put("currentUser", ShiroUtils.getSysUser());
// ErpInboundOrder erpInboundOrder = erpInboundOrderService.selectErpInboundOrderById(id);
// String inboundType = erpInboundOrder.getInboundType();
// mmap.put("erpInboundOrder", erpInboundOrder);
// // 生产入库
// if("0".equals(inboundType)){
// return prefix + "/produceInboundDetail";
// }
// // 委内入库
// else if("1".equals(inboundType)){
// return prefix + "/processInboundDetail";
// }
// return "";
// }
//
// @GetMapping("/detailEquipmentResume")
// public String detailEquipmentResume(@RequestParam("curIndex")Integer curIndex
// ,@RequestParam("makeNo")String makeNo
// ,@RequestParam("saleNo")String saleNo
// ,@RequestParam("materialNo")String materialNo
// ,@RequestParam("inboundOrderNo")String inboundOrderNo, ModelMap mmap)
// {
// SysEquipMaterialDto equipMaterialDto = new SysEquipMaterialDto();
// mmap.put("currentUser", ShiroUtils.getSysUser());
// SysSalesOrderChild salesOrderChild = salesOrderChildService.selectOneByQuoteIdAndMaterialCode(saleNo, materialNo);
// BeanUtils.copyProperties(salesOrderChild,equipMaterialDto);
// equipMaterialDto.setMakeNo(makeNo);
// equipMaterialDto.setCurIndex(curIndex);
// equipMaterialDto.setInboundOrderNo(inboundOrderNo);
// mmap.put("equipMaterial", equipMaterialDto);
// return prefix + "/equipmentResumeDetail";
// }

78
ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityOrderController.java

@ -265,7 +265,7 @@ public class QualityOrderController extends BaseController
/**
* 委内加工品质单开始品质 物料相关信息
* 委内加工品质单开始品质 物料相关信息 生产订单也适用
*/
@PostMapping("/getMaterialListByQualityOrderCode")
@ResponseBody
@ -303,4 +303,80 @@ public class QualityOrderController extends BaseController
}
/*1111111111*/
/**
* 生产入库品质单开始品质
*/
@GetMapping("/makeStartingQuality/{qualityOrderId}")
public String makeStartingQuality(@PathVariable("qualityOrderId") Long qualityOrderId, ModelMap mmap)
{
QualityOrder qualityOrder = qualityOrderService.selectQualityOrderById(qualityOrderId);
mmap.put("qualityOrder", qualityOrder);
return prefix + "/makeStartingQuality";
}
/**
* 修改保存生产入库品质单开始品质
*/
@RequiresPermissions("quality:qualityOrder:makeStartingQuality")
@Log(title = "品质管理品质单", businessType = BusinessType.UPDATE)
@PostMapping("/makeStartingQuality")
@ResponseBody
public AjaxResult makeStartingQualitySave(@RequestBody QualityOrder qualityOrder)
{
return toAjax(qualityOrderService.updateMakeStartingQuality(qualityOrder));
}
/**
* 生产入库品质单开始品质列表详情接口
*/
@GetMapping("/makeStartingQualityDetail/{qualityOrderId}")
public String makeStartingQualityDetail(@PathVariable("qualityOrderId") Long qualityOrderId, ModelMap mmap)
{
QualityOrder qualityOrder = qualityOrderService.selectQualityOrderById(qualityOrderId);
mmap.put("qualityOrder", qualityOrder);
return prefix + "/makeInStartingQualityDetail";
}
/**
* 修改保存生产入库品质单开始品质详情
*/
@RequiresPermissions("quality:qualityOrder:makeStartingQualityDetail")
@Log(title = "品质管理品质单", businessType = BusinessType.UPDATE)
@PostMapping("/makeStartingQualityDetail")
@ResponseBody
public AjaxResult makeStartingQualityDetailSave(QualityOrder qualityOrder)
{
return toAjax(qualityOrderService.qualityOrderDetailSave(qualityOrder));
}
/**
* 修改委生产入库品质报告按钮
*/
@GetMapping("/makeOrderReport")
public String makeOrderReport( @RequestParam("materialNo") String materialNo,
@RequestParam("qualityOrderCode") String qualityOrderCode,
ModelMap mmap)
{
QualityOrderReport qualityOrderReport = orderReportService.selectMakeInOrderReportByNoAndCode(materialNo,qualityOrderCode);
mmap.put("qualityOrderReport", qualityOrderReport);
mmap.put("qualityOrderCode",qualityOrderCode);
return prefix + "/makeOrderReport";
}
/**
* 修改保存生产入库品质报告按钮
*/
@Log(title = "品质管理品质单", businessType = BusinessType.UPDATE)
@PostMapping("/makeOrderReport")
@ResponseBody
public AjaxResult makeOrderReportSave(@RequestBody QualityOrderReport qualityOrderReport)
{
return toAjax(orderReportService.updateMakeInOrderReport(qualityOrderReport));
}
}

12
ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityOrder.java

@ -59,6 +59,9 @@ public class QualityOrder extends BaseEntity
@Excel(name = "品质不合格数")
private Integer qualityUnqualifiedNum;
/** 入库数 */
private Integer storageNum;
/** 委内加工费总价 */
private BigDecimal makeInTotalPrice;
@ -224,6 +227,14 @@ public class QualityOrder extends BaseEntity
this.qualityOrderDetailList = qualityOrderDetailList;
}
public Integer getStorageNum() {
return storageNum;
}
public void setStorageNum(Integer storageNum) {
this.storageNum = storageNum;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -248,6 +259,7 @@ public class QualityOrder extends BaseEntity
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("storageNum",getStorageNum())
.toString();
}
}

13
ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityOrderDetail.java

@ -118,6 +118,9 @@ public class QualityOrderDetail extends BaseEntity
@Excel(name = "生产订单数")
private Integer makeTotal;
/** 生产完成数 */
private Integer makeCompletionNum;
/** 实际到货数量 */
@Excel(name = "实际到货数量")
private Integer actualArriveNum;
@ -362,6 +365,15 @@ public class QualityOrderDetail extends BaseEntity
this.makeTotal = makeTotal;
}
public Integer getMakeCompletionNum() {
return makeCompletionNum;
}
public void setMakeCompletionNum(Integer makeCompletionNum) {
this.makeCompletionNum = makeCompletionNum;
}
public Integer getActualArriveNum() {
return actualArriveNum;
}
@ -460,6 +472,7 @@ public class QualityOrderDetail extends BaseEntity
.append("qualityQualifiedNum", getQualityQualifiedNum())
.append("qualityUnqualifiedNum", getQualityUnqualifiedNum())
.append("makeInNum",getMakeInNum())
.append("makeCompletionNum",getMakeCompletionNum())
.append("makeInUnitPrice",getMakeInUnitPrice())
.append("remark", getRemark())
.append("createBy", getCreateBy())

4
ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityOrderMapper.java

@ -85,4 +85,8 @@ public interface QualityOrderMapper
*/
public QualityOrder selectQualityOrderByCode(String qualityOrderCode);
/**
* 生产入库和委内入库相关品质单数据
* */
List<QualityOrder> selectAllMakeQualityOrderList(QualityOrder qualityOrder);
}

12
ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityOrderService.java

@ -78,7 +78,7 @@ public interface IQualityOrderService
int restoreQualityOrderById(Long qualityOrderId);
/*
*
* 仓库->品质
* */
void insertQualityOrderByWarehouseStorageOrder(WarehouseStorageOrder warehouseStorageOrder, List<WarehouseStorageOrderDetail> warehouseStorageOrderDetailList);
@ -96,4 +96,14 @@ public interface IQualityOrderService
* 品质单详情通用保存方法
* */
int qualityOrderDetailSave(QualityOrder qualityOrder);
/**
* 生产入库和委内入库相关品质单数据
* */
List<QualityOrder> selectAllMakeQualityOrderList(QualityOrder qualityOrder);
/**
* 修改保存生产入库品质单开始品质
*/
int updateMakeStartingQuality(QualityOrder qualityOrder);
}

129
ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderServiceImpl.java

@ -349,6 +349,7 @@ public class QualityOrderServiceImpl implements IQualityOrderService
//根据品质单号从数据库查询 用于更新入库单
QualityOrder tempQualityOrder = qualityOrderMapper.selectQualityOrderByCode(qualityOrder.getQualityOrderCode());
tempQualityOrder.setWarehouseCode(warehouseStorageCode);
String qualityStatus = tempQualityOrder.getQualityStatus();
String qualityStorageStatus = tempQualityOrder.getQualityStorageStatus();
@ -413,6 +414,7 @@ public class QualityOrderServiceImpl implements IQualityOrderService
tempQualityOrder.setQualityUnqualifiedNum(qualityUnqualifiedNumSum);
tempQualityOrder.setThisArrivedNum(thisArrivedNumSum);
//数据生成到入库单中,后续进行入库操作
int updateStorageOrderResult = warehouseStorageOrderService.insertWarehouseStorageOrderByMakeInQualityOrder(tempQualityOrder, qualityOrderDetailList);
if (updateStorageOrderResult <= 0){
@ -449,6 +451,133 @@ public class QualityOrderServiceImpl implements IQualityOrderService
return 1;
}
/**
* 生产入库和委内入库相关品质单数据
* */
@Override
public List<QualityOrder> selectAllMakeQualityOrderList(QualityOrder qualityOrder) {
return qualityOrderMapper.selectAllMakeQualityOrderList(qualityOrder);
}
/**
* 修改保存生产入库品质单开始品质
*/
@Override
public int updateMakeStartingQuality(QualityOrder qualityOrder) {
String loginName = ShiroUtils.getLoginName();
qualityOrder.setUpdateBy(loginName);
qualityOrder.setUpdateTime(new Date());
qualityOrder.setQualityEmployee(loginName);
//生成入库单号
String warehouseStorageCode = redisCache.generateBillNo("RK");
qualityOrder.setInStorageCode(warehouseStorageCode);
List<QualityOrderDetail> qualityOrderDetailList = qualityOrder.getQualityOrderDetailList();
if (CollectionUtils.isEmpty(qualityOrderDetailList)){
throw new BusinessException("品质单详情数据为空");
}
for (QualityOrderDetail qualityOrderDetail : qualityOrderDetailList) {
qualityOrderDetail.setUpdateBy(loginName);
qualityOrderDetail.setUpdateTime(new Date());
Long qualityOrderDetailId = qualityOrderDetail.getQualityOrderDetailId();
QualityOrderDetail tempQualityOrderDetail = orderDetailMapper.selectQualityOrderDetailById(qualityOrderDetailId);
Integer qualifiedNum = tempQualityOrderDetail.getQualityQualifiedNum();
Integer unqualifiedNum = tempQualityOrderDetail.getQualityUnqualifiedNum();
if (qualifiedNum == null || unqualifiedNum == null){
throw new BusinessException("请先进行品质报告操作");
}
//更新品质单详情数据
int updateQualityOrderDetailResult = orderDetailMapper.updateQualityOrderDetail(qualityOrderDetail);
if (updateQualityOrderDetailResult <= 0){
throw new BusinessException("更新品质单详情数据失败");
}
}
//根据品质单号从数据库查询 用于更新入库单
QualityOrder tempQualityOrder = qualityOrderMapper.selectQualityOrderByCode(qualityOrder.getQualityOrderCode());
tempQualityOrder.setWarehouseCode(warehouseStorageCode);
String qualityStatus = tempQualityOrder.getQualityStatus();
String qualityStorageStatus = tempQualityOrder.getQualityStorageStatus();
Integer thisArrivedNumSum = 0;
Integer qualityQualifiedNumSum = 0;
Integer qualityUnqualifiedNumSum = 0;
// 检查thisArrivedNum是否含有null值
boolean hasThisArrivedNumNull = qualityOrderDetailList.stream()
.anyMatch(item -> item.getThisArrivedNum() == null);
// 检查qualityQualifiedNum是否含有null值
boolean hasQualityQualifiedNumNull = qualityOrderDetailList.stream()
.anyMatch(item -> item.getQualityQualifiedNum() == null);
// 检查qualityUnqualifiedNum是否含有null值
boolean hasQualityUnqualifiedNumNull = qualityOrderDetailList.stream()
.anyMatch(item -> item.getQualityUnqualifiedNum() == null);
if (hasThisArrivedNumNull) {
throw new BusinessException("存在本次到货数为空,请检查!");
}
if (hasQualityQualifiedNumNull) {
throw new BusinessException("存在品质已合格数为空,请检查!");
}
if (hasQualityUnqualifiedNumNull) {
throw new BusinessException("存在品质不合格数为空,请检查!");
}
// 计算各个字段的总和
thisArrivedNumSum = qualityOrderDetailList.stream()
.mapToInt(QualityOrderDetail::getThisArrivedNum)
.sum();
qualityQualifiedNumSum = qualityOrderDetailList.stream()
.mapToInt(QualityOrderDetail::getQualityQualifiedNum)
.sum();
qualityUnqualifiedNumSum = qualityOrderDetailList.stream()
.mapToInt(QualityOrderDetail::getQualityUnqualifiedNum)
.sum();
//插入主表中本次到货数
qualityOrder.setThisArrivedNum(thisArrivedNumSum);
//插入主表中品质合格数
qualityOrder.setQualityQualifiedNum(qualityQualifiedNumSum);
//插入主表中品质不合格数
qualityOrder.setQualityUnqualifiedNum(qualityUnqualifiedNumSum);
// if (thisArrivedNum == qualityQualifiedNum){
//全部品质
qualityOrder.setQualityStatus("2");
tempQualityOrder.setQualityStatus("2");
// }else {
// //部分品质
// qualityOrder.setQualityStatus("1");
// tempQualityOrder.setQualityStatus("1");
// }
//如果品质时修改交检时间
tempQualityOrder.setDeliveryInspectionTime(qualityOrder.getDeliveryInspectionTime());
tempQualityOrder.setQualityQualifiedNum(qualityQualifiedNumSum);
tempQualityOrder.setQualityUnqualifiedNum(qualityUnqualifiedNumSum);
tempQualityOrder.setThisArrivedNum(thisArrivedNumSum);
//数据生成到入库单中,后续进行入库操作
int updateStorageOrderResult = warehouseStorageOrderService.insertWarehouseStorageOrderByMakeQualityOrder(tempQualityOrder, qualityOrderDetailList);
if (updateStorageOrderResult <= 0){
throw new BusinessException("更新入库单数据失败");
}
int updateResult = qualityOrderMapper.updateQualityOrder(qualityOrder);
if (updateResult <= 0){
log.warn("更新品质单失败,未影响任何行");
}
return updateResult;
}
//品质单不合格分类表
private void insertQualityOrderUnqualifiedByWarehouseStorageOrder(WarehouseStorageOrderDetail warehouseStorageOrderDetail) {
QualityOrderReportUnqualified qualityOrderReportUnqualified = new QualityOrderReportUnqualified();

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

@ -13,6 +13,7 @@ import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.erp.domain.ErpInboundOrder;
import com.ruoyi.erp.service.IErpMaterialService;
import com.ruoyi.financial.domain.FinancialReceivables;
import com.ruoyi.financial.domain.FinancialReceivablesRecords;
@ -198,6 +199,21 @@ public class SysMakeOrderController extends BaseController
return prefix + "/addProduceInbound";
}
/**
* 添加修改 创建生产入库和设备履历设置
* */
@ResponseBody
@PostMapping("/addProduceInboundSave")
public AjaxResult addProduceInboundSave(@RequestBody ErpInboundOrder erpInboundOrder)
{
return toAjax(sysMakeOrderService.addProduceInboundSave(erpInboundOrder));
}
/**
* 跳转添加设备履历
*/

6
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMakeorderPickDetail.java

@ -66,7 +66,7 @@ public class SysMakeorderPickDetail extends BaseEntity
/** 用量 */
private Long useNum;
/** 损耗率 */
private BigDecimal lossRate;
private String lossRate;
/** 层级 */
private Long level;
/** 排序 */
@ -216,11 +216,11 @@ public class SysMakeorderPickDetail extends BaseEntity
this.useNum = useNum;
}
public BigDecimal getLossRate() {
public String getLossRate() {
return lossRate;
}
public void setLossRate(BigDecimal lossRate) {
public void setLossRate(String lossRate) {
this.lossRate = lossRate;
}

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

@ -1,5 +1,6 @@
package com.ruoyi.system.service;
import com.ruoyi.erp.domain.ErpInboundOrder;
import com.ruoyi.system.domain.SysMakeOrder;
import com.ruoyi.system.dto.SysEquipMaterialDto;
import com.ruoyi.system.dto.SysMakeorderMaterialDto;
@ -119,4 +120,8 @@ public interface ISysMakeOrderService
*/
int addEquipmentResumeSave(SysEquipMaterialDto equipMaterialDto);
/**
* 添加保存创建生产入库和设备履历设置
*/
int addProduceInboundSave(ErpInboundOrder erpInboundOrder);
}

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

@ -10,8 +10,16 @@ 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.ErpInboundOrder;
import com.ruoyi.erp.domain.ErpInboundOrderDetail;
import com.ruoyi.erp.service.IErpBomService;
import com.ruoyi.purchase.service.IPurchasePlanService;
import com.ruoyi.quality.domain.QualityOrder;
import com.ruoyi.quality.domain.QualityOrderDetail;
import com.ruoyi.quality.domain.QualityOrderReport;
import com.ruoyi.quality.mapper.QualityOrderDetailMapper;
import com.ruoyi.quality.mapper.QualityOrderMapper;
import com.ruoyi.quality.mapper.QualityOrderReportMapper;
import com.ruoyi.system.domain.SysMakeOrder;
import com.ruoyi.system.domain.SysMakeorderBom;
import com.ruoyi.system.domain.SysSalesOrderChild;
@ -20,6 +28,7 @@ import com.ruoyi.system.dto.SysEquipDetailDto;
import com.ruoyi.system.dto.SysEquipMaterialDto;
import com.ruoyi.system.dto.SysMakeorderMaterialDto;
import com.ruoyi.system.mapper.SysMakeOrderMapper;
import com.ruoyi.system.mapper.SysSalesOrderChildMapper;
import com.ruoyi.system.service.*;
import com.ruoyi.warehouse.domain.WarehouseStorageOrder;
import com.ruoyi.warehouse.domain.WarehouseStorageOrderDetail;
@ -31,9 +40,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.*;
/**
* 生产订单Service业务层处理
@ -57,6 +64,9 @@ public class SysMakeOrderServiceImpl implements ISysMakeOrderService
@Autowired
private ISysSalesOrderService salesOrderService;
@Autowired
private SysSalesOrderChildMapper salesOrderChildMapper;
@Autowired
private ISysSalesOrderChildService salesOrderChildService;
@ -72,6 +82,14 @@ public class SysMakeOrderServiceImpl implements ISysMakeOrderService
@Autowired
private AfterSalesShippingDeviceMapper afterSalesShippingDeviceMapper;
@Autowired
private QualityOrderMapper qualityOrderMapper;
@Autowired
private QualityOrderDetailMapper orderDetailMapper;
@Autowired
private QualityOrderReportMapper orderReportMapper;
/**
* 查询生产订单
@ -408,4 +426,115 @@ public class SysMakeOrderServiceImpl implements ISysMakeOrderService
return result;
}
/**
* 添加保存创建生产入库和设备履历设置
*/
@Transactional(rollbackFor = Exception.class)
@Override
public int addProduceInboundSave(ErpInboundOrder erpInboundOrder) {
String loginName = ShiroUtils.getLoginName();
erpInboundOrder.setCreateBy(loginName);
erpInboundOrder.setCreateTime(DateUtils.getNowDate());
String qualityOrderCode = redisCache.generateBillNo("PZ");
QualityOrder qualityOrder = createQualityOrder(qualityOrderCode, erpInboundOrder, loginName);
//更新生产订单的本次完成数
long finishNum = erpInboundOrder.getInboundDetails().stream().mapToLong(ErpInboundOrderDetail::getCurrentNum).sum();
SysMakeOrder sysMakeOrder = sysMakeOrderMapper.selectMakeOrderByMakeNo(erpInboundOrder.getMakeNo());
sysMakeOrder.setFinishNum(finishNum);
int updateSysMakeOrderResult = sysMakeOrderMapper.updateSysMakeOrder(sysMakeOrder);
if (updateSysMakeOrderResult <= 0){
throw new BusinessException("更新生产订单失败");
}
Map<String, SysSalesOrderChild> materialInfoMap = fetchMaterialInfoMap(erpInboundOrder);
addQualityOrderDetails(qualityOrder, erpInboundOrder, materialInfoMap);
addQualityOrderReports(qualityOrder, erpInboundOrder, materialInfoMap);
return qualityOrderMapper.insertQualityOrder(qualityOrder);
}
private QualityOrder createQualityOrder(String code, ErpInboundOrder erpInboundOrder, String loginName) {
QualityOrder qualityOrder = new QualityOrder();
qualityOrder.setQualityOrderCode(code);
qualityOrder.setRelatedOrderCode(erpInboundOrder.getMakeNo());
qualityOrder.setQualityStatus("0");
qualityOrder.setQualityStorageStatus("4");
qualityOrder.setQualityOrderType("1");
qualityOrder.setCreateTime(new Date());
qualityOrder.setCreateBy(loginName);
return qualityOrder;
}
//先查询所有必要的信息并将其存储在一个Map中,提高查询效率
private Map<String, SysSalesOrderChild> fetchMaterialInfoMap(ErpInboundOrder erpInboundOrder) {
List<ErpInboundOrderDetail> inboundDetails = erpInboundOrder.getInboundDetails();
Map<String, SysSalesOrderChild> materialInfoMap = new HashMap<>();
for (ErpInboundOrderDetail detail : inboundDetails) {
SysSalesOrderChild sysSalesOrderChild = new SysSalesOrderChild();
sysSalesOrderChild.setMaterialCode(detail.getMaterialNo());
sysSalesOrderChild.setQuoteId(erpInboundOrder.getSaleNo());
SysSalesOrderChild child = salesOrderChildMapper.selectSalesOrderChildByCodeAndNo(sysSalesOrderChild);
materialInfoMap.put(detail.getMaterialNo(), child);
}
return materialInfoMap;
}
private void addQualityOrderDetails(QualityOrder qualityOrder, ErpInboundOrder erpInboundOrder, Map<String, SysSalesOrderChild> materialInfoMap) {
for (ErpInboundOrderDetail detail : erpInboundOrder.getInboundDetails()) {
SysSalesOrderChild salesOrderChild = materialInfoMap.get(detail.getMaterialNo());
QualityOrderDetail qualityOrderDetail = createQualityOrderDetail(qualityOrder, detail, salesOrderChild);
int result = orderDetailMapper.insertQualityOrderDetail(qualityOrderDetail);
if (result <= 0) {
throw new BusinessException("新增品质单详情失败");
}
}
}
private QualityOrderDetail createQualityOrderDetail(QualityOrder qualityOrder, ErpInboundOrderDetail detail, SysSalesOrderChild salesOrderChild) {
QualityOrderDetail qualityOrderDetail = new QualityOrderDetail();
qualityOrderDetail.setQualityOrderCode(qualityOrder.getQualityOrderCode());
qualityOrderDetail.setMaterialNo(detail.getMaterialNo());
qualityOrderDetail.setMaterialName(salesOrderChild.getMaterialName());
qualityOrderDetail.setMaterialType(salesOrderChild.getMaterialType());
qualityOrderDetail.setMaterialBrand(salesOrderChild.getBrand());
qualityOrderDetail.setMaterialDescribe(salesOrderChild.getDescribe());
qualityOrderDetail.setMaterialUnit(salesOrderChild.getUnit());
qualityOrderDetail.setMaterialProcessMethod(salesOrderChild.getProcessMethod());
qualityOrderDetail.setMaterialDeptType("0");
qualityOrderDetail.setMakeTotal(salesOrderChild.getMaterialNum());
qualityOrderDetail.setMakeCompletionNum(Math.toIntExact(detail.getCurrentNum()));
qualityOrderDetail.setCreateBy(ShiroUtils.getLoginName());
qualityOrderDetail.setCreateTime(new Date());
return qualityOrderDetail;
}
//添加品质单报告数据
private void addQualityOrderReports(QualityOrder qualityOrder, ErpInboundOrder erpInboundOrder, Map<String, SysSalesOrderChild> materialInfoMap) {
for (ErpInboundOrderDetail detail : erpInboundOrder.getInboundDetails()) {
SysSalesOrderChild salesOrderChild = materialInfoMap.get(detail.getMaterialNo());
QualityOrderReport qualityOrderReport = createQualityOrderReport(qualityOrder, detail, salesOrderChild);
int result = orderReportMapper.insertQualityOrderReport(qualityOrderReport);
if (result <= 0) {
throw new BusinessException("新增品质单报告失败");
}
}
}
private QualityOrderReport createQualityOrderReport(QualityOrder qualityOrder, ErpInboundOrderDetail detail, SysSalesOrderChild salesOrderChild) {
QualityOrderReport qualityOrderReport = new QualityOrderReport();
qualityOrderReport.setQualityOrderCode(qualityOrder.getQualityOrderCode());
qualityOrderReport.setMaterialNo(detail.getMaterialNo());
qualityOrderReport.setMaterialName(salesOrderChild.getMaterialName());
qualityOrderReport.setMakeTotal(salesOrderChild.getMaterialNum());
qualityOrderReport.setCreateBy(ShiroUtils.getLoginName());
qualityOrderReport.setCreateTime(new Date());
return qualityOrderReport;
}
}

2
ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseStorageOrderController.java

@ -139,7 +139,7 @@ public class WarehouseStorageOrderController extends BaseController
@ResponseBody
public AjaxResult temporaryPurchaseWarehouseSave(@RequestBody WarehouseStorageOrder warehouseStorageOrder)
{
return toAjax(warehouseStorageOrderService.updateWarehouseStorageOrder(warehouseStorageOrder));
return toAjax(warehouseStorageOrderService.updateTemporaryPurchaseWarehouse(warehouseStorageOrder));
}

6
ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseOutOrderDetailMapper.java

@ -83,6 +83,12 @@ public interface WarehouseOutOrderDetailMapper
*/
List<WarehouseOutOrderDetail> selectOutOrderDetailListByCode(String outOrderCode);
/**
* 根据物料号出库单号关联单号查询出库单详情数据
*/
public WarehouseOutOrderDetail selectOutOrderDetailListByThreeCode(WarehouseOutOrderDetail warehouseOutOrderDetail);
/**
* 销售单-出库 物料信息关联设备信息
*/

10
ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseStorageOrderService.java

@ -118,4 +118,14 @@ public interface IWarehouseStorageOrderService
* 修改保存入库-生产订单(委内入库)
* */
int updateStorageMakeIn(WarehouseStorageOrder warehouseStorageOrder);
/**
* 修改保存暂收-采购单(仓库入库)
*/
int updateTemporaryPurchaseWarehouse(WarehouseStorageOrder warehouseStorageOrder);
/**
* 通过生产入库单品质后生成入库单
* */
int insertWarehouseStorageOrderByMakeQualityOrder(QualityOrder tempQualityOrder, List<QualityOrderDetail> qualityOrderDetailList);
}

77
ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java

@ -311,7 +311,7 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService
throw new BusinessException("添加出库单信息失败");
}
//生成出库单详情相关信息
generateWarehouseOutOrder(sysMakeorderPickVo, tempSysMakeorderPickVo, outOrderCode,mergeMakeorderPickDetails);
generateWarehouseOutOrder(sysMakeorderPickVo, tempSysMakeorderPickVo, outOrderCode,sysMakeorderPickDetails);
return insertResult;
}
@ -343,44 +343,59 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService
//生成出库单详情相关信息
private void generateWarehouseOutOrder(SysMakeorderPickVo sysMakeorderPickVo, SysMakeorderPickVo tempSysMakeorderPickVo, String outOrderCode,List<SysMakeorderPickDetail> mergeMakeorderPickDetails) {
private void generateWarehouseOutOrder(SysMakeorderPickVo sysMakeorderPickVo, SysMakeorderPickVo tempSysMakeorderPickVo, String outOrderCode,List<SysMakeorderPickDetail> sysMakeorderPickDetails) {
for (SysMakeorderPickDetail sysMakeorderPickDetail : mergeMakeorderPickDetails) {
for (SysMakeorderPickDetail sysMakeorderPickDetail : sysMakeorderPickDetails) {
WarehouseOutOrderDetail warehouseOutOrderDetail = new WarehouseOutOrderDetail();
warehouseOutOrderDetail.setOutOrderCode(outOrderCode);
warehouseOutOrderDetail.setWarehouseOutStatus("4");
warehouseOutOrderDetail.setRelatedOrderCode(tempSysMakeorderPickVo.getMakeNo());
warehouseOutOrderDetail.setMakeNo(tempSysMakeorderPickVo.getMakeNo());
//标明来源是生产订单
warehouseOutOrderDetail.setWarehouseOrderType("1");
warehouseOutOrderDetail.setWarehouseOutType("1");
warehouseOutOrderDetail.setMaterialSum(tempSysMakeorderPickVo.getMaterialSum());
warehouseOutOrderDetail.setEnterpriseSum(tempSysMakeorderPickVo.getEnterpriseSum());
warehouseOutOrderDetail.setCreateBy(ShiroUtils.getLoginName());
warehouseOutOrderDetail.setCreateTime(new Date());
warehouseOutOrderDetail.setApplyName(sysMakeorderPickVo.getApplyUser());
//物料相关信息
warehouseOutOrderDetail.setMaterialNo(sysMakeorderPickDetail.getMaterialNo());
warehouseOutOrderDetail.setMaterialName(sysMakeorderPickDetail.getMaterialName());
warehouseOutOrderDetail.setMaterialDescribe(sysMakeorderPickDetail.getDescribe());
warehouseOutOrderDetail.setMaterialUnit(sysMakeorderPickDetail.getUnit());
warehouseOutOrderDetail.setMaterialBrand(sysMakeorderPickDetail.getBrand());
warehouseOutOrderDetail.setMaterialProcessMethod(sysMakeorderPickDetail.getProcessMethod());
warehouseOutOrderDetail.setMakeNum(tempSysMakeorderPickVo.getMaterialSum());
//根据出库单号和关联单号以及物料号查找出库单详情数据
WarehouseOutOrderDetail tempWarehouseOutOrderDetail = outOrderDetailMapper.selectOutOrderDetailListByThreeCode(warehouseOutOrderDetail);
if (tempWarehouseOutOrderDetail != null){
warehouseOutOrderDetail.setOutOrderDetailId(tempWarehouseOutOrderDetail.getOutOrderDetailId());
Integer applyOutOrderSum = (int) (sysMakeorderPickDetail.getPickNum()+tempWarehouseOutOrderDetail.getApplyOutOrderSum());
Integer makeNum = (int) (sysMakeorderPickDetail.getPickNum() + tempWarehouseOutOrderDetail.getMakeNum());
warehouseOutOrderDetail.setApplyOutOrderSum(applyOutOrderSum);
warehouseOutOrderDetail.setMakeNum(makeNum);
int updateWarehouseOutOrderDetailResult = outOrderDetailMapper.updateWarehouseOutOrderDetail(warehouseOutOrderDetail);
if (updateWarehouseOutOrderDetailResult <= 0){
throw new BusinessException("更新出库单详情失败");
}
}else {
warehouseOutOrderDetail.setWarehouseOutStatus("4");
warehouseOutOrderDetail.setMakeNo(tempSysMakeorderPickVo.getMakeNo());
//标明来源是生产订单
warehouseOutOrderDetail.setWarehouseOrderType("1");
warehouseOutOrderDetail.setWarehouseOutType("1");
warehouseOutOrderDetail.setMaterialSum(tempSysMakeorderPickVo.getMaterialSum());
warehouseOutOrderDetail.setEnterpriseSum(tempSysMakeorderPickVo.getEnterpriseSum());
warehouseOutOrderDetail.setCreateBy(ShiroUtils.getLoginName());
warehouseOutOrderDetail.setCreateTime(new Date());
warehouseOutOrderDetail.setApplyName(sysMakeorderPickVo.getApplyUser());
warehouseOutOrderDetail.setMaterialName(sysMakeorderPickDetail.getMaterialName());
warehouseOutOrderDetail.setMaterialDescribe(sysMakeorderPickDetail.getDescribe());
warehouseOutOrderDetail.setMaterialUnit(sysMakeorderPickDetail.getUnit());
warehouseOutOrderDetail.setMaterialBrand(sysMakeorderPickDetail.getBrand());
warehouseOutOrderDetail.setMaterialProcessMethod(sysMakeorderPickDetail.getProcessMethod());
//订单数量为本次领料数量
warehouseOutOrderDetail.setMakeNum(Math.toIntExact(sysMakeorderPickDetail.getPickNum()));
//添加申请出库数量
warehouseOutOrderDetail.setApplyOutOrderSum(Math.toIntExact(sysMakeorderPickDetail.getPickNum()));
if (StringUtils.isNotEmpty(sysMakeorderPickDetail.getDescribe())) {
String[] splitDescribe = sysMakeorderPickDetail.getDescribe().split(",");
if (splitDescribe.length >= 2) {
warehouseOutOrderDetail.setMaterialModel(splitDescribe[0]);
warehouseOutOrderDetail.setMaterialSpecification(splitDescribe[1]);
warehouseOutOrderDetail.setApplyOutOrderSum(Math.toIntExact(sysMakeorderPickDetail.getPickNum()));
if (StringUtils.isNotEmpty(sysMakeorderPickDetail.getDescribe())) {
String[] splitDescribe = sysMakeorderPickDetail.getDescribe().split(",");
if (splitDescribe.length >= 2) {
warehouseOutOrderDetail.setMaterialModel(splitDescribe[0]);
warehouseOutOrderDetail.setMaterialSpecification(splitDescribe[1]);
}
}
int insertOutOrderDetailResult = outOrderDetailMapper.insertWarehouseOutOrderDetail(warehouseOutOrderDetail);
if (insertOutOrderDetailResult <= 0){
throw new BusinessException("新增出库单详情数据失败");
}
}
int insertOutOrderDetailResult = outOrderDetailMapper.insertWarehouseOutOrderDetail(warehouseOutOrderDetail);
if (insertOutOrderDetailResult <= 0){
throw new BusinessException("新增出库单详情数据失败");
}
}
}

116
ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java

@ -403,8 +403,8 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS
public int insertWarehouseStorageOrderByMakeInQualityOrder(QualityOrder tempQualityOrder, List<QualityOrderDetail> qualityOrderDetailList) {
WarehouseStorageOrder warehouseStorageOrder = new WarehouseStorageOrder();
String loginName = ShiroUtils.getLoginName();
String warehouseStorageCode = redisCache.generateBillNo("RK");
warehouseStorageOrder.setWarehouseStorageCode(warehouseStorageCode);
warehouseStorageOrder.setWarehouseStorageCode(tempQualityOrder.getWarehouseCode());
warehouseStorageOrder.setRelatedOrderCode(tempQualityOrder.getRelatedOrderCode());
//暂收设置为全部品质
warehouseStorageOrder.setWarehouseQualityStatus("2");
@ -423,7 +423,7 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS
for (QualityOrderDetail qualityOrderDetail : qualityOrderDetailList) {
WarehouseStorageOrderDetail warehouseStorageOrderDetail = new WarehouseStorageOrderDetail();
warehouseStorageOrderDetail.setWarehouseStorageCode(warehouseStorageCode);
warehouseStorageOrderDetail.setWarehouseStorageCode(tempQualityOrder.getWarehouseCode());
warehouseStorageOrderDetail.setRelatedOrderCode(tempQualityOrder.getRelatedOrderCode());
warehouseStorageOrderDetail.setWarehouseQualityStatus("2");
warehouseStorageOrderDetail.setWarehouseStorageStatus("2");
@ -433,6 +433,8 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS
warehouseStorageOrderDetail.setMakeStorageNum(qualityOrderDetail.getMakeInNum());
//设置委内加工费单价
warehouseStorageOrderDetail.setMakeInUnitPrice(qualityOrderDetail.getMakeInUnitPrice());
//设置品质已合格数
warehouseStorageOrderDetail.setQualityHasQualifiedNum(qualityOrderDetail.getQualityHasqualifiedNum());
warehouseStorageOrderDetail.setMaterialNo(qualityOrderDetail.getMaterialNo());
warehouseStorageOrderDetail.setMaterialName(qualityOrderDetail.getMaterialName());
warehouseStorageOrderDetail.setMaterialBrand(qualityOrderDetail.getMaterialBrand());
@ -523,6 +525,114 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS
}
/**
* 修改保存暂收-采购单(仓库入库)
*/
@Transactional(rollbackFor = Exception.class)
@Override
public int updateTemporaryPurchaseWarehouse(WarehouseStorageOrder warehouseStorageOrder) {
String loginName = ShiroUtils.getLoginName();
warehouseStorageOrder.setUpdateBy(loginName);
warehouseStorageOrder.setUpdateTime(DateUtils.getNowDate());
//改变状态为已暂收
warehouseStorageOrder.setWarehouseStorageStatus("1");
//设置品质状态,为待品质
warehouseStorageOrder.setWarehouseQualityStatus("0");
warehouseStorageOrder.setWarehouseEmployee(loginName);
List<WarehouseStorageOrderDetail> warehouseStorageOrderDetailList = warehouseStorageOrder.getWarehouseStorageOrderDetailList();
//入库单主表的实际到货数为子表的合计
int actualArriveNum = warehouseStorageOrderDetailList.stream().mapToInt(WarehouseStorageOrderDetail::getActualArriveNum).sum();
//入库单主表的暂收合格数为子表的合计
int temporaryQualifiedNum = warehouseStorageOrderDetailList.stream().mapToInt(WarehouseStorageOrderDetail::getTemporaryQualifiedNum).sum();
if (actualArriveNum < temporaryQualifiedNum) {
throw new BusinessException("暂收合格数不能大于实际到货数");
}
//插入实际到货数
warehouseStorageOrder.setActualArrivedNum(actualArriveNum);
//插入暂收合格数
warehouseStorageOrder.setTemporaryQualifiedNum(temporaryQualifiedNum);
//插入暂收不合格数
warehouseStorageOrder.setTemporaryUnqualifiedNum(Math.max(0, actualArriveNum - temporaryQualifiedNum));
//设置暂存时间
warehouseStorageOrder.setTemporaryTime(new Date());
int updateDetailResult = updateTemporaryPurchaseDetails(warehouseStorageOrder);
if (updateDetailResult != warehouseStorageOrder.getWarehouseStorageOrderDetailList().size()) {
throw new BusinessException("更新入库单明细记录失败");
}
int updateResult = warehouseStorageOrderMapper.updateWarehouseStorageOrder(warehouseStorageOrder);
if (updateResult <= 0) {
throw new BusinessException("更新入库单主记录失败");
}
try {
qualityOrderService.insertQualityOrderByWarehouseStorageOrder(warehouseStorageOrder, warehouseStorageOrder.getWarehouseStorageOrderDetailList());
} catch (Exception e) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
log.error("生成品质单时发生错误", e);
throw new BusinessException("生成品质单时发生错误");
}
return updateResult;
}
/**
* 通过生产入库单品质后生成入库单
* */
@Override
public int insertWarehouseStorageOrderByMakeQualityOrder(QualityOrder tempQualityOrder, List<QualityOrderDetail> qualityOrderDetailList) {
WarehouseStorageOrder warehouseStorageOrder = new WarehouseStorageOrder();
String loginName = ShiroUtils.getLoginName();
warehouseStorageOrder.setWarehouseStorageCode(tempQualityOrder.getWarehouseCode());
warehouseStorageOrder.setRelatedOrderCode(tempQualityOrder.getRelatedOrderCode());
//暂收设置为全部品质
warehouseStorageOrder.setWarehouseQualityStatus("2");
warehouseStorageOrder.setWarehouseStorageStatus("2");
warehouseStorageOrder.setWarehouseStorageType("5");
warehouseStorageOrder.setWarehouseOrderType("1");
warehouseStorageOrder.setDeliveryInspectionTime(tempQualityOrder.getDeliveryInspectionTime());
warehouseStorageOrder.setQualityUnqualifiedNum(tempQualityOrder.getQualityUnqualifiedNum());
warehouseStorageOrder.setQualityQualifiedNum(tempQualityOrder.getQualityQualifiedNum());
warehouseStorageOrder.setCreateBy(loginName);
warehouseStorageOrder.setQualityTime(new Date());
warehouseStorageOrder.setCreateTime(new Date());
//设置委内完成数总价
warehouseStorageOrder.setMakeInTotalPrice(tempQualityOrder.getMakeInTotalPrice());
//插入入库单详情数据
for (QualityOrderDetail qualityOrderDetail : qualityOrderDetailList) {
WarehouseStorageOrderDetail warehouseStorageOrderDetail = new WarehouseStorageOrderDetail();
warehouseStorageOrderDetail.setWarehouseStorageCode(tempQualityOrder.getWarehouseCode());
warehouseStorageOrderDetail.setRelatedOrderCode(tempQualityOrder.getRelatedOrderCode());
warehouseStorageOrderDetail.setWarehouseQualityStatus("2");
warehouseStorageOrderDetail.setWarehouseStorageStatus("2");
warehouseStorageOrderDetail.setWarehouseStorageType("5");
warehouseStorageOrderDetail.setWarehouseOrderType("1");
//设置生产订单数
warehouseStorageOrderDetail.setMakeTotal(qualityOrderDetail.getMakeTotal());
//生产入库数
warehouseStorageOrderDetail.setMakeStorageNum(qualityOrderDetail.getMakeCompletionNum());
//设置品质已合格数
warehouseStorageOrderDetail.setQualityHasQualifiedNum(qualityOrderDetail.getQualityHasqualifiedNum());
warehouseStorageOrderDetail.setMaterialNo(qualityOrderDetail.getMaterialNo());
warehouseStorageOrderDetail.setMaterialName(qualityOrderDetail.getMaterialName());
warehouseStorageOrderDetail.setMaterialBrand(qualityOrderDetail.getMaterialBrand());
warehouseStorageOrderDetail.setMaterialDescribe(qualityOrderDetail.getMaterialDescribe());
warehouseStorageOrderDetail.setMaterialPhotourl(qualityOrderDetail.getMaterialPhotourl());
warehouseStorageOrderDetail.setMaterialProcessMethod(qualityOrderDetail.getMaterialProcessMethod());
warehouseStorageOrderDetail.setMaterialType(qualityOrderDetail.getMaterialType());
warehouseStorageOrderDetail.setMaterialUnit(qualityOrderDetail.getMaterialUnit());
warehouseStorageOrderDetail.setCreateBy(loginName);
warehouseStorageOrderDetail.setCreateTime(new Date());
storageOrderDetailMapper.insertWarehouseStorageOrderDetail(warehouseStorageOrderDetail);
}
return warehouseStorageOrderMapper.insertWarehouseStorageOrder(warehouseStorageOrder);
}
/**
* 修改保存暂收-采购单(采购入库) 子表数据
* */

5
ruoyi-admin/src/main/resources/mapper/quality/QualityOrderDetailMapper.xml

@ -30,6 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="materialProcessMethod" column="material_process_method" />
<result property="materialDeptType" column="material_dept_type"/>
<result property="makeTotal" column="make_total" />
<result property="makeCompletionNum" column="make_completion_num" />
<result property="actualArriveNum" column="actual_arrive_num" />
<result property="thisArrivedNum" column="this_arrived_num" />
<result property="qualityHasqualifiedNum" column="quality_hasqualified_num" />
@ -70,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
material_process_method,
material_dept_type,
make_total,
make_completion_num,
actual_arrive_num,
this_arrived_num,
quality_hasqualified_num,
@ -154,6 +156,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="materialProcessMethod != null">material_process_method,</if>
<if test="materialDeptType">material_dept_type,</if>
<if test="makeTotal != null">make_total,</if>
<if test="makeCompletionNum != null">make_completion_num,</if>
<if test="actualArriveNum != null">actual_arrive_num,</if>
<if test="thisArrivedNum != null">this_arrived_num,</if>
<if test="qualityHasqualifiedNum != null">quality_hasqualified_num,</if>
@ -192,6 +195,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="materialProcessMethod != null">#{materialProcessMethod},</if>
<if test="materialDeptType">#{materialDeptType},</if>
<if test="makeTotal != null">#{makeTotal},</if>
<if test="makeCompletionNum != null">#{makeCompletionNum},</if>
<if test="actualArriveNum != null">#{actualArriveNum},</if>
<if test="thisArrivedNum != null">#{thisArrivedNum},</if>
<if test="qualityHasqualifiedNum != null">#{qualityHasqualifiedNum},</if>
@ -234,6 +238,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="materialProcessMethod != null">material_process_method = #{materialProcessMethod},</if>
<if test="materialDeptType != null">material_dept_type = #{materialDeptType},</if>
<if test="makeTotal != null">make_total = #{makeTotal},</if>
<if test="makeCompletionNum != null">make_completion_num = #{makeCompletionNum},</if>
<if test="actualArriveNum != null">actual_arrive_num = #{actualArriveNum},</if>
<if test="thisArrivedNum != null">this_arrived_num = #{thisArrivedNum},</if>
<if test="qualityHasqualifiedNum != null">quality_hasqualified_num = #{qualityHasqualifiedNum},</if>

43
ruoyi-admin/src/main/resources/mapper/quality/QualityOrderMapper.xml

@ -15,6 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="thisArrivedNum" column="this_arrived_num" />
<result property="qualityQualifiedNum" column="quality_qualified_num" />
<result property="qualityUnqualifiedNum" column="quality_unqualified_num" />
<result property="storageNum" column="storage_num" />
<result property="makeInTotalPrice" column="make_in_total_price" />
<result property="deliveryInspectionTime" column="delivery_inspection_time" />
<result property="qualityEmployee" column="quality_employee" />
@ -76,6 +77,48 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectAllMakeQualityOrderList" parameterType="QualityOrder" resultMap="QualityOrderResult">
select
qo.quality_order_id,
qo.quality_order_code,
qo.in_storage_code,
qo.related_order_code,
qo.quality_status,
qo.quality_order_type,
qo.quality_storage_status,
qo.this_arrived_num,
qo.quality_qualified_num,
qo.quality_unqualified_num,
qo.warehouse_code,
qo.warehouse_name,
qo.delivery_inspection_time,
qo.quality_employee,
qo.remark,
qo.create_by,
qo.create_time,
qo.update_by,
qo.update_time,
qo.make_in_total_price,
wso.storage_num
from quality_order qo
left join warehouse_storage_order wso on wso.related_order_code = qo.related_order_code
<where>
<if test="qualityOrderCode != null and qualityOrderCode != ''"> and qo.quality_order_code = #{qualityOrderCode}</if>
<if test="inStorageCode != null and inStorageCode != ''"> and qo.in_storage_code = #{inStorageCode}</if>
<if test="relatedOrderCode != null and relatedOrderCode != ''"> and qo.related_order_code = #{relatedOrderCode}</if>
<if test="qualityStatus != null and qualityStatus != ''"> and qo.quality_status = #{qualityStatus}</if>
<if test="qualityOrderType != null and qualityOrderType != ''"> and qo.quality_order_type = #{qualityOrderType}</if>
<if test="qualityStorageStatus != null and qualityStorageStatus != ''"> and qo.quality_storage_status = #{qualityStorageStatus}</if>
<if test="qualityEmployee != null and qualityEmployee != ''"> and qo.quality_employee = #{qualityEmployee}</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>
and (qo.quality_storage_status = '1' or qo.quality_storage_status = '4')
</where>
order by qo.create_time desc
</select>
<insert id="insertQualityOrder" parameterType="QualityOrder" useGeneratedKeys="true" keyProperty="qualityOrderId">
insert into quality_order
<trim prefix="(" suffix=")" suffixOverrides=",">

9
ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderDetailMapper.xml

@ -77,6 +77,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where out_order_code = #{outOrderCode}
</select>
<select id="selectOutOrderDetailListByThreeCode" parameterType="WarehouseOutOrderDetail" resultMap="WarehouseOutOrderDetailResult">
<include refid="selectWarehouseOutOrderDetailVo"/>
where out_order_code = #{outOrderCode}
and related_order_code = #{relatedOrderCode}
and material_no = #{materialNo}
</select>
<select id="selectShippingDeviceList" parameterType="WarehouseOutOrderDetail" resultMap="WarehouseOutOrderDetailResult">
<include refid="selectWarehouseOutOrderDetailVo"/>
where sales_order_code = #{salesOrderCode}

14
ruoyi-admin/src/main/resources/templates/erp/inboundOrder/add.html

@ -283,13 +283,13 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value + "%";
// }
// }
},
{
field: 'materialNum',

56
ruoyi-admin/src/main/resources/templates/erp/inboundOrder/inboundOrder.html

@ -83,6 +83,7 @@
restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export",
modalName: "入库单",
showFooter: true,
columns: [
{checkbox: true},
{
@ -125,9 +126,34 @@
}
},
{
title: '本次到货数量',
field: 'thisArrivedNum',
title: '委内加工费总价',
field: 'makeInTotalPrice',
footerFormatter: function (value) {
const total = value.reduce((accumulator, currentValue) => {
// 直接访问makeInTotalPrice,如果它是null或undefined,则使用0
const makeInTotalPrice = currentValue.makeInTotalPrice || 0;
return accumulator + parseFloat(makeInTotalPrice);
}, 0);
return total;
}
},
// {
// field: 'entrysalary',
// title: '入职薪资',
// sortable: true,
// footerFormatter: function (value) {
// var count = 0;
// console.log(value);
// for (var i=0; i<value.length;i++) {
// count += parseFloat(JSON.parse(JSON.stringify(value[i])).entrysalary);
// }
// return count;
// }
// },
{
title: '品质合格数',
field: 'qualityQualifiedNum',
@ -136,14 +162,20 @@
title: '品质不合格数',
field: 'qualityUnqualifiedNum',
},
{
title: '交检时间',
field: 'deliveryInspectionTime',
},
{
title: '品质员',
field: 'qualityEmployee',
title: '入库数',
field: 'storageNum',
},
// {
// title: '交检时间',
// field: 'deliveryInspectionTime',
// },
// {
// title: '品质员',
// field: 'qualityEmployee',
// },
{
title: '录入人',
field: 'createBy',
@ -162,7 +194,7 @@
},
{title: '操作', align: 'center',formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="detail(\'' + row.id + '\')"><i class="fa fa-edit"></i>详情</a> ');
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="inboundOrderDetail(\'' + row.qualityOrderId + '\')"><i class="fa fa-edit"></i>详情</a> ');
return actions.join('');
}
}
@ -173,9 +205,9 @@
//详情
function detail(qualityOrderId){
var url = prefix +'/detail/' + qualityOrderId;
$.modal.open("品质单详情",url)
function inboundOrderDetail(qualityOrderId){
var url = prefix +'/inboundOrderDetail/' + qualityOrderId;
$.modal.open("委内入库单详情",url)
}
</script>
</body>

207
ruoyi-admin/src/main/resources/templates/erp/inboundOrder/inboundOrderDetail.html

@ -0,0 +1,207 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('委内加工单品质')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-makeInStartingQualityDetail-edit" th:object="${qualityOrder}">
<input name="qualityOrderId" th:field="*{qualityOrderId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">品质单号:</label>
<div class="col-sm-8">
<input name="qualityOrderCode" th:field="*{qualityOrderCode}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库单号:</label>
<div class="col-sm-8">
<input name="inStorageCode" th:field="*{inStorageCode}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">关联订单号:</label>
<div class="col-sm-8">
<input name="relatedOrderCode" th:field="*{relatedOrderCode}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">品质单订单类型:</label>
<div class="col-sm-8">
<select name="qualityOrderType" class="form-control m-b" th:with="type=${@dict.getType('quality_order_type')}" disabled>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{qualityOrderType}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">品质单入库类型:</label>
<div class="col-sm-8">
<select name="qualityStorageStatus" class="form-control m-b" th:with="type=${@dict.getType('quality_storage_status')}" disabled>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{qualityStorageStatus}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">交付质检时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="deliveryInspectionTime" th:value="${#dates.format(qualityOrder.deliveryInspectionTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" disabled>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
</form>
<!--物料信息-->
<div class="container">
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<!--用于可以修改列表字段的插件-->
<th:block th:include="include :: bootstrap-table-editable-js" />
<script th:inline="javascript">
var qualityOrderCode = [[${qualityOrder.qualityOrderCode}]]
var qualityOrder = [[${qualityOrder}]]
var prefix = ctx + "quality/qualityOrder";
$("#form-makeInStartingQualityDetail-edit").validate({
focusCleanup: true
});
$("input[name='deliveryInspectionTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
// 新增提交
function submitHandler() {
// 获取表单数据
const qualityOrderData = $("#form-makeInStartingQualityDetail-edit").serializeArray().reduce((obj, item) => {
obj[item.name] = item.value;
return obj;
}, {});
// 获取bootstrap-table的数据,这里假设你使用bootstrap-table的API获取所有数据
var table = $('#bootstrap-table').bootstrapTable('getData');
// 将表数据转换成与complaintNoticeData格式一致的数组
var materialDataList = table.map(function(item) {
// 根据实际字段名调整
return {
"qualityOrderDetailId": item.qualityOrderDetailId,
"materialNo": item.materialNo,
"thisArrivedNum": item.thisArrivedNum,
"qualityQualifiedNum": item.qualityQualifiedNum,
"qualityUnqualifiedNum": item.qualityUnqualifiedNum
// ...其他字段
};
});
const combinedData = Object.assign({}, qualityOrderData, {
qualityOrderDetailList: materialDataList,
});
// 合并表单数据和表格数据
console.log(combinedData)
// 使用 JSON.stringify() 序列化数据
const jsonData = JSON.stringify(combinedData);
// 发送 AJAX 请求到后端接口
$.operate.saveJson(prefix + "/inboundOrderDetail", jsonData);
}
//物料信息展示列表
$(function() {
var options = {
modalName: "选择物料",
url: prefix + "/getMaterialListByQualityOrderCode",
queryParams: queryParams,
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
pagination: false, // 设置不分页
columns: [{
checkbox: true
},
{
title: '品质单详情ID',
field: 'qualityOrderDetailId',
visible: false
},
{
title: '料号',
field: 'materialNo'
},
{
title: '物料名称',
field: 'materialName'
},
{
title: '物料类型',
field: 'materialType',
},
{
title: '物料图片地址',
field: 'materialPhotourl',
},
{
title: '物料描述',
field: 'materialDescribe',
},
{
title: '物料品牌',
field: 'materialBrand',
},
{
title: '物料单位',
field: 'materialUnit',
},
{
title: '物料加工方式',
field: 'materialProcessMethod',
},
{
title: '委内已完成数',
field: 'makeInNum',
},
{
title: '品质已合格数',
field: 'qualityHasqualifiedNum',
},
{
title: '本次到货数',
field: 'thisArrivedNum',
},
{
title: '品质合格数',
field: 'qualityQualifiedNum',
},
{
title: '品质不合格数',
field: 'qualityUnqualifiedNum',
}]
};
$.table.init(options);
})
function queryParams(params) {
var curParams = {
// 传递参数查询参数
qualityOrderCode: qualityOrderCode
};
console.log(curParams);
return curParams;
}
</script>
</body>
</html>

14
ruoyi-admin/src/main/resources/templates/erp/inboundOrder/processInboundDetail.html

@ -279,13 +279,13 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value + "%";
// }
// }
},
{
field: 'materialNum',

14
ruoyi-admin/src/main/resources/templates/erp/inboundOrder/produceInboundDetail.html

@ -296,13 +296,13 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value + "%";
// }
// }
},
{
field: 'materialNum',

8
ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeInOrderReport.html

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改品质管理品质单报告')" />
<th:block th:include="include :: header('委内加工单品质单报告')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
@ -119,11 +119,7 @@
}, {});
// 获取bootstrap-table的数据,这里假设你使用bootstrap-table的API获取所有数据
var table = $('#bootstrap-unqualified-table').bootstrapTable('getData');
// 检查表格数据是否为空
if (table.length === 0) {
$.modal.alertWarning("请至少添加一条不合格数再保存!");
return;
}
console.log(JSON.stringify(table));
// 将表数据转换成与qualityReportData格式一致的数组
var unqualifiedDataList = table.map(function (item) {

1
ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeInStartingQuality.html

@ -110,6 +110,7 @@
"thisArrivedNum": item.thisArrivedNum,
"qualityQualifiedNum": item.qualityQualifiedNum,
"qualityUnqualifiedNum": item.qualityUnqualifiedNum,
"makeInNum":item.makeInNum,
"makeInUnitPrice": item.makeInUnitPrice,
"materialDeptType": item.materialDeptType,
// ...其他字段

2
ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeInStartingQualityDetail.html

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('委内加工单品质')" />
<th:block th:include="include :: header('委内加工单品质详情')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">

311
ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeOrderReport.html

@ -0,0 +1,311 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('生产入库品质单报告')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-makeOrderReport-edit" th:object="${qualityOrderReport}">
<input name="qualityOrderReportId" th:field="*{qualityOrderReportId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">料号:</label>
<div class="col-sm-6">
<input name="materialNo" th:field="*{materialNo}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料名称:</label>
<div class="col-sm-6">
<input name="materialName" th:field="*{materialName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">生产订单数:</label>
<div class="col-sm-6">
<input name="makeTotal" th:field="*{makeTotal}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">品质已合格数:</label>
<div class="col-sm-6">
<input name="qualityHasqualifiedNum" th:field="*{qualityHasqualifiedNum}" class="form-control" type="text">
</div>
</div>
<div class="container">
<!--合格数-->
<div class="col-sm-12">
<h3>合格数</h3>
<div class="row">
<div class="form-group col-sm-6">
<label class="control-label is-required">ok允收数:</label>
<input name="okAcceptedNum" th:field="*{okAcceptedNum}" class="form-control" type="text" required>
</div>
<div class="form-group col-sm-6">
<label class="control-label">ok报告图片:</label>
<input name="okReportUrl" th:field="*{okReportUrl}" class="form-control" type="text">
</div>
</div>
<div class="row">
<div class="form-group col-sm-6">
<label class="control-label is-required">特采/让步数:</label>
<input name="specialConcessionsNum" th:field="*{specialConcessionsNum}" class="form-control" type="text" required>
</div>
<div class="form-group col-sm-6">
<label class="control-label">特采报告图片:</label>
<input name="specialReportUrl" th:field="*{specialReportUrl}" class="form-control" type="text">
</div>
</div>
</div>
<!--不合格数-->
<div class="col-sm-12">
<div class="row">
<div class="col-sm-12 d-flex align-items-center">
<span style="font-weight: bold; font-family: Arial, sans-serif; font-size: 15px;">不合格数</span>
<a class="btn btn-success ml-auto" onclick="addUnqualified()">
<i class="fa fa-plus"></i> 添加
</a>
</div>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-unqualified-table"></table>
</div>
</div>
</div>
</div>
<!--其他字段-->
<div class="form-group">
<label class="col-sm-4 control-label">检验完成时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="checkoutCompletionTime" th:value="${#dates.format(qualityOrderReport.checkoutCompletionTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">备注:</label>
<div class="col-sm-8">
<textarea name="remark" th:field="*{remark}" class="form-control" type="text"></textarea>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: bootstrap-table-editable-js"/>
<script th:inline="javascript">
var processBadClassificationDatas = [[${@dict.getType('process_bad_classification')}]];
var processBadGradeDatas = [[${@dict.getType('process_bad_grade')}]];
var qualityOrderCode = /*[[${qualityOrderCode}]]*/ '';
var $table = $("#bootstrap-unqualified-table");
var prefix = ctx + "quality/qualityOrder";
$("#form-makeOrderReport-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
// 获取表单数据
const qualityReportData = $("#form-makeOrderReport-edit").serializeArray().reduce((obj, item) => {
obj[item.name] = item.value;
return obj;
}, {});
// 获取bootstrap-table的数据,这里假设你使用bootstrap-table的API获取所有数据
var table = $('#bootstrap-unqualified-table').bootstrapTable('getData');
console.log(JSON.stringify(table));
// 将表数据转换成与qualityReportData格式一致的数组
var unqualifiedDataList = table.map(function (item) {
// 根据实际字段名调整
return {
"processBadClassification": item.processBadClassification,
"processBadGrade": item.processBadGrade,
"processBadNum": item.processBadNum,
"unqualifiedReportUrl": item.unqualifiedReportUrl
// ...其他字段
};
});
const combinedData = Object.assign({}, qualityReportData,
{unqualifiedDataList: unqualifiedDataList,
qualityOrderCode: qualityOrderCode // 直接使用全局变量
},
);
// 合并表单数据和表格数据
// const combinedData = Object.assign({}, ...complaintNoticeData.array(item => ({ [item.name]: item.value })), ...materialData);
console.log(combinedData)
// 使用 JSON.stringify() 序列化数据
const jsonData = JSON.stringify(combinedData);
// 发送 AJAX 请求到后端接口
$.operate.saveJson(prefix + "/makeOrderReport", jsonData);
}
}
$("input[name='checkoutCompletionTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
//添加不合格数
function addUnqualified() {
// 生成一个简单的唯一标识,这里使用时间戳作为示例
var uniqueId = new Date().getTime();
// 创建一个新行数据模板,这里仅为示例,具体根据表格列来定义
var newRow = {
qualityOrderReportId:uniqueId,
processBadClassification: "",
processBadGrade: "",
processBadNum: "",
unqualifiedReportUrl: ""
};
// 使用Bootstrap Table的API插入新行
$('#bootstrap-unqualified-table').bootstrapTable('append', newRow);
}
//收款凭证table列表
$(function() {
var options = {
id:"bootstrap-unqualified-table",
modalName: "收款凭证",
showColumns: false,
pagination: false,
showToggle: false,
showRefresh:false,
showSearch:false,
singleSelect:true,
columns: [{
checkbox: false
},
{
title: '品质报告单id',
field: 'qualityOrderReportId',
visible: false
},
{title: '不良分类',field: 'processBadClassification',
formatter:function (value, row, index) {
return processBadClassificationFormatter(value,row,index);
}
},
{title: '不良等级',field: 'processBadGrade',
formatter:function (value, row, index) {
return processBadGradeFormatter(value,row,index);
}
},
{
title: '数量',
field: 'processBadNum',
editable:{
type: 'text',
mode:'inline',
validate: function (v) {
if (!v) return '数量不能为空';
if (isNaN(v)) return '数量必须是数字';
var processBadNum = parseInt(v);
if (processBadNum < 0) return '数量必须是正整数';
}
}
},
{
title: '报告',
field: 'unqualifiedReportUrl',
editable: {
mode:'inline',
type: 'text', // 表示该列可以被编辑为文本
},
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.qualityOrderReportId + '\')"><i class="fa fa-remove"></i>删除</a> ');
return actions.join('');
}
}
]
};
$.table.init(options);
});
// 逻辑删除不合格数前端的一行数据
function removeRow(qualityOrderReportId){
console.log(qualityOrderReportId);
// 直接使用 receivablesRecordsId 值进行删除操作
$("#bootstrap-unqualified-table").bootstrapTable('remove', {
field: 'qualityOrderReportId',
values: qualityOrderReportId
});
}
// 列中获取不良分类的下拉改变数据
function onProcessBadClassification(selectElement, rowIndex) {
var processBadClassificationValue = $(selectElement).val();
var tableData = $table.bootstrapTable('getData');
var newRow = tableData[rowIndex]; // 获取当前行数据
// 重新渲染成本小类的设备名称列
// 更新行数据
newRow.processBadClassification = processBadClassificationValue;
$table.bootstrapTable('updateRow', {index: rowIndex, row: newRow});
}
// 自定义不良分类的格式化函数
function processBadClassificationFormatter(value, row, index) {
var selectHtml = '<select class="form-control" onchange="onProcessBadClassification(this, ' + index + ')">';
// 添加默认选项
selectHtml += '<option value=""' + (value === undefined || value === '' ? ' selected' : '') + '>所有</option>';
processBadClassificationDatas.forEach(function (child) {
selectHtml += '<option value="' + child.dictValue + '"' + (value === child.dictValue ? ' selected' : '') + '>' + child.dictLabel + '</option>';
});
selectHtml += '</select>';
return selectHtml;
}
// 列中获取不良等级的下拉改变数据
function onProcessBadGrade(selectElement, rowIndex) {
var processBadGradeValue = $(selectElement).val();
var tableData = $table.bootstrapTable('getData');
var newRow = tableData[rowIndex]; // 获取当前行数据
// 重新渲染成本小类的设备名称列
// 更新行数据
newRow.processBadGrade = processBadGradeValue;
$table.bootstrapTable('updateRow', {index: rowIndex, row: newRow});
}
// 自定义不良等级的格式化函数
function processBadGradeFormatter(value, row, index) {
var selectHtml = '<select class="form-control" onchange="onProcessBadGrade(this, ' + index + ')">';
// 添加默认选项
selectHtml += '<option value=""' + (value === undefined || value === '' ? ' selected' : '') + '>所有</option>';
processBadGradeDatas.forEach(function (child) {
selectHtml += '<option value="' + child.dictValue + '"' + (value === child.dictValue ? ' selected' : '') + '>' + child.dictLabel + '</option>';
});
selectHtml += '</select>';
return selectHtml;
}
</script>
</body>
</html>

255
ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeStartingQuality.html

@ -0,0 +1,255 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('生产入库品质')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-makeInStartingQuality-edit" th:object="${qualityOrder}">
<input name="qualityOrderId" th:field="*{qualityOrderId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">品质单号:</label>
<div class="col-sm-8">
<input name="qualityOrderCode" th:field="*{qualityOrderCode}" 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="inStorageCode" th:field="*{inStorageCode}" 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="relatedOrderCode" th:field="*{relatedOrderCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">品质单订单类型:</label>
<div class="col-sm-8">
<select name="qualityOrderType" class="form-control m-b" th:with="type=${@dict.getType('quality_order_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{qualityOrderType}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">品质单入库类型:</label>
<div class="col-sm-8">
<select name="qualityStorageStatus" class="form-control m-b" th:with="type=${@dict.getType('quality_storage_status')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{qualityStorageStatus}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">交付质检时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="deliveryInspectionTime" th:value="${#dates.format(qualityOrder.deliveryInspectionTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
</form>
<!--物料信息-->
<div class="container">
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<!--用于可以修改列表字段的插件-->
<th:block th:include="include :: bootstrap-table-editable-js" />
<script th:inline="javascript">
var qualityOrderCode = [[${qualityOrder.qualityOrderCode}]]
var qualityOrder = [[${qualityOrder}]]
var prefix = ctx + "quality/qualityOrder";
$("#form-makeInStartingQuality-edit").validate({
focusCleanup: true
});
$("input[name='deliveryInspectionTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
// 新增提交
function submitHandler() {
// 获取表单数据
const qualityOrderData = $("#form-makeInStartingQuality-edit").serializeArray().reduce((obj, item) => {
obj[item.name] = item.value;
return obj;
}, {});
// 获取bootstrap-table的数据,这里假设你使用bootstrap-table的API获取所有数据
var table = $('#bootstrap-table').bootstrapTable('getData');
// 将表数据转换成与complaintNoticeData格式一致的数组
var materialDataList = table.map(function(item) {
// 根据实际字段名调整
return {
"qualityOrderDetailId": item.qualityOrderDetailId,
"materialNo": item.materialNo,
"materialNo": item.materialNo,
"materialName": item.materialName,
"materialType": item.materialType,
"materialPhotourl": item.materialPhotourl,
"materialDescribe": item.materialDescribe,
"materialBrand": item.materialBrand,
"materialUnit": item.materialUnit,
"materialProcessMethod": item.materialProcessMethod,
"thisArrivedNum": item.thisArrivedNum,
"qualityQualifiedNum": item.qualityQualifiedNum,
"qualityUnqualifiedNum": item.qualityUnqualifiedNum,
"makeTotal":item.makeTotal,
"materialDeptType": item.materialDeptType,
"makeCompletionNum":item.makeCompletionNum
// ...其他字段
};
});
const combinedData = Object.assign({}, qualityOrderData, {
qualityOrderDetailList: materialDataList,
});
// 合并表单数据和表格数据
console.log(combinedData)
// 使用 JSON.stringify() 序列化数据
const jsonData = JSON.stringify(combinedData);
// 发送 AJAX 请求到后端接口
$.operate.saveJson(prefix + "/makeStartingQuality", jsonData);
}
//物料信息展示列表
$(function() {
var options = {
modalName: "选择物料",
url: prefix + "/getMaterialListByQualityOrderCode",
queryParams: queryParams,
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
pagination: false, // 设置不分页
columns: [{
checkbox: true
},
{
title: '品质单详情ID',
field: 'qualityOrderDetailId',
visible: false
},
{
title: '料号',
field: 'materialNo'
},
{
title: '物料名称',
field: 'materialName'
},
{
title: '物料类型',
field: 'materialType',
},
{
title: '物料图片地址',
field: 'materialPhotourl',
},
{
title: '物料描述',
field: 'materialDescribe',
},
{
title: '物料品牌',
field: 'materialBrand',
},
{
title: '物料单位',
field: 'materialUnit',
},
{
title: '物料加工方式',
field: 'materialProcessMethod',
},
{
title: '生产订单数',
field: 'makeTotal',
},
{
title: '品质已合格数',
field: 'qualityHasqualifiedNum',
},
{
title: '本次到货数',
field: 'thisArrivedNum',
editable:{
type:'text',
validate: function (v) {
if (!v) return '本次到货数不能为空';
}
},
required:true
},
{
title: '品质报告',
align: 'center',
formatter: function(value, row, index) {
// 这里直接使用row对象获取supplierCode,假设它是存在的
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="makeOrderReport(\'' + row.materialNo + '\')"><i class="fa fa-plus"></i>报告</a> ');
return actions.join('');
}
},
{
title: '品质合格数',
field: 'qualityQualifiedNum',
},
{
title: '品质不合格数',
field: 'qualityUnqualifiedNum',
},
{
title: '生产完成数',
field: 'makeCompletionNum',
visible: false
},
{
title: '物料入库部门',
field: 'materialDeptType',
visible: false
}
]
};
$.table.init(options);
})
function queryParams(params) {
var curParams = {
// 传递参数查询参数
qualityOrderCode: qualityOrderCode
};
console.log(curParams);
return curParams;
}
function makeOrderReport(materialNo) {
var qualityOrderCode = [[${qualityOrder.qualityOrderCode}]];
var queryParams = new URLSearchParams();
queryParams.append('materialNo', materialNo);
queryParams.append('qualityOrderCode',encodeURIComponent(qualityOrderCode));
var url = ctx + 'quality/qualityOrder/makeOrderReport?' + queryParams.toString();
$.modal.open("品质报告", url);
}
</script>
</body>
</html>

25
ruoyi-admin/src/main/resources/templates/quality/qualityOrder/qualityOrder.html

@ -59,6 +59,9 @@
var qualityFlag = [[${@permission.hasPermi('quality:qualityOrder:startingQuality')}]];
var makeInStartingQualityFlag = [[${@permission.hasPermi('quality:qualityOrder:makeInStartingQuality')}]];
var makeInStartingQualityDetailFlag = [[${@permission.hasPermi('quality:qualityOrder:makeInStartingQualityDetail')}]];
var makeStartingQualityFlag = [[${@permission.hasPermi('quality:qualityOrder:makeStartingQuality')}]];
var makeStartingQualityDetailFlag = [[${@permission.hasPermi('quality:qualityOrder:makeStartingQualityDetail')}]];
var qualityStatusDatas = [[${@dict.getType('qualityStatus')}]];
@ -176,6 +179,15 @@
if (row.qualityStorageStatus == 1 ){
actions.push('<a class="btn btn-success btn-xs ' + makeInStartingQualityDetailFlag + '" href="javascript:void(0)" onclick="makeInStartingQualityDetail(\'' + row.qualityOrderId + '\')"><i class="fa fa-edit"></i>详情</a> ');
}
//生产订单品质
if (row.qualityStatus != 2 && row.qualityStorageStatus == 4 ){
actions.push('<a class="btn btn-success btn-xs ' + makeStartingQualityFlag + '" href="javascript:void(0)" onclick="makeStartingQuality(\'' + row.qualityOrderId + '\')"><i class="fa fa-edit"></i>品质</a> ');
}
//生产订单品质详情
if (row.qualityStorageStatus == 4 ){
actions.push('<a class="btn btn-success btn-xs ' + makeStartingQualityDetailFlag + '" href="javascript:void(0)" onclick="makeStartingQualityDetail(\'' + row.qualityOrderId + '\')"><i class="fa fa-edit"></i>详情</a> ');
}
return actions.join('');
}
}]
@ -208,6 +220,19 @@
$.modal.open("进行品质详情",url)
}
//生产入库品质
function makeStartingQuality(qualityOrderId){
var url = ctx +'quality/qualityOrder/makeStartingQuality/' + qualityOrderId;
$.modal.open("进行品质",url)
}
//生产入库品质详情
function makeStartingQualityDetail(qualityOrderId){
var url = ctx +'quality/qualityOrder/makeStartingQualityDetail/' + qualityOrderId;
$.modal.open("进行品质详情",url)
}
</script>
</body>
</html>

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

@ -104,10 +104,10 @@
field: 'materialCode',
align: 'center',
title: '料号',
formatter: function (value,row,index){
var curIndex = index;
return '<input readonly class = "form-control" data-id = "materialNo_'+curIndex+'" name="inboundDetails['+curIndex+'].materialNo" value="'+value+'">';
}
// formatter: function (value,row,index){
// var curIndex = index;
// return '<input readonly class = "form-control" data-id = "materialNo_'+curIndex+'" name="inboundDetails['+curIndex+'].materialNo" value="'+value+'">';
// }
},
{
field: 'materialName',
@ -311,13 +311,6 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
},
{
field: 'materialNum',
@ -400,7 +393,7 @@
var materialDataList = table.map(function(item) {
// 根据实际字段名调整
return {
"materialCode":item.materialCode,
"materialNo":item.materialCode,
"materialName": item.materialName,
"unit": item.unit,
"brand": item.brand,
@ -416,13 +409,13 @@
});
// 合并表单数据和表格数据
const combinedData = Object.assign({}, makeorderData, { sysEquipDetailDtos: materialDataList });
const combinedData = Object.assign({}, makeorderData, { inboundDetails: materialDataList });
console.log(combinedData)
// 使用 JSON.stringify() 序列化数据
const jsonData = JSON.stringify(combinedData);
// 发送 AJAX 请求到后端接口
$.operate.saveJson(prefix + "/addEquipmentResumeSave", jsonData);
$.operate.saveJson(prefix + "/addProduceInboundSave", jsonData);
}

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

@ -292,13 +292,6 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
},
{
field: 'materialNum',

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

@ -301,13 +301,13 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value + "%";
// }
// }
},
{
field: 'materialNum',

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

@ -289,13 +289,13 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value + "%";
// }
// }
},
{
field: 'materialNum',

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

@ -290,13 +290,13 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value + "%";
// }
// }
},
{
field: 'materialNum',

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

@ -289,13 +289,13 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value + "%";
// }
// }
},
{
field: 'materialNum',

14
ruoyi-admin/src/main/resources/templates/system/makeorderpick/detail.html

@ -278,13 +278,13 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value + "%";
// }
// }
},
{
field: 'materialNum',

14
ruoyi-admin/src/main/resources/templates/system/makeorderpick/edit.html

@ -248,13 +248,13 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value + "%";
// }
// }
},
{
field: 'materialNum',

14
ruoyi-admin/src/main/resources/templates/system/makeorderpick/taskModifyApply.html

@ -314,13 +314,13 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value + "%";
// }
// }
},
{
field: 'materialNum',

14
ruoyi-admin/src/main/resources/templates/system/makeorderpick/taskScjlVerify.html

@ -318,13 +318,13 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value + "%";
// }
// }
},
{
field: 'materialNum',

14
ruoyi-admin/src/main/resources/templates/system/makeorderpick/taskSczgVerify.html

@ -318,13 +318,13 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value + "%";
// }
// }
},
{
field: 'materialNum',

Loading…
Cancel
Save