产品 检验

This commit is contained in:
funa 2026-09-28 17:25:53 +08:00
parent 6f6a2fda89
commit 093744eaa9
7 changed files with 77 additions and 12 deletions

View File

@ -7,6 +7,7 @@ inherited frmTatClothInfo: TfrmTatClothInfo
FormStyle = fsMDIChild FormStyle = fsMDIChild
Position = poScreenCenter Position = poScreenCenter
Visible = True Visible = True
ExplicitLeft = -271
ExplicitWidth = 1460 ExplicitWidth = 1460
ExplicitHeight = 741 ExplicitHeight = 741
PixelsPerInch = 96 PixelsPerInch = 96
@ -346,8 +347,6 @@ inherited frmTatClothInfo: TfrmTatClothInfo
Align = alClient Align = alClient
PopupMenu = PM_1 PopupMenu = PM_1
TabOrder = 0 TabOrder = 0
ExplicitTop = 42
ExplicitHeight = 370
object Tv1: TcxGridDBTableView object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <> Navigator.Buttons.CustomButtons = <>
Navigator.Buttons.Delete.Enabled = False Navigator.Buttons.Delete.Enabled = False
@ -552,7 +551,6 @@ inherited frmTatClothInfo: TfrmTatClothInfo
Align = alTop Align = alTop
BevelOuter = bvNone BevelOuter = bvNone
TabOrder = 1 TabOrder = 1
ExplicitTop = 2
object Panel4: TPanel object Panel4: TPanel
Left = 0 Left = 0
Top = 0 Top = 0

View File

@ -24,7 +24,7 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput
Height = 38 Height = 38
AutoSize = True AutoSize = True
ButtonHeight = 38 ButtonHeight = 38
ButtonWidth = 75 ButtonWidth = 91
Caption = 'ToolBar1' Caption = 'ToolBar1'
Color = clWhite Color = clWhite
DisabledImages = DataLink_ClothInfo.ImageList_new32 DisabledImages = DataLink_ClothInfo.ImageList_new32
@ -50,10 +50,18 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput
ImageIndex = 22 ImageIndex = 22
OnClick = ToolButton6Click OnClick = ToolButton6Click
end end
object TBClose: TToolButton object ToolButton9: TToolButton
Left = 142 Left = 142
Top = 0 Top = 0
AutoSize = True AutoSize = True
Caption = #20445#23384#26684#24335
ImageIndex = 16
OnClick = ToolButton9Click
end
object TBClose: TToolButton
Left = 237
Top = 0
AutoSize = True
Caption = #20851#38381 Caption = #20851#38381
ImageIndex = 7 ImageIndex = 7
OnClick = TBCloseClick OnClick = TBCloseClick
@ -72,8 +80,6 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput
ParentColor = False ParentColor = False
ParentCtl3D = False ParentCtl3D = False
TabOrder = 1 TabOrder = 1
ExplicitLeft = -8
ExplicitTop = 32
object Label1: TLabel object Label1: TLabel
Left = 31 Left = 31
Top = 11 Top = 11

View File

@ -223,6 +223,7 @@ type
C_LatitudeBatchNo: TEdit; C_LatitudeBatchNo: TEdit;
Label14: TLabel; Label14: TLabel;
Label16: TLabel; Label16: TLabel;
ToolButton9: TToolButton;
procedure FormShow(Sender: TObject); procedure FormShow(Sender: TObject);
procedure TBCloseClick(Sender: TObject); procedure TBCloseClick(Sender: TObject);
procedure ToolButton1Click(Sender: TObject); procedure ToolButton1Click(Sender: TObject);
@ -242,6 +243,7 @@ type
procedure ToolButton8Click(Sender: TObject); procedure ToolButton8Click(Sender: TObject);
procedure Edit1KeyPress(Sender: TObject; var Key: Char); procedure Edit1KeyPress(Sender: TObject; var Key: Char);
procedure Button1Click(Sender: TObject); procedure Button1Click(Sender: TObject);
procedure ToolButton9Click(Sender: TObject);
private private
canshu1: string; canshu1: string;
Fint: Integer; Fint: Integer;
@ -397,6 +399,9 @@ end;
procedure TfrmTatClothInfoInput.FormShow(Sender: TObject); procedure TfrmTatClothInfoInput.FormShow(Sender: TObject);
begin begin
inherited;
ReadCxGrid(self.Caption + 'TV1', Tv1, '¾­É´Åä±È');
ReadCxGrid(self.Caption + 'TV2', Tv2, 'γɴÅä±È');
InitGrid(); InitGrid();
if CopyInt = 1 then if CopyInt = 1 then
begin begin
@ -985,5 +990,13 @@ begin
CALCYarnQty(); CALCYarnQty();
end; end;
procedure TfrmTatClothInfoInput.ToolButton9Click(Sender: TObject);
begin
inherited;
WriteCxGrid(self.Caption + 'TV1', Tv1, '¾­É´Åä±È');
WriteCxGrid(self.Caption + 'TV2', Tv2, 'γɴÅä±È');
end;
end. end.

