You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1379 lines
44 KiB
Plaintext

11 months ago
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,
kbmMemTable, bsSkinBoxCtrls, DBCtrlsEh;
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;
dxdbgrid1Column18: TdxDBGridColumn;
dxdbgrid1Column19: TdxDBGridColumn;
bsSkinPanel4: TbsSkinPanel;
Label9: TLabel;
Label11: TLabel;
Label13: TLabel;
Label14: TLabel;
Label16: TLabel;
Label20: TLabel;
Label21: TLabel;
Label22: TLabel;
Label23: TLabel;
Label24: TLabel;
Label26: TLabel;
DBEdit5: TDBEdit;
DBEdit9: TDBEdit;
RxDBLookupCombo3: TRxDBLookupCombo;
DBEdit10: TDBEdit;
DBEdit11: TDBEdit;
bsSkinDBCheckRadioBox2: TbsSkinDBCheckRadioBox;
DBEdit13: TDBEdit;
DBMemo2: TDBMemo;
DBEdit15: TDBEdit;
DBEdit16: TDBEdit;
wwDBDateTimePicker2: TwwDBDateTimePicker;
wwDBComboBox2: TwwDBComboBox;
t_ch_checkDSDesigner: TStringField;
t_ch_checkDSDesigner2: TStringField;
t_ch_checkDSDesigner3: TStringField;
t_ch_checkDSDesigner4: TStringField;
t_ch_checkDSDesigner5: TStringField;
t_ch_checkDSDesigner6: TBCDField;
t_ch_checkDSDesigner7: TBCDField;
t_ch_checkDSDesigner8: TBCDField;
t_ch_checkDSDesigner9: TStringField;
t_ch_checkDSDesigner10: TBooleanField;
t_ch_checkDSDesigner11: TStringField;
t_ch_checkDSDesigner12: TDateTimeField;
t_ch_checkDSDesigner13: TStringField;
t_ch_checkDSDesigner14: TDateTimeField;
t_ch_checkDSDesigner15: TStringField;
t_ch_checkDSDesigner16: TDateTimeField;
t_ch_checkDSDesigner17: TStringField;
t_ch_checkDSDesigner18: TStringField;
t_ch_checkDSDesigner19: TStringField;
t_ch_checkDSDesigner20: TStringField;
t_ch_checkDSDesigner21: TDateTimeField;
t_ch_checkDSDesigner22: TBCDField;
t_ch_checkDSDesigner23: TBCDField;
t_ch_checkField: TFloatField;
t_ch_checkField2: TFloatField;
dxdbgrid1Column20: TdxDBGridColumn;
dxdbgrid1Column21: TdxDBGridColumn;
dxdbgrid1Column22: TdxDBGridCheckColumn;
memtblprint1: TDataSource;
memtblprint: TkbmMemTable;
t_ch_checkDSDesigner24: TBooleanField;
bsSkinButton38: TbsSkinButton;
dxdbgrid1Column23: TdxDBGridColumn;
t_ch_checkDSDesigner25: TDateTimeField;
DBEdit12: TDBEdit;
dxdbgrid1Column24: TdxDBGridColumn;
t_ch_checkDSDesigner26: TSmallintField;
PopupMenu1: TPopupMenu;
MenuItem4: TMenuItem;
MenuItem5: TMenuItem;
N21: TMenuItem;
N22: TMenuItem;
N20: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
wwDBDateTimePicker3: TwwDBDateTimePicker;
Label15: TLabel;
DBEdit17: TDBEdit;
Label19: TLabel;
DBComboBoxEh1: TDBComboBoxEh;
Label27: TLabel;
t_ch_checkDSDesigner27: TDateTimeField;
t_ch_checkDSDesigner28: TStringField;
t_ch_checkDSDesigner29: TStringField;
dxdbgrid1Column25: TdxDBGridColumn;
dxdbgrid1Column26: TdxDBGridColumn;
DBEdit18: TDBEdit;
wwDBDateTimePicker4: TwwDBDateTimePicker;
Label29: TLabel;
Label28: TLabel;
Label30: TLabel;
DBComboBoxEh2: TDBComboBoxEh;
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);
procedure RxDBLookupCombo3Enter(Sender: TObject);
procedure DBEdit11Enter(Sender: TObject);
procedure t_ch_checkCalcFields(DataSet: TDataSet);
procedure bsSkinButton38Click(Sender: TObject);
procedure DBEdit12Change(Sender: TObject);
procedure N20Click(Sender: TObject);
procedure N3Click(Sender: TObject);
procedure fra_ch_add_do1bsSkinButton1Click(Sender: TObject);
procedure fra_ch_add_do1bsSkinButton10Click(Sender: TObject);
procedure DBComboBoxEh1DropDown(Sender: TObject);
procedure DBComboBoxEh2DropDown(Sender: TObject);
procedure fra_ch_add_do1MenuItem1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
ch_check_shen_open:boolean;
frm_ch_check_shen: Tfrm_ch_check_shen;
implementation
uses u_main, u_ch_shen_query, my_sys_function, u_data_share;
{$R *.dfm}
procedure Tfrm_ch_check_shen.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
ch_check_shen_open:=false;
savereggrid(dxdbgrid1,caption);
savereggrid(fra_ch_add_do1.dxDBGrid19,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
bsSkinNotebook1.PageIndex:=0;
// dxdbgrid1.ShowGroupPanel:=true;
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;
ch_check_shen_open:=true;
//<2F><>ҵ<EFBFBD><D2B5><EFBFBD>Ƿ<EFBFBD><C7B7>ϲ<EFBFBD>
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><EFBFBD><EFBFBD><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;
//<2F><>ҵ<EFBFBD><D2B5><EFBFBD>Ƿ<EFBFBD><C7B7>ϲ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϸ<EFBFBD><CFB8><EFBFBD>ݼ<EFBFBD>
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_check1;
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_check1;
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_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;
end;
fra_ch_add_do1.do_ban1.DataSet:=t_ch_check;
fra_ch_add_do1.wwDBComboBox31.text:='<27><>';
fra_ch_add_do1.bs_text.text:='2';
fra_ch_add_do1.t_ch_fee_do.open;
fra_ch_delete_do1.bs_text.Text:='2';
fra_ch_delete_do1.do_ban1.DataSet:=t_ch_check;
loadreggrid(dxdbgrid1,false,caption);
loadreggrid(fra_ch_add_do1.dxDBGrid19,false,caption);
//<2F>Ƿ<EFBFBD>˫<EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>
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><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=false;
dxdbgrid1.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><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><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=True;
dxdbgrid1.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><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;
if not if_open('343') then begin
N2.Visible:=false;
N3.Visible:=false;
end;
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['Ҫ<><D2AA>֧<EFBFBD><D6A7><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><D2BD><EFBFBD>']:=0;
t_ch_check['<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>']:=0;
t_ch_check['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=0;
t_ch_check['֧<><D6A7><EFBFBD><EFBFBD>ʽ']:='֧Ʊ';
// t_ch_check['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=get_no(date,'CS');
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
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_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>');
if not StrToBool(get_parameters_value(83,'false')) then
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>']);
t_ch_check['<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>']:=s_w(strtoint(get_parameters_value(65,'2')),t_ch_check['<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>']);
t_ch_check['<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>']:=s_w(strtoint(get_parameters_value(65,'2')),t_ch_check['<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>']);
if (t_ch_check.state=dsinsert) and (trim(t_ch_check.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)='') then
begin
t_ch_check['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=get_no(date,'CS');
end;
// t_ch_check['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=get_no(date,'CS');
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><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;
if strtobool(get_parameters_value(120,'false')) and t_ch_check['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ'] then begin
MessageDlg('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧<EFBFBD><D6A7><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD><DEB8><EFBFBD><EFBFBD>ݣ<EFBFBD>',mtWarning,[mbOk],0);
exit;
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><E1BDBB><EFBFBD><EFBFBD>' then begin
modify_all:=true;
try
t_ch_check.Edit;
t_ch_check['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD>֧<EFBFBD><D6A7>';
t_ch_check['<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=null;
t_ch_check.post;
finally
modify_all:=false;
end;
end else begin
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
if strtobool(get_parameters_value(172,'true')) then
begin
t_ch_check.Edit;
t_ch_check['<27><><EFBFBD><EFBFBD>״̬']:='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>';
t_ch_check['<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=NOW;
t_ch_check.post;
end
else
begin
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;
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',t_ch_check.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
end
else
begin
showmessage('<27><>ǰҵ<C7B0><D2B5>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1BDBB><EFBFBD><EFBFBD><EBA3A1>');
end;
end;
end;
procedure Tfrm_ch_check_shen.t_ch_checkAfterPost(DataSet: TDataSet);
begin
//ˢ<><CBA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
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.Requery;
fra_ch_delete_do1.v_fee_do_seae_sum.Requery;
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;
end;
end;
if if_ch_delete_do then
begin
case delete_do_type_num of
1,2,3,4,5:
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 StrToBool(get_parameters_value(85,'false')) then begin
if fra_ch_delete_do1.v_fee_do_bscard.IsEmpty then
begin
RxDBLookupCombo1.ReadOnly:=false;
RxDBLookupCombo2.ReadOnly:=false;
end
else
begin
RxDBLookupCombo1.ReadOnly:=true;
RxDBLookupCombo2.ReadOnly:=true;
end;
end else 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;
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);
var strStatus:string;
begin
strStatus:=Trim(t_ch_check.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring);
DBEdit1.Color:=clyellow;
{ if (strStatus='') or (strStatus='<27><><EFBFBD><EFBFBD>֧<EFBFBD><D6A7>') or (strStatus='<27><>׼<EFBFBD>޸<EFBFBD>')then
DBEdit1.Color:=clwhite
else if (strStatus='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>') or (strStatus='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>') then
begin
DBEdit1.Color:=clyellow;
end
else if (strStatus='<27><>ֹ<EFBFBD>޸<EFBFBD>') or (strStatus='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') then
DBEdit1.Color:=clred
else if (strStatus='<27><>׼<EFBFBD><D7BC>Ʊ') or (strStatus='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ') then
DBEdit1.Color:=$00DDF21C;
}
{
if (DBEdit1.Text='') or (DBEdit1.Text='<27><><EFBFBD><EFBFBD>֧<EFBFBD><D6A7>') 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
begin
DBEdit1.Color:=clyellow;
end
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);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton9.ClientToScreen(Point(0,bsSkinButton9.Height));
PopupMenu1.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_ch_check_shen.bsSkinButton8Click(Sender: TObject);
var
str:string;
begin
//<2F><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>
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',t_ch_check.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
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/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;
bsSkinButton8.Width:=i;
bsSkinButton7.Width:=i;
bsSkinButton38.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
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
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;
procedure Tfrm_ch_check_shen.RxDBLookupCombo3Enter(Sender: TObject);
begin
if StrToBool(get_parameters_value(85,'false')) then begin
if fra_ch_delete_do1.v_fee_do_bscard.IsEmpty then
begin
RxDBLookupCombo3.ReadOnly:=false;
end
else
begin
RxDBLookupCombo3.ReadOnly:=true;
end;
end else 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
RxDBLookupCombo3.ReadOnly:=false;
end
else
begin
RxDBLookupCombo3.ReadOnly:=true;
end;
end;
end;
procedure Tfrm_ch_check_shen.DBEdit11Enter(Sender: TObject);
begin
if bsSkinDBCheckRadioBox2.Checked then
DBEdit11.ReadOnly:=true
else
DBEdit11.ReadOnly:=false;
end;
procedure Tfrm_ch_check_shen.t_ch_checkCalcFields(DataSet: TDataSet);
begin
//<2F><><EFBFBD>ұ<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>
if dataset.FieldByName('<27>ұ<EFBFBD>').AsString='USD' then begin
dataset.FieldByName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
dataset.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=0;
end else begin
dataset.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
dataset.FieldByName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=0;
end;
end;
procedure Tfrm_ch_check_shen.bsSkinButton38Click(Sender: TObject);
var
book1:Tbookmark;
begin
if t_ch_check.IsEmpty then
exit;
book1:=t_ch_check.GetBookmark;
t_ch_check.Requery;
t_ch_check.GotoBookmark(book1);
end;
procedure Tfrm_ch_check_shen.DBEdit12Change(Sender: TObject);
begin
bsSkinButton6.Caption:='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>';
if t_ch_check.State in [dsinsert] then exit;
if t_ch_check.IsEmpty then exit;
if t_ch_check.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>' then begin
bsSkinButton6.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end else begin
bsSkinButton6.Caption:='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>';
end;
end;
procedure Tfrm_ch_check_shen.N20Click(Sender: TObject);
var
aQuery:TAdoQuery;
strbs,strwt,strmb:WideString;
begin
//<2F><>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if t_ch_check.IsEmpty then
exit;
table_post(t_ch_check);
if strtobool(get_parameters_value(120,'false')) and t_ch_check['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ'] then begin
MessageDlg('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧<EFBFBD><D6A7><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD>ӡ<EFBFBD><D3A1>',mtWarning,[mbOk],0);
exit;
end;
if strtobool(get_parameters_value(123,'false')) then begin
if t_ch_check['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ'] then begin
MessageDlg('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧<EFBFBD><D6A7><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD>ӡ<EFBFBD><D3A1>',mtWarning,[mbOk],0);
exit;
end;
if (t_ch_check['<27><><EFBFBD><EFBFBD>״̬']<>'<27><>׼֧<D7BC><D6A7>') then begin
MessageDlg('<27><>״̬<D7B4><CCAC><EFBFBD>ܴ<EFBFBD>ӡ<EFBFBD><D3A1>',mtWarning,[mbOk],0);
exit;
end;
end;
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['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=1;
t_ch_check.FieldByName('<27><>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD>').AsInteger:=t_ch_check.FieldByName('<27><>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD>').AsInteger+1;
t_ch_check.post;
finally
modify_all:=false;
end;
end;
end else begin
if strtobool(get_parameters_value(120,'false')) then begin
if MessageDlg('<27><>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD><EFBFBD>Ͳ<EFBFBD><CDB2>ܽ<EFBFBD><DCBD><EFBFBD><EFBFBD>޸ĺʹ<C4BA>ӡ<EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD>ȷ<EFBFBD>ϴ<EFBFBD>ӡ<EFBFBD><D3A1>',mtwarning,mbOKCancel,0)=mrOk then begin
end else begin
exit;
end;
end else begin
end;
end;
try
modify_all:=true;
t_ch_check.Edit;
t_ch_check['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=1;
t_ch_check.FieldByName('<27><>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD>').AsInteger:=t_ch_check.FieldByName('<27><>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD>').AsInteger+1;
t_ch_check.post;
finally
modify_all:=false;
end;
//<2F><><EFBFBD>ɱ<EFBFBD><C9B1><EFBFBD><EFBFBD>б<EFBFBD><D0B1><EFBFBD><EFBFBD>ݼ<EFBFBD>
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_check['<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><D6A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',TMenuItem(Sender).tag,t_ch_check1,memtblprint1,nil,nil,fra_ch_delete_do1.v_fee_do_bscard1,nil,nil,nil,t_ch_check1,nil,nil);
end else
sys_print('ҵ<><D2B5>֧<EFBFBD><D6A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',TMenuItem(Sender).tag,t_ch_check1,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_check1,nil,nil);
end;
procedure Tfrm_ch_check_shen.N3Click(Sender: TObject);
begin
//ȡ<><C8A1><EFBFBD><EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD>
try
modify_all:=true;
t_ch_check.Edit;
t_ch_check['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=0;
t_ch_check.FieldByName('<27><>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD>').AsInteger:=0;
t_ch_check.post;
finally
modify_all:=false;
end;
end;
procedure Tfrm_ch_check_shen.fra_ch_add_do1bsSkinButton1Click(
Sender: TObject);
begin
fra_ch_add_do1.bsSkinButton1Click(Sender);
end;
procedure Tfrm_ch_check_shen.fra_ch_add_do1bsSkinButton10Click(
Sender: TObject);
begin
fra_ch_add_do1.bsSkinButton10Click(Sender);
end;
procedure Tfrm_ch_check_shen.DBComboBoxEh1DropDown(Sender: TObject);
var
aQuery:TADOQuery;
begin
DBComboBoxEh1.Items.Clear;
aQuery:=CreateAdoQuery;
with aQuery do
try
Close;SQL.Clear;
SQL.Add('select distinct <20><>Ʊ̧ͷ from t_ch_check');
SQL.Add('where <20><>Ʊ̧ͷ<>'''' ');
SQL.Add('order by <20><>Ʊ̧ͷ');
Open;
First;
while not Eof do begin
DBComboBoxEh1.Items.Add(FieldByName('<27><>Ʊ̧ͷ').AsString);
Next;
end;
finally
Close;
FreeAndNil(aQuery);
end;
end;
procedure Tfrm_ch_check_shen.DBComboBoxEh2DropDown(Sender: TObject);
var
aQuery:TADOQuery;
begin
DBComboBoxEh2.Items.Clear;
aQuery:=CreateAdoQuery;
with aQuery do
try
Close;SQL.Clear;
SQL.Add('select distinct <20><>Ʊ̧ͷ from t_ch_check');
SQL.Add('where <20><>Ʊ̧ͷ<>'''' ');
SQL.Add('order by <20><>Ʊ̧ͷ');
Open;
First;
while not Eof do begin
DBComboBoxEh2.Items.Add(FieldByName('<27><>Ʊ̧ͷ').AsString);
Next;
end;
finally
Close;
FreeAndNil(aQuery);
end;
end;
procedure Tfrm_ch_check_shen.fra_ch_add_do1MenuItem1Click(Sender: TObject);
begin
fra_ch_add_do1.MenuItem1Click(Sender);
end;
end.