出库回流功能
This commit is contained in:
@@ -71,8 +71,11 @@ public class ToWcsServiceImpl implements IToWcsService {
|
|||||||
//查询所有未推送的料箱出库作业
|
//查询所有未推送的料箱出库作业
|
||||||
MydoJob mydoJobParam = new MydoJob();
|
MydoJob mydoJobParam = new MydoJob();
|
||||||
List<String> list = new ArrayList<>();
|
List<String> list = new ArrayList<>();
|
||||||
|
list.add("20");
|
||||||
list.add("21");
|
list.add("21");
|
||||||
|
list.add("22");
|
||||||
list.add("23");
|
list.add("23");
|
||||||
|
list.add("24");
|
||||||
list.add("26");
|
list.add("26");
|
||||||
mydoJobParam.setInOutIds(list);
|
mydoJobParam.setInOutIds(list);
|
||||||
MydoJob mydoJobParam1 = new MydoJob();
|
MydoJob mydoJobParam1 = new MydoJob();
|
||||||
@@ -281,7 +284,7 @@ public class ToWcsServiceImpl implements IToWcsService {
|
|||||||
MydoJob outJob = outMydoJobs.get(0);
|
MydoJob outJob = outMydoJobs.get(0);
|
||||||
outJob.setExecutionPhase("2");
|
outJob.setExecutionPhase("2");
|
||||||
mydoJobService.updateMydoJob(outJob);
|
mydoJobService.updateMydoJob(outJob);
|
||||||
if (outJob.getInOrOut().equals("23")){
|
if ("24".equals(outJob.getInOrOut())){
|
||||||
String[] jobIds = new String[]{outJob.getJobId()};
|
String[] jobIds = new String[]{outJob.getJobId()};
|
||||||
mydoJobService.OuthandFinish(jobIds);
|
mydoJobService.OuthandFinish(jobIds);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,9 +67,9 @@ public class OutMydoJobController extends BaseController {
|
|||||||
@PreAuthorize("@ss.hasPermi('job:outmydoJob:pointOut')")
|
@PreAuthorize("@ss.hasPermi('job:outmydoJob:pointOut')")
|
||||||
@Log(title = "指定货位出库", businessType = BusinessType.INSERT)
|
@Log(title = "指定货位出库", businessType = BusinessType.INSERT)
|
||||||
@RequestMapping("/pointOut")
|
@RequestMapping("/pointOut")
|
||||||
public AjaxResult pointOut(@RequestParam("stockIds")String[] stockIds,@RequestParam("exitId")String exitId)
|
public AjaxResult pointOut(@RequestParam("stockIds")String[] stockIds,@RequestParam("exitId")String exitId,@RequestParam("type")String type)
|
||||||
{
|
{
|
||||||
return mydoJobService.pointOut(stockIds,exitId);
|
return mydoJobService.pointOut(stockIds,exitId,type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ public interface IMydoJobService
|
|||||||
* @param exitId
|
* @param exitId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
AjaxResult pointOut(String [] stockIds,String exitId);
|
AjaxResult pointOut(String [] stockIds,String exitId,String type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过托盘码查询
|
* 通过托盘码查询
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import com.ruoyi.check.difference.domain.CheckDifferenceRecord;
|
|||||||
import com.ruoyi.check.difference.service.ICheckDifferenceRecordService;
|
import com.ruoyi.check.difference.service.ICheckDifferenceRecordService;
|
||||||
import com.ruoyi.check.stockcheckdetail.domain.CheckStockinDetail;
|
import com.ruoyi.check.stockcheckdetail.domain.CheckStockinDetail;
|
||||||
import com.ruoyi.check.stockcheckdetail.service.ICheckStockinDetailService;
|
import com.ruoyi.check.stockcheckdetail.service.ICheckStockinDetailService;
|
||||||
import com.ruoyi.common.annotation.DataScope;
|
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||||
@@ -38,7 +37,6 @@ import com.ruoyi.stock.stock.service.IBasStockService;
|
|||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.core.GrantedAuthority;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
||||||
@@ -574,13 +572,14 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult pointOut(String[] stockIds, String exitId) {
|
public AjaxResult pointOut(String[] stockIds, String exitId,String type) {
|
||||||
HashMap<String, Object> map = new HashMap<>();
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
String msg = "";
|
String msg = "";
|
||||||
String Stringbuilder = "";
|
String Stringbuilder = "";
|
||||||
for (String stockId : stockIds) {
|
for (String stockId : stockIds) {
|
||||||
map.put("v_stock_id", stockId);
|
map.put("v_stock_id", stockId);
|
||||||
map.put("v_exit_id", exitId);
|
map.put("v_exit_id", exitId);
|
||||||
|
map.put("v_type", type);
|
||||||
mydoJobMapper.pointOut(map);
|
mydoJobMapper.pointOut(map);
|
||||||
//iToWcsService.pushOutMydoJob();
|
//iToWcsService.pushOutMydoJob();
|
||||||
String result = map.get("v_result").toString();
|
String result = map.get("v_result").toString();
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
package com.ruoyi.out.outStockout.service.impl;
|
package com.ruoyi.out.outStockout.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.convert.Convert;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.ruoyi.api.service.IToWcsService;
|
import com.ruoyi.api.service.IToWcsService;
|
||||||
import com.ruoyi.bas.basJobId.service.IBasJobIdService;
|
import com.ruoyi.bas.basJobId.service.IBasJobIdService;
|
||||||
import com.ruoyi.common.annotation.DataScope;
|
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.utils.MessageUtils;
|
import com.ruoyi.common.core.text.Convert;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.common.utils.uuid.UUID;
|
import com.ruoyi.common.utils.uuid.UUID;
|
||||||
import com.ruoyi.out.outStockout.domain.OutStockout;
|
import com.ruoyi.out.outStockout.domain.OutStockout;
|
||||||
@@ -16,6 +14,7 @@ import com.ruoyi.out.outStockout.service.IOutStockoutService;
|
|||||||
import com.ruoyi.out.outStockoutDetail.domain.OutStockoutDetail;
|
import com.ruoyi.out.outStockoutDetail.domain.OutStockoutDetail;
|
||||||
import com.ruoyi.out.outStockoutDetail.mapper.OutStockoutDetailMapper;
|
import com.ruoyi.out.outStockoutDetail.mapper.OutStockoutDetailMapper;
|
||||||
import com.ruoyi.out.outStockoutDetail.service.IOutStockoutDetailService;
|
import com.ruoyi.out.outStockoutDetail.service.IOutStockoutDetailService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.core.context.SecurityContextHolder;
|
import org.springframework.security.core.context.SecurityContextHolder;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -34,8 +33,8 @@ import java.util.List;
|
|||||||
* @date 2025-05-20
|
* @date 2025-05-20
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class OutStockoutServiceImpl implements IOutStockoutService
|
@Slf4j
|
||||||
{
|
public class OutStockoutServiceImpl implements IOutStockoutService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private OutStockoutMapper outStockoutMapper;
|
private OutStockoutMapper outStockoutMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
@@ -55,8 +54,7 @@ public class OutStockoutServiceImpl implements IOutStockoutService
|
|||||||
* @return 出库主单
|
* @return 出库主单
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public OutStockout selectOutStockoutByStockoutGuid(String stockoutGuid)
|
public OutStockout selectOutStockoutByStockoutGuid(String stockoutGuid) {
|
||||||
{
|
|
||||||
return outStockoutMapper.selectOutStockoutByStockoutGuid(stockoutGuid);
|
return outStockoutMapper.selectOutStockoutByStockoutGuid(stockoutGuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,8 +65,7 @@ public class OutStockoutServiceImpl implements IOutStockoutService
|
|||||||
* @return 出库主单
|
* @return 出库主单
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<OutStockout> selectOutStockoutList(OutStockout outStockout)
|
public List<OutStockout> selectOutStockoutList(OutStockout outStockout) {
|
||||||
{
|
|
||||||
/*if (!"admin".equals(SecurityUtils.getUsername())){
|
/*if (!"admin".equals(SecurityUtils.getUsername())){
|
||||||
outStockout.setDepartmentNo(Convert.toStr(SecurityUtils.getDeptId()));
|
outStockout.setDepartmentNo(Convert.toStr(SecurityUtils.getDeptId()));
|
||||||
}*/
|
}*/
|
||||||
@@ -82,8 +79,7 @@ public class OutStockoutServiceImpl implements IOutStockoutService
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertOutStockout(OutStockout outStockout)
|
public int insertOutStockout(OutStockout outStockout) {
|
||||||
{
|
|
||||||
return outStockoutMapper.insertOutStockout(outStockout);
|
return outStockoutMapper.insertOutStockout(outStockout);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,8 +90,7 @@ public class OutStockoutServiceImpl implements IOutStockoutService
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateOutStockout(OutStockout outStockout)
|
public int updateOutStockout(OutStockout outStockout) {
|
||||||
{
|
|
||||||
return outStockoutMapper.updateOutStockout(outStockout);
|
return outStockoutMapper.updateOutStockout(outStockout);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,8 +101,7 @@ public class OutStockoutServiceImpl implements IOutStockoutService
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int deleteOutStockoutByStockoutGuids(String[] stockoutGuids)
|
public int deleteOutStockoutByStockoutGuids(String[] stockoutGuids) {
|
||||||
{
|
|
||||||
return outStockoutMapper.deleteOutStockoutByStockoutGuids(stockoutGuids);
|
return outStockoutMapper.deleteOutStockoutByStockoutGuids(stockoutGuids);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,49 +112,62 @@ public class OutStockoutServiceImpl implements IOutStockoutService
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int deleteOutStockoutByStockoutGuid(String stockoutGuid)
|
public int deleteOutStockoutByStockoutGuid(String stockoutGuid) {
|
||||||
{
|
|
||||||
return outStockoutMapper.deleteOutStockoutByStockoutGuid(stockoutGuid);
|
return outStockoutMapper.deleteOutStockoutByStockoutGuid(stockoutGuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public String saveBill(OutStockoutVo outStockoutVo) {
|
public String saveBill(OutStockoutVo outStockoutVo) {
|
||||||
OutStockout outStockout = outStockoutVo.getOutStockout();
|
OutStockout outStockout = outStockoutVo.getOutStockout();
|
||||||
List<OutStockoutDetail> detailList = outStockoutVo.getDetailList();
|
List<OutStockoutDetail> detailList = outStockoutVo.getDetailList();
|
||||||
String stockOutId = basJobIdService.getJobId("CKD");
|
String stockOutId = basJobIdService.getJobId("CKD");
|
||||||
outStockout.setStockoutId(stockOutId);
|
outStockout.setStockoutId(stockOutId);
|
||||||
outStockout.setStockoutGuid(UUID.randomUUID().toString());
|
outStockout.setStockoutGuid(UUID.randomUUID().toString());
|
||||||
outStockout.setCreateDate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
|
outStockout.setCreateDate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
|
||||||
String username = SecurityContextHolder.getContext().getAuthentication().getName();
|
String username = SecurityContextHolder.getContext().getAuthentication().getName();
|
||||||
outStockout.setCreateManId(username);
|
outStockout.setCreateManId(username);
|
||||||
outStockout.setStatus("1");
|
outStockout.setStatus("1");
|
||||||
outStockout.setStockoutSource(outStockoutVo.getOutStockout().getStockoutSource());
|
outStockout.setStockoutSource(outStockoutVo.getOutStockout().getStockoutSource());
|
||||||
outStockout.setDepartmentNo(SecurityUtils.getDeptId().toString());
|
try {
|
||||||
// outStockout.setWarehouseId("01");
|
if ("1".equals(outStockoutVo.getOutStockout().getStockoutSource())) {
|
||||||
for (int i = 0; i < detailList.size(); i++) {
|
outStockout.setCreateManId(com.ruoyi.common.core.text.Convert.toStr(SecurityUtils.getUserId()));
|
||||||
OutStockoutDetail outStockoutDetail = detailList.get(i);
|
outStockout.setDepartmentNo(Convert.toStr(SecurityUtils.getDeptId()));
|
||||||
outStockoutDetail.setStockoutDetailId(stockOutId + "-" + (i + 1));
|
} else if ("2".equals(outStockoutVo.getOutStockout().getStockoutSource())) {
|
||||||
outStockoutDetail.setStockoutGuid(outStockout.getStockoutGuid());
|
outStockout.setCreateManId("1");
|
||||||
outStockoutDetail.setStockoutId(stockOutId);
|
outStockout.setDepartmentNo("103");
|
||||||
outStockoutDetail.setAllotQuantity(BigDecimal.ZERO);
|
} else if ("3".equals(outStockoutVo.getOutStockout().getStockoutSource())) {
|
||||||
outStockoutDetail.setAssignNum(BigDecimal.ZERO);
|
outStockout.setCreateManId("1");
|
||||||
outStockoutDetailMapper.insertOutStockoutDetail(outStockoutDetail);
|
outStockout.setDepartmentNo("104");
|
||||||
}
|
}
|
||||||
outStockoutMapper.insertOutStockout(outStockout);
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("入库单保存异常,无用户信息");
|
||||||
|
}
|
||||||
|
// outStockout.setWarehouseId("01");
|
||||||
|
for (int i = 0; i < detailList.size(); i++) {
|
||||||
|
OutStockoutDetail outStockoutDetail = detailList.get(i);
|
||||||
|
outStockoutDetail.setStockoutDetailId(stockOutId + "-" + (i + 1));
|
||||||
|
outStockoutDetail.setStockoutGuid(outStockout.getStockoutGuid());
|
||||||
|
outStockoutDetail.setStockoutId(stockOutId);
|
||||||
|
outStockoutDetail.setAllotQuantity(BigDecimal.ZERO);
|
||||||
|
outStockoutDetail.setAssignNum(BigDecimal.ZERO);
|
||||||
|
outStockoutDetailMapper.insertOutStockoutDetail(outStockoutDetail);
|
||||||
|
}
|
||||||
|
outStockoutMapper.insertOutStockout(outStockout);
|
||||||
|
|
||||||
return stockOutId;
|
return stockOutId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String updateOutStockoutStatus(String[] stockoutIds, String status, String newStatus,String exitId) {
|
public String updateOutStockoutStatus(String[] stockoutIds, String status, String newStatus, String exitId) {
|
||||||
HashMap<String, String> map = new HashMap<>();
|
HashMap<String, String> map = new HashMap<>();
|
||||||
StringBuilder stringBuilder = new StringBuilder();
|
StringBuilder stringBuilder = new StringBuilder();
|
||||||
for(String stockoutId:stockoutIds){
|
for (String stockoutId : stockoutIds) {
|
||||||
map.put("outStockId",stockoutId);
|
map.put("outStockId", stockoutId);
|
||||||
map.put("status",status);
|
map.put("status", status);
|
||||||
map.put("newStatus",newStatus);
|
map.put("newStatus", newStatus);
|
||||||
map.put("exitId",exitId);
|
map.put("exitId", exitId);
|
||||||
outStockoutMapper.updateOutStockoutStatus(map);
|
outStockoutMapper.updateOutStockoutStatus(map);
|
||||||
stringBuilder.append(",").append(map.get("v_resultString"));
|
stringBuilder.append(",").append(map.get("v_resultString"));
|
||||||
}
|
}
|
||||||
@@ -171,10 +178,10 @@ public class OutStockoutServiceImpl implements IOutStockoutService
|
|||||||
public AjaxResult autoAllot(String stockoutId) {
|
public AjaxResult autoAllot(String stockoutId) {
|
||||||
|
|
||||||
OutStockout outStockout = outStockoutMapper.selectOutStockoutByStockoutId(stockoutId);
|
OutStockout outStockout = outStockoutMapper.selectOutStockoutByStockoutId(stockoutId);
|
||||||
if (outStockout == null){
|
if (outStockout == null) {
|
||||||
return AjaxResult.warn("单据不存在,请检查!");
|
return AjaxResult.warn("单据不存在,请检查!");
|
||||||
}
|
}
|
||||||
if ("1".equals(outStockout.getStatus())){
|
if ("1".equals(outStockout.getStatus())) {
|
||||||
return AjaxResult.warn("单据未审核,请审核无误后再分配!");
|
return AjaxResult.warn("单据未审核,请审核无误后再分配!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,16 +191,16 @@ public class OutStockoutServiceImpl implements IOutStockoutService
|
|||||||
outStockoutDetail.setStockoutId(stockoutId);
|
outStockoutDetail.setStockoutId(stockoutId);
|
||||||
List<OutStockoutDetail> outStockoutDetails = outStockoutDetailService.selectOutStockoutDetailList(outStockoutDetail);
|
List<OutStockoutDetail> outStockoutDetails = outStockoutDetailService.selectOutStockoutDetailList(outStockoutDetail);
|
||||||
for (OutStockoutDetail detail : outStockoutDetails) {
|
for (OutStockoutDetail detail : outStockoutDetails) {
|
||||||
if (detail.getAllotQuantity().compareTo(detail.getQuantity()) < 0){
|
if (detail.getAllotQuantity().compareTo(detail.getQuantity()) < 0) {
|
||||||
map.put("v_stockout_detail_id", detail.getStockoutDetailId());
|
map.put("v_stockout_detail_id", detail.getStockoutDetailId());
|
||||||
outStockoutMapper.autoAllot(map);
|
outStockoutMapper.autoAllot(map);
|
||||||
toWcsService.pushOutMydoJob();
|
toWcsService.pushOutMydoJob();
|
||||||
if (!"10".equals(map.get("v_result"))){
|
if (!"10".equals(map.get("v_result"))) {
|
||||||
stringBuilder.append(",").append(map.get("v_resultString"));
|
stringBuilder.append(",").append(map.get("v_resultString"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!StrUtil.isEmpty(stringBuilder.toString())){
|
if (!StrUtil.isEmpty(stringBuilder.toString())) {
|
||||||
return AjaxResult.warn(stringBuilder.toString());
|
return AjaxResult.warn(stringBuilder.toString());
|
||||||
}
|
}
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
@@ -213,11 +220,11 @@ public class OutStockoutServiceImpl implements IOutStockoutService
|
|||||||
map.put("v_stock_id", stock);
|
map.put("v_stock_id", stock);
|
||||||
outStockoutMapper.manualAllot(map);
|
outStockoutMapper.manualAllot(map);
|
||||||
toWcsService.pushOutMydoJob();
|
toWcsService.pushOutMydoJob();
|
||||||
if (!"10".equals(map.get("v_result"))){
|
if (!"10".equals(map.get("v_result"))) {
|
||||||
stringBuilder.append(",").append(map.get("v_resultString"));
|
stringBuilder.append(",").append(map.get("v_resultString"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!StrUtil.isEmpty(stringBuilder.toString())){
|
if (!StrUtil.isEmpty(stringBuilder.toString())) {
|
||||||
return AjaxResult.warn(stringBuilder.toString());
|
return AjaxResult.warn(stringBuilder.toString());
|
||||||
}
|
}
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
|
|||||||
@@ -221,6 +221,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
{call proc_point_out(
|
{call proc_point_out(
|
||||||
#{v_stock_id,jdbcType=VARCHAR,mode=IN},
|
#{v_stock_id,jdbcType=VARCHAR,mode=IN},
|
||||||
#{v_exit_id,jdbcType=VARCHAR,mode=IN},
|
#{v_exit_id,jdbcType=VARCHAR,mode=IN},
|
||||||
|
#{v_type,jdbcType=VARCHAR,mode=IN},
|
||||||
#{v_result,mode=OUT,jdbcType=INTEGER},
|
#{v_result,mode=OUT,jdbcType=INTEGER},
|
||||||
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -35,13 +35,14 @@ export function hangInvalidCheckJob(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function pointOut(stockIds,exitId) {
|
export function pointOut(stockIds,exitId,type) {
|
||||||
return request({
|
return request({
|
||||||
url: '/job/outmydoJob/pointOut',
|
url: '/job/outmydoJob/pointOut',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
stockIds: stockIds.join(',') ,// 将数组转换为逗号分隔的字符串
|
stockIds: stockIds.join(',') ,// 将数组转换为逗号分隔的字符串
|
||||||
exitId:exitId
|
exitId:exitId,
|
||||||
|
type:type
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,6 +91,16 @@
|
|||||||
v-hasPermi="['job:outmydoJob:pointOut']"
|
v-hasPermi="['job:outmydoJob:pointOut']"
|
||||||
>指定货位出库 <!-- 指定货位出库 --></el-button>
|
>指定货位出库 <!-- 指定货位出库 --></el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="pointOut1"
|
||||||
|
v-hasPermi="['job:outmydoJob:pointOut']"
|
||||||
|
>出来看看 <!-- 指定货位出库 --></el-button>
|
||||||
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
@@ -298,7 +308,9 @@ export default {
|
|||||||
],
|
],
|
||||||
|
|
||||||
// 选中的库存数据
|
// 选中的库存数据
|
||||||
selectedStockData: []
|
selectedStockData: [],
|
||||||
|
// 当前操作类型 1:指定货位出库 2:出来看看
|
||||||
|
currentOperationType: '1'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -421,6 +433,15 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 指定货位出库按钮操作 */
|
/** 指定货位出库按钮操作 */
|
||||||
pointOut() {
|
pointOut() {
|
||||||
|
this.handlePointOutOperation('1');
|
||||||
|
},
|
||||||
|
/** 出来看看按钮操作 */
|
||||||
|
pointOut1() {
|
||||||
|
this.handlePointOutOperation('2');
|
||||||
|
},
|
||||||
|
|
||||||
|
handlePointOutOperation(type) {
|
||||||
|
this.currentOperationType = type;
|
||||||
if (this.ids.length === 0) {
|
if (this.ids.length === 0) {
|
||||||
this.$modal.msgError("请至少选择一行数据");
|
this.$modal.msgError("请至少选择一行数据");
|
||||||
return;
|
return;
|
||||||
@@ -435,7 +456,7 @@ export default {
|
|||||||
if (all02) {
|
if (all02) {
|
||||||
this.exitDialogVisible = false
|
this.exitDialogVisible = false
|
||||||
this.exitForm.exitId = '1'
|
this.exitForm.exitId = '1'
|
||||||
this.doPointOut('1')
|
this.doPointOut('1', type)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.exitDialogVisible = true
|
this.exitDialogVisible = true
|
||||||
@@ -447,13 +468,13 @@ export default {
|
|||||||
submitPointOut() {
|
submitPointOut() {
|
||||||
this.$refs["exitForm"].validate(valid => {
|
this.$refs["exitForm"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doPointOut(this.exitForm.exitId)
|
this.doPointOut(this.exitForm.exitId, this.currentOperationType)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
doPointOut(exitId) {
|
doPointOut(exitId, type) {
|
||||||
const stockIds = this.ids
|
const stockIds = this.ids
|
||||||
pointOut(stockIds, exitId).then(response => {
|
pointOut(stockIds, exitId, type).then(response => {
|
||||||
this.$modal.msgSuccess(response.msg);
|
this.$modal.msgSuccess(response.msg);
|
||||||
this.getList();
|
this.getList();
|
||||||
this.exitDialogVisible = false;
|
this.exitDialogVisible = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user