This commit is contained in:
“ddf” 2025-02-13 15:43:36 +08:00
parent dfc94d2067
commit da0eb3032c
8 changed files with 108 additions and 63 deletions

View File

@ -151,9 +151,7 @@ type
procedure cxDBTreeList1DblClick(Sender: TObject); procedure cxDBTreeList1DblClick(Sender: TObject);
procedure cxtxtdtscanKeyPress(Sender: TObject; var Key: Char); procedure cxtxtdtscanKeyPress(Sender: TObject; var Key: Char);
procedure GC_NameKeyPress(Sender: TObject; var Key: Char); procedure GC_NameKeyPress(Sender: TObject; var Key: Char);
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord;
ANewItemRecordFocusingChanged: Boolean);
private private
IsOnShow: Boolean; IsOnShow: Boolean;
CurrentPage, RecordsNumber: Integer; CurrentPage, RecordsNumber: Integer;
@ -364,7 +362,7 @@ begin
ReadCxGrid(trim(self.Caption) + 'TV2', TV2, '×Ô¶¨ÒåÊý¾Ý'); ReadCxGrid(trim(self.Caption) + 'TV2', TV2, '×Ô¶¨ÒåÊý¾Ý');
ReadCxGrid(trim(self.Caption) + 'TV3', TV3, '×Ô¶¨ÒåÊý¾Ý'); ReadCxGrid(trim(self.Caption) + 'TV3', TV3, '×Ô¶¨ÒåÊý¾Ý');
InitTree(); InitTree();
InitGrid(''); // InitGrid('');
end; end;
@ -413,10 +411,7 @@ begin
ModalResult := 1; ModalResult := 1;
end; end;
procedure TfrmClothInfoSel.Tv1FocusedRecordChanged( procedure TfrmClothInfoSel.Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
Sender: TcxCustomGridTableView; APrevFocusedRecord,
AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
var var
SqlStr: string; SqlStr: string;
begin begin
@ -426,8 +421,7 @@ begin
SqlStr := 'select * from BS_Cloth_Info_Sub A where BCIID =' + quotedstr((CDS_1.fieldbyname('BCIID').AsString)); 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; end;

View File

@ -127,7 +127,7 @@ begin
MDeduction := Strtofloatdef(Deduction.Text, 0); MDeduction := Strtofloatdef(Deduction.Text, 0);
MAmount := Strtofloatdef(Amount.Text, 0); MAmount := Strtofloatdef(Amount.Text, 0);
if MQty * MPrice >= 0 then if MQty * MPrice <> 0 then
begin begin
MAmount := RoundFloat((MQty * MPrice + MOtherFee + MOtherFee1 - MDeduction), 2); MAmount := RoundFloat((MQty * MPrice + MOtherFee + MOtherFee1 - MDeduction), 2);
end; end;

View File

@ -74,7 +74,8 @@ uses
U_TradeClothSplit in 'U_TradeClothSplit.pas' {frmTradeClothSplit}, U_TradeClothSplit in 'U_TradeClothSplit.pas' {frmTradeClothSplit},
uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas', uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas',
U_TradeRRList in 'U_TradeRRList.pas' {frmTradeRRList}, 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} {$R *.res}

View File

@ -362,6 +362,7 @@
<Form>frmTradeRRInPut</Form> <Form>frmTradeRRInPut</Form>
<FormType>dfm</FormType> <FormType>dfm</FormType>
</DCCReference> </DCCReference>
<DCCReference Include="..\..\..\public10\ThreeFun\Fun\U_RPFun.pas"/>
<BuildConfiguration Include="Debug"> <BuildConfiguration Include="Debug">
<Key>Cfg_2</Key> <Key>Cfg_2</Key>
<CfgParent>Base</CfgParent> <CfgParent>Base</CfgParent>

View File

