From b742f00aac8e1e1bb628232383c35e67f4a41e4e Mon Sep 17 00:00:00 2001
From: cwjbxqmz <1134865194@qq.com>
Date: 星期五, 26 一月 2024 15:21:28 +0800
Subject: [PATCH] 1
---
WebTM/views/模治具管理/模治具管理/Gy_BarCodeBillList.html | 197 +++++++++++++++++++++++++++++-------------------
1 files changed, 118 insertions(+), 79 deletions(-)
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\347\256\241\347\220\206/Gy_BarCodeBillList.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\347\256\241\347\220\206/Gy_BarCodeBillList.html"
index eb24b8a..f7dfc01 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\347\256\241\347\220\206/Gy_BarCodeBillList.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\347\256\241\347\220\206/Gy_BarCodeBillList.html"
@@ -15,6 +15,8 @@
<script src="../../../layuiadmin/Scripts/webConfig.js"></script>
<script src="../../../layuiadmin/PubCustom.js"></script>
<script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+ <script src="../../../layuiadmin/HideButton.js"></script>
+ <script src="../../../layuiadmin/soulTable.slim.js"></script>
<style type="text/css">
input.layui-input.layui-unselect {
padding-right: 0;
@@ -23,8 +25,8 @@
/* .layui-table-cell {
height: auto;
white-space: normal;
- } */
- </style>
+ } */
+ </style>
</head>
<body>
<div class="layui-fluid">
@@ -90,13 +92,13 @@
<script type="text/html" id="toolbarDemo">
<div class="layui-btn-container">
<!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-getCheckData"><i class="layui-icon layui-icon-tips"></i>棰勮</button>-->
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></i>鍒锋柊</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></i>棰勮</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>鎵撳嵃</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>閫�鍑�</button>
-
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-reload" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></i>鍒锋柊</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-view" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></i>棰勮</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-print" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>鎵撳嵃</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-Delete" lay-event="btn-Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="set_HideColumn" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_HideButton" id="HideButton"><i class="layui-icon layui-icon-form"></i>鎸夐挳璁剧疆</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-exit" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>閫�鍑�</button>
</div>
</script>
</form>
@@ -109,7 +111,7 @@
base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
}).extend({
index: 'lib/index', //涓诲叆鍙fā鍧�
- }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
+ }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () {
var $ = layui.$
, admin = layui.admin
, layer = layui.layer
@@ -119,6 +121,7 @@
, laypage = layui.laypage
, laydate = layui.laydate
, util = layui.util
+ , soulTable = layui.soulTable
//鏌ヨ鏉′欢
var sWhere = "";
var option = [];
@@ -134,40 +137,50 @@
//鍒楄缃�
case 'set_HideColumn': get_HideColumn();
break;
- case 'btn-Delete':
+ case 'btn-Delete':
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;
- if (checkStatus.data.length === 1) {
- var InterID = data[0].hmainid.toString();
- //閫昏緫鍒犻櫎鏂规硶
- layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
- $.ajax({
- type: "GET",
- url: GetWEBURL() + "Gy_MaterialController/DeltetBarCodeBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
- data: { "HInterID": InterID, "user": sessionStorage["HUserName"] },
- success: function (result) {
- if (result.count == 1) {
- layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
- // 寰楀埌frame绱㈠紩
- var index = layer.getFrameIndex(window.name);
- //鍏抽棴褰撳墠frame
- layer.close(index);
- //淇敼涓哄姛鍚庡埛鏂扮晫闈�
- window.location.reload();
- });
+ if (checkStatus.data.length == 0 || checkStatus.data.length > 300) {
+ layer.msg('璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁,涓旈�変腑琛屾暟涓嶈兘瓒呰繃300琛岋紒');
+ return;
+ }
+ var mainid = "";
+ var BarCode = "";
+ for (i = 0; i < data.length; i++) {
+ mainid += data[i].hmainid.toString() + ",";
+ BarCode += data[i].鏉$爜缂栧彿.toString() + ",";
+ }
- } else {
- layer.alert(result.code + result.Message, { icon: 5 });
- }
- }, error: function () {
- layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ mainid = mainid.substring(0, mainid.length - 1)
+ BarCode = BarCode.substring(0, BarCode.length - 1)
+
+ var oData = JSON.stringify(mainid) + ";" + sessionStorage["HUserName"] + ";" + JSON.stringify(BarCode);
+
+ //閫昏緫鍒犻櫎鏂规硶
+ layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
+ $.ajax({
+ type: "POST",
+ url: GetWEBURL() + "Gy_MaterialController/DeltetBarCodeBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "oData": oData },
+ success: function (result) {
+ if (result.count == 1) {
+ layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+ // 寰楀埌frame绱㈠紩
+ var index = layer.getFrameIndex(window.name);
+ //鍏抽棴褰撳墠frame
+ layer.close(index);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ window.location.reload();
+ });
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
}
- });
- })
- }
- else {
- layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
- }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ })
break;
case 'btn-print':
var checkStatus = table.checkStatus('mainTable')
@@ -202,6 +215,12 @@
break;
//閫�鍑烘寜閽�
case 'btn-exit': Pub_Close(2);
+ break;
+ //鎸夐挳璁剧疆
+ case 'set_HideButton':
+ var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+ var HBillType = "鏉$爜涓绘。";
+ get_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
break;
};
});
@@ -274,47 +293,57 @@
, height: 'full-50'
, page: true
, cellMinWidth: 90
- , limits: [50, 500, 5000, 20000]
- , limit: 50
+ , limits: [50, 500, 5000, 20000,50000]
+ , limit: 50
+ , done: function (res, curr, count) {
+ soulTable.render(this);
+ }
, cols: [[
{ type: 'checkbox', fixed: 'left' }
- ,{ field: 'hmainid', title: '鍗曟嵁ID', hide: true }
- , { field: '鏉$爜绫诲瀷', title: '鏉$爜绫诲瀷', width: 160 }
- , { field: '鏉$爜缂栧彿', title: '鏉$爜缂栧彿', width: 160 }
- , { field: 'HMaterID', title: 'HMaterID', width: 160, hide: true }
- , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 200 }
- , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 250 }
- , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 250 }
- , { field: '璁¢噺鍗曚綅浠g爜', title: '璁¢噺鍗曚綅浠g爜', width: 200 }
- , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 200 }
- , { field: 'HAuxPropID', title: 'HAuxPropID', width: 200 }
- , { field: '杈呭姪灞炴�т唬鐮�', title: '杈呭姪灞炴�т唬鐮�', width: 160 }
- , { field: '杈呭姪灞炴��', title: '杈呭姪灞炴��', width: 160 }
- , { field: '鎵瑰彿', title: '鎵瑰彿', width: 160 }
- , { field: '鏁伴噺', title: '鏁伴噺', width: 200 }
- , { field: '璁″垝璺熻釜鍙�', title: '璁″垝璺熻釜鍙�', width: 200 }
- , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 200 }
- , { field: 'HSupID', title: 'HSupID', width: 200, hide: true }
- , { field: '渚涘簲鍟嗕唬鐮�', title: '渚涘簲鍟嗕唬鐮�', width: 200 }
- , { field: '渚涘簲鍟�', title: '渚涘簲鍟�', width: 200 }
- , { field: '杩涙枡鏃ユ湡', title: '杩涙枡鏃ユ湡', width: 200 }
- , { field: '杩涙枡鏃ユ湡鍛�', title: '杩涙枡鏃ユ湡鍛�', width: 115 }
- , { field: '瀹㈡埛鍨嬪彿', title: '瀹㈡埛鍨嬪彿', width: 115 }
- , { field: '寰�鏉ュ崟浣�', title: '寰�鏉ュ崟浣�', width: 200 }
- , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
- , { field: '杞﹂棿', title: '杞﹂棿', width: 115 }
- , { field: '璁″垝瀹屽伐鏃ユ湡', title: '璁″垝瀹屽伐鏃ユ湡', width: 200 }
- , { field: '鎷栧彿', title: '鎷栧彿', width: 200 }
- , { field: '鎬绘墭鏁�', title: '鎬绘墭鏁�', width: 200 }
- , { field: '澶囨敞', title: '澶囨敞', width: 200 }
- , { field: '鍒朵綔浜�', title: '鍒朵綔浜�', width: 115 }
- , { 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: 115 }
- , { field: '鐢熶骇鍏ュ簱鏃ユ湡', title: '鐢熶骇鍏ュ簱鏃ユ湡', width: 200, templet: "<div>{{d.鐢熶骇鍏ュ簱鏃ユ湡 ==null ?'':layui.util.toDateString(d.鐢熶骇鍏ュ簱鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
- , { field: '閿�鍞嚭搴撴棩鏈�', title: '閿�鍞嚭搴撴棩鏈�', width: 200, templet: "<div>{{d.閿�鍞嚭搴撴棩鏈� ==null ?'':layui.util.toDateString(d.閿�鍞嚭搴撴棩鏈�, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
- ]]
+ , { field: 'hmainid', title: '鍗曟嵁ID', hide: true, sort: true }
+ , { field: '鏉$爜绫诲瀷', title: '鏉$爜绫诲瀷', width: 160, sort: true }
+ , { field: '鏉$爜缂栧彿', title: '鏉$爜缂栧彿', width: 160, sort: true }
+ , { field: 'HMaterID', title: 'HMaterID', width: 160, hide: true, sort: true }
+ , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 200, sort: true }
+ , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 250, sort: true }
+ , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 250, sort: true }
+ , { field: '璁¢噺鍗曚綅浠g爜', title: '璁¢噺鍗曚綅浠g爜', width: 200, sort: true }
+ , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 200, sort: true }
+ , { field: '鐐夊彿', title: '鐐夊彿', width: 200, sort: true }
+ , { field: '閽㈠嵎鍙�', title: '閽㈠嵎鍙�', width: 200, sort: true }
+ , { field: '鏉$爜鐘舵��', title: '鏉$爜鐘舵��', width: 200, sort: true }
+ , { field: '鍘傚晢', title: '鍘傚晢', width: 200, sort: true }
+ , { field: '鎹嗗寘鍙�', title: '鎹嗗寘鍙�', width: 200, sort: true }
+ , { field: '鐢熶骇鏃ユ湡', title: '鐢熶骇鏃ユ湡', width: 200, templet: "<div>{{d.鐢熶骇鏃ユ湡 ==null ?'':layui.util.toDateString(d.鐢熶骇鏃ユ湡, 'yyyy-MM-dd HH:mm:ss}}</div>", sort: true }
+ , { field: '淇濊川鏈熻嚦', title: '淇濊川鏈熻嚦', width: 200, templet: "<div>{{d.淇濊川鏈熻嚦 ==null ?'':layui.util.toDateString(d.淇濊川鏈熻嚦, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
+ , { field: 'HAuxPropID', title: 'HAuxPropID', width: 200, sort: true }
+ , { field: '杈呭姪灞炴�т唬鐮�', title: '杈呭姪灞炴�т唬鐮�', width: 160, sort: true }
+ , { field: '杈呭姪灞炴��', title: '杈呭姪灞炴��', width: 160, sort: true }
+ , { field: '鎵瑰彿', title: '鎵瑰彿', width: 160, sort: true }
+ , { field: '鏁伴噺', title: '鏁伴噺', width: 200, sort: true }
+ , { field: '璁″垝璺熻釜鍙�', title: '璁″垝璺熻釜鍙�', width: 200, sort: true }
+ , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 200, sort: true }
+ , { field: 'HSupID', title: 'HSupID', width: 200, hide: true, sort: true }
+ , { field: '渚涘簲鍟嗕唬鐮�', title: '渚涘簲鍟嗕唬鐮�', width: 200, sort: true }
+ , { field: '渚涘簲鍟�', title: '渚涘簲鍟�', width: 200, sort: true }
+ , { field: '杩涙枡鏃ユ湡', title: '杩涙枡鏃ユ湡', width: 200, sort: true }
+ , { field: '杩涙枡鏃ユ湡鍛�', title: '杩涙枡鏃ユ湡鍛�', width: 115, sort: true }
+ , { field: '瀹㈡埛鍨嬪彿', title: '瀹㈡埛鍨嬪彿', width: 115, sort: true }
+ , { field: '寰�鏉ュ崟浣�', title: '寰�鏉ュ崟浣�', width: 200, sort: true }
+ , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true, sort: true }
+ , { field: '杞﹂棿', title: '杞﹂棿', width: 115, sort: true }
+ , { field: '璁″垝瀹屽伐鏃ユ湡', title: '璁″垝瀹屽伐鏃ユ湡', width: 200, sort: true }
+ , { field: '鎷栧彿', title: '鎷栧彿', width: 200, sort: true }
+ , { field: '鎬绘墭鏁�', title: '鎬绘墭鏁�', width: 200, sort: true }
+ , { field: '澶囨敞', title: '澶囨敞', width: 200, sort: true }
+ , { field: '鍒朵綔浜�', title: '鍒朵綔浜�', width: 115, sort: true }
+ , { field: '鏃ユ湡', title: '鏃ユ湡', width: 200, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
+ , { field: '鎵撳嵃娆℃暟', title: '鎵撳嵃娆℃暟', width: 200, sort: true }
+ , { field: '浣滃簾鏍囪', title: '浣滃簾鏍囪', width: 200, sort: true }
+ , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 115, sort: true }
+ , { field: '鐢熶骇鍏ュ簱鏃ユ湡', title: '鐢熶骇鍏ュ簱鏃ユ湡', width: 200, templet: "<div>{{d.鐢熶骇鍏ュ簱鏃ユ湡 ==null ?'':layui.util.toDateString(d.鐢熶骇鍏ュ簱鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
+ , { field: '閿�鍞嚭搴撴棩鏈�', title: '閿�鍞嚭搴撴棩鏈�', width: 200, templet: "<div>{{d.閿�鍞嚭搴撴棩鏈� ==null ?'':layui.util.toDateString(d.閿�鍞嚭搴撴棩鏈�, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
+ ]]
};
}
@@ -337,6 +366,10 @@
if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
ColFilter();
}
+ //鍒锋柊鎸夐挳鏄剧ず
+ var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+ var HBillType = "鏉$爜涓绘。";
+ Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
} else {
layer.close(index);
layer.alert(data1.code + data1.Message, { icon: 5 });
@@ -454,6 +487,12 @@
} else {
table.render(option);
}
+
+ //鍒锋柊鎸夐挳鏄剧ず
+ var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+ var HBillType = "鏉$爜涓绘。";
+ Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+
}, error: function () {
layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
}
--
Gitblit v1.9.1