From 693584e6c84f6292a29ba242aa9e47be200e451e Mon Sep 17 00:00:00 2001
From: xiazhengtongxue <133085197+xiazhengtongxue@users.noreply.github.com>
Date: 星期二, 21 四月 2026 15:25:12 +0800
Subject: [PATCH] feat: 更新仓库枚举值和过滤条件,添加不等操作符支持 refactor: 重构任务和库存相关界面的查询逻辑 fix: 修复库存状态过滤条件错误问题 style: 统一代码格式和命名规范
---
Code/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.jsx | 108 +++++++++++++++++++++++++++++++++++------------------
1 files changed, 71 insertions(+), 37 deletions(-)
diff --git a/Code/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.jsx b/Code/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.jsx
index 809dd5f..6a0c613 100644
--- a/Code/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.jsx
+++ b/Code/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.jsx
@@ -3,58 +3,74 @@
let extension = {
components: {
//鏌ヨ鐣岄潰鎵╁睍缁勪欢
- gridHeader: '',
- gridBody: '',
- gridFooter: '',
+ gridHeader: "",
+ gridBody: "",
+ gridFooter: "",
//鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
- modelHeader: '',
- modelBody: '',
- modelFooter: ''
+ modelHeader: "",
+ modelBody: "",
+ modelFooter: "",
},
- tableAction: '',
+ tableAction: "",
buttons: { view: [], box: [], detail: [] },
methods: {
onInit() {
// 娣诲姞MES鎿嶄綔鍒�
this.columns.push({
- title: '鎿嶄綔',
- field: '鎿嶄綔',
- align: 'center',
+ title: "鎿嶄綔",
+ field: "鎿嶄綔",
+ align: "center",
width: 200,
- fixed: 'right',
+ fixed: "right",
render: (h, { row, column, index }) => {
return (
<div>
<el-button
type="primary"
size="small"
- onClick={($e) => { this.handleInbound(row); }}
- >杩涚珯</el-button>
+ onClick={($e) => {
+ this.handleInbound(row);
+ }}
+ >
+ 杩涚珯
+ </el-button>
<el-button
type="success"
size="small"
style="margin-left: 8px"
- onClick={($e) => { this.handleOutbound(row); }}
- >鍑虹珯</el-button>
+ onClick={($e) => {
+ this.handleOutbound(row);
+ }}
+ >
+ 鍑虹珯
+ </el-button>
</div>
);
- }
+ },
});
},
// 鎵樼洏杩涚珯鎿嶄綔
async handleInbound(row) {
try {
- await this.$confirm(`纭鎵ц鎵樼洏杩涚珯鎿嶄綔锛焅n鎵樼洏缂栧彿锛�${row.palletCode}`, "杩涚珯纭", {
- confirmButtonText: "纭",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- });
+ await this.$confirm(
+ `纭鎵ц鎵樼洏杩涚珯鎿嶄綔锛焅n鎵樼洏缂栧彿锛�${row.palletCode}`,
+ "杩涚珯纭",
+ {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ },
+ );
- const result = await this.http.post("/api/StockInfo/inboundInContainer", {
- palletCode: row.palletCode,
- stockId: row.id
- }, "姝e湪璋冪敤MES鎺ュ彛...");
+ const result = await this.http.post(
+ "/api/StockInfo/inboundInContainer",
+ {
+ palletCode: row.palletCode,
+ stockId: row.id,
+ },
+ "姝e湪璋冪敤MES鎺ュ彛...",
+ );
if (result.status) {
this.$Message.success(result.message || "鎵樼洏杩涚珯鎴愬姛");
@@ -72,16 +88,24 @@
// 鎵樼洏鍑虹珯鎿嶄綔
async handleOutbound(row) {
try {
- await this.$confirm(`纭鎵ц鎵樼洏鍑虹珯鎿嶄綔锛焅n鎵樼洏缂栧彿锛�${row.palletCode}`, "鍑虹珯纭", {
- confirmButtonText: "纭",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- });
+ await this.$confirm(
+ `纭鎵ц鎵樼洏鍑虹珯鎿嶄綔锛焅n鎵樼洏缂栧彿锛�${row.palletCode}`,
+ "鍑虹珯纭",
+ {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ },
+ );
- const result = await this.http.post("/api/StockInfo/outboundInContainer", {
- palletCode: row.palletCode,
- stockId: row.id
- }, "姝e湪璋冪敤MES鎺ュ彛...");
+ const result = await this.http.post(
+ "/api/StockInfo/outboundInContainer",
+ {
+ palletCode: row.palletCode,
+ stockId: row.id,
+ },
+ "姝e湪璋冪敤MES鎺ュ彛...",
+ );
if (result.status) {
this.$Message.success(result.message || "鎵樼洏鍑虹珯鎴愬姛");
@@ -100,10 +124,20 @@
// 妗嗘灦鍒濆鍖栭厤缃悗
},
searchBefore(param) {
+ const stockStatusFilter = {
+ name: "stockStatus",
+ value: "1",
+ displayType: "notequal",
+ };
+ if (!param.wheres) {
+ param.wheres = [];
+ }
+ // 灏嗚繃婊ゆ潯浠舵坊鍔犲埌鏌ヨ鍙傛暟涓�
+ param.wheres.push(stockStatusFilter);
return true;
},
searchAfter(result) {
- return true;
+ return result;
},
addBefore(formData) {
return true;
@@ -116,8 +150,8 @@
},
modelOpenAfter(row) {
// 鐐瑰嚮缂栬緫銆佹柊寤烘寜閽脊鍑烘鍚�
- }
- }
+ },
+ },
};
export default extension;
--
Gitblit v1.9.3