123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345 |
- <?xml version="1.0" encoding="utf-8" ?>
- <Forms>
- <Form Name="FrmSaleConsignment">
- <Client>
- <Events>
- <Load>
- <![CDATA[
- @Title="销货发货跟踪";
- GetSchema();
- Empty();
- ]]>
- </Load>
- <Closing>
- ;<!--TODO-->
- </Closing>
- <Closed>
- ;<!--TODO-->
- </Closed>
- </Events>
- <Mode>
- <Search>
- <Lable name="Search" />
- </Search>
- </Mode>
- <Controls>
- <IKTextButton name="txtCustomerNo1">
- <Events>
- <Click>
- @temp = ShowSearchBox("CustomerSearch","INFOMATION",txtCustomerNo1.CValue);
- if( @temp == "" )
- return;
- txtCustomerNo1.CValue = @temp;
- </Click>
- </Events>
- </IKTextButton>
- <IKTextButton name="txtCustomerNo2">
- <Events>
- <Click>
- @temp = ShowSearchBox("CustomerSearch","INFOMATION",txtCustomerNo2.CValue);
- if( @temp == "" )
- return;
- txtCustomerNo2.CValue = @temp;
- </Click>
- </Events>
- </IKTextButton>
- <IKTextButton name="txtSaleBillNo1">
- <Events>
- <Click>
- ShowSearchBox("SaleBillSearch","HAVEDEPOT", "txtSaleBillNo1",txtSaleBillNo1.CValue);
- </Click>
- </Events>
- </IKTextButton>
- <IKTextButton name="txtSaleBillNo2">
- <Events>
- <Click>
- ShowSearchBox("SaleBillSearch","HAVEDEPOT", "txtSaleBillNo2",txtSaleBillNo2.CValue);
- </Click>
- </Events>
- </IKTextButton>
- <IKTextButton name="txtBillNo1">
- <Events>
- <Click>
- ShowSearchBox("SaleOutDepotBillSearch","HAVEDEPOT", "txtBillNo1",txtBillNo1.CValue);
- </Click>
- </Events>
- </IKTextButton>
- <IKTextButton name="txtBillNo2">
- <Events>
- <Click>
- ShowSearchBox("SaleOutDepotBillSearch","HAVEDEPOT", "txtBillNo2",txtBillNo2.CValue);
- </Click>
- </Events>
- </IKTextButton>
- <IKExtendGrid name="ikExtendGrid1" DataSource="Total" TableStyleIndex="0">
- <DataColumn Index="0" DataSource="Total.No_Customer"/>
- <DataColumn Index="1" DataSource="Total.ShortName_Customer"/>
- <DataColumn Index="2" DataSource="Total.StrTransBack_SaleBill"/>
- <DataColumn Index="3" DataSource="Total.GetMethod_SaleBill"/>
- <DataColumn Index="4" DataSource="Total.No_SaleBill"/>
- <DataColumn Index="5" DataSource="Total.AssessDate_SaleBill"/>
- <DataColumn Index="6" DataSource="Total.OutStatus_SaleBill"/>
- <DataColumn Index="7" DataSource="Total.No_SaleOutDepotBill"/>
- <DataColumn Index="8" DataSource="Total.AssessDate_SaleOutDepotBill"/>
- <DataColumn Index="9" DataSource="Total.No_ExpressDelivery"/>
- <DataColumn Index="10" DataSource="Total.Comment_ExpressDelivery"/>
- <DataColumn Index="11" DataSource="Total.Check_ExpressDelivery"/>
- <Events>
- <ClickPreview>
- PrintReport(ikExtendGrid1.CurrentView);
- </ClickPreview>
- <ClickFilter>
- ;
- </ClickFilter>
- <ClickNOFilter>
- ;
- </ClickNOFilter>
- <ClickRefresh>
- Empty();
- @StartNo_Customer=DBNull();
- @EndNo_Customer =DBNull();
- @StartNo_SaleBill=DBNull();
- @EndNo_SaleBill =DBNull();
- @StartAssessDate_SaleBill =DBNull();
- @EndAssessDate_SaleBill =DBNull();
- @StartNo_SaleOutDepotBill=DBNull();
- @EndNo_SaleOutDepotBill =DBNull();
- @StartAssessDate_SaleOutDepotBill =DBNull();
- @EndAssessDate_SaleOutDepotBill =DBNull();
- if(!Equals(txtCustomerNo1.CValue,""))
- @StartNo_Customer= txtCustomerNo1.CValue;
- if(!Equals(txtCustomerNo2.CValue,""))
- @EndNo_Customer= txtCustomerNo2.CValue;
- if(!Equals(txtSaleBillNo1.CValue,""))
- @StartNo_SaleBill= txtSaleBillNo1.CValue;
- if(!Equals(txtSaleBillNo2.CValue,""))
- @EndNo_SaleBill= txtSaleBillNo2.CValue;
- if(dtAssessDate1.Checked)
- @StartAssessDate_SaleBill= dtAssessDate1.Value;
- if(dtAssessDate2.Checked)
- @EndAssessDate_SaleBill= dtAssessDate2.Value;
-
- if(!Equals(txtBillNo1.CValue,""))
- @StartNo_SaleOutDepotBill= txtBillNo1.CValue;
- if(!Equals(txtBillNo2.CValue,""))
- @EndNo_SaleOutDepotBill= txtBillNo2.CValue;
- if(dt1.Checked)
- @StartAssessDate_SaleOutDepotBill= dt1.Value;
- if(dt2.Checked)
- @EndAssessDate_SaleOutDepotBill= dt2.Value;
- Search("SearchSaleConsignment",@StartNo_Customer,@EndNo_Customer,@StartNo_SaleBill,@EndNo_SaleBill,
- @StartAssessDate_SaleBill,@EndAssessDate_SaleBill,@StartNo_SaleOutDepotBill,@EndNo_SaleOutDepotBill,
- @StartAssessDate_SaleOutDepotBill,@EndAssessDate_SaleOutDepotBill);
- </ClickRefresh>
- </Events>
- </IKExtendGrid>
- <IKButton name="btnSearch">
- <Events>
- <Click>
- Empty();
- @StartNo_Customer=DBNull();
- @EndNo_Customer =DBNull();
- @StartNo_SaleBill=DBNull();
- @EndNo_SaleBill =DBNull();
- @StartAssessDate_SaleBill =DBNull();
- @EndAssessDate_SaleBill =DBNull();
- @StartNo_SaleOutDepotBill=DBNull();
- @EndNo_SaleOutDepotBill =DBNull();
- @StartAssessDate_SaleOutDepotBill =DBNull();
- @EndAssessDate_SaleOutDepotBill =DBNull();
- if(!Equals(txtCustomerNo1.CValue,""))
- @StartNo_Customer= txtCustomerNo1.CValue;
- if(!Equals(txtCustomerNo2.CValue,""))
- @EndNo_Customer= txtCustomerNo2.CValue;
- if(!Equals(txtSaleBillNo1.CValue,""))
- @StartNo_SaleBill= txtSaleBillNo1.CValue;
- if(!Equals(txtSaleBillNo2.CValue,""))
- @EndNo_SaleBill= txtSaleBillNo2.CValue;
- if(dtAssessDate1.Checked)
- @StartAssessDate_SaleBill= dtAssessDate1.Value;
- if(dtAssessDate2.Checked)
- @EndAssessDate_SaleBill= dtAssessDate2.Value;
- if(!Equals(txtBillNo1.CValue,""))
- @StartNo_SaleOutDepotBill= txtBillNo1.CValue;
- if(!Equals(txtBillNo2.CValue,""))
- @EndNo_SaleOutDepotBill= txtBillNo2.CValue;
- if(dt1.Checked)
- @StartAssessDate_SaleOutDepotBill= dt1.Value;
- if(dt2.Checked)
- @EndAssessDate_SaleOutDepotBill= dt2.Value;
- Search("SearchSaleConsignment",@StartNo_Customer,@EndNo_Customer,@StartNo_SaleBill,@EndNo_SaleBill,
- @StartAssessDate_SaleBill,@EndAssessDate_SaleBill,@StartNo_SaleOutDepotBill,@EndNo_SaleOutDepotBill,
- @StartAssessDate_SaleOutDepotBill,@EndAssessDate_SaleOutDepotBill);
- if(RowCount("#Total") == 0)
- MessageBox("不存在符合查询条件的记录!");
- </Click>
- </Events>
- </IKButton>
- <IKButton name="btnClear">
- <Events>
- <Click>
- Empty();
- txtCustomerNo1.CValue="";
- txtCustomerNo2.CValue="";
- txtSaleBillNo1.CValue="";
- txtSaleBillNo2.CValue="";
- txtBillNo1.CValue="";
- txtBillNo2.CValue="";
-
- dtAssessDate1.Checked=False;
- dtAssessDate2.Checked=False;
- dt1.Checked=False;
- dt2.Checked=False;
-
- </Click>
- </Events>
- </IKButton>
- </Controls>
- <ChildForms>
- <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>
- <ChildForm name="SaleBillSearch" DataSource="SaleBill" SearchFunction="SearchAllSaleBill" SearchFunctionCondition="SearchBillCondition" SearchFunctionByNo="">
- <DataColumn Index="0" MappingName="#SaleBill.No_SaleBill" HeaderText="销售单号" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="1" MappingName="#SaleBill.Date_SaleBill" HeaderText="制单日期" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="2" MappingName="#SaleBill.Type_Customer" HeaderText="客户类型" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="3" MappingName="#SaleBill.ShortName_Customer" HeaderText="客户名称" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
- </ChildForm>
- <ChildForm name="SaleOutDepotBillSearch" DataSource="SaleOutDepotBill" SearchFunction="SearchAllSaleOutBill" SearchFunctionByNo="">
- <DataColumn Index="0" MappingName="#SaleOutDepotBill.No_SaleOutDepotBill" HeaderText="销货出库单号"
- Width="90" ColumnType="IKDataGridTextBoxColumn" />
- <DataColumn Index="1" MappingName="#SaleOutDepotBill.Date_SaleOutDepotBill" HeaderText="制单日期"
- Width="90" ColumnType="IKDataGridTextBoxColumn" />
- <DataColumn Index="2" MappingName="#SaleOutDepotBill.No_Customer" HeaderText="客户编号" Width="75"
- ColumnType="IKDataGridTextBoxColumn" />
- <DataColumn Index="3" MappingName="#SaleOutDepotBill.ShortName_Customer" HeaderText="客户简称" Width="75"
- ColumnType="IKDataGridTextBoxColumn" />
- </ChildForm>
- </ChildForms>
- </Client>
- <Server>
- <Tables>
- <Table name="Total" Type="Parent">
- <GetSchema CmdType="Text" CmdText="
- Select top 0 No_Customer,ShortName_Customer,convert(nvarchar(64),'') As StrTransBack_SaleBill,GetMethod_SaleBill,No_SaleBill,AssessDate_SaleBill,SaleBill.OutStatus_SaleBill,a.No_SaleOutDepotBill,a.AssessDate_SaleOutDepotBill,No_ExpressDelivery,Comment_ExpressDelivery, convert(nvarchar(64),'') As Check_ExpressDelivery
- From SaleBill
- Join Customer On Customer.ID_Customer=SaleBill.ID_Customer
- Left Join
- (
- Select No_FromBill,No_SaleOutDepotBill,AssessDate_SaleOutDepotBill
- From SaleOutDepotBill
- Join SaleOutDepotBillProduct On SaleOutDepotBillProduct.ID_SaleOutDepotBill=SaleOutDepotBill.ID_SaleOutDepotBill
- Where SaleOutDepotBill.ID_Assessor Is Not Null
- )a On a.No_FromBill=SaleBill.No_SaleBill
- Left Join ExpressDeliveryDetail On ExpressDeliveryDetail.No_FromBill=a.No_SaleOutDepotBill
- Left Join ExpressDelivery On ExpressDelivery.ID_ExpressDelivery=ExpressDeliveryDetail.ID_ExpressDelivery
- Where SaleBill.ID_Assessor Is Not Null
- "/>
-
- </Table>
- </Tables>
- <Search>
- <SearchAllCustomer CmdType="Text" CmdText="SELECT Customer.No_Customer,Customer.ShortName_Customer,Customer.Type_Customer,Customer.Level_Customer,Customer.IsGeneric_Customer FROM Customer ">
- <Tables>
- <Table name="AllCustomer" />
- </Tables>
- </SearchAllCustomer>
- <SearchAllSaleBill CmdType="Text" CmdText=" SELECT SaleBill.*, Customer.No_Customer, Customer.Name_Customer, Customer.ShortName_Customer,
- Customer.Type_Customer, Customer.LastDiscount_Customer, Customer.PostalCode_Customer,
- a.Name_User AS Name_Creator, b.Name_User AS Name_Assessor, c.Name_User AS LastModUserName,
- Location.No_Location, Location.Name_Location, CONVERT(decimal(18,6), 0) AS NumSum, CONVERT(decimal(18,6), 0) AS MoneySum,
- CONVERT(decimal(18,6), 0) AS TaxSum, Employee.No_Employee AS No_Principal ,Employee.Name_Employee as Principal_SaleBill
- FROM SaleBill
- LEFT JOIN Customer ON Customer.ID_Customer = SaleBill.ID_Customer
- LEFT JOIN AppUser a ON a.ID_User = SaleBill.ID_Creator
- LEFT JOIN AppUser b ON b.ID_User = SaleBill.ID_Assessor
- LEFT JOIN AppUser c ON c.ID_User = SaleBill.LastModUser_SaleBill
- LEFT JOIN Location ON Location.ID_Location = SaleBill.ID_Location
- LEFT JOIN Employee ON Employee.ID_Employee = SaleBill.ID_Principal">
- <Tables>
- <Table name="AllSaleBill" />
- </Tables>
- </SearchAllSaleBill>
- <SearchAllSaleOutBill CmdType="Text" CmdText=" SELECT SaleOutDepotBill.*,a.Name_User,b.Name_User as Name_UserAuti,c.Name_User as Name_LastModUser,
- Location.Name_Location,Location.No_Location ,Customer.Name_Customer, Customer.ShortName_Customer,Customer.No_Customer
- FROM SaleOutDepotBill
- LEFT JOIN Customer ON Customer.ID_Customer = SaleOutDepotBill.ID_Customer
- LEFT JOIN AppUser a ON a.ID_User = SaleOutDepotBill.ID_Creator
- LEFT JOIN AppUser b ON b.ID_User = SaleOutDepotBill.ID_Assessor
- Left JOIN AppUser c ON c.ID_User = SaleOutDepotBill.LastModUser_SaleOutDepotBill
- LEFT JOIN Location ON Location.ID_Location = SaleOutDepotBill.ID_Location
- WHERE Disable_SaleOutDepotBill = 0">
- <Tables>
- <Table name="AllSaleOutBill" />
- </Tables>
- </SearchAllSaleOutBill>
- <SearchSaleConsignment CmdType="Text" CmdText="
- declare @sqlCmd nvarchar(4000)
- set @sqlCmd=N'
- Select distinct No_Customer,ShortName_Customer,case TransBack_SaleBill when 1 then '+nchar(39)+N'是'+nchar(39)+ N' else '+nchar(39)+N'否'+nchar(39)+N' end As StrTransBack_SaleBill,GetMethod_SaleBill,No_SaleBill,AssessDate_SaleBill,SaleBill.OutStatus_SaleBill ,a.No_SaleOutDepotBill,a.AssessDate_SaleOutDepotBill,No_ExpressDelivery,Comment_ExpressDelivery, case Check_ExpressDelivery when 1 then '+nchar(39)+N'是'+nchar(39)+ N' else '+nchar(39)+N'否'+nchar(39)+N' end As Check_ExpressDelivery
- From SaleBill
- Join Customer On Customer.ID_Customer=SaleBill.ID_Customer
- Left Join
- (
- Select No_FromBill,No_SaleOutDepotBill,AssessDate_SaleOutDepotBill
- From SaleOutDepotBill
- Join SaleOutDepotBillProduct On SaleOutDepotBillProduct.ID_SaleOutDepotBill=SaleOutDepotBill.ID_SaleOutDepotBill
- Where SaleOutDepotBill.ID_Assessor Is Not Null
- )a On a.No_FromBill=SaleBill.No_SaleBill
- Left Join ExpressDeliveryDetail On ExpressDeliveryDetail.No_FromBill=a.No_SaleOutDepotBill
- Left Join ExpressDelivery On ExpressDelivery.ID_ExpressDelivery=ExpressDeliveryDetail.ID_ExpressDelivery
- Where SaleBill.ID_Assessor Is Not Null '
- if(@StartNo_Customer Is Not Null)
- set @sqlCmd=@sqlCmd+' And No_Customer >='+nchar(39)+@StartNo_Customer+nchar(39)
- if(@EndNo_Customer Is Not Null)
- set @sqlCmd=@sqlCmd+' And No_Customer <='+nchar(39)+@EndNo_Customer+nchar(39)
- if(@StartNo_SaleBill Is Not Null)
- set @sqlCmd=@sqlCmd+' And No_SaleBill >='+nchar(39)+@StartNo_SaleBill+nchar(39)
- if(@EndNo_SaleBill Is Not Null)
- set @sqlCmd=@sqlCmd+' And No_SaleBill <='+nchar(39)+@EndNo_SaleBill+nchar(39)
- if(@StartAssessDate_SaleBill Is Not Null)
- set @sqlCmd=@sqlCmd+N' And DateDiff(day,'+nchar(39)+convert(nvarchar(64),@StartAssessDate_SaleBill)+nchar(39)+N',AssessDate_SaleBill) >= 0 '
- if(@EndAssessDate_SaleBill Is Not Null)
- set @sqlCmd=@sqlCmd+N' And DateDiff(day,'+nchar(39)+convert(nvarchar(64),@EndAssessDate_SaleBill)+nchar(39)+N',AssessDate_SaleBill) <= 0 '
- if(@StartNo_SaleOutDepotBill Is Not Null)
- set @sqlCmd=@sqlCmd+N' And No_SaleOutDepotBill >='+nchar(39)+ @StartNo_SaleOutDepotBill +nchar(39)
- if(@EndNo_SaleOutDepotBill Is Not Null)
- set @sqlCmd=@sqlCmd+N' And No_SaleOutDepotBill <='+nchar(39)+ @EndNo_SaleOutDepotBill+nchar(39)
- if(@StartAssessDate_SaleOutDepotBill Is Not Null)
- set @sqlCmd=@sqlCmd+N' And DateDiff(day,'+nchar(39)+convert(nvarchar(64),@StartAssessDate_SaleOutDepotBill)+nchar(39)+N',AssessDate_SaleOutDepotBill) >= 0 '
- if(@EndAssessDate_SaleOutDepotBill Is Not Null)
- set @sqlCmd=@sqlCmd+N' And DateDiff(day,'+nchar(39)+convert(nvarchar(64),@EndAssessDate_SaleOutDepotBill)+nchar(39)+N',AssessDate_SaleOutDepotBill) <= 0 '
-
- execute sp_executesql @sqlCmd
- ">
- <Params>
- <Param name="@StartNo_Customer" type="Customer.No_Customer" Index="0" />
- <Param name="@EndNo_Customer" type="Customer.No_Customer" Index="1" />
- <Param name="@StartNo_SaleBill" type="Customer.No_Customer" Index="2" />
- <Param name="@EndNo_SaleBill" type="Customer.No_Customer" Index="3" />
- <Param name="@StartAssessDate_SaleBill" type="SaleBill.AssessDate_SaleBill" Index="4" />
- <Param name="@EndAssessDate_SaleBill" type="SaleBill.AssessDate_SaleBill" Index="5" />
- <Param name="@StartNo_SaleOutDepotBill" type="Customer.No_Customer" Index="6" />
- <Param name="@EndNo_SaleOutDepotBill" type="Customer.No_Customer" Index="7" />
- <Param name="@StartAssessDate_SaleOutDepotBill" type="SaleBill.AssessDate_SaleBill" Index="8" />
- <Param name="@EndAssessDate_SaleOutDepotBill" type="SaleBill.AssessDate_SaleBill" Index="9" />
- </Params>
- <Tables>
- <Table name="Total"/>
- </Tables>
- </SearchSaleConsignment>
- </Search>
- </Server>
- <Lables>
- <Search>
- </Search>
- </Lables>
- </Form>
- </Forms>
-
|