From 2816415f539ef54839e331657edae7055c243ad8 Mon Sep 17 00:00:00 2001
From: chen.llin <1442464845@qq.comm>
Date: 星期六, 17 一月 2026 19:27:45 +0800
Subject: [PATCH] agv缓存库位清空和标记功能
---
src/main/webapp/static/js/locCache/locCache.js | 73 ++++++++++++++++++++++++++++++++++++
1 files changed, 72 insertions(+), 1 deletions(-)
diff --git a/src/main/webapp/static/js/locCache/locCache.js b/src/main/webapp/static/js/locCache/locCache.js
index e9f2228..7158c29 100644
--- a/src/main/webapp/static/js/locCache/locCache.js
+++ b/src/main/webapp/static/js/locCache/locCache.js
@@ -36,7 +36,7 @@
, { field: 'appeTime$', align: 'center', title: '娣诲姞鏃堕棿', hide: true }
, { field: 'frozen', align: 'center', title: '鏄惁鍐荤粨', hide: true }
, { field: 'frozenMemo', align: 'center', title: '鍐荤粨澶囨敞', hide: true }
- , { fixed: 'right', title: '鎿嶄綔', align: 'center', toolbar: '#operate', width: 200 }]
+ , { fixed: 'right', title: '鎿嶄綔', align: 'center', toolbar: '#operate', width: 350 }]
],
request: {
pageName: 'curr', pageSize: 'limit'
@@ -144,6 +144,12 @@
break;
case "del":
del([data.id]);
+ break;
+ case "clearLoc":
+ clearLocation(data);
+ break;
+ case "setInStock":
+ setInStock(data);
break;
}
});
@@ -320,6 +326,71 @@
layDateRender();
+ // 娓呯┖搴撲綅
+ function clearLocation(data) {
+ layer.confirm('纭娓呯┖搴撲綅锛�' + data.locNo + '锛�', {
+ skin: 'layui-layer-admin', shade: .1
+ }, function (i) {
+ layer.close(i);
+ var loadIndex = layer.load(2);
+ $.ajax({
+ url: baseUrl + "/locCache/lockOrUnlock/auth",
+ headers: { 'token': localStorage.getItem('token') },
+ data: {
+ locNo: data.locNo,
+ lock: false // false琛ㄧず瑙i攣/娓呯┖
+ },
+ method: 'POST',
+ success: function (res) {
+ layer.close(loadIndex);
+ if (res.code === 200) {
+ layer.msg(res.msg || '娓呯┖搴撲綅鎴愬姛', { icon: 1 });
+ tableReload();
+ } else if (res.code === 403) {
+ top.location.href = baseUrl + "/";
+ } else {
+ layer.msg(res.msg || '娓呯┖搴撲綅澶辫触', { icon: 2 });
+ }
+ }
+ })
+ });
+ }
+
+ // 鏀逛负鏈夎揣鐘舵��
+ function setInStock(data) {
+ layer.prompt({
+ title: '璇烽�夋嫨婊℃墭/绌烘墭',
+ formType: 2,
+ content: '<div style="padding: 20px;"><label><input type="radio" name="fullPlt" value="true" checked> 婊℃墭</label><br><br><label><input type="radio" name="fullPlt" value="false"> 绌烘墭</label></div>',
+ area: ['300px', '200px']
+ }, function(value, index, elem){
+ var fullPlt = $(elem).find('input[name="fullPlt"]:checked').val() === 'true';
+ layer.close(index);
+ var loadIndex = layer.load(2);
+ $.ajax({
+ url: baseUrl + "/locCache/lockOrUnlock/auth",
+ headers: { 'token': localStorage.getItem('token') },
+ data: {
+ locNo: data.locNo,
+ lock: true, // true琛ㄧず閿佸畾/鏀逛负鏈夎揣
+ fullPlt: fullPlt
+ },
+ method: 'POST',
+ success: function (res) {
+ layer.close(loadIndex);
+ if (res.code === 200) {
+ layer.msg(res.msg || '鏀逛负鏈夎揣鐘舵�佹垚鍔�', { icon: 1 });
+ tableReload();
+ } else if (res.code === 403) {
+ top.location.href = baseUrl + "/";
+ } else {
+ layer.msg(res.msg || '鏀逛负鏈夎揣鐘舵�佸け璐�', { icon: 2 });
+ }
+ }
+ })
+ });
+ }
+
});
// 鍏抽棴鍔ㄤ綔
--
Gitblit v1.9.1