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.
328 lines
10 KiB
Plaintext
328 lines
10 KiB
Plaintext
unit u_ch_feenewduicust;
|
|
|
|
interface
|
|
|
|
uses
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
Dialogs, BusinessSkinForm, bsSkinCtrls, StdCtrls, wwdbdatetimepicker,ADODB,DB,
|
|
RxLookup;
|
|
|
|
type
|
|
Tfrm_ch_feenewduicust = class(TForm)
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
bsSkinGroupBox1: TbsSkinGroupBox;
|
|
bsSkinButton2: TbsSkinButton;
|
|
data1: TDataSource;
|
|
bsSkinButton3: TbsSkinButton;
|
|
RxDBLookupCombo2: TRxDBLookupCombo;
|
|
Memo1: TMemo;
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
private
|
|
|
|
{ Private declarations }
|
|
public
|
|
feelist: TStringList;
|
|
{ Public declarations }
|
|
end;
|
|
|
|
var
|
|
frm_ch_feenewduicust: Tfrm_ch_feenewduicust;
|
|
|
|
|
|
implementation
|
|
|
|
uses my_sys_function;
|
|
|
|
{$R *.dfm}
|
|
|
|
procedure Tfrm_ch_feenewduicust.bsSkinButton2Click(Sender: TObject);
|
|
begin
|
|
close;
|
|
end;
|
|
|
|
procedure Tfrm_ch_feenewduicust.bsSkinButton4Click(Sender: TObject);
|
|
begin
|
|
close;
|
|
end;
|
|
|
|
procedure Tfrm_ch_feenewduicust.bsSkinButton3Click(Sender: TObject);
|
|
var
|
|
aQuery:TAdoQuery;
|
|
i:Integer;
|
|
begin
|
|
|
|
if (RxDBLookupCombo2.DisplayValues[1]='') then begin
|
|
showmessage('对帐客户不能为空');
|
|
Exit;
|
|
end;
|
|
aQuery:=CreateAdoQuery;
|
|
aQuery.SQL.Text:='update t_ch_fee set 对帐客户名称='''+RxDBLookupCombo2.DisplayValues[1]+''' WHERE CH_ID=:CH_ID';
|
|
try
|
|
|
|
|
|
|
|
for i:=0 to feelist.Count-1 do
|
|
begin
|
|
aQuery.Parameters.ParamByName('CH_ID').Value:=feelist[I];
|
|
aQuery.ExecSQL;
|
|
end;
|
|
|
|
showmessage('更新成功!');
|
|
finally
|
|
FreeAndNil(aQuery);
|
|
end;
|
|
close;
|
|
end;
|
|
{
|
|
procedure Tfrm_op_seae_add.bsSkinButton4Click(Sender: TObject);
|
|
var
|
|
EdiString:TStrings;
|
|
FileNames,bsno:String;
|
|
i: Integer;
|
|
begin
|
|
if (frm_op_seae_add_num=3) or (frm_op_seae_add_num=2) then
|
|
begin
|
|
data1.DataSet.append;
|
|
for i := 0 to (data1.DataSet.DataSource.DataSet.fieldcount-1) do
|
|
begin
|
|
data1.DataSet[data1.DataSet.DataSource.DataSet.fields[i].FieldName]:=
|
|
data1.DataSet.DataSource.DataSet[data1.DataSet.DataSource.DataSet.fields[i].FieldName];
|
|
end;
|
|
if bsSkinCheckRadioBox1.Checked then
|
|
data1.DataSet['装运方式']:=bsSkinCheckRadioBox1.Caption;
|
|
if bsSkinCheckRadioBox2.Checked then
|
|
data1.DataSet['装运方式']:=bsSkinCheckRadioBox2.Caption;
|
|
if bsSkinCheckRadioBox3.Checked then
|
|
data1.DataSet['装运方式']:=bsSkinCheckRadioBox3.Caption;
|
|
if bsSkinCheckRadioBox4.Checked then
|
|
data1.DataSet['装运方式']:=bsSkinCheckRadioBox4.Caption;
|
|
if bsSkinCheckRadioBox5.Checked then
|
|
data1.DataSet['装运方式']:=bsSkinCheckRadioBox5.Caption;
|
|
if bsSkinCheckRadioBox6.Checked then
|
|
data1.DataSet['装运方式']:=bsSkinCheckRadioBox6.Caption;
|
|
if bsSkinCheckRadioBox7.Checked then
|
|
data1.DataSet['业务类型']:='更改单'
|
|
else
|
|
data1.DataSet['业务类型']:='普通货';
|
|
|
|
|
|
data1.DataSet['业务编号']:='';
|
|
data1.DataSet['主编号']:='';
|
|
if not (Trim(frm_data_share.t_sys_noset.fieldbyname('出号规则').Asstring)='手动编辑') then
|
|
data1.DataSet['委托编号']:='';
|
|
|
|
data1.DataSet['编号']:='';
|
|
data1.DataSet['箱型1']:=0;
|
|
data1.DataSet['箱型2']:=0;
|
|
data1.DataSet['箱型3']:=0;
|
|
data1.DataSet['箱型4']:=0;
|
|
data1.DataSet['箱型5']:=0;
|
|
data1.DataSet['箱型6']:=0;
|
|
data1.DataSet['箱型7']:=0;
|
|
data1.DataSet['箱型8']:=0;
|
|
data1.DataSet['箱型9']:=0;
|
|
data1.DataSet['箱型10']:=0;
|
|
data1.DataSet['其他箱型']:=0;
|
|
data1.DataSet['箱TEU']:=0;
|
|
data1.DataSet['集装箱']:='';
|
|
data1.DataSet['箱数大写']:='';
|
|
data1.DataSet['计费标准']:='';
|
|
data1.DataSet['报关日期']:=null;
|
|
data1.DataSet['报关员']:='';
|
|
data1.DataSet['报关单号']:='';
|
|
data1.DataSet['核销单号']:='';
|
|
data1.DataSet['手册号']:='';
|
|
data1.DataSet['是否退税']:=0;
|
|
data1.DataSet['退税日期']:=null;
|
|
data1.DataSet['是否通关']:=0;
|
|
data1.DataSet['通关日期']:=null;
|
|
data1.DataSet['分单列表']:='';
|
|
data1.DataSet['发票号']:='';
|
|
data1.DataSet['商品编码']:='';
|
|
data1.DataSet['是否签单']:=0;
|
|
data1.DataSet['请求派车']:=0;
|
|
data1.DataSet['是否派车']:=0;
|
|
data1.DataSet['是否退税']:=0;
|
|
data1.DataSet['是否通关']:=0;
|
|
data1.DataSet['是否退舱']:=0;
|
|
|
|
data1.DataSet['是否解锁']:=0;
|
|
data1.DataSet['解锁日期']:=null;
|
|
data1.DataSet['解锁人']:='';
|
|
data1.DataSet['应收陆运']:=0;
|
|
data1.DataSet['应付陆运']:=0;
|
|
data1.DataSet['陆运利润']:=0;
|
|
|
|
data1.DataSet['业务状态']:='接受委托';
|
|
data1.DataSet['费用状态']:='录入状态';
|
|
data1.DataSet['录入人']:=employee;
|
|
data1.DataSet['录入日期']:=date;
|
|
data1.DataSet['分部名称']:=subComp;
|
|
data1.DataSet['操作员']:=employee;
|
|
data1.DataSet['报关操作']:=employee;
|
|
data1.DataSet['报检操作']:=employee;
|
|
data1.DataSet['操作部门']:=department;
|
|
data1.DataSet['会计期间']:=wwDBDateTimePicker1.date;
|
|
data1.DataSet['周次']:=WeekofYear(wwDBDateTimePicker1.date);
|
|
data1.DataSet['财务']:=0;
|
|
data1.DataSet['财务凭证']:='';
|
|
|
|
data1.DataSet['件数包装']:='';
|
|
data1.DataSet['货物重量']:='';
|
|
data1.DataSet['货物尺码']:='';
|
|
data1.DataSet['货物描述']:='';
|
|
data1.DataSet['分单列表']:='';
|
|
|
|
data1.DataSet['备案号']:='';
|
|
data1.DataSet['运抵国']:='';
|
|
data1.DataSet['境内货源地']:='';
|
|
data1.DataSet['批准文号']:='';
|
|
data1.DataSet['成交方式']:='';
|
|
data1.DataSet['净重']:=0;
|
|
data1.DataSet['单价']:='';
|
|
data1.DataSet['总价']:='';
|
|
data1.DataSet['商品名称']:='';
|
|
data1.DataSet['数量单位']:='';
|
|
data1.DataSet['接单日期']:=null;
|
|
data1.DataSet['报检日期']:=null;
|
|
data1.DataSet['报检单号']:='';
|
|
data1.DataSet['验货时间']:=null;
|
|
data1.DataSet['实验时间']:=null;
|
|
data1.DataSet['熏蒸时间']:=null;
|
|
data1.DataSet['出证时间']:=null;
|
|
data1.DataSet['实验内容']:='';
|
|
data1.DataSet['币制']:='';
|
|
data1.DataSet['财务']:=0;
|
|
data1.DataSet['财务凭证']:='';
|
|
data1.DataSet['是否打印']:=0;
|
|
data1.DataSet['发货人']:='';
|
|
data1.DataSet['发货人代码']:='';
|
|
data1.DataSet['收货人']:='';
|
|
data1.DataSet['收货人代码']:='';
|
|
data1.DataSet['通知人']:='';
|
|
data1.DataSet['通知人代码']:='';
|
|
data1.DataSet['销售订舱']:=0;
|
|
data1.DataSet['应收海运费']:=0;
|
|
data1.DataSet['应付海运费']:=0;
|
|
data1.DataSet['船公司代理费']:=0;
|
|
data1.DataSet['捷丰代理费']:=0;
|
|
data1.DataSet['香港付费']:=0;
|
|
end
|
|
else
|
|
begin
|
|
bsno:=get_id;
|
|
data1.DataSet.Append;
|
|
if bsSkinCheckRadioBox1.Checked then
|
|
data1.DataSet['装运方式']:=bsSkinCheckRadioBox1.Caption;
|
|
if bsSkinCheckRadioBox2.Checked then
|
|
data1.DataSet['装运方式']:=bsSkinCheckRadioBox2.Caption;
|
|
if bsSkinCheckRadioBox3.Checked then
|
|
data1.DataSet['装运方式']:=bsSkinCheckRadioBox3.Caption;
|
|
if bsSkinCheckRadioBox4.Checked then
|
|
data1.DataSet['装运方式']:=bsSkinCheckRadioBox4.Caption;
|
|
if bsSkinCheckRadioBox5.Checked then
|
|
data1.DataSet['装运方式']:=bsSkinCheckRadioBox5.Caption;
|
|
if bsSkinCheckRadioBox6.Checked then
|
|
data1.DataSet['装运方式']:=bsSkinCheckRadioBox6.Caption;
|
|
if bsSkinCheckRadioBox7.Checked then
|
|
data1.DataSet['业务类型']:='更改单'
|
|
else
|
|
data1.DataSet['业务类型']:='普通货';
|
|
|
|
data1.DataSet['会计期间']:=wwDBDateTimePicker1.date;
|
|
data1.DataSet['周次']:=WeekofYear(wwDBDateTimePicker1.date);
|
|
data1.DataSet['录入人']:=employee;
|
|
data1.DataSet['录入日期']:=date;
|
|
data1.DataSet['分部名称']:=subComp;
|
|
data1.DataSet['操作员']:=employee;
|
|
data1.DataSet['报关操作']:=employee;
|
|
data1.DataSet['报检操作']:=employee;
|
|
// data1.DataSet['揽货人']:=employee;
|
|
data1.DataSet['客服员']:=employee;
|
|
data1.DataSet['销售部门']:=department;
|
|
data1.DataSet['操作部门']:=department;
|
|
|
|
|
|
data1.DataSet['起运港']:=get_parameters_value(14,'QINGDAO,CHINA');
|
|
data1.DataSet['装货港']:=get_parameters_value(16,'QINGDAO,CHINA');
|
|
data1.DataSet['提单份数']:=get_parameters_value(20,'THREE');
|
|
// data1.DataSet['副本提单份数']:=get_parameters_value(20,'THREE');
|
|
if copy(data1.DataSet.fieldbyname('装运方式').asstring,1,4)='拼箱'then
|
|
data1.DataSet['运输条款']:=get_parameters_value(48,'CFS-CFS')
|
|
else
|
|
data1.DataSet['运输条款']:=get_parameters_value(21,'CY-CY');
|
|
data1.DataSet['唛头']:=get_parameters_value(22,'N/M');
|
|
data1.DataSet['货物描述']:=get_parameters_value(116,'');
|
|
data1.DataSet['发货人代码']:=get_parameters_value(124,'');
|
|
data1.DataSet['付费方式']:=get_parameters_value(23,'FREIGHT PREPAID');
|
|
data1.DataSet['签单地点']:=get_parameters_value(49,'QINGDAO,CHINA');
|
|
data1.DataSet['预付地点']:=get_parameters_value(50,'QINGDAO,CHINA');
|
|
data1.DataSet['退税日期']:=null;
|
|
data1.DataSet['签单日期']:=null;
|
|
data1.DataSet['派车日期']:=null;
|
|
data1.DataSet['寄单日期']:=null;
|
|
data1.DataSet['是否寄单']:=0;
|
|
data1.DataSet['是否退税']:=0;
|
|
data1.DataSet['是否通关']:=0;
|
|
data1.DataSet['是否签单']:=0;
|
|
data1.DataSet['请求派车']:=0;
|
|
data1.DataSet['是否派车']:=0;
|
|
data1.DataSet['是否解锁']:=0;
|
|
data1.DataSet['是否退舱']:=0;
|
|
data1.DataSet['解锁日期']:=null;
|
|
data1.DataSet['解锁人']:='';
|
|
data1.DataSet['应收陆运']:=0;
|
|
data1.DataSet['应付陆运']:=0;
|
|
data1.DataSet['陆运利润']:=0;
|
|
data1.DataSet['财务']:=0;
|
|
data1.DataSet['财务凭证']:='';
|
|
data1.DataSet['是否打印']:=0;
|
|
data1.DataSet['销售订舱']:=0;
|
|
data1.DataSet['编号']:=bsno;
|
|
data1.DataSet['业务来源']:='';
|
|
data1.DataSet['来源明细']:='';
|
|
|
|
data1.DataSet['应收海运费']:=0;
|
|
data1.DataSet['应付海运费']:=0;
|
|
data1.DataSet['船公司代理费']:=0;
|
|
data1.DataSet['捷丰代理费']:=0;
|
|
data1.DataSet['香港付费']:=0;
|
|
end;
|
|
|
|
EdiString:=TStringList.Create;
|
|
try
|
|
OpenDialog1.Execute;
|
|
FileNames:=OpenDialog1.FileName;
|
|
if FileNames<>'' then begin
|
|
EdiString.LoadFromFile(FileNames);
|
|
NewEdiSEAE(EdiString,data1);
|
|
end;
|
|
finally
|
|
FreeAndNil(EdiString);
|
|
end;
|
|
|
|
if frm_op_seae_add_num=1 then
|
|
begin
|
|
frm_op_seae.Notebook1.PageIndex:=1;
|
|
frm_op_seae.bsSkinButton11.Caption:='返回列表';
|
|
end;
|
|
if frm_op_seae_add_num=2 then
|
|
begin
|
|
frm_op_seae.Notebook1.PageIndex:=1;
|
|
frm_op_seae.bsSkinButton11.Caption:='返回主票';
|
|
end;
|
|
if frm_op_seae_add_num=3 then
|
|
begin
|
|
frm_op_seae.Notebook1.PageIndex:=1;
|
|
frm_op_seae.bsSkinButton11.Caption:='返回主票';
|
|
frm_op_seae.t_op_seae2.Enabled:=false;
|
|
frm_op_seae.t_op_seae2.DataSet:=frm_op_seae.t_op_seae_fen;
|
|
frm_op_seae.t_op_seae2.Enabled:=true;
|
|
end;
|
|
close;
|
|
end;
|
|
}
|
|
end.
|