|
|
unit u_rp_opxs;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, DB, ADODB, ComCtrls, bsSkinTabs, bsSkinCtrls, dxExEdtr,
|
|
|
dxCntner, dxTL, dxDBCtrl, dxDBGrid, StdCtrls, wwdbdatetimepicker,Clipbrd,
|
|
|
RxLookup, Mask, wwdbedit, Wwdotdot, Wwdbcomb, dxDBTLCl, dxGrClms, Menus;
|
|
|
|
|
|
type
|
|
|
Tfrm_rp_opxs = class(TForm)
|
|
|
bsSkinPageControl1: TbsSkinPageControl;
|
|
|
bsSkinTabSheet1: TbsSkinTabSheet;
|
|
|
bsSkinTabSheet2: TbsSkinTabSheet;
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
Label10: TLabel;
|
|
|
Label4: TLabel;
|
|
|
Label5: TLabel;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
RxDBLookupCombo4: TRxDBLookupCombo;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
Label3: TLabel;
|
|
|
RxDBLookupCombo1: TRxDBLookupCombo;
|
|
|
Label20: TLabel;
|
|
|
wwDBDateTimePicker8: TwwDBDateTimePicker;
|
|
|
Label21: TLabel;
|
|
|
wwDBDateTimePicker9: TwwDBDateTimePicker;
|
|
|
Label6: TLabel;
|
|
|
Edit2: TEdit;
|
|
|
bsSkinButton8: TbsSkinButton;
|
|
|
t_op_opxs1: TDataSource;
|
|
|
t_op_opxs: TADOQuery;
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
Label2: TLabel;
|
|
|
Label8: TLabel;
|
|
|
Label9: TLabel;
|
|
|
Label11: TLabel;
|
|
|
Label12: TLabel;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
RxDBLookupCombo2: TRxDBLookupCombo;
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
RxDBLookupCombo3: TRxDBLookupCombo;
|
|
|
wwDBDateTimePicker5: TwwDBDateTimePicker;
|
|
|
wwDBDateTimePicker6: TwwDBDateTimePicker;
|
|
|
Edit1: TEdit;
|
|
|
bsSkinButton7: TbsSkinButton;
|
|
|
Label13: TLabel;
|
|
|
RxDBLookupCombo5: TRxDBLookupCombo;
|
|
|
Label1: TLabel;
|
|
|
t_op_opxs21: TDataSource;
|
|
|
t_op_opxs2: TADOQuery;
|
|
|
ADOQuery1: TADOQuery;
|
|
|
dxDBGrid3: TdxDBGrid;
|
|
|
dxDBGrid3Column1: TdxDBGridColumn;
|
|
|
dxDBGrid3Column2: TdxDBGridColumn;
|
|
|
dxDBGrid3Column3: TdxDBGridColumn;
|
|
|
dxDBGrid3Column4: TdxDBGridColumn;
|
|
|
dxDBGrid3Column5: TdxDBGridColumn;
|
|
|
dxDBGrid3Column6: TdxDBGridColumn;
|
|
|
dxDBGrid3Column7: TdxDBGridColumn;
|
|
|
dxDBGrid3Column8: TdxDBGridColumn;
|
|
|
dxDBGrid3Column9: TdxDBGridColumn;
|
|
|
dxDBGrid3Column10: TdxDBGridColumn;
|
|
|
dxDBGrid3Column11: TdxDBGridColumn;
|
|
|
dxDBGrid3Column12: TdxDBGridColumn;
|
|
|
dxDBGrid3Column13: TdxDBGridColumn;
|
|
|
dxDBGrid3Column14: TdxDBGridColumn;
|
|
|
dxDBGrid3Column15: TdxDBGridColumn;
|
|
|
dxDBGrid3Column16: TdxDBGridColumn;
|
|
|
dxDBGrid3Column17: TdxDBGridColumn;
|
|
|
dxDBGrid3Column18: TdxDBGridColumn;
|
|
|
dxDBGrid3Column19: TdxDBGridColumn;
|
|
|
dxDBGrid3Column20: TdxDBGridColumn;
|
|
|
dxDBGrid3Column21: TdxDBGridColumn;
|
|
|
dxDBGrid3Column22: TdxDBGridColumn;
|
|
|
dxDBGrid3Column23: TdxDBGridColumn;
|
|
|
dxDBGrid3Column24: TdxDBGridColumn;
|
|
|
dxDBGrid3Column25: TdxDBGridColumn;
|
|
|
dxDBGrid3Column26: TdxDBGridColumn;
|
|
|
dxDBGrid3Column27: TdxDBGridColumn;
|
|
|
dxDBGrid3Column28: TdxDBGridColumn;
|
|
|
dxDBGrid3Column29: TdxDBGridColumn;
|
|
|
dxDBGrid3Column30: TdxDBGridColumn;
|
|
|
dxDBGrid3Column31: TdxDBGridColumn;
|
|
|
dxDBGrid3Column32: TdxDBGridColumn;
|
|
|
dxDBGrid3Column33: TdxDBGridColumn;
|
|
|
dxDBGrid3Column34: TdxDBGridColumn;
|
|
|
dxDBGrid3Column35: TdxDBGridColumn;
|
|
|
dxDBGrid3Column36: TdxDBGridColumn;
|
|
|
dxDBGrid3Column37: TdxDBGridColumn;
|
|
|
dxDBGrid3Column38: TdxDBGridColumn;
|
|
|
dxDBGrid3Column39: TdxDBGridColumn;
|
|
|
dxDBGrid3Column40: TdxDBGridColumn;
|
|
|
PopupMenu2: TPopupMenu;
|
|
|
N42: TMenuItem;
|
|
|
PopupMenu1: TPopupMenu;
|
|
|
MenuItem1: TMenuItem;
|
|
|
N1: TMenuItem;
|
|
|
N2: TMenuItem;
|
|
|
N3: TMenuItem;
|
|
|
N4: TMenuItem;
|
|
|
t_tc_module: TADOQuery;
|
|
|
t_tc_module1: TDataSource;
|
|
|
RxDBLookupCombo6: TRxDBLookupCombo;
|
|
|
dxDBGrid3Column41: TdxDBGridColumn;
|
|
|
N5: TMenuItem;
|
|
|
N6: TMenuItem;
|
|
|
N7: TMenuItem;
|
|
|
N8: TMenuItem;
|
|
|
N9: TMenuItem;
|
|
|
N10: TMenuItem;
|
|
|
N11: TMenuItem;
|
|
|
N12: TMenuItem;
|
|
|
t_op_opxs_ms1: TDataSource;
|
|
|
t_op_opxs_ms: TADOQuery;
|
|
|
RxDBLookupCombo12: TRxDBLookupCombo;
|
|
|
Label23: TLabel;
|
|
|
dxDBGrid3Column42: TdxDBGridColumn;
|
|
|
dxDBGrid3Column43: TdxDBGridColumn;
|
|
|
dxDBGrid3Column44: TdxDBGridColumn;
|
|
|
dxDBGrid3Column45: TdxDBGridColumn;
|
|
|
dxDBGrid3Column46: TdxDBGridColumn;
|
|
|
Label7: TLabel;
|
|
|
RxDBLookupCombo7: TRxDBLookupCombo;
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
bsSkinButton11: TbsSkinButton;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
dxDBGridColumn42: TdxDBGridColumn;
|
|
|
dxDBGridColumn43: TdxDBGridColumn;
|
|
|
dxDBGridColumn44: TdxDBGridColumn;
|
|
|
dxDBGridColumn45: TdxDBGridColumn;
|
|
|
dxDBGridColumn46: TdxDBGridColumn;
|
|
|
dxDBGridColumn47: TdxDBGridColumn;
|
|
|
dxDBGridColumn48: TdxDBGridColumn;
|
|
|
dxDBGridColumn49: TdxDBGridColumn;
|
|
|
dxDBGridColumn50: TdxDBGridColumn;
|
|
|
dxDBGridColumn51: TdxDBGridColumn;
|
|
|
dxDBGridColumn52: TdxDBGridColumn;
|
|
|
dxDBGridColumn53: TdxDBGridColumn;
|
|
|
dxDBGridColumn54: TdxDBGridColumn;
|
|
|
dxDBGridColumn55: TdxDBGridColumn;
|
|
|
dxDBGridColumn56: TdxDBGridColumn;
|
|
|
dxDBGridColumn57: TdxDBGridColumn;
|
|
|
dxDBGridColumn58: TdxDBGridColumn;
|
|
|
dxDBGridColumn59: TdxDBGridColumn;
|
|
|
dxDBGridColumn60: TdxDBGridColumn;
|
|
|
dxDBGridColumn61: TdxDBGridColumn;
|
|
|
dxDBGridColumn62: TdxDBGridColumn;
|
|
|
dxDBGridColumn63: TdxDBGridColumn;
|
|
|
dxDBGridColumn64: TdxDBGridColumn;
|
|
|
dxDBGridColumn65: TdxDBGridColumn;
|
|
|
dxDBGridColumn66: TdxDBGridColumn;
|
|
|
dxDBGridColumn67: TdxDBGridColumn;
|
|
|
dxDBGridColumn68: TdxDBGridColumn;
|
|
|
dxDBGridColumn69: TdxDBGridColumn;
|
|
|
dxDBGridColumn70: TdxDBGridColumn;
|
|
|
dxDBGridColumn71: TdxDBGridColumn;
|
|
|
dxDBGridColumn72: TdxDBGridColumn;
|
|
|
dxDBGridColumn73: TdxDBGridColumn;
|
|
|
dxDBGridColumn74: TdxDBGridColumn;
|
|
|
dxDBGridColumn75: TdxDBGridColumn;
|
|
|
dxDBGridColumn76: TdxDBGridColumn;
|
|
|
dxDBGridColumn77: TdxDBGridColumn;
|
|
|
dxDBGridColumn78: TdxDBGridColumn;
|
|
|
dxDBGridColumn79: TdxDBGridColumn;
|
|
|
dxDBGridColumn80: TdxDBGridColumn;
|
|
|
dxDBGridColumn81: TdxDBGridColumn;
|
|
|
dxDBGridColumn82: TdxDBGridColumn;
|
|
|
dxDBGridColumn83: TdxDBGridColumn;
|
|
|
dxDBGridColumn84: TdxDBGridColumn;
|
|
|
dxDBGridColumn85: TdxDBGridColumn;
|
|
|
dxDBGridColumn86: TdxDBGridColumn;
|
|
|
dxDBGridColumn87: TdxDBGridColumn;
|
|
|
t_op_opxs_sum: TADOQuery;
|
|
|
t_op_opxs_sum1: TDataSource;
|
|
|
N13: TMenuItem;
|
|
|
N14: TMenuItem;
|
|
|
t_op_opxs_sum21: TDataSource;
|
|
|
t_op_opxs_sum2: TADOQuery;
|
|
|
bsSkinButton12: TbsSkinButton;
|
|
|
dxDBGrid2: TdxDBGrid;
|
|
|
dxDBGrid2Column1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column2: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column25: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column26: TdxDBGridColumn;
|
|
|
dxDBGrid4: TdxDBGrid;
|
|
|
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn2: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn3: TdxDBGridMaskColumn;
|
|
|
dxDBGridColumn1: TdxDBGridColumn;
|
|
|
PopupMenu3: TPopupMenu;
|
|
|
MenuItem6: TMenuItem;
|
|
|
PopupMenu4: TPopupMenu;
|
|
|
MenuItem2: TMenuItem;
|
|
|
N15: TMenuItem;
|
|
|
N16: TMenuItem;
|
|
|
N17: TMenuItem;
|
|
|
N18: TMenuItem;
|
|
|
N19: TMenuItem;
|
|
|
N20: TMenuItem;
|
|
|
N21: TMenuItem;
|
|
|
objectN18TMenuItem1: TMenuItem;
|
|
|
N22: TMenuItem;
|
|
|
N23: TMenuItem;
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
procedure t_op_opxs2BeforePost(DataSet: TDataSet);
|
|
|
procedure N42Click(Sender: TObject);
|
|
|
procedure MenuItem1Click(Sender: TObject);
|
|
|
procedure N2Click(Sender: TObject);
|
|
|
procedure N4Click(Sender: TObject);
|
|
|
procedure FormResize(Sender: TObject);
|
|
|
procedure dxDBGrid3ColumnSorting(Sender: TObject;
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
procedure dxdbgrid12ColumnSorting(Sender: TObject;
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
procedure N6Click(Sender: TObject);
|
|
|
procedure N7Click(Sender: TObject);
|
|
|
procedure N12Click(Sender: TObject);
|
|
|
procedure N10Click(Sender: TObject);
|
|
|
procedure dxDBGrid3DblClick(Sender: TObject);
|
|
|
procedure dxDBGrid11ColumnSorting(Sender: TObject;
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
procedure dxDBGrid11DblClick(Sender: TObject);
|
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
|
procedure bsSkinButton11Click(Sender: TObject);
|
|
|
procedure t_op_opxsBeforePost(DataSet: TDataSet);
|
|
|
procedure MenuItem6Click(Sender: TObject);
|
|
|
procedure MenuItem2Click(Sender: TObject);
|
|
|
procedure N14Click(Sender: TObject);
|
|
|
procedure N16Click(Sender: TObject);
|
|
|
procedure objectN18TMenuItem1Click(Sender: TObject);
|
|
|
procedure N18Click(Sender: TObject);
|
|
|
procedure N23Click(Sender: TObject);
|
|
|
procedure N20Click(Sender: TObject);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_rp_opxs: Tfrm_rp_opxs;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_main, my_sys_function;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_rp_opxs.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.bsSkinButton10Click(Sender: TObject);
|
|
|
var
|
|
|
str1:widestring;
|
|
|
str_tiaojian:widestring;
|
|
|
begin
|
|
|
|
|
|
if RxDBLookupCombo4.DisplayValue<>''then
|
|
|
str_tiaojian:=str_tiaojian+' and t_op_opxs.<2E><><EFBFBD><EFBFBD>Ա='+''''+RxDBLookupCombo4.DisplayValues[0]+'''';
|
|
|
if RxDBLookupCombo1.DisplayValue<>''then
|
|
|
str_tiaojian:=str_tiaojian+' and t_op_opxs.<2E><>֤Ա='+''''+RxDBLookupCombo1.DisplayValues[0]+'''';
|
|
|
|
|
|
if RxDBLookupCombo5.DisplayValue<>''then
|
|
|
str_tiaojian:=str_tiaojian+' and t_op_opxs.ȷ<><C8B7><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo5.DisplayValues[0]+'''';
|
|
|
if wwDBDateTimePicker1.Text<>''then
|
|
|
str_tiaojian:=str_tiaojian+' and t_op_opxs.ȷ<><C8B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.Text+'''';
|
|
|
if wwDBDateTimePicker2.Text<>''then
|
|
|
str_tiaojian:=str_tiaojian+' and t_op_opxs.ȷ<><C8B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker2.Text+' 23:59:59''';
|
|
|
if wwDBDateTimePicker8.Text<>''then
|
|
|
str_tiaojian:=str_tiaojian+' and t_op_opxs.ʵ<>ʿ<EFBFBD><CABF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker8.Text+'''';
|
|
|
if wwDBDateTimePicker9.Text<>''then
|
|
|
str_tiaojian:=str_tiaojian+' and t_op_opxs.ʵ<>ʿ<EFBFBD><CABF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker9.Text+' 23:59:59''';
|
|
|
if RxDBLookupCombo7.DisplayValue<>''then
|
|
|
str_tiaojian:=str_tiaojian+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo7.DisplayValues[0]+'''';
|
|
|
if Edit2.text<>''then
|
|
|
str_tiaojian:=str_tiaojian+' and t_op_opxs.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5> like '+'''%'+Edit2.text+'%''';
|
|
|
str_tiaojian:=str_tiaojian+' and '+open_data('9011','t_op_opxs.<2E><><EFBFBD><EFBFBD>Ա','t_op_opxs.<2E><>֤Ա','no','no','no');
|
|
|
|
|
|
{
|
|
|
if if_open('803') and if_open('804') then begin
|
|
|
|
|
|
end else begin
|
|
|
if if_open('803') then begin
|
|
|
str_tiaojian:=str_tiaojian+' and t_op_opxs.<2E><>֤Ա='+''''+employee+'''';
|
|
|
end else if if_open('804') then begin
|
|
|
str_tiaojian:=str_tiaojian+' and t_op_opxs.<2E><><EFBFBD><EFBFBD>Ա='+''''+employee+'''';
|
|
|
end
|
|
|
|
|
|
end;
|
|
|
}
|
|
|
t_op_opxs.close;
|
|
|
t_op_opxs.sql.clear;
|
|
|
t_op_opxs.sql.add('select * from t_op_opxs where ȷ<><C8B7>״̬=''<27><>ȷ<EFBFBD><C8B7>'' '+str_tiaojian);
|
|
|
t_op_opxs.open;
|
|
|
|
|
|
t_op_opxs_sum.close;
|
|
|
t_op_opxs_sum.sql.clear;
|
|
|
t_op_opxs_sum.sql.add('SELECT <20><>Ա,sum(<28><>֤<EFBFBD>ϼ<EFBFBD>) <20><>֤<EFBFBD>ϼ<EFBFBD>,SUM(<28><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>) <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>,sum(<28><>֤<EFBFBD>ϼ<EFBFBD>+<2B><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>) <20>ܼ<EFBFBD>');
|
|
|
t_op_opxs_sum.sql.add(' from (');
|
|
|
t_op_opxs_sum.sql.add(' SELECT <20><>֤Ա <20><>Ա,sum(<28><>֤<EFBFBD>ϼ<EFBFBD>) <20><>֤<EFBFBD>ϼ<EFBFBD>, 0 <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD> from t_op_opxs where ȷ<><C8B7>״̬=''<27><>ȷ<EFBFBD><C8B7>'' '+str_tiaojian);
|
|
|
t_op_opxs_sum.sql.add(' GROUP BY <20><>֤Ա');
|
|
|
t_op_opxs_sum.sql.add(' UNION');
|
|
|
t_op_opxs_sum.sql.add(' SELECT <20><><EFBFBD><EFBFBD>Ա <20><>Ա,0 <20><>֤<EFBFBD>ϼ<EFBFBD>, SUM(<28><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>) <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD> from t_op_opxs where ȷ<><C8B7>״̬=''<27><>ȷ<EFBFBD><C8B7>'' '+str_tiaojian);
|
|
|
t_op_opxs_sum.sql.add(' GROUP BY <20><><EFBFBD><EFBFBD>Ա');
|
|
|
t_op_opxs_sum.sql.add(' ) as v');
|
|
|
t_op_opxs_sum.sql.add(' GROUP BY <20><>Ա ');
|
|
|
t_op_opxs_sum.open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.bsSkinButton9Click(Sender: TObject);
|
|
|
begin
|
|
|
sys_print('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤<EFBFBD><D6A4>Ч',2,t_op_opxs1,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.FormClose(Sender: TObject;
|
|
|
var Action: TCloseAction);
|
|
|
begin
|
|
|
savereggrid(dxdbgrid1,caption+'1');
|
|
|
savereggrid(dxdbgrid3,caption+'3');
|
|
|
frm_rp_opxs.Hide;
|
|
|
frm_rp_opxs.ManualFloat(frm_rp_opxs.BoundsRect );
|
|
|
frm_main.freeTabs('frm_rp_opxs');
|
|
|
action:=cafree;
|
|
|
frm_rp_opxs:=nil;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
loadreggrid(dxdbgrid1,false,caption+'1');
|
|
|
loadreggrid(dxdbgrid3,false,caption+'3');
|
|
|
t_tc_module.Open;
|
|
|
// bsSkinTabSheet2.TabVisible:=if_open('802');
|
|
|
dxdbgrid1.Bands[1].Visible:=if_open('803');
|
|
|
dxdbgrid1.Bands[2].Visible:=if_open('804');
|
|
|
dxdbgrid3.Bands[1].Visible:=if_open('803');
|
|
|
dxdbgrid3.Bands[2].Visible:=if_open('804');
|
|
|
N42.Visible:=if_open('802');
|
|
|
N6.Visible:=if_open('802');
|
|
|
N7.Visible:=if_open('802');
|
|
|
MenuItem1.Visible:=if_open('805');
|
|
|
|
|
|
dxDBGrid3Column1.DisableEditor:=true;
|
|
|
dxDBGrid3Column1.ReadOnly:=True;
|
|
|
dxDBGrid3Column2.DisableEditor:=true;
|
|
|
dxDBGrid3Column2.ReadOnly:=True;
|
|
|
dxDBGrid3Column3.DisableEditor:=true;
|
|
|
dxDBGrid3Column3.ReadOnly:=True;
|
|
|
dxDBGrid3Column4.DisableEditor:=true;
|
|
|
dxDBGrid3Column4.ReadOnly:=True;
|
|
|
dxDBGrid3Column5.DisableEditor:=true;
|
|
|
dxDBGrid3Column5.ReadOnly:=True;
|
|
|
dxDBGrid3Column6.DisableEditor:=true;
|
|
|
dxDBGrid3Column6.ReadOnly:=True;
|
|
|
dxDBGrid3Column7.DisableEditor:=true;
|
|
|
dxDBGrid3Column7.ReadOnly:=True;
|
|
|
dxDBGrid3Column8.DisableEditor:=true;
|
|
|
dxDBGrid3Column8.ReadOnly:=True;
|
|
|
dxDBGrid3Column9.DisableEditor:=true;
|
|
|
dxDBGrid3Column9.ReadOnly:=True;
|
|
|
dxDBGrid3Column10.DisableEditor:=true;
|
|
|
dxDBGrid3Column10.ReadOnly:=True;
|
|
|
dxDBGrid3Column11.DisableEditor:=true;
|
|
|
dxDBGrid3Column11.ReadOnly:=True;
|
|
|
dxDBGrid3Column12.DisableEditor:=true;
|
|
|
dxDBGrid3Column12.ReadOnly:=True;
|
|
|
dxDBGrid3Column13.DisableEditor:=true;
|
|
|
dxDBGrid3Column13.ReadOnly:=True;
|
|
|
dxDBGrid3Column15.DisableEditor:=true;
|
|
|
dxDBGrid3Column15.ReadOnly:=True;
|
|
|
dxDBGrid3Column16.DisableEditor:=true;
|
|
|
dxDBGrid3Column16.ReadOnly:=True;
|
|
|
dxDBGrid3Column17.DisableEditor:=true;
|
|
|
dxDBGrid3Column17.ReadOnly:=True;
|
|
|
dxDBGrid3Column18.DisableEditor:=true;
|
|
|
dxDBGrid3Column18.ReadOnly:=True;
|
|
|
dxDBGrid3Column19.DisableEditor:=true;
|
|
|
dxDBGrid3Column19.ReadOnly:=True;
|
|
|
dxDBGrid3Column20.DisableEditor:=true;
|
|
|
dxDBGrid3Column20.ReadOnly:=True;
|
|
|
dxDBGrid3Column21.DisableEditor:=true;
|
|
|
dxDBGrid3Column21.ReadOnly:=True;
|
|
|
dxDBGrid3Column22.DisableEditor:=true;
|
|
|
dxDBGrid3Column22.ReadOnly:=True;
|
|
|
dxDBGrid3Column23.DisableEditor:=true;
|
|
|
dxDBGrid3Column23.ReadOnly:=True;
|
|
|
dxDBGrid3Column25.DisableEditor:=true;
|
|
|
dxDBGrid3Column25.ReadOnly:=True;
|
|
|
dxDBGrid3Column26.DisableEditor:=true;
|
|
|
dxDBGrid3Column26.ReadOnly:=True;
|
|
|
dxDBGrid3Column27.DisableEditor:=true;
|
|
|
dxDBGrid3Column27.ReadOnly:=True;
|
|
|
dxDBGrid3Column28.DisableEditor:=true;
|
|
|
dxDBGrid3Column28.ReadOnly:=True;
|
|
|
dxDBGrid3Column29.DisableEditor:=true;
|
|
|
dxDBGrid3Column29.ReadOnly:=True;
|
|
|
dxDBGrid3Column30.DisableEditor:=true;
|
|
|
dxDBGrid3Column30.ReadOnly:=True;
|
|
|
dxDBGrid3Column31.DisableEditor:=true;
|
|
|
dxDBGrid3Column31.ReadOnly:=True;
|
|
|
dxDBGrid3Column32.DisableEditor:=true;
|
|
|
dxDBGrid3Column32.ReadOnly:=True;
|
|
|
dxDBGrid3Column33.DisableEditor:=true;
|
|
|
dxDBGrid3Column33.ReadOnly:=True;
|
|
|
dxDBGrid3Column34.DisableEditor:=true;
|
|
|
dxDBGrid3Column34.ReadOnly:=True;
|
|
|
// dxDBGrid3Column35.DisableEditor:=true;
|
|
|
// dxDBGrid3Column35.ReadOnly:=True;
|
|
|
// dxDBGrid3Column36.DisableEditor:=true;
|
|
|
// dxDBGrid3Column36.ReadOnly:=True;
|
|
|
dxDBGrid3Column37.DisableEditor:=true;
|
|
|
dxDBGrid3Column37.ReadOnly:=True;
|
|
|
dxDBGrid3Column38.DisableEditor:=true;
|
|
|
dxDBGrid3Column38.ReadOnly:=True;
|
|
|
dxDBGrid3Column39.DisableEditor:=true;
|
|
|
dxDBGrid3Column39.ReadOnly:=True;
|
|
|
|
|
|
dxDBGrid3Column40.DisableEditor:=true;
|
|
|
dxDBGrid3Column40.ReadOnly:=True;
|
|
|
|
|
|
|
|
|
{
|
|
|
dxDBGrid3Column14.DisableEditor:=true;
|
|
|
dxDBGrid3Column24.DisableEditor:=true;
|
|
|
dxDBGrid3Column34.DisableEditor:=true;
|
|
|
dxDBGrid3Column13.ReadOnly:=True;
|
|
|
}
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.bsSkinButton1Click(Sender: TObject);
|
|
|
begin
|
|
|
RxDBLookupCombo2.ClearValue;
|
|
|
RxDBLookupCombo4.ClearValue;
|
|
|
wwDBDateTimePicker1.text:='';
|
|
|
wwDBDateTimePicker2.text:='';
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.bsSkinButton2Click(Sender: TObject);
|
|
|
var
|
|
|
str1:widestring;
|
|
|
str_tiaojian,str_tiaojian2:widestring;
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (RxDBLookupCombo6.DisplayValues[0]='') then begin
|
|
|
ShowMessage('<27><>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
|
|
|
Exit;
|
|
|
end;
|
|
|
|
|
|
if wwDBDateTimePicker5.Text<>''then
|
|
|
str_tiaojian:=str_tiaojian+' and ʵ<>ʿ<EFBFBD><CABF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker5.Text+'''';
|
|
|
if wwDBDateTimePicker6.Text<>''then
|
|
|
str_tiaojian:=str_tiaojian+' and ʵ<>ʿ<EFBFBD><CABF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker6.Text+' 23:59:59''';
|
|
|
|
|
|
if RxDBLookupCombo2.DisplayValue<>''then
|
|
|
str_tiaojian:=str_tiaojian+' and <20><><EFBFBD><EFBFBD>Ա='+''''+RxDBLookupCombo2.DisplayValues[0]+'''';
|
|
|
if RxDBLookupCombo3.DisplayValue<>''then
|
|
|
str_tiaojian:=str_tiaojian+' and <20><>֤Ա='+''''+RxDBLookupCombo3.DisplayValues[0]+'''';
|
|
|
if RxDBLookupCombo12.DisplayValue<>''then
|
|
|
str_tiaojian:=str_tiaojian+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo12.DisplayValues[0]+'''';
|
|
|
|
|
|
|
|
|
str_tiaojian:=str_tiaojian+' and '+open_data('9011','<27><><EFBFBD><EFBFBD>Ա','<27><>֤Ա','no','no','no');
|
|
|
{
|
|
|
if if_open('803') and if_open('804') then begin
|
|
|
|
|
|
end else begin
|
|
|
if if_open('803') then begin
|
|
|
str_tiaojian:=str_tiaojian+' and <20><>֤Ա='+''''+employee+'''';
|
|
|
end else if if_open('804') then begin
|
|
|
str_tiaojian:=str_tiaojian+' and <20><><EFBFBD><EFBFBD>Ա='+''''+employee+'''';
|
|
|
end
|
|
|
|
|
|
end;
|
|
|
}
|
|
|
|
|
|
if Edit1.text<>''then
|
|
|
str_tiaojian:=str_tiaojian+' and <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5> like '+'''%'+Edit1.text+'%''';
|
|
|
str_tiaojian2:=str_tiaojian2+' and NOT EXISTS (select 1 from t_op_opxs WHERE '+RxDBLookupCombo6.DisplayValues[0]+'.<2E><><EFBFBD><EFBFBD>=t_op_opxs.<2E><><EFBFBD><EFBFBD>) ';
|
|
|
|
|
|
ADOQuery1.close;
|
|
|
ADOQuery1.sql.clear;
|
|
|
ADOQuery1.sql.add('delete from t_op_opxs where isnull(ȷ<><C8B7>״̬,'''')<>''<27><>ȷ<EFBFBD><C8B7>'' '+str_tiaojian);
|
|
|
ADOQuery1.ExecSQL;
|
|
|
|
|
|
ADOQuery1.close;
|
|
|
ADOQuery1.sql.clear;
|
|
|
ADOQuery1.sql.add('insert into t_op_opxs([<5B><><EFBFBD><EFBFBD>],[<5B><><EFBFBD>ᵥ<EFBFBD><E1B5A5>],[ί<>б<EFBFBD><D0B1><EFBFBD>],[¼<><C2BC><EFBFBD><EFBFBD>],[¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>],[<5B><><EFBFBD><EFBFBD>Ա],[<5B>ͷ<EFBFBD>Ա],[<5B><>֤Ա],[ί<>е<EFBFBD>λ],[װ<><D7B0><EFBFBD><EFBFBD>],[ж<><D0B6><EFBFBD><EFBFBD>],[<5B><>װ<EFBFBD><D7B0>],[ʵ<>ʿ<EFBFBD><CABF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]');
|
|
|
ADOQuery1.sql.add(',[<5B><>֤],[<5B><>֤<EFBFBD><D6A4>],[DOC<4F>ֵ<EFBFBD><D6B5><EFBFBD>],[DOC<4F><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>],[<5B><>֤<EFBFBD>ϼ<EFBFBD>],[<5B><><EFBFBD><EFBFBD>],[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>],[<5B>ɳ<EFBFBD><C9B3><EFBFBD>],[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>],[<5B><><EFBFBD>ط<EFBFBD>],[<5B>̼<EFBFBD><CCBC><EFBFBD>],[<5B><><EFBFBD><EFBFBD>֤<EFBFBD><D6A4>]');
|
|
|
ADOQuery1.sql.add(',[Ѭ<><D1AC>֤<EFBFBD><D6A4>],[COA<4F><41>],[<5B><><EFBFBD>շ<EFBFBD>],[<5B>ͻ<EFBFBD><CDBB>ȼ<EFBFBD><C8BC><EFBFBD><EFBFBD><EFBFBD>],[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>],[<5B><><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>],[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>],[Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>],[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>걨װ<EAB1A8><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]');
|
|
|
ADOQuery1.sql.add(',[<5B>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD>],[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>],[<5B><><EFBFBD><EFBFBD><EFBFBD>ɳ<EFBFBD><C9B3><EFBFBD><EFBFBD><EFBFBD>],[<5B><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>],<2C><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>,<2C><>Чģ<D0A7><C4A3>,<2C><>֤<EFBFBD><D6A4><EFBFBD>ƶ<EFBFBD><C6B6><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƶ<EFBFBD><C6B6><EFBFBD>,ȷ<><C8B7>״̬,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>յ<EFBFBD><D5B5><EFBFBD>,VGM,СƱ<D0A1><C6B1>,<2C>ϼ<EFBFBD>)');
|
|
|
ADOQuery1.sql.add('select');
|
|
|
ADOQuery1.sql.add('[<5B><><EFBFBD><EFBFBD>],[<5B><><EFBFBD>ᵥ<EFBFBD><E1B5A5>],[ί<>б<EFBFBD><D0B1><EFBFBD>],'''+employee+''',GETDATE(),[<5B><><EFBFBD><EFBFBD>Ա],[<5B>ͷ<EFBFBD>Ա],[<5B><>֤Ա],[ί<>е<EFBFBD>λ],[װ<><D7B0><EFBFBD><EFBFBD>],[ж<><D0B6><EFBFBD><EFBFBD>],[<5B><>װ<EFBFBD><D7B0>],[ʵ<>ʿ<EFBFBD><CABF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]');
|
|
|
ADOQuery1.sql.add(',[<5B><>֤],[<5B><>֤<EFBFBD><D6A4>],[DOC<4F>ֵ<EFBFBD><D6B5><EFBFBD>],[DOC<4F><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>],[<5B><>֤<EFBFBD><D6A4>]+[DOC<4F>ֵ<EFBFBD><D6B5><EFBFBD>]+[DOC<4F><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]+<2B>յ<EFBFBD><D5B5><EFBFBD>+VGM,[<5B><><EFBFBD><EFBFBD>],[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>],[<5B>ɳ<EFBFBD><C9B3><EFBFBD>],[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>],[<5B><><EFBFBD>ط<EFBFBD>],[<5B>̼<EFBFBD><CCBC><EFBFBD>],[<5B><><EFBFBD><EFBFBD>֤<EFBFBD><D6A4>]');
|
|
|
ADOQuery1.sql.add(',[Ѭ<><D1AC>֤<EFBFBD><D6A4>],[COA<4F><41>],[<5B><><EFBFBD>շ<EFBFBD>],[<5B>ͻ<EFBFBD><CDBB>ȼ<EFBFBD><C8BC><EFBFBD><EFBFBD><EFBFBD>],[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>],[<5B><><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>],[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>],[Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>],[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>걨װ<EAB1A8><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]');
|
|
|
ADOQuery1.sql.add(',[<5B>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD>],[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>],[<5B><><EFBFBD><EFBFBD><EFBFBD>ɳ<EFBFBD><C9B3><EFBFBD><EFBFBD><EFBFBD>],[<5B><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>],([<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]+[<5B>ɳ<EFBFBD><C9B3><EFBFBD>]+[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]+[<5B><><EFBFBD>ط<EFBFBD>]+[<5B>̼<EFBFBD><CCBC><EFBFBD>]+[<5B><><EFBFBD><EFBFBD>֤<EFBFBD><D6A4>]');
|
|
|
ADOQuery1.sql.add('+[Ѭ<><D1AC>֤<EFBFBD><D6A4>]+[COA<4F><41>]+[<5B><><EFBFBD>շ<EFBFBD>]+[<5B>ͻ<EFBFBD><CDBB>ȼ<EFBFBD><C8BC><EFBFBD><EFBFBD><EFBFBD>]+[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]+[<5B><><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]+[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]+[Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>]+[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>걨װ<EAB1A8><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]');
|
|
|
ADOQuery1.sql.add('+[<5B>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD>]+[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]+[<5B><><EFBFBD><EFBFBD><EFBFBD>ɳ<EFBFBD><C9B3><EFBFBD><EFBFBD><EFBFBD>]+[<5B><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]+[<5B><><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0>]+[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]+СƱ<D0A1><C6B1>),'''+RxDBLookupCombo6.DisplayValues[0]+''',<2C><>֤<EFBFBD><D6A4><EFBFBD>ƶ<EFBFBD><C6B6><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƶ<EFBFBD><C6B6><EFBFBD>,'''',<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>յ<EFBFBD><D5B5><EFBFBD>,VGM,СƱ<D0A1><C6B1>');
|
|
|
ADOQuery1.sql.add(',([<5B><>֤<EFBFBD><D6A4>]+[DOC<4F>ֵ<EFBFBD><D6B5><EFBFBD>]+[DOC<4F><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]+[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]+[<5B>ɳ<EFBFBD><C9B3><EFBFBD>]+[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]+[<5B><><EFBFBD>ط<EFBFBD>]+[<5B>̼<EFBFBD><CCBC><EFBFBD>]+[<5B><><EFBFBD><EFBFBD>֤<EFBFBD><D6A4>]');
|
|
|
ADOQuery1.sql.add('+[Ѭ<><D1AC>֤<EFBFBD><D6A4>]+[COA<4F><41>]+[<5B><><EFBFBD>շ<EFBFBD>]+[<5B>ͻ<EFBFBD><CDBB>ȼ<EFBFBD><C8BC><EFBFBD><EFBFBD><EFBFBD>]+[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]+[<5B><><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]+[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]+[Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>]+[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>걨װ<EAB1A8><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]');
|
|
|
ADOQuery1.sql.add('+[<5B>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD>]+[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]+[<5B><><EFBFBD><EFBFBD><EFBFBD>ɳ<EFBFBD><C9B3><EFBFBD><EFBFBD><EFBFBD>]+[<5B><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]+[<5B><><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0>]+[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]+<2B>յ<EFBFBD><D5B5><EFBFBD>+VGM+СƱ<D0A1><C6B1>)');
|
|
|
|
|
|
|
|
|
ADOQuery1.sql.add(' from '+RxDBLookupCombo6.DisplayValues[0]+' where 1=1 '+str_tiaojian+str_tiaojian2);
|
|
|
ADOQuery1.ExecSQL;
|
|
|
{
|
|
|
ADOQuery1.First;
|
|
|
while not ADOQuery1.Eof do begin
|
|
|
t_op_opxs2.Insert;
|
|
|
t_op_opxs2['<27><><EFBFBD><EFBFBD>']:=ADOQuery1['<27><><EFBFBD><EFBFBD>'];
|
|
|
t_op_opxs2['ȷ<><C8B7>״̬']:='δȷ<CEB4><C8B7>';
|
|
|
t_op_opxs2['<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>']:=ADOQuery1['<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>'];
|
|
|
t_op_opxs2['ί<>б<EFBFBD><D0B1><EFBFBD>']:=ADOQuery1['ί<>б<EFBFBD><D0B1><EFBFBD>'];
|
|
|
t_op_opxs2['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_op_opxs2['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=Date;
|
|
|
t_op_opxs2['<27><><EFBFBD><EFBFBD>Ա']:=ADOQuery1['<27><><EFBFBD><EFBFBD>Ա'];
|
|
|
t_op_opxs2['<27>ͷ<EFBFBD>Ա']:=ADOQuery1['<27>ͷ<EFBFBD>Ա'];
|
|
|
t_op_opxs2['<27><>֤Ա']:=ADOQuery1['<27><>֤Ա'];
|
|
|
t_op_opxs2['ί<>е<EFBFBD>λ']:=ADOQuery1['ί<>е<EFBFBD>λ'];
|
|
|
t_op_opxs2['װ<><D7B0><EFBFBD><EFBFBD>']:=ADOQuery1['װ<><D7B0><EFBFBD><EFBFBD>'];
|
|
|
t_op_opxs2['ж<><D0B6><EFBFBD><EFBFBD>']:=ADOQuery1['ж<><D0B6><EFBFBD><EFBFBD>'];
|
|
|
t_op_opxs2['<27><>װ<EFBFBD><D7B0>']:=ADOQuery1['<27><>װ<EFBFBD><D7B0>'];
|
|
|
t_op_opxs2['ʵ<>ʿ<EFBFBD><CABF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=ADOQuery1['ʵ<>ʿ<EFBFBD><CABF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_opxs2['<27><>֤']:=ADOQuery1['<27><>֤'];
|
|
|
t_op_opxs2['<27><>֤<EFBFBD><D6A4>']:=ADOQuery1['<27><>֤<EFBFBD><D6A4>'];
|
|
|
t_op_opxs2['DOC<4F><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=ADOQuery1['DOC<4F><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_opxs2['DOC<4F>ֵ<EFBFBD><D6B5><EFBFBD>']:=ADOQuery1['DOC<4F>ֵ<EFBFBD><D6B5><EFBFBD>'];
|
|
|
// t_op_opxs2['<27><>֤<EFBFBD>ϼ<EFBFBD>']:=t_op_opxs2['<27><>֤<EFBFBD><D6A4>']+ t_op_opxs2['DOC<4F><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+t_op_opxs2['DOC<4F>ֵ<EFBFBD><D6B5><EFBFBD>'];
|
|
|
t_op_opxs2['<27><><EFBFBD><EFBFBD>']:=ADOQuery1['<27><><EFBFBD><EFBFBD>'];
|
|
|
t_op_opxs2['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=ADOQuery1['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_opxs2['<27>ɳ<EFBFBD><C9B3><EFBFBD>']:=ADOQuery1['<27>ɳ<EFBFBD><C9B3><EFBFBD>'];
|
|
|
t_op_opxs2['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=ADOQuery1['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_opxs2['<27><><EFBFBD>ط<EFBFBD>']:=ADOQuery1['<27><><EFBFBD>ط<EFBFBD>'];
|
|
|
t_op_opxs2['<27>̼<EFBFBD><CCBC><EFBFBD>']:=ADOQuery1['<27>̼<EFBFBD><CCBC><EFBFBD>'];
|
|
|
t_op_opxs2['<27><><EFBFBD><EFBFBD>֤<EFBFBD><D6A4>']:=ADOQuery1['<27><><EFBFBD><EFBFBD>֤<EFBFBD><D6A4>'];
|
|
|
t_op_opxs2['Ѭ<><D1AC>֤<EFBFBD><D6A4>']:=ADOQuery1['Ѭ<><D1AC>֤<EFBFBD><D6A4>'];
|
|
|
t_op_opxs2['COA<4F><41>']:=ADOQuery1['COA<4F><41>'];
|
|
|
t_op_opxs2['<27><><EFBFBD>շ<EFBFBD>']:=ADOQuery1['<27><><EFBFBD>շ<EFBFBD>'];
|
|
|
t_op_opxs2['<27>ͻ<EFBFBD><CDBB>ȼ<EFBFBD><C8BC><EFBFBD><EFBFBD><EFBFBD>']:=ADOQuery1['<27>ͻ<EFBFBD><CDBB>ȼ<EFBFBD><C8BC><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_opxs2['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=ADOQuery1['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_opxs2['<27><><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=ADOQuery1['<27><><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_opxs2['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=ADOQuery1['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_opxs2['Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>']:=ADOQuery1['Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>'];
|
|
|
t_op_opxs2['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>걨װ<EAB1A8><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=ADOQuery1['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>걨װ<EAB1A8><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_opxs2['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD>']:=ADOQuery1['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD>'];
|
|
|
t_op_opxs2['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=ADOQuery1['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_opxs2['<27><><EFBFBD><EFBFBD><EFBFBD>ɳ<EFBFBD><C9B3><EFBFBD><EFBFBD><EFBFBD>']:=ADOQuery1['<27><><EFBFBD><EFBFBD><EFBFBD>ɳ<EFBFBD><C9B3><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_opxs2['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=ADOQuery1['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_opxs2['<27><>Чģ<D0A7><C4A3>']:=RxDBLookupCombo6.DisplayValues[0];
|
|
|
t_op_opxs2['<27><>֤<EFBFBD><D6A4><EFBFBD>ƶ<EFBFBD><C6B6><EFBFBD>']:=ADOQuery1['<27><>֤<EFBFBD><D6A4><EFBFBD>ƶ<EFBFBD><C6B6><EFBFBD>'];
|
|
|
t_op_opxs2['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƶ<EFBFBD><C6B6><EFBFBD>']:=ADOQuery1['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƶ<EFBFBD><C6B6><EFBFBD>'];
|
|
|
// t_op_opxs2['<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>']:=t_op_opxs2['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+ t_op_opxs2['<27>ɳ<EFBFBD><C9B3><EFBFBD>']+t_op_opxs2['DOC<4F>ֵ<EFBFBD><D6B5><EFBFBD>'];
|
|
|
|
|
|
t_op_opxs2.Post;
|
|
|
ADOQuery1.Next;
|
|
|
end;
|
|
|
}
|
|
|
t_op_opxs2.close;
|
|
|
t_op_opxs2.sql.clear;
|
|
|
t_op_opxs2.sql.add('select * from t_op_opxs where isnull(ȷ<><C8B7>״̬,'''')<>''<27><>ȷ<EFBFBD><C8B7>'' '+str_tiaojian);
|
|
|
t_op_opxs2.open;
|
|
|
|
|
|
t_op_opxs_sum2.close;
|
|
|
t_op_opxs_sum2.sql.clear;
|
|
|
t_op_opxs_sum2.sql.add('SELECT <20><>Ա,sum(<28><>֤<EFBFBD>ϼ<EFBFBD>) <20><>֤<EFBFBD>ϼ<EFBFBD>,SUM(<28><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>) <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>,sum(<28><>֤<EFBFBD>ϼ<EFBFBD>+<2B><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>) <20>ܼ<EFBFBD>');
|
|
|
t_op_opxs_sum2.sql.add(' from (');
|
|
|
t_op_opxs_sum2.sql.add(' SELECT <20><>֤Ա <20><>Ա,sum(<28><>֤<EFBFBD>ϼ<EFBFBD>) <20><>֤<EFBFBD>ϼ<EFBFBD>, 0 <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD> from t_op_opxs where ȷ<><C8B7>״̬<>''<27><>ȷ<EFBFBD><C8B7>'' '+str_tiaojian);
|
|
|
t_op_opxs_sum2.sql.add(' GROUP BY <20><>֤Ա');
|
|
|
t_op_opxs_sum2.sql.add(' UNION');
|
|
|
t_op_opxs_sum2.sql.add(' SELECT <20><><EFBFBD><EFBFBD>Ա <20><>Ա,0 <20><>֤<EFBFBD>ϼ<EFBFBD>, SUM(<28><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>) <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD> from t_op_opxs where ȷ<><C8B7>״̬<>''<27><>ȷ<EFBFBD><C8B7>'' '+str_tiaojian);
|
|
|
t_op_opxs_sum2.sql.add(' GROUP BY <20><><EFBFBD><EFBFBD>Ա');
|
|
|
t_op_opxs_sum2.sql.add(' ) as v');
|
|
|
t_op_opxs_sum2.sql.add(' GROUP BY <20><>Ա ');
|
|
|
t_op_opxs_sum2.open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.t_op_opxs2BeforePost(DataSet: TDataSet);
|
|
|
begin
|
|
|
if t_op_opxs2.FieldByName('<27><>֤<EFBFBD><D6A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD>').AsFloat>t_op_opxs2.FieldByName('<27><>֤<EFBFBD><D6A4><EFBFBD>ƶ<EFBFBD><C6B6><EFBFBD>').AsFloat then begin
|
|
|
showmessage('<27><>֤<EFBFBD><D6A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+t_op_opxs2.FieldByName('<27><>֤<EFBFBD><D6A4><EFBFBD>ƶ<EFBFBD><C6B6><EFBFBD>').AsString);
|
|
|
abort;
|
|
|
end;
|
|
|
if t_op_opxs2.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD>').AsFloat>t_op_opxs2.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƶ<EFBFBD><C6B6><EFBFBD>').AsFloat then begin
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+t_op_opxs2.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƶ<EFBFBD><C6B6><EFBFBD>').AsString);
|
|
|
abort;
|
|
|
end;
|
|
|
|
|
|
t_op_opxs2.FieldByName('<27><>֤<EFBFBD>ϼ<EFBFBD>').AsFloat:= t_op_opxs2.FieldByName('<27><>֤<EFBFBD><D6A4>').AsFloat+t_op_opxs2.FieldByName('DOC<4F>ֵ<EFBFBD><D6B5><EFBFBD>').AsFloat
|
|
|
+t_op_opxs2.FieldByName('DOC<4F><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat+t_op_opxs2.FieldByName('<27><>֤<EFBFBD><D6A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD>').AsFloat+t_op_opxs2.FieldByName('<27>յ<EFBFBD><D5B5><EFBFBD>').AsFloat+t_op_opxs2.FieldByName('VGM').AsFloat;
|
|
|
t_op_opxs2.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat:= t_op_opxs2.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat+t_op_opxs2.FieldByName('<27>ɳ<EFBFBD><C9B3><EFBFBD>').AsFloat
|
|
|
+t_op_opxs2.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat+t_op_opxs2.FieldByName('<27><><EFBFBD>ط<EFBFBD>').AsFloat+t_op_opxs2.FieldByName('<27>̼<EFBFBD><CCBC><EFBFBD>').AsFloat
|
|
|
+t_op_opxs2.FieldByName('<27><><EFBFBD><EFBFBD>֤<EFBFBD><D6A4>').AsFloat+t_op_opxs2.FieldByName('Ѭ<><D1AC>֤<EFBFBD><D6A4>').AsFloat+t_op_opxs2.FieldByName('COA<4F><41>').AsFloat
|
|
|
+t_op_opxs2.FieldByName('<27><><EFBFBD>շ<EFBFBD>').AsFloat+t_op_opxs2.FieldByName('<27>ͻ<EFBFBD><CDBB>ȼ<EFBFBD><C8BC><EFBFBD><EFBFBD><EFBFBD>').AsFloat+t_op_opxs2.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat
|
|
|
+t_op_opxs2.FieldByName('BV<42><56>').AsFloat+t_op_opxs2.FieldByName('<27><><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat+t_op_opxs2.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat
|
|
|
+t_op_opxs2.FieldByName('Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').AsFloat+t_op_opxs2.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>걨װ<EAB1A8><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat+t_op_opxs2.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD>').AsFloat
|
|
|
+t_op_opxs2.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat+t_op_opxs2.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ɳ<EFBFBD><C9B3><EFBFBD><EFBFBD><EFBFBD>').AsFloat+t_op_opxs2.FieldByName('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat
|
|
|
+t_op_opxs2.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD>').AsFloat+t_op_opxs2.FieldByName('<27><><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0>').AsFloat+t_op_opxs2.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat
|
|
|
+t_op_opxs2.FieldByName('СƱ<D0A1><C6B1>').AsFloat;
|
|
|
t_op_opxs2.FieldByName('<27>ϼ<EFBFBD>').AsFloat:=t_op_opxs2.FieldByName('<27><>֤<EFBFBD>ϼ<EFBFBD>').AsFloat+t_op_opxs2.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.N42Click(Sender: TObject);
|
|
|
var
|
|
|
i:Integer;
|
|
|
begin
|
|
|
if t_op_opxs2.IsEmpty then
|
|
|
exit;
|
|
|
try
|
|
|
t_op_opxs2.DisableControls;
|
|
|
|
|
|
for i:=0 to dxDBGrid3.SelectedCount-1 do
|
|
|
begin
|
|
|
t_op_opxs2.GotoBookmark(pointer(dxDBGrid3.selectedrows[i]));
|
|
|
t_op_opxs2.Edit;
|
|
|
t_op_opxs2.FieldByName('ȷ<><C8B7>״̬').AsString:='<27><>ȷ<EFBFBD><C8B7>';
|
|
|
t_op_opxs2.FieldByName('ȷ<><C8B7><EFBFBD><EFBFBD>').AsString:=employee;
|
|
|
t_op_opxs2.FieldByName('ȷ<><C8B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=Now;
|
|
|
t_op_opxs2.Post;
|
|
|
end;
|
|
|
finally
|
|
|
t_op_opxs2.Requery();
|
|
|
t_op_opxs2.EnableControls;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.MenuItem1Click(Sender: TObject);
|
|
|
var
|
|
|
i:Integer;
|
|
|
begin
|
|
|
if t_op_opxs.IsEmpty then
|
|
|
exit;
|
|
|
try
|
|
|
t_op_opxs.DisableControls;
|
|
|
|
|
|
for i:=0 to dxDBGrid1.SelectedCount-1 do
|
|
|
begin
|
|
|
t_op_opxs.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
|
|
|
t_op_opxs.Edit;
|
|
|
t_op_opxs.FieldByName('ȷ<><C8B7>״̬').AsString:='δȷ<CEB4><C8B7>';
|
|
|
t_op_opxs.FieldByName('ȷ<><C8B7><EFBFBD><EFBFBD>').AsString:='';
|
|
|
t_op_opxs['ȷ<><C8B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
t_op_opxs.Post;
|
|
|
end;
|
|
|
finally
|
|
|
t_op_opxs.Requery();
|
|
|
t_op_opxs.EnableControls;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.N2Click(Sender: TObject);
|
|
|
begin
|
|
|
grid_save_xls(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.N4Click(Sender: TObject);
|
|
|
begin
|
|
|
grid_save_xls(dxdbgrid3);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.FormResize(Sender: TObject);
|
|
|
begin
|
|
|
dxdbgrid1.Align:=alClient;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.dxDBGrid3ColumnSorting(Sender: TObject;
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
begin
|
|
|
Column_sort(Column,t_op_opxs2,'<27><><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.dxdbgrid12ColumnSorting(Sender: TObject;
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
begin
|
|
|
Column_sort(Column,t_op_opxs,'<27><><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.N6Click(Sender: TObject);
|
|
|
var
|
|
|
i:Integer;
|
|
|
begin
|
|
|
if t_op_opxs2.IsEmpty then
|
|
|
exit;
|
|
|
try
|
|
|
t_op_opxs2.DisableControls;
|
|
|
|
|
|
for i:=0 to dxDBGrid3.SelectedCount-1 do
|
|
|
begin
|
|
|
t_op_opxs2.GotoBookmark(pointer(dxDBGrid3.selectedrows[i]));
|
|
|
t_op_opxs2.Edit;
|
|
|
t_op_opxs2.FieldByName('<27><>֤<EFBFBD><D6A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD>').AsFloat:=-t_op_opxs2.FieldByName('<27><>֤<EFBFBD>ϼ<EFBFBD>').AsFloat;
|
|
|
t_op_opxs2.Post;
|
|
|
end;
|
|
|
finally
|
|
|
t_op_opxs2.Requery();
|
|
|
t_op_opxs2.EnableControls;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.N7Click(Sender: TObject);
|
|
|
var
|
|
|
i:Integer;
|
|
|
begin
|
|
|
if t_op_opxs2.IsEmpty then
|
|
|
exit;
|
|
|
try
|
|
|
t_op_opxs2.DisableControls;
|
|
|
|
|
|
for i:=0 to dxDBGrid3.SelectedCount-1 do
|
|
|
begin
|
|
|
t_op_opxs2.GotoBookmark(pointer(dxDBGrid3.selectedrows[i]));
|
|
|
t_op_opxs2.Edit;
|
|
|
t_op_opxs2.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD>').AsFloat:=-t_op_opxs2.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat;
|
|
|
t_op_opxs2.Post;
|
|
|
end;
|
|
|
finally
|
|
|
t_op_opxs2.Requery();
|
|
|
t_op_opxs2.EnableControls;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.N12Click(Sender: TObject);
|
|
|
var
|
|
|
i:Integer;
|
|
|
jxmb:string;
|
|
|
begin
|
|
|
if t_op_opxs.IsEmpty then
|
|
|
exit;
|
|
|
t_op_opxs_ms.Close;
|
|
|
t_op_opxs_ms.SQL.Clear;
|
|
|
t_op_opxs_ms.SQL.Add('select * from t_op_opxs_ms where <20><>Чģ<D0A7><C4A3>='''+t_op_opxs.fieldbyname('<27><>Чģ<D0A7><C4A3>').AsString+'''');
|
|
|
t_op_opxs_ms.Open;
|
|
|
frm_main.view_momo(t_op_opxs_ms1,'<27><>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.N10Click(Sender: TObject);
|
|
|
var
|
|
|
i:Integer;
|
|
|
jxmb:string;
|
|
|
begin
|
|
|
if t_op_opxs2.IsEmpty then
|
|
|
exit;
|
|
|
t_op_opxs_ms.Close;
|
|
|
t_op_opxs_ms.SQL.Clear;
|
|
|
t_op_opxs_ms.SQL.Add('select * from t_op_opxs_ms where <20><>Чģ<D0A7><C4A3>='''+t_op_opxs2.fieldbyname('<27><>Чģ<D0A7><C4A3>').AsString+'''');
|
|
|
t_op_opxs_ms.Open;
|
|
|
frm_main.view_momo(t_op_opxs_ms1,'<27><>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.dxDBGrid3DblClick(Sender: TObject);
|
|
|
begin
|
|
|
fee_view(t_op_opxs2.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.dxDBGrid11ColumnSorting(Sender: TObject;
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
begin
|
|
|
Column_sort(Column,t_op_opxs,'<27><><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.dxDBGrid11DblClick(Sender: TObject);
|
|
|
begin
|
|
|
fee_view(t_op_opxs.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.bsSkinButton4Click(Sender: TObject);
|
|
|
begin
|
|
|
if bsSkinButton4.Caption='չ<><D5B9>' then
|
|
|
begin
|
|
|
dxdbgrid1.FullExpand;
|
|
|
bsSkinButton4.Caption:='<27>ϲ<EFBFBD>';
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
dxdbgrid1.FullCollapse;
|
|
|
bsSkinButton4.Caption:='չ<><D5B9>';
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.bsSkinButton11Click(Sender: TObject);
|
|
|
begin
|
|
|
if bsSkinButton11.Caption='չ<><D5B9>' then
|
|
|
begin
|
|
|
dxdbgrid3.FullExpand;
|
|
|
bsSkinButton11.Caption:='<27>ϲ<EFBFBD>';
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
dxdbgrid3.FullCollapse;
|
|
|
bsSkinButton11.Caption:='չ<><D5B9>';
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.t_op_opxsBeforePost(DataSet: TDataSet);
|
|
|
begin
|
|
|
// abort;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.MenuItem6Click(Sender: TObject);
|
|
|
begin
|
|
|
grid_save_xls(dxdbgrid2);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.MenuItem2Click(Sender: TObject);
|
|
|
begin
|
|
|
grid_save_xls(dxdbgrid4);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.N14Click(Sender: TObject);
|
|
|
begin
|
|
|
Clipboard.AsText :=t_op_opxs.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.N16Click(Sender: TObject);
|
|
|
begin
|
|
|
Clipboard.AsText :=t_op_opxs2.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.objectN18TMenuItem1Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_no(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.N18Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_no(dxdbgrid3);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.N23Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_all(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_opxs.N20Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_all(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
end.
|