| | |
| | | Body: |
| | | [* |
| | | if( cbAllStockingPoint.Checked() ){ |
| | | if( cbAllProductInStockingPoint.Checked() ){ |
| | | if( cbAllProduct.Checked() ){ |
| | | // 锁定全部产品 |
| | | traverse( MacroPlan,Product_MP,product ){ |
| | | traverse( product,ProductInStockingPoint_MP,productInStockingPoint ){ |
| | |
| | | } |
| | | }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 ){ |
| | |
| | | } |
| | | }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(); |