From da0eb3032c7635c7516de3cae3740009549551bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9Cddf=E2=80=9D?= <“ddf668490@163.com”>
Date: Thu, 13 Feb 2025 15:43:36 +0800
Subject: [PATCH] 1
---
A00通用窗体/U_ClothInfoSel.pas | 14 ++---
A09财务通用管理/U_ReceivableInput.pas | 2 +-
T02贸易汇总仓库/TradeTotalClothStk.dpr | 3 +-
T02贸易汇总仓库/TradeTotalClothStk.dproj | 1 +
T02贸易汇总仓库/U_ClothScheduleList.dfm | 13 -----
T02贸易汇总仓库/U_TradeClothTotalInInput1.pas | 34 +++++++++++-
T02贸易汇总仓库/U_TradeClothTotalInList.dfm | 54 +++++++++++++++++--
T02贸易汇总仓库/U_TradeClothTotalInList.pas | 50 ++++++-----------
8 files changed, 108 insertions(+), 63 deletions(-)
diff --git a/A00通用窗体/U_ClothInfoSel.pas b/A00通用窗体/U_ClothInfoSel.pas
index bc386be..248a7dd 100644
--- a/A00通用窗体/U_ClothInfoSel.pas
+++ b/A00通用窗体/U_ClothInfoSel.pas
@@ -151,9 +151,7 @@ type
procedure cxDBTreeList1DblClick(Sender: TObject);
procedure cxtxtdtscanKeyPress(Sender: TObject; var Key: Char);
procedure GC_NameKeyPress(Sender: TObject; var Key: Char);
- procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView;
- APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord;
- ANewItemRecordFocusingChanged: Boolean);
+ procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
private
IsOnShow: Boolean;
CurrentPage, RecordsNumber: Integer;
@@ -364,7 +362,7 @@ begin
ReadCxGrid(trim(self.Caption) + 'TV2', TV2, 'Զ');
ReadCxGrid(trim(self.Caption) + 'TV3', TV3, 'Զ');
InitTree();
- InitGrid('');
+// InitGrid('');
end;
@@ -413,10 +411,7 @@ begin
ModalResult := 1;
end;
-procedure TfrmClothInfoSel.Tv1FocusedRecordChanged(
- Sender: TcxCustomGridTableView; APrevFocusedRecord,
- AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
-
+procedure TfrmClothInfoSel.Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
var
SqlStr: string;
begin
@@ -426,8 +421,7 @@ begin
SqlStr := 'select * from BS_Cloth_Info_Sub A where BCIID =' + quotedstr((CDS_1.fieldbyname('BCIID').AsString));
- InitCDSData(ADO_3,CDS_3, Tv3, SqlStr, '', '');
-
+ InitCDSData(ADO_3, CDS_3, Tv3, SqlStr, '', '');
end;
diff --git a/A09财务通用管理/U_ReceivableInput.pas b/A09财务通用管理/U_ReceivableInput.pas
index 6f60d91..c433587 100644
--- a/A09财务通用管理/U_ReceivableInput.pas
+++ b/A09财务通用管理/U_ReceivableInput.pas
@@ -127,7 +127,7 @@ begin
MDeduction := Strtofloatdef(Deduction.Text, 0);
MAmount := Strtofloatdef(Amount.Text, 0);
- if MQty * MPrice >= 0 then
+ if MQty * MPrice <> 0 then
begin
MAmount := RoundFloat((MQty * MPrice + MOtherFee + MOtherFee1 - MDeduction), 2);
end;
diff --git a/T02贸易汇总仓库/TradeTotalClothStk.dpr b/T02贸易汇总仓库/TradeTotalClothStk.dpr
index 6fe5ee7..d91939e 100644
--- a/T02贸易汇总仓库/TradeTotalClothStk.dpr
+++ b/T02贸易汇总仓库/TradeTotalClothStk.dpr
@@ -74,7 +74,8 @@ uses
U_TradeClothSplit in 'U_TradeClothSplit.pas' {frmTradeClothSplit},
uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas',
U_TradeRRList in 'U_TradeRRList.pas' {frmTradeRRList},
- U_TradeRRInPut in 'U_TradeRRInPut.pas' {frmTradeRRInPut};
+ U_TradeRRInPut in 'U_TradeRRInPut.pas' {frmTradeRRInPut},
+ U_RPFun in '..\..\..\public10\ThreeFun\Fun\U_RPFun.pas';
{$R *.res}
diff --git a/T02贸易汇总仓库/TradeTotalClothStk.dproj b/T02贸易汇总仓库/TradeTotalClothStk.dproj
index 309b030..939dcf2 100644
--- a/T02贸易汇总仓库/TradeTotalClothStk.dproj
+++ b/T02贸易汇总仓库/TradeTotalClothStk.dproj
@@ -362,6 +362,7 @@
dfm
+
Cfg_2
Base
diff --git a/T02贸易汇总仓库/U_ClothScheduleList.dfm b/T02贸易汇总仓库/U_ClothScheduleList.dfm
index 4dd995b..18e541c 100644
--- a/T02贸易汇总仓库/U_ClothScheduleList.dfm
+++ b/T02贸易汇总仓库/U_ClothScheduleList.dfm
@@ -531,9 +531,6 @@ inherited frmClothScheduleList: TfrmClothScheduleList
object cxTabSheet2: TcxTabSheet
Caption = ' '#37197#24067#25968#25454' '
ImageIndex = 1
- ExplicitTop = 0
- ExplicitWidth = 0
- ExplicitHeight = 0
object cxGrid2: TcxGrid
Left = 0
Top = 0
@@ -894,9 +891,6 @@ inherited frmClothScheduleList: TfrmClothScheduleList
object cxTabSheet1: TcxTabSheet
Caption = ' '#23436#24037#21450#25220#30721#25968#25454' '
ImageIndex = 2
- ExplicitTop = 0
- ExplicitWidth = 0
- ExplicitHeight = 0
object cxGrid4: TcxGrid
Left = 0
Top = 0
@@ -904,7 +898,6 @@ inherited frmClothScheduleList: TfrmClothScheduleList
Height = 207
Align = alClient
TabOrder = 0
- ExplicitLeft = 2
object TV4: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
@@ -1113,9 +1106,6 @@ inherited frmClothScheduleList: TfrmClothScheduleList
object cxTabSheet4: TcxTabSheet
Caption = #38754#26009#20986#24211
ImageIndex = 3
- ExplicitTop = 0
- ExplicitWidth = 0
- ExplicitHeight = 0
object cxGrid5: TcxGrid
Left = 0
Top = 0
@@ -1310,9 +1300,6 @@ inherited frmClothScheduleList: TfrmClothScheduleList
object cxTabSheet5: TcxTabSheet
Caption = #29983#20135#22791#27880
ImageIndex = 4
- ExplicitTop = 0
- ExplicitWidth = 0
- ExplicitHeight = 0
object cxGrid6: TcxGrid
Tag = 2
Left = 0
diff --git a/T02贸易汇总仓库/U_TradeClothTotalInInput1.pas b/T02贸易汇总仓库/U_TradeClothTotalInInput1.pas
index 6090f64..7ea0dc2 100644
--- a/T02贸易汇总仓库/U_TradeClothTotalInInput1.pas
+++ b/T02贸易汇总仓库/U_TradeClothTotalInInput1.pas
@@ -556,6 +556,7 @@ begin
FieldByName('STKName').Value := FSTKName;
FieldByName('IOFlag').Value := '';
FieldByName('IOQtyFlag').Value := 1;
+ FieldByName('Qty').Value := CDS_Sub.FieldByName('Qty').Value;
Post;
end;
with ADOQueryCmd do
@@ -812,6 +813,33 @@ begin
else
BCIONO.Text := Maxno;
+ with CDS_Sub do
+ begin
+ DisableControls;
+ First;
+ while not Eof do
+ begin
+
+ Edit;
+ if QtyUnit.Text = 'M' then
+ begin
+ FieldByName('Qty').Value := FieldByName('Meter').Value;
+ end
+ else if QtyUnit.Text = 'Y' then
+ begin
+ FieldByName('Qty').Value := FieldByName('Yardage').Value;
+ end
+ else
+ begin
+ FieldByName('Qty').Value := FieldByName('NetWeight').Value;
+ end;
+
+ Post;
+ Next;
+ end;
+ EnableControls;
+ end;
+
if trim(IOType.text) = '' then
begin
Application.MessageBox('ͲΪ!', 'ʾ', 0);
@@ -827,7 +855,11 @@ begin
Application.MessageBox('Ϊ!', 'ʾ', 0);
Exit;
end;
-
+ if CDS_Sub.Locate('Qty', 0, []) = True then
+ begin
+ Application.MessageBox('Ϊ0!', 'ʾ', 0);
+ Exit;
+ end;
if SaveCKData() then
begin
Application.MessageBox('ɹ!', 'ʾ', 0);
diff --git a/T02贸易汇总仓库/U_TradeClothTotalInList.dfm b/T02贸易汇总仓库/U_TradeClothTotalInList.dfm
index 6917bd2..a83ad36 100644
--- a/T02贸易汇总仓库/U_TradeClothTotalInList.dfm
+++ b/T02贸易汇总仓库/U_TradeClothTotalInList.dfm
@@ -122,7 +122,7 @@ inherited frmTradeClothTotalInList: TfrmTradeClothTotalInList
Left = 0
Top = 30
Width = 1968
- Height = 115
+ Height = 119
Align = alTop
BevelInner = bvRaised
BevelOuter = bvLowered
@@ -358,9 +358,9 @@ inherited frmTradeClothTotalInList: TfrmTradeClothTotalInList
end
object cxGrid1: TcxGrid [2]
Left = 0
- Top = 145
+ Top = 149
Width = 1968
- Height = 409
+ Height = 405
Align = alClient
PopupMenu = PopupMenu1
TabOrder = 2
@@ -396,6 +396,22 @@ inherited frmTradeClothTotalInList: TfrmTradeClothTotalInList
end
item
Kind = skSum
+ end
+ item
+ Kind = skSum
+ Column = Tv1Column28
+ end
+ item
+ Kind = skSum
+ Column = Tv1Column31
+ end
+ item
+ Kind = skSum
+ Column = Tv1Column38
+ end
+ item
+ Kind = skSum
+ Column = Tv1Column39
end>
DataController.Summary.SummaryGroups = <>
OptionsCustomize.ColumnFiltering = False
@@ -851,6 +867,38 @@ inherited frmTradeClothTotalInList: TfrmTradeClothTotalInList
Options.Editing = False
Width = 55
end
+ object Tv1Column28: TcxGridDBColumn
+ Caption = #27611#37325
+ DataBinding.FieldName = 'GrossWeight'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 66
+ end
+ object Tv1Column31: TcxGridDBColumn
+ Caption = #20928#37325
+ DataBinding.FieldName = 'NetWeight'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 66
+ end
+ object Tv1Column38: TcxGridDBColumn
+ Caption = #31859#25968
+ DataBinding.FieldName = 'Meter'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 66
+ end
+ object Tv1Column39: TcxGridDBColumn
+ Caption = #30721#25968
+ DataBinding.FieldName = 'Yardage'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 66
+ end
end
object cxGrid1Level1: TcxGridLevel
GridView = Tv1
diff --git a/T02贸易汇总仓库/U_TradeClothTotalInList.pas b/T02贸易汇总仓库/U_TradeClothTotalInList.pas
index c6739c1..4dab3ec 100644
--- a/T02贸易汇总仓库/U_TradeClothTotalInList.pas
+++ b/T02贸易汇总仓库/U_TradeClothTotalInList.pas
@@ -117,6 +117,10 @@ type
Label11: TLabel;
BCIOID: TcxTextEdit;
btn1: TToolButton;
+ Tv1Column28: TcxGridDBColumn;
+ Tv1Column31: TcxGridDBColumn;
+ Tv1Column38: TcxGridDBColumn;
+ Tv1Column39: TcxGridDBColumn;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure TBRafreshClick(Sender: TObject);
@@ -159,7 +163,7 @@ type
implementation
uses
- U_DataLink, U_RTFun, U_LabelPrint, U_AttachmentUpload,
+ U_DataLink, U_RTFun, U_RPFun, U_LabelPrint, U_AttachmentUpload,
U_TradeClothTotalInInput1, U_TradeClothTotalInInput;
{$R *.dfm}
@@ -225,7 +229,8 @@ end;
procedure TfrmTradeClothTotalInList.ToolButton2Click(Sender: TObject);
var
- MBCIOID: string;
+ MFiltration: string;
+ MPrintJson: string;
begin
if CDS_1.IsEmpty then
Exit;
@@ -234,38 +239,15 @@ begin
Application.MessageBox('ûѡ!', 'ʾ', 0);
Exit;
end;
-
- MBCIOID := '';
- CDS_1.DisableControls;
- with CDS_1 do
- begin
- First;
- while CDS_1.Locate('SSel', True, []) do
- begin
-
- MBCIOID := MBCIOID + ',' + QuotedStr(Trim(CDS_1.fieldbyname('BCIOID').AsString));
-
- Edit;
- FieldByName('SSel').Value := False;
- Post;
- end;
- end;
- CDS_1.EnableControls;
-
- try
- frmLabelPrint := TfrmLabelPrint.Create(Application);
- with frmLabelPrint do
- begin
- FLMType := 'TradeFinishClothInPrt1';
- FFiltration1 := MBCIOID;
- if ShowModal = 1 then
- begin
-// Self.InitGrid();
- end;
- end;
- finally
- frmLabelPrint.Free;
- end;
+ MFiltration := SelCDSKey(CDS_1, ['BCIOID'])[0];
+ MPrintJson := ' {"LMType": "TradeFinishClothInPrt1" ';
+ MPrintJson := MPrintJson + ' ,"PreviewPrint": true ';
+ MPrintJson := MPrintJson + ' ,"PrtArgs": [ { "IsSql": false, "Filtration":" ' + MFiltration + '" }, ';
+ 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));
end;
procedure TfrmTradeClothTotalInList.ToolButton3Click(Sender: TObject);