Commit f97623df authored by 刘帅's avatar 刘帅

1.新增物料库存菜单

2.优化页面展示
parent f4301f1e
......@@ -3,6 +3,9 @@ package com.maintain.business.controller;
import java.util.List;
import java.util.Arrays;
import com.maintain.business.domain.ErpMaterialPickingInfo;
import com.maintain.business.domain.bo.ErpMaterialReturnsInfoBo;
import com.maintain.business.domain.vo.ErpMaterialReturnsInfoVo;
import lombok.RequiredArgsConstructor;
import javax.servlet.http.HttpServletResponse;
import javax.validation.constraints.*;
......@@ -43,7 +46,16 @@ public class ErpMaterialPickingInfoController extends BaseController {
@SaCheckPermission("business:materialPickingInfo:list")
@GetMapping("/list")
public TableDataInfo<ErpMaterialPickingInfoVo> list(ErpMaterialPickingInfoBo bo, PageQuery pageQuery) {
return iErpMaterialPickingInfoService.queryPageList(bo, pageQuery);
return iErpMaterialPickingInfoService.customQueryPageList(bo, pageQuery);
}
/**
* 查询物料退货明细列表
*/
@GetMapping("/listAll")
public R<List<ErpMaterialPickingInfoVo>> listAll(ErpMaterialPickingInfoBo bo) {
return R.ok(iErpMaterialPickingInfoService.customQueryList(bo));
}
/**
......@@ -53,7 +65,7 @@ public class ErpMaterialPickingInfoController extends BaseController {
@Log(title = "物料出库明细", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(ErpMaterialPickingInfoBo bo, HttpServletResponse response) {
List<ErpMaterialPickingInfoVo> list = iErpMaterialPickingInfoService.queryList(bo);
List<ErpMaterialPickingInfoVo> list = iErpMaterialPickingInfoService.customQueryList(bo);
ExcelUtil.exportExcel(list, "物料出库明细", ErpMaterialPickingInfoVo.class, response);
}
......
......@@ -46,6 +46,14 @@ public class ErpMaterialPutawayInfoController extends BaseController {
return iErpMaterialPutawayInfoService.customQueryPageList(bo, pageQuery);
}
/**
* 查询物料入库明细列表
*/
@GetMapping("/listAll")
public R<List<ErpMaterialPutawayInfoVo>> list(ErpMaterialPutawayInfoBo bo) {
return R.ok(iErpMaterialPutawayInfoService.customQueryList(bo));
}
/**
* 导出物料入库明细列表
*/
......@@ -53,7 +61,7 @@ public class ErpMaterialPutawayInfoController extends BaseController {
@Log(title = "物料入库明细", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(ErpMaterialPutawayInfoBo bo, HttpServletResponse response) {
List<ErpMaterialPutawayInfoVo> list = iErpMaterialPutawayInfoService.queryList(bo);
List<ErpMaterialPutawayInfoVo> list = iErpMaterialPutawayInfoService.customQueryList(bo);
ExcelUtil.exportExcel(list, "物料入库明细", ErpMaterialPutawayInfoVo.class, response);
}
......
......@@ -43,7 +43,15 @@ public class ErpMaterialReturnsInfoController extends BaseController {
@SaCheckPermission("business:materialReturnsInfo:list")
@GetMapping("/list")
public TableDataInfo<ErpMaterialReturnsInfoVo> list(ErpMaterialReturnsInfoBo bo, PageQuery pageQuery) {
return iErpMaterialReturnsInfoService.queryPageList(bo, pageQuery);
return iErpMaterialReturnsInfoService.customQueryPageList(bo, pageQuery);
}
/**
* 查询物料退货明细列表
*/
@GetMapping("/listAll")
public R<List<ErpMaterialReturnsInfoVo>> listAll(ErpMaterialReturnsInfoBo bo) {
return R.ok(iErpMaterialReturnsInfoService.customQueryList(bo));
}
/**
......@@ -53,7 +61,7 @@ public class ErpMaterialReturnsInfoController extends BaseController {
@Log(title = "物料退货明细", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(ErpMaterialReturnsInfoBo bo, HttpServletResponse response) {
List<ErpMaterialReturnsInfoVo> list = iErpMaterialReturnsInfoService.queryList(bo);
List<ErpMaterialReturnsInfoVo> list = iErpMaterialReturnsInfoService.customQueryList(bo);
ExcelUtil.exportExcel(list, "物料退货明细", ErpMaterialReturnsInfoVo.class, response);
}
......
......@@ -33,7 +33,7 @@ public class ErpMaterialReturns extends BaseEntity {
/**
* 退货单号
*/
private String returnsNumber;
private String returnsCode;
/**
* 退货金额
*/
......@@ -49,7 +49,7 @@ public class ErpMaterialReturns extends BaseEntity {
/**
* 入库单号
*/
private String putawayNumber;
private String putawayCode;
/**
* 订单单号
*/
......
......@@ -9,6 +9,8 @@ import javax.validation.constraints.*;
import java.util.Date;
import java.math.BigDecimal;
import java.util.List;
import com.maintain.common.core.domain.BaseEntity;
/**
......@@ -133,9 +135,14 @@ public class ErpMaterialPickingInfoBo extends BaseEntity {
private BigDecimal money;
/**
* 状态(1已领料 2已退料)
* 状态(1登记中 2已完成 3已退料)
*/
private Integer state;
/**
* 状态(1登记中 2已完成 3已退料)
*/
private List<Integer> stateList;
}
......@@ -34,7 +34,7 @@ public class ErpMaterialReturnsBo extends BaseEntity {
/**
* 退货单号
*/
private String returnsNumber;
private String returnsCode;
/**
* 退货金额
......@@ -57,7 +57,7 @@ public class ErpMaterialReturnsBo extends BaseEntity {
/**
* 入库单号
*/
private String putawayNumber;
private String putawayCode;
/**
* 订单单号
......
......@@ -26,44 +26,32 @@ public class ErpMaterialPickingInfoVo implements Serializable {
/**
* 主键
*/
@ExcelProperty(value = "主键")
private Long id;
/**
* 报修单ID
*/
@ExcelProperty(value = "报修单ID")
private Long repairFormId;
/**
* 出库单ID
* 报修单号
*/
@ExcelProperty(value = "出库单ID")
private Long pickingId;
private String repairNumber;
/**
* 物资分类ID
* 退料单号
*/
@ExcelProperty(value = "物资分类ID")
private Long materialTypeId;
private String returnNumber;
/**
* 物资分类名称
* 出库单号
*/
@ExcelProperty(value = "物资分类名称")
private String materialTypeName;
private String outNumber;
/**
* 仓库货位类型
*/
@ExcelProperty(value = "仓库货位类型")
private String warehouseLocationType;
/**
* 仓库货位ID
* 出库单ID
*/
@ExcelProperty(value = "仓库货位ID")
private Long warehouseLocationId;
private Long pickingId;
/**
* 供应商ID
......@@ -80,7 +68,6 @@ public class ErpMaterialPickingInfoVo implements Serializable {
/**
* 物料ID
*/
@ExcelProperty(value = "物料ID")
private Long materialId;
/**
......@@ -110,8 +97,7 @@ public class ErpMaterialPickingInfoVo implements Serializable {
/**
* 质保期(月)
*/
@ExcelProperty(value = "质保期", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "月=")
@ExcelProperty(value = "质保期(月)")
private Integer materialWarrantyPeriod;
/**
......@@ -151,6 +137,18 @@ public class ErpMaterialPickingInfoVo implements Serializable {
@ExcelDictFormat(readConverterExp = "1=已领料,2=已退料")
private Integer state;
/**
* 创建人
*/
@ExcelProperty(value = "创建人")
private String createBy;
/**
* 创建时间
*/
@ExcelProperty(value = "创建时间")
private Date createTime;
/**
* 可选价格列表
*/
......
......@@ -123,6 +123,7 @@ public class ErpMaterialPutawayInfoVo implements Serializable {
* 质保期(月)
*/
@ExcelProperty(value = "质保期(月)")
@ColumnWidth(14)
private Integer materialWarrantyPeriod;
/**
......
......@@ -33,31 +33,21 @@ public class ErpMaterialReturnsInfoVo implements Serializable {
private Long returnsId;
/**
* 入库表明细ID
*/
private Long putawayInfoId;
/**
* 物资分类ID
*/
private Long materialTypeId;
/**
* 物资分类名称
* 退货单号
*/
@ExcelProperty(value = "物资分类名称")
private String materialTypeName;
@ExcelProperty(value = "退货单号")
private String returnsCode;
/**
* 仓库货位ID
* 入库单号
*/
private Long warehouseLocationId;
@ExcelProperty(value = "入库单号")
private String putawayCode;
/**
* 仓库货位类型
* 入库表明细ID
*/
@ExcelProperty(value = "仓库货位类型")
private String warehouseLocationType;
private Long putawayInfoId;
/**
* 供应商ID
......@@ -102,7 +92,7 @@ public class ErpMaterialReturnsInfoVo implements Serializable {
/**
* 质保期(月)
*/
@ExcelProperty(value = "质保期", converter = ExcelDictConvert.class)
@ExcelProperty(value = "质保期(月)")
private Integer materialWarrantyPeriod;
/**
......@@ -135,5 +125,16 @@ public class ErpMaterialReturnsInfoVo implements Serializable {
@ExcelProperty(value = "退货金额")
private BigDecimal returnsMoney;
/**
* 创建人
*/
@ExcelProperty(value = "创建人")
private String createBy;
/**
* 创建时间
*/
@ExcelProperty(value = "创建时间")
private Date createTime;
}
......@@ -43,13 +43,13 @@ public class ErpMaterialReturnsVo implements Serializable {
* 退货单号
*/
@ExcelProperty(value = "退货单号")
private String returnsNumber;
private String returnsCode;
/**
* 入库单号
*/
@ExcelProperty(value = "入库单号")
private String putawayNumber;
private String putawayCode;
/**
* 到货单号
......
package com.maintain.business.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.maintain.business.domain.ErpMaterialPickingInfo;
import com.maintain.business.domain.ErpMaterialReturnsInfo;
import com.maintain.business.domain.vo.ErpMaterialPickingInfoVo;
import com.maintain.business.domain.vo.ErpMaterialReturnsInfoVo;
import com.maintain.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 物料出库明细Mapper接口
......@@ -12,4 +20,19 @@ import com.maintain.common.core.mapper.BaseMapperPlus;
*/
public interface ErpMaterialPickingInfoMapper extends BaseMapperPlus<ErpMaterialPickingInfoMapper, ErpMaterialPickingInfo, ErpMaterialPickingInfoVo> {
/**
* 自定义分页查询
* @param page
* @param queryWrapper
* @return
*/
Page<ErpMaterialPickingInfoVo> customQueryPageList(@Param("page") Page<ErpMaterialPickingInfo> page, @Param(Constants.WRAPPER) Wrapper<ErpMaterialPickingInfo> queryWrapper);
/**
* 自定义查询
* @param queryWrapper
*/
List<ErpMaterialPickingInfoVo> customQueryList(@Param(Constants.WRAPPER) Wrapper<ErpMaterialPickingInfo> queryWrapper);
}
package com.maintain.business.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.maintain.business.domain.ErpMaterialPutawayInfo;
import com.maintain.business.domain.ErpMaterialReturnsInfo;
import com.maintain.business.domain.vo.ErpMaterialPutawayInfoVo;
import com.maintain.business.domain.vo.ErpMaterialReturnsInfoVo;
import com.maintain.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 物料退货明细Mapper接口
......@@ -12,4 +20,19 @@ import com.maintain.common.core.mapper.BaseMapperPlus;
*/
public interface ErpMaterialReturnsInfoMapper extends BaseMapperPlus<ErpMaterialReturnsInfoMapper, ErpMaterialReturnsInfo, ErpMaterialReturnsInfoVo> {
/**
* 自定义分页查询
* @param page
* @param queryWrapper
* @return
*/
Page<ErpMaterialReturnsInfoVo> customQueryPageList(@Param("page") Page<ErpMaterialReturnsInfo> page, @Param(Constants.WRAPPER) Wrapper<ErpMaterialReturnsInfo> queryWrapper);
/**
* 自定义查询
* @param queryWrapper
*/
List<ErpMaterialReturnsInfoVo> customQueryList(@Param(Constants.WRAPPER) Wrapper<ErpMaterialReturnsInfo> queryWrapper);
}
......@@ -25,12 +25,12 @@ public interface IErpMaterialPickingInfoService {
/**
* 查询物料出库明细列表
*/
TableDataInfo<ErpMaterialPickingInfoVo> queryPageList(ErpMaterialPickingInfoBo bo, PageQuery pageQuery);
TableDataInfo<ErpMaterialPickingInfoVo> customQueryPageList(ErpMaterialPickingInfoBo bo, PageQuery pageQuery);
/**
* 查询物料出库明细列表
*/
List<ErpMaterialPickingInfoVo> queryList(ErpMaterialPickingInfoBo bo);
List<ErpMaterialPickingInfoVo> customQueryList(ErpMaterialPickingInfoBo bo);
/**
* 新增物料出库明细
......
......@@ -35,7 +35,7 @@ public interface IErpMaterialPutawayInfoService {
/**
* 查询物料入库明细列表
*/
List<ErpMaterialPutawayInfoVo> queryList(ErpMaterialPutawayInfoBo bo);
List<ErpMaterialPutawayInfoVo> customQueryList(ErpMaterialPutawayInfoBo bo);
/**
* 新增物料入库明细
......
......@@ -25,12 +25,12 @@ public interface IErpMaterialReturnsInfoService {
/**
* 查询物料退货明细列表
*/
TableDataInfo<ErpMaterialReturnsInfoVo> queryPageList(ErpMaterialReturnsInfoBo bo, PageQuery pageQuery);
TableDataInfo<ErpMaterialReturnsInfoVo> customQueryPageList(ErpMaterialReturnsInfoBo bo, PageQuery pageQuery);
/**
* 查询物料退货明细列表
*/
List<ErpMaterialReturnsInfoVo> queryList(ErpMaterialReturnsInfoBo bo);
List<ErpMaterialReturnsInfoVo> customQueryList(ErpMaterialReturnsInfoBo bo);
/**
* 新增物料退货明细
......
package com.maintain.business.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.maintain.business.domain.ErpMaterialReturnsInfo;
import com.maintain.business.domain.bo.ErpMaterialReturnsInfoBo;
import com.maintain.business.domain.vo.ErpMaterialReturnsInfoVo;
import com.maintain.common.core.page.TableDataInfo;
import com.maintain.common.core.domain.PageQuery;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -42,19 +46,25 @@ public class ErpMaterialPickingInfoServiceImpl implements IErpMaterialPickingInf
* 查询报修单-出库单明细列表
*/
@Override
public TableDataInfo<ErpMaterialPickingInfoVo> queryPageList(ErpMaterialPickingInfoBo bo, PageQuery pageQuery) {
LambdaQueryWrapper<ErpMaterialPickingInfo> lqw = buildQueryWrapper(bo);
Page<ErpMaterialPickingInfoVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
public TableDataInfo<ErpMaterialPickingInfoVo> customQueryPageList(ErpMaterialPickingInfoBo bo, PageQuery pageQuery) {
Page<ErpMaterialPickingInfoVo> result = baseMapper.customQueryPageList(pageQuery.build(), this.buildCustomQueryWrapper(bo));
return TableDataInfo.build(result);
}
/**
* 查询报修单-出库单明细列表
* 查询物料退货明细列表
*/
@Override
public List<ErpMaterialPickingInfoVo> queryList(ErpMaterialPickingInfoBo bo) {
LambdaQueryWrapper<ErpMaterialPickingInfo> lqw = buildQueryWrapper(bo);
return baseMapper.selectVoList(lqw);
public List<ErpMaterialPickingInfoVo> customQueryList(ErpMaterialPickingInfoBo bo) {
return baseMapper.customQueryList(this.buildCustomQueryWrapper(bo));
}
private QueryWrapper<ErpMaterialPickingInfo> buildCustomQueryWrapper(ErpMaterialPickingInfoBo bo) {
QueryWrapper<ErpMaterialPickingInfo> query = Wrappers.query();
query.eq(null != bo.getMaterialId(),"empi.material_id", bo.getMaterialId())
.in(!bo.getStateList().isEmpty(),"empi.state", bo.getStateList());
query.orderByDesc("empi.create_time");
return query;
}
private LambdaQueryWrapper<ErpMaterialPickingInfo> buildQueryWrapper(ErpMaterialPickingInfoBo bo) {
......
......@@ -72,14 +72,15 @@ public class ErpMaterialPutawayInfoServiceImpl implements IErpMaterialPutawayInf
* 查询物料入库明细列表
*/
@Override
public List<ErpMaterialPutawayInfoVo> queryList(ErpMaterialPutawayInfoBo bo) {
public List<ErpMaterialPutawayInfoVo> customQueryList(ErpMaterialPutawayInfoBo bo) {
return baseMapper.customQueryList(this.buildCustomQueryWrapper(bo));
}
private QueryWrapper<ErpMaterialPutawayInfo> buildCustomQueryWrapper(ErpMaterialPutawayInfoBo bo) {
QueryWrapper<ErpMaterialPutawayInfo> query = Wrappers.query();
query.like(null != bo.getPutawayCode(),"emp.putaway_number", bo.getPutawayCode())
query.like(null != bo.getPutawayCode(),"emp.putaway_code", bo.getPutawayCode())
.like(null != bo.getVendorName(),"empi.vendor_name", bo.getVendorName())
.eq(null != bo.getMaterialId(),"empi.material_id", bo.getMaterialId())
.like(null != bo.getMaterialCode(),"empi.material_code", bo.getMaterialCode())
.like(null != bo.getMaterialName(),"empi.material_name", bo.getMaterialName());
query.orderByDesc("empi.create_time");
......
package com.maintain.business.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.maintain.business.domain.ErpMaterialPutawayInfo;
import com.maintain.business.domain.bo.ErpMaterialPutawayInfoBo;
import com.maintain.common.utils.StringUtils;
import com.maintain.common.core.page.TableDataInfo;
import com.maintain.common.core.domain.PageQuery;
......@@ -43,19 +46,24 @@ public class ErpMaterialReturnsInfoServiceImpl implements IErpMaterialReturnsInf
* 查询物料退货明细列表
*/
@Override
public TableDataInfo<ErpMaterialReturnsInfoVo> queryPageList(ErpMaterialReturnsInfoBo bo, PageQuery pageQuery) {
LambdaQueryWrapper<ErpMaterialReturnsInfo> lqw = buildQueryWrapper(bo);
Page<ErpMaterialReturnsInfoVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
return TableDataInfo.build(result);
public TableDataInfo<ErpMaterialReturnsInfoVo> customQueryPageList(ErpMaterialReturnsInfoBo bo, PageQuery pageQuery) {
Page<ErpMaterialReturnsInfoVo> returnsInfoVoPage = baseMapper.customQueryPageList(pageQuery.build(), this.buildCustomQueryWrapper(bo));
return TableDataInfo.build(returnsInfoVoPage);
}
/**
* 查询物料退货明细列表
*/
@Override
public List<ErpMaterialReturnsInfoVo> queryList(ErpMaterialReturnsInfoBo bo) {
LambdaQueryWrapper<ErpMaterialReturnsInfo> lqw = buildQueryWrapper(bo);
return baseMapper.selectVoList(lqw);
public List<ErpMaterialReturnsInfoVo> customQueryList(ErpMaterialReturnsInfoBo bo) {
return baseMapper.customQueryList(this.buildCustomQueryWrapper(bo));
}
private QueryWrapper<ErpMaterialReturnsInfo> buildCustomQueryWrapper(ErpMaterialReturnsInfoBo bo) {
QueryWrapper<ErpMaterialReturnsInfo> query = Wrappers.query();
query.eq(null != bo.getMaterialId(),"emri.material_id", bo.getMaterialId());
query.orderByDesc("emri.create_time");
return query;
}
private LambdaQueryWrapper<ErpMaterialReturnsInfo> buildQueryWrapper(ErpMaterialReturnsInfoBo bo) {
......
......@@ -90,8 +90,8 @@ public class ErpMaterialReturnsServiceImpl implements IErpMaterialReturnsService
lqw.eq(bo.getReturnsMoney() != null, ErpMaterialReturns::getReturnsMoney, bo.getReturnsMoney());
lqw.eq(bo.getReturnsTime() != null, ErpMaterialReturns::getReturnsTime, bo.getReturnsTime());
lqw.eq(bo.getPutawayId() != null, ErpMaterialReturns::getPutawayId, bo.getPutawayId());
lqw.like(StringUtils.isNotBlank(bo.getReturnsNumber()), ErpMaterialReturns::getReturnsNumber, bo.getReturnsNumber());
lqw.like(StringUtils.isNotBlank(bo.getPutawayNumber()), ErpMaterialReturns::getPutawayNumber, bo.getPutawayNumber());
lqw.like(StringUtils.isNotBlank(bo.getReturnsCode()), ErpMaterialReturns::getReturnsCode, bo.getReturnsCode());
lqw.like(StringUtils.isNotBlank(bo.getReturnsCode()), ErpMaterialReturns::getReturnsCode, bo.getReturnsCode());
lqw.like(StringUtils.isNotBlank(bo.getOrderNumber()), ErpMaterialReturns::getOrderNumber, bo.getOrderNumber());
lqw.like(StringUtils.isNotBlank(bo.getArrivalNumber()), ErpMaterialReturns::getArrivalNumber, bo.getArrivalNumber());
lqw.eq(StringUtils.isNotBlank(bo.getPutawayType()), ErpMaterialReturns::getPutawayType, bo.getPutawayType());
......@@ -116,7 +116,7 @@ public class ErpMaterialReturnsServiceImpl implements IErpMaterialReturnsService
ErpMaterialReturns materialReturns = BeanUtil.toBean(materialPutawayVo, ErpMaterialReturns.class);
materialReturns.setId(null);
materialReturns.setPutawayId(bo.getPutawayId());
materialReturns.setReturnsNumber(RedisUtils.generateNextNumber("TH"));
materialReturns.setReturnsCode(RedisUtils.generateNextNumber("TH"));
materialReturns.setReturnsMoney(bo.getReturnsMoney());
materialReturns.setReturnsTime(bo.getReturnsTime());
materialReturns.setCreateDeptId(LoginHelper.getDeptId());
......
......@@ -4,14 +4,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.maintain.business.mapper.ErpMaterialPickingInfoMapper">
<resultMap type="com.maintain.business.domain.ErpMaterialPickingInfo" id="ErpMaterialPickingInfoResult">
<resultMap type="com.maintain.business.domain.vo.ErpMaterialPickingInfoVo" id="ErpMaterialPickingInfoResult">
<result property="id" column="id"/>
<result property="repairFormId" column="repair_form_id"/>
<result property="pickingId" column="picking_id"/>
<result property="materialTypeId" column="material_type_id"/>
<result property="materialTypeName" column="material_type_name"/>
<result property="warehouseLocationType" column="warehouse_location_type"/>
<result property="warehouseLocationId" column="warehouse_location_id"/>
<result property="vendorId" column="vendor_id"/>
<result property="vendorName" column="vendor_name"/>
<result property="materialId" column="material_id"/>
......@@ -28,9 +24,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="state" column="state"/>
<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="returnNumber" column="return_number"/>
<result property="repairNumber" column="repair_number"/>
<result property="outNumber" column="out_number"/>
</resultMap>
<sql id="info">
SELECT
empi.id, empi.repair_form_id, empi.picking_id, empi.vendor_id, empi.vendor_name, empi.material_id, empi.material_code,
empi.material_name,empi.material_specifications, empi.material_unit, empi.material_warranty_period, empi.reference_price, empi.selling_price, empi.collect_number,
empi.price, empi.money, empi.state, empi.create_by, empi.create_time, emp.return_number, emp.repair_number, emp.out_number
FROM erp_material_picking_info empi
LEFT JOIN erp_material_picking emp ON empi.picking_id = emp.id
</sql>
<select id="customQueryPageList" resultType="com.maintain.business.domain.vo.ErpMaterialPickingInfoVo">
<include refid="info" />
${ew.getCustomSqlSegment}
</select>
<select id="customQueryList" resultType="com.maintain.business.domain.vo.ErpMaterialPickingInfoVo">
<include refid="info" />
${ew.getCustomSqlSegment}
</select>
</mapper>
......@@ -3,14 +3,11 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.maintain.business.mapper.ErpMaterialReturnsInfoMapper">
<resultMap type="com.maintain.business.domain.ErpMaterialReturnsInfo" id="ErpMaterialReturnsInfoResult">
<resultMap type="com.maintain.business.domain.vo.ErpMaterialReturnsInfoVo" id="ErpMaterialReturnsInfoResult">
<result property="id" column="id"/>
<result property="returnsId" column="returns_id"/>
<result property="materialTypeId" column="material_type_id"/>
<result property="materialTypeName" column="material_type_name"/>
<result property="warehouseLocationId" column="warehouse_location_id"/>
<result property="warehouseLocationType" column="warehouse_location_type"/>
<result property="returnsCode" column="returns_code"/>
<result property="putawayNumber" column="putaway_code"/>
<result property="vendorId" column="vendor_id"/>
<result property="vendorName" column="vendor_name"/>
<result property="materialId" column="material_id"/>
......@@ -26,9 +23,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="returnsMoney" column="returns_money"/>
<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="info">
SELECT
emri.id,
emri.returns_id,
emri.putaway_info_id,
emri.vendor_id,
emri.vendor_name,
emri.material_id,
emri.material_code,
emri.material_name,
emri.material_specifications,
emri.material_unit,
emri.material_warranty_period,
emri.reference_price,
emri.selling_price,
emri.returns_number,
emri.returns_price, emri.returns_money, emri.create_by, emri.create_time,emr.returns_code,emr.putaway_id,emr.putaway_code
FROM erp_material_returns_info emri
LEFT JOIN erp_material_returns emr ON emri.returns_id = emr.id
</sql>
<select id="customQueryPageList" resultType="com.maintain.business.domain.vo.ErpMaterialReturnsInfoVo">
<include refid="info" />
${ew.getCustomSqlSegment}
</select>
<select id="customQueryList" resultType="com.maintain.business.domain.vo.ErpMaterialReturnsInfoVo">
<include refid="info" />
${ew.getCustomSqlSegment}
</select>
</mapper>
......@@ -9,6 +9,15 @@ export function listMaterialPickingInfo(query) {
})
}
// 查询物料出库明细列表
export function listMaterialPickingInfoAll(query) {
return request({
url: '/business/materialPickingInfo/listAll',
method: 'get',
params: query
})
}
// 查询物料出库明细详细
export function getMaterialPickingInfo(id) {
return request({
......
......@@ -9,6 +9,15 @@ export function listMaterialPutawayInfo(query) {
})
}
// 查询物料入库明细列表
export function listMaterialPutawayInfoAll(query) {
return request({
url: '/business/materialPutawayInfo/listAll',
method: 'get',
params: query
})
}
// 查询物料入库明细详细
export function getMaterialPutawayInfo(id) {
return request({
......
......@@ -9,6 +9,15 @@ export function listMaterialReturnsInfo(query) {
})
}
// 查询物料退货明细列表
export function listMaterialReturnsInfoAll(query) {
return request({
url: '/business/materialReturnsInfo/listAll',
method: 'get',
params: query
})
}
// 查询物料退货明细详细
export function getMaterialReturnsInfo(id) {
return request({
......
......@@ -153,7 +153,7 @@
<el-table-column label="质保期(月)" align="center" prop="materialWarrantyPeriod" />
<el-table-column label="参考价" align="center" prop="referencePrice" />
<el-table-column label="销售价" align="center" prop="sellingPrice" />
<el-table-column label="库存" align="center" prop="inventory" />
<!-- <el-table-column label="库存" align="center" prop="inventory" />-->
<el-table-column label="是否启用" align="center" prop="isEnable">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_is_enable" :value="scope.row.isEnable"/>
......
......@@ -79,7 +79,7 @@
size="mini"
@click="handleExport"
v-hasPermi="['business:materialPutaway:export']"
>导出</el-button>
>导出明细</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
......@@ -749,9 +749,9 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
this.download('business/materialPutaway/export', {
this.download('business/materialPutawayInfo/export', {
...this.queryParams
}, `入库单_${new Date().getTime()}.xlsx`)
}, `入库单明细_${new Date().getTime()}.xlsx`)
}
}
};
......
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="供应商名称" prop="vendorName">
<el-input
v-model="queryParams.vendorName"
placeholder="请输入供应商名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="物资编码" prop="materialCode">
<el-input
v-model="queryParams.materialCode"
placeholder="请输入物资编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="物资名称" prop="materialName">
<el-input
v-model="queryParams.materialName"
placeholder="请输入物资名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="物资规格" prop="materialSpecifications">
<el-input
v-model="queryParams.materialSpecifications"
placeholder="请输入物资规格"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="是否启用" prop="isEnable">
<el-select v-model="queryParams.isEnable" placeholder="是否启用" clearable>
<el-option
v-for="dict in dict.type.sys_is_enable"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="是否盘点" prop="isCheck">
<el-select v-model="queryParams.isCheck" placeholder="是否盘点" clearable>
<el-option
v-for="dict in dict.type.sys_is_enable"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="是否通用" prop="isUniversal">
<el-select v-model="queryParams.isUniversal" placeholder="是否通用" clearable>
<el-option
v-for="dict in dict.type.sys_is_enable"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="materialList">
<el-table-column label="物资编码" align="center" fixed="left" prop="materialCode" />
<el-table-column label="物资名称" align="center" fixed="left" prop="materialName" />
<el-table-column label="物资规格" align="center" fixed="left" prop="materialSpecifications" />
<el-table-column label="物资品牌" align="center" fixed="left" prop="materialBrand" />
<el-table-column label="物资单位" align="center" fixed="left" prop="materialUnit" />
<el-table-column label="所在仓库" align="center" prop="warehouseName" />
<!-- <el-table-column label="分类名称" align="center" prop="materialTypeName" />-->
<el-table-column label="供应商" align="center" prop="vendorName" show-overflow-tooltip />
<el-table-column label="采购标的" align="center" prop="procurementSubject" />
<el-table-column label="适用车型" align="center" prop="compatibleWith" />
<el-table-column label="物资图片" align="center" prop="materialUrl">
<template slot-scope="scope">
<image-preview :src="scope.row.materialUrl" style="width: 50px; height: 50px" />
</template>
</el-table-column>
<el-table-column label="质保期(月)" align="center" prop="materialWarrantyPeriod" />
<el-table-column label="参考价" align="center" prop="referencePrice" />
<el-table-column label="销售价" align="center" prop="sellingPrice" />
<el-table-column label="库存" align="center" prop="inventory" />
<el-table-column label="是否启用" align="center" prop="isEnable">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_is_enable" :value="scope.row.isEnable"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="90px" fixed="right" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleUpdate(scope.row)"
v-hasPermi="['business:materialStock:query']"
>库存明细</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改物资对话框 -->
<el-dialog :title="title" :visible.sync="open" width="70%" append-to-body>
<el-tabs v-model="active">
<el-tab-pane label="入库记录" name="1">
<el-table :data="materialPutawayInfoList">
<el-table-column label="入库单号" align="center" prop="putawayCode" />
<el-table-column label="状态" align="center" prop="state">
<template slot-scope="scope">
<dict-tag :options="dict.type.putaway_info_state" :value="scope.row.state" />
</template>
</el-table-column>
<el-table-column label="入库数量" align="center" prop="putawayNumber" />
<el-table-column label="入库单价" align="center" prop="putawayPrice" />
<el-table-column label="入库金额" align="center" prop="putawayMoney" />
<el-table-column label="创建人" align="center" prop="createBy" />
<el-table-column label="创建时间" align="center" prop="createTime" />
</el-table>
</el-tab-pane>
<el-tab-pane label="退货记录" name="2">
<el-table :data="materialReturnsInfoList">
<el-table-column label="退货单号" align="center" prop="returnsNumber" />
<el-table-column label="入库单号" align="center" prop="putawayCode" />
<el-table-column label="退货数量" align="center" prop="returnsNumber" />
<el-table-column label="退货单价" align="center" prop="returnsPrice" />
<el-table-column label="退货金额" align="center" prop="returnsMoney" />
<el-table-column label="创建人" align="center" prop="createBy" />
<el-table-column label="创建时间" align="center" prop="createTime" />
</el-table>
</el-tab-pane>
<el-tab-pane label="出库记录" name="3">
<el-table :data="materialPickingInfoList">
<el-table-column label="报修单号" align="center" prop="repairNumber" />
<el-table-column label="出库单号" align="center" prop="outNumber" />
<el-table-column label="出库数量" align="center" prop="collectNumber" />
<el-table-column label="出库单价" align="center" prop="price" />
<el-table-column label="出库金额" align="center" prop="money" />
<el-table-column label="创建人" align="center" prop="createBy" />
<el-table-column label="创建时间" align="center" prop="createTime" />
</el-table>
</el-tab-pane>
<el-tab-pane label="退料记录" name="4">
<el-table :data="materialBackInfoList">
<el-table-column label="报修单号" align="center" prop="repairNumber" />
<el-table-column label="出库单号" align="center" prop="outNumber" />
<el-table-column label="退料单号" align="center" prop="returnNumber" />
<el-table-column label="退料数量" align="center" prop="collectNumber" />
<el-table-column label="退料单价" align="center" prop="price" />
<el-table-column label="退料金额" align="center" prop="money" />
<el-table-column label="创建人" align="center" prop="createBy" />
<el-table-column label="创建时间" align="center" prop="createTime" />
</el-table>
</el-tab-pane>
</el-tabs>
</el-dialog>
</div>
</template>
<script>
import {listMaterial} from "@/api/business/material";
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import {listMaterialPutawayInfoAll} from "@/api/business/materialPutawayInfo";
import {listMaterialReturnsInfoAll} from "@/api/business/materialReturnsInfo";
import {listMaterialPickingInfoAll} from "@/api/business/materialPickingInfo";
export default {
name: "Material",
dicts:['sys_is_enable', 'putaway_info_state', 'picking_state'],
components: { Treeselect },
data() {
return {
active: '1',
// 按钮loading
buttonLoading: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
names: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 物资表格数据
materialList: [],
// 物料入库明细表格数据
materialPutawayInfoList: [],
// 物料退货明细表格数据
materialReturnsInfoList: [],
// 物料出库明细表格数据
materialPickingInfoList: [],
// 物料退料明细表格数据
materialBackInfoList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
materialTypeId: undefined,
materialTypeName: undefined,
warehouseLocationId: undefined,
warehouseLocationType: undefined,
vendorId: undefined,
vendorName: undefined,
materialCode: undefined,
materialName: undefined,
materialSpecifications: undefined,
materialUnit: undefined,
materialWarrantyPeriod: undefined,
referencePrice: undefined,
sellingPrice: undefined,
inventory: undefined,
isEnable: undefined,
isUniversal: undefined,
isCheck: undefined,
},
// 表单参数
form: {},
};
},
created() {
this.getList();
},
methods: {
/** 查询物资列表 */
getList() {
this.loading = true;
listMaterial(this.queryParams).then(response => {
this.materialList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 物资分类更改 */
// materialTypeIdChange() {
// this.$refs.form.clearValidate('materialTypeId')
// },
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: undefined,
materialTypeId: undefined,
materialTypeName: undefined,
warehouseLocationId: undefined,
warehouseLocationType: undefined,
vendorId: undefined,
vendorName: undefined,
materialCode: undefined,
materialName: undefined,
materialSpecifications: undefined,
materialUnit: undefined,
materialBrand: undefined,
procurementSubject: undefined,
compatibleWith: undefined,
materialUrl: undefined,
materialWarrantyPeriod: 1,
referencePrice: 0,
sellingPrice: 0,
inventory: 0,
isEnable: '1',
isUniversal: '1',
createBy: undefined,
createTime: undefined,
updateBy: undefined,
updateTime: undefined
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 修改按钮操作 */
handleUpdate(row) {
this.open = true;
this.title = `物资【${row.materialName}】库存记录`;
this.getPutawayInfoList(row.id)
this.getReturnsInfoList(row.id)
this.getPickingInfoList(row.id)
this.getBackInfoList(row.id)
},
/** 查询物料入库明细列表 */
getPutawayInfoList(materialId) {
listMaterialPutawayInfoAll({materialId}).then(response => {
this.materialPutawayInfoList = response.data;
});
},
/** 查询物料退货明细列表 */
getReturnsInfoList(materialId) {
listMaterialReturnsInfoAll({materialId}).then(response => {
this.materialReturnsInfoList = response.data;
});
},
/** 查询物料出库列表 */
getPickingInfoList(materialId) {
listMaterialPickingInfoAll({materialId, stateList:[1, 2]}).then(response => {
this.materialPickingInfoList = response.data;
});
},
/** 查询物料退料列表 */
getBackInfoList(materialId) {
listMaterialPickingInfoAll({materialId, stateList:[3]}).then(response => {
this.materialBackInfoList = response.data;
});
},
}
};
</script>
......@@ -104,17 +104,17 @@
<el-table v-loading="loading" :data="repairFormList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="序号" align="center" type="index" />
<el-table-column label="报修单号" align="center" prop="repairNumber" />
<el-table-column label="序号" align="center" type="index" fixed="left" min-width="30px" />
<el-table-column label="报修单号" align="center" prop="repairNumber" fixed="left" min-width="120px"/>
<el-table-column label="客户类型" align="center" prop="repairNumber">
<template slot-scope="scope">
<dict-tag :options="dict.type.client_type" :value="scope.row.client.type"/>
</template>
</el-table-column>
<el-table-column label="客户名称" align="center" prop="client.name" />
<el-table-column label="客户名称" align="center" prop="client.name" min-width="120px" show-overflow-tooltip/>
<el-table-column label="联系方式" align="center" prop="client.phone" min-width="130px" show-overflow-tooltip />
<el-table-column label="车辆品牌" align="center" prop="car.carBrand" />
<el-table-column label="车牌号" align="center" prop="car.plateNumber" />
<el-table-column label="车牌号" align="center" prop="car.plateNumber" min-width="95px"/>
<el-table-column label="总工时" align="center" prop="totalActualTime" />
<el-table-column label="工时费用(元)" align="center" prop="totalActualTimeMoney" min-width="120px" />
<el-table-column label="材料费用(元)" align="center" prop="totalMaterialMoney" min-width="120px" />
......@@ -124,17 +124,17 @@
<el-table-column label="结算时间" align="center" prop="settlementTime" min-width="150px" />
<el-table-column label="登记时间" align="center" prop="createTime" min-width="150px" />
<el-table-column label="登记人员" align="center" prop="createBy" min-width="100px" />
<el-table-column label="是否交车" align="center" prop="isDelivery" fixed="right">
<el-table-column label="是否交车" align="center" prop="isDelivery" fixed="right" min-width="70px">
<template slot-scope="scope">
<dict-tag :options="dict.type.repair_form_is_delivery" :value="scope.row.isDelivery" />
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="state" fixed="right" min-width="90px">
<el-table-column label="状态" align="center" prop="state" fixed="right" min-width="70px">
<template slot-scope="scope">
<dict-tag :options="dict.type.repair_form_state" :value="scope.row.state" />
</template>
</el-table-column>
<el-table-column label="结算状态" align="center" prop="settlementState" fixed="right" min-width="90px">
<el-table-column label="结算状态" align="center" prop="settlementState" fixed="right" min-width="80px">
<template slot-scope="scope">
<dict-tag :options="dict.type.repair_form_settlement_state" :value="scope.row.settlementState" />
</template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment