From 33cc8de8a39b88d619cce6e80f13564a85e5dce0 Mon Sep 17 00:00:00 2001
From: 18516761980 <56479841@qq.com>
Date: 星期二, 02 八月 2022 13:00:18 +0800
Subject: [PATCH] #
---
src/main/webapp/views/pakStore/outStockDetail.html | 72 ++++++++++++++++++++++++++++++++---
1 files changed, 65 insertions(+), 7 deletions(-)
diff --git a/src/main/webapp/views/pakStore/outStockDetail.html b/src/main/webapp/views/pakStore/outStockDetail.html
index 76d6039..352fba7 100644
--- a/src/main/webapp/views/pakStore/outStockDetail.html
+++ b/src/main/webapp/views/pakStore/outStockDetail.html
@@ -21,12 +21,18 @@
<option value="">璇烽�夋嫨绔欑偣</option>
</select>
</div>
- <button class="layui-btn layui-btn-sm" style="display: inline-block" id="btn-outbound" lay-event="outbound"
- onclick="outbound()">鍚姩鍑哄簱
- </button>
+<!-- <button class="layui-btn layui-btn-sm" style="display: inline-block" id="btn-outbound" lay-event="outbound"-->
+<!-- onclick="outbound()">鍚姩鍑哄簱-->
+<!-- </button>-->
</div>
<table class="layui-hide" id="stockOut" lay-filter="stockOut"></table>
</div>
+
+<script type="text/html" id="toolbar">
+ <div class="layui-btn-container">
+ <button class="layui-btn" id="btn-confirm" lay-event="outbound" style="">鍚姩鍑哄簱</button>
+ </div>
+</script>
<script type="text/template" id="takeSiteSelectTemplate">
{{#each data}}
@@ -48,9 +54,10 @@
function getCol() {
var cols = [
- {field: '', align: 'center', title: '', width: 50, type: 'numbers'}
- , {field: 'locNo$', align: 'center', title: '搴撲綅鍙�'}
- , {field: 'matnr', align: 'center',title: '鐗╂枡缂栫爜'}
+ {type: 'checkbox'}
+ ,{field: '', align: 'center', title: '', width: 50, type: 'numbers'}
+ ,{field: 'locNo$', align: 'center', title: '搴撲綅鍙�'}
+ ,{field: 'matnr', align: 'center',title: '鐗╂枡缂栫爜'}
,{field: 'maktx', align: 'center',title: '鐗╂枡鍚嶇О', width: 500}
,{field: 'lgnum', align: 'center',title: '瑙勬牸'}
,{field: 'type', align: 'center',title: '鐗╂枡绫诲埆'}
@@ -80,6 +87,7 @@
limit: 9999,
limits: [9999],
even: true,
+ toolbar: '#toolbar',
// cellMinWidth: 50,
cols: [getCol()],
request: {
@@ -99,7 +107,7 @@
if (res.code === 403) {
top.location.href = baseUrl + "/";
}
- locData = res.data;
+ // locData = res.data;
}
});
@@ -122,6 +130,56 @@
}
}
});
+
+ // 鐩戝惉澶村伐鍏锋爮浜嬩欢
+ table.on('toolbar(stockOut)', function (obj) {
+ var checkStatus = table.checkStatus(obj.config.id);
+ locData = checkStatus.data;
+ switch(obj.event) {
+ case 'outbound':
+ if (locData.length === 0){
+ layer.msg("璇烽�夋嫨鏁版嵁");
+ return;
+ }
+ debugger;
+ var staNo = $("#staNoSelect").val();
+ if (staNo === "" || staNo === null){
+ layer.msg("璇烽�夋嫨鍑哄簱鍙�");
+ return;
+ }
+ var locDetls = [];
+ locData.forEach(function(elem) {
+ if (elem.anfme > 0) {
+ locDetls.push({locNo: elem.locNo, matnr: elem.matnr, count: elem.anfme});
+ }
+ });
+ let param = {
+ outSite: staNo,
+ locDetls: locDetls,
+ fbillNo: orderData.fbillNo,
+ }
+ // 璋冪敤鍑哄簱鎺ュ彛
+ $.ajax({
+ url: baseUrl+"/plate/outStock/start",
+ headers: {'token': localStorage.getItem('token')},
+ data: JSON.stringify(param),
+ contentType:'application/json;charset=UTF-8',
+ method: 'POST',
+ success: function (res) {
+ if (res.code === 200){
+ parent.closeDetail(res.msg);
+ parent.tableReload();
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ } else {
+ layer.msg(res.msg)
+ }
+ }
+ });
+ break;
+ }
+ });
+
});
/* 鍚姩鍑哄簱 */
--
Gitblit v1.9.1