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.

390 lines
16 KiB
Plaintext

12 months ago
unit u_op_seae_selectbsno;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, BusinessSkinForm, bsSkinCtrls, dxExEdtr, dxCntner, dxTL,
dxDBCtrl, dxDBGrid, DB, ADODB, dxDBTLCl, dxGrClms, RxLookup, StdCtrls,
wwdbdatetimepicker;
type
Tfrm_op_seae_selectbsno = class(TForm)
bsBusinessSkinForm1: TbsBusinessSkinForm;
bsSkinPanel1: TbsSkinPanel;
bsSkinButton5: TbsSkinButton;
bsSkinNotebook1: TbsSkinNotebook;
t_ch_fee: TADOQuery;
t_ch_fee1: TDataSource;
bsSkinButton10: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
t_bill1: TDataSource;
t_bill: TADOQuery;
bsSkinPanel2: TbsSkinPanel;
bsSkinPanel3: TbsSkinPanel;
Edit1: TEdit;
Edit2: TEdit;
Label6: TLabel;
Label1: TLabel;
Label9: TLabel;
RxDBLookupCombo2: TRxDBLookupCombo;
Label3: TLabel;
Edit4: TEdit;
Edit3: TEdit;
Label2: TLabel;
Label10: TLabel;
wwDBDateTimePicker1: TwwDBDateTimePicker;
dxDBGrid2: TdxDBGrid;
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
dxDBGridMaskColumn4: TdxDBGridMaskColumn;
dxDBGridMaskColumn5: TdxDBGridMaskColumn;
dxDBGridMaskColumn6: TdxDBGridMaskColumn;
dxDBGridMaskColumn7: TdxDBGridMaskColumn;
dxDBGrid1Column12: TdxDBGridMaskColumn;
dxDBGrid1Column13: TdxDBGridMaskColumn;
dxDBGrid1Column14: TdxDBGridMaskColumn;
dxDBGrid1Column15: TdxDBGridMaskColumn;
dxDBGrid1Column16: TdxDBGridDateColumn;
dxDBGrid1Column17: TdxDBGridDateColumn;
dxDBGrid1Column18: TdxDBGridDateColumn;
dxDBGrid1Column19: TdxDBGridMaskColumn;
dxDBGrid1Column20: TdxDBGridMaskColumn;
dxDBGrid1Column22: TdxDBGridDateColumn;
dxDBGrid1Column63: TdxDBGridMaskColumn;
dxDBGrid1Column64: TdxDBGridMaskColumn;
dxDBGrid1Column65: TdxDBGridDateColumn;
dxDBGrid1Column66: TdxDBGridMaskColumn;
dxDBGrid1Column67: TdxDBGridMaskColumn;
op_type: TEdit;
fee_type: TEdit;
t_do_bill: TDataSource;
t_op_ctn_insert: TADOQuery;
procedure bsSkinButton5Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_op_seae_selectbsno: Tfrm_op_seae_selectbsno;
implementation
uses u_main, my_sys_function, u_data_share, u_op_seae_order_edit;
{$R *.dfm}
procedure Tfrm_op_seae_selectbsno.bsSkinButton5Click(Sender: TObject);
begin
CLOSE;
end;
procedure Tfrm_op_seae_selectbsno.FormShow(Sender: TObject);
begin
// bsSkinNotebook1.PageIndex:=strtoint(op_type.text);
end;
procedure Tfrm_op_seae_selectbsno.bsSkinButton10Click(Sender: TObject);
begin
Edit1.text:='';
Edit2.text:='';
Edit3.text:='';
Edit4.text:='';
RxDBLookupCombo2.ClearValue;
wwDBDateTimePicker1.Text:='';
end;
procedure Tfrm_op_seae_selectbsno.bsSkinButton2Click(Sender: TObject);
var
str:widestring;
begin
case bsSkinNotebook1.PageIndex of
1:
begin
if Edit1.text<>''then
str:=' where ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+Edit1.text+'%'+'''';
if Edit4.text<>''then
begin
if str=''then
str:=' where ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit4.text+'%'+''''
else
str:=str+' and ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit4.text+'%'+'''';
end;
if Edit2.text<>''then
begin
if str=''then
str:=' where <20><><EFBFBD><EFBFBD><E1B5A5> like '+''''+'%'+Edit2.text+'%'+''''
else
str:=str+' and <20><><EFBFBD><EFBFBD><E1B5A5> like '+''''+'%'+Edit2.text+'%'+'''';
end;
if Edit3.text<>''then
begin
if str=''then
str:=' where <20><><EFBFBD><EFBFBD><E1B5A5> like '+''''+'%'+Edit3.text+'%'+''''
else
str:=str+' and <20><><EFBFBD><EFBFBD><E1B5A5> like '+''''+'%'+Edit3.text+'%'+'''';
end;
if RxDBLookupCombo2.DisplayValue<>''then
begin
if str=''then
str:=' where ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo2.DisplayValues[1]+''''
else
str:=str+' and ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo2.DisplayValues[1]+'''';
end;
if wwDBDateTimePicker1.text<>''then
begin
if str=''then
str:=' where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBDateTimePicker1.text+''''
else
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBDateTimePicker1.text+'''';
end;
str:='select * from t_op_seae '+str+default_sort(53,'t_op_seae','','desc');
t_bill.close;
t_bill.sql.clear;
t_bill.sql.add(str);
t_bill.open;
end;
end;
end;
procedure Tfrm_op_seae_selectbsno.bsSkinButton3Click(Sender: TObject);
var
i: Integer;
bsno,ywno,sql:String;
aQuery:TAdoQuery;
dsstr,PostUrl:string;
begin
if t_bill.IsEmpty then exit;
{
t_do_bill.DataSet.Edit;
t_do_bill.DataSet.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD>').AsString:=t_bill.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD>').AsString;
t_do_bill.DataSet.fieldbyname('֪ͨ<CDA8><D6AA>').AsString:=t_bill.fieldbyname('֪ͨ<CDA8><D6AA>').AsString;
t_do_bill.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_bill.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
t_do_bill.DataSet.fieldbyname('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').AsString:=t_bill.fieldbyname('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').AsString;
t_do_bill.DataSet.fieldbyname('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').AsString:=t_bill.fieldbyname('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').AsString;
t_do_bill.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').AsString:=t_bill.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').AsString;
t_do_bill.DataSet.post;
}
frm_main.db.BeginTrans;
try
// if not t_op_seae_insert.Active then t_op_seae_insert.Open; //<2F><><EFBFBD><EFBFBD>
// if not t_op_ctn_insert.Active then t_op_ctn_insert.Open; //
bsno:=t_bill.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_bill.Edit;
t_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('CARGOID').AsString;
if (t_bill.FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString<>frm_op_seae_order_edit.t_op_seae.FieldByName('CARRIER').AsString) then begin
t_bill.FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('CARRIER').AsString;
aQuery:=CreateAdoQuery;
try
With aQuery do begin
close;sql.Clear;
sql.Add('select Ĭ<>ϳ<EFBFBD>վ,Ĭ<>ϳ<EFBFBD>վ<EFBFBD><D5BE>ϵ<EFBFBD><CFB5> from t_crm_client where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+frm_op_seae_order_edit.t_op_seae.FieldByName('CARRIER').AsString+'''');
Open;
if not IsEmpty then begin
t_bill.FieldByName('<27><>վ').AsString:=aQuery.fieldbyname('Ĭ<>ϳ<EFBFBD>վ').AsString;
t_bill.FieldByName('<27><>վ<EFBFBD><D5BE>ϵ<EFBFBD><CFB5>').AsString:=aQuery.fieldbyname('Ĭ<>ϳ<EFBFBD>վ<EFBFBD><D5BE>ϵ<EFBFBD><CFB5>').AsString;
end;
end;
finally
FreeAndNil(aQuery);
end;
end;
t_bill.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('CUSTNO').AsString;
t_bill.FieldByName('װ<><D7B0><EFBFBD><EFBFBD>').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('PORTLOAD').AsString;
t_bill.FieldByName('װ<>۴<EFBFBD><DBB4><EFBFBD>').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('PORTLOADID').AsString; //////??????
t_bill.FieldByName('<27><EFBFBD><E1B5A5><EFBFBD><EFBFBD>').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('NOBILL').AsString;
t_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('SERVICE').AsString;
t_bill.FieldByName('<27><>ͷ').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('MARKS').AsString;
t_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('DESCRIPTION').AsString;
t_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('SHIPPER').AsString;
t_bill.FieldByName('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('CONSIGNEE').AsString;
t_bill.FieldByName('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('NOTIFYPARTY').AsString;
t_bill.FieldByName('<27><><EFBFBD>ѷ<EFBFBD>ʽ').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('BLFRT').AsString;
t_bill.FieldByName('ǩ<><C7A9><EFBFBD>ص<EFBFBD>').AsString:='QINGDAO,CHINA';
t_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('KGS').AsString+'KGS';
t_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('CBM').AsString+'CBM';
t_bill.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=frm_op_seae_order_edit.t_op_seae.FieldByName('PKGS').AsInteger;
// t_op_seae_insert.FieldByName('<27><>װ').AsString:=getkingpkgs(t_op_seae.FieldByName('KINDPKGS').AsString);
t_bill.FieldByName('<27><>װ').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('KINDPKGS').AsString;
if (t_bill.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger>1) then t_bill.FieldByName('<27><>װ').AsString:=t_bill.FieldByName('<27><>װ').AsString+'S';
t_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('PKGS').AsString+t_bill.FieldByName('<27><>װ').AsString;
t_bill.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=frm_op_seae_order_edit.t_op_seae.FieldByName('KGS').AsFloat;
t_bill.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=frm_op_seae_order_edit.t_op_seae.FieldByName('CBM').AsFloat;
t_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д').AsString:='SAY:'+ntoc(frm_op_seae_order_edit.t_op_seae.FieldByName('PKGS').asfloat,true)
+frm_op_seae_order_edit.t_op_seae.FieldByName('KINDPKGS').asstring+' ONLY.';
t_bill.FieldByName('Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('DCLASS').AsString;
t_bill.FieldByName('Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('DUNNO').AsString;
t_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('TEMPSET').AsString;
t_bill.FieldByName('<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('REEFERF').AsString;
t_bill.FieldByName('<27>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD>').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('SERVICECONTRACTNO').AsString;
t_bill.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('VESSEL').AsString;
t_bill.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('VOYNO').AsString;
t_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=frm_op_seae_order_edit.t_op_seae.FieldByName('ETD').Value;
t_bill.FieldByName('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('PORTDISCHARGEID').AsString;
if (frm_data_share.t_code_disport.Locate('EDI<44><49><EFBFBD><EFBFBD>',frm_op_seae_order_edit.t_op_seae.FieldByName('PORTDISCHARGEID').AsString,[])) then
t_bill.FieldByName('ж<><D0B6><EFBFBD><EFBFBD>').AsString:=frm_data_share.t_code_disport.fieldbyname('Ӣ<><D3A2><EFBFBD><EFBFBD>').AsString
else
t_bill.FieldByName('ж<><D0B6><EFBFBD><EFBFBD>').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('PORTDISCHARGE').AsString;
if (frm_op_seae_order_edit.t_op_seae.FieldByName('CUSTOMERNAME').AsString='<27><><EFBFBD><EFBFBD>') then
t_bill.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsInteger:=10;
t_bill.FieldByName('Ŀ<>ĵش<C4B5><D8B4><EFBFBD>').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('DESTINATIONID').AsString;
if (frm_data_share.t_code_disport.Locate('EDI<44><49><EFBFBD><EFBFBD>',frm_op_seae_order_edit.t_op_seae.FieldByName('DESTINATIONID').AsString,[])) then
t_bill.FieldByName('Ŀ<>ĵ<EFBFBD>').AsString:=frm_data_share.t_code_disport.fieldbyname('Ӣ<><D3A2><EFBFBD><EFBFBD>').AsString
else t_bill.FieldByName('Ŀ<>ĵ<EFBFBD>').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('DESTINATION').AsString;
t_bill.FieldByName('<27><>װ<EFBFBD><D7B0>').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('CNTRTOTAL').AsString;
t_bill.FieldByName('<27><><EFBFBD>۶<EFBFBD><DBB6><EFBFBD>˵<EFBFBD><CBB5>').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('REMARK').AsString;
t_bill.FieldByName('<27><>ע').AsString:='<27>ͻ<EFBFBD><CDBB><EFBFBD>ϵ<EFBFBD><CFB5>:'+frm_op_seae_order_edit.t_op_seae.FieldByName('CUSTATTN').AsString+' '+frm_op_seae_order_edit.t_op_seae.FieldByName('CUSTTEL').AsString;
if(frm_op_seae_order_edit.t_op_seae.FieldByName('ISSUETYPE').AsString<>'') then
t_bill.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD>ʽ').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('ISSUETYPE').AsString;
t_bill.FieldByName('<27><><EFBFBD>ѷ<EFBFBD>ʽ').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('BLFRT').AsString;
if ((frm_op_seae_order_edit.t_op_seae.FieldByName('PREPARDAT').AsString<>'') or (frm_op_seae_order_edit.t_op_seae.FieldByName('PAYABLEAT').AsString<>'')) then begin
t_bill.FieldByName('Ԥ<><D4A4><EFBFBD>ص<EFBFBD>').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('PREPARDAT').AsString;
t_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>').AsString:=frm_op_seae_order_edit.t_op_seae.FieldByName('PAYABLEAT').AsString;
end;
t_bill.Post;
if (not frm_op_seae_order_edit.t_op_ctn.IsEmpty) then
begin
try
t_op_ctn_insert.Close;
t_op_ctn_insert.Open;
with frm_op_seae_order_edit.t_op_ctn do begin
First;
while not Eof do
begin
t_op_ctn_insert.Insert;
t_op_ctn_insert['<27><><EFBFBD><EFBFBD>']:=frm_op_seae_order_edit.t_op_ctn['CTNNUM'];
if frm_data_share.t_code_ctn.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ',frm_op_seae_order_edit.t_op_ctn['CTNALL'],[]) then
begin
t_op_ctn_insert['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=frm_op_seae_order_edit.t_op_ctn['CTNALL'];
t_op_ctn_insert['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_ctn['<27><><EFBFBD><EFBFBD>'];
t_op_ctn_insert['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_ctn['<27><><EFBFBD><EFBFBD>'];
t_op_ctn_insert['<27>ߴ<EFBFBD>']:=frm_data_share.t_code_ctn['<27>ߴ<EFBFBD>'];
if frm_data_share.t_code_ctn.FieldByName('<27>ߴ<EFBFBD>').asstring='20'then
t_op_ctn_insert['TEU']:=1*t_op_ctn_insert.FieldByName('<27><><EFBFBD><EFBFBD>').asinteger;
if (frm_data_share.t_code_ctn.FieldByName('<27>ߴ<EFBFBD>').asstring='40')OR
(frm_data_share.t_code_ctn.FieldByName('<27>ߴ<EFBFBD>').asstring='45')then
t_op_ctn_insert['TEU']:=2*t_op_ctn_insert.FieldByName('<27><><EFBFBD><EFBFBD>').asinteger;
end
else
begin
t_op_ctn_insert['<27><><EFBFBD><EFBFBD>']:='';
t_op_ctn_insert['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:='';
t_op_ctn_insert['<27><><EFBFBD><EFBFBD>']:='';
t_op_ctn_insert['<27>ߴ<EFBFBD>']:='';
t_op_ctn_insert['TEU']:=0;
end;
t_op_ctn_insert['<27><><EFBFBD><EFBFBD>']:=frm_op_seae_order_edit.t_op_ctn['PKGS'];
t_op_ctn_insert['<27><>װ']:=frm_op_seae_order_edit.t_op_ctn['KINDPKGS'];
t_op_ctn_insert['<27><><EFBFBD><EFBFBD>']:=frm_op_seae_order_edit.t_op_ctn['KGS'];
t_op_ctn_insert['<27><><EFBFBD><EFBFBD>']:=frm_op_seae_order_edit.t_op_ctn['CBM'];
// t_op_ctn_insert['Ʒ<><C6B7>']:=t_op_ctn['GOODSNAME'];
t_op_ctn_insert['<27><><EFBFBD><EFBFBD>']:=bsno;
t_op_ctn_insert.post;
Next;
end;
end;
finally
end;
end;
update_ctn(t_op_ctn_insert);
frm_op_seae_order_edit.t_op_seae.Edit;
frm_op_seae_order_edit.t_op_seae.fieldbyname('ORSTATUS').AsString:='0';
frm_op_seae_order_edit.t_op_seae.fieldbyname('BSCUSTNO').AsString:=bsno;
frm_op_seae_order_edit.t_op_seae.Post;
frm_op_seae_order_edit.m_qryTask.Edit;
frm_op_seae_order_edit.m_qryTask.FieldByName('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').AsDateTime:=Now;
frm_op_seae_order_edit.m_qryTask.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').AsInteger:=1;
frm_op_seae_order_edit.m_qryTask.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString:='<27>ѽ<EFBFBD><D1BD><EFBFBD>';
frm_op_seae_order_edit.m_qryTask.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=employee;
frm_op_seae_order_edit.m_qryTask.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա').AsString:=employee;
frm_op_seae_order_edit.m_qryTask.Post;
sql:='INSERT INTO t_op_task_state ( [<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>],[<5B><><EFBFBD><EFBFBD>״̬],[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>])VALUES (''%s'' ,''%s'' ,''%s'')';
sql:=Format(sql,[frm_op_seae_order_edit.m_qryTask.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,'<27>ѽ<EFBFBD><D1BD><EFBFBD>',employee] );
frm_op_seae_order_edit.m_qryTask.Connection.Execute(sql);
frm_op_seae_order_edit.m_qryTask.Requery();
frm_main.db.CommitTrans;
if (t_bill.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsInteger=10) then begin
dsstr:=dsstr+'{';
dsstr:=dsstr+'"orderNo":"'+frm_op_seae_order_edit.t_op_seae.FieldByName('CUSTNO').AsString+'"';
dsstr:=dsstr+',"status":"N"';
dsstr:=dsstr+',"bookingId":"'+t_bill.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'"';
dsstr:=dsstr+',"bookingIdDate":"'+FormatDateTime('YYYY-MM-DD hh:mm:ss',t_bill.FieldByName('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asdatetime)+'"';
dsstr:=dsstr+'}';
PostUrl:=get_parameters_value(2124,'http://47.104.90.170:6857/api/clp/bookingMsgReceipt');
TDsHaierThread.create(PostUrl,dsstr,'');
InsertSysLog('<27>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ',t_bill.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
end;
finally
if frm_main.db.InTransaction then
begin
frm_main.db.RollbackTrans;
end;
Application.MessageBox(PChar('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'),'<27><>Ϣ<EFBFBD><CFA2>ʾ');
close;
end;
close;
end;
end.