| | |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | get_FastQuery(1); |
| | | get_FastQuery_ICMO();//æ¥è¯¢å¸¦æäº§è®¢å |
| | | //éèå¾éåæ®µ |
| | | DisPlay_HideColumn(); |
| | | get_Display2(sWhere_ICMO); |
| | | |
| | | } |
| | | //#endregion |
| | | |
| | |
| | | columns.push({ field: 'æ¨æ¥æ°é', title: 'æ¨æ¥æ°é' }); |
| | | columns.push({ field: 'ä¼å
级', title: 'ä¼å
级', width: 150, edit: 'text', sort: true }); |
| | | columns.push({ field: 'çäº§èµæº', title: 'çäº§èµæº', width: 150, edit: 'text', event: "HSourceID" }); |
| | | columns.push({ field: 'æä½å·¥', title: 'æä½å·¥', width: 150, edit: 'text', event: "HEmpID" }); |
| | | |
| | | columns.push({ field: '使ç¨å·¥è£
', title: '使ç¨å·¥è£
', width: 150 }); |
| | | columns.push({ |
| | | field: Format(myDate.getTime() + 0 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 0 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) { |
| | | return DayColor(d[Format(myDate.getTime() + 0 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 0 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 0 * oneday, 'yyyy-MM-dd')); |
| | |
| | | columns.push({ field: 'HEmpID', title: 'HEmpID', hide: true }); |
| | | columns.push({ field: 'æåæ±æ¥æ°é', title: 'æåæ±æ¥æ°é', width: 150, edit: 'text', sort: true }); |
| | | columns.push({ field: 'éå®å·¥å', title: 'éå®å·¥å', width: 150, sort: true, filter: true });//0 |
| | | columns.push({ field: 'HMouldID', title: 'HMouldID', width: 150, hide: true }); |
| | | columns.push({ field: 'æä½å·¥', title: 'æä½å·¥', width: 150, edit: 'text', event: "HEmpID" }); |
| | | columns.push({ fixed: 'right', title: 'æä½', toolbar: '#barDemo' }); |
| | | option_columns = columns; |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , height: 'full-120' |
| | | , height: 600 |
| | | , page: false |
| | | , cellMinWidth: 90 |
| | | , cols: [columns] |
| | |
| | | soulTable.render(this); |
| | | $('.layui-table thead').on('click', 'th', function () { |
| | | // è·åç¹å»ç表头ç field å¼ |
| | | var field = $(this).data('field'); |
| | | set_InitGrid1(field); |
| | | sWhere = { |
| | | HORGID: sessionStorage["OrganizationID"] |
| | | , HBEGINDATE: field |
| | | , HENDDATE: field |
| | | } |
| | | get_Display_3(JSON.stringify(sWhere)); |
| | | var field = $(this).data('field'); |
| | | if (isDateField(field)) { |
| | | set_InitGrid1(field); |
| | | sWhere = { |
| | | HORGID: sessionStorage["OrganizationID"], |
| | | HBEGINDATE: field, |
| | | HENDDATE: field |
| | | }; |
| | | get_Display_3(JSON.stringify(sWhere)); |
| | | } |
| | | }); |
| | | //res.data.forEach(function (item, index) { |
| | | // if (data1.data.DataColor != undefined) { |
| | |
| | | } |
| | | if (HICMOBillNo_ICMO) { |
| | | sWhere_ICMO += " and åæ®å· like '%" + HICMOBillNo_ICMO + "%'"; |
| | | } |
| | | } |
| | | sWhere_ICMO += " and ç产ç»ç» = '" + sessionStorage["Organization"] +"'"; |
| | | |
| | | sWhere_ICMO += " Order By æ¥æ desc"; |
| | | |
| | | get_Display2(sWhere_ICMO); |
| | | sWhere_ICMO = ""//è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: 'ç产订åå表'//æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , content: ['../../ç产管ç/ç产任å¡å/Sc_ICMOBillList.html?HDeptID=' + HDeptID, 'yes'] |
| | | , content: ['../../ç产管ç/ç产任å¡å/Sc_ICMOBillList.html?openType =4&HDeptID=' + HDeptID, 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) {//æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | |
| | | } |
| | | }); |
| | | } else { |
| | | layer.close(ajaxLoad); // å
³éæå®loading |
| | | return layer.msg("è¯·éæ©ä¸æ¡æ°æ®è¿è¡å·¥èºè·¯çº¿ç¼è¾"); |
| | | } |
| | | } |
| | |
| | | }); |
| | | |
| | | //æ ¹æ®è½¦é´å 餿²¡æéå®çæ°æ® |
| | | var sql = "delete from Sc_WorkBillSortBillSub where HMasterDate>=convert(varchar(10) ,DATEADD(DAY," + HPlanDay + ",GETDATE()),20) and HInterID in(select HInterID from Sc_WorkBillSortBillMain where HWorkShopID=" + HWorkShopID + " and HLockOrder != 1 )"; |
| | | var sql = "delete from Sc_WorkBillSortBillSub where HLockedSub != 1 and HInterID in (select HInterID from Sc_WorkBillSortBillMain where HWorkShopID=" + HWorkShopID + " and HLockOrder != 1 )"; |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Gy_SOPBillList/UpDelSQL', |
| | | type: "GET", |
| | |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | ds = data1.data |
| | | option.data[i]["HMouldID"] = data1.data[0].HMouldID == undefined ? 0 : data1.data[0].HMouldID; |
| | | option.data[i]["使ç¨å·¥è£
"] = data1.data[0].使ç¨å·¥è£
; |
| | | } else { |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | ds = data1.data |
| | | option.data[i]["HMouldID"] = data1.data[0].HMouldID == undefined ? 0 : data1.data[0].HMouldID; |
| | | option.data[i]["使ç¨å·¥è£
"] = data1.data[0].使ç¨å·¥è£
; |
| | | } else { |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | |
| | | |
| | | //åé¤ä¸æ¹æäº§å表ä¸å·²ç»å å
¥çç产订å |
| | | var tables = []; |
| | | for (var i = 0; i < option2.data.length; i++) { |
| | | var temp = option2.data[i]["hmainid"] + "|" + option2.data[i]["HEntryID"]; |
| | | if ($.inArray(temp, compareList) == -1) { |
| | | tables.push(option2.data[i]); |
| | | if (option2.data != undefined) { |
| | | for (var i = 0; i < option2.data.length; i++) { |
| | | var temp = option2.data[i]["hmainid"] + "|" + option2.data[i]["HEntryID"]; |
| | | if ($.inArray(temp, compareList) == -1) { |
| | | tables.push(option2.data[i]); |
| | | } |
| | | } |
| | | } |
| | | option2.data = tables; |
| | | option2.data = tables; |
| | | |
| | | //éæ°æ¸²æå表2 |
| | | table.render(option2); |
| | | |
| | | //éæ°æ¸²æå表2 |
| | | table.render(option2); |
| | | } |
| | | layer.close(ajaxLoad); |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | |
| | | var ajaxLoad = layer.load(); |
| | | if (checkStatus.data.length != 1) { |
| | | layer.alert("è¯·éæ©ä¸æ¡æ°æ®!"); |
| | | layer.close(ajaxLoad); |
| | | } else { |
| | | var TabData = checkStatus.data; |
| | | var HMaterID = TabData[0].HMaterID; |
| | |
| | | }) |
| | | } |
| | | |
| | | // å¤æè¡¨å¤´æ 颿¯å¦ä¸ºæ¥ææ ¼å¼ |
| | | function isDateField(field) { |
| | | // æ£æ¥æ¥ææ ¼å¼ |
| | | var datePatterns = [ |
| | | /^\d{4}-\d{2}-\d{2}$/, // YYYY-MM-DD |
| | | /^\d{4}\/\d{2}\/\d{2}$/, // YYYY/MM/DD |
| | | /^\d{2}-\d{2}-\d{4}$/, // DD-MM-YYYY |
| | | /^\d{2}\/\d{2}\/\d{4}$/, // DD/MM/YYYY |
| | | /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/, // YYYY-MM-DD HH:mm:ss |
| | | /^\d{4}å¹´\d{2}æ\d{2}æ¥$/ // ä¸ææ¥æ |
| | | ]; |
| | | |
| | | return datePatterns.some(pattern => pattern.test(field)); |
| | | } |
| | | //é¡µé¢æåº |
| | | 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); |
| | | }); |
| | | |
| | | table.on('sort(mainTable_ICMO)', function (obj) { //注ï¼sort æ¯å·¥å
·æ¡äºä»¶åï¼test æ¯ table åå§å®¹å¨ç屿§ lay-filter="对åºçå¼" |
| | | table.reload('mainTable_ICMO', { |
| | | initSort: obj //è®°å½åå§æåºï¼å¦æä¸è®¾çè¯ï¼å°æ æ³æ 记表头çæåºç¶æã layui 2.1.1 æ°å¢åæ° |
| | | , where: { //请æ±åæ°ï¼æ³¨æï¼è¿éé¢çåæ°å¯ä»»æå®ä¹ï¼å¹¶éä¸é¢åºå®çæ ¼å¼ï¼ |
| | | field: obj.field //æåºå段 卿¥å£ä½ä¸ºåæ°å段 field order |
| | | , order: obj.type //æåºæ¹å¼ 卿¥å£ä½ä¸ºåæ°å段 field order |
| | | } |
| | | }); |
| | | option2.data = layui.table.cache["mainTable_ICMO"]; |
| | | table.render(option); |
| | | }); |
| | | |
| | | //åææ¾ç¤ºä¸ææ¡ |
| | | function ColFilter() { |
| | | var Organization = '<option value="0" selected="selected" ></option>'; |