@ -531,9 +531,6 @@ inherited frmClothScheduleList: TfrmClothScheduleList
object cxTabSheet2: TcxTabSheet object cxTabSheet2: TcxTabSheet
Caption = ' '#37197#24067#25968#25454' ' Caption = ' '#37197#24067#25968#25454' '
ImageIndex = 1 ImageIndex = 1
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
object cxGrid2: TcxGrid object cxGrid2: TcxGrid
Left = 0 Left = 0
Top = 0 Top = 0
@ -894,9 +891,6 @@ inherited frmClothScheduleList: TfrmClothScheduleList
object cxTabSheet1: TcxTabSheet object cxTabSheet1: TcxTabSheet
Caption = ' '#23436#24037#21450#25220#30721#25968#25454' ' Caption = ' '#23436#24037#21450#25220#30721#25968#25454' '
ImageIndex = 2 ImageIndex = 2
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
object cxGrid4: TcxGrid object cxGrid4: TcxGrid
Left = 0 Left = 0
Top = 0 Top = 0
@ -904,7 +898,6 @@ inherited frmClothScheduleList: TfrmClothScheduleList
Height = 207 Height = 207
Align = alClient Align = alClient
TabOrder = 0 TabOrder = 0
ExplicitLeft = 2
object TV4: TcxGridDBTableView object TV4: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <> Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <> ScrollbarAnnotations.CustomAnnotations = <>
@ -1113,9 +1106,6 @@ inherited frmClothScheduleList: TfrmClothScheduleList
object cxTabSheet4: TcxTabSheet object cxTabSheet4: TcxTabSheet
Caption = #38754#26009#20986#24211 Caption = #38754#26009#20986#24211
ImageIndex = 3 ImageIndex = 3
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
object cxGrid5: TcxGrid object cxGrid5: TcxGrid
Left = 0 Left = 0
Top = 0 Top = 0
@ -1310,9 +1300,6 @@ inherited frmClothScheduleList: TfrmClothScheduleList
object cxTabSheet5: TcxTabSheet object cxTabSheet5: TcxTabSheet
Caption = #29983#20135#22791#27880 Caption = #29983#20135#22791#27880
ImageIndex = 4 ImageIndex = 4
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
object cxGrid6: TcxGrid object cxGrid6: TcxGrid
Tag = 2 Tag = 2
Left = 0 Left = 0

View File

@ -556,6 +556,7 @@ begin
FieldByName('STKName').Value := FSTKName; FieldByName('STKName').Value := FSTKName;
FieldByName('IOFlag').Value := '入库'; FieldByName('IOFlag').Value := '入库';
FieldByName('IOQtyFlag').Value := 1; FieldByName('IOQtyFlag').Value := 1;
FieldByName('Qty').Value := CDS_Sub.FieldByName('Qty').Value;
Post; Post;
end; end;
with ADOQueryCmd do with ADOQueryCmd do
@ -812,6 +813,33 @@ begin
else else
BCIONO.Text := Maxno; 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 if trim(IOType.text) = '' then
begin begin
Application.MessageBox('入库类型不能为空!', '提示', 0); Application.MessageBox('入库类型不能为空!', '提示', 0);
@ -827,7 +855,11 @@ begin
Application.MessageBox('数量不能为空!', '提示', 0); Application.MessageBox('数量不能为空!', '提示', 0);
Exit; Exit;
end; end;
if CDS_Sub.Locate('Qty', 0, []) = True then
begin
Application.MessageBox('ÊýÁ¿²»ÄÜΪ0!', 'Ìáʾ', 0);
Exit;
end;
if SaveCKData() then if SaveCKData() then
begin begin
Application.MessageBox('保存成功!', '提示', 0); Application.MessageBox('保存成功!', '提示', 0);

View File

