unit u_op_module; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid, bsSkinCtrls, DB, ADODB, ExtCtrls, DBCtrls, dxDBTLCl, dxGrClms, StdCtrls, RxLookup, wwdblook, bsdbctrls, Mask, wwdbedit, Wwdotdot, Wwdbcomb; type Tfrm_op_module = class(TForm) dxDBGrid1: TdxDBGrid; bsSkinPanel1: TbsSkinPanel; bsSkinButton8: TbsSkinButton; bsSkinButton2: TbsSkinButton; bsSkinButton4: TbsSkinButton; bsSkinButton3: TbsSkinButton; t_op_module: TADOQuery; ds_op_module1: TDataSource; dxDBGrid1Column1: TdxDBGridColumn; dxDBGrid1Column2: TdxDBGridColumn; dxDBGrid1Column3: TdxDBGridColumn; Label23: TLabel; DBMemo3: TDBMemo; DBMemo4: TDBMemo; Label24: TLabel; Label29: TLabel; DBMemo5: TDBMemo; Label163: TLabel; DBMemo38: TDBMemo; Label164: TLabel; DBMemo39: TDBMemo; Label165: TLabel; DBMemo40: TDBMemo; Label166: TLabel; DBMemo41: TDBMemo; Label167: TLabel; DBMemo42: TDBMemo; Label1: TLabel; Label2: TLabel; Label3: TLabel; Label12: TLabel; Label9: TLabel; RxDBLookupCombo9: TRxDBLookupCombo; RxDBLookupCombo6: TRxDBLookupCombo; wwDBLookupCombo3: TwwDBLookupCombo; Label7: TLabel; Label124: TLabel; wwDBLookupCombo52: TwwDBLookupCombo; t_op_moduleDSDesigner: TAutoIncField; t_op_moduleDSDesigner2: TStringField; t_op_moduleDSDesigner3: TStringField; t_op_moduleDSDesigner4: TDateTimeField; t_op_moduleDSDesigner5: TStringField; t_op_moduleDSDesigner6: TStringField; t_op_moduleDSDesigner7: TStringField; t_op_moduleDSDesigner8: TStringField; t_op_moduleDSDesigner9: TStringField; t_op_moduleDSDesigner10: TStringField; t_op_moduleDSDesigner11: TStringField; t_op_moduleDSDesigner12: TStringField; t_op_moduleDSDesigner13: TStringField; t_op_moduleDSDesigner14: TStringField; t_op_moduleDSDesigner15: TStringField; t_op_moduleDSDesigner16: TStringField; t_op_moduleDSDesigner17: TStringField; t_op_moduleDSDesigner18: TStringField; t_op_moduleDSDesigner19: TStringField; t_op_moduleDSDesigner20: TStringField; t_op_moduleDSDesigner21: TStringField; t_op_moduleDSDesigner22: TStringField; t_op_moduleDSDesigner23: TStringField; t_op_moduleDSDesigner24: TStringField; t_op_moduleDSDesigner25: TStringField; t_op_moduleDSDesigner26: TStringField; t_op_moduleDSDesigner27: TStringField; t_op_moduleDSDesigner28: TStringField; t_op_moduleDSDesigner29: TStringField; t_op_moduleDSDesigner30: TStringField; t_op_moduleDSDesigner31: TStringField; t_op_moduleDSDesigner32: TStringField; t_op_moduleDSDesigner33: TStringField; t_op_moduleDSDesigner34: TStringField; t_op_moduleDSDesigner35: TStringField; t_op_moduleDSDesigner36: TStringField; t_op_moduleDSDesigner37: TIntegerField; t_op_moduleDSDesigner38: TStringField; t_op_moduleDSDesigner39: TBCDField; t_op_moduleDSDesigner40: TBCDField; t_op_moduleDSDesigner41: TStringField; t_op_moduleDSDesigner42: TStringField; t_op_moduleDSDesigner43: TStringField; t_op_moduleDSDesigner44: TStringField; t_op_moduleDSDesigner45: TStringField; t_op_moduleDSDesigner46: TStringField; t_op_moduleDSDesigner47: TStringField; t_op_moduleDSDesigner48: TBooleanField; t_op_moduleDSDesigner49: TBooleanField; t_op_moduleDSDesigner50: TBooleanField; t_op_moduleDSDesigner51: TBooleanField; t_op_moduleDSDesigner52: TBooleanField; t_op_moduleDSDesigner53: TStringField; Label30: TLabel; Label41: TLabel; RxDBLookupCombo31: TRxDBLookupCombo; Label111: TLabel; wwDBComboBox16: TwwDBComboBox; bsSkinDBCheckRadioBox19: TbsSkinDBCheckRadioBox; Label35: TLabel; RxDBLookupCombo28: TRxDBLookupCombo; RxDBLookupCombo15: TRxDBLookupCombo; strngfld_op_moduleDSDesigner54: TStringField; strngfld_op_moduleDSDesigner55: TStringField; blnfld_op_moduleDSDesigner56: TBooleanField; Label4: TLabel; DBMemo1: TDBMemo; Label5: TLabel; DBEdit1: TDBEdit; Label6: TLabel; DBMemo2: TDBMemo; t_op_moduleDSDesigner54: TStringField; procedure FormShow(Sender: TObject); procedure t_op_moduleAfterInsert(DataSet: TDataSet); procedure bsSkinButton4Click(Sender: TObject); procedure bsSkinButton2Click(Sender: TObject); procedure t_op_moduleBeforePost(DataSet: TDataSet); procedure bsSkinButton3Click(Sender: TObject); procedure bsSkinButton8Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var frm_op_module: Tfrm_op_module; implementation uses u_main, u_data_share, my_sys_function, dmAccu,u_op_seae; {$R *.dfm} procedure Tfrm_op_module.FormShow(Sender: TObject); begin t_op_module.Open; end; procedure Tfrm_op_module.t_op_moduleAfterInsert(DataSet: TDataSet); begin t_op_module['录入人']:=employee; t_op_module['录入日期']:=date; end; procedure Tfrm_op_module.bsSkinButton4Click(Sender: TObject); begin t_op_module.Delete; end; procedure Tfrm_op_module.bsSkinButton2Click(Sender: TObject); begin if t_op_module.State in [dsEdit,dsinsert] then t_op_module.Post; end; procedure Tfrm_op_module.t_op_moduleBeforePost(DataSet: TDataSet); begin table_before_post(t_op_module,'方案名称'); end; procedure Tfrm_op_module.bsSkinButton3Click(Sender: TObject); begin if t_op_module.State in [dsEdit,dsinsert] then t_op_module.Cancel; end; procedure Tfrm_op_module.bsSkinButton8Click(Sender: TObject); begin with frm_op_seae.t_op_seae2 do begin DataSet.Edit; DataSet['委托单位']:=t_op_module.FieldByName('委托单位').AsString; DataSet['发货人']:=t_op_module.FieldByName('发货人').AsString; DataSet['收货人']:=t_op_module.FieldByName('收货人').AsString; DataSet['通知人']:=t_op_module.FieldByName('通知人').AsString; DataSet['发货人代码']:=t_op_module.FieldByName('发货人代码').AsString; DataSet['收货人代码']:=t_op_module.FieldByName('收货人代码').AsString; DataSet['通知人代码']:=t_op_module.FieldByName('通知人代码').AsString; DataSet['场站']:=t_op_module.FieldByName('场站').AsString; DataSet['船名']:=t_op_module.FieldByName('船名').AsString; DataSet['起运港']:=t_op_module.FieldByName('起运港').AsString; DataSet['装货港']:=t_op_module.FieldByName('装货港').AsString; DataSet['装港代码']:=t_op_module.FieldByName('装港代码').AsString; DataSet['卸货港']:=t_op_module.FieldByName('卸货港').AsString; DataSet['卸货代码']:=t_op_module.FieldByName('卸货代码').AsString; DataSet['目的地']:=t_op_module.FieldByName('目的地').AsString; DataSet['交货地点']:=t_op_module.FieldByName('交货地点').AsString; DataSet['交货代码']:=t_op_module.FieldByName('交货代码').AsString; DataSet['提单份数']:=t_op_module.FieldByName('提单份数').AsString; DataSet['签单方式']:=t_op_module.FieldByName('签单方式').AsString; DataSet['签单地点']:=t_op_module.FieldByName('签单地点').AsString; DataSet['预付地点']:=t_op_module.FieldByName('预付地点').AsString; DataSet['到付地点']:=t_op_module.FieldByName('到付地点').AsString; DataSet['运输条款']:=t_op_module.FieldByName('运输条款').AsString; DataSet['唛头']:=t_op_module.FieldByName('唛头').AsString; DataSet['件数包装']:=t_op_module.FieldByName('件数包装').AsString; DataSet['货物描述']:=t_op_module.FieldByName('货物描述').AsString; DataSet['货物名称']:=t_op_module.FieldByName('货物名称').AsString; DataSet['货物重量']:=t_op_module.FieldByName('货物重量').AsString; DataSet['货物尺码']:=t_op_module.FieldByName('货物尺码').AsString; { DataSet['件数']:=t_op_module.FieldByName('件数').AsInteger; DataSet['重量']:=t_op_module.FieldByName('重量').AsFloat; DataSet['尺码']:=t_op_module.FieldByName('尺码').AsFloat; } DataSet['件数大写']:=t_op_module.FieldByName('件数大写').AsString; DataSet['航线']:=t_op_module.FieldByName('航线').AsString; DataSet['船公司']:=t_op_module.FieldByName('船公司').AsString; DataSet['货代公司']:=t_op_module.FieldByName('货代公司').AsString; DataSet['备注']:=t_op_module.FieldByName('备注').AsString; DataSet['报关行']:=t_op_module.FieldByName('报关行').AsString; DataSet['承运车队']:=t_op_module.FieldByName('承运车队').AsString; DataSet['报关服务']:=t_op_module.FieldByName('报关服务').Value; DataSet['报验服务']:=t_op_module.FieldByName('报验服务').Value; DataSet['熏蒸服务']:=t_op_module.FieldByName('熏蒸服务').Value; DataSet['拖车服务']:=t_op_module.FieldByName('拖车服务').Value; DataSet['结费类型']:=t_op_module.FieldByName('结费类型').Value; DataSet['付费方式']:=t_op_module.FieldByName('付费方式').Value; DataSet['业务来源']:=t_op_module.FieldByName('业务来源').Value; DataSet['场站联系人']:=t_op_module.FieldByName('场站联系人').Value; DataSet['签单方式']:=t_op_module.FieldByName('签单方式').Value; DataSet['运费']:=t_op_module.FieldByName('运费').Value; DataSet['第二通知人']:=t_op_module.FieldByName('第二通知人').Value; DataSet.Post; end; Close; end; end.