yunchai
2023-09-26 164f52d48957b4d6291f003b18882a682b8f1f1d
20230926测试后修正
已修改2个文件
22 ■■■■■ 文件已修改
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetMaterialData.qbl 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Response_OnCreated.def 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetMaterialData.qbl
@@ -24,10 +24,10 @@
    strMsg :="";
    
    try{
      if( Owner.MappingBOM(relsize )>0)
      if( GlobData.Global_MappingOperationBOM(relsize )>0)
      {
        // 得到下一级数据
        AllData:= selectset( GlobData, Global_MappingOperationBOM,object,object.ComponentCode()=ParentSKU);
        AllData:= selectset( GlobData, Global_MappingOperationBOM,object,object.ProductCode()=ParentSKU);
        ObjProduct := null( Product_MP,constcontent );
        ObjUnit := null( Unit,constcontent );
        MaterialType:="";
@@ -51,24 +51,24 @@
          traverse( AllData,Elements,Obj,not isnull( Obj))
          {
            // 得到当前已存在的物料信息(订单ID + SKU)
            ObjMaterial := select( Owner,H_MaterialInfo,ObjM,ObjM.ForecastID()=ForecastId and ObjM.SKU()=Obj.ProductCode());
            ObjMaterial := select( Owner,H_MaterialInfo,ObjM,ObjM.ForecastID()=ForecastId and ObjM.SKU()=Obj.ComponentCode());
            if( isnull( ObjMaterial))
            {
              // 物料类型
              MaterialType := Obj.ProductType();
              // 得到物料信息
              ObjProduct:= H_FunctionClass::SM_GetProductInfo(Owner,Obj.ProductCode());
              ObjProduct:= H_FunctionClass::SM_GetProductInfo(Owner,Obj.ComponentCode());
              if( not isnull( ObjProduct))
              {
                MaterialType:= ObjProduct.ParentID();
                MaterialName:=ObjProduct.Name();
              }
              ObjUnit:= H_FunctionClass::SM_GetUnitBySKU( Owner,Obj.ProductCode());
              ObjUnit:= H_FunctionClass::SM_GetUnitBySKU( Owner,Obj.ComponentCode());
              if( not isnull( ObjUnit))
              {
                StockPoint:= ObjUnit.Name();
              }
              Owner.H_MaterialInfo(relnew,ParentSKU := Obj.ComponentCode(),SKU := Obj.ProductCode(),ForecastID := ForecastId,OrgCode := Obj.OrganCode(),VCode := VCode
              Owner.H_MaterialInfo(relnew,ParentSKU := ParentSKU,SKU := Obj.ComponentCode(),ForecastID := ForecastId,OrgCode := Obj.OrganCode(),VCode := VCode
                                    ,ID := H_FunctionClass::SM_GenerateID( "MI"),MaterialType := MaterialType,NeedDate := NDate
                                    ,NeedQty := [Number](ProductQty/NRate*NComponentsUsed).Round( 0),Unit := Obj.UnitOfMeasureName()
                                    ,StockPoint :=StockPoint,MaterialName := MaterialName );
_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Response_OnCreated.def
@@ -23,18 +23,10 @@
          lb_SKUCode_FAAC.Text(SelForecast.Get( "SKU").GetString());
          lb_SKUName_FAAC.Text("产品");
          lb_Util_FAAC.Text(SelForecast.Get( "Util").GetString());
          lb_SKUName_FAAC.Text(SelForecast.Get( "SKUName").GetString());
          txt_CustomID_FAAC.Text(SelForecast.Get( "CustomCode").GetString());
          txt_CustomName_FAAC.Text(SelForecast.Get( "CustomName").GetString());
          lb_Operator_FAAC.Text(ApplicationMacroPlanner.GetUserName());
      //    StrValue := SelectItem.Value().Tokenize( ";");
      //    lb_SKUCode_FAAC.Text(StrValue.Element( 0));
      //    lb_SKUName_FAAC.Text("产品");
      //    lb_Operator_FAAC.Text("");
      //    lb_Util_FAAC.Text(StrValue.Element( 1));
      //    txt_CustomID_FAAC.Text(StrValue.Element( 2));
      //    txt_CustomName_FAAC.Text(StrValue.Element( 3));
      //    lb_Operator_FAAC.Text(ApplicationMacroPlanner.GetUserName());
        }
      }
    *]