|
|
|
|
unit u_ch_check_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;
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
Tfrm_ch_check_shen = class(TForm)
|
|
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
|
|
bsSkinButton8: TbsSkinButton;
|
|
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
|
|
bsSkinButton11: TbsSkinButton;
|
|
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
|
|
bsSkinNotebook1: TbsSkinNotebook;
|
|
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
|
|
bsSkinPanel3: TbsSkinPanel;
|
|
|
|
|
Label25: TLabel;
|
|
|
|
|
Label17: TLabel;
|
|
|
|
|
Label18: TLabel;
|
|
|
|
|
Label12: TLabel;
|
|
|
|
|
DBEdit14: TDBEdit;
|
|
|
|
|
DBEdit1: TDBEdit;
|
|
|
|
|
RxDBLookupCombo1: TRxDBLookupCombo;
|
|
|
|
|
fra_ch_add_do1: Tfra_ch_add_do;
|
|
|
|
|
t_ch_check: TADOQuery;
|
|
|
|
|
t_ch_check1: 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;
|
|
|
|
|
Label2: TLabel;
|
|
|
|
|
RxDBLookupCombo2: TRxDBLookupCombo;
|
|
|
|
|
DBEdit2: TDBEdit;
|
|
|
|
|
Label4: TLabel;
|
|
|
|
|
DBEdit4: TDBEdit;
|
|
|
|
|
Label5: TLabel;
|
|
|
|
|
Label3: TLabel;
|
|
|
|
|
DBEdit6: TDBEdit;
|
|
|
|
|
bsSkinDBCheckRadioBox1: TbsSkinDBCheckRadioBox;
|
|
|
|
|
Label1: TLabel;
|
|
|
|
|
DBEdit3: TDBEdit;
|
|
|
|
|
Label10: TLabel;
|
|
|
|
|
DBMemo1: TDBMemo;
|
|
|
|
|
fra_ch_delete_do1: Tfra_ch_delete_do;
|
|
|
|
|
Label6: TLabel;
|
|
|
|
|
DBEdit7: TDBEdit;
|
|
|
|
|
dxDBGrid1Column16: TdxDBGridColumn;
|
|
|
|
|
Label7: TLabel;
|
|
|
|
|
DBEdit8: TDBEdit;
|
|
|
|
|
XPMenu1: TXPMenu;
|
|
|
|
|
PopupMenu2: TPopupMenu;
|
|
|
|
|
N10: TMenuItem;
|
|
|
|
|
N11: TMenuItem;
|
|
|
|
|
N14: TMenuItem;
|
|
|
|
|
N13: TMenuItem;
|
|
|
|
|
N12: TMenuItem;
|
|
|
|
|
N15: TMenuItem;
|
|
|
|
|
N16: TMenuItem;
|
|
|
|
|
dxDBGrid1Column17: TdxDBGridColumn;
|
|
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
|
|
Label8: TLabel;
|
|
|
|
|
wwDBComboBox1: TwwDBComboBox;
|
|
|
|
|
PopupMenu3: TPopupMenu;
|
|
|
|
|
N17: TMenuItem;
|
|
|
|
|
N18: TMenuItem;
|
|
|
|
|
N34: TMenuItem;
|
|
|
|
|
N35: TMenuItem;
|
|
|
|
|
N36: TMenuItem;
|
|
|
|
|
N1: TMenuItem;
|
|
|
|
|
N6: TMenuItem;
|
|
|
|
|
N5: TMenuItem;
|
|
|
|
|
N4: TMenuItem;
|
|
|
|
|
bsSkinButton12: TbsSkinButton;
|
|
|
|
|
bsSkinButton7: TbsSkinButton;
|
|
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton11Click(Sender: TObject);
|
|
|
|
|
procedure t_ch_checkAfterInsert(DataSet: TDataSet);
|
|
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
|
|
procedure t_ch_checkBeforePost(DataSet: TDataSet);
|
|
|
|
|
procedure DBEdit4Enter(Sender: TObject);
|
|
|
|
|
procedure t_ch_checkBeforeEdit(DataSet: TDataSet);
|
|
|
|
|
procedure bsSkinButton6Click(Sender: TObject);
|
|
|
|
|
procedure t_ch_checkAfterPost(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_checkAfterDelete(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);
|
|
|
|
|
private
|
|
|
|
|
{ Private declarations }
|
|
|
|
|
public
|
|
|
|
|
{ Public declarations }
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
var
|
|
|
|
|
frm_ch_check_shen: Tfrm_ch_check_shen;
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
uses u_main, u_ch_shen_query, my_sys_function, u_data_share, my_sys_chat;
|
|
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.FormClose(Sender: TObject;
|
|
|
|
|
var Action: TCloseAction);
|
|
|
|
|
begin
|
|
|
|
|
savereggrid(dxdbgrid1,caption);
|
|
|
|
|
frm_ch_check_shen.Hide;
|
|
|
|
|
frm_ch_check_shen.ManualFloat(frm_ch_check_shen.BoundsRect );
|
|
|
|
|
frm_main.freeTabs('frm_ch_check_shen');
|
|
|
|
|
action:=cafree;
|
|
|
|
|
frm_ch_check_shen:=nil;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.FormShow(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
t_ch_check.Close;
|
|
|
|
|
t_ch_check.SQL.clear;
|
|
|
|
|
t_ch_check.SQL.Add('select * from t_ch_check where <20><><EFBFBD><EFBFBD>״̬ not in ('+''''+'<27><>֧<D7BC><D6A7>'+''''
|
|
|
|
|
+','+''''+'֧<><D6A7><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_check.open;
|
|
|
|
|
t_ch_fee_do.open;
|
|
|
|
|
|
|
|
|
|
fra_ch_add_do1.do_ban1.DataSet:=t_ch_check;
|
|
|
|
|
fra_ch_add_do1.bs_text.text:='2';
|
|
|
|
|
fra_ch_add_do1.t_ch_fee_do.open;
|
|
|
|
|
|
|
|
|
|
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_check1;
|
|
|
|
|
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_check1;
|
|
|
|
|
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_check1;
|
|
|
|
|
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_check1;
|
|
|
|
|
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_check1;
|
|
|
|
|
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_check1;
|
|
|
|
|
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_check1;
|
|
|
|
|
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_check1;
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_airi_sum.Open;
|
|
|
|
|
|
|
|
|
|
fra_ch_delete_do1.bs_text.Text:='2';
|
|
|
|
|
fra_ch_delete_do1.do_ban1.DataSet:=t_ch_check;
|
|
|
|
|
|
|
|
|
|
loadreggrid(dxdbgrid1,false,caption);
|
|
|
|
|
frm_data_share.t_crm_client_all.requery;
|
|
|
|
|
frm_data_share.t_code_currency.requery;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.bsSkinButton11Click(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
answer:TModalResult;
|
|
|
|
|
begin
|
|
|
|
|
if bsSkinButton11.Caption='<27>༭<EFBFBD><EFBFBD>' then
|
|
|
|
|
begin
|
|
|
|
|
if t_ch_check.IsEmpty then
|
|
|
|
|
exit;
|
|
|
|
|
bsSkinNotebook1.PageIndex:=1;
|
|
|
|
|
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
if (t_ch_check.State=dsinsert)or(t_ch_check.State=dsedit) then
|
|
|
|
|
BEGIN
|
|
|
|
|
answer:=messagedlg( '<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE>ģ<DEB8><C4A3>Ƿ棿',mtWarning,mbYesNoCancel,0);
|
|
|
|
|
if answer=mrYes then
|
|
|
|
|
begin
|
|
|
|
|
t_ch_check.post;
|
|
|
|
|
end;
|
|
|
|
|
if answer=mrNo then
|
|
|
|
|
begin
|
|
|
|
|
t_ch_check.cancel;
|
|
|
|
|
end;
|
|
|
|
|
if answer=mrCancel then
|
|
|
|
|
begin
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
END;
|
|
|
|
|
bsSkinNotebook1.PageIndex:=0;
|
|
|
|
|
bsSkinButton11.Caption:='<27>༭<EFBFBD><EFBFBD>';
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.t_ch_checkAfterInsert(DataSet: TDataSet);
|
|
|
|
|
begin
|
|
|
|
|
t_ch_check['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD>֧<EFBFBD><D6A7>';
|
|
|
|
|
t_ch_check['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
|
|
t_ch_check['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
|
|
|
|
|
t_ch_check['<27>Զ<EFBFBD>']:=1;
|
|
|
|
|
t_ch_check['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
|
|
t_ch_check['ʵ<>ʽ<EFBFBD><CABD><EFBFBD>']:=0;
|
|
|
|
|
t_ch_check['<27>鿪<EFBFBD><E9BFAA><EFBFBD><EFBFBD>']:=0;
|
|
|
|
|
t_ch_check['֧<><D6A7><EFBFBD><EFBFBD>ʽ']:='֧Ʊ';
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
t_ch_check.insert;
|
|
|
|
|
bsSkinNotebook1.PageIndex:=1;
|
|
|
|
|
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.bsSkinButton2Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
table_post(t_ch_check);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.bsSkinButton4Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if t_ch_check.IsEmpty then
|
|
|
|
|
exit;
|
|
|
|
|
if (t_ch_check.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><>֧<D7BC><D6A7>')or
|
|
|
|
|
(t_ch_check.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><>ֹ<EFBFBD><EFBFBD>')or
|
|
|
|
|
(t_ch_check.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='֧<><D6A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')or
|
|
|
|
|
(t_ch_check.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>')or
|
|
|
|
|
(t_ch_check.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
|
|
|
|
|
t_ch_fee_do.requery;
|
|
|
|
|
while not t_ch_fee_do.eof do
|
|
|
|
|
t_ch_fee_do.delete;
|
|
|
|
|
t_ch_check.Delete;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.bsSkinButton3Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
table_cancel(t_ch_check);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.t_ch_checkBeforePost(DataSet: TDataSet);
|
|
|
|
|
begin
|
|
|
|
|
table_before_post(t_ch_check,'<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
table_before_post(t_ch_check,'<27>ұ<EFBFBD>');
|
|
|
|
|
table_before_post(t_ch_check,'Ҫ<><D2AA>֧<EFBFBD><D6A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
t_ch_check['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=s_w(strtoint(get_parameters_value(65,'2')),t_ch_check['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
|
|
|
|
|
t_ch_check['ʵ<>ʽ<EFBFBD><CABD><EFBFBD>']:=s_w(strtoint(get_parameters_value(65,'2')),t_ch_check['ʵ<>ʽ<EFBFBD><CABD><EFBFBD>']);
|
|
|
|
|
t_ch_check['<27>鿪<EFBFBD><E9BFAA><EFBFBD><EFBFBD>']:=s_w(strtoint(get_parameters_value(65,'2')),t_ch_check['<27>鿪<EFBFBD><E9BFAA><EFBFBD><EFBFBD>']);
|
|
|
|
|
if t_ch_check.FieldByName('<27>Զ<EFBFBD>').asboolean then
|
|
|
|
|
begin
|
|
|
|
|
t_ch_check['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_check['ʵ<>ʽ<EFBFBD><CABD><EFBFBD>'];
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
{ if t_ch_check['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']<t_ch_check['ʵ<>ʽ<EFBFBD><CABD><EFBFBD>'] then
|
|
|
|
|
begin
|
|
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD><EEB2BB>С<EFBFBD><D0A1>ʵ<EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EEA3A1>');
|
|
|
|
|
abort;
|
|
|
|
|
end; }
|
|
|
|
|
end;
|
|
|
|
|
t_ch_check['<27><><EFBFBD><EFBFBD>״̬']:=t_ch_check['<27><><EFBFBD><EFBFBD>״̬'];
|
|
|
|
|
if t_ch_check.state=dsinsert then
|
|
|
|
|
t_ch_check['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=get_no(date,'CS');
|
|
|
|
|
t_ch_check['<27>鿪<EFBFBD><E9BFAA><EFBFBD><EFBFBD>']:=t_ch_check['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']-t_ch_check['ʵ<>ʽ<EFBFBD><CABD><EFBFBD>'];
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.DBEdit4Enter(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if bsSkinDBCheckRadioBox1.Checked then
|
|
|
|
|
DBEdit4.ReadOnly:=true
|
|
|
|
|
else
|
|
|
|
|
DBEdit4.ReadOnly:=false;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.t_ch_checkBeforeEdit(DataSet: TDataSet);
|
|
|
|
|
begin
|
|
|
|
|
if not modify_all then
|
|
|
|
|
begin
|
|
|
|
|
if (t_ch_check.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><>֧<D7BC><D6A7>')or
|
|
|
|
|
(t_ch_check.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><>ֹ<EFBFBD><EFBFBD>')or
|
|
|
|
|
(t_ch_check.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='֧<><D6A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')or
|
|
|
|
|
(t_ch_check.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>')or
|
|
|
|
|
(t_ch_check.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_check_shen.bsSkinButton6Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if t_ch_check.IsEmpty then
|
|
|
|
|
exit;
|
|
|
|
|
if (t_ch_check.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>֧<EFBFBD><D6A7>')or
|
|
|
|
|
(t_ch_check.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>')or
|
|
|
|
|
(t_ch_check.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')then
|
|
|
|
|
begin
|
|
|
|
|
t_ch_check.Edit;
|
|
|
|
|
t_ch_check['<27><><EFBFBD><EFBFBD>״̬']:='<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>';
|
|
|
|
|
t_ch_check.post;
|
|
|
|
|
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_check_shen.t_ch_checkAfterPost(DataSet: TDataSet);
|
|
|
|
|
begin
|
|
|
|
|
case delete_do_type_num of
|
|
|
|
|
1:
|
|
|
|
|
begin
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_seae.Requery;
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_seae_sum.Requery;
|
|
|
|
|
end;
|
|
|
|
|
2:
|
|
|
|
|
begin
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_seai.Requery;
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_seai_sum.Requery;
|
|
|
|
|
end;
|
|
|
|
|
3:
|
|
|
|
|
begin
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_aire.Requery;
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_aire_sum.Requery;
|
|
|
|
|
end;
|
|
|
|
|
4:
|
|
|
|
|
begin
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_airi.Requery;
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_airi_sum.Requery;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
{
|
|
|
|
|
case delete_do_type_num of
|
|
|
|
|
1,2,3,4:
|
|
|
|
|
begin
|
|
|
|
|
check_do_sum(1,t_ch_check,
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_seae_sum,fra_ch_delete_do1.v_fee_do_seai_sum,
|
|
|
|
|
fra_ch_delete_do1.v_fee_do_aire_sum,fra_ch_delete_do1.v_fee_do_airi_sum);
|
|
|
|
|
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_check_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_check_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><D6A7>')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><>֧<D7BC><D6A7>')or
|
|
|
|
|
(ANode.strings[dxDBGrid1Column2.Index]='֧<><D6A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') then
|
|
|
|
|
AColor :=$00DDF21C;
|
|
|
|
|
|
|
|
|
|
AFont.Color:=clblack;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_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_check_shen.FormCloseQuery(Sender: TObject;
|
|
|
|
|
var CanClose: Boolean);
|
|
|
|
|
begin
|
|
|
|
|
CanClose:=frm_close_query(t_ch_check);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.bsSkinButton9Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if t_ch_check.IsEmpty then
|
|
|
|
|
exit;
|
|
|
|
|
table_post(t_ch_check);
|
|
|
|
|
if strtobool(get_parameters_value(27,'false'))then
|
|
|
|
|
begin
|
|
|
|
|
if (t_ch_check.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>')or
|
|
|
|
|
(t_ch_check.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')or
|
|
|
|
|
(t_ch_check.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>֧<EFBFBD><D6A7>')or
|
|
|
|
|
(t_ch_check.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;
|
|
|
|
|
t_ch_check.Edit;
|
|
|
|
|
t_ch_check['<27><><EFBFBD><EFBFBD>״̬']:='<27><>֧<D7BC><D6A7>';
|
|
|
|
|
t_ch_check['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
|
|
t_ch_check['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
|
|
|
|
|
t_ch_check.post;
|
|
|
|
|
finally
|
|
|
|
|
modify_all:=false;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
sys_print('ҵ<><D2B5>֧<EFBFBD><D6A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',2,t_ch_check1,nil,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_check1,nil,nil);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.bsSkinButton8Click(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
str:string;
|
|
|
|
|
begin
|
|
|
|
|
if t_ch_check.IsEmpty then
|
|
|
|
|
exit;
|
|
|
|
|
if (t_ch_check.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><>֧<D7BC><D6A7>')or
|
|
|
|
|
(t_ch_check.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><>ֹ<EFBFBD><EFBFBD>')or
|
|
|
|
|
(t_ch_check.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>')then
|
|
|
|
|
begin
|
|
|
|
|
str:=trim(InputBox('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>', '<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD>', ''));
|
|
|
|
|
if str=''then
|
|
|
|
|
begin
|
|
|
|
|
showmessage('<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD><D5A3><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
try
|
|
|
|
|
modify_all:=true;
|
|
|
|
|
t_ch_check.Edit;
|
|
|
|
|
t_ch_check['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
|
|
t_ch_check['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:=str;
|
|
|
|
|
t_ch_check.post;
|
|
|
|
|
Send_invocie_check_shen('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧<EFBFBD><D6A7>,<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','18');
|
|
|
|
|
finally
|
|
|
|
|
modify_all:=false;
|
|
|
|
|
end;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
showmessage('<27><>ǰҵ<C7B0><D2B5>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<DEB8><C4A3><EFBFBD>');
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.bsSkinButton10Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
try
|
|
|
|
|
frm_ch_shen_query:=tfrm_ch_shen_query.Create (self);
|
|
|
|
|
shen_query_type:=4;
|
|
|
|
|
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_check_shen.bsSkinButton5Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
close;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.t_ch_checkAfterDelete(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_check_shen.DBEdit14KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_DBEdit(Key,DBEdit1);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.DBEdit1KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_RxDBLookupCombo(Key,RxDBLookupCombo1);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.RxDBLookupCombo1KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_RxDBLookupCombo(Key,RxDBLookupCombo2);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.RxDBLookupCombo2KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox1);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.bsSkinDBCheckRadioBox1KeyPress(
|
|
|
|
|
Sender: TObject; var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_DBEdit(Key,DBEdit4);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.DBEdit4KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_DBEdit(Key,DBEdit2);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.DBEdit2KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_DBEdit(Key,DBEdit6);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.DBEdit6KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_DBEdit(Key,DBEdit8);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.DBEdit8KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_wwDBComboBox(Key,wwDBComboBox1);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.DBEdit3KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_DBEdit(Key,DBEdit7);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.N10Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
update_grid_view_no(dxdbgrid1);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.N14Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
update_grid_view_all(dxdbgrid1);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.N12Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
update_grid(dxdbgrid1,6);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.N16Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
grid_save_xls(dxdbgrid1);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.dxDBGrid1ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
begin
|
|
|
|
|
Column_sort(Column,t_ch_check,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.wwDBDateTimePicker1KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_DBMemo(Key,DBMemo1);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.DBEdit7KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_wwDBDateTimePicker(Key,wwDBDateTimePicker1);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.bsSkinPanel2Resize(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
i:integer;
|
|
|
|
|
begin
|
|
|
|
|
i:=round(bsSkinPanel2.Width/11);
|
|
|
|
|
bsSkinButton10.Width:=i;
|
|
|
|
|
bsSkinButton9.Width:=i;
|
|
|
|
|
bsSkinButton2.Width:=i;
|
|
|
|
|
bsSkinButton3.Width:=i;
|
|
|
|
|
bsSkinButton4.Width:=i;
|
|
|
|
|
bsSkinButton1.Width:=i;
|
|
|
|
|
bsSkinButton11.Width:=i;
|
|
|
|
|
bsSkinButton6.Width:=i;
|
|
|
|
|
bsSkinButton8.Width:=i;
|
|
|
|
|
bsSkinButton7.Width:=i;
|
|
|
|
|
bsSkinButton12.Left:=bsSkinPanel2.Width-bsSkinButton12.Width-20;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.wwDBComboBox1KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_DBEdit(Key,DBEdit3);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_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_check_shen.N17Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
t_ch_check.Close;
|
|
|
|
|
t_ch_check.SQL.clear;
|
|
|
|
|
t_ch_check.SQL.Add('select * from t_ch_check where <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><><EFBFBD><EFBFBD>֧<EFBFBD><D6A7>'+''''
|
|
|
|
|
+') 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_check.open;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.N34Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
t_ch_check.Close;
|
|
|
|
|
t_ch_check.SQL.clear;
|
|
|
|
|
t_ch_check.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_check.open;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.N36Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
t_ch_check.Close;
|
|
|
|
|
t_ch_check.SQL.clear;
|
|
|
|
|
t_ch_check.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_check.open;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.N6Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
t_ch_check.Close;
|
|
|
|
|
t_ch_check.SQL.clear;
|
|
|
|
|
t_ch_check.SQL.Add('select * from t_ch_check where <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><>֧<D7BC><D6A7>'+''''
|
|
|
|
|
+','+''''+'<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_check.open;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.N4Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
t_ch_check.Close;
|
|
|
|
|
t_ch_check.SQL.clear;
|
|
|
|
|
t_ch_check.SQL.Add('select * from t_ch_check where <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'֧<><D6A7><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_check.open;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_check_shen.bsSkinButton7Click(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
afield : variant;
|
|
|
|
|
i: Integer;
|
|
|
|
|
begin
|
|
|
|
|
if t_ch_check.IsEmpty then
|
|
|
|
|
exit;
|
|
|
|
|
try
|
|
|
|
|
afield := vararraycreate([0,t_ch_check.fieldcount-1],varvariant);
|
|
|
|
|
for i := 0 to (t_ch_check.fieldcount-1) do
|
|
|
|
|
begin
|
|
|
|
|
afield[i] :=t_ch_check.fields[i].value ;
|
|
|
|
|
end;
|
|
|
|
|
t_ch_check.insert;
|
|
|
|
|
for i := 0 to (t_ch_check.fieldcount-1) do
|
|
|
|
|
begin
|
|
|
|
|
if t_ch_check.fields[i].FieldName<>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'then
|
|
|
|
|
t_ch_check.fields[i].value := afield[i] ;
|
|
|
|
|
end;
|
|
|
|
|
t_ch_check['<27><><EFBFBD>غ<EFBFBD><D8BA><EFBFBD>']:='';
|
|
|
|
|
t_ch_check['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD>֧<EFBFBD><D6A7>';
|
|
|
|
|
t_ch_check['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
|
|
t_ch_check['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
|
|
|
|
|
t_ch_check['<27>Զ<EFBFBD>']:=1;
|
|
|
|
|
t_ch_check['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
|
|
t_ch_check['ʵ<>ʽ<EFBFBD><CABD><EFBFBD>']:=0;
|
|
|
|
|
t_ch_check['<27>鿪<EFBFBD><E9BFAA><EFBFBD><EFBFBD>']:=0;
|
|
|
|
|
t_ch_check['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
|
|
t_ch_check['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
|
|
t_ch_check['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
|
|
t_ch_check['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
|
|
t_ch_check['֧Ʊ̧ͷ']:='';
|
|
|
|
|
t_ch_check['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:='';
|
|
|
|
|
t_ch_check['<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
|
|
bsSkinNotebook1.PageIndex:=1;
|
|
|
|
|
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
|
|
|
|
|
except
|
|
|
|
|
if t_ch_check.state=dsinsert then
|
|
|
|
|
t_ch_check.cancel;
|
|
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end.
|