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.

429 lines
15 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_oder_add;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, BusinessSkinForm, bsSkinCtrls, StdCtrls, wwdbdatetimepicker, DB,
RxLookup,adodb,my_sys_chat, Mask, DBCtrlsEh,inifiles;
type
Tfrm_op_seae_order_add = class(TForm)
bsBusinessSkinForm1: TbsBusinessSkinForm;
bsSkinGroupBox1: TbsSkinGroupBox;
Label1: TLabel;
wwDBDateTimePicker1: TwwDBDateTimePicker;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
data1: TDataSource;
Label16: TLabel;
Label42: TLabel;
RxDBLookupCombo30: TRxDBLookupCombo;
Label17: TLabel;
data2: TDataSource;
data3: TDataSource;
data4: TDataSource;
data5: TDataSource;
RxDBLookupCombo1: TRxDBLookupCombo;
Label2: TLabel;
bsSkinCheckRadioBox1: TbsSkinCheckRadioBox;
DBComboBoxEh1: TDBComboBoxEh;
DBComboBoxEh2: TDBComboBoxEh;
ADOQuery1: TADOQuery;
procedure FormShow(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure RxDBLookupCombo14Change(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure DBComboBoxEh1DropDown(Sender: TObject);
procedure DBComboBoxEh2DropDown(Sender: TObject);
procedure DBComboBoxEh1Change(Sender: TObject);
procedure DBComboBoxEh2Change(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_op_seae_order_add: Tfrm_op_seae_order_add;
frm_op_seae_add_num:integer;
implementation
uses u_main, my_sys_function, u_data_share;
{$R *.dfm}
procedure Tfrm_op_seae_order_add.bsSkinButton2Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_seae_order_add.FormShow(Sender: TObject);
var
inifile1:Tinifile;
begin
inifile1:=Tinifile.Create(ExtractFilePath(application.ExeName)+'main.ini');
DBComboBoxEh1.Text:=inifile1.ReadString('seaeorder','op','');
RxDBLookupCombo30.DisplayValue:=inifile1.ReadString('seaeorder','opdept','');
DBComboBoxEh2.Text:=inifile1.ReadString('seaeorder','kf','');
RxDBLookupCombo1.DisplayValue:=inifile1.ReadString('seaeorder','kfdept','');
bsSkinCheckRadioBox1.Checked:=inifile1.Readbool('seaeorder','savecheck',true);
inifile1.free;
wwDBDateTimePicker1.Date:=date;
end;
procedure Tfrm_op_seae_order_add.bsSkinButton3Click(Sender: TObject);
var
i: Integer;
bsno,ywno:String;
aQuery:TAdoQuery;
begin
if (DBComboBoxEh1.text='') or (wwDBDateTimePicker1.text='') then begin
MessageDlg('<27><><EFBFBD><EFBFBD>Ա<EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD>ڼ䲻<DABC><E4B2BB>Ϊ<EFBFBD>գ<EFBFBD>', mtConfirmation, [mbYes],0);
exit;
end;
frm_main.db.BeginTrans;
try
if not data1.DataSet.Active then data1.DataSet.Open;
if not data3.DataSet.Active then data3.DataSet.Open;
if not data4.DataSet.Active then data4.DataSet.Open;
data1.DataSet.Insert;
bsno:=get_id;
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=bsno;
if Data2.DataSet.FieldByName('װ<>˷<EFBFBD>ʽ').AsString<>'' then
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=data2.DataSet['װ<>˷<EFBFBD>ʽ']
else
data1.DataSet['װ<>˷<EFBFBD>ʽ']:='<27><><EFBFBD><EFBFBD>';
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=wwDBDateTimePicker1.date;
data1.DataSet['<27>ܴ<EFBFBD>']:=WeekofYear(wwDBDateTimePicker1.date);
data1.DataSet['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
data1.DataSet['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
data1.DataSet['<27><><EFBFBD><EFBFBD>Ա']:=DBComboBoxEh1.text;
// data1.DataSet['<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>']:=employee;
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=data2.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
data1.DataSet['<27>ͷ<EFBFBD>Ա']:=DBComboBoxEh2.text;
data1.DataSet['<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>']:=data2.DataSet['<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>'];
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=RxDBLookupCombo30.DisplayValue;
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD>Դ']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
data1.DataSet['ί<>е<EFBFBD>λ']:=data2.DataSet['ί<>е<EFBFBD>λ'];
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾']:=data2.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾'];
data1.DataSet['<27><><EFBFBD><EFBFBD>˾']:=data2.DataSet['<27><><EFBFBD><EFBFBD>˾'];
ywno:=get_no(wwDBDateTimePicker1.date,getbsno(Logininfo.SeaExpBsNo,'SE'));
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=ywno;
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=bsno;
data1.DataSet['ί<>б<EFBFBD><D0B1><EFBFBD>']:=Data2.DataSet['<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>'];
data1.DataSet['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=bsno;
data1.DataSet['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=bsno;
data1.DataSet['ί<>б<EFBFBD>׼']:=bsno;
data1.DataSet['<27><><EFBFBD>ر<EFBFBD>׼']:=bsno;
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׼']:=bsno;
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׼']:=bsno;
data1.DataSet['<27>Ʒѱ<C6B7>׼']:='';
data1.DataSet['ҵ<><D2B5>״̬']:='<27><><EFBFBD><EFBFBD>ί<EFBFBD><CEAF>';
data1.DataSet['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><>ͨ<EFBFBD><CDA8>';
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD>Դ']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
data1.DataSet['<27><><EFBFBD>˸<EFBFBD>']:=data2.DataSet['װ<><D7B0><EFBFBD><EFBFBD>'];
data1.DataSet['װ<><D7B0><EFBFBD><EFBFBD>']:=data2.DataSet['װ<><D7B0><EFBFBD><EFBFBD>'];
data1.DataSet['<27><EFBFBD><E1B5A5><EFBFBD><EFBFBD>']:=get_parameters_value(20,'THREE');
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=data2.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
data1.DataSet['<27><>ͷ']:=data2.DataSet['<27><>ͷ'];
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=data2.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=data2.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
data1.DataSet['<27>ջ<EFBFBD><D5BB><EFBFBD>']:=data2.DataSet['<27>ջ<EFBFBD><D5BB><EFBFBD>'];
data1.DataSet['֪ͨ<CDA8><D6AA>']:=data2.DataSet['֪ͨ<CDA8><D6AA>'];
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>']:=data2.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>'];
data1.DataSet['<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>']:=data2.DataSet['<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>'];
data1.DataSet['֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>']:=data2.DataSet['֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>'];
data1.DataSet['<27><><EFBFBD>ѷ<EFBFBD>ʽ']:=data2.DataSet['<27><><EFBFBD>ѷ<EFBFBD>ʽ'];
data1.DataSet['ǩ<><C7A9><EFBFBD>ص<EFBFBD>']:=data2.DataSet['ǩ<><C7A9><EFBFBD>ص<EFBFBD>'];
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ']:=data2.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ'];
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=data2.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=data2.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=data2.DataSet['<27><><EFBFBD><EFBFBD>'];
data1.DataSet['<27><>װ']:=data2.DataSet['<27><>װ'];
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=data2.DataSet['<27><><EFBFBD><EFBFBD>'];
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=data2.DataSet['<27><><EFBFBD><EFBFBD>'];
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']:=data2.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д'];
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=data2.DataSet['<27><><EFBFBD><EFBFBD>'];
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=data2.DataSet['<27><><EFBFBD><EFBFBD>'];
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=data2.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
data1.DataSet['ж<><D0B6><EFBFBD><EFBFBD>']:=data2.DataSet['ж<><D0B6><EFBFBD><EFBFBD>'];
data1.DataSet['Ŀ<>ĵ<EFBFBD>']:=data2.DataSet['Ŀ<>ĵ<EFBFBD>'];
data1.DataSet['<27><>װ<EFBFBD><D7B0>']:=data2.DataSet['<27><>װ<EFBFBD><D7B0>'];
data1.DataSet['<27><>ע']:=data2.DataSet['<27><>ע'];
data1.DataSet['Ԥ<><D4A4><EFBFBD>ص<EFBFBD>']:=get_parameters_value(50,'QINGDAO,CHINA');
data1.DataSet['<27><>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=null;
data1.DataSet['ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
data1.DataSet['<27>ɳ<EFBFBD><C9B3><EFBFBD><EFBFBD><EFBFBD>']:=null;
data1.DataSet['<27>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD>']:=null;
data1.DataSet['<27>Ƿ<EFBFBD><C7B7>ĵ<EFBFBD>']:=0;
data1.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD>˰']:=0;
data1.DataSet['<27>Ƿ<EFBFBD>ͨ<EFBFBD><CDA8>']:=0;
data1.DataSet['<27>Ƿ<EFBFBD>ǩ<EFBFBD><C7A9>']:=0;
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ɳ<EFBFBD>']:=0;
data1.DataSet['<27>Ƿ<EFBFBD><C7B7>ɳ<EFBFBD>']:=0;
data1.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
data1.DataSet['Ӧ<><D3A6>½<EFBFBD><C2BD>']:=0;
data1.DataSet['Ӧ<><D3A6>½<EFBFBD><C2BD>']:=0;
data1.DataSet['½<><C2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
data1.DataSet['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
data1.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=0;
data1.DataSet['<27><><EFBFBD>۶<EFBFBD><DBB6><EFBFBD>']:=1;
data1.DataSet['<27>Ƿ<EFBFBD><C7B7>˲<EFBFBD>']:=0;
data1.DataSet.Post;
if not data5.DataSet.IsEmpty then begin
data5.dataset.First;
while not data5.DataSet.Eof do begin
if (Data5.DataSet['Ӧ<>ս<EFBFBD><D5BD><EFBFBD>']<>0) then begin
Data4.DataSet.Insert;
Data4.DataSet['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=Data5.DataSet['Ӧ<>տͻ<D5BF>'];
Data4.DataSet['<27><><EFBFBD><EFBFBD>']:='<27><>';
Data4.DataSet['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>';
Data4.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=Data5.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
Data4.DataSet['<27><>׼']:=Data5.DataSet['Ӧ<>ձ<EFBFBD>׼'];
Data4.DataSet['<27><><EFBFBD><EFBFBD>']:=Data5.DataSet['Ӧ<>յ<EFBFBD><D5B5><EFBFBD>'];
Data4.DataSet['<27><><EFBFBD><EFBFBD>']:=Data5.DataSet['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
Data4.DataSet['<27><><EFBFBD><EFBFBD>']:=Data5.DataSet['Ӧ<>ս<EFBFBD><D5BD><EFBFBD>'];
Data4.DataSet['<27>ұ<EFBFBD>']:=Data5.DataSet['Ӧ<>ձұ<D5B1>'];
Data4.DataSet['<27><><EFBFBD><EFBFBD>']:=Data5.DataSet['Ӧ<>ջ<EFBFBD><D5BB><EFBFBD>'];
Data4.DataSet['¼<><C2BC><EFBFBD><EFBFBD>']:=Data2.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
Data4.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
Data4.DataSet['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
Data4.DataSet['<27><><EFBFBD>뿪Ʊ']:=0;
Data4.DataSet['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
Data4.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
Data4.DataSet['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
Data4.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
Data4.DataSet['<27>Ƿ<EFBFBD><C7B7>渶']:=0;
Data4.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ']:=0;
Data4.DataSet['<27><><EFBFBD>㵥λ']:='ί<>е<EFBFBD>λ';
Data4.DataSet['˳<><CBB3>']:=0;
Data4.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
Data4.DataSet['<27><><EFBFBD><EFBFBD>']:=bsno;
Data4.DataSet.post;
end;
if (Data5.DataSet['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']<>0) then begin
Data4.DataSet.Insert;
Data4.DataSet['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=Data5.DataSet['Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD>'];
Data4.DataSet['<27><><EFBFBD><EFBFBD>']:='<27><>';
Data4.DataSet['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>';
Data4.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=Data5.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
Data4.DataSet['<27><>׼']:=Data5.DataSet['Ӧ<><D3A6><EFBFBD><EFBFBD>׼'];
Data4.DataSet['<27><><EFBFBD><EFBFBD>']:=Data5.DataSet['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
Data4.DataSet['<27><><EFBFBD><EFBFBD>']:=Data5.DataSet['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
Data4.DataSet['<27><><EFBFBD><EFBFBD>']:=Data5.DataSet['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
Data4.DataSet['<27>ұ<EFBFBD>']:=Data5.DataSet['Ӧ<><D3A6><EFBFBD>ұ<EFBFBD>'];
Data4.DataSet['<27><><EFBFBD><EFBFBD>']:=Data5.DataSet['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
Data4.DataSet['¼<><C2BC><EFBFBD><EFBFBD>']:=Data2.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
Data4.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
Data4.DataSet['<27><><EFBFBD>뿪Ʊ']:=0;
Data4.DataSet['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
Data4.DataSet['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
Data4.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
Data4.DataSet['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
Data4.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
Data4.DataSet['<27>Ƿ<EFBFBD><C7B7>渶']:=0;
Data4.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ']:=0;
Data4.DataSet['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾';
Data4.DataSet['˳<><CBB3>']:=0;
Data4.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
Data4.DataSet['<27><><EFBFBD><EFBFBD>']:=bsno;
Data4.DataSet.post;
end;
data5.DataSet.Next;
end;
end;
if (Data2.DataSet.FieldByName('<27><>װ<EFBFBD><D7B0>').AsString<>'') then begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
sql.Add('select * from t_opor_ctn where OR_ID='+Data2.DataSet.fieldbyname('OR_ID').AsString);
Open;
if recordcount<>0 then begin
Data3.DataSet.Insert;
Data3.DataSet['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
Data3.DataSet['<27>ߴ<EFBFBD>']:=aQuery['<27>ߴ<EFBFBD>'];
Data3.DataSet['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
Data3.DataSet['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
Data3.DataSet['TEU']:=aQuery['TEU'];
Data3.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ'];
Data3.DataSet['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
Data3.DataSet['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
Data3.DataSet['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
Data3.DataSet['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
Data3.DataSet['<27><>װ']:=aQuery['<27><>װ'];
Data3.DataSet['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
Data3.DataSet['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
Data3.DataSet['Ʒ<><C6B7>']:=aQuery['Ʒ<><C6B7>'];
Data3.DataSet['<27><>ͷ']:=aQuery['<27><>ͷ'];
Data3.DataSet['<27><>ע']:=aQuery['<27><>ע'];
Data3.DataSet['<27><><EFBFBD><EFBFBD>']:=bsno;
Data3.DataSet.post;
end;
end;
update_ctn(TAdoQuery(Data3.DataSet));
finally
freeAndNil(aQuery);
end;
end;
if (Data2.DataSet.fieldbyname('״̬').AsString='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>') or (Data2.DataSet.fieldbyname('״̬').AsString='<27><><EFBFBD><EFBFBD><EFBFBD>ύ') then begin
Data2.DataSet.Edit;
Data2.DataSet['״̬']:='<27><><EFBFBD>ܶ<EFBFBD><DCB6><EFBFBD>';
Data2.DataSet['<27><><EFBFBD><EFBFBD>']:=bsno;
Data2.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=ywno;
Data2.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
Data2.DataSet['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>']:=date;
Data2.DataSet['<27><EFBFBD><E1BDBB>']:=employee;
Data2.DataSet['<27>ύʱ<E1BDBB><CAB1>']:=date;
Data2.DataSet.Post;
end else if Data2.DataSet.fieldbyname('״̬').AsString='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then begin
Data2.DataSet.Edit;
Data2.DataSet['״̬']:='<27><><EFBFBD>ܶ<EFBFBD><DCB6><EFBFBD>';
Data2.DataSet['<27><><EFBFBD><EFBFBD>']:=bsno;
Data2.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=ywno;
Data2.DataSet['<27><EFBFBD><E1BDBB>']:=employee;
Data2.DataSet['<27>ύʱ<E1BDBB><CAB1>']:=date;
Data2.DataSet.Post;
end;
Send_op_do('<27><><EFBFBD>۶<EFBFBD><DBB6><EFBFBD>ȷ<EFBFBD><C8B7><><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+ywno
+',ί<>б<EFBFBD><D0B1><EFBFBD>:'+Data2.DataSet.fieldbyname('<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>').AsString,'72',
trim(DBComboBoxEh1.text),
trim(DBComboBoxEh2.text),
data2.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString);
frm_main.db.CommitTrans;
finally
if frm_main.db.InTransaction then begin
frm_main.db.RollbackTrans;
end;
end;
close;
end;
procedure Tfrm_op_seae_order_add.RxDBLookupCombo14Change(Sender: TObject);
begin
{
if RxDBLookupCombo14.DisplayValue='' then
exit;
if frm_data_share.t_sys_employee.locate('<27><><EFBFBD><EFBFBD>',RxDBLookupCombo14.DisplayValue,[]) then
RxDBLookupCombo30.DisplayValue:=frm_data_share.t_sys_employee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
}
end;
procedure Tfrm_op_seae_order_add.DBComboBoxEh1DropDown(Sender: TObject);
begin
DBComboBoxEh1.items.clear;
if RxDBLookupCombo30.DisplayValue<>'' then begin
AdoQuery1.Close;
AdoQuery1.sql.Clear;
AdoQuery1.SQL.Add('select * from t_sys_employee where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+RxDBLookupCombo30.DisplayValue+'''');
AdoQuery1.Open;
AdoQuery1.first;
while not AdoQuery1.Eof do begin
DBComboBoxEh1.Items.Add(AdoQuery1.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
ADOQuery1.Next;
end;
end else begin
AdoQuery1.Close;
AdoQuery1.sql.Clear;
AdoQuery1.SQL.Add('select * from t_sys_employee ');
AdoQuery1.Open;
AdoQuery1.first;
while not AdoQuery1.Eof do begin
DBComboBoxEh1.Items.Add(AdoQuery1.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
ADOQuery1.Next;
end;
end;
end;
procedure Tfrm_op_seae_order_add.DBComboBoxEh2DropDown(Sender: TObject);
begin
DBComboBoxEh2.items.clear;
if RxDBLookupCombo1.DisplayValue<>'' then begin
AdoQuery1.Close;
AdoQuery1.sql.Clear;
AdoQuery1.SQL.Add('select * from t_sys_employee where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+RxDBLookupCombo1.DisplayValue+'''');
AdoQuery1.Open;
AdoQuery1.first;
while not AdoQuery1.Eof do begin
DBComboBoxEh2.Items.Add(AdoQuery1.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
ADOQuery1.Next;
end;
end else begin
AdoQuery1.Close;
AdoQuery1.sql.Clear;
AdoQuery1.SQL.Add('select * from t_sys_employee ');
AdoQuery1.Open;
AdoQuery1.first;
while not AdoQuery1.Eof do begin
DBComboBoxEh2.Items.Add(AdoQuery1.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
ADOQuery1.Next;
end;
end;
end;
procedure Tfrm_op_seae_order_add.DBComboBoxEh1Change(Sender: TObject);
begin
if frm_data_share.t_sys_employee.Locate('<27><><EFBFBD><EFBFBD>',DBComboBoxEh1.Text,[]) then
RxDBLookupCombo30.DisplayValue:=frm_data_share.t_sys_employee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
procedure Tfrm_op_seae_order_add.DBComboBoxEh2Change(Sender: TObject);
begin
if frm_data_share.t_sys_employee.Locate('<27><><EFBFBD><EFBFBD>',DBComboBoxEh2.Text,[]) then
RxDBLookupCombo1.DisplayValue:=frm_data_share.t_sys_employee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
procedure Tfrm_op_seae_order_add.FormClose(Sender: TObject;
var Action: TCloseAction);
var
inifile1:Tinifile;
begin
if bsSkinCheckRadioBox1.Checked then begin
inifile1:=Tinifile.Create(ExtractFilePath(application.ExeName)+'main.ini');
inifile1.WriteString('seaeorder','op',DBComboBoxEh1.Text);
inifile1.WriteString('seaeorder','opdept',RxDBLookupCombo30.DisplayValue);
inifile1.WriteString('seaeorder','kf',DBComboBoxEh2.Text);
inifile1.WriteString('seaeorder','kfdept',RxDBLookupCombo1.DisplayValue);
inifile1.Writebool('seaeorder','savecheck',bsSkinCheckRadioBox1.Checked);
inifile1.free;
end;
end;
end.