新增DataSelect组件
parent
2366176f01
commit
603803f5e7
|
|
@ -398,7 +398,7 @@ export default {
|
|||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
#foreach ($column in $columns)
|
||||
#if($column.query)
|
||||
$column.javaField: null#if($foreach.count != $columns.size()),#end
|
||||
|
|
|
|||
|
|
@ -377,7 +377,7 @@ const data = reactive({
|
|||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
pageSize: 30,
|
||||
#foreach ($column in $columns)
|
||||
#if($column.query)
|
||||
$column.javaField: null#if($foreach.count != $columns.size()),#end
|
||||
|
|
|
|||
|
|
@ -1,83 +1,83 @@
|
|||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.api.domain.SysDictType;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 字典表 数据层
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public interface SysDictTypeMapper
|
||||
{
|
||||
public interface SysDictTypeMapper {
|
||||
/**
|
||||
* 根据条件分页查询字典类型
|
||||
*
|
||||
*
|
||||
* @param dictType 字典类型信息
|
||||
* @return 字典类型集合信息
|
||||
*/
|
||||
public List<SysDictType> selectDictTypeList(SysDictType dictType);
|
||||
List<SysDictType> selectDictTypeList(SysDictType dictType);
|
||||
|
||||
/**
|
||||
* 根据所有字典类型
|
||||
*
|
||||
*
|
||||
* @return 字典类型集合信息
|
||||
*/
|
||||
public List<SysDictType> selectDictTypeAll();
|
||||
List<SysDictType> selectDictTypeAll();
|
||||
|
||||
/**
|
||||
* 根据字典类型ID查询信息
|
||||
*
|
||||
*
|
||||
* @param dictId 字典类型ID
|
||||
* @return 字典类型
|
||||
*/
|
||||
public SysDictType selectDictTypeById(Long dictId);
|
||||
SysDictType selectDictTypeById(Long dictId);
|
||||
|
||||
/**
|
||||
* 根据字典类型查询信息
|
||||
*
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @return 字典类型
|
||||
*/
|
||||
public SysDictType selectDictTypeByType(String dictType);
|
||||
SysDictType selectDictTypeByType(String dictType);
|
||||
|
||||
/**
|
||||
* 通过字典ID删除字典信息
|
||||
*
|
||||
*
|
||||
* @param dictId 字典ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDictTypeById(Long dictId);
|
||||
int deleteDictTypeById(Long dictId);
|
||||
|
||||
/**
|
||||
* 批量删除字典类型信息
|
||||
*
|
||||
*
|
||||
* @param dictIds 需要删除的字典ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDictTypeByIds(Long[] dictIds);
|
||||
int deleteDictTypeByIds(Long[] dictIds);
|
||||
|
||||
/**
|
||||
* 新增字典类型信息
|
||||
*
|
||||
*
|
||||
* @param dictType 字典类型信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDictType(SysDictType dictType);
|
||||
int insertDictType(SysDictType dictType);
|
||||
|
||||
/**
|
||||
* 修改字典类型信息
|
||||
*
|
||||
*
|
||||
* @param dictType 字典类型信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDictType(SysDictType dictType);
|
||||
int updateDictType(SysDictType dictType);
|
||||
|
||||
/**
|
||||
* 校验字典类型称是否唯一
|
||||
*
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @return 结果
|
||||
*/
|
||||
public SysDictType checkDictTypeUnique(String dictType);
|
||||
SysDictType checkDictTypeUnique(String dictType);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,60 +1,60 @@
|
|||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.api.domain.SysDictData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 字典 业务层
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public interface ISysDictDataService
|
||||
{
|
||||
public interface ISysDictDataService {
|
||||
/**
|
||||
* 根据条件分页查询字典数据
|
||||
*
|
||||
*
|
||||
* @param dictData 字典数据信息
|
||||
* @return 字典数据集合信息
|
||||
*/
|
||||
public List<SysDictData> selectDictDataList(SysDictData dictData);
|
||||
List<SysDictData> selectDictDataList(SysDictData dictData);
|
||||
|
||||
/**
|
||||
* 根据字典类型和字典键值查询字典数据信息
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @param dictValue 字典键值
|
||||
* @return 字典标签
|
||||
*/
|
||||
public String selectDictLabel(String dictType, String dictValue);
|
||||
String selectDictLabel(String dictType, String dictValue);
|
||||
|
||||
/**
|
||||
* 根据字典数据ID查询信息
|
||||
*
|
||||
*
|
||||
* @param dictCode 字典数据ID
|
||||
* @return 字典数据
|
||||
*/
|
||||
public SysDictData selectDictDataById(Long dictCode);
|
||||
SysDictData selectDictDataById(Long dictCode);
|
||||
|
||||
/**
|
||||
* 批量删除字典数据信息
|
||||
*
|
||||
*
|
||||
* @param dictCodes 需要删除的字典数据ID
|
||||
*/
|
||||
public void deleteDictDataByIds(Long[] dictCodes);
|
||||
void deleteDictDataByIds(Long[] dictCodes);
|
||||
|
||||
/**
|
||||
* 新增保存字典数据信息
|
||||
*
|
||||
*
|
||||
* @param dictData 字典数据信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDictData(SysDictData dictData);
|
||||
int insertDictData(SysDictData dictData);
|
||||
|
||||
/**
|
||||
* 修改保存字典数据信息
|
||||
*
|
||||
*
|
||||
* @param dictData 字典数据信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDictData(SysDictData dictData);
|
||||
int updateDictData(SysDictData dictData);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,98 +1,98 @@
|
|||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.api.domain.SysDictData;
|
||||
import com.ruoyi.system.api.domain.SysDictType;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 字典 业务层
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public interface ISysDictTypeService
|
||||
{
|
||||
public interface ISysDictTypeService {
|
||||
/**
|
||||
* 根据条件分页查询字典类型
|
||||
*
|
||||
*
|
||||
* @param dictType 字典类型信息
|
||||
* @return 字典类型集合信息
|
||||
*/
|
||||
public List<SysDictType> selectDictTypeList(SysDictType dictType);
|
||||
List<SysDictType> selectDictTypeList(SysDictType dictType);
|
||||
|
||||
/**
|
||||
* 根据所有字典类型
|
||||
*
|
||||
*
|
||||
* @return 字典类型集合信息
|
||||
*/
|
||||
public List<SysDictType> selectDictTypeAll();
|
||||
List<SysDictType> selectDictTypeAll();
|
||||
|
||||
/**
|
||||
* 根据字典类型查询字典数据
|
||||
*
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @return 字典数据集合信息
|
||||
*/
|
||||
public List<SysDictData> selectDictDataByType(String dictType);
|
||||
List<SysDictData> selectDictDataByType(String dictType);
|
||||
|
||||
/**
|
||||
* 根据字典类型ID查询信息
|
||||
*
|
||||
*
|
||||
* @param dictId 字典类型ID
|
||||
* @return 字典类型
|
||||
*/
|
||||
public SysDictType selectDictTypeById(Long dictId);
|
||||
SysDictType selectDictTypeById(Long dictId);
|
||||
|
||||
/**
|
||||
* 根据字典类型查询信息
|
||||
*
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @return 字典类型
|
||||
*/
|
||||
public SysDictType selectDictTypeByType(String dictType);
|
||||
SysDictType selectDictTypeByType(String dictType);
|
||||
|
||||
/**
|
||||
* 批量删除字典信息
|
||||
*
|
||||
*
|
||||
* @param dictIds 需要删除的字典ID
|
||||
*/
|
||||
public void deleteDictTypeByIds(Long[] dictIds);
|
||||
void deleteDictTypeByIds(Long[] dictIds);
|
||||
|
||||
/**
|
||||
* 加载字典缓存数据
|
||||
*/
|
||||
public void loadingDictCache();
|
||||
void loadingDictCache();
|
||||
|
||||
/**
|
||||
* 清空字典缓存数据
|
||||
*/
|
||||
public void clearDictCache();
|
||||
void clearDictCache();
|
||||
|
||||
/**
|
||||
* 重置字典缓存数据
|
||||
*/
|
||||
public void resetDictCache();
|
||||
void resetDictCache();
|
||||
|
||||
/**
|
||||
* 新增保存字典类型信息
|
||||
*
|
||||
*
|
||||
* @param dictType 字典类型信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDictType(SysDictType dictType);
|
||||
int insertDictType(SysDictType dictType);
|
||||
|
||||
/**
|
||||
* 修改保存字典类型信息
|
||||
*
|
||||
*
|
||||
* @param dictType 字典类型信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDictType(SysDictType dictType);
|
||||
int updateDictType(SysDictType dictType);
|
||||
|
||||
/**
|
||||
* 校验字典类型称是否唯一
|
||||
*
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @return 结果
|
||||
*/
|
||||
public boolean checkDictTypeUnique(SysDictType dictType);
|
||||
boolean checkDictTypeUnique(SysDictType dictType);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,105 +1,108 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.SysDictTypeMapper">
|
||||
|
||||
<resultMap type="SysDictType" id="SysDictTypeResult">
|
||||
<id property="dictId" column="dict_id" />
|
||||
<result property="dictName" column="dict_name" />
|
||||
<result property="dictType" column="dict_type" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDictTypeVo">
|
||||
select dict_id, dict_name, dict_type, status, create_by, create_time, remark
|
||||
from sys_dict_type
|
||||
<resultMap type="com.ruoyi.system.api.domain.SysDictType" id="SysDictTypeResult">
|
||||
<id property="dictId" column="dict_id"/>
|
||||
<result property="dictName" column="dict_name"/>
|
||||
<result property="dictType" column="dict_type"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDictTypeVo">
|
||||
select dict_id, dict_name, dict_type, status, create_by, create_time, remark
|
||||
from sys_dict_type
|
||||
</sql>
|
||||
|
||||
<select id="selectDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
<where>
|
||||
<if test="dictName != null and dictName != ''">
|
||||
AND dict_name like concat('%', #{dictName}, '%')
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="dictType != null and dictType != ''">
|
||||
AND dict_type like concat('%', #{dictType}, '%')
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDictTypeAll" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
</select>
|
||||
|
||||
<select id="selectDictTypeById" parameterType="Long" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
where dict_id = #{dictId}
|
||||
</select>
|
||||
|
||||
<select id="selectDictTypeByType" parameterType="String" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
where dict_type = #{dictType}
|
||||
</select>
|
||||
|
||||
<select id="checkDictTypeUnique" parameterType="String" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
where dict_type = #{dictType} limit 1
|
||||
</select>
|
||||
|
||||
<delete id="deleteDictTypeById" parameterType="Long">
|
||||
delete from sys_dict_type where dict_id = #{dictId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDictTypeByIds" parameterType="Long">
|
||||
delete from sys_dict_type where dict_id in
|
||||
<foreach collection="array" item="dictId" open="(" separator="," close=")">
|
||||
#{dictId}
|
||||
</foreach>
|
||||
</delete>
|
||||
<select id="selectDictTypeList" parameterType="com.ruoyi.system.api.domain.SysDictType"
|
||||
resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
<where>
|
||||
<if test="dictName != null and dictName != ''">
|
||||
AND dict_name like concat('%', #{dictName}, '%')
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="dictType != null and dictType != ''">
|
||||
AND dict_type like concat('%', #{dictType}, '%')
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDictTypeAll" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
</select>
|
||||
|
||||
<select id="selectDictTypeById" parameterType="Long" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
where dict_id = #{dictId}
|
||||
</select>
|
||||
|
||||
<select id="selectDictTypeByType" parameterType="String" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
where dict_type = #{dictType}
|
||||
</select>
|
||||
|
||||
<select id="checkDictTypeUnique" parameterType="String" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
where dict_type = #{dictType} limit 1
|
||||
</select>
|
||||
|
||||
<delete id="deleteDictTypeById" parameterType="Long">
|
||||
delete
|
||||
from sys_dict_type
|
||||
where dict_id = #{dictId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDictTypeByIds" parameterType="Long">
|
||||
delete from sys_dict_type where dict_id in
|
||||
<foreach collection="array" item="dictId" open="(" separator="," close=")">
|
||||
#{dictId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<update id="updateDictType" parameterType="com.ruoyi.system.api.domain.SysDictTypeSysDictType">
|
||||
update sys_dict_type
|
||||
<set>
|
||||
<if test="dictName != null and dictName != ''">dict_name = #{dictName},</if>
|
||||
<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where dict_id = #{dictId}
|
||||
</update>
|
||||
|
||||
<insert id="insertDictType" parameterType="com.ruoyi.system.api.domain.SysDictTypeSysDictType">
|
||||
insert into sys_dict_type(
|
||||
<if test="dictName != null and dictName != ''">dict_name,</if>
|
||||
<if test="dictType != null and dictType != ''">dict_type,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="dictName != null and dictName != ''">#{dictName},</if>
|
||||
<if test="dictType != null and dictType != ''">#{dictType},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateDictType" parameterType="SysDictType">
|
||||
update sys_dict_type
|
||||
<set>
|
||||
<if test="dictName != null and dictName != ''">dict_name = #{dictName},</if>
|
||||
<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where dict_id = #{dictId}
|
||||
</update>
|
||||
|
||||
<insert id="insertDictType" parameterType="SysDictType">
|
||||
insert into sys_dict_type(
|
||||
<if test="dictName != null and dictName != ''">dict_name,</if>
|
||||
<if test="dictType != null and dictType != ''">dict_type,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="dictName != null and dictName != ''">#{dictName},</if>
|
||||
<if test="dictType != null and dictType != ''">#{dictType},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,16 +1,17 @@
|
|||
package com.ruoyi.wms.controller.stock;
|
||||
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.wms.domain.BaseStock;
|
||||
import com.ruoyi.wms.service.stock.IBaseStockService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -23,6 +24,7 @@ import java.util.List;
|
|||
@RestController
|
||||
@RequestMapping("/BaseStock")
|
||||
public class BaseStockController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IBaseStockService baseStockService;
|
||||
|
||||
|
|
@ -37,31 +39,29 @@ public class BaseStockController extends BaseController {
|
|||
return getDataTable(list);
|
||||
}
|
||||
|
||||
//TODO 如果要启用导出功能,需要在domain实体类的字段上添加注解:@com.ruoyi.common.core.annotation.Excel(name = "字段名")
|
||||
/*
|
||||
/**
|
||||
* 导出基本库存列表
|
||||
*/
|
||||
// @RequiresPermissions("wms:BaseStock:export")
|
||||
// @Log(title = "基本库存", businessType = BusinessType.EXPORT)
|
||||
// @PostMapping("/export")
|
||||
// public void export(HttpServletResponse response, BaseStock baseStock)
|
||||
// {
|
||||
// List<BaseStock> list = baseStockService.selectBaseStockList(baseStock);
|
||||
// if (list.isEmpty()) {
|
||||
// responseJsonWarn(response, "没有数据可以导出");
|
||||
// return;
|
||||
// }
|
||||
// ExcelUtil<BaseStock> util = new ExcelUtil<>(BaseStock.class);
|
||||
// util.exportExcel(response, list, "基本库存数据");
|
||||
// }
|
||||
@RequiresPermissions("wms:BaseStock:export")
|
||||
@Log(title = "基本库存", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BaseStock baseStock) {
|
||||
List<BaseStock> list = baseStockService.selectBaseStockList(baseStock);
|
||||
if (list.isEmpty()) {
|
||||
responseJsonWarn(response, "没有数据可以导出");
|
||||
return;
|
||||
}
|
||||
ExcelUtil<BaseStock> util = new ExcelUtil<>(BaseStock.class);
|
||||
util.exportExcel(response, list, "基本库存数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取基本库存详细信息
|
||||
*/
|
||||
@RequiresPermissions("wms:BaseStock:query")
|
||||
@GetMapping(value = "/{whsCd}")
|
||||
public AjaxResult getInfo(@PathVariable("whsCd") String whsCd) {
|
||||
return success(baseStockService.selectBaseStockByWhsCd(whsCd));
|
||||
@PostMapping(value = "/getInfo")
|
||||
public AjaxResult getInfo(@RequestBody BaseStock form) {
|
||||
return success(baseStockService.selectBaseStockByPK(form.getWhsCd(), form.getStgBinCd(), form.getItemCd(), form.getLotNo(), form.getSubLotNo()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,75 @@
|
|||
package com.ruoyi.wms.controller.stock;
|
||||
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.wms.domain.InvTransHis;
|
||||
import com.ruoyi.wms.service.stock.IInvTransHisService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 入出库履历Controller
|
||||
*
|
||||
* @author ryas
|
||||
* created on 2024-02-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/InvTransHis")
|
||||
public class InvTransHisController extends BaseController {
|
||||
@Autowired
|
||||
private IInvTransHisService invTransHisService;
|
||||
|
||||
/**
|
||||
* 查询入出库履历列表
|
||||
*/
|
||||
@RequiresPermissions("wms:InvTransHis:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InvTransHis invTransHis) {
|
||||
startPage();
|
||||
List<InvTransHis> list = invTransHisService.selectInvTransHisList(invTransHis);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出入出库履历列表
|
||||
*/
|
||||
@RequiresPermissions("wms:InvTransHis:export")
|
||||
@Log(title = "入出库履历", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InvTransHis invTransHis) {
|
||||
List<InvTransHis> list = invTransHisService.selectInvTransHisList(invTransHis);
|
||||
if (list.isEmpty()) {
|
||||
responseJsonWarn(response, "没有数据可以导出");
|
||||
return;
|
||||
}
|
||||
ExcelUtil<InvTransHis> util = new ExcelUtil<>(InvTransHis.class);
|
||||
util.exportExcel(response, list, "入出库履历数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取入出库履历详细信息
|
||||
*/
|
||||
@RequiresPermissions("wms:InvTransHis:query")
|
||||
@GetMapping(value = "/{invTransNo}")
|
||||
public AjaxResult getInfo(@PathVariable("invTransNo") String invTransNo) {
|
||||
return success(invTransHisService.selectInvTransHisByInvTransNo(invTransNo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除入出库履历
|
||||
*/
|
||||
@RequiresPermissions("wms:InvTransHis:remove")
|
||||
@Log(title = "入出库履历", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{invTransNos}")
|
||||
public AjaxResult remove(@PathVariable String[] invTransNos) {
|
||||
return toAjax(invTransHisService.deleteInvTransHisByInvTransNos(invTransNos));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package com.ruoyi.wms.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.ExtBaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
|
@ -65,26 +66,31 @@ public class BaseStock extends ExtBaseEntity implements Serializable {
|
|||
/**
|
||||
* 仓库代码
|
||||
*/
|
||||
@Excel(name = "仓库代码", sort = 1)
|
||||
private String whsCd;
|
||||
|
||||
/**
|
||||
* 货架号
|
||||
*/
|
||||
@Excel(name = "货架号", sort = 2)
|
||||
private String stgBinCd;
|
||||
|
||||
/**
|
||||
* 物品代码
|
||||
*/
|
||||
@Excel(name = "物品代码", sort = 3)
|
||||
private String itemCd;
|
||||
|
||||
/**
|
||||
* 批号
|
||||
*/
|
||||
@Excel(name = "批号", sort = 4)
|
||||
private String lotNo;
|
||||
|
||||
/**
|
||||
* 子批号
|
||||
*/
|
||||
@Excel(name = "子批号", sort = 5)
|
||||
private String subLotNo;
|
||||
|
||||
/**
|
||||
|
|
@ -95,26 +101,31 @@ public class BaseStock extends ExtBaseEntity implements Serializable {
|
|||
/**
|
||||
* 标准单位数量
|
||||
*/
|
||||
@Excel(name = "标准单位数量", sort = 6)
|
||||
private BigDecimal stdUnitQty;
|
||||
|
||||
/**
|
||||
* 包装单位数量
|
||||
*/
|
||||
@Excel(name = "包装单位数量", sort = 7)
|
||||
private BigDecimal pkgUnitQty;
|
||||
|
||||
/**
|
||||
* 序列号
|
||||
*/
|
||||
@Excel(name = "序列号", sort = 8)
|
||||
private String serialNo;
|
||||
|
||||
/**
|
||||
* 托盘ID
|
||||
*/
|
||||
@Excel(name = "托盘ID", sort = 9)
|
||||
private String palletId;
|
||||
|
||||
/**
|
||||
* 父托盘ID
|
||||
*/
|
||||
@Excel(name = "父托盘ID", sort = 10)
|
||||
private String parentPalletId;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
package com.ruoyi.wms.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.ExtBaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
|
@ -17,10 +21,47 @@ import java.math.BigDecimal;
|
|||
* @author ryas
|
||||
* created on 2024-02-22
|
||||
*/
|
||||
@ToString(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class InvTransHis extends ExtBaseEntity implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
//==================== ↓↓↓↓↓↓ 非表字段 ↓↓↓↓↓↓ ====================
|
||||
|
||||
/**
|
||||
* 创建者用户名
|
||||
*/
|
||||
private String createByUser;
|
||||
|
||||
/**
|
||||
* 标准单位代码
|
||||
*/
|
||||
private String stdUnitCd;
|
||||
|
||||
/**
|
||||
* 标准单位名称
|
||||
*/
|
||||
private String stdUnitName;
|
||||
|
||||
/**
|
||||
* 包装单位代码
|
||||
*/
|
||||
private String pkgUnitCd;
|
||||
|
||||
/**
|
||||
* 包装单位名称
|
||||
*/
|
||||
private String pkgUnitName;
|
||||
|
||||
//==================== ↓↓↓↓↓↓ 表字段 ↓↓↓↓↓↓ ====================
|
||||
|
||||
/**
|
||||
* 入出库履历号
|
||||
*/
|
||||
@Excel(name = "入出库履历号", sort = 1)
|
||||
private String invTransNo;
|
||||
|
||||
/**
|
||||
|
|
@ -128,215 +169,4 @@ public class InvTransHis extends ExtBaseEntity implements Serializable {
|
|||
*/
|
||||
private String remark5;
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public String getInvTransNo() {
|
||||
return invTransNo;
|
||||
}
|
||||
|
||||
public void setInvTransNo(String invTransNo) {
|
||||
this.invTransNo = invTransNo == null ? null : invTransNo.trim();
|
||||
}
|
||||
|
||||
public Integer getDeptId() {
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(Integer deptId) {
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public Integer getInvTransType() {
|
||||
return invTransType;
|
||||
}
|
||||
|
||||
public void setInvTransType(Integer invTransType) {
|
||||
this.invTransType = invTransType;
|
||||
}
|
||||
|
||||
public String getWhsCd() {
|
||||
return whsCd;
|
||||
}
|
||||
|
||||
public void setWhsCd(String whsCd) {
|
||||
this.whsCd = whsCd == null ? null : whsCd.trim();
|
||||
}
|
||||
|
||||
public String getStgBinCd() {
|
||||
return stgBinCd;
|
||||
}
|
||||
|
||||
public void setStgBinCd(String stgBinCd) {
|
||||
this.stgBinCd = stgBinCd == null ? null : stgBinCd.trim();
|
||||
}
|
||||
|
||||
public String getPalletId() {
|
||||
return palletId;
|
||||
}
|
||||
|
||||
public void setPalletId(String palletId) {
|
||||
this.palletId = palletId == null ? null : palletId.trim();
|
||||
}
|
||||
|
||||
public BigDecimal getStdUnitQty() {
|
||||
return stdUnitQty;
|
||||
}
|
||||
|
||||
public void setStdUnitQty(BigDecimal stdUnitQty) {
|
||||
this.stdUnitQty = stdUnitQty;
|
||||
}
|
||||
|
||||
public BigDecimal getPkgUnitQty() {
|
||||
return pkgUnitQty;
|
||||
}
|
||||
|
||||
public void setPkgUnitQty(BigDecimal pkgUnitQty) {
|
||||
this.pkgUnitQty = pkgUnitQty;
|
||||
}
|
||||
|
||||
public String getTransOrderNo() {
|
||||
return transOrderNo;
|
||||
}
|
||||
|
||||
public void setTransOrderNo(String transOrderNo) {
|
||||
this.transOrderNo = transOrderNo == null ? null : transOrderNo.trim();
|
||||
}
|
||||
|
||||
public String getTransOrderDetlNo() {
|
||||
return transOrderDetlNo;
|
||||
}
|
||||
|
||||
public void setTransOrderDetlNo(String transOrderDetlNo) {
|
||||
this.transOrderDetlNo = transOrderDetlNo == null ? null : transOrderDetlNo.trim();
|
||||
}
|
||||
|
||||
public String getOperator() {
|
||||
return operator;
|
||||
}
|
||||
|
||||
public void setOperator(String operator) {
|
||||
this.operator = operator == null ? null : operator.trim();
|
||||
}
|
||||
|
||||
public String getBusinessCls() {
|
||||
return businessCls;
|
||||
}
|
||||
|
||||
public void setBusinessCls(String businessCls) {
|
||||
this.businessCls = businessCls == null ? null : businessCls.trim();
|
||||
}
|
||||
|
||||
public String getItemCd() {
|
||||
return itemCd;
|
||||
}
|
||||
|
||||
public void setItemCd(String itemCd) {
|
||||
this.itemCd = itemCd == null ? null : itemCd.trim();
|
||||
}
|
||||
|
||||
public String getLotNo() {
|
||||
return lotNo;
|
||||
}
|
||||
|
||||
public void setLotNo(String lotNo) {
|
||||
this.lotNo = lotNo == null ? null : lotNo.trim();
|
||||
}
|
||||
|
||||
public String getSubLotNo() {
|
||||
return subLotNo;
|
||||
}
|
||||
|
||||
public void setSubLotNo(String subLotNo) {
|
||||
this.subLotNo = subLotNo == null ? null : subLotNo.trim();
|
||||
}
|
||||
|
||||
public String getSerialNo() {
|
||||
return serialNo;
|
||||
}
|
||||
|
||||
public void setSerialNo(String serialNo) {
|
||||
this.serialNo = serialNo == null ? null : serialNo.trim();
|
||||
}
|
||||
|
||||
public String getReason() {
|
||||
return reason;
|
||||
}
|
||||
|
||||
public void setReason(String reason) {
|
||||
this.reason = reason == null ? null : reason.trim();
|
||||
}
|
||||
|
||||
public String getRemark1() {
|
||||
return remark1;
|
||||
}
|
||||
|
||||
public void setRemark1(String remark1) {
|
||||
this.remark1 = remark1 == null ? null : remark1.trim();
|
||||
}
|
||||
|
||||
public String getRemark2() {
|
||||
return remark2;
|
||||
}
|
||||
|
||||
public void setRemark2(String remark2) {
|
||||
this.remark2 = remark2 == null ? null : remark2.trim();
|
||||
}
|
||||
|
||||
public String getRemark3() {
|
||||
return remark3;
|
||||
}
|
||||
|
||||
public void setRemark3(String remark3) {
|
||||
this.remark3 = remark3 == null ? null : remark3.trim();
|
||||
}
|
||||
|
||||
public String getRemark4() {
|
||||
return remark4;
|
||||
}
|
||||
|
||||
public void setRemark4(String remark4) {
|
||||
this.remark4 = remark4 == null ? null : remark4.trim();
|
||||
}
|
||||
|
||||
public String getRemark5() {
|
||||
return remark5;
|
||||
}
|
||||
|
||||
public void setRemark5(String remark5) {
|
||||
this.remark5 = remark5 == null ? null : remark5.trim();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", invTransNo=").append(invTransNo);
|
||||
sb.append(", deptId=").append(deptId);
|
||||
sb.append(", invTransType=").append(invTransType);
|
||||
sb.append(", whsCd=").append(whsCd);
|
||||
sb.append(", stgBinCd=").append(stgBinCd);
|
||||
sb.append(", palletId=").append(palletId);
|
||||
sb.append(", stdUnitQty=").append(stdUnitQty);
|
||||
sb.append(", pkgUnitQty=").append(pkgUnitQty);
|
||||
sb.append(", transOrderNo=").append(transOrderNo);
|
||||
sb.append(", transOrderDetlNo=").append(transOrderDetlNo);
|
||||
sb.append(", operator=").append(operator);
|
||||
sb.append(", businessCls=").append(businessCls);
|
||||
sb.append(", itemCd=").append(itemCd);
|
||||
sb.append(", lotNo=").append(lotNo);
|
||||
sb.append(", subLotNo=").append(subLotNo);
|
||||
sb.append(", serialNo=").append(serialNo);
|
||||
sb.append(", reason=").append(reason);
|
||||
sb.append(", remark1=").append(remark1);
|
||||
sb.append(", remark2=").append(remark2);
|
||||
sb.append(", remark3=").append(remark3);
|
||||
sb.append(", remark4=").append(remark4);
|
||||
sb.append(", remark5=").append(remark5);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.ruoyi.wms.mapper.stock;
|
||||
|
||||
import com.ruoyi.wms.domain.InvTransHis;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Alan Scipio
|
||||
* created on 2024/2/23
|
||||
*/
|
||||
public interface InvTransHisExtMapper {
|
||||
|
||||
List<InvTransHis> selectPageList(InvTransHis invTransHis);
|
||||
|
||||
}
|
||||
|
|
@ -1,12 +1,11 @@
|
|||
package com.ruoyi.wms.service.stock;
|
||||
|
||||
import com.ruoyi.common.core.web.domain.ExtBaseEntity;
|
||||
import com.ruoyi.wms.domain.BaseStock;
|
||||
import com.ruoyi.wms.mapper.stock.BaseStockDynamicSqlSupport;
|
||||
import com.ruoyi.wms.mapper.stock.BaseStockExtMapper;
|
||||
import com.ruoyi.wms.mapper.stock.BaseStockMapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.mybatis.dynamic.sql.SqlBuilder;
|
||||
import org.mybatis.dynamic.sql.render.RenderingStrategies;
|
||||
import org.mybatis.dynamic.sql.select.render.SelectStatementProvider;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
|
@ -21,8 +20,11 @@ import java.util.Optional;
|
|||
*/
|
||||
@Service
|
||||
public class BaseStockServiceImpl implements IBaseStockService {
|
||||
|
||||
@Autowired
|
||||
private BaseStockMapper baseStockMapper;
|
||||
@Resource
|
||||
private BaseStockExtMapper baseStockExtMapper;
|
||||
|
||||
/**
|
||||
* 查询基本库存
|
||||
|
|
@ -31,8 +33,14 @@ public class BaseStockServiceImpl implements IBaseStockService {
|
|||
* @return 基本库存
|
||||
*/
|
||||
@Override
|
||||
public BaseStock selectBaseStockByWhsCd(String whsCd) {
|
||||
Optional<BaseStock> result = baseStockMapper.selectOne(dsl -> dsl.where(BaseStockDynamicSqlSupport.whsCd, SqlBuilder.isEqualTo(whsCd)));
|
||||
public BaseStock selectBaseStockByPK(String whsCd, String stgBinCd, String itemCd, String lotNo, String subLotNo) {
|
||||
Optional<BaseStock> result = baseStockMapper.selectOne(dsl ->
|
||||
dsl.where(BaseStockDynamicSqlSupport.whsCd, SqlBuilder.isEqualTo(whsCd))
|
||||
.and(BaseStockDynamicSqlSupport.stgBinCd, SqlBuilder.isEqualTo(stgBinCd))
|
||||
.and(BaseStockDynamicSqlSupport.itemCd, SqlBuilder.isEqualTo(itemCd))
|
||||
.and(BaseStockDynamicSqlSupport.lotNo, SqlBuilder.isEqualTo(lotNo))
|
||||
.and(BaseStockDynamicSqlSupport.subLotNo, SqlBuilder.isEqualTo(subLotNo))
|
||||
);
|
||||
return result.orElse(null);
|
||||
}
|
||||
|
||||
|
|
@ -44,17 +52,7 @@ public class BaseStockServiceImpl implements IBaseStockService {
|
|||
*/
|
||||
@Override
|
||||
public List<BaseStock> selectBaseStockList(BaseStock baseStock) {
|
||||
SelectStatementProvider provider = SqlBuilder.select(BaseStockMapper.selectList)
|
||||
.from(BaseStockDynamicSqlSupport.baseStock)
|
||||
.where(BaseStockDynamicSqlSupport.deleteFlag, SqlBuilder.isEqualTo(ExtBaseEntity.NOT_DELETE))
|
||||
.and(BaseStockDynamicSqlSupport.whsCd, SqlBuilder.isEqualToWhenPresent(baseStock.getWhsCd()))
|
||||
.and(BaseStockDynamicSqlSupport.stgBinCd, SqlBuilder.isEqualToWhenPresent(baseStock.getStgBinCd()))
|
||||
.and(BaseStockDynamicSqlSupport.itemCd, SqlBuilder.isLikeWhenPresent(baseStock.getItemCd() == null ? null : "%" + baseStock.getItemCd() + "%"))
|
||||
.and(BaseStockDynamicSqlSupport.lotNo, SqlBuilder.isLikeWhenPresent(baseStock.getLotNo() == null ? null : "%" + baseStock.getLotNo() + "%"))
|
||||
.orderBy(BaseStockDynamicSqlSupport.whsCd)
|
||||
.build()
|
||||
.render(RenderingStrategies.MYBATIS3);
|
||||
return baseStockMapper.selectMany(provider);
|
||||
return baseStockExtMapper.selectPageList(baseStock);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,13 +11,14 @@ import java.util.List;
|
|||
* created on 2024-02-22
|
||||
*/
|
||||
public interface IBaseStockService {
|
||||
|
||||
/**
|
||||
* 查询基本库存
|
||||
*
|
||||
* @param whsCd 基本库存主键
|
||||
* @return 基本库存
|
||||
*/
|
||||
BaseStock selectBaseStockByWhsCd(String whsCd);
|
||||
BaseStock selectBaseStockByPK(String whsCd, String stgBinCd, String itemCd, String lotNo, String subLotNo);
|
||||
|
||||
/**
|
||||
* 查询基本库存列表
|
||||
|
|
|
|||
|
|
@ -0,0 +1,45 @@
|
|||
package com.ruoyi.wms.service.stock;
|
||||
|
||||
import com.ruoyi.wms.domain.InvTransHis;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 入出库履历Service接口
|
||||
*
|
||||
* @author ryas
|
||||
* created on 2024-02-23
|
||||
*/
|
||||
public interface IInvTransHisService {
|
||||
/**
|
||||
* 查询入出库履历
|
||||
*
|
||||
* @param invTransNo 入出库履历主键
|
||||
* @return 入出库履历
|
||||
*/
|
||||
InvTransHis selectInvTransHisByInvTransNo(String invTransNo);
|
||||
|
||||
/**
|
||||
* 查询入出库履历列表
|
||||
*
|
||||
* @param invTransHis 入出库履历
|
||||
* @return 入出库履历集合
|
||||
*/
|
||||
List<InvTransHis> selectInvTransHisList(InvTransHis invTransHis);
|
||||
|
||||
/**
|
||||
* 批量删除入出库履历
|
||||
*
|
||||
* @param invTransNos 需要删除的入出库履历主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteInvTransHisByInvTransNos(String[] invTransNos);
|
||||
|
||||
/**
|
||||
* 删除入出库履历信息
|
||||
*
|
||||
* @param invTransNo 入出库履历主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteInvTransHisByInvTransNo(String invTransNo);
|
||||
}
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
package com.ruoyi.wms.service.stock;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.common.core.web.domain.ExtBaseEntity;
|
||||
import com.ruoyi.common.security.utils.SecurityUtilsExt;
|
||||
import com.ruoyi.wms.domain.InvTransHis;
|
||||
import com.ruoyi.wms.mapper.stock.InvTransHisDynamicSqlSupport;
|
||||
import com.ruoyi.wms.mapper.stock.InvTransHisExtMapper;
|
||||
import com.ruoyi.wms.mapper.stock.InvTransHisMapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.mybatis.dynamic.sql.SqlBuilder;
|
||||
import org.mybatis.dynamic.sql.render.RenderingStrategies;
|
||||
import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* 入出库履历Service业务层处理
|
||||
*
|
||||
* @author ryas
|
||||
* created on 2024-02-23
|
||||
*/
|
||||
@Service
|
||||
public class InvTransHisServiceImpl implements IInvTransHisService {
|
||||
|
||||
@Resource
|
||||
private InvTransHisMapper invTransHisMapper;
|
||||
@Resource
|
||||
private InvTransHisExtMapper invTransHisExtMapper;
|
||||
|
||||
/**
|
||||
* 查询入出库履历
|
||||
*
|
||||
* @param invTransNo 入出库履历主键
|
||||
* @return 入出库履历
|
||||
*/
|
||||
@Override
|
||||
public InvTransHis selectInvTransHisByInvTransNo(String invTransNo) {
|
||||
Optional<InvTransHis> result = invTransHisMapper.selectOne(dsl -> dsl.where(InvTransHisDynamicSqlSupport.invTransNo, SqlBuilder.isEqualTo(invTransNo)));
|
||||
return result.orElse(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询入出库履历列表
|
||||
*
|
||||
* @param invTransHis 入出库履历
|
||||
* @return 入出库履历
|
||||
*/
|
||||
@Override
|
||||
public List<InvTransHis> selectInvTransHisList(InvTransHis invTransHis) {
|
||||
return invTransHisExtMapper.selectPageList(invTransHis);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除入出库履历
|
||||
*
|
||||
* @param invTransNos 需要删除的入出库履历主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int deleteInvTransHisByInvTransNos(String[] invTransNos) {
|
||||
String userId = SecurityUtilsExt.getUserIdStr();
|
||||
UpdateStatementProvider provider = SqlBuilder.update(InvTransHisDynamicSqlSupport.invTransHis)
|
||||
.set(InvTransHisDynamicSqlSupport.deleteFlag).equalTo(ExtBaseEntity.DELETED)
|
||||
.set(InvTransHisDynamicSqlSupport.updateTime).equalTo(DateUtils.getNowDate())
|
||||
.set(InvTransHisDynamicSqlSupport.updateBy).equalTo(userId)
|
||||
.where(InvTransHisDynamicSqlSupport.invTransNo, SqlBuilder.isIn(invTransNos))
|
||||
.build()
|
||||
.render(RenderingStrategies.MYBATIS3);
|
||||
return invTransHisMapper.update(provider);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除入出库履历信息
|
||||
*
|
||||
* @param invTransNo 入出库履历主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int deleteInvTransHisByInvTransNo(String invTransNo) {
|
||||
InvTransHis record = new InvTransHis();
|
||||
record.setInvTransNo(invTransNo);
|
||||
record.setDeleteFlag(ExtBaseEntity.DELETED);
|
||||
record.setUpdateTime(DateUtils.getNowDate());
|
||||
return invTransHisMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
}
|
||||
|
|
@ -54,12 +54,12 @@
|
|||
item.STD_UNIT_CD,
|
||||
item.PKG_UNIT_CD,
|
||||
stdUnit.UNIT_NAME as STD_UNIT_NAME,
|
||||
pkgUnit.UNIT_NAME as PKG_UNIT_NAME,
|
||||
pkgUnit.UNIT_NAME as PKG_UNIT_NAME
|
||||
from WMS_B_BASE_STOCK t
|
||||
left join WMS_M_WAREHOUSE_INFO whs on t.WHS_CD = whs.WHS_CD and whs.DELETE_FLAG = 0
|
||||
left join WMS_M_ITEM_INFO item on t.ITEM_CD = item.ITEM_CD and item.DELETE_FLAG = 0
|
||||
left join WMS_M_ITEM_UNIT_INFO stdUnit on item.STD_UNIT_CD = stdUnit.UNIT_CD and stdUnit.DELETE_FLAG = 0
|
||||
left join WMS_M_ITEM_UNIT_INFO pkgUnit on item.PKG_UNIT_CD = pkgUnit.UNIT_CD and pkgUnit.DELETE_FLAG = 0
|
||||
left join WMS_M_UNIT_INFO stdUnit on item.STD_UNIT_CD = stdUnit.UNIT_CODE and stdUnit.DELETE_FLAG = 0
|
||||
left join WMS_M_UNIT_INFO pkgUnit on item.PKG_UNIT_CD = pkgUnit.UNIT_CODE and pkgUnit.DELETE_FLAG = 0
|
||||
<where>
|
||||
and t.DELETE_FLAG = 0
|
||||
<if test="whsCd != null and whsCd != ''">
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.wms.mapper.stock.InvTransHisExtMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.wms.domain.InvTransHis" id="InvTransHisResult">
|
||||
<result property="deptId" column="DEPT_ID"/>
|
||||
<result property="invTransNo" column="INV_TRANS_NO"/>
|
||||
<result property="invTransType" column="INV_TRANS_TYPE"/>
|
||||
<result property="whsCd" column="WHS_CD"/>
|
||||
<result property="stgBinCd" column="STG_BIN_CD"/>
|
||||
<result property="palletId" column="PALLET_ID"/>
|
||||
<result property="stdUnitQty" column="STD_UNIT_QTY"/>
|
||||
<result property="pkgUnitQty" column="PKG_UNIT_QTY"/>
|
||||
<result property="transOrderNo" column="TRANS_ORDER_NO"/>
|
||||
<result property="transOrderDetlNo" column="TRANS_ORDER_DETL_NO"/>
|
||||
<result property="operator" column="OPERATOR"/>
|
||||
<result property="businessCls" column="BUSINESS_CLS"/>
|
||||
<result property="itemCd" column="ITEM_CD"/>
|
||||
<result property="lotNo" column="LOT_NO"/>
|
||||
<result property="subLotNo" column="SUB_LOT_NO"/>
|
||||
<result property="serialNo" column="SERIAL_NO"/>
|
||||
<result property="reason" column="REASON"/>
|
||||
<result property="remark1" column="REMARK_1"/>
|
||||
<result property="remark2" column="REMARK_2"/>
|
||||
<result property="remark3" column="REMARK_3"/>
|
||||
<result property="remark4" column="REMARK_4"/>
|
||||
<result property="remark5" column="REMARK_5"/>
|
||||
<result property="updateCount" column="UPDATE_COUNT"/>
|
||||
<result property="deleteFlag" column="DELETE_FLAG"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createByUser" column="create_by_name"/>
|
||||
<result property="stdUnitCd" column="STD_UNIT_CD"/>
|
||||
<result property="pkgUnitCd" column="PKG_UNIT_CD"/>
|
||||
<result property="stdUnitName" column="STD_UNIT_NAME"/>
|
||||
<result property="pkgUnitName" column="PKG_UNIT_NAME"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectPageList" parameterType="com.ruoyi.wms.domain.InvTransHis" resultMap="InvTransHisResult">
|
||||
select
|
||||
t.DEPT_ID,
|
||||
t.INV_TRANS_NO,
|
||||
t.INV_TRANS_TYPE,
|
||||
t.WHS_CD,
|
||||
t.STG_BIN_CD,
|
||||
t.ITEM_CD,
|
||||
t.LOT_NO,
|
||||
t.SUB_LOT_NO,
|
||||
t.STD_UNIT_QTY,
|
||||
t.PKG_UNIT_QTY,
|
||||
t.SERIAL_NO,
|
||||
t.PALLET_ID,
|
||||
t.UPDATE_COUNT,
|
||||
t.DELETE_FLAG,
|
||||
t.OPERATOR,
|
||||
t.BUSINESS_CLS,
|
||||
t.REASON,
|
||||
t.TRANS_ORDER_DETL_NO,
|
||||
t.TRANS_ORDER_NO,
|
||||
t.create_by,
|
||||
t.create_time,
|
||||
t.update_by,
|
||||
t.update_time,
|
||||
whs.WHS_NAME,
|
||||
item.ITEM_NAME,
|
||||
item.STD_UNIT_CD,
|
||||
item.PKG_UNIT_CD,
|
||||
stdUnit.UNIT_NAME as STD_UNIT_NAME,
|
||||
pkgUnit.UNIT_NAME as PKG_UNIT_NAME,
|
||||
userCreate.user_name as create_by_name
|
||||
from WMS_B_INV_TRANS_HIS t
|
||||
left join WMS_M_WAREHOUSE_INFO whs on t.WHS_CD = whs.WHS_CD and whs.DELETE_FLAG = 0
|
||||
left join WMS_M_ITEM_INFO item on t.ITEM_CD = item.ITEM_CD and item.DELETE_FLAG = 0
|
||||
left join WMS_M_UNIT_INFO stdUnit on item.STD_UNIT_CD = stdUnit.UNIT_CODE and stdUnit.DELETE_FLAG = 0
|
||||
left join WMS_M_UNIT_INFO pkgUnit on item.PKG_UNIT_CD = pkgUnit.UNIT_CODE and pkgUnit.DELETE_FLAG = 0
|
||||
left join sys_user userCreate on t.create_by = userCreate.user_id
|
||||
<where>
|
||||
and t.DELETE_FLAG = 0
|
||||
<if test="invTransType != null">
|
||||
and t.INV_TRANS_TYPE = #{invTransType}
|
||||
</if>
|
||||
<if test="whsCd != null and whsCd != ''">
|
||||
and t.WHS_CD = #{whsCd}
|
||||
</if>
|
||||
<if test="stgBinCd != null and stgBinCd != ''">
|
||||
and t.STG_BIN_CD = #{stgBinCd}
|
||||
</if>
|
||||
<if test="itemCd != null and itemCd != ''">
|
||||
and t.ITEM_CD like concat('%', #{itemCd}, '%')
|
||||
</if>
|
||||
<if test="lotNo != null and lotNo != ''">
|
||||
and t.LOT_NO like concat('%', #{lotNo}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -9,10 +9,11 @@ export function listBaseStock(query) {
|
|||
})
|
||||
}
|
||||
|
||||
// TODO 查询基本库存详细 主键需要注意
|
||||
export function getBaseStock(whsCd) {
|
||||
// 询基本库存详细
|
||||
export function getBaseStock(data) {
|
||||
return request({
|
||||
url: '/wms/BaseStock/' + whsCd,
|
||||
method: 'get'
|
||||
url: '/wms/BaseStock/getInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询入出库履历列表
|
||||
export function listInvTransHis(query) {
|
||||
return request({
|
||||
url: '/wms/InvTransHis/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询入出库履历详细
|
||||
export function getInvTransHis(invTransNo) {
|
||||
return request({
|
||||
url: '/wms/InvTransHis/' + invTransNo,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 删除入出库履历
|
||||
export function delInvTransHis(invTransNo) {
|
||||
return request({
|
||||
url: '/wms/InvTransHis/' + invTransNo,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-select
|
||||
v-model="selectedValue"
|
||||
:placeholder="placeholder"
|
||||
:clearable="clearable"
|
||||
@change="handleChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dataOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getDicts } from '@/api/system/dict/data'
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const emit = defineEmits();
|
||||
|
||||
const props = defineProps({
|
||||
// v-model
|
||||
modelValue: {
|
||||
type: [String, Number],
|
||||
required: false,
|
||||
},
|
||||
// 直接自定义选项
|
||||
options: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
// 获取数据的方法
|
||||
fetchData: {
|
||||
type: Function,
|
||||
required: false,
|
||||
},
|
||||
// 字典名称
|
||||
dictName: {
|
||||
type: String,
|
||||
required: false
|
||||
},
|
||||
// 提示文本
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
// 是否能够清空选项
|
||||
clearable: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
});
|
||||
|
||||
const dataOptions = ref([]);
|
||||
const selectedValue = ref(null);
|
||||
|
||||
// v-model双向绑定:更新父组件的值
|
||||
function handleChange(value) {
|
||||
emit('update:modelValue', value);
|
||||
}
|
||||
|
||||
// v-model双向绑定:更新子组件的值
|
||||
watch(() => props.modelValue, (value) => {
|
||||
selectedValue.value = value;
|
||||
});
|
||||
|
||||
// 获取数据
|
||||
async function doFetchData() {
|
||||
if (props.options instanceof Array && props.options.length > 0) {
|
||||
// 如果是直接自定义选项,则直接使用
|
||||
dataOptions.value = props.options;
|
||||
} else if (props.fetchData) {
|
||||
// 如果是通过方法获取数据,则调用方法获取数据
|
||||
const dataList = await props.fetchData();
|
||||
dataList.map((item) => {
|
||||
dataOptions.value.push({
|
||||
label: item.label,
|
||||
value: item.value,
|
||||
});
|
||||
});
|
||||
} else if (props.dictName) {
|
||||
// 如果是字典类型,则从字典中获取数据
|
||||
const dicts = proxy.useDict(props.dictName);
|
||||
let list = dicts[props.dictName]._object[props.dictName];
|
||||
if (list.length > 0) {
|
||||
//已经缓存过字典数据
|
||||
list.map((item) => {
|
||||
dataOptions.value.push({
|
||||
label: item.label,
|
||||
value: item.value,
|
||||
});
|
||||
});
|
||||
} else {
|
||||
//没有缓存过字典数据
|
||||
const response = await getDicts(props.dictName);
|
||||
response.data.map((item) => {
|
||||
dataOptions.value.push({
|
||||
label: item.dictLabel,
|
||||
value: item.dictValue,
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
doFetchData()
|
||||
|
||||
</script>
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
<el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top" v-if="search">
|
||||
<el-button circle icon="Search" @click="toggleSearch()" />
|
||||
</el-tooltip>
|
||||
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
|
||||
<el-tooltip class="item" effect="dark" content="刷新" placement="top" v-if="showRefresh">
|
||||
<el-button circle icon="Refresh" @click="refresh()" />
|
||||
</el-tooltip>
|
||||
<el-tooltip class="item" effect="dark" content="显隐列" placement="top" v-if="columns">
|
||||
|
|
@ -60,6 +60,11 @@ const props = defineProps({
|
|||
type: Number,
|
||||
default: 10,
|
||||
},
|
||||
/* 是否显示刷新图标 */
|
||||
showRefresh: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
})
|
||||
|
||||
const emits = defineEmits(['update:showSearch', 'queryTable']);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,10 @@ import elementIcons from '@/components/SvgIcon/svgicon'
|
|||
|
||||
import './permission' // permission control
|
||||
|
||||
//字典
|
||||
import { useDict } from '@/utils/dict'
|
||||
import { optionselect } from '@/api/system/dict/type'
|
||||
|
||||
import { parseTime, resetForm, addDateRange, handleTree, selectDictLabel, selectDictLabels } from '@/utils/ruoyi'
|
||||
|
||||
// 分页组件
|
||||
|
|
@ -45,6 +48,8 @@ import TreeSelect from '@/components/TreeSelect'
|
|||
import DictTag from '@/components/DictTag'
|
||||
// FilePond文件上传组件
|
||||
import FpFileUpload from '@/components/FpFileUpload'
|
||||
// 自定义下拉选项组件
|
||||
import DataSelect from '@/components/DataSelect'
|
||||
|
||||
const app = createApp(App)
|
||||
|
||||
|
|
@ -68,6 +73,7 @@ app.component('ImagePreview', ImagePreview)
|
|||
app.component('RightToolbar', RightToolbar)
|
||||
app.component('Editor', Editor)
|
||||
app.component('FpFileUpload', FpFileUpload)
|
||||
app.component('DataSelect', DataSelect)
|
||||
|
||||
app.use(router)
|
||||
app.use(store)
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ const data = reactive({
|
|||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
pageSize: 30,
|
||||
fileId: null,
|
||||
savedName: null,
|
||||
originalName: null,
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ const data = reactive({
|
|||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
jobName: undefined,
|
||||
jobGroup: undefined,
|
||||
status: undefined
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ const data = reactive({
|
|||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
dictName: undefined,
|
||||
dictType: undefined,
|
||||
status: undefined
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ const onlineList = ref([]);
|
|||
const loading = ref(true);
|
||||
const total = ref(0);
|
||||
const pageNum = ref(1);
|
||||
const pageSize = ref(10);
|
||||
const pageSize = ref(30);
|
||||
|
||||
const queryParams = ref({
|
||||
ipaddr: undefined,
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ const data = reactive({
|
|||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
seqDistCd: null,
|
||||
ruleName: null,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ const data = reactive({
|
|||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
configName: undefined,
|
||||
configKey: undefined,
|
||||
configType: undefined
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ const data = reactive({
|
|||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
dictType: undefined,
|
||||
dictLabel: undefined,
|
||||
status: undefined
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ const data = reactive({
|
|||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
dictName: undefined,
|
||||
dictType: undefined,
|
||||
status: undefined
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ const defaultSort = ref({ prop: "accessTime", order: "descending" });
|
|||
// 查询参数
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
ipaddr: undefined,
|
||||
userName: undefined,
|
||||
status: undefined,
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ const data = reactive({
|
|||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
noticeTitle: undefined,
|
||||
createBy: undefined,
|
||||
status: undefined
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ const data = reactive({
|
|||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
operIp: undefined,
|
||||
title: undefined,
|
||||
operName: undefined,
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ const data = reactive({
|
|||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
postCode: undefined,
|
||||
postName: undefined,
|
||||
status: undefined
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ const userIds = ref([]);
|
|||
|
||||
const queryParams = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
roleId: route.params.roleId,
|
||||
userName: undefined,
|
||||
phonenumber: undefined,
|
||||
|
|
|
|||
|
|
@ -282,7 +282,7 @@ const data = reactive({
|
|||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
roleName: undefined,
|
||||
roleKey: undefined,
|
||||
status: undefined
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ const userIds = ref([]);
|
|||
|
||||
const queryParams = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
roleId: undefined,
|
||||
userName: undefined,
|
||||
phonenumber: undefined
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ const { proxy } = getCurrentInstance();
|
|||
const loading = ref(true);
|
||||
const total = ref(0);
|
||||
const pageNum = ref(1);
|
||||
const pageSize = ref(10);
|
||||
const pageSize = ref(30);
|
||||
const roleIds = ref([]);
|
||||
const roles = ref([]);
|
||||
const form = ref({
|
||||
|
|
|
|||
|
|
@ -382,7 +382,7 @@ const data = reactive({
|
|||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
userName: undefined,
|
||||
phonenumber: undefined,
|
||||
status: undefined,
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ const { proxy } = getCurrentInstance();
|
|||
|
||||
const queryParams = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
tableName: undefined,
|
||||
tableComment: undefined
|
||||
});
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ const uniqueId = ref("");
|
|||
const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
tableName: undefined,
|
||||
tableComment: undefined
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="仓库代码" prop="whsCd">
|
||||
<el-input
|
||||
v-model="queryParams.whsCd"
|
||||
placeholder="请输入仓库代码"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
<el-form-item label="仓库" prop="whsCd">
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.whsCd"-->
|
||||
<!-- placeholder="请输入仓库代码"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter="handleQuery"-->
|
||||
<!-- />-->
|
||||
<data-select v-model="queryParams.whsCd" :fetch-data="fetchWarehouseData" />
|
||||
</el-form-item>
|
||||
<el-form-item label="货架号" prop="stgBinCd">
|
||||
<el-input
|
||||
|
|
@ -36,40 +37,40 @@
|
|||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="handleInstock"
|
||||
v-hasPermi="['wms:BaseStock:instock']"
|
||||
>入库</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="Edit"
|
||||
:disabled="single"
|
||||
@click="handleOutstock"
|
||||
v-hasPermi="['wms:BaseStock:outstock']"
|
||||
>出库</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['wms:BaseStock:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['wms:BaseStock:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="primary"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="Plus"-->
|
||||
<!-- @click="handleInstock"-->
|
||||
<!-- v-hasPermi="['wms:BaseStock:instock']"-->
|
||||
<!-- >入库</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="success"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="Edit"-->
|
||||
<!-- :disabled="single"-->
|
||||
<!-- @click="handleOutstock"-->
|
||||
<!-- v-hasPermi="['wms:BaseStock:outstock']"-->
|
||||
<!-- >出库</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
|
|
@ -118,7 +119,9 @@
|
|||
</template>
|
||||
|
||||
<script setup name="BaseStock">
|
||||
import { listBaseStock, getBaseStock } from "@/api/wms/BaseStock";
|
||||
import { listBaseStock, getBaseStock } from "@/api/wms/BaseStock"
|
||||
import { listWarehouseInfo } from "@/api/wms/WarehouseInfo";
|
||||
import DataSelect from "@/components/DataSelect/index.vue";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
|
|
@ -136,7 +139,7 @@ const data = reactive({
|
|||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
pageSize: 30,
|
||||
whsCd: null,
|
||||
stgBinCd: null,
|
||||
itemCd: null,
|
||||
|
|
@ -206,38 +209,45 @@ function resetQuery() {
|
|||
handleQuery();
|
||||
}
|
||||
|
||||
// TODO 多选框选中数据 需要修改主键
|
||||
// 多选框选中数据
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map(item => item.whsCd);
|
||||
ids.value = selection.map(item => {
|
||||
return {
|
||||
whsCd: item.whsCd,
|
||||
stgBinCd: item.stgBinCd,
|
||||
itemCd: item.itemCd,
|
||||
lotNo: item.lotNo,
|
||||
subLotNo: item.subLotNo,
|
||||
};
|
||||
});
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 入库按钮操作 */
|
||||
function handleInstock() {
|
||||
proxy.$modal.msg("开发中...");
|
||||
// reset();
|
||||
// open.value = true;
|
||||
// title.value = "入库";
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "入库";
|
||||
}
|
||||
|
||||
/** 出库按钮操作 */
|
||||
function handleOutstock(row) {
|
||||
proxy.$modal.msg("开发中...");
|
||||
// reset();
|
||||
// const _whsCd = row.whsCd || ids.value
|
||||
// getBaseStock(_whsCd).then(response => {
|
||||
// form.value = response.data;
|
||||
// open.value = true;
|
||||
// title.value = "出库";
|
||||
// });
|
||||
function handleOutstock() {
|
||||
reset();
|
||||
let primaryKey = ids.value[0]
|
||||
getBaseStock(primaryKey).then(response => {
|
||||
form.value = response.data;
|
||||
open.value = true;
|
||||
title.value = "出库";
|
||||
});
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
//TODO 未完成
|
||||
proxy.$refs["BaseStockRef"].validate(valid => {
|
||||
if (valid) {
|
||||
if (form.value.whsCd != null) {
|
||||
if (form.value.deptId != null) {
|
||||
// instock(form.value).then(response => {
|
||||
// proxy.$modal.msgSuccess("出库成功");
|
||||
// open.value = false;
|
||||
|
|
@ -261,6 +271,19 @@ function handleExport() {
|
|||
}, `BaseStock_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
// 获取仓库数据
|
||||
async function fetchWarehouseData() {
|
||||
const response = await listWarehouseInfo({})
|
||||
const dataList = []
|
||||
response.rows.map(item => {
|
||||
dataList.push({
|
||||
label: item.whsName,
|
||||
value: item.whsCd,
|
||||
})
|
||||
})
|
||||
return dataList
|
||||
}
|
||||
|
||||
//页面打开时查询
|
||||
//getList();
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,234 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="85px">
|
||||
<el-form-item label="入出库类型" prop="invTransType">
|
||||
<data-select v-model="queryParams.invTransType" dict-name="wms_inv_trans_type" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库" prop="whsCd">
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.whsCd"-->
|
||||
<!-- placeholder="请输入仓库代码"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter="handleQuery"-->
|
||||
<!-- />-->
|
||||
<data-select v-model="queryParams.whsCd" :fetch-data="fetchWarehouseData" />
|
||||
</el-form-item>
|
||||
<el-form-item label="货架号" prop="stgBinCd">
|
||||
<el-input
|
||||
v-model="queryParams.stgBinCd"
|
||||
placeholder="请输入货架号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物品代码" prop="itemCd">
|
||||
<el-input
|
||||
v-model="queryParams.itemCd"
|
||||
placeholder="请输入物品代码"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批号" prop="lotNo">
|
||||
<el-input
|
||||
v-model="queryParams.lotNo"
|
||||
placeholder="请输入批号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['wms:InvTransHis:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="InvTransHisList" @selection-change="handleSelectionChange" :show-overflow-tooltip="true">
|
||||
<el-table-column type="selection" width="30" align="center" />
|
||||
<el-table-column label="入出库履历号" align="center" prop="invTransNo" />
|
||||
<el-table-column label="入出库类型" align="center" prop="invTransType" >
|
||||
<template #default="scope">
|
||||
<dict-tag :options="wms_inv_trans_type" :value="scope.row.invTransType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="存储位置" align="center" >
|
||||
<el-table-column label="仓库代码" align="center" prop="whsCd" />
|
||||
<el-table-column label="货架号" align="center" prop="stgBinCd" />
|
||||
</el-table-column>
|
||||
<el-table-column label="物品代码" align="center" prop="itemCd" />
|
||||
<el-table-column label="批号" align="center" prop="lotNo" />
|
||||
<el-table-column label="子批号" align="center" prop="subLotNo" />
|
||||
<el-table-column label="数量" align="center" >
|
||||
<el-table-column label="标准单位数量" align="center" prop="stdUnitQty" />
|
||||
<el-table-column label="标准单位" align="center" prop="stdUnitName" />
|
||||
<el-table-column label="包装单位数量" align="center" prop="pkgUnitQty" />
|
||||
<el-table-column label="包装单位" align="center" prop="pkgUnitName" />
|
||||
</el-table-column>
|
||||
<el-table-column label="创建者" align="center" prop="createByUser" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改入出库履历对话框 -->
|
||||
<!-- <el-dialog :title="title" v-model="open" width="500px" append-to-body>-->
|
||||
<!-- <el-form ref="InvTransHisRef" :model="form" :rules="rules" label-width="80px">-->
|
||||
<!-- </el-form>-->
|
||||
<!-- <template #footer>-->
|
||||
<!-- <div class="dialog-footer">-->
|
||||
<!-- <el-button type="primary" @click="submitForm">确 定</el-button>-->
|
||||
<!-- <el-button @click="cancel">取 消</el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-dialog>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="InvTransHis">
|
||||
import { listInvTransHis } from "@/api/wms/InvTransHis";
|
||||
import { listWarehouseInfo } from "@/api/wms/WarehouseInfo";
|
||||
import DataSelect from "@/components/DataSelect/index.vue";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const {wms_inv_trans_type} = proxy.useDict("wms_inv_trans_type");
|
||||
|
||||
const InvTransHisList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(false);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 30,
|
||||
invTransType: null,
|
||||
whsCd: null,
|
||||
stgBinCd: null,
|
||||
itemCd: null,
|
||||
lotNo: null,
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询入出库履历列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listInvTransHis(queryParams.value).then(response => {
|
||||
InvTransHisList.value = response.rows;
|
||||
total.value = response.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 取消按钮
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
|
||||
// dialog表单重置(目前无用)
|
||||
function reset() {
|
||||
// form.value = {
|
||||
// deptId: null,
|
||||
// invTransNo: null,
|
||||
// invTransType: null,
|
||||
// whsCd: null,
|
||||
// stgBinCd: null,
|
||||
// palletId: null,
|
||||
// stdUnitQty: null,
|
||||
// pkgUnitQty: null,
|
||||
// transOrderNo: null,
|
||||
// transOrderDetlNo: null,
|
||||
// operator: null,
|
||||
// businessCls: null,
|
||||
// itemCd: null,
|
||||
// lotNo: null,
|
||||
// subLotNo: null,
|
||||
// serialNo: null,
|
||||
// reason: null,
|
||||
// remark1: null,
|
||||
// remark2: null,
|
||||
// remark3: null,
|
||||
// remark4: null,
|
||||
// remark5: null,
|
||||
// updateCount: null,
|
||||
// deleteFlag: null,
|
||||
// createBy: null,
|
||||
// createTime: null,
|
||||
// updateBy: null,
|
||||
// updateTime: null,
|
||||
// remark: null
|
||||
// };
|
||||
// proxy.resetForm("InvTransHisRef");
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
// 多选框选中数据
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map(item => item.invTransNo);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.download('wms/InvTransHis/export', {
|
||||
...queryParams.value
|
||||
}, `InvTransHis_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
// 获取仓库数据
|
||||
async function fetchWarehouseData() {
|
||||
const response = await listWarehouseInfo({})
|
||||
const dataList = []
|
||||
response.rows.map(item => {
|
||||
dataList.push({
|
||||
label: item.whsName,
|
||||
value: item.whsCd,
|
||||
})
|
||||
})
|
||||
return dataList
|
||||
}
|
||||
|
||||
//页面打开时查询
|
||||
//getList();
|
||||
</script>
|
||||
|
|
@ -440,7 +440,7 @@ const data = reactive({
|
|||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
pageSize: 30,
|
||||
itemCd: null,
|
||||
itemName: null,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ const data = reactive({
|
|||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
pageSize: 30,
|
||||
itemTypeName: null,
|
||||
remark1: null,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ const data = reactive({
|
|||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
pageSize: 30,
|
||||
unitCode: null,
|
||||
unitName: null,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ const data = reactive({
|
|||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
pageSize: 30,
|
||||
whsCd: null,
|
||||
whsName: null,
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue