feat(stock): 优化出入库管理功能
- 在出库单页面添加仓库编码和仓库名称显示列 - 在入库单页面添加仓库选择功能和备注显示列 - 添加单据来源字段用于区分ERP/MES系统来源 - 优化物料管理页面的字段显示和表单布局 - 添加MES系统接口服务支持物料和单据传输 - 修复物料编码重复校验逻辑 - 优化入库单保存时的用户信息获取机制 - 添加安全配置支持MES/ERP接口访问权限 - 重构API控制器支持POST请求方式数据传输 - 优化库存物资视图显示仓库名称信息
This commit is contained in:
@@ -1,21 +1,17 @@
|
||||
package com.ruoyi.api.controller;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.ruoyi.api.domain.ReMaterialParam;
|
||||
import com.ruoyi.api.domain.RequestEnter;
|
||||
import com.ruoyi.api.domain.WmsJobRequest;
|
||||
import com.ruoyi.api.service.IToErpService;
|
||||
import com.ruoyi.api.service.IToWmsService;
|
||||
import com.ruoyi.bas.BasCustomer.domain.BasCustomer;
|
||||
import com.ruoyi.bas.BasProduct.domain.BasProduct;
|
||||
import com.ruoyi.bas.BasSupplier.domain.BasSupplier;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.log.domain.RequestLog;
|
||||
import com.ruoyi.log.service.IRequestLogService;
|
||||
import com.ruoyi.in.stockin.domain.vo.InstockInVo;
|
||||
import com.ruoyi.out.outStockout.domain.OutStockoutVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 作业统计 Controller
|
||||
@@ -30,14 +26,14 @@ public class ToErpApiController {
|
||||
/**
|
||||
* 接收物料信息
|
||||
*/
|
||||
@GetMapping("/receiveMaterial")
|
||||
@PostMapping("/receiveMaterial")
|
||||
public AjaxResult receiveMaterial(@RequestBody BasProduct basProduct) {
|
||||
return toErpService.receiveMaterial(basProduct);
|
||||
}
|
||||
/**
|
||||
* 接收客户信息
|
||||
*/
|
||||
@GetMapping("/receiveCustomer")
|
||||
@PostMapping("/receiveCustomer")
|
||||
public AjaxResult receiveCustomer(@RequestBody BasCustomer basProduct) {
|
||||
return toErpService.receiveCustomer(basProduct);
|
||||
}
|
||||
@@ -45,8 +41,31 @@ public class ToErpApiController {
|
||||
/**
|
||||
* 接收供应商信息
|
||||
*/
|
||||
@GetMapping("/receiveSupplier")
|
||||
@PostMapping("/receiveSupplier")
|
||||
public AjaxResult receiveSupplier(@RequestBody BasSupplier basSupplier) {
|
||||
return toErpService.receiveSupplier(basSupplier);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取入库单据信息
|
||||
*/
|
||||
@PostMapping("/receiveInBill")
|
||||
public AjaxResult receiveInBill(@RequestBody InstockInVo inStockinVo) {
|
||||
return toErpService.receiveInBill(inStockinVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取出库单据信息
|
||||
*/
|
||||
@PostMapping("/receiveOutBill")
|
||||
public AjaxResult receiveOutBill(@RequestBody OutStockoutVo outStockoutVo) {
|
||||
return toErpService.receiveOutBill(outStockoutVo);
|
||||
}
|
||||
/**
|
||||
* 单据信息回传
|
||||
*/
|
||||
@PostMapping("/callBackInAndOutBill")
|
||||
public AjaxResult callBackInAndOutBill() {
|
||||
return toErpService.callBackInAndOutBill();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.ruoyi.api.controller;
|
||||
|
||||
import com.ruoyi.api.service.IToErpService;
|
||||
import com.ruoyi.api.service.IToMesService;
|
||||
import com.ruoyi.bas.BasCustomer.domain.BasCustomer;
|
||||
import com.ruoyi.bas.BasProduct.domain.BasProduct;
|
||||
import com.ruoyi.bas.BasSupplier.domain.BasSupplier;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.in.stockin.domain.vo.InstockInVo;
|
||||
import com.ruoyi.out.outStockout.domain.OutStockoutVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 作业统计 Controller
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api2mes")
|
||||
public class ToMesApiController {
|
||||
|
||||
@Autowired
|
||||
private IToMesService toMesService;
|
||||
|
||||
/**
|
||||
* 接收物料信息
|
||||
*/
|
||||
@PostMapping("/receiveMaterial")
|
||||
public AjaxResult receiveMaterial(@RequestBody BasProduct basProduct) {
|
||||
return toMesService.receiveMaterial(basProduct);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取入库单据信息
|
||||
*/
|
||||
@PostMapping("/receiveInBill")
|
||||
public AjaxResult receiveInBill(@RequestBody InstockInVo inStockinVo) {
|
||||
return toMesService.receiveInBill(inStockinVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取出库单据信息
|
||||
*/
|
||||
@PostMapping("/receiveOutBill")
|
||||
public AjaxResult receiveOutBill(@RequestBody OutStockoutVo outStockoutVo) {
|
||||
return toMesService.receiveOutBill(outStockoutVo);
|
||||
}
|
||||
/**
|
||||
* 单据信息回传
|
||||
*/
|
||||
}
|
||||
@@ -103,13 +103,4 @@ public class ToWmsApiController {
|
||||
return ajaxResult;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 接收入库单据
|
||||
*/
|
||||
|
||||
/**
|
||||
* 接收出库单据
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ import com.ruoyi.bas.BasCustomer.domain.BasCustomer;
|
||||
import com.ruoyi.bas.BasProduct.domain.BasProduct;
|
||||
import com.ruoyi.bas.BasSupplier.domain.BasSupplier;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.in.stockin.domain.vo.InstockInVo;
|
||||
import com.ruoyi.out.outStockout.domain.OutStockoutVo;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@@ -22,4 +24,10 @@ public interface IToErpService {
|
||||
AjaxResult receiveCustomer(BasCustomer basProduct);
|
||||
|
||||
AjaxResult receiveSupplier(BasSupplier basSupplier);
|
||||
|
||||
AjaxResult receiveInBill(InstockInVo inStockinVo);
|
||||
|
||||
AjaxResult receiveOutBill(OutStockoutVo outStockoutVo);
|
||||
|
||||
AjaxResult callBackInAndOutBill();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.ruoyi.api.service;
|
||||
|
||||
import com.ruoyi.bas.BasCustomer.domain.BasCustomer;
|
||||
import com.ruoyi.bas.BasProduct.domain.BasProduct;
|
||||
import com.ruoyi.bas.BasSupplier.domain.BasSupplier;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.in.stockin.domain.vo.InstockInVo;
|
||||
import com.ruoyi.out.outStockout.domain.OutStockoutVo;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 作业统计 Service 接口
|
||||
*/
|
||||
public interface IToMesService {
|
||||
|
||||
|
||||
Map<String,String> saveTransferBill();
|
||||
|
||||
Map<String,String> billCompletedCallBack();
|
||||
|
||||
AjaxResult receiveMaterial(BasProduct basProduct);
|
||||
|
||||
AjaxResult receiveCustomer(BasCustomer basProduct);
|
||||
|
||||
AjaxResult receiveSupplier(BasSupplier basSupplier);
|
||||
|
||||
AjaxResult receiveInBill(InstockInVo inStockinVo);
|
||||
|
||||
AjaxResult receiveOutBill(OutStockoutVo outStockoutVo);
|
||||
|
||||
AjaxResult callBackInAndOutBill();
|
||||
}
|
||||
@@ -1,9 +1,6 @@
|
||||
package com.ruoyi.api.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.ruoyi.api.mapper.JobStatisticsMapper;
|
||||
import com.ruoyi.api.service.IJobStatisticsService;
|
||||
import com.ruoyi.api.service.IToErpService;
|
||||
import com.ruoyi.bas.BasCustomer.domain.BasCustomer;
|
||||
import com.ruoyi.bas.BasCustomer.service.IBasCustomerService;
|
||||
@@ -11,17 +8,15 @@ import com.ruoyi.bas.BasProduct.domain.BasProduct;
|
||||
import com.ruoyi.bas.BasProduct.service.IBasProductService;
|
||||
import com.ruoyi.bas.BasSupplier.domain.BasSupplier;
|
||||
import com.ruoyi.bas.BasSupplier.service.IBasSupplierService;
|
||||
import com.ruoyi.bas.cargoSpace.mapper.BasCargoSpaceMapper;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.job.mydojob.domain.MydoJob;
|
||||
import com.ruoyi.job.mydojob.mapper.MydoJobMapper;
|
||||
import com.ruoyi.in.stockin.domain.vo.InstockInVo;
|
||||
import com.ruoyi.in.stockin.service.IInStockinService;
|
||||
import com.ruoyi.out.outStockout.domain.OutStockoutVo;
|
||||
import com.ruoyi.out.outStockout.service.IOutStockoutService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -39,6 +34,12 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
@Autowired
|
||||
private IBasCustomerService basCustomerService;
|
||||
|
||||
@Autowired
|
||||
private IInStockinService inStockinService;
|
||||
|
||||
@Autowired
|
||||
private IOutStockoutService outStockoutService;
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, String> saveTransferBill() {
|
||||
@@ -58,6 +59,7 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
public AjaxResult receiveMaterial(BasProduct basProduct) {
|
||||
String productId = basProduct.getProductId();
|
||||
BasProduct oldProduct = basProductService.selectBasProductByProductId(productId);
|
||||
basProduct.setSpare1("erp");
|
||||
if (ObjUtil.isNotNull(oldProduct)){
|
||||
basProductService.updateBasProduct(basProduct);
|
||||
}else {
|
||||
@@ -89,4 +91,19 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult receiveInBill(InstockInVo inStockinVo) {
|
||||
return inStockinService.insertInStockin(inStockinVo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult receiveOutBill(OutStockoutVo outStockoutVo) {
|
||||
return AjaxResult.success("操作成功",outStockoutService.saveBill(outStockoutVo));
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult callBackInAndOutBill() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.ruoyi.api.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import com.ruoyi.api.service.IToMesService;
|
||||
import com.ruoyi.bas.BasCustomer.domain.BasCustomer;
|
||||
import com.ruoyi.bas.BasCustomer.service.IBasCustomerService;
|
||||
import com.ruoyi.bas.BasProduct.domain.BasProduct;
|
||||
import com.ruoyi.bas.BasProduct.service.IBasProductService;
|
||||
import com.ruoyi.bas.BasSupplier.domain.BasSupplier;
|
||||
import com.ruoyi.bas.BasSupplier.service.IBasSupplierService;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.in.stockin.domain.vo.InstockInVo;
|
||||
import com.ruoyi.in.stockin.service.IInStockinService;
|
||||
import com.ruoyi.out.outStockout.domain.OutStockoutVo;
|
||||
import com.ruoyi.out.outStockout.service.IOutStockoutService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 作业统计 Service 实现
|
||||
*/
|
||||
@Service
|
||||
public class ToMesServiceImpl implements IToMesService {
|
||||
|
||||
@Autowired
|
||||
private IBasProductService basProductService;
|
||||
|
||||
@Autowired
|
||||
private IBasSupplierService basSupplierService;
|
||||
|
||||
@Autowired
|
||||
private IBasCustomerService basCustomerService;
|
||||
|
||||
@Autowired
|
||||
private IInStockinService inStockinService;
|
||||
|
||||
@Autowired
|
||||
private IOutStockoutService outStockoutService;
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, String> saveTransferBill() {
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("code","200");
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> billCompletedCallBack() {
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("code","200");
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult receiveMaterial(BasProduct basProduct) {
|
||||
String productId = basProduct.getProductId();
|
||||
BasProduct oldProduct = basProductService.selectBasProductByProductId(productId);
|
||||
basProduct.setSpare1("mes");
|
||||
if (ObjUtil.isNotNull(oldProduct)){
|
||||
basProductService.updateBasProduct(basProduct);
|
||||
}else {
|
||||
basProductService.insertBasProduct(basProduct);
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult receiveCustomer(BasCustomer basCustomer) {
|
||||
String customerNo = basCustomer.getId();
|
||||
BasCustomer oldCustomer = basCustomerService.selectBasCustomerById(customerNo);
|
||||
if (ObjUtil.isNotNull(oldCustomer)){
|
||||
basCustomerService.updateBasCustomer(basCustomer);
|
||||
}else {
|
||||
basCustomerService.insertBasCustomer(basCustomer);
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult receiveSupplier(BasSupplier basSupplier) {
|
||||
String supplierNo = basSupplier.getId();
|
||||
BasSupplier oldSupplier = basSupplierService.selectBasSupplierById(supplierNo);
|
||||
if (ObjUtil.isNotNull(oldSupplier)){
|
||||
basSupplierService.updateBasSupplier(basSupplier);
|
||||
}else {
|
||||
basSupplierService.insertBasSupplier(basSupplier);
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult receiveInBill(InstockInVo inStockinVo) {
|
||||
return inStockinService.insertInStockin(inStockinVo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult receiveOutBill(OutStockoutVo outStockoutVo) {
|
||||
return AjaxResult.success("操作成功",outStockoutService.saveBill(outStockoutVo));
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult callBackInAndOutBill() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import java.util.List;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.math3.stat.descriptive.summary.Product;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -15,89 +16,88 @@ import com.ruoyi.bas.BasProduct.service.IBasProductService;
|
||||
|
||||
/**
|
||||
* 物料管理Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author gw
|
||||
* @date 2025-09-17
|
||||
*/
|
||||
@Service
|
||||
public class BasProductServiceImpl implements IBasProductService
|
||||
{
|
||||
@Slf4j
|
||||
public class BasProductServiceImpl implements IBasProductService {
|
||||
@Autowired
|
||||
private BasProductMapper basProductMapper;
|
||||
|
||||
/**
|
||||
* 查询物料管理
|
||||
*
|
||||
*
|
||||
* @param productGuid 物料管理主键
|
||||
* @return 物料管理
|
||||
*/
|
||||
@Override
|
||||
public BasProduct selectBasProductByProductGuid(String productGuid)
|
||||
{
|
||||
public BasProduct selectBasProductByProductGuid(String productGuid) {
|
||||
return basProductMapper.selectBasProductByProductGuid(productGuid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BasProduct selectBasProductByProductId(String productId)
|
||||
{
|
||||
public BasProduct selectBasProductByProductId(String productId) {
|
||||
return basProductMapper.selectBasProductByProductId(productId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BasProduct> selectBasProductListByProductIds(List<String> productIds)
|
||||
{
|
||||
public List<BasProduct> selectBasProductListByProductIds(List<String> productIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询物料管理列表
|
||||
*
|
||||
*
|
||||
* @param basProduct 物料管理
|
||||
* @return 物料管理
|
||||
*/
|
||||
@Override
|
||||
public List<BasProduct> selectBasProductList(BasProduct basProduct)
|
||||
{
|
||||
public List<BasProduct> selectBasProductList(BasProduct basProduct) {
|
||||
return basProductMapper.selectBasProductList(basProduct);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增物料管理
|
||||
*
|
||||
*
|
||||
* @param basProduct 物料管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBasProduct(BasProduct basProduct)
|
||||
{
|
||||
public int insertBasProduct(BasProduct basProduct) {
|
||||
|
||||
|
||||
BasProduct basProduct1 = basProductMapper.selectBasProductByProductId(basProduct.getProductId());
|
||||
if(basProduct1 != null){
|
||||
if (basProduct1 != null) {
|
||||
throw new RuntimeException("物料编号已存在");
|
||||
}
|
||||
basProduct.setProductGuid(basProduct.getProductId());
|
||||
basProduct.setSpare3(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
|
||||
//获取当前系统登录用户名
|
||||
String username = SecurityUtils.getUsername();
|
||||
basProduct.setSpare4(username);
|
||||
try {
|
||||
//获取当前系统登录用户名
|
||||
String username = SecurityUtils.getUsername();
|
||||
basProduct.setSpare1(username);
|
||||
} catch (Exception e) {
|
||||
log.error("获取当前系统登录用户名异常", e);
|
||||
}
|
||||
|
||||
return basProductMapper.insertBasProduct(basProduct);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物料管理
|
||||
*
|
||||
*
|
||||
* @param basProduct 物料管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBasProduct(BasProduct basProduct)
|
||||
{
|
||||
public int updateBasProduct(BasProduct basProduct) {
|
||||
BasProduct basProduct1 = new BasProduct();
|
||||
basProduct1.setProductId(basProduct.getProductId());
|
||||
basProduct1.setUpdateId(basProduct.getProductGuid());
|
||||
List<BasProduct> basProducts = basProductMapper.selectBasProductList(basProduct1);
|
||||
if (CollUtil.isNotEmpty(basProducts)){
|
||||
if (CollUtil.isNotEmpty(basProducts)) {
|
||||
throw new RuntimeException("物料编号已存在");
|
||||
}
|
||||
return basProductMapper.updateBasProduct(basProduct);
|
||||
@@ -105,25 +105,23 @@ public class BasProductServiceImpl implements IBasProductService
|
||||
|
||||
/**
|
||||
* 批量删除物料管理
|
||||
*
|
||||
*
|
||||
* @param productGuids 需要删除的物料管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBasProductByProductGuids(String[] productGuids)
|
||||
{
|
||||
public int deleteBasProductByProductGuids(String[] productGuids) {
|
||||
return basProductMapper.deleteBasProductByProductGuids(productGuids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除物料管理信息
|
||||
*
|
||||
*
|
||||
* @param productGuid 物料管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBasProductByProductGuid(String productGuid)
|
||||
{
|
||||
public int deleteBasProductByProductGuid(String productGuid) {
|
||||
return basProductMapper.deleteBasProductByProductGuid(productGuid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,8 @@ public class InstockInVo {
|
||||
|
||||
private String remark;
|
||||
|
||||
private String stockSource;
|
||||
|
||||
|
||||
private List<BasProduct> productVoList;
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.ruoyi.in.stockin.mapper.InStockinMapper;
|
||||
import com.ruoyi.in.stockin.service.IInStockinService;
|
||||
import com.ruoyi.in.stockindetail.domain.InStockinDetail;
|
||||
import com.ruoyi.in.stockindetail.service.IInStockinDetailService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -29,6 +30,7 @@ import java.util.List;
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InStockinServiceImpl implements IInStockinService
|
||||
{
|
||||
@Autowired
|
||||
@@ -100,14 +102,26 @@ public class InStockinServiceImpl implements IInStockinService
|
||||
inStockin.setStockinGuid(rkdId);
|
||||
inStockin.setStockinId(rkdId);
|
||||
inStockin.setCreateDate(DateUtil.formatDateTime(DateUtil.date()));
|
||||
inStockin.setCreateManId(Convert.toStr(SecurityUtils.getUserId()));
|
||||
inStockin.setDepartmentNo(Convert.toStr(SecurityUtils.getDeptId()));
|
||||
//inStockin.setSupplierNo(inStockinVo.getSupplierId());
|
||||
try {
|
||||
if ("1".equals(inStockinVo.getStockSource())){
|
||||
inStockin.setCreateManId(Convert.toStr(SecurityUtils.getUserId()));
|
||||
inStockin.setDepartmentNo(Convert.toStr(SecurityUtils.getDeptId()));
|
||||
}else if ("2".equals(inStockinVo.getStockSource())){
|
||||
inStockin.setCreateManId("1");
|
||||
inStockin.setDepartmentNo("103");
|
||||
}else if ("3".equals(inStockinVo.getStockSource())){
|
||||
inStockin.setCreateManId("1");
|
||||
inStockin.setDepartmentNo("104");
|
||||
}
|
||||
|
||||
}catch (Exception e){
|
||||
log.error("入库单保存异常,无用户信息");
|
||||
}
|
||||
inStockin.setErpBill(inStockinVo.getErpBill());
|
||||
inStockin.setInType(inStockinVo.getInType());
|
||||
inStockin.setWarehouseId(inStockinVo.getWarehouseId());
|
||||
inStockin.setStatus("1");
|
||||
inStockin.setStockSource("1");
|
||||
inStockin.setStockSource(inStockinVo.getStockSource());
|
||||
inStockin.setSpare1(inStockinVo.getProductType());
|
||||
inStockin.setSpare5(inStockinVo.getRemark());
|
||||
inStockinMapper.insertInStockin(inStockin);
|
||||
@@ -122,7 +136,7 @@ public class InStockinServiceImpl implements IInStockinService
|
||||
iInStockinDetailService.insertInStockinDetail(inStockinDetail);
|
||||
}
|
||||
|
||||
return AjaxResult.success();
|
||||
return AjaxResult.success("操作成功",rkdId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -130,7 +130,7 @@ public class OutStockoutServiceImpl implements IOutStockoutService
|
||||
String username = SecurityContextHolder.getContext().getAuthentication().getName();
|
||||
outStockout.setCreateManId(username);
|
||||
outStockout.setStatus("1");
|
||||
outStockout.setStockoutSource("0");
|
||||
outStockout.setStockoutSource(outStockoutVo.getOutStockout().getStockoutSource());
|
||||
// outStockout.setWarehouseId("01");
|
||||
for (int i = 0; i < detailList.size(); i++) {
|
||||
OutStockoutDetail outStockoutDetail = detailList.get(i);
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 库存物资对象 view_product_and_stock
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-10-21
|
||||
*/
|
||||
@@ -120,6 +120,16 @@ public class ViewProductAndStock
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
@Excel(name = "仓库")
|
||||
private String warehouseName;
|
||||
|
||||
public String getWarehouseName() {
|
||||
return warehouseName;
|
||||
}
|
||||
|
||||
public void setWarehouseName(String warehouseName) {
|
||||
this.warehouseName = warehouseName;
|
||||
}
|
||||
|
||||
public String getSupplierName() {
|
||||
return supplierName;
|
||||
@@ -142,247 +152,247 @@ public class ViewProductAndStock
|
||||
this.onlyIdentity = onlyIdentity;
|
||||
}
|
||||
|
||||
public Long getOnlyIdentity()
|
||||
public Long getOnlyIdentity()
|
||||
{
|
||||
return onlyIdentity;
|
||||
}
|
||||
|
||||
public void setProductId(String productId)
|
||||
public void setProductId(String productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public String getProductId()
|
||||
public String getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setLotNo(String lotNo)
|
||||
public void setLotNo(String lotNo)
|
||||
{
|
||||
this.lotNo = lotNo;
|
||||
}
|
||||
|
||||
public String getLotNo()
|
||||
public String getLotNo()
|
||||
{
|
||||
return lotNo;
|
||||
}
|
||||
|
||||
public void setProductName(String productName)
|
||||
public void setProductName(String productName)
|
||||
{
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public String getProductName()
|
||||
public String getProductName()
|
||||
{
|
||||
return productName;
|
||||
}
|
||||
|
||||
public void setQuantity(String quantity)
|
||||
public void setQuantity(String quantity)
|
||||
{
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public String getQuantity()
|
||||
public String getQuantity()
|
||||
{
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setWarehouseId(String warehouseId)
|
||||
public void setWarehouseId(String warehouseId)
|
||||
{
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public String getWarehouseId()
|
||||
public String getWarehouseId()
|
||||
{
|
||||
return warehouseId;
|
||||
}
|
||||
|
||||
public void setSpare1(String spare1)
|
||||
public void setSpare1(String spare1)
|
||||
{
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare1()
|
||||
public String getSpare1()
|
||||
{
|
||||
return spare1;
|
||||
}
|
||||
|
||||
public void setSpare3(String spare3)
|
||||
public void setSpare3(String spare3)
|
||||
{
|
||||
this.spare3 = spare3;
|
||||
}
|
||||
|
||||
public String getSpare3()
|
||||
public String getSpare3()
|
||||
{
|
||||
return spare3;
|
||||
}
|
||||
|
||||
public void setSpare4(String spare4)
|
||||
public void setSpare4(String spare4)
|
||||
{
|
||||
this.spare4 = spare4;
|
||||
}
|
||||
|
||||
public String getSpare4()
|
||||
public String getSpare4()
|
||||
{
|
||||
return spare4;
|
||||
}
|
||||
|
||||
public void setSpare5(String spare5)
|
||||
public void setSpare5(String spare5)
|
||||
{
|
||||
this.spare5 = spare5;
|
||||
}
|
||||
|
||||
public String getSpare5()
|
||||
public String getSpare5()
|
||||
{
|
||||
return spare5;
|
||||
}
|
||||
|
||||
public void setSpare6(String spare6)
|
||||
public void setSpare6(String spare6)
|
||||
{
|
||||
this.spare6 = spare6;
|
||||
}
|
||||
|
||||
public String getSpare6()
|
||||
public String getSpare6()
|
||||
{
|
||||
return spare6;
|
||||
}
|
||||
|
||||
public void setVoltage(String voltage)
|
||||
public void setVoltage(String voltage)
|
||||
{
|
||||
this.voltage = voltage;
|
||||
}
|
||||
|
||||
public String getVoltage()
|
||||
public String getVoltage()
|
||||
{
|
||||
return voltage;
|
||||
}
|
||||
|
||||
public void setPower(String power)
|
||||
public void setPower(String power)
|
||||
{
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
public String getPower()
|
||||
public String getPower()
|
||||
{
|
||||
return power;
|
||||
}
|
||||
|
||||
public void setPhase(String phase)
|
||||
public void setPhase(String phase)
|
||||
{
|
||||
this.phase = phase;
|
||||
}
|
||||
|
||||
public String getPhase()
|
||||
public String getPhase()
|
||||
{
|
||||
return phase;
|
||||
}
|
||||
|
||||
public void setDistribution(String distribution)
|
||||
public void setDistribution(String distribution)
|
||||
{
|
||||
this.distribution = distribution;
|
||||
}
|
||||
|
||||
public String getDistribution()
|
||||
public String getDistribution()
|
||||
{
|
||||
return distribution;
|
||||
}
|
||||
|
||||
public void setOrderId(String orderId)
|
||||
public void setOrderId(String orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public String getOrderId()
|
||||
public String getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public void setSpare8(String spare8)
|
||||
public void setSpare8(String spare8)
|
||||
{
|
||||
this.spare8 = spare8;
|
||||
}
|
||||
|
||||
public String getSpare8()
|
||||
public String getSpare8()
|
||||
{
|
||||
return spare8;
|
||||
}
|
||||
|
||||
public void setPrice(String price)
|
||||
public void setPrice(String price)
|
||||
{
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public String getPrice()
|
||||
public String getPrice()
|
||||
{
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setCargoNo(String cargoNo)
|
||||
public void setCargoNo(String cargoNo)
|
||||
{
|
||||
this.cargoNo = cargoNo;
|
||||
}
|
||||
|
||||
public String getCargoNo()
|
||||
public String getCargoNo()
|
||||
{
|
||||
return cargoNo;
|
||||
}
|
||||
|
||||
public void setProductStatus(String productStatus)
|
||||
public void setProductStatus(String productStatus)
|
||||
{
|
||||
this.productStatus = productStatus;
|
||||
}
|
||||
|
||||
public String getProductStatus()
|
||||
public String getProductStatus()
|
||||
{
|
||||
return productStatus;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId)
|
||||
public void setParentId(String parentId)
|
||||
{
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getParentId()
|
||||
public String getParentId()
|
||||
{
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setSpare7(String spare7)
|
||||
public void setSpare7(String spare7)
|
||||
{
|
||||
this.spare7 = spare7;
|
||||
}
|
||||
|
||||
public String getSpare7()
|
||||
public String getSpare7()
|
||||
{
|
||||
return spare7;
|
||||
}
|
||||
|
||||
public void setCreateSys(String createSys)
|
||||
public void setCreateSys(String createSys)
|
||||
{
|
||||
this.createSys = createSys;
|
||||
}
|
||||
|
||||
public String getCreateSys()
|
||||
public String getCreateSys()
|
||||
{
|
||||
return createSys;
|
||||
}
|
||||
|
||||
public void setSpec(String spec)
|
||||
public void setSpec(String spec)
|
||||
{
|
||||
this.spec = spec;
|
||||
}
|
||||
|
||||
public String getSpec()
|
||||
public String getSpec()
|
||||
{
|
||||
return spec;
|
||||
}
|
||||
|
||||
public void setUnit(String unit)
|
||||
public void setUnit(String unit)
|
||||
{
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public String getUnit()
|
||||
public String getUnit()
|
||||
{
|
||||
return unit;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.out.productAndStock.mapper.ViewProductAndStockMapper">
|
||||
|
||||
|
||||
<resultMap type="ViewProductAndStock" id="ViewProductAndStockResult">
|
||||
<result property="onlyIdentity" column="only_identity" />
|
||||
<result property="productId" column="product_id" />
|
||||
@@ -32,15 +32,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="spec" column="spec" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="supplierName" column="supplier_name" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectViewProductAndStockVo">
|
||||
select only_identity, product_id, lot_no, product_name, quantity, warehouse_id, spare1, spare3, spare4, spare5, spare6, voltage, power, phase, distribution, order_id, spare8, price, cargo_no, product_status, parent_id, spare7, create_time, create_sys, spec, unit,supplier_name from view_product_and_stock
|
||||
select only_identity, product_id, lot_no, product_name, quantity, warehouse_id, spare1, spare3, spare4, spare5, spare6, voltage, power, phase, distribution, order_id, spare8, price, cargo_no, product_status, parent_id, spare7, create_time, create_sys, spec, unit,supplier_name,warehouse_name from view_product_and_stock
|
||||
</sql>
|
||||
|
||||
<select id="selectViewProductAndStockList" parameterType="ViewProductAndStock" resultMap="ViewProductAndStockResult">
|
||||
<include refid="selectViewProductAndStockVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="onlyIdentity != null "> and only_identity = #{onlyIdentity}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id like concat('%', #{productId}, '%')</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
|
||||
@@ -69,7 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectViewProductAndStockByOnlyIdentity" parameterType="Long" resultMap="ViewProductAndStockResult">
|
||||
<include refid="selectViewProductAndStockVo"/>
|
||||
where only_identity = #{onlyIdentity}
|
||||
@@ -175,9 +176,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteViewProductAndStockByOnlyIdentitys" parameterType="String">
|
||||
delete from view_product_and_stock where only_identity in
|
||||
delete from view_product_and_stock where only_identity in
|
||||
<foreach item="onlyIdentity" collection="array" open="(" separator="," close=")">
|
||||
#{onlyIdentity}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -95,6 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
bs.out_quantity,
|
||||
bs.spare4, --来源
|
||||
bs.spare1, --用途
|
||||
bs.distribution, --用途
|
||||
bs.net_weight --重量
|
||||
from bas_stock bs
|
||||
left join bas_product bp on bs.product_id = bp.product_id
|
||||
|
||||
@@ -104,7 +104,7 @@ public class SecurityConfig
|
||||
// 静态资源,可匿名访问
|
||||
.requestMatchers(HttpMethod.GET, "/", "/*.html", "/**.html", "/**.css", "/**.js", "/profile/**").permitAll()
|
||||
.requestMatchers("/swagger-ui.html", "/v3/api-docs/**", "/swagger-ui/**", "/druid/**").permitAll()
|
||||
.requestMatchers("/api/**","/api2wms/**").permitAll()
|
||||
.requestMatchers("/api/**","/api2wms/**","/api2erp/**","/api2mes/**").permitAll()
|
||||
// 除上面外的所有请求全部需要鉴权认证
|
||||
.anyRequest().authenticated();
|
||||
})
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="图号" prop="cargoNo">
|
||||
<!-- <el-form-item label="图号" prop="cargoNo">
|
||||
<el-input
|
||||
v-model="queryParams.cargoNo"
|
||||
placeholder="请输入图号"
|
||||
@@ -48,7 +48,7 @@
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="规格" prop="spec">
|
||||
<el-input
|
||||
v-model="queryParams.spec"
|
||||
@@ -177,33 +177,16 @@
|
||||
|
||||
<el-table v-loading="loading" :data="BasProductList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键" align="center" prop="productGuid" />-->
|
||||
<el-table-column label="合同号" align="center" prop="parentId" />
|
||||
<el-table-column label="产品号" align="center" prop="cargoNo" />
|
||||
<el-table-column label="代号" align="center" prop="unit" />
|
||||
<el-table-column label="物料编码" align="center" prop="productId" />
|
||||
<el-table-column label="物料名称" align="center" prop="productName" />
|
||||
<el-table-column label="规格型号" align="center" prop="spec" />
|
||||
<el-table-column label="图号" align="center" prop="cargoNo" />
|
||||
<el-table-column label="常用编码" align="center" prop="parentId" />
|
||||
<el-table-column label="物料状态" align="center" prop="spare1" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.product_type" :value="scope.row.spare1"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" align="center" prop="unit" />
|
||||
<el-table-column label="启用标识" align="center" prop="spare7" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.spare7"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否系统项" align="center" prop="spare2" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.spare2"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建用户" align="center" prop="spare1" />
|
||||
<el-table-column label="创建时间" align="center" prop="spare3" />
|
||||
<el-table-column label="创建用户" align="center" prop="spare4" />
|
||||
<el-table-column label="库存上限" align="center" prop="spare5" />
|
||||
<el-table-column label="库存下限" align="center" prop="spare6" />
|
||||
<el-table-column label="单价" align="center" prop="price" />
|
||||
<el-table-column label="库存下限" align="center" prop="spare5" />
|
||||
<el-table-column label="库存上限" align="center" prop="spare6" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
@@ -236,81 +219,52 @@
|
||||
<!-- 添加或修改物料管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="合同号" prop="parentId">
|
||||
<el-input v-model="form.parentId" placeholder="请输入合同号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="产品号" prop="cargoNo">
|
||||
<el-input v-model="form.cargoNo" placeholder="请输入产品号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="代号" prop="unit">
|
||||
<el-input v-model="form.unit" placeholder="请输入代号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码" prop="productId">
|
||||
<el-input v-model="form.productId" placeholder="请输入物料编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称" prop="productName">
|
||||
<el-input v-model="form.productName" placeholder="请输入物料名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="常用编码" prop="parentId">
|
||||
<el-input v-model="form.parentId" placeholder="请输入常用编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单价" prop="price">
|
||||
<el-input v-model="form.price" placeholder="请输入单价" />
|
||||
</el-form-item>
|
||||
<el-form-item label="图号" prop="cargoNo">
|
||||
<el-input v-model="form.cargoNo" placeholder="请输入图号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-input v-model="form.unit" placeholder="请输入单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="规格型号" prop="spec">
|
||||
<el-input v-model="form.spec" placeholder="请输入规格型号" />
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="创建用户" prop="spare1">-->
|
||||
<!-- <el-input v-model="form.spare1" placeholder="请输入创建用户" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="创建时间" prop="spare3">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="form.spare3"-->
|
||||
<!-- type="datetime"-->
|
||||
<!-- placeholder="请选择创建时间"-->
|
||||
<!-- value-format="yyyy-MM-dd HH:mm:ss">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="库存下限" prop="spare5">
|
||||
<el-input v-model="form.spare5" placeholder="请输入库存下限" />
|
||||
</el-form-item>
|
||||
<el-form-item label="库存上限" prop="spare6">
|
||||
<el-input v-model="form.spare6" placeholder="请输入库存上限" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料状态" prop="spare1">
|
||||
<el-select v-model="form.spare1" placeholder="请选择物料状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.product_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否系统项" prop="spare2">
|
||||
<el-select v-model="form.spare2" placeholder="请选择是否系统项">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_yes_no"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="创建时间" prop="spare3">-->
|
||||
<!-- <el-input v-model="form.spare3" placeholder="请输入颜色" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="创建用户" prop="spare4">-->
|
||||
<!-- <el-input v-model="form.spare4" placeholder="请输入创建用户" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="库存上限" prop="spare5">
|
||||
<el-input v-model="form.spare5" placeholder="请输入库存上限" />
|
||||
</el-form-item>
|
||||
<el-form-item label="库存下限" prop="spare6">
|
||||
<el-input v-model="form.spare6" placeholder="请输入库存下限" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="启用标识" prop="spare7">
|
||||
<el-select v-model="form.spare7" placeholder="请选择启用标识">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_yes_no"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -6,6 +6,23 @@
|
||||
</div>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-row>
|
||||
|
||||
<el-col :span="4">
|
||||
<el-form-item label="仓库" prop="warehouseId">
|
||||
<el-select
|
||||
v-model="form.warehouseId"
|
||||
placeholder="请选择仓库"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in warehouseOptions"
|
||||
:key="item.warehouseId"
|
||||
:label="item.warehouseName"
|
||||
:value="item.warehouseId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="订单号" prop="erpBill">
|
||||
<el-input v-model="form.erpBill" placeholder="请输入订单号"/>
|
||||
@@ -28,9 +45,6 @@
|
||||
<el-input v-model="form.remark" placeholder="请输入备注"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<!-- 供应商选择已移至表格中 -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -440,7 +454,8 @@ export default {
|
||||
//仓库查询参数
|
||||
queryWarehouseParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 99
|
||||
pageSize: 99,
|
||||
warehouseType:1
|
||||
},
|
||||
//物料遮盖
|
||||
productLoading: true,
|
||||
@@ -630,11 +645,12 @@ export default {
|
||||
|
||||
// 构建请求数据
|
||||
const data = {
|
||||
warehouseId: "01",
|
||||
warehouseId: this.form.warehouseId,
|
||||
supplierId: this.form.supplierId,
|
||||
remark: this.form.remark,
|
||||
inType:this.form.inType,
|
||||
erpBill:this.form.erpBill,
|
||||
stockSource: "1",
|
||||
productType:this.form.productType,
|
||||
productVoList: this.productList.map(item => ({
|
||||
productId: item.productId,
|
||||
|
||||
@@ -166,6 +166,7 @@
|
||||
<el-table-column label="部门" align="left" prop="departmentName"/><!--部门-->
|
||||
<el-table-column label="建立时间" align="left" prop="createDate"/><!--建立时间-->
|
||||
<el-table-column label="完成日期" align="left" prop="finishDate"/><!--完成日期-->
|
||||
<el-table-column label="备注" align="left" prop="spare5"/><!--备注-->
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
|
||||
@@ -43,11 +43,8 @@
|
||||
|
||||
<!-- 物资明细表格 -->
|
||||
<el-table v-loading="loading" :data="materialList">
|
||||
<el-table-column label="仓库" align="center" prop="warehouseId" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.warehouse" :value="scope.row.warehouseId"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库编码" align="center" prop="warehouseId" />
|
||||
<el-table-column label="仓库" align="center" prop="warehouseName" />
|
||||
<el-table-column label="合同号" align="center" prop="cargoNo" />
|
||||
<el-table-column label="产品号" align="center" prop="phase" />
|
||||
<el-table-column label="代号" align="center" prop="fid" />
|
||||
@@ -189,11 +186,8 @@
|
||||
<el-table v-loading="materialLoading" :data="materialOptions" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" align="center" prop="onlyIdentity" />
|
||||
<el-table-column label="仓库" align="center" prop="warehouseId" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.warehouse" :value="scope.row.warehouseId"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库编码" align="center" prop="warehouseId" />
|
||||
<el-table-column label="仓库" align="center" prop="warehouseName" />
|
||||
<el-table-column label="合同号" align="center" prop="orderId" />
|
||||
<el-table-column label="代号" align="center" prop="distribution" />
|
||||
<el-table-column label="产品号" align="center" prop="power" />
|
||||
@@ -407,7 +401,8 @@ export default {
|
||||
customerNo: null,
|
||||
customerName: null, // 添加客户名称字段,用于显示
|
||||
outType: null,
|
||||
remark:null
|
||||
remark:null,
|
||||
stockoutSource:"1",
|
||||
},
|
||||
// 仓库选项
|
||||
warehouseOptions: [],
|
||||
@@ -655,6 +650,7 @@ export default {
|
||||
price:item.spare6,
|
||||
power:item.spare5,
|
||||
warehouseId: item.warehouseId,
|
||||
warehouseName: item.warehouseName,
|
||||
lotNo: item.lotNo,
|
||||
voltage:item.spare8,
|
||||
onlyIdentity: item.onlyIdentity,
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
<el-table v-loading="loading" :data="outStockoutList" @selection-change="handleSelectionChange" @row-click="handleRowClick" max-height="400">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="出库单编号" align="left" prop="stockoutId" /> <!-- 出库单编号 -->
|
||||
<el-table-column label="仓库" align="left" prop="warehouseName" /><!-- 仓库名称 -->
|
||||
<!-- <el-table-column label="仓库" align="left" prop="warehouseName" /><!– 仓库名称 –>-->
|
||||
<el-table-column label="出库类型" align="left" prop="outType"> <!-- 出库类型 -->
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.out_bill_type" :value="scope.row.outType"/>
|
||||
@@ -165,14 +165,21 @@
|
||||
<dict-tag :options="dict.type.out_bill_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单据来源" align="left" prop="stockoutSource"><!--单据来源-->
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.bill_resource" :value="scope.row.stockoutSource"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="上位单号" align="left" prop="erpStockoutId" width="150"/><!--入库订单-->
|
||||
<!-- <el-table-column :label="'出口'" align="left" prop="exitId" />-->
|
||||
<!-- <el-table-column :label="'客户编码'" align="left" prop="customerNo" /><!– 客户编码 –>-->
|
||||
<el-table-column label="客户名称" align="left" prop="customerName" />
|
||||
<!-- <el-table-column label="客户名称" align="left" prop="customerName" />-->
|
||||
<el-table-column label="建单人" align="left" prop="createManId" /> <!-- 建单人 -->
|
||||
<el-table-column label="备注" align="center" prop="remark" /> <!-- 备注 -->
|
||||
<el-table-column label="创建时间" align="left" prop="createDate" /><!-- 创建时间 -->
|
||||
<el-table-column label="开始时间" align="left" prop="startDate" /><!-- 开始时间 -->
|
||||
<el-table-column label="确认时间" align="left" prop="finishDate" /> <!-- 确认时间 -->
|
||||
<el-table-column label="备注" align="center" prop="remark" /> <!-- 备注 -->
|
||||
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
@@ -407,7 +414,7 @@ import {listWarehouse} from "@/api/bas/warehouse";
|
||||
|
||||
export default {
|
||||
name: "OutStockWithDetail",
|
||||
dicts: ['out_bill_type', 'out_bill_status', 'product_type', 'quality_type', 'turnover_type', 'sys_yes_no','account_type','origin_type','purpose_type','warehouse'],
|
||||
dicts: ['bill_resource','out_bill_type', 'out_bill_status', 'product_type', 'quality_type', 'turnover_type', 'sys_yes_no','account_type','origin_type','purpose_type','warehouse'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
||||
Reference in New Issue
Block a user