| | |
| | | <div style="padding: 10px; "> |
| | | <button type="button" class="layui-btn layui-btn-normal" lay-submit="" style="display:none;" id="btn_view" lay-filter="btn_view">é¢è§</button> |
| | | <button type="button" class="layui-btn layui-btn-normal" lay-submit="" style="display:none;" id="btn_refresh" lay-filter="btn_refresh">å·æ°</button> |
| | | <button type="button" class="layui-btn layui-btn-normal" lay-submit="" style="display:none;" id="btn_view" lay-filter="btn_start">å¼å·¥</button> |
| | | <button type="button" class="layui-btn layui-btn-normal" lay-submit="" style="display:none;" id="btn_view" lay-filter="btn_report">æ±æ¥</button> |
| | | <button type="button" class="layui-btn layui-btn-normal" lay-submit="" style="display:none;" id="btn_start" lay-filter="btn_start">å¼å·¥</button> |
| | | <button type="button" class="layui-btn layui-btn-normal" lay-submit="" style="display:none;" id="btn_report" lay-filter="btn_report">æ±æ¥</button> |
| | | <button type="button" class="layui-btn layui-btn-normal" lay-submit="" style="display:none;" id="get_Exit" lay-filter="get_Exit">éåº</button> |
| | | </div> |
| | | <div class="layui-tab layui-tab-card" style="margin-top:20px;"> |
| | | <div class="layui-tab layui-tab-card" style="margin-top:20px;" lay-filter="tab-TabTest"> |
| | | <ul class="layui-tab-title"> |
| | | <li class="layui-this">æªå¼å·¥</li> |
| | | <li>å·²å®å·¥</li> |
| | | <li>æ£å¨ç产</li> |
| | | <li lay-id="1" class="layui-this">æªå¼å·¥</li> |
| | | <li lay-id="2">å·²å®å·¥</li> |
| | | <li lay-id="3">æ£å¨ç产</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | |
| | | var option_finish = ""; //å·²å®å·¥ |
| | | var option_proc = ""; //æ£å¨ç产 |
| | | var ins; |
| | | |
| | | |
| | | var TableTab = "mainTable_notStart"; //åå§å页颿¶é»è®¤ä¸º âæªå¼å·¥â é¡µç¾ |
| | | var cur_title = "æªå¼å·¥"; //å½åéä¸é¡µç¾ |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢å³å è½½ |
| | |
| | | // |
| | | var HModName = "Sc_MyTicketList"; |
| | | //ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± ï¼æä¸»å¯¼çï¼ |
| | | var titleData = ["HInterID","HEntryID"]; |
| | | var titleData = ["HInterID","HEntryID","HSourceID","HMaterID","HDeptID","æºååå
ç ","æºåç±»å","åæ®ç±»å"]; |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | | //#endregion |
| | |
| | | get_print(); |
| | | }); |
| | | |
| | | //å¼å·¥ |
| | | form.on('submit(btn_start)', function (data) { |
| | | get_start(); |
| | | }); |
| | | |
| | | //æ±æ¥ |
| | | form.on('submit(btn_report)', function (data) { |
| | | get_report(); |
| | | }); |
| | | |
| | | //éåº |
| | | form.on('submit(get_Exit)', function (data) { |
| | | Pub_Close(2); |
| | | }); |
| | | |
| | | //å·æ° |
| | | form.on('submit(btn_refresh)', function (data) { |
| | | get_Refresh(); |
| | | }); |
| | | |
| | | |
| | | //çå¬å½åå¤äºåªä¸ä¸ªé¡µç¾ï¼ä¼ HModName å¼ |
| | | element.on('tab(tab-TabTest)', function (data) { |
| | | HMaterInfo = table.cache['mainTable']; |
| | | cur_title = data.elem.context.innerText; |
| | | if (cur_title == "æªå¼å·¥") { |
| | | TableTab = "mainTable_notStart"; |
| | | } else if (cur_title == "å·²å®å·¥") { |
| | | TableTab = "mainTable_finish"; |
| | | } else if (cur_title == "æ£å¨ç产") { |
| | | TableTab = "mainTable_proc"; |
| | | } |
| | | }) |
| | | //#endregion |
| | | |
| | | //#region æ¬é¡µé¢ææè¢«è°ç¨çæ¹æ³ |
| | |
| | | |
| | | //åå§åæªå¼å·¥å表 |
| | | function set_InitGrid_notStart() { |
| | | option = { |
| | | option_notStart = { |
| | | elem: '#mainTable_notStart' |
| | | , toolbar: '#toolbarDemo' |
| | | //, toolbar: '#toolbarDemo' |
| | | , page: true |
| | | , height: 300 |
| | | , cellMinWidth: 90 |
| | |
| | | |
| | | //åå§åå·²å®å·¥å表 |
| | | function set_InitGrid_finish() { |
| | | option2 = { |
| | | option_finish = { |
| | | elem: '#mainTable_finish' |
| | | , page: false |
| | | , height: 500 |
| | |
| | | |
| | | //åå§åæ£å¨ç产å表 |
| | | function set_InitGrid_proc() { |
| | | option2 = { |
| | | option_proc = { |
| | | elem: '#mainTable_proc' |
| | | , page: false |
| | | , height: 500 |
| | |
| | | var ajaxLoad = layer.load(); |
| | | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/PM_ReportController/PM_ProjectBillMYList', |
| | | url: GetWEBURL() + '/Sc_MyTicket/list', |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, |
| | | data: { "HSourceID": sessionStorage["HSourceID"], "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | var data = []; |
| | |
| | | } |
| | | |
| | | //卿æ¾ç¤ºåå |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | option_notStart = { |
| | | elem: '#mainTable_notStart' |
| | | //, toolbar: '#toolbarDemo' |
| | | , cols: [col] |
| | | , data: data1.data.h_p_My_PM_ProjectReportBill |
| | | , data: data1.data.h_p_Sc_MyICMOWorkBill |
| | | , height: 'full-80' |
| | | , page: true |
| | | , limits: [50, 500, 5000, 50000] |
| | | , limit: 50 |
| | | , cellMinWidth: 90 |
| | | } |
| | | table.render(option); |
| | | ins = table.render(option); |
| | | option1 = { |
| | | elem: '#mainTable1' |
| | | , toolbar: '#toolbarDemo' |
| | | table.render(option_notStart); |
| | | ins = table.render(option_notStart); |
| | | |
| | | option_finish = { |
| | | elem: '#mainTable_finish' |
| | | //, toolbar: '#toolbarDemo' |
| | | , cols: [col] |
| | | , data: data1.data.h_p_My_PM_ProjectReportBill1 |
| | | , data: data1.data.h_p_Sc_MyICMOWorkBill1 |
| | | , height: 'full-80' |
| | | , page: true |
| | | , limits: [50, 500, 5000, 50000] |
| | | , limit: 50 |
| | | , cellMinWidth: 90 |
| | | } |
| | | table.render(option1); |
| | | table.render(option_finish); |
| | | |
| | | option_proc = { |
| | | elem: '#mainTable_proc' |
| | | //, toolbar: '#toolbarDemo' |
| | | , cols: [col] |
| | | , data: data1.data.h_p_Sc_MyICMOWorkBill2 |
| | | , height: 'full-80' |
| | | , page: true |
| | | , limits: [50, 500, 5000, 50000] |
| | | , limit: 50 |
| | | , cellMinWidth: 90 |
| | | } |
| | | table.render(option_proc); |
| | | |
| | | //å·æ°æé®æ¾ç¤º |
| | | var btns = document.getElementsByTagName("button"); //è·åæ¬é¡µæææé®å¯¹è±¡ |
| | | var HBillType = "PM_ProjectBillMainMy"; |
| | | var HBillType = "æçå·¥å"; |
| | | Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]); |
| | | |
| | | //å·æ°è¡¨æ ¼æ°æ® |
| | | DisPlay_HideColumn(); |
| | | //DisPlay_HideColumn(); |
| | | |
| | | layer.close(ajaxLoad); |
| | | if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") { |
| | |
| | | } |
| | | //#endregion |
| | | |
| | | |
| | | //#region å·æ° |
| | | function get_Refresh() { |
| | | get_FastQuery(); |
| | | } |
| | | //#endregion |
| | | |
| | | //#region å¼å·¥ |
| | | function get_start() { |
| | | var checkStatus = table.checkStatus("mainTable_notStart") |
| | | , data = checkStatus.data; |
| | | |
| | | if (data.length == 1) { |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'æ°å¢å¼å·¥å', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: '../../ç产管ç/ç产å¼å·¥å/Sc_Add_MESBeginWorkBillList.html?OperationType=2&linterid=&HSouceBillType=', |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (dom, index) { |
| | | var deliverData = []; |
| | | deliverData.push({ |
| | | "HBillType": data[0].åæ®ç±»å, |
| | | "HSourceInterID": data[0].HInterID, |
| | | "HSourceEntryID": data[0].æºååå
ç , |
| | | "HSourceBillNo": data[0].æºååå·, |
| | | "HSourceBillType": data[0].æºåç±»å |
| | | }); |
| | | |
| | | //éè¿ç´¢å¼è·åå°å½åiframeå¼¹åºå± |
| | | var iframe = window['layui-layer-iframe' + index]; |
| | | //è°ç¨iframeå¼¹åºå±å
çæ¹æ³ |
| | | iframe.edit(deliverData); |
| | | } |
| | | }); |
| | | } else { |
| | | layer.msg('è¯·å¨ æªå¼å·¥ 页ç¾ä¸éæ©ä¸è¡æ°æ®å¼å·¥ï¼'); |
| | | } |
| | | } |
| | | //#endregion |
| | | |
| | | //#region æ±æ¥ |
| | | function get_report() { |
| | | var checkStatus = table.checkStatus("mainTable_proc") |
| | | , data = checkStatus.data; |
| | | |
| | | if (data.length == 1) { |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'æ°å¢äº§éæ±æ¥å', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: '../../ç产管ç/äº§éæ±æ¥å/Sc_Add_ProductReportBillList.html?OperationType=2&linterid=&HSouceBillType=', |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (dom, index) { |
| | | var deliverData = []; |
| | | deliverData.push({ |
| | | "HBillType": data[0].åæ®ç±»å, |
| | | "HSourceInterID": data[0].HInterID, |
| | | "HSourceEntryID": data[0].æºååå
ç , |
| | | "HSourceBillNo": data[0].æºååå·, |
| | | "HSourceBillType": data[0].æºåç±»å |
| | | }); |
| | | |
| | | //éè¿ç´¢å¼è·åå°å½åiframeå¼¹åºå± |
| | | var iframe = window['layui-layer-iframe' + index]; |
| | | //è°ç¨iframeå¼¹åºå±å
çæ¹æ³ |
| | | iframe.edit(deliverData); |
| | | }, |
| | | }); |
| | | } else { |
| | | layer.msg('è¯·å¨ æ£å¨ç产 页ç¾ä¸éæ©ä¸è¡æ°æ®å¼å·¥ï¼'); |
| | | } |
| | | } |
| | | //#endregion |
| | | |
| | | //#region é¢è§ |
| | | function get_print() { |
| | | var activeTab =getActiveTab(); |
| | | if (activeTab=="æä¸»å¯¼ç") { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data, |
| | | Num = 1; |
| | | } else if (activeTab == "æåä¸ç") { |
| | | var checkStatus = table.checkStatus('mainTable1') |
| | | , data = checkStatus.data, |
| | | Num = 2; |
| | | var activeTab = getActiveTab(); |
| | | |
| | | if (activeTab=="æªå¼å·¥") { |
| | | var checkStatus = table.checkStatus('mainTable_notStart') |
| | | , data = checkStatus.data; |
| | | } else if (activeTab == "å·²å®å·¥") { |
| | | var checkStatus = table.checkStatus('mainTable_finish') |
| | | , data = checkStatus.data; |
| | | } else if (activeTab == "æ£å¨ç产"){ |
| | | var checkStatus = table.checkStatus('mainTable_proc') |
| | | , data = checkStatus.data; |
| | | } |
| | | |
| | | if (checkStatus.data.length == 1) { |
| | | if (checkStatus.data.length > 0) { |
| | | var linterid = []; |
| | | |
| | | for (var i = 0; i < data.length; i++) { |
| | |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: false //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + linterid.toString() + "|" + Num + '&MyMsg=' + linterid.toString() + '&Type=PM_ProjectBillMainMy', 'yes'] |
| | | , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + linterid.toString() + '&MyMsg=' + linterid.toString() + '&Type=Sc_MyTicketList', 'yes'] |
| | | , resize: false |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®æå°ï¼'); |
| | | layer.msg('è¯·éæ©æ°æ®æå°ï¼'); |
| | | } |
| | | } |
| | | |
| | |
| | | //#endregion |
| | | //以䏿¯layui模å |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | </body> |
| | | </html> |