现场问题修改..................
This commit is contained in:
14
ruoyi-admin/src/main/java/com/ruoyi/MyStartupRunner.java
Normal file
14
ruoyi-admin/src/main/java/com/ruoyi/MyStartupRunner.java
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
package com.ruoyi;
|
||||||
|
|
||||||
|
import org.springframework.boot.CommandLineRunner;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class MyStartupRunner implements CommandLineRunner {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run(String... args) throws Exception {
|
||||||
|
// 这里编写项目启动后要执行的方法逻辑
|
||||||
|
System.out.println("项目启动成功后自动执行此方法");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,15 +1,21 @@
|
|||||||
package com.ruoyi.bas.warehouse.service.impl;
|
package com.ruoyi.bas.warehouse.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
import com.ruoyi.bas.warehouse.domain.BasWarehouse;
|
import com.ruoyi.bas.warehouse.domain.BasWarehouse;
|
||||||
import com.ruoyi.bas.warehouse.mapper.BasWarehouseMapper;
|
import com.ruoyi.bas.warehouse.mapper.BasWarehouseMapper;
|
||||||
import com.ruoyi.bas.warehouse.service.IBasWarehouseService;
|
import com.ruoyi.bas.warehouse.service.IBasWarehouseService;
|
||||||
import com.ruoyi.common.annotation.DataScope;
|
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.SecurityUtils;
|
||||||
import com.ruoyi.system.service.ISysRoleService;
|
import com.ruoyi.system.service.ISysRoleService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 仓库管理Service业务层处理
|
* 仓库管理Service业务层处理
|
||||||
@@ -47,6 +53,24 @@ public class BasWarehouseServiceImpl implements IBasWarehouseService
|
|||||||
//@DataScope
|
//@DataScope
|
||||||
public List<BasWarehouse> selectBasWarehouseList(BasWarehouse basWarehouse)
|
public List<BasWarehouse> selectBasWarehouseList(BasWarehouse basWarehouse)
|
||||||
{
|
{
|
||||||
|
if (!"admin".equals(SecurityUtils.getUsername())){
|
||||||
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
|
List<SysRole> roles = loginUser.getUser().getRoles();
|
||||||
|
if (CollUtil.isEmpty(roles)) {
|
||||||
|
//如果未设置角色 ,直接返回空列表
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
Optional<SysRole> role1 = roles.stream().filter(x -> "role1".equals(x.getRoleKey())).findFirst();
|
||||||
|
Optional<SysRole> role2 = roles.stream().filter(x -> "role2".equals(x.getRoleKey())).findFirst();
|
||||||
|
Optional<SysRole> role3 = roles.stream().filter(x -> "role3".equals(x.getRoleKey())).findFirst();
|
||||||
|
Optional<SysRole> role4 = roles.stream().filter(x -> "role4".equals(x.getRoleKey())).findFirst();
|
||||||
|
if (role1.isPresent()||role3.isPresent()){
|
||||||
|
basWarehouse.setWarehouseId("02");
|
||||||
|
}
|
||||||
|
if (role2.isPresent()||role4.isPresent()){
|
||||||
|
basWarehouse.setWarehouseId("01");
|
||||||
|
}
|
||||||
|
}
|
||||||
return basWarehouseMapper.selectBasWarehouseList(basWarehouse);
|
return basWarehouseMapper.selectBasWarehouseList(basWarehouse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public class OutMydoJobController extends BaseController {
|
|||||||
return mydoJobService.OuthandInvalidation(jobIds);
|
return mydoJobService.OuthandInvalidation(jobIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('job:outmydoJob:pointOut')")
|
@PreAuthorize("@ss.hasAnyPermi('job:outmydoJob:pointOut,job:outmydoJob:pointOut1,job:outmydoJob:pointOut2')")
|
||||||
@Log(title = "指定货位出库", businessType = BusinessType.INSERT)
|
@Log(title = "指定货位出库", businessType = BusinessType.INSERT)
|
||||||
@RequestMapping("/pointOut")
|
@RequestMapping("/pointOut")
|
||||||
public AjaxResult pointOut(@RequestParam("stockIds")String[] stockIds,@RequestParam("exitId")String exitId,@RequestParam("type")String type)
|
public AjaxResult pointOut(@RequestParam("stockIds")String[] stockIds,@RequestParam("exitId")String exitId,@RequestParam("type")String type)
|
||||||
|
|||||||
@@ -261,11 +261,13 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
|||||||
for (MydoJobDetail mydoJobDetail : mydoJobDetails) {
|
for (MydoJobDetail mydoJobDetail : mydoJobDetails) {
|
||||||
String inOrOutDId = mydoJobDetail.getInOrOutDId();
|
String inOrOutDId = mydoJobDetail.getInOrOutDId();
|
||||||
InStockinDetail inStockinDetail = inStockinDetailService.selectInStockinDetailByStockinDetailId(inOrOutDId);
|
InStockinDetail inStockinDetail = inStockinDetailService.selectInStockinDetailByStockinDetailId(inOrOutDId);
|
||||||
BigDecimal stockInNum = Convert.toBigDecimal(inStockinDetail.getScanNum());
|
if(inStockinDetail != null){
|
||||||
BigDecimal jobInNum = Convert.toBigDecimal(mydoJobDetail.getInQuantity());
|
BigDecimal stockInNum = Convert.toBigDecimal(inStockinDetail.getScanNum());
|
||||||
BigDecimal subtract = stockInNum.subtract(jobInNum);
|
BigDecimal jobInNum = Convert.toBigDecimal(mydoJobDetail.getInQuantity());
|
||||||
inStockinDetail.setScanNum(Convert.toStr(subtract));
|
BigDecimal subtract = stockInNum.subtract(jobInNum);
|
||||||
inStockinDetailService.updateInStockinDetail(inStockinDetail);
|
inStockinDetail.setScanNum(Convert.toStr(subtract));
|
||||||
|
inStockinDetailService.updateInStockinDetail(inStockinDetail);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//修改货位状态
|
//修改货位状态
|
||||||
if (StrUtil.isNotEmpty(mydoJob.getCargoSpaceId())) {
|
if (StrUtil.isNotEmpty(mydoJob.getCargoSpaceId())) {
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.ruoyi.out.handAllotStock.domain;
|
package com.ruoyi.out.handAllotStock.domain;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
import com.ruoyi.common.annotation.Excel;
|
||||||
@@ -173,6 +175,15 @@ public class ViewHandAllotStock extends BaseEntity
|
|||||||
private String theTypeName;
|
private String theTypeName;
|
||||||
|
|
||||||
private String deptName;
|
private String deptName;
|
||||||
|
private List<String> trayCodeList;
|
||||||
|
|
||||||
|
public List<String> getTrayCodeList() {
|
||||||
|
return trayCodeList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTrayCodeList(List<String> trayCodeList) {
|
||||||
|
this.trayCodeList = trayCodeList;
|
||||||
|
}
|
||||||
|
|
||||||
public String getDeptName() {
|
public String getDeptName() {
|
||||||
return deptName;
|
return deptName;
|
||||||
|
|||||||
@@ -68,8 +68,12 @@ public class ViewInJobFlow extends BaseEntity
|
|||||||
/** 托盘条码 */
|
/** 托盘条码 */
|
||||||
@Excel(name = "托盘条码")
|
@Excel(name = "托盘条码")
|
||||||
private String trayCode;
|
private String trayCode;
|
||||||
@Excel(name = "货位")
|
@Excel(name = "部门")
|
||||||
|
private String deptName;
|
||||||
|
// @Excel(name = "货位")
|
||||||
private String cargoSpaceId;
|
private String cargoSpaceId;
|
||||||
|
@Excel(name = "货位名称")
|
||||||
|
private String cargoSpaceName;
|
||||||
|
|
||||||
/** 物料编码 */
|
/** 物料编码 */
|
||||||
@Excel(name = "物料编码")
|
@Excel(name = "物料编码")
|
||||||
@@ -179,6 +183,23 @@ public class ViewInJobFlow extends BaseEntity
|
|||||||
private String dateStart;
|
private String dateStart;
|
||||||
private String dateEnd;
|
private String dateEnd;
|
||||||
|
|
||||||
|
|
||||||
|
public String getDeptName() {
|
||||||
|
return deptName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeptName(String deptName) {
|
||||||
|
this.deptName = deptName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCargoSpaceName() {
|
||||||
|
return cargoSpaceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCargoSpaceName(String cargoSpaceName) {
|
||||||
|
this.cargoSpaceName = cargoSpaceName;
|
||||||
|
}
|
||||||
|
|
||||||
public String getCargoSpaceId() {
|
public String getCargoSpaceId() {
|
||||||
return cargoSpaceId;
|
return cargoSpaceId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -148,6 +148,7 @@ public class ViewStockDetail extends BaseEntity
|
|||||||
private String outside;
|
private String outside;
|
||||||
private String spare4;
|
private String spare4;
|
||||||
private String model;
|
private String model;
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ public class BasStockController extends BaseController
|
|||||||
@PutMapping("/updateStockDept")
|
@PutMapping("/updateStockDept")
|
||||||
public AjaxResult updateBasStockDept(@RequestBody BasStock basStock)
|
public AjaxResult updateBasStockDept(@RequestBody BasStock basStock)
|
||||||
{
|
{
|
||||||
return toAjax(basStockService.updateBasStockDept(basStock));
|
return basStockService.updateBasStockDept(basStock);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -217,6 +217,8 @@ public class BasStock extends BaseEntity {
|
|||||||
private String cargoNo;
|
private String cargoNo;
|
||||||
@Excel(name = "备注",sort=31)
|
@Excel(name = "备注",sort=31)
|
||||||
private String remark;
|
private String remark;
|
||||||
|
@Excel(name = "部门",sort=32)
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
private List<String> warehouseIdList;
|
private List<String> warehouseIdList;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,4 +21,5 @@ public class BasStockSummary {
|
|||||||
private String theType;
|
private String theType;
|
||||||
private String theTypeName;
|
private String theTypeName;
|
||||||
private String issDouble;
|
private String issDouble;
|
||||||
|
private String deptName;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,5 +85,5 @@ public interface IBasStockService
|
|||||||
|
|
||||||
List<BasStockSummary> selectBasStockSummary(BasStock basStock);
|
List<BasStockSummary> selectBasStockSummary(BasStock basStock);
|
||||||
|
|
||||||
int updateBasStockDept(BasStock basStock);
|
AjaxResult updateBasStockDept(BasStock basStock);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import com.ruoyi.bas.basJobId.service.IBasJobIdService;
|
|||||||
import com.ruoyi.bas.cargoSpace.service.IBasCargoSpaceService;
|
import com.ruoyi.bas.cargoSpace.service.IBasCargoSpaceService;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.in.stockin.domain.InStockin;
|
import com.ruoyi.in.stockin.domain.InStockin;
|
||||||
import com.ruoyi.in.stockin.service.IInStockinService;
|
import com.ruoyi.in.stockin.service.IInStockinService;
|
||||||
@@ -404,14 +405,14 @@ public class BasStockServiceImpl implements IBasStockService
|
|||||||
Optional<SysRole> first = roles.stream().filter(x -> "role1".equals(x.getRoleKey())).findFirst();
|
Optional<SysRole> first = roles.stream().filter(x -> "role1".equals(x.getRoleKey())).findFirst();
|
||||||
if (first.isPresent()){
|
if (first.isPresent()){
|
||||||
//二联合普通人员
|
//二联合普通人员
|
||||||
basStock.setModel(SecurityUtils.getDeptId().toString());
|
//basStock.setModel(SecurityUtils.getDeptId().toString());
|
||||||
warehouseIdList.add("02");
|
warehouseIdList.add("02");
|
||||||
warehouseIdList.add("03");
|
warehouseIdList.add("03");
|
||||||
}
|
}
|
||||||
Optional<SysRole> first1 = roles.stream().filter(x -> "role2".equals(x.getRoleKey())).findFirst();
|
Optional<SysRole> first1 = roles.stream().filter(x -> "role2".equals(x.getRoleKey())).findFirst();
|
||||||
if (first1.isPresent()){
|
if (first1.isPresent()){
|
||||||
//三联合普通人员
|
//三联合普通人员
|
||||||
basStock.setModel(SecurityUtils.getDeptId().toString());
|
//basStock.setModel(SecurityUtils.getDeptId().toString());
|
||||||
warehouseIdList.add("01");
|
warehouseIdList.add("01");
|
||||||
}
|
}
|
||||||
Optional<SysRole> first2 = roles.stream().filter(x -> "role3".equals(x.getRoleKey())).findFirst();
|
Optional<SysRole> first2 = roles.stream().filter(x -> "role3".equals(x.getRoleKey())).findFirst();
|
||||||
@@ -431,8 +432,42 @@ public class BasStockServiceImpl implements IBasStockService
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int updateBasStockDept(BasStock basStock) {
|
public AjaxResult updateBasStockDept(BasStock basStock) {
|
||||||
return basStockMapper.updateBasStockDept(basStock);
|
if (!"admin".equals(SecurityUtils.getUsername())) {
|
||||||
|
SysUser user = SecurityUtils.getLoginUser().getUser();
|
||||||
|
List<SysRole> roles = user.getRoles();
|
||||||
|
if (CollUtil.isEmpty(roles)) {
|
||||||
|
return AjaxResult.warn("未设置角色");
|
||||||
|
}
|
||||||
|
Optional<SysRole> role3 = roles.stream().filter(x -> "role3".equals(x.getRoleKey())).findFirst();
|
||||||
|
Optional<SysRole> role4 = roles.stream().filter(x -> "role4".equals(x.getRoleKey())).findFirst();
|
||||||
|
if (role3.isPresent() || role4.isPresent()) {
|
||||||
|
//仓库管理员
|
||||||
|
return AjaxResult.success(basStockMapper.updateBasStockDept(basStock));
|
||||||
|
}
|
||||||
|
Optional<SysRole> role1 = roles.stream().filter(x -> "role1".equals(x.getRoleKey())).findFirst();
|
||||||
|
Optional<SysRole> role2 = roles.stream().filter(x -> "role2".equals(x.getRoleKey())).findFirst();
|
||||||
|
if (role1.isPresent() || role2.isPresent()) {
|
||||||
|
//判断是不是自己名下托盘
|
||||||
|
BasStock basStockParam = new BasStock();
|
||||||
|
basStockParam.setWarehouseId(basStock.getWarehouseId());
|
||||||
|
basStockParam.setTrayCode(basStock.getTrayCode());
|
||||||
|
List<BasStockSummary> basStockSummaries = basStockMapper.selectBasStockSummary(basStockParam);
|
||||||
|
if (CollUtil.isEmpty(basStockSummaries)) {
|
||||||
|
return AjaxResult.warn("非本部门托盘,无法操作");
|
||||||
|
} else {
|
||||||
|
BasStockSummary basStockSummary = basStockSummaries.get(0);
|
||||||
|
String model = basStockSummary.getModel();
|
||||||
|
if (!model.equals(SecurityUtils.getDeptId().toString())) {
|
||||||
|
return AjaxResult.warn("非本部门托盘,无法操作");
|
||||||
|
}
|
||||||
|
return AjaxResult.success(basStockMapper.updateBasStockDept(basStock));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new RuntimeException("当前角色暂无操作功能");
|
||||||
|
} else {
|
||||||
|
return AjaxResult.success(basStockMapper.updateBasStockDept(basStock));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ server:
|
|||||||
# 日志配置
|
# 日志配置
|
||||||
logging:
|
logging:
|
||||||
level:
|
level:
|
||||||
com.ruoyi: debug
|
com.ruoyi: error
|
||||||
org.springframework: warn
|
org.springframework: warn
|
||||||
|
|
||||||
# 用户配置
|
# 用户配置
|
||||||
|
|||||||
@@ -105,6 +105,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="thePlatoon != null and thePlatoon != ''"> and the_platoon = #{thePlatoon}</if>
|
<if test="thePlatoon != null and thePlatoon != ''"> and the_platoon = #{thePlatoon}</if>
|
||||||
<if test="theColumn != null and theColumn != ''"> and the_column = #{theColumn}</if>
|
<if test="theColumn != null and theColumn != ''"> and the_column = #{theColumn}</if>
|
||||||
<if test="theFloor != null and theFloor != ''"> and the_floor = #{theFloor}</if>
|
<if test="theFloor != null and theFloor != ''"> and the_floor = #{theFloor}</if>
|
||||||
|
<if test="trayCodeList != null and trayCodeList.size() > 0">
|
||||||
|
AND tray_code IN
|
||||||
|
<foreach item="trayCode" collection="trayCodeList" open="(" separator="," close=")">
|
||||||
|
#{trayCode}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||||
${params.warehouseDataScope}
|
${params.warehouseDataScope}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="inOrOut" column="in_or_out" />
|
<result property="inOrOut" column="in_or_out" />
|
||||||
<result property="trayCode" column="tray_code" />
|
<result property="trayCode" column="tray_code" />
|
||||||
<result property="cargoSpaceId" column="cargo_space_id" />
|
<result property="cargoSpaceId" column="cargo_space_id" />
|
||||||
|
<result property="cargoSpaceName" column="cargo_space_name" />
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
<result property="startTime" column="start_time" />
|
<result property="startTime" column="start_time" />
|
||||||
<result property="finishTime" column="finish_time" />
|
<result property="finishTime" column="finish_time" />
|
||||||
@@ -47,10 +48,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="quality" column="quality" />
|
<result property="quality" column="quality" />
|
||||||
<result property="managementNo" column="managementNo" />
|
<result property="managementNo" column="managementNo" />
|
||||||
<result property="departmentId" column="department_id" />
|
<result property="departmentId" column="department_id" />
|
||||||
|
<result property="deptName" column="dept_name" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectViewInJobFlowVo">
|
<sql id="selectViewInJobFlowVo">
|
||||||
select job_detail_id, job_id, task_no, status, in_or_out, tray_code,cargo_space_id, create_time, start_time, finish_time, entrance_id, warehouse_id, product_id, product_name, parent_id, price, cargo_no, unit, spec, remark, productType, systemItem, productCtm, productCtu, upperNum, limitNum, enableFlag, quantity, lot_no, in_or_out_id, in_or_out_d_id, priceTotal, origin, turnovertype, account, purpose, units, contract, cases, quality, managementNo,department_id from view_in_job_flow vijf
|
select job_detail_id, job_id, task_no, status, in_or_out, tray_code,cargo_space_id,cargo_space_name, create_time, start_time, finish_time, entrance_id, warehouse_id, product_id, product_name, parent_id, price, cargo_no, unit, spec, remark, productType, systemItem, productCtm, productCtu, upperNum, limitNum, enableFlag, quantity, lot_no, in_or_out_id, in_or_out_d_id, priceTotal, origin, turnovertype, account, purpose, units, contract, cases, quality, managementNo,department_id,dept_name from view_in_job_flow vijf
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectViewInJobFlowList" parameterType="ViewInJobFlow" resultMap="ViewInJobFlowResult">
|
<select id="selectViewInJobFlowList" parameterType="ViewInJobFlow" resultMap="ViewInJobFlowResult">
|
||||||
@@ -95,8 +97,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="quality != null and quality != ''"> and quality = #{quality}</if>
|
<if test="quality != null and quality != ''"> and quality = #{quality}</if>
|
||||||
<if test="managementNo != null and managementNo != ''"> and managementNo = #{managementNo}</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 or department_id = '')</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="dateStart != null and dateStart != ''"> and finish_time >= #{dateStart}</if>
|
||||||
<if test="dateEnd != null and dateEnd != ''"> and create_time <= #{dateEnd}</if>
|
<if test="dateEnd != null and dateEnd != ''"> and finish_time <= #{dateEnd}</if>
|
||||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and cargo_space_id = #{cargoSpaceId}</if>
|
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and cargo_space_id = #{cargoSpaceId}</if>
|
||||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||||
${params.warehouseDataScope}
|
${params.warehouseDataScope}
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="spare1" column="spare1" />
|
<result property="spare1" column="spare1" />
|
||||||
<result property="productType" column="productType" />
|
<result property="productType" column="productType" />
|
||||||
<result property="distribution" column="distribution" />
|
<result property="distribution" column="distribution" />
|
||||||
|
<result property="deptName" column="dept_name" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectViewStockDetailVo">
|
<sql id="selectViewStockDetailVo">
|
||||||
@@ -76,12 +77,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
bs.out_quantity,
|
bs.out_quantity,
|
||||||
bs.distribution, --来源
|
bs.distribution, --来源
|
||||||
bs.spare4, --来源
|
bs.spare4, --来源
|
||||||
|
bs.model, --来源
|
||||||
|
sd.dept_name, --来源
|
||||||
bs.spare1 --用途
|
bs.spare1 --用途
|
||||||
from bas_stock bs
|
from bas_stock bs
|
||||||
left join bas_product bp on bs.product_id = bp.product_id
|
left join bas_product bp on bs.product_id = bp.product_id
|
||||||
left join bas_warehouse bw on bs.warehouse_id = bw.warehouse_id
|
left join bas_warehouse bw on bs.warehouse_id = bw.warehouse_id
|
||||||
left join bas_cargo_space bcs on bs.cargo_space_id = bcs.cargo_space_id
|
left join bas_cargo_space bcs on bs.cargo_space_id = bcs.cargo_space_id
|
||||||
left join bas_supplier bs2 on bs.phase = bs2.supplier_no
|
left join bas_supplier bs2 on bs.phase = bs2.supplier_no
|
||||||
|
left join sys_dept sd on bs.model = sd.dept_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectViewStockDetailList" parameterType="ViewStockDetail" resultMap="ViewStockDetailResult">
|
<select id="selectViewStockDetailList" parameterType="ViewStockDetail" resultMap="ViewStockDetailResult">
|
||||||
@@ -89,6 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<where>
|
<where>
|
||||||
<if test="stockId != null and stockId != ''"> and bs.stock_id = #{stockId}</if>
|
<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 or bs.model = '')</if>
|
<if test="model != null and model != ''"> and (bs.model = #{model} or bs.model is null or bs.model = '')</if>
|
||||||
|
<if test="deptName != null and deptName != ''"> and sd.dept_name =#{deptName}</if>
|
||||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and bs.cargo_space_id = #{cargoSpaceId}</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="stockStatus != null and stockStatus != ''"> and bs.stock_status = #{stockStatus}</if>
|
||||||
<if test="lotNo != null and lotNo != ''"> and bs.lot_no = #{lotNo}</if>
|
<if test="lotNo != null and lotNo != ''"> and bs.lot_no = #{lotNo}</if>
|
||||||
|
|||||||
@@ -351,10 +351,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
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_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
|
left join bas_warehouse bw on bcs.warehouse_id = bw.warehouse_id
|
||||||
left join bas_product bp on bs.product_id = bp.product_id
|
left join bas_product bp on bs.product_id = bp.product_id
|
||||||
|
left join sys_dept sd on bs.model = sd.dept_id
|
||||||
WHERE bcs.status = '2'
|
WHERE bcs.status = '2'
|
||||||
<if test="model != null and model != ''">
|
<if test="model != null and model != ''">
|
||||||
and (bs.model = #{model} or bs.model is null or bs.model = '')
|
and (bs.model = #{model} or bs.model is null or bs.model = '')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="deptName != null and deptName != ''">
|
||||||
|
and sd.dept_name = #{deptName}
|
||||||
|
</if>
|
||||||
<if test="warehouseId != null and warehouseId != ''">
|
<if test="warehouseId != null and warehouseId != ''">
|
||||||
and bs.warehouse_id = #{warehouseId}
|
and bs.warehouse_id = #{warehouseId}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -44,21 +44,6 @@
|
|||||||
placeholder="请选择结束日期">
|
placeholder="请选择结束日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</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-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
@@ -96,6 +81,16 @@
|
|||||||
@click="openEditTrayDialog"
|
@click="openEditTrayDialog"
|
||||||
>修改托盘码</el-button>
|
>修改托盘码</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="info"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="openEditDeptDialog"
|
||||||
|
>修改部门</el-button>
|
||||||
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
@@ -141,35 +136,6 @@
|
|||||||
<el-table-column label="任务ID" align="left" prop="jobId" width="160" />
|
<el-table-column label="任务ID" align="left" prop="jobId" width="160" />
|
||||||
<el-table-column label="单据ID" align="left" prop="inOrOutId" width="160" />
|
<el-table-column label="单据ID" align="left" prop="inOrOutId" width="160" />
|
||||||
<el-table-column label="子单据ID" align="left" prop="inOrOutDId" width="160" />
|
<el-table-column label="子单据ID" align="left" prop="inOrOutDId" width="160" />
|
||||||
|
|
||||||
<!-- <el-table-column label="来源" align="left" prop="spare1" ><!–来源–>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<dict-tag :options="dict.type.origin_type" :value="scope.row.spare1"/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="状态" align="left" prop="spare2" ><!–用途–>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<dict-tag :options="dict.type.turnover_type" :value="scope.row.spare2"/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="套账" align="left" 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="left" prop="spare4" ><!–用途–>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<dict-tag :options="dict.type.purpose_type" :value="scope.row.spare4"/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>-->
|
|
||||||
<!-- <el-table-column label="批号" align="left" prop="lotNo" />-->
|
|
||||||
<!-- <el-table-column label="生产图号" align="left" prop="cargoNo" width="160"/>-->
|
|
||||||
<!-- <el-table-column label="单价" align="left" prop="printDate" />-->
|
|
||||||
<!-- <el-table-column label="质量等级" align="left" 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="left" prop="spare6" />
|
<el-table-column label="合同号" align="left" prop="spare6" />
|
||||||
<el-table-column label="产品号" align="left" prop="spare7" />
|
<el-table-column label="产品号" align="left" prop="spare7" />
|
||||||
<el-table-column label="代号" align="left" prop="spare9" />
|
<el-table-column label="代号" align="left" prop="spare9" />
|
||||||
@@ -207,6 +173,28 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog :title="deptTitle" :visible.sync="deptOpen" width="400px" append-to-body>
|
||||||
|
<el-form ref="deptForm" :model="deptForm" :rules="deptRules" label-width="80px">
|
||||||
|
<el-form-item label="任务ID">
|
||||||
|
<el-input v-model="deptForm.jobId" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="部门" prop="departmentId">
|
||||||
|
<el-select v-model="deptForm.departmentId" 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="submitDeptForm">确 定</el-button>
|
||||||
|
<el-button @click="cancelDept">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -218,7 +206,7 @@ import {listWarehouse} from "@/api/bas/warehouse";
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MydoJob",
|
name: "MydoJob",
|
||||||
dicts: ['execution_phase_type', 'in_job_type', 'on_line_type', 'mydo_job_status','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','product_type','origin_type','account_type','turnover_type','purpose_type','quality_type','sl_dept','el_dept'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
@@ -295,6 +283,15 @@ export default {
|
|||||||
{ required: true, message: "托盘码不能为空", trigger: "blur" }
|
{ required: true, message: "托盘码不能为空", trigger: "blur" }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
// 部门修改弹窗
|
||||||
|
deptOpen: false,
|
||||||
|
deptTitle: "",
|
||||||
|
deptForm: {},
|
||||||
|
deptRules: {
|
||||||
|
departmentId: [
|
||||||
|
{ required: true, message: "部门不能为空", trigger: "change" }
|
||||||
|
]
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -312,6 +309,16 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
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" || wid === "03") {
|
||||||
|
return this.dict.type.el_dept || []
|
||||||
|
}
|
||||||
|
return this.dict.type.sl_dept || []
|
||||||
|
},
|
||||||
/** 查询任务表列表 */
|
/** 查询任务表列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
@@ -466,6 +473,62 @@ export default {
|
|||||||
...this.queryParams
|
...this.queryParams
|
||||||
}, `mydoJob_${new Date().getTime()}.xlsx`)
|
}, `mydoJob_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
|
openEditDeptDialog() {
|
||||||
|
if (this.ids.length === 0) {
|
||||||
|
this.$modal.msgError("请选择要修改的任务");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.ids.length > 1) {
|
||||||
|
this.$modal.msgError("一次只能修改一条任务");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const jobId = this.ids[0];
|
||||||
|
const row = this.mydoJobList.find(item => item.jobId === jobId);
|
||||||
|
if (!row) {
|
||||||
|
this.$modal.msgError("未找到选中任务数据");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (row.status !== '1') {
|
||||||
|
this.$modal.msgError("只能修改未执行的任务");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.deptForm = {
|
||||||
|
jobId: row.jobId,
|
||||||
|
departmentId: row.departmentId,
|
||||||
|
warehouseId: row.warehouseId
|
||||||
|
};
|
||||||
|
this.deptTitle = "修改任务部门";
|
||||||
|
this.deptOpen = true;
|
||||||
|
},
|
||||||
|
cancelDept() {
|
||||||
|
this.deptOpen = false;
|
||||||
|
this.resetDeptForm();
|
||||||
|
},
|
||||||
|
resetDeptForm() {
|
||||||
|
this.deptForm = {
|
||||||
|
jobId: null,
|
||||||
|
departmentId: null,
|
||||||
|
warehouseId: null
|
||||||
|
};
|
||||||
|
this.resetForm("deptForm");
|
||||||
|
},
|
||||||
|
submitDeptForm() {
|
||||||
|
this.$refs["deptForm"].validate(valid => {
|
||||||
|
if (!valid) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const row = this.mydoJobList.find(item => item.jobId === this.deptForm.jobId);
|
||||||
|
// 构造更新对象,只包含需要更新的字段和主键,或者根据后端要求传全量
|
||||||
|
// 这里为了安全起见,我们拷贝原对象并覆盖 departmentId
|
||||||
|
const updatedRow = Object.assign({}, row, { departmentId: this.deptForm.departmentId });
|
||||||
|
|
||||||
|
updateMydoJob(updatedRow).then(() => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.deptOpen = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
/** 行点击事件处理 */
|
/** 行点击事件处理 */
|
||||||
handleRowClick(row) {
|
handleRowClick(row) {
|
||||||
// 设置当前选中行
|
// 设置当前选中行
|
||||||
|
|||||||
@@ -136,7 +136,7 @@
|
|||||||
<!-- <el-table-column :label="$t('outJobManagement.customerId')" align="left" prop="customerId" /> <!– 客户ID –>-->
|
<!-- <el-table-column :label="$t('outJobManagement.customerId')" align="left" prop="customerId" /> <!– 客户ID –>-->
|
||||||
<el-table-column label="托盘码" align="left" prop="trayCode" /> <!-- 托盘码 -->
|
<el-table-column label="托盘码" align="left" prop="trayCode" /> <!-- 托盘码 -->
|
||||||
<el-table-column label="巷道" align="left" prop="roadwayId" /> <!-- 巷道ID -->
|
<el-table-column label="巷道" align="left" prop="roadwayId" /> <!-- 巷道ID -->
|
||||||
<el-table-column label="货位" align="left" prop="cargoSpaceName" width="120"/> <!-- 货位ID -->
|
<el-table-column label="货位" align="left" prop="cargoSpaceName" width="140"/> <!-- 货位ID -->
|
||||||
<!-- <el-table-column label="订单号" align="left" prop="lineId" /> <!– 结束时间 –>-->
|
<!-- <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"> <!-- 执行阶段 -->
|
<el-table-column label="执行阶段" align="left" prop="executionPhase"> <!-- 执行阶段 -->
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<el-form :model="queryParams" ref="queryForm" :inline="true">
|
<el-form :model="queryParams" ref="queryForm" :inline="true">
|
||||||
<!-- 仓库 -->
|
<!-- 仓库 -->
|
||||||
<el-form-item label="仓库" prop="warehouseId">
|
<el-form-item label="仓库" prop="warehouseId">
|
||||||
<el-select v-model="queryParams.warehouseId" placeholder="请选择仓库" @change="handleWarehouseChange">
|
<el-select v-model="queryParams.warehouseId" placeholder="请选择仓库" @change="handleWarehouseChange">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in warehouseOptions"
|
v-for="dict in warehouseOptions"
|
||||||
:key="dict.warehouseId"
|
:key="dict.warehouseId"
|
||||||
@@ -36,9 +36,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import * as echarts from 'echarts'
|
import * as echarts from 'echarts'
|
||||||
import {getRoadways, getPlatoons, getChartData, getChartMag} from "@/api/kpi/spacePlan"
|
import {getChartData, getChartMag, getPlatoons, getRoadways} from "@/api/kpi/spacePlan"
|
||||||
import {listWarehouse} from "@/api/bas/warehouse";
|
import {listWarehouse} from "@/api/bas/warehouse";
|
||||||
import VueI18n from 'vue-i18n';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SpacePlan',
|
name: 'SpacePlan',
|
||||||
@@ -46,10 +45,10 @@ export default {
|
|||||||
return {
|
return {
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
warehouseId: '01',
|
warehouseId: '',
|
||||||
roadwayId: '1',
|
roadwayId: '',
|
||||||
thePlatoon: '',
|
thePlatoon: '',
|
||||||
platoon: '1',
|
platoon: '',
|
||||||
specifications: '',
|
specifications: '',
|
||||||
quantity_x: '',
|
quantity_x: '',
|
||||||
quantity_j: '',
|
quantity_j: '',
|
||||||
@@ -86,17 +85,17 @@ export default {
|
|||||||
outCargo: [],
|
outCargo: [],
|
||||||
theLocked: []
|
theLocked: []
|
||||||
},
|
},
|
||||||
queryWarehouseParam:{
|
queryWarehouseParam: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 99,
|
pageSize: 99,
|
||||||
typeData:[1]
|
typeData: [1]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getWarehouseList()
|
this.getWarehouseList()
|
||||||
this.initCharts()
|
this.initCharts()
|
||||||
this.handleWarehouseChange()
|
//this.handleWarehouseChange()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询仓库列表 */
|
/** 查询仓库列表 */
|
||||||
@@ -104,8 +103,17 @@ this.getWarehouseList()
|
|||||||
|
|
||||||
listWarehouse(this.queryWarehouseParam).then(response => {
|
listWarehouse(this.queryWarehouseParam).then(response => {
|
||||||
this.warehouseOptions = response.rows;
|
this.warehouseOptions = response.rows;
|
||||||
|
this.queryParams.warehouseId = response.rows[0].warehouseId
|
||||||
|
// 获取巷道列表
|
||||||
|
getRoadways(this.queryParams).then(response => {
|
||||||
|
const roadways = response.data.data
|
||||||
|
if (roadways && roadways.length > 0) {
|
||||||
|
this.roadwayOptions = roadways
|
||||||
|
this.queryParams.roadwayId = roadways[0].value
|
||||||
|
this.handleRoadwayChange()
|
||||||
|
}
|
||||||
|
})
|
||||||
});
|
});
|
||||||
// this.warehouseOptions = [{warehouseId: "01", warehouseName: "仓库1"}, {warehouseId: "02", warehouseName: "仓库2"}];
|
|
||||||
},
|
},
|
||||||
// 初始化图表
|
// 初始化图表
|
||||||
initCharts() {
|
initCharts() {
|
||||||
@@ -215,32 +223,32 @@ this.getWarehouseList()
|
|||||||
{
|
{
|
||||||
// 图例:空位
|
// 图例:空位
|
||||||
name: '空位',
|
name: '空位',
|
||||||
itemStyle: { color: '#AEEEEE' }
|
itemStyle: {color: '#AEEEEE'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// 图例:满位
|
// 图例:满位
|
||||||
name: '满位',
|
name: '满位',
|
||||||
itemStyle: { color: '#FF9900' }
|
itemStyle: {color: '#FF9900'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// 图例:入库分配
|
// 图例:入库分配
|
||||||
name: '入库分配',
|
name: '入库分配',
|
||||||
itemStyle: { color: '#FFFF00' }
|
itemStyle: {color: '#FFFF00'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// 图例:出库分配
|
// 图例:出库分配
|
||||||
name: '出库分配',
|
name: '出库分配',
|
||||||
itemStyle: { color: '#FF0000' }
|
itemStyle: {color: '#FF0000'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// 图例:入库需盘点
|
// 图例:入库需盘点
|
||||||
name: '入库需盘点',
|
name: '入库需盘点',
|
||||||
itemStyle: { color: '#FF0000' }
|
itemStyle: {color: '#FF0000'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// 图例:出库需盘点
|
// 图例:出库需盘点
|
||||||
name: '出库需盘点',
|
name: '出库需盘点',
|
||||||
itemStyle: { color: '#0000FF' }
|
itemStyle: {color: '#0000FF'}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
textStyle: {
|
textStyle: {
|
||||||
@@ -326,10 +334,9 @@ this.getWarehouseList()
|
|||||||
formatTooltip(params) {
|
formatTooltip(params) {
|
||||||
if (params.seriesName !== '满位') {
|
if (params.seriesName !== '满位') {
|
||||||
// 排
|
// 排
|
||||||
if (this.$i18n.locale ==='zh-cn') {
|
if (this.$i18n.locale === 'zh-cn') {
|
||||||
return params.seriesName + '<br>排' + this.queryParams.thePlatoon + '列' + (params.data[0] + 1) + '层' + (params.data[1] + 1);
|
return params.seriesName + '<br>排' + this.queryParams.thePlatoon + '列' + (params.data[0] + 1) + '层' + (params.data[1] + 1);
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
return params.seriesName + '<br>' + this.queryParams.thePlatoon + '排 ' + (params.data[0] + 1) + '列 ' + (params.data[1] + 1) + '层';
|
return params.seriesName + '<br>' + this.queryParams.thePlatoon + '排 ' + (params.data[0] + 1) + '列 ' + (params.data[1] + 1) + '层';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -371,8 +378,8 @@ this.getWarehouseList()
|
|||||||
tooltip: {
|
tooltip: {
|
||||||
formatter: (p) => {
|
formatter: (p) => {
|
||||||
if (p.seriesName === params.seriesName &&
|
if (p.seriesName === params.seriesName &&
|
||||||
p.data[0] === params.data[0] &&
|
p.data[0] === params.data[0] &&
|
||||||
p.data[1] === params.data[1]) {
|
p.data[1] === params.data[1]) {
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
return this.formatTooltip(p);
|
return this.formatTooltip(p);
|
||||||
|
|||||||
@@ -112,6 +112,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="托盘条码" align="center" prop="trayCode" width="100" />
|
<el-table-column label="托盘条码" align="center" prop="trayCode" width="100" />
|
||||||
|
<el-table-column label="部门" align="center" prop="deptName" width="100" />
|
||||||
|
<el-table-column label="货位名称" align="center" prop="cargoSpaceName" width="140" />
|
||||||
<el-table-column label="合同号" align="center" prop="contract" />
|
<el-table-column label="合同号" align="center" prop="contract" />
|
||||||
<el-table-column label="产品号" align="center" prop="cases" />
|
<el-table-column label="产品号" align="center" prop="cases" />
|
||||||
<el-table-column label="代号" align="center" prop="managementNo" />
|
<el-table-column label="代号" align="center" prop="managementNo" />
|
||||||
|
|||||||
@@ -168,6 +168,14 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>-->
|
</el-form-item>-->
|
||||||
|
<el-form-item label="部门" prop="deptName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.deptName"
|
||||||
|
placeholder="请输入部门"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="起始时间" prop="inDateStart">
|
<el-form-item label="起始时间" prop="inDateStart">
|
||||||
<el-date-picker clearable
|
<el-date-picker clearable
|
||||||
v-model="queryParams.inDateStart"
|
v-model="queryParams.inDateStart"
|
||||||
@@ -225,14 +233,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>-->
|
</el-form-item>-->
|
||||||
|
|
||||||
<!-- <el-form-item label="库外" prop="outside">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.outside"
|
|
||||||
placeholder="请输入库外"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>-->
|
|
||||||
|
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@@ -310,6 +311,8 @@
|
|||||||
<el-table-column label="物料名称" align="center" prop="productName" width="160" />
|
<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="spec" width="160"/>
|
||||||
<el-table-column label="数量" align="center" prop="quantity"/>
|
<el-table-column label="数量" align="center" prop="quantity"/>
|
||||||
|
<el-table-column label="部门" align="center" prop="deptName" width="120"/>
|
||||||
|
|
||||||
<!-- <el-table-column label="单价" align="center" prop="price"/>-->
|
<!-- <el-table-column label="单价" align="center" prop="price"/>-->
|
||||||
<!-- <el-table-column label="金额" align="center" prop="spare6"/>-->
|
<!-- <el-table-column label="金额" align="center" prop="spare6"/>-->
|
||||||
<!-- <el-table-column label="物料状态" align="center" prop="productType">
|
<!-- <el-table-column label="物料状态" align="center" prop="productType">
|
||||||
|
|||||||
@@ -89,14 +89,14 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="规格型号" prop="spec">
|
<el-form-item label="部门" prop="deptName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.spec"
|
v-model="queryParams.deptName"
|
||||||
placeholder="请输入规格型号"
|
placeholder="请输入部门"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>-->
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button><!-- 搜索 -->
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button><!-- 搜索 -->
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
>
|
>
|
||||||
<el-table-column label="仓库名称" align="center" prop="warehouseName"/>
|
<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="stockId" width="160"/>-->
|
||||||
<el-table-column label="库位" align="center" prop="cargoSpaceId" />
|
<el-table-column label="库位" align="center" prop="cargoSpaceName" />
|
||||||
<el-table-column label="托盘" align="center" prop="trayCode"/>
|
<el-table-column label="托盘" align="center" prop="trayCode"/>
|
||||||
<el-table-column label="巷道" align="center" prop="roadwayId"/>
|
<el-table-column label="巷道" align="center" prop="roadwayId"/>
|
||||||
<el-table-column label="排" align="center" prop="thePlatoon"/>
|
<el-table-column label="排" align="center" prop="thePlatoon"/>
|
||||||
|
|||||||
@@ -66,6 +66,20 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="托盘列表" prop="trayCodeList">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.trayCodeList"
|
||||||
|
multiple
|
||||||
|
filterable
|
||||||
|
allow-create
|
||||||
|
default-first-option
|
||||||
|
placeholder="输入条码后回车"
|
||||||
|
style="width: 240px"
|
||||||
|
@change="handleQuery"
|
||||||
|
>
|
||||||
|
<el-option v-for="item in []" :key="item" :label="item" :value="item" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="物料名称" prop="productName"><!-- 物料描述 -->
|
<el-form-item label="物料名称" prop="productName"><!-- 物料描述 -->
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.productName"
|
v-model="queryParams.productName"
|
||||||
@@ -81,7 +95,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
plain
|
plain
|
||||||
@@ -89,7 +103,17 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
@click="pointOut"
|
@click="pointOut"
|
||||||
v-hasPermi="['job:outmydoJob:pointOut']"
|
v-hasPermi="['job:outmydoJob:pointOut']"
|
||||||
>指定货位出库 <!-- 指定货位出库 --></el-button>
|
>指定货位出库</el-button>
|
||||||
|
</el-col>-->
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleNormalOut"
|
||||||
|
v-hasPermi="['job:outmydoJob:pointOut']"
|
||||||
|
>出来看看</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
@@ -97,9 +121,19 @@
|
|||||||
plain
|
plain
|
||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="pointOut1"
|
@click="handleSouthOut"
|
||||||
v-hasPermi="['job:outmydoJob:pointOut']"
|
v-hasPermi="['job:outmydoJob:pointOut1']"
|
||||||
>出来看看 <!-- 指定货位出库 --></el-button>
|
>出库端出库</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleNorthOut"
|
||||||
|
v-hasPermi="['job:outmydoJob:pointOut2']"
|
||||||
|
>入库端出库</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -112,7 +146,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="库存编码" align="center" prop="stockId" width="140"/>
|
<el-table-column label="库存编码" align="center" prop="stockId" width="140"/>
|
||||||
<el-table-column label="货位名称" align="center" prop="cargoSpaceName" width="120"/>
|
<el-table-column label="货位名称" align="center" prop="cargoSpaceName" width="140"/>
|
||||||
<el-table-column label="巷道" align="center" prop="roadwayId" width="80"/>
|
<el-table-column label="巷道" align="center" prop="roadwayId" width="80"/>
|
||||||
<el-table-column label="排" align="center" prop="thePlatoon" />
|
<el-table-column label="排" align="center" prop="thePlatoon" />
|
||||||
<el-table-column label="列" align="center" prop="theColumn" />
|
<el-table-column label="列" align="center" prop="theColumn" />
|
||||||
@@ -268,6 +302,7 @@ export default {
|
|||||||
quantity: null,
|
quantity: null,
|
||||||
jobId: null,
|
jobId: null,
|
||||||
trayCode: null,
|
trayCode: null,
|
||||||
|
trayCodeList: [],
|
||||||
outQuantity: null,
|
outQuantity: null,
|
||||||
stockinDetailId: null,
|
stockinDetailId: null,
|
||||||
stockinId: null,
|
stockinId: null,
|
||||||
@@ -319,8 +354,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList()
|
//this.getList()
|
||||||
this.getWarehouseList();
|
//this.getWarehouseList();
|
||||||
|
this.loading = false
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 获取仓库列表 */
|
/** 获取仓库列表 */
|
||||||
@@ -332,11 +368,12 @@ export default {
|
|||||||
/** 查询库存信息列表 */
|
/** 查询库存信息列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
listManagement(this.queryParams).then(response => {
|
// 直接传递 queryParams,axios 会将 trayCodeList 数组正确序列化
|
||||||
this.managementList = response.rows
|
listManagement(this.queryParams).then(response => {
|
||||||
this.total = response.total
|
this.managementList = response.rows
|
||||||
this.loading = false
|
this.total = response.total
|
||||||
})
|
this.loading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
@@ -382,7 +419,10 @@ export default {
|
|||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm("queryForm")
|
this.resetForm("queryForm")
|
||||||
this.queryParams.inDate = null
|
this.queryParams.inDate = null
|
||||||
this.handleQuery()
|
this.queryParams.trayCodeList = []
|
||||||
|
this.managementList = []
|
||||||
|
this.total = 0
|
||||||
|
//this.handleQuery()
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
@@ -436,14 +476,34 @@ export default {
|
|||||||
this.$modal.msgSuccess("删除成功")
|
this.$modal.msgSuccess("删除成功")
|
||||||
}).catch(() => {})
|
}).catch(() => {})
|
||||||
},
|
},
|
||||||
|
/** 出库端出库按钮操作 */
|
||||||
|
handleSouthOut() {
|
||||||
|
if (this.ids.length === 0) {
|
||||||
|
this.$modal.msgError("请至少选择一行数据");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.doPointOut('2', '2'); // 出库端出库 exitId: '2', type: '2'
|
||||||
|
},
|
||||||
|
/*二联合出库按钮*/
|
||||||
|
handleNormalOut() {
|
||||||
|
if (this.ids.length === 0) {
|
||||||
|
this.$modal.msgError("请至少选择一行数据");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.doPointOut('1', '2');
|
||||||
|
},
|
||||||
|
/** 入库端出库按钮操作 */
|
||||||
|
handleNorthOut() {
|
||||||
|
if (this.ids.length === 0) {
|
||||||
|
this.$modal.msgError("请至少选择一行数据");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.doPointOut('1', '2'); // 入库端出库 exitId: '1', type: '2'
|
||||||
|
},
|
||||||
/** 指定货位出库按钮操作 */
|
/** 指定货位出库按钮操作 */
|
||||||
pointOut() {
|
pointOut() {
|
||||||
this.handlePointOutOperation('1');
|
this.handlePointOutOperation('1');
|
||||||
},
|
},
|
||||||
/** 出来看看按钮操作 */
|
|
||||||
pointOut1() {
|
|
||||||
this.handlePointOutOperation('2');
|
|
||||||
},
|
|
||||||
|
|
||||||
handlePointOutOperation(type) {
|
handlePointOutOperation(type) {
|
||||||
this.currentOperationType = type;
|
this.currentOperationType = type;
|
||||||
|
|||||||
Reference in New Issue
Block a user