From 13b91828a0301ba53585662f5207ed45ff485638 Mon Sep 17 00:00:00 2001
From: bklLiudl <673013083@qq.com>
Date: 星期二, 27 八月 2024 09:00:28 +0800
Subject: [PATCH] 库存统计重写
---
HTML/views/StatisticalReport/InventoryStatistics.html | 170 ++++++++++++++++++++------------------------------------
1 files changed, 60 insertions(+), 110 deletions(-)
diff --git a/HTML/views/StatisticalReport/InventoryStatistics.html b/HTML/views/StatisticalReport/InventoryStatistics.html
index 23cecbc..366acfa 100644
--- a/HTML/views/StatisticalReport/InventoryStatistics.html
+++ b/HTML/views/StatisticalReport/InventoryStatistics.html
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
- <title>搴撳瓨淇℃伅鍒楄〃</title>
+ <title>搴撳瓨缁熻</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
@@ -19,13 +19,13 @@
</style>
<script>
// 杩欓噷鏄渶瑕佸湪椤甸潰娓叉煋涔嬪墠鎵ц鐨勪唬鐮�
- document.addEventListener("DOMContentLoaded", function() {
+ document.addEventListener("DOMContentLoaded", function () {
//鑾峰彇table榛樿鏄剧ず鏁�
pageCntFirst();
//鍒ゆ柇鏄惁寮�鍚痶able鍒楄〃鍒楀璋冩暣鍔熻兘銆�
GetIsSetColW();
});
- </script>
+ </script>
</head>
@@ -97,7 +97,7 @@
class="layui-input">
</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;">
@@ -131,7 +131,7 @@
<option value="0">寰呰川妫�</option><!-- 寰呮楠� -->
<option value="1">妫�楠屽悎鏍�</option><!-- 鍚堟牸鍝� -->
<option value="2">涓嶅悎鏍�</option><!-- 涓嶅悎鏍� -->
- <option value="3">鏀剧疆鏈�</option><!-- 涓嶅悎鏍� -->
+ <!-- <option value="3">鏀剧疆鏈�</option>涓嶅悎鏍� -->
</select>
</div>
</div>
@@ -172,16 +172,16 @@
<div class="layui-tab-content">
<!-- <div class="layui-tab-item layui-show"> -->
- <div class="position-relative"><!-- class="position-relative" --><!-- 鑷畾涔夎〃澶村姞涓� -->
- <table id="LAY-app-content-list" lay-filter="LAY-app-content-list"></table>
- <!-- #region 鑷畾涔夎〃澶� -->
- <div class="headerSetIcon">
- <button class="layui-btn layui-btn-primary layui-btn-sm" data-type="customCols">
- <i class="layui-icon"></i>
- </button>
- </div>
- <!-- #endregion -->
+ <div class="position-relative"><!-- class="position-relative" --><!-- 鑷畾涔夎〃澶村姞涓� -->
+ <table id="LAY-app-content-list" lay-filter="LAY-app-content-list"></table>
+ <!-- #region 鑷畾涔夎〃澶� -->
+ <div class="headerSetIcon">
+ <button class="layui-btn layui-btn-primary layui-btn-sm" data-type="customCols">
+ <i class="layui-icon"></i>
+ </button>
</div>
+ <!-- #endregion -->
+ </div>
</div>
</div>
@@ -285,96 +285,46 @@
// 琛ㄥ崟闇�瑕佺殑鍙橀噺
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: 'Status',title: '搴撳瓨鐘舵��',align: 'center',templet: '#buttonTpl'},
- {field: 'InspectStatus',title: '璐ㄦ鐘舵��',align: 'center',templet: '#buttonTp2'},
- {field: 'Qty',title: '搴撳瓨鏁伴噺',align: 'center',totalRow: true},
- {field: 'LockQty',title: '閿佸畾鏁伴噺',align: 'center',totalRow: true},
- {field: 'FrozenQty',title: '鍐荤粨鏁伴噺',align: 'center',totalRow: true},
- {field: 'InspectQty',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: 'Status', title: '搴撳瓨鐘舵��', align: 'center', templet: '#buttonTpl' },
+ { field: 'InspectStatus', title: '璐ㄦ鐘舵��', align: 'center', templet: '#buttonTp2' },
+ { field: 'Qty', title: '搴撳瓨鏁伴噺', align: 'center', totalRow: true },
+ { field: 'LockQty', title: '閿佸畾鏁伴噺', align: 'center', totalRow: true },
+ { field: 'FrozenQty', title: '鍐荤粨鏁伴噺', align: 'center', totalRow: true },
+ { field: 'InspectQty', title: '鍙娊妫�鏁伴噺', align: 'center', totalRow: true },
+ ]];
+ var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜
//#endregion
//鑾峰彇鎬婚噺淇℃伅
- function refreshTable(SelectType,SkuNo,SkuName,OwnerNo,OwnerName,LotNo,Status,InspectStatus) {
+ function refreshTable(SelectType, SkuNo, SkuName, OwnerNo, OwnerName, LotNo, Status, InspectStatus) {
//#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',
- height: h1,
+ height: 'full-163',
id: 'LAY-app-content-list',
totalRow: true,
page: true,
@@ -382,21 +332,21 @@
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
};
var param = {
- SelectType:SelectType, //鏌ヨ绫诲瀷
- SkuNo:SkuNo, //鐗╂枡鍙�
- SkuName:SkuName, //鐗╂枡鍚嶇О
- OwnerNo:OwnerNo, //璐т富缂栫爜
- OwnerName:OwnerName, //璐т富鍚嶇О
- LotNo:LotNo, //鎵规鍙�
- Status:Status, //搴撳瓨鐘舵�� = $("#Status").val();
- InspectStatus:InspectStatus, //璐ㄦ鐘舵�� = $("#InspectStatus").val();
+ SelectType: SelectType, //鏌ヨ绫诲瀷
+ SkuNo: SkuNo, //鐗╂枡鍙�
+ SkuName: SkuName, //鐗╂枡鍚嶇О
+ OwnerNo: OwnerNo, //璐т富缂栫爜
+ OwnerName: OwnerName, //璐т富鍚嶇О
+ LotNo: LotNo, //鎵规鍙�
+ Status: Status, //搴撳瓨鐘舵�� = $("#Status").val();
+ InspectStatus: InspectStatus, //璐ㄦ鐘舵�� = $("#InspectStatus").val();
};
sendData(IP + "/Statistical/GetInventoryList", param, 'get', function (res) {
console.log(res)
@@ -419,8 +369,8 @@
});
});
//#endregion
- }
-
+ }
+
//鐩戝惉鎼滅储
form.on('submit(LAY-app-contlist-search)', function (data) {
var SelectType = $("#SelectType").val();
@@ -431,7 +381,7 @@
var OwnerName = $("#OwnerName").val();
var Status = $("#Status").val();
var InspectStatus = $("#InspectStatus").val();
- refreshTable(SelectType,SkuNo, SkuName,OwnerNo,OwnerName,LotNo,Status,InspectStatus);
+ refreshTable(SelectType, SkuNo, SkuName, OwnerNo, OwnerName, LotNo, Status, InspectStatus);
});
@@ -467,18 +417,18 @@
//#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']
});
}
};
- $('.layui-btn').on('click', function() {
+ $('.layui-btn').on('click', function () {
var type = $(this).data('type');
active[type] ? active[type].call(this) : '';
});
--
Gitblit v1.8.0