优化页面使用
This commit is contained in:
@@ -1,20 +1,28 @@
|
||||
package com.ruoyi.api.controller;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.ruoyi.api.domain.ReMaterialParam;
|
||||
import com.ruoyi.api.domain.RequestEnter;
|
||||
import com.ruoyi.api.domain.WmsJobRequest;
|
||||
import com.ruoyi.api.service.IToWmsService;
|
||||
import com.ruoyi.bas.basJobId.service.IBasJobIdService;
|
||||
import com.ruoyi.bas.tag.mapper.BasTagMapper;
|
||||
import com.ruoyi.bas.taskNo.service.IBasTaskNoService;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.job.mydojob.domain.MydoJob;
|
||||
import com.ruoyi.job.mydojob.mapper.MydoJobMapper;
|
||||
import com.ruoyi.job.mydojobdetail.domain.MydoJobDetail;
|
||||
import com.ruoyi.job.mydojobdetail.mapper.MydoJobDetailMapper;
|
||||
import com.ruoyi.log.domain.RequestLog;
|
||||
import com.ruoyi.log.service.IRequestLogService;
|
||||
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;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 作业统计 Controller
|
||||
@@ -23,9 +31,51 @@ import java.util.Map;
|
||||
@RequestMapping("/api2wms")
|
||||
public class ToWmsApiController {
|
||||
|
||||
@Autowired
|
||||
private BasTagMapper basTagMapper;
|
||||
@Autowired
|
||||
private MydoJobMapper mydoJobMapper;
|
||||
@Autowired
|
||||
private MydoJobDetailMapper mydoJobDetailMapper;
|
||||
@Autowired
|
||||
private IBasJobIdService basJobIdService;
|
||||
@Autowired
|
||||
private IBasTaskNoService basTaskNoService;
|
||||
|
||||
@GetMapping("/genMoniData")
|
||||
public void genMoniData(){
|
||||
List<Map<String,String>> list = basTagMapper.selectTestData("110");
|
||||
Map<String, List<Map<String, String>>> deptIdList = list.stream().collect(Collectors.groupingBy(x -> x.get("deptId")));
|
||||
String rkPri = "RK20260117";
|
||||
int i = 85000;
|
||||
for (String deptId : deptIdList.keySet()) {
|
||||
List<Map<String, String>> deptMydoJobList = deptIdList.get(deptId);
|
||||
for (Map<String, String> stringStringMap : deptMydoJobList) {
|
||||
MydoJob mydoJob = new MydoJob();
|
||||
mydoJob.setJobId(rkPri+String.format("%05d",i));
|
||||
mydoJob.setStatus("1");
|
||||
mydoJob.setOnLineType("1");
|
||||
mydoJob.setTaskNo(i+"");
|
||||
mydoJob.setDepartmentId(deptId);
|
||||
mydoJob.setTrayCode(stringStringMap.get("trayCode"));
|
||||
mydoJob.setPriority(10L);
|
||||
mydoJob.setExecutionPhase("1");
|
||||
mydoJob.setInOrOut("3");
|
||||
mydoJob.setCreateTime(new Date());
|
||||
mydoJob.setWarehouseId("01");
|
||||
mydoJobMapper.insertMydoJob(mydoJob);
|
||||
MydoJobDetail mydoJobDetail = new MydoJobDetail();
|
||||
mydoJobDetail.setJobDetailId(mydoJob.getJobId()+"-1");
|
||||
mydoJobDetail.setJobId(mydoJob.getJobId());
|
||||
mydoJobDetail.setProductGuid("KTP0001");
|
||||
mydoJobDetail.setProductId("KTP0001");
|
||||
mydoJobDetail.setInQuantity("1");
|
||||
mydoJobDetailMapper.insertMydoJobDetail(mydoJobDetail);
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -12,12 +12,12 @@ import com.ruoyi.api.domain.RequestEnterResponse;
|
||||
import com.ruoyi.api.domain.WmsJobRequest;
|
||||
import com.ruoyi.api.service.IToWcsService;
|
||||
import com.ruoyi.bas.cargoSpace.domain.BasCargoSpace;
|
||||
import com.ruoyi.bas.cargoSpace.domain.BasCargoSpaceWeight;
|
||||
import com.ruoyi.bas.cargoSpace.service.IBasCargoSpaceService;
|
||||
import com.ruoyi.bas.weightRule.domain.BasCargoSpaceWeightRule;
|
||||
import com.ruoyi.bas.weightRule.service.IBasCargoSpaceWeightRuleService;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.MessageUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.job.mydojob.domain.MydoJob;
|
||||
import com.ruoyi.job.mydojob.service.IMydoJobService;
|
||||
import com.ruoyi.job.mydojobdetail.domain.MydoJobDetail;
|
||||
@@ -26,6 +26,7 @@ import com.ruoyi.log.domain.RequestLog;
|
||||
import com.ruoyi.log.service.IRequestLogService;
|
||||
import com.ruoyi.out.outStockout.service.IOutStockoutService;
|
||||
import com.ruoyi.pda.domain.TrayCodeMsg;
|
||||
import com.ruoyi.pda.mapper.PdaMapper;
|
||||
import com.ruoyi.pda.service.PdaService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -52,6 +53,8 @@ public class ToWcsServiceImpl implements IToWcsService {
|
||||
private IOutStockoutService outStockoutService;
|
||||
@Autowired
|
||||
private PdaService pdaService;
|
||||
@Autowired
|
||||
private PdaMapper pdaMapper;
|
||||
|
||||
@Autowired
|
||||
private IBasCargoSpaceWeightRuleService basCargoSpaceWeightRuleService;
|
||||
@@ -67,32 +70,44 @@ public class ToWcsServiceImpl implements IToWcsService {
|
||||
public void pushOutMydoJob() {
|
||||
//查询所有未推送的料箱出库作业
|
||||
MydoJob mydoJobParam = new MydoJob();
|
||||
mydoJobParam.setStatus("1");
|
||||
List<String> list = new ArrayList<>();
|
||||
list.add("21");
|
||||
list.add("23");
|
||||
list.add("26");
|
||||
mydoJobParam.setInOutIds(list);
|
||||
List<MydoJob> outMydoJobs = mydoJobService.selectMydoJobListApi(mydoJobParam);
|
||||
for (MydoJob outMydoJob : outMydoJobs) {
|
||||
if ("01".equals(outMydoJob.getWarehouseId())){
|
||||
RequestLog requestLog = requestLogService.getRequestLog(PUSH_OUT_MYDO_JOB_1, JSONUtil.toJsonStr(outMydoJob), "推送出库任务");
|
||||
if ("1".equals(requestLog.getIsSuccessful())){
|
||||
outMydoJob.setStatus("3");
|
||||
outMydoJob.setExecutionPhase("1");
|
||||
outMydoJob.setStartTime(DateUtil.formatDateTime(new Date()));
|
||||
mydoJobService.updateMydoJob(outMydoJob);
|
||||
}
|
||||
}else if ("02".equals(outMydoJob.getWarehouseId())){
|
||||
RequestLog requestLog = requestLogService.getRequestLog(PUSH_OUT_MYDO_JOB_2, JSONUtil.toJsonStr(outMydoJob), "推送出库任务");
|
||||
if ("1".equals(requestLog.getIsSuccessful())){
|
||||
outMydoJob.setStatus("3");
|
||||
outMydoJob.setExecutionPhase("1");
|
||||
outMydoJob.setStartTime(DateUtil.formatDateTime(new Date()));
|
||||
mydoJobService.updateMydoJob(outMydoJob);
|
||||
MydoJob mydoJobParam1 = new MydoJob();
|
||||
mydoJobParam1.setInOutIds(list);
|
||||
for (int i = 1; i <= 6; i++) {
|
||||
mydoJobParam.setRoadwayId(String.valueOf(i));
|
||||
mydoJobParam.setStatus("3");
|
||||
List<MydoJob> roadwayRunningMydoJobs = mydoJobService.selectMydoJobListApi(mydoJobParam);
|
||||
if (CollUtil.isEmpty(roadwayRunningMydoJobs)){
|
||||
mydoJobParam1.setStatus("1");
|
||||
List<MydoJob> roadwayWaitingMydoJobs = mydoJobService.selectMydoJobListApi(mydoJobParam1);
|
||||
if (CollUtil.isNotEmpty(roadwayWaitingMydoJobs)){
|
||||
MydoJob outMydoJob = roadwayWaitingMydoJobs.get(0);
|
||||
if ("01".equals(outMydoJob.getWarehouseId())){
|
||||
RequestLog requestLog = requestLogService.getRequestLog(PUSH_OUT_MYDO_JOB_1, JSONUtil.toJsonStr(outMydoJob), "推送出库任务");
|
||||
if ("1".equals(requestLog.getIsSuccessful())){
|
||||
outMydoJob.setStatus("3");
|
||||
outMydoJob.setExecutionPhase("1");
|
||||
outMydoJob.setStartTime(DateUtil.formatDateTime(new Date()));
|
||||
mydoJobService.updateMydoJob(outMydoJob);
|
||||
}
|
||||
}else if ("02".equals(outMydoJob.getWarehouseId())){
|
||||
RequestLog requestLog = requestLogService.getRequestLog(PUSH_OUT_MYDO_JOB_2, JSONUtil.toJsonStr(outMydoJob), "推送出库任务");
|
||||
if ("1".equals(requestLog.getIsSuccessful())){
|
||||
outMydoJob.setStatus("3");
|
||||
outMydoJob.setExecutionPhase("1");
|
||||
outMydoJob.setStartTime(DateUtil.formatDateTime(new Date()));
|
||||
mydoJobService.updateMydoJob(outMydoJob);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +152,7 @@ public class ToWcsServiceImpl implements IToWcsService {
|
||||
param.setWarehouseId(requestEnter.getWarehouseId());
|
||||
List<MydoJob> mydoJobs = mydoJobService.selectMydoJobListApi(param);
|
||||
if (CollUtil.isEmpty(mydoJobs)){
|
||||
//生成杂料入库任务
|
||||
/*//生成杂料入库任务
|
||||
TrayCodeMsg trayCodeMsg = new TrayCodeMsg();
|
||||
trayCodeMsg.setTrayCode(requestEnter.getTrayCode());
|
||||
trayCodeMsg.setWarehouseId(requestEnter.getWarehouseId());
|
||||
@@ -145,7 +160,22 @@ public class ToWcsServiceImpl implements IToWcsService {
|
||||
mydoJobs = mydoJobService.selectMydoJobListApi(param);
|
||||
if (CollUtil.isEmpty(mydoJobs)){
|
||||
return AjaxResult.error("杂料入库任务生成失败", requestEnter.getTrayCode());
|
||||
}*/
|
||||
if ("02".equals(requestEnter.getWarehouseId())){
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("v_tray_code", requestEnter.getTrayCode());
|
||||
map.put("v_warehouse_id", requestEnter.getWarehouseId());
|
||||
map.put("v_dept_id", "");
|
||||
pdaMapper.ktpin(map);
|
||||
String result1 = map.get("v_result").toString();
|
||||
if ("10".equals(result1)){
|
||||
return AjaxResult.success(map.get("v_resultmsg").toString());
|
||||
}else{
|
||||
return AjaxResult.error(map.get("v_resultmsg").toString());
|
||||
}
|
||||
}
|
||||
|
||||
return AjaxResult.error("无入库任务", requestEnter.getTrayCode());
|
||||
}
|
||||
MydoJob mydoJob = mydoJobs.get(0);
|
||||
if(StrUtil.isEmpty(mydoJob.getCargoSpaceId())){
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.ruoyi.bas.tag.mapper;
|
||||
import com.ruoyi.bas.tag.domain.BasTag;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 电子标签Mapper接口
|
||||
@@ -61,4 +62,8 @@ public interface BasTagMapper
|
||||
public int deleteBasTagByIds(Long[] ids);
|
||||
|
||||
BasTag selectBasTagByTrayCode(String trayCode);
|
||||
|
||||
void insertData();
|
||||
|
||||
List<Map<String,String>> selectTestData(String deptId);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,6 @@ public class InMydoJobController extends BaseController
|
||||
{
|
||||
startPage();
|
||||
List<MydoJob> list = null;
|
||||
//mydoJob.setInOut("1");
|
||||
if( StrUtil.isEmpty(mydoJob.getStatus()) ||Integer.parseInt(mydoJob.getStatus())<4) {
|
||||
list = mydoJobService.selectMydoJobList(mydoJob);
|
||||
}else{
|
||||
|
||||
@@ -12,10 +12,7 @@ import com.ruoyi.job.mydojob.service.IMydoJobService;
|
||||
import com.ruoyi.job.mydojobfinish.service.IMydoJobFinishService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -76,4 +73,11 @@ public class OutMydoJobController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
@Log(title = "修改优先级",businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/updatePriority")
|
||||
public AjaxResult updatePriority(@RequestBody MydoJob mydoJob){
|
||||
return mydoJobService.updatePriority(mydoJob);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -131,8 +131,8 @@ public class MydoJob extends BaseEntity
|
||||
|
||||
private List<String> inOutIds;
|
||||
|
||||
private String createLeftTime;
|
||||
private String createRightTime;
|
||||
private String dateStart;
|
||||
private String dateEnd;
|
||||
|
||||
private String productId;
|
||||
|
||||
@@ -144,20 +144,20 @@ public class MydoJob extends BaseEntity
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public String getCreateLeftTime() {
|
||||
return createLeftTime;
|
||||
public String getDateEnd() {
|
||||
return dateEnd;
|
||||
}
|
||||
|
||||
public void setCreateLeftTime(String createLeftTime) {
|
||||
this.createLeftTime = createLeftTime;
|
||||
public void setDateEnd(String dateEnd) {
|
||||
this.dateEnd = dateEnd;
|
||||
}
|
||||
|
||||
public String getCreateRightTime() {
|
||||
return createRightTime;
|
||||
public String getDateStart() {
|
||||
return dateStart;
|
||||
}
|
||||
|
||||
public void setCreateRightTime(String createRightTime) {
|
||||
this.createRightTime = createRightTime;
|
||||
public void setDateStart(String dateStart) {
|
||||
this.dateStart = dateStart;
|
||||
}
|
||||
|
||||
public List<String> getInOutIds() {
|
||||
|
||||
@@ -111,4 +111,6 @@ public interface IMydoJobService
|
||||
AjaxResult manualInvalidationCheckMydoJob(MydoJob mydoJob);
|
||||
|
||||
AjaxResult manualCompletedCheckMydoJob(MydoJob mydoJob, int i);
|
||||
|
||||
AjaxResult updatePriority(MydoJob mydoJob);
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@ import com.ruoyi.check.stockcheckdetail.domain.CheckStockinDetail;
|
||||
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.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.in.erp.service.ITransferBillCallbackService;
|
||||
import com.ruoyi.in.stockindetail.domain.InStockinDetail;
|
||||
@@ -36,6 +38,7 @@ import com.ruoyi.stock.stock.service.IBasStockService;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
||||
@@ -107,7 +110,59 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
//@DataScope(warehouseAlias = "bw")
|
||||
public List<MydoJob> selectMydoJobList(MydoJob mydoJob) {
|
||||
if (!"admin".equals(SecurityUtils.getUsername())){
|
||||
mydoJob.setDepartmentId(Convert.toStr(SecurityUtils.getDeptId()));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
List<SysRole> roles = loginUser.getUser().getRoles();
|
||||
if (CollUtil.isEmpty(roles)) {
|
||||
//如果未设置角色 ,直接返回空列表
|
||||
return new ArrayList<>();
|
||||
}
|
||||
if ("1".equals(mydoJob.getInOut()) || "3".equals(mydoJob.getInOut())){
|
||||
//入库需要查看本部门任务
|
||||
mydoJob.setDepartmentId(Convert.toStr(SecurityUtils.getDeptId()));
|
||||
Optional<SysRole> first = roles.stream().filter(x -> "role1".equals(x.getRoleKey())).findFirst();
|
||||
if (first.isPresent()){
|
||||
//二联合普通人员
|
||||
mydoJob.setWarehouseId("02");
|
||||
}
|
||||
Optional<SysRole> first1 = roles.stream().filter(x -> "role2".equals(x.getRoleKey())).findFirst();
|
||||
if (first1.isPresent()){
|
||||
//三联合普通人员
|
||||
mydoJob.setWarehouseId("01");
|
||||
}
|
||||
Optional<SysRole> first2 = roles.stream().filter(x -> "role3".equals(x.getRoleKey())).findFirst();
|
||||
if (first2.isPresent()){
|
||||
//二联合管理员
|
||||
mydoJob.setWarehouseId("02");
|
||||
}
|
||||
Optional<SysRole> first3 = roles.stream().filter(x -> "role4".equals(x.getRoleKey())).findFirst();
|
||||
if (first3.isPresent()){
|
||||
//三联合管理员
|
||||
mydoJob.setWarehouseId("01");
|
||||
}
|
||||
}else if ("2".equals(mydoJob.getInOut())|| "4".equals(mydoJob.getInOut())){
|
||||
//出库需要查看全部任务
|
||||
Optional<SysRole> first = roles.stream().filter(x -> "role1".equals(x.getRoleKey())).findFirst();
|
||||
if (first.isPresent()){
|
||||
//二联合普通人员
|
||||
mydoJob.setWarehouseId("02");
|
||||
}
|
||||
Optional<SysRole> first1 = roles.stream().filter(x -> "role2".equals(x.getRoleKey())).findFirst();
|
||||
if (first1.isPresent()){
|
||||
//三联合普通人员
|
||||
mydoJob.setWarehouseId("01");
|
||||
}
|
||||
Optional<SysRole> first2 = roles.stream().filter(x -> "role3".equals(x.getRoleKey())).findFirst();
|
||||
if (first2.isPresent()){
|
||||
//二联合管理员
|
||||
mydoJob.setWarehouseId("02");
|
||||
}
|
||||
Optional<SysRole> first3 = roles.stream().filter(x -> "role4".equals(x.getRoleKey())).findFirst();
|
||||
if (first3.isPresent()){
|
||||
//三联合管理员
|
||||
mydoJob.setWarehouseId("01");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return mydoJobMapper.selectMydoJobList(mydoJob);
|
||||
}
|
||||
@@ -283,6 +338,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
stockByInStockinDetail.setSpare7("1");
|
||||
stockByInStockinDetail.setBackDate(DateUtil.formatDateTime(DateUtil.date()));
|
||||
stockByInStockinDetail.setInDate(mydoJobDetail.getInDate());
|
||||
stockByInStockinDetail.setModel(mydoJob.getDepartmentId());
|
||||
list.add(stockByInStockinDetail);
|
||||
//修改异常记录中的库存id
|
||||
CheckDifferenceRecord checkDifferenceRecord = first.get();
|
||||
@@ -293,6 +349,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
BasStock stockByInStockinDetail = getStockByInStockinDetail(mydoJobDetail, mydoJob, "1");
|
||||
stockByInStockinDetail.setSpare7("1");
|
||||
stockByInStockinDetail.setBackDate(DateUtil.formatDateTime(DateUtil.date()));
|
||||
stockByInStockinDetail.setModel(mydoJob.getDepartmentId());
|
||||
//正常库存
|
||||
list.add(stockByInStockinDetail);
|
||||
}
|
||||
@@ -340,6 +397,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
//正常库存
|
||||
BasStock stockByInStockinDetail = getStockByInStockinDetail(mydoJobDetail, mydoJob, "1");
|
||||
stockByInStockinDetail.setSpare7("0");
|
||||
stockByInStockinDetail.setModel(mydoJob.getDepartmentId());
|
||||
if ("2".equals(mydoJob.getInOrOut())){
|
||||
//尾箱回流 插入最后出库时间
|
||||
stockByInStockinDetail.setBackDate(DateUtil.formatDateTime(DateUtil.date()));
|
||||
@@ -432,7 +490,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
stock.setPower(mydoJobDetail.getSpare7());
|
||||
stock.setPhase(mydoJobDetail.getSupplierId());
|
||||
stock.setDistribution(mydoJobDetail.getSpare9());
|
||||
stock.setModel(mydoJobDetail.getUnit());
|
||||
stock.setInClassId(mydoJobDetail.getUnit());
|
||||
stock.setOrderId(mydoJobDetail.getSpare6());
|
||||
//stock.setNetWeight(mydoJob.getLineId());
|
||||
return stock;
|
||||
@@ -519,7 +577,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
map.put("v_stock_id", stockId);
|
||||
map.put("v_exit_id", exitId);
|
||||
mydoJobMapper.pointOut(map);
|
||||
iToWcsService.pushOutMydoJob();
|
||||
//iToWcsService.pushOutMydoJob();
|
||||
String result = map.get("v_result").toString();
|
||||
msg=map.get("v_resultmsg").toString();
|
||||
if (!"10".equals(result)) {
|
||||
@@ -595,4 +653,13 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
public AjaxResult manualCompletedCheckMydoJob(MydoJob mydoJob, int i) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult updatePriority(MydoJob mydoJob) {
|
||||
int i = mydoJobMapper.updateMydoJob(mydoJob);
|
||||
if (i > 0){
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.ruoyi.job.mydojobfinish.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.job.mydojob.domain.MydoJob;
|
||||
@@ -11,7 +14,9 @@ import com.ruoyi.job.mydojobfinish.service.IMydoJobFinishService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* 历史主作业Service业务层处理
|
||||
@@ -53,7 +58,59 @@ public class MydoJobFinishServiceImpl implements IMydoJobFinishService
|
||||
//@DataScope(warehouseAlias = "bw")
|
||||
public List<MydoJob> selectMydoJobFinishListByMydoJob(MydoJob mydoJob) {
|
||||
if (!"admin".equals(SecurityUtils.getUsername())){
|
||||
mydoJob.setDepartmentId(Convert.toStr(SecurityUtils.getDeptId()));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
List<SysRole> roles = loginUser.getUser().getRoles();
|
||||
if (CollUtil.isEmpty(roles)) {
|
||||
//如果未设置角色 ,直接返回空列表
|
||||
return new ArrayList<>();
|
||||
}
|
||||
if ("1".equals(mydoJob.getInOut()) || "3".equals(mydoJob.getInOut())){
|
||||
//入库需要查看本部门任务
|
||||
mydoJob.setDepartmentId(Convert.toStr(SecurityUtils.getDeptId()));
|
||||
Optional<SysRole> first = roles.stream().filter(x -> "role1".equals(x.getRoleKey())).findFirst();
|
||||
if (first.isPresent()){
|
||||
//二联合普通人员
|
||||
mydoJob.setWarehouseId("02");
|
||||
}
|
||||
Optional<SysRole> first1 = roles.stream().filter(x -> "role2".equals(x.getRoleKey())).findFirst();
|
||||
if (first1.isPresent()){
|
||||
//三联合普通人员
|
||||
mydoJob.setWarehouseId("01");
|
||||
}
|
||||
Optional<SysRole> first2 = roles.stream().filter(x -> "role3".equals(x.getRoleKey())).findFirst();
|
||||
if (first2.isPresent()){
|
||||
//二联合管理员
|
||||
mydoJob.setWarehouseId("02");
|
||||
}
|
||||
Optional<SysRole> first3 = roles.stream().filter(x -> "role4".equals(x.getRoleKey())).findFirst();
|
||||
if (first3.isPresent()){
|
||||
//三联合管理员
|
||||
mydoJob.setWarehouseId("01");
|
||||
}
|
||||
}else if ("2".equals(mydoJob.getInOut())|| "4".equals(mydoJob.getInOut())){
|
||||
//出库需要查看全部任务
|
||||
Optional<SysRole> first = roles.stream().filter(x -> "role1".equals(x.getRoleKey())).findFirst();
|
||||
if (first.isPresent()){
|
||||
//二联合普通人员
|
||||
mydoJob.setWarehouseId("02");
|
||||
}
|
||||
Optional<SysRole> first1 = roles.stream().filter(x -> "role2".equals(x.getRoleKey())).findFirst();
|
||||
if (first1.isPresent()){
|
||||
//三联合普通人员
|
||||
mydoJob.setWarehouseId("01");
|
||||
}
|
||||
Optional<SysRole> first2 = roles.stream().filter(x -> "role3".equals(x.getRoleKey())).findFirst();
|
||||
if (first2.isPresent()){
|
||||
//二联合管理员
|
||||
mydoJob.setWarehouseId("02");
|
||||
}
|
||||
Optional<SysRole> first3 = roles.stream().filter(x -> "role4".equals(x.getRoleKey())).findFirst();
|
||||
if (first3.isPresent()){
|
||||
//三联合管理员
|
||||
mydoJob.setWarehouseId("01");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return mydoJobFinishMapper.selectMydoJobFinishListByMydoJob(mydoJob);
|
||||
}
|
||||
|
||||
@@ -494,8 +494,8 @@ public class KpiServiceImpl implements KpiService
|
||||
MydoJob mydoJobParam = new MydoJob();
|
||||
mydoJobParam.setWarehouseId(warehouseId);
|
||||
// 直接查询创建时间是否在startTime与endTime之间
|
||||
mydoJobParam.setCreateLeftTime(startTime);
|
||||
mydoJobParam.setCreateRightTime(endTime);
|
||||
mydoJobParam.setDateStart(startTime);
|
||||
mydoJobParam.setDateEnd(endTime);
|
||||
mydoJobParam.setInOut(inOut);
|
||||
List<DateTime> datesBetween = DateUtil.rangeToList(DateUtil.parseDate(startTime), DateUtil.parseDate(endTime), DateField.DAY_OF_MONTH);
|
||||
List<MydoJob> list = mydoJobFinishMapper.selectMydoJobFinishListByMydoJob(mydoJobParam);
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
package com.ruoyi.out.handAllotStock.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -46,6 +52,32 @@ public class ViewHandAllotStockServiceImpl implements IViewHandAllotStockService
|
||||
public List<ViewHandAllotStock> selectViewHandAllotStockList(ViewHandAllotStock viewHandAllotStock)
|
||||
{
|
||||
if (!"admin".equals(SecurityUtils.getUsername())){
|
||||
SysUser user = SecurityUtils.getLoginUser().getUser();
|
||||
List<SysRole> roles = user.getRoles();
|
||||
if (CollUtil.isEmpty(roles)) {
|
||||
//如果未设置角色 ,直接返回空列表
|
||||
return new ArrayList<>();
|
||||
}
|
||||
Optional<SysRole> first = roles.stream().filter(x -> "role1".equals(x.getRoleKey())).findFirst();
|
||||
if (first.isPresent()){
|
||||
//二联合普通人员
|
||||
viewHandAllotStock.setWarehouseId("02");
|
||||
}
|
||||
Optional<SysRole> first1 = roles.stream().filter(x -> "role2".equals(x.getRoleKey())).findFirst();
|
||||
if (first1.isPresent()){
|
||||
//三联合普通人员
|
||||
viewHandAllotStock.setWarehouseId("01");
|
||||
}
|
||||
Optional<SysRole> first2 = roles.stream().filter(x -> "role3".equals(x.getRoleKey())).findFirst();
|
||||
if (first2.isPresent()){
|
||||
//二联合管理员
|
||||
viewHandAllotStock.setWarehouseId("02");
|
||||
}
|
||||
Optional<SysRole> first3 = roles.stream().filter(x -> "role4".equals(x.getRoleKey())).findFirst();
|
||||
if (first3.isPresent()){
|
||||
//三联合管理员
|
||||
viewHandAllotStock.setWarehouseId("01");
|
||||
}
|
||||
viewHandAllotStock.setModel(Convert.toStr(SecurityUtils.getDeptId()));
|
||||
}
|
||||
return viewHandAllotStockMapper.selectViewHandAllotStockList(viewHandAllotStock);
|
||||
|
||||
@@ -174,6 +174,24 @@ public class ViewInJobFlow extends BaseEntity
|
||||
|
||||
private String departmentId;
|
||||
|
||||
private String dateStart;
|
||||
private String dateEnd;
|
||||
|
||||
public String getDateStart() {
|
||||
return dateStart;
|
||||
}
|
||||
|
||||
public void setDateStart(String dateStart) {
|
||||
this.dateStart = dateStart;
|
||||
}
|
||||
|
||||
public String getDateEnd() {
|
||||
return dateEnd;
|
||||
}
|
||||
|
||||
public void setDateEnd(String dateEnd) {
|
||||
this.dateEnd = dateEnd;
|
||||
}
|
||||
|
||||
public String getDepartmentId() {
|
||||
return departmentId;
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
package com.ruoyi.search.ViewInJobFlow.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -47,6 +51,31 @@ public class ViewInJobFlowServiceImpl implements IViewInJobFlowService
|
||||
{
|
||||
if (!"admin".equals(SecurityUtils.getUsername())){
|
||||
viewInJobFlow.setDepartmentId(SecurityUtils.getDeptId().toString());
|
||||
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
|
||||
if (CollUtil.isEmpty(roles)) {
|
||||
//如果未设置角色 ,直接返回空列表
|
||||
return new ArrayList<>();
|
||||
}
|
||||
Optional<SysRole> first = roles.stream().filter(x -> "role1".equals(x.getRoleKey())).findFirst();
|
||||
if (first.isPresent()){
|
||||
//二联合普通人员
|
||||
viewInJobFlow.setWarehouseId("02");
|
||||
}
|
||||
Optional<SysRole> first1 = roles.stream().filter(x -> "role2".equals(x.getRoleKey())).findFirst();
|
||||
if (first1.isPresent()){
|
||||
//三联合普通人员
|
||||
viewInJobFlow.setWarehouseId("01");
|
||||
}
|
||||
Optional<SysRole> first2 = roles.stream().filter(x -> "role3".equals(x.getRoleKey())).findFirst();
|
||||
if (first2.isPresent()){
|
||||
//二联合管理员
|
||||
viewInJobFlow.setWarehouseId("02");
|
||||
}
|
||||
Optional<SysRole> first3 = roles.stream().filter(x -> "role4".equals(x.getRoleKey())).findFirst();
|
||||
if (first3.isPresent()){
|
||||
//三联合管理员
|
||||
viewInJobFlow.setWarehouseId("01");
|
||||
}
|
||||
}
|
||||
return viewInJobFlowMapper.selectViewInJobFlowList(viewInJobFlow);
|
||||
}
|
||||
|
||||
@@ -167,6 +167,25 @@ public class ViewOutJobFlow extends BaseEntity
|
||||
private String quality;
|
||||
private String departmentId;
|
||||
|
||||
private String dateStart;
|
||||
private String dateEnd;
|
||||
|
||||
public String getDateStart() {
|
||||
return dateStart;
|
||||
}
|
||||
|
||||
public void setDateStart(String dateStart) {
|
||||
this.dateStart = dateStart;
|
||||
}
|
||||
|
||||
public String getDateEnd() {
|
||||
return dateEnd;
|
||||
}
|
||||
|
||||
public void setDateEnd(String dateEnd) {
|
||||
this.dateEnd = dateEnd;
|
||||
}
|
||||
|
||||
public String getDepartmentId() {
|
||||
return departmentId;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
package com.ruoyi.search.ViewOutJobFlow.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -47,6 +51,31 @@ public class ViewOutJobFlowServiceImpl implements IViewOutJobFlowService
|
||||
{
|
||||
if (!"admin".equals(SecurityUtils.getUsername())){
|
||||
viewOutJobFlow.setDepartmentId(SecurityUtils.getDeptId().toString());
|
||||
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
|
||||
if (CollUtil.isEmpty(roles)) {
|
||||
//如果未设置角色 ,直接返回空列表
|
||||
return new ArrayList<>();
|
||||
}
|
||||
Optional<SysRole> first = roles.stream().filter(x -> "role1".equals(x.getRoleKey())).findFirst();
|
||||
if (first.isPresent()){
|
||||
//二联合普通人员
|
||||
viewOutJobFlow.setWarehouseId("02");
|
||||
}
|
||||
Optional<SysRole> first1 = roles.stream().filter(x -> "role2".equals(x.getRoleKey())).findFirst();
|
||||
if (first1.isPresent()){
|
||||
//三联合普通人员
|
||||
viewOutJobFlow.setWarehouseId("01");
|
||||
}
|
||||
Optional<SysRole> first2 = roles.stream().filter(x -> "role3".equals(x.getRoleKey())).findFirst();
|
||||
if (first2.isPresent()){
|
||||
//二联合管理员
|
||||
viewOutJobFlow.setWarehouseId("02");
|
||||
}
|
||||
Optional<SysRole> first3 = roles.stream().filter(x -> "role4".equals(x.getRoleKey())).findFirst();
|
||||
if (first3.isPresent()){
|
||||
//三联合管理员
|
||||
viewOutJobFlow.setWarehouseId("01");
|
||||
}
|
||||
}
|
||||
return viewOutJobFlowMapper.selectViewOutJobFlowList(viewOutJobFlow);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.ruoyi.search.ViewStockDetail.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.search.ViewStockDetail.domain.ViewStockDetail;
|
||||
import com.ruoyi.search.ViewStockDetail.mapper.ViewStockDetailMapper;
|
||||
@@ -8,7 +10,9 @@ import com.ruoyi.search.ViewStockDetail.service.IViewStockDetailService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* 库存明细查询Service业务层处理
|
||||
@@ -46,6 +50,31 @@ public class ViewStockDetailServiceImpl implements IViewStockDetailService
|
||||
{
|
||||
if (!"admin".equals(SecurityUtils.getUsername())){
|
||||
viewStockDetail.setModel(SecurityUtils.getDeptId().toString());
|
||||
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
|
||||
if (CollUtil.isEmpty(roles)) {
|
||||
//如果未设置角色 ,直接返回空列表
|
||||
return new ArrayList<>();
|
||||
}
|
||||
Optional<SysRole> first = roles.stream().filter(x -> "role1".equals(x.getRoleKey())).findFirst();
|
||||
if (first.isPresent()){
|
||||
//二联合普通人员
|
||||
viewStockDetail.setWarehouseId("02");
|
||||
}
|
||||
Optional<SysRole> first1 = roles.stream().filter(x -> "role2".equals(x.getRoleKey())).findFirst();
|
||||
if (first1.isPresent()){
|
||||
//三联合普通人员
|
||||
viewStockDetail.setWarehouseId("01");
|
||||
}
|
||||
Optional<SysRole> first2 = roles.stream().filter(x -> "role3".equals(x.getRoleKey())).findFirst();
|
||||
if (first2.isPresent()){
|
||||
//二联合管理员
|
||||
viewStockDetail.setWarehouseId("02");
|
||||
}
|
||||
Optional<SysRole> first3 = roles.stream().filter(x -> "role4".equals(x.getRoleKey())).findFirst();
|
||||
if (first3.isPresent()){
|
||||
//三联合管理员
|
||||
viewStockDetail.setWarehouseId("01");
|
||||
}
|
||||
}
|
||||
return viewStockDetailMapper.selectViewStockDetailList(viewStockDetail);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.stock.stock.domain.BasStock;
|
||||
import com.ruoyi.stock.stock.domain.BasStockSummary;
|
||||
import com.ruoyi.stock.stock.service.IBasStockService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -40,6 +41,18 @@ public class BasStockController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询库存信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('stock:management:list')")
|
||||
@GetMapping("/selectBasStockSummary")
|
||||
public TableDataInfo selectBasStockSummary(BasStock basStock)
|
||||
{
|
||||
startPage();
|
||||
List<BasStockSummary> list = basStockService.selectBasStockSummary(basStock);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出库存信息列表
|
||||
*/
|
||||
@@ -84,6 +97,16 @@ public class BasStockController extends BaseController
|
||||
{
|
||||
return toAjax(basStockService.updateBasStock(basStock));
|
||||
}
|
||||
/**
|
||||
* 修改库存部门
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('stock:management:edit')")
|
||||
@Log(title = "修改库存部门", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/updateStockDept")
|
||||
public AjaxResult updateBasStockDept(@RequestBody BasStock basStock)
|
||||
{
|
||||
return toAjax(basStockService.updateBasStockDept(basStock));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除库存信息
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.ruoyi.stock.stock.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class BasStockSummary {
|
||||
private String warehouseId;
|
||||
private String warehouseName;
|
||||
private String cargoSpaceId;
|
||||
private String cargoSpaceName;
|
||||
private String trayCode;
|
||||
private String model;
|
||||
private String roadwayId;
|
||||
private String thePlatoon;
|
||||
private String theColumn;
|
||||
private String theFloor;
|
||||
private String theType;
|
||||
private String theTypeName;
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.ruoyi.stock.stock.mapper;
|
||||
|
||||
import com.ruoyi.stock.stock.domain.BasStock;
|
||||
import com.ruoyi.stock.stock.domain.BasStockSummary;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@@ -68,4 +69,8 @@ public interface BasStockMapper
|
||||
int updateStockStatusByTrayCode(@Param("stockStatus") String stockStatus,@Param("trayCode") String trayCode);
|
||||
|
||||
void resetPdRecord();
|
||||
|
||||
List<BasStockSummary> selectBasStockSummary(BasStock basStock);
|
||||
|
||||
int updateBasStockDept(BasStock basStock);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ruoyi.stock.stock.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.stock.stock.domain.BasStock;
|
||||
import com.ruoyi.stock.stock.domain.BasStockSummary;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -81,4 +82,8 @@ public interface IBasStockService
|
||||
List<BasStock> selectKtpStock(BasStock basStock);
|
||||
|
||||
AjaxResult resetPdRecord();
|
||||
|
||||
List<BasStockSummary> selectBasStockSummary(BasStock basStock);
|
||||
|
||||
int updateBasStockDept(BasStock basStock);
|
||||
}
|
||||
|
||||
@@ -1,23 +1,28 @@
|
||||
package com.ruoyi.stock.stock.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.ruoyi.bas.cargoSpace.service.IBasCargoSpaceService;
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.stock.freeze.domain.BasStockFreezeRecord;
|
||||
import com.ruoyi.stock.freeze.service.IBasStockFreezeRecordService;
|
||||
import com.ruoyi.stock.maintain.domain.BasStockMaintainRecord;
|
||||
import com.ruoyi.stock.maintain.service.IBasStockMaintainRecordService;
|
||||
import com.ruoyi.stock.stock.domain.BasStock;
|
||||
import com.ruoyi.stock.stock.domain.BasStockSummary;
|
||||
import com.ruoyi.stock.stock.mapper.BasStockMapper;
|
||||
import com.ruoyi.stock.stock.service.IBasStockService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* 库存信息Service业务层处理
|
||||
@@ -192,6 +197,44 @@ public class BasStockServiceImpl implements IBasStockService
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BasStockSummary> selectBasStockSummary(BasStock basStock) {
|
||||
if (!"admin".equals(SecurityUtils.getUsername())){
|
||||
basStock.setModel(SecurityUtils.getDeptId().toString());
|
||||
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
|
||||
if (CollUtil.isEmpty(roles)) {
|
||||
//如果未设置角色 ,直接返回空列表
|
||||
return new ArrayList<>();
|
||||
}
|
||||
Optional<SysRole> first = roles.stream().filter(x -> "role1".equals(x.getRoleKey())).findFirst();
|
||||
if (first.isPresent()){
|
||||
//二联合普通人员
|
||||
basStock.setWarehouseId("02");
|
||||
}
|
||||
Optional<SysRole> first1 = roles.stream().filter(x -> "role2".equals(x.getRoleKey())).findFirst();
|
||||
if (first1.isPresent()){
|
||||
//三联合普通人员
|
||||
basStock.setWarehouseId("01");
|
||||
}
|
||||
Optional<SysRole> first2 = roles.stream().filter(x -> "role3".equals(x.getRoleKey())).findFirst();
|
||||
if (first2.isPresent()){
|
||||
//二联合管理员
|
||||
basStock.setWarehouseId("02");
|
||||
}
|
||||
Optional<SysRole> first3 = roles.stream().filter(x -> "role4".equals(x.getRoleKey())).findFirst();
|
||||
if (first3.isPresent()){
|
||||
//三联合管理员
|
||||
basStock.setWarehouseId("01");
|
||||
}
|
||||
}
|
||||
return basStockMapper.selectBasStockSummary(basStock);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateBasStockDept(BasStock basStock) {
|
||||
return basStockMapper.updateBasStockDept(basStock);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增库存信息(不记录维护记录)
|
||||
*
|
||||
|
||||
@@ -42,6 +42,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectBasTagVo"/>
|
||||
where tray_code = #{trayCode}
|
||||
</select>
|
||||
<select id="selectTestData" resultType="java.util.Map">
|
||||
select distinct tray_code as trayCode,dept_id as deptId
|
||||
from test_data
|
||||
where tray_code != '1' and dept_id = #{deptId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasTag" parameterType="BasTag" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into bas_tag
|
||||
@@ -66,6 +71,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="insertData">
|
||||
insert into test_data(tray_code) values ('1')
|
||||
</insert>
|
||||
|
||||
<update id="updateBasTag" parameterType="BasTag">
|
||||
update bas_tag
|
||||
|
||||
@@ -112,7 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="taskNo != null and taskNo != ''"> and mj.task_no = #{taskNo}</if>
|
||||
<if test="supplierId != null and supplierId != ''"> and mj.supplier_id = #{supplierId}</if>
|
||||
<if test="customerId != null and customerId != ''"> and mj.customer_id = #{customerId}</if>
|
||||
<if test="departmentId != null and departmentId != ''"> and (mj.department_id = #{departmentId} or mj.department_id is null)</if>
|
||||
<if test="departmentId != null and departmentId != ''"> and (mj.department_id = #{departmentId} or mj.department_id is null or mj.department_id = '')</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and mj.tray_code = #{trayCode}</if>
|
||||
<if test="roadwayId != null and roadwayId != ''"> and mj.roadway_id = #{roadwayId}</if>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and mj.cargo_space_id = #{cargoSpaceId}</if>
|
||||
@@ -130,8 +130,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="classId != null and classId != ''"> and mj.class_id = #{classId}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and mj.warehouse_id = #{warehouseId}</if>
|
||||
<if test="faultFlag != null and faultFlag != ''"> and mj.fault_flag = #{faultFlag}</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='2'.toString "> and mj.in_or_out >=20 and mj.in_or_out not in(25,26)</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='1'.toString "> and mj.in_or_out < 20 and mj.in_or_out not in(5,6)</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='2'.toString "> and mj.in_or_out >=20 </if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='1'.toString "> and mj.in_or_out < 20 </if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='3'.toString "> and mj.in_or_out in (5,6)</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='4'.toString "> and mj.in_or_out in (25,26)</if>
|
||||
<if test = "inOutIds !=null and inOutIds.size() > 0">
|
||||
@@ -140,6 +140,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dateStart != null and dateStart != ''"> and mj.create_time >= #{dateStart}</if>
|
||||
<if test="dateEnd != null and dateEnd != ''"> and mj.create_time <= #{dateEnd}</if>
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
|
||||
@@ -66,7 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="taskNo != null and taskNo != ''"> and mj.task_no = #{taskNo}</if>
|
||||
<if test="supplierId != null and supplierId != ''"> and mj.supplier_id = #{supplierId}</if>
|
||||
<if test="customerId != null and customerId != ''"> and mj.customer_id = #{customerId}</if>
|
||||
<if test="departmentId != null and departmentId != ''"> and (mj.department_id = #{departmentId} or mj.department_id is null)</if>
|
||||
<if test="departmentId != null and departmentId != ''"> and (mj.department_id = #{departmentId} or mj.department_id is null or mj.department_id = '')</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and mj.tray_code = #{trayCode}</if>
|
||||
<if test="roadwayId != null and roadwayId != ''"> and mj.roadway_id = #{roadwayId}</if>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and mj.cargo_space_id = #{cargoSpaceId}</if>
|
||||
@@ -94,11 +94,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dateStart != null and dateStart != ''"> and mj.create_time >= #{dateStart}</if>
|
||||
<if test="dateEnd != null and dateEnd != ''"> and mj.create_time <= #{dateEnd}</if>
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
</where>
|
||||
order by mj.create_time desc
|
||||
order by mj.status desc,mj.priority desc,mj.create_time asc
|
||||
</select>
|
||||
|
||||
<select id="selectMydoJobByJobId" parameterType="String" resultMap="MydoJobResult">
|
||||
|
||||
@@ -84,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="netWeight != null "> and net_weight = #{netWeight}</if>
|
||||
<if test="grossWeight != null "> and gross_weight = #{grossWeight}</if>
|
||||
<if test="distribution != null and distribution != ''"> and distribution = #{distribution}</if>
|
||||
<if test="model != null and model != ''"> and (model = #{model} or model is null)</if>
|
||||
<if test="model != null and model != ''"> and (model = #{model} or model is null or model = '')</if>
|
||||
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
|
||||
<if test="spare7 != null and spare7 != ''"> and spare7 = #{spare7}</if>
|
||||
<if test="spare8 != null and spare8 != ''"> and spare8 = #{spare8}</if>
|
||||
|
||||
@@ -60,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="taskNo != null and taskNo != ''"> and task_no = #{taskNo}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="inOrOut != null "> and in_or_out = #{inOrOut}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code like concat('%',#{trayCode}, '%')</if>
|
||||
<if test="startTime != null and startTime != ''"> and start_time = #{startTime}</if>
|
||||
<if test="finishTime != null and finishTime != ''"> and finish_time = #{finishTime}</if>
|
||||
<if test="entranceId != null and entranceId != ''"> and entrance_id = #{entranceId}</if>
|
||||
@@ -93,10 +93,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="cases != null and cases != ''"> and cases = #{cases}</if>
|
||||
<if test="quality != null and quality != ''"> and quality = #{quality}</if>
|
||||
<if test="managementNo != null and managementNo != ''"> and managementNo = #{managementNo}</if>
|
||||
<if test="departmentId != null and departmentId != ''"> and (department_id = #{departmentId} or department_id is null)</if>
|
||||
<if test="departmentId != null and departmentId != ''"> and (department_id = #{departmentId} or department_id is null or department_id = '')</if>
|
||||
<if test="dateStart != null and dateStart != ''"> and create_time >= #{dateStart}</if>
|
||||
<if test="dateEnd != null and dateEnd != ''"> and create_time <= #{dateEnd}</if>
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
order by create_time asc
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="taskNo != null and taskNo != ''"> and task_no = #{taskNo}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="inOrOut != null "> and in_or_out = #{inOrOut}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code like concat('%', #{trayCode}, '%')</if>
|
||||
<if test="startTime != null and startTime != ''"> and start_time = #{startTime}</if>
|
||||
<if test="finishTime != null and finishTime != ''"> and finish_time = #{finishTime}</if>
|
||||
<if test="exitId != null and exitId != ''"> and exit_id = #{exitId}</if>
|
||||
@@ -93,11 +93,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="cases != null and cases != ''"> and cases = #{cases}</if>
|
||||
<if test="quality != null and quality != ''"> and quality = #{quality}</if>
|
||||
<if test="managementNo != null and managementNo != ''"> and managementNo = #{managementNo}</if>
|
||||
<if test="departmentId != null and departmentId != ''"> and (department_id = #{departmentId} or department_id is null)</if>
|
||||
<if test="departmentId != null and departmentId != ''"> and (department_id = #{departmentId} or department_id is null or department_id = '')</if>
|
||||
<if test="dateStart != null and dateStart != ''"> and create_time >= #{dateStart}</if>
|
||||
<if test="dateEnd != null and dateEnd != ''"> and create_time <= #{dateEnd}</if>
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time asc
|
||||
</select>
|
||||
|
||||
<select id="selectViewOutJobFlowByJobDetailId" parameterType="String" resultMap="ViewOutJobFlowResult">
|
||||
|
||||
@@ -88,7 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectViewStockDetailVo"/>
|
||||
<where>
|
||||
<if test="stockId != null and stockId != ''"> and bs.stock_id = #{stockId}</if>
|
||||
<if test="model != null and model != ''"> and (bs.model = #{model} or bs.model is null)</if>
|
||||
<if test="model != null and model != ''"> and (bs.model = #{model} or bs.model is null or bs.model = '')</if>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and bs.cargo_space_id = #{cargoSpaceId}</if>
|
||||
<if test="stockStatus != null and stockStatus != ''"> and bs.stock_status = #{stockStatus}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and bs.lot_no = #{lotNo}</if>
|
||||
@@ -96,7 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="backDate != null and backDate != ''"> and bs.back_date = #{backDate}</if>
|
||||
<if test="productName != null and productName != ''"> and bs.product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="quantity != null and quantity != ''"> and bs.quantity = #{quantity}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and bs.tray_code = #{trayCode}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and bs.tray_code like concat('%', #{trayCode},'%')</if>
|
||||
<if test="outQuantity != null and outQuantity != ''"> and bs.out_quantity = #{outQuantity}</if>
|
||||
<if test="stockinId != null and stockinId != ''"> and bs.stockin_id = #{stockinId}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and bs.warehouse_id = #{warehouseId}</if>
|
||||
|
||||
@@ -303,6 +303,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<update id="resetPdRecord">
|
||||
update bas_stock set spare7 = '0'
|
||||
</update>
|
||||
<update id="updateBasStockDept">
|
||||
update bas_stock
|
||||
set model = #{model}
|
||||
where warehouse_id = #{warehouseId} and tray_code = #{trayCode}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasStockByStockId" parameterType="String">
|
||||
delete from bas_stock where stock_id = #{stockId}
|
||||
@@ -326,4 +331,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
order by b.the_platoon,b.the_floor,b.the_column asc
|
||||
</select>
|
||||
<select id="selectBasStockSummary" resultType="com.ruoyi.stock.stock.domain.BasStockSummary">
|
||||
select DISTINCT bs.warehouse_id as warehouseId,
|
||||
bw.warehouse_name as warehouseName,
|
||||
bs.cargo_space_id as cargoSpaceId,
|
||||
bcs.cargo_space_name as cargoSpaceName,
|
||||
bs.tray_code as trayCode,
|
||||
bs.model as model,
|
||||
bcs.roadway_id as roadwayId,
|
||||
bcs.the_platoon as thePlatoon,
|
||||
bcs.the_column as theColumn,
|
||||
bcs.the_floor as theFloor,
|
||||
bcs.the_type as theType,
|
||||
bcs.the_type_name as theTypeName
|
||||
from bas_stock bs
|
||||
left join bas_cargo_space bcs on bs.cargo_space_id = bcs.cargo_space_id and bs.tray_code = bcs.tray_code
|
||||
left join bas_warehouse bw on bcs.warehouse_id = bw.warehouse_id
|
||||
WHERE bcs.status = '2'
|
||||
<if test="model != null and model != ''">
|
||||
and (bs.model = #{model} or bs.model is null or bs.model = '')
|
||||
</if>
|
||||
<if test="warehouseId != null and warehouseId != ''">
|
||||
and bs.warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
<if test="trayCode != null and trayCode != ''">
|
||||
and bs.tray_code like concat('%',#{trayCode},'%');
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -45,3 +45,11 @@ export function pointOut(stockIds,exitId) {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function updateOutJobPriority(data) {
|
||||
return request({
|
||||
url: '/job/outmydoJob/updatePriority',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -16,6 +16,13 @@ export function stockManagementList(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function stockSummaryManagementList(query) {
|
||||
return request({
|
||||
url: '/stock/management/selectBasStockSummary',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询库存信息详细
|
||||
export function getManagement(stockId) {
|
||||
@@ -51,6 +58,13 @@ export function updateManagement(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function updateStockDept(data) {
|
||||
return request({
|
||||
url: '/stock/management/updateStockDept',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除库存信息
|
||||
export function delManagement(stockId) {
|
||||
|
||||
@@ -28,37 +28,37 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="开始时间" prop="startTime">
|
||||
<el-form-item label="起始时间" prop="dateStart">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.startTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择开始时间">
|
||||
v-model="queryParams.dateStart"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择起始时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束时间" prop="finishTime">
|
||||
<el-form-item label="结束日期" prop="dateEnd">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.finishTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择结束时间">
|
||||
v-model="queryParams.dateEnd"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库" prop="warehouseId"><!--仓库-->
|
||||
<el-select
|
||||
v-model="queryParams.warehouseId"
|
||||
placeholder="请选择仓库"
|
||||
clearable
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in warehouseOptions"
|
||||
:key="item.warehouseId"
|
||||
:label="item.warehouseName"
|
||||
:value="item.warehouseId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="仓库" prop="warehouseId"><!–仓库–>-->
|
||||
<!-- <el-select-->
|
||||
<!-- v-model="queryParams.warehouseId"-->
|
||||
<!-- placeholder="请选择仓库"-->
|
||||
<!-- clearable-->
|
||||
<!-- @change="handleQuery"-->
|
||||
<!-- >-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in warehouseOptions"-->
|
||||
<!-- :key="item.warehouseId"-->
|
||||
<!-- :label="item.warehouseName"-->
|
||||
<!-- :value="item.warehouseId"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
@@ -244,7 +244,9 @@ export default {
|
||||
classId: null,
|
||||
warehouseId: null,
|
||||
faultFlag: null,
|
||||
inOut:"1"
|
||||
inOut:"1",
|
||||
dateStart:null,
|
||||
dateEnd:null,
|
||||
},
|
||||
queryDetailParams:{
|
||||
pageNum: 1,
|
||||
@@ -263,7 +265,7 @@ export default {
|
||||
created() {
|
||||
// 获取字典数据后,设置默认值
|
||||
this.getList()
|
||||
this.getWarehouseList()
|
||||
//this.getWarehouseList()
|
||||
},
|
||||
methods: {
|
||||
/** 获取仓库列表 */
|
||||
|
||||
@@ -41,21 +41,20 @@
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<el-form-item label="开始时间" prop="startTime"> <!-- 开始时间 -->
|
||||
<el-form-item label="起始时间" prop="dateStart">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.startTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择开始时间">
|
||||
v-model="queryParams.dateStart"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择起始时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="结束时间" prop="finishTime"> <!-- 结束时间 -->
|
||||
<el-form-item label="结束日期" prop="dateEnd">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.finishTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择结束时间">
|
||||
v-model="queryParams.dateEnd"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
@@ -101,12 +100,23 @@
|
||||
v-hasPermi="['job:outmydoJob:OuthandInvalidation']"
|
||||
>手动作废</el-button> <!-- 手动作废 -->
|
||||
</el-col>
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
@click="openPriorityDialog"
|
||||
>修改优先级</el-button>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="mydoJobList" @selection-change="handleSelectionChange" @row-click="handleRowClick" highlight-current-row :current-row="currentRow" max-height="400">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="任务ID" align="left" prop="jobId" /> <!-- 任务ID -->
|
||||
<el-table-column label="任务ID" align="left" prop="jobId" width="160"/> <!-- 任务ID -->
|
||||
<el-table-column label="任务状态" align="left" prop="status"> <!-- 任务状态 -->
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.mydo_job_status" :value="scope.row.status"/>
|
||||
@@ -125,10 +135,10 @@
|
||||
<el-table-column label="任务号" align="left" prop="taskNo" /> <!-- 任务号 -->
|
||||
<!-- <el-table-column :label="$t('outJobManagement.customerId')" align="left" prop="customerId" /> <!– 客户ID –>-->
|
||||
<el-table-column label="托盘码" align="left" prop="trayCode" /> <!-- 托盘码 -->
|
||||
<!-- <el-table-column :label="$t('outJobManagement.roadwayId')" align="left" prop="roadwayId" /> <!– 巷道ID –>-->
|
||||
<el-table-column label="巷道" align="left" prop="roadwayId" /> <!-- 巷道ID -->
|
||||
<el-table-column label="货位" align="left" prop="cargoSpaceName" /> <!-- 货位ID -->
|
||||
<!-- <el-table-column label="订单号" align="left" prop="lineId" /> <!– 结束时间 –>-->
|
||||
<!-- <el-table-column label="优先级" align="left" prop="priority" /> <!– 优先级 –>-->
|
||||
<el-table-column label="优先级" align="left" prop="priority" /> <!-- 优先级 -->
|
||||
<!-- <el-table-column label="执行阶段" align="left" prop="executionPhase"> <!– 执行阶段 –>-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.execution_phase_type" :value="scope.row.executionPhase"/>-->
|
||||
@@ -136,10 +146,14 @@
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<el-table-column label="仓库" align="left" prop="warehouseName" />
|
||||
<el-table-column label="出口" align="left" prop="exitId"/> <!-- 出口ID -->
|
||||
<el-table-column label="创建时间" align="left" prop="createTime" width="180"/> <!-- 创建时间 -->
|
||||
<el-table-column label="开始时间" align="left" prop="startTime" width="180"/> <!-- 开始时间 -->
|
||||
<el-table-column label="结束时间" align="left" prop="finishTime" width="180"/> <!-- 结束时间 -->
|
||||
<el-table-column label="出口" align="left" prop="exitId">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.exit_type" :value="scope.row.exitId"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="left" prop="createTime" width="160"/> <!-- 创建时间 -->
|
||||
<el-table-column label="开始时间" align="left" prop="startTime" width="160"/> <!-- 开始时间 -->
|
||||
<el-table-column label="结束时间" align="left" prop="finishTime" width="160"/> <!-- 结束时间 -->
|
||||
<!-- <el-table-column :label="$t('outJobManagement.warehouseId')" align="left" prop="warehouseId" /> <!– 仓库ID –>-->
|
||||
<!-- <el-table-column label="仓库ID" align="left" prop="warehouseName" /> <!– 仓库ID –>-->
|
||||
</el-table>
|
||||
@@ -203,17 +217,32 @@
|
||||
:limit.sync="queryDetailParams.pageSize"
|
||||
@pagination="getDetailList"
|
||||
/>
|
||||
|
||||
<el-dialog title="修改优先级" :visible.sync="priorityDialogVisible" width="400px" append-to-body>
|
||||
<el-form ref="priorityFormRef" :model="priorityForm" :rules="priorityRules" label-width="100px">
|
||||
<el-form-item label="优先级" prop="priority">
|
||||
<el-input-number v-model="priorityForm.priority" :min="1" :max="9999" :step="1" controls-position="right" />
|
||||
<el-tooltip content="数字越大,优先级越高" placement="top" effect="light">
|
||||
<i class="el-icon-question" style="margin-left: 10px; color: #909399;"></i>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitPriority">确 定</el-button>
|
||||
<el-button @click="cancelPriority">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listMydoJobOut,handFinish,hangInvalidJob } from "@/api/job/OutmydoJob"
|
||||
import { listMydoJobOut,handFinish,hangInvalidJob,updateOutJobPriority } from "@/api/job/OutmydoJob"
|
||||
import { listMydoJobDetail } from "@/api/job/mydoJobDetail"
|
||||
import {listWarehouse} from "@/api/bas/warehouse";
|
||||
|
||||
export default {
|
||||
name: "MydoJob",
|
||||
dicts: ['execution_phase_type', 'in_job_type', 'on_line_type', 'mydo_job_status','out_job_type','product_type','origin_type','account_type','turnover_type','purpose_type','quality_type'],
|
||||
dicts: ['execution_phase_type', 'in_job_type', 'on_line_type', 'mydo_job_status','out_job_type','exit_type'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
@@ -271,6 +300,8 @@ export default {
|
||||
classId: null,
|
||||
warehouseId: null,
|
||||
faultFlag: null,
|
||||
dateStart: null,
|
||||
dateEnd: null,
|
||||
inOut:'2'
|
||||
},
|
||||
queryDetailParams:{
|
||||
@@ -291,6 +322,15 @@ export default {
|
||||
taskNo: [
|
||||
{ required: true, message: "任务号不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
priorityDialogVisible: false,
|
||||
priorityForm: {
|
||||
priority: null
|
||||
},
|
||||
priorityRules: {
|
||||
priority: [
|
||||
{ required: true, message: "请输入优先级", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -453,6 +493,37 @@ export default {
|
||||
this.$modal.msgSuccess("手动作废成功");
|
||||
this.getList();
|
||||
}).catch(() => {});
|
||||
},
|
||||
openPriorityDialog() {
|
||||
if (this.ids.length === 0) {
|
||||
this.$modal.msgError("请选择需要修改优先级的任务");
|
||||
return;
|
||||
}
|
||||
if (this.ids.length > 1){
|
||||
this.$modal.msgError("只能选择一个任务");
|
||||
return;
|
||||
}
|
||||
const current = this.mydoJobList.find(item => item.jobId === this.ids[0])
|
||||
this.priorityForm.priority = current ? current.priority : null
|
||||
this.priorityDialogVisible = true
|
||||
},
|
||||
submitPriority() {
|
||||
this.$refs["priorityFormRef"].validate(valid => {
|
||||
if (!valid) return
|
||||
const data = {
|
||||
jobId: this.ids[0],
|
||||
priority: this.priorityForm.priority
|
||||
}
|
||||
updateOutJobPriority(data).then(() => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.priorityDialogVisible = false
|
||||
this.getList()
|
||||
})
|
||||
})
|
||||
},
|
||||
cancelPriority() {
|
||||
this.priorityDialogVisible = false
|
||||
this.priorityForm.priority = null
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
<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="子任务编码" prop="jobDetailId">
|
||||
<el-input
|
||||
v-model="queryParams.jobDetailId"
|
||||
placeholder="请输入子任务编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="任务编码" prop="jobId">
|
||||
<el-input
|
||||
v-model="queryParams.jobId"
|
||||
@@ -66,291 +58,22 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!--
|
||||
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.mydo_job_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-form-item label="起始时间" prop="dateStart">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.dateStart"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择起始时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务类型" prop="inOrOut">
|
||||
<el-input
|
||||
v-model="queryParams.inOrOut"
|
||||
placeholder="请输入任务类型"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-form-item label="结束日期" prop="dateEnd">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.dateEnd"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="开始时间" prop="startTime">
|
||||
<el-input
|
||||
v-model="queryParams.startTime"
|
||||
placeholder="请输入开始时间"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束时间" prop="finishTime">
|
||||
<el-input
|
||||
v-model="queryParams.finishTime"
|
||||
placeholder="请输入结束时间"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入口" prop="entranceId">
|
||||
<el-input
|
||||
v-model="queryParams.entranceId"
|
||||
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="物料编码" prop="productId">
|
||||
<el-input
|
||||
v-model="queryParams.productId"
|
||||
placeholder="请输入物料编码"
|
||||
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="parentId">
|
||||
<el-input
|
||||
v-model="queryParams.parentId"
|
||||
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 label="图号" prop="cargoNo">
|
||||
<el-input
|
||||
v-model="queryParams.cargoNo"
|
||||
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="spec">
|
||||
<el-input
|
||||
v-model="queryParams.spec"
|
||||
placeholder="请输入规格"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料类型" prop="productType">
|
||||
<el-select v-model="queryParams.productType" placeholder="请选择物料类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.product_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否系统项" prop="systemItem">
|
||||
<el-select v-model="queryParams.systemItem" placeholder="请选择是否系统项" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_yes_no"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="productCtm">
|
||||
<el-input
|
||||
v-model="queryParams.productCtm"
|
||||
placeholder="请输入创建时间"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="productCtu">
|
||||
<el-input
|
||||
v-model="queryParams.productCtu"
|
||||
placeholder="请输入创建人"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="库存上限" prop="upperNum">
|
||||
<el-input
|
||||
v-model="queryParams.upperNum"
|
||||
placeholder="请输入库存上限"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="库存下限" prop="limitNum">
|
||||
<el-input
|
||||
v-model="queryParams.limitNum"
|
||||
placeholder="请输入库存下限"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用" prop="enableFlag">
|
||||
<el-select v-model="queryParams.enableFlag" placeholder="请选择是否启用" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</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="入库单" prop="inOrOutId">
|
||||
<el-input
|
||||
v-model="queryParams.inOrOutId"
|
||||
placeholder="请输入入库单"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入库子单" prop="inOrOutDId">
|
||||
<el-input
|
||||
v-model="queryParams.inOrOutDId"
|
||||
placeholder="请输入入库子单"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入库金额" prop="priceTotal">
|
||||
<el-input
|
||||
v-model="queryParams.priceTotal"
|
||||
placeholder="请输入入库金额"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="来源" prop="origin">
|
||||
<el-select v-model="queryParams.origin" placeholder="请选择来源" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.origin_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="周转类型" prop="turnovertype">
|
||||
<el-select v-model="queryParams.turnovertype" placeholder="请选择周转类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.turnover_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="套账" prop="account">
|
||||
<el-select v-model="queryParams.account" placeholder="请选择套账" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.account_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="用途" prop="purpose">
|
||||
<el-select v-model="queryParams.purpose" placeholder="请选择用途" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.purpose_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="台次" prop="units">
|
||||
<el-input
|
||||
v-model="queryParams.units"
|
||||
placeholder="请输入台次"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同号" prop="contract">
|
||||
<el-input
|
||||
v-model="queryParams.contract"
|
||||
placeholder="请输入合同号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="件次" prop="cases">
|
||||
<el-input
|
||||
v-model="queryParams.cases"
|
||||
placeholder="请输入件次"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="质量" prop="quality">
|
||||
<el-select v-model="queryParams.quality" placeholder="请选择质量" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.quality_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="管理号" prop="managementNo">
|
||||
<el-input
|
||||
v-model="queryParams.managementNo"
|
||||
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>
|
||||
@@ -358,38 +81,6 @@
|
||||
</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:ViewInJobFlow: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:ViewInJobFlow: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:ViewInJobFlow:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
@@ -415,7 +106,7 @@
|
||||
<dict-tag :options="dict.type.mydo_job_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务类型" align="center" prop="inOrOut">
|
||||
<el-table-column label="任务类型" align="center" prop="inOrOut" width="120">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.in_job_type" :value="scope.row.inOrOut"/>
|
||||
</template>
|
||||
@@ -429,6 +120,7 @@
|
||||
<el-table-column label="物料名称" align="center" prop="productName" width="160"/>
|
||||
<el-table-column label="规格" align="center" prop="spec" width="160"/>
|
||||
<el-table-column label="入库数量" align="center" prop="inQuantity" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="160"/>
|
||||
<el-table-column label="开始时间" align="center" prop="startTime" width="160"/>
|
||||
<el-table-column label="结束时间" align="center" prop="finishTime" width="160"/>
|
||||
|
||||
@@ -698,7 +390,9 @@ export default {
|
||||
contract: null,
|
||||
cases: null,
|
||||
quality: null,
|
||||
managementNo: null
|
||||
managementNo: null,
|
||||
dateStart:null,
|
||||
dateEnd:null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
||||
@@ -65,6 +65,22 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="起始时间" prop="dateStart">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.dateStart"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择起始时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束日期" prop="dateEnd">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.dateEnd"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择结束日期">
|
||||
</el-date-picker>
|
||||
</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>
|
||||
@@ -72,38 +88,6 @@
|
||||
</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:ViewOutJobFlow: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:ViewOutJobFlow: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:ViewOutJobFlow:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
@@ -136,7 +120,11 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="托盘码" align="center" prop="trayCode" width="160"/>
|
||||
<el-table-column label="出口" align="center" prop="exitId" />
|
||||
<el-table-column label="出口" align="center" prop="exitId">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.exit_type" :value="scope.row.exitId"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同号" align="center" prop="contract" />
|
||||
<el-table-column label="产品号" align="center" prop="cases" />
|
||||
<el-table-column label="代号" align="center" prop="managementNo" />
|
||||
@@ -145,6 +133,7 @@
|
||||
<el-table-column label="物料名称" align="center" prop="productName" width="160"/>
|
||||
<el-table-column label="规格" align="center" prop="spec" width="160"/>
|
||||
<el-table-column label="出库数量" align="center" prop="outQuantity" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="160"/>
|
||||
<el-table-column label="开始时间" align="center" prop="startTime" width="160"/>
|
||||
<el-table-column label="结束时间" align="center" prop="finishTime" width="160"/>
|
||||
</el-table>
|
||||
@@ -344,11 +333,17 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listViewOutJobFlow, getViewOutJobFlow, delViewOutJobFlow, addViewOutJobFlow, updateViewOutJobFlow } from "@/api/search/ViewOutJobFlow"
|
||||
import {
|
||||
addViewOutJobFlow,
|
||||
delViewOutJobFlow,
|
||||
getViewOutJobFlow,
|
||||
listViewOutJobFlow,
|
||||
updateViewOutJobFlow
|
||||
} from "@/api/search/ViewOutJobFlow"
|
||||
|
||||
export default {
|
||||
name: "ViewOutJobFlow",
|
||||
dicts: ['product_type', 'turnover_type', 'quality_type', 'purpose_type', 'sys_job_status', 'product_status', 'sys_yes_no', 'account_type', 'out_job_type'],
|
||||
dicts: ['product_type', 'turnover_type', 'exit_type', 'quality_type', 'purpose_type', 'sys_job_status', 'product_status', 'sys_yes_no', 'account_type', 'out_job_type'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
@@ -410,7 +405,9 @@ export default {
|
||||
contract: null,
|
||||
cases: null,
|
||||
quality: null,
|
||||
managementNo: null
|
||||
managementNo: null,
|
||||
dateStart: null,
|
||||
dateEnd: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<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="仓库" prop="warehouseId"><!--仓库-->
|
||||
<!-- <el-form-item label="仓库" prop="warehouseId"><!–仓库–>
|
||||
<el-select
|
||||
v-model="queryParams.warehouseId"
|
||||
placeholder="请选择仓库"
|
||||
@@ -15,9 +15,9 @@
|
||||
:value="item.warehouseId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form-item>-->
|
||||
|
||||
<el-form-item label="巷道" prop="roadwayId">
|
||||
<!-- <el-form-item label="巷道" prop="roadwayId">
|
||||
<el-input
|
||||
v-model="queryParams.roadwayId"
|
||||
placeholder="请输入巷道"
|
||||
@@ -48,7 +48,7 @@
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form-item>-->
|
||||
|
||||
<el-form-item label="合同号" prop="orderId">
|
||||
<el-input
|
||||
|
||||
@@ -57,58 +57,6 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<!-- <el-form-item label="常用编码" prop="parentId">
|
||||
<el-input
|
||||
v-model="queryParams.parentId"
|
||||
placeholder="请输入常用编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应代号" prop="supplierId">
|
||||
<el-input
|
||||
v-model="queryParams.supplierId"
|
||||
placeholder="请输入供应商代号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应名称" prop="supplierName">
|
||||
<el-input
|
||||
v-model="queryParams.supplierName"
|
||||
placeholder="请输入供应商名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<!-- <el-form-item label="物料编码" prop="productId">
|
||||
<el-input
|
||||
v-model="queryParams.productId"
|
||||
placeholder="请输入物料编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
|
||||
|
||||
<!-- <el-form-item label="入库单号" prop="stockinId">
|
||||
<el-input
|
||||
v-model="queryParams.stockinId"
|
||||
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 label="合同号" prop="orderId">
|
||||
<el-input
|
||||
v-model="queryParams.orderId"
|
||||
@@ -156,7 +104,61 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="managementList"
|
||||
@row-click="handleMasterRowClick"
|
||||
highlight-current-row
|
||||
max-height="650"
|
||||
>
|
||||
<el-table-column label="仓库名称" align="center" prop="warehouseName"/>
|
||||
<!-- <el-table-column label="库存编码" align="center" prop="stockId" width="160"/>-->
|
||||
<el-table-column label="库位" align="center" prop="cargoSpaceId" />
|
||||
<el-table-column label="托盘" align="center" prop="trayCode"/>
|
||||
<el-table-column label="巷道" align="center" prop="roadwayId"/>
|
||||
<el-table-column label="排" align="center" prop="thePlatoon"/>
|
||||
<el-table-column label="列" align="center" prop="theColumn"/>
|
||||
<el-table-column label="层" align="center" prop="theFloor"/>
|
||||
<el-table-column label="重量" align="center" prop="theType"/>
|
||||
<el-table-column label="部门" align="center" prop="model">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="getDeptDictOptions(scope.row)" :value="scope.row.model"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width=120 label="操作" align="center" class-name="small-padding fixed-width"> <!-- 操作 -->
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdateDept(scope.row)"
|
||||
v-hasPermi="['stock:management:edit']"
|
||||
>转运部门</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-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="['system:stock:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
@@ -179,30 +181,12 @@
|
||||
v-hasPermi="['stock:management: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="['stock:management:export']"
|
||||
>导出 <!-- 导出 --></el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="managementList" @selection-change="handleSelectionChange" max-height="650">
|
||||
<el-table v-loading="detailLoading" :data="detailList" @selection-change="handleSelectionChange" max-height="650">
|
||||
<el-table-column type="selection" align="center" />
|
||||
<el-table-column label="仓库名称" align="center" prop="warehouseName"/>
|
||||
<el-table-column label="库存编码" align="center" prop="stockId" width="160"/>
|
||||
|
||||
<!-- <el-table-column label="套账" align="center" prop="spare3">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.account_type" :value="scope.row.spare3"/>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<!-- <el-table-column label="仓库编码" align="center" prop="warehouseId"/>-->
|
||||
<el-table-column label="库位" align="center" prop="cargoSpaceId" width="160"/>
|
||||
<el-table-column label="托盘" align="center" prop="trayCode" width="160"/>
|
||||
<el-table-column label="合同号" align="center" prop="orderId"/>
|
||||
@@ -218,25 +202,6 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" prop="quantity"/>
|
||||
<!-- <el-table-column label="单价" align="center" prop="price"/>-->
|
||||
<!-- <el-table-column label="金额" align="center" prop="spare6"/>-->
|
||||
<!-- <el-table-column label="产品状态" align="center" prop="productType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.product_type" :value="scope.row.productType"/>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<!-- <el-table-column label="单位" align="center" prop="unit"/>-->
|
||||
<!-- <el-table-column label="图号" align="center" prop="cargoNo"/>-->
|
||||
|
||||
<!-- <el-table-column label="质量" align="center" prop="spare8">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.quality_type" :value="scope.row.spare8"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="常用编码" align="center" prop="parentId"/>-->
|
||||
<!-- -->
|
||||
<!-- <el-table-column label="供应商编码" align="center" prop="supplierId" width="160"/>-->
|
||||
<!-- <el-table-column label="供应商名称" align="center" prop="supplierName" width="160"/>-->
|
||||
<el-table-column label="重量" align="center" prop="netWeight" width="160"/>
|
||||
<el-table-column label="入库单号" align="center" prop="stockinId" width="160"/>
|
||||
<el-table-column label="首次入库时间" align="center" prop="inDate" width="160"/>
|
||||
@@ -248,16 +213,6 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="盘点时间" align="center" prop="backDate" width="160"/>
|
||||
<el-table-column label="备注" align="center" prop="remark"/>
|
||||
<!-- <el-table-column label="来源" align="center" prop="spare4">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.origin_type" :value="scope.row.spare4"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="用途" align="center" prop="spare1">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.purpose_type" :value="scope.row.spare1"/>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column width=120 label="操作" align="center" class-name="small-padding fixed-width"> <!-- 操作 -->
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@@ -279,22 +234,33 @@
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
v-show="detailTotal>0"
|
||||
:total="detailTotal"
|
||||
:page.sync="detailQueryParams.pageNum"
|
||||
:limit.sync="detailQueryParams.pageSize"
|
||||
@pagination="getDetailList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改库存信息对话框 -->
|
||||
<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="stockId"> <!– 库存id –>-->
|
||||
<!-- <el-input v-model="form.stockId" placeholder="请输入库存ID" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="货位ID" prop="cargoSpaceId"> <!– 货位id –>-->
|
||||
<!-- <el-input v-model="form.cargoSpaceId" placeholder="请输入货位ID" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
<div v-if="currentMasterRow" class="master-info">
|
||||
<div class="master-info-title">主表信息</div>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<span class="master-info-label">仓库:</span>
|
||||
<span>{{ currentMasterRow.warehouseName }}</span>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<span class="master-info-label">库位:</span>
|
||||
<span>{{ currentMasterRow.cargoSpaceId }}</span>
|
||||
</el-col>
|
||||
<el-col :span="12" style="margin-top: 4px">
|
||||
<span class="master-info-label">托盘:</span>
|
||||
<span>{{ currentMasterRow.trayCode }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="90px">
|
||||
|
||||
<el-form-item label="物料" prop="productId"> <!-- 物料 -->
|
||||
<el-input
|
||||
@@ -346,6 +312,32 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="titleDept" :visible.sync="openDept" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="deptForm" label-width="80px">
|
||||
<el-form-item label="托盘条码" prop="trayCode">
|
||||
<el-input v-model="deptForm.trayCode" placeholder="请输入托盘条码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="部门" prop="model">
|
||||
<el-select v-model="deptForm.model" placeholder="请选择部门">
|
||||
<el-option
|
||||
v-for="dict in getDeptDictOptions(deptForm)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitFormDept">确定 <!-- 确定 --></el-button>
|
||||
<el-button @click="cancelDept">取消 <!-- 取消 --></el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 物料选择对话框 -->
|
||||
<el-dialog title="选择物料" :visible.sync="productSelectVisible" width="800px" append-to-body>
|
||||
<el-form :model="productQueryParams" ref="productQueryForm" size="small" :inline="true" label-width="68px">
|
||||
@@ -469,14 +461,21 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addManagement, delManagement, getManagement, stockManagementList, updateManagement} from "@/api/stock/management"
|
||||
import {
|
||||
addManagement,
|
||||
delManagement,
|
||||
getManagement,
|
||||
stockManagementList,
|
||||
stockSummaryManagementList,
|
||||
updateManagement, updateStockDept
|
||||
} from "@/api/stock/management"
|
||||
import {listWarehouse} from "@/api/bas/warehouse"
|
||||
import {listBasProduct} from "@/api/bas/BasProduct"
|
||||
import {listCargoSpace} from "@/api/bas/cargoSpace"
|
||||
|
||||
export default {
|
||||
name: "Management",
|
||||
dicts: ['product_status','check_flag', 'stock_status','cargo_space_status','cargo_space_lock_status','product_type','origin_type','account_type','turnover_type','purpose_type','quality_type'],
|
||||
dicts: ['product_status','check_flag', 'stock_status','cargo_space_status','cargo_space_lock_status','product_type','origin_type','account_type','turnover_type','purpose_type','quality_type','sl_dept','el_dept'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
@@ -491,14 +490,21 @@ export default {
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 子表总条数
|
||||
detailTotal: 0,
|
||||
// 库存信息表格数据
|
||||
managementList: [],
|
||||
// 库存信息子表数据
|
||||
detailList: [],
|
||||
currentMasterRow: null,
|
||||
// 仓库选项
|
||||
warehouseOptions: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
titleDept: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
openDept:false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
@@ -531,12 +537,21 @@ export default {
|
||||
theFloor: null,
|
||||
cargoSpaceStockStatus:2
|
||||
},
|
||||
// 子表查询参数
|
||||
detailQueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
trayCode: null,
|
||||
warehouseId: null
|
||||
},
|
||||
queryWarehouse: {
|
||||
pageNum:1,
|
||||
pageSize: 99
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
//部门转运表单
|
||||
deptForm:{},
|
||||
// 表单校验
|
||||
rules: {
|
||||
/*stockId: [
|
||||
@@ -567,7 +582,9 @@ export default {
|
||||
cargoSpaceName: null,
|
||||
warehouseId: null
|
||||
},
|
||||
selectedCargoSpace: null
|
||||
selectedCargoSpace: null,
|
||||
// 子表加载状态
|
||||
detailLoading: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -575,6 +592,16 @@ export default {
|
||||
this.getWarehouseList();
|
||||
},
|
||||
methods: {
|
||||
getDeptDictOptions(row) {
|
||||
const wid = String(row && row.warehouseId != null ? row.warehouseId : "").padStart(2, "0")
|
||||
if (wid === "01") {
|
||||
return this.dict.type.sl_dept || []
|
||||
}
|
||||
if (wid === "02") {
|
||||
return this.dict.type.el_dept || []
|
||||
}
|
||||
return this.dict.type.sl_dept || []
|
||||
},
|
||||
/** 获取仓库列表 */
|
||||
getWarehouseList() {
|
||||
listWarehouse(this.queryWarehouse).then(response => {
|
||||
@@ -584,10 +611,16 @@ export default {
|
||||
/** 查询库存信息列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
stockManagementList(this.queryParams).then(response => {
|
||||
stockSummaryManagementList(this.queryParams).then(response => {
|
||||
this.managementList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
if (this.managementList && this.managementList.length > 0) {
|
||||
this.handleMasterRowClick(this.managementList[0])
|
||||
} else {
|
||||
this.detailList = []
|
||||
this.detailTotal = 0
|
||||
}
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
@@ -595,6 +628,10 @@ export default {
|
||||
this.open = false
|
||||
this.reset()
|
||||
},
|
||||
cancelDept() {
|
||||
this.openDept = false
|
||||
this.reset()
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
@@ -626,6 +663,11 @@ export default {
|
||||
spare5: null,
|
||||
spare6: null
|
||||
}
|
||||
this.deptForm = {
|
||||
trayCode: null,
|
||||
warehouseId: null,
|
||||
model:null
|
||||
}
|
||||
this.resetForm("form")
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@@ -646,9 +688,45 @@ export default {
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 主表行点击,联动查询子表 */
|
||||
handleMasterRowClick(row) {
|
||||
if (!row) {
|
||||
this.detailList = []
|
||||
this.detailTotal = 0
|
||||
return
|
||||
}
|
||||
this.currentMasterRow = row
|
||||
this.detailQueryParams.trayCode = row.trayCode
|
||||
this.detailQueryParams.warehouseId = row.warehouseId
|
||||
this.detailQueryParams.pageNum = 1
|
||||
this.getDetailList()
|
||||
},
|
||||
/** 查询子表库存明细列表 */
|
||||
getDetailList() {
|
||||
if (!this.detailQueryParams.trayCode || !this.detailQueryParams.warehouseId) {
|
||||
this.detailList = []
|
||||
this.detailTotal = 0
|
||||
return
|
||||
}
|
||||
this.detailLoading = true
|
||||
stockManagementList(this.detailQueryParams).then(response => {
|
||||
this.detailList = response.rows
|
||||
this.detailTotal = response.total
|
||||
this.detailLoading = false
|
||||
}).catch(() => {
|
||||
this.detailLoading = false
|
||||
})
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
if (!this.currentMasterRow) {
|
||||
this.$modal.msgError("请先在上方选择主表数据")
|
||||
return
|
||||
}
|
||||
this.reset()
|
||||
this.form.trayCode = this.currentMasterRow.trayCode
|
||||
this.form.warehouseId = this.currentMasterRow.warehouseId
|
||||
this.form.cargoSpaceId = this.currentMasterRow.cargoSpaceId
|
||||
this.open = true
|
||||
this.title = "添加库存信息" // 添加库存信息
|
||||
},
|
||||
@@ -662,6 +740,19 @@ export default {
|
||||
this.title = "修改库存信息" // 修改库存信息
|
||||
})
|
||||
},
|
||||
handleUpdateDept(row) {
|
||||
this.reset()
|
||||
const trayCode = row.trayCode
|
||||
|
||||
this.deptForm = {
|
||||
trayCode: row.trayCode,
|
||||
warehouseId: row.warehouseId,
|
||||
model:row.model
|
||||
}
|
||||
console.log(this.deptForm)
|
||||
this.openDept = true
|
||||
this.titleDept = "托盘转运部门"
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
@@ -682,6 +773,24 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
submitFormDept() {
|
||||
if (!this.deptForm.trayCode){
|
||||
this.$modal.msgError("请输入托盘")
|
||||
return
|
||||
}
|
||||
if (!this.deptForm.warehouseId){
|
||||
this.$modal.msgError("请输入仓库")
|
||||
return
|
||||
}
|
||||
if (!this.deptForm.model){
|
||||
this.$modal.msgError("请输入部门")
|
||||
}
|
||||
updateStockDept(this.deptForm).then(response => {
|
||||
this.$modal.msgSuccess("修改成功") // 修改成功
|
||||
this.openDept = false
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const stockIds = row.stockId || this.ids
|
||||
@@ -790,4 +899,19 @@ export default {
|
||||
.no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.master-info {
|
||||
margin-bottom: 10px;
|
||||
padding: 10px 12px;
|
||||
background-color: #f5f7fa;
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.master-info-title {
|
||||
margin-bottom: 6px;
|
||||
color: #606266;
|
||||
font-weight: 500;
|
||||
}
|
||||
.master-info-label {
|
||||
color: #909399;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -255,9 +255,8 @@ export default {
|
||||
},
|
||||
// 出口选项
|
||||
exitOptions: [
|
||||
{ exitId: '1', exitName: '1'},
|
||||
{ exitId: '2', exitName: '2'},
|
||||
|
||||
{ exitId: '1', exitName: '入库端'},
|
||||
{ exitId: '2', exitName: '出库端'},
|
||||
],
|
||||
|
||||
// 选中的库存数据
|
||||
@@ -393,11 +392,16 @@ export default {
|
||||
const selectedData = this.managementList.filter(item => this.ids.includes(item.stockId));
|
||||
this.selectedStockData = selectedData;
|
||||
|
||||
|
||||
|
||||
// 显示出口选择弹窗
|
||||
this.exitDialogVisible = true;
|
||||
this.exitForm.exitId = null;
|
||||
const codes = selectedData.map(item => String(item.warehouseId || '').padStart(2, '0'))
|
||||
const all02 = codes.length > 0 && codes.every(c => c === '02')
|
||||
if (all02) {
|
||||
this.exitDialogVisible = false
|
||||
this.exitForm.exitId = '1'
|
||||
this.doPointOut('1')
|
||||
return
|
||||
}
|
||||
this.exitDialogVisible = true
|
||||
this.exitForm.exitId = null
|
||||
},
|
||||
|
||||
|
||||
@@ -405,17 +409,18 @@ export default {
|
||||
submitPointOut() {
|
||||
this.$refs["exitForm"].validate(valid => {
|
||||
if (valid) {
|
||||
const stockIds = this.ids;
|
||||
// 调用API将stockIds数组和出口信息传给后端
|
||||
console.log("指定货位出库:", stockIds, this.exitForm.exitId)
|
||||
pointOut(stockIds, this.exitForm.exitId).then(response => {
|
||||
this.$modal.msgSuccess(response.msg);
|
||||
this.getList();
|
||||
this.exitDialogVisible = false;
|
||||
});
|
||||
this.doPointOut(this.exitForm.exitId)
|
||||
}
|
||||
})
|
||||
},
|
||||
doPointOut(exitId) {
|
||||
const stockIds = this.ids
|
||||
pointOut(stockIds, exitId).then(response => {
|
||||
this.$modal.msgSuccess(response.msg);
|
||||
this.getList();
|
||||
this.exitDialogVisible = false;
|
||||
});
|
||||
},
|
||||
|
||||
/** 取消出口选择 */
|
||||
cancelExit() {
|
||||
|
||||
Reference in New Issue
Block a user