菜比超超
This commit is contained in:
parent
28f20e2612
commit
f0e334c02c
|
|
@ -16,9 +16,8 @@ uses
|
|||
U_cxGridCustomCss in '..\..\..\public10\design\U_cxGridCustomCss.pas',
|
||||
U_CompressionFun in '..\..\..\public10\ThreeFun\Fun\U_CompressionFun.pas',
|
||||
U_RTFun in '..\..\..\public10\ThreeFun\Fun\U_RTFun.pas',
|
||||
U_ZDYHelp in '..\..\..\public10\ThreeFun\Form\U_ZDYHelp.pas' {frmZDYHelp},
|
||||
U_GYSCPNAME in 'U_GYSCPNAME.pas' {frmGYSCPNAME},
|
||||
U_AttachmentUpload in '..\A00通用窗体\U_AttachmentUpload.pas' {frmFjList_RZ},
|
||||
U_CompanySel in '..\A00通用窗体\U_CompanySel.pas' {frmCompanySel},
|
||||
U_EmployeeSel in '..\A00通用窗体\U_EmployeeSel.pas' {frmEmployeeSel},
|
||||
U_CloInfoFileUp in 'U_CloInfoFileUp.pas' {frmCloInfoFileUp},
|
||||
U_TatClothInfo in 'U_TatClothInfo.pas' {frmTatClothInfo},
|
||||
|
|
@ -47,7 +46,9 @@ uses
|
|||
U_ClothInfoInput2 in 'U_ClothInfoInput2.pas' {frmClothInfoInput2},
|
||||
FrameDateSel in '..\A00通用组件\FrameDateSel.pas' {frmFrameDateSel: TFrame},
|
||||
U_ClothInfoLog in 'U_ClothInfoLog.pas' {frmClothInfoLog},
|
||||
uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas';
|
||||
uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas',
|
||||
U_ZDYHelp in '..\..\..\public10\ThreeFun\Form\U_ZDYHelp.pas' {frmZDYHelp},
|
||||
U_CompanySel in '..\A00通用窗体\U_CompanySel.pas' {frmCompanySel};
|
||||
|
||||
{$R *.res}
|
||||
|
||||
|
|
|
|||
|
|
@ -148,15 +148,12 @@
|
|||
<DCCReference Include="..\..\..\public10\design\U_cxGridCustomCss.pas"/>
|
||||
<DCCReference Include="..\..\..\public10\ThreeFun\Fun\U_CompressionFun.pas"/>
|
||||
<DCCReference Include="..\..\..\public10\ThreeFun\Fun\U_RTFun.pas"/>
|
||||
<DCCReference Include="..\..\..\public10\ThreeFun\Form\U_ZDYHelp.pas">
|
||||
<Form>frmZDYHelp</Form>
|
||||
<DCCReference Include="U_GYSCPNAME.pas">
|
||||
<Form>frmGYSCPNAME</Form>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\A00通用窗体\U_AttachmentUpload.pas">
|
||||
<Form>frmFjList_RZ</Form>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\A00通用窗体\U_CompanySel.pas">
|
||||
<Form>frmCompanySel</Form>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\A00通用窗体\U_EmployeeSel.pas">
|
||||
<Form>frmEmployeeSel</Form>
|
||||
</DCCReference>
|
||||
|
|
@ -241,6 +238,14 @@
|
|||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas"/>
|
||||
<DCCReference Include="..\..\..\public10\ThreeFun\Form\U_ZDYHelp.pas">
|
||||
<Form>frmZDYHelp</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\A00通用窗体\U_CompanySel.pas">
|
||||
<Form>frmCompanySel</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<BuildConfiguration Include="Debug">
|
||||
<Key>Cfg_2</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
Font.Height = -16
|
||||
FormStyle = fsMDIChild
|
||||
Position = poScreenCenter
|
||||
Visible = True
|
||||
ExplicitWidth = 1556
|
||||
ExplicitHeight = 884
|
||||
PixelsPerInch = 96
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -21,41 +21,9 @@ type
|
|||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ScrollBox1: TScrollBox;
|
||||
Label1: TLabel;
|
||||
Label5: TLabel;
|
||||
Label15: TLabel;
|
||||
Label22: TLabel;
|
||||
Label4: TLabel;
|
||||
Label3: TLabel;
|
||||
C_Code: TcxTextEdit;
|
||||
C_Name: TcxTextEdit;
|
||||
Label7: TLabel;
|
||||
ToolButton6: TToolButton;
|
||||
BCIID: TcxTextEdit;
|
||||
Label6: TLabel;
|
||||
Label9: TLabel;
|
||||
C_GramWeight: TcxButtonEdit;
|
||||
C_Composition: TcxButtonEdit;
|
||||
C_Spec: TcxButtonEdit;
|
||||
Label11: TLabel;
|
||||
C_FromName: TcxButtonEdit;
|
||||
C_Width: TcxButtonEdit;
|
||||
C_Pattern: TcxButtonEdit;
|
||||
CINote: TcxMemo;
|
||||
GC_Name: TcxTextEdit;
|
||||
Label10: TLabel;
|
||||
C_EComposition: TcxButtonEdit;
|
||||
Label12: TLabel;
|
||||
C_YarnSpec: TcxTextEdit;
|
||||
Label16: TLabel;
|
||||
CraftCode: TcxTextEdit;
|
||||
Label18: TLabel;
|
||||
Label19: TLabel;
|
||||
FtyNo: TcxTextEdit;
|
||||
FtyName: TcxTextEdit;
|
||||
Label21: TLabel;
|
||||
Label23: TLabel;
|
||||
DyeingMethod: TcxTextEdit;
|
||||
Panel1: TPanel;
|
||||
ToolBar2: TToolBar;
|
||||
ToolButton3: TToolButton;
|
||||
|
|
@ -69,25 +37,72 @@ type
|
|||
CDS_1: TClientDataSet;
|
||||
GPM_1: TcxGridPopupMenu;
|
||||
ToolButton2: TToolButton;
|
||||
CostPrice: TcxCurrencyEdit;
|
||||
TV1Column5: TcxGridDBColumn;
|
||||
TV1Column6: TcxGridDBColumn;
|
||||
TV1Column3: TcxGridDBColumn;
|
||||
TV1Column4: TcxGridDBColumn;
|
||||
Panel2: TPanel;
|
||||
Label1: TLabel;
|
||||
Label5: TLabel;
|
||||
Label15: TLabel;
|
||||
Label22: TLabel;
|
||||
Label4: TLabel;
|
||||
Label7: TLabel;
|
||||
Label6: TLabel;
|
||||
Label9: TLabel;
|
||||
Label11: TLabel;
|
||||
Label10: TLabel;
|
||||
Label16: TLabel;
|
||||
Label18: TLabel;
|
||||
Label19: TLabel;
|
||||
Label21: TLabel;
|
||||
Label23: TLabel;
|
||||
Label2: TLabel;
|
||||
distributionCoefficient: TcxCurrencyEdit;
|
||||
Label8: TLabel;
|
||||
quota: TcxCurrencyEdit;
|
||||
Label13: TLabel;
|
||||
Label14: TLabel;
|
||||
Label20: TLabel;
|
||||
TV1Column5: TcxGridDBColumn;
|
||||
TV1Column6: TcxGridDBColumn;
|
||||
C_FromName2: TcxButtonEdit;
|
||||
Label17: TLabel;
|
||||
Label24: TLabel;
|
||||
TV1Column3: TcxGridDBColumn;
|
||||
TV1Column4: TcxGridDBColumn;
|
||||
StkPosition: TcxMRUEdit;
|
||||
Label25: TLabel;
|
||||
C_Code: TcxTextEdit;
|
||||
C_Name: TcxTextEdit;
|
||||
C_GramWeight: TcxButtonEdit;
|
||||
C_Composition: TcxButtonEdit;
|
||||
C_Spec: TcxButtonEdit;
|
||||
C_FromName: TcxButtonEdit;
|
||||
C_Width: TcxButtonEdit;
|
||||
C_Pattern: TcxButtonEdit;
|
||||
CINote: TcxMemo;
|
||||
GC_Name: TcxTextEdit;
|
||||
C_EComposition: TcxButtonEdit;
|
||||
CraftCode: TcxTextEdit;
|
||||
FtyNo: TcxTextEdit;
|
||||
FtyName: TcxTextEdit;
|
||||
C_EName: TcxTextEdit;
|
||||
DyeingMethod: TcxTextEdit;
|
||||
CostPrice: TcxCurrencyEdit;
|
||||
distributionCoefficient: TcxCurrencyEdit;
|
||||
quota: TcxCurrencyEdit;
|
||||
C_FromName2: TcxButtonEdit;
|
||||
StkPosition: TcxMRUEdit;
|
||||
qtyunit: TcxMRUEdit;
|
||||
Label12: TLabel;
|
||||
C_YarnSpec: TcxTextEdit;
|
||||
Panel3: TPanel;
|
||||
ToolBar3: TToolBar;
|
||||
ToolButton5: TToolButton;
|
||||
ToolButton7: TToolButton;
|
||||
cxGrid2: TcxGrid;
|
||||
TV2: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
CDS_2: TClientDataSet;
|
||||
DS_2: TDataSource;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
ADO_1: TADOQuery;
|
||||
ADO_2: TADOQuery;
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
|
|
@ -104,6 +119,9 @@ type
|
|||
procedure C_FromName2PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||
procedure CostPricePropertiesEditValueChanged(Sender: TObject);
|
||||
procedure StkPositionPropertiesButtonClick(Sender: TObject);
|
||||
procedure ToolButton5Click(Sender: TObject);
|
||||
procedure ToolButton7Click(Sender: TObject);
|
||||
procedure cxGridDBColumn1PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||
private
|
||||
canshu1: string;
|
||||
Fint: Integer;
|
||||
|
|
@ -125,7 +143,8 @@ var
|
|||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_iniParam, U_ZDYHelp, U_AttachmentUpload, U_ClothInfoSel;
|
||||
U_DataLink, U_RTFun, U_iniParam, U_ZDYHelp, U_AttachmentUpload, U_ClothInfoSel,
|
||||
U_CompanySel;
|
||||
|
||||
{$R *.dfm}
|
||||
procedure TfrmClothInfoInput.setName();
|
||||
|
|
@ -169,6 +188,10 @@ begin
|
|||
|
||||
InitCDSData(ADO_1, CDS_1, Tv1, SqlStr, '', '');
|
||||
|
||||
SqlStr := 'select A.* from BS_Cloth_Info_GYSCP A ';
|
||||
SqlStr := SqlStr + ' where A.BCIID=''' + Trim(FBCIID) + '''';
|
||||
InitCDSData(ADO_2, CDS_2, Tv2, SqlStr, '', '');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoInput.InitGrid();
|
||||
|
|
@ -182,7 +205,7 @@ begin
|
|||
Open;
|
||||
end;
|
||||
|
||||
SCSHData(ADOQueryTemp, ScrollBox1, 2);
|
||||
SCSHData(ADOQueryTemp, panel2, 2);
|
||||
StkPosition.Text := ADOQueryTemp.FieldByName('StkPosition').AsString;
|
||||
qtyunit.Text := ADOQueryTemp.FieldByName('qtyunit').AsString;
|
||||
// SCSHData(ADOQueryTemp, ScrollBox1, 0);
|
||||
|
|
@ -357,7 +380,7 @@ end;
|
|||
|
||||
function TfrmClothInfoInput.SaveData(): Boolean;
|
||||
var
|
||||
MaxBCIID, MaxBCPID, maxId2: string;
|
||||
MaxBCIID, MaxBCPID, maxId2, MAXID3: string;
|
||||
begin
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
|
|
@ -416,7 +439,7 @@ begin
|
|||
|
||||
if trim(C_Code.Text) = '' then
|
||||
C_Code.Text := Trim(MaxBCIID);
|
||||
RTSetsavedata(ADOQueryCmd, 'BS_Cloth_Info', ScrollBox1, 2);
|
||||
RTSetsavedata(ADOQueryCmd, 'BS_Cloth_Info', panel2, 2);
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
|
|
@ -551,6 +574,58 @@ begin
|
|||
////////////////////////// ±£´æ×Ó±í //////////////////////////
|
||||
///
|
||||
///
|
||||
///
|
||||
////////////////////////// 保存子表 //////////////////////////
|
||||
with CDS_2 do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if Trim(CDS_2.fieldbyname('BCIGID').AsString) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryTemp, MAXID3, 'GS', 'BS_Cloth_Info_GYSCP', 4, 1) = False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取子流水号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
MAXID3 := Trim(CDS_2.fieldbyname('BCIGID').AsString);
|
||||
end;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select * from BS_Cloth_Info_GYSCP where ');
|
||||
sql.Add(' BCIGID=''' + Trim(MAXID3) + '''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if Trim(CDS_2.fieldbyname('BCIGID').AsString) = '' then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('FillID').Value := Trim(DCode);
|
||||
FieldByName('Filler').Value := Trim(DName);
|
||||
FieldByName('FillTime').Value := SGetServerDateTime(ADOQueryTemp);
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
|
||||
end;
|
||||
FieldByName('BCIID').Value := Trim(MaxBCIID);
|
||||
FieldByName('BCIGID').Value := Trim(MAXID3);
|
||||
RTSetSaveDataCDS(ADOQueryCmd, Tv2, CDS_2, 'BS_Cloth_Info_GYSCP', 0);
|
||||
Post;
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
|
||||
// with ADOQueryCmd do
|
||||
|
|
@ -675,6 +750,27 @@ begin
|
|||
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoInput.ToolButton5Click(Sender: TObject);
|
||||
var
|
||||
maxno: string;
|
||||
begin
|
||||
|
||||
// if GetLSNo(ADOQueryCmd, maxno, 'YS', 'BS_Cloth_Info_Sub', 4, 1) = False then
|
||||
// begin
|
||||
// Application.MessageBox('取号失败!', '提示', 0);
|
||||
// Exit;
|
||||
// end;
|
||||
|
||||
|
||||
with CDS_2 do
|
||||
begin
|
||||
APPEND;
|
||||
fieldbyname('BCIGID').Value := NULL;
|
||||
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoInput.CostPricePropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue, FFieldName: string;
|
||||
|
|
@ -706,6 +802,28 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoInput.cxGridDBColumn1PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmCompanySel := TfrmCompanySel.Create(Application);
|
||||
with frmCompanySel do
|
||||
begin
|
||||
FCoType := '供应商';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
with CDS_2 do
|
||||
begin
|
||||
edit;
|
||||
FieldByName('FACTORYNAME').AsString := Trim(CDS_1.fieldbyname('CoName').AsString);
|
||||
end;
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmCompanySel.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoInput.CYColorKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key = #13 then
|
||||
|
|
@ -736,6 +854,27 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoInput.ToolButton7Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_2.IsEmpty then
|
||||
Exit;
|
||||
|
||||
if Trim(CDS_2.fieldbyname('BCIGID').AsString) <> '' then
|
||||
begin
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete from BS_Cloth_Info_GYSCP where BCIGID=''' + Trim(CDS_1.fieldbyname('BCIGID').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
|
||||
CDS_2.Delete;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoInput.TV1Column5PropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue, FFieldName: string;
|
||||
|
|
|
|||
14356
A02基础产品管理/U_GYSCPNAME.dfm
Normal file
14356
A02基础产品管理/U_GYSCPNAME.dfm
Normal file
File diff suppressed because it is too large
Load Diff
655
A02基础产品管理/U_GYSCPNAME.pas
Normal file
655
A02基础产品管理/U_GYSCPNAME.pas
Normal file
|
|
@ -0,0 +1,655 @@
|
|||
unit U_GYSCPNAME;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, ToolWin, ComCtrls, U_BaseInput, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
|
||||
cxGridCustomView, cxGrid, DBClient, ADODB, ImgList, StdCtrls, ExtCtrls,
|
||||
cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator, dxDateRanges, dxScrollbarAnnotations,
|
||||
cxContainer, dxBarBuiltInMenu, cxImageList, System.ImageList,
|
||||
dxSkinsDefaultPainters, dxSkinsCore;
|
||||
|
||||
type
|
||||
TfrmGYSCPNAME = class(TfrmBaseInput)
|
||||
ToolBar1: TToolBar;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
TBAdd: TToolButton;
|
||||
TBSave: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ToolButton1: TToolButton;
|
||||
TBEdit: TToolButton;
|
||||
ADOConnection1: TADOConnection;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
ZDYName: TcxTextEdit;
|
||||
ThreeImgList: TImageList;
|
||||
Label2: TLabel;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
ImageList1: TImageList;
|
||||
cxGrid1: TcxGrid;
|
||||
TV1: TcxGridDBTableView;
|
||||
TV1Column1: TcxGridDBColumn;
|
||||
TV1Column2: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBAddClick(Sender: TObject);
|
||||
procedure TBSaveClick(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure TBEditClick(Sender: TObject);
|
||||
procedure TV1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure V1NamePropertiesEditValueChanged(Sender: TObject);
|
||||
procedure V1OrderNoPropertiesEditValueChanged(Sender: TObject);
|
||||
procedure V1NotePropertiesEditValueChanged(Sender: TObject);
|
||||
procedure V1Column1PropertiesEditValueChanged(Sender: TObject);
|
||||
procedure V1HelpTypePropertiesEditValueChanged(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure ZDYNamePropertiesChange(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
{ Private declarations }
|
||||
public
|
||||
flag, flagname, snote, MainType: string;
|
||||
fnote, forderno, fZdyFlag, ViewFlag, fnote1, FHelpType: Boolean;
|
||||
PPSTE: integer;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmGYSCPNAME: TfrmGYSCPNAME;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_ZDYHelp;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmGYSCPNAME.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
Connected := true;
|
||||
end;
|
||||
ADOQueryBaseCmd.Connection := ADOConnection1;
|
||||
ADOQueryBaseTemp.Connection := ADOConnection1;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmGYSCPNAME.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
|
||||
ZDYName.SetFocus;
|
||||
|
||||
Action := cahide;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSCPNAME.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,ZJM=dbo.getPinYin(A.ZdyName) from KH_ZDY A where A.Type=''' + flag + '''');
|
||||
if Trim(MainType) <> '' then
|
||||
begin
|
||||
sql.Add(' and A.MainType=''' + Trim(MainType) + '''');
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData(ADOQueryMain, ClientDataSet1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSCPNAME.TBAddClick(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
ZDYName.SetFocus;
|
||||
TV1.OptionsData.Editing := True;
|
||||
TV1.OptionsSelection.CellSelect := True;
|
||||
for i := 0 to 5 do
|
||||
begin
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
Append;
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmGYSCPNAME.TBSaveClick(Sender: TObject);
|
||||
var
|
||||
maxno: string;
|
||||
begin
|
||||
if ClientDataSet1.IsEmpty then
|
||||
Exit;
|
||||
ZDYName.SetFocus;
|
||||
|
||||
if ClientDataSet1.Locate('ZDYName', null, []) then
|
||||
begin
|
||||
Application.MessageBox('名称不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if ClientDataSet1.Locate('ZDYName', '', []) then
|
||||
begin
|
||||
Application.MessageBox('名称不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from KH_ZDY where ZdyNo=''' + Trim(flag) + '''');
|
||||
open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from KH_ZDY where 1=2');
|
||||
open;
|
||||
ADOQueryCmd.Append;
|
||||
ADOQueryCmd.FieldByName('ZDYNo').Value := Trim(flag);
|
||||
ADOQueryCmd.FieldByName('ZDYName').Value := trim(flagname);
|
||||
ADOQueryCmd.FieldByName('Type').Value := 'Main';
|
||||
ADOQueryCmd.FieldByName('MainType').Value := Trim(MainType);
|
||||
ADOQueryCmd.Post;
|
||||
{ sql.Add('insert into KH_ZDY(ZDYNo,ZDYName,Type,MainType) select :ZDYNo,:ZDYName,:Type,:MainType ');
|
||||
Parameters.ParamByName('ZDYNo').Value:=Trim(flag);
|
||||
Parameters.ParamByName('ZDYName').Value:=Trim(flagname);
|
||||
Parameters.ParamByName('Type').Value:='Main';
|
||||
Parameters.ParamByName('MainType').Value:=Trim(MainType);
|
||||
ExecSQL; }
|
||||
end;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
ClientDataSet1.DisableControls;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
First;
|
||||
while not eof do
|
||||
begin
|
||||
if Trim(ClientDataSet1.FieldByName('ZDYNO').AsString) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryTemp, maxno, 'SY', 'KH_ZDY', 3, 1) = False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
ClientDataSet1.EnableControls;
|
||||
Application.MessageBox('取最大编号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
maxno := Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString);
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('select * from KH_Zdy where Type=''' + Trim(flag) + '''');
|
||||
if Trim(MainType) <> '' then
|
||||
SQL.Add(' and MainType=''' + Trim(MainType) + '''');
|
||||
sql.Add(' and ZdyName=''' + Trim(ClientDataSet1.fieldbyname('ZdyName').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty = False then
|
||||
begin
|
||||
if ADOQueryTemp.RecordCount > 1 then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
ClientDataSet1.EnableControls;
|
||||
Application.MessageBox('名称重复!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) = '' then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
ClientDataSet1.EnableControls;
|
||||
Application.MessageBox('名称重复!', '提示', 0);
|
||||
Exit;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if Trim(ADOQueryTemp.fieldbyname('ZdyNo').AsString) <> Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
ClientDataSet1.EnableControls;
|
||||
Application.MessageBox('名称重复!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('delete KH_ZDY where ZDYNO=''' + Trim(ClientDataSet1.fieldbyname('ZDYNO').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from KH_ZDY where 1<>1');
|
||||
Open;
|
||||
end;
|
||||
ADOQueryCmd.Append;
|
||||
ADOQueryCmd.FieldByName('ZDYNo').Value := Trim(maxno);
|
||||
ADOQueryCmd.FieldByName('ZDYName').Value := ClientDataSet1.fieldbyname('ZDYName').Value;
|
||||
ADOQueryCmd.FieldByName('note').Value := Trim(snote);
|
||||
//ADOQueryCmd.FieldByName('orderno').Value:=ClientDataSet1.fieldbyname('Name').AsString;
|
||||
ADOQueryCmd.FieldByName('Type').Value := flag;
|
||||
ADOQueryCmd.FieldByName('valid').Value := 'Y';
|
||||
if Trim(MainType) <> '' then
|
||||
ADOQueryCmd.FieldByName('MainType').Value := Trim(MainType);
|
||||
//ADOQueryCmd.FieldByName('sel').Value:=0;
|
||||
ADOQueryCmd.Post;
|
||||
ClientDataSet1.Edit;
|
||||
ClientDataSet1.FieldByName('ZDYNo').Value := Trim(maxno);
|
||||
ClientDataSet1.Post;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
ClientDataSet1.EnableControls;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Application.MessageBox('保存成功!', '提示', 0);
|
||||
TV1.OptionsData.Editing := False;
|
||||
TV1.OptionsSelection.CellSelect := False;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!', '提示', 0);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmGYSCPNAME.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet1.IsEmpty then
|
||||
Exit;
|
||||
if (Trim(ClientDataSet1.FieldByName('ZDYNo').AsString) <> '') or (Trim(ClientDataSet1.FieldByName('ZDYname').AsString) <> '') then
|
||||
begin
|
||||
if application.MessageBox('确定要删除吗?', '提示信息', 1) = 2 then
|
||||
exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete KH_ZDY where ZDYNo=''' + Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString) + '''');
|
||||
SQL.Add(' and Type=''' + Trim(flag) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
ClientDataSet1.Delete;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSCPNAME.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 2;
|
||||
ZDYName.SetFocus;
|
||||
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSCPNAME.FormShow(Sender: TObject);
|
||||
var
|
||||
fsj, fsj1: string;
|
||||
begin
|
||||
// inherited;
|
||||
|
||||
InitGrid();
|
||||
fsj := Trim(flag) + '01';
|
||||
fsj1 := Trim(flagname) + '01';
|
||||
|
||||
ReadCxGrid('自定义' + Trim(flag), TV1, '自定义数据');
|
||||
frmZDYHelp.Caption := Trim(flagname);
|
||||
|
||||
if ViewFlag = True then
|
||||
begin
|
||||
TBAdd.Visible := False;
|
||||
TBSave.Visible := False;
|
||||
TBDel.Visible := False;
|
||||
TBEdit.Visible := False;
|
||||
Label2.Visible := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSCPNAME.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
ZDYName.SetFocus;
|
||||
// WriteCxGrid('自定义'+Trim(flag),TV1,'自定义数据');
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSCPNAME.TBEditClick(Sender: TObject);
|
||||
begin
|
||||
TV1.OptionsData.Editing := True;
|
||||
TV1.OptionsSelection.CellSelect := True;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSCPNAME.TV1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
if TV1.OptionsData.Editing = False then
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSCPNAME.ZDYNamePropertiesChange(Sender: TObject);
|
||||
var
|
||||
fsj: string;
|
||||
begin
|
||||
if Trim(ZDYName.Text) <> '' then
|
||||
begin
|
||||
fsj := ' zdyname like ''' + '%' + Trim(ZDYName.Text) + '%' + '''' + ' or Note like ''' + '%' + Trim(ZDYName.Text) + '%' + '''' + ' or ZJM like ''' + '%' + Trim(ZDYName.Text) + '%' + '''';
|
||||
end;
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, fsj);
|
||||
SCreateCDS(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData(ADOQueryMain, ClientDataSet1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSCPNAME.V1NamePropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
maxno, mvalue: string;
|
||||
begin
|
||||
mvalue := TcxTextEdit(Sender).EditingText;
|
||||
if Trim(mvalue) = '' then
|
||||
begin
|
||||
//Application.MessageBox('名称不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('ZdyName').Value := Trim(mvalue);
|
||||
//Post;
|
||||
end;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from KH_ZDY where ZdyNo=''' + Trim(flag) + '''');
|
||||
open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from KH_ZDY where 1=2');
|
||||
open;
|
||||
ADOQueryCmd.Append;
|
||||
ADOQueryCmd.FieldByName('ZDYNo').Value := Trim(flag);
|
||||
ADOQueryCmd.FieldByName('ZDYName').Value := trim(flagname);
|
||||
ADOQueryCmd.FieldByName('Type').Value := 'Main';
|
||||
ADOQueryCmd.FieldByName('MainType').Value := Trim(MainType);
|
||||
ADOQueryCmd.Post;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
//ClientDataSet1.DisableControls;
|
||||
//with ClientDataSet1 do
|
||||
//begin
|
||||
//First;
|
||||
//while not eof do
|
||||
//begin
|
||||
if Trim(ClientDataSet1.FieldByName('ZDYNO').AsString) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryTemp, maxno, 'SY', 'KH_ZDY', 3, 1) = False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
//ClientDataSet1.EnableControls;
|
||||
Application.MessageBox('取最大编号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
maxno := Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString);
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('select * from KH_Zdy where Type=''' + Trim(flag) + '''');
|
||||
if Trim(MainType) <> '' then
|
||||
SQL.Add(' and MainType=''' + Trim(MainType) + '''');
|
||||
sql.Add(' and ZdyName=''' + Trim(ClientDataSet1.fieldbyname('ZdyName').AsString) + '''');
|
||||
sql.Add(' and note=''' + Trim(ClientDataSet1.fieldbyname('note').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty = False then
|
||||
begin
|
||||
if ADOQueryTemp.RecordCount > 1 then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
|
||||
//ClientDataSet1.EnableControls;
|
||||
Application.MessageBox('名称重复!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) = '' then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
//ClientDataSet1.EnableControls;
|
||||
Application.MessageBox('名称重复!', '提示', 0);
|
||||
Exit;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if Trim(ADOQueryTemp.fieldbyname('ZdyNo').AsString) <> Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
//ClientDataSet1.EnableControls;
|
||||
Application.MessageBox('名称重复!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('delete KH_ZDY where ZDYNO=''' + Trim(ClientDataSet1.fieldbyname('ZDYNO').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from KH_ZDY where 1<>1');
|
||||
Open;
|
||||
end;
|
||||
ADOQueryCmd.Append;
|
||||
ADOQueryCmd.FieldByName('ZDYNo').Value := Trim(maxno);
|
||||
ADOQueryCmd.FieldByName('ZDYName').Value := ClientDataSet1.fieldbyname('ZDYName').AsString;
|
||||
ADOQueryCmd.FieldByName('note').Value := Trim(snote);
|
||||
//ADOQueryCmd.FieldByName('orderno').Value:=ClientDataSet1.fieldbyname('Name').AsString;
|
||||
ADOQueryCmd.FieldByName('Type').Value := flag;
|
||||
ADOQueryCmd.FieldByName('valid').Value := 'Y';
|
||||
if Trim(MainType) <> '' then
|
||||
ADOQueryCmd.FieldByName('MainType').Value := Trim(MainType);
|
||||
//ADOQueryCmd.FieldByName('sel').Value:=0;
|
||||
ADOQueryCmd.Post;
|
||||
ClientDataSet1.Edit;
|
||||
ClientDataSet1.FieldByName('ZDYNo').Value := Trim(maxno);
|
||||
//ClientDataSet1.Post;
|
||||
// Next;
|
||||
//end;
|
||||
//end;
|
||||
// ClientDataSet1.EnableControls;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
//Application.MessageBox('保存成功!','提示',0);
|
||||
//TV1.OptionsData.Editing:=False;
|
||||
//TV1.OptionsSelection.CellSelect:=False;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSCPNAME.V1OrderNoPropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue: string;
|
||||
begin
|
||||
if Trim(ClientDataSet1.fieldbyname('ZdyName').AsString) = '' then
|
||||
begin
|
||||
Application.MessageBox('名称不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
mvalue := TcxTextEdit(Sender).EditingText;
|
||||
if Trim(mvalue) = '' then
|
||||
begin
|
||||
mvalue := '0';
|
||||
end;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('OrderNo').Value := mvalue;
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('Update KH_Zdy Set OrderNo=' + mvalue);
|
||||
sql.Add(' where ZdyNo=''' + Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSCPNAME.V1NotePropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue: string;
|
||||
begin
|
||||
if Trim(ClientDataSet1.fieldbyname('ZdyName').AsString) = '' then
|
||||
begin
|
||||
Application.MessageBox('名称不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
mvalue := TcxTextEdit(Sender).EditingText;
|
||||
if Trim(mvalue) = '' then
|
||||
begin
|
||||
mvalue := '';
|
||||
end;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('Note').Value := mvalue;
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('Update KH_Zdy Set Note=''' + Trim(mvalue) + '''');
|
||||
sql.Add(' where ZdyNo=''' + Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSCPNAME.V1Column1PropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue: string;
|
||||
fieldname: string;
|
||||
begin
|
||||
fieldname := Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName;
|
||||
if Trim(ClientDataSet1.fieldbyname('ZdyName').AsString) = '' then
|
||||
begin
|
||||
Application.MessageBox('名称不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
mvalue := TcxTextEdit(Sender).EditingText;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName(fieldname).Value := mvalue;
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('Update KH_Zdy Set ' + fieldname + '=''' + Trim(mvalue) + ''' ');
|
||||
sql.Add('where ZdyNo=''' + Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSCPNAME.V1HelpTypePropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue: string;
|
||||
begin
|
||||
if Trim(ClientDataSet1.fieldbyname('ZdyName').AsString) = '' then
|
||||
begin
|
||||
Application.MessageBox('名称不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
mvalue := TcxTextEdit(Sender).EditingText;
|
||||
if Trim(mvalue) = '' then
|
||||
begin
|
||||
mvalue := '0';
|
||||
end;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('HelpType').Value := mvalue;
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('Update KH_Zdy Set HelpType=''' + Trim(mvalue) + '''');
|
||||
sql.Add(' where ZdyNo=''' + Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSCPNAME.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
WriteCxGrid('自定义' + Trim(flag), TV1, '自定义数据');
|
||||
frmZDYHelp := nil;
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
69
A02基础产品管理/U_GYSCPNAME.vlb
Normal file
69
A02基础产品管理/U_GYSCPNAME.vlb
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
[TBDel]
|
||||
Coordinates=374,214,50,36
|
||||
|
||||
[Label2]
|
||||
Coordinates=298,146,53,58
|
||||
|
||||
[ToolButton1]
|
||||
Coordinates=280,214,84,36
|
||||
|
||||
[TBEdit]
|
||||
Coordinates=217,214,53,36
|
||||
|
||||
[ADOQueryCmd]
|
||||
Coordinates=121,146,104,58
|
||||
|
||||
[TBAdd]
|
||||
Coordinates=153,214,54,36
|
||||
|
||||
[TBClose]
|
||||
Coordinates=79,214,64,36
|
||||
|
||||
[Panel1]
|
||||
Coordinates=333,78,55,58
|
||||
|
||||
[ZDYName]
|
||||
Coordinates=249,78,74,58
|
||||
|
||||
[ADOQueryTemp]
|
||||
Coordinates=233,10,109,58
|
||||
|
||||
[cxGridPopupMenu1]
|
||||
Coordinates=504,188,128,36
|
||||
|
||||
[ADOConnection1]
|
||||
Coordinates=504,243,114,36
|
||||
|
||||
[ThreeImgList]
|
||||
Coordinates=504,298,90,36
|
||||
|
||||
[ClientDataSet1]
|
||||
Coordinates=10,146,101,58
|
||||
|
||||
[DataSource1]
|
||||
Coordinates=219,78,89,36
|
||||
|
||||
[Label1]
|
||||
Coordinates=235,146,53,58
|
||||
|
||||
[TBSave]
|
||||
Coordinates=438,146,60,36
|
||||
|
||||
[ADOQueryMain]
|
||||
Coordinates=398,78,105,58
|
||||
|
||||
[DataLink_TradeManage.AdoDataLink]
|
||||
Coordinates=10,78,229,58
|
||||
|
||||
[ToolBar1]
|
||||
Coordinates=361,146,67,36
|
||||
|
||||
[frmBaseInput.ADOQueryBaseTemp]
|
||||
Coordinates=352,10,219,58
|
||||
|
||||
[frmBaseInput.ADOQueryBaseCmd]
|
||||
Coordinates=10,10,213,58
|
||||
|
||||
[]
|
||||
Coordinates=10,214,59,36
|
||||
|
||||
|
|
@ -936,7 +936,7 @@ inherited frmMachRollMain: TfrmMachRollMain
|
|||
Height = 30
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 99
|
||||
ButtonWidth = 107
|
||||
Caption = 'ToolBar1'
|
||||
EdgeInner = esNone
|
||||
EdgeOuter = esNone
|
||||
|
|
@ -953,7 +953,7 @@ inherited frmMachRollMain: TfrmMachRollMain
|
|||
OnClick = ToolButton3Click
|
||||
end
|
||||
object Trolldel: TToolButton
|
||||
Left = 71
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
|
|
@ -961,14 +961,22 @@ inherited frmMachRollMain: TfrmMachRollMain
|
|||
OnClick = TrolldelClick
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 142
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #30133#28857#31649#29702
|
||||
ImageIndex = 2
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 213
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25171#21360#24211#23384#26631#31614
|
||||
ImageIndex = 21
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 245
|
||||
Left = 324
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25171#21367#35774#32622
|
||||
|
|
@ -976,7 +984,7 @@ inherited frmMachRollMain: TfrmMachRollMain
|
|||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ToolButton7: TToolButton
|
||||
Left = 348
|
||||
Left = 411
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384#26684#24335
|
||||
|
|
@ -984,14 +992,14 @@ inherited frmMachRollMain: TfrmMachRollMain
|
|||
OnClick = ToolButton7Click
|
||||
end
|
||||
object Tlog: TToolButton
|
||||
Left = 451
|
||||
Left = 498
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26085#24535
|
||||
ImageIndex = 30
|
||||
end
|
||||
object ToolButton8: TToolButton
|
||||
Left = 522
|
||||
Left = 561
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
|
|
|
|||
|
|
@ -175,6 +175,7 @@ type
|
|||
frxOLEObject1: TfrxOLEObject;
|
||||
frxRichObject1: TfrxRichObject;
|
||||
frxBarCodeObject1: TfrxBarCodeObject;
|
||||
ToolButton2: TToolButton;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
|
|
@ -198,6 +199,7 @@ type
|
|||
procedure dxLayoutControl_packDblClick(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure FrameKeyBoard1SpeedButton1Click(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
private
|
||||
FCIID, FCIFName, FWorkshop: string;
|
||||
FBCIOID, FQtyUnit, FLenUnit: string;
|
||||
|
|
@ -746,6 +748,46 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmMachRollMain.ToolButton2Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile: string;
|
||||
Txt, fImagePath, Txt2, fImagePath2: string;
|
||||
Moudle: Thandle;
|
||||
Makebar: TMakebar;
|
||||
Mixtext: TMixtext;
|
||||
begin
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add(' EXEC P_BS_Cloth_Prt2 ');
|
||||
SQL.Add(' @Filtration=''' + trim(FBCIOID) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryPrint.IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('标签内容未找到!', '提示信息', MB_ICONERROR);
|
||||
exit;
|
||||
end;
|
||||
|
||||
ExportFtErpFile('库存标签.fr3', ADOQueryBaseTemp);
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\库存标签.fr3';
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
|
||||
frxReport1.LoadFromFile(fPrintFile);
|
||||
frxReport1.PrintOptions.Copies := cds_params.fieldbyName('labNumber').AsInteger;
|
||||
frxReport1.PrintOptions.ShowDialog := false;
|
||||
frxReport1.PrepareReport(True);
|
||||
frxReport1.Print();
|
||||
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找到' + fPrintFile), '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmMachRollMain.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
if cds_3.IsEmpty then
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user