优化页面

This commit is contained in:
zgw
2025-12-25 13:47:24 +08:00
parent 9fc1cc53e9
commit f64216f3c1
47 changed files with 2376 additions and 357 deletions

1
.gitignore vendored
View File

@@ -28,3 +28,4 @@ hs_err_pid*
/log/ /log/
.vscode/ .vscode/
/docs/

View File

@@ -0,0 +1,258 @@
# WMS 操作手册模板输出与对齐
## 模板目标
- 提供一份通用、可填充的 WMS 操作手册中文模板,适用于培训与上线交付。
- 与现有 `docs/WMS_Operation_Manual.md` 风格对齐:编号结构、三级标题、"路径/关键字段/操作步骤"固定段落、截图占位。
- 便于后续按模块逐步充实细节,不依赖生成文件。
## 模板结构
- 1. 文档信息与综述
- 2. 系统登录与导航
- 3. 入库管理(3.1 入库单管理,3.2 入库作业)
- 4. 出库管理(4.1 出库单管理,4.2 出库作业)
- 5. 库存管理(5.1 库存查询,5.2 盘点管理,5.3 盘点差异,5.4 库存记录,5.5 库存冻结记录)
- 6. 基础信息(6.1 仓库,6.2 库位,6.3 托盘,6.4 供应商,6.5 客户,6.6 托盘格式,6.8 产品编码,6.9 物料,6.10 容器,6.11 巷道,6.12 站台,6.13 模型)
- 7. 仓库管理(7.1 仓库设置,7.2 货位管理)
- 8. 统计分析(8.1 入库分析,8.2 出库分析,…)
- 9. 系统管理(用户、角色、权限、审计、字典)
- 10. 集成接口(ERP/MES/TMS,对接与字段映射,条码打印与PDA)
- 11. 异常与故障处理(任务卡顿、锁定、回滚、人工干预)
- 12. 常见问题(FAQ)
- 13. 术语与缩写(SKU、FIFO、AGV 等)
- 14. 版本与修订记录
- 15. 附录(截图命名规范、表格模板)
## 模块模板片段规范
- 每个模块固定包含:路径、目的、适用角色、前置条件、关键字段说明、操作步骤(编号)、注意事项、常见问题、截图占位、权限说明(可选)。
- 截图占位统一:`images/<module>_placeholder.png`,上线后替换。
- 术语统一:遵循系统字典与现有文档用词。
## 交付方式
- 先在会话内输出完整模板正文,便于复制到现有文档。
- 如需保存为文件,后续可新增 `docs/WMS_Operation_Manual_Template.md` 或合并到现有文档指定章节。
---
# 模板正文(可直接复制到文档)
# WMS 系统操作手册(模板)
## 1. 文档信息与综述
- 文档目标:规范 WMS 使用流程,支持培训与上线。
- 读者对象:仓管员、质检员、计划员、系统管理员、实施顾问。
- 版本信息:版本号、发布日期、维护人。
- 系统简介:系统定位、覆盖模块、核心能力(入/出库、库存、基础信息、统计分析、接口)。
- 术语约定:SKU、托盘、货位、库位、FIFO、AGV、PDA。
## 2. 系统登录与导航
- 访问地址:【填写】(示例:`http://<host>:<port>`)
- 默认账号:由管理员分配;首次登录需修改密码。
- 操作步骤:
1. 打开浏览器,输入访问地址。
2. 输入用户名与密码,点击“登录”。
3. 进入系统首页(Dashboard)。
- 首页概览:数据统计面板、快捷入口、折线图切换说明。
- 截图占位:`images/login_page_placeholder.png`、`images/dashboard_placeholder.png`
## 3. 入库管理
### 3.1 入库单管理
- 路径:`入库管理 -> 入库单管理`
- 目的:创建、审核入库单据,准备入库作业。
- 适用角色:仓管员、计划员。
- 前置条件:基础信息已建(仓库、物料、客户/供应商),权限已分配。
- 关键字段说明:订单号/ERP单号、入库主题、入库类型、单据状态、单据来源。
- 操作步骤:
1. 查询:按订单号/物料/状态/类型筛选。
2. 新增:填写主题、客户/供应商;添加物料与计划数量;保存。
3. 审核:新建单据点击“单据审核”。
4. 作废:不再执行的单据点击“单据作废”。
5. 打印条码:生成入库标签。
6. 详情:查看物料明细与进度。
- 注意事项:来源区分手工/接口;作废与权限校验。
- 常见问题:审核失败、物料不存在、数量异常。
- 截图占位:`images/inbound_order_placeholder.png`
### 3.2 入库作业
- 路径:`入库管理 -> 入库作业`
- 目的:执行入库任务,上架到指定库位。
- 适用角色:仓管员(含PDA)。
- 前置条件:入库单已审核,任务已下发。
- 关键字段说明:任务号、任务状态、托盘条码、开始/结束时间。
- 操作步骤:
1. 任务监控:任务号/托盘条码查询。
2. 异常处理:手动完成/手动作废。
3. 作业绑定:扫描托盘、确认物料、上架库位。
- 注意事项:锁定规则、库位占用校验。
- 常见问题:PDA扫描失败、库位锁定。
- 截图占位:`images/inbound_task_placeholder.png`
## 4. 出库管理
### 4.1 出库单管理
- 路径:`出库管理 -> 出库单管理`
- 目的:创建、审核、确认出库单。
- 适用角色:仓管员、销售/领料。
- 前置条件:库存充足,客户信息完整。
- 关键字段说明:出库单编号、单据状态(新建/已审核/已确认/已作废)、出库类型。
- 操作步骤:新增、审核、确认、作废、查询。
- 注意事项:先进先出策略、批次/序列追踪。
- 常见问题:可用量不足、状态不一致。
- 截图占位:`images/outbound_order_placeholder.png`
### 4.2 出库作业
- 路径:`出库管理 -> 出库作业`
- 目的:执行拣选、出库任务。
- 适用角色:仓管员(含PDA)。
- 前置条件:出库单已确认,任务已下发。
- 关键字段说明:任务号、状态、托盘条码。
- 操作步骤:任务监控、异常干预(手动完成/作废)。
- 注意事项:波次/拣选路径优化(如适用)。
- 常见问题:拣选库位无货、任务卡顿。
- 截图占位:`images/outbound_task_placeholder.png`
## 5. 库存管理
### 5.1 库存查询
- 路径:`库存管理 -> 库存查询`
- 目的:查询与维护库存状态。
- 关键字段说明:库存编码、库存状态(良品/待检/不良/冻结)、托盘号、数量、物料信息、入库时间。
- 操作步骤:综合查询、库存维护(修改/删除)、冻结/解冻、导出。
- 截图占位:`images/stock_query_placeholder.png`
### 5.2 盘点管理
- 路径:`库存管理 -> 盘点管理`
- 目的:全库/动碰/抽样盘点,保证账实一致。
- 操作步骤:新增盘点单、审核、自动分配、录入实盘、确认、作废。
- 截图占位:`images/inventory_count_placeholder.png`
### 5.3 盘点差异
- 路径:`库存管理 -> 盘点差异`
- 目的:审核差异并自动调整库存。
- 操作步骤:生成差异、差异审核、库存调整。
- 截图占位:`images/inventory_diff_placeholder.png`
### 5.4 库存记录
- 路径:`库存管理 -> 库存记录`
- 目的:审计与追溯库存变动。
- 操作步骤:查询流水、导出记录。
- 截图占位:`images/stock_history_placeholder.png`
### 5.5 库存冻结记录
- 路径:`库存管理 -> 库存冻结记录`
- 目的:查询冻结/解冻历史,支持导出。
- 操作步骤:查询、导出、删除(权限控制)。
- 截图占位:`images/stock_freeze_history_placeholder.png`
## 6. 基础信息
### 6.1 仓库管理
- 路径:`基础信息 -> 仓库管理`
- 操作说明:查询、新增、修改、删除(含限制)。
- 截图占位:`images/base_warehouse_placeholder.png`
### 6.2 库位管理
- 路径:`基础信息 -> 库位管理`
- 操作说明:状态维护、锁定/解锁、托盘编号修正。
- 截图占位:`images/base_location_placeholder.png`
### 6.3 托盘管理
- 路径:`基础信息 -> 托盘管理`
- 操作说明:新增、打印(单个/批量)、状态维护。
- 截图占位:`images/base_pallet_placeholder.png`
### 6.4 供应商管理
- 路径:`基础信息 -> 供应商管理`
- 操作说明:查询、新增、导出。
- 截图占位:`images/base_supplier_placeholder.png`
### 6.5 客户管理
- 路径:`基础信息 -> 客户管理`
- 操作说明:查询、新增、维护。
- 截图占位:`images/base_customer_placeholder.png`
### 6.6 托盘格式管理
- 路径:`基础信息 -> 托盘格式管理`
- 操作说明:新增格式、生成数据/打印、最大值校验、流水号更新。
- 截图占位:`images/base_pallet_format_placeholder.png`
### 6.8 产品编码管理
- 路径:`基础信息 -> 产品编码管理`
- 操作说明:新增编码、预览与打印、二维码生成规则。
- 截图占位:`images/base_product_code_placeholder.png`
### 6.9 物料管理
- 路径:`基础信息 -> 物料管理`
- 操作说明:查询、新增、修改/删除、导出;字段:编码/名称/分类/价格/单位/规格/库存上下限/是否可用。
- 截图占位:`images/base_material_placeholder.png`
### 6.10 容器管理
- 路径:`基础信息 -> 容器管理`
- 操作说明:查询、维护(状态/位置)、删除。
- 截图占位:`images/base_container_placeholder.png`
### 6.11 巷道管理
- 路径:`基础信息 -> 巷道管理`
- 操作说明:查询、锁定/解锁(入库/出库锁)。
- 截图占位:`images/base_lane_placeholder.png`
### 6.12 站台管理
- 路径:`基础信息 -> 站台管理`
- 操作说明:监控站台状态、呼叫货架、交付容器、容器详情。
- 截图占位:`images/base_station_placeholder.png`
### 6.13 模型管理
- 路径:`基础信息 -> 模型管理`
- 操作说明:新增/修改、优先级设置、API配置。
- 截图占位:`images/base_model_placeholder.png`
## 7. 仓库管理
### 7.1 仓库设置
- 路径:`仓库管理 -> 仓库设置`
- 操作说明:新增仓库、状态管理(停用/启用)。
- 截图占位:`images/warehouse_warehouse_placeholder.png`
### 7.2 货位管理
- 路径:`仓库管理 -> 货位管理`
- 操作说明:查询、新增/修改、删除、导出;字段:排/列/层、状态、托盘编号、锁定状态。
- 截图占位:`images/warehouse_bin_placeholder.png`
## 8. 统计分析
### 8.1 入库分析
- 路径:`统计分析 -> 入库分析`
- 说明:筛选仓库与年月,图表展示趋势(柱状/折线)。
- 截图占位:`images/analysis_inbound_placeholder.png`
### 8.2 出库分析
- 路径:`统计分析 -> 出库分析`
- 说明:筛选仓库与年月,展示出库趋势。
- 截图占位:`images/analysis_outbound_placeholder.png`
## 9. 系统管理
- 用户与角色:用户新增/禁用;角色授权;权限矩阵。
- 审计与操作日志:登录日志、业务操作记录。
- 数据字典:状态/类型统一维护。
- 截图占位:`images/sys_admin_placeholder.png`
## 10. 集成接口
- ERP/MES/TMS:对接方式、映射字段、同步策略(定时/事件)。
- 条码打印:模板与变量;打印机配置。
- PDA/移动端:登录、扫码、任务执行流程。
- 截图占位:`images/integration_placeholder.png`
## 11. 异常与故障处理
- 任务卡顿:手动完成/作废策略;重试规则。
- 库位锁定:解锁流程与风险提示。
- 接口失败:重试、补偿、告警通知。
- 截图占位:`images/exception_placeholder.png`
## 12. 常见问题(FAQ)
- 登录失败:网络/权限;密码重置流程。
- 打印不出:驱动/权限;模板变量错误。
- 可用量不符:冻结、待检、占用量说明。
## 13. 术语与缩写
- SKU、FIFO、AGV、PDA、ASN、SO、PO、WIP 等。
## 14. 版本与修订记录
- 表格:日期、版本、编辑人、变更说明。
## 15. 附录
- 截图命名规范:`images/<模块>_<功能>_<序号>.png`
- 表格模板:关键字段与预期结果记录表。

View File

@@ -66,4 +66,9 @@ public class ToErpApiController {
public AjaxResult getInStock(){ public AjaxResult getInStock(){
return toErpService.getInStock(); return toErpService.getInStock();
} }
@RequestMapping("/inStockConfirm/{stockinGuids}")
public AjaxResult inStockConfirm( @PathVariable String[] stockinGuids){
return toErpService.inStockConfirm(stockinGuids);
}
} }

View File

@@ -0,0 +1,9 @@
package com.ruoyi.api.domain;
import lombok.Data;
@Data
public class PostReturn {
Boolean success;
String body;
}

View File

@@ -0,0 +1,62 @@
package com.ruoyi.api.domain.erp;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
* ERP入库回传请求参数
*/
@Data
public class ErpInStockinConfirmRequest {
/**
* 单据ID (ERP端的入库ID)
*/
@JsonProperty("ord")
private String ord;
/**
* 确认时间 (接口要求日期格式为:yyyy-MM-dd HH:mm:ss)
*/
@JsonProperty("Date5")
private String date5;
/**
* 入库状态
*/
@JsonProperty("Complete1")
private Integer complete1;
/**
* 库管意见
*/
@JsonProperty("Intro2")
private String intro2;
/**
* 入库明细
*/
@JsonProperty("KuinList")
private List<ErpInStockinDetailConfirmRequest> kuinList;
/**
* 客户名称
*/
@JsonProperty("!B__SysCusmf_0_61001_413_0")
private String customerName;
/**
* 磅单编号
*/
@JsonProperty("!B__SysCusmf_0_61001_414_0")
private String weighbillNo;
/**
* 入库车号
*/
@JsonProperty("!B__SysCusmf_0_61001_415_0")
private String vehicleNo;
}

View File

@@ -0,0 +1,85 @@
package com.ruoyi.api.domain.erp;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* ERP入库回传明细请求参数
*/
@Data
public class ErpInStockinDetailConfirmRequest {
/**
* 明细ID
*/
@JsonProperty("id")
private String id;
/**
* 数量
*/
@JsonProperty("Num1")
private BigDecimal num1;
/**
* 辅助单位
*/
@JsonProperty("AssistUnit")
private String assistUnit;
/**
* 辅助数量
*/
@JsonProperty("AssistNum")
private BigDecimal assistNum;
/**
* 仓库
*/
@JsonProperty("Ku")
private String ku;
/**
* 货位ID
*/
@JsonProperty("WareHousePositionID")
private String wareHousePositionID;
/**
* 批号
*/
@JsonProperty("Ph")
private String ph;
/**
* 序列号
*/
@JsonProperty("Xlh")
private String xlh;
/**
* 生产日期
*/
@JsonProperty("Datesc")
private String datesc;
/**
* 有效期
*/
@JsonProperty("Dateyx")
private String dateyx;
/**
* 到货日期
*/
@JsonProperty("Date2")
private String date2;
/**
* 客户ID
*/
@JsonProperty("sysIcusIInheritIdIidI1")
private String sysIcusIInheritIdIidI1;
}

View File

@@ -41,4 +41,6 @@ public interface IToErpService {
void AddStockinDetailByErpStockinDetail(ErpInStockinDetail erpInStockinetail); void AddStockinDetailByErpStockinDetail(ErpInStockinDetail erpInStockinetail);
AjaxResult getInStock(); AjaxResult getInStock();
AjaxResult inStockConfirm(String[] stockInId);
} }

