123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377 |
- <?xml version="1.0" encoding="UTF-8"?>
- <Forms>
- <Form Name="FrmCustomerRegInfoSearch">
- <Client>
- <Events>
- <Load>
- <![CDATA[
- @Title="客户需求商品查询";
- GetSchema();
- ChangeMode("Search");
- Empty();
- NewInstance();
- ]]></Load>
- <Closing>
- ;
- </Closing>
- <Closed>
- ;
- </Closed>
- </Events>
- <Mode>
- <Search>
- <Lable name="Search"/>
- </Search>
- </Mode>
- <Controls>
- <IKTextButton name="txtBillNo1">
- <Events>
- <Click>
- @temp = ShowSearchBox("BillSearch","NODEPOT", "txtBillNo1",txtBillNo1.CValue);
- if(@temp == "" )
- return;
- txtBillNo1.CValue = @temp;
- </Click>
- <TextBoxButtonTextChanged>
- txtBillNo2.CValue = txtBillNo1.CValue;
- </TextBoxButtonTextChanged>
- </Events>
- </IKTextButton>
-
- <IKTextButton name="txtBillNo2">
- <Events>
- <Click>
- @temp = ShowSearchBox("BillSearch","NODEPOT", "txtBillNo2",txtBillNo2.CValue);
- if(@temp == "" )
- return;
- txtBillNo2.CValue = @temp;
- </Click>
- </Events>
- </IKTextButton>
-
- <IKTextButton name="tbProduct1">
- <Events>
- <Click>
- @temp = ShowSearchBox("ProductSearch","INFOMATION",tbProduct1.CValue);
- if( @temp == "" )
- return;
- tbProduct1.CValue = @temp;
- </Click>
- <TextBoxButtonTextChanged>
- tbProduct2.CValue = tbProduct1.CValue;
- </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="tbCustomerNo1">
- <Events>
- <Click>
- @temp = ShowSearchBox("CustomerSearch","INFOMATION",tbCustomerNo1.CValue);
- if( @temp == "" )
- return;
- tbCustomerNo1.CValue = @temp;
- </Click>
- <TextBoxButtonTextChanged>
- tbCustomerNo2.CValue = tbCustomerNo1.CValue;
- </TextBoxButtonTextChanged>
- </Events>
- </IKTextButton>
- <IKTextButton name="tbCustomerNo2">
- <Events>
- <Click>
- @temp = ShowSearchBox("CustomerSearch","INFOMATION",tbCustomerNo2.CValue);
- if( @temp == "" )
- return;
- tbCustomerNo2.CValue = @temp;
- </Click>
- </Events>
- </IKTextButton>
-
- <IKDateTimePicker name = "dtStart">
- <Events>
- <CheckedChanged>
- dtEnd.Checked = dtStart.Checked;
- </CheckedChanged>
- <ValueChanged>
- dtEnd.CValue = dtStart.CValue;
- </ValueChanged>
- </Events>
- </IKDateTimePicker>
- <IKComboBoxEx name="cbMaterial" DisplaySource="UI.Material_CustomerReqProduct" NoSource="UI.Material_CustomerReqProduct" DataSource="Material" DisplayMember="Material_CustomerReqProduct" NoMember="Material_CustomerReqProduct">
- <Events>
- <Reload>
- UpdateForm(false, "cbMaterial");
- Search("SearchMaterial");
- UpdateForm(true, "cbMaterial");
- </Reload>
- </Events>
- </IKComboBoxEx>
- <IKComboBoxEx name="cbManuMethod" DisplaySource="UI.ManuMethod_CustomerReqProduct" NoSource="UI.ManuMethod_CustomerReqProduct" DataSource="ManuMethod" DisplayMember="ManuMethod_CustomerReqProduct" NoMember="ManuMethod_CustomerReqProduct">
- <Events>
- <Reload>
- UpdateForm(false, "cbManuMethod");
- Search("SearchManuMethod");
- UpdateForm(true, "cbManuMethod");
- </Reload>
- </Events>
- </IKComboBoxEx>
- <IKComboBoxEx name="cbProcess" DisplaySource="UI.Process_CustomerReqProduct" NoSource="UI.Process_CustomerReqProduct" DataSource="Process" DisplayMember="Process_CustomerReqProduct" NoMember="Process_CustomerReqProduct">
- <Events>
- <Reload>
- UpdateForm(false, "cbProcess");
- Search("SearchProcess");
- UpdateForm(true, "cbProcess");
- </Reload>
- </Events>
- </IKComboBoxEx>
-
- <IKExtendGrid name="dgProduct" DataSource="Total" TableStyleIndex="0">
- <DataColumn Index="0" DataSource="Total.No_CustomerReqProduct"/>
- <DataColumn Index="1" DataSource="Total.Name_CustomerReqProduct"/>
- <DataColumn Index="2" DataSource="Total.Quantity_CustomerReqProduct"/>
- <DataColumn Index="3" DataSource="Total.Price_CustomerReqProduct"/>
- <DataColumn Index="4" DataSource="Total.Unit_CustomerReqProduct"/>
- <DataColumn Index="5" DataSource="Total.Material_CustomerReqProduct"/>
- <DataColumn Index="6" DataSource="Total.ManuMethod_CustomerReqProduct"/>
- <DataColumn Index="7" DataSource="Total.Process_CustomerReqProduct"/>
- <DataColumn Index="8" DataSource="Total.ShortName_Customer"/>
- <DataColumn Index="9" DataSource="Total.No_CustomerReqInfo"/>
- <DataColumn Index="10" DataSource="Total.CreateDate_CustomerReqInfo"/>
- <DataColumn Index="11" DataSource="Total.Comment_CustomerReqInfo"/>
- <Events>
- <ClickPreview>
- PrintReport(dgProduct.CurrentView);
- </ClickPreview>
- <ClickFilter>
- ;
- </ClickFilter>
- <ClickNOFilter>
- ;
- </ClickNOFilter>
- <ClickRefresh>
- Empty();
- <Lable name="btnActionClick"/>
- </ClickRefresh>
- </Events>
- </IKExtendGrid>
- <IKButton name="btnSearch">
- <Events>
- <Click>
- <Lable name="btnActionClick"/>
- if(RowCount("#Total") == 0)
- MessageBox("不存在符合查询条件的记录!");
- </Click>
- </Events>
- </IKButton>
- <IKButton name="btnClear">
- <Events>
- <Click>
- Empty();
- NewInstance();
- txtBillNo1.CValue="";
- txtBillNo2.CValue="";
- tbCustomerNo1.CValue="";
- tbCustomerNo2.CValue="";
- tbProduct1.CValue="";
- tbProduct2.CValue="";
- dtStart.Checked=False;
- dtEnd.Checked=False;
- cbMaterial.Text = "";
- cbManuMethod.Text = "";
- cbProcess.Text = "";
- </Click>
- </Events>
- </IKButton>
- </Controls>
- <ChildForms>
- <ChildForm name="BillSearch" DataSource="CustomerReqInfo" SearchFunction="SearchAllBill" SearchFunctionCondition="SearchCustomerCondition" SearchFunctionByNo="">
- <DataColumn Index="0" MappingName="#CustomerReqInfo.No_CustomerReqInfo" HeaderText="建档编号" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="1" MappingName="#CustomerReqInfo.CreateDate_CustomerReqInfo" HeaderText="建档日期" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="2" MappingName="#CustomerReqInfo.No_Customer" HeaderText="客户编号" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="3" MappingName="#CustomerReqInfo.Type_Customer" HeaderText="客户类型" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="4" MappingName="#CustomerReqInfo.ShortName_Customer" HeaderText="客户名称" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="5" MappingName="#CustomerReqInfo.Comment_CustomerReqInfo" HeaderText="备注" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
- </ChildForm>
- <ChildForm name="ProductSearch" DataSource="Product" SearchFunction="SearchAllProduct" SearchFunctionByNo=""
- MappingName="产品">
- <DataColumn Index="0" MappingName="#Product.No_Product" HeaderText="产品编号" Width="90" ColumnType="IKDataGridTextBoxColumn" />
- <DataColumn Index="1" MappingName="#Product.Name_Product" HeaderText="产品简称" Width="90" ColumnType="IKDataGridTextBoxColumn" />
- <DataColumn Index="2" MappingName="#Product.Type_Product" HeaderText="产品类型" Width="120" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="3" MappingName="#Product.Price_Product" HeaderText="标准售价" Width="120" ColumnType="IKDataGridTextBoxColumn" Format="F2"/>
- <DataColumn Index="4" MappingName="#Product.LowSalePrice_Product" HeaderText="最低售价" Width="120" ColumnType="IKDataGridTextBoxColumn" Format="F2"/>
- <DataColumn Index="5" MappingName="#Product.SafetyQty_Product" HeaderText="安全存量" Width="120" ColumnType="IKDataGridTextBoxColumn"/>
- </ChildForm>
- <ChildForm name="CustomerSearch" DataSource="Customer" SearchFunction="SearchAllCustomer" SearchFunctionCondition="SearchCustomerCondition" SearchFunctionByNo="" MappingName="客户">
- <DataColumn Index="0" MappingName="#Customer.No_Customer" HeaderText="客户编号" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="1" MappingName="#Customer.ShortName_Customer" HeaderText="客户简称" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="2" MappingName="#Customer.Type_Customer" HeaderText="客户类型" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="3" MappingName="#Customer.Level_Customer" HeaderText="客户等级" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="4" MappingName="#Customer.IsGeneric_Customer" HeaderText="一般客户" Width="75" ColumnType="IKDataGridBoolColumn"/>
- </ChildForm>
- </ChildForms>
- </Client>
- <Server>
- <Tables>
- <Table name="UI" Type="Parent">
- <GetSchema CmdType="Text" CmdText="
- SELECT TOP 0 convert(nvarchar(64),'') As Material_CustomerReqProduct,convert(nvarchar(64),'') As ManuMethod_CustomerReqProduct,convert(nvarchar(64),'') As Process_CustomerReqProduct
- "/>
- </Table>
- <Table name="Total" Type="Child">
- <GetSchema CmdType="Text" CmdText="
- Select top 0 No_CustomerReqInfo,CreateDate_CustomerReqInfo,Comment_CustomerReqInfo,No_CustomerReqProduct,Name_CustomerReqProduct,Quantity_CustomerReqProduct,Price_CustomerReqProduct,Unit_CustomerReqProduct,ShortName_Customer,
- Material_CustomerReqProduct,ManuMethod_CustomerReqProduct,Process_CustomerReqProduct
- From CustomerReqInfo
- Join CustomerReqProduct On CustomerReqInfo.ID_CustomerReqInfo=CustomerReqProduct.ID_CustomerReqInfo
- Join Customer On Customer.ID_Customer=CustomerReqInfo.ID_Customer
- "/>
-
- </Table>
- </Tables>
- <Search>
- <SearchAllProduct CmdType="Text" CmdText="SELECT Product.No_Product,Product.Name_Product ,Type_Product, Price_Product, LowSalePrice_Product, SafetyQty_Product FROM Product ">
- <Tables>
- <Table name="AllProduct" />
- </Tables>
- </SearchAllProduct>
-
- <SearchAllCustomer CmdType="Text" CmdText="SELECT Customer.No_Customer,Customer.ShortName_Customer,Customer.Type_Customer,Customer.Level_Customer,Customer.IsGeneric_Customer,Customer.ID_Creator FROM Customer ">
- <Tables>
- <Table name="AllCustomer" />
- </Tables>
- </SearchAllCustomer>
-
- <SearchAllBill CmdType="Text" CmdText=" SELECT CustomerReqInfo.*,Customer.No_Customer,Customer.Name_Customer, Customer.ShortName_Customer,Customer.Type_Customer,Customer.ID_Creator FROM CustomerReqInfo
- LEFT JOIN Customer ON Customer.ID_Customer = CustomerReqInfo.ID_Customer">
- <Tables>
- <Table name="AllBill" />
- </Tables>
- </SearchAllBill>
-
- <SearchTotal CmdType="Text" CmdText=" Declare @sql Nvarchar(4000)
- Set @sql = ''
- Set @sql = @sql + 'Select No_CustomerReqInfo,CreateDate_CustomerReqInfo,Comment_CustomerReqInfo,No_CustomerReqProduct,Name_CustomerReqProduct,Quantity_CustomerReqProduct,Price_CustomerReqProduct,Unit_CustomerReqProduct,ShortName_Customer,'
- +' Material_CustomerReqProduct,ManuMethod_CustomerReqProduct,Process_CustomerReqProduct'
- +' From CustomerReqInfo'
- +' Join CustomerReqProduct On CustomerReqInfo.ID_CustomerReqInfo=CustomerReqProduct.ID_CustomerReqInfo'
- +' Join Customer On Customer.ID_Customer=CustomerReqInfo.ID_Customer'
- +' Where No_CustomerReqInfo Is Not Null'
- if(@StartNo_CustomerReqInfo Is Not Null)
- set @sql=@sql+' And No_CustomerReqInfo >= '+nchar(39)+@StartNo_CustomerReqInfo+nchar(39)
- if(@EndNo_CustomerReqInfo Is Not Null)
- set @sql=@sql+' And No_CustomerReqInfo <= '+nchar(39)+@EndNo_CustomerReqInfo+nchar(39)
- if(@StartDate Is Not Null)
- set @sql=@sql+' And DateDiff(day,'+nchar(39)+convert(nvarchar(64),@StartDate)+nchar(39)+N',CreateDate_CustomerReqInfo) >=0 '
- if(@EndDate Is Not Null)
- set @sql=@sql+' And DateDiff(day,'+nchar(39)+convert(nvarchar(64),@EndDate)+nchar(39)+N',CreateDate_CustomerReqInfo) <=0 '
- if(@StartNo_Customer Is Not Null)
- set @sql=@sql+' And No_Customer >= '+nchar(39)+@StartNo_Customer+nchar(39)
- if(@EndNo_Customer Is Not Null)
- set @sql=@sql+' And No_Customer <= '+nchar(39)+@EndNo_Customer+nchar(39)
- if(@StartNo_Product Is Not Null)
- set @sql=@sql+' And No_CustomerReqProduct >= '+nchar(39)+@StartNo_Product+nchar(39)
- if(@EndNo_Product Is Not Null)
- set @sql=@sql+' And No_CustomerReqProduct <= '+nchar(39)+@EndNo_Product+nchar(39)
- if (@Material_CustomerReqProduct Is Not Null)
- Set @sql = @sql +' And Material_CustomerReqProduct = '+nchar(39)+@Material_CustomerReqProduct+nchar(39)
- if (@ManuMethod_CustomerReqProduct Is Not Null)
- Set @sql = @sql +' And ManuMethod_CustomerReqProduct = '+nchar(39)+@ManuMethod_CustomerReqProduct+nchar(39)
- if (@Process_CustomerReqProduct Is Not Null)
- Set @sql = @sql +' And Process_CustomerReqProduct = '+nchar(39)+@Process_CustomerReqProduct+nchar(39)
- EXEC (@sql)
- ">
- <Params>
- <Param name="@StartNo_CustomerReqInfo" type="Product.No_Product" Index="0" />
- <Param name="@EndNo_CustomerReqInfo" type="Product.No_Product" Index="1" />
- <Param name="@StartDate" type="StocktakingBill.Date_StocktakingBill" Index="2" />
- <Param name="@EndDate" type="StocktakingBill.Date_StocktakingBill" Index="3" />
- <Param name="@StartNo_Customer" type="Product.No_Product" Index="4" />
- <Param name="@EndNo_Customer" type="Product.No_Product" Index="5" />
- <Param name="@StartNo_Product" type="Product.No_Product" Index="6" />
- <Param name="@EndNo_Product" type="Product.No_Product" Index="7" />
- <Param name="@Material_CustomerReqProduct" type="CustomerReqProduct.Material_CustomerReqProduct" Index="8" />
- <Param name="@ManuMethod_CustomerReqProduct" type="CustomerReqProduct.ManuMethod_CustomerReqProduct" Index="9" />
- <Param name="@Process_CustomerReqProduct" type="CustomerReqProduct.Process_CustomerReqProduct" Index="10" />
- </Params>
- <Tables>
- <Table name="Total" />
- </Tables>
- </SearchTotal>
- <SearchManuMethod CmdType="Text" CmdText=" SELECT TypeDef.Name_TypeDef AS ManuMethod_CustomerReqProduct FROM TypeDef WHERE Type_TypeDef = '28' ">
- <Tables>
- <Table name="ManuMethod" />
- </Tables>
- </SearchManuMethod>
- <SearchMaterial CmdType="Text" CmdText=" SELECT TypeDef.Name_TypeDef AS Material_CustomerReqProduct FROM TypeDef WHERE Type_TypeDef = '29' ">
- <Tables>
- <Table name="Material" />
- </Tables>
- </SearchMaterial>
- <SearchProcess CmdType="Text" CmdText=" SELECT TypeDef.Name_TypeDef AS Process_CustomerReqProduct FROM TypeDef WHERE Type_TypeDef = '30' ">
- <Tables>
- <Table name="Process" />
- </Tables>
- </SearchProcess>
- </Search>
- </Server>
- <Lables>
- <Search>
- Empty();
- </Search>
- <btnActionClick>
- @StartNo_CustomerReqInfo =DBNull();
- @EndNo_CustomerReqInfo =DBNull();
- @StartDate =DBNull();
- @EndDate =DBNull();
- @StartNo_Customer =DBNull();
- @EndNo_Customer =DBNull();
- @StartNo_Product =DBNull();
- @EndNo_Product =DBNull();
- @Material_CustomerReqProduct = DBNull();
- @ManuMethod_CustomerReqProduct =DBNull();
- @Process_CustomerReqProduct =DBNull();
- if(txtBillNo1.CValue!="")
- @StartNo_CustomerReqInfo=txtBillNo1.CValue;
- if(txtBillNo2.CValue!="")
- @EndNo_CustomerReqInfo=txtBillNo2.CValue;
- if(tbProduct1.CValue!="")
- @StartNo_Product=tbProduct1.CValue;
- if(tbProduct2.CValue!="")
- @EndNo_Product=tbProduct2.CValue;
- if(tbCustomerNo1.CValue!="")
- @StartNo_Customer=tbCustomerNo1.CValue;
- if(tbCustomerNo2.CValue!="")
- @StartNo_Customer=tbCustomerNo2.CValue;
- if(cbMaterial.Text !="")
- @Material_CustomerReqProduct = cbMaterial.Text;
- if(cbManuMethod.Text!="")
- @ManuMethod_CustomerReqProduct=cbManuMethod.Text;
- if(cbProcess.Text !="")
- @Process_CustomerReqProduct = cbProcess.Text;
- if(dtStart.Checked)
- @StartDate=dtStart.Value;
- if(dtEnd.Checked)
- @EndDate=dtEnd.Value;
- Search("SearchTotal",@StartNo_CustomerReqInfo,@EndNo_CustomerReqInfo,@StartDate,@EndDate,@StartNo_Customer,@EndNo_Customer,@StartNo_Product,@EndNo_Product,@Material_CustomerReqProduct,@ManuMethod_CustomerReqProduct,@Process_CustomerReqProduct);
- </btnActionClick>
- </Lables>
- </Form>
- </Forms>
-
-
-
|