lihongji
2024-11-14 a746b44994e729613737baa922796383027fc54c
_Main/UI/MacroPlannerWebApp/Component_DialogCreateLockPeriod/Response_pnlActions_btnOk_OnClick.def
@@ -10,7 +10,7 @@
    Body:
    [*
      if( cbAllStockingPoint.Checked() ){
        if( cbAllProductInStockingPoint.Checked() ){
        if( cbAllProduct.Checked() ){
          // 锁定全部产品
          traverse( MacroPlan,Product_MP,product ){
            traverse( product,ProductInStockingPoint_MP,productInStockingPoint ){
@@ -19,13 +19,13 @@
          }
        }else{
          // 锁定指定产品下的全部库存点
          product := ddlProductInStockingPoint.Data().Product_MP();
          product := ddlProduct.Data();
          traverse( product,ProductInStockingPoint_MP,productInStockingPoint){
            LockPeriod::Create( productInStockingPoint,dsLockDate.Date() );
          }
        }
      }else{
        if( cbAllProductInStockingPoint.Checked() ){
        if( cbAllProduct.Checked() ){
          // 锁定指定库存点下的全部产品
          stockingPoint := ddlStockingPoint.Data();
          traverse( stockingPoint,ProductInStockingPoint_MP,productInStockingPoint ){
@@ -33,7 +33,10 @@
          }
        }else{
          // 锁定指定库存点的指定产品
          LockPeriod::Create( ddlProductInStockingPoint.Data(),dsLockDate.Date() );
          productInStockingPoint := select( ddlProduct.Data(),ProductInStockingPoint_MP,pisp,pisp.StockingPoint_MP() = ddlStockingPoint.Data() );
          if( not isnull( productInStockingPoint )){
            LockPeriod::Create( productInStockingPoint,dsLockDate.Date() );
          }
        } 
      }
      Form.Close();