From d1ecbc098962cfdcb1cf58abc06d16592fb3ce22 Mon Sep 17 00:00:00 2001
From: zhaowc <526854230@qq.com>
Date: 星期五, 17 一月 2025 15:36:46 +0800
Subject: [PATCH] 1楼空托盘垛出库禁止AGV拉货
---
HTML/views/StatisticalReport/InventoryStatistics.html | 569 +++++++++++++++++++++++++++++---------------------------
1 files changed, 292 insertions(+), 277 deletions(-)
diff --git a/HTML/views/StatisticalReport/InventoryStatistics.html b/HTML/views/StatisticalReport/InventoryStatistics.html
index cee3e63..35c5693 100644
--- a/HTML/views/StatisticalReport/InventoryStatistics.html
+++ b/HTML/views/StatisticalReport/InventoryStatistics.html
@@ -19,13 +19,13 @@
</style>
<script>
// 杩欓噷鏄渶瑕佸湪椤甸潰娓叉煋涔嬪墠鎵ц鐨勪唬鐮�
- document.addEventListener("DOMContentLoaded", function() {
+ document.addEventListener("DOMContentLoaded", function () {
//鑾峰彇table榛樿鏄剧ず鏁�
pageCntFirst();
//鍒ゆ柇鏄惁寮�鍚痶able鍒楄〃鍒楀璋冩暣鍔熻兘銆�
GetIsSetColW();
});
- </script>
+ </script>
</head>
@@ -51,6 +51,30 @@
</div>
</div>
<div class="layui-inline mingxi">
+ <label class="layui-form-label" style="width: 60px;">杩涘巶缂栧彿</label>
+ <div class="layui-input-inline" style="width: 170px; margin-right: 0px;">
+ <input type="text" id="LotNo" name="LotNo" placeholder="杩涘巶缂栧彿" autocomplete="off"
+ class="layui-input">
+ </div>
+ </div>
+
+
+ <div class="layui-inline">
+ <!-- 绫诲瀷 -->
+ <label class="layui-form-label" style="width: 60px;">鐗╂枡绫诲瀷</label>
+ <div class="layui-input-inline">
+ <select name="Type" id="Type" lay-verify="" lay-verify="" lay-search>
+ <option value=""></option>
+ <option value="0">鍘熻緟鏂�</option>
+ <option value="1">鍖呮潗</option>
+ <option value="2">鎴愬搧</option>
+ <option value="3">鑰楁潗</option>
+ <option value="4">涓棿鍝�</option>
+ </select>
+ </div>
+ </div>
+
+ <div class="layui-inline mingxi">
<label class="layui-form-label" style="width: 60px;">璐т富缂栫爜</label>
<div class="layui-input-inline" style="width: 170px; margin-right: 0px;">
<input type="text" id="OwnerNo" name="OwnerNo" placeholder="璐т富缂栫爜" autocomplete="off"
@@ -64,11 +88,28 @@
class="layui-input">
</div>
</div>
- <div class="layui-inline mingxi">
- <label class="layui-form-label" style="width: 60px;">鎵规鍙�</label>
- <div class="layui-input-inline" style="width: 170px; margin-right: 0px;">
- <input type="text" id="LotNo" name="LotNo" placeholder="鎵规鍙�" autocomplete="off"
- class="layui-input">
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 60px;">鎵�灞炰粨搴�</label>
+ <div class="layui-input-inline">
+ <select name="WareHouseNo" id="WareHouseNo" lay-filter="getWareHouseNo" lay-search>
+ <option value=""></option>
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 60px;">鎵�灞炲尯鍩�</label>
+ <div class="layui-input-inline">
+ <select name="AreaNo" id="AreaNo" lay-filter="getAreaNo" lay-search>
+ <option value=""></option>
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 60px;">閫昏緫搴撳尯</label>
+ <div class="layui-input-inline">
+ <select name="CategoryNo" id="CategoryNo" lay-filter="getCategoryNo" lay-search>
+ <option value=""></option>
+ </select>
</div>
</div>
<div class="layui-inline mingxi">
@@ -85,7 +126,18 @@
class="layui-input">
</div>
</div>
-
+ <div class="layui-inline zhijian">
+ <label class="layui-form-label" style="width: 60px;">璐ㄦ鐘舵��</label>
+ <div class="layui-input-inline" style="width: 170px; margin-right: 0px;">
+ <select name="InspectStatus" id="InspectStatus" lay-filter="InspectStatus" lay-search>
+ <option value=""></option>
+ <option value="0">寰呰川妫�</option><!-- 寰呮楠� -->
+ <option value="1">妫�楠屽悎鏍�</option><!-- 鍚堟牸鍝� -->
+ <option value="2">涓嶅悎鏍�</option><!-- 涓嶅悎鏍� -->
+ <option value="3">鏀剧疆鏈�</option><!-- 涓嶅悎鏍� -->
+ </select>
+ </div>
+ </div>
<div class="layui-inline ">
<label class="layui-form-label" style="width: 60px;">搴撳瓨鐘舵��</label>
<div class="layui-input-inline" style="width: 170px; margin-right: 0px;">
@@ -100,54 +152,16 @@
</select>
</div>
</div>
- <!-- <div class="layui-inline " style="display: none;">
- <label class="layui-form-label" style="width: 60px;">鎶芥鎵�</label>
- <div class="layui-input-inline" style="width: 170px; margin-right: 0px;">
- <select name="IsSamolingTray" id="IsSamolingTray" lay-filter="IsSamolingTray"
- lay-search>
- <option value=""></option>
- <option value="0">鍚�</option>
- <option value="1">鏄�</option>
- </select>
- </div>
- </div> -->
- <div class="layui-inline zhijian">
- <label class="layui-form-label" style="width: 60px;">璐ㄦ鐘舵��</label>
- <div class="layui-input-inline" style="width: 170px; margin-right: 0px;">
- <select name="InspectStatus" id="InspectStatus" lay-filter="InspectStatus" lay-search>
- <option value=""></option>
- <option value="0">寰呰川妫�</option><!-- 寰呮楠� -->
- <option value="1">妫�楠屽悎鏍�</option><!-- 鍚堟牸鍝� -->
- <option value="2">涓嶅悎鏍�</option><!-- 涓嶅悎鏍� -->
- <option value="3">鏀剧疆鏈�</option><!-- 涓嶅悎鏍� -->
- </select>
- </div>
- </div>
- <!-- <div class="layui-inline zhijian">
- <label class="layui-form-label" style="width: 60px;">寮�濮嬫椂闂�</label>
- <div class="layui-input-inline" style="width: 170px; margin-right: 0px;">
- <input type="text" autocomplete="off" id="StartTime" class="layui-input"
- placeholder="寮�濮嬫椂闂�">
- </div>
- </div>
- <div class="layui-inline zhijian">
- <label class="layui-form-label" style="width: 60px;">缁撴潫鏃堕棿</label>
- <div class="layui-input-inline" style="width: 170px; margin-right: 0px;">
- <input type="text" autocomplete="off" id="EndTime" class="layui-input"
- placeholder="缁撴潫鏃堕棿">
- </div>
- </div> -->
+
<div class="layui-inline sousuo">
<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 lay-filter="daochu">
- <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>瀵煎嚭
+ <i class="layui-icon layui-icon-edit layuiadmin-button-btn"></i>瀵煎嚭
</button>
</div>
-
-
</div>
</div>
@@ -180,13 +194,14 @@
<table id="LAY-app-content-list2" lay-filter="LAY-app-content-list2"></table>
<!-- #region 鑷畾涔夎〃澶� -->
<div class="headerSetIcon">
- <button class="layui-btn layui-btn-primary layui-btn-sm" data-type="customCols2">
+ <button class="layui-btn layui-btn-primary layui-btn-sm"
+ data-type="customCols2">
<i class="layui-icon"></i>
</button>
</div>
<!-- #endregion -->
- <!-- #region 鑷畾涔夎〃澶� -->
+ <!-- #region 鑷畾涔夎〃澶� -->
<script type="text/html" id="templetCompleteTime">
{{# function GetBtn(d){
return formatDate(d.CompleteTime);
@@ -235,6 +250,20 @@
{{# } else { }}
<button class="layui-btn layui-btn-radius layui-btn-danger layui-btn-xs">寮傚父</button>
{{# } }}
+ </script>
+
+ <script type="text/html" id="SkuType">
+ {{# if(d.Type=='0'){ }}
+ <p>鍘熸枡</p>
+ {{# } else if(d.Type=='1') { }}
+ <p>鍖呮潗</p>
+ {{# } else if(d.Type=='2') { }}
+ <p>鎴愬搧</p>
+ {{# } else if(d.Type=='3') { }}
+ <p>鑰楁潗</p>
+ {{# } else if(d.Type=='4') { }}
+ <p>涓棿鍝�</p>
+ {{# } }}
</script>
</div>
</div>
@@ -296,93 +325,43 @@
var $ = layui.$;
var yemianid = 0;
- refreshTable("", "");
+ refreshTable("", "", "", "", "");
// 琛ㄥ崟闇�瑕佺殑鍙橀噺
var infoOptions;
- //#region 鍘熷闈炶嚜瀹氫箟鍒�
- //infoOptions = {
- // elem: '#LAY-app-content-list',
- // height: 'full-206',
- // id: 'LAY-app-content-list',
- // totalRow: true
- // page: true,
- // limit: pageCnt,
- // limits: pageLimits,
- // even: true,
- // cellMinWidth: 80, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板
- // cols:
- // [[
- // {
- // title: '搴忓彿',
- // type: 'numbers',
- // fixed: 'left'
- // },
- // {
- // field: 'SkuNo',
- // title: '鐗╂枡缂栫爜',
- // align: 'center',
- // totalRowText: "鍚堣:",
- // }, {
- // field: 'SkuName',
- // title: '鐗╂枡鍚嶇О',
- // align: 'center',
- // }, {
- // field: 'Standard',
- // title: '鐗╂枡瑙勬牸',
- // align: 'center',
- // }, {
- // field: 'Qty',
- // title: '搴撳瓨鏁伴噺',
- // align: 'center',
- // totalRow: true,
- // }, {
- // field: 'LockQty',
- // title: '閿佸畾鏁伴噺',
- // align: 'center',
- // totalRow: true,
- // }, {
- // field: 'FrozenQty',
- // title: '鍐荤粨鏁伴噺',
- // align: 'center',
- // totalRow: true,
- // }
- // ]]
- //};
- //#endregion
//#region 鑷畾涔夎〃澶�
var TotalColsArr = [[
- {field: '',title: '搴忓彿',type:'numbers',align: 'center',fixed: 'left', "disabled": true},
- {field: 'SkuNo',title: '鐗╂枡缂栫爜',align: 'center',totalRowText: "鍚堣:", "disabled": true},
- {field: 'SkuName',title: '鐗╂枡鍚嶇О',align: 'center', "disabled": true},
- {field: 'Standard',title: '鐗╂枡瑙勬牸',align: 'center', "disabled": true},
- {field: 'LotNo',title: '鎵规鍙�',align: 'center', "disabled": true},
- {field: 'LotText',title: '鎵规鎻忚堪',align: 'center'},
- {field: 'OwnerNo',title: '璐т富缂栫爜',align: 'center'},
- {field: 'OwnerName',title: '璐т富鍚嶇О',align: 'center'},
- {field: 'Qty',title: '搴撳瓨鏁伴噺',align: 'center',totalRow: true},
- {field: 'LockQty',title: '閿佸畾鏁伴噺',align: 'center',totalRow: true},
- {field: 'FrozenQty',title: '鍐荤粨鏁伴噺',align: 'center',totalRow: true}
- ]];
- var TotalColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜
+ { field: '', title: '搴忓彿', type: 'numbers', align: 'center', fixed: 'left', "disabled": true },
+ { field: 'SkuNo', title: '鐗╂枡缂栫爜', align: 'center', totalRowText: "鍚堣:", "disabled": true },
+ { field: 'SkuName', title: '鐗╂枡鍚嶇О', align: 'center', "disabled": true },
+ { field: 'Standard', title: '鐗╂枡瑙勬牸', align: 'center', "disabled": true },
+ { field: 'LotNo', title: '杩涘巶缂栧彿', align: 'center', "disabled": true },
+ { field: 'LotText', title: '鎵规鎻忚堪', align: 'center' },
+ { field: 'OwnerNo', title: '璐т富缂栫爜', align: 'center' },
+ { field: 'OwnerName', title: '璐т富鍚嶇О', align: 'center' },
+ { field: 'Qty', title: '搴撳瓨鏁伴噺', align: 'center', totalRow: true },
+ { field: 'LockQty', title: '閿佸畾鏁伴噺', align: 'center', totalRow: true },
+ { field: 'FrozenQty', title: '鍐荤粨鏁伴噺', align: 'center', totalRow: true }
+ ]];
+ var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜
//#endregion
//鑾峰彇鎬婚噺淇℃伅
- function refreshTable() {
+ function refreshTable(SkuNo, SkuName, OwnerNo, OwnerName, LotNo) {
//#region 鑷畾涔夎〃澶�
var colsJson
- var param1={
- Href:'Statistical/GetInventoryList'
+ var param1 = {
+ Href: 'Statistical/GetInventoryList'
};
- sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function(res) {
- if (res.code == 0){
- if(res.data=='' || res.data==undefined || res.data==null){
- colsJson=TotalColsArr
- }else{
- colsJson= eval(res.data);
+ sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function (res) {
+ if (res.code == 0) {
+ if (res.data == '' || res.data == undefined || res.data == null) {
+ colsJson = TotalColsArr
+ } else {
+ colsJson = eval(res.data);
}
- }else{
- colsJson=TotalColsArr
+ } else {
+ colsJson = TotalColsArr
}
infoOptions = {
elem: '#LAY-app-content-list',
@@ -394,14 +373,20 @@
limits: pageLimits,
even: true,
cellMinWidth: 80, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板
- done: function(){
+ done: function () {
//鑷畾涔夊垪瀹�
- SetTableColW('LAY-app-content-list','Statistical/GetInventoryList',TotalColsSysArr);
- },
- cols:colsJson
+ SetTableColW('LAY-app-content-list', 'Statistical/GetInventoryList', TotalColsSysArr);
+ },
+ cols: colsJson
};
-
- sendData(IP + "/Statistical/GetInventoryList?SkuNo=" + $("#SkuNo").val() + "&&SkuName=" + $("#SkuName").val() + "&&OwnerNo=" + $("#OwnerNo").val()+ "&&OwnerName=" + $("#OwnerName").val()+"&&LotNo=" + $("#LotNo").val(), {}, 'get', function (res) {
+ var param = {
+ SkuNo: SkuNo, //鐗╂枡鍙�
+ SkuName: SkuName, //鐗╂枡鍚嶇О
+ OwnerNo: OwnerNo, //璐т富缂栫爜
+ OwnerName: OwnerName, //璐т富鍚嶇О
+ LotNo: LotNo, //杩涘巶缂栧彿
+ };
+ sendData(IP + "/Statistical/GetInventoryList", param, 'get', function (res) {
console.log(res)
if (res.code == 0) { //鎴愬姛
var list = res.data;
@@ -422,136 +407,51 @@
});
});
//#endregion
- }
+ }
// 琛ㄥ崟闇�瑕佺殑鍙橀噺
var infoOptions2;
- //#region 鍘熷闈炶嚜瀹氫箟鍒�
- //infoOptions2 = {
- // elem: '#LAY-app-content-list2',
- // height: 'full-206',
- // id: 'LAY-app-content-list2',
- // page: true,
- // limit: pageCnt,
- // limits: pageLimits,
- // even: true,
- // cellMinWidth: 80, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板
- // cols:
- // [[
- // {
- // field: 'PalletNo',
- // title: '鎵樼洏鍙�',
- // align: 'center',
- // width: 110,
- // }, {
- // field: 'LocatNo',
- // title: '鍌ㄤ綅鍦板潃',
- // align: 'center',
- // width: 100,
- // }, {
- // field: 'RoadwayName',
- // title: '鎵�灞炲贩閬�',
- // width: 90,
- // align: 'center',
- // }, {
- // field: 'WareHouseName',
- // title: '鎵�灞炰粨搴�',
- // width: 90,
- // align: 'center',
- // }, {
- // field: 'SkuNo',
- // title: '鐗╂枡缂栫爜',
- // width: 100,
- // align: 'center',
- // }, {
- // field: 'SkuName',
- // title: '鐗╂枡鍚嶇О',
- // align: 'center',
- // }, {
- // field: 'Standard',
- // title: '鐗╂枡瑙勬牸',
- // width: 130,
- // align: 'center',
- // }, {
- // field: 'LotNo',
- // title: '鎵规鍙�',
- // align: 'center',
- // }, {
- // field: 'Qty',
- // title: '搴撳瓨鏁伴噺',
- // width: 110,
- // align: 'center',
- // }, {
- // field: 'LockQty',
- // title: '閿佸畾鏁伴噺',
- // width: 110,
- // align: 'center',
- // },
- // {
- // field: 'Status',
- // templet: '#buttonTpl',
- // title: '搴撳瓨鐘舵��',
- // width: 90,
- // align: 'center',
- // }, {
- // field: 'InspectStatus',
- // templet: '#buttonTp2',
- // title: '璐ㄦ鐘舵��',
- // width: 90,
- // align: 'center',
- // },
- // {
- // field: 'CompleteTime',
- // title: '鍏ュ簱鏃堕棿',
- // align: 'center',
- // width: 150,
- // templet: function (d) {
- // return formatDate(d.CompleteTime);
- // },
- // },
- // ]]
- //};
- //#endregion
//鑾峰彇鏄庣粏淇℃伅
//#region 鑷畾涔夎〃澶�
var DetailColsArr = [[
- {field: 'PalletNo',title: '鎵樼洏鍙�',align: 'center',width: 110,},
- {field: 'LocatNo',title: '鍌ㄤ綅鍦板潃',align: 'center',width: 100,},
- {field: 'WareHouseName',title: '鎵�灞炰粨搴�',width: 90,align: 'center'},
- {field: 'RoadwayName',title: '鎵�灞炲贩閬�',width: 90,align: 'center'},
- {field: 'AreaName',title: '鎵�灞炲尯鍩�',width: 90,align: 'center'},
- {field: 'SkuNo',title: '鐗╂枡缂栫爜',width: 100,align: 'center'},
- {field: 'SkuName',title: '鐗╂枡鍚嶇О',align: 'center'},
- {field: 'Standard',title: '鐗╂枡瑙勬牸',width: 130,align: 'center'},
- {field: 'LotNo',title: '鎵规鍙�',align: 'center'},
- {field: 'OwnerNo',title: '璐т富缂栫爜',align: 'center'},
- {field: 'OwnerName',title: '璐т富鍚嶇О',align: 'center'},
- {field: 'SupplierNo',title: '渚涘簲鍟嗙紪鐮�',align: 'center'},
- {field: 'SupplierName',title: '渚涘簲鍟嗗悕绉�',align: 'center'},
- {field: 'Qty',title: '搴撳瓨鏁伴噺',width: 110,align: 'center'},
- {field: 'LockQty',title: '閿佸畾鏁伴噺',width: 110,align: 'center'},
- {field: 'Status',templet: '#buttonTpl',title: '搴撳瓨鐘舵��',width: 90,align: 'center'},
- {field: 'InspectStatus',templet: '#buttonTp2',title: '璐ㄦ鐘舵��',width: 90,align: 'center'},
- {field: 'CompleteTime',title: '鍏ュ簱鏃堕棿',align: 'center',width: 150,templet: '#templetCompleteTime'},
- ]];
- var DetailColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜
+ { field: 'PalletNo', title: '鎵樼洏鍙�', align: 'center', width: 110, },
+ { field: 'LocatNo', title: '鍌ㄤ綅鍦板潃', align: 'center', width: 100, },
+ { field: 'WareHouseName', title: '鎵�灞炰粨搴�', width: 90, align: 'center' },
+ { field: 'RoadwayName', title: '鎵�灞炲贩閬�', width: 90, align: 'center' },
+ { field: 'AreaName', title: '鎵�灞炲尯鍩�', width: 90, align: 'center' },
+ { field: 'SkuNo', title: '鐗╂枡缂栫爜', width: 100, align: 'center' },
+ { field: 'SkuName', title: '鐗╂枡鍚嶇О', align: 'center' },
+ { field: 'Standard', title: '鐗╂枡瑙勬牸', width: 130, align: 'center' },
+ { field: 'Type', title: '鐗╂枡绫诲瀷', width: 130, align: 'center', templet: '#SkuType' },
+ { field: 'LotNo', title: '杩涘巶缂栧彿', align: 'center' },
+ { field: 'OwnerNo', title: '璐т富缂栫爜', align: 'center' },
+ { field: 'OwnerName', title: '璐т富鍚嶇О', align: 'center' },
+ { field: 'SupplierNo', title: '鐢熶骇鍟嗙紪鐮�', align: 'center' },
+ { field: 'SupplierName', title: '鐢熶骇鍟嗗悕绉�', align: 'center' },
+ { field: 'Qty', title: '搴撳瓨鏁伴噺', width: 110, align: 'center' },
+ { field: 'LockQty', title: '閿佸畾鏁伴噺', width: 110, align: 'center' },
+ { field: 'Status', templet: '#buttonTpl', title: '搴撳瓨鐘舵��', width: 90, align: 'center' },
+ { field: 'InspectStatus', templet: '#buttonTp2', title: '璐ㄦ鐘舵��', width: 90, align: 'center' },
+ { field: 'CompleteTime', title: '鍏ュ簱鏃堕棿', align: 'center', width: 150, templet: '#templetCompleteTime' },
+ ]];
+ var DetailColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜
//#endregion
- function refreshTable2(sku,lotNo) {
+ function refreshTable2(SkuNo, SkuName, OwnerNo, OwnerName, LotNo, LocatNo, PalletNo, Status, InspectStatus, HouseNo, AreaNo,CategoryNo, Type) {
//#region 鑷畾涔夎〃澶�
var colsJson2
- var param1={
- Href:'Statistical/GetInventoryList1'
+ var param1 = {
+ Href: 'Statistical/GetInventoryList1'
};
- sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function(res) {
- if (res.code == 0){
- if(res.data=='' || res.data==undefined || res.data==null){
- colsJson2=DetailColsArr
- }else{
- colsJson2= eval(res.data);
+ sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function (res) {
+ if (res.code == 0) {
+ if (res.data == '' || res.data == undefined || res.data == null) {
+ colsJson2 = DetailColsArr
+ } else {
+ colsJson2 = eval(res.data);
}
- }else{
- colsJson2=DetailColsArr
+ } else {
+ colsJson2 = DetailColsArr
}
infoOptions2 = {
elem: '#LAY-app-content-list2',
@@ -562,14 +462,28 @@
limits: pageLimits,
even: true,
cellMinWidth: 80, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板
- done: function(){
+ done: function () {
//鑷畾涔夊垪瀹�
- SetTableColW('LAY-app-content-list2','Statistical/GetInventoryList1',DetailColsSysArr);
- },
- cols:colsJson2
+ SetTableColW('LAY-app-content-list2', 'Statistical/GetInventoryList1', DetailColsSysArr);
+ },
+ cols: colsJson2
};
-
- sendData(IP + "/Statistical/GetInventoryList1?SkuNo=" + sku + "&&SkuName=" + $("#SkuName").val() + "&&LotNo=" + lotNo + "&&LocatNo=" + $("#LocatNo").val() + "&&PalletNo=" + $("#PalletNo").val() + "&&Status=" + $("#Status").val() + "&&InspectStatus=" + $("#InspectStatus").val()+ "&&OwnerNo=" + $("#OwnerNo").val()+ "&&OwnerName=" + $("#OwnerName").val(), {}, 'get', function (res) {
+ var param = {
+ SkuNo: SkuNo, //鐗╂枡鍙�
+ SkuName: SkuName, //鐗╂枡鍚嶇О
+ OwnerNo: OwnerNo, //璐т富缂栫爜
+ OwnerName: OwnerName, //璐т富鍚嶇О
+ LotNo: LotNo, //杩涘巶缂栧彿
+ LocatNo: LocatNo,//鍌ㄤ綅鍦板潃
+ PalletNo: PalletNo, //鎵樼洏鍙�
+ Status: Status,//搴撳瓨鐘舵��
+ InspectStatus: InspectStatus, //璐ㄦ鐘舵��
+ HouseNo: HouseNo,
+ AreaNo: AreaNo, // 鎵�灞炲尯鍩�
+ CategoryNo:CategoryNo, //閫昏緫搴撳尯
+ Type: Type,
+ };
+ sendData(IP + "/Statistical/GetInventoryList1", param, 'get', function (res) {
if (res.code == 0) //鎴愬姛
{
var list = res.data;
@@ -592,14 +506,10 @@
});
//#endregion
}
-
- //var url = IP + "/Statistical/GetInventoryList1";
-
-
//鎺ュ彈鍏ㄥ眬鍙橀噺
let quanSkuNo = '';
- let quanLotNo='';
+ let quanLotNo = '';
//鐩戝惉鎼滅储
form.on('submit(LAY-app-contlist-search)', function (data) {
var SkuNo = $("#SkuNo").val();
@@ -611,14 +521,20 @@
var OwnerName = $("#OwnerName").val();
var Status = $("#Status").val();
var InspectStatus = $("#InspectStatus").val();
+ var HouseNo = $("#WareHouseNo").val(); // 鎵�灞炰粨搴�
+ var AreaNo = $("#AreaNo").val(); // 鎵�灞炲尯鍩�
+ var CategoryNo =$("#CategoryNo").val();
+ var Type = $("#Type").val(); // 鐗╂枡绫诲瀷
+
if (yemianid == 0) {
console.log("鎬诲崟");
- refreshTable(SkuNo, SkuName);
+ refreshTable(SkuNo, SkuName, OwnerNo, OwnerName, LotNo);
} else if (yemianid == 1) {
quanSkuNo = '';
- quanLotNo='';
- console.log("鏄庣粏");
- refreshTable2(SkuNo,LotNo);
+ quanLotNo = '';
+ console.log("鏄庣粏33");
+ console.log(HouseNo);
+ refreshTable2(SkuNo, SkuName, OwnerNo, OwnerName, LotNo, LocatNo, PalletNo, Status, InspectStatus, HouseNo, AreaNo,CategoryNo, Type);
}
});
@@ -630,21 +546,34 @@
$('.layui-tab-content .layui-tab-item').eq(1).attr('class', 'layui-tab-item layui-show')
console.log(obj);
quanSkuNo = obj.data.SkuNo;
- quanLotNo=obj.data.lotNo;
- refreshTable2(obj.data.SkuNo,obj.data.LotNo);
+ quanLotNo = obj.data.lotNo;
+ refreshTable2(obj.data.SkuNo, "", "", "", obj.data.LotNo);
yemianid = 1;
});
//鐩戝惉Tab鍒囨崲锛屼互鏀瑰彉鍦板潃hash鍊�
element.on('tab(docDemoTabBrief)', function (data) {
+ var SkuNo = $("#SkuNo").val();
+ var SkuName = $("#SkuName").val();
+ var LotNo = $("#LotNo").val();
+ var LocatNo = $("#LocatNo").val();
+ var PalletNo = $("#PalletNo").val();
+ var OwnerNo = $("#OwnerNo").val();
+ var OwnerName = $("#OwnerName").val();
+ var Status = $("#Status").val();
+ var InspectStatus = $("#InspectStatus").val();
+ var HouseNo = $("#WareHouseNo").val(); // 鎵�灞炰粨搴�
+ var AreaNo = $("#AreaNo").val(); // 鎵�灞炲尯鍩�
+ var CategoryNo = $("#CategoryNo").val();
+ var Type = $("#Type").val(); // 鐗╂枡绫诲瀷
console.log(data.index);
yemianid = data.index
if (yemianid == 0) {
console.log("鎬诲崟");
- refreshTable(SkuNo, SkuName);
+ refreshTable(SkuNo, SkuName, OwnerNo, OwnerName, LotNo);
} else if (yemianid == 1) {
- console.log("鏄庣粏");
- refreshTable2(quanSkuNo,quanLotNo);
+ console.log("鏄庣粏11");
+ refreshTable2(SkuNo, SkuName, OwnerNo, OwnerName, LotNo, LocatNo, PalletNo, Status, InspectStatus, HouseNo, AreaNo,CategoryNo, Type);
}
});
@@ -676,7 +605,7 @@
}
});
} else if (yemianid == 1) {
- console.log("鏄庣粏");
+ console.log("鏄庣粏22");
var SkuNo = $("#SkuNo").val();
if (SkuNo == '') {
SkuNo = quanSkuNo;
@@ -717,24 +646,23 @@
});
- //#region 鑷畾涔夎〃澶�
- //鑷畾涔夎〃澶�
+ //#region 鑷畾涔夎〃澶�
active = {
- customCols: function(){
+ customCols: function () {
layer.open({
type: 2,
title: '鑷畾涔夊垪',
- content: '../SystemSettings/HeaderSetting.html?Href=Statistical/GetInventoryList&ColsSysArr='+TotalColsSysArr,
+ content: '../SystemSettings/HeaderSetting.html?Href=Statistical/GetInventoryList&ColsSysArr=' + TotalColsSysArr,
maxmin: false,
resize: false,
area: ['970px', '650px']
});
},
- customCols2: function(){
+ customCols2: function () {
layer.open({
type: 2,
title: '鑷畾涔夊垪',
- content: '../SystemSettings/HeaderSetting.html?Href=Statistical/GetInventoryList1&ColsSysArr='+DetailColsSysArr,
+ content: '../SystemSettings/HeaderSetting.html?Href=Statistical/GetInventoryList1&ColsSysArr=' + DetailColsSysArr,
maxmin: false,
resize: false,
area: ['970px', '650px']
@@ -742,12 +670,99 @@
}
};
- $('.layui-btn').on('click', function() {
+ $('.layui-btn').on('click', function () {
var type = $(this).data('type');
active[type] ? active[type].call(this) : '';
});
//#endregion
+ // 鍒濆缁戝畾鎵�灞炰粨搴�
+ sendData(IP + "/Sys/GetWarehouseDic", {}, 'get', function (res) {
+ if (res.code == 0) { //鎴愬姛
+ for (var i = 0; i < res.data.length; i++) {
+ $("#WareHouseNo").append('<option value =' + res.data[i].WareHouseNo + '>' + res.data[i].WareHouseNo + '-' +
+ res.data[i].WareHouseName + '</option>');
+ }
+ form.render('select');
+ } else { //涓嶆垚鍔�
+ layer.msg(res.msg, {
+ icon: 2,
+ time: 2000
+ }, function () { });
+ }
+ });
+
+ getAR("");
+ form.on('select(getWareHouseNo)', function (data) {
+ console.log(data);
+ getAR(data.value);
+ });
+ function getAR(val) {
+ //鑾峰彇 宸烽亾涓嬫媺妗�
+ sendData(IP + "/Sys/GetStorageRoadwayByHouseNo?wareHouseNo=" + val, {}, 'get', function (res) {
+ $("#RoadwayNo").empty();
+ $("#RoadwayNo").append('<option value =""></option>');
+ if (res.code == 0) { //鎴愬姛
+ for (var i = 0; i < res.data.length; i++) {
+ $("#RoadwayNo").append('<option value =' + res.data[i].RoadwayNo + '>' + res.data[i].RoadwayNo + '-' +
+ res.data[i].RoadwayName + '</option>');
+ }
+ form.render('select');
+ } else { //涓嶆垚鍔�
+ layer.msg('鑾峰彇宸烽亾淇℃伅澶辫触', {
+ icon: 2,
+ time: 2000
+ }, function () {
+ form.render('select');
+ });
+ }
+ });
+ //鑾峰彇 鍖哄煙涓嬫媺妗�
+ sendData(IP + "/Sys/GetStorageAreaByHouseNo?wareHouseNo=" + val, {}, 'get', function (res) {
+ $("#AreaNo").empty();
+ $("#AreaNo").append('<option value =""></option>');
+ if (res.code == 0) { //鎴愬姛
+ for (var i = 0; i < res.data.length; i++) {
+ $("#AreaNo").append('<option value =' + res.data[i].AreaNo + '>' + res.data[i].AreaNo + '-' +
+ res.data[i].AreaName + '</option>');
+ }
+ form.render('select');
+ } else {
+ layer.msg('鑾峰彇鍖哄煙淇℃伅澶辫触', {
+ icon: 2,
+ time: 2000
+ }, function () {
+
+ form.render('select');
+ });
+ }
+ });
+
+ //鑾峰彇閫昏緫搴撳尯涓嬫媺妗�
+ sendData(IP + "/Sys/GetMaterialCategories?wareHouseNo=" + val, {}, 'get', function (res) {
+ console.log("ret.data:"+res.data[4].CategoryNo)
+ console.log("code:"+res.code)
+ $("#CategoryNo").empty();
+ $("#CategoryNo").append('<option value =""></option>');
+ if (res.code == 1) { //鎴愬姛
+ for (var i = 0; i < res.data.length; i++) {
+ $("#CategoryNo").append('<option value =' + res.data[i].CategoryNo + '>' + res.data[i].CategoryNo + '-' +
+ res.data[i].CategoryName + '</option>');
+ }
+ form.render('select');
+ } else {
+ layer.msg('鑾峰彇鍖哄煙淇℃伅澶辫触', {
+ icon: 2,
+ time: 2000
+ }, function () {
+
+ form.render('select');
+ });
+ }
+ });
+
+ };
+
});
</script>
</body>
--
Gitblit v1.8.0