From aa8d8f14e56996e419e82359d4b852a98f6c06cd Mon Sep 17 00:00:00 2001
From: zgq <519541279@qq.com>
Date: 星期三, 07 七月 2021 15:13:28 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-LayUI
---
WebTM/views/模治具管理/模治具仓库管理/Sc_MouldScrapInBillList.html | 248 +++++++++++++++++++++++++++++++++++--------------
WebTM/layuiadmin/Scripts/webConfig.js | 2
2 files changed, 178 insertions(+), 72 deletions(-)
diff --git a/WebTM/layuiadmin/Scripts/webConfig.js b/WebTM/layuiadmin/Scripts/webConfig.js
index 34475e5..ba41122 100644
--- a/WebTM/layuiadmin/Scripts/webConfig.js
+++ b/WebTM/layuiadmin/Scripts/webConfig.js
@@ -6,7 +6,7 @@
//var WEBURL = "http://101.37.171.70/API/"; //鍏徃鏈嶅姟鍣�
//var WEBURL = "http://localhost:8080/API/"; //棰滄檽鍐涙湰鍦伴厤缃�
//var WEBURL = "http://localhost:8082/lubao"; //棰滄檽鍐涙湰鍦伴厤缃�
- //var WEBURL = "http://localhost:8082/LuBaoAPI/"; //鏉ㄩ湶鏈湴閰嶇疆
+ var WEBURL = "http://localhost:8082/LuBaoAPI/"; //鏉ㄩ湶鏈湴閰嶇疆
//var WEBURL = "http://10.1.4.154/API/"; //姹熶赴瀹㈡埛
//var WEBURL = "http://10.1.4.155/API/"; //姹熶赴瀹㈡埛NEW
var WEBURL = "http://47.96.97.237/API/"; //鏅轰簯鏈嶅姟鍣�
diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldScrapInBillList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldScrapInBillList.html"
index dc042fd..8fcd554 100644
--- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldScrapInBillList.html"
+++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldScrapInBillList.html"
@@ -89,8 +89,8 @@
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit"><i class="layui-icon layui-icon-radio"></i>瀹℃牳</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeAudit"><i class="layui-icon layui-icon-circle"></i>鍙嶅鏍�</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Print"><i class="layui-icon layui-icon-circle"></i>棰勮</button>
-
-
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Cell"><i class="layui-icon layui-icon-ok"></i>淇濆瓨鍒楀</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-RefreshCell"><i class="layui-icon layui-icon-refresh"></i>榛樿鍒楀</button>
</div>
</script>
@@ -104,7 +104,9 @@
<script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
<script src="../../../layuiadmin/Scripts/webConfig.js"></script>
<script>
+
var DataList;
+ var Name = "MouldScrapInHouseCellWidth";
layui.config({
base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
}).extend({
@@ -121,81 +123,96 @@
, util = layui.util
//鏌ヨ鏉′欢
var sWhere = "";
+ var columns = [
+ { type: 'checkbox', fixed: 'left' }
+ , { field: 'hmainid', title: '鍗曟嵁ID', width: 200, hide: true }
+ , { field: '鏃ユ湡', title: '鏃ユ湡', width: 200, totalRowText: '鍚堣', templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
+ , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 200 }
+ , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', width: 200 }
+ , { field: 'HManagerID', title: 'HManagerID', width: 200, hide: true }
+ , { field: '璐熻矗浜轰唬鐮�', title: '璐熻矗浜轰唬鐮�', width: 200 }
+ , { field: '璐熻矗浜哄悕绉�', title: '璐熻矗浜哄悕绉�', width: 200 }
+ , { field: 'HWHID', title: 'HWHID', width: 200, hide: true }
+ , { field: '浠撳簱浠g爜', title: '浠撳簱浠g爜', width: 200 }
+ , { field: '浠撳簱鍚嶇О', title: '浠撳簱鍚嶇О', width: 200 }
+ , { field: 'HSecManagerID', title: 'HSecManagerID', width: 200, hide: true }
+ , { field: '楠屾敹鍛樹唬鐮�', title: '楠屾敹鍛樹唬鐮�', width: 200 }
+ , { field: '楠屾敹鍛樺悕绉�', title: '楠屾敹鍛樺悕绉�', width: 200 }
+ , { field: 'HKeeperID', title: 'HKeeperID', width: 200, hide: true }
+ , { field: '淇濈鍛樹唬鐮�', title: '淇濈鍛樹唬鐮�', width: 200 }
+ , { field: '淇濈鍛樺悕绉�', title: '淇濈鍛樺悕绉�', width: 200 }
+ , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
+ , { field: '閮ㄩ棬浠g爜', title: '閮ㄩ棬浠g爜', width: 200 }
+ , { field: '閮ㄩ棬鍚嶇О', title: '閮ㄩ棬鍚嶇О', width: 200 }
+ , { field: '鎽樿', title: '鎽樿', width: 200 }
+ , { field: '鍐呴儴鍗曟嵁鍙�', title: '鍐呴儴鍗曟嵁鍙�', width: 200 }
+ , { field: '澶囨敞', title: '澶囨敞', width: 200 }
+ , { field: 'hsubid', title: 'hsubid', width: 200, hide: true }
+ , { field: 'HMaterID', title: 'HMaterID', width: 200, hide: true }
+ , { field: '妯″叿浠g爜', title: '妯″叿浠g爜', width: 200 }
+ , { field: '妯″叿鍚嶇О', title: '妯″叿鍚嶇О', width: 200 }
+ , { field: 'HPropertyID', title: 'HPropertyID', width: 200, hide: true }
+ , { field: '杈呭姪灞炴�т唬鐮�', title: '杈呭姪灞炴�т唬鐮�', width: 200 }
+ , { field: '杈呭姪灞炴�у悕绉�', title: '杈呭姪灞炴�у悕绉�', width: 200 }
+ , { field: 'HSecUnitID', title: 'HSecUnitID', width: 200, hide: true }
+ , { field: '杈呭姪璁¢噺鍗曚綅浠g爜', title: '杈呭姪璁¢噺鍗曚綅浠g爜', width: 200 }
+ , { field: '杈呭姪璁¢噺鍗曚綅鍚嶇О', title: '杈呭姪璁¢噺鍗曚綅鍚嶇О', width: 200 }
+ , { field: '鎹㈢畻鐜�', title: '鎹㈢畻鐜�', width: 200 }
+ , { field: '鎵规', title: '鎵规', width: 200 }
+ , { field: '瀹炴敹鏁伴噺', title: '瀹炴敹鏁伴噺', width: 200, totalRow: true }
+ , { field: '鍗曚环', title: '鍗曚环', width: 200 }
+ , { field: '閲戦', title: '閲戦', width: 200 }
+ , { field: '璁捐瀵垮懡', title: '璁捐瀵垮懡', width: 200 }
+ , { field: '浣跨敤瀵垮懡', title: '浣跨敤瀵垮懡', width: 200 }
+ , { field: '鍓╀綑瀵垮懡', title: '鍓╀綑瀵垮懡', width: 200 }
+ , { field: 'HWHID1', title: 'HWHID1', width: 200, hide: true }
+ , { field: '鏀舵枡浠撳簱浠g爜', title: '鏀舵枡浠撳簱浠g爜', width: 200 }
+ , { field: '鏀舵枡浠撳簱鍚嶇О', title: '鏀舵枡浠撳簱鍚嶇О', width: 200 }
+ , { field: 'HSPID', title: 'HSPID', width: 200, hide: true }
+ , { field: '浠撲綅浠g爜', title: '浠撲綅浠g爜', width: 200 }
+ , { field: '浠撲綅鍚嶇О', title: '浠撲綅鍚嶇О', width: 200 }
+ , { field: '瀛愬娉�', title: '瀛愬娉�', width: 200 }
+ , { field: '鍒跺崟浜�', title: '鍒跺崟浜�', width: 200 }
+ , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 200, templet: "<div>{{d.鍒跺崟鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+ , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', width: 200 }
+ , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 200, templet: "<div>{{d.瀹℃牳鏃ユ湡 ==null ? '':layui.util.toDateString(d.瀹℃牳鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+ , { field: '淇敼浜�', title: '淇敼浜�', width: 200 }
+ , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 200, templet: "<div>{{d.淇敼鏃ユ湡 ==null ?'':layui.util.toDateString(d.淇敼鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+ , { field: '鍏抽棴浜�', title: '鍏抽棴浜�', width: 200 }
+ , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 200, templet: "<div>{{d.鍏抽棴鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍏抽棴鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+ , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 200 }
+ , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 200, templet: "<div>{{d.浣滃簾鏃ユ湡 ==null ?'':layui.util.toDateString(d.浣滃簾鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+ , { field: '鍏宠仈鏁伴噺', title: '鍏宠仈鏁伴噺', width: 200 }
+ , { field: '琛屽叧闂汉', title: '琛屽叧闂汉', width: 200 }
+ , { field: '鍏抽棴绫诲瀷', title: '鍏抽棴绫诲瀷', width: 200 }
+ , { field: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓诲唴鐮�', width: 200, hide: true }
+ , { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�', width: 200, hide: true }
+ , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 200 }
+ , { field: '婧愬崟绫诲瀷', title: '婧愬崟绫诲瀷', width: 200 }
+ ];
+ var newColumns = [];
+ var colWidth = getColumnsWidth();
+ if (colWidth == "" || colWidth == []) {
+
+ }
+ else
+ {
+ $.each(columns, function (x, m) {
+ m["width"] = colWidth[x];
+ });
+ }
+
+
+
var option = {
elem: '#mainTable'
, toolbar: '#toolbarDemo'
, page: true
- , cellMinWidth: 90
+ , cellMinWidth: 120
, totalRow: true
- ,limit: 10
- , cols: [[
- { type: 'checkbox', fixed: 'left' }
- , { field: 'hmainid', title: '鍗曟嵁ID', hide: true }
- , { field: '鏃ユ湡', title: '鏃ユ湡', width: 160, totalRowText: '鍚堣', templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
- , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 160 }
- , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', width: 160 }
- , { field: 'HManagerID', title: 'HManagerID', width: 200, hide: true }
- , { field: '璐熻矗浜轰唬鐮�', title: '璐熻矗浜轰唬鐮�', width: 200 }
- , { field: '璐熻矗浜哄悕绉�', title: '璐熻矗浜哄悕绉�', width: 200 }
- , { field: 'HWHID', title: 'HWHID', width: 200, hide: true }
- , { field: '浠撳簱浠g爜', title: '浠撳簱浠g爜', width: 200 }
- , { field: '浠撳簱鍚嶇О', title: '浠撳簱鍚嶇О', width: 200 }
- , { field: 'HSecManagerID', title: 'HSecManagerID', width: 200, hide: true }
- , { field: '楠屾敹鍛樹唬鐮�', title: '楠屾敹鍛樹唬鐮�', width: 200 }
- , { field: '楠屾敹鍛樺悕绉�', title: '楠屾敹鍛樺悕绉�', width: 200 }
- , { field: 'HKeeperID', title: 'HKeeperID', width: 200, hide: true }
- , { field: '淇濈鍛樹唬鐮�', title: '淇濈鍛樹唬鐮�', width: 200 }
- , { field: '淇濈鍛樺悕绉�', title: '淇濈鍛樺悕绉�', width: 200 }
- , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
- , { field: '閮ㄩ棬浠g爜', title: '閮ㄩ棬浠g爜', width: 115 }
- , { field: '閮ㄩ棬鍚嶇О', title: '閮ㄩ棬鍚嶇О', width: 200 }
- , { field: '鎽樿', title: '鎽樿', width: 200 }
- , { field: '鍐呴儴鍗曟嵁鍙�', title: '鍐呴儴鍗曟嵁鍙�', width: 115 }
- , { field: '澶囨敞', title: '澶囨敞', width: 200 }
- , { field: 'hsubid', title: 'hsubid', width: 200, hide: true }
- , { field: 'HMaterID', title: 'HMaterID', width: 200, hide: true }
- , { field: '妯″叿浠g爜', title: '妯″叿浠g爜', width: 200 }
- , { field: '妯″叿鍚嶇О', title: '妯″叿鍚嶇О', width: 200 }
- , { field: 'HPropertyID', title: 'HPropertyID', width: 200, hide: true }
- , { field: '杈呭姪灞炴�т唬鐮�', title: '杈呭姪灞炴�т唬鐮�', width: 200 }
- , { field: '杈呭姪灞炴�у悕绉�', title: '杈呭姪灞炴�у悕绉�', width: 200 }
- , { field: 'HSecUnitID', title: 'HSecUnitID', width: 200, hide: true }
- , { field: '杈呭姪璁¢噺鍗曚綅浠g爜', title: '杈呭姪璁¢噺鍗曚綅浠g爜', width: 200 }
- , { field: '杈呭姪璁¢噺鍗曚綅鍚嶇О', title: '杈呭姪璁¢噺鍗曚綅鍚嶇О', width: 200 }
- , { field: '鎹㈢畻鐜�', title: '鎹㈢畻鐜�', width: 200 }
- , { field: '鎵规', title: '鎵规', width: 200 }
- , { field: '瀹炴敹鏁伴噺', title: '瀹炴敹鏁伴噺', width: 200, totalRow: true }
- , { field: '鍗曚环', title: '鍗曚环', width: 200 }
- , { field: '閲戦', title: '閲戦', width: 200 }
- , { field: '璁捐瀵垮懡', title: '璁捐瀵垮懡', width: 200 }
- , { field: '浣跨敤瀵垮懡', title: '浣跨敤瀵垮懡', width: 200 }
- , { field: '鍓╀綑瀵垮懡', title: '鍓╀綑瀵垮懡', width: 200 }
- , { field: 'HWHID1', title: 'HWHID1', width: 200, hide: true }
- , { field: '鏀舵枡浠撳簱浠g爜', title: '鏀舵枡浠撳簱浠g爜', width: 200 }
- , { field: '鏀舵枡浠撳簱鍚嶇О', title: '鏀舵枡浠撳簱鍚嶇О', width: 200 }
- , { field: 'HSPID', title: 'HSPID', width: 200, hide: true }
- , { field: '浠撲綅浠g爜', title: '浠撲綅浠g爜', width: 200 }
- , { field: '浠撲綅鍚嶇О', title: '浠撲綅鍚嶇О', width: 200 }
- , { field: '瀛愬娉�', title: '瀛愬娉�', width: 200 }
- , { field: '鍒跺崟浜�', title: '鍒跺崟浜�', width: 200 }
- , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 200, templet: "<div>{{d.鍒跺崟鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
- , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', width: 200 }
- , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 200, templet: "<div>{{d.瀹℃牳鏃ユ湡 ==null ? '':layui.util.toDateString(d.瀹℃牳鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
- , { field: '淇敼浜�', title: '淇敼浜�', width: 200 }
- , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 200, templet: "<div>{{d.淇敼鏃ユ湡 ==null ?'':layui.util.toDateString(d.淇敼鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
- , { field: '鍏抽棴浜�', title: '鍏抽棴浜�', width: 200 }
- , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 200, templet: "<div>{{d.鍏抽棴鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍏抽棴鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
- , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 200 }
- , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 200, templet: "<div>{{d.浣滃簾鏃ユ湡 ==null ?'':layui.util.toDateString(d.浣滃簾鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
- , { field: '鍏宠仈鏁伴噺', title: '鍏宠仈鏁伴噺', width: 200 }
- , { field: '琛屽叧闂汉', title: '琛屽叧闂汉', width: 200 }
- , { field: '鍏抽棴绫诲瀷', title: '鍏抽棴绫诲瀷', width: 200 }
- , { field: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓诲唴鐮�', width: 200, hide: true }
- , { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�', width: 200, hide: true }
- , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 200 }
- , { field: '婧愬崟绫诲瀷', title: '婧愬崟绫诲瀷', width: 200 }
- ]]
+ , limit: 10
+ , cols: [columns]
, done: function (res, curr, count) {
//鐒跺悗鎶婂�煎啓涓婂幓td[data-field="itemNo" 瀹氫箟鍦ㄥ摢涓垪鍚庢樉绀�
@@ -217,6 +234,8 @@
// }))
//})
+
+
}
};
var index = layer.load(0);
@@ -393,6 +412,66 @@
layer.msg('璇烽�夋嫨涓�琛屾暟鎹弽瀹℃牳锛�');
}
break;
+ case 'btn-Cell': //淇濆瓨鍒楀
+ var arr = [];
+ // 鍒楁暟
+ var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
+ for (var i = 0; i <= colNum; i++)
+ {
+ var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text();
+ var colWidth = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).width();
+ if (colName != "" && colName != null)
+ {
+ arr.push(colWidth == -1 ? 200 : colWidth);
+ }
+ }
+ arr.unshift(40); //棣栦綅杩藉姞
+ $.ajax({
+ url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth',
+ async: true,
+ type: "POST",
+ dataType: "json",
+ data: { "myMap": JSON.stringify(arr), "Name": Name},
+ success: function (data1) {
+ if (data1.count == 1) {
+ layer.alert(data1.Message, { icon: 1 });
+ } else {
+ layer.alert(data1.Message, { icon: 5 });
+ }
+ }, error: function (e) {
+ layer.alert(e.Message, { icon: 5 });
+ }
+ });
+ break;
+ case 'btn-RefreshCell': //榛樿鍒楀
+ var arr = [];
+ // 鍒楁暟
+ var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
+ for (var i = 0; i <= colNum; i++) {
+ var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text();
+ if (colName != "" && colName != null) {
+ arr.push(200); //榛樿瀹藉害200
+ }
+ }
+ arr.unshift(40); //棣栦綅杩藉姞
+
+ $.ajax({
+ url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth',
+ async: true,
+ type: "POST",
+ dataType: "json",
+ data: { "myMap": JSON.stringify(arr), "Name": Name },
+ success: function (data1) {
+ if (data1.count == 1) {
+ layer.alert(data1.Message, { icon: 1 });
+ } else {
+ layer.alert(data1.Message, { icon: 5 });
+ }
+ }, error: function (e) {
+ layer.alert(e.Message, { icon: 5 });
+ }
+ });
+ break;
};
});
@@ -516,7 +595,34 @@
//浠ヤ笂鏄痩ayui妯″潡
});
+ function getColumnsWidth() {
+ var result = [];
+ var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
+ //鑾峰彇鍒楀
+ $.ajax({
+ url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidthList',
+ async: false,
+ type: "Get",
+ dataType: "json",
+ data: { "colNum": colNum, "Name": Name },
+ success: function (data1) {
+ if (data1.code == 1) {
+ result = data1.data;
+ }
+ else if (data1.code == -1)
+ {
+ }
+ else {
+ layer.alert(data1.Message, { icon: 5 });
+ }
+ }, error: function (e) {
+ layer.alert(e.Message, { icon: 5 });
+ }
+ });
+
+ return result;
+ }
</script>
--
Gitblit v1.9.1