| | |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">ä¿å</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnLock" id="btnLock">éå®</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnUnlock" id="btnUnlock">è§£é</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnCompleteSetAnalysis" id="btnCompleteSetAnalysis">é½å¥åæ</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnYLYS" id="btnYLYS">è¦æè¿ç®</button> |
| | | <!--<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnCompleteSetAnalysis" id="btnCompleteSetAnalysis">é½å¥åæ</button>--> |
| | | <!--<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnYLYS" id="btnYLYS">è¦æè¿ç®</button>--> |
| | | <!--<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnTLYS" id="btnTLYS">ææè¿ç®</button>--> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnAddICMO" id="btnAddICMO">æ·»å 订å</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnProZZPC" id="btnProZZPC">ç»è£
æäº§</button> |
| | |
| | | columns.push({ field: 'åæ®å·', title: 'åæ®å·', hide: true, sort: true }); |
| | | columns.push({ field: 'éå®è®¢åå·', title: 'éå®è®¢åå·', width: 150, sort: true, filter: true }); |
| | | columns.push({ field: 'ç产订åå·', title: 'ç产订åå·', width: 150, style: 'background-color: #f9f9f9;', sort: true, filter: true }); |
| | | columns.push({ field: 'éå®å·¥å', title: 'éå®å·¥å', width: 105, sort: true, filter: true });//0 |
| | | columns.push({ field: 'ç产ç»ç»', title: 'ç产ç»ç»', width: 150, sort: true, hide: true }); |
| | | columns.push({ field: 'éå®å·¥å', title: 'éå®å·¥å', width: 150, sort: true, filter: true });//0 |
| | | columns.push({ field: 'ç产ç»ç»', title: 'ç产ç»ç»', width: 150, sort: true }); |
| | | columns.push({ field: 'ç©æä»£ç ', title: 'ç©æç¼ç ', width: 150, sort: true, filter: true }); |
| | | columns.push({ field: 'ç©æåç§°', title: 'ç©æåç§°', width: 150, sort: true, filter: true }); |
| | | columns.push({ field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', width: 150, sort: true, filter: true }); |
| | |
| | | columns.push({ field: 'æ¨æ¥æ°é', title: 'æ¨æ¥æ°é', filter: true }); |
| | | columns.push({ field: 'ä¼å
级', title: 'ä¼å
级', width: 150, edit: 'text', sort: true }); |
| | | columns.push({ field: 'çäº§èµæº', title: 'çäº§èµæº', width: 150, edit: 'text', event: "HSourceID", filter: true }); |
| | | columns.push({ field: '使ç¨å·¥è£
', title: '使ç¨å·¥è£
', width: 150, hide: true }); |
| | | columns.push({ field: 'ææ©å¼å·¥æ¥æ', title: 'ææ©å¼å·¥æ¥æ', width: 150, templet: "<div>{{d.ææ©å¼å·¥æ¥æ ==null ?'':layui.util.toDateString(d.ææ©å¼å·¥æ¥æ, 'yyyy-MM-dd')}}</div>", event: "HEarlyDate", sort: true, hide: true, filter: { type: 'date[yyyy-MM-dd HH:mm:ss]' } }); |
| | | columns.push({ field: '使ç¨å·¥è£
', title: '使ç¨å·¥è£
', width: 150, hide: true }); |
| | | columns.push({ field: 'éå®è®¢åå®¡æ ¸æ¥æ', title: 'éå®è®¢åå®¡æ ¸æ¥æ', width: 150, templet: "<div>{{d.éå®è®¢åå®¡æ ¸æ¥æ ==null ?'':layui.util.toDateString(d.éå®è®¢åå®¡æ ¸æ¥æ, 'yyyy-MM-dd')}}</div>", sort: true, filter: { type: 'date[yyyy-MM-dd HH:mm:ss]' } }); |
| | | columns.push({ field: 'ä¸å¡ç¶æ', title: 'ä¸å¡ç¶æ', width: 150, sort: true, hide: true }); |
| | | columns.push({ field: '产线å
¥åºæ°é', title: '产线å
¥åºæ°é', width: 150, sort: true, hide: true }); |
| | | columns.push({ field: 'æªææ°é', title: '坿æ°é', width: 150, sort: true, hide: true }); |
| | |
| | | columns.push({ field: '仿¥ä¹åæ¥è®¡åæ°é', title: '仿¥ä¹åæ¥è®¡åæ°é', width: 150, sort: true });//0 |
| | | columns.push({ field: '计åå¼å§æ¥æ', title: 'é¢è®¡å¼å·¥æ¥æ', width: 150, templet: "<div>{{d.计åå¼å§æ¥æ ==null ?'':layui.util.toDateString(d.计åå¼å§æ¥æ, 'yyyy-MM-dd')}}</div>", sort: true, filter: { type: 'date[yyyy-MM-dd HH:mm:ss]' } }); |
| | | columns.push({ field: '计åç»ææ¥æ', title: '计åç»ææ¥æ', width: 150, templet: "<div>{{d.计åç»ææ¥æ ==null ?'':layui.util.toDateString(d.计åç»ææ¥æ, 'yyyy-MM-dd')}}</div>", event: "HPlanEndDate", sort: true, filter: { type: 'date[yyyy-MM-dd HH:mm:ss]' } }); |
| | | columns.push({ field: 'éå®è®¢åå®¡æ ¸æ¥æ', title: 'éå®è®¢åå®¡æ ¸æ¥æ', width: 150, templet: "<div>{{d.éå®è®¢åå®¡æ ¸æ¥æ ==null ?'':layui.util.toDateString(d.éå®è®¢åå®¡æ ¸æ¥æ, 'yyyy-MM-dd')}}</div>", sort: true, filter: { type: 'date[yyyy-MM-dd HH:mm:ss]' } }); |
| | | columns.push({ field: 'ææ©å¼å·¥æ¥æ', title: 'ææ©å¼å·¥æ¥æ', width: 150, templet: "<div>{{d.ææ©å¼å·¥æ¥æ ==null ?'':layui.util.toDateString(d.ææ©å¼å·¥æ¥æ, 'yyyy-MM-dd')}}</div>", event: "HEarlyDate", sort: true, filter: { type: 'date[yyyy-MM-dd HH:mm:ss]' } }); |
| | | columns.push({ field: 'æä½å·¥', title: 'æä½å·¥', width: 150, edit: 'text', event: "HEmpID" }); |
| | | columns.push({ field: 'HMouldID', title: 'HMouldID', width: 150, hide: true }); |
| | | columns.push({ field: 'HMouldPCTime', title: 'HMouldPCTime', width: 150, hide: true }); |
| | |
| | | }); |
| | | } |
| | | |
| | | sWorkQty = option.data[i]["å°æ¶äº§è½"]; |
| | | sWorkQty = option.data[i]["产线æ»äº§è½"]; |
| | | //è·åæ´æ°è®¡åæ°é |
| | | if (SDSum > 0) { |
| | | sPlanQty = sPlanQty - SDSum - HReportQty; |
| | |
| | | }); |
| | | |
| | | if (dsSub == null || dsSub.length == 0) { |
| | | get_HFData(1, i); |
| | | //get_HFData(1, i); |
| | | continue;//å¦ææ²¡æå©ä½å æ§è¡ä¸ä¸ä¸ªç产订å |
| | | } |
| | | if (dsSub != null)//ä¸å çæç¨ |
| | |
| | | set_AddNew1(option.data[i]); |
| | | } |
| | | bFind = true; |
| | | |
| | | break |
| | | } |
| | | } else { |
| | | get_HFData(1, i); |
| | | //get_HFData(1, i); |
| | | } |
| | | } |
| | | } |
| | |
| | | if (sLeftQty > 0) { |
| | | if (ds[i]["æ¥æ"] == grd.cols[0][j].field) //è¡¨æ ¼çæ é¢ä¸ ä¿åäºæ¥æï¼ |
| | | { |
| | | //妿æ¶é´è¢« ä¸éä½éå ç¨ å è·³è¿ |
| | | b = false; |
| | | |
| | | //if (dsPre != null && dsPre.Tables[0].Rows.Count > 0) { |
| | | // for (var m = 0; m < dsPre.Tables[0].Rows.Count; m++) |
| | | // { |
| | | // if (ds[i]["æ¥æ"] < DBUtility.ClsPub.isDate(dsPre.Tables[0].Rows[m]["æ¥æ"])) { |
| | | // b = true; |
| | | // } |
| | | // } |
| | | //} |
| | | if (b == false) { |
| | | if (dsPre != null && ds[i]["æ¥æ"] == dsPre[0]["æ¥æ"]) { |
| | | |
| | | ////HUseTimes 为 ä¸éä½éå å©ä½å·¥æ¶ã |
| | | //if (ds[i]["æå¤§å©ä½å·¥æ¶"] > dsPre[0]["HUseTimes"]) { |
| | | // if (parseFloat(sLeftQty) > parseFloat(sWorkQty * dsPre[0]["HUseTimes"])) { |
| | | // grd.data[iRow][j] = parseFloat(sWorkQty * (dsPre[0]["HUseTimes"])); |
| | | // sLeftQty = sLeftQty - parseFloat(sWorkQty * (dsPre[0]["HUseTimes"])); |
| | | // oSub = new ClsGridValues(); |
| | | // oSub.iRow = iRow; |
| | | // oSub.iCol = j; |
| | | // oSub.HLeftTimes = DBUtility.ClsPub.isSingle(dsPre[0]["HUseTimes"]); |
| | | // oClsGridValues.Add(oSub); |
| | | // } |
| | | // else { |
| | | // grd.data[iRow][j]= sLeftQty; |
| | | // sLeftQty = 0; |
| | | // oSub = new ClsGridValues(); |
| | | // oSub.iRow = iRow; |
| | | // oSub.iCol = j; |
| | | // oSub.HLeftTimes = DBUtility.ClsPub.isSingle(dsPre.Tables[0].Rows[0]["HUseTimes"]); |
| | | // oClsGridValues.Add(oSub); |
| | | // } |
| | | //} |
| | | //else //ååä¸éè¦èèå çï¼ä¸é¢çè¿ä¸æ®µä¸éè¦ |
| | | //{ |
| | | // if (sLeftQty > sWorkQty * ds[i]["æå¤§å©ä½å·¥æ¶"]) { |
| | | // grd.data[iRow][j]= parseFloat(sWorkQty * ds[i]["æå¤§å©ä½å·¥æ¶"]); |
| | | // sLeftQty = sLeftQty - (parseFloat(sWorkQty * ds[i]["æå¤§å©ä½å·¥æ¶"])); |
| | | // sLeftQty = 0; |
| | | // oSub = new ClsGridValues(); |
| | | // oSub.iRow = iRow; |
| | | // oSub.iCol = j; |
| | | // oSub.HLeftTimes = ds[i]["æå¤§å©ä½å·¥æ¶"]; |
| | | // oClsGridValues.Add(oSub); |
| | | // } |
| | | // else { |
| | | // grd.data[iRow][j]= sLeftQty; |
| | | // sLeftQty = 0; |
| | | // oSub = new ClsGridValues(); |
| | | // oSub.iRow = iRow; |
| | | // oSub.iCol = j; |
| | | // oSub.HLeftTimes = ds[i]["æå¤§å©ä½å·¥æ¶"]; |
| | | // oClsGridValues.Add(oSub); |
| | | // } |
| | | //} |
| | | } |
| | | else { |
| | | var dayWorkQty = sWorkQty * ds[i]["å©ä½å·¥æ¶"]; |
| | |
| | | if (sLeftQty > dayWorkQty) { |
| | | grd.data[iRow][grd.cols[0][j].field] = dayWorkQty; |
| | | sLeftQty = sLeftQty - dayWorkQty; |
| | | |
| | | //oSub = new ClsGridValues(); |
| | | //oSub.iRow = iRow; |
| | | //oSub.iCol = j; |
| | | option.data[iRow]["HLeftTimes"] = ds[i]["æå¤§å©ä½å·¥æ¶"]; |
| | | break; |
| | | //oSub.HLeftTimes = ds[i]["æå¤§å©ä½å·¥æ¶"]; |
| | | //oClsGridValues.Add(oSub); |
| | | } |
| | | else { |
| | | grd.data[iRow][grd.cols[0][j + HPlanDay].field] = Math.round(sLeftQty * 10) / 10; |
| | | sLeftQty = 0; |
| | | |
| | | //oSub = new ClsGridValues(); |
| | | //oSub.iRow = iRow; |
| | | //oSub.iCol = j; |
| | | option.data[iRow]["HLeftTimes"] = ds[i]["æå¤§å©ä½å·¥æ¶"]; |
| | | break; |
| | | //oSub.HLeftTimes = ds[i]["æå¤§å©ä½å·¥æ¶"]; |
| | | //oClsGridValues.Add(oSub); |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | if (ds[i]["æ¥æ"] == grd.cols[0][j].field) { |
| | | //妿æ¶é´è¢« ä¸éä½éå ç¨ å è·³è¿ |
| | | b = false; |
| | | |
| | | //if (dsPre != null && dsPre.Tables[0].Rows.Count > 0) { |
| | | // for (var m = 0; m < dsPre.Tables[0].Rows.Count; m++) |
| | | // { |
| | | // if (DBUtility.ClsPub.isDate(ds[i]["æ¥æ"]) < DBUtility.ClsPub.isDate(dsPre.Tables[0].Rows[m]["æ¥æ"])) { |
| | | // b = true; |
| | | // } |
| | | // } |
| | | //} |
| | | if (b == false) { |
| | | if (dsPre != null && s[i]["æ¥æ"] == dsPre[0]["æ¥æ"]) { |
| | | |
| | | //if (ds[i]["å©ä½å·¥æ¶"] > (DBUtility.ClsPub.isSingle(dsPre.Tables[0].Rows[0]["HUseTimes"]))) { |
| | | // if (sLeftQty > parseFloat(sWorkQty * (DBUtility.ClsPub.isSingle(dsPre.Tables[0].Rows[0]["HUseTimes"])))) { |
| | | // grd.data[iRow][j]= parseFloat(sWorkQty * (DBUtility.ClsPub.isSingle(dsPre.Tables[0].Rows[0]["HUseTimes"]))); |
| | | // sLeftQty = sLeftQty - parseFloat(sWorkQty * (DBUtility.ClsPub.isSingle(dsPre.Tables[0].Rows[0]["HUseTimes"]))); |
| | | // oSub = new ClsGridValues(); |
| | | // oSub.iRow = iRow; |
| | | // oSub.iCol = j; |
| | | // oSub.HLeftTimes = DBUtility.ClsPub.isSingle(dsPre.Tables[0].Rows[0]["HUseTimes"]); |
| | | // oClsGridValues.Add(oSub); |
| | | // } |
| | | // else { |
| | | // grd.data[iRow][j]= sLeftQty; |
| | | // sLeftQty = 0; |
| | | // oSub = new ClsGridValues(); |
| | | // oSub.iRow = iRow; |
| | | // oSub.iCol = j; |
| | | // oSub.HLeftTimes = DBUtility.ClsPub.isSingle(dsPre.Tables[0].Rows[0]["HUseTimes"]); |
| | | // oClsGridValues.Add(oSub); |
| | | // } |
| | | //} |
| | | //else { |
| | | // if (sLeftQty > sWorkQty * ds[i]["å©ä½å·¥æ¶"]) { |
| | | // grd.data[iRow][j]= parseFloat(sWorkQty * ds[i]["å©ä½å·¥æ¶"]); |
| | | // sLeftQty = sLeftQty - (parseFloat(sWorkQty * ds[i]["å©ä½å·¥æ¶"])); |
| | | // sLeftQty = 0; |
| | | // oSub = new ClsGridValues(); |
| | | // oSub.iRow = iRow; |
| | | // oSub.iCol = j; |
| | | // oSub.HLeftTimes = ds[i]["å©ä½å·¥æ¶"]; |
| | | // oClsGridValues.Add(oSub); |
| | | // } |
| | | // else { |
| | | // grd.data[iRow][j]= sLeftQty; |
| | | // sLeftQty = 0; |
| | | // oSub = new ClsGridValues(); |
| | | // oSub.iRow = iRow; |
| | | // oSub.iCol = j; |
| | | // oSub.HLeftTimes = ds[i]["å©ä½å·¥æ¶"]; |
| | | // oClsGridValues.Add(oSub); |
| | | // } |
| | | //} |
| | | } |
| | | else { |
| | | var dayWorkQty = sWorkQty * ds[i]["å©ä½å·¥æ¶"]; |
| | |
| | | if (sLeftQty > dayWorkQty) { |
| | | grd.data[iRow][grd.cols[0][j].field] = dayWorkQty; |
| | | sLeftQty = sLeftQty - dayWorkQty; |
| | | |
| | | //oSub = new ClsGridValues(); |
| | | //oSub.iRow = iRow; |
| | | //oSub.iCol = j; |
| | | //option.data[iRow]["HLeftTimes"] = ds[i]["æå¤§å©ä½å·¥æ¶"]; |
| | | //option.data[iRow]["HUseTimes"] = ds[i]["å©ä½å·¥æ¶"]; |
| | | break; |
| | | |
| | | //oSub.HLeftTimes = ds[i]["å©ä½å·¥æ¶"]; |
| | | //oClsGridValues.Add(oSub); |
| | | } |
| | | else { |
| | | grd.data[iRow][grd.cols[0][j].field] = Math.round(sLeftQty * 10) / 10; |
| | | |
| | | //option.data[iRow]["HUseTimes"] = parseFloat(sLeftQty / sWorkQty); |
| | | sLeftQty = 0; |
| | | |
| | | //oSub = new ClsGridValues(); |
| | | //oSub.iRow = iRow; |
| | | //oSub.iCol = j; |
| | | //option.data[iRow]["HLeftTimes"] = ds[i]["æå¤§å©ä½å·¥æ¶"]; |
| | | break; |
| | | //oSub.HLeftTimes = ds[i]["å©ä½å·¥æ¶"]; |
| | | //oClsGridValues.Add(oSub); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | //#endregion |
| | |
| | | var old_date = new Date(); |
| | | var data = option.data;//table.cache["mainTable"]; |
| | | |
| | | if ($("#HWorkShopIDName").val().indexOf("ç»è£
") !== -1) { |
| | | //æ ¹æ®è®¡åå¼å·¥æ¥ææåºæ°ç» |
| | | data.sort(function (a, b) { |
| | | // é»è®¤æ ¹æ®ææ©å¼å·¥æ¥ææåºï¼ææ©å¼å·¥æ¥æç¸ååæç
§éå®è®¢åå®¡æ ¸æ¥ææåº |
| | | if (new Date(a.ææ©å¼å·¥æ¥æ) == new Date(b.ææ©å¼å·¥æ¥æ)) { |
| | | return new Date(a.éå®è®¢åå®¡æ ¸æ¥æ) - new Date(b.éå®è®¢åå®¡æ ¸æ¥æ) |
| | | } |
| | | return new Date(a.ææ©å¼å·¥æ¥æ) - new Date(b.ææ©å¼å·¥æ¥æ) |
| | | }); |
| | | } else { |
| | | //æ ¹æ®è®¡åç»ææ¥ææåºæ°ç» |
| | | data.sort(function (a, b) { |
| | | // é»è®¤æ ¹æ®è®¡åç»ææ¥ææåºï¼è®¡åç»ææ¥æç¸ååæç
§éå®è®¢åå®¡æ ¸æ¥ææåº |
| | | if (Format(a.计åç»ææ¥æ, 'yyyy/MM/dd') == Format(b.计åç»ææ¥æ, 'yyyy/MM/dd')) { |
| | | return Format(a.éå®è®¢åå®¡æ ¸æ¥æ, 'yyyy/MM/dd') - Format(b.éå®è®¢åå®¡æ ¸æ¥æ, 'yyyy/MM/dd') |
| | | } |
| | | return Format(a.计åç»ææ¥æ, 'yyyy/MM/dd') - Format(b.计åç»ææ¥æ, 'yyyy/MM/dd') |
| | | }); |
| | | } |
| | | //æ ¹æ®éå®è®¢åå®¡æ ¸æ¥ææåºæ°ç» |
| | | data.sort(function (a, b) { |
| | | return new Date(a.éå®è®¢åå®¡æ ¸æ¥æ) - new Date(b.éå®è®¢åå®¡æ ¸æ¥æ) |
| | | }); |
| | | |
| | | for (var i = 0; i < data.length; i++) { |
| | | data[i]["ä¼å
级"] = ((i + 1) * 5); |