From 842c9a82b6a9d8d80d370cbf6dedbd2302ba5fab Mon Sep 17 00:00:00 2001
From: Administrator <Administrator@DESKTOP-5BIMHQ3>
Date: 星期一, 24 六月 2024 16:58:34 +0800
Subject: [PATCH] 统计报表-托盘明细增加添加托盘库存明细功能;修改问题
---
HTML/views/StatisticalReport/BoxInfor.html | 86 ++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 84 insertions(+), 2 deletions(-)
diff --git a/HTML/views/StatisticalReport/BoxInfor.html b/HTML/views/StatisticalReport/BoxInfor.html
index c836bcb..c1b8bc1 100644
--- a/HTML/views/StatisticalReport/BoxInfor.html
+++ b/HTML/views/StatisticalReport/BoxInfor.html
@@ -191,6 +191,29 @@
<p>鏄�</p>
{{# } }}
</script>
+ <script type="text/html" id="InspectPalletStatus">
+ {{# function GetBtn11(d){
+ var html = ``;
+ if(d.PalletStatus=='0'){
+ html = `鍑�妗禶;
+ } else if(d.PalletStatus=='1') {
+ html = `棰勬贩`;
+ } else if(d.PalletStatus=='2') {
+ html = `鍗婃垚鍝乣;
+ }else if(d.PalletStatus=='3') {
+ html = `鑴忔《`;
+ }
+ return html;
+ }
+ }}
+ {{ GetBtn11(d) }}
+ </script>
+ <script type="text/html" id="toolbarDemo">
+
+ <button class="layui-btn layuiadmin-btn-list layui-btn-sm addClass" lay-event="add">
+ <i class="layui-icon"></i>娣诲姞
+ </button>
+ </script>
</div>
</div>
</div>
@@ -320,10 +343,11 @@
var TotalColsArr = [[
{field: '',title: '搴忓彿',type:'numbers',align: 'center',fixed: 'left', "disabled": true},
{field: 'WareHouseName', title: '鎵�灞炰粨搴�', align: 'center'},
- {field: 'RoadwayName', title: '鎵�灞炲贩閬�', align: 'center'},
+ //{field: 'RoadwayName', title: '鎵�灞炲贩閬�', align: 'center'},
{field: 'AreaName', title: '鎵�灞炲尯鍩�', align: 'center'},
{field: 'LocatNo', title: '鍌ㄤ綅鍦板潃', align: 'center'},
{field: 'PalletNo', title: '鎵樼洏鍙�', align: 'center'},
+ {field: 'PalletStatus', title: '鎵樼洏绫诲埆', align: 'center', templet: '#InspectPalletStatus'},
{field: 'SkuNo', title: '鐗╂枡缂栫爜', align: 'center'},
{field: 'SkuName', title: '鐗╂枡鍚嶇О', align: 'center'},
//{field: 'OwnerNo',title: '璐т富缂栫爜',align: 'center'},
@@ -366,6 +390,8 @@
limit: pageCnt,
limits: pageLimits,
even: true,
+ toolbar: '#toolbarDemo',
+ defaultToolbar: [''], //'print', 'exports'
cellMinWidth: 80, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板
done: function(){
//鑷畾涔夊垪瀹�
@@ -411,7 +437,63 @@
});
});
//#endregion
- }
+ }
+
+ //澶村伐鍏锋爮浜嬩欢
+ table.on('toolbar(LAY-app-content-list)', function (obj) {
+ var checkStatus = table.checkStatus(obj.config.id);
+ if (obj.event == "add") {
+ layer.open({
+ type: 2,
+ title: '娣诲姞鎵樼洏搴撳瓨鏄庣粏',
+ content: 'PalletAddFrom.html',
+ maxmin: true,
+ area: ['530px', '530px'],
+ btn: ['纭畾', '鍙栨秷'],
+ yes: function(index, layero) {
+ var iframeWindow = window['layui-layer-iframe' + index],
+ submitID = 'layuiadmin-app-form-submit',
+ submit = layero.find('iframe').contents().find('#' + submitID);
+ //鐩戝惉鎻愪氦
+ iframeWindow.layui.form.on('submit(' + submitID + ')', function(data) {
+ var field = data.field; //鑾峰彇鎻愪氦鐨勫瓧娈�
+ //鎻愪氦 Ajax 鎴愬姛鍚庯紝闈欐�佹洿鏂拌〃鏍间腑鐨勬暟鎹�
+ var param = {
+ PalletNo:field.PalletNo,//鎵樼洏鐮�
+ WareHouseNo: field.WareHouseNo, //鎵�灞炰粨搴�
+ AreaNo: field.AreaNo, //鎵�灞炲尯鍩�
+ LocatNo:field.LocatNo,//鎵�灞炲偍浣�
+ PalletStatus: field.PalletStatus, //鎵樼洏绫诲埆
+ };
+ if(doing){
+ doing = false;
+ sendData(IP + "/Statistical/InsertStockDetail", param, 'post',function(res) {
+ console.log(res);
+ if (res.code == 0) { //鎴愬姛
+ layer.msg(res.msg, {
+ icon: 1,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function() {
+ layer.close(index); //鍏抽棴寮瑰眰
+ refreshTable("","","","","","","","","","","","","","");
+ doing = true;
+ });
+ }
+ else
+ { //涓嶆垚鍔�
+ layer.msg(res.msg, {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function() {doing = true;});
+ }
+ });
+ }
+ });
+ submit.trigger('click');
+ }
+ });
+ }
+ });
//鐩戝惉鎼滅储
form.on('submit(LAY-app-contlist-search)', function(data) {
--
Gitblit v1.8.0