unit u_op_airtruck2; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, bsSkinCtrls, ExtCtrls, Menus, DB, ADODB, RxLookup, StdCtrls, Mask, DBCtrls, ComCtrls, bsSkinTabs, u_fee, wwdbdatetimepicker, wwdbedit, Wwdotdot, Wwdbcomb, wwdblook, bsdbctrls, Grids, DBGridEh, Wwdbigrd, Wwdbgrid, IniFiles, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls, cxGridCustomView, cxGrid, DBGrids, cxMaskEdit, cxCalendar, cxCheckBox, cxDBLookupComboBox, cxDropDownEdit, cxCalc, dxExEdtr, dxDBTLCl, dxTL, dxDBCtrl, dxCntner, dxDBTL, u_op_sate, DBCtrlsEh, bsSkinBoxCtrls, RXDBCtrl, wwcheckbox, ToolEdit; type Tfrm_op_airtruck2 = class(TForm) Panel2: TPanel; bsSkinButton7: TbsSkinButton; bsSkinButton6: TbsSkinButton; bsSkinButton9: TbsSkinButton; bsSkinButton10: TbsSkinButton; bsSkinButton1: TbsSkinButton; bsSkinButton11: TbsSkinButton; bsSkinButton8: TbsSkinButton; bsSkinButton2: TbsSkinButton; bsSkinButton4: TbsSkinButton; bsSkinButtonmtz: TbsSkinButton; bsSkinButton5: TbsSkinButton; Notebook1: TNotebook; t_op_airtruck: TADOQuery; t_op_airtruck1: TDataSource; PopupMenu1: TPopupMenu; N31: TMenuItem; t_ch_fee: TADOQuery; bsSkinPageControl1: TbsSkinPageControl; bsSkinTabSheet1: TbsSkinTabSheet; bsSkinButton13: TbsSkinButton; PopupMenu3: TPopupMenu; N37: TMenuItem; N38: TMenuItem; N17: TMenuItem; N18: TMenuItem; N34: TMenuItem; N35: TMenuItem; N36: TMenuItem; N8: TMenuItem; N9: TMenuItem; N19: TMenuItem; N20: TMenuItem; N21: TMenuItem; N22: TMenuItem; N23: TMenuItem; N24: TMenuItem; N25: TMenuItem; N26: TMenuItem; t_op_airtruckdetailprn1: TDataSource; bsSkinPanel4: TbsSkinPanel; Label116: TLabel; Label130: TLabel; Label131: TLabel; Edit1: TEdit; Edit4: TEdit; Edit2: TEdit; bsSkinButton44: TbsSkinButton; bsSkinGroupBox2: TbsSkinGroupBox; Label1: TLabel; Label2: TLabel; Label3: TLabel; Label37: TLabel; Label5: TLabel; Label38: TLabel; Label4: TLabel; Label36: TLabel; Label65: TLabel; Label41: TLabel; DBEdit1: TDBEdit; DBEdit2: TDBEdit; DBEdit3: TDBEdit; DBEdit8: TDBEdit; DBEdit4: TDBEdit; RxDBLookupCombo1: TRxDBLookupCombo; DBEdit7: TDBEdit; DBEdit18: TDBEdit; Label96: TLabel; Label97: TLabel; Label25: TLabel; Label23: TLabel; Label19: TLabel; Label16: TLabel; DBEdit30: TDBEdit; DBEdit31: TDBEdit; wwDBDateTimePicker2: TwwDBDateTimePicker; RxDBLookupCombo8: TRxDBLookupCombo; RxDBLookupCombo12: TRxDBLookupCombo; DBEdit14: TDBEdit; Label31: TLabel; DBEdit16: TDBEdit; DBEdit17: TDBEdit; Label29: TLabel; Label32: TLabel; t_crm_client_linkman: TADOQuery; Label6: TLabel; DBEdit5: TDBEdit; bsSkinPageControl3: TbsSkinPageControl; pagesheetfp: TbsSkinTabSheet; Panel1: TPanel; bsSkinButton17: TbsSkinButton; bsSkinButton19: TbsSkinButton; bsSkinButton20: TbsSkinButton; DBComboBox1: TDBComboBox; RxDBLookupCombo2: TRxDBLookupCombo; t_op_airtruckdetail: TADOQuery; t_op_airtruckdetail1: TDataSource; bsSkinButton3: TbsSkinButton; t_op_airtruckdetailDSDesigner: TStringField; t_op_airtruckdetailDSDesigner2: TStringField; t_op_airtruckdetailLOT: TStringField; t_op_airtruckdetailDSDesigner3: TStringField; t_op_airtruckdetailDSDesigner4: TStringField; t_op_airtruckdetailDSDesigner5: TStringField; t_op_airtruckdetailDSDesigner6: TStringField; t_op_airtruckdetailDSDesigner7: TStringField; t_op_airtruckdetailDSDesigner8: TDateTimeField; t_op_airtruckdetailDSDesigner9: TIntegerField; t_op_airtruckdetailDSDesigner10: TStringField; t_op_airtruckdetailDSDesigner11: TStringField; t_op_airtruckdetailDSDesigner12: TStringField; t_op_airtruckdetailDSDesigner13: TStringField; t_op_airtruckdetailDSDesigner14: TStringField; t_op_airtruckdetailDSDesigner15: TStringField; t_op_airtruckdetailDSDesigner16: TStringField; t_op_airtruckdetailDSDesigner17: TStringField; t_op_airtruckdetailDSDesigner23: TDateTimeField; t_op_airtruckdetailDSDesigner24: TDateTimeField; t_op_airtruckdetailDSDesigner25: TStringField; t_op_airtruckdetailDSDesigner27: TStringField; t_op_airtruckdetailDSDesigner30: TStringField; t_op_airtruckdetailDSDesigner31: TIntegerField; t_op_airtruckdetailDSDesigner32: TBCDField; t_op_airtruckdetailDSDesigner33: TBCDField; t_op_airtruckdetailDSDesigner34: TStringField; t_op_airtruckdetailDSDesigner35: TStringField; t_op_airtruckdetailDSDesigner36: TDateTimeField; t_op_airtruckdetailDSDesigner37: TStringField; t_op_airtruckdetailDSDesigner38: TStringField; t_op_airtruckdetailDSDesigner39: TStringField; t_op_airtruckdetailDSDesigner40: TStringField; t_op_airtruckdetailDSDesigner41: TStringField; t_op_airtruckdetailDSDesigner42: TStringField; t_op_airtruckdetailDSDesigner43: TBooleanField; t_op_airtruckdetailDSDesigner44: TDateTimeField; t_op_airtruckdetailDSDesigner45: TStringField; t_op_airtruckdetailDSDesigner46: TStringField; t_op_airtruckdetailDSDesigner47: TStringField; t_op_airtruckdetailDSDesigner48: TStringField; t_op_airtruckdetailDSDesigner49: TIntegerField; t_op_airtruckdetailDSDesigner50: TStringField; t_op_airtruckdetailDSDesigner57: TStringField; t_op_airtruckdetailDSDesigner58: TStringField; t_op_airtruckdetailDSDesigner59: TStringField; t_op_airtruckdetailDSDesigner60: TBooleanField; t_op_airtruckdetailDSDesigner61: TStringField; t_op_airtruckdetailDSDesigner62: TStringField; t_op_airtruckdetailDSDesigner63: TStringField; t_op_airtruckdetailDSDesigner72: TStringField; t_op_airtruckdetailDSDesigner79: TDateTimeField; t_op_airtruckdetailDSDesigner80: TBooleanField; t_op_airtruckdetailDSDesigner81: TStringField; t_op_airtruckdetailDSDesigner82: TStringField; t_op_airtruckdetailDSDesigner86: TStringField; t_op_airtruckdetailDSDesigner87: TStringField; t_op_airtruckdetailDSDesigner88: TDateTimeField; t_op_airtruckdetailDSDesigner89: TStringField; t_op_airtruckdetailDSDesigner90: TBooleanField; t_op_airtruckdetailDSDesigner91: TBooleanField; t_op_airtruckdetailDSDesigner92: TStringField; t_op_airtruckdetailDSDesigner93: TStringField; t_op_airtruckdetailDSDesigner94: TIntegerField; t_op_airtruckdetailDSDesigner95: TStringField; t_op_airtruckdetailDSDesigner96: TStringField; t_op_airtruckdetailDSDesigner97: TBCDField; t_op_airtruckdetailDSDesigner98: TBCDField; t_op_airtruckdetailDSDesigner99: TBCDField; t_op_airtruckdetailDSDesigner100: TBCDField; t_op_airtruckdetailDSDesigner101: TBCDField; t_op_airtruckdetailDSDesigner102: TStringField; t_op_airtruckdetailDSDesigner103: TIntegerField; t_op_airtruckdetailDSDesigner104: TStringField; bsSkinButton15: TbsSkinButton; t_op_airtruckdetailDSDesigner18: TBooleanField; bsSkinButtonsuo: TbsSkinButton; dxDBTreeList1: TdxDBTreeList; dxDBTreeList1Column1: TdxDBTreeListMaskColumn; dxDBTreeList1Column2: TdxDBTreeListMaskColumn; dxDBTreeList1LOT: TdxDBTreeListMaskColumn; dxDBTreeList1Column4: TdxDBTreeListMaskColumn; dxDBTreeList1Column5: TdxDBTreeListMaskColumn; dxDBTreeList1Column6: TdxDBTreeListMaskColumn; dxDBTreeList1Column7: TdxDBTreeListMaskColumn; dxDBTreeList1Column8: TdxDBTreeListMaskColumn; dxDBTreeList1Column9: TdxDBTreeListDateColumn; dxDBTreeList1Column10: TdxDBTreeListMaskColumn; dxDBTreeList1Column11: TdxDBTreeListMaskColumn; dxDBTreeList1Column12: TdxDBTreeListMaskColumn; dxDBTreeList1Column13: TdxDBTreeListMaskColumn; dxDBTreeList1Column14: TdxDBTreeListMaskColumn; dxDBTreeList1Column15: TdxDBTreeListMaskColumn; dxDBTreeList1Column16: TdxDBTreeListMaskColumn; dxDBTreeList1Column17: TdxDBTreeListMaskColumn; dxDBTreeList1Column18: TdxDBTreeListMaskColumn; dxDBTreeList1Column19: TdxDBTreeListMaskColumn; dxDBTreeList1Column20: TdxDBTreeListMaskColumn; dxDBTreeList1Column21: TdxDBTreeListMaskColumn; dxDBTreeList1Column22: TdxDBTreeListMaskColumn; dxDBTreeList1Column23: TdxDBTreeListMaskColumn; dxDBTreeList1Column24: TdxDBTreeListDateColumn; dxDBTreeList1Column25: TdxDBTreeListDateColumn; dxDBTreeList1Column26: TdxDBTreeListMaskColumn; dxDBTreeList1Column27: TdxDBTreeListMaskColumn; dxDBTreeList1Column28: TdxDBTreeListMaskColumn; dxDBTreeList1Column29: TdxDBTreeListMaskColumn; dxDBTreeList1Column30: TdxDBTreeListMaskColumn; dxDBTreeList1Column31: TdxDBTreeListMaskColumn; dxDBTreeList1Column32: TdxDBTreeListMaskColumn; dxDBTreeList1Column33: TdxDBTreeListCurrencyColumn; dxDBTreeList1Column34: TdxDBTreeListCurrencyColumn; dxDBTreeList1Column35: TdxDBTreeListMaskColumn; dxDBTreeList1Column36: TdxDBTreeListMaskColumn; dxDBTreeList1Column37: TdxDBTreeListDateColumn; dxDBTreeList1Column38: TdxDBTreeListMaskColumn; dxDBTreeList1Column39: TdxDBTreeListMaskColumn; dxDBTreeList1Column40: TdxDBTreeListMaskColumn; dxDBTreeList1Column41: TdxDBTreeListMaskColumn; dxDBTreeList1BGS: TdxDBTreeListMaskColumn; dxDBTreeList1SA: TdxDBTreeListMaskColumn; dxDBTreeList1Column44: TdxDBTreeListMaskColumn; dxDBTreeList1Column45: TdxDBTreeListMaskColumn; dxDBTreeList1Column46: TdxDBTreeListMaskColumn; dxDBTreeList1Column47: TdxDBTreeListMaskColumn; dxDBTreeList1Column48: TdxDBTreeListMaskColumn; dxDBTreeList1Column49: TdxDBTreeListMaskColumn; dxDBTreeList1Column50: TdxDBTreeListMaskColumn; dxDBTreeList1Column51: TdxDBTreeListMaskColumn; dxDBTreeList1Column52: TdxDBTreeListMaskColumn; dxDBTreeList1Column53: TdxDBTreeListMaskColumn; dxDBTreeList1Column54: TdxDBTreeListCheckColumn; dxDBTreeList1Column55: TdxDBTreeListDateColumn; dxDBTreeList1Column56: TdxDBTreeListMaskColumn; dxDBTreeList1Column57: TdxDBTreeListMaskColumn; dxDBTreeList1Column58: TdxDBTreeListMaskColumn; dxDBTreeList1Column59: TdxDBTreeListMaskColumn; dxDBTreeList1Column60: TdxDBTreeListMaskColumn; dxDBTreeList1Column61: TdxDBTreeListMaskColumn; dxDBTreeList1Column62: TdxDBTreeListCheckColumn; dxDBTreeList1Column63: TdxDBTreeListCheckColumn; dxDBTreeList1Column64: TdxDBTreeListDateColumn; dxDBTreeList1Column65: TdxDBTreeListCheckColumn; dxDBTreeList1Column66: TdxDBTreeListMaskColumn; dxDBTreeList1Column67: TdxDBTreeListDateColumn; dxDBTreeList1Column68: TdxDBTreeListMaskColumn; dxDBTreeList1Column69: TdxDBTreeListMaskColumn; dxDBTreeList1Column70: TdxDBTreeListMaskColumn; dxDBTreeList1Column71: TdxDBTreeListCheckColumn; dxDBTreeList1Column72: TdxDBTreeListMaskColumn; dxDBTreeList1Column73: TdxDBTreeListMaskColumn; dxDBTreeList1Column74: TdxDBTreeListMaskColumn; dxDBTreeList1upload: TdxDBTreeListMaskColumn; dxDBTreeList1HY: TdxDBTreeListMaskColumn; dxDBTreeList1Column77: TdxDBTreeListMaskColumn; dxDBTreeList1Column78: TdxDBTreeListMaskColumn; dxDBTreeList1Column79: TdxDBTreeListMaskColumn; dxDBTreeList1Column80: TdxDBTreeListMaskColumn; dxDBTreeList1Column81: TdxDBTreeListMaskColumn; dxDBTreeList1Column82: TdxDBTreeListMaskColumn; dxDBTreeList1Column83: TdxDBTreeListMaskColumn; dxDBTreeList1Column84: TdxDBTreeListMaskColumn; dxDBTreeList1Column85: TdxDBTreeListDateColumn; dxDBTreeList1Column86: TdxDBTreeListDateColumn; dxDBTreeList1Column87: TdxDBTreeListMaskColumn; dxDBTreeList1Column88: TdxDBTreeListMaskColumn; dxDBTreeList1Column89: TdxDBTreeListMaskColumn; dxDBTreeList1Column90: TdxDBTreeListMaskColumn; dxDBTreeList1Column91: TdxDBTreeListMaskColumn; dxDBTreeList1Column92: TdxDBTreeListMaskColumn; dxDBTreeList1Column93: TdxDBTreeListMaskColumn; dxDBTreeList1Column94: TdxDBTreeListMaskColumn; dxDBTreeList1Column95: TdxDBTreeListDateColumn; dxDBTreeList1Column96: TdxDBTreeListDateColumn; dxDBTreeList1Column97: TdxDBTreeListCheckColumn; dxDBTreeList1Column98: TdxDBTreeListMaskColumn; dxDBTreeList1Column99: TdxDBTreeListMaskColumn; dxDBTreeList1Column100: TdxDBTreeListMaskColumn; dxDBTreeList1Column101: TdxDBTreeListMaskColumn; dxDBTreeList1Column102: TdxDBTreeListMaskColumn; dxDBTreeList1Column103: TdxDBTreeListMaskColumn; dxDBTreeList1Column104: TdxDBTreeListMaskColumn; dxDBTreeList1Column105: TdxDBTreeListDateColumn; dxDBTreeList1Column106: TdxDBTreeListMaskColumn; dxDBTreeList1Column107: TdxDBTreeListCheckColumn; dxDBTreeList1Column108: TdxDBTreeListCheckColumn; dxDBTreeList1Column109: TdxDBTreeListMaskColumn; dxDBTreeList1Column110: TdxDBTreeListMaskColumn; dxDBTreeList1Column111: TdxDBTreeListMaskColumn; dxDBTreeList1Column112: TdxDBTreeListMaskColumn; dxDBTreeList1Column113: TdxDBTreeListMaskColumn; dxDBTreeList1Column114: TdxDBTreeListCurrencyColumn; dxDBTreeList1Column115: TdxDBTreeListCurrencyColumn; dxDBTreeList1Column116: TdxDBTreeListCurrencyColumn; dxDBTreeList1Column117: TdxDBTreeListCurrencyColumn; dxDBTreeList1Column118: TdxDBTreeListCurrencyColumn; dxDBTreeList1Column119: TdxDBTreeListMaskColumn; dxDBTreeList1Column120: TdxDBTreeListMaskColumn; dxDBTreeList1Column121: TdxDBTreeListMaskColumn; bsSkinTabSheet2: TbsSkinTabSheet; fra_op_state1: Tfra_op_state; bsSkinTabSheet3: TbsSkinTabSheet; fra_fee2: Tfra_fee; DBEdit9: TDBEditEh; bsSkinTabSheet4: TbsSkinTabSheet; fra_fee1: Tfra_fee; Splitter1: TSplitter; Panel3: TPanel; GroupBox1: TGroupBox; GroupBox2: TGroupBox; GroupBox3: TGroupBox; Label7: TLabel; Label8: TLabel; RxDBLookupCombo3: TRxDBLookupCombo; Label9: TLabel; DBEdit6: TDBEdit; Label10: TLabel; DBEdit10: TDBEdit; Label11: TLabel; DBEdit11: TDBEdit; Label12: TLabel; DBEdit12: TDBEdit; Label13: TLabel; Label14: TLabel; Label15: TLabel; DBEdit13: TDBEdit; DBEdit15: TDBEdit; Label17: TLabel; Label18: TLabel; Label20: TLabel; Label21: TLabel; Label22: TLabel; Label24: TLabel; Label26: TLabel; Label27: TLabel; RxDBLookupCombo10: TRxDBLookupCombo; RxDBLookupCombo14: TRxDBLookupCombo; DBEdit21: TDBEdit; DBEdit22: TDBEdit; DBDateEdit1: TDBDateEdit; RxDBLookupCombo9: TRxDBLookupCombo; Label28: TLabel; Label30: TLabel; qryjcz: TADOQuery; dsrjcz: TDataSource; qryjczfid: TAutoIncField; qryjczDSDesigner: TStringField; qryjczDSDesigner2: TBCDField; qryjczDSDesigner3: TBCDField; qryjczDSDesigner4: TBCDField; qryjczDSDesigner5: TIntegerField; Panel4: TPanel; bsSkinButton12: TbsSkinButton; btndelete: TbsSkinButton; btnpost: TbsSkinButton; btncancel: TbsSkinButton; qryjczsum: TADOQuery; Panelfenpiao: TPanel; bsSkinButtontt: TbsSkinButton; bsSkinButtonprint: TbsSkinButton; bsSkinButton16: TbsSkinButton; bsSkinButton18: TbsSkinButton; cxGrid1DBTableView1: TcxGridDBTableView; cxGrid1Level1: TcxGridLevel; cxGrid1: TcxGrid; cxGrid2DBTableView1: TcxGridDBTableView; cxGrid2Level1: TcxGridLevel; cxGrid2: TcxGrid; cxGrid2DBTableView1fid: TcxGridDBColumn; cxGrid2DBTableView1DBColumn: TcxGridDBColumn; cxGrid2DBTableView1DBColumn1: TcxGridDBColumn; cxGrid2DBTableView1DBColumn2: TcxGridDBColumn; cxGrid2DBTableView1DBColumn3: TcxGridDBColumn; cxGrid2DBTableView1DBColumn4: TcxGridDBColumn; cxGrid1DBTableView1DBColumn: TcxGridDBColumn; cxGrid1DBTableView1DBColumn1: TcxGridDBColumn; cxGrid1DBTableView1LOT: TcxGridDBColumn; cxGrid1DBTableView1DBColumn2: TcxGridDBColumn; cxGrid1DBTableView1DBColumn3: TcxGridDBColumn; cxGrid1DBTableView1DBColumn4: TcxGridDBColumn; cxGrid1DBTableView1DBColumn5: TcxGridDBColumn; cxGrid1DBTableView1DBColumn6: TcxGridDBColumn; cxGrid1DBTableView1DBColumn7: TcxGridDBColumn; cxGrid1DBTableView1DBColumn8: TcxGridDBColumn; cxGrid1DBTableView1DBColumn9: TcxGridDBColumn; cxGrid1DBTableView1DBColumn10: TcxGridDBColumn; cxGrid1DBTableView1DBColumn11: TcxGridDBColumn; cxGrid1DBTableView1DBColumn12: TcxGridDBColumn; cxGrid1DBTableView1DBColumn13: TcxGridDBColumn; cxGrid1DBTableView1DBColumn14: TcxGridDBColumn; cxGrid1DBTableView1DBColumn15: TcxGridDBColumn; cxGrid1DBTableView1DBColumn16: TcxGridDBColumn; cxGrid1DBTableView1DBColumn17: TcxGridDBColumn; cxGrid1DBTableView1DBColumn18: TcxGridDBColumn; cxGrid1DBTableView1DBColumn19: TcxGridDBColumn; cxGrid1DBTableView1DBColumn20: TcxGridDBColumn; cxGrid1DBTableView1DBColumn21: TcxGridDBColumn; cxGrid1DBTableView1DBColumn22: TcxGridDBColumn; cxGrid1DBTableView1DBColumn23: TcxGridDBColumn; cxGrid1DBTableView1DBColumn24: TcxGridDBColumn; cxGrid1DBTableView1DBColumn25: TcxGridDBColumn; cxGrid1DBTableView1DBColumn26: TcxGridDBColumn; cxGrid1DBTableView1DBColumn27: TcxGridDBColumn; cxGrid1DBTableView1DBColumn28: TcxGridDBColumn; cxGrid1DBTableView1DBColumn29: TcxGridDBColumn; cxGrid1DBTableView1DBColumn30: TcxGridDBColumn; cxGrid1DBTableView1DBColumn31: TcxGridDBColumn; cxGrid1DBTableView1DBColumn32: TcxGridDBColumn; cxGrid1DBTableView1DBColumn33: TcxGridDBColumn; cxGrid1DBTableView1DBColumn34: TcxGridDBColumn; cxGrid1DBTableView1DBColumn35: TcxGridDBColumn; cxGrid1DBTableView1DBColumn36: TcxGridDBColumn; cxGrid1DBTableView1DBColumn37: TcxGridDBColumn; cxGrid1DBTableView1DBColumn38: TcxGridDBColumn; cxGrid1DBTableView1DBColumn39: TcxGridDBColumn; cxGrid1DBTableView1DBColumn40: TcxGridDBColumn; cxGrid1DBTableView1DBColumn41: TcxGridDBColumn; cxGrid1DBTableView1DBColumn42: TcxGridDBColumn; cxGrid1DBTableView1DBColumn43: TcxGridDBColumn; cxGrid1DBTableView1DBColumn44: TcxGridDBColumn; cxGrid1DBTableView1DBColumn45: TcxGridDBColumn; cxGrid1DBTableView1DBColumn46: TcxGridDBColumn; cxGrid1DBTableView1DBColumn47: TcxGridDBColumn; cxGrid1DBTableView1DBColumn48: TcxGridDBColumn; cxGrid1DBTableView1DBColumn49: TcxGridDBColumn; cxGrid1DBTableView1DBColumn50: TcxGridDBColumn; cxGrid1DBTableView1DBColumn51: TcxGridDBColumn; cxGrid1DBTableView1DBColumn52: TcxGridDBColumn; cxGrid1DBTableView1DBColumn53: TcxGridDBColumn; cxGrid1DBTableView1DBColumn54: TcxGridDBColumn; cxGrid1DBTableView1DBColumn55: TcxGridDBColumn; cxGrid1DBTableView1DBColumn56: TcxGridDBColumn; cxGrid1DBTableView1DBColumn57: TcxGridDBColumn; cxGrid1DBTableView1DBColumn58: TcxGridDBColumn; cxGrid1DBTableView1DBColumn59: TcxGridDBColumn; cxGrid1DBTableView1DBColumn60: TcxGridDBColumn; cxGrid1DBTableView1DBColumn61: TcxGridDBColumn; cxGrid1DBTableView1DBColumn62: TcxGridDBColumn; cxGrid1DBTableView1DBColumn63: TcxGridDBColumn; cxGrid1DBTableView1DBColumn64: TcxGridDBColumn; cxGrid1DBTableView1DBColumn65: TcxGridDBColumn; cxGrid1DBTableView1DBColumn66: TcxGridDBColumn; cxGrid1DBTableView1DBColumn67: TcxGridDBColumn; cxGrid1DBTableView1DBColumn68: TcxGridDBColumn; cxGrid1DBTableView1DBColumn69: TcxGridDBColumn; cxGrid1DBTableView1DBColumn70: TcxGridDBColumn; cxGrid1DBTableView1DBColumn71: TcxGridDBColumn; cxGrid1DBTableView1DBColumn72: TcxGridDBColumn; cxGrid1DBTableView1DBColumn73: TcxGridDBColumn; Label33: TLabel; Label34: TLabel; DBEdit19: TDBEdit; DBEdit20: TDBEdit; Label35: TLabel; DBEdit23: TDBEdit; bsSkinTabSheet5: TbsSkinTabSheet; Panel5: TPanel; bsSkinButtonfind: TbsSkinButton; bsSkinButton25: TbsSkinButton; bsSkinButton26: TbsSkinButton; bsSkinButton27: TbsSkinButton; bsSkinButton28: TbsSkinButton; Panel6: TPanel; cxGrid3: TcxGrid; cxGridDBTableViewfind: TcxGridDBTableView; cxGridDBColumn1: TcxGridDBColumn; cxGridDBColumn2: TcxGridDBColumn; cxGridDBColumn3: TcxGridDBColumn; cxGridDBColumn4: TcxGridDBColumn; cxGridDBColumn5: TcxGridDBColumn; cxGridDBColumn6: TcxGridDBColumn; cxGridDBColumn7: TcxGridDBColumn; cxGridDBColumn8: TcxGridDBColumn; cxGridDBColumn9: TcxGridDBColumn; cxGridDBColumn10: TcxGridDBColumn; cxGridDBColumn11: TcxGridDBColumn; cxGridDBColumn12: TcxGridDBColumn; cxGridDBColumn13: TcxGridDBColumn; cxGridDBColumn14: TcxGridDBColumn; cxGridDBColumn15: TcxGridDBColumn; cxGridDBColumn16: TcxGridDBColumn; cxGridDBColumn17: TcxGridDBColumn; cxGridDBColumn18: TcxGridDBColumn; cxGridDBColumn19: TcxGridDBColumn; cxGridDBColumn20: TcxGridDBColumn; cxGridDBColumn21: TcxGridDBColumn; cxGridDBColumn22: TcxGridDBColumn; cxGridDBColumn23: TcxGridDBColumn; cxGridDBColumn24: TcxGridDBColumn; cxGridDBColumn25: TcxGridDBColumn; cxGridDBColumn26: TcxGridDBColumn; cxGridDBColumn27: TcxGridDBColumn; cxGridDBColumn28: TcxGridDBColumn; cxGridDBColumn29: TcxGridDBColumn; cxGridDBColumn30: TcxGridDBColumn; cxGridDBColumn31: TcxGridDBColumn; cxGridDBColumn32: TcxGridDBColumn; cxGridDBColumn33: TcxGridDBColumn; cxGridDBColumn34: TcxGridDBColumn; cxGridDBColumn35: TcxGridDBColumn; cxGridDBColumn36: TcxGridDBColumn; cxGridDBColumn37: TcxGridDBColumn; cxGridDBColumn38: TcxGridDBColumn; cxGridDBColumn39: TcxGridDBColumn; cxGridDBColumn40: TcxGridDBColumn; cxGridDBColumn41: TcxGridDBColumn; cxGridDBColumn42: TcxGridDBColumn; cxGridDBColumn43: TcxGridDBColumn; cxGridDBColumn44: TcxGridDBColumn; cxGridDBColumn45: TcxGridDBColumn; cxGridDBColumn46: TcxGridDBColumn; cxGridDBColumn47: TcxGridDBColumn; cxGridDBColumn48: TcxGridDBColumn; cxGridDBColumn49: TcxGridDBColumn; cxGridDBColumn50: TcxGridDBColumn; cxGridDBColumn51: TcxGridDBColumn; cxGridDBColumn52: TcxGridDBColumn; cxGridDBColumn53: TcxGridDBColumn; cxGridDBColumn54: TcxGridDBColumn; cxGridDBColumn55: TcxGridDBColumn; cxGridDBColumn56: TcxGridDBColumn; cxGridDBColumn57: TcxGridDBColumn; cxGridDBColumn58: TcxGridDBColumn; cxGridDBColumn59: TcxGridDBColumn; cxGridDBColumn60: TcxGridDBColumn; cxGridDBColumn61: TcxGridDBColumn; cxGridDBColumn62: TcxGridDBColumn; cxGridDBColumn63: TcxGridDBColumn; cxGridDBColumn64: TcxGridDBColumn; cxGridDBColumn65: TcxGridDBColumn; cxGridDBColumn66: TcxGridDBColumn; cxGridDBColumn67: TcxGridDBColumn; cxGridDBColumn68: TcxGridDBColumn; cxGridDBColumn69: TcxGridDBColumn; cxGridDBColumn70: TcxGridDBColumn; cxGridDBColumn71: TcxGridDBColumn; cxGridDBColumn72: TcxGridDBColumn; cxGridDBColumn73: TcxGridDBColumn; cxGridDBColumn74: TcxGridDBColumn; cxGridDBColumn75: TcxGridDBColumn; cxGridLevel1: TcxGridLevel; Splitter2: TSplitter; t_op_airtruckdetailfind: TADOQuery; t_op_airtruckdetailfind1: TDataSource; fra_fee3: Tfra_fee; t_op_airtruckdetailfindDSDesigner: TStringField; t_op_airtruckdetailfindDSDesigner2: TStringField; t_op_airtruckdetailfindLOT: TStringField; t_op_airtruckdetailfindDSDesigner3: TStringField; t_op_airtruckdetailfindDSDesigner4: TStringField; t_op_airtruckdetailfindDSDesigner5: TStringField; t_op_airtruckdetailfindDSDesigner6: TStringField; t_op_airtruckdetailfindDSDesigner7: TStringField; t_op_airtruckdetailfindDSDesigner8: TDateTimeField; t_op_airtruckdetailfindDSDesigner9: TIntegerField; t_op_airtruckdetailfindDSDesigner10: TStringField; t_op_airtruckdetailfindDSDesigner11: TStringField; t_op_airtruckdetailfindDSDesigner12: TStringField; t_op_airtruckdetailfindDSDesigner13: TStringField; t_op_airtruckdetailfindDSDesigner14: TStringField; t_op_airtruckdetailfindDSDesigner15: TStringField; t_op_airtruckdetailfindDSDesigner16: TStringField; t_op_airtruckdetailfindDSDesigner17: TStringField; t_op_airtruckdetailfindDSDesigner18: TStringField; t_op_airtruckdetailfindDSDesigner19: TStringField; t_op_airtruckdetailfindDSDesigner20: TStringField; t_op_airtruckdetailfindDSDesigner21: TStringField; t_op_airtruckdetailfindDSDesigner22: TStringField; t_op_airtruckdetailfindDSDesigner23: TDateTimeField; t_op_airtruckdetailfindDSDesigner24: TDateTimeField; t_op_airtruckdetailfindDSDesigner25: TStringField; t_op_airtruckdetailfindDSDesigner26: TStringField; t_op_airtruckdetailfindDSDesigner27: TStringField; t_op_airtruckdetailfindDSDesigner28: TStringField; t_op_airtruckdetailfindDSDesigner29: TStringField; t_op_airtruckdetailfindDSDesigner30: TStringField; t_op_airtruckdetailfindDSDesigner31: TIntegerField; t_op_airtruckdetailfindDSDesigner32: TBCDField; t_op_airtruckdetailfindDSDesigner33: TBCDField; t_op_airtruckdetailfindDSDesigner34: TStringField; t_op_airtruckdetailfindDSDesigner35: TStringField; t_op_airtruckdetailfindDSDesigner36: TDateTimeField; t_op_airtruckdetailfindDSDesigner37: TStringField; t_op_airtruckdetailfindDSDesigner38: TStringField; t_op_airtruckdetailfindDSDesigner39: TStringField; t_op_airtruckdetailfindDSDesigner40: TStringField; t_op_airtruckdetailfindBGS: TStringField; t_op_airtruckdetailfindSA: TStringField; t_op_airtruckdetailfindDSDesigner41: TStringField; t_op_airtruckdetailfindDSDesigner42: TStringField; t_op_airtruckdetailfindBGS2: TStringField; t_op_airtruckdetailfindSA2: TStringField; t_op_airtruckdetailfindBGS3: TStringField; t_op_airtruckdetailfindBGS4: TStringField; t_op_airtruckdetailfindBGS5: TStringField; t_op_airtruckdetailfindSA3: TStringField; t_op_airtruckdetailfindSA4: TStringField; t_op_airtruckdetailfindSA5: TStringField; t_op_airtruckdetailfindDSDesigner43: TBooleanField; t_op_airtruckdetailfindDSDesigner44: TDateTimeField; t_op_airtruckdetailfindDSDesigner45: TStringField; t_op_airtruckdetailfindDSDesigner46: TStringField; t_op_airtruckdetailfindDSDesigner47: TStringField; t_op_airtruckdetailfindDSDesigner48: TStringField; t_op_airtruckdetailfindDSDesigner49: TIntegerField; t_op_airtruckdetailfindDSDesigner50: TStringField; t_op_airtruckdetailfindDSDesigner51: TBooleanField; t_op_airtruckdetailfindDSDesigner52: TBooleanField; t_op_airtruckdetailfindDSDesigner53: TDateTimeField; t_op_airtruckdetailfindDSDesigner54: TBooleanField; t_op_airtruckdetailfindDSDesigner55: TStringField; t_op_airtruckdetailfindDSDesigner56: TDateTimeField; t_op_airtruckdetailfindDSDesigner57: TStringField; t_op_airtruckdetailfindDSDesigner58: TStringField; t_op_airtruckdetailfindDSDesigner59: TStringField; t_op_airtruckdetailfindDSDesigner60: TBooleanField; t_op_airtruckdetailfindDSDesigner61: TStringField; t_op_airtruckdetailfindDSDesigner62: TStringField; t_op_airtruckdetailfindDSDesigner63: TStringField; t_op_airtruckdetailfindupload: TSmallintField; t_op_airtruckdetailfindHY: TStringField; t_op_airtruckdetailfindHY2: TStringField; t_op_airtruckdetailfindHY3: TStringField; t_op_airtruckdetailfindHY4: TStringField; t_op_airtruckdetailfindHY5: TStringField; t_op_airtruckdetailfindDSDesigner64: TStringField; t_op_airtruckdetailfindDSDesigner65: TStringField; t_op_airtruckdetailfindDSDesigner66: TStringField; t_op_airtruckdetailfindDSDesigner67: TStringField; t_op_airtruckdetailfindDSDesigner68: TDateTimeField; t_op_airtruckdetailfindDSDesigner69: TDateTimeField; t_op_airtruckdetailfindDSDesigner70: TStringField; t_op_airtruckdetailfindDSDesigner71: TStringField; t_op_airtruckdetailfindDSDesigner72: TStringField; t_op_airtruckdetailfindDSDesigner73: TStringField; t_op_airtruckdetailfindDSDesigner74: TStringField; t_op_airtruckdetailfindDSDesigner75: TStringField; t_op_airtruckdetailfindDSDesigner76: TStringField; t_op_airtruckdetailfindDSDesigner77: TStringField; t_op_airtruckdetailfindDSDesigner78: TDateTimeField; t_op_airtruckdetailfindDSDesigner79: TDateTimeField; t_op_airtruckdetailfindDSDesigner80: TBooleanField; t_op_airtruckdetailfindDSDesigner81: TStringField; t_op_airtruckdetailfindDSDesigner82: TStringField; t_op_airtruckdetailfindDSDesigner83: TStringField; t_op_airtruckdetailfindDSDesigner84: TStringField; t_op_airtruckdetailfindDSDesigner85: TStringField; t_op_airtruckdetailfindDSDesigner86: TStringField; t_op_airtruckdetailfindDSDesigner87: TStringField; t_op_airtruckdetailfindDSDesigner88: TDateTimeField; t_op_airtruckdetailfindDSDesigner89: TStringField; t_op_airtruckdetailfindDSDesigner90: TBooleanField; t_op_airtruckdetailfindDSDesigner91: TBooleanField; t_op_airtruckdetailfindDSDesigner92: TStringField; t_op_airtruckdetailfindDSDesigner93: TStringField; t_op_airtruckdetailfindDSDesigner94: TIntegerField; t_op_airtruckdetailfindDSDesigner95: TStringField; t_op_airtruckdetailfindDSDesigner96: TStringField; t_op_airtruckdetailfindDSDesigner97: TBCDField; t_op_airtruckdetailfindDSDesigner98: TBCDField; t_op_airtruckdetailfindDSDesigner99: TBCDField; t_op_airtruckdetailfindDSDesigner100: TBCDField; t_op_airtruckdetailfindDSDesigner101: TBCDField; t_op_airtruckdetailfindDSDesigner102: TStringField; t_op_airtruckdetailfindDSDesigner103: TIntegerField; t_op_airtruckdetailfindDSDesigner104: TStringField; RxDBLookupCombo4: TRxDBLookupCombo; RxDBLookupCombo5: TRxDBLookupCombo; cxGrid2DBTableView1DBColumn5: TcxGridDBColumn; Label39: TLabel; bsbtnrefresh: TbsSkinButton; qryjczDSDesigner6: TFloatField; chlautocal: TwwCheckBox; cxStyleRepository1: TcxStyleRepository; cxStyle1: TcxStyle; t_op_airtruckdetailfindpr: TADOQuery; StringField1: TStringField; StringField2: TStringField; StringField3: TStringField; StringField4: TStringField; StringField5: TStringField; StringField6: TStringField; StringField7: TStringField; StringField8: TStringField; DateTimeField1: TDateTimeField; IntegerField1: TIntegerField; StringField9: TStringField; StringField10: TStringField; StringField11: TStringField; StringField12: TStringField; StringField13: TStringField; StringField14: TStringField; StringField15: TStringField; StringField16: TStringField; StringField17: TStringField; StringField18: TStringField; StringField19: TStringField; StringField20: TStringField; StringField21: TStringField; DateTimeField2: TDateTimeField; DateTimeField3: TDateTimeField; StringField22: TStringField; StringField23: TStringField; StringField24: TStringField; StringField25: TStringField; StringField26: TStringField; StringField27: TStringField; IntegerField2: TIntegerField; BCDField1: TBCDField; BCDField2: TBCDField; StringField28: TStringField; StringField29: TStringField; DateTimeField4: TDateTimeField; StringField30: TStringField; StringField31: TStringField; StringField32: TStringField; StringField33: TStringField; StringField34: TStringField; StringField35: TStringField; StringField36: TStringField; StringField37: TStringField; StringField38: TStringField; StringField39: TStringField; StringField40: TStringField; StringField41: TStringField; StringField42: TStringField; StringField43: TStringField; StringField44: TStringField; StringField45: TStringField; BooleanField1: TBooleanField; DateTimeField5: TDateTimeField; StringField46: TStringField; StringField47: TStringField; StringField48: TStringField; StringField49: TStringField; IntegerField3: TIntegerField; StringField50: TStringField; BooleanField2: TBooleanField; BooleanField3: TBooleanField; DateTimeField6: TDateTimeField; BooleanField4: TBooleanField; StringField51: TStringField; DateTimeField7: TDateTimeField; StringField52: TStringField; StringField53: TStringField; StringField54: TStringField; BooleanField5: TBooleanField; StringField55: TStringField; StringField56: TStringField; StringField57: TStringField; SmallintField1: TSmallintField; StringField58: TStringField; StringField59: TStringField; StringField60: TStringField; StringField61: TStringField; StringField62: TStringField; StringField63: TStringField; StringField64: TStringField; StringField65: TStringField; StringField66: TStringField; DateTimeField8: TDateTimeField; DateTimeField9: TDateTimeField; StringField67: TStringField; StringField68: TStringField; StringField69: TStringField; StringField70: TStringField; StringField71: TStringField; StringField72: TStringField; StringField73: TStringField; StringField74: TStringField; DateTimeField10: TDateTimeField; DateTimeField11: TDateTimeField; BooleanField6: TBooleanField; StringField75: TStringField; StringField76: TStringField; StringField77: TStringField; StringField78: TStringField; StringField79: TStringField; StringField80: TStringField; StringField81: TStringField; DateTimeField12: TDateTimeField; StringField82: TStringField; BooleanField7: TBooleanField; BooleanField8: TBooleanField; StringField83: TStringField; StringField84: TStringField; IntegerField4: TIntegerField; StringField85: TStringField; StringField86: TStringField; BCDField3: TBCDField; BCDField4: TBCDField; BCDField5: TBCDField; BCDField6: TBCDField; BCDField7: TBCDField; StringField87: TStringField; IntegerField5: TIntegerField; StringField88: TStringField; t_op_airtruckdetailfindpr1: TDataSource; bsSkinButtonCreateFee: TbsSkinButton; DBMemo19: TDBMemo; Label111: TLabel; bsSkinButton21: TbsSkinButton; procedure bsSkinButton4Click(Sender: TObject); procedure bsSkinButton5Click(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormShow(Sender: TObject); procedure bsSkinButton11Click(Sender: TObject); procedure bsSkinButton8Click(Sender: TObject); procedure Panel2Resize(Sender: TObject); procedure bsSkinButton1Click(Sender: TObject); procedure t_op_airtruckBeforeEdit(DataSet: TDataSet); procedure t_op_airtruckBeforePost(DataSet: TDataSet); procedure RxDBLookupCombo12Change(Sender: TObject); procedure RxDBLookupCombo8Change(Sender: TObject); procedure N17Click(Sender: TObject); procedure N34Click(Sender: TObject); procedure N36Click(Sender: TObject); procedure N37Click(Sender: TObject); procedure N9Click(Sender: TObject); procedure N20Click(Sender: TObject); procedure t_op_airtruckBeforeDelete(DataSet: TDataSet); procedure t_op_airtruckBeforeCancel(DataSet: TDataSet); procedure N21Click(Sender: TObject); procedure N24Click(Sender: TObject); procedure N26Click(Sender: TObject); procedure bsSkinButton14Click(Sender: TObject); procedure bsSkinButton15Click(Sender: TObject); procedure bsSkinButton16Click(Sender: TObject); procedure t_op_airtruckdetailAfterInsert(DataSet: TDataSet); procedure bsSkinButton23Click(Sender: TObject); procedure bsSkinButton24Click(Sender: TObject); procedure t_op_airtruckdetailAfterPost(DataSet: TDataSet); procedure t_op_airtruckdetailBeforeInsert(DataSet: TDataSet); procedure bsSkinPageControl1Change(Sender: TObject); procedure bsSkinButton9Click(Sender: TObject); procedure bsSkinButton44Click(Sender: TObject); procedure bsSkinButton2Click(Sender: TObject); procedure fra_fee1bsSkinButton2Click(Sender: TObject); procedure fra_fee1bsSkinButton20Click(Sender: TObject); procedure fra_fee1bsSkinButton9Click(Sender: TObject); procedure t_op_airtruckdetailBeforeDelete(DataSet: TDataSet); procedure bsSkinButton7Click(Sender: TObject); procedure bsSkinButton6Click(Sender: TObject); procedure bsSkinButton10Click(Sender: TObject); procedure bsSkinButton3Click(Sender: TObject); procedure DBEdit1KeyPress(Sender: TObject; var Key: Char); procedure wwDBDateTimePicker2KeyPress(Sender: TObject; var Key: Char); procedure RxDBLookupCombo12KeyPress(Sender: TObject; var Key: Char); procedure RxDBLookupCombo8KeyPress(Sender: TObject; var Key: Char); procedure RxDBLookupCombo1KeyPress(Sender: TObject; var Key: Char); procedure DBEdit90000KeyPress(Sender: TObject; var Key: Char); procedure DBEdit7KeyPress(Sender: TObject; var Key: Char); procedure DBEdit5KeyPress(Sender: TObject; var Key: Char); procedure DBEdit16KeyPress(Sender: TObject; var Key: Char); procedure DBComboBox1KeyPress(Sender: TObject; var Key: Char); procedure RxDBLookupCombo1Change(Sender: TObject); procedure Notebook1PageChanged(Sender: TObject); procedure t_op_airtruckdetailDSDesigner32Change(Sender: TField); procedure bsSkinButton17Click(Sender: TObject); procedure bsSkinButtonmtzClick(Sender: TObject); procedure bsSkinButtonsuoClick(Sender: TObject); procedure t_op_airtruckdetail1DataChange(Sender: TObject; Field: TField); procedure dxDBTreeList1CustomDrawCell(Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean; var AText: String; var AColor: TColor; AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean); procedure DBEdit12KeyPress(Sender: TObject; var Key: Char); procedure bsSkinButton12Click(Sender: TObject); procedure btndeleteClick(Sender: TObject); procedure btnpostClick(Sender: TObject); procedure btncancelClick(Sender: TObject); procedure qryjczBeforeEdit(DataSet: TDataSet); procedure qryjczAfterPost(DataSet: TDataSet); procedure DBEdit6KeyPress(Sender: TObject; var Key: Char); procedure chlautocalKeyPress(Sender: TObject; var Key: Char); procedure DBEdit11KeyPress(Sender: TObject; var Key: Char); procedure qryjczAfterInsert(DataSet: TDataSet); procedure t_op_airtruckdetailBeforeEdit(DataSet: TDataSet); procedure fra_fee1bsSkinButton3Click(Sender: TObject); procedure bsSkinBtnpriorClick(Sender: TObject); procedure bsSkinBtnnextClick(Sender: TObject); procedure cxGrid1DBTableView1CustomDrawCell( Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); procedure bsSkinButtonttClick(Sender: TObject); procedure bsSkinButtonprintClick(Sender: TObject); procedure DBEdit19KeyPress(Sender: TObject; var Key: Char); procedure DBEdit20KeyPress(Sender: TObject; var Key: Char); procedure wwDBLookupCombo4KeyPress(Sender: TObject; var Key: Char); procedure RxDBLookupCombo10KeyPress(Sender: TObject; var Key: Char); procedure DBEdit21KeyPress(Sender: TObject; var Key: Char); procedure DBDateEdit1KeyPress(Sender: TObject; var Key: Char); procedure wwDBLookupCombo5KeyPress(Sender: TObject; var Key: Char); procedure RxDBLookupCombo14KeyPress(Sender: TObject; var Key: Char); procedure DBEdit22KeyPress(Sender: TObject; var Key: Char); procedure RxDBLookupCombo9KeyPress(Sender: TObject; var Key: Char); procedure DBEdit23KeyPress(Sender: TObject; var Key: Char); procedure bsSkinButtonfindClick(Sender: TObject); procedure bsSkinButton25Click(Sender: TObject); procedure bsSkinButton27Click(Sender: TObject); procedure bsSkinButton28Click(Sender: TObject); procedure bsSkinButton26Click(Sender: TObject); procedure RxDBLookupCombo10Enter(Sender: TObject); procedure RxDBLookupCombo10Exit(Sender: TObject); procedure RxDBLookupCombo4Enter(Sender: TObject); procedure RxDBLookupCombo4Exit(Sender: TObject); procedure fra_fee3bsSkinButton1Click(Sender: TObject); procedure qryjczBeforePost(DataSet: TDataSet); procedure bsbtnrefreshClick(Sender: TObject); procedure DBEdit10KeyPress(Sender: TObject; var Key: Char); procedure bsSkinButtonCreateFeeClick(Sender: TObject); procedure bsSkinButton21Click(Sender: TObject); private t_op_airtruckdetailno, t_op_airtruckdetailhyno:integer ; findfpwidth,mxfpwidth:integer ; function getheight:integer ; function saveheight:integer ; procedure Datasetjzccharge(Sender: TField);//收费金额计算 procedure getweight ;//计算重量 procedure Opendetail ; procedure fenpiaofind ; //分票查询 procedure createFee(bianhao,cust,feename,custtype,priceunit,feetype:string;QUANTITY:Double); { Private declarations } public { Public declarations } end; var frm_op_airtruck2: Tfrm_op_airtruck2; airtruckopen:boolean; implementation uses u_main,my_sys_function, u_op_airtruck_add2, u_data_share, u_op_date_change, u_sys_tab_sort, u_op_airtruck_query2, u_sys_grid_cx, u_ch_fee_zhupiao, u_op_airtruckdetailfind; {$R *.dfm} procedure Tfrm_op_airtruck2.bsSkinButton4Click(Sender: TObject); begin t_ch_fee.close; t_ch_fee.Parameters[0].value:=t_op_airtruck.fieldbyname('编号').asstring; t_ch_fee.open; if not t_ch_fee.IsEmpty then begin showmessage('对不起业务存在费用信息,不能删除!!'); exit; end; t_op_airtruck.Delete; end; procedure Tfrm_op_airtruck2.bsSkinButton5Click(Sender: TObject); begin close; end; procedure Tfrm_op_airtruck2.FormClose(Sender: TObject; var Action: TCloseAction); var str:string ; begin saveheight ; if not DirectoryExists(ExtractFilePath(Application.ExeName)+'gridini') then CreateDir(ExtractFilePath(Application.ExeName)+'gridini'); str:=ExtractFilePath(application.ExeName)+'gridini\'+caption+'2'+'.ini' ; dxDBTreeList1.SaveToIniFile(str); // savewwgrid(wwDBGrid1,'监管车分票'); savecxgridview(cxGrid1DBTableView1,CAPTION+'3') ; //保存cxgrid列表保存信息 数据库 savecxgridview(cxGridDBTableViewfind,CAPTION+'4') ; //保存cxgrid列表保存信息 数据库 savewwgrid(fra_fee1.wwDBGrid1,'监管车应收'); savewwgrid(fra_fee1.wwDBGrid2,'监管车应付'); savewwgrid(fra_fee2.wwDBGrid1,'监管车应收2'); savewwgrid(fra_fee2.wwDBGrid2,'监管车应付2'); savewwgrid(fra_fee3.wwDBGrid1,'监管车应收3'); savewwgrid(fra_fee3.wwDBGrid2,'监管车应付3'); airtruckopen:=false; frm_op_airtruck2.Hide; frm_op_airtruck2.ManualFloat(frm_op_airtruck2.BoundsRect ); frm_main.freeTabs('frm_op_airtruck2'); action:=cafree; frm_op_airtruck2:=nil; end; procedure Tfrm_op_airtruck2.FormShow(Sender: TObject); var inifile1,seabandini:Tinifile; sl:TStrings; j,n,i:integer; str:string ; begin Notebook1.PageIndex:=0; Notebook1.Align:=alClient; if not DirectoryExists(ExtractFilePath(Application.ExeName)+'gridini') then CreateDir(ExtractFilePath(Application.ExeName)+'gridini'); str:=ExtractFilePath(application.ExeName)+'gridini\'+caption+'2'+'.ini' ; dxDBTreeList1.Repaint ; dxDBTreeList1.LoadFromIniFile(str); if Trim(frm_data_share.t_sys_noset.fieldbyname('出号规则').Asstring)='自动取号' then begin DBEdit8.Width:=110; if frm_data_share.t_sys_noset.fieldbyname('是否允许手动编辑').AsBoolean then begin DBEdit8.ReadOnly:=false; end else begin DBEdit8.ReadOnly:=true; end; end else if Trim(frm_data_share.t_sys_noset.fieldbyname('出号规则').Asstring)='手动取号' then begin DBEdit8.Width:=90; if frm_data_share.t_sys_noset.fieldbyname('是否允许手动编辑').AsBoolean then begin DBEdit8.ReadOnly:=false; end else begin DBEdit8.ReadOnly:=true; end; end else if Trim(frm_data_share.t_sys_noset.fieldbyname('出号规则').Asstring)='手动编辑' then begin DBEdit8.ReadOnly:=false; DBEdit8.Width:=110; end; t_op_airtruck.Close; t_op_airtruck.SQL.clear; // // isnull(主编号,'''+''')<>编号 and' t_op_airtruck.SQL.Add('select top 50 * from t_op_airtruck where' +'(录入人='+''''+employee+'''' +' or 操作员='+''''+employee+'''' +' or 客服员='+''''+employee+''''+')' +' order by 主编号 DESC'); t_op_airtruck.open; t_op_airtruckdetail.open ; qryjcz.Open ; if if_open('353') or if_open('354') then begin fra_fee1.edit_type.text:='5'; fra_fee1.edit_data.text:='0005'; fra_fee1.edit_report.text:='监管车管理'; fra_fee1.t_ch_accept.DataSource:=t_op_airtruckdetail1; if strtobool(get_parameters_value(150,'false')) then fra_fee1.bsSkinPanel3.Visible:=true; fra_fee1.DBEdit48.DataSource:=t_op_airtruckdetail1; if if_open('353') then begin fra_fee1.t_ch_accept.DataSource:=t_op_airtruckdetail1; if (strtobool(get_parameters_value(153,'false'))=true) then begin if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('351')=false) then begin fra_fee1.t_ch_accept.close; fra_fee1.t_ch_accept.SQL.Clear; fra_fee1.t_ch_accept.SQL.Add('select * from t_ch_fee where 类型=' +''''+'收'+''''+' and 编号=:编号 and (录入人=' +''''+employee+''''+' or (录入人<>'+''''+employee+'''' +' and 机密<>1) ) and '+open_data('7000','录入人','no','no','no','no') +' order by 顺序,CH_ID'); end else begin fra_fee1.t_ch_accept.close; fra_fee1.t_ch_accept.SQL.Clear; fra_fee1.t_ch_accept.SQL.Add('select * from t_ch_fee where 类型=' +''''+'收'+''''+' and 编号=:编号 and ' +open_data('7000','录入人','no','no','no','no') +' order by 顺序,CH_ID'); end; fra_fee1.t_ch_accept.open; end else begin if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('351')=false) then begin fra_fee1.t_ch_accept.close; fra_fee1.t_ch_accept.SQL.Clear; fra_fee1.t_ch_accept.SQL.Add('select * from t_ch_fee where 类型=' +''''+'收'+''''+' and 编号=:编号 and (录入人=' +''''+employee+''''+' or (录入人<>'+''''+employee+'''' +' and 机密<>1) ) order by 顺序,CH_ID'); end; fra_fee1.t_ch_accept.open; end; fra_fee1.a_shen_delete.open; fra_fee1.a_shen_modify_old.open; fra_fee1.a_shen_modify_new.open; fra_fee1.Panel3.visible:=true; end else fra_fee1.Panel3.visible:=false; if if_open('354') then begin fra_fee1.t_ch_pay.DataSource:=t_op_airtruckdetail1; if (strtobool(get_parameters_value(153,'false'))=true) then begin if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('351')=false) then begin fra_fee1.t_ch_pay.close; fra_fee1.t_ch_pay.SQL.Clear; fra_fee1.t_ch_pay.SQL.Add('select * from t_ch_fee where 类型=' +''''+'付'+''''+' and 编号=:编号 and (录入人=' +''''+employee+''''+' or (录入人<>'+''''+employee+'''' +' and 机密<>1) ) and '+open_data('7000','录入人','no','no','no','no') +' order by 顺序,CH_ID'); end else begin fra_fee1.t_ch_pay.close; fra_fee1.t_ch_pay.SQL.Clear; fra_fee1.t_ch_pay.SQL.Add('select * from t_ch_fee where 类型=' +''''+'付'+''''+' and 编号=:编号 and ' +open_data('7000','录入人','no','no','no','no') +' order by 顺序,CH_ID'); end; fra_fee1.t_ch_pay.open; end else begin if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('351')=false) then begin fra_fee1.t_ch_pay.close; fra_fee1.t_ch_pay.SQL.Clear; fra_fee1.t_ch_pay.SQL.Add('select * from t_ch_fee where 类型=' +''''+'付'+''''+' and 编号=:编号 and (录入人=' +''''+employee+''''+' or (录入人<>'+''''+employee+'''' +' and 机密<>1) ) order by 顺序,CH_ID'); end; fra_fee1.t_ch_pay.open; end; fra_fee1.p_shen_delete.open; fra_fee1.p_shen_modify_old.open; fra_fee1.p_shen_modify_new.open; fra_fee1.Panel1.visible:=true; end else fra_fee1.Panel1.visible:=false; if fra_fee1.Panel1.visible and fra_fee1.Panel3.visible then begin if if_open('352') then begin fra_fee1.Panel8.Visible:=true; fra_fee1.Panel8.Height:=20; end else fra_fee1.Panel8.Visible:=false; fra_fee1.t_op_gain.DataSource:=t_op_airtruckdetail1; fra_fee1.t_op_gain.open; fra_fee1.Panel9.Visible:=false; end else begin fra_fee1.Panel8.Visible:=false; end; end else begin fra_fee1.Visible:=false; end; if if_open('353') or if_open('354') then begin fra_fee2.edit_type.text:='5'; fra_fee2.edit_data.text:='0005'; fra_fee2.edit_report.text:='监管车管理'; fra_fee2.t_ch_accept.DataSource:=t_op_airtruck1; if strtobool(get_parameters_value(150,'false')) then fra_fee2.bsSkinPanel3.Visible:=true; fra_fee2.DBEdit48.DataSource:=t_op_airtruck1; if if_open('353') then begin fra_fee2.t_ch_accept.DataSource:=t_op_airtruck1; if (strtobool(get_parameters_value(153,'false'))=true) then begin if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('351')=false) then begin fra_fee2.t_ch_accept.close; fra_fee2.t_ch_accept.SQL.Clear; fra_fee2.t_ch_accept.SQL.Add('select * from t_ch_fee where 类型=' +''''+'收'+''''+' and 编号=:编号 and (录入人=' +''''+employee+''''+' or (录入人<>'+''''+employee+'''' +' and 机密<>1) ) and '+open_data('7000','录入人','no','no','no','no') +' order by 顺序,CH_ID'); end else begin fra_fee2.t_ch_accept.close; fra_fee2.t_ch_accept.SQL.Clear; fra_fee2.t_ch_accept.SQL.Add('select * from t_ch_fee where 类型=' +''''+'收'+''''+' and 编号=:编号 and ' +open_data('7000','录入人','no','no','no','no') +' order by 顺序,CH_ID'); end; fra_fee2.t_ch_accept.open; end else begin if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('351')=false) then begin fra_fee2.t_ch_accept.close; fra_fee2.t_ch_accept.SQL.Clear; fra_fee2.t_ch_accept.SQL.Add('select * from t_ch_fee where 类型=' +''''+'收'+''''+' and 编号=:编号 and (录入人=' +''''+employee+''''+' or (录入人<>'+''''+employee+'''' +' and 机密<>1) ) order by 顺序,CH_ID'); end; fra_fee2.t_ch_accept.open; end; fra_fee2.a_shen_delete.open; fra_fee2.a_shen_modify_old.open; fra_fee2.a_shen_modify_new.open; fra_fee2.Panel3.visible:=true; end else fra_fee2.Panel3.visible:=false; if if_open('354') then begin fra_fee2.t_ch_pay.DataSource:=t_op_airtruck1; if (strtobool(get_parameters_value(153,'false'))=true) then begin if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('351')=false) then begin fra_fee2.t_ch_pay.close; fra_fee2.t_ch_pay.SQL.Clear; fra_fee2.t_ch_pay.SQL.Add('select * from t_ch_fee where 类型=' +''''+'付'+''''+' and 编号=:编号 and (录入人=' +''''+employee+''''+' or (录入人<>'+''''+employee+'''' +' and 机密<>1) ) and '+open_data('7000','录入人','no','no','no','no') +' order by 顺序,CH_ID'); end else begin fra_fee2.t_ch_pay.close; fra_fee2.t_ch_pay.SQL.Clear; fra_fee2.t_ch_pay.SQL.Add('select * from t_ch_fee where 类型=' +''''+'付'+''''+' and 编号=:编号 and ' +open_data('7000','录入人','no','no','no','no') +' order by 顺序,CH_ID'); end; fra_fee2.t_ch_pay.open; end else begin if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('351')=false) then begin fra_fee2.t_ch_pay.close; fra_fee2.t_ch_pay.SQL.Clear; fra_fee2.t_ch_pay.SQL.Add('select * from t_ch_fee where 类型=' +''''+'付'+''''+' and 编号=:编号 and (录入人=' +''''+employee+''''+' or (录入人<>'+''''+employee+'''' +' and 机密<>1) ) order by 顺序,CH_ID'); end; fra_fee2.t_ch_pay.open; end; fra_fee2.p_shen_delete.open; fra_fee2.p_shen_modify_old.open; fra_fee2.p_shen_modify_new.open; fra_fee2.Panel1.visible:=true; end else fra_fee2.Panel1.visible:=false; if fra_fee2.Panel1.visible and fra_fee2.Panel3.visible then begin if if_open('352') then begin fra_fee2.Panel8.Visible:=true; fra_fee2.Panel8.Height:=20; end else fra_fee2.Panel8.Visible:=false; fra_fee2.t_op_gain.DataSource:=t_op_airtruck1; fra_fee2.t_op_gain.open; fra_fee2.Panel9.Visible:=false; end else begin fra_fee2.Panel8.Visible:=false; end; end else begin fra_fee2.Visible:=false; end; /// fra_fee3 t_op_airtruckdetailfind.Open ; if if_open('353') or if_open('354') then begin fra_fee3.edit_type.text:='5'; fra_fee3.edit_data.text:='0005'; fra_fee3.edit_report.text:='监管车管理'; fra_fee3.t_ch_accept.DataSource:=t_op_airtruckdetailfind1; if strtobool(get_parameters_value(150,'false')) then fra_fee3.bsSkinPanel3.Visible:=true; fra_fee3.DBEdit48.DataSource:=t_op_airtruckdetailfind1; if if_open('353') then begin fra_fee3.t_ch_accept.DataSource:=t_op_airtruckdetailfind1; if (strtobool(get_parameters_value(153,'false'))=true) then begin if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('351')=false) then begin fra_fee3.t_ch_accept.close; fra_fee3.t_ch_accept.SQL.Clear; fra_fee3.t_ch_accept.SQL.Add('select * from t_ch_fee where 类型=' +''''+'收'+''''+' and 编号=:编号 and (录入人=' +''''+employee+''''+' or (录入人<>'+''''+employee+'''' +' and 机密<>1) ) and '+open_data('7000','录入人','no','no','no','no') +' order by 顺序,CH_ID'); end else begin fra_fee3.t_ch_accept.close; fra_fee3.t_ch_accept.SQL.Clear; fra_fee3.t_ch_accept.SQL.Add('select * from t_ch_fee where 类型=' +''''+'收'+''''+' and 编号=:编号 and ' +open_data('7000','录入人','no','no','no','no') +' order by 顺序,CH_ID'); end; fra_fee3.t_ch_accept.open; end else begin if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('351')=false) then begin fra_fee3.t_ch_accept.close; fra_fee3.t_ch_accept.SQL.Clear; fra_fee3.t_ch_accept.SQL.Add('select * from t_ch_fee where 类型=' +''''+'收'+''''+' and 编号=:编号 and (录入人=' +''''+employee+''''+' or (录入人<>'+''''+employee+'''' +' and 机密<>1) ) order by 顺序,CH_ID'); end; fra_fee3.t_ch_accept.open; end; fra_fee3.a_shen_delete.open; fra_fee3.a_shen_modify_old.open; fra_fee3.a_shen_modify_new.open; fra_fee3.Panel3.visible:=true; end else fra_fee3.Panel3.visible:=false; if if_open('354') then begin fra_fee3.t_ch_pay.DataSource:=t_op_airtruckdetailfind1; if (strtobool(get_parameters_value(153,'false'))=true) then begin if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('351')=false) then begin fra_fee3.t_ch_pay.close; fra_fee3.t_ch_pay.SQL.Clear; fra_fee3.t_ch_pay.SQL.Add('select * from t_ch_fee where 类型=' +''''+'付'+''''+' and 编号=:编号 and (录入人=' +''''+employee+''''+' or (录入人<>'+''''+employee+'''' +' and 机密<>1) ) and '+open_data('7000','录入人','no','no','no','no') +' order by 顺序,CH_ID'); end else begin fra_fee3.t_ch_pay.close; fra_fee3.t_ch_pay.SQL.Clear; fra_fee3.t_ch_pay.SQL.Add('select * from t_ch_fee where 类型=' +''''+'付'+''''+' and 编号=:编号 and ' +open_data('7000','录入人','no','no','no','no') +' order by 顺序,CH_ID'); end; fra_fee3.t_ch_pay.open; end else begin if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('351')=false) then begin fra_fee3.t_ch_pay.close; fra_fee3.t_ch_pay.SQL.Clear; fra_fee3.t_ch_pay.SQL.Add('select * from t_ch_fee where 类型=' +''''+'付'+''''+' and 编号=:编号 and (录入人=' +''''+employee+''''+' or (录入人<>'+''''+employee+'''' +' and 机密<>1) ) order by 顺序,CH_ID'); end; fra_fee3.t_ch_pay.open; end; fra_fee3.p_shen_delete.open; fra_fee3.p_shen_modify_old.open; fra_fee3.p_shen_modify_new.open; fra_fee3.Panel1.visible:=true; end else fra_fee3.Panel1.visible:=false; if fra_fee3.Panel1.visible and fra_fee3.Panel3.visible then begin if if_open('352') then begin fra_fee3.Panel8.Visible:=true; fra_fee3.Panel8.Height:=20; end else fra_fee3.Panel8.Visible:=false; fra_fee3.t_op_gain.DataSource:=t_op_airtruckdetailfind1; fra_fee3.t_op_gain.open; fra_fee3.Panel9.Visible:=false; end else begin fra_fee3.Panel8.Visible:=false; end; end else begin fra_fee3.Visible:=false; end; fra_op_state1.edit_state.text:='4'; fra_op_state1.t_op_state.DataSource:=t_op_airtruck1; fra_op_state1.t_op_state.open; getheight ; Panel3.Width:=mxfpwidth ; Panel6.Width:=findfpwidth; // DBEdit9.EditMask:=get_parameters_value(189,''); // loadwwgrid(wwDBGrid1,'监管车分票'); loadcxgridview(cxGrid1DBTableView1,CAPTION+'3') ;//提取CXGRID列表保存信息 数据库 Loadcxgridview(cxGridDBTableViewfind,CAPTION+'4') ; // { loadwwgrid(fra_fee1.wwDBGrid1,'监管车应收'); loadwwgrid(fra_fee1.wwDBGrid2,'监管车应付'); loadwwgrid(fra_fee2.wwDBGrid1,'监管车应收2'); loadwwgrid(fra_fee2.wwDBGrid2,'监管车应付2'); loadwwgrid(fra_fee3.wwDBGrid1,'监管车应收3'); loadwwgrid(fra_fee3.wwDBGrid2,'监管车应付3'); } frm_data_share.t_crm_client.requery; frm_data_share.t_crm_client_hangkong.requery; frm_data_share.t_crm_client_baoguan.requery; frm_data_share.t_crm_client_weituo.requery; frm_data_share.t_crm_client_daili.requery; frm_data_share.t_crm_client_shiper.requery; frm_data_share.t_crm_client_shouhuo.requery; frm_data_share.t_crm_client_tongzhi.requery; frm_data_share.t_code_source.requery; frm_data_share.t_sys_employee.requery; frm_data_share.t_code_code.requery; frm_data_share.t_code_fee.requery; frm_data_share.t_code_currency.requery; frm_data_share.t_code_port_air.requery; airtruckopen:=true; end; procedure Tfrm_op_airtruck2.bsSkinButton11Click(Sender: TObject); var answer:TModalResult; zhubianhao:string ; begin if bsSkinButton11.Caption='编辑修改' then begin zhubianhao:=t_op_airtruck.fieldbyname('主编号').AsString ; t_op_airtruck.Locate('编号',zhubianhao,[]); Notebook1.PageIndex:=1; bsSkinButton11.Caption:='返回列表'; end else begin if (t_op_airtruck.State=dsinsert)or(t_op_airtruck.State=dsedit) then BEGIN answer:=messagedlg( '数据已经修改,是否保存?',mtWarning,mbYesNoCancel,0); if answer=mrYes then begin t_op_airtruck.post; end; if answer=mrNo then begin t_op_airtruck.cancel; end; if answer=mrCancel then begin exit; end; END; Notebook1.PageIndex:=0; bsSkinButton11.Caption:='编辑修改'; end; end; procedure Tfrm_op_airtruck2.bsSkinButton8Click(Sender: TObject); var Pnt:Tpoint; begin Pnt:=bsSkinButton8.ClientToScreen(Point(0,bsSkinButton8.Height)); PopupMenu1.Popup(Pnt.x,Pnt.y); end; procedure Tfrm_op_airtruck2.Panel2Resize(Sender: TObject); var i:integer; begin i:=round(Panel2.Width/13); bsSkinButton7.Width:=i; bsSkinButton6.Width:=i; bsSkinButton9.Width:=i; bsSkinButton10.Width:=i; bsSkinButton1.Width:=i; bsSkinButton11.Width:=i; bsSkinButton8.Width:=i; bsSkinButton2.Width:=i; bsSkinButton4.Width:=i; bsSkinButton3.Width:=i; bsSkinButton13.Left:=Panel2.Width-bsSkinButton13.Width-20; end; procedure Tfrm_op_airtruck2.bsSkinButton1Click(Sender: TObject); begin if (t_op_airtruck.State=dsinsert)or(t_op_airtruck.State=dsedit) then t_op_airtruck.post; try frm_op_airtruck_add2:=tfrm_op_airtruck_add2.Create(self); frm_op_airtruck_add2.data1.Enabled:=false; frm_op_airtruck_add2.data1.DataSet:=t_op_airtruck; frm_op_airtruck_add2.data1.Enabled:=true; frm_op_airtruck_add2.ShowModal ; finally frm_op_airtruck_add2.Free; end; end; procedure Tfrm_op_airtruck2.t_op_airtruckBeforeEdit(DataSet: TDataSet); begin // op_befor_post(t_op_airi,'0004'); end; procedure Tfrm_op_airtruck2.t_op_airtruckBeforePost(DataSet: TDataSet); begin if trim(t_op_airtruck.FieldByName('委托单位').asstring)='' then raise exception.Create('车队名称不能为空,不能保存!'); table_before_post(t_op_airtruck,'操作员'); table_before_post(t_op_airtruck,'揽货人'); // table_before_post(t_op_airtruck,'客服员'); // table_before_post(t_op_airtruck,'主提单号'); // table_before_post(t_op_airtruck,'分提单号'); table_before_post(t_op_airtruck,'发车日期'); table_before_post(t_op_airtruck,'业务来源'); // table_before_post(t_op_airtruck,'销售部门'); // table_before_post(t_op_airtruck,'操作部门'); if op_empty('t_op_airtruck',t_op_airtruck) then abort; if Trim(frm_data_share.t_sys_noset.fieldbyname('出号规则').Asstring)='自动取号' then if t_op_airtruck.FieldByName('委托编号').IsNull or (trim(t_op_airtruck['委托编号'])='') then if Trim(frm_data_share.t_sys_noset.fieldbyname('日期规则').Asstring)='会计期间' then t_op_airtruck['委托编号']:=getwtno(5,subComp,department,employee,t_op_airtruck['会计期间']) else t_op_airtruck['委托编号']:=getwtno(5,subComp,department,employee,t_op_airtruck['发车日期']); if t_op_airtruck.fieldbyname('发车日期').oldvalue<>t_op_airtruck.fieldbyname('发车日期').asdatetime then if (t_op_airtruck.fieldbyname('业务类型').asstring<>'更改单') and (Logininfo.endday>=t_op_airtruck.fieldbyname('发车日期').asdatetime) then begin showmessage('此发车日期所在期间已月末结账,不能添加修改业务!!'); abort; end; if t_op_airtruck.FieldByName('委托单位').OldValue<>t_op_airtruck.FieldByName('委托单位').asstring then begin if frm_data_share.t_crm_client_all.Locate('客户简称',t_op_airtruck.FieldByName('委托单位').asstring,[])then begin if frm_data_share.t_crm_client_all.fieldbyname('客户状态').asstring='封存客户'then begin showmessage('当前业务委托单位已经封存,不能再进行业务合作,如需合作请进行恢复客户操作!'); abort; end; end; end; if t_op_airtruck.State=dsinsert then begin if t_op_airtruck.fieldbyname('业务编号').asstring=''then begin t_op_airtruck['业务编号']:=get_no(t_op_airtruck.fieldbyname('会计期间').AsDateTime,getbsno(Logininfo.AirTruckBsNo,'IT')); t_op_airtruck['编号']:=get_id; t_op_airtruck['主编号']:=t_op_airtruck['编号']; end; t_op_airtruck['业务状态']:='接受委托'; t_op_airtruck['费用状态']:='录入状态'; end; if strtobool(get_parameters_value(43,'false')) then begin if (trim(t_op_airtruck.fieldbyname('主提单号').asstring)='') or (t_op_airtruck.fieldbyname('业务类型').asstring='更改单') then begin t_op_airtruck['主提单标准']:=t_op_airtruck['编号']; end else begin t_op_airtruck['主提单标准']:=t_op_airtruck['主提单号']; end; end else begin t_op_airtruck['主提单标准']:=t_op_airtruck['编号']; end; if strtobool(get_parameters_value(44,'false')) then begin if (trim(t_op_airtruck.fieldbyname('分提单号').asstring)='') or (t_op_airtruck.fieldbyname('业务类型').asstring='更改单') then begin t_op_airtruck['分提单标准']:=t_op_airtruck['编号']; end else begin t_op_airtruck['分提单标准']:=t_op_airtruck['分提单号']; end; end else begin t_op_airtruck['分提单标准']:=t_op_airtruck['编号']; end; if strtobool(get_parameters_value(45,'false')) then begin if (trim(t_op_airtruck.fieldbyname('委托编号').asstring)='') or (t_op_airtruck.fieldbyname('业务类型').asstring='更改单') then begin t_op_airtruck['委托标准']:=t_op_airtruck['编号']; end else begin t_op_airtruck['委托标准']:=t_op_airtruck['委托编号']; end; end else begin t_op_airtruck['委托标准']:=t_op_airtruck['编号']; end; // t_op_airtruck['upload']:=1; end; procedure Tfrm_op_airtruck2.RxDBLookupCombo12Change(Sender: TObject); begin if (t_op_airtruck.state=dsinsert)or(t_op_airtruck.state=dsedit)then begin if RxDBLookupCombo12.DisplayValue='' then exit; if frm_data_share.t_sys_employee.locate('姓名',RxDBLookupCombo12.DisplayValue,[]) then t_op_airtruck['销售部门']:=frm_data_share.t_sys_employee['部门名称']; end; end; procedure Tfrm_op_airtruck2.RxDBLookupCombo8Change(Sender: TObject); begin if (t_op_airtruck.state=dsinsert)or(t_op_airtruck.state=dsedit)then begin if RxDBLookupCombo8.DisplayValue='' then exit; if frm_data_share.t_sys_employee.locate('姓名',RxDBLookupCombo8.DisplayValue,[]) then t_op_airtruck['操作部门']:=frm_data_share.t_sys_employee['部门名称']; end; end ; procedure Tfrm_op_airtruck2.N17Click(Sender: TObject); begin t_op_airtruck.Close; t_op_airtruck.SQL.clear; t_op_airtruck.SQL.Add('select * from t_op_airtruck where ' +open_data('0005','录入人','操作员','客服员','no','no') +' and 编号 in (select distinct 编号 from t_ch_fee where 费用状态=' +''''+'录入状态'+''''+') ' +' order by 业务编号 '); t_op_airtruck.open; end; procedure Tfrm_op_airtruck2.N34Click(Sender: TObject); begin t_op_airtruck.Close; t_op_airtruck.SQL.clear; t_op_airtruck.SQL.Add('select * from t_op_airtruck where ' +open_data('0005','录入人','操作员','客服员','no','no') +' and 编号 in (select distinct 编号 from t_ch_fee where 费用状态 in (' +''''+'驳回提交'+''''+','+''''+'禁止修改'+''''+','+''''+'禁止删除'+''''+')) ' +' order by 业务编号 '); t_op_airtruck.open; end; procedure Tfrm_op_airtruck2.N36Click(Sender: TObject); begin t_op_airtruck.Close; t_op_airtruck.SQL.clear; t_op_airtruck.SQL.Add('select * from t_op_airtruck where ' +open_data('0005','录入人','操作员','客服员','no','no') +' and 编号 in (select distinct 编号 from t_ch_fee where 费用状态 in (' +''''+'提交审核'+''''+','+''''+'申请修改'+''''+','+''''+'申请删除'+''''+')) ' +' order by 业务编号 '); t_op_airtruck.open; end; procedure Tfrm_op_airtruck2.N37Click(Sender: TObject); begin t_op_airtruck.Close; t_op_airtruck.SQL.clear; t_op_airtruck.SQL.Add('select * from t_op_airtruck where ' +open_data('000','录入人','操作员','客服员','no','no') +' and 编号 in (select distinct 编号 from t_op_state where 是否完成<>1) ' +' order by 业务编号 '); t_op_airtruck.open; end; procedure Tfrm_op_airtruck2.N9Click(Sender: TObject); begin t_op_airtruck.Close; t_op_airtruck.SQL.clear; t_op_airtruck.SQL.Add('select * from t_op_airtruck where ' +open_data('0005','录入人','操作员','客服员','no','no') +' and 费用状态<>'+''''+'费用封帐'+'''' +' and 编号 not in (select distinct 编号 from t_ch_fee where 类型='+''''+'收'+''''+')' +' order by 业务编号 '); t_op_airtruck.open; end; procedure Tfrm_op_airtruck2.N20Click(Sender: TObject); begin t_op_airtruck.Close; t_op_airtruck.SQL.clear; t_op_airtruck.SQL.Add('select * from t_op_airtruck where ' +open_data('0005','录入人','操作员','客服员','no','no') +' and 费用状态<>'+''''+'费用封帐'+'''' +' and 编号 not in (select distinct 编号 from t_ch_fee where 类型='+''''+'付'+''''+')' +' order by 业务编号 '); t_op_airtruck.open; end; procedure Tfrm_op_airtruck2.t_op_airtruckBeforeDelete(DataSet: TDataSet); begin if t_op_airtruckdetail.RecordCount>0 then raise exception.Create('请先删除有分票!'); op_befor_post(t_op_airtruck,'0005'); if not t_op_airtruck.FieldByName('委托编号').IsNull then delwtno(t_op_airtruck['委托编号']); // delete_add(4,t_op_airi); end; procedure Tfrm_op_airtruck2.t_op_airtruckBeforeCancel(DataSet: TDataSet); begin delete_no(t_op_airtruck); if t_op_airtruck.State=dsinsert then if not t_op_airtruck.FieldByName('委托编号').IsNull then delwtno(t_op_airtruck['委托编号']); end; procedure Tfrm_op_airtruck2.N21Click(Sender: TObject); begin t_op_airtruck.Close; t_op_airtruck.SQL.clear; t_op_airtruck.SQL.Add('select * from t_op_airtruck where ' +open_data('0005','录入人','操作员','客服员','no','no') +' and 费用状态<>'+''''+'费用封帐'+'''' +' and 编号 not in (select distinct 编号 from t_ch_fee )' +' order by 业务编号 '); t_op_airtruck.open; end; procedure Tfrm_op_airtruck2.N24Click(Sender: TObject); begin t_op_airtruck.Close; t_op_airtruck.SQL.clear; t_op_airtruck.SQL.Add('select * from t_op_airtruck where ' +open_data('0005','录入人','操作员','客服员','no','no') +' and 费用状态<>'+''''+'费用封帐'+'''' +' and 编号 in (select distinct 编号 from t_ch_fee where 费用状态<>'+''''+'结算完毕'+''''+')' +' order by 业务编号 '); t_op_airtruck.open; end; procedure Tfrm_op_airtruck2.N26Click(Sender: TObject); begin if t_op_airtruck.IsEmpty then exit; if not do_data('0005',t_op_airtruck.FieldByName('录入人').asstring ,t_op_airtruck.FieldByName('操作员').asstring ,t_op_airtruck.FieldByName('揽货人').asstring ,t_op_airtruck.FieldByName('客服员').asstring ,'','') then begin showmessage('对不起你无权修改此数据!'); abort; end; if t_op_airtruck.FieldByName('业务状态').asstring='业务封帐' then begin showmessage('此票业务状态已经为业务封帐状态,不能修改!'); abort; end; if t_op_airtruck1=nil then exit; if (t_op_airtruck.State=dsinsert)or(t_op_airtruck.State=dsedit) then t_op_airtruck.post; try frm_op_date_change:=tfrm_op_date_change.Create (self); frm_op_date_change.DataSource1.Enabled:=false; frm_op_date_change.DataSource1.DataSet:=t_op_airtruck1.DataSet; frm_op_date_change.DataSource1.Enabled:=true; frm_op_date_change.ShowModal; finally frm_op_date_change.Free; frm_op_date_change:=nil; end; end; procedure Tfrm_op_airtruck2.bsSkinButton14Click(Sender: TObject); begin if not t_op_airtruck.Active then exit; if t_op_airtruck.IsEmpty then exit; if t_op_airtruckdetail.State in [dsedit,dsinsert] then t_op_airtruckdetail.Post; end; procedure Tfrm_op_airtruck2.bsSkinButton15Click(Sender: TObject); begin t_op_airtruckdetail.Delete; end; procedure Tfrm_op_airtruck2.bsSkinButton16Click(Sender: TObject); begin t_op_airtruckdetail.Cancel; end; procedure Tfrm_op_airtruck2.t_op_airtruckdetailAfterInsert( DataSet: TDataSet); begin t_op_airtruckdetail['随机文件']:=0; //随机文件 t_op_airtruckdetail['装运方式']:='分票'; //监管车 t_op_airtruckdetail['包装类型']:='监管货'; // t_op_airtruckdetail['LOT号']:=t_op_airtruck['LOT号']; //监管车 t_op_airtruckdetail['主编号']:=t_op_airtruck['编号']; t_op_airtruckdetail['会计期间']:=t_op_airtruck['会计期间']; t_op_airtruckdetail['录入人']:=t_op_airtruck['录入人']; t_op_airtruckdetail['录入日期']:=t_op_airtruck['录入日期']; t_op_airtruckdetail['操作员']:=t_op_airtruck['操作员']; t_op_airtruckdetail['客服员']:=t_op_airtruck['客服员']; t_op_airtruckdetail['是否解锁']:=False; t_op_airtruckdetail['是否通关']:=true; //自动计算 t_op_airtruckdetail['发车日期']:=t_op_airtruck['发车日期']; if t_op_airtruckdetail.FieldByName('委托编号').IsNull or (trim(t_op_airtruckdetail['委托编号'])='') then t_op_airtruckdetail['委托编号']:=t_op_airtruck['委托编号']; if t_op_airtruckdetail.fieldbyname('发车日期').oldvalue<>t_op_airtruckdetail.fieldbyname('发车日期').asdatetime then if t_op_airtruckdetail.State=dsinsert then begin if t_op_airtruckdetail.fieldbyname('业务编号').asstring=''then begin t_op_airtruckdetail['业务编号']:=get_no(t_op_airtruck.fieldbyname('会计期间').AsDateTime,getbsno(Logininfo.AirTruckBsNo,'IT')); t_op_airtruckdetail['编号']:=get_id; end; t_op_airtruckdetail['业务状态']:='接受委托'; t_op_airtruckdetail['费用状态']:='录入状态'; end; end; procedure Tfrm_op_airtruck2.bsSkinButton23Click(Sender: TObject); begin if not t_op_airtruck.Active then exit; if t_op_airtruck.IsEmpty then exit; end; procedure Tfrm_op_airtruck2.bsSkinButton24Click(Sender: TObject); begin if not t_op_airtruck.Active then exit; if t_op_airtruck.IsEmpty then exit; end; procedure Tfrm_op_airtruck2.t_op_airtruckdetailAfterPost(DataSet: TDataSet); var aQuery:TAdoQuery; pkgs,kgs,cbm:double; begin aQuery:=CreateAdoQuery; try with aQuery do begin Close;SQL.Clear; sql.Add('select sum(件数) as 件数,sum(重量) as 重量,sum(尺码) as 尺码 from t_op_airtruck where 主编号='''+t_op_airtruckdetail.fieldbyname('主编号').AsString+''''); sql.Add('and 编号<>'''+Dataset.fieldbyname('主编号').AsString+''''); open; pkgs:=fieldbyname('件数').AsFloat; kgs:=fieldbyname('重量').AsFloat; cbm:=fieldbyname('尺码').AsFloat; if not IsEmpty then begin t_op_airtruck.Edit; t_op_airtruck.fieldbyname('件数').AsFloat:=pkgs; t_op_airtruck.fieldbyname('重量').AsFloat:=kgs; t_op_airtruck.fieldbyname('尺码').AsFloat:=cbm; t_op_airtruck.post; // close;sql.clear; // sql.Add('update t_op_airtruck set 件数='+floattostr(pkgs)+',重量='+floattostr(kgs)+',尺码='+floattostr(cbm)+' where 编号='''+Dataset.fieldbyname('编号').AsString+''''); // ExecSQL; end; end; finally FreeAndNil(aQuery); end; // t_op_airtruck.Refresh ; // wwDBGrid1.Refresh ; end; procedure Tfrm_op_airtruck2.t_op_airtruckdetailBeforeInsert( DataSet: TDataSet); begin if t_op_airtruck.FieldByName('业务状态').AsString='业务封帐' then begin showmessage('此票业务状态已经为业务封帐状态,不能修改!'); abort; end; if t_op_airtruck.State in [dsedit,dsinsert] then t_op_airtruck.Post ; end; procedure Tfrm_op_airtruck2.bsSkinPageControl1Change(Sender: TObject); var inifile1:Tinifile; begin if not airtruckopen then exit; if bsSkinPageControl1.ActivePage<>bsSkinTabSheet1 then begin if t_op_airtruck.State in [dsedit,dsinsert] then t_op_airtruck.Post; end else begin t_op_airtruck.Refresh; end; inifile1:=Tinifile.Create(ExtractFilePath(application.ExeName)+'main.ini'); if strtoint(get_parameters_value(197,'0'))<>0 then fra_fee1.bsSkinComboBox1.ItemIndex:=strtoint(get_parameters_value(197,'0'))-1 else fra_fee1.bsSkinComboBox1.ItemIndex:=inifile1.ReadInteger('FEE','FEEVAT',0); inifile1.Free; end; procedure Tfrm_op_airtruck2.bsSkinButton9Click(Sender: TObject); begin sys_print('监管车业务',2,t_op_airtruck1,t_op_airtruckdetail1,nil,nil,nil,nil,nil,nil,nil,nil,nil); end; procedure Tfrm_op_airtruck2.bsSkinButton44Click(Sender: TObject); var str,airepsqlstr:widestring; begin //快捷查询 str:=''; str:=query_tiaojian(1,str,'t_op_airtruck.业务编号','模糊',Edit1.text); str:=query_tiaojian(1,str,'t_op_airtruck.委托编号','模糊',Edit4.text); str:=query_tiaojian(1,str,'t_op_airtruck.LOT号','模糊',Edit2.text); if trim(str)='' then begin str:='where '+open_data('0006','t_op_airtruck.录入人', 't_op_airtruck.操作员','t_op_airtruck.客服员','no','no'); end else begin str:=str+' and '+open_data('0006','t_op_airtruck.录入人', 't_op_airtruck.操作员','t_op_airtruck.客服员','no','no'); end; str:='select * from t_op_airtruck where 编号=编号 and 编号 in (select 编号 from t_op_airtruck ' +str+')';//;+default_sort(55,'t_op_airtruck','','desc'); if (not t_op_airtruck.IsEmpty) and (t_op_airtruck.sql.Text<>'') then t_op_airtruck.close; t_op_airtruck.sql.clear; t_op_airtruck.sql.add(str); t_op_airtruck.Open; if t_op_airtruck.IsEmpty then begin showmessage('没有检索出所需数据!!'); exit; end ; end; procedure Tfrm_op_airtruck2.bsSkinButton2Click(Sender: TObject); begin table_post(t_op_airtruck); end; procedure Tfrm_op_airtruck2.fra_fee1bsSkinButton2Click(Sender: TObject); begin fra_fee1.bsSkinButton2Click(Sender); end; procedure Tfrm_op_airtruck2.fra_fee1bsSkinButton20Click(Sender: TObject); begin fra_fee1.bsSkinButton20Click(Sender); end; procedure Tfrm_op_airtruck2.fra_fee1bsSkinButton9Click(Sender: TObject); begin fra_fee1.bsSkinButton9Click(Sender); end; procedure Tfrm_op_airtruck2.t_op_airtruckdetailBeforeDelete( DataSet: TDataSet); begin // if qryjcz.RecordCount>0 then raise exception.Create('请先删除尺码!'); // if t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean then // raise exception.Create('请先解锁') ; if t_op_airtruck.FieldByName('业务状态').AsString='业务封帐' then begin showmessage('此票业务状态已经为业务封帐状态,不能删除!'); abort; end; end; procedure Tfrm_op_airtruck2.bsSkinButton7Click(Sender: TObject); var ANode: TdxTreeListNode; begin ANode:=dxDBTreeList1.FocusedNode.GetPrevSibling; if ANode=nil then exit ; t_op_airtruck.Locate('编号',ANode.Strings[1],[]) ; end; procedure Tfrm_op_airtruck2.bsSkinButton6Click(Sender: TObject); var ANode: TdxTreeListNode; begin ANode:=dxDBTreeList1.FocusedNode.GetNextSibling; if ANode=nil then exit ; t_op_airtruck.Locate('编号',ANode.Strings[1],[]) ; end; procedure Tfrm_op_airtruck2.bsSkinButton10Click(Sender: TObject); begin try frm_op_airtruck_query2:=tfrm_op_airtruck_query2.Create (application); airtruck_query_limited2:='no'; airtruck_query_table2:=1; frm_op_airtruck_query2.ShowModal; finally frm_op_airtruck_query2.Free; end; end; procedure Tfrm_op_airtruck2.bsSkinButton3Click(Sender: TObject); begin if t_op_airtruck.State in [dsedit,dsinsert] then t_op_airtruck.Cancel ; end; procedure Tfrm_op_airtruck2.DBEdit1KeyPress(Sender: TObject; var Key: Char); begin key_wwDBDateTimePicker(Key,wwDBDateTimePicker2); end; procedure Tfrm_op_airtruck2.wwDBDateTimePicker2KeyPress(Sender: TObject; var Key: Char); begin DBComboBox1.SetFocus; end; procedure Tfrm_op_airtruck2.RxDBLookupCombo12KeyPress(Sender: TObject; var Key: Char); begin key_RxDBLookupCombo(Key,RxDBLookupCombo8); end; procedure Tfrm_op_airtruck2.RxDBLookupCombo8KeyPress(Sender: TObject; var Key: Char); begin key_RxDBLookupCombo(Key,RxDBLookupCombo1); end; procedure Tfrm_op_airtruck2.RxDBLookupCombo1KeyPress(Sender: TObject; var Key: Char); begin key_DBEdit(Key,DBEdit16); end; procedure Tfrm_op_airtruck2.DBEdit90000KeyPress(Sender: TObject; var Key: Char); begin key_DBEdit(Key,DBEdit7); end; procedure Tfrm_op_airtruck2.DBEdit7KeyPress(Sender: TObject; var Key: Char); begin key_DBEdit(Key,DBEdit5); end; procedure Tfrm_op_airtruck2.DBEdit5KeyPress(Sender: TObject; var Key: Char); begin key_RxDBLookupCombo(Key,RxDBLookupCombo1); end; procedure Tfrm_op_airtruck2.DBEdit16KeyPress(Sender: TObject; var Key: Char); begin key_DBEdit(Key,DBEdit17); end; procedure Tfrm_op_airtruck2.DBComboBox1KeyPress(Sender: TObject; var Key: Char); begin if key=#13 then RxDBLookupCombo12.SetFocus ; end; procedure Tfrm_op_airtruck2.Datasetjzccharge(Sender: TField); var tjweight,jfweight:real ; chang,kuan,gao,jian:real; begin { if Sender.DataSet.IsEmpty then exit ; if Sender.DataSet.state in [dsedit,dsinsert] then begin try Sender.DataSet.FieldByName('尺码').OnChange:=nil; tjweight:=s_w(strtoint(apointnum), Sender.DataSet.fieldbyname('长').asfloat *(Sender.DataSet.fieldbyname('宽').asfloat) *Sender.DataSet.fieldbyname('高').asfloat *Sender.DataSet.fieldbyname('件数').asfloat/100/100/100); if Sender.DataSet.fieldbyname('尺码').asfloat=0 then Sender.DataSet.fieldbyname('尺码').asfloat:=tjweight ; if tjweightSender.DataSet.FieldByName('重量').AsFloat then Sender.DataSet.FieldByName('计费重').AsFloat:=tjweight else Sender.DataSet.FieldByName('计费重').AsFloat:=Sender.DataSet.fieldbyname('重量').AsFloat ; finally Sender.DataSet.FieldByName('长').OnChange:=Datasetjzccharge; Sender.DataSet.FieldByName('宽').OnChange:=Datasetjzccharge; Sender.DataSet.FieldByName('高').OnChange:=Datasetjzccharge; Sender.DataSet.FieldByName('件数').OnChange:=Datasetjzccharge; Sender.DataSet.FieldByName('尺码').OnChange:=Datasetjzccharge; end; end; }end; procedure Tfrm_op_airtruck2.RxDBLookupCombo1Change(Sender: TObject); begin if t_op_airtruck1.DataSet=nil then exit; if (t_op_airtruck1.DataSet.state=dsinsert)or(t_op_airtruck1.DataSet.state=dsedit)then begin t_crm_client_linkman.Close ; t_crm_client_linkman.Parameters.ParamByName('khjc').Value:=RxDBLookupCombo1.Value ; t_crm_client_linkman.Open ; if t_crm_client_linkman.RecordCount>0 then begin t_crm_client_linkman.First ; DBEdit16.Text:=t_crm_client_linkman.fieldbyname('姓名').AsString ; DBEdit17.Text:=t_crm_client_linkman.fieldbyname('手机').AsString ; end ; end ; end; procedure Tfrm_op_airtruck2.Notebook1PageChanged(Sender: TObject); begin if Notebook1.ActivePage='detail' then Opendetail end; procedure Tfrm_op_airtruck2.Opendetail; begin t_op_airtruckdetail.close ; t_op_airtruckdetail.Parameters.ParamByName('编号').Value:=t_op_airtruck.fieldbyname('主编号').AsString ; t_op_airtruckdetail.Open ; qryjcz.Open ; end; procedure Tfrm_op_airtruck2.t_op_airtruckdetailDSDesigner32Change( Sender: TField); begin Datasetjzccharge(sender) ; end; procedure Tfrm_op_airtruck2.bsSkinButton17Click(Sender: TObject); begin if not t_op_airtruck.Active then exit; if t_op_airtruck.IsEmpty then exit; if t_op_airtruck.State in [dsedit,dsinsert] then t_op_airtruck.Post ; t_op_airtruckdetail.Insert; end; procedure Tfrm_op_airtruck2.bsSkinButtonmtzClick(Sender: TObject); var i,j:integer ; scaption:string ; begin frm_sys_grid_cx:=Tfrm_sys_grid_cx.create(application); frm_sys_grid_cx.CheckListBox1.Items.Clear ; for i:=0 to dxDBTreeList1.ColumnCount-1 do begin frm_sys_grid_cx.CheckListBox1.Items.Add(dxDBTreeList1.Columns[i].Caption) ; j:=frm_sys_grid_cx.CheckListBox1.Items.Count-1 ; frm_sys_grid_cx.CheckListBox1.Checked[j]:=dxDBTreeList1.Columns[i].Visible; end ; frm_sys_grid_cx.showmodal ; if frm_sys_grid_cx.modalresult=mrok then begin dxDBTreeList1.BeginUpdate ; for i:=0 to dxDBTreeList1.ColumnCount-1 do dxDBTreeList1.Columns[i].Visible:=false ; for i:=0 to frm_sys_grid_cx.CheckListBox1.Items.Count-1 do begin if frm_sys_grid_cx.CheckListBox1.Checked[i] then begin for j:=0 to dxDBTreeList1.ColumnCount-1 do begin scaption:=frm_sys_grid_cx.CheckListBox1.items[i] ; if dxDBTreeList1.Columns[j].Caption=scaption then dxDBTreeList1.Columns[j].Visible:=true ; end; end ; end ; end ; dxDBTreeList1.EndUpdate ; frm_sys_grid_cx.free ; end; procedure Tfrm_op_airtruck2.bsSkinButtonsuoClick(Sender: TObject); begin t_op_airtruckdetail.edit ; t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean:=not t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean ; t_op_airtruckdetail.Post ; end; procedure Tfrm_op_airtruck2.t_op_airtruckdetail1DataChange(Sender: TObject; Field: TField); begin if t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean then bsSkinButtonsuo.Caption:='解锁' else bsSkinButtonsuo.Caption:='锁定' ; cxGrid2DBTableView1.OptionsData.Editing:=not t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean ; cxGrid2DBTableView1.OptionsData.Deleting:=not t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean ; cxGrid2DBTableView1.OptionsData.Appending:=not t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean ; cxGrid2DBTableView1.OptionsData.Inserting:=not t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean ; RxDBLookupCombo3.ReadOnly:=t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean ; DBEdit6.ReadOnly:=t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean ; chlautocal.ReadOnly:=t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean ; DBEdit11.ReadOnly:=t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean ; DBEdit12.ReadOnly:=t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean ; RxDBLookupCombo4.ReadOnly:=t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean ; RxDBLookupCombo10.ReadOnly:=t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean ; DBEdit21.ReadOnly:=t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean ; DBDateEdit1.ReadOnly:=t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean ; RxDBLookupCombo5.ReadOnly:=t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean ; RxDBLookupCombo14.ReadOnly:=t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean ; DBEdit22.ReadOnly:=t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean ; RxDBLookupCombo9.ReadOnly:=t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean ; bsSkinButton12.Enabled:=not t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean ; btndelete.Enabled:=not t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean ; DBEdit19.ReadOnly:=t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean ; DBEdit20.ReadOnly:=t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean ; end; procedure Tfrm_op_airtruck2.dxDBTreeList1CustomDrawCell(Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean; var AText: String; var AColor: TColor; AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean); begin if ANode.HasChildren then AFont.Color:=clNavy ; end; function Tfrm_op_airtruck2.getheight: integer; var str:string ; inifile1:Tinifile; begin result:=900 ; if not DirectoryExists(ExtractFilePath(Application.ExeName)+'gridini') then CreateDir(ExtractFilePath(Application.ExeName)+'gridini'); str:=ExtractFilePath(application.ExeName)+'gridini\'+caption+'cxgrid'+'.ini' ; try inifile1:=Tinifile.Create(str); mxfpwidth:=inifile1.readInteger('truckcxgrid1','cxgridheight',900); findfpwidth:=inifile1.readInteger('truckcxgrid1','cxgridheight2',800); inifile1.Free ; except end ; end; function Tfrm_op_airtruck2.saveheight: integer; var str:string ; inifile1:Tinifile; begin if not DirectoryExists(ExtractFilePath(Application.ExeName)+'gridini') then CreateDir(ExtractFilePath(Application.ExeName)+'gridini'); str:=ExtractFilePath(application.ExeName)+'gridini\'+caption+'cxgrid'+'.ini' ; try inifile1:=Tinifile.Create(str); inifile1.WriteInteger('truckcxgrid1','cxgridheight',Panel3.Width); inifile1.WriteInteger('truckcxgrid1','cxgridheight2',Panel6.Width); inifile1.Free ; except end ; end; procedure Tfrm_op_airtruck2.DBEdit12KeyPress(Sender: TObject; var Key: Char); begin if (key<>#13)and(t_op_airtruckdetail.State in [dsedit,dsinsert]) then begin chlautocal.Checked:=false ; end else if key=#13 then begin getweight ; DBEdit23.SetFocus ; end ; end; procedure Tfrm_op_airtruck2.bsSkinButton12Click(Sender: TObject); begin if t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean then raise exception.Create('请先解锁'); qryjcz.Append ; end; procedure Tfrm_op_airtruck2.btndeleteClick(Sender: TObject); begin if t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean then raise exception.Create('请先解锁'); if MessageDlg('确定删除当前尺码?',mtWarning,[mbyes,mbno],0)<>mryes then exit; qryjcz.Delete ; end; procedure Tfrm_op_airtruck2.btnpostClick(Sender: TObject); begin if qryjcz.State in [dsinsert,dsedit] then qryjcz.Post ; end; procedure Tfrm_op_airtruck2.btncancelClick(Sender: TObject); begin if qryjcz.State in [dsinsert,dsedit] then qryjcz.Cancel ; end; procedure Tfrm_op_airtruck2.qryjczBeforeEdit(DataSet: TDataSet); begin if t_op_airtruck.FieldByName('业务状态').AsString='业务封帐' then begin showmessage('此票业务状态已经为业务封帐状态,不能修改!'); abort; end; if t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean then raise exception.Create('请先解锁') ; end; procedure Tfrm_op_airtruck2.qryjczAfterPost(DataSet: TDataSet); var tjweight,jfweight:real ; chang,kuan,gao,jian:real; bianhao:string ; begin getweight; end; procedure Tfrm_op_airtruck2.DBEdit6KeyPress(Sender: TObject; var Key: Char); begin if key=#13 then chlautocal.SetFocus ; end; procedure Tfrm_op_airtruck2.chlautocalKeyPress(Sender: TObject; var Key: Char); begin if key=#13 then DBEdit10.SetFocus ; end; procedure Tfrm_op_airtruck2.DBEdit11KeyPress(Sender: TObject; var Key: Char); begin if key=#13 then begin if not chlautocal.Checked then getweight; DBEdit12.SetFocus ; DBEdit12.SelectAll ; end ; end; procedure Tfrm_op_airtruck2.getweight; var tjweight,jfweight,grweight:real ; // 体积重 计费重 毛重 chang,kuan,gao,jian,chima:real; bianhao:string ; begin bianhao:=t_op_airtruckdetail.fieldbyname('编号').asstring ; tjweight:=0 ; jfweight:=0 ; grweight:=0 ; if not qryjcz.Active then qryjcz.Open ; if qryjcz.RecordCount<=0 then begin chang:=0; kuan:=0; gao:=0; jian:=0; chima:=0; end else begin qryjczsum.Close ; qryjczsum.Open ; if not qryjczsum.isempty then begin chang:=qryjczsum.fieldbyname('chang').AsFloat ; kuan:=qryjczsum.fieldbyname('kuan').AsFloat ; gao:=qryjczsum.fieldbyname('gao').AsFloat ; jian:=qryjczsum.fieldbyname('jianshu').AsFloat ; chima:=qryjczsum.fieldbyname('chima').AsFloat ; end ; end ; t_op_airtruckdetail.Edit ; t_op_airtruckdetail.FieldByName('长').AsFloat:=chang; t_op_airtruckdetail.FieldByName('宽').AsFloat:=kuan; t_op_airtruckdetail.FieldByName('高').AsFloat:=gao; t_op_airtruckdetail.FieldByName('是否通关').AsBoolean:=chlautocal.Checked; if (chlautocal.Checked) then //自动计算 begin tjweight:=s_w(strtoint(apointnum),chima); t_op_airtruckdetail.FieldByName('尺码').AsFloat:=chima; t_op_airtruckdetail.FieldByName('件数').AsFloat:=jian; end else begin tjweight:=strtofloat(DBEdit12.text) ; // 录入尺码 end ; grweight:=strtofloat(DBEdit11.text) ; // 毛重 tjweight:=s_w(0,tjweight*167); // 体积重 grweight:=s_w(0,grweight); // 毛重 t_op_airtruckdetail.FieldByName('体积重').AsFloat:=round(tjweight*100)/100 ; if tjweight>grweight then //体积重 > 毛重 t_op_airtruckdetail.FieldByName('重量').AsFloat:=round(tjweight*100)/100 // 此处 重量 与 计费重字段 互换 可以不改 fra_fee else t_op_airtruckdetail.FieldByName('重量').AsFloat:=round(grweight*100)/100 ; t_op_airtruckdetail.Post ; t_op_airtruckdetail.Locate('编号',bianhao,[]); end; procedure Tfrm_op_airtruck2.qryjczAfterInsert(DataSet: TDataSet); begin qryjcz.FieldByName('编号').AsString:=t_op_airtruckdetail.fieldbyname('编号').AsString ; end; procedure Tfrm_op_airtruck2.t_op_airtruckdetailBeforeEdit( DataSet: TDataSet); begin // if t_op_airtruckdetail.FieldByName('是否解锁').AsBoolean then // raise exception.Create('请先解锁') ; if t_op_airtruck.FieldByName('业务状态').AsString='业务封帐' then begin showmessage('此票业务状态已经为业务封帐状态,不能修改!'); abort; end; end; procedure Tfrm_op_airtruck2.fra_fee1bsSkinButton3Click(Sender: TObject); begin fra_fee1.bsSkinButton3Click(Sender); end; procedure Tfrm_op_airtruck2.bsSkinBtnpriorClick(Sender: TObject); begin t_op_airtruckdetail.Prior ; end; procedure Tfrm_op_airtruck2.bsSkinBtnnextClick(Sender: TObject); begin t_op_airtruckdetail.Next ; end; procedure Tfrm_op_airtruck2.cxGrid1DBTableView1CustomDrawCell( Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); var js:boolean ; begin // if AViewInfo.Selected then exit ; // js:=VarAsType(AViewInfo.GridRecord.DisplayTexts[cxGrid1DBTableView1DBColumn73.Index],varboolean); // if js then ACanvas.Canvas.Brush.Color := clYellow ; end; procedure Tfrm_op_airtruck2.bsSkinButtonttClick(Sender: TObject); var i,j:integer ; scaption:string ; begin frm_sys_grid_cx:=Tfrm_sys_grid_cx.create(application); frm_sys_grid_cx.CheckListBox1.Items.Clear ; for i:=0 to cxGrid1DBTableView1.ColumnCount-1 do begin frm_sys_grid_cx.CheckListBox1.Items.Add(cxGrid1DBTableView1.Columns[i].Caption) ; j:=frm_sys_grid_cx.CheckListBox1.Items.Count-1 ; frm_sys_grid_cx.CheckListBox1.Checked[j]:=cxGrid1DBTableView1.Columns[i].Visible; end ; frm_sys_grid_cx.showmodal ; if frm_sys_grid_cx.modalresult=mrok then begin cxGrid1DBTableView1.BeginUpdate ; for i:=0 to cxGrid1DBTableView1.ColumnCount-1 do cxGrid1DBTableView1.Columns[i].Visible:=false ; for i:=0 to frm_sys_grid_cx.CheckListBox1.Items.Count-1 do begin if frm_sys_grid_cx.CheckListBox1.Checked[i] then begin for j:=0 to cxGrid1DBTableView1.ColumnCount-1 do begin scaption:=frm_sys_grid_cx.CheckListBox1.items[i] ; if cxGrid1DBTableView1.Columns[j].Caption=scaption then cxGrid1DBTableView1.Columns[j].Visible:=true ; end; end ; end ; end ; cxGrid1DBTableView1.EndUpdate ; frm_sys_grid_cx.free ; end; procedure Tfrm_op_airtruck2.bsSkinButtonprintClick(Sender: TObject); begin sys_print('监管车业务分票',2,t_op_airtruck1,t_op_airtruckdetail1,dsrjcz,nil,nil,nil,nil,nil,nil,nil,nil); end; procedure Tfrm_op_airtruck2.DBEdit19KeyPress(Sender: TObject; var Key: Char); begin if key=#13 then RxDBLookupCombo4.SetFocus ; end; procedure Tfrm_op_airtruck2.DBEdit20KeyPress(Sender: TObject; var Key: Char); begin if key=#13 then DBEdit19.SetFocus ; end; procedure Tfrm_op_airtruck2.wwDBLookupCombo4KeyPress(Sender: TObject; var Key: Char); begin if key=#13 then RxDBLookupCombo10.SetFocus ; end; procedure Tfrm_op_airtruck2.RxDBLookupCombo10KeyPress(Sender: TObject; var Key: Char); begin if key=#13 then DBEdit21.SetFocus ; end; procedure Tfrm_op_airtruck2.DBEdit21KeyPress(Sender: TObject; var Key: Char); begin if key=#13 then DBDateEdit1.SetFocus ; end; procedure Tfrm_op_airtruck2.DBDateEdit1KeyPress(Sender: TObject; var Key: Char); begin if key=#13 then RxDBLookupCombo5.SetFocus ; end; procedure Tfrm_op_airtruck2.wwDBLookupCombo5KeyPress(Sender: TObject; var Key: Char); begin if key=#13 then RxDBLookupCombo14.SetFocus ; end; procedure Tfrm_op_airtruck2.RxDBLookupCombo14KeyPress(Sender: TObject; var Key: Char); begin if key=#13 then DBEdit22.SetFocus; end; procedure Tfrm_op_airtruck2.DBEdit22KeyPress(Sender: TObject; var Key: Char); begin if key=#13 then RxDBLookupCombo9.SetFocus ; end; procedure Tfrm_op_airtruck2.RxDBLookupCombo9KeyPress(Sender: TObject; var Key: Char); begin if key=#13 then cxGrid2.SetFocus ; end; procedure Tfrm_op_airtruck2.DBEdit23KeyPress(Sender: TObject; var Key: Char); begin if key=#13 then DBEdit20.SetFocus ; end; procedure Tfrm_op_airtruck2.bsSkinButtonfindClick(Sender: TObject); begin fenpiaofind ; end; procedure Tfrm_op_airtruck2.fenpiaofind; begin frmairtruckdetailfind2:=Tfrmairtruckdetailfind2.create(self); frmairtruckdetailfind2.Edit1.Text:=DBEdit5.Text ; if frmairtruckdetailfind2.showmodal=mrok then begin with t_op_airtruckdetailfind,sql do begin close; clear; add('select * from t_op_airtruck'); add('where 主编号<>编号'); if frmairtruckdetailfind2.RxDBLookupCombo3.value<>'' then begin add('and 委托单位=:wtdw'); parameters.ParamByName('wtdw').Value:=frmairtruckdetailfind2.RxDBLookupCombo3.value; end ; if frmairtruckdetailfind2.Edit1.Text<>'' then begin add('and LOT号 like :LOT'); parameters.ParamByName('LOT').Value:='%'+frmairtruckdetailfind2.Edit1.Text+'%'; end ; if frmairtruckdetailfind2.RxDBLookupCombo1.Value<>'' then //车队名称 begin add('and 主编号 in (select 编号 from t_op_airtruck where 委托单位='''+frmairtruckdetailfind2.RxDBLookupCombo1.Value+''')'); end ; if frmairtruckdetailfind2.wwDBDateTimePicker6.Text<>'' then //发车日期 begin add('and 发车日期>=:date1'); parameters.ParamByName('date1').Value:=frmairtruckdetailfind2.wwDBDateTimePicker6.Date ; end ; if frmairtruckdetailfind2.wwDBDateTimePicker1.Text<>'' then //发车日期 begin add('and 发车日期<=:date2'); parameters.ParamByName('date2').Value:=frmairtruckdetailfind2.wwDBDateTimePicker1.Date ; end ; open ; end ; end ; frmairtruckdetailfind2.free ; end; procedure Tfrm_op_airtruck2.bsSkinButton25Click(Sender: TObject); var i,j:integer ; scaption:string ; begin frm_sys_grid_cx:=Tfrm_sys_grid_cx.create(application); frm_sys_grid_cx.CheckListBox1.Items.Clear ; for i:=0 to cxGridDBTableViewfind.ColumnCount-1 do begin frm_sys_grid_cx.CheckListBox1.Items.Add(cxGridDBTableViewfind.Columns[i].Caption) ; j:=frm_sys_grid_cx.CheckListBox1.Items.Count-1 ; frm_sys_grid_cx.CheckListBox1.Checked[j]:=cxGridDBTableViewfind.Columns[i].Visible; end ; frm_sys_grid_cx.showmodal ; if frm_sys_grid_cx.modalresult=mrok then begin cxGridDBTableViewfind.BeginUpdate ; for i:=0 to cxGridDBTableViewfind.ColumnCount-1 do cxGridDBTableViewfind.Columns[i].Visible:=false ; for i:=0 to frm_sys_grid_cx.CheckListBox1.Items.Count-1 do begin if frm_sys_grid_cx.CheckListBox1.Checked[i] then begin for j:=0 to cxGridDBTableViewfind.ColumnCount-1 do begin scaption:=frm_sys_grid_cx.CheckListBox1.items[i] ; if cxGridDBTableViewfind.Columns[j].Caption=scaption then cxGridDBTableViewfind.Columns[j].Visible:=true ; end; end ; end ; end ; cxGridDBTableViewfind.EndUpdate ; frm_sys_grid_cx.free ; end; procedure Tfrm_op_airtruck2.bsSkinButton27Click(Sender: TObject); begin t_op_airtruckdetailfind.Prior ; end; procedure Tfrm_op_airtruck2.bsSkinButton28Click(Sender: TObject); begin t_op_airtruckdetailfind.Next ; end; procedure Tfrm_op_airtruck2.bsSkinButton26Click(Sender: TObject); var yjid:array of string ; str:widestring; i:integer; val:string; begin setlength(yjid,cxGridDBTableViewfind.Controller.SelectedRowCount); cxGridDBTableViewfind.BeginUpdate ; try for i:=0 to cxGridDBTableViewfind.Controller.SelectedRowCount-1 do begin //焦点移到选中列 val:=cxGridDBTableViewfind.DataController.GetDisplayText(cxGridDBTableViewfind.Controller.SelectedRows[I].RecordIndex,0) ; yjid[i]:=val ; end; //得到选中列的值 for i:=0 to high(yjid) do begin if i=0 then str:='('+''''+yjid[i]+'''' else str:=str+','+''''+yjid[i]+''''; end ; str:=str+')'; finally cxGridDBTableViewfind.EndUpdate ; end; t_op_airtruckdetailfindpr.close; t_op_airtruckdetailfindpr.sql.clear; t_op_airtruckdetailfindpr.sql.add(' select * from t_op_airtruck ' +'where 编号 in '+str); t_op_airtruckdetailfindpr.open; sys_print('监管车业务分票2',2,t_op_airtruckdetailfindpr1,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil); end; procedure Tfrm_op_airtruck2.RxDBLookupCombo10Enter(Sender: TObject); begin (sender as TRxDBLookupCombo).LookupDisplay:='代码;客户简称'; end; procedure Tfrm_op_airtruck2.RxDBLookupCombo10Exit(Sender: TObject); begin (sender as TRxDBLookupCombo).LookupDisplay:='客户简称'; end; procedure Tfrm_op_airtruck2.RxDBLookupCombo4Enter(Sender: TObject); begin (sender as TRxDBLookupCombo).LookupDisplay:='英文名;中文名'; end; procedure Tfrm_op_airtruck2.RxDBLookupCombo4Exit(Sender: TObject); begin (sender as TRxDBLookupCombo).LookupDisplay:='中文名'; end; procedure Tfrm_op_airtruck2.fra_fee3bsSkinButton1Click(Sender: TObject); begin fra_fee3.bsSkinButton1Click(Sender); end; procedure Tfrm_op_airtruck2.qryjczBeforePost(DataSet: TDataSet); begin qryjcz.FieldByName('尺码').AsFloat:= qryjcz.fieldbyname('长').AsFloat *qryjcz.fieldbyname('宽').AsFloat *qryjcz.fieldbyname('高').AsFloat *qryjcz.fieldbyname('件数').AsFloat/1000/1000 ; end; procedure Tfrm_op_airtruck2.bsbtnrefreshClick(Sender: TObject); begin qryjcz.Requery(); end; procedure Tfrm_op_airtruck2.DBEdit10KeyPress(Sender: TObject; var Key: Char); begin if key=#13 then DBEdit11.SetFocus ; end; procedure Tfrm_op_airtruck2.bsSkinButtonCreateFeeClick(Sender: TObject); var yjid:array of string ; str:widestring; i:integer; val,hblno:string; aQuery:TADOQuery; begin hblno:=trim(InputBox('请输入分提单号', '分提单号', '')); aQuery:=CreateAdoQuery; setlength(yjid,cxGridDBTableViewfind.Controller.SelectedRowCount); cxGridDBTableViewfind.BeginUpdate ; try for i:=0 to cxGridDBTableViewfind.Controller.SelectedRowCount-1 do begin //焦点移到选中列 val:=cxGridDBTableViewfind.DataController.GetDisplayText(cxGridDBTableViewfind.Controller.SelectedRows[I].RecordIndex,0) ; if (t_op_airtruckdetailfind.Locate('编号',val,[])) then begin createFee('编号',t_op_airtruckdetailfind.fieldbyname('委托单位').asstring,'监管费','委托单位','重量','收',t_op_airtruckdetailfind.fieldbyname('重量').asfloat); createFee('编号',t_op_airtruckdetailfind.fieldbyname('委托单位').asstring,'称重费','委托单位','重量','收',t_op_airtruckdetailfind.fieldbyname('重量').asfloat); createFee('编号',t_op_airtruckdetailfind.fieldbyname('委托单位').asstring,'录入费','委托单位','单票','收',1); createFee('编号',t_op_airtruckdetailfind.fieldbyname('委托单位').asstring,'报关费','委托单位','单票','收',1); createFee('编号',t_op_airtruckdetailfind.fieldbyname('委托单位').asstring,'提货费','委托单位','单票','收',1); createFee('编号',t_op_airtruckdetailfind.fieldbyname('委托单位').asstring,'包装费','委托单位','单票','收',1); createFee('编号',t_op_airtruckdetailfind.fieldbyname('委托单位').asstring,'包车费','委托单位','单票','收',1); createFee('编号',t_op_airtruckdetailfind.fieldbyname('委托单位').asstring,'税费','委托单位','单票','收',1); createFee('编号',t_op_airtruckdetailfind.fieldbyname('委托单位').asstring,'验货费','委托单位','单票','收',1); createFee('编号',t_op_airtruckdetailfind.fieldbyname('委托单位').asstring,'鉴定费','委托单位','单票','收',1); createFee('编号','青岛盛邦国际','称重费','','单票','付',1); createFee('编号','青岛盛邦国际','录入费','','单票','付',1); createFee('编号','青岛盛邦国际','税费','','单票','付',1); createFee('编号','','提货费','','单票','付',1); createFee('编号','','包装费','','单票','付',1); createFee('编号','','包车费','','单票','付',1); createFee('编号','青岛盛邦国际','验货费','','单票','付',1); createFee('编号','青岛迪捷姆','鉴定费','','单票','付',1); createFee('编号','青岛盛邦国际','监管费','','单票','付',t_op_airtruckdetailfind.fieldbyname('重量').asfloat); if (hblno<>'') then begin aQuery.Close; aQuery.SQL.Text:='update t_op_airtruck set 分提单号='''+hblno+''' where 编号='''+val+''''; aQuery.ExecSQL; end; end; end; ShowMessage('生成成功!'); fra_fee3.t_ch_pay.Close; fra_fee3.t_ch_accept.Close; t_op_airtruckdetailfind.Requery(); fra_fee3.t_ch_pay.Open; fra_fee3.t_ch_accept.Open; finally cxGridDBTableViewfind.EndUpdate ; FreeAndNil(aQuery); end; end; procedure Tfrm_op_airtruck2.createFee(bianhao, cust, feename, custtype, priceunit,feetype: string; QUANTITY:Double); begin t_ch_fee.close; t_ch_fee.Parameters[0].value:=t_op_airtruckdetailfind.fieldbyname('编号').asstring; t_ch_fee.open; t_ch_fee.Insert; t_ch_fee['编号']:=t_op_airtruckdetailfind.fieldbyname('编号').asstring; t_ch_fee['类型']:=feetype; t_ch_fee['费用状态']:='录入状态'; t_ch_fee['录入人']:=employee; t_ch_fee['费用名称']:=feename; t_ch_fee['结算单位']:=custtype; t_ch_fee['客户名称']:=cust; t_ch_fee['标准']:=priceunit; t_ch_fee['数量']:=QUANTITY; t_ch_fee['币别']:='RMB'; t_ch_fee['汇率']:=1; t_ch_fee['金额']:=0; t_ch_fee['不含税价']:=0; t_ch_fee['税率']:=0; t_ch_fee['税额']:=0; t_ch_fee['不含税金额']:=0; t_ch_fee['财务税率']:=0; t_ch_fee['财务税额']:=0; t_ch_fee['财务不含税价']:=0; t_ch_fee['结算金额']:=0; t_ch_fee['开票金额']:=0; t_ch_fee['申请开票']:=0; t_ch_fee['申请金额']:=0; t_ch_fee['冲抵金额']:=0; t_ch_fee['录入日期']:=now; t_ch_fee['是否对帐']:=0; t_ch_fee['是否垫付']:=0; t_ch_fee['不开发票']:=0; t_ch_fee['预提成本']:=0; t_ch_fee['冲抵成本']:=0; t_ch_fee['顺序']:=t_ch_fee.RecordCount+1; t_ch_fee['机密']:=0; t_ch_fee.Post; end; procedure Tfrm_op_airtruck2.bsSkinButton21Click(Sender: TObject); begin frm_main.view_momo(t_op_airtruckdetail1,'备注'); end; end.