From b4a8d50e3d97fc9e893b554a60134e4eceb012eb Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期一, 05 一月 2026 08:58:08 +0800
Subject: [PATCH] #
---
src/main/webapp/views/pakStore/outStockNormalDetail.html | 86 +++++++++++++++++++++++++++++++++++++++++-
1 files changed, 83 insertions(+), 3 deletions(-)
diff --git a/src/main/webapp/views/pakStore/outStockNormalDetail.html b/src/main/webapp/views/pakStore/outStockNormalDetail.html
index 937ec75..9836df7 100644
--- a/src/main/webapp/views/pakStore/outStockNormalDetail.html
+++ b/src/main/webapp/views/pakStore/outStockNormalDetail.html
@@ -14,6 +14,18 @@
</head>
<body>
<div>
+ <div style="padding-top: 8px; padding-left: 8px">
+ <div class="layui-form-item">
+ <div class="layui-input-inline">
+ <input id="mnemonic" placeholder="璇疯緭鍏ョ敓浜у崟鍙�" class="layui-input" lay-verify="mnemonic" autocomplete="off">
+ </div>
+ <div id="data-search-btn" style="display: inline-block; margin: 0" class="layui-btn-container layui-form-item">
+ <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit onclick="onSearch()">鎼滅储</button>
+ <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit onclick="reload()">閲嶇疆</button>
+ </div>
+ </div>
+
+ </div>
<div class="layui-form" style="padding-top: 8px; padding-left: 8px">
<button style="margin-bottom: 0px" class="layui-btn layui-btn-sm layui-form-item" style="display: inline-block"
id="outbound" lay-submit
@@ -33,13 +45,14 @@
var orderData = parent.getOrderData();
var locData = [];
var table;
+ var sourceData = [];
function getCol() {
var cols = [
{type: 'checkbox'}
, {field: 'warehouseName', align: 'center', title: '搴撳尯鍚嶇О'}
, {field: 'warehouse', align: 'center', title: '搴撲綅缂栧彿'}
- , {field: 'anfme', align: 'center', title: '鏁伴噺'}
+ , {field: 'anfme', align: 'center', title: '鏁伴噺', edit: 'text'}
];
cols.push.apply(cols, locNormalCols);
cols.push({field: 'modiUser$', align: 'center', title: '淇敼浜哄憳', hide: true}
@@ -81,14 +94,56 @@
if (res.code === 403) {
top.location.href = baseUrl + "/";
}
- locData = res.data;
+ if (res.code === 200) {
+ locData = res.data;
+ sourceData = [];
+ if (res.data && res.data.length > 0) {
+ res.data.map(function (item) {
+ var obj = {
+ anfme: item.anfme,
+ id: item.id,
+ matnr: item.matnr,
+ supplier: item.supplier,
+ mnemonic: item.mnemonic,
+ warehouse: item.warehouse,
+ warehouseName: item.warehouseName,
+ maktx: item.maktx,
+ lgnum: item.lgnum,
+ type: item.type,
+ }
+ sourceData.push(obj);
+ });
+ }
+ }
+ }
+ });
+
+ // 椤甸潰淇敼
+ table.on('edit(stockOut)', function (obj) {
+ if (obj.field === 'anfme') {
+ if (isNaN(obj.value)) {
+ layer.msg("璇疯緭鍏ユ暟瀛�");
+ locDetlTableIns.reload();
+ }
+ // 鍗曞厓鏍肩紪杈戜箣鍓嶇殑鍊艰繘琛屾瘮杈�
+ for (var i = 0; i < sourceData.length; i++) {
+ if (obj.data.id == sourceData[i].id) {
+ if (Number(obj.value) > sourceData[i].anfme) {
+ layer.msg("鏁伴噺涓嶅彲澶т簬搴撳瓨閲�");
+ locDetlTableIns.reload();
+ }
+ }
+ }
+ if (obj.value <= 0) {
+ layer.msg("鏁伴噺涓嶅彲灏忎簬绛変簬闆�");
+ locDetlTableIns.reload();
+ }
}
});
});
/* 鍚姩鍑哄簱 */
function outbound() {
- locData
var checkStatus = table.checkStatus('stockOut');
var checkData = checkStatus.data;
var obj = {
@@ -106,6 +161,7 @@
success: function (res) {
if (res.code === 200) {
parent.closeDetail(res.msg);
+ parent.tableReload();
} else if (res.code === 403) {
top.location.href = baseUrl + "/";
} else {
@@ -119,5 +175,29 @@
}
}
+ function onSearch() {
+ var mnemonic = $("#mnemonic").val();
+ locDetlTableIns.reload({
+ where: {
+ mnemonic: mnemonic,
+ }
+ });
+ }
+
+ function reload() {
+ var mnemonic = ""
+ $("#mnemonic").val(mnemonic);
+ locDetlTableIns.reload({
+ where: {
+ mnemonic: mnemonic,
+ }
+ });
+ }
+
+ $('body').keydown(function () {
+ if (event.keyCode === 13) {
+ onSearch();
+ }
+ });
</script>
</html>
\ No newline at end of file
--
Gitblit v1.9.1