From f295b937340bd2199dc202b777af310aa69ca36c Mon Sep 17 00:00:00 2001 From: zrg <z18737863051@163.com> Date: 星期二, 15 十月 2024 18:23:52 +0800 Subject: [PATCH] 1 --- WebTM/WebTM.csproj.user | 2 WebTM/views/工资管理/考勤汇报单/Pay_WorkTimesBillList.html | 106 ++++ WebTM/views/工资管理/异常工时申请单/Pay_ErrWorkTimesRequestBillList.html | 108 ++++ WebTM/views/工资管理/工资结算单(集体)/Pay_GroupBalBillList.html | 107 ++++ WebTM/views/工资管理/工资结算单(个人)/Pay_SingleBalBillList.html | 107 ++++ WebTM/views/车间管理/工序流转卡/Sc_ProcessExchangeBillList.html | 257 ++++++--- WebTM/views/工资管理/定额申请/Pay_ProcPriceRequestBillList.html | 108 ++++ WebTM/views/基础资料/采购基础资料/Gy_Supplier.html | 122 ++++ WebTM/views/基础资料/销售基础资料/Gy_Customer.html | 159 +++++ WebTM/views/生产管理/生产投料单/Sc_PPBomBillList.html | 36 + WebTM/views/生产管理/报工台工序/不良采集/Sc_QualityReportStepBill_New.html | 127 ++++ WebTM/views/生产管理/报工台工序/不良采集/Sc_QualityReportStepBillList.html | 2 WebTM/views/车间管理/工序出站汇报单/Cj_StationOutBillList.html | 284 ++++++++-- WebTM/views/生产管理/生产任务单/Sc_ICMOBillList.html | 24 14 files changed, 1,333 insertions(+), 216 deletions(-) diff --git a/WebTM/WebTM.csproj.user b/WebTM/WebTM.csproj.user index 005e8c8..e39639b 100644 --- a/WebTM/WebTM.csproj.user +++ b/WebTM/WebTM.csproj.user @@ -3,7 +3,7 @@ <PropertyGroup> <NameOfLastUsedPublishProfile>D:\鏅轰簯杩堟�漒MES\MES-WEB-LayUI\WebTM\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile> <ProjectView>ProjectFiles</ProjectView> - <LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig> + <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig> <UseIISExpress>true</UseIISExpress> <Use64BitIISExpress /> <IISExpressSSLPort /> diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\207\207\350\264\255\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Supplier.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\207\207\350\264\255\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Supplier.html" index 825cbc4..6f9ac1a 100644 --- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\207\207\350\264\255\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Supplier.html" +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\207\207\350\264\255\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Supplier.html" @@ -132,6 +132,7 @@ <div> <table class="" id="mainTable" lay-filter="mainTable"></table> </div> + <div id="page" style="position: relative; bottom: 0;"></div> </div> </div> </div> @@ -169,7 +170,8 @@ var HModName = "Gy_Supplier"; //涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞� var titleData = ["HItemID", "HCurID", "璐у竵", "姹囩巼", "HSSID", "缁撶畻鏂瑰紡", "HAreaID", "鍦板尯","HPSStyleID","閲囪喘鏂瑰紡"]; - + var page = 1;//鍒嗛〉鏁版嵁 + var size = 50; var params = getUrlVars(); var Type = params[params[0]]; var HSupTypeID = 0; @@ -298,7 +300,7 @@ set_InitGrid(); //鏌ヨ - get_Display(sWhere); + get_DisplayPage(sWhere); //鏍戠姸鍥剧敓鎴� get_Display_Tree(); @@ -310,7 +312,7 @@ elem: '#mainTable' , toolbar: '#toolbarDemo' , height: 'full-50' - , page: true + , page: false , limits: [50, 500, 5000, 50000] , limit: 50 , cellMinWidth: 90 @@ -326,6 +328,28 @@ // , { field: '绂佺敤鏍囪', title: '绂佺敤鏍囪' } //]] }; + 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); } //鏌ヨ @@ -403,6 +427,85 @@ layer.close(index); } + //#region 鍒嗛〉鏌ヨ + function get_DisplayPage(sWhere) { + var wait = layer.load();//閬僵 + var ajaxLoad = layer.load(); + sWhere += addSWhereByOpenType(); + $.ajax({ + url: GetWEBURL() + '/Gy_Supplier/page', + type: "GET", + data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "page": page, "size": size, "Organization": Organization}, + success: function (data1) { + option.limit = size;//鏀瑰彉琛ㄦ牸椤靛ぇ灏� + if (data1.code == 1) { + optionPage.count = data1.count;//鏀瑰彉鍒楄〃鏁版嵁鎬绘暟 + var data = []; + var col = []; + //缁欑┖鐨勬暟缁勮祴鍊� + for (var key in data1.list) { + //鍔ㄦ�佽幏鍙栧垪琛ㄦ墍鏈夊垪鍚� + data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); + //鑾峰彇涓嶉渶瑕佹樉绀虹殑鍒楋紙H寮�澶寸殑鍒椾笉鏄剧ず锛� + var patrn = new RegExp(/^h/i); + if (patrn.test(data1.list[key].ColmCols)) { + titleData[key] = data1.list[key].ColmCols; + } + } + //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋 + col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' }); + for (var i = 0; i < data.length; i++) { + // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') { + if ($.inArray(data[i].name, titleData) > -1) { + col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒� + } + else { + switch (data[i].Type) { + //int + case 'DateTime': + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 160 }); + break; + case 'Decimal': + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true }); + break; + case 'Int32': + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true }); + break; + default: + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140 }); + } + } + } + + columns = col; + option.cols = [col]; + option.data = data1.data; + option.totalRow = true; + laypage.render(optionPage); + //鍒锋柊琛ㄦ牸鏁版嵁 + DisPlay_HideColumn(); + + layer.close(ajaxLoad); + if ($("#ColName option").length < 1) { + ColFilter(); + get_DefaultModule();//鍔犺浇鏂规 + } + //layer.alert("鏌ヨ鎴愬姛", { icon: 1 }); + } else { + //option.data = [[]] + //table.render(option); + layer.close(ajaxLoad); + layer.alert(data1.code + data1.Message, { icon: 5 }); + } + }, error: function () { + layer.close(ajaxLoad); + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }); + } + //#endregion + + //#region 鐐瑰嚮琛岄�変腑楂樹寒 table.on('row(mainTable)', function (obj) { //閫変腑琛屾敼鍙橀鑹� @@ -459,7 +562,8 @@ if (HName) { sWhere += " and 渚涘簲鍟嗗悕绉� like '%" + HName + "%'"; } - get_Display(sWhere); + + get_DisplayPage(sWhere); sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨 } @@ -740,7 +844,7 @@ HSupClsName = data.title; HSupTypeID = data.id; } - get_Display(sql); + get_DisplayPage(sql); } }); } @@ -884,8 +988,16 @@ } } table.render(option); + //鍒锋柊鎸夐挳鏄剧ず + var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞� + var HBillType = "Gy_Supplier"; + Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]); } else { table.render(option); + //鍒锋柊鎸夐挳鏄剧ず + var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞� + var HBillType = "Gy_Supplier"; + Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]); } }, error: function () { layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\224\200\345\224\256\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Customer.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\224\200\345\224\256\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Customer.html" index 98ec95d..9f4dc71 100644 --- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\224\200\345\224\256\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Customer.html" +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\224\200\345\224\256\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Customer.html" @@ -164,6 +164,7 @@ <div> <table class="" id="mainTable" lay-filter="mainTable"></table> </div> + <div id="page" style="position:relative;bottom:0;"></div> </div> </div> @@ -204,6 +205,8 @@ var titleData1 = ["HCusID"]; var HCusTypeID = 0; var HCusClsName = ''; + var page = 1;//鍒嗛〉鏁版嵁 + var size = 50; var ins; //鐢ㄤ簬瀵煎嚭excel var data_Tree = {}; //鑾峰彇鏍戠姸鍥炬暟鎹� @@ -351,7 +354,7 @@ //鏌ヨ //鏍规嵁椤甸潰鐨勬墦寮�鏂瑰紡锛屽垽鏂繃婊ゆ潯浠舵槸鍚﹂渶瑕佽繘琛岄澶栫殑娣诲姞 addSWhereByOpenType(); - get_Display(sWhere); + get_DisplayPage(sWhere); //鏍戠姸鍥剧敓鎴� get_Display_Tree(); @@ -364,7 +367,7 @@ elem: '#mainTable' , toolbar: '#toolbarDemo' , height: 'full-50' - , page: true + , page: false , limits: [50, 500, 5000, 50000] , limit: 50 , cellMinWidth: 90 @@ -382,6 +385,28 @@ $("#mainTable").css("width", "100%"); }, }; + 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); } //#endregion @@ -473,6 +498,83 @@ } }); layer.close(index); + } + //#endregion + + //#region 鍒嗛〉鏌ヨ + function get_DisplayPage(sWhere) { + var wait = layer.load();//閬僵 + var ajaxLoad = layer.load(); + $.ajax({ + url: GetWEBURL() + '/Gy_Customer/page', + type: "GET", + data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "page": page, "size": size, "Organization": Organization }, + success: function (data1) { + option.limit = size;//鏀瑰彉琛ㄦ牸椤靛ぇ灏� + if (data1.code == 1) { + optionPage.count = data1.count;//鏀瑰彉鍒楄〃鏁版嵁鎬绘暟 + var data = []; + var col = []; + //缁欑┖鐨勬暟缁勮祴鍊� + for (var key in data1.list) { + //鍔ㄦ�佽幏鍙栧垪琛ㄦ墍鏈夊垪鍚� + data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); + //鑾峰彇涓嶉渶瑕佹樉绀虹殑鍒楋紙H寮�澶寸殑鍒椾笉鏄剧ず锛� + var patrn = new RegExp(/^h/i); + if (patrn.test(data1.list[key].ColmCols)) { + titleData[key] = data1.list[key].ColmCols; + } + } + //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋 + col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' }); + for (var i = 0; i < data.length; i++) { + // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') { + if ($.inArray(data[i].name, titleData) > -1) { + col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒� + } + else { + switch (data[i].Type) { + //int + case 'DateTime': + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 160 }); + break; + case 'Decimal': + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true }); + break; + case 'Int32': + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true }); + break; + default: + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140 }); + } + } + } + + columns = col; + option.cols = [col]; + option.data = data1.data; + option.totalRow = true; + laypage.render(optionPage); + //鍒锋柊琛ㄦ牸鏁版嵁 + DisPlay_HideColumn(); + + layer.close(ajaxLoad); + if ($("#ColName option").length < 1) { + ColFilter(); + get_DefaultModule();//鍔犺浇鏂规 + } + //layer.alert("鏌ヨ鎴愬姛", { icon: 1 }); + } else { + //option.data = [[]] + //table.render(option); + layer.close(ajaxLoad); + layer.alert(data1.code + data1.Message, { icon: 5 }); + } + }, error: function () { + layer.close(ajaxLoad); + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }); } //#endregion @@ -620,26 +722,27 @@ if (HName) { sWhere += " and 瀹㈡埛鍚嶇О like '%" + HName + "%'"; } - $.ajax({ - //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum", - url: GetWEBURL() + '/Gy_Customer/list', - type: "GET", - data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "Organization": Organization }, - success: function (data1) { - if (data1.count == 1) { - option.data = data1.data; - table.render(option); - layer.close(ajaxLoad); - //layer.alert("鏌ヨ鎴愬姛", { icon: 1 }); - } else { - layer.close(ajaxLoad); - layer.alert(data1.code + data1.Message, { icon: 5 }); - } - }, error: function () { - layer.close(ajaxLoad); - layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); - } - }); + //$.ajax({ + // //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum", + // url: GetWEBURL() + '/Gy_Customer/list', + // type: "GET", + // data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "Organization": Organization }, + // success: function (data1) { + // if (data1.count == 1) { + // option.data = data1.data; + // table.render(option); + // layer.close(ajaxLoad); + // //layer.alert("鏌ヨ鎴愬姛", { icon: 1 }); + // } else { + // layer.close(ajaxLoad); + // layer.alert(data1.code + data1.Message, { icon: 5 }); + // } + // }, error: function () { + // layer.close(ajaxLoad); + // layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + // } + //}); + get_DisplayPage(sWhere); sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨 } //#endregion @@ -958,8 +1061,18 @@ } } table.render(option); + ins = table.render(option); + //鍒锋柊鎸夐挳鏄剧ず + var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞� + var HBillType = "Gy_Customer"; + Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]); } else { table.render(option); + ins = table.render(option); + //鍒锋柊鎸夐挳鏄剧ず + var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞� + var HBillType = "Gy_Customer"; + Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]); } }, error: function () { layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); @@ -1197,7 +1310,7 @@ HCusTypeID = data.id; HCusClsName = data.title; } - get_Display(sql); + get_DisplayPage(sql); } }); } diff --git "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\256\232\351\242\235\347\224\263\350\257\267/Pay_ProcPriceRequestBillList.html" "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\256\232\351\242\235\347\224\263\350\257\267/Pay_ProcPriceRequestBillList.html" index 183d590..469458c 100644 --- "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\256\232\351\242\235\347\224\263\350\257\267/Pay_ProcPriceRequestBillList.html" +++ "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\256\232\351\242\235\347\224\263\350\257\267/Pay_ProcPriceRequestBillList.html" @@ -150,6 +150,7 @@ </div> </div> <table class="" id="mainTable" lay-filter="mainTable"></table> + <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> @@ -204,6 +205,8 @@ var sWhere = ""; var ins; //鐢ㄤ簬瀵煎嚭excel var option = []; + var page = 1;//鍒嗛〉鏁版嵁 + var size = 50; var columns = ""; var titleData = []; //涓嶉渶瑕佹樉绀虹殑瀛楁 //#endregion @@ -248,7 +251,7 @@ option = { elem: '#mainTable' , toolbar: '#toolbarDemo' - , page: true + , page: false , totalRow: true , height: 'full-50' , cellMinWidth: 90 @@ -258,6 +261,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); //寰楀埌姣忛〉鏄剧ず鐨勬潯鏁� + + //棣栨涓嶆墽琛� + if (!first) { + //do something + page = obj.curr; + size = obj.limit; + get_FastQuery(); + } + } + } + laypage.render(optionPage); } //#endregion @@ -349,8 +374,10 @@ } } table.render(option); + ins = table.render(option); } else { table.render(option); + ins = table.render(option); } //鍒锋柊鎸夐挳鏄剧ず @@ -989,7 +1016,7 @@ if (HBillNo) { sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'"; } - get_Display(sWhere); + get_DisplayPage(sWhere); sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨 } @@ -1065,6 +1092,83 @@ }); } //#endregion + + //#region 鍒嗛〉鏌ヨ + function get_DisplayPage(sWhere) { + var wait = layer.load();//閬僵 + var ajaxLoad = layer.load(); + $.ajax({ + url: GetWEBURL() + '/Pay_ProcPriceRequestBillController/page', + type: "GET", + data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "page": page, "size": size }, + success: function (data1) { + option.limit = size;//鏀瑰彉琛ㄦ牸椤靛ぇ灏� + if (data1.code == 1) { + optionPage.count = data1.count;//鏀瑰彉鍒楄〃鏁版嵁鎬绘暟 + var data = []; + var col = []; + //缁欑┖鐨勬暟缁勮祴鍊� + for (var key in data1.list) { + //鍔ㄦ�佽幏鍙栧垪琛ㄦ墍鏈夊垪鍚� + data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); + //鑾峰彇涓嶉渶瑕佹樉绀虹殑鍒楋紙H寮�澶寸殑鍒椾笉鏄剧ず锛� + var patrn = new RegExp(/^h/i); + if (patrn.test(data1.list[key].ColmCols)) { + titleData[key] = data1.list[key].ColmCols; + } + } + //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋 + col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' }); + for (var i = 0; i < data.length; i++) { + // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') { + if ($.inArray(data[i].name, titleData) > -1) { + col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒� + } + else { + switch (data[i].Type) { + //int + case 'DateTime': + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 160 }); + break; + case 'Decimal': + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true }); + break; + case 'Int32': + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true }); + break; + default: + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140 }); + } + } + } + + columns = col; + option.cols = [col]; + option.data = data1.data; + option.totalRow = true; + laypage.render(optionPage); + //鍒锋柊琛ㄦ牸鏁版嵁 + DisPlay_HideColumn(); + + layer.close(ajaxLoad); + if ($("#ColName option").length < 1) { + ColFilter(); + } + //layer.alert("鏌ヨ鎴愬姛", { icon: 1 }); + } else { + //option.data = [[]] + //table.render(option); + layer.close(ajaxLoad); + layer.alert(data1.code + data1.Message, { icon: 5 }); + } + }, error: function () { + layer.close(ajaxLoad); + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }); + } + //#endregion + //#region 鍒楁槑鏄剧ず涓嬫媺妗� function ColFilter() { var Organization = '<option value="0" selected="selected" ></option>'; 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 d039eb6..ccf7991 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" @@ -150,6 +150,7 @@ </div> </div> <table class="" id="mainTable" lay-filter="mainTable"></table> + <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> @@ -200,6 +201,8 @@ var ins; //鐢ㄤ簬瀵煎嚭excel var option = []; var columns = ""; + var page = 1;//鍒嗛〉鏁版嵁 + var size = 50; var titleData = []; //涓嶉渶瑕佹樉绀虹殑瀛楁 //#endregion @@ -243,7 +246,7 @@ option = { elem: '#mainTable' , toolbar: '#toolbarDemo' - , page: true + , page: false , totalRow: true , height: 'full-50' , cellMinWidth: 90 @@ -253,6 +256,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); //寰楀埌姣忛〉鏄剧ず鐨勬潯鏁� + + //棣栨涓嶆墽琛� + if (!first) { + //do something + page = obj.curr; + size = obj.limit; + get_FastQuery(); + } + } + } + laypage.render(optionPage); } //#endregion @@ -344,8 +369,10 @@ } } table.render(option); + ins = table.render(option); } else { table.render(option); + ins = table.render(option); } //鍒锋柊鎸夐挳鏄剧ず @@ -824,7 +851,7 @@ if (HBillNo) { sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'"; } - get_Display(sWhere); + get_DisplayPage(sWhere); sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨 } @@ -903,6 +930,82 @@ } //#endregion + //#region 鍒嗛〉鏌ヨ + function get_DisplayPage(sWhere) { + var wait = layer.load();//閬僵 + var ajaxLoad = layer.load(); + $.ajax({ + url: GetWEBURL() + '/Pay_SingleBalBillController/page', + type: "GET", + data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "page": page, "size": size }, + success: function (data1) { + option.limit = size;//鏀瑰彉琛ㄦ牸椤靛ぇ灏� + if (data1.code == 1) { + optionPage.count = data1.count;//鏀瑰彉鍒楄〃鏁版嵁鎬绘暟 + var data = []; + var col = []; + //缁欑┖鐨勬暟缁勮祴鍊� + for (var key in data1.list) { + //鍔ㄦ�佽幏鍙栧垪琛ㄦ墍鏈夊垪鍚� + data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); + //鑾峰彇涓嶉渶瑕佹樉绀虹殑鍒楋紙H寮�澶寸殑鍒椾笉鏄剧ず锛� + var patrn = new RegExp(/^h/i); + if (patrn.test(data1.list[key].ColmCols)) { + titleData[key] = data1.list[key].ColmCols; + } + } + //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋 + col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' }); + for (var i = 0; i < data.length; i++) { + // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') { + if ($.inArray(data[i].name, titleData) > -1) { + col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒� + } + else { + switch (data[i].Type) { + //int + case 'DateTime': + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 160 }); + break; + case 'Decimal': + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true }); + break; + case 'Int32': + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true }); + break; + default: + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140 }); + } + } + } + + columns = col; + option.cols = [col]; + option.data = data1.data; + option.totalRow = true; + laypage.render(optionPage); + //鍒锋柊琛ㄦ牸鏁版嵁 + DisPlay_HideColumn(); + + layer.close(ajaxLoad); + if ($("#ColName option").length < 1) { + ColFilter(); + } + //layer.alert("鏌ヨ鎴愬姛", { icon: 1 }); + } else { + //option.data = [[]] + //table.render(option); + layer.close(ajaxLoad); + layer.alert(data1.code + data1.Message, { icon: 5 }); + } + }, error: function () { + layer.close(ajaxLoad); + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }); + } + //#endregion + //#region 鍒楁槑鏄剧ず涓嬫媺妗� function ColFilter() { 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 1647339..297646e 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" @@ -150,6 +150,7 @@ </div> </div> <table class="" id="mainTable" lay-filter="mainTable"></table> + <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> @@ -199,6 +200,8 @@ var sWhere = ""; var ins; //鐢ㄤ簬瀵煎嚭excel var option = []; + var page = 1;//鍒嗛〉鏁版嵁 + var size = 50; var columns = ""; var titleData = []; //涓嶉渶瑕佹樉绀虹殑瀛楁 //#endregion @@ -243,7 +246,7 @@ option = { elem: '#mainTable' , toolbar: '#toolbarDemo' - , page: true + , page: false , totalRow: true , height: 'full-50' , cellMinWidth: 90 @@ -253,6 +256,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); //寰楀埌姣忛〉鏄剧ず鐨勬潯鏁� + + //棣栨涓嶆墽琛� + if (!first) { + //do something + page = obj.curr; + size = obj.limit; + get_FastQuery(); + } + } + } + laypage.render(optionPage); } //#endregion @@ -344,8 +369,10 @@ } } table.render(option); + ins = table.render(option); } else { table.render(option); + ins = table.render(option); } //鍒锋柊鎸夐挳鏄剧ず @@ -825,7 +852,7 @@ if (HBillNo) { sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'"; } - get_Display(sWhere); + get_DisplayPage(sWhere); sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨 } @@ -905,6 +932,82 @@ } //#endregion + //#region 鍒嗛〉鏌ヨ + function get_DisplayPage(sWhere) { + var wait = layer.load();//閬僵 + var ajaxLoad = layer.load(); + $.ajax({ + url: GetWEBURL() + '/Pay_GroupBalBillController/page', + type: "GET", + data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "page": page, "size": size }, + success: function (data1) { + option.limit = size;//鏀瑰彉琛ㄦ牸椤靛ぇ灏� + if (data1.code == 1) { + optionPage.count = data1.count;//鏀瑰彉鍒楄〃鏁版嵁鎬绘暟 + var data = []; + var col = []; + //缁欑┖鐨勬暟缁勮祴鍊� + for (var key in data1.list) { + //鍔ㄦ�佽幏鍙栧垪琛ㄦ墍鏈夊垪鍚� + data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); + //鑾峰彇涓嶉渶瑕佹樉绀虹殑鍒楋紙H寮�澶寸殑鍒椾笉鏄剧ず锛� + var patrn = new RegExp(/^h/i); + if (patrn.test(data1.list[key].ColmCols)) { + titleData[key] = data1.list[key].ColmCols; + } + } + //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋 + col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' }); + for (var i = 0; i < data.length; i++) { + // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') { + if ($.inArray(data[i].name, titleData) > -1) { + col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒� + } + else { + switch (data[i].Type) { + //int + case 'DateTime': + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 160 }); + break; + case 'Decimal': + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true }); + break; + case 'Int32': + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true }); + break; + default: + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140 }); + } + } + } + + columns = col; + option.cols = [col]; + option.data = data1.data; + option.totalRow = true; + laypage.render(optionPage); + //鍒锋柊琛ㄦ牸鏁版嵁 + DisPlay_HideColumn(); + + layer.close(ajaxLoad); + if ($("#ColName option").length < 1) { + ColFilter(); + } + //layer.alert("鏌ヨ鎴愬姛", { icon: 1 }); + } else { + //option.data = [[]] + //table.render(option); + layer.close(ajaxLoad); + layer.alert(data1.code + data1.Message, { icon: 5 }); + } + }, error: function () { + layer.close(ajaxLoad); + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }); + } + //#endregion + //#region 鍒楁槑鏄剧ず涓嬫媺妗� function ColFilter() { diff --git "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\274\202\345\270\270\345\267\245\346\227\266\347\224\263\350\257\267\345\215\225/Pay_ErrWorkTimesRequestBillList.html" "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\274\202\345\270\270\345\267\245\346\227\266\347\224\263\350\257\267\345\215\225/Pay_ErrWorkTimesRequestBillList.html" index f549f2d..ad9fd20 100644 --- "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\274\202\345\270\270\345\267\245\346\227\266\347\224\263\350\257\267\345\215\225/Pay_ErrWorkTimesRequestBillList.html" +++ "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\274\202\345\270\270\345\267\245\346\227\266\347\224\263\350\257\267\345\215\225/Pay_ErrWorkTimesRequestBillList.html" @@ -150,6 +150,7 @@ </div> </div> <table class="" id="mainTable" lay-filter="mainTable"></table> + <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> @@ -199,6 +200,8 @@ var sWhere = ""; var ins; //鐢ㄤ簬瀵煎嚭excel var option = []; + var page = 1;//鍒嗛〉鏁版嵁 + var size = 50; var columns = ""; var titleData = []; //涓嶉渶瑕佹樉绀虹殑瀛楁 //#endregion @@ -243,7 +246,7 @@ option = { elem: '#mainTable' , toolbar: '#toolbarDemo' - , page: true + , page: false , totalRow: true , height: 'full-50' , cellMinWidth: 90 @@ -253,6 +256,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); //寰楀埌姣忛〉鏄剧ず鐨勬潯鏁� + + //棣栨涓嶆墽琛� + if (!first) { + //do something + page = obj.curr; + size = obj.limit; + get_FastQuery(); + } + } + } + laypage.render(optionPage); } //#endregion @@ -344,8 +369,10 @@ } } table.render(option); + ins = table.render(option); } else { table.render(option); + ins = table.render(option); } //鍒锋柊鎸夐挳鏄剧ず @@ -825,7 +852,7 @@ if (HBillNo) { sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'"; } - get_Display(sWhere); + get_DisplayPage(sWhere); sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨 } @@ -901,6 +928,83 @@ }); } //#endregion + + //#region 鍒嗛〉鏌ヨ + function get_DisplayPage(sWhere) { + var wait = layer.load();//閬僵 + var ajaxLoad = layer.load(); + $.ajax({ + url: GetWEBURL() + '/Pay_ErrWorkTimesRequestBillController/page', + type: "GET", + data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "page": page, "size": size }, + success: function (data1) { + option.limit = size;//鏀瑰彉琛ㄦ牸椤靛ぇ灏� + if (data1.code == 1) { + optionPage.count = data1.count;//鏀瑰彉鍒楄〃鏁版嵁鎬绘暟 + var data = []; + var col = []; + //缁欑┖鐨勬暟缁勮祴鍊� + for (var key in data1.list) { + //鍔ㄦ�佽幏鍙栧垪琛ㄦ墍鏈夊垪鍚� + data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); + //鑾峰彇涓嶉渶瑕佹樉绀虹殑鍒楋紙H寮�澶寸殑鍒椾笉鏄剧ず锛� + var patrn = new RegExp(/^h/i); + if (patrn.test(data1.list[key].ColmCols)) { + titleData[key] = data1.list[key].ColmCols; + } + } + //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋 + col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' }); + for (var i = 0; i < data.length; i++) { + // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') { + if ($.inArray(data[i].name, titleData) > -1) { + col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒� + } + else { + switch (data[i].Type) { + //int + case 'DateTime': + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 160 }); + break; + case 'Decimal': + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true }); + break; + case 'Int32': + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true }); + break; + default: + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140 }); + } + } + } + + columns = col; + option.cols = [col]; + option.data = data1.data; + option.totalRow = true; + laypage.render(optionPage); + //鍒锋柊琛ㄦ牸鏁版嵁 + DisPlay_HideColumn(); + + layer.close(ajaxLoad); + if ($("#ColName option").length < 1) { + ColFilter(); + } + //layer.alert("鏌ヨ鎴愬姛", { icon: 1 }); + } else { + //option.data = [[]] + //table.render(option); + layer.close(ajaxLoad); + layer.alert(data1.code + data1.Message, { icon: 5 }); + } + }, error: function () { + layer.close(ajaxLoad); + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }); + } + //#endregion + //#region 鍒楁槑鏄剧ず涓嬫媺妗� function ColFilter() { var Organization = '<option value="0" selected="selected" ></option>'; diff --git "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\350\200\203\345\213\244\346\261\207\346\212\245\345\215\225/Pay_WorkTimesBillList.html" "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\350\200\203\345\213\244\346\261\207\346\212\245\345\215\225/Pay_WorkTimesBillList.html" index 05c5877..34706b6 100644 --- "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\350\200\203\345\213\244\346\261\207\346\212\245\345\215\225/Pay_WorkTimesBillList.html" +++ "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\350\200\203\345\213\244\346\261\207\346\212\245\345\215\225/Pay_WorkTimesBillList.html" @@ -150,6 +150,7 @@ </div> </div> <table class="" id="mainTable" lay-filter="mainTable"></table> + <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> @@ -200,6 +201,8 @@ var sWhere = ""; var ins; //鐢ㄤ簬瀵煎嚭excel var option = []; + var page = 1;//鍒嗛〉鏁版嵁 + var size = 50; var columns = ""; var titleData = []; //涓嶉渶瑕佹樉绀虹殑瀛楁 //#endregion @@ -244,7 +247,7 @@ option = { elem: '#mainTable' , toolbar: '#toolbarDemo' - , page: true + , page: false , totalRow: true , height: 'full-50' , cellMinWidth: 90 @@ -254,6 +257,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); //寰楀埌姣忛〉鏄剧ず鐨勬潯鏁� + + //棣栨涓嶆墽琛� + if (!first) { + //do something + page = obj.curr; + size = obj.limit; + get_FastQuery(); + } + } + } + laypage.render(optionPage); } //#endregion @@ -345,8 +370,10 @@ } } table.render(option); + ins = table.render(option); } else { table.render(option); + ins = table.render(option); } //鍒锋柊鎸夐挳鏄剧ず @@ -848,7 +875,7 @@ if (HBillNo) { sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'"; } - get_Display(sWhere); + get_DisplayPage(sWhere); sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨 } @@ -928,6 +955,81 @@ } //#endregion + //#region 鍒嗛〉鏌ヨ + function get_DisplayPage(sWhere) { + var ajaxLoad = layer.load();//閬僵 + $.ajax({ + url: GetWEBURL() + '/Pay_WorkTimesBillController/page', + type: "GET", + data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "page": page, "size": size }, + success: function (data1) { + option.limit = size;//鏀瑰彉琛ㄦ牸椤靛ぇ灏� + if (data1.code == 1) { + optionPage.count = data1.count;//鏀瑰彉鍒楄〃鏁版嵁鎬绘暟 + var data = []; + var col = []; + //缁欑┖鐨勬暟缁勮祴鍊� + for (var key in data1.list) { + //鍔ㄦ�佽幏鍙栧垪琛ㄦ墍鏈夊垪鍚� + data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); + //鑾峰彇涓嶉渶瑕佹樉绀虹殑鍒楋紙H寮�澶寸殑鍒椾笉鏄剧ず锛� + var patrn = new RegExp(/^h/i); + if (patrn.test(data1.list[key].ColmCols)) { + titleData[key] = data1.list[key].ColmCols; + } + } + //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋 + col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' }); + for (var i = 0; i < data.length; i++) { + // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') { + if ($.inArray(data[i].name, titleData) > -1) { + col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒� + } + else { + switch (data[i].Type) { + //int + case 'DateTime': + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 160 }); + break; + case 'Decimal': + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true }); + break; + case 'Int32': + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true }); + break; + default: + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140 }); + } + } + } + + columns = col; + option.cols = [col]; + option.data = data1.data; + option.totalRow = true; + laypage.render(optionPage); + //鍒锋柊琛ㄦ牸鏁版嵁 + DisPlay_HideColumn(); + + layer.close(ajaxLoad); + if ($("#ColName option").length < 1) { + ColFilter(); + } + //layer.alert("鏌ヨ鎴愬姛", { icon: 1 }); + } else { + //option.data = [[]] + //table.render(option); + layer.close(ajaxLoad); + layer.alert(data1.code + data1.Message, { icon: 5 }); + } + }, error: function () { + layer.close(ajaxLoad); + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }); + } + //#endregion + //#region 鍒楁槑鏄剧ず涓嬫媺妗� function ColFilter() { var Organization = '<option value="0" selected="selected" ></option>'; diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\270\215\350\211\257\351\207\207\351\233\206/Sc_QualityReportStepBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\270\215\350\211\257\351\207\207\351\233\206/Sc_QualityReportStepBillList.html" index 8b9b6d7..403e217 100644 --- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\270\215\350\211\257\351\207\207\351\233\206/Sc_QualityReportStepBillList.html" +++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\270\215\350\211\257\351\207\207\351\233\206/Sc_QualityReportStepBillList.html" @@ -187,7 +187,7 @@ , soulTable = layui.soulTable var option = []; var sWhere = ""; - + var HModName = "Sc_QualityReportStepBillList"; //#region 銆愯繃婊ゆ柟妗堛�� //杩囨护鏉′欢鐨刢lass绫� diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\270\215\350\211\257\351\207\207\351\233\206/Sc_QualityReportStepBill_New.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\270\215\350\211\257\351\207\207\351\233\206/Sc_QualityReportStepBill_New.html" index 21a9ece..68bcdb3 100644 --- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\270\215\350\211\257\351\207\207\351\233\206/Sc_QualityReportStepBill_New.html" +++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\270\215\350\211\257\351\207\207\351\233\206/Sc_QualityReportStepBill_New.html" @@ -258,7 +258,8 @@ <option value="鏀捐">鏀捐</option> <option value="宸ュ簾">宸ュ簾</option> <option value="鏂欏簾">鏂欏簾</option> - <option value="鏍蜂欢淇濈暀">鏍蜂欢淇濈暀</option> + <option value="鏍蜂欢淇濈暀">鏍蜂欢淇濈暀</option> + <option value="">璇烽�夋嫨</option> </select> </script> <script> @@ -332,6 +333,11 @@ //瀛愯〃鍒濆鍖� set_InitGrid(); set_ProcessBill(linterid, HEntryID); + } + else if (OperationType == 6) { //鍑虹珯姹囨姤鍗曚笅鎺� + //瀛愯〃鍒濆鍖� + set_InitGrid(); + set_StationOutBill(linterid); } //#endregion @@ -1049,6 +1055,95 @@ }) } //#endregion + + //#region (鍑虹珯姹囨姤鍗�)涓嬫帹椤甸潰鍒濆鍖� + function set_StationOutBill(linterid) { + //鐢熸垚骞惰缃富琛ㄧ殑鍐呯爜鍜屽崟鎹彿 + createBillNo(); + + //鐩稿叧鏂囨湰妗嗕俊鎭垵濮嬪寲 + $("#HDate").val(Format(new Date(), "yyyy-MM-dd")); + $("#HMaker").val(sessionStorage["HUserName"]); + $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd")); + + var ajaxLoad = layer.load(); + + $.ajax({ + url: GetWEBURL() + "/Cj_StationOutBill/PushDownBackInfo", + type: "GET", + async: false, + data: { "linterid": linterid,"user": sessionStorage["HUserName"] }, + success: function (result) { + if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝 + var data = result.data[0]; + //涓昏〃璧嬪�� + $("#HEmpID").val(sessionStorage["HEmpID"] == undefined ? 0 : sessionStorage["HEmpID"]); + $("#HEmpName").val(sessionStorage["HEmpName"]); + $("#HDeptID").val(data.HDeptID); + $("#HDeptName").val(data.杞﹂棿); + $("#HGroupID").val(data.HGroupID); + $("#HGroupName").val(data.鐢熶骇鐝粍); + + //缁勭粐鐨勫�糎OrgID鍙樺寲锛岄噸鏂版覆鏌� + HOrgIDBar = data.缁勭粐; + + //瀛愯〃 璧嬪�� + var rowdata = []; + for (var i = 0; i < result.data.length; i++) { + rowdata.push( + { + "HMaterID": result.data[i]["HMaterID"], + "鐗╂枡浠g爜": result.data[i]["浜у搧浠g爜"], + "鐗╂枡鍚嶇О": result.data[i]["浜у搧鍚嶇О"], + "瑙勬牸鍨嬪彿": result.data[i]["瑙勬牸鍨嬪彿"], + "HProcID": result.data[i]["HProcID"], + "宸ュ簭": result.data[i]["宸ュ簭"], + "HUnitID": result.data[i]["HUnitID"], + "璁¢噺鍗曚綅": result.data[i]["璁¢噺鍗曚綅"], + "HQty": result.data[i]["鍑虹珯鏁伴噺"], + "HSourceID": result.data[i]["HSourceID"], + "鐢熶骇璧勬簮": result.data[i]["鐢熶骇璧勬簮"], + "HBadProcID": "0", + "璐d换宸ュ簭": "", + "HRemark": "", + "HProcExchInterID": result.data[i]["HProcExchInterID"], + "HProcExchEntryID": result.data[i]["HProcExchEntryID"], + "HProcExchBillNo": result.data[i]["宸ュ簭娴佽浆鍗″彿"], + "HICMOInterID": result.data[i]["HICMOInterID"], + "HICMOEntryID": result.data[i]["HICMOEntryID"], + "HICMOBillNo": result.data[i]["鐢熶骇璁㈠崟鍙�"], + "HSourceInterID": result.data[i]["hmainid"], + "HSourceEntryID": "0", + "HSourceBillNo": result.data[i]["鍗曟嵁鍙�"], + "HSourceBillType": result.data[i]["鍗曟嵁绫诲瀷"], + "HResult": "", + "HEmpID": "0", + "妫�楠屽憳": "", + "HBadReasonID": "0", + "涓嶈壇鍘熷洜": "", + "HBarCode": "", + "HReportType": "3", + "HAddr": "", + "HMaker": "", + "HMakeDate": Format(new Date(), 'yyyy-MM-dd') + } + ); + } + option.data = rowdata; + + table.render(option); + layer.close(ajaxLoad); + } else { + layer.close(ajaxLoad); + layer.alert(result.msg, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' }); + } + }, error: function () { + layer.close(ajaxLoad); + layer.alert("鍙戠敓閿欒!", { icon: 5 }); + } + }) + } + //#endregion //#region 寮圭獥閫夋嫨鏂规硶 //#region 鐢熶骇杞﹂棿閫夋嫨椤甸潰 @@ -1134,7 +1229,7 @@ function set_SaveBill(data) { //璁板綍鎿嶄綔绫诲瀷 var refSav = ""; - if (OperationType == 1 || OperationType == 2 || OperationType == 4 || OperationType == 5) { + if (OperationType == 1 || OperationType == 2 || OperationType == 4 || OperationType == 5 || OperationType == 6) { refSav = "Add"; data.field.HChangeDate = new Date(); data.field.HSTOCKORGID = data.field.HOrgID; @@ -1206,7 +1301,7 @@ // return false; //} - if ($("#HEmpID").val() == "0") { + if ($("#HEmpID").val() == "0" || $("#HEmpID").val() == undefined || $("#HEmpID").val() == null) { layer.msg("鐧昏浜烘湭閫夋嫨!"); return false; } @@ -1226,6 +1321,22 @@ return false; } else if (!ref.test(temp)) { layer.msg("绗�" + (i+1) + "琛岋細鏁伴噺璇疯緭鍏ュぇ浜�0鐨勬暟瀛楋紒"); + return false; + } + if (option.data[i]["HMaterID"] == 0 || option.data[i]["HMaterID"] == undefined || option.data[i]["HMaterID"] == null) { + layer.msg("绗�" + (i + 1) + "琛岋細鐗╂枡淇℃伅涓嶅厑璁镐负绌猴紒"); + return false; + } + if (option.data[i]["HProcID"] == 0 || option.data[i]["HProcID"] == undefined || option.data[i]["HProcID"] == null) { + layer.msg("绗�" + (i + 1) + "琛岋細宸ュ簭淇℃伅涓嶅厑璁镐负绌猴紒"); + return false; + } + if (option.data[i]["HResult"] == 0 || option.data[i]["HResult"] == undefined || option.data[i]["HResult"] == null) { + layer.msg("绗�" + (i + 1) + "琛岋細鍒ゅ畾缁撴灉涓嶅厑璁镐负绌猴紒"); + return false; + } + if (option.data[i]["HBadReasonID"] == 0 || option.data[i]["HBadReasonID"] == undefined || option.data[i]["HBadReasonID"] == null) { + layer.msg("绗�" + (i + 1) + "琛岋細涓嶈壇鍘熷洜涓嶅厑璁镐负绌猴紒"); return false; } } @@ -1430,7 +1541,7 @@ layer.close(index);//鍏抽棴寮圭獥 } , end: function () { - if (HDataTemp != {}) { + if (JSON.stringify(HDataTemp) != '{}') { //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� obj.update({ "HMaterID": HDataTemp.HItemID @@ -1473,7 +1584,7 @@ layer.close(index);//鍏抽棴寮圭獥 } , end: function () { - if (HDataTemp != {}) { + if (JSON.stringify(HDataTemp) != '{}') { //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� obj.update({ "HUnitID": HDataTemp.HItemID @@ -1512,7 +1623,7 @@ layer.close(index);//鍏抽棴寮圭獥 } , end: function () { - if (HDataTemp != {}) { + if (JSON.stringify(HDataTemp) != '{}') { //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� obj.update({ "HEmpID": HDataTemp.HItemID @@ -1551,7 +1662,7 @@ layer.close(index);//鍏抽棴寮圭獥 } , end: function () { - if (HDataTemp != {}) { + if (JSON.stringify(HDataTemp) != '{}') { //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� obj.update({ "HSourceID": HDataTemp.HItemID @@ -1590,7 +1701,7 @@ layer.close(index);//鍏抽棴寮圭獥 } , end: function () { - if (HDataTemp != {}) { + if (JSON.stringify(HDataTemp) != '{}') { //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� obj.update({ "HBadReasonID": HDataTemp.HItemID diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillList.html" index f11f002..9649c4f 100644 --- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillList.html" +++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillList.html" @@ -1166,18 +1166,20 @@ option.data = []; ins = table.render(option); laypage.render(optionPage); - //鍒锋柊琛ㄦ牸鏁版嵁 - DisPlay_HideColumn(); - - //鍒锋柊鎸夐挳鏄剧ず - var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞� - var HBillType = "3710"; - Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]); - - if ($("#Comparator").val() == 0 && $("#ColContent").val() == "" && $("#Comparator1").val() == 0 && $("#ColContent1").val() == "" && $("#Comparator2").val() == 0 && $("#ColContent2").val() == "") { - ColFilter(); - } layer.close(ajaxLoad); + layer.alert(data1.code + data1.Message, { icon: 5 }); + //鍒锋柊琛ㄦ牸鏁版嵁 + //DisPlay_HideColumn(); + + ////鍒锋柊鎸夐挳鏄剧ず + //var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞� + //var HBillType = "3710"; + //Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]); + + //if ($("#Comparator").val() == 0 && $("#ColContent").val() == "" && $("#Comparator1").val() == 0 && $("#ColContent1").val() == "" && $("#Comparator2").val() == 0 && $("#ColContent2").val() == "") { + // ColFilter(); + //} + //layer.close(ajaxLoad); /*layer.alert(data1.code + data1.Message, { icon: 5 });*/ } }, error: function () { diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\212\225\346\226\231\345\215\225/Sc_PPBomBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\212\225\346\226\231\345\215\225/Sc_PPBomBillList.html" index 39b9f7e..12b1479 100644 --- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\212\225\346\226\231\345\215\225/Sc_PPBomBillList.html" +++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\212\225\346\226\231\345\215\225/Sc_PPBomBillList.html" @@ -212,15 +212,16 @@ <!--<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-confirm" id="btn_confirm"><i class="layui-icon layui-icon-ok-circle"></i>纭</button> - <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back" id="btn_back"><i class="layui-icon layui-icon-close-fill"></i>椹冲洖</button> - <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details"><i class="layui-icon layui-icon-form"></i>璇︽儏</button> - <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate"><i class="layui-icon layui-icon-file"></i>鐢熸垚閫佽揣鍗�</button>--> - <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add"><i class="layui-icon layui-icon-file-b"></i>鏂板</button> - <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit"><i class="layui-icon layui-icon-form"></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="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-view"><i class="layui-icon layui-icon-tips"></i>棰勮</button>--> + <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back" id="btn_back"><i class="layui-icon layui-icon-close-fill"></i>椹冲洖</button> + <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details"><i class="layui-icon layui-icon-form"></i>璇︽儏</button> + <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate"><i class="layui-icon layui-icon-file"></i>鐢熸垚閫佽揣鍗�</button>--> + <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add"><i class="layui-icon layui-icon-file-b"></i>鏂板</button> + <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit"><i class="layui-icon layui-icon-form"></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="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-view"><i class="layui-icon layui-icon-tips"></i>棰勮</button>--> + <button type="button" class="layui-btn layui-btn-sm" lay-event="get_export" id="get_export"><i class="layui-icon layui-icon-export"></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-exit"><i class="layui-icon layui-icon-return"></i>閫�鍑�</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button> @@ -249,6 +250,7 @@ , laypage = layui.laypage , laydate = layui.laydate , soulTable = layui.soulTable + var ins; var sWhere = ""; var option = []; var page = 1;//鍒嗛〉鏁版嵁 @@ -392,6 +394,22 @@ layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒'); } break; + //瀵煎嚭excel + case 'get_export': + var data = option.data + data.forEach((item) => { + for (let itemobj in item) { + if (item[itemobj] == null) { + item[itemobj] = ""; + } + if (item[itemobj].length > 0) { // 鍋囪瀛楁鍚嶄负field + item[itemobj] = item[itemobj].toString().replace(/[\r\n]+/g, ''); // 灏嗘崲琛岀鏇挎崲涓虹┖瀛楃涓� + } + } + }); + + table.exportFile(ins.config.id, option.data, "xls"); + break; } }) //#endregion diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillList.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillList.html" index 370eed7..33adae7 100644 --- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillList.html" +++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillList.html" @@ -191,6 +191,7 @@ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CancelCloseBill" id="set_CancelCloseBill"><i class="layui-icon layui-icon-form"></i>鍙嶅叧闂�</button> <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-ProcessCheck" id="btn-ProcessCheck">宸ュ簭妫�楠�</button> <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-NoPassProd" id="btn-NoPassProd">涓嬫帹涓嶈壇鍝佽瘎瀹″鐞嗗崟</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-QualityReport" id="btn-QualityReport">涓嬫帹璐ㄩ噺姹囨姤鍗�</button> <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Print" id="btn-Print"><i class="layui-icon layui-icon-circle"></i>棰勮</button>--> <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Cell" id="btn-Cell"><i class="layui-icon layui-icon-ok"></i>淇濆瓨鍒楀</button>--> <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-RefreshCell" id="btn-RefreshCell"><i class="layui-icon layui-icon-refresh"></i>榛樿鍒楀</button>--> @@ -728,6 +729,9 @@ //涓嬫帹宸ュ簭鍑虹珯姹囨姤鍗� case 'btn-NoPassProd': set_NoPassProd(); break; + //涓嬫帹璐ㄩ噺姹囨姤鍗� + case 'btn-QualityReport': set_QualityReport(); + break; //棰勮 case 'btn-Cell': layer.msg('棰勮锛�'); break; @@ -818,7 +822,7 @@ function get_HideColumn() { var colName = ""; for (var i = 1; i < option.cols[0].length; i++) { - colName += option.cols[0][i]["title"] + ","; + colName += option.cols[0][i]["field"] + ","; } colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜 @@ -830,7 +834,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) { //鍒锋柊琛ㄦ牸鏁版嵁 @@ -842,93 +846,194 @@ } //鏄剧ず鍒楁暟鎹� 涓昏〃 + //function DisPlay_HideColumn() { + // $.ajax({ + // url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', + // type: "GET", + // data: { "HModName": HModName, "user": sessionStorage["HUserName"] }, + // success: function (data1) { + // if (data1.data.length != 0) { + + + // var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁 + // /*var titleData = ["HMaterID", "HUnitID", "HSourceID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�*/ + + // dataCol = data1.data[0].HGridString.split(','); + + // for (var i = 0; i < option.cols[0].length - 1; i++) { + // if (dataCol[i]) { + // var dataCols = dataCol[i].split('|'); + // } + // //闅愯棌鍒� + // 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 (data1.data[0].HColumnWidth != 0) { + // // option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;"; + // //} else { + // // option.cols[0][i + 1]["width"] = ""; + // //} + // //鏄剧ず鍒� + // if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) { + // option.cols[0][i + 1]["hide"] = false; + // } + // //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�) + // 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; + // } + // } + + // //鍙栨秷鍐荤粨鍒� + // 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); + // } else { + // table.render(option); + // } + + // var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞� + // Display_HideButton(btns, "3791", HModName, sessionStorage["HUserName"]); + + // }, error: function () { + // layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + // } + // }) + //} + + //#region 鏄剧ず鍒楁暟鎹� function DisPlay_HideColumn() { $.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 = ["HMaterID", "HUnitID", "HSourceID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�*/ - + 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++) { - if (dataCol[i]) { - var dataCols = dataCol[i].split('|'); - } - //闅愯棌鍒� - 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 (data1.data[0].HColumnWidth != 0) { - // option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;"; - //} else { - // option.cols[0][i + 1]["width"] = ""; - //} - //鏄剧ず鍒� - if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) { - option.cols[0][i + 1]["hide"] = false; - } - //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�) - 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; - } - } - - //鍙栨秷鍐荤粨鍒� - 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); } else { table.render(option); } - var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞� Display_HideButton(btns, "3791", HModName, sessionStorage["HUserName"]); - }, error: function () { layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); } }) } + //#endregion + + //闅愯棌鍒楄缃� 宸ヨ壓鍙傛暟 function get_HideColumn_TechParam() { @@ -1545,6 +1650,51 @@ }) } else { layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒'); + } + } + + //涓嬫帹璐ㄩ噺姹囨姤鍗� + function set_QualityReport() { + var checkStatus = table.checkStatus('mainTable') + , data = checkStatus.data; + if (checkStatus.data.length > 0) { + + var linterid = []; + var HERR = ""; + var HGroupID_JY = data[0].HGroupID; + var HDeptID_JY = data[0].HDeptID; + + for (var i = 0; i < checkStatus.data.length; i++) { + if (data[i].HGroupID != HGroupID_JY || data[i].HDeptID || HDeptID_JY) { + HERR += "绗�" + (i+1) + "琛岋紝鐢熶骇鐝粍鎴栬�呯敓浜ц溅闂达紝涓庡叾浣欒涓嶄竴鑷达紝涓嶅厑璁稿悎骞朵笅鎺紒" + } + + linterid.push(data[i].hmainid.toString()); + } + + if (HERR != "") { + layer.msg(HERR,{ time: 3000, }) + return; + } + + layer.open({ + type: 2 + , area: ['100%', '100%'] + , title: '璐ㄩ噺姹囨姤鍗�-缂栬緫' + , shade: 0.6 + , maxmin: false + , anim: 0 + , content: ['../../鐢熶骇绠$悊/鎶ュ伐鍙板伐搴�/涓嶈壇閲囬泦/Sc_QualityReportStepBill_New.html?OperationType=' + 6 + '&linterid=' + linterid.toString() + '&HEntry=0&HProcNo=' + 0 + '&HEntryID=' + 0 + '', 'yes'] + , resize: false + , cancel: function () { + btnIs(); + } + , end: function () { + get_FastQuery(table, option); + } + }) + } else { + layer.msg('璇烽�夋嫨鏁版嵁涓嬫帹锛�'); } } @@ -2307,7 +2457,7 @@ var Organization = '<option value="0" selected="selected" ></option>'; for (var i = 1; i < option.cols[0].length; i++) { if (option.cols[0][i].hide != true) { - Organization += '<option style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>'; + Organization += '<option style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].title + '</option>'; } } $("#ColName").empty() diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBillList.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBillList.html" index d5484dc..c0a7150 100644 --- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBillList.html" +++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBillList.html" @@ -1612,9 +1612,6 @@ //鍒锋柊琛ㄦ牸鏁版嵁 DisPlay_HideColumn(); - var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞� - Display_HideButton(btns, "3772", HModName, sessionStorage["HUserName"]); - if ($("#Comparator").val() == 0 && $("#ColContent").val() == "" && $("#Comparator1").val() == 0 && $("#ColContent1").val() == "" && $("#Comparator2").val() == 0 && $("#ColContent2").val() == "") { ColFilter(); } @@ -1669,9 +1666,6 @@ //鍒锋柊琛ㄦ牸鏁版嵁 DisPlay_HideColumn(); - var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞� - Display_HideButton(btns, "3772", HModName, sessionStorage["HUserName"]); - if ($("#Comparator").val() == 0 && $("#ColContent").val() == "" && $("#Comparator1").val() == 0 && $("#ColContent1").val() == "" && $("#Comparator2").val() == 0 && $("#ColContent2").val() == "") { ColFilter(); } @@ -1693,8 +1687,8 @@ //#region 闅愯棌鍒楄缃� (涓诲垪琛�) function get_HideColumn1() { var colName = ""; - for (var i = 1; i < option.cols[0].length - 1; i++) { - colName += option.cols[0][i]["title"] + ","; + for (var i = 1; i < option.cols[0].length; i++) { + colName += option.cols[0][i]["field"] + ","; } colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜 @@ -1706,7 +1700,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) { //鍒锋柊琛ㄦ牸鏁版嵁 @@ -2165,95 +2159,196 @@ // } //} - //#region 鏄剧ず鍒楁暟鎹� (涓诲垪琛�) + ////#region 鏄剧ず鍒楁暟鎹� (涓诲垪琛�) + //function DisPlay_HideColumn() { + // $.ajax({ + // url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', + // type: "GET", + // data: { "HModName": HModName, "user": sessionStorage["HUserName"] }, + // success: function (data1) { + // if (data1.data.length != 0) { + + + // var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁 + // /*var titleData = ["hmainid", "hicmointerid", "HWorkShopID", "HDeptID", "HMaterID", "HMaterID2", "HUnitID", "HBillType", "hsubid"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�*/ + // var titleData = ["HEntryID", "HWorkShopID", "HMaterID", "HSupID", "HPRDORGID", "HEquipMentID", "hsubid", "HICMOEntryID", "HDeptID", "hmainid", "hicmointerid", "HICMOInterID", "HMaterID2", "HUnitID", "HBillType", "HRoutingBillID", "HAuxUnit", "鐢熶骇杞﹂棿浠g爜", "鐢熶骇杞﹂棿", "鏉愯川", "鎴愬搧缂栧彿", "鐗堟湰", "鎬昏鍥惧彿", "鍥惧彿鐗堟湰", "瀛愪欢浠g爜", "瀛愪欢鍚嶇О", "瀛愪欢瑙勬牸", "鎵瑰彿", "濮斿鍔犲伐鍗曚綅浠g爜", "濮斿鍔犲伐鍗曚綅", "璁惧鍚嶇О", "璁惧浠g爜", "鍘熸枡鎵规", "琛ユ枡鏍囪", "椤圭洰缂栧彿", "涓昏鏉愭枡", "鍏抽敭鏉愭枡", "浜у搧CODE", "閿�鍞鍗曞彿", "瀹㈡埛绠�绉�", "瀹㈡埛瑕佹眰鏉愭枡鎴愬垎", "浜у搧鍚嶇О2", "瀹㈡埛鍚嶇О", "鐢熶骇澶囨敞", "閲嶈鎻愮ず", "鍘熸潗鏂欑紪鍙稟", "鍘熸潗鏂欑紪鍙稡", "鍘熸潗鏂欑紪鍙稢", "鍘熸潗鏂欑紪鍙稤", "鍘熸潗鏂欏唴鐮丄", "鍘熸潗鏂欏唴鐮丅", "鍘熸潗鏂欏唴鐮丆", "鍘熸潗鏂欏唴鐮丏", "鏃ヨ鍒掑伐鍗曞彿", "瀹㈡埛缂栫爜", "鑺綋瑙勬牸鍨嬪彿", "鑺綋鐗╂枡浠g爜", "婧愬崟瀹㈡埛浠g爜", "HEmpID", "HCusID", "HBillSubType"]; + // dataCol = data1.data[0].HGridString.split(','); + + // for (var i = 0; i < option.cols[0].length - 2; i++) { + // if (dataCol[i]) { + // var dataCols = dataCol[i].split('|'); + // } + // //闅愯棌鍒� + // 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 (data1.data[0].HColumnWidth != 0) { + // // option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;"; + // //} else { + // // option.cols[0][i + 1]["width"] = ""; + // //} + // //鏄剧ず鍒� + // if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) { + // option.cols[0][i + 1]["hide"] = false; + // } + // //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�) + // 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; + // } + // } + + // //鍙栨秷鍐荤粨鍒� + // 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); + // } else { + // table.render(option); + // } + + // //$(".layui-table-cell").css({ + // // "height": "21px", + // // "line-height": "21px;" + // //}); + + + // var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞� + // Display_HideButton(btns, "3772", HModName, sessionStorage["HUserName"]); + + // }, error: function () { + // layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + // } + // }) + //} + ////#endregion + + + //#region 鏄剧ず鍒楁暟鎹�(涓诲垪琛�) function DisPlay_HideColumn() { $.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 = ["hmainid", "hicmointerid", "HWorkShopID", "HDeptID", "HMaterID", "HMaterID2", "HUnitID", "HBillType", "hsubid"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�*/ var titleData = ["HEntryID", "HWorkShopID", "HMaterID", "HSupID", "HPRDORGID", "HEquipMentID", "hsubid", "HICMOEntryID", "HDeptID", "hmainid", "hicmointerid", "HICMOInterID", "HMaterID2", "HUnitID", "HBillType", "HRoutingBillID", "HAuxUnit", "鐢熶骇杞﹂棿浠g爜", "鐢熶骇杞﹂棿", "鏉愯川", "鎴愬搧缂栧彿", "鐗堟湰", "鎬昏鍥惧彿", "鍥惧彿鐗堟湰", "瀛愪欢浠g爜", "瀛愪欢鍚嶇О", "瀛愪欢瑙勬牸", "鎵瑰彿", "濮斿鍔犲伐鍗曚綅浠g爜", "濮斿鍔犲伐鍗曚綅", "璁惧鍚嶇О", "璁惧浠g爜", "鍘熸枡鎵规", "琛ユ枡鏍囪", "椤圭洰缂栧彿", "涓昏鏉愭枡", "鍏抽敭鏉愭枡", "浜у搧CODE", "閿�鍞鍗曞彿", "瀹㈡埛绠�绉�", "瀹㈡埛瑕佹眰鏉愭枡鎴愬垎", "浜у搧鍚嶇О2", "瀹㈡埛鍚嶇О", "鐢熶骇澶囨敞", "閲嶈鎻愮ず", "鍘熸潗鏂欑紪鍙稟", "鍘熸潗鏂欑紪鍙稡", "鍘熸潗鏂欑紪鍙稢", "鍘熸潗鏂欑紪鍙稤", "鍘熸潗鏂欏唴鐮丄", "鍘熸潗鏂欏唴鐮丅", "鍘熸潗鏂欏唴鐮丆", "鍘熸潗鏂欏唴鐮丏", "鏃ヨ鍒掑伐鍗曞彿", "瀹㈡埛缂栫爜", "鑺綋瑙勬牸鍨嬪彿", "鑺綋鐗╂枡浠g爜", "婧愬崟瀹㈡埛浠g爜", "HEmpID", "HCusID", "HBillSubType"]; + var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁 + 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 - 2; i++) { - if (dataCol[i]) { - var dataCols = dataCol[i].split('|'); - } - //闅愯棌鍒� - 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 (data1.data[0].HColumnWidth != 0) { - // option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;"; - //} else { - // option.cols[0][i + 1]["width"] = ""; - //} - //鏄剧ず鍒� - if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) { - option.cols[0][i + 1]["hide"] = false; - } - //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�) - 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; - } - } - - //鍙栨秷鍐荤粨鍒� - 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); } else { table.render(option); } - - //$(".layui-table-cell").css({ - // "height": "21px", - // "line-height": "21px;" - //}); - - var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞� Display_HideButton(btns, "3772", HModName, sessionStorage["HUserName"]); - }, error: function () { layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); } @@ -3213,7 +3308,7 @@ var Organization = '<option value="0" selected="selected" ></option>'; for (var i = 1; i < option.cols[0].length; i++) { if (option.cols[0][i].hide != true) { - Organization += '<option style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>'; + Organization += '<option style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].title + '</option>'; } } $("#ColName").empty(); -- Gitblit v1.9.1