产品 坯布仓库

This commit is contained in:
funa 2026-10-27 17:27:33 +08:00
parent fcee01d7fa
commit 2a8919f3aa
11 changed files with 112 additions and 36 deletions

View File

@ -681,7 +681,6 @@ object frmCraftInfoInput: TfrmCraftInfoInput
DataBinding.FieldName = 'Y_Ratio'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
Properties.OnEditValueChanged = TV1YRatioPropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
Width = 116
end
@ -689,6 +688,8 @@ object frmCraftInfoInput: TfrmCraftInfoInput
Caption = #29992#37327
DataBinding.FieldName = 'Y_Qty'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
Properties.OnEditValueChanged = TV1YQtyPropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
Width = 66
end
@ -918,7 +919,6 @@ object frmCraftInfoInput: TfrmCraftInfoInput
DataBinding.FieldName = 'Y_Ratio'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
Properties.OnEditValueChanged = Tv2YRatioPropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
Styles.Header = DataLink_ClothInfo.Default
Width = 116
@ -935,6 +935,8 @@ object frmCraftInfoInput: TfrmCraftInfoInput
Caption = #29992#37327
DataBinding.FieldName = 'Y_Qty'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
Properties.OnEditValueChanged = Tv2YQtyPropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
Width = 75
end

View File

@ -231,8 +231,8 @@ type
procedure ToolButton5Click(Sender: TObject);
procedure ToolButton8Click(Sender: TObject);
procedure ToolButton9Click(Sender: TObject);
procedure TV1YRatioPropertiesEditValueChanged(Sender: TObject);
procedure Tv2YRatioPropertiesEditValueChanged(Sender: TObject);
procedure TV1YQtyPropertiesEditValueChanged(Sender: TObject);
procedure Tv2YQtyPropertiesEditValueChanged(Sender: TObject);
private
{ Private declarations }
procedure InitGrid();
@ -240,7 +240,7 @@ type
function SaveData(): Boolean;
procedure CALCYarnQty();
procedure CalcGramWeight();
procedure SyncYRatioFromEditor(ACDS: TClientDataSet; Sender: TObject);
procedure SyncYQtyFromEditor(ACDS: TClientDataSet; Sender: TObject);
public
FCRID: string;
{ Public declarations }
@ -292,24 +292,24 @@ begin
end;
procedure TfrmCraftInfoInput.SyncYRatioFromEditor(ACDS: TClientDataSet; Sender: TObject);
procedure TfrmCraftInfoInput.SyncYQtyFromEditor(ACDS: TClientDataSet; Sender: TObject);
var
MValue: Double;
begin
MValue := StrToFloatDef(Trim(TcxTextEdit(Sender).EditingText), -1);
if MValue < 0 then
Exit;
if ACDS.FieldByName('Y_Ratio').AsFloat <> MValue then
if ACDS.FieldByName('Y_Qty').AsFloat <> MValue then
begin
ACDS.Edit;
ACDS.FieldByName('Y_Ratio').AsFloat := MValue;
ACDS.FieldByName('Y_Qty').AsFloat := MValue;
ACDS.Post;
end;
end;
procedure TfrmCraftInfoInput.CalcGramWeight();
function SumViewRatio(AView: TcxGridDBTableView; ARatioColumn: TcxGridDBColumn): Double;
function SumViewColumn(AView: TcxGridDBTableView; AColumn: TcxGridDBColumn): Double;
var
i: Integer;
v: Variant;
@ -317,7 +317,7 @@ procedure TfrmCraftInfoInput.CalcGramWeight();
Result := 0;
for i := 0 to AView.DataController.RecordCount - 1 do
begin
v := AView.DataController.Values[i, ARatioColumn.Index];
v := AView.DataController.Values[i, AColumn.Index];
if not VarIsNull(v) then
Result := Result + v;
end;
@ -325,18 +325,18 @@ procedure TfrmCraftInfoInput.CalcGramWeight();
begin
C_GramWeight.Text := FormatFloat('0.######',
(SumViewRatio(TV1, cxGridDBColumn7) + SumViewRatio(Tv2, v2Column5)) / 1000);
(SumViewColumn(TV1, TV1Column1) + SumViewColumn(Tv2, Tv2Column1)) / 1000);
end;
procedure TfrmCraftInfoInput.TV1YRatioPropertiesEditValueChanged(Sender: TObject);
procedure TfrmCraftInfoInput.TV1YQtyPropertiesEditValueChanged(Sender: TObject);
begin
SyncYRatioFromEditor(CDS_1, Sender);
SyncYQtyFromEditor(CDS_1, Sender);
CalcGramWeight();
end;
procedure TfrmCraftInfoInput.Tv2YRatioPropertiesEditValueChanged(Sender: TObject);
procedure TfrmCraftInfoInput.Tv2YQtyPropertiesEditValueChanged(Sender: TObject);
begin
SyncYRatioFromEditor(CDS_2, Sender);
SyncYQtyFromEditor(CDS_2, Sender);
CalcGramWeight();
end;
@ -704,6 +704,7 @@ procedure TfrmCraftInfoInput.ToolButton5Click(Sender: TObject);
begin
CR_Name.SetFocus;
CALCYarnQty();
CalcGramWeight();
end;
procedure TfrmCraftInfoInput.CYColorKeyPress(Sender: TObject; var Key: Char);
@ -739,6 +740,7 @@ procedure TfrmCraftInfoInput.ToolButton8Click(Sender: TObject);
begin
CR_Name.SetFocus;
CALCYarnQty();
CalcGramWeight();
end;
procedure TfrmCraftInfoInput.ToolButton9Click(Sender: TObject);

