123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259 |
- <?xml version="1.0" encoding="UTF-8"?>
- <Forms>
- <Form Name="FrmPurchSearch">
- <Client>
- <Events>
- <Load><![CDATA[
- @Title="最新采购查询";
- GetSchema();
- ChangeMode("Search");
-
- ]]></Load>
- </Events>
- <Mode>
- <Search>
- <Lable name="Search"/>
- </Search>
- </Mode>
- <Controls>
- <IKTextButton name="tbProduct1">
- <Events>
- <Click>
- @temp = ShowSearchBox("ProductSearch","INFOMATION",tbProduct1.CValue);
- if( @temp == "" )
- return;
- tbProduct1.CValue = @temp;
- </Click>
- <Enter>
- tbProduct2.CValue = tbProduct1.CValue;
- </Enter>
- <TextBoxButtonTextChanged>
- </TextBoxButtonTextChanged>
- </Events>
- </IKTextButton>
- <IKTextButton name="tbProduct2">
- <Events>
- <Click>
- @temp = ShowSearchBox("ProductSearch","INFOMATION",tbProduct2.CValue);
- if( @temp == "" )
- return;
- tbProduct2.CValue = @temp;
- </Click>
- </Events>
- </IKTextButton>
-
- <IKTextButton name="tbPName1">
- <Events>
- <Click>
- @temp = ShowSearchBox("ProductSearch","INFOMATION",tbPName1.CValue);
- if( @temp == "" )
- return;
- tbPName1.CValue = @temp;
- </Click>
- <TextBoxButtonTextChanged>
- </TextBoxButtonTextChanged>
- </Events>
- </IKTextButton>
- <IKTextButton name="tbPName2">
- <Events>
- <Click>
- @temp = ShowSearchBox("ProductSearch","INFOMATION",tbPName2.CValue);
- if( @temp == "" )
- return;
- tbPName2.CValue = @temp;
- </Click>
- </Events>
- </IKTextButton>
-
- <IKComboBoxEx name="cbType1" DataSource="Type" DisplayMember="Type_Product" >
- <Events>
- <Reload>
- UpdateForm(false, "cbType1");
- Search("SearchType");
- UpdateForm(true, "cbType1");
- </Reload>
- <TextChanged>
- cbType2.Text = cbType1.Text;
- </TextChanged>
- </Events>
- </IKComboBoxEx>
- <IKComboBoxEx name="cbType2" DataSource="Type" DisplayMember="Type_Product" >
- <Events>
- <Reload>
- UpdateForm(false, "cbType2");
- Search("SearchType");
- UpdateForm(true, "cbType2");
- </Reload>
- </Events>
- </IKComboBoxEx>
- <IKCheckBox name = "ckDTStart">
- <Events>
- <Click>
- dtStart.Enabled = ckDTStart.Checked;
- </Click>
- </Events>
- </IKCheckBox>
- <IKCheckBox name = "ckDTEnd">
- <Events>
- <Click>
- dtEnd.Enabled = ckDTEnd.Checked;
- </Click>
- </Events>
- </IKCheckBox>
- <IKButton name="btnSearch">
- <Events>
- <Click>
- <Lable name="Action"/>
- </Click>
- </Events>
- </IKButton>
- <IKButton name="btnEmpty">
- <Events>
- <Click>
- ChangeMode("Search");
- </Click>
- </Events>
- </IKButton>
- <IKExtendGrid name="dgProduct" DataSource="PurchaseSearch" TableStyleIndex="0">
- <DataColumn Index="0" DataSource="PurchaseSearch.No_Product"/>
- <DataColumn Index="1" DataSource="PurchaseSearch.Name_Product"/>
- <DataColumn Index="2" DataSource="PurchaseSearch.Type_Product"/>
- <DataColumn Index="3" DataSource="PurchaseSearch.Quantity_PurchaseOrderBillProduct"/>
- <DataColumn Index="4" DataSource="PurchaseSearch.comment_PurchaseOrderBillProduct"/>
- <DataColumn Index="5" DataSource="PurchaseSearch.No_PurchaseOrderBill"/>
- <DataColumn Index="6" DataSource="PurchaseSearch.RefNo_PurchaseOrderBill"/>
- <DataColumn Index="7" DataSource="PurchaseSearch.Date_PurchaseOrderBill"/>
- <Events>
- <ClickPreview>
- PrintReport(dgProduct.CurrentView);
- </ClickPreview>
- <ClickFilter>
- ;
- </ClickFilter>
- <ClickNOFilter>
- ;
- </ClickNOFilter>
- <ClickRefresh>
- <Lable name="Action"/>
-
- </ClickRefresh>
- </Events>
- </IKExtendGrid>
- </Controls>
- <ChildForms>
- <ChildForm name="ProductSearch" DataSource="Product" SearchFunction="SearchAllProduct" SearchFunctionByNo="" MappingName="产品">
- <DataColumn Index="0" MappingName="#Product.No_Product" HeaderText="产品编号" Width="120" ColumnType="IKDataGridTextBoxColumn" />
- <DataColumn Index="1" MappingName="#Product.Name_Product" HeaderText="产品名称" Width="120" ColumnType="IKDataGridTextBoxColumn" />
- <DataColumn Index="2" MappingName="#Product.suspension" HeaderText="暂停使用" Width="120" ColumnType="IKDataGridTextBoxColumn" />
- <DataColumn Index="3" MappingName="#Product.Price_Product" HeaderText="标准售价" Width="120" ColumnType="IKDataGridTextBoxColumn" />
- <DataColumn Index="4" MappingName="#Product.Unit_Product" HeaderText="基本单位" Width="120" ColumnType="IKDataGridTextBoxColumn" />
- <DataColumn Index="5" MappingName="#Product.Type_Product" HeaderText="产品大类" Width="120" ColumnType="IKDataGridTextBoxColumn" />
- <DataColumn Index="6" MappingName="#Product.Property_Product" HeaderText="产品性质" Width="120" ColumnType="IKDataGridTextBoxColumn" />
- </ChildForm>
- </ChildForms>
- </Client>
- <Server>
- <Tables>
- <Table name="PurchaseSearch" Type="Child">
- <GetSchema CmdType="Text" CmdText="
- Select Top 0 No_Product,Name_Product,Type_Product,Quantity_PurchaseOrderBillProduct,comment_PurchaseOrderBillProduct,A.No_PurchaseOrderBill,RefNo_PurchaseOrderBill,Date_PurchaseOrderBill From
- (
- Select ID_Product,Max(No_PurchaseOrderBill) As No_PurchaseOrderBill
- From PurchaseOrderBillProduct
- Join PurchaseOrderBill On PurchaseOrderBill.ID_PurchaseOrderBill=PurchaseOrderBillProduct.ID_PurchaseOrderBill
- Group By ID_Product
- )A
- Join PurchaseOrderBill ON PurchaseOrderBill.No_PurchaseOrderBill=A.No_PurchaseOrderBill
- Join PurchaseOrderBillProduct ON PurchaseOrderBillProduct.ID_Product=A.ID_Product And PurchaseOrderBillProduct.ID_PurchaseOrderBill=PurchaseOrderBill.ID_PurchaseOrderBill
- Left Join Product On Product.ID_Product=A.ID_Product
- "/>
- </Table>
- </Tables>
- <Search>
- <SearchAllProduct CmdType="Text" CmdText="SELECT Product.No_Product,Product.Name_Product,suspension = Case isnull(SuspendDate_Product,0) when 0 then '否' else '是' end,convert(decimal(14,2),Price_Product) as Price_Product,Unit_Product,Type_Product,Product.Property_Product FROM Product">
- <Tables>
- <Table name="AllProduct" />
- </Tables>
- </SearchAllProduct>
- <SearchType CmdType="Text" CmdText=" SELECT Name_TypeDef as Type_Product FROM TypeDef WHERE (Type_TypeDef = 8) ORDER BY Name_TypeDef">
- <Tables>
- <Table name="Type"/>
- </Tables>
- </SearchType>
- <SearchPurch CmdType="Text" CmdText="
- Select No_Product,Name_Product,Type_Product,Quantity_PurchaseOrderBillProduct,comment_PurchaseOrderBillProduct,A.No_PurchaseOrderBill,RefNo_PurchaseOrderBill,Date_PurchaseOrderBill From
- (
- Select ID_Product,Max(No_PurchaseOrderBill) As No_PurchaseOrderBill
- From PurchaseOrderBillProduct
- Join PurchaseOrderBill On PurchaseOrderBill.ID_PurchaseOrderBill=PurchaseOrderBillProduct.ID_PurchaseOrderBill
- Where PurchaseOrderBill.ID_Assessor Is Not Null
- And Date_PurchaseOrderBill Between isnull(DateAdd(day,DateDiff(day,0,@StartDate),0),Date_PurchaseOrderBill) AND Isnull(DateAdd(day,DateDiff(day,0,@EndDate),1),Date_PurchaseOrderBill)
- Group By ID_Product
- )A
- Join PurchaseOrderBill ON PurchaseOrderBill.No_PurchaseOrderBill=A.No_PurchaseOrderBill
- Join PurchaseOrderBillProduct ON PurchaseOrderBillProduct.ID_Product=A.ID_Product And PurchaseOrderBillProduct.ID_PurchaseOrderBill=PurchaseOrderBill.ID_PurchaseOrderBill
- Left Join Product On Product.ID_Product=A.ID_Product
- Where No_Product between IsNull(@StartNo_Product,No_Product) And IsNull(@EndNo_Product,No_Product)
- And Name_Product between IsNull(@StartName_Product,Name_Product) And IsNull(@EndName_Product,Name_Product)
- And Type_Product between IsNull(@StartType_Product,Type_Product) And IsNull(@EndType_Product,Type_Product)
- Order By No_Product
- ">
- <Params>
- <Param name="@StartNo_Product" type="Product.No_Product" Index="0" />
- <Param name="@EndNo_Product" type="Product.No_Product" Index="1" />
- <Param name="@StartType_Product" type="Product.Type_Product" Index="2" />
- <Param name="@EndType_Product" type="Product.Type_Product" Index="3" />
- <Param name="@StartName_Product" type="Product.Name_Product" Index="4" />
- <Param name="@EndName_Product" type="Product.Name_Product" Index="5" />
- <Param name="@StartDate" type="PurchaseOrderBill.Date_PurchaseOrderBill" Index="6" />
- <Param name="@EndDate" type="PurchaseOrderBill.Date_PurchaseOrderBill" Index="7" />
- </Params>
- <Tables>
- <Table name="PurchaseSearch" />
- </Tables>
- </SearchPurch>
-
- </Search>
- </Server>
- <Lables>
- <Search>
- Empty();
- tbProduct1.CValue="";
- tbProduct2.CValue="";
- cbType1.Text="";
- cbType2.Text="";
- tbPName1.CValue="";
- tbPName2.CValue="";
- ckDTStart.Checked=false;
- ckDTEnd.Checked=false;
- dtStart.Enabled=false;
- dtEnd.Enabled=false;
- </Search>
- <Action>
- Empty();
- @StartNo_Product=DBNull();
- @EndNo_Product=DBNull();
- @StartType_Product=DBNull();
- @EndType_Product=DBNull();
- if(tbProduct1.CValue!="")
- @StartNo_Product=tbProduct1.CValue;
- if(tbProduct2.CValue!="")
- @EndNo_Product=tbProduct2.CValue;
- if(cbType1.Text!="")
- @StartType_Product=cbType1.Text;
- if(cbType2.Text!="")
- @EndType_Product=cbType2.Text;
- @StartName_Product=tbPName1.CValue==""?DBNull():tbPName1.CValue;
- @EndName_Product=tbPName2.CValue==""?DBNull():tbPName2.CValue;
- @StartDate=ckDTStart.Checked?dtStart.Value:DBNull();
- @EndDate=ckDTEnd.Checked?dtEnd.Value:DBNull();
- Search("SearchPurch",@StartNo_Product,@EndNo_Product,@StartType_Product,@EndType_Product,@StartName_Product,@EndName_Product,@StartDate,@EndDate);
- </Action>
- </Lables>
- </Form>
- </Forms>
-
-
-
|