Browse Source

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

dev
zhangsiqi 5 months ago
parent
commit
bbc6c639f8
  1. 10
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesWarehouseOutController.java
  2. 6
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesWarehouseOutService.java
  3. 10
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesWarehouseOutServiceImpl.java
  4. 50
      ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityRefundsExchangesController.java
  5. 14
      ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityRefundsExchanges.java
  6. 14
      ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityRefundsExchangesDetail.java
  7. 5
      ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesService.java
  8. 25
      ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesServiceImpl.java
  9. 154
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseOutOrderController.java
  10. 96
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseOutOrder.java
  11. 663
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseOutOrderDetail.java
  12. 84
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseOutOrderDetailMapper.java
  13. 42
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseOutOrderMapper.java
  14. 82
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseOutOrderDetailService.java
  15. 80
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseOutOrderService.java
  16. 143
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderDetailServiceImpl.java
  17. 153
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java
  18. 6
      ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesDetailMapper.xml
  19. 6
      ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesMapper.xml
  20. 262
      ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderDetailMapper.xml
  21. 31
      ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderMapper.xml
  22. 275
      ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/afterConfirmDelivery.html
  23. 275
      ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/beforeConfirmDelivery.html
  24. 21
      ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/refundsExchanges.html
  25. 2
      ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/returnAfterStorageDetail.html
  26. 252
      ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/add.html
  27. 253
      ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/edit.html
  28. 226
      ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/prepareMaterial.html
  29. 192
      ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/warehouseOutOrder.html

10
ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/WarehouseOutOrderController.java → ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesWarehouseOutController.java