View File

@ -843,6 +843,10 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput
object cxTabSheet1: TcxTabSheet
Caption = ' '#32463#32428#32433#21407#26009' '
ImageIndex = 0
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
object Panel1: TPanel
Left = 0
Top = 0
@ -980,7 +984,6 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput
DataBinding.FieldName = 'Y_Ratio'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
Properties.OnEditValueChanged = TV1YRatioPropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
Width = 116
end
@ -988,6 +991,8 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput
Caption = #29992#37327
DataBinding.FieldName = 'Y_Qty'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
Properties.OnEditValueChanged = TV1YQtyPropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
Width = 66
end
@ -1217,7 +1222,6 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput
DataBinding.FieldName = 'Y_Ratio'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
Properties.OnEditValueChanged = Tv2YRatioPropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
Styles.Header = DataLink_ClothInfo.Default
Width = 116
@ -1234,6 +1238,8 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput
Caption = #29992#37327
DataBinding.FieldName = 'Y_Qty'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
Properties.OnEditValueChanged = Tv2YQtyPropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
Width = 75
end
@ -1334,6 +1340,10 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput
object cxTabSheet2: TcxTabSheet
Caption = ' '#32441#29256#22270' '
ImageIndex = 1
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
object Panel7: TPanel
Left = 0
Top = 0
@ -2391,6 +2401,10 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput
Caption = ' '#36215#32508#24037#33402#21333' '
ImageIndex = 2
TabVisible = False
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
object Panel8: TPanel
Left = 0
Top = 0
@ -2527,6 +2541,10 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput
Caption = #31359#31576#27861
ImageIndex = 3
TabVisible = False
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
object reed_weave_method: TMemo
Left = 0
Top = 0
@ -2546,6 +2564,10 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput
object cxTabSheet5: TcxTabSheet
Caption = #32463#32433#25490#21015
ImageIndex = 4
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
object warp_arrange: TMemo
Left = 0
Top = 0
@ -2565,6 +2587,10 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput
object cxTabSheet6: TcxTabSheet
Caption = #32428#25490#21015
ImageIndex = 5
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
object weft_arrange: TMemo
Left = 0
Top = 0
@ -2584,6 +2610,10 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput
object cxTabSheet7: TcxTabSheet
Caption = ' '#31359#32508#27861
ImageIndex = 6
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
object Splitter1: TSplitter
Left = 762
Top = 0

View File

