From 0afcafc86d9be179db757aee115864d6c1bf1764 Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期三, 20 十二月 2023 10:55:22 +0800 Subject: [PATCH] 1 --- WebTM/views/Baseset/基础资料/Gy_InspectInstruMentList.html | 21 WebTM/views/设备管理/Sb_EquipMaintainPlanBillList.html | 19 WebTM/views/基础资料/生产基础资料/Gy_Source.html | 4 WebTM/views/PublicPage/PartInformation.html | 18 WebTM/views/Baseset/基础资料/Gy_UnitList.html | 24 WebTM/views/PublicPage/RepairCheckItemInformation.html | 20 WebTM/views/PublicPage/FaultTypeInformation.html | 20 WebTM/views/PublicPage/RepairItemInformation.html | 20 WebTM/views/设备管理/设备规程单/Sb_EquipDotCheckRuleList.html | 22 WebTM/views/Baseset/基础资料/Gy_MaterialList.html | 22 WebTM/views/质量管理/质量报表/QC_FirstPassRateWeekReport.html | 2 WebTM/views/PublicPage/SupplierInformation.html | 20 WebTM/views/基础资料/公用基础资料/Gy_EquipType.html | 19 WebTM/views/PublicPage/Gy_Maintain.html | 20 WebTM/views/质量管理/工序检验单/QC_ProcessCheckBill.html | 3 WebTM/views/PublicPage/FaultReasonInformation.html | 20 WebTM/views/质量管理/首件检验单/QC_Add_Edit_FirstPieceCheckBill.html | 7 WebTM/views/设备管理/Sb_EqpMaintenanceBillList.html | 19 WebTM/views/车间管理/工序出站汇报单/Cj_StationOutBillList.html | 804 +++++++++++++++++++++++++++++++ WebTM/views/设备管理/Sb_EqpConkBookBillList.html | 19 WebTM/views/生产管理/生产计划平台/JIT_DayPlanPlatForm.html | 2 WebTM/views/Baseset/基础资料/Gy_QCCheckProjectListView.html | 27 WebTM/views/Baseset/基础资料/Gy_InspectValueList.html | 21 WebTM/views/设备管理/设备规程单/Sb_EquipMaintainRuleList.html | 19 WebTM/views/质量管理/质量报表/QC_FirstPassRateReport.html | 2 WebTM/views/PublicPage/UserInformation.html | 20 WebTM/views/基础资料/公用基础资料/Gy_EquipMent.html | 21 WebTM/views/质量管理/质量报表/QC_ProdBadReasonStatistics.html | 2 WebTM/views/PublicPage/DeptInformation.html | 20 WebTM/views/PublicPage/EqpInformation.html | 20 WebTM/views/PublicPage/UnitInformation.html | 20 WebTM/views/设备管理/Sb_EquipDotCheckPlanBillList.html | 18 WebTM/views/车间管理/单品过站/Cj_ProcessItemStationPlatform.html | 42 + WebTM/views/PublicPage/GroupInformation.html | 21 WebTM/views/质量管理/质量报表/QC_ProdBadReasonStatistics_Sum.html | 2 WebTM/views/基础资料/基础资料/Gy_DotCheckList.html | 19 WebTM/views/PublicPage/SourceInformation.html | 21 WebTM/views/Baseset/基础资料/Gy_RepairList.html | 24 WebTM/views/Baseset/基础资料/Gy_SampleSchemeListView.html | 21 39 files changed, 1,387 insertions(+), 78 deletions(-) diff --git "a/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_InspectInstruMentList.html" "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_InspectInstruMentList.html" index 8d6d4a6..c982cdb 100644 --- "a/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_InspectInstruMentList.html" +++ "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_InspectInstruMentList.html" @@ -27,7 +27,7 @@ </div> </div> </div> - <table class="layui-hide" id="mainTable"></table> + <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> <script src="../../../layuiadmin/layui/layui.js"></script> <script src="../../../layuiadmin/Scripts/json2.js" type="text/javascript"></script> <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js" type="text/javascript"></script> @@ -47,6 +47,25 @@ }); RoadQuery($('#Value').val()); + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) + ///鍔犺浇鏄剧ず鏁版嵁 function RoadQuery(Where) { var ajaxLoad = layer.load(); diff --git "a/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_InspectValueList.html" "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_InspectValueList.html" index a011f51..eafc671 100644 --- "a/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_InspectValueList.html" +++ "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_InspectValueList.html" @@ -27,7 +27,7 @@ </div> </div> </div> - <table class="layui-hide" id="mainTable"></table> + <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> <script src="../../../layuiadmin/layui/layui.js"></script> <script src="../../../layuiadmin/Scripts/json2.js" type="text/javascript"></script> <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js" type="text/javascript"></script> @@ -47,6 +47,25 @@ }); RoadQuery($('#Value').val()); + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) + ///鍔犺浇鏄剧ず鏁版嵁 function RoadQuery(Where) { var ajaxLoad = layer.load(); diff --git "a/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaterialList.html" "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaterialList.html" index 2457413..6f9113f 100644 --- "a/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaterialList.html" +++ "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaterialList.html" @@ -29,7 +29,7 @@ </div> </div> </div> - <table class="layui-hide" id="mainTable"></table> + <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> <script src="../../../layuiadmin/layui/layui.js"></script> <script src="../../../layuiadmin/Scripts/json2.js" type="text/javascript"></script> <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js" type="text/javascript"></script> @@ -72,6 +72,26 @@ , limits: [50, 500, 5000, 50000], limit: 50 }); + + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) + ///鍔犺浇鏄剧ず鏁版嵁 function RoadQuery(Where) { var Value = Where; diff --git "a/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_QCCheckProjectListView.html" "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_QCCheckProjectListView.html" index 0c4be8a..4a8e800 100644 --- "a/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_QCCheckProjectListView.html" +++ "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_QCCheckProjectListView.html" @@ -27,7 +27,7 @@ </div> </div> </div> - <table class="layui-hide" id="mainTable"></table> + <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> <script src="../../../layuiadmin/layui/layui.js"></script> <script src="../../../layuiadmin/Scripts/json2.js" type="text/javascript"></script> <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js" type="text/javascript"></script> @@ -44,13 +44,14 @@ RoadQuery($('#Value').val()); }); RoadQuery($('#Value').val()); + table.render({ elem: '#mainTable' // , url: '/demo/table/user/' , data: [] , cellMinWidth: 80 //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板 , cols: [[ - { type: 'radio' } + { type: 'checkbox', fixed: 'left' } , { field: 'HItemID', title: 'HItemID', hide: true } , { field: '妫�楠屾柟妗堜唬鐮�', title: '妫�楠屾柟妗堜唬鐮�' } , { field: '鏂规鍚嶇О', title: '鏂规鍚嶇О' } @@ -58,7 +59,27 @@ , page: true , limits: [50, 500, 5000, 50000], limit: 50 - }); + }); + + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) + ///鍔犺浇鏄剧ず鏁版嵁 function RoadQuery(Where) { var index = layer.load(); diff --git "a/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairList.html" "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairList.html" index e27e3ab..c5e4e35 100644 --- "a/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairList.html" +++ "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairList.html" @@ -28,7 +28,7 @@ </div> </div> </div> - <table class="layui-hide" id="mainTable"></table> + <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> <script src="../../../layuiadmin/layui/layui.js"></script> <script src="../../../layuiadmin/Scripts/json2.js" type="text/javascript"></script> <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js" type="text/javascript"></script> @@ -84,7 +84,7 @@ , data: [] , cellMinWidth: 80 , cols: [[ - { type: 'radio' } + { type: 'checkbox' } , { field: 'HItemID', width: 150, title: '缁翠慨椤圭洰ID', hide: true } , { field: 'HNumber', width: 150, title: '缁翠慨椤圭洰浠g爜' } , { field: 'HName', width: 150, title: '缁翠慨椤圭洰', sort: true } @@ -93,6 +93,26 @@ , limits: [50, 500, 5000, 50000], limit: 50 }); + + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) + ///鍔犺浇鏄剧ず鏁版嵁 function RoadQuery(Where) { var Value = Where; diff --git "a/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SampleSchemeListView.html" "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SampleSchemeListView.html" index fa10034..984e87c 100644 --- "a/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SampleSchemeListView.html" +++ "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SampleSchemeListView.html" @@ -27,7 +27,7 @@ </div> </div> </div> - <table class="layui-hide" id="mainTable"></table> + <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> <script src="../../../layuiadmin/layui/layui.js"></script> <script src="../../../layuiadmin/Scripts/json2.js" type="text/javascript"></script> <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js" type="text/javascript"></script> @@ -46,6 +46,25 @@ RoadQuery($('#Value').val()); }); RoadQuery($('#Value').val()); + + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) ///鍔犺浇鏄剧ず鏁版嵁 function RoadQuery(Where) { diff --git "a/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_UnitList.html" "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_UnitList.html" index fb34528..82799fe 100644 --- "a/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_UnitList.html" +++ "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_UnitList.html" @@ -30,7 +30,7 @@ </div> </div> </div> - <table class="layui-hide" id="mainTable"></table> + <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> <script src="../../../layuiadmin/layui/layui.js"></script> <script src="../../../layuiadmin/Scripts/json2.js" type="text/javascript"></script> <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js" type="text/javascript"></script> @@ -69,7 +69,7 @@ , data: [] , cellMinWidth: 80 //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板 , cols: [[ - { type: 'radio' } + { type: 'checkbox', fixed: 'left' } , { field: 'HItemID', width: 150, title: '鍗曚綅ID', hide: true } , { field: 'HNumber', width: 150, title: '璁¢噺鍗曚綅浠g爜' } , { field: 'HName', width: 150, title: '璁¢噺鍗曚綅', sort: true } @@ -78,6 +78,26 @@ , limits: [50, 500, 5000, 50000], limit: 50 }); + + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) + ///鍔犺浇鏄剧ず鏁版嵁 function RoadQuery(Where) { var Value = Where; diff --git a/WebTM/views/PublicPage/DeptInformation.html b/WebTM/views/PublicPage/DeptInformation.html index 52cfdd2..263fba3 100644 --- a/WebTM/views/PublicPage/DeptInformation.html +++ b/WebTM/views/PublicPage/DeptInformation.html @@ -136,6 +136,24 @@ // } //}); + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) var option = { elem: '#mainTable' @@ -144,7 +162,7 @@ , page: true , cellMinWidth: 90 , cols: [[ - { type: 'radio', fixed: 'left' } + { type: 'checkbox', fixed: 'left' } , { field: 'HItemID', title: 'HItemID', sort: true, hide: true } , { field: 'ParentID', title: 'ParentID', sort: true, hide: true } , { field: 'HNumber', title: '閮ㄩ棬浠g爜' } diff --git a/WebTM/views/PublicPage/EqpInformation.html b/WebTM/views/PublicPage/EqpInformation.html index 388b2c1..fd7c1dd 100644 --- a/WebTM/views/PublicPage/EqpInformation.html +++ b/WebTM/views/PublicPage/EqpInformation.html @@ -135,6 +135,24 @@ // } //}); + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) var option = { elem: '#mainTable' @@ -143,7 +161,7 @@ , page: true , cellMinWidth: 90 , cols: [[ - { type: 'radio', fixed: 'left' } + { type: 'checkbox', fixed: 'left' } , { field: 'HInterID', title: 'HInterID', sort: true, hide: true } , { field: 'ParentID', title: 'ParentID', sort: true, hide: true } , { field: 'HEquipFileNumber', title: '璁惧浠g爜' } diff --git a/WebTM/views/PublicPage/FaultReasonInformation.html b/WebTM/views/PublicPage/FaultReasonInformation.html index bf129b8..fe45012 100644 --- a/WebTM/views/PublicPage/FaultReasonInformation.html +++ b/WebTM/views/PublicPage/FaultReasonInformation.html @@ -135,6 +135,24 @@ // } //}); + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) var option = { elem: '#mainTable' @@ -143,7 +161,7 @@ , page: true , cellMinWidth: 90 , cols: [[ - { type: 'radio', fixed: 'left' } + { type: 'checkbox', fixed: 'left' } , { field: 'HItemID', title: 'HItemID', sort: true, hide: true } , { field: 'ParentID', title: 'ParentID', sort: true, hide: true } , { field: 'HNumber', title: '鏁呴殰鍘熷洜浠g爜' } diff --git a/WebTM/views/PublicPage/FaultTypeInformation.html b/WebTM/views/PublicPage/FaultTypeInformation.html index d25071c..9904161 100644 --- a/WebTM/views/PublicPage/FaultTypeInformation.html +++ b/WebTM/views/PublicPage/FaultTypeInformation.html @@ -135,6 +135,24 @@ // } //}); + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) var option = { elem: '#mainTable' @@ -143,7 +161,7 @@ , page: true , cellMinWidth: 90 , cols: [[ - { type: 'radio', fixed: 'left' } + { type: 'checkbox', fixed: 'left' } , { field: 'HItemID', title: 'HItemID', sort: true, hide: true } , { field: 'ParentID', title: 'ParentID', sort: true, hide: true } , { field: 'HNumber', title: '鏁呴殰绫诲埆浠g爜' } diff --git a/WebTM/views/PublicPage/GroupInformation.html b/WebTM/views/PublicPage/GroupInformation.html index 9451bad..a5ee1b8 100644 --- a/WebTM/views/PublicPage/GroupInformation.html +++ b/WebTM/views/PublicPage/GroupInformation.html @@ -89,6 +89,25 @@ , tree = layui.tree var sWhere = ""; + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) + var option = { elem: '#mainTable' //, toolbar: '#toolbarDemo' @@ -96,7 +115,7 @@ , page: true , cellMinWidth: 90 , cols: [[ - { type: 'radio', fixed: 'left' } + { type: 'checkbox', fixed: 'left' } , { field: 'HItemID', title: 'HItemID', sort: true, hide: true } , { field: 'ParentID', title: 'ParentID', sort: true, hide: true } , { field: 'HNumber', title: '鐝粍浠g爜' } diff --git a/WebTM/views/PublicPage/Gy_Maintain.html b/WebTM/views/PublicPage/Gy_Maintain.html index 7f6ad9d..a686e77 100644 --- a/WebTM/views/PublicPage/Gy_Maintain.html +++ b/WebTM/views/PublicPage/Gy_Maintain.html @@ -136,6 +136,24 @@ // } //}); + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) var option = { elem: '#mainTable' @@ -144,7 +162,7 @@ , page: true , cellMinWidth: 90 , cols: [[ - { type: 'radio', fixed: 'left' } + { type: 'checkbox', fixed: 'left' } , { field: 'HItemID', title: 'HItemID', sort: true, hide: true } , { field: 'ParentID', title: 'ParentID', sort: true, hide: true } , { field: 'HNumber', title: '淇濆吇椤圭洰浠g爜' } diff --git a/WebTM/views/PublicPage/PartInformation.html b/WebTM/views/PublicPage/PartInformation.html index a395bf0..e4bccf3 100644 --- a/WebTM/views/PublicPage/PartInformation.html +++ b/WebTM/views/PublicPage/PartInformation.html @@ -136,6 +136,24 @@ // } //}); + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) var option = { elem: '#mainTable' diff --git a/WebTM/views/PublicPage/RepairCheckItemInformation.html b/WebTM/views/PublicPage/RepairCheckItemInformation.html index 78b8cd0..2ce3ee0 100644 --- a/WebTM/views/PublicPage/RepairCheckItemInformation.html +++ b/WebTM/views/PublicPage/RepairCheckItemInformation.html @@ -135,6 +135,24 @@ // } //}); + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) var option = { elem: '#mainTable' @@ -143,7 +161,7 @@ , page: true , cellMinWidth: 90 , cols: [[ - { type: 'radio', fixed: 'left' } + { type: 'checkbox', fixed: 'left' } , { field: 'HItemID', title: 'HItemID', sort: true, hide: true } , { field: 'ParentID', title: 'ParentID', sort: true, hide: true } , { field: 'HNumber', title: '缁翠慨楠屾敹椤圭洰浠g爜' } diff --git a/WebTM/views/PublicPage/RepairItemInformation.html b/WebTM/views/PublicPage/RepairItemInformation.html index e50860c..f8b0b49 100644 --- a/WebTM/views/PublicPage/RepairItemInformation.html +++ b/WebTM/views/PublicPage/RepairItemInformation.html @@ -135,6 +135,24 @@ // } //}); + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) var option = { elem: '#mainTable' @@ -143,7 +161,7 @@ , page: true , cellMinWidth: 90 , cols: [[ - { type: 'radio', fixed: 'left' } + { type: 'checkbox', fixed: 'left' } , { field: 'HItemID', title: 'HItemID', sort: true, hide: true } , { field: 'ParentID', title: 'ParentID', sort: true, hide: true } , { field: 'HNumber', title: '缁翠慨椤圭洰浠g爜' } diff --git a/WebTM/views/PublicPage/SourceInformation.html b/WebTM/views/PublicPage/SourceInformation.html index ef2adfc..58fd7eb 100644 --- a/WebTM/views/PublicPage/SourceInformation.html +++ b/WebTM/views/PublicPage/SourceInformation.html @@ -134,7 +134,24 @@ // }); // } //}); - + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) var option = { elem: '#mainTable' @@ -143,7 +160,7 @@ , page: true , cellMinWidth: 90 , cols: [[ - { type: 'radio', fixed: 'left' } + { type: 'checkbox', fixed: 'left' } , { field: 'HItemID', title: 'HItemID', sort: true, hide: true } , { field: 'ParentID', title: 'ParentID', sort: true, hide: true } , { field: 'HNumber', title: '璧勬簮浠g爜' } diff --git a/WebTM/views/PublicPage/SupplierInformation.html b/WebTM/views/PublicPage/SupplierInformation.html index 409f22f..ccc43ca 100644 --- a/WebTM/views/PublicPage/SupplierInformation.html +++ b/WebTM/views/PublicPage/SupplierInformation.html @@ -136,6 +136,24 @@ // } //}); + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) var option = { elem: '#mainTable' @@ -144,7 +162,7 @@ , page: true , cellMinWidth: 90 , cols: [[ - { type: 'radio', fixed: 'left' } + { type: 'checkbox', fixed: 'left' } , { field: 'HItemID', title: 'HItemID', sort: true, hide: true } , { field: 'ParentID', title: 'ParentID', sort: true, hide: true } , { field: 'HNumber', title: '渚涘簲鍟嗕唬鐮�' } diff --git a/WebTM/views/PublicPage/UnitInformation.html b/WebTM/views/PublicPage/UnitInformation.html index fb5220f..400ae52 100644 --- a/WebTM/views/PublicPage/UnitInformation.html +++ b/WebTM/views/PublicPage/UnitInformation.html @@ -136,6 +136,24 @@ // } //}); + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) var option = { elem: '#mainTable' @@ -144,7 +162,7 @@ , page: true , cellMinWidth: 90 , cols: [[ - { type: 'radio', fixed: 'left' } + { type: 'checkbox', fixed: 'left' } , { field: 'HItemID', title: 'HItemID', sort: true, hide: true } , { field: 'ParentID', title: 'ParentID', sort: true, hide: true } , { field: 'HNumber', title: '鍗曚綅浠g爜' } diff --git a/WebTM/views/PublicPage/UserInformation.html b/WebTM/views/PublicPage/UserInformation.html index 6ba1919..d8e5170 100644 --- a/WebTM/views/PublicPage/UserInformation.html +++ b/WebTM/views/PublicPage/UserInformation.html @@ -152,6 +152,24 @@ //}); } + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) var option = { @@ -163,7 +181,7 @@ , limit: 50 , cellMinWidth: 90 , cols: [[ - { type: 'radio', fixed: 'left' } + { type: 'checkbox', fixed: 'left' } , { field: 'HItemID', title: 'HItemID', sort: true, hide: true } , { field: 'ParentID', title: 'ParentID', sort: true, hide: true } , { field: 'HNumber', title: '鑱屽憳浠g爜' } diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_EquipMent.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_EquipMent.html" index 2f1b1b8..372788d 100644 --- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_EquipMent.html" +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_EquipMent.html" @@ -90,6 +90,25 @@ get_Display(sWhere); //#endregion + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) + //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛� //鏌ヨ鎸夐挳 @@ -175,7 +194,7 @@ , limit: 50 , cellMinWidth: 90 , cols: [[ - { type: 'radio', fixed: 'left' } + { type: 'checkbox', fixed: 'left' } , { field: 'HItemID', title: 'HItemID', sort: true, hide: true } , { field: '璁惧浠g爜', title: '璁惧浠g爜' } , { field: '璁惧鍚嶇О', title: '璁惧鍚嶇О' } diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_EquipType.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_EquipType.html" index 74b601b..5056a66 100644 --- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_EquipType.html" +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_EquipType.html" @@ -129,6 +129,25 @@ break; }; }); + + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) //#endregion //#region 閲嶇疆鎸夐挳 diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckList.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckList.html" index 5beeef6..7781d56 100644 --- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckList.html" +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckList.html" @@ -169,6 +169,25 @@ break; }; }); + + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) //#endregion //#region 閲嶇疆鎸夐挳 diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\347\224\237\344\272\247\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Source.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\347\224\237\344\272\247\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Source.html" index 3632b50..2eafb93 100644 --- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\347\224\237\344\272\247\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Source.html" +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\347\224\237\344\272\247\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Source.html" @@ -207,10 +207,10 @@ obj.tr.find(':checkbox').prop('checked', flag); if (flag) { obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 - //$(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� } else { obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 - //$(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 } //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 layui.each(table.cache.mainTable, function (i, l) { diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatForm.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatForm.html" index a939394..de6e8ae 100644 --- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatForm.html" +++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatForm.html" @@ -2228,7 +2228,7 @@ if (parseFloat(table.cache["mainTable"][i]["鎷嗗崟鏁伴噺"]) == 0) { return layer.msg("绗�" + (i + 1) + "琛�,鎷嗕骇鏁伴噺鏈夎,璇烽噸鏂拌緭鍏�!"); } - if (parseFloat(table.cache["mainTable"][i]["鎷嗗崟鏁伴噺"]) < parseFloat(table.cache["mainTable"][i]["鏃ヨ鍒掓暟閲忔�婚噺"]) + parseFloat(table.cache["mainTable"][i]["浠婃棩涔嬪墠鏃ヨ鍒掓暟閲�"])) { + if (parseFloat(table.cache["mainTable"][i]["鎷嗗崟鏁伴噺"]) < parseFloat(table.cache["mainTable"][i]["鏃ヨ鍒掓暟閲忔�婚噺"]) + parseFloat(table.cache["mainTable"][i]["浠婃棩涔嬪墠鏃ヨ鍒掓暟閲�"])) { // - 宸叉眹鎶ユ暟閲� return layer.msg("绗�" + (i + 1) + "琛�,鎺掍骇鏁伴噺瓒呭嚭璁㈠崟鏁伴噺!"); } table.cache["mainTable"][i].LAY_TABLE_INDEX = i; diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EqpConkBookBillList.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EqpConkBookBillList.html" index 48b24d9..3352e0f 100644 --- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EqpConkBookBillList.html" +++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EqpConkBookBillList.html" @@ -353,6 +353,25 @@ }; }); + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) + //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛� var ajaxLoad = layer.load(); $.ajax({ diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EqpMaintenanceBillList.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EqpMaintenanceBillList.html" index dd08ef0..571c93c 100644 --- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EqpMaintenanceBillList.html" +++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EqpMaintenanceBillList.html" @@ -217,6 +217,25 @@ }; }); + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) + // 鏌ヨ鎸夐挳 form.on('submit(btnSearch)', function (data) { get_FastQuery(); diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckPlanBillList.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckPlanBillList.html" index 70bd7ab..7c83592 100644 --- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckPlanBillList.html" +++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckPlanBillList.html" @@ -182,6 +182,24 @@ break; }; }); + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) //閲嶇疆鎸夐挳 form.on('submit(btnReSearch)', function (data) { set_ClearQuery(); diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainPlanBillList.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainPlanBillList.html" index fcd014b..7071165 100644 --- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainPlanBillList.html" +++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainPlanBillList.html" @@ -239,6 +239,25 @@ }); }); + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) + //閲嶇疆鎸夐挳 form.on('submit(btnReSearch)', function (data) { set_ClearQuery(); diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\350\247\204\347\250\213\345\215\225/Sb_EquipDotCheckRuleList.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\350\247\204\347\250\213\345\215\225/Sb_EquipDotCheckRuleList.html" index 6f27fd4..3f6189d 100644 --- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\350\247\204\347\250\213\345\215\225/Sb_EquipDotCheckRuleList.html" +++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\350\247\204\347\250\213\345\215\225/Sb_EquipDotCheckRuleList.html" @@ -181,6 +181,28 @@ break; }; }); + + + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) + + //鏌ヨ鎸夐挳 form.on('submit(btnSearch)', function (data) { get_FastQuery(); diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\350\247\204\347\250\213\345\215\225/Sb_EquipMaintainRuleList.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\350\247\204\347\250\213\345\215\225/Sb_EquipMaintainRuleList.html" index f8674b3..3092f05 100644 --- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\350\247\204\347\250\213\345\215\225/Sb_EquipMaintainRuleList.html" +++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\350\247\204\347\250\213\345\215\225/Sb_EquipMaintainRuleList.html" @@ -256,6 +256,25 @@ }); }); + table.on('row(mainTable)', function (obj) { + //閫変腑琛屾敼鍙橀鑹� + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + }) + //閲嶇疆鎸夐挳 form.on('submit(btnReSearch)', function (data) { set_ClearQuery(); diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBill.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBill.html" index 13fb9a4..8b11efc 100644 --- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBill.html" +++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBill.html" @@ -1383,7 +1383,6 @@ } ) - console.log(data[i].鐩爣鍊�); SummaryIndex.push(i.toString()); } @@ -1676,7 +1675,6 @@ $("#HRejectQty").val(checkStatus.data[0].鎷掔粷鏁�); $("#HUpLimit").val(checkStatus.data[0].涓婇檺鍊�); $("#HDownLimit").val(checkStatus.data[0].涓嬮檺鍊�); - option.data[$("#HEntryID").val() - 1].HSampleSchemeID = checkStatus.data[0].hmainid; option.data[$("#HEntryID").val() - 1].HSampleSchemeName = checkStatus.data[0].鎶芥牱鏂规鍚嶇О; option.data[$("#HEntryID").val() - 1].HSamplingType = checkStatus.data[0].鎶芥牱绫诲瀷; @@ -2739,7 +2737,6 @@ //#region銆愯祴鍊间笌鍥炴樉銆� function Assignment(nowindex, dataindex) { - console.log(JSON.stringify(option.data)); if (SummaryIndex.indexOf(nowindex) == -1 && option.data[0].HSampleSchemeID == 0) { var dataobj = { HEntryID: $("#HEntryID").val(), //琛屽彿 diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_FirstPassRateReport.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_FirstPassRateReport.html" index 034fe1c..5244556 100644 --- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_FirstPassRateReport.html" +++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_FirstPassRateReport.html" @@ -145,7 +145,7 @@ switch ($("#HDeptName").val()) { case '缁曠嚎鑷姩杞﹂棿': - HTitle = '姝ヨ繘鐢垫満鐩撮�氱巼瓒嬪娍鍥�'; + HTitle = '绾垮寘缁曠嚎鐩撮�氱巼瓒嬪娍鍥�'; break; case '瑁呴厤鑷姩杞﹂棿': HTitle = '鍚屾鐢垫満鐩撮�氱巼瓒嬪娍鍥�'; diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_FirstPassRateWeekReport.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_FirstPassRateWeekReport.html" index 467aa39..c20c190 100644 --- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_FirstPassRateWeekReport.html" +++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_FirstPassRateWeekReport.html" @@ -144,7 +144,7 @@ switch ($("#HDeptName").val()) { case '绾垮寘杞﹂棿': - HTitle = '姝ヨ繘鐢垫満鐩撮�氱巼瓒嬪娍鍥�'; + HTitle = '绾垮寘缁曠嚎鐩撮�氱巼瓒嬪娍鍥�'; break; case '鍚屾杞﹂棿': HTitle = '鍚屾鐢垫満鐩撮�氱巼瓒嬪娍鍥�'; diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_ProdBadReasonStatistics.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_ProdBadReasonStatistics.html" index 413fe0f..34b1771 100644 --- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_ProdBadReasonStatistics.html" +++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_ProdBadReasonStatistics.html" @@ -181,7 +181,7 @@ data_t.push(HBadReason_HXH); switch ($("#HDeptName").val()) { case '绾垮寘杞﹂棿': - HTitle = '姝ヨ繘鐢垫満鐩撮�氱巼瓒嬪娍鍥�'; + HTitle = '绾垮寘缁曠嚎鐩撮�氱巼瓒嬪娍鍥�'; H_X = ["鍖濋棿涓嶈壇", "鐢甸樆涓嶈壇", "鎶ょ嚎鐩掍笉鑹�"]; data_t.push(HBadReason_ZJ); diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_ProdBadReasonStatistics_Sum.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_ProdBadReasonStatistics_Sum.html" index ce766bd..f8aea36 100644 --- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_ProdBadReasonStatistics_Sum.html" +++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_ProdBadReasonStatistics_Sum.html" @@ -181,7 +181,7 @@ data_t.push(HBadReason_HXH); switch ($("#HDeptName").val()) { case '绾垮寘杞﹂棿': - HTitle = '姝ヨ繘鐢垫満鐩撮�氱巼瓒嬪娍鍥�'; + HTitle = '绾垮寘缁曠嚎鐩撮�氱巼瓒嬪娍鍥�'; H_X = ["鍖濋棿涓嶈壇", "鐢甸樆涓嶈壇", "鎶ょ嚎鐩掍笉鑹�"]; data_t.push(HBadReason_ZJ); diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_Add_Edit_FirstPieceCheckBill.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_Add_Edit_FirstPieceCheckBill.html" index 32a4944..fdcd920 100644 --- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_Add_Edit_FirstPieceCheckBill.html" +++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_Add_Edit_FirstPieceCheckBill.html" @@ -1100,7 +1100,6 @@ var rowIndex = $(obj.tr).attr("data-index"); if (obj.event === 'del') { layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) { - console.log("绱㈠紩涓�:" + rowIndex); if (rowIndex === '0') { layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�'); } else { @@ -1116,7 +1115,6 @@ var rowIndex = $(obj.tr).attr("data-index"); if (obj.event === 'del') { layer.confirm('鐪熺殑鍒犻櫎琛屼箞', function (index) { - console.log("绱㈠紩涓�:" + rowIndex); if (rowIndex === '0') { layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�'); } else { @@ -1498,7 +1496,6 @@ } ) - console.log(data[i].鐩爣鍊�); SummaryIndex.push(i.toString()); } @@ -1569,7 +1566,7 @@ } $("#HQCSchemeID").val(checkStatus.data[0].HItemID); $("#HQCSchemeName").val(checkStatus.data[0].鏂规鍚嶇О); - get_CheckItem(); + get_CheckItem(); layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨� } , btn2: function (index, layero) { @@ -2865,7 +2862,6 @@ //#region銆愯祴鍊间笌鍥炴樉銆� function Assignment(nowindex, dataindex) { - console.log(JSON.stringify(option.data)); if (SummaryIndex.indexOf(nowindex) == -1 && option.data[0].HSampleSchemeID == 0) { var dataobj = { HEntryID: $("#HEntryID").val(), //琛屽彿 @@ -3650,7 +3646,6 @@ var HComparator = $("#HComparator").val(); //姣旇緝绗� var HEntryID = $("#HEntryID").val() - 1; var HAnalysisMethod = table.cache["mainTable"][HEntryID].HAnalysisMethod; //鍒嗘瀽鏂规硶 - console.log(HAnalysisMethod); switch (field) { case "HInspectVal": //妫�楠屽�� value = isNaN(value) ? 0 : value; diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231/Cj_ProcessItemStationPlatform.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231/Cj_ProcessItemStationPlatform.html" index e01992c..b645242 100644 --- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231/Cj_ProcessItemStationPlatform.html" +++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231/Cj_ProcessItemStationPlatform.html" @@ -475,7 +475,7 @@ // 鐢熸垚鍗曟嵁鍙� function createBillNo() { - var sql = "select * from Sc_StationOutBillMain where HProcExchBillNo='" + $("#HProcExchBillNo").val() + "' and HProcID=" + $("#HProcID").val() + var sql = "select * from Sc_StationOutBillMain where HProcExchBillNo='" + $("#HProcExchBillNo").val() + "' and HProcID=" + $("#HProcID").val() +" order by HDate desc" $.ajax({ url: GetWEBURL() + "/Gy_SOPBillList/WindowPrintList", async: false, @@ -690,6 +690,7 @@ //鏉$爜鍥炶溅鏌ヨ function txtHBarCode_KeyDown(HBarCode) { + var HProcExchBillNo = $("#HProcExchBillNo").val(); var indexs = layer.load(); $.ajax({ @@ -713,8 +714,10 @@ if (data1.count == 1) { layer.close(index); $("#HBarCode_P").val(HBarCode); - //淇濆瓨鏁版嵁 - set_AddAssemblyBill(); + if (AllowLoadData()) { + //淇濆瓨鏁版嵁 + set_AddAssemblyBill(); + } } else { layer.close(index); @@ -846,11 +849,12 @@ table.render(option) for (var i = 0; i < option.data.length; i++) { - if (parseFloat(option.data[i]["閰嶄欢鏁伴噺"]) == 0) { + if (parseFloat(option.data[i]["閰嶄欢鏁伴噺"]) == 0|| isNaN(parseFloat(option.data[i]["閰嶄欢鏁伴噺"])) ) { if (setIntervalIndex != null) { //clearInterval(setIntervalIndex); //setIntervalIndex = null; clearTimerQ(); + setIntervalIndex = 0; } return layer.msg("閰嶄欢鏁伴噺涓�0!", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); } @@ -910,6 +914,12 @@ layer.msg("娴佽浆鍗′笉鑳戒负绌猴紒") return; } + + //鏌ヨ涓嶈壇璁板綍 + get_BadRecords(); + //鏌ヨ鍚堟牸璁板綍 + get_HGRecords(); + if (option2.data.length != 0 || option3.data.length != 0) { get_BomList(HBarCode); } @@ -918,12 +928,10 @@ // //淇濆瓨鍒颁复鏃惰〃 // get_AddBomTempList(); //} - //鏌ヨ涓嶈壇璁板綍 - get_BadRecords(); - //鏌ヨ鍚堟牸璁板綍 - get_HGRecords(); - setIntervalIndex = setInterval(setIntervalList, 30000); + if (setIntervalIndex != null && setIntervalIndex != 0) { + setIntervalIndex = setInterval(setIntervalList, 30000); + } } //閰嶄欢鏌ヨ鏁版嵁 @@ -1254,19 +1262,25 @@ } //闈炵┖楠岃瘉 - function AllowLoadData(data) { + function AllowLoadData() { - var HBarCode = $("#HBarCode").val(); + var HBarCode = $("#HBarCode_P").val(); if (HBarCode == "") { layer.msg("浜у搧SN涓嶈兘涓虹┖!") return false; } - var HBadReasonID = $("#HBadReasonID").val(); - if (HBadReasonID == 0) { - layer.msg("涓嶈壇鍘熷洜涓嶈兘涓虹┖!") + var HEmpID2 = $("#HEmpID2").val(); + if (HEmpID2 == 0) { + layer.msg("鎿嶄綔鍛樹笉鑳戒负绌�!") return false; } + + //var HBadReasonID = $("#HBadReasonID").val(); + //if (HBadReasonID == 0) { + // layer.msg("涓嶈壇鍘熷洜涓嶈兘涓虹┖!") + // return false; + //} return true; } 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 23a23be..7cfe245 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" @@ -148,6 +148,32 @@ </div> <table class="" id="mainTable" lay-filter="mainTable"></table> + <div class="layui-tab layui-tab-card" style="margin-top:0px;"> + <ul class="layui-tab-title"> + <li >宸ヨ壓鍙傛暟</li> + <li>鎿嶄綔鏃ュ織</li> + <li class="layui-this">SN搴忓垪鐮�</li> + <li>鎿嶄綔鍛樻竻鍗�</li> + </ul> + <div class="layui-tab-content"> + <div class="layui-tab-item"> + <!--宸ヨ壓鍙傛暟--> + <table class="layui-hide" id="mainTable1" lay-filter="mainTable1"></table> + </div> + <div class="layui-tab-item"> + <!--鎿嶄綔鏃ュ織--> + <table class="layui-hide" id="mainTable2" lay-filter="mainTable2"></table> + </div> + <div class="layui-tab-item layui-show" > + <!--SN搴忓垪鐮�--> + <table class="layui-hide" id="mainTable3" lay-filter="mainTable3"></table> + </div> + <div class="layui-tab-item"> + <!--鎿嶄綔鍛樻竻鍗�--> + <table class="layui-hide" id="mainTable4" lay-filter="mainTable4"></table> + </div> + </div> + </div> <script type="text/html" id="toolbarDemo"> <div class="layui-btn-container"> <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-Add" id="btn-Add"><i class="layui-icon layui-icon-add-1"></i>鏂板</button> @@ -165,6 +191,30 @@ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-Exit" id="btn-Exit">閫�鍑�</button> <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_HideColumn" id="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> + </div> + </script> + <script type="text/html" id="toolbarDemo1"> + <div class="layui-btn-container"> + <!--<button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-Delete1" id="btn-Delete1"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>--> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_HideColumn1" id="set_HideColumn1"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button> + </div> + </script> + <script type="text/html" id="toolbarDemo2"> + <div class="layui-btn-container"> + <!--<button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-Delete2" id="btn-Delete2"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>--> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_HideColumn2" id="set_HideColumn2"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button> + </div> + </script> + <script type="text/html" id="toolbarDemo3"> + <div class="layui-btn-container"> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-Delete3" id="btn-Delete3"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_HideColumn3" id="set_HideColumn3"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button> + </div> + </script> + <script type="text/html" id="toolbarDemo4"> + <div class="layui-btn-container"> + <!--<button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-Delete4" id="btn-Delete4"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>--> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_HideColumn4" id="set_HideColumn4"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button> </div> </script> </form> @@ -195,8 +245,16 @@ //鍏敤鍙橀噺 var sWhere = ""; var option = []; + var option1 = []; + var option2 = []; + var option3 = []; + var option4 = []; var ins; //鐢ㄤ簬瀵煎嚭excel var HModName = "Cj_StationOutBillList"; + var HModName1 = "Sc_StationOutBillSub_TechParam"; + var HModName2 = "Sc_StationOutBillSub_Note"; + var HModName3 = "Sc_StationOutBillSub_SN"; + var HModName4 = "Sc_StationOutBillSub_Emp"; var titleData = ["HMaterID", "HUnitID", "HSourceID", "hmainid", "HProcExchInterID", "HProcID", "HunitID", "HEmpID", "HGroupID", "HProcExchEntryID", "HSubID", "HICMOInterID", "閫夋嫨", "鏌ヨ鏃ユ湡", "鎴愭湰瀵硅薄", "鎴愭湰瀵硅薄鍚嶇О", "HBillStatus", "HBillType", "HPRDORGID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞� @@ -251,6 +309,212 @@ $("#btnSearch").click(); } }); + + //鐐瑰嚮涓昏〃甯﹀嚭浠庤〃鏁版嵁 + table.on('row(mainTable)', function (obj) { //娉細tool 鏄伐鍏锋潯浜嬩欢鍚嶏紝test 鏄� table 鍘熷瀹瑰櫒鐨勫睘鎬� lay-filter="瀵瑰簲鐨勫��" + + //閫変腑琛屾敼鍙橀鑹� + check_row(obj); + var datas = obj.data; //鑾峰緱褰撳墠琛屾暟鎹� + var HMainID = datas.hmainid; + + SelectTechParam(HMainID,"TechParam");//宸ヨ壓鍙傛暟 + SelectTechParam(HMainID,"Note"); //鎿嶄綔鏃ュ織 + SelectTechParam(HMainID, "SN"); //SN搴忓垪鐮� + SelectTechParam(HMainID, "Emp"); //鎿嶄綔鍛樻竻鍗� + }); + + //鏌ヨ宸ヨ壓鍙傛暟 + table.on('toolbar(mainTable1)', function (obj) { + switch (obj.event) { + //鍒犻櫎 + case 'btn-Delete1': btn_Delete1(); + break; + //鏄庣粏鍒楄缃� + case 'set_HideColumn1': get_HideColumn_TechParam(); + break; + }; + }); + + //鏌ヨ鎿嶄綔鏃ュ織 + table.on('toolbar(mainTable2)', function (obj) { + switch (obj.event) { + //鍒犻櫎 + case 'btn-Delete2': btn_Delete2(); + break; + //鏄庣粏鍒楄缃� + case 'set_HideColumn2': get_HideColumn_Note(); + break; + }; + }); + + //鏌ヨSN搴忓垪鐮� + table.on('toolbar(mainTable3)', function (obj) { + switch (obj.event) { + //鍒犻櫎 + case 'btn-Delete3': btn_Delete3(); + break; + //鏄庣粏鍒楄缃� + case 'set_HideColumn3': get_HideColumn_SN(); + break; + }; + }); + + //鏌ヨ鎿嶄綔鍛樻竻鍗� + table.on('toolbar(mainTable4)', function (obj) { + switch (obj.event) { + //鍒犻櫎 + case 'btn-Delete4': btn_Delete4(); + break; + //鏄庣粏鍒楄缃� + case 'set_HideColumn4': get_HideColumn_Emp(); + break; + }; + }); + + + //鏌ヨ宸ヨ壓鍙傛暟 + function SelectTechParam(HMainID,TableName) { + var wait = layer.load(); + $.ajax({ + url: GetWEBURL() + '/Cj_StationOutBill/get_SubDisplay', + type: "GET", + data: { "sWhere": HMainID, "TableName": TableName}, + async: false, + success: function (data1) { + if (data1.count == 1) { + 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 }); + } + //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋 + col.push({ type: 'checkbox', fixed: 'left' }); + 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, "") > -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: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 200 }); + break; + default: + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 }); + } + } + } + switch (TableName) { + case "TechParam": + + //鍔ㄦ�佹樉绀哄垪鍚� + option1 = { + elem: '#mainTable1' + , toolbar: '#toolbarDemo1' + , cols: [col] + , data: data1.data + , height: 550 + , page: true + , cellMinWidth: 90 + , limit: 50 + , limits: [50, 500, 5000, 20000] + } + table.render(option1); + + DisPlay_HideColumn_TechParam(); + + break; + case "Note": + + //鍔ㄦ�佹樉绀哄垪鍚� + option2 = { + elem: '#mainTable2' + , toolbar: '#toolbarDemo2' + , cols: [col] + , data: data1.data + , height: 550 + , page: true + , cellMinWidth: 90 + , limit: 50 + , limits: [50, 500, 5000, 20000] + } + table.render(option2); + + DisPlay_HideColumn_Note(); + break; + case "SN": + + //鍔ㄦ�佹樉绀哄垪鍚� + option3 = { + elem: '#mainTable3' + , toolbar: '#toolbarDemo3' + , cols: [col] + , data: data1.data + , height: 550 + , page: true + , cellMinWidth: 90 + , limit: 50 + , limits: [50, 500, 5000, 20000] + } + table.render(option3); + + DisPlay_HideColumn_SN(); + + break; + case "Emp": + + //鍔ㄦ�佹樉绀哄垪鍚� + option4 = { + elem: '#mainTable4' + , toolbar: '#toolbarDemo4' + , cols: [col] + , data: data1.data + , height: 550 + , page: true + , cellMinWidth: 90 + , limit: 50 + , limits: [50, 500, 5000, 20000] + } + table.render(option4); + + DisPlay_HideColumn_Emp(); + break; + + } + + layer.close(wait); + //layer.alert("鏌ヨ鎴愬姛", { icon: 1 }); + } else { + layer.close(wait); + layer.alert(data1.code + data1.Message, { icon: 5 }); + } + }, error: function () { + layer.close(wait); + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }); + } + + function check_row(obj) { + var flag = !obj.tr.find(':checkbox:first').prop('checked'); + obj.tr.find(':checkbox').prop('checked', flag); + if (flag) { + obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + } else { + obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + } + //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + layui.each(table.cache.mainTable, function (i, l) { + if (obj.tr.index() == l.LAY_TABLE_INDEX) { + l.LAY_CHECKED = flag; + } + }); + } //鍒濆鍖栬〃鏍� function set_InitGrid() { @@ -376,29 +640,63 @@ }; }); - //琛岀洃鍚簨浠� - table.on('row(mainTable)', function (obj) { - var flag = !obj.tr.find(':checkbox:first').prop('checked'); - obj.tr.find(':checkbox').prop('checked', flag); - if (flag) { - obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 - $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� - } else { - obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 - $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 - } - //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 - layui.each(table.cache.mainTable, function (i, l) { - if (obj.tr.index() == l.LAY_TABLE_INDEX) { - l.LAY_CHECKED = flag; - } - }); - }); + ////琛岀洃鍚簨浠� + //table.on('row(mainTable)', function (obj) { + // var flag = !obj.tr.find(':checkbox:first').prop('checked'); + // obj.tr.find(':checkbox').prop('checked', flag); + // if (flag) { + // obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡 + // $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹� + // } else { + // obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡 + // $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊 + // } + // //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊 + // layui.each(table.cache.mainTable, function (i, l) { + // if (obj.tr.index() == l.LAY_TABLE_INDEX) { + // l.LAY_CHECKED = flag; + // } + // }); + //}); - //闅愯棌鍒楄缃� + //鏉$爜鍒犻櫎 + function btn_Delete3() { + var checkStatus = table.checkStatus('mainTable3') + , data = checkStatus.data; + if (checkStatus.data.length === 1) { + layer.confirm('纭畾鍒犻櫎鏉$爜:' + data[0].鏉$爜 + '鍚楋紵', function (index) { + var HInterID = data[0].HInterID; + var HBardcode = data[0].鏉$爜; + var ajaxLoad = layer.load(); + //閫昏緫鍒犻櫎鏂规硶 + $.ajax({ + url: GetWEBURL() + '/Cj_StationOutBill/del_StationOutBill_SN', + type: "GET", + data: { "HInterID": HInterID, "HBardcode": HBardcode, "HDeleteMan": sessionStorage["HUserName"], "HBillSubType": "3791" }, + success: function (result) { + if (result.count == 1) { + SelectTechParam(HInterID, "SN"); + layer.close(ajaxLoad); + } else { + layer.close(ajaxLoad); + layer.alert(result.Message, { icon: 5 }); + } + }, error: function () { + layer.close(ajaxLoad); + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }); + layer.close(index); + }); + } else { + layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒'); + } + } + + //闅愯棌鍒楄缃� 涓昏〃 function get_HideColumn() { var colName = ""; - for (var i = 1; i < option.cols[0].length - 1; i++) { + for (var i = 1; i < option.cols[0].length; i++) { colName += option.cols[0][i]["title"] + ","; } @@ -422,7 +720,7 @@ }) } - //鏄剧ず鍒楁暟鎹� + //鏄剧ず鍒楁暟鎹� 涓昏〃 function DisPlay_HideColumn() { $.ajax({ url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', @@ -437,7 +735,7 @@ dataCol = data1.data[0].HGridString.split(','); - for (var i = 0; i < option.cols[0].length - 2; i++) { + for (var i = 0; i < option.cols[0].length - 1; i++) { if (dataCol[i]) { var dataCols = dataCol[i].split('|'); } @@ -502,6 +800,466 @@ table.render(option); } + var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞� + Display_HideButton(btns, "3791", HModName, sessionStorage["HUserName"]); + + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }) + } + + //闅愯棌鍒楄缃� 宸ヨ壓鍙傛暟 + function get_HideColumn_TechParam() { + var colName = ""; + for (var i = 1; i < option1.cols[0].length; i++) { + colName += option1.cols[0][i]["title"] + ","; + } + + colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜 + layer.open({ + type: 2 + , skin: "layui-layer-rim" //鍔犱笂杈规 + , title: "闅愯棌鍒楄缃�" //鏍囬 + , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡 + , shift: 2 //寮瑰嚭鍔ㄧ敾 + , area: ["50%", "90%"] //绐椾綋澶у皬 + , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀� + , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName1 + '&colName=' + colName, "yes"] + , btn: ["纭畾", "鍙栨秷"] + , btn1: function (index, laero) { + //鍒锋柊琛ㄦ牸鏁版嵁 + DisPlay_HideColumn_TechParam(); + //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� + layer.close(index);//鍏抽棴寮圭獥 + } + }) + } + + //鏄剧ず鍒楁暟鎹� 宸ヨ壓鍙傛暟 + function DisPlay_HideColumn_TechParam() { + $.ajax({ + url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', + type: "GET", + data: { "HModName": HModName1, "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 < option1.cols[0].length - 1; i++) { + if (dataCol[i]) { + var dataCols = dataCol[i].split('|'); + } + //闅愯棌鍒� + if (dataCols[1] == 1) { + option1.cols[0][i + 1]["hide"] = true; + } + //璁剧疆鍒楀 + if (dataCols[3] > 0) { + option1.cols[0][i + 1]["width"] = dataCols[3]; + } + //璁剧疆鍐呭瀛椾綋澶у皬 + if (data1.data[0].HFontSize != 0) { + option1.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;"; + } else { + option1.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(option1.cols[0][i + 1]["title"], titleData) == -1) { + option1.cols[0][i + 1]["hide"] = false; + } + //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�) + switch (dataCols[2]) { + case "L": + option1.cols[0][i + 1]["align"] = "left"; + break; + case "M": + option1.cols[0][i + 1]["align"] = "center"; + break; + case "R": + option1.cols[0][i + 1]["align"] = "right"; + break; + } + } + + //鍙栨秷鍐荤粨鍒� + for (var i = 1; i < option1.cols[0].length - 1; i++) { + if (option1.cols[0][i]["fixed"] != null) { + option1.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(option1.cols[0][i + 1]["title"], titleData) != -1) { + data1.data[0].HFixCols += 1; + } + option1.cols[0][i + 1]["fixed"] = "left"; + } + } + table.render(option1); + } else { + table.render(option1); + } + var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞� + Display_HideButton(btns, "3791", HModName, sessionStorage["HUserName"]); + + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }) + } + + //闅愯棌鍒楄缃� 鎿嶄綔鏃ュ織 + function get_HideColumn_Note() { + var colName = ""; + for (var i = 1; i < option2.cols[0].length ; i++) { + colName += option2.cols[0][i]["title"] + ","; + } + + colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜 + layer.open({ + type: 2 + , skin: "layui-layer-rim" //鍔犱笂杈规 + , title: "闅愯棌鍒楄缃�" //鏍囬 + , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡 + , shift: 2 //寮瑰嚭鍔ㄧ敾 + , area: ["50%", "90%"] //绐椾綋澶у皬 + , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀� + , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName2 + '&colName=' + colName, "yes"] + , btn: ["纭畾", "鍙栨秷"] + , btn1: function (index, laero) { + //鍒锋柊琛ㄦ牸鏁版嵁 + DisPlay_HideColumn_Note(); + //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� + layer.close(index);//鍏抽棴寮圭獥 + } + }) + } + + //鏄剧ず鍒楁暟鎹� 鎿嶄綔鏃ュ織 + function DisPlay_HideColumn_Note() { + $.ajax({ + url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', + type: "GET", + data: { "HModName": HModName2, "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 < option2.cols[0].length - 1; i++) { + if (dataCol[i]) { + var dataCols = dataCol[i].split('|'); + } + //闅愯棌鍒� + if (dataCols[1] == 1) { + option2.cols[0][i + 1]["hide"] = true; + } + //璁剧疆鍒楀 + if (dataCols[3] > 0) { + option2.cols[0][i + 1]["width"] = dataCols[3]; + } + //璁剧疆鍐呭瀛椾綋澶у皬 + if (data1.data[0].HFontSize != 0) { + option2.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;"; + } else { + option2.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(option2.cols[0][i + 1]["title"], titleData) == -1) { + option2.cols[0][i + 1]["hide"] = false; + } + //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�) + switch (dataCols[2]) { + case "L": + option2.cols[0][i + 1]["align"] = "left"; + break; + case "M": + option2.cols[0][i + 1]["align"] = "center"; + break; + case "R": + option2.cols[0][i + 1]["align"] = "right"; + break; + } + } + + //鍙栨秷鍐荤粨鍒� + for (var i = 1; i < option2.cols[0].length - 1; i++) { + if (option2.cols[0][i]["fixed"] != null) { + option2.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(option2.cols[0][i + 1]["title"], titleData) != -1) { + data1.data[0].HFixCols += 1; + } + option2.cols[0][i + 1]["fixed"] = "left"; + } + } + table.render(option2); + } else { + table.render(option2); + } + var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞� + Display_HideButton(btns, "3791", HModName, sessionStorage["HUserName"]); + + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }) + } + + //闅愯棌鍒楄缃� SN搴忓垪鐮� + function get_HideColumn_SN() { + var colName = ""; + for (var i = 1; i < option3.cols[0].length; i++) { + colName += option3.cols[0][i]["title"] + ","; + } + + colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜 + layer.open({ + type: 2 + , skin: "layui-layer-rim" //鍔犱笂杈规 + , title: "闅愯棌鍒楄缃�" //鏍囬 + , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡 + , shift: 2 //寮瑰嚭鍔ㄧ敾 + , area: ["50%", "90%"] //绐椾綋澶у皬 + , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀� + , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName3 + '&colName=' + colName, "yes"] + , btn: ["纭畾", "鍙栨秷"] + , btn1: function (index, laero) { + //鍒锋柊琛ㄦ牸鏁版嵁 + DisPlay_HideColumn_SN(); + //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� + layer.close(index);//鍏抽棴寮圭獥 + } + }) + } + + //鏄剧ず鍒楁暟鎹� SN搴忓垪鐮� + function DisPlay_HideColumn_SN() { + $.ajax({ + url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', + type: "GET", + data: { "HModName": HModName3, "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 < option3.cols[0].length - 1; i++) { + if (dataCol[i]) { + var dataCols = dataCol[i].split('|'); + } + //闅愯棌鍒� + if (dataCols[1] == 1) { + option3.cols[0][i + 1]["hide"] = true; + } + //璁剧疆鍒楀 + if (dataCols[3] > 0) { + option3.cols[0][i + 1]["width"] = dataCols[3]; + } + //璁剧疆鍐呭瀛椾綋澶у皬 + if (data1.data[0].HFontSize != 0) { + option3.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;"; + } else { + option3.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(option3.cols[0][i + 1]["title"], titleData) == -1) { + option3.cols[0][i + 1]["hide"] = false; + } + //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�) + switch (dataCols[2]) { + case "L": + option3.cols[0][i + 1]["align"] = "left"; + break; + case "M": + option3.cols[0][i + 1]["align"] = "center"; + break; + case "R": + option3.cols[0][i + 1]["align"] = "right"; + break; + } + } + + //鍙栨秷鍐荤粨鍒� + for (var i = 1; i < option3.cols[0].length - 1; i++) { + if (option3.cols[0][i]["fixed"] != null) { + option3.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(option3.cols[0][i + 1]["title"], titleData) != -1) { + data1.data[0].HFixCols += 1; + } + option3.cols[0][i + 1]["fixed"] = "left"; + } + } + table.render(option3); + } else { + table.render(option3); + } + var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞� + Display_HideButton(btns, "3791", HModName, sessionStorage["HUserName"]); + + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }) + } + + //闅愯棌鍒楄缃� 鎿嶄綔鍛樻竻鍗� + function get_HideColumn_Emp() { + var colName = ""; + for (var i = 1; i < option4.cols[0].length; i++) { + colName += option4.cols[0][i]["title"] + ","; + } + + colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜 + layer.open({ + type: 2 + , skin: "layui-layer-rim" //鍔犱笂杈规 + , title: "闅愯棌鍒楄缃�" //鏍囬 + , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡 + , shift: 2 //寮瑰嚭鍔ㄧ敾 + , area: ["50%", "90%"] //绐椾綋澶у皬 + , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀� + , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName4 + '&colName=' + colName, "yes"] + , btn: ["纭畾", "鍙栨秷"] + , btn1: function (index, laero) { + //鍒锋柊琛ㄦ牸鏁版嵁 + DisPlay_HideColumn_Emp(); + //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� + layer.close(index);//鍏抽棴寮圭獥 + } + }) + } + + //鏄剧ず鍒楁暟鎹� 鎿嶄綔鍛樻竻鍗� + function DisPlay_HideColumn_Emp() { + $.ajax({ + url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', + type: "GET", + data: { "HModName": HModName4, "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 < option4.cols[0].length - 1; i++) { + if (dataCol[i]) { + var dataCols = dataCol[i].split('|'); + } + //闅愯棌鍒� + if (dataCols[1] == 1) { + option4.cols[0][i + 1]["hide"] = true; + } + //璁剧疆鍒楀 + if (dataCols[3] > 0) { + option4.cols[0][i + 1]["width"] = dataCols[3]; + } + //璁剧疆鍐呭瀛椾綋澶у皬 + if (data1.data[0].HFontSize != 0) { + option4.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;"; + } else { + option4.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(option4.cols[0][i + 1]["title"], titleData) == -1) { + option4.cols[0][i + 1]["hide"] = false; + } + //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�) + switch (dataCols[2]) { + case "L": + option4.cols[0][i + 1]["align"] = "left"; + break; + case "M": + option4.cols[0][i + 1]["align"] = "center"; + break; + case "R": + option4.cols[0][i + 1]["align"] = "right"; + break; + } + } + + //鍙栨秷鍐荤粨鍒� + for (var i = 1; i < option4.cols[0].length - 1; i++) { + if (option4.cols[0][i]["fixed"] != null) { + option4.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(option4.cols[0][i + 1]["title"], titleData) != -1) { + data1.data[0].HFixCols += 1; + } + option4.cols[0][i + 1]["fixed"] = "left"; + } + } + table.render(option4); + } else { + table.render(option4); + } var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞� Display_HideButton(btns, "3791", HModName, sessionStorage["HUserName"]); @@ -878,7 +1636,7 @@ , toolbar: '#toolbarDemo' , cols: [col] , data: data1.data - , height: 'full-50' + , height: 300 , page: true , totalRow: true , cellMinWidth: 90 -- Gitblit v1.9.1