@ -2,10 +2,9 @@ package com.ruoyi.aftersales.controller;
import java.util.List;
import com.ruoyi.aftersales.domain.AftersalesOrder;
import com.ruoyi.aftersales.domain.vo.SelectDeviceVO;
import com.ruoyi.aftersales.domain.vo.SelectMaterialsVO;
import com.ruoyi.aftersales.domain.vo.SelectShippingDeviceVO;
import com.ruoyi.warehouse.domain.WarehouseOutOrder;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -17,8 +16,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.aftersales.domain.WarehouseOutOrder;
import com.ruoyi.aftersales.service.IWarehouseOutOrderService;
import com.ruoyi.aftersales.service.IAftersalesWarehouseOutService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
@ -32,12 +30,12 @@ import com.ruoyi.common.core.page.TableDataInfo;
*/
@Controller
@RequestMapping("/aftersales/warehouseOutOrder")
public class WarehouseOutOrderController extends BaseController
public class AftersalesWarehouseOutController extends BaseController
{
private String prefix = "aftersales/warehouseOutOrder";
@Autowired
private IWarehouseOutOrderService warehouseOutOrderService;
private IAftersalesWarehouseOutService warehouseOutOrderService;
@RequiresPermissions("aftersales:warehouseOutOrder:view")
@GetMapping()

6
ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IWarehouseOutOrderService.java → ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesWarehouseOutService.java

@ -1,10 +1,10 @@
package com.ruoyi.aftersales.service;
import java.util.List;
import com.ruoyi.aftersales.domain.WarehouseOutOrder;
import com.ruoyi.aftersales.domain.vo.SelectDeviceVO;
import com.ruoyi.aftersales.domain.vo.SelectMaterialsVO;
import com.ruoyi.aftersales.domain.vo.SelectShippingDeviceVO;
import com.ruoyi.warehouse.domain.WarehouseOutOrder;
/**
* 出库单Service接口
@ -12,7 +12,7 @@ import com.ruoyi.aftersales.domain.vo.SelectShippingDeviceVO;
* @author 刘晓旭
* @date 2024-04-23
*/
public interface IWarehouseOutOrderService
public interface IAftersalesWarehouseOutService
{
/**
* 查询出库单

10
ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/WarehouseOutOrderServiceImpl.java → ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesWarehouseOutServiceImpl.java

@ -12,14 +12,12 @@ import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.domain.SysSalesOrderChild;
import com.ruoyi.system.mapper.SysSalesOrderChildMapper;
import com.ruoyi.warehouse.domain.WarehouseOutOrder;
import com.ruoyi.warehouse.mapper.WarehouseOutOrderMapper;
import lombok.extern.slf4j.Slf4j;
import net.bytebuddy.implementation.bytecode.Throw;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.parameters.P;
import org.springframework.stereotype.Service;
import com.ruoyi.aftersales.mapper.WarehouseOutOrderMapper;
import com.ruoyi.aftersales.domain.WarehouseOutOrder;
import com.ruoyi.aftersales.service.IWarehouseOutOrderService;
import com.ruoyi.aftersales.service.IAftersalesWarehouseOutService;
import com.ruoyi.common.core.text.Convert;
/**
@ -30,7 +28,7 @@ import com.ruoyi.common.core.text.Convert;
*/
@Service
@Slf4j
public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService
public class AftersalesWarehouseOutServiceImpl implements IAftersalesWarehouseOutService
{
@Autowired
private WarehouseOutOrderMapper warehouseOutOrderMapper;

50
ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityRefundsExchangesController.java

@ -352,9 +352,6 @@ public class QualityRefundsExchangesController extends BaseController
return toAjax(qualityRefundsExchangesService.returnBeforeStorageDetail(qualityRefundsExchanges));
}
/**
* 入库后退货-选择供应商-无供应商
*/
@ -391,4 +388,51 @@ public class QualityRefundsExchangesController extends BaseController
/**
* 入库前退货-确认收货
*/
@GetMapping("/beforeConfirmDelivery/{refundsExchangesId}")
public String beforeConfirmDelivery(@PathVariable("refundsExchangesId") Long refundsExchangesId, ModelMap mmap)
{
QualityRefundsExchanges qualityRefundsExchanges = qualityRefundsExchangesService.selectQualityRefundsExchangesById(refundsExchangesId);
mmap.put("qualityRefundsExchanges", qualityRefundsExchanges);
return prefix + "/beforeConfirmDelivery";
}
/**
* 保存入库前退货-确认收货
*/
@RequiresPermissions("quality:refundsExchanges:beforeConfirmDelivery")
@Log(title = "品质管理退换货单", businessType = BusinessType.UPDATE)
@PostMapping("/beforeConfirmDelivery")
@ResponseBody
public AjaxResult beforeConfirmDeliverySave(@RequestBody QualityRefundsExchanges qualityRefundsExchanges)
{
return toAjax(qualityRefundsExchangesService.updateBeforeConfirmDelivery(qualityRefundsExchanges));
}
/**
* 入库后退货-确认收货
*/
@GetMapping("/afterConfirmDelivery/{refundsExchangesId}")
public String afterConfirmDelivery(@PathVariable("refundsExchangesId") Long refundsExchangesId, ModelMap mmap)
{
QualityRefundsExchanges qualityRefundsExchanges = qualityRefundsExchangesService.selectQualityRefundsExchangesById(refundsExchangesId);
mmap.put("qualityRefundsExchanges", qualityRefundsExchanges);
return prefix + "/afterConfirmDelivery";
}
/**
* 保存入库后退货-确认收货
*/
@RequiresPermissions("quality:refundsExchanges:afterConfirmDelivery")
@Log(title = "品质管理退换货单", businessType = BusinessType.UPDATE)
@PostMapping("/afterConfirmDelivery")
@ResponseBody
public AjaxResult afterConfirmDeliverySave(@RequestBody QualityRefundsExchanges qualityRefundsExchanges)
{
return toAjax(qualityRefundsExchangesService.updateBeforeConfirmDelivery(qualityRefundsExchanges));
}
}

14
ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityRefundsExchanges.java

@ -38,6 +38,10 @@ public class QualityRefundsExchanges extends BaseEntity
@Excel(name = "采购状态")
private String qualityPurchaseStatus;
/** 收货状态 */
@Excel(name = "收货状态")
private String qualityDeliveryStatus;
/** 关联订单号 */
@Excel(name = "关联订单号")
private String relatedOrderCode;
@ -120,6 +124,15 @@ public class QualityRefundsExchanges extends BaseEntity
{
return qualityPurchaseStatus;
}
public String getQualityDeliveryStatus() {
return qualityDeliveryStatus;
}
public void setQualityDeliveryStatus(String qualityDeliveryStatus) {
this.qualityDeliveryStatus = qualityDeliveryStatus;
}
public void setRelatedOrderCode(String relatedOrderCode)
{
this.relatedOrderCode = relatedOrderCode;
@ -208,6 +221,7 @@ public class QualityRefundsExchanges extends BaseEntity
.append("refundsExchangesStatus", getRefundsExchangesStatus())
.append("qualityWarehouseStatus", getQualityWarehouseStatus())
.append("qualityPurchaseStatus", getQualityPurchaseStatus())
.append("qualityDeliveryStatus",getQualityDeliveryStatus())
.append("relatedOrderCode", getRelatedOrderCode())
.append("inStorageCode", getInStorageCode())
.append("warehouseStorageType", getWarehouseStorageType())

14
ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityRefundsExchangesDetail.java

@ -38,6 +38,10 @@ public class QualityRefundsExchangesDetail extends BaseEntity
@Excel(name = "采购状态")
private String qualityPurchaseStatus;
/** 收货状态 */
@Excel(name = "收货状态")
private String qualityDeliveryStatus;
/** 关联订单号 */
@Excel(name = "关联订单号")
private String relatedOrderCode;
@ -183,6 +187,15 @@ public class QualityRefundsExchangesDetail extends BaseEntity
{
return qualityPurchaseStatus;
}
public String getQualityDeliveryStatus() {
return qualityDeliveryStatus;
}
public void setQualityDeliveryStatus(String qualityDeliveryStatus) {
this.qualityDeliveryStatus = qualityDeliveryStatus;
}
public void setRelatedOrderCode(String relatedOrderCode)
{
this.relatedOrderCode = relatedOrderCode;
@ -401,6 +414,7 @@ public class QualityRefundsExchangesDetail extends BaseEntity
.append("refundsExchangesStatus", getRefundsExchangesStatus())
.append("qualityWarehouseStatus", getQualityWarehouseStatus())
.append("qualityPurchaseStatus", getQualityPurchaseStatus())
.append("qualityDeliveryStatus",getQualityDeliveryStatus())
.append("relatedOrderCode", getRelatedOrderCode())
.append("inStorageCode", getInStorageCode())
.append("qualityReturnNode", getQualityReturnNode())

5
ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesService.java

@ -84,4 +84,9 @@ public interface IQualityRefundsExchangesService
* 保存入库后退货-选择供应商-无供应商
*/
int updateAfterNoConfirmSupplier(QualityRefundsExchanges qualityRefundsExchanges);
/**
* 保存入库前退货-确认供应商
*/
int updateBeforeConfirmDelivery(QualityRefundsExchanges qualityRefundsExchanges);
}

25
ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesServiceImpl.java

@ -208,6 +208,31 @@ public class QualityRefundsExchangesServiceImpl implements IQualityRefundsExchan
return updateRows;
}
/**
* 保存入库前退货-确认供应商
*/
@Override
public int updateBeforeConfirmDelivery(QualityRefundsExchanges qualityRefundsExchanges) {
String loginName = ShiroUtils.getLoginName();
List<QualityRefundsExchangesDetail> refundsExchangesDetails = qualityRefundsExchanges.getRefundsExchangesDetails();
if (StringUtils.isEmpty(refundsExchangesDetails)){
log.warn("换货单[{}]无关联的物料详情信息", qualityRefundsExchanges.getRefundsExchangesCode());
}
int updateRows = 0;
for (QualityRefundsExchangesDetail refundsExchangesDetail : refundsExchangesDetails) {
refundsExchangesDetail.setRefundsExchangesCode(qualityRefundsExchanges.getRefundsExchangesCode());
refundsExchangesDetail.setUpdateBy(loginName);
refundsExchangesDetail.setUpdateTime(new Date());
//更新数据库记录
updateRows += refundsExchangesDetailMapper.updateQualityRefundsExchangesDetail(refundsExchangesDetail);
}
return updateRows;
}
/**
*退换货单号:

154
ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseOutOrderController.java

@ -0,0 +1,154 @@
package com.ruoyi.warehouse.controller;
import java.util.List;
import com.ruoyi.warehouse.domain.WarehouseOutOrderDetail;
import com.ruoyi.warehouse.service.IWarehouseOutOrderDetailService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.warehouse.domain.WarehouseOutOrder;
import com.ruoyi.warehouse.service.IWarehouseOutOrderService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 仓库出库单Controller
*
* @author 刘晓旭
* @date 2024-06-04
*/
@Controller
@RequestMapping("/warehouse/warehouseOutOrder")
public class WarehouseOutOrderController extends BaseController
{
private String prefix = "warehouse/warehouseOutOrder";
@Autowired
private IWarehouseOutOrderService warehouseOutOrderService;
@Autowired
private IWarehouseOutOrderDetailService outOrderDetailService;
@RequiresPermissions("warehouse:warehouseOutOrder:view")
@GetMapping()
public String warehouseOutOrder()
{
return prefix + "/warehouseOutOrder";
}
/**
* 查询仓库出库单列表
*/
@RequiresPermissions("warehouse:warehouseOutOrder:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(WarehouseOutOrder warehouseOutOrder)
{
startPage();
List<WarehouseOutOrder> list = warehouseOutOrderService.selectWarehouseOutOrderList(warehouseOutOrder);
return getDataTable(list);
}
/**
* 导出仓库出库单列表
*/
@RequiresPermissions("warehouse:warehouseOutOrder:export")
@Log(title = "仓库出库单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(WarehouseOutOrder warehouseOutOrder)
{
List<WarehouseOutOrder> list = warehouseOutOrderService.selectWarehouseOutOrderList(warehouseOutOrder);
ExcelUtil<WarehouseOutOrder> util = new ExcelUtil<WarehouseOutOrder>(WarehouseOutOrder.class);
return util.exportExcel(list, "仓库出库单数据");
}
/**
* 新增仓库出库单
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存仓库出库单
*/
@RequiresPermissions("warehouse:warehouseOutOrder:add")
@Log(title = "仓库出库单", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(WarehouseOutOrder warehouseOutOrder)
{
return toAjax(warehouseOutOrderService.insertWarehouseOutOrder(warehouseOutOrder));
}
/**
* 修改仓库出库单
*/
@GetMapping("/edit/{outOrderId}")
public String edit(@PathVariable("outOrderId") Long outOrderId, ModelMap mmap)
{
WarehouseOutOrder warehouseOutOrder = warehouseOutOrderService.selectWarehouseOutOrderById(outOrderId);
mmap.put("warehouseOutOrder", warehouseOutOrder);
return prefix + "/edit";
}
/**
* 修改保存仓库出库单
*/
@RequiresPermissions("warehouse:warehouseOutOrder:edit")
@Log(title = "仓库出库单", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(WarehouseOutOrder warehouseOutOrder)
{
return toAjax(warehouseOutOrderService.updateWarehouseOutOrder(warehouseOutOrder));
}
/**
* 销售单-准备物料
*/
@GetMapping("/prepareMaterial/{outOrderId}")
public String prepareMaterial(@PathVariable("outOrderId") Long outOrderId, ModelMap mmap)
{
WarehouseOutOrder warehouseOutOrder = warehouseOutOrderService.selectWarehouseOutOrderById(outOrderId);
mmap.put("warehouseOutOrder", warehouseOutOrder);
return prefix + "/prepareMaterial";
}
/**
* 修改保存销售单-准备物料
*/
@RequiresPermissions("warehouse:warehouseOutOrder:prepareMaterial")
@Log(title = "仓库出库单", businessType = BusinessType.UPDATE)
@PostMapping("/prepareMaterial")
@ResponseBody
public AjaxResult prepareMaterialSave(@RequestBody WarehouseOutOrder warehouseOutOrder)
{
return toAjax(warehouseOutOrderService.updatePrepareMaterial(warehouseOutOrder));
}
/**
* 销售单-准备物料 物料相关信息
*/
@PostMapping("/getMaterialListByOutOrderCode")
@ResponseBody
public TableDataInfo getMaterialListByOutOrderCode(WarehouseOutOrder warehouseOutOrder)
{
startPage();
List<WarehouseOutOrderDetail> list = outOrderDetailService.selectOutOrderDetailListByCode(warehouseOutOrder);
return getDataTable(list);
}
}

96
ruoyi-admin/src/main/java/com/ruoyi/aftersales/domain/WarehouseOutOrder.java → ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseOutOrder.java

@ -1,6 +1,8 @@
package com.ruoyi.aftersales.domain;
package com.ruoyi.warehouse.domain;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
@ -8,10 +10,10 @@ import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 出库单对象 warehouse_out_order
* 仓库出库单对象 warehouse_out_order
*
* @author 刘晓旭
* @date 2024-04-23
* @date 2024-06-04
*/
public class WarehouseOutOrder extends BaseEntity
{
@ -42,15 +44,21 @@ public class WarehouseOutOrder extends BaseEntity
@Excel(name = "订单类型")
private String warehouseOrderType;
/** 委外单号 */
private String outMakeCode;
/** 出库类型 */
@Excel(name = "出库类型")
private String warehouseOutType;
/** 请购单号 */
private String requisitioningCode;
/** 业务人员 */
@Excel(name = "业务人员")
private String businessName;
/** 售后人员 */
@Excel(name = "售后人员")
private String aftersalesName;
/** 仓库员 */
@ -75,6 +83,7 @@ public class WarehouseOutOrder extends BaseEntity
private Integer enterpriseSum;
/** 出库数 */
@Excel(name = "出库数")
private Integer outOrderSum;
/** 出库对象 */
@ -94,27 +103,33 @@ public class WarehouseOutOrder extends BaseEntity
/** 申请人员 */
private String applyName;
/** 供应商ID */
private String supplierCode;
/** 计划交付时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "计划交付时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date planDeliveryTime;
/** 供应商名称 */
private String supplierName;
/** 交付条件 */
@Excel(name = "交付条件")
private String deliveryCondition;
/** 收货地址 */
@Excel(name = "收货地址")
private String deliveryAddress;
/** 联系人 */
@Excel(name = "联系人")
private String deliveryName;
/** 联系电话 */
@Excel(name = "联系电话")
private String deliveryNumber;
/** 送货日期 */
private Date deliveryDate;
/** 仓库出库单详情*/
private List<WarehouseOutOrderDetail> warehouseOutOrderDetailList;
public void setOutOrderId(Long outOrderId)
{
this.outOrderId = outOrderId;
@ -178,6 +193,15 @@ public class WarehouseOutOrder extends BaseEntity
{
return warehouseOrderType;
}
public void setOutMakeCode(String outMakeCode)
{
this.outMakeCode = outMakeCode;
}
public String getOutMakeCode()
{
return outMakeCode;
}
public void setWarehouseOutType(String warehouseOutType)
{
this.warehouseOutType = warehouseOutType;
@ -187,6 +211,15 @@ public class WarehouseOutOrder extends BaseEntity
{
return warehouseOutType;
}
public void setRequisitioningCode(String requisitioningCode)
{
this.requisitioningCode = requisitioningCode;
}
public String getRequisitioningCode()
{
return requisitioningCode;
}
public void setBusinessName(String businessName)
{
this.businessName = businessName;
@ -313,6 +346,15 @@ public class WarehouseOutOrder extends BaseEntity
{
return applyName;
}
public void setSupplierCode(String supplierCode)
{
this.supplierCode = supplierCode;
}
public String getSupplierCode()
{
return supplierCode;
}
public void setPlanDeliveryTime(Date planDeliveryTime)
{
this.planDeliveryTime = planDeliveryTime;
@ -322,6 +364,15 @@ public class WarehouseOutOrder extends BaseEntity
{
return planDeliveryTime;
}
public void setSupplierName(String supplierName)
{
this.supplierName = supplierName;
}
public String getSupplierName()
{
return supplierName;
}
public void setDeliveryCondition(String deliveryCondition)
{
this.deliveryCondition = deliveryCondition;
@ -358,6 +409,24 @@ public class WarehouseOutOrder extends BaseEntity
{
return deliveryNumber;
}
public void setDeliveryDate(Date deliveryDate)
{
this.deliveryDate = deliveryDate;
}
public Date getDeliveryDate()
{
return deliveryDate;
}
public List<WarehouseOutOrderDetail> getWarehouseOutOrderDetailList() {
return warehouseOutOrderDetailList;
}
public void setWarehouseOutOrderDetailList(List<WarehouseOutOrderDetail> warehouseOutOrderDetailList) {
this.warehouseOutOrderDetailList = warehouseOutOrderDetailList;
}
@Override
public String toString() {
@ -369,7 +438,9 @@ public class WarehouseOutOrder extends BaseEntity
.append("relatedOrderCode", getRelatedOrderCode())
.append("salesOrderCode", getSalesOrderCode())
.append("warehouseOrderType", getWarehouseOrderType())
.append("outMakeCode", getOutMakeCode())
.append("warehouseOutType", getWarehouseOutType())
.append("requisitioningCode", getRequisitioningCode())
.append("businessName", getBusinessName())
.append("aftersalesName", getAftersalesName())
.append("warehouseName", getWarehouseName())
@ -384,15 +455,20 @@ public class WarehouseOutOrder extends BaseEntity
.append("customerId", getCustomerId())
.append("customerName", getCustomerName())
.append("applyName", getApplyName())
.append("supplierCode", getSupplierCode())
.append("planDeliveryTime", getPlanDeliveryTime())
.append("supplierName", getSupplierName())
.append("deliveryCondition", getDeliveryCondition())
.append("deliveryAddress", getDeliveryAddress())
.append("deliveryName", getDeliveryName())
.append("deliveryNumber", getDeliveryNumber())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("deliveryDate", getDeliveryDate())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("warehouseOutOrderDetailList",getWarehouseOutOrderDetailList())
.toString();
}
}

663
ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseOutOrderDetail.java

@ -0,0 +1,663 @@
package com.ruoyi.warehouse.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 出库单详情对象 warehouse_out_order_detail
*
* @author 刘晓旭
* @date 2024-06-04
*/
public class WarehouseOutOrderDetail extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 出库单详情Id */
private Long outOrderDetailId;
/** 出库单号 */
@Excel(name = "出库单号")
private String outOrderCode;
/** 关联生产订单号 */
@Excel(name = "关联生产订单号")
private String makeNo;
/** 出库状态 */
@Excel(name = "出库状态")
private String warehouseOutStatus;
/** 关联订单号(多种订单类型) */
@Excel(name = "关联订单号", readConverterExp = "多=种订单类型")
private String relatedOrderCode;
/** 关联销售订单编号 */
@Excel(name = "关联销售订单编号")
private String salesOrderCode;
/** 出库订单类型 */
@Excel(name = "出库订单类型")
private String warehouseOrderType;
/** 委外单号 */
@Excel(name = "委外单号")
private String outMakeCode;
/** 请购单号 */
@Excel(name = "请购单号")
private String requisitioningCode;
/** 出库类型 */
@Excel(name = "出库类型")
private String warehouseOutType;
/** 业务人员 */
@Excel(name = "业务人员")
private String businessName;
/** 售后人员 */
@Excel(name = "售后人员")
private String aftersalesName;
/** 仓库人员 */
@Excel(name = "仓库人员")
private String warehouseName;
/** 出货设备id */
@Excel(name = "出货设备id")
private String shippingDeviceId;
/** 料号 */
@Excel(name = "料号")
private String materialNo;
/** 物料名称 */
@Excel(name = "物料名称")
private String materialName;
/** 物料类型 */
@Excel(name = "物料类型")
private String materialType;
/** 物料图片地址 */
@Excel(name = "物料图片地址")
private String materialPhotourl;
/** 物料品牌 */
@Excel(name = "物料品牌")
private String materialBrand;
/** 物料单位 */
@Excel(name = "物料单位")
private String materialUnit;
/** 物料描述 */
@Excel(name = "物料描述")
private String materialDescribe;
/** 物料加工方式 */
@Excel(name = "物料加工方式")
private String materialProcessMethod;
/** 物料型号 */
@Excel(name = "物料型号")
private String materialModel;
/** 物料规格 */
@Excel(name = "物料规格")
private String materialSpecification;
/** 物料数合计 */
@Excel(name = "物料数合计")
private Integer materialSum;
/** 数量合计 */
@Excel(name = "数量合计")
private Integer enterpriseSum;
/** 生产订单数 */
@Excel(name = "生产订单数")
private Integer makeNum;
/** 出库数 */
@Excel(name = "出库数")
private Integer outOrderSum;
/** 已出库数 */
@Excel(name = "已出库数")
private Integer hasOutOrderSum;
/** 申请出库数 */
@Excel(name = "申请出库数")
private Integer applyOutOrderSum;
/** 准备出库数 */
@Excel(name = "准备出库数")
private Integer prepareOutOrderSum;
/** 实际出库数 */
@Excel(name = "实际出库数")
private Integer actualOutOrderSum;
/** 出库对象 */
@Excel(name = "出库对象")
private String outOrderName;
/** 出库时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "出库时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date outOrderTime;
/** 供应商ID */
@Excel(name = "供应商ID")
private String supplierCode;
/** 供应商名称 */
@Excel(name = "供应商名称")
private String supplierName;
/** 客户ID */
@Excel(name = "客户ID")
private String customerId;
/** 客户名称 */
@Excel(name = "客户名称")
private String customerName;
/** 计划交付时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "计划交付时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date planDeliveryTime;
/** 送货日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "送货日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date deliveryDate;
/** 交付条件 */
@Excel(name = "交付条件")
private String deliveryCondition;
/** 申请人 */
@Excel(name = "申请人")
private String applyName;
/** 收货地址 */
@Excel(name = "收货地址")
private String deliveryAddress;
/** 收货联系人 */
@Excel(name = "收货联系人")
private String deliveryName;
/** 收货电话 */
@Excel(name = "收货电话")
private String deliveryNumber;
public void setOutOrderDetailId(Long outOrderDetailId)
{
this.outOrderDetailId = outOrderDetailId;
}
public Long getOutOrderDetailId()
{
return outOrderDetailId;
}
public void setOutOrderCode(String outOrderCode)
{
this.outOrderCode = outOrderCode;
}
public String getOutOrderCode()
{
return outOrderCode;
}
public void setMakeNo(String makeNo)
{
this.makeNo = makeNo;
}
public String getMakeNo()
{
return makeNo;
}
public void setWarehouseOutStatus(String warehouseOutStatus)
{
this.warehouseOutStatus = warehouseOutStatus;
}
public String getWarehouseOutStatus()
{
return warehouseOutStatus;
}
public void setRelatedOrderCode(String relatedOrderCode)
{
this.relatedOrderCode = relatedOrderCode;
}
public String getRelatedOrderCode()
{
return relatedOrderCode;
}
public void setSalesOrderCode(String salesOrderCode)
{
this.salesOrderCode = salesOrderCode;
}
public String getSalesOrderCode()
{
return salesOrderCode;
}
public void setWarehouseOrderType(String warehouseOrderType)
{
this.warehouseOrderType = warehouseOrderType;
}
public String getWarehouseOrderType()
{
return warehouseOrderType;
}
public void setOutMakeCode(String outMakeCode)
{
this.outMakeCode = outMakeCode;
}
public String getOutMakeCode()
{
return outMakeCode;
}
public void setRequisitioningCode(String requisitioningCode)
{
this.requisitioningCode = requisitioningCode;
}
public String getRequisitioningCode()
{
return requisitioningCode;
}
public void setWarehouseOutType(String warehouseOutType)
{
this.warehouseOutType = warehouseOutType;
}
public String getWarehouseOutType()
{
return warehouseOutType;
}
public void setBusinessName(String businessName)
{
this.businessName = businessName;
}
public String getBusinessName()
{
return businessName;
}
public void setAftersalesName(String aftersalesName)
{
this.aftersalesName = aftersalesName;
}
public String getAftersalesName()
{
return aftersalesName;
}
public void setWarehouseName(String warehouseName)
{
this.warehouseName = warehouseName;
}
public String getWarehouseName()
{
return warehouseName;
}
public void setShippingDeviceId(String shippingDeviceId)
{
this.shippingDeviceId = shippingDeviceId;
}
public String getShippingDeviceId()
{
return shippingDeviceId;
}
public void setMaterialNo(String materialNo)
{
this.materialNo = materialNo;
}
public String getMaterialNo()
{
return materialNo;
}
public void setMaterialName(String materialName)
{
this.materialName = materialName;
}
public String getMaterialName()
{
return materialName;
}
public void setMaterialType(String materialType)
{
this.materialType = materialType;
}
public String getMaterialType()
{
return materialType;
}
public void setMaterialPhotourl(String materialPhotourl)
{
this.materialPhotourl = materialPhotourl;
}
public String getMaterialPhotourl()
{
return materialPhotourl;
}
public void setMaterialBrand(String materialBrand)
{
this.materialBrand = materialBrand;
}
public String getMaterialBrand()
{
return materialBrand;
}
public void setMaterialUnit(String materialUnit)
{
this.materialUnit = materialUnit;
}
public String getMaterialUnit()
{
return materialUnit;
}
public void setMaterialDescribe(String materialDescribe)
{
this.materialDescribe = materialDescribe;
}
public String getMaterialDescribe()
{
return materialDescribe;
}
public void setMaterialProcessMethod(String materialProcessMethod)
{
this.materialProcessMethod = materialProcessMethod;
}
public String getMaterialProcessMethod()
{
return materialProcessMethod;
}
public void setMaterialModel(String materialModel)
{
this.materialModel = materialModel;
}
public String getMaterialModel()
{
return materialModel;
}
public void setMaterialSpecification(String materialSpecification)
{
this.materialSpecification = materialSpecification;
}
public String getMaterialSpecification()
{
return materialSpecification;
}
public void setMaterialSum(Integer materialSum)
{
this.materialSum = materialSum;
}
public Integer getMaterialSum()
{
return materialSum;
}
public void setEnterpriseSum(Integer enterpriseSum)
{
this.enterpriseSum = enterpriseSum;
}
public Integer getEnterpriseSum()
{
return enterpriseSum;
}
public void setMakeNum(Integer makeNum)
{
this.makeNum = makeNum;
}
public Integer getMakeNum()
{
return makeNum;
}
public void setOutOrderSum(Integer outOrderSum)
{
this.outOrderSum = outOrderSum;
}
public Integer getOutOrderSum()
{
return outOrderSum;
}
public void setHasOutOrderSum(Integer hasOutOrderSum)
{
this.hasOutOrderSum = hasOutOrderSum;
}
public Integer getHasOutOrderSum()
{
return hasOutOrderSum;
}
public void setApplyOutOrderSum(Integer applyOutOrderSum)
{
this.applyOutOrderSum = applyOutOrderSum;
}
public Integer getApplyOutOrderSum()
{
return applyOutOrderSum;
}
public void setPrepareOutOrderSum(Integer prepareOutOrderSum)
{
this.prepareOutOrderSum = prepareOutOrderSum;
}
public Integer getPrepareOutOrderSum()
{
return prepareOutOrderSum;
}
public void setActualOutOrderSum(Integer actualOutOrderSum)
{
this.actualOutOrderSum = actualOutOrderSum;
}
public Integer getActualOutOrderSum()
{
return actualOutOrderSum;
}
public void setOutOrderName(String outOrderName)
{
this.outOrderName = outOrderName;
}
public String getOutOrderName()
{
return outOrderName;
}
public void setOutOrderTime(Date outOrderTime)
{
this.outOrderTime = outOrderTime;
}
public Date getOutOrderTime()
{
return outOrderTime;
}
public void setSupplierCode(String supplierCode)
{
this.supplierCode = supplierCode;
}
public String getSupplierCode()
{
return supplierCode;
}
public void setSupplierName(String supplierName)
{
this.supplierName = supplierName;
}
public String getSupplierName()
{
return supplierName;
}
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 setPlanDeliveryTime(Date planDeliveryTime)
{
this.planDeliveryTime = planDeliveryTime;
}
public Date getPlanDeliveryTime()
{
return planDeliveryTime;
}
public void setDeliveryDate(Date deliveryDate)
{
this.deliveryDate = deliveryDate;
}
public Date getDeliveryDate()
{
return deliveryDate;
}
public void setDeliveryCondition(String deliveryCondition)
{
this.deliveryCondition = deliveryCondition;
}
public String getDeliveryCondition()
{
return deliveryCondition;
}
public void setApplyName(String applyName)
{
this.applyName = applyName;
}
public String getApplyName()
{
return applyName;
}
public void setDeliveryAddress(String deliveryAddress)
{
this.deliveryAddress = deliveryAddress;
}
public String getDeliveryAddress()
{
return deliveryAddress;
}
public void setDeliveryName(String deliveryName)
{
this.deliveryName = deliveryName;
}
public String getDeliveryName()
{
return deliveryName;
}
public void setDeliveryNumber(String deliveryNumber)
{
this.deliveryNumber = deliveryNumber;
}
public String getDeliveryNumber()
{
return deliveryNumber;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("outOrderDetailId", getOutOrderDetailId())
.append("outOrderCode", getOutOrderCode())
.append("makeNo", getMakeNo())
.append("warehouseOutStatus", getWarehouseOutStatus())
.append("relatedOrderCode", getRelatedOrderCode())
.append("salesOrderCode", getSalesOrderCode())
.append("warehouseOrderType", getWarehouseOrderType())
.append("outMakeCode", getOutMakeCode())
.append("requisitioningCode", getRequisitioningCode())
.append("warehouseOutType", getWarehouseOutType())
.append("businessName", getBusinessName())
.append("aftersalesName", getAftersalesName())
.append("warehouseName", getWarehouseName())
.append("shippingDeviceId", getShippingDeviceId())
.append("materialNo", getMaterialNo())
.append("materialName", getMaterialName())
.append("materialType", getMaterialType())
.append("materialPhotourl", getMaterialPhotourl())
.append("materialBrand", getMaterialBrand())
.append("materialUnit", getMaterialUnit())
.append("materialDescribe", getMaterialDescribe())
.append("materialProcessMethod", getMaterialProcessMethod())
.append("materialModel", getMaterialModel())
.append("materialSpecification", getMaterialSpecification())
.append("materialSum", getMaterialSum())
.append("enterpriseSum", getEnterpriseSum())
.append("makeNum", getMakeNum())
.append("outOrderSum", getOutOrderSum())
.append("hasOutOrderSum", getHasOutOrderSum())
.append("applyOutOrderSum", getApplyOutOrderSum())
.append("prepareOutOrderSum", getPrepareOutOrderSum())
.append("actualOutOrderSum", getActualOutOrderSum())
.append("outOrderName", getOutOrderName())
.append("outOrderTime", getOutOrderTime())
.append("supplierCode", getSupplierCode())
.append("supplierName", getSupplierName())
.append("customerId", getCustomerId())
.append("customerName", getCustomerName())
.append("planDeliveryTime", getPlanDeliveryTime())
.append("deliveryDate", getDeliveryDate())
.append("deliveryCondition", getDeliveryCondition())
.append("applyName", getApplyName())
.append("deliveryAddress", getDeliveryAddress())
.append("deliveryName", getDeliveryName())
.append("deliveryNumber", getDeliveryNumber())
.append("remark", getRemark())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

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

@ -0,0 +1,84 @@
package com.ruoyi.warehouse.mapper;
import java.util.List;
import com.ruoyi.warehouse.domain.WarehouseOutOrder;
import com.ruoyi.warehouse.domain.WarehouseOutOrderDetail;
/**
* 出库单详情Mapper接口
*
* @author 刘晓旭
* @date 2024-06-04
*/
public interface WarehouseOutOrderDetailMapper
{
/**
* 查询出库单详情
*
* @param outOrderDetailId 出库单详情ID
* @return 出库单详情
*/
public WarehouseOutOrderDetail selectWarehouseOutOrderDetailById(Long outOrderDetailId);
/**
* 查询出库单详情列表
*
* @param warehouseOutOrderDetail 出库单详情
* @return 出库单详情集合
*/
public List<WarehouseOutOrderDetail> selectWarehouseOutOrderDetailList(WarehouseOutOrderDetail warehouseOutOrderDetail);
/**
* 新增出库单详情
*
* @param warehouseOutOrderDetail 出库单详情
* @return 结果
*/
public int insertWarehouseOutOrderDetail(WarehouseOutOrderDetail warehouseOutOrderDetail);
/**
* 修改出库单详情
*
* @param warehouseOutOrderDetail 出库单详情
* @return 结果
*/
public int updateWarehouseOutOrderDetail(WarehouseOutOrderDetail warehouseOutOrderDetail);
/**
* 删除出库单详情
*
* @param outOrderDetailId 出库单详情ID
* @return 结果
*/
public int deleteWarehouseOutOrderDetailById(Long outOrderDetailId);
/**
* 批量删除出库单详情
*
* @param outOrderDetailIds 需要删除的数据ID
* @return 结果
*/
public int deleteWarehouseOutOrderDetailByIds(String[] outOrderDetailIds);
/**
* 作废出库单详情
*
* @param outOrderDetailId 出库单详情ID
* @return 结果
*/
public int cancelWarehouseOutOrderDetailById(Long outOrderDetailId);
/**
* 恢复出库单详情
*
* @param outOrderDetailId 出库单详情ID
* @return 结果
*/
public int restoreWarehouseOutOrderDetailById(Long outOrderDetailId);
/**
* 销售单-准备物料 物料相关信息
*/
List<WarehouseOutOrderDetail> selectOutOrderDetailListByCode(String outOrderCode);
}

42
ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/WarehouseOutOrderMapper.java → ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseOutOrderMapper.java

@ -1,58 +1,58 @@
package com.ruoyi.aftersales.mapper;
package com.ruoyi.warehouse.mapper;
import java.util.List;
import com.ruoyi.aftersales.domain.WarehouseOutOrder;
import com.ruoyi.warehouse.domain.WarehouseOutOrder;
/**
* 出库单Mapper接口
* 仓库出库单Mapper接口
*
* @author 刘晓旭
* @date 2024-04-23
* @date 2024-06-04
*/
public interface WarehouseOutOrderMapper
{
/**
* 查询出库单
* 查询仓库出库单
*
* @param outOrderId 出库单ID
* @return 出库单
* @param outOrderId 仓库出库单ID
* @return 仓库出库单
*/
public WarehouseOutOrder selectWarehouseOutOrderById(Long outOrderId);
/**
* 查询出库单列表
* 查询仓库出库单列表
*
* @param warehouseOutOrder 出库单
* @return 出库单集合
* @param warehouseOutOrder 仓库出库单
* @return 仓库出库单集合
*/
public List<WarehouseOutOrder> selectWarehouseOutOrderList(WarehouseOutOrder warehouseOutOrder);
/**
* 新增出库单
* 新增仓库出库单
*
* @param warehouseOutOrder 出库单
* @param warehouseOutOrder 仓库出库单
* @return 结果
*/
public int insertWarehouseOutOrder(WarehouseOutOrder warehouseOutOrder);
/**
* 修改出库单
* 修改仓库出库单
*
* @param warehouseOutOrder 出库单
* @param warehouseOutOrder 仓库出库单
* @return 结果
*/
public int updateWarehouseOutOrder(WarehouseOutOrder warehouseOutOrder);
/**
* 删除出库单
* 删除仓库出库单
*
* @param outOrderId 出库单ID
* @param outOrderId 仓库出库单ID
* @return 结果
*/
public int deleteWarehouseOutOrderById(Long outOrderId);
/**
* 批量删除出库单
* 批量删除仓库出库单
*
* @param outOrderIds 需要删除的数据ID
* @return 结果
@ -60,17 +60,17 @@ public interface WarehouseOutOrderMapper
public int deleteWarehouseOutOrderByIds(String[] outOrderIds);
/**
* 作废出库单
* 作废仓库出库单
*
* @param outOrderId 出库单ID
* @param outOrderId 仓库出库单ID
* @return 结果
*/
public int cancelWarehouseOutOrderById(Long outOrderId);
/**
* 恢复出库单
* 恢复仓库出库单
*
* @param outOrderId 出库单ID
* @param outOrderId 仓库出库单ID
* @return 结果
*/
public int restoreWarehouseOutOrderById(Long outOrderId);

82
ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseOutOrderDetailService.java

@ -0,0 +1,82 @@
package com.ruoyi.warehouse.service;
import java.util.List;
import com.ruoyi.warehouse.domain.WarehouseOutOrder;
import com.ruoyi.warehouse.domain.WarehouseOutOrderDetail;
/**
* 出库单详情Service接口
*
* @author 刘晓旭
* @date 2024-06-04
*/
public interface IWarehouseOutOrderDetailService
{
/**
* 查询出库单详情
*
* @param outOrderDetailId 出库单详情ID
* @return 出库单详情
*/
public WarehouseOutOrderDetail selectWarehouseOutOrderDetailById(Long outOrderDetailId);
/**
* 查询出库单详情列表
*
* @param warehouseOutOrderDetail 出库单详情
* @return 出库单详情集合
*/
public List<WarehouseOutOrderDetail> selectWarehouseOutOrderDetailList(WarehouseOutOrderDetail warehouseOutOrderDetail);
/**
* 新增出库单详情
*
* @param warehouseOutOrderDetail 出库单详情
* @return 结果
*/
public int insertWarehouseOutOrderDetail(WarehouseOutOrderDetail warehouseOutOrderDetail);
/**
* 修改出库单详情
*
* @param warehouseOutOrderDetail 出库单详情
* @return 结果
*/
public int updateWarehouseOutOrderDetail(WarehouseOutOrderDetail warehouseOutOrderDetail);
/**
* 批量删除出库单详情
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteWarehouseOutOrderDetailByIds(String ids);
/**
* 删除出库单详情信息
*
* @param outOrderDetailId 出库单详情ID
* @return 结果
*/
public int deleteWarehouseOutOrderDetailById(Long outOrderDetailId);
/**
* 作废出库单详情
* @param outOrderDetailId 出库单详情ID
* @return
*/
int cancelWarehouseOutOrderDetailById(Long outOrderDetailId);
/**
* 恢复出库单详情
* @param outOrderDetailId 出库单详情ID
* @return
*/
int restoreWarehouseOutOrderDetailById(Long outOrderDetailId);
/**
* 销售单-准备物料 物料相关信息
*/
List<WarehouseOutOrderDetail> selectOutOrderDetailListByCode(WarehouseOutOrder warehouseOutOrder);
}

80
ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseOutOrderService.java

@ -0,0 +1,80 @@
package com.ruoyi.warehouse.service;
import java.util.List;
import com.ruoyi.warehouse.domain.WarehouseOutOrder;
/**
* 仓库出库单Service接口
*
* @author 刘晓旭
* @date 2024-06-04
*/
public interface IWarehouseOutOrderService
{
/**
* 查询仓库出库单
*
* @param outOrderId 仓库出库单ID
* @return 仓库出库单
*/
public WarehouseOutOrder selectWarehouseOutOrderById(Long outOrderId);
/**
* 查询仓库出库单列表
*
* @param warehouseOutOrder 仓库出库单
* @return 仓库出库单集合
*/
public List<WarehouseOutOrder> selectWarehouseOutOrderList(WarehouseOutOrder warehouseOutOrder);
/**
* 新增仓库出库单
*
* @param warehouseOutOrder 仓库出库单
* @return 结果
*/
public int insertWarehouseOutOrder(WarehouseOutOrder warehouseOutOrder);
/**
* 修改仓库出库单
*
* @param warehouseOutOrder 仓库出库单
* @return 结果
*/
public int updateWarehouseOutOrder(WarehouseOutOrder warehouseOutOrder);
/**
* 批量删除仓库出库单
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteWarehouseOutOrderByIds(String ids);
/**
* 删除仓库出库单信息
*
* @param outOrderId 仓库出库单ID
* @return 结果
*/
public int deleteWarehouseOutOrderById(Long outOrderId);
/**
* 作废仓库出库单
* @param outOrderId 仓库出库单ID
* @return
*/
int cancelWarehouseOutOrderById(Long outOrderId);
/**
* 恢复仓库出库单
* @param outOrderId 仓库出库单ID
* @return
*/
int restoreWarehouseOutOrderById(Long outOrderId);
/**
* 修改保存销售单-准备物料
*/
int updatePrepareMaterial(WarehouseOutOrder warehouseOutOrder);
}

143
ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderDetailServiceImpl.java

@ -0,0 +1,143 @@
package com.ruoyi.warehouse.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.warehouse.domain.WarehouseOutOrder;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.warehouse.mapper.WarehouseOutOrderDetailMapper;
import com.ruoyi.warehouse.domain.WarehouseOutOrderDetail;
import com.ruoyi.warehouse.service.IWarehouseOutOrderDetailService;
import com.ruoyi.common.core.text.Convert;
/**
* 出库单详情Service业务层处理
*
* @author 刘晓旭
* @date 2024-06-04
*/
@Service
@Slf4j
public class WarehouseOutOrderDetailServiceImpl implements IWarehouseOutOrderDetailService
{
@Autowired
private WarehouseOutOrderDetailMapper warehouseOutOrderDetailMapper;
/**
* 查询出库单详情
*
* @param outOrderDetailId 出库单详情ID
* @return 出库单详情
*/
@Override
public WarehouseOutOrderDetail selectWarehouseOutOrderDetailById(Long outOrderDetailId)
{
return warehouseOutOrderDetailMapper.selectWarehouseOutOrderDetailById(outOrderDetailId);
}
/**
* 查询出库单详情列表
*
* @param warehouseOutOrderDetail 出库单详情
* @return 出库单详情
*/
@Override
public List<WarehouseOutOrderDetail> selectWarehouseOutOrderDetailList(WarehouseOutOrderDetail warehouseOutOrderDetail)
{
return warehouseOutOrderDetailMapper.selectWarehouseOutOrderDetailList(warehouseOutOrderDetail);
}
/**
* 新增出库单详情
*
* @param warehouseOutOrderDetail 出库单详情
* @return 结果
*/
@Override
public int insertWarehouseOutOrderDetail(WarehouseOutOrderDetail warehouseOutOrderDetail)
{
String loginName = ShiroUtils.getLoginName();
warehouseOutOrderDetail.setCreateBy(loginName);
warehouseOutOrderDetail.setCreateTime(DateUtils.getNowDate());
return warehouseOutOrderDetailMapper.insertWarehouseOutOrderDetail(warehouseOutOrderDetail);
}
/**
* 修改出库单详情
*
* @param warehouseOutOrderDetail 出库单详情
* @return 结果
*/
@Override
public int updateWarehouseOutOrderDetail(WarehouseOutOrderDetail warehouseOutOrderDetail)
{
String loginName = ShiroUtils.getLoginName();
warehouseOutOrderDetail.setUpdateBy(loginName);
warehouseOutOrderDetail.setUpdateTime(DateUtils.getNowDate());
return warehouseOutOrderDetailMapper.updateWarehouseOutOrderDetail(warehouseOutOrderDetail);
}
/**
* 删除出库单详情对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteWarehouseOutOrderDetailByIds(String ids)
{
return warehouseOutOrderDetailMapper.deleteWarehouseOutOrderDetailByIds(Convert.toStrArray(ids));
}
/**
* 删除出库单详情信息
*
* @param outOrderDetailId 出库单详情ID
* @return 结果
*/
@Override
public int deleteWarehouseOutOrderDetailById(Long outOrderDetailId)
{
return warehouseOutOrderDetailMapper.deleteWarehouseOutOrderDetailById(outOrderDetailId);
}
/**
* 作废出库单详情
*
* @param outOrderDetailId 出库单详情ID
* @return 结果
*/
@Override
public int cancelWarehouseOutOrderDetailById(Long outOrderDetailId)
{
return warehouseOutOrderDetailMapper.cancelWarehouseOutOrderDetailById(outOrderDetailId);
}
/**
* 恢复出库单详情信息
*
* @param outOrderDetailId 出库单详情ID
* @return 结果
*/
@Override
public int restoreWarehouseOutOrderDetailById(Long outOrderDetailId)
{
return warehouseOutOrderDetailMapper.restoreWarehouseOutOrderDetailById(outOrderDetailId);
}
/**
* 销售单-准备物料 物料相关信息
*/
@Override
public List<WarehouseOutOrderDetail> selectOutOrderDetailListByCode(WarehouseOutOrder warehouseOutOrder) {
String outOrderCode = warehouseOutOrder.getOutOrderCode();
if (StringUtils.isEmpty(outOrderCode)){
log.warn("销售单-准备物料,出库单号为空:{}",outOrderCode);
}
return warehouseOutOrderDetailMapper.selectOutOrderDetailListByCode(outOrderCode);
}
}

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

@ -0,0 +1,153 @@
package com.ruoyi.warehouse.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.warehouse.domain.WarehouseOutOrderDetail;
import com.ruoyi.warehouse.mapper.WarehouseOutOrderDetailMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.warehouse.mapper.WarehouseOutOrderMapper;
import com.ruoyi.warehouse.domain.WarehouseOutOrder;
import com.ruoyi.warehouse.service.IWarehouseOutOrderService;
import com.ruoyi.common.core.text.Convert;
/**
* 仓库出库单Service业务层处理
*
* @author 刘晓旭
* @date 2024-06-04
*/
@Service
@Slf4j
public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService
{
@Autowired
private WarehouseOutOrderMapper warehouseOutOrderMapper;
@Autowired
private WarehouseOutOrderDetailMapper outOrderDetailMapper;
/**
* 查询仓库出库单
*
* @param outOrderId 仓库出库单ID
* @return 仓库出库单
*/
@Override
public WarehouseOutOrder selectWarehouseOutOrderById(Long outOrderId)
{
return warehouseOutOrderMapper.selectWarehouseOutOrderById(outOrderId);
}
/**
* 查询仓库出库单列表
*
* @param warehouseOutOrder 仓库出库单
* @return 仓库出库单
*/
@Override
public List<WarehouseOutOrder> selectWarehouseOutOrderList(WarehouseOutOrder warehouseOutOrder)
{
return warehouseOutOrderMapper.selectWarehouseOutOrderList(warehouseOutOrder);
}
/**
* 新增仓库出库单
*
* @param warehouseOutOrder 仓库出库单
* @return 结果
*/
@Override
public int insertWarehouseOutOrder(WarehouseOutOrder warehouseOutOrder)
{
String loginName = ShiroUtils.getLoginName();
warehouseOutOrder.setCreateBy(loginName);
warehouseOutOrder.setCreateTime(DateUtils.getNowDate());
return warehouseOutOrderMapper.insertWarehouseOutOrder(warehouseOutOrder);
}
/**
* 修改仓库出库单
*
* @param warehouseOutOrder 仓库出库单
* @return 结果
*/
@Override
public int updateWarehouseOutOrder(WarehouseOutOrder warehouseOutOrder)
{
String loginName = ShiroUtils.getLoginName();
warehouseOutOrder.setUpdateBy(loginName);
warehouseOutOrder.setUpdateTime(DateUtils.getNowDate());
return warehouseOutOrderMapper.updateWarehouseOutOrder(warehouseOutOrder);
}
/**
* 删除仓库出库单对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteWarehouseOutOrderByIds(String ids)
{
return warehouseOutOrderMapper.deleteWarehouseOutOrderByIds(Convert.toStrArray(ids));
}
/**
* 删除仓库出库单信息
*
* @param outOrderId 仓库出库单ID
* @return 结果
*/
@Override
public int deleteWarehouseOutOrderById(Long outOrderId)
{
return warehouseOutOrderMapper.deleteWarehouseOutOrderById(outOrderId);
}
/**
* 作废仓库出库单
*
* @param outOrderId 仓库出库单ID
* @return 结果
*/
@Override
public int cancelWarehouseOutOrderById(Long outOrderId)
{
return warehouseOutOrderMapper.cancelWarehouseOutOrderById(outOrderId);
}
/**
* 恢复仓库出库单信息
*
* @param outOrderId 仓库出库单ID
* @return 结果
*/
@Override
public int restoreWarehouseOutOrderById(Long outOrderId)
{
return warehouseOutOrderMapper.restoreWarehouseOutOrderById(outOrderId);
}
/**
* 修改保存销售单-准备物料
* */
@Override
public int updatePrepareMaterial(WarehouseOutOrder warehouseOutOrder) {
List<WarehouseOutOrderDetail> warehouseOutOrderDetailList = warehouseOutOrder.getWarehouseOutOrderDetailList();
if (StringUtils.isEmpty(warehouseOutOrderDetailList)){
log.warn("保存销售单-准备物料,物料列表信息为空:{}",warehouseOutOrder);
}
int updateRows = 0;
for (WarehouseOutOrderDetail warehouseOutOrderDetail : warehouseOutOrderDetailList) {
//更新数据库记录
updateRows += outOrderDetailMapper.updateWarehouseOutOrderDetail(warehouseOutOrderDetail);
}
return updateRows;
}
}

6
ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesDetailMapper.xml

@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="refundsExchangesStatus" column="refunds_exchanges_status" />
<result property="qualityWarehouseStatus" column="quality_warehouse_status" />
<result property="qualityPurchaseStatus" column="quality_purchase_status" />
<result property="qualityDeliveryStatus" column="quality_delivery_status" />
<result property="relatedOrderCode" column="related_order_code" />
<result property="inStorageCode" column="in_storage_code" />
<result property="qualityReturnNode" column="quality_return_node" />
@ -41,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectQualityRefundsExchangesDetailVo">
select refunds_exchanges_detail_id, refunds_exchanges_code, refunds_exchanges_status, quality_warehouse_status, quality_purchase_status, related_order_code, in_storage_code, quality_return_node, material_total, num_total, supplier_code, supplier_name, customer_contact, contact_number, supplier_address, material_no, material_name, material_type, material_photoUrl, material_brand, material_unit, material_describe, material_process_method, refunds_exchanges_num, quality_unqualified_num ,delivery_inspection_time, inspection_time ,quality_remark, remark, create_by, create_time, update_by, update_time from quality_refunds_exchanges_detail
select refunds_exchanges_detail_id, refunds_exchanges_code, refunds_exchanges_status, quality_warehouse_status, quality_purchase_status, quality_delivery_status , related_order_code, in_storage_code, quality_return_node, material_total, num_total, supplier_code, supplier_name, customer_contact, contact_number, supplier_address, material_no, material_name, material_type, material_photoUrl, material_brand, material_unit, material_describe, material_process_method, refunds_exchanges_num, quality_unqualified_num ,delivery_inspection_time, inspection_time ,quality_remark, remark, create_by, create_time, update_by, update_time from quality_refunds_exchanges_detail
</sql>
<select id="selectQualityRefundsExchangesDetailList" parameterType="QualityRefundsExchangesDetail" resultMap="QualityRefundsExchangesDetailResult">
@ -75,6 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="refundsExchangesStatus != null">refunds_exchanges_status,</if>
<if test="qualityWarehouseStatus != null">quality_warehouse_status,</if>
<if test="qualityPurchaseStatus != null">quality_purchase_status,</if>
<if test="qualityDeliveryStatus != null">quality_delivery_status,</if>
<if test="relatedOrderCode != null">related_order_code,</if>
<if test="inStorageCode != null">in_storage_code,</if>
<if test="qualityReturnNode != null">quality_return_node,</if>
@ -109,6 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="refundsExchangesStatus != null">#{refundsExchangesStatus},</if>
<if test="qualityWarehouseStatus != null">#{qualityWarehouseStatus},</if>
<if test="qualityPurchaseStatus != null">#{qualityPurchaseStatus},</if>
<if test="qualityDeliveryStatus != null">#{qualityDeliveryStatus},</if>
<if test="relatedOrderCode != null">#{relatedOrderCode},</if>
<if test="inStorageCode != null">#{inStorageCode},</if>
<if test="qualityReturnNode != null">#{qualityReturnNode},</if>
@ -147,6 +150,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="refundsExchangesStatus != null">refunds_exchanges_status = #{refundsExchangesStatus},</if>
<if test="qualityWarehouseStatus != null">quality_warehouse_status = #{qualityWarehouseStatus},</if>
<if test="qualityPurchaseStatus != null">quality_purchase_status = #{qualityPurchaseStatus},</if>
<if test="qualityDeliveryStatus != null">quality_delivery_status = #{qualityDeliveryStatus},</if>
<if test="relatedOrderCode != null">related_order_code = #{relatedOrderCode},</if>
<if test="inStorageCode != null">in_storage_code = #{inStorageCode},</if>
<if test="qualityReturnNode != null">quality_return_node = #{qualityReturnNode},</if>

6
ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesMapper.xml

@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="refundsExchangesStatus" column="refunds_exchanges_status" />
<result property="qualityWarehouseStatus" column="quality_warehouse_status" />
<result property="qualityPurchaseStatus" column="quality_purchase_status" />
<result property="qualityDeliveryStatus" column="quality_delivery_status" />
<result property="relatedOrderCode" column="related_order_code" />
<result property="inStorageCode" column="in_storage_code" />
<result property="warehouseStorageType" column="warehouse_storage_type" />
@ -26,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectQualityRefundsExchangesVo">
select refunds_exchanges_id, refunds_exchanges_code, refunds_exchanges_status, quality_warehouse_status, quality_purchase_status, related_order_code, in_storage_code, warehouse_storage_type ,quality_return_node, material_total, num_total, delivery_inspection_time, quality_remark, remark, create_by, create_time, update_by, update_time from quality_refunds_exchanges
select refunds_exchanges_id, refunds_exchanges_code, refunds_exchanges_status, quality_warehouse_status, quality_purchase_status, quality_delivery_status ,related_order_code, in_storage_code, warehouse_storage_type ,quality_return_node, material_total, num_total, delivery_inspection_time, quality_remark, remark, create_by, create_time, update_by, update_time from quality_refunds_exchanges
</sql>
<select id="selectQualityRefundsExchangesList" parameterType="QualityRefundsExchanges" resultMap="QualityRefundsExchangesResult">
@ -55,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="refundsExchangesStatus != null">refunds_exchanges_status,</if>
<if test="qualityWarehouseStatus != null">quality_warehouse_status,</if>
<if test="qualityPurchaseStatus != null">quality_purchase_status,</if>
<if test="qualityDeliveryStatus != null">quality_delivery_status,</if>
<if test="relatedOrderCode != null">related_order_code,</if>
<if test="inStorageCode != null">in_storage_code,</if>
<if test="warehouseStorageType != null">warehouse_storage_type,</if>
@ -74,6 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="refundsExchangesStatus != null">#{refundsExchangesStatus},</if>
<if test="qualityWarehouseStatus != null">#{qualityWarehouseStatus},</if>
<if test="qualityPurchaseStatus != null">#{qualityPurchaseStatus},</if>
<if test="qualityDeliveryStatus != null">#{qualityDeliveryStatus},</if>
<if test="relatedOrderCode != null">#{relatedOrderCode},</if>
<if test="inStorageCode != null">#{inStorageCode},</if>
<if test="warehouseStorageType != null">#{warehouseStorageType},</if>
@ -97,6 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="refundsExchangesStatus != null">refunds_exchanges_status = #{refundsExchangesStatus},</if>
<if test="qualityWarehouseStatus != null">quality_warehouse_status = #{qualityWarehouseStatus},</if>
<if test="qualityPurchaseStatus != null">quality_purchase_status = #{qualityPurchaseStatus},</if>
<if test="qualityDeliveryStatus != null">quality_delivery_status = #{qualityDeliveryStatus},</if>
<if test="relatedOrderCode != null">related_order_code = #{relatedOrderCode},</if>
<if test="inStorageCode != null">in_storage_code = #{inStorageCode},</if>
<if test="warehouseStorageType != null">warehouse_storage_type = #{warehouseStorageType},</if>

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

@ -0,0 +1,262 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.warehouse.mapper.WarehouseOutOrderDetailMapper">
<resultMap type="WarehouseOutOrderDetail" id="WarehouseOutOrderDetailResult">
<result property="outOrderDetailId" column="out_order_detail_id" />
<result property="outOrderCode" column="out_order_code" />
<result property="makeNo" column="make_no" />
<result property="warehouseOutStatus" column="warehouse_out_status" />
<result property="relatedOrderCode" column="related_order_code" />
<result property="salesOrderCode" column="sales_order_code" />
<result property="warehouseOrderType" column="warehouse_order_type" />
<result property="outMakeCode" column="out_make_code" />
<result property="requisitioningCode" column="requisitioning_code" />
<result property="warehouseOutType" column="warehouse_out_type" />
<result property="businessName" column="business_name" />
<result property="aftersalesName" column="aftersales_name" />
<result property="warehouseName" column="warehouse_name" />
<result property="shippingDeviceId" column="shipping_device_id" />
<result property="materialNo" column="material_no" />
<result property="materialName" column="material_name" />
<result property="materialType" column="material_type" />
<result property="materialPhotourl" column="material_photoUrl" />
<result property="materialBrand" column="material_brand" />
<result property="materialUnit" column="material_unit" />
<result property="materialDescribe" column="material_describe" />
<result property="materialProcessMethod" column="material_process_method" />
<result property="materialModel" column="material_model" />
<result property="materialSpecification" column="material_specification" />
<result property="materialSum" column="material_sum" />
<result property="enterpriseSum" column="enterprise_sum" />
<result property="makeNum" column="make_num" />
<result property="outOrderSum" column="out_order_sum" />
<result property="hasOutOrderSum" column="has_out_order_sum" />
<result property="applyOutOrderSum" column="apply_out_order_sum" />
<result property="prepareOutOrderSum" column="prepare_out_order_sum" />
<result property="actualOutOrderSum" column="actual_out_order_sum" />
<result property="outOrderName" column="out_order_name" />
<result property="outOrderTime" column="out_order_time" />
<result property="supplierCode" column="supplier_code" />
<result property="supplierName" column="supplier_name" />
<result property="customerId" column="customer_id" />
<result property="customerName" column="customer_name" />
<result property="planDeliveryTime" column="plan_delivery_time" />
<result property="deliveryDate" column="delivery_date" />
<result property="deliveryCondition" column="delivery_condition" />
<result property="applyName" column="apply_name" />
<result property="deliveryAddress" column="delivery_address" />
<result property="deliveryName" column="delivery_name" />
<result property="deliveryNumber" column="delivery_number" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectWarehouseOutOrderDetailVo">
select out_order_detail_id, out_order_code, make_no, warehouse_out_status, related_order_code, sales_order_code, warehouse_order_type, out_make_code, requisitioning_code, warehouse_out_type, business_name, aftersales_name, warehouse_name, shipping_device_id, material_no, material_name, material_type, material_photoUrl, material_brand, material_unit, material_describe, material_process_method, material_model, material_specification, material_sum, enterprise_sum, make_num, out_order_sum, has_out_order_sum, apply_out_order_sum, prepare_out_order_sum, actual_out_order_sum, out_order_name, out_order_time, supplier_code, supplier_name, customer_id, customer_name, plan_delivery_time, delivery_date, delivery_condition, apply_name, delivery_address, delivery_name, delivery_number, remark, create_by, create_time, update_by, update_time from warehouse_out_order_detail
</sql>
<select id="selectWarehouseOutOrderDetailList" parameterType="WarehouseOutOrderDetail" resultMap="WarehouseOutOrderDetailResult">
<include refid="selectWarehouseOutOrderDetailVo"/>
<where>
</where>
</select>
<select id="selectWarehouseOutOrderDetailById" parameterType="Long" resultMap="WarehouseOutOrderDetailResult">
<include refid="selectWarehouseOutOrderDetailVo"/>
where out_order_detail_id = #{outOrderDetailId}
</select>
<select id="selectOutOrderDetailListByCode" parameterType="String" resultMap="WarehouseOutOrderDetailResult">
<include refid="selectWarehouseOutOrderDetailVo"/>
where out_order_code = #{outOrderCode}
</select>
<insert id="insertWarehouseOutOrderDetail" parameterType="WarehouseOutOrderDetail" useGeneratedKeys="true" keyProperty="outOrderDetailId">
insert into warehouse_out_order_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="outOrderCode != null">out_order_code,</if>
<if test="makeNo != null">make_no,</if>
<if test="warehouseOutStatus != null">warehouse_out_status,</if>
<if test="relatedOrderCode != null">related_order_code,</if>
<if test="salesOrderCode != null">sales_order_code,</if>
<if test="warehouseOrderType != null">warehouse_order_type,</if>
<if test="outMakeCode != null">out_make_code,</if>
<if test="requisitioningCode != null">requisitioning_code,</if>
<if test="warehouseOutType != null">warehouse_out_type,</if>
<if test="businessName != null">business_name,</if>
<if test="aftersalesName != null">aftersales_name,</if>
<if test="warehouseName != null">warehouse_name,</if>
<if test="shippingDeviceId != null">shipping_device_id,</if>
<if test="materialNo != null">material_no,</if>
<if test="materialName != null">material_name,</if>
<if test="materialType != null">material_type,</if>
<if test="materialPhotourl != null">material_photoUrl,</if>
<if test="materialBrand != null">material_brand,</if>
<if test="materialUnit != null">material_unit,</if>
<if test="materialDescribe != null">material_describe,</if>
<if test="materialProcessMethod != null">material_process_method,</if>
<if test="materialModel != null">material_model,</if>
<if test="materialSpecification != null">material_specification,</if>
<if test="materialSum != null">material_sum,</if>
<if test="enterpriseSum != null">enterprise_sum,</if>
<if test="makeNum != null">make_num,</if>
<if test="outOrderSum != null">out_order_sum,</if>
<if test="hasOutOrderSum != null">has_out_order_sum,</if>
<if test="applyOutOrderSum != null">apply_out_order_sum,</if>
<if test="prepareOutOrderSum != null">prepare_out_order_sum,</if>
<if test="actualOutOrderSum != null">actual_out_order_sum,</if>
<if test="outOrderName != null">out_order_name,</if>
<if test="outOrderTime != null">out_order_time,</if>
<if test="supplierCode != null">supplier_code,</if>
<if test="supplierName != null">supplier_name,</if>
<if test="customerId != null">customer_id,</if>
<if test="customerName != null">customer_name,</if>
<if test="planDeliveryTime != null">plan_delivery_time,</if>
<if test="deliveryDate != null">delivery_date,</if>
<if test="deliveryCondition != null">delivery_condition,</if>
<if test="applyName != null">apply_name,</if>
<if test="deliveryAddress != null">delivery_address,</if>
<if test="deliveryName != null">delivery_name,</if>
<if test="deliveryNumber != null">delivery_number,</if>
<if test="remark != null">remark,</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>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="outOrderCode != null">#{outOrderCode},</if>
<if test="makeNo != null">#{makeNo},</if>
<if test="warehouseOutStatus != null">#{warehouseOutStatus},</if>
<if test="relatedOrderCode != null">#{relatedOrderCode},</if>
<if test="salesOrderCode != null">#{salesOrderCode},</if>
<if test="warehouseOrderType != null">#{warehouseOrderType},</if>
<if test="outMakeCode != null">#{outMakeCode},</if>
<if test="requisitioningCode != null">#{requisitioningCode},</if>
<if test="warehouseOutType != null">#{warehouseOutType},</if>
<if test="businessName != null">#{businessName},</if>
<if test="aftersalesName != null">#{aftersalesName},</if>
<if test="warehouseName != null">#{warehouseName},</if>
<if test="shippingDeviceId != null">#{shippingDeviceId},</if>
<if test="materialNo != null">#{materialNo},</if>
<if test="materialName != null">#{materialName},</if>
<if test="materialType != null">#{materialType},</if>
<if test="materialPhotourl != null">#{materialPhotourl},</if>
<if test="materialBrand != null">#{materialBrand},</if>
<if test="materialUnit != null">#{materialUnit},</if>
<if test="materialDescribe != null">#{materialDescribe},</if>
<if test="materialProcessMethod != null">#{materialProcessMethod},</if>
<if test="materialModel != null">#{materialModel},</if>
<if test="materialSpecification != null">#{materialSpecification},</if>
<if test="materialSum != null">#{materialSum},</if>
<if test="enterpriseSum != null">#{enterpriseSum},</if>
<if test="makeNum != null">#{makeNum},</if>
<if test="outOrderSum != null">#{outOrderSum},</if>
<if test="hasOutOrderSum != null">#{hasOutOrderSum},</if>
<if test="applyOutOrderSum != null">#{applyOutOrderSum},</if>
<if test="prepareOutOrderSum != null">#{prepareOutOrderSum},</if>
<if test="actualOutOrderSum != null">#{actualOutOrderSum},</if>
<if test="outOrderName != null">#{outOrderName},</if>
<if test="outOrderTime != null">#{outOrderTime},</if>
<if test="supplierCode != null">#{supplierCode},</if>
<if test="supplierName != null">#{supplierName},</if>
<if test="customerId != null">#{customerId},</if>
<if test="customerName != null">#{customerName},</if>
<if test="planDeliveryTime != null">#{planDeliveryTime},</if>
<if test="deliveryDate != null">#{deliveryDate},</if>
<if test="deliveryCondition != null">#{deliveryCondition},</if>
<if test="applyName != null">#{applyName},</if>
<if test="deliveryAddress != null">#{deliveryAddress},</if>
<if test="deliveryName != null">#{deliveryName},</if>
<if test="deliveryNumber != null">#{deliveryNumber},</if>
<if test="remark != null">#{remark},</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>
</trim>
</insert>
<update id="updateWarehouseOutOrderDetail" parameterType="WarehouseOutOrderDetail">
update warehouse_out_order_detail
<trim prefix="SET" suffixOverrides=",">
<if test="outOrderCode != null">out_order_code = #{outOrderCode},</if>
<if test="makeNo != null">make_no = #{makeNo},</if>
<if test="warehouseOutStatus != null">warehouse_out_status = #{warehouseOutStatus},</if>
<if test="relatedOrderCode != null">related_order_code = #{relatedOrderCode},</if>
<if test="salesOrderCode != null">sales_order_code = #{salesOrderCode},</if>
<if test="warehouseOrderType != null">warehouse_order_type = #{warehouseOrderType},</if>
<if test="outMakeCode != null">out_make_code = #{outMakeCode},</if>
<if test="requisitioningCode != null">requisitioning_code = #{requisitioningCode},</if>
<if test="warehouseOutType != null">warehouse_out_type = #{warehouseOutType},</if>
<if test="businessName != null">business_name = #{businessName},</if>
<if test="aftersalesName != null">aftersales_name = #{aftersalesName},</if>
<if test="warehouseName != null">warehouse_name = #{warehouseName},</if>
<if test="shippingDeviceId != null">shipping_device_id = #{shippingDeviceId},</if>
<if test="materialNo != null">material_no = #{materialNo},</if>
<if test="materialName != null">material_name = #{materialName},</if>
<if test="materialType != null">material_type = #{materialType},</if>
<if test="materialPhotourl != null">material_photoUrl = #{materialPhotourl},</if>
<if test="materialBrand != null">material_brand = #{materialBrand},</if>
<if test="materialUnit != null">material_unit = #{materialUnit},</if>
<if test="materialDescribe != null">material_describe = #{materialDescribe},</if>
<if test="materialProcessMethod != null">material_process_method = #{materialProcessMethod},</if>
<if test="materialModel != null">material_model = #{materialModel},</if>
<if test="materialSpecification != null">material_specification = #{materialSpecification},</if>
<if test="materialSum != null">material_sum = #{materialSum},</if>
<if test="enterpriseSum != null">enterprise_sum = #{enterpriseSum},</if>
<if test="makeNum != null">make_num = #{makeNum},</if>
<if test="outOrderSum != null">out_order_sum = #{outOrderSum},</if>
<if test="hasOutOrderSum != null">has_out_order_sum = #{hasOutOrderSum},</if>
<if test="applyOutOrderSum != null">apply_out_order_sum = #{applyOutOrderSum},</if>
<if test="prepareOutOrderSum != null">prepare_out_order_sum = #{prepareOutOrderSum},</if>
<if test="actualOutOrderSum != null">actual_out_order_sum = #{actualOutOrderSum},</if>
<if test="outOrderName != null">out_order_name = #{outOrderName},</if>
<if test="outOrderTime != null">out_order_time = #{outOrderTime},</if>
<if test="supplierCode != null">supplier_code = #{supplierCode},</if>
<if test="supplierName != null">supplier_name = #{supplierName},</if>
<if test="customerId != null">customer_id = #{customerId},</if>
<if test="customerName != null">customer_name = #{customerName},</if>
<if test="planDeliveryTime != null">plan_delivery_time = #{planDeliveryTime},</if>
<if test="deliveryDate != null">delivery_date = #{deliveryDate},</if>
<if test="deliveryCondition != null">delivery_condition = #{deliveryCondition},</if>
<if test="applyName != null">apply_name = #{applyName},</if>
<if test="deliveryAddress != null">delivery_address = #{deliveryAddress},</if>
<if test="deliveryName != null">delivery_name = #{deliveryName},</if>
<if test="deliveryNumber != null">delivery_number = #{deliveryNumber},</if>
<if test="remark != null">remark = #{remark},</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>
</trim>
where out_order_detail_id = #{outOrderDetailId}
</update>
<delete id="deleteWarehouseOutOrderDetailById" parameterType="Long">
delete from warehouse_out_order_detail where out_order_detail_id = #{outOrderDetailId}
</delete>
<delete id="deleteWarehouseOutOrderDetailByIds" parameterType="String">
delete from warehouse_out_order_detail where out_order_detail_id in
<foreach item="outOrderDetailId" collection="array" open="(" separator="," close=")">
#{outOrderDetailId}
</foreach>
</delete>
<update id="cancelWarehouseOutOrderDetailById" parameterType="Long">
update warehouse_out_order_detail set del_flag = '1' where out_order_detail_id = #{outOrderDetailId}
</update>
<update id="restoreWarehouseOutOrderDetailById" parameterType="Long">
update warehouse_out_order_detail set del_flag = '0' where out_order_detail_id = #{outOrderDetailId}
</update>
</mapper>

31
ruoyi-admin/src/main/resources/mapper/aftersales/WarehouseOutOrderMapper.xml → ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderMapper.xml

@ -2,7 +2,7 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.aftersales.mapper.WarehouseOutOrderMapper">
<mapper namespace="com.ruoyi.warehouse.mapper.WarehouseOutOrderMapper">
<resultMap type="WarehouseOutOrder" id="WarehouseOutOrderResult">
<result property="outOrderId" column="out_order_id" />
@ -12,7 +12,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="relatedOrderCode" column="related_order_code" />
<result property="salesOrderCode" column="sales_order_code" />
<result property="warehouseOrderType" column="warehouse_order_type" />
<result property="outMakeCode" column="out_make_code" />
<result property="warehouseOutType" column="warehouse_out_type" />
<result property="requisitioningCode" column="requisitioning_code" />
<result property="businessName" column="business_name" />
<result property="aftersalesName" column="aftersales_name" />
<result property="warehouseName" column="warehouse_name" />
@ -27,19 +29,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="customerId" column="customer_id" />
<result property="customerName" column="customer_name" />
<result property="applyName" column="apply_name" />
<result property="supplierCode" column="supplier_code" />
<result property="planDeliveryTime" column="plan_delivery_time" />
<result property="supplierName" column="supplier_name" />
<result property="deliveryCondition" column="delivery_condition" />
<result property="deliveryAddress" column="delivery_address" />
<result property="deliveryName" column="delivery_name" />
<result property="deliveryNumber" column="delivery_number" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="deliveryDate" column="delivery_date" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectWarehouseOutOrderVo">
select out_order_id, out_order_code, make_no, warehouse_out_status, related_order_code, sales_order_code, warehouse_order_type, warehouse_out_type, business_name, aftersales_name, warehouse_name, shipping_device_id, material_no, material_name, material_sum, enterprise_sum, out_order_sum, out_order_name, out_order_time, customer_id, customer_name, apply_name, plan_delivery_time, delivery_condition, delivery_address, delivery_name, delivery_number, create_by, create_time, update_by, update_time from warehouse_out_order
select out_order_id, out_order_code, make_no, warehouse_out_status, related_order_code, sales_order_code, warehouse_order_type, out_make_code, warehouse_out_type, requisitioning_code, business_name, aftersales_name, warehouse_name, shipping_device_id, material_no, material_name, material_sum, enterprise_sum, out_order_sum, out_order_name, out_order_time, customer_id, customer_name, apply_name, supplier_code, plan_delivery_time, supplier_name, delivery_condition, delivery_address, delivery_name, delivery_number, create_by, create_time, delivery_date, update_by, update_time, remark from warehouse_out_order
</sql>
<select id="selectWarehouseOutOrderList" parameterType="WarehouseOutOrder" resultMap="WarehouseOutOrderResult">
@ -49,9 +55,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="warehouseOutStatus != null and warehouseOutStatus != ''"> and warehouse_out_status = #{warehouseOutStatus}</if>
<if test="relatedOrderCode != null and relatedOrderCode != ''"> and related_order_code = #{relatedOrderCode}</if>
<if test="warehouseOrderType != null and warehouseOrderType != ''"> and warehouse_order_type = #{warehouseOrderType}</if>
<if test="outMakeCode != null and outMakeCode != ''"> and out_make_code = #{outMakeCode}</if>
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
<if test="applyName != null and applyName != ''"> and apply_name like concat('%', #{applyName}, '%')</if>
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</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="deliveryDate != null "> and delivery_date = #{deliveryDate}</if>
</where>
</select>
@ -69,7 +78,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="relatedOrderCode != null">related_order_code,</if>
<if test="salesOrderCode != null">sales_order_code,</if>
<if test="warehouseOrderType != null">warehouse_order_type,</if>
<if test="outMakeCode != null">out_make_code,</if>
<if test="warehouseOutType != null">warehouse_out_type,</if>
<if test="requisitioningCode != null">requisitioning_code,</if>
<if test="businessName != null">business_name,</if>
<if test="aftersalesName != null">aftersales_name,</if>
<if test="warehouseName != null">warehouse_name,</if>
@ -84,15 +95,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="customerId != null">customer_id,</if>
<if test="customerName != null">customer_name,</if>
<if test="applyName != null">apply_name,</if>
<if test="supplierCode != null">supplier_code,</if>
<if test="planDeliveryTime != null">plan_delivery_time,</if>
<if test="supplierName != null">supplier_name,</if>
<if test="deliveryCondition != null">delivery_condition,</if>
<if test="deliveryAddress != null">delivery_address,</if>
<if test="deliveryName != null">delivery_name,</if>
<if test="deliveryNumber != null">delivery_number,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="deliveryDate != null">delivery_date,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="outOrderCode != null">#{outOrderCode},</if>
@ -101,7 +116,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="relatedOrderCode != null">#{relatedOrderCode},</if>
<if test="salesOrderCode != null">#{salesOrderCode},</if>
<if test="warehouseOrderType != null">#{warehouseOrderType},</if>
<if test="outMakeCode != null">#{outMakeCode},</if>
<if test="warehouseOutType != null">#{warehouseOutType},</if>
<if test="requisitioningCode != null">#{requisitioningCode},</if>
<if test="businessName != null">#{businessName},</if>
<if test="aftersalesName != null">#{aftersalesName},</if>
<if test="warehouseName != null">#{warehouseName},</if>
@ -116,15 +133,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="customerId != null">#{customerId},</if>
<if test="customerName != null">#{customerName},</if>
<if test="applyName != null">#{applyName},</if>
<if test="supplierCode != null">#{supplierCode},</if>
<if test="planDeliveryTime != null">#{planDeliveryTime},</if>
<if test="supplierName != null">#{supplierName},</if>
<if test="deliveryCondition != null">#{deliveryCondition},</if>
<if test="deliveryAddress != null">#{deliveryAddress},</if>
<if test="deliveryName != null">#{deliveryName},</if>
<if test="deliveryNumber != null">#{deliveryNumber},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="deliveryDate != null">#{deliveryDate},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
@ -137,7 +158,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="relatedOrderCode != null">related_order_code = #{relatedOrderCode},</if>
<if test="salesOrderCode != null">sales_order_code = #{salesOrderCode},</if>
<if test="warehouseOrderType != null">warehouse_order_type = #{warehouseOrderType},</if>
<if test="outMakeCode != null">out_make_code = #{outMakeCode},</if>
<if test="warehouseOutType != null">warehouse_out_type = #{warehouseOutType},</if>
<if test="requisitioningCode != null">requisitioning_code = #{requisitioningCode},</if>
<if test="businessName != null">business_name = #{businessName},</if>
<if test="aftersalesName != null">aftersales_name = #{aftersalesName},</if>
<if test="warehouseName != null">warehouse_name = #{warehouseName},</if>
@ -152,15 +175,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="customerId != null">customer_id = #{customerId},</if>
<if test="customerName != null">customer_name = #{customerName},</if>
<if test="applyName != null">apply_name = #{applyName},</if>
<if test="supplierCode != null">supplier_code = #{supplierCode},</if>
<if test="planDeliveryTime != null">plan_delivery_time = #{planDeliveryTime},</if>
<if test="supplierName != null">supplier_name = #{supplierName},</if>
<if test="deliveryCondition != null">delivery_condition = #{deliveryCondition},</if>
<if test="deliveryAddress != null">delivery_address = #{deliveryAddress},</if>
<if test="deliveryName != null">delivery_name = #{deliveryName},</if>
<if test="deliveryNumber != null">delivery_number = #{deliveryNumber},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="deliveryDate != null">delivery_date = #{deliveryDate},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where out_order_id = #{outOrderId}
</update>

275
ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/afterConfirmDelivery.html

@ -0,0 +1,275 @@
<!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" />
<style>
.supplier-value span {
margin-right: 10px;
}
</style>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-afterConfirmDelivery-edit" th:object="${qualityRefundsExchanges}">
<input name="refundsExchangesId" th:field="*{refundsExchangesId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">退换货单号:</label>
<div class="col-sm-8">
<input name="refundsExchangesCode" th:field="*{refundsExchangesCode}" 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">
<input name="qualityRemark" th:field="*{qualityRemark}" class="form-control" type="text" disabled>
</div>
</div>
<div class="container">
<!--供应商物料相关-->
<div class="row">
<div class="col-sm-12" id="tablesContainer">
<!-- 表格将在这里动态生成 -->
</div>
</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 refundsExchangesCode = [[${qualityRefundsExchanges.refundsExchangesCode}]]
var qualityDeliveryStatusDatas = [[${@dict.getType('quality_delivery_status')}]];
var prefix = ctx + "quality/refundsExchanges";
$("#form-afterConfirmDelivery-edit").validate({
focusCleanup: true
});
//生成的不同table的id集合
var tableDatas = [];
function submitHandler() {
const storageOrderData = $("#form-afterConfirmDelivery-edit").serializeArray().reduce((obj, item) => {
obj[item.name] = item.value;
return obj;
}, {});
// 初始化一个数组用于存放所有表格的数据
let allMaterialDataList = [];
for(let i in tableDatas){
$('#' + tableDatas[i]).each(function() {
const tableData = $(this).bootstrapTable('getData');
console.log(JSON.stringify(tableData));
// 将表数据转换成与qualityReportData格式一致的数组
var materialDataList = tableData.map(function (item) {
// 根据实际字段名调整
return {
"refundsExchangesDetailId":item.refundsExchangesDetailId,
"supplierCode": item.supplierCode,
"materialNo": item.materialNo,
"materialName": item.materialName,
"materialType": item.materialType,
"materialPhotourl": item.materialPhotourl,
"materialDescribe": item.materialDescribe,
"materialBrand": item.materialBrand,
"materialUnit": item.materialUnit,
"materialProcessMethod": item.materialProcessMethod,
"makeTotal": item.makeTotal,
"qualityHasqualifiedNum": item.qualityHasqualifiedNum,
"thisArrivedNum": item.thisArrivedNum,
"qualityUnqualifiedNum": item.qualityUnqualifiedNum,
"qualityDeliveryStatus": item.qualityDeliveryStatus,
// ...其他字段
};
});
allMaterialDataList = allMaterialDataList.concat(materialDataList);
});
}
const combinedData = Object.assign({}, storageOrderData, {
refundsExchangesDetails: allMaterialDataList
});
// 合并表单数据和表格数据
// 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 + "/afterConfirmDelivery", jsonData);
}
$(function() {
// 假设refundsExchangesCode已经定义或者可以通过某种方式获取到
var refundsExchangesCode = [[${qualityRefundsExchanges.refundsExchangesCode}]]; // 这里需要实际赋值,比如从前端某个地方读取
$.getJSON(prefix + "/detailListGroupedBySupplier?refundsExchangesCode=" + refundsExchangesCode, function(data) {
for (var supplierCode in data) {
if (data.hasOwnProperty(supplierCode)) {
var supplierData = data[supplierCode];
createTableForSupplier(supplierCode, supplierData);
}
}
});
});
function createTableForSupplier(supplierCode, supplierData) {
var tableId = 'bootstrap-table-' + supplierCode.replace(/[^a-z0-9]/gi, '_').toLowerCase();
tableDatas.push(tableId);
var $tableWrapper = $('<div class="table-responsive mt-3"></div>');
// 确保supplierData至少有一条记录,并从中提取供应商详细信息
var supplierInfo = supplierData.length > 0 ? supplierData[0] : {}; // 默认为空对象,以防数据不存在
// 构建含有额外供应商信息的标题字符串
var headerTitle ='供应商'+'</br>'+supplierCode + ' - ' + (supplierInfo.supplierName || 'N/A') +
' </br> ' + (supplierInfo.customerContact || 'N/A') +
' - ' + (supplierInfo.contactNumber || 'N/A') +
' - ' + (supplierInfo.supplierAddress || 'N/A');
var $header = $('<h4>' + headerTitle + '</h4>');
var $table = $('<table id="' + tableId + '" class="table table-striped table-bordered"></table>');
$table.bootstrapTable({
data: supplierData,
columns: [{
checkbox: true
},
{
title: '供应商ID',
field: 'supplierCode',
visible: false
},
{
title: '退换货详情ID',
field: 'refundsExchangesDetailId',
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',
},
{
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="qualityReport(\'' + row.materialNo + '\', \'' + row.supplierCode + '\')"><i class="fa fa-plus"></i>报告</a> ');
return actions.join('');
}
},
{
title: '品质不合格数',
field: 'qualityUnqualifiedNum',
},
{title: '收货状态',field: 'qualityDeliveryStatus',
formatter:function (value, row, index) {
return qualityDeliveryStatusFormatter(value,row,index);
}
},
]
});
$tableWrapper.append($header).append($table);
$('#tablesContainer').append($tableWrapper);
$table.on('change', '.form-control', onQualityDeliveryStatus);
}
/*品质报告*/
function qualityReport(materialNo, supplierCode) {
var queryParams = new URLSearchParams();
queryParams.append('materialNo', materialNo);
queryParams.append('supplierCode', encodeURIComponent(supplierCode));
var url = ctx + 'quality/qualityOrder/qualityReport?' + queryParams.toString();
$.modal.open("品质报告", url);
}
// 列中获取收货状态下拉改变数据
function onQualityDeliveryStatus(event) {
var selectElement = event.target; // 直接从事件对象获取select元素
var rowIndex = $(selectElement).closest('tr').index(); // 获取当前行索引
var table = $(selectElement).closest('.table'); // 获取最近的.table父元素,即当前表格
var tableId = table.attr('id'); // 获取当前表格的ID
var qualityDeliveryStatusValue = $(selectElement).val();
// 确保tableId在tableDatas中,然后根据tableId和rowIndex更新数据
if (tableDatas.includes(tableId)) {
var tableData = table.bootstrapTable('getData');
var newRow = tableData[rowIndex];
newRow.qualityDeliveryStatus = qualityDeliveryStatusValue;
table.bootstrapTable('updateRow', {index: rowIndex, row: newRow});
} else {
console.error("Table ID not found in tableDatas array.");
}
}
// 自定义收货状态的格式化函数
function qualityDeliveryStatusFormatter(value, row, index) {
var selectHtml = '<select class="form-control" onchange="onQualityDeliveryStatus(this, ' + index + ')">';
// 添加默认选项
selectHtml += '<option value=""' + (value === undefined || value === '' ? ' selected' : '') + '>所有</option>';
qualityDeliveryStatusDatas.forEach(function (child) {
selectHtml += '<option value="' + child.dictValue + '"' + (value === child.dictValue ? ' selected' : '') + '>' + child.dictLabel + '</option>';
});
selectHtml += '</select>';
return selectHtml;
}
</script>
</body>
</html>

275
ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/beforeConfirmDelivery.html

@ -0,0 +1,275 @@
<!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" />
<style>
.supplier-value span {
margin-right: 10px;
}
</style>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-beforeConfirmDelivery-edit" th:object="${qualityRefundsExchanges}">
<input name="refundsExchangesId" th:field="*{refundsExchangesId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">退换货单号:</label>
<div class="col-sm-8">
<input name="refundsExchangesCode" th:field="*{refundsExchangesCode}" 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">
<input name="qualityRemark" th:field="*{qualityRemark}" class="form-control" type="text" disabled>
</div>
</div>
<div class="container">
<!--供应商物料相关-->
<div class="row">
<div class="col-sm-12" id="tablesContainer">
<!-- 表格将在这里动态生成 -->
</div>
</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 refundsExchangesCode = [[${qualityRefundsExchanges.refundsExchangesCode}]]
var qualityDeliveryStatusDatas = [[${@dict.getType('quality_delivery_status')}]];
var prefix = ctx + "quality/refundsExchanges";
$("#form-beforeConfirmDelivery-edit").validate({
focusCleanup: true
});
//生成的不同table的id集合
var tableDatas = [];
function submitHandler() {
const storageOrderData = $("#form-beforeConfirmDelivery-edit").serializeArray().reduce((obj, item) => {
obj[item.name] = item.value;
return obj;
}, {});
// 初始化一个数组用于存放所有表格的数据
let allMaterialDataList = [];
for(let i in tableDatas){
$('#' + tableDatas[i]).each(function() {
const tableData = $(this).bootstrapTable('getData');
console.log(JSON.stringify(tableData));
// 将表数据转换成与qualityReportData格式一致的数组
var materialDataList = tableData.map(function (item) {
// 根据实际字段名调整
return {
"refundsExchangesDetailId":item.refundsExchangesDetailId,
"supplierCode": item.supplierCode,
"materialNo": item.materialNo,
"materialName": item.materialName,
"materialType": item.materialType,
"materialPhotourl": item.materialPhotourl,
"materialDescribe": item.materialDescribe,
"materialBrand": item.materialBrand,
"materialUnit": item.materialUnit,
"materialProcessMethod": item.materialProcessMethod,
"makeTotal": item.makeTotal,
"qualityHasqualifiedNum": item.qualityHasqualifiedNum,
"thisArrivedNum": item.thisArrivedNum,
"qualityUnqualifiedNum": item.qualityUnqualifiedNum,
"qualityDeliveryStatus": item.qualityDeliveryStatus,
// ...其他字段
};
});
allMaterialDataList = allMaterialDataList.concat(materialDataList);
});
}
const combinedData = Object.assign({}, storageOrderData, {
refundsExchangesDetails: allMaterialDataList
});
// 合并表单数据和表格数据
// 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 + "/beforeConfirmDelivery", jsonData);
}
$(function() {
// 假设refundsExchangesCode已经定义或者可以通过某种方式获取到
var refundsExchangesCode = [[${qualityRefundsExchanges.refundsExchangesCode}]]; // 这里需要实际赋值,比如从前端某个地方读取
$.getJSON(prefix + "/detailListGroupedBySupplier?refundsExchangesCode=" + refundsExchangesCode, function(data) {
for (var supplierCode in data) {
if (data.hasOwnProperty(supplierCode)) {
var supplierData = data[supplierCode];
createTableForSupplier(supplierCode, supplierData);
}
}
});
});
function createTableForSupplier(supplierCode, supplierData) {
var tableId = 'bootstrap-table-' + supplierCode.replace(/[^a-z0-9]/gi, '_').toLowerCase();
tableDatas.push(tableId);
var $tableWrapper = $('<div class="table-responsive mt-3"></div>');
// 确保supplierData至少有一条记录,并从中提取供应商详细信息
var supplierInfo = supplierData.length > 0 ? supplierData[0] : {}; // 默认为空对象,以防数据不存在
// 构建含有额外供应商信息的标题字符串
var headerTitle ='供应商'+'</br>'+supplierCode + ' - ' + (supplierInfo.supplierName || 'N/A') +
' </br> ' + (supplierInfo.customerContact || 'N/A') +
' - ' + (supplierInfo.contactNumber || 'N/A') +
' - ' + (supplierInfo.supplierAddress || 'N/A');
var $header = $('<h4>' + headerTitle + '</h4>');
var $table = $('<table id="' + tableId + '" class="table table-striped table-bordered"></table>');
$table.bootstrapTable({
data: supplierData,
columns: [{
checkbox: true
},
{
title: '供应商ID',
field: 'supplierCode',
visible: false
},
{
title: '退换货详情ID',
field: 'refundsExchangesDetailId',
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',
},
{
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="qualityReport(\'' + row.materialNo + '\', \'' + row.supplierCode + '\')"><i class="fa fa-plus"></i>报告</a> ');
return actions.join('');
}
},
{
title: '品质不合格数',
field: 'qualityUnqualifiedNum',
},
{title: '收货状态',field: 'qualityDeliveryStatus',
formatter:function (value, row, index) {
return qualityDeliveryStatusFormatter(value,row,index);
}
},
]
});
$tableWrapper.append($header).append($table);
$('#tablesContainer').append($tableWrapper);
$table.on('change', '.form-control', onQualityDeliveryStatus);
}
/*品质报告*/
function qualityReport(materialNo, supplierCode) {
var queryParams = new URLSearchParams();
queryParams.append('materialNo', materialNo);
queryParams.append('supplierCode', encodeURIComponent(supplierCode));
var url = ctx + 'quality/qualityOrder/qualityReport?' + queryParams.toString();
$.modal.open("品质报告", url);
}
// 列中获取收货状态下拉改变数据
function onQualityDeliveryStatus(event) {
var selectElement = event.target; // 直接从事件对象获取select元素
var rowIndex = $(selectElement).closest('tr').index(); // 获取当前行索引
var table = $(selectElement).closest('.table'); // 获取最近的.table父元素,即当前表格
var tableId = table.attr('id'); // 获取当前表格的ID
var qualityDeliveryStatusValue = $(selectElement).val();
// 确保tableId在tableDatas中,然后根据tableId和rowIndex更新数据
if (tableDatas.includes(tableId)) {
var tableData = table.bootstrapTable('getData');
var newRow = tableData[rowIndex];
newRow.qualityDeliveryStatus = qualityDeliveryStatusValue;
table.bootstrapTable('updateRow', {index: rowIndex, row: newRow});
} else {
console.error("Table ID not found in tableDatas array.");
}
}
// 自定义收货状态的格式化函数
function qualityDeliveryStatusFormatter(value, row, index) {
var selectHtml = '<select class="form-control" onchange="onQualityDeliveryStatus(this, ' + index + ')">';
// 添加默认选项
selectHtml += '<option value=""' + (value === undefined || value === '' ? ' selected' : '') + '>所有</option>';
qualityDeliveryStatusDatas.forEach(function (child) {
selectHtml += '<option value="' + child.dictValue + '"' + (value === child.dictValue ? ' selected' : '') + '>' + child.dictLabel + '</option>';
});
selectHtml += '</select>';
return selectHtml;
}
</script>
</body>
</html>

21
ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/refundsExchanges.html

@ -87,6 +87,9 @@
var beforeHasConfirmSupplierFlag = [[${@permission.hasPermi('quality:refundsExchanges:beforeHasConfirmSupplier')}]];
var afterNoConfirmSupplierFlag = [[${@permission.hasPermi('quality:refundsExchanges:afterNoConfirmSupplier')}]];
var beforeConfirmDeliveryFlag = [[${@permission.hasPermi('quality:refundsExchanges:beforeConfirmDelivery')}]];
var afterConfirmDeliveryFlag = [[${@permission.hasPermi('quality:refundsExchanges:afterConfirmDelivery')}]];
var refundsExchangesStatusDatas = [[${@dict.getType('refunds_exchanges_status')}]];
var qualityWarehouseStatusDatas = [[${@dict.getType('quality_warehouse_status')}]];
var qualityPurchaseStatusDatas = [[${@dict.getType('quality_purchase_status')}]];
@ -204,13 +207,18 @@
/*入库前退换货-确认供应商-已有供应商*/
if (row.qualityReturnNode == 0){
actions.push('<a class="btn btn-success btn-xs ' + beforeHasConfirmSupplierFlag + '" href="javascript:void(0)" onclick="beforeHasConfirmSupplier(\'' + row.refundsExchangesId + '\')"><i class="fa fa-edit"></i>确认供应商</a> ');
actions.push('<a class="btn btn-success btn-xs ' + beforeConfirmDeliveryFlag + '" href="javascript:void(0)" onclick="beforeConfirmDelivery(\'' + row.refundsExchangesId + '\')"><i class="fa fa-edit"></i>确认收货</a> ');
}
/*入库后退货-确认供应商-没有供应商*/
if (row.qualityReturnNode == 1){
actions.push('<a class="btn btn-success btn-xs ' + afterNoConfirmSupplierFlag + '" href="javascript:void(0)" onclick="afterNoConfirmSupplier(\'' + row.refundsExchangesId + '\')"><i class="fa fa-edit"></i>确认供应商</a> ');
actions.push('<a class="btn btn-success btn-xs ' + afterConfirmDeliveryFlag + '" href="javascript:void(0)" onclick="afterConfirmDelivery(\'' + row.refundsExchangesId + '\')"><i class="fa fa-edit"></i>确认收货</a> ');
}
return actions.join('');
}
}]
@ -270,6 +278,19 @@
$.modal.open("确认供应商",url);
}
/*入库前退货-确认收货*/
function beforeConfirmDelivery(refundsExchangesId){
var url = ctx + 'quality/refundsExchanges/beforeConfirmDelivery/' + refundsExchangesId;
$.modal.open("确认收货",url);
}
/*入库后退货-确认收货*/
function afterConfirmDelivery(refundsExchangesId){
var url = ctx + 'quality/refundsExchanges/afterConfirmDelivery/' + refundsExchangesId;
$.modal.open("确认收货",url);
}
</script>
</body>
</html>

2
ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/returnAfterStorageDetail.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">

252
ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/add.html

@ -0,0 +1,252 @@
<!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-warehouseOutOrder-add">
<div class="form-group">
<label class="col-sm-3 control-label">出库单号:</label>
<div class="col-sm-8">
<input name="outOrderCode" 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="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">
<select name="warehouseOutStatus" class="form-control m-b" th:with="type=${@dict.getType('warehouse_out_status')}">
<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="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">
<input name="salesOrderCode" 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="warehouseOrderType" class="form-control m-b" th:with="type=${@dict.getType('warehouse_order_type')}">
<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="outMakeCode" 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="warehouseOutType" class="form-control m-b" th:with="type=${@dict.getType('warehouse_out_type')}">
<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="requisitioningCode" 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="businessName" 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="aftersalesName" 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="warehouseName" 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="shippingDeviceId" 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="materialNo" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料名称:</label>
<div class="col-sm-8">
<input name="materialName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料合计:</label>
<div class="col-sm-8">
<input name="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="enterpriseSum" 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="outOrderSum" 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="outOrderName" class="form-control" type="text">
</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="outOrderTime" 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-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="applyName" 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="supplierCode" class="form-control" type="text">
</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="planDeliveryTime" 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-3 control-label">供应商名称:</label>
<div class="col-sm-8">
<input name="supplierName" 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="deliveryCondition" 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="deliveryAddress" 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="deliveryName" 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="deliveryNumber" class="form-control" type="text">
</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="deliveryDate" 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-3 control-label">备注:</label>
<div class="col-sm-8">
<input name="remark" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "warehouse/warehouseOutOrder"
$("#form-warehouseOutOrder-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-warehouseOutOrder-add').serialize());
}
}
$("input[name='outOrderTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='planDeliveryTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='deliveryDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

253
ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/edit.html

@ -0,0 +1,253 @@
<!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-warehouseOutOrder-edit" th:object="${warehouseOutOrder}">
<input name="outOrderId" th:field="*{outOrderId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">出库单号:</label>
<div class="col-sm-8">
<input name="outOrderCode" th:field="*{outOrderCode}" 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="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">
<select name="warehouseOutStatus" class="form-control m-b" th:with="type=${@dict.getType('warehouse_out_status')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{warehouseOutStatus}"></option>
</select>
</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">
<input name="salesOrderCode" th:field="*{salesOrderCode}" 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="warehouseOrderType" class="form-control m-b" th:with="type=${@dict.getType('warehouse_order_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{warehouseOrderType}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">委外单号:</label>
<div class="col-sm-8">
<input name="outMakeCode" th:field="*{outMakeCode}" 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="warehouseOutType" class="form-control m-b" th:with="type=${@dict.getType('warehouse_out_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{warehouseOutType}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">请购单号:</label>
<div class="col-sm-8">
<input name="requisitioningCode" th:field="*{requisitioningCode}" 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="businessName" th:field="*{businessName}" 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="aftersalesName" th:field="*{aftersalesName}" 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="warehouseName" th:field="*{warehouseName}" 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="shippingDeviceId" th:field="*{shippingDeviceId}" 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="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-8">
<input name="materialName" th:field="*{materialName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料合计:</label>
<div class="col-sm-8">
<input name="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="enterpriseSum" th:field="*{enterpriseSum}" 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="outOrderSum" th:field="*{outOrderSum}" 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="outOrderName" th:field="*{outOrderName}" class="form-control" type="text">
</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="outOrderTime" th:value="${#dates.format(warehouseOutOrder.outOrderTime, '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-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="applyName" th:field="*{applyName}" 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="supplierCode" th:field="*{supplierCode}" class="form-control" type="text">
</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="planDeliveryTime" th:value="${#dates.format(warehouseOutOrder.planDeliveryTime, '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-3 control-label">供应商名称:</label>
<div class="col-sm-8">
<input name="supplierName" th:field="*{supplierName}" 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="deliveryCondition" th:field="*{deliveryCondition}" 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="deliveryAddress" th:field="*{deliveryAddress}" 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="deliveryName" th:field="*{deliveryName}" 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="deliveryNumber" th:field="*{deliveryNumber}" class="form-control" type="text">
</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="deliveryDate" th:value="${#dates.format(warehouseOutOrder.deliveryDate, '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-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" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "warehouse/warehouseOutOrder";
$("#form-warehouseOutOrder-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-warehouseOutOrder-edit').serialize());
}
}
$("input[name='outOrderTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='planDeliveryTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='deliveryDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

226
ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/prepareMaterial.html

@ -0,0 +1,226 @@
<!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-prepareMaterial-edit" th:object="${warehouseOutOrder}">
<input name="outOrderId" th:field="*{outOrderId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">出库单号:</label>
<div class="col-sm-8">
<input name="outOrderCode" th:field="*{outOrderCode}" 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="warehouseOrderType" class="form-control m-b" th:with="type=${@dict.getType('warehouse_order_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{warehouseOrderType}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">销售订单号:</label>
<div class="col-sm-8">
<input name="salesOrderCode" th:field="*{salesOrderCode}" 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="applyName" th:field="*{applyName}" 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="makeNo" th:field="*{makeNo}" 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="deliveryName" th:field="*{deliveryName}" 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="deliveryNumber" th:field="*{deliveryNumber}" 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="deliveryAddress" th:field="*{deliveryAddress}" 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 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 warehouseOutOrder = [[${warehouseOutOrder}]];
var prefix = ctx + "warehouse/warehouseOutOrder";
$("#form-prepareMaterial-edit").validate({
focusCleanup: true
});
// 新增提交
function submitHandler() {
// 获取表单数据
const warehouseOutOrderData = $("#form-prepareMaterial-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 {
"outOrderDetailId":item.outOrderDetailId,
"outOrderCode":item.outOrderCode,
"materialNo": item.materialNo, // 假设id对应materialId
"prepareOutOrderSum":item.prepareOutOrderSum,
// ...其他字段
};
});
const combinedData = Object.assign({}, warehouseOutOrderData, {
warehouseOutOrderDetailList: materialDataList,
});
// 合并表单数据和表格数据
console.log(combinedData)
// 使用 JSON.stringify() 序列化数据
const jsonData = JSON.stringify(combinedData);
// 发送 AJAX 请求到后端接口
$.operate.saveJson(prefix + "/prepareMaterial", jsonData);
}
//物料信息展示列表
$(function() {
var options = {
modalName: "选择物料",
url: ctx + "warehouse/warehouseOutOrder/getMaterialListByOutOrderCode",
queryParams: queryParams,
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
pagination: false, // 设置不分页
columns: [{
checkbox: true
},
{
title: '出库单详情ID',
field: 'outOrderDetailId',
visible: false
},
{
title: '出库单号',
field: 'outOrderCode',
visible: false
},
{
title: '料号',
field: 'materialNo',
},
{
title: '图片',
field: 'materialPhotourl',
},
{
title: '物料名称',
field: 'materialName',
},
{
title: '物料类型',
field: 'materialType',
},
{
title: '描述',
field: 'materialDescribe',
},
{
title: '品牌',
field: 'materialBrand',
},
{
title: '单位',
field: 'materialUnit',
},
{
title: '加工方式',
field: 'materialProcessMethod',
},
{
title: '订单数量',
field: 'makeNum',
},
{
title: '已出库数',
field: 'hasOutOrderSum',
},
{
title: '申请出库数',
field: 'applyOutOrderSum',
},
{
title: '准备出库数',
field: 'prepareOutOrderSum',
editable:true,
},
]
};
$.table.init(options);
})
function queryParams(params) {
var curParams = {
// 传递参数查询参数
outOrderCode: warehouseOutOrder.outOrderCode
};
console.log(curParams);
return curParams;
}
</script>
</body>
</html>

192
ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/warehouseOutOrder.html

@ -0,0 +1,192 @@
<!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="outOrderCode"/>
</li>
<li>
<label>出库状态:</label>
<select name="warehouseOutStatus" th:with="type=${@dict.getType('warehouse_out_status')}">
<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="relatedOrderCode"/>
</li>
<li>
<label>申请人员:</label>
<input type="text" name="applyName"/>
</li>
<li>
<label>仓库员:</label>
<input type="text" name="warehouseName"/>
</li>
<li>
<label>订单类型:</label>
<select name="warehouseOrderType" th:with="type=${@dict.getType('warehouse_order_type')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</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-warning" onclick="$.table.exportExcel()" shiro:hasPermission="warehouse:warehouseOutOrder: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('warehouse:warehouseOutOrder:edit')}]];
var prepareMaterialFlag = [[${@permission.hasPermi('warehouse:warehouseOutOrder:prepareMaterial')}]];
var warehouseOutStatusDatas = [[${@dict.getType('warehouse_out_status')}]];
var warehouseOrderTypeDatas = [[${@dict.getType('warehouse_order_type')}]];
var warehouseOutTypeDatas = [[${@dict.getType('warehouse_out_type')}]];
var prefix = ctx + "warehouse/warehouseOutOrder";
$(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
},
{
title: '出库单Id',
field: 'outOrderId',
visible: false
},
{
title: '出库单号',
field: 'outOrderCode',
},
{
title: '出库状态',
field: 'warehouseOutStatus',
formatter: function(value, row, index) {
return $.table.selectDictLabel(warehouseOutStatusDatas, value);
}
},
{
title: '关联订单号',
field: 'relatedOrderCode',
},
{
title: '订单类型',
field: 'warehouseOrderType',
formatter: function(value, row, index) {
return $.table.selectDictLabel(warehouseOrderTypeDatas, value);
}
},
{
title: '出库类型',
field: 'warehouseOutType',
formatter: function(value, row, index) {
return $.table.selectDictLabel(warehouseOutTypeDatas, value);
}
},
{
title: '业务员',
field: 'businessName',
},
{
title: '物料合计',
field: 'materialSum',
},
{
title: '数量合计',
field: 'enterpriseSum',
},
{
title: '出库数',
field: 'outOrderSum',
},
{
title: '出库时间',
field: 'outOrderTime',
},
{
title: '录入人',
field: 'createBy',
},
{
title: '录入时间',
field: 'createTime',
},
{
title: '仓库员',
field: 'warehouseName',
},
{
title: '更新人',
field: 'updateBy',
},
{
title: '上次更新时间',
field: 'updateTime',
},
{
title: '备注',
field: 'remark',
},
{
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.outOrderId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
if (row.warehouseOutStatus == 0 && row.warehouseOrderType == 0 && row.warehouseOutType == 0){
actions.push('<a class="btn btn-success btn-xs ' + prepareMaterialFlag + '" href="javascript:void(0)" onclick="prepareMaterial(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>准备物料</a> ');
}
return actions.join('');
}
}]
};
$.table.init(options);
});
/*销售单-准备物料*/
function prepareMaterial(outOrderId){
var url = ctx + 'warehouse/warehouseOutOrder/prepareMaterial/' + outOrderId;
$.modal.open("准备物料",url);
}
</script>
</body>
</html>
Loading…
Cancel
Save