修改一码通的一些内容
This commit is contained in:
parent
19ebd6eb13
commit
56ab7867a3
File diff suppressed because it is too large
Load Diff
|
|
@ -44,7 +44,7 @@ object frmSelExportField: TfrmSelExportField
|
|||
TabOrder = 2
|
||||
Visible = False
|
||||
object ExpGrid: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = ExportDataSource
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,22 @@ uses
|
|||
DB,IniFiles, RM_Common, RM_Class, RM_e_Xls, cxStyles, cxCustomData,
|
||||
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData,
|
||||
cxGridLevel, cxClasses, cxControls, cxGridCustomView,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGrid;
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGrid,
|
||||
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
|
||||
TfrmSelExportField = class(TForm)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@ function ConnData(): Boolean;
|
|||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_YMTRKList, U_YMTFHSQList, U_YMTFHDataList, U_YMTJGWCList;
|
||||
U_DataLink, U_YMTRKList, U_YMTFHSQList, U_YMTFHDataList, U_YMTJGWCList,
|
||||
U_YMTStockList;
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// 功能说明:取Dll中得窗体 //
|
||||
|
|
@ -48,6 +49,8 @@ begin
|
|||
DParameters8 := Parameters8;
|
||||
DParameters9 := Parameters9;
|
||||
DParameters10 := Parameters10;
|
||||
DName := 'ADMIN';
|
||||
DCode := 'ADMIN';
|
||||
|
||||
MainApplication := App;
|
||||
DCurHandle := FormH;
|
||||
|
|
@ -56,7 +59,6 @@ begin
|
|||
Application := TApplication(App);
|
||||
DCurHandle := 0;
|
||||
|
||||
|
||||
//赋值链接字符串
|
||||
SetLength(server, 255);
|
||||
SetLength(dtbase, 255);
|
||||
|
|
@ -138,13 +140,63 @@ begin
|
|||
mnewHandle := frmYMTJGWCList.Handle;
|
||||
end;
|
||||
|
||||
211: //发货申请
|
||||
113: //库存数据
|
||||
begin
|
||||
if frmYMTFHSQList = nil then
|
||||
if frmStockList = nil then
|
||||
begin
|
||||
frmStockList := TfrmStockList.Create(application.MainForm);
|
||||
with frmStockList do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmStockList.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmStockList.Handle;
|
||||
end;
|
||||
|
||||
// 211: //发货申请
|
||||
// begin
|
||||
// if frmYMTFHSQList = nil then
|
||||
// begin
|
||||
// frmYMTFHSQList := TfrmYMTFHSQList.Create(application.MainForm);
|
||||
// with frmYMTFHSQList do
|
||||
// begin
|
||||
// caption := Trim(Title);
|
||||
// FormStyle := mstyle;
|
||||
// windowState := mstate;
|
||||
// BorderStyle := mborderstyle;
|
||||
// //show;
|
||||
// end;
|
||||
// end
|
||||
// else
|
||||
// frmYMTFHSQList.BringToFront;
|
||||
// //句柄
|
||||
// mnewHandle := frmYMTFHSQList.Handle;
|
||||
// end;
|
||||
211: //销售发货申请
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '销售发货申请' then
|
||||
begin
|
||||
BringWindowToTop(frmYMTFHSQList.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmYMTFHSQList := TfrmYMTFHSQList.Create(application.MainForm);
|
||||
with frmYMTFHSQList do
|
||||
begin
|
||||
Title := '销售发货申请';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
|
|
@ -176,10 +228,42 @@ begin
|
|||
//句柄
|
||||
mnewHandle := frmYMTFHDataList.Handle;
|
||||
end;
|
||||
213: //加工发货登记
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '加工发货登记' then
|
||||
begin
|
||||
BringWindowToTop(frmYMTFHSQList.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmYMTFHSQList := TfrmYMTFHSQList.Create(application.MainForm);
|
||||
with frmYMTFHSQList do
|
||||
begin
|
||||
Title := '加工发货登记';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmYMTFHSQList.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmYMTFHSQList.Handle;
|
||||
end;
|
||||
end;
|
||||
|
||||
Result := mnewHandle;
|
||||
end;
|
||||
|
||||
|
||||
//===========================================================
|
||||
//建立数据库连接池
|
||||
//===========================================================
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
object frmYMTFHDataList: TfrmYMTFHDataList
|
||||
Left = 515
|
||||
Top = 347
|
||||
Left = 479
|
||||
Top = 280
|
||||
Width = 1370
|
||||
Height = 750
|
||||
Caption = #21457#36135#25968#25454
|
||||
|
|
@ -352,13 +352,19 @@ object frmYMTFHDataList: TfrmYMTFHDataList
|
|||
end
|
||||
object v2Column6: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #25968#37327
|
||||
DataBinding.FieldName = 'Qty'
|
||||
Caption = #38271#24230
|
||||
DataBinding.FieldName = 'MQty'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 85
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #37325#37327
|
||||
DataBinding.FieldName = 'KgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
end
|
||||
end
|
||||
object cxGrid2Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ type
|
|||
Tv1FromMXID: TcxGridDBColumn;
|
||||
ToolButton1: TToolButton;
|
||||
ToolButton2: TToolButton;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
object frmFHSQInPut: TfrmFHSQInPut
|
||||
Left = 354
|
||||
Top = 296
|
||||
Left = 677
|
||||
Top = 428
|
||||
Width = 1499
|
||||
Height = 664
|
||||
Caption = #21457#36135#30003#35831#24405#20837
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
|
|
@ -59,7 +59,7 @@ object frmFHSQInPut: TfrmFHSQInPut
|
|||
Left = 0
|
||||
Top = 29
|
||||
Width = 1491
|
||||
Height = 139
|
||||
Height = 111
|
||||
Align = alTop
|
||||
BevelInner = bvNone
|
||||
BevelOuter = bvNone
|
||||
|
|
@ -70,121 +70,118 @@ object frmFHSQInPut: TfrmFHSQInPut
|
|||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Tag = 1
|
||||
Left = 41
|
||||
Top = 15
|
||||
Width = 115
|
||||
Height = 22
|
||||
Left = 33
|
||||
Top = 12
|
||||
Width = 100
|
||||
Height = 19
|
||||
Caption = #20986#24211#31867#22411#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Tag = 1
|
||||
Left = 49
|
||||
Top = 98
|
||||
Width = 105
|
||||
Height = 22
|
||||
Left = 40
|
||||
Top = 78
|
||||
Width = 93
|
||||
Height = 19
|
||||
Caption = #22791' '#27880#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label11: TLabel
|
||||
Tag = 1
|
||||
Left = 475
|
||||
Top = 15
|
||||
Width = 115
|
||||
Height = 22
|
||||
Left = 380
|
||||
Top = 12
|
||||
Width = 100
|
||||
Height = 19
|
||||
Caption = #25910#36135#21333#20301#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Tag = 1
|
||||
Left = 475
|
||||
Top = 54
|
||||
Width = 115
|
||||
Height = 22
|
||||
Left = 380
|
||||
Top = 43
|
||||
Width = 100
|
||||
Height = 19
|
||||
Caption = #30003#35831#26085#26399#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Tag = 1
|
||||
Left = 64
|
||||
Top = 54
|
||||
Width = 92
|
||||
Height = 22
|
||||
Left = 53
|
||||
Top = 43
|
||||
Width = 80
|
||||
Height = 19
|
||||
Caption = #19994#21153#21592#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Tag = 1
|
||||
Left = 1061
|
||||
Top = 15
|
||||
Width = 92
|
||||
Height = 22
|
||||
Left = 849
|
||||
Top = 12
|
||||
Width = 80
|
||||
Height = 19
|
||||
Caption = #21152#24037#31867#22411
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object CRType: TComboBox
|
||||
Tag = 1
|
||||
Left = 144
|
||||
Top = 10
|
||||
Width = 312
|
||||
Height = 30
|
||||
Left = 123
|
||||
Top = 8
|
||||
Width = 250
|
||||
Height = 27
|
||||
Style = csDropDownList
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ItemHeight = 22
|
||||
ItemHeight = 19
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
Items.Strings = (
|
||||
#38144#21806#20869#38144
|
||||
#21152#24037#20869#38144
|
||||
#38144#21806#22806#38144
|
||||
#21152#24037#22806#38144
|
||||
#21152#24037#20986#24211
|
||||
#20854#20182#20986#24211)
|
||||
'')
|
||||
end
|
||||
object Note: TEdit
|
||||
Tag = 1
|
||||
Left = 144
|
||||
Top = 94
|
||||
Width = 892
|
||||
Height = 23
|
||||
Left = 123
|
||||
Top = 75
|
||||
Width = 714
|
||||
Height = 28
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
|
|
@ -193,14 +190,14 @@ object frmFHSQInPut: TfrmFHSQInPut
|
|||
end
|
||||
object SHDanWei: TBtnEditC
|
||||
Tag = 1
|
||||
Left = 569
|
||||
Top = 9
|
||||
Width = 466
|
||||
Height = 26
|
||||
Left = 469
|
||||
Top = 7
|
||||
Width = 373
|
||||
Height = 31
|
||||
Hint = 'KHNo'
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991'('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
|
|
@ -211,10 +208,10 @@ object frmFHSQInPut: TfrmFHSQInPut
|
|||
end
|
||||
object SQDate: TDateTimePicker
|
||||
Tag = 1
|
||||
Left = 569
|
||||
Top = 49
|
||||
Width = 162
|
||||
Height = 30
|
||||
Left = 469
|
||||
Top = 39
|
||||
Width = 130
|
||||
Height = 27
|
||||
BevelInner = bvNone
|
||||
Date = 43473.670856296290000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
|
|
@ -222,7 +219,7 @@ object frmFHSQInPut: TfrmFHSQInPut
|
|||
Checked = False
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
|
|
@ -231,13 +228,13 @@ object frmFHSQInPut: TfrmFHSQInPut
|
|||
end
|
||||
object Salesman: TBtnEditC
|
||||
Tag = 1
|
||||
Left = 144
|
||||
Top = 48
|
||||
Width = 169
|
||||
Height = 26
|
||||
Left = 123
|
||||
Top = 38
|
||||
Width = 135
|
||||
Height = 31
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
|
|
@ -248,13 +245,13 @@ object frmFHSQInPut: TfrmFHSQInPut
|
|||
end
|
||||
object JGType: TEdit
|
||||
Tag = 1
|
||||
Left = 1164
|
||||
Top = 10
|
||||
Width = 150
|
||||
Height = 23
|
||||
Left = 936
|
||||
Top = 8
|
||||
Width = 120
|
||||
Height = 28
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
|
|
@ -264,7 +261,7 @@ object frmFHSQInPut: TfrmFHSQInPut
|
|||
end
|
||||
object ToolBar2: TToolBar
|
||||
Left = 0
|
||||
Top = 168
|
||||
Top = 140
|
||||
Width = 1491
|
||||
Height = 29
|
||||
ButtonHeight = 30
|
||||
|
|
@ -304,9 +301,9 @@ object frmFHSQInPut: TfrmFHSQInPut
|
|||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 197
|
||||
Top = 169
|
||||
Width = 1491
|
||||
Height = 430
|
||||
Height = 464
|
||||
Align = alClient
|
||||
TabOrder = 3
|
||||
object Tv1: TcxGridDBTableView
|
||||
|
|
|
|||
480
云翔一码通/U_YMTFHSQInPut2.dfm
Normal file
480
云翔一码通/U_YMTFHSQInPut2.dfm
Normal file
|
|
@ -0,0 +1,480 @@
|
|||
object frmFHSQInPut2: TfrmFHSQInPut2
|
||||
Left = 357
|
||||
Top = 336
|
||||
Width = 1499
|
||||
Height = 664
|
||||
Caption = #21457#36135#30003#35831#24405#20837
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1491
|
||||
Height = 29
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 75
|
||||
Caption = 'ToolBar1'
|
||||
Color = clBtnFace
|
||||
EdgeInner = esNone
|
||||
EdgeOuter = esNone
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
Images = DataLink_YXYMT.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBSave: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384
|
||||
ImageIndex = 5
|
||||
OnClick = TBSaveClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 79
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object ScrollBox1: TScrollBox
|
||||
Left = 0
|
||||
Top = 29
|
||||
Width = 1491
|
||||
Height = 111
|
||||
Align = alTop
|
||||
BevelInner = bvNone
|
||||
BevelOuter = bvNone
|
||||
Color = clBtnFace
|
||||
Ctl3D = False
|
||||
ParentColor = False
|
||||
ParentCtl3D = False
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Tag = 1
|
||||
Left = 33
|
||||
Top = 12
|
||||
Width = 100
|
||||
Height = 19
|
||||
Caption = #20986#24211#31867#22411#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Tag = 1
|
||||
Left = 40
|
||||
Top = 78
|
||||
Width = 93
|
||||
Height = 19
|
||||
Caption = #22791' '#27880#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label11: TLabel
|
||||
Tag = 1
|
||||
Left = 380
|
||||
Top = 12
|
||||
Width = 100
|
||||
Height = 19
|
||||
Caption = #25910#36135#21333#20301#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Tag = 1
|
||||
Left = 380
|
||||
Top = 43
|
||||
Width = 100
|
||||
Height = 19
|
||||
Caption = #30003#35831#26085#26399#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Tag = 1
|
||||
Left = 53
|
||||
Top = 43
|
||||
Width = 80
|
||||
Height = 19
|
||||
Caption = #19994#21153#21592#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Tag = 1
|
||||
Left = 849
|
||||
Top = 12
|
||||
Width = 80
|
||||
Height = 19
|
||||
Caption = #21152#24037#31867#22411
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object CRType: TComboBox
|
||||
Tag = 1
|
||||
Left = 121
|
||||
Top = 8
|
||||
Width = 250
|
||||
Height = 27
|
||||
Style = csDropDownList
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ItemHeight = 19
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
Items.Strings = (
|
||||
#21152#24037#20869#38144
|
||||
#21152#24037#22806#38144
|
||||
#21152#24037#20986#24211
|
||||
'')
|
||||
end
|
||||
object Note: TEdit
|
||||
Tag = 1
|
||||
Left = 121
|
||||
Top = 75
|
||||
Width = 714
|
||||
Height = 25
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
TabOrder = 4
|
||||
end
|
||||
object SHDanWei: TBtnEditC
|
||||
Tag = 1
|
||||
Left = 470
|
||||
Top = 7
|
||||
Width = 373
|
||||
Height = 28
|
||||
Hint = 'KHNo'
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991'('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
OnBtnUpClick = SHDanWeiBtnUpClick
|
||||
OnBtnDnClick = SHDanWeiBtnDnClick
|
||||
end
|
||||
object SQDate: TDateTimePicker
|
||||
Tag = 1
|
||||
Left = 470
|
||||
Top = 39
|
||||
Width = 130
|
||||
Height = 27
|
||||
BevelInner = bvNone
|
||||
Date = 43473.670856296290000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 43473.670856296290000000
|
||||
Checked = False
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
end
|
||||
object Salesman: TBtnEditC
|
||||
Tag = 1
|
||||
Left = 121
|
||||
Top = 38
|
||||
Width = 135
|
||||
Height = 28
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
TabOrder = 3
|
||||
OnBtnUpClick = SalesmanBtnUpClick
|
||||
OnBtnDnClick = SalesmanBtnDnClick
|
||||
end
|
||||
object JGType: TEdit
|
||||
Tag = 1
|
||||
Left = 931
|
||||
Top = 8
|
||||
Width = 120
|
||||
Height = 25
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
TabOrder = 5
|
||||
end
|
||||
end
|
||||
object ToolBar2: TToolBar
|
||||
Left = 0
|
||||
Top = 140
|
||||
Width = 1491
|
||||
Height = 29
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 95
|
||||
Caption = 'ToolBar1'
|
||||
Color = clBtnFace
|
||||
EdgeInner = esNone
|
||||
EdgeOuter = esNone
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
Images = DataLink_YXYMT.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 2
|
||||
object ToolButton3: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #35745#21010#21333
|
||||
ImageIndex = 57
|
||||
Visible = False
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 99
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #24211#23384
|
||||
ImageIndex = 57
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 178
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#34892
|
||||
ImageIndex = 113
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 169
|
||||
Width = 1491
|
||||
Height = 464
|
||||
Align = alClient
|
||||
TabOrder = 3
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column5
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnTab = True
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Content = DataLink_YXYMT.Default
|
||||
Styles.Inactive = DataLink_YXYMT.SHuangSe
|
||||
Styles.IncSearch = DataLink_YXYMT.SHuangSe
|
||||
Styles.Selection = DataLink_YXYMT.SHuangSe
|
||||
Styles.Header = DataLink_YXYMT.Default
|
||||
object v1Column14: TcxGridDBColumn
|
||||
Caption = #32534#21495
|
||||
DataBinding.FieldName = 'MXID'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 120
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'MXPrtName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 110
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'MXPrtColor'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 95
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #33457#22411
|
||||
DataBinding.FieldName = 'MXPrtHX'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 81
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #38271#24230
|
||||
DataBinding.FieldName = 'MQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #37325#37327
|
||||
DataBinding.FieldName = 'KgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #24211#20301
|
||||
DataBinding.FieldName = 'Kuwei'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
Caption = #36153#29992#21333#20215
|
||||
DataBinding.FieldName = 'FHPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 107
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #36153#29992#21517#31216
|
||||
DataBinding.FieldName = 'FeeName'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
Properties.OnButtonClick = v1Column10PropertiesButtonClick
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 107
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #36153#29992#37329#39069
|
||||
DataBinding.FieldName = 'FeeMoney'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 106
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object ADOTemp: TADOQuery
|
||||
Connection = DataLink_YXYMT.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 200
|
||||
Top = 65533
|
||||
end
|
||||
object ADOCmd: TADOQuery
|
||||
Connection = DataLink_YXYMT.ADOLink
|
||||
Parameters = <>
|
||||
Left = 168
|
||||
Top = 65533
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = Order_Sub
|
||||
Left = 768
|
||||
Top = 392
|
||||
end
|
||||
object Order_Sub: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 728
|
||||
Top = 392
|
||||
end
|
||||
object ADOQuery1: TADOQuery
|
||||
Connection = DataLink_YXYMT.ADOLink
|
||||
Parameters = <>
|
||||
Left = 136
|
||||
Top = 65533
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 688
|
||||
Top = 392
|
||||
end
|
||||
end
|
||||
586
云翔一码通/U_YMTFHSQInPut2.pas
Normal file
586
云翔一码通/U_YMTFHSQInPut2.pas
Normal file
|
|
@ -0,0 +1,586 @@
|
|||
unit U_YMTFHSQInPut2;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, cxGridLevel, cxGridCustomTableView, cxGridTableView,
|
||||
cxGridDBTableView, cxClasses, cxControls, cxGridCustomView, cxGrid, cxMemo,
|
||||
cxRichEdit, ComCtrls, cxContainer, cxTextEdit, cxMaskEdit, cxButtonEdit,
|
||||
StdCtrls, ToolWin, DBClient, ADODB, ExtCtrls, BtnEdit, cxCalendar, StrUtils,
|
||||
cxDropDownEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator, dxSkinsCore, dxSkinDarkRoom,
|
||||
dxSkinOffice2013White, dxSkinSharpPlus, dxSkinSpringTime,
|
||||
dxSkinsDefaultPainters, dxSkinscxPCPainter, dxSkinBlack, dxSkinBlue,
|
||||
dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkSide,
|
||||
dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
|
||||
dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
|
||||
dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
|
||||
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
|
||||
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
|
||||
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
|
||||
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray,
|
||||
dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSilver,
|
||||
dxSkinStardust, dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinValentine,
|
||||
dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue;
|
||||
|
||||
type
|
||||
TfrmFHSQInPut2 = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBSave: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ScrollBox1: TScrollBox;
|
||||
ToolBar2: TToolBar;
|
||||
ToolButton2: TToolButton;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
ADOTemp: TADOQuery;
|
||||
ADOCmd: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
Order_Sub: TClientDataSet;
|
||||
ADOQuery1: TADOQuery;
|
||||
v1Column14: TcxGridDBColumn;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
Label1: TLabel;
|
||||
CRType: TComboBox;
|
||||
Note: TEdit;
|
||||
Label12: TLabel;
|
||||
Label11: TLabel;
|
||||
SHDanWei: TBtnEditC;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
Label2: TLabel;
|
||||
SQDate: TDateTimePicker;
|
||||
Label5: TLabel;
|
||||
Salesman: TBtnEditC;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
ToolButton3: TToolButton;
|
||||
Label3: TLabel;
|
||||
JGType: TEdit;
|
||||
ToolButton1: TToolButton;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBSaveClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure SHDanWeiBtnUpClick(Sender: TObject);
|
||||
procedure SHDanWeiBtnDnClick(Sender: TObject);
|
||||
procedure ShouKuanKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure SalesmanBtnUpClick(Sender: TObject);
|
||||
procedure SalesmanBtnDnClick(Sender: TObject);
|
||||
procedure v1Column10PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
private
|
||||
fuserName: string;
|
||||
procedure InitData();
|
||||
procedure ZDYHelp(FButn: TcxButtonEdit; LType: string);
|
||||
function SaveData(): Boolean;
|
||||
{ Private declarations }
|
||||
public
|
||||
PState, CopyInt: Integer;
|
||||
FMainId, FFMainId, ChkStr, ConPriceStr: string;
|
||||
FXS: Integer;
|
||||
FZZType: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmFHSQInPut2: TfrmFHSQInPut2;
|
||||
newh: hwnd;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_ZDYHelp, U_RTFun, U_YMTOrderSel, U_ZdyAttachKH, U_ZdyAttachGYS,
|
||||
U_YMTStockSel; // U_YMTKHList, , U_YMTGYSList
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmFHSQInPut2.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
WriteCxGrid('发货申请录入1', Tv1, '发货管理');
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPut2.InitData();
|
||||
var
|
||||
fsj: string;
|
||||
begin
|
||||
if PState = 0 then
|
||||
begin
|
||||
Salesman.Text := dname;
|
||||
SQDate.DateTime := SGetServerDate10(ADOTemp);
|
||||
end;
|
||||
with ADOQuery1 do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select A.* from YMT_FHSQ_Sub A');
|
||||
if PState = 1 then
|
||||
begin
|
||||
sql.Add('where FSId=''' + Trim(FMainId) + '''');
|
||||
end;
|
||||
if PState = 0 then
|
||||
begin
|
||||
sql.Add(' where 1<>1');
|
||||
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQuery1, Order_Sub);
|
||||
SInitCDSData20(ADOQuery1, Order_Sub);
|
||||
|
||||
with ADOQuery1 do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* from YMT_FHSQ_Main A');
|
||||
sql.Add(' where FSId=''' + Trim(FMainId) + ''' ');
|
||||
Open;
|
||||
end;
|
||||
SCSHDataNew(ADOQuery1, ScrollBox1, 1);
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPut2.ZDYHelp(FButn: TcxButtonEdit; LType: string);
|
||||
var
|
||||
FType, ZDYName, FText: string;
|
||||
begin
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPut2.FormShow(Sender: TObject);
|
||||
begin
|
||||
readCxGrid('发货申请录入1', Tv1, '发货管理');
|
||||
InitData();
|
||||
end;
|
||||
|
||||
function TfrmFHSQInPut2.SaveData(): Boolean;
|
||||
var
|
||||
maxno, maxmnno, FSSId: string;
|
||||
fconNO, fmxType: string;
|
||||
begin
|
||||
try
|
||||
ADOCmd.Connection.BeginTrans;
|
||||
///保存主表
|
||||
if Trim(FMainId) = '' then
|
||||
begin
|
||||
if GetLSNoHZ(ADOCmd, maxno, 'NK', 'YMT_FHSQ_Main', 3, 1, 3) = False then
|
||||
begin
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
maxno := Trim(FMainId);
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('select * from YMT_FHSQ_Main where FSID=''' + Trim(FMainId) + '''');
|
||||
Open;
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
if Trim(FMainId) = '' then
|
||||
begin
|
||||
Append;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
end;
|
||||
FieldByName('SQType').Value := '成品';
|
||||
FieldByName('FSID').Value := Trim(maxno);
|
||||
RTSetsavedata(ADOCmd, 'YMT_FHSQ_Main', ScrollBox1, 1);
|
||||
|
||||
if Trim(FMainId) = '' then
|
||||
begin
|
||||
FieldByName('Filler').Value := Trim(DName);
|
||||
|
||||
end
|
||||
else
|
||||
begin
|
||||
FieldByName('Editer').Value := Trim(DName);
|
||||
FieldByName('EditTime').Value := SGetServerDateTime(ADOTemp);
|
||||
end;
|
||||
|
||||
Post;
|
||||
end;
|
||||
|
||||
FMainId := Trim(maxno);
|
||||
///保存子表
|
||||
Order_Sub.DisableControls;
|
||||
with Order_Sub do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if Trim(Order_Sub.fieldbyname('SSId').AsString) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOCmd, maxno, 'SS', 'YMT_FHSQ_Sub', 4, 1) = False then
|
||||
begin
|
||||
Order_Sub.EnableControls;
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取子流水号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
maxno := Trim(Order_Sub.fieldbyname('SSId').AsString);
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from YMT_FHSQ_Sub ');
|
||||
sql.Add(' where SSId=''' + Trim(maxno) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOCmd.IsEmpty then
|
||||
begin
|
||||
FSSId := '';
|
||||
end
|
||||
else
|
||||
begin
|
||||
FSSId := Trim(maxno);
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
if Trim(FSSId) = '' then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Filler').Value := Trim(DName);
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('Editer').Value := Trim(DName);
|
||||
FieldByName('EditTime').Value := SGetServerDateTime(ADOTemp);
|
||||
end;
|
||||
FieldByName('FSID').Value := Trim(FMainId);
|
||||
FieldByName('SSID').Value := Trim(maxno);
|
||||
RTSetSaveDataCDS(ADOCmd, Tv1, Order_Sub, 'YMT_FHSQ_Sub', 0);
|
||||
FieldByName('MainId').Value := Order_Sub.fieldbyname('MainId').Value;
|
||||
FieldByName('SubId').Value := Order_Sub.fieldbyname('SubId').Value;
|
||||
FieldByName('SSConMainId').Value := Order_Sub.fieldbyname('SSConMainId').Value;
|
||||
FieldByName('SSConSubId').Value := Order_Sub.fieldbyname('SSConSubId').Value;
|
||||
FieldByName('FHPrice').Value := Order_Sub.fieldbyname('FHPrice').Value;
|
||||
FieldByName('BZType').Value := Order_Sub.fieldbyname('BZType').Value;
|
||||
Post;
|
||||
end;
|
||||
Order_Sub.Edit;
|
||||
Order_Sub.FieldByName('SSID').Value := Trim(maxno);
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
Order_Sub.EnableControls;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update YMT_FHSQ_Main Set ');
|
||||
sql.Add('SQPSHZ=(select Sum(SQPS) from YMT_FHSQ_Sub A where A.FSID=YMT_FHSQ_Main.FSID)');
|
||||
sql.Add(',SQQtyHZM=(select Sum(SQQtyM) from YMT_FHSQ_Sub A where A.FSID=YMT_FHSQ_Main.FSID)');
|
||||
sql.Add('where FSID=''' + Trim(FMainId) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
ADOCmd.Connection.CommitTrans;
|
||||
Result := True;
|
||||
except
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!', '提示', 0);
|
||||
Result := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPut2.TBSaveClick(Sender: TObject);
|
||||
var
|
||||
Freal: Double;
|
||||
begin
|
||||
ToolBar1.SetFocus;
|
||||
|
||||
if Trim(CRType.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox('出库类型不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if Order_Sub.IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('明细不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if SaveData() then
|
||||
begin
|
||||
Application.MessageBox('保存成功!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPut2.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Sub.IsEmpty then
|
||||
Exit;
|
||||
if Trim(Order_Sub.fieldbyname('SSId').AsString) <> '' then
|
||||
begin
|
||||
with ADOTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from YMT_FHSQ_Sub where SSId=''' + Trim(Order_Sub.fieldbyname('SSId').AsString) + '''');
|
||||
sql.add(' and isnull(FHPS,0)>0');
|
||||
Open;
|
||||
end;
|
||||
if ADOTemp.IsEmpty = False then
|
||||
begin
|
||||
Application.MessageBox('已发货不能删除数据!', '提示', 0);
|
||||
exit;
|
||||
end;
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete YMT_FHSQ_Sub where SSId=''' + Trim(Order_Sub.fieldbyname('SSId').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update YMT_FHSQ_Main Set ');
|
||||
sql.Add('SQPSHZ=(select Sum(SQPS) from YMT_FHSQ_Sub A where A.FSID=YMT_FHSQ_Main.FSID)');
|
||||
sql.Add('where FSID=''' + Trim(FMainId) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
Order_Sub.Delete;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPut2.SHDanWeiBtnUpClick(Sender: TObject);
|
||||
begin
|
||||
|
||||
if CRType.Text = '加工出库' then
|
||||
begin
|
||||
try
|
||||
frmZdyAttachGYS := TfrmZdyAttachGYS.Create(Application);
|
||||
with frmZdyAttachGYS do
|
||||
begin
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.SHDanWei.Text := Trim(frmZdyAttachGYS.CDS_HZ.fieldbyname('KHNameJC').AsString);
|
||||
Self.SHDanWei.TxtCode := Trim(frmZdyAttachGYS.CDS_HZ.fieldbyname('KHNo').AsString);
|
||||
Self.Salesman.Text := Trim(frmZdyAttachGYS.CDS_HZ.fieldbyname('YWY').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZdyAttachGYS.Free;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
try
|
||||
frmZdyAttachkh := TfrmZdyAttachkh.Create(Application);
|
||||
with frmZdyAttachkh do
|
||||
begin
|
||||
// if self.canshu1 <> '高权限' then
|
||||
// canshu1 := '业务员';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.SHDanWei.Text := Trim(frmZdyAttachkh.CDS_HZ.fieldbyname('KHNameJC').AsString);
|
||||
Self.SHDanWei.TxtCode := Trim(frmZdyAttachkh.CDS_HZ.fieldbyname('KHNo').AsString);
|
||||
Self.Salesman.Text := Trim(frmZdyAttachkh.CDS_HZ.fieldbyname('YWY').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZdyAttachkh.Free;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPut2.SHDanWeiBtnDnClick(Sender: TObject);
|
||||
begin
|
||||
SHDanWei.Text := '';
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPut2.ShouKuanKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if not (((Key >= '0') and (Key <= '9')) or (Key = '.') or (Key = #8)) then
|
||||
begin
|
||||
Key := #0;
|
||||
end
|
||||
else if (pos('.', TEdit(Sender).text) <> 0) then
|
||||
begin
|
||||
if Key = '.' then
|
||||
begin
|
||||
Key := #0;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPut2.SalesmanBtnUpClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag := 'Salesman';
|
||||
flagname := '业务员';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.Salesman.Text := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPut2.SalesmanBtnDnClick(Sender: TObject);
|
||||
begin
|
||||
Salesman.Text := '';
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPut2.v1Column10PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag := 'FeeName';
|
||||
flagname := '费用名称';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
with Order_Sub do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('FeeName').Value := Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPut2.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
|
||||
try
|
||||
frmOrderSel := TfrmOrderSel.Create(Application);
|
||||
with frmOrderSel do
|
||||
begin
|
||||
|
||||
FKHNo := Trim(SHDanWei.TxtCode);
|
||||
// FTT := Trim(FHTaiTou.text);
|
||||
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
while frmOrderSel.CDS_Main.Locate('SSel', true, []) do
|
||||
begin
|
||||
if Trim(Self.SHDanWei.Text) = '' then
|
||||
begin
|
||||
SHDanWei.TxtCode := Trim(frmOrderSel.CDS_Main.fieldbyname('KHNO').AsString);
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from KH_Main where KHNO=''' + Trim(SHDanWei.TxtCode) + '''');
|
||||
open;
|
||||
end;
|
||||
SHDanWei.Text := Trim(ADOQueryTemp.fieldbyname('KHNameJC').AsString);
|
||||
end;
|
||||
|
||||
// if Trim(Self.FHTaiTou.Text) = '' then
|
||||
// begin
|
||||
// FHTaiTou.Text := Trim(frmOrderSel.CDS_Main.fieldbyname('SYRName').AsString);
|
||||
// end;
|
||||
|
||||
if Self.Order_Sub.Locate('SubId;CPType', VarArrayOf([Trim(frmOrderSel.CDS_Main.fieldbyname('SubId').AsString), Trim(frmOrderSel.CDS_Main.fieldbyname('CPType').AsString)]), []) = False then
|
||||
begin
|
||||
with Self.Order_Sub do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('MainId').Value := frmOrderSel.CDS_Main.fieldbyname('MainId').Value;
|
||||
FieldByName('SubId').Value := frmOrderSel.CDS_Main.fieldbyname('SubId').Value;
|
||||
FieldByName('MXPrtName').Value := Trim(frmOrderSel.CDS_Main.fieldbyname('MLCodeName').AsString);
|
||||
FieldByName('MXPrtColor').Value := Trim(frmOrderSel.CDS_Main.fieldbyname('MLColor').AsString);
|
||||
FieldByName('MXPrtHX').Value := Trim(frmOrderSel.CDS_Main.fieldbyname('MLHX').AsString);
|
||||
FieldByName('SCConNo').Value := Trim(frmOrderSel.CDS_Main.fieldbyname('MLOrderNo').AsString);
|
||||
// CRType.Text := Trim(frmOrderSel.CDS_Main.fieldbyname('CRType').AsString);
|
||||
|
||||
CRType.ItemIndex := CRType.Items.IndexOf(trim(frmOrderSel.CDS_Main.fieldbyname('CRType').AsString));
|
||||
FieldByName('CPType').Value := '成品';
|
||||
FieldByName('SQPS').Value := 0;
|
||||
FieldByName('SQQtyM').Value := 0;
|
||||
FieldByName('BZType').Value := frmOrderSel.CDS_Main.fieldbyname('BZType').Value;
|
||||
FieldByName('FHPrice').Value := frmOrderSel.CDS_Main.fieldbyname('MLPrice').Value;
|
||||
FieldByName('FeeName').Value := frmOrderSel.CDS_Main.fieldbyname('FeeName').Value;
|
||||
FieldByName('FeeMoney').Value := frmOrderSel.CDS_Main.fieldbyname('FeeMoney').Value;
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
frmOrderSel.CDS_Main.Delete;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmOrderSel.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPut2.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
|
||||
try
|
||||
frmStockSel := TfrmStockSel.Create(Application);
|
||||
with frmStockSel do
|
||||
begin
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
while frmStockSel.CDS_Main.Locate('SSel', true, []) do
|
||||
begin
|
||||
with Self.Order_Sub do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('MXPrtName').Value := Trim(frmStockSel.CDS_Main.fieldbyname('SPName').AsString);
|
||||
FieldByName('MXPrtColor').Value := Trim(frmStockSel.CDS_Main.fieldbyname('SPColor').AsString);
|
||||
FieldByName('MXPrtHX').Value := Trim(frmStockSel.CDS_Main.fieldbyname('SPHX').AsString);
|
||||
FieldByName('MXID').Value := Trim(frmStockSel.CDS_Main.fieldbyname('FromMXID').AsString);
|
||||
|
||||
FieldByName('CPType').Value := '布匹';
|
||||
FieldByName('MQty').Value := frmStockSel.CDS_Main.fieldbyname('MQty').Value;
|
||||
;
|
||||
FieldByName('KgQty').Value := frmStockSel.CDS_Main.fieldbyname('KgQty').Value;
|
||||
FieldByName('Kuwei').Value := frmStockSel.CDS_Main.fieldbyname('KuWei').Value;
|
||||
Post;
|
||||
end;
|
||||
|
||||
with frmStockSel.CDS_Main do
|
||||
begin
|
||||
Edit;
|
||||
fieldbyname('SSel').Value := False;
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmStockSel.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
|
@ -7,7 +7,7 @@ object frmYMTFHSQList: TfrmYMTFHSQList
|
|||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
|
|
@ -15,8 +15,8 @@ object frmYMTFHSQList: TfrmYMTFHSQList
|
|||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
|
|
@ -54,16 +54,24 @@ object frmYMTFHSQList: TfrmYMTFHSQList
|
|||
ImageIndex = 1
|
||||
OnClick = TBAddClick
|
||||
end
|
||||
object TBEdit: TToolButton
|
||||
object TbAdd2: TToolButton
|
||||
Left = 158
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686
|
||||
ImageIndex = 2
|
||||
OnClick = TbAdd2Click
|
||||
end
|
||||
object TBEdit: TToolButton
|
||||
Left = 237
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 11
|
||||
OnClick = TBEditClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 237
|
||||
Left = 316
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25209#37327#20462#25913
|
||||
|
|
@ -71,7 +79,7 @@ object frmYMTFHSQList: TfrmYMTFHSQList
|
|||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 356
|
||||
Left = 435
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26597#30475
|
||||
|
|
@ -79,7 +87,7 @@ object frmYMTFHSQList: TfrmYMTFHSQList
|
|||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 435
|
||||
Left = 514
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
|
|
@ -87,7 +95,7 @@ object frmYMTFHSQList: TfrmYMTFHSQList
|
|||
OnClick = TBDelClick
|
||||
end
|
||||
object tchk: TToolButton
|
||||
Left = 514
|
||||
Left = 593
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23457#26680
|
||||
|
|
@ -95,7 +103,7 @@ object frmYMTFHSQList: TfrmYMTFHSQList
|
|||
OnClick = tchkClick
|
||||
end
|
||||
object Tnochk: TToolButton
|
||||
Left = 593
|
||||
Left = 672
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25764#38144#23457#26680
|
||||
|
|
@ -103,7 +111,7 @@ object frmYMTFHSQList: TfrmYMTFHSQList
|
|||
OnClick = TnochkClick
|
||||
end
|
||||
object TBPrint: TToolButton
|
||||
Left = 712
|
||||
Left = 791
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25171#21360
|
||||
|
|
@ -111,7 +119,7 @@ object frmYMTFHSQList: TfrmYMTFHSQList
|
|||
OnClick = TBPrintClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 791
|
||||
Left = 870
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
|
|
@ -121,9 +129,9 @@ object frmYMTFHSQList: TfrmYMTFHSQList
|
|||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 128
|
||||
Top = 108
|
||||
Width = 1300
|
||||
Height = 194
|
||||
Height = 282
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
|
|
@ -373,88 +381,88 @@ object frmYMTFHSQList: TfrmYMTFHSQList
|
|||
Left = 0
|
||||
Top = 32
|
||||
Width = 1300
|
||||
Height = 96
|
||||
Height = 76
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 29
|
||||
Top = 19
|
||||
Width = 92
|
||||
Height = 22
|
||||
Left = 23
|
||||
Top = 15
|
||||
Width = 80
|
||||
Height = 19
|
||||
Caption = #30003#35831#26085#26399
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 343
|
||||
Top = 19
|
||||
Width = 92
|
||||
Height = 22
|
||||
Left = 274
|
||||
Top = 15
|
||||
Width = 80
|
||||
Height = 19
|
||||
Caption = #25910#36135#21333#20301
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 365
|
||||
Top = 56
|
||||
Width = 69
|
||||
Height = 22
|
||||
Left = 292
|
||||
Top = 45
|
||||
Width = 60
|
||||
Height = 19
|
||||
Caption = #19994#21153#21592
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 106
|
||||
Top = 56
|
||||
Width = 12
|
||||
Height = 22
|
||||
Left = 85
|
||||
Top = 45
|
||||
Width = 11
|
||||
Height = 19
|
||||
Caption = '-'
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 586
|
||||
Top = 19
|
||||
Width = 92
|
||||
Height = 22
|
||||
Left = 469
|
||||
Top = 15
|
||||
Width = 80
|
||||
Height = 19
|
||||
Caption = #23457#26680#29366#24577
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 126
|
||||
Top = 15
|
||||
Width = 156
|
||||
Height = 30
|
||||
Left = 101
|
||||
Top = 12
|
||||
Width = 125
|
||||
Height = 27
|
||||
Date = 40675.464742650460000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464742650460000000
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
|
|
@ -463,16 +471,16 @@ object frmYMTFHSQList: TfrmYMTFHSQList
|
|||
OnChange = BegDateChange
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 126
|
||||
Top = 52
|
||||
Width = 157
|
||||
Height = 30
|
||||
Left = 101
|
||||
Top = 42
|
||||
Width = 125
|
||||
Height = 27
|
||||
Date = 40675.464761099540000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464761099540000000
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
|
|
@ -482,13 +490,13 @@ object frmYMTFHSQList: TfrmYMTFHSQList
|
|||
end
|
||||
object SHDanWei: TEdit
|
||||
Tag = 2
|
||||
Left = 435
|
||||
Top = 17
|
||||
Width = 123
|
||||
Height = 25
|
||||
Left = 363
|
||||
Top = 11
|
||||
Width = 98
|
||||
Height = 27
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
|
|
@ -498,13 +506,13 @@ object frmYMTFHSQList: TfrmYMTFHSQList
|
|||
end
|
||||
object Salesman: TEdit
|
||||
Tag = 2
|
||||
Left = 435
|
||||
Top = 54
|
||||
Width = 120
|
||||
Height = 25
|
||||
Left = 363
|
||||
Top = 40
|
||||
Width = 98
|
||||
Height = 27
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
|
|
@ -514,16 +522,16 @@ object frmYMTFHSQList: TfrmYMTFHSQList
|
|||
end
|
||||
object ComboBox1: TComboBox
|
||||
Tag = 7
|
||||
Left = 679
|
||||
Top = 15
|
||||
Width = 126
|
||||
Height = 30
|
||||
Left = 555
|
||||
Top = 10
|
||||
Width = 101
|
||||
Height = 27
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ItemHeight = 22
|
||||
ItemHeight = 19
|
||||
ItemIndex = 0
|
||||
ParentFont = False
|
||||
TabOrder = 4
|
||||
|
|
@ -536,7 +544,7 @@ object frmYMTFHSQList: TfrmYMTFHSQList
|
|||
end
|
||||
object cxSplitter1: TcxSplitter
|
||||
Left = 0
|
||||
Top = 322
|
||||
Top = 390
|
||||
Width = 1300
|
||||
Height = 8
|
||||
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||
|
|
@ -545,9 +553,9 @@ object frmYMTFHSQList: TfrmYMTFHSQList
|
|||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 330
|
||||
Top = 398
|
||||
Width = 1300
|
||||
Height = 312
|
||||
Height = 250
|
||||
Align = alBottom
|
||||
TabOrder = 4
|
||||
object Tv2: TcxGridDBTableView
|
||||
|
|
@ -657,11 +665,18 @@ object frmYMTFHSQList: TfrmYMTFHSQList
|
|||
Width = 105
|
||||
end
|
||||
object v2Column3: TcxGridDBColumn
|
||||
Caption = #21457#36135#31859#25968
|
||||
Caption = #21457#36135#38271#24230
|
||||
DataBinding.FieldName = 'FHMQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 126
|
||||
end
|
||||
object Tv2Column1: TcxGridDBColumn
|
||||
Caption = #21457#36135#37325#37327
|
||||
DataBinding.FieldName = 'FHKgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 126
|
||||
end
|
||||
object v2Column4: TcxGridDBColumn
|
||||
Caption = #36153#29992#21517#31216
|
||||
DataBinding.FieldName = 'FeeName'
|
||||
|
|
@ -680,52 +695,52 @@ object frmYMTFHSQList: TfrmYMTFHSQList
|
|||
end
|
||||
end
|
||||
object Panel3: TPanel
|
||||
Left = 610
|
||||
Top = 235
|
||||
Width = 293
|
||||
Height = 121
|
||||
Left = 488
|
||||
Top = 188
|
||||
Width = 234
|
||||
Height = 97
|
||||
Color = clSkyBlue
|
||||
TabOrder = 5
|
||||
Visible = False
|
||||
object Label25: TLabel
|
||||
Left = 30
|
||||
Top = 15
|
||||
Width = 60
|
||||
Height = 15
|
||||
Left = 24
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20986#24211#31867#22411
|
||||
end
|
||||
object btnChk: TButton
|
||||
Left = 35
|
||||
Top = 71
|
||||
Width = 75
|
||||
Height = 32
|
||||
Left = 28
|
||||
Top = 57
|
||||
Width = 60
|
||||
Height = 25
|
||||
Caption = #30830#35748
|
||||
TabOrder = 0
|
||||
OnClick = btnChkClick
|
||||
end
|
||||
object Button3: TButton
|
||||
Left = 200
|
||||
Top = 71
|
||||
Width = 75
|
||||
Height = 32
|
||||
Left = 160
|
||||
Top = 57
|
||||
Width = 60
|
||||
Height = 25
|
||||
Caption = #20851#38381
|
||||
TabOrder = 1
|
||||
OnClick = Button3Click
|
||||
end
|
||||
object CRType: TComboBox
|
||||
Tag = 1
|
||||
Left = 99
|
||||
Top = 10
|
||||
Width = 174
|
||||
Height = 30
|
||||
Left = 79
|
||||
Top = 8
|
||||
Width = 139
|
||||
Height = 27
|
||||
Style = csDropDownList
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ItemHeight = 22
|
||||
ItemHeight = 19
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
Items.Strings = (
|
||||
|
|
@ -882,7 +897,7 @@ object frmYMTFHSQList: TfrmYMTFHSQList
|
|||
object cxStyleRepository1: TcxStyleRepository
|
||||
Left = 636
|
||||
Top = 337
|
||||
PixelsPerInch = 120
|
||||
PixelsPerInch = 96
|
||||
object cxStyle1: TcxStyle
|
||||
AssignedValues = [svFont]
|
||||
Font.Charset = ANSI_CHARSET
|
||||
|
|
|
|||
|
|
@ -110,6 +110,8 @@ type
|
|||
CRType: TComboBox;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
TbAdd2: TToolButton;
|
||||
Tv2Column1: TcxGridDBColumn;
|
||||
//RMllPDFExport1: TRMllPDFExport;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
|
|
@ -133,6 +135,7 @@ type
|
|||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure Button3Click(Sender: TObject);
|
||||
procedure btnChkClick(Sender: TObject);
|
||||
procedure TbAdd2Click(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
procedure InitSubGrid();
|
||||
|
|
@ -152,7 +155,7 @@ var
|
|||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_YMTFHSQInPut, U_Fun, U_ZDYHelp, U_LabelPrintFun;
|
||||
U_DataLink, U_YMTFHSQInPut, U_Fun, U_ZDYHelp, U_LabelPrintFun, U_YMTFHSQInPut2;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
|
@ -263,6 +266,15 @@ begin
|
|||
sql.Add(' and filltime>=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.Date)) + '''');
|
||||
sql.Add(' and filltime<''' + Trim(FormatDateTime('yyyy-MM-dd', EndDate.Date + 1)) + '''');
|
||||
|
||||
if Trim(Self.Caption) = '销售发货申请' then
|
||||
begin
|
||||
sql.Add(' and CRType in (''销售内销'',''销售外销'')');
|
||||
end
|
||||
else if Trim(Self.Caption) = '加工发货登记' then
|
||||
begin
|
||||
sql.Add(' and CRType in (''加工出库'',''加工内销'',''加工外销'')');
|
||||
end;
|
||||
|
||||
if ComboBox1.Text = '未审核' then
|
||||
begin
|
||||
SQL.Add(' and isnull(A.Chker,'''')='''' ');
|
||||
|
|
@ -295,7 +307,16 @@ begin
|
|||
|
||||
EndDate.DateTime := SGetServerDate10(ADOQueryTemp);
|
||||
BegDate.DateTime := EndDate.DateTime;
|
||||
InitGrid();
|
||||
if Trim(Self.Caption) = '销售发货申请' then
|
||||
begin
|
||||
TBAdd.Visible := True;
|
||||
TBAdd2.Visible := False;
|
||||
end
|
||||
else if Trim(Self.Caption) = '加工发货登记' then
|
||||
begin
|
||||
TBAdd2.Visible := True;
|
||||
TBAdd.Visible := False;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
|
|
@ -329,6 +350,9 @@ begin
|
|||
Application.MessageBox('已生成应收账款不能修改数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if Trim(Self.Caption) = '销售发货申请' then
|
||||
begin
|
||||
try
|
||||
frmFHSQInPut := TfrmFHSQInPut.Create(Application);
|
||||
with frmFHSQInPut do
|
||||
|
|
@ -344,6 +368,26 @@ begin
|
|||
finally
|
||||
frmFHSQInPut.Free;
|
||||
end;
|
||||
end
|
||||
else if Trim(Self.Caption) = '加工发货登记' then
|
||||
begin
|
||||
try
|
||||
frmFHSQInPut2 := TfrmFHSQInPut2.Create(Application);
|
||||
with frmFHSQInPut2 do
|
||||
begin
|
||||
PState := 1;
|
||||
FMainId := Trim(Self.Order_Main.fieldbyname('FSID').AsString);
|
||||
FZZType := trim(self.FZZType);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmFHSQInPut2.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmYMTFHSQList.TBDelClick(Sender: TObject);
|
||||
|
|
@ -469,6 +513,7 @@ end;
|
|||
procedure TfrmYMTFHSQList.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitForm();
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmYMTFHSQList.CheckBox1Click(Sender: TObject);
|
||||
|
|
@ -682,5 +727,25 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmYMTFHSQList.TbAdd2Click(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmFHSQInPut2 := TfrmFHSQInPut2.Create(Application);
|
||||
with frmFHSQInPut2 do
|
||||
begin
|
||||
PState := 0;
|
||||
FMainId := '';
|
||||
FZZType := trim(self.FZZType);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmFHSQInPut2.Free;
|
||||
end;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
object frmYMTJGWCList: TfrmYMTJGWCList
|
||||
Left = 433
|
||||
Top = 674
|
||||
Left = 558
|
||||
Top = 353
|
||||
Width = 1370
|
||||
Height = 750
|
||||
Caption = #21152#24037#23436#25104#22238#20179#25968#25454
|
||||
|
|
@ -236,7 +236,7 @@ object frmYMTJGWCList: TfrmYMTJGWCList
|
|||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV1Qty
|
||||
Column = TV1MQty
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
|
|
@ -353,10 +353,17 @@ object frmYMTJGWCList: TfrmYMTJGWCList
|
|||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object TV1Qty: TcxGridDBColumn
|
||||
object Tv1KgQty: TcxGridDBColumn
|
||||
Caption = #37325#37327
|
||||
DataBinding.FieldName = 'KgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 85
|
||||
end
|
||||
object TV1MQty: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #25968#37327
|
||||
DataBinding.FieldName = 'Qty'
|
||||
Caption = #38271#24230
|
||||
DataBinding.FieldName = 'MQty'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ type
|
|||
TV1SPHX: TcxGridDBColumn;
|
||||
TV1FactoryName: TcxGridDBColumn;
|
||||
TV1SPName: TcxGridDBColumn;
|
||||
TV1Qty: TcxGridDBColumn;
|
||||
TV1MQty: TcxGridDBColumn;
|
||||
cxGrid2Level1: TcxGridLevel;
|
||||
Label13: TLabel;
|
||||
MXPrtColor: TEdit;
|
||||
|
|
@ -87,6 +87,7 @@ type
|
|||
btn1: TButton;
|
||||
KuWei: TcxButtonEdit;
|
||||
Tv1KuWei: TcxGridDBColumn;
|
||||
Tv1KgQty: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
|
|
@ -377,7 +378,7 @@ begin
|
|||
with Self.CDS_Main do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('KuWei').Value := Trim(frmKuWeiList.Order_Main.fieldbyname('KWName').AsString);
|
||||
KuWei.Text := Trim(frmKuWeiList.Order_Main.fieldbyname('KWName').AsString);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ object frmYMTRKInPut: TfrmYMTRKInPut
|
|||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
|
|
@ -315,6 +317,7 @@ object frmYMTRKInPut: TfrmYMTRKInPut
|
|||
Width = 70
|
||||
end
|
||||
object Tv1Price: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'Price'
|
||||
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||
|
|
@ -577,9 +580,9 @@ object frmYMTRKInPut: TfrmYMTRKInPut
|
|||
TabOrder = 3
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 1
|
||||
Top = 1
|
||||
Top = 71
|
||||
Width = 257
|
||||
Height = 557
|
||||
Height = 487
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object TvMX: TcxGridDBTableView
|
||||
|
|
@ -629,28 +632,90 @@ object frmYMTRKInPut: TfrmYMTRKInPut
|
|||
Caption = #32534#21495
|
||||
DataBinding.FieldName = 'MXID'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 99
|
||||
end
|
||||
object TvMXMXQty: TcxGridDBColumn
|
||||
Caption = #25968#37327
|
||||
DataBinding.FieldName = 'MXQty'
|
||||
DataBinding.FieldName = 'MQty'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 80
|
||||
Width = 60
|
||||
end
|
||||
object TvMXColumn1: TcxGridDBColumn
|
||||
Caption = #37325#37327
|
||||
DataBinding.FieldName = 'KGQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
Width = 60
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = TvMX
|
||||
end
|
||||
end
|
||||
object Panel3: TPanel
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 257
|
||||
Height = 41
|
||||
Align = alTop
|
||||
TabOrder = 1
|
||||
object Label17: TLabel
|
||||
Left = 6
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #22686#34892#25968
|
||||
Layout = tlCenter
|
||||
end
|
||||
object AddNum: TEdit
|
||||
Left = 47
|
||||
Top = 10
|
||||
Width = 41
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
OnKeyPress = AddNumKeyPress
|
||||
end
|
||||
object BtnQuicklyAdd: TButton
|
||||
Left = 98
|
||||
Top = 4
|
||||
Width = 75
|
||||
Height = 30
|
||||
Caption = #24555#36895#22686#34892
|
||||
TabOrder = 1
|
||||
OnClick = BtnQuicklyAddClick
|
||||
end
|
||||
end
|
||||
object ToolBar2: TToolBar
|
||||
Left = 1
|
||||
Top = 42
|
||||
Width = 257
|
||||
Height = 29
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 71
|
||||
Caption = 'ToolBar2'
|
||||
Images = DataLink_YXYMT.ThreeImgList
|
||||
List = True
|
||||
ShowCaptions = True
|
||||
TabOrder = 2
|
||||
object TbAddRow: TToolButton
|
||||
Left = 0
|
||||
Top = 2
|
||||
AutoSize = True
|
||||
Caption = #22686#21333#34892
|
||||
ImageIndex = 12
|
||||
OnClick = TbAddRowClick
|
||||
end
|
||||
object TbDeleteRow: TToolButton
|
||||
Left = 75
|
||||
Top = 2
|
||||
AutoSize = True
|
||||
Caption = #21024#34892
|
||||
ImageIndex = 13
|
||||
OnClick = TbDeleteRowClick
|
||||
end
|
||||
end
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = CDS_Sub
|
||||
|
|
@ -700,4 +765,21 @@ object frmYMTRKInPut: TfrmYMTRKInPut
|
|||
Left = 1170
|
||||
Top = 287
|
||||
end
|
||||
object http: TIdHTTP
|
||||
MaxLineAction = maException
|
||||
ReadTimeout = 0
|
||||
AllowCookies = True
|
||||
ProxyParams.BasicAuthentication = False
|
||||
ProxyParams.ProxyPort = 0
|
||||
Request.ContentLength = -1
|
||||
Request.ContentRangeEnd = 0
|
||||
Request.ContentRangeStart = 0
|
||||
Request.ContentType = 'text/html'
|
||||
Request.Accept = 'text/html, */*'
|
||||
Request.BasicAuthentication = False
|
||||
Request.UserAgent = 'Mozilla/3.0 (compatible; Indy Library)'
|
||||
HTTPOptions = [hoForceEncodeParams]
|
||||
Left = 532
|
||||
Top = 320
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@ uses
|
|||
dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringTime, dxSkinStardust,
|
||||
dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinsDefaultPainters,
|
||||
dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue,
|
||||
dxSkinscxPCPainter, cxNavigator, cxCurrencyEdit;
|
||||
dxSkinscxPCPainter, cxNavigator, cxCurrencyEdit, IdBaseComponent, IdComponent,
|
||||
IdTCPConnection, IdTCPClient, IdHTTP;
|
||||
|
||||
type
|
||||
TfrmYMTRKInPut = class(TForm)
|
||||
|
|
@ -92,6 +93,14 @@ type
|
|||
Tv1IsTax: TcxGridDBColumn;
|
||||
Tv1Money: TcxGridDBColumn;
|
||||
Tv1Price: TcxGridDBColumn;
|
||||
Panel3: TPanel;
|
||||
Label17: TLabel;
|
||||
AddNum: TEdit;
|
||||
BtnQuicklyAdd: TButton;
|
||||
ToolBar2: TToolBar;
|
||||
TbAddRow: TToolButton;
|
||||
TbDeleteRow: TToolButton;
|
||||
http: TIdHTTP;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBAddClick(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
|
|
@ -116,6 +125,12 @@ type
|
|||
procedure v1Column21PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||
procedure Tv1PricePropertiesEditValueChanged(Sender: TObject);
|
||||
procedure Tv1PriceTypePropertiesEditValueChanged(Sender: TObject);
|
||||
procedure BtnQuicklyAddClick(Sender: TObject);
|
||||
procedure TbAddRowClick(Sender: TObject);
|
||||
procedure TbDeleteRowClick(Sender: TObject);
|
||||
procedure AddNumKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
function SaveCKData(): Boolean;
|
||||
|
|
@ -123,10 +138,12 @@ type
|
|||
procedure InitGrid();
|
||||
procedure AddRows();
|
||||
function YFData(): Boolean;
|
||||
function BatchStockIn(MXIDs: string; UserID: string): Boolean;
|
||||
public
|
||||
{ Public declarations }
|
||||
FBCId: string;
|
||||
PState, CopyInt: Integer;
|
||||
FSelectedSPIDs: TStringList; // 用于保存所有选中的SPID
|
||||
end;
|
||||
|
||||
var
|
||||
|
|
@ -135,9 +152,85 @@ var
|
|||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_ZDYHelp, U_ZdyAttachGYS, U_MLMangeYHSel, U_ZdyAttachKH,U_KuWeiList;
|
||||
U_DataLink, U_RTFun, U_ZDYHelp, U_ZdyAttachGYS, U_MLMangeYHSel, U_ZdyAttachKH,
|
||||
U_KuWeiList, superobject;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
function TfrmYMTRKInPut.BatchStockIn(MXIDs: string; UserID: string): Boolean;
|
||||
var
|
||||
IdHttp: TIdHTTP;
|
||||
Url, ResponseStr: string;
|
||||
ResponseStream: TStringStream;
|
||||
vJson1: ISuperObject;
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
// 参数验证
|
||||
if Trim(MXIDs) = '' then
|
||||
begin
|
||||
ShowMessage('MXID不能为空');
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if Trim(UserID) = '' then
|
||||
begin
|
||||
ShowMessage('用户ID不能为空');
|
||||
Exit;
|
||||
end;
|
||||
|
||||
IdHttp := TIdHTTP.Create(nil);
|
||||
ResponseStream := TStringStream.Create('');
|
||||
try
|
||||
try
|
||||
// GET请求 - 不需要设置ContentType
|
||||
// 参数直接放在URL中
|
||||
// 接口URL(参数编码在URL中)
|
||||
Url := 'http://www.rightsoft.top/YunXiang/api/YMTCK/batchStockIn?' + 'MXID=' + Trim(MXIDs) + '&userid=' + Trim(UserID);
|
||||
// ShowMessage(Url);
|
||||
// 发送GET请求
|
||||
IdHttp.Get(Url, ResponseStream);
|
||||
|
||||
// 获取响应内容
|
||||
ResponseStr := ResponseStream.DataString;
|
||||
|
||||
// 解析JSON响应
|
||||
vJson1 := SO(ResponseStr);
|
||||
// ShowMessage(ResponseStr);
|
||||
if (vJson1.O['code'] <> nil) then
|
||||
begin
|
||||
if (vJson1.O['code'].AsInteger = 10000) then
|
||||
begin
|
||||
Result := True;
|
||||
ShowMessage('批量入库成功!');
|
||||
end
|
||||
else
|
||||
begin
|
||||
// 获取错误信息
|
||||
if vJson1.O['message'] <> nil then
|
||||
ShowMessage('批量入库失败: ' + vJson1.O['message'].AsString)
|
||||
else
|
||||
ShowMessage('批量入库失败,未知错误');
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
ShowMessage('接口返回格式错误');
|
||||
end;
|
||||
|
||||
except
|
||||
on e: Exception do
|
||||
begin
|
||||
ShowMessage('网络请求异常: ' + e.Message);
|
||||
end;
|
||||
end;
|
||||
|
||||
finally
|
||||
IdHttp.Free;
|
||||
ResponseStream.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TfrmYMTRKInPut.YFData(): Boolean;
|
||||
var
|
||||
CRID, OrdMainId, YFID, FComTaiTou, FCRID, FFactoryName, FFactoryNo: string;
|
||||
|
|
@ -311,17 +404,43 @@ begin
|
|||
end;
|
||||
|
||||
procedure TfrmYMTRKInPut.InitMXGrid(SPID: string);
|
||||
var
|
||||
FilterSPID: string;
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
if not Assigned(CDS_MX) then
|
||||
Exit;
|
||||
|
||||
try
|
||||
CDS_MX.DisableControls;
|
||||
try
|
||||
// 清除现有过滤器
|
||||
CDS_MX.Filtered := False;
|
||||
CDS_MX.Filter := '';
|
||||
|
||||
// 从CDS_Sub获取SPID并设置过滤条件
|
||||
|
||||
FilterSPID := SPID;
|
||||
|
||||
if FilterSPID <> '' then
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from YMT_CK_MX where SPID=' + quotedstr(Trim(SPID)));
|
||||
sql.Add(' order by MXID');
|
||||
Open;
|
||||
CDS_MX.Filter := 'SPID = ''' + FilterSPID + '''';
|
||||
CDS_MX.Filtered := True;
|
||||
end;
|
||||
|
||||
// 可选:如果没有过滤条件,定位到第一条记录
|
||||
if not CDS_MX.Filtered then
|
||||
CDS_MX.First;
|
||||
|
||||
finally
|
||||
CDS_MX.EnableControls;
|
||||
end;
|
||||
except
|
||||
on E: Exception do
|
||||
begin
|
||||
// 可以在这里添加错误处理,比如显示消息
|
||||
MessageDlg('初始化MXGrid时出错: ' + E.Message, mtError, [mbOK], 0);
|
||||
end;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_MX);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_MX);
|
||||
end;
|
||||
|
||||
procedure TfrmYMTRKInPut.AddRows();
|
||||
|
|
@ -363,7 +482,35 @@ begin
|
|||
end;
|
||||
|
||||
procedure TfrmYMTRKInPut.InitGrid();
|
||||
var
|
||||
SPIDList: string;
|
||||
i: Integer;
|
||||
begin
|
||||
// 如果有多个选中的SPID,构建IN查询条件
|
||||
if Assigned(FSelectedSPIDs) and (FSelectedSPIDs.Count > 0) then
|
||||
begin
|
||||
SPIDList := '';
|
||||
for i := 0 to FSelectedSPIDs.Count - 1 do
|
||||
begin
|
||||
if i > 0 then
|
||||
SPIDList := SPIDList + ',';
|
||||
SPIDList := SPIDList + QuotedStr(FSelectedSPIDs[i]);
|
||||
end;
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.* ');
|
||||
sql.Add(',OrderNO=(select OrderNO from JYOrder_Main JM where JM.MainId=A.ORDMainIdRK)');
|
||||
sql.Add(' from YMT_CK_CR A');
|
||||
sql.Add(' where SPID IN (' + SPIDList + ')');
|
||||
Open;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
// 原有的单个SPID查询逻辑
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
|
|
@ -374,12 +521,19 @@ begin
|
|||
sql.Add(' where SPID=''' + Trim(FBCId) + '''');
|
||||
Open;
|
||||
end;
|
||||
end;
|
||||
|
||||
// 其余代码保持不变
|
||||
SCreateCDS20(ADOQueryTemp, CDS_Sub);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_Sub);
|
||||
if CDS_Sub.IsEmpty then
|
||||
Exit;
|
||||
|
||||
// 注意:这里可能需要修改,因为现在有多个SPID
|
||||
// 您需要决定如何处理多个SPID的情况
|
||||
InitMXGrid(CDS_Sub.fieldbyname('SPID').AsString);
|
||||
|
||||
// 其余代码保持不变
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
|
|
@ -388,8 +542,10 @@ begin
|
|||
sql.Add(' and CRQtyFlag=-1');
|
||||
Open;
|
||||
end;
|
||||
|
||||
if not ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
// 禁用相关列
|
||||
v1Column4.Options.Focusing := False;
|
||||
v1Column14.Options.Focusing := False;
|
||||
v2Column1.Options.Focusing := False;
|
||||
|
|
@ -402,6 +558,7 @@ begin
|
|||
end
|
||||
else
|
||||
begin
|
||||
// 启用相关列
|
||||
v1Column4.Options.Focusing := True;
|
||||
v1Column14.Options.Focusing := True;
|
||||
v2Column1.Options.Focusing := True;
|
||||
|
|
@ -412,6 +569,56 @@ begin
|
|||
v1Column11.Options.Focusing := True;
|
||||
end;
|
||||
end;
|
||||
//procedure TfrmYMTRKInPut.InitGrid();
|
||||
//begin
|
||||
// with ADOQueryTemp do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add(' select A.* ');
|
||||
// sql.Add(',OrderNO=(select OrderNO from JYOrder_Main JM where JM.MainId=A.ORDMainIdRK)');
|
||||
// sql.Add(' from YMT_CK_CR A');
|
||||
// sql.Add(' where SPID=''' + Trim(FBCId) + '''');
|
||||
// Open;
|
||||
// end;
|
||||
// SCreateCDS20(ADOQueryTemp, CDS_Sub);
|
||||
// SInitCDSData20(ADOQueryTemp, CDS_Sub);
|
||||
// if CDS_Sub.IsEmpty then
|
||||
// Exit;
|
||||
//
|
||||
// InitMXGrid(CDS_Sub.fieldbyname('SPID').AsString);
|
||||
// with ADOQueryTemp do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('select * from YMT_CK_CR where FZSPID=''' + Trim(CDS_Sub.fieldbyname('SPID').AsString) + '''');
|
||||
// sql.Add(' and CRQtyFlag=-1');
|
||||
// Open;
|
||||
// end;
|
||||
// if not ADOQueryTemp.IsEmpty then
|
||||
// begin
|
||||
// v1Column4.Options.Focusing := False;
|
||||
// v1Column14.Options.Focusing := False;
|
||||
// v2Column1.Options.Focusing := False;
|
||||
// v1Column8.Options.Focusing := False;
|
||||
// v1Column7.Options.Focusing := False;
|
||||
// v1Column1.Options.Focusing := False;
|
||||
// v1Column10.Options.Focusing := False;
|
||||
// v1Column11.Options.Focusing := False;
|
||||
// Exit;
|
||||
// end
|
||||
// else
|
||||
// begin
|
||||
// v1Column4.Options.Focusing := True;
|
||||
// v1Column14.Options.Focusing := True;
|
||||
// v2Column1.Options.Focusing := True;
|
||||
// v1Column8.Options.Focusing := True;
|
||||
// v1Column7.Options.Focusing := True;
|
||||
// v1Column1.Options.Focusing := True;
|
||||
// v1Column10.Options.Focusing := True;
|
||||
// v1Column11.Options.Focusing := True;
|
||||
// end;
|
||||
//end;
|
||||
|
||||
procedure TfrmYMTRKInPut.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
|
|
@ -458,16 +665,20 @@ end;
|
|||
|
||||
function TfrmYMTRKInPut.SaveCKData(): Boolean;
|
||||
var
|
||||
FCRID, Maxno, FFSPID: string;
|
||||
FCRID, Maxno, MaxMXno, FFSPID, FFMXID: string;
|
||||
MXIDs: string; // 用于收集需要批量入库的MXID
|
||||
begin
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
CDS_Sub.DisableControls;
|
||||
// 初始化MXIDs,每个主表项开始时清空
|
||||
MXIDs := '';
|
||||
with CDS_Sub do
|
||||
begin
|
||||
First;
|
||||
while not eof do
|
||||
begin
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
|
|
@ -476,6 +687,7 @@ begin
|
|||
open;
|
||||
end;
|
||||
FFSPID := Trim(ADOQueryTemp.fieldbyname('SPID').AsString);
|
||||
|
||||
if Trim(FFSPID) = '' then
|
||||
begin
|
||||
Maxno := Trim(CDS_Sub.fieldbyname('SPID').AsString);
|
||||
|
|
@ -503,7 +715,8 @@ begin
|
|||
begin
|
||||
Edit;
|
||||
end;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////保存主表数据
|
||||
FieldByName('SPID').Value := Trim(Maxno);
|
||||
FieldByName('FZSPID').Value := Trim(Maxno);
|
||||
FieldByName('CKName').Value := '待检布';
|
||||
|
|
@ -517,7 +730,7 @@ begin
|
|||
FieldByName('CRQtyFlag').Value := 1;
|
||||
|
||||
RTSetSaveDataCDS(ADOQueryCmd, Tv1, CDS_Sub, 'YMT_CK_CR', 2);
|
||||
YFData();
|
||||
|
||||
if Trim(FFSPID) = '' then
|
||||
FieldByName('Filler').Value := Trim(DName)
|
||||
else
|
||||
|
|
@ -530,10 +743,13 @@ begin
|
|||
begin
|
||||
FieldByName('QCOrderNo').Value := Trim(CDS_Sub.fieldbyname('OrderNo').AsString);
|
||||
end;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
Post;
|
||||
end;
|
||||
|
||||
//////////生成应付数据
|
||||
YFData();
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
|
|
@ -560,19 +776,103 @@ begin
|
|||
Exit;
|
||||
end;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
/// 保存子表
|
||||
with CDS_MX do
|
||||
begin
|
||||
DisableControls; // 禁用CDS_MX控件
|
||||
try
|
||||
CDS_MX.Filter := 'SPID = ''' + Trim(Maxno) + '''';
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
// 查询明细记录是否存在
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from YMT_CK_MX where MXID=''' + Trim(CDS_MX.fieldbyname('MXID').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
|
||||
FFMXID := Trim(ADOQueryTemp.fieldbyname('MXID').AsString);
|
||||
|
||||
if Trim(FFMXID) = '' then
|
||||
MaxMXno := Trim(CDS_MX.fieldbyname('MXID').AsString)
|
||||
else
|
||||
MaxMXno := Trim(FFMXID);
|
||||
|
||||
// 准备明细数据
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from YMT_CK_MX where MXID=''' + Trim(MaxMXno) + '''');
|
||||
Open;
|
||||
|
||||
if Trim(FFMXID) = '' then
|
||||
Append
|
||||
else
|
||||
Edit;
|
||||
|
||||
FieldByName('SPID').Value := Trim(CDS_MX.fieldbyname('SPID').AsString);
|
||||
FieldByName('MXID').Value := Trim(MaxMXno); // 确保MXID被设置
|
||||
|
||||
RTSetSaveDataCDS(ADOQueryCmd, TvMX, CDS_MX, 'YMT_CK_MX', 0);
|
||||
|
||||
if Trim(FFMXID) = '' then
|
||||
FieldByName('Filler').Value := Trim(DName)
|
||||
else
|
||||
begin
|
||||
FieldByName('EditUser').Value := Trim(DName);
|
||||
FieldByName('EditTime').Value := SGetServerDate(ADOQueryTemp);
|
||||
end;
|
||||
|
||||
Post;
|
||||
end;
|
||||
|
||||
// 检查MQty是否大于0,如果是则收集MXID
|
||||
if CDS_MX.FieldByName('MQty').AsFloat > 0 then
|
||||
begin
|
||||
if MXIDs <> '' then
|
||||
MXIDs := MXIDs + ',' + Trim(MaxMXno)
|
||||
else
|
||||
MXIDs := Trim(MaxMXno);
|
||||
end;
|
||||
|
||||
Next; // 移动到下一条记录,避免死循环
|
||||
end;
|
||||
finally
|
||||
EnableControls; // 恢复CDS_MX控件状态
|
||||
end;
|
||||
end;
|
||||
|
||||
Edit;
|
||||
FieldByName('SPID').Value := Trim(Maxno);
|
||||
Post;
|
||||
if PState = 0 then
|
||||
AddRows();
|
||||
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
CDS_Sub.EnableControls;
|
||||
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
// 如果有需要批量入库的记录,调用接口
|
||||
if MXIDs <> '' then
|
||||
begin
|
||||
if not BatchStockIn(MXIDs, Trim(DCode)) then
|
||||
begin
|
||||
// 如果接口调用失败,可以选择回滚事务
|
||||
// ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('批量入库接口调用失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
Result := True;
|
||||
except
|
||||
Result := False;
|
||||
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存异常!', '提示', 0);
|
||||
end;
|
||||
|
|
@ -592,6 +892,19 @@ begin
|
|||
ReadCxGrid('待检布入库登记', Tv1, '待检布仓库');
|
||||
InitGrid();
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from YMT_CK_MX ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_MX);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_MX);
|
||||
if PState = 0 then
|
||||
InitMXGrid(' ')
|
||||
else
|
||||
InitMXGrid(Trim(CDS_Sub.fieldbyname('SPID').AsString));
|
||||
end;
|
||||
|
||||
procedure TfrmYMTRKInPut.TBDelClick(Sender: TObject);
|
||||
|
|
@ -649,16 +962,18 @@ begin
|
|||
// Application.MessageBox('入库时间不能为空!', '提示', 0);
|
||||
// Exit;
|
||||
// end;
|
||||
// if CDS_Sub.Locate('CRType', null, []) = True then
|
||||
// begin
|
||||
// Application.MessageBox('入库类型不能为空!', '提示', 0);
|
||||
// Exit;
|
||||
// end;
|
||||
// if CDS_Sub.Locate('SPName', null, []) = True then
|
||||
// begin
|
||||
// Application.MessageBox('品名不能为空!', '提示', 0);
|
||||
// Exit;
|
||||
// end;
|
||||
|
||||
if CDS_Sub.Locate('CRType', null, []) = True then
|
||||
begin
|
||||
Application.MessageBox('入库类型不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_Sub.Locate('SPName', null, []) = True then
|
||||
begin
|
||||
Application.MessageBox('品名不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
// if CDS_Sub.Locate('OrderNo', null, []) = True then
|
||||
// begin
|
||||
// Application.MessageBox('订单号不能为空!', '提示', 0);
|
||||
|
|
@ -669,14 +984,16 @@ begin
|
|||
// Application.MessageBox('存放工厂不能为空!', '提示', 0);
|
||||
// Exit;
|
||||
// end;
|
||||
// if trim(CDS_Sub.fieldbyname('CRType').AsString) <> '客户退货' then
|
||||
// begin
|
||||
// if CDS_Sub.Locate('FactoryName', null, []) = True then
|
||||
// begin
|
||||
// Application.MessageBox('加工厂不能为空!', '提示', 0);
|
||||
// Exit;
|
||||
// end;
|
||||
// end;
|
||||
if (trim(CDS_Sub.fieldbyname('CRType').AsString) <> '期初入库') and (trim(CDS_Sub.fieldbyname('CRType').AsString) <> '客户退货') then
|
||||
begin
|
||||
if CDS_Sub.Locate('FactoryName', null, []) = True then
|
||||
begin
|
||||
Application.MessageBox('供应商不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
// if CDS_Sub.Locate('PiQty', null, []) = True then
|
||||
// begin
|
||||
// Application.MessageBox('匹数不能为空!', '提示', 0);
|
||||
|
|
@ -1082,5 +1399,151 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmYMTRKInPut.BtnQuicklyAddClick(Sender: TObject);
|
||||
var
|
||||
Num, i: Integer;
|
||||
MaxNo, MMXID, SPID: string;
|
||||
begin
|
||||
Num := StrToInt(Trim(AddNum.Text));
|
||||
SPID := Trim(CDS_Sub.fieldbyname('SPID').AsString);
|
||||
if SPID = '' then
|
||||
Exit;
|
||||
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
for i := 1 to Num do
|
||||
begin
|
||||
if GetLSNo(ADOQueryTemp, MaxNo, 'MCM', 'YMT_CK_MX', 3, 1) = False then
|
||||
begin
|
||||
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
MMXID := Trim(MaxNo);
|
||||
with CDS_MX do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('MXID').Value := MMXID;
|
||||
FieldByName('SPID').Value := SPID;
|
||||
FieldByName('MQty').Value := '0';
|
||||
FieldByName('KGQty').Value := '0';
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('添加失败!', '提示', 0);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmYMTRKInPut.TbAddRowClick(Sender: TObject);
|
||||
var
|
||||
MaxNo, MMXID, SPID: string;
|
||||
begin
|
||||
SPID := Trim(CDS_Sub.fieldbyname('SPID').AsString);
|
||||
if SPID = '' then
|
||||
Exit;
|
||||
if GetLSNo(ADOQueryTemp, MaxNo, 'MCM', 'YMT_CK_MX', 3, 1) = False then
|
||||
begin
|
||||
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
MMXID := Trim(MaxNo);
|
||||
|
||||
with CDS_MX do
|
||||
begin
|
||||
if IsEmpty = False then
|
||||
begin
|
||||
Append;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
end;
|
||||
FieldByName('MXID').Value := MMXID;
|
||||
FieldByName('SPID').Value := SPID;
|
||||
FieldByName('MQty').Value := '0';
|
||||
FieldByName('KGQty').Value := '0';
|
||||
Post;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmYMTRKInPut.TbDeleteRowClick(Sender: TObject);
|
||||
var
|
||||
Bookmark: TBookmark;
|
||||
begin
|
||||
if CDS_MX.IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('当前没有可删除的记录!', '提示', MB_ICONWARNING);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if Trim(CDS_MX.fieldbyname('MXID').AsString) <> '' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from YMT_FHSQ_Sub where MXID=''' + Trim(CDS_MX.fieldbyname('MXID').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty = False then
|
||||
begin
|
||||
Application.MessageBox('已有出库申请记录,不能删除!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
if Application.MessageBox('确定要删除当前行吗?', '确认删除', MB_ICONQUESTION + MB_YESNO) <> IDYES then
|
||||
Exit;
|
||||
|
||||
// 记录当前行,删除后尝试回到附近位置
|
||||
Bookmark := CDS_MX.GetBookmark;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('delete YMT_CK_MX where MXID=' + quotedstr(Trim(CDS_MX.FieldByName('MXID').AsString)));
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('delete YMT_CK_CR where FromMXID=' + quotedstr(Trim(CDS_MX.FieldByName('MXID').AsString)));
|
||||
ExecSQL;
|
||||
end;
|
||||
try
|
||||
CDS_MX.Delete;
|
||||
finally
|
||||
if CDS_MX.BookmarkValid(Bookmark) then
|
||||
CDS_MX.GotoBookmark(Bookmark);
|
||||
CDS_MX.FreeBookmark(Bookmark);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmYMTRKInPut.AddNumKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key = #13 then
|
||||
BtnQuicklyAdd.Click;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmYMTRKInPut.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
if Assigned(FSelectedSPIDs) then
|
||||
FSelectedSPIDs.Free;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure TfrmYMTRKInPut.FormCreate(Sender: TObject);
|
||||
begin
|
||||
FSelectedSPIDs := TStringList.Create;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
object frmYMTRKList: TfrmYMTRKList
|
||||
Left = 267
|
||||
Top = 100
|
||||
Left = 206
|
||||
Top = 367
|
||||
Width = 1470
|
||||
Height = 823
|
||||
Caption = #38754#26009#22238#20179#30331#35760
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
|
|
@ -15,8 +15,8 @@ object frmYMTRKList: TfrmYMTRKList
|
|||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
|
|
@ -123,118 +123,118 @@ object frmYMTRKList: TfrmYMTRKList
|
|||
Left = 0
|
||||
Top = 33
|
||||
Width = 1462
|
||||
Height = 90
|
||||
Height = 72
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 35
|
||||
Top = 15
|
||||
Width = 60
|
||||
Height = 15
|
||||
Left = 28
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #26597#35810#26102#38388
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 80
|
||||
Top = 45
|
||||
Width = 15
|
||||
Height = 15
|
||||
Left = 64
|
||||
Top = 36
|
||||
Width = 12
|
||||
Height = 12
|
||||
Caption = #33267
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 398
|
||||
Top = 15
|
||||
Width = 30
|
||||
Height = 15
|
||||
Left = 318
|
||||
Top = 12
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #21697#21517
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 544
|
||||
Top = 15
|
||||
Width = 45
|
||||
Height = 15
|
||||
Left = 435
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #21152#24037#21378
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 223
|
||||
Top = 15
|
||||
Width = 60
|
||||
Height = 15
|
||||
Left = 178
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20837#24211#21333#21495
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 398
|
||||
Top = 45
|
||||
Width = 30
|
||||
Height = 15
|
||||
Left = 318
|
||||
Top = 36
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #35268#26684
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 544
|
||||
Top = 45
|
||||
Width = 46
|
||||
Height = 15
|
||||
Left = 435
|
||||
Top = 36
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #25104' '#20998
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 701
|
||||
Top = 45
|
||||
Width = 61
|
||||
Height = 15
|
||||
Left = 561
|
||||
Top = 36
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #35746' '#21333' '#21495
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 701
|
||||
Top = 15
|
||||
Width = 60
|
||||
Height = 15
|
||||
Left = 561
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #23384#25918#24037#21378
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 223
|
||||
Top = 45
|
||||
Width = 60
|
||||
Height = 15
|
||||
Left = 178
|
||||
Top = 36
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20837#24211#31867#22411
|
||||
end
|
||||
object Label11: TLabel
|
||||
Left = 1029
|
||||
Top = 46
|
||||
Width = 60
|
||||
Height = 15
|
||||
Left = 823
|
||||
Top = 37
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #26579#21378#32568#21495
|
||||
end
|
||||
object Label13: TLabel
|
||||
Left = 880
|
||||
Top = 15
|
||||
Width = 30
|
||||
Height = 15
|
||||
Left = 704
|
||||
Top = 12
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #39068#33394
|
||||
end
|
||||
object Label15: TLabel
|
||||
Left = 880
|
||||
Top = 46
|
||||
Width = 30
|
||||
Height = 15
|
||||
Left = 704
|
||||
Top = 37
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #33457#22411
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 96
|
||||
Top = 11
|
||||
Width = 109
|
||||
Height = 23
|
||||
Left = 77
|
||||
Top = 9
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 0
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 96
|
||||
Top = 40
|
||||
Width = 109
|
||||
Height = 23
|
||||
Left = 77
|
||||
Top = 32
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
|
|
@ -242,9 +242,9 @@ object frmYMTRKList: TfrmYMTRKList
|
|||
end
|
||||
object SPName: TEdit
|
||||
Tag = 2
|
||||
Left = 431
|
||||
Top = 11
|
||||
Width = 100
|
||||
Left = 345
|
||||
Top = 9
|
||||
Width = 80
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 2
|
||||
|
|
@ -252,9 +252,9 @@ object frmYMTRKList: TfrmYMTRKList
|
|||
end
|
||||
object FactoryName: TEdit
|
||||
Tag = 2
|
||||
Left = 590
|
||||
Top = 11
|
||||
Width = 100
|
||||
Left = 472
|
||||
Top = 9
|
||||
Width = 80
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 3
|
||||
|
|
@ -262,9 +262,9 @@ object frmYMTRKList: TfrmYMTRKList
|
|||
end
|
||||
object SPID: TEdit
|
||||
Tag = 2
|
||||
Left = 285
|
||||
Top = 11
|
||||
Width = 100
|
||||
Left = 228
|
||||
Top = 9
|
||||
Width = 80
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 1
|
||||
|
|
@ -272,9 +272,9 @@ object frmYMTRKList: TfrmYMTRKList
|
|||
end
|
||||
object SPSpec: TEdit
|
||||
Tag = 2
|
||||
Left = 431
|
||||
Top = 40
|
||||
Width = 100
|
||||
Left = 345
|
||||
Top = 32
|
||||
Width = 80
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 9
|
||||
|
|
@ -282,9 +282,9 @@ object frmYMTRKList: TfrmYMTRKList
|
|||
end
|
||||
object SPCF: TEdit
|
||||
Tag = 2
|
||||
Left = 590
|
||||
Top = 40
|
||||
Width = 100
|
||||
Left = 472
|
||||
Top = 32
|
||||
Width = 80
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 10
|
||||
|
|
@ -292,9 +292,9 @@ object frmYMTRKList: TfrmYMTRKList
|
|||
end
|
||||
object OrderNo: TEdit
|
||||
Tag = 2
|
||||
Left = 765
|
||||
Top = 41
|
||||
Width = 100
|
||||
Left = 612
|
||||
Top = 33
|
||||
Width = 80
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 11
|
||||
|
|
@ -302,9 +302,9 @@ object frmYMTRKList: TfrmYMTRKList
|
|||
end
|
||||
object ToFactoryName: TEdit
|
||||
Tag = 2
|
||||
Left = 765
|
||||
Top = 11
|
||||
Width = 100
|
||||
Left = 612
|
||||
Top = 9
|
||||
Width = 80
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 4
|
||||
|
|
@ -312,13 +312,13 @@ object frmYMTRKList: TfrmYMTRKList
|
|||
end
|
||||
object CRType: TComboBox
|
||||
Tag = 2
|
||||
Left = 285
|
||||
Top = 40
|
||||
Width = 100
|
||||
Height = 23
|
||||
Left = 228
|
||||
Top = 32
|
||||
Width = 80
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ItemHeight = 15
|
||||
ItemHeight = 12
|
||||
TabOrder = 8
|
||||
OnChange = TBFindClick
|
||||
Items.Strings = (
|
||||
|
|
@ -333,9 +333,9 @@ object frmYMTRKList: TfrmYMTRKList
|
|||
end
|
||||
object RCGangNo: TEdit
|
||||
Tag = 2
|
||||
Left = 1093
|
||||
Top = 43
|
||||
Width = 100
|
||||
Left = 874
|
||||
Top = 34
|
||||
Width = 80
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 12
|
||||
|
|
@ -343,9 +343,9 @@ object frmYMTRKList: TfrmYMTRKList
|
|||
end
|
||||
object SPColor: TEdit
|
||||
Tag = 2
|
||||
Left = 911
|
||||
Top = 11
|
||||
Width = 100
|
||||
Left = 729
|
||||
Top = 9
|
||||
Width = 80
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 5
|
||||
|
|
@ -353,9 +353,9 @@ object frmYMTRKList: TfrmYMTRKList
|
|||
end
|
||||
object SPHX: TEdit
|
||||
Tag = 2
|
||||
Left = 911
|
||||
Top = 43
|
||||
Width = 100
|
||||
Left = 729
|
||||
Top = 34
|
||||
Width = 80
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 6
|
||||
|
|
@ -364,9 +364,9 @@ object frmYMTRKList: TfrmYMTRKList
|
|||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 123
|
||||
Width = 1107
|
||||
Height = 663
|
||||
Top = 105
|
||||
Width = 1178
|
||||
Height = 687
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
|
|
@ -660,21 +660,22 @@ object frmYMTRKList: TfrmYMTRKList
|
|||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 1107
|
||||
Top = 123
|
||||
Width = 355
|
||||
Height = 663
|
||||
Left = 1178
|
||||
Top = 105
|
||||
Width = 284
|
||||
Height = 687
|
||||
Align = alRight
|
||||
Caption = 'Panel2'
|
||||
TabOrder = 3
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 1
|
||||
Top = 82
|
||||
Width = 353
|
||||
Height = 580
|
||||
Top = 71
|
||||
Width = 282
|
||||
Height = 615
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object TvMX: TcxGridDBTableView
|
||||
PopupMenu = pm1
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
|
|
@ -728,6 +729,7 @@ object frmYMTRKList: TfrmYMTRKList
|
|||
Caption = #32534#21495
|
||||
DataBinding.FieldName = 'MXID'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object TvMXMXQty: TcxGridDBColumn
|
||||
|
|
@ -735,15 +737,15 @@ object frmYMTRKList: TfrmYMTRKList
|
|||
DataBinding.FieldName = 'MQty'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 80
|
||||
Width = 63
|
||||
end
|
||||
object TvMXColumn1: TcxGridDBColumn
|
||||
Caption = #37325#37327
|
||||
DataBinding.FieldName = 'KgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
Options.Editing = False
|
||||
Width = 63
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
|
|
@ -752,16 +754,17 @@ object frmYMTRKList: TfrmYMTRKList
|
|||
end
|
||||
object ToolBar2: TToolBar
|
||||
Left = 1
|
||||
Top = 53
|
||||
Width = 353
|
||||
Top = 42
|
||||
Width = 282
|
||||
Height = 29
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 80
|
||||
ButtonWidth = 71
|
||||
Caption = 'ToolBar2'
|
||||
Images = DataLink_YXYMT.ThreeImgList
|
||||
List = True
|
||||
ShowCaptions = True
|
||||
TabOrder = 1
|
||||
Visible = False
|
||||
object TbAddRow: TToolButton
|
||||
Left = 0
|
||||
Top = 2
|
||||
|
|
@ -771,7 +774,7 @@ object frmYMTRKList: TfrmYMTRKList
|
|||
OnClick = TbAddRowClick
|
||||
end
|
||||
object TbDeleteRow: TToolButton
|
||||
Left = 84
|
||||
Left = 75
|
||||
Top = 2
|
||||
AutoSize = True
|
||||
Caption = #21024#34892
|
||||
|
|
@ -782,30 +785,31 @@ object frmYMTRKList: TfrmYMTRKList
|
|||
object Panel3: TPanel
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 353
|
||||
Height = 52
|
||||
Width = 282
|
||||
Height = 41
|
||||
Align = alTop
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
object Label17: TLabel
|
||||
Left = 8
|
||||
Top = 15
|
||||
Width = 45
|
||||
Height = 15
|
||||
Left = 6
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #22686#34892#25968
|
||||
Layout = tlCenter
|
||||
end
|
||||
object AddNum: TEdit
|
||||
Left = 59
|
||||
Top = 13
|
||||
Width = 51
|
||||
Left = 47
|
||||
Top = 10
|
||||
Width = 41
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
end
|
||||
object Button1: TButton
|
||||
Left = 123
|
||||
Top = 5
|
||||
Width = 93
|
||||
Height = 38
|
||||
Left = 98
|
||||
Top = 4
|
||||
Width = 75
|
||||
Height = 30
|
||||
Caption = #24555#36895#22686#34892
|
||||
TabOrder = 1
|
||||
OnClick = Button1Click
|
||||
|
|
@ -813,41 +817,41 @@ object frmYMTRKList: TfrmYMTRKList
|
|||
end
|
||||
end
|
||||
object Panel4: TPanel
|
||||
Left = 684
|
||||
Top = 175
|
||||
Width = 293
|
||||
Height = 156
|
||||
Left = 547
|
||||
Top = 140
|
||||
Width = 235
|
||||
Height = 125
|
||||
Color = clSkyBlue
|
||||
TabOrder = 4
|
||||
Visible = False
|
||||
object Label25: TLabel
|
||||
Left = 48
|
||||
Top = 43
|
||||
Width = 30
|
||||
Height = 15
|
||||
Left = 38
|
||||
Top = 34
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #24211#20301
|
||||
end
|
||||
object btnChk: TButton
|
||||
Left = 35
|
||||
Top = 101
|
||||
Width = 75
|
||||
Height = 32
|
||||
Left = 28
|
||||
Top = 81
|
||||
Width = 60
|
||||
Height = 25
|
||||
Caption = #30830#35748
|
||||
TabOrder = 0
|
||||
OnClick = btnChkClick
|
||||
end
|
||||
object btn1: TButton
|
||||
Left = 200
|
||||
Top = 100
|
||||
Width = 75
|
||||
Height = 31
|
||||
Left = 160
|
||||
Top = 80
|
||||
Width = 60
|
||||
Height = 25
|
||||
Caption = #20851#38381
|
||||
TabOrder = 1
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object KuWei: TcxButtonEdit
|
||||
Left = 94
|
||||
Top = 34
|
||||
Left = 75
|
||||
Top = 27
|
||||
ParentFont = False
|
||||
Properties.Buttons = <
|
||||
item
|
||||
|
|
@ -857,12 +861,69 @@ object frmYMTRKList: TfrmYMTRKList
|
|||
Properties.OnButtonClick = KuWeiPropertiesButtonClick
|
||||
Style.Font.Charset = GB2312_CHARSET
|
||||
Style.Font.Color = clWindowText
|
||||
Style.Font.Height = -23
|
||||
Style.Font.Height = -19
|
||||
Style.Font.Name = #23435#20307
|
||||
Style.Font.Style = [fsBold]
|
||||
Style.IsFontAssigned = True
|
||||
TabOrder = 2
|
||||
Width = 151
|
||||
Width = 121
|
||||
end
|
||||
end
|
||||
object Panel5: TPanel
|
||||
Left = 1203
|
||||
Top = 300
|
||||
Width = 235
|
||||
Height = 141
|
||||
Color = clSkyBlue
|
||||
TabOrder = 5
|
||||
Visible = False
|
||||
object Label10: TLabel
|
||||
Left = 38
|
||||
Top = 18
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #25968#37327
|
||||
end
|
||||
object Label14: TLabel
|
||||
Left = 38
|
||||
Top = 58
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #37325#37327
|
||||
end
|
||||
object Sure: TButton
|
||||
Left = 28
|
||||
Top = 97
|
||||
Width = 60
|
||||
Height = 25
|
||||
Caption = #30830#35748
|
||||
TabOrder = 0
|
||||
OnClick = SureClick
|
||||
end
|
||||
object Quit: TButton
|
||||
Left = 160
|
||||
Top = 96
|
||||
Width = 60
|
||||
Height = 25
|
||||
Caption = #20851#38381
|
||||
TabOrder = 1
|
||||
OnClick = QuitClick
|
||||
end
|
||||
object MQty: TEdit
|
||||
Left = 72
|
||||
Top = 14
|
||||
Width = 121
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
Text = '0'
|
||||
end
|
||||
object KgQty: TEdit
|
||||
Left = 72
|
||||
Top = 54
|
||||
Width = 121
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
Text = '0'
|
||||
end
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
|
|
@ -995,4 +1056,29 @@ object frmYMTRKList: TfrmYMTRKList
|
|||
Left = 832
|
||||
Top = 316
|
||||
end
|
||||
object pm1: TPopupMenu
|
||||
Left = 676
|
||||
Top = 442
|
||||
object MenuItem1: TMenuItem
|
||||
Caption = #25286#25209
|
||||
OnClick = MenuItem1Click
|
||||
end
|
||||
end
|
||||
object http: TIdHTTP
|
||||
MaxLineAction = maException
|
||||
ReadTimeout = 0
|
||||
AllowCookies = True
|
||||
ProxyParams.BasicAuthentication = False
|
||||
ProxyParams.ProxyPort = 0
|
||||
Request.ContentLength = -1
|
||||
Request.ContentRangeEnd = 0
|
||||
Request.ContentRangeStart = 0
|
||||
Request.ContentType = 'text/html'
|
||||
Request.Accept = 'text/html, */*'
|
||||
Request.BasicAuthentication = False
|
||||
Request.UserAgent = 'Mozilla/3.0 (compatible; Indy Library)'
|
||||
HTTPOptions = [hoForceEncodeParams]
|
||||
Left = 532
|
||||
Top = 320
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ uses
|
|||
dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008, dxSkinTheAsphaltWorld,
|
||||
dxSkinsDefaultPainters, dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint,
|
||||
dxSkinXmas2008Blue, dxSkinscxPCPainter, cxNavigator, cxCurrencyEdit,
|
||||
cxMaskEdit;
|
||||
cxMaskEdit, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP;
|
||||
|
||||
type
|
||||
TfrmYMTRKList = class(TForm)
|
||||
|
|
@ -135,6 +135,16 @@ type
|
|||
Tv1Column3: TcxGridDBColumn;
|
||||
TvMXColumn1: TcxGridDBColumn;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
pm1: TPopupMenu;
|
||||
MenuItem1: TMenuItem;
|
||||
Panel5: TPanel;
|
||||
Label10: TLabel;
|
||||
Sure: TButton;
|
||||
Quit: TButton;
|
||||
Label14: TLabel;
|
||||
MQty: TEdit;
|
||||
KgQty: TEdit;
|
||||
http: TIdHTTP;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
|
|
@ -163,11 +173,16 @@ type
|
|||
procedure KuWeiPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||
procedure btnChkClick(Sender: TObject);
|
||||
procedure btn1Click(Sender: TObject);
|
||||
procedure MenuItem1Click(Sender: TObject);
|
||||
procedure SureClick(Sender: TObject);
|
||||
procedure QuitClick(Sender: TObject);
|
||||
private
|
||||
canshu1, canshu2: string;
|
||||
procedure InitGrid();
|
||||
procedure InitImage(fsubID: string);
|
||||
procedure InitMXGrid(SPID: string);
|
||||
function BatchStockIn(MXIDs: string; UserID: string): Boolean;
|
||||
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
|
|
@ -179,10 +194,84 @@ var
|
|||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_YMTRKInPut, U_ZdyAttachGYS, U_LabelPrintFun,
|
||||
U_ZDYHelp, U_KuWeiList;
|
||||
U_DataLink, U_RTFun, U_YMTRKInPut, U_ZdyAttachGYS, U_LabelPrintFun, U_ZDYHelp,
|
||||
U_KuWeiList, superobject;
|
||||
|
||||
{$R *.dfm}
|
||||
function TfrmYMTRKList.BatchStockIn(MXIDs: string; UserID: string): Boolean;
|
||||
var
|
||||
IdHttp: TIdHTTP;
|
||||
Url, ResponseStr: string;
|
||||
ResponseStream: TStringStream;
|
||||
vJson1: ISuperObject;
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
// 参数验证
|
||||
if Trim(MXIDs) = '' then
|
||||
begin
|
||||
ShowMessage('MXID不能为空');
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if Trim(UserID) = '' then
|
||||
begin
|
||||
ShowMessage('用户ID不能为空');
|
||||
Exit;
|
||||
end;
|
||||
|
||||
IdHttp := TIdHTTP.Create(nil);
|
||||
ResponseStream := TStringStream.Create('');
|
||||
try
|
||||
try
|
||||
// GET请求 - 不需要设置ContentType
|
||||
// 参数直接放在URL中
|
||||
// 接口URL(参数编码在URL中)
|
||||
Url := 'http://www.rightsoft.top/YunXiang/api/YMTCK/batchStockIn?' + 'MXID=' + Trim(MXIDs) + '&userid=' + Trim(UserID);
|
||||
// ShowMessage(Url);
|
||||
// 发送GET请求
|
||||
IdHttp.Get(Url, ResponseStream);
|
||||
|
||||
// 获取响应内容
|
||||
ResponseStr := ResponseStream.DataString;
|
||||
|
||||
// 解析JSON响应
|
||||
vJson1 := SO(ResponseStr);
|
||||
// ShowMessage(ResponseStr);
|
||||
if (vJson1.O['code'] <> nil) then
|
||||
begin
|
||||
if (vJson1.O['code'].AsInteger = 10000) then
|
||||
begin
|
||||
Result := True;
|
||||
ShowMessage('批量入库成功!');
|
||||
end
|
||||
else
|
||||
begin
|
||||
// 获取错误信息
|
||||
if vJson1.O['message'] <> nil then
|
||||
ShowMessage('批量入库失败: ' + vJson1.O['message'].AsString)
|
||||
else
|
||||
ShowMessage('批量入库失败,未知错误');
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
ShowMessage('接口返回格式错误');
|
||||
end;
|
||||
|
||||
except
|
||||
on e: Exception do
|
||||
begin
|
||||
ShowMessage('网络请求异常: ' + e.Message);
|
||||
end;
|
||||
end;
|
||||
|
||||
finally
|
||||
IdHttp.Free;
|
||||
ResponseStream.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmYMTRKList.InitMXGrid(SPID: string);
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
|
|
@ -349,6 +438,7 @@ begin
|
|||
Application.MessageBox('已有出库记录,不能删除!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
try
|
||||
|
|
@ -392,29 +482,111 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
//procedure TfrmYMTRKList.TBEditClick(Sender: TObject);
|
||||
//var
|
||||
// OldSPID: string; // 用于保存当前行的SPID
|
||||
//begin
|
||||
// if CDS_Main.IsEmpty then
|
||||
// Exit;
|
||||
//
|
||||
// if Trim(CDS_Main.fieldbyname('CRType').AsString) = '平移入库' then
|
||||
// begin
|
||||
// Application.MessageBox('平移入库的数据为自动生成,不能修改!', '提示', 0);
|
||||
// Exit;
|
||||
// end;
|
||||
// try
|
||||
// OldSPID := Trim(CDS_Main.fieldbyname('SPID').AsString);
|
||||
// frmYMTRKInPut := TfrmYMTRKInPut.Create(Application);
|
||||
// with frmYMTRKInPut do
|
||||
// begin
|
||||
// PState := 1;
|
||||
// FBCId := OldSPID;
|
||||
// TBDel.Visible := False;
|
||||
// TBAdd.Visible := False;
|
||||
// if ShowModal = 1 then
|
||||
// begin
|
||||
//
|
||||
// end;
|
||||
// end;
|
||||
// InitGrid();
|
||||
// // 重新定位到原来的行
|
||||
// if not CDS_Main.Locate('SPID', OldSPID, []) then
|
||||
// begin
|
||||
// // 如果找不到原记录(如被删除),则定位到第一条记录
|
||||
// if not CDS_Main.IsEmpty then
|
||||
// CDS_Main.First;
|
||||
// end;
|
||||
// finally
|
||||
// frmYMTRKInPut.Free;
|
||||
// end;
|
||||
//end;
|
||||
|
||||
procedure TfrmYMTRKList.TBEditClick(Sender: TObject);
|
||||
var
|
||||
OldSPID: string; // 用于保存当前行的SPID
|
||||
SelectedSPIDs: TStringList; // 用于保存所有选中的SPID
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
Exit;
|
||||
if Trim(CDS_Main.fieldbyname('CRType').AsString) = 'Æ½ÒÆÈë¿â' then
|
||||
|
||||
// 创建字符串列表保存所有选中的SPID
|
||||
SelectedSPIDs := TStringList.Create;
|
||||
try
|
||||
// 检查是否有选中的行
|
||||
if CDS_Main.Locate('SSel', True, []) = True then
|
||||
begin
|
||||
// 遍历数据集,收集所有选中的SPID
|
||||
CDS_Main.DisableControls;
|
||||
try
|
||||
CDS_Main.First;
|
||||
while not CDS_Main.Eof do
|
||||
begin
|
||||
if CDS_Main.FieldByName('SSel').AsBoolean then
|
||||
begin
|
||||
// 检查是否为平移入库
|
||||
if Trim(CDS_Main.FieldByName('CRType').AsString) = '平移入库' then
|
||||
begin
|
||||
Application.MessageBox('平移入库的数据为自动生成,不能修改!', '提示', 0);
|
||||
Exit; // 直接Exit,不需要手动释放SelectedSPIDs,finally块会处理
|
||||
end;
|
||||
SelectedSPIDs.Add(Trim(CDS_Main.FieldByName('SPID').AsString));
|
||||
end;
|
||||
CDS_Main.Next;
|
||||
end;
|
||||
finally
|
||||
CDS_Main.EnableControls;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
// 没有勾选任何行,只处理当前行
|
||||
// 检查当前行是否为平移入库
|
||||
if Trim(CDS_Main.FieldByName('CRType').AsString) = '平移入库' then
|
||||
begin
|
||||
Application.MessageBox('平移入库的数据为自动生成,不能修改!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
SelectedSPIDs.Add(Trim(CDS_Main.FieldByName('SPID').AsString));
|
||||
end;
|
||||
|
||||
// 保存当前行的SPID用于后续定位
|
||||
OldSPID := Trim(CDS_Main.FieldByName('SPID').AsString);
|
||||
|
||||
try
|
||||
OldSPID := Trim(CDS_Main.fieldbyname('SPID').AsString);
|
||||
frmYMTRKInPut := TfrmYMTRKInPut.Create(Application);
|
||||
with frmYMTRKInPut do
|
||||
begin
|
||||
PState := 1;
|
||||
FBCId := OldSPID;
|
||||
FBCId := OldSPID; // 保持原有单个SPID的兼容性
|
||||
// 传递所有选中的SPID
|
||||
|
||||
FSelectedSPIDs.Assign(SelectedSPIDs);
|
||||
|
||||
TBDel.Visible := False;
|
||||
TBAdd.Visible := False;
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
// 处理返回结果
|
||||
end;
|
||||
end;
|
||||
InitGrid();
|
||||
|
|
@ -428,6 +600,9 @@ begin
|
|||
finally
|
||||
frmYMTRKInPut.Free;
|
||||
end;
|
||||
finally
|
||||
SelectedSPIDs.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmYMTRKList.SPIDChange(Sender: TObject);
|
||||
|
|
@ -511,13 +686,6 @@ procedure TfrmYMTRKList.TbAddRowClick(Sender: TObject);
|
|||
var
|
||||
MaxNo, MMXID, SPID: string;
|
||||
begin
|
||||
// with CDS_MX do
|
||||
// begin
|
||||
// Append;
|
||||
// FieldByName('MXID').Value := '';
|
||||
// FieldByName('MXQty').Value := 0;
|
||||
// Post;
|
||||
// end;
|
||||
if GetLSNo(ADOQueryTemp, MaxNo, 'MCM', 'YMT_CK_MX', 3, 1) = False then
|
||||
begin
|
||||
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||
|
|
@ -627,7 +795,7 @@ begin
|
|||
with Self.CDS_Main do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('KuWei').Value := Trim(frmKuWeiList.Order_Main.fieldbyname('KWName').AsString);
|
||||
KuWei.Text := Trim(frmKuWeiList.Order_Main.fieldbyname('KWName').AsString);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
|
@ -678,5 +846,102 @@ begin
|
|||
Panel4.Visible := False;
|
||||
end;
|
||||
|
||||
procedure TfrmYMTRKList.MenuItem1Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_MX.IsEmpty then
|
||||
exit;
|
||||
Panel5.Visible := True;
|
||||
|
||||
end;
|
||||
|
||||
//执行拆批
|
||||
procedure TfrmYMTRKList.SureClick(Sender: TObject);
|
||||
var
|
||||
MaxNo, MMXID, SPID, MXIDs: string;
|
||||
fMQty, fKGQty: Double;
|
||||
begin
|
||||
// 开始事务
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
|
||||
try
|
||||
// 验证输入数值
|
||||
try
|
||||
fMQty := StrToFloat(Trim(MQty.Text));
|
||||
fKGQty := StrToFloat(Trim(KGQty.Text));
|
||||
except
|
||||
Application.MessageBox('请输入有效的数值!', '提示', 0);
|
||||
ADOQueryCmd.Connection.RollbackTrans; // 回滚事务
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if GetLSNo(ADOQueryTemp, MaxNo, 'MCM', 'YMT_CK_MX', 3, 1) = False then
|
||||
begin
|
||||
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||
ADOQueryCmd.Connection.RollbackTrans; // 回滚事务
|
||||
Exit;
|
||||
end;
|
||||
|
||||
MMXID := Trim(MaxNo);
|
||||
SPID := Trim(CDS_Main.fieldbyname('SPID').AsString);
|
||||
|
||||
// 增加拆出了新批
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('insert into YMT_CK_MX (MXID,SPID,MQty,KGQty,Filler)');
|
||||
sql.Add('values(' + quotedstr(MMXID));
|
||||
sql.Add(',' + quotedstr(Trim(SPID)));
|
||||
sql.Add(',' + FloatToStr(fMQty)); // 使用数值,不加引号
|
||||
sql.Add(',' + FloatToStr(fKGQty)); // 使用数值,不加引号
|
||||
sql.Add(',' + quotedstr(Trim(DName)));
|
||||
sql.Add(')');
|
||||
ExecSQL;
|
||||
end;
|
||||
|
||||
// 更新当前数量和重量
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update YMT_CK_MX SET MQty = ' + FloatToStr(CDS_MX.FieldByName('MQty').AsFloat - fMQty));
|
||||
sql.Add(', KGQty = ' + FloatToStr(CDS_MX.FieldByName('KGQty').AsFloat - fKGQty));
|
||||
sql.Add('where MXID=' + quotedstr(trim(CDS_MX.fieldbyname('MXID').AsString)));
|
||||
execsql;
|
||||
end;
|
||||
MXIDs := MMXID + ',' + trim(CDS_MX.fieldbyname('MXID').AsString);
|
||||
|
||||
// 提交事务 - 所有操作成功完成
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
|
||||
// 调用接口,将拆批数据入库
|
||||
if MXIDs <> '' then
|
||||
begin
|
||||
if not BatchStockIn(MXIDs, Trim(DCode)) then
|
||||
begin
|
||||
Application.MessageBox('批量入库接口调用失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
InitMXGrid(SPID);
|
||||
Panel5.Visible := False;
|
||||
application.MessageBox('拆批成功!', '提示信息');
|
||||
|
||||
except
|
||||
on E: Exception do
|
||||
begin
|
||||
// 回滚事务 - 发生任何异常都回滚
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox(PChar('拆批失败!错误:' + E.Message), '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmYMTRKList.QuitClick(Sender: TObject);
|
||||
begin
|
||||
Panel5.Visible := False;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
|
|
|||
799
云翔一码通/U_YMTStockList.dfm
Normal file
799
云翔一码通/U_YMTStockList.dfm
Normal file
|
|
@ -0,0 +1,799 @@
|
|||
object frmStockList: TfrmStockList
|
||||
Left = -1
|
||||
Top = 580
|
||||
Width = 1470
|
||||
Height = 823
|
||||
Caption = #24211#23384#26597#35810
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1462
|
||||
Height = 33
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 107
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_YXYMT.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object TbEditKW: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25209#37327#20462#25913#24211#20301
|
||||
ImageIndex = 11
|
||||
OnClick = TbEditKWClick
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 237
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 68
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 300
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 33
|
||||
Width = 1462
|
||||
Height = 72
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 28
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #26597#35810#26102#38388
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 64
|
||||
Top = 36
|
||||
Width = 12
|
||||
Height = 12
|
||||
Caption = #33267
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 318
|
||||
Top = 12
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #21697#21517
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 435
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #21152#24037#21378
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 178
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20837#24211#21333#21495
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 318
|
||||
Top = 36
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #35268#26684
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 435
|
||||
Top = 36
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #25104' '#20998
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 561
|
||||
Top = 36
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #35746' '#21333' '#21495
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 561
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #23384#25918#24037#21378
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 178
|
||||
Top = 36
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20837#24211#31867#22411
|
||||
end
|
||||
object Label11: TLabel
|
||||
Left = 823
|
||||
Top = 37
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #26579#21378#32568#21495
|
||||
end
|
||||
object Label13: TLabel
|
||||
Left = 704
|
||||
Top = 12
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #39068#33394
|
||||
end
|
||||
object Label15: TLabel
|
||||
Left = 704
|
||||
Top = 37
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #33457#22411
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 77
|
||||
Top = 9
|
||||
Width = 87
|
||||
Height = 20
|
||||
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
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 7
|
||||
end
|
||||
object SPName: TEdit
|
||||
Tag = 2
|
||||
Left = 345
|
||||
Top = 9
|
||||
Width = 80
|
||||
Height = 20
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
Style = csDropDownList
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ItemHeight = 12
|
||||
TabOrder = 8
|
||||
OnChange = TBFindClick
|
||||
Items.Strings = (
|
||||
''
|
||||
#21152#24037#23436#25104
|
||||
#22238#20462#23436#25104
|
||||
#26816#39564#36864#22238
|
||||
#26399#21021#20837#24211
|
||||
#23458#25143#36864#36135
|
||||
#37319#36141#20837#24211
|
||||
#27425#21697#20837#24211)
|
||||
end
|
||||
object RCGangNo: TEdit
|
||||
Tag = 2
|
||||
Left = 874
|
||||
Top = 34
|
||||
Width = 80
|
||||
Height = 20
|
||||
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
|
||||
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
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 6
|
||||
OnChange = FactoryNameChange
|
||||
end
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 105
|
||||
Width = 1462
|
||||
Height = 687
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skCount
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Format = '#,###'
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Format = '#,###'
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Format = '#,###'
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv1Column4
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.Indicator = True
|
||||
Styles.Inactive = DataLink_YXYMT.SHuangSe
|
||||
Styles.IncSearch = DataLink_YXYMT.SHuangSe
|
||||
Styles.Selection = DataLink_YXYMT.SHuangSe
|
||||
Styles.Header = DataLink_YXYMT.Default
|
||||
object Tv1SSel: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 47
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #20837#24211#21333#21495
|
||||
DataBinding.FieldName = 'SPID'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 83
|
||||
end
|
||||
object Tv1Column5: TcxGridDBColumn
|
||||
Caption = #32534#21495
|
||||
DataBinding.FieldName = 'FromMXID'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #20837#24211#26102#38388
|
||||
DataBinding.FieldName = 'CRTime'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 100
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #20837#24211#31867#22411
|
||||
DataBinding.FieldName = 'CRType'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.DropDownListStyle = lsFixedList
|
||||
Properties.Items.Strings = (
|
||||
#21152#24037#23436#25104
|
||||
#29983#20135#36864#22238)
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 83
|
||||
end
|
||||
object v1Column13: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'OrderNo'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 102
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #23458#25143
|
||||
DataBinding.FieldName = 'CustomerNoName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object v1Column14: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #20379#24212#21830
|
||||
DataBinding.FieldName = 'FactoryName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 101
|
||||
end
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'SPName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 97
|
||||
end
|
||||
object v1Column21: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'spcode'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #35268#26684
|
||||
DataBinding.FieldName = 'SPSpec'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 65
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #25104#20998
|
||||
DataBinding.FieldName = 'SPCF'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #38376#24133
|
||||
DataBinding.FieldName = 'SPMF'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #20811#37325
|
||||
DataBinding.FieldName = 'SPKZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 90
|
||||
end
|
||||
object v1Column15: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'SPColor'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 69
|
||||
end
|
||||
object v1Column17: TcxGridDBColumn
|
||||
Caption = #33457#22411#33457#21495
|
||||
DataBinding.FieldName = 'SPHX'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #23384#25918#24037#21378
|
||||
DataBinding.FieldName = 'ToFactoryName'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 84
|
||||
end
|
||||
object v1Column18: TcxGridDBColumn
|
||||
Caption = #24211#20301
|
||||
DataBinding.FieldName = 'KuWei'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 86
|
||||
end
|
||||
object v1Column19: TcxGridDBColumn
|
||||
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 v2Column6: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #25968#37327
|
||||
DataBinding.FieldName = 'MQty'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 62
|
||||
end
|
||||
object Tv1Column4: TcxGridDBColumn
|
||||
Caption = #37325#37327
|
||||
DataBinding.FieldName = 'KgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #25968#37327#21333#20301
|
||||
DataBinding.FieldName = 'QtyUnit'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.DropDownListStyle = lsFixedList
|
||||
Properties.Items.Strings = (
|
||||
'Kg'
|
||||
'M'
|
||||
'Y')
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'Price'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 55
|
||||
end
|
||||
object v1Column16: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #26469#33258#24037#21378
|
||||
DataBinding.FieldName = 'FromFactoryName'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
VisibleForCustomization = False
|
||||
Width = 79
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'Note'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 79
|
||||
end
|
||||
end
|
||||
object cxGrid2Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel4: TPanel
|
||||
Left = 547
|
||||
Top = 140
|
||||
Width = 235
|
||||
Height = 125
|
||||
Color = clSkyBlue
|
||||
TabOrder = 3
|
||||
Visible = False
|
||||
object Label25: TLabel
|
||||
Left = 38
|
||||
Top = 34
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #24211#20301
|
||||
end
|
||||
object btnChk: TButton
|
||||
Left = 28
|
||||
Top = 81
|
||||
Width = 60
|
||||
Height = 25
|
||||
Caption = #30830#35748
|
||||
TabOrder = 0
|
||||
OnClick = btnChkClick
|
||||
end
|
||||
object btn1: TButton
|
||||
Left = 160
|
||||
Top = 80
|
||||
Width = 60
|
||||
Height = 25
|
||||
Caption = #20851#38381
|
||||
TabOrder = 1
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object KuWei: TcxButtonEdit
|
||||
Left = 75
|
||||
Top = 27
|
||||
ParentFont = False
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.OnButtonClick = KuWeiPropertiesButtonClick
|
||||
Style.Font.Charset = GB2312_CHARSET
|
||||
Style.Font.Color = clWindowText
|
||||
Style.Font.Height = -19
|
||||
Style.Font.Name = #23435#20307
|
||||
Style.Font.Style = [fsBold]
|
||||
Style.IsFontAssigned = True
|
||||
TabOrder = 2
|
||||
Width = 121
|
||||
end
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_YXYMT.ADOLink
|
||||
Parameters = <>
|
||||
Left = 504
|
||||
Top = 254
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_YXYMT.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 668
|
||||
Top = 254
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_YXYMT.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 750
|
||||
Top = 254
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 504
|
||||
Top = 378
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 750
|
||||
Top = 316
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 504
|
||||
Top = 316
|
||||
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 = RMDBMain
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 504
|
||||
Top = 440
|
||||
ReportData = {}
|
||||
end
|
||||
object RMDBMain: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_PRT
|
||||
Left = 832
|
||||
Top = 378
|
||||
end
|
||||
object RMXLSExport1: TRMXLSExport
|
||||
ShowAfterExport = True
|
||||
ExportPrecision = 1
|
||||
PagesOfSheet = 100
|
||||
ExportImages = True
|
||||
ExportFrames = True
|
||||
ExportImageFormat = ifBMP
|
||||
JPEGQuality = 0
|
||||
ScaleX = 1.000000000000000000
|
||||
ScaleY = 1.000000000000000000
|
||||
CompressFile = False
|
||||
Left = 586
|
||||
Top = 440
|
||||
end
|
||||
object RMDBHZ: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_HZ
|
||||
Left = 750
|
||||
Top = 378
|
||||
end
|
||||
object CDS_HZ: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 832
|
||||
Top = 254
|
||||
end
|
||||
object CDS_PRT: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 668
|
||||
Top = 316
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 668
|
||||
Top = 378
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N1Click
|
||||
end
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#24323
|
||||
OnClick = N2Click
|
||||
end
|
||||
end
|
||||
object ADOQueryImage: TADOQuery
|
||||
Connection = DataLink_YXYMT.ADOLink
|
||||
Parameters = <>
|
||||
Left = 586
|
||||
Top = 254
|
||||
end
|
||||
object CDS_MX: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 586
|
||||
Top = 316
|
||||
end
|
||||
object DS_MX: TDataSource
|
||||
DataSet = CDS_MX
|
||||
Left = 586
|
||||
Top = 378
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 832
|
||||
Top = 316
|
||||
end
|
||||
end
|
||||
345
云翔一码通/U_YMTStockList.pas
Normal file
345
云翔一码通/U_YMTStockList.pas
Normal file
|
|
@ -0,0 +1,345 @@
|
|||
unit U_YMTStockList;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, cxGridCustomTableView, cxGridTableView,
|
||||
cxGridBandedTableView, cxGridDBBandedTableView, cxGridLevel, cxClasses,
|
||||
cxControls, cxGridCustomView, cxGridDBTableView, cxGrid, StdCtrls, ComCtrls,
|
||||
ExtCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB, DBClient,
|
||||
cxDropDownEdit, cxCheckBox, RM_Common, RM_Class, RM_e_Xls, RM_Dataset,
|
||||
RM_System, RM_GridReport, Menus, cxCalendar, cxButtonEdit, cxTextEdit,
|
||||
cxContainer, cxImage, cxDBEdit, 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, cxCurrencyEdit,
|
||||
cxMaskEdit;
|
||||
|
||||
type
|
||||
TfrmStockList = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBExport: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
CDS_Main: TClientDataSet;
|
||||
RM1: TRMGridReport;
|
||||
RMDBMain: TRMDBDataSet;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
RMDBHZ: TRMDBDataSet;
|
||||
CDS_HZ: TClientDataSet;
|
||||
CDS_PRT: TClientDataSet;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
Label3: TLabel;
|
||||
Label4: TLabel;
|
||||
Label5: TLabel;
|
||||
Label8: TLabel;
|
||||
SPName: TEdit;
|
||||
FactoryName: TEdit;
|
||||
SPID: TEdit;
|
||||
SPSpec: TEdit;
|
||||
Label6: TLabel;
|
||||
SPCF: TEdit;
|
||||
Label7: TLabel;
|
||||
OrderNo: TEdit;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
v1Column15: TcxGridDBColumn;
|
||||
v1Column17: TcxGridDBColumn;
|
||||
v1Column14: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
v2Column6: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column16: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
cxGrid2Level1: TcxGridLevel;
|
||||
Label9: TLabel;
|
||||
ToFactoryName: TEdit;
|
||||
Label12: TLabel;
|
||||
CRType: TComboBox;
|
||||
v1Column18: TcxGridDBColumn;
|
||||
v1Column19: TcxGridDBColumn;
|
||||
Label11: TLabel;
|
||||
RCGangNo: TEdit;
|
||||
Label13: TLabel;
|
||||
SPColor: TEdit;
|
||||
Label15: TLabel;
|
||||
SPHX: TEdit;
|
||||
ADOQueryImage: TADOQuery;
|
||||
v1Column21: TcxGridDBColumn;
|
||||
CDS_MX: TClientDataSet;
|
||||
DS_MX: TDataSource;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
TbEditKW: TToolButton;
|
||||
Tv1SSel: TcxGridDBColumn;
|
||||
Panel4: TPanel;
|
||||
Label25: TLabel;
|
||||
btnChk: TButton;
|
||||
btn1: TButton;
|
||||
KuWei: TcxButtonEdit;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ConNoMChange(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure SPIDChange(Sender: TObject);
|
||||
procedure SPSpecChange(Sender: TObject);
|
||||
procedure FactoryNameChange(Sender: TObject);
|
||||
procedure TbEditKWClick(Sender: TObject);
|
||||
procedure KuWeiPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||
procedure btnChkClick(Sender: TObject);
|
||||
procedure btn1Click(Sender: TObject);
|
||||
private
|
||||
canshu1, canshu2: string;
|
||||
procedure InitGrid();
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmStockList: TfrmStockList;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_YMTRKInPut, U_ZdyAttachGYS, U_LabelPrintFun, U_ZDYHelp,
|
||||
U_KuWeiList;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
|
||||
procedure TfrmStockList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmStockList := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmStockList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmStockList.FormCreate(Sender: TObject);
|
||||
begin
|
||||
canshu1 := Trim(DParameters1);
|
||||
canshu2 := Trim(DParameters2);
|
||||
EndDate.DateTime := SGetServerDate10(ADOQueryTemp);
|
||||
BegDate.DateTime := EndDate.DateTime;
|
||||
end;
|
||||
|
||||
procedure TfrmStockList.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.* ');
|
||||
sql.Add(' from YMT_CK_CR A');
|
||||
sql.add(' where A.CRTime>=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + '''');
|
||||
sql.Add(' and A.CRTime<=''' + Trim(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)) + '''');
|
||||
sql.Add(' and isnull(CKName,'''')=''面料''');
|
||||
SQL.Add(' and CRFlag=''入库'' ');
|
||||
Open;
|
||||
//ShowMessage(SQL.Text);
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain, CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmStockList.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
BegDate.SetFocus;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmStockList.ConNoMChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmStockList.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('待检布入库列表', Tv1, '面料仓库');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmStockList.FormShow(Sender: TObject);
|
||||
begin
|
||||
|
||||
ReadCxGrid('待检布入库列表', Tv1, '面料仓库');
|
||||
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmStockList.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then
|
||||
exit;
|
||||
TcxGridToExcel('待检布入库列表', cxGrid2);
|
||||
end;
|
||||
|
||||
procedure TfrmStockList.TBFindClick(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 TfrmStockList.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_Main, True);
|
||||
end;
|
||||
|
||||
procedure TfrmStockList.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_Main, False);
|
||||
end;
|
||||
|
||||
procedure TfrmStockList.SPIDChange(Sender: TObject);
|
||||
begin
|
||||
if Length(Trim(SPID.Text)) < 4 then
|
||||
begin
|
||||
if Trim(SPID.Text) <> '' then
|
||||
Exit;
|
||||
end;
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmStockList.SPSpecChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmStockList.FactoryNameChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmStockList.TbEditKWClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
exit;
|
||||
Panel4.Visible := True;
|
||||
end;
|
||||
|
||||
procedure TfrmStockList.KuWeiPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmKuWeiList := TfrmKuWeiList.Create(Application);
|
||||
with frmKuWeiList do
|
||||
begin
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
with Self.CDS_Main do
|
||||
begin
|
||||
Edit;
|
||||
KuWei.Text := Trim(frmKuWeiList.Order_Main.fieldbyname('KWName').AsString);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmKuWeiList.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmStockList.btnChkClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
exit;
|
||||
if CDS_Main.Locate('SSel', True, []) = False then
|
||||
begin
|
||||
application.MessageBox('请选择数据!', '提示信息');
|
||||
exit;
|
||||
end;
|
||||
|
||||
try
|
||||
while CDS_Main.Locate('SSel', True, []) do
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update YMT_CK_CR SET KuWei=' + quotedstr(trim(KuWei.Text)));
|
||||
sql.Add('where SPID=' + quotedstr(trim(CDS_Main.fieldbyname('SPID').AsString)));
|
||||
execsql;
|
||||
end;
|
||||
with CDS_Main do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('SSel').Value := False;
|
||||
FieldByName('KuWei').Value := trim(KuWei.Text);
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
|
||||
Panel4.Visible := False;
|
||||
application.MessageBox('批量修改成功!', '提示信息');
|
||||
except
|
||||
application.MessageBox('批量修改失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmStockList.btn1Click(Sender: TObject);
|
||||
begin
|
||||
Panel4.Visible := False;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
616
云翔一码通/U_YMTStockSel.dfm
Normal file
616
云翔一码通/U_YMTStockSel.dfm
Normal file
|
|
@ -0,0 +1,616 @@
|
|||
object frmStockSel: TfrmStockSel
|
||||
Left = 237
|
||||
Top = 581
|
||||
Width = 1328
|
||||
Height = 687
|
||||
Caption = #24211#23384#36873#25321
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
WindowState = wsMaximized
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1320
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 73
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -18
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
Images = DataLink_YXYMT.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 24
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 77
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #30830#35748
|
||||
ImageIndex = 10
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 154
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 1320
|
||||
Height = 70
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 25
|
||||
Top = 14
|
||||
Width = 80
|
||||
Height = 19
|
||||
Caption = #19979#21333#26085#26399
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 241
|
||||
Top = 14
|
||||
Width = 73
|
||||
Height = 19
|
||||
Caption = #23458' '#25143
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 613
|
||||
Top = 119
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #20811#37325
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 489
|
||||
Top = 14
|
||||
Width = 73
|
||||
Height = 19
|
||||
Caption = #21697' '#21517
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 525
|
||||
Top = 88
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #23457#26680#29366#24577
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 746
|
||||
Top = 14
|
||||
Width = 80
|
||||
Height = 19
|
||||
Caption = #20837#24211#31867#22411
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 100
|
||||
Top = 10
|
||||
Width = 123
|
||||
Height = 27
|
||||
Date = 40675.464742650460000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464742650460000000
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 100
|
||||
Top = 37
|
||||
Width = 123
|
||||
Height = 27
|
||||
Date = 40675.464761099540000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464761099540000000
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
object CustomerNoName: TEdit
|
||||
Tag = 2
|
||||
Left = 328
|
||||
Top = 9
|
||||
Width = 140
|
||||
Height = 27
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object MPRTKZ: TEdit
|
||||
Tag = 2
|
||||
Left = 654
|
||||
Top = 99
|
||||
Width = 56
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
end
|
||||
object SPName: TEdit
|
||||
Tag = 2
|
||||
Left = 576
|
||||
Top = 9
|
||||
Width = 139
|
||||
Height = 27
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 4
|
||||
OnChange = CustomerNoNameChange
|
||||
OnKeyPress = SPNameKeyPress
|
||||
end
|
||||
object status: TComboBox
|
||||
Tag = 2
|
||||
Left = 581
|
||||
Top = 87
|
||||
Width = 103
|
||||
Height = 20
|
||||
ItemHeight = 12
|
||||
TabOrder = 5
|
||||
Visible = False
|
||||
Items.Strings = (
|
||||
#26410#23457#26680
|
||||
#24050#23457#26680
|
||||
#24050#23436#25104
|
||||
'')
|
||||
end
|
||||
object CRType: TComboBox
|
||||
Tag = 2
|
||||
Left = 844
|
||||
Top = 10
|
||||
Width = 139
|
||||
Height = 27
|
||||
Style = csDropDownList
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ItemHeight = 19
|
||||
ParentFont = False
|
||||
TabOrder = 6
|
||||
Items.Strings = (
|
||||
''
|
||||
#21152#24037#23436#25104
|
||||
#22238#20462#23436#25104
|
||||
#26816#39564#36864#22238
|
||||
#26399#21021#20837#24211
|
||||
#23458#25143#36864#36135
|
||||
#37319#36141#20837#24211
|
||||
#27425#21697#20837#24211)
|
||||
end
|
||||
end
|
||||
object cxSplitter1: TcxSplitter
|
||||
Left = 0
|
||||
Top = 648
|
||||
Width = 1320
|
||||
Height = 8
|
||||
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||
AlignSplitter = salBottom
|
||||
Visible = False
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 102
|
||||
Width = 1320
|
||||
Height = 546
|
||||
Align = alClient
|
||||
TabOrder = 3
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skCount
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Format = '#,###'
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Format = '#,###'
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Format = '#,###'
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv1Column4
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.Indicator = True
|
||||
Styles.Inactive = DataLink_YXYMT.SHuangSe
|
||||
Styles.IncSearch = DataLink_YXYMT.SHuangSe
|
||||
Styles.Selection = DataLink_YXYMT.SHuangSe
|
||||
Styles.Header = DataLink_YXYMT.Default
|
||||
object Tv1SSel: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 47
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #20837#24211#21333#21495
|
||||
DataBinding.FieldName = 'SPID'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 83
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #20837#24211#26102#38388
|
||||
DataBinding.FieldName = 'CRTime'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 100
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #20837#24211#31867#22411
|
||||
DataBinding.FieldName = 'CRType'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.DropDownListStyle = lsFixedList
|
||||
Properties.Items.Strings = (
|
||||
#21152#24037#23436#25104
|
||||
#29983#20135#36864#22238)
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 83
|
||||
end
|
||||
object v1Column13: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'OrderNo'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 102
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #23458#25143
|
||||
DataBinding.FieldName = 'CustomerNoName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object v1Column14: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #20379#24212#21830
|
||||
DataBinding.FieldName = 'FactoryName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 101
|
||||
end
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'SPName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 97
|
||||
end
|
||||
object v1Column21: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'spcode'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #35268#26684
|
||||
DataBinding.FieldName = 'SPSpec'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 65
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #25104#20998
|
||||
DataBinding.FieldName = 'SPCF'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #38376#24133
|
||||
DataBinding.FieldName = 'SPMF'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #20811#37325
|
||||
DataBinding.FieldName = 'SPKZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 90
|
||||
end
|
||||
object v1Column15: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'SPColor'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 69
|
||||
end
|
||||
object v1Column17: TcxGridDBColumn
|
||||
Caption = #33457#22411#33457#21495
|
||||
DataBinding.FieldName = 'SPHX'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #23384#25918#24037#21378
|
||||
DataBinding.FieldName = 'ToFactoryName'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 84
|
||||
end
|
||||
object v1Column18: TcxGridDBColumn
|
||||
Caption = #24211#20301
|
||||
DataBinding.FieldName = 'KuWei'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 86
|
||||
end
|
||||
object v1Column19: TcxGridDBColumn
|
||||
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 v2Column6: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #25968#37327
|
||||
DataBinding.FieldName = 'MQty'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 62
|
||||
end
|
||||
object Tv1Column4: TcxGridDBColumn
|
||||
Caption = #37325#37327
|
||||
DataBinding.FieldName = 'KgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #25968#37327#21333#20301
|
||||
DataBinding.FieldName = 'QtyUnit'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.DropDownListStyle = lsFixedList
|
||||
Properties.Items.Strings = (
|
||||
'Kg'
|
||||
'M'
|
||||
'Y')
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'Price'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 55
|
||||
end
|
||||
object v1Column16: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #26469#33258#24037#21378
|
||||
DataBinding.FieldName = 'FromFactoryName'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
VisibleForCustomization = False
|
||||
Width = 79
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'Note'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 79
|
||||
end
|
||||
end
|
||||
object cxGrid2Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 710
|
||||
Top = 298
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_YXYMT.ADOLink
|
||||
Parameters = <>
|
||||
Left = 582
|
||||
Top = 298
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_YXYMT.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 614
|
||||
Top = 298
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_YXYMT.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 646
|
||||
Top = 298
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 582
|
||||
Top = 330
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 678
|
||||
Top = 298
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 614
|
||||
Top = 330
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N2Click
|
||||
end
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#24323
|
||||
OnClick = N1Click
|
||||
end
|
||||
object N3: TMenuItem
|
||||
Caption = #25490#21333
|
||||
end
|
||||
end
|
||||
end
|
||||
259
云翔一码通/U_YMTStockSel.pas
Normal file
259
云翔一码通/U_YMTStockSel.pas
Normal file
|
|
@ -0,0 +1,259 @@
|
|||
unit U_YMTStockSel;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, cxGridLevel, cxGridCustomTableView, cxGridTableView,
|
||||
cxGridDBTableView, cxClasses, cxControls, cxGridCustomView, cxGrid, cxMemo,
|
||||
cxRichEdit, ComCtrls, cxContainer, cxTextEdit, cxMaskEdit, cxButtonEdit,
|
||||
StdCtrls, ToolWin, DBClient, ADODB, ExtCtrls, BtnEdit, cxCalendar, StrUtils,
|
||||
cxCurrencyEdit, cxImage, cxDBEdit, Menus, RM_Common, RM_Class, RM_e_Xls,
|
||||
RM_Dataset, RM_System, RM_GridReport, cxGridCustomPopupMenu, cxGridPopupMenu,
|
||||
cxPC, cxSplitter, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
|
||||
IdFTP, ShellAPI, cxCheckBox, cxLookAndFeels, cxLookAndFeelPainters,
|
||||
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, cxDropDownEdit;
|
||||
|
||||
type
|
||||
TfrmStockSel = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
Label1: TLabel;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
CDS_Main: TClientDataSet;
|
||||
Label4: TLabel;
|
||||
CustomerNoName: TEdit;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N2: TMenuItem;
|
||||
Label12: TLabel;
|
||||
MPRTKZ: TEdit;
|
||||
cxSplitter1: TcxSplitter;
|
||||
SPName: TEdit;
|
||||
Label5: TLabel;
|
||||
N1: TMenuItem;
|
||||
Label7: TLabel;
|
||||
status: TComboBox;
|
||||
N3: TMenuItem;
|
||||
ToolButton1: TToolButton;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
Tv1SSel: TcxGridDBColumn;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
v1Column14: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v1Column21: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
v1Column15: TcxGridDBColumn;
|
||||
v1Column17: TcxGridDBColumn;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
v1Column18: TcxGridDBColumn;
|
||||
v1Column19: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
v2Column6: TcxGridDBColumn;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
v1Column16: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
cxGrid2Level1: TcxGridLevel;
|
||||
Label2: TLabel;
|
||||
CRType: TComboBox;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure CheckBox1Click(Sender: TObject);
|
||||
procedure CheckBox2Click(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure SPNameKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure MLConNoKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure MLOrderNoKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure CustomerNoNameChange(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
private
|
||||
DQdate: TDateTime;
|
||||
procedure InitGrid();
|
||||
procedure InitForm();
|
||||
|
||||
{ Private declarations }
|
||||
public
|
||||
FFInt, FCloth: Integer;
|
||||
canshu1, canshu2, canshu3: string;
|
||||
fFlileFlag: string;
|
||||
FKHNo, FTT: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmStockSel: TfrmStockSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun;
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmStockSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmStockSel := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmStockSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmStockSel.FormCreate(Sender: TObject);
|
||||
begin
|
||||
DQdate := SGetServerDate(ADOQueryTemp);
|
||||
canshu1 := trim(DParameters1);
|
||||
canshu2 := trim(DdataBase);
|
||||
end;
|
||||
|
||||
procedure TfrmStockSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
WriteCxGrid('生产指示单新YX', Tv1, '生产指示单管理');
|
||||
end;
|
||||
|
||||
procedure TfrmStockSel.InitGrid();
|
||||
var
|
||||
fwhere, Pwhere: string;
|
||||
begin
|
||||
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.* ');
|
||||
sql.Add(' from YMT_CK_CR A');
|
||||
sql.add(' where A.CRTime>=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + '''');
|
||||
sql.Add(' and A.CRTime<=''' + Trim(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)) + '''');
|
||||
sql.Add(' and isnull(CKName,'''')=''面料''');
|
||||
SQL.Add(' and CRFlag=''入库'' ');
|
||||
Open;
|
||||
//ShowMessage(SQL.Text);
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain, CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmStockSel.InitForm();
|
||||
begin
|
||||
ReadCxGrid('生产指示单新YX', Tv1, '生产指示单管理');
|
||||
EndDate.DateTime := SGetServerDate10(ADOQueryTemp);
|
||||
BegDate.DateTime := EndDate.DateTime;
|
||||
InitGrid();
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmStockSel.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then
|
||||
Exit;
|
||||
SelExportData(Tv1, ADOQueryMain, '面料染色计划单');
|
||||
end;
|
||||
|
||||
procedure TfrmStockSel.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmStockSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitForm();
|
||||
end;
|
||||
|
||||
procedure TfrmStockSel.CheckBox1Click(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmStockSel.CheckBox2Click(Sender: TObject);
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmStockSel.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_Main, false);
|
||||
end;
|
||||
|
||||
procedure TfrmStockSel.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_Main, True);
|
||||
end;
|
||||
|
||||
procedure TfrmStockSel.SPNameKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key = #13 then
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmStockSel.MLConNoKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key = #13 then
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmStockSel.MLOrderNoKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key = #13 then
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmStockSel.CustomerNoNameChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active = False then
|
||||
Exit;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain, CDS_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmStockSel.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
|
@ -101,7 +101,7 @@ DebugSourceDirs=
|
|||
UsePackages=0
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=D:\马国钢开发代码\项目代码\D7WMyunxiang\云翔一码通\testDll.exe
|
||||
HostApplication=D:\Project\D7myYunxiang\云翔一码通\testDll.exe
|
||||
Launcher=
|
||||
UseLauncher=0
|
||||
DebugCWD=
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ uses
|
|||
U_ColumnBandSet in '..\Z99Dependency\ThreeFun\Form\U_ColumnBandSet.pas' {frmColumnBandSet},
|
||||
U_SelPrintFieldNew in '..\Z99Dependency\ThreeFun\Form\U_SelPrintFieldNew.pas' {frmSelPrintFieldNew},
|
||||
U_CompressionFun in '..\Z99Dependency\ThreeFun\Fun\U_CompressionFun.pas',
|
||||
U_SelExportField in '..\Z99Dependency\ThreeFun\Fun\U_SelExportField.pas' {frmSelExportField},
|
||||
superobject in '..\Z99Dependency\ThreeFun\Fun\superobject.pas',
|
||||
U_ClientPrintRmf in '..\A00±êÇ©´òÓ¡\U_ClientPrintRmf.pas' {frmClientPrintRmf},
|
||||
U_LabelMapSet in '..\A00±êÇ©´òÓ¡\U_LabelMapSet.pas' {frmLabelMapSet},
|
||||
|
|
@ -26,7 +25,11 @@ uses
|
|||
U_LabelPrintFun in '..\A00±êÇ©´òÓ¡\U_LabelPrintFun.pas',
|
||||
U_QrCodeFun in '..\A00±êÇ©´òÓ¡\U_QrCodeFun.pas',
|
||||
U_YMTFHDataList in 'U_YMTFHDataList.pas' {frmYMTFHDataList},
|
||||
U_YMTJGWCList in 'U_YMTJGWCList.pas' {frmYMTJGWCList};
|
||||
U_YMTJGWCList in 'U_YMTJGWCList.pas' {frmYMTJGWCList},
|
||||
U_YMTFHSQInPut2 in 'U_YMTFHSQInPut2.pas' {frmFHSQInPut2},
|
||||
U_YMTStockSel in 'U_YMTStockSel.pas' {frmStockSel},
|
||||
U_YMTStockList in 'U_YMTStockList.pas' {frmStockList},
|
||||
U_SelExportField in '..\Z99Dependency\ThreeFun\Fun\U_SelExportField.pas' {frmSelExportField};
|
||||
|
||||
{$R *.res}
|
||||
|
||||
|
|
|
|||
7502
云翔一码通/superobject.pas
Normal file
7502
云翔一码通/superobject.pas
Normal file
File diff suppressed because it is too large
Load Diff
85
云翔一码通/util_utf8.pas
Normal file
85
云翔一码通/util_utf8.pas
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
unit util_utf8;
|
||||
|
||||
interface
|
||||
|
||||
uses Windows;
|
||||
|
||||
type
|
||||
UTF8String = AnsiString;
|
||||
|
||||
function AnsiToWide(const S: AnsiString): WideString;
|
||||
function WideToUTF8(const WS: WideString): UTF8String;
|
||||
function AnsiToUTF8(const S: AnsiString): UTF8String;
|
||||
function UTF8ToWide(const US: UTF8String): WideString;
|
||||
function WideToAnsi(const WS: WideString): AnsiString;
|
||||
function UTF8ToAnsi(const S: UTF8String): AnsiString;
|
||||
|
||||
implementation
|
||||
|
||||
function AnsiToWide(const S: AnsiString): WideString;
|
||||
var
|
||||
len: integer;
|
||||
ws: WideString;
|
||||
begin
|
||||
Result:='';
|
||||
if (Length(S) = 0) then
|
||||
exit;
|
||||
len:=MultiByteToWideChar(CP_ACP, 0, PChar(s), -1, nil, 0);
|
||||
SetLength(ws, len);
|
||||
MultiByteToWideChar(CP_ACP, 0, PChar(s), -1, PWideChar(ws), len);
|
||||
Result:=ws;
|
||||
end;
|
||||
|
||||
function WideToUTF8(const WS: WideString): UTF8String;
|
||||
var
|
||||
len: integer;
|
||||
us: UTF8String;
|
||||
begin
|
||||
Result:='';
|
||||
if (Length(WS) = 0) then
|
||||
exit;
|
||||
len:=WideCharToMultiByte(CP_UTF8, 0, PWideChar(WS), -1, nil, 0, nil, nil);
|
||||
SetLength(us, len);
|
||||
WideCharToMultiByte(CP_UTF8, 0, PWideChar(WS), -1, PChar(us), len, nil, nil);
|
||||
Result:=us;
|
||||
end;
|
||||
|
||||
function AnsiToUTF8(const S: AnsiString): UTF8String;
|
||||
begin
|
||||
Result:=WideToUTF8(AnsiToWide(S));
|
||||
end;
|
||||
|
||||
function UTF8ToWide(const US: UTF8String): WideString;
|
||||
var
|
||||
len: integer;
|
||||
ws: WideString;
|
||||
begin
|
||||
Result:='';
|
||||
if (Length(US) = 0) then
|
||||
exit;
|
||||
len:=MultiByteToWideChar(CP_UTF8, 0, PChar(US), -1, nil, 0);
|
||||
SetLength(ws, len);
|
||||
MultiByteToWideChar(CP_UTF8, 0, PChar(US), -1, PWideChar(ws), len);
|
||||
Result:=ws;
|
||||
end;
|
||||
|
||||
function WideToAnsi(const WS: WideString): AnsiString;
|
||||
var
|
||||
len: integer;
|
||||
s: AnsiString;
|
||||
begin
|
||||
Result:='';
|
||||
if (Length(WS) = 0) then
|
||||
exit;
|
||||
len:=WideCharToMultiByte(CP_ACP, 0, PWideChar(WS), -1, nil, 0, nil, nil);
|
||||
SetLength(s, len);
|
||||
WideCharToMultiByte(CP_ACP, 0, PWideChar(WS), -1, PChar(s), len, nil, nil);
|
||||
Result:=s;
|
||||
end;
|
||||
|
||||
function UTF8ToAnsi(const S: UTF8String): AnsiString;
|
||||
begin
|
||||
Result:=WideToAnsi(UTF8ToWide(S));
|
||||
end;
|
||||
|
||||
end.
|
||||
|
|
@ -7,7 +7,7 @@ object frmKuWeiList: TfrmKuWeiList
|
|||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -13
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
|
|
@ -15,12 +15,12 @@ object frmKuWeiList: TfrmKuWeiList
|
|||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 107
|
||||
TextHeight = 13
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1199
|
||||
Width = 1207
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 65
|
||||
|
|
@ -139,14 +139,14 @@ object frmKuWeiList: TfrmKuWeiList
|
|||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 84
|
||||
Width = 1199
|
||||
Height = 513
|
||||
Top = 80
|
||||
Width = 1207
|
||||
Height = 526
|
||||
Align = alClient
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 1
|
||||
object Tv1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
OnCellDblClick = Tv1CellDblClick
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
|
|
@ -185,11 +185,12 @@ object frmKuWeiList: TfrmKuWeiList
|
|||
Styles.Footer = DataLink_MYSC.Default10
|
||||
Styles.Header = DataLink_MYSC.Default10
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #25171#21360#36873#25321
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 74
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
|
|
@ -235,87 +236,87 @@ object frmKuWeiList: TfrmKuWeiList
|
|||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 1199
|
||||
Height = 52
|
||||
Width = 1207
|
||||
Height = 48
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 2
|
||||
object Label2: TLabel
|
||||
Left = 21
|
||||
Top = 17
|
||||
Width = 34
|
||||
Height = 16
|
||||
Left = 19
|
||||
Top = 16
|
||||
Width = 32
|
||||
Height = 15
|
||||
Caption = #21306#22495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 142
|
||||
Top = 17
|
||||
Width = 34
|
||||
Height = 16
|
||||
Left = 131
|
||||
Top = 16
|
||||
Width = 32
|
||||
Height = 15
|
||||
Caption = #20998#21306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 263
|
||||
Top = 17
|
||||
Width = 17
|
||||
Height = 16
|
||||
Left = 243
|
||||
Top = 16
|
||||
Width = 16
|
||||
Height = 15
|
||||
Caption = #25490
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 468
|
||||
Top = 17
|
||||
Width = 68
|
||||
Height = 16
|
||||
Left = 432
|
||||
Top = 16
|
||||
Width = 64
|
||||
Height = 15
|
||||
Caption = #24211#20301#21517#31216
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 367
|
||||
Top = 17
|
||||
Width = 17
|
||||
Height = 16
|
||||
Left = 339
|
||||
Top = 16
|
||||
Width = 16
|
||||
Height = 15
|
||||
Caption = #23618
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object QuYu: TEdit
|
||||
Tag = 2
|
||||
Left = 57
|
||||
Top = 13
|
||||
Width = 65
|
||||
Left = 53
|
||||
Top = 12
|
||||
Width = 60
|
||||
Height = 24
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
|
|
@ -324,13 +325,13 @@ object frmKuWeiList: TfrmKuWeiList
|
|||
end
|
||||
object FenQu: TEdit
|
||||
Tag = 2
|
||||
Left = 179
|
||||
Top = 13
|
||||
Width = 65
|
||||
Left = 165
|
||||
Top = 12
|
||||
Width = 60
|
||||
Height = 24
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
|
|
@ -339,13 +340,13 @@ object frmKuWeiList: TfrmKuWeiList
|
|||
end
|
||||
object Pai: TEdit
|
||||
Tag = 2
|
||||
Left = 283
|
||||
Top = 13
|
||||
Width = 65
|
||||
Left = 261
|
||||
Top = 12
|
||||
Width = 60
|
||||
Height = 24
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
|
|
@ -354,13 +355,13 @@ object frmKuWeiList: TfrmKuWeiList
|
|||
end
|
||||
object KWName: TEdit
|
||||
Tag = 2
|
||||
Left = 538
|
||||
Top = 13
|
||||
Width = 165
|
||||
Left = 497
|
||||
Top = 12
|
||||
Width = 152
|
||||
Height = 24
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
|
|
@ -369,13 +370,13 @@ object frmKuWeiList: TfrmKuWeiList
|
|||
end
|
||||
object Ceng: TEdit
|
||||
Tag = 2
|
||||
Left = 387
|
||||
Top = 13
|
||||
Width = 65
|
||||
Left = 357
|
||||
Top = 12
|
||||
Width = 60
|
||||
Height = 24
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
|
|
|
|||
|
|
@ -6,11 +6,24 @@ uses
|
|||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
|
||||
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses,
|
||||
cxControls, cxGridCustomView, cxGridCustomTableView, cxGridTableView,
|
||||
cxGridDBTableView, cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter,
|
||||
RM_Dataset, RM_System, RM_Common, RM_Class, RM_GridReport, RM_e_Xls,
|
||||
Menus, cxButtonEdit, cxDropDownEdit, cxPC, Buttons;
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses, cxControls,
|
||||
cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
||||
cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter, RM_Dataset, RM_System,
|
||||
RM_Common, RM_Class, RM_GridReport, RM_e_Xls, Menus, cxButtonEdit,
|
||||
cxDropDownEdit, cxPC, Buttons, 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
|
||||
TfrmKuWeiList = class(TForm)
|
||||
|
|
@ -76,19 +89,17 @@ type
|
|||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure ZJStatusChange(Sender: TObject);
|
||||
procedure ToolButton4Click(Sender: TObject);
|
||||
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
private
|
||||
canshu1:string;
|
||||
DQdate:TDateTime;
|
||||
canshu1: string;
|
||||
DQdate: TDateTime;
|
||||
procedure InitGrid();
|
||||
procedure InitForm();
|
||||
function DelData():Boolean;
|
||||
procedure PrtData(KWID:String);
|
||||
function DelData(): Boolean;
|
||||
procedure PrtData(KWID: string);
|
||||
{ Private declarations }
|
||||
public
|
||||
FFInt,FCloth:Integer;
|
||||
FFInt, FCloth: Integer;
|
||||
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
|
@ -97,31 +108,31 @@ var
|
|||
frmKuWeiList: TfrmKuWeiList;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink,U_RTFun,U_ZDYHelp,U_KuWeiInPutCeng;
|
||||
U_DataLink, U_RTFun, U_ZDYHelp, U_KuWeiInPutCeng;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmKuWeiList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmKuWeiList:=nil;
|
||||
frmKuWeiList := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmKuWeiList.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
procedure TfrmKuWeiList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmKuWeiList.FormCreate(Sender: TObject);
|
||||
begin
|
||||
cxgrid1.Align:=alClient;
|
||||
canshu1:=Trim(DParameters1);
|
||||
cxgrid1.Align := alClient;
|
||||
canshu1 := Trim(DParameters1);
|
||||
end;
|
||||
|
||||
procedure TfrmKuWeiList.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('库位列表',Tv1,'库位管理');
|
||||
WriteCxGrid('库位列表', Tv1, '库位管理');
|
||||
Close;
|
||||
end;
|
||||
|
||||
|
|
@ -131,62 +142,71 @@ begin
|
|||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.* ');
|
||||
sql.Add(' from KuWei A where KWType=''GG'' and Valid=''Y'' ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmKuWeiList.InitForm();
|
||||
begin
|
||||
ReadCxGrid('库位列表',Tv1,'库位管理');
|
||||
ReadCxGrid('库位列表', Tv1, '库位管理');
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmKuWeiList.TBFindClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active=False then Exit;
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
if ADOQueryMain.Active = False then
|
||||
Exit;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmKuWeiList.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then Exit;
|
||||
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
if Order_Main.Locate('SSel', True, []) = False then
|
||||
begin
|
||||
application.MessageBox('请选择数据!', '提示信息');
|
||||
exit;
|
||||
end;
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
|
||||
|
||||
if DelData() then
|
||||
begin
|
||||
//Order_Main.Delete;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TfrmKuWeiList.DelData():Boolean;
|
||||
function TfrmKuWeiList.DelData(): Boolean;
|
||||
begin
|
||||
try
|
||||
Result:=false;
|
||||
Result := false;
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
Order_Main.DisableControls;
|
||||
with Order_Main do
|
||||
begin
|
||||
//First;
|
||||
// while Order_Main.Locate('SSel',True,[]) do
|
||||
First;
|
||||
while Order_Main.Locate('SSel',True,[]) do
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' UPdate KuWei Set Valid=''N'', DelTime=getdate(),DelerCode='''+Trim(DCode)+''',Deler='''+Trim(DName)+'''');
|
||||
sql.Add(' where KWID='''+Trim(Order_Main.fieldbyname('KWID').AsString)+'''');
|
||||
sql.Add(' UPdate KuWei Set Valid=''N'', DelTime=getdate(),DelerCode=''' + Trim(DCode) + ''',Deler=''' + Trim(DName) + '''');
|
||||
sql.Add(' where KWID=''' + Trim(Order_Main.fieldbyname('KWID').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
Order_Main.Delete;
|
||||
|
|
@ -194,20 +214,20 @@ begin
|
|||
end;
|
||||
Order_Main.EnableControls;
|
||||
|
||||
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result:=True;
|
||||
Result := True;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result:=False;
|
||||
Application.MessageBox('数据删除异常!','提示',0);
|
||||
Result := False;
|
||||
Application.MessageBox('数据删除异常!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmKuWeiList.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then Exit;
|
||||
TcxGridToExcel(Self.Caption,cxGrid1);
|
||||
if ADOQueryMain.IsEmpty then
|
||||
Exit;
|
||||
TcxGridToExcel(Self.Caption, cxGrid1);
|
||||
end;
|
||||
|
||||
procedure TfrmKuWeiList.TBRafreshClick(Sender: TObject);
|
||||
|
|
@ -218,10 +238,10 @@ end;
|
|||
procedure TfrmKuWeiList.TBAddClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmKuWeiInPutCeng:=TfrmKuWeiInPutCeng.Create(Application);
|
||||
frmKuWeiInPutCeng := TfrmKuWeiInPutCeng.Create(Application);
|
||||
with frmKuWeiInPutCeng do
|
||||
begin
|
||||
if ShowModal=1 then
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
|
@ -248,20 +268,21 @@ end;
|
|||
|
||||
procedure TfrmKuWeiList.CustomerNoNameChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active=False then Exit;
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
if ADOQueryMain.Active = False then
|
||||
Exit;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmKuWeiList.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(Order_Main,false);
|
||||
SelOKNo(Order_Main, false);
|
||||
end;
|
||||
|
||||
procedure TfrmKuWeiList.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(Order_Main,True);
|
||||
SelOKNo(Order_Main, True);
|
||||
end;
|
||||
|
||||
procedure TfrmKuWeiList.cxTabControl1Change(Sender: TObject);
|
||||
|
|
@ -276,86 +297,88 @@ end;
|
|||
|
||||
procedure TfrmKuWeiList.ToolButton4Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then Exit;
|
||||
if Trim(ComboBox1.Text)='' then
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
if Trim(ComboBox1.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox('方向不能为空!','提示',0);
|
||||
Application.MessageBox('方向不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if Order_Main.Locate('SSel',True,[])=False then
|
||||
if Order_Main.Locate('SSel', True, []) = False then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!','提示',0);
|
||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
Order_Main.DisableControls;
|
||||
with Order_Main do
|
||||
begin
|
||||
First;
|
||||
while Locate('SSel',True,[]) do
|
||||
while Locate('SSel', True, []) do
|
||||
begin
|
||||
PrtData(Trim(Order_Main.fieldbyname('KWID').AsString));
|
||||
Edit;
|
||||
FieldByName('SSel').Value:=False;
|
||||
FieldByName('SSel').Value := False;
|
||||
end;
|
||||
end;
|
||||
Order_Main.EnableControls;
|
||||
end;
|
||||
procedure TfrmKuWeiList.PrtData(KWID:String);
|
||||
|
||||
procedure TfrmKuWeiList.PrtData(KWID: string);
|
||||
var
|
||||
fPrintFile,Txt,fImagePath:string;
|
||||
i,j:Integer;
|
||||
fPrintFile, Txt, fImagePath: string;
|
||||
i, j: Integer;
|
||||
Moudle: THandle;
|
||||
Makebar:TMakebar;
|
||||
Mixtext:TMixtext;
|
||||
Makebar: TMakebar;
|
||||
Mixtext: TMixtext;
|
||||
begin
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\库位标签.rmf';
|
||||
if FileExists(fPrintFile)=False then
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\库位标签.rmf';
|
||||
if FileExists(fPrintFile) = False then
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\库位标签.rmf'),'提示',0);
|
||||
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)+'''');
|
||||
sql.Add('select * from KuWei where KWID=''' + Trim(KWID) + '''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp,CDS_PRT);
|
||||
SInitCDSData20(ADOQueryTemp,CDS_PRT);
|
||||
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);
|
||||
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);
|
||||
application.MessageBox('二维码生成失败!', '提示信息', MB_ICONERROR);
|
||||
exit;
|
||||
end;
|
||||
RMVariables['QRBARCODE']:=fImagePath;
|
||||
if Trim(ComboBox1.Text)='→' then
|
||||
RMVariables['QRBARCODE'] := fImagePath;
|
||||
if Trim(ComboBox1.Text) = '→' then
|
||||
begin
|
||||
RMVariables['FangXiang']:='→→→→';
|
||||
end else
|
||||
if Trim(ComboBox1.Text)='←' then
|
||||
RMVariables['FangXiang'] := '→→→→';
|
||||
end
|
||||
else if Trim(ComboBox1.Text) = '←' then
|
||||
begin
|
||||
RMVariables['FangXiang']:='←←←←';
|
||||
RMVariables['FangXiang'] := '←←←←';
|
||||
end;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
//RM1.ShowReport;
|
||||
RM1.PrintReport;
|
||||
end;
|
||||
|
||||
procedure TfrmKuWeiList.Tv1CellDblClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure TfrmKuWeiList.Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
ModalResult:=1;
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user