View File

@@ -1,16 +1,20 @@
package com.ruoyi.api.service.impl; package com.ruoyi.api.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.convert.Convert; import cn.hutool.core.convert.Convert;
import cn.hutool.core.date.DateField; import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateTime; import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjUtil; import cn.hutool.core.util.ObjUtil;
import cn.hutool.http.HttpRequest; import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import cn.hutool.http.HttpUtil; import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONArray; import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import com.ruoyi.api.domain.PostReturn;
import com.ruoyi.api.domain.erp.*; import com.ruoyi.api.domain.erp.*;
import com.ruoyi.api.service.IToErpService; import com.ruoyi.api.service.IToErpService;
import com.ruoyi.bas.BasCustomer.domain.BasCustomer; import com.ruoyi.bas.BasCustomer.domain.BasCustomer;
@@ -48,14 +52,19 @@ import com.ruoyi.stock.stock.domain.BasStock;
import com.ruoyi.stock.stock.service.IBasStockService; import com.ruoyi.stock.stock.service.IBasStockService;
import com.ruoyi.system.domain.InStockinDetailN; import com.ruoyi.system.domain.InStockinDetailN;
import com.ruoyi.system.domain.InStockinN; import com.ruoyi.system.domain.InStockinN;
import com.ruoyi.system.domain.InStockinNFinish;
import com.ruoyi.system.domain.InStockinNQueryRequest; import com.ruoyi.system.domain.InStockinNQueryRequest;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.ruoyi.common.enums.StockInCompleteStatus; import com.ruoyi.common.enums.StockInCompleteStatus;
import com.ruoyi.system.service.IInStockinDetailNFinishService;
import com.ruoyi.system.service.IInStockinDetailNService;
import com.ruoyi.system.service.IInStockinNFinishService;
import com.ruoyi.system.service.IInStockinNService; import com.ruoyi.system.service.IInStockinNService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
@@ -440,19 +449,11 @@ public class ToErpServiceImpl implements IToErpService {
@Override @Override
public AjaxResult callErp(ReceiveOutStockConfirm receiveOutStockConfirm) { public AjaxResult callErp(ReceiveOutStockConfirm receiveOutStockConfirm) {
String body=HttpRequest.post(outStockConfirmUrl).header("ZBAPI-Token", login()).body(JSONUtil.toJsonStr(receiveOutStockConfirm)).execute().body(); Boolean success=post(outStockConfirmUrl,JSONUtil.toJsonStr(receiveOutStockConfirm),"出库单回传").getSuccess();
CallErpResponse callErpResponse = JSONUtil.toBean(body, CallErpResponse.class); if (success){
if (callErpResponse.getCode()==200){
return AjaxResult.success(); return AjaxResult.success();
}else { }else {
if (callErpResponse.getCode()==300){ return AjaxResult.error();
return AjaxResult.error("请求失败");
}else if (callErpResponse.getCode()==400){
return AjaxResult.error("token验证失败");
}else if (callErpResponse.getCode()==500){
return AjaxResult.error("服务器内部错误");
}
return AjaxResult.error(callErpResponse.getMsg());
} }
} }
@@ -666,43 +667,20 @@ public class ToErpServiceImpl implements IToErpService {
} }
/**
* 生成入库单据 -> 根据erp入库子单更新wms入库子单明细
* @param erpInStockinetail
*/
public void AddStockinDetailByErpStockinDetail(ErpInStockinDetail erpInStockinetail) {
InStockinDetail inStockinDetail = new InStockinDetail();
try {
//向wms入库单据表同步erp主单信息
inStockinDetail.setStockinDetailId(erpInStockinetail.getId().toString());//明细id
inStockinDetail.setStockinGuid(erpInStockinetail.getSpare3());//入库主单guid
inStockinDetail.setStockinId(erpInStockinetail.getKuin());//主单id
inStockinDetail.setLotNo(erpInStockinetail.getPh());//批次
inStockinDetail.setProductId(erpInStockinetail.getSpare2());//物料编号
inStockinDetail.setAssignNum(erpInStockinetail.getQuantity().toString());//入库数量
inStockinDetail.setWarehouseId("0");//库区
inStockinDetail.setPrintDate(DateUtil.now());//库区
inStockinDetail.setStatus("");//单据状态
inStockinDetail.setRemark("");//入库备注
//更新/新增wms入库明细
if (ObjUtil.isNotNull(inStockinDetailService.selectInStockinDetailByStockinGuid(inStockinDetail.getStockinGuid()))) {
inStockinDetailService.updateInStockinDetail(inStockinDetail);
}else{
inStockinDetailService.insertInStockinDetail(inStockinDetail);
}
}catch(Exception e){
log.error("生成/更新单据明细失败,主单据号:" + inStockinDetail.getStockinId() + ",异常信息:" + e.getMessage());
}
}
@Autowired @Autowired
private IInStockinNService inStockinNService; private IInStockinNService inStockinNService;
@Autowired @Autowired
private com.ruoyi.system.service.IInStockinDetailNService inStockinDetailNService; private IInStockinNFinishService inStockinNFinishService;
@Autowired
private IInStockinDetailNService inStockinDetailNService;
@Autowired
private IInStockinDetailNFinishService inStockinDetailNFinishService;
@Autowired @Autowired
private ObjectMapper objectMapper; private ObjectMapper objectMapper;
@@ -732,9 +710,13 @@ public class ToErpServiceImpl implements IToErpService {
} catch (Exception e) { } catch (Exception e) {
log.error("JSON序列化失败", e); log.error("JSON序列化失败", e);
return AjaxResult.error("JSON序列化失败"); return AjaxResult.error("JSON序列化失败");
}
PostReturn result = post(getStockinListUrl, jsonStr, "获取入库单");
if (!result.getSuccess()){
return AjaxResult.error("接口调用失败");
} }
// 获取ERP数据 // 获取ERP数据
String body = HttpRequest.post(getStockinListUrl).header(TOKEN_KEY, login()).body(jsonStr).execute().body(); String body = result.getBody();
// 解析响应 // 解析响应
ErpInStockinNResponse response = JSONUtil.toBean(body, ErpInStockinNResponse.class); ErpInStockinNResponse response = JSONUtil.toBean(body, ErpInStockinNResponse.class);
if (response != null && response.getRows() != null) { if (response != null && response.getRows() != null) {
@@ -844,5 +826,163 @@ public class ToErpServiceImpl implements IToErpService {
return AjaxResult.success(body); return AjaxResult.success(body);
} }
@Override
@Transactional(rollbackFor = Exception.class)
public AjaxResult inStockConfirm(String[] stockInGuids) {
for (String stockinGuid : stockInGuids) {
InStockinN inStockinN =inStockinNService.selectInStockinNByStockinGuid(stockinGuid);
if (inStockinN==null) {
throw new RuntimeException("未找到对应单据,请检查");
}
if (inStockinN.getStatus()!= 3) {
throw new RuntimeException("单据["+inStockinN.getStockinId()+"]状态不是正执行,请检查");
}
InStockinDetailN inStockinDetailN =new InStockinDetailN();
inStockinDetailN.setStockinId(inStockinN.getStockinId());
List<InStockinDetailN> stockinDetailNs = inStockinDetailNService.selectInStockinDetailNList(inStockinDetailN);
if (CollUtil.isNotEmpty(stockinDetailNs)){
boolean b = stockinDetailNs.stream().allMatch(x -> x.getFinishNum().equals(x.getSmNum()));
if (!b){
throw new RuntimeException("单据["+inStockinN.getStockinId()+"]扫码数量与实际入库数量不一致!");
}
}
if (!inStockinN.getOrderSrc().equals("自建单")){
//回传ERP
try {
ErpInStockinConfirmRequest request = new ErpInStockinConfirmRequest();
request.setOrd(inStockinN.getErpStockinId());
request.setDate5(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
request.setComplete1(1);
request.setIntro2(inStockinN.getRemark());
request.setCustomerName(inStockinN.getCustomerName());
request.setWeighbillNo(inStockinN.getWeighbillNo());
request.setVehicleNo(inStockinN.getVehicleNo());
List<ErpInStockinDetailConfirmRequest> detailList = getErp(stockinDetailNs);
request.setKuinList(detailList);
String json = objectMapper.writeValueAsString(request);
if (!post(stockinConfirmUrl,json,"入库确认").getSuccess()) {
throw new RuntimeException("回传ERP失败");
}
} catch (Exception e) {
log.error("回传ERP失败: {}", e.getMessage());
throw new RuntimeException("回传ERP失败" );
}
}
//处理单据 插入历史表
inStockinN.setStatus(4);
InStockinNFinish inStockinNFinish = new InStockinNFinish();
BeanUtil.copyProperties(inStockinN, inStockinNFinish);
inStockinNFinishService.insertInStockinNFinish(inStockinNFinish);
inStockinDetailNFinishService.insertByStockInId(inStockinN.getStockinId());
inStockinNService.deleteInStockinNByStockinGuid(inStockinN.getStockinGuid());
inStockinDetailNService.deleteByStockInId(inStockinN.getStockinId());
}
return AjaxResult.success();
}
private static List<ErpInStockinDetailConfirmRequest> getErp(List<InStockinDetailN> stockinDetailNs) {
List<ErpInStockinDetailConfirmRequest> detailList = new ArrayList<>();
for (InStockinDetailN detailN : stockinDetailNs) {
ErpInStockinDetailConfirmRequest detailRequest = new ErpInStockinDetailConfirmRequest();
detailRequest.setId(String.valueOf(detailN.getErpDetailId()));
detailRequest.setNum1(detailN.getFinishNum());
detailRequest.setAssistUnit(detailN.getAuxUnit());
detailRequest.setAssistNum(detailN.getAuxQuantity());
detailRequest.setKu("50"); // 仓库默认空
detailRequest.setWareHousePositionID(""); // 货位默认空
detailRequest.setPh(detailN.getBatchNo());
detailRequest.setXlh(detailN.getSerialNo());
detailRequest.setDatesc(detailN.getProductionDate());
detailRequest.setDateyx(detailN.getExpiryDate());
detailRequest.setDate2(detailN.getArrivalDate());
detailRequest.setSysIcusIInheritIdIidI1(""); // 客户ID默认空
detailList.add(detailRequest);
}
return detailList;
}
public PostReturn post(String url, String jsonStr, String endpoint){
PostReturn postReturn =new PostReturn();
RequestLog requestLog = new RequestLog();
DateTime startTime = DateUtil.date();
requestLog.setRequestTime(DateUtil.format(startTime, "yyyy-MM-dd HH:mm:ss.SSS"));
HttpResponse response = HttpRequest.post(url).header(TOKEN_KEY, login()).body(jsonStr).execute();
String body = response.body();
DateTime endTime = DateUtil.date();
requestLog.setResponseTime(DateUtil.format(endTime, "yyyy-MM-dd HH:mm:ss.SSS"));
requestLog.setRequestHeaders(JSONUtil.toJsonStr(response.headers()));
requestLog.setResponseStatus(String.valueOf(response.getStatus()));
requestLog.setDuration(String.valueOf(DateUtil.between(startTime, endTime, DateUnit.MS)));
requestLog.setSourceSystem("wms");
requestLog.setTargetSystem("erp");
requestLog.setRequestUrl(url);
requestLog.setRequestMethod("POST");
requestLog.setRequestBody(jsonStr);
requestLog.setResponseBody(body);
requestLog.setEndpoint(endpoint);
boolean isSuccess = false;
try {
if (JSONUtil.isTypeJSON(body)) {
JSONObject jsonObject = JSONUtil.parseObj(body);
if (jsonObject.containsKey("Code")) {
int code = jsonObject.getInt("Code");
if (code == 200) {
isSuccess = true;
} else {
log.error("ERP请求失败,Code: {}, Msg: {}", code, jsonObject.getStr("Msg"));
}
} else {
log.error("ERP返回格式错误,未包含Code字段: {}", body);
}
} else {
log.error("ERP返回非JSON格式: {}", body);
}
} catch (Exception e) {
log.error("解析ERP响应异常: {}", e.getMessage());
}
requestLog.setIsSuccessful(isSuccess ? "1" : "0");
requestLogService.insertRequestLog(requestLog);
postReturn.setSuccess(isSuccess);
postReturn.setBody(body);
return postReturn;
}
/**
* 生成入库单据 -> 根据erp入库子单更新wms入库子单明细
* @param erpInStockinetail
*/
public void AddStockinDetailByErpStockinDetail(ErpInStockinDetail erpInStockinetail) {
InStockinDetail inStockinDetail = new InStockinDetail();
try {
//向wms入库单据表同步erp主单信息
inStockinDetail.setStockinDetailId(erpInStockinetail.getId().toString());//明细id
inStockinDetail.setStockinGuid(erpInStockinetail.getSpare3());//入库主单guid
inStockinDetail.setStockinId(erpInStockinetail.getKuin());//主单id
inStockinDetail.setLotNo(erpInStockinetail.getPh());//批次
inStockinDetail.setProductId(erpInStockinetail.getSpare2());//物料编号
inStockinDetail.setAssignNum(erpInStockinetail.getQuantity().toString());//入库数量
inStockinDetail.setWarehouseId("0");//库区
inStockinDetail.setPrintDate(DateUtil.now());//库区
inStockinDetail.setStatus("");//单据状态
inStockinDetail.setRemark("");//入库备注
//更新/新增wms入库明细
if (ObjUtil.isNotNull(inStockinDetailService.selectInStockinDetailByStockinGuid(inStockinDetail.getStockinGuid()))) {
inStockinDetailService.updateInStockinDetail(inStockinDetail);
}else{
inStockinDetailService.insertInStockinDetail(inStockinDetail);
}
}catch(Exception e){
log.error("生成/更新单据明细失败,主单据号:" + inStockinDetail.getStockinId() + ",异常信息:" + e.getMessage());
}
} }
}

View File

