From 35afc9f8ef4e08bf98f93594251fb4c326735820 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期一, 04 十一月 2024 13:49:52 +0800
Subject: [PATCH] 工资结算单前端分页
---
WebTM/views/工资管理/工资结算单(集体)/Pay_GroupBalBillList.html | 55 +++++-----
WebTM/views/计划管理/工艺路线/Gy_RoutingBillCheckQuery.html | 144 ++++++++++++++++------------
WebTM/views/工资管理/工资结算单(个人)/Pay_SingleBalBillList.html | 53 +++++-----
WebTM/layuiadmin/Scripts/webConfig.js | 2
WebTM/views/工资管理/工资报表/Pay_PaymentEntryReport.html | 2
5 files changed, 134 insertions(+), 122 deletions(-)
diff --git a/WebTM/layuiadmin/Scripts/webConfig.js b/WebTM/layuiadmin/Scripts/webConfig.js
index dea1ae5..567593d 100644
--- a/WebTM/layuiadmin/Scripts/webConfig.js
+++ b/WebTM/layuiadmin/Scripts/webConfig.js
@@ -8,7 +8,7 @@
/*var WEBURL = "http://localhost:8082/API/";*/ //鏉滆春鏈湴閰嶇疆
/*var WEBURL = "http://localhost/API/";*/ //娼樻禉娓告湰鍦伴厤缃�
//var WEBURL = "http://localhost:8082/API/"; //寮犵憺骞挎湰鍦伴厤缃�
- /* var WEBURL = "http://localhost:81/API/" //缈佹稕娑涙湰鍦伴厤缃�*/
+ var WEBURL = "http://localhost:81/API/" //缈佹稕娑涙湰鍦伴厤缃�
//var WEBURL = "http://47.96.97.237/API/"; //鏅轰簯鏈嶅姟鍣�
/*var WEBURL = "http://localhost:8082/LuBaoAPI/"; */ //浣欐�濇澃鏈湴閰嶇疆
//var WEBURL = "http://localhost:8088/ARAPI/"; //浣欐�濇澃鏈湴閰嶇疆(瀹夌憺)
diff --git "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\267\245\350\265\204\346\212\245\350\241\250/Pay_PaymentEntryReport.html" "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\267\245\350\265\204\346\212\245\350\241\250/Pay_PaymentEntryReport.html"
index 0d705f2..a259f2b 100644
--- "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\267\245\350\265\204\346\212\245\350\241\250/Pay_PaymentEntryReport.html"
+++ "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\267\245\350\265\204\346\212\245\350\241\250/Pay_PaymentEntryReport.html"
@@ -193,7 +193,7 @@
, page: true
, cellMinWidth: 90
, totalRow: true
- , limit: 5000
+ , limit: 500
, limits: [50, 500, 5000, 20000]
, done: function (res, curr, count) {
soulTable.render(this);
diff --git "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\267\245\350\265\204\347\273\223\347\256\227\345\215\225\050\344\270\252\344\272\272\051/Pay_SingleBalBillList.html" "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\267\245\350\265\204\347\273\223\347\256\227\345\215\225\050\344\270\252\344\272\272\051/Pay_SingleBalBillList.html"
index a2f61f7..c46bdd8 100644
--- "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\267\245\350\265\204\347\273\223\347\256\227\345\215\225\050\344\270\252\344\272\272\051/Pay_SingleBalBillList.html"
+++ "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\267\245\350\265\204\347\273\223\347\256\227\345\215\225\050\344\270\252\344\272\272\051/Pay_SingleBalBillList.html"
@@ -162,7 +162,7 @@
</div>
</div>
<table class="" id="mainTable" lay-filter="mainTable"></table>
- <div id="page" style="position: relative; bottom: 0;"></div>
+ <!--<div id="page" style="position: relative; bottom: 0;"></div>-->
<script type="text/html" id="toolbarDemo">
<div class="layui-btn-container">
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Export" id="btn_Export"><i class="layui-icon layui-icon-export"></i>瀵煎嚭</button>
@@ -260,7 +260,7 @@
option = {
elem: '#mainTable'
, toolbar: '#toolbarDemo'
- , page: false
+ , page: true
, totalRow: true
, height: 'full-50'
, cellMinWidth: 90
@@ -270,28 +270,28 @@
soulTable.render(this);
}
};
- optionPage = {
- elem: 'page', //娉ㄦ剰锛岃繖閲岀殑 page 鏄� ID锛屼笉鐢ㄥ姞 # 鍙�
- count: 10000, //鏁版嵁鎬绘暟锛屼粠鏈嶅姟绔緱鍒�
- limit: 50,
- limits: [50, 500, 5000, 50000],
- layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'],
- jump: function (obj, first) {
- //console.log(obj)
- //obj鍖呭惈浜嗗綋鍓嶅垎椤电殑鎵�鏈夊弬鏁帮紝姣斿锛�
- //console.log(obj.curr); //寰楀埌褰撳墠椤碉紝浠ヤ究鍚戞湇鍔$璇锋眰瀵瑰簲椤电殑鏁版嵁銆�
- //console.log(obj.limit); //寰楀埌姣忛〉鏄剧ず鐨勬潯鏁�
+ //optionPage = {
+ // elem: 'page', //娉ㄦ剰锛岃繖閲岀殑 page 鏄� ID锛屼笉鐢ㄥ姞 # 鍙�
+ // count: 10000, //鏁版嵁鎬绘暟锛屼粠鏈嶅姟绔緱鍒�
+ // limit: 50,
+ // limits: [50, 500, 5000, 50000],
+ // layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'],
+ // jump: function (obj, first) {
+ // //console.log(obj)
+ // //obj鍖呭惈浜嗗綋鍓嶅垎椤电殑鎵�鏈夊弬鏁帮紝姣斿锛�
+ // //console.log(obj.curr); //寰楀埌褰撳墠椤碉紝浠ヤ究鍚戞湇鍔$璇锋眰瀵瑰簲椤电殑鏁版嵁銆�
+ // //console.log(obj.limit); //寰楀埌姣忛〉鏄剧ず鐨勬潯鏁�
- //棣栨涓嶆墽琛�
- if (!first) {
- //do something
- page = obj.curr;
- size = obj.limit;
- get_FastQuery();
- }
- }
- }
- laypage.render(optionPage);
+ // //棣栨涓嶆墽琛�
+ // if (!first) {
+ // //do something
+ // page = obj.curr;
+ // size = obj.limit;
+ // get_FastQuery();
+ // }
+ // }
+ //}
+ //laypage.render(optionPage);
}
//#endregion
@@ -897,6 +897,7 @@
form.on('submit(btnReSearch)', function (data) {
//娓呯┖杩囨护鏉′欢
set_ClearQuery();
+ get_FastQuery();
});
//閲嶇疆杩囨护鏉′欢
@@ -923,11 +924,7 @@
//#region 鏌ヨ鎸夐挳
form.on('submit(btnSearch)', function (data) {
- if (page != 1) {
- $("#page a:eq(1)").get(0).click();//鐐瑰嚮鍒嗛〉鏍忕涓�椤�
- } else {
get_FastQuery();
- }
});
//蹇�熸煡璇�
@@ -1026,7 +1023,7 @@
if (HEmpName) {
sWhere += " and 鑱屽憳鍚嶇О like '%" + HEmpName + "%'";
}
- get_DisplayPage(sWhere);
+ get_Display(sWhere);
sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
}
diff --git "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\267\245\350\265\204\347\273\223\347\256\227\345\215\225\050\351\233\206\344\275\223\051/Pay_GroupBalBillList.html" "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\267\245\350\265\204\347\273\223\347\256\227\345\215\225\050\351\233\206\344\275\223\051/Pay_GroupBalBillList.html"
index 2dd25df..ca9b70d 100644
--- "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\267\245\350\265\204\347\273\223\347\256\227\345\215\225\050\351\233\206\344\275\223\051/Pay_GroupBalBillList.html"
+++ "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\267\245\350\265\204\347\273\223\347\256\227\345\215\225\050\351\233\206\344\275\223\051/Pay_GroupBalBillList.html"
@@ -162,7 +162,7 @@
</div>
</div>
<table class="" id="mainTable" lay-filter="mainTable"></table>
- <div id="page" style="position: relative; bottom: 0;"></div>
+ <!--<div id="page" style="position: relative; bottom: 0;"></div>-->
<script type="text/html" id="toolbarDemo">
<div class="layui-btn-container">
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Export" id="btn_Export"><i class="layui-icon layui-icon-export"></i>瀵煎嚭</button>
@@ -260,7 +260,7 @@
option = {
elem: '#mainTable'
, toolbar: '#toolbarDemo'
- , page: false
+ , page: true
, totalRow: true
, height: 'full-50'
, cellMinWidth: 90
@@ -270,28 +270,28 @@
soulTable.render(this);
}
};
- optionPage = {
- elem: 'page', //娉ㄦ剰锛岃繖閲岀殑 page 鏄� ID锛屼笉鐢ㄥ姞 # 鍙�
- count: 10000, //鏁版嵁鎬绘暟锛屼粠鏈嶅姟绔緱鍒�
- limit: 50,
- limits: [50, 500, 5000, 50000],
- layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'],
- jump: function (obj, first) {
- //console.log(obj)
- //obj鍖呭惈浜嗗綋鍓嶅垎椤电殑鎵�鏈夊弬鏁帮紝姣斿锛�
- //console.log(obj.curr); //寰楀埌褰撳墠椤碉紝浠ヤ究鍚戞湇鍔$璇锋眰瀵瑰簲椤电殑鏁版嵁銆�
- //console.log(obj.limit); //寰楀埌姣忛〉鏄剧ず鐨勬潯鏁�
+ //optionPage = {
+ // elem: 'page', //娉ㄦ剰锛岃繖閲岀殑 page 鏄� ID锛屼笉鐢ㄥ姞 # 鍙�
+ // count: 10000, //鏁版嵁鎬绘暟锛屼粠鏈嶅姟绔緱鍒�
+ // limit: 50,
+ // limits: [50, 500, 5000, 50000],
+ // layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'],
+ // jump: function (obj, first) {
+ // //console.log(obj)
+ // //obj鍖呭惈浜嗗綋鍓嶅垎椤电殑鎵�鏈夊弬鏁帮紝姣斿锛�
+ // //console.log(obj.curr); //寰楀埌褰撳墠椤碉紝浠ヤ究鍚戞湇鍔$璇锋眰瀵瑰簲椤电殑鏁版嵁銆�
+ // //console.log(obj.limit); //寰楀埌姣忛〉鏄剧ず鐨勬潯鏁�
- //棣栨涓嶆墽琛�
- if (!first) {
- //do something
- page = obj.curr;
- size = obj.limit;
- get_FastQuery();
- }
- }
- }
- laypage.render(optionPage);
+ // //棣栨涓嶆墽琛�
+ // if (!first) {
+ // //do something
+ // page = obj.curr;
+ // size = obj.limit;
+ // get_FastQuery();
+ // }
+ // }
+ //}
+ //laypage.render(optionPage);
}
//#endregion
@@ -912,6 +912,7 @@
form.on('submit(btnReSearch)', function (data) {
//娓呯┖杩囨护鏉′欢
set_ClearQuery();
+ get_FastQuery();
});
//閲嶇疆杩囨护鏉′欢
@@ -938,11 +939,7 @@
//#region 鏌ヨ鎸夐挳
form.on('submit(btnSearch)', function (data) {
- if (page != 1) {
- $("#page a:eq(1)").get(0).click();//鐐瑰嚮鍒嗛〉鏍忕涓�椤�
- } else {
- get_FastQuery();
- }
+ get_FastQuery();
});
//蹇�熸煡璇�
@@ -1041,7 +1038,7 @@
if (HEmpName) {
sWhere += " and 鑱屽憳鍚嶇О like '%" + HEmpName + "%'";
}
- get_DisplayPage(sWhere);
+ get_Display(sWhere);
sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
}
diff --git "a/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillCheckQuery.html" "b/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillCheckQuery.html"
index 579822f..c9c06a7 100644
--- "a/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillCheckQuery.html"
+++ "b/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillCheckQuery.html"
@@ -556,6 +556,7 @@
optionChecked.cols = [col];
if (type == 1) {
+ HModName = "Gy_RoutingBillCheckQueryIMake";
optionSend.data = data1.data;
//璁剧疆鍒楄〃鍚屼竴涓崟鎹彧鏈夌涓�鏉℃暟鎹樉绀轰富琛ㄤ俊鎭紝鍏跺畠璁板綍鍙樉绀哄瓙琛ㄤ俊鎭�
//鑾峰彇瀛愯〃鍒楁暟鎹�
@@ -582,6 +583,7 @@
table.render(optionSend);
option = optionSend;
} else if (type == 2) {
+ HModName = "Gy_RoutingBillCheckQuery";
optionNeedCheck.data = data1.data;
//璁剧疆鍒楄〃鍚屼竴涓崟鎹彧鏈夌涓�鏉℃暟鎹樉绀轰富琛ㄤ俊鎭紝鍏跺畠璁板綍鍙樉绀哄瓙琛ㄤ俊鎭�
//鑾峰彇瀛愯〃鍒楁暟鎹�
@@ -609,6 +611,7 @@
option = optionNeedCheck;
}
else if (type == 3) {
+ HModName = "Gy_RoutingBillCheckQuery";
optionChecked.data = data1.data.slice(0, 1000);//鑾峰彇鍓�1000
//璁剧疆鍒楄〃鍚屼竴涓崟鎹彧鏈夌涓�鏉℃暟鎹樉绀轰富琛ㄤ俊鎭紝鍏跺畠璁板綍鍙樉绀哄瓙琛ㄤ俊鎭�
//鑾峰彇瀛愯〃鍒楁暟鎹�
@@ -669,7 +672,7 @@
, shift: 2 //寮瑰嚭鍔ㄧ敾
, area: ["50%", "90%"] //绐椾綋澶у皬
, maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
- , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"]
+ , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide_New.html?HModName=' + HModName + '&colName=' + colName, "yes"]
, btn: ["纭畾", "鍙栨秷"]
, btn1: function (index, laero) {
//鍒锋柊琛ㄦ牸鏁版嵁
@@ -686,78 +689,92 @@
$.ajax({
url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
type: "GET",
+ async: false,
data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
success: function (data1) {
if (data1.data.length != 0) {
var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var titleData = [];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+ var newCols = [[]];//瀵瑰簲鏁版嵁搴撳垪椤哄簭col
+ newCols[0].push(option.cols[0][0]);//鏀惧叆绗竴涓猚heckbox
dataCol = data1.data[0].HGridString.split(',');
-
- for (var i = 0; i < option.cols[0].length - 1; i++) {
- var dataCols = dataCol[i].split('|');
- //闅愯棌鍒�
- if (dataCols[1] == 1) {
- option.cols[0][i + 1]["hide"] = true;
- }
- //璁剧疆鍐呭瀛椾綋澶у皬
- if (data1.data[0].HFontSize != 0) {
- option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
- } else {
- option.cols[0][i + 1]["style"] = "font-size:100%";
- }
- //璁剧疆鍒楀
- if (dataCols[3] > 0) {
- option.cols[0][i + 1]["width"] = dataCols[3];
- }
- //鏄剧ず鍒�
- if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
- option.cols[0][i + 1]["hide"] = false;
- }
- //缁熻鍒�
- if (dataCols[6] == 1) {
- option.cols[0][i + 1]["totalRow"] = true;
- }
- //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
- switch (dataCols[2]) {
- case "L":
- option.cols[0][i + 1]["align"] = "left";
- break;
- case "M":
- option.cols[0][i + 1]["align"] = "center";
- break;
- case "R":
- option.cols[0][i + 1]["align"] = "right";
- break;
- }
- //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
- if (dataCols[4] != null && dataCols[4] != "") {
- option.cols[0][i + 1]["title"] = dataCols[4];
- }
- }
-
- //鍙栨秷鍐荤粨鍒�
- for (var i = 1; i < option.cols[0].length - 1; i++) {
- if (option.cols[0][i]["fixed"] != null) {
- option.cols[0][i]["fixed"] = null;
- }
- else {
- break;
- }
- }
- //鍐荤粨鍒�
- if (data1.data[0].HFixCols != 0) {
- for (var i = 0; i < data1.data[0].HFixCols; i++) {
- if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
- data1.data[0].HFixCols += 1;
+ //鍒楄缃垪鏁颁笌椤甸潰鍒楁暟鏄惁涓�鑷�
+ if (dataCol.length == option.cols[0].length - 1) {
+ //閬嶅巻瀵绘壘鍒楄缃搴斿垪鎸夐『搴忔彃鍏�
+ for (var j = 0; j < option.cols[0].length - 1; j++) {
+ for (var i = 0; i < option.cols[0].length - 1; i++) {
+ var dataCols = dataCol[j].split('|');
+ //閫夋嫨涓巇atacols鐩稿簲鍒楄繘琛屼慨鏀�
+ if (option.cols[0][i + 1]["field"] == dataCols[5]) {
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍒楀
+ if (dataCols[3] > 0) {
+ option.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ if (data1.data[0].HFontSize != 0) {
+ option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+ } else {
+ option.cols[0][i + 1]["style"] = "font-size:100%";
+ }
+ //鏄剧ず鍒�
+ if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
+ option.cols[0][i + 1]["hide"] = false;
+ }
+ //缁熻鍒�
+ if (dataCols[6] == 1) {
+ option.cols[0][i + 1]["totalRow"] = true;
+ }
+ //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+ switch (dataCols[2]) {
+ case "L":
+ option.cols[0][i + 1]["align"] = "left";
+ break;
+ case "M":
+ option.cols[0][i + 1]["align"] = "center";
+ break;
+ case "R":
+ option.cols[0][i + 1]["align"] = "right";
+ break;
+ }
+ //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
+ if (dataCols[4] != null && dataCols[4] != "") {
+ option.cols[0][i + 1]["title"] = dataCols[4];
+ }
+ newCols[0].push(option.cols[0][i + 1]);
+ }
}
- option.cols[0][i + 1]["fixed"] = "left";
+ }
+ //閬嶅巻寰幆鍚庡垽鏂搴斿垪鏁版槸鍚︿竴鑷�
+ if (dataCol.length == newCols[0].length - 1) {
+ option.cols = newCols;
+ //鍙栨秷鍐荤粨鍒�
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ if (option.cols[0][i]["fixed"] != null) {
+ option.cols[0][i]["fixed"] = null;
+ }
+ else {
+ break;
+ }
+ }
+ //鍐荤粨鍒�
+ if (data1.data[0].HFixCols != 0) {
+ for (var i = 0; i < data1.data[0].HFixCols; i++) {
+ if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
+ data1.data[0].HFixCols += 1;
+ }
+ option.cols[0][i + 1]["fixed"] = "left";
+ }
+ }
}
}
- table.render(option);
-
+ ins=table.render(option);
} else {
- table.render(option);
-
+ ins=table.render(option);
}
}, error: function () {
layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
@@ -766,6 +783,7 @@
}
//#endregion
+
//#region 缂栬緫
function get_ShowBill(tableName) {
var checkStatus = table.checkStatus(tableName)
--
Gitblit v1.9.1