出库单据
This commit is contained in:
@@ -65,7 +65,6 @@ public class OutStockoutServiceImpl implements IOutStockoutService
|
||||
* @return 出库主单
|
||||
*/
|
||||
@Override
|
||||
@DataScope(warehouseAlias = "bw")
|
||||
public List<OutStockout> selectOutStockoutList(OutStockout outStockout)
|
||||
{
|
||||
return outStockoutMapper.selectOutStockoutList(outStockout);
|
||||
@@ -132,6 +131,7 @@ public class OutStockoutServiceImpl implements IOutStockoutService
|
||||
outStockout.setCreateManId(username);
|
||||
outStockout.setStatus("1");
|
||||
outStockout.setStockoutSource("0");
|
||||
outStockout.setWarehouseId("01");
|
||||
for (int i = 0; i < detailList.size(); i++) {
|
||||
OutStockoutDetail outStockoutDetail = detailList.get(i);
|
||||
outStockoutDetail.setStockoutDetailId(stockOutId + "-" + (i + 1));
|
||||
@@ -166,10 +166,10 @@ public class OutStockoutServiceImpl implements IOutStockoutService
|
||||
|
||||
OutStockout outStockout = outStockoutMapper.selectOutStockoutByStockoutId(stockoutId);
|
||||
if (outStockout == null){
|
||||
return AjaxResult.warn(MessageUtils.message("warn.message4"));
|
||||
return AjaxResult.warn("单据不存在,请检查!");
|
||||
}
|
||||
if ("1".equals(outStockout.getStatus())){
|
||||
return AjaxResult.warn(MessageUtils.message("warn.message5"));
|
||||
return AjaxResult.warn("单据未审核,请审核无误后再分配!");
|
||||
}
|
||||
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
|
||||
@@ -124,7 +124,7 @@ public class OutStockoutDetail extends BaseEntity
|
||||
|
||||
/** 物资名称 ASMAT_NAME */
|
||||
// @Excel(name = "物资名称 ASMAT_NAME")
|
||||
// private String productName;
|
||||
private String productName;
|
||||
|
||||
/** 供应商代码 SUPPLIER_CODE */
|
||||
@Excel(name = "供应商代码 SUPPLIER_CODE")
|
||||
@@ -138,9 +138,102 @@ public class OutStockoutDetail extends BaseEntity
|
||||
@Excel(name = "生产日期")
|
||||
private String printDate;
|
||||
|
||||
private ExtraField extraField;
|
||||
|
||||
/** 电压 */
|
||||
@Excel(name = "电压")
|
||||
private String voltage;
|
||||
|
||||
/** 功率 */
|
||||
@Excel(name = "功率")
|
||||
private String power;
|
||||
|
||||
/** 相位 */
|
||||
@Excel(name = "相位")
|
||||
private String phase;
|
||||
|
||||
/** 净重 */
|
||||
@Excel(name = "净重")
|
||||
private BigDecimal netWeight;
|
||||
|
||||
/** 毛重 */
|
||||
@Excel(name = "毛重")
|
||||
private BigDecimal grossWeight;
|
||||
|
||||
/** 分销 */
|
||||
@Excel(name = "分销")
|
||||
private String distribution;
|
||||
|
||||
/** 机型 */
|
||||
@Excel(name = "机型")
|
||||
private String model;
|
||||
|
||||
/** 订单号 */
|
||||
@Excel(name = "订单号")
|
||||
private String orderId;
|
||||
|
||||
public String getVoltage() {
|
||||
return voltage;
|
||||
}
|
||||
|
||||
public void setVoltage(String voltage) {
|
||||
this.voltage = voltage;
|
||||
}
|
||||
|
||||
public String getPower() {
|
||||
return power;
|
||||
}
|
||||
|
||||
public void setPower(String power) {
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
public String getPhase() {
|
||||
return phase;
|
||||
}
|
||||
|
||||
public void setPhase(String phase) {
|
||||
this.phase = phase;
|
||||
}
|
||||
|
||||
public BigDecimal getNetWeight() {
|
||||
return netWeight;
|
||||
}
|
||||
|
||||
public void setNetWeight(BigDecimal netWeight) {
|
||||
this.netWeight = netWeight;
|
||||
}
|
||||
|
||||
public BigDecimal getGrossWeight() {
|
||||
return grossWeight;
|
||||
}
|
||||
|
||||
public void setGrossWeight(BigDecimal grossWeight) {
|
||||
this.grossWeight = grossWeight;
|
||||
}
|
||||
|
||||
public String getDistribution() {
|
||||
return distribution;
|
||||
}
|
||||
|
||||
public void setDistribution(String distribution) {
|
||||
this.distribution = distribution;
|
||||
}
|
||||
|
||||
public String getModel() {
|
||||
return model;
|
||||
}
|
||||
|
||||
public void setModel(String model) {
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
public String getOrderId() {
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public void setOrderId(String orderId) {
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public void setStockoutDetailId(String stockoutDetailId)
|
||||
{
|
||||
@@ -433,48 +526,55 @@ public class OutStockoutDetail extends BaseEntity
|
||||
return printDate;
|
||||
}
|
||||
|
||||
public ExtraField getExtraField() {
|
||||
return extraField;
|
||||
public String getProductName() {
|
||||
return productName;
|
||||
}
|
||||
|
||||
public void setExtraField(ExtraField extraField) {
|
||||
this.extraField = extraField;
|
||||
public void setProductName(String productName) {
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("stockoutDetailId", getStockoutDetailId())
|
||||
.append("stockoutGuid", getStockoutGuid())
|
||||
.append("stockoutId", getStockoutId())
|
||||
.append("lotNo", getLotNo())
|
||||
.append("productGuid", getProductGuid())
|
||||
.append("productId", getProductId())
|
||||
.append("quantity", getQuantity())
|
||||
.append("quantityX", getQuantityX())
|
||||
.append("quantityJ", getQuantityJ())
|
||||
.append("assignNum", getAssignNum())
|
||||
.append("assignNumX", getAssignNumX())
|
||||
.append("assignNumJ", getAssignNumJ())
|
||||
.append("allotQuantity", getAllotQuantity())
|
||||
.append("allotQuantityX", getAllotQuantityX())
|
||||
.append("allotQuantityJ", getAllotQuantityJ())
|
||||
.append("price", getPrice())
|
||||
.append("remark", getRemark())
|
||||
.append("warehouseId", getWarehouseId())
|
||||
.append("outId", getOutId())
|
||||
.append("bukechaiQuantity", getBukechaiQuantity())
|
||||
.append("kechaiQuantity", getKechaiQuantity())
|
||||
.append("entryid", getEntryid())
|
||||
.append("flatQuantity", getFlatQuantity())
|
||||
.append("fid", getFid())
|
||||
.append("erpStockoutId", getErpStockoutId())
|
||||
.append("unit", getUnit())
|
||||
.append("spec", getSpec())
|
||||
.append("supplierId", getSupplierId())
|
||||
.append("cargoNo", getCargoNo())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("printDate", getPrintDate())
|
||||
.toString();
|
||||
return "OutStockoutDetail{" +
|
||||
"stockoutDetailId='" + stockoutDetailId + '\'' +
|
||||
", stockoutGuid='" + stockoutGuid + '\'' +
|
||||
", stockoutId='" + stockoutId + '\'' +
|
||||
", lotNo='" + lotNo + '\'' +
|
||||
", productGuid='" + productGuid + '\'' +
|
||||
", productId='" + productId + '\'' +
|
||||
", quantity=" + quantity +
|
||||
", quantityX=" + quantityX +
|
||||
", quantityJ=" + quantityJ +
|
||||
", assignNum=" + assignNum +
|
||||
", assignNumX=" + assignNumX +
|
||||
", assignNumJ=" + assignNumJ +
|
||||
", allotQuantity=" + allotQuantity +
|
||||
", allotQuantityX=" + allotQuantityX +
|
||||
", allotQuantityJ=" + allotQuantityJ +
|
||||
", price='" + price + '\'' +
|
||||
", warehouseId='" + warehouseId + '\'' +
|
||||
", outId='" + outId + '\'' +
|
||||
", bukechaiQuantity='" + bukechaiQuantity + '\'' +
|
||||
", kechaiQuantity='" + kechaiQuantity + '\'' +
|
||||
", entryid='" + entryid + '\'' +
|
||||
", flatQuantity='" + flatQuantity + '\'' +
|
||||
", fid='" + fid + '\'' +
|
||||
", erpStockoutId='" + erpStockoutId + '\'' +
|
||||
", unit='" + unit + '\'' +
|
||||
", spec='" + spec + '\'' +
|
||||
", productName='" + productName + '\'' +
|
||||
", supplierId='" + supplierId + '\'' +
|
||||
", cargoNo='" + cargoNo + '\'' +
|
||||
", printDate='" + printDate + '\'' +
|
||||
", voltage='" + voltage + '\'' +
|
||||
", power='" + power + '\'' +
|
||||
", phase='" + phase + '\'' +
|
||||
", netWeight=" + netWeight +
|
||||
", grossWeight=" + grossWeight +
|
||||
", distribution='" + distribution + '\'' +
|
||||
", model='" + model + '\'' +
|
||||
", orderId='" + orderId + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,25 +1,31 @@
|
||||
package com.ruoyi.out.productAndStock.controller;
|
||||
|
||||
import java.util.List;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.out.productAndStock.domain.ViewProductAndStock;
|
||||
import com.ruoyi.out.productAndStock.service.IViewProductAndStockService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 可出库的库存物资信息Controller
|
||||
*
|
||||
* 库存物资Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-21
|
||||
* @date 2025-09-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/out/productAndStock")
|
||||
@@ -29,7 +35,7 @@ public class ViewProductAndStockController extends BaseController
|
||||
private IViewProductAndStockService viewProductAndStockService;
|
||||
|
||||
/**
|
||||
* 查询可出库的库存物资信息列表
|
||||
* 查询库存物资列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:productAndStock:list')")
|
||||
@GetMapping("/list")
|
||||
@@ -41,20 +47,20 @@ public class ViewProductAndStockController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出可出库的库存物资信息列表
|
||||
* 导出库存物资列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:productAndStock:export')")
|
||||
@Log(title = "可出库的库存物资信息", businessType = BusinessType.EXPORT)
|
||||
@Log(title = "库存物资", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ViewProductAndStock viewProductAndStock)
|
||||
{
|
||||
List<ViewProductAndStock> list = viewProductAndStockService.selectViewProductAndStockList(viewProductAndStock);
|
||||
ExcelUtil<ViewProductAndStock> util = new ExcelUtil<ViewProductAndStock>(ViewProductAndStock.class);
|
||||
util.exportExcel(response, list, "可出库的库存物资信息数据");
|
||||
util.exportExcel(response, list, "库存物资数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取可出库的库存物资信息详细信息
|
||||
* 获取库存物资详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:productAndStock:query')")
|
||||
@GetMapping(value = "/{onlyIdentity}")
|
||||
@@ -64,10 +70,10 @@ public class ViewProductAndStockController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增可出库的库存物资信息
|
||||
* 新增库存物资
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:productAndStock:add')")
|
||||
@Log(title = "可出库的库存物资信息", businessType = BusinessType.INSERT)
|
||||
@Log(title = "库存物资", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ViewProductAndStock viewProductAndStock)
|
||||
{
|
||||
@@ -75,10 +81,10 @@ public class ViewProductAndStockController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改可出库的库存物资信息
|
||||
* 修改库存物资
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:productAndStock:edit')")
|
||||
@Log(title = "可出库的库存物资信息", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "库存物资", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ViewProductAndStock viewProductAndStock)
|
||||
{
|
||||
@@ -86,10 +92,10 @@ public class ViewProductAndStockController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除可出库的库存物资信息
|
||||
* 删除库存物资
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:productAndStock:remove')")
|
||||
@Log(title = "可出库的库存物资信息", businessType = BusinessType.DELETE)
|
||||
@Log(title = "库存物资", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{onlyIdentitys}")
|
||||
public AjaxResult remove(@PathVariable Long[] onlyIdentitys)
|
||||
{
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
package com.ruoyi.out.productAndStock.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import java.math.BigDecimal;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 可出库的库存物资信息对象 view_product_and_stock
|
||||
*
|
||||
* 库存物资对象 view_product_and_stock
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-21
|
||||
* @date 2025-09-12
|
||||
*/
|
||||
public class ViewProductAndStock extends BaseEntity
|
||||
{
|
||||
@@ -19,95 +20,268 @@ public class ViewProductAndStock extends BaseEntity
|
||||
@Excel(name = "序号")
|
||||
private Long onlyIdentity;
|
||||
|
||||
/** 物资编码 */
|
||||
@Excel(name = "物资编码")
|
||||
/** 品号 */
|
||||
@Excel(name = "品号")
|
||||
private String productId;
|
||||
|
||||
/** 批号 */
|
||||
@Excel(name = "批号")
|
||||
/** 批次号 */
|
||||
@Excel(name = "批次号")
|
||||
private String lotNo;
|
||||
|
||||
/** 物资名称 */
|
||||
@Excel(name = "物资名称")
|
||||
/** 品名 */
|
||||
@Excel(name = "品名")
|
||||
private String productName;
|
||||
|
||||
/** 数量 */
|
||||
@Excel(name = "数量")
|
||||
private String quantity;
|
||||
private BigDecimal quantity;
|
||||
|
||||
/** 仓库 */
|
||||
@Excel(name = "仓库")
|
||||
private String warehouseId;
|
||||
private String warehouseName;
|
||||
|
||||
public String getWarehouseName() {
|
||||
return warehouseName;
|
||||
}
|
||||
/** 规格 */
|
||||
@Excel(name = "规格")
|
||||
private String spare1;
|
||||
|
||||
public void setWarehouseName(String warehouseName) {
|
||||
this.warehouseName = warehouseName;
|
||||
}
|
||||
/** 单位 */
|
||||
@Excel(name = "单位")
|
||||
private String spare3;
|
||||
|
||||
public void setOnlyIdentity(Long onlyIdentity)
|
||||
/** 型号 */
|
||||
@Excel(name = "型号")
|
||||
private String spare4;
|
||||
|
||||
/** 颜色 */
|
||||
@Excel(name = "颜色")
|
||||
private String spare5;
|
||||
|
||||
/** 序列号 */
|
||||
@Excel(name = "序列号")
|
||||
private String spare6;
|
||||
|
||||
/** 电压 */
|
||||
@Excel(name = "电压")
|
||||
private String voltage;
|
||||
|
||||
/** 功率 */
|
||||
@Excel(name = "功率")
|
||||
private String power;
|
||||
|
||||
/** 相位 */
|
||||
@Excel(name = "相位")
|
||||
private String phase;
|
||||
|
||||
/** 净重 */
|
||||
@Excel(name = "净重")
|
||||
private BigDecimal netWeight;
|
||||
|
||||
/** 毛重 */
|
||||
@Excel(name = "毛重")
|
||||
private BigDecimal grossWeight;
|
||||
|
||||
/** 分销 */
|
||||
@Excel(name = "分销")
|
||||
private String distribution;
|
||||
|
||||
/** 机型 */
|
||||
@Excel(name = "机型")
|
||||
private String model;
|
||||
|
||||
/** 订单号 */
|
||||
@Excel(name = "订单号")
|
||||
private String orderId;
|
||||
|
||||
public void setOnlyIdentity(Long onlyIdentity)
|
||||
{
|
||||
this.onlyIdentity = onlyIdentity;
|
||||
}
|
||||
|
||||
public Long getOnlyIdentity()
|
||||
public Long getOnlyIdentity()
|
||||
{
|
||||
return onlyIdentity;
|
||||
}
|
||||
|
||||
public void setProductId(String productId)
|
||||
public void setProductId(String productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public String getProductId()
|
||||
public String getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setLotNo(String lotNo)
|
||||
public void setLotNo(String lotNo)
|
||||
{
|
||||
this.lotNo = lotNo;
|
||||
}
|
||||
|
||||
public String getLotNo()
|
||||
public String getLotNo()
|
||||
{
|
||||
return lotNo;
|
||||
}
|
||||
|
||||
public void setProductName(String productName)
|
||||
public void setProductName(String productName)
|
||||
{
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public String getProductName()
|
||||
public String getProductName()
|
||||
{
|
||||
return productName;
|
||||
}
|
||||
|
||||
public void setQuantity(String quantity)
|
||||
public void setQuantity(BigDecimal quantity)
|
||||
{
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public String getQuantity()
|
||||
public BigDecimal getQuantity()
|
||||
{
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setWarehouseId(String warehouseId)
|
||||
public void setWarehouseId(String warehouseId)
|
||||
{
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public String getWarehouseId()
|
||||
public String getWarehouseId()
|
||||
{
|
||||
return warehouseId;
|
||||
}
|
||||
|
||||
public void setSpare1(String spare1)
|
||||
{
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare1()
|
||||
{
|
||||
return spare1;
|
||||
}
|
||||
|
||||
public void setSpare3(String spare3)
|
||||
{
|
||||
this.spare3 = spare3;
|
||||
}
|
||||
|
||||
public String getSpare3()
|
||||
{
|
||||
return spare3;
|
||||
}
|
||||
|
||||
public void setSpare4(String spare4)
|
||||
{
|
||||
this.spare4 = spare4;
|
||||
}
|
||||
|
||||
public String getSpare4()
|
||||
{
|
||||
return spare4;
|
||||
}
|
||||
|
||||
public void setSpare5(String spare5)
|
||||
{
|
||||
this.spare5 = spare5;
|
||||
}
|
||||
|
||||
public String getSpare5()
|
||||
{
|
||||
return spare5;
|
||||
}
|
||||
|
||||
public void setSpare6(String spare6)
|
||||
{
|
||||
this.spare6 = spare6;
|
||||
}
|
||||
|
||||
public String getSpare6()
|
||||
{
|
||||
return spare6;
|
||||
}
|
||||
|
||||
public void setVoltage(String voltage)
|
||||
{
|
||||
this.voltage = voltage;
|
||||
}
|
||||
|
||||
public String getVoltage()
|
||||
{
|
||||
return voltage;
|
||||
}
|
||||
|
||||
public void setPower(String power)
|
||||
{
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
public String getPower()
|
||||
{
|
||||
return power;
|
||||
}
|
||||
|
||||
public void setPhase(String phase)
|
||||
{
|
||||
this.phase = phase;
|
||||
}
|
||||
|
||||
public String getPhase()
|
||||
{
|
||||
return phase;
|
||||
}
|
||||
|
||||
public void setNetWeight(BigDecimal netWeight)
|
||||
{
|
||||
this.netWeight = netWeight;
|
||||
}
|
||||
|
||||
public BigDecimal getNetWeight()
|
||||
{
|
||||
return netWeight;
|
||||
}
|
||||
|
||||
public void setGrossWeight(BigDecimal grossWeight)
|
||||
{
|
||||
this.grossWeight = grossWeight;
|
||||
}
|
||||
|
||||
public BigDecimal getGrossWeight()
|
||||
{
|
||||
return grossWeight;
|
||||
}
|
||||
|
||||
public void setDistribution(String distribution)
|
||||
{
|
||||
this.distribution = distribution;
|
||||
}
|
||||
|
||||
public String getDistribution()
|
||||
{
|
||||
return distribution;
|
||||
}
|
||||
|
||||
public void setModel(String model)
|
||||
{
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
public String getModel()
|
||||
{
|
||||
return model;
|
||||
}
|
||||
|
||||
public void setOrderId(String orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public String getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
@@ -117,6 +291,19 @@ public class ViewProductAndStock extends BaseEntity
|
||||
.append("productName", getProductName())
|
||||
.append("quantity", getQuantity())
|
||||
.append("warehouseId", getWarehouseId())
|
||||
.append("spare1", getSpare1())
|
||||
.append("spare3", getSpare3())
|
||||
.append("spare4", getSpare4())
|
||||
.append("spare5", getSpare5())
|
||||
.append("spare6", getSpare6())
|
||||
.append("voltage", getVoltage())
|
||||
.append("power", getPower())
|
||||
.append("phase", getPhase())
|
||||
.append("netWeight", getNetWeight())
|
||||
.append("grossWeight", getGrossWeight())
|
||||
.append("distribution", getDistribution())
|
||||
.append("model", getModel())
|
||||
.append("orderId", getOrderId())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,60 +1,59 @@
|
||||
package com.ruoyi.out.productAndStock.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.out.productAndStock.domain.ViewProductAndStock;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 可出库的库存物资信息Mapper接口
|
||||
*
|
||||
* 库存物资Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-21
|
||||
* @date 2025-09-12
|
||||
*/
|
||||
public interface ViewProductAndStockMapper
|
||||
public interface ViewProductAndStockMapper
|
||||
{
|
||||
/**
|
||||
* 查询可出库的库存物资信息
|
||||
*
|
||||
* @param onlyIdentity 可出库的库存物资信息主键
|
||||
* @return 可出库的库存物资信息
|
||||
* 查询库存物资
|
||||
*
|
||||
* @param onlyIdentity 库存物资主键
|
||||
* @return 库存物资
|
||||
*/
|
||||
public ViewProductAndStock selectViewProductAndStockByOnlyIdentity(Long onlyIdentity);
|
||||
|
||||
/**
|
||||
* 查询可出库的库存物资信息列表
|
||||
*
|
||||
* @param viewProductAndStock 可出库的库存物资信息
|
||||
* @return 可出库的库存物资信息集合
|
||||
* 查询库存物资列表
|
||||
*
|
||||
* @param viewProductAndStock 库存物资
|
||||
* @return 库存物资集合
|
||||
*/
|
||||
public List<ViewProductAndStock> selectViewProductAndStockList(ViewProductAndStock viewProductAndStock);
|
||||
|
||||
/**
|
||||
* 新增可出库的库存物资信息
|
||||
*
|
||||
* @param viewProductAndStock 可出库的库存物资信息
|
||||
* 新增库存物资
|
||||
*
|
||||
* @param viewProductAndStock 库存物资
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertViewProductAndStock(ViewProductAndStock viewProductAndStock);
|
||||
|
||||
/**
|
||||
* 修改可出库的库存物资信息
|
||||
*
|
||||
* @param viewProductAndStock 可出库的库存物资信息
|
||||
* 修改库存物资
|
||||
*
|
||||
* @param viewProductAndStock 库存物资
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateViewProductAndStock(ViewProductAndStock viewProductAndStock);
|
||||
|
||||
/**
|
||||
* 删除可出库的库存物资信息
|
||||
*
|
||||
* @param onlyIdentity 可出库的库存物资信息主键
|
||||
* 删除库存物资
|
||||
*
|
||||
* @param onlyIdentity 库存物资主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteViewProductAndStockByOnlyIdentity(Long onlyIdentity);
|
||||
|
||||
/**
|
||||
* 批量删除可出库的库存物资信息
|
||||
*
|
||||
* 批量删除库存物资
|
||||
*
|
||||
* @param onlyIdentitys 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
|
||||
@@ -1,61 +1,60 @@
|
||||
package com.ruoyi.out.productAndStock.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.out.productAndStock.domain.ViewProductAndStock;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 可出库的库存物资信息Service接口
|
||||
*
|
||||
* 库存物资Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-21
|
||||
* @date 2025-09-12
|
||||
*/
|
||||
public interface IViewProductAndStockService
|
||||
public interface IViewProductAndStockService
|
||||
{
|
||||
/**
|
||||
* 查询可出库的库存物资信息
|
||||
*
|
||||
* @param onlyIdentity 可出库的库存物资信息主键
|
||||
* @return 可出库的库存物资信息
|
||||
* 查询库存物资
|
||||
*
|
||||
* @param onlyIdentity 库存物资主键
|
||||
* @return 库存物资
|
||||
*/
|
||||
public ViewProductAndStock selectViewProductAndStockByOnlyIdentity(Long onlyIdentity);
|
||||
|
||||
/**
|
||||
* 查询可出库的库存物资信息列表
|
||||
*
|
||||
* @param viewProductAndStock 可出库的库存物资信息
|
||||
* @return 可出库的库存物资信息集合
|
||||
* 查询库存物资列表
|
||||
*
|
||||
* @param viewProductAndStock 库存物资
|
||||
* @return 库存物资集合
|
||||
*/
|
||||
public List<ViewProductAndStock> selectViewProductAndStockList(ViewProductAndStock viewProductAndStock);
|
||||
|
||||
/**
|
||||
* 新增可出库的库存物资信息
|
||||
*
|
||||
* @param viewProductAndStock 可出库的库存物资信息
|
||||
* 新增库存物资
|
||||
*
|
||||
* @param viewProductAndStock 库存物资
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertViewProductAndStock(ViewProductAndStock viewProductAndStock);
|
||||
|
||||
/**
|
||||
* 修改可出库的库存物资信息
|
||||
*
|
||||
* @param viewProductAndStock 可出库的库存物资信息
|
||||
* 修改库存物资
|
||||
*
|
||||
* @param viewProductAndStock 库存物资
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateViewProductAndStock(ViewProductAndStock viewProductAndStock);
|
||||
|
||||
/**
|
||||
* 批量删除可出库的库存物资信息
|
||||
*
|
||||
* @param onlyIdentitys 需要删除的可出库的库存物资信息主键集合
|
||||
* 批量删除库存物资
|
||||
*
|
||||
* @param onlyIdentitys 需要删除的库存物资主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteViewProductAndStockByOnlyIdentitys(Long[] onlyIdentitys);
|
||||
|
||||
/**
|
||||
* 删除可出库的库存物资信息信息
|
||||
*
|
||||
* @param onlyIdentity 可出库的库存物资信息主键
|
||||
* 删除库存物资信息
|
||||
*
|
||||
* @param onlyIdentity 库存物资主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteViewProductAndStockByOnlyIdentity(Long onlyIdentity);
|
||||
|
||||
@@ -1,30 +1,29 @@
|
||||
package com.ruoyi.out.productAndStock.service.impl;
|
||||
|
||||
import com.ruoyi.out.productAndStock.domain.ViewProductAndStock;
|
||||
import com.ruoyi.out.productAndStock.mapper.ViewProductAndStockMapper;
|
||||
import com.ruoyi.out.productAndStock.service.IViewProductAndStockService;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.out.productAndStock.mapper.ViewProductAndStockMapper;
|
||||
import com.ruoyi.out.productAndStock.domain.ViewProductAndStock;
|
||||
import com.ruoyi.out.productAndStock.service.IViewProductAndStockService;
|
||||
|
||||
/**
|
||||
* 可出库的库存物资信息Service业务层处理
|
||||
*
|
||||
* 库存物资Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-21
|
||||
* @date 2025-09-12
|
||||
*/
|
||||
@Service
|
||||
public class ViewProductAndStockServiceImpl implements IViewProductAndStockService
|
||||
public class ViewProductAndStockServiceImpl implements IViewProductAndStockService
|
||||
{
|
||||
@Autowired
|
||||
private ViewProductAndStockMapper viewProductAndStockMapper;
|
||||
|
||||
/**
|
||||
* 查询可出库的库存物资信息
|
||||
*
|
||||
* @param onlyIdentity 可出库的库存物资信息主键
|
||||
* @return 可出库的库存物资信息
|
||||
* 查询库存物资
|
||||
*
|
||||
* @param onlyIdentity 库存物资主键
|
||||
* @return 库存物资
|
||||
*/
|
||||
@Override
|
||||
public ViewProductAndStock selectViewProductAndStockByOnlyIdentity(Long onlyIdentity)
|
||||
@@ -33,10 +32,10 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询可出库的库存物资信息列表
|
||||
*
|
||||
* @param viewProductAndStock 可出库的库存物资信息
|
||||
* @return 可出库的库存物资信息
|
||||
* 查询库存物资列表
|
||||
*
|
||||
* @param viewProductAndStock 库存物资
|
||||
* @return 库存物资
|
||||
*/
|
||||
@Override
|
||||
public List<ViewProductAndStock> selectViewProductAndStockList(ViewProductAndStock viewProductAndStock)
|
||||
@@ -45,9 +44,9 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增可出库的库存物资信息
|
||||
*
|
||||
* @param viewProductAndStock 可出库的库存物资信息
|
||||
* 新增库存物资
|
||||
*
|
||||
* @param viewProductAndStock 库存物资
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -57,9 +56,9 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改可出库的库存物资信息
|
||||
*
|
||||
* @param viewProductAndStock 可出库的库存物资信息
|
||||
* 修改库存物资
|
||||
*
|
||||
* @param viewProductAndStock 库存物资
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -69,9 +68,9 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除可出库的库存物资信息
|
||||
*
|
||||
* @param onlyIdentitys 需要删除的可出库的库存物资信息主键
|
||||
* 批量删除库存物资
|
||||
*
|
||||
* @param onlyIdentitys 需要删除的库存物资主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -81,9 +80,9 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除可出库的库存物资信息信息
|
||||
*
|
||||
* @param onlyIdentity 可出库的库存物资信息主键
|
||||
* 删除库存物资信息
|
||||
*
|
||||
* @param onlyIdentity 库存物资主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -67,21 +67,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="erpStockoutId" column="erp_stockout_id" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="spec" column="spec" />
|
||||
|
||||
<result property="supplierId" column="supplier_id" />
|
||||
<result property="cargoNo" column="cargo_no" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="printDate" column="print_date" />
|
||||
<association property="extraField" javaType="ExtraField">
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="materialDesc" column="product_name" />
|
||||
<result property="englishDesc" column="englishDesc" />
|
||||
<result property="length" column="length" />
|
||||
<result property="width" column="width" />
|
||||
<result property="height" column="height" />
|
||||
<result property="volume" column="volume" />
|
||||
<result property="netWeight" column="netWeight" />
|
||||
</association>
|
||||
<result property="voltage" column="voltage" />
|
||||
<result property="power" column="power" />
|
||||
<result property="phase" column="phase" />
|
||||
<result property="netWeight" column="net_weight" />
|
||||
<result property="grossWeight" column="gross_weight" />
|
||||
<result property="distribution" column="distribution" />
|
||||
<result property="model" column="model" />
|
||||
<result property="orderId" column="order_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOutStockoutDetailFinishVo">
|
||||
@@ -255,10 +252,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
d.quantity_j, d.assign_num, d.assign_num_x, d.assign_num_j, d.allot_quantity, d.allot_quantity_x, d.allot_quantity_j,
|
||||
d.price, d.remark, d.warehouse_id, d.out_id, d.bukechai_quantity, d.kechai_quantity, d.entryid, d.flat_quantity, d.fid,
|
||||
d.erp_stockout_id, d.unit, d.spec, d.supplier_id, d.cargo_no, d.create_time, d.print_date,
|
||||
bp.product_name, bp.spare1 as englishDesc,
|
||||
bp.spare2 as netWeight,bp.spare5 as length,bp.spare6 as width,bp.spare7 as height,bp.spare8 as volume
|
||||
d.voltage, d.power, d.phase, d.net_weight, d.gross_weight, d.distribution, d.model, d.order_id,
|
||||
d.product_name
|
||||
from out_stockout_detail_finish d
|
||||
left join bas_product bp on d.product_id = bp.product_id
|
||||
where stockout_guid = #{stockoutGuid}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="lotNo" column="lot_no" />
|
||||
<result property="productGuid" column="product_guid" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="quantityX" column="quantity_x" />
|
||||
<result property="quantityJ" column="quantity_j" />
|
||||
@@ -32,21 +33,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="erpStockoutId" column="erp_stockout_id" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="spec" column="spec" />
|
||||
|
||||
<result property="supplierId" column="supplier_id" />
|
||||
<result property="cargoNo" column="cargo_no" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="printDate" column="print_date" />
|
||||
<association property="extraField" javaType="ExtraField">
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="materialDesc" column="product_name" />
|
||||
<result property="englishDesc" column="englishDesc" />
|
||||
<result property="length" column="length" />
|
||||
<result property="width" column="width" />
|
||||
<result property="height" column="height" />
|
||||
<result property="volume" column="volume" />
|
||||
<result property="netWeight" column="netWeight" />
|
||||
</association>
|
||||
<result property="voltage" column="voltage" />
|
||||
<result property="power" column="power" />
|
||||
<result property="phase" column="phase" />
|
||||
<result property="netWeight" column="net_weight" />
|
||||
<result property="grossWeight" column="gross_weight" />
|
||||
<result property="distribution" column="distribution" />
|
||||
<result property="model" column="model" />
|
||||
<result property="orderId" column="order_id" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOutStockoutDetailVo">
|
||||
@@ -54,10 +53,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
d.quantity_j, d.assign_num, d.assign_num_x, d.assign_num_j, d.allot_quantity, d.allot_quantity_x, d.allot_quantity_j,
|
||||
d.price, d.remark, d.warehouse_id, d.out_id, d.bukechai_quantity, d.kechai_quantity, d.entryid, d.flat_quantity, d.fid,
|
||||
d.erp_stockout_id, d.unit, d.spec, d.supplier_id, d.cargo_no, d.create_time, d.print_date,
|
||||
bp.product_name, bp.spare1 as englishDesc,
|
||||
bp.spare2 as netWeight,bp.spare5 as length,bp.spare6 as width,bp.spare7 as height,bp.spare8 as volume
|
||||
d.voltage, d.power, d.phase, d.net_weight, d.gross_weight, d.distribution, d.model, d.order_id,
|
||||
d.product_name
|
||||
from out_stockout_detail d
|
||||
left join bas_product bp on d.product_id = bp.product_id
|
||||
</sql>
|
||||
|
||||
<select id="selectOutStockoutDetailList" parameterType="OutStockoutDetail" resultMap="OutStockoutDetailResult">
|
||||
@@ -93,6 +91,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="supplierId != null and supplierId != ''"> and d.supplier_id like concat('%', #{supplierId}, '%')</if>
|
||||
<if test="cargoNo != null and cargoNo != ''"> and d.cargo_no = #{cargoNo}</if>
|
||||
<if test="printDate != null and printDate != ''"> and d.print_date = #{printDate}</if>
|
||||
<if test="voltage != null and voltage != ''"> and d.voltage = #{voltage}</if>
|
||||
<if test="power != null and power != ''"> and d.power = #{power}</if>
|
||||
<if test="phase != null and phase != ''"> and d.phase = #{phase}</if>
|
||||
<if test="netWeight != null "> and d.net_weight = #{netWeight}</if>
|
||||
<if test="grossWeight != null "> and d.gross_weight = #{grossWeight}</if>
|
||||
<if test="distribution != null and distribution != ''"> and d.distribution = #{distribution}</if>
|
||||
<if test="model != null and model != ''"> and d.model = #{model}</if>
|
||||
<if test="orderId != null and orderId != ''"> and d.order_id = #{orderId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -110,6 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="lotNo != null">lot_no,</if>
|
||||
<if test="productGuid != null">product_guid,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="quantityX != null">quantity_x,</if>
|
||||
<if test="quantityJ != null">quantity_j,</if>
|
||||
@@ -131,11 +138,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="erpStockoutId != null">erp_stockout_id,</if>
|
||||
<if test="unit != null">unit,</if>
|
||||
<if test="spec != null">spec,</if>
|
||||
|
||||
<if test="supplierId != null">supplier_id,</if>
|
||||
<if test="cargoNo != null">cargo_no,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="printDate != null">print_date,</if>
|
||||
<if test="voltage != null">voltage,</if>
|
||||
<if test="power != null">power,</if>
|
||||
<if test="phase != null">phase,</if>
|
||||
<if test="netWeight != null">net_weight,</if>
|
||||
<if test="grossWeight != null">gross_weight,</if>
|
||||
<if test="distribution != null">distribution,</if>
|
||||
<if test="model != null">model,</if>
|
||||
<if test="orderId != null">order_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutDetailId != null and stockoutDetailId != ''">#{stockoutDetailId},</if>
|
||||
@@ -144,6 +158,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="lotNo != null">#{lotNo},</if>
|
||||
<if test="productGuid != null">#{productGuid},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="quantityX != null">#{quantityX},</if>
|
||||
<if test="quantityJ != null">#{quantityJ},</if>
|
||||
@@ -165,11 +180,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="erpStockoutId != null">#{erpStockoutId},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
<if test="spec != null">#{spec},</if>
|
||||
|
||||
<if test="supplierId != null">#{supplierId},</if>
|
||||
<if test="cargoNo != null">#{cargoNo},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="printDate != null">#{printDate},</if>
|
||||
<if test="voltage != null">#{voltage},</if>
|
||||
<if test="power != null">#{power},</if>
|
||||
<if test="phase != null">#{phase},</if>
|
||||
<if test="netWeight != null">#{netWeight},</if>
|
||||
<if test="grossWeight != null">#{grossWeight},</if>
|
||||
<if test="distribution != null">#{distribution},</if>
|
||||
<if test="model != null">#{model},</if>
|
||||
<if test="orderId != null">#{orderId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -206,6 +228,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="cargoNo != null">cargo_no = #{cargoNo},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="printDate != null">print_date = #{printDate},</if>
|
||||
<if test="voltage != null">voltage = #{voltage},</if>
|
||||
<if test="power != null">power = #{power},</if>
|
||||
<if test="phase != null">phase = #{phase},</if>
|
||||
<if test="netWeight != null">net_weight = #{netWeight},</if>
|
||||
<if test="grossWeight != null">gross_weight = #{grossWeight},</if>
|
||||
<if test="distribution != null">distribution = #{distribution},</if>
|
||||
<if test="model != null">model = #{model},</if>
|
||||
<if test="orderId != null">order_id = #{orderId},</if>
|
||||
</trim>
|
||||
where stockout_detail_id = #{stockoutDetailId}
|
||||
</update>
|
||||
@@ -226,10 +256,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
d.quantity_j, d.assign_num, d.assign_num_x, d.assign_num_j, d.allot_quantity, d.allot_quantity_x, d.allot_quantity_j,
|
||||
d.price, d.remark, d.warehouse_id, d.out_id, d.bukechai_quantity, d.kechai_quantity, d.entryid, d.flat_quantity, d.fid,
|
||||
d.erp_stockout_id, d.unit, d.spec, d.supplier_id, d.cargo_no, d.create_time, d.print_date,
|
||||
bp.product_name, bp.spare1 as englishDesc,
|
||||
bp.spare2 as netWeight,bp.spare5 as length,bp.spare6 as width,bp.spare7 as height,bp.spare8 as volume
|
||||
d.voltage, d.power, d.phase, d.net_weight, d.gross_weight, d.distribution, d.model, d.order_id,
|
||||
d.product_name
|
||||
from out_stockout_detail d
|
||||
left join bas_product bp on d.product_id = bp.product_id
|
||||
where d.stockout_guid = #{stockoutGuid}
|
||||
</select>
|
||||
</mapper>
|
||||
</mapper>
|
||||
@@ -36,7 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
left join bas_warehouse bw on bw.warehouse_id = o.warehouse_id
|
||||
left join bas_customer bc on bc.customer_no = o.customer_no
|
||||
left join out_stockout_detail d on d.stockout_id = o.stockout_id
|
||||
left join bas_product bp on bp.product_id = d.product_id
|
||||
|
||||
<where>
|
||||
<if test="stockoutGuid != null and stockoutGuid != ''"> and o.stockout_guid = #{stockoutGuid}</if>
|
||||
<if test="stockoutId != null and stockoutId != ''"> and o.stockout_id = #{stockoutId}</if>
|
||||
@@ -55,17 +55,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="FID != null and FID != ''"> and o.FID = #{FID}</if>
|
||||
<if test="erpStockoutId != null and erpStockoutId != ''"> and o.erp_stockout_id = #{erpStockoutId}</if>
|
||||
<if test="productId != null and productId != ''"> and d.product_id = #{productId}</if>
|
||||
<if test="productName != null and productName != ''"> and bp.product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="productName != null and productName != ''"> and d.product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="customerName != null and customerName != ''"> and bc.customer_name like concat('%', #{customerName}, '%')</if>
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
<if test="typeData != null and typeData.size()>0">
|
||||
and bw.warehouse_type in
|
||||
<foreach item="item" index="index" collection="typeData" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
order by o.create_date desc
|
||||
</select>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.out.productAndStock.mapper.ViewProductAndStockMapper">
|
||||
|
||||
|
||||
<resultMap type="ViewProductAndStock" id="ViewProductAndStockResult">
|
||||
<result property="onlyIdentity" column="only_identity" />
|
||||
<result property="productId" column="product_id" />
|
||||
@@ -11,25 +11,50 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare3" column="spare3" />
|
||||
<result property="spare4" column="spare4" />
|
||||
<result property="spare5" column="spare5" />
|
||||
<result property="spare6" column="spare6" />
|
||||
<result property="voltage" column="voltage" />
|
||||
<result property="power" column="power" />
|
||||
<result property="phase" column="phase" />
|
||||
<result property="netWeight" column="net_weight" />
|
||||
<result property="grossWeight" column="gross_weight" />
|
||||
<result property="distribution" column="distribution" />
|
||||
<result property="model" column="model" />
|
||||
<result property="orderId" column="order_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectViewProductAndStockVo">
|
||||
select only_identity, product_id, lot_no, product_name, quantity, warehouse_id,warehouse_name from view_product_and_stock
|
||||
select only_identity, product_id, lot_no, product_name, quantity, warehouse_id, spare1, spare3, spare4, spare5, spare6, voltage, power, phase, net_weight, gross_weight, distribution, model, order_id from view_product_and_stock
|
||||
</sql>
|
||||
|
||||
<select id="selectViewProductAndStockList" parameterType="ViewProductAndStock" resultMap="ViewProductAndStockResult">
|
||||
<include refid="selectViewProductAndStockVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="onlyIdentity != null "> and only_identity = #{onlyIdentity}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no like concat('%', #{lotNo}, '%')</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
|
||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
||||
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
|
||||
<if test="spare6 != null and spare6 != ''"> and spare6 = #{spare6}</if>
|
||||
<if test="voltage != null and voltage != ''"> and voltage = #{voltage}</if>
|
||||
<if test="power != null and power != ''"> and power = #{power}</if>
|
||||
<if test="phase != null and phase != ''"> and phase = #{phase}</if>
|
||||
<if test="netWeight != null "> and net_weight = #{netWeight}</if>
|
||||
<if test="grossWeight != null "> and gross_weight = #{grossWeight}</if>
|
||||
<if test="distribution != null and distribution != ''"> and distribution = #{distribution}</if>
|
||||
<if test="model != null and model != ''"> and model = #{model}</if>
|
||||
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectViewProductAndStockByOnlyIdentity" parameterType="Long" resultMap="ViewProductAndStockResult">
|
||||
<include refid="selectViewProductAndStockVo"/>
|
||||
where only_identity = #{onlyIdentity}
|
||||
@@ -44,6 +69,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
<if test="spare4 != null">spare4,</if>
|
||||
<if test="spare5 != null">spare5,</if>
|
||||
<if test="spare6 != null">spare6,</if>
|
||||
<if test="voltage != null">voltage,</if>
|
||||
<if test="power != null">power,</if>
|
||||
<if test="phase != null">phase,</if>
|
||||
<if test="netWeight != null">net_weight,</if>
|
||||
<if test="grossWeight != null">gross_weight,</if>
|
||||
<if test="distribution != null">distribution,</if>
|
||||
<if test="model != null">model,</if>
|
||||
<if test="orderId != null">order_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="onlyIdentity != null">#{onlyIdentity},</if>
|
||||
@@ -52,6 +90,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
<if test="spare4 != null">#{spare4},</if>
|
||||
<if test="spare5 != null">#{spare5},</if>
|
||||
<if test="spare6 != null">#{spare6},</if>
|
||||
<if test="voltage != null">#{voltage},</if>
|
||||
<if test="power != null">#{power},</if>
|
||||
<if test="phase != null">#{phase},</if>
|
||||
<if test="netWeight != null">#{netWeight},</if>
|
||||
<if test="grossWeight != null">#{grossWeight},</if>
|
||||
<if test="distribution != null">#{distribution},</if>
|
||||
<if test="model != null">#{model},</if>
|
||||
<if test="orderId != null">#{orderId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -63,6 +114,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
<if test="spare4 != null">spare4 = #{spare4},</if>
|
||||
<if test="spare5 != null">spare5 = #{spare5},</if>
|
||||
<if test="spare6 != null">spare6 = #{spare6},</if>
|
||||
<if test="voltage != null">voltage = #{voltage},</if>
|
||||
<if test="power != null">power = #{power},</if>
|
||||
<if test="phase != null">phase = #{phase},</if>
|
||||
<if test="netWeight != null">net_weight = #{netWeight},</if>
|
||||
<if test="grossWeight != null">gross_weight = #{grossWeight},</if>
|
||||
<if test="distribution != null">distribution = #{distribution},</if>
|
||||
<if test="model != null">model = #{model},</if>
|
||||
<if test="orderId != null">order_id = #{orderId},</if>
|
||||
</trim>
|
||||
where only_identity = #{onlyIdentity}
|
||||
</update>
|
||||
@@ -72,9 +136,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteViewProductAndStockByOnlyIdentitys" parameterType="String">
|
||||
delete from view_product_and_stock where only_identity in
|
||||
delete from view_product_and_stock where only_identity in
|
||||
<foreach item="onlyIdentity" collection="array" open="(" separator="," close=")">
|
||||
#{onlyIdentity}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
</mapper>
|
||||
@@ -2,13 +2,23 @@
|
||||
<div class="app-container">
|
||||
<!-- 主表信息录入 -->
|
||||
<el-form :model="formData" ref="formRef" size="small" :inline="true" label-width="68px" :rules="rules">
|
||||
<el-form-item :label="'仓库'" prop="warehouseId" required><!--仓库-->
|
||||
<el-select v-model="formData.warehouseId" :placeholder="'请选择仓库'" clearable>
|
||||
<!-- <el-form-item :label="'仓库'" prop="warehouseId" required><!–仓库–>-->
|
||||
<!-- <el-select v-model="formData.warehouseId" :placeholder="'请选择仓库'" clearable>-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in warehouseOptions"-->
|
||||
<!-- :key="dict.warehouseId"-->
|
||||
<!-- :label="dict.warehouseName"-->
|
||||
<!-- :value="dict.warehouseId"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item :label="'单据类型'" prop="outType" required><!--单据类型-->
|
||||
<el-select v-model="formData.outType" :placeholder="'请选择单据类型'" clearable>
|
||||
<el-option
|
||||
v-for="dict in warehouseOptions"
|
||||
:key="dict.warehouseId"
|
||||
:label="dict.warehouseName"
|
||||
:value="dict.warehouseId"
|
||||
v-for="dict in dict.type.out_bill_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -21,16 +31,7 @@
|
||||
readonly
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="'单据类型'" prop="outType" required><!--单据类型-->
|
||||
<el-select v-model="formData.outType" :placeholder="'请选择单据类型'" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.out_bill_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="warning" icon="el-icon-refresh" size="mini" @click="reset">{{'重置'}}<!--重置--></el-button>
|
||||
<el-button type="success" icon="el-icon-check" size="mini" @click="handleSave" v-hasPermi="['out:outStockout:saveBill']">{{'保存单据'}}<!--保存单据--></el-button>
|
||||
@@ -44,14 +45,29 @@
|
||||
|
||||
<!-- 物资明细表格 -->
|
||||
<el-table v-loading="loading" :data="materialList">
|
||||
<el-table-column :label="'物资编号'" align="left" prop="productId" /><!--物资编号-->
|
||||
<el-table-column :label="'物资名称'" align="left" prop="productName" /><!--物资名称-->
|
||||
<el-table-column :label="'品号'" align="center" prop="productId" /><!--物资编号-->
|
||||
<el-table-column :label="'品名'" align="center" prop="productName" /><!--物资名称-->
|
||||
<el-table-column label="批次号" align="center" prop="lotNo" />
|
||||
<el-table-column label="订单号" align="center" prop="orderId" />
|
||||
<el-table-column label="序列号" align="center" prop="printDate" />
|
||||
<!-- <el-table-column :label="$t('addOutStockout.batchNo')" align="left" prop="lotNo" /><!–批号–>-->
|
||||
<el-table-column :label="'数量'" align="right" prop="quantity"><!--数量-->
|
||||
<el-table-column :label="'数量'" align="center" prop="quantity" width="150"><!--数量-->
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.quantity" :min="1" size="mini" @change="handleQuantityChange(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" align="center" prop="spec" />
|
||||
<el-table-column label="单位" align="center" prop="unit" />
|
||||
<el-table-column label="型号" align="center" prop="cargoNo" />
|
||||
<el-table-column label="颜色" align="center" prop="price" />
|
||||
<el-table-column label="电压" align="center" prop="voltage" />
|
||||
<el-table-column label="功率" align="center" prop="power" />
|
||||
<el-table-column label="相位" align="center" prop="phase" />
|
||||
<el-table-column label="净重" align="center" prop="netWeight" />
|
||||
<el-table-column label="毛重" align="center" prop="grossWeight" />
|
||||
<el-table-column label="分销" align="center" prop="distribution" />
|
||||
<el-table-column label="机型" align="center" prop="model" />
|
||||
|
||||
<el-table-column :label="'操作'" align="center" class-name="small-padding fixed-width"><!--操作-->
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.$index)">{{'删除'}}<!--删除--></el-button>
|
||||
@@ -62,22 +78,48 @@
|
||||
<!-- 选择物资弹窗 -->
|
||||
<el-dialog :title="'选择物资'" :visible.sync="materialDialog" width="800px" append-to-body><!--选择物资-->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item :label="'物资编码'" prop="productId"><!--物资编码-->
|
||||
|
||||
<el-form-item :label="'品号'" prop="productId"><!--物资编码-->
|
||||
<el-input
|
||||
v-model="queryParams.productId"
|
||||
:placeholder="'请输入物资编码'"
|
||||
:placeholder="'请输入品号'"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="'物资名称'" prop="productName"><!--物资名称-->
|
||||
<el-form-item :label="'品名'" prop="productName"><!--物资名称-->
|
||||
<el-input
|
||||
v-model="queryParams.productName"
|
||||
:placeholder="'请输入物资名称'"
|
||||
:placeholder="'请输入品名'"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格" prop="spare1">
|
||||
<el-input v-model="queryParams.spare1" placeholder="请输入规格"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位" prop="spare3">
|
||||
<el-input v-model="queryParams.spare3" placeholder="请输入单位"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="型号" prop="spare4">
|
||||
<el-input v-model="queryParams.spare4" placeholder="请输入型号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="序列号" prop="spare6">
|
||||
<el-input v-model="queryParams.spare6" placeholder="请输入序列号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号" prop="orderId">
|
||||
<el-input v-model="queryParams.orderId" placeholder="请输入订单号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item>
|
||||
@@ -88,10 +130,25 @@
|
||||
|
||||
<el-table v-loading="materialLoading" :data="materialOptions" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column :label="'物资编码'" align="left" prop="productId" /><!--物资编码-->
|
||||
<el-table-column :label="'物资名称'" align="left" prop="productName" /><!--物资名称-->
|
||||
<el-table-column :label="'数量'" align="right" prop="quantity" /><!--数量-->
|
||||
<el-table-column :label="'仓库'" align="left" prop="warehouseId" /><!--仓库-->
|
||||
<el-table-column label="序号" align="center" prop="onlyIdentity" />
|
||||
<el-table-column label="订单号" align="center" prop="orderId" />
|
||||
<el-table-column label="品号" align="center" prop="productId" />
|
||||
<el-table-column label="批次号" align="center" prop="lotNo" />
|
||||
<el-table-column label="品名" align="center" prop="productName" />
|
||||
<el-table-column label="数量" align="center" prop="quantity" />
|
||||
<el-table-column label="仓库" align="center" prop="warehouseId" />
|
||||
<el-table-column label="规格" align="center" prop="spare1" />
|
||||
<el-table-column label="单位" align="center" prop="spare3" />
|
||||
<el-table-column label="型号" align="center" prop="spare4" />
|
||||
<el-table-column label="颜色" align="center" prop="spare5" />
|
||||
<el-table-column label="序列号" align="center" prop="spare6" />
|
||||
<el-table-column label="电压" align="center" prop="voltage" />
|
||||
<el-table-column label="功率" align="center" prop="power" />
|
||||
<el-table-column label="相位" align="center" prop="phase" />
|
||||
<el-table-column label="净重" align="center" prop="netWeight" />
|
||||
<el-table-column label="毛重" align="center" prop="grossWeight" />
|
||||
<el-table-column label="分销" align="center" prop="distribution" />
|
||||
<el-table-column label="机型" align="center" prop="model" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
@@ -107,7 +164,7 @@
|
||||
<el-button @click="cancelSelectMaterials">{{'取消'}}<!--取 消--></el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<!-- 选择客户弹窗 -->
|
||||
<el-dialog :title="'客户管理'" :visible.sync="customerDialog" width="800px" append-to-body>
|
||||
<el-form :model="customerQueryParams" ref="customerQueryForm" size="small" :inline="true" label-width="100px">
|
||||
@@ -183,9 +240,9 @@ export default {
|
||||
customerTotal: 0,
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
warehouseId: [
|
||||
{ required: true, message: '请选择仓库', trigger: "change" }
|
||||
],
|
||||
// warehouseId: [
|
||||
// { required: true, message: '请选择仓库', trigger: "change" }
|
||||
// ],
|
||||
customerNo: [
|
||||
{ required: true, message: '请输入客户编号', trigger: "blur" }
|
||||
],
|
||||
@@ -195,7 +252,7 @@ export default {
|
||||
},
|
||||
// 主表数据
|
||||
formData: {
|
||||
warehouseId: null,
|
||||
// warehouseId: null,
|
||||
customerNo: null,
|
||||
customerName: null, // 添加客户名称字段,用于显示
|
||||
outType: null
|
||||
@@ -219,7 +276,20 @@ export default {
|
||||
lotNo: null,
|
||||
productName: null,
|
||||
quantity: null,
|
||||
warehouseId: null
|
||||
warehouseId: null,
|
||||
spare1: null,
|
||||
spare3: null,
|
||||
spare4: null,
|
||||
spare5: null,
|
||||
spare6: null,
|
||||
voltage: null,
|
||||
power: null,
|
||||
phase: null,
|
||||
netWeight: null,
|
||||
grossWeight: null,
|
||||
distribution: null,
|
||||
model: null,
|
||||
orderId: null
|
||||
},
|
||||
// 客户选择弹窗
|
||||
customerDialog: false,
|
||||
@@ -298,12 +368,12 @@ export default {
|
||||
},
|
||||
/** 打开选择物资弹窗 */
|
||||
handleSelectMaterials() {
|
||||
if (!this.formData.warehouseId) {
|
||||
this.$modal.msgError('请选择仓库');
|
||||
return;
|
||||
}
|
||||
// if (!this.formData.warehouseId) {
|
||||
// this.$modal.msgError('请选择仓库');
|
||||
// return;
|
||||
// }
|
||||
this.materialDialog = true;
|
||||
this.queryParams.warehouseId = this.formData.warehouseId;
|
||||
// this.queryParams.warehouseId = this.formData.warehouseId;
|
||||
this.getMaterialList();
|
||||
},
|
||||
/** 获取物资列表 */
|
||||
@@ -341,6 +411,20 @@ export default {
|
||||
productName: item.productName,
|
||||
quantity: item.quantity,
|
||||
quantityOrignal: item.quantity,
|
||||
voltage: item.voltage,
|
||||
phase: item.phase,
|
||||
power: item.power,
|
||||
netWeight: item.netWeight,
|
||||
grossWeight: item.grossWeight,
|
||||
distribution: item.distribution,
|
||||
model: item.model,
|
||||
orderId: item.orderId,
|
||||
unit: item.spare3,
|
||||
spec: item.spare1,
|
||||
cargoNo: item.spare4,
|
||||
printDate:item.spare6,
|
||||
price:item.spare5,
|
||||
warehouseId: item.warehouseId,
|
||||
lotNo: item.lotNo,
|
||||
onlyIdentity: item.onlyIdentity
|
||||
}))
|
||||
@@ -402,7 +486,7 @@ export default {
|
||||
/** 重置数据 */
|
||||
reset() {
|
||||
this.formData = {
|
||||
warehouseId: null,
|
||||
// warehouseId: null,
|
||||
customerNo: null,
|
||||
customerName: null,
|
||||
outType: null
|
||||
|
||||
@@ -46,37 +46,32 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="'开始时间'" prop="startDate">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.startDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
:placeholder="'请选择开始时间'">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item :label="'确认时间'" prop="finishDate">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.finishDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
:placeholder="'请选择确认时间'">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item :label="'仓库'" prop="warehouseId"><!--仓库-->
|
||||
<el-select
|
||||
v-model="queryParams.warehouseId"
|
||||
:placeholder="'请选择仓库'"
|
||||
clearable
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in warehouseOptions"
|
||||
:key="item.warehouseId"
|
||||
:label="item.warehouseName"
|
||||
:value="item.warehouseId"
|
||||
/>
|
||||
</el-select>
|
||||
<el-form-item :label="'创建时间'" prop="dateRange">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
type="datetimerange"
|
||||
range-separator="---"
|
||||
:start-placeholder="'起始时间'"
|
||||
:end-placeholder="'结束时间'"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item :label="'仓库'" prop="warehouseId"><!–仓库–>-->
|
||||
<!-- <el-select-->
|
||||
<!-- v-model="queryParams.warehouseId"-->
|
||||
<!-- :placeholder="'请选择仓库'"-->
|
||||
<!-- clearable-->
|
||||
<!-- @change="handleQuery"-->
|
||||
<!-- >-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in warehouseOptions"-->
|
||||
<!-- :key="item.warehouseId"-->
|
||||
<!-- :label="item.warehouseName"-->
|
||||
<!-- :value="item.warehouseId"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{'搜索'}}</el-button> <!-- 搜索 -->
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{'重置'}}</el-button> <!-- 重置 -->
|
||||
@@ -151,6 +146,7 @@
|
||||
<dict-tag :options="dict.type.out_bill_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="'出口'" align="left" prop="exitId" />
|
||||
<el-table-column :label="'客户编码'" align="left" prop="customerNo" /><!-- 客户编码 -->
|
||||
<el-table-column :label="'客户名称'" align="left" prop="customerName" />
|
||||
<el-table-column :label="'建单人'" align="left" prop="createManId" /> <!-- 建单人 -->
|
||||
@@ -170,17 +166,28 @@
|
||||
|
||||
<!-- 子表数据 -->
|
||||
<el-table v-loading="detailLoading" :data="outStockDetailList.slice((detailQueryParams.pageNum-1)*detailQueryParams.pageSize, detailQueryParams.pageNum*detailQueryParams.pageSize)" style="margin-top: 20px;">
|
||||
<el-table-column :label="'出库子单编号'" align="left" prop="stockoutDetailId" /> <!-- 出库子单编号 -->
|
||||
<el-table-column :label="'物资编码'" align="left" prop="productId" /> <!-- 物资编码 -->
|
||||
<el-table-column :label="'物资描述'" align="left" prop="extraField.materialDesc" />
|
||||
<el-table-column :label="'英文描述'" align="left" prop="extraField.englishDesc"/><!--英文描述-->
|
||||
<el-table-column :label="'箱号'" align="left" prop="extraField.cartonNo"/><!--箱号-->
|
||||
<el-table-column :label="'包装方式'" align="left" prop="extraField.packingMethod"/><!--包装方式-->
|
||||
<el-table-column :label="'净重'" align="right" width="120px" prop="extraField.netWeight" /> <!--净重-->
|
||||
<el-table-column :label="'计划数量'" align="right" prop="quantity" /> <!-- 计划数量 -->
|
||||
<el-table-column :label="'实际数量'" align="right" prop="assignNum" /> <!-- 实际数量 -->
|
||||
<el-table-column :label="'分配数量'" align="right" prop="allotQuantity" /> <!-- 分配数量 -->
|
||||
<el-table-column :label="'备注'" align="left" prop="remark" /> <!-- 备注 -->
|
||||
<el-table-column :label="'出库子单编号'" align="center" prop="stockoutDetailId" /> <!-- 出库子单编号 -->
|
||||
<el-table-column :label="'品号'" align="center" prop="productId" /> <!-- 物资编码 -->
|
||||
<el-table-column :label="'品名'" align="center" prop="productName" />
|
||||
<el-table-column :label="'批次号'" align="center" prop="lotNo"/><!--英文描述-->
|
||||
<el-table-column :label="'序列号'" align="center" prop="printDate" /> <!--序列号-->
|
||||
<el-table-column label="订单号" align="center" prop="orderId" />
|
||||
<el-table-column :label="'计划数量'" align="center" prop="quantity" /> <!-- 计划数量 -->
|
||||
<el-table-column :label="'实际数量'" align="center" prop="assignNum" /> <!-- 实际数量 -->
|
||||
<el-table-column :label="'分配数量'" align="center" prop="allotQuantity" /> <!-- 分配数量 -->
|
||||
<el-table-column :label="'颜色'" align="center" prop="price"/><!--箱号-->
|
||||
<el-table-column :label="'单位'" align="center" prop="unit"/><!--单位-->
|
||||
<el-table-column :label="'规格'" align="center" prop="spec" /> <!--规格-->
|
||||
<el-table-column :label="'型号'" align="center" prop="cargoNo" /> <!--型号-->
|
||||
<el-table-column label="电压" align="center" prop="voltage" />
|
||||
<el-table-column label="功率" align="center" prop="power" />
|
||||
<el-table-column label="相位" align="center" prop="phase" />
|
||||
<el-table-column label="净重" align="center" prop="netWeight" />
|
||||
<el-table-column label="毛重" align="center" prop="grossWeight" />
|
||||
<el-table-column label="分销" align="center" prop="distribution" />
|
||||
<el-table-column label="机型" align="center" prop="model" />
|
||||
->
|
||||
<el-table-column :label="'备注'" align="center" prop="remark" /> <!-- 备注 -->
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
@@ -250,27 +257,16 @@ export default {
|
||||
]
|
||||
},
|
||||
// 出口选项
|
||||
exitOptions: [],
|
||||
// 所有出口数据(按仓库ID分组)
|
||||
allExitOptions: {
|
||||
'02': [
|
||||
{ exitId: "G1004", exitName: 'G1004' },
|
||||
{ exitId: 'G1010', exitName: 'G1010' },
|
||||
{ exitId: 'fluent1', exitName: 'fluent1' },
|
||||
{ exitId: 'fluent2', exitName: 'fluent2' },
|
||||
],
|
||||
'13': [
|
||||
{ exitId: 'G2001', exitName: 'G2001' },
|
||||
{ exitId: 'G3001', exitName: 'G3001' },
|
||||
{ exitId: 'G3010', exitName: 'G3010' },
|
||||
{ exitId: 'G4001', exitName: 'G4001' },
|
||||
{ exitId: 'G4010', exitName: 'G4010' },
|
||||
{ exitId: 'G5001', exitName: 'G5001' },
|
||||
{ exitId: 'G5010', exitName: 'G5010' },
|
||||
]
|
||||
},
|
||||
exitOptions: [
|
||||
{ exitId: 'G1001', exitName: 'G1001'},
|
||||
{ exitId: 'G1002', exitName: 'G1002'},
|
||||
|
||||
],
|
||||
|
||||
// 当前审核状态
|
||||
currentAuditStatus: null,
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
@@ -346,6 +342,14 @@ export default {
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
// 处理日期范围
|
||||
if (this.dateRange && this.dateRange.length > 0) {
|
||||
this.queryParams.startDate = this.dateRange[0]
|
||||
this.queryParams.finishDate = this.dateRange[1]
|
||||
} else {
|
||||
this.queryParams.startDate = null
|
||||
this.queryParams.finishDate = null
|
||||
}
|
||||
// 清空子表数据
|
||||
this.outStockDetailList = []
|
||||
this.detailTotal = 0
|
||||
@@ -355,6 +359,7 @@ export default {
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.dateRange = []
|
||||
this.resetForm("queryForm")
|
||||
this.handleQuery()
|
||||
},
|
||||
@@ -374,26 +379,27 @@ export default {
|
||||
}
|
||||
|
||||
for(var i=0;i<this.selectedRows.length;i++){
|
||||
if (this.selectedRows[i].status != "1" && status == "2") {
|
||||
if (this.selectedRows[i].status != "1" && status == 2) {
|
||||
this.$modal.msgError(this.selectedRows[i].stockoutId+'单据已审核')
|
||||
return
|
||||
}
|
||||
|
||||
// if (this.selectedRows[i].status < 3 && status == "4") {
|
||||
// this.$modal.msgError(this.selectedRows[i].stockoutId+"单据未开始,无法确认")
|
||||
// return
|
||||
// }
|
||||
if (this.selectedRows[i].status != "1" && status == "5"){
|
||||
if (Number(this.selectedRows[i].status) < 3 && status == 4) {
|
||||
this.$modal.msgError(this.selectedRows[i].stockoutId+"单据未开始,无法确认")
|
||||
return
|
||||
}
|
||||
if (this.selectedRows[i].status != "1" && status == 5){
|
||||
this.$modal.msgError(this.selectedRows[i].stockoutId+'单据已审核,无法作废')
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 如果是审核操作(status=2),显示弹窗选择出口
|
||||
if (status === 2 || status === 3) {
|
||||
this.currentAuditStatus = status
|
||||
// 根据选中单据的仓库ID设置出口选项
|
||||
this.setExitOptionsByWarehouse()
|
||||
|
||||
this.auditDialogVisible = true
|
||||
this.auditForm.exitId = null
|
||||
return
|
||||
@@ -425,9 +431,7 @@ export default {
|
||||
}
|
||||
const stockoutIds = this.selectedRows.map(row => row.stockoutId)
|
||||
let outstock = this.selectedRows[0]
|
||||
console.log(outstock.status !== "2")
|
||||
console.log(outstock.status !== "3")
|
||||
if (outstock.status !== "2" && outstock.status !== "3") {
|
||||
if (outstock.status != "2" && outstock.status != "3") {
|
||||
this.$modal.msgError('请先审核出库单')
|
||||
return
|
||||
}
|
||||
@@ -486,49 +490,7 @@ export default {
|
||||
this.currentAuditStatus = null
|
||||
},
|
||||
|
||||
/** 根据仓库ID设置出口选项 */
|
||||
setExitOptionsByWarehouse() {
|
||||
try {
|
||||
// 获取选中单据的仓库ID集合,过滤掉空值和无效值
|
||||
const warehouseIds = [...new Set(
|
||||
this.selectedRows
|
||||
.map(row => row.warehouseId)
|
||||
.filter(id => id !== null && id !== undefined && id !== '')
|
||||
)]
|
||||
|
||||
//console.log("仓库ID集合:", warehouseIds)
|
||||
|
||||
// 如果没有有效的仓库ID,清空出口选项
|
||||
if (warehouseIds.length === 0) {
|
||||
this.exitOptions = []
|
||||
//console.warn('没有找到有效的仓库ID,已清空出口选项')
|
||||
return
|
||||
}
|
||||
|
||||
if (warehouseIds.length === 1) {
|
||||
// 如果所有选中单据都是同一个仓库,显示该仓库的出口
|
||||
const warehouseId = warehouseIds[0]
|
||||
this.exitOptions = this.allExitOptions[warehouseId] || []
|
||||
|
||||
// 如果没有对应key的默认为空数组,并给出提示
|
||||
if (!this.allExitOptions[warehouseId]) {
|
||||
//console.warn(`仓库ID ${warehouseId} 没有配置出口选项,已设置为空数组`)
|
||||
}
|
||||
}
|
||||
|
||||
console.log('选中仓库ID:', warehouseIds, '可用出口:', this.exitOptions)
|
||||
|
||||
// 如果最终没有可用的出口选项,给出提示
|
||||
if (this.exitOptions.length === 0) {
|
||||
this.exitOptions=[{exitId: '0', exitName: '人工出口'}]
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
console.error('设置出口选项时发生错误:', error)
|
||||
// 发生错误时,设置为空数组,确保不会影响用户操作
|
||||
this.exitOptions = []
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user