function gotoDetailPartialNew(id){$("#pPlanInterBox_Content").empty();removePPInfo();$.ajax({url:"/APP/PPlan/PPlanInternalDetailsNew",type:"post",data:{"id":id},dataType:"json",success:function(res){if(res.Status==200){setPPInfo(res);if(res.Data.rows){var jsonArray=res.Data.rows;var headArray=[];for(var i in jsonArray[0]){headArray[headArray.length]=i}var div=document.getElementById("pPlanInterBox_Content");var table=document.createElement("table");table.id="new_table";table.setAttribute("class","table table-striped table-bordered table-hover dataTables-example");var theadH=document.createElement("thead");var thead=document.createElement("tr");for(var count=1;count 暂无生产计划")}}},})}function mergeCell(table1,startRow,endRow,col){var tb=document.getElementById(table1);if(!tb||!tb.rows||tb.rows.length<=0){return}if(col>=tb.rows[0].cells.length||(startRow>=endRow&&endRow!=0)){return}if(endRow==0){endRow=tb.rows.length-1}for(var i=startRow;i').datetimepicker({language:"zh-CN",format:"yyyy-mm-dd",autoclose:1,startView:2,minView:2,});$(this).append(input);return(input)}});oTable.$(".Date:not(.Total)").editable(function(value,settings){var datetime=this.dataset.datetime;var oiID=$("#oiID").val();var projectID=$("#projectID").val();SetPPDate(projectID,oiID,datetime,value);return(value)},{"indicator":"保存中...","tooltip":"单击编辑...","width":"60px","height":"100%","placeholder":"0","type":"birthday","onblur":"submit",})}function setPPInfo(res){$("#customerAbbr").html(res.Data.CustomerAbbr);$("#projectName").html(res.Data.ProjectName);$("#orderNo").html(res.Data.OrderNo);$("#internalNo").html(res.Data.InternalNo);$("#deliveryTime").html(res.Data.DeliveryTimeStr);$("#stationText").html(res.Data.StationText);$("#oiID").val(res.Data.ID);$("#projectID").val(res.Data.ProjectID);$("#ppInfo").attr("style","display:block;")}function removePPInfo(){$("#customerAbbr").html("");$("#projectName").html("");$("#orderNo").html("");$("#internalNo").html("");$("#deliveryTime").html("");$("#stationText").html("");$("#oiID").val("");$("#projectID").val("");$("#ppInfo").attr("style","display:none;")}function fnClickAddRow(){var oiID=$("#oiID").val();var projectID=$("#projectID").val();$.ajax({url:"/APP/PPlan/AddPPlanForTB",type:"post",data:{"projectID":projectID,"oiID":oiID},dataType:"json",success:function(res){if(res.Status==200){$.toastr.success("提交成功",{position:"top-center",time:550,});gotoDetailPartialNew(oiID)}else{$.toastr.error("提交失败!
"+res.Message,{time:3000,position:"top-center"})}}})}function SetPPCount(projectID,oiID,station,datetime,value){$.ajax({url:"/APP/PPlan/EditPPlanForTB",type:"post",data:{"projectID":projectID,"oiID":oiID,"stationName":station,"datetime":datetime,"count":value},dataType:"json",success:function(res){if(res.Status==200){$.toastr.success("提交成功",{position:"top-center",time:550,});gotoDetailPartialNew(oiID)}else{$.toastr.error("提交失败!
"+res.Message,{time:3000,position:"top-center"})}}})}function SetPPDate(projectID,oiID,datetime,value){$.ajax({url:"/APP/PPlan/EditPPlanDate",type:"post",data:{"projectID":projectID,"oiID":oiID,"datetime":datetime,"upDate":value},dataType:"json",success:function(res){if(res.Status==200){$.toastr.success("提交成功",{position:"top-center",time:550,}); gotoDetailPartialNew(oiID)}else{$.toastr.error("提交失败!
"+res.Message,{time:3000,position:"top-center"})}}})};