@ -122,7 +122,7 @@ inherited frmTradeClothTotalInList: TfrmTradeClothTotalInList
Left = 0 Left = 0
Top = 30 Top = 30
Width = 1968 Width = 1968
Height = 115 Height = 119
Align = alTop Align = alTop
BevelInner = bvRaised BevelInner = bvRaised
BevelOuter = bvLowered BevelOuter = bvLowered
@ -358,9 +358,9 @@ inherited frmTradeClothTotalInList: TfrmTradeClothTotalInList
end end
object cxGrid1: TcxGrid [2] object cxGrid1: TcxGrid [2]
Left = 0 Left = 0
Top = 145 Top = 149
Width = 1968 Width = 1968
Height = 409 Height = 405
Align = alClient Align = alClient
PopupMenu = PopupMenu1 PopupMenu = PopupMenu1
TabOrder = 2 TabOrder = 2
@ -396,6 +396,22 @@ inherited frmTradeClothTotalInList: TfrmTradeClothTotalInList
end end
item item
Kind = skSum 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> end>
DataController.Summary.SummaryGroups = <> DataController.Summary.SummaryGroups = <>
OptionsCustomize.ColumnFiltering = False OptionsCustomize.ColumnFiltering = False
@ -851,6 +867,38 @@ inherited frmTradeClothTotalInList: TfrmTradeClothTotalInList
Options.Editing = False Options.Editing = False
Width = 55 Width = 55
end 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 end
object cxGrid1Level1: TcxGridLevel object cxGrid1Level1: TcxGridLevel
GridView = Tv1 GridView = Tv1

View File

@ -117,6 +117,10 @@ type
Label11: TLabel; Label11: TLabel;
BCIOID: TcxTextEdit; BCIOID: TcxTextEdit;
btn1: TToolButton; btn1: TToolButton;
Tv1Column28: TcxGridDBColumn;
Tv1Column31: TcxGridDBColumn;
Tv1Column38: TcxGridDBColumn;
Tv1Column39: TcxGridDBColumn;
procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
procedure TBRafreshClick(Sender: TObject); procedure TBRafreshClick(Sender: TObject);
@ -159,7 +163,7 @@ type
implementation implementation
uses uses
U_DataLink, U_RTFun, U_LabelPrint, U_AttachmentUpload, U_DataLink, U_RTFun, U_RPFun, U_LabelPrint, U_AttachmentUpload,
U_TradeClothTotalInInput1, U_TradeClothTotalInInput; U_TradeClothTotalInInput1, U_TradeClothTotalInInput;
{$R *.dfm} {$R *.dfm}
@ -225,7 +229,8 @@ end;
procedure TfrmTradeClothTotalInList.ToolButton2Click(Sender: TObject); procedure TfrmTradeClothTotalInList.ToolButton2Click(Sender: TObject);
var var
MBCIOID: string; MFiltration: string;
MPrintJson: string;
begin begin
if CDS_1.IsEmpty then if CDS_1.IsEmpty then
Exit; Exit;
@ -234,38 +239,15 @@ begin
Application.MessageBox('ûÓÐÑ¡ÔñÊý¾Ý!', 'Ìáʾ', 0); Application.MessageBox('ûÓÐÑ¡ÔñÊý¾Ý!', 'Ìáʾ', 0);
Exit; Exit;
end; end;
MFiltration := SelCDSKey(CDS_1, ['BCIOID'])[0];
MBCIOID := ''; MPrintJson := ' {"LMType": "TradeFinishClothInPrt1" ';
CDS_1.DisableControls; MPrintJson := MPrintJson + ' ,"PreviewPrint": true ';
with CDS_1 do MPrintJson := MPrintJson + ' ,"PrtArgs": [ { "IsSql": false, "Filtration":" ' + MFiltration + '" }, ';
begin MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" }, ';
First; MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" }, ';
while CDS_1.Locate('SSel', True, []) do MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" }, ';
begin MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" } ] } ';
FromPrintFr3(Application, PChar(DConString), PChar(MPrintJson));
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;
end; end;
procedure TfrmTradeClothTotalInList.ToolButton3Click(Sender: TObject); procedure TfrmTradeClothTotalInList.ToolButton3Click(Sender: TObject);