📄 frm_allexportbillinfo.~pas
字号:
{Shipper}
thdm.InsStr(sqlstr,Ztrustfile.shipper,',');
{Consignee}
thdm.InsStr(sqlstr,Ztrustfile.consignee,',');
{Agent 通知方}
thdm.InsStr(sqlstr,Ztrustfile.inform,',');
{cuscompany运费对象}
thdm.InsStr(sqlstr,'',',');
{Reciplace 收货地}
thdm.InsStr(sqlstr,Ztrustfile.receport,',');
{AirPort 装货港}
thdm.InsStr(sqlstr,Ztrustfile.loadport,',');
{AirPortTo 卸货港}
thdm.InsStr(sqlstr,Ztrustfile.unloadport,',');
{destination 目的地}
thdm.InsStr(sqlstr,Ztrustfile.dest,',');
{Carrier 航空公司}
thdm.InsStr(sqlstr,Ztrustfile.shipcomcode,',');
{一乘航班,经停,出运日期}
thdm.InsStr(sqlstr,Ztrustfile.ycvoyage,',');
thdm.InsStr(sqlstr,Ztrustfile.ycport,',');
thdm.InsStr(sqlstr,Ztrustfile.ycvoyagedate,',');
thdm.InsStr(sqlstr,Ztrustfile.ycvoyagedate,',');
thdm.InsStr(sqlstr,Ztrustfile.ycvoyagedate,',');
{二乘航班,经停,出运日期}
thdm.InsStr(sqlstr,Ztrustfile.ecvoyage,',');
thdm.InsStr(sqlstr,Ztrustfile.ecport,',');
thdm.InsStr(sqlstr,Ztrustfile.ecvoyagedate,',');
{三乘航班,经停,出运日期}
thdm.InsStr(sqlstr,Ztrustfile.scvoyage,',');
thdm.InsStr(sqlstr,Ztrustfile.scport,',');
thdm.InsStr(sqlstr,Ztrustfile.scvoyagedate,',');
{Accinfo 麦头}
thdm.InsStr(sqlstr,Ztrustfile.maitou,',');
{Handing}
thdm.InsStr(sqlstr,Ztrustfile.hi,',');
{Curr}
thdm.InsStr(sqlstr,Ztrustfile.currency,',');
{CHGS}
thdm.InsStr(sqlstr,Ztrustfile.chgs,',');
{PPD}
thdm.InsStr(sqlstr,Ztrustfile.ppd,',');
{COLL}
thdm.InsStr(sqlstr,Ztrustfile.coll,',');
{OPPD}
thdm.InsStr(sqlstr,Ztrustfile.oppd,',');
{OCOLL}
thdm.InsStr(sqlstr,Ztrustfile.ocoll,',');
{DCV}
thdm.InsStr(sqlstr,Ztrustfile.dvc,',');
{DVCus}
thdm.InsStr(sqlstr,Ztrustfile.odvc,',');
{AccInfo}
thdm.InsStr(sqlstr,Ztrustfile.ai,',');
{A.i.c.}
thdm.InsStr(sqlstr,Ztrustfile.aic,',');
{签定日期}
thdm.InsStr(sqlstr,Ztrustfile.billdate,',');
thdm.InsStr(sqlstr,Ztrustfile.billdate,',');
{签定地点}
thdm.InsStr(sqlstr,Ztrustfile.billplace,',');
{业务员}
thdm.InsStr(sqlstr,Ztrustfile.bussiness,',');
{Befinish 是否完成标记}
thdm.InsStr(sqlstr,Ztrustfile.finish,',');
thdm.InsStr(sqlstr,Ztrustfile.keydown,',');
thdm.InsStr(sqlstr,Ztrustfile.discard,',');
thdm.InsStr(sqlstr,Ztrustfile.zhidan,',');
{进出口标记 出口为1}
thdm.InsStr(sqlstr,1,',');
{修改操作人}
thdm.InsStr(sqlstr,Ztrustfile.ModiOper,',');
thdm.InsStr(sqlstr,Ztrustfile.FileCode,',');
{操作人}
thdm.InsStr(sqlstr,Ztrustfile.opercode,'');
if thdm.execsql(sqlstr) then
else
begin
thdm.THMsgother('主单数据导入插入时出错,记录导入失败,请检查!',mtinformation);
exit;
end;
{保存完毕以后,置于编辑状态}
ValueArray[0]:=Varmain;
ValueArray[1]:=Ztrustfile.fileno;
ValueArray[2]:=Ztrustfile.mawb;
ValueArray[3]:='';
ValueArray[4]:=Ztrustfile.agentcode;
ValueArray[5]:=Ztrustfile.ycvoyage;
ValueArray[6]:=Ztrustfile.unloadport;
ValueArray[7]:=Ztrustfile.ycvoyagedate;
ValueArray[8]:=Ztrustfile.billdate;
ArrayCount:=8;
thdm.AddListView(ValueArray,ArrayCount,Frmagreeinfoout.lv);
{保存货物记录}
if ztrustfile.GoodsNumber>0 then
begin
for i:=1 to ztrustfile.goodsnumber do
begin
context:=fileread(myfilehandle,goodsfile,sizeof(goodsfile));
codeget:=THDM.GetCode('B') ;
{件数 单位 体积 等级 公式 }
{计费重量 单价 费用 货物描述 编号 编号 C.M.I 一个 }
SqlStr:='Insert into PlaneGoods(GoodsCode,FileCode,Pieces,weight,'+
'kgid,Size,rateclass,Formula,chargweight,rate,'+
'total,SpeGoods,SpeRemark,goods) Values(';
THDM.InsStr(SqlStr,codeget,',');
THDM.InsStr(SqlStr,VarMain,',');
THDM.InsStr(SqlStr,goodsfile.GoodsNumber ,',');
THDM.InsStr(SqlStr,goodsfile.goodsweight,',');
THDM.InsStr(SqlStr,goodsfile.goodsunit,',');
THDM.InsStr(SqlStr,goodsfile.goodssize,',');
THDM.InsStr(SqlStr,goodsfile.goodsgrade,',');
THDM.InsStr(SqlStr,goodsfile.formul,',');
THDM.InsStr(SqlStr,goodsfile.chargeweight,',');
THDM.InsStr(SqlStr,goodsfile.unitprice,',');
THDM.InsStr(SqlStr,goodsfile.total,',');
THDM.InsStr(SqlStr,'',',');
THDM.InsStr(SqlStr,'',',');
THDM.InsStr(SqlStr,goodsfile.goodsdesc,'');
if thdm.ExecSQL(sqlstr) then
else
begin
thdm.THMsgother('主单货物数据数据导入插入时出错,记录导入失败,请检查!',mtinformation);
exit;
end;
end;
end;
{进舱派车通知}
if ztrustfile.JCPCNumber>0 then
begin
context:=fileread(myfilehandle,jcpcfile,sizeof(jcpcfile));
CodeGet:=thdm.GetCode('Q');
SqlStr:='insert into landtrans(transcode,trustcode,goodshw,'+
'carname,carrela,thdate,stationcode,'+
'stationaddr,stationrelation,stationtele,jcno,jcdate,'+
'jctime,ccdate,cctime,goodsplace,'+
'goodsrelationstyle,goodsrelation,dodate,jcpc,benative,remark) values(';
thdm.InsStr(sqlstr,CodeGet,',');
thdm.InsStr(sqlstr,Varmain,',');
thdm.InsStr(sqlstr,jcpcfile.goodshw,',');
thdm.InsStr(sqlstr,jcpcfile.carname,',');
thdm.InsStr(sqlstr,jcpcfile.carrela,',');
thdm.InsStr(sqlstr,jcpcfile.thdate,',');
thdm.InsStr(sqlstr,jcpcfile.station,',');
thdm.InsStr(sqlstr,jcpcfile.stationaddr,',');
thdm.InsStr(sqlstr,jcpcfile.stationrela,',');
thdm.InsStr(sqlstr,jcpcfile.stationstyle,',');
thdm.InsStr(sqlstr,jcpcfile.jcno,',');
thdm.InsStr(sqlstr,jcpcfile.jcdate,',');
thdm.InsStr(sqlstr,jcpcfile.jctime,',');
thdm.InsStr(sqlstr,jcpcfile.ccdate,',');
thdm.InsStr(sqlstr,jcpcfile.cctime,',');
thdm.InsStr(sqlstr,jcpcfile.goodsplace,',');
thdm.InsStr(sqlstr,jcpcfile.goodsrelastyle,',');
thdm.InsStr(sqlstr,jcpcfile.goodsrela,',');
thdm.InsStr(sqlstr,jcpcfile.recorddate,',');
thdm.InsStr(sqlstr,jcpcfile.ifpc,',');
thdm.InsStr(sqlstr,jcpcfile.ifnative,',');
thdm.InsStr(sqlstr,jcpcfile.remark,'');
if thdm.ExecSQL(sqlstr) then
else
begin
thdm.THMsgother('主单进舱派车数据导入插入时出错,记录导入失败,请检查!',mtinformation);
exit;
end;
end;
{报关文件}
if ztrustfile.bgnumber>0 then
begin
for i:=1 to ztrustfile.bgnumber do
begin
context:=fileread(myfilehandle,bgfile,sizeof(bgfile));
codeget:=thdm.GetCode('K');
sqlstr:='insert into truckfile(kcode,trustcode,fileno,mawb,cuscode,'+
'ciqname,filename,filenameno,recedate,returndate,ciqrecedate,ciqreturndate,'+
'occurtime,PlaneOcean,operator,remark) values(';
thdm.InsStr(sqlstr,codeget,',');
thdm.InsStr(sqlstr,varmain,',');
thdm.InsStr(sqlstr,bgfile.fileno,',');
thdm.InsStr(sqlstr,bgfile.mawb,',');
thdm.InsStr(sqlstr,bgfile.jyname,',');
thdm.InsStr(sqlstr,bgfile.bghname,',');
thdm.InsStr(sqlstr,bgfile.filename,',');
thdm.InsStr(sqlstr,bgfile.filenameno,',');
thdm.InsStr(sqlstr,bgfile.cusrecedate,',');
thdm.InsStr(sqlstr,bgfile.cusretudate,',');
thdm.InsStr(sqlstr,bgfile.ciqrecedate,',');
thdm.InsStr(sqlstr,bgfile.ciqretudate,',');
thdm.InsStr(sqlstr,bgfile.recorddate,',');
thdm.InsStr(sqlstr,1,',');
thdm.InsStr(sqlstr,bgfile.opercode,',');
thdm.InsStr(sqlstr,bgfile.remark,'');
if THDM.ExecSQL(SqlStr) then
else
begin
thdm.THMsgother('主单报关文件数据导入插入时出错,记录导入失败,请检查!',mtinformation);
exit;
end;
end;
end;
{费用记录}
if ztrustfile.farenumber>0 then
begin
for i:=1 to ztrustfile.farenumber do
begin
context:=fileread(myfilehandle,farefile,sizeof(farefile));
codeget:=thdm.GetCode('F');
SqlStr:='insert into FareInfo(Fareno,Filecode,cuscode,cuscodename,'+
'Farecode,Farepaytodate,Billno,invoiceno,bxno,operator,Acount,FareType,'+
'Writedate,currencytype,currencyrate,recedeal,'+
'goodscode,unitprice,opercwmark,Remark) values (';
thdm.InsStr(sqlstr,codeget,',');
thdm.InsStr(sqlstr,varmain,',');
thdm.InsStr(sqlstr,farefile.cuscode,',');
thdm.InsStr(sqlstr,farefile.cuscodename,',');
thdm.InsStr(sqlstr,farefile.farename,',');
thdm.InsStr(sqlstr,farefile.paytodate,',');
thdm.InsStr(sqlstr,farefile.billno,',');
thdm.InsStr(sqlstr,farefile.invoiceno,',');
thdm.InsStr(sqlstr,'',',');
thdm.InsStr(sqlstr,farefile.opercode,',');
thdm.InsStr(sqlstr,farefile.fareacount,',');
thdm.InsStr(sqlstr,farefile.faretype,',');
thdm.InsStr(sqlstr,farefile.recorddate,',');
thdm.InsStr(sqlstr,farefile.currencytype,',');
thdm.InsStr(sqlstr,farefile.rate,',');
thdm.InsStr(sqlstr,farefile.recedeal,',');
thdm.InsStr(sqlstr,farefile.farefl,',');
thdm.InsStr(sqlstr,farefile.unitprice,',');
thdm.InsStr(sqlstr,farefile.opercwmark,',');
thdm.InsStr(sqlstr,'','');
if THDM.ExecSQL(SqlStr) then
else
begin
thdm.THMsgother('主单费用数据导入插入时出错,记录导入失败,请检查!',mtinformation);
exit;
end;
end;
end;
{分单的一系列文件的导入}
hawbnumber:=ztrustfile.HawbNumber;
for j:=1 to hawbnumber do
begin
context:=fileread(myfilehandle,ztrustfile,sizeof(ztrustfile));
sqlstr:='insert into FileTable(FileCode,MainCode,hawb,'+
'Fileno,Trusttype,trustsource,quotecode,djnumber,kjkm,zcdjnumber,zckjkm,'+
'Cuscode,CusCodeName,shouhuoren,consignname,AgentCode,Shipper,'+
'Consignee,Agent,'+
'CuscomPany,Reciplace,'+
'AirPort,AirPortTo,Destination,'+
'Carrier,BY1,TO1,Fdate,DFdate,Fdate1,'+
'BY2,TO2,Fdate2,By3,TO3,Fdate3,'+
'Accinfo,Handling,Curr,CHGS,'+
'PPD,COLL,OPPD,OCOLL,DVC,DVCus,'+
'AccInsurance,aic,'+
'Execdate,Dexecdate,Execplace,bussiness,'+
'befinish,keydown,Ifdiscard,ifzhidan,'+
'inout,ModiOper,RelaCode,operate) values(';
{FileCode}
VarHawb:=THDM.GetCode('H');
THDM.InsStr(SqlStr,varhawb,',');
{Maincode}
thdm.InsStr(sqlstr,varmain,',');
{Maincode}
thdm.InsStr(sqlstr,Ztrustfile.hawb,',');
{FileNo}
thdm.InsStr(sqlstr,Ztrustfile.fileno,',');
{trusttype}
thdm.InsStr(sqlstr,Ztrustfile.trusttype,',');
{trustsource}
thdm.InsStr(sqlstr,Ztrustfile.trustsource,',');
{quotecode}
if Ztrustfile.jjcode='' then
thdm.InsStr(sqlstr,'null',',')
else
thdm.InsStr(sqlstr,Ztrustfile.jjcode,',');
{djnumber}
thdm.InsStr(sqlstr,Ztrustfile.djnumber,',');
{kjkm}
thdm.InsStr(sqlstr,Ztrustfile.kjkm,',');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -