From 527f2222ec9b268e5429326417a37a81bdaf5037 Mon Sep 17 00:00:00 2001
From: Administrator <Administrator@DESKTOP-5BIMHQ3>
Date: 星期四, 04 七月 2024 10:17:53 +0800
Subject: [PATCH] 修改问题
---
HTML/views/StatisticalReport/BoxInfor.html | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 101 insertions(+), 4 deletions(-)
diff --git a/HTML/views/StatisticalReport/BoxInfor.html b/HTML/views/StatisticalReport/BoxInfor.html
index c836bcb..5270be7 100644
--- a/HTML/views/StatisticalReport/BoxInfor.html
+++ b/HTML/views/StatisticalReport/BoxInfor.html
@@ -157,10 +157,10 @@
<button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit lay-filter="LAY-app-contlist-search">
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>鎼滅储
</button>
- <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit
+ <!-- <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit
lay-filter="daochu">
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>瀵煎嚭
- </button>
+ </button> -->
</div>
</div>
</div>
@@ -191,6 +191,40 @@
<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="InspectStatus1">
+ {{# if(d.InspectStatus == '0') { }}
+ <p>寰呮楠�</p>
+ {{# } else if(d.InspectStatus == '1'){ }}
+ <p>妫�楠屽悎鏍�</p>
+ {{# } else if(d.InspectStatus == '2'){ }}
+ <p>涓嶅悎鏍�</p>
+ {{# } else if(d.InspectStatus == '4') { }}
+ <p>鏀剧疆鏈�</p>
+ {{# } }}
+ </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 +354,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'},
@@ -336,6 +371,7 @@
{field: 'Qty', title: '鏁伴噺', align: 'center'},
{field: 'LockQty', title: '閿佸畾鏁伴噺', align: 'center',},
{field: 'FrozenQty', title: '鍐荤粨鏁伴噺', align: 'center'},
+ {field: 'InspectStatus', title: '璐ㄦ鐘舵��', align: 'center', templet: '#InspectStatus1'},
//{field: 'InspectMark', title: '鎶芥鏍囪', align: 'center', templet: '#InspectMarkStatus'},
//{field: 'BitPalletMark', title: '闆舵墭鏍囪', align: 'center', templet: '#BitPalletMarkStatus'},
]];
@@ -366,6 +402,8 @@
limit: pageCnt,
limits: pageLimits,
even: true,
+ toolbar: '#toolbarDemo',
+ defaultToolbar: [''], //'print', 'exports'
cellMinWidth: 80, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板
done: function(){
//鑷畾涔夊垪瀹�
@@ -411,7 +449,66 @@
});
});
//#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, //鎵樼洏绫诲埆
+ SkuNo:field.SkuNo,
+ SkuName:field.SkuName,
+ LotNo:field.LotNo
+ };
+ 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