| | |
| | | public class ProCompleteAnalysisDetail : AbstractDynamicFormPlugIn |
| | | { |
| | | bool did = false; |
| | | string FHMainICMOInterIDr = ""; |
| | | string FHMainICMOEntryID = ""; |
| | | string FHICMOInterID = ""; |
| | | string FHICMOInterID = "";//日计划工单内码 |
| | | string tempName = "JIT_MOMaterReadysBill";//表名称 |
| | | public override void OnLoad(EventArgs e) |
| | | { |
| | | LogHelper.Info("[齐套分析明细加载列表]"); |
| | | base.OnLoad(e); |
| | | if (this.View.OpenParameter.GetCustomParameter("FHMainICMOInterID") == null) |
| | | if (this.View.OpenParameter.GetCustomParameter("FHICMOInterID") == null) |
| | | { |
| | | SearchList(); |
| | | ChangeColor(); |
| | |
| | | { |
| | | if (did) |
| | | return; |
| | | FHMainICMOInterIDr = this.View.OpenParameter.GetCustomParameter("FHMainICMOInterID").ToString();//主生产订单主内码 |
| | | FHMainICMOEntryID = this.View.OpenParameter.GetCustomParameter("FHMainICMOEntryID").ToString();// 主生产订单子内码 |
| | | if (this.View.OpenParameter.GetCustomParameter("tempName") != null) |
| | | tempName = this.View.OpenParameter.GetCustomParameter("tempName")?.ToString();//表名 |
| | | FHICMOInterID = this.View.OpenParameter.GetCustomParameter("FHICMOInterID").ToString();//日计划订单主内码 |
| | | string sql = string.Format(@"/*dialect*/select * from view_JIT_MOMaterReadysBill where FHMainICMOInterIDr ='{0}' and FHMainICMOEntryID ='{1}' and FHICMOInterID='{2}' order by FPlanDate, FHStockQty desc ,FHMaterID ", FHMainICMOInterIDr, FHMainICMOEntryID, FHICMOInterID); |
| | | string sql = string.Format(@"/*dialect*/select * from view_{0} where FHICMOInterID='{1}' order by FPlanDate, FHStockQty desc ,FHMaterID ", tempName, FHICMOInterID); |
| | | DataTable dt = DBServiceHelper.ExecuteDataSet(this.Context, sql).Tables[0]; |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | |
| | | this.Model.SetValue("FErpClsID", dt.Rows[i]["FErpClsID"], i);//物料属性 |
| | | } |
| | | } |
| | | |
| | | ChangeColor(); |
| | | did = true; |
| | | } |
| | | } |
| | | |
| | | private void ChangeColor() { |
| | | private void ChangeColor() |
| | | { |
| | | Entity entity = this.View.BillBusinessInfo.GetEntity("FEntity"); |
| | | //单据体信息转换为列表集合 |
| | | DynamicObjectCollection entityDataObjoct = this.View.Model.GetEntityDataObject(entity); |
| | |
| | | { |
| | | if (Convert.ToString(current["FCompleteDetailStatus"]) == "未齐套") |
| | | { |
| | | // grid.SetRowBackcolor("#FF0000", _i); |
| | | grid.SetRowBackcolor("#71FF98CB", _i); |
| | | } |
| | | _i++; |
| | | } |
| | | } |
| | | |
| | | public override void BarItemClick(BarItemClickEventArgs e) |
| | | { |
| | | base.BarItemClick(e); |
| | |
| | | base.EntityRowClick(e); |
| | | DynamicFormShowParameter formPa = new DynamicFormShowParameter(); |
| | | formPa.FormId = "paez_CompleteAnalysisMateriel"; |
| | | /* jsonModel.Add("FHMainICMOInterID", FMainInterID);//主生产订单主内码 |
| | | jsonModel.Add("FHMainICMOEntryID", FMainEntryID);//主生产订单子内码 |
| | | jsonModel.Add("FHICMOInterID", FDayPlanWorkID);//日计划订单主内码 |
| | | current["FMatrailId_Id"].ToString(), current["FHMainSourceInterID"].ToString(), current["FHMainSourceEntryID"].ToString(), current["FDayPlanWorkID"].ToString()) |
| | | */ |
| | | formPa.CustomParams.Add("FHMainICMOInterIDr", Convert.ToString(this.View.Model.GetValue("FHMainICMOInterIDr", e.Row).ToString())); |
| | | formPa.CustomParams.Add("FMatrailId", Convert.ToString((this.View.Model.GetValue("FMateralDetailId", e.Row) as DynamicObject)["Id"].ToString())); |
| | | this.View.ShowForm(formPa); |
| | |
| | | /// </summary> |
| | | public void SearchList() |
| | | { |
| | | string sqlwhere = $" where FHMainICMOInterIDr ='{FHMainICMOInterIDr}' and FHMainICMOEntryID ='{FHMainICMOEntryID}' and FHICMOInterID='{FHICMOInterID}'"; |
| | | string sql = string.Format(@"/*dialect*/select * from view_JIT_MOMaterReadysBill "); |
| | | string sqlwhere = $" where FHICMOInterID='{FHICMOInterID}'"; |
| | | string sql = string.Format($"/*dialect*/select * from view_{tempName}"); |
| | | //物料 |
| | | if ((this.Model.GetValue("FMateralId") as DynamicObject) != null) |
| | | { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |