2026-09-11 10:45:49 +08:00
|
|
|
|
unit U_TatClothInfoInput;
|
|
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
|
|
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
|
|
|
|
|
cxEdit, DB, cxDBData, ADODB, DBClient, cxGridLevel, cxGridCustomTableView,
|
|
|
|
|
|
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
|
|
|
|
|
|
cxGrid, ComCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, cxTextEdit,
|
|
|
|
|
|
cxButtonEdit, StdCtrls, ExtCtrls, cxCurrencyEdit, BtnEdit, U_BaseList,
|
|
|
|
|
|
cxLookAndFeels, cxLookAndFeelPainters, dxSkinsCore, dxSkinsDefaultPainters,
|
|
|
|
|
|
cxNavigator, dxDateRanges, dxBarBuiltInMenu, cxPC, dxScrollbarAnnotations,
|
2026-09-11 17:23:39 +08:00
|
|
|
|
cxCheckBox, dxSkinWXI;
|
2026-09-11 10:45:49 +08:00
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
|
TfrmTatClothInfoInput = class(TForm)
|
|
|
|
|
|
ToolBar1: TToolBar;
|
|
|
|
|
|
ToolButton1: TToolButton;
|
|
|
|
|
|
TBClose: TToolButton;
|
|
|
|
|
|
ADOQueryCmd: TADOQuery;
|
|
|
|
|
|
ADOQueryTemp: TADOQuery;
|
|
|
|
|
|
ScrollBox1: TScrollBox;
|
|
|
|
|
|
Label1: TLabel;
|
|
|
|
|
|
Label5: TLabel;
|
|
|
|
|
|
Label15: TLabel;
|
|
|
|
|
|
Label22: TLabel;
|
|
|
|
|
|
Label2: TLabel;
|
|
|
|
|
|
Label4: TLabel;
|
|
|
|
|
|
Label3: TLabel;
|
|
|
|
|
|
C_Code: TEdit;
|
|
|
|
|
|
C_Name: TEdit;
|
|
|
|
|
|
C_YarnQty: TEdit;
|
|
|
|
|
|
C_FinishLatitudeDensity: TEdit;
|
|
|
|
|
|
C_Width: TBtnEditC;
|
|
|
|
|
|
C_GramWeight: TBtnEditC;
|
|
|
|
|
|
Label12: TLabel;
|
|
|
|
|
|
C_FinishLongitudeDensity: TEdit;
|
|
|
|
|
|
ToolButton6: TToolButton;
|
|
|
|
|
|
BCIID: TEdit;
|
|
|
|
|
|
Label6: TLabel;
|
|
|
|
|
|
Label7: TLabel;
|
|
|
|
|
|
Label8: TLabel;
|
|
|
|
|
|
C_LatitudeSpec: TEdit;
|
|
|
|
|
|
C_LongitudeSpec: TEdit;
|
2026-10-10 17:25:31 +08:00
|
|
|
|
strip_width: TEdit;
|
2026-09-11 10:45:49 +08:00
|
|
|
|
Label9: TLabel;
|
|
|
|
|
|
C_Spec: TEdit;
|
|
|
|
|
|
CDS_1: TClientDataSet;
|
|
|
|
|
|
DS_1: TDataSource;
|
|
|
|
|
|
CDS_2: TClientDataSet;
|
|
|
|
|
|
DS_2: TDataSource;
|
|
|
|
|
|
Label10: TLabel;
|
|
|
|
|
|
C_MachLatitudeDensity: TEdit;
|
|
|
|
|
|
cxPageControl3: TcxPageControl;
|
|
|
|
|
|
cxTabSheet1: TcxTabSheet;
|
|
|
|
|
|
cxTabSheet2: TcxTabSheet;
|
|
|
|
|
|
Panel1: TPanel;
|
|
|
|
|
|
cxPageControl2: TcxPageControl;
|
|
|
|
|
|
cxGrid1: TcxGrid;
|
|
|
|
|
|
TV1: TcxGridDBTableView;
|
|
|
|
|
|
cxGridDBColumn3: TcxGridDBColumn;
|
|
|
|
|
|
cxGridDBColumn4: TcxGridDBColumn;
|
|
|
|
|
|
cxGridDBColumn5: TcxGridDBColumn;
|
|
|
|
|
|
cxGridDBColumn8: TcxGridDBColumn;
|
|
|
|
|
|
cxGridDBColumn7: TcxGridDBColumn;
|
|
|
|
|
|
TV1Column1: TcxGridDBColumn;
|
|
|
|
|
|
TV1Column2: TcxGridDBColumn;
|
|
|
|
|
|
cxGridLevel2: TcxGridLevel;
|
|
|
|
|
|
Panel3: TPanel;
|
|
|
|
|
|
Panel4: TPanel;
|
|
|
|
|
|
Label20: TLabel;
|
|
|
|
|
|
ToolBar2: TToolBar;
|
|
|
|
|
|
ToolButton2: TToolButton;
|
|
|
|
|
|
ToolButton3: TToolButton;
|
|
|
|
|
|
ToolButton5: TToolButton;
|
|
|
|
|
|
Panel2: TPanel;
|
|
|
|
|
|
cxPageControl1: TcxPageControl;
|
|
|
|
|
|
cxGrid2: TcxGrid;
|
|
|
|
|
|
Tv2: TcxGridDBTableView;
|
|
|
|
|
|
v2Column10: TcxGridDBColumn;
|
|
|
|
|
|
cxGridDBColumn1: TcxGridDBColumn;
|
|
|
|
|
|
v2Column2: TcxGridDBColumn;
|
|
|
|
|
|
v2Column5: TcxGridDBColumn;
|
|
|
|
|
|
v2Column6: TcxGridDBColumn;
|
|
|
|
|
|
Tv2Column1: TcxGridDBColumn;
|
|
|
|
|
|
Tv2Column2: TcxGridDBColumn;
|
|
|
|
|
|
cxGridLevel1: TcxGridLevel;
|
|
|
|
|
|
Panel5: TPanel;
|
|
|
|
|
|
Panel6: TPanel;
|
|
|
|
|
|
Label21: TLabel;
|
|
|
|
|
|
ToolBar3: TToolBar;
|
|
|
|
|
|
ToolButton4: TToolButton;
|
|
|
|
|
|
ToolButton7: TToolButton;
|
|
|
|
|
|
ToolButton8: TToolButton;
|
|
|
|
|
|
Panel7: TPanel;
|
|
|
|
|
|
Label35: TLabel;
|
|
|
|
|
|
Label34: TLabel;
|
|
|
|
|
|
Label36: TLabel;
|
|
|
|
|
|
Label37: TLabel;
|
|
|
|
|
|
Label38: TLabel;
|
|
|
|
|
|
Label39: TLabel;
|
|
|
|
|
|
Label40: TLabel;
|
|
|
|
|
|
Label41: TLabel;
|
|
|
|
|
|
Label42: TLabel;
|
|
|
|
|
|
Label44: TLabel;
|
|
|
|
|
|
Label45: TLabel;
|
|
|
|
|
|
Label46: TLabel;
|
|
|
|
|
|
Label48: TLabel;
|
|
|
|
|
|
Label49: TLabel;
|
|
|
|
|
|
Label50: TLabel;
|
|
|
|
|
|
Label51: TLabel;
|
|
|
|
|
|
Label52: TLabel;
|
|
|
|
|
|
Label53: TLabel;
|
|
|
|
|
|
Label54: TLabel;
|
|
|
|
|
|
Label55: TLabel;
|
|
|
|
|
|
Label57: TLabel;
|
|
|
|
|
|
Label58: TLabel;
|
|
|
|
|
|
Label59: TLabel;
|
|
|
|
|
|
Label60: TLabel;
|
|
|
|
|
|
Label61: TLabel;
|
|
|
|
|
|
Label62: TLabel;
|
|
|
|
|
|
Label63: TLabel;
|
|
|
|
|
|
Label64: TLabel;
|
|
|
|
|
|
Label65: TLabel;
|
|
|
|
|
|
Label66: TLabel;
|
|
|
|
|
|
Label67: TLabel;
|
|
|
|
|
|
Label68: TLabel;
|
|
|
|
|
|
Label69: TLabel;
|
|
|
|
|
|
Label70: TLabel;
|
|
|
|
|
|
Label71: TLabel;
|
|
|
|
|
|
Label72: TLabel;
|
|
|
|
|
|
WB_2: TEdit;
|
|
|
|
|
|
WB_1: TEdit;
|
|
|
|
|
|
WB_4: TEdit;
|
|
|
|
|
|
WB_3: TEdit;
|
|
|
|
|
|
WB_6: TEdit;
|
|
|
|
|
|
WB_5: TEdit;
|
|
|
|
|
|
WB_8: TEdit;
|
|
|
|
|
|
WB_7: TEdit;
|
|
|
|
|
|
WB_10: TEdit;
|
|
|
|
|
|
WB_9: TEdit;
|
|
|
|
|
|
WB_12: TEdit;
|
|
|
|
|
|
WB_11: TEdit;
|
|
|
|
|
|
WB_14: TEdit;
|
|
|
|
|
|
WB_13: TEdit;
|
|
|
|
|
|
WB_16: TEdit;
|
|
|
|
|
|
WB_15: TEdit;
|
|
|
|
|
|
WB_18: TEdit;
|
|
|
|
|
|
WB_17: TEdit;
|
|
|
|
|
|
WB_20: TEdit;
|
|
|
|
|
|
WB_19: TEdit;
|
|
|
|
|
|
WB_22: TEdit;
|
|
|
|
|
|
WB_21: TEdit;
|
|
|
|
|
|
WB_24: TEdit;
|
|
|
|
|
|
WB_23: TEdit;
|
|
|
|
|
|
WB_26: TEdit;
|
|
|
|
|
|
WB_25: TEdit;
|
|
|
|
|
|
WB_28: TEdit;
|
|
|
|
|
|
WB_27: TEdit;
|
|
|
|
|
|
WB_30: TEdit;
|
|
|
|
|
|
WB_29: TEdit;
|
|
|
|
|
|
WB_32: TEdit;
|
|
|
|
|
|
WB_31: TEdit;
|
|
|
|
|
|
WB_34: TEdit;
|
|
|
|
|
|
WB_33: TEdit;
|
|
|
|
|
|
WB_36: TEdit;
|
|
|
|
|
|
WB_35: TEdit;
|
|
|
|
|
|
WB_38: TEdit;
|
|
|
|
|
|
WB_37: TEdit;
|
|
|
|
|
|
WB_40: TEdit;
|
|
|
|
|
|
WB_39: TEdit;
|
|
|
|
|
|
WB_42: TEdit;
|
|
|
|
|
|
WB_41: TEdit;
|
|
|
|
|
|
WB_44: TEdit;
|
|
|
|
|
|
WB_43: TEdit;
|
|
|
|
|
|
WB_46: TEdit;
|
|
|
|
|
|
WB_45: TEdit;
|
|
|
|
|
|
WB_48: TEdit;
|
|
|
|
|
|
WB_47: TEdit;
|
|
|
|
|
|
WB_50: TEdit;
|
|
|
|
|
|
WB_49: TEdit;
|
|
|
|
|
|
WB_52: TEdit;
|
|
|
|
|
|
WB_51: TEdit;
|
|
|
|
|
|
WB_54: TEdit;
|
|
|
|
|
|
WB_53: TEdit;
|
|
|
|
|
|
WB_56: TEdit;
|
|
|
|
|
|
WB_55: TEdit;
|
|
|
|
|
|
WB_58: TEdit;
|
|
|
|
|
|
WB_57: TEdit;
|
|
|
|
|
|
WB_60: TEdit;
|
|
|
|
|
|
WB_59: TEdit;
|
|
|
|
|
|
WB_62: TEdit;
|
|
|
|
|
|
WB_61: TEdit;
|
|
|
|
|
|
WB_64: TEdit;
|
|
|
|
|
|
WB_63: TEdit;
|
|
|
|
|
|
WB_66: TEdit;
|
|
|
|
|
|
WB_65: TEdit;
|
|
|
|
|
|
WB_68: TEdit;
|
|
|
|
|
|
WB_67: TEdit;
|
|
|
|
|
|
WB_70: TEdit;
|
|
|
|
|
|
WB_69: TEdit;
|
|
|
|
|
|
WB_72: TEdit;
|
|
|
|
|
|
WB_71: TEdit;
|
|
|
|
|
|
cxTabSheet3: TcxTabSheet;
|
|
|
|
|
|
Panel8: TPanel;
|
|
|
|
|
|
Label73: TLabel;
|
|
|
|
|
|
Edit1: TEdit;
|
|
|
|
|
|
Button1: TButton;
|
|
|
|
|
|
cxGrid3: TcxGrid;
|
|
|
|
|
|
TV3: TcxGridDBTableView;
|
|
|
|
|
|
cxGridDBColumn2: TcxGridDBColumn;
|
|
|
|
|
|
cxGridDBColumn6: TcxGridDBColumn;
|
|
|
|
|
|
cxGridDBColumn9: TcxGridDBColumn;
|
|
|
|
|
|
cxGridLevel3: TcxGridLevel;
|
|
|
|
|
|
CDS_3: TClientDataSet;
|
|
|
|
|
|
DS_3: TDataSource;
|
2026-09-11 17:23:39 +08:00
|
|
|
|
C_Color: TEdit;
|
|
|
|
|
|
Label11: TLabel;
|
2026-09-23 17:27:20 +08:00
|
|
|
|
estimated_diff: TEdit;
|
|
|
|
|
|
Label13: TLabel;
|
2026-09-24 17:22:46 +08:00
|
|
|
|
C_LongitudeBatchNo: TEdit;
|
|
|
|
|
|
C_LatitudeBatchNo: TEdit;
|
|
|
|
|
|
Label14: TLabel;
|
|
|
|
|
|
Label16: TLabel;
|
2026-09-28 17:25:53 +08:00
|
|
|
|
ToolButton9: TToolButton;
|
2026-10-10 17:25:31 +08:00
|
|
|
|
cxTabSheet4: TcxTabSheet;
|
|
|
|
|
|
cxTabSheet5: TcxTabSheet;
|
|
|
|
|
|
head_count: TEdit;
|
|
|
|
|
|
C_ReedNo: TEdit;
|
|
|
|
|
|
row_count_top: TEdit;
|
|
|
|
|
|
displace: TEdit;
|
|
|
|
|
|
reed_width: TEdit;
|
|
|
|
|
|
warp_arrange: TMemo;
|
|
|
|
|
|
reed_weave_method: TMemo;
|
|
|
|
|
|
weft_arrange: TMemo;
|
2026-10-12 17:23:40 +08:00
|
|
|
|
cxTabSheet7: TcxTabSheet;
|
|
|
|
|
|
Panel9: TPanel;
|
|
|
|
|
|
Label26: TLabel;
|
|
|
|
|
|
threading_method: TMemo;
|
|
|
|
|
|
Splitter1: TSplitter;
|
|
|
|
|
|
Panel10: TPanel;
|
|
|
|
|
|
Label27: TLabel;
|
|
|
|
|
|
lifting_method: TMemo;
|
2026-10-10 17:25:31 +08:00
|
|
|
|
Label17: TLabel;
|
|
|
|
|
|
Label18: TLabel;
|
|
|
|
|
|
Label19: TLabel;
|
|
|
|
|
|
Label23: TLabel;
|
|
|
|
|
|
cxTabSheet6: TcxTabSheet;
|
|
|
|
|
|
Label24: TLabel;
|
|
|
|
|
|
Label25: TLabel;
|
2026-09-11 10:45:49 +08:00
|
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
|
|
|
procedure TBCloseClick(Sender: TObject);
|
|
|
|
|
|
procedure ToolButton1Click(Sender: TObject);
|
|
|
|
|
|
procedure CYColorKeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
|
procedure CYKZExit(Sender: TObject);
|
|
|
|
|
|
procedure CYMFExit(Sender: TObject);
|
|
|
|
|
|
procedure FormCreate(Sender: TObject);
|
|
|
|
|
|
procedure CYJGGYBtnDnClick(Sender: TObject);
|
|
|
|
|
|
procedure C_WidthBtnDnClick(Sender: TObject);
|
|
|
|
|
|
procedure C_WidthBtnUpClick(Sender: TObject);
|
|
|
|
|
|
procedure ToolButton6Click(Sender: TObject);
|
|
|
|
|
|
procedure ToolButton2Click(Sender: TObject);
|
|
|
|
|
|
procedure ToolButton3Click(Sender: TObject);
|
|
|
|
|
|
procedure ToolButton7Click(Sender: TObject);
|
|
|
|
|
|
procedure ToolButton4Click(Sender: TObject);
|
|
|
|
|
|
procedure ToolButton5Click(Sender: TObject);
|
|
|
|
|
|
procedure ToolButton8Click(Sender: TObject);
|
|
|
|
|
|
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
|
procedure Button1Click(Sender: TObject);
|
2026-09-28 17:25:53 +08:00
|
|
|
|
procedure ToolButton9Click(Sender: TObject);
|
2026-10-13 17:29:49 +08:00
|
|
|
|
procedure TV1YRatioPropertiesEditValueChanged(Sender: TObject);
|
|
|
|
|
|
procedure Tv2YRatioPropertiesEditValueChanged(Sender: TObject);
|
2026-09-11 10:45:49 +08:00
|
|
|
|
private
|
|
|
|
|
|
canshu1: string;
|
|
|
|
|
|
Fint: Integer;
|
2026-10-19 17:25:11 +08:00
|
|
|
|
FBound: Boolean;
|
|
|
|
|
|
procedure SetCraftFieldsReadOnly(AReadOnly: Boolean);
|
2026-09-11 10:45:49 +08:00
|
|
|
|
procedure InitGrid();
|
2026-10-10 17:25:31 +08:00
|
|
|
|
procedure AddPresetYarnRows(ACDS: TClientDataSet);
|
2026-09-11 10:45:49 +08:00
|
|
|
|
function SaveData(): Boolean;
|
|
|
|
|
|
procedure CALCYarnQty();
|
2026-10-13 17:29:49 +08:00
|
|
|
|
procedure CalcGramWeight();
|
|
|
|
|
|
procedure SyncYRatioFromEditor(ACDS: TClientDataSet; Sender: TObject);
|
2026-09-11 10:45:49 +08:00
|
|
|
|
{ Private declarations }
|
|
|
|
|
|
public
|
|
|
|
|
|
FBCIID, FCTID: string;
|
|
|
|
|
|
CopyInt: Integer;
|
|
|
|
|
|
|
|
|
|
|
|
{ Public declarations }
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
var
|
|
|
|
|
|
frmTatClothInfoInput: TfrmTatClothInfoInput;
|
|
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
|
U_DataLink, U_RTFun, U_iniParam, U_ZDYHelp, U_AttachmentUpload, U_YarnInfoSel;
|
|
|
|
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure TfrmTatClothInfoInput.Button1Click(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
if CDS_3.IsEmpty then
|
|
|
|
|
|
exit;
|
|
|
|
|
|
if CDS_3.Locate('ssel', True, []) = False then
|
|
|
|
|
|
begin
|
|
|
|
|
|
Application.MessageBox('û<><C3BB>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!', '<27><>ʾ', 0);
|
|
|
|
|
|
Exit;
|
|
|
|
|
|
end;
|
|
|
|
|
|
if Application.MessageBox('ȷ<><C8B7>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϻ<EFBFBD><CFBA><EFBFBD><EFBFBD>ݲ<EFBFBD><DDB2>ָܻ<DCBB><D6B8><EFBFBD>', '<27><>ʾ', 32 + 4) <> IDYES then
|
|
|
|
|
|
Exit;
|
|
|
|
|
|
CDS_3.DisableControls;
|
|
|
|
|
|
with CDS_3 do
|
|
|
|
|
|
begin
|
|
|
|
|
|
First;
|
|
|
|
|
|
while not Eof do
|
|
|
|
|
|
begin
|
|
|
|
|
|
if CDS_3.FieldByName('SSel').AsBoolean = True then
|
|
|
|
|
|
begin
|
|
|
|
|
|
if Trim(CDS_3.fieldbyname('QZID').AsString) <> '' then
|
|
|
|
|
|
with ADOQueryCmd do
|
|
|
|
|
|
begin
|
|
|
|
|
|
Close;
|
|
|
|
|
|
sql.Clear;
|
|
|
|
|
|
sql.Add('delete Bs_cloth_info_qz where QZID=''' + Trim(CDS_3.fieldbyname('QZID').AsString) + '''');
|
|
|
|
|
|
ExecSQL;
|
|
|
|
|
|
end;
|
|
|
|
|
|
CDS_3.Delete;
|
|
|
|
|
|
end
|
|
|
|
|
|
else
|
|
|
|
|
|
Next;
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
CDS_3.EnableControls;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmTatClothInfoInput.CALCYarnQty();
|
|
|
|
|
|
var
|
|
|
|
|
|
MYarnQty, MOrdQty, MWidth, MMachLatitudeDensity: Double;
|
|
|
|
|
|
begin
|
|
|
|
|
|
MYarnQty := STRTOFLOATDEF(C_YarnQty.Text, 0);
|
|
|
|
|
|
MOrdQty := 10000;
|
|
|
|
|
|
MWidth := STRTOFLOATDEF(StringReplace(C_Width.Text, 'CM', '', [rfReplaceAll, rfIgnoreCase]), 0);
|
|
|
|
|
|
MMachLatitudeDensity := STRTOFLOATDEF(C_MachLatitudeDensity.Text, 0);
|
|
|
|
|
|
with CDS_1 do
|
|
|
|
|
|
begin
|
|
|
|
|
|
DisableControls;
|
|
|
|
|
|
First;
|
|
|
|
|
|
while not Eof do
|
|
|
|
|
|
begin
|
|
|
|
|
|
Edit;
|
|
|
|
|
|
FieldByName('Y_Qty').Value := MYarnQty * MOrdQty * FieldByName('Y_Ratio').AsFloat / 100 / 9000 * FieldByName('Denier').AsFloat / 1000;
|
|
|
|
|
|
Next;
|
|
|
|
|
|
end;
|
|
|
|
|
|
EnableControls;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
with CDS_2 do
|
|
|
|
|
|
begin
|
|
|
|
|
|
DisableControls;
|
|
|
|
|
|
First;
|
|
|
|
|
|
while not Eof do
|
|
|
|
|
|
begin
|
|
|
|
|
|
Edit;
|
|
|
|
|
|
FieldByName('Y_Qty').Value := MMachLatitudeDensity * MOrdQty * MWidth * FieldByName('Y_Ratio').AsFloat / 100 / 9000 * FieldByName('Denier').AsFloat / 1000;
|
|
|
|
|
|
Next;
|
|
|
|
|
|
end;
|
|
|
|
|
|
EnableControls;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
2026-10-13 17:29:49 +08:00
|
|
|
|
procedure TfrmTatClothInfoInput.SyncYRatioFromEditor(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
|
|
|
|
|
|
begin
|
|
|
|
|
|
ACDS.Edit;
|
|
|
|
|
|
ACDS.FieldByName('Y_Ratio').AsFloat := MValue;
|
|
|
|
|
|
ACDS.Post;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmTatClothInfoInput.CalcGramWeight();
|
|
|
|
|
|
|
|
|
|
|
|
function SumViewRatio(AView: TcxGridDBTableView; ARatioColumn: TcxGridDBColumn): Double;
|
|
|
|
|
|
var
|
|
|
|
|
|
i: Integer;
|
|
|
|
|
|
v: Variant;
|
|
|
|
|
|
begin
|
|
|
|
|
|
Result := 0;
|
|
|
|
|
|
for i := 0 to AView.DataController.RecordCount - 1 do
|
|
|
|
|
|
begin
|
|
|
|
|
|
v := AView.DataController.Values[i, ARatioColumn.Index];
|
|
|
|
|
|
if not VarIsNull(v) then
|
|
|
|
|
|
Result := Result + v;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
begin
|
|
|
|
|
|
C_GramWeight.Text := FormatFloat('0.######',
|
|
|
|
|
|
(SumViewRatio(TV1, cxGridDBColumn7) + SumViewRatio(Tv2, v2Column5)) / 1000);
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmTatClothInfoInput.TV1YRatioPropertiesEditValueChanged(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
SyncYRatioFromEditor(CDS_1, Sender);
|
|
|
|
|
|
CalcGramWeight();
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmTatClothInfoInput.Tv2YRatioPropertiesEditValueChanged(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
SyncYRatioFromEditor(CDS_2, Sender);
|
|
|
|
|
|
CalcGramWeight();
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
2026-09-11 10:45:49 +08:00
|
|
|
|
procedure TfrmTatClothInfoInput.InitGrid();
|
|
|
|
|
|
begin
|
2026-10-19 17:25:11 +08:00
|
|
|
|
//<2F>Ȼָ<C8BB><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶο<D6B6><CEBF><EFBFBD><EFBFBD><EFBFBD>״̬(<28><><EFBFBD><EFBFBD>̬<EFBFBD><CCAC>ĩβͳһ<CDB3><D2BB>ֻ<EFBFBD><D6BB>)
|
|
|
|
|
|
SetCraftFieldsReadOnly(False);
|
2026-09-11 10:45:49 +08:00
|
|
|
|
|
|
|
|
|
|
with ADOQueryTemp do
|
|
|
|
|
|
begin
|
|
|
|
|
|
Close;
|
|
|
|
|
|
SQL.Clear;
|
|
|
|
|
|
SQL.Add('select * from BS_Cloth_Info where BCIID=''' + Trim(FBCIID) + '''');
|
|
|
|
|
|
Open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
2026-10-19 17:25:11 +08:00
|
|
|
|
//<2F>Ƿ<EFBFBD><C7B7>Ѱ<D1B0><F3B6A8B9><EFBFBD>
|
|
|
|
|
|
FBound := Trim(ADOQueryTemp.fieldbyname('CRID').AsString) <> '';
|
|
|
|
|
|
|
2026-10-10 17:25:31 +08:00
|
|
|
|
//memo fields on tab sheets are not reached by SCSHData, load manually
|
|
|
|
|
|
warp_arrange.Text := Trim(ADOQueryTemp.fieldbyname('warp_arrange').AsString);
|
|
|
|
|
|
weft_arrange.Text := Trim(ADOQueryTemp.fieldbyname('weft_arrange').AsString);
|
|
|
|
|
|
reed_weave_method.Text := Trim(ADOQueryTemp.fieldbyname('reed_weave_method').AsString);
|
2026-10-12 17:23:40 +08:00
|
|
|
|
threading_method.Text := Trim(ADOQueryTemp.fieldbyname('threading_method').AsString);
|
|
|
|
|
|
lifting_method.Text := Trim(ADOQueryTemp.fieldbyname('lifting_method').AsString);
|
2026-09-11 10:45:49 +08:00
|
|
|
|
SCSHData(ADOQueryTemp, ScrollBox1, 2);
|
|
|
|
|
|
SCSHData(ADOQueryTemp, ScrollBox1, 0);
|
|
|
|
|
|
with ADOQueryTemp do
|
|
|
|
|
|
begin
|
|
|
|
|
|
Close;
|
|
|
|
|
|
SQL.Clear;
|
|
|
|
|
|
SQL.Add('select * from BS_Cloth_Info_WB where BCIID=''' + Trim(FBCIID) + '''');
|
|
|
|
|
|
Open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
SCSHData(ADOQueryTemp, PANEL7, 2);
|
|
|
|
|
|
|
|
|
|
|
|
with ADOQueryTemp do
|
|
|
|
|
|
begin
|
|
|
|
|
|
Close;
|
|
|
|
|
|
sql.Clear;
|
|
|
|
|
|
sql.Add('select A.* from BS_Cloth_Yarn A ');
|
|
|
|
|
|
sql.Add(' where YRType=''<27><>˿'' and A.BCIID=''' + Trim(FBCIID) + '''');
|
|
|
|
|
|
Open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
SCreateCDS(ADOQueryTemp, CDS_1);
|
|
|
|
|
|
SInitCDSData(ADOQueryTemp, CDS_1);
|
|
|
|
|
|
with ADOQueryTemp do
|
|
|
|
|
|
begin
|
|
|
|
|
|
Close;
|
|
|
|
|
|
sql.Clear;
|
|
|
|
|
|
sql.Add('select A.* from BS_Cloth_Yarn A ');
|
|
|
|
|
|
sql.Add(' where YRType=''γ˿'' and A.BCIID=''' + Trim(FBCIID) + '''');
|
|
|
|
|
|
Open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
SCreateCDS(ADOQueryTemp, CDS_2);
|
|
|
|
|
|
SInitCDSData(ADOQueryTemp, CDS_2);
|
|
|
|
|
|
|
|
|
|
|
|
with ADOQueryTemp do
|
|
|
|
|
|
begin
|
|
|
|
|
|
Close;
|
|
|
|
|
|
sql.Clear;
|
|
|
|
|
|
sql.Add('select A.* from Bs_cloth_info_qz A ');
|
|
|
|
|
|
sql.Add(' where A.BCIID=''' + Trim(FBCIID) + '''');
|
|
|
|
|
|
Open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
SCreateCDS(ADOQueryTemp, CDS_3);
|
|
|
|
|
|
SInitCDSData(ADOQueryTemp, CDS_3);
|
2026-10-19 17:25:11 +08:00
|
|
|
|
|
|
|
|
|
|
//<2F><EFBFBD><F3B6A8B9>պ<EFBFBD>:<3A><><EFBFBD>չ<EFBFBD>Ͻ<EFBFBD>ֶ<EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<2F><><EFBFBD>ذ<EFBFBD>ťȫ<C5A5><C8AB>ֻ<EFBFBD><D6BB>
|
|
|
|
|
|
SetCraftFieldsReadOnly(FBound);
|
|
|
|
|
|
TV1.OptionsData.Editing := not FBound;
|
|
|
|
|
|
Tv2.OptionsData.Editing := not FBound;
|
|
|
|
|
|
ToolButton2.Enabled := not FBound;
|
|
|
|
|
|
ToolButton3.Enabled := not FBound;
|
|
|
|
|
|
ToolButton4.Enabled := not FBound;
|
|
|
|
|
|
ToolButton5.Enabled := not FBound;
|
|
|
|
|
|
ToolButton7.Enabled := not FBound;
|
|
|
|
|
|
ToolButton8.Enabled := not FBound;
|
2026-09-11 10:45:49 +08:00
|
|
|
|
end;
|
|
|
|
|
|
|
2026-10-10 17:25:31 +08:00
|
|
|
|
procedure TfrmTatClothInfoInput.AddPresetYarnRows(ACDS: TClientDataSet);
|
|
|
|
|
|
const
|
|
|
|
|
|
CSeq: array[0..5] of string = ('<27><>', '<27><>', '<27><>', '<27><>', '<27><>', '<27><>');
|
|
|
|
|
|
var
|
|
|
|
|
|
i: Integer;
|
|
|
|
|
|
begin
|
|
|
|
|
|
for i := 0 to 5 do
|
|
|
|
|
|
begin
|
|
|
|
|
|
ACDS.Append;
|
|
|
|
|
|
ACDS.FieldByName('seq_no').Value := CSeq[i];
|
|
|
|
|
|
ACDS.Post;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
2026-10-19 17:25:11 +08:00
|
|
|
|
procedure TfrmTatClothInfoInput.SetCraftFieldsReadOnly(AReadOnly: Boolean);
|
|
|
|
|
|
var
|
|
|
|
|
|
i: Integer;
|
|
|
|
|
|
begin
|
|
|
|
|
|
//<2F><EFBFBD><F3B6A8B9>պ<EFBFBD>,<2C><><EFBFBD>չ<EFBFBD>Ͻ<EFBFBD>ֶ<EFBFBD>ֻ<EFBFBD><D6BB>չʾ:
|
|
|
|
|
|
//Tag<61><67>2/0<><30><EFBFBD>л<EFBFBD>,ʹRTSetsavedata<74><61><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒʱ<C6B7>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Щ<EFBFBD>ؼ<EFBFBD>;<3B><><EFBFBD>÷<EFBFBD><C3B7>ֹ<EFBFBD><D6B9>༭
|
|
|
|
|
|
if AReadOnly then
|
|
|
|
|
|
begin
|
|
|
|
|
|
C_Width.Tag := 0;
|
|
|
|
|
|
C_GramWeight.Tag := 0;
|
|
|
|
|
|
C_Color.Tag := 0;
|
|
|
|
|
|
C_YarnQty.Tag := 0;
|
|
|
|
|
|
head_count.Tag := 0;
|
|
|
|
|
|
strip_width.Tag := 0;
|
|
|
|
|
|
C_MachLatitudeDensity.Tag := 0;
|
|
|
|
|
|
row_count_top.Tag := 0;
|
|
|
|
|
|
displace.Tag := 0;
|
|
|
|
|
|
reed_width.Tag := 0;
|
|
|
|
|
|
C_ReedNo.Tag := 0;
|
|
|
|
|
|
|
|
|
|
|
|
C_Width.Enabled := False;
|
|
|
|
|
|
C_GramWeight.Enabled := False;
|
|
|
|
|
|
C_Color.Enabled := False;
|
|
|
|
|
|
C_YarnQty.Enabled := False;
|
|
|
|
|
|
head_count.Enabled := False;
|
|
|
|
|
|
strip_width.Enabled := False;
|
|
|
|
|
|
C_MachLatitudeDensity.Enabled := False;
|
|
|
|
|
|
row_count_top.Enabled := False;
|
|
|
|
|
|
displace.Enabled := False;
|
|
|
|
|
|
reed_width.Enabled := False;
|
|
|
|
|
|
C_ReedNo.Enabled := False;
|
|
|
|
|
|
|
|
|
|
|
|
warp_arrange.ReadOnly := True;
|
|
|
|
|
|
weft_arrange.ReadOnly := True;
|
|
|
|
|
|
threading_method.ReadOnly := True;
|
|
|
|
|
|
|
|
|
|
|
|
for i := 0 to Panel7.ControlCount - 1 do
|
|
|
|
|
|
if Panel7.Controls[i] is TEdit then
|
|
|
|
|
|
Panel7.Controls[i].Enabled := False;
|
|
|
|
|
|
end
|
|
|
|
|
|
else
|
|
|
|
|
|
begin
|
|
|
|
|
|
C_Width.Tag := 2;
|
|
|
|
|
|
C_GramWeight.Tag := 2;
|
|
|
|
|
|
C_Color.Tag := 2;
|
|
|
|
|
|
C_YarnQty.Tag := 2;
|
|
|
|
|
|
head_count.Tag := 2;
|
|
|
|
|
|
strip_width.Tag := 2;
|
|
|
|
|
|
C_MachLatitudeDensity.Tag := 2;
|
|
|
|
|
|
row_count_top.Tag := 2;
|
|
|
|
|
|
displace.Tag := 2;
|
|
|
|
|
|
reed_width.Tag := 2;
|
|
|
|
|
|
C_ReedNo.Tag := 2;
|
|
|
|
|
|
|
|
|
|
|
|
C_Width.Enabled := True;
|
|
|
|
|
|
C_GramWeight.Enabled := True;
|
|
|
|
|
|
C_Color.Enabled := True;
|
|
|
|
|
|
C_YarnQty.Enabled := True;
|
|
|
|
|
|
head_count.Enabled := True;
|
|
|
|
|
|
strip_width.Enabled := True;
|
|
|
|
|
|
C_MachLatitudeDensity.Enabled := True;
|
|
|
|
|
|
row_count_top.Enabled := True;
|
|
|
|
|
|
displace.Enabled := True;
|
|
|
|
|
|
reed_width.Enabled := True;
|
|
|
|
|
|
C_ReedNo.Enabled := True;
|
|
|
|
|
|
|
|
|
|
|
|
warp_arrange.ReadOnly := False;
|
|
|
|
|
|
weft_arrange.ReadOnly := False;
|
|
|
|
|
|
threading_method.ReadOnly := False;
|
|
|
|
|
|
|
|
|
|
|
|
for i := 0 to Panel7.ControlCount - 1 do
|
|
|
|
|
|
if Panel7.Controls[i] is TEdit then
|
|
|
|
|
|
Panel7.Controls[i].Enabled := True;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
2026-09-11 10:45:49 +08:00
|
|
|
|
procedure TfrmTatClothInfoInput.FormShow(Sender: TObject);
|
|
|
|
|
|
begin
|
2026-09-28 17:25:53 +08:00
|
|
|
|
inherited;
|
|
|
|
|
|
ReadCxGrid(self.Caption + 'TV1', Tv1, '<27><>ɴ<EFBFBD><C9B4><EFBFBD><EFBFBD>');
|
|
|
|
|
|
ReadCxGrid(self.Caption + 'TV2', Tv2, 'γɴ<CEB3><C9B4><EFBFBD><EFBFBD>');
|
2026-09-11 10:45:49 +08:00
|
|
|
|
InitGrid();
|
|
|
|
|
|
if CopyInt = 1 then
|
|
|
|
|
|
begin
|
|
|
|
|
|
FBCIID := '';
|
|
|
|
|
|
BCIID.text := '';
|
|
|
|
|
|
C_Code.text := '';
|
2026-10-19 17:25:11 +08:00
|
|
|
|
//<2F><><EFBFBD>Ƴ<EFBFBD><C6B3><EFBFBD><EFBFBD>²<EFBFBD>Ʒ<EFBFBD><C6B7>Ϊδ<CEAA><CEB4><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5>Ϊ<EFBFBD><CEAA>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>ճ<EFBFBD><D5B3><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
FBound := False;
|
|
|
|
|
|
SetCraftFieldsReadOnly(False);
|
|
|
|
|
|
TV1.OptionsData.Editing := True;
|
|
|
|
|
|
Tv2.OptionsData.Editing := True;
|
2026-09-11 10:45:49 +08:00
|
|
|
|
ClearCDSColumn(CDS_2, ['YRId', 'bciid']);
|
|
|
|
|
|
ClearCDSColumn(CDS_1, ['YRId', 'bciid']);
|
|
|
|
|
|
ClearCDSColumn(CDS_3, ['QZID', 'bciid']);
|
|
|
|
|
|
end;
|
|
|
|
|
|
// if C_Code.text = '' then
|
|
|
|
|
|
// begin
|
|
|
|
|
|
// with ADOQueryTemp do
|
|
|
|
|
|
// begin
|
|
|
|
|
|
// Close;
|
|
|
|
|
|
// sql.Clear;
|
|
|
|
|
|
// sql.Add(' exec P_YP_Get_CPBH ');
|
|
|
|
|
|
// sql.Add('@CTID=' + quotedstr(Trim(FCTID)));
|
|
|
|
|
|
//
|
|
|
|
|
|
// Open;
|
|
|
|
|
|
// end;
|
|
|
|
|
|
// end;
|
|
|
|
|
|
// if trim(C_Code.Text) = '' then
|
|
|
|
|
|
// begin
|
|
|
|
|
|
// with ADOQueryTemp do
|
|
|
|
|
|
// begin
|
|
|
|
|
|
// Close;
|
|
|
|
|
|
// sql.Clear;
|
|
|
|
|
|
// sql.Add(' exec P_YP_Get_No @Str=''CP'' ');
|
|
|
|
|
|
// Open;
|
|
|
|
|
|
// end;
|
|
|
|
|
|
// C_Code.Text := trim(ADOQueryTemp.FieldByName('NewC_Code').asstring);
|
|
|
|
|
|
// end;
|
|
|
|
|
|
|
|
|
|
|
|
// if FCPName = '<27><>֯' then
|
|
|
|
|
|
// begin
|
|
|
|
|
|
// CYPUnit.text := 'KG';
|
|
|
|
|
|
// end;
|
|
|
|
|
|
// if FCPName = '<27><>֯' then
|
|
|
|
|
|
// begin
|
|
|
|
|
|
// CYPUnit.text := 'M';
|
|
|
|
|
|
// end;
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmTatClothInfoInput.TBCloseClick(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
Close;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
function TfrmTatClothInfoInput.SaveData(): Boolean;
|
|
|
|
|
|
var
|
|
|
|
|
|
maxId, maxpbno, QZMAXNO: string;
|
|
|
|
|
|
begin
|
|
|
|
|
|
try
|
|
|
|
|
|
ADOQueryCmd.Connection.BeginTrans;
|
|
|
|
|
|
if Trim(FBCIID) = '' then
|
|
|
|
|
|
begin
|
|
|
|
|
|
if GetLSNo(ADOQueryCmd, maxId, 'Y', 'BS_Cloth_Info', 4, 1) = False then
|
|
|
|
|
|
begin
|
|
|
|
|
|
Result := False;
|
|
|
|
|
|
ADOQueryCmd.Connection.RollbackTrans;
|
|
|
|
|
|
Application.MessageBox('ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>', '<27><>ʾ', 0);
|
|
|
|
|
|
Exit;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
BCIID.Text := trim(maxId);
|
|
|
|
|
|
end
|
|
|
|
|
|
else
|
|
|
|
|
|
begin
|
|
|
|
|
|
maxId := Trim(FBCIID);
|
|
|
|
|
|
end;
|
|
|
|
|
|
with ADOQueryCmd do
|
|
|
|
|
|
begin
|
|
|
|
|
|
Close;
|
|
|
|
|
|
SQL.Clear;
|
|
|
|
|
|
sql.Add('select * from BS_Cloth_Info where BCIID=''' + Trim(FBCIID) + '''');
|
|
|
|
|
|
Open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
with ADOQueryCmd do
|
|
|
|
|
|
begin
|
|
|
|
|
|
if Trim(FBCIID) = '' then
|
|
|
|
|
|
begin
|
|
|
|
|
|
Append;
|
|
|
|
|
|
FieldByName('CTID').Value := Trim(FCTID);
|
|
|
|
|
|
FieldByName('FILLID').Value := Trim(DCode);
|
|
|
|
|
|
FieldByName('FILLER').Value := Trim(DName);
|
|
|
|
|
|
FieldByName('FILLTIME').Value := SGetServerDateTime(ADOQueryTemp);
|
|
|
|
|
|
end
|
|
|
|
|
|
else
|
|
|
|
|
|
begin
|
|
|
|
|
|
Edit;
|
|
|
|
|
|
FieldByName('EDITER').Value := Trim(DName);
|
|
|
|
|
|
FieldByName('EDITTIME').Value := SGetServerDateTime(ADOQueryTemp);
|
|
|
|
|
|
end;
|
|
|
|
|
|
FieldByName('BCIID').Value := Trim(maxId);
|
|
|
|
|
|
if trim(C_Code.Text) = '' then
|
|
|
|
|
|
C_Code.Text := Trim(maxId);
|
|
|
|
|
|
RTSetsavedata(ADOQueryCmd, 'BS_Cloth_Info', ScrollBox1, 2);
|
2026-10-10 17:25:31 +08:00
|
|
|
|
//memo fields on tab sheets, save manually
|
2026-10-19 17:25:11 +08:00
|
|
|
|
if not FBound then
|
|
|
|
|
|
begin
|
|
|
|
|
|
if Trim(warp_arrange.Text) = '' then
|
|
|
|
|
|
ADOQueryCmd.FieldByName('warp_arrange').Value := null
|
|
|
|
|
|
else
|
|
|
|
|
|
ADOQueryCmd.FieldByName('warp_arrange').Value := Trim(warp_arrange.Text);
|
|
|
|
|
|
if Trim(weft_arrange.Text) = '' then
|
|
|
|
|
|
ADOQueryCmd.FieldByName('weft_arrange').Value := null
|
|
|
|
|
|
else
|
|
|
|
|
|
ADOQueryCmd.FieldByName('weft_arrange').Value := Trim(weft_arrange.Text);
|
|
|
|
|
|
end;
|
2026-10-10 17:25:31 +08:00
|
|
|
|
if Trim(reed_weave_method.Text) = '' then
|
|
|
|
|
|
ADOQueryCmd.FieldByName('reed_weave_method').Value := null
|
|
|
|
|
|
else
|
|
|
|
|
|
ADOQueryCmd.FieldByName('reed_weave_method').Value := Trim(reed_weave_method.Text);
|
2026-10-19 17:25:11 +08:00
|
|
|
|
if not FBound then
|
|
|
|
|
|
begin
|
|
|
|
|
|
if Trim(threading_method.Text) = '' then
|
|
|
|
|
|
ADOQueryCmd.FieldByName('threading_method').Value := null
|
|
|
|
|
|
else
|
|
|
|
|
|
ADOQueryCmd.FieldByName('threading_method').Value := Trim(threading_method.Text);
|
|
|
|
|
|
end;
|
2026-10-12 17:23:40 +08:00
|
|
|
|
if Trim(lifting_method.Text) = '' then
|
|
|
|
|
|
ADOQueryCmd.FieldByName('lifting_method').Value := null
|
|
|
|
|
|
else
|
|
|
|
|
|
ADOQueryCmd.FieldByName('lifting_method').Value := Trim(lifting_method.Text);
|
2026-09-11 10:45:49 +08:00
|
|
|
|
Post;
|
|
|
|
|
|
end;
|
|
|
|
|
|
with ADOQueryTemp do
|
|
|
|
|
|
begin
|
|
|
|
|
|
Close;
|
|
|
|
|
|
sql.Clear;
|
|
|
|
|
|
sql.Add('select count(*) as AA from BS_Cloth_Info where C_Code=''' + Trim(C_Code.Text) + '''');
|
|
|
|
|
|
Open;
|
|
|
|
|
|
if FieldByName('AA').AsInteger > 1 then
|
|
|
|
|
|
begin
|
|
|
|
|
|
ADOQueryCmd.Connection.RollbackTrans;
|
|
|
|
|
|
Result := False;
|
|
|
|
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD>', '<27><>ʾ', 0);
|
|
|
|
|
|
Exit;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
////////////////////////// <20><><EFBFBD><EFBFBD><EFBFBD>ư<EFBFBD>ͼ //////////////////////////
|
2026-10-19 17:25:11 +08:00
|
|
|
|
if not FBound then
|
|
|
|
|
|
begin
|
2026-09-11 10:45:49 +08:00
|
|
|
|
with ADOQueryCmd do
|
|
|
|
|
|
begin
|
|
|
|
|
|
Close;
|
|
|
|
|
|
SQL.Clear;
|
|
|
|
|
|
sql.Add('select * from Bs_Cloth_Info_WB where BCIID=''' + Trim(FBCIID) + '''');
|
|
|
|
|
|
Open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
with ADOQueryCmd do
|
|
|
|
|
|
begin
|
|
|
|
|
|
if Trim(FBCIID) = '' then
|
|
|
|
|
|
begin
|
|
|
|
|
|
Append;
|
|
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
else
|
|
|
|
|
|
begin
|
|
|
|
|
|
Edit;
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
FieldByName('BCIID').Value := Trim(maxId);
|
|
|
|
|
|
|
|
|
|
|
|
RTSetsavedata(ADOQueryCmd, 'Bs_Cloth_Info_WB', Panel7, 2);
|
|
|
|
|
|
Post;
|
|
|
|
|
|
end;
|
2026-10-19 17:25:11 +08:00
|
|
|
|
end;
|
2026-09-11 10:45:49 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
////////////////////////// <20><><EFBFBD><EFBFBD><EFBFBD>ư<EFBFBD>ͼ //////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
////////////////////////// <20><><EFBFBD>澭˿<E6BEAD><CBBF><EFBFBD>ȱ<EFBFBD> //////////////////////////
|
2026-10-19 17:25:11 +08:00
|
|
|
|
if not FBound then
|
|
|
|
|
|
begin
|
2026-09-11 10:45:49 +08:00
|
|
|
|
with CDS_1 do
|
|
|
|
|
|
begin
|
|
|
|
|
|
First;
|
|
|
|
|
|
while not Eof do
|
|
|
|
|
|
begin
|
|
|
|
|
|
if Trim(CDS_1.fieldbyname('YRId').AsString) = '' then
|
|
|
|
|
|
begin
|
|
|
|
|
|
if GetLSNo(ADOQueryTemp, maxpbno, 'RJ', 'BS_Cloth_Yarn', 4, 1) = False then
|
|
|
|
|
|
begin
|
|
|
|
|
|
ADOQueryCmd.Connection.RollbackTrans;
|
|
|
|
|
|
Application.MessageBox('ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˮ<EFBFBD><CBAE>ʧ<EFBFBD>ܣ<EFBFBD>', '<27><>ʾ', 0);
|
|
|
|
|
|
Exit;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end
|
|
|
|
|
|
else
|
|
|
|
|
|
begin
|
|
|
|
|
|
maxpbno := Trim(CDS_1.fieldbyname('YRId').AsString);
|
|
|
|
|
|
end;
|
|
|
|
|
|
with ADOQueryCmd do
|
|
|
|
|
|
begin
|
|
|
|
|
|
Close;
|
|
|
|
|
|
SQL.Clear;
|
|
|
|
|
|
sql.Add('select * from BS_Cloth_Yarn where ');
|
|
|
|
|
|
sql.Add(' YRId=''' + Trim(maxpbno) + '''');
|
|
|
|
|
|
Open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
with ADOQueryCmd do
|
|
|
|
|
|
begin
|
|
|
|
|
|
if Trim(CDS_1.fieldbyname('YRId').AsString) = '' then
|
|
|
|
|
|
begin
|
|
|
|
|
|
Append;
|
|
|
|
|
|
FieldByName('Filler').Value := Trim(DName);
|
|
|
|
|
|
FieldByName('FillTime').Value := SGetServerDateTime(ADOQueryTemp);
|
|
|
|
|
|
end
|
|
|
|
|
|
else
|
|
|
|
|
|
begin
|
|
|
|
|
|
Edit;
|
|
|
|
|
|
FieldByName('Editer').Value := Trim(DName);
|
|
|
|
|
|
FieldByName('EditTime').Value := SGetServerDateTime(ADOQueryTemp);
|
|
|
|
|
|
end;
|
|
|
|
|
|
FieldByName('YRType').Value := '<27><>˿';
|
|
|
|
|
|
FieldByName('BCIID').Value := Trim(maxId);
|
|
|
|
|
|
FieldByName('YRId').Value := Trim(maxpbno);
|
|
|
|
|
|
RTSetSaveDataCDS(ADOQueryCmd, Tv2, CDS_1, 'BS_Cloth_Yarn', 0);
|
|
|
|
|
|
Post;
|
|
|
|
|
|
end;
|
|
|
|
|
|
CDS_1.Edit;
|
|
|
|
|
|
CDS_1.FieldByName('BCIID').Value := Trim(maxId);
|
|
|
|
|
|
CDS_1.FieldByName('YRId').Value := Trim(maxpbno);
|
|
|
|
|
|
|
|
|
|
|
|
Next;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
2026-10-19 17:25:11 +08:00
|
|
|
|
end;
|
2026-09-11 10:45:49 +08:00
|
|
|
|
////////////////////////// <20><><EFBFBD>澭˿<E6BEAD><CBBF><EFBFBD>ȱ<EFBFBD> //////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
////////////////////////// <20><><EFBFBD><EFBFBD>γ˿<CEB3><CBBF><EFBFBD>ȱ<EFBFBD> //////////////////////////
|
2026-10-19 17:25:11 +08:00
|
|
|
|
if not FBound then
|
|
|
|
|
|
begin
|
2026-09-11 10:45:49 +08:00
|
|
|
|
with CDS_2 do
|
|
|
|
|
|
begin
|
|
|
|
|
|
First;
|
|
|
|
|
|
while not Eof do
|
|
|
|
|
|
begin
|
|
|
|
|
|
if Trim(CDS_2.fieldbyname('YRId').AsString) = '' then
|
|
|
|
|
|
begin
|
|
|
|
|
|
if GetLSNo(ADOQueryTemp, maxpbno, 'RJ', 'BS_Cloth_Yarn', 4, 1) = False then
|
|
|
|
|
|
begin
|
|
|
|
|
|
ADOQueryCmd.Connection.RollbackTrans;
|
|
|
|
|
|
Application.MessageBox('ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˮ<EFBFBD><CBAE>ʧ<EFBFBD>ܣ<EFBFBD>', '<27><>ʾ', 0);
|
|
|
|
|
|
Exit;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end
|
|
|
|
|
|
else
|
|
|
|
|
|
begin
|
|
|
|
|
|
maxpbno := Trim(CDS_2.fieldbyname('YRId').AsString);
|
|
|
|
|
|
end;
|
|
|
|
|
|
with ADOQueryCmd do
|
|
|
|
|
|
begin
|
|
|
|
|
|
Close;
|
|
|
|
|
|
SQL.Clear;
|
|
|
|
|
|
sql.Add('select * from BS_Cloth_Yarn where ');
|
|
|
|
|
|
sql.Add(' YRId=''' + Trim(maxpbno) + '''');
|
|
|
|
|
|
Open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
with ADOQueryCmd do
|
|
|
|
|
|
begin
|
|
|
|
|
|
if Trim(CDS_2.fieldbyname('YRId').AsString) = '' then
|
|
|
|
|
|
begin
|
|
|
|
|
|
Append;
|
|
|
|
|
|
FieldByName('Filler').Value := Trim(DName);
|
|
|
|
|
|
FieldByName('FillTime').Value := SGetServerDateTime(ADOQueryTemp);
|
|
|
|
|
|
end
|
|
|
|
|
|
else
|
|
|
|
|
|
begin
|
|
|
|
|
|
Edit;
|
|
|
|
|
|
FieldByName('Editer').Value := Trim(DName);
|
|
|
|
|
|
FieldByName('EditTime').Value := SGetServerDateTime(ADOQueryTemp);
|
|
|
|
|
|
end;
|
|
|
|
|
|
FieldByName('YRType').Value := 'γ˿';
|
|
|
|
|
|
FieldByName('BCIID').Value := Trim(maxId);
|
|
|
|
|
|
FieldByName('YRId').Value := Trim(maxpbno);
|
|
|
|
|
|
RTSetSaveDataCDS(ADOQueryCmd, Tv2, CDS_2, 'BS_Cloth_Yarn', 0);
|
|
|
|
|
|
Post;
|
|
|
|
|
|
end;
|
|
|
|
|
|
CDS_2.Edit;
|
|
|
|
|
|
CDS_2.FieldByName('BCIID').Value := Trim(maxId);
|
|
|
|
|
|
CDS_2.FieldByName('YRId').Value := Trim(maxpbno);
|
|
|
|
|
|
|
|
|
|
|
|
Next;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
2026-10-19 17:25:11 +08:00
|
|
|
|
end;
|
2026-09-11 10:45:49 +08:00
|
|
|
|
////////////////////////// <20><><EFBFBD><EFBFBD>γ˿<CEB3><CBBF><EFBFBD>ȱ<EFBFBD> //////////////////////////
|
|
|
|
|
|
///
|
|
|
|
|
|
///
|
|
|
|
|
|
///
|
|
|
|
|
|
///
|
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>۹<EFBFBD><DBB9>յ<EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
with CDS_3 do
|
|
|
|
|
|
begin
|
|
|
|
|
|
First;
|
|
|
|
|
|
while not Eof do
|
|
|
|
|
|
begin
|
|
|
|
|
|
if Trim(CDS_3.fieldbyname('QZID').AsString) = '' then
|
|
|
|
|
|
begin
|
|
|
|
|
|
if GetLSNo(ADOQueryTemp, QZMAXNO, 'QZ', 'Bs_cloth_info_qz', 4, 1) = False then
|
|
|
|
|
|
begin
|
|
|
|
|
|
ADOQueryCmd.Connection.RollbackTrans;
|
|
|
|
|
|
Application.MessageBox('ȡ<><C8A1><EFBFBD><EFBFBD>ˮ<EFBFBD><CBAE>ʧ<EFBFBD>ܣ<EFBFBD>', '<27><>ʾ', 0);
|
|
|
|
|
|
Exit;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end
|
|
|
|
|
|
else
|
|
|
|
|
|
begin
|
|
|
|
|
|
QZMAXNO := Trim(CDS_3.fieldbyname('QZID').AsString);
|
|
|
|
|
|
end;
|
|
|
|
|
|
with ADOQueryCmd do
|
|
|
|
|
|
begin
|
|
|
|
|
|
Close;
|
|
|
|
|
|
SQL.Clear;
|
|
|
|
|
|
sql.Add('select * from Bs_cloth_info_qz where QZID=''' + Trim(QZMAXNO) + '''');
|
|
|
|
|
|
Open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
with ADOQueryCmd do
|
|
|
|
|
|
begin
|
|
|
|
|
|
if Trim(CDS_3.fieldbyname('QZID').AsString) = '' then
|
|
|
|
|
|
Append
|
|
|
|
|
|
else
|
|
|
|
|
|
Edit;
|
|
|
|
|
|
FieldByName('BCIID').Value := Trim(maxId);
|
|
|
|
|
|
|
|
|
|
|
|
FieldByName('QZID').Value := Trim(QZMAXNO);
|
|
|
|
|
|
RTSetSaveDataCDS(ADOQueryCmd, Tv3, CDS_3, 'Bs_cloth_info_qz', 0);
|
|
|
|
|
|
Post;
|
|
|
|
|
|
end;
|
|
|
|
|
|
CDS_3.Edit;
|
|
|
|
|
|
CDS_3.FieldByName('QZID').Value := Trim(QZMAXNO);
|
|
|
|
|
|
|
|
|
|
|
|
Next;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
/// ////////////////////////// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>۹<EFBFBD><DBB9>յ<EFBFBD> //////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
ADOQueryCmd.Connection.CommitTrans;
|
|
|
|
|
|
FBCIID := maxId;
|
|
|
|
|
|
Result := True;
|
|
|
|
|
|
except
|
|
|
|
|
|
Result := False;
|
|
|
|
|
|
ADOQueryCmd.Connection.RollbackTrans;
|
|
|
|
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>!', '<27><>ʾ', 0);
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmTatClothInfoInput.CYJGGYBtnDnClick(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
TBtnEditC(Sender).Text := '';
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmTatClothInfoInput.ToolButton1Click(Sender: TObject);
|
|
|
|
|
|
var
|
|
|
|
|
|
MC_Code: string;
|
|
|
|
|
|
begin
|
|
|
|
|
|
C_Name.SetFocus;
|
|
|
|
|
|
if C_Name.Text = '' then
|
|
|
|
|
|
begin
|
|
|
|
|
|
Application.MessageBox('<27><>Ʒ<EFBFBD><C6B7><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>', '<27><>ʾ', 0);
|
|
|
|
|
|
Exit;
|
|
|
|
|
|
end;
|
|
|
|
|
|
if trim(C_Code.Text) = '' then
|
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
|
|
if GetLSNo(ADOQueryCmd, MC_Code, 'C', 'BS_Cloth_Info', 4, 0) = False then
|
|
|
|
|
|
begin
|
|
|
|
|
|
Application.MessageBox('ȡ<><C8A1><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>!', '<27><>ʾ', 0);
|
|
|
|
|
|
Exit;
|
|
|
|
|
|
end;
|
|
|
|
|
|
C_Code.Text := MC_Code;
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
2026-10-12 17:23:40 +08:00
|
|
|
|
// CALCYarnQty();
|
2026-09-11 10:45:49 +08:00
|
|
|
|
if SaveData() then
|
|
|
|
|
|
begin
|
|
|
|
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD>', '<27><>ʾ', 0);
|
|
|
|
|
|
ModalResult := 1;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmTatClothInfoInput.ToolButton2Click(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
// try
|
|
|
|
|
|
// frmYarnInfoSel := TfrmYarnInfoSel.Create(Application);
|
|
|
|
|
|
// with frmYarnInfoSel do
|
|
|
|
|
|
// begin
|
|
|
|
|
|
// if ShowModal = 1 then
|
|
|
|
|
|
// begin
|
|
|
|
|
|
// with self.CDS_1 do
|
|
|
|
|
|
// begin
|
|
|
|
|
|
// Append;
|
|
|
|
|
|
// FieldByName('Brand').Value := frmYarnInfoSel.CDS_1.fieldbyname('Brand').Value;
|
|
|
|
|
|
// FieldByName('Y_Code').Value := frmYarnInfoSel.CDS_1.fieldbyname('Y_Code').Value;
|
|
|
|
|
|
// FieldByName('Y_Name').Value := frmYarnInfoSel.CDS_1.fieldbyname('Y_Name').Value;
|
|
|
|
|
|
// FieldByName('Y_Spec').Value := frmYarnInfoSel.CDS_1.fieldbyname('Y_Spec').Value;
|
|
|
|
|
|
// FieldByName('Y_Color').Value := frmYarnInfoSel.CDS_1.fieldbyname('Y_Color').Value;
|
|
|
|
|
|
// FieldByName('Denier').Value := frmYarnInfoSel.CDS_1.fieldbyname('Denier').Value;
|
|
|
|
|
|
// FieldByName('Y_Ratio').Value := 0;
|
|
|
|
|
|
// Post;
|
|
|
|
|
|
// end;
|
|
|
|
|
|
//
|
|
|
|
|
|
// end;
|
|
|
|
|
|
// end;
|
|
|
|
|
|
// finally
|
|
|
|
|
|
// frmYarnInfoSel.Free;
|
|
|
|
|
|
// end;
|
|
|
|
|
|
|
2026-10-13 17:29:49 +08:00
|
|
|
|
//<2F><><EFBFBD>й̶<D0B9><CCB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ұ<EFBFBD><D2B1><EFBFBD><EFBFBD>켺<EFBFBD><ECBCBA><EFBFBD>У<EFBFBD><D0A3><EFBFBD><EFBFBD>۱<EFBFBD><DBB1><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD>
|
|
|
|
|
|
AddPresetYarnRows(CDS_1);
|
2026-09-11 10:45:49 +08:00
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmTatClothInfoInput.ToolButton3Click(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
if CDS_1.IsEmpty then
|
|
|
|
|
|
Exit;
|
|
|
|
|
|
if Trim(CDS_1.fieldbyname('YRId').AsString) <> '' then
|
|
|
|
|
|
begin
|
|
|
|
|
|
if Application.MessageBox('ȷ<><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ', 32 + 4) <> IDYES then
|
|
|
|
|
|
Exit;
|
|
|
|
|
|
with ADOQueryCmd do
|
|
|
|
|
|
begin
|
|
|
|
|
|
Close;
|
|
|
|
|
|
sql.Clear;
|
|
|
|
|
|
sql.Add('delete BS_Cloth_Yarn where YRId=''' + Trim(CDS_1.fieldbyname('YRId').AsString) + '''');
|
|
|
|
|
|
ExecSQL;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
CDS_1.Delete;
|
2026-10-13 17:29:49 +08:00
|
|
|
|
CalcGramWeight();
|
2026-09-11 10:45:49 +08:00
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmTatClothInfoInput.ToolButton4Click(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
// try
|
|
|
|
|
|
// frmYarnInfoSel := TfrmYarnInfoSel.Create(Application);
|
|
|
|
|
|
// with frmYarnInfoSel do
|
|
|
|
|
|
// begin
|
|
|
|
|
|
// if ShowModal = 1 then
|
|
|
|
|
|
// begin
|
|
|
|
|
|
// with self.CDS_2 do
|
|
|
|
|
|
// begin
|
|
|
|
|
|
// Append;
|
|
|
|
|
|
// FieldByName('Brand').Value := frmYarnInfoSel.CDS_1.fieldbyname('Brand').Value;
|
|
|
|
|
|
// FieldByName('Y_Code').Value := frmYarnInfoSel.CDS_1.fieldbyname('Y_Code').Value;
|
|
|
|
|
|
// FieldByName('Y_Name').Value := frmYarnInfoSel.CDS_1.fieldbyname('Y_Name').Value;
|
|
|
|
|
|
// FieldByName('Y_Spec').Value := frmYarnInfoSel.CDS_1.fieldbyname('Y_Spec').Value;
|
|
|
|
|
|
// FieldByName('Y_Color').Value := frmYarnInfoSel.CDS_1.fieldbyname('Y_Color').Value;
|
|
|
|
|
|
// FieldByName('Denier').Value := frmYarnInfoSel.CDS_1.fieldbyname('Denier').Value;
|
|
|
|
|
|
// FieldByName('Y_Ratio').Value := 0;
|
|
|
|
|
|
// Post;
|
|
|
|
|
|
// end;
|
|
|
|
|
|
// end;
|
|
|
|
|
|
// end;
|
|
|
|
|
|
// finally
|
|
|
|
|
|
// frmYarnInfoSel.Free;
|
|
|
|
|
|
// end;
|
|
|
|
|
|
|
2026-10-13 17:29:49 +08:00
|
|
|
|
//<2F><><EFBFBD>й̶<D0B9><CCB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ұ<EFBFBD><D2B1><EFBFBD><EFBFBD>켺<EFBFBD><ECBCBA><EFBFBD>У<EFBFBD><D0A3><EFBFBD><EFBFBD>۱<EFBFBD><DBB1><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD>
|
|
|
|
|
|
AddPresetYarnRows(CDS_2);
|
2026-09-11 10:45:49 +08:00
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmTatClothInfoInput.ToolButton5Click(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
C_Name.SetFocus;
|
|
|
|
|
|
CALCYarnQty();
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmTatClothInfoInput.CYColorKeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
|
begin
|
|
|
|
|
|
if Key = #13 then
|
|
|
|
|
|
begin
|
|
|
|
|
|
Key := #0;
|
|
|
|
|
|
SelectNext(ActiveControl as TWinControl, True, True);
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmTatClothInfoInput.CYKZExit(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
// if pos('G/M2', trim(CYKZ.Text)) = 0 then
|
|
|
|
|
|
// begin
|
|
|
|
|
|
// if pos('G/M', trim(CYKZ.Text)) = 0 then
|
|
|
|
|
|
// begin
|
|
|
|
|
|
// CYKZ.Text := trim(CYKZ.Text) + 'G/M2';
|
|
|
|
|
|
// end;
|
|
|
|
|
|
// end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmTatClothInfoInput.C_WidthBtnDnClick(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
TBtnEditC(Sender).Text := '';
|
|
|
|
|
|
TBtnEditC(Sender).TxtCode := '';
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmTatClothInfoInput.C_WidthBtnUpClick(Sender: TObject);
|
|
|
|
|
|
var
|
|
|
|
|
|
fsj: string;
|
|
|
|
|
|
FWZ: Integer;
|
|
|
|
|
|
begin
|
|
|
|
|
|
fsj := Trim(TEdit(Sender).Hint);
|
|
|
|
|
|
FWZ := Pos('/', fsj);
|
|
|
|
|
|
try
|
|
|
|
|
|
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
|
|
|
|
|
with frmZDYHelp do
|
|
|
|
|
|
begin
|
|
|
|
|
|
flag := Copy(fsj, 1, FWZ - 1);
|
|
|
|
|
|
flagname := Copy(fsj, FWZ + 1, Length(fsj) - FWZ);
|
|
|
|
|
|
if ShowModal = 1 then
|
|
|
|
|
|
begin
|
|
|
|
|
|
TEdit(Sender).Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
finally
|
|
|
|
|
|
frmZDYHelp.Free;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmTatClothInfoInput.Edit1KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
|
var
|
|
|
|
|
|
i, j: Integer;
|
|
|
|
|
|
begin
|
|
|
|
|
|
if Key = #13 then
|
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
|
|
begin
|
|
|
|
|
|
if Edit1.Text <> '' then
|
|
|
|
|
|
begin
|
|
|
|
|
|
i := CDS_3.RecordCount;
|
|
|
|
|
|
i := i + 1;
|
|
|
|
|
|
with CDS_3 do
|
|
|
|
|
|
begin
|
|
|
|
|
|
Append;
|
|
|
|
|
|
FieldByName('SSEL').Value := FALSE;
|
|
|
|
|
|
FieldByName('XuNO').Value := i;
|
|
|
|
|
|
FieldByName('DZZQZGL').Value := Trim(Edit1.Text);
|
|
|
|
|
|
Post;
|
|
|
|
|
|
end;
|
|
|
|
|
|
Edit1.Text := '';
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmTatClothInfoInput.CYMFExit(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
// if pos('"', trim(CYMF.Text)) = 0 then
|
|
|
|
|
|
// begin
|
|
|
|
|
|
// if pos('CM', trim(CYMF.Text)) = 0 then
|
|
|
|
|
|
// CYMF.Text := trim(CYMF.Text) + 'CM';
|
|
|
|
|
|
// end;
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmTatClothInfoInput.FormCreate(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
|
|
// LaYangDate.DateTime := SGetServerDateTime(ADOQueryTemp);
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmTatClothInfoInput.ToolButton6Click(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
if trim(C_Code.Text) = '' then
|
|
|
|
|
|
Exit;
|
|
|
|
|
|
try
|
|
|
|
|
|
frmAttachmentUpload := TfrmAttachmentUpload.Create(Application);
|
|
|
|
|
|
with frmAttachmentUpload do
|
|
|
|
|
|
begin
|
|
|
|
|
|
FEditAuthority := True;
|
|
|
|
|
|
fkeyNO := trim(C_Code.Text);
|
|
|
|
|
|
fType := '<27><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>';
|
|
|
|
|
|
if ShowModal = 1 then
|
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
finally
|
|
|
|
|
|
frmAttachmentUpload.Free;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmTatClothInfoInput.ToolButton7Click(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
if CDS_2.IsEmpty then
|
|
|
|
|
|
Exit;
|
|
|
|
|
|
if Trim(CDS_2.fieldbyname('YRId').AsString) <> '' then
|
|
|
|
|
|
begin
|
|
|
|
|
|
if Application.MessageBox('ȷ<><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ', 32 + 4) <> IDYES then
|
|
|
|
|
|
Exit;
|
|
|
|
|
|
with ADOQueryCmd do
|
|
|
|
|
|
begin
|
|
|
|
|
|
Close;
|
|
|
|
|
|
sql.Clear;
|
|
|
|
|
|
sql.Add('delete BS_Cloth_Yarn where YRId=''' + Trim(CDS_2.fieldbyname('YRId').AsString) + '''');
|
|
|
|
|
|
ExecSQL;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
CDS_2.Delete;
|
2026-10-13 17:29:49 +08:00
|
|
|
|
CalcGramWeight();
|
2026-09-11 10:45:49 +08:00
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmTatClothInfoInput.ToolButton8Click(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
C_Name.SetFocus;
|
|
|
|
|
|
CALCYarnQty();
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
2026-09-28 17:25:53 +08:00
|
|
|
|
procedure TfrmTatClothInfoInput.ToolButton9Click(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
|
|
inherited;
|
|
|
|
|
|
WriteCxGrid(self.Caption + 'TV1', Tv1, '<27><>ɴ<EFBFBD><C9B4><EFBFBD><EFBFBD>');
|
|
|
|
|
|
WriteCxGrid(self.Caption + 'TV2', Tv2, 'γɴ<CEB3><C9B4><EFBFBD><EFBFBD>');
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
2026-09-11 10:45:49 +08:00
|
|
|
|
end.
|
|
|
|
|
|
|