库存明细查询
This commit is contained in:
@@ -0,0 +1,104 @@
|
|||||||
|
package com.ruoyi.search.ViewStockDetail.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.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.enums.BusinessType;
|
||||||
|
import com.ruoyi.search.ViewStockDetail.domain.ViewStockDetail;
|
||||||
|
import com.ruoyi.search.ViewStockDetail.service.IViewStockDetailService;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存明细查询Controller
|
||||||
|
*
|
||||||
|
* @author gw
|
||||||
|
* @date 2025-05-26
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/search/ViewStockDetail")
|
||||||
|
public class ViewStockDetailController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IViewStockDetailService viewStockDetailService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询库存明细查询列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('search:ViewStockDetail:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(ViewStockDetail viewStockDetail)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<ViewStockDetail> list = viewStockDetailService.selectViewStockDetailList(viewStockDetail);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出库存明细查询列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('search:ViewStockDetail:export')")
|
||||||
|
@Log(title = "库存明细查询", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, ViewStockDetail viewStockDetail)
|
||||||
|
{
|
||||||
|
List<ViewStockDetail> list = viewStockDetailService.selectViewStockDetailList(viewStockDetail);
|
||||||
|
ExcelUtil<ViewStockDetail> util = new ExcelUtil<ViewStockDetail>(ViewStockDetail.class);
|
||||||
|
util.exportExcel(response, list, "库存明细查询数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取库存明细查询详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('search:ViewStockDetail:query')")
|
||||||
|
@GetMapping(value = "/{onlyIdentity}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("onlyIdentity") Long onlyIdentity)
|
||||||
|
{
|
||||||
|
return success(viewStockDetailService.selectViewStockDetailByOnlyIdentity(onlyIdentity));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增库存明细查询
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('search:ViewStockDetail:add')")
|
||||||
|
@Log(title = "库存明细查询", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody ViewStockDetail viewStockDetail)
|
||||||
|
{
|
||||||
|
return toAjax(viewStockDetailService.insertViewStockDetail(viewStockDetail));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改库存明细查询
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('search:ViewStockDetail:edit')")
|
||||||
|
@Log(title = "库存明细查询", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody ViewStockDetail viewStockDetail)
|
||||||
|
{
|
||||||
|
return toAjax(viewStockDetailService.updateViewStockDetail(viewStockDetail));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除库存明细查询
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('search:ViewStockDetail:remove')")
|
||||||
|
@Log(title = "库存明细查询", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{onlyIdentitys}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] onlyIdentitys)
|
||||||
|
{
|
||||||
|
return toAjax(viewStockDetailService.deleteViewStockDetailByOnlyIdentitys(onlyIdentitys));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,323 @@
|
|||||||
|
package com.ruoyi.search.ViewStockDetail.domain;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存明细查询对象 view_stock_detail
|
||||||
|
*
|
||||||
|
* @author gw
|
||||||
|
* @date 2025-05-26
|
||||||
|
*/
|
||||||
|
public class ViewStockDetail extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** id */
|
||||||
|
@Excel(name = "id")
|
||||||
|
private Long onlyIdentity;
|
||||||
|
|
||||||
|
/** 库存ID */
|
||||||
|
@Excel(name = "库存ID")
|
||||||
|
private String stockId;
|
||||||
|
|
||||||
|
/** 货位ID */
|
||||||
|
@Excel(name = "货位ID")
|
||||||
|
private String cargoSpaceId;
|
||||||
|
|
||||||
|
/** 托盘条码 */
|
||||||
|
@Excel(name = "托盘条码")
|
||||||
|
private String trayCode;
|
||||||
|
|
||||||
|
/** 数量 */
|
||||||
|
@Excel(name = "数量")
|
||||||
|
private String quantity;
|
||||||
|
|
||||||
|
/** 作业ID */
|
||||||
|
@Excel(name = "作业ID")
|
||||||
|
private String jobId;
|
||||||
|
|
||||||
|
/** 批号 */
|
||||||
|
@Excel(name = "批号")
|
||||||
|
private String lotNo;
|
||||||
|
|
||||||
|
/** 入库子单ID */
|
||||||
|
@Excel(name = "入库子单ID")
|
||||||
|
private String stockinDetailId;
|
||||||
|
|
||||||
|
/** 入库时间 */
|
||||||
|
@Excel(name = "入库时间")
|
||||||
|
private String inDate;
|
||||||
|
|
||||||
|
/** 仓库 */
|
||||||
|
@Excel(name = "仓库")
|
||||||
|
private String warehouseId;
|
||||||
|
|
||||||
|
/** 剁型ID */
|
||||||
|
@Excel(name = "剁型ID")
|
||||||
|
private String stackingId;
|
||||||
|
|
||||||
|
/** 货位名称 */
|
||||||
|
@Excel(name = "货位名称")
|
||||||
|
private String cargoSpaceName;
|
||||||
|
|
||||||
|
/** 巷道ID */
|
||||||
|
@Excel(name = "巷道ID")
|
||||||
|
private String roadwayId;
|
||||||
|
|
||||||
|
/** 货位状态 */
|
||||||
|
@Excel(name = "货位状态")
|
||||||
|
private String cargoSpaceStatus;
|
||||||
|
|
||||||
|
/** 是否锁定 */
|
||||||
|
@Excel(name = "是否锁定")
|
||||||
|
private String locked;
|
||||||
|
|
||||||
|
/** 物料ID */
|
||||||
|
@Excel(name = "物料ID")
|
||||||
|
private String productId;
|
||||||
|
|
||||||
|
/** 物料名称 */
|
||||||
|
@Excel(name = "物料名称")
|
||||||
|
private String productName;
|
||||||
|
|
||||||
|
/** 规格 */
|
||||||
|
@Excel(name = "规格")
|
||||||
|
private String spec;
|
||||||
|
|
||||||
|
/** 单位 */
|
||||||
|
@Excel(name = "单位")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
/** 价格 */
|
||||||
|
@Excel(name = "价格")
|
||||||
|
private String price;
|
||||||
|
|
||||||
|
public void setOnlyIdentity(Long onlyIdentity)
|
||||||
|
{
|
||||||
|
this.onlyIdentity = onlyIdentity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getOnlyIdentity()
|
||||||
|
{
|
||||||
|
return onlyIdentity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStockId(String stockId)
|
||||||
|
{
|
||||||
|
this.stockId = stockId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStockId()
|
||||||
|
{
|
||||||
|
return stockId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCargoSpaceId(String cargoSpaceId)
|
||||||
|
{
|
||||||
|
this.cargoSpaceId = cargoSpaceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCargoSpaceId()
|
||||||
|
{
|
||||||
|
return cargoSpaceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTrayCode(String trayCode)
|
||||||
|
{
|
||||||
|
this.trayCode = trayCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTrayCode()
|
||||||
|
{
|
||||||
|
return trayCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQuantity(String quantity)
|
||||||
|
{
|
||||||
|
this.quantity = quantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQuantity()
|
||||||
|
{
|
||||||
|
return quantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setJobId(String jobId)
|
||||||
|
{
|
||||||
|
this.jobId = jobId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getJobId()
|
||||||
|
{
|
||||||
|
return jobId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLotNo(String lotNo)
|
||||||
|
{
|
||||||
|
this.lotNo = lotNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLotNo()
|
||||||
|
{
|
||||||
|
return lotNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStockinDetailId(String stockinDetailId)
|
||||||
|
{
|
||||||
|
this.stockinDetailId = stockinDetailId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStockinDetailId()
|
||||||
|
{
|
||||||
|
return stockinDetailId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInDate(String inDate)
|
||||||
|
{
|
||||||
|
this.inDate = inDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInDate()
|
||||||
|
{
|
||||||
|
return inDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWarehouseId(String warehouseId)
|
||||||
|
{
|
||||||
|
this.warehouseId = warehouseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWarehouseId()
|
||||||
|
{
|
||||||
|
return warehouseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStackingId(String stackingId)
|
||||||
|
{
|
||||||
|
this.stackingId = stackingId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStackingId()
|
||||||
|
{
|
||||||
|
return stackingId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCargoSpaceName(String cargoSpaceName)
|
||||||
|
{
|
||||||
|
this.cargoSpaceName = cargoSpaceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCargoSpaceName()
|
||||||
|
{
|
||||||
|
return cargoSpaceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoadwayId(String roadwayId)
|
||||||
|
{
|
||||||
|
this.roadwayId = roadwayId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRoadwayId()
|
||||||
|
{
|
||||||
|
return roadwayId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCargoSpaceStatus(String cargoSpaceStatus)
|
||||||
|
{
|
||||||
|
this.cargoSpaceStatus = cargoSpaceStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCargoSpaceStatus()
|
||||||
|
{
|
||||||
|
return cargoSpaceStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLocked(String locked)
|
||||||
|
{
|
||||||
|
this.locked = locked;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLocked()
|
||||||
|
{
|
||||||
|
return locked;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductId(String productId)
|
||||||
|
{
|
||||||
|
this.productId = productId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProductId()
|
||||||
|
{
|
||||||
|
return productId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductName(String productName)
|
||||||
|
{
|
||||||
|
this.productName = productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProductName()
|
||||||
|
{
|
||||||
|
return productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSpec(String spec)
|
||||||
|
{
|
||||||
|
this.spec = spec;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSpec()
|
||||||
|
{
|
||||||
|
return spec;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUnit(String unit)
|
||||||
|
{
|
||||||
|
this.unit = unit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUnit()
|
||||||
|
{
|
||||||
|
return unit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrice(String price)
|
||||||
|
{
|
||||||
|
this.price = price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPrice()
|
||||||
|
{
|
||||||
|
return price;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("onlyIdentity", getOnlyIdentity())
|
||||||
|
.append("stockId", getStockId())
|
||||||
|
.append("cargoSpaceId", getCargoSpaceId())
|
||||||
|
.append("trayCode", getTrayCode())
|
||||||
|
.append("quantity", getQuantity())
|
||||||
|
.append("jobId", getJobId())
|
||||||
|
.append("lotNo", getLotNo())
|
||||||
|
.append("stockinDetailId", getStockinDetailId())
|
||||||
|
.append("inDate", getInDate())
|
||||||
|
.append("warehouseId", getWarehouseId())
|
||||||
|
.append("stackingId", getStackingId())
|
||||||
|
.append("cargoSpaceName", getCargoSpaceName())
|
||||||
|
.append("roadwayId", getRoadwayId())
|
||||||
|
.append("cargoSpaceStatus", getCargoSpaceStatus())
|
||||||
|
.append("locked", getLocked())
|
||||||
|
.append("productId", getProductId())
|
||||||
|
.append("productName", getProductName())
|
||||||
|
.append("spec", getSpec())
|
||||||
|
.append("unit", getUnit())
|
||||||
|
.append("price", getPrice())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.search.ViewStockDetail.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.search.ViewStockDetail.domain.ViewStockDetail;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存明细查询Mapper接口
|
||||||
|
*
|
||||||
|
* @author gw
|
||||||
|
* @date 2025-05-26
|
||||||
|
*/
|
||||||
|
public interface ViewStockDetailMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询库存明细查询
|
||||||
|
*
|
||||||
|
* @param onlyIdentity 库存明细查询主键
|
||||||
|
* @return 库存明细查询
|
||||||
|
*/
|
||||||
|
public ViewStockDetail selectViewStockDetailByOnlyIdentity(Long onlyIdentity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询库存明细查询列表
|
||||||
|
*
|
||||||
|
* @param viewStockDetail 库存明细查询
|
||||||
|
* @return 库存明细查询集合
|
||||||
|
*/
|
||||||
|
public List<ViewStockDetail> selectViewStockDetailList(ViewStockDetail viewStockDetail);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增库存明细查询
|
||||||
|
*
|
||||||
|
* @param viewStockDetail 库存明细查询
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertViewStockDetail(ViewStockDetail viewStockDetail);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改库存明细查询
|
||||||
|
*
|
||||||
|
* @param viewStockDetail 库存明细查询
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateViewStockDetail(ViewStockDetail viewStockDetail);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除库存明细查询
|
||||||
|
*
|
||||||
|
* @param onlyIdentity 库存明细查询主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteViewStockDetailByOnlyIdentity(Long onlyIdentity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除库存明细查询
|
||||||
|
*
|
||||||
|
* @param onlyIdentitys 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteViewStockDetailByOnlyIdentitys(Long[] onlyIdentitys);
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.search.ViewStockDetail.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.search.ViewStockDetail.domain.ViewStockDetail;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存明细查询Service接口
|
||||||
|
*
|
||||||
|
* @author gw
|
||||||
|
* @date 2025-05-26
|
||||||
|
*/
|
||||||
|
public interface IViewStockDetailService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询库存明细查询
|
||||||
|
*
|
||||||
|
* @param onlyIdentity 库存明细查询主键
|
||||||
|
* @return 库存明细查询
|
||||||
|
*/
|
||||||
|
public ViewStockDetail selectViewStockDetailByOnlyIdentity(Long onlyIdentity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询库存明细查询列表
|
||||||
|
*
|
||||||
|
* @param viewStockDetail 库存明细查询
|
||||||
|
* @return 库存明细查询集合
|
||||||
|
*/
|
||||||
|
public List<ViewStockDetail> selectViewStockDetailList(ViewStockDetail viewStockDetail);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增库存明细查询
|
||||||
|
*
|
||||||
|
* @param viewStockDetail 库存明细查询
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertViewStockDetail(ViewStockDetail viewStockDetail);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改库存明细查询
|
||||||
|
*
|
||||||
|
* @param viewStockDetail 库存明细查询
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateViewStockDetail(ViewStockDetail viewStockDetail);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除库存明细查询
|
||||||
|
*
|
||||||
|
* @param onlyIdentitys 需要删除的库存明细查询主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteViewStockDetailByOnlyIdentitys(Long[] onlyIdentitys);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除库存明细查询信息
|
||||||
|
*
|
||||||
|
* @param onlyIdentity 库存明细查询主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteViewStockDetailByOnlyIdentity(Long onlyIdentity);
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
package com.ruoyi.search.ViewStockDetail.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.search.ViewStockDetail.mapper.ViewStockDetailMapper;
|
||||||
|
import com.ruoyi.search.ViewStockDetail.domain.ViewStockDetail;
|
||||||
|
import com.ruoyi.search.ViewStockDetail.service.IViewStockDetailService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存明细查询Service业务层处理
|
||||||
|
*
|
||||||
|
* @author gw
|
||||||
|
* @date 2025-05-26
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ViewStockDetailServiceImpl implements IViewStockDetailService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ViewStockDetailMapper viewStockDetailMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询库存明细查询
|
||||||
|
*
|
||||||
|
* @param onlyIdentity 库存明细查询主键
|
||||||
|
* @return 库存明细查询
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ViewStockDetail selectViewStockDetailByOnlyIdentity(Long onlyIdentity)
|
||||||
|
{
|
||||||
|
return viewStockDetailMapper.selectViewStockDetailByOnlyIdentity(onlyIdentity);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询库存明细查询列表
|
||||||
|
*
|
||||||
|
* @param viewStockDetail 库存明细查询
|
||||||
|
* @return 库存明细查询
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ViewStockDetail> selectViewStockDetailList(ViewStockDetail viewStockDetail)
|
||||||
|
{
|
||||||
|
return viewStockDetailMapper.selectViewStockDetailList(viewStockDetail);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增库存明细查询
|
||||||
|
*
|
||||||
|
* @param viewStockDetail 库存明细查询
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertViewStockDetail(ViewStockDetail viewStockDetail)
|
||||||
|
{
|
||||||
|
return viewStockDetailMapper.insertViewStockDetail(viewStockDetail);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改库存明细查询
|
||||||
|
*
|
||||||
|
* @param viewStockDetail 库存明细查询
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateViewStockDetail(ViewStockDetail viewStockDetail)
|
||||||
|
{
|
||||||
|
return viewStockDetailMapper.updateViewStockDetail(viewStockDetail);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除库存明细查询
|
||||||
|
*
|
||||||
|
* @param onlyIdentitys 需要删除的库存明细查询主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteViewStockDetailByOnlyIdentitys(Long[] onlyIdentitys)
|
||||||
|
{
|
||||||
|
return viewStockDetailMapper.deleteViewStockDetailByOnlyIdentitys(onlyIdentitys);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除库存明细查询信息
|
||||||
|
*
|
||||||
|
* @param onlyIdentity 库存明细查询主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteViewStockDetailByOnlyIdentity(Long onlyIdentity)
|
||||||
|
{
|
||||||
|
return viewStockDetailMapper.deleteViewStockDetailByOnlyIdentity(onlyIdentity);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,149 @@
|
|||||||
|
<?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.search.ViewStockDetail.mapper.ViewStockDetailMapper">
|
||||||
|
|
||||||
|
<resultMap type="ViewStockDetail" id="ViewStockDetailResult">
|
||||||
|
<result property="onlyIdentity" column="only_identity" />
|
||||||
|
<result property="stockId" column="stock_id" />
|
||||||
|
<result property="cargoSpaceId" column="cargo_space_id" />
|
||||||
|
<result property="trayCode" column="tray_code" />
|
||||||
|
<result property="quantity" column="quantity" />
|
||||||
|
<result property="jobId" column="job_id" />
|
||||||
|
<result property="lotNo" column="lot_no" />
|
||||||
|
<result property="stockinDetailId" column="stockin_detail_id" />
|
||||||
|
<result property="inDate" column="in_date" />
|
||||||
|
<result property="warehouseId" column="warehouse_id" />
|
||||||
|
<result property="stackingId" column="stacking_id" />
|
||||||
|
<result property="cargoSpaceName" column="cargo_space_name" />
|
||||||
|
<result property="roadwayId" column="roadway_id" />
|
||||||
|
<result property="cargoSpaceStatus" column="cargo_space_status" />
|
||||||
|
<result property="locked" column="locked" />
|
||||||
|
<result property="productId" column="product_id" />
|
||||||
|
<result property="productName" column="product_name" />
|
||||||
|
<result property="spec" column="spec" />
|
||||||
|
<result property="unit" column="unit" />
|
||||||
|
<result property="price" column="price" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectViewStockDetailVo">
|
||||||
|
select only_identity, stock_id, cargo_space_id, tray_code, quantity, job_id, lot_no, stockin_detail_id, in_date, warehouse_id, stacking_id, cargo_space_name, roadway_id, cargo_space_status, locked, product_id, product_name, spec, unit, price from view_stock_detail
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectViewStockDetailList" parameterType="ViewStockDetail" resultMap="ViewStockDetailResult">
|
||||||
|
<include refid="selectViewStockDetailVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="onlyIdentity != null "> and only_identity = #{onlyIdentity}</if>
|
||||||
|
<if test="stockId != null and stockId != ''"> and stock_id like concat('%', #{stockId}, '%')</if>
|
||||||
|
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and cargo_space_id like concat('%', #{cargoSpaceId}, '%')</if>
|
||||||
|
<if test="trayCode != null and trayCode != ''"> and tray_code like concat('%', #{trayCode}, '%')</if>
|
||||||
|
<if test="quantity != null and quantity != ''"> and quantity like concat('%', #{quantity}, '%')</if>
|
||||||
|
<if test="jobId != null and jobId != ''"> and job_id like concat('%', #{jobId}, '%')</if>
|
||||||
|
<if test="lotNo != null and lotNo != ''"> and lot_no like concat('%', #{lotNo}, '%')</if>
|
||||||
|
<if test="stockinDetailId != null and stockinDetailId != ''"> and stockin_detail_id like concat('%', #{stockinDetailId}, '%')</if>
|
||||||
|
<if test="inDate != null and inDate != ''"> and in_date like concat('%', #{inDate}, '%')</if>
|
||||||
|
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id like concat('%', #{warehouseId}, '%')</if>
|
||||||
|
<if test="stackingId != null and stackingId != ''"> and stacking_id like concat('%', #{stackingId}, '%')</if>
|
||||||
|
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
|
||||||
|
<if test="roadwayId != null and roadwayId != ''"> and roadway_id like concat('%', #{roadwayId}, '%')</if>
|
||||||
|
<if test="cargoSpaceStatus != null and cargoSpaceStatus != ''"> and cargo_space_status like concat('%', #{cargoSpaceStatus}, '%')</if>
|
||||||
|
<if test="locked != null and locked != ''"> and locked like concat('%', #{locked}, '%')</if>
|
||||||
|
<if test="productId != null and productId != ''"> and product_id like concat('%', #{productId}, '%')</if>
|
||||||
|
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||||
|
<if test="spec != null and spec != ''"> and spec like concat('%', #{spec}, '%')</if>
|
||||||
|
<if test="unit != null and unit != ''"> and unit like concat('%', #{unit}, '%')</if>
|
||||||
|
<if test="price != null and price != ''"> and price like concat('%', #{price}, '%')</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectViewStockDetailByOnlyIdentity" parameterType="Long" resultMap="ViewStockDetailResult">
|
||||||
|
<include refid="selectViewStockDetailVo"/>
|
||||||
|
where only_identity = #{onlyIdentity}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertViewStockDetail" parameterType="ViewStockDetail">
|
||||||
|
insert into view_stock_detail
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="onlyIdentity != null">only_identity,</if>
|
||||||
|
<if test="stockId != null and stockId != ''">stock_id,</if>
|
||||||
|
<if test="cargoSpaceId != null">cargo_space_id,</if>
|
||||||
|
<if test="trayCode != null">tray_code,</if>
|
||||||
|
<if test="quantity != null">quantity,</if>
|
||||||
|
<if test="jobId != null">job_id,</if>
|
||||||
|
<if test="lotNo != null">lot_no,</if>
|
||||||
|
<if test="stockinDetailId != null">stockin_detail_id,</if>
|
||||||
|
<if test="inDate != null">in_date,</if>
|
||||||
|
<if test="warehouseId != null">warehouse_id,</if>
|
||||||
|
<if test="stackingId != null">stacking_id,</if>
|
||||||
|
<if test="cargoSpaceName != null">cargo_space_name,</if>
|
||||||
|
<if test="roadwayId != null">roadway_id,</if>
|
||||||
|
<if test="cargoSpaceStatus != null">cargo_space_status,</if>
|
||||||
|
<if test="locked != null">locked,</if>
|
||||||
|
<if test="productId != null">product_id,</if>
|
||||||
|
<if test="productName != null">product_name,</if>
|
||||||
|
<if test="spec != null">spec,</if>
|
||||||
|
<if test="unit != null">unit,</if>
|
||||||
|
<if test="price != null">price,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="onlyIdentity != null">#{onlyIdentity},</if>
|
||||||
|
<if test="stockId != null and stockId != ''">#{stockId},</if>
|
||||||
|
<if test="cargoSpaceId != null">#{cargoSpaceId},</if>
|
||||||
|
<if test="trayCode != null">#{trayCode},</if>
|
||||||
|
<if test="quantity != null">#{quantity},</if>
|
||||||
|
<if test="jobId != null">#{jobId},</if>
|
||||||
|
<if test="lotNo != null">#{lotNo},</if>
|
||||||
|
<if test="stockinDetailId != null">#{stockinDetailId},</if>
|
||||||
|
<if test="inDate != null">#{inDate},</if>
|
||||||
|
<if test="warehouseId != null">#{warehouseId},</if>
|
||||||
|
<if test="stackingId != null">#{stackingId},</if>
|
||||||
|
<if test="cargoSpaceName != null">#{cargoSpaceName},</if>
|
||||||
|
<if test="roadwayId != null">#{roadwayId},</if>
|
||||||
|
<if test="cargoSpaceStatus != null">#{cargoSpaceStatus},</if>
|
||||||
|
<if test="locked != null">#{locked},</if>
|
||||||
|
<if test="productId != null">#{productId},</if>
|
||||||
|
<if test="productName != null">#{productName},</if>
|
||||||
|
<if test="spec != null">#{spec},</if>
|
||||||
|
<if test="unit != null">#{unit},</if>
|
||||||
|
<if test="price != null">#{price},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateViewStockDetail" parameterType="ViewStockDetail">
|
||||||
|
update view_stock_detail
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="stockId != null and stockId != ''">stock_id = #{stockId},</if>
|
||||||
|
<if test="cargoSpaceId != null">cargo_space_id = #{cargoSpaceId},</if>
|
||||||
|
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
||||||
|
<if test="quantity != null">quantity = #{quantity},</if>
|
||||||
|
<if test="jobId != null">job_id = #{jobId},</if>
|
||||||
|
<if test="lotNo != null">lot_no = #{lotNo},</if>
|
||||||
|
<if test="stockinDetailId != null">stockin_detail_id = #{stockinDetailId},</if>
|
||||||
|
<if test="inDate != null">in_date = #{inDate},</if>
|
||||||
|
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||||
|
<if test="stackingId != null">stacking_id = #{stackingId},</if>
|
||||||
|
<if test="cargoSpaceName != null">cargo_space_name = #{cargoSpaceName},</if>
|
||||||
|
<if test="roadwayId != null">roadway_id = #{roadwayId},</if>
|
||||||
|
<if test="cargoSpaceStatus != null">cargo_space_status = #{cargoSpaceStatus},</if>
|
||||||
|
<if test="locked != null">locked = #{locked},</if>
|
||||||
|
<if test="productId != null">product_id = #{productId},</if>
|
||||||
|
<if test="productName != null">product_name = #{productName},</if>
|
||||||
|
<if test="spec != null">spec = #{spec},</if>
|
||||||
|
<if test="unit != null">unit = #{unit},</if>
|
||||||
|
<if test="price != null">price = #{price},</if>
|
||||||
|
</trim>
|
||||||
|
where only_identity = #{onlyIdentity}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteViewStockDetailByOnlyIdentity" parameterType="Long">
|
||||||
|
delete from view_stock_detail where only_identity = #{onlyIdentity}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteViewStockDetailByOnlyIdentitys" parameterType="String">
|
||||||
|
delete from view_stock_detail where only_identity in
|
||||||
|
<foreach item="onlyIdentity" collection="array" open="(" separator="," close=")">
|
||||||
|
#{onlyIdentity}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
44
ruoyi-ui/src/api/search/ViewStockDetail.js
Normal file
44
ruoyi-ui/src/api/search/ViewStockDetail.js
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询库存明细查询列表
|
||||||
|
export function listViewStockDetail(query) {
|
||||||
|
return request({
|
||||||
|
url: '/search/ViewStockDetail/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询库存明细查询详细
|
||||||
|
export function getViewStockDetail(onlyIdentity) {
|
||||||
|
return request({
|
||||||
|
url: '/search/ViewStockDetail/' + onlyIdentity,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增库存明细查询
|
||||||
|
export function addViewStockDetail(data) {
|
||||||
|
return request({
|
||||||
|
url: '/search/ViewStockDetail',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改库存明细查询
|
||||||
|
export function updateViewStockDetail(data) {
|
||||||
|
return request({
|
||||||
|
url: '/search/ViewStockDetail',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除库存明细查询
|
||||||
|
export function delViewStockDetail(onlyIdentity) {
|
||||||
|
return request({
|
||||||
|
url: '/search/ViewStockDetail/' + onlyIdentity,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
501
ruoyi-ui/src/views/search/ViewStockDetail/index.vue
Normal file
501
ruoyi-ui/src/views/search/ViewStockDetail/index.vue
Normal file
@@ -0,0 +1,501 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<!-- <el-form-item label="id" prop="onlyIdentity">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.onlyIdentity"-->
|
||||||
|
<!-- placeholder="请输入id"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<el-form-item label="库存ID" prop="stockId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.stockId"
|
||||||
|
placeholder="请输入库存ID"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="货位ID" prop="cargoSpaceId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.cargoSpaceId"
|
||||||
|
placeholder="请输入货位ID"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="托盘条码" prop="trayCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.trayCode"
|
||||||
|
placeholder="请输入托盘条码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数量" prop="quantity">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.quantity"
|
||||||
|
placeholder="请输入数量"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="作业ID" prop="jobId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.jobId"
|
||||||
|
placeholder="请输入作业ID"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="批号" prop="lotNo">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.lotNo"
|
||||||
|
placeholder="请输入批号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="入库子单ID" prop="stockinDetailId" style="white-space: nowrap">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.stockinDetailId"
|
||||||
|
placeholder="请输入入库子单ID"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="入库时间" prop="inDate">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.inDate"
|
||||||
|
placeholder="请输入入库时间"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="仓库" prop="warehouseId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.warehouseId"
|
||||||
|
placeholder="请输入仓库"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="剁型ID" prop="stackingId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.stackingId"
|
||||||
|
placeholder="请输入剁型ID"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="货位名称" prop="cargoSpaceName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.cargoSpaceName"
|
||||||
|
placeholder="请输入货位名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="巷道ID" prop="roadwayId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.roadwayId"
|
||||||
|
placeholder="请输入巷道ID"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否锁定" prop="locked">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.locked"
|
||||||
|
placeholder="请输入是否锁定"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料ID" prop="productId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.productId"
|
||||||
|
placeholder="请输入物料ID"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料名称" prop="productName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.productName"
|
||||||
|
placeholder="请输入物料名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="规格" prop="spec">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.spec"
|
||||||
|
placeholder="请输入规格"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="单位" prop="unit">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.unit"
|
||||||
|
placeholder="请输入单位"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="价格" prop="price">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.price"
|
||||||
|
placeholder="请输入价格"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</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>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<!-- <el-col :span="1.5">-->
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- type="primary"-->
|
||||||
|
<!-- plain-->
|
||||||
|
<!-- icon="el-icon-plus"-->
|
||||||
|
<!-- size="mini"-->
|
||||||
|
<!-- @click="handleAdd"-->
|
||||||
|
<!-- v-hasPermi="['search:ViewStockDetail:add']"-->
|
||||||
|
<!-- >新增</el-button>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
<!-- <el-col :span="1.5">-->
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- type="success"-->
|
||||||
|
<!-- plain-->
|
||||||
|
<!-- icon="el-icon-edit"-->
|
||||||
|
<!-- size="mini"-->
|
||||||
|
<!-- :disabled="single"-->
|
||||||
|
<!-- @click="handleUpdate"-->
|
||||||
|
<!-- v-hasPermi="['search:ViewStockDetail:edit']"-->
|
||||||
|
<!-- >修改</el-button>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
<!-- <el-col :span="1.5">-->
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- type="danger"-->
|
||||||
|
<!-- plain-->
|
||||||
|
<!-- icon="el-icon-delete"-->
|
||||||
|
<!-- size="mini"-->
|
||||||
|
<!-- :disabled="multiple"-->
|
||||||
|
<!-- @click="handleDelete"-->
|
||||||
|
<!-- v-hasPermi="['search:ViewStockDetail:remove']"-->
|
||||||
|
<!-- >删除</el-button>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['search:ViewStockDetail:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="ViewStockDetailList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<!-- <el-table-column label="id" align="center" prop="onlyIdentity" />-->
|
||||||
|
<el-table-column label="库存ID" align="center" prop="stockId" />
|
||||||
|
<el-table-column label="货位ID" align="center" prop="cargoSpaceId" />
|
||||||
|
<el-table-column label="托盘条码" align="center" prop="trayCode" />
|
||||||
|
<el-table-column label="数量" align="center" prop="quantity" />
|
||||||
|
<el-table-column label="作业ID" align="center" prop="jobId" />
|
||||||
|
<el-table-column label="批号" align="center" prop="lotNo" />
|
||||||
|
<el-table-column label="入库子单ID" align="center" prop="stockinDetailId" />
|
||||||
|
<el-table-column label="入库时间" align="center" prop="inDate" />
|
||||||
|
<el-table-column label="仓库" align="center" prop="warehouseId" />
|
||||||
|
<el-table-column label="剁型ID" align="center" prop="stackingId" />
|
||||||
|
<el-table-column label="货位名称" align="center" prop="cargoSpaceName" />
|
||||||
|
<el-table-column label="巷道ID" align="center" prop="roadwayId" />
|
||||||
|
<el-table-column label="货位状态" align="center" prop="cargoSpaceStatus" />
|
||||||
|
<el-table-column label="是否锁定" align="center" prop="locked" />
|
||||||
|
<el-table-column label="物料ID" align="center" prop="productId" />
|
||||||
|
<el-table-column label="物料名称" align="center" prop="productName" />
|
||||||
|
<el-table-column label="规格" align="center" prop="spec" />
|
||||||
|
<el-table-column label="单位" align="center" prop="unit" />
|
||||||
|
<el-table-column label="价格" align="center" prop="price" />
|
||||||
|
<!-- <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-edit"-->
|
||||||
|
<!-- @click="handleUpdate(scope.row)"-->
|
||||||
|
<!-- v-hasPermi="['search:ViewStockDetail:edit']"-->
|
||||||
|
<!-- >修改</el-button>-->
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- size="mini"-->
|
||||||
|
<!-- type="text"-->
|
||||||
|
<!-- icon="el-icon-delete"-->
|
||||||
|
<!-- @click="handleDelete(scope.row)"-->
|
||||||
|
<!-- v-hasPermi="['search:ViewStockDetail:remove']"-->
|
||||||
|
<!-- >删除</el-button>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- </el-table-column>-->
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改库存明细查询对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="id" prop="onlyIdentity">
|
||||||
|
<el-input v-model="form.onlyIdentity" placeholder="请输入id" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="库存ID" prop="stockId">
|
||||||
|
<el-input v-model="form.stockId" placeholder="请输入库存ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="货位ID" prop="cargoSpaceId">
|
||||||
|
<el-input v-model="form.cargoSpaceId" placeholder="请输入货位ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="托盘条码" prop="trayCode">
|
||||||
|
<el-input v-model="form.trayCode" placeholder="请输入托盘条码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数量" prop="quantity">
|
||||||
|
<el-input v-model="form.quantity" placeholder="请输入数量" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="作业ID" prop="jobId">
|
||||||
|
<el-input v-model="form.jobId" placeholder="请输入作业ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="批号" prop="lotNo">
|
||||||
|
<el-input v-model="form.lotNo" placeholder="请输入批号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="入库子单ID" prop="stockinDetailId">
|
||||||
|
<el-input v-model="form.stockinDetailId" placeholder="请输入入库子单ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="入库时间" prop="inDate">
|
||||||
|
<el-input v-model="form.inDate" placeholder="请输入入库时间" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="仓库" prop="warehouseId">
|
||||||
|
<el-input v-model="form.warehouseId" placeholder="请输入仓库" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="剁型ID" prop="stackingId">
|
||||||
|
<el-input v-model="form.stackingId" placeholder="请输入剁型ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="货位名称" prop="cargoSpaceName">
|
||||||
|
<el-input v-model="form.cargoSpaceName" placeholder="请输入货位名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="巷道ID" prop="roadwayId">
|
||||||
|
<el-input v-model="form.roadwayId" placeholder="请输入巷道ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否锁定" prop="locked">
|
||||||
|
<el-input v-model="form.locked" placeholder="请输入是否锁定" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料ID" prop="productId">
|
||||||
|
<el-input v-model="form.productId" placeholder="请输入物料ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料名称" prop="productName">
|
||||||
|
<el-input v-model="form.productName" placeholder="请输入物料名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="规格" prop="spec">
|
||||||
|
<el-input v-model="form.spec" placeholder="请输入规格" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="单位" prop="unit">
|
||||||
|
<el-input v-model="form.unit" placeholder="请输入单位" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="价格" prop="price">
|
||||||
|
<el-input v-model="form.price" placeholder="请输入价格" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listViewStockDetail, getViewStockDetail, delViewStockDetail, addViewStockDetail, updateViewStockDetail } from "@/api/search/ViewStockDetail"
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "ViewStockDetail",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 库存明细查询表格数据
|
||||||
|
ViewStockDetailList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
onlyIdentity: null,
|
||||||
|
stockId: null,
|
||||||
|
cargoSpaceId: null,
|
||||||
|
trayCode: null,
|
||||||
|
quantity: null,
|
||||||
|
jobId: null,
|
||||||
|
lotNo: null,
|
||||||
|
stockinDetailId: null,
|
||||||
|
inDate: null,
|
||||||
|
warehouseId: null,
|
||||||
|
stackingId: null,
|
||||||
|
cargoSpaceName: null,
|
||||||
|
roadwayId: null,
|
||||||
|
cargoSpaceStatus: null,
|
||||||
|
locked: null,
|
||||||
|
productId: null,
|
||||||
|
productName: null,
|
||||||
|
spec: null,
|
||||||
|
unit: null,
|
||||||
|
price: null
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
stockId: [
|
||||||
|
{ required: true, message: "库存ID不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询库存明细查询列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true
|
||||||
|
listViewStockDetail(this.queryParams).then(response => {
|
||||||
|
this.ViewStockDetailList = response.rows
|
||||||
|
this.total = response.total
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false
|
||||||
|
this.reset()
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
onlyIdentity: null,
|
||||||
|
stockId: null,
|
||||||
|
cargoSpaceId: null,
|
||||||
|
trayCode: null,
|
||||||
|
quantity: null,
|
||||||
|
jobId: null,
|
||||||
|
lotNo: null,
|
||||||
|
stockinDetailId: null,
|
||||||
|
inDate: null,
|
||||||
|
warehouseId: null,
|
||||||
|
stackingId: null,
|
||||||
|
cargoSpaceName: null,
|
||||||
|
roadwayId: null,
|
||||||
|
cargoSpaceStatus: null,
|
||||||
|
locked: null,
|
||||||
|
productId: null,
|
||||||
|
productName: null,
|
||||||
|
spec: null,
|
||||||
|
unit: null,
|
||||||
|
price: null
|
||||||
|
}
|
||||||
|
this.resetForm("form")
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm")
|
||||||
|
this.handleQuery()
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.onlyIdentity)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset()
|
||||||
|
this.open = true
|
||||||
|
this.title = "添加库存明细查询"
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset()
|
||||||
|
const onlyIdentity = row.onlyIdentity || this.ids
|
||||||
|
getViewStockDetail(onlyIdentity).then(response => {
|
||||||
|
this.form = response.data
|
||||||
|
this.open = true
|
||||||
|
this.title = "修改库存明细查询"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.onlyIdentity != null) {
|
||||||
|
updateViewStockDetail(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功")
|
||||||
|
this.open = false
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
addViewStockDetail(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功")
|
||||||
|
this.open = false
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const onlyIdentitys = row.onlyIdentity || this.ids
|
||||||
|
this.$modal.confirm('是否确认删除库存明细查询编号为"' + onlyIdentitys + '"的数据项?').then(function() {
|
||||||
|
return delViewStockDetail(onlyIdentitys)
|
||||||
|
}).then(() => {
|
||||||
|
this.getList()
|
||||||
|
this.$modal.msgSuccess("删除成功")
|
||||||
|
}).catch(() => {})
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('search/ViewStockDetail/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `ViewStockDetail_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user