Compare commits
3 Commits
34e931cf37
...
11b1d630b8
| Author | SHA1 | Date | |
|---|---|---|---|
| 11b1d630b8 | |||
| f64216f3c1 | |||
| 9fc1cc53e9 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -28,3 +28,4 @@ hs_err_pid*
|
||||
|
||||
/log/
|
||||
.vscode/
|
||||
/docs/
|
||||
|
||||
258
.trae/documents/WMS 操作手册模板输出与对齐.md
Normal file
258
.trae/documents/WMS 操作手册模板输出与对齐.md
Normal 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`
|
||||
- 表格模板:关键字段与预期结果记录表。
|
||||
@@ -66,4 +66,9 @@ public class ToErpApiController {
|
||||
public AjaxResult getInStock(){
|
||||
return toErpService.getInStock();
|
||||
}
|
||||
|
||||
@RequestMapping("/inStockConfirm/{stockinGuids}")
|
||||
public AjaxResult inStockConfirm( @PathVariable String[] stockinGuids){
|
||||
return toErpService.inStockConfirm(stockinGuids);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.ruoyi.api.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PostReturn {
|
||||
Boolean success;
|
||||
String body;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -41,4 +41,6 @@ public interface IToErpService {
|
||||
void AddStockinDetailByErpStockinDetail(ErpInStockinDetail erpInStockinetail);
|
||||
|
||||
AjaxResult getInStock();
|
||||
|
||||
AjaxResult inStockConfirm(String[] stockInId);
|
||||
}
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
package com.ruoyi.api.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateField;
|
||||
import cn.hutool.core.date.DateUnit;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import cn.hutool.json.JSONArray;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.ruoyi.api.domain.PostReturn;
|
||||
import com.ruoyi.api.domain.erp.*;
|
||||
import com.ruoyi.api.service.IToErpService;
|
||||
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.system.domain.InStockinDetailN;
|
||||
import com.ruoyi.system.domain.InStockinN;
|
||||
import com.ruoyi.system.domain.InStockinNFinish;
|
||||
import com.ruoyi.system.domain.InStockinNQueryRequest;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
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 lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
@@ -440,19 +449,11 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
|
||||
@Override
|
||||
public AjaxResult callErp(ReceiveOutStockConfirm receiveOutStockConfirm) {
|
||||
String body=HttpRequest.post(outStockConfirmUrl).header("ZBAPI-Token", login()).body(JSONUtil.toJsonStr(receiveOutStockConfirm)).execute().body();
|
||||
CallErpResponse callErpResponse = JSONUtil.toBean(body, CallErpResponse.class);
|
||||
if (callErpResponse.getCode()==200){
|
||||
Boolean success=post(outStockConfirmUrl,JSONUtil.toJsonStr(receiveOutStockConfirm),"出库单回传").getSuccess();
|
||||
if (success){
|
||||
return AjaxResult.success();
|
||||
}else {
|
||||
if (callErpResponse.getCode()==300){
|
||||
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());
|
||||
return AjaxResult.error();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
private IInStockinNService inStockinNService;
|
||||
|
||||
@Autowired
|
||||
private com.ruoyi.system.service.IInStockinDetailNService inStockinDetailNService;
|
||||
private IInStockinNFinishService inStockinNFinishService;
|
||||
|
||||
@Autowired
|
||||
private IInStockinDetailNService inStockinDetailNService;
|
||||
|
||||
@Autowired
|
||||
private IInStockinDetailNFinishService inStockinDetailNFinishService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private ObjectMapper objectMapper;
|
||||
@@ -732,9 +710,13 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
} catch (Exception e) {
|
||||
log.error("JSON序列化失败", e);
|
||||
return AjaxResult.error("JSON序列化失败");
|
||||
}
|
||||
PostReturn result = post(getStockinListUrl, jsonStr, "获取入库单");
|
||||
if (!result.getSuccess()){
|
||||
return AjaxResult.error("接口调用失败");
|
||||
}
|
||||
// 获取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);
|
||||
if (response != null && response.getRows() != null) {
|
||||
@@ -844,5 +826,163 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
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());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -40,14 +40,16 @@ public class ToWcsServiceImpl implements IToWcsService {
|
||||
|
||||
|
||||
@Override
|
||||
//@Scheduled(fixedDelay=1500)
|
||||
// @Scheduled(fixedDelay=1500)
|
||||
public void pushOutMydoJob() {
|
||||
//查询所有未推送的料箱出库作业
|
||||
MydoJob mydoJobParam = new MydoJob();
|
||||
mydoJobParam.setStatus("1");
|
||||
List<String> list = new ArrayList<>();
|
||||
list.add("21");
|
||||
list.add("21");//自动分配出库
|
||||
list.add("26");
|
||||
list.add("23");//指定货位出库
|
||||
list.add("22");//空托盘出库
|
||||
mydoJobParam.setInOutIds(list);
|
||||
List<MydoJob> outMydoJobs = mydoJobService.selectMydoJobListApi(mydoJobParam);
|
||||
for (MydoJob outMydoJob : outMydoJobs) {
|
||||
|
||||
@@ -110,17 +110,21 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
MydoJob mydoJob1 = mydoJobService.selectMydoJobByTrayCode(requestEnter.getTrayCode());
|
||||
if (ObjUtil.isNotNull(mydoJob1) && !"1".equals(mydoJob1.getInOrOut())) {
|
||||
//空托盘处理
|
||||
String productId = "KTP0001";
|
||||
String cargoSpaceId = getCargoSpaceByProductInfo(productId);
|
||||
if (!StringUtils.isNotBlank(cargoSpaceId)) {
|
||||
return AjaxResult.error("无符合条件的货位用于分配,请检查库存区占用情况,物料号:" + productId);
|
||||
if (mydoJob1.getCargoSpaceId()==null){
|
||||
String productId = "KTP0001";
|
||||
String cargoSpaceId = getCargoSpaceByProductInfo(productId);
|
||||
if (!StringUtils.isNotBlank(cargoSpaceId)) {
|
||||
return AjaxResult.error("无符合条件的货位用于分配,请检查库存区占用情况,物料号:" + productId);
|
||||
}
|
||||
mydoJob1.setCargoSpaceId(cargoSpaceId);
|
||||
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(cargoSpaceId);
|
||||
mydoJob1.setRoadwayId(basCargoSpace.getTheFloor().toString());
|
||||
mydoJob1.setStatus("3");
|
||||
mydoJobService.updateMydoJob(mydoJob1);
|
||||
return AjaxResult.success(mydoJob1);
|
||||
}else {
|
||||
return AjaxResult.success(mydoJob1);
|
||||
}
|
||||
mydoJob1.setCargoSpaceId(cargoSpaceId);
|
||||
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(cargoSpaceId);
|
||||
mydoJob1.setRoadwayId(basCargoSpace.getTheFloor().toString());
|
||||
mydoJob1.setStatus("3");
|
||||
mydoJobService.insertMydoJob(mydoJob1);
|
||||
return AjaxResult.success(mydoJob1);
|
||||
}
|
||||
//校验 - 条码已经有作业
|
||||
if (ObjUtil.isNotNull(mydoJob1) && "1".equals(mydoJob1.getInOrOut())) {
|
||||
@@ -169,6 +173,7 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
mydoJobDetail.setInOrOutDId(stockinDetailId);
|
||||
mydoJobDetail.setInOrOutId(inStockinDetail.getStockinId());
|
||||
mydoJobDetailService.insertMydoJobDetail(mydoJobDetail);
|
||||
trayMsgService.deleteTrayMsgById(trayMsg.getId());
|
||||
return AjaxResult.success(mydoJob);
|
||||
}
|
||||
|
||||
@@ -188,52 +193,52 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
List<BasStock> stocks = basStockService.selectBasStockListByProductId(productId);
|
||||
|
||||
//如果集合空 - 寻找未被占用的存储区组放货
|
||||
if (stocks.size() == 0) {
|
||||
for (int i = 1; i <= 45; i++) {
|
||||
BasCargoSpace cargospace = new BasCargoSpace();
|
||||
if (!stocks.isEmpty()) {
|
||||
//如果物料已经存放在多个货位(区域) - 去重
|
||||
List<BasStock> stocksNew = stocks.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
//存储区
|
||||
String groupCodingNo = String.format("%03d", i);
|
||||
cargospace.setGroupCodingNo(groupCodingNo);
|
||||
//查询对应货位的区域在【BasCargoSpace】是否有空位 - 在groupCodingNo的分组中是否仍然有状态【1】的货位
|
||||
for (BasStock stock : stocksNew) {
|
||||
//获取每种物料的存放货位信息
|
||||
BasCargoSpace cargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(stock.getCargoSpaceId());
|
||||
|
||||
//获取【groupCodingNo】所有货位
|
||||
List<BasCargoSpace> cargoSpaces = basCargoSpaceService.selectBasCargoSpaceList(cargospace);
|
||||
//获取每种物料的存放货位信息 - 存储区
|
||||
String group = cargoSpace.getGroupCodingNo();
|
||||
|
||||
//判断是否全部未占用,即某存储区全部为空位 - 避免物料混放
|
||||
boolean isAllEmpty = cargoSpaces.stream().allMatch(c -> "1".equals(c.getStatus()));
|
||||
//获取该存储区组的所有货位
|
||||
List<BasCargoSpace> cargoSpaces = basCargoSpaceService.selectBasCargoSpaceListByGroupCodingNo(group);
|
||||
|
||||
//区域未占用 - 则分配最内侧货位
|
||||
if (isAllEmpty && cargoSpaces.size() > 0) {
|
||||
cargoSpaces.sort(Comparator.comparing(BasCargoSpace::getGroupCoding).reversed());
|
||||
return cargoSpaces.get(0).getCargoSpaceId();
|
||||
//在集合中获取状态为【1】的货位
|
||||
for (BasCargoSpace cs : cargoSpaces) {
|
||||
//货位状态:1(未占用) -> 返回该货位结果
|
||||
if ("1".equals(cs.getStatus())) {
|
||||
return cs.getCargoSpaceId();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
for (int i = 1; i <= 45; i++) {
|
||||
BasCargoSpace cargospace = new BasCargoSpace();
|
||||
|
||||
//存储区
|
||||
String groupCodingNo = String.format("%03d", i);
|
||||
cargospace.setGroupCodingNo(groupCodingNo);
|
||||
|
||||
//获取【groupCodingNo】所有货位
|
||||
List<BasCargoSpace> cargoSpaces = basCargoSpaceService.selectBasCargoSpaceList(cargospace);
|
||||
|
||||
//判断是否全部未占用,即某存储区全部为空位 - 避免物料混放
|
||||
boolean isAllEmpty = cargoSpaces.stream().allMatch(c -> "1".equals(c.getStatus()));
|
||||
|
||||
//区域未占用 - 则分配最内侧货位
|
||||
if (isAllEmpty && cargoSpaces.size() > 0) {
|
||||
cargoSpaces.sort(Comparator.comparing(BasCargoSpace::getGroupCoding).reversed());
|
||||
return cargoSpaces.get(0).getCargoSpaceId();
|
||||
}
|
||||
}
|
||||
|
||||
//如果物料已经存放在多个货位(区域) - 去重
|
||||
List<BasStock> stocksNew = stocks.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
//查询对应货位的区域在【BasCargoSpace】是否有空位 - 在groupCodingNo的分组中是否仍然有状态【1】的货位
|
||||
for (BasStock stock : stocksNew) {
|
||||
//获取每种物料的存放货位信息
|
||||
BasCargoSpace cargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(stock.getCargoSpaceId());
|
||||
|
||||
//获取每种物料的存放货位信息 - 存储区
|
||||
String group = cargoSpace.getGroupCodingNo();
|
||||
|
||||
//获取该存储区组的所有货位
|
||||
List<BasCargoSpace> cargoSpaces = basCargoSpaceService.selectBasCargoSpaceListByGroupCodingNo(group);
|
||||
|
||||
//在集合中获取状态为【1】的货位
|
||||
for (BasCargoSpace cs : cargoSpaces) {
|
||||
//货位状态:1(未占用) -> 返回该货位结果
|
||||
if ("1".equals(cs.getStatus())) {
|
||||
return cs.getCargoSpaceId();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("入库子单获取目标货位失败,异常信息:" + e.getMessage());
|
||||
}
|
||||
@@ -293,6 +298,9 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
MydoJob outJob = outMydoJobs.get(0);
|
||||
outJob.setExecutionPhase("2");
|
||||
mydoJobService.updateMydoJob(outJob);
|
||||
BasCargoSpace basCargoSpace =basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(outJob.getCargoSpaceId());
|
||||
basCargoSpace.setStatus("1");
|
||||
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ruoyi.bas.cargoSpace.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.bas.cargoSpace.domain.BasCargoSpace;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -36,7 +37,7 @@ public interface BasCargoSpaceMapper extends BaseMapper<BasCargoSpace>
|
||||
* @param groupCodingNo 存储区组
|
||||
* @return 库存信息集合
|
||||
*/
|
||||
public List<BasCargoSpace> selectBasCargoSpaceListByGroupCodingNo(String groupCodingNo);
|
||||
public List<BasCargoSpace> selectBasCargoSpaceListByGroupCodingNo(@Param("groupCodingNo") String groupCodingNo);
|
||||
|
||||
/**
|
||||
* 新增库存信息
|
||||
|
||||
@@ -67,7 +67,7 @@ public class OutMydoJobController extends BaseController {
|
||||
return mydoJobService.OuthandInvalidation(jobIds);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('job:outmydoJob:pointOut')")
|
||||
// @PreAuthorize("@ss.hasPermi('job:outmydoJob:pointOut')")
|
||||
@Log(title = "指定货位出库", businessType = BusinessType.INSERT)
|
||||
@RequestMapping("/pointOut")
|
||||
public AjaxResult pointOut(@RequestParam("groupCodingNo")String groupCodingNo, @RequestParam("outQuantity")String quantity)
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ruoyi.job.mydojob.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
@@ -13,6 +14,7 @@ import java.util.List;
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
@Data
|
||||
public class MydoJob extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -131,11 +133,15 @@ public class MydoJob extends BaseEntity
|
||||
|
||||
private List<String> inOutIds;
|
||||
|
||||
private String isAsc;
|
||||
|
||||
private String createLeftTime;
|
||||
private String createRightTime;
|
||||
|
||||
private String productId;
|
||||
|
||||
private String orderByColumn;
|
||||
|
||||
public String getProductId() {
|
||||
return productId;
|
||||
}
|
||||
|
||||
@@ -278,8 +278,6 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||
if (CollUtil.isNotEmpty(mydoJobDetails)) {
|
||||
List<BasStock> list = new ArrayList<>();
|
||||
|
||||
|
||||
//查询盘点信息中的异常信息
|
||||
CheckDifferenceRecord checkDifferenceRecordParam = new CheckDifferenceRecord();
|
||||
checkDifferenceRecordParam.setTrayCode(mydoJob.getTrayCode());
|
||||
@@ -307,18 +305,14 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
//正常库存
|
||||
list.add(stockByInStockinDetail);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//修改货位状态
|
||||
basCargoSpace.setStatus("2");
|
||||
basCargoSpace.setTrayCode(mydoJob.getTrayCode());
|
||||
basCargoSpace.setCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
||||
|
||||
//插入库存信息
|
||||
basStockService.insertBasStockList(list);
|
||||
|
||||
//结束任务
|
||||
mydoJob.setStatus("4");
|
||||
mydoJob.setFinishTime(DateUtil.formatDateTime(DateUtil.date()));
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ruoyi.job.mydojobfinish.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
@@ -11,6 +12,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
@Data
|
||||
public class MydoJobFinish extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -111,6 +113,8 @@ public class MydoJobFinish extends BaseEntity
|
||||
@Excel(name = "重分标记")
|
||||
private String faultFlag;
|
||||
|
||||
private String orderByColumn;
|
||||
|
||||
public void setJobId(String jobId)
|
||||
{
|
||||
this.jobId = jobId;
|
||||
|
||||
@@ -13,6 +13,9 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -60,13 +63,10 @@ public class RequestLogServiceImpl implements IRequestLogService
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
||||
public int insertRequestLog(RequestLog requestLog)
|
||||
{
|
||||
if (requestLog.getIsSuccessful().equals("1")){
|
||||
return requestLogMapper.insertRequestLog(requestLog);
|
||||
}else {
|
||||
return 0;
|
||||
}
|
||||
return requestLogMapper.insertRequestLog(requestLog);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -100,15 +100,15 @@ public class PdaServiceImp implements PdaService {
|
||||
mydoJobParam.setTrayCode(trayCodeMakeSure.getTrayCode());
|
||||
mydoJobParam.setStatus("3");
|
||||
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailListByExit(mydoJobParam);
|
||||
BasWarehouse basWarehouse = basWarehouseMapper.selectBasWarehouseByWarehouseId(mydoJobDetails.get(0).getWarehouseId());
|
||||
if("2".equals(basWarehouse.getWarehouseType()) && mydoJobDetails.isEmpty()){
|
||||
BasStock basStock = new BasStock();
|
||||
basStock.setTrayCode(trayCodeMakeSure.getTrayCode());
|
||||
List<BasStock> basStocks = basStockMapper.selectBasStockList(basStock);
|
||||
basStockMapper.deleteBasStockByStockIds((String[]) basStocks.stream().map(BasStock::getStockId).toArray());
|
||||
|
||||
}
|
||||
if(mydoJobDetails.isEmpty() && "1".equals(basWarehouse.getWarehouseType())){
|
||||
// BasWarehouse basWarehouse = basWarehouseMapper.selectBasWarehouseByWarehouseId(mydoJobDetails.get(0).getWarehouseId());
|
||||
// if("2".equals(basWarehouse.getWarehouseType()) && mydoJobDetails.isEmpty()){
|
||||
// BasStock basStock = new BasStock();
|
||||
// basStock.setTrayCode(trayCodeMakeSure.getTrayCode());
|
||||
// List<BasStock> basStocks = basStockMapper.selectBasStockList(basStock);
|
||||
// basStockMapper.deleteBasStockByStockIds((String[]) basStocks.stream().map(BasStock::getStockId).toArray());
|
||||
//
|
||||
// }
|
||||
if(mydoJobDetails.isEmpty() ){
|
||||
return AjaxResult.error("该物料没有出库作业,请检查");
|
||||
}
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
@@ -120,8 +120,6 @@ public class PdaServiceImp implements PdaService {
|
||||
} else {
|
||||
return AjaxResult.error( map.get("v_resultmsg").toString());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -246,8 +244,7 @@ public class PdaServiceImp implements PdaService {
|
||||
@Override
|
||||
public AjaxResult ktpout(TrayCodeMsg trayCodeMsg) {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("v_warehouse_id", trayCodeMsg.getWarehouseId());
|
||||
map.put("v_exit_id", trayCodeMsg.getExitId());
|
||||
map.put("v_num", trayCodeMsg.getInQuantity());
|
||||
pdaMapper.ktpout(map);
|
||||
String result = map.get("v_result").toString();
|
||||
if ("10".equals(result)){
|
||||
|
||||
@@ -37,7 +37,6 @@ public class InStockinDetailNController extends BaseController
|
||||
/**
|
||||
* 查询入库子单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:inStockinDetailN:list')")
|
||||
@GetMapping("/list")
|
||||
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)
|
||||
@PostMapping("/export")
|
||||
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}")
|
||||
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)
|
||||
@PostMapping
|
||||
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)
|
||||
@PutMapping
|
||||
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)
|
||||
@DeleteMapping("/{stockinDetailIds}")
|
||||
public AjaxResult remove(@PathVariable String[] stockinDetailIds)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
@@ -12,6 +14,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
||||
* @author zgw
|
||||
* @date 2025-12-17
|
||||
*/
|
||||
@Data
|
||||
public class InStockinDetailNFinish extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -147,6 +150,11 @@ public class InStockinDetailNFinish extends BaseEntity
|
||||
/** $column.columnComment */
|
||||
private String stockinDetailId;
|
||||
|
||||
|
||||
private BigDecimal smNum;
|
||||
|
||||
private BigDecimal finishNum;
|
||||
|
||||
public void setErpDetailId(Long erpDetailId)
|
||||
{
|
||||
this.erpDetailId = erpDetailId;
|
||||
|
||||
@@ -58,4 +58,6 @@ public interface IInStockinDetailNFinishService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInStockinDetailNFinishByStockinDetailId(String stockinDetailId);
|
||||
|
||||
void insertByStockInId(String stockinId);
|
||||
}
|
||||
|
||||
@@ -59,4 +59,5 @@ public interface IInStockinDetailNService
|
||||
*/
|
||||
public int deleteInStockinDetailNByStockinDetailId(String stockinDetailId);
|
||||
|
||||
void deleteByStockInId(String stockinId);
|
||||
}
|
||||
|
||||
@@ -93,4 +93,9 @@ public class InStockinDetailNFinishServiceImpl implements IInStockinDetailNFinis
|
||||
{
|
||||
return inStockinDetailNFinishMapper.deleteInStockinDetailNFinishByStockinDetailId(stockinDetailId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertByStockInId(String stockinId) {
|
||||
inStockinDetailNFinishMapper.insertByStockInId(stockinId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,5 +94,8 @@ public class InStockinDetailNServiceImpl implements IInStockinDetailNService
|
||||
return inStockinDetailNMapper.deleteInStockinDetailNByStockinDetailId(stockinDetailId);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void deleteByStockInId(String stockinId) {
|
||||
inStockinDetailNMapper.deleteByStockInId(stockinId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,54 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.bas.cargoSpace.mapper.BasCargoSpaceMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.bas.cargoSpace.domain.BasCargoSpace" id="BasCargoSpaceResult">
|
||||
<result property="cargoSpaceId" column="cargo_space_id" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="roadwayId" column="roadway_id" />
|
||||
<result property="cargoAreaId" column="cargo_area_id" />
|
||||
<result property="theType" column="the_type" />
|
||||
<result property="theTypeName" column="the_type_name" />
|
||||
<result property="cargoSpaceName" column="cargo_space_name" />
|
||||
<result property="thePlatoon" column="the_platoon" />
|
||||
<result property="theColumn" column="the_column" />
|
||||
<result property="theFloor" column="the_floor" />
|
||||
<result property="status" column="status" />
|
||||
<result property="locked" column="locked" />
|
||||
<result property="trayCode" column="tray_code" />
|
||||
<result property="cargoHight" column="cargo_hight" />
|
||||
<result property="issDouble" column="iss_double" />
|
||||
<result property="groupCodingNo" column="group_coding_no" />
|
||||
<result property="groupCoding" column="group_coding" />
|
||||
<result property="cargoSpaceLogo" column="cargo_space_logo" />
|
||||
<result property="thisCargoArea" column="this_cargo_area" />
|
||||
<result property="cargoSpaceId" column="cargo_space_id"/>
|
||||
<result property="warehouseId" column="warehouse_id"/>
|
||||
<result property="warehouseName" column="warehouse_name"/>
|
||||
<result property="roadwayId" column="roadway_id"/>
|
||||
<result property="cargoAreaId" column="cargo_area_id"/>
|
||||
<result property="theType" column="the_type"/>
|
||||
<result property="theTypeName" column="the_type_name"/>
|
||||
<result property="cargoSpaceName" column="cargo_space_name"/>
|
||||
<result property="thePlatoon" column="the_platoon"/>
|
||||
<result property="theColumn" column="the_column"/>
|
||||
<result property="theFloor" column="the_floor"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="locked" column="locked"/>
|
||||
<result property="trayCode" column="tray_code"/>
|
||||
<result property="cargoHight" column="cargo_hight"/>
|
||||
<result property="issDouble" column="iss_double"/>
|
||||
<result property="groupCodingNo" column="group_coding_no"/>
|
||||
<result property="groupCoding" column="group_coding"/>
|
||||
<result property="cargoSpaceLogo" column="cargo_space_logo"/>
|
||||
<result property="thisCargoArea" column="this_cargo_area"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasCargoSpaceVo">
|
||||
select
|
||||
bcs.cargo_space_id,
|
||||
bcs.warehouse_id,
|
||||
bcs.roadway_id,
|
||||
bcs.cargo_area_id,
|
||||
bcs.the_type,
|
||||
bcs.the_type_name,
|
||||
bcs.cargo_space_name,
|
||||
bcs.the_platoon,
|
||||
bcs.the_column,
|
||||
bcs.the_floor,
|
||||
bcs.status,
|
||||
bcs.locked,
|
||||
bcs.tray_code,
|
||||
bcs.cargo_hight,
|
||||
bcs.iss_double,
|
||||
bcs.group_coding_no,
|
||||
bcs.group_coding,
|
||||
bcs.cargo_space_logo,
|
||||
bcs.this_cargo_area,
|
||||
bw.warehouse_name
|
||||
select bcs.cargo_space_id,
|
||||
bcs.warehouse_id,
|
||||
bcs.roadway_id,
|
||||
bcs.cargo_area_id,
|
||||
bcs.the_type,
|
||||
bcs.the_type_name,
|
||||
bcs.cargo_space_name,
|
||||
bcs.the_platoon,
|
||||
bcs.the_column,
|
||||
bcs.the_floor,
|
||||
bcs.status,
|
||||
bcs.locked,
|
||||
bcs.tray_code,
|
||||
bcs.cargo_hight,
|
||||
bcs.iss_double,
|
||||
bcs.group_coding_no,
|
||||
bcs.group_coding,
|
||||
bcs.cargo_space_logo,
|
||||
bcs.this_cargo_area,
|
||||
bw.warehouse_name
|
||||
from bas_cargo_space bcs
|
||||
left join bas_warehouse bw on bcs.warehouse_id = bw.warehouse_id
|
||||
|
||||
@@ -57,58 +56,44 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="selectBasCargoSpaceList" resultMap="BasCargoSpaceResult">
|
||||
<include refid="selectBasCargoSpaceVo"/>
|
||||
<where>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and bcs.cargo_space_id like concat('%', #{cargoSpaceId}, '%')</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and bcs.warehouse_id = #{warehouseId}</if>
|
||||
<if test="roadwayId != null and roadwayId != ''"> and bcs.roadway_id = #{roadwayId}</if>
|
||||
<if test="cargoAreaId != null and cargoAreaId != ''"> and bcs.cargo_area_id = #{cargoAreaId}</if>
|
||||
<if test="theType != null and theType != ''"> and bcs.the_type = #{theType}</if>
|
||||
<if test="theTypeName != null and theTypeName != ''"> and bcs.the_type_name like concat('%', #{theTypeName}, '%')</if>
|
||||
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and bcs.cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
|
||||
<if test="thePlatoon != null "> and bcs.the_platoon = #{thePlatoon}</if>
|
||||
<if test="theColumn != null "> and bcs.the_column = #{theColumn}</if>
|
||||
<if test="theFloor != null "> and bcs.the_floor = #{theFloor}</if>
|
||||
<if test="status != null and status != ''"> and bcs.status = #{status}</if>
|
||||
<if test="locked != null and locked != ''"> and bcs.locked = #{locked}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and bcs.tray_code like concat('%', #{trayCode}, '%')</if>
|
||||
<if test="cargoHight != null and cargoHight != ''"> and bcs.cargo_hight = #{cargoHight}</if>
|
||||
<if test="issDouble != null and issDouble != ''"> and bcs.iss_double = #{issDouble}</if>
|
||||
<if test="groupCodingNo != null and groupCodingNo != ''"> and bcs.group_coding_no = #{groupCodingNo}</if>
|
||||
<if test="groupCoding != null and groupCoding != ''"> and bcs.group_coding = #{groupCoding}</if>
|
||||
<if test="cargoSpaceLogo != null and cargoSpaceLogo != ''"> and bcs.cargo_space_logo = #{cargoSpaceLogo}</if>
|
||||
<if test="thisCargoArea != null and thisCargoArea != ''"> and bcs.this_cargo_area = #{thisCargoArea}</if>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''">and bcs.cargo_space_id like concat('%',
|
||||
#{cargoSpaceId}, '%')
|
||||
</if>
|
||||
<if test="warehouseId != null and warehouseId != ''">and bcs.warehouse_id = #{warehouseId}</if>
|
||||
<if test="roadwayId != null and roadwayId != ''">and bcs.roadway_id = #{roadwayId}</if>
|
||||
<if test="cargoAreaId != null and cargoAreaId != ''">and bcs.cargo_area_id = #{cargoAreaId}</if>
|
||||
<if test="theType != null and theType != ''">and bcs.the_type = #{theType}</if>
|
||||
<if test="theTypeName != null and theTypeName != ''">and bcs.the_type_name like concat('%', #{theTypeName},
|
||||
'%')
|
||||
</if>
|
||||
<if test="cargoSpaceName != null and cargoSpaceName != ''">and bcs.cargo_space_name like concat('%',
|
||||
#{cargoSpaceName}, '%')
|
||||
</if>
|
||||
<if test="thePlatoon != null ">and bcs.the_platoon = #{thePlatoon}</if>
|
||||
<if test="theColumn != null ">and bcs.the_column = #{theColumn}</if>
|
||||
<if test="theFloor != null ">and bcs.the_floor = #{theFloor}</if>
|
||||
<if test="status != null and status != ''">and bcs.status = #{status}</if>
|
||||
<if test="locked != null and locked != ''">and bcs.locked = #{locked}</if>
|
||||
<if test="trayCode != null and trayCode != ''">and bcs.tray_code like concat('%', #{trayCode}, '%')</if>
|
||||
<if test="cargoHight != null and cargoHight != ''">and bcs.cargo_hight = #{cargoHight}</if>
|
||||
<if test="issDouble != null and issDouble != ''">and bcs.iss_double = #{issDouble}</if>
|
||||
<if test="groupCodingNo != null and groupCodingNo != ''">and bcs.group_coding_no = #{groupCodingNo}</if>
|
||||
<if test="groupCoding != null and groupCoding != ''">and bcs.group_coding = #{groupCoding}</if>
|
||||
<if test="cargoSpaceLogo != null and cargoSpaceLogo != ''">and bcs.cargo_space_logo = #{cargoSpaceLogo}
|
||||
</if>
|
||||
<if test="thisCargoArea != null and thisCargoArea != ''">and bcs.this_cargo_area = #{thisCargoArea}</if>
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
</where>
|
||||
order by case when bcs.status='1' then 0 else 1 end asc, bcs.the_platoon asc, bcs.the_column asc, bcs.the_floor asc
|
||||
order by case when bcs.status='1' then 0 else 1 end asc, bcs.the_platoon asc, bcs.the_column asc, bcs.the_floor
|
||||
asc
|
||||
</select>
|
||||
|
||||
<select id="selectBasCargoSpaceListByGroupCodingNo" parameterType="string" resultMap="BasCargoSpaceResult">
|
||||
<include refid="selectBasCargoSpaceVo"/>
|
||||
<where>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and bcs.cargo_space_id like concat('%', #{cargoSpaceId}, '%')</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and bcs.warehouse_id = #{warehouseId}</if>
|
||||
<if test="roadwayId != null and roadwayId != ''"> and bcs.roadway_id = #{roadwayId}</if>
|
||||
<if test="cargoAreaId != null and cargoAreaId != ''"> and bcs.cargo_area_id = #{cargoAreaId}</if>
|
||||
<if test="theType != null and theType != ''"> and bcs.the_type = #{theType}</if>
|
||||
<if test="theTypeName != null and theTypeName != ''"> and bcs.the_type_name like concat('%', #{theTypeName}, '%')</if>
|
||||
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and bcs.cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
|
||||
<if test="thePlatoon != null "> and bcs.the_platoon = #{thePlatoon}</if>
|
||||
<if test="theColumn != null "> and bcs.the_column = #{theColumn}</if>
|
||||
<if test="theFloor != null "> and bcs.the_floor = #{theFloor}</if>
|
||||
<if test="status != null and status != ''"> and bcs.status = #{status}</if>
|
||||
<if test="locked != null and locked != ''"> and bcs.locked = #{locked}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and bcs.tray_code like concat('%', #{trayCode}, '%')</if>
|
||||
<if test="cargoHight != null and cargoHight != ''"> and bcs.cargo_hight = #{cargoHight}</if>
|
||||
<if test="issDouble != null and issDouble != ''"> and bcs.iss_double = #{issDouble}</if>
|
||||
<if test="groupCodingNo != null and groupCodingNo != ''"> and bcs.group_coding_no = #{groupCodingNo}</if>
|
||||
<if test="groupCoding != null and groupCoding != ''"> and bcs.group_coding = #{groupCoding}</if>
|
||||
<if test="cargoSpaceLogo != null and cargoSpaceLogo != ''"> and bcs.cargo_space_logo = #{cargoSpaceLogo}</if>
|
||||
<if test="thisCargoArea != null and thisCargoArea != ''"> and bcs.this_cargo_area = #{thisCargoArea}</if>
|
||||
<!-- <if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">-->
|
||||
<!-- ${params.warehouseDataScope}-->
|
||||
<!-- </if>-->
|
||||
</where>
|
||||
where
|
||||
group_coding_no = #{groupCodingNo}
|
||||
order by group_coding desc
|
||||
</select>
|
||||
|
||||
@@ -140,7 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="groupCoding != null">group_coding,</if>
|
||||
<if test="cargoSpaceLogo != null">cargo_space_logo,</if>
|
||||
<if test="thisCargoArea != null">this_cargo_area,</if>
|
||||
</trim>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="cargoSpaceId != null">#{cargoSpaceId},</if>
|
||||
<if test="warehouseId != null and warehouseId != ''">#{warehouseId},</if>
|
||||
@@ -161,7 +146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="groupCoding != null">#{groupCoding},</if>
|
||||
<if test="cargoSpaceLogo != null">#{cargoSpaceLogo},</if>
|
||||
<if test="thisCargoArea != null">#{thisCargoArea},</if>
|
||||
</trim>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasCargoSpace" parameterType="BasCargoSpace">
|
||||
@@ -191,14 +176,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<update id="lockedCargoSpace">
|
||||
update bas_cargo_space
|
||||
set locked = #{locked}
|
||||
where group_coding_no in (
|
||||
select group_coding_no from bas_cargo_space where cargo_space_id = #{cargoSpaceId}
|
||||
)
|
||||
and group_coding > #{groupCoding}
|
||||
where group_coding_no in (select group_coding_no from bas_cargo_space where cargo_space_id = #{cargoSpaceId})
|
||||
and group_coding > #{groupCoding}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasCargoSpaceByCargoSpaceId" parameterType="String">
|
||||
delete from bas_cargo_space where cargo_space_id = #{cargoSpaceId}
|
||||
delete
|
||||
from bas_cargo_space
|
||||
where cargo_space_id = #{cargoSpaceId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasCargoSpaceByCargoSpaceIds" parameterType="String">
|
||||
@@ -209,9 +194,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<select id="selectStatusCount" resultType="java.util.Map">
|
||||
SELECT
|
||||
status,
|
||||
COUNT(*) as count
|
||||
SELECT status,
|
||||
COUNT(*) as count
|
||||
FROM bas_cargo_space
|
||||
GROUP BY status
|
||||
</select>
|
||||
@@ -219,7 +203,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
SELECT TOP 1 cargo_space_id as cargoSpaceId
|
||||
FROM bas_cargo_space
|
||||
WHERE status = '1'
|
||||
and locked = 'N'
|
||||
and locked = 'N'
|
||||
<if test="warehouseId != null">
|
||||
and warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
@@ -255,24 +239,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
left join bas_stock bs on bs.cargo_space_id = bcs.cargo_space_id
|
||||
left join bas_product bp on bp.product_id = bs.product_id
|
||||
where br.out_locked = 'N'
|
||||
<if test="warehouseId != null and warehouseId != ''"> and bcs.warehouse_id = #{warehouseId}</if>
|
||||
<if test="roadwayId != null and roadwayId != ''"> and bcs.roadway_id = #{roadwayId}</if>
|
||||
<if test="cargoAreaId != null and cargoAreaId != ''"> and bcs.cargo_area_id = #{cargoAreaId}</if>
|
||||
<if test="theType != null and theType != ''"> and bcs.the_type = #{theType}</if>
|
||||
<if test="theTypeName != null and theTypeName != ''"> and bcs.the_type_name like concat('%', #{theTypeName}, '%')</if>
|
||||
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and bcs.cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
|
||||
<if test="thePlatoon != null "> and bcs.the_platoon = #{thePlatoon}</if>
|
||||
<if test="theColumn != null "> and bcs.the_column = #{theColumn}</if>
|
||||
<if test="theFloor != null "> and bcs.the_floor = #{theFloor}</if>
|
||||
<if test="status != null and status != ''"> and bcs.status = #{status}</if>
|
||||
<if test="locked != null and locked != ''"> and bcs.locked = #{locked}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and bcs.tray_code like concat('%', #{trayCode}, '%')</if>
|
||||
<if test="cargoHight != null and cargoHight != ''"> and bcs.cargo_hight = #{cargoHight}</if>
|
||||
<if test="issDouble != null and issDouble != ''"> and bcs.iss_double = #{issDouble}</if>
|
||||
<if test="groupCodingNo != null and groupCodingNo != ''"> and bcs.group_coding_no = #{groupCodingNo}</if>
|
||||
<if test="groupCoding != null and groupCoding != ''"> and bcs.group_coding = #{groupCoding}</if>
|
||||
<if test="cargoSpaceLogo != null and cargoSpaceLogo != ''"> and bcs.cargo_space_logo = #{cargoSpaceLogo}</if>
|
||||
<if test="spare7 != null and spare7 != ''"> and bs.spare7 = #{spare7}</if>
|
||||
<if test="stockStatus != null and stockStatus != ''"> and bs.stock_status = #{stockStatus}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''">and bcs.warehouse_id = #{warehouseId}</if>
|
||||
<if test="roadwayId != null and roadwayId != ''">and bcs.roadway_id = #{roadwayId}</if>
|
||||
<if test="cargoAreaId != null and cargoAreaId != ''">and bcs.cargo_area_id = #{cargoAreaId}</if>
|
||||
<if test="theType != null and theType != ''">and bcs.the_type = #{theType}</if>
|
||||
<if test="theTypeName != null and theTypeName != ''">and bcs.the_type_name like concat('%', #{theTypeName},
|
||||
'%')
|
||||
</if>
|
||||
<if test="cargoSpaceName != null and cargoSpaceName != ''">and bcs.cargo_space_name like concat('%',
|
||||
#{cargoSpaceName}, '%')
|
||||
</if>
|
||||
<if test="thePlatoon != null ">and bcs.the_platoon = #{thePlatoon}</if>
|
||||
<if test="theColumn != null ">and bcs.the_column = #{theColumn}</if>
|
||||
<if test="theFloor != null ">and bcs.the_floor = #{theFloor}</if>
|
||||
<if test="status != null and status != ''">and bcs.status = #{status}</if>
|
||||
<if test="locked != null and locked != ''">and bcs.locked = #{locked}</if>
|
||||
<if test="trayCode != null and trayCode != ''">and bcs.tray_code like concat('%', #{trayCode}, '%')</if>
|
||||
<if test="cargoHight != null and cargoHight != ''">and bcs.cargo_hight = #{cargoHight}</if>
|
||||
<if test="issDouble != null and issDouble != ''">and bcs.iss_double = #{issDouble}</if>
|
||||
<if test="groupCodingNo != null and groupCodingNo != ''">and bcs.group_coding_no = #{groupCodingNo}</if>
|
||||
<if test="groupCoding != null and groupCoding != ''">and bcs.group_coding = #{groupCoding}</if>
|
||||
<if test="cargoSpaceLogo != null and cargoSpaceLogo != ''">and bcs.cargo_space_logo = #{cargoSpaceLogo}</if>
|
||||
<if test="spare7 != null and spare7 != ''">and bs.spare7 = #{spare7}</if>
|
||||
<if test="stockStatus != null and stockStatus != ''">and bs.stock_status = #{stockStatus}</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -46,9 +46,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
<if test="updateId != null and updateId != ''">
|
||||
and warehouse_id != #{updateId}
|
||||
</if>
|
||||
|
||||
@@ -14,21 +14,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select stockin_id as id, status, '1' as type
|
||||
from in_stockin
|
||||
where status in ('1', '2', '3')
|
||||
${params.warehouseDataScope}
|
||||
</select>
|
||||
|
||||
<select id="selectStockoutStatusCount" resultMap="BillStatusCountResult">
|
||||
select stockout_id as id, status, '2' as type
|
||||
from out_stockout
|
||||
where status in ('1', '2', '3')
|
||||
${params.warehouseDataScope}
|
||||
</select>
|
||||
|
||||
<select id="selectStockcheckStatusCount" resultMap="BillStatusCountResult">
|
||||
select stock_check_id as id, status, '3' as type
|
||||
from check_stockin
|
||||
where status in ('1', '2', '3')
|
||||
${params.warehouseDataScope}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -8,7 +8,6 @@
|
||||
SELECT status, COUNT(*) as count
|
||||
FROM bas_cargo_space
|
||||
WHERE status IN ('1', '2', '3', '4', '5', '6')
|
||||
${params.warehouseDataScope}
|
||||
GROUP BY status
|
||||
ORDER BY status
|
||||
</select>
|
||||
|
||||
@@ -8,21 +8,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="selectStockinFinishCount" resultType="Integer">
|
||||
select count(1) from in_stockin_finish
|
||||
where 1=1
|
||||
${params.warehouseDataScope}
|
||||
</select>
|
||||
|
||||
<!-- 查询已完成出库单数量 -->
|
||||
<select id="selectStockoutFinishCount" resultType="Integer">
|
||||
select count(1) from out_stockout_finish
|
||||
where 1=1
|
||||
${params.warehouseDataScope}
|
||||
</select>
|
||||
|
||||
<!-- 查询已完成盘点单数量 -->
|
||||
<select id="selectStockcheckFinishCount" resultType="Integer">
|
||||
select count(1) from check_stockin_finish
|
||||
where 1=1
|
||||
${params.warehouseDataScope}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -369,9 +369,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
mjd.spare9,
|
||||
mjd.spec,
|
||||
mjd.unit,
|
||||
mj.tray_code,
|
||||
mj.warehosue_id
|
||||
|
||||
mj.tray_code
|
||||
-- mj.warehosue_id
|
||||
from mydo_job_detail mjd
|
||||
left join bas_product bp on mjd.product_id = bp.product_id
|
||||
left join mydo_job mj on mjd.job_id = mj.job_id
|
||||
|
||||
@@ -100,7 +100,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
</where>
|
||||
order by mj.create_time desc
|
||||
<if test="orderByColumn != null and orderByColumn != ''">
|
||||
order by ${orderByColumn} ${isAsc}
|
||||
</if>
|
||||
<if test="orderByColumn == null or orderByColumn == ''">
|
||||
order by mj.create_time desc
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMydoJobFinishListByMydoJob" parameterType="MydoJob" resultMap="MydoJobFinishResult">
|
||||
@@ -144,7 +149,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
</where>
|
||||
order by mj.create_time desc
|
||||
<if test="orderByColumn != null and orderByColumn != ''">
|
||||
order by ${orderByColumn} ${isAsc}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMydoJobFinishByJobId" parameterType="String" resultMap="MydoJobFinishResult">
|
||||
|
||||
@@ -94,11 +94,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
</where>
|
||||
order by mj.create_time desc
|
||||
<if test="orderByColumn != null and orderByColumn != ''">
|
||||
order by ${orderByColumn} ${isAsc}
|
||||
</if>
|
||||
<if test="orderByColumn == null or orderByColumn == ''">
|
||||
order by mj.create_time desc
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMydoJobByJobId" parameterType="String" resultMap="MydoJobResult">
|
||||
|
||||
@@ -121,8 +121,7 @@
|
||||
|
||||
<select id="ktpout" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{call proc_tp_out(
|
||||
#{v_warehouse_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_exit_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_num,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_result,mode=OUT,jdbcType=INTEGER},
|
||||
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
||||
)}
|
||||
|
||||
@@ -41,10 +41,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="stockinDetailId" column="stockin_detail_id" />
|
||||
<result property="smNum" column="sm_num" />
|
||||
<result property="finishNum" column="finish_num" />
|
||||
</resultMap>
|
||||
|
||||
<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>
|
||||
|
||||
<select id="selectInStockinDetailNFinishList" parameterType="InStockinDetailNFinish" resultMap="InStockinDetailNFinishResult">
|
||||
|
||||
@@ -42,3 +42,17 @@ export function delBasProduct(productGuid) {
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 从ERP获取物料信息
|
||||
// 说明:
|
||||
// - 使用GET请求调用后端接口 `/api2erp/receiveProduct`
|
||||
// - 将本次请求的超时时间设置为5分钟(300000毫秒)
|
||||
// - 不传递额外参数,后端负责同步逻辑
|
||||
export function receiveProductFromERP() {
|
||||
return request({
|
||||
url: '/api2erp/receiveProduct',
|
||||
method: 'get',
|
||||
// 单次请求覆盖默认超时为5分钟
|
||||
timeout: 300000
|
||||
})
|
||||
}
|
||||
|
||||
@@ -8,6 +8,14 @@ export function listOutStockout(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 从ERP获取出库单据
|
||||
export function getOutStockList() {
|
||||
return request({
|
||||
url: '/api2erp/outStockList',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询出库子单详细
|
||||
export function getOutStockoutDetail(query) {
|
||||
return request({
|
||||
|
||||
89
ruoyi-ui/src/api/system/inStockIn.js
Normal file
89
ruoyi-ui/src/api/system/inStockIn.js
Normal file
@@ -0,0 +1,89 @@
|
||||
import request from '@/utils/request'
|
||||
import data from "@/views/system/dict/data.vue";
|
||||
|
||||
// 查询入库单据管理列表
|
||||
export function listInStockIn(query) {
|
||||
return request({
|
||||
url: '/system/inStockIn/listAll',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询入库单据管理详细
|
||||
export function getInStockIn(stockinGuid) {
|
||||
return request({
|
||||
url: '/system/inStockIn/' + stockinGuid,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增入库单据管理
|
||||
export function addInStockIn(data) {
|
||||
return request({
|
||||
url: '/system/inStockIn',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增入库单据(含子单)
|
||||
export function addOrder(data) {
|
||||
return request({
|
||||
url: '/system/inStockIn/addOrder',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改入库单据管理
|
||||
export function updateInStockIn(data) {
|
||||
return request({
|
||||
url: '/system/inStockIn',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 删除入库单据管理
|
||||
export function delInStockIn(stockinGuid) {
|
||||
return request({
|
||||
url: '/system/inStockIn/' + stockinGuid,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 审核单据
|
||||
export function rvwInStockIn(stockinGuid) {
|
||||
return request({
|
||||
url: '/system/inStockIn/rvw/' + stockinGuid,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
// 作废单据
|
||||
export function voidedInStockIn(stockinGuid) {
|
||||
return request({
|
||||
url: '/system/inStockIn/voided/' + stockinGuid,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
// 单据获取
|
||||
export function getStockIn() {
|
||||
return request({
|
||||
url: '/api2erp/getInStock',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
//入库单据确认
|
||||
|
||||
export function inStockConfirm(stockinGuid) {
|
||||
return request({
|
||||
url: '/api2erp/inStockConfirm/'+stockinGuid,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
@@ -91,6 +91,16 @@
|
||||
v-hasPermi="['bas:BasProduct:export']"
|
||||
>导出</el-button>
|
||||
</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>
|
||||
</el-row>
|
||||
|
||||
@@ -98,20 +108,20 @@
|
||||
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
||||
<!-- 主键列注释保留 -->
|
||||
<!-- <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"/>
|
||||
<!-- 物料名称列:修改为自定义模板,用v-html渲染HTML样式 -->
|
||||
<el-table-column label="物料名称" align="center" width="260">
|
||||
<el-table-column label="物料名称" align="center" width="160">
|
||||
<template #default="scope">
|
||||
<!-- v-html解析row.productName中的HTML标签 -->
|
||||
<span v-html="scope.row.productName"></span>
|
||||
</template>
|
||||
</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="price" />
|
||||
<el-table-column label="单位" align="center" prop="spare6" />
|
||||
<el-table-column label="单位" align="center" prop="spare6" width="180"/>
|
||||
<!-- 中unit为原项目单位 spare6为对方接口中的units,包含单位和辅助单位的json -->
|
||||
<el-table-column label="单位名称" align="center" prop="spare1" />
|
||||
<!-- <el-table-column label="url" align="center" prop="spare3" />
|
||||
@@ -207,11 +217,30 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listBasProduct, getBasProduct, delBasProduct, addBasProduct, updateBasProduct } from "@/api/bas/BasProduct"
|
||||
import { listBasProduct, getBasProduct, delBasProduct, addBasProduct, updateBasProduct, receiveProductFromERP } from "@/api/bas/BasProduct"
|
||||
|
||||
export default {
|
||||
name: "BasProduct",
|
||||
@@ -236,6 +265,18 @@ export default {
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 获取物料信息进度弹窗显示
|
||||
receiveDialogVisible: false,
|
||||
// 进度百分比
|
||||
receivePercent: 0,
|
||||
// 进度状态:success / exception / undefined
|
||||
receiveStatus: undefined,
|
||||
// 是否正在进行中(进行中禁止关闭)
|
||||
receiveInProgress: false,
|
||||
// 进度文案
|
||||
receiveText: "正在从ERP获取物料信息,请稍候…",
|
||||
// 内部定时器句柄
|
||||
_receiveTimer: null,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
@@ -450,6 +491,62 @@ export default {
|
||||
this.download('bas/BasProduct/export', {
|
||||
...this.queryParams
|
||||
}, `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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<!-- <el-form-item label="任务ID" prop="jobId">
|
||||
<!-- <el-form-item label="任务ID" prop="jobId">
|
||||
<el-input
|
||||
v-model="queryParams.jobId"
|
||||
placeholder="请输入任务ID"
|
||||
@@ -10,33 +10,19 @@
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="任务状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择任务状态" >
|
||||
<el-option
|
||||
v-for="dict in dict.type.mydo_job_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
<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"
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务号" prop="taskNo">
|
||||
<el-input
|
||||
v-model="queryParams.taskNo"
|
||||
placeholder="请输入任务号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.taskNo" placeholder="请输入任务号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="托盘条码" prop="trayCode">
|
||||
<el-input v-model="queryParams.trayCode" placeholder="请输入托盘码" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="托盘码" prop="trayCode">
|
||||
<el-input
|
||||
v-model="queryParams.trayCode"
|
||||
placeholder="请输入托盘码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
|
||||
<!-- <el-form-item label="执行阶段" prop="executionPhase">
|
||||
<!-- <el-form-item label="执行阶段" prop="executionPhase">
|
||||
<el-select v-model="queryParams.executionPhase" placeholder="请选择执行阶段" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.execution_phase_type"
|
||||
@@ -46,7 +32,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>-->
|
||||
<!-- <el-form-item label="任务类型" prop="inOrOut">
|
||||
<!-- <el-form-item label="任务类型" prop="inOrOut">
|
||||
<el-select v-model="queryParams.inOrOut" placeholder="请选择任务类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.in_job_type"
|
||||
@@ -57,22 +43,16 @@
|
||||
</el-select>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="开始时间" prop="startTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.startTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择开始时间">
|
||||
<el-date-picker clearable v-model="queryParams.startTime" type="date" value-format="yyyy-MM-dd"
|
||||
placeholder="请选择开始时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束时间" prop="finishTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.finishTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择结束时间">
|
||||
<el-date-picker clearable v-model="queryParams.finishTime" type="date" value-format="yyyy-MM-dd"
|
||||
placeholder="请选择结束时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="入口" prop="entranceId">
|
||||
<!-- <el-form-item label="入口" prop="entranceId">
|
||||
<el-input
|
||||
v-model="queryParams.entranceId"
|
||||
placeholder="请输入入口"
|
||||
@@ -80,7 +60,8 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="仓库" prop="warehouseId"><!--仓库-->
|
||||
<!--仓库-->
|
||||
<!-- <el-form-item label="仓库" prop="warehouseId">
|
||||
<el-select
|
||||
v-model="queryParams.warehouseId"
|
||||
placeholder="请选择仓库"
|
||||
@@ -94,156 +75,105 @@
|
||||
:value="item.warehouseId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button 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
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
@click="handleCompletedManually({type: 'invalid'})"
|
||||
v-hasPermi="['job:mydoJob:manualInvalidation']"
|
||||
>手动作废</el-button><!--手动作废-->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
@click="handleCompletedManually({type: 'completed'})"
|
||||
v-hasPermi="['job:mydoJob:manualCompleted']"
|
||||
>手动完成</el-button><!--手动完成-->
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
<el-card class="box-card">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="el-icon-edit" size="mini"
|
||||
@click="handleCompletedManually({ type: 'invalid' })"
|
||||
v-hasPermi="['job:mydoJob:manualInvalidation']">手动作废</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="el-icon-edit" size="mini"
|
||||
@click="handleCompletedManually({ type: 'completed' })"
|
||||
v-hasPermi="['job:mydoJob:manualCompleted']">手动完成</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="mydoJobList" @selection-change="handleSelectionChange" @row-click="handleRowClick" highlight-current-row :current-row="currentRow"
|
||||
max-height="400">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="任务ID" align="left" prop="jobId" fixed width="140" />
|
||||
<el-table-column label="任务状态" align="left" 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 label="上线类型" align="left" prop="onLineType">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.on_line_type" :value="scope.row.onLineType"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="任务类型" align="left" prop="inOrOut">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.in_job_type" :value="scope.row.inOrOut"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务号" align="left" prop="taskNo" />
|
||||
<el-table-column label="托盘码" align="left" prop="trayCode" width="140" />
|
||||
<el-table-column label="货位" align="left" prop="cargoSpaceName" width="140" />
|
||||
<!-- <el-table-column label="优先级" align="left" prop="priority" />-->
|
||||
<!-- <el-table-column label="执行阶段" align="left" prop="executionPhase">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.execution_phase_type" :value="scope.row.executionPhase"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="订单号" align="left" prop="lineId" />-->
|
||||
<!-- <el-table-column label="入口" align="left" prop="entranceId" />-->
|
||||
<el-table-column label="仓库" align="left" prop="warehouseName" />
|
||||
<el-table-column label="创建时间" align="left" prop="createTime" width="180"/>
|
||||
<el-table-column label="开始时间" align="left" prop="startTime" width="180"/>
|
||||
<el-table-column label="结束时间" align="left" prop="finishTime" width="180"/>
|
||||
</el-table>
|
||||
<el-table
|
||||
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 label="任务ID" align="center" prop="jobId"/>
|
||||
<el-table-column 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 label="任务类型" align="center" prop="inOrOut">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.in_job_type" :value="scope.row.inOrOut" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务号" align="center" prop="taskNo" />
|
||||
<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="warehouseName" /> -->
|
||||
<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="finishTime" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
</el-card>
|
||||
|
||||
<el-table v-loading="detailLoading" :data="mydoJobDetailList" @selection-change="handleSelectionChange"
|
||||
max-height="300"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="子任务ID" align="left" prop="jobDetailId" width="160" />
|
||||
<el-table-column label="任务ID" align="left" prop="jobId" width="160" />
|
||||
<el-table-column label="单据ID" align="left" prop="inOrOutId" width="160" />
|
||||
<el-table-column label="子单据ID" align="left" prop="inOrOutDId" width="160" />
|
||||
<el-table-column label="物料编码" align="left" prop="productId" width="160" />
|
||||
<el-table-column label="物料名称" align="left" prop="productName" width="160" />
|
||||
<el-table-column label="批号" align="left" prop="lotNo" />
|
||||
<el-table-column label="入库数量" align="right" prop="inQuantity" />
|
||||
<el-table-column label="生产图号" align="left" prop="cargoNo" width="160"/>
|
||||
<el-table-column label="单价" align="left" prop="printDate" />
|
||||
<el-table-column label="供应商" align="left" prop="supplierName" width="160"/>
|
||||
<!-- <el-table-column label="来源" align="left" prop="spare1" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.origin_type" :value="scope.row.spare1"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="left" prop="spare2" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.turnover_type" :value="scope.row.spare2"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="套账" align="left" prop="spare3" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.account_type" :value="scope.row.spare3"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="用途" align="left" prop="spare4" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.purpose_type" :value="scope.row.spare4"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="台次" align="left" prop="spare5" />
|
||||
<el-table-column label="合同号" align="left" prop="spare6" />
|
||||
<el-table-column label="件次" align="left" prop="spare7" />
|
||||
<el-table-column label="质量等级" align="left" prop="spare8" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.quality_type" :value="scope.row.spare8"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="管理号" align="left" prop="spare9" />
|
||||
<el-table-column label="规格" align="left" prop="spec" width="160"/>
|
||||
<el-table-column label="单位" align="left" prop="unit" /> -->
|
||||
<el-card class="box-card" style="margin-top: 20px;">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>任务明细列表</span>
|
||||
</div>
|
||||
<el-table v-loading="detailLoading" :data="mydoJobDetailList" @selection-change="handleSelectionChange"
|
||||
max-height="300">
|
||||
<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="center" prop="inOrOutId" width="160" />
|
||||
<el-table-column label="子单据ID" align="center" prop="inOrOutDId" width="160" />
|
||||
<el-table-column label="物料编码" align="center" prop="productId" width="160" />
|
||||
<el-table-column label="物料名称" align="center" prop="productName" width="160" />
|
||||
<!-- <el-table-column label="批号" align="center" prop="lotNo" /> -->
|
||||
<el-table-column label="入库数量" align="center" prop="inQuantity" />
|
||||
<!-- <el-table-column label="生产图号" align="center" prop="cargoNo" width="160"/> -->
|
||||
<!-- <el-table-column label="单价" align="center" prop="printDate" /> -->
|
||||
<!-- <el-table-column label="供应商" align="center" prop="supplierName" width="160"/> -->
|
||||
</el-table>
|
||||
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="detailTotal>0"
|
||||
:total="detailTotal"
|
||||
:page.sync="queryDetailParams.pageNum"
|
||||
:limit.sync="queryDetailParams.pageSize"
|
||||
@pagination="getDetailList"
|
||||
/>
|
||||
<pagination v-show="detailTotal > 0" :total="detailTotal" :page.sync="queryDetailParams.pageNum"
|
||||
:limit.sync="queryDetailParams.pageSize" @pagination="getDetailList" />
|
||||
</el-card>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listMydoJob,manualInvalidation,manualCompleted, getMydoJob, delMydoJob, addMydoJob, updateMydoJob } from "@/api/job/inmydoJob"
|
||||
import { listMydoJob, manualInvalidation, manualCompleted, getMydoJob, delMydoJob, addMydoJob, updateMydoJob } from "@/api/job/inmydoJob"
|
||||
import { listMydoJobDetail } from "@/api/job/mydoJobDetail"
|
||||
import {listWarehouse} from "@/api/bas/warehouse";
|
||||
import { listWarehouse } from "@/api/bas/warehouse";
|
||||
|
||||
export default {
|
||||
name: "MydoJob",
|
||||
dicts: ['execution_phase_type', 'in_job_type', 'on_line_type', 'mydo_job_status','product_type','origin_type','account_type','turnover_type','purpose_type','quality_type'],
|
||||
dicts: ['execution_phase_type', 'in_job_type', 'on_line_type', 'mydo_job_status', 'product_type', 'origin_type', 'account_type', 'turnover_type', 'purpose_type', 'quality_type'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
detailLoading:false,
|
||||
warehouseOptions:[],
|
||||
detailLoading: false,
|
||||
warehouseOptions: [],
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
@@ -258,9 +188,9 @@ export default {
|
||||
// 任务表表格数据
|
||||
mydoJobList: [],
|
||||
// 子任务表表格数据
|
||||
mydoJobDetailList:[],
|
||||
mydoJobDetailList: [],
|
||||
// 当前选中行
|
||||
currentRow:null,
|
||||
currentRow: null,
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
@@ -294,15 +224,17 @@ export default {
|
||||
classId: null,
|
||||
warehouseId: null,
|
||||
faultFlag: null,
|
||||
inOut:"1"
|
||||
inOut: "1",
|
||||
orderByColumn: 'mj.create_time',
|
||||
isAsc: 'desc'
|
||||
},
|
||||
queryDetailParams:{
|
||||
queryDetailParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
jobId: null,
|
||||
status: null,
|
||||
},
|
||||
queryWarehouseParams:{
|
||||
queryWarehouseParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 99,
|
||||
},
|
||||
@@ -398,6 +330,23 @@ export default {
|
||||
// 重新查询主表数据
|
||||
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) {
|
||||
@@ -406,7 +355,7 @@ export default {
|
||||
return;
|
||||
}
|
||||
this.ids = selection.map(item => item.jobId);
|
||||
this.single = selection.length!==1;
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
|
||||
@@ -422,9 +371,9 @@ export default {
|
||||
return;
|
||||
}
|
||||
var data = {
|
||||
"jobId": jobIds[0],
|
||||
"jobId": jobIds[0],
|
||||
}
|
||||
if (row.type === 'invalid'){
|
||||
if (row.type === 'invalid') {
|
||||
//手动作废
|
||||
manualInvalidation(data).then(response => {
|
||||
this.$modal.msgSuccess('操作成功');
|
||||
@@ -432,7 +381,7 @@ export default {
|
||||
})
|
||||
|
||||
|
||||
}else if (row.type === 'completed'){
|
||||
} else if (row.type === 'completed') {
|
||||
//手动完成
|
||||
manualCompleted(data).then(response => {
|
||||
this.$modal.msgSuccess('操作成功');
|
||||
@@ -479,10 +428,11 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-table >>> .current-row {
|
||||
.el-table>>>.current-row {
|
||||
background-color: #f0f9eb;
|
||||
}
|
||||
.el-form-item >>> .el-form-item__label {
|
||||
|
||||
.el-form-item>>>.el-form-item__label {
|
||||
white-space: nowrap;
|
||||
width: auto;
|
||||
min-width: fit-content;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="app-container panel">
|
||||
<!-- 顶部统计面板 -->
|
||||
<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-icon-wrapper icon-people">
|
||||
<svg-icon icon-class="clipboard" class-name="card-panel-icon"/>
|
||||
@@ -13,7 +13,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</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-icon-wrapper icon-message">
|
||||
<svg-icon icon-class="documentation" class-name="card-panel-icon"/>
|
||||
@@ -24,18 +24,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
||||
<div class="card-panel">
|
||||
<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">
|
||||
|
||||
<el-col :xs="12" :sm="12" :lg="8" class="card-panel-col">
|
||||
<div class="card-panel">
|
||||
<div class="card-panel-icon-wrapper icon-shopping">
|
||||
<svg-icon icon-class="excel" class-name="card-panel-icon"/>
|
||||
@@ -69,47 +59,47 @@
|
||||
</el-row>
|
||||
|
||||
<!-- 底部列表区域 -->
|
||||
<el-row :gutter="32">
|
||||
<!-- <el-row :gutter="32">
|
||||
<el-col :xs="24" :sm="24" :lg="8">
|
||||
<div class="list-wrapper">
|
||||
<div class="list-header">
|
||||
<span>单据列表</span> <!-- 单据列表 -->
|
||||
<span>单据列表</span>
|
||||
</div>
|
||||
<el-table :data="documentList" style="width: 100%" size="mini" height="300"
|
||||
:header-cell-style="{backgroundColor: '#f5f7fa'}">
|
||||
<el-table-column prop="id" label="单据编号"/> <!-- 单据编号 -->
|
||||
<el-table-column prop="type" :formatter="type_" label="类型" width="80"/> <!-- 类型 -->
|
||||
<el-table-column prop="status" :formatter="status_" label="状态" width="80"/> <!-- 状态 -->
|
||||
<el-table-column prop="id" label="单据编号"/>
|
||||
<el-table-column prop="type" :formatter="type_" label="类型" width="80"/>
|
||||
<el-table-column prop="status" :formatter="status_" label="状态" width="80"/>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :lg="8">
|
||||
<div class="list-wrapper">
|
||||
<div class="list-header">
|
||||
<span>正执行任务</span> <!-- 正执行任务 -->
|
||||
<span>正执行任务</span>
|
||||
</div>
|
||||
<el-table :data="executingTasks" style="width: 100%" size="mini" height="300"
|
||||
:header-cell-style="{backgroundColor: '#f5f7fa'}">
|
||||
<el-table-column prop="jobId" label="任务编号"/> <!-- 任务编号 -->
|
||||
<el-table-column prop="inOrOut" label="类型" width="80"/> <!-- 类型 -->
|
||||
<el-table-column prop="statusLabel" label="状态" width="80"/> <!-- 状态 -->
|
||||
<el-table-column prop="jobId" label="任务编号"/>
|
||||
<el-table-column prop="inOrOut" label="类型" width="80"/>
|
||||
<el-table-column prop="statusLabel" label="状态" width="80"/>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :lg="8">
|
||||
<div class="list-wrapper">
|
||||
<div class="list-header">
|
||||
<span>待执行任务</span> <!-- 待执行任务 -->
|
||||
<span>待执行任务</span>
|
||||
</div>
|
||||
<el-table :data="pendingTasks" style="width: 100%" size="mini" height="300"
|
||||
:header-cell-style="{backgroundColor: '#f5f7fa'}">
|
||||
<el-table-column prop="jobId" label="任务编号"/> <!-- 任务编号 -->
|
||||
<el-table-column prop="inOrOut" label="类型" width="80"/> <!-- 类型 -->
|
||||
<el-table-column prop="priority" label="优先级" width="80"/> <!-- 优先级 -->
|
||||
<el-table-column prop="jobId" label="任务编号"/>
|
||||
<el-table-column prop="inOrOut" label="类型" width="80"/>
|
||||
<el-table-column prop="priority" label="优先级" width="80"/>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-row> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -1,78 +1,65 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="状态" prop="status"> <!-- 状态 -->
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态" >
|
||||
<el-option
|
||||
v-for="dict in dict.type.mydo_job_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
|
||||
<el-form-item label="作业状态" prop="status"> <!-- 状态 -->
|
||||
<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"
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="任务号" prop="taskNo"> <!-- 任务号 -->
|
||||
<el-input
|
||||
v-model="queryParams.taskNo"
|
||||
placeholder="请输入任务号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.taskNo" placeholder="请输入任务号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="托盘条码" prop="trayCode"> <!– 托盘条码 –>-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.trayCode"-->
|
||||
<!-- placeholder="请输入托盘条码"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<!-- <el-form-item label="作业类型" prop="inOrOut"> <!– 作业类型 –>-->
|
||||
<!-- <el-select v-model="queryParams.inOrOut" placeholder="请选择作业类型" clearable>-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in dict.type.out_job_type"-->
|
||||
<!-- :key="dict.value"-->
|
||||
<!-- :label="dict.label"-->
|
||||
<!-- :value="dict.value"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="托盘条码" prop="trayCode">
|
||||
<el-input
|
||||
v-model="queryParams.trayCode"
|
||||
placeholder="请输入托盘条码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="作业类型" prop="inOrOut"> <!– 作业类型 –>-->
|
||||
<!-- <el-select v-model="queryParams.inOrOut" placeholder="请选择作业类型" clearable>-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in dict.type.out_job_type"-->
|
||||
<!-- :key="dict.value"-->
|
||||
<!-- :label="dict.label"-->
|
||||
<!-- :value="dict.value"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<el-form-item label="开始时间" prop="startTime"> <!-- 开始时间 -->
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.startTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
<el-date-picker clearable v-model="queryParams.startTime" type="date" value-format="yyyy-MM-dd"
|
||||
placeholder="请选择开始时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="结束时间" prop="finishTime"> <!-- 结束时间 -->
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.finishTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
<el-date-picker clearable v-model="queryParams.finishTime" type="date" value-format="yyyy-MM-dd"
|
||||
placeholder="请选择结束时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="仓库" prop="warehouseId"> <!– 仓库 –>-->
|
||||
<!-- <el-select-->
|
||||
<!-- v-model="queryParams.warehouseId"-->
|
||||
<!-- placeholder="请选择仓库"-->
|
||||
<!-- clearable-->
|
||||
<!-- >-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in warehouseOptions"-->
|
||||
<!-- :key="dict.warehouseId"-->
|
||||
<!-- :label="dict.warehouseName"-->
|
||||
<!-- :value="dict.warehouseId"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="仓库" prop="warehouseId"> <!– 仓库 –>-->
|
||||
<!-- <el-select-->
|
||||
<!-- v-model="queryParams.warehouseId"-->
|
||||
<!-- placeholder="请选择仓库"-->
|
||||
<!-- clearable-->
|
||||
<!-- >-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in warehouseOptions"-->
|
||||
<!-- :key="dict.warehouseId"-->
|
||||
<!-- :label="dict.warehouseName"-->
|
||||
<!-- :value="dict.warehouseId"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <!-- 搜索 -->
|
||||
@@ -80,112 +67,107 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
@click="OuthandFinish"
|
||||
v-hasPermi="['job:outmydoJob:OuthandFinish']"
|
||||
>手动完成</el-button> <!-- 手动完成 -->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="OuthandInvalidation"
|
||||
v-hasPermi="['job:outmydoJob:OuthandInvalidation']"
|
||||
>手动作废</el-button> <!-- 手动作废 -->
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
<el-card class="box-card">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="el-icon-edit" size="mini" @click="OuthandFinish"
|
||||
v-hasPermi="['job:outmydoJob:OuthandFinish']">手动完成</el-button> <!-- 手动完成 -->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="el-icon-download" size="mini" @click="OuthandInvalidation"
|
||||
v-hasPermi="['job:outmydoJob:OuthandInvalidation']">手动作废</el-button> <!-- 手动作废 -->
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="mydoJobList" @selection-change="handleSelectionChange" @row-click="handleRowClick" highlight-current-row :current-row="currentRow" max-height="400">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="任务ID" align="left" prop="jobId" /> <!-- 任务ID -->
|
||||
<el-table-column label="任务状态" align="left" 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 :label="$t('outJobManagement.onLineType')" align="left" prop="onLineType"> <!– 上线类型 –>
|
||||
<el-table
|
||||
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 label="任务ID" align="center" prop="jobId" width="142" /> <!-- 任务ID -->
|
||||
<el-table-column 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 :label="$t('outJobManagement.onLineType')" align="left" prop="onLineType"> <!– 上线类型 –>
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.on_line_type" :value="scope.row.onLineType"/>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column label="任务类型" align="left" prop="inOrOut"> <!-- 任务类型 -->
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.out_job_type" :value="scope.row.inOrOut"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务号" align="left" prop="taskNo" /> <!-- 任务号 -->
|
||||
<!-- <el-table-column :label="$t('outJobManagement.customerId')" align="left" prop="customerId" /> <!– 客户ID –>-->
|
||||
<el-table-column label="托盘码" align="left" prop="trayCode" /> <!-- 托盘码 -->
|
||||
<!-- <el-table-column :label="$t('outJobManagement.roadwayId')" align="left" prop="roadwayId" /> <!– 巷道ID –>-->
|
||||
<el-table-column label="货位" align="left" prop="cargoSpaceName" /> <!-- 货位ID -->
|
||||
<!-- <el-table-column label="订单号" align="left" prop="lineId" /> <!– 结束时间 –>-->
|
||||
<!-- <el-table-column label="优先级" align="left" prop="priority" /> <!– 优先级 –>-->
|
||||
<!-- <el-table-column label="执行阶段" align="left" prop="executionPhase"> <!– 执行阶段 –>-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.execution_phase_type" :value="scope.row.executionPhase"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="任务类型" align="center" prop="inOrOut"> <!-- 任务类型 -->
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.out_job_type" :value="scope.row.inOrOut" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务号" align="center" prop="taskNo" /> <!-- 任务号 -->
|
||||
<!-- <el-table-column :label="$t('outJobManagement.customerId')" align="left" prop="customerId" /> <!– 客户ID –>-->
|
||||
<el-table-column label="托盘码" align="center" prop="trayCode" /> <!-- 托盘码 -->
|
||||
<!-- <el-table-column :label="$t('outJobManagement.roadwayId')" align="left" prop="roadwayId" /> <!– 巷道ID –>-->
|
||||
<el-table-column label="货位" align="center" prop="cargoSpaceName" /> <!-- 货位ID -->
|
||||
<!-- <el-table-column label="订单号" align="left" prop="lineId" /> <!– 结束时间 –>-->
|
||||
<!-- <el-table-column label="优先级" align="left" prop="priority" /> <!– 优先级 –>-->
|
||||
<!-- <el-table-column label="执行阶段" align="left" prop="executionPhase"> <!– 执行阶段 –>-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.execution_phase_type" :value="scope.row.executionPhase"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<!-- <el-table-column label="仓库" align="left" prop="warehouseName" /> -->
|
||||
<!-- <el-table-column label="出口" align="left" prop="exitId"/> 出口ID -->
|
||||
<el-table-column label="创建时间" align="left" prop="createTime" width="180"/> <!-- 创建时间 -->
|
||||
<el-table-column label="开始时间" align="left" prop="startTime" width="180"/> <!-- 开始时间 -->
|
||||
<el-table-column label="结束时间" align="left" prop="finishTime" width="180"/> <!-- 结束时间 -->
|
||||
<!-- <el-table-column :label="$t('outJobManagement.warehouseId')" align="left" prop="warehouseId" /> <!– 仓库ID –>-->
|
||||
<!-- <el-table-column label="仓库ID" align="left" prop="warehouseName" /> <!– 仓库ID –>-->
|
||||
</el-table>
|
||||
<!-- <el-table-column label="仓库" align="left" prop="warehouseName" /> -->
|
||||
<!-- <el-table-column label="出口" align="left" prop="exitId"/> 出口ID -->
|
||||
<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="finishTime" sortable="custom"/> <!-- 结束时间 -->
|
||||
<!-- <el-table-column :label="$t('outJobManagement.warehouseId')" align="left" prop="warehouseId" /> <!– 仓库ID –>-->
|
||||
<!-- <el-table-column label="仓库ID" align="left" prop="warehouseName" /> <!– 仓库ID –>-->
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
</el-card>
|
||||
|
||||
<el-table v-loading="detailLoading" :data="mydoJobDetailList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="子任务ID" align="left" prop="jobDetailId" /> <!-- 子任务ID -->
|
||||
<el-table-column label="库存ID" align="left" prop="stockId" /> <!-- 库存ID -->
|
||||
<el-table-column label="子单据ID" align="left" prop="inOrOutDId" /> <!-- 子单据ID -->
|
||||
<el-table-column label="物料编码" align="left" prop="productId" />
|
||||
<el-table-column label="物料名称" align="left" prop="productName" />
|
||||
<el-table-column label="出库数量" align="right" prop="outQuantity" /> <!-- 出库数量 -->
|
||||
<el-card class="box-card" style="margin-top: 20px;">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>任务明细列表</span>
|
||||
</div>
|
||||
<el-table v-loading="detailLoading" :data="mydoJobDetailList" @selection-change="handleSelectionChange">
|
||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||
<el-table-column label="子任务ID" align="left" prop="jobDetailId" /> <!-- 子任务ID -->
|
||||
<el-table-column label="库存ID" align="left" prop="stockId" /> <!-- 库存ID -->
|
||||
<el-table-column label="子单据ID" align="left" prop="inOrOutDId" /> <!-- 子单据ID -->
|
||||
<el-table-column label="物料编码" align="left" prop="productId" />
|
||||
<el-table-column label="物料名称" align="left" prop="productName" />
|
||||
<el-table-column label="出库数量" align="right" prop="outQuantity" /> <!-- 出库数量 -->
|
||||
|
||||
</el-table>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="detailTotal>0"
|
||||
:total="detailTotal"
|
||||
:page.sync="queryDetailParams.pageNum"
|
||||
:limit.sync="queryDetailParams.pageSize"
|
||||
@pagination="getDetailList"
|
||||
/>
|
||||
<pagination v-show="detailTotal > 0" :total="detailTotal" :page.sync="queryDetailParams.pageNum"
|
||||
:limit.sync="queryDetailParams.pageSize" @pagination="getDetailList" />
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listMydoJobOut,handFinish,hangInvalidJob } from "@/api/job/OutmydoJob"
|
||||
import { listMydoJobOut, handFinish, hangInvalidJob } from "@/api/job/OutmydoJob"
|
||||
import { listMydoJobDetail } from "@/api/job/mydoJobDetail"
|
||||
import {listWarehouse} from "@/api/bas/warehouse";
|
||||
import { listWarehouse } from "@/api/bas/warehouse";
|
||||
|
||||
export default {
|
||||
name: "MydoJob",
|
||||
dicts: ['execution_phase_type', 'in_job_type', 'on_line_type', 'mydo_job_status','out_job_type','product_type','origin_type','account_type','turnover_type','purpose_type','quality_type'],
|
||||
dicts: ['execution_phase_type', 'in_job_type', 'on_line_type', 'mydo_job_status', 'out_job_type', 'product_type', 'origin_type', 'account_type', 'turnover_type', 'purpose_type', 'quality_type'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
detailLoading:false,
|
||||
detailLoading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
@@ -202,9 +184,9 @@ export default {
|
||||
// 任务表表格数据
|
||||
mydoJobList: [],
|
||||
// 子任务表表格数据
|
||||
mydoJobDetailList:[],
|
||||
mydoJobDetailList: [],
|
||||
// 当前选中行
|
||||
currentRow:null,
|
||||
currentRow: null,
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
@@ -238,9 +220,11 @@ export default {
|
||||
classId: null,
|
||||
warehouseId: null,
|
||||
faultFlag: null,
|
||||
inOut:'2'
|
||||
inOut: '2',
|
||||
orderByColumn: 'mj.create_time',
|
||||
isAsc: 'desc'
|
||||
},
|
||||
queryDetailParams:{
|
||||
queryDetailParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
jobId: null,
|
||||
@@ -283,7 +267,7 @@ export default {
|
||||
// 如果有数据,自动选中第一行
|
||||
if (this.mydoJobList.length > 0) {
|
||||
this.handleRowClick(this.mydoJobList[0]);
|
||||
}else {
|
||||
} else {
|
||||
this.mydoJobDetailList = []
|
||||
this.detailLoading = false
|
||||
}
|
||||
@@ -341,10 +325,22 @@ export default {
|
||||
this.resetForm("queryForm")
|
||||
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) {
|
||||
this.ids = selection.map(item => item.jobId)
|
||||
this.single = selection.length!==1
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
@@ -359,7 +355,7 @@ export default {
|
||||
this.currentRow = row;
|
||||
// 更新子表格查询参数
|
||||
this.queryDetailParams.jobId = row.jobId;
|
||||
this.queryDetailParams.status=row.status // 查询子表格数据
|
||||
this.queryDetailParams.status = row.status // 查询子表格数据
|
||||
this.getDetailList();
|
||||
},
|
||||
/** 查询子任务表列表 */
|
||||
@@ -398,7 +394,7 @@ export default {
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess("手动完成成功");
|
||||
this.getList();
|
||||
}).catch(() => {});
|
||||
}).catch(() => { });
|
||||
},
|
||||
//手动作废
|
||||
OuthandInvalidation() {
|
||||
@@ -419,7 +415,7 @@ export default {
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess("手动作废成功");
|
||||
this.getList();
|
||||
}).catch(() => {});
|
||||
}).catch(() => { });
|
||||
}
|
||||
|
||||
}
|
||||
@@ -427,7 +423,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-table >>> .current-row {
|
||||
.el-table>>>.current-row {
|
||||
background-color: #f0f9eb;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</el-form>
|
||||
|
||||
<!-- 饼状图容器 -->
|
||||
<div class="chart-container" style="height: 700px">
|
||||
<div class="chart-container">
|
||||
<div ref="spaceChart" style="width: 100%; height: 100%"></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -79,9 +79,11 @@ export default {
|
||||
,
|
||||
mounted() {
|
||||
this.initChart();
|
||||
window.addEventListener('resize', this.handleResize)
|
||||
}
|
||||
,
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.handleResize)
|
||||
if (this.chart) {
|
||||
this.chart.dispose();
|
||||
this.chart = null;
|
||||
@@ -154,6 +156,10 @@ export default {
|
||||
this.updateChart();
|
||||
}
|
||||
,
|
||||
handleResize() {
|
||||
this.chart && this.chart.resize()
|
||||
}
|
||||
,
|
||||
/** 状态码转换为国际化文本 */
|
||||
getStatusText(statusCode) {
|
||||
const statusMap = {
|
||||
@@ -214,11 +220,21 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.app-container {
|
||||
padding: 10px;
|
||||
height: calc(100vh - 84px);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.chart-container {
|
||||
margin-top: 20px;
|
||||
padding: 20px;
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
background: #fff;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</div>
|
||||
|
||||
<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>
|
||||
</template>
|
||||
@@ -96,9 +96,13 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getWarehouseList()
|
||||
this.getWarehouseList()
|
||||
this.initCharts()
|
||||
this.handleWarehouseChange()
|
||||
window.addEventListener('resize', this.handleResize)
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.handleResize)
|
||||
},
|
||||
methods: {
|
||||
/** 查询仓库列表 */
|
||||
@@ -113,6 +117,10 @@ this.getWarehouseList()
|
||||
initCharts() {
|
||||
this.normalChart = echarts.init(document.getElementById('container'))
|
||||
},
|
||||
// 窗口大小改变
|
||||
handleResize() {
|
||||
this.normalChart && this.normalChart.resize()
|
||||
},
|
||||
// 仓库变化处理
|
||||
handleWarehouseChange() {
|
||||
// 重置巷道和排号
|
||||
@@ -174,7 +182,7 @@ this.getWarehouseList()
|
||||
}
|
||||
},
|
||||
title: {
|
||||
text: '库位分布平面图',
|
||||
text: '',
|
||||
subtext: (() => {
|
||||
const sel = this.floorOptions.find(o => String(o.value) === String(this.queryParams.theFloor))
|
||||
return sel && sel.label ? sel.label : ''
|
||||
@@ -321,7 +329,7 @@ this.getWarehouseList()
|
||||
},
|
||||
// 格式化普通仓库提示信息
|
||||
formatTooltip(params) {
|
||||
if (params.seriesName !== '满位') {
|
||||
if (params.seriesName !== '满位' && params.seriesName !== '出库分配') {
|
||||
// 排
|
||||
if (this.$i18n.locale ==='zh-cn') {
|
||||
return params.seriesName + '<br>' + (params.data[1] + 1) + '排' + (params.data[0] + 1) + '列' + this.queryParams.theFloor+ '层';
|
||||
@@ -400,21 +408,33 @@ this.getWarehouseList()
|
||||
|
||||
<style scoped>
|
||||
.app-container {
|
||||
padding: 20px;
|
||||
padding: 10px;
|
||||
height: calc(100vh - 84px);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.search-box {
|
||||
background-color: #fff;
|
||||
padding: 20px;
|
||||
margin-bottom: 20px;
|
||||
padding: 10px 10px 0 10px;
|
||||
margin-bottom: 10px;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.chart-container {
|
||||
background-color: #fff;
|
||||
padding: 20px;
|
||||
padding: 10px;
|
||||
border-radius: 4px;
|
||||
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>
|
||||
|
||||
@@ -329,9 +329,24 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// 页面初始化时生成符合规范的主单号(RKyyyyMMddHHmmssSS)
|
||||
this.formData.stockoutId = this.generateRKId()
|
||||
this.getWarehouseOptions();
|
||||
},
|
||||
methods: {
|
||||
// 生成 RK 单号(两位毫秒,统一入出库格式)
|
||||
generateRKId() {
|
||||
const d = new Date()
|
||||
const pad2 = (n) => String(n).padStart(2, '0')
|
||||
const yyyy = d.getFullYear()
|
||||
const MM = pad2(d.getMonth() + 1)
|
||||
const dd = pad2(d.getDate())
|
||||
const HH = pad2(d.getHours())
|
||||
const mm = pad2(d.getMinutes())
|
||||
const ss = pad2(d.getSeconds())
|
||||
const cs = pad2(Math.floor(d.getMilliseconds() / 10))
|
||||
return `RK${yyyy}${MM}${dd}${HH}${mm}${ss}${cs}`
|
||||
},
|
||||
/** 获取仓库选项 */
|
||||
getWarehouseOptions() {
|
||||
|
||||
@@ -564,6 +579,10 @@ export default {
|
||||
this.$modal.msgError('请选择物资');
|
||||
return;
|
||||
}
|
||||
// 若用户重新建单或清空过主单号,保存前保证再次生成
|
||||
if (!this.formData.stockoutId) {
|
||||
this.formData.stockoutId = this.generateRKId()
|
||||
}
|
||||
const data = {
|
||||
outStockout: this.formData,
|
||||
detailList: this.materialList
|
||||
|
||||
@@ -10,18 +10,9 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="'出库类型'" prop="outType"> <!-- 出库类型 -->
|
||||
<el-select v-model="queryParams.outType" :placeholder="'请选择出库类型'" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.out_bill_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<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.out_bill_status"
|
||||
:key="dict.value"
|
||||
@@ -30,15 +21,25 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="'物料名称'" prop="productName">
|
||||
<!-- 出库类型 -->
|
||||
<!-- <el-form-item :label="'出库类型'" prop="outType">
|
||||
<el-select v-model="queryParams.outType" :placeholder="'请选择出库类型'" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.out_bill_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item :label="'物料名称'" prop="productName">
|
||||
<el-input
|
||||
v-model="queryParams.productName"
|
||||
:placeholder="'请输入物料名称'"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
|
||||
|
||||
<el-form-item :label="'创建时间'" prop="dateRange">
|
||||
@@ -64,7 +65,15 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['out:outStockout:add']"
|
||||
>单据新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
size="mini"
|
||||
@click="handleAudit(2)"
|
||||
v-hasPermi="['out:outStockout:changeStatus']"
|
||||
@@ -74,7 +83,6 @@
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-circle-check"
|
||||
size="mini"
|
||||
@click="handleAudit(4)"
|
||||
v-hasPermi="['out:outStockout:changeStatus']"
|
||||
@@ -84,7 +92,6 @@
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
@click="handleAudit(5)"
|
||||
v-hasPermi="['out:outStockout:changeStatus']"
|
||||
@@ -92,37 +99,33 @@
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-s-promotion"
|
||||
size="mini"
|
||||
@click="handleAutoAllot"
|
||||
v-hasPermi="['out:outStockout:autoAllot']"
|
||||
>{{'自动分配'}}</el-button> <!-- 自动分配 -->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="info"
|
||||
plain
|
||||
icon="el-icon-s-tools"
|
||||
size="mini"
|
||||
@click="handleManualAllot"
|
||||
v-hasPermi="['out:outStockout:manualAllot']"
|
||||
>{{'手动分配'}}</el-button> <!-- 手动分配 -->
|
||||
@click="getOutStock"
|
||||
v-hasPermi="['out:outStockout:add']"
|
||||
>获取单据</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 主表数据 -->
|
||||
<el-table v-loading="loading" :data="outStockoutList" @selection-change="handleSelectionChange" @row-click="handleRowClick" 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 :label="'出库单编号'" align="left" prop="stockoutId" /> <!-- 出库单编号 -->
|
||||
<el-table-column :label="'出库单主题'" align="left" prop="fid" width="260" /> <!-- 出库单主题 -->
|
||||
<el-table-column :label="'出库类型'" align="left" prop="outType"> <!-- 出库类型 -->
|
||||
<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="outType"> <!-- 出库类型 -->
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.out_bill_type" :value="scope.row.outType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="'单据状态'" align="left" prop="status"> <!-- 单据状态 -->
|
||||
<el-table-column :label="'单据状态'" align="center" prop="status"> <!-- 单据状态 -->
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.out_bill_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
@@ -133,11 +136,22 @@
|
||||
<dict-tag :options="dict.type.bill_resource" :value="scope.row.stockoutSource"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="'ERP出库单编号'" align="center" prop="erpStockoutId" /> <!-- ERP出库单编号 -->
|
||||
<!-- <el-table-column :label="'ERP出库单编号'" align="center" prop="erpStockoutId" /> -->
|
||||
<!-- ERP出库单编号 -->
|
||||
<el-table-column :label="'客户名称'" align="center" prop="customerNo" /> <!-- 客户名称 -->
|
||||
<el-table-column :label="'创建时间'" align="left" prop="createDate" /><!-- 创建时间 -->
|
||||
<el-table-column :label="'开始时间'" align="left" prop="startDate" /><!-- 开始时间 -->
|
||||
<el-table-column :label="'确认时间'" align="left" prop="finishDate" /> <!-- 确认时间 -->
|
||||
<el-table-column :label="'创建时间'" align="center" prop="createDate" width="150" sortable="custom"/><!-- 创建时间 -->
|
||||
<!-- <el-table-column :label="'开始时间'" align="center" prop="startDate" width="150"/><!– 开始时间 –>-->
|
||||
<el-table-column :label="'确认时间'" align="center" prop="finishDate" width="150"/> <!-- 确认时间 -->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="60">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-thumb"
|
||||
@click="handleView(scope.row)"
|
||||
>详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
@@ -148,30 +162,125 @@
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 子表数据 -->
|
||||
<el-table v-loading="detailLoading" :data="outStockDetailList" style="margin-top: 20px;" @selection-change="handleDetailSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column :label="'出库子单编号'" align="center" prop="stockoutDetailId" width="160" /> <!-- 出库子单编号 -->
|
||||
<el-table-column :label="'物料编码'" align="center" prop="productId" /> <!-- 物资编码 -->
|
||||
<el-table-column :label="'物料名称'" align="center" prop="productName" />
|
||||
<el-table-column :label="'计划数量'" align="center" prop="quantity" /> <!-- 计划数量 -->
|
||||
<el-table-column :label="'分配数量'" align="center" prop="allotQuantity" /> <!-- 分配数量 -->
|
||||
<el-table-column :label="'实际数量'" align="center" prop="assignNum" /> <!-- 实际数量 -->
|
||||
<!-- <el-table-column :label="'来源'" align="center" prop="unit">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.origin_type" :value="scope.row.unit"/>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="1050px" append-to-body>
|
||||
<el-form ref="viewForm" :model="form" :rules="rules" label-width="80px">
|
||||
<el-card class="box-card" shadow="never">
|
||||
<div slot="header">主单信息</div>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="出库单号" prop="stockoutId">
|
||||
<el-input v-model="form.stockoutId" :disabled="isView"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="出库主题" prop="fid">
|
||||
<el-input v-model="form.fid" :disabled="isView"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="出库类型" prop="outType">
|
||||
<el-input v-model="form.outType" :disabled="isView"/>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单据来源" prop="stockoutSource">
|
||||
<el-input v-model="form.stockoutSource" :disabled="isView"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户名称" prop="customerNo">
|
||||
<el-input v-model="form.customerNo" :disabled="isView"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-row :gutter="20"> -->
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="单据状态" prop="status">
|
||||
<el-input v-model="form.status" :disabled="true"/>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
|
||||
<!-- </el-row> -->
|
||||
<!-- <el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="创建时间" prop="createDate">
|
||||
<el-input v-model="form.createDate" :disabled="true"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开始时间" prop="startDate">
|
||||
<el-input v-model="form.startDate" :disabled="true"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="确认时间" prop="finishDate">
|
||||
<el-input v-model="form.finishDate" :disabled="true"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
</el-card>
|
||||
<el-card class="box-card" shadow="never" style="margin-top: 12px;">
|
||||
<div slot="header" style="display:flex;justify-content:space-between;align-items:center;">
|
||||
<span>子单信息</span>
|
||||
<div v-if="isAddMode && !isView">
|
||||
<el-button type="danger" plain size="mini" @click="handleDeleteDetails">删除物资</el-button>
|
||||
<el-button type="primary" plain size="mini" @click="openProductSelector">选择物资</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="detailLoading"
|
||||
:data="outStockDetailList"
|
||||
@selection-change="handleDetailSelectionChange"
|
||||
size="mini"
|
||||
border
|
||||
style="width: 100%">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="出库子单编号" align="center" prop="stockoutDetailId" width="160" /> -->
|
||||
<el-table-column label="物料编码" align="center" prop="productId" />
|
||||
<el-table-column label="物料名称" align="center" prop="productName" />
|
||||
<el-table-column label="计划数量" align="center" prop="quantity" />
|
||||
<el-table-column label="分配数量" align="center" prop="allotQuantity" />
|
||||
<el-table-column label="实际数量" align="center" prop="assignNum" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" plain @click="handleAutoAllot" v-if="!isAddMode" v-hasPermi="['out:outStockout:autoAllot']">自动分配</el-button>
|
||||
<el-button type="primary" @click="submitForm" v-if="!isView">确 定</el-button>
|
||||
<el-button @click="open = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="选择物资" :visible.sync="productSelectVisible" width="900px" append-to-body>
|
||||
<el-form ref="productForm" :model="queryProductParams" size="small" :inline="true">
|
||||
<el-form-item label="物料名称" prop="productName">
|
||||
<el-input v-model="queryProductParams.productName" placeholder="请输入物料名称" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="getProductList">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetProductQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table :data="productOptions" border @selection-change="handleProductSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="物料编码" align="center" prop="productId" />
|
||||
<el-table-column label="物料名称" align="center" prop="productName" show-overflow-tooltip />
|
||||
<el-table-column label="物料数量" align="center" prop="quantity" show-overflow-tooltip />
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="productTotal>0"
|
||||
:total="productTotal"
|
||||
:page.sync="queryProductParams.pageNum"
|
||||
:limit.sync="queryProductParams.pageSize"
|
||||
@pagination="getProductList"
|
||||
/>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="confirmSelectProduct">确定</el-button>
|
||||
<el-button @click="productSelectVisible = false">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</el-table>
|
||||
|
||||
<!-- <pagination-->
|
||||
<!-- v-show="detailTotal>0"-->
|
||||
<!-- :total="detailTotal"-->
|
||||
<!-- :page.sync="detailQueryParams.pageNum"-->
|
||||
<!-- :limit.sync="detailQueryParams.pageSize"-->
|
||||
<!-- @pagination="getDetailList"-->
|
||||
<!-- />-->
|
||||
|
||||
<!-- 审核弹窗 -->
|
||||
<el-dialog :title="'审核'" :visible.sync="auditDialogVisible" width="400px" append-to-body>
|
||||
@@ -313,7 +422,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listOutStockout,autoAllot,listOut,manualAllot} from "@/api/out/outStockout"
|
||||
import { listOutStockout,autoAllot,listOut,manualAllot, saveOutStock, listProductAndStock, getOutStockList} from "@/api/out/outStockout"
|
||||
import { getOutStockoutDetail,updateOutStockStatus } from "@/api/out/outStockout"
|
||||
import {listWarehouse} from "@/api/bas/warehouse";
|
||||
|
||||
@@ -334,6 +443,21 @@ export default {
|
||||
outStockoutList: [],
|
||||
// 子表数据
|
||||
outStockDetailList: [],
|
||||
isAddMode: false,
|
||||
// 详情弹窗
|
||||
open: false,
|
||||
title: "",
|
||||
isView: false,
|
||||
// 详情表单数据
|
||||
form: {},
|
||||
rules: {
|
||||
stockoutId: [
|
||||
{ required: true, message: "出库单据编号不能为空", trigger: "blur" }
|
||||
],
|
||||
fid: [
|
||||
{ required: true, message: "出库主题不能为空", trigger: "blur" }
|
||||
]
|
||||
},
|
||||
// 选中数据
|
||||
selectedRows: [],
|
||||
// 选中的子表数据
|
||||
@@ -376,7 +500,7 @@ export default {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
stockoutId: null,
|
||||
outType: null,
|
||||
outType: 1,
|
||||
customerNo: null,
|
||||
customerName: null,
|
||||
supplierName: null,
|
||||
@@ -384,7 +508,9 @@ export default {
|
||||
productName: null,
|
||||
startDate: null,
|
||||
finishDate: null,
|
||||
status: '1'
|
||||
status: '1',
|
||||
orderByColumn: 'create_date',
|
||||
isAsc: 'desc'
|
||||
},
|
||||
// 子表分页参数
|
||||
detailQueryParams: {
|
||||
@@ -410,6 +536,15 @@ export default {
|
||||
lotNo: null,
|
||||
productId: null,
|
||||
productName: null
|
||||
},
|
||||
productSelectVisible: false,
|
||||
productOptions: [],
|
||||
selectedProducts: [],
|
||||
productTotal: 0,
|
||||
queryProductParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
productName: null
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -432,6 +567,97 @@ export default {
|
||||
this.getWarehouseList()
|
||||
},
|
||||
methods: {
|
||||
handleAdd() {
|
||||
this.form = {
|
||||
stockoutId: this.generateRKId(),
|
||||
fid: null,
|
||||
outType: 1,
|
||||
stockoutSource: '自建单',
|
||||
customerNo: null,
|
||||
status: 1
|
||||
}
|
||||
this.outStockDetailList = []
|
||||
this.selectedDetailRows = []
|
||||
this.isView = false
|
||||
this.isAddMode = true
|
||||
this.title = "添加出库单据"
|
||||
this.open = true
|
||||
},
|
||||
generateRKId() {
|
||||
const d = new Date()
|
||||
const pad2 = (n) => String(n).padStart(2, '0')
|
||||
const yyyy = d.getFullYear()
|
||||
const MM = pad2(d.getMonth() + 1)
|
||||
const dd = pad2(d.getDate())
|
||||
const HH = pad2(d.getHours())
|
||||
const mm = pad2(d.getMinutes())
|
||||
const ss = pad2(d.getSeconds())
|
||||
const cs = pad2(Math.floor(d.getMilliseconds() / 10))
|
||||
return `RK${yyyy}${MM}${dd}${HH}${mm}${ss}${cs}`
|
||||
},
|
||||
openProductSelector() {
|
||||
this.getProductList()
|
||||
this.productSelectVisible = true
|
||||
},
|
||||
getProductList() {
|
||||
listProductAndStock(this.queryProductParams).then(response => {
|
||||
this.productOptions = response.rows || []
|
||||
this.productTotal = response.total || 0
|
||||
})
|
||||
},
|
||||
resetProductQuery() {
|
||||
this.resetForm("productForm")
|
||||
this.getProductList()
|
||||
},
|
||||
handleProductSelectionChange(selection) {
|
||||
this.selectedProducts = selection
|
||||
},
|
||||
confirmSelectProduct() {
|
||||
const duplicate = this.selectedProducts.filter(sel =>
|
||||
this.outStockDetailList.some(ex => ex.productId === sel.productId)
|
||||
)
|
||||
if (duplicate.length > 0) {
|
||||
this.$modal.msgError("选择的物料已存在")
|
||||
return
|
||||
}
|
||||
const items = this.selectedProducts.map(item => ({
|
||||
productId: item.productId,
|
||||
productName: item.productName,
|
||||
quantity: item.quantity || item.stockQuantity || 1,
|
||||
allotQuantity: 0,
|
||||
assignNum: 0
|
||||
}))
|
||||
this.outStockDetailList.push(...items)
|
||||
this.productSelectVisible = false
|
||||
},
|
||||
handleDeleteDetails() {
|
||||
if (this.selectedDetailRows.length === 0) {
|
||||
this.$modal.msgWarning("请选择要删除的物料")
|
||||
return
|
||||
}
|
||||
this.outStockDetailList = this.outStockDetailList.filter(item => !this.selectedDetailRows.includes(item))
|
||||
this.selectedDetailRows = []
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs["viewForm"].validate(valid => {
|
||||
if (valid) {
|
||||
const payload = {
|
||||
outStockout: { ...this.form },
|
||||
detailList: this.outStockDetailList
|
||||
}
|
||||
saveOutStock(payload).then(response => {
|
||||
if (response.code !== 200) {
|
||||
this.$modal.msgError(response.msg || "保存失败")
|
||||
return
|
||||
}
|
||||
this.$modal.msgSuccess(response.msg || "新增成功")
|
||||
this.open = false
|
||||
this.isAddMode = false
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 获取仓库列表 */
|
||||
getWarehouseList() {
|
||||
listWarehouse(this.warehouseQueryParams).then(response => {
|
||||
@@ -441,21 +667,24 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
getOutStock() {
|
||||
this.$modal.confirm('是否确认从ERP获取出库单据?').then(function () {
|
||||
return getOutStockList()
|
||||
}).then(() => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess("获取成功")
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
/** 查询主表数据 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
listOutStockout(this.queryParams).then(response => {
|
||||
return listOutStockout(this.queryParams).then(response => {
|
||||
this.outStockoutList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
// 如果有数据,自动选中第一行
|
||||
if (this.outStockoutList.length > 0) {
|
||||
this.handleRowClick(this.outStockoutList[0]);
|
||||
}else {
|
||||
this.outStockDetailList = []
|
||||
this.detailLoading = false
|
||||
}
|
||||
|
||||
this.outStockDetailList = []
|
||||
this.detailLoading = false
|
||||
})
|
||||
},
|
||||
/** 查询子表数据 */
|
||||
@@ -493,10 +722,31 @@ export default {
|
||||
this.resetForm("queryForm")
|
||||
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) {
|
||||
this.getDetailList(row.stockoutGuid,row.status)
|
||||
},
|
||||
/** 详情按钮操作:按需加载明细 */
|
||||
handleView(row) {
|
||||
this.selectedRows = [row]
|
||||
this.outStockDetailList = []
|
||||
this.detailTotal = 0
|
||||
this.form = { ...row }
|
||||
this.title = "出库单据详情"
|
||||
this.isView = true
|
||||
this.open = true
|
||||
this.getDetailList(row.stockoutGuid, row.status)
|
||||
},
|
||||
/** 多选框选中数据 */
|
||||
handleSelectionChange(selection) {
|
||||
this.selectedRows = selection
|
||||
@@ -578,7 +828,9 @@ export default {
|
||||
}else {
|
||||
this.$modal.msgSuccess(response.msg)
|
||||
}
|
||||
this.getList()
|
||||
this.getList().then(() => {
|
||||
this.getDetailList(this.selectedRows[0].stockoutGuid, this.selectedRows[0].status)
|
||||
})
|
||||
})
|
||||
},
|
||||
/** 手动分配按钮操作 */
|
||||
|
||||
@@ -9,22 +9,22 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入库子单ID" prop="stockinDetailId">
|
||||
<!-- <el-form-item label="入库子单ID" prop="stockinDetailId">
|
||||
<el-input
|
||||
v-model="queryParams.stockinDetailId"
|
||||
placeholder="请输入入库子单ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库ID" prop="warehouseId">
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="仓库ID" prop="warehouseId">
|
||||
<el-input
|
||||
v-model="queryParams.warehouseId"
|
||||
placeholder="请输入仓库ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
@@ -103,7 +103,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
|
||||
@@ -6,17 +6,17 @@
|
||||
<el-checkbox label="cargoSpaceId">货位编码</el-checkbox>
|
||||
<el-checkbox label="productId">物料编码</el-checkbox>
|
||||
<el-checkbox label="productName">物料名称</el-checkbox>
|
||||
<el-checkbox label="parentId">产品分类</el-checkbox>
|
||||
<el-checkbox label="price">价格</el-checkbox>
|
||||
<el-checkbox label="cargoNo">产品编码</el-checkbox>
|
||||
<!-- <el-checkbox label="parentId">产品分类</el-checkbox> -->
|
||||
<!-- <el-checkbox label="price">价格</el-checkbox> -->
|
||||
<!-- <el-checkbox label="cargoNo">产品编码</el-checkbox> -->
|
||||
<el-checkbox label="unit">单位</el-checkbox>
|
||||
<el-checkbox label="spec">型号</el-checkbox>
|
||||
<el-checkbox label="spare1">单位名称</el-checkbox>
|
||||
<el-checkbox label="spare3">url</el-checkbox>
|
||||
<el-checkbox label="spare4">btnurl</el-checkbox>
|
||||
<el-checkbox label="spare5">unitPrices</el-checkbox>
|
||||
<el-checkbox label="spare6">units</el-checkbox>
|
||||
<el-checkbox label="spare7">unitjb</el-checkbox>
|
||||
<!-- <el-checkbox label="spare1">单位名称</el-checkbox> -->
|
||||
<!-- <el-checkbox label="spare3">url</el-checkbox> -->
|
||||
<!-- <el-checkbox label="spare4">btnurl</el-checkbox> -->
|
||||
<!-- <el-checkbox label="spare5">unitPrices</el-checkbox> -->
|
||||
<!-- <el-checkbox label="spare6">units</el-checkbox> -->
|
||||
<!-- <el-checkbox label="spare7">unitjb</el-checkbox> -->
|
||||
<el-checkbox label="cargoSpaceName">货位名称</el-checkbox>
|
||||
<el-checkbox label="status">货位状态</el-checkbox>
|
||||
<el-checkbox label="locked">货位锁</el-checkbox>
|
||||
@@ -97,34 +97,38 @@
|
||||
max-height="650"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="库存编码" align="left" prop="stockId" width="160" />
|
||||
<el-table-column label="物料编码" align="left" prop="productId" width="160" 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="left" prop="cargoSpaceId" width="160" v-if="queryParams.groupFields.includes('cargoSpaceId')" />
|
||||
<el-table-column label="库存数量" align="right" prop="quantity" width="120" />
|
||||
<el-table-column label="产品分类" align="left" prop="parentId" width="160" 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="left" prop="cargoNo" width="160" 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="left" prop="spec" width="160" 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="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="unitPrices" align="left" 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="unitjb" align="left" prop="spare7" width="160" v-if="queryParams.groupFields.includes('spare7')" />
|
||||
<el-table-column label="货位名称" align="left" prop="cargoSpaceName" width="160" v-if="queryParams.groupFields.includes('cargoSpaceName')" />
|
||||
<el-table-column label="货位状态" align="left" prop="status" width="160" v-if="queryParams.groupFields.includes('status')" >
|
||||
<el-table-column label="库存编码" align="center" prop="stockId" width="120" />
|
||||
<el-table-column label="物料编码" align="center" prop="productId" width="120" v-if="queryParams.groupFields.includes('productId')" />
|
||||
<el-table-column label="物料名称" align="center" prop="productName" width="120" v-if="queryParams.groupFields.includes('productName')" />
|
||||
<el-table-column label="货位编码" align="center" prop="cargoSpaceId" width="80" v-if="queryParams.groupFields.includes('cargoSpaceId')" />
|
||||
<el-table-column label="库存数量" align="center" prop="quantity" width="80" />
|
||||
<el-table-column label="产品分类" align="center" prop="parentId" width="80" v-if="queryParams.groupFields.includes('parentId')" />
|
||||
<el-table-column label="价格" align="center" prop="price" width="80" v-if="queryParams.groupFields.includes('price')" />
|
||||
<!-- <el-table-column label="产品编码" align="center" prop="cargoNo" width="100" v-if="queryParams.groupFields.includes('cargoNo')" /> -->
|
||||
<el-table-column label="单位" align="center" prop="unit" width="50" v-if="queryParams.groupFields.includes('unit')" />
|
||||
<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="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="unitPrices" align="center" prop="spare5" width="160" v-if="queryParams.groupFields.includes('spare5')" /> -->
|
||||
<el-table-column label="units" align="center" prop="spare6" width="80" v-if="queryParams.groupFields.includes('spare6')">
|
||||
<template slot-scope="scope">
|
||||
{{ getunits(scope.row.spare6) }}
|
||||
</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">
|
||||
<dict-tag :options="dict.type.cargo_space_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</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">
|
||||
<dict-tag :options="dict.type.cargo_space_lock_status" :value="scope.row.locked"/>
|
||||
</template>
|
||||
</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>
|
||||
|
||||
<pagination
|
||||
@@ -298,6 +302,19 @@ export default {
|
||||
this.ids = selection.map(item => item.onlyIdentity)
|
||||
this.single = selection.length!==1
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -77,56 +77,60 @@
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="ViewInJobFlowList" @selection-change="handleSelectionChange">
|
||||
<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="jobDetailId" />
|
||||
<el-table-column width="180" 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="inOrOutDId" />
|
||||
<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="unitPrices" align="center" prop="spare5" />
|
||||
<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="180" 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">
|
||||
<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 width="125" label="作业ID" align="center" prop="jobId" />
|
||||
<el-table-column width="135" label="子作业ID" align="center" prop="jobDetailId" />
|
||||
<el-table-column width="80" label="任务号" align="center" prop="taskNo" />
|
||||
<el-table-column width="125" label="单据ID" align="center" prop="inOrOutId" />
|
||||
<el-table-column width="135" label="子单据ID" align="center" prop="inOrOutDId" />
|
||||
<el-table-column width="130" label="物料编码" align="center" prop="productId" />
|
||||
<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="units" align="center" prop="spare6" /> -->
|
||||
<el-table-column width="80" label="托盘码" align="center" prop="trayCode" />
|
||||
<el-table-column width="100" label="入库数量" align="center" prop="inQuantity">
|
||||
<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>
|
||||
</el-table-column>
|
||||
<el-table-column width="180" label="货位ID" align="center" prop="cargoSpaceId" />
|
||||
<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">
|
||||
<!-- <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="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">
|
||||
<dict-tag :options="dict.type.execution_phase_type" :value="scope.row.executionPhase"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="120" label="库存状态" align="center" prop="stockStatus">
|
||||
<template slot-scope="scope">
|
||||
<!-- <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="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> -->
|
||||
<el-table-column width="80" label="产品分类" align="center" prop="parentId" />
|
||||
<!-- <el-table-column width="180" label="价格" align="center" prop="price" /> -->
|
||||
<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="80" 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="120" label="备注" align="center" prop="remark" />
|
||||
|
||||
</el-table>
|
||||
|
||||
@@ -147,11 +151,13 @@ import { listViewInJobFlow, getViewInJobFlow } from "@/api/search/ViewInJobFlow"
|
||||
|
||||
export default {
|
||||
name: "ViewInJobFlow",
|
||||
dicts: ['execution_phase_type', 'sys_job_status', 'stock_status'],
|
||||
dicts: ['execution_phase_type', 'mydo_job_status', 'stock_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 默认排序
|
||||
defaultSort: {prop: 'finishTime', order: 'descending'},
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
@@ -172,6 +178,8 @@ export default {
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
orderByColumn: 'finish_time',
|
||||
isAsc: 'desc',
|
||||
jobId: null,
|
||||
status: null,
|
||||
trayCode: null,
|
||||
@@ -225,6 +233,12 @@ export default {
|
||||
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() {
|
||||
this.open = false
|
||||
|
||||
@@ -77,55 +77,69 @@
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</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 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="任务号" 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="inOrOutDId" />
|
||||
<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="unitPrices" align="center" prop="spare5" />
|
||||
<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="180" label="unitPrices" align="center" prop="spare5" />-->
|
||||
<el-table-column width="100" label="单位组" align="center" prop="spare6" />
|
||||
<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="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">
|
||||
<el-table-column width="100" label="出库数量" align="center" prop="outQuantity">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_job_status" :value="scope.row.status"/>
|
||||
{{ format4(scope.row.outQuantity) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="180" label="货位ID" align="center" prop="cargoSpaceId" />
|
||||
<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">
|
||||
<el-table-column width="100" label="库存数量" align="center" prop="stockQuantity">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.execution_phase_type" :value="scope.row.executionPhase"/>
|
||||
{{ format4(scope.row.stockQuantity) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="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="供应商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">-->
|
||||
<!-- <dict-tag :options="dict.type.sys_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="180" label="目标巷道ID" align="center" prop="targetCargoSpaceId" />-->
|
||||
<el-table-column width="150" label="开始时间" align="center" prop="startTime" sortable="custom" />
|
||||
<el-table-column width="150" label="结束时间" align="center" prop="finishTime" sortable="custom" />
|
||||
<!-- <el-table-column width="120" label="执行阶段" align="center" prop="executionPhase">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <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>
|
||||
@@ -204,7 +218,9 @@ export default {
|
||||
spare4: null,
|
||||
spare5: null,
|
||||
spare6: null,
|
||||
spare7: null
|
||||
spare7: null,
|
||||
orderByColumn: 'start_time',
|
||||
isAsc: 'desc'
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@@ -299,6 +315,23 @@ export default {
|
||||
this.single = selection.length!==1
|
||||
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() {
|
||||
this.reset()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<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
|
||||
v-model="queryParams.stockinId"
|
||||
placeholder="请输入入库主单ID"
|
||||
@@ -9,7 +9,7 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入库子单ID" prop="stockinDetailId">
|
||||
<el-form-item label="子单ID" prop="stockinDetailId">
|
||||
<el-input
|
||||
v-model="queryParams.stockinDetailId"
|
||||
placeholder="请输入子单ID"
|
||||
@@ -98,19 +98,29 @@
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</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 width="180" label="入库主单ID" align="center" prop="stockinId" />
|
||||
<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">
|
||||
<dict-tag :options="dict.type.in_bill_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="180" label="物料编码" align="center" prop="productId" />
|
||||
<el-table-column width="180" label="物料名称" align="center" prop="productName" />
|
||||
<el-table-column width="120" label="计划数量" align="center" prop="quantity" />
|
||||
<el-table-column width="200" label="unitPrices" align="center" prop="spare5" />
|
||||
<el-table-column width="100" label="计划数量" align="center" prop="quantity">
|
||||
<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="180" label="供应商编码" align="center" prop="supplierNo" />
|
||||
<el-table-column width="180" label="供应商名称" align="center" prop="supplierName" />
|
||||
@@ -118,27 +128,35 @@
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.in_bill_type" :value="scope.row.inType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="180" label="建立时间" align="center" prop="createDate" />
|
||||
<el-table-column width="120" label="创建人" align="center" prop="createManId" />
|
||||
</el-table-column> -->
|
||||
<el-table-column width="150" label="建立时间" align="center" prop="createDate" sortable="custom" />
|
||||
<el-table-column width="100" label="创建人" align="center" prop="createManId" />
|
||||
<!-- <el-table-column label="仓库ID" align="center" prop="warehouseId" />-->
|
||||
<el-table-column width="180" label="完成日期" align="center" prop="finishDate" />
|
||||
<el-table-column width="180" label="erp单号" align="center" prop="erpBill" />
|
||||
<el-table-column width="150" label="完成日期" align="center" prop="finishDate" sortable="custom" />
|
||||
<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="departmentNo" />-->
|
||||
<!-- <el-table-column label="班组编码" align="center" prop="classNo" />-->
|
||||
<!-- <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 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="型号" 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="scanNum" />
|
||||
<el-table-column width="180" label="实际数量" align="center" prop="assignNum" />
|
||||
<el-table-column width="180" label="unitjb" align="center" prop="spare7" /> -->
|
||||
<el-table-column width="100" label="扫码数量" align="center" prop="scanNum">
|
||||
<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>
|
||||
|
||||
@@ -214,7 +232,9 @@ export default {
|
||||
quantity: null,
|
||||
scanNum: null,
|
||||
assignNum: null,
|
||||
supplierName: null
|
||||
supplierName: null,
|
||||
orderByColumn: 'create_date',
|
||||
isAsc: 'desc'
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@@ -307,6 +327,23 @@ export default {
|
||||
this.single = selection.length!==1
|
||||
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() {
|
||||
this.reset()
|
||||
@@ -368,4 +405,10 @@ export default {
|
||||
width: auto;
|
||||
min-width: fit-content;
|
||||
}
|
||||
/* 表头文本容器自适应宽度,避免固定宽度造成拥挤或换行 */
|
||||
.el-table >>> th .cell {
|
||||
white-space: nowrap;
|
||||
width: auto;
|
||||
min-width: fit-content;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<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
|
||||
v-model="queryParams.stockoutId"
|
||||
placeholder="请输入出库订单ID"
|
||||
@@ -9,16 +9,16 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库类型" prop="outType">
|
||||
<el-select v-model="queryParams.outType" placeholder="请选择出库类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.out_bill_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="出库类型" prop="outType">-->
|
||||
<!-- <el-select v-model="queryParams.outType" placeholder="请选择出库类型" clearable>-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in dict.type.out_bill_type"-->
|
||||
<!-- :key="dict.value"-->
|
||||
<!-- :label="dict.label"-->
|
||||
<!-- :value="dict.value"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="单据状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择单据状态" clearable>
|
||||
<el-option
|
||||
@@ -29,14 +29,14 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="子单id" prop="stockoutDetailId">
|
||||
<el-input
|
||||
v-model="queryParams.stockoutDetailId"
|
||||
placeholder="请输入子单id"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="子单id" prop="stockoutDetailId">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.stockoutDetailId"-->
|
||||
<!-- placeholder="请输入子单id"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<el-form-item label="物料编码" prop="productId">
|
||||
<el-input
|
||||
@@ -57,11 +57,6 @@
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
@@ -70,51 +65,71 @@
|
||||
@click="handleExport"
|
||||
v-hasPermi="['search:ViewStockoutHistory:export']"
|
||||
>导出</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>
|
||||
</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 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="单据主题" align="center" prop="FID" />
|
||||
<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="quantity" />
|
||||
<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="120" label="出库类型" align="center" prop="outType">
|
||||
<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="单位组" align="center" prop="spare6" />
|
||||
<el-table-column width="100" label="出库类型" align="center" prop="outType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.out_bill_type" :value="scope.row.outType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="180" label="建立时间" align="center" prop="createDate" />
|
||||
<el-table-column width="120" label="创建人" align="center" prop="createManId" />
|
||||
<el-table-column width="120" label="单据状态" align="center" prop="status">
|
||||
<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="80" label="单据状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.out_bill_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="customerNo" />
|
||||
<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="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="180" label="批次" align="center" prop="lotNo" />
|
||||
<el-table-column width="180" label="实际数量" align="center" prop="assignNum" />
|
||||
<el-table-column width="180" label="分配数量" align="center" prop="allotQuantity" />
|
||||
<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="supplierNo" />-->
|
||||
<!-- <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="contactName" />-->
|
||||
<!-- <el-table-column width="180" label="单据来源" align="center" prop="stockoutSource" />-->
|
||||
<!-- <el-table-column width="180" label="出口" align="center" prop="exitId" />-->
|
||||
|
||||
<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="100" label="实际数量" align="center" prop="assignNum" />
|
||||
<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="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>
|
||||
|
||||
@@ -190,7 +205,9 @@ export default {
|
||||
supplierNo: null,
|
||||
supplierName: null,
|
||||
customerNo: null,
|
||||
contactName: null
|
||||
contactName: null,
|
||||
orderByColumn: 'create_date',
|
||||
isAsc: 'desc'
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@@ -271,6 +288,17 @@ export default {
|
||||
this.single = selection.length!==1
|
||||
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() {
|
||||
this.reset()
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
size="mini"
|
||||
@click="pointOut"
|
||||
v-hasPermi="['job:outmydoJob:pointOut']"
|
||||
>指定货位出库 <!-- 指定货位出库 --></el-button>
|
||||
>指定通道出库 <!-- 指定货位出库 --></el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
@@ -84,25 +84,28 @@
|
||||
|
||||
<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 label="库存编码" align="left" prop="stockId" /> <!-- 库存编码 -->
|
||||
<el-table-column label="初始货位编码" align="left" prop="lotNo" /> <!-- 库存编码 -->
|
||||
<el-table-column label="操作后货位编码" align="left" prop="cargoSpaceId" /> <!-- 货位编码 -->
|
||||
<el-table-column label="操作后货位名称" align="left" prop="cargoSpaceName" /> <!-- 货位编码 -->
|
||||
<el-table-column label="托盘条码" align="left" prop="trayCode" /> <!-- 托盘条码 -->
|
||||
<el-table-column label="初始物品名称" align="left" prop="productGuid" /> <!-- 托盘条码 -->
|
||||
<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"> <!-- 操作 -->
|
||||
<el-table-column label="库存编码" align="center" prop="stockId" width="142" /> <!-- 库存编码 -->
|
||||
<el-table-column label="初始货位" align="center" prop="lotNo" width="142" /> <!-- 初始货位 -->
|
||||
<el-table-column label="现货位" align="center" prop="cargoSpaceId" width="142" /> <!-- 货位编码 -->
|
||||
<el-table-column label="货位名称" align="center" prop="cargoSpaceName" width="142" /> <!-- 货位编码 -->
|
||||
<el-table-column label="托盘条码" align="center" prop="trayCode" width="142" /> <!-- 托盘条码 -->
|
||||
<el-table-column label="操作类型" align="center" prop="method"> <!-- 操作 -->
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.stock_maintain_method" :value="scope.row.method"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库" align="left" prop="warehouseName" /> <!-- 仓库 -->
|
||||
<el-table-column label="创建时间" align="left" prop="createTime" /> <!-- 创建时间 -->
|
||||
<el-table-column label="原物品名称" align="center" prop="productGuid" width="142" /> <!-- 托盘条码 -->
|
||||
<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">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-button-->
|
||||
|
||||
1066
ruoyi-ui/src/views/system/inStockIn/index.vue
Normal file
1066
ruoyi-ui/src/views/system/inStockIn/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user