View File

@ -91,7 +91,6 @@ object frmTatInspEdit: TfrmTatInspEdit
Color = clWhite Color = clWhite
ParentBackground = False ParentBackground = False
TabOrder = 1 TabOrder = 1
ExplicitTop = 18
object Label1: TLabel object Label1: TLabel
Left = 745 Left = 745
Top = 55 Top = 55
@ -265,10 +264,9 @@ object frmTatInspEdit: TfrmTatInspEdit
Height = 344 Height = 344
Align = alClient Align = alClient
TabOrder = 2 TabOrder = 2
ExplicitTop = 97
ExplicitHeight = 364
object TV1: TcxGridDBTableView object TV1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <> Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
DataController.Filter.AutoDataSetFilter = True DataController.Filter.AutoDataSetFilter = True
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost] DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <> DataController.Summary.DefaultGroupSummaryItems = <>
@ -295,6 +293,7 @@ object frmTatInspEdit: TfrmTatInspEdit
object TV1Column1: TcxGridDBColumn object TV1Column1: TcxGridDBColumn
Caption = #30133#28857 Caption = #30133#28857
DataBinding.FieldName = 'CIFName' DataBinding.FieldName = 'CIFName'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxButtonEditProperties' PropertiesClassName = 'TcxButtonEditProperties'
Properties.Buttons = < Properties.Buttons = <
item item
@ -308,6 +307,7 @@ object frmTatInspEdit: TfrmTatInspEdit
object cxGridDBColumn2: TcxGridDBColumn object cxGridDBColumn2: TcxGridDBColumn
Caption = #30133#28857#21517#31216 Caption = #30133#28857#21517#31216
DataBinding.FieldName = 'CIFName' DataBinding.FieldName = 'CIFName'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter HeaderAlignmentHorz = taCenter
Options.Focusing = False Options.Focusing = False
Options.Sorting = False Options.Sorting = False
@ -316,6 +316,7 @@ object frmTatInspEdit: TfrmTatInspEdit
object cxGridDBColumn3: TcxGridDBColumn object cxGridDBColumn3: TcxGridDBColumn
Caption = #20301#32622#36215 Caption = #20301#32622#36215
DataBinding.FieldName = 'CIFbeg' DataBinding.FieldName = 'CIFbeg'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties' PropertiesClassName = 'TcxTextEditProperties'
Properties.OnEditValueChanged = cxGridDBColumn3PropertiesEditValueChanged Properties.OnEditValueChanged = cxGridDBColumn3PropertiesEditValueChanged
HeaderAlignmentHorz = taCenter HeaderAlignmentHorz = taCenter
@ -326,6 +327,7 @@ object frmTatInspEdit: TfrmTatInspEdit
object cxGridDBColumn4: TcxGridDBColumn object cxGridDBColumn4: TcxGridDBColumn
Caption = #20301#32622#27490 Caption = #20301#32622#27490
DataBinding.FieldName = 'CIFend' DataBinding.FieldName = 'CIFend'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter HeaderAlignmentHorz = taCenter
HeaderGlyphAlignmentHorz = taCenter HeaderGlyphAlignmentHorz = taCenter
Width = 79 Width = 79
@ -333,6 +335,7 @@ object frmTatInspEdit: TfrmTatInspEdit
object cxGridDBColumn5: TcxGridDBColumn object cxGridDBColumn5: TcxGridDBColumn
Caption = #38271#24230 Caption = #38271#24230
DataBinding.FieldName = 'CIFQty' DataBinding.FieldName = 'CIFQty'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties' PropertiesClassName = 'TcxTextEditProperties'
HeaderAlignmentHorz = taCenter HeaderAlignmentHorz = taCenter
Options.Sorting = False Options.Sorting = False
@ -341,6 +344,7 @@ object frmTatInspEdit: TfrmTatInspEdit
object cxGridDBColumn6: TcxGridDBColumn object cxGridDBColumn6: TcxGridDBColumn
Caption = #21407#22240 Caption = #21407#22240
DataBinding.FieldName = 'CDReason' DataBinding.FieldName = 'CDReason'
DataBinding.IsNullValueType = True
Visible = False Visible = False
HeaderAlignmentHorz = taCenter HeaderAlignmentHorz = taCenter
Options.Sorting = False Options.Sorting = False
@ -348,12 +352,14 @@ object frmTatInspEdit: TfrmTatInspEdit
end end
object cxGridDBColumn7: TcxGridDBColumn object cxGridDBColumn7: TcxGridDBColumn
DataBinding.FieldName = 'CDQty' DataBinding.FieldName = 'CDQty'
DataBinding.IsNullValueType = True
Visible = False Visible = False
Width = 60 Width = 60
end end
object cxGridDBColumn8: TcxGridDBColumn object cxGridDBColumn8: TcxGridDBColumn
Caption = #25187#20998 Caption = #25187#20998
DataBinding.FieldName = 'CIFPoints' DataBinding.FieldName = 'CIFPoints'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter HeaderAlignmentHorz = taCenter
Options.Editing = False Options.Editing = False
Width = 73 Width = 73
@ -361,6 +367,7 @@ object frmTatInspEdit: TfrmTatInspEdit
object cxGridDBColumn9: TcxGridDBColumn object cxGridDBColumn9: TcxGridDBColumn
Caption = #20010#25968 Caption = #20010#25968
DataBinding.FieldName = 'CIFNumber' DataBinding.FieldName = 'CIFNumber'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter HeaderAlignmentHorz = taCenter
Options.Editing = False Options.Editing = False
Width = 69 Width = 69

