From 3159971af301f5bb8871e1c695fa4463c270db0f Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期一, 29 十二月 2025 14:31:48 +0800
Subject: [PATCH] 1
---
项目代码/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue | 7 +++
项目代码/WIDESEA_WMSClient/config/buttons.js | 16 ++++++++
项目代码/WIDESEA_WMSClient/src/extension/stock/stockInfoDetail.js | 57 ++++++++++++++++++++++++++++
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoDetailController.cs | 5 ++
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Common/StockEnum/StockStatusEmun.cs | 3 +
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoDetailService.cs | 2 +
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoDetailService.cs | 21 ++++++++++
7 files changed, 110 insertions(+), 1 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/config/buttons.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/config/buttons.js"
index 34dfc95..9d55312 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/config/buttons.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/config/buttons.js"
@@ -291,6 +291,22 @@
type: 'warning',
onClick: function () {
}
+},{
+ name: "鍐荤粨",
+ icon: '',
+ class: '',
+ value: 'Lock',
+ type: 'warning',
+ onClick: function () {
+ }
+},{
+ name: "瑙i攣",
+ icon: '',
+ class: '',
+ value: 'Unlock',
+ type: 'warning',
+ onClick: function () {
+ }
},
]
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/stock/stockInfoDetail.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/stock/stockInfoDetail.js"
index 24e1d94..82066ef 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/stock/stockInfoDetail.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/stock/stockInfoDetail.js"
@@ -16,7 +16,62 @@
buttons: { view: [], box: [], detail: [] }, //鎵╁睍鐨勬寜閽�
methods: {
//涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
- onInit() {
+ onInit() {
+ var LockBtn = this.buttons.find(x => x.value == "Lock");
+ if (LockBtn != null) {
+ LockBtn.onClick = () => {
+ var rows = this.$refs.table.getSelected();
+ if (!rows || rows.length === 0) {
+ return this.$Message.error("璇峰厛閫夋嫨闇�瑕佸鐞嗙殑鍗曟嵁");
+ }
+ var keys = rows.map(x => {return x.id;})
+ var param = {
+ DelKeys: keys,
+ Extra: true
+ }
+
+ this.http.post(`api/StockInfoDetail/LockOrUpLockStockDetail`,param,"鏁版嵁澶勭悊涓�...")
+ .then((x) => {
+ if (x.status) {
+ this.$Message.success(x.message);
+ this.refresh();
+ } else {
+ return this.$Message.error(x.message);
+ }
+ })
+ .catch((error) => {
+ this.$Message.error('璇锋眰澶辫触锛�' + (error.message || '鏈煡閿欒'));
+ });
+ }
+ }
+
+ var UnlockBtn = this.buttons.find(x => x.value == "Unlock");
+ if (UnlockBtn != null) {
+ UnlockBtn.onClick = () => {
+ var rows = this.$refs.table.getSelected();
+ if (!rows || rows.length === 0) {
+ return this.$Message.error("璇峰厛閫夋嫨闇�瑕佸鐞嗙殑鍗曟嵁");
+ }
+ var keys = rows.map(x => {return x.id;})
+ var param = {
+ DelKeys: keys,
+ Extra: false
+ }
+
+ this.http.post(`api/StockInfoDetail/LockOrUpLockStockDetail`,param,"鏁版嵁澶勭悊涓�...")
+ .then((x) => {
+ if (x.status) {
+ this.$Message.success(x.message);
+ this.refresh();
+ } else {
+ return this.$Message.error(x.message);
+ }
+ })
+ .catch((error) => {
+ this.$Message.error('璇锋眰澶辫触锛�' + (error.message || '鏈煡閿欒'));
+ });
+ }
+ }
},
onInited() {
//妗嗘灦鍒濆鍖栭厤缃悗
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue"
index 6aee2bd..8b39514 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue"
@@ -67,7 +67,14 @@
{ title: "鐗╂枡缂栧彿", field: "materielCode", type: 'like' },
{ title: "鐗╂枡鍚嶇О", field: "materielName", type: 'like' },
{ title: "鍗曟嵁缂栧彿", field: "orderNo", type: 'like' },
+
+ ], [
{ title: "鎵樼洏鍙�", field: "palletCode", type: 'like' },
+ { title: "鎵规", field: "batchNo", type: 'like' },
+ { title: "鏉$爜", field: "barcode", type: 'like' },
+ ],
+ [
+ { title: "搴撳瓨鐘舵��", field: "status", type: 'select', dataKey: "stockStatusEmun", data: [] },
],
]);
const columns = ref([
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Common/StockEnum/StockStatusEmun.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Common/StockEnum/StockStatusEmun.cs"
index 8b9f256..6c59d4f 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Common/StockEnum/StockStatusEmun.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Common/StockEnum/StockStatusEmun.cs"
@@ -107,6 +107,9 @@
[Description("宸叉竻鐞�")]
宸叉竻鐞� = 33,
+ [Description("鎵嬪姩鍐荤粨")]
+ 鎵嬪姩鍐荤粨 = 55,
+
[Description("鎵嬪姩瑙i攣")]
鎵嬪姩瑙i攣 = 66,
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoDetailService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoDetailService.cs"
index 93c7e76..de3985b 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoDetailService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoDetailService.cs"
@@ -15,5 +15,7 @@
PageGridData<StockInfoDetailWithPalletDto> GetPageData2(PageDataOptions options);
+ Task<WebResponseContent> LockOrUpLockStockDetail(SaveModel saveModel);
+
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoDetailService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoDetailService.cs"
index d84a515..c084ca4 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoDetailService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoDetailService.cs"
@@ -128,6 +128,27 @@
}
+
+ public async Task<WebResponseContent> LockOrUpLockStockDetail(SaveModel saveModel)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ var details = await BaseDal.QueryDataAsync(x => saveModel.DelKeys.Contains(x.Id));
+
+ bool flag = Convert.ToBoolean(saveModel.Extra);
+
+ details.ForEach(x => x.Status = flag ? StockStatusEmun.鎵嬪姩鍐荤粨.ObjToInt(): StockStatusEmun.鎵嬪姩瑙i攣.ObjToInt());
+
+ await BaseDal.UpdateDataAsync(details);
+
+ return content.OK(flag ? "鍐荤粨鎴愬姛!" : "瑙i攣鎴愬姛!");
+ }
+ catch (Exception ex)
+ {
+ return content.Error(ex.Message);
+ }
+ }
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoDetailController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoDetailController.cs"
index e192624..5ba62cd 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoDetailController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoDetailController.cs"
@@ -31,5 +31,10 @@
return Json(result);
}
+ [HttpPost, Route("LockOrUpLockStockDetail")]
+ public Task<WebResponseContent> LockOrUpLockStockDetail([FromBody]SaveModel saveModel)
+ {
+ return Service.LockOrUpLockStockDetail(saveModel);
+ }
}
}
--
Gitblit v1.9.3