123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- <?xml version="1.0" encoding="utf-8" ?>
- <Forms>
- <Form Name="FrmPurchaseNoInDepot">
- <Client>
- <Events>
- <Load>
- <![CDATA[
- @Title="采购未入库查看";
- GetSchema();
- Search("SearchProcess");
- @Block=#SystemSetting.StockAndInDepot_SystemSetting;
- ChangeMode("Search");
- ]]>
- </Load>
- <Closing>
- ;<!--TODO-->
- </Closing>
- <Closed>
- ;<!--TODO-->
- </Closed>
- </Events>
- <Mode>
- <Search>
- <Lable name="Search" />
- </Search>
- </Mode>
- <Controls>
- <IkExtendGrid name="dgProduct" DataSource="PurchaseNoInDepot" TableStyleIndex="0">
- <DataColumn Index="0" DataSource="PurchaseNoInDepot.No_PurchaseOrderBill"/>
- <DataColumn Index="1" DataSource="PurchaseNoInDepot.Date_PurchaseOrderBill"/>
- <DataColumn Index="2" DataSource="PurchaseNoInDepot.ArrivalDate_PurchaseOrderBill"/>
- <DataColumn Index="3" DataSource="PurchaseNoInDepot.No_Product"/>
- <DataColumn Index="4" DataSource="PurchaseNoInDepot.Name_Product"/>
- <DataColumn Index="5" DataSource="PurchaseNoInDepot.Quantity_PurchaseOrderBillProduct"/>
- <DataColumn Index="6" DataSource="PurchaseNoInDepot.Quantity_InDepot"/>
- <DataColumn Index="7" DataSource="PurchaseNoInDepot.Quantity_EndCase"/>
- <DataColumn Index="8" DataSource="PurchaseNoInDepot.Quantity_OnShip"/>
- <DataColumn Index="9" DataSource="PurchaseNoInDepot.NoInDepot"/>
- <Events>
- <ClickPaste>
- ;
- </ClickPaste>
- <ClickExcel>
- ;
- </ClickExcel>
- <ClickPrint>
- ;
- </ClickPrint>
- <ClickPreview>
- PrintReport(dgProduct.CurrentView);
- </ClickPreview>
- <ClickRefresh>
- Empty();
- ChangeMode("Search");
- </ClickRefresh>
- <ClickFirstPage>
- ;
- </ClickFirstPage>
- <ClickPrevPage>
- </ClickPrevPage>
- ;
- <ClickNextPage>
- ;
- </ClickNextPage>
- <ClickLastPage>
- ;
- </ClickLastPage>
- <ClickFilter>
- txtBillSum.CValue=SumOfCol("#PurchaseNoInDepot.Quantity_PurchaseOrderBillProduct",dgProduct.FilterCondition,true);
- txtIndepotSum.CValue=SumOfCol("#PurchaseNoInDepot.Quantity_InDepot",dgProduct.FilterCondition,true);
- txtEndCaseSum.CValue=SumOfCol("#PurchaseNoInDepot.Quantity_EndCase",dgProduct.FilterCondition,true);
- txtOnshipSum.CValue=SumOfCol("#PurchaseNoInDepot.Quantity_OnShip",dgProduct.FilterCondition),true;
- txtNotShipSum.CValue=SumOfCol("#PurchaseNoInDepot.NoInDepot",dgProduct.FilterCondition,true);
- </ClickFilter>
- <ClickNOFilter>
- txtBillSum.CValue=SumOfCol("#PurchaseNoInDepot.Quantity_PurchaseOrderBillProduct",dgProduct.FilterCondition,true);
- txtIndepotSum.CValue=SumOfCol("#PurchaseNoInDepot.Quantity_InDepot",dgProduct.FilterCondition,true);
- txtEndCaseSum.CValue=SumOfCol("#PurchaseNoInDepot.Quantity_EndCase",dgProduct.FilterCondition,true);
- txtOnshipSum.CValue=SumOfCol("#PurchaseNoInDepot.Quantity_OnShip",dgProduct.FilterCondition,true);
- txtNotShipSum.CValue=SumOfCol("#PurchaseNoInDepot.NoInDepot",dgProduct.FilterCondition,true);
- </ClickNOFilter>
- <ClickAdd>
- ;
- </ClickAdd>
- <ClickRemove>
- ;
- </ClickRemove>
- </Events>
- </IkExtendGrid>
- </Controls>
- </Client>
- <Server>
- <Tables>
- <Table name="PurchaseNoInDepot" Type="Parent">
- <GetSchema CmdType="Text" CmdText="Select Top 0 PurchaseOrderBill.No_PurchaseOrderBill,PurchaseOrderBill.Date_PurchaseOrderBill,PurchaseOrderBill.ArrivalDate_PurchaseOrderBill,Product.No_Product,Product.Name_Product,PurchaseOrderBillProduct.Quantity_PurchaseOrderBillProduct,
- PurchaseSourceBillProduct.Quantity_InDepot,PurchaseSourceBillProduct.Quantity_EndCase,PurchaseSourceBillProduct.Quantity_OnShip,(Quantity_Order-Quantity_InDepot-Quantity_OnShip-Quantity_EndCase) As NoInDepot
- From PurchaseOrderBill
- Left Join PurchaseOrderBillProduct On PurchaseOrderBillProduct.ID_PurchaseOrderBill=PurchaseOrderBill.ID_PurchaseOrderBill
- Left Join PurchaseSourceBillProduct On PurchaseSourceBillProduct.ID_PurchaseSourceBillProduct=PurchaseOrderBillProduct.ID_PurchaseOrderBillProduct
- Left Join Product On Product.ID_Product=PurchaseOrderBillProduct.ID_Product"/>
-
- </Table>
- </Tables>
- <Search>
- <SearchNoInDepotProcess CmdType="Text" CmdText="
- Select ta.Quantity_PurchaseOrderBillProduct,ta.Quantity_InDepot,ta.Quantity_OnShip,ta.Quantity_EndCase,ta.NoInDepot,PurchaseOrderBill.No_PurchaseOrderBill,PurchaseOrderBill.Date_PurchaseOrderBill,PurchaseOrderBill.ArrivalDate_PurchaseOrderBill,Product.No_Product,Product.Name_Product
- From
- ( Select b.ID_PurchaseOrderBill,b.ID_Product, sum(a.Quantity_Order) As Quantity_PurchaseOrderBillProduct,sum(a.Quantity_InDepot) As Quantity_InDepot,sum(a.Quantity_OnShip) As Quantity_OnShip,sum(a.Quantity_EndCase) As Quantity_EndCase,(sum(a.Quantity_Order)-sum(a.Quantity_InDepot)-sum(a.Quantity_OnShip)-sum(a.Quantity_EndCase)) As NoInDepot
- From PurchaseSourceBillProduct a
- Join PurchaseOrderBillProduct b On a.ID_PurchaseSourceBillProduct=b.ID_PurchaseOrderBillProduct
- Group By b.ID_Product ,b.ID_PurchaseOrderBill
- Having (sum(a.Quantity_Order)-sum(a.Quantity_InDepot)-sum(a.Quantity_EndCase)) > 0
- )ta
- Join Product On Product.ID_Product=ta.ID_Product
- Join PurchaseOrderBill On PurchaseOrderBill.ID_PurchaseOrderBill=ta.ID_PurchaseOrderBill
- Where PurchaseOrderBill.ID_Assessor Is Not Null
- Order By PurchaseOrderBill.No_PurchaseOrderBill
- ">
-
- <Tables>
- <Table name="PurchaseNoInDepot"/>
- </Tables>
- </SearchNoInDepotProcess>
-
- <SearchNoInDepot CmdType="Text" CmdText="
- Select PurchaseOrderBill.No_PurchaseOrderBill,PurchaseOrderBill.Date_PurchaseOrderBill,PurchaseOrderBill.ArrivalDate_PurchaseOrderBill,Product.No_Product,Product.Name_Product ,
- a.Quantity_PurchaseOrderBillProduct,IsNull(a.Quantity_OnShip,0) As Quantity_OnShip,IsNull(b.Quantity_InDepot,0) As Quantity_InDepot,(a.Quantity_PurchaseOrderBillProduct-IsNull(a.Quantity_OnShip,0)-IsNull(b.Quantity_InDepot,0)) As NoInDepot,Quantity_EndCase=0.00
- From
- (
- Select PurchaseOrderBill.ID_PurchaseOrderBill,PurchaseOrderBillProduct.ID_Product,Sum(PurchaseOrderBillProduct.Quantity_PurchaseOrderBillProduct) As Quantity_PurchaseOrderBillProduct,Sum(OnShipProduct.Quantity_OnShip) As Quantity_OnShip
- From PurchaseOrderBillProduct
- Join PurchaseOrderBill On PurchaseOrderBillProduct.ID_PurchaseOrderBill=PurchaseOrderBill.ID_PurchaseOrderBill
- Left Join OnShipProduct On OnShipProduct.ID_PurchaseSourceBillProduct=PurchaseOrderBillProduct.ID_PurchaseOrderBillProduct
- Where PurchaseOrderBill.ID_Assessor Is Not Null
- Group By PurchaseOrderBillProduct.ID_Product,PurchaseOrderBill.ID_PurchaseOrderBill
- )a
- Left Join
- (
- Select PurchaseOrderBill.ID_PurchaseOrderBill,PurchaseInDepotBillProduct.ID_Product,Sum(PurchaseInDepotBillProduct.Quantity_PurchaseInDepotBillProduct) As Quantity_InDepot
- From PurchaseInDepotBillProduct
- Join PurchaseInDepotBill On PurchaseInDepotBill.ID_PurchaseInDepotBill=PurchaseInDepotBillProduct.ID_PurchaseInDepotBill
- Join PurchaseOrderBill On PurchaseOrderBill.No_PurchaseOrderBill=PurchaseInDepotBillProduct.No_FromBill
- Where PurchaseInDepotBill.ID_Assessor Is Not Null
- Group By PurchaseInDepotBillProduct.ID_Product,PurchaseOrderBill.ID_PurchaseOrderBill
- )b On a.ID_PurchaseOrderBill=b.ID_PurchaseOrderBill And a.ID_Product=b.ID_Product
- Join Product On Product.ID_Product=a.ID_Product
- Join PurchaseOrderBill On PurchaseOrderBill.ID_PurchaseOrderBill=a.ID_PurchaseOrderBill
- Where (a.Quantity_PurchaseOrderBillProduct-IsNull(b.Quantity_InDepot,0)) > 0
- Order By PurchaseOrderBill.No_PurchaseOrderBill
-
- ">
- <Tables>
- <Table name="PurchaseNoInDepot"/>
- </Tables>
- </SearchNoInDepot>
- <SearchProcess CmdType="Text" CmdText="Select StockAndInDepot_SystemSetting From SystemSetting">
- <Tables>
- <Table name="SystemSetting"/>
- </Tables>
- </SearchProcess>
- </Search>
- </Server>
- <Lables>
- <Search>
- if(@Block==true)
- Search("SearchNoInDepotProcess");
- else
- Search("SearchNoInDepot");
- txtBillSum.CValue=SumOfCol("#PurchaseNoInDepot.Quantity_PurchaseOrderBillProduct");
- txtIndepotSum.CValue=SumOfCol("#PurchaseNoInDepot.Quantity_InDepot");
- txtEndCaseSum.CValue=SumOfCol("#PurchaseNoInDepot.Quantity_EndCase");
- txtOnshipSum.CValue=SumOfCol("#PurchaseNoInDepot.Quantity_OnShip");
- txtNotShipSum.CValue=SumOfCol("#PurchaseNoInDepot.NoInDepot");
- </Search>
- </Lables>
- </Form>
- </Forms>
-
|