@ -275,8 +275,8 @@ type
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
procedure Button1Click(Sender: TObject);
procedure ToolButton9Click(Sender: TObject);
procedure TV1YRatioPropertiesEditValueChanged(Sender: TObject);
procedure Tv2YRatioPropertiesEditValueChanged(Sender: TObject);
procedure TV1YQtyPropertiesEditValueChanged(Sender: TObject);
procedure Tv2YQtyPropertiesEditValueChanged(Sender: TObject);
private
canshu1: string;
Fint: Integer;
@ -287,7 +287,7 @@ type
function SaveData(): Boolean;
procedure CALCYarnQty();
procedure CalcGramWeight();
procedure SyncYRatioFromEditor(ACDS: TClientDataSet; Sender: TObject);
procedure SyncYQtyFromEditor(ACDS: TClientDataSet; Sender: TObject);
{ Private declarations }
public
FBCIID, FCTID: string;
@ -379,24 +379,24 @@ begin
end;
procedure TfrmTatClothInfoInput.SyncYRatioFromEditor(ACDS: TClientDataSet; Sender: TObject);
procedure TfrmTatClothInfoInput.SyncYQtyFromEditor(ACDS: TClientDataSet; Sender: TObject);
var
MValue: Double;
begin
MValue := StrToFloatDef(Trim(TcxTextEdit(Sender).EditingText), -1);
if MValue < 0 then
Exit;
if ACDS.FieldByName('Y_Ratio').AsFloat <> MValue then
if ACDS.FieldByName('Y_Qty').AsFloat <> MValue then
begin
ACDS.Edit;
ACDS.FieldByName('Y_Ratio').AsFloat := MValue;
ACDS.FieldByName('Y_Qty').AsFloat := MValue;
ACDS.Post;
end;
end;
procedure TfrmTatClothInfoInput.CalcGramWeight();
function SumViewRatio(AView: TcxGridDBTableView; ARatioColumn: TcxGridDBColumn): Double;
function SumViewColumn(AView: TcxGridDBTableView; AColumn: TcxGridDBColumn): Double;
var
i: Integer;
v: Variant;
@ -404,7 +404,7 @@ procedure TfrmTatClothInfoInput.CalcGramWeight();
Result := 0;
for i := 0 to AView.DataController.RecordCount - 1 do
begin
v := AView.DataController.Values[i, ARatioColumn.Index];
v := AView.DataController.Values[i, AColumn.Index];
if not VarIsNull(v) then
Result := Result + v;
end;
@ -412,18 +412,18 @@ procedure TfrmTatClothInfoInput.CalcGramWeight();
begin
C_GramWeight.Text := FormatFloat('0.######',
(SumViewRatio(TV1, cxGridDBColumn7) + SumViewRatio(Tv2, v2Column5)) / 1000);
(SumViewColumn(TV1, TV1Column1) + SumViewColumn(Tv2, Tv2Column1)) / 1000);
end;
procedure TfrmTatClothInfoInput.TV1YRatioPropertiesEditValueChanged(Sender: TObject);
procedure TfrmTatClothInfoInput.TV1YQtyPropertiesEditValueChanged(Sender: TObject);
begin
SyncYRatioFromEditor(CDS_1, Sender);
SyncYQtyFromEditor(CDS_1, Sender);
CalcGramWeight();
end;
procedure TfrmTatClothInfoInput.Tv2YRatioPropertiesEditValueChanged(Sender: TObject);
procedure TfrmTatClothInfoInput.Tv2YQtyPropertiesEditValueChanged(Sender: TObject);
begin
SyncYRatioFromEditor(CDS_2, Sender);
SyncYQtyFromEditor(CDS_2, Sender);
CalcGramWeight();
end;
@ -1090,6 +1090,7 @@ procedure TfrmTatClothInfoInput.ToolButton5Click(Sender: TObject);
begin
C_Name.SetFocus;
CALCYarnQty();
CalcGramWeight();
end;
procedure TfrmTatClothInfoInput.CYColorKeyPress(Sender: TObject; var Key: Char);
@ -1230,6 +1231,7 @@ procedure TfrmTatClothInfoInput.ToolButton8Click(Sender: TObject);
begin
C_Name.SetFocus;
CALCYarnQty();
CalcGramWeight();
end;
procedure TfrmTatClothInfoInput.ToolButton9Click(Sender: TObject);

View File

@ -165,6 +165,9 @@
<Form>frmTatClothInfoSel</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="..\A00通用窗体\U_SalesContractSel.pas">
<Form>frmSalesContractSel</Form>
</DCCReference>
<DCCReference Include="..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas"/>
<BuildConfiguration Include="Debug">
<Key>Cfg_2</Key>

View File

@ -181,9 +181,9 @@ inherited frmTatClothCKHZList: TfrmTatClothCKHZList
ParentFont = False
PopupMenu = PM_1
TabOrder = 2
ExplicitTop = 143
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
DataController.DataSource = DS_1
DataController.Filter.AutoDataSetFilter = True
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
@ -251,6 +251,7 @@ inherited frmTatClothCKHZList: TfrmTatClothCKHZList
object v1Column22: TcxGridDBColumn
Caption = #36873#25321
DataBinding.FieldName = 'SSel'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxCheckBoxProperties'
Properties.ImmediatePost = True
Properties.NullStyle = nssUnchecked
@ -261,6 +262,7 @@ inherited frmTatClothCKHZList: TfrmTatClothCKHZList
object Tv1Column3: TcxGridDBColumn
Caption = #21697#21517
DataBinding.FieldName = 'C_Name'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
@ -268,6 +270,7 @@ inherited frmTatClothCKHZList: TfrmTatClothCKHZList
object v1Column23: TcxGridDBColumn
Caption = #21367#25968
DataBinding.FieldName = 'js'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
@ -275,6 +278,7 @@ inherited frmTatClothCKHZList: TfrmTatClothCKHZList
object v1Column10: TcxGridDBColumn
Caption = #31859#25968
DataBinding.FieldName = 'stkMeter'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66

View File

@ -13,7 +13,7 @@ uses
RM_System, RM_GridReport, Menus, cxCalendar, MovePanel, Math, Clipbrd,
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxTextEdit, dxSkinsCore,
dxSkinsDefaultPainters, dxDateRanges, dxBarBuiltInMenu, U_BaseList, cxPC,
System.StrUtils;
System.StrUtils, dxSkinWXI, dxScrollbarAnnotations;
type
TfrmTatClothCKHZList = class(TfrmBaseList)

View File

@ -604,13 +604,21 @@ inherited frmTatClothOutList: TfrmTatClothOutList
Width = 76
end
object Tv1ContractBuyName: TcxGridDBColumn
Caption = #23458#25143
Caption = #21512#21516#23458#25143
DataBinding.FieldName = 'ContractBuyName'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 80
end
object Tv1DR_ToCoName: TcxGridDBColumn
Caption = #30003#35831#23458#25143
DataBinding.FieldName = 'DR_ToCoName'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 80
end
object v1Column1: TcxGridDBColumn
Caption = #35745#21010#21333#21495
DataBinding.FieldName = 'OrderNo'

View File

@ -112,6 +112,7 @@ type
Tv1ContractBuyName: TcxGridDBColumn;
Tv1in_latitude_batch_short: TcxGridDBColumn;
Tv1in_longitude_batch_short: TcxGridDBColumn;
Tv1DR_ToCoName: TcxGridDBColumn;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure TBRafreshClick(Sender: TObject);

View File

@ -181,6 +181,7 @@ inherited frmTatClothRKHZList: TfrmTatClothRKHZList
TabOrder = 2
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
DataController.DataSource = DS_1
DataController.Filter.AutoDataSetFilter = True
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
@ -248,6 +249,7 @@ inherited frmTatClothRKHZList: TfrmTatClothRKHZList
object v1Column22: TcxGridDBColumn
Caption = #36873#25321
DataBinding.FieldName = 'SSel'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxCheckBoxProperties'
Properties.ImmediatePost = True
Properties.NullStyle = nssUnchecked
@ -258,13 +260,23 @@ inherited frmTatClothRKHZList: TfrmTatClothRKHZList
object Tv1Column3: TcxGridDBColumn
Caption = #21697#21517
DataBinding.FieldName = 'C_Name'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object Tv1carno: TcxGridDBColumn
Caption = #26426#21488#21495
DataBinding.FieldName = 'carno'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 80
end
object v1Column23: TcxGridDBColumn
Caption = #21367#25968
DataBinding.FieldName = 'js'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
@ -272,6 +284,7 @@ inherited frmTatClothRKHZList: TfrmTatClothRKHZList
object v1Column10: TcxGridDBColumn
Caption = #31859#25968
DataBinding.FieldName = 'stkMeter'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
@ -279,9 +292,18 @@ inherited frmTatClothRKHZList: TfrmTatClothRKHZList
object Tv1Column1: TcxGridDBColumn
Caption = #30721#25968
DataBinding.FieldName = 'StkYardage'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 69
end
object Tv1StkNetWeight: TcxGridDBColumn
Caption = #37325#37327
DataBinding.FieldName = 'StkNetWeight'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 80
end
end
object cxGrid1Level1: TcxGridLevel
GridView = Tv1

View File

@ -13,7 +13,7 @@ uses
RM_System, RM_GridReport, Menus, cxCalendar, MovePanel, Math, Clipbrd,
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxTextEdit, dxSkinsCore,
dxSkinsDefaultPainters, dxDateRanges, dxBarBuiltInMenu, U_BaseList, cxPC,
System.StrUtils;
System.StrUtils, dxSkinWXI, dxScrollbarAnnotations;
type
TfrmTatClothRKHZList = class(TfrmBaseList)
@ -48,6 +48,8 @@ type
PM11: TMenuItem;
N1: TMenuItem;
Tv1Column1: TcxGridDBColumn;
Tv1carno: TcxGridDBColumn;
Tv1StkNetWeight: TcxGridDBColumn;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure TBRafreshClick(Sender: TObject);
@ -132,8 +134,8 @@ begin
Close;
sql.Clear;
sql.Add('select C_NAME,COUNT(*)JS,SUM(Meter)stkMeter,SUM(Yardage)StkYardage from V_Tat_Cloth_IO A where A.IOFlag = ''Èë¿â'' ' + WSql);
sql.Add('group by C_NAME');
sql.Add('select C_NAME,carno,COUNT(*)JS,SUM(Meter)stkMeter,SUM(Yardage)StkYardage,SUM(NetWeight)StkNetWeight from V_Tat_Cloth_IO A where A.IOFlag = ''Èë¿â'' ' + WSql);
sql.Add('group by C_NAME,carno');
// showmessage(sql.text);
Open;