@@ -40,14 +40,16 @@ public class ToWcsServiceImpl implements IToWcsService {
@Override @Override
@Scheduled(fixedDelay=1500) // @Scheduled(fixedDelay=1500)
public void pushOutMydoJob() { public void pushOutMydoJob() {
//查询所有未推送的料箱出库作业 //查询所有未推送的料箱出库作业
MydoJob mydoJobParam = new MydoJob(); MydoJob mydoJobParam = new MydoJob();
mydoJobParam.setStatus("1"); mydoJobParam.setStatus("1");
List<String> list = new ArrayList<>(); List<String> list = new ArrayList<>();
list.add("21"); list.add("21");//自动分配出库
list.add("26"); list.add("26");
list.add("23");//指定货位出库
list.add("22");//空托盘出库
mydoJobParam.setInOutIds(list); mydoJobParam.setInOutIds(list);
List<MydoJob> outMydoJobs = mydoJobService.selectMydoJobListApi(mydoJobParam); List<MydoJob> outMydoJobs = mydoJobService.selectMydoJobListApi(mydoJobParam);
for (MydoJob outMydoJob : outMydoJobs) { for (MydoJob outMydoJob : outMydoJobs) {

View File

@@ -298,6 +298,9 @@ public class ToWmsServiceImpl implements IToWmsService {
MydoJob outJob = outMydoJobs.get(0); MydoJob outJob = outMydoJobs.get(0);
outJob.setExecutionPhase("2"); outJob.setExecutionPhase("2");
mydoJobService.updateMydoJob(outJob); mydoJobService.updateMydoJob(outJob);
BasCargoSpace basCargoSpace =basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(outJob.getCargoSpaceId());
basCargoSpace.setStatus("1");
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
break; break;
default: default:

View File

@@ -67,7 +67,7 @@ public class OutMydoJobController extends BaseController {
return mydoJobService.OuthandInvalidation(jobIds); return mydoJobService.OuthandInvalidation(jobIds);
} }
@PreAuthorize("@ss.hasPermi('job:outmydoJob:pointOut')") // @PreAuthorize("@ss.hasPermi('job:outmydoJob:pointOut')")
@Log(title = "指定货位出库", businessType = BusinessType.INSERT) @Log(title = "指定货位出库", businessType = BusinessType.INSERT)
@RequestMapping("/pointOut") @RequestMapping("/pointOut")
public AjaxResult pointOut(@RequestParam("groupCodingNo")String groupCodingNo, @RequestParam("outQuantity")String quantity) public AjaxResult pointOut(@RequestParam("groupCodingNo")String groupCodingNo, @RequestParam("outQuantity")String quantity)

View File

@@ -2,6 +2,7 @@ package com.ruoyi.job.mydojob.domain;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
@@ -13,6 +14,7 @@ import java.util.List;
* @author ruoyi * @author ruoyi
* @date 2025-05-23 * @date 2025-05-23
*/ */
@Data
public class MydoJob extends BaseEntity public class MydoJob extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@@ -131,11 +133,15 @@ public class MydoJob extends BaseEntity
private List<String> inOutIds; private List<String> inOutIds;
private String isAsc;
private String createLeftTime; private String createLeftTime;
private String createRightTime; private String createRightTime;
private String productId; private String productId;
private String orderByColumn;
public String getProductId() { public String getProductId() {
return productId; return productId;
} }

View File

@@ -2,6 +2,7 @@ package com.ruoyi.job.mydojobfinish.domain;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
@@ -11,6 +12,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
* @author ruoyi * @author ruoyi
* @date 2025-05-23 * @date 2025-05-23
*/ */
@Data
public class MydoJobFinish extends BaseEntity public class MydoJobFinish extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@@ -111,6 +113,8 @@ public class MydoJobFinish extends BaseEntity
@Excel(name = "重分标记") @Excel(name = "重分标记")
private String faultFlag; private String faultFlag;
private String orderByColumn;
public void setJobId(String jobId) public void setJobId(String jobId)
{ {
this.jobId = jobId; this.jobId = jobId;

View File

@@ -13,6 +13,9 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@@ -60,13 +63,10 @@ public class RequestLogServiceImpl implements IRequestLogService
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional(propagation = Propagation.REQUIRES_NEW)
public int insertRequestLog(RequestLog requestLog) public int insertRequestLog(RequestLog requestLog)
{ {
if (requestLog.getIsSuccessful().equals("1")){
return requestLogMapper.insertRequestLog(requestLog); return requestLogMapper.insertRequestLog(requestLog);
}else {
return 0;
}
} }
/** /**

View File

@@ -100,15 +100,15 @@ public class PdaServiceImp implements PdaService {
mydoJobParam.setTrayCode(trayCodeMakeSure.getTrayCode()); mydoJobParam.setTrayCode(trayCodeMakeSure.getTrayCode());
mydoJobParam.setStatus("3"); mydoJobParam.setStatus("3");
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailListByExit(mydoJobParam); List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailListByExit(mydoJobParam);
BasWarehouse basWarehouse = basWarehouseMapper.selectBasWarehouseByWarehouseId(mydoJobDetails.get(0).getWarehouseId()); // BasWarehouse basWarehouse = basWarehouseMapper.selectBasWarehouseByWarehouseId(mydoJobDetails.get(0).getWarehouseId());
if("2".equals(basWarehouse.getWarehouseType()) && mydoJobDetails.isEmpty()){ // if("2".equals(basWarehouse.getWarehouseType()) && mydoJobDetails.isEmpty()){
BasStock basStock = new BasStock(); // BasStock basStock = new BasStock();
basStock.setTrayCode(trayCodeMakeSure.getTrayCode()); // basStock.setTrayCode(trayCodeMakeSure.getTrayCode());
List<BasStock> basStocks = basStockMapper.selectBasStockList(basStock); // List<BasStock> basStocks = basStockMapper.selectBasStockList(basStock);
basStockMapper.deleteBasStockByStockIds((String[]) basStocks.stream().map(BasStock::getStockId).toArray()); // basStockMapper.deleteBasStockByStockIds((String[]) basStocks.stream().map(BasStock::getStockId).toArray());
//
} // }
if(mydoJobDetails.isEmpty() && "1".equals(basWarehouse.getWarehouseType())){ if(mydoJobDetails.isEmpty() ){
return AjaxResult.error("该物料没有出库作业,请检查"); return AjaxResult.error("该物料没有出库作业,请检查");
} }
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
@@ -120,8 +120,6 @@ public class PdaServiceImp implements PdaService {
} else { } else {
return AjaxResult.error( map.get("v_resultmsg").toString()); return AjaxResult.error( map.get("v_resultmsg").toString());
} }
} }
@@ -246,8 +244,7 @@ public class PdaServiceImp implements PdaService {
@Override @Override
public AjaxResult ktpout(TrayCodeMsg trayCodeMsg) { public AjaxResult ktpout(TrayCodeMsg trayCodeMsg) {
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
map.put("v_warehouse_id", trayCodeMsg.getWarehouseId()); map.put("v_num", trayCodeMsg.getInQuantity());
map.put("v_exit_id", trayCodeMsg.getExitId());
pdaMapper.ktpout(map); pdaMapper.ktpout(map);
String result = map.get("v_result").toString(); String result = map.get("v_result").toString();
if ("10".equals(result)){ if ("10".equals(result)){

View File

@@ -37,7 +37,6 @@ public class InStockinDetailNController extends BaseController
/** /**
* 查询入库子单列表 * 查询入库子单列表
*/ */
@PreAuthorize("@ss.hasPermi('system:inStockinDetailN:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(InStockinDetailN inStockinDetailN) public TableDataInfo list(InStockinDetailN inStockinDetailN)
{ {
@@ -49,7 +48,6 @@ public class InStockinDetailNController extends BaseController
/** /**
* 导出入库子单列表 * 导出入库子单列表
*/ */
@PreAuthorize("@ss.hasPermi('system:inStockinDetailN:export')")
@Log(title = "入库子单", businessType = BusinessType.EXPORT) @Log(title = "入库子单", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, InStockinDetailN inStockinDetailN) public void export(HttpServletResponse response, InStockinDetailN inStockinDetailN)
@@ -62,7 +60,6 @@ public class InStockinDetailNController extends BaseController
/** /**
* 获取入库子单详细信息 * 获取入库子单详细信息
*/ */
@PreAuthorize("@ss.hasPermi('system:inStockinDetailN:query')")
@GetMapping(value = "/{stockinDetailId}") @GetMapping(value = "/{stockinDetailId}")
public AjaxResult getInfo(@PathVariable("stockinDetailId") String stockinDetailId) public AjaxResult getInfo(@PathVariable("stockinDetailId") String stockinDetailId)
{ {
@@ -72,7 +69,6 @@ public class InStockinDetailNController extends BaseController
/** /**
* 新增入库子单 * 新增入库子单
*/ */
@PreAuthorize("@ss.hasPermi('system:inStockinDetailN:add')")
@Log(title = "入库子单", businessType = BusinessType.INSERT) @Log(title = "入库子单", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody InStockinDetailN inStockinDetailN) public AjaxResult add(@RequestBody InStockinDetailN inStockinDetailN)
@@ -83,7 +79,6 @@ public class InStockinDetailNController extends BaseController
/** /**
* 修改入库子单 * 修改入库子单
*/ */
@PreAuthorize("@ss.hasPermi('system:inStockinDetailN:edit')")
@Log(title = "入库子单", businessType = BusinessType.UPDATE) @Log(title = "入库子单", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody InStockinDetailN inStockinDetailN) public AjaxResult edit(@RequestBody InStockinDetailN inStockinDetailN)
@@ -94,7 +89,6 @@ public class InStockinDetailNController extends BaseController
/** /**
* 删除入库子单 * 删除入库子单
*/ */
@PreAuthorize("@ss.hasPermi('system:inStockinDetailN:remove')")
@Log(title = "入库子单", businessType = BusinessType.DELETE) @Log(title = "入库子单", businessType = BusinessType.DELETE)
@DeleteMapping("/{stockinDetailIds}") @DeleteMapping("/{stockinDetailIds}")
public AjaxResult remove(@PathVariable String[] stockinDetailIds) public AjaxResult remove(@PathVariable String[] stockinDetailIds)

View File

@@ -1,6 +1,8 @@
package com.ruoyi.system.domain; package com.ruoyi.system.domain;
import java.math.BigDecimal; import java.math.BigDecimal;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
@@ -12,6 +14,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
* @author zgw * @author zgw
* @date 2025-12-17 * @date 2025-12-17
*/ */
@Data
public class InStockinDetailNFinish extends BaseEntity public class InStockinDetailNFinish extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@@ -147,6 +150,11 @@ public class InStockinDetailNFinish extends BaseEntity
/** $column.columnComment */ /** $column.columnComment */
private String stockinDetailId; private String stockinDetailId;
private BigDecimal smNum;
private BigDecimal finishNum;
public void setErpDetailId(Long erpDetailId) public void setErpDetailId(Long erpDetailId)
{ {
this.erpDetailId = erpDetailId; this.erpDetailId = erpDetailId;

View File

@@ -58,4 +58,6 @@ public interface IInStockinDetailNFinishService
* @return 结果 * @return 结果
*/ */
public int deleteInStockinDetailNFinishByStockinDetailId(String stockinDetailId); public int deleteInStockinDetailNFinishByStockinDetailId(String stockinDetailId);
void insertByStockInId(String stockinId);
} }

View File

@@ -59,4 +59,5 @@ public interface IInStockinDetailNService
*/ */
public int deleteInStockinDetailNByStockinDetailId(String stockinDetailId); public int deleteInStockinDetailNByStockinDetailId(String stockinDetailId);
void deleteByStockInId(String stockinId);
} }

View File

@@ -93,4 +93,9 @@ public class InStockinDetailNFinishServiceImpl implements IInStockinDetailNFinis
{ {
return inStockinDetailNFinishMapper.deleteInStockinDetailNFinishByStockinDetailId(stockinDetailId); return inStockinDetailNFinishMapper.deleteInStockinDetailNFinishByStockinDetailId(stockinDetailId);
} }
@Override
public void insertByStockInId(String stockinId) {
inStockinDetailNFinishMapper.insertByStockInId(stockinId);
}
} }

View File

@@ -94,5 +94,8 @@ public class InStockinDetailNServiceImpl implements IInStockinDetailNService
return inStockinDetailNMapper.deleteInStockinDetailNByStockinDetailId(stockinDetailId); return inStockinDetailNMapper.deleteInStockinDetailNByStockinDetailId(stockinDetailId);
} }
@Override
public void deleteByStockInId(String stockinId) {
inStockinDetailNMapper.deleteByStockInId(stockinId);
}
} }

View File

@@ -46,9 +46,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>
<if test="updateId != null and updateId != ''"> <if test="updateId != null and updateId != ''">
and warehouse_id != #{updateId} and warehouse_id != #{updateId}
</if> </if>

View File

@@ -14,21 +14,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select stockin_id as id, status, '1' as type select stockin_id as id, status, '1' as type
from in_stockin from in_stockin
where status in ('1', '2', '3') where status in ('1', '2', '3')
${params.warehouseDataScope}
</select> </select>
<select id="selectStockoutStatusCount" resultMap="BillStatusCountResult"> <select id="selectStockoutStatusCount" resultMap="BillStatusCountResult">
select stockout_id as id, status, '2' as type select stockout_id as id, status, '2' as type
from out_stockout from out_stockout
where status in ('1', '2', '3') where status in ('1', '2', '3')
${params.warehouseDataScope}
</select> </select>
<select id="selectStockcheckStatusCount" resultMap="BillStatusCountResult"> <select id="selectStockcheckStatusCount" resultMap="BillStatusCountResult">
select stock_check_id as id, status, '3' as type select stock_check_id as id, status, '3' as type
from check_stockin from check_stockin
where status in ('1', '2', '3') where status in ('1', '2', '3')
${params.warehouseDataScope}
</select> </select>
</mapper> </mapper>

View File

@@ -8,7 +8,6 @@
SELECT status, COUNT(*) as count SELECT status, COUNT(*) as count
FROM bas_cargo_space FROM bas_cargo_space
WHERE status IN ('1', '2', '3', '4', '5', '6') WHERE status IN ('1', '2', '3', '4', '5', '6')
${params.warehouseDataScope}
GROUP BY status GROUP BY status
ORDER BY status ORDER BY status
</select> </select>

View File

@@ -8,21 +8,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectStockinFinishCount" resultType="Integer"> <select id="selectStockinFinishCount" resultType="Integer">
select count(1) from in_stockin_finish select count(1) from in_stockin_finish
where 1=1 where 1=1
${params.warehouseDataScope}
</select> </select>
<!-- 查询已完成出库单数量 --> <!-- 查询已完成出库单数量 -->
<select id="selectStockoutFinishCount" resultType="Integer"> <select id="selectStockoutFinishCount" resultType="Integer">
select count(1) from out_stockout_finish select count(1) from out_stockout_finish
where 1=1 where 1=1
${params.warehouseDataScope}
</select> </select>
<!-- 查询已完成盘点单数量 --> <!-- 查询已完成盘点单数量 -->
<select id="selectStockcheckFinishCount" resultType="Integer"> <select id="selectStockcheckFinishCount" resultType="Integer">
select count(1) from check_stockin_finish select count(1) from check_stockin_finish
where 1=1 where 1=1
${params.warehouseDataScope}
</select> </select>
</mapper> </mapper>

View File

@@ -369,9 +369,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mjd.spare9, mjd.spare9,
mjd.spec, mjd.spec,
mjd.unit, mjd.unit,
mj.tray_code, mj.tray_code
mj.warehosue_id -- mj.warehosue_id
from mydo_job_detail mjd from mydo_job_detail mjd
left join bas_product bp on mjd.product_id = bp.product_id left join bas_product bp on mjd.product_id = bp.product_id
left join mydo_job mj on mjd.job_id = mj.job_id left join mydo_job mj on mjd.job_id = mj.job_id

View File

@@ -100,7 +100,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
${params.warehouseDataScope} ${params.warehouseDataScope}
</if> </if>
</where> </where>
<if test="orderByColumn != null and orderByColumn != ''">
order by ${orderByColumn} ${isAsc}
</if>
<if test="orderByColumn == null or orderByColumn == ''">
order by mj.create_time desc order by mj.create_time desc
</if>
</select> </select>
<select id="selectMydoJobFinishListByMydoJob" parameterType="MydoJob" resultMap="MydoJobFinishResult"> <select id="selectMydoJobFinishListByMydoJob" parameterType="MydoJob" resultMap="MydoJobFinishResult">
@@ -144,7 +149,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
${params.warehouseDataScope} ${params.warehouseDataScope}
</if> </if>
</where> </where>
order by mj.create_time desc <if test="orderByColumn != null and orderByColumn != ''">
order by ${orderByColumn} ${isAsc}
</if>
</select> </select>
<select id="selectMydoJobFinishByJobId" parameterType="String" resultMap="MydoJobFinishResult"> <select id="selectMydoJobFinishByJobId" parameterType="String" resultMap="MydoJobFinishResult">

View File

@@ -94,11 +94,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>
</where> </where>
<if test="orderByColumn != null and orderByColumn != ''">
order by ${orderByColumn} ${isAsc}
</if>
<if test="orderByColumn == null or orderByColumn == ''">
order by mj.create_time desc order by mj.create_time desc
</if>
</select> </select>
<select id="selectMydoJobByJobId" parameterType="String" resultMap="MydoJobResult"> <select id="selectMydoJobByJobId" parameterType="String" resultMap="MydoJobResult">

View File

@@ -121,8 +121,7 @@
<select id="ktpout" parameterType="java.util.Map" statementType="CALLABLE"> <select id="ktpout" parameterType="java.util.Map" statementType="CALLABLE">
{call proc_tp_out( {call proc_tp_out(
#{v_warehouse_id,mode=IN,jdbcType=VARCHAR}, #{v_num,mode=IN,jdbcType=VARCHAR},
#{v_exit_id,mode=IN,jdbcType=VARCHAR},
#{v_result,mode=OUT,jdbcType=INTEGER}, #{v_result,mode=OUT,jdbcType=INTEGER},
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR} #{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
)} )}

View File

@@ -41,10 +41,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="stockinDetailId" column="stockin_detail_id" /> <result property="stockinDetailId" column="stockin_detail_id" />
<result property="smNum" column="sm_num" />
<result property="finishNum" column="finish_num" />
</resultMap> </resultMap>
<sql id="selectInStockinDetailNFinishVo"> <sql id="selectInStockinDetailNFinishVo">
select erp_detail_id, stockin_guid, stockin_id, product_name, product_model, unit, unit_price, aux_unit, attr1, attr2, quantity, in_quantity, aux_quantity, total_price, cost_unit_price, cost_total_price, accounting_cost_total, accounting_quantity, accounting_status, batch_no, serial_no, production_date, expiry_date, arrival_date, remark, custom1, custom2, custom3, custom4, custom5, custom6, stevedore, order_src, create_time, update_time, stockin_detail_id from in_stockin_detail_n_finish select erp_detail_id, stockin_guid, stockin_id, product_name, product_model, unit, unit_price, aux_unit, attr1, attr2, quantity, in_quantity, aux_quantity, total_price, cost_unit_price, cost_total_price, accounting_cost_total, accounting_quantity, accounting_status, batch_no, serial_no, production_date, expiry_date, arrival_date, remark, custom1, custom2, custom3, custom4, custom5, custom6, stevedore, order_src, create_time, update_time, stockin_detail_id ,sm_num , finish_num from in_stockin_detail_n_finish
</sql> </sql>
<select id="selectInStockinDetailNFinishList" parameterType="InStockinDetailNFinish" resultMap="InStockinDetailNFinishResult"> <select id="selectInStockinDetailNFinishList" parameterType="InStockinDetailNFinish" resultMap="InStockinDetailNFinishResult">

View File

@@ -42,3 +42,17 @@ export function delBasProduct(productGuid) {
method: 'delete' method: 'delete'
}) })
} }
// 从ERP获取物料信息
// 说明:
// - 使用GET请求调用后端接口 `/api2erp/receiveProduct`
// - 将本次请求的超时时间设置为5分钟(300000毫秒)
// - 不传递额外参数,后端负责同步逻辑
export function receiveProductFromERP() {
return request({
url: '/api2erp/receiveProduct',
method: 'get',
// 单次请求覆盖默认超时为5分钟
timeout: 300000
})
}

