| | |
| | | background: #ceedfa; |
| | | color: black |
| | | } |
| | | |
| | | </style> |
| | | </head> |
| | | |
| | |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_ReadScheme" id="set_ReadScheme"><i class="layui-icon layui-icon-set"></i>è¯»åæ¹æ¡</button> |
| | | </div> |
| | | </script> |
| | | <table class="" id="mainTableSub" lay-filter="mainTableSub"></table> |
| | | <table class="" id="mainTableSub" lay-filter="mainTableSub" style="margin-top:35px"></table> |
| | | <script type="text/html" id="toolbarDemoSub"> |
| | | <div class="layui-btn-container"> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CloseRow" id="set_CloseRow"><i class="layui-icon layui-icon-form"></i>è¡å
³é</button> |
| | |
| | | case 'btn-Delete': set_DeleteBill(); |
| | | break; |
| | | //æµè§ |
| | | case 'btn-view': get_ViewReport(); |
| | | break; |
| | | //case 'btn-view': get_ViewReport(); |
| | | // break; |
| | | //æå° |
| | | case 'btn-print': get_PrintReport(); |
| | | break; |
| | |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | //ç´æ¥æ§è¡å表çé å è½½æ°æ®å°ç½æ ¼ |
| | | ////ç´æ¥æ§è¡å表çé å è½½æ°æ®å°ç½æ ¼ |
| | | get_FastQuery(table, option,1) |
| | | |
| | | //æ¥è¯¢å½åç»å½ç¨æ·ææ²¡æå¨å½å模å设置é»è®¤è¿æ»¤æ¹æ¡ |
| | |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , height: 'full-330' |
| | | , height: 'full-300' |
| | | , page: true |
| | | , totalRow: true |
| | | , cellMinWidth: 90 |
| | | , limit: 50 |
| | | , limits: [50, 500, 5000, 20000] |
| | | , cols: [[ |
| | | { type: 'checkbox', fixed: 'left', totalRowText: 'å计' } |
| | | ,{ field: 'hmainid', title: 'hmainid', sort: true, hide: true } |
| | | , { field: 'æ¥æ', title: 'æ¥æ', width: 120, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'åæ®å·', title: 'åæ®å·', width: 150, } |
| | | , { field: 'ç¶æ', title: 'ç¶æ', width: 100, sort: true } |
| | | , { field: 'HBillType', title: 'HBillType', hide: true, sort: true } |
| | | , { field: 'è¡ç¶æ', title: 'è¡ç¶æ', width: 125, sort: true } |
| | | , { field: 'ä¾åºå', title: 'ä¾åºå', width: 150 } |
| | | , { field: 'ä¸å¡å', title: 'ä¸å¡å', width: 100 } |
| | | //, { field: 'HBillType', title: 'HBillType', hide: true } |
| | | //, { field: 'HSupID', title: 'HSupID', hide: true } |
| | | //, { field: 'ä¸å¡ç¶æ', title: 'ä¸å¡ç¶æ', width: 100, hide: true } |
| | | , { field: 'åé
ç¶æ', title: 'åé
ç¶æ', width: 100 } |
| | | , { field: 'åå¸ç¶æ', title: 'åå¸ç¶æ', width: 100 } |
| | | , { field: 'ä¾åºåååç¶æ', title: 'ä¾åºåååç¶æ', width: 135 }/*ç©æä»£ç ï¼ç©æåç§°ï¼è§æ ¼åå·ï¼æ¹å·ï¼æ°éï¼åä½ï¼æºååå·*/ |
| | | , { field: 'åé¦ç¶æ', title: 'ä¾åºååé¦ç¶æ', width: 135 } |
| | | , { field: 'ç©æç¼ç ', title: 'ç©æç¼ç ', width: 120 } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 130 } |
| | | , { field: 'æ§ç©æç¼ç ', title: 'æ§ç©æç¼ç ', width: 130 } |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 130 } |
| | | , { field: 'æ°é', title: 'è®¢åæ°é', width: 100, totalRow: true } |
| | | , { field: 'æå°æ¡ç æ°é', title: 'æå°æ¡ç æ°é', width: 120, totalRow: true } |
| | | /* å®çæ°å¢å段 begin */ |
| | | , { field: '坿尿¡ç æ°é', title: '坿尿¡ç æ°é', width: 120, totalRow: true} |
| | | /* å®çæ°å¢å段 end */ |
| | | , { field: 'å
³èæ°é', title: 'å·²åè´§æ°é', width: 120, totalRow: true} |
| | | , { field: 'æªå
³èæ°é', title: 'å¯åè´§æ°é', width: 120, totalRow: true} |
| | | /* å®çæ°å¢å段 begin */ |
| | | , { field: 'éææ°é', title: 'éææ°é', width: 120, totalRow: true} |
| | | , { field: '宿¶æ°é', title: '宿¶æ°é', width: 120, totalRow: true} |
| | | , { field: 'å
¥åºæ°é', title: 'å
¥åºæ°é', width: 120, totalRow: true} |
| | | , { field: 'å©ä½å
¥åºæ°é', title: 'å©ä½å
¥åºæ°é', width: 120, totalRow: true} |
| | | , { field: 'å©ä½æ¶ææ°é', title: 'å©ä½æ¶ææ°é', width: 120, totalRow: true} |
| | | /* å®çæ°å¢å段 end */ |
| | | , { field: 'å®æç¶æ', title: 'å®æç¶æ', width: 100 } |
| | | , { field: 'HUnitID', title: 'HUnitID', hide: true } |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', width: 100 } |
| | | //, { field: 'HUnitID', title: 'HUnitID', hide: true } éå¤ |
| | | , { field: '计éåä½ä»£ç ', title: '计éåä½ä»£ç ', width: 120 , hide: true } |
| | | , { field: '计éåä½', title: '计éåä½', width: 100 } |
| | | , { field: 'æ¹å·', title: 'æ¹å·', width: 100 } |
| | | , { field: 'æ°é', title: 'æ°é', width: 100, totalRow: true } |
| | | , { field: 'æºååå·', title: 'æºååå·', width: 100 } |
| | | //, { field: 'ä¾åºå代ç ', title: 'ä¾åºå代ç ', width: 120, hide: true} |
| | | //, { field: 'ä¸å¡å代ç ', title: 'ä¸å¡å代ç ', width: 100, hide: true} |
| | | //, { field: 'HPriority', title: 'HPriority', width: 100, hide: true } |
| | | , { field: 'ä¼å
级', title: 'ä¼å
级', width: 100 } |
| | | , { field: '交货å°ç¹', title: '交货å°ç¹', width: 100} |
| | | , { field: 'HPSStyleID', title: 'HPSStyleID', hide: true } |
| | | , { field: 'éè´æ¹å¼ä»£ç ', title: 'éè´æ¹å¼ä»£ç ', width: 120, hide: true } |
| | | , { field: 'éè´æ¹å¼', title: 'éè´æ¹å¼', width: 100} |
| | | , { field: 'HSSID', title: 'HSSID', hide: true } |
| | | , { field: 'ç»ç®æ¹å¼ä»£ç ', title: 'ç»ç®æ¹å¼ä»£ç ', width: 120} |
| | | , { field: 'ç»ç®æ¹å¼', title: 'ç»ç®æ¹å¼', width: 100} |
| | | , { field: 'ç»ç®æ¥æ', title: 'ç»ç®æ¥æ', width: 120, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.ç»ç®æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'HCurID', title: 'HCurID', hide: true } |
| | | , { field: 'å¸å«ä»£ç ', title: 'å¸å«ä»£ç ', width: 100, hide: true } |
| | | , { field: 'å¸å«', title: 'å¸å«', width: 100} |
| | | , { field: 'æ±ç', title: 'æ±ç', width: 100} |
| | | , { field: 'HDeptID', title: 'HDeptID', hide: true } |
| | | , { field: 'é¨é¨ä»£ç ', title: 'é¨é¨ä»£ç ', width: 100, hide: true } |
| | | , { field: 'é¨é¨', title: 'é¨é¨', width: 100} |
| | | , { field: 'HManagerID', title: 'HManagerID', hide: true } |
| | | , { field: '主管代ç ', title: '主管代ç ', width: 100, hide: true } |
| | | , { field: '主管', title: '主管', width: 100} |
| | | , { field: 'HEmpID', title: 'HEmpID', hide: true } |
| | | , { field: 'æè¦', title: 'æè¦', width: 100 } |
| | | , { field: 'HWHID', title: '主表ä»åºID', width: 120, hide: true} |
| | | , { field: 'ä»åº', title: '主表ä»åº', width: 100, hide: true} |
| | | , { field: 'è¡¨å¤´å¤æ³¨', title: 'è¡¨å¤´å¤æ³¨', width: 100} |
| | | , { field: 'hsubid', title: 'hsubid', hide: true } |
| | | , { field: 'HMaterID', title: 'HMaterID', hide: true } |
| | | , { field: 'åä»·', title: 'åä»·', width: 100} |
| | | , { field: 'éé¢', title: 'éé¢', width: 100, totalRow: true } |
| | | , { field: 'ç¨ç', title: 'ç¨ç', width: 100} |
| | | , { field: 'ç¨é¢', title: 'ç¨é¢', width: 100} |
| | | , { field: 'ææ£ç', title: 'ææ£ç', width: 100} |
| | | , { field: 'ä»·ç¨å计', title: 'ä»·ç¨å计', width: 100} |
| | | , { field: 'äº¤è´§æ¥æ', title: 'äº¤è´§æ¥æ', width: 120, templet: "<div>{{d.äº¤è´§æ¥æ ==null ?'':layui.util.toDateString(d.äº¤è´§æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: '计åè·è¸ªå·', title: '计åè·è¸ªå·', width: 100} |
| | | , { field: '表ä½å¤æ³¨', title: '表ä½å¤æ³¨', width: 100} |
| | | , { field: 'å¶å人', title: 'å¶å人', width: 100} |
| | | , { field: 'å¶åæ¥æ', title: 'å¶åæ¥æ', width: 200, templet: "<div>{{d.å¶åæ¥æ ==null ?'':layui.util.toDateString(d.å¶åæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true } |
| | | , { field: 'å®¡æ ¸äºº', title: 'å®¡æ ¸äºº', width: 100} |
| | | , { field: 'å®¡æ ¸æ¥æ', title: 'å®¡æ ¸æ¥æ', width: 120, templet: "<div>{{d.å®¡æ ¸æ¥æ ==null ?'':layui.util.toDateString(d.å®¡æ ¸æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'ä¿®æ¹äºº', title: 'ä¿®æ¹äºº', width: 100} |
| | | , { field: 'ä¿®æ¹æ¥æ', title: 'ä¿®æ¹æ¥æ', width: 120, templet: "<div>{{d.ä¿®æ¹æ¥æ ==null ?'':layui.util.toDateString(d.ä¿®æ¹æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'å
³é人', title: 'å
³é人', width: 100} |
| | | , { field: 'å
³éæ¥æ', title: 'å
³éæ¥æ', width: 120, templet: "<div>{{d.å
³éæ¥æ ==null ?'':layui.util.toDateString(d.å
³éæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'è¡å
³é人', title: 'è¡å
³é人', width: 125, sort: true } |
| | | , { field: 'è¡å
³éæ¥æ', title: 'è¡å
³éæ¥æ', width: 200, templet: "<div>{{d.è¡å
³é人 == ''?'':layui.util.toDateString(d.è¡å
³éæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true } |
| | | , { field: 'ä½åºäºº', title: 'ä½åºäºº', width: 100} |
| | | , { field: 'ä½åºæ¥æ', title: 'ä½åºæ¥æ', width: 120, templet: "<div>{{d.ä½åºæ¥æ ==null ?'':layui.util.toDateString(d.ä½åºæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | |
| | | ]] |
| | | , cols: [[]] |
| | | |
| | | , done: function (res, curr, count) { |
| | | soulTable.render(this); |
| | |
| | | optionSub = { |
| | | elem: '#mainTableSub' |
| | | , toolbar: '#toolbarDemoSub' |
| | | , height: 'full-500' |
| | | , page: true |
| | | //, height: 'full-500' |
| | | , page: false |
| | | , totalRow: true |
| | | , cellMinWidth: 90 |
| | | , limit: 50 |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Cg_POOrderBill/QueryList', |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sWhere , "user": sessionStorage["HUserName"]}, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | |
| | | } |
| | | } |
| | | //å¨å表左边添å å¾éæ¡ |
| | | col.push({ type: 'radio', fixed: 'left', totalRowText: 'å计'}); |
| | | col.push({ type: 'checkbox', fixed: 'left', totalRowText: 'å计'}); |
| | | for (var i = 0; i < data.length; i++) { |
| | | // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') { |
| | | if ($.inArray(data[i].name, titleData) > -1) { |
| | |
| | | $("#HBillNo").val(""); |
| | | $("#HEmpName").val(""); |
| | | $("#HSupName").val(""); |
| | | $("#HOrgID").val(sessionStorage["OrganizationID"]); |
| | | /*$("#HOrgID").val(sessionStorage["OrganizationID"]);*/ |
| | | $("#ColContent").val(""); |
| | | $("#ColName").val("0"); |
| | | $("#Comparator").val("0"); |
| | |
| | | |
| | | //#region è¡ç¹å»äºä»¶ |
| | | 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 ä¸ºè¡¨æ ¼ID æ³¨ææ¤å¤å¦æID䏿£ç¡®å°å¯¼è´ä½ å¨çå¬å¤éæ¡æ¶è·åä¸å°ä½ éæ©çæ°æ®ï¼åé¢çåªæ¯æ·»å æå é¤é䏿ªé䏿 ·å¼ä»¥åè®¾ç½®èæ¯è²ï¼åä½é¢è² |
| | | layui.each(table.cache.mainTable, function (i, l) { |
| | | if (obj.tr.index() == l.LAY_TABLE_INDEX) { |
| | | l.LAY_CHECKED = flag; |
| | | } |
| | | }); |
| | | //æ¾ç¤ºå表 |
| | | get_DisplaySub(obj.data); |
| | | //夿æ¯å¦å·²ç»è¢«éä¸ |
| | | if (obj.tr.find('.layui-form-radioed').length == 0) { |
| | | //触ååéæ¡éä¸äºä»¶ |
| | | obj.tr.find('i[class="layui-anim layui-icon"]').trigger("click"); |
| | | } |
| | | |
| | | |
| | | |
| | | }) |
| | | //å表åé |
| | | table.on('row(mainTableSub)', function (obj) { |
| | |
| | | }) |
| | | //#endregion |
| | | |
| | | //#region æåºåéæ© |
| | | table.on('sort(mainTable)', function (obj) { //注ï¼sort æ¯å·¥å
·æ¡äºä»¶åï¼test æ¯ table åå§å®¹å¨ç屿§ lay-filter="对åºçå¼" |
| | | table.reload('mainTable', { |
| | | initSort: obj //è®°å½åå§æåºï¼å¦æä¸è®¾çè¯ï¼å°æ æ³æ 记表头çæåºç¶æã layui 2.1.1 æ°å¢åæ° |
| | | , where: { //请æ±åæ°ï¼æ³¨æï¼è¿éé¢çåæ°å¯ä»»æå®ä¹ï¼å¹¶éä¸é¢åºå®çæ ¼å¼ï¼ |
| | | field: obj.field //æåºå段 卿¥å£ä½ä¸ºåæ°å段 field order |
| | | , order: obj.type //æåºæ¹å¼ 卿¥å£ä½ä¸ºåæ°å段 field order |
| | | } |
| | | }); |
| | | option.data = layui.table.cache["mainTable"]; |
| | | table.render(option); |
| | | //å·æ°æé®æ¾ç¤º |
| | | var btns = document.getElementsByTagName("button"); //è·åæ¬é¡µæææé®å¯¹è±¡ |
| | | Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]); |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region åå§æ¥æé´é 䏿å表 |
| | | function setSelect_HInitTimeCycle() { |
| | |
| | | //éèæ¾ç¤ºè¿æ»¤æ¹æ¡çæ ç¾ä¿¡æ¯ |
| | | document.getElementById("HFilterScheme_Now").style.display = "none"; |
| | | ////æ§è¡æ¥è¯¢æ¹æ³ |
| | | //get_FastQuery() |
| | | get_FastQuery() |
| | | //form.render("select"); |
| | | } |
| | | }, error: function () { |
| | |
| | | var addSWhere = ""; |
| | | |
| | | if (openType == 2) { |
| | | addSWhere = " and ç¶æ = 'å·²å®¡æ ¸' and è¡ç¶æ = '' and HOrgID = " + HOrgID; |
| | | addSWhere = " and å®¡æ ¸äºº! = '' and å
³é人 = ''"; |
| | | } |
| | | return addSWhere; |
| | | } |