|
|
unit u_crm_client_sales;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, DB, ADODB, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid,
|
|
|
ComCtrls, bsSkinTabs, ExtCtrls, bsSkinCtrls, RxLookup, StdCtrls, Mask,
|
|
|
DBCtrls, bsdbctrls, wwdbedit, Wwdotdot, Wwdbcomb, wwdbdatetimepicker,
|
|
|
dxDBTLCl, dxGrClms, Menus, XPMenu, wwdblook, Grids, Wwdbigrd, Wwdbgrid,
|
|
|
RxDBComb;
|
|
|
|
|
|
type
|
|
|
Tfrm_crm_client_sales = class(TForm)
|
|
|
t_crm_client: TADOQuery;
|
|
|
t_crm_client1: TDataSource;
|
|
|
Panel2: TPanel;
|
|
|
bsSkinButton19: TbsSkinButton;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
bsSkinPageControl1: TbsSkinPageControl;
|
|
|
bsSkinTabSheet1: TbsSkinTabSheet;
|
|
|
bsSkinTabSheet2: TbsSkinTabSheet;
|
|
|
bsSkinTabSheet3: TbsSkinTabSheet;
|
|
|
bsSkinTabSheet4: TbsSkinTabSheet;
|
|
|
bsSkinTabSheet5: TbsSkinTabSheet;
|
|
|
bsSkinButton8: TbsSkinButton;
|
|
|
bsSkinButton12: TbsSkinButton;
|
|
|
t_crm_client_linkman: TADOQuery;
|
|
|
t_crm_client_linkman1: TDataSource;
|
|
|
dxDBGrid2: TdxDBGrid;
|
|
|
t_crm_client_link: TADOQuery;
|
|
|
t_crm_client_link1: TDataSource;
|
|
|
dxDBGrid3: TdxDBGrid;
|
|
|
t_crm_client_contract: TADOQuery;
|
|
|
t_crm_client_contract1: TDataSource;
|
|
|
dxDBGrid4: TdxDBGrid;
|
|
|
dxDBGridMaskColumn2: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn3: TdxDBGridMaskColumn;
|
|
|
dxDBGridDateColumn1: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column12: TdxDBGridColumn;
|
|
|
dxDBGrid1Column5: TdxDBGridDateColumn;
|
|
|
bsSkinGroupBox9: TbsSkinGroupBox;
|
|
|
DBRichEdit1: TDBRichEdit;
|
|
|
dxDBGrid4Column6: TdxDBGridColumn;
|
|
|
v_all_client: TADOQuery;
|
|
|
DBEdit48: TDBEdit;
|
|
|
bsSkinTabSheet6: TbsSkinTabSheet;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
Panel1: TPanel;
|
|
|
bsSkinGroupBox4: TbsSkinGroupBox;
|
|
|
bsSkinDBCheckRadioBox5: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox12: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox1: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox2: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox4: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox3: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox6: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox7: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox8: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox13: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox14: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox15: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinGroupBox3: TbsSkinGroupBox;
|
|
|
Label4: TLabel;
|
|
|
Label2: TLabel;
|
|
|
Label7: TLabel;
|
|
|
Label6: TLabel;
|
|
|
Label10: TLabel;
|
|
|
Label11: TLabel;
|
|
|
Label8: TLabel;
|
|
|
Label17: TLabel;
|
|
|
Label62: TLabel;
|
|
|
Label63: TLabel;
|
|
|
Label64: TLabel;
|
|
|
Label65: TLabel;
|
|
|
DBEdit4: TDBEdit;
|
|
|
DBEdit2: TDBEdit;
|
|
|
DBEdit7: TDBEdit;
|
|
|
DBEdit6: TDBEdit;
|
|
|
DBEdit10: TDBEdit;
|
|
|
DBEdit9: TDBEdit;
|
|
|
DBEdit8: TDBEdit;
|
|
|
DBEdit45: TDBEdit;
|
|
|
RxDBLookupCombo14: TRxDBLookupCombo;
|
|
|
RxDBLookupCombo1: TRxDBLookupCombo;
|
|
|
wwDBDateTimePicker6: TwwDBDateTimePicker;
|
|
|
dxDBGrid5: TdxDBGrid;
|
|
|
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn4: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn5: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn6: TdxDBGridMaskColumn;
|
|
|
Panel3: TPanel;
|
|
|
bsSkinGroupBox6: TbsSkinGroupBox;
|
|
|
Label19: TLabel;
|
|
|
Label24: TLabel;
|
|
|
Label25: TLabel;
|
|
|
Label45: TLabel;
|
|
|
Label46: TLabel;
|
|
|
DBEdit19: TDBEdit;
|
|
|
DBEdit24: TDBEdit;
|
|
|
wwDBComboBox5: TwwDBComboBox;
|
|
|
DBEdit30: TDBEdit;
|
|
|
bsSkinGroupBox7: TbsSkinGroupBox;
|
|
|
Label23: TLabel;
|
|
|
Label26: TLabel;
|
|
|
Label27: TLabel;
|
|
|
Label28: TLabel;
|
|
|
DBEdit26: TDBEdit;
|
|
|
DBEdit23: TDBEdit;
|
|
|
DBEdit27: TDBEdit;
|
|
|
bsSkinDBCheckRadioBox9: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox10: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox11: TbsSkinDBCheckRadioBox;
|
|
|
DBEdit28: TDBEdit;
|
|
|
bsSkinGroupBox8: TbsSkinGroupBox;
|
|
|
Label29: TLabel;
|
|
|
Label30: TLabel;
|
|
|
Label31: TLabel;
|
|
|
Label32: TLabel;
|
|
|
Label33: TLabel;
|
|
|
Label34: TLabel;
|
|
|
Label35: TLabel;
|
|
|
DBEdit29: TDBEdit;
|
|
|
DBEdit31: TDBEdit;
|
|
|
DBEdit32: TDBEdit;
|
|
|
DBEdit33: TDBEdit;
|
|
|
DBEdit34: TDBEdit;
|
|
|
wwDBComboBox1: TwwDBComboBox;
|
|
|
DBMemo1: TDBMemo;
|
|
|
dxDBGrid6: TdxDBGrid;
|
|
|
dxDBGridMaskColumn7: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn8: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn9: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn10: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column2: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column3: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column4: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1EDI: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column6: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column7: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column8: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column9: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column10: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column11: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column13: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column14: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column15: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column16: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column17: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column18: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column19: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1USD: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column20: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1RMB: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column22: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column23: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column24: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column25: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column26: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column27: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column28: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column29: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column30: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column31: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column32: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column33: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column34: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column35: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column36: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column37: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column38: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column39: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column40: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column41: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column42: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column43: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column44: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column45: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column46: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column47: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column48: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column49: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column50: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column51: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column53: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column54: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column55: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column56: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column57: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column58: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column59: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column60: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column61: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column62: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column63: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column64: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column65: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column66: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column67: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column68: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column69: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column70: TdxDBGridMaskColumn;
|
|
|
PopupMenu2: TPopupMenu;
|
|
|
N10: TMenuItem;
|
|
|
N11: TMenuItem;
|
|
|
N14: TMenuItem;
|
|
|
N13: TMenuItem;
|
|
|
N12: TMenuItem;
|
|
|
N15: TMenuItem;
|
|
|
N16: TMenuItem;
|
|
|
XPMenu1: TXPMenu;
|
|
|
PopupMenu1: TPopupMenu;
|
|
|
N1: TMenuItem;
|
|
|
N2: TMenuItem;
|
|
|
N3: TMenuItem;
|
|
|
N4: TMenuItem;
|
|
|
N5: TMenuItem;
|
|
|
N6: TMenuItem;
|
|
|
N7: TMenuItem;
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
bsSkinButton14: TbsSkinButton;
|
|
|
bsSkinButton15: TbsSkinButton;
|
|
|
bsSkinButton16: TbsSkinButton;
|
|
|
bsSkinButton17: TbsSkinButton;
|
|
|
DBEdit46: TDBEdit;
|
|
|
Label55: TLabel;
|
|
|
Label54: TLabel;
|
|
|
wwDBComboBox3: TwwDBComboBox;
|
|
|
Label56: TLabel;
|
|
|
DBEdit47: TDBEdit;
|
|
|
Label57: TLabel;
|
|
|
wwDBDateTimePicker5: TwwDBDateTimePicker;
|
|
|
Label60: TLabel;
|
|
|
RxDBLookupCombo8: TRxDBLookupCombo;
|
|
|
Label58: TLabel;
|
|
|
DBEdit49: TDBEdit;
|
|
|
Label61: TLabel;
|
|
|
wwDBComboBox4: TwwDBComboBox;
|
|
|
Label59: TLabel;
|
|
|
DBMemo3: TDBMemo;
|
|
|
dxDBGrid3Column1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid3Column2: TdxDBGridMaskColumn;
|
|
|
dxDBGrid3Column3: TdxDBGridMaskColumn;
|
|
|
dxDBGrid3Column4: TdxDBGridMaskColumn;
|
|
|
dxDBGrid3Column5: TdxDBGridDateColumn;
|
|
|
dxDBGrid3Column6: TdxDBGridCurrencyColumn;
|
|
|
dxDBGrid3Column7: TdxDBGridMaskColumn;
|
|
|
dxDBGrid3Column8: TdxDBGridMaskColumn;
|
|
|
dxDBGrid3Column9: TdxDBGridDateColumn;
|
|
|
Label36: TLabel;
|
|
|
DBEdit35: TDBEdit;
|
|
|
Label37: TLabel;
|
|
|
wwDBComboBox2: TwwDBComboBox;
|
|
|
Label38: TLabel;
|
|
|
DBEdit37: TDBEdit;
|
|
|
Label39: TLabel;
|
|
|
DBEdit38: TDBEdit;
|
|
|
Label40: TLabel;
|
|
|
DBEdit39: TDBEdit;
|
|
|
Label41: TLabel;
|
|
|
DBEdit36: TDBEdit;
|
|
|
Label42: TLabel;
|
|
|
DBEdit40: TDBEdit;
|
|
|
Label43: TLabel;
|
|
|
DBEdit41: TDBEdit;
|
|
|
Label44: TLabel;
|
|
|
DBEdit42: TDBEdit;
|
|
|
Label47: TLabel;
|
|
|
DBEdit43: TDBEdit;
|
|
|
Label48: TLabel;
|
|
|
DBEdit44: TDBEdit;
|
|
|
Label49: TLabel;
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
Label50: TLabel;
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
wwDBDateTimePicker8: TwwDBDateTimePicker;
|
|
|
Label52: TLabel;
|
|
|
wwDBDateTimePicker7: TwwDBDateTimePicker;
|
|
|
Label51: TLabel;
|
|
|
Label53: TLabel;
|
|
|
DBMemo2: TDBMemo;
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
bsSkinButton7: TbsSkinButton;
|
|
|
bsSkinButton11: TbsSkinButton;
|
|
|
bsSkinButton13: TbsSkinButton;
|
|
|
dxDBGrid2Column1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column2: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column3: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column4: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column5: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column6: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column7: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column8: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column9: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column11: TdxDBGridDateColumn;
|
|
|
dxDBGrid21: TdxDBGridDateColumn;
|
|
|
dxDBGrid22: TdxDBGridDateColumn;
|
|
|
dxDBGrid23: TdxDBGridDateColumn;
|
|
|
wwDBComboBox7: TwwDBComboBox;
|
|
|
wwDBComboBox9: TwwDBComboBox;
|
|
|
wwDBComboBox8: TwwDBComboBox;
|
|
|
DBEdit53: TDBEdit;
|
|
|
Label72: TLabel;
|
|
|
dxDBGrid1Column71: TdxDBGridColumn;
|
|
|
Label5: TLabel;
|
|
|
RxDBComboBox1: TRxDBComboBox;
|
|
|
Label73: TLabel;
|
|
|
RxDBComboBox2: TRxDBComboBox;
|
|
|
RxDBComboBox3: TRxDBComboBox;
|
|
|
PopupMenu3: TPopupMenu;
|
|
|
MenuItem1: TMenuItem;
|
|
|
MenuItem2: TMenuItem;
|
|
|
MenuItem3: TMenuItem;
|
|
|
MenuItem4: TMenuItem;
|
|
|
MenuItem5: TMenuItem;
|
|
|
MenuItem6: TMenuItem;
|
|
|
MenuItem7: TMenuItem;
|
|
|
Label75: TLabel;
|
|
|
RxDBComboBox4: TRxDBComboBox;
|
|
|
PopupMenu4: TPopupMenu;
|
|
|
N8: TMenuItem;
|
|
|
PopupMenu5: TPopupMenu;
|
|
|
MenuItem8: TMenuItem;
|
|
|
PopupMenu6: TPopupMenu;
|
|
|
MenuItem9: TMenuItem;
|
|
|
bsSkinButton18: TbsSkinButton;
|
|
|
Label77: TLabel;
|
|
|
DBEdit54: TDBEdit;
|
|
|
Label78: TLabel;
|
|
|
RxDBComboBox5: TRxDBComboBox;
|
|
|
bsSkinGroupBox2: TbsSkinGroupBox;
|
|
|
Label13: TLabel;
|
|
|
Label14: TLabel;
|
|
|
Label15: TLabel;
|
|
|
Label16: TLabel;
|
|
|
Label67: TLabel;
|
|
|
Label68: TLabel;
|
|
|
DBEdit13: TDBEdit;
|
|
|
DBEdit14: TDBEdit;
|
|
|
DBEdit15: TDBEdit;
|
|
|
DBEdit16: TDBEdit;
|
|
|
DBEdit50: TDBEdit;
|
|
|
DBEdit51: TDBEdit;
|
|
|
bsSkinGroupBox1: TbsSkinGroupBox;
|
|
|
Label1: TLabel;
|
|
|
Label3: TLabel;
|
|
|
Label9: TLabel;
|
|
|
Label12: TLabel;
|
|
|
DBEdit1: TDBEdit;
|
|
|
DBEdit3: TDBEdit;
|
|
|
DBEdit11: TDBEdit;
|
|
|
DBEdit12: TDBEdit;
|
|
|
bsSkinGroupBox10: TbsSkinGroupBox;
|
|
|
DBMemo4: TDBMemo;
|
|
|
Label20: TLabel;
|
|
|
DBEdit20: TDBEdit;
|
|
|
bsSkinGroupBox5: TbsSkinGroupBox;
|
|
|
Label21: TLabel;
|
|
|
DBEdit21: TDBEdit;
|
|
|
GroupBox1: TGroupBox;
|
|
|
Memo1: TMemo;
|
|
|
GroupBox4: TGroupBox;
|
|
|
Memo3: TMemo;
|
|
|
GroupBox2: TGroupBox;
|
|
|
Memo2: TMemo;
|
|
|
Label18: TLabel;
|
|
|
DBMemo5: TDBMemo;
|
|
|
dxDBGrid5Column5: TdxDBGridColumn;
|
|
|
dxDBGrid5Column6: TdxDBGridColumn;
|
|
|
dxDBGrid5Column7: TdxDBGridColumn;
|
|
|
dxDBGrid5Column8: TdxDBGridColumn;
|
|
|
dxDBGrid5Column9: TdxDBGridColumn;
|
|
|
dxDBGrid5Column10: TdxDBGridColumn;
|
|
|
dxDBGrid5Column11: TdxDBGridColumn;
|
|
|
dxDBGrid5Column12: TdxDBGridColumn;
|
|
|
dxDBGrid5Column13: TdxDBGridColumn;
|
|
|
dxDBGrid5Column14: TdxDBGridColumn;
|
|
|
dxDBGrid5Column15: TdxDBGridColumn;
|
|
|
dxDBGrid5Column16: TdxDBGridColumn;
|
|
|
dxDBGrid1Column72: TdxDBGridColumn;
|
|
|
dxDBGrid1Column73: TdxDBGridColumn;
|
|
|
dxDBGrid1Column74: TdxDBGridColumn;
|
|
|
dxDBGrid1Column75: TdxDBGridColumn;
|
|
|
dxDBGrid1Column76: TdxDBGridColumn;
|
|
|
dxDBGrid1Column77: TdxDBGridColumn;
|
|
|
dxDBGrid1Column78: TdxDBGridColumn;
|
|
|
dxDBGrid1Column79: TdxDBGridColumn;
|
|
|
dxDBGrid1Column80: TdxDBGridColumn;
|
|
|
ds_crm_client_sales1: TDataSource;
|
|
|
t_crm_client_sales: TADOQuery;
|
|
|
t_sys_country_code: TADOQuery;
|
|
|
t_sys_country_qycode: TADOQuery;
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure Panel2Resize(Sender: TObject);
|
|
|
procedure bsSkinButton12Click(Sender: TObject);
|
|
|
procedure t_crm_clientAfterInsert(DataSet: TDataSet);
|
|
|
procedure t_crm_clientBeforePost(DataSet: TDataSet);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
|
|
procedure t_crm_clientAfterScroll(DataSet: TDataSet);
|
|
|
procedure bsSkinButton6Click(Sender: TObject);
|
|
|
procedure bsSkinButton7Click(Sender: TObject);
|
|
|
procedure bsSkinButton11Click(Sender: TObject);
|
|
|
procedure bsSkinButton13Click(Sender: TObject);
|
|
|
procedure t_crm_client_linkmanAfterInsert(DataSet: TDataSet);
|
|
|
procedure t_crm_client_linkmanBeforePost(DataSet: TDataSet);
|
|
|
procedure bsSkinButton14Click(Sender: TObject);
|
|
|
procedure bsSkinButton15Click(Sender: TObject);
|
|
|
procedure bsSkinButton16Click(Sender: TObject);
|
|
|
procedure bsSkinButton17Click(Sender: TObject);
|
|
|
procedure t_crm_client_linkAfterInsert(DataSet: TDataSet);
|
|
|
procedure t_crm_client_linkBeforePost(DataSet: TDataSet);
|
|
|
procedure t_crm_clientBeforeDelete(DataSet: TDataSet);
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
procedure t_crm_clientBeforeEdit(DataSet: TDataSet);
|
|
|
procedure DBEdit4KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit5KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit2KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit6KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit7KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit10KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit9KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit17KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit1KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit3KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit12KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit11KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit13KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit14KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit16KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit15KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox8KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox2KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox5KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox4KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox1KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox3KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox7KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox6KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox12KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox13KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox15KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox14KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure RxDBLookupCombo11KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit20KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit22KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit21KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit25KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBComboBox5KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit24KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit19KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit30KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit23KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit26KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit27KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox9KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox10KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox11KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure DBEdit28KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit29KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit31KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit32KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit33KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit34KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBComboBox1KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit35KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBComboBox2KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit37KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit38KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit39KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit36KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit40KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit41KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit42KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit43KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit44KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBDateTimePicker1KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBDateTimePicker4KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit46KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBComboBox3KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit47KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBDateTimePicker5KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure RxDBLookupCombo8KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit49KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBComboBox4KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure t_crm_clientPostError(DataSet: TDataSet; E: EDatabaseError;
|
|
|
var Action: TDataAction);
|
|
|
procedure t_crm_clientDeleteError(DataSet: TDataSet; E: EDatabaseError;
|
|
|
var Action: TDataAction);
|
|
|
procedure dxDBGrid1ColumnSorting(Sender: TObject;
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
procedure DBEdit45KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure RxDBLookupCombo1KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit18KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure RxDBLookupCombo14KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit48Change(Sender: TObject);
|
|
|
procedure dxDBGrid1DblClick(Sender: TObject);
|
|
|
procedure N10Click(Sender: TObject);
|
|
|
procedure N14Click(Sender: TObject);
|
|
|
procedure N12Click(Sender: TObject);
|
|
|
procedure N16Click(Sender: TObject);
|
|
|
procedure N7Click(Sender: TObject);
|
|
|
procedure N1Click(Sender: TObject);
|
|
|
procedure N3Click(Sender: TObject);
|
|
|
procedure N5Click(Sender: TObject);
|
|
|
procedure bsSkinButton8Click(Sender: TObject);
|
|
|
procedure wwDBComboBox10KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBComboBox7KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBComboBox9KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBComboBox8KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBComboBox9Change(Sender: TObject);
|
|
|
procedure t_crm_client_linkBeforeInsert(DataSet: TDataSet);
|
|
|
procedure RxDBComboBox2Enter(Sender: TObject);
|
|
|
procedure RxDBComboBox2Exit(Sender: TObject);
|
|
|
procedure N8Click(Sender: TObject);
|
|
|
procedure MenuItem8Click(Sender: TObject);
|
|
|
procedure MenuItem9Click(Sender: TObject);
|
|
|
procedure dxDBGrid5Click(Sender: TObject);
|
|
|
procedure bsSkinButton19Click(Sender: TObject);
|
|
|
procedure FormCreate(Sender: TObject);
|
|
|
procedure t_crm_clientBeforeInsert(DataSet: TDataSet);
|
|
|
procedure DBEdit4Change(Sender: TObject);
|
|
|
procedure wwDBLookupCombo21Enter(Sender: TObject);
|
|
|
procedure wwDBLookupCombo21Exit(Sender: TObject);
|
|
|
procedure DBEdit5Exit(Sender: TObject);
|
|
|
procedure wwDBLookupCombo1Enter(Sender: TObject);
|
|
|
procedure wwDBLookupCombo1Exit(Sender: TObject);
|
|
|
procedure wwDBLookupCombo1MouseEnter(Sender: TObject);
|
|
|
|
|
|
private
|
|
|
procedure GetMenuItems;
|
|
|
procedure GetDetail;
|
|
|
function LeftFillZero(str1:string; count:Integer) :string;
|
|
|
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_crm_client_sales: Tfrm_crm_client_sales;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_main, my_sys_function, u_data_share, my_sys_chat,u_op_crm_detail_modify;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
function Tfrm_crm_client_sales.LeftFillZero(str1:string; count:Integer) :string;
|
|
|
var
|
|
|
temp : string;
|
|
|
len, idex :Integer;
|
|
|
|
|
|
begin
|
|
|
len := Length(Trim(str1));
|
|
|
if (len >= count) then
|
|
|
begin
|
|
|
LeftFillZero:= str1;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
for idex := 0 to count-len-1 do
|
|
|
begin
|
|
|
temp := temp + '0';
|
|
|
end;
|
|
|
str1 := temp + str1;
|
|
|
LeftFillZero := str1;
|
|
|
end
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.FormShow(Sender: TObject);
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
begin
|
|
|
loadreggrid(dxdbgrid1,false,caption);
|
|
|
loadreggrid(dxdbgrid5,false,caption+'1');
|
|
|
t_crm_client.SQL.clear;
|
|
|
t_crm_client.sql.add('select * from t_crm_client where (<28>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> in ('+''''+'Ŀ<><C4BF>'+''''+','+''''+'ϵͳ'+''''+')');
|
|
|
t_crm_client.sql.add(' or ί<>е<EFBFBD>λ=1)');
|
|
|
t_crm_client.SQL.Add(' and '+open_data('7001','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no')
|
|
|
// t_crm_client.SQL.Add(' and ¼<><C2BC><EFBFBD><EFBFBD>='''+employee+''''
|
|
|
|
|
|
+' order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>,<2C>ͻ<EFBFBD>״̬,<2C>ͻ<EFBFBD><CDBB><EFBFBD>ֵ,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
t_crm_client.open;
|
|
|
v_all_client.open;
|
|
|
t_crm_client_linkman.open;
|
|
|
t_crm_client_link.open;
|
|
|
t_crm_client_sales.Open ;
|
|
|
// t_crm_client_sales.Open;
|
|
|
t_crm_client_contract.open;
|
|
|
dxDBGrid1.FullExpand;
|
|
|
wwDBComboBox4.Items.Clear;
|
|
|
if if_open('415')=False then bsSkinButton4.Enabled:=False;
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
SQL.Add('select * from t_code_opresult');
|
|
|
Open;
|
|
|
if not IsEmpty then begin
|
|
|
First;
|
|
|
while not eof do begin
|
|
|
wwDBComboBox4.Items.Add(fieldbyName('ҵ<><D2B5>Ч<EFBFBD><D0A7>').AsString);
|
|
|
Next;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
GetMenuItems;
|
|
|
t_sys_country_code.Open;
|
|
|
GetDetail;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.FormClose(Sender: TObject;
|
|
|
var Action: TCloseAction);
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
begin
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
with aQuery do
|
|
|
begin
|
|
|
Close;
|
|
|
SQL.Clear;
|
|
|
SQL.Add('drop table #Outport drop table #HZCD');
|
|
|
ExecSQL;
|
|
|
end;
|
|
|
FreeAndNil(aQuery);
|
|
|
savereggrid(dxdbgrid1,caption);
|
|
|
savereggrid(dxdbgrid5,caption+'1');
|
|
|
frm_crm_client_sales.Hide;
|
|
|
frm_crm_client_sales.ManualFloat(frm_crm_client_sales.BoundsRect );
|
|
|
frm_main.freeTabs('frm_crm_client_sales');
|
|
|
action:=cafree;
|
|
|
frm_crm_client_sales:=nil;
|
|
|
with frm_data_share do
|
|
|
begin
|
|
|
t_crm_client.requery;
|
|
|
t_crm_client_all.requery;
|
|
|
t_crm_client_ship.requery;
|
|
|
t_crm_client_changzhan.requery;
|
|
|
t_crm_client_truck.requery;
|
|
|
t_crm_client_hangkong.requery;
|
|
|
t_crm_client_baoguan.requery;
|
|
|
t_crm_client_weituo.requery;
|
|
|
t_crm_client_daili.requery;
|
|
|
t_crm_client_huodai.requery;
|
|
|
t_crm_client_shiper.requery;
|
|
|
t_crm_client_shouhuo.requery;
|
|
|
t_crm_client_tongzhi.requery;
|
|
|
t_crm_client_other.requery;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.Panel2Resize(Sender: TObject);
|
|
|
var
|
|
|
i:integer;
|
|
|
begin
|
|
|
i:=round(Panel2.width/10);
|
|
|
bsSkinButton9.width:=i;
|
|
|
bsSkinButton12.width:=i;
|
|
|
bsSkinButton10.width:=i;
|
|
|
bsSkinButton18.width:=i;
|
|
|
bsSkinButton19.width:=i;
|
|
|
bsSkinButton2.width:=i;
|
|
|
bsSkinButton4.width:=i;
|
|
|
bsSkinButton3.width:=i;
|
|
|
bsSkinButton8.width:=i;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton12Click(Sender: TObject);
|
|
|
begin
|
|
|
if bsSkinButton12.Caption='<27>ͻ<EFBFBD>չ<EFBFBD><D5B9>' then
|
|
|
begin
|
|
|
dxdbgrid1.FullExpand;
|
|
|
bsSkinButton12.Caption:='<27>ͻ<EFBFBD><CDBB>ϲ<EFBFBD>';
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
dxdbgrid1.FullCollapse;
|
|
|
bsSkinButton12.Caption:='<27>ͻ<EFBFBD>չ<EFBFBD><D5B9>';
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_clientAfterInsert(DataSet: TDataSet);
|
|
|
begin
|
|
|
t_crm_client['<27>ͻ<EFBFBD>״̬']:='<27><>ȷ<EFBFBD><C8B7>';
|
|
|
t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD>ֵ']:='<27>ȴ<EFBFBD><C8B4><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:='Ŀ<><C4BF>';
|
|
|
t_crm_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_crm_client['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_crm_client['ί<>е<EFBFBD>λ']:=1;
|
|
|
t_crm_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='Լ<><D4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_clientBeforePost(DataSet: TDataSet);
|
|
|
begin
|
|
|
t_crm_client['<27>ͻ<EFBFBD>״̬']:=t_crm_client['<27>ͻ<EFBFBD>״̬'];
|
|
|
//table_before_post(t_crm_client,'<27><><EFBFBD><EFBFBD>');
|
|
|
table_before_post(t_crm_client,'<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
table_before_post(t_crm_client,'<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>');
|
|
|
if t_crm_client.FieldByName('<27><><EFBFBD><EFBFBD>').AsString='' then
|
|
|
t_crm_client['<27><><EFBFBD><EFBFBD>']:=t_crm_client['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton1Click(Sender: TObject);
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
i:Integer;
|
|
|
begin
|
|
|
t_crm_client.append;
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
with aQuery do
|
|
|
begin
|
|
|
Close;
|
|
|
SQL.Clear;
|
|
|
SQL.Add('select max(cast(<28><><EFBFBD><EFBFBD> as int)) as maxxh from t_crm_client');
|
|
|
Open;
|
|
|
end;
|
|
|
if aQuery.RecordCount=0 then i:=0 else i:=aQuery.fieldbyname('maxxh').AsInteger;
|
|
|
DBEdit4.Text:=LeftFillZero(IntToStr(i+1),6);
|
|
|
FreeAndNil(aQuery);
|
|
|
Memo1.Lines.Clear;
|
|
|
Memo2.Lines.Clear;
|
|
|
Memo3.Lines.Clear;
|
|
|
bsSkinTabSheet1.Show;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton2Click(Sender: TObject);
|
|
|
var
|
|
|
LengthQ,PosQ,i:Integer;
|
|
|
s:string;
|
|
|
begin
|
|
|
if RxDBComboBox1.ItemIndex=3 then
|
|
|
begin
|
|
|
if Memo3.Lines.Count=0 then
|
|
|
begin
|
|
|
ShowMessage('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӫ<EFBFBD><D3AA>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD><D5A3><EFBFBD><EFBFBD><EFBFBD><EEA3A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
Exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
//Ϊ<><CEAA>ֹ<EFBFBD>Ķ<EFBFBD>̫<EFBFBD>࣬<EFBFBD><E0A3AC><EFBFBD>ﲻ<EFBFBD><EFB2BB><EFBFBD>ַ<EFBFBD><D6B7>ж<EFBFBD>
|
|
|
//<2F><><EFBFBD><EFBFBD>USCI,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ18λ<38><CEBB>ĸ<EFBFBD><C4B8><EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD>ע<EFBFBD><D7A2>У<EFBFBD><D0A3><EFBFBD>ո<D5B8><F1A3A9A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>OC,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ9λ<39><CEBB>ĸ<EFBFBD><C4B8><EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD>ע<EFBFBD><D7A2>У<EFBFBD><D0A3><EFBFBD>ո<D5B8><F1A3A9A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>
|
|
|
t_crm_client.Active:=True;
|
|
|
t_crm_client.Edit;
|
|
|
{
|
|
|
if trim(wwDBLookupCombo1.DisplayValue)<>'' then
|
|
|
begin
|
|
|
LengthQ :=Length(t_crm_client.fieldbyname('<27><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>').AsString);
|
|
|
PosQ:=Pos('+',t_crm_client.fieldbyname('<27><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>').AsString);
|
|
|
|
|
|
if PosQ>0 then
|
|
|
begin
|
|
|
s:=Copy(t_crm_client.fieldbyname('<27><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>').AsString,PosQ+1,LengthQ-POSQ+1);
|
|
|
for i:=1 to Length(s) do
|
|
|
begin
|
|
|
if not ( s[i] in ['0'..'9','A'..'Z']) then
|
|
|
begin
|
|
|
ShowMessage('<27><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD>ֺʹ<D6BA>д<EFBFBD><D0B4>ĸ');
|
|
|
DBEdit5.SetFocus;
|
|
|
Exit;
|
|
|
end;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
ShowMessage('<27><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>Ӧ<EFBFBD><D3A6><EFBFBD>Ǵ<EFBFBD><C7B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+<2B><>ҵ<EFBFBD><D2B5><EFBFBD>룡');
|
|
|
DBEdit5.SetFocus;
|
|
|
Exit;
|
|
|
|
|
|
end;
|
|
|
|
|
|
if Copy(t_crm_client.FieldByName('<27><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>').AsString,0,PosQ-1)<>wwDBLookupCombo1.DisplayValue then
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͳ<EFBFBD><CDB2><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
DBEdit5.SetFocus;
|
|
|
Exit;
|
|
|
end;
|
|
|
if Trim(t_crm_client.FieldByName('<27><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)='USCI' then
|
|
|
begin
|
|
|
if Copy(t_crm_client.FieldByName('<27><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString,0,4)<>'USCI' then
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͳ<EFBFBD><CDB2><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
DBEdit5.SetFocus;
|
|
|
Exit;
|
|
|
end;
|
|
|
if Length(s)<>18 then
|
|
|
begin
|
|
|
ShowMessage('USCI<43><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ18λ<38><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+IntToStr(Length(s))+'λ,<2C><><EFBFBD><EFBFBD><EFBFBD>飡');
|
|
|
DBEdit5.SetFocus;
|
|
|
Exit;
|
|
|
end;
|
|
|
end;
|
|
|
if Trim(t_crm_client.FieldByName('<27><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)='OC' then
|
|
|
begin
|
|
|
if Copy(t_crm_client.FieldByName('<27><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString,0,2)<>'OC' then
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͳ<EFBFBD><CDB2><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
DBEdit5.SetFocus;
|
|
|
Exit;
|
|
|
end;
|
|
|
if Length(s)<>9 then
|
|
|
begin
|
|
|
ShowMessage('OC<4F><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ9λ<39><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+IntToStr(Length(s))+'λ,<2C><><EFBFBD><EFBFBD><EFBFBD>飡');
|
|
|
DBEdit5.SetFocus;
|
|
|
Exit;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
if (t_crm_client.FieldByName('<27><><EFBFBD><EFBFBD>').isnull) or (Trim(t_crm_client.FieldByName('<27><><EFBFBD><EFBFBD>').AsString)='')
|
|
|
then t_crm_client.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=DBEdit4.Text;
|
|
|
if trim(wwDBLookupCombo1.DisplayValue)<>'' then
|
|
|
begin
|
|
|
if PosQ=0 then t_crm_client.FieldByName('<27><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>').AsString:=wwDBLookupCombo1.DisplayValue+'+'+DBEdit5.text;
|
|
|
end;
|
|
|
}
|
|
|
table_post(t_crm_client);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton4Click(Sender: TObject);
|
|
|
begin
|
|
|
table_delete(t_crm_client);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton3Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(t_crm_client);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.FormCloseQuery(Sender: TObject;
|
|
|
var CanClose: Boolean);
|
|
|
begin
|
|
|
// CanClose:=frm_close_query(t_crm_client_sales);
|
|
|
CanClose:=frm_close_query(t_crm_client);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_clientAfterScroll(DataSet: TDataSet);
|
|
|
|
|
|
begin
|
|
|
if v_all_client.IsEmpty then
|
|
|
begin
|
|
|
// DBEdit5.ReadOnly:=false;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
DBEdit2.ReadOnly:=True;
|
|
|
DBEdit53.ReadOnly:=True;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton6Click(Sender: TObject);
|
|
|
begin
|
|
|
t_crm_client_linkman.insert;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton7Click(Sender: TObject);
|
|
|
begin
|
|
|
table_post(t_crm_client_linkman);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton11Click(Sender: TObject);
|
|
|
begin
|
|
|
table_delete(t_crm_client_linkman);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton13Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(t_crm_client_linkman);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_linkmanAfterInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
t_crm_client_linkman['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_crm_client_linkman['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_crm_client_linkman['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_linkmanBeforePost(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
table_before_post(t_crm_client_linkman,'<27><><EFBFBD><EFBFBD>');
|
|
|
table_before_post(t_crm_client_linkman,'<27>Ա<EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton14Click(Sender: TObject);
|
|
|
begin
|
|
|
t_crm_client_link.insert;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton15Click(Sender: TObject);
|
|
|
begin
|
|
|
table_post(t_crm_client_link);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton16Click(Sender: TObject);
|
|
|
begin
|
|
|
table_delete(t_crm_client_link);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton17Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(t_crm_client_link);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_linkAfterInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
t_crm_client_link['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_crm_client_link['<27>Ӵ<EFBFBD><D3B4><EFBFBD>']:=employee;
|
|
|
t_crm_client_link['<27>Ӵ<EFBFBD><D3B4><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
t_crm_client_link['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_crm_client_link['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_linkBeforePost(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
table_before_post(t_crm_client_link,'<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
table_before_post(t_crm_client_link,'<27>Ӵ<EFBFBD><D3B4><EFBFBD>ʽ');
|
|
|
table_before_post(t_crm_client_link,'<27>Ӵ<EFBFBD>Ŀ<EFBFBD><C4BF>');
|
|
|
table_before_post(t_crm_client_link,'<27>ͻ<EFBFBD><CDBB><EFBFBD>Ա');
|
|
|
table_before_post(t_crm_client_link,'<27>Ӵ<EFBFBD><D3B4><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
table_before_post(t_crm_client_link,'ҵ<><D2B5>Ч<EFBFBD><D0A7>');
|
|
|
table_before_post(t_crm_client_link,'ҵ<><D2B5><EFBFBD>ܽ<EFBFBD>');
|
|
|
table_before_post(t_crm_client_link,'<27>Ӵ<EFBFBD><D3B4><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_clientBeforeDelete(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
IF (t_crm_client.fieldbyname('<27>ͻ<EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>')
|
|
|
or (t_crm_client.fieldbyname('<27>ͻ<EFBFBD>״̬').asstring='<27><>ʧ<EFBFBD>ͻ<EFBFBD>') then
|
|
|
begin
|
|
|
showmessage('<27><>ǰ<EFBFBD>ͻ<EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
if not v_all_client.IsEmpty then
|
|
|
begin
|
|
|
showmessage('<27><>ǰ<EFBFBD>ͻ<EFBFBD><CDBB>Ѿ<EFBFBD>ʹ<EFBFBD>ã<EFBFBD><C3A3><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
table_before_delete(t_crm_client_linkman,'<27><>ϵ<EFBFBD><CFB5>');
|
|
|
table_before_delete(t_crm_client_link,'ҵ<><D2B5><EFBFBD>Ӵ<EFBFBD>');
|
|
|
|
|
|
if if_open('415')=False then
|
|
|
begin
|
|
|
ShowMessage('<27><>û<EFBFBD><C3BB>ɾ<EFBFBD><C9BE><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
|
|
|
if do_data('7001',t_crm_client.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring,t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,'','','','')=false then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton9Click(Sender: TObject);
|
|
|
var
|
|
|
book1:Tbookmark;
|
|
|
begin
|
|
|
|
|
|
if t_crm_client.IsEmpty then
|
|
|
exit;
|
|
|
book1:=t_crm_client.GetBookmark;
|
|
|
t_crm_client.Refresh;
|
|
|
|
|
|
t_crm_client.GotoBookmark(book1);
|
|
|
|
|
|
GetDetail();
|
|
|
{
|
|
|
Memo1.Lines.Clear;
|
|
|
Memo2.Lines.Clear;
|
|
|
Memo3.Lines.Clear;
|
|
|
t_crm_client.Requery();
|
|
|
{t_crm_client.SQL.clear;
|
|
|
t_crm_client.sql.add('select * from t_crm_client where (<28>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> in ('+''''+'Ŀ<><C4BF>'+''''+','+''''+'ϵͳ'+''''+')');
|
|
|
t_crm_client.sql.add(' or ί<>е<EFBFBD>λ=1)');
|
|
|
t_crm_client.SQL.Add(' and '+open_data('7001','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no')
|
|
|
+'order by <20>ͻ<EFBFBD>״̬,<2C>ͻ<EFBFBD><CDBB><EFBFBD>ֵ,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
t_crm_client.open; }
|
|
|
{
|
|
|
v_all_client.Close;
|
|
|
v_all_client.open;
|
|
|
t_crm_client_linkman.Close;
|
|
|
t_crm_client_linkman.open;
|
|
|
t_crm_client_link.open;
|
|
|
t_crm_client_link.Close;
|
|
|
t_crm_client_contract.Close;
|
|
|
t_crm_client_contract.open;
|
|
|
}
|
|
|
//sys_print('<27><><EFBFBD>ۿͻ<DBBF><CDBB><EFBFBD>ӡ',2,t_crm_client1,t_crm_client_link1,nil,nil,t_crm_client_linkman1,nil,nil,nil,nil,nil,nil);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton10Click(Sender: TObject);
|
|
|
begin
|
|
|
query_client(1,'7001');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_clientBeforeEdit(DataSet: TDataSet);
|
|
|
begin
|
|
|
if not if_open('283') then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
if do_data('7001',t_crm_client.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring,t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,'','','','')=false then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit4KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit45);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit5KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit2);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit2KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit6);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit6KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit7);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit7KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit10);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit10KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit9);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit9KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit8);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit17KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
// key_DBEdit(Key,DBEdit18);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit1KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit3);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit3KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit12);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit12KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit11);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit11KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit13);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit13KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit14);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit14KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit16);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit16KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit15);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit15KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox8);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox8KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox2);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox2KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox5);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox5KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox4);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox4KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox1KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox3);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox3KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox7);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox7KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox6);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox6KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox12);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox12KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox13);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox13KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox15);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox15KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox14);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox14KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_DBMemo(Key,DBMemo4);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.RxDBLookupCombo11KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit20);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit20KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
// key_DBEdit(Key,DBEdit22);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit22KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit21);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit21KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
if wwDBComboBox7.Visible then
|
|
|
key_wwDBComboBox(Key,wwDBComboBox7);
|
|
|
if wwDBComboBox9.Visible then
|
|
|
key_wwDBComboBox(Key,wwDBComboBox9);
|
|
|
// if wwDBComboBox10.Visible then
|
|
|
// key_wwDBComboBox(Key,wwDBComboBox10);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit25KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBComboBox(Key,wwDBComboBox5);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.wwDBComboBox5KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit24);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit24KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit19);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit19KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit30);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit30KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit23);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit23KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit26);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit26KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit27);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit27KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox9);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox9KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox10);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox10KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox11);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox11KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit28);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit28KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit29);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit29KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit31);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit31KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit32);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit32KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit33);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit33KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit34);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit34KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBComboBox(Key,wwDBComboBox1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.wwDBComboBox1KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBMemo(Key,DBMemo1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit35KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBComboBox(Key,wwDBComboBox2);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.wwDBComboBox2KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit37);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit37KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit38);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit38KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit39);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit39KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit36);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit36KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit40);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit40KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit41);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit41KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit42);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit42KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit43);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit43KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit44);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit44KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBDateTimePicker(Key,wwDBDateTimePicker1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.wwDBDateTimePicker1KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_wwDBDateTimePicker(Key,wwDBDateTimePicker2);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.wwDBDateTimePicker4KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_DBMemo(Key,DBMemo2);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit46KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBComboBox(Key,wwDBComboBox3);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.wwDBComboBox3KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit47);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit47KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBDateTimePicker(Key,wwDBDateTimePicker5);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.wwDBDateTimePicker5KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_RxDBLookupCombo(Key,RxDBLookupCombo8);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.RxDBLookupCombo8KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit49);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit49KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBComboBox(Key,wwDBComboBox4);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.wwDBComboBox4KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBMemo(Key,DBMemo3);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_clientPostError(DataSet: TDataSet;
|
|
|
E: EDatabaseError; var Action: TDataAction);
|
|
|
begin
|
|
|
showmessage('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܱ<EFBFBD><DCB1>棡');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_clientDeleteError(DataSet: TDataSet;
|
|
|
E: EDatabaseError; var Action: TDataAction);
|
|
|
begin
|
|
|
showmessage('<27>ͻ<EFBFBD><CDBB>Ѿ<EFBFBD>ʹ<EFBFBD>ã<EFBFBD><C3A3><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.dxDBGrid1ColumnSorting(Sender: TObject;
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
begin
|
|
|
Column_sort(Column,t_crm_client,'<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit45KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
// key_DBEdit(Key,DBEdit5);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.RxDBLookupCombo1KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit18KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_RxDBLookupCombo(Key,RxDBLookupCombo14);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.RxDBLookupCombo14KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_RxDBLookupCombo(Key,RxDBLookupCombo1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit48Change(Sender: TObject);
|
|
|
begin
|
|
|
if DBEdit48.text='Ŀ<><C4BF>' then
|
|
|
begin
|
|
|
// DBEdit4.ReadOnly:=false;
|
|
|
DBEdit2.ReadOnly:=false;
|
|
|
DBEdit53.ReadOnly:=false;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
DBEdit4.ReadOnly:=true;
|
|
|
DBEdit2.ReadOnly:=True;
|
|
|
DBEdit53.ReadOnly:=True;
|
|
|
// DBEdit5.ReadOnly:=true;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.dxDBGrid1DblClick(Sender: TObject);
|
|
|
begin
|
|
|
GetDetail;
|
|
|
bsSkinTabSheet1.Show;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.N10Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_no(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.N14Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_all(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.N12Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid(dxdbgrid1,49);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.N16Click(Sender: TObject);
|
|
|
begin
|
|
|
grid_save_xls(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.N7Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_crm_client.IsEmpty then
|
|
|
exit;
|
|
|
if (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'Ŀ<><C4BF><EFBFBD>ͻ<EFBFBD>')
|
|
|
and (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
|
|
|
and (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'<27><>ȷ<EFBFBD><C8B7>')
|
|
|
and (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'DZ<>ڿͻ<DABF>')then
|
|
|
begin
|
|
|
showmessage('<27><>ǰ<EFBFBD>ͻ<EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><D7AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
t_crm_client.edit;
|
|
|
t_crm_client['<27>ͻ<EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>';
|
|
|
t_crm_client.post;
|
|
|
// Send_invocie_check_shen('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>:'+t_crm_client.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring,'092','45');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.N1Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_crm_client.IsEmpty then
|
|
|
exit;
|
|
|
if (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'Ŀ<><C4BF><EFBFBD>ͻ<EFBFBD>')
|
|
|
and (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
|
|
|
and (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'<27><>ȷ<EFBFBD><C8B7>')
|
|
|
and (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'DZ<>ڿͻ<DABF>')then
|
|
|
begin
|
|
|
showmessage('<27><>ǰ<EFBFBD>ͻ<EFBFBD>״̬<D7B4><CCAC><EFBFBD>ܸı䣡<C4B1><E4A3A1>');
|
|
|
exit;
|
|
|
end;
|
|
|
t_crm_client.edit;
|
|
|
t_crm_client['<27>ͻ<EFBFBD>״̬']:='<27><>ȷ<EFBFBD><C8B7>';
|
|
|
t_crm_client.post;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.N3Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_crm_client.IsEmpty then
|
|
|
exit;
|
|
|
if (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>')
|
|
|
or (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>')
|
|
|
or (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>')
|
|
|
or (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>')
|
|
|
then
|
|
|
begin
|
|
|
showmessage('<27><>ǰ<EFBFBD>ͻ<EFBFBD>״̬<D7B4><CCAC><EFBFBD>ܸı䣡<C4B1><E4A3A1>');
|
|
|
exit;
|
|
|
end;
|
|
|
t_crm_client.edit;
|
|
|
t_crm_client['<27>ͻ<EFBFBD>״̬']:=TMenuItem(Sender).Caption;
|
|
|
t_crm_client.post;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.N5Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_crm_client.IsEmpty then
|
|
|
exit;
|
|
|
if (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'Ŀ<><C4BF><EFBFBD>ͻ<EFBFBD>')
|
|
|
and (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
|
|
|
and (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'<27><>ȷ<EFBFBD><C8B7>')
|
|
|
and (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'DZ<>ڿͻ<DABF>')then
|
|
|
begin
|
|
|
showmessage('<27><>ǰ<EFBFBD>ͻ<EFBFBD>״̬<D7B4><CCAC><EFBFBD>ܸı䣡<C4B1><E4A3A1>');
|
|
|
exit;
|
|
|
end;
|
|
|
t_crm_client.edit;
|
|
|
t_crm_client['<27>ͻ<EFBFBD>״̬']:='Ŀ<><C4BF><EFBFBD>ͻ<EFBFBD>';
|
|
|
t_crm_client.post;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton8Click(Sender: TObject);
|
|
|
var
|
|
|
Pnt:Tpoint;
|
|
|
begin
|
|
|
Pnt:=bsSkinButton8.ClientToScreen(Point(0,bsSkinButton8.Height));
|
|
|
PopupMenu1.Popup(Pnt.x,Pnt.y);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.wwDBComboBox10KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBComboBox(Key,wwDBComboBox5);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.wwDBComboBox7KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
// key_DBEdit(Key,DBEdit25);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.wwDBComboBox9KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBComboBox(Key,wwDBComboBox8);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.wwDBComboBox8KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
// key_DBEdit(Key,DBEdit52);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.wwDBComboBox9Change(Sender: TObject);
|
|
|
begin
|
|
|
{
|
|
|
if wwDBComboBox9.text='Լ<><D4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
|
|
|
begin
|
|
|
bsSkinGroupBox12.Visible:=true ;
|
|
|
bsSkinGroupBox13.Visible:=false ;
|
|
|
end;
|
|
|
if wwDBComboBox9.text='Լ<><D4BC>ʱ<EFBFBD><CAB1>' then
|
|
|
begin
|
|
|
bsSkinGroupBox12.Visible:=false ;
|
|
|
bsSkinGroupBox13.Visible:=true ;
|
|
|
end else begin
|
|
|
bsSkinGroupBox12.Visible:=false ;
|
|
|
bsSkinGroupBox13.Visible:=false ;
|
|
|
end;
|
|
|
}
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.GetMenuItems;
|
|
|
var Item : TMenuItem;
|
|
|
I : SmallInt;
|
|
|
aQuery:TADOQuery;
|
|
|
begin
|
|
|
//////<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>
|
|
|
I :=PopupMenu1.Items.Count-1;
|
|
|
// TMenuItem(Sender).Count-1;
|
|
|
while I>0 do begin
|
|
|
PopupMenu1.Items.Delete(0);
|
|
|
I :=PopupMenu1.Items.Count-1;
|
|
|
end;
|
|
|
///////<2F><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>
|
|
|
{
|
|
|
Item:=TMenuItem.Create(Self);
|
|
|
Item.Caption:='-';
|
|
|
PopupMenu1.Items.Insert(0,Item);
|
|
|
}
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('Select * from t_code_customstatu');
|
|
|
Open;
|
|
|
if not IsEmpty then begin
|
|
|
First;
|
|
|
while not eof do begin
|
|
|
Item:=TMenuItem.Create(Self);
|
|
|
Item.Caption:=fieldbyName('<27>ͻ<EFBFBD>״̬').AsString;
|
|
|
Item.OnClick:=N3Click;
|
|
|
PopupMenu1.Items.Insert(0,Item);
|
|
|
Next;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_linkBeforeInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
if t_crm_client.State in [dsedit,dsinsert] then t_crm_client.post;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.RxDBComboBox2Enter(Sender: TObject);
|
|
|
begin
|
|
|
if RxDBComboBox1.ItemIndex=-1 then
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD>ͣ<EFBFBD>');
|
|
|
RxDBComboBox1.SetFocus;
|
|
|
Exit;
|
|
|
end;
|
|
|
RxDBComboBox2.Items.Clear;
|
|
|
case RxDBComboBox1.ItemIndex of
|
|
|
0,1:
|
|
|
begin
|
|
|
RxDBComboBox2.Items.Add('С<><D0A1>(200<30><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)') ;
|
|
|
RxDBComboBox2.Items.Add('<27><><EFBFBD><EFBFBD>(200-800<30><30>)') ;
|
|
|
RxDBComboBox2.Items.Add('<27><><EFBFBD><EFBFBD>(800<30><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)') ;
|
|
|
end;
|
|
|
2,3:
|
|
|
begin
|
|
|
RxDBComboBox2.Items.Add('С<><D0A1>(500<30><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)') ;
|
|
|
RxDBComboBox2.Items.Add('<27><><EFBFBD><EFBFBD>(500-1500<30><30>)') ;
|
|
|
RxDBComboBox2.Items.Add('<27><><EFBFBD><EFBFBD>(1500<30><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)') ;
|
|
|
end;
|
|
|
end;
|
|
|
RxDBComboBox2.ItemIndex:=-1;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.RxDBComboBox2Exit(Sender: TObject);
|
|
|
begin
|
|
|
//key_DBEdit(Key,DBEdit18);
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.N8Click(Sender: TObject);
|
|
|
begin
|
|
|
try
|
|
|
frm_op_crm_detail_modify:=Tfrm_op_crm_detail_modify.Create (self);
|
|
|
frm_op_crm_detail_modify.Caption:='ѡ<><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
frm_op_crm_detail_modify.dxDBGrid1.Columns[0].FieldName:='Checked';
|
|
|
frm_op_crm_detail_modify.dxDBGrid1.Columns[0].Caption:='<27>Ƿ<EFBFBD>ѡ<EFBFBD><D1A1>';
|
|
|
frm_op_crm_detail_modify.dxDBGrid1.Columns[1].FieldName:='<27><><EFBFBD><EFBFBD>';
|
|
|
frm_op_crm_detail_modify.dxDBGrid1.KeyField:='<27><><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD>';
|
|
|
frm_op_crm_detail_modify.ModifyType:=1;
|
|
|
frm_op_crm_detail_modify.ShowModal;
|
|
|
finally
|
|
|
frm_op_crm_detail_modify.Free;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.GetDetail;
|
|
|
var
|
|
|
i:Integer;
|
|
|
s,str:string;
|
|
|
aQuery,Query:TADOQuery;
|
|
|
begin
|
|
|
Memo1.Lines.Clear;
|
|
|
Memo2.Lines.Clear;
|
|
|
Memo3.Lines.Clear;
|
|
|
Query:=CreateAdoQuery;
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
with Query do
|
|
|
begin
|
|
|
Close;
|
|
|
SQL.Clear;
|
|
|
SQL.Add('select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_crm_client where <20><><EFBFBD><EFBFBD>='+QuotedStr(t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString) );
|
|
|
Open;
|
|
|
end;
|
|
|
if Query.RecordCount=0 then Memo1.Lines.Clear;
|
|
|
s:=Query.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
str:='';
|
|
|
while (Trim(s)<>'') do
|
|
|
begin
|
|
|
str:=Copy(s,0,Pos(',',s)-1);
|
|
|
aQuery.Close;
|
|
|
aQuery.SQL.Clear;
|
|
|
aQuery.SQL.Add('select * from #Outport where <20><><EFBFBD><EFBFBD>='+QuotedStr(str) ) ;
|
|
|
aQuery.Open;
|
|
|
if not aQuery.IsEmpty then
|
|
|
begin
|
|
|
Memo1.Lines.Add(aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
|
|
|
end;
|
|
|
s:=Copy(s,Pos(',',s)+1,Length(s)-Pos(',',s));
|
|
|
end;
|
|
|
//<2F><>Ӫ<EFBFBD><D3AA>Ʒ
|
|
|
with Query do
|
|
|
begin
|
|
|
Close;
|
|
|
SQL.Clear;
|
|
|
SQL.Add('select <20><>Ӫ<EFBFBD><D3AA>Ʒ from t_crm_client where <20><><EFBFBD><EFBFBD>='+QuotedStr(t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString) );
|
|
|
Open;
|
|
|
end;
|
|
|
if Query.RecordCount=0 then Memo3.Lines.Clear;
|
|
|
s:=Query.fieldbyname('<27><>Ӫ<EFBFBD><D3AA>Ʒ').AsString;
|
|
|
str:='';
|
|
|
while (Trim(s)<>'') do
|
|
|
begin
|
|
|
str:=Copy(s,0,Pos(',',s)-1);
|
|
|
aQuery.Close;
|
|
|
aQuery.SQL.Clear;
|
|
|
aQuery.SQL.Add('select * from t_code_goods where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+QuotedStr(str) ) ;
|
|
|
aQuery.Open;
|
|
|
if not aQuery.IsEmpty then Memo3.Lines.Add(aQuery.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString);
|
|
|
s:=Copy(s,Pos(',',s)+1,Length(s)-Pos(',',s));
|
|
|
end;
|
|
|
//<2F><>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD>
|
|
|
{ with Query do
|
|
|
begin
|
|
|
Close;
|
|
|
SQL.Clear;
|
|
|
SQL.Add('select <20><>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD> from t_crm_client where <20><><EFBFBD><EFBFBD>='+QuotedStr(t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString) );
|
|
|
Open;
|
|
|
end;
|
|
|
s:=Query.fieldbyname('<27><>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD>').AsString;
|
|
|
str:='';
|
|
|
while (Trim(s)<>'') do
|
|
|
begin
|
|
|
str:=Copy(s,0,Pos(',',s)-1);
|
|
|
aQuery.Close;
|
|
|
aQuery.SQL.Clear;
|
|
|
aQuery.SQL.Add('select * from t_code_trade where <20><><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD>='+QuotedStr(str) ) ;
|
|
|
aQuery.Open;
|
|
|
if not aQuery.IsEmpty then Memo4.Lines.Add(aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
|
|
|
s:=Copy(s,Pos(',',s)+1,Length(s)-Pos(',',s));
|
|
|
end; }
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
with Query do
|
|
|
begin
|
|
|
Close;
|
|
|
SQL.Clear;
|
|
|
SQL.Add('select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_crm_client where <20><><EFBFBD><EFBFBD>='+QuotedStr(t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString) );
|
|
|
Open;
|
|
|
end;
|
|
|
if Query.RecordCount=0 then Memo2.Lines.Clear;
|
|
|
s:=Query.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
str:='';
|
|
|
while (Trim(s)<>'') do
|
|
|
begin
|
|
|
str:=Copy(s,0,Pos(',',s)-1);
|
|
|
aQuery.Close;
|
|
|
aQuery.SQL.Clear;
|
|
|
aQuery.SQL.Add('select * from #HZCD where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='+QuotedStr(str) ) ;
|
|
|
aQuery.Open;
|
|
|
if not aQuery.IsEmpty then Memo2.Lines.Add(aQuery.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString);
|
|
|
s:=Copy(s,Pos(',',s)+1,Length(s)-Pos(',',s));
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.MenuItem8Click(Sender: TObject);
|
|
|
begin
|
|
|
try
|
|
|
frm_op_crm_detail_modify:=Tfrm_op_crm_detail_modify.Create (self);
|
|
|
frm_op_crm_detail_modify.Caption:='ѡ<><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
frm_op_crm_detail_modify.dxDBGrid1.Columns[0].FieldName:='Checked';
|
|
|
frm_op_crm_detail_modify.dxDBGrid1.Columns[0].Caption:='<27>Ƿ<EFBFBD>ѡ<EFBFBD><D1A1>';
|
|
|
frm_op_crm_detail_modify.dxDBGrid1.Columns[1].FieldName:='<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
frm_op_crm_detail_modify.dxDBGrid1.KeyField:='<27><><EFBFBD><EFBFBD>';
|
|
|
frm_op_crm_detail_modify.ModifyType:=2;
|
|
|
frm_op_crm_detail_modify.ShowModal;
|
|
|
finally
|
|
|
frm_op_crm_detail_modify.Free;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.MenuItem9Click(Sender: TObject);
|
|
|
begin
|
|
|
try
|
|
|
frm_op_crm_detail_modify:=Tfrm_op_crm_detail_modify.Create (self);
|
|
|
frm_op_crm_detail_modify.Caption:='ѡ<><EFBFBD><F1B9A4B3><EFBFBD>Ӫ<EFBFBD><D3AA>Ʒ';
|
|
|
frm_op_crm_detail_modify.dxDBGrid1.Columns[0].FieldName:='Checked';
|
|
|
frm_op_crm_detail_modify.dxDBGrid1.Columns[0].Caption:='<27>Ƿ<EFBFBD>ѡ<EFBFBD><D1A1>';
|
|
|
frm_op_crm_detail_modify.dxDBGrid1.Columns[1].FieldName:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
frm_op_crm_detail_modify.dxDBGrid1.KeyField:='<27><><EFBFBD><EFBFBD>';
|
|
|
frm_op_crm_detail_modify.ModifyType:=3;
|
|
|
frm_op_crm_detail_modify.ShowModal;
|
|
|
finally
|
|
|
frm_op_crm_detail_modify.Free;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.dxDBGrid5Click(Sender: TObject);
|
|
|
begin
|
|
|
GetDetail;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton19Click(Sender: TObject);
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
i:Integer;
|
|
|
khlx,qyxz,lhr:string;
|
|
|
begin
|
|
|
khlx:=RxDBComboBox1.Text;
|
|
|
qyxz:=RxDBComboBox3.Text;
|
|
|
lhr:=RxDBLookupCombo14.Text;
|
|
|
t_crm_client.append;
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
with aQuery do
|
|
|
begin
|
|
|
Close;
|
|
|
SQL.Clear;
|
|
|
SQL.Add('select max(cast(<28><><EFBFBD><EFBFBD> as int)) as maxxh from t_crm_client');
|
|
|
Open;
|
|
|
end;
|
|
|
if aQuery.RecordCount=0 then i:=0 else i:=aQuery.fieldbyname('maxxh').AsInteger;
|
|
|
DBEdit4.Text:=LeftFillZero(IntToStr(i+1),6);
|
|
|
FreeAndNil(aQuery);
|
|
|
RxDBComboBox1.ItemIndex:=RxDBComboBox1.Items.IndexOf(khlx);
|
|
|
RxDBComboBox3.ItemIndex:=RxDBComboBox3.Items.IndexOf(qyxz);
|
|
|
bsSkinTabSheet1.Show;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.FormCreate(Sender: TObject);
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
Chfx:array[0..17] of string;
|
|
|
Hzcd:array[0..19] of string;
|
|
|
i:Integer;
|
|
|
begin
|
|
|
Chfx[0]:='ŷ<><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD><EFBFBD>½&<26><><EFBFBD>ĺ<DEB5>';
|
|
|
Chfx[1]:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǵ<EFBFBD><C7B5><EFBFBD><EFBFBD>Ǻ<EFBFBD>';
|
|
|
Chfx[2]:= '<27>ض<EFBFBD> <20>ں<EFBFBD>';
|
|
|
Chfx[3]:= '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/ī<><C4AB><EFBFBD>缰<EFBFBD><E7BCB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
Chfx[4]:= '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ձ<EFBFBD>';
|
|
|
Chfx[5]:= '<27><><EFBFBD><EFBFBD>';
|
|
|
Chfx[6]:= '<27><><EFBFBD>Ϸ<EFBFBD>';
|
|
|
Chfx[7]:= '<27><><EFBFBD><EFBFBD>';
|
|
|
Chfx[8]:= '<27><><EFBFBD><EFBFBD>';
|
|
|
Chfx[9]:= '<27><><EFBFBD><EFBFBD>';
|
|
|
Chfx[10]:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>½';
|
|
|
Chfx[11]:='<27><><EFBFBD>ô<EFBFBD>';
|
|
|
Chfx[12]:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
Chfx[13]:='ӡ<><D3A1>';
|
|
|
Chfx[14]:='<27>캣';
|
|
|
Chfx[15]:='<27>ж<EFBFBD>';
|
|
|
Chfx[16]:='<27><><EFBFBD><EFBFBD>';
|
|
|
Chfx[17]:='<27>պ<EFBFBD>';
|
|
|
Hzcd[0]:= 'APL';
|
|
|
Hzcd[1]:= 'CMA-CGM';
|
|
|
Hzcd[2]:= 'COSCO';
|
|
|
Hzcd[3]:= 'EMC';
|
|
|
Hzcd[4]:= 'HAPAG-LLOYD';
|
|
|
Hzcd[5]:= 'MSC';
|
|
|
Hzcd[6]:= 'MAERSK';
|
|
|
Hzcd[7]:= 'ONE';
|
|
|
Hzcd[8]:= 'OOCL';
|
|
|
Hzcd[9]:= 'ZIM';
|
|
|
Hzcd[10]:='<27><><EFBFBD><EFBFBD>';
|
|
|
Hzcd[11]:='<27><><EFBFBD><EFBFBD>';
|
|
|
Hzcd[12]:='<27><><EFBFBD><EFBFBD>';
|
|
|
Hzcd[13]:='<27><><EFBFBD><EFBFBD>';
|
|
|
Hzcd[14]:='ɭ<><C9AD>';
|
|
|
Hzcd[15]:='̫ƽ';
|
|
|
Hzcd[16]:='<27><><EFBFBD><EFBFBD>';
|
|
|
Hzcd[17]:='<27>ִ<EFBFBD>';
|
|
|
Hzcd[18]:='<27><><EFBFBD><EFBFBD>';
|
|
|
Hzcd[19]:='<27><><EFBFBD><EFBFBD>';
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
with aQuery do
|
|
|
begin
|
|
|
Close;
|
|
|
SQL.Clear;
|
|
|
SQL.Add('CREATE TABLE #Outport (<28><><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD> varchar(10) null, <20><><EFBFBD><EFBFBD> varchar(30) null) CREATE TABLE #HZCD (<28><><EFBFBD><EFBFBD> varchar(10) null, <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> varchar(30) null) ' );
|
|
|
ExecSQL;
|
|
|
for i:=0 to 17 do
|
|
|
begin
|
|
|
Close;
|
|
|
SQL.Clear;
|
|
|
SQL.Add('INSERT INTO #Outport VALUES ('+QuotedStr(IntToStr(i))+','+QuotedStr(Chfx[i])+')');
|
|
|
ExecSQL;
|
|
|
end;
|
|
|
for i:=0 to 19 do
|
|
|
begin
|
|
|
Close;
|
|
|
SQL.Clear;
|
|
|
SQL.Add('INSERT INTO #HZCD VALUES ('+QuotedStr(IntToStr(i))+','+QuotedStr(Hzcd[i])+')');
|
|
|
ExecSQL;
|
|
|
end;
|
|
|
end;
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_clientBeforeInsert(DataSet: TDataSet);
|
|
|
begin
|
|
|
if not if_open('202') then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit4Change(Sender: TObject);
|
|
|
begin
|
|
|
GetDetail;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.wwDBLookupCombo21Enter(Sender: TObject);
|
|
|
begin
|
|
|
if not t_sys_country_code.Active then t_sys_country_code.Open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.wwDBLookupCombo21Exit(Sender: TObject);
|
|
|
begin
|
|
|
{
|
|
|
if Trim(wwDBLookupCombo21.DisplayValue)='' then
|
|
|
begin
|
|
|
ShowMessage('<27><>û<EFBFBD><C3BB>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD>Ҵ<EFBFBD><D2B4>룡');
|
|
|
wwDBLookupCombo21.SetFocus;
|
|
|
Exit;
|
|
|
end;
|
|
|
with t_sys_country_qycode do
|
|
|
begin
|
|
|
Close;
|
|
|
Parameters.ParamByName('<27><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').Value:=wwDBLookupCombo21.DisplayValue;
|
|
|
Open;
|
|
|
end;
|
|
|
}
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit5Exit(Sender: TObject);
|
|
|
begin
|
|
|
{if Trim(t_crm_client.FieldByName('<27><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)='USCI' then
|
|
|
begin
|
|
|
if Length(DBEdit5.Text)<>18 then
|
|
|
begin
|
|
|
ShowMessage('USCI<43><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ18λ<38><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+IntToStr(Length(DBEdit5.Text))+'λ,<2C><><EFBFBD><EFBFBD><EFBFBD>飡');
|
|
|
Exit;
|
|
|
end;
|
|
|
end;
|
|
|
if Trim(t_crm_client.FieldByName('<27><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)='OC' then
|
|
|
begin
|
|
|
if Length(DBEdit5.Text)<>9 then
|
|
|
begin
|
|
|
ShowMessage('OC<4F><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ9λ<39><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+IntToStr(Length(DBEdit5.Text))+'λ,<2C><><EFBFBD><EFBFBD><EFBFBD>飡');
|
|
|
Exit;
|
|
|
end;
|
|
|
end; }
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.wwDBLookupCombo1Enter(Sender: TObject);
|
|
|
begin
|
|
|
{
|
|
|
if Trim(wwDBLookupCombo21.DisplayValue)='' then
|
|
|
begin
|
|
|
ShowMessage('<27><>û<EFBFBD><C3BB>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD>Ҵ<EFBFBD><D2B4>룡');
|
|
|
wwDBLookupCombo21.SetFocus;
|
|
|
Exit;
|
|
|
end;
|
|
|
with t_sys_country_qycode do
|
|
|
begin
|
|
|
Close;
|
|
|
Parameters.ParamByName('<27><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').Value:=wwDBLookupCombo21.DisplayValue;
|
|
|
Open;
|
|
|
end;
|
|
|
}
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.wwDBLookupCombo1Exit(Sender: TObject);
|
|
|
var
|
|
|
LengthQ,PosQ:Integer;
|
|
|
s:string;
|
|
|
begin
|
|
|
{
|
|
|
LengthQ :=Length(t_crm_client.fieldbyname('<27><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>').AsString);
|
|
|
PosQ:=Pos('+',t_crm_client.fieldbyname('<27><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>').AsString);
|
|
|
t_crm_client.Active:=True;
|
|
|
t_crm_client.Edit;
|
|
|
if PosQ=0 then
|
|
|
begin
|
|
|
t_crm_client.FieldByName('<27><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>').AsString:=wwDBLookupCombo1.DisplayValue+'+'+DBEdit5.text
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
s:=Copy(t_crm_client.fieldbyname('<27><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>').AsString,PosQ+1,LengthQ-POSQ+1);
|
|
|
t_crm_client.FieldByName('<27><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>').AsString:=wwDBLookupCombo1.DisplayValue+'+'+s;
|
|
|
end;
|
|
|
}
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.wwDBLookupCombo1MouseEnter(
|
|
|
Sender: TObject);
|
|
|
var
|
|
|
LengthQ,PosQ:Integer;
|
|
|
s:string;
|
|
|
begin
|
|
|
{
|
|
|
LengthQ :=Length(t_crm_client.fieldbyname('<27><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>').AsString);
|
|
|
PosQ:=Pos('+',t_crm_client.fieldbyname('<27><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>').AsString);
|
|
|
t_crm_client.Active:=True;
|
|
|
t_crm_client.Edit;
|
|
|
if PosQ=0 then
|
|
|
begin
|
|
|
t_crm_client.FieldByName('<27><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>').AsString:=wwDBLookupCombo1.DisplayValue+'+'+DBEdit5.text;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
s:=Copy(t_crm_client.fieldbyname('<27><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>').AsString,PosQ+1,LengthQ-POSQ+1);
|
|
|
t_crm_client.FieldByName('<27><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>').AsString:=wwDBLookupCombo1.DisplayValue+'+'+s;
|
|
|
end;
|
|
|
}
|
|
|
end;
|
|
|
|
|
|
end.
|