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.

660 lines
19 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_check;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, dxExEdtr, DB, ADODB, dxDBTLCl, dxGrClms, wwdbdatetimepicker,
StdCtrls, DBCtrls, wwdbedit, Wwdotdot, Wwdbcomb, RxLookup, bsSkinCtrls,
bsdbctrls, Mask, ComCtrls, bsSkinTabs, ExtCtrls, dxTL, dxDBCtrl,
dxDBGrid, dxCntner, Grids, Wwdbigrd, Wwdbgrid, RxDBComb;
type
Tfrm_crm_client_check = class(TForm)
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;
Panel1: TPanel;
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;
bsSkinTabSheet2: TbsSkinTabSheet;
bsSkinGroupBox5: TbsSkinGroupBox;
Label20: TLabel;
Label21: TLabel;
Label22: TLabel;
Label164: TLabel;
DBEdit20: TDBEdit;
DBEdit21: TDBEdit;
DBEdit22: TDBEdit;
RxDBLookupCombo11: TRxDBLookupCombo;
bsSkinGroupBox6: TbsSkinGroupBox;
Label19: TLabel;
Label24: TLabel;
Label45: TLabel;
Label46: TLabel;
DBEdit19: TDBEdit;
DBEdit24: TDBEdit;
DBEdit25: 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;
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;
bsSkinTabSheet4: TbsSkinTabSheet;
Label54: TLabel;
Label55: TLabel;
Label56: TLabel;
Label57: TLabel;
Label58: TLabel;
Label59: TLabel;
Label60: TLabel;
Label61: TLabel;
dxDBGrid3: TdxDBGrid;
dxDBGrid3Column1: TdxDBGridMaskColumn;
dxDBGrid3Column2: TdxDBGridDateColumn;
DBEdit46: TDBEdit;
DBEdit47: TDBEdit;
DBEdit49: TDBEdit;
wwDBComboBox3: TwwDBComboBox;
RxDBLookupCombo8: TRxDBLookupCombo;
wwDBDateTimePicker5: TwwDBDateTimePicker;
wwDBComboBox4: TwwDBComboBox;
DBMemo3: TDBMemo;
bsSkinTabSheet5: TbsSkinTabSheet;
p_client_liushi: TADOStoredProc;
p_client_state: TADOStoredProc;
p_update: TADOStoredProc;
bsSkinGroupBox3: TbsSkinGroupBox;
Label4: TLabel;
Label5: TLabel;
Label2: TLabel;
Label7: TLabel;
Label6: TLabel;
Label10: TLabel;
Label11: TLabel;
Label8: TLabel;
Label62: TLabel;
DBEdit4: TDBEdit;
DBEdit5: TDBEdit;
DBEdit2: TDBEdit;
DBEdit7: TDBEdit;
DBEdit6: TDBEdit;
DBEdit10: TDBEdit;
DBEdit9: TDBEdit;
DBEdit8: TDBEdit;
DBEdit45: TDBEdit;
Panel2: TPanel;
bsSkinButton5: TbsSkinButton;
bsSkinButton10: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
bsSkinButton8: TbsSkinButton;
bsSkinButton12: TbsSkinButton;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinButton7: TbsSkinButton;
bsSkinDBCheckRadioBox5: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox12: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox1: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox2: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox4: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox3: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox6: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox7: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox8: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox13: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox14: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox15: TbsSkinDBCheckRadioBox;
Label63: TLabel;
Label69: TLabel;
Label70: TLabel;
Label71: TLabel;
wwDBComboBox10: TwwDBComboBox;
wwDBComboBox7: TwwDBComboBox;
DBEdit48: TDBEdit;
wwDBComboBox9: TwwDBComboBox;
wwDBComboBox8: TwwDBComboBox;
DBEdit52: TDBEdit;
bsSkinTabSheet6: TbsSkinTabSheet;
ds_crm_client_sales1: TDataSource;
t_crm_client_sales: TADOQuery;
bsSkinPanel3: TbsSkinPanel;
wwDBGrid1: TwwDBGrid;
bskngrpbx1: TbsSkinGroupBox;
bskngrpbx2: TbsSkinGroupBox;
Label74: TLabel;
Label75: TLabel;
Label76: TLabel;
Label80: TLabel;
Label81: TLabel;
Label82: TLabel;
Label83: TLabel;
Label84: TLabel;
Label88: TLabel;
Label89: TLabel;
Label78: TLabel;
Label85: TLabel;
bvl1: TBevel;
Bevel1: TBevel;
DBEdit50: TDBEdit;
DBEdit54: TDBEdit;
DBEdit56: TDBEdit;
DBEdit57: TDBEdit;
DBEdit58: TDBEdit;
DBEdit60: TDBEdit;
wwDBComboBox11: TwwDBComboBox;
bsSkinPanel5: TbsSkinPanel;
Label25: TLabel;
lbl1: TLabel;
Label64: TLabel;
DBEdit51: TDBEdit;
wwDBComboBox6: TwwDBComboBox;
wwDBComboBox12: TwwDBComboBox;
bsSkinDBCheckRadioBox16: TbsSkinDBCheckRadioBox;
bsSkinGroupBox12: TbsSkinGroupBox;
Label65: TLabel;
DBEdit55: TDBEdit;
bsSkinGroupBox13: TbsSkinGroupBox;
Label77: TLabel;
Label66: TLabel;
Label67: TLabel;
Label72: TLabel;
Label73: TLabel;
wwDBComboBox13: TwwDBComboBox;
wwDBComboBox14: TwwDBComboBox;
DBEdit59: TDBEdit;
bsSkinPanel1: TbsSkinPanel;
bsSkinButton11: TbsSkinButton;
bsSkinButton13: TbsSkinButton;
Label68: TLabel;
RxDBComboBox1: TRxDBComboBox;
Label79: TLabel;
RxDBComboBox3: TRxDBComboBox;
Label86: TLabel;
RxDBComboBox2: TRxDBComboBox;
Label87: TLabel;
RxDBComboBox4: TRxDBComboBox;
Label91: TLabel;
RxDBComboBox5: TRxDBComboBox;
Label92: TLabel;
DBEdit61: TDBEdit;
Label17: TLabel;
RxDBLookupCombo14: TRxDBLookupCombo;
Label18: TLabel;
RxDBLookupCombo1: TRxDBLookupCombo;
Label93: TLabel;
wwDBDateTimePicker6: TwwDBDateTimePicker;
Label94: TLabel;
DBEdit17: TDBEdit;
bsSkinGroupBox9: TbsSkinGroupBox;
Label90: TLabel;
DBEdit18: TDBEdit;
GroupBox1: TGroupBox;
Memo1: TMemo;
GroupBox4: TGroupBox;
Memo3: TMemo;
GroupBox2: TGroupBox;
Memo2: TMemo;
dxDBGrid1: TdxDBGrid;
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
dxDBGridMaskColumn4: TdxDBGridMaskColumn;
dxDBGridMaskColumn5: TdxDBGridMaskColumn;
dxDBGridMaskColumn6: TdxDBGridMaskColumn;
dxDBGrid1Column5: TdxDBGridColumn;
dxDBGrid1Column6: TdxDBGridColumn;
dxDBGrid1Column7: TdxDBGridColumn;
dxDBGrid1Column8: TdxDBGridColumn;
dxDBGrid1Column9: TdxDBGridColumn;
dxDBGrid1Column10: TdxDBGridColumn;
dxDBGrid1Column11: TdxDBGridColumn;
dxDBGrid1Column12: TdxDBGridColumn;
dxDBGrid1Column13: TdxDBGridColumn;
dxDBGrid1Column14: TdxDBGridColumn;
dxDBGrid1Column15: TdxDBGridColumn;
dxDBGrid1Column16: TdxDBGridColumn;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure bsSkinButton5Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton12Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure Panel2Resize(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
function get_client_state(i:real):string;
procedure dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure bsSkinButton7Click(Sender: TObject);
procedure bsSkinButton11Click(Sender: TObject);
procedure bsSkinButton13Click(Sender: TObject);
procedure dxDBGrid1Click(Sender: TObject);
private
{ Private declarations }
procedure GetDetail;
public
{ Public declarations }
end;
var
frm_crm_client_check: Tfrm_crm_client_check;
implementation
uses u_main, u_data_share, my_sys_function, u_sys_progress,
u_crm_client_check_do, my_sys_chat;
{$R *.dfm}
procedure Tfrm_crm_client_check.GetDetail;
var
i:Integer;
s,str:string;
begin
Memo1.Lines.Clear;
Memo2.Lines.Clear;
Memo3.Lines.Clear;
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
s:=t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
str:='';
while (Trim(s)<>'') do
begin
str:=Copy(s,0,Pos(',',s)-1);
if Pos(',',s)>0 then Memo1.Lines.Add(str);
s:=Copy(s,Pos(',',s)+1,Length(s)-Pos(',',s));
end;
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
s:=t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
str:='';
while (Trim(s)<>'') do
begin
str:=Copy(s,0,Pos(',',s)-1);
if Pos(',',s)>0 then Memo2.Lines.Add(str);
s:=Copy(s,Pos(',',s)+1,Length(s)-Pos(',',s));
end;
//<2F><>Ӫ<EFBFBD><D3AA>Ʒ
s:=t_crm_client.fieldbyname('<27><>Ӫ<EFBFBD><D3AA>Ʒ').AsString;
str:='';
while (Trim(s)<>'') do
begin
str:=Copy(s,0,Pos(',',s)-1);
if Pos(',',s)>0 then Memo3.Lines.Add(str);
s:=Copy(s,Pos(',',s)+1,Length(s)-Pos(',',s));
end;
end;
function Tfrm_crm_client_check.get_client_state(i:real):string;
var
str:string;
begin
frm_data_share.t_code_price.first;
while not frm_data_share.t_code_price.eof do
begin
if (i>=frm_data_share.t_code_price.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat)
and (i<frm_data_share.t_code_price.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat) then
begin
str:=frm_data_share.t_code_price.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD>ֵ').asstring;
end;
frm_data_share.t_code_price.next;
end;
if str='' then
result:='û<>ж<EFBFBD><D0B6><EFBFBD>'
else
result:=str;
end;
procedure Tfrm_crm_client_check.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
frm_crm_client_check.Hide;
frm_crm_client_check.ManualFloat(frm_crm_client_check.BoundsRect );
frm_main.freeTabs('frm_crm_client_check');
action:=cafree;
frm_crm_client_check:=nil;
end;
procedure Tfrm_crm_client_check.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_crm_client_check.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> in ('+quotedstr('<27><><EFBFBD><EFBFBD>')+','+quotedstr('Ŀ<><C4BF>')+')');
t_crm_client.SQL.Add(' and <20>ͻ<EFBFBD>״̬='+''''+'<27><><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>'+''''
+' order by <20>ͻ<EFBFBD>״̬,<2C>ͻ<EFBFBD><CDBB><EFBFBD>ֵ,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
t_crm_client.open;
t_crm_client_linkman.open;
t_crm_client_link.open;
t_crm_client_sales.Open;
dxDBGrid1.FullExpand;
end;
procedure Tfrm_crm_client_check.bsSkinButton9Click(Sender: TObject);
begin
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_check.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_check.bsSkinButton10Click(Sender: TObject);
begin
query_client(2,'no');
end;
procedure Tfrm_crm_client_check.bsSkinButton8Click(Sender: TObject);
begin
if t_crm_client.IsEmpty then
exit;
if t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>'then
begin
showmessage('<27><>ǰ<EFBFBD>ͻ<EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
try
frm_crm_client_check_do:=tfrm_crm_client_check_do.Create (self);
frm_crm_client_check_do.ShowModal;
finally
frm_crm_client_check_do.Free;
frm_crm_client_check_do:=nil;
end;
end;
procedure Tfrm_crm_client_check.Panel2Resize(Sender: TObject);
var
i:integer;
begin
i:=round(Panel2.width/11);
bsSkinButton9.width:=i;
bsSkinButton12.width:=i;
bsSkinButton10.width:=i;
bsSkinButton8.width:=i;
bsSkinButton1.width:=i;
bsSkinButton2.width:=i;
bsSkinButton3.width:=i;
bsSkinButton4.width:=i;
bsSkinButton6.width:=i;
bsSkinButton7.width:=i;
end;
procedure Tfrm_crm_client_check.bsSkinButton1Click(Sender: TObject);
var
i,j:integer;
str:widestring;
begin
try
i:=strtoint(get_parameters_value(9,'3'));
j:=strtoint(get_parameters_value(10,'3'));
p_client_state.Parameters.ParamByName('d1').value:=date-j*30;
p_client_state.Open;
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(self);
frm_sys_progress.Show;
frm_sys_progress.bsSkinGauge1.MaxValue:=(p_client_state.RecordCount+3);
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
frm_sys_progress.Update;
frm_data_share.t_code_price.Requery();
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
p_client_liushi.Parameters.ParamByName('d1').value:=date-i*30;
p_client_liushi.ExecProc;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
p_client_state.first;
while not p_client_state.eof do
begin
str:=frm_crm_client_check.get_client_state(p_client_state.fieldbyname('ë<><C3AB><EFBFBD><EFBFBD>').asfloat/j);
str:='update t_crm_client set <20>ͻ<EFBFBD><CDBB><EFBFBD>ֵ='+''''+str+''''+' where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='
+''''+p_client_state.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring+'''';
p_update.Parameters.ParamByName('SQLStr').value:=str;
p_update.ExecProc;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
p_client_state.next;
end;
finally
frm_data_share.t_crm_client.requery;
t_crm_client.requery;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.MaxValue;
frm_sys_progress.free;
frm_sys_progress:=nil;
showmessage('<27>ͻ<EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>');
end;
end;
procedure Tfrm_crm_client_check.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_check.bsSkinButton2Click(Sender: TObject);
begin
t_crm_client.CLOSE;
t_crm_client.SQL.clear;
t_crm_client.sql.add('select * from t_crm_client where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> in ('+quotedstr('<27><><EFBFBD><EFBFBD>')+','+quotedstr('Ŀ<><C4BF>')+')');
t_crm_client.SQL.Add(' and <20>ͻ<EFBFBD>״̬ in ('+quotedstr('<27><><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>')+','+quotedstr('<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>')+')'
+' order by <20>ͻ<EFBFBD>״̬,<2C>ͻ<EFBFBD><CDBB><EFBFBD>ֵ,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
t_crm_client.open;
end;
procedure Tfrm_crm_client_check.bsSkinButton3Click(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='Ŀ<><C4BF><EFBFBD>ͻ<EFBFBD>')then
begin
showmessage('<27><>ǰ<EFBFBD>ͻ<EFBFBD>״̬<D7B4><CCAC><EFBFBD>ܷ<EFBFBD><DCB7><EFBFBD><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
t_crm_client.edit;
t_crm_client['<27>ͻ<EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>';
t_crm_client.post;
SendMsg_gonggao('54','');
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD><CDBB>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_crm_client_check.bsSkinButton4Click(Sender: TObject);
begin
if t_crm_client.IsEmpty then
exit;
if (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>')then
begin
showmessage('<27><>ǰ<EFBFBD>ͻ<EFBFBD>״̬<D7B4><CCAC><EFBFBD>ָܻ<DCBB><D6B8>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
t_crm_client.edit;
t_crm_client['<27>ͻ<EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>';
t_crm_client.post;
SendMsg_gonggao('54','');
showmessage('<27>ָ<EFBFBD><D6B8>ͻ<EFBFBD><CDBB>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_crm_client_check.bsSkinButton6Click(Sender: TObject);
begin
if t_crm_client.IsEmpty then
exit;
if t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'then
begin
showmessage('<27><>ǰ<EFBFBD>ͻ<EFBFBD>״̬<D7B4><CCAC><EFBFBD>ܸ<EFBFBD><DCB8><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
try
t_crm_client.edit;
t_crm_client['<27>ͻ<EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>';
t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:='ϵͳ';
t_crm_client.post;
Send_invocie_check_check('<27>ͻ<EFBFBD>ת<EFBFBD><D7AA>ͨ<EFBFBD><CDA8>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>:'+t_crm_client.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring,
t_crm_client.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,'46');
Send_invocie_check_check('<27>ͻ<EFBFBD>ת<EFBFBD><D7AA>ͨ<EFBFBD><CDA8>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>:'+t_crm_client.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring,
t_crm_client.FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').asstring,'46');
SendMsg_gonggao('53','<27>¿ͻ<C2BF>:'+t_crm_client['<27><><EFBFBD><EFBFBD>']+','+t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']);
except
showmessage('<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
exit;
end;
showmessage('<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_crm_client_check.bsSkinButton7Click(Sender: TObject);
begin
if t_crm_client.IsEmpty then
exit;
if (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>')
and (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>')then
begin
showmessage('<27><>ǰ<EFBFBD>ͻ<EFBFBD><CDBB>Ѿ<EFBFBD><D1BE><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܲ<EFBFBD><DCB2>أ<EFBFBD><D8A3><EFBFBD>');
exit;
end;
try
t_crm_client.edit;
t_crm_client['<27>ͻ<EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_crm_client.post;
Send_invocie_check_check('<27><><EFBFBD>ؿͻ<D8BF>ת<EFBFBD><D7AA>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>:'+t_crm_client.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring,
t_crm_client.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,'47');
Send_invocie_check_check('<27><><EFBFBD>ؿͻ<D8BF>ת<EFBFBD><D7AA>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>:'+t_crm_client.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring,
t_crm_client.FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').asstring,'47');
except
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
exit;
end;
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_crm_client_check.bsSkinButton11Click(Sender: TObject);
begin
if t_crm_client.IsEmpty then
exit;
if t_crm_client_sales.IsEmpty then
exit;
t_crm_client_sales.Edit;
t_crm_client_sales.FieldByName('״̬').AsString:='<27><><EFBFBD><EFBFBD>';
t_crm_client_sales.Post;
end;
procedure Tfrm_crm_client_check.bsSkinButton13Click(Sender: TObject);
begin
if t_crm_client.IsEmpty then
exit;
if t_crm_client_sales.IsEmpty then
exit;
t_crm_client_sales.Edit;
t_crm_client_sales.FieldByName('״̬').AsString:='<27>½<EFBFBD>';
t_crm_client_sales.Post;
end;
procedure Tfrm_crm_client_check.dxDBGrid1Click(Sender: TObject);
begin
GetDetail;
end;
end.