unit u_rp_noself; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, bsSkinCtrls, ComCtrls, bsSkinTabs, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid, DB, ADODB, dxDBTLCl, dxGrClms; type Tfrm_rp_noself = class(TForm) Panel1: TPanel; Panel2: TPanel; bsSkinCheckRadioBox1: TbsSkinCheckRadioBox; bsSkinCheckRadioBox2: TbsSkinCheckRadioBox; bsSkinCheckRadioBox3: TbsSkinCheckRadioBox; bsSkinCheckRadioBox4: TbsSkinCheckRadioBox; bsSkinCheckRadioBox5: TbsSkinCheckRadioBox; bsSkinCheckRadioBox6: TbsSkinCheckRadioBox; bsSkinCheckRadioBox7: TbsSkinCheckRadioBox; bsSkinCheckRadioBox8: TbsSkinCheckRadioBox; bsSkinButton5: TbsSkinButton; bsSkinNotebook1: TbsSkinNotebook; dxDBGrid1: TdxDBGrid; dxDBGrid2: TdxDBGrid; dxDBGrid3: TdxDBGrid; dxDBGrid4: TdxDBGrid; dxDBGrid5: TdxDBGrid; dxDBGrid6: TdxDBGrid; dxDBGrid7: TdxDBGrid; dxDBGrid8: TdxDBGrid; dxDBGrid9: TdxDBGrid; p_tell: TADOStoredProc; p_tell1: TDataSource; dxDBGrid8Column2: TdxDBGridMaskColumn; dxDBGrid8Column3: TdxDBGridMaskColumn; dxDBGrid8Column4: TdxDBGridDateColumn; dxDBGrid8Column5: TdxDBGridDateColumn; dxDBGrid8Column6: TdxDBGridMaskColumn; dxDBGrid8Column7: TdxDBGridMaskColumn; dxDBGrid8Column8: TdxDBGridMaskColumn; dxDBGrid8Column11: TdxDBGridMaskColumn; dxDBGrid8Column12: TdxDBGridMaskColumn; dxDBGrid8Column13: TdxDBGridMaskColumn; dxDBGrid8Column14: TdxDBGridMaskColumn; dxDBGrid8Column15: TdxDBGridMaskColumn; dxDBGrid8Column16: TdxDBGridMaskColumn; dxDBGrid8_1: TdxDBGridMaskColumn; dxDBGrid8Column18: TdxDBGridCheckColumn; dxDBGrid9Column1: TdxDBGridDateColumn; dxDBGrid9Column2: TdxDBGridDateColumn; dxDBGrid9Column3: TdxDBGridMaskColumn; dxDBGrid9Column4: TdxDBGridMaskColumn; dxDBGrid9Column5: TdxDBGridMaskColumn; dxDBGrid9Column6: TdxDBGridMaskColumn; dxDBGrid9Column7: TdxDBGridMaskColumn; dxDBGrid9Column8: TdxDBGridMaskColumn; dxDBGrid9Column9: TdxDBGridMaskColumn; dxDBGrid9Column10: TdxDBGridMaskColumn; dxDBGrid9Column11: TdxDBGridMaskColumn; dxDBGrid9Column12: TdxDBGridMaskColumn; dxDBGrid9Column13: TdxDBGridMaskColumn; dxDBGrid9Column14: TdxDBGridMaskColumn; dxDBGrid9Column15: TdxDBGridMaskColumn; dxDBGrid1Column1: TdxDBGridMaskColumn; dxDBGrid1Column2: TdxDBGridMaskColumn; dxDBGrid1Column3: TdxDBGridMaskColumn; dxDBGrid1Column4: TdxDBGridMaskColumn; dxDBGrid1Column5: TdxDBGridMaskColumn; dxDBGrid1Column9: TdxDBGridMaskColumn; dxDBGrid1Column10: TdxDBGridDateColumn; dxDBGrid1Column6: TdxDBGridColumn; dxDBGrid1Column7: TdxDBGridColumn; dxDBGrid1Column8: TdxDBGridColumn; dxDBGrid2Column1: TdxDBGridMaskColumn; dxDBGrid2Column2: TdxDBGridMaskColumn; dxDBGrid2Column3: TdxDBGridMaskColumn; dxDBGrid2Column4: TdxDBGridMaskColumn; dxDBGrid2Column8: TdxDBGridMaskColumn; dxDBGrid2Column9: TdxDBGridDateColumn; dxDBGrid2Column5: TdxDBGridColumn; dxDBGrid2Column6: TdxDBGridColumn; dxDBGrid2Column7: TdxDBGridColumn; dxDBGrid5Column2: TdxDBGridMaskColumn; dxDBGrid5Column3: TdxDBGridMaskColumn; dxDBGrid5Column4: TdxDBGridMaskColumn; dxDBGrid5Column5: TdxDBGridMaskColumn; dxDBGrid5Column6: TdxDBGridMaskColumn; dxDBGrid5Column7: TdxDBGridMaskColumn; dxDBGrid5Column8: TdxDBGridMaskColumn; dxDBGrid5Column9: TdxDBGridMaskColumn; dxDBGrid5Column10: TdxDBGridMaskColumn; dxDBGrid5Column11: TdxDBGridMaskColumn; dxDBGrid5Column12: TdxDBGridColumn; p_tell_two: TADOStoredProc; p_tell_two1: TDataSource; dxDBGrid6Column1: TdxDBGridMaskColumn; dxDBGrid6Column2: TdxDBGridMaskColumn; dxDBGrid6Column3: TdxDBGridMaskColumn; dxDBGrid6Column4: TdxDBGridDateColumn; dxDBGrid61: TdxDBGridDateColumn; dxDBGrid62: TdxDBGridDateColumn; dxDBGrid63: TdxDBGridDateColumn; dxDBGrid6Column8: TdxDBGridMaskColumn; dxDBGrid6Column9: TdxDBGridMaskColumn; dxDBGrid6Column10: TdxDBGridMaskColumn; dxDBGrid6Column11: TdxDBGridMaskColumn; dxDBGrid6Column12: TdxDBGridMaskColumn; dxDBGrid6Column13: TdxDBGridMaskColumn; dxDBGrid6Column14: TdxDBGridMaskColumn; dxDBGrid6Column15: TdxDBGridMaskColumn; dxDBGrid6Column16: TdxDBGridMaskColumn; dxDBGrid7Column1: TdxDBGridMaskColumn; dxDBGrid7Column2: TdxDBGridDateColumn; dxDBGrid7Column3: TdxDBGridMaskColumn; dxDBGrid7Column4: TdxDBGridDateColumn; dxDBGrid7Column5: TdxDBGridCheckColumn; dxDBGrid7Column6: TdxDBGridDateColumn; dxDBGrid3Column1: TdxDBGridMaskColumn; dxDBGrid3Column2: TdxDBGridMaskColumn; dxDBGrid3Column3: TdxDBGridMaskColumn; dxDBGrid3Column4: TdxDBGridMaskColumn; dxDBGrid3Column5: TdxDBGridMaskColumn; dxDBGrid3Column6: TdxDBGridMaskColumn; dxDBGrid3Column7: TdxDBGridMaskColumn; dxDBGrid3Column8: TdxDBGridDateColumn; dxDBGrid3Column9: TdxDBGridDateColumn; dxDBGrid3Column10: TdxDBGridMaskColumn; dxDBGrid3Column11: TdxDBGridMaskColumn; dxDBGrid3Column12: TdxDBGridMaskColumn; dxDBGrid3Column13: TdxDBGridMaskColumn; dxDBGrid3Column14: TdxDBGridMaskColumn; dxDBGrid3Column18: TdxDBGridMaskColumn; dxDBGrid3Column15: TdxDBGridColumn; dxDBGrid3Column16: TdxDBGridColumn; dxDBGrid3Column17: TdxDBGridColumn; dxDBGrid4Column1: TdxDBGridMaskColumn; dxDBGrid4Column2: TdxDBGridMaskColumn; dxDBGrid4Column3: TdxDBGridMaskColumn; dxDBGrid4Column4: TdxDBGridMaskColumn; dxDBGrid4Column5: TdxDBGridMaskColumn; dxDBGrid4Column6: TdxDBGridDateColumn; dxDBGrid4Column7: TdxDBGridMaskColumn; dxDBGrid4Column8: TdxDBGridDateColumn; dxDBGrid4Column9: TdxDBGridMaskColumn; dxDBGrid4Column10: TdxDBGridMaskColumn; dxDBGrid4Column11: TdxDBGridDateColumn; dxDBGrid4Column12: TdxDBGridDateColumn; dxDBGrid4Column13: TdxDBGridMaskColumn; dxDBGrid4Column14: TdxDBGridMaskColumn; dxDBGrid4Column15: TdxDBGridMaskColumn; dxDBGrid4Column16: TdxDBGridMaskColumn; dxDBGrid4Column17: TdxDBGridMaskColumn; dxDBGrid4Column18: TdxDBGridMaskColumn; bsSkinCheckRadioBox9: TbsSkinCheckRadioBox; dxDBGrid10: TdxDBGrid; dxDBGrid10Column1: TdxDBGridMaskColumn; dxDBGrid10Column2: TdxDBGridMaskColumn; dxDBGrid10Column3: TdxDBGridMaskColumn; dxDBGrid10Column4: TdxDBGridDateColumn; dxDBGrid10Column5: TdxDBGridMaskColumn; dxDBGrid10Column6: TdxDBGridMaskColumn; dxDBGrid10Column7: TdxDBGridMaskColumn; dxDBGrid10Column8: TdxDBGridMaskColumn; dxDBGrid10Column9: TdxDBGridMaskColumn; dxDBGrid10Column10: TdxDBGridMaskColumn; dxDBGrid10Column11: TdxDBGridMaskColumn; dxDBGrid10Column12: TdxDBGridMaskColumn; dxDBGrid10Column13: TdxDBGridDateColumn; dxDBGrid10Column14: TdxDBGridDateColumn; dxDBGrid10Column15: TdxDBGridDateColumn; dxDBGrid10Column16: TdxDBGridMaskColumn; dxDBGrid10Column17: TdxDBGridMaskColumn; dxDBGrid10Column18: TdxDBGridMaskColumn; dxDBGrid10Column19: TdxDBGridMaskColumn; dxDBGrid10Column20: TdxDBGridMaskColumn; dxDBGrid10Column21: TdxDBGridMaskColumn; dxDBGrid10Column22: TdxDBGridMaskColumn; dxDBGrid10Column23: TdxDBGridMaskColumn; dxDBGrid10Column24: TdxDBGridDateColumn; procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure bsSkinButton5Click(Sender: TObject); procedure Panel2Resize(Sender: TObject); procedure bsSkinCheckRadioBox1Click(Sender: TObject); procedure bsSkinCheckRadioBox3Click(Sender: TObject); procedure bsSkinCheckRadioBox4Click(Sender: TObject); procedure bsSkinCheckRadioBox5Click(Sender: TObject); procedure bsSkinCheckRadioBox8Click(Sender: TObject); procedure bsSkinCheckRadioBox6Click(Sender: TObject); procedure bsSkinCheckRadioBox7Click(Sender: TObject); procedure bsSkinCheckRadioBox2Click(Sender: TObject); procedure dxDBGrid8ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); procedure dxDBGrid9ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); procedure dxDBGrid1ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); procedure dxDBGrid2ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); procedure dxDBGrid3ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); procedure dxDBGrid4ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); procedure dxDBGrid5ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); procedure dxDBGrid6ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); procedure dxDBGrid7ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); procedure bsSkinCheckRadioBox9Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var frm_rp_noself: Tfrm_rp_noself; implementation uses u_main, my_sys_function, u_rp_tell; {$R *.dfm} procedure Tfrm_rp_noself.FormClose(Sender: TObject; var Action: TCloseAction); begin frm_rp_tell.Hide; frm_rp_tell.ManualFloat(frm_rp_tell.BoundsRect ); frm_main.freeTabs('frm_rp_tell'); action:=cafree; frm_rp_tell:=nil; end; procedure Tfrm_rp_noself.bsSkinButton5Click(Sender: TObject); begin close; end; procedure Tfrm_rp_noself.Panel2Resize(Sender: TObject); var i:integer; begin i:=round(Panel2.Width/10); bsSkinCheckRadioBox1.Width:=i; bsSkinCheckRadioBox9.Width:=i; bsSkinCheckRadioBox2.Width:=i; bsSkinCheckRadioBox3.Width:=i; bsSkinCheckRadioBox4.Width:=i; bsSkinCheckRadioBox5.Width:=i; bsSkinCheckRadioBox6.Width:=i; bsSkinCheckRadioBox7.Width:=i; bsSkinCheckRadioBox8.Width:=i; end; procedure Tfrm_rp_noself.bsSkinCheckRadioBox1Click(Sender: TObject); var str:widestring; begin str:='where t_op_state.是否完成<>1'; str:=str+' and '+open_data('0038','v_op_no.揽货人','v_op_no.操作员','v_op_no.客服员','v_op_no.报关操作','v_op_no.报检操作'); p_tell.close; p_tell.Parameters.ParamByName('SQLStr').value:= 'SELECT v_op_no.编号, v_op_no.会计期间, v_op_no.业务日期,' +'v_op_no.揽货人, v_op_no.操作员, v_op_no.客服员,' +'v_op_no.业务种类, v_op_no.委托单位, v_op_no.销售部门,' +'v_op_no.操作部门, v_op_no.业务编号, v_op_no.委托编号,' +'v_op_no.主提单号, v_op_no.分提单号, t_op_state.业务状态,' +'t_op_state.是否完成 ' +'FROM v_op_no INNER JOIN ' +'t_op_state ON v_op_no.编号 = t_op_state.编号 ' +str +' order by v_op_no.业务种类,v_op_no.业务编号'; p_tell.open; bsSkinNotebook1.PageIndex:=1; end; procedure Tfrm_rp_noself.bsSkinCheckRadioBox3Click(Sender: TObject); var str:widestring; begin str:='where 编号 in (select 编号 from t_ch_fee where 费用状态 in (' +''''+'提交审核'+''''+','+''''+'申请修改'+''''+','+''''+'申请删除'+''''+'))'; str:=str+' and '+open_data('0038','揽货人','操作员','客服员','报关操作','报检操作'); p_tell.close; p_tell.Parameters.ParamByName('SQLStr').value:= 'SELECT * FROM v_op_no '+str +' order by v_op_no.业务种类,v_op_no.业务编号'; p_tell.open; bsSkinNotebook1.PageIndex:=2; end; procedure Tfrm_rp_noself.bsSkinCheckRadioBox4Click(Sender: TObject); var str:widestring; begin str:='where 申请状态 in (' +''''+'提交申请'+''''+','+''''+'申请修改'+''''+')'; str:=str+' and '+open_data('0038','申请人','no','no','no','no'); p_tell.close; p_tell.Parameters.ParamByName('SQLStr').value:= 'SELECT * FROM t_ch_invoice_shen '+str +' order by 申请编号'; p_tell.open; bsSkinNotebook1.PageIndex:=3; end; procedure Tfrm_rp_noself.bsSkinCheckRadioBox5Click(Sender: TObject); var str:widestring; begin str:='where 申请状态 in (' +''''+'提交申请'+''''+','+''''+'申请修改'+''''+')'; str:=str+' and '+open_data('0038','申请人','no','no','no','no'); p_tell.close; p_tell.Parameters.ParamByName('SQLStr').value:= 'SELECT * FROM t_ch_check '+str +' order by 申请编号'; p_tell.open; bsSkinNotebook1.PageIndex:=4; end; procedure Tfrm_rp_noself.bsSkinCheckRadioBox8Click(Sender: TObject); var str:widestring; begin str:='where t_op_card.是否回单=0 and datediff(day,v_op_no.业务日期,getdate())>=' +get_parameters_value(13,'7'); str:=str+' and '+open_data('0038','v_op_no.揽货人','v_op_no.操作员','v_op_no.客服员','v_op_no.报关操作','v_op_no.报检操作'); p_tell.close; p_tell.Parameters.ParamByName('SQLStr').value:= 'SELECT v_op_no.*,datediff(day,v_op_no.业务日期,getdate()) as 天数, t_op_card.单证名称, t_op_card.单证号码,' +'t_op_card.接单日期, t_op_card.送单日期, t_op_card.是否回单,' +'t_op_card.回单日期,t_op_card.是否还单,t_op_card.还单日期' +' FROM v_op_no INNER JOIN' +' t_op_card ON v_op_no.编号 = t_op_card.编号 ' +str +' order by v_op_no.业务种类,v_op_no.业务编号'; p_tell.open; bsSkinNotebook1.PageIndex:=6; end; procedure Tfrm_rp_noself.bsSkinCheckRadioBox6Click(Sender: TObject); var str:widestring; begin str:='having t_crm_client.客户状态='+''''+'合作客户'+'''' +' and isnull(MAX(t_crm_client_link.接触日期),'+''''+'2000-01-01'+'''' +')<='+''''+datetimetostr(date-strtoint(get_parameters_value(11,'7')))+''''; str:=str+' and '+open_data('0038','揽货人','no','no','no','no'); p_tell.close; p_tell.Parameters.ParamByName('SQLStr').value:= 'SELECT t_crm_client.客户简称, t_crm_client.客户全称, t_crm_client.通讯地址,' +'t_crm_client.揽货人, t_crm_client.客户状态, t_crm_client.客户价值,' +'t_crm_client.结费期限, t_crm_client.业务区域, t_crm_client.出口区域,' +'t_crm_client.出口箱型, t_crm_client.货物名称,t_crm_client.业务货量,' +'MAX(t_crm_client_link.接触日期) AS 最后接触日期 ' +'FROM t_crm_client LEFT OUTER JOIN ' +'t_crm_client_link ON ' +'t_crm_client.客户简称 = t_crm_client_link.客户简称 ' +' GROUP BY t_crm_client.客户简称, t_crm_client.客户全称,' +'t_crm_client.通讯地址, t_crm_client.揽货人, t_crm_client.客户状态,' +'t_crm_client.客户价值, t_crm_client.结费期限, t_crm_client.业务区域,' +'t_crm_client.出口区域, t_crm_client.出口箱型, t_crm_client.货物名称,t_crm_client.业务货量 ' +str +' order by t_crm_client.揽货人'; p_tell.open; str:='where ((t_crm_client_linkman.生日 = GETDATE()) OR ' +'(t_crm_client_linkman.纪念日1 = GETDATE()) OR ' +'(t_crm_client_linkman.纪念日2 = GETDATE()) OR ' +'(t_crm_client_linkman.纪念日3 = GETDATE()))'; str:=str+' and '+open_data('0038','揽货人','no','no','no','no'); p_tell_two.close; p_tell_two.Parameters.ParamByName('SQLStr').value:= 'SELECT t_crm_client_linkman.姓名, t_crm_client_linkman.职务,' +'t_crm_client_linkman.部门, t_crm_client_linkman.生日,' +'t_crm_client_linkman.纪念日1, t_crm_client_linkman.纪念日2,' +'t_crm_client_linkman.纪念日3, t_crm_client.客户简称,' +'t_crm_client.客户全称, t_crm_client.通讯地址, t_crm_client.揽货人,' +'t_crm_client.业务货量, t_crm_client.出口区域, t_crm_client.业务区域,' +'t_crm_client.出口箱型, t_crm_client.货物名称 ' +'FROM t_crm_client_linkman INNER JOIN ' +'t_crm_client ON ' +'t_crm_client_linkman.客户简称 = t_crm_client.客户简称 ' +str +' order by t_crm_client.揽货人,t_crm_client_linkman.姓名'; p_tell_two.open; bsSkinNotebook1.PageIndex:=7; end; procedure Tfrm_rp_noself.bsSkinCheckRadioBox7Click(Sender: TObject); var str:widestring; begin str:='where 是否完成<>1'; str:=str+' and '+open_data('0038','录入人','no','no','no','no'); p_tell.close; p_tell.Parameters.ParamByName('SQLStr').value:= 'SELECT * FROM t_info_plan '+str +' order by 录入人'; p_tell.open; bsSkinNotebook1.PageIndex:=8; end; procedure Tfrm_rp_noself.bsSkinCheckRadioBox2Click(Sender: TObject); var str:widestring; begin str:=' and '+open_data('0038','v_op_no.揽货人','v_op_no.操作员','v_op_no.客服员','v_op_no.报关操作','v_op_no.报检操作'); p_tell.close; p_tell.Parameters.ParamByName('SQLStr').value:= 'SELECT v_op_no.编号, v_op_no.会计期间, v_op_no.业务日期,' +'v_op_no.揽货人, v_op_no.操作员, v_op_no.客服员,' +'v_op_no.业务种类, v_op_no.委托单位, v_op_no.业务状态,' +'v_op_no.费用状态, v_op_no.销售部门, v_op_no.操作部门,' +'v_op_no.业务编号, v_op_no.主提单号, v_op_no.委托编号,' +'v_op_no.分提单号, t_op_gain.合计应收, t_op_gain.合计已收,' +'(t_op_gain.合计应收-t_op_gain.合计已收) as 合计未收, t_crm_client.结费期限, DATEDIFF([day],' +'v_op_no.业务日期, GETDATE()) AS 欠费天数 ' +'FROM v_op_no LEFT JOIN ' +'t_op_gain ON v_op_no.编号 = t_op_gain.编号 INNER JOIN ' +'t_crm_client ON v_op_no.委托单位 = t_crm_client.客户简称 AND ' +'DATEDIFF([day], v_op_no.业务日期, GETDATE()) >= t_crm_client.结费期限 ' +' and t_op_gain.合计应收<>t_op_gain.合计已收 ' +str +' order by v_op_no.揽货人,v_op_no.业务种类'; p_tell.open; bsSkinNotebook1.PageIndex:=5; end; procedure Tfrm_rp_noself.dxDBGrid8ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); begin Column_sort_pro(Column,p_tell,'业务编号'); end; procedure Tfrm_rp_noself.dxDBGrid9ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); begin Column_sort_pro(Column,p_tell,'业务编号'); end; procedure Tfrm_rp_noself.dxDBGrid1ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); begin Column_sort_pro(Column,p_tell,'申请编号'); end; procedure Tfrm_rp_noself.dxDBGrid2ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); begin Column_sort_pro(Column,p_tell,'申请编号'); end; procedure Tfrm_rp_noself.dxDBGrid3ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); begin Column_sort_pro(Column,p_tell,'业务编号'); end; procedure Tfrm_rp_noself.dxDBGrid4ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); begin Column_sort_pro(Column,p_tell,'业务编号'); end; procedure Tfrm_rp_noself.dxDBGrid5ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); begin Column_sort_pro(Column,p_tell,'客户简称'); end; procedure Tfrm_rp_noself.dxDBGrid6ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); begin Column_sort_pro(Column,p_tell_two,'姓名'); end; procedure Tfrm_rp_noself.dxDBGrid7ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); begin Column_sort_pro(Column,p_tell,'计划名称'); end; procedure Tfrm_rp_noself.bsSkinCheckRadioBox9Click(Sender: TObject); var str:widestring; begin str:='where 编号 in (select distinct 编号 from t_ch_fee where 费用状态=' +''''+'录入状态'+''''+')'; str:=str+' and '+open_data('0038','客服员','操作员','揽货人','报关操作','报检操作'); str:=str+' and 开船日期<'+''''+datetostr(date)+''''; p_tell.close; p_tell.Parameters.ParamByName('SQLStr').value:= 'SELECT * FROM t_op_seae '+str +' order by 业务编号'; p_tell.open; bsSkinNotebook1.PageIndex:=9; end; end.