View File

@@ -8,6 +8,14 @@ export function listOutStockout(query) {
}) })
} }
// 从ERP获取出库单据
export function getOutStockList() {
return request({
url: '/api2erp/outStockList',
method: 'get'
})
}
// 查询出库子单详细 // 查询出库子单详细
export function getOutStockoutDetail(query) { export function getOutStockoutDetail(query) {
return request({ return request({

View File

@@ -91,6 +91,16 @@
v-hasPermi="['bas:BasProduct:export']" v-hasPermi="['bas:BasProduct:export']"
>导出</el-button> >导出</el-button>
</el-col> </el-col>
<el-col :span="1.8">
<!-- 获取物料信息按钮:调用ERP接口并显示进度条 -->
<el-button
type="primary"
plain
icon="el-icon-refresh"
size="mini"
@click="handleReceiveProduct"
>获取物料信息</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
@@ -98,20 +108,20 @@
<!-- <el-table-column type="selection" width="55" align="center" />--> <!-- <el-table-column type="selection" width="55" align="center" />-->
<!-- 主键列注释保留 --> <!-- 主键列注释保留 -->
<!-- <el-table-column label="主键" align="center" prop="productGuid" /> --> <!-- <el-table-column label="主键" align="center" prop="productGuid" /> -->
<el-table-column label="物料编码" align="center" prop="productId" width="260" /> <el-table-column label="物料编码" align="center" prop="productId" width="160" />
<el-table-column label="产品编码" align="center" prop="cargoNo" width="160"/> <el-table-column label="产品编码" align="center" prop="cargoNo" width="160"/>
<!-- 物料名称列:修改为自定义模板,用v-html渲染HTML样式 --> <!-- 物料名称列:修改为自定义模板,用v-html渲染HTML样式 -->
<el-table-column label="物料名称" align="center" width="260"> <el-table-column label="物料名称" align="center" width="160">
<template #default="scope"> <template #default="scope">
<!-- v-html解析row.productName中的HTML标签 --> <!-- v-html解析row.productName中的HTML标签 -->
<span v-html="scope.row.productName"></span> <span v-html="scope.row.productName"></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="产品型号" align="center" prop="spec" width="260"/> <el-table-column label="产品型号" align="center" prop="spec" width="100"/>
<el-table-column label="产品分类" align="center" prop="parentId" /> <el-table-column label="产品分类" align="center" prop="parentId" />
<el-table-column label="价格" align="center" prop="price" /> <el-table-column label="价格" align="center" prop="price" />
<el-table-column label="单位" align="center" prop="spare6" /> <el-table-column label="单位" align="center" prop="spare6" width="180"/>
<!-- 中unit为原项目单位 spare6为对方接口中的units,包含单位和辅助单位的json --> <!-- 中unit为原项目单位 spare6为对方接口中的units,包含单位和辅助单位的json -->
<el-table-column label="单位名称" align="center" prop="spare1" /> <el-table-column label="单位名称" align="center" prop="spare1" />
<!-- <el-table-column label="url" align="center" prop="spare3" /> <!-- <el-table-column label="url" align="center" prop="spare3" />
@@ -207,11 +217,30 @@
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 获取物料信息进度条弹窗 -->
<el-dialog
title="获取物料信息"
:visible.sync="receiveDialogVisible"
width="420px"
append-to-body
:close-on-click-modal="false"
:close-on-press-escape="false"
:show-close="!receiveInProgress"
>
<!-- 进度说明文本 -->
<div style="margin-bottom: 12px;">{{ receiveText }}</div>
<!-- 进度条:调用过程为不确定耗时,此处使用循环增长模拟,完成后置为100% -->
<el-progress :percentage="receivePercent" :text-inside="true" :stroke-width="20" :status="receiveStatus"></el-progress>
<div slot="footer" class="dialog-footer">
<el-button @click="cancelReceive" :disabled="receiveInProgress">关 闭</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { listBasProduct, getBasProduct, delBasProduct, addBasProduct, updateBasProduct } from "@/api/bas/BasProduct" import { listBasProduct, getBasProduct, delBasProduct, addBasProduct, updateBasProduct, receiveProductFromERP } from "@/api/bas/BasProduct"
export default { export default {
name: "BasProduct", name: "BasProduct",
@@ -236,6 +265,18 @@ export default {
title: "", title: "",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
// 获取物料信息进度弹窗显示
receiveDialogVisible: false,
// 进度百分比
receivePercent: 0,
// 进度状态:success / exception / undefined
receiveStatus: undefined,
// 是否正在进行中(进行中禁止关闭)
receiveInProgress: false,
// 进度文案
receiveText: "正在从ERP获取物料信息,请稍候…",
// 内部定时器句柄
_receiveTimer: null,
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@@ -450,6 +491,62 @@ export default {
this.download('bas/BasProduct/export', { this.download('bas/BasProduct/export', {
...this.queryParams ...this.queryParams
}, `BasProduct_${new Date().getTime()}.xlsx`) }, `BasProduct_${new Date().getTime()}.xlsx`)
},
/** 获取物料信息按钮操作:调用ERP接口并显示进度条 */
handleReceiveProduct() {
// 打开进度弹窗并初始化状态
this.receiveDialogVisible = true
this.receivePercent = 0
this.receiveStatus = undefined
this.receiveInProgress = true
this.receiveText = "正在从ERP获取物料信息,请稍候…"
// 启动一个模拟进度的定时器,在接口完成前循环推进至最多99%
if (this._receiveTimer) {
clearInterval(this._receiveTimer)
this._receiveTimer = null
}
this._receiveTimer = setInterval(() => {
// 每次增长2-5%,上限为99%
const inc = Math.floor(2 + Math.random() * 4)
this.receivePercent = Math.min(this.receivePercent + inc, 99)
}, 500)
// 发起接口请求,单次调用超时设置为5分钟(由API封装设置)
receiveProductFromERP()
.then(() => {
// 成功:补满进度到100%,显示成功状态与提示
this.receivePercent = 100
this.receiveStatus = "success"
this.receiveText = "获取完成"
this.receiveInProgress = false
if (this._receiveTimer) {
clearInterval(this._receiveTimer)
this._receiveTimer = null
}
this.$modal.msgSuccess("ERP物料信息获取成功")
// 刷新列表数据
this.getList()
})
.catch((err) => {
// 失败:显示异常状态与错误提示
if (this._receiveTimer) {
clearInterval(this._receiveTimer)
this._receiveTimer = null
}
this.receiveInProgress = false
this.receiveStatus = "exception"
this.receiveText = "获取失败"
const msg = (err && err.message) ? err.message : "ERP物料信息获取失败"
this.$modal.msgError(msg)
})
},
/** 关闭进度弹窗(进行中禁止关闭) */
cancelReceive() {
if (this.receiveInProgress) return
this.receiveDialogVisible = false
if (this._receiveTimer) {
clearInterval(this._receiveTimer)
this._receiveTimer = null
}
} }
} }
} }

View File

@@ -10,7 +10,7 @@
/> />
</el-form-item>--> </el-form-item>-->
<el-form-item label="任务状态" prop="status"> <el-form-item label="任务状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择任务状态"> <el-select v-model="queryParams.status" placeholder="请选择任务状态" @change="handleQuery">
<el-option v-for="dict in dict.type.mydo_job_status" :key="dict.value" :label="dict.label" <el-option v-for="dict in dict.type.mydo_job_status" :key="dict.value" :label="dict.label"
:value="dict.value" /> :value="dict.value" />
</el-select> </el-select>
@@ -97,10 +97,19 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="mydoJobList" @selection-change="handleSelectionChange" <el-table
@row-click="handleRowClick" highlight-current-row :current-row="currentRow" max-height="405"> v-loading="loading"
:data="mydoJobList"
@selection-change="handleSelectionChange"
@row-click="handleRowClick"
highlight-current-row
:current-row="currentRow"
max-height="405"
@sort-change="handleSortChange"
:default-sort="{ prop: 'createTime', order: 'descending' }"
>
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="任务ID" align="center" prop="jobId" width="125" /> <el-table-column label="任务ID" align="center" prop="jobId"/>
<el-table-column label="任务状态" align="center" prop="status"> <el-table-column label="任务状态" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.mydo_job_status" :value="scope.row.status" /> <dict-tag :options="dict.type.mydo_job_status" :value="scope.row.status" />
@@ -115,9 +124,9 @@
<el-table-column label="托盘码" align="center" prop="trayCode" width="100" /> <el-table-column label="托盘码" align="center" prop="trayCode" width="100" />
<el-table-column label="货位" align="center" prop="cargoSpaceName" width="80" /> <el-table-column label="货位" align="center" prop="cargoSpaceName" width="80" />
<!-- <el-table-column label="仓库" align="center" prop="warehouseName" /> --> <!-- <el-table-column label="仓库" align="center" prop="warehouseName" /> -->
<el-table-column label="创建时间" align="center" prop="createTime" width="135" /> <el-table-column label="创建时间" align="center" prop="createTime" sortable="custom" />
<!-- <el-table-column label="开始时间" align="center" prop="startTime" width="135"/> --> <!-- <el-table-column label="开始时间" align="center" prop="startTime" width="135"/> -->
<el-table-column label="结束时间" align="center" prop="finishTime" width="135" /> <el-table-column label="结束时间" align="center" prop="finishTime" />
</el-table> </el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@@ -130,7 +139,7 @@
</div> </div>
<el-table v-loading="detailLoading" :data="mydoJobDetailList" @selection-change="handleSelectionChange" <el-table v-loading="detailLoading" :data="mydoJobDetailList" @selection-change="handleSelectionChange"
max-height="300"> max-height="300">
<el-table-column label="子任务ID" align="center" prop="jobDetailId" width="135" /> <el-table-column label="子任务ID" align="center" prop="jobDetailId"/>
<!-- <el-table-column label="任务ID" align="left" prop="jobId" width="160" /> --> <!-- <el-table-column label="任务ID" align="left" prop="jobId" width="160" /> -->
<el-table-column label="单据ID" align="center" prop="inOrOutId" width="160" /> <el-table-column label="单据ID" align="center" prop="inOrOutId" width="160" />
<el-table-column label="子单据ID" align="center" prop="inOrOutDId" width="160" /> <el-table-column label="子单据ID" align="center" prop="inOrOutDId" width="160" />
@@ -215,7 +224,9 @@ export default {
classId: null, classId: null,
warehouseId: null, warehouseId: null,
faultFlag: null, faultFlag: null,
inOut: "1" inOut: "1",
orderByColumn: 'mj.create_time',
isAsc: 'desc'
}, },
queryDetailParams: { queryDetailParams: {
pageNum: 1, pageNum: 1,
@@ -319,6 +330,23 @@ export default {
// 重新查询主表数据 // 重新查询主表数据
this.handleQuery(); this.handleQuery();
}, },
/**
* 表格排序变更事件(远程排序)
* @param {{ column: object, prop: string, order: 'ascending' | 'descending' | null }} sorter
*/
handleSortChange({ column, prop, order }) {
const toSnake = (s) => s ? s.replace(/([A-Z])/g, "_$1").toLowerCase() : s;
let obc = toSnake(prop);
if (obc === 'create_time') obc = 'mj.create_time';
if (obc === 'finish_time') obc = 'mj.finish_time';
this.queryParams.orderByColumn = obc || undefined;
this.queryParams.isAsc =
order === 'ascending' ? 'asc' :
order === 'descending' ? 'desc' :
undefined;
this.queryParams.pageNum = 1;
this.getList();
},
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {

View File

@@ -2,7 +2,7 @@
<div class="app-container panel"> <div class="app-container panel">
<!-- 顶部统计面板 --> <!-- 顶部统计面板 -->
<el-row :gutter="40" class="panel-group"> <el-row :gutter="40" class="panel-group">
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col"> <el-col :xs="12" :sm="12" :lg="8" class="card-panel-col">
<div class="card-panel"> <div class="card-panel">
<div class="card-panel-icon-wrapper icon-people"> <div class="card-panel-icon-wrapper icon-people">
<svg-icon icon-class="clipboard" class-name="card-panel-icon"/> <svg-icon icon-class="clipboard" class-name="card-panel-icon"/>
@@ -13,7 +13,7 @@
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col"> <el-col :xs="12" :sm="12" :lg="8" class="card-panel-col">
<div class="card-panel"> <div class="card-panel">
<div class="card-panel-icon-wrapper icon-message"> <div class="card-panel-icon-wrapper icon-message">
<svg-icon icon-class="documentation" class-name="card-panel-icon"/> <svg-icon icon-class="documentation" class-name="card-panel-icon"/>
@@ -24,18 +24,8 @@
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel"> <el-col :xs="12" :sm="12" :lg="8" class="card-panel-col">
<div class="card-panel-icon-wrapper icon-money">
<svg-icon icon-class="chart" class-name="card-panel-icon"/>
</div>
<div class="card-panel-description">
<div class="card-panel-text">盘点单数</div> <!-- 盘点单数 -->
<count-to :start-val="0" :end-val="Number(quantity.inventory_sheet)|| 0" :duration="3200" class="card-panel-num"/>
</div>
</div>
</el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel"> <div class="card-panel">
<div class="card-panel-icon-wrapper icon-shopping"> <div class="card-panel-icon-wrapper icon-shopping">
<svg-icon icon-class="excel" class-name="card-panel-icon"/> <svg-icon icon-class="excel" class-name="card-panel-icon"/>
@@ -69,47 +59,47 @@
</el-row> </el-row>
<!-- 底部列表区域 --> <!-- 底部列表区域 -->
<el-row :gutter="32"> <!-- <el-row :gutter="32">
<el-col :xs="24" :sm="24" :lg="8"> <el-col :xs="24" :sm="24" :lg="8">
<div class="list-wrapper"> <div class="list-wrapper">
<div class="list-header"> <div class="list-header">
<span>单据列表</span> <!-- 单据列表 --> <span>单据列表</span>
</div> </div>
<el-table :data="documentList" style="width: 100%" size="mini" height="300" <el-table :data="documentList" style="width: 100%" size="mini" height="300"
:header-cell-style="{backgroundColor: '#f5f7fa'}"> :header-cell-style="{backgroundColor: '#f5f7fa'}">
<el-table-column prop="id" label="单据编号"/> <!-- 单据编号 --> <el-table-column prop="id" label="单据编号"/>
<el-table-column prop="type" :formatter="type_" label="类型" width="80"/> <!-- 类型 --> <el-table-column prop="type" :formatter="type_" label="类型" width="80"/>
<el-table-column prop="status" :formatter="status_" label="状态" width="80"/> <!-- 状态 --> <el-table-column prop="status" :formatter="status_" label="状态" width="80"/>
</el-table> </el-table>
</div> </div>
</el-col> </el-col>
<el-col :xs="24" :sm="24" :lg="8"> <el-col :xs="24" :sm="24" :lg="8">
<div class="list-wrapper"> <div class="list-wrapper">
<div class="list-header"> <div class="list-header">
<span>正执行任务</span> <!-- 正执行任务 --> <span>正执行任务</span>
</div> </div>
<el-table :data="executingTasks" style="width: 100%" size="mini" height="300" <el-table :data="executingTasks" style="width: 100%" size="mini" height="300"
:header-cell-style="{backgroundColor: '#f5f7fa'}"> :header-cell-style="{backgroundColor: '#f5f7fa'}">
<el-table-column prop="jobId" label="任务编号"/> <!-- 任务编号 --> <el-table-column prop="jobId" label="任务编号"/>
<el-table-column prop="inOrOut" label="类型" width="80"/> <!-- 类型 --> <el-table-column prop="inOrOut" label="类型" width="80"/>
<el-table-column prop="statusLabel" label="状态" width="80"/> <!-- 状态 --> <el-table-column prop="statusLabel" label="状态" width="80"/>
</el-table> </el-table>
</div> </div>
</el-col> </el-col>
<el-col :xs="24" :sm="24" :lg="8"> <el-col :xs="24" :sm="24" :lg="8">
<div class="list-wrapper"> <div class="list-wrapper">
<div class="list-header"> <div class="list-header">
<span>待执行任务</span> <!-- 待执行任务 --> <span>待执行任务</span>
</div> </div>
<el-table :data="pendingTasks" style="width: 100%" size="mini" height="300" <el-table :data="pendingTasks" style="width: 100%" size="mini" height="300"
:header-cell-style="{backgroundColor: '#f5f7fa'}"> :header-cell-style="{backgroundColor: '#f5f7fa'}">
<el-table-column prop="jobId" label="任务编号"/> <!-- 任务编号 --> <el-table-column prop="jobId" label="任务编号"/>
<el-table-column prop="inOrOut" label="类型" width="80"/> <!-- 类型 --> <el-table-column prop="inOrOut" label="类型" width="80"/>
<el-table-column prop="priority" label="优先级" width="80"/> <!-- 优先级 --> <el-table-column prop="priority" label="优先级" width="80"/>
</el-table> </el-table>
</div> </div>
</el-col> </el-col>
</el-row> </el-row> -->
</div> </div>
</template> </template>

View File

@@ -4,7 +4,7 @@
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="作业状态" prop="status"> <!-- 状态 --> <el-form-item label="作业状态" prop="status"> <!-- 状态 -->
<el-select v-model="queryParams.status" placeholder="请选择状态"> <el-select v-model="queryParams.status" placeholder="请选择状态" @change="handleQuery">
<el-option v-for="dict in dict.type.mydo_job_status" :key="dict.value" :label="dict.label" <el-option v-for="dict in dict.type.mydo_job_status" :key="dict.value" :label="dict.label"
:value="dict.value" /> :value="dict.value" />
</el-select> </el-select>
@@ -80,10 +80,19 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="mydoJobList" @selection-change="handleSelectionChange" <el-table
@row-click="handleRowClick" highlight-current-row :current-row="currentRow" max-height="400"> v-loading="loading"
:data="mydoJobList"
@selection-change="handleSelectionChange"
@row-click="handleRowClick"
highlight-current-row
:current-row="currentRow"
max-height="405"
@sort-change="handleSortChange"
:default-sort="{ prop: 'createTime', order: 'descending' }"
>
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="任务ID" align="center" prop="jobId" width="120" /> <!-- 任务ID --> <el-table-column label="任务ID" align="center" prop="jobId" width="142" /> <!-- 任务ID -->
<el-table-column label="任务状态" align="center" prop="status"> <!-- 任务状态 --> <el-table-column label="任务状态" align="center" prop="status"> <!-- 任务状态 -->
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.mydo_job_status" :value="scope.row.status" /> <dict-tag :options="dict.type.mydo_job_status" :value="scope.row.status" />
@@ -114,9 +123,9 @@
<!-- <el-table-column label="仓库" align="left" prop="warehouseName" /> --> <!-- <el-table-column label="仓库" align="left" prop="warehouseName" /> -->
<!-- <el-table-column label="出口" align="left" prop="exitId"/> 出口ID --> <!-- <el-table-column label="出口" align="left" prop="exitId"/> 出口ID -->
<el-table-column label="创建时间" align="center" prop="createTime" width="135" /> <!-- 创建时间 --> <el-table-column label="创建时间" align="center" prop="createTime" sortable="custom"/> <!-- 创建时间 -->
<!-- <el-table-column label="开始时间" align="center" prop="startTime" width="180" /> --> <!-- <el-table-column label="开始时间" align="center" prop="startTime" width="180" /> -->
<el-table-column label="结束时间" align="center" prop="finishTime" width="135" /> <!-- 结束时间 --> <el-table-column label="结束时间" align="center" prop="finishTime" sortable="custom"/> <!-- 结束时间 -->
<!-- <el-table-column :label="$t('outJobManagement.warehouseId')" align="left" prop="warehouseId" /> &lt;!&ndash; 仓库ID &ndash;&gt;--> <!-- <el-table-column :label="$t('outJobManagement.warehouseId')" align="left" prop="warehouseId" /> &lt;!&ndash; 仓库ID &ndash;&gt;-->
<!-- <el-table-column label="仓库ID" align="left" prop="warehouseName" /> &lt;!&ndash; 仓库ID &ndash;&gt;--> <!-- <el-table-column label="仓库ID" align="left" prop="warehouseName" /> &lt;!&ndash; 仓库ID &ndash;&gt;-->
</el-table> </el-table>
@@ -211,7 +220,9 @@ export default {
classId: null, classId: null,
warehouseId: null, warehouseId: null,
faultFlag: null, faultFlag: null,
inOut: '2' inOut: '2',
orderByColumn: 'mj.create_time',
isAsc: 'desc'
}, },
queryDetailParams: { queryDetailParams: {
pageNum: 1, pageNum: 1,
@@ -314,6 +325,18 @@ export default {
this.resetForm("queryForm") this.resetForm("queryForm")
this.handleQuery() this.handleQuery()
}, },
/** 排序触发事件 */
handleSortChange({ column, prop, order }) {
this.queryParams.orderByColumn = prop;
this.queryParams.isAsc = order === 'ascending' ? 'asc' : 'desc';
if (this.queryParams.orderByColumn === 'createTime') {
this.queryParams.orderByColumn = 'mj.create_time';
} else if (this.queryParams.orderByColumn === 'finishTime') {
this.queryParams.orderByColumn = 'mj.finish_time';
}
this.queryParams.pageNum = 1;
this.getList();
},
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.jobId) this.ids = selection.map(item => item.jobId)

View File

@@ -32,7 +32,7 @@
</el-form> </el-form>
<!-- 饼状图容器 --> <!-- 饼状图容器 -->
<div class="chart-container" style="height: 700px"> <div class="chart-container">
<div ref="spaceChart" style="width: 100%; height: 100%"></div> <div ref="spaceChart" style="width: 100%; height: 100%"></div>
</div> </div>
</div> </div>
@@ -79,9 +79,11 @@ export default {
, ,
mounted() { mounted() {
this.initChart(); this.initChart();
window.addEventListener('resize', this.handleResize)
} }
, ,
beforeDestroy() { beforeDestroy() {
window.removeEventListener('resize', this.handleResize)
if (this.chart) { if (this.chart) {
this.chart.dispose(); this.chart.dispose();
this.chart = null; this.chart = null;
@@ -154,6 +156,10 @@ export default {
this.updateChart(); this.updateChart();
} }
, ,
handleResize() {
this.chart && this.chart.resize()
}
,
/** 状态码转换为国际化文本 */ /** 状态码转换为国际化文本 */
getStatusText(statusCode) { getStatusText(statusCode) {
const statusMap = { const statusMap = {
@@ -214,11 +220,21 @@ export default {
</script> </script>
<style scoped> <style scoped>
.app-container {
padding: 10px;
height: calc(100vh - 84px);
display: flex;
flex-direction: column;
}
.chart-container { .chart-container {
margin-top: 20px; margin-top: 10px;
padding: 20px; padding: 10px;
background: #fff; background: #fff;
border-radius: 4px; border-radius: 4px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
flex: 1;
min-height: 0;
position: relative;
} }
</style> </style>

View File

@@ -29,7 +29,7 @@
</div> </div>
<div class="chart-container"> <div class="chart-container">
<div id="container" v-show="queryParams.warehouseId !== '04'" style="height: 80vh"></div> <div id="container" v-show="queryParams.warehouseId !== '04'"></div>
</div> </div>
</div> </div>
</template> </template>
@@ -99,6 +99,10 @@ export default {
this.getWarehouseList() this.getWarehouseList()
this.initCharts() this.initCharts()
this.handleWarehouseChange() this.handleWarehouseChange()
window.addEventListener('resize', this.handleResize)
},
beforeDestroy() {
window.removeEventListener('resize', this.handleResize)
}, },
methods: { methods: {
/** 查询仓库列表 */ /** 查询仓库列表 */
@@ -113,6 +117,10 @@ this.getWarehouseList()
initCharts() { initCharts() {
this.normalChart = echarts.init(document.getElementById('container')) this.normalChart = echarts.init(document.getElementById('container'))
}, },
// 窗口大小改变
handleResize() {
this.normalChart && this.normalChart.resize()
},
// 仓库变化处理 // 仓库变化处理
handleWarehouseChange() { handleWarehouseChange() {
// 重置巷道和排号 // 重置巷道和排号
@@ -174,7 +182,7 @@ this.getWarehouseList()
} }
}, },
title: { title: {
text: '库位分布平面图', text: '',
subtext: (() => { subtext: (() => {
const sel = this.floorOptions.find(o => String(o.value) === String(this.queryParams.theFloor)) const sel = this.floorOptions.find(o => String(o.value) === String(this.queryParams.theFloor))
return sel && sel.label ? sel.label : '' return sel && sel.label ? sel.label : ''
@@ -321,7 +329,7 @@ this.getWarehouseList()
}, },
// 格式化普通仓库提示信息 // 格式化普通仓库提示信息
formatTooltip(params) { formatTooltip(params) {
if (params.seriesName !== '满位') { if (params.seriesName !== '满位' && params.seriesName !== '出库分配') {
// 排 // 排
if (this.$i18n.locale ==='zh-cn') { if (this.$i18n.locale ==='zh-cn') {
return params.seriesName + '<br>' + (params.data[1] + 1) + '排' + (params.data[0] + 1) + '列' + this.queryParams.theFloor+ '层'; return params.seriesName + '<br>' + (params.data[1] + 1) + '排' + (params.data[0] + 1) + '列' + this.queryParams.theFloor+ '层';
@@ -400,21 +408,33 @@ this.getWarehouseList()
<style scoped> <style scoped>
.app-container { .app-container {
padding: 20px; padding: 10px;
height: calc(100vh - 84px);
display: flex;
flex-direction: column;
} }
.search-box { .search-box {
background-color: #fff; background-color: #fff;
padding: 20px; padding: 10px 10px 0 10px;
margin-bottom: 20px; margin-bottom: 10px;
border-radius: 4px; border-radius: 4px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
flex-shrink: 0;
} }
.chart-container { .chart-container {
background-color: #fff; background-color: #fff;
padding: 20px; padding: 10px;
border-radius: 4px; border-radius: 4px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
flex: 1;
min-height: 0;
position: relative;
}
#container {
width: 100%;
height: 100%;
} }
</style> </style>

View File

@@ -65,7 +65,6 @@
<el-button <el-button
type="primary" type="primary"
plain plain
icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['out:outStockout:add']" v-hasPermi="['out:outStockout:add']"
@@ -75,7 +74,6 @@
<el-button <el-button
type="primary" type="primary"
plain plain
icon="el-icon-check"
size="mini" size="mini"
@click="handleAudit(2)" @click="handleAudit(2)"
v-hasPermi="['out:outStockout:changeStatus']" v-hasPermi="['out:outStockout:changeStatus']"
@@ -85,7 +83,6 @@
<el-button <el-button
type="success" type="success"
plain plain
icon="el-icon-circle-check"
size="mini" size="mini"
@click="handleAudit(4)" @click="handleAudit(4)"
v-hasPermi="['out:outStockout:changeStatus']" v-hasPermi="['out:outStockout:changeStatus']"
@@ -95,16 +92,31 @@
<el-button <el-button
type="danger" type="danger"
plain plain
icon="el-icon-delete"
size="mini" size="mini"
@click="handleAudit(5)" @click="handleAudit(5)"
v-hasPermi="['out:outStockout:changeStatus']" v-hasPermi="['out:outStockout:changeStatus']"
>{{'单据作废'}}</el-button> <!-- 单据作废 --> >{{'单据作废'}}</el-button> <!-- 单据作废 -->
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
size="mini"
@click="getOutStock"
v-hasPermi="['out:outStockout:add']"
>获取单据</el-button>
</el-col>
</el-row> </el-row>
<!-- 主表数据 --> <!-- 主表数据 -->
<el-table v-loading="loading" :data="outStockoutList" @selection-change="handleSelectionChange" max-height="400"> <el-table
v-loading="loading"
:data="outStockoutList"
@selection-change="handleSelectionChange"
max-height="400"
@sort-change="handleSortChange"
:default-sort="{ prop: 'createDate', order: 'descending' }"
>
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column :label="'出库单编号'" align="center" prop="stockoutId" width="150" /> <!-- 出库单编号 --> <el-table-column :label="'出库单编号'" align="center" prop="stockoutId" width="150" /> <!-- 出库单编号 -->
<el-table-column :label="'出库单主题'" align="center" prop="fid" width="200" /> <!-- 出库单主题 --> <el-table-column :label="'出库单主题'" align="center" prop="fid" width="200" /> <!-- 出库单主题 -->
@@ -127,10 +139,10 @@
<!-- <el-table-column :label="'ERP出库单编号'" align="center" prop="erpStockoutId" /> --> <!-- <el-table-column :label="'ERP出库单编号'" align="center" prop="erpStockoutId" /> -->
<!-- ERP出库单编号 --> <!-- ERP出库单编号 -->
<el-table-column :label="'客户名称'" align="center" prop="customerNo" /> <!-- 客户名称 --> <el-table-column :label="'客户名称'" align="center" prop="customerNo" /> <!-- 客户名称 -->
<el-table-column :label="'创建时间'" align="center" prop="createDate" width="135" /><!-- 创建时间 --> <el-table-column :label="'创建时间'" align="center" prop="createDate" width="150" sortable="custom"/><!-- 创建时间 -->
<el-table-column :label="'开始时间'" align="center" prop="startDate" width="135"/><!-- 开始时间 --> <!-- <el-table-column :label="'开始时间'" align="center" prop="startDate" width="150"/>&lt;!&ndash; 开始时间 &ndash;&gt;-->
<el-table-column :label="'确认时间'" align="center" prop="finishDate" width="135"/> <!-- 确认时间 --> <el-table-column :label="'确认时间'" align="center" prop="finishDate" width="150"/> <!-- 确认时间 -->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="50"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="60">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
@@ -410,7 +422,7 @@
</template> </template>
<script> <script>
import { listOutStockout,autoAllot,listOut,manualAllot, saveOutStock, listProductAndStock} from "@/api/out/outStockout" import { listOutStockout,autoAllot,listOut,manualAllot, saveOutStock, listProductAndStock, getOutStockList} from "@/api/out/outStockout"
import { getOutStockoutDetail,updateOutStockStatus } from "@/api/out/outStockout" import { getOutStockoutDetail,updateOutStockStatus } from "@/api/out/outStockout"
import {listWarehouse} from "@/api/bas/warehouse"; import {listWarehouse} from "@/api/bas/warehouse";
@@ -496,7 +508,9 @@ export default {
productName: null, productName: null,
startDate: null, startDate: null,
finishDate: null, finishDate: null,
status: '1' status: '1',
orderByColumn: 'create_date',
isAsc: 'desc'
}, },
// 子表分页参数 // 子表分页参数
detailQueryParams: { detailQueryParams: {
@@ -653,6 +667,15 @@ export default {
} }
}); });
}, },
getOutStock() {
this.$modal.confirm('是否确认从ERP获取出库单据?').then(function () {
return getOutStockList()
}).then(() => {
this.getList()
this.$modal.msgSuccess("获取成功")
}).catch(() => {
})
},
/** 查询主表数据 */ /** 查询主表数据 */
getList() { getList() {
this.loading = true this.loading = true
@@ -699,6 +722,16 @@ export default {
this.resetForm("queryForm") this.resetForm("queryForm")
this.handleQuery() this.handleQuery()
}, },
handleSortChange({ column, prop, order }) {
const toSnake = (s) => s ? s.replace(/([A-Z])/g, "_$1").toLowerCase() : s
this.queryParams.orderByColumn = toSnake(prop) || undefined
this.queryParams.isAsc =
order === 'ascending' ? 'asc' :
order === 'descending' ? 'desc' :
undefined
this.queryParams.pageNum = 1
this.getList()
},
/** 点击行加载明细数据 */ /** 点击行加载明细数据 */
handleRowClick(row) { handleRowClick(row) {
this.getDetailList(row.stockoutGuid,row.status) this.getDetailList(row.stockoutGuid,row.status)

View File

@@ -6,17 +6,17 @@
<el-checkbox label="cargoSpaceId">货位编码</el-checkbox> <el-checkbox label="cargoSpaceId">货位编码</el-checkbox>
<el-checkbox label="productId">物料编码</el-checkbox> <el-checkbox label="productId">物料编码</el-checkbox>
<el-checkbox label="productName">物料名称</el-checkbox> <el-checkbox label="productName">物料名称</el-checkbox>
<el-checkbox label="parentId">产品分类</el-checkbox> <!-- <el-checkbox label="parentId">产品分类</el-checkbox> -->
<el-checkbox label="price">价格</el-checkbox> <!-- <el-checkbox label="price">价格</el-checkbox> -->
<el-checkbox label="cargoNo">产品编码</el-checkbox> <!-- <el-checkbox label="cargoNo">产品编码</el-checkbox> -->
<el-checkbox label="unit">单位</el-checkbox> <el-checkbox label="unit">单位</el-checkbox>
<el-checkbox label="spec">型号</el-checkbox> <el-checkbox label="spec">型号</el-checkbox>
<el-checkbox label="spare1">单位名称</el-checkbox> <!-- <el-checkbox label="spare1">单位名称</el-checkbox> -->
<el-checkbox label="spare3">url</el-checkbox> <!-- <el-checkbox label="spare3">url</el-checkbox> -->
<el-checkbox label="spare4">btnurl</el-checkbox> <!-- <el-checkbox label="spare4">btnurl</el-checkbox> -->
<el-checkbox label="spare5">unitPrices</el-checkbox> <!-- <el-checkbox label="spare5">unitPrices</el-checkbox> -->
<el-checkbox label="spare6">units</el-checkbox> <!-- <el-checkbox label="spare6">units</el-checkbox> -->
<el-checkbox label="spare7">unitjb</el-checkbox> <!-- <el-checkbox label="spare7">unitjb</el-checkbox> -->
<el-checkbox label="cargoSpaceName">货位名称</el-checkbox> <el-checkbox label="cargoSpaceName">货位名称</el-checkbox>
<el-checkbox label="status">货位状态</el-checkbox> <el-checkbox label="status">货位状态</el-checkbox>
<el-checkbox label="locked">货位锁</el-checkbox> <el-checkbox label="locked">货位锁</el-checkbox>
@@ -97,34 +97,38 @@
max-height="650" max-height="650"
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="库存编码" align="left" prop="stockId" width="160" /> <el-table-column label="库存编码" align="center" prop="stockId" width="120" />
<el-table-column label="物料编码" align="left" prop="productId" width="160" v-if="queryParams.groupFields.includes('productId')" /> <el-table-column label="物料编码" align="center" prop="productId" width="120" v-if="queryParams.groupFields.includes('productId')" />
<el-table-column label="物料名称" align="left" prop="productName" width="160" v-if="queryParams.groupFields.includes('productName')" /> <el-table-column label="物料名称" align="center" prop="productName" width="120" v-if="queryParams.groupFields.includes('productName')" />
<el-table-column label="货位编码" align="left" prop="cargoSpaceId" width="160" v-if="queryParams.groupFields.includes('cargoSpaceId')" /> <el-table-column label="货位编码" align="center" prop="cargoSpaceId" width="80" v-if="queryParams.groupFields.includes('cargoSpaceId')" />
<el-table-column label="库存数量" align="right" prop="quantity" width="120" /> <el-table-column label="库存数量" align="center" prop="quantity" width="80" />
<el-table-column label="产品分类" align="left" prop="parentId" width="160" v-if="queryParams.groupFields.includes('parentId')" /> <el-table-column label="产品分类" align="center" prop="parentId" width="80" v-if="queryParams.groupFields.includes('parentId')" />
<el-table-column label="价格" align="right" prop="price" width="160" v-if="queryParams.groupFields.includes('price')" /> <el-table-column label="价格" align="center" prop="price" width="80" v-if="queryParams.groupFields.includes('price')" />
<el-table-column label="产品编码" align="left" prop="cargoNo" width="160" v-if="queryParams.groupFields.includes('cargoNo')" /> <!-- <el-table-column label="产品编码" align="center" prop="cargoNo" width="100" v-if="queryParams.groupFields.includes('cargoNo')" /> -->
<el-table-column label="单位" align="left" prop="unit" width="160" v-if="queryParams.groupFields.includes('unit')" /> <el-table-column label="单位" align="center" prop="unit" width="50" v-if="queryParams.groupFields.includes('unit')" />
<el-table-column label="型号" align="left" prop="spec" width="160" v-if="queryParams.groupFields.includes('spec')" /> <el-table-column label="型号" align="center" prop="spec" width="80" v-if="queryParams.groupFields.includes('spec')" />
<el-table-column label="单位名称" align="left" prop="spare1" width="160" v-if="queryParams.groupFields.includes('spare1')" /> <!-- <el-table-column label="单位名称" align="left" prop="spare1" width="160" v-if="queryParams.groupFields.includes('spare1')" /> -->
<el-table-column label="url" align="left" prop="spare3" width="160" v-if="queryParams.groupFields.includes('spare3')" /> <!-- <el-table-column label="url" align="left" prop="spare3" width="160" v-if="queryParams.groupFields.includes('spare3')" /> -->
<el-table-column label="btnurl" align="left" prop="spare4" width="160" v-if="queryParams.groupFields.includes('spare4')" /> <!-- <el-table-column label="btnurl" align="left" prop="spare4" width="160" v-if="queryParams.groupFields.includes('spare4')" /> -->
<el-table-column label="unitPrices" align="left" prop="spare5" width="160" v-if="queryParams.groupFields.includes('spare5')" /> <!-- <el-table-column label="unitPrices" align="center" prop="spare5" width="160" v-if="queryParams.groupFields.includes('spare5')" /> -->
<el-table-column label="units" align="left" prop="spare6" width="160" v-if="queryParams.groupFields.includes('spare6')" /> <el-table-column label="units" align="center" prop="spare6" width="80" v-if="queryParams.groupFields.includes('spare6')">
<el-table-column label="unitjb" align="left" prop="spare7" width="160" v-if="queryParams.groupFields.includes('spare7')" /> <template slot-scope="scope">
<el-table-column label="货位名称" align="left" prop="cargoSpaceName" width="160" v-if="queryParams.groupFields.includes('cargoSpaceName')" /> {{ getunits(scope.row.spare6) }}
<el-table-column label="货位状态" align="left" prop="status" width="160" v-if="queryParams.groupFields.includes('status')" > </template>
</el-table-column>
<el-table-column label="unitjb" align="center" prop="spare7" width="80" v-if="queryParams.groupFields.includes('spare7')" />
<el-table-column label="货位名称" align="center" prop="cargoSpaceName" width="80" v-if="queryParams.groupFields.includes('cargoSpaceName')" />
<el-table-column label="货位状态" align="center" prop="status" width="80" v-if="queryParams.groupFields.includes('status')" >
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.cargo_space_status" :value="scope.row.status"/> <dict-tag :options="dict.type.cargo_space_status" :value="scope.row.status"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="货位锁" align="left" prop="locked" width="160" v-if="queryParams.groupFields.includes('locked')" > <el-table-column label="货位锁" align="center" prop="locked" width="80" v-if="queryParams.groupFields.includes('locked')" >
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.cargo_space_lock_status" :value="scope.row.locked"/> <dict-tag :options="dict.type.cargo_space_lock_status" :value="scope.row.locked"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="left" prop="remark" width="160" /> <el-table-column label="备注" align="center" prop="remark" width="80" />
</el-table> </el-table>
<pagination <pagination
@@ -298,6 +302,19 @@ export default {
this.ids = selection.map(item => item.onlyIdentity) this.ids = selection.map(item => item.onlyIdentity)
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
},
getunits(json) {
if (!json) return ''
try {
const jsonObject = JSON.parse(json)
let units = []
for (const key in jsonObject) {
units.push(jsonObject[key])
}
return units.join('/')
} catch (e) {
return json
}
} }
} }
}; };

View File

@@ -77,56 +77,60 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="ViewInJobFlowList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="ViewInJobFlowList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column type="selection" width="55" align="center" /> <!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column width="180" label="作业ID" align="center" prop="jobId" /> <el-table-column width="125" label="作业ID" align="center" prop="jobId" />
<el-table-column width="180" label="子作业ID" align="center" prop="jobDetailId" /> <el-table-column width="135" label="子作业ID" align="center" prop="jobDetailId" />
<el-table-column width="180" label="任务号" align="center" prop="taskNo" /> <el-table-column width="80" label="任务号" align="center" prop="taskNo" />
<el-table-column width="180" label="单据ID" align="center" prop="inOrOutId" /> <el-table-column width="125" label="单据ID" align="center" prop="inOrOutId" />
<el-table-column width="180" label="子单据ID" align="center" prop="inOrOutDId" /> <el-table-column width="135" label="子单据ID" align="center" prop="inOrOutDId" />
<el-table-column width="180" label="物料编码" align="center" prop="productId" /> <el-table-column width="130" label="物料编码" align="center" prop="productId" />
<el-table-column width="180" label="物料名称" align="center" prop="productName" /> <el-table-column width="150" label="物料名称" align="center" prop="productName" />
<el-table-column width="180" label="unitPrices" align="center" prop="spare5" /> <!-- <el-table-column width="180" label="unitPrices" align="center" prop="spare5" /> -->
<el-table-column width="180" label="units" align="center" prop="spare6" /> <!-- <el-table-column width="180" label="units" align="center" prop="spare6" /> -->
<el-table-column width="180" label="托盘码" align="center" prop="trayCode" /> <el-table-column width="80" label="托盘码" align="center" prop="trayCode" />
<el-table-column width="180" label="入库数量" align="center" prop="inQuantity" /> <el-table-column width="100" label="入库数量" align="center" prop="inQuantity">
<el-table-column width="180" label="库存数量" align="center" prop="stockQuantity" />
<el-table-column width="180" label="供应商id" align="center" prop="supplierNo" />
<el-table-column width="180" label="供应商名称" align="center" prop="supplierName" />
<el-table-column width="180" label="客户id" align="center" prop="customerNo" />
<el-table-column width="180" label="客户名称" align="center" prop="customerName" />
<!-- <el-table-column label="出库数量" align="center" prop="outQuantity" />-->
<el-table-column width="120" label="任务状态" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.sys_job_status" :value="scope.row.status"/> {{ scope.row.inQuantity ? parseFloat(scope.row.inQuantity).toFixed(4) : scope.row.inQuantity }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="180" label="货位ID" align="center" prop="cargoSpaceId" /> <!-- <el-table-column width="180" label="库存数量" align="center" prop="stockQuantity" /> -->
<el-table-column width="180" label="目标巷道ID" align="center" prop="targetCargoSpaceId" /> <!-- <el-table-column width="180" label="供应商id" align="center" prop="supplierNo" /> -->
<el-table-column width="180" label="开始时间" align="center" prop="startTime" /> <!-- <el-table-column width="180" label="供应商名称" align="center" prop="supplierName" /> -->
<el-table-column width="180" label="结束时间" align="center" prop="finishTime" /> <!-- <el-table-column width="180" label="客户id" align="center" prop="customerNo" /> -->
<el-table-column width="120" label="执行阶段" align="center" prop="executionPhase"> <!-- <el-table-column width="180" label="客户名称" align="center" prop="customerName" /> -->
<!-- <el-table-column label="出库数量" align="center" prop="outQuantity" />-->
<el-table-column width="80" label="任务状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.mydo_job_status" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column width="80" label="货位ID" align="center" prop="cargoSpaceId" />
<!-- <el-table-column width="50" label="目标巷道ID" align="center" prop="targetCargoSpaceId" /> -->
<el-table-column width="135" label="创建时间" align="center" prop="createTime" sortable="custom" :sort-orders="['descending','ascending']" />
<el-table-column width="135" label="结束时间" align="center" prop="finishTime" sortable="custom" :sort-orders="['descending','ascending']" />
<el-table-column width="100" label="执行阶段" align="center" prop="executionPhase">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.execution_phase_type" :value="scope.row.executionPhase"/> <dict-tag :options="dict.type.execution_phase_type" :value="scope.row.executionPhase"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="180" label="库存ID" align="center" prop="stockId" /> <!-- <el-table-column width="180" label="库存ID" align="center" prop="stockId" /> -->
<el-table-column width="180" label="批次号" align="center" prop="lotNo" /> <!-- <el-table-column width="180" label="批次号" align="center" prop="lotNo" /> -->
<el-table-column width="120" label="库存状态" align="center" prop="stockStatus"> <!-- <el-table-column width="120" label="库存状态" align="center" prop="stockStatus"> -->
<template slot-scope="scope"> <!-- <template slot-scope="scope">
<dict-tag :options="dict.type.stock_status" :value="scope.row.stockStatus"/> <dict-tag :options="dict.type.stock_status" :value="scope.row.stockStatus"/>
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column width="180" label="产品分类" align="center" prop="parentId" /> <el-table-column width="80" label="产品分类" align="center" prop="parentId" />
<el-table-column width="180" label="价格" align="center" prop="price" /> <!-- <el-table-column width="180" label="价格" align="center" prop="price" /> -->
<el-table-column width="180" label="产品编码" align="center" prop="cargoNo" /> <el-table-column width="80" label="产品编码" align="center" prop="cargoNo" />
<el-table-column width="180" label="单位id" align="center" prop="unit" /> <!-- <el-table-column width="180" label="单位id" align="center" prop="unit" /> -->
<el-table-column width="180" label="型号" align="center" prop="spec" /> <el-table-column width="80" label="型号" align="center" prop="spec" />
<el-table-column width="180" label="单位名称" align="center" prop="spare1" /> <!-- <el-table-column width="180" label="单位名称" align="center" prop="spare1" /> -->
<el-table-column width="180" label="url" align="center" prop="spare3" /> <!-- <el-table-column width="180" label="url" align="center" prop="spare3" /> -->
<el-table-column width="180" label="btnurl" align="center" prop="spare4" /> <!-- <el-table-column width="180" label="btnurl" align="center" prop="spare4" /> -->
<el-table-column width="180" label="unitjb" align="center" prop="spare7" /> <!-- <el-table-column width="180" label="unitjb" align="center" prop="spare7" /> -->
<el-table-column width="180" label="备注" align="center" prop="remark" /> <el-table-column width="120" label="备注" align="center" prop="remark" />
</el-table> </el-table>
@@ -147,11 +151,13 @@ import { listViewInJobFlow, getViewInJobFlow } from "@/api/search/ViewInJobFlow"
export default { export default {
name: "ViewInJobFlow", name: "ViewInJobFlow",
dicts: ['execution_phase_type', 'sys_job_status', 'stock_status'], dicts: ['execution_phase_type', 'mydo_job_status', 'stock_status'],
data() { data() {
return { return {
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 默认排序
defaultSort: {prop: 'finishTime', order: 'descending'},
// 选中数组 // 选中数组
ids: [], ids: [],
// 非单个禁用 // 非单个禁用
@@ -172,6 +178,8 @@ export default {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
orderByColumn: 'finish_time',
isAsc: 'desc',
jobId: null, jobId: null,
status: null, status: null,
trayCode: null, trayCode: null,
@@ -225,6 +233,12 @@ export default {
this.loading = false this.loading = false
}) })
}, },
/** 排序触发事件 */
handleSortChange({ column, prop, order }) {
this.queryParams.orderByColumn = prop ? prop.replace(/([A-Z])/g, "_$1").toLowerCase() : '';
this.queryParams.isAsc = order === 'ascending' ? 'asc' : 'desc';
this.getList();
},
// 取消按钮 // 取消按钮
cancel() { cancel() {
this.open = false this.open = false

View File

@@ -77,55 +77,69 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="ViewOutJobFlowList" @selection-change="handleSelectionChange"> <el-table
v-loading="loading"
:data="ViewOutJobFlowList"
@selection-change="handleSelectionChange"
@sort-change="handleSortChange"
:default-sort="{ prop: 'startTime', order: 'descending' }"
>
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column width="180" label="作业ID" align="center" prop="jobId" /> <el-table-column width="180" label="作业ID" align="center" prop="jobId" />
<el-table-column width="180" label="子作业ID" align="center" prop="jobDetailId" /> <el-table-column width="180" label="子作业ID" align="center" prop="jobDetailId" />
<el-table-column width="180" label="任务号" align="center" prop="taskNo" /> <el-table-column width="100" label="任务号" align="center" prop="taskNo" />
<el-table-column width="180" label="单据ID" align="center" prop="inOrOutId" /> <el-table-column width="180" label="单据ID" align="center" prop="inOrOutId" />
<el-table-column width="180" label="子单据ID" align="center" prop="inOrOutDId" /> <el-table-column width="180" label="子单据ID" align="center" prop="inOrOutDId" />
<el-table-column width="180" label="物料编码" align="center" prop="productId" /> <el-table-column width="180" label="物料编码" align="center" prop="productId" />
<el-table-column width="180" label="物料名称" align="center" prop="productName" /> <el-table-column width="180" label="物料名称" align="center" prop="productName" />
<el-table-column width="180" label="unitPrices" align="center" prop="spare5" /> <!-- <el-table-column width="180" label="unitPrices" align="center" prop="spare5" />-->
<el-table-column width="180" label="units" align="center" prop="spare6" /> <el-table-column width="100" label="单位组" align="center" prop="spare6" />
<el-table-column width="180" label="托盘码" align="center" prop="trayCode" /> <el-table-column width="100" label="托盘码" align="center" prop="trayCode" />
<!-- <el-table-column width="180" label="入库数量" align="center" prop="inQuantity" />--> <!-- <el-table-column width="180" label="入库数量" align="center" prop="inQuantity" />-->
<el-table-column width="180" label="出库数量" align="center" prop="outQuantity" /> <el-table-column width="100" label="出库数量" align="center" prop="outQuantity">
<el-table-column width="180" label="库存数量" align="center" prop="stockQuantity" />
<el-table-column width="180" label="供应商id" align="center" prop="supplierNo" />
<el-table-column width="180" label="供应商名称" align="center" prop="supplierName" />
<el-table-column width="180" label="客户id" align="center" prop="customerNo" />
<el-table-column width="180" label="客户名称" align="center" prop="customerName" />
<el-table-column width="120" label="任务状态" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.sys_job_status" :value="scope.row.status"/> {{ format4(scope.row.outQuantity) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="180" label="货位ID" align="center" prop="cargoSpaceId" /> <el-table-column width="100" label="库存数量" align="center" prop="stockQuantity">
<el-table-column width="180" label="目标巷道ID" align="center" prop="targetCargoSpaceId" />
<el-table-column width="180" label="开始时间" align="center" prop="startTime" />
<el-table-column width="180" label="结束时间" align="center" prop="finishTime" />
<el-table-column width="120" label="执行阶段" align="center" prop="executionPhase">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.execution_phase_type" :value="scope.row.executionPhase"/> {{ format4(scope.row.stockQuantity) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="180" label="库存ID" align="center" prop="stockId" /> <!-- <el-table-column width="180" label="供应商id" align="center" prop="supplierNo" />-->
<el-table-column width="180" label="批次号" align="center" prop="lotNo" /> <!-- <el-table-column width="180" label="供应商名称" align="center" prop="supplierName" />-->
<el-table-column width="120" label="库存状态" align="center" prop="stockStatus"> <!-- <el-table-column width="180" label="客户id" align="center" prop="customerNo" />-->
<template slot-scope="scope"> <!-- <el-table-column width="180" label="客户名称" align="center" prop="customerName" />-->
<dict-tag :options="dict.type.stock_status" :value="scope.row.stockStatus"/> <!-- <el-table-column width="120" label="任务状态" align="center" prop="status">-->
</template> <!-- <template slot-scope="scope">-->
</el-table-column> <!-- <dict-tag :options="dict.type.sys_job_status" :value="scope.row.status"/>-->
<el-table-column width="180" label="产品分类" align="center" prop="parentId" /> <!-- </template>-->
<el-table-column width="180" label="价格" align="center" prop="price" /> <!-- </el-table-column>-->
<el-table-column width="180" label="产品编码" align="center" prop="cargoNo" /> <el-table-column width="80" label="货位ID" align="center" prop="cargoSpaceId" />
<el-table-column width="180" label="单位id" align="center" prop="unit" /> <!-- <el-table-column width="180" label="目标巷道ID" align="center" prop="targetCargoSpaceId" />-->
<el-table-column width="180" label="型号" align="center" prop="spec" /> <el-table-column width="150" label="开始时间" align="center" prop="startTime" sortable="custom" />
<el-table-column width="180" label="单位名称" align="center" prop="spare1" /> <el-table-column width="150" label="结束时间" align="center" prop="finishTime" sortable="custom" />
<el-table-column width="180" label="url" align="center" prop="spare3" /> <!-- <el-table-column width="120" label="执行阶段" align="center" prop="executionPhase">-->
<el-table-column width="180" label="btnurl" align="center" prop="spare4" /> <!-- <template slot-scope="scope">-->
<el-table-column width="180" label="unitjb" align="center" prop="spare7" /> <!-- <dict-tag :options="dict.type.execution_phase_type" :value="scope.row.executionPhase"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column width="135" label="库存ID" align="center" prop="stockId" />
<!-- <el-table-column width="180" label="批次号" align="center" prop="lotNo" />-->
<!-- <el-table-column width="120" label="库存状态" align="center" prop="stockStatus">-->
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.stock_status" :value="scope.row.stockStatus"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column width="180" label="产品分类" align="center" prop="parentId" />-->
<!-- <el-table-column width="180" label="价格" align="center" prop="price" />-->
<!-- <el-table-column width="180" label="产品编码" align="center" prop="cargoNo" />-->
<!-- <el-table-column width="180" label="单位id" align="center" prop="unit" />-->
<!-- <el-table-column width="180" label="型号" align="center" prop="spec" />-->
<!-- <el-table-column width="180" label="单位名称" align="center" prop="spare1" />-->
<!-- <el-table-column width="180" label="url" align="center" prop="spare3" />-->
<!-- <el-table-column width="180" label="btnurl" align="center" prop="spare4" />-->
<!-- <el-table-column width="180" label="unitjb" align="center" prop="spare7" />-->
<el-table-column width="180" label="备注" align="center" prop="remark" /> <el-table-column width="180" label="备注" align="center" prop="remark" />
</el-table> </el-table>
@@ -204,7 +218,9 @@ export default {
spare4: null, spare4: null,
spare5: null, spare5: null,
spare6: null, spare6: null,
spare7: null spare7: null,
orderByColumn: 'start_time',
isAsc: 'desc'
}, },
// 表单参数 // 表单参数
form: {}, form: {},
@@ -299,6 +315,23 @@ export default {
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
handleSortChange({ column, prop, order }) {
this.queryParams.orderByColumn = prop
? prop.replace(/([A-Z])/g, "_$1").toLowerCase()
: undefined
this.queryParams.isAsc =
order === 'ascending' ? 'asc' :
order === 'descending' ? 'desc' :
undefined
this.queryParams.pageNum = 1
this.getList()
},
format4(v) {
if (v === null || v === undefined || v === '') return ''
const n = Number(v)
if (isNaN(n)) return v
return n.toFixed(4)
},
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset() this.reset()

View File

@@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="入库单据ID" prop="stockinId"> <el-form-item label="单据ID" prop="stockinId">
<el-input <el-input
v-model="queryParams.stockinId" v-model="queryParams.stockinId"
placeholder="请输入入库主单ID" placeholder="请输入入库主单ID"
@@ -9,7 +9,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="入库子单ID" prop="stockinDetailId"> <el-form-item label="子单ID" prop="stockinDetailId">
<el-input <el-input
v-model="queryParams.stockinDetailId" v-model="queryParams.stockinDetailId"
placeholder="请输入子单ID" placeholder="请输入子单ID"
@@ -98,19 +98,29 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="ViewStockinHistoryList" @selection-change="handleSelectionChange"> <el-table
v-loading="loading"
:data="ViewStockinHistoryList"
@selection-change="handleSelectionChange"
@sort-change="handleSortChange"
:default-sort="{ prop: 'createDate', order: 'descending' }"
>
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column width="180" label="入库主单ID" align="center" prop="stockinId" /> <el-table-column width="180" label="入库主单ID" align="center" prop="stockinId" />
<el-table-column width="180" label="子单ID" align="center" prop="stockinDetailId" /> <el-table-column width="180" label="子单ID" align="center" prop="stockinDetailId" />
<el-table-column width="120" label="单据状态" align="center" prop="status"> <el-table-column label="单据状态" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.in_bill_status" :value="scope.row.status"/> <dict-tag :options="dict.type.in_bill_status" :value="scope.row.status"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="180" label="物料编码" align="center" prop="productId" /> <el-table-column width="180" label="物料编码" align="center" prop="productId" />
<el-table-column width="180" label="物料名称" align="center" prop="productName" /> <el-table-column width="180" label="物料名称" align="center" prop="productName" />
<el-table-column width="120" label="计划数量" align="center" prop="quantity" /> <el-table-column width="100" label="计划数量" align="center" prop="quantity">
<el-table-column width="200" label="unitPrices" align="center" prop="spare5" /> <template slot-scope="scope">
{{ format4(scope.row.quantity) }}
</template>
</el-table-column>
<!-- <el-table-column width="200" label="unitPrices" align="center" prop="spare5" />
<el-table-column width="200" label="units" align="center" prop="spare6" /> <el-table-column width="200" label="units" align="center" prop="spare6" />
<el-table-column width="180" label="供应商编码" align="center" prop="supplierNo" /> <el-table-column width="180" label="供应商编码" align="center" prop="supplierNo" />
<el-table-column width="180" label="供应商名称" align="center" prop="supplierName" /> <el-table-column width="180" label="供应商名称" align="center" prop="supplierName" />
@@ -118,27 +128,35 @@
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.in_bill_type" :value="scope.row.inType"/> <dict-tag :options="dict.type.in_bill_type" :value="scope.row.inType"/>
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column width="180" label="建立时间" align="center" prop="createDate" /> <el-table-column width="150" label="建立时间" align="center" prop="createDate" sortable="custom" />
<el-table-column width="120" label="创建人" align="center" prop="createManId" /> <el-table-column width="100" label="创建人" align="center" prop="createManId" />
<!-- <el-table-column label="仓库ID" align="center" prop="warehouseId" />--> <!-- <el-table-column label="仓库ID" align="center" prop="warehouseId" />-->
<el-table-column width="180" label="完成日期" align="center" prop="finishDate" /> <el-table-column width="150" label="完成日期" align="center" prop="finishDate" sortable="custom" />
<el-table-column width="180" label="erp单号" align="center" prop="erpBill" /> <el-table-column width="140" label="erp单号" align="center" prop="erpBill" />
<!-- <el-table-column label="单据来源" align="center" prop="stockSource" />--> <!-- <el-table-column label="单据来源" align="center" prop="stockSource" />-->
<!-- <el-table-column label="部门编码" align="center" prop="departmentNo" />--> <!-- <el-table-column label="部门编码" align="center" prop="departmentNo" />-->
<!-- <el-table-column label="班组编码" align="center" prop="classNo" />--> <!-- <el-table-column label="班组编码" align="center" prop="classNo" />-->
<!-- <el-table-column label="客户编码" align="center" prop="customerNo" />--> <!-- <el-table-column label="客户编码" align="center" prop="customerNo" />-->
<el-table-column width="120" label="产品分类" align="center" prop="parentId" /> <!-- <el-table-column width="120" label="产品分类" align="center" prop="parentId" /> -->
<!-- <el-table-column label="价格" align="center" prop="price" />--> <!-- <el-table-column label="价格" align="center" prop="price" />-->
<el-table-column width="180" label="产品编码" align="center" prop="cargoNo" /> <!-- <el-table-column width="180" label="产品编码" align="center" prop="cargoNo" />
<el-table-column width="180" label="单位id" align="center" prop="unit" /> <el-table-column width="180" label="单位id" align="center" prop="unit" />
<el-table-column width="180" label="型号" align="center" prop="spec" /> <el-table-column width="180" label="型号" align="center" prop="spec" />
<el-table-column width="180" label="单位名称" align="center" prop="spare1" /> <el-table-column width="180" label="单位名称" align="center" prop="spare1" />
<el-table-column width="180" label="url" align="center" prop="spare3" /> <el-table-column width="180" label="url" align="center" prop="spare3" />
<el-table-column width="180" label="btnurl" align="center" prop="spare4" /> <el-table-column width="180" label="btnurl" align="center" prop="spare4" />
<el-table-column width="180" label="unitjb" align="center" prop="spare7" /> <el-table-column width="180" label="unitjb" align="center" prop="spare7" /> -->
<el-table-column width="180" label="扫码数量" align="center" prop="scanNum" /> <el-table-column width="100" label="扫码数量" align="center" prop="scanNum">
<el-table-column width="180" label="实际数量" align="center" prop="assignNum" /> <template slot-scope="scope">
{{ format4(scope.row.scanNum) }}
</template>
</el-table-column>
<el-table-column width="100" label="实际数量" align="center" prop="assignNum">
<template slot-scope="scope">
{{ format4(scope.row.assignNum) }}
</template>
</el-table-column>
<el-table-column width="180" label="备注" align="center" prop="remark" /> <el-table-column width="180" label="备注" align="center" prop="remark" />
</el-table> </el-table>
@@ -214,7 +232,9 @@ export default {
quantity: null, quantity: null,
scanNum: null, scanNum: null,
assignNum: null, assignNum: null,
supplierName: null supplierName: null,
orderByColumn: 'create_date',
isAsc: 'desc'
}, },
// 表单参数 // 表单参数
form: {}, form: {},
@@ -307,6 +327,23 @@ export default {
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
handleSortChange({ column, prop, order }) {
this.queryParams.orderByColumn = prop
? prop.replace(/([A-Z])/g, "_$1").toLowerCase()
: undefined
this.queryParams.isAsc =
order === 'ascending' ? 'asc' :
order === 'descending' ? 'desc' :
undefined
this.queryParams.pageNum = 1
this.getList()
},
format4(v) {
if (v === null || v === undefined || v === '') return ''
const n = Number(v)
if (isNaN(n)) return v
return n.toFixed(4)
},
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset() this.reset()
@@ -368,4 +405,10 @@ export default {
width: auto; width: auto;
min-width: fit-content; min-width: fit-content;
} }
/* 表头文本容器自适应宽度,避免固定宽度造成拥挤或换行 */
.el-table >>> th .cell {
white-space: nowrap;
width: auto;
min-width: fit-content;
}
</style> </style>

View File

@@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="出库订单ID" prop="stockoutId"> <el-form-item label="单据编号" prop="stockoutId">
<el-input <el-input
v-model="queryParams.stockoutId" v-model="queryParams.stockoutId"
placeholder="请输入出库订单ID" placeholder="请输入出库订单ID"
@@ -9,16 +9,16 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="出库类型" prop="outType"> <!-- <el-form-item label="出库类型" prop="outType">-->
<el-select v-model="queryParams.outType" placeholder="请选择出库类型" clearable> <!-- <el-select v-model="queryParams.outType" placeholder="请选择出库类型" clearable>-->
<el-option <!-- <el-option-->
v-for="dict in dict.type.out_bill_type" <!-- v-for="dict in dict.type.out_bill_type"-->
:key="dict.value" <!-- :key="dict.value"-->
:label="dict.label" <!-- :label="dict.label"-->
:value="dict.value" <!-- :value="dict.value"-->
/> <!-- />-->
</el-select> <!-- </el-select>-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="单据状态" prop="status"> <el-form-item label="单据状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择单据状态" clearable> <el-select v-model="queryParams.status" placeholder="请选择单据状态" clearable>
<el-option <el-option
@@ -29,14 +29,14 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="子单id" prop="stockoutDetailId"> <!-- <el-form-item label="子单id" prop="stockoutDetailId">-->
<el-input <!-- <el-input-->
v-model="queryParams.stockoutDetailId" <!-- v-model="queryParams.stockoutDetailId"-->
placeholder="请输入子单id" <!-- placeholder="请输入子单id"-->
clearable <!-- clearable-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="物料编码" prop="productId"> <el-form-item label="物料编码" prop="productId">
<el-input <el-input
@@ -57,11 +57,6 @@
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
plain plain
@@ -70,51 +65,71 @@
@click="handleExport" @click="handleExport"
v-hasPermi="['search:ViewStockoutHistory:export']" v-hasPermi="['search:ViewStockoutHistory:export']"
>导出</el-button> >导出</el-button>
</el-col> </el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- @click="handleExport"-->
<!-- v-hasPermi="['search:ViewStockoutHistory:export']"-->
<!-- >导出</el-button>-->
<!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="ViewStockoutHistoryList" @selection-change="handleSelectionChange"> <el-table
v-loading="loading"
:data="ViewStockoutHistoryList"
@selection-change="handleSelectionChange"
@sort-change="handleSortChange"
:default-sort="{ prop: 'createDate', order: 'descending' }"
>
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column width="180" label="出库订单ID" align="center" prop="stockoutId" /> <el-table-column width="180" label="出库订单ID" align="center" prop="stockoutId" />
<el-table-column width="180" label="子单id" align="center" prop="stockoutDetailId" /> <el-table-column width="180" label="子单id" align="center" prop="stockoutDetailId" />
<el-table-column width="180" label="单据主题" align="center" prop="FID" />
<el-table-column width="180" label="物料编码" align="center" prop="productId" /> <el-table-column width="180" label="物料编码" align="center" prop="productId" />
<el-table-column width="180" label="物料名称" align="center" prop="productName" /> <el-table-column width="180" label="物料名称" align="center" prop="productName" />
<el-table-column width="180" label="数量" align="center" prop="quantity" /> <el-table-column width="100" label="数量" align="center" prop="quantity" />
<el-table-column width="200" label="unitPrices" align="center" prop="spare5" /> <!-- <el-table-column width="200" label="unitPrices" align="center" prop="spare5" />-->
<el-table-column width="200" label="units" align="center" prop="spare6" /> <el-table-column width="200" label="单位组" align="center" prop="spare6" />
<el-table-column width="120" label="出库类型" align="center" prop="outType"> <el-table-column width="100" label="出库类型" align="center" prop="outType">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.out_bill_type" :value="scope.row.outType"/> <dict-tag :options="dict.type.out_bill_type" :value="scope.row.outType"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="180" label="建立时间" align="center" prop="createDate" /> <el-table-column width="100" label="建立时间" align="center" prop="createDate" sortable="custom" />
<el-table-column width="120" label="创建人" align="center" prop="createManId" /> <!-- <el-table-column width="120" label="创建人" align="center" prop="createManId" />-->
<el-table-column width="120" label="单据状态" align="center" prop="status"> <el-table-column width="80" label="单据状态" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.out_bill_status" :value="scope.row.status"/> <dict-tag :options="dict.type.out_bill_status" :value="scope.row.status"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="180" label="供应商编号" align="center" prop="supplierNo" /> <!-- <el-table-column width="180" label="供应商编号" align="center" prop="supplierNo" />-->
<el-table-column width="180" label="供应商名称" align="center" prop="supplierName" /> <!-- <el-table-column width="180" label="供应商名称" align="center" prop="supplierName" />-->
<el-table-column width="180" label="客户编号" align="center" prop="customerNo" /> <!-- <el-table-column width="180" label="客户编号" align="center" prop="customerNo" />-->
<el-table-column width="180" label="客户名称" align="center" prop="contactName" /> <!-- <el-table-column width="180" label="客户名称" align="center" prop="contactName" />-->
<el-table-column width="180" label="单据来源" align="center" prop="stockoutSource" /> <!-- <el-table-column width="180" label="单据来源" align="center" prop="stockoutSource" />-->
<el-table-column width="180" label="出口" align="center" prop="exitId" /> <!-- <el-table-column width="180" label="出口" align="center" prop="exitId" />-->
<el-table-column width="180" label="单据主题" align="center" prop="FID" />
<el-table-column width="180" label="erp出库id" align="center" prop="erpStockoutId" /> <el-table-column width="100" label="erp出库id" align="center" prop="erpStockoutId" />
<el-table-column width="180" label="批次" align="center" prop="lotNo" /> <!-- <el-table-column width="180" label="批次" align="center" prop="lotNo" />-->
<el-table-column width="180" label="实际数量" align="center" prop="assignNum" /> <el-table-column width="100" label="实际数量" align="center" prop="assignNum" />
<el-table-column width="180" label="分配数量" align="center" prop="allotQuantity" /> <el-table-column width="100" label="分配数量" align="center" prop="allotQuantity" />
<el-table-column width="180" label="产品分类" align="center" prop="parentId" /> <!-- <el-table-column width="180" label="产品分类" align="center" prop="parentId" />-->
<el-table-column width="180" label="价格" align="center" prop="price" /> <!-- <el-table-column width="180" label="价格" align="center" prop="price" />-->
<el-table-column width="180" label="产品编码" align="center" prop="cargoNo" /> <!-- <el-table-column width="180" label="产品编码" align="center" prop="cargoNo" />-->
<el-table-column width="180" label="单位id" align="center" prop="unit" /> <!-- <el-table-column width="180" label="单位id" align="center" prop="unit" />-->
<el-table-column width="180" label="型号" align="center" prop="spec" /> <!-- <el-table-column width="180" label="型号" align="center" prop="spec" />-->
<el-table-column width="180" label="单位名称" align="center" prop="spare1" /> <!-- <el-table-column width="180" label="单位名称" align="center" prop="spare1" />-->
<el-table-column width="180" label="url" align="center" prop="spare3" /> <!-- <el-table-column width="180" label="url" align="center" prop="spare3" />-->
<el-table-column width="180" label="btnurl" align="center" prop="spare4" /> <!-- <el-table-column width="180" label="btnurl" align="center" prop="spare4" />-->
<el-table-column width="180" label="unitjb" align="center" prop="spare7" /> <!-- <el-table-column width="180" label="unitjb" align="center" prop="spare7" />-->
<el-table-column width="180" label="备注" align="center" prop="remark" /> <el-table-column width="180" label="备注" align="center" prop="remark" />
</el-table> </el-table>
@@ -190,7 +205,9 @@ export default {
supplierNo: null, supplierNo: null,
supplierName: null, supplierName: null,
customerNo: null, customerNo: null,
contactName: null contactName: null,
orderByColumn: 'create_date',
isAsc: 'desc'
}, },
// 表单参数 // 表单参数
form: {}, form: {},
@@ -271,6 +288,17 @@ export default {
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
handleSortChange({ column, prop, order }) {
this.queryParams.orderByColumn = prop
? prop.replace(/([A-Z])/g, "_$1").toLowerCase()
: undefined
this.queryParams.isAsc =
order === 'ascending' ? 'asc' :
order === 'descending' ? 'desc' :
undefined
this.queryParams.pageNum = 1
this.getList()
},
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset() this.reset()

View File

@@ -51,7 +51,7 @@
size="mini" size="mini"
@click="pointOut" @click="pointOut"
v-hasPermi="['job:outmydoJob:pointOut']" v-hasPermi="['job:outmydoJob:pointOut']"
>指定货位出库 <!-- 指定货位出库 --></el-button> >指定通道出库 <!-- 指定货位出库 --></el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>

View File

@@ -84,25 +84,28 @@
<el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange" max-height="650"> <el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange" max-height="650">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="库存编码" align="left" prop="stockId" /> <!-- 库存编码 --> <el-table-column label="库存编码" align="center" prop="stockId" width="142" /> <!-- 库存编码 -->
<el-table-column label="初始货位编码" align="left" prop="lotNo" /> <!-- 库存编码 --> <el-table-column label="初始货位" align="center" prop="lotNo" width="142" /> <!-- 初始货位 -->
<el-table-column label="操作后货位编码" align="left" prop="cargoSpaceId" /> <!-- 货位编码 --> <el-table-column label="现货位" align="center" prop="cargoSpaceId" width="142" /> <!-- 货位编码 -->
<el-table-column label="操作后货位名称" align="left" prop="cargoSpaceName" /> <!-- 货位编码 --> <el-table-column label="货位名称" align="center" prop="cargoSpaceName" width="142" /> <!-- 货位编码 -->
<el-table-column label="托盘条码" align="left" prop="trayCode" /> <!-- 托盘条码 --> <el-table-column label="托盘条码" align="center" prop="trayCode" width="142" /> <!-- 托盘条码 -->
<el-table-column label="初始物品名称" align="left" prop="productGuid" /> <!-- 托盘条码 --> <el-table-column label="操作类型" align="center" prop="method"> <!-- 操作 -->
<el-table-column label="操作后物品编码" align="left" prop="productId" /> <!-- 物品编码 -->
<el-table-column label="操作后物品名称" align="left" prop="productName" /> <!-- 物品名称 -->
<el-table-column label="单位名称" align="left" prop="unitName" />
<el-table-column label="产品型号" align="left" prop="productModel" />
<el-table-column label="初始数量" align="right" prop="oldQuantity" /> <!-- 初始数量 -->
<el-table-column label="操作后数量" align="right" prop="quantity" /> <!-- 操作后数量 -->
<el-table-column label="操作" align="left" prop="method"> <!-- 操作 -->
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.stock_maintain_method" :value="scope.row.method"/> <dict-tag :options="dict.type.stock_maintain_method" :value="scope.row.method"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="仓库" align="left" prop="warehouseName" /> <!-- 仓库 --> <el-table-column label="原物品名称" align="center" prop="productGuid" width="142" /> <!-- 托盘条码 -->
<el-table-column label="创建时间" align="left" prop="createTime" /> <!-- 创建时间 --> <el-table-column label="现物品编码" align="center" prop="productId" width="142" /> <!-- 物品编码 -->
<el-table-column label="现物品名称" align="center" prop="productName" width="142" /> <!-- 物品名称 -->
<el-table-column label="单位名称" align="center" prop="unitName" width="142" />
<el-table-column label="产品型号" align="center" prop="productModel" width="142" />
<el-table-column label="初始数量" align="center" prop="oldQuantity" /> <!-- 初始数量 -->
<el-table-column label="当前数量" align="center" prop="quantity" /> <!-- 操作后数量 -->
<!-- <el-table-column label="仓库" align="left" prop="warehouseName" /> -->
<!-- 仓库 -->
<el-table-column label="操作时间" align="center" prop="createTime" width="180" /> <!-- 创建时间 -->
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">--> <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
<!-- <el-button--> <!-- <el-button-->

File diff suppressed because it is too large Load Diff