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.

759 lines
25 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

unit u_op_seae_tdqr;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, bsSkinCtrls, ExtCtrls, dxExEdtr, dxCntner, dxTL,inifiles,
dxDBCtrl, dxDBGrid, ComCtrls, Grids, DBGridEh, DB, ADODB, Menus, dxmdaset,
kbmMemTable, RxMemDS, dxDBTLCl, dxGrClms, DBCtrls, cxControls,
cxContainer, cxEdit, cxTextEdit, cxMaskEdit, cxButtonEdit, cxDBEdit, Mask;
type
Tfrm_op_seae_tdqr = class(TForm)
bsSkinPanel9: TbsSkinPanel;
Label116: TLabel;
Label130: TLabel;
Label131: TLabel;
Edit1: TEdit;
Edit4: TEdit;
Edit2: TEdit;
bsSkinButton44: TbsSkinButton;
Popop: TPopupMenu;
pop2: TMenuItem;
pop3: TMenuItem;
pop0: TMenuItem;
Label1: TLabel;
ComboBox1: TComboBox;
dsrtd_qr: TDataSource;
qrytd_qr: TADOQuery;
bsSkinPanel1: TbsSkinPanel;
bsSkinButton7: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
bsSkinButton10: TbsSkinButton;
bsSkinButton8: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsSkinButton38: TbsSkinButton;
Notebook1: TNotebook;
dxDBGrid1: TdxDBGrid;
dxDBGrid1AS_ID: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
dxDBGrid1Column4: TdxDBGridMaskColumn;
dxDBGrid1Column5: TdxDBGridMaskColumn;
dxDBGrid1Column6: TdxDBGridMaskColumn;
dxDBGrid1Column7: TdxDBGridDateColumn;
dxDBGrid1Column8: TdxDBGridMaskColumn;
dxDBGrid1Column9: TdxDBGridMaskColumn;
dxDBGrid1Column10: TdxDBGridMaskColumn;
dxDBGrid1Column11: TdxDBGridMaskColumn;
dxDBGrid1Column12: TdxDBGridMaskColumn;
dxDBGrid1Column13: TdxDBGridMaskColumn;
dxDBGrid1Column14: TdxDBGridMaskColumn;
dxDBGrid1Column15: TdxDBGridMaskColumn;
dxDBGrid1Column16: TdxDBGridMaskColumn;
dxDBGrid1Column17: TdxDBGridMaskColumn;
dxDBGrid1Column18: TdxDBGridMaskColumn;
dxDBGrid1Column19: TdxDBGridMaskColumn;
dxDBGrid1Column20: TdxDBGridMaskColumn;
dxDBGrid1Column21: TdxDBGridMaskColumn;
dxDBGrid1Column22: TdxDBGridMaskColumn;
dxDBGrid1Column23: TdxDBGridMaskColumn;
dxDBGrid1Column24: TdxDBGridMaskColumn;
dxDBGrid1Column25: TdxDBGridDateColumn;
dxDBGrid1Column26: TdxDBGridDateColumn;
dxDBGrid1Column27: TdxDBGridDateColumn;
dxDBGrid1Column28: TdxDBGridMaskColumn;
dxDBGrid1Column29: TdxDBGridMaskColumn;
dxDBGrid1Column30: TdxDBGridMaskColumn;
dxDBGrid1Column31: TdxDBGridMaskColumn;
dxDBGrid1Column32: TdxDBGridMaskColumn;
dxDBGrid1Column33: TdxDBGridDateColumn;
dxDBGrid1Column34: TdxDBGridMaskColumn;
dxDBGrid1Column35: TdxDBGridMaskColumn;
dxDBGrid1Column36: TdxDBGridMaskColumn;
dxDBGrid1Column37: TdxDBGridMaskColumn;
dxDBGrid1Column38: TdxDBGridMaskColumn;
dxDBGrid1Column39: TdxDBGridMaskColumn;
dxDBGrid1Column40: TdxDBGridMaskColumn;
dxDBGrid1Column41: TdxDBGridMaskColumn;
dxDBGrid1Column42: TdxDBGridMaskColumn;
dxDBGrid1Column43: TdxDBGridDateColumn;
dxDBGrid1Column44: TdxDBGridMaskColumn;
dxDBGrid1Column45: TdxDBGridMaskColumn;
dxDBGrid1Column46: TdxDBGridMaskColumn;
dxDBGrid1Column47: TdxDBGridMaskColumn;
dxDBGrid1Column48: TdxDBGridMaskColumn;
dxDBGrid1Column49: TdxDBGridMaskColumn;
dxDBGrid1Column50: TdxDBGridMaskColumn;
dxDBGrid1Column51: TdxDBGridMaskColumn;
dxDBGrid1Column52: TdxDBGridMaskColumn;
dxDBGrid1Column53: TdxDBGridMaskColumn;
dxDBGrid1Column54: TdxDBGridMaskColumn;
dxDBGrid1Column55: TdxDBGridMaskColumn;
dxDBGrid1Column56: TdxDBGridMaskColumn;
dxDBGrid1Column57: TdxDBGridCurrencyColumn;
dxDBGrid1Column58: TdxDBGridCurrencyColumn;
dxDBGrid1Column59: TdxDBGridMaskColumn;
dxDBGrid1Column60: TdxDBGridMaskColumn;
dxDBGrid11: TdxDBGridMaskColumn;
dxDBGrid12: TdxDBGridMaskColumn;
dxDBGrid13: TdxDBGridMaskColumn;
dxDBGrid14: TdxDBGridMaskColumn;
dxDBGrid15: TdxDBGridMaskColumn;
dxDBGrid16: TdxDBGridMaskColumn;
dxDBGrid17: TdxDBGridMaskColumn;
dxDBGrid18: TdxDBGridMaskColumn;
dxDBGrid19: TdxDBGridMaskColumn;
dxDBGrid110: TdxDBGridMaskColumn;
dxDBGrid1Column71: TdxDBGridMaskColumn;
dxDBGrid1TEU: TdxDBGridMaskColumn;
dxDBGrid1Column73: TdxDBGridMaskColumn;
dxDBGrid1Column74: TdxDBGridMaskColumn;
dxDBGrid1Column75: TdxDBGridDateColumn;
dxDBGrid1Column76: TdxDBGridMaskColumn;
dxDBGrid1Column77: TdxDBGridMaskColumn;
dxDBGrid1Column78: TdxDBGridMaskColumn;
dxDBGrid1Column79: TdxDBGridMaskColumn;
dxDBGrid1Column80: TdxDBGridMaskColumn;
dxDBGrid1Column81: TdxDBGridMaskColumn;
dxDBGrid1Column82: TdxDBGridMaskColumn;
dxDBGrid1Column83: TdxDBGridMaskColumn;
dxDBGrid1Column84: TdxDBGridMaskColumn;
dxDBGrid1Column85: TdxDBGridMaskColumn;
dxDBGrid1Column86: TdxDBGridMaskColumn;
dxDBGrid1Column87: TdxDBGridCheckColumn;
dxDBGrid1Column88: TdxDBGridCheckColumn;
dxDBGrid1Column89: TdxDBGridCheckColumn;
dxDBGrid1Column90: TdxDBGridCheckColumn;
dxDBGrid1Column91: TdxDBGridCheckColumn;
dxDBGrid1Column92: TdxDBGridDateColumn;
dxDBGrid1Column93: TdxDBGridMaskColumn;
dxDBGrid1Column94: TdxDBGridMaskColumn;
dxDBGrid1Column95: TdxDBGridMaskColumn;
dxDBGrid1Column96: TdxDBGridMaskColumn;
dxDBGrid1Column97: TdxDBGridMaskColumn;
dxDBGrid1Column98: TdxDBGridMaskColumn;
dxDBGrid1Column99: TdxDBGridMaskColumn;
dxDBGrid1Column100: TdxDBGridMaskColumn;
dxDBGrid1Column101: TdxDBGridCheckColumn;
dxDBGrid1Column102: TdxDBGridDateColumn;
dxDBGrid1Column103: TdxDBGridCheckColumn;
dxDBGrid1Column104: TdxDBGridDateColumn;
dxDBGrid1Column105: TdxDBGridMaskColumn;
dxDBGrid1Column106: TdxDBGridMaskColumn;
dxDBGrid1Column107: TdxDBGridMaskColumn;
dxDBGrid1Column108: TdxDBGridMaskColumn;
dxDBGrid1Column109: TdxDBGridMaskColumn;
dxDBGrid1Column110: TdxDBGridMaskColumn;
dxDBGrid1Column111: TdxDBGridMaskColumn;
dxDBGrid1Column112: TdxDBGridMaskColumn;
dxDBGrid1Column113: TdxDBGridMaskColumn;
dxDBGrid1Column114: TdxDBGridMaskColumn;
dxDBGrid1Column115: TdxDBGridMaskColumn;
dxDBGrid1Column116: TdxDBGridMaskColumn;
dxDBGrid1Column117: TdxDBGridMaskColumn;
dxDBGrid1Column118: TdxDBGridMaskColumn;
dxDBGrid1Column119: TdxDBGridCheckColumn;
dxDBGrid1Column120: TdxDBGridCheckColumn;
dxDBGrid1Column121: TdxDBGridCheckColumn;
dxDBGrid1Column122: TdxDBGridCheckColumn;
dxDBGrid1Column123: TdxDBGridMaskColumn;
dxDBGrid1Column124: TdxDBGridCheckColumn;
dxDBGrid1Column125: TdxDBGridDateColumn;
dxDBGrid1Column126: TdxDBGridCheckColumn;
dxDBGrid1Column127: TdxDBGridCheckColumn;
dxDBGrid1Column128: TdxDBGridDateColumn;
dxDBGrid1Column129: TdxDBGridDateColumn;
dxDBGrid1Column130: TdxDBGridMaskColumn;
dxDBGrid1Column131: TdxDBGridMaskColumn;
dxDBGrid1Column132: TdxDBGridMaskColumn;
dxDBGrid1Column133: TdxDBGridMaskColumn;
dxDBGrid1Column134: TdxDBGridMaskColumn;
dxDBGrid1Column135: TdxDBGridMaskColumn;
dxDBGrid1Column136: TdxDBGridMaskColumn;
dxDBGrid1Column137: TdxDBGridCheckColumn;
dxDBGrid1Column138: TdxDBGridMaskColumn;
dxDBGrid1Column139: TdxDBGridDateColumn;
dxDBGrid1Column140: TdxDBGridCurrencyColumn;
dxDBGrid1Column141: TdxDBGridCurrencyColumn;
dxDBGrid1Column142: TdxDBGridCurrencyColumn;
dxDBGrid1Column143: TdxDBGridDateColumn;
dxDBGrid1Column144: TdxDBGridDateColumn;
dxDBGrid1Column145: TdxDBGridDateColumn;
dxDBGrid1Column146: TdxDBGridDateColumn;
dxDBGrid1Column147: TdxDBGridMaskColumn;
dxDBGrid1Column148: TdxDBGridMaskColumn;
dxDBGrid1Column149: TdxDBGridMaskColumn;
dxDBGrid1Column150: TdxDBGridCheckColumn;
dxDBGrid1Column151: TdxDBGridMaskColumn;
dxDBGrid1Column152: TdxDBGridMaskColumn;
dxDBGrid1Column153: TdxDBGridMaskColumn;
dxDBGrid1Column154: TdxDBGridMaskColumn;
dxDBGrid1Column155: TdxDBGridMaskColumn;
dxDBGrid1Column156: TdxDBGridMaskColumn;
dxDBGrid1Column157: TdxDBGridMaskColumn;
dxDBGrid1Column158: TdxDBGridCurrencyColumn;
dxDBGrid1Column159: TdxDBGridMaskColumn;
dxDBGrid1Column160: TdxDBGridMaskColumn;
dxDBGrid1Column161: TdxDBGridMaskColumn;
dxDBGrid1Column162: TdxDBGridMaskColumn;
dxDBGrid1Column163: TdxDBGridDateColumn;
dxDBGrid1Column164: TdxDBGridDateColumn;
dxDBGrid1Column165: TdxDBGridMaskColumn;
dxDBGrid1Column166: TdxDBGridDateColumn;
dxDBGrid1Column167: TdxDBGridDateColumn;
dxDBGrid1Column168: TdxDBGridDateColumn;
dxDBGrid1Column169: TdxDBGridDateColumn;
dxDBGrid1Column170: TdxDBGridMaskColumn;
dxDBGrid1Column171: TdxDBGridMaskColumn;
dxDBGrid1Column172: TdxDBGridMaskColumn;
dxDBGrid1Column173: TdxDBGridMaskColumn;
dxDBGrid1Column174: TdxDBGridMaskColumn;
dxDBGrid1Column175: TdxDBGridMaskColumn;
dxDBGrid1Column176: TdxDBGridMaskColumn;
dxDBGrid1Column177: TdxDBGridMaskColumn;
dxDBGrid1Column178: TdxDBGridCheckColumn;
dxDBGrid1Column179: TdxDBGridDateColumn;
dxDBGrid1Column180: TdxDBGridMaskColumn;
dxDBGrid1Column181: TdxDBGridMaskColumn;
dxDBGrid1Column182: TdxDBGridMaskColumn;
dxDBGrid1Column183: TdxDBGridCheckColumn;
dxDBGrid1Column184: TdxDBGridMaskColumn;
dxDBGrid1Column185: TdxDBGridMaskColumn;
dxDBGrid1Column186: TdxDBGridMaskColumn;
bsSkinButton1: TbsSkinButton;
bsSkinPanel2: TbsSkinPanel;
bsSkinPanel3: TbsSkinPanel;
Label24: TLabel;
Label25: TLabel;
Label29: TLabel;
Label51: TLabel;
Label53: TLabel;
Label54: TLabel;
Label55: TLabel;
Label57: TLabel;
Label58: TLabel;
Label60: TLabel;
Label61: TLabel;
Label62: TLabel;
Label63: TLabel;
Label67: TLabel;
Label68: TLabel;
Label69: TLabel;
Label70: TLabel;
Label71: TLabel;
Label73: TLabel;
Label76: TLabel;
lblcompany: TLabel;
Label36: TLabel;
Label37: TLabel;
Label39: TLabel;
Label40: TLabel;
Label41: TLabel;
Shape1: TShape;
Label34: TLabel;
Label9: TLabel;
Label11: TLabel;
DBEdit14: TDBEdit;
cxDBButtonEdit2: TcxDBButtonEdit;
DBMemo18: TDBMemo;
DBMemo19: TDBMemo;
DBMemo20: TDBMemo;
DBMemo21: TDBMemo;
DBMemo22: TDBMemo;
DBMemo23: TDBMemo;
DBEdit3: TDBEdit;
DBEdit4: TDBEdit;
DBEdit6: TDBEdit;
DBEdit1: TDBEdit;
DBEdit5: TDBEdit;
DBEdit7: TDBEdit;
DBEdit8: TDBEdit;
DBRichEdit1: TDBRichEdit;
DBRichEdit2: TDBRichEdit;
DBRichEdit3: TDBRichEdit;
DBRichEdit4: TDBRichEdit;
DBRichEdit5: TDBRichEdit;
DBRichEdit6: TDBRichEdit;
DBRichEdit7: TDBRichEdit;
DBRichEdit8: TDBRichEdit;
DBRichEdit9: TDBRichEdit;
t_op_seae_assistant: TADOQuery;
bsSkinButton2: TbsSkinButton;
t_op_seae_assistant1: TDataSource;
bsSkinButton3: TbsSkinButton;
chkedmain: TbsSkinCheckRadioBox;
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton7Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure bsSkinButton44Click(Sender: TObject);
procedure bsSkinButton38Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure bsSkinPanel1Resize(Sender: TObject);
procedure bsSkinButton9Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure cxDBButtonEdit2PropertiesButtonClick(Sender: TObject;
AButtonIndex: Integer);
procedure qrytd_qrAfterOpen(DataSet: TDataSet);
procedure dsrtd_qrDataChange(Sender: TObject; Field: TField);
procedure pop0Click(Sender: TObject);
procedure pop2Click(Sender: TObject);
procedure pop3Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure qrytd_qrBeforeClose(DataSet: TDataSet);
procedure qrytd_qrAfterPost(DataSet: TDataSet);
procedure DBRichEdit1DblClick(Sender: TObject);
procedure DBMemo18DblClick(Sender: TObject);
procedure DBEdit14DblClick(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
private
{ Private declarations }
procedure setdiffcolor ;
public
{ Public declarations }
end;
var
frm_op_seae_tdqr: Tfrm_op_seae_tdqr;
implementation
{$R *.dfm}
uses u_main,my_sys_function, u_op_seae_assistant, u_data_share,
u_op_seaetd_query,u_op_seae_difftd, u_send_msg;
procedure Tfrm_op_seae_tdqr.bsSkinButton5Click(Sender: TObject);
begin
close ;
end;
procedure Tfrm_op_seae_tdqr.bsSkinButton7Click(Sender: TObject);
begin
qrytd_qr.Prior ;
end;
procedure Tfrm_op_seae_tdqr.bsSkinButton6Click(Sender: TObject);
begin
qrytd_qr.Next ;
end;
procedure Tfrm_op_seae_tdqr.bsSkinButton44Click(Sender: TObject);
var tdqr:string ;
str:string ;
begin
case ComboBox1.ItemIndex of
1:tdqr:=td_assate1 ;
2:tdqr:=td_assate2 ;
3:tdqr:=td_assate3 ;
4:tdqr:=td_assate4 ;
else tdqr:='' ;
end ;
with qrytd_qr,sql do
begin
close ; clear ;
add('SELECT * FROM t_op_seae_assistant_on ');
add(' where 1=1 ');
if ComboBox1.ItemIndex>0 then
begin
add('and <20>ύȷ<E1BDBB><C8B7>=:tdqr ');
parameters.ParamByName('tdqr').Value:=tdqr ;
end ;
if edit1.Text<>'' then add('and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '''+'%'+edit1.Text+'%''');
if edit4.Text<>'' then add('and ί<>б<EFBFBD><D0B1><EFBFBD> like '''+'%'+edit4.Text+'%''');
if edit2.Text<>'' then add('and <20><><EFBFBD><EFBFBD><E1B5A5> like '''+'%'+edit2.Text+'%''');
str:=open_data('0001','t_op_seae_assistant_on.¼<><C2BC><EFBFBD><EFBFBD>','t_op_seae_assistant_on.<2E><><EFBFBD><EFBFBD>Ա',
't_op_seae_assistant_on.<2E>ͷ<EFBFBD>Ա','no',
'no');
add(' and '+str) ;
add(' order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> desc');
open ;
end ;
end;
procedure Tfrm_op_seae_tdqr.bsSkinButton38Click(Sender: TObject);
var
answer:TModalResult;
begin
if bsSkinButton38.Caption='<27><EFBFBD>޸<EFBFBD>' then
begin
bsSkinButton38.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
Notebook1.PageIndex:=0;
exit;
end;
if bsSkinButton38.Caption='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>' then
begin
if (qrytd_qr.State=dsinsert)or(qrytd_qr.State=dsedit) then
BEGIN
answer:=messagedlg( '<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE>޸ģ<DEB8><C4A3>Ƿ񱣴棿',mtWarning,mbYesNoCancel,0);
if answer=mrYes then
begin
qrytd_qr.post;
end;
if answer=mrNo then
begin
qrytd_qr.cancel;
end;
if answer=mrCancel then
begin
exit;
end;
END;
bsSkinButton38.Caption:='<27><EFBFBD>޸<EFBFBD>';
Notebook1.PageIndex:=1;
exit;
end;
end;
procedure Tfrm_op_seae_tdqr.bsSkinButton10Click(Sender: TObject);
var str:string ;
begin
str:=open_data('0001','t_op_seae_assistant_on.¼<><C2BC><EFBFBD><EFBFBD>','t_op_seae_assistant_on.<2E><><EFBFBD><EFBFBD>Ա',
't_op_seae_assistant_on.<2E>ͷ<EFBFBD>Ա','no',
'no');
frm_op_seaetd_query:=Tfrm_op_seaetd_query.create(self);
if frm_op_seaetd_query.ShowModal=mrok then
begin
with qrytd_qr,sql do
begin
close ; clear ;
add('SELECT * FROM t_op_seae_assistant_on ');
add(frm_op_seaetd_query.findstr);
add(' and '+str);
add(' order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> desc');
open ;
end ;
end ;
frm_op_seaetd_query.free ;
end;
procedure Tfrm_op_seae_tdqr.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
saveedmain(chkedmain.Checked);
frm_op_seae_tdqr.Hide;
frm_op_seae_tdqr.ManualFloat(frm_op_seae_tdqr.BoundsRect );
frm_main.freeTabs('frm_op_seae_tdqr');
action:=cafree;
frm_op_seae_tdqr:=nil;
end;
procedure Tfrm_op_seae_tdqr.bsSkinPanel1Resize(Sender: TObject);
var
i:integer;
begin
i:=round(bsSkinPanel1.width/10);
bsSkinButton6.width:=i;
bsSkinButton7.width:=i;
bsSkinButton8.width:=i;
bsSkinButton9.width:=i;
bsSkinButton10.width:=i;
bsSkinButton38.width:=i;
bsSkinButton2.width:=i;
bsSkinButton1.width:=i;
bsSkinButton3.width:=i;
end;
procedure Tfrm_op_seae_tdqr.bsSkinButton9Click(Sender: TObject);
begin
sys_print('<27><><EFBFBD><EFBFBD><EFBFBD>ᵥȷ<E1B5A5><C8B7>',2,dsrtd_qr,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_seae_tdqr.FormShow(Sender: TObject);
begin
chkedmain.Checked:=loadedmain ;
Notebook1.PageIndex:=1 ;
lblcompany.Caption:=frm_data_share.t_sys_company.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring ;
with qrytd_qr,sql do
begin
close ; clear ;
add('SELECT top 10 * FROM t_op_seae_assistant_on ');
add('where (¼<><C2BC><EFBFBD><EFBFBD>='+''''+employee+''''+' or <20><><EFBFBD><EFBFBD>Ա='+''''+employee+''''
+' or <20>ͷ<EFBFBD>Ա='+''''+employee+''''+')'
+' order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DESC,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>');
open ;
end ;
end;
procedure Tfrm_op_seae_tdqr.cxDBButtonEdit2PropertiesButtonClick(
Sender: TObject; AButtonIndex: Integer);
begin
Popop.Popup(mouse.CursorPos.X,mouse.CursorPos.Y);
end;
procedure Tfrm_op_seae_tdqr.qrytd_qrAfterOpen(DataSet: TDataSet);
begin
if not t_op_seae_assistant.Active then
t_op_seae_assistant.Open else t_op_seae_assistant.Requery ;
end;
procedure Tfrm_op_seae_tdqr.dsrtd_qrDataChange(Sender: TObject;
Field: TField);
begin
setdiffcolor ;
end;
procedure Tfrm_op_seae_tdqr.pop0Click(Sender: TObject);
var fid:integer ;
begin //<2F><><EFBFBD><EFBFBD><EFBFBD>ύȷ<E1BDBB><C8B7>
if qrytd_qr.FieldByName('<27>ύȷ<E1BDBB><C8B7>').AsString<>td_assate1 then
begin
showmessage('<27><>ǰ״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit ;
end ;
if qrytd_qr.FieldByName('<27>ύȷ<E1BDBB><C8B7>').AsString=td_assate1 then
begin
fid:=qrytd_qr.fieldbyname('as_id').asinteger ;
with frm_main.qryTmp,sql do
begin
close;clear ;
add('update t_op_seae_assistant set <20>ύȷ<E1BDBB><C8B7>=:mysate');
add('where as_id=:as_id');
parameters.ParamByName('mystate').value:=td_sate1 ;
parameters.ParamByName('as_id').value:=fid ;
execsql ;
end ;
qrytd_qr.Delete ;
end ;
end;
procedure Tfrm_op_seae_tdqr.pop2Click(Sender: TObject);
var i:integer ;
myfield:string ;
myzhl,mychm,myshl:real ;
begin // <20><><EFBFBD>ܿͻ<DCBF>ȷ<EFBFBD><C8B7>
myzhl:=total_nummemo(DBRichEdit8);
mychm:=total_nummemo(DBRichEdit9);
myshl:=total_nummemo(DBRichEdit6);
qrytd_qr.Edit ;
qrytd_qr['<27><><EFBFBD><EFBFBD>']:=myzhl ;
qrytd_qr['<27><><EFBFBD><EFBFBD>']:=mychm ;
qrytd_qr['<27><><EFBFBD><EFBFBD>']:=myshl ;
qrytd_qr.Post ;
//<2F><><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD><E1BDBB><EFBFBD><EFBFBD> д<><D0B4><EFBFBD><EFBFBD>Ӧ<EFBFBD>
with frm_main.qryTmp,sql do
begin
close; clear ;
add('select * from t_op_seae_assistant where as_id=:as_id');
parameters.parambyname('as_id').value:=qrytd_qr.fieldbyname('as_id').asinteger ;
open ; edit ;
if recordcount>0 then
begin
for i:=0 to qrytd_qr.FieldCount-1 do
begin
myfield:=uppercase(qrytd_qr.fields[i].FieldName) ;
if myfield<>'AS_ID' then
frm_main.qryTmp[myfield]:=qrytd_qr[myfield];
end ;
fieldbyname('<27>ύȷ<E1BDBB><C8B7>').AsString:=td_sate3 ;
Post ;
end ;
end ;
t_op_seae_assistant.close ;
t_op_seae_assistant.Open ;
{ t_op_seae_assistant.Edit ;
for i:=0 to qrytd_qr.FieldCount-1 do
begin
try
myfield:=uppercase(qrytd_qr.fields[i].FieldName) ;
if myfield<>'AS_ID' then
t_op_seae_assistant[myfield]:=qrytd_qr[myfield];
except
;
end;
end;
t_op_seae_assistant['<27>ύȷ<E1BDBB><C8B7>']:=td_sate3 ;
t_op_seae_assistant.Post ;
}
qrytd_qr.Edit ;
qrytd_qr.FieldByName('<27>ύȷ<E1BDBB><C8B7>').AsString:=td_assate3 ;
qrytd_qr.Post ;
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if chkedmain.Checked then
begin
with frm_main.qryTmp,sql do
begin
close; clear ;
add('select * from t_op_seae where <20><><EFBFBD><EFBFBD>=:bianhao');
parameters.ParamByName('bianhao').value:=qrytd_qr.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring ;
Open ; edit ;
end ;
if qrytd_qr.FieldByName('<27><EFBFBD><E1B5A5><EFBFBD><EFBFBD>').AsString='ֱ<><D6B1>' then
begin
frm_main.qryTmp['<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>']:=qrytd_qr['<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>'];
frm_main.qryTmp['<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>']:=qrytd_qr['<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>'];
frm_main.qryTmp['֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>']:=qrytd_qr['֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>'];
end;
frm_main.qryTmp['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=qrytd_qr['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
frm_main.qryTmp['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=qrytd_qr['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
frm_main.qryTmp['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']:=qrytd_qr['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д'];
frm_main.qryTmp['<27><><EFBFBD><EFBFBD>']:=qrytd_qr['<27><><EFBFBD><EFBFBD>'];
frm_main.qryTmp['<27><><EFBFBD><EFBFBD>']:=qrytd_qr['<27><><EFBFBD><EFBFBD>'];
frm_main.qryTmp['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=qrytd_qr['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
frm_main.qryTmp['װ<><D7B0><EFBFBD><EFBFBD>']:=qrytd_qr['װ<><D7B0><EFBFBD><EFBFBD>'];
frm_main.qryTmp['ж<><D0B6><EFBFBD><EFBFBD>']:=qrytd_qr['ж<><D0B6><EFBFBD><EFBFBD>'];
frm_main.qryTmp['<27><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>']:=qrytd_qr['<27><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>'];
frm_main.qryTmp['Ŀ<>ĵ<EFBFBD>']:=qrytd_qr['Ŀ<>ĵ<EFBFBD>'];
frm_main.qryTmp['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=qrytd_qr['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
frm_main.qryTmp['<27><EFBFBD><E1B5A5><EFBFBD><EFBFBD>']:=qrytd_qr['<27><EFBFBD><E1B5A5><EFBFBD><EFBFBD>'];
frm_main.qryTmp['ǩ<><C7A9><EFBFBD>ص<EFBFBD>']:=qrytd_qr['ǩ<><C7A9><EFBFBD>ص<EFBFBD>'];
frm_main.qryTmp['ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=qrytd_qr['ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
frm_main.qryTmp['<27><><EFBFBD>ѷ<EFBFBD>ʽ']:=qrytd_qr['<27><><EFBFBD>ѷ<EFBFBD>ʽ'];
frm_main.qryTmp['Ԥ<><D4A4><EFBFBD>ص<EFBFBD>']:=qrytd_qr['Ԥ<><D4A4><EFBFBD>ص<EFBFBD>'];
frm_main.qryTmp['<27><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>']:=qrytd_qr['<27><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>'];
frm_main.qryTmp['<27><>ͷ']:=qrytd_qr['<27><>ͷ'];
frm_main.qryTmp['<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>']:=qrytd_qr['<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>'];
frm_main.qryTmp['<27><><EFBFBD><EFBFBD>']:=qrytd_qr['<27><><EFBFBD><EFBFBD>'];
frm_main.qryTmp['<27><>װ']:=qrytd_qr['<27><>װ'];
frm_main.qryTmp['<27><><EFBFBD><EFBFBD>']:=qrytd_qr['<27><><EFBFBD><EFBFBD>'];
frm_main.qryTmp['<27><><EFBFBD><EFBFBD>']:=qrytd_qr['<27><><EFBFBD><EFBFBD>'];
frm_main.qryTmp['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ']:=qrytd_qr['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ'];
frm_main.qryTmp['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=qrytd_qr['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
frm_main.qryTmp['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=qrytd_qr['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
frm_main.qryTmp.post;
end ;
/////////<2F><><EFBFBD><EFBFBD><EFBFBD>ᵥȷ<E1B5A5><C8B7><EFBFBD><EFBFBD>Ϣ
if (yctx<>'<27><><EFBFBD><EFBFBD>') then exit ;
if (trim(get_parameters_value(136,'<27><>'))='<27><>') then exit;
frm_send_msg:=Tfrm_send_msg.Create(self);
try
frm_data_share.t_crm_client_all.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',qrytd_qr['ί<>е<EFBFBD>λ'],[]);
frm_send_msg.t_crm_client_link.Open;
frm_send_msg.memmsg.open;
frm_send_msg.memmsg.insert;
frm_send_msg.memmsg.FieldByName('<27>ռ<EFBFBD><D5BC><EFBFBD>λ').AsString:=qrytd_qr['ί<>е<EFBFBD>λ'];
if not frm_send_msg.t_crm_client_link.IsEmpty then begin
frm_send_msg.t_crm_client_link.first;
frm_send_msg.memmsg.FieldByName('<27>ռ<EFBFBD><D5BC><EFBFBD>').AsString:=frm_send_msg.t_crm_client_link['<27><><EFBFBD><EFBFBD>'];
end;
frm_send_msg.memmsg.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:='<27><><EFBFBD><EFBFBD><E1B5A5>:'+qrytd_qr['<27><><EFBFBD><EFBFBD><E1B5A5>']+','
+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+qrytd_qr.Fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+','+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+qrytd_qr.Fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+','
+'<27><><EFBFBD>Σ<EFBFBD>'+qrytd_qr.Fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+' '+'<27>ѽ<EFBFBD><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>';
if trim(get_parameters_value(136,'<27><>'))='MSN' then
frm_send_msg.checkboxMSN.Checked:=true;
if trim(get_parameters_value(136,'<27><>'))='<27>ʼ<EFBFBD>' then
frm_send_msg.checkboxMAIL.Checked:=true;
if trim(get_parameters_value(136,'<27><>'))='<27><><EFBFBD><EFBFBD>' then
frm_send_msg.checkboxMSG.Checked:=true;
frm_send_msg.ShowModal;
finally
FreeAndNil(frm_send_msg);
end;
end;
procedure Tfrm_op_seae_tdqr.pop3Click(Sender: TObject);
begin // <20><>׼<EFBFBD>ͻ<EFBFBD><CDBB>޸<EFBFBD>
qrytd_qr.Edit ;
qrytd_qr.FieldByName('<27>ύȷ<E1BDBB><C8B7>').AsString:=td_assate4 ;
qrytd_qr.Post ;
with frm_main.qrytmp,sql do
begin
close ; clear ;
add('update t_op_seae_assistant set <20>ύȷ<E1BDBB><C8B7>=:tjqr ');
add('where as_id=:asid');
parameters.parambyname('tjqr').value:=td_sate5 ;
parameters.parambyname('asid').value:= qrytd_qr.fieldbyname('as_id').asinteger ;
execsql ;
end ;
end;
procedure Tfrm_op_seae_tdqr.bsSkinButton8Click(Sender: TObject);
begin
if qrytd_qr.State in [dsedit,dsinsert] then qrytd_qr.Cancel ;
end;
procedure Tfrm_op_seae_tdqr.bsSkinButton2Click(Sender: TObject);
begin
if qrytd_qr.State in [dsedit,dsinsert] then qrytd_qr.post ;
end;
procedure Tfrm_op_seae_tdqr.setdiffcolor;
var i:integer ;
myfield:string ;
begin
if not t_op_seae_assistant.Active then t_op_seae_assistant.Open ;
for i:=0 to bsSkinPanel3.ControlCount-1 do
with bsSkinPanel3 do
if (bsSkinPanel3.Controls[i] is TDBRichEdit) then
begin
myfield:=(Controls[i] as TDBRichEdit).DataField ;
if AnsiCompareStr(qrytd_qr.Fieldbyname(myfield).asstring ,
t_op_seae_assistant.fieldbyname(myfield).asstring)<>0 then
(bsSkinPanel3.Controls[i] as TDBRichEdit).Font.Color:=clred
else (bsSkinPanel3.Controls[i] as TDBRichEdit).Font.Color:=clblack ;
end
else
if (bsSkinPanel3.Controls[i] is TDBEdit) then
begin
myfield:=(Controls[i] as TDBEdit).DataField ;
if AnsiCompareStr(qrytd_qr.Fieldbyname(myfield).asstring ,
t_op_seae_assistant.fieldbyname(myfield).asstring)<>0 then
(bsSkinPanel3.Controls[i] as TDBEdit).Font.Color:=clred
else (bsSkinPanel3.Controls[i] as TDBEdit).Font.Color:=clblack ;
end
else
if (bsSkinPanel3.Controls[i] is TDBMemo) then
begin
myfield:=(Controls[i] as TDBMEMO).DataField ;
if AnsiCompareStr(qrytd_qr.Fieldbyname(myfield).asstring ,
t_op_seae_assistant.fieldbyname(myfield).asstring)<>0 then
(bsSkinPanel3.Controls[i] as TDBMEMO).Font.Color:=clred
else (bsSkinPanel3.Controls[i] as TDBMEMO).Font.Color:=clblack ;
end ;
end;
procedure Tfrm_op_seae_tdqr.qrytd_qrBeforeClose(DataSet: TDataSet);
begin
t_op_seae_assistant.Close ;
end;
procedure Tfrm_op_seae_tdqr.qrytd_qrAfterPost(DataSet: TDataSet);
begin
setdiffcolor ;
end;
procedure Tfrm_op_seae_tdqr.DBRichEdit1DblClick(Sender: TObject);
begin
frm_op_seae_difftd:=Tfrm_op_seae_difftd.Create(self);
frm_op_seae_difftd.showchgtd(t_op_seae_assistant1,dsrtd_qr,TDBRichEdit(sender).DataField);
frm_op_seae_difftd.Free ;
end;
procedure Tfrm_op_seae_tdqr.DBMemo18DblClick(Sender: TObject);
begin
frm_op_seae_difftd:=Tfrm_op_seae_difftd.Create(self);
frm_op_seae_difftd.showchgtd(t_op_seae_assistant1,dsrtd_qr,TDBMemo(sender).DataField);
frm_op_seae_difftd.Free ;
end;
procedure Tfrm_op_seae_tdqr.DBEdit14DblClick(Sender: TObject);
begin
frm_op_seae_difftd:=Tfrm_op_seae_difftd.Create(self);
frm_op_seae_difftd.showchgtd(t_op_seae_assistant1,dsrtd_qr,TDBEdit(sender).DataField);
frm_op_seae_difftd.Free ;
end;
procedure Tfrm_op_seae_tdqr.bsSkinButton3Click(Sender: TObject);
begin
qrytd_qr.Refresh ;
end;
procedure Tfrm_op_seae_tdqr.bsSkinButton1Click(Sender: TObject);
begin
if messagebox(handle,pchar('ȷ<><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'),pchar('<27><>ʾ'),MB_YESNO)=idyes then
qrytd_qr.delete ;
end;
end.