| | |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">éç½®</button> |
| | | <!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">éç½®</button>--> |
| | | <!--<div class="layui-colla-content"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-inline"> |
| | | <span>å
¶ä»æ¡ä»¶></span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-inline"> |
| | | <span>å
¶ä»æ¡ä»¶></span> |
| | | </div> |
| | | </div> |
| | | |
| | | </div>--> |
| | | </div>--> |
| | | </div> |
| | | </div> |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | | <div class="layui-tab layui-tab-card"> |
| | | <ul class="layui-tab-title"> |
| | | <li class="layui-this">ç¹æ£é¡¹ä¿¡æ¯</li> |
| | | <li>é
ä»¶ä¿¡æ¯</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | | <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> |
| | | </div> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add"><i class="layui-icon layui-icon-add-1"></i>æ°å¢</button> |
| | |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></i>éåº</button> |
| | | |
| | | </div> |
| | | </script> |
| | | <script type="text/html" id="xuhao"> |
| | | {{d.LAY_TABLE_INDEX+1}} |
| | | </script> |
| | | <script type="text/html" id="xuhao1"> |
| | | {{d.LAY_TABLE_INDEX+1}} |
| | | </script> |
| | | </form> |
| | | </div> |
| | |
| | | var sWhere = ""; |
| | | //å
¬ç¨åé |
| | | var option = []; |
| | | var option1 = []; |
| | | var option2 = []; |
| | | |
| | | $("#BenginHCreateDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#EndHCreateDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | //åå§åè¡¨æ ¼(å表1) |
| | | set_InitGrid1(); |
| | | //åå§åè¡¨æ ¼(å表2) |
| | | set_InitGrid2(); |
| | | //å è½½æ°æ®å°ç½æ ¼ |
| | | get_Display(sWhere); |
| | | //头工å
·æ äºä»¶ |
| | |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | set_ClearQuery(); |
| | | }); |
| | | |
| | | //ç¹å»ä¸»è¡¨å¸¦åºä»è¡¨æ°æ® |
| | | table.on('row(mainTable)', function (obj) { //注ï¼tool æ¯å·¥å
·æ¡äºä»¶åï¼test æ¯ table åå§å®¹å¨ç屿§ lay-filter="对åºçå¼" |
| | | var datas = obj.data; //è·å¾å½åè¡æ°æ® |
| | | var linterid = datas.hmainid; |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sc_MouldDotCheckPlanBill/Sc_MouldDotCheckPlanBillListProjectDetai', |
| | | type: "GET", |
| | | data: { "sqlWhere": "and HInterID=" + linterid }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option1.data = data1.list[0]; |
| | | table.render(option1); |
| | | option2.data = data1.list[1]; |
| | | table.render(option2); |
| | | } else { |
| | | layer.alert("è·å失败", { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£å¤±æ!", { icon: 5 }); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | //éç½®è¿æ»¤æ¡ä»¶ |
| | | function set_ClearQuery() { |
| | | $("#HNumber").val(""); |
| | | $("#HName").val(""); |
| | | $("#BenginHCreateDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#EndHCreateDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HBillNo").val(""); |
| | | $("#PartModul").val(""); |
| | | sWhere = ""; |
| | | get_Display(sWhere); |
| | | } |
| | | |
| | | |
| | | function set_InitGrid() { |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , height: 'full-50' |
| | | , height: 450 |
| | | , page: true |
| | | , cellMinWidth: 90 |
| | | , limit: 50 |
| | |
| | | , { field: 'å
é¨åæ®å·', title: 'å
é¨åæ®å·', width: 200 } |
| | | , { field: '夿³¨', title: '夿³¨', width: 200 } |
| | | , { field: 'hsubid', title: 'hsubid', width: 200, hide: true } |
| | | , { field: 'ç¹æ£é¡¹ç®', title: 'ç¹æ£é¡¹ç®', width: 115, hide: true } |
| | | , { field: 'ç¹æ£é¡¹ç®', title: 'ç¹æ£é¡¹ç®', width: 115 } |
| | | , { field: 'ç¹æ£é¨ä½', title: 'ç¹æ£é¨ä½', width: 200 } |
| | | , { field: 'å
·ä½è¦æ±', title: 'å
·ä½è¦æ±', width: 200 } |
| | | , { field: 'HManagerID', title: 'HManagerID', width: 200, hide: true } |
| | |
| | | , { field: 'å
³èæ°é', title: 'å
³èæ°é', width: 115 } |
| | | , { field: 'è¡å
³é人', title: 'è¡å
³é人', width: 200 } |
| | | , { field: 'å
³éç±»å', title: 'å
³éç±»å', width: 200, hide: true } |
| | | , { field: '表ä½å¤æ³¨', title: '表ä½å¤æ³¨', width: 200, hide: true } |
| | | , { field: 'å¶å人', title: 'å¶å人', width: 115, hide: true } |
| | | , { field: '表ä½å¤æ³¨', title: '表ä½å¤æ³¨', width: 200 } |
| | | , { field: 'å¶å人', title: 'å¶å人', width: 115 } |
| | | , { field: 'å¶åæ¥æ', title: 'å¶åæ¥æ', width: 200, templet: "<div>{{d.å¶åæ¥æ ==null ?'':layui.util.toDateString(d.å¶åæ¥æ, 'yyyy-MM-dd')}}</div>"} |
| | | , { field: 'å®¡æ ¸äºº', title: 'å®¡æ ¸äºº', width: 200 } |
| | | , { field: 'å®¡æ ¸æ¥æ', title: 'å®¡æ ¸æ¥æ', width: 200, hide: true, templet: "<div>{{d.å®¡æ ¸æ¥æ ==null ?'':layui.util.toDateString(d.å®¡æ ¸æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'ä¿®æ¹äºº', title: 'ä¿®æ¹äºº', width: 200, hide: true } |
| | | , { field: 'ä¿®æ¹æ¥æ', title: 'ä¿®æ¹æ¥æ', width: 115, hide: true, templet: "<div>{{d.ä¿®æ¹æ¥æ ==null ?'':layui.util.toDateString(d.ä¿®æ¹æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'å®¡æ ¸æ¥æ', title: 'å®¡æ ¸æ¥æ', width: 200, templet: "<div>{{d.å®¡æ ¸æ¥æ ==null ?'':layui.util.toDateString(d.å®¡æ ¸æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'ä¿®æ¹äºº', title: 'ä¿®æ¹äºº', width: 200 } |
| | | , { field: 'ä¿®æ¹æ¥æ', title: 'ä¿®æ¹æ¥æ', width: 115, templet: "<div>{{d.ä¿®æ¹æ¥æ ==null ?'':layui.util.toDateString(d.ä¿®æ¹æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'å
³é人', title: 'å
³é人', width: 200 } |
| | | , { field: 'å
³éæ¥æ', title: 'å
³éæ¥æ', width: 200, templet: "<div>{{d.å
³éæ¥æ ==null ?'':layui.util.toDateString(d.å
³éæ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'ä½åºäºº', title: 'ä½åºäºº', width: 200, hide: true } |
| | | , { field: 'ä½åºäºº', title: 'ä½åºäºº', width: 200 } |
| | | , { field: 'ä½åºæ¥æ', title: 'ä½åºæ¥æ', width: 115, hide: true, templet: "<div>{{d.ä½åºæ¥æ ==null ?'':layui.util.toDateString(d.ä½åºæ¥æ, 'yyyy-MM-dd')}}</div>"} |
| | | , { field: 'æºå主å
ç ', title: 'æºå主å
ç ', width: 200, hide: true } |
| | | , { field: 'æºååå
ç ', title: 'æºååå
ç ', width: 200, hide: true } |
| | | , { field: 'æºååå·', title: 'æºååå·', width: 200 } |
| | | , { field: 'æºåç±»å', title: 'æºåç±»å', width: 200 } |
| | | , { field: 'hbilltype', title: 'hbilltype', width: 200 } |
| | | , { field: 'hbilltype', title: 'hbilltype', width: 200, hide: true } |
| | | ]] |
| | | }; |
| | | } |
| | | var index = layer.load(0); |
| | | |
| | | //åå§åè¡¨æ ¼(å表1) |
| | | function set_InitGrid1() { |
| | | var ajaxLoad = layer.load(); |
| | | option1 = { |
| | | elem: '#mainTable1' |
| | | //, toolbar: '#toolbarDemo' |
| | | , height: '250' |
| | | , page: true |
| | | , cellMinWidth: 90 |
| | | , limit: 50 |
| | | , limits: [50, 500, 5000, 20000] |
| | | , loading: false |
| | | , cols: [[ |
| | | //{ type: 'checkbox', fixed: 'left' } |
| | | , { templet: '#xuhao', title: 'åºå·', sort: true, fixed: 'left' } |
| | | , { field: 'HDotCheckItemID', title: 'ç¹æ£é¡¹ç®ID', width: 200, hide: true } |
| | | , { field: 'HDotCheckItem', title: 'ç¹æ£é¡¹ç®', width: 200 } |
| | | , { field: 'HDotCheckPart', title: 'ç¹æ£é¨ä½', width: 200 } |
| | | , { field: 'HClaim', title: 'å
·ä½è¦æ±', width: 200 } |
| | | , { field: 'HManagerID', title: 'è´è´£äººID', width: 200, hide: true } |
| | | , { field: 'HManagerNumber', title: 'è´è´£äººä»£ç ', width: 200 } |
| | | , { field: 'HManagerName', title: 'è´è´£äºº', width: 200 } |
| | | , { field: 'HRemark', title: '夿³¨', width: 200 } |
| | | ]] |
| | | }; |
| | | option1.data = []; |
| | | table.render(option1); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | |
| | | //åå§åè¡¨æ ¼(å表2) |
| | | function set_InitGrid2() { |
| | | var ajaxLoad = layer.load(); |
| | | option2 = { |
| | | elem: '#mainTable2' |
| | | //, toolbar: '#toolbarDemo' |
| | | , height: '250' |
| | | , page: true |
| | | , cellMinWidth: 90 |
| | | , limit: 50 |
| | | , limits: [50, 500, 5000, 20000] |
| | | , loading: false |
| | | , cols: [[ |
| | | //{ type: 'checkbox', fixed: 'left' } |
| | | , { templet: '#xuhao1', title: 'åºå·', sort: true, fixed: 'left', event: "qwe" } |
| | | , { field: 'HMaterID', title: 'é
ä»¶ID', width: 200, hide: true } |
| | | , { field: 'HMaterNumber', title: 'é
件代ç ', width: 200 } |
| | | , { field: 'HMaterName', title: 'é
ä»¶åç§°', width: 200 } |
| | | , { field: 'HUnitID', title: 'åä½ID', width: 200, hide: true } |
| | | , { field: 'HUnitNumber', title: '计éåä½ä»£ç ', width: 200 } |
| | | , { field: 'HUnitName', title: '计éåä½åç§°', width: 200 } |
| | | , { field: 'HQty', title: 'ç¨é', width: 200 } |
| | | , { field: 'HQtyMust', title: 'æ åç¨é', width: 200 } |
| | | , { field: 'HRemark', title: '夿³¨', width: 200 } |
| | | ]] |
| | | }; |
| | | option2.data = []; |
| | | table.render(option2); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | function get_Display(sWhere) { |
| | | var index = layer.load(0); |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sc_MouldDotCheckPlanBill/GetMouldDotCheckPlanBillList', |
| | | type: "GET", |