View File

@ -9,7 +9,7 @@ uses
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses, cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
cxControls, cxGridCustomView, cxGrid, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxControls, cxGridCustomView, cxGrid, StdCtrls, ExtCtrls, ComCtrls, ToolWin,
cxButtonEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxSkinsCore, cxButtonEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxSkinsCore,
dxSkinsDefaultPainters, dxDateRanges; dxSkinsDefaultPainters, dxDateRanges, dxSkinWXI, dxScrollbarAnnotations;
type type
TfrmTatInspEdit = class(TForm) TfrmTatInspEdit = class(TForm)

View File

@ -7,6 +7,7 @@
FormStyle = fsMDIChild FormStyle = fsMDIChild
Position = poScreenCenter Position = poScreenCenter
Visible = True Visible = True
ExplicitTop = -137
ExplicitWidth = 1556 ExplicitWidth = 1556
ExplicitHeight = 807 ExplicitHeight = 807
PixelsPerInch = 96 PixelsPerInch = 96
@ -2734,7 +2735,7 @@
Height = 193 Height = 193
Align = alBottom Align = alBottom
TabOrder = 1 TabOrder = 1
Properties.ActivePage = 查看 Properties.ActivePage = cxTabSheet1
Properties.CustomButtons.Buttons = <> Properties.CustomButtons.Buttons = <>
ClientRectBottom = 191 ClientRectBottom = 191
ClientRectLeft = 2 ClientRectLeft = 2
@ -2753,6 +2754,7 @@
object Tv2: TcxGridDBTableView object Tv2: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <> Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <> ScrollbarAnnotations.CustomAnnotations = <>
OnCellDblClick = Tv2CellDblClick
DataController.DataSource = DS_2 DataController.DataSource = DS_2
DataController.Filter.AutoDataSetFilter = True DataController.Filter.AutoDataSetFilter = True
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost] DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]

View File

@ -367,6 +367,7 @@ type
procedure Button6Click(Sender: TObject); procedure Button6Click(Sender: TObject);
procedure Button8Click(Sender: TObject); procedure Button8Click(Sender: TObject);
procedure Tv3MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tv3MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure Tv2CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
procedure edtYJClick(Sender: TObject); procedure edtYJClick(Sender: TObject);
procedure Pic_Image1DblClick(Sender: TObject); procedure Pic_Image1DblClick(Sender: TObject);
procedure Tv3CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); procedure Tv3CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
@ -1483,6 +1484,44 @@ begin
InitCDGridCX(CDS_3.FieldByName('CIID').AsString); InitCDGridCX(CDS_3.FieldByName('CIID').AsString);
end; end;
procedure TfrmTatMachInsp.Tv2CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
begin
if CDS_2.IsEmpty then
Exit;
if Application.MessageBox('确定要删除该条疵点数据吗?', '提示', 32 + 4) <> IDYES then
Exit;
//已保存过的疵点(CIFID非空)直接删除数据库记录
if Trim(CDS_2.fieldbyname('CIFID').AsString) <> '' then
begin
ADOCmd.Connection.BeginTrans;
try
with ADOCmd do
begin
Close;
sql.Clear;
sql.Add('delete Tat_Cloth_Inspect_Flaw where CIFID=' + quotedstr(Trim(CDS_2.fieldbyname('CIFID').AsString)));
ExecSQL;
end;
////////////////// 更新卷号疵点信息 //////////////////
with ADOCmd do
begin
Close;
sql.Clear;
sql.Add('exec P_Tat_Insp_Up @CIID=' + quotedstr(Trim(CDS_2.fieldbyname('CIID').AsString)));
sql.Add(',@InspType=' + QuotedStr('单卷修改'));
ExecSQL;
end;
////////////////// 更新卷号疵点信息 //////////////////
ADOCmd.Connection.CommitTrans;
except
ADOCmd.Connection.RollbackTrans;
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
Exit;
end;
end;
CDS_2.Delete;
end;
function TfrmTatMachInsp.SaveData(): Boolean; function TfrmTatMachInsp.SaveData(): Boolean;
var var
maxno, MCIID, strsql: string; maxno, MCIID, strsql: string;