This commit is contained in:
DESKTOP-E401PHE\Administrator 2025-09-26 16:19:47 +08:00
parent eb75179c2c
commit 2f4312e0c3
15 changed files with 2223 additions and 478 deletions

View File

@ -1,6 +1,6 @@
object frmKuWeiList: TfrmKuWeiList
Left = 756
Top = 669
Left = 954
Top = 178
Width = 1215
Height = 637
Caption = #24211#20301#31649#29702

View File

@ -80,6 +80,7 @@ type
procedure N1Click(Sender: TObject);
procedure cxTabControl1Change(Sender: TObject);
procedure ZJStatusChange(Sender: TObject);
procedure ToolButton4Click(Sender: TObject);
procedure TbSelectClick(Sender: TObject);
procedure Tv1DblClick(Sender: TObject);
private
@ -87,6 +88,7 @@ type
DQdate:TDateTime;
procedure InitGrid();
procedure InitForm();
procedure PrtData(KWID:String);
{ Private declarations }
public
FFInt,FCloth:Integer;
@ -210,6 +212,82 @@ begin
TBFind.Click;
end;
procedure TfrmKuWeiList.ToolButton4Click(Sender: TObject);
begin
if Order_Main.IsEmpty then Exit;
if Trim(ComboBox1.Text)='' then
begin
Application.MessageBox('方向不能为空!','提示',0);
Exit;
end;
if Order_Main.Locate('SSel',True,[])=False then
begin
Application.MessageBox('没有选择数据!','提示',0);
Exit;
end;
Order_Main.DisableControls;
with Order_Main do
begin
First;
while Locate('SSel',True,[]) do
begin
PrtData(Trim(Order_Main.fieldbyname('KWID').AsString));
Edit;
FieldByName('SSel').Value:=False;
end;
end;
Order_Main.EnableControls;
end;
procedure TfrmKuWeiList.PrtData(KWID:String);
var
fPrintFile,Txt,fImagePath:string;
i,j:Integer;
Moudle: THandle;
Makebar:TMakebar;
Mixtext:TMixtext;
begin
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\库位标签.rmf';
if FileExists(fPrintFile)=False then
begin
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\库位标签.rmf'),'提示',0);
exit;
end;
with ADOQueryTemp do
begin
Close;
SQL.Clear;
sql.Add('select * from KuWei where KWID='''+Trim(KWID)+'''');
Open;
end;
SCreateCDS20(ADOQueryTemp,CDS_PRT);
SInitCDSData20(ADOQueryTemp,CDS_PRT);
try
Moudle:=LoadLibrary('MakeQRBarcode.dll');
@Makebar:=GetProcAddress(Moudle,'Make');
@Mixtext:=GetProcAddress(Moudle,'MixText');
Txt:=Trim(KWID);
fImagePath:=ExtractFilePath(Application.ExeName)+'image\temp.bmp';
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName)+'image')) then
CreateDirectory(pchar(ExtractFilePath(Application.ExeName)+'image'),nil);
if FileExists(fImagePath) then DeleteFile(fImagePath);
Makebar(pchar(Txt),Length(Txt),3,3,0,PChar(fImagePath),3);
except
application.MessageBox('二维码生成失败!','提示信息',MB_ICONERROR);
exit;
end;
RMVariables['QRBARCODE']:=fImagePath;
if Trim(ComboBox1.Text)='→' then
begin
RMVariables['FangXiang']:='→→→→';
end else
if Trim(ComboBox1.Text)='←' then
begin
RMVariables['FangXiang']:='←←←←';
end;
RM1.LoadFromFile(fPrintFile);
//RM1.ShowReport;
RM1.PrintReport;
end;
procedure TfrmKuWeiList.TbSelectClick(Sender: TObject);
begin

View File

@ -0,0 +1,709 @@
object frmMLMangeYHSel: TfrmMLMangeYHSel
Left = 435
Top = 141
Width = 1299
Height = 697
Caption = #21360#33457#26579#33394#20135#21697#36873#25321
Color = clBtnFace
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -15
Font.Name = #23435#20307
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
OnClose = FormClose
OnCreate = FormCreate
OnDestroy = FormDestroy
OnShow = FormShow
PixelsPerInch = 120
TextHeight = 15
object ToolBar1: TToolBar
Left = 0
Top = 0
Width = 1291
AutoSize = True
ButtonHeight = 30
ButtonWidth = 65
Caption = 'ToolBar1'
Color = clSkyBlue
DisabledImages = DataLink_YXYMT.ThreeImgList
Flat = True
Images = DataLink_YXYMT.ThreeImgList
List = True
ParentColor = False
ShowCaptions = True
TabOrder = 0
object TBRafresh: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #21047#26032
ImageIndex = 0
OnClick = TBRafreshClick
end
object ToolButton3: TToolButton
Left = 69
Top = 0
AutoSize = True
Caption = #36873#25321
ImageIndex = 10
OnClick = ToolButton3Click
end
object TBClose: TToolButton
Left = 138
Top = 0
AutoSize = True
Caption = #20851#38381
ImageIndex = 21
OnClick = TBCloseClick
end
end
object Panel11: TPanel
Left = 0
Top = 32
Width = 1291
Height = 628
Align = alClient
BevelInner = bvRaised
BevelOuter = bvLowered
Color = clSkyBlue
TabOrder = 1
object Panel1: TPanel
Left = 2
Top = 2
Width = 1287
Height = 51
Align = alTop
BevelInner = bvRaised
BevelOuter = bvLowered
Color = clSkyBlue
TabOrder = 0
object Label2: TLabel
Left = 205
Top = 15
Width = 76
Height = 18
Caption = #20135#21697#32534#21495
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -18
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label1: TLabel
Left = 384
Top = 15
Width = 38
Height = 26
Caption = #21697#21517
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -18
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label4: TLabel
Left = 569
Top = 15
Width = 38
Height = 18
Caption = #25104#20221
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -18
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label6: TLabel
Left = 926
Top = 15
Width = 38
Height = 18
Caption = #20811#37325
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -18
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label3: TLabel
Left = 766
Top = 15
Width = 38
Height = 18
Caption = #38376#24133
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -18
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label5: TLabel
Left = 30
Top = 13
Width = 38
Height = 18
Caption = #31867#22411
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -18
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label7: TLabel
Left = 1099
Top = 15
Width = 38
Height = 18
Caption = #24037#33402
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -18
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object MLXXNO: TEdit
Tag = 2
Left = 286
Top = 9
Width = 72
Height = 26
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -18
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 0
OnChange = MLXXNOChange
end
object MLName: TEdit
Tag = 2
Left = 426
Top = 10
Width = 124
Height = 26
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -18
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 1
OnChange = MLXXNOChange
end
object MLCF: TEdit
Tag = 2
Left = 620
Top = 10
Width = 124
Height = 26
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -18
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 2
OnChange = MLXXNOChange
end
object MLKZ: TEdit
Tag = 2
Left = 970
Top = 10
Width = 100
Height = 26
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -18
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 3
OnChange = MLXXNOChange
end
object MLMF: TEdit
Tag = 2
Left = 810
Top = 10
Width = 100
Height = 26
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -18
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 4
OnChange = MLXXNOChange
end
object LX: TComboBox
Tag = 2
Left = 75
Top = 9
Width = 125
Height = 26
Style = csDropDownList
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -18
Font.Name = #23435#20307
Font.Style = [fsBold]
ItemHeight = 18
ItemIndex = 2
ParentFont = False
TabOrder = 5
Text = #26579#33394#38754#26009
OnChange = LXChange
Items.Strings = (
''
#21360#33457#38754#26009
#26579#33394#38754#26009
#28907#37329#38754#26009)
end
object GYLXName: TEdit
Tag = 2
Left = 1143
Top = 10
Width = 187
Height = 26
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -18
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 6
OnChange = MLXXNOChange
end
end
object cxGrid1: TcxGrid
Left = 2
Top = 53
Width = 1287
Height = 573
Align = alClient
PopupMenu = PopupMenu1
TabOrder = 1
object Tv1: TcxGridDBTableView
OnDblClick = Tv1DblClick
Navigator.Buttons.CustomButtons = <>
DataController.DataSource = DataSource2
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <
item
Kind = skSum
end>
DataController.Summary.SummaryGroups = <>
OptionsCustomize.ColumnFiltering = False
OptionsData.Editing = False
OptionsView.GroupByBox = False
Styles.Content = cxStyle1
Styles.Header = cxStyle1
object Tv1Column1: TcxGridDBColumn
Caption = #31867#22411
DataBinding.FieldName = 'LX'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 80
end
object v1MLXXNO: TcxGridDBColumn
Caption = #20135#21697#32534#21495
DataBinding.FieldName = 'MLXXNO'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 78
end
object v1MLName: TcxGridDBColumn
Caption = #21697#21517
DataBinding.FieldName = 'MLName'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 222
end
object v1MLMF: TcxGridDBColumn
Caption = #38376#24133
DataBinding.FieldName = 'MLMF'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 100
end
object v1MLKZ: TcxGridDBColumn
Caption = #20811#37325
DataBinding.FieldName = 'MLKZ'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 100
end
object v1Column1: TcxGridDBColumn
Caption = #25104#20221
DataBinding.FieldName = 'MLCF'
HeaderAlignmentHorz = taCenter
Width = 195
end
object Tv1Column2: TcxGridDBColumn
Caption = #25104#26412#20215
DataBinding.FieldName = 'YPPrice'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 80
end
object Tv1Column3: TcxGridDBColumn
Caption = #24037#33402
DataBinding.FieldName = 'GYLXName'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 200
end
end
object cxGrid1Level1: TcxGridLevel
GridView = Tv1
end
end
object Panel2: TPanel
Left = 1288
Top = 120
Width = 166
Height = 316
BevelInner = bvRaised
BevelOuter = bvLowered
Color = clSkyBlue
TabOrder = 2
Visible = False
object Label8: TLabel
Left = 41
Top = 14
Width = 76
Height = 18
Caption = #25171#21360#36873#25321
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -18
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Image1: TImage
Left = 139
Top = 5
Width = 22
Height = 24
Picture.Data = {
0A544A504547496D616765E2020000FFD8FFE000104A46494600010101006000
600000FFDB004300080606070605080707070909080A0C140D0C0B0B0C191213
0F141D1A1F1E1D1A1C1C20242E2720222C231C1C2837292C30313434341F2739
3D38323C2E333432FFDB0043010909090C0B0C180D0D1832211C213232323232
3232323232323232323232323232323232323232323232323232323232323232
32323232323232323232323232FFC20011080015001503012200021101031101
FFC4001800010003010000000000000000000000000001040607FFC400140101
00000000000000000000000000000000FFDA000C03010002100310000001D728
E50E8491541641FFC4001A100101000301010000000000000000000003040002
140512FFDA00080101000105025A08767A0A63CF4B9B8A2FAECC59C9B679CA93
CFFFC40014110100000000000000000000000000000020FFDA0008010301013F
011FFFC400161100030000000000000000000000000000012021FFDA00080102
01013F01153FFFC4002310000103030207000000000000000000000201031200
10111432152331415161F1FFDA0008010100063F020170E2A6B81A9BC711B16A
B676F39F54CF119EDE44FA7DB013812505C8D41E090DBFFFC400201000010401
040300000000000000000000110001217131104161D15181B1FFDA0008010100
013F2163D491BBDA068605E4BD2CAF9A3D165E7E1E773DBAD18F5246CF481A18
8780F6B0BFFFDA000C03010002000300000010F70F3CFFC40019110001050000
000000000000000000000001112021F0F1FFDA0008010301013F103016E33FFF
C400181100020300000000000000000000000000112021F0F1FFDA0008010201
013F10985D4FFFC4002010010002020201050000000000000000000111310021
4171106191B1C1D1FFDA0008010100013F1052BE32C171A4165A5E6B36882928
00ABD142E0804A779F5775BF2BD2267539ED182EFC22D53BF052BE76C373B434
58E6B378A28290223D34A60000A359FFD9}
OnClick = Image1Click
end
object cxButton1: TcxButton
Left = 21
Top = 46
Width = 127
Height = 54
Caption = #21697#21517#26631#31614
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -22
Font.Name = #24494#36719#38597#40657
Font.Style = [fsBold]
ParentFont = False
TabOrder = 0
OnClick = cxButton1Click
Colors.Default = clBtnFace
end
object cxButton2: TcxButton
Left = 21
Top = 114
Width = 127
Height = 55
Caption = #39068#33394#22823#26631#31614
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -22
Font.Name = #24494#36719#38597#40657
Font.Style = [fsBold]
ParentFont = False
TabOrder = 1
Colors.Default = clBtnFace
end
object cxButton3: TcxButton
Left = 21
Top = 184
Width = 127
Height = 52
Caption = #39068#33394#23567#26631#31614
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -22
Font.Name = #24494#36719#38597#40657
Font.Style = [fsBold]
ParentFont = False
TabOrder = 2
Colors.Default = clBtnFace
end
object cxButton4: TcxButton
Left = 21
Top = 250
Width = 127
Height = 50
Caption = #23458#25143#26631#31614
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -22
Font.Name = #24494#36719#38597#40657
Font.Style = [fsBold]
ParentFont = False
TabOrder = 3
Colors.Default = clBtnFace
end
end
end
object DataSource1: TDataSource
DataSet = ADOQueryTree
Left = 660
Top = 386
end
object ADOQueryTree: TADOQuery
Connection = DataLink_YXYMT.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 626
Top = 387
end
object ADOQueryTemp: TADOQuery
Connection = DataLink_YXYMT.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 906
Top = 187
end
object ADOQueryCmd: TADOQuery
Connection = DataLink_YXYMT.ADOLink
Parameters = <>
Left = 935
Top = 187
end
object cxGridPopupMenu1: TcxGridPopupMenu
PopupMenus = <>
Left = 652
Top = 193
end
object DataSource2: TDataSource
DataSet = CDS_Main
Left = 594
Top = 223
end
object ADOQueryMain: TADOQuery
Connection = DataLink_YXYMT.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 681
Top = 192
end
object CDS_Main: TClientDataSet
Aggregates = <>
Params = <>
Left = 652
Top = 223
end
object RM1: TRMGridReport
ThreadPrepareReport = True
InitialZoom = pzDefault
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
ShowProgress = False
DefaultCollate = False
ShowPrintDialog = False
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
PreviewOptions.RulerUnit = rmutScreenPixels
PreviewOptions.RulerVisible = False
PreviewOptions.DrawBorder = False
PreviewOptions.BorderPen.Color = clGray
PreviewOptions.BorderPen.Style = psDash
Dataset = RMDB_Main
CompressLevel = rmzcFastest
CompressThread = False
LaterBuildEvents = True
OnlyOwnerDataSet = False
Left = 623
Top = 194
ReportData = {}
end
object RMDB_Main: TRMDBDataSet
Visible = True
DataSet = CDS_Main
Left = 696
Top = 386
end
object ODPat: TOpenDialog
Options = [ofReadOnly, ofAllowMultiSelect, ofPathMustExist, ofFileMustExist, ofEnableSizing]
Left = 965
Top = 186
end
object IdFTP1: TIdFTP
MaxLineAction = maException
ReadTimeout = 0
ProxySettings.ProxyType = fpcmNone
ProxySettings.Port = 0
Left = 996
Top = 186
end
object SaveDialog1: TSaveDialog
Left = 681
Top = 223
end
object CDS_Sub: TClientDataSet
Aggregates = <>
Params = <>
Left = 660
Top = 419
end
object DataSource3: TDataSource
DataSet = CDS_Sub
Left = 626
Top = 419
end
object cxGridPopupMenu2: TcxGridPopupMenu
PopupMenus = <>
Left = 592
Top = 419
end
object Order_GX: TClientDataSet
Aggregates = <>
Params = <>
Left = 593
Top = 387
end
object DataSource4: TDataSource
DataSet = Order_GX
Left = 695
Top = 418
end
object cxGridPopupMenu3: TcxGridPopupMenu
Grid = cxGrid1
PopupMenus = <>
Left = 727
Top = 403
end
object ML_Col: TClientDataSet
Aggregates = <>
Params = <>
Left = 1126
Top = 503
end
object DataSource5: TDataSource
DataSet = ML_Col
Left = 1161
Top = 501
end
object cxGridPopupMenu4: TcxGridPopupMenu
PopupMenus = <>
Left = 1193
Top = 501
end
object cxStyleRepository1: TcxStyleRepository
PixelsPerInch = 120
object cxStyle1: TcxStyle
AssignedValues = [svFont]
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #23435#20307
Font.Style = [fsBold]
end
end
object cxGridPopupMenu5: TcxGridPopupMenu
PopupMenus = <>
Left = 996
Top = 217
end
object DataSource6: TDataSource
DataSet = Ord_HX
Left = 965
Top = 218
end
object Ord_HX: TClientDataSet
Aggregates = <>
Params = <>
Left = 936
Top = 219
end
object ADOQuery1: TADOQuery
Connection = DataLink_YXYMT.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 905
Top = 220
end
object PopupMenu1: TPopupMenu
Left = 593
Top = 193
object N1: TMenuItem
Caption = #20462#25913
end
object N2: TMenuItem
Caption = #21024#38500
OnClick = N2Click
end
object DY: TMenuItem
Caption = #25171#21360
OnClick = DYClick
end
object N5: TMenuItem
Caption = #22797#21046
end
object N3: TMenuItem
Caption = #22686#21152#33394#21495
end
object N4: TMenuItem
Caption = #22686#21152#24037#33402
end
end
object RM2: TRMGridReport
ThreadPrepareReport = True
InitialZoom = pzDefault
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
DefaultCollate = False
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
PreviewOptions.RulerUnit = rmutScreenPixels
PreviewOptions.RulerVisible = False
PreviewOptions.DrawBorder = False
PreviewOptions.BorderPen.Color = clGray
PreviewOptions.BorderPen.Style = psDash
Dataset = RMDB_Main
CompressLevel = rmzcFastest
CompressThread = False
LaterBuildEvents = True
OnlyOwnerDataSet = False
Left = 623
Top = 223
ReportData = {}
end
end

View File

@ -0,0 +1,545 @@
unit U_MLMangeYHSel;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxTextEdit, cxButtonEdit,
Menus, cxLookAndFeelPainters, cxButtons, cxImage, BtnEdit, jpeg,
cxLookAndFeels, cxNavigator, dxSkinsCore, dxSkinBlack, dxSkinBlue,
dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide,
dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray,
dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic,
dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringTime, dxSkinStardust,
dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinsDefaultPainters,
dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue,
dxSkinscxPCPainter;
type
TfrmMLMangeYHSel = class(TForm)
ToolBar1: TToolBar;
TBRafresh: TToolButton;
TBClose: TToolButton;
DataSource1: TDataSource;
ADOQueryTree: TADOQuery;
ADOQueryTemp: TADOQuery;
ADOQueryCmd: TADOQuery;
cxGridPopupMenu1: TcxGridPopupMenu;
Panel11: TPanel;
DataSource2: TDataSource;
ADOQueryMain: TADOQuery;
CDS_Main: TClientDataSet;
RM1: TRMGridReport;
RMDB_Main: TRMDBDataSet;
ODPat: TOpenDialog;
IdFTP1: TIdFTP;
SaveDialog1: TSaveDialog;
DataSource3: TDataSource;
cxGridPopupMenu2: TcxGridPopupMenu;
Order_GX: TClientDataSet;
DataSource4: TDataSource;
cxGridPopupMenu3: TcxGridPopupMenu;
ML_Col: TClientDataSet;
DataSource5: TDataSource;
cxGridPopupMenu4: TcxGridPopupMenu;
CDS_Sub: TClientDataSet;
cxStyleRepository1: TcxStyleRepository;
cxStyle1: TcxStyle;
cxGridPopupMenu5: TcxGridPopupMenu;
DataSource6: TDataSource;
Ord_HX: TClientDataSet;
ADOQuery1: TADOQuery;
Panel1: TPanel;
Label2: TLabel;
MLXXNO: TEdit;
Label1: TLabel;
Label4: TLabel;
MLName: TEdit;
MLCF: TEdit;
cxGrid1: TcxGrid;
Tv1: TcxGridDBTableView;
v1MLName: TcxGridDBColumn;
v1MLMF: TcxGridDBColumn;
v1MLKZ: TcxGridDBColumn;
v1Column1: TcxGridDBColumn;
cxGrid1Level1: TcxGridLevel;
v1MLXXNO: TcxGridDBColumn;
Label6: TLabel;
MLKZ: TEdit;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
N4: TMenuItem;
Panel2: TPanel;
cxButton1: TcxButton;
cxButton2: TcxButton;
cxButton3: TcxButton;
Label8: TLabel;
RM2: TRMGridReport;
Image1: TImage;
N5: TMenuItem;
DY: TMenuItem;
cxButton4: TcxButton;
ToolButton3: TToolButton;
Label3: TLabel;
MLMF: TEdit;
Tv1Column1: TcxGridDBColumn;
LX: TComboBox;
Label5: TLabel;
Tv1Column2: TcxGridDBColumn;
Tv1Column3: TcxGridDBColumn;
Label7: TLabel;
GYLXName: TEdit;
procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBCloseClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure cxDBTreeList1DblClick(Sender: TObject);
procedure TBRafreshClick(Sender: TObject);
procedure ToolButton2Click(Sender: TObject);
procedure ToolButton1Click(Sender: TObject);
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure ToolButton10Click(Sender: TObject);
procedure TV4CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
procedure Tv1DblClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure N2Click(Sender: TObject);
procedure cxButton1Click(Sender: TObject);
procedure Image1Click(Sender: TObject);
procedure DYClick(Sender: TObject);
procedure ToolButton3Click(Sender: TObject);
procedure LXChange(Sender: TObject);
procedure MLXXNOChange(Sender: TObject);
private
{ Private declarations }
PState: Integer;
FCPID, FTopID: string;
procedure InitTree();
procedure InitGrid();
procedure ReadINIFile();
public
canshu1: string;
{ Public declarations }
end;
var
frmMLMangeYHSel: TfrmMLMangeYHSel;
implementation
uses
U_DataLink, U_Fun;
{$R *.dfm}
procedure TfrmMLMangeYHSel.InitTree();
begin
end;
procedure TfrmMLMangeYHSel.InitGrid();
begin
try
ADOQueryMain.DisableControls;
with ADOQueryMain do
begin
Close;
SQL.Clear;
SQL.Add('select MLID,YPPrice,MLXXNO=TJML,MLName,MLMF,MLKZ,MLCF,LX=''印花面料'',GYLXName=MLXXGYName ');
sql.Add(' from ML_Manage A ');
sql.Add(' where isnull(A.MLType,'''')=''印花面料'' ');
SQL.Add(' UNION all');
SQL.Add(' select MLID,YPPrice,MLXXNO=MLNo,MLName,MLMF,MLKZ,MLCF,LX=''染色面料'',GYLXName ');
sql.Add(' from ML_Manage A ');
sql.Add(' where isnull(A.MLType,'''')=''染色面料'' ');
SQL.Add(' UNION all');
SQL.Add(' select MLID,YPPrice,MLXXNO=TJML,MLName,MLMF,MLKZ,MLCF,LX=''烫金面料'',GYLXName=MLXXGYName ');
sql.Add(' from ML_Manage A ');
sql.Add(' where isnull(A.MLType,'''')=''烫金面料'' ');
Open;
end;
SCreateCDS20(ADOQueryMain, CDS_Main);
SInitCDSData20(ADOQueryMain, CDS_Main);
finally
ADOQueryMain.EnableControls;
end;
end;
procedure TfrmMLMangeYHSel.FormDestroy(Sender: TObject);
begin
frmMLMangeYHSel := nil;
end;
procedure TfrmMLMangeYHSel.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action := caFree;
end;
procedure TfrmMLMangeYHSel.TBCloseClick(Sender: TObject);
begin
WriteCxGrid('印花面料2', Tv1, '样品管理');
Close;
end;
procedure TfrmMLMangeYHSel.FormShow(Sender: TObject);
begin
{if canshu1='高权限' then
begin
toolbutton11.Visible:=True;
ToolButton3.Visible:=true;
TBDel.Visible:=true;
end
else
begin
if canshu1='查询' then
begin
toolbutton11.Visible:=false;
ToolButton3.Visible:=false;
TBDel.Visible:=false;
end
else
begin
toolbutton11.Visible:=false;
ToolButton3.Visible:=false;
TBDel.Visible:=false;
end;
end;}
InitGrid();
ReadCxGrid('印花面料2', Tv1, '样品管理');
end;
procedure TfrmMLMangeYHSel.cxDBTreeList1DblClick(Sender: TObject);
begin
InitGrid();
end;
procedure TfrmMLMangeYHSel.TBRafreshClick(Sender: TObject);
begin
InitGrid();
if ADOQueryMain.Active then
begin
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
SCreateCDS20(ADOQueryMain, CDS_Main);
SInitCDSData20(ADOQueryMain, CDS_Main);
end;
end;
procedure TfrmMLMangeYHSel.ToolButton2Click(Sender: TObject);
begin
if ADOQueryMain.Active then
begin
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
SCreateCDS20(ADOQueryMain, CDS_Main);
SInitCDSData20(ADOQueryMain, CDS_Main);
end;
end;
procedure TfrmMLMangeYHSel.ToolButton1Click(Sender: TObject);
begin
if CDS_Main.IsEmpty then
Exit;
TcxGridToExcel('客户拿样', cxGrid1);
end;
procedure TfrmMLMangeYHSel.ReadINIFile();
var
programIni: Tinifile; //配置文件名
FileName: string;
begin
FileName := ExtractFilePath(Paramstr(0)) + 'SYSTEMSET.INI';
programIni := Tinifile.create(FileName);
server := programIni.ReadString('SERVER', '服务器地址', '127.0.0.1');
programIni.Free;
end;
procedure TfrmMLMangeYHSel.Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add(' select A.*,isnull(B.BPCode,C.MLNo) BPCode,isnull(B.BPName,C.MLName) BPName');
sql.Add(' ,isnull(B.BPMF,C.MLMF) BPMF,isnull(B.BPKZ,C.MLKZ) BPKZ');
sql.Add(',B.BPJS,B.BPWS,B.BPMiDu,B.BPUnit,C.MLDLNo,C.DLHXK');
SQL.Add(' from ML_Manage_PB A left join BP_ZDY B on B.BPID=A.BPID ');
sql.Add(' left join ML_Manage C on C.MLID=A.BPID');
sql.Add(' where A.MLID=''' + Trim(CDS_Main.fieldbyname('MLID').AsString) + '''');
//ShowMessage(sql.Text);
Open;
end;
SCreateCDS20(ADOQueryCmd, CDS_Sub);
SInitCDSData20(ADOQueryCmd, CDS_Sub);
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add(' select A.*,B.*,C.* from ML_Manage_GX A inner join BP_ZDY B on B.BPID=A.BPID ');
sql.Add('inner join BP_ZDY_Sub C on C.BPSubID=A.BPSubID');
sql.Add(' where A.MLID=''' + Trim(CDS_Main.fieldbyname('MLID').AsString) + '''');
Open;
end;
SCreateCDS20(ADOQueryCmd, Order_GX);
SInitCDSData20(ADOQueryCmd, Order_GX);
//if CDS_Main.FieldByName('MLType').AsString<>'复合' then
begin
//if CDS_Main.FieldByName('MLType').AsString<>'组合' then
begin
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('select * from BP_ZDY_Sub ');
sql.Add('where BPCode=''' + Trim(CDS_Main.fieldbyname('MLDLNo').AsString) + ''' and BPflag=''SHK''');
Open;
end;
SCreateCDS20(ADOQueryCmd, ML_Col);
SInitCDSData20(ADOQueryCmd, ML_Col);
end;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('select A.*,B.* from BP_ZDY_Sub A ');
Sql.Add('inner join KH_Zdy_Attachment B on A.HXATID=B.ATID and B.Type=''CPHX''');
sql.Add(' where A.BPCode=''' + trim(CDS_Main.fieldbyname('DLHXK').AsString) + '''');
open;
end;
SCreateCDS20(ADOQueryCmd, Ord_HX);
SInitCDSData20(ADOQueryCmd, Ord_HX);
end;
end;
procedure TfrmMLMangeYHSel.ToolButton10Click(Sender: TObject);
begin
{if RadioGroup1.ItemIndex=-1 then
begin
application.MessageBox('请选择工序','提示');
exit;
end;}
end;
procedure TfrmMLMangeYHSel.TV4CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
begin
//if CDS_Main.FieldByName('MLType').AsString='复合' then
begin
with ADOQuery1 do
begin
Close;
SQL.Clear;
sql.Add('select * from BP_ZDY_Sub ');
sql.Add('where BPCode=''' + Trim(CDS_Sub.Fieldbyname('MLDLNo').AsString) + ''' and BPflag=''SHK''');
Open;
end;
SCreateCDS20(ADOQuery1, ML_Col);
SInitCDSData20(ADOQuery1, ML_Col);
with ADOQuery1 do
begin
Close;
SQL.Clear;
sql.Add('select A.*,B.* from BP_ZDY_Sub A ');
Sql.Add('inner join KH_Zdy_Attachment B on A.HXATID=B.ATID and B.Type=''CPHX''');
sql.Add(' where A.BPCode=''' + trim(CDS_Sub.Fieldbyname('DLHXK').AsString) + '''');
open;
end;
SCreateCDS20(ADOQuery1, Ord_HX);
SInitCDSData20(ADOQuery1, Ord_HX);
end;
end;
procedure TfrmMLMangeYHSel.Tv1DblClick(Sender: TObject);
begin
if CDS_Main.IsEmpty then
exit;
self.ModalResult := 1;
end;
procedure TfrmMLMangeYHSel.FormCreate(Sender: TObject);
begin
canshu1 := Trim(DParameters1);
end;
procedure TfrmMLMangeYHSel.N2Click(Sender: TObject);
begin
if CDS_Main.IsEmpty then
Exit;
with ADOQueryCmd do
begin
close;
sql.Clear;
SQL.Add('select * from ML_Manage A ');
sql.Add(' where isnull(A.MLType,'''')=''印花面料''');
sql.Add(' and TJML=''' + trim(CDS_Main.fieldbyname('TJML').AsString) + '''');
Open;
end;
if ADOQueryCmd.RecordCount = 1 then
begin
Application.MessageBox('印花编号只有一条,不能删除', '提示');
exit;
end;
with ADOQueryCmd do
begin
close;
sql.Clear;
SQL.Add('select * from BP_DY ');
sql.Add('where MLID=''' + trim(CDS_Main.fieldbyname('MLID').AsString) + '''');
Open;
end;
if ADOQueryCmd.IsEmpty = false then
begin
if Application.MessageBox('数据已打印确定要删除吗?', '提示', 32 + 4) <> IDYES then
Exit;
//exit;
end
else
begin
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
Exit;
end;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('delete ML_Manage where MLID=''' + Trim(CDS_Main.fieldbyname('MLID').AsString) + '''');
sql.Add('delete ML_Manage_PB where MLID=''' + Trim(CDS_Main.fieldbyname('MLID').AsString) + '''');
sql.Add('delete ML_Manage_GX where MLID=''' + Trim(CDS_Main.fieldbyname('MLID').AsString) + '''');
sql.Add('delete Image_Info where TJML=''' + Trim(CDS_Main.fieldbyname('TJML').AsString) + '''');
sql.Add(' and TJGYName=''' + Trim(CDS_Main.fieldbyname('TJGYName').AsString) + '''');
ExecSQL;
end;
CDS_Main.Delete;
end;
procedure TfrmMLMangeYHSel.cxButton1Click(Sender: TObject);
var
fPrintFile, Txt, fImagePath, maxno: string;
i, j: Integer;
Moudle: THandle;
Makebar: TMakebar;
Mixtext: TMixtext;
begin
if CDS_Main.IsEmpty then
Exit;
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\印花面料标签.rmf';
if FileExists(fPrintFile) = False then
begin
Application.MessageBox(PChar('没有找' + ExtractFilePath(Application.ExeName) + 'Report\印花面料标签.rmf'), '提示', 0);
exit;
end;
CDS_Main.DisableControls;
with CDS_Main do
begin
//First;
//while Locate('SSel',True,[]) do
begin
try
ADOQueryCmd.Connection.BeginTrans;
if GetLSNo(ADOQueryCmd, maxno, 'TGML', 'BP_DY', 4, 1, ) = False then
begin
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('取样品打印最大号失败!', '提示', 0);
Exit;
end;
with ADOQueryCmd do
begin
Close;
sql.Clear;
SQL.Add('select * from BP_DY where DYId=''' + Trim(maxno) + '''');
Open;
end;
with ADOQueryCmd do
begin
Append;
FieldByName('MLID').Value := Trim(CDS_Main.fieldbyname('MLID').AsString);
FieldByName('TFID').Value := Trim(CDS_Main.fieldbyname('PTID').AsString);
FieldByName('DYId').Value := Trim(maxno);
FieldByName('Filler').Value := Trim(DName);
FieldByName('FillerCode').Value := Trim(DCode);
FieldByName('Valid').Value := 'Y';
Post;
end;
ADOQueryCmd.Connection.CommitTrans;
except
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('保存打印流水号异常!', '提示', 0);
Exit;
end;
try
Moudle := LoadLibrary('MakeQRBarcode.dll');
@Makebar := GetProcAddress(Moudle, 'Make');
@Mixtext := GetProcAddress(Moudle, 'MixText');
Txt := Trim(maxno);
fImagePath := ExtractFilePath(Application.ExeName) + 'image\temp.bmp';
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName) + 'image')) then
CreateDirectory(pchar(ExtractFilePath(Application.ExeName) + 'image'), nil);
if FileExists(fImagePath) then
DeleteFile(fImagePath);
Makebar(pchar(Txt), Length(Txt), 3, 3, 0, PChar(fImagePath), 3);
except
application.MessageBox('二维码生成失败!', '提示信息', MB_ICONERROR);
exit;
end;
RMVariables['QRBARCODE'] := fImagePath;
RMVariables['DYID'] := maxno;
RM1.LoadFromFile(fPrintFile);
//RM1.ShowReport;
RM1.PrintReport;
end;
end;
CDS_Main.EnableControls;
panel2.Visible := false;
end;
procedure TfrmMLMangeYHSel.Image1Click(Sender: TObject);
begin
panel2.Visible := False;
end;
procedure TfrmMLMangeYHSel.DYClick(Sender: TObject);
begin
Panel2.Visible := true;
end;
procedure TfrmMLMangeYHSel.ToolButton3Click(Sender: TObject);
begin
if CDS_Main.IsEmpty then
exit;
self.ModalResult := 1;
end;
procedure TfrmMLMangeYHSel.LXChange(Sender: TObject);
begin
if ADOQueryMain.Active then
begin
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
SCreateCDS20(ADOQueryMain, CDS_Main);
SInitCDSData20(ADOQueryMain, CDS_Main);
end;
end;
procedure TfrmMLMangeYHSel.MLXXNOChange(Sender: TObject);
begin
if ADOQueryMain.Active then
begin
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
SCreateCDS20(ADOQueryMain, CDS_Main);
SInitCDSData20(ADOQueryMain, CDS_Main);
end;
end;
end.

View File

@ -1,6 +1,6 @@
object frmYMTJGWCList: TfrmYMTJGWCList
Left = 470
Top = 318
Left = 433
Top = 674
Width = 1370
Height = 750
Caption = #21152#24037#23436#25104#22238#20179#25968#25454
@ -346,12 +346,6 @@ object frmYMTJGWCList: TfrmYMTJGWCList
Options.Editing = False
Width = 69
end
object Tv1ColorNo: TcxGridDBColumn
Caption = #33394#21495
DataBinding.FieldName = 'ColorNo'
HeaderAlignmentHorz = taCenter
Options.Editing = False
end
object TV1SPHX: TcxGridDBColumn
Caption = #33457#22411
DataBinding.FieldName = 'SPHX'

View File

@ -87,7 +87,6 @@ type
btn1: TButton;
KuWei: TcxButtonEdit;
Tv1KuWei: TcxGridDBColumn;
Tv1ColorNo: TcxGridDBColumn;
procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
@ -126,7 +125,7 @@ implementation
uses
U_DataLink, U_RTFun, U_YMTRKInPut, U_ZdyAttachGYS, U_LabelPrintFun,
U_ZDYHelp, U_KuWeiList;
U_ZDYHelp;
{$R *.dfm}
@ -370,20 +369,22 @@ end;
procedure TfrmYMTJGWCList.KuWeiPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
try
frmKuWeiList := TfrmKuWeiList.Create(Application);
with frmKuWeiList do
frmZDYHelp := TfrmZDYHelp.Create(Application);
with frmZDYHelp do
begin
flag := 'KuWei';
flagname := '¿âλ';
if ShowModal = 1 then
begin
with Self.CDS_Main do
begin
Edit;
FieldByName('KuWei').Value := Trim(frmKuWeiList.Order_Main.fieldbyname('KWName').AsString);
KuWei.Text := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
end;
end;
end;
finally
frmKuWeiList.Free;
frmZDYHelp.Free;
end;
end;

View File

@ -1,6 +1,6 @@
object frmYMTRKInPut: TfrmYMTRKInPut
Left = 319
Top = 435
Left = 165
Top = 270
Width = 1829
Height = 623
Align = alClient
@ -8,20 +8,20 @@ object frmYMTRKInPut: TfrmYMTRKInPut
Color = clBtnFace
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Height = -15
Font.Name = #23435#20307
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
OnClose = FormClose
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 12
PixelsPerInch = 120
TextHeight = 15
object cxGrid2: TcxGrid
Left = 0
Top = 33
Width = 1632
Height = 559
Width = 1585
Height = 553
Align = alClient
TabOrder = 0
object Tv1: TcxGridDBTableView
@ -76,7 +76,7 @@ object frmYMTRKInPut: TfrmYMTRKInPut
HeaderAlignmentHorz = taCenter
Width = 100
end
object Tv1CRType: TcxGridDBColumn
object v1Column4: TcxGridDBColumn
Tag = 2
Caption = #20837#24211#31867#22411
DataBinding.FieldName = 'CRType'
@ -93,24 +93,18 @@ object frmYMTRKInPut: TfrmYMTRKInPut
HeaderAlignmentHorz = taCenter
Width = 83
end
object Tv1SPType: TcxGridDBColumn
Tag = 2
Caption = #24067#21305#31867#22411
DataBinding.FieldName = 'SPType'
PropertiesClassName = 'TcxComboBoxProperties'
Properties.DropDownListStyle = lsFixedList
Properties.Items.Strings = (
''
#38754#24067
#24213#24067
#26825)
HeaderAlignmentHorz = taCenter
Width = 70
end
object v1Column21: TcxGridDBColumn
Tag = 2
Caption = #23458#25143
DataBinding.FieldName = 'CustomerNoName'
PropertiesClassName = 'TcxButtonEditProperties'
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.ReadOnly = True
Properties.OnButtonClick = v1Column21PropertiesButtonClick
HeaderAlignmentHorz = taCenter
Width = 76
end
@ -120,49 +114,6 @@ object frmYMTRKInPut: TfrmYMTRKInPut
DataBinding.FieldName = 'spcode'
HeaderAlignmentHorz = taCenter
end
object v1Column15: TcxGridDBColumn
Tag = 2
Caption = #39068#33394
DataBinding.FieldName = 'SPColor'
HeaderAlignmentHorz = taCenter
Width = 69
end
object Tv1ColorNo: TcxGridDBColumn
Tag = 2
Caption = #33394#21495
DataBinding.FieldName = 'ColorNo'
HeaderAlignmentHorz = taCenter
end
object v1Column17: TcxGridDBColumn
Tag = 2
Caption = #33457#22411
DataBinding.FieldName = 'SPHX'
HeaderAlignmentHorz = taCenter
Width = 70
end
object Tv1FactoryName: TcxGridDBColumn
Tag = 2
Caption = #21152#24037#21378
DataBinding.FieldName = 'FactoryName'
PropertiesClassName = 'TcxButtonEditProperties'
Properties.Alignment.Horz = taLeftJustify
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.ReadOnly = True
Properties.OnButtonClick = v1Column14PropertiesButtonClick
HeaderAlignmentHorz = taCenter
Width = 101
end
object v1Column19: TcxGridDBColumn
Tag = 2
Caption = #26579#21378#32568#21495
DataBinding.FieldName = 'RCGangNo'
HeaderAlignmentHorz = taCenter
Width = 74
end
object v2Column1: TcxGridDBColumn
Tag = 2
Caption = #21697#21517
@ -185,6 +136,43 @@ object frmYMTRKInPut: TfrmYMTRKInPut
HeaderGlyphAlignmentHorz = taCenter
Width = 65
end
object v1Column15: TcxGridDBColumn
Tag = 2
Caption = #39068#33394
DataBinding.FieldName = 'SPColor'
HeaderAlignmentHorz = taCenter
Width = 69
end
object v1Column17: TcxGridDBColumn
Tag = 2
Caption = #33457#22411
DataBinding.FieldName = 'SPHX'
HeaderAlignmentHorz = taCenter
Width = 70
end
object v1Column14: TcxGridDBColumn
Tag = 2
Caption = #20379#24212#21830
DataBinding.FieldName = 'FactoryName'
PropertiesClassName = 'TcxButtonEditProperties'
Properties.Alignment.Horz = taLeftJustify
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.ReadOnly = True
Properties.OnButtonClick = v1Column14PropertiesButtonClick
HeaderAlignmentHorz = taCenter
Width = 101
end
object v1Column19: TcxGridDBColumn
Tag = 2
Caption = #32568#21495
DataBinding.FieldName = 'RCGangNo'
HeaderAlignmentHorz = taCenter
Width = 74
end
object v1Column7: TcxGridDBColumn
Tag = 2
Caption = #25104#20998
@ -193,6 +181,13 @@ object frmYMTRKInPut: TfrmYMTRKInPut
HeaderGlyphAlignmentHorz = taCenter
Width = 73
end
object Tv1Column1: TcxGridDBColumn
Tag = 2
Caption = #24037#33402
DataBinding.FieldName = 'GYLXName'
HeaderAlignmentHorz = taCenter
Width = 77
end
object v1Column1: TcxGridDBColumn
Tag = 2
Caption = #38376#24133
@ -255,6 +250,13 @@ object frmYMTRKInPut: TfrmYMTRKInPut
HeaderAlignmentHorz = taCenter
Width = 85
end
object Tv1Column2: TcxGridDBColumn
Tag = 2
Caption = #21333#20215
DataBinding.FieldName = 'Price'
HeaderAlignmentHorz = taCenter
Width = 63
end
object v1Column3: TcxGridDBColumn
Tag = 2
Caption = #25968#37327#21333#20301
@ -358,23 +360,23 @@ object frmYMTRKInPut: TfrmYMTRKInPut
end
end
object Panel4: TPanel
Left = 736
Top = 128
Width = 225
Height = 217
Left = 920
Top = 160
Width = 281
Height = 271
TabOrder = 2
Visible = False
object Label14: TLabel
Left = 48
Top = 88
Width = 6
Height = 12
Left = 60
Top = 110
Width = 8
Height = 15
end
object Panel10: TPanel
Left = 1
Top = 1
Width = 223
Height = 23
Width = 279
Height = 29
Align = alTop
Alignment = taLeftJustify
BevelOuter = bvNone
@ -382,16 +384,16 @@ object frmYMTRKInPut: TfrmYMTRKInPut
Color = clSkyBlue
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Height = -22
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 0
object Image2: TImage
Left = 193
Top = 3
Width = 22
Height = 16
Left = 241
Top = 4
Width = 28
Height = 20
ParentShowHint = False
Picture.Data = {
07544269746D617076040000424D760400000000000036000000280000001500
@ -437,117 +439,117 @@ object frmYMTRKInPut: TfrmYMTRKInPut
end
end
object Button1: TButton
Left = 29
Top = 180
Width = 75
Height = 25
Left = 36
Top = 225
Width = 94
Height = 31
Caption = #20840#36873
TabOrder = 1
OnClick = Button1Click
end
object GroupBox1: TGroupBox
Left = 24
Top = 56
Width = 177
Height = 121
Left = 30
Top = 70
Width = 221
Height = 151
Caption = #26367#25442#23383#27573
TabOrder = 2
object CheckBox1: TCheckBox
Left = 11
Top = 16
Width = 73
Height = 17
Left = 14
Top = 20
Width = 91
Height = 21
Caption = #20837#24211#31867#22411
TabOrder = 0
end
object CheckBox2: TCheckBox
Left = 11
Top = 36
Width = 73
Height = 17
Left = 14
Top = 45
Width = 91
Height = 21
Caption = #21152' '#24037' '#21378
TabOrder = 1
end
object CheckBox3: TCheckBox
Left = 11
Top = 56
Width = 73
Height = 17
Left = 14
Top = 70
Width = 91
Height = 21
Caption = #26579#21378#32568#21495
TabOrder = 2
end
object CheckBox4: TCheckBox
Left = 11
Top = 76
Width = 73
Height = 17
Left = 14
Top = 95
Width = 91
Height = 21
Caption = #23384#25918#24037#21378
TabOrder = 3
end
object CheckBox5: TCheckBox
Left = 11
Top = 96
Width = 73
Height = 17
Left = 14
Top = 120
Width = 91
Height = 21
Caption = #24211' '#20301
TabOrder = 4
end
object CheckBox6: TCheckBox
Left = 99
Top = 17
Width = 73
Height = 17
Left = 124
Top = 21
Width = 91
Height = 22
Caption = #21305' '#25968
TabOrder = 5
end
object CheckBox7: TCheckBox
Left = 99
Top = 37
Width = 73
Height = 17
Left = 124
Top = 46
Width = 91
Height = 22
Caption = #25968' '#37327
TabOrder = 6
end
object CheckBox8: TCheckBox
Left = 99
Top = 57
Width = 73
Height = 17
Left = 124
Top = 71
Width = 91
Height = 22
Caption = #25968#37327#21333#20301
TabOrder = 7
end
object CheckBox9: TCheckBox
Left = 99
Top = 77
Width = 73
Height = 17
Left = 124
Top = 96
Width = 91
Height = 22
Caption = #22791' '#27880
TabOrder = 8
end
end
object Button2: TButton
Left = 133
Top = 180
Width = 75
Height = 25
Left = 166
Top = 225
Width = 94
Height = 31
Caption = #30830#23450
TabOrder = 3
OnClick = Button2Click
end
end
object Panel2: TPanel
Left = 1632
Left = 1585
Top = 33
Width = 189
Height = 559
Width = 236
Height = 553
Align = alRight
Caption = 'Panel2'
TabOrder = 3
object cxGrid1: TcxGrid
Left = -9
Left = -11
Top = 1
Width = 197
Height = 557
Width = 246
Height = 551
Align = alRight
TabOrder = 0
object TvMX: TcxGridDBTableView

View File

@ -38,7 +38,7 @@ type
TBDel: TToolButton;
TBSave: TToolButton;
TBClose: TToolButton;
Tv1CRType: TcxGridDBColumn;
v1Column4: TcxGridDBColumn;
DataSource3: TDataSource;
CDS_Sub: TClientDataSet;
ADOQueryCmd: TADOQuery;
@ -46,7 +46,7 @@ type
ADOQueryTemp: TADOQuery;
cxGridPopupMenu2: TcxGridPopupMenu;
v1Column12: TcxGridDBColumn;
Tv1FactoryName: TcxGridDBColumn;
v1Column14: TcxGridDBColumn;
v1Column6: TcxGridDBColumn;
v1Column7: TcxGridDBColumn;
v1Column8: TcxGridDBColumn;
@ -86,8 +86,8 @@ type
TvMXMXID: TcxGridDBColumn;
TvMXMXQty: TcxGridDBColumn;
cxGridLevel2: TcxGridLevel;
Tv1ColorNo: TcxGridDBColumn;
Tv1SPType: TcxGridDBColumn;
Tv1Column1: TcxGridDBColumn;
Tv1Column2: TcxGridDBColumn;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBAddClick(Sender: TObject);
procedure TBCloseClick(Sender: TObject);
@ -97,6 +97,7 @@ type
procedure v1Column3PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure v1Column14PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure v2Column1PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure v1Column5PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure v1Column11PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure v1Column16PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure v1Column18PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
@ -110,6 +111,7 @@ type
procedure ToolButton4Click(Sender: TObject);
procedure TvMXCustomDrawIndicatorCell(Sender: TcxGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxCustomGridIndicatorItemViewInfo; var ADone: Boolean);
procedure TvMXKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
procedure v1Column21PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
private
{ Private declarations }
function SaveCKData(): Boolean;
@ -128,7 +130,7 @@ var
implementation
uses
U_DataLink, U_RTFun, U_ZDYHelp, U_ZdyAttachGYS, U_KuWeiList;
U_DataLink, U_RTFun, U_ZDYHelp, U_ZdyAttachGYS, U_MLMangeYHSel, U_ZdyAttachKH;
{$R *.dfm}
procedure TfrmYMTRKInPut.InitMXGrid(SPID: string);
@ -201,7 +203,6 @@ begin
Exit;
InitMXGrid(CDS_Sub.fieldbyname('SPID').AsString);
with ADOQueryTemp do
begin
Close;
@ -210,11 +211,10 @@ begin
sql.Add(' and CRQtyFlag=-1');
Open;
end;
if not ADOQueryTemp.IsEmpty then
begin
Tv1CRType.Options.Focusing := False;
Tv1FactoryName.Options.Focusing := False;
v1Column4.Options.Focusing := False;
v1Column14.Options.Focusing := False;
v2Column1.Options.Focusing := False;
v1Column8.Options.Focusing := False;
v1Column7.Options.Focusing := False;
@ -225,8 +225,8 @@ begin
end
else
begin
Tv1CRType.Options.Focusing := True;
Tv1FactoryName.Options.Focusing := True;
v1Column4.Options.Focusing := True;
v1Column14.Options.Focusing := True;
v2Column1.Options.Focusing := True;
v1Column8.Options.Focusing := True;
v1Column7.Options.Focusing := True;
@ -267,6 +267,8 @@ begin
Append;
FieldByName('SPID').Value := Trim(MMaxno);
FieldByName('CRTime').Value := Trim(FormatDateTime('yyyy-MM-dd', Now));
FieldByName('QtyUnit').Value := 'M';
FieldByName('ToFactoryName').Value := 'ÔÆÏè²Ö¿â';
Post;
end;
end;
@ -321,7 +323,9 @@ begin
end;
FieldByName('SPID').Value := Trim(Maxno);
FieldByName('FZSPID').Value := Trim(Maxno);
FieldByName('CKName').Value := '´ý¼ì²¼';
FieldByName('CustomerNo').Value := Trim(CDS_Sub.fieldbyname('CustomerNo').AsString);
FieldByName('FactoryNo').Value := Trim(CDS_Sub.fieldbyname('FactoryNo').AsString);
FieldByName('FromFactoryNo').Value := Trim(CDS_Sub.fieldbyname('FromFactoryNo').AsString);
FieldByName('ToFactoryNo').Value := Trim(CDS_Sub.fieldbyname('ToFactoryNo').AsString);
@ -549,13 +553,14 @@ begin
begin
if ShowModal = 1 then
begin
with Self.CDS_Sub do
begin
edit;
FieldByName('FactoryNo').Value := Trim(frmZdyAttachGYS.CDS_HZ.fieldbyname('ZdyCode').AsString);
FieldByName('FactoryName').Value := Trim(frmZdyAttachGYS.CDS_HZ.fieldbyname('ZdyName').AsString);
FieldByName('FromFactoryNo').Value := Trim(frmZdyAttachGYS.CDS_HZ.fieldbyname('ZdyCode').AsString);
FieldByName('FromFactoryName').Value := Trim(frmZdyAttachGYS.CDS_HZ.fieldbyname('ZdyName').AsString);
FieldByName('FactoryNo').Value := Trim(frmZdyAttachGYS.CDS_HZ.fieldbyname('KHNo').AsString);
FieldByName('FactoryName').Value := Trim(frmZdyAttachGYS.CDS_HZ.fieldbyname('KHNameJC').AsString);
FieldByName('FromFactoryNo').Value := Trim(frmZdyAttachGYS.CDS_HZ.fieldbyname('KHNo').AsString);
FieldByName('FromFactoryName').Value := Trim(frmZdyAttachGYS.CDS_HZ.fieldbyname('KHNameJC').AsString);
//Post;
end;
end;
@ -569,18 +574,43 @@ end;
procedure TfrmYMTRKInPut.v2Column1PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
try
frmZDYHelp := TfrmZDYHelp.Create(Application);
with frmZDYHelp do
frmMLMangeYHSel := TfrmMLMangeYHSel.Create(Application);
with frmMLMangeYHSel do
begin
flag := 'SPName';
flagname := 'Æ·Ãû';
if ShowModal = 1 then
begin
with Self.CDS_Sub do
begin
Edit;
FieldByName('SPCode').Value := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyCode').AsString);
FieldByName('SPName').Value := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
FieldByName('spcode').Value := Trim(frmMLMangeYHSel.CDS_Main.fieldbyname('MLXXNO').AsString);
FieldByName('SPName').Value := Trim(frmMLMangeYHSel.CDS_Main.fieldbyname('MLName').AsString);
FieldByName('GYLXName').Value := Trim(frmMLMangeYHSel.CDS_Main.fieldbyname('GYLXName').AsString);
FieldByName('SPCF').Value := Trim(frmMLMangeYHSel.CDS_Main.fieldbyname('MLCF').AsString);
FieldByName('SPMF').Value := Trim(frmMLMangeYHSel.CDS_Main.fieldbyname('MLMF').AsString);
FieldByName('SPKZ').Value := Trim(frmMLMangeYHSel.CDS_Main.fieldbyname('MLkz').AsString);
end;
end;
end;
finally
frmMLMangeYHSel.Free;
end;
end;
procedure TfrmYMTRKInPut.v1Column5PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
try
frmZDYHelp := TfrmZDYHelp.Create(Application);
with frmZDYHelp do
begin
flag := 'KuWei';
flagname := '¿âλ';
if ShowModal = 1 then
begin
with Self.CDS_Sub do
begin
Edit;
FieldByName('KuWei').Value := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
end;
end;
end;
@ -600,8 +630,8 @@ begin
with Self.CDS_Sub do
begin
edit;
FieldByName('ToFactoryNo').Value := Trim(frmZdyAttachGYS.CDS_HZ.fieldbyname('ZdyCode').AsString);
FieldByName('ToFactoryName').Value := Trim(frmZdyAttachGYS.CDS_HZ.fieldbyname('ZdyName').AsString);
FieldByName('ToFactoryNo').Value := Trim(frmZdyAttachGYS.CDS_HZ.fieldbyname('KHNo').AsString);
FieldByName('ToFactoryName').Value := Trim(frmZdyAttachGYS.CDS_HZ.fieldbyname('KHNameJC').AsString);
//Post;
end;
end;
@ -635,22 +665,22 @@ end;
procedure TfrmYMTRKInPut.v1Column18PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
try
frmKuWeiList := TfrmKuWeiList.Create(Application);
with frmKuWeiList do
begin
if ShowModal = 1 then
begin
with Self.CDS_Sub do
begin
Edit;
FieldByName('KuWei').Value := Trim(frmKuWeiList.Order_Main.fieldbyname('KWName').AsString);
end;
end;
end;
finally
frmKuWeiList.Free;
end;
// try
// frmKuWeiList := TfrmKuWeiList.Create(Application);
// with frmKuWeiList do
// begin
// if ShowModal = 1 then
// begin
// with Self.CDS_Sub do
// begin
// Edit;
// FieldByName('KuWei').Value := Trim(frmKuWeiList.Order_Main.fieldbyname('KWName').AsString);
// end;
// end;
// end;
// finally
// frmKuWeiList.Free;
// end;
end;
procedure TfrmYMTRKInPut.Button2Click(Sender: TObject);
@ -842,5 +872,29 @@ begin
TvMX.OptionsData.Editing := True;
end;
procedure TfrmYMTRKInPut.v1Column21PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
try
frmZdyAttachkh := TfrmZdyAttachkh.Create(Application);
with frmZdyAttachkh do
begin
if ShowModal = 1 then
begin
with Self.CDS_Sub do
begin
edit;
FieldByName('CustomerNo').Value := Trim(frmZdyAttachkh.CDS_HZ.fieldbyname('KHNo').AsString);
FieldByName('CustomerNoName').Value := Trim(frmZdyAttachkh.CDS_HZ.fieldbyname('KHNameJC').AsString);
//Post;
end;
end;
end;
finally
frmZdyAttachkh.Free;
end;
end;
end.

View File

@ -1,13 +1,13 @@
object frmYMTRKList: TfrmYMTRKList
Left = 338
Top = 426
Left = 267
Top = 100
Width = 1370
Height = 750
Caption = #38754#26009#22238#20179#30331#35760
Color = clBtnFace
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Height = -15
Font.Name = #23435#20307
Font.Style = []
OldCreateOrder = False
@ -15,8 +15,8 @@ object frmYMTRKList: TfrmYMTRKList
OnCreate = FormCreate
OnDestroy = FormDestroy
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 12
PixelsPerInch = 120
TextHeight = 15
object ToolBar1: TToolBar
Left = 0
Top = 0
@ -121,118 +121,118 @@ object frmYMTRKList: TfrmYMTRKList
Left = 0
Top = 33
Width = 1362
Height = 72
Height = 90
Align = alTop
BevelInner = bvRaised
BevelOuter = bvLowered
Color = clSkyBlue
TabOrder = 1
object Label1: TLabel
Left = 28
Top = 12
Width = 48
Height = 12
Left = 35
Top = 15
Width = 60
Height = 15
Caption = #26597#35810#26102#38388
end
object Label2: TLabel
Left = 64
Top = 36
Width = 12
Height = 12
Left = 80
Top = 45
Width = 15
Height = 15
Caption = #33267
end
object Label3: TLabel
Left = 318
Top = 12
Width = 24
Height = 12
Left = 398
Top = 15
Width = 30
Height = 15
Caption = #21697#21517
end
object Label4: TLabel
Left = 435
Top = 12
Width = 36
Height = 12
Left = 544
Top = 15
Width = 45
Height = 15
Caption = #21152#24037#21378
end
object Label5: TLabel
Left = 178
Top = 12
Width = 48
Height = 12
Left = 223
Top = 15
Width = 60
Height = 15
Caption = #20837#24211#21333#21495
end
object Label8: TLabel
Left = 318
Top = 36
Width = 24
Height = 12
Left = 398
Top = 45
Width = 30
Height = 15
Caption = #35268#26684
end
object Label6: TLabel
Left = 435
Top = 36
Width = 36
Height = 12
Left = 544
Top = 45
Width = 46
Height = 15
Caption = #25104' '#20998
end
object Label7: TLabel
Left = 561
Top = 36
Width = 48
Height = 12
Left = 701
Top = 45
Width = 61
Height = 15
Caption = #35746' '#21333' '#21495
end
object Label9: TLabel
Left = 561
Top = 12
Width = 48
Height = 12
Left = 701
Top = 15
Width = 60
Height = 15
Caption = #23384#25918#24037#21378
end
object Label12: TLabel
Left = 178
Top = 36
Width = 48
Height = 12
Left = 223
Top = 45
Width = 60
Height = 15
Caption = #20837#24211#31867#22411
end
object Label11: TLabel
Left = 823
Top = 37
Width = 48
Height = 12
Left = 1029
Top = 46
Width = 60
Height = 15
Caption = #26579#21378#32568#21495
end
object Label13: TLabel
Left = 704
Top = 12
Width = 24
Height = 12
Left = 880
Top = 15
Width = 30
Height = 15
Caption = #39068#33394
end
object Label15: TLabel
Left = 704
Top = 37
Width = 24
Height = 12
Left = 880
Top = 46
Width = 30
Height = 15
Caption = #33457#22411
end
object BegDate: TDateTimePicker
Left = 77
Top = 9
Width = 87
Height = 20
Left = 96
Top = 11
Width = 109
Height = 23
Date = 40768.458268587970000000
Time = 40768.458268587970000000
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
TabOrder = 0
end
object EndDate: TDateTimePicker
Left = 77
Top = 32
Width = 87
Height = 20
Left = 96
Top = 40
Width = 109
Height = 23
Date = 40768.458268587970000000
Time = 40768.458268587970000000
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
@ -240,83 +240,83 @@ object frmYMTRKList: TfrmYMTRKList
end
object SPName: TEdit
Tag = 2
Left = 345
Top = 9
Width = 80
Height = 20
Left = 431
Top = 11
Width = 100
Height = 23
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
TabOrder = 2
OnChange = TBFindClick
end
object FactoryName: TEdit
Tag = 2
Left = 472
Top = 9
Width = 80
Height = 20
Left = 590
Top = 11
Width = 100
Height = 23
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
TabOrder = 3
OnChange = FactoryNameChange
end
object SPID: TEdit
Tag = 2
Left = 228
Top = 9
Width = 80
Height = 20
Left = 285
Top = 11
Width = 100
Height = 23
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
TabOrder = 1
OnChange = SPIDChange
end
object SPSpec: TEdit
Tag = 2
Left = 345
Top = 32
Width = 80
Height = 20
Left = 431
Top = 40
Width = 100
Height = 23
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
TabOrder = 9
OnChange = SPSpecChange
end
object SPCF: TEdit
Tag = 2
Left = 472
Top = 32
Width = 80
Height = 20
Left = 590
Top = 40
Width = 100
Height = 23
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
TabOrder = 10
OnChange = FactoryNameChange
end
object OrderNo: TEdit
Tag = 2
Left = 612
Top = 33
Width = 80
Height = 20
Left = 765
Top = 41
Width = 100
Height = 23
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
TabOrder = 11
OnChange = FactoryNameChange
end
object ToFactoryName: TEdit
Tag = 2
Left = 612
Top = 9
Width = 80
Height = 20
Left = 765
Top = 11
Width = 100
Height = 23
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
TabOrder = 4
OnChange = FactoryNameChange
end
object CRType: TComboBox
Tag = 2
Left = 228
Top = 32
Width = 80
Height = 20
Left = 285
Top = 40
Width = 100
Height = 23
Style = csDropDownList
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
ItemHeight = 12
ItemHeight = 15
TabOrder = 8
OnChange = TBFindClick
Items.Strings = (
@ -331,30 +331,30 @@ object frmYMTRKList: TfrmYMTRKList
end
object RCGangNo: TEdit
Tag = 2
Left = 874
Top = 34
Width = 80
Height = 20
Left = 1093
Top = 43
Width = 100
Height = 23
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
TabOrder = 12
OnChange = FactoryNameChange
end
object SPColor: TEdit
Tag = 2
Left = 729
Top = 9
Width = 80
Height = 20
Left = 911
Top = 11
Width = 100
Height = 23
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
TabOrder = 5
OnChange = FactoryNameChange
end
object SPHX: TEdit
Tag = 2
Left = 729
Top = 34
Width = 80
Height = 20
Left = 911
Top = 43
Width = 100
Height = 23
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
TabOrder = 6
OnChange = FactoryNameChange
@ -362,9 +362,9 @@ object frmYMTRKList: TfrmYMTRKList
end
object cxGrid2: TcxGrid
Left = 0
Top = 105
Width = 1112
Height = 614
Top = 123
Width = 1049
Height = 590
Align = alClient
TabOrder = 2
object Tv1: TcxGridDBTableView
@ -414,7 +414,7 @@ object frmYMTRKList: TfrmYMTRKList
HeaderAlignmentHorz = taCenter
Width = 40
end
object TV1SPID: TcxGridDBColumn
object v1Column6: TcxGridDBColumn
Caption = #20837#24211#21333#21495
DataBinding.FieldName = 'SPID'
HeaderAlignmentHorz = taCenter
@ -461,7 +461,7 @@ object frmYMTRKList: TfrmYMTRKList
end
object v1Column14: TcxGridDBColumn
Tag = 2
Caption = #21152#24037#21378
Caption = #20379#24212#21830
DataBinding.FieldName = 'FactoryName'
PropertiesClassName = 'TcxTextEditProperties'
Properties.ReadOnly = True
@ -526,14 +526,8 @@ object frmYMTRKList: TfrmYMTRKList
Options.Editing = False
Width = 69
end
object Tv1ColorNo: TcxGridDBColumn
Caption = #33394#21495
DataBinding.FieldName = 'ColorNo'
HeaderAlignmentHorz = taCenter
Options.Editing = False
end
object Tv1SPHX: TcxGridDBColumn
Caption = #33457#22411
object v1Column17: TcxGridDBColumn
Caption = #33457#22411#33457#21495
DataBinding.FieldName = 'SPHX'
HeaderAlignmentHorz = taCenter
Options.Editing = False
@ -562,12 +556,19 @@ object frmYMTRKList: TfrmYMTRKList
Width = 86
end
object v1Column19: TcxGridDBColumn
Caption = #26579#21378#32568#21495
Caption = #32568#21495
DataBinding.FieldName = 'RCGangNo'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 75
end
object Tv1Column2: TcxGridDBColumn
Caption = #24037#33402
DataBinding.FieldName = 'GYLXName'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 55
end
object v1Column9: TcxGridDBColumn
Tag = 2
Caption = #21305#25968
@ -588,6 +589,13 @@ object frmYMTRKList: TfrmYMTRKList
Options.Editing = False
Width = 85
end
object Tv1Column1: TcxGridDBColumn
Caption = #21333#20215
DataBinding.FieldName = 'Price'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 55
end
object v1Column3: TcxGridDBColumn
Tag = 2
Caption = #25968#37327#21333#20301
@ -632,18 +640,18 @@ object frmYMTRKList: TfrmYMTRKList
end
end
object Panel2: TPanel
Left = 1112
Top = 105
Width = 250
Height = 614
Left = 1049
Top = 123
Width = 313
Height = 590
Align = alRight
Caption = 'Panel2'
TabOrder = 3
object cxGrid1: TcxGrid
Left = 1
Top = 71
Width = 248
Height = 542
Top = 82
Width = 311
Height = 507
Align = alClient
TabOrder = 0
object TvMX: TcxGridDBTableView
@ -714,11 +722,11 @@ object frmYMTRKList: TfrmYMTRKList
end
object ToolBar2: TToolBar
Left = 1
Top = 42
Width = 248
Top = 53
Width = 311
Height = 29
ButtonHeight = 30
ButtonWidth = 71
ButtonWidth = 80
Caption = 'ToolBar2'
Images = DataLink_YXYMT.ThreeImgList
List = True
@ -733,7 +741,7 @@ object frmYMTRKList: TfrmYMTRKList
OnClick = TbAddRowClick
end
object TbDeleteRow: TToolButton
Left = 75
Left = 84
Top = 2
AutoSize = True
Caption = #21024#34892
@ -744,30 +752,30 @@ object frmYMTRKList: TfrmYMTRKList
object Panel3: TPanel
Left = 1
Top = 1
Width = 248
Height = 41
Width = 311
Height = 52
Align = alTop
TabOrder = 2
object Label17: TLabel
Left = 6
Top = 12
Width = 36
Height = 12
Left = 8
Top = 15
Width = 45
Height = 15
Caption = #22686#34892#25968
Layout = tlCenter
end
object AddNum: TEdit
Left = 47
Top = 10
Width = 41
Height = 20
Left = 59
Top = 13
Width = 51
Height = 23
TabOrder = 0
end
object Button1: TButton
Left = 98
Top = 4
Width = 75
Height = 30
Left = 123
Top = 5
Width = 93
Height = 38
Caption = #24555#36895#22686#34892
TabOrder = 1
OnClick = Button1Click
@ -775,41 +783,41 @@ object frmYMTRKList: TfrmYMTRKList
end
end
object Panel4: TPanel
Left = 560
Top = 140
Width = 234
Height = 125
Left = 700
Top = 175
Width = 293
Height = 156
Color = clSkyBlue
TabOrder = 4
Visible = False
object Label25: TLabel
Left = 38
Top = 34
Width = 24
Height = 12
Left = 48
Top = 43
Width = 30
Height = 15
Caption = #24211#20301
end
object btnChk: TButton
Left = 28
Top = 81
Width = 60
Height = 25
Left = 35
Top = 101
Width = 75
Height = 32
Caption = #30830#35748
TabOrder = 0
OnClick = btnChkClick
end
object btn1: TButton
Left = 160
Top = 80
Width = 60
Height = 25
Left = 200
Top = 100
Width = 75
Height = 31
Caption = #20851#38381
TabOrder = 1
OnClick = btn1Click
end
object KuWei: TcxButtonEdit
Left = 75
Top = 27
Left = 94
Top = 34
ParentFont = False
Properties.Buttons = <
item
@ -819,12 +827,12 @@ object frmYMTRKList: TfrmYMTRKList
Properties.OnButtonClick = KuWeiPropertiesButtonClick
Style.Font.Charset = GB2312_CHARSET
Style.Font.Color = clWindowText
Style.Font.Height = -17
Style.Font.Height = -22
Style.Font.Name = #23435#20307
Style.Font.Style = [fsBold]
Style.IsFontAssigned = True
TabOrder = 2
Width = 121
Width = 151
end
end
object ADOQueryCmd: TADOQuery

View File

@ -71,12 +71,12 @@ type
OrderNo: TEdit;
cxGrid2: TcxGrid;
Tv1: TcxGridDBTableView;
TV1SPID: TcxGridDBColumn;
v1Column6: TcxGridDBColumn;
v1Column2: TcxGridDBColumn;
v1Column4: TcxGridDBColumn;
v1Column13: TcxGridDBColumn;
v1Column15: TcxGridDBColumn;
Tv1SPHX: TcxGridDBColumn;
v1Column17: TcxGridDBColumn;
v1Column14: TcxGridDBColumn;
v2Column1: TcxGridDBColumn;
v1Column8: TcxGridDBColumn;
@ -130,7 +130,8 @@ type
btnChk: TButton;
btn1: TButton;
KuWei: TcxButtonEdit;
Tv1ColorNo: TcxGridDBColumn;
Tv1Column1: TcxGridDBColumn;
Tv1Column2: TcxGridDBColumn;
procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
@ -176,7 +177,7 @@ implementation
uses
U_DataLink, U_RTFun, U_YMTRKInPut, U_ZdyAttachGYS, U_LabelPrintFun,
U_ZDYHelp, U_KuWeiList;
U_ZDYHelp;
{$R *.dfm}
procedure TfrmYMTRKList.InitMXGrid(SPID: string);
@ -615,20 +616,22 @@ end;
procedure TfrmYMTRKList.KuWeiPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
try
frmKuWeiList := TfrmKuWeiList.Create(Application);
with frmKuWeiList do
frmZDYHelp := TfrmZDYHelp.Create(Application);
with frmZDYHelp do
begin
flag := 'KuWei';
flagname := '¿âλ';
if ShowModal = 1 then
begin
with Self.CDS_Main do
begin
Edit;
FieldByName('KuWei').Value := Trim(frmKuWeiList.Order_Main.fieldbyname('KWName').AsString);
KuWei.Text := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
end;
end;
end;
finally
frmKuWeiList.Free;
frmZDYHelp.Free;
end;
end;

View File

@ -1,28 +1,28 @@
object frmZdyAttachGYS: TfrmZdyAttachGYS
Left = 703
Top = 516
Left = 512
Top = 376
Width = 1038
Height = 618
Caption = #20379#24212#21830#36164#26009#31649#29702
Color = clBtnFace
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Height = -15
Font.Name = #23435#20307
Font.Style = []
OldCreateOrder = False
OnClose = FormClose
OnDestroy = FormDestroy
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 12
PixelsPerInch = 120
TextHeight = 15
object ToolBar1: TToolBar
Left = 0
Top = 0
Width = 1030
Height = 31
ButtonHeight = 30
ButtonWidth = 59
ButtonWidth = 65
Caption = 'ToolBar1'
Color = clSkyBlue
DisabledImages = DataLink_YXYMT.ThreeImgList
@ -41,7 +41,7 @@ object frmZdyAttachGYS: TfrmZdyAttachGYS
OnClick = TBRafreshClick
end
object ToolButton2: TToolButton
Left = 63
Left = 69
Top = 0
AutoSize = True
Caption = #36807#28388
@ -49,7 +49,7 @@ object frmZdyAttachGYS: TfrmZdyAttachGYS
OnClick = ToolButton2Click
end
object TBClose: TToolButton
Left = 126
Left = 138
Top = 0
AutoSize = True
Caption = #20851#38381
@ -61,114 +61,96 @@ object frmZdyAttachGYS: TfrmZdyAttachGYS
Left = 0
Top = 31
Width = 1030
Height = 39
Height = 49
Align = alTop
BevelInner = bvRaised
BevelOuter = bvLowered
Color = clSkyBlue
TabOrder = 1
object Label3: TLabel
Left = 203
Top = 13
Width = 60
Height = 12
Caption = #20379#24212#21830#21517#31216
Left = 254
Top = 16
Width = 75
Height = 15
Caption = #20379#24212#21830#31616#31216
end
object Label1: TLabel
Left = 22
Top = 13
Width = 60
Height = 12
Left = 28
Top = 16
Width = 75
Height = 15
Caption = #20379#24212#21830#32534#21495
end
object ZdyName: TEdit
object KHNameJC: TEdit
Tag = 2
Left = 267
Top = 9
Width = 90
Height = 20
Left = 334
Top = 11
Width = 112
Height = 23
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
TabOrder = 1
OnChange = ZdyNameChange
OnChange = KHNameJCChange
end
object ZdyCode: TEdit
object KHNo: TEdit
Tag = 2
Left = 83
Top = 9
Width = 90
Height = 20
Left = 104
Top = 11
Width = 112
Height = 23
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
TabOrder = 0
OnChange = ZdyNameChange
OnChange = KHNameJCChange
end
end
object cxGrid2: TcxGrid
object cxGrid1: TcxGrid
Left = 0
Top = 70
Top = 80
Width = 1030
Height = 517
Height = 501
Align = alClient
TabOrder = 2
object Tv2: TcxGridDBTableView
OnDblClick = Tv2DblClick
object Tv1: TcxGridDBTableView
OnDblClick = Tv1DblClick
Navigator.Buttons.CustomButtons = <>
Navigator.Buttons.Delete.Enabled = False
Navigator.Buttons.Delete.Visible = False
DataController.DataSource = DS_HZ
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <
item
Kind = skSum
end
item
Kind = skSum
end
item
Kind = skSum
end>
DataController.Summary.FooterSummaryItems = <>
DataController.Summary.SummaryGroups = <>
OptionsBehavior.GoToNextCellOnEnter = True
OptionsCustomize.ColumnFiltering = False
OptionsData.Deleting = False
OptionsData.DeletingConfirmation = False
OptionsSelection.CellSelect = False
OptionsView.Footer = True
OptionsView.GroupByBox = False
Styles.Inactive = DataLink_YXYMT.SHuangSe
Styles.IncSearch = DataLink_YXYMT.SHuangSe
Styles.Selection = DataLink_YXYMT.SHuangSe
Styles.Header = DataLink_YXYMT.Default
object v2Column2: TcxGridDBColumn
object v1KHNo: TcxGridDBColumn
Caption = #20379#24212#21830#32534#21495
DataBinding.FieldName = 'ZdyCode'
PropertiesClassName = 'TcxTextEditProperties'
HeaderAlignmentHorz = taCenter
Width = 86
end
object v2Column6: TcxGridDBColumn
Caption = #20379#24212#21830#21517#31216
DataBinding.FieldName = 'ZdyName'
HeaderAlignmentHorz = taCenter
Options.Focusing = False
Width = 133
end
object v2Column15: TcxGridDBColumn
Caption = #20379#24212#21830#31616#31216
DataBinding.FieldName = 'ZdyNameZ'
HeaderAlignmentHorz = taCenter
Width = 106
end
object v2Column7: TcxGridDBColumn
Caption = #31867#22411
DataBinding.FieldName = 'FactType'
Visible = False
DataBinding.FieldName = 'KHNo'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 82
Width = 134
end
object v1Column6: TcxGridDBColumn
Caption = #20379#24212#21830#31616#31216
DataBinding.FieldName = 'KHNameJC'
HeaderAlignmentHorz = taCenter
Width = 145
end
object v1KHLXR: TcxGridDBColumn
Caption = #32852#31995#20154
DataBinding.FieldName = 'KHLXR'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 113
end
object v1Column1: TcxGridDBColumn
Caption = #20379#24212#21830#31867#22411
DataBinding.FieldName = 'KHType'
HeaderAlignmentHorz = taCenter
Width = 114
end
end
object cxGridLevel1: TcxGridLevel
GridView = Tv2
object cxGrid1Level1: TcxGridLevel
GridView = Tv1
end
end
object ADOQueryTemp: TADOQuery

View File

@ -12,22 +12,20 @@ uses
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters, dxSkinsCore,
dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee,
dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans,
dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky,
dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters, dxSkinsCore, dxSkinBlack,
dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom,
dxSkinDarkSide, dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin,
dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus,
dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine,
dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, dxSkinscxPCPainter,
cxNavigator;
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray,
dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic,
dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringTime, dxSkinStardust,
dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinsDefaultPainters,
dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue,
dxSkinscxPCPainter, cxNavigator;
type
TfrmZdyAttachGYS = class(TForm)
@ -42,27 +40,27 @@ type
RM1: TRMGridReport;
RMDB_Main: TRMDBDataSet;
Label3: TLabel;
ZdyName: TEdit;
KHNameJC: TEdit;
cxGridPopupMenu2: TcxGridPopupMenu;
DS_HZ: TDataSource;
CDS_HZ: TClientDataSet;
Label1: TLabel;
ZdyCode: TEdit;
cxGrid2: TcxGrid;
Tv2: TcxGridDBTableView;
v2Column2: TcxGridDBColumn;
v2Column6: TcxGridDBColumn;
v2Column15: TcxGridDBColumn;
cxGridLevel1: TcxGridLevel;
v2Column7: TcxGridDBColumn;
KHNo: TEdit;
cxGrid1: TcxGrid;
Tv1: TcxGridDBTableView;
v1KHNo: TcxGridDBColumn;
v1Column6: TcxGridDBColumn;
v1KHLXR: TcxGridDBColumn;
v1Column1: TcxGridDBColumn;
cxGrid1Level1: TcxGridLevel;
procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBCloseClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure TBRafreshClick(Sender: TObject);
procedure ToolButton2Click(Sender: TObject);
procedure ZdyNameChange(Sender: TObject);
procedure Tv2DblClick(Sender: TObject);
procedure KHNameJCChange(Sender: TObject);
procedure Tv1DblClick(Sender: TObject);
private
{ Private declarations }
procedure InitGrid();
@ -88,11 +86,12 @@ begin
Filtered := False;
Close;
SQL.Clear;
sql.Add(' select * from KH_Zdy_Attachment A ');
// sql.Add(' left join Company_contact B on A.CoID=B.CoID and B.IsDefault=1');
sql.Add(' where A.Type=''GYS'' and A.Valid=''Y'' ');
sql.Add('select *,zjm=dbo.getpinyin(KHName) ');
sql.Add(' from KH_Main A ');
sql.Add(' where isnull(KHFlag,'''')=''GYS'' and isnull(Valid,'''')=''Y''');
Open;
end;
SCreateCDS20(ADOQueryMain, CDS_HZ);
SInitCDSData20(ADOQueryMain, CDS_HZ);
finally
@ -113,13 +112,13 @@ end;
procedure TfrmZdyAttachGYS.TBCloseClick(Sender: TObject);
begin
WriteCxGrid('¹©Ó¦ÉÌ×ÊÁÏ', Tv2);
WriteCxGrid('¹©Ó¦ÉÌ×ÊÁÏ', Tv1);
Close;
end;
procedure TfrmZdyAttachGYS.FormShow(Sender: TObject);
begin
ReadCxGrid('¹©Ó¦ÉÌ×ÊÁÏ', Tv2);
ReadCxGrid('¹©Ó¦ÉÌ×ÊÁÏ', Tv1);
InitGrid();
end;
@ -138,12 +137,12 @@ begin
end;
end;
procedure TfrmZdyAttachGYS.ZdyNameChange(Sender: TObject);
procedure TfrmZdyAttachGYS.KHNameJCChange(Sender: TObject);
begin
ToolButton2.Click;
end;
procedure TfrmZdyAttachGYS.Tv2DblClick(Sender: TObject);
procedure TfrmZdyAttachGYS.Tv1DblClick(Sender: TObject);
begin
if CDS_HZ.IsEmpty then
exit;

View File

@ -0,0 +1,217 @@
object frmZdyAttachkh: TfrmZdyAttachkh
Left = 536
Top = 193
Width = 1038
Height = 618
Caption = #23458#25143#36873#25321
Color = clBtnFace
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -15
Font.Name = #23435#20307
Font.Style = []
OldCreateOrder = False
OnClose = FormClose
OnDestroy = FormDestroy
OnShow = FormShow
PixelsPerInch = 120
TextHeight = 15
object ToolBar1: TToolBar
Left = 0
Top = 0
Width = 1030
Height = 31
ButtonHeight = 30
ButtonWidth = 65
Caption = 'ToolBar1'
Color = clSkyBlue
DisabledImages = DataLink_YXYMT.ThreeImgList
Flat = True
Images = DataLink_YXYMT.ThreeImgList
List = True
ParentColor = False
ShowCaptions = True
TabOrder = 0
object TBRafresh: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #21047#26032
ImageIndex = 0
OnClick = TBRafreshClick
end
object ToolButton2: TToolButton
Left = 69
Top = 0
AutoSize = True
Caption = #36807#28388
ImageIndex = 20
OnClick = ToolButton2Click
end
object TBClose: TToolButton
Left = 138
Top = 0
AutoSize = True
Caption = #20851#38381
ImageIndex = 21
OnClick = TBCloseClick
end
end
object Panel1: TPanel
Left = 0
Top = 31
Width = 1030
Height = 49
Align = alTop
BevelInner = bvRaised
BevelOuter = bvLowered
Color = clSkyBlue
TabOrder = 1
object Label3: TLabel
Left = 254
Top = 16
Width = 60
Height = 15
Caption = #23458#25143#31616#31216
end
object Label1: TLabel
Left = 28
Top = 16
Width = 60
Height = 15
Caption = #23458#25143#32534#21495
end
object KHNameJC: TEdit
Tag = 2
Left = 334
Top = 11
Width = 112
Height = 23
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
TabOrder = 1
OnChange = KHNameJCChange
end
object KHNo: TEdit
Tag = 2
Left = 104
Top = 11
Width = 112
Height = 23
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
TabOrder = 0
OnChange = KHNameJCChange
end
end
object cxGrid1: TcxGrid
Left = 0
Top = 80
Width = 1030
Height = 501
Align = alClient
TabOrder = 2
object Tv1: TcxGridDBTableView
OnDblClick = Tv1DblClick
Navigator.Buttons.CustomButtons = <>
DataController.DataSource = DS_HZ
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <>
DataController.Summary.SummaryGroups = <>
OptionsCustomize.ColumnFiltering = False
OptionsSelection.CellSelect = False
OptionsView.Footer = True
OptionsView.GroupByBox = False
Styles.Header = DataLink_YXYMT.Default
object v1KHNo: TcxGridDBColumn
Caption = #23458#25143#32534#21495
DataBinding.FieldName = 'KHNo'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 134
end
object v1Column6: TcxGridDBColumn
Caption = #23458#25143#31616#31216
DataBinding.FieldName = 'KHNameJC'
HeaderAlignmentHorz = taCenter
Width = 145
end
object v1KHLXR: TcxGridDBColumn
Caption = #32852#31995#20154
DataBinding.FieldName = 'KHLXR'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 113
end
object v1Column1: TcxGridDBColumn
Caption = #23458#25143#31867#22411
DataBinding.FieldName = 'KHType'
HeaderAlignmentHorz = taCenter
Width = 114
end
end
object cxGrid1Level1: TcxGridLevel
GridView = Tv1
end
end
object ADOQueryTemp: TADOQuery
Connection = DataLink_YXYMT.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 789
Top = 9
end
object ADOQueryCmd: TADOQuery
Connection = DataLink_YXYMT.ADOLink
Parameters = <>
Left = 829
Top = 1
end
object ADOQueryMain: TADOQuery
Connection = DataLink_YXYMT.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 949
Top = 225
end
object RM1: TRMGridReport
ThreadPrepareReport = True
InitialZoom = pzDefault
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
DefaultCollate = False
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
PreviewOptions.RulerUnit = rmutScreenPixels
PreviewOptions.RulerVisible = False
PreviewOptions.DrawBorder = False
PreviewOptions.BorderPen.Color = clGray
PreviewOptions.BorderPen.Style = psDash
Dataset = RMDB_Main
CompressLevel = rmzcFastest
CompressThread = False
LaterBuildEvents = True
OnlyOwnerDataSet = False
Left = 864
Top = 224
ReportData = {}
end
object RMDB_Main: TRMDBDataSet
Visible = True
Left = 928
Top = 216
end
object cxGridPopupMenu2: TcxGridPopupMenu
PopupMenus = <>
Left = 888
Top = 224
end
object DS_HZ: TDataSource
DataSet = CDS_HZ
Left = 899
Top = 235
end
object CDS_HZ: TClientDataSet
Aggregates = <>
Params = <>
Left = 872
Top = 224
end
end

View File

@ -0,0 +1,153 @@
unit U_ZdyAttachKH;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters, dxSkinsCore, dxSkinBlack,
dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom,
dxSkinDarkSide, dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray,
dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic,
dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringTime, dxSkinStardust,
dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinsDefaultPainters,
dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue,
dxSkinscxPCPainter, cxNavigator;
type
TfrmZdyAttachkh = class(TForm)
ToolBar1: TToolBar;
TBRafresh: TToolButton;
TBClose: TToolButton;
ADOQueryTemp: TADOQuery;
ADOQueryCmd: TADOQuery;
Panel1: TPanel;
ToolButton2: TToolButton;
ADOQueryMain: TADOQuery;
RM1: TRMGridReport;
RMDB_Main: TRMDBDataSet;
Label3: TLabel;
KHNameJC: TEdit;
cxGridPopupMenu2: TcxGridPopupMenu;
DS_HZ: TDataSource;
CDS_HZ: TClientDataSet;
Label1: TLabel;
KHNo: TEdit;
cxGrid1: TcxGrid;
Tv1: TcxGridDBTableView;
v1KHNo: TcxGridDBColumn;
v1Column6: TcxGridDBColumn;
v1KHLXR: TcxGridDBColumn;
v1Column1: TcxGridDBColumn;
cxGrid1Level1: TcxGridLevel;
procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBCloseClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure TBRafreshClick(Sender: TObject);
procedure ToolButton2Click(Sender: TObject);
procedure KHNameJCChange(Sender: TObject);
procedure Tv1DblClick(Sender: TObject);
private
{ Private declarations }
procedure InitGrid();
public
end;
var
frmZdyAttachkh: TfrmZdyAttachkh;
implementation
uses
U_DataLink, U_Fun, U_ZDYHelp;
{$R *.dfm}
procedure TfrmZdyAttachkh.InitGrid();
begin
try
ADOQueryMain.DisableControls;
with ADOQueryMain do
begin
Filtered := False;
Close;
SQL.Clear;
sql.Add('select *,zjm=dbo.getpinyin(KHName) ');
sql.Add(' from KH_Main A ');
sql.Add(' where isnull(KHFlag,'''')=''KH'' and isnull(Valid,'''')=''Y''');
Open;
end;
SCreateCDS20(ADOQueryMain, CDS_HZ);
SInitCDSData20(ADOQueryMain, CDS_HZ);
finally
ADOQueryMain.EnableControls;
end;
ToolButton2.Click;
end;
procedure TfrmZdyAttachkh.FormDestroy(Sender: TObject);
begin
frmZdyAttachkh := nil;
end;
procedure TfrmZdyAttachkh.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action := caFree;
end;
procedure TfrmZdyAttachkh.TBCloseClick(Sender: TObject);
begin
WriteCxGrid('¹©Ó¦ÉÌ×ÊÁÏ', Tv1);
Close;
end;
procedure TfrmZdyAttachkh.FormShow(Sender: TObject);
begin
ReadCxGrid('¹©Ó¦ÉÌ×ÊÁÏ', Tv1);
InitGrid();
end;
procedure TfrmZdyAttachkh.TBRafreshClick(Sender: TObject);
begin
InitGrid();
end;
procedure TfrmZdyAttachkh.ToolButton2Click(Sender: TObject);
begin
if ADOQueryMain.Active then
begin
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
SCreateCDS20(ADOQueryMain, CDS_HZ);
SInitCDSData20(ADOQueryMain, CDS_HZ);
end;
end;
procedure TfrmZdyAttachkh.KHNameJCChange(Sender: TObject);
begin
ToolButton2.Click;
end;
procedure TfrmZdyAttachkh.Tv1DblClick(Sender: TObject);
begin
if CDS_HZ.IsEmpty then
exit;
ModalResult := 1;
end;
end.

View File

@ -101,7 +101,7 @@ DebugSourceDirs=
UsePackages=0
[Parameters]
RunParams=
HostApplication=D:\Project\D7myYunxiang\云翔一码通\testDll.exe
HostApplication=D:\马国钢开发代码\项目代码\D7WMyunxiang\云翔一码通\testDll.exe
Launcher=
UseLauncher=0
DebugCWD=