调整
This commit is contained in:
parent
d7bd3596e3
commit
e4158f64a0
|
|
@ -10,6 +10,7 @@ inherited frmClothInfo: TfrmClothInfo
|
||||||
FormStyle = fsMDIChild
|
FormStyle = fsMDIChild
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
Visible = True
|
Visible = True
|
||||||
|
ExplicitLeft = -87
|
||||||
ExplicitWidth = 1556
|
ExplicitWidth = 1556
|
||||||
ExplicitHeight = 847
|
ExplicitHeight = 847
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
|
|
@ -22,7 +23,7 @@ inherited frmClothInfo: TfrmClothInfo
|
||||||
Height = 30
|
Height = 30
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
ButtonHeight = 30
|
ButtonHeight = 30
|
||||||
ButtonWidth = 99
|
ButtonWidth = 131
|
||||||
Caption = 'ToolBar1'
|
Caption = 'ToolBar1'
|
||||||
DisabledImages = DataLink_ClothInfo.cxImageList_bar
|
DisabledImages = DataLink_ClothInfo.cxImageList_bar
|
||||||
Images = DataLink_ClothInfo.cxImageList_bar
|
Images = DataLink_ClothInfo.cxImageList_bar
|
||||||
|
|
@ -38,7 +39,7 @@ inherited frmClothInfo: TfrmClothInfo
|
||||||
OnClick = TBRafreshClick
|
OnClick = TBRafreshClick
|
||||||
end
|
end
|
||||||
object TBAdd: TToolButton
|
object TBAdd: TToolButton
|
||||||
Left = 71
|
Left = 63
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #26032#22686
|
Caption = #26032#22686
|
||||||
|
|
@ -46,7 +47,7 @@ inherited frmClothInfo: TfrmClothInfo
|
||||||
OnClick = TBAddClick
|
OnClick = TBAddClick
|
||||||
end
|
end
|
||||||
object TBCopy: TToolButton
|
object TBCopy: TToolButton
|
||||||
Left = 142
|
Left = 126
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #22797#21046
|
Caption = #22797#21046
|
||||||
|
|
@ -54,7 +55,7 @@ inherited frmClothInfo: TfrmClothInfo
|
||||||
OnClick = TBCopyClick
|
OnClick = TBCopyClick
|
||||||
end
|
end
|
||||||
object TBEdit: TToolButton
|
object TBEdit: TToolButton
|
||||||
Left = 213
|
Left = 189
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #20462#25913
|
Caption = #20462#25913
|
||||||
|
|
@ -62,7 +63,7 @@ inherited frmClothInfo: TfrmClothInfo
|
||||||
OnClick = TBEditClick
|
OnClick = TBEditClick
|
||||||
end
|
end
|
||||||
object ToolButton1: TToolButton
|
object ToolButton1: TToolButton
|
||||||
Left = 284
|
Left = 252
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #26597#30475
|
Caption = #26597#30475
|
||||||
|
|
@ -70,7 +71,7 @@ inherited frmClothInfo: TfrmClothInfo
|
||||||
OnClick = ToolButton1Click
|
OnClick = ToolButton1Click
|
||||||
end
|
end
|
||||||
object TBMLEdit: TToolButton
|
object TBMLEdit: TToolButton
|
||||||
Left = 355
|
Left = 315
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #30446#24405#20462#25913
|
Caption = #30446#24405#20462#25913
|
||||||
|
|
@ -78,7 +79,7 @@ inherited frmClothInfo: TfrmClothInfo
|
||||||
OnClick = TBMLEditClick
|
OnClick = TBMLEditClick
|
||||||
end
|
end
|
||||||
object TBDel: TToolButton
|
object TBDel: TToolButton
|
||||||
Left = 458
|
Left = 402
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #21024#38500
|
Caption = #21024#38500
|
||||||
|
|
@ -86,7 +87,7 @@ inherited frmClothInfo: TfrmClothInfo
|
||||||
OnClick = TBDelClick
|
OnClick = TBDelClick
|
||||||
end
|
end
|
||||||
object ToolButton3: TToolButton
|
object ToolButton3: TToolButton
|
||||||
Left = 529
|
Left = 465
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #26631#31614#25171#21360
|
Caption = #26631#31614#25171#21360
|
||||||
|
|
@ -94,7 +95,7 @@ inherited frmClothInfo: TfrmClothInfo
|
||||||
OnClick = ToolButton3Click
|
OnClick = ToolButton3Click
|
||||||
end
|
end
|
||||||
object ToolButton7: TToolButton
|
object ToolButton7: TToolButton
|
||||||
Left = 632
|
Left = 552
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #25209#37327#23548#20986
|
Caption = #25209#37327#23548#20986
|
||||||
|
|
@ -102,7 +103,7 @@ inherited frmClothInfo: TfrmClothInfo
|
||||||
OnClick = ToolButton7Click
|
OnClick = ToolButton7Click
|
||||||
end
|
end
|
||||||
object ToolButton4: TToolButton
|
object ToolButton4: TToolButton
|
||||||
Left = 735
|
Left = 639
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #23548#20837
|
Caption = #23548#20837
|
||||||
|
|
@ -110,7 +111,7 @@ inherited frmClothInfo: TfrmClothInfo
|
||||||
OnClick = ToolButton4Click
|
OnClick = ToolButton4Click
|
||||||
end
|
end
|
||||||
object TBExport: TToolButton
|
object TBExport: TToolButton
|
||||||
Left = 806
|
Left = 702
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #23548#20986
|
Caption = #23548#20986
|
||||||
|
|
@ -118,7 +119,7 @@ inherited frmClothInfo: TfrmClothInfo
|
||||||
OnClick = TBExportClick
|
OnClick = TBExportClick
|
||||||
end
|
end
|
||||||
object TBUP: TToolButton
|
object TBUP: TToolButton
|
||||||
Left = 877
|
Left = 765
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #22270#29255#19978#20256
|
Caption = #22270#29255#19978#20256
|
||||||
|
|
@ -126,7 +127,7 @@ inherited frmClothInfo: TfrmClothInfo
|
||||||
OnClick = TBUPClick
|
OnClick = TBUPClick
|
||||||
end
|
end
|
||||||
object ToolButton5: TToolButton
|
object ToolButton5: TToolButton
|
||||||
Left = 980
|
Left = 852
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #25805#20316#26085#24535
|
Caption = #25805#20316#26085#24535
|
||||||
|
|
@ -134,15 +135,23 @@ inherited frmClothInfo: TfrmClothInfo
|
||||||
OnClick = ToolButton5Click
|
OnClick = ToolButton5Click
|
||||||
end
|
end
|
||||||
object ToolButton6: TToolButton
|
object ToolButton6: TToolButton
|
||||||
Left = 1083
|
Left = 939
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #20462#25913#21382#21490
|
Caption = #20462#25913#21382#21490
|
||||||
ImageIndex = 15
|
ImageIndex = 15
|
||||||
OnClick = ToolButton6Click
|
OnClick = ToolButton6Click
|
||||||
end
|
end
|
||||||
|
object ToolButton8: TToolButton
|
||||||
|
Left = 1026
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #19968#38190#35774#32622#35745#20215#21333#20301
|
||||||
|
ImageIndex = 23
|
||||||
|
OnClick = ToolButton8Click
|
||||||
|
end
|
||||||
object ToolButton2: TToolButton
|
object ToolButton2: TToolButton
|
||||||
Left = 1186
|
Left = 1161
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #20445#23384#26684#24335
|
Caption = #20445#23384#26684#24335
|
||||||
|
|
@ -150,7 +159,7 @@ inherited frmClothInfo: TfrmClothInfo
|
||||||
OnClick = ToolButton2Click
|
OnClick = ToolButton2Click
|
||||||
end
|
end
|
||||||
object TBClose: TToolButton
|
object TBClose: TToolButton
|
||||||
Left = 1289
|
Left = 1248
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #20851#38381
|
Caption = #20851#38381
|
||||||
|
|
|
||||||
|
|
@ -137,6 +137,7 @@ type
|
||||||
cxGridDBColumn2: TcxGridDBColumn;
|
cxGridDBColumn2: TcxGridDBColumn;
|
||||||
cxGridLevel2: TcxGridLevel;
|
cxGridLevel2: TcxGridLevel;
|
||||||
Tv1Column13: TcxGridDBColumn;
|
Tv1Column13: TcxGridDBColumn;
|
||||||
|
ToolButton8: TToolButton;
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure TBCloseClick(Sender: TObject);
|
procedure TBCloseClick(Sender: TObject);
|
||||||
procedure TBDelClick(Sender: TObject);
|
procedure TBDelClick(Sender: TObject);
|
||||||
|
|
@ -200,7 +201,7 @@ implementation
|
||||||
uses
|
uses
|
||||||
U_DataLink, U_RTFun, U_ClothInfoInput, U_CloInfoFileUp, U_ClothTypeSel,
|
U_DataLink, U_RTFun, U_ClothInfoInput, U_CloInfoFileUp, U_ClothTypeSel,
|
||||||
U_ZDYHelp, U_LabelPrint, U_ClothInfoImport, U_SysLogHelp, U_ClothInfoInput1,
|
U_ZDYHelp, U_LabelPrint, U_ClothInfoImport, U_SysLogHelp, U_ClothInfoInput1,
|
||||||
U_ClothInfoInput2, U_ClothInfoLog;
|
U_ClothInfoInput2, U_ClothInfoLog, U_SelectStore;
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
procedure TfrmClothInfo.InitGrid2();
|
procedure TfrmClothInfo.InitGrid2();
|
||||||
|
|
@ -723,6 +724,7 @@ begin
|
||||||
with frmClothInfoInput do
|
with frmClothInfoInput do
|
||||||
begin
|
begin
|
||||||
canshu3 := Self.canshu3;
|
canshu3 := Self.canshu3;
|
||||||
|
canshu4 := Self.canshu4;
|
||||||
TypeInt := 2;
|
TypeInt := 2;
|
||||||
FBCIID := Trim(Self.CDS_1.fieldbyname('BCIID').AsString);
|
FBCIID := Trim(Self.CDS_1.fieldbyname('BCIID').AsString);
|
||||||
FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
|
FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
|
||||||
|
|
@ -1096,8 +1098,38 @@ end;
|
||||||
|
|
||||||
procedure TfrmClothInfo.ToolButton8Click(Sender: TObject);
|
procedure TfrmClothInfo.ToolButton8Click(Sender: TObject);
|
||||||
var
|
var
|
||||||
MCTID: string;
|
RTValues: TArray<string>;
|
||||||
|
StoreName: string;
|
||||||
|
frmSelectStore: TfrmSelectStore;
|
||||||
begin
|
begin
|
||||||
|
if CDS_1.IsEmpty then
|
||||||
|
exit;
|
||||||
|
RTValues := SelCDSKey(CDS_1, ['BCIID']);
|
||||||
|
if RTValues[0] = '' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('请选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
frmSelectStore := TfrmSelectStore.Create(nil);
|
||||||
|
try
|
||||||
|
if frmSelectStore.ShowModal = mrOk then
|
||||||
|
begin
|
||||||
|
StoreName := frmSelectStore.SelectedStore;
|
||||||
|
if StoreName = '' then
|
||||||
|
Exit;
|
||||||
|
|
||||||
|
ADOQueryCmd.Close;
|
||||||
|
ADOQueryCmd.SQL.Text := 'UPDATE BS_Cloth_Info SET qtyunit = :StoreName ' + 'WHERE EXISTS(SELECT X.RTValue ' + ' FROM [dbo].[F_Tool_SplitString](:COIDList,'','') X ' + ' WHERE BS_Cloth_Info.BCIID = X.RTValue)';
|
||||||
|
ADOQueryCmd.Parameters.ParamByName('qtyunit').Value := StoreName;
|
||||||
|
ADOQueryCmd.Parameters.ParamByName('COIDList').Value := RTValues[0];
|
||||||
|
ADOQueryCmd.ExecSQL;
|
||||||
|
|
||||||
|
Application.MessageBox('设置计价单位成功!', '提示');
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmSelectStore.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1433,9 +1433,8 @@ begin
|
||||||
if SaveData() then
|
if SaveData() then
|
||||||
begin
|
begin
|
||||||
|
|
||||||
if FCTID = 'CT2412300005' then
|
if (FCTID = 'CT2412300005') or (canshu4 = '¶þ´Î¼Ó¹¤') then
|
||||||
begin
|
begin
|
||||||
|
|
||||||
if CDS_1.Locate('BCISID', null, []) then
|
if CDS_1.Locate('BCISID', null, []) then
|
||||||
SaveColor();
|
SaveColor();
|
||||||
end;
|
end;
|
||||||
|
|
|
||||||
42
A02基础产品管理/U_SelectStore.dfm
Normal file
42
A02基础产品管理/U_SelectStore.dfm
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
inherited frmSelectStore: TfrmSelectStore
|
||||||
|
Caption = #36873#25321#38376#24215
|
||||||
|
ClientHeight = 121
|
||||||
|
ClientWidth = 509
|
||||||
|
Position = poScreenCenter
|
||||||
|
ExplicitWidth = 525
|
||||||
|
ExplicitHeight = 160
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 17
|
||||||
|
object btnOK: TButton [0]
|
||||||
|
Left = 308
|
||||||
|
Top = 42
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Caption = #30830#23450
|
||||||
|
ModalResult = 1
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object cbStore: TComboBox [1]
|
||||||
|
Left = 47
|
||||||
|
Top = 42
|
||||||
|
Width = 216
|
||||||
|
Height = 25
|
||||||
|
TabOrder = 1
|
||||||
|
Items.Strings = (
|
||||||
|
#26684#32654
|
||||||
|
#26032#20313
|
||||||
|
#32654#25289)
|
||||||
|
end
|
||||||
|
object btnCancel: TButton [2]
|
||||||
|
Left = 389
|
||||||
|
Top = 42
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Caption = #21462#28040
|
||||||
|
ModalResult = 2
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
inherited cxImageList_bar: TcxImageList
|
||||||
|
FormatVersion = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
40
A02基础产品管理/U_SelectStore.pas
Normal file
40
A02基础产品管理/U_SelectStore.pas
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
unit U_SelectStore;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
|
||||||
|
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, U_BaseInput, cxImageList, cxGraphics,
|
||||||
|
System.ImageList, Vcl.ImgList, Data.DB, Data.Win.ADODB, Vcl.StdCtrls;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmSelectStore = class(TfrmBaseInput)
|
||||||
|
btnOK: TButton;
|
||||||
|
cbStore: TComboBox;
|
||||||
|
btnCancel: TButton;
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
function SelectedStore: string;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmSelectStore: TfrmSelectStore;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmSelectStore.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
cbStore.ItemIndex := 0;
|
||||||
|
end;
|
||||||
|
function TfrmSelectStore.SelectedStore: string;
|
||||||
|
begin
|
||||||
|
Result := Trim(cbStore.Text);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
@ -78,7 +78,8 @@ uses
|
||||||
U_RPFun in '..\..\..\public10\ThreeFun\Fun\U_RPFun.pas',
|
U_RPFun in '..\..\..\public10\ThreeFun\Fun\U_RPFun.pas',
|
||||||
U_InputReceiptType in 'U_InputReceiptType.pas' {frmInputReceiptType},
|
U_InputReceiptType in 'U_InputReceiptType.pas' {frmInputReceiptType},
|
||||||
U_MachineManageSel in '..\A00通用窗体\U_MachineManageSel.pas' {frmMachineManageSel},
|
U_MachineManageSel in '..\A00通用窗体\U_MachineManageSel.pas' {frmMachineManageSel},
|
||||||
U_CompanySel in '..\A00通用窗体\U_CompanySel.pas' {frmCompanySel};
|
U_CompanySel in '..\A00通用窗体\U_CompanySel.pas' {frmCompanySel},
|
||||||
|
U_UserSel in '..\A00通用窗体\U_UserSel.pas' {frmUserSel};
|
||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -368,6 +368,10 @@
|
||||||
<Form>frmCompanySel</Form>
|
<Form>frmCompanySel</Form>
|
||||||
<FormType>dfm</FormType>
|
<FormType>dfm</FormType>
|
||||||
</DCCReference>
|
</DCCReference>
|
||||||
|
<DCCReference Include="..\A00通用窗体\U_UserSel.pas">
|
||||||
|
<Form>frmUserSel</Form>
|
||||||
|
<FormType>dfm</FormType>
|
||||||
|
</DCCReference>
|
||||||
<BuildConfiguration Include="Debug">
|
<BuildConfiguration Include="Debug">
|
||||||
<Key>Cfg_2</Key>
|
<Key>Cfg_2</Key>
|
||||||
<CfgParent>Base</CfgParent>
|
<CfgParent>Base</CfgParent>
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@ object frmInputReceiptType: TfrmInputReceiptType
|
||||||
Left = 682
|
Left = 682
|
||||||
Top = 315
|
Top = 315
|
||||||
Caption = #35831#36755#20837#25991#26412
|
Caption = #35831#36755#20837#25991#26412
|
||||||
ClientHeight = 86
|
ClientHeight = 159
|
||||||
ClientWidth = 467
|
ClientWidth = 471
|
||||||
Color = clWhite
|
Color = clWhite
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
|
|
@ -17,11 +17,12 @@ object frmInputReceiptType: TfrmInputReceiptType
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 467
|
Width = 471
|
||||||
Height = 86
|
Height = 159
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
ExplicitHeight = 123
|
ExplicitWidth = 467
|
||||||
|
ExplicitHeight = 86
|
||||||
object Button1: TButton
|
object Button1: TButton
|
||||||
Left = 308
|
Left = 308
|
||||||
Top = 14
|
Top = 14
|
||||||
|
|
@ -54,5 +55,19 @@ object frmInputReceiptType: TfrmInputReceiptType
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
Width = 257
|
Width = 257
|
||||||
end
|
end
|
||||||
|
object FHDBCIONo: TEdit
|
||||||
|
Left = 24
|
||||||
|
Top = 73
|
||||||
|
Width = 257
|
||||||
|
Height = 60
|
||||||
|
TabOrder = 2
|
||||||
|
OnKeyPress = FHDBCIONoKeyPress
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_TradeTotalClothStk.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 347
|
||||||
|
Top = 107
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -4,16 +4,19 @@ interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
Dialogs, StdCtrls, ExtCtrls, DB, ADODB, cxGraphics, cxControls,
|
Dialogs, StdCtrls, ExtCtrls, DB, ADODB, cxGraphics, cxControls, cxLookAndFeels,
|
||||||
cxLookAndFeels, cxLookAndFeelPainters, cxContainer, cxEdit, cxTextEdit,
|
cxLookAndFeelPainters, cxContainer, cxEdit, cxTextEdit, cxMaskEdit,
|
||||||
cxMaskEdit, cxDropDownEdit;
|
cxDropDownEdit;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfrmInputReceiptType = class(TForm)
|
TfrmInputReceiptType = class(TForm)
|
||||||
Panel1: TPanel;
|
Panel1: TPanel;
|
||||||
Button1: TButton;
|
Button1: TButton;
|
||||||
cxComboBox1: TcxComboBox;
|
cxComboBox1: TcxComboBox;
|
||||||
|
FHDBCIONo: TEdit;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
procedure Button1Click(Sender: TObject);
|
procedure Button1Click(Sender: TObject);
|
||||||
|
procedure FHDBCIONoKeyPress(Sender: TObject; var Key: Char);
|
||||||
private
|
private
|
||||||
{ Private declarations }
|
{ Private declarations }
|
||||||
public
|
public
|
||||||
|
|
@ -30,10 +33,32 @@ implementation
|
||||||
|
|
||||||
procedure TfrmInputReceiptType.Button1Click(Sender: TObject);
|
procedure TfrmInputReceiptType.Button1Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
|
||||||
|
|
||||||
ModalResult := 1;
|
ModalResult := 1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmInputReceiptType.FHDBCIONoKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
if Key = #13 then
|
||||||
|
begin
|
||||||
|
if trim(FHDBCIONo.Text) = '' then
|
||||||
|
exit;
|
||||||
|
|
||||||
|
try
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('update BS_Cloth_IO ');
|
||||||
|
sql.Add(' set ReceiptType=' + quotedstr(frmInputReceiptType.cxComboBox1.Text));
|
||||||
|
sql.Add(' where BCIONo=' + QuotedStr(Trim(FHDBCIONo.text)));
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
FHDBCIONo.Text := '';
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -133,8 +133,6 @@ inherited frmItemizedListInPut: TfrmItemizedListInPut
|
||||||
Align = alClient
|
Align = alClient
|
||||||
PopupMenu = PopupMenu2
|
PopupMenu = PopupMenu2
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
ExplicitLeft = 2
|
|
||||||
ExplicitTop = 5
|
|
||||||
object Tv1: TcxGridDBTableView
|
object Tv1: TcxGridDBTableView
|
||||||
OnDblClick = Tv1DblClick
|
OnDblClick = Tv1DblClick
|
||||||
OnMouseDown = Tv1MouseDown
|
OnMouseDown = Tv1MouseDown
|
||||||
|
|
|
||||||
|
|
@ -120,6 +120,7 @@ type
|
||||||
procedure InitData();
|
procedure InitData();
|
||||||
procedure ZDYHelp(FButn: TcxButtonEdit; LType: string);
|
procedure ZDYHelp(FButn: TcxButtonEdit; LType: string);
|
||||||
function SaveData(): Boolean;
|
function SaveData(): Boolean;
|
||||||
|
function SavesubData(): Boolean;
|
||||||
function getTMMNo(fconNo: string): string;
|
function getTMMNo(fconNo: string): string;
|
||||||
procedure SetXH();
|
procedure SetXH();
|
||||||
procedure initGrid1(MTIMID: string);
|
procedure initGrid1(MTIMID: string);
|
||||||
|
|
@ -552,6 +553,126 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TfrmItemizedListInPut.SavesubData(): Boolean;
|
||||||
|
var
|
||||||
|
maxno, Smaxno, maxTMMNo, MaxFNo, MFtyPCId, MSJQZ: string;
|
||||||
|
begin
|
||||||
|
|
||||||
|
with ADOTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add('select SJQZ=format(SYSDATETIME(),''yyMMddhhmm'')');
|
||||||
|
Open;
|
||||||
|
MSJQZ := Trim(ADOTemp.FieldByName('SJQZ').AsString);
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
ADOCmd.Connection.BeginTrans;
|
||||||
|
///保存主表
|
||||||
|
if Trim(FTIMID) = '' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOCmd, maxno, 'DD', 'Trade_ItemizedList_Main', 3, 1) = False then
|
||||||
|
raise Exception.Create('取最大号失败!');
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
maxno := Trim(FTIMID);
|
||||||
|
end;
|
||||||
|
|
||||||
|
if TIMNo.Text = '' then
|
||||||
|
TIMNo.Text := maxno;
|
||||||
|
|
||||||
|
with ADOCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add('select * from Trade_ItemizedList_Main where TIMID=''' + Trim(FTIMID) + '''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FTIMID) = '' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('FillId').Value := Trim(DCode);
|
||||||
|
FieldByName('Filler').Value := Trim(DName);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('EditId').Value := Trim(DCode);
|
||||||
|
FieldByName('Editer').Value := Trim(DName);
|
||||||
|
FieldByName('EditTime').Value := SGetServerDateTime(ADOTemp);
|
||||||
|
end;
|
||||||
|
RTSetsavedata(ADOCmd, 'Trade_ItemizedList_Main', ScrollBox1, 0);
|
||||||
|
FieldByName('TIMID').Value := Trim(maxno);
|
||||||
|
FieldByName('OopCoNo').Value := Trim(OopCoName.Properties.LookupItems.Text);
|
||||||
|
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////// 保存子表 ///////////////////////////
|
||||||
|
with CDS_1 do
|
||||||
|
begin
|
||||||
|
DisableControls;
|
||||||
|
// First;
|
||||||
|
// while not Eof do
|
||||||
|
// begin
|
||||||
|
if Trim(CDS_1.fieldbyname('TISId').AsString) = '' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOCmd, Smaxno, 'JS', 'Trade_ItemizedList_Sub', 4, 1) = False then
|
||||||
|
raise Exception.Create('取子流水号失败!');
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Smaxno := Trim(CDS_1.fieldbyname('TISId').AsString);
|
||||||
|
end;
|
||||||
|
with ADOCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from Trade_ItemizedList_Sub where TIMID=''' + Trim(maxno) + '''');
|
||||||
|
sql.Add(' and TISId=''' + Trim(Smaxno) + '''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOCmd do
|
||||||
|
begin
|
||||||
|
if ADOCmd.IsEmpty then
|
||||||
|
Append
|
||||||
|
else
|
||||||
|
Edit;
|
||||||
|
|
||||||
|
RTSetSaveDataCDS(ADOCmd, Tv1, CDS_1, 'Trade_ItemizedList_Sub', 0);
|
||||||
|
if Trim(CDS_1.FieldByName('FtyPCId').AsString) = '' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(adotemp, MFtyPCId, MSJQZ, 'FtyPCId', 3, 0) = False then
|
||||||
|
raise Exception.Create('取缸号失败!');
|
||||||
|
FieldByName('FtyPCId').Value := MFtyPCId;
|
||||||
|
end;
|
||||||
|
FieldByName('TIMID').Value := Trim(maxno);
|
||||||
|
FieldByName('TISId').Value := Trim(Smaxno);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
// Next;
|
||||||
|
// end;
|
||||||
|
end;
|
||||||
|
///////////////////// 保存子表 ///////////////////////////
|
||||||
|
|
||||||
|
ADOCmd.Connection.CommitTrans;
|
||||||
|
|
||||||
|
FTIMID := Trim(maxno);
|
||||||
|
|
||||||
|
CDS_1.EnableControls;
|
||||||
|
Result := True;
|
||||||
|
except
|
||||||
|
ADOCmd.Connection.RollbackTrans;
|
||||||
|
Result := False;
|
||||||
|
CDS_1.EnableControls;
|
||||||
|
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrmItemizedListInPut.TBSaveClick(Sender: TObject);
|
procedure TfrmItemizedListInPut.TBSaveClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
MAXNO1: string;
|
MAXNO1: string;
|
||||||
|
|
@ -569,12 +690,26 @@ begin
|
||||||
Application.MessageBox('单位不能为空!', '提示', 0);
|
Application.MessageBox('单位不能为空!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
if CDS_1.Locate('TISPiece', null, []) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('匹数不能为空!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
if CDS_1.Locate('TISQty', null, []) then
|
if CDS_1.Locate('TISQty', null, []) then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('数量不能为空!', '提示', 0);
|
Application.MessageBox('数量不能为空!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
if CDS_1.Locate('C_ColorNo', null, []) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('色号不能为空!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if CDS_1.Locate('C_Name', null, []) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('色布名称不能为空!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
if CDS_1.Locate('Price', null, []) then
|
if CDS_1.Locate('Price', null, []) then
|
||||||
begin
|
begin
|
||||||
|
|
@ -1308,12 +1443,27 @@ begin
|
||||||
Application.MessageBox('单位不能为空!', '提示', 0);
|
Application.MessageBox('单位不能为空!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
if CDS_1.Locate('C_Name', null, []) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('品名不能为空!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if CDS_1.Locate('C_colorNo', null, []) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('色号不能为空!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if CDS_1.Locate('C_Color', null, []) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('颜色不能为空!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
MTISId := Trim(Self.CDS_1.FieldByName('TISId').AsString);
|
MTISId := Trim(Self.CDS_1.FieldByName('TISId').AsString);
|
||||||
MQtyUnit := Trim(Self.CDS_1.FieldByName('TISUnit').AsString);
|
MQtyUnit := Trim(Self.CDS_1.FieldByName('TISUnit').AsString);
|
||||||
FName := CDS_1.FieldByName('C_Name').ASString;
|
FName := CDS_1.FieldByName('C_Name').ASString;
|
||||||
FColor := CDS_1.FieldByName('C_Color').ASString;
|
FColor := CDS_1.FieldByName('C_Color').ASString;
|
||||||
FColorNo := CDS_1.FieldByName('C_colorNo').ASString;
|
FColorNo := CDS_1.FieldByName('C_colorNo').ASString;
|
||||||
if SaveData() then
|
if SavesubData() then
|
||||||
begin
|
begin
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ uses
|
||||||
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxBarBuiltInMenu, Math,
|
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxBarBuiltInMenu, Math,
|
||||||
dxDateRanges, IdExplicitTLSClientServerBase, U_BaseList, Vcl.Clipbrd,
|
dxDateRanges, IdExplicitTLSClientServerBase, U_BaseList, Vcl.Clipbrd,
|
||||||
dxScrollbarAnnotations, cxProgressBar, FrameDateSel, dxSkinsCore,
|
dxScrollbarAnnotations, cxProgressBar, FrameDateSel, dxSkinsCore,
|
||||||
dxSkinsDefaultPainters;
|
dxSkinsDefaultPainters, System.JSON, uSZHN_JSON;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfrmItemizedListList = class(TfrmBaseList)
|
TfrmItemizedListList = class(TfrmBaseList)
|
||||||
|
|
@ -251,7 +251,7 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
SqlStr := SqlStr + ' order by A.filltime desc';
|
SqlStr := SqlStr + ' order by A.filltime desc';
|
||||||
|
// ShowMessage(SqlStr);
|
||||||
InitCDSData(ADOQueryMain, Order_Main, Tv1, SqlStr, SGetFilters(Panel1, 1, 2), 'TISId');
|
InitCDSData(ADOQueryMain, Order_Main, Tv1, SqlStr, SGetFilters(Panel1, 1, 2), 'TISId');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -392,9 +392,11 @@ end;
|
||||||
|
|
||||||
procedure TfrmItemizedListList.TBPrintClick(Sender: TObject);
|
procedure TfrmItemizedListList.TBPrintClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
MFiltration: string;
|
MFiltration, FTIMID: string;
|
||||||
MPrintJson: string;
|
MPrintJson: string;
|
||||||
|
JSONObject: TJSONObject; // JSON类
|
||||||
begin
|
begin
|
||||||
|
FTIMID := Trim(Self.Order_Main.fieldbyname('TIMID').AsString);
|
||||||
MFiltration := Trim(Self.Order_Main.fieldbyname('TIMNo').AsString);
|
MFiltration := Trim(Self.Order_Main.fieldbyname('TIMNo').AsString);
|
||||||
MPrintJson := ' {"LMType": "ItemizedListList1" ';
|
MPrintJson := ' {"LMType": "ItemizedListList1" ';
|
||||||
MPrintJson := MPrintJson + ' ,"PreviewPrint": true ';
|
MPrintJson := MPrintJson + ' ,"PreviewPrint": true ';
|
||||||
|
|
@ -404,6 +406,28 @@ begin
|
||||||
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" }, ';
|
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" }, ';
|
||||||
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" } ] } ';
|
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" } ] } ';
|
||||||
FromPrintFr3(Application, PChar(DConString), PChar(MPrintJson));
|
FromPrintFr3(Application, PChar(DConString), PChar(MPrintJson));
|
||||||
|
JSONObject := TJSONObject.ParseJSONValue(FromPrintFr3(Application, PChar(DConString), PChar(MPrintJson))) as TJSONObject;
|
||||||
|
if JSONObject.B['succsee'] then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
Sql.Clear;
|
||||||
|
sql.add('update Trade_ItemizedList_Sub set PrtCount=PrtCount+1');
|
||||||
|
sql.Add(' where TIMID= ' + quotedstr(Trim(FTIMID)));
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmItemizedListList.TBRafreshClick(Sender: TObject);
|
procedure TfrmItemizedListList.TBRafreshClick(Sender: TObject);
|
||||||
|
|
@ -606,6 +630,7 @@ procedure TfrmItemizedListList.ToolButton5Click(Sender: TObject);
|
||||||
var
|
var
|
||||||
MFiltration: string;
|
MFiltration: string;
|
||||||
MPrintJson: string;
|
MPrintJson: string;
|
||||||
|
JSONObject: TJSONObject; // JSON类
|
||||||
begin
|
begin
|
||||||
MFiltration := SelCDSKey(Order_Main, ['TISId'])[0];
|
MFiltration := SelCDSKey(Order_Main, ['TISId'])[0];
|
||||||
MPrintJson := ' {"LMType": "ItemizedListList2" ';
|
MPrintJson := ' {"LMType": "ItemizedListList2" ';
|
||||||
|
|
@ -616,6 +641,28 @@ begin
|
||||||
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" }, ';
|
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" }, ';
|
||||||
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" } ] } ';
|
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" } ] } ';
|
||||||
FromPrintFr3(Application, PChar(DConString), PChar(MPrintJson));
|
FromPrintFr3(Application, PChar(DConString), PChar(MPrintJson));
|
||||||
|
JSONObject := TJSONObject.ParseJSONValue(FromPrintFr3(Application, PChar(DConString), PChar(MPrintJson))) as TJSONObject;
|
||||||
|
if JSONObject.B['succsee'] then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
Sql.Clear;
|
||||||
|
sql.add('update Trade_ItemizedList_Sub set PrtCount=PrtCount+1');
|
||||||
|
sql.add('where exists(select * from [dbo].[F_Tool_SplitString](' + quotedstr(MFiltration) + ','','') X where X.RTVALUE=Trade_ItemizedList_Sub.TISId )');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmItemizedListList.cxTabControl1Change(Sender: TObject);
|
procedure TfrmItemizedListList.cxTabControl1Change(Sender: TObject);
|
||||||
|
|
@ -729,6 +776,7 @@ procedure TfrmItemizedListList.ToolButton1Click(Sender: TObject);
|
||||||
var
|
var
|
||||||
MFiltration: string;
|
MFiltration: string;
|
||||||
MPrintJson: string;
|
MPrintJson: string;
|
||||||
|
JSONObject: TJSONObject; // JSON类
|
||||||
begin
|
begin
|
||||||
if Order_Main.IsEmpty then
|
if Order_Main.IsEmpty then
|
||||||
Exit;
|
Exit;
|
||||||
|
|
@ -760,6 +808,30 @@ begin
|
||||||
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" }, ';
|
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" }, ';
|
||||||
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" } ] } ';
|
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" } ] } ';
|
||||||
FromPrintFr3(Application, PChar(DConString), PChar(MPrintJson));
|
FromPrintFr3(Application, PChar(DConString), PChar(MPrintJson));
|
||||||
|
JSONObject := TJSONObject.ParseJSONValue(FromPrintFr3(Application, PChar(DConString), PChar(MPrintJson))) as TJSONObject;
|
||||||
|
if JSONObject.B['succsee'] then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
Sql.Clear;
|
||||||
|
|
||||||
|
sql.add('update Trade_ItemizedList_Sub set PrtCount=PrtCount+1');
|
||||||
|
sql.add('where exists(select * from [dbo].[F_Tool_SplitString](' + quotedstr(MFiltration) + ','','') X where X.RTVALUE=Trade_ItemizedList_Sub.TISId )');
|
||||||
|
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmItemizedListList.ToolButton2Click(Sender: TObject);
|
procedure TfrmItemizedListList.ToolButton2Click(Sender: TObject);
|
||||||
|
|
|
||||||
|
|
@ -227,7 +227,7 @@ inherited frmItemizedListQtyInPut: TfrmItemizedListQtyInPut
|
||||||
end
|
end
|
||||||
object inQty: TcxCurrencyEdit
|
object inQty: TcxCurrencyEdit
|
||||||
Left = 231
|
Left = 231
|
||||||
Top = 3
|
Top = 6
|
||||||
Properties.AssignedValues.DisplayFormat = True
|
Properties.AssignedValues.DisplayFormat = True
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
OnKeyPress = inQtyKeyPress
|
OnKeyPress = inQtyKeyPress
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,7 @@ type
|
||||||
procedure TBSaveClick(Sender: TObject);
|
procedure TBSaveClick(Sender: TObject);
|
||||||
procedure btnAddClick(Sender: TObject);
|
procedure btnAddClick(Sender: TObject);
|
||||||
procedure Tv1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
procedure Tv1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
private
|
private
|
||||||
{ Private declarations }
|
{ Private declarations }
|
||||||
function SaveData(): Boolean;
|
function SaveData(): Boolean;
|
||||||
|
|
@ -232,6 +233,7 @@ end;
|
||||||
|
|
||||||
procedure TfrmItemizedListQtyInPut.btnAddClick(Sender: TObject);
|
procedure TfrmItemizedListQtyInPut.btnAddClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
|
||||||
if CDS_Sub.IsEmpty = False then
|
if CDS_Sub.IsEmpty = False then
|
||||||
begin
|
begin
|
||||||
CopyAddRowCDS(CDS_Sub);
|
CopyAddRowCDS(CDS_Sub);
|
||||||
|
|
@ -350,6 +352,12 @@ begin
|
||||||
Action := caFree;
|
Action := caFree;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmItemizedListQtyInPut.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
frmItemizedListQtyInPut := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
function TfrmItemizedListQtyInPut.SaveData(): Boolean;
|
function TfrmItemizedListQtyInPut.SaveData(): Boolean;
|
||||||
var
|
var
|
||||||
Maxno, MBCIOID: string;
|
Maxno, MBCIOID: string;
|
||||||
|
|
@ -447,6 +455,8 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmItemizedListQtyInPut.FormShow(Sender: TObject);
|
procedure TfrmItemizedListQtyInPut.FormShow(Sender: TObject);
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
ReadCxGrid('Âëµ¥µÇ¼Ç', Tv1, 'óÒ×»ã×ֿܲâ');
|
ReadCxGrid('Âëµ¥µÇ¼Ç', Tv1, 'óÒ×»ã×ֿܲâ');
|
||||||
|
|
@ -461,6 +471,9 @@ begin
|
||||||
CreateDataSet;
|
CreateDataSet;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
tv1.BeginUpdate();
|
||||||
|
CDS_Sub.DisableControls;
|
||||||
with ADOQueryTemp do
|
with ADOQueryTemp do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
|
|
@ -471,9 +484,30 @@ begin
|
||||||
sql.Add(' order by qty desc ');
|
sql.Add(' order by qty desc ');
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
SCreateCDS(ADOQueryTemp, CDS_Sub);
|
SCreateCDS(ADOQueryTemp, CDS_Sub);
|
||||||
SInitCDSData(ADOQueryTemp, CDS_Sub);
|
SInitCDSData(ADOQueryTemp, CDS_Sub);
|
||||||
|
finally
|
||||||
|
CDS_Sub.EnableControls;
|
||||||
|
TV1.DataController.Filter.Clear;
|
||||||
|
tv1.EndUpdate;
|
||||||
|
end;
|
||||||
|
if CDS_Sub.IsEmpty then
|
||||||
|
begin
|
||||||
|
for i := 1 to 50 do
|
||||||
|
begin
|
||||||
|
CopyAddRowCDS(CDS_Sub);
|
||||||
|
with CDS_Sub do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('BCIOID').Value := null;
|
||||||
|
FieldByName('StkCoNo').Value := '±¾³§²Ö¿â';
|
||||||
|
FieldByName('StkCoName').Value := '±¾³§²Ö¿â';
|
||||||
|
post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmItemizedListQtyInPut.FromCoNameDblClick(Sender: TObject);
|
procedure TfrmItemizedListQtyInPut.FromCoNameDblClick(Sender: TObject);
|
||||||
|
|
@ -488,6 +522,7 @@ var
|
||||||
begin
|
begin
|
||||||
if Key = #13 then
|
if Key = #13 then
|
||||||
begin
|
begin
|
||||||
|
|
||||||
with CDS_Sub do
|
with CDS_Sub do
|
||||||
begin
|
begin
|
||||||
DisableControls;
|
DisableControls;
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,8 @@ inherited frmPlanScanInEdit: TfrmPlanScanInEdit
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
end
|
end
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
Left = 470
|
Left = 1070
|
||||||
Top = 67
|
Top = 78
|
||||||
Width = 66
|
Width = 66
|
||||||
Height = 33
|
Height = 33
|
||||||
Caption = #21306#22495
|
Caption = #21306#22495
|
||||||
|
|
@ -48,10 +48,11 @@ inherited frmPlanScanInEdit: TfrmPlanScanInEdit
|
||||||
Font.Name = #23435#20307
|
Font.Name = #23435#20307
|
||||||
Font.Style = [fsBold]
|
Font.Style = [fsBold]
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
end
|
end
|
||||||
object Label2: TLabel
|
object Label2: TLabel
|
||||||
Left = 670
|
Left = 670
|
||||||
Top = 67
|
Top = 51
|
||||||
Width = 66
|
Width = 66
|
||||||
Height = 33
|
Height = 33
|
||||||
Caption = #36710#36742
|
Caption = #36710#36742
|
||||||
|
|
@ -64,7 +65,7 @@ inherited frmPlanScanInEdit: TfrmPlanScanInEdit
|
||||||
end
|
end
|
||||||
object Label5: TLabel
|
object Label5: TLabel
|
||||||
Left = 1016
|
Left = 1016
|
||||||
Top = 41
|
Top = 148
|
||||||
Width = 48
|
Width = 48
|
||||||
Height = 17
|
Height = 17
|
||||||
Caption = #20837#24211#21333#21495
|
Caption = #20837#24211#21333#21495
|
||||||
|
|
@ -72,7 +73,7 @@ inherited frmPlanScanInEdit: TfrmPlanScanInEdit
|
||||||
end
|
end
|
||||||
object Label4: TLabel
|
object Label4: TLabel
|
||||||
Left = 1022
|
Left = 1022
|
||||||
Top = 72
|
Top = 179
|
||||||
Width = 48
|
Width = 48
|
||||||
Height = 17
|
Height = 17
|
||||||
Caption = #20837#24211#26102#38388
|
Caption = #20837#24211#26102#38388
|
||||||
|
|
@ -80,12 +81,25 @@ inherited frmPlanScanInEdit: TfrmPlanScanInEdit
|
||||||
end
|
end
|
||||||
object Label11: TLabel
|
object Label11: TLabel
|
||||||
Left = 1022
|
Left = 1022
|
||||||
Top = 98
|
Top = 205
|
||||||
Width = 48
|
Width = 48
|
||||||
Height = 17
|
Height = 17
|
||||||
Caption = #20837#24211#31867#22411
|
Caption = #20837#24211#31867#22411
|
||||||
Visible = False
|
Visible = False
|
||||||
end
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 471
|
||||||
|
Top = 54
|
||||||
|
Width = 66
|
||||||
|
Height = 33
|
||||||
|
Caption = #21496#26426
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -32
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
object ToolBar3: TToolBar
|
object ToolBar3: TToolBar
|
||||||
Tag = 1
|
Tag = 1
|
||||||
Left = 1
|
Left = 1
|
||||||
|
|
@ -116,17 +130,8 @@ inherited frmPlanScanInEdit: TfrmPlanScanInEdit
|
||||||
ImageIndex = 21
|
ImageIndex = 21
|
||||||
OnClick = ToolButton3Click
|
OnClick = ToolButton3Click
|
||||||
end
|
end
|
||||||
object ToolButton5: TToolButton
|
|
||||||
Left = 87
|
|
||||||
Top = 0
|
|
||||||
AutoSize = True
|
|
||||||
Caption = #24211#20301#36873#25321
|
|
||||||
ImageIndex = 8
|
|
||||||
Visible = False
|
|
||||||
OnClick = ToolButton5Click
|
|
||||||
end
|
|
||||||
object ToolButton8: TToolButton
|
object ToolButton8: TToolButton
|
||||||
Left = 174
|
Left = 87
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #20445#23384#26684#24335
|
Caption = #20445#23384#26684#24335
|
||||||
|
|
@ -134,7 +139,7 @@ inherited frmPlanScanInEdit: TfrmPlanScanInEdit
|
||||||
OnClick = ToolButton8Click
|
OnClick = ToolButton8Click
|
||||||
end
|
end
|
||||||
object ToolButton7: TToolButton
|
object ToolButton7: TToolButton
|
||||||
Left = 261
|
Left = 174
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #20851#38381
|
Caption = #20851#38381
|
||||||
|
|
@ -142,7 +147,7 @@ inherited frmPlanScanInEdit: TfrmPlanScanInEdit
|
||||||
OnClick = ToolButton7Click
|
OnClick = ToolButton7Click
|
||||||
end
|
end
|
||||||
object btnGetOutNo: TToolButton
|
object btnGetOutNo: TToolButton
|
||||||
Left = 324
|
Left = 237
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #21462#21495
|
Caption = #21462#21495
|
||||||
|
|
@ -167,16 +172,17 @@ inherited frmPlanScanInEdit: TfrmPlanScanInEdit
|
||||||
end
|
end
|
||||||
object wlCompany: TBtnEditA
|
object wlCompany: TBtnEditA
|
||||||
Tag = 1
|
Tag = 1
|
||||||
Left = 535
|
Left = 1135
|
||||||
Top = 69
|
Top = 80
|
||||||
Width = 121
|
Width = 121
|
||||||
Height = 26
|
Height = 26
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
Visible = False
|
||||||
OnBtnClick = wlCompanyBtnClick
|
OnBtnClick = wlCompanyBtnClick
|
||||||
end
|
end
|
||||||
object InNo: TEdit
|
object InNo: TEdit
|
||||||
Left = 1070
|
Left = 1070
|
||||||
Top = 37
|
Top = 144
|
||||||
Width = 100
|
Width = 100
|
||||||
Height = 25
|
Height = 25
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
|
|
@ -184,7 +190,7 @@ inherited frmPlanScanInEdit: TfrmPlanScanInEdit
|
||||||
end
|
end
|
||||||
object CRTime: TDateTimePicker
|
object CRTime: TDateTimePicker
|
||||||
Left = 1070
|
Left = 1070
|
||||||
Top = 68
|
Top = 175
|
||||||
Width = 100
|
Width = 100
|
||||||
Height = 20
|
Height = 20
|
||||||
Date = 41337.000000000000000000
|
Date = 41337.000000000000000000
|
||||||
|
|
@ -195,7 +201,7 @@ inherited frmPlanScanInEdit: TfrmPlanScanInEdit
|
||||||
end
|
end
|
||||||
object CRType: TComboBox
|
object CRType: TComboBox
|
||||||
Left = 1070
|
Left = 1070
|
||||||
Top = 94
|
Top = 201
|
||||||
Width = 100
|
Width = 100
|
||||||
Height = 25
|
Height = 25
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
|
|
@ -210,7 +216,7 @@ inherited frmPlanScanInEdit: TfrmPlanScanInEdit
|
||||||
object carPlate: TBtnEditA
|
object carPlate: TBtnEditA
|
||||||
Tag = 1
|
Tag = 1
|
||||||
Left = 742
|
Left = 742
|
||||||
Top = 70
|
Top = 54
|
||||||
Width = 121
|
Width = 121
|
||||||
Height = 26
|
Height = 26
|
||||||
TabOrder = 6
|
TabOrder = 6
|
||||||
|
|
@ -231,6 +237,24 @@ inherited frmPlanScanInEdit: TfrmPlanScanInEdit
|
||||||
TabOrder = 7
|
TabOrder = 7
|
||||||
OnClick = TquerenClick
|
OnClick = TquerenClick
|
||||||
end
|
end
|
||||||
|
object Driver: TBtnEditA
|
||||||
|
Tag = 1
|
||||||
|
Left = 536
|
||||||
|
Top = 56
|
||||||
|
Width = 121
|
||||||
|
Height = 26
|
||||||
|
TabOrder = 8
|
||||||
|
OnBtnClick = DriverBtnClick
|
||||||
|
end
|
||||||
|
object Driverid: TEdit
|
||||||
|
Tag = 1
|
||||||
|
Left = 1102
|
||||||
|
Top = 26
|
||||||
|
Width = 100
|
||||||
|
Height = 25
|
||||||
|
TabOrder = 9
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object Panel2: TPanel [1]
|
object Panel2: TPanel [1]
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,6 @@ type
|
||||||
edtScan: TEdit;
|
edtScan: TEdit;
|
||||||
Label6: TLabel;
|
Label6: TLabel;
|
||||||
Label1: TLabel;
|
Label1: TLabel;
|
||||||
ToolButton5: TToolButton;
|
|
||||||
Label2: TLabel;
|
Label2: TLabel;
|
||||||
wlCompany: TBtnEditA;
|
wlCompany: TBtnEditA;
|
||||||
Label5: TLabel;
|
Label5: TLabel;
|
||||||
|
|
@ -71,6 +70,9 @@ type
|
||||||
carPlate: TBtnEditA;
|
carPlate: TBtnEditA;
|
||||||
Tv3Column1: TcxGridDBColumn;
|
Tv3Column1: TcxGridDBColumn;
|
||||||
Tqueren: TButton;
|
Tqueren: TButton;
|
||||||
|
Label3: TLabel;
|
||||||
|
Driver: TBtnEditA;
|
||||||
|
Driverid: TEdit;
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
|
|
@ -79,15 +81,16 @@ type
|
||||||
procedure ToolButton7Click(Sender: TObject);
|
procedure ToolButton7Click(Sender: TObject);
|
||||||
procedure ToolButton8Click(Sender: TObject);
|
procedure ToolButton8Click(Sender: TObject);
|
||||||
procedure edtScanKeyPress(Sender: TObject; var Key: Char);
|
procedure edtScanKeyPress(Sender: TObject; var Key: Char);
|
||||||
procedure ToolButton5Click(Sender: TObject);
|
|
||||||
procedure wlCompanyBtnClick(Sender: TObject);
|
procedure wlCompanyBtnClick(Sender: TObject);
|
||||||
procedure carPlateBtnClick(Sender: TObject);
|
procedure carPlateBtnClick(Sender: TObject);
|
||||||
procedure TquerenClick(Sender: TObject);
|
procedure TquerenClick(Sender: TObject);
|
||||||
|
procedure DriverBtnClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
{ Private declarations }
|
{ Private declarations }
|
||||||
FScan, FSubIds, FZCID: string;
|
FScan, FSubIds, FZCID: string;
|
||||||
procedure PlayWav(MWav: string);
|
procedure PlayWav(MWav: string);
|
||||||
procedure InitKC();
|
procedure InitKC();
|
||||||
|
procedure InitStatus();
|
||||||
procedure ScanKW();
|
procedure ScanKW();
|
||||||
procedure ScanCIID();
|
procedure ScanCIID();
|
||||||
function SaveData(): Boolean;
|
function SaveData(): Boolean;
|
||||||
|
|
@ -102,7 +105,7 @@ var
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
U_DataLink, U_RTFun, U_LabelPrint, U_ZDYHelp, U_MachineManageSel; //U_TradeClothWaitStorage, U_PositionSel
|
U_DataLink, U_RTFun, U_LabelPrint, U_ZDYHelp, U_MachineManageSel, U_UserSel; //U_TradeClothWaitStorage, U_PositionSel
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
@ -266,25 +269,6 @@ begin
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmPlanScanInEdit.ToolButton5Click(Sender: TObject);
|
|
||||||
begin
|
|
||||||
inherited;
|
|
||||||
{ try
|
|
||||||
frmPositionSel := TfrmPositionSel.Create(Application);
|
|
||||||
with frmPositionSel do
|
|
||||||
begin
|
|
||||||
if ShowModal = 1 then
|
|
||||||
begin
|
|
||||||
IOPosition.Text := CDS_1.FieldByName('POSNO').AsString;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
finally
|
|
||||||
frmPositionSel.Free;
|
|
||||||
btnGetOutNo.Click;
|
|
||||||
initkc();
|
|
||||||
end; }
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmPlanScanInEdit.wlCompanyBtnClick(Sender: TObject);
|
procedure TfrmPlanScanInEdit.wlCompanyBtnClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
|
|
@ -321,6 +305,25 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmPlanScanInEdit.DriverBtnClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
|
||||||
|
try
|
||||||
|
frmUserSel := TfrmUserSel.Create(Application);
|
||||||
|
with frmUserSel do
|
||||||
|
begin
|
||||||
|
Fdept := '送货组';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
self.Driverid.Text := Trim(CDS_1.fieldbyname('EECode').AsString);
|
||||||
|
self.Driver.Text := Trim(CDS_1.fieldbyname('EEName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmUserSel.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrmPlanScanInEdit.btnGetOutNoClick(Sender: TObject);
|
procedure TfrmPlanScanInEdit.btnGetOutNoClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
maxNo: string;
|
maxNo: string;
|
||||||
|
|
@ -352,7 +355,7 @@ begin
|
||||||
if SaveData() then
|
if SaveData() then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('±£´æ³É¹¦!', 'Ìáʾ', 0);
|
Application.MessageBox('±£´æ³É¹¦!', 'Ìáʾ', 0);
|
||||||
//ModalResult:=1;
|
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
@ -440,12 +443,11 @@ begin
|
||||||
// RTSetSaveDataCDS(ADOQueryCmd, Tv3, CDS_3, 'Trade_Market_CarTransportSub', 0);
|
// RTSetSaveDataCDS(ADOQueryCmd, Tv3, CDS_3, 'Trade_Market_CarTransportSub', 0);
|
||||||
FieldByName('ZCID').Value := Trim(MaxMid);
|
FieldByName('ZCID').Value := Trim(MaxMid);
|
||||||
FieldByName('ZCMXID').Value := Trim(MaxSid);
|
FieldByName('ZCMXID').Value := Trim(MaxSid);
|
||||||
|
|
||||||
FieldByName('TmMno').Value := CDS_3.fieldbyname('TMMNo').Value;
|
FieldByName('TmMno').Value := CDS_3.fieldbyname('TMMNo').Value;
|
||||||
FieldByName('TmMid').Value := CDS_3.fieldbyname('TMMId').Value;
|
FieldByName('TmMid').Value := CDS_3.fieldbyname('TMMId').Value;
|
||||||
|
|
||||||
Post;
|
Post;
|
||||||
end;
|
end;
|
||||||
|
InitStatus();
|
||||||
CDS_3.Edit;
|
CDS_3.Edit;
|
||||||
CDS_3.FieldByName('ZCMXID').Value := Trim(MaxSid);
|
CDS_3.FieldByName('ZCMXID').Value := Trim(MaxSid);
|
||||||
Next;
|
Next;
|
||||||
|
|
@ -463,5 +465,37 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmPlanScanInEdit.InitStatus();
|
||||||
|
begin
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('update Trade_Market_Main SET status=''9'' ');
|
||||||
|
sql.Add('where TMMId=' + quotedstr(trim(CDS_3.fieldbyname('TMMId').AsString)));
|
||||||
|
|
||||||
|
sql.Add('insert into Finance_Need_Up(UType,UDataId,UOperation,UOperator,UModule,UDetails) ');
|
||||||
|
sql.Add('values(''贸易布坯出库'' ');
|
||||||
|
sql.Add(',' + quotedstr(trim(CDS_3.fieldbyname('TMMId').AsString)));
|
||||||
|
sql.Add(',''完成'' ');
|
||||||
|
sql.Add(',' + quotedstr(DName));
|
||||||
|
sql.Add(',' + quotedstr(trim(self.Caption)));
|
||||||
|
sql.Add(',' + quotedstr(trim(CDS_3.fieldbyname('TMMId').AsString)));
|
||||||
|
sql.Add(') ');
|
||||||
|
|
||||||
|
sql.Add('insert into SY_SysLog(operor,opertime,Model,acction,opevent,result) values( ');
|
||||||
|
sql.Add(' ' + quotedstr(trim(DName)));
|
||||||
|
sql.Add(',getdate() ');
|
||||||
|
sql.Add(',' + quotedstr(trim(self.Caption)));
|
||||||
|
sql.Add(',' + quotedstr(trim('计划单完成')));
|
||||||
|
sql.Add(',' + quotedstr(trim('计划单号:' + trim(CDS_3.FieldByName('TMMNO').AsString))));
|
||||||
|
sql.Add(',' + quotedstr(trim('成功')));
|
||||||
|
sql.Add(')');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ inherited frmTradeClothTotalInInput: TfrmTradeClothTotalInInput
|
||||||
Height = 518
|
Height = 518
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
ExplicitTop = 36
|
|
||||||
object Tv1: TcxGridDBTableView
|
object Tv1: TcxGridDBTableView
|
||||||
OnMouseDown = Tv1MouseDown
|
OnMouseDown = Tv1MouseDown
|
||||||
Navigator.Buttons.CustomButtons = <>
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
|
|
||||||
|
|
@ -181,8 +181,11 @@ begin
|
||||||
FieldByName('IOTime').Value := Trim(FormatDateTime('yyyy-MM-dd', Now));
|
FieldByName('IOTime').Value := Trim(FormatDateTime('yyyy-MM-dd', Now));
|
||||||
FieldByName('StkCoNo').Value := '本厂仓库';
|
FieldByName('StkCoNo').Value := '本厂仓库';
|
||||||
FieldByName('StkCoName').Value := '本厂仓库';
|
FieldByName('StkCoName').Value := '本厂仓库';
|
||||||
|
FieldByName('FromCoNo').Value := 'G0001';
|
||||||
|
FieldByName('FromCoName').Value := 'Ⱦ³§¹©Ó¦ÉÌ';
|
||||||
FieldByName('QtyUnit').Value := 'Kg';
|
FieldByName('QtyUnit').Value := 'Kg';
|
||||||
FieldByName('C_Degree').AsString := Trim('坯布');
|
FieldByName('C_Degree').AsString := Trim('坯布');
|
||||||
|
FieldByName('IOType').Value := '²É¹ºÈë¿â';
|
||||||
Post;
|
Post;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
|
||||||
|
|
@ -197,8 +197,9 @@ type
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
U_DataLink, U_RTFun, U_TradeTotallClothOutinput, U_AttachmentUpload,U_ProgressUpdate,
|
U_DataLink, U_RTFun, U_TradeTotallClothOutinput, U_AttachmentUpload,
|
||||||
U_LabelPrint, U_PrintLabFun, U_dynamicsDll, U_printPdf, U_InputReceiptType;
|
U_ProgressUpdate, U_LabelPrint, U_PrintLabFun, U_dynamicsDll, U_printPdf,
|
||||||
|
U_InputReceiptType;
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
procedure TfrmTradeClothTotalOutList.InitGrid(MWSql: string);
|
procedure TfrmTradeClothTotalOutList.InitGrid(MWSql: string);
|
||||||
|
|
@ -481,16 +482,15 @@ begin
|
||||||
|
|
||||||
if ShowModal = 1 then
|
if ShowModal = 1 then
|
||||||
begin
|
begin
|
||||||
|
// with ADOQueryCmd do
|
||||||
with ADOQueryCmd do
|
// begin
|
||||||
begin
|
// Close;
|
||||||
Close;
|
// sql.Clear;
|
||||||
sql.Clear;
|
// sql.Add('update BS_Cloth_IO ');
|
||||||
sql.Add('update BS_Cloth_IO ');
|
// sql.Add(' set ReceiptType=' + quotedstr(frmInputReceiptType.cxComboBox1.Text));
|
||||||
sql.Add(' set ReceiptType=' + quotedstr(frmInputReceiptType.cxComboBox1.Text));
|
// sql.Add(' where BCIONo=' + QuotedStr(Trim(MBCIONo)));
|
||||||
sql.Add(' where BCIONo=' + QuotedStr(Trim(MBCIONo)));
|
// ExecSQL;
|
||||||
ExecSQL;
|
// end;
|
||||||
end;
|
|
||||||
Self.InitGrid2();
|
Self.InitGrid2();
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
|
||||||
|
|
@ -258,7 +258,7 @@ begin
|
||||||
SqlStr := SqlStr + ' @pageIndex=' + inttostr(CurrentPage);
|
SqlStr := SqlStr + ' @pageIndex=' + inttostr(CurrentPage);
|
||||||
SqlStr := SqlStr + ' ,@pageSize=' + inttostr(RecordsNumber);
|
SqlStr := SqlStr + ' ,@pageSize=' + inttostr(RecordsNumber);
|
||||||
SqlStr := SqlStr + ' ,@criteria= ' + quotedstr(WSql);
|
SqlStr := SqlStr + ' ,@criteria= ' + quotedstr(WSql);
|
||||||
showmessage(SqlStr);
|
// showmessage(SqlStr);
|
||||||
InitCDSData(ADO_1, CDS_1, Tv1, SqlStr, SGetFilters(Panel1, 1, 2), 'C_Code');
|
InitCDSData(ADO_1, CDS_1, Tv1, SqlStr, SGetFilters(Panel1, 1, 2), 'C_Code');
|
||||||
LBCPAP.Caption := inttostr(CurrentPage) + '/' + inttostr(ceil(CDS_1.FieldByName('TotalCount').AsInteger / RecordsNumber));
|
LBCPAP.Caption := inttostr(CurrentPage) + '/' + inttostr(ceil(CDS_1.FieldByName('TotalCount').AsInteger / RecordsNumber));
|
||||||
end;
|
end;
|
||||||
|
|
|
||||||
9
T03贸易布匹检验/AJCYData10.INI
Normal file
9
T03贸易布匹检验/AJCYData10.INI
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
[系统配置]
|
||||||
|
串口号=COM2
|
||||||
|
波特率=19200
|
||||||
|
校验位=0
|
||||||
|
数据位=8
|
||||||
|
停止位=0
|
||||||
|
频率=1000
|
||||||
|
数据端口=1301
|
||||||
|
清零命令=55AA0A0B0014
|
||||||
|
|
@ -51,7 +51,8 @@ uses
|
||||||
U_TradeClothTotalOutSel in 'U_TradeClothTotalOutSel.pas' {frmTradeClothTotalOutSel},
|
U_TradeClothTotalOutSel in 'U_TradeClothTotalOutSel.pas' {frmTradeClothTotalOutSel},
|
||||||
U_CustomFun in '..\A00通用方法\U_CustomFun.pas',
|
U_CustomFun in '..\A00通用方法\U_CustomFun.pas',
|
||||||
uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas',
|
uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas',
|
||||||
U_ProgressUpdate in '..\A00通用方法\U_ProgressUpdate.pas';
|
U_ProgressUpdate in '..\A00通用方法\U_ProgressUpdate.pas',
|
||||||
|
Unit2 in 'Unit2.pas' {Form2};
|
||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -304,6 +304,10 @@
|
||||||
<DCCReference Include="..\A00通用方法\U_CustomFun.pas"/>
|
<DCCReference Include="..\A00通用方法\U_CustomFun.pas"/>
|
||||||
<DCCReference Include="..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas"/>
|
<DCCReference Include="..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas"/>
|
||||||
<DCCReference Include="..\A00通用方法\U_ProgressUpdate.pas"/>
|
<DCCReference Include="..\A00通用方法\U_ProgressUpdate.pas"/>
|
||||||
|
<DCCReference Include="Unit2.pas">
|
||||||
|
<Form>Form2</Form>
|
||||||
|
<FormType>dfm</FormType>
|
||||||
|
</DCCReference>
|
||||||
<BuildConfiguration Include="Debug">
|
<BuildConfiguration Include="Debug">
|
||||||
<Key>Cfg_2</Key>
|
<Key>Cfg_2</Key>
|
||||||
<CfgParent>Base</CfgParent>
|
<CfgParent>Base</CfgParent>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
端口号=
|
端口号=
|
||||||
电子秤调用Dll文件=
|
电子秤调用Dll文件=
|
||||||
启用电子秤Dll文件=1
|
启用电子秤Dll文件=1
|
||||||
码表调用Dll文件=
|
码表调用Dll文件=AJCYData10.dll
|
||||||
启用码表Dll文件=1
|
启用码表Dll文件=1
|
||||||
启用码表单位=1
|
启用码表单位=1
|
||||||
标签份数=2
|
标签份数=2
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,9 @@ implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
U_DataLink, U_globalVar, U_iniParam, U_TradeMachInsp, U_ProductJYHZList,
|
U_DataLink, U_globalVar, U_iniParam, U_TradeMachInsp, U_ProductJYHZList,
|
||||||
U_DeviceJkTest, U_TradeClothInspList, U_MachRollMain, U_TradePack,
|
U_DeviceJkTest, U_TradeClothInspList, U_MachRollMain, U_TradePack, Unit2,
|
||||||
U_DjdDjClList, U_TradeClothTotalCXJYOutList,U_MachRollMarket,U_MachRollMain_M;
|
U_DjdDjClList, U_TradeClothTotalCXJYOutList, U_MachRollMarket,
|
||||||
|
U_MachRollMain_M;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////
|
||||||
// 功能说明:取Dll中得窗体 //
|
// 功能说明:取Dll中得窗体 //
|
||||||
|
|
@ -133,7 +134,7 @@ begin
|
||||||
|
|
||||||
2: //测试
|
2: //测试
|
||||||
begin
|
begin
|
||||||
with TfrmDeviceJkTest.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10),formId,title) do //
|
with TfrmDeviceJkTest.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10), FormID, Title) do //
|
||||||
begin
|
begin
|
||||||
fFormID := FormID;
|
fFormID := FormID;
|
||||||
FormStyle := mstyle;
|
FormStyle := mstyle;
|
||||||
|
|
@ -157,7 +158,7 @@ begin
|
||||||
|
|
||||||
1: //机台检验
|
1: //机台检验
|
||||||
begin
|
begin
|
||||||
with TfrmMachRollMain.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10),formId,title) do //
|
with TfrmMachRollMain.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10), FormID, Title) do //
|
||||||
begin
|
begin
|
||||||
fFormID := FormID;
|
fFormID := FormID;
|
||||||
// FormStyle := mstyle;
|
// FormStyle := mstyle;
|
||||||
|
|
@ -166,9 +167,10 @@ begin
|
||||||
mnewHandle := Handle;
|
mnewHandle := Handle;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
11: //机台检验
|
11: //机台检验
|
||||||
begin
|
begin
|
||||||
with TfrmMachRollMain_M.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10),formId,title) do //
|
with TfrmMachRollMain_M.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10), FormID, Title) do //
|
||||||
begin
|
begin
|
||||||
fFormID := FormID;
|
fFormID := FormID;
|
||||||
// FormStyle := mstyle;
|
// FormStyle := mstyle;
|
||||||
|
|
|
||||||
|
|
@ -552,7 +552,7 @@ inherited frmMachRollMain: TfrmMachRollMain
|
||||||
end
|
end
|
||||||
object Button1: TButton
|
object Button1: TButton
|
||||||
Left = 309
|
Left = 309
|
||||||
Top = 244
|
Top = 249
|
||||||
Width = 150
|
Width = 150
|
||||||
Height = 59
|
Height = 59
|
||||||
Caption = #20986' '#24211
|
Caption = #20986' '#24211
|
||||||
|
|
@ -973,8 +973,8 @@ inherited frmMachRollMain: TfrmMachRollMain
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object cxGroupBox_keys: TcxGroupBox [2]
|
object cxGroupBox_keys: TcxGroupBox [2]
|
||||||
Left = 295
|
Left = 496
|
||||||
Top = 321
|
Top = 119
|
||||||
Caption = #34394#25311#38190#30424
|
Caption = #34394#25311#38190#30424
|
||||||
Style.LookAndFeel.NativeStyle = False
|
Style.LookAndFeel.NativeStyle = False
|
||||||
StyleDisabled.LookAndFeel.NativeStyle = False
|
StyleDisabled.LookAndFeel.NativeStyle = False
|
||||||
|
|
@ -997,7 +997,6 @@ inherited frmMachRollMain: TfrmMachRollMain
|
||||||
inherited dxPanel1: TdxPanel
|
inherited dxPanel1: TdxPanel
|
||||||
Width = 323
|
Width = 323
|
||||||
Height = 257
|
Height = 257
|
||||||
ExplicitTop = -3
|
|
||||||
ExplicitWidth = 323
|
ExplicitWidth = 323
|
||||||
ExplicitHeight = 257
|
ExplicitHeight = 257
|
||||||
inherited SpeedButton1: TSpeedButton
|
inherited SpeedButton1: TSpeedButton
|
||||||
|
|
@ -1051,8 +1050,8 @@ inherited frmMachRollMain: TfrmMachRollMain
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object MovePanel1: TMovePanel
|
object MovePanel1: TMovePanel
|
||||||
Left = 79
|
Left = 170
|
||||||
Top = -28
|
Top = -12
|
||||||
Width = 237
|
Width = 237
|
||||||
Height = 45
|
Height = 45
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
|
|
|
||||||
|
|
@ -210,6 +210,7 @@ type
|
||||||
procedure InitGrid2();
|
procedure InitGrid2();
|
||||||
procedure OpenCom(DllName: string);
|
procedure OpenCom(DllName: string);
|
||||||
procedure CloseCom(DllName: string);
|
procedure CloseCom(DllName: string);
|
||||||
|
procedure clearCom(DllName: string);
|
||||||
function SaveData(): Boolean;
|
function SaveData(): Boolean;
|
||||||
procedure PrtData(MCIID: string; againPring: Boolean = false);
|
procedure PrtData(MCIID: string; againPring: Boolean = false);
|
||||||
procedure BadSpeedButtonClick(Sender: TObject);
|
procedure BadSpeedButtonClick(Sender: TObject);
|
||||||
|
|
@ -237,6 +238,38 @@ uses
|
||||||
U_ProgressUpdate, U_LabelPrint, U_TradeClothTotalOutSel;
|
U_ProgressUpdate, U_LabelPrint, U_TradeClothTotalOutSel;
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmMachRollMain.ClearCom(DllName: string);
|
||||||
|
type
|
||||||
|
TMyFunc = function(sCommName: PAnsiChar): hwnd; stdcall;
|
||||||
|
var
|
||||||
|
Tf1: TMyFunc;
|
||||||
|
Tp1: TFarProc;
|
||||||
|
Th1: Thandle;
|
||||||
|
begin
|
||||||
|
Th1 := LoadLibrary(pchar(trim(DllName)));
|
||||||
|
if Th1 > 0 then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Tp1 := GetProcAddress(Th1, 'CommClear');
|
||||||
|
if Tp1 <> nil then
|
||||||
|
begin
|
||||||
|
Tf1 := TMyFunc(Tp1);
|
||||||
|
newh1 := Tf1('Comm1');
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
// FreeLibrary(Th1);
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(pchar('找不到 ' + trim(DllName) + ' 文件!'), '提示');
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrmMachRollMain.InitGrid2();
|
procedure TfrmMachRollMain.InitGrid2();
|
||||||
var
|
var
|
||||||
SqlStr: string;
|
SqlStr: string;
|
||||||
|
|
@ -352,6 +385,10 @@ begin
|
||||||
finally
|
finally
|
||||||
BTPrint.Enabled := true;
|
BTPrint.Enabled := true;
|
||||||
end;
|
end;
|
||||||
|
if fIsCommopen then
|
||||||
|
begin
|
||||||
|
ClearCom(MBDYDllName);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmMachRollMain.bt_printmdClick(Sender: TObject);
|
procedure TfrmMachRollMain.bt_printmdClick(Sender: TObject);
|
||||||
|
|
@ -421,7 +458,7 @@ var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
BTPrint.Enabled := false;
|
Button1.Enabled := false;
|
||||||
MTMSId := Trim(SelTVKey(Tv2, ['TMSId'])[0]);
|
MTMSId := Trim(SelTVKey(Tv2, ['TMSId'])[0]);
|
||||||
edtScan.SetFocus;
|
edtScan.SetFocus;
|
||||||
|
|
||||||
|
|
@ -449,7 +486,10 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
FCIID := trim(trim(ADOQueryBaseCmd.fieldbyName('MaxIOID2').AsString));
|
FCIID := trim(trim(ADOQueryBaseCmd.fieldbyName('MaxIOID2').AsString));
|
||||||
|
if trim(cds_params.fieldbyName('outPage').AsString) = '√' then
|
||||||
|
begin
|
||||||
|
PrtData(FCIID);
|
||||||
|
end;
|
||||||
ADOQueryBaseCmd.Connection.CommitTrans;
|
ADOQueryBaseCmd.Connection.CommitTrans;
|
||||||
TradeMarketProgressUpdate(ADOQueryBaseCmd, MTMSId);
|
TradeMarketProgressUpdate(ADOQueryBaseCmd, MTMSId);
|
||||||
except
|
except
|
||||||
|
|
@ -463,7 +503,11 @@ begin
|
||||||
InitGrid2();
|
InitGrid2();
|
||||||
FCIID := '';
|
FCIID := '';
|
||||||
finally
|
finally
|
||||||
BTPrint.Enabled := true;
|
Button1.Enabled := true;
|
||||||
|
end;
|
||||||
|
if fIsCommopen then
|
||||||
|
begin
|
||||||
|
ClearCom(MBDYDllName);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -828,6 +872,7 @@ begin
|
||||||
SQL.Clear;
|
SQL.Clear;
|
||||||
SQL.Add(' EXEC P_BS_Cloth_Prt2 ');
|
SQL.Add(' EXEC P_BS_Cloth_Prt2 ');
|
||||||
SQL.Add(' @Filtration=''' + trim(FBCIOID) + '''');
|
SQL.Add(' @Filtration=''' + trim(FBCIOID) + '''');
|
||||||
|
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
if ADOQueryPrint.IsEmpty then
|
if ADOQueryPrint.IsEmpty then
|
||||||
|
|
@ -1081,7 +1126,7 @@ begin
|
||||||
fIsCommopen := false;
|
fIsCommopen := false;
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
// FreeLibrary(Th);
|
// FreeLibrary(Th);
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
@ -1325,15 +1370,16 @@ begin
|
||||||
// fLabVolume := trim(ADOQueryPrint.fieldbyName('SLabVolume').AsString)
|
// fLabVolume := trim(ADOQueryPrint.fieldbyName('SLabVolume').AsString)
|
||||||
// else
|
// else
|
||||||
// fLabVolume := trim(ADOQueryPrint.fieldbyName('LabVolume').AsString);
|
// fLabVolume := trim(ADOQueryPrint.fieldbyName('LabVolume').AsString);
|
||||||
|
// if fLabVolume = '' then
|
||||||
if fLabVolume = '' then
|
// begin
|
||||||
begin
|
// Application.MessageBox('订单还未设置标签!', '提示信息', MB_ICONERROR);
|
||||||
Application.MessageBox('订单还未设置标签!', '提示信息', MB_ICONERROR);
|
// exit;
|
||||||
exit;
|
// end;
|
||||||
end;
|
//
|
||||||
|
// ExportFtErpFile(fLabVolume + '.fr3', ADOQueryBaseTemp);
|
||||||
ExportFtErpFile(fLabVolume + '.fr3', ADOQueryBaseTemp);
|
// fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + fLabVolume + '.fr3';
|
||||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + fLabVolume + '.fr3';
|
ExportFtErpFile('客户标签.fr3', ADOQueryBaseTemp);
|
||||||
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\客户标签.fr3';
|
||||||
if FileExists(fPrintFile) then
|
if FileExists(fPrintFile) then
|
||||||
begin
|
begin
|
||||||
|
|
||||||
|
|
|
||||||
17
T03贸易布匹检验/Unit2.dfm
Normal file
17
T03贸易布匹检验/Unit2.dfm
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
object Form2: TForm2
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Caption = 'Form2'
|
||||||
|
ClientHeight = 299
|
||||||
|
ClientWidth = 635
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'Tahoma'
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
end
|
||||||
72
T03贸易布匹检验/Unit2.pas
Normal file
72
T03贸易布匹检验/Unit2.pas
Normal file
|
|
@ -0,0 +1,72 @@
|
||||||
|
unit Unit2;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
|
||||||
|
Vcl.Controls, Vcl.Forms, Vcl.Dialogs;
|
||||||
|
|
||||||
|
type
|
||||||
|
TForm2 = class(TForm)
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
private
|
||||||
|
fIsCommopen: Boolean;
|
||||||
|
procedure OpenCom(DllName: string);
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
Form2: TForm2;
|
||||||
|
newh: hwnd;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_iniParam;
|
||||||
|
{$R *.dfm}
|
||||||
|
procedure TForm2.OpenCom(DllName: string);
|
||||||
|
type
|
||||||
|
TMyFunc = function(fhandle: hwnd; sCommName: PAnsiChar; IntTime: Integer; IsMessage: Integer): hwnd; stdcall;
|
||||||
|
var
|
||||||
|
Tf: TMyFunc;
|
||||||
|
Tp: TFarProc;
|
||||||
|
Th: Thandle;
|
||||||
|
begin
|
||||||
|
Th := LoadLibrary(pchar(trim(DllName)));
|
||||||
|
if Th > 0 then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Tp := GetProcAddress(Th, 'CommOpen');
|
||||||
|
if Tp <> nil then
|
||||||
|
begin
|
||||||
|
Tf := TMyFunc(Tp);
|
||||||
|
newh := Tf(Self.Handle, 'Comm1', 500, 1);
|
||||||
|
if newh < 1 then
|
||||||
|
begin
|
||||||
|
Application.MessageBox(pchar('打开串口失败!'), '提示');
|
||||||
|
end
|
||||||
|
else
|
||||||
|
fIsCommopen := true;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
fIsCommopen := false;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
// FreeLibrary(Th);
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
fIsCommopen := false;
|
||||||
|
Application.MessageBox(pchar('找不到 ' + trim(DllName) + ' 文件!'), '提示');
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
procedure TForm2.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if trim(MBDYDllName) <> '' then
|
||||||
|
OpenCom(MBDYDllName);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
@ -44,7 +44,8 @@ uses
|
||||||
U_ProgressUpdate in '..\A00通用方法\U_ProgressUpdate.pas',
|
U_ProgressUpdate in '..\A00通用方法\U_ProgressUpdate.pas',
|
||||||
U_RPFun in '..\..\..\public10\ThreeFun\Fun\U_RPFun.pas',
|
U_RPFun in '..\..\..\public10\ThreeFun\Fun\U_RPFun.pas',
|
||||||
U_TradeMarketQtyInPut in 'U_TradeMarketQtyInPut.pas',
|
U_TradeMarketQtyInPut in 'U_TradeMarketQtyInPut.pas',
|
||||||
U_ItemizedListQtyInPut in '..\T02óÒ×»ã×ֿܲâ\U_ItemizedListQtyInPut.pas' {frmItemizedListQtyInPut};
|
U_ItemizedListQtyInPut in '..\T02贸易汇总仓库\U_ItemizedListQtyInPut.pas' {frmItemizedListQtyInPut},
|
||||||
|
U_UserSel in '..\A00通用窗体\U_UserSel.pas' {frmUserSel};
|
||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -238,6 +238,10 @@
|
||||||
<DCCReference Include="..\T02贸易汇总仓库\U_ItemizedListQtyInPut.pas">
|
<DCCReference Include="..\T02贸易汇总仓库\U_ItemizedListQtyInPut.pas">
|
||||||
<Form>frmItemizedListQtyInPut</Form>
|
<Form>frmItemizedListQtyInPut</Form>
|
||||||
</DCCReference>
|
</DCCReference>
|
||||||
|
<DCCReference Include="..\A00通用窗体\U_UserSel.pas">
|
||||||
|
<Form>frmUserSel</Form>
|
||||||
|
<FormType>dfm</FormType>
|
||||||
|
</DCCReference>
|
||||||
<BuildConfiguration Include="Debug">
|
<BuildConfiguration Include="Debug">
|
||||||
<Key>Cfg_2</Key>
|
<Key>Cfg_2</Key>
|
||||||
<CfgParent>Base</CfgParent>
|
<CfgParent>Base</CfgParent>
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
|
||||||
Position = poMainFormCenter
|
Position = poMainFormCenter
|
||||||
WindowState = wsMaximized
|
WindowState = wsMaximized
|
||||||
OnClose = FormClose
|
OnClose = FormClose
|
||||||
ExplicitLeft = -451
|
|
||||||
ExplicitWidth = 1937
|
ExplicitWidth = 1937
|
||||||
ExplicitHeight = 775
|
ExplicitHeight = 775
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
|
|
@ -40,24 +39,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
|
||||||
Style = tbsDropDown
|
Style = tbsDropDown
|
||||||
OnClick = TBSaveClick
|
OnClick = TBSaveClick
|
||||||
end
|
end
|
||||||
object ToolButton3: TToolButton
|
|
||||||
Left = 94
|
|
||||||
Top = 0
|
|
||||||
AutoSize = True
|
|
||||||
Caption = #20445#23384#26684#24335
|
|
||||||
ImageIndex = 16
|
|
||||||
OnClick = ToolButton3Click
|
|
||||||
end
|
|
||||||
object TBClose: TToolButton
|
|
||||||
Left = 197
|
|
||||||
Top = 0
|
|
||||||
AutoSize = True
|
|
||||||
Caption = #20851#38381
|
|
||||||
ImageIndex = 7
|
|
||||||
OnClick = TBCloseClick
|
|
||||||
end
|
|
||||||
object TBAdd: TToolButton
|
object TBAdd: TToolButton
|
||||||
Left = 268
|
Left = 94
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #26032#22686
|
Caption = #26032#22686
|
||||||
|
|
@ -65,20 +48,36 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
|
||||||
OnClick = TBAddClick
|
OnClick = TBAddClick
|
||||||
end
|
end
|
||||||
object ToolButton6: TToolButton
|
object ToolButton6: TToolButton
|
||||||
Left = 339
|
Left = 165
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #21024#38500
|
Caption = #21024#38500
|
||||||
ImageIndex = 6
|
ImageIndex = 6
|
||||||
end
|
end
|
||||||
object TBEdit: TToolButton
|
object TBEdit: TToolButton
|
||||||
Left = 410
|
Left = 236
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #20462#25913
|
Caption = #20462#25913
|
||||||
ImageIndex = 3
|
ImageIndex = 3
|
||||||
OnClick = TBEditClick
|
OnClick = TBEditClick
|
||||||
end
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 307
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384#26684#24335
|
||||||
|
ImageIndex = 16
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 410
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 7
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object ToolBar2: TToolBar [1]
|
object ToolBar2: TToolBar [1]
|
||||||
Tag = 1
|
Tag = 1
|
||||||
|
|
@ -556,8 +555,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
OnClick = ScrollBox1Click
|
OnClick = ScrollBox1Click
|
||||||
object Label3: TLabel
|
object Label3: TLabel
|
||||||
Left = 730
|
Left = 1080
|
||||||
Top = 70
|
Top = 66
|
||||||
Width = 64
|
Width = 64
|
||||||
Height = 21
|
Height = 21
|
||||||
Caption = #21046#21333#26085#26399
|
Caption = #21046#21333#26085#26399
|
||||||
|
|
@ -571,14 +570,14 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
|
||||||
Visible = False
|
Visible = False
|
||||||
end
|
end
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
Left = 29
|
Left = 656
|
||||||
Top = 68
|
Top = 64
|
||||||
Width = 77
|
Width = 77
|
||||||
Height = 21
|
Height = 21
|
||||||
Caption = #22791' '#27880
|
Caption = #22791' '#27880
|
||||||
end
|
end
|
||||||
object Label2: TLabel
|
object Label2: TLabel
|
||||||
Left = 730
|
Left = 670
|
||||||
Top = 21
|
Top = 21
|
||||||
Width = 64
|
Width = 64
|
||||||
Height = 21
|
Height = 21
|
||||||
|
|
@ -607,8 +606,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
|
||||||
Caption = #35746#21333#31867#22411
|
Caption = #35746#21333#31867#22411
|
||||||
end
|
end
|
||||||
object Label18: TLabel
|
object Label18: TLabel
|
||||||
Left = 730
|
Left = 338
|
||||||
Top = 119
|
Top = 64
|
||||||
Width = 64
|
Width = 64
|
||||||
Height = 21
|
Height = 21
|
||||||
Caption = #21457#36135#22320#22336
|
Caption = #21457#36135#22320#22336
|
||||||
|
|
@ -621,15 +620,22 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
|
||||||
Caption = #35746#21333#21495
|
Caption = #35746#21333#21495
|
||||||
end
|
end
|
||||||
object Label19: TLabel
|
object Label19: TLabel
|
||||||
Left = 1077
|
Left = 33
|
||||||
Top = 68
|
Top = 66
|
||||||
Width = 80
|
Width = 80
|
||||||
Height = 21
|
Height = 21
|
||||||
Caption = #32852#31995#26041#24335#65306
|
Caption = #32852#31995#26041#24335#65306
|
||||||
end
|
end
|
||||||
|
object lbl2: TLabel
|
||||||
|
Left = 33
|
||||||
|
Top = 110
|
||||||
|
Width = 62
|
||||||
|
Height = 21
|
||||||
|
Caption = #19994' '#21153' '#21592':'
|
||||||
|
end
|
||||||
object TMMNo: TcxTextEdit
|
object TMMNo: TcxTextEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Left = 814
|
Left = 754
|
||||||
Top = 15
|
Top = 15
|
||||||
Enabled = False
|
Enabled = False
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
|
@ -637,8 +643,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
|
||||||
end
|
end
|
||||||
object TMMDate: TDateTimePicker
|
object TMMDate: TDateTimePicker
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Left = 814
|
Left = 1164
|
||||||
Top = 66
|
Top = 62
|
||||||
Width = 200
|
Width = 200
|
||||||
Height = 29
|
Height = 29
|
||||||
BevelInner = bvNone
|
BevelInner = bvNone
|
||||||
|
|
@ -663,10 +669,10 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
|
||||||
end
|
end
|
||||||
object OrdNote: TMemo
|
object OrdNote: TMemo
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Left = 122
|
Left = 754
|
||||||
Top = 68
|
Top = 64
|
||||||
Width = 511
|
Width = 320
|
||||||
Height = 81
|
Height = 90
|
||||||
Hint = 'OrdNote/'#22791#27880
|
Hint = 'OrdNote/'#22791#27880
|
||||||
ScrollBars = ssVertical
|
ScrollBars = ssVertical
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
|
|
@ -708,8 +714,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
|
||||||
end
|
end
|
||||||
object ShippingAddress: TcxButtonEdit
|
object ShippingAddress: TcxButtonEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Left = 814
|
Left = 416
|
||||||
Top = 115
|
Top = 65
|
||||||
Hint = 'ShippingAddress/'#21457#36135#22320#22336
|
Hint = 'ShippingAddress/'#21457#36135#22320#22336
|
||||||
Properties.Buttons = <
|
Properties.Buttons = <
|
||||||
item
|
item
|
||||||
|
|
@ -745,8 +751,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
|
||||||
end
|
end
|
||||||
object CONTACT: TcxButtonEdit
|
object CONTACT: TcxButtonEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Left = 1164
|
Left = 122
|
||||||
Top = 63
|
Top = 61
|
||||||
Hint = 'CONTACT/'#32852#31995#26041#24335
|
Hint = 'CONTACT/'#32852#31995#26041#24335
|
||||||
Properties.Buttons = <
|
Properties.Buttons = <
|
||||||
item
|
item
|
||||||
|
|
@ -759,6 +765,30 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
|
||||||
OnDblClick = OurCoNameDblClick
|
OnDblClick = OurCoNameDblClick
|
||||||
Width = 200
|
Width = 200
|
||||||
end
|
end
|
||||||
|
object Saleser: TcxButtonEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 122
|
||||||
|
Top = 110
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.OnButtonClick = SaleserPropertiesButtonClick
|
||||||
|
Style.ButtonStyle = btsDefault
|
||||||
|
TabOrder = 10
|
||||||
|
OnDblClick = SaleserDblClick
|
||||||
|
Width = 200
|
||||||
|
end
|
||||||
|
object SalesId: TcxTextEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 1330
|
||||||
|
Top = 134
|
||||||
|
TabOrder = 11
|
||||||
|
Visible = False
|
||||||
|
Width = 125
|
||||||
|
end
|
||||||
end
|
end
|
||||||
inherited ADOQueryBaseCmd: TADOQuery
|
inherited ADOQueryBaseCmd: TADOQuery
|
||||||
Connection = DataLink_TradeMarket.ADOLink
|
Connection = DataLink_TradeMarket.ADOLink
|
||||||
|
|
@ -936,7 +966,7 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
|
||||||
end
|
end
|
||||||
object PopupMenu1: TPopupMenu
|
object PopupMenu1: TPopupMenu
|
||||||
Left = 49
|
Left = 49
|
||||||
Top = 74
|
Top = 266
|
||||||
object N5: TMenuItem
|
object N5: TMenuItem
|
||||||
Caption = #20445#23384#21518#31435#21363#25552#20132
|
Caption = #20445#23384#21518#31435#21363#25552#20132
|
||||||
OnClick = N5Click
|
OnClick = N5Click
|
||||||
|
|
|
||||||
|
|
@ -138,6 +138,9 @@ type
|
||||||
TBAdd: TToolButton;
|
TBAdd: TToolButton;
|
||||||
ToolButton6: TToolButton;
|
ToolButton6: TToolButton;
|
||||||
TBEdit: TToolButton;
|
TBEdit: TToolButton;
|
||||||
|
lbl2: TLabel;
|
||||||
|
Saleser: TcxButtonEdit;
|
||||||
|
SalesId: TcxTextEdit;
|
||||||
procedure TBCloseClick(Sender: TObject);
|
procedure TBCloseClick(Sender: TObject);
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure TBSaveClick(Sender: TObject);
|
procedure TBSaveClick(Sender: TObject);
|
||||||
|
|
@ -184,6 +187,8 @@ type
|
||||||
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);
|
||||||
procedure TBAddClick(Sender: TObject);
|
procedure TBAddClick(Sender: TObject);
|
||||||
procedure TBEditClick(Sender: TObject);
|
procedure TBEditClick(Sender: TObject);
|
||||||
|
procedure SaleserPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
procedure SaleserDblClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
FSCXDH: string;
|
FSCXDH: string;
|
||||||
procedure InitData();
|
procedure InitData();
|
||||||
|
|
@ -219,7 +224,7 @@ implementation
|
||||||
uses
|
uses
|
||||||
U_DataLink, U_ZDYHelp, U_ZDYHelpSel, U_RTFun, U_CompanySel, U_PictureUpload,
|
U_DataLink, U_ZDYHelp, U_ZDYHelpSel, U_RTFun, U_CompanySel, U_PictureUpload,
|
||||||
U_ProgressUpdate, U_ClothInfoSel, U_ComContactSel, U_TradeMarketList,
|
U_ProgressUpdate, U_ClothInfoSel, U_ComContactSel, U_TradeMarketList,
|
||||||
U_LabelPrint, U_TradeMarketQtyInPut;
|
U_LabelPrint, U_TradeMarketQtyInPut, U_UserSel;
|
||||||
|
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
@ -445,7 +450,7 @@ begin
|
||||||
begin
|
begin
|
||||||
close;
|
close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add(' select CoCode,CoAbbrName from BS_Company where CoType=''¿Í»§'' ');
|
sql.Add(' select CoCode,CoName from BS_Company where CoType=''客户'' ');
|
||||||
|
|
||||||
if Trim(canshu4) = '新余' then
|
if Trim(canshu4) = '新余' then
|
||||||
sql.Add(' and Stores=''新余'' ');
|
sql.Add(' and Stores=''新余'' ');
|
||||||
|
|
@ -455,7 +460,7 @@ begin
|
||||||
CustName.Properties.LookupItems.Clear;
|
CustName.Properties.LookupItems.Clear;
|
||||||
while not Eof do
|
while not Eof do
|
||||||
begin
|
begin
|
||||||
CustName.Properties.LookupItems.Add(Trim(ADO_KH.fieldByName('CoAbbrName').AsString));
|
CustName.Properties.LookupItems.Add(Trim(ADO_KH.fieldByName('CoName').AsString));
|
||||||
Next;
|
Next;
|
||||||
end;
|
end;
|
||||||
CustName.ItemIndex := -1;
|
CustName.ItemIndex := -1;
|
||||||
|
|
@ -526,6 +531,33 @@ begin
|
||||||
// frmTradeMarketlist := TfrmTradeMarketlist.Create(Application);
|
// frmTradeMarketlist := TfrmTradeMarketlist.Create(Application);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmTradeMarketInPut.SaleserDblClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
|
||||||
|
self.Salesid.Text := '';
|
||||||
|
self.Saleser.Text := '';
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmTradeMarketInPut.SaleserPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmUserSel := TfrmUserSel.Create(Application);
|
||||||
|
with frmUserSel do
|
||||||
|
begin
|
||||||
|
Fdept := '业务部';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
self.Saleser.Text := Trim(CDS_1.fieldbyname('EECode').AsString);
|
||||||
|
self.Saleser.Text := Trim(CDS_1.fieldbyname('EEName').AsString);
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmUserSel.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function TfrmTradeMarketInPut.SaveData(): Boolean;
|
function TfrmTradeMarketInPut.SaveData(): Boolean;
|
||||||
var
|
var
|
||||||
maxno, Smaxno, maxTMMNo, MaxFNo, MQZ, MTMMNo: string;
|
maxno, Smaxno, maxTMMNo, MaxFNo, MQZ, MTMMNo: string;
|
||||||
|
|
@ -768,7 +800,7 @@ begin
|
||||||
Application.MessageBox('单价不能为空!', '提示', 0);
|
Application.MessageBox('单价不能为空!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
if not CDS_KH.Locate('CoAbbrName', self.CustName.Text, []) then
|
if not CDS_KH.Locate('CoName', self.CustName.Text, []) then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('客户不存在!', '提示', 0);
|
Application.MessageBox('客户不存在!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
|
|
@ -1053,9 +1085,32 @@ end;
|
||||||
procedure TfrmTradeMarketInPut.CustNamePropertiesChange(Sender: TObject);
|
procedure TfrmTradeMarketInPut.CustNamePropertiesChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
if CDS_KH.Locate('CoAbbrName', Trim(self.CustName.Text), []) then
|
// if CDS_KH.Locate('CoAbbrName', Trim(self.CustName.Text), []) then
|
||||||
|
// begin
|
||||||
|
// self.CustName.Hint := Trim(CDS_KH.fieldbyname('CoCode').AsString);
|
||||||
|
// end;
|
||||||
|
with ADO_KH do
|
||||||
begin
|
begin
|
||||||
self.CustName.Hint := Trim(CDS_KH.fieldbyname('CoCode').AsString);
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add(' select CoCode,CoName from BS_Company where CoType=''客户'' ');
|
||||||
|
|
||||||
|
if Trim(canshu4) = '新余' then
|
||||||
|
sql.Add(' and Stores=''新余'' ');
|
||||||
|
|
||||||
|
sql.Add(' and CoName like ''%' + Trim(CustName.Text) + '%''');
|
||||||
|
Open;
|
||||||
|
|
||||||
|
CustName.Properties.LookupItems.Clear;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
CustName.Properties.LookupItems.Add(Trim(ADO_KH.fieldByName('CoName').AsString));
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
// CustName.ItemIndex := -1;
|
||||||
|
|
||||||
|
SCreateCDS(ADO_KH, CDS_KH);
|
||||||
|
SInitCDSData(ADO_KH, CDS_KH);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -1079,7 +1134,7 @@ begin
|
||||||
// end;
|
// end;
|
||||||
if canshu4 = '新余' then
|
if canshu4 = '新余' then
|
||||||
sql.Add(' and A.Stores=''' + Trim('新余') + '''');
|
sql.Add(' and A.Stores=''' + Trim('新余') + '''');
|
||||||
sql.Add(' and A.CoAbbrName=''' + Trim(CustName.Text) + '''');
|
sql.Add(' and A.CoName=''' + Trim(CustName.Text) + '''');
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
self.ShippingAddress.Text := Trim(adotemp.fieldbyname('mxaddress').AsString);
|
self.ShippingAddress.Text := Trim(adotemp.fieldbyname('mxaddress').AsString);
|
||||||
|
|
@ -1350,7 +1405,7 @@ begin
|
||||||
if ShowModal = 1 then
|
if ShowModal = 1 then
|
||||||
begin
|
begin
|
||||||
self.CustName.Hint := Trim(frmCompanySel.CDS_1.fieldbyname('CoCode').AsString);
|
self.CustName.Hint := Trim(frmCompanySel.CDS_1.fieldbyname('CoCode').AsString);
|
||||||
self.CustName.Text := Trim(frmCompanySel.CDS_1.fieldbyname('CoAbbrName').AsString);
|
self.CustName.Text := Trim(frmCompanySel.CDS_1.fieldbyname('CoName').AsString);
|
||||||
self.ShippingAddress.Text := Trim(frmCompanySel.CDS_1.fieldbyname('mxaddress').AsString);
|
self.ShippingAddress.Text := Trim(frmCompanySel.CDS_1.fieldbyname('mxaddress').AsString);
|
||||||
self.CONTACT.Text := Trim(frmCompanySel.CDS_1.fieldbyname('Telephone').AsString);
|
self.CONTACT.Text := Trim(frmCompanySel.CDS_1.fieldbyname('Telephone').AsString);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -506,6 +506,12 @@ inherited frmTradeMarketList: TfrmTradeMarketList
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 60
|
Width = 60
|
||||||
end
|
end
|
||||||
|
object Tv1Column26: TcxGridDBColumn
|
||||||
|
Caption = #36710#21495
|
||||||
|
DataBinding.FieldName = 'carPlate'
|
||||||
|
DataBinding.IsNullValueType = True
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object cxGrid1Level1: TcxGridLevel
|
object cxGrid1Level1: TcxGridLevel
|
||||||
GridView = Tv1
|
GridView = Tv1
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,7 @@ type
|
||||||
TBZF: TToolButton;
|
TBZF: TToolButton;
|
||||||
TBNOZF: TToolButton;
|
TBNOZF: TToolButton;
|
||||||
Tv1Column25: TcxGridDBColumn;
|
Tv1Column25: TcxGridDBColumn;
|
||||||
|
Tv1Column26: TcxGridDBColumn;
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
|
|
@ -525,14 +526,15 @@ begin
|
||||||
begin
|
begin
|
||||||
if Order_Main.fieldbyname('SSel').AsBoolean then
|
if Order_Main.fieldbyname('SSel').AsBoolean then
|
||||||
begin
|
begin
|
||||||
if WSql <> '' then
|
// if WSql <> '' then
|
||||||
begin
|
// begin
|
||||||
WSql := WSql + ',' + Trim(Order_Main.fieldbyname('TMSId').AsString);
|
// WSql := WSql + ',' + Trim(Order_Main.fieldbyname('TMSId').AsString); //TMSId
|
||||||
end
|
// end
|
||||||
else
|
// else
|
||||||
begin
|
// begin
|
||||||
WSql := Trim(Order_Main.fieldbyname('TMSId').AsString);
|
// WSql := Trim(Order_Main.fieldbyname('TMSId').AsString);
|
||||||
end;
|
// end;
|
||||||
|
WSql := Trim(Order_Main.fieldbyname('TMMId').AsString);
|
||||||
end;
|
end;
|
||||||
Next;
|
Next;
|
||||||
end;
|
end;
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ inherited frmTradeMarketList_JD: TfrmTradeMarketList_JD
|
||||||
FormStyle = fsMDIChild
|
FormStyle = fsMDIChild
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
Visible = True
|
Visible = True
|
||||||
|
ExplicitLeft = -338
|
||||||
ExplicitWidth = 1439
|
ExplicitWidth = 1439
|
||||||
ExplicitHeight = 673
|
ExplicitHeight = 673
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
|
|
@ -85,6 +86,7 @@ inherited frmTradeMarketList_JD: TfrmTradeMarketList_JD
|
||||||
DataController.Summary.SummaryGroups = <>
|
DataController.Summary.SummaryGroups = <>
|
||||||
OptionsBehavior.CellHints = True
|
OptionsBehavior.CellHints = True
|
||||||
OptionsCustomize.ColumnFiltering = False
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Editing = False
|
||||||
OptionsView.Footer = True
|
OptionsView.Footer = True
|
||||||
OptionsView.GroupByBox = False
|
OptionsView.GroupByBox = False
|
||||||
OptionsView.IndicatorWidth = 30
|
OptionsView.IndicatorWidth = 30
|
||||||
|
|
@ -159,8 +161,6 @@ inherited frmTradeMarketList_JD: TfrmTradeMarketList_JD
|
||||||
Height = 202
|
Height = 202
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
ExplicitTop = 401
|
|
||||||
ExplicitHeight = 232
|
|
||||||
object Tv2: TcxGridDBTableView
|
object Tv2: TcxGridDBTableView
|
||||||
Navigator.Buttons.CustomButtons = <>
|
Navigator.Buttons.CustomButtons = <>
|
||||||
ScrollbarAnnotations.CustomAnnotations = <>
|
ScrollbarAnnotations.CustomAnnotations = <>
|
||||||
|
|
@ -178,6 +178,7 @@ inherited frmTradeMarketList_JD: TfrmTradeMarketList_JD
|
||||||
DataController.Summary.SummaryGroups = <>
|
DataController.Summary.SummaryGroups = <>
|
||||||
OptionsBehavior.CellHints = True
|
OptionsBehavior.CellHints = True
|
||||||
OptionsCustomize.ColumnFiltering = False
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Editing = False
|
||||||
OptionsView.Footer = True
|
OptionsView.Footer = True
|
||||||
OptionsView.GroupByBox = False
|
OptionsView.GroupByBox = False
|
||||||
OptionsView.IndicatorWidth = 30
|
OptionsView.IndicatorWidth = 30
|
||||||
|
|
@ -340,6 +341,7 @@ inherited frmTradeMarketList_JD: TfrmTradeMarketList_JD
|
||||||
DataController.Summary.SummaryGroups = <>
|
DataController.Summary.SummaryGroups = <>
|
||||||
OptionsBehavior.CellHints = True
|
OptionsBehavior.CellHints = True
|
||||||
OptionsCustomize.ColumnFiltering = False
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Editing = False
|
||||||
OptionsView.Footer = True
|
OptionsView.Footer = True
|
||||||
OptionsView.GroupByBox = False
|
OptionsView.GroupByBox = False
|
||||||
OptionsView.IndicatorWidth = 30
|
OptionsView.IndicatorWidth = 30
|
||||||
|
|
@ -406,8 +408,6 @@ inherited frmTradeMarketList_JD: TfrmTradeMarketList_JD
|
||||||
Height = 208
|
Height = 208
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
ExplicitTop = 395
|
|
||||||
ExplicitHeight = 238
|
|
||||||
object Tv4: TcxGridDBTableView
|
object Tv4: TcxGridDBTableView
|
||||||
Navigator.Buttons.CustomButtons = <>
|
Navigator.Buttons.CustomButtons = <>
|
||||||
ScrollbarAnnotations.CustomAnnotations = <>
|
ScrollbarAnnotations.CustomAnnotations = <>
|
||||||
|
|
@ -425,6 +425,7 @@ inherited frmTradeMarketList_JD: TfrmTradeMarketList_JD
|
||||||
DataController.Summary.SummaryGroups = <>
|
DataController.Summary.SummaryGroups = <>
|
||||||
OptionsBehavior.CellHints = True
|
OptionsBehavior.CellHints = True
|
||||||
OptionsCustomize.ColumnFiltering = False
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Editing = False
|
||||||
OptionsView.Footer = True
|
OptionsView.Footer = True
|
||||||
OptionsView.GroupByBox = False
|
OptionsView.GroupByBox = False
|
||||||
OptionsView.IndicatorWidth = 30
|
OptionsView.IndicatorWidth = 30
|
||||||
|
|
@ -678,4 +679,9 @@ inherited frmTradeMarketList_JD: TfrmTradeMarketList_JD
|
||||||
Left = 860
|
Left = 860
|
||||||
Top = 464
|
Top = 464
|
||||||
end
|
end
|
||||||
|
object Timer1: TTimer
|
||||||
|
OnTimer = Timer1Timer
|
||||||
|
Left = 832
|
||||||
|
Top = 200
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -98,8 +98,10 @@ type
|
||||||
Label4: TLabel;
|
Label4: TLabel;
|
||||||
ToolBar4: TToolBar;
|
ToolBar4: TToolBar;
|
||||||
Label5: TLabel;
|
Label5: TLabel;
|
||||||
|
Timer1: TTimer;
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure Timer1Timer(Sender: TObject);
|
||||||
private
|
private
|
||||||
DQdate: TDateTime;
|
DQdate: TDateTime;
|
||||||
procedure InitGrid();
|
procedure InitGrid();
|
||||||
|
|
@ -147,22 +149,11 @@ end;
|
||||||
|
|
||||||
procedure TfrmTradeMarketList_JD.InitGrid();
|
procedure TfrmTradeMarketList_JD.InitGrid();
|
||||||
begin
|
begin
|
||||||
with ADO_1 do
|
InitGrid1();
|
||||||
begin
|
InitGrid2();
|
||||||
Close;
|
InitGrid3();
|
||||||
sql.clear;
|
InitGrid4();
|
||||||
sql.add('select cast((case when isnull(Urgent,'''')<>'''' then 0 else 1 end )as int) as Urgent,* from Trade_Market_Main A inner join Trade_Market_Sub B on B.TMMId=A.TMMId ');
|
|
||||||
sql.add('where 1=1');
|
|
||||||
Open;
|
|
||||||
end;
|
|
||||||
SCreateCDS(ADO_1, CDS_1);
|
|
||||||
SInitCDSData(ADO_1, CDS_1);
|
|
||||||
SCreateCDS(ADO_1, CDS_2);
|
|
||||||
SInitCDSData(ADO_1, CDS_2);
|
|
||||||
SCreateCDS(ADO_1, CDS_3);
|
|
||||||
SInitCDSData(ADO_1, CDS_3);
|
|
||||||
SCreateCDS(ADO_1, CDS_4);
|
|
||||||
SInitCDSData(ADO_1, CDS_4);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmTradeMarketList_JD.InitGrid1();
|
procedure TfrmTradeMarketList_JD.InitGrid1();
|
||||||
|
|
@ -225,5 +216,26 @@ begin
|
||||||
SInitCDSData(ADO_4, CDS_4);
|
SInitCDSData(ADO_4, CDS_4);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmTradeMarketList_JD.Timer1Timer(Sender: TObject);
|
||||||
|
begin
|
||||||
|
for var v in TArray<TcxGridDBTableView>.Create(TV1, TV2, TV3, TV4) do
|
||||||
|
begin
|
||||||
|
if v.DataController.RecordCount = 0 then
|
||||||
|
Continue;
|
||||||
|
|
||||||
|
if v.Controller.FocusedRowIndex < v.DataController.RecordCount - 1 then
|
||||||
|
begin
|
||||||
|
v.Controller.FocusedRowIndex := v.Controller.FocusedRowIndex + 1;
|
||||||
|
v.Controller.MakeFocusedItemVisible;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
v.Controller.FocusedRowIndex := 0;
|
||||||
|
v.Controller.MakeFocusedItemVisible;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,7 @@ inherited frmTradeMarketList_JDT: TfrmTradeMarketList_JDT
|
||||||
DataController.Summary.SummaryGroups = <>
|
DataController.Summary.SummaryGroups = <>
|
||||||
OptionsBehavior.CellHints = True
|
OptionsBehavior.CellHints = True
|
||||||
OptionsCustomize.ColumnFiltering = False
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Editing = False
|
||||||
OptionsView.Footer = True
|
OptionsView.Footer = True
|
||||||
OptionsView.GroupByBox = False
|
OptionsView.GroupByBox = False
|
||||||
OptionsView.IndicatorWidth = 30
|
OptionsView.IndicatorWidth = 30
|
||||||
|
|
@ -159,8 +160,6 @@ inherited frmTradeMarketList_JDT: TfrmTradeMarketList_JDT
|
||||||
Height = 202
|
Height = 202
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
ExplicitTop = 401
|
|
||||||
ExplicitHeight = 232
|
|
||||||
object Tv2: TcxGridDBTableView
|
object Tv2: TcxGridDBTableView
|
||||||
Navigator.Buttons.CustomButtons = <>
|
Navigator.Buttons.CustomButtons = <>
|
||||||
ScrollbarAnnotations.CustomAnnotations = <>
|
ScrollbarAnnotations.CustomAnnotations = <>
|
||||||
|
|
@ -178,6 +177,7 @@ inherited frmTradeMarketList_JDT: TfrmTradeMarketList_JDT
|
||||||
DataController.Summary.SummaryGroups = <>
|
DataController.Summary.SummaryGroups = <>
|
||||||
OptionsBehavior.CellHints = True
|
OptionsBehavior.CellHints = True
|
||||||
OptionsCustomize.ColumnFiltering = False
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Editing = False
|
||||||
OptionsView.Footer = True
|
OptionsView.Footer = True
|
||||||
OptionsView.GroupByBox = False
|
OptionsView.GroupByBox = False
|
||||||
OptionsView.IndicatorWidth = 30
|
OptionsView.IndicatorWidth = 30
|
||||||
|
|
@ -340,6 +340,7 @@ inherited frmTradeMarketList_JDT: TfrmTradeMarketList_JDT
|
||||||
DataController.Summary.SummaryGroups = <>
|
DataController.Summary.SummaryGroups = <>
|
||||||
OptionsBehavior.CellHints = True
|
OptionsBehavior.CellHints = True
|
||||||
OptionsCustomize.ColumnFiltering = False
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Editing = False
|
||||||
OptionsView.Footer = True
|
OptionsView.Footer = True
|
||||||
OptionsView.GroupByBox = False
|
OptionsView.GroupByBox = False
|
||||||
OptionsView.IndicatorWidth = 30
|
OptionsView.IndicatorWidth = 30
|
||||||
|
|
@ -406,8 +407,6 @@ inherited frmTradeMarketList_JDT: TfrmTradeMarketList_JDT
|
||||||
Height = 208
|
Height = 208
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
ExplicitTop = 395
|
|
||||||
ExplicitHeight = 238
|
|
||||||
object Tv4: TcxGridDBTableView
|
object Tv4: TcxGridDBTableView
|
||||||
Navigator.Buttons.CustomButtons = <>
|
Navigator.Buttons.CustomButtons = <>
|
||||||
ScrollbarAnnotations.CustomAnnotations = <>
|
ScrollbarAnnotations.CustomAnnotations = <>
|
||||||
|
|
@ -425,6 +424,7 @@ inherited frmTradeMarketList_JDT: TfrmTradeMarketList_JDT
|
||||||
DataController.Summary.SummaryGroups = <>
|
DataController.Summary.SummaryGroups = <>
|
||||||
OptionsBehavior.CellHints = True
|
OptionsBehavior.CellHints = True
|
||||||
OptionsCustomize.ColumnFiltering = False
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Editing = False
|
||||||
OptionsView.Footer = True
|
OptionsView.Footer = True
|
||||||
OptionsView.GroupByBox = False
|
OptionsView.GroupByBox = False
|
||||||
OptionsView.IndicatorWidth = 30
|
OptionsView.IndicatorWidth = 30
|
||||||
|
|
@ -450,6 +450,7 @@ inherited frmTradeMarketList_JDT: TfrmTradeMarketList_JDT
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
PropertiesClassName = 'TcxDateEditProperties'
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
Width = 80
|
Width = 80
|
||||||
end
|
end
|
||||||
object Tv4Column4: TcxGridDBColumn
|
object Tv4Column4: TcxGridDBColumn
|
||||||
|
|
@ -501,9 +502,9 @@ inherited frmTradeMarketList_JDT: TfrmTradeMarketList_JDT
|
||||||
object Label4: TLabel
|
object Label4: TLabel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 38
|
Width = 57
|
||||||
Height = 30
|
Height = 30
|
||||||
Caption = #26032#20313
|
Caption = #26410#22238#21333
|
||||||
Font.Charset = GB2312_CHARSET
|
Font.Charset = GB2312_CHARSET
|
||||||
Font.Color = clRed
|
Font.Color = clRed
|
||||||
Font.Height = -19
|
Font.Height = -19
|
||||||
|
|
@ -678,4 +679,9 @@ inherited frmTradeMarketList_JDT: TfrmTradeMarketList_JDT
|
||||||
Left = 860
|
Left = 860
|
||||||
Top = 464
|
Top = 464
|
||||||
end
|
end
|
||||||
|
object Timer1: TTimer
|
||||||
|
OnTimer = Timer1Timer
|
||||||
|
Left = 832
|
||||||
|
Top = 200
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -98,8 +98,10 @@ type
|
||||||
Label4: TLabel;
|
Label4: TLabel;
|
||||||
ToolBar4: TToolBar;
|
ToolBar4: TToolBar;
|
||||||
Label5: TLabel;
|
Label5: TLabel;
|
||||||
|
Timer1: TTimer;
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure Timer1Timer(Sender: TObject);
|
||||||
private
|
private
|
||||||
DQdate: TDateTime;
|
DQdate: TDateTime;
|
||||||
procedure InitGrid();
|
procedure InitGrid();
|
||||||
|
|
@ -147,22 +149,10 @@ end;
|
||||||
|
|
||||||
procedure TfrmTradeMarketList_JDT.InitGrid();
|
procedure TfrmTradeMarketList_JDT.InitGrid();
|
||||||
begin
|
begin
|
||||||
with ADO_1 do
|
InitGrid1();
|
||||||
begin
|
InitGrid2();
|
||||||
Close;
|
InitGrid3();
|
||||||
sql.clear;
|
InitGrid4();
|
||||||
sql.add('select cast((case when isnull(Urgent,'''')<>'''' then 0 else 1 end )as int) as Urgent,* from Trade_Market_Main A inner join Trade_Market_Sub B on B.TMMId=A.TMMId ');
|
|
||||||
sql.add('where 1=1');
|
|
||||||
Open;
|
|
||||||
end;
|
|
||||||
SCreateCDS(ADO_1, CDS_1);
|
|
||||||
SInitCDSData(ADO_1, CDS_1);
|
|
||||||
SCreateCDS(ADO_1, CDS_2);
|
|
||||||
SInitCDSData(ADO_1, CDS_2);
|
|
||||||
SCreateCDS(ADO_1, CDS_3);
|
|
||||||
SInitCDSData(ADO_1, CDS_3);
|
|
||||||
SCreateCDS(ADO_1, CDS_4);
|
|
||||||
SInitCDSData(ADO_1, CDS_4);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmTradeMarketList_JDT.InitGrid1();
|
procedure TfrmTradeMarketList_JDT.InitGrid1();
|
||||||
|
|
@ -217,13 +207,32 @@ begin
|
||||||
Close;
|
Close;
|
||||||
sql.clear;
|
sql.clear;
|
||||||
sql.add('select cast((case when isnull(Urgent,'''')<>'''' then 0 else 1 end )as int) as Urgent,* from Trade_Market_Main A inner join Trade_Market_Sub B on B.TMMId=A.TMMId ');
|
sql.add('select cast((case when isnull(Urgent,'''')<>'''' then 0 else 1 end )as int) as Urgent,* from Trade_Market_Main A inner join Trade_Market_Sub B on B.TMMId=A.TMMId ');
|
||||||
sql.add('where 1=1');
|
sql.add('where 1=1 and isnull(Status,0)=''9'' ');
|
||||||
sql.add('and AddressArea=''ÐÂÓà'' ');
|
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
SCreateCDS(ADO_4, CDS_4);
|
SCreateCDS(ADO_4, CDS_4);
|
||||||
SInitCDSData(ADO_4, CDS_4);
|
SInitCDSData(ADO_4, CDS_4);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmTradeMarketList_JDT.Timer1Timer(Sender: TObject);
|
||||||
|
|
||||||
|
begin
|
||||||
|
for var v in TArray<TcxGridDBTableView>.Create(TV1,TV2, TV3, TV4) do
|
||||||
|
begin
|
||||||
|
if v.DataController.RecordCount = 0 then Continue;
|
||||||
|
if v.Controller.FocusedRowIndex < v.DataController.RecordCount - 1 then
|
||||||
|
begin
|
||||||
|
v.Controller.FocusedRowIndex := v.Controller.FocusedRowIndex + 1;
|
||||||
|
v.Controller.MakeFocusedItemVisible;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
v.Controller.FocusedRowIndex := 0;
|
||||||
|
v.Controller.MakeFocusedItemVisible;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ inherited frmTradeSampleList: TfrmTradeSampleList
|
||||||
FormStyle = fsMDIChild
|
FormStyle = fsMDIChild
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
Visible = True
|
Visible = True
|
||||||
ExplicitLeft = -793
|
ExplicitLeft = -454
|
||||||
ExplicitWidth = 1940
|
ExplicitWidth = 1940
|
||||||
ExplicitHeight = 633
|
ExplicitHeight = 633
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
|
|
@ -276,11 +276,14 @@ inherited frmTradeSampleList: TfrmTradeSampleList
|
||||||
Align = alClient
|
Align = alClient
|
||||||
PopupMenu = PM_1
|
PopupMenu = PM_1
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
|
ExplicitLeft = -8
|
||||||
|
ExplicitTop = 158
|
||||||
object Tv1: TcxGridDBTableView
|
object Tv1: TcxGridDBTableView
|
||||||
OnDblClick = Tv1DblClick
|
OnDblClick = Tv1DblClick
|
||||||
Navigator.Buttons.CustomButtons = <>
|
Navigator.Buttons.CustomButtons = <>
|
||||||
ScrollbarAnnotations.CustomAnnotations = <>
|
ScrollbarAnnotations.CustomAnnotations = <>
|
||||||
OnCellDblClick = Tv1CellDblClick
|
OnCellDblClick = Tv1CellDblClick
|
||||||
|
OnCustomDrawCell = Tv1CustomDrawCell
|
||||||
DataController.DataSource = DataSource1
|
DataController.DataSource = DataSource1
|
||||||
DataController.Filter.AutoDataSetFilter = True
|
DataController.Filter.AutoDataSetFilter = True
|
||||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
|
@ -518,6 +521,12 @@ inherited frmTradeSampleList: TfrmTradeSampleList
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 60
|
Width = 60
|
||||||
end
|
end
|
||||||
|
object Tv1Column26: TcxGridDBColumn
|
||||||
|
DataBinding.FieldName = 'PrintStatus'
|
||||||
|
DataBinding.IsNullValueType = True
|
||||||
|
Visible = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object cxGrid1Level1: TcxGridLevel
|
object cxGrid1Level1: TcxGridLevel
|
||||||
GridView = Tv1
|
GridView = Tv1
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,7 @@ type
|
||||||
TBZF: TToolButton;
|
TBZF: TToolButton;
|
||||||
TBNOZF: TToolButton;
|
TBNOZF: TToolButton;
|
||||||
Tv1Column25: TcxGridDBColumn;
|
Tv1Column25: TcxGridDBColumn;
|
||||||
|
Tv1Column26: TcxGridDBColumn;
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
|
|
@ -145,6 +146,7 @@ type
|
||||||
procedure TBZFClick(Sender: TObject);
|
procedure TBZFClick(Sender: TObject);
|
||||||
procedure TBNOZFClick(Sender: TObject);
|
procedure TBNOZFClick(Sender: TObject);
|
||||||
procedure Tv1DblClick(Sender: TObject);
|
procedure Tv1DblClick(Sender: TObject);
|
||||||
|
procedure Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
private
|
private
|
||||||
DQdate: TDateTime;
|
DQdate: TDateTime;
|
||||||
procedure InitGrid();
|
procedure InitGrid();
|
||||||
|
|
@ -516,11 +518,11 @@ begin
|
||||||
begin
|
begin
|
||||||
if WSql <> '' then
|
if WSql <> '' then
|
||||||
begin
|
begin
|
||||||
WSql := WSql + ',' + Trim(Order_Main.fieldbyname('TMSId').AsString);
|
WSql := WSql + ',' + Trim(Order_Main.fieldbyname('TMMId').AsString);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
WSql := Trim(Order_Main.fieldbyname('TMSId').AsString);
|
WSql := Trim(Order_Main.fieldbyname('TMMId').AsString);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
Next;
|
Next;
|
||||||
|
|
@ -537,6 +539,14 @@ begin
|
||||||
if ShowModal = 1 then
|
if ShowModal = 1 then
|
||||||
begin
|
begin
|
||||||
// Self.InitGrid();
|
// Self.InitGrid();
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('update Trade_Market_Main SET PrintStatus=1 ');
|
||||||
|
sql.Add(' where EXISTS(select X.RTValue from [dbo].[F_Tool_SplitString](''' + WSql + ''','','') X where X.RTValue=TMMId) ');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
|
|
@ -738,6 +748,12 @@ begin
|
||||||
Clipboard.SetTextBuf(PChar(Trim(Order_Main.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString)));
|
Clipboard.SetTextBuf(PChar(Trim(Order_Main.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString)));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmTradeSampleList.Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
|
begin
|
||||||
|
if AViewInfo.GridRecord.Values[tv1.GetColumnByFieldName('PrintStatus').Index] = '1' then
|
||||||
|
ACanvas.Brush.Color := clInfoBk;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrmTradeSampleList.Tv1DblClick(Sender: TObject);
|
procedure TfrmTradeSampleList.Tv1DblClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if Order_Main.IsEmpty then
|
if Order_Main.IsEmpty then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user