|
|
unit u_ch_accept_shen;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, dxExEdtr, DB, ADODB, u_ch_add_do, u_ch_delete_do, StdCtrls,
|
|
|
DBCtrls, wwdblook, ComCtrls, bsSkinTabs, RxLookup, bsSkinCtrls,
|
|
|
bsdbctrls, Mask, dxDBGrid, dxDBTLCl, dxGrClms, dxTL, dxDBCtrl, dxCntner,
|
|
|
Menus, XPMenu, wwdbdatetimepicker, wwdbedit, Wwdotdot, Wwdbcomb,
|
|
|
kbmMemTable;
|
|
|
|
|
|
type
|
|
|
Tfrm_ch_accept_shen = class(TForm)
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
bsSkinButton11: TbsSkinButton;
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
bsSkinNotebook1: TbsSkinNotebook;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
bsSkinPanel3: TbsSkinPanel;
|
|
|
fra_ch_add_do1: Tfra_ch_add_do;
|
|
|
t_ch_accept1: TDataSource;
|
|
|
t_ch_fee_do: TADOQuery;
|
|
|
dxDBGrid1Column1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column2: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column3: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column4: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column5: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column9: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column10: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column11: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column12: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column13: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column14: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column15: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column6: TdxDBGridColumn;
|
|
|
dxDBGrid1Column7: TdxDBGridColumn;
|
|
|
dxDBGrid1Column8: TdxDBGridColumn;
|
|
|
fra_ch_delete_do1: Tfra_ch_delete_do;
|
|
|
dxDBGrid1Column16: TdxDBGridColumn;
|
|
|
XPMenu1: TXPMenu;
|
|
|
PopupMenu2: TPopupMenu;
|
|
|
N10: TMenuItem;
|
|
|
N11: TMenuItem;
|
|
|
N14: TMenuItem;
|
|
|
N13: TMenuItem;
|
|
|
N12: TMenuItem;
|
|
|
N15: TMenuItem;
|
|
|
N16: TMenuItem;
|
|
|
dxDBGrid1Column17: TdxDBGridColumn;
|
|
|
PopupMenu3: TPopupMenu;
|
|
|
N17: TMenuItem;
|
|
|
N18: TMenuItem;
|
|
|
N34: TMenuItem;
|
|
|
N35: TMenuItem;
|
|
|
N36: TMenuItem;
|
|
|
N1: TMenuItem;
|
|
|
N6: TMenuItem;
|
|
|
N5: TMenuItem;
|
|
|
N4: TMenuItem;
|
|
|
bsSkinButton12: TbsSkinButton;
|
|
|
bsSkinButton7: TbsSkinButton;
|
|
|
t_ch_accept: TADOQuery;
|
|
|
bsSkinPageControl1: TbsSkinPageControl;
|
|
|
bsSkinTabSheet1: TbsSkinTabSheet;
|
|
|
bsSkinTabSheet2: TbsSkinTabSheet;
|
|
|
Label25: TLabel;
|
|
|
DBEdit14: TDBEdit;
|
|
|
Label17: TLabel;
|
|
|
DBEdit1: TDBEdit;
|
|
|
RxDBLookupCombo1: TRxDBLookupCombo;
|
|
|
Label12: TLabel;
|
|
|
Label2: TLabel;
|
|
|
RxDBLookupCombo2: TRxDBLookupCombo;
|
|
|
bsSkinDBCheckRadioBox1: TbsSkinDBCheckRadioBox;
|
|
|
DBEdit2: TDBEdit;
|
|
|
Label4: TLabel;
|
|
|
DBEdit3: TDBEdit;
|
|
|
Label1: TLabel;
|
|
|
Label8: TLabel;
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
DBEdit7: TDBEdit;
|
|
|
wwDBComboBox1: TwwDBComboBox;
|
|
|
DBEdit6: TDBEdit;
|
|
|
DBEdit4: TDBEdit;
|
|
|
Label3: TLabel;
|
|
|
Label5: TLabel;
|
|
|
Label18: TLabel;
|
|
|
Label6: TLabel;
|
|
|
Label10: TLabel;
|
|
|
DBMemo1: TDBMemo;
|
|
|
Label9: TLabel;
|
|
|
DBEdit5: TDBEdit;
|
|
|
Label11: TLabel;
|
|
|
DBMemo2: TDBMemo;
|
|
|
Label13: TLabel;
|
|
|
DBMemo3: TDBMemo;
|
|
|
Label7: TLabel;
|
|
|
DBEdit8: TDBEdit;
|
|
|
Label14: TLabel;
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
Label15: TLabel;
|
|
|
DBEdit9: TDBEdit;
|
|
|
Label16: TLabel;
|
|
|
wwDBLookupCombo3: TwwDBLookupCombo;
|
|
|
Label19: TLabel;
|
|
|
wwDBLookupCombo2: TwwDBLookupCombo;
|
|
|
Label20: TLabel;
|
|
|
wwDBLookupCombo1: TwwDBLookupCombo;
|
|
|
dxDBGrid1Column18: TdxDBGridColumn;
|
|
|
p_accept_bill: TADOStoredProc;
|
|
|
p_accept_bill1: TDataSource;
|
|
|
p_accept_fee: TADOStoredProc;
|
|
|
p_accept_fee1: TDataSource;
|
|
|
dxDBGrid1Column19: TdxDBGridColumn;
|
|
|
dxDBGrid1Column20: TdxDBGridColumn;
|
|
|
memtblprint1: TDataSource;
|
|
|
memtblprint: TkbmMemTable;
|
|
|
bsSkinPanel4: TbsSkinPanel;
|
|
|
Label21: TLabel;
|
|
|
Label22: TLabel;
|
|
|
Label23: TLabel;
|
|
|
Label24: TLabel;
|
|
|
Label27: TLabel;
|
|
|
Label28: TLabel;
|
|
|
Label31: TLabel;
|
|
|
Label32: TLabel;
|
|
|
Label33: TLabel;
|
|
|
Label92: TLabel;
|
|
|
Label93: TLabel;
|
|
|
DBEdit10: TDBEdit;
|
|
|
DBEdit11: TDBEdit;
|
|
|
RxDBLookupCombo3: TRxDBLookupCombo;
|
|
|
RxDBLookupCombo4: TRxDBLookupCombo;
|
|
|
bsSkinDBCheckRadioBox2: TbsSkinDBCheckRadioBox;
|
|
|
DBEdit13: TDBEdit;
|
|
|
wwDBDateTimePicker3: TwwDBDateTimePicker;
|
|
|
DBEdit15: TDBEdit;
|
|
|
wwDBComboBox2: TwwDBComboBox;
|
|
|
DBMemo4: TDBMemo;
|
|
|
DBEdit70: TDBEdit;
|
|
|
DBEdit71: TDBEdit;
|
|
|
dxDBGrid1Column21: TdxDBGridColumn;
|
|
|
bsSkinButton38: TbsSkinButton;
|
|
|
Label26: TLabel;
|
|
|
DBEdit12: TDBEdit;
|
|
|
Label29: TLabel;
|
|
|
DBEdit16: TDBEdit;
|
|
|
RxDBLookupCombo14: TRxDBLookupCombo;
|
|
|
Label30: TLabel;
|
|
|
dxDBGrid1Column22: TdxDBGridColumn;
|
|
|
bsSkinButton8: TbsSkinButton;
|
|
|
dxDBGrid1Column23: TdxDBGridColumn;
|
|
|
Label34: TLabel;
|
|
|
DBEdit17: TDBEdit;
|
|
|
dxDBGrid1Column24: TdxDBGridColumn;
|
|
|
dxDBGrid1Column25: TdxDBGridColumn;
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure bsSkinButton11Click(Sender: TObject);
|
|
|
procedure t_ch_acceptAfterInsert(DataSet: TDataSet);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
procedure t_ch_acceptBeforePost(DataSet: TDataSet);
|
|
|
procedure DBEdit4Enter(Sender: TObject);
|
|
|
procedure t_ch_acceptBeforeEdit(DataSet: TDataSet);
|
|
|
procedure bsSkinButton6Click(Sender: TObject);
|
|
|
procedure t_ch_acceptAfterPost(DataSet: TDataSet);
|
|
|
procedure RxDBLookupCombo1Enter(Sender: TObject);
|
|
|
procedure dxDBGrid1Column2CustomDraw(Sender: TObject; ACanvas: TCanvas;
|
|
|
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxDBTreeListColumn;
|
|
|
const AText: String; AFont: TFont; var AColor: TColor; ASelected,
|
|
|
AFocused: Boolean; var ADone: Boolean);
|
|
|
procedure DBEdit1Change(Sender: TObject);
|
|
|
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
procedure bsSkinButton8Click(Sender: TObject);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure t_ch_acceptAfterDelete(DataSet: TDataSet);
|
|
|
procedure DBEdit14KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit1KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure RxDBLookupCombo1KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure RxDBLookupCombo2KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox1KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure DBEdit4KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit2KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit6KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit8KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit3KeyPress(Sender: TObject; var Key: Char);
|
|
|
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 wwDBDateTimePicker1KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit7KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure bsSkinPanel2Resize(Sender: TObject);
|
|
|
procedure wwDBComboBox1KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure bsSkinButton12Click(Sender: TObject);
|
|
|
procedure N17Click(Sender: TObject);
|
|
|
procedure N34Click(Sender: TObject);
|
|
|
procedure N36Click(Sender: TObject);
|
|
|
procedure N6Click(Sender: TObject);
|
|
|
procedure N4Click(Sender: TObject);
|
|
|
procedure bsSkinButton7Click(Sender: TObject);
|
|
|
procedure fra_ch_add_do1bsSkinButton10Click(Sender: TObject);
|
|
|
procedure bsSkinNotebook1PageChanged(Sender: TObject);
|
|
|
procedure bsSkinButton38Click(Sender: TObject);
|
|
|
procedure fra_ch_delete_do1N1Click(Sender: TObject);
|
|
|
procedure fra_ch_add_do1bsSkinButton1Click(Sender: TObject);
|
|
|
procedure fra_ch_add_do1bsSkinButton8Click(Sender: TObject);
|
|
|
procedure fra_ch_add_do1MenuItem1Click(Sender: TObject);
|
|
|
procedure DBEdit17KeyPress(Sender: TObject; var Key: Char);
|
|
|
private
|
|
|
edittrue:boolean;
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
ch_accept_shen_open:boolean;
|
|
|
frm_ch_accept_shen: Tfrm_ch_accept_shen;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_main, u_ch_shen_query, my_sys_function, u_data_share, my_sys_chat;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.FormClose(Sender: TObject;
|
|
|
var Action: TCloseAction);
|
|
|
begin
|
|
|
ch_accept_shen_open:=false;
|
|
|
savereggrid(dxdbgrid1,caption);
|
|
|
frm_ch_accept_shen.Hide;
|
|
|
frm_ch_accept_shen.ManualFloat(frm_ch_accept_shen.BoundsRect );
|
|
|
frm_main.freeTabs('frm_ch_accept_shen');
|
|
|
action:=cafree;
|
|
|
frm_ch_accept_shen:=nil;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
edittrue:=false;
|
|
|
bsSkinNotebook1.PageIndex:=0;
|
|
|
t_ch_accept.Close;
|
|
|
t_ch_accept.SQL.clear;
|
|
|
t_ch_accept.SQL.Add('select * from t_ch_accept where <20><><EFBFBD><EFBFBD>״̬ not in ('+''''+'<27><><EFBFBD>տ<EFBFBD>'+''''
|
|
|
+','+''''+'<27>տ<EFBFBD><D5BF><EFBFBD><EFBFBD><EFBFBD>'+''''+') and '
|
|
|
+open_data('1003','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no','no')
|
|
|
+'order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
t_ch_accept.open;
|
|
|
ch_accept_shen_open:=true;
|
|
|
// t_ch_fee_do.open;
|
|
|
|
|
|
if StrToBool(get_parameters_value(85,'false')) then begin
|
|
|
fra_ch_add_do1.bsSkinTabSheet1.TabVisible:=False;
|
|
|
fra_ch_add_do1.bsSkinTabSheet2.TabVisible:=False;
|
|
|
fra_ch_add_do1.bsSkinTabSheet3.TabVisible:=False;
|
|
|
fra_ch_add_do1.bsSkinTabSheet4.TabVisible:=False;
|
|
|
fra_ch_add_do1.bsSkinTabSheet5.TabVisible:=True;
|
|
|
fra_ch_add_do1.bsSkinPageControl1.TabIndex:=0;
|
|
|
// fra_ch_add_do1.bsSkinButton11.Caption:='<27>շ<EFBFBD><D5B7><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
|
|
|
|
|
|
fra_ch_delete_do1.bsSkinTabSheet1.TabVisible:=false;
|
|
|
fra_ch_delete_do1.bsSkinTabSheet2.TabVisible:=false;
|
|
|
fra_ch_delete_do1.bsSkinTabSheet3.TabVisible:=false;
|
|
|
fra_ch_delete_do1.bsSkinTabSheet4.TabVisible:=false;
|
|
|
fra_ch_delete_do1.bsSkinTabSheet5.TabVisible:=True;
|
|
|
fra_ch_delete_do1.bsSkinPageControl1.ActivePage:=fra_ch_delete_do1.bsSkinTabSheet5;
|
|
|
|
|
|
end else begin
|
|
|
fra_ch_add_do1.bsSkinTabSheet1.TabVisible:=True;
|
|
|
fra_ch_add_do1.bsSkinTabSheet2.TabVisible:=True;
|
|
|
fra_ch_add_do1.bsSkinTabSheet3.TabVisible:=True;
|
|
|
fra_ch_add_do1.bsSkinTabSheet4.TabVisible:=True;
|
|
|
fra_ch_add_do1.bsSkinPageControl1.ActivePage:=fra_ch_add_do1.bsSkinTabSheet1;
|
|
|
fra_ch_add_do1.bsSkinTabSheet5.TabVisible:=False;
|
|
|
|
|
|
fra_ch_delete_do1.bsSkinTabSheet1.TabVisible:=True;
|
|
|
fra_ch_delete_do1.bsSkinTabSheet2.TabVisible:=True;
|
|
|
fra_ch_delete_do1.bsSkinTabSheet3.TabVisible:=True;
|
|
|
fra_ch_delete_do1.bsSkinTabSheet4.TabVisible:=True;
|
|
|
fra_ch_delete_do1.bsSkinTabSheet5.TabVisible:=false;
|
|
|
fra_ch_delete_do1.bsSkinPageControl1.ActivePage:=fra_ch_delete_do1.bsSkinTabSheet1;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
if StrToBool(get_parameters_value(85,'false')) then begin
|
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_bscard.SQL.clear;
|
|
|
fra_ch_delete_do1.v_fee_do_bscard.sql.add('select * from v_fee_do_bscard '
|
|
|
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
fra_ch_delete_do1.v_fee_do_bscard.DataSource:=t_ch_accept1;
|
|
|
fra_ch_delete_do1.v_fee_do_bscard.Open;
|
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_bscard_sum.SQL.clear;
|
|
|
fra_ch_delete_do1.v_fee_do_bscard_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ԭʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_bscard '
|
|
|
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ԭʼ<D4AD>ұ<EFBFBD> '
|
|
|
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
|
|
|
fra_ch_delete_do1.v_fee_do_bscard_sum.DataSource:=t_ch_accept1;
|
|
|
fra_ch_delete_do1.v_fee_do_bscard_sum.Open;
|
|
|
|
|
|
end else begin
|
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_seae.SQL.clear;
|
|
|
fra_ch_delete_do1.v_fee_do_seae.sql.add('select * from v_fee_do_seae '
|
|
|
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
fra_ch_delete_do1.v_fee_do_seae.DataSource:=t_ch_accept1;
|
|
|
fra_ch_delete_do1.v_fee_do_seae.Open;
|
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_seai.SQL.clear;
|
|
|
fra_ch_delete_do1.v_fee_do_seai.sql.add('select * from v_fee_do_seai '
|
|
|
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
fra_ch_delete_do1.v_fee_do_seai.DataSource:=t_ch_accept1;
|
|
|
fra_ch_delete_do1.v_fee_do_seai.Open;
|
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_aire.SQL.clear;
|
|
|
fra_ch_delete_do1.v_fee_do_aire.sql.add('select * from v_fee_do_aire '
|
|
|
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
fra_ch_delete_do1.v_fee_do_aire.DataSource:=t_ch_accept1;
|
|
|
fra_ch_delete_do1.v_fee_do_aire.Open;
|
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_airi.SQL.clear;
|
|
|
fra_ch_delete_do1.v_fee_do_airi.sql.add('select * from v_fee_do_airi '
|
|
|
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
fra_ch_delete_do1.v_fee_do_airi.DataSource:=t_ch_accept1;
|
|
|
fra_ch_delete_do1.v_fee_do_airi.Open;
|
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_seae_sum.SQL.clear;
|
|
|
fra_ch_delete_do1.v_fee_do_seae_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ԭʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_seae '
|
|
|
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ԭʼ<D4AD>ұ<EFBFBD> '
|
|
|
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
|
|
|
fra_ch_delete_do1.v_fee_do_seae_sum.DataSource:=t_ch_accept1;
|
|
|
fra_ch_delete_do1.v_fee_do_seae_sum.Open;
|
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_seai_sum.SQL.clear;
|
|
|
fra_ch_delete_do1.v_fee_do_seai_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ԭʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_seai '
|
|
|
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ԭʼ<D4AD>ұ<EFBFBD> '
|
|
|
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
|
|
|
fra_ch_delete_do1.v_fee_do_seai_sum.DataSource:=t_ch_accept1;
|
|
|
fra_ch_delete_do1.v_fee_do_seai_sum.Open;
|
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_aire_sum.SQL.clear;
|
|
|
fra_ch_delete_do1.v_fee_do_aire_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ԭʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_aire '
|
|
|
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ԭʼ<D4AD>ұ<EFBFBD> '
|
|
|
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
|
|
|
fra_ch_delete_do1.v_fee_do_aire_sum.DataSource:=t_ch_accept1;
|
|
|
fra_ch_delete_do1.v_fee_do_aire_sum.Open;
|
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_airi_sum.SQL.clear;
|
|
|
fra_ch_delete_do1.v_fee_do_airi_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ԭʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_airi '
|
|
|
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ԭʼ<D4AD>ұ<EFBFBD> '
|
|
|
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
|
|
|
fra_ch_delete_do1.v_fee_do_airi_sum.DataSource:=t_ch_accept1;
|
|
|
fra_ch_delete_do1.v_fee_do_airi_sum.Open;
|
|
|
end;
|
|
|
|
|
|
fra_ch_add_do1.do_ban1.DataSet:=t_ch_accept;
|
|
|
fra_ch_add_do1.wwDBComboBox31.text:='<27><>';
|
|
|
fra_ch_add_do1.bs_text.text:='6';
|
|
|
fra_ch_add_do1.t_ch_fee_do.open;
|
|
|
fra_ch_add_do1.bsSkinPanel9.Visible:=true;
|
|
|
|
|
|
|
|
|
|
|
|
fra_ch_delete_do1.bs_text.Text:='6';
|
|
|
fra_ch_delete_do1.do_ban1.DataSet:=t_ch_accept;
|
|
|
|
|
|
fra_ch_add_do1.dxDBGrid13.Visible:=true;
|
|
|
fra_ch_add_do1.dxDBGrid14.Visible:=true;
|
|
|
fra_ch_add_do1.dxDBGrid15.Visible:=true;
|
|
|
fra_ch_add_do1.dxDBGrid16.Visible:=true;
|
|
|
|
|
|
loadreggrid(dxdbgrid1,false,caption);
|
|
|
|
|
|
if StrToBool(get_parameters_value(83,'false')) then begin
|
|
|
dxdbgrid1.ColumnByFieldName('<27>ұ<EFBFBD>').Visible:=false;
|
|
|
dxdbgrid1.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=False;
|
|
|
dxdbgrid1.ColumnByFieldName('ʵ<>ʽ<EFBFBD><CABD><EFBFBD>').Visible:=false;
|
|
|
dxdbgrid1.ColumnByFieldName('<27>鿪<EFBFBD><E9BFAA><EFBFBD><EFBFBD>').Visible:=False;
|
|
|
dxdbgrid1.ColumnByFieldName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Visible:=True;
|
|
|
dxdbgrid1.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Visible:=True;
|
|
|
bsSkinPanel4.Visible:=true;
|
|
|
fra_ch_add_do1.bsSkinPanel12.Visible:=true;
|
|
|
|
|
|
end else begin
|
|
|
dxdbgrid1.ColumnByFieldName('<27>ұ<EFBFBD>').Visible:=True;
|
|
|
dxdbgrid1.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=True;
|
|
|
dxdbgrid1.ColumnByFieldName('ʵ<>ʽ<EFBFBD><CABD><EFBFBD>').Visible:=True;
|
|
|
dxdbgrid1.ColumnByFieldName('<27>鿪<EFBFBD><E9BFAA><EFBFBD><EFBFBD>').Visible:=True;
|
|
|
dxdbgrid1.ColumnByFieldName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Visible:=False;
|
|
|
dxdbgrid1.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Visible:=False;
|
|
|
bsSkinPanel4.Visible:=false;
|
|
|
fra_ch_add_do1.bsSkinPanel12.Visible:=false;
|
|
|
end;
|
|
|
|
|
|
|
|
|
frm_data_share.t_crm_client_all.requery;
|
|
|
frm_data_share.t_code_currency.requery;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.bsSkinButton11Click(Sender: TObject);
|
|
|
var
|
|
|
answer:TModalResult;
|
|
|
begin
|
|
|
if bsSkinButton11.Caption='<27>༭<EFBFBD><EFBFBD>' then
|
|
|
begin
|
|
|
if t_ch_accept.IsEmpty then
|
|
|
exit;
|
|
|
|
|
|
bsSkinNotebook1.PageIndex:=1;
|
|
|
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if (t_ch_accept.State=dsinsert)or(t_ch_accept.State=dsedit) then
|
|
|
BEGIN
|
|
|
answer:=messagedlg( '<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE>ģ<DEB8><C4A3>Ƿ棿',mtWarning,mbYesNoCancel,0);
|
|
|
if answer=mrYes then
|
|
|
begin
|
|
|
t_ch_accept.post;
|
|
|
end;
|
|
|
if answer=mrNo then
|
|
|
begin
|
|
|
t_ch_accept.cancel;
|
|
|
end;
|
|
|
if answer=mrCancel then
|
|
|
begin
|
|
|
exit;
|
|
|
end;
|
|
|
END;
|
|
|
bsSkinNotebook1.PageIndex:=0;
|
|
|
bsSkinButton11.Caption:='<27>༭<EFBFBD><EFBFBD>';
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.t_ch_acceptAfterInsert(DataSet: TDataSet);
|
|
|
begin
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD><EFBFBD>տ<EFBFBD>';
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
|
|
|
t_ch_accept['<27>Զ<EFBFBD>']:=1;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept['ʵ<>ʽ<EFBFBD><CABD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27>鿪<EFBFBD><E9BFAA><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27>տʽ']:='֧Ʊ';
|
|
|
t_ch_accept['<27><>Ʊ״̬']:='<27><><EFBFBD>뿪Ʊ';
|
|
|
// t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=get_no(date,'DS');
|
|
|
|
|
|
// t_ch_accept['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.bsSkinButton1Click(Sender: TObject);
|
|
|
begin
|
|
|
t_ch_accept.insert;
|
|
|
bsSkinNotebook1.PageIndex:=1;
|
|
|
|
|
|
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.bsSkinButton2Click(Sender: TObject);
|
|
|
begin
|
|
|
table_post(t_ch_accept);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.bsSkinButton4Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_ch_accept.IsEmpty then
|
|
|
exit;
|
|
|
if (t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD>տ<EFBFBD>')or
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><>ֹ<EFBFBD><EFBFBD>')or
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27>տ<EFBFBD><D5BF><EFBFBD><EFBFBD><EFBFBD>')or
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>')or
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')then
|
|
|
begin
|
|
|
showmessage('<27><>ǰҵ<C7B0><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
if application.MessageBox('<27><>ȷ<EFBFBD><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)=IDOK then
|
|
|
begin
|
|
|
bsSkinNotebook1.PageIndex:=0;
|
|
|
t_ch_fee_do.open;
|
|
|
while not t_ch_fee_do.eof do
|
|
|
t_ch_fee_do.delete;
|
|
|
t_ch_fee_do.close;
|
|
|
t_ch_accept.Delete;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.bsSkinButton3Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(t_ch_accept);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.t_ch_acceptBeforePost(DataSet: TDataSet);
|
|
|
begin
|
|
|
table_before_post(t_ch_accept,'<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
if not StrToBool(get_parameters_value(83,'false')) then
|
|
|
table_before_post(t_ch_accept,'<27>ұ<EFBFBD>');
|
|
|
// table_before_post(t_ch_accept,'Ҫ<><D2AA><EFBFBD>տ<EFBFBD><D5BF><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
|
|
|
t_ch_accept['ʵ<>ʽ<EFBFBD><CABD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_accept['ʵ<>ʽ<EFBFBD><CABD><EFBFBD>']);
|
|
|
t_ch_accept['<27>鿪<EFBFBD><E9BFAA><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_accept['<27>鿪<EFBFBD><E9BFAA><EFBFBD><EFBFBD>']);
|
|
|
t_ch_accept['<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_accept['<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>']);
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>']);
|
|
|
|
|
|
if t_ch_accept.FieldByName('<27>Զ<EFBFBD>').asboolean then
|
|
|
begin
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_accept['ʵ<>ʽ<EFBFBD><CABD><EFBFBD>'];
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
end;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>״̬']:=t_ch_accept['<27><><EFBFBD><EFBFBD>״̬'];
|
|
|
t_ch_accept['<27>鿪<EFBFBD><E9BFAA><EFBFBD><EFBFBD>']:=t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']-t_ch_accept['ʵ<>ʽ<EFBFBD><CABD><EFBFBD>'];
|
|
|
|
|
|
if (t_ch_accept.state=dsinsert) and (trim(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)='') then
|
|
|
begin
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=get_no(date,'DS');
|
|
|
end;
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.DBEdit4Enter(Sender: TObject);
|
|
|
begin
|
|
|
if bsSkinDBCheckRadioBox1.Checked then
|
|
|
DBEdit4.ReadOnly:=true
|
|
|
else
|
|
|
DBEdit4.ReadOnly:=false;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.t_ch_acceptBeforeEdit(DataSet: TDataSet);
|
|
|
begin
|
|
|
if not modify_all then
|
|
|
begin
|
|
|
if (t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD>տ<EFBFBD>')or
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><>ֹ<EFBFBD><EFBFBD>')or
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27>տ<EFBFBD><D5BF><EFBFBD><EFBFBD><EFBFBD>')or
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>')or
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')then
|
|
|
begin
|
|
|
showmessage('<27><>ǰҵ<C7B0><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.bsSkinButton6Click(Sender: TObject);
|
|
|
var
|
|
|
aQuery,aQuery2:TADOQuery;
|
|
|
begin
|
|
|
if t_ch_accept.IsEmpty then
|
|
|
exit;
|
|
|
if (t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>տ<EFBFBD>')or
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>')or
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')then
|
|
|
begin
|
|
|
t_ch_accept.Edit;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>״̬']:='<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>';
|
|
|
t_ch_accept['<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=NOW;
|
|
|
t_ch_accept.post;
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
aQuery2:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('select <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>״̬ from t_op_seae where <20><><EFBFBD><EFBFBD> in (select DISTINCT ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_ch_fee_do where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+''')');
|
|
|
Open;
|
|
|
if not IsEmpty then begin
|
|
|
First;
|
|
|
while not eof do begin
|
|
|
aQuery2.Close;
|
|
|
aQuery2.SQL.Clear;
|
|
|
aQuery2.SQL.Add('Select * from t_op_state where ҵ<><D2B5>״̬=''<27>ύ<EFBFBD>տ<EFBFBD>'' and <20><><EFBFBD><EFBFBD>='''+FieldByName('<27><><EFBFBD><EFBFBD>').AsString+'''');
|
|
|
aQuery2.Open;
|
|
|
if aQuery2.IsEmpty then begin
|
|
|
aQuery2.insert;
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
aQuery2.FieldByName('ҵ<><D2B5>״̬').AsString:='<27>ύ<EFBFBD>տ<EFBFBD>';
|
|
|
aQuery2['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=1;
|
|
|
aQuery2['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>']:=date;
|
|
|
aQuery2['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
aQuery2.Post;
|
|
|
end else begin
|
|
|
Edit;
|
|
|
aQuery2['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=1;
|
|
|
aQuery2['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>']:=date;
|
|
|
aQuery2['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
Post;
|
|
|
end;
|
|
|
|
|
|
|
|
|
Next;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
FreeAndNil(aQuery2);
|
|
|
end;
|
|
|
{
|
|
|
Send_invocie_check_shen('<27><><EFBFBD><EFBFBD>֧<EFBFBD><D6A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+t_ch_check.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring
|
|
|
+',<2C>ͻ<EFBFBD>:'+t_ch_check.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring,'037','17');
|
|
|
}
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
showmessage('<27><>ǰҵ<C7B0><D2B5>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD>ύ<EFBFBD><E1BDBB><EFBFBD>룡<EFBFBD><EBA3A1>');
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.t_ch_acceptAfterPost(DataSet: TDataSet);
|
|
|
begin
|
|
|
|
|
|
if StrToBool(get_parameters_value(85,'false')) then begin
|
|
|
if fra_ch_delete_do1.v_fee_do_bscard.active then begin
|
|
|
fra_ch_delete_do1.v_fee_do_bscard.DisableControls;
|
|
|
fra_ch_delete_do1.v_fee_do_bscard_sum.DisableControls;
|
|
|
fra_ch_delete_do1.v_fee_do_bscard.Requery;
|
|
|
fra_ch_delete_do1.v_fee_do_bscard_sum.Requery;
|
|
|
fra_ch_delete_do1.v_fee_do_bscard.EnableControls;
|
|
|
fra_ch_delete_do1.v_fee_do_bscard_sum.EnableControls;
|
|
|
end;
|
|
|
if fra_ch_add_do1.V_op_BSCARD.Active then
|
|
|
begin
|
|
|
fra_ch_add_do1.t_ch_fee.Requery();
|
|
|
fra_ch_add_do1.t_ch_fee_sum.Requery();
|
|
|
end;
|
|
|
end else begin
|
|
|
case delete_do_type_num of
|
|
|
1:
|
|
|
begin
|
|
|
if fra_ch_delete_do1.v_fee_do_seae.active then begin
|
|
|
fra_ch_delete_do1.v_fee_do_seae.DisableControls;
|
|
|
fra_ch_delete_do1.v_fee_do_seae_sum.DisableControls;
|
|
|
fra_ch_delete_do1.v_fee_do_seae.Requery;
|
|
|
fra_ch_delete_do1.v_fee_do_seae_sum.Requery;
|
|
|
fra_ch_delete_do1.v_fee_do_seae.EnableControls;
|
|
|
fra_ch_delete_do1.v_fee_do_seae_sum.EnableControls;
|
|
|
end;
|
|
|
end;
|
|
|
2:
|
|
|
begin
|
|
|
if fra_ch_delete_do1.v_fee_do_seai.active then begin
|
|
|
fra_ch_delete_do1.v_fee_do_seai.Requery;
|
|
|
fra_ch_delete_do1.v_fee_do_seai_sum.Requery;
|
|
|
end;
|
|
|
end;
|
|
|
3:
|
|
|
begin
|
|
|
if fra_ch_delete_do1.v_fee_do_aire.active then begin
|
|
|
fra_ch_delete_do1.v_fee_do_aire.Requery;
|
|
|
fra_ch_delete_do1.v_fee_do_aire_sum.Requery;
|
|
|
end;
|
|
|
end;
|
|
|
4:
|
|
|
begin
|
|
|
if fra_ch_delete_do1.v_fee_do_airi.active then begin
|
|
|
fra_ch_delete_do1.v_fee_do_airi.Requery;
|
|
|
fra_ch_delete_do1.v_fee_do_airi_sum.Requery;
|
|
|
end;
|
|
|
end;
|
|
|
5:
|
|
|
begin
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if if_ch_delete_do then
|
|
|
begin
|
|
|
case delete_do_type_num of
|
|
|
1,2,3,4:
|
|
|
begin
|
|
|
if fra_ch_add_do1.t_op_seae.Active then
|
|
|
begin
|
|
|
fra_ch_add_do1.t_ch_fee.Requery();
|
|
|
fra_ch_add_do1.t_ch_fee_sum.Requery();
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
delete_do_type_num:=0;
|
|
|
if_ch_delete_do:=false;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.RxDBLookupCombo1Enter(Sender: TObject);
|
|
|
begin
|
|
|
if fra_ch_delete_do1.v_fee_do_seae.IsEmpty and fra_ch_delete_do1.v_fee_do_seai.IsEmpty
|
|
|
and fra_ch_delete_do1.v_fee_do_aire.IsEmpty and fra_ch_delete_do1.v_fee_do_airi.IsEmpty then
|
|
|
begin
|
|
|
RxDBLookupCombo1.ReadOnly:=false;
|
|
|
RxDBLookupCombo2.ReadOnly:=false;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
RxDBLookupCombo1.ReadOnly:=true;
|
|
|
RxDBLookupCombo2.ReadOnly:=true;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.dxDBGrid1Column2CustomDraw(Sender: TObject;
|
|
|
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
|
|
|
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
|
|
|
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
|
|
|
begin
|
|
|
if (ANode.strings[dxDBGrid1Column2.Index]='<27><><EFBFBD><EFBFBD><EFBFBD>տ<EFBFBD>')or
|
|
|
(ANode.strings[dxDBGrid1Column2.Index]='<27><><EFBFBD><EFBFBD>') then
|
|
|
AColor :=clwhite
|
|
|
else if (ANode.strings[dxDBGrid1Column2.Index]='<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>')or
|
|
|
(ANode.strings[dxDBGrid1Column2.Index]='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') then
|
|
|
AColor :=clyellow
|
|
|
else if (ANode.strings[dxDBGrid1Column2.Index]='<27><>ֹ<EFBFBD><EFBFBD>')or
|
|
|
(ANode.strings[dxDBGrid1Column2.Index]='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')then
|
|
|
AColor :=clred
|
|
|
else if (ANode.strings[dxDBGrid1Column2.Index]='<27><><EFBFBD>տ<EFBFBD>')or
|
|
|
(ANode.strings[dxDBGrid1Column2.Index]='<27>տ<EFBFBD><D5BF><EFBFBD><EFBFBD><EFBFBD>') then
|
|
|
AColor :=$00DDF21C;
|
|
|
|
|
|
AFont.Color:=clblack;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.DBEdit1Change(Sender: TObject);
|
|
|
begin
|
|
|
if (DBEdit1.Text='') or (DBEdit1.Text='<27><><EFBFBD>뿪Ʊ') or
|
|
|
(DBEdit1.Text='<27><><EFBFBD><EFBFBD>')then
|
|
|
DBEdit1.Color:=clwhite
|
|
|
else if (DBEdit1.Text='<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>') or (DBEdit1.Text='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') then
|
|
|
DBEdit1.Color:=clyellow
|
|
|
else if (DBEdit1.Text='<27><>ֹ<EFBFBD><EFBFBD>') or (DBEdit1.Text='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') then
|
|
|
DBEdit1.Color:=clred
|
|
|
else if (DBEdit1.Text='<27><><EFBFBD><D7BC>Ʊ') or (DBEdit1.Text='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ') then
|
|
|
DBEdit1.Color:=$00DDF21C;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.FormCloseQuery(Sender: TObject;
|
|
|
var CanClose: Boolean);
|
|
|
begin
|
|
|
CanClose:=frm_close_query(t_ch_accept);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.bsSkinButton9Click(Sender: TObject);
|
|
|
var
|
|
|
aQuery:TAdoQuery;
|
|
|
strbs,strwt,strmb:WideString;
|
|
|
begin
|
|
|
|
|
|
if t_ch_accept.IsEmpty then
|
|
|
exit;
|
|
|
table_post(t_ch_accept);
|
|
|
if strtobool(get_parameters_value(27,'false'))then
|
|
|
begin
|
|
|
if (t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>')or
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')or
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>տ<EFBFBD>')or
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>')then
|
|
|
begin
|
|
|
if application.MessageBox('<27><>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD><EFBFBD>Ͳ<EFBFBD><CDB2><EFBFBD><EFBFBD>Խ<EFBFBD><D4BD>и<EFBFBD><D0B8><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD>ȷ<EFBFBD>ϴ<EFBFBD>ӡ<EFBFBD><D3A1>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)<>IDOK then
|
|
|
exit;
|
|
|
try
|
|
|
|
|
|
modify_all:=true;
|
|
|
edittrue:=true;
|
|
|
t_ch_accept.Edit;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>״̬']:='<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>';
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
|
|
|
t_ch_accept.FieldByName('<27><>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD>').AsInteger:=t_ch_accept.FieldByName('<27><>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD>').AsInteger+1;
|
|
|
t_ch_accept.post;
|
|
|
edittrue:=false;
|
|
|
|
|
|
finally
|
|
|
modify_all:=false;
|
|
|
edittrue:=false;
|
|
|
end;
|
|
|
end;
|
|
|
end else begin
|
|
|
try
|
|
|
modify_all:=true;
|
|
|
edittrue:=true;
|
|
|
t_ch_accept.Edit;
|
|
|
t_ch_accept.FieldByName('<27><>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD>').AsInteger:=t_ch_accept.FieldByName('<27><>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD>').AsInteger+1;
|
|
|
t_ch_accept.post;
|
|
|
edittrue:=false;
|
|
|
finally
|
|
|
modify_all:=false;
|
|
|
edittrue:=false;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
memtblprint.close;
|
|
|
memtblprint.Open;
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
Close;SQL.Clear;
|
|
|
sql.Add('select distinct ί<>б<EFBFBD><D0B1><EFBFBD>,ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>ᵥ<EFBFBD><E1B5A5> from v_op_bscard where <20><><EFBFBD><EFBFBD> in (select ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_ch_fee_do where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+''')');
|
|
|
Open;
|
|
|
first;
|
|
|
while not eof do begin
|
|
|
if strwt='' then
|
|
|
strwt:=fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').AsString
|
|
|
else
|
|
|
strwt:=strwt+'/'+fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').AsString;
|
|
|
if strbs='' then
|
|
|
strbs:=fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString
|
|
|
else
|
|
|
strbs:=strbs+'/'+fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
|
if strmb='' then
|
|
|
strmb:=fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString
|
|
|
else
|
|
|
strmb:=strmb+'/'+fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString;
|
|
|
Next;
|
|
|
end;
|
|
|
memtblprint.Edit;
|
|
|
memtblprint.fieldbyname('bsno').AsString:=strbs;
|
|
|
memtblprint.fieldbyname('wtno').AsString:=strwt;
|
|
|
memtblprint.fieldbyname('mblno').AsString:=strmb;
|
|
|
memtblprint.post;
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
|
|
|
if StrToBool(get_parameters_value(85,'false')) then begin
|
|
|
sys_print('ҵ<><D2B5><EFBFBD>տ<EFBFBD><D5BF><EFBFBD><EFBFBD><EFBFBD>',2,t_ch_accept1,memtblprint1,nil,nil,fra_ch_delete_do1.v_fee_do_bscard1,nil,nil,nil,t_ch_accept1,p_accept_bill1,nil);
|
|
|
end else begin
|
|
|
sys_print('ҵ<><D2B5><EFBFBD>տ<EFBFBD><D5BF><EFBFBD><EFBFBD><EFBFBD>',2,t_ch_accept1,memtblprint1,nil,nil,fra_ch_delete_do1.v_fee_do_seae1,fra_ch_delete_do1.v_fee_do_seai1,fra_ch_delete_do1.v_fee_do_aire1,fra_ch_delete_do1.v_fee_do_airi1,t_ch_accept1,p_accept_bill1,nil);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.bsSkinButton8Click(Sender: TObject);
|
|
|
var aAdoQuery:TAdoQuery;
|
|
|
begin
|
|
|
if t_ch_accept.FieldByName('<27>տʽ').asstring<>'֧Ʊ' then
|
|
|
begin
|
|
|
showmessage('ֻ<><D6BB><EFBFBD>տʽΪ֧Ʊ<D6A7>ſ<EFBFBD><C5BF>Խ<EFBFBD><D4BD><EFBFBD>֧Ʊ<D6A7><C6B1><EFBFBD><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
if t_ch_accept.IsEmpty then
|
|
|
exit;
|
|
|
if (t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD>տ<EFBFBD>')or
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><>ֹ<EFBFBD><EFBFBD>')or
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27>տ<EFBFBD><D5BF><EFBFBD><EFBFBD><EFBFBD>')or
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')then
|
|
|
begin
|
|
|
showmessage('<27><>ǰ<EFBFBD>ʵ<EFBFBD>״̬Ϊ:'+t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<DEB8><C4A3><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
aAdoQuery:=CreateAdoQuery;
|
|
|
with aAdoQuery do
|
|
|
try
|
|
|
Close;sql.Clear;
|
|
|
SQL.Add('Update t_ch_accept set <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:emp,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:adate');
|
|
|
SQL.Add('Where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:bsno');
|
|
|
Parameters.ParamByName('bsno').Value:=t_ch_accept.fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value;
|
|
|
Parameters.ParamByName('emp').Value:=employee;
|
|
|
Parameters.ParamByName('adate').Value:=date;
|
|
|
ExecSql;
|
|
|
finally
|
|
|
t_ch_accept.refresh;
|
|
|
Free;
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.bsSkinButton10Click(Sender: TObject);
|
|
|
begin
|
|
|
try
|
|
|
frm_ch_shen_query:=tfrm_ch_shen_query.Create (self);
|
|
|
shen_query_type:=8;
|
|
|
shen_query_limited:='1003';
|
|
|
shen_query_op_limited:='1004';
|
|
|
frm_ch_shen_query.ShowModal;
|
|
|
finally
|
|
|
frm_ch_shen_query.Free;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.t_ch_acceptAfterDelete(DataSet: TDataSet);
|
|
|
begin
|
|
|
if fra_ch_add_do1.t_op_seae.Active then
|
|
|
fra_ch_add_do1.t_op_seae.Requery();
|
|
|
if fra_ch_add_do1.t_op_seai.Active then
|
|
|
fra_ch_add_do1.t_op_seai.Requery();
|
|
|
if fra_ch_add_do1.t_op_aire.Active then
|
|
|
fra_ch_add_do1.t_op_aire.Requery();
|
|
|
if fra_ch_add_do1.t_op_airi.Active then
|
|
|
fra_ch_add_do1.t_op_airi.Requery();
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.DBEdit14KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.DBEdit1KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_RxDBLookupCombo(Key,RxDBLookupCombo1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.RxDBLookupCombo1KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_RxDBLookupCombo(Key,RxDBLookupCombo2);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.RxDBLookupCombo2KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.bsSkinDBCheckRadioBox1KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit4);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.DBEdit4KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit2);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.DBEdit2KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit6);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.DBEdit6KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit8);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.DBEdit8KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBComboBox(Key,wwDBComboBox1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.DBEdit3KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit7);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.N10Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_no(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.N14Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_all(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.N12Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid(dxdbgrid1,6);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.N16Click(Sender: TObject);
|
|
|
begin
|
|
|
grid_save_xls(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.dxDBGrid1ColumnSorting(Sender: TObject;
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
begin
|
|
|
Column_sort(Column,t_ch_accept,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.wwDBDateTimePicker1KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBMemo(Key,DBMemo1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.DBEdit7KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBDateTimePicker(Key,wwDBDateTimePicker1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.bsSkinPanel2Resize(Sender: TObject);
|
|
|
var
|
|
|
i:integer;
|
|
|
begin
|
|
|
i:=round(bsSkinPanel2.Width/12);
|
|
|
bsSkinButton10.Width:=i;
|
|
|
bsSkinButton9.Width:=i;
|
|
|
bsSkinButton2.Width:=i;
|
|
|
bsSkinButton3.Width:=i;
|
|
|
bsSkinButton4.Width:=i;
|
|
|
bsSkinButton1.Width:=i;
|
|
|
bsSkinButton11.Width:=i;
|
|
|
bsSkinButton6.Width:=i;
|
|
|
bsSkinButton38.Width:=i;
|
|
|
bsSkinButton7.Width:=i;
|
|
|
bsSkinButton8.Width:=i;
|
|
|
bsSkinButton12.Left:=bsSkinPanel2.Width-bsSkinButton12.Width-20;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.wwDBComboBox1KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit3);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.bsSkinButton12Click(Sender: TObject);
|
|
|
var
|
|
|
Pnt:Tpoint;
|
|
|
begin
|
|
|
Pnt:=bsSkinButton12.ClientToScreen(Point(0,bsSkinButton12.Height));
|
|
|
PopupMenu3.Popup(Pnt.x,Pnt.y);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.N17Click(Sender: TObject);
|
|
|
begin
|
|
|
t_ch_accept.Close;
|
|
|
t_ch_accept.SQL.clear;
|
|
|
t_ch_accept.SQL.Add('select * from t_ch_accept where <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><><EFBFBD><EFBFBD><EFBFBD>տ<EFBFBD>'+''''
|
|
|
+') and '
|
|
|
+open_data('1003','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no','no')
|
|
|
+'order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> desc');
|
|
|
t_ch_accept.open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.N34Click(Sender: TObject);
|
|
|
begin
|
|
|
t_ch_accept.Close;
|
|
|
t_ch_accept.SQL.clear;
|
|
|
t_ch_accept.SQL.Add('select * from t_ch_check where <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+''''
|
|
|
+','+''''+'<27><>ֹ<EFBFBD><EFBFBD>'+''''+') and '
|
|
|
+open_data('1003','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no','no')
|
|
|
+'order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> desc');
|
|
|
t_ch_accept.open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.N36Click(Sender: TObject);
|
|
|
begin
|
|
|
t_ch_accept.Close;
|
|
|
t_ch_accept.SQL.clear;
|
|
|
t_ch_accept.SQL.Add('select * from t_ch_check where <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>'+''''
|
|
|
+','+''''+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+''''+') and '
|
|
|
+open_data('1003','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no','no')
|
|
|
+'order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> desc');
|
|
|
t_ch_accept.open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.N6Click(Sender: TObject);
|
|
|
begin
|
|
|
t_ch_accept.Close;
|
|
|
t_ch_accept.SQL.clear;
|
|
|
t_ch_accept.SQL.Add('select * from t_ch_check where <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><><EFBFBD>տ<EFBFBD>'+''''
|
|
|
+','+''''+'<27><>ֹ<EFBFBD><EFBFBD>'+''''+') and '
|
|
|
+open_data('1003','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no','no')
|
|
|
+'order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> desc');
|
|
|
t_ch_accept.open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.N4Click(Sender: TObject);
|
|
|
begin
|
|
|
t_ch_accept.Close;
|
|
|
t_ch_accept.SQL.clear;
|
|
|
t_ch_accept.SQL.Add('select * from t_ch_check where <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27>տ<EFBFBD><D5BF><EFBFBD><EFBFBD><EFBFBD>'+''''+') and '
|
|
|
+open_data('1003','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no','no')
|
|
|
+'order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> desc');
|
|
|
t_ch_accept.open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.bsSkinButton7Click(Sender: TObject);
|
|
|
var
|
|
|
afield : variant;
|
|
|
i: Integer;
|
|
|
begin
|
|
|
if t_ch_accept.IsEmpty then
|
|
|
exit;
|
|
|
try
|
|
|
afield := vararraycreate([0,t_ch_accept.fieldcount-1],varvariant);
|
|
|
for i := 0 to (t_ch_accept.fieldcount-1) do
|
|
|
begin
|
|
|
afield[i] :=t_ch_accept.fields[i].value ;
|
|
|
end;
|
|
|
t_ch_accept.insert;
|
|
|
for i := 0 to (t_ch_accept.fieldcount-1) do
|
|
|
begin
|
|
|
if t_ch_accept.fields[i].FieldName<>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'then
|
|
|
t_ch_accept.fields[i].value := afield[i] ;
|
|
|
end;
|
|
|
t_ch_accept['<27><><EFBFBD>غ<EFBFBD><D8BA><EFBFBD>']:='';
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD><EFBFBD>տ<EFBFBD>';
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
|
|
|
t_ch_accept['<27>Զ<EFBFBD>']:=1;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept['ʵ<>ʽ<EFBFBD><CABD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27>鿪<EFBFBD><E9BFAA><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>']:=0;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
t_ch_accept['֧Ʊ̧ͷ']:='';
|
|
|
t_ch_accept['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:='';
|
|
|
t_ch_accept['<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
bsSkinNotebook1.PageIndex:=1;
|
|
|
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
|
|
|
except
|
|
|
if t_ch_accept.state=dsinsert then
|
|
|
t_ch_accept.cancel;
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.fra_ch_add_do1bsSkinButton10Click(
|
|
|
Sender: TObject);
|
|
|
begin
|
|
|
fra_ch_add_do1.bsSkinButton10Click(Sender);
|
|
|
end;
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.bsSkinNotebook1PageChanged(Sender: TObject);
|
|
|
begin
|
|
|
if not ch_accept_shen_open then exit;
|
|
|
if bsSkinNotebook1.PageIndex<>1 then exit;
|
|
|
{
|
|
|
if StrToBool(get_parameters_value(85,'false')) then begin
|
|
|
fra_ch_delete_do1.v_fee_do_bscard.close;
|
|
|
fra_ch_delete_do1.v_fee_do_bscard.SQL.clear;
|
|
|
fra_ch_delete_do1.v_fee_do_bscard.sql.add('select * from v_fee_do_bscard '
|
|
|
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+''' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
fra_ch_delete_do1.v_fee_do_bscard.Open;
|
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_bscard_sum.close;
|
|
|
fra_ch_delete_do1.v_fee_do_bscard_sum.SQL.clear;
|
|
|
fra_ch_delete_do1.v_fee_do_bscard_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ԭʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_bscard '
|
|
|
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+''' group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ԭʼ<D4AD>ұ<EFBFBD> '
|
|
|
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
|
|
|
fra_ch_delete_do1.v_fee_do_bscard_sum.Open;
|
|
|
|
|
|
end else begin
|
|
|
fra_ch_delete_do1.v_fee_do_seae.close;
|
|
|
fra_ch_delete_do1.v_fee_do_seae.SQL.clear;
|
|
|
fra_ch_delete_do1.v_fee_do_seae.sql.add('select * from v_fee_do_seae '
|
|
|
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+''' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
fra_ch_delete_do1.v_fee_do_seae.Open;
|
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_seai.close;
|
|
|
fra_ch_delete_do1.v_fee_do_seai.SQL.clear;
|
|
|
fra_ch_delete_do1.v_fee_do_seai.sql.add('select * from v_fee_do_seai '
|
|
|
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+''' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
fra_ch_delete_do1.v_fee_do_seai.Open;
|
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_aire.close;
|
|
|
fra_ch_delete_do1.v_fee_do_aire.SQL.clear;
|
|
|
fra_ch_delete_do1.v_fee_do_aire.sql.add('select * from v_fee_do_aire '
|
|
|
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+''' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
fra_ch_delete_do1.v_fee_do_aire.Open;
|
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_airi.close;
|
|
|
fra_ch_delete_do1.v_fee_do_airi.SQL.clear;
|
|
|
fra_ch_delete_do1.v_fee_do_airi.sql.add('select * from v_fee_do_airi '
|
|
|
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+''' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
fra_ch_delete_do1.v_fee_do_airi.Open;
|
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_seae_sum.close;
|
|
|
fra_ch_delete_do1.v_fee_do_seae_sum.SQL.clear;
|
|
|
fra_ch_delete_do1.v_fee_do_seae_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ԭʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_seae '
|
|
|
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+''' group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ԭʼ<D4AD>ұ<EFBFBD> '
|
|
|
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
|
|
|
fra_ch_delete_do1.v_fee_do_seae_sum.Open;
|
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_seai_sum.close;
|
|
|
fra_ch_delete_do1.v_fee_do_seai_sum.SQL.clear;
|
|
|
fra_ch_delete_do1.v_fee_do_seai_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ԭʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_seai '
|
|
|
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+''' group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ԭʼ<D4AD>ұ<EFBFBD> '
|
|
|
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
|
|
|
fra_ch_delete_do1.v_fee_do_seai_sum.Open;
|
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_aire_sum.close;
|
|
|
fra_ch_delete_do1.v_fee_do_aire_sum.SQL.clear;
|
|
|
fra_ch_delete_do1.v_fee_do_aire_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ԭʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_aire '
|
|
|
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+''' group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ԭʼ<D4AD>ұ<EFBFBD> '
|
|
|
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
|
|
|
fra_ch_delete_do1.v_fee_do_aire_sum.Open;
|
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_airi_sum.close;
|
|
|
fra_ch_delete_do1.v_fee_do_airi_sum.SQL.clear;
|
|
|
fra_ch_delete_do1.v_fee_do_airi_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ԭʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_airi '
|
|
|
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+''' group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ԭʼ<D4AD>ұ<EFBFBD> '
|
|
|
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
|
|
|
fra_ch_delete_do1.v_fee_do_airi_sum.Open;
|
|
|
end;
|
|
|
}
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.bsSkinButton38Click(Sender: TObject);
|
|
|
var
|
|
|
book1:Tbookmark;
|
|
|
begin
|
|
|
if t_ch_accept.IsEmpty then
|
|
|
exit;
|
|
|
book1:=t_ch_accept.GetBookmark;
|
|
|
t_ch_accept.Requery;
|
|
|
t_ch_accept.GotoBookmark(book1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.fra_ch_delete_do1N1Click(Sender: TObject);
|
|
|
begin
|
|
|
fra_ch_delete_do1.N1Click(Sender);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.fra_ch_add_do1bsSkinButton1Click(
|
|
|
Sender: TObject);
|
|
|
begin
|
|
|
fra_ch_add_do1.bsSkinButton1Click(Sender);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.fra_ch_add_do1bsSkinButton8Click(
|
|
|
Sender: TObject);
|
|
|
begin
|
|
|
fra_ch_add_do1.bsSkinButton8Click(Sender);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.fra_ch_add_do1MenuItem1Click(
|
|
|
Sender: TObject);
|
|
|
begin
|
|
|
fra_ch_add_do1.MenuItem1Click(Sender);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_accept_shen.DBEdit17KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
var aAdoQuery:TAdoQuery;
|
|
|
begin
|
|
|
if key=#13 then
|
|
|
begin
|
|
|
key:=#0;
|
|
|
aAdoQuery:=CreateAdoQuery;
|
|
|
with aAdoQuery do
|
|
|
try
|
|
|
Close;Sql.Clear;
|
|
|
sql.Add('Select * from t_ch_invoice');
|
|
|
sql.Add('where (<28>Ƿ<EFBFBD><C7B7>շ<EFBFBD>=0 or <20>Ƿ<EFBFBD><C7B7>շ<EFBFBD> is null) and (<28>Ƿ<EFBFBD><C7B7>ϳ<EFBFBD>=0 or <20>Ƿ<EFBFBD><C7B7>ϳ<EFBFBD> is null ) and <20><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>=:invno');
|
|
|
Parameters.ParamByName('invno').Value:=DBEdit17.Text;
|
|
|
Open;
|
|
|
if not isEmpty then
|
|
|
begin
|
|
|
t_ch_accept.Edit;
|
|
|
t_ch_accept.FieldByName('<27><>Ʊ̧ͷ').Value:=fieldByName('<27><>Ʊ̧ͷ').asstring;
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value;
|
|
|
t_ch_accept.FieldByName('<27>ᵥ<EFBFBD><E1B5A5>').Value:=fieldByName('<27>ᵥ<EFBFBD><E1B5A5>').asstring;
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD>˸<EFBFBD>').Value:=fieldByName('<27><><EFBFBD>˸<EFBFBD>').asstring;
|
|
|
t_ch_accept.FieldByName('ж<><D0B6><EFBFBD><EFBFBD>').Value:=fieldByName('ж<><D0B6><EFBFBD><EFBFBD>').asstring;
|
|
|
t_ch_accept.FieldByName('Ŀ<>ĸ<EFBFBD>').Value:=fieldByName('Ŀ<>ĸ<EFBFBD>').asstring;
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>').Value:=fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>').asstring;
|
|
|
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>').Value:=fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>').asstring;
|
|
|
t_ch_accept.post;
|
|
|
end;
|
|
|
finally
|
|
|
Free;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end.
|