调整
This commit is contained in:
parent
d7bd3596e3
commit
e4158f64a0
|
|
@ -10,6 +10,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
FormStyle = fsMDIChild
|
||||
Position = poScreenCenter
|
||||
Visible = True
|
||||
ExplicitLeft = -87
|
||||
ExplicitWidth = 1556
|
||||
ExplicitHeight = 847
|
||||
PixelsPerInch = 96
|
||||
|
|
@ -22,7 +23,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
Height = 30
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 99
|
||||
ButtonWidth = 131
|
||||
Caption = 'ToolBar1'
|
||||
DisabledImages = DataLink_ClothInfo.cxImageList_bar
|
||||
Images = DataLink_ClothInfo.cxImageList_bar
|
||||
|
|
@ -38,7 +39,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBAdd: TToolButton
|
||||
Left = 71
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686
|
||||
|
|
@ -46,7 +47,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
OnClick = TBAddClick
|
||||
end
|
||||
object TBCopy: TToolButton
|
||||
Left = 142
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22797#21046
|
||||
|
|
@ -54,7 +55,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
OnClick = TBCopyClick
|
||||
end
|
||||
object TBEdit: TToolButton
|
||||
Left = 213
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20462#25913
|
||||
|
|
@ -62,7 +63,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
OnClick = TBEditClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 284
|
||||
Left = 252
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26597#30475
|
||||
|
|
@ -70,7 +71,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBMLEdit: TToolButton
|
||||
Left = 355
|
||||
Left = 315
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #30446#24405#20462#25913
|
||||
|
|
@ -78,7 +79,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
OnClick = TBMLEditClick
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 458
|
||||
Left = 402
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
|
|
@ -86,7 +87,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
OnClick = TBDelClick
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 529
|
||||
Left = 465
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26631#31614#25171#21360
|
||||
|
|
@ -94,7 +95,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
OnClick = ToolButton3Click
|
||||
end
|
||||
object ToolButton7: TToolButton
|
||||
Left = 632
|
||||
Left = 552
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25209#37327#23548#20986
|
||||
|
|
@ -102,7 +103,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
OnClick = ToolButton7Click
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 735
|
||||
Left = 639
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20837
|
||||
|
|
@ -110,7 +111,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
OnClick = ToolButton4Click
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 806
|
||||
Left = 702
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
|
|
@ -118,7 +119,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
OnClick = TBExportClick
|
||||
end
|
||||
object TBUP: TToolButton
|
||||
Left = 877
|
||||
Left = 765
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22270#29255#19978#20256
|
||||
|
|
@ -126,7 +127,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
OnClick = TBUPClick
|
||||
end
|
||||
object ToolButton5: TToolButton
|
||||
Left = 980
|
||||
Left = 852
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25805#20316#26085#24535
|
||||
|
|
@ -134,15 +135,23 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
OnClick = ToolButton5Click
|
||||
end
|
||||
object ToolButton6: TToolButton
|
||||
Left = 1083
|
||||
Left = 939
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20462#25913#21382#21490
|
||||
ImageIndex = 15
|
||||
OnClick = ToolButton6Click
|
||||
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
|
||||
Left = 1186
|
||||
Left = 1161
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384#26684#24335
|
||||
|
|
@ -150,7 +159,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
OnClick = ToolButton2Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 1289
|
||||
Left = 1248
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
|
|
|
|||
|
|
@ -137,6 +137,7 @@ type
|
|||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
Tv1Column13: TcxGridDBColumn;
|
||||
ToolButton8: TToolButton;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
|
|
@ -200,7 +201,7 @@ implementation
|
|||
uses
|
||||
U_DataLink, U_RTFun, U_ClothInfoInput, U_CloInfoFileUp, U_ClothTypeSel,
|
||||
U_ZDYHelp, U_LabelPrint, U_ClothInfoImport, U_SysLogHelp, U_ClothInfoInput1,
|
||||
U_ClothInfoInput2, U_ClothInfoLog;
|
||||
U_ClothInfoInput2, U_ClothInfoLog, U_SelectStore;
|
||||
|
||||
{$R *.dfm}
|
||||
procedure TfrmClothInfo.InitGrid2();
|
||||
|
|
@ -723,6 +724,7 @@ begin
|
|||
with frmClothInfoInput do
|
||||
begin
|
||||
canshu3 := Self.canshu3;
|
||||
canshu4 := Self.canshu4;
|
||||
TypeInt := 2;
|
||||
FBCIID := Trim(Self.CDS_1.fieldbyname('BCIID').AsString);
|
||||
FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
|
||||
|
|
@ -1096,8 +1098,38 @@ end;
|
|||
|
||||
procedure TfrmClothInfo.ToolButton8Click(Sender: TObject);
|
||||
var
|
||||
MCTID: string;
|
||||
RTValues: TArray<string>;
|
||||
StoreName: string;
|
||||
frmSelectStore: TfrmSelectStore;
|
||||
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;
|
||||
|
||||
|
|
|
|||
|
|
@ -1433,9 +1433,8 @@ begin
|
|||
if SaveData() then
|
||||
begin
|
||||
|
||||
if FCTID = 'CT2412300005' then
|
||||
if (FCTID = 'CT2412300005') or (canshu4 = '¶þ´Î¼Ó¹¤') then
|
||||
begin
|
||||
|
||||
if CDS_1.Locate('BCISID', null, []) then
|
||||
SaveColor();
|
||||
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_InputReceiptType in 'U_InputReceiptType.pas' {frmInputReceiptType},
|
||||
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}
|
||||
|
||||
|
|
|
|||
|
|
@ -368,6 +368,10 @@
|
|||
<Form>frmCompanySel</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\A00通用窗体\U_UserSel.pas">
|
||||
<Form>frmUserSel</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<BuildConfiguration Include="Debug">
|
||||
<Key>Cfg_2</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ object frmInputReceiptType: TfrmInputReceiptType
|
|||
Left = 682
|
||||
Top = 315
|
||||
Caption = #35831#36755#20837#25991#26412
|
||||
ClientHeight = 86
|
||||
ClientWidth = 467
|
||||
ClientHeight = 159
|
||||
ClientWidth = 471
|
||||
Color = clWhite
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
|
|
@ -17,11 +17,12 @@ object frmInputReceiptType: TfrmInputReceiptType
|
|||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 467
|
||||
Height = 86
|
||||
Width = 471
|
||||
Height = 159
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
ExplicitHeight = 123
|
||||
ExplicitWidth = 467
|
||||
ExplicitHeight = 86
|
||||
object Button1: TButton
|
||||
Left = 308
|
||||
Top = 14
|
||||
|
|
@ -54,5 +55,19 @@ object frmInputReceiptType: TfrmInputReceiptType
|
|||
TabOrder = 1
|
||||
Width = 257
|
||||
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
|
||||
|
|
|
|||
|
|
@ -4,16 +4,19 @@ interface
|
|||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, ExtCtrls, DB, ADODB, cxGraphics, cxControls,
|
||||
cxLookAndFeels, cxLookAndFeelPainters, cxContainer, cxEdit, cxTextEdit,
|
||||
cxMaskEdit, cxDropDownEdit;
|
||||
Dialogs, StdCtrls, ExtCtrls, DB, ADODB, cxGraphics, cxControls, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxContainer, cxEdit, cxTextEdit, cxMaskEdit,
|
||||
cxDropDownEdit;
|
||||
|
||||
type
|
||||
TfrmInputReceiptType = class(TForm)
|
||||
Panel1: TPanel;
|
||||
Button1: TButton;
|
||||
cxComboBox1: TcxComboBox;
|
||||
FHDBCIONo: TEdit;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure FHDBCIONoKeyPress(Sender: TObject; var Key: Char);
|
||||
private
|
||||
{ Private declarations }
|
||||
public
|
||||
|
|
@ -30,10 +33,32 @@ implementation
|
|||
|
||||
procedure TfrmInputReceiptType.Button1Click(Sender: TObject);
|
||||
begin
|
||||
|
||||
|
||||
ModalResult := 1;
|
||||
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.
|
||||
|
||||
|
|
|
|||
|
|
@ -133,8 +133,6 @@ inherited frmItemizedListInPut: TfrmItemizedListInPut
|
|||
Align = alClient
|
||||
PopupMenu = PopupMenu2
|
||||
TabOrder = 0
|
||||
ExplicitLeft = 2
|
||||
ExplicitTop = 5
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnDblClick = Tv1DblClick
|
||||
OnMouseDown = Tv1MouseDown
|
||||
|
|
|
|||
|
|
@ -120,6 +120,7 @@ type
|
|||
procedure InitData();
|
||||
procedure ZDYHelp(FButn: TcxButtonEdit; LType: string);
|
||||
function SaveData(): Boolean;
|
||||
function SavesubData(): Boolean;
|
||||
function getTMMNo(fconNo: string): string;
|
||||
procedure SetXH();
|
||||
procedure initGrid1(MTIMID: string);
|
||||
|
|
@ -552,6 +553,126 @@ begin
|
|||
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);
|
||||
var
|
||||
MAXNO1: string;
|
||||
|
|
@ -569,12 +690,26 @@ begin
|
|||
Application.MessageBox('单位不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if CDS_1.Locate('TISPiece', null, []) then
|
||||
begin
|
||||
Application.MessageBox('匹数不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_1.Locate('TISQty', 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_Name', null, []) then
|
||||
begin
|
||||
Application.MessageBox('色布名称不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if CDS_1.Locate('Price', null, []) then
|
||||
begin
|
||||
|
|
@ -1308,12 +1443,27 @@ begin
|
|||
Application.MessageBox('单位不能为空!', '提示', 0);
|
||||
Exit;
|
||||
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);
|
||||
MQtyUnit := Trim(Self.CDS_1.FieldByName('TISUnit').AsString);
|
||||
FName := CDS_1.FieldByName('C_Name').ASString;
|
||||
FColor := CDS_1.FieldByName('C_Color').ASString;
|
||||
FColorNo := CDS_1.FieldByName('C_colorNo').ASString;
|
||||
if SaveData() then
|
||||
if SavesubData() then
|
||||
begin
|
||||
|
||||
try
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ uses
|
|||
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxBarBuiltInMenu, Math,
|
||||
dxDateRanges, IdExplicitTLSClientServerBase, U_BaseList, Vcl.Clipbrd,
|
||||
dxScrollbarAnnotations, cxProgressBar, FrameDateSel, dxSkinsCore,
|
||||
dxSkinsDefaultPainters;
|
||||
dxSkinsDefaultPainters, System.JSON, uSZHN_JSON;
|
||||
|
||||
type
|
||||
TfrmItemizedListList = class(TfrmBaseList)
|
||||
|
|
@ -251,7 +251,7 @@ begin
|
|||
end;
|
||||
end;
|
||||
SqlStr := SqlStr + ' order by A.filltime desc';
|
||||
|
||||
// ShowMessage(SqlStr);
|
||||
InitCDSData(ADOQueryMain, Order_Main, Tv1, SqlStr, SGetFilters(Panel1, 1, 2), 'TISId');
|
||||
end;
|
||||
|
||||
|
|
@ -392,9 +392,11 @@ end;
|
|||
|
||||
procedure TfrmItemizedListList.TBPrintClick(Sender: TObject);
|
||||
var
|
||||
MFiltration: string;
|
||||
MFiltration, FTIMID: string;
|
||||
MPrintJson: string;
|
||||
JSONObject: TJSONObject; // JSON类
|
||||
begin
|
||||
FTIMID := Trim(Self.Order_Main.fieldbyname('TIMID').AsString);
|
||||
MFiltration := Trim(Self.Order_Main.fieldbyname('TIMNo').AsString);
|
||||
MPrintJson := ' {"LMType": "ItemizedListList1" ';
|
||||
MPrintJson := MPrintJson + ' ,"PreviewPrint": true ';
|
||||
|
|
@ -404,6 +406,28 @@ begin
|
|||
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" }, ';
|
||||
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" } ] } ';
|
||||
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;
|
||||
|
||||
procedure TfrmItemizedListList.TBRafreshClick(Sender: TObject);
|
||||
|
|
@ -606,6 +630,7 @@ procedure TfrmItemizedListList.ToolButton5Click(Sender: TObject);
|
|||
var
|
||||
MFiltration: string;
|
||||
MPrintJson: string;
|
||||
JSONObject: TJSONObject; // JSON类
|
||||
begin
|
||||
MFiltration := SelCDSKey(Order_Main, ['TISId'])[0];
|
||||
MPrintJson := ' {"LMType": "ItemizedListList2" ';
|
||||
|
|
@ -616,6 +641,28 @@ begin
|
|||
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" }, ';
|
||||
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" } ] } ';
|
||||
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;
|
||||
|
||||
procedure TfrmItemizedListList.cxTabControl1Change(Sender: TObject);
|
||||
|
|
@ -729,6 +776,7 @@ procedure TfrmItemizedListList.ToolButton1Click(Sender: TObject);
|
|||
var
|
||||
MFiltration: string;
|
||||
MPrintJson: string;
|
||||
JSONObject: TJSONObject; // JSON类
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
|
|
@ -760,6 +808,30 @@ begin
|
|||
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" }, ';
|
||||
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" } ] } ';
|
||||
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;
|
||||
|
||||
procedure TfrmItemizedListList.ToolButton2Click(Sender: TObject);
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ inherited frmItemizedListQtyInPut: TfrmItemizedListQtyInPut
|
|||
end
|
||||
object inQty: TcxCurrencyEdit
|
||||
Left = 231
|
||||
Top = 3
|
||||
Top = 6
|
||||
Properties.AssignedValues.DisplayFormat = True
|
||||
TabOrder = 1
|
||||
OnKeyPress = inQtyKeyPress
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ type
|
|||
procedure TBSaveClick(Sender: TObject);
|
||||
procedure btnAddClick(Sender: TObject);
|
||||
procedure Tv1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
function SaveData(): Boolean;
|
||||
|
|
@ -232,6 +233,7 @@ end;
|
|||
|
||||
procedure TfrmItemizedListQtyInPut.btnAddClick(Sender: TObject);
|
||||
begin
|
||||
|
||||
if CDS_Sub.IsEmpty = False then
|
||||
begin
|
||||
CopyAddRowCDS(CDS_Sub);
|
||||
|
|
@ -350,6 +352,12 @@ begin
|
|||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmItemizedListQtyInPut.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmItemizedListQtyInPut := nil;
|
||||
end;
|
||||
|
||||
function TfrmItemizedListQtyInPut.SaveData(): Boolean;
|
||||
var
|
||||
Maxno, MBCIOID: string;
|
||||
|
|
@ -447,6 +455,8 @@ begin
|
|||
end;
|
||||
|
||||
procedure TfrmItemizedListQtyInPut.FormShow(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
inherited;
|
||||
ReadCxGrid('Âëµ¥µÇ¼Ç', Tv1, 'óÒ×»ã×ֿܲâ');
|
||||
|
|
@ -461,19 +471,43 @@ begin
|
|||
CreateDataSet;
|
||||
end;
|
||||
|
||||
with ADOQueryTemp do
|
||||
try
|
||||
tv1.BeginUpdate();
|
||||
CDS_Sub.DisableControls;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.* ');
|
||||
sql.Add(' from BS_Cloth_IO A');
|
||||
sql.Add(' where ioflag=''Èë¿â'' and TISId=''' + Trim(FTISId) + '''');
|
||||
sql.Add(' order by qty desc ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryTemp, CDS_Sub);
|
||||
SInitCDSData(ADOQueryTemp, CDS_Sub);
|
||||
finally
|
||||
CDS_Sub.EnableControls;
|
||||
TV1.DataController.Filter.Clear;
|
||||
tv1.EndUpdate;
|
||||
end;
|
||||
if CDS_Sub.IsEmpty then
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.* ');
|
||||
sql.Add(' from BS_Cloth_IO A');
|
||||
sql.Add(' where ioflag=''Èë¿â'' and TISId=''' + Trim(FTISId) + '''');
|
||||
sql.Add(' order by qty desc ');
|
||||
Open;
|
||||
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;
|
||||
|
||||
SCreateCDS(ADOQueryTemp, CDS_Sub);
|
||||
SInitCDSData(ADOQueryTemp, CDS_Sub);
|
||||
end;
|
||||
|
||||
procedure TfrmItemizedListQtyInPut.FromCoNameDblClick(Sender: TObject);
|
||||
|
|
@ -488,6 +522,7 @@ var
|
|||
begin
|
||||
if Key = #13 then
|
||||
begin
|
||||
|
||||
with CDS_Sub do
|
||||
begin
|
||||
DisableControls;
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ inherited frmPlanScanInEdit: TfrmPlanScanInEdit
|
|||
ParentFont = False
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 470
|
||||
Top = 67
|
||||
Left = 1070
|
||||
Top = 78
|
||||
Width = 66
|
||||
Height = 33
|
||||
Caption = #21306#22495
|
||||
|
|
@ -48,10 +48,11 @@ inherited frmPlanScanInEdit: TfrmPlanScanInEdit
|
|||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 670
|
||||
Top = 67
|
||||
Top = 51
|
||||
Width = 66
|
||||
Height = 33
|
||||
Caption = #36710#36742
|
||||
|
|
@ -64,7 +65,7 @@ inherited frmPlanScanInEdit: TfrmPlanScanInEdit
|
|||
end
|
||||
object Label5: TLabel
|
||||
Left = 1016
|
||||
Top = 41
|
||||
Top = 148
|
||||
Width = 48
|
||||
Height = 17
|
||||
Caption = #20837#24211#21333#21495
|
||||
|
|
@ -72,7 +73,7 @@ inherited frmPlanScanInEdit: TfrmPlanScanInEdit
|
|||
end
|
||||
object Label4: TLabel
|
||||
Left = 1022
|
||||
Top = 72
|
||||
Top = 179
|
||||
Width = 48
|
||||
Height = 17
|
||||
Caption = #20837#24211#26102#38388
|
||||
|
|
@ -80,12 +81,25 @@ inherited frmPlanScanInEdit: TfrmPlanScanInEdit
|
|||
end
|
||||
object Label11: TLabel
|
||||
Left = 1022
|
||||
Top = 98
|
||||
Top = 205
|
||||
Width = 48
|
||||
Height = 17
|
||||
Caption = #20837#24211#31867#22411
|
||||
Visible = False
|
||||
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
|
||||
Tag = 1
|
||||
Left = 1
|
||||
|
|
@ -116,17 +130,8 @@ inherited frmPlanScanInEdit: TfrmPlanScanInEdit
|
|||
ImageIndex = 21
|
||||
OnClick = ToolButton3Click
|
||||
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
|
||||
Left = 174
|
||||
Left = 87
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384#26684#24335
|
||||
|
|
@ -134,7 +139,7 @@ inherited frmPlanScanInEdit: TfrmPlanScanInEdit
|
|||
OnClick = ToolButton8Click
|
||||
end
|
||||
object ToolButton7: TToolButton
|
||||
Left = 261
|
||||
Left = 174
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
|
|
@ -142,7 +147,7 @@ inherited frmPlanScanInEdit: TfrmPlanScanInEdit
|
|||
OnClick = ToolButton7Click
|
||||
end
|
||||
object btnGetOutNo: TToolButton
|
||||
Left = 324
|
||||
Left = 237
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21462#21495
|
||||
|
|
@ -167,16 +172,17 @@ inherited frmPlanScanInEdit: TfrmPlanScanInEdit
|
|||
end
|
||||
object wlCompany: TBtnEditA
|
||||
Tag = 1
|
||||
Left = 535
|
||||
Top = 69
|
||||
Left = 1135
|
||||
Top = 80
|
||||
Width = 121
|
||||
Height = 26
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
OnBtnClick = wlCompanyBtnClick
|
||||
end
|
||||
object InNo: TEdit
|
||||
Left = 1070
|
||||
Top = 37
|
||||
Top = 144
|
||||
Width = 100
|
||||
Height = 25
|
||||
TabOrder = 3
|
||||
|
|
@ -184,7 +190,7 @@ inherited frmPlanScanInEdit: TfrmPlanScanInEdit
|
|||
end
|
||||
object CRTime: TDateTimePicker
|
||||
Left = 1070
|
||||
Top = 68
|
||||
Top = 175
|
||||
Width = 100
|
||||
Height = 20
|
||||
Date = 41337.000000000000000000
|
||||
|
|
@ -195,7 +201,7 @@ inherited frmPlanScanInEdit: TfrmPlanScanInEdit
|
|||
end
|
||||
object CRType: TComboBox
|
||||
Left = 1070
|
||||
Top = 94
|
||||
Top = 201
|
||||
Width = 100
|
||||
Height = 25
|
||||
Style = csDropDownList
|
||||
|
|
@ -210,7 +216,7 @@ inherited frmPlanScanInEdit: TfrmPlanScanInEdit
|
|||
object carPlate: TBtnEditA
|
||||
Tag = 1
|
||||
Left = 742
|
||||
Top = 70
|
||||
Top = 54
|
||||
Width = 121
|
||||
Height = 26
|
||||
TabOrder = 6
|
||||
|
|
@ -231,6 +237,24 @@ inherited frmPlanScanInEdit: TfrmPlanScanInEdit
|
|||
TabOrder = 7
|
||||
OnClick = TquerenClick
|
||||
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
|
||||
object Panel2: TPanel [1]
|
||||
|
|
|
|||
|
|
@ -59,7 +59,6 @@ type
|
|||
edtScan: TEdit;
|
||||
Label6: TLabel;
|
||||
Label1: TLabel;
|
||||
ToolButton5: TToolButton;
|
||||
Label2: TLabel;
|
||||
wlCompany: TBtnEditA;
|
||||
Label5: TLabel;
|
||||
|
|
@ -71,6 +70,9 @@ type
|
|||
carPlate: TBtnEditA;
|
||||
Tv3Column1: TcxGridDBColumn;
|
||||
Tqueren: TButton;
|
||||
Label3: TLabel;
|
||||
Driver: TBtnEditA;
|
||||
Driverid: TEdit;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
|
|
@ -79,15 +81,16 @@ type
|
|||
procedure ToolButton7Click(Sender: TObject);
|
||||
procedure ToolButton8Click(Sender: TObject);
|
||||
procedure edtScanKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure ToolButton5Click(Sender: TObject);
|
||||
procedure wlCompanyBtnClick(Sender: TObject);
|
||||
procedure carPlateBtnClick(Sender: TObject);
|
||||
procedure TquerenClick(Sender: TObject);
|
||||
procedure DriverBtnClick(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
FScan, FSubIds, FZCID: string;
|
||||
procedure PlayWav(MWav: string);
|
||||
procedure InitKC();
|
||||
procedure InitStatus();
|
||||
procedure ScanKW();
|
||||
procedure ScanCIID();
|
||||
function SaveData(): Boolean;
|
||||
|
|
@ -102,7 +105,7 @@ var
|
|||
implementation
|
||||
|
||||
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}
|
||||
|
||||
|
|
@ -266,25 +269,6 @@ begin
|
|||
|
||||
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);
|
||||
begin
|
||||
try
|
||||
|
|
@ -321,6 +305,25 @@ begin
|
|||
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);
|
||||
var
|
||||
maxNo: string;
|
||||
|
|
@ -352,7 +355,7 @@ begin
|
|||
if SaveData() then
|
||||
begin
|
||||
Application.MessageBox('±£´æ³É¹¦!', 'Ìáʾ', 0);
|
||||
//ModalResult:=1;
|
||||
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
|
@ -440,12 +443,11 @@ begin
|
|||
// RTSetSaveDataCDS(ADOQueryCmd, Tv3, CDS_3, 'Trade_Market_CarTransportSub', 0);
|
||||
FieldByName('ZCID').Value := Trim(MaxMid);
|
||||
FieldByName('ZCMXID').Value := Trim(MaxSid);
|
||||
|
||||
FieldByName('TmMno').Value := CDS_3.fieldbyname('TMMNo').Value;
|
||||
FieldByName('TmMid').Value := CDS_3.fieldbyname('TMMId').Value;
|
||||
|
||||
Post;
|
||||
end;
|
||||
InitStatus();
|
||||
CDS_3.Edit;
|
||||
CDS_3.FieldByName('ZCMXID').Value := Trim(MaxSid);
|
||||
Next;
|
||||
|
|
@ -463,5 +465,37 @@ begin
|
|||
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.
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ inherited frmTradeClothTotalInInput: TfrmTradeClothTotalInInput
|
|||
Height = 518
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
ExplicitTop = 36
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnMouseDown = Tv1MouseDown
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
|
|
|
|||
|
|
@ -181,8 +181,11 @@ begin
|
|||
FieldByName('IOTime').Value := Trim(FormatDateTime('yyyy-MM-dd', Now));
|
||||
FieldByName('StkCoNo').Value := '本厂仓库';
|
||||
FieldByName('StkCoName').Value := '本厂仓库';
|
||||
FieldByName('FromCoNo').Value := 'G0001';
|
||||
FieldByName('FromCoName').Value := 'Ⱦ³§¹©Ó¦ÉÌ';
|
||||
FieldByName('QtyUnit').Value := 'Kg';
|
||||
FieldByName('C_Degree').AsString := Trim('坯布');
|
||||
FieldByName('IOType').Value := '²É¹ºÈë¿â';
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
|
|
|
|||
|
|
@ -197,8 +197,9 @@ type
|
|||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_TradeTotallClothOutinput, U_AttachmentUpload,U_ProgressUpdate,
|
||||
U_LabelPrint, U_PrintLabFun, U_dynamicsDll, U_printPdf, U_InputReceiptType;
|
||||
U_DataLink, U_RTFun, U_TradeTotallClothOutinput, U_AttachmentUpload,
|
||||
U_ProgressUpdate, U_LabelPrint, U_PrintLabFun, U_dynamicsDll, U_printPdf,
|
||||
U_InputReceiptType;
|
||||
|
||||
{$R *.dfm}
|
||||
procedure TfrmTradeClothTotalOutList.InitGrid(MWSql: string);
|
||||
|
|
@ -481,16 +482,15 @@ begin
|
|||
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
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(MBCIONo)));
|
||||
ExecSQL;
|
||||
end;
|
||||
// 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(MBCIONo)));
|
||||
// ExecSQL;
|
||||
// end;
|
||||
Self.InitGrid2();
|
||||
end;
|
||||
end;
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@ begin
|
|||
SqlStr := SqlStr + ' @pageIndex=' + inttostr(CurrentPage);
|
||||
SqlStr := SqlStr + ' ,@pageSize=' + inttostr(RecordsNumber);
|
||||
SqlStr := SqlStr + ' ,@criteria= ' + quotedstr(WSql);
|
||||
showmessage(SqlStr);
|
||||
// showmessage(SqlStr);
|
||||
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));
|
||||
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_CustomFun in '..\A00通用方法\U_CustomFun.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}
|
||||
|
||||
|
|
|
|||
|
|
@ -304,6 +304,10 @@
|
|||
<DCCReference Include="..\A00通用方法\U_CustomFun.pas"/>
|
||||
<DCCReference Include="..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas"/>
|
||||
<DCCReference Include="..\A00通用方法\U_ProgressUpdate.pas"/>
|
||||
<DCCReference Include="Unit2.pas">
|
||||
<Form>Form2</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<BuildConfiguration Include="Debug">
|
||||
<Key>Cfg_2</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
端口号=
|
||||
电子秤调用Dll文件=
|
||||
启用电子秤Dll文件=1
|
||||
码表调用Dll文件=
|
||||
码表调用Dll文件=AJCYData10.dll
|
||||
启用码表Dll文件=1
|
||||
启用码表单位=1
|
||||
标签份数=2
|
||||
|
|
|
|||
|
|
@ -16,8 +16,9 @@ implementation
|
|||
|
||||
uses
|
||||
U_DataLink, U_globalVar, U_iniParam, U_TradeMachInsp, U_ProductJYHZList,
|
||||
U_DeviceJkTest, U_TradeClothInspList, U_MachRollMain, U_TradePack,
|
||||
U_DjdDjClList, U_TradeClothTotalCXJYOutList,U_MachRollMarket,U_MachRollMain_M;
|
||||
U_DeviceJkTest, U_TradeClothInspList, U_MachRollMain, U_TradePack, Unit2,
|
||||
U_DjdDjClList, U_TradeClothTotalCXJYOutList, U_MachRollMarket,
|
||||
U_MachRollMain_M;
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// 功能说明:取Dll中得窗体 //
|
||||
|
|
@ -133,7 +134,7 @@ begin
|
|||
|
||||
2: //测试
|
||||
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
|
||||
fFormID := FormID;
|
||||
FormStyle := mstyle;
|
||||
|
|
@ -157,7 +158,7 @@ begin
|
|||
|
||||
1: //机台检验
|
||||
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
|
||||
fFormID := FormID;
|
||||
// FormStyle := mstyle;
|
||||
|
|
@ -166,9 +167,10 @@ begin
|
|||
mnewHandle := Handle;
|
||||
end;
|
||||
end;
|
||||
11: //»ų́¼ìÑé
|
||||
|
||||
11: //»ų́¼ìÑé
|
||||
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
|
||||
fFormID := FormID;
|
||||
// FormStyle := mstyle;
|
||||
|
|
|
|||
|
|
@ -552,7 +552,7 @@ inherited frmMachRollMain: TfrmMachRollMain
|
|||
end
|
||||
object Button1: TButton
|
||||
Left = 309
|
||||
Top = 244
|
||||
Top = 249
|
||||
Width = 150
|
||||
Height = 59
|
||||
Caption = #20986' '#24211
|
||||
|
|
@ -973,8 +973,8 @@ inherited frmMachRollMain: TfrmMachRollMain
|
|||
end
|
||||
end
|
||||
object cxGroupBox_keys: TcxGroupBox [2]
|
||||
Left = 295
|
||||
Top = 321
|
||||
Left = 496
|
||||
Top = 119
|
||||
Caption = #34394#25311#38190#30424
|
||||
Style.LookAndFeel.NativeStyle = False
|
||||
StyleDisabled.LookAndFeel.NativeStyle = False
|
||||
|
|
@ -997,7 +997,6 @@ inherited frmMachRollMain: TfrmMachRollMain
|
|||
inherited dxPanel1: TdxPanel
|
||||
Width = 323
|
||||
Height = 257
|
||||
ExplicitTop = -3
|
||||
ExplicitWidth = 323
|
||||
ExplicitHeight = 257
|
||||
inherited SpeedButton1: TSpeedButton
|
||||
|
|
@ -1051,8 +1050,8 @@ inherited frmMachRollMain: TfrmMachRollMain
|
|||
end
|
||||
end
|
||||
object MovePanel1: TMovePanel
|
||||
Left = 79
|
||||
Top = -28
|
||||
Left = 170
|
||||
Top = -12
|
||||
Width = 237
|
||||
Height = 45
|
||||
BevelOuter = bvNone
|
||||
|
|
|
|||
|
|
@ -210,6 +210,7 @@ type
|
|||
procedure InitGrid2();
|
||||
procedure OpenCom(DllName: string);
|
||||
procedure CloseCom(DllName: string);
|
||||
procedure clearCom(DllName: string);
|
||||
function SaveData(): Boolean;
|
||||
procedure PrtData(MCIID: string; againPring: Boolean = false);
|
||||
procedure BadSpeedButtonClick(Sender: TObject);
|
||||
|
|
@ -237,6 +238,38 @@ uses
|
|||
U_ProgressUpdate, U_LabelPrint, U_TradeClothTotalOutSel;
|
||||
{$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();
|
||||
var
|
||||
SqlStr: string;
|
||||
|
|
@ -352,6 +385,10 @@ begin
|
|||
finally
|
||||
BTPrint.Enabled := true;
|
||||
end;
|
||||
if fIsCommopen then
|
||||
begin
|
||||
ClearCom(MBDYDllName);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmMachRollMain.bt_printmdClick(Sender: TObject);
|
||||
|
|
@ -421,7 +458,7 @@ var
|
|||
i: Integer;
|
||||
begin
|
||||
try
|
||||
BTPrint.Enabled := false;
|
||||
Button1.Enabled := false;
|
||||
MTMSId := Trim(SelTVKey(Tv2, ['TMSId'])[0]);
|
||||
edtScan.SetFocus;
|
||||
|
||||
|
|
@ -449,7 +486,10 @@ begin
|
|||
end;
|
||||
|
||||
FCIID := trim(trim(ADOQueryBaseCmd.fieldbyName('MaxIOID2').AsString));
|
||||
|
||||
if trim(cds_params.fieldbyName('outPage').AsString) = '√' then
|
||||
begin
|
||||
PrtData(FCIID);
|
||||
end;
|
||||
ADOQueryBaseCmd.Connection.CommitTrans;
|
||||
TradeMarketProgressUpdate(ADOQueryBaseCmd, MTMSId);
|
||||
except
|
||||
|
|
@ -463,7 +503,11 @@ begin
|
|||
InitGrid2();
|
||||
FCIID := '';
|
||||
finally
|
||||
BTPrint.Enabled := true;
|
||||
Button1.Enabled := true;
|
||||
end;
|
||||
if fIsCommopen then
|
||||
begin
|
||||
ClearCom(MBDYDllName);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
|
@ -828,6 +872,7 @@ begin
|
|||
SQL.Clear;
|
||||
SQL.Add(' EXEC P_BS_Cloth_Prt2 ');
|
||||
SQL.Add(' @Filtration=''' + trim(FBCIOID) + '''');
|
||||
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryPrint.IsEmpty then
|
||||
|
|
@ -1081,7 +1126,7 @@ begin
|
|||
fIsCommopen := false;
|
||||
end;
|
||||
finally
|
||||
// FreeLibrary(Th);
|
||||
// FreeLibrary(Th);
|
||||
end;
|
||||
end
|
||||
else
|
||||
|
|
@ -1325,15 +1370,16 @@ begin
|
|||
// fLabVolume := trim(ADOQueryPrint.fieldbyName('SLabVolume').AsString)
|
||||
// else
|
||||
// fLabVolume := trim(ADOQueryPrint.fieldbyName('LabVolume').AsString);
|
||||
|
||||
if fLabVolume = '' then
|
||||
begin
|
||||
Application.MessageBox('订单还未设置标签!', '提示信息', MB_ICONERROR);
|
||||
exit;
|
||||
end;
|
||||
|
||||
ExportFtErpFile(fLabVolume + '.fr3', ADOQueryBaseTemp);
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + fLabVolume + '.fr3';
|
||||
// if fLabVolume = '' then
|
||||
// begin
|
||||
// Application.MessageBox('订单还未设置标签!', '提示信息', MB_ICONERROR);
|
||||
// exit;
|
||||
// end;
|
||||
//
|
||||
// ExportFtErpFile(fLabVolume + '.fr3', ADOQueryBaseTemp);
|
||||
// fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + fLabVolume + '.fr3';
|
||||
ExportFtErpFile('客户标签.fr3', ADOQueryBaseTemp);
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\客户标签.fr3';
|
||||
if FileExists(fPrintFile) then
|
||||
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_RPFun in '..\..\..\public10\ThreeFun\Fun\U_RPFun.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}
|
||||
|
||||
|
|
|
|||
|
|
@ -238,6 +238,10 @@
|
|||
<DCCReference Include="..\T02贸易汇总仓库\U_ItemizedListQtyInPut.pas">
|
||||
<Form>frmItemizedListQtyInPut</Form>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\A00通用窗体\U_UserSel.pas">
|
||||
<Form>frmUserSel</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<BuildConfiguration Include="Debug">
|
||||
<Key>Cfg_2</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
|
|||
Position = poMainFormCenter
|
||||
WindowState = wsMaximized
|
||||
OnClose = FormClose
|
||||
ExplicitLeft = -451
|
||||
ExplicitWidth = 1937
|
||||
ExplicitHeight = 775
|
||||
PixelsPerInch = 96
|
||||
|
|
@ -40,24 +39,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
|
|||
Style = tbsDropDown
|
||||
OnClick = TBSaveClick
|
||||
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
|
||||
Left = 268
|
||||
Left = 94
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686
|
||||
|
|
@ -65,20 +48,36 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
|
|||
OnClick = TBAddClick
|
||||
end
|
||||
object ToolButton6: TToolButton
|
||||
Left = 339
|
||||
Left = 165
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 6
|
||||
end
|
||||
object TBEdit: TToolButton
|
||||
Left = 410
|
||||
Left = 236
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 3
|
||||
OnClick = TBEditClick
|
||||
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
|
||||
object ToolBar2: TToolBar [1]
|
||||
Tag = 1
|
||||
|
|
@ -556,8 +555,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
|
|||
TabOrder = 3
|
||||
OnClick = ScrollBox1Click
|
||||
object Label3: TLabel
|
||||
Left = 730
|
||||
Top = 70
|
||||
Left = 1080
|
||||
Top = 66
|
||||
Width = 64
|
||||
Height = 21
|
||||
Caption = #21046#21333#26085#26399
|
||||
|
|
@ -571,14 +570,14 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
|
|||
Visible = False
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 29
|
||||
Top = 68
|
||||
Left = 656
|
||||
Top = 64
|
||||
Width = 77
|
||||
Height = 21
|
||||
Caption = #22791' '#27880
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 730
|
||||
Left = 670
|
||||
Top = 21
|
||||
Width = 64
|
||||
Height = 21
|
||||
|
|
@ -607,8 +606,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
|
|||
Caption = #35746#21333#31867#22411
|
||||
end
|
||||
object Label18: TLabel
|
||||
Left = 730
|
||||
Top = 119
|
||||
Left = 338
|
||||
Top = 64
|
||||
Width = 64
|
||||
Height = 21
|
||||
Caption = #21457#36135#22320#22336
|
||||
|
|
@ -621,15 +620,22 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
|
|||
Caption = #35746#21333#21495
|
||||
end
|
||||
object Label19: TLabel
|
||||
Left = 1077
|
||||
Top = 68
|
||||
Left = 33
|
||||
Top = 66
|
||||
Width = 80
|
||||
Height = 21
|
||||
Caption = #32852#31995#26041#24335#65306
|
||||
end
|
||||
object lbl2: TLabel
|
||||
Left = 33
|
||||
Top = 110
|
||||
Width = 62
|
||||
Height = 21
|
||||
Caption = #19994' '#21153' '#21592':'
|
||||
end
|
||||
object TMMNo: TcxTextEdit
|
||||
Tag = 2
|
||||
Left = 814
|
||||
Left = 754
|
||||
Top = 15
|
||||
Enabled = False
|
||||
TabOrder = 0
|
||||
|
|
@ -637,8 +643,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
|
|||
end
|
||||
object TMMDate: TDateTimePicker
|
||||
Tag = 2
|
||||
Left = 814
|
||||
Top = 66
|
||||
Left = 1164
|
||||
Top = 62
|
||||
Width = 200
|
||||
Height = 29
|
||||
BevelInner = bvNone
|
||||
|
|
@ -663,10 +669,10 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
|
|||
end
|
||||
object OrdNote: TMemo
|
||||
Tag = 2
|
||||
Left = 122
|
||||
Top = 68
|
||||
Width = 511
|
||||
Height = 81
|
||||
Left = 754
|
||||
Top = 64
|
||||
Width = 320
|
||||
Height = 90
|
||||
Hint = 'OrdNote/'#22791#27880
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 3
|
||||
|
|
@ -708,8 +714,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
|
|||
end
|
||||
object ShippingAddress: TcxButtonEdit
|
||||
Tag = 2
|
||||
Left = 814
|
||||
Top = 115
|
||||
Left = 416
|
||||
Top = 65
|
||||
Hint = 'ShippingAddress/'#21457#36135#22320#22336
|
||||
Properties.Buttons = <
|
||||
item
|
||||
|
|
@ -745,8 +751,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
|
|||
end
|
||||
object CONTACT: TcxButtonEdit
|
||||
Tag = 2
|
||||
Left = 1164
|
||||
Top = 63
|
||||
Left = 122
|
||||
Top = 61
|
||||
Hint = 'CONTACT/'#32852#31995#26041#24335
|
||||
Properties.Buttons = <
|
||||
item
|
||||
|
|
@ -759,6 +765,30 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
|
|||
OnDblClick = OurCoNameDblClick
|
||||
Width = 200
|
||||
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
|
||||
inherited ADOQueryBaseCmd: TADOQuery
|
||||
Connection = DataLink_TradeMarket.ADOLink
|
||||
|
|
@ -936,7 +966,7 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
|
|||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 49
|
||||
Top = 74
|
||||
Top = 266
|
||||
object N5: TMenuItem
|
||||
Caption = #20445#23384#21518#31435#21363#25552#20132
|
||||
OnClick = N5Click
|
||||
|
|
|
|||
|
|
@ -138,6 +138,9 @@ type
|
|||
TBAdd: TToolButton;
|
||||
ToolButton6: TToolButton;
|
||||
TBEdit: TToolButton;
|
||||
lbl2: TLabel;
|
||||
Saleser: TcxButtonEdit;
|
||||
SalesId: TcxTextEdit;
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(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 TBAddClick(Sender: TObject);
|
||||
procedure TBEditClick(Sender: TObject);
|
||||
procedure SaleserPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||
procedure SaleserDblClick(Sender: TObject);
|
||||
private
|
||||
FSCXDH: string;
|
||||
procedure InitData();
|
||||
|
|
@ -219,7 +224,7 @@ implementation
|
|||
uses
|
||||
U_DataLink, U_ZDYHelp, U_ZDYHelpSel, U_RTFun, U_CompanySel, U_PictureUpload,
|
||||
U_ProgressUpdate, U_ClothInfoSel, U_ComContactSel, U_TradeMarketList,
|
||||
U_LabelPrint, U_TradeMarketQtyInPut;
|
||||
U_LabelPrint, U_TradeMarketQtyInPut, U_UserSel;
|
||||
|
||||
|
||||
{$R *.dfm}
|
||||
|
|
@ -445,7 +450,7 @@ begin
|
|||
begin
|
||||
close;
|
||||
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
|
||||
sql.Add(' and Stores=''新余'' ');
|
||||
|
|
@ -455,7 +460,7 @@ begin
|
|||
CustName.Properties.LookupItems.Clear;
|
||||
while not Eof do
|
||||
begin
|
||||
CustName.Properties.LookupItems.Add(Trim(ADO_KH.fieldByName('CoAbbrName').AsString));
|
||||
CustName.Properties.LookupItems.Add(Trim(ADO_KH.fieldByName('CoName').AsString));
|
||||
Next;
|
||||
end;
|
||||
CustName.ItemIndex := -1;
|
||||
|
|
@ -526,6 +531,33 @@ begin
|
|||
// frmTradeMarketlist := TfrmTradeMarketlist.Create(Application);
|
||||
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;
|
||||
var
|
||||
maxno, Smaxno, maxTMMNo, MaxFNo, MQZ, MTMMNo: string;
|
||||
|
|
@ -768,7 +800,7 @@ begin
|
|||
Application.MessageBox('单价不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if not CDS_KH.Locate('CoAbbrName', self.CustName.Text, []) then
|
||||
if not CDS_KH.Locate('CoName', self.CustName.Text, []) then
|
||||
begin
|
||||
Application.MessageBox('客户不存在!', '提示', 0);
|
||||
Exit;
|
||||
|
|
@ -1053,9 +1085,32 @@ end;
|
|||
procedure TfrmTradeMarketInPut.CustNamePropertiesChange(Sender: TObject);
|
||||
begin
|
||||
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
|
||||
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;
|
||||
|
||||
|
|
@ -1079,7 +1134,7 @@ begin
|
|||
// end;
|
||||
if canshu4 = '新余' then
|
||||
sql.Add(' and A.Stores=''' + Trim('新余') + '''');
|
||||
sql.Add(' and A.CoAbbrName=''' + Trim(CustName.Text) + '''');
|
||||
sql.Add(' and A.CoName=''' + Trim(CustName.Text) + '''');
|
||||
Open;
|
||||
end;
|
||||
self.ShippingAddress.Text := Trim(adotemp.fieldbyname('mxaddress').AsString);
|
||||
|
|
@ -1350,7 +1405,7 @@ begin
|
|||
if ShowModal = 1 then
|
||||
begin
|
||||
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.CONTACT.Text := Trim(frmCompanySel.CDS_1.fieldbyname('Telephone').AsString);
|
||||
|
||||
|
|
|
|||
|
|
@ -506,6 +506,12 @@ inherited frmTradeMarketList: TfrmTradeMarketList
|
|||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object Tv1Column26: TcxGridDBColumn
|
||||
Caption = #36710#21495
|
||||
DataBinding.FieldName = 'carPlate'
|
||||
DataBinding.IsNullValueType = True
|
||||
Width = 60
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ type
|
|||
TBZF: TToolButton;
|
||||
TBNOZF: TToolButton;
|
||||
Tv1Column25: TcxGridDBColumn;
|
||||
Tv1Column26: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
|
|
@ -525,14 +526,15 @@ begin
|
|||
begin
|
||||
if Order_Main.fieldbyname('SSel').AsBoolean then
|
||||
begin
|
||||
if WSql <> '' then
|
||||
begin
|
||||
WSql := WSql + ',' + Trim(Order_Main.fieldbyname('TMSId').AsString);
|
||||
end
|
||||
else
|
||||
begin
|
||||
WSql := Trim(Order_Main.fieldbyname('TMSId').AsString);
|
||||
end;
|
||||
// if WSql <> '' then
|
||||
// begin
|
||||
// WSql := WSql + ',' + Trim(Order_Main.fieldbyname('TMSId').AsString); //TMSId
|
||||
// end
|
||||
// else
|
||||
// begin
|
||||
// WSql := Trim(Order_Main.fieldbyname('TMSId').AsString);
|
||||
// end;
|
||||
WSql := Trim(Order_Main.fieldbyname('TMMId').AsString);
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ inherited frmTradeMarketList_JD: TfrmTradeMarketList_JD
|
|||
FormStyle = fsMDIChild
|
||||
Position = poScreenCenter
|
||||
Visible = True
|
||||
ExplicitLeft = -338
|
||||
ExplicitWidth = 1439
|
||||
ExplicitHeight = 673
|
||||
PixelsPerInch = 96
|
||||
|
|
@ -85,6 +86,7 @@ inherited frmTradeMarketList_JD: TfrmTradeMarketList_JD
|
|||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.CellHints = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.IndicatorWidth = 30
|
||||
|
|
@ -159,8 +161,6 @@ inherited frmTradeMarketList_JD: TfrmTradeMarketList_JD
|
|||
Height = 202
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
ExplicitTop = 401
|
||||
ExplicitHeight = 232
|
||||
object Tv2: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
ScrollbarAnnotations.CustomAnnotations = <>
|
||||
|
|
@ -178,6 +178,7 @@ inherited frmTradeMarketList_JD: TfrmTradeMarketList_JD
|
|||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.CellHints = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.IndicatorWidth = 30
|
||||
|
|
@ -340,6 +341,7 @@ inherited frmTradeMarketList_JD: TfrmTradeMarketList_JD
|
|||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.CellHints = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.IndicatorWidth = 30
|
||||
|
|
@ -406,8 +408,6 @@ inherited frmTradeMarketList_JD: TfrmTradeMarketList_JD
|
|||
Height = 208
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
ExplicitTop = 395
|
||||
ExplicitHeight = 238
|
||||
object Tv4: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
ScrollbarAnnotations.CustomAnnotations = <>
|
||||
|
|
@ -425,6 +425,7 @@ inherited frmTradeMarketList_JD: TfrmTradeMarketList_JD
|
|||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.CellHints = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.IndicatorWidth = 30
|
||||
|
|
@ -678,4 +679,9 @@ inherited frmTradeMarketList_JD: TfrmTradeMarketList_JD
|
|||
Left = 860
|
||||
Top = 464
|
||||
end
|
||||
object Timer1: TTimer
|
||||
OnTimer = Timer1Timer
|
||||
Left = 832
|
||||
Top = 200
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -98,8 +98,10 @@ type
|
|||
Label4: TLabel;
|
||||
ToolBar4: TToolBar;
|
||||
Label5: TLabel;
|
||||
Timer1: TTimer;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure Timer1Timer(Sender: TObject);
|
||||
private
|
||||
DQdate: TDateTime;
|
||||
procedure InitGrid();
|
||||
|
|
@ -147,22 +149,11 @@ end;
|
|||
|
||||
procedure TfrmTradeMarketList_JD.InitGrid();
|
||||
begin
|
||||
with ADO_1 do
|
||||
begin
|
||||
Close;
|
||||
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('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);
|
||||
InitGrid1();
|
||||
InitGrid2();
|
||||
InitGrid3();
|
||||
InitGrid4();
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmTradeMarketList_JD.InitGrid1();
|
||||
|
|
@ -225,5 +216,26 @@ begin
|
|||
SInitCDSData(ADO_4, CDS_4);
|
||||
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.
|
||||
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ inherited frmTradeMarketList_JDT: TfrmTradeMarketList_JDT
|
|||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.CellHints = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.IndicatorWidth = 30
|
||||
|
|
@ -159,8 +160,6 @@ inherited frmTradeMarketList_JDT: TfrmTradeMarketList_JDT
|
|||
Height = 202
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
ExplicitTop = 401
|
||||
ExplicitHeight = 232
|
||||
object Tv2: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
ScrollbarAnnotations.CustomAnnotations = <>
|
||||
|
|
@ -178,6 +177,7 @@ inherited frmTradeMarketList_JDT: TfrmTradeMarketList_JDT
|
|||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.CellHints = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.IndicatorWidth = 30
|
||||
|
|
@ -340,6 +340,7 @@ inherited frmTradeMarketList_JDT: TfrmTradeMarketList_JDT
|
|||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.CellHints = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.IndicatorWidth = 30
|
||||
|
|
@ -406,8 +407,6 @@ inherited frmTradeMarketList_JDT: TfrmTradeMarketList_JDT
|
|||
Height = 208
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
ExplicitTop = 395
|
||||
ExplicitHeight = 238
|
||||
object Tv4: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
ScrollbarAnnotations.CustomAnnotations = <>
|
||||
|
|
@ -425,6 +424,7 @@ inherited frmTradeMarketList_JDT: TfrmTradeMarketList_JDT
|
|||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.CellHints = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.IndicatorWidth = 30
|
||||
|
|
@ -450,6 +450,7 @@ inherited frmTradeMarketList_JDT: TfrmTradeMarketList_JDT
|
|||
DataBinding.IsNullValueType = True
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object Tv4Column4: TcxGridDBColumn
|
||||
|
|
@ -501,9 +502,9 @@ inherited frmTradeMarketList_JDT: TfrmTradeMarketList_JDT
|
|||
object Label4: TLabel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 38
|
||||
Width = 57
|
||||
Height = 30
|
||||
Caption = #26032#20313
|
||||
Caption = #26410#22238#21333
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -19
|
||||
|
|
@ -678,4 +679,9 @@ inherited frmTradeMarketList_JDT: TfrmTradeMarketList_JDT
|
|||
Left = 860
|
||||
Top = 464
|
||||
end
|
||||
object Timer1: TTimer
|
||||
OnTimer = Timer1Timer
|
||||
Left = 832
|
||||
Top = 200
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -98,8 +98,10 @@ type
|
|||
Label4: TLabel;
|
||||
ToolBar4: TToolBar;
|
||||
Label5: TLabel;
|
||||
Timer1: TTimer;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure Timer1Timer(Sender: TObject);
|
||||
private
|
||||
DQdate: TDateTime;
|
||||
procedure InitGrid();
|
||||
|
|
@ -147,22 +149,10 @@ end;
|
|||
|
||||
procedure TfrmTradeMarketList_JDT.InitGrid();
|
||||
begin
|
||||
with ADO_1 do
|
||||
begin
|
||||
Close;
|
||||
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('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);
|
||||
InitGrid1();
|
||||
InitGrid2();
|
||||
InitGrid3();
|
||||
InitGrid4();
|
||||
end;
|
||||
|
||||
procedure TfrmTradeMarketList_JDT.InitGrid1();
|
||||
|
|
@ -217,13 +207,32 @@ begin
|
|||
Close;
|
||||
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('where 1=1');
|
||||
sql.add('and AddressArea=''ÐÂÓà'' ');
|
||||
sql.add('where 1=1 and isnull(Status,0)=''9'' ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADO_4, CDS_4);
|
||||
SInitCDSData(ADO_4, CDS_4);
|
||||
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.
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ inherited frmTradeSampleList: TfrmTradeSampleList
|
|||
FormStyle = fsMDIChild
|
||||
Position = poScreenCenter
|
||||
Visible = True
|
||||
ExplicitLeft = -793
|
||||
ExplicitLeft = -454
|
||||
ExplicitWidth = 1940
|
||||
ExplicitHeight = 633
|
||||
PixelsPerInch = 96
|
||||
|
|
@ -276,11 +276,14 @@ inherited frmTradeSampleList: TfrmTradeSampleList
|
|||
Align = alClient
|
||||
PopupMenu = PM_1
|
||||
TabOrder = 3
|
||||
ExplicitLeft = -8
|
||||
ExplicitTop = 158
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnDblClick = Tv1DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
ScrollbarAnnotations.CustomAnnotations = <>
|
||||
OnCellDblClick = Tv1CellDblClick
|
||||
OnCustomDrawCell = Tv1CustomDrawCell
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Filter.AutoDataSetFilter = True
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
|
|
@ -518,6 +521,12 @@ inherited frmTradeSampleList: TfrmTradeSampleList
|
|||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object Tv1Column26: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'PrintStatus'
|
||||
DataBinding.IsNullValueType = True
|
||||
Visible = False
|
||||
Width = 60
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ type
|
|||
TBZF: TToolButton;
|
||||
TBNOZF: TToolButton;
|
||||
Tv1Column25: TcxGridDBColumn;
|
||||
Tv1Column26: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
|
|
@ -145,6 +146,7 @@ type
|
|||
procedure TBZFClick(Sender: TObject);
|
||||
procedure TBNOZFClick(Sender: TObject);
|
||||
procedure Tv1DblClick(Sender: TObject);
|
||||
procedure Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
private
|
||||
DQdate: TDateTime;
|
||||
procedure InitGrid();
|
||||
|
|
@ -516,11 +518,11 @@ begin
|
|||
begin
|
||||
if WSql <> '' then
|
||||
begin
|
||||
WSql := WSql + ',' + Trim(Order_Main.fieldbyname('TMSId').AsString);
|
||||
WSql := WSql + ',' + Trim(Order_Main.fieldbyname('TMMId').AsString);
|
||||
end
|
||||
else
|
||||
begin
|
||||
WSql := Trim(Order_Main.fieldbyname('TMSId').AsString);
|
||||
WSql := Trim(Order_Main.fieldbyname('TMMId').AsString);
|
||||
end;
|
||||
end;
|
||||
Next;
|
||||
|
|
@ -537,6 +539,14 @@ begin
|
|||
if ShowModal = 1 then
|
||||
begin
|
||||
// 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;
|
||||
finally
|
||||
|
|
@ -738,6 +748,12 @@ begin
|
|||
Clipboard.SetTextBuf(PChar(Trim(Order_Main.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString)));
|
||||
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);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user