You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1019 lines
29 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

unit u_crm_client_ship;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, dxExEdtr, DB, ADODB, ComCtrls, DBCtrls, dxDBGrid, dxDBTLCl,
dxGrClms, wwdbdatetimepicker, wwdbedit, Wwdotdot, Wwdbcomb, RxLookup,
StdCtrls, bsSkinCtrls, bsdbctrls, Mask, bsSkinTabs, ExtCtrls, dxTL,
dxDBCtrl, dxCntner, Menus, XPMenu, wwdblook;
type
Tfrm_crm_client_ship = class(TForm)
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
Panel2: TPanel;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
bsSkinButton8: TbsSkinButton;
bsSkinButton12: TbsSkinButton;
bsSkinPageControl1: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
bsSkinGroupBox1: TbsSkinGroupBox;
Label1: TLabel;
Label3: TLabel;
Label9: TLabel;
Label12: TLabel;
DBEdit1: TDBEdit;
DBEdit3: TDBEdit;
DBEdit11: TDBEdit;
DBEdit12: TDBEdit;
bsSkinGroupBox2: TbsSkinGroupBox;
Label13: TLabel;
Label14: TLabel;
Label15: TLabel;
Label16: TLabel;
DBEdit13: TDBEdit;
DBEdit14: TDBEdit;
DBEdit15: TDBEdit;
DBEdit16: TDBEdit;
bsSkinGroupBox4: TbsSkinGroupBox;
bsSkinGroupBox10: TbsSkinGroupBox;
DBMemo4: TDBMemo;
bsSkinTabSheet2: TbsSkinTabSheet;
bsSkinTabSheet3: TbsSkinTabSheet;
Label36: TLabel;
Label37: TLabel;
Label38: TLabel;
Label39: TLabel;
Label40: TLabel;
Label41: TLabel;
Label42: TLabel;
Label43: TLabel;
Label44: TLabel;
Label47: TLabel;
Label48: TLabel;
Label49: TLabel;
Label50: TLabel;
Label51: TLabel;
Label52: TLabel;
Label53: TLabel;
dxDBGrid2: TdxDBGrid;
dxDBGrid2Column1: TdxDBGridMaskColumn;
dxDBGrid2Column2: TdxDBGridMaskColumn;
dxDBGrid2Column3: TdxDBGridMaskColumn;
DBEdit35: TDBEdit;
DBEdit37: TDBEdit;
DBEdit38: TDBEdit;
DBEdit39: TDBEdit;
wwDBComboBox2: TwwDBComboBox;
DBEdit36: TDBEdit;
DBEdit40: TDBEdit;
DBEdit41: TDBEdit;
DBEdit42: TDBEdit;
DBEdit43: TDBEdit;
DBEdit44: TDBEdit;
wwDBDateTimePicker1: TwwDBDateTimePicker;
wwDBDateTimePicker2: TwwDBDateTimePicker;
wwDBDateTimePicker3: TwwDBDateTimePicker;
wwDBDateTimePicker4: TwwDBDateTimePicker;
DBMemo2: TDBMemo;
bsSkinButton6: TbsSkinButton;
bsSkinButton7: TbsSkinButton;
bsSkinButton11: TbsSkinButton;
bsSkinButton13: TbsSkinButton;
bsSkinTabSheet4: TbsSkinTabSheet;
Label54: TLabel;
Label55: TLabel;
Label56: TLabel;
Label57: TLabel;
Label58: TLabel;
Label59: TLabel;
Label60: TLabel;
Label61: TLabel;
dxDBGrid3: TdxDBGrid;
dxDBGrid3Column1: TdxDBGridMaskColumn;
dxDBGrid3Column2: TdxDBGridDateColumn;
bsSkinButton14: TbsSkinButton;
bsSkinButton15: TbsSkinButton;
bsSkinButton16: TbsSkinButton;
bsSkinButton17: TbsSkinButton;
DBEdit46: TDBEdit;
DBEdit47: TDBEdit;
DBEdit49: TDBEdit;
wwDBComboBox3: TwwDBComboBox;
wwDBDateTimePicker5: TwwDBDateTimePicker;
wwDBComboBox4: TwwDBComboBox;
DBMemo3: TDBMemo;
bsSkinTabSheet5: TbsSkinTabSheet;
dxDBGrid4: TdxDBGrid;
dxDBGrid4Column6: TdxDBGridColumn;
dxDBGridMaskColumn2: TdxDBGridMaskColumn;
dxDBGridMaskColumn3: TdxDBGridMaskColumn;
dxDBGridDateColumn1: TdxDBGridDateColumn;
dxDBGrid1Column12: TdxDBGridColumn;
dxDBGrid1Column5: TdxDBGridDateColumn;
bsSkinGroupBox9: TbsSkinGroupBox;
DBRichEdit1: TDBRichEdit;
t_crm_client: TADOQuery;
t_crm_client1: TDataSource;
t_crm_client_linkman: TADOQuery;
t_crm_client_linkman1: TDataSource;
t_crm_client_link: TADOQuery;
t_crm_client_link1: TDataSource;
t_crm_client_contract: TADOQuery;
t_crm_client_contract1: TDataSource;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
XPMenu1: TXPMenu;
t_crm_client_trade: TADOQuery;
t_crm_client_trade1: TDataSource;
bsSkinButton18: TbsSkinButton;
bsSkinButton19: TbsSkinButton;
bsSkinButton20: TbsSkinButton;
bsSkinButton21: TbsSkinButton;
dxDBGrid5: TdxDBGrid;
dxDBGrid5Column1: TdxDBGridMaskColumn;
dxDBGrid5Column2: TdxDBGridMaskColumn;
Label21: TLabel;
RxDBLookupCombo20: TRxDBLookupCombo;
Label124: TLabel;
wwDBLookupCombo52: TwwDBLookupCombo;
Label19: TLabel;
DBEdit19: TDBEdit;
Label20: TLabel;
DBEdit20: TDBEdit;
Label22: TLabel;
DBMemo1: TDBMemo;
v_all_client: TADOQuery;
bsSkinGroupBox3: TbsSkinGroupBox;
Label4: TLabel;
Label5: TLabel;
Label2: TLabel;
Label7: TLabel;
Label6: TLabel;
Label10: TLabel;
Label11: TLabel;
Label8: TLabel;
Label17: TLabel;
Label18: TLabel;
Label24: TLabel;
DBEdit4: TDBEdit;
DBEdit5: TDBEdit;
DBEdit2: TDBEdit;
DBEdit7: TDBEdit;
DBEdit6: TDBEdit;
DBEdit10: TDBEdit;
DBEdit9: TDBEdit;
DBEdit8: TDBEdit;
DBEdit17: TDBEdit;
DBEdit18: TDBEdit;
DBEdit21: TDBEdit;
bsSkinDBCheckRadioBox5: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox12: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox1: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox2: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox4: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox3: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox6: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox7: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox8: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox13: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox14: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox15: TbsSkinDBCheckRadioBox;
dxDBGrid1Column4: TdxDBGridColumn;
wwDBLookupCombo1: TwwDBLookupCombo;
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 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_client_linkBeforeInsert(DataSet: TDataSet);
procedure t_crm_clientBeforeDelete(DataSet: TDataSet);
procedure bsSkinButton9Click(Sender: TObject);
procedure t_crm_client_linkBeforeEdit(DataSet: TDataSet);
procedure N1Click(Sender: TObject);
procedure N2Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure bsSkinButton18Click(Sender: TObject);
procedure bsSkinButton19Click(Sender: TObject);
procedure bsSkinButton20Click(Sender: TObject);
procedure bsSkinButton21Click(Sender: TObject);
procedure t_crm_client_tradeAfterInsert(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 DBEdit8KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit17KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit18KeyPress(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 RxDBLookupCombo20KeyPress(Sender: TObject; var Key: Char);
procedure wwDBLookupCombo52KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit19KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit20KeyPress(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 wwDBDateTimePicker2KeyPress(Sender: TObject; var Key: Char);
procedure wwDBDateTimePicker3KeyPress(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 DBEdit49KeyPress(Sender: TObject; var Key: Char);
procedure wwDBComboBox4KeyPress(Sender: TObject; var Key: Char);
procedure t_crm_clientDeleteError(DataSet: TDataSet; E: EDatabaseError;
var Action: TDataAction);
procedure t_crm_clientPostError(DataSet: TDataSet; E: EDatabaseError;
var Action: TDataAction);
procedure t_crm_clientAfterScroll(DataSet: TDataSet);
procedure dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
procedure DBEdit21KeyPress(Sender: TObject; var Key: Char);
procedure t_crm_clientAfterPost(DataSet: TDataSet);
procedure t_crm_clientBeforeCancel(DataSet: TDataSet);
procedure wwDBLookupCombo1KeyPress(Sender: TObject; var Key: Char);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_crm_client_ship: Tfrm_crm_client_ship;
frm_crm_client_ship_num:integer;
implementation
uses u_main, my_sys_function, u_data_share;
{$R *.dfm}
procedure Tfrm_crm_client_ship.FormShow(Sender: TObject);
begin
t_crm_client.SQL.clear;
t_crm_client.sql.add('select * from t_crm_client where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><>'+''''+'Ŀ<><C4BF>'+'''');
t_crm_client.sql.add(' and <20><><EFBFBD><EFBFBD>˾=1 ');
t_crm_client.SQL.Add(' and '+open_data('8001','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no')
+'order by <20>ͻ<EFBFBD>״̬,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
t_crm_client.open;
t_crm_client_linkman.open;
t_crm_client_link.open;
t_crm_client_contract.open;
t_crm_client_trade.open;
v_all_client.open;
frm_data_share.t_code_trade.requery;
frm_data_share.t_code_disport.requery;
dxDBGrid1.FullExpand;
end;
procedure Tfrm_crm_client_ship.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
frm_crm_client_ship.Hide;
frm_crm_client_ship.ManualFloat(frm_crm_client_ship.BoundsRect );
frm_main.freeTabs('frm_crm_client_ship');
action:=cafree;
frm_crm_client_ship:=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_ship.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_crm_client_ship.Panel2Resize(Sender: TObject);
var
i:integer;
begin
i:=round(Panel2.width/8);
bsSkinButton9.width:=i;
bsSkinButton12.width:=i;
bsSkinButton1.width:=i;
bsSkinButton2.width:=i;
bsSkinButton4.width:=i;
bsSkinButton3.width:=i;
bsSkinButton8.width:=i;
end;
procedure Tfrm_crm_client_ship.bsSkinButton12Click(Sender: TObject);
begin
if bsSkinButton12.Caption='չ <20><>' then
begin
dxdbgrid1.FullExpand;
bsSkinButton12.Caption:='<27><> <20><>';
end
else
begin
dxdbgrid1.FullCollapse;
bsSkinButton12.Caption:='չ <20><>';
end;
end;
procedure Tfrm_crm_client_ship.t_crm_clientAfterInsert(DataSet: TDataSet);
begin
t_crm_client['<27>ͻ<EFBFBD>״̬']:='<27><>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>';
t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:='<27><>';
t_crm_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
t_crm_client['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_crm_client['<27><><EFBFBD><EFBFBD>˾']:=1;
frm_crm_client_ship_num:=1;
t_crm_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='Լ<><D4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_crm_client_ship.t_crm_clientBeforePost(DataSet: TDataSet);
begin
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.State=dsedit then
begin
if t_crm_client.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OldValue<>t_crm_client.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString then
begin
frm_crm_client_ship_num:=2;
end
else
frm_crm_client_ship_num:=0;
end;
end;
procedure Tfrm_crm_client_ship.bsSkinButton1Click(Sender: TObject);
begin
t_crm_client.append;
end;
procedure Tfrm_crm_client_ship.bsSkinButton2Click(Sender: TObject);
begin
table_post(t_crm_client);
end;
procedure Tfrm_crm_client_ship.bsSkinButton4Click(Sender: TObject);
begin
table_delete(t_crm_client);
end;
procedure Tfrm_crm_client_ship.bsSkinButton3Click(Sender: TObject);
begin
table_cancel(t_crm_client);
end;
procedure Tfrm_crm_client_ship.FormCloseQuery(Sender: TObject;
var CanClose: Boolean);
begin
CanClose:=frm_close_query(t_crm_client);
end;
procedure Tfrm_crm_client_ship.bsSkinButton6Click(Sender: TObject);
begin
t_crm_client_linkman.insert;
end;
procedure Tfrm_crm_client_ship.bsSkinButton7Click(Sender: TObject);
begin
table_post(t_crm_client_linkman);
end;
procedure Tfrm_crm_client_ship.bsSkinButton11Click(Sender: TObject);
begin
table_delete(t_crm_client_linkman);
end;
procedure Tfrm_crm_client_ship.bsSkinButton13Click(Sender: TObject);
begin
table_cancel(t_crm_client_linkman);
end;
procedure Tfrm_crm_client_ship.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_ship.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_ship.bsSkinButton14Click(Sender: TObject);
begin
t_crm_client_link.insert;
end;
procedure Tfrm_crm_client_ship.bsSkinButton15Click(Sender: TObject);
begin
table_post(t_crm_client_link);
end;
procedure Tfrm_crm_client_ship.bsSkinButton16Click(Sender: TObject);
begin
table_delete(t_crm_client_link);
end;
procedure Tfrm_crm_client_ship.bsSkinButton17Click(Sender: TObject);
begin
table_cancel(t_crm_client_link);
end;
procedure Tfrm_crm_client_ship.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_ship.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_ship.t_crm_client_linkBeforeInsert(
DataSet: TDataSet);
begin
table_post(t_crm_client);
if do_data('8001',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_ship.t_crm_clientBeforeDelete(DataSet: TDataSet);
begin
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 do_data('8001',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_ship.bsSkinButton9Click(Sender: TObject);
begin
sys_print('<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE>ӡ',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_ship.t_crm_client_linkBeforeEdit(
DataSet: TDataSet);
begin
if do_data('8001',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_ship.N1Click(Sender: TObject);
begin
if t_crm_client.isempty then
exit;
t_crm_client.edit;
t_crm_client['<27>ͻ<EFBFBD>״̬']:='Э<><D0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_crm_client.post;
end;
procedure Tfrm_crm_client_ship.N2Click(Sender: TObject);
begin
if t_crm_client.isempty then
exit;
t_crm_client.edit;
t_crm_client['<27>ͻ<EFBFBD>״̬']:='<27><>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>';
t_crm_client.post;
end;
procedure Tfrm_crm_client_ship.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_ship.bsSkinButton18Click(Sender: TObject);
begin
t_crm_client_trade.insert;
end;
procedure Tfrm_crm_client_ship.bsSkinButton19Click(Sender: TObject);
begin
table_post(t_crm_client_trade);
end;
procedure Tfrm_crm_client_ship.bsSkinButton20Click(Sender: TObject);
begin
table_delete(t_crm_client_trade);
end;
procedure Tfrm_crm_client_ship.bsSkinButton21Click(Sender: TObject);
begin
table_cancel(t_crm_client_trade);
end;
procedure Tfrm_crm_client_ship.t_crm_client_tradeAfterInsert(
DataSet: TDataSet);
begin
t_crm_client_trade['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'];
t_crm_client_trade['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_crm_client_trade['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
end;
procedure Tfrm_crm_client_ship.DBEdit4KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit21);
end;
procedure Tfrm_crm_client_ship.DBEdit5KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit2);
end;
procedure Tfrm_crm_client_ship.DBEdit2KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit6);
end;
procedure Tfrm_crm_client_ship.DBEdit6KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit7);
end;
procedure Tfrm_crm_client_ship.DBEdit7KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit10);
end;
procedure Tfrm_crm_client_ship.DBEdit10KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit9);
end;
procedure Tfrm_crm_client_ship.DBEdit9KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit8);
end;
procedure Tfrm_crm_client_ship.DBEdit8KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit7);
end;
procedure Tfrm_crm_client_ship.DBEdit17KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit18);
end;
procedure Tfrm_crm_client_ship.DBEdit18KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit1);
end;
procedure Tfrm_crm_client_ship.DBEdit1KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit3);
end;
procedure Tfrm_crm_client_ship.DBEdit3KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit12);
end;
procedure Tfrm_crm_client_ship.DBEdit12KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit11);
end;
procedure Tfrm_crm_client_ship.DBEdit11KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit13);
end;
procedure Tfrm_crm_client_ship.DBEdit13KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit14);
end;
procedure Tfrm_crm_client_ship.DBEdit14KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit16);
end;
procedure Tfrm_crm_client_ship.DBEdit16KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit15);
end;
procedure Tfrm_crm_client_ship.DBEdit15KeyPress(Sender: TObject;
var Key: Char);
begin
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox8);
end;
procedure Tfrm_crm_client_ship.bsSkinDBCheckRadioBox8KeyPress(
Sender: TObject; var Key: Char);
begin
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox2);
end;
procedure Tfrm_crm_client_ship.bsSkinDBCheckRadioBox2KeyPress(
Sender: TObject; var Key: Char);
begin
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox5);
end;
procedure Tfrm_crm_client_ship.bsSkinDBCheckRadioBox5KeyPress(
Sender: TObject; var Key: Char);
begin
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox4);
end;
procedure Tfrm_crm_client_ship.bsSkinDBCheckRadioBox4KeyPress(
Sender: TObject; var Key: Char);
begin
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox1);
end;
procedure Tfrm_crm_client_ship.bsSkinDBCheckRadioBox1KeyPress(
Sender: TObject; var Key: Char);
begin
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox3);
end;
procedure Tfrm_crm_client_ship.bsSkinDBCheckRadioBox3KeyPress(
Sender: TObject; var Key: Char);
begin
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox7);
end;
procedure Tfrm_crm_client_ship.bsSkinDBCheckRadioBox7KeyPress(
Sender: TObject; var Key: Char);
begin
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox6);
end;
procedure Tfrm_crm_client_ship.bsSkinDBCheckRadioBox6KeyPress(
Sender: TObject; var Key: Char);
begin
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox12);
end;
procedure Tfrm_crm_client_ship.bsSkinDBCheckRadioBox12KeyPress(
Sender: TObject; var Key: Char);
begin
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox13);
end;
procedure Tfrm_crm_client_ship.bsSkinDBCheckRadioBox13KeyPress(
Sender: TObject; var Key: Char);
begin
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox15);
end;
procedure Tfrm_crm_client_ship.bsSkinDBCheckRadioBox15KeyPress(
Sender: TObject; var Key: Char);
begin
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox14);
end;
procedure Tfrm_crm_client_ship.bsSkinDBCheckRadioBox14KeyPress(
Sender: TObject; var Key: Char);
begin
key_DBMemo(Key,DBMemo4);
end;
procedure Tfrm_crm_client_ship.RxDBLookupCombo20KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBLookupCombo(Key,wwDBLookupCombo52);
end;
procedure Tfrm_crm_client_ship.wwDBLookupCombo52KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit19);
end;
procedure Tfrm_crm_client_ship.DBEdit19KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit20);
end;
procedure Tfrm_crm_client_ship.DBEdit20KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBMemo(Key,DBMemo1);
end;
procedure Tfrm_crm_client_ship.DBEdit35KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBComboBox(Key,wwDBComboBox2);
end;
procedure Tfrm_crm_client_ship.wwDBComboBox2KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit37);
end;
procedure Tfrm_crm_client_ship.DBEdit37KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit38);
end;
procedure Tfrm_crm_client_ship.DBEdit38KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit39);
end;
procedure Tfrm_crm_client_ship.DBEdit39KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit36);
end;
procedure Tfrm_crm_client_ship.DBEdit36KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit40);
end;
procedure Tfrm_crm_client_ship.DBEdit40KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit41);
end;
procedure Tfrm_crm_client_ship.DBEdit41KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit42);
end;
procedure Tfrm_crm_client_ship.DBEdit42KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit43);
end;
procedure Tfrm_crm_client_ship.DBEdit43KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit44);
end;
procedure Tfrm_crm_client_ship.DBEdit44KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBDateTimePicker(Key,wwDBDateTimePicker1);
end;
procedure Tfrm_crm_client_ship.wwDBDateTimePicker1KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBDateTimePicker(Key,wwDBDateTimePicker2);
end;
procedure Tfrm_crm_client_ship.wwDBDateTimePicker2KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBDateTimePicker(Key,wwDBDateTimePicker3);
end;
procedure Tfrm_crm_client_ship.wwDBDateTimePicker3KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBDateTimePicker(Key,wwDBDateTimePicker4);
end;
procedure Tfrm_crm_client_ship.wwDBDateTimePicker4KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBMemo(Key,DBMemo2);
end;
procedure Tfrm_crm_client_ship.DBEdit46KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBComboBox(Key,wwDBComboBox3);
end;
procedure Tfrm_crm_client_ship.wwDBComboBox3KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit47);
end;
procedure Tfrm_crm_client_ship.DBEdit47KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBDateTimePicker(Key,wwDBDateTimePicker5);
end;
procedure Tfrm_crm_client_ship.wwDBDateTimePicker5KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBLookupCombo(Key,wwDBLookupCombo1);
end;
procedure Tfrm_crm_client_ship.DBEdit49KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBComboBox(Key,wwDBComboBox4);
end;
procedure Tfrm_crm_client_ship.wwDBComboBox4KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBMemo(Key,DBMemo3);
end;
procedure Tfrm_crm_client_ship.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_ship.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_ship.t_crm_clientAfterScroll(DataSet: TDataSet);
begin
if v_all_client.IsEmpty then
begin
DBEdit5.ReadOnly:=false;
DBEdit4.ReadOnly:=false;
end
else
begin
DBEdit5.ReadOnly:=true;
DBEdit4.ReadOnly:=true;
end;
end;
procedure Tfrm_crm_client_ship.dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
begin
Column_sort(Column,t_crm_client,'<27><><EFBFBD><EFBFBD>');
end;
procedure Tfrm_crm_client_ship.DBEdit21KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit5);
end;
procedure Tfrm_crm_client_ship.t_crm_clientAfterPost(DataSet: TDataSet);
begin
// if frm_crm_client_ship_num=1 then
// SendMsg_gonggao('53','<27>¿ͻ<C2BF>:'+t_crm_client['<27><><EFBFBD><EFBFBD>']+','+t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']);
// if frm_crm_client_ship_num=2 then
// SendMsg_gonggao('54','');
frm_crm_client_ship_num:=0;
end;
procedure Tfrm_crm_client_ship.t_crm_clientBeforeCancel(DataSet: TDataSet);
begin
frm_crm_client_ship_num:=0;
end;
procedure Tfrm_crm_client_ship.wwDBLookupCombo1KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit49);
end;
end.