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.

112 lines
2.8 KiB
Plaintext

unit u_op_kuaidi_shen_do;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, BusinessSkinForm, DBCtrls, StdCtrls, Mask, wwdbedit, Wwdotdot,
Wwdbcomb, RxLookup, bsSkinCtrls, DBCtrlsEh,ADODB, wwdbdatetimepicker;
type
Tfrm_op_kuaidi_shen_do = class(TForm)
bsBusinessSkinForm1: TbsBusinessSkinForm;
Label53: TLabel;
RxDBLookupCombo5: TRxDBLookupCombo;
Label50: TLabel;
wwDBComboBox1: TwwDBComboBox;
Label51: TLabel;
DBEdit3: TDBEdit;
Label52: TLabel;
DBEdit16: TDBEdit;
bsSkinButton1: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
DBComboBoxEh2: TDBComboBoxEh;
Label1: TLabel;
Label2: TLabel;
wwDBDateTimePicker1: TwwDBDateTimePicker;
procedure bsSkinButton1Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure bsSkinButton5Click(Sender: TObject);
procedure DBComboBoxEh2DropDown(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_op_kuaidi_shen_do: Tfrm_op_kuaidi_shen_do;
implementation
uses u_op_kuaidi_check, u_data_share, u_main, my_sys_chat,my_sys_function;
{$R *.dfm}
procedure Tfrm_op_kuaidi_shen_do.bsSkinButton1Click(Sender: TObject);
begin
if DBEdit16.text='' then
begin
showmessage('请输入快递编号!!');
exit;
end;
if RxDBLookupCombo5.DisplayValue='' then
begin
showmessage('请输入快递公司!!');
exit;
end;
if wwDBComboBox1.text='' then
begin
showmessage('请输入付费方式!!');
exit;
end;
if DBEdit3.text='' then
begin
showmessage('请输入金额!!');
exit;
end;
frm_op_kuaidi_check.t_op_kuaidi.edit;
frm_op_kuaidi_check.t_op_kuaidi['申请状态']:='确认发出';
if Trim(DBComboBoxEh2.Text)='' then
frm_op_kuaidi_check.t_op_kuaidi['审核人']:=employee;
frm_op_kuaidi_check.t_op_kuaidi['审核日期']:=wwDBDateTimePicker1.Date;
frm_op_kuaidi_check.t_op_kuaidi.post;
Send_invocie_check_check('快递确认发出,发送编号:'+frm_op_kuaidi_check.t_op_kuaidi.fieldbyname('发送编号').asstring
,frm_op_kuaidi_check.t_op_kuaidi.fieldbyname('申请人').asstring,'35');
close;
end;
procedure Tfrm_op_kuaidi_shen_do.FormShow(Sender: TObject);
begin
frm_data_share.t_crm_client_kuaidi.requery;
wwDBDateTimePicker1.Date:=Now;
end;
procedure Tfrm_op_kuaidi_shen_do.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_kuaidi_shen_do.DBComboBoxEh2DropDown(Sender: TObject);
var AdoQuery1:TAdoQuery;
begin
TDBComboBoxEh(Sender).items.clear;
AdoQuery1:=CreateAdoQuery;
with AdoQuery1 do
try
Close;sql.Clear;
SQL.Add('select * from t_sys_employee where 状态=''在职''');
SQL.Add('Order by 姓名');
Open;first;
while not Eof do
begin
TDBComboBoxEh(Sender).Items.Add(AdoQuery1.fieldbyname('姓名').AsString);
Next;
end;
finally
Free;
end;
end;
end.