修改平库盘点逻辑 库存物料状态、库存状态、货位状态、货位是否锁定逻辑修改
This commit is contained in:
@@ -23,7 +23,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 盘点差异Controller
|
* 盘点差异Controller
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
* @date 2025-05-28
|
* @date 2025-05-28
|
||||||
*/
|
*/
|
||||||
@@ -77,7 +77,7 @@ public class CheckDifferenceRecordController extends BaseController
|
|||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody CheckDifferenceRecord checkDifferenceRecord)
|
public AjaxResult add(@RequestBody CheckDifferenceRecord checkDifferenceRecord)
|
||||||
{
|
{
|
||||||
return toAjax(checkDifferenceRecordService.insertCheckDifferenceRecord(checkDifferenceRecord));
|
return checkDifferenceRecordService.insertCheckDifferenceRecord(checkDifferenceRecord);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,18 +2,19 @@ package com.ruoyi.check.difference.service;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.ruoyi.check.difference.domain.CheckDifferenceRecord;
|
import com.ruoyi.check.difference.domain.CheckDifferenceRecord;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 盘点差异Service接口
|
* 盘点差异Service接口
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
* @date 2025-05-28
|
* @date 2025-05-28
|
||||||
*/
|
*/
|
||||||
public interface ICheckDifferenceRecordService
|
public interface ICheckDifferenceRecordService
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询盘点差异
|
* 查询盘点差异
|
||||||
*
|
*
|
||||||
* @param checkGuid 盘点差异主键
|
* @param checkGuid 盘点差异主键
|
||||||
* @return 盘点差异
|
* @return 盘点差异
|
||||||
*/
|
*/
|
||||||
@@ -21,7 +22,7 @@ public interface ICheckDifferenceRecordService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询盘点差异列表
|
* 查询盘点差异列表
|
||||||
*
|
*
|
||||||
* @param checkDifferenceRecord 盘点差异
|
* @param checkDifferenceRecord 盘点差异
|
||||||
* @return 盘点差异集合
|
* @return 盘点差异集合
|
||||||
*/
|
*/
|
||||||
@@ -29,15 +30,15 @@ public interface ICheckDifferenceRecordService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增盘点差异
|
* 新增盘点差异
|
||||||
*
|
*
|
||||||
* @param checkDifferenceRecord 盘点差异
|
* @param checkDifferenceRecord 盘点差异
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int insertCheckDifferenceRecord(CheckDifferenceRecord checkDifferenceRecord);
|
public AjaxResult insertCheckDifferenceRecord(CheckDifferenceRecord checkDifferenceRecord);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改盘点差异
|
* 修改盘点差异
|
||||||
*
|
*
|
||||||
* @param checkDifferenceRecord 盘点差异
|
* @param checkDifferenceRecord 盘点差异
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -45,7 +46,7 @@ public interface ICheckDifferenceRecordService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除盘点差异
|
* 批量删除盘点差异
|
||||||
*
|
*
|
||||||
* @param checkGuids 需要删除的盘点差异主键集合
|
* @param checkGuids 需要删除的盘点差异主键集合
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -53,7 +54,7 @@ public interface ICheckDifferenceRecordService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除盘点差异信息
|
* 删除盘点差异信息
|
||||||
*
|
*
|
||||||
* @param checkGuid 盘点差异主键
|
* @param checkGuid 盘点差异主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
package com.ruoyi.check.difference.service.impl;
|
package com.ruoyi.check.difference.service.impl;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.ruoyi.stock.stock.domain.BasStock;
|
import com.ruoyi.stock.stock.domain.BasStock;
|
||||||
import com.ruoyi.stock.stock.service.IBasStockService;
|
import com.ruoyi.stock.stock.service.IBasStockService;
|
||||||
@@ -58,21 +60,33 @@ public class CheckDifferenceRecordServiceImpl implements ICheckDifferenceRecordS
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertCheckDifferenceRecord(CheckDifferenceRecord checkDifferenceRecord)
|
public AjaxResult insertCheckDifferenceRecord(CheckDifferenceRecord checkDifferenceRecord)
|
||||||
{
|
{
|
||||||
if (checkDifferenceRecord.getRecordType()==1){
|
if (checkDifferenceRecord.getRecordType()==1){
|
||||||
String stockId = checkDifferenceRecord.getStockId();
|
String stockId = checkDifferenceRecord.getStockId();
|
||||||
BasStock basStock = basStockService.selectBasStockByStockId(stockId);
|
BasStock basStock = basStockService.selectBasStockByStockId(stockId);
|
||||||
|
if (!"1".equals(basStock.getProductStatus())){
|
||||||
|
return AjaxResult.warn("库存非正常状态");
|
||||||
|
}
|
||||||
|
basStock.setProductStatus("2");
|
||||||
|
basStockService.updateBasStock(basStock);
|
||||||
checkDifferenceRecord.setOldQuantity(basStock.getQuantity());
|
checkDifferenceRecord.setOldQuantity(basStock.getQuantity());
|
||||||
}else if (checkDifferenceRecord.getRecordType()==2){
|
}else if (checkDifferenceRecord.getRecordType()==2){
|
||||||
checkDifferenceRecord.setOldQuantity("0");
|
checkDifferenceRecord.setOldQuantity("0");
|
||||||
}else if (checkDifferenceRecord.getRecordType()==3){
|
}else if (checkDifferenceRecord.getRecordType()==3){
|
||||||
|
BasStock basStock = basStockService.selectBasStockByStockId(checkDifferenceRecord.getStockId());
|
||||||
|
if (!"1".equals(basStock.getProductStatus())){
|
||||||
|
return AjaxResult.warn("库存非正常状态");
|
||||||
|
}
|
||||||
|
basStock.setProductStatus("2");
|
||||||
|
basStockService.updateBasStock(basStock);
|
||||||
checkDifferenceRecord.setNewQuantity("0");
|
checkDifferenceRecord.setNewQuantity("0");
|
||||||
}
|
}
|
||||||
checkDifferenceRecord.setCreateTime(DateUtils.getNowDate());
|
checkDifferenceRecord.setCreateTime(new Date());
|
||||||
checkDifferenceRecord.setCheckGuid(IdUtil.fastSimpleUUID());
|
checkDifferenceRecord.setCheckGuid(IdUtil.fastSimpleUUID());
|
||||||
checkDifferenceRecord.setStatus("0");
|
checkDifferenceRecord.setStatus("0");
|
||||||
return checkDifferenceRecordMapper.insertCheckDifferenceRecord(checkDifferenceRecord);
|
checkDifferenceRecordMapper.insertCheckDifferenceRecord(checkDifferenceRecord);
|
||||||
|
return AjaxResult.success("操作成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
package com.ruoyi.check.flat;
|
|
||||||
|
|
||||||
import com.ruoyi.check.difference.domain.CheckDifferenceRecord;
|
|
||||||
import com.ruoyi.check.difference.service.ICheckDifferenceRecordService;
|
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 平库盘点
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/check/flatStockCheck")
|
|
||||||
public class FlatStockCheckController {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ICheckDifferenceRecordService checkDifferenceRecordService;
|
|
||||||
|
|
||||||
@PostMapping("/add")
|
|
||||||
public AjaxResult add(@RequestBody CheckDifferenceRecord checkDifferenceRecord) {
|
|
||||||
int i = checkDifferenceRecordService.insertCheckDifferenceRecord(checkDifferenceRecord);
|
|
||||||
return i > 0 ? AjaxResult.success(): AjaxResult.error();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -176,29 +176,60 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public AjaxResult manualCompleted(MydoJob mydoJob) {
|
public AjaxResult manualCompleted(MydoJob mydoJob) {
|
||||||
//插入库存
|
|
||||||
|
|
||||||
String jobId = mydoJob.getJobId();
|
String jobId = mydoJob.getJobId();
|
||||||
MydoJob job = selectMydoJobByJobId(jobId);
|
MydoJob job = selectMydoJobByJobId(jobId);
|
||||||
if (job == null) {
|
if (job == null) {
|
||||||
return AjaxResult.warn("任务不存在");
|
return AjaxResult.warn("任务不存在");
|
||||||
}
|
}
|
||||||
if ("5".equals(job.getInOrOut())){
|
if ("6".equals(job.getInOrOut())){
|
||||||
//料箱盘点入库作业
|
//托盘盘点入库,放入原货位,直接修改货位状态,库存状态
|
||||||
|
|
||||||
//修改货位
|
//修改货位
|
||||||
BasCargoSpace basCargoSpace = new BasCargoSpace();
|
BasCargoSpace basCargoSpace = new BasCargoSpace();
|
||||||
basCargoSpace.setStatus("7");
|
basCargoSpace.setStatus("8");
|
||||||
basCargoSpace.setTrayCode(job.getTrayCode());
|
basCargoSpace.setTrayCode(job.getTrayCode());
|
||||||
basCargoSpace.setCargoSpaceId(job.getCargoSpaceId());
|
basCargoSpace.setCargoSpaceId(job.getCargoSpaceId());
|
||||||
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
||||||
|
|
||||||
|
|
||||||
|
//修改物料状态
|
||||||
|
BasStock basStockParam = new BasStock();
|
||||||
|
basStockParam.setTrayCode(job.getTrayCode());
|
||||||
|
List<BasStock> basStocks = basStockService.selectBasStockList(basStockParam);
|
||||||
|
for (BasStock basStock : basStocks) {
|
||||||
|
basStock.setProductStatus("2");
|
||||||
|
basStockService.updateBasStock(basStock);
|
||||||
|
}
|
||||||
|
|
||||||
//插入历史表
|
//插入历史表
|
||||||
insertHistory(mydoJob.getJobId());
|
insertHistory(mydoJob.getJobId());
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
|
|
||||||
|
}else if ("5".equals(job.getInOrOut())){
|
||||||
|
//料箱盘点入库
|
||||||
|
MydoJobDetail param = new MydoJobDetail();
|
||||||
|
param.setJobId(jobId);
|
||||||
|
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(param);
|
||||||
|
if (CollUtil.isNotEmpty(mydoJobDetails)) {
|
||||||
|
List<BasStock> list = new ArrayList<>();
|
||||||
|
for (MydoJobDetail mydoJobDetail : mydoJobDetails) {
|
||||||
|
list.add(getStockByInStockinDetail(mydoJobDetail, job));
|
||||||
|
}
|
||||||
|
basStockService.insertBasStockList(list);
|
||||||
|
mydoJob.setStatus("4");
|
||||||
|
updateMydoJob(mydoJob);
|
||||||
|
//修改货位
|
||||||
|
BasCargoSpace basCargoSpace = new BasCargoSpace();
|
||||||
|
basCargoSpace.setStatus("8");
|
||||||
|
basCargoSpace.setTrayCode(job.getTrayCode());
|
||||||
|
basCargoSpace.setCargoSpaceId(job.getCargoSpaceId());
|
||||||
|
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
||||||
|
//插入历史表
|
||||||
|
insertHistory(mydoJob.getJobId());
|
||||||
|
}
|
||||||
|
return AjaxResult.success();
|
||||||
}else {
|
}else {
|
||||||
//正常入库作业
|
//正常入库作业
|
||||||
|
|
||||||
MydoJobDetail param = new MydoJobDetail();
|
MydoJobDetail param = new MydoJobDetail();
|
||||||
param.setJobId(jobId);
|
param.setJobId(jobId);
|
||||||
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(param);
|
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(param);
|
||||||
@@ -229,7 +260,11 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
|||||||
stock.setStockId(basJobIdService.getJobId("KC"));
|
stock.setStockId(basJobIdService.getJobId("KC"));
|
||||||
stock.setCargoSpaceId(mydoJob.getCargoSpaceId());
|
stock.setCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||||
stock.setStockStatus("1");
|
stock.setStockStatus("1");
|
||||||
stock.setProductStatus("1");
|
if ("5".equals(mydoJob.getInOrOut())){
|
||||||
|
stock.setProductStatus("2");
|
||||||
|
}else {
|
||||||
|
stock.setProductStatus("1");
|
||||||
|
}
|
||||||
stock.setLotNo(mydoJobDetail.getLotNo());
|
stock.setLotNo(mydoJobDetail.getLotNo());
|
||||||
stock.setInDate(DateUtils.getTime());
|
stock.setInDate(DateUtils.getTime());
|
||||||
stock.setProductGuid(mydoJobDetail.getProductGuid());
|
stock.setProductGuid(mydoJobDetail.getProductGuid());
|
||||||
|
|||||||
@@ -2,18 +2,19 @@ package com.ruoyi.stock.stock.mapper;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.ruoyi.stock.stock.domain.BasStock;
|
import com.ruoyi.stock.stock.domain.BasStock;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 库存信息Mapper接口
|
* 库存信息Mapper接口
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
* @date 2025-05-24
|
* @date 2025-05-24
|
||||||
*/
|
*/
|
||||||
public interface BasStockMapper
|
public interface BasStockMapper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询库存信息
|
* 查询库存信息
|
||||||
*
|
*
|
||||||
* @param stockId 库存信息主键
|
* @param stockId 库存信息主键
|
||||||
* @return 库存信息
|
* @return 库存信息
|
||||||
*/
|
*/
|
||||||
@@ -21,7 +22,7 @@ public interface BasStockMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询库存信息列表
|
* 查询库存信息列表
|
||||||
*
|
*
|
||||||
* @param basStock 库存信息
|
* @param basStock 库存信息
|
||||||
* @return 库存信息集合
|
* @return 库存信息集合
|
||||||
*/
|
*/
|
||||||
@@ -29,7 +30,7 @@ public interface BasStockMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增库存信息
|
* 新增库存信息
|
||||||
*
|
*
|
||||||
* @param basStock 库存信息
|
* @param basStock 库存信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -37,7 +38,7 @@ public interface BasStockMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改库存信息
|
* 修改库存信息
|
||||||
*
|
*
|
||||||
* @param basStock 库存信息
|
* @param basStock 库存信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -45,7 +46,7 @@ public interface BasStockMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除库存信息
|
* 删除库存信息
|
||||||
*
|
*
|
||||||
* @param stockId 库存信息主键
|
* @param stockId 库存信息主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -53,7 +54,7 @@ public interface BasStockMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除库存信息
|
* 批量删除库存信息
|
||||||
*
|
*
|
||||||
* @param stockIds 需要删除的数据主键集合
|
* @param stockIds 需要删除的数据主键集合
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -62,4 +63,6 @@ public interface BasStockMapper
|
|||||||
void insertBasStockList(List<BasStock> list);
|
void insertBasStockList(List<BasStock> list);
|
||||||
|
|
||||||
List<BasStock> selectKtpStock(BasStock basStock);
|
List<BasStock> selectKtpStock(BasStock basStock);
|
||||||
|
|
||||||
|
int updateStockStatusByTrayCode(@Param("stockStatus") String stockStatus,@Param("trayCode") String trayCode);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,31 +111,27 @@ public class BasStockServiceImpl implements IBasStockService
|
|||||||
{
|
{
|
||||||
BasStock oldBasStock = basStockMapper.selectBasStockByStockId(basStock.getStockId());
|
BasStock oldBasStock = basStockMapper.selectBasStockByStockId(basStock.getStockId());
|
||||||
insertMaintainRecord(oldBasStock,basStock,"2");
|
insertMaintainRecord(oldBasStock,basStock,"2");
|
||||||
BasCargoSpace oldBasCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(basStock.getCargoSpaceId());
|
insertFreezeRecord(oldBasStock,basStock);
|
||||||
insertFreezeRecord(oldBasCargoSpace,basStock);
|
|
||||||
return basStockMapper.updateBasStock(basStock);
|
return basStockMapper.updateBasStock(basStock);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void insertFreezeRecord(BasCargoSpace oldBasCargoSpace, BasStock basStock) {
|
private void insertFreezeRecord(BasStock oldBasStock, BasStock basStock) {
|
||||||
if (!oldBasCargoSpace.getLocked().equals(basStock.getCargoSpaceStatus())){
|
if (!oldBasStock.getStockStatus().equals(basStock.getStockStatus())){
|
||||||
BasStockFreezeRecord basStockFreezeRecord = new BasStockFreezeRecord();
|
BasStockFreezeRecord basStockFreezeRecord = new BasStockFreezeRecord();
|
||||||
basStockFreezeRecord.setWhGuid(IdUtil.fastSimpleUUID());
|
basStockFreezeRecord.setWhGuid(IdUtil.fastSimpleUUID());
|
||||||
basStockFreezeRecord.setCargoSpaceId(basStock.getCargoSpaceId());
|
basStockFreezeRecord.setCargoSpaceId(basStock.getCargoSpaceId());
|
||||||
basStockFreezeRecord.setTrayCode(basStock.getTrayCode());
|
basStockFreezeRecord.setTrayCode(basStock.getTrayCode());
|
||||||
basStockFreezeRecord.setCreateBy(SecurityUtils.getLoginUser().getUsername());
|
basStockFreezeRecord.setCreateBy(SecurityUtils.getLoginUser().getUsername());
|
||||||
basStockFreezeRecord.setCreateTime(new Date());
|
basStockFreezeRecord.setCreateTime(new Date());
|
||||||
basStockFreezeRecord.setOldStatus(oldBasCargoSpace.getLocked());
|
basStockFreezeRecord.setOldStatus(oldBasStock.getStockStatus());
|
||||||
basStockFreezeRecord.setCurrStatus(basStock.getCargoSpaceStatus());
|
basStockFreezeRecord.setCurrStatus(basStock.getStockStatus());
|
||||||
basStockFreezeRecord.setWarehouseId(basStock.getWarehouseId());
|
basStockFreezeRecord.setWarehouseId(basStock.getWarehouseId());
|
||||||
if ("N".equals(basStock.getCargoSpaceStatus())){
|
if ("1".equals(basStock.getStockStatus())){
|
||||||
basStockFreezeRecord.setMethod("解锁");
|
basStockFreezeRecord.setMethod("解冻");
|
||||||
}else {
|
}else {
|
||||||
basStockFreezeRecord.setMethod("锁定");
|
basStockFreezeRecord.setMethod("冻结");
|
||||||
}
|
}
|
||||||
BasCargoSpace basCargoSpace = new BasCargoSpace();
|
basStockMapper.updateStockStatusByTrayCode(basStock.getStockStatus(),oldBasStock.getTrayCode());
|
||||||
basCargoSpace.setCargoSpaceId(basStock.getCargoSpaceId());
|
|
||||||
basCargoSpace.setLocked(basStock.getCargoSpaceStatus());
|
|
||||||
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
|
||||||
basStockFreezeRecordService.insertBasStockFreezeRecord(basStockFreezeRecord);
|
basStockFreezeRecordService.insertBasStockFreezeRecord(basStockFreezeRecord);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="recordType != null "> and record_type = #{recordType}</if>
|
<if test="recordType != null "> and record_type = #{recordType}</if>
|
||||||
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
|
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectCheckDifferenceRecordByCheckGuid" parameterType="String" resultMap="CheckDifferenceRecordResult">
|
<select id="selectCheckDifferenceRecordByCheckGuid" parameterType="String" resultMap="CheckDifferenceRecordResult">
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="barCodeQuantity != null and barCodeQuantity != ''"> and bar_code_quantity = #{barCodeQuantity}</if>
|
<if test="barCodeQuantity != null and barCodeQuantity != ''"> and bar_code_quantity = #{barCodeQuantity}</if>
|
||||||
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
|
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectBasStockFreezeRecordByWhGuid" parameterType="String" resultMap="BasStockFreezeRecordResult">
|
<select id="selectBasStockFreezeRecordByWhGuid" parameterType="String" resultMap="BasStockFreezeRecordResult">
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="barCodeOldQuantity != null and barCodeOldQuantity != ''"> and bar_code_old_quantity = #{barCodeOldQuantity}</if>
|
<if test="barCodeOldQuantity != null and barCodeOldQuantity != ''"> and bar_code_old_quantity = #{barCodeOldQuantity}</if>
|
||||||
<if test="barCodeQuantity != null and barCodeQuantity != ''"> and bar_code_quantity = #{barCodeQuantity}</if>
|
<if test="barCodeQuantity != null and barCodeQuantity != ''"> and bar_code_quantity = #{barCodeQuantity}</if>
|
||||||
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
|
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
|
||||||
|
order by create_time desc
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -246,6 +246,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</trim>
|
</trim>
|
||||||
where stock_id = #{stockId}
|
where stock_id = #{stockId}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateStockStatusByTrayCode">
|
||||||
|
update bas_stock set stock_status = #{stockStatus} where tray_code = #{trayCode}
|
||||||
|
</update>
|
||||||
|
|
||||||
<delete id="deleteBasStockByStockId" parameterType="String">
|
<delete id="deleteBasStockByStockId" parameterType="String">
|
||||||
delete from bas_stock where stock_id = #{stockId}
|
delete from bas_stock where stock_id = #{stockId}
|
||||||
|
|||||||
@@ -672,15 +672,16 @@ export default {
|
|||||||
editSuccess: 'Modified successfully',
|
editSuccess: 'Modified successfully',
|
||||||
deleteSuccess: 'Deleted successfully',
|
deleteSuccess: 'Deleted successfully',
|
||||||
confirmDelete: 'Are you sure to delete the stock information with ID "{stockIds}"?',
|
confirmDelete: 'Are you sure to delete the stock information with ID "{stockIds}"?',
|
||||||
productId:'物料编码',
|
productId:'productId',
|
||||||
materialDesc:'物料描述',
|
materialDesc:'materialDesc',
|
||||||
englishDesc:'英文描述',
|
englishDesc:'englishDesc',
|
||||||
netWeight:'净重',
|
netWeight:'netWeight',
|
||||||
length:'长',
|
length:'length',
|
||||||
width:'宽',
|
width:'width',
|
||||||
height:'高',
|
height:'height',
|
||||||
volume:'体积',
|
volume:'volume',
|
||||||
cargoSpaceStatus:'货位状态'
|
cargoSpaceStatus: 'cargoSpaceStatus',
|
||||||
|
cargoSpaceStockStatus: 'cargoSpaceStockStatus'
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -659,7 +659,8 @@ export default {
|
|||||||
height:'高',
|
height:'高',
|
||||||
volume:'体积',
|
volume:'体积',
|
||||||
productId:'物料编码',
|
productId:'物料编码',
|
||||||
cargoSpaceStatus: '货位状态'
|
cargoSpaceStatus: '锁定状态',
|
||||||
|
cargoSpaceStockStatus: '货位状态'
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -17,9 +17,8 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('stockManagement.stockStatus')" prop="cargoSpaceStockStatus"><!-- 库存状态 -->
|
<el-form-item :label="$t('stockManagement.stockStatus')" prop="stockStatus"><!-- 库存状态 -->
|
||||||
<el-select v-model="queryParams.cargoSpaceStockStatus" :placeholder="$t('stockManagement.selectStockStatus')"
|
<el-select v-model="queryParams.stockStatus" :placeholder="$t('stockManagement.stockStatus')" clearable>
|
||||||
clearable>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.stock_status"
|
v-for="dict in dict.type.stock_status"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
@@ -28,9 +27,18 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- <el-form-item :label="$t('stockManagement.cargoSpaceStockStatus')" prop="cargoSpaceStockStatus"><!– 货位状态 –>
|
||||||
|
<el-select v-model="queryParams.cargoSpaceStockStatus" :placeholder="$t('stockManagement.cargoSpaceStockStatus')" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.cargo_space_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>-->
|
||||||
<el-form-item :label="$t('stockManagement.productStatus')" prop="productStatus"><!-- 物料状态 -->
|
<el-form-item :label="$t('stockManagement.productStatus')" prop="productStatus"><!-- 物料状态 -->
|
||||||
<el-select v-model="queryParams.productStatus" :placeholder="$t('stockManagement.selectProductStatus')"
|
<el-select v-model="queryParams.productStatus" :placeholder="$t('stockManagement.selectProductStatus')" clearable>
|
||||||
clearable>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.product_status"
|
v-for="dict in dict.type.product_status"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
@@ -39,14 +47,6 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('stockManagement.lotNo')" prop="lotNo"><!-- 批次号 -->
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.lotNo"
|
|
||||||
:placeholder="$t('stockManagement.inputLotNo')"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('stockManagement.inDate')" prop="inDate"><!-- 入库时间 -->
|
<el-form-item :label="$t('stockManagement.inDate')" prop="inDate"><!-- 入库时间 -->
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.inDate"
|
v-model="queryParams.inDate"
|
||||||
@@ -196,25 +196,22 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>-->
|
</el-form-item>-->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{$t('stockManagement.search')}}</el-button><!-- 搜索 -->
|
||||||
{{ $t('stockManagement.search') }}
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{$t('stockManagement.reset')}}</el-button><!-- 重置 -->
|
||||||
</el-button><!-- 搜索 -->
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('stockManagement.reset') }}</el-button>
|
|
||||||
<!-- 重置 -->
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['stock:management:add']"
|
v-hasPermi="['stock:management:add']"
|
||||||
>{{ $t('stockManagement.add') }} <!-- 新增 --></el-button>
|
>{{$t('stockManagement.add')}} <!– 新增 –></el-button>
|
||||||
</el-col>
|
</el-col>-->
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
@@ -224,7 +221,7 @@
|
|||||||
:disabled="single"
|
:disabled="single"
|
||||||
@click="handleUpdate"
|
@click="handleUpdate"
|
||||||
v-hasPermi="['stock:management:edit']"
|
v-hasPermi="['stock:management:edit']"
|
||||||
>{{ $t('stockManagement.edit') }} <!-- 修改 --></el-button>
|
>{{$t('stockManagement.edit')}} <!-- 修改 --></el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
@@ -235,7 +232,7 @@
|
|||||||
:disabled="multiple"
|
:disabled="multiple"
|
||||||
@click="handleDelete"
|
@click="handleDelete"
|
||||||
v-hasPermi="['stock:management:remove']"
|
v-hasPermi="['stock:management:remove']"
|
||||||
>{{ $t('stockManagement.delete') }} <!-- 删除 --></el-button>
|
>{{$t('stockManagement.delete')}} <!-- 删除 --></el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
@@ -245,26 +242,29 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['stock:management:export']"
|
v-hasPermi="['stock:management:export']"
|
||||||
>{{ $t('stockManagement.export') }} <!-- 导出 --></el-button>
|
>{{$t('stockManagement.export')}} <!-- 导出 --></el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="managementList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="managementList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center"/>
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column :label="$t('stockManagement.stockId')" align="center" prop="stockId"/> <!-- 库存id -->
|
<el-table-column :label="$t('stockManagement.stockId')" align="center" prop="stockId" /> <!-- 库存id -->
|
||||||
<el-table-column :label="$t('stockManagement.cargoSpaceId')" align="center" prop="cargoSpaceId"/> <!-- 货位id -->
|
<el-table-column :label="$t('stockManagement.cargoSpaceId')" align="center" prop="cargoSpaceId" /> <!-- 货位id -->
|
||||||
<el-table-column :label="$t('stockManagement.cargoSpaceName')" align="center" prop="cargoSpaceName"/>
|
<el-table-column :label="$t('stockManagement.cargoSpaceName')" align="center" prop="cargoSpaceName" /> <!-- 货位id -->
|
||||||
<!-- 货位id -->
|
<el-table-column :label="$t('stockManagement.stockStatus')" align="center" prop="stockStatus" ><!-- 库存状态 -->
|
||||||
<el-table-column :label="$t('stockManagement.stockStatus')" align="center" prop="cargoSpaceStockStatus">
|
|
||||||
<!-- 库存状态 -->
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.stock_status" :value="scope.row.cargoSpaceStockStatus"/>
|
<dict-tag :options="dict.type.stock_status" :value="scope.row.stockStatus"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('stockManagement.cargoSpaceStatus')" align="center" prop="cargoSpaceStatus">
|
<!-- <el-table-column :label="$t('stockManagement.cargoSpaceStockStatus')" align="center" prop="cargoSpaceStockStatus"> <!– 货位状态 –>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.cargo_space_status" :value="scope.row.cargoSpaceStatus"/>
|
<dict-tag :options="dict.type.cargo_space_status" :value="scope.row.cargoSpaceStockStatus"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>-->
|
||||||
|
<el-table-column :label="$t('stockManagement.cargoSpaceStatus')" align="center" prop="cargoSpaceStatus" ><!--货位状态-->
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.cargo_space_lock_status" :value="scope.row.cargoSpaceStatus"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column><!-- 货位状态 -->
|
</el-table-column><!-- 货位状态 -->
|
||||||
<el-table-column :label="$t('stockManagement.productStatus')" align="center" prop="productStatus"> <!-- 物料状态 -->
|
<el-table-column :label="$t('stockManagement.productStatus')" align="center" prop="productStatus"> <!-- 物料状态 -->
|
||||||
@@ -272,33 +272,27 @@
|
|||||||
<dict-tag :options="dict.type.product_status" :value="scope.row.productStatus"/>
|
<dict-tag :options="dict.type.product_status" :value="scope.row.productStatus"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('stockManagement.lotNo')" align="center" prop="lotNo"/> <!-- 批次号 -->
|
|
||||||
<!-- <el-table-column :label="$t('stockManagement.backDate')" align="center" prop="backDate" /> <!– 回流时间 –>-->
|
<!-- <el-table-column :label="$t('stockManagement.backDate')" align="center" prop="backDate" /> <!– 回流时间 –>-->
|
||||||
<el-table-column :label="$t('stockManagement.productId')" align="center" prop="extraField.productId"/>
|
<el-table-column :label="$t('stockManagement.productId')" align="center" prop="extraField.productId" /> <!-- 物料Id -->
|
||||||
<!-- 物料Id -->
|
<el-table-column :label="$t('stockManagement.materialDesc')" align="center" prop="extraField.materialDesc" /> <!-- 物料描述 -->
|
||||||
<el-table-column :label="$t('stockManagement.materialDesc')" align="center" prop="extraField.materialDesc"/>
|
<el-table-column :label="$t('stockManagement.englishDesc')" align="center" prop="extraField.englishDesc" /> <!-- 物料英文描述 -->
|
||||||
<!-- 物料描述 -->
|
<el-table-column :label="$t('stockManagement.netWeight')" align="center" prop="extraField.netWeight" /> <!-- 净重 -->
|
||||||
<el-table-column :label="$t('stockManagement.englishDesc')" align="center" prop="extraField.englishDesc"/>
|
<el-table-column :label="$t('stockManagement.length')" align="center" prop="extraField.length" /> <!-- 长 -->
|
||||||
<!-- 物料英文描述 -->
|
<el-table-column :label="$t('stockManagement.width')" align="center" prop="extraField.width" /> <!-- 宽 -->
|
||||||
<el-table-column :label="$t('stockManagement.netWeight')" align="center" prop="extraField.netWeight"/> <!-- 净重 -->
|
<el-table-column :label="$t('stockManagement.height')" align="center" prop="extraField.height" /> <!-- 高 -->
|
||||||
<el-table-column :label="$t('stockManagement.length')" align="center" prop="extraField.length"/> <!-- 长 -->
|
<el-table-column :label="$t('stockManagement.volume')" align="center" prop="extraField.volume" /> <!-- 体积 -->
|
||||||
<el-table-column :label="$t('stockManagement.width')" align="center" prop="extraField.width"/> <!-- 宽 -->
|
<el-table-column :label="$t('stockManagement.quantity')" align="center" prop="quantity" /> <!-- 库存数量 -->
|
||||||
<el-table-column :label="$t('stockManagement.height')" align="center" prop="extraField.height"/> <!-- 高 -->
|
<el-table-column :label="$t('stockManagement.jobId')" align="center" prop="jobId" /> <!-- 作业ID -->
|
||||||
<el-table-column :label="$t('stockManagement.volume')" align="center" prop="extraField.volume"/> <!-- 体积 -->
|
<el-table-column :label="$t('stockManagement.trayCode')" align="center" prop="trayCode" /> <!-- 托盘条码 -->
|
||||||
<el-table-column :label="$t('stockManagement.quantity')" align="center" prop="quantity"/> <!-- 库存数量 -->
|
|
||||||
<el-table-column :label="$t('stockManagement.jobId')" align="center" prop="jobId"/> <!-- 作业ID -->
|
|
||||||
<el-table-column :label="$t('stockManagement.trayCode')" align="center" prop="trayCode"/> <!-- 托盘条码 -->
|
|
||||||
<!-- <el-table-column :label="$t('stockManagement.outQuantity')" align="center" prop="outQuantity" /> <!– 出库数量 –>-->
|
<!-- <el-table-column :label="$t('stockManagement.outQuantity')" align="center" prop="outQuantity" /> <!– 出库数量 –>-->
|
||||||
<el-table-column :label="$t('stockManagement.stockinId')" align="center" prop="stockinId"/> <!-- 入库主单 -->
|
<el-table-column :label="$t('stockManagement.stockinId')" align="center" prop="stockinId" /> <!-- 入库主单 -->
|
||||||
<el-table-column :label="$t('stockManagement.stockinDetailId')" align="center" prop="stockinDetailId"/>
|
<el-table-column :label="$t('stockManagement.stockinDetailId')" align="center" prop="stockinDetailId" /> <!-- 入库子单id -->
|
||||||
<!-- 入库子单id -->
|
<el-table-column :label="$t('stockManagement.inType')" align="center" prop="inType" /> <!-- 入库类型 -->
|
||||||
<el-table-column :label="$t('stockManagement.inType')" align="center" prop="inType"/> <!-- 入库类型 -->
|
|
||||||
<!-- <el-table-column :label="$t('stockManagement.inClassId')" align="center" prop="inClassId" /> <!– 入库班组ID –>-->
|
<!-- <el-table-column :label="$t('stockManagement.inClassId')" align="center" prop="inClassId" /> <!– 入库班组ID –>-->
|
||||||
<el-table-column :label="$t('stockManagement.warehouseId')" align="center" prop="warehouseName"/> <!-- 仓库 -->
|
<el-table-column :label="$t('stockManagement.warehouseId')" align="center" prop="warehouseName" /> <!-- 仓库 -->
|
||||||
<el-table-column :label="$t('stockManagement.inDate')" align="center" prop="inDate"/> <!-- 入库时间 -->
|
<el-table-column :label="$t('stockManagement.inDate')" align="center" prop="inDate" /> <!-- 入库时间 -->
|
||||||
<!-- <el-table-column :label="$t('stockManagement.stackingId')" align="center" prop="stackingId" /> <!– 垛型ID –>-->
|
<!-- <el-table-column :label="$t('stockManagement.stackingId')" align="center" prop="stackingId" /> <!– 垛型ID –>-->
|
||||||
<el-table-column :label="$t('stockManagement.operation')" align="center" class-name="small-padding fixed-width">
|
<el-table-column :label="$t('stockManagement.operation')" align="center" class-name="small-padding fixed-width"> <!-- 操作 -->
|
||||||
<!-- 操作 -->
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
@@ -306,14 +300,14 @@
|
|||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['stock:management:edit']"
|
v-hasPermi="['stock:management:edit']"
|
||||||
>{{ $t('stockManagement.edit') }} <!-- 修改 --></el-button>
|
>{{$t('stockManagement.edit')}} <!-- 修改 --></el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['stock:management:remove']"
|
v-hasPermi="['stock:management:remove']"
|
||||||
>{{ $t('stockManagement.delete') }} <!-- 删除 --></el-button>
|
>{{$t('stockManagement.delete')}} <!-- 删除 --></el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -330,35 +324,33 @@
|
|||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<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 ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item :label="$t('stockManagement.stockId')" prop="stockId"> <!-- 库存id -->
|
<el-form-item :label="$t('stockManagement.stockId')" prop="stockId"> <!-- 库存id -->
|
||||||
<el-input v-model="form.stockId" :placeholder="$t('stockManagement.inputStockId')"/>
|
<el-input v-model="form.stockId" :placeholder="$t('stockManagement.inputStockId')" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('stockManagement.cargoSpaceId')" prop="cargoSpaceId"> <!-- 货位id -->
|
<el-form-item :label="$t('stockManagement.trayCode')" prop="trayCode"> <!-- 托盘条码 -->
|
||||||
<el-input v-model="form.cargoSpaceId" :placeholder="$t('stockManagement.inputCargoSpaceId')"/>
|
<el-input v-model="form.trayCode" :placeholder="$t('stockManagement.inputTrayCode')" />
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('stockManagement.productId')" prop="extraField.productId"> <!-- 物料ID -->
|
|
||||||
<el-input v-model="form.productId" :placeholder="$t('stockManagement.inputProductId')"/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item :label="$t('stockManagement.quantity')" prop="quantity"> <!-- 库存数量 -->
|
<el-form-item :label="$t('stockManagement.quantity')" prop="quantity"> <!-- 库存数量 -->
|
||||||
<el-input v-model="form.quantity" :placeholder="$t('stockManagement.inputQuantity')"/>
|
<el-input v-model="form.quantity" :placeholder="$t('stockManagement.inputQuantity')" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">{{ $t('stockManagement.confirm') }} <!-- 确定 --></el-button>
|
<el-button type="primary" @click="submitForm">{{$t('stockManagement.confirm')}} <!-- 确定 --></el-button>
|
||||||
<el-button @click="cancel">{{ $t('stockManagement.cancel') }} <!-- 取消 --></el-button>
|
<el-button @click="cancel">{{$t('stockManagement.cancel')}} <!-- 取消 --></el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {listManagement, getManagement} from "@/api/stock/management"
|
import { listManagement, getManagement, delManagement, addManagement, updateManagement } from "@/api/stock/management"
|
||||||
import {listWarehouse} from "@/api/bas/warehouse"
|
import {listWarehouse} from "@/api/bas/warehouse"
|
||||||
import {addDifference} from "@/api/check/difference";
|
import {addDifference} from "@/api/check/difference";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Management",
|
name: "Management",
|
||||||
dicts: ['product_status', 'stock_status', 'cargo_space_status'],
|
dicts: ['product_status', 'stock_status','cargo_space_status','cargo_space_lock_status'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
@@ -389,8 +381,8 @@ export default {
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
stockId: null,
|
stockId: null,
|
||||||
cargoSpaceId: null,
|
cargoSpaceId: null,
|
||||||
stockStatus: null,
|
stockStatus: '1',
|
||||||
productStatus: null,
|
productStatus: '1',
|
||||||
lotNo: null,
|
lotNo: null,
|
||||||
inDate: null,
|
inDate: null,
|
||||||
backDate: null,
|
backDate: null,
|
||||||
|
|||||||
@@ -179,12 +179,12 @@
|
|||||||
<!-- <el-table-column :label="$t('stockFreeze.lotNo')" align="center" prop="lotNo" /> <!– 批号 –>-->
|
<!-- <el-table-column :label="$t('stockFreeze.lotNo')" align="center" prop="lotNo" /> <!– 批号 –>-->
|
||||||
<el-table-column :label="$t('stockFreeze.oldStatus')" align="center" prop="oldStatus" >
|
<el-table-column :label="$t('stockFreeze.oldStatus')" align="center" prop="oldStatus" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.cargo_space_status" :value="scope.row.oldStatus"/>
|
<dict-tag :options="dict.type.stock_status" :value="scope.row.oldStatus"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column><!-- 原库位状态 -->
|
</el-table-column><!-- 原库位状态 -->
|
||||||
<el-table-column :label="$t('stockFreeze.currStatus')" align="center" prop="currStatus" >
|
<el-table-column :label="$t('stockFreeze.currStatus')" align="center" prop="currStatus" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.cargo_space_status" :value="scope.row.currStatus"/>
|
<dict-tag :options="dict.type.stock_status" :value="scope.row.currStatus"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column><!-- 现库位状态 -->
|
</el-table-column><!-- 现库位状态 -->
|
||||||
<el-table-column :label="$t('stockFreeze.method')" align="center" prop="method" /> <!-- 操作 -->
|
<el-table-column :label="$t('stockFreeze.method')" align="center" prop="method" /> <!-- 操作 -->
|
||||||
@@ -283,7 +283,7 @@ import {listWarehouse} from "@/api/bas/warehouse"
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Freeze",
|
name: "Freeze",
|
||||||
dicts:['cargo_space_status'],
|
dicts:['stock_status'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('stockManagement.stockStatus')" prop="cargoSpaceStockStatus"><!-- 库存状态 -->
|
<el-form-item :label="$t('stockManagement.stockStatus')" prop="stockStatus"><!-- 库存状态 -->
|
||||||
<el-select v-model="queryParams.cargoSpaceStockStatus" :placeholder="$t('stockManagement.selectStockStatus')" clearable>
|
<el-select v-model="queryParams.stockStatus" :placeholder="$t('stockManagement.stockStatus')" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.stock_status"
|
v-for="dict in dict.type.stock_status"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
@@ -27,6 +27,16 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('stockManagement.cargoSpaceStockStatus')" prop="cargoSpaceStockStatus"><!-- 货位状态 -->
|
||||||
|
<el-select v-model="queryParams.cargoSpaceStockStatus" :placeholder="$t('stockManagement.cargoSpaceStockStatus')" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.cargo_space_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item :label="$t('stockManagement.productStatus')" prop="productStatus"><!-- 物料状态 -->
|
<el-form-item :label="$t('stockManagement.productStatus')" prop="productStatus"><!-- 物料状态 -->
|
||||||
<el-select v-model="queryParams.productStatus" :placeholder="$t('stockManagement.selectProductStatus')" clearable>
|
<el-select v-model="queryParams.productStatus" :placeholder="$t('stockManagement.selectProductStatus')" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -37,14 +47,6 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('stockManagement.lotNo')" prop="lotNo"><!-- 批次号 -->
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.lotNo"
|
|
||||||
:placeholder="$t('stockManagement.inputLotNo')"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('stockManagement.inDate')" prop="inDate"><!-- 入库时间 -->
|
<el-form-item :label="$t('stockManagement.inDate')" prop="inDate"><!-- 入库时间 -->
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.inDate"
|
v-model="queryParams.inDate"
|
||||||
@@ -250,14 +252,19 @@
|
|||||||
<el-table-column :label="$t('stockManagement.stockId')" align="center" prop="stockId" /> <!-- 库存id -->
|
<el-table-column :label="$t('stockManagement.stockId')" align="center" prop="stockId" /> <!-- 库存id -->
|
||||||
<el-table-column :label="$t('stockManagement.cargoSpaceId')" align="center" prop="cargoSpaceId" /> <!-- 货位id -->
|
<el-table-column :label="$t('stockManagement.cargoSpaceId')" align="center" prop="cargoSpaceId" /> <!-- 货位id -->
|
||||||
<el-table-column :label="$t('stockManagement.cargoSpaceName')" align="center" prop="cargoSpaceName" /> <!-- 货位id -->
|
<el-table-column :label="$t('stockManagement.cargoSpaceName')" align="center" prop="cargoSpaceName" /> <!-- 货位id -->
|
||||||
<el-table-column :label="$t('stockManagement.stockStatus')" align="center" prop="cargoSpaceStockStatus"> <!-- 库存状态 -->
|
<el-table-column :label="$t('stockManagement.stockStatus')" align="center" prop="stockStatus" ><!-- 库存状态 -->
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.stock_status" :value="scope.row.cargoSpaceStockStatus"/>
|
<dict-tag :options="dict.type.stock_status" :value="scope.row.stockStatus"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('stockManagement.cargoSpaceStatus')" align="center" prop="cargoSpaceStatus" >
|
<el-table-column :label="$t('stockManagement.cargoSpaceStockStatus')" align="center" prop="cargoSpaceStockStatus"> <!-- 货位状态 -->
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.cargo_space_status" :value="scope.row.cargoSpaceStatus"/>
|
<dict-tag :options="dict.type.cargo_space_status" :value="scope.row.cargoSpaceStockStatus"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :label="$t('stockManagement.cargoSpaceStatus')" align="center" prop="cargoSpaceStatus" ><!--货位状态-->
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.cargo_space_lock_status" :value="scope.row.cargoSpaceStatus"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column><!-- 货位状态 -->
|
</el-table-column><!-- 货位状态 -->
|
||||||
<el-table-column :label="$t('stockManagement.productStatus')" align="center" prop="productStatus"> <!-- 物料状态 -->
|
<el-table-column :label="$t('stockManagement.productStatus')" align="center" prop="productStatus"> <!-- 物料状态 -->
|
||||||
@@ -265,7 +272,6 @@
|
|||||||
<dict-tag :options="dict.type.product_status" :value="scope.row.productStatus"/>
|
<dict-tag :options="dict.type.product_status" :value="scope.row.productStatus"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('stockManagement.lotNo')" align="center" prop="lotNo" /> <!-- 批次号 -->
|
|
||||||
<!-- <el-table-column :label="$t('stockManagement.backDate')" align="center" prop="backDate" /> <!– 回流时间 –>-->
|
<!-- <el-table-column :label="$t('stockManagement.backDate')" align="center" prop="backDate" /> <!– 回流时间 –>-->
|
||||||
<el-table-column :label="$t('stockManagement.productId')" align="center" prop="extraField.productId" /> <!-- 物料Id -->
|
<el-table-column :label="$t('stockManagement.productId')" align="center" prop="extraField.productId" /> <!-- 物料Id -->
|
||||||
<el-table-column :label="$t('stockManagement.materialDesc')" align="center" prop="extraField.materialDesc" /> <!-- 物料描述 -->
|
<el-table-column :label="$t('stockManagement.materialDesc')" align="center" prop="extraField.materialDesc" /> <!-- 物料描述 -->
|
||||||
@@ -323,8 +329,8 @@
|
|||||||
<el-form-item :label="$t('stockManagement.cargoSpaceId')" prop="cargoSpaceId"> <!-- 货位id -->
|
<el-form-item :label="$t('stockManagement.cargoSpaceId')" prop="cargoSpaceId"> <!-- 货位id -->
|
||||||
<el-input v-model="form.cargoSpaceId" :placeholder="$t('stockManagement.inputCargoSpaceId')" />
|
<el-input v-model="form.cargoSpaceId" :placeholder="$t('stockManagement.inputCargoSpaceId')" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('stockManagement.stockStatus')" prop="cargoSpaceStockStatus"> <!-- 库存状态 -->
|
<el-form-item :label="$t('stockManagement.stockStatus')" prop="stockStatus"> <!-- 库存状态 -->
|
||||||
<el-select v-model="form.cargoSpaceStockStatus" :placeholder="$t('stockManagement.selectStockStatus')">
|
<el-select v-model="form.stockStatus" :placeholder="$t('stockManagement.selectStockStatus')">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.stock_status"
|
v-for="dict in dict.type.stock_status"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
@@ -333,7 +339,7 @@
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('stockManagement.cargoSpaceStatus')" prop="cargoSpaceStatus"> <!-- 货位状态 -->
|
<!-- <el-form-item :label="$t('stockManagement.cargoSpaceStatus')" prop="cargoSpaceStatus"> <!– 货位状态 –>
|
||||||
<el-select v-model="form.cargoSpaceStatus" :placeholder="$t('stockManagement.cargoSpaceStatus')">
|
<el-select v-model="form.cargoSpaceStatus" :placeholder="$t('stockManagement.cargoSpaceStatus')">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.cargo_space_status"
|
v-for="dict in dict.type.cargo_space_status"
|
||||||
@@ -342,7 +348,7 @@
|
|||||||
:value="dict.value"
|
:value="dict.value"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>-->
|
||||||
<!-- <el-form-item :label="$t('stockManagement.productStatus')" prop="productStatus"> <!– 物料状态 –>-->
|
<!-- <el-form-item :label="$t('stockManagement.productStatus')" prop="productStatus"> <!– 物料状态 –>-->
|
||||||
<!-- <el-select v-model="form.productStatus" :placeholder="$t('stockManagement.selectProductStatus')">-->
|
<!-- <el-select v-model="form.productStatus" :placeholder="$t('stockManagement.selectProductStatus')">-->
|
||||||
<!-- <el-option-->
|
<!-- <el-option-->
|
||||||
@@ -424,7 +430,7 @@ import { listManagement, getManagement, delManagement, addManagement, updateMana
|
|||||||
import {listWarehouse} from "@/api/bas/warehouse"
|
import {listWarehouse} from "@/api/bas/warehouse"
|
||||||
export default {
|
export default {
|
||||||
name: "Management",
|
name: "Management",
|
||||||
dicts: ['product_status', 'stock_status','cargo_space_status'],
|
dicts: ['product_status', 'stock_status','cargo_space_status','cargo_space_lock_status'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
|
|||||||
@@ -195,7 +195,7 @@
|
|||||||
<el-table-column :label="$t('stockRecord.productId')" align="center" prop="productId" /> <!-- 物品编码 -->
|
<el-table-column :label="$t('stockRecord.productId')" align="center" prop="productId" /> <!-- 物品编码 -->
|
||||||
<el-table-column :label="$t('stockRecord.productName')" align="center" prop="productName" /> <!-- 物品名称 -->
|
<el-table-column :label="$t('stockRecord.productName')" align="center" prop="productName" /> <!-- 物品名称 -->
|
||||||
<!-- <el-table-column :label="$t('stockRecord.printDate')" align="center" prop="printDate" /> <!– 生产日期 –>-->
|
<!-- <el-table-column :label="$t('stockRecord.printDate')" align="center" prop="printDate" /> <!– 生产日期 –>-->
|
||||||
<el-table-column :label="$t('stockRecord.lotNo')" align="center" prop="lotNo" /> <!-- 批号 -->
|
<!-- <el-table-column :label="$t('stockRecord.lotNo')" align="center" prop="lotNo" /> <!– 批号 –>-->
|
||||||
<el-table-column :label="$t('stockRecord.oldQuantity')" align="center" prop="oldQuantity" /> <!-- 初始数量 -->
|
<el-table-column :label="$t('stockRecord.oldQuantity')" align="center" prop="oldQuantity" /> <!-- 初始数量 -->
|
||||||
<el-table-column :label="$t('stockRecord.quantity')" align="center" prop="quantity" /> <!-- 操作后数量 -->
|
<el-table-column :label="$t('stockRecord.quantity')" align="center" prop="quantity" /> <!-- 操作后数量 -->
|
||||||
<el-table-column :label="$t('stockRecord.method')" align="center" prop="method"> <!-- 操作 -->
|
<el-table-column :label="$t('stockRecord.method')" align="center" prop="method"> <!-- 操作 -->
|
||||||
|
|||||||
Reference in New Issue
Block a user