|
|
|
|
unit u_rp_rp_total;
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
|
Dialogs, dxExEdtr, RxMemDS, DB, ADODB, Menus, XPMenu, bsSkinCtrls,
|
|
|
|
|
dxDBGrid, dxDBTLCl, dxGrClms, dxTL, dxDBCtrl, dxCntner, ComCtrls,
|
|
|
|
|
bsSkinTabs, ExtCtrls;
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
Tfrm_rp_rp_total = class(TForm)
|
|
|
|
|
Panel1: TPanel;
|
|
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
|
|
p_seae: TADOStoredProc;
|
|
|
|
|
p_seae1: TDataSource;
|
|
|
|
|
t_sum1: TDataSource;
|
|
|
|
|
bsSkinPageControl1: TbsSkinPageControl;
|
|
|
|
|
bsSkinTabSheet1: TbsSkinTabSheet;
|
|
|
|
|
bsSkinTabSheet2: TbsSkinTabSheet;
|
|
|
|
|
bsSkinTabSheet3: TbsSkinTabSheet;
|
|
|
|
|
bsSkinTabSheet4: TbsSkinTabSheet;
|
|
|
|
|
bsSkinTabSheet5: TbsSkinTabSheet;
|
|
|
|
|
bsSkinTabSheet6: TbsSkinTabSheet;
|
|
|
|
|
p_seai: TADOStoredProc;
|
|
|
|
|
p_seai1: TDataSource;
|
|
|
|
|
p_airi1: TDataSource;
|
|
|
|
|
p_airi: TADOStoredProc;
|
|
|
|
|
p_aire: TADOStoredProc;
|
|
|
|
|
p_aire1: TDataSource;
|
|
|
|
|
bsSkinPageControl2: TbsSkinPageControl;
|
|
|
|
|
bsSkinTabSheet11: TbsSkinTabSheet;
|
|
|
|
|
bsSkinTabSheet12: TbsSkinTabSheet;
|
|
|
|
|
bsSkinTabSheet13: TbsSkinTabSheet;
|
|
|
|
|
bsSkinTabSheet14: TbsSkinTabSheet;
|
|
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
|
|
dxDBGrid1Column5: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column3: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column4: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column6: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGrid1Column7: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column8: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column9: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column10: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column11: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column21: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column23: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column24: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column25: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column26: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGrid1Column27: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGrid1Column28: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGrid1Column29: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column31: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column43: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column51: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column54: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column55: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column56: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column57: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid11: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid12: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid13: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid14: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid15: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid16: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid17: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid18: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid19: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid110: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column80: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1TEU: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column82: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column83: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column84: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGrid1Column88: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column89: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column90: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column92: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column93: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column85: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column87: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column86: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1USD: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1RMB: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column102: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column105: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column108: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column111: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column114: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column115: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column116: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column117: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid2: TdxDBGrid;
|
|
|
|
|
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn2: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn3: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridDateColumn1: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGridMaskColumn4: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn5: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn6: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn7: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn8: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn9: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn10: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn11: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn12: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridDateColumn2: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGridMaskColumn13: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn14: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn15: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn16: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn17: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridColumn1: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn2: TdxDBGridColumn;
|
|
|
|
|
dxDBGridMaskColumn18: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn19: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn20: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn21: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn22: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn23: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn24: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn25: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn26: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn27: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn38: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn39: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn40: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn41: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridDateColumn3: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGridMaskColumn42: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn43: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn44: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn45: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn46: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn47: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn48: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn49: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridColumn3: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn4: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn5: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn6: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn7: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn8: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn9: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn10: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn11: TdxDBGridColumn;
|
|
|
|
|
dxDBGridMaskColumn50: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid3: TdxDBGrid;
|
|
|
|
|
dxDBGridMaskColumn51: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn52: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn53: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridDateColumn4: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGridMaskColumn54: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn55: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn56: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn57: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn58: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn59: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridDateColumn5: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGridMaskColumn60: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn61: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn62: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn63: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridColumn12: TdxDBGridColumn;
|
|
|
|
|
dxDBGridMaskColumn64: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn65: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn66: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridDateColumn6: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGridMaskColumn67: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn68: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn69: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridColumn13: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn14: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn15: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn16: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn17: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn18: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn19: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn20: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn21: TdxDBGridColumn;
|
|
|
|
|
dxDBGridMaskColumn70: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid4: TdxDBGrid;
|
|
|
|
|
dxDBGridMaskColumn71: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn72: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn73: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridDateColumn7: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGridMaskColumn74: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn75: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn76: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn77: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn78: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn79: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridDateColumn8: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGridMaskColumn80: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn81: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn82: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn83: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridColumn22: TdxDBGridColumn;
|
|
|
|
|
dxDBGridMaskColumn84: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn85: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn86: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridDateColumn9: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGridMaskColumn87: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn88: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn89: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridColumn23: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn24: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn25: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn26: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn27: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn28: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn29: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn30: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn31: TdxDBGridColumn;
|
|
|
|
|
dxDBGridMaskColumn90: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid5: TdxDBGrid;
|
|
|
|
|
dxDBGrid2Column1: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid2Column2: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid2USD: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid2Column29: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid2Column30: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid2RMB: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid2Column32: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid2Column33: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid2Column34: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid2Column35: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid2Column36: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid2Column37: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid5Column14: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid6: TdxDBGrid;
|
|
|
|
|
dxDBGridMaskColumn91: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridColumn32: TdxDBGridColumn;
|
|
|
|
|
dxDBGridMaskColumn92: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridColumn34: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn35: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn36: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn37: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn38: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn39: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn40: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn41: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn42: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn43: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid7: TdxDBGrid;
|
|
|
|
|
dxDBGridMaskColumn93: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridColumn44: TdxDBGridColumn;
|
|
|
|
|
dxDBGridMaskColumn94: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridColumn46: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn47: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn48: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn49: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn50: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn51: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn52: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn53: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn54: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn55: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid8: TdxDBGrid;
|
|
|
|
|
dxDBGridMaskColumn95: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridColumn56: TdxDBGridColumn;
|
|
|
|
|
dxDBGridMaskColumn96: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridColumn58: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn59: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn60: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn61: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn62: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn63: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn64: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn65: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn66: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn67: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid9: TdxDBGrid;
|
|
|
|
|
dxDBGridMaskColumn97: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridColumn68: TdxDBGridColumn;
|
|
|
|
|
dxDBGridMaskColumn98: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridColumn70: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn71: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn72: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn73: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn74: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn75: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn76: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn77: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn78: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn79: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column68: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column69: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid2Column65: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid2Column66: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid3Column34: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid3Column35: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid4Column34: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid4Column35: TdxDBGridColumn;
|
|
|
|
|
p_sum: TADOStoredProc;
|
|
|
|
|
PopupMenu2: TPopupMenu;
|
|
|
|
|
N10: TMenuItem;
|
|
|
|
|
N11: TMenuItem;
|
|
|
|
|
N14: TMenuItem;
|
|
|
|
|
N13: TMenuItem;
|
|
|
|
|
N12: TMenuItem;
|
|
|
|
|
N15: TMenuItem;
|
|
|
|
|
N16: TMenuItem;
|
|
|
|
|
XPMenu2: TXPMenu;
|
|
|
|
|
dxDBGrid1Column60: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column61: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column62: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid5Column15: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column63: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column64: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid5Column16: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column65: TdxDBGridColumn;
|
|
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
|
|
procedure Panel1Resize(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
|
|
procedure bsSkinPageControl1Change(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
|
|
procedure sum_do(str:string);
|
|
|
|
|
procedure N10Click(Sender: TObject);
|
|
|
|
|
procedure N14Click(Sender: TObject);
|
|
|
|
|
procedure N12Click(Sender: TObject);
|
|
|
|
|
procedure N16Click(Sender: TObject);
|
|
|
|
|
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 dxDBGrid8ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
procedure dxDBGrid9ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
private
|
|
|
|
|
{ Private declarations }
|
|
|
|
|
public
|
|
|
|
|
{ Public declarations }
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
var
|
|
|
|
|
frm_rp_rp_total: Tfrm_rp_rp_total;
|
|
|
|
|
rp_rp_total_open:boolean;
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
uses u_main, my_sys_function, u_rp_query, u_sys_progress,
|
|
|
|
|
u_data_share;
|
|
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_rp_total.sum_do(str:string);
|
|
|
|
|
begin
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
if not ASSIGNED(frm_sys_progress) then
|
|
|
|
|
frm_sys_progress:=tfrm_sys_progress.Create(application);
|
|
|
|
|
frm_sys_progress.Show;
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.MaxValue:=p_seae.RecordCount
|
|
|
|
|
+p_seai.RecordCount+p_aire.RecordCount+p_airi.RecordCount;
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.MinValue:=0;
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=0;
|
|
|
|
|
frm_sys_progress.Update;
|
|
|
|
|
|
|
|
|
|
p_seae.first;
|
|
|
|
|
while not p_seae.eof do
|
|
|
|
|
begin
|
|
|
|
|
if not t_sum.Locate('<27><>','<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'+p_seae.fieldbyname(str).asstring,[])then
|
|
|
|
|
begin
|
|
|
|
|
t_sum.insert;
|
|
|
|
|
t_sum['ͳ<>Ʊ<EFBFBD>']:=str;
|
|
|
|
|
t_sum['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>';
|
|
|
|
|
t_sum['base']:=p_seae.fieldbyname(str).asstring;
|
|
|
|
|
t_sum['Ʊ<><C6B1>']:=1;
|
|
|
|
|
t_sum['<27><>']:='<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'+p_seae.fieldbyname(str).asstring;
|
|
|
|
|
t_sum['Ӧ<><D3A6>USD']:=p_seae.fieldbyname('Ӧ<><D3A6>USD').asfloat;
|
|
|
|
|
t_sum['Ӧ<><D3A6>USD']:=p_seae.fieldbyname('Ӧ<><D3A6>USD').asfloat;
|
|
|
|
|
t_sum['<27><><EFBFBD><EFBFBD>USD']:=p_seae.fieldbyname('<27><><EFBFBD><EFBFBD>USD').asfloat;
|
|
|
|
|
t_sum['Ӧ<><D3A6>RMB']:=p_seae.fieldbyname('Ӧ<><D3A6>RMB').asfloat;
|
|
|
|
|
t_sum['Ӧ<><D3A6>RMB']:=p_seae.fieldbyname('Ӧ<><D3A6>RMB').asfloat;
|
|
|
|
|
t_sum['<27><><EFBFBD><EFBFBD>RMB']:=p_seae.fieldbyname('<27><><EFBFBD><EFBFBD>RMB').asfloat;
|
|
|
|
|
t_sum['<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>']:=p_seae.fieldbyname('<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>').asfloat;
|
|
|
|
|
t_sum['<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>']:=p_seae.fieldbyname('<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>').asfloat;
|
|
|
|
|
t_sum['ë<><C3AB><EFBFBD><EFBFBD>']:=p_seae.fieldbyname('ë<><C3AB><EFBFBD><EFBFBD>').asfloat;
|
|
|
|
|
t_sum.post;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
t_sum.edit;
|
|
|
|
|
t_sum['Ʊ<><C6B1>']:=t_sum['Ʊ<><C6B1>']+1;
|
|
|
|
|
t_sum['Ӧ<><D3A6>USD']:=t_sum['Ӧ<><D3A6>USD']+p_seae.fieldbyname('Ӧ<><D3A6>USD').asfloat;
|
|
|
|
|
t_sum['Ӧ<><D3A6>USD']:=t_sum['Ӧ<><D3A6>USD']+p_seae.fieldbyname('Ӧ<><D3A6>USD').asfloat;
|
|
|
|
|
t_sum['<27><><EFBFBD><EFBFBD>USD']:=t_sum['<27><><EFBFBD><EFBFBD>USD']+p_seae.fieldbyname('<27><><EFBFBD><EFBFBD>USD').asfloat;
|
|
|
|
|
t_sum['Ӧ<><D3A6>RMB']:=t_sum['Ӧ<><D3A6>RMB']+p_seae.fieldbyname('Ӧ<><D3A6>RMB').asfloat;
|
|
|
|
|
t_sum['Ӧ<><D3A6>RMB']:=t_sum['<27><><EFBFBD><EFBFBD>RMB']+p_seae.fieldbyname('Ӧ<><D3A6>RMB').asfloat;
|
|
|
|
|
t_sum['<27><><EFBFBD><EFBFBD>RMB']:=t_sum['<27><><EFBFBD><EFBFBD>RMB']+p_seae.fieldbyname('<27><><EFBFBD><EFBFBD>RMB').asfloat;
|
|
|
|
|
t_sum['<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>']:=t_sum['<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>']+p_seae.fieldbyname('<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>').asfloat;
|
|
|
|
|
t_sum['<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>']:=t_sum['<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>']+p_seae.fieldbyname('<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>').asfloat;
|
|
|
|
|
t_sum['ë<><C3AB><EFBFBD><EFBFBD>']:=t_sum['ë<><C3AB><EFBFBD><EFBFBD>']+p_seae.fieldbyname('ë<><C3AB><EFBFBD><EFBFBD>').asfloat;
|
|
|
|
|
t_sum.post;
|
|
|
|
|
end;
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
|
|
p_seae.next;
|
|
|
|
|
end;
|
|
|
|
|
p_seai.first;
|
|
|
|
|
while not p_seai.eof do
|
|
|
|
|
begin
|
|
|
|
|
if not t_sum.Locate('<27><>','<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>'+p_seai.fieldbyname(str).asstring,[])then
|
|
|
|
|
begin
|
|
|
|
|
t_sum.insert;
|
|
|
|
|
t_sum['ͳ<>Ʊ<EFBFBD>']:=str;
|
|
|
|
|
t_sum['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>';
|
|
|
|
|
t_sum['base']:=p_seai.fieldbyname(str).asstring;
|
|
|
|
|
t_sum['Ʊ<><C6B1>']:=1;
|
|
|
|
|
t_sum['<27><>']:='<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>'+p_seai.fieldbyname(str).asstring;
|
|
|
|
|
t_sum['Ӧ<><D3A6>USD']:=p_seai.fieldbyname('Ӧ<><D3A6>USD').asfloat;
|
|
|
|
|
t_sum['Ӧ<><D3A6>USD']:=p_seai.fieldbyname('Ӧ<><D3A6>USD').asfloat;
|
|
|
|
|
t_sum['<27><><EFBFBD><EFBFBD>USD']:=p_seai.fieldbyname('<27><><EFBFBD><EFBFBD>USD').asfloat;
|
|
|
|
|
t_sum['Ӧ<><D3A6>RMB']:=p_seai.fieldbyname('Ӧ<><D3A6>RMB').asfloat;
|
|
|
|
|
t_sum['Ӧ<><D3A6>RMB']:=p_seai.fieldbyname('Ӧ<><D3A6>RMB').asfloat;
|
|
|
|
|
t_sum['<27><><EFBFBD><EFBFBD>RMB']:=p_seai.fieldbyname('<27><><EFBFBD><EFBFBD>RMB').asfloat;
|
|
|
|
|
t_sum['<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>']:=p_seai.fieldbyname('<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>').asfloat;
|
|
|
|
|
t_sum['<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>']:=p_seai.fieldbyname('<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>').asfloat;
|
|
|
|
|
t_sum['ë<><C3AB><EFBFBD><EFBFBD>']:=p_seai.fieldbyname('ë<><C3AB><EFBFBD><EFBFBD>').asfloat;
|
|
|
|
|
t_sum.post;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
t_sum.edit;
|
|
|
|
|
t_sum['Ʊ<><C6B1>']:=t_sum['Ʊ<><C6B1>']+1;
|
|
|
|
|
t_sum['Ӧ<><D3A6>USD']:=t_sum['Ӧ<><D3A6>USD']+p_seai.fieldbyname('Ӧ<><D3A6>USD').asfloat;
|
|
|
|
|
t_sum['Ӧ<><D3A6>USD']:=t_sum['Ӧ<><D3A6>USD']+p_seai.fieldbyname('Ӧ<><D3A6>USD').asfloat;
|
|
|
|
|
t_sum['<27><><EFBFBD><EFBFBD>USD']:=t_sum['<27><><EFBFBD><EFBFBD>USD']+p_seai.fieldbyname('<27><><EFBFBD><EFBFBD>USD').asfloat;
|
|
|
|
|
t_sum['Ӧ<><D3A6>RMB']:=t_sum['Ӧ<><D3A6>RMB']+p_seai.fieldbyname('Ӧ<><D3A6>RMB').asfloat;
|
|
|
|
|
t_sum['Ӧ<><D3A6>RMB']:=t_sum['<27><><EFBFBD><EFBFBD>RMB']+p_seai.fieldbyname('Ӧ<><D3A6>RMB').asfloat;
|
|
|
|
|
t_sum['<27><><EFBFBD><EFBFBD>RMB']:=t_sum['<27><><EFBFBD><EFBFBD>RMB']+p_seai.fieldbyname('<27><><EFBFBD><EFBFBD>RMB').asfloat;
|
|
|
|
|
t_sum['<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>']:=t_sum['<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>']+p_seai.fieldbyname('<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>').asfloat;
|
|
|
|
|
t_sum['<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>']:=t_sum['<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>']+p_seai.fieldbyname('<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>').asfloat;
|
|
|
|
|
t_sum['ë<><C3AB><EFBFBD><EFBFBD>']:=t_sum['ë<><C3AB><EFBFBD><EFBFBD>']+p_seai.fieldbyname('ë<><C3AB><EFBFBD><EFBFBD>').asfloat;
|
|
|
|
|
t_sum.post;
|
|
|
|
|
end;
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
|
|
p_seai.next;
|
|
|
|
|
end;
|
|
|
|
|
p_aire.first;
|
|
|
|
|
while not p_aire.eof do
|
|
|
|
|
begin
|
|
|
|
|
if not t_sum.Locate('<27><>','<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'+p_aire.fieldbyname(str).asstring,[])then
|
|
|
|
|
begin
|
|
|
|
|
t_sum.insert;
|
|
|
|
|
t_sum['ͳ<>Ʊ<EFBFBD>']:=str;
|
|
|
|
|
t_sum['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>';
|
|
|
|
|
t_sum['base']:=p_aire.fieldbyname(str).asstring;
|
|
|
|
|
t_sum['Ʊ<><C6B1>']:=1;
|
|
|
|
|
t_sum['<27><>']:='<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'+p_aire.fieldbyname(str).asstring;
|
|
|
|
|
t_sum['Ӧ<><D3A6>USD']:=p_aire.fieldbyname('Ӧ<><D3A6>USD').asfloat;
|
|
|
|
|
t_sum['Ӧ<><D3A6>USD']:=p_aire.fieldbyname('Ӧ<><D3A6>USD').asfloat;
|
|
|
|
|
t_sum['<27><><EFBFBD><EFBFBD>USD']:=p_aire.fieldbyname('<27><><EFBFBD><EFBFBD>USD').asfloat;
|
|
|
|
|
t_sum['Ӧ<><D3A6>RMB']:=p_aire.fieldbyname('Ӧ<><D3A6>RMB').asfloat;
|
|
|
|
|
t_sum['Ӧ<><D3A6>RMB']:=p_aire.fieldbyname('Ӧ<><D3A6>RMB').asfloat;
|
|
|
|
|
t_sum['<27><><EFBFBD><EFBFBD>RMB']:=p_aire.fieldbyname('<27><><EFBFBD><EFBFBD>RMB').asfloat;
|
|
|
|
|
t_sum['<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>']:=p_aire.fieldbyname('<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>').asfloat;
|
|
|
|
|
t_sum['<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>']:=p_aire.fieldbyname('<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>').asfloat;
|
|
|
|
|
t_sum['ë<><C3AB><EFBFBD><EFBFBD>']:=p_aire.fieldbyname('ë<><C3AB><EFBFBD><EFBFBD>').asfloat;
|
|
|
|
|
t_sum.post;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
t_sum.edit;
|
|
|
|
|
t_sum['Ʊ<><C6B1>']:=t_sum['Ʊ<><C6B1>']+1;
|
|
|
|
|
t_sum['Ӧ<><D3A6>USD']:=t_sum['Ӧ<><D3A6>USD']+p_aire.fieldbyname('Ӧ<><D3A6>USD').asfloat;
|
|
|
|
|
t_sum['Ӧ<><D3A6>USD']:=t_sum['Ӧ<><D3A6>USD']+p_aire.fieldbyname('Ӧ<><D3A6>USD').asfloat;
|
|
|
|
|
t_sum['<27><><EFBFBD><EFBFBD>USD']:=t_sum['<27><><EFBFBD><EFBFBD>USD']+p_aire.fieldbyname('<27><><EFBFBD><EFBFBD>USD').asfloat;
|
|
|
|
|
t_sum['Ӧ<><D3A6>RMB']:=t_sum['Ӧ<><D3A6>RMB']+p_aire.fieldbyname('Ӧ<><D3A6>RMB').asfloat;
|
|
|
|
|
t_sum['Ӧ<><D3A6>RMB']:=t_sum['<27><><EFBFBD><EFBFBD>RMB']+p_aire.fieldbyname('Ӧ<><D3A6>RMB').asfloat;
|
|
|
|
|
t_sum['<27><><EFBFBD><EFBFBD>RMB']:=t_sum['<27><><EFBFBD><EFBFBD>RMB']+p_aire.fieldbyname('<27><><EFBFBD><EFBFBD>RMB').asfloat;
|
|
|
|
|
t_sum['<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>']:=t_sum['<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>']+p_aire.fieldbyname('<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>').asfloat;
|
|
|
|
|
t_sum['<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>']:=t_sum['<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>']+p_aire.fieldbyname('<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>').asfloat;
|
|
|
|
|
t_sum['ë<><C3AB><EFBFBD><EFBFBD>']:=t_sum['ë<><C3AB><EFBFBD><EFBFBD>']+p_aire.fieldbyname('ë<><C3AB><EFBFBD><EFBFBD>').asfloat;
|
|
|
|
|
t_sum.post;
|
|
|
|
|
end;
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
|
|
p_aire.next;
|
|
|
|
|
end;
|
|
|
|
|
p_airi.first;
|
|
|
|
|
while not p_airi.eof do
|
|
|
|
|
begin
|
|
|
|
|
if not t_sum.Locate('<27><>','<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>'+p_airi.fieldbyname(str).asstring,[])then
|
|
|
|
|
begin
|
|
|
|
|
t_sum.insert;
|
|
|
|
|
t_sum['ͳ<>Ʊ<EFBFBD>']:=str;
|
|
|
|
|
t_sum['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>';
|
|
|
|
|
t_sum['base']:=p_airi.fieldbyname(str).asstring;
|
|
|
|
|
t_sum['Ʊ<><C6B1>']:=1;
|
|
|
|
|
t_sum['<27><>']:='<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>'+p_airi.fieldbyname(str).asstring;
|
|
|
|
|
t_sum['Ӧ<><D3A6>USD']:=p_airi.fieldbyname('Ӧ<><D3A6>USD').asfloat;
|
|
|
|
|
t_sum['Ӧ<><D3A6>USD']:=p_airi.fieldbyname('Ӧ<><D3A6>USD').asfloat;
|
|
|
|
|
t_sum['<27><><EFBFBD><EFBFBD>USD']:=p_airi.fieldbyname('<27><><EFBFBD><EFBFBD>USD').asfloat;
|
|
|
|
|
t_sum['Ӧ<><D3A6>RMB']:=p_airi.fieldbyname('Ӧ<><D3A6>RMB').asfloat;
|
|
|
|
|
t_sum['Ӧ<><D3A6>RMB']:=p_airi.fieldbyname('Ӧ<><D3A6>RMB').asfloat;
|
|
|
|
|
t_sum['<27><><EFBFBD><EFBFBD>RMB']:=p_airi.fieldbyname('<27><><EFBFBD><EFBFBD>RMB').asfloat;
|
|
|
|
|
t_sum['<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>']:=p_airi.fieldbyname('<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>').asfloat;
|
|
|
|
|
t_sum['<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>']:=p_airi.fieldbyname('<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>').asfloat;
|
|
|
|
|
t_sum['ë<><C3AB><EFBFBD><EFBFBD>']:=p_airi.fieldbyname('ë<><C3AB><EFBFBD><EFBFBD>').asfloat;
|
|
|
|
|
t_sum.post;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
t_sum.edit;
|
|
|
|
|
t_sum['Ʊ<><C6B1>']:=t_sum['Ʊ<><C6B1>']+1;
|
|
|
|
|
t_sum['Ӧ<><D3A6>USD']:=t_sum['Ӧ<><D3A6>USD']+p_airi.fieldbyname('Ӧ<><D3A6>USD').asfloat;
|
|
|
|
|
t_sum['Ӧ<><D3A6>USD']:=t_sum['Ӧ<><D3A6>USD']+p_airi.fieldbyname('Ӧ<><D3A6>USD').asfloat;
|
|
|
|
|
t_sum['<27><><EFBFBD><EFBFBD>USD']:=t_sum['<27><><EFBFBD><EFBFBD>USD']+p_airi.fieldbyname('<27><><EFBFBD><EFBFBD>USD').asfloat;
|
|
|
|
|
t_sum['Ӧ<><D3A6>RMB']:=t_sum['Ӧ<><D3A6>RMB']+p_airi.fieldbyname('Ӧ<><D3A6>RMB').asfloat;
|
|
|
|
|
t_sum['Ӧ<><D3A6>RMB']:=t_sum['<27><><EFBFBD><EFBFBD>RMB']+p_airi.fieldbyname('Ӧ<><D3A6>RMB').asfloat;
|
|
|
|
|
t_sum['<27><><EFBFBD><EFBFBD>RMB']:=t_sum['<27><><EFBFBD><EFBFBD>RMB']+p_airi.fieldbyname('<27><><EFBFBD><EFBFBD>RMB').asfloat;
|
|
|
|
|
t_sum['<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>']:=t_sum['<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>']+p_airi.fieldbyname('<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>').asfloat;
|
|
|
|
|
t_sum['<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>']:=t_sum['<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>']+p_airi.fieldbyname('<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>').asfloat;
|
|
|
|
|
t_sum['ë<><C3AB><EFBFBD><EFBFBD>']:=t_sum['ë<><C3AB><EFBFBD><EFBFBD>']+p_airi.fieldbyname('ë<><C3AB><EFBFBD><EFBFBD>').asfloat;
|
|
|
|
|
t_sum.post;
|
|
|
|
|
end;
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
|
|
p_airi.next;
|
|
|
|
|
end;
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.MaxValue:=t_sum.RecordCount;
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.MinValue:=0;
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=0;
|
|
|
|
|
frm_sys_progress.Update;
|
|
|
|
|
t_sum.first;
|
|
|
|
|
while not t_sum.eof do
|
|
|
|
|
begin
|
|
|
|
|
t_sum.edit;
|
|
|
|
|
if t_sum['<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>']=0 then
|
|
|
|
|
t_sum['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
else
|
|
|
|
|
t_sum['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=percent(t_sum['ë<><C3AB><EFBFBD><EFBFBD>']/t_sum['<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>']);
|
|
|
|
|
t_sum.post;
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
|
|
t_sum.next;
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.MaxValue;
|
|
|
|
|
frm_sys_progress.free;
|
|
|
|
|
frm_sys_progress:=nil;
|
|
|
|
|
end; }
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_rp_total.bsSkinButton5Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
close;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_rp_total.FormClose(Sender: TObject;
|
|
|
|
|
var Action: TCloseAction);
|
|
|
|
|
begin
|
|
|
|
|
savereggrid(dxdbgrid1,caption+'1');
|
|
|
|
|
savereggrid(dxdbgrid2,caption+'2');
|
|
|
|
|
savereggrid(dxdbgrid3,caption+'3');
|
|
|
|
|
savereggrid(dxdbgrid4,caption+'4');
|
|
|
|
|
savereggrid(dxdbgrid5,caption+'5');
|
|
|
|
|
savereggrid(dxdbgrid6,caption+'6');
|
|
|
|
|
savereggrid(dxdbgrid7,caption+'7');
|
|
|
|
|
savereggrid(dxdbgrid8,caption+'8');
|
|
|
|
|
savereggrid(dxdbgrid9,caption+'9');
|
|
|
|
|
|
|
|
|
|
if frm_data_share.t_load_employee.FieldByName('Ӧ<><D3A6>').asboolean then
|
|
|
|
|
begin
|
|
|
|
|
dxDBGrid1.Bands[2].Visible:=true;
|
|
|
|
|
dxDBGrid2.Bands[2].Visible:=true;
|
|
|
|
|
dxDBGrid3.Bands[2].Visible:=true;
|
|
|
|
|
dxDBGrid3.Bands[2].Visible:=true;
|
|
|
|
|
dxDBGrid2Column29.Visible:=true;
|
|
|
|
|
dxDBGrid2Column32.Visible:=true;
|
|
|
|
|
dxDBGrid2Column35.Visible:=true;
|
|
|
|
|
dxDBGridColumn35.Visible:=true;
|
|
|
|
|
dxDBGridColumn38.Visible:=true;
|
|
|
|
|
dxDBGridColumn41.Visible:=true;
|
|
|
|
|
dxDBGridColumn47.Visible:=true;
|
|
|
|
|
dxDBGridColumn50.Visible:=true;
|
|
|
|
|
dxDBGridColumn53.Visible:=true;
|
|
|
|
|
dxDBGridColumn59.Visible:=true;
|
|
|
|
|
dxDBGridColumn62.Visible:=true;
|
|
|
|
|
dxDBGridColumn65.Visible:=true;
|
|
|
|
|
dxDBGridColumn71.Visible:=true;
|
|
|
|
|
dxDBGridColumn74.Visible:=true;
|
|
|
|
|
dxDBGridColumn77.Visible:=true;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
dxDBGrid1.Bands[2].Visible:=false;
|
|
|
|
|
dxDBGrid2.Bands[2].Visible:=false;
|
|
|
|
|
dxDBGrid3.Bands[2].Visible:=false;
|
|
|
|
|
dxDBGrid4.Bands[2].Visible:=false;
|
|
|
|
|
dxDBGrid2Column29.Visible:=false;
|
|
|
|
|
dxDBGrid2Column32.Visible:=false;
|
|
|
|
|
dxDBGrid2Column35.Visible:=false;
|
|
|
|
|
dxDBGridColumn35.Visible:=false;
|
|
|
|
|
dxDBGridColumn38.Visible:=false;
|
|
|
|
|
dxDBGridColumn41.Visible:=false;
|
|
|
|
|
dxDBGridColumn47.Visible:=false;
|
|
|
|
|
dxDBGridColumn50.Visible:=false;
|
|
|
|
|
dxDBGridColumn53.Visible:=false;
|
|
|
|
|
dxDBGridColumn59.Visible:=false;
|
|
|
|
|
dxDBGridColumn62.Visible:=false;
|
|
|
|
|
dxDBGridColumn65.Visible:=false;
|
|
|
|
|
dxDBGridColumn71.Visible:=false;
|
|
|
|
|
dxDBGridColumn74.Visible:=false;
|
|
|
|
|
dxDBGridColumn77.Visible:=false;
|
|
|
|
|
end;
|
|
|
|
|
if frm_data_share.t_load_employee.FieldByName('Ӧ<><D3A6>').asboolean then
|
|
|
|
|
begin
|
|
|
|
|
dxDBGrid1.Bands[3].Visible:=true;
|
|
|
|
|
dxDBGrid2.Bands[3].Visible:=true;
|
|
|
|
|
dxDBGrid3.Bands[3].Visible:=true;
|
|
|
|
|
dxDBGrid4.Bands[3].Visible:=true;
|
|
|
|
|
dxDBGrid2Column30.Visible:=true;
|
|
|
|
|
dxDBGrid2Column33.Visible:=true;
|
|
|
|
|
dxDBGrid2Column36.Visible:=true;
|
|
|
|
|
dxDBGridColumn36.Visible:=true;
|
|
|
|
|
dxDBGridColumn39.Visible:=true;
|
|
|
|
|
dxDBGridColumn42.Visible:=true;
|
|
|
|
|
dxDBGridColumn48.Visible:=true;
|
|
|
|
|
dxDBGridColumn51.Visible:=true;
|
|
|
|
|
dxDBGridColumn54.Visible:=true;
|
|
|
|
|
dxDBGridColumn60.Visible:=true;
|
|
|
|
|
dxDBGridColumn63.Visible:=true;
|
|
|
|
|
dxDBGridColumn66.Visible:=true;
|
|
|
|
|
dxDBGridColumn72.Visible:=true;
|
|
|
|
|
dxDBGridColumn75.Visible:=true;
|
|
|
|
|
dxDBGridColumn78.Visible:=true;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
dxDBGrid1.Bands[3].Visible:=false;
|
|
|
|
|
dxDBGrid2.Bands[3].Visible:=false;
|
|
|
|
|
dxDBGrid3.Bands[3].Visible:=false;
|
|
|
|
|
dxDBGrid4.Bands[3].Visible:=false;
|
|
|
|
|
dxDBGrid2Column30.Visible:=false;
|
|
|
|
|
dxDBGrid2Column33.Visible:=false;
|
|
|
|
|
dxDBGrid2Column36.Visible:=false;
|
|
|
|
|
dxDBGridColumn36.Visible:=false;
|
|
|
|
|
dxDBGridColumn39.Visible:=false;
|
|
|
|
|
dxDBGridColumn42.Visible:=false;
|
|
|
|
|
dxDBGridColumn48.Visible:=false;
|
|
|
|
|
dxDBGridColumn51.Visible:=false;
|
|
|
|
|
dxDBGridColumn54.Visible:=false;
|
|
|
|
|
dxDBGridColumn60.Visible:=false;
|
|
|
|
|
dxDBGridColumn63.Visible:=false;
|
|
|
|
|
dxDBGridColumn66.Visible:=false;
|
|
|
|
|
dxDBGridColumn72.Visible:=false;
|
|
|
|
|
dxDBGridColumn75.Visible:=false;
|
|
|
|
|
dxDBGridColumn78.Visible:=false;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
if frm_data_share.t_load_employee.FieldByName('<27><><EFBFBD><EFBFBD>').asboolean then
|
|
|
|
|
begin
|
|
|
|
|
dxDBGrid1.Bands[4].Visible:=true;
|
|
|
|
|
dxDBGrid2.Bands[4].Visible:=true;
|
|
|
|
|
dxDBGrid3.Bands[4].Visible:=true;
|
|
|
|
|
dxDBGrid4.Bands[4].Visible:=true;
|
|
|
|
|
dxDBGrid2USD.Visible:=true;
|
|
|
|
|
dxDBGrid2RMB.Visible:=true;
|
|
|
|
|
dxDBGrid2Column34.Visible:=true;
|
|
|
|
|
dxDBGrid2Column37.Visible:=true;
|
|
|
|
|
dxDBGridColumn34.Visible:=true;
|
|
|
|
|
dxDBGridColumn37.Visible:=true;
|
|
|
|
|
dxDBGridColumn40.Visible:=true;
|
|
|
|
|
dxDBGridColumn43.Visible:=true;
|
|
|
|
|
dxDBGridColumn46.Visible:=true;
|
|
|
|
|
dxDBGridColumn49.Visible:=true;
|
|
|
|
|
dxDBGridColumn52.Visible:=true;
|
|
|
|
|
dxDBGridColumn55.Visible:=true;
|
|
|
|
|
dxDBGridColumn58.Visible:=true;
|
|
|
|
|
dxDBGridColumn61.Visible:=true;
|
|
|
|
|
dxDBGridColumn64.Visible:=true;
|
|
|
|
|
dxDBGridColumn67.Visible:=true;
|
|
|
|
|
dxDBGridColumn70.Visible:=true;
|
|
|
|
|
dxDBGridColumn73.Visible:=true;
|
|
|
|
|
dxDBGridColumn76.Visible:=true;
|
|
|
|
|
dxDBGridColumn79.Visible:=true;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
dxDBGrid1.Bands[4].Visible:=false;
|
|
|
|
|
dxDBGrid2.Bands[4].Visible:=false;
|
|
|
|
|
dxDBGrid3.Bands[4].Visible:=false;
|
|
|
|
|
dxDBGrid4.Bands[4].Visible:=false;
|
|
|
|
|
dxDBGrid2USD.Visible:=false;
|
|
|
|
|
dxDBGrid2RMB.Visible:=false;
|
|
|
|
|
dxDBGrid2Column34.Visible:=false;
|
|
|
|
|
dxDBGrid2Column37.Visible:=false;
|
|
|
|
|
dxDBGridColumn34.Visible:=false;
|
|
|
|
|
dxDBGridColumn37.Visible:=false;
|
|
|
|
|
dxDBGridColumn40.Visible:=false;
|
|
|
|
|
dxDBGridColumn43.Visible:=false;
|
|
|
|
|
dxDBGridColumn46.Visible:=false;
|
|
|
|
|
dxDBGridColumn49.Visible:=false;
|
|
|
|
|
dxDBGridColumn52.Visible:=false;
|
|
|
|
|
dxDBGridColumn55.Visible:=false;
|
|
|
|
|
dxDBGridColumn58.Visible:=false;
|
|
|
|
|
dxDBGridColumn61.Visible:=false;
|
|
|
|
|
dxDBGridColumn64.Visible:=false;
|
|
|
|
|
dxDBGridColumn67.Visible:=false;
|
|
|
|
|
dxDBGridColumn70.Visible:=false;
|
|
|
|
|
dxDBGridColumn73.Visible:=false;
|
|
|
|
|
dxDBGridColumn76.Visible:=false;
|
|
|
|
|
dxDBGridColumn79.Visible:=false;
|
|
|
|
|
end;
|
|
|
|
|
rp_rp_total_open:=false;
|
|
|
|
|
frm_rp_rp_total.Hide;
|
|
|
|
|
frm_rp_rp_total.ManualFloat(frm_rp_rp_total.BoundsRect );
|
|
|
|
|
frm_main.freeTabs('frm_rp_rp_total');
|
|
|
|
|
action:=cafree;
|
|
|
|
|
frm_rp_rp_total:=nil;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_rp_total.Panel1Resize(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
bsSkinPanel2.Left:=Panel1.Width-bsSkinPanel2.Width;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_rp_total.bsSkinButton10Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
bsSkinTabSheet1.show;
|
|
|
|
|
try
|
|
|
|
|
frm_rp_query:=tfrm_rp_query.Create (self);
|
|
|
|
|
rp_query_limited:='0037';
|
|
|
|
|
rp_query_bs:=2;
|
|
|
|
|
frm_rp_query.ShowModal;
|
|
|
|
|
finally
|
|
|
|
|
frm_rp_query.Free;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_rp_total.FormShow(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
loadreggrid(dxdbgrid1,true,caption+'1');
|
|
|
|
|
loadreggrid(dxdbgrid2,true,caption+'2');
|
|
|
|
|
loadreggrid(dxdbgrid3,false,caption+'3');
|
|
|
|
|
loadreggrid(dxdbgrid4,false,caption+'4');
|
|
|
|
|
loadreggrid(dxdbgrid5,false,caption+'5');
|
|
|
|
|
loadreggrid(dxdbgrid6,false,caption+'6');
|
|
|
|
|
loadreggrid(dxdbgrid7,false,caption+'7');
|
|
|
|
|
loadreggrid(dxdbgrid8,false,caption+'8');
|
|
|
|
|
loadreggrid(dxdbgrid9,false,caption+'9');
|
|
|
|
|
rp_rp_total_open:=true;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_rp_total.bsSkinPageControl1Change(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
str:widestring;
|
|
|
|
|
str_get:widestring;
|
|
|
|
|
begin
|
|
|
|
|
try
|
|
|
|
|
if not rp_rp_total_open then
|
|
|
|
|
exit;
|
|
|
|
|
if not p_seae.Active then
|
|
|
|
|
exit;
|
|
|
|
|
IF bsSkinTabSheet1.Showing then
|
|
|
|
|
exit;
|
|
|
|
|
// frm_rp_rp_total.sum_do(bsSkinPageControl1.ActivePage.Caption);
|
|
|
|
|
str:=new_query(p_seae);
|
|
|
|
|
if str<>'no'then
|
|
|
|
|
begin
|
|
|
|
|
if bsSkinPageControl1.ActivePage.Caption='ί<>е<EFBFBD>λ' then begin
|
|
|
|
|
|
|
|
|
|
str_get:='SELECT COUNT(t_op_seae.<2E><><EFBFBD><EFBFBD>) as Ʊ<><C6B1>, sum(t_op_gain_main.<2E><><EFBFBD><EFBFBD>USD) as <20><><EFBFBD><EFBFBD>USD'
|
|
|
|
|
+', sum(t_op_gain_main.Ӧ<><D3A6>USD) as Ӧ<><D3A6>USD, sum( t_op_gain_main.Ӧ<><D3A6>USD) as Ӧ<><D3A6>USD, sum(t_op_gain_main.<2E><><EFBFBD><EFBFBD>RMB) as <20><><EFBFBD><EFBFBD>RMB'
|
|
|
|
|
+', sum(t_op_gain_main.Ӧ<><D3A6>RMB) as Ӧ<><D3A6>RMB, sum( t_op_gain_main.Ӧ<><D3A6>RMB) as Ӧ<><D3A6>RMB, sum(t_op_gain_main.ë<><C3AB><EFBFBD><EFBFBD>) as ë<><C3AB><EFBFBD><EFBFBD>'
|
|
|
|
|
+', sum(t_op_gain_main.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>) as <20>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>, sum( t_op_gain_main.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>) as <20>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>'
|
|
|
|
|
+',(case when isnull(sum(t_op_gain_main.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>),0)=0 then '+''''+'<27><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD>'+''''+' else '
|
|
|
|
|
+'ltrim(str(sum(t_op_gain_main.ë<><C3AB><EFBFBD><EFBFBD>)/sum(t_op_gain_main.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>)*100,10,2))+'+''''+'%'+''''+' end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+',t_op_seae.'+bsSkinPageControl1.ActivePage.Caption+' as base,t_crm_client_class.<2E>ͻ<EFBFBD><CDBB>ȼ<EFBFBD>,(select top 1 <20>ͻ<EFBFBD>ȫ<EFBFBD><C8AB> from t_crm_client where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=t_op_seae.ί<>е<EFBFBD>λ) ί<>е<EFBFBD>λȫ<CEBB><C8AB>'
|
|
|
|
|
+','+''''+bsSkinPageControl1.ActivePage.Caption+''''+' as ͳ<>Ʊ<EFBFBD>'
|
|
|
|
|
+','+''''+'<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'+''''+' as ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+' FROM t_op_seae inner JOIN'
|
|
|
|
|
+' t_op_gain_main ON t_op_seae.<2E><><EFBFBD><EFBFBD> = t_op_gain_main.<2E><><EFBFBD><EFBFBD> '
|
|
|
|
|
+' left join t_crm_client_class on t_op_seae.ί<>е<EFBFBD>λ=t_crm_client_class.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and t_crm_client_class.<2E><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><=t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><=t_crm_client_class.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and t_crm_client_class.״̬=''<27><><EFBFBD><EFBFBD>'' '
|
|
|
|
|
|
|
|
|
|
+str+' group by '+'t_op_seae.'+bsSkinPageControl1.ActivePage.Caption+',t_crm_client_class.<2E>ͻ<EFBFBD><CDBB>ȼ<EFBFBD>'
|
|
|
|
|
+' union ';
|
|
|
|
|
str:=new_query(p_seai);
|
|
|
|
|
str_get:=str_get+'SELECT COUNT(t_op_seai.<2E><><EFBFBD><EFBFBD>) as Ʊ<><C6B1>, sum(t_op_gain.<2E><><EFBFBD><EFBFBD>USD) as <20><><EFBFBD><EFBFBD>USD'
|
|
|
|
|
+', sum(t_op_gain.Ӧ<><D3A6>USD) as Ӧ<><D3A6>USD, sum( t_op_gain.Ӧ<><D3A6>USD) as Ӧ<><D3A6>USD, sum(t_op_gain.<2E><><EFBFBD><EFBFBD>RMB) as <20><><EFBFBD><EFBFBD>RMB'
|
|
|
|
|
+', sum(t_op_gain.Ӧ<><D3A6>RMB) as Ӧ<><D3A6>RMB, sum( t_op_gain.Ӧ<><D3A6>RMB) as Ӧ<><D3A6>RMB, sum(t_op_gain.ë<><C3AB><EFBFBD><EFBFBD>) as ë<><C3AB><EFBFBD><EFBFBD>'
|
|
|
|
|
+', sum(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>) as <20>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>, sum( t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>) as <20>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>'
|
|
|
|
|
+',(case when isnull(sum(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>),0)=0 then '+''''+'<27><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD>'+''''+' else '
|
|
|
|
|
+'ltrim(str(sum(t_op_gain.ë<><C3AB><EFBFBD><EFBFBD>)/sum(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>)*100,10,2))+'+''''+'%'+''''+' end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+',t_op_seai.'+bsSkinPageControl1.ActivePage.Caption+' as base,t_crm_client_class.<2E>ͻ<EFBFBD><CDBB>ȼ<EFBFBD>,(select top 1 <20>ͻ<EFBFBD>ȫ<EFBFBD><C8AB> from t_crm_client where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=t_op_seae.ί<>е<EFBFBD>λ) ί<>е<EFBFBD>λȫ<CEBB><C8AB>'
|
|
|
|
|
+','+''''+bsSkinPageControl1.ActivePage.Caption+''''+' as ͳ<>Ʊ<EFBFBD>'
|
|
|
|
|
+','+''''+'<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>'+''''+' as ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+' FROM t_op_seai LEFT JOIN'
|
|
|
|
|
+' t_op_gain ON t_op_seai.<2E><><EFBFBD><EFBFBD> = t_op_gain.<2E><><EFBFBD><EFBFBD> '
|
|
|
|
|
+' left join t_crm_client_class on t_op_seai.ί<>е<EFBFBD>λ=t_crm_client_class.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and t_crm_client_class.<2E><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><=t_op_seai.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and t_op_seai.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><=t_crm_client_class.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and t_crm_client_class.״̬=''<27><><EFBFBD><EFBFBD>'' '
|
|
|
|
|
|
|
|
|
|
+str+' group by '+'t_op_seai.'+bsSkinPageControl1.ActivePage.Caption+',t_crm_client_class.<2E>ͻ<EFBFBD><CDBB>ȼ<EFBFBD>'
|
|
|
|
|
+' union ';
|
|
|
|
|
str:=new_query(p_aire);
|
|
|
|
|
str_get:=str_get+'SELECT COUNT(t_op_aire.<2E><><EFBFBD><EFBFBD>) as Ʊ<><C6B1>, sum(t_op_gain.<2E><><EFBFBD><EFBFBD>USD) as <20><><EFBFBD><EFBFBD>USD'
|
|
|
|
|
+', sum(t_op_gain.Ӧ<><D3A6>USD) as Ӧ<><D3A6>USD, sum( t_op_gain.Ӧ<><D3A6>USD) as Ӧ<><D3A6>USD, sum(t_op_gain.<2E><><EFBFBD><EFBFBD>RMB) as <20><><EFBFBD><EFBFBD>RMB'
|
|
|
|
|
+', sum(t_op_gain.Ӧ<><D3A6>RMB) as Ӧ<><D3A6>RMB, sum( t_op_gain.Ӧ<><D3A6>RMB) as Ӧ<><D3A6>RMB, sum(t_op_gain.ë<><C3AB><EFBFBD><EFBFBD>) as ë<><C3AB><EFBFBD><EFBFBD>'
|
|
|
|
|
+', sum(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>) as <20>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>, sum( t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>) as <20>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>'
|
|
|
|
|
+',(case when isnull(sum(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>),0)=0 then '+''''+'<27><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD>'+''''+' else '
|
|
|
|
|
+'ltrim(str(sum(t_op_gain.ë<><C3AB><EFBFBD><EFBFBD>)/sum(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>)*100,10,2))+'+''''+'%'+''''+' end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+',t_op_aire.'+bsSkinPageControl1.ActivePage.Caption+' as base,t_crm_client_class.<2E>ͻ<EFBFBD><CDBB>ȼ<EFBFBD>,(select top 1 <20>ͻ<EFBFBD>ȫ<EFBFBD><C8AB> from t_crm_client where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=t_op_seae.ί<>е<EFBFBD>λ) ί<>е<EFBFBD>λȫ<CEBB><C8AB>'
|
|
|
|
|
+','+''''+bsSkinPageControl1.ActivePage.Caption+''''+' as ͳ<>Ʊ<EFBFBD>'
|
|
|
|
|
+','+''''+'<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'+''''+' as ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+' FROM t_op_aire LEFT JOIN'
|
|
|
|
|
+' t_op_gain ON t_op_aire.<2E><><EFBFBD><EFBFBD> = t_op_gain.<2E><><EFBFBD><EFBFBD> '
|
|
|
|
|
+' left join t_crm_client_class on t_op_aire.ί<>е<EFBFBD>λ=t_crm_client_class.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and t_crm_client_class.<2E><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><=t_op_aire.һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and t_op_aire.һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><=t_crm_client_class.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and t_crm_client_class.״̬=''<27><><EFBFBD><EFBFBD>'' '
|
|
|
|
|
|
|
|
|
|
+str+' group by '+'t_op_aire.'+bsSkinPageControl1.ActivePage.Caption+',t_crm_client_class.<2E>ͻ<EFBFBD><CDBB>ȼ<EFBFBD>'
|
|
|
|
|
+' union ';
|
|
|
|
|
str:=new_query(p_airi);
|
|
|
|
|
str_get:=str_get+'SELECT COUNT(t_op_airi.<2E><><EFBFBD><EFBFBD>) as Ʊ<><C6B1>, sum(t_op_gain.<2E><><EFBFBD><EFBFBD>USD) as <20><><EFBFBD><EFBFBD>USD'
|
|
|
|
|
+', sum(t_op_gain.Ӧ<><D3A6>USD) as Ӧ<><D3A6>USD, sum( t_op_gain.Ӧ<><D3A6>USD) as Ӧ<><D3A6>USD, sum(t_op_gain.<2E><><EFBFBD><EFBFBD>RMB) as <20><><EFBFBD><EFBFBD>RMB'
|
|
|
|
|
+', sum(t_op_gain.Ӧ<><D3A6>RMB) as Ӧ<><D3A6>RMB, sum( t_op_gain.Ӧ<><D3A6>RMB) as Ӧ<><D3A6>RMB, sum(t_op_gain.ë<><C3AB><EFBFBD><EFBFBD>) as ë<><C3AB><EFBFBD><EFBFBD>'
|
|
|
|
|
+', sum(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>) as <20>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>, sum( t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>) as <20>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>'
|
|
|
|
|
+',(case when isnull(sum(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>),0)=0 then '+''''+'<27><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD>'+''''+' else '
|
|
|
|
|
+'ltrim(str(sum(t_op_gain.ë<><C3AB><EFBFBD><EFBFBD>)/sum(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>)*100,10,2))+'+''''+'%'+''''+' end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+',t_op_airi.'+bsSkinPageControl1.ActivePage.Caption+' as base,t_crm_client_class.<2E>ͻ<EFBFBD><CDBB>ȼ<EFBFBD>,(select top 1 <20>ͻ<EFBFBD>ȫ<EFBFBD><C8AB> from t_crm_client where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=t_op_seae.ί<>е<EFBFBD>λ) ί<>е<EFBFBD>λȫ<CEBB><C8AB>'
|
|
|
|
|
+','+''''+bsSkinPageControl1.ActivePage.Caption+''''+' as ͳ<>Ʊ<EFBFBD>'
|
|
|
|
|
+','+''''+'<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>'+''''+' as ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+' FROM t_op_airi LEFT JOIN'
|
|
|
|
|
+' t_op_gain ON t_op_airi.<2E><><EFBFBD><EFBFBD> = t_op_gain.<2E><><EFBFBD><EFBFBD> '
|
|
|
|
|
+' left join t_crm_client_class on t_op_airi.ί<>е<EFBFBD>λ=t_crm_client_class.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and t_crm_client_class.<2E><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><=t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><=t_crm_client_class.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and t_crm_client_class.״̬=''<27><><EFBFBD><EFBFBD>'' '
|
|
|
|
|
|
|
|
|
|
+str+' group by '+'t_op_airi.'+bsSkinPageControl1.ActivePage.Caption+',t_crm_client_class.<2E>ͻ<EFBFBD><CDBB>ȼ<EFBFBD>';
|
|
|
|
|
end else begin
|
|
|
|
|
str_get:='SELECT COUNT(t_op_seae.<2E><><EFBFBD><EFBFBD>) as Ʊ<><C6B1>, sum(t_op_gain_main.<2E><><EFBFBD><EFBFBD>USD) as <20><><EFBFBD><EFBFBD>USD'
|
|
|
|
|
+', sum(t_op_gain_main.Ӧ<><D3A6>USD) as Ӧ<><D3A6>USD, sum( t_op_gain_main.Ӧ<><D3A6>USD) as Ӧ<><D3A6>USD, sum(t_op_gain_main.<2E><><EFBFBD><EFBFBD>RMB) as <20><><EFBFBD><EFBFBD>RMB'
|
|
|
|
|
+', sum(t_op_gain_main.Ӧ<><D3A6>RMB) as Ӧ<><D3A6>RMB, sum( t_op_gain_main.Ӧ<><D3A6>RMB) as Ӧ<><D3A6>RMB, sum(t_op_gain_main.ë<><C3AB><EFBFBD><EFBFBD>) as ë<><C3AB><EFBFBD><EFBFBD>'
|
|
|
|
|
+', sum(t_op_gain_main.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>) as <20>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>, sum( t_op_gain_main.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>) as <20>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>'
|
|
|
|
|
+',(case when isnull(sum(t_op_gain_main.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>),0)=0 then '+''''+'<27><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD>'+''''+' else '
|
|
|
|
|
+'ltrim(str(sum(t_op_gain_main.ë<><C3AB><EFBFBD><EFBFBD>)/sum(t_op_gain_main.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>)*100,10,2))+'+''''+'%'+''''+' end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+',t_op_seae.'+bsSkinPageControl1.ActivePage.Caption+' as base'
|
|
|
|
|
+','+''''+bsSkinPageControl1.ActivePage.Caption+''''+' as ͳ<>Ʊ<EFBFBD>'
|
|
|
|
|
+','+''''+'<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'+''''+' as ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+' FROM t_op_seae inner JOIN'
|
|
|
|
|
+' t_op_gain_main ON t_op_seae.<2E><><EFBFBD><EFBFBD> = t_op_gain_main.<2E><><EFBFBD><EFBFBD> '
|
|
|
|
|
+str+' group by '+'t_op_seae.'+bsSkinPageControl1.ActivePage.Caption
|
|
|
|
|
+' union ';
|
|
|
|
|
str:=new_query(p_seai);
|
|
|
|
|
str_get:=str_get+'SELECT COUNT(t_op_seai.<2E><><EFBFBD><EFBFBD>) as Ʊ<><C6B1>, sum(t_op_gain.<2E><><EFBFBD><EFBFBD>USD) as <20><><EFBFBD><EFBFBD>USD'
|
|
|
|
|
+', sum(t_op_gain.Ӧ<><D3A6>USD) as Ӧ<><D3A6>USD, sum( t_op_gain.Ӧ<><D3A6>USD) as Ӧ<><D3A6>USD, sum(t_op_gain.<2E><><EFBFBD><EFBFBD>RMB) as <20><><EFBFBD><EFBFBD>RMB'
|
|
|
|
|
+', sum(t_op_gain.Ӧ<><D3A6>RMB) as Ӧ<><D3A6>RMB, sum( t_op_gain.Ӧ<><D3A6>RMB) as Ӧ<><D3A6>RMB, sum(t_op_gain.ë<><C3AB><EFBFBD><EFBFBD>) as ë<><C3AB><EFBFBD><EFBFBD>'
|
|
|
|
|
+', sum(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>) as <20>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>, sum( t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>) as <20>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>'
|
|
|
|
|
+',(case when isnull(sum(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>),0)=0 then '+''''+'<27><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD>'+''''+' else '
|
|
|
|
|
+'ltrim(str(sum(t_op_gain.ë<><C3AB><EFBFBD><EFBFBD>)/sum(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>)*100,10,2))+'+''''+'%'+''''+' end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+',t_op_seai.'+bsSkinPageControl1.ActivePage.Caption+' as base'
|
|
|
|
|
+','+''''+bsSkinPageControl1.ActivePage.Caption+''''+' as ͳ<>Ʊ<EFBFBD>'
|
|
|
|
|
+','+''''+'<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>'+''''+' as ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+' FROM t_op_seai LEFT JOIN'
|
|
|
|
|
+' t_op_gain ON t_op_seai.<2E><><EFBFBD><EFBFBD> = t_op_gain.<2E><><EFBFBD><EFBFBD> '
|
|
|
|
|
+str+' group by '+'t_op_seai.'+bsSkinPageControl1.ActivePage.Caption
|
|
|
|
|
+' union ';
|
|
|
|
|
str:=new_query(p_aire);
|
|
|
|
|
str_get:=str_get+'SELECT COUNT(t_op_aire.<2E><><EFBFBD><EFBFBD>) as Ʊ<><C6B1>, sum(t_op_gain.<2E><><EFBFBD><EFBFBD>USD) as <20><><EFBFBD><EFBFBD>USD'
|
|
|
|
|
+', sum(t_op_gain.Ӧ<><D3A6>USD) as Ӧ<><D3A6>USD, sum( t_op_gain.Ӧ<><D3A6>USD) as Ӧ<><D3A6>USD, sum(t_op_gain.<2E><><EFBFBD><EFBFBD>RMB) as <20><><EFBFBD><EFBFBD>RMB'
|
|
|
|
|
+', sum(t_op_gain.Ӧ<><D3A6>RMB) as Ӧ<><D3A6>RMB, sum( t_op_gain.Ӧ<><D3A6>RMB) as Ӧ<><D3A6>RMB, sum(t_op_gain.ë<><C3AB><EFBFBD><EFBFBD>) as ë<><C3AB><EFBFBD><EFBFBD>'
|
|
|
|
|
+', sum(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>) as <20>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>, sum( t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>) as <20>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>'
|
|
|
|
|
+',(case when isnull(sum(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>),0)=0 then '+''''+'<27><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD>'+''''+' else '
|
|
|
|
|
+'ltrim(str(sum(t_op_gain.ë<><C3AB><EFBFBD><EFBFBD>)/sum(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>)*100,10,2))+'+''''+'%'+''''+' end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+',t_op_aire.'+bsSkinPageControl1.ActivePage.Caption+' as base'
|
|
|
|
|
+','+''''+bsSkinPageControl1.ActivePage.Caption+''''+' as ͳ<>Ʊ<EFBFBD>'
|
|
|
|
|
+','+''''+'<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'+''''+' as ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+' FROM t_op_aire LEFT JOIN'
|
|
|
|
|
+' t_op_gain ON t_op_aire.<2E><><EFBFBD><EFBFBD> = t_op_gain.<2E><><EFBFBD><EFBFBD> '
|
|
|
|
|
+str+' group by '+'t_op_aire.'+bsSkinPageControl1.ActivePage.Caption
|
|
|
|
|
+' union ';
|
|
|
|
|
str:=new_query(p_airi);
|
|
|
|
|
str_get:=str_get+'SELECT COUNT(t_op_airi.<2E><><EFBFBD><EFBFBD>) as Ʊ<><C6B1>, sum(t_op_gain.<2E><><EFBFBD><EFBFBD>USD) as <20><><EFBFBD><EFBFBD>USD'
|
|
|
|
|
+', sum(t_op_gain.Ӧ<><D3A6>USD) as Ӧ<><D3A6>USD, sum( t_op_gain.Ӧ<><D3A6>USD) as Ӧ<><D3A6>USD, sum(t_op_gain.<2E><><EFBFBD><EFBFBD>RMB) as <20><><EFBFBD><EFBFBD>RMB'
|
|
|
|
|
+', sum(t_op_gain.Ӧ<><D3A6>RMB) as Ӧ<><D3A6>RMB, sum( t_op_gain.Ӧ<><D3A6>RMB) as Ӧ<><D3A6>RMB, sum(t_op_gain.ë<><C3AB><EFBFBD><EFBFBD>) as ë<><C3AB><EFBFBD><EFBFBD>'
|
|
|
|
|
+', sum(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>) as <20>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>, sum( t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>) as <20>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>'
|
|
|
|
|
+',(case when isnull(sum(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>),0)=0 then '+''''+'<27><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD>'+''''+' else '
|
|
|
|
|
+'ltrim(str(sum(t_op_gain.ë<><C3AB><EFBFBD><EFBFBD>)/sum(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>)*100,10,2))+'+''''+'%'+''''+' end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+',t_op_airi.'+bsSkinPageControl1.ActivePage.Caption+' as base'
|
|
|
|
|
+','+''''+bsSkinPageControl1.ActivePage.Caption+''''+' as ͳ<>Ʊ<EFBFBD>'
|
|
|
|
|
+','+''''+'<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>'+''''+' as ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+' FROM t_op_airi LEFT JOIN'
|
|
|
|
|
+' t_op_gain ON t_op_airi.<2E><><EFBFBD><EFBFBD> = t_op_gain.<2E><><EFBFBD><EFBFBD> '
|
|
|
|
|
+str+' group by '+'t_op_airi.'+bsSkinPageControl1.ActivePage.Caption;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
p_sum.close;
|
|
|
|
|
p_sum.Parameters.ParamByName('SQLStr').Value:=str_get;
|
|
|
|
|
p_sum.open;
|
|
|
|
|
end;
|
|
|
|
|
except
|
|
|
|
|
;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_rp_total.bsSkinButton9Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
sys_print('ҵ<><D2B5><EFBFBD>ۺ<EFBFBD>ͳ<EFBFBD><CDB3>',2,nil,nil,nil,nil,p_seae1,p_seai1,p_aire1,p_airi1,t_sum1,nil,nil);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_rp_total.N10Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if bsSkinTabSheet1.Showing then
|
|
|
|
|
begin
|
|
|
|
|
if bsSkinTabSheet11.Showing then
|
|
|
|
|
begin
|
|
|
|
|
update_grid_view_no(dxdbgrid1);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet12.Showing then
|
|
|
|
|
begin
|
|
|
|
|
update_grid_view_no(dxdbgrid2);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet13.Showing then
|
|
|
|
|
begin
|
|
|
|
|
update_grid_view_no(dxdbgrid3);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet14.Showing then
|
|
|
|
|
begin
|
|
|
|
|
update_grid_view_no(dxdbgrid4);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet2.Showing then
|
|
|
|
|
begin
|
|
|
|
|
update_grid_view_no(dxdbgrid5);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet3.Showing then
|
|
|
|
|
begin
|
|
|
|
|
update_grid_view_no(dxdbgrid6);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet4.Showing then
|
|
|
|
|
begin
|
|
|
|
|
update_grid_view_no(dxdbgrid7);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet5.Showing then
|
|
|
|
|
begin
|
|
|
|
|
update_grid_view_no(dxdbgrid8);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet6.Showing then
|
|
|
|
|
begin
|
|
|
|
|
update_grid_view_no(dxdbgrid9);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_rp_total.N14Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if bsSkinTabSheet1.Showing then
|
|
|
|
|
begin
|
|
|
|
|
if bsSkinTabSheet11.Showing then
|
|
|
|
|
begin
|
|
|
|
|
update_grid_view_all(dxdbgrid1);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet12.Showing then
|
|
|
|
|
begin
|
|
|
|
|
update_grid_view_all(dxdbgrid2);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet13.Showing then
|
|
|
|
|
begin
|
|
|
|
|
update_grid_view_all(dxdbgrid3);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet14.Showing then
|
|
|
|
|
begin
|
|
|
|
|
update_grid_view_all(dxdbgrid4);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet2.Showing then
|
|
|
|
|
begin
|
|
|
|
|
update_grid_view_all(dxdbgrid5);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet3.Showing then
|
|
|
|
|
begin
|
|
|
|
|
update_grid_view_all(dxdbgrid6);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet4.Showing then
|
|
|
|
|
begin
|
|
|
|
|
update_grid_view_all(dxdbgrid7);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet5.Showing then
|
|
|
|
|
begin
|
|
|
|
|
update_grid_view_all(dxdbgrid8);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet6.Showing then
|
|
|
|
|
begin
|
|
|
|
|
update_grid_view_all(dxdbgrid9);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_rp_total.N12Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if bsSkinTabSheet1.Showing then
|
|
|
|
|
begin
|
|
|
|
|
if bsSkinTabSheet11.Showing then
|
|
|
|
|
begin
|
|
|
|
|
update_grid(dxdbgrid1,87);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet12.Showing then
|
|
|
|
|
begin
|
|
|
|
|
update_grid(dxdbgrid2,88);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet13.Showing then
|
|
|
|
|
begin
|
|
|
|
|
update_grid(dxdbgrid3,89);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet14.Showing then
|
|
|
|
|
begin
|
|
|
|
|
update_grid(dxdbgrid4,90);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet2.Showing then
|
|
|
|
|
begin
|
|
|
|
|
update_grid(dxdbgrid5,91);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet3.Showing then
|
|
|
|
|
begin
|
|
|
|
|
update_grid(dxdbgrid6,92);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet4.Showing then
|
|
|
|
|
begin
|
|
|
|
|
update_grid(dxdbgrid7,93);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet5.Showing then
|
|
|
|
|
begin
|
|
|
|
|
update_grid(dxdbgrid8,94);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet6.Showing then
|
|
|
|
|
begin
|
|
|
|
|
update_grid(dxdbgrid9,95);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_rp_total.N16Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if bsSkinTabSheet1.Showing then
|
|
|
|
|
begin
|
|
|
|
|
if bsSkinTabSheet11.Showing then
|
|
|
|
|
begin
|
|
|
|
|
grid_save_xls(dxdbgrid1);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet12.Showing then
|
|
|
|
|
begin
|
|
|
|
|
grid_save_xls(dxdbgrid2);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet13.Showing then
|
|
|
|
|
begin
|
|
|
|
|
grid_save_xls(dxdbgrid3);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet14.Showing then
|
|
|
|
|
begin
|
|
|
|
|
grid_save_xls(dxdbgrid4);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet2.Showing then
|
|
|
|
|
begin
|
|
|
|
|
grid_save_xls(dxdbgrid5);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet3.Showing then
|
|
|
|
|
begin
|
|
|
|
|
grid_save_xls(dxdbgrid6);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet4.Showing then
|
|
|
|
|
begin
|
|
|
|
|
grid_save_xls(dxdbgrid7);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet5.Showing then
|
|
|
|
|
begin
|
|
|
|
|
grid_save_xls(dxdbgrid8);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinTabSheet6.Showing then
|
|
|
|
|
begin
|
|
|
|
|
grid_save_xls(dxdbgrid9);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_rp_total.dxDBGrid1ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
begin
|
|
|
|
|
Column_sort_pro(Column,p_seae,'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_rp_total.dxDBGrid2ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
begin
|
|
|
|
|
Column_sort_pro(Column,p_seai,'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_rp_total.dxDBGrid3ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
begin
|
|
|
|
|
Column_sort_pro(Column,p_aire,'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_rp_total.dxDBGrid4ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
begin
|
|
|
|
|
Column_sort_pro(Column,p_airi,'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_rp_total.dxDBGrid5ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
begin
|
|
|
|
|
Column_sort_pro(Column,p_sum,'base');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_rp_total.dxDBGrid6ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
begin
|
|
|
|
|
Column_sort_pro(Column,p_sum,'base');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_rp_total.dxDBGrid7ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
begin
|
|
|
|
|
Column_sort_pro(Column,p_sum,'base');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_rp_total.dxDBGrid8ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
begin
|
|
|
|
|
Column_sort_pro(Column,p_sum,'base');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_rp_total.dxDBGrid9ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
begin
|
|
|
|
|
Column_sort_pro(Column,p_sum,'base');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end.
|