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.

152 lines
5.2 KiB
Plaintext

11 months ago
unit u_code_truck_changzhan;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, dxExEdtr, bsSkinCtrls, ExtCtrls, RxLookup, BusinessSkinForm,
StdCtrls, Mask, DBCtrls, dxTL, dxDBCtrl, dxDBGrid, dxCntner,DB;
type
Tfrm_code_truck_changzhan = class(TForm)
Label2: TLabel;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column1: TdxDBGridMaskColumn;
DBEdit2: TDBEdit;
bsBusinessSkinForm1: TbsBusinessSkinForm;
Label1: TLabel;
DBEdit1: TDBEdit;
RxDBLookupCombo1: TRxDBLookupCombo;
Label4: TLabel;
Panel1: TPanel;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure bsSkinButton5Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure bsSkinButton6Click(Sender: TObject);
procedure RxDBLookupCombo1Change(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_code_truck_changzhan: Tfrm_code_truck_changzhan;
code_truck_changzhan_num:integer;
implementation
uses u_data_share, u_op_letter, my_sys_function, u_op_truck;
{$R *.dfm}
procedure Tfrm_code_truck_changzhan.bsSkinButton1Click(Sender: TObject);
begin
frm_data_share.t_code_truck_changzhan.insert;
end;
procedure Tfrm_code_truck_changzhan.bsSkinButton2Click(Sender: TObject);
begin
table_post(frm_data_share.t_code_truck_changzhan);
end;
procedure Tfrm_code_truck_changzhan.bsSkinButton4Click(Sender: TObject);
begin
table_delete(frm_data_share.t_code_truck_changzhan);
end;
procedure Tfrm_code_truck_changzhan.bsSkinButton3Click(Sender: TObject);
begin
table_cancel(frm_data_share.t_code_truck_changzhan);
end;
procedure Tfrm_code_truck_changzhan.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_code_truck_changzhan.FormShow(Sender: TObject);
begin
frm_data_share.t_code_truck_changzhan.requery;
end;
procedure Tfrm_code_truck_changzhan.FormCloseQuery(Sender: TObject;
var CanClose: Boolean);
begin
CanClose:=frm_close_query(frm_data_share.t_code_truck_changzhan);
end;
procedure Tfrm_code_truck_changzhan.bsSkinButton6Click(Sender: TObject);
begin
if frm_data_share.t_code_truck_changzhan.IsEmpty then
exit;
case code_truck_changzhan_num of
1:
begin
frm_op_letter.t_op_letter_pc.edit;
frm_op_letter.t_op_letter_pc['<27><><EFBFBD>䳡վ']:=frm_data_share.t_code_truck_changzhan['<27><>վ<EFBFBD><D5BE><EFBFBD><EFBFBD>'];
frm_op_letter.t_op_letter_pc['<27><>վ<EFBFBD><D5BE>ϵ<EFBFBD><CFB5>']:=frm_data_share.t_code_truck_changzhan['<27><>վ<EFBFBD><D5BE>ϵ<EFBFBD><CFB5>'];
frm_op_letter.t_op_letter_pc['<27><>վ<EFBFBD>绰']:=frm_data_share.t_code_truck_changzhan['<27><>վ<EFBFBD>绰'];
frm_op_letter.t_op_letter_pc.post;
end;
2:
begin
frm_op_letter.t_op_letter_pc.edit;
frm_op_letter.t_op_letter_pc['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ']:=frm_data_share.t_code_truck_changzhan['<27><>վ<EFBFBD><D5BE><EFBFBD><EFBFBD>'];
frm_op_letter.t_op_letter_pc['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>']:=frm_data_share.t_code_truck_changzhan['<27><>վ<EFBFBD><D5BE>ϵ<EFBFBD><CFB5>'];
frm_op_letter.t_op_letter_pc['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD>绰']:=frm_data_share.t_code_truck_changzhan['<27><>վ<EFBFBD>绰'];
frm_op_letter.t_op_letter_pc.post;
end;
3:
begin
frm_op_letter.t_op_letter_rh.edit;
frm_op_letter.t_op_letter_rh['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>վ']:=frm_data_share.t_code_truck_changzhan['<27><>վ<EFBFBD><D5BE><EFBFBD><EFBFBD>'];
frm_op_letter.t_op_letter_rh['<27><>վ<EFBFBD><D5BE>ϵ<EFBFBD><CFB5>']:=frm_data_share.t_code_truck_changzhan['<27><>վ<EFBFBD><D5BE>ϵ<EFBFBD><CFB5>'];
frm_op_letter.t_op_letter_rh['<27><>վ<EFBFBD><D5BE>ϵ<EFBFBD>绰']:=frm_data_share.t_code_truck_changzhan['<27><>վ<EFBFBD>绰'];
frm_op_letter.t_op_letter_rh.post;
end;
4:
begin
frm_op_truck.t_op_letter_pc.edit;
frm_op_truck.t_op_letter_pc['<27><><EFBFBD>䳡վ']:=frm_data_share.t_code_truck_changzhan['<27><>վ<EFBFBD><D5BE><EFBFBD><EFBFBD>'];
frm_op_truck.t_op_letter_pc['<27><>վ<EFBFBD><D5BE>ϵ<EFBFBD><CFB5>']:=frm_data_share.t_code_truck_changzhan['<27><>վ<EFBFBD><D5BE>ϵ<EFBFBD><CFB5>'];
frm_op_truck.t_op_letter_pc['<27><>վ<EFBFBD>绰']:=frm_data_share.t_code_truck_changzhan['<27><>վ<EFBFBD>绰'];
frm_op_truck.t_op_letter_pc.post;
end;
5:
begin
frm_op_truck.t_op_letter_pc.edit;
frm_op_truck.t_op_letter_pc['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ']:=frm_data_share.t_code_truck_changzhan['<27><>վ<EFBFBD><D5BE><EFBFBD><EFBFBD>'];
frm_op_truck.t_op_letter_pc['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>']:=frm_data_share.t_code_truck_changzhan['<27><>վ<EFBFBD><D5BE>ϵ<EFBFBD><CFB5>'];
frm_op_truck.t_op_letter_pc['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD>绰']:=frm_data_share.t_code_truck_changzhan['<27><>վ<EFBFBD>绰'];
frm_op_truck.t_op_letter_pc.post;
end;
end;
close;
end;
procedure Tfrm_code_truck_changzhan.RxDBLookupCombo1Change(
Sender: TObject);
begin
if frm_data_share.t_code_truck_changzhan.State in [dsinsert,dsedit] then
begin
if frm_data_share.t_crm_client_changzhan.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',RxDBLookupCombo1.DisplayValues[1],[])then
begin
frm_data_share.t_code_truck_changzhan['<27><>վ<EFBFBD><D5BE>ϵ<EFBFBD><CFB5>']:=frm_data_share.t_crm_client_changzhan.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').asstring;
frm_data_share.t_code_truck_changzhan['<27><>վ<EFBFBD>绰']:=frm_data_share.t_crm_client_changzhan.fieldbyname('<27><><EFBFBD>˵绰').asstring;
end;
end;
end;
end.