2025-07-05 10:17:25 +08:00
unit U_DyeProcessDefin;
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, cxCheckBox, cxDropDownEdit,
dxSkinBasic, dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel,
dxSkinCoffee, dxSkinDarkroom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast,
dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky,
dxSkinMcSkin, dxSkinMetropolis, dxSkinMetropolisDark, dxSkinMoneyTwins,
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinOffice2016Colorful,
dxSkinOffice2016Dark, dxSkinOffice2019Black, dxSkinOffice2019Colorful,
dxSkinOffice2019DarkGray, dxSkinOffice2019White, dxSkinPumpkin, dxSkinSeven,
dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus, dxSkinSilver,
dxSkinSpringtime, dxSkinStardust, dxSkinSummer2008, dxSkinTheAsphaltWorld,
dxSkinTheBezier, dxSkinValentine, dxSkinVisualStudio2013Blue,
dxSkinVisualStudio2013Dark, dxSkinVisualStudio2013Light, dxSkinVS2010,
dxSkinWhiteprint, dxSkinWXI, dxSkinXmas2008Blue, cxContainer, cxLabel, cxPC,
dxScrollbarAnnotations, cxMaskEdit, Vcl. Menus, cxButtons;
type
TfrmDyeProcessDefin = class( TForm)
ToolBar1: TToolBar;
TbSave: TToolButton;
TBClose: TToolButton;
ADOQueryCmd: TADOQuery;
ADOQueryTemp: TADOQuery;
TbUpFile: TToolButton;
CDS_1: TClientDataSet;
DS_1: TDataSource;
GPM_1: TcxGridPopupMenu;
cxPageControl1: TcxPageControl;
cxTabSheet2: TcxTabSheet;
2025-08-01 15:42:49 +08:00
DX: TcxTabSheet;
2025-07-05 10:17:25 +08:00
cxTabSheet4: TcxTabSheet;
cxTabSheet5: TcxTabSheet;
cxTabSheet6: TcxTabSheet;
Panel2: TPanel;
cxLabel10: TcxLabel;
cxLabel11: TcxLabel;
cxLabel12: TcxLabel;
cxLabel13: TcxLabel;
cxLabel14: TcxLabel;
cxLabel15: TcxLabel;
cxLabel16: TcxLabel;
cxLabel17: TcxLabel;
cxLabel18: TcxLabel;
cxLabel19: TcxLabel;
cxLabel20: TcxLabel;
cxLabel7: TcxLabel;
cxLabel8: TcxLabel;
cxLabel9: TcxLabel;
2025-08-01 15:42:49 +08:00
qx_WaterContentDQ: TcxTextEdit;
qx_Add_NameDQ: TcxTextEdit;
qx_speedDQ: TcxTextEdit;
qx_ReduceAmplitudeDQ: TcxTextEdit;
Panel_dx: TPanel;
2025-07-05 10:17:25 +08:00
cxLabel2: TcxLabel;
cxLabel21: TcxLabel;
cxLabel22: TcxLabel;
cxLabel23: TcxLabel;
cxLabel24: TcxLabel;
cxLabel25: TcxLabel;
cxLabel3: TcxLabel;
cxLabel4: TcxLabel;
cxLabel5: TcxLabel;
cxLabel55: TcxLabel;
cxLabel56: TcxLabel;
cxLabel57: TcxLabel;
cxLabel58: TcxLabel;
cxLabel6: TcxLabel;
cxLabel60: TcxLabel;
cxLabel61: TcxLabel;
cxLabel62: TcxLabel;
cxLabel63: TcxLabel;
cxLabel64: TcxLabel;
cxLabel65: TcxLabel;
dx_temperature1: TcxTextEdit;
dx_temperature5: TcxTextEdit;
dx_temperature9: TcxTextEdit;
dx_RosePower: TcxTextEdit;
2025-08-01 15:42:49 +08:00
dx_upperNeedle: TcxTextEdit;
2025-07-05 10:17:25 +08:00
dx_Precautions: TcxTextEdit;
dx_UpSuperRate: TcxTextEdit;
dx_speed: TcxTextEdit;
dx_TubePress: TcxTextEdit;
dx_temperature6: TcxTextEdit;
dx_DownSuperRate: TcxTextEdit;
dx_temperature3: TcxTextEdit;
dx_temperature4: TcxTextEdit;
dx_temperature7: TcxTextEdit;
dx_temperature8: TcxTextEdit;
dx_temperature10: TcxTextEdit;
dx_temperature2: TcxTextEdit;
Panel4: TPanel;
cxLabel100: TcxLabel;
cxLabel101: TcxLabel;
cxLabel102: TcxLabel;
cxLabel103: TcxLabel;
cxLabel104: TcxLabel;
cxLabel105: TcxLabel;
cxLabel106: TcxLabel;
cxLabel109: TcxLabel;
cxLabel110: TcxLabel;
cxLabel111: TcxLabel;
cxLabel82: TcxLabel;
cxLabel83: TcxLabel;
cxLabel84: TcxLabel;
cxLabel85: TcxLabel;
cxLabel86: TcxLabel;
cxLabel87: TcxLabel;
cxLabel88: TcxLabel;
cxLabel89: TcxLabel;
cxLabel90: TcxLabel;
cxLabel91: TcxLabel;
cxLabel92: TcxLabel;
cxLabel93: TcxLabel;
cxLabel94: TcxLabel;
cxLabel95: TcxLabel;
cxLabel96: TcxLabel;
cxLabel97: TcxLabel;
cxLabel98: TcxLabel;
cxLabel99: TcxLabel;
2025-08-01 15:42:49 +08:00
fs_OutFanSpeedDQ: TcxTextEdit;
fs_WidthAmplitudeDQ: TcxTextEdit;
fs_RosePowerDQ: TcxTextEdit;
fs_BrushSuperRateDQ: TcxTextEdit;
fs_UpSuperRateDQ: TcxTextEdit;
fs_speedDQ: TcxTextEdit;
fs_TubePressDQ: TcxTextEdit;
fs_CycleFanSpeedDQ: TcxTextEdit;
fs_DownSuperRateDQ: TcxTextEdit;
fs_CarPressDQ: TcxTextEdit;
fs_PressWaterContentDQ: TcxTextEdit;
2025-07-05 10:17:25 +08:00
Panel5: TPanel;
cxLabel107: TcxLabel;
cxLabel108: TcxLabel;
cxLabel112: TcxLabel;
cxLabel29: TcxLabel;
cxLabel30: TcxLabel;
cxLabel31: TcxLabel;
cxLabel32: TcxLabel;
cxLabel33: TcxLabel;
cxLabel34: TcxLabel;
cxLabel35: TcxLabel;
cxLabel36: TcxLabel;
cxLabel49: TcxLabel;
cxLabel50: TcxLabel;
cxLabel51: TcxLabel;
cxLabel52: TcxLabel;
cxLabel53: TcxLabel;
cxLabel54: TcxLabel;
cxLabel66: TcxLabel;
cxLabel67: TcxLabel;
cxLabel68: TcxLabel;
cxLabel69: TcxLabel;
cxLabel70: TcxLabel;
cxLabel71: TcxLabel;
cxLabel72: TcxLabel;
cxLabel73: TcxLabel;
cxLabel74: TcxLabel;
cxLabel75: TcxLabel;
cxLabel76: TcxLabel;
cxLabel77: TcxLabel;
cxLabel78: TcxLabel;
cxLabel79: TcxLabel;
cxLabel80: TcxLabel;
cxLabel81: TcxLabel;
2025-08-01 15:42:49 +08:00
fp_OutFanSpeedDQ: TcxTextEdit;
fp_WidthAmplitudeDQ: TcxTextEdit;
fp_RosePowerDQ: TcxTextEdit;
fp_BrushSuperRateDQ: TcxTextEdit;
fp_UpSuperRateDQ: TcxTextEdit;
fp_speedDQ: TcxTextEdit;
fp_TubePressDQ: TcxTextEdit;
fp_CycleFanSpeedDQ: TcxTextEdit;
fp_DownSuperRateDQ: TcxTextEdit;
fp_LeftHeightDQ: TcxTextEdit;
fp_RightHeightDQ: TcxTextEdit;
2025-07-05 10:17:25 +08:00
fp_PumbMixElectricFrequency: TcxTextEdit;
fp_SystemPress: TcxTextEdit;
fp_MixElectricFrequency: TcxTextEdit;
fp_GasFlow: TcxTextEdit;
Panel6: TPanel;
cxLabel116: TcxLabel;
cxLabel117: TcxLabel;
cxLabel118: TcxLabel;
cxLabel119: TcxLabel;
cxLabel120: TcxLabel;
cxLabel121: TcxLabel;
cxLabel122: TcxLabel;
cxLabel123: TcxLabel;
cxLabel124: TcxLabel;
cxLabel125: TcxLabel;
cxLabel126: TcxLabel;
cxLabel127: TcxLabel;
cxLabel128: TcxLabel;
cxLabel129: TcxLabel;
cxLabel130: TcxLabel;
cxLabel131: TcxLabel;
cxLabel132: TcxLabel;
cxLabel133: TcxLabel;
cxLabel134: TcxLabel;
cxLabel135: TcxLabel;
cxLabel136: TcxLabel;
cxLabel137: TcxLabel;
cxLabel138: TcxLabel;
cxLabel139: TcxLabel;
cxLabel140: TcxLabel;
cxLabel141: TcxLabel;
cxLabel142: TcxLabel;
cxLabel143: TcxLabel;
2025-08-01 15:42:49 +08:00
gj_WidthAmplitudeDQ: TcxTextEdit;
gj_RosePowerDQ: TcxTextEdit;
gj_BrushSuperRateDQ: TcxTextEdit;
gj_UpSuperRateDQ: TcxTextEdit;
gj_speedDQ: TcxTextEdit;
gj_TubePressDQ: TcxTextEdit;
gj_CycleFanSpeedDQ: TcxTextEdit;
gj_DownSuperRateDQ: TcxTextEdit;
gj_LeftHeightDQ: TcxTextEdit;
gj_RightHeightDQ: TcxTextEdit;
gj_OutFanSpeedDQ: TcxTextEdit;
2025-07-05 10:17:25 +08:00
cxtabsheet7: TcxTabSheet;
panel7: TPanel;
cxLabel115: TcxLabel;
cxLabel144: TcxLabel;
cxLabel145: TcxLabel;
cxLabel146: TcxLabel;
cxLabel147: TcxLabel;
cxLabel154: TcxLabel;
cxLabel155: TcxLabel;
cxLabel156: TcxLabel;
2025-08-01 15:42:49 +08:00
zm_inoutSpeedDQ: TcxTextEdit;
zm_needleDQ: TcxTextEdit;
zm_PrecautionsDQ: TcxTextEdit;
zm_frequencyDQ: TcxTextEdit;
zm_WidthAmplitudeDQ: TcxTextEdit;
2025-07-05 10:17:25 +08:00
cxLabel148: TcxLabel;
2025-08-01 15:42:49 +08:00
qx_Add_NumberDQ: TcxTextEdit;
2025-07-05 10:17:25 +08:00
cxLabel149: TcxLabel;
GPM_2: TcxGridPopupMenu;
DS_2: TDataSource;
cds_2: TClientDataSet;
GPM_3: TcxGridPopupMenu;
DS_3: TDataSource;
CDS_3: TClientDataSet;
2025-09-08 14:31:40 +08:00
GPM_4: TcxGridPopupMenu;
2025-07-05 10:17:25 +08:00
dx_RollMethod: TcxComboBox;
2025-08-01 15:42:49 +08:00
fs_UnpackingMethodDQ: TcxComboBox;
fs_OpenAmplitudeDQ: TcxComboBox;
fs_RollMethodDQ: TcxComboBox;
zm_UnpackingMethodDQ: TcxComboBox;
zm_RollMethodDQ: TcxComboBox;
2025-07-05 10:17:25 +08:00
cxLabel151: TcxLabel;
cxLabel152: TcxLabel;
cxLabel153: TcxLabel;
cxLabel157: TcxLabel;
cxLabel158: TcxLabel;
2025-08-01 15:42:49 +08:00
fs_meterDQ: TcxTextEdit;
fs_useGlubDQ: TcxTextEdit;
fs_waterDistributionDQ: TcxTextEdit;
fs_useOneGlubDQ: TcxTextEdit;
fs_useOneMeterDQ: TcxTextEdit;
2025-07-05 10:17:25 +08:00
cxLabel159: TcxLabel;
2025-08-01 15:42:49 +08:00
fp_useOneMeterDQ: TcxTextEdit;
2025-07-05 10:17:25 +08:00
cxLabel160: TcxLabel;
2025-08-01 15:42:49 +08:00
fp_useOneGlubDQ: TcxTextEdit;
2025-07-05 10:17:25 +08:00
cxLabel161: TcxLabel;
2025-08-01 15:42:49 +08:00
gj_useOneMeterDQ: TcxTextEdit;
2025-07-05 10:17:25 +08:00
cxLabel162: TcxLabel;
2025-08-01 15:42:49 +08:00
gj_useOneGlubDQ: TcxTextEdit;
qx_UnpackingMethodDQ: TcxComboBox;
qx_RollMethodDQ: TcxComboBox;
zm_wagClothDQ: TcxTextEdit;
fp_RollMethodDQ: TcxComboBox;
fp_UnpackingMethodDQ: TcxComboBox;
gj_RollMethodDQ: TcxComboBox;
gj_UnpackingMethodDQ: TcxComboBox;
fp_OpenAmplitudeDQ: TcxComboBox;
gj_OpenAmplitudeDQ: TcxComboBox;
TbDXReplace2: TcxButton;
TbDXClear2: TcxButton;
2025-07-05 10:17:25 +08:00
Panel1: TPanel;
PSName: TcxTextEdit;
cxLabel43: TcxLabel;
CDS_HZ: TClientDataSet;
DS_HZ: TDataSource;
Label5: TLabel;
WorkHour: TEdit;
Label2: TLabel;
MachineName: TEdit;
2025-07-09 16:55:19 +08:00
Label1: TLabel;
note: TEdit;
2025-08-01 15:42:49 +08:00
CCQX: TcxTabSheet;
RGQX: TcxTabSheet;
cxLabel174: TcxLabel;
dx_tubeTemper: TcxTextEdit;
cxLabel1: TcxLabel;
cxLabel28: TcxLabel;
cxLabel59: TcxLabel;
cxLabel175: TcxLabel;
cxLabel176: TcxLabel;
cxLabel177: TcxLabel;
cxLabel178: TcxLabel;
cxLabel179: TcxLabel;
cxLabel180: TcxLabel;
cxLabel181: TcxLabel;
cxLabel182: TcxLabel;
dx_hotWind1: TcxTextEdit;
dx_hotWind5: TcxTextEdit;
dx_hotWind9: TcxTextEdit;
dx_hotWind6: TcxTextEdit;
dx_hotWind3: TcxTextEdit;
dx_hotWind4: TcxTextEdit;
dx_hotWind7: TcxTextEdit;
dx_hotWind8: TcxTextEdit;
dx_hotWind10: TcxTextEdit;
dx_hotWind2: TcxTextEdit;
TbDXReplace1: TcxButton;
TbDXClear1: TcxButton;
cxLabel183: TcxLabel;
cxLabel184: TcxLabel;
cxLabel185: TcxLabel;
cxLabel186: TcxLabel;
cxLabel187: TcxLabel;
dx_rowWind1: TcxTextEdit;
dx_rowWind3: TcxTextEdit;
dx_rowWind4: TcxTextEdit;
dx_rowWind2: TcxTextEdit;
cxLabel188: TcxLabel;
dx_hotWind11: TcxTextEdit;
cxLabel189: TcxLabel;
dx_temperature11: TcxTextEdit;
FS: TcxTabSheet;
FP: TcxTabSheet;
GJ: TcxTabSheet;
JGQX: TcxTabSheet;
ZM: TcxTabSheet;
Panel_FP: TPanel;
TbFPReplace2: TcxButton;
TbFPClear2: TcxButton;
TbFPReplace1: TcxButton;
TbFPClear1: TcxButton;
cxLabel283: TcxLabel;
cxLabel284: TcxLabel;
cxLabel285: TcxLabel;
cxLabel286: TcxLabel;
cxLabel287: TcxLabel;
cxLabel288: TcxLabel;
cxLabel290: TcxLabel;
cxLabel291: TcxLabel;
cxLabel292: TcxLabel;
cxLabel293: TcxLabel;
cxLabel294: TcxLabel;
cxLabel295: TcxLabel;
cxLabel296: TcxLabel;
cxLabel297: TcxLabel;
cxLabel298: TcxLabel;
cxLabel299: TcxLabel;
cxLabel300: TcxLabel;
cxLabel301: TcxLabel;
cxLabel302: TcxLabel;
cxLabel303: TcxLabel;
cxLabel304: TcxLabel;
cxLabel305: TcxLabel;
cxLabel306: TcxLabel;
cxLabel307: TcxLabel;
cxLabel308: TcxLabel;
cxLabel309: TcxLabel;
cxLabel310: TcxLabel;
cxLabel311: TcxLabel;
cxLabel312: TcxLabel;
cxLabel313: TcxLabel;
cxLabel314: TcxLabel;
cxLabel315: TcxLabel;
cxLabel316: TcxLabel;
cxLabel317: TcxLabel;
cxLabel318: TcxLabel;
cxLabel319: TcxLabel;
cxLabel320: TcxLabel;
cxLabel321: TcxLabel;
cxLabel322: TcxLabel;
cxLabel323: TcxLabel;
cxLabel324: TcxLabel;
cxLabel325: TcxLabel;
cxLabel326: TcxLabel;
cxLabel327: TcxLabel;
fp_CarPress: TcxTextEdit;
fp_DownSuperRate: TcxTextEdit;
fp_fallCloth: TcxTextEdit;
fp_hotWind1: TcxTextEdit;
fp_hotWind10: TcxTextEdit;
fp_hotWind11: TcxTextEdit;
fp_hotWind2: TcxTextEdit;
fp_hotWind3: TcxTextEdit;
fp_hotWind4: TcxTextEdit;
fp_hotWind5: TcxTextEdit;
fp_hotWind6: TcxTextEdit;
fp_hotWind7: TcxTextEdit;
fp_hotWind8: TcxTextEdit;
fp_hotWind9: TcxTextEdit;
fp_leftGap: TcxTextEdit;
fp_Precautions: TcxTextEdit;
fp_rightGap: TcxTextEdit;
fp_Rolling: TcxTextEdit;
fp_RollMethod: TcxComboBox;
fp_RosePower: TcxTextEdit;
fp_rowWind1: TcxTextEdit;
fp_rowWind2: TcxTextEdit;
fp_rowWind3: TcxTextEdit;
fp_rowWind4: TcxTextEdit;
fp_speed: TcxTextEdit;
fp_temperature1: TcxTextEdit;
fp_temperature10: TcxTextEdit;
fp_temperature11: TcxTextEdit;
fp_temperature2: TcxTextEdit;
fp_temperature3: TcxTextEdit;
fp_temperature4: TcxTextEdit;
fp_temperature5: TcxTextEdit;
fp_temperature6: TcxTextEdit;
fp_temperature7: TcxTextEdit;
fp_temperature8: TcxTextEdit;
fp_temperature9: TcxTextEdit;
fp_TubePress: TcxTextEdit;
fp_tubeTemper: TcxTextEdit;
fp_upperNeedle: TcxTextEdit;
fp_UpSuperRate: TcxTextEdit;
Panel_gj: TPanel;
TbGJReplace2: TcxButton;
TbGJClear2: TcxButton;
TbGJReplace1: TcxButton;
TbGjClear1: TcxButton;
cxLabel233: TcxLabel;
cxLabel234: TcxLabel;
cxLabel235: TcxLabel;
cxLabel236: TcxLabel;
cxLabel237: TcxLabel;
cxLabel238: TcxLabel;
cxLabel239: TcxLabel;
cxLabel240: TcxLabel;
cxLabel241: TcxLabel;
cxLabel242: TcxLabel;
cxLabel243: TcxLabel;
cxLabel244: TcxLabel;
cxLabel245: TcxLabel;
cxLabel246: TcxLabel;
cxLabel247: TcxLabel;
cxLabel248: TcxLabel;
cxLabel249: TcxLabel;
cxLabel250: TcxLabel;
cxLabel251: TcxLabel;
cxLabel252: TcxLabel;
cxLabel253: TcxLabel;
cxLabel254: TcxLabel;
cxLabel255: TcxLabel;
cxLabel256: TcxLabel;
cxLabel257: TcxLabel;
cxLabel258: TcxLabel;
cxLabel259: TcxLabel;
cxLabel260: TcxLabel;
cxLabel261: TcxLabel;
cxLabel262: TcxLabel;
cxLabel263: TcxLabel;
cxLabel264: TcxLabel;
cxLabel265: TcxLabel;
cxLabel266: TcxLabel;
cxLabel267: TcxLabel;
cxLabel268: TcxLabel;
cxLabel269: TcxLabel;
cxLabel270: TcxLabel;
cxLabel271: TcxLabel;
cxLabel272: TcxLabel;
cxLabel273: TcxLabel;
cxLabel274: TcxLabel;
cxLabel275: TcxLabel;
cxLabel276: TcxLabel;
cxLabel277: TcxLabel;
gj_CarPress: TcxTextEdit;
gj_DownSuperRate: TcxTextEdit;
gj_fallCloth: TcxTextEdit;
gj_hotWind1: TcxTextEdit;
gj_hotWind10: TcxTextEdit;
gj_hotWind11: TcxTextEdit;
gj_hotWind2: TcxTextEdit;
gj_hotWind3: TcxTextEdit;
gj_hotWind4: TcxTextEdit;
gj_hotWind5: TcxTextEdit;
gj_hotWind6: TcxTextEdit;
gj_hotWind7: TcxTextEdit;
gj_hotWind8: TcxTextEdit;
gj_hotWind9: TcxTextEdit;
gj_leftGap: TcxTextEdit;
gj_Precautions: TcxTextEdit;
gj_rightGap: TcxTextEdit;
gj_Rolling: TcxTextEdit;
gj_RollMethod: TcxComboBox;
gj_RosePower: TcxTextEdit;
gj_rowWind1: TcxTextEdit;
gj_rowWind2: TcxTextEdit;
gj_rowWind3: TcxTextEdit;
gj_rowWind4: TcxTextEdit;
gj_speed: TcxTextEdit;
gj_temperature1: TcxTextEdit;
gj_temperature10: TcxTextEdit;
gj_temperature11: TcxTextEdit;
gj_temperature2: TcxTextEdit;
gj_temperature3: TcxTextEdit;
gj_temperature4: TcxTextEdit;
gj_temperature5: TcxTextEdit;
gj_temperature6: TcxTextEdit;
gj_temperature7: TcxTextEdit;
gj_temperature8: TcxTextEdit;
gj_temperature9: TcxTextEdit;
gj_TubePress: TcxTextEdit;
gj_tubeTemper: TcxTextEdit;
gj_upperNeedle: TcxTextEdit;
gj_UpSuperRate: TcxTextEdit;
gj_WidthAmplitude: TcxTextEdit;
Panel_fs: TPanel;
TbFSReplace1: TcxButton;
TbFSClear1: TcxButton;
TbFSReplace2: TcxButton;
TBFScLEAR2: TcxButton;
cxLabel191: TcxLabel;
cxLabel192: TcxLabel;
cxLabel193: TcxLabel;
cxLabel194: TcxLabel;
cxLabel195: TcxLabel;
cxLabel196: TcxLabel;
cxLabel198: TcxLabel;
cxLabel199: TcxLabel;
cxLabel200: TcxLabel;
cxLabel201: TcxLabel;
cxLabel202: TcxLabel;
cxLabel203: TcxLabel;
cxLabel204: TcxLabel;
cxLabel205: TcxLabel;
cxLabel206: TcxLabel;
cxLabel207: TcxLabel;
cxLabel208: TcxLabel;
cxLabel209: TcxLabel;
cxLabel210: TcxLabel;
cxLabel211: TcxLabel;
cxLabel212: TcxLabel;
cxLabel213: TcxLabel;
cxLabel214: TcxLabel;
cxLabel215: TcxLabel;
cxLabel216: TcxLabel;
cxLabel217: TcxLabel;
cxLabel218: TcxLabel;
cxLabel219: TcxLabel;
cxLabel220: TcxLabel;
cxLabel221: TcxLabel;
cxLabel222: TcxLabel;
cxLabel223: TcxLabel;
cxLabel224: TcxLabel;
cxLabel225: TcxLabel;
cxLabel226: TcxLabel;
cxLabel227: TcxLabel;
cxLabel228: TcxLabel;
cxLabel229: TcxLabel;
cxLabel230: TcxLabel;
cxLabel231: TcxLabel;
fs_CarPress: TcxTextEdit;
fs_DownSuperRate: TcxTextEdit;
fs_hotWind1: TcxTextEdit;
fs_hotWind10: TcxTextEdit;
fs_hotWind11: TcxTextEdit;
fs_hotWind2: TcxTextEdit;
fs_hotWind3: TcxTextEdit;
fs_hotWind4: TcxTextEdit;
fs_hotWind5: TcxTextEdit;
fs_hotWind6: TcxTextEdit;
fs_hotWind7: TcxTextEdit;
fs_hotWind8: TcxTextEdit;
fs_hotWind9: TcxTextEdit;
fs_Precautions: TcxTextEdit;
fs_RollMethod: TcxComboBox;
fs_RosePower: TcxTextEdit;
fs_rowWind1: TcxTextEdit;
fs_rowWind2: TcxTextEdit;
fs_rowWind3: TcxTextEdit;
fs_rowWind4: TcxTextEdit;
fs_speed: TcxTextEdit;
fs_temperature1: TcxTextEdit;
fs_temperature10: TcxTextEdit;
fs_temperature11: TcxTextEdit;
fs_temperature2: TcxTextEdit;
fs_temperature3: TcxTextEdit;
fs_temperature4: TcxTextEdit;
fs_temperature5: TcxTextEdit;
fs_temperature6: TcxTextEdit;
fs_temperature7: TcxTextEdit;
fs_temperature8: TcxTextEdit;
fs_temperature9: TcxTextEdit;
fs_TubePress: TcxTextEdit;
fs_tubeTemper: TcxTextEdit;
fs_upperNeedle: TcxTextEdit;
fs_UpSuperRate: TcxTextEdit;
Panel_jgqx: TPanel;
cxLabel340: TcxLabel;
cxLabel343: TcxLabel;
cxLabel347: TcxLabel;
cxLabel348: TcxLabel;
cxLabel350: TcxLabel;
cxLabel351: TcxLabel;
jgqx_keepTemper: TcxTextEdit;
jgqx_keepTime: TcxTextEdit;
jgqx_note: TcxTextEdit;
jgqx_reagentRatio: TcxTextEdit;
jgqx_reagentUse: TcxTextEdit;
Panel_rgqx: TPanel;
cxLabel114: TcxLabel;
cxLabel150: TcxLabel;
cxLabel163: TcxLabel;
cxLabel165: TcxLabel;
cxLabel166: TcxLabel;
rgqx_daoSet: TcxTextEdit;
rgqx_note: TcxTextEdit;
rgqx_speed: TcxTextEdit;
rgqx_waterTemper: TcxTextEdit;
Panel_zm: TPanel;
cxLabel336: TcxLabel;
cxLabel337: TcxLabel;
cxLabel339: TcxLabel;
cxLabel342: TcxLabel;
cxLabel344: TcxLabel;
cxLabel345: TcxLabel;
zm_inout: TcxTextEdit;
zm_mainElec: TcxTextEdit;
zm_needleHigh: TcxTextEdit;
zm_Precautions: TcxTextEdit;
zm_style: TcxComboBox;
Panel_ccqx: TPanel;
ccqx_note: TcxTextEdit;
ccqx_speed: TcxTextEdit;
ccqx_temperature1: TcxTextEdit;
ccqx_temperature2: TcxTextEdit;
ccqx_temperature3: TcxTextEdit;
ccqx_temperature4: TcxTextEdit;
ccqx_temperature5: TcxTextEdit;
ccqx_temperature6: TcxTextEdit;
TbCCQXReplace: TcxButton;
TbccqxClear: TcxButton;
cxLabel113: TcxLabel;
cxLabel38: TcxLabel;
cxLabel40: TcxLabel;
cxLabel41: TcxLabel;
cxLabel42: TcxLabel;
cxLabel44: TcxLabel;
cxLabel45: TcxLabel;
cxLabel46: TcxLabel;
cxLabel47: TcxLabel;
cxLabel48: TcxLabel;
cxLabel37: TcxLabel;
cxLabel167: TcxLabel;
cxLabel169: TcxLabel;
cxLabel170: TcxLabel;
cxLabel171: TcxLabel;
cxLabel172: TcxLabel;
jgqx_leftMouthPress: TcxTextEdit;
jgqx_rightMouthPress: TcxTextEdit;
jgqx_mainGangPress: TcxTextEdit;
jgqx_mainBengSpeed: TcxTextEdit;
jgqx_rightWheelSpeed: TcxTextEdit;
jgqx_leftWheelSpeed: TcxTextEdit;
cxLabel173: TcxLabel;
cxLabel334: TcxLabel;
jgqx_upperSpeed: TcxTextEdit;
jgqx_downSpeed: TcxTextEdit;
cxLabel338: TcxLabel;
cxLabel26: TcxLabel;
cxLabel352: TcxLabel;
FS_Style: TcxComboBox;
cxLabel354: TcxLabel;
fs_isVacuun: TcxComboBox;
2025-08-12 13:42:42 +08:00
TbFSReplace3: TcxButton;
TbFSClear3: TcxButton;
2025-09-08 14:31:40 +08:00
cxLabel27: TcxLabel;
cxLabel39: TcxLabel;
cxLabel164: TcxLabel;
fp_Flow: TcxTextEdit;
fp_Gas: TcxTextEdit;
cxLabel168: TcxLabel;
fp_mixSpeed: TcxTextEdit;
TbDXReplace3: TcxButton;
TbDXClear3: TcxButton;
TbFPReplace3: TcxButton;
TbFPClear3: TcxButton;
TbGJReplace3: TcxButton;
TbGJClear3: TcxButton;
ToolBar4: TToolBar;
TbfsAdd: TToolButton;
TbfsDel: TToolButton;
cxGrid2: TcxGrid;
Tv4: TcxGridDBTableView;
Tv4Column1: TcxGridDBColumn;
Tv41fs_Name: TcxGridDBColumn;
Tv41fs_spel: TcxGridDBColumn;
Tv4fs_unit: TcxGridDBColumn;
Tv41fs_rate: TcxGridDBColumn;
Tv41fs_precautions: TcxGridDBColumn;
cxGridLevel1: TcxGridLevel;
cxGrid3: TcxGrid;
Tv5: TcxGridDBTableView;
Tv5Column1: TcxGridDBColumn;
Tv5gj_Name: TcxGridDBColumn;
Tv5gj_spel: TcxGridDBColumn;
Tv5gj_unit: TcxGridDBColumn;
Tv5gj_rate: TcxGridDBColumn;
Tv5gj_precautions: TcxGridDBColumn;
cxGridDBColumn26: TcxGridDBColumn;
cxGridDBColumn27: TcxGridDBColumn;
cxGridDBColumn28: TcxGridDBColumn;
cxGridLevel3: TcxGridLevel;
ToolBar5: TToolBar;
TbgjAdd: TToolButton;
TbgjDel: TToolButton;
cxGrid1: TcxGrid;
Tv6: TcxGridDBTableView;
Tv6Column1: TcxGridDBColumn;
Tv6fp_Name: TcxGridDBColumn;
Tv6fp_spel: TcxGridDBColumn;
Tv6fp_unit: TcxGridDBColumn;
Tv6fp_rate: TcxGridDBColumn;
Tv6fp_precautions: TcxGridDBColumn;
cxGridDBColumn16: TcxGridDBColumn;
cxGridDBColumn17: TcxGridDBColumn;
cxGridDBColumn18: TcxGridDBColumn;
cxGridLevel2: TcxGridLevel;
ToolBar3: TToolBar;
TbfpAdd: TToolButton;
TbfpDel: TToolButton;
cxLabel190: TcxLabel;
cxLabel197: TcxLabel;
cxLabel232: TcxLabel;
cxGrid4: TcxGrid;
Tv1: TcxGridDBTableView;
cxGridDBColumn1: TcxGridDBColumn;
cxGridDBColumn2: TcxGridDBColumn;
cxGridDBColumn3: TcxGridDBColumn;
cxGridDBColumn4: TcxGridDBColumn;
Tv1ccqx_rate: TcxGridDBColumn;
cxGridDBColumn6: TcxGridDBColumn;
cxGridLevel4: TcxGridLevel;
ToolBar2: TToolBar;
TbccqxAdd: TToolButton;
TbccqxDel: TToolButton;
cxGrid5: TcxGrid;
Tv3: TcxGridDBTableView;
cxGridDBColumn7: TcxGridDBColumn;
cxGridDBColumn8: TcxGridDBColumn;
cxGridDBColumn9: TcxGridDBColumn;
cxGridDBColumn10: TcxGridDBColumn;
cxGridDBColumn11: TcxGridDBColumn;
cxGridDBColumn12: TcxGridDBColumn;
cxGridLevel5: TcxGridLevel;
ToolBar6: TToolBar;
TbjgqxAdd: TToolButton;
TbjgqxDel: TToolButton;
cxGrid6: TcxGrid;
Tv2: TcxGridDBTableView;
cxGridDBColumn13: TcxGridDBColumn;
cxGridDBColumn14: TcxGridDBColumn;
cxGridDBColumn15: TcxGridDBColumn;
cxGridDBColumn19: TcxGridDBColumn;
cxGridDBColumn20: TcxGridDBColumn;
cxGridDBColumn21: TcxGridDBColumn;
cxGridLevel6: TcxGridLevel;
ToolBar7: TToolBar;
TbrgqxAdd: TToolButton;
TbrgqxDel: TToolButton;
CDS_4: TClientDataSet;
CDS_5: TClientDataSet;
DS_4: TDataSource;
DS_5: TDataSource;
CDS_6: TClientDataSet;
DS_6: TDataSource;
GPM_5: TcxGridPopupMenu;
GPM_6: TcxGridPopupMenu;
Tv1ccqx_use: TcxGridDBColumn;
Tv2Column1: TcxGridDBColumn;
Tv3Column1: TcxGridDBColumn;
Tv4fs_use: TcxGridDBColumn;
Tv5gj_use: TcxGridDBColumn;
Tv6Column2: TcxGridDBColumn;
2025-07-05 10:17:25 +08:00
procedure FormShow( Sender: TObject) ;
procedure TBCloseClick( Sender: TObject) ;
procedure TbSaveClick( Sender: TObject) ;
procedure CYColorKeyPress( Sender: TObject; var Key: Char ) ;
procedure CYJGGYBtnDnClick( Sender: TObject) ;
procedure C_WidthBtnDnClick( Sender: TObject) ;
procedure C_WidthBtnUpClick( Sender: TObject) ;
procedure SetXH( ) ;
procedure fs_meterPropertiesChange( Sender: TObject) ;
2025-09-08 14:31:40 +08:00
procedure TbfpAddClick( Sender: TObject) ;
procedure TbfpDelClick( Sender: TObject) ;
2025-07-05 10:17:25 +08:00
procedure Tv2fp_NamePropertiesButtonClick( Sender: TObject; AButtonIndex: Integer ) ;
2025-09-08 14:31:40 +08:00
procedure TbfsAddClick( Sender: TObject) ;
procedure TbfsDelClick( Sender: TObject) ;
procedure TbgjAddClick( Sender: TObject) ;
procedure TbgjDelClick( Sender: TObject) ;
2025-07-05 10:17:25 +08:00
procedure Tv11fs_NamePropertiesButtonClick( Sender: TObject; AButtonIndex: Integer ) ;
procedure Tv3gj_NamePropertiesButtonClick( Sender: TObject; AButtonIndex: Integer ) ;
procedure TbCPReplaceClick( Sender: TObject) ;
2025-08-01 15:42:49 +08:00
procedure TbDXReplace2Click( Sender: TObject) ;
procedure TbFSReplace2Click( Sender: TObject) ;
2025-07-05 10:17:25 +08:00
procedure TbFPReplaceClick( Sender: TObject) ;
procedure TbGJReplaceClick( Sender: TObject) ;
2025-08-12 13:42:42 +08:00
procedure TbFSReplace3Click( Sender: TObject) ;
procedure TbFSClear3Click( Sender: TObject) ;
2025-08-01 15:42:49 +08:00
procedure TbDXClear2Click( Sender: TObject) ;
2025-07-05 10:17:25 +08:00
procedure cxButton4Click( Sender: TObject) ;
procedure TbGJClearClick( Sender: TObject) ;
2025-08-01 15:42:49 +08:00
procedure TBFScLEAR2Click( Sender: TObject) ;
procedure TbCCQXReplaceClick( Sender: TObject) ;
procedure TbccqxClearClick( Sender: TObject) ;
procedure TbDXReplace1Click( Sender: TObject) ;
procedure TbDXClear1Click( Sender: TObject) ;
procedure TbFSReplace1Click( Sender: TObject) ;
procedure TbFSClear1Click( Sender: TObject) ;
procedure TbGJReplace1Click( Sender: TObject) ;
procedure TbGJReplace2Click( Sender: TObject) ;
procedure TbGjClear1Click( Sender: TObject) ;
procedure TbGJClear2Click( Sender: TObject) ;
procedure TbFPReplace1Click( Sender: TObject) ;
procedure TbFPReplace2Click( Sender: TObject) ;
procedure TbFPClear1Click( Sender: TObject) ;
procedure TbFPClear2Click( Sender: TObject) ;
2025-09-08 14:31:40 +08:00
procedure TbDXReplace3Click( Sender: TObject) ;
procedure TbDXClear3Click( Sender: TObject) ;
procedure TbFPReplace3Click( Sender: TObject) ;
procedure TbFPClear3Click( Sender: TObject) ;
procedure TbGJReplace3Click( Sender: TObject) ;
procedure TbGJClear3Click( Sender: TObject) ;
procedure TbccqxAddClick( Sender: TObject) ;
procedure TbrgqxAddClick( Sender: TObject) ;
procedure TbjgqxAddClick( Sender: TObject) ;
procedure cxGridDBColumn2PropertiesButtonClick( Sender: TObject; AButtonIndex: Integer ) ;
procedure cxGridDBColumn14PropertiesButtonClick( Sender: TObject; AButtonIndex: Integer ) ;
procedure cxGridDBColumn8PropertiesButtonClick( Sender: TObject; AButtonIndex: Integer ) ;
procedure Tv41fs_NamePropertiesButtonClick( Sender: TObject; AButtonIndex: Integer ) ;
procedure Tv5gj_NamePropertiesButtonClick( Sender: TObject; AButtonIndex: Integer ) ;
procedure Tv6fp_NamePropertiesButtonClick( Sender: TObject; AButtonIndex: Integer ) ;
procedure Tv6fp_ratePropertiesEditValueChanged( Sender: TObject) ;
procedure Tv5gj_unitPropertiesEditValueChanged( Sender: TObject) ;
procedure Tv4fs_unitPropertiesEditValueChanged( Sender: TObject) ;
procedure cxGridDBColumn11PropertiesEditValueChanged( Sender: TObject) ;
procedure cxGridDBColumn20PropertiesEditValueChanged( Sender: TObject) ;
procedure cxGridDBColumn5PropertiesEditValueChanged( Sender: TObject) ;
procedure Tv1Column1PropertiesEditValueChanged( Sender: TObject) ;
procedure TbccqxDelClick( Sender: TObject) ;
procedure TbrgqxDelClick( Sender: TObject) ;
procedure TbjgqxDelClick( Sender: TObject) ;
procedure Tv2Column1PropertiesEditValueChanged( Sender: TObject) ;
procedure Tv3Column1PropertiesEditValueChanged( Sender: TObject) ;
procedure Tv4fs_usePropertiesEditValueChanged( Sender: TObject) ;
procedure Tv5gj_usePropertiesEditValueChanged( Sender: TObject) ;
procedure Tv6Column2PropertiesEditValueChanged( Sender: TObject) ;
2025-07-05 10:17:25 +08:00
private
canshu1: string ;
Fint: Integer ;
procedure InitGrid( ) ;
2025-08-12 13:42:42 +08:00
procedure ArrangeTabsByDataset( ) ;
2025-07-05 10:17:25 +08:00
function SaveData( ) : Boolean ;
function FindLastEditedTextEdit( AParent: TWinControl; const AHint: string ) : string ;
procedure FillAllTextEditsWithValue( AParent: TWinControl; const AHint, AValue: string ; AExclude: TcxTextEdit = nil ) ;
procedure ClearAllTextEditsByHint( AParent: TWinControl; const AHint: string ; AExclude: TcxTextEdit = nil ) ;
function CheckData( ) : Boolean ;
2025-09-08 14:31:40 +08:00
function AddPercentSuffixIfNeeded( const AText: string ) : string ;
2025-07-05 10:17:25 +08:00
{ Private declarations }
public
BtnInt: Integer ;
FPSType: string ;
FPSID: string ;
{ Public declarations }
end ;
var
frmDyeProcessDefin: TfrmDyeProcessDefin;
implementation
uses
U_DataLink, U_RTFun, U_iniParam, U_ZDYHelp, U_AttachmentUpload, U_ClothInfoSel,
2025-08-12 13:42:42 +08:00
U_DyeProcessList, U_ProductInfoSel, U_DyeTechnicsinput;
2025-07-05 10:17:25 +08:00
// U_ProductInfoSel;
{$R *.dfm}
procedure TfrmDyeProcessDefin. SetXH( ) ;
var
i: Integer ;
begin
// with CDS_GX do
// begin
// First;
// i := 1;
// while not Eof do
// begin
// with CDS_GX do
// begin
// Edit;
// FieldByName('XHNoTemp').Value := i;
// Post;
// end;
// i := i + 1;
// Next;
// end;
// end;
//
// with CDS_GX do
// begin
// CDS_GX.IndexFieldNames := '';
// First;
// i := 1;
// while not Eof do
// begin
// with CDS_GX do
// begin
// Edit;
// FieldByName('SerialNo').Value := FieldByName('XHNoTemp').AsInteger;
// Post;
// end;
// i := i + 1;
// Next;
// end;
// CDS_GX.IndexFieldNames := 'SerialNo';
// end;
end ;
2025-08-12 13:42:42 +08:00
procedure TfrmDyeProcessDefin. ArrangeTabsByDataset( ) ;
2025-07-05 10:17:25 +08:00
var
I: Integer ;
TabSheet: TcxTabSheet;
CurrentIndex: Integer ;
begin
// <20> <> ʼ <EFBFBD> <CABC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ҳ<EFBFBD> <D2B3>
for I : = 0 to cxPageControl1. PageCount - 1 do
cxPageControl1. Pages[ I] . TabVisible : = False ;
// <20> <> <EFBFBD> õ<EFBFBD> ǰ<EFBFBD> <C7B0> <EFBFBD> <EFBFBD>
CurrentIndex : = 0 ;
// <20> <> <EFBFBD> ݹ<EFBFBD> <DDB9> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ҷ<EFBFBD> Ӧ<EFBFBD> <D3A6> ҳ<EFBFBD> <D2B3>
for I : = 0 to cxPageControl1. PageCount - 1 do
begin
TabSheet : = cxPageControl1. Pages[ I] as TcxTabSheet;
// ƥ<> 乤<EFBFBD> <E4B9A4> <EFBFBD> <EFBFBD>
if ( Trim( TabSheet. Caption) = FPSType) then
begin
TabSheet. PageIndex : = CurrentIndex;
TabSheet. TabVisible : = True ;
2025-08-12 13:42:42 +08:00
TabSheet. Visible : = True ;
2025-07-05 10:17:25 +08:00
Inc( CurrentIndex) ;
Break;
end ;
end ;
// ˢ<> <CBA2> ҳ<EFBFBD> <D2B3> <EFBFBD> ؼ<EFBFBD>
2025-08-12 13:42:42 +08:00
// cxPageControl1.Invalidate;
2025-07-05 10:17:25 +08:00
end ;
procedure TfrmDyeProcessDefin. InitGrid( ) ;
var
i: integer ;
begin
with ADOQueryTemp do
begin
Close;
sql. Clear;
sql. Add( 'select A.* from Bs_Cloth_GY_sub A ' ) ;
2025-09-08 14:31:40 +08:00
sql. Add( ' where gytype=' '<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ϴ' ' and A.PSID=' '' + Trim( FPSID) + '' '' ) ;
2025-07-05 10:17:25 +08:00
Open;
end ;
SCreateCDS( ADOQueryTemp, CDS_1) ;
SInitCDSData( ADOQueryTemp, CDS_1) ;
with ADOQueryTemp do
begin
Close;
sql. Clear;
sql. Add( 'select A.* from Bs_Cloth_GY_sub A ' ) ;
2025-09-08 14:31:40 +08:00
sql. Add( ' where gytype=' '<27> <> Ⱦ<EFBFBD> <C8BE> <EFBFBD> <EFBFBD> ϴ' ' and A.PSID=' '' + Trim( FPSID) + '' '' ) ;
2025-07-05 10:17:25 +08:00
Open;
end ;
SCreateCDS( ADOQueryTemp, CDS_2) ;
SInitCDSData( ADOQueryTemp, CDS_2) ;
2025-09-08 14:31:40 +08:00
2025-07-05 10:17:25 +08:00
with ADOQueryTemp do
begin
Close;
sql. Clear;
sql. Add( 'select A.* from Bs_Cloth_GY_sub A ' ) ;
2025-09-08 14:31:40 +08:00
sql. Add( ' where gytype=' '<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ϴ' ' and A.PSID=' '' + Trim( FPSID) + '' '' ) ;
2025-07-05 10:17:25 +08:00
Open;
end ;
SCreateCDS( ADOQueryTemp, CDS_3) ;
SInitCDSData( ADOQueryTemp, CDS_3) ;
2025-09-08 14:31:40 +08:00
with ADOQueryTemp do
begin
Close;
sql. Clear;
sql. Add( 'select A.* from Bs_Cloth_GY_sub A ' ) ;
sql. Add( ' where gytype=' '<27> <> ˮ<EFBFBD> <CBAE> <EFBFBD> <EFBFBD> ' ' and A.PSID=' '' + Trim( FPSID) + '' '' ) ;
Open;
end ;
SCreateCDS( ADOQueryTemp, CDS_4) ;
SInitCDSData( ADOQueryTemp, CDS_4) ;
with ADOQueryTemp do
begin
Close;
sql. Clear;
sql. Add( 'select A.* from Bs_Cloth_GY_sub A ' ) ;
sql. Add( ' where gytype=' '<27> <> <EFBFBD> <EFBFBD> ' ' and A.PSID=' '' + Trim( FPSID) + '' '' ) ;
Open;
end ;
SCreateCDS( ADOQueryTemp, CDS_6) ;
SInitCDSData( ADOQueryTemp, CDS_6) ;
with ADOQueryTemp do
begin
Close;
sql. Clear;
sql. Add( 'select A.* from Bs_Cloth_GY_sub A ' ) ;
sql. Add( ' where gytype=' '<27> ν <EFBFBD> ' ' and A.PSID=' '' + Trim( FPSID) + '' '' ) ;
Open;
end ;
SCreateCDS( ADOQueryTemp, CDS_5) ;
SInitCDSData( ADOQueryTemp, CDS_5) ;
2025-07-05 10:17:25 +08:00
// C_FromName.TxtCode := Trim(ADOQueryTemp.fieldbyname('FromBCIID').AsString);
// C_FromName.Text := Trim(ADOQueryTemp.fieldbyname('C_FromName').AsString);
end ;
procedure TfrmDyeProcessDefin. FormShow( Sender: TObject) ;
var
2025-07-09 16:55:19 +08:00
MaxPSID, MaxProcessID, MaxBCPID: string ;
2025-07-05 10:17:25 +08:00
Maxid1, maxid2, maxid3, maxgx: string ;
begin
InitGrid( ) ;
2025-08-12 13:42:42 +08:00
ArrangeTabsByDataset( ) ;
2025-09-08 14:31:40 +08:00
if ( BtnInt = 0 ) and ( frmDyeTechnicsinput. CDS_1. FieldByName( 'PSID' ) . Value = '' ) then //<2F> <> <EFBFBD> <EFBFBD>
2025-07-05 10:17:25 +08:00
begin
FPSID : = '' ;
end ;
2025-08-12 13:42:42 +08:00
with ADOQueryTemp do
begin
Close;
SQL. Clear;
SQL. Add( 'select * from Dye_Process where PSID=' '' + Trim( FPSID) + '' '' ) ;
Open;
2025-07-05 10:17:25 +08:00
end ;
2025-08-12 13:42:42 +08:00
SCSHData( ADOQueryTemp, Panel1, 2 ) ;
2025-07-05 10:17:25 +08:00
2025-08-12 13:42:42 +08:00
with ADOQueryTemp do
2025-07-05 10:17:25 +08:00
begin
2025-08-12 13:42:42 +08:00
Close;
SQL. Clear;
SQL. Add( 'select * from Bs_Cloth_GY_Main where PSID=' '' + Trim( FPSID) + '' '' ) ;
Open;
end ;
2025-07-05 10:17:25 +08:00
2025-08-12 13:42:42 +08:00
if FPSType = '<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ϴ' then
begin
SCSHData( ADOQueryTemp, Panel_ccqx, 2 ) ;
end
else if FPSType = '<27> <> Ⱦ<EFBFBD> <C8BE> <EFBFBD> <EFBFBD> ϴ' then
begin
SCSHData( ADOQueryTemp, Panel_rgqx, 2 ) ;
end
else if FPSType = '<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ϴ' then
begin
SCSHData( ADOQueryTemp, Panel_jgqx, 2 ) ;
end
else if FPSType = '<27> ɶ<EFBFBD> <C9B6> <EFBFBD> ' then
begin
SCSHData( ADOQueryTemp, Panel_dx, 2 ) ;
end
else if FPSType = '<27> <> ˮ<EFBFBD> <CBAE> <EFBFBD> <EFBFBD> ' then
begin
SCSHData( ADOQueryTemp, Panel_fs, 2 ) ;
end
else if FPSType = '<27> <> <EFBFBD> <EFBFBD> ' then
begin
SCSHData( ADOQueryTemp, Panel_fp, 2 ) ;
end
else if FPSType = '<27> ν <EFBFBD> ' then
begin
SCSHData( ADOQueryTemp, Panel_gj, 2 ) ;
end
else if FPSType = '<27> <> ë' then
begin
SCSHData( ADOQueryTemp, Panel_zm, 2 ) ;
2025-07-05 10:17:25 +08:00
end ;
2025-08-12 13:42:42 +08:00
2025-09-08 14:31:40 +08:00
if BtnInt = 2 then //<2F> <> <EFBFBD> <EFBFBD>
begin
// FPSID := '';
// PSName.Text := '';
end ;
if ( ( BtnInt = 1 ) or ( BtnInt = 0 ) ) and ( frmDyeTechnicsinput. CDS_1. FieldByName( 'PSID' ) . AsString < > '' ) then //<2F> <EFBFBD>
begin
// PSName.Enabled := False;
end ;
2025-07-05 10:17:25 +08:00
if BtnInt = 3 then //<2F> 鿴
begin
TbSave. Visible : = False ;
TbUpFile. Visible : = False ;
end ;
end ;
procedure TfrmDyeProcessDefin. fs_meterPropertiesChange( Sender: TObject) ;
var
mfs_meter, mfs_useOneMeter, mfs_useGlub: Double ;
begin
2025-08-01 15:42:49 +08:00
if fs_meterDQ. Text < > '' then
2025-07-05 10:17:25 +08:00
begin
2025-08-01 15:42:49 +08:00
mfs_meter : = StrToFloat( fs_meterDQ. Text ) ;
2025-07-05 10:17:25 +08:00
end
else
begin
2025-08-01 15:42:49 +08:00
fs_meterDQ. Text : = '0' ;
2025-07-05 10:17:25 +08:00
mfs_meter : = 0 ;
end ;
2025-08-01 15:42:49 +08:00
if fs_useOneMeterDQ. Text < > '' then
2025-07-05 10:17:25 +08:00
begin
2025-08-01 15:42:49 +08:00
mfs_useOneMeter : = StrToFloat( fs_useOneMeterDQ. Text ) ;
2025-07-05 10:17:25 +08:00
end
else
begin
2025-08-01 15:42:49 +08:00
fs_useOneMeterDQ. Text : = '0' ;
2025-07-05 10:17:25 +08:00
mfs_useOneMeter : = 0 ;
end ;
///<2F> <> <EFBFBD> 㲿<EFBFBD> <E3B2BF>
mfs_useGlub : = mfs_meter * mfs_useOneMeter / 1 0 0 0 ;
2025-08-01 15:42:49 +08:00
fs_useGlubDQ. Text : = FloatToStr( mfs_useGlub) ;
2025-07-05 10:17:25 +08:00
end ;
procedure TfrmDyeProcessDefin. TBCloseClick( Sender: TObject) ;
begin
Close;
end ;
function TfrmDyeProcessDefin. CheckData( ) : Boolean ;
begin
if Trim( PSName. Text ) = '' then
begin
Application. MessageBox( '<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ʋ<EFBFBD> <C6B2> <EFBFBD> Ϊ<EFBFBD> գ <EFBFBD> ' , '<27> <> ʾ <EFBFBD> <CABE> Ϣ' , MB_OK) ;
Result : = False ;
Exit;
end ;
2025-08-12 13:42:42 +08:00
2025-09-08 14:31:40 +08:00
if frmDyeTechnicsinput. CDS_1. FieldByName( 'DTMID' ) . AsString < > '' then///<2F> <> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD>
2025-07-05 10:17:25 +08:00
begin
2025-09-08 14:31:40 +08:00
// FPSID := '';
2025-08-12 13:42:42 +08:00
with ADOQueryCmd do
begin
Close;
SQL. Clear;
sql. Add( 'select * from Dye_Process where PSName=' '' + trim( PSName. Text ) + '' '' ) ;
2025-09-08 14:31:40 +08:00
sql. Add( ' and DTMID = ' + QuotedStr( Trim( frmDyeTechnicsinput. CDS_1. FieldByName( 'DTMID' ) . AsString) ) ) ;
2025-08-12 13:42:42 +08:00
Open;
end ;
2025-09-08 14:31:40 +08:00
if ADOQueryCmd. RecordCount > 1 then
2025-08-12 13:42:42 +08:00
begin
application. MessageBox( PChar( '<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ' '' + trim( PSName. text ) + '' '<27> Ѵ <EFBFBD> <D1B4> <EFBFBD> ' ) , '<27> <> ʾ ' ) ;
Result : = false ;
Exit;
end ;
2025-07-05 10:17:25 +08:00
end ;
Result : = True ;
end ;
function TfrmDyeProcessDefin. SaveData( ) : Boolean ;
var
MaxProcessID, MaxBCPID, MaxPSID: string ;
2025-09-08 14:31:40 +08:00
maxsubid1, maxsubid2, maxsubid3, maxsubid4, maxsubid5, maxsubid6, mmaxgx, maxId: string ;
2025-07-05 10:17:25 +08:00
begin
try
ADOQueryCmd. Connection. BeginTrans;
///////////////////////////<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Dye_process////////////////////////////
with ADOQueryCmd do
begin
Filtered : = False ;
Close;
SQL. Clear;
sql. Add( ' select * from Dye_Process where PSID=' '' + Trim( FPSID) + '' '' ) ;
Open;
end ;
with ADOQueryCmd do
begin
if Trim( fieldbyname( 'PSID' ) . AsString) = '' then
begin
if GetLSNo( ADOQueryCmd, maxId, 'JP' , 'Dye_Process' , 4 , 1 ) = False then
begin
Result : = False ;
ADOQueryCmd. Connection. RollbackTrans;
Application. MessageBox( 'ȡ<> <C8A1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ʧ<EFBFBD> ܣ<EFBFBD> ' , '<27> <> ʾ ' , 0 ) ;
Exit;
end ;
end
else
begin
maxId : = Trim( FPSID) ;
end ;
with ADOQueryCmd do
begin
Close;
SQL. Clear;
sql. Add( 'select * from Dye_Process where PSID=' '' + Trim( maxId) + '' '' ) ;
Open;
end ;
with ADOQueryCmd do
begin
if Trim( FPSID) = '' then
begin
Append;
FieldByName( 'Filler' ) . Value : = Trim( DName) ;
end
else
begin
Edit;
FieldByName( 'Editer' ) . Value : = Trim( DName) ;
FieldByName( 'Edittime' ) . Value : = SGetServerDateTime( ADOQueryTemp) ;
end ;
RTSetsavedata( ADOQueryCmd, 'Dye_Process' , panel1, 2 ) ;
FieldByName( 'PSID' ) . Value : = Trim( maxId) ;
2025-09-08 14:31:40 +08:00
FieldByName( 'DTMID' ) . Value : = Trim( frmDyeTechnicsinput. FDTMID) ;
2025-07-05 10:17:25 +08:00
FieldByName( 'PSType' ) . Value : = Trim( FPSType) ;
Post;
end ;
end ;
///////////////////<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Dye_process////////////////////////////
//////////////// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> //////////////////////
with ADOQueryCmd do
begin
Close;
SQL. Clear;
2025-07-09 16:55:19 +08:00
sql. Add( 'select * from Bs_Cloth_GY_Main where PSID=' '' + Trim( maxId) + '' '' ) ;
2025-07-05 10:17:25 +08:00
Open;
end ;
with ADOQueryCmd do
begin
if Trim( FPSID) = '' then
begin
Append;
end
else
begin
Edit;
end ;
2025-07-09 16:55:19 +08:00
FieldByName( 'PSID' ) . Value : = Trim( maxId) ;
2025-08-01 15:42:49 +08:00
RTSetsavedata( ADOQueryCmd, 'Bs_Cloth_GY_Main' , panel_zm, 2 ) ;
RTSetsavedata( ADOQueryCmd, 'Bs_Cloth_GY_Main' , Panel_ccqx, 2 ) ;
RTSetsavedata( ADOQueryCmd, 'Bs_Cloth_GY_Main' , Panel_rgqx, 2 ) ;
RTSetsavedata( ADOQueryCmd, 'Bs_Cloth_GY_Main' , panel_jgqx, 2 ) ;
RTSetsavedata( ADOQueryCmd, 'Bs_Cloth_GY_Main' , panel_dx, 2 ) ;
RTSetsavedata( ADOQueryCmd, 'Bs_Cloth_GY_Main' , panel_fs, 2 ) ;
RTSetsavedata( ADOQueryCmd, 'Bs_Cloth_GY_Main' , panel_gj, 2 ) ;
RTSetsavedata( ADOQueryCmd, 'Bs_Cloth_GY_Main' , panel_fp, 2 ) ;
2025-07-05 10:17:25 +08:00
Post;
end ;
2025-09-08 14:31:40 +08:00
//////////////// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> //////////////////////
2025-07-05 10:17:25 +08:00
///
2025-09-08 14:31:40 +08:00
/////
////////////////// <20> <> <EFBFBD> 泤<EFBFBD> <E6B3A4> <EFBFBD> <EFBFBD> ϴ<EFBFBD> ӱ<EFBFBD> //////////////////////
2025-07-05 10:17:25 +08:00
with CDS_1 do
begin
First;
while not Eof do
begin
if Trim( CDS_1. fieldbyname( 'BCPID' ) . AsString) = '' then
begin
2025-09-08 14:31:40 +08:00
if GetLSNo( ADOQueryTemp, maxsubid1, 'CCQX' , 'Bs_Cloth_GY_Sub' , 5 , 1 ) = False then
2025-07-05 10:17:25 +08:00
begin
ADOQueryCmd. Connection. RollbackTrans;
Application. MessageBox( 'ȡ<> <C8A1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ˮ<EFBFBD> <CBAE> ʧ<EFBFBD> ܣ<EFBFBD> ' , '<27> <> ʾ ' , 0 ) ;
Exit;
end ;
end
else
begin
2025-09-08 14:31:40 +08:00
maxsubid1 : = Trim( CDS_1. fieldbyname( 'BCPID' ) . AsString) ;
2025-07-05 10:17:25 +08:00
end ;
with ADOQueryCmd do
begin
Close;
SQL. Clear;
sql. Add( 'select * from Bs_Cloth_GY_Sub where ' ) ;
2025-09-08 14:31:40 +08:00
sql. Add( ' BCPID=' '' + Trim( maxsubid1) + '' '' ) ;
2025-07-05 10:17:25 +08:00
Open;
end ;
with ADOQueryCmd do
begin
if Trim( CDS_1. fieldbyname( 'BCPID' ) . AsString) = '' then
begin
Append;
end
else
begin
Edit;
end ;
2025-09-08 14:31:40 +08:00
FieldByName( 'GYType' ) . Value : = '<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ϴ' ;
2025-07-09 16:55:19 +08:00
FieldByName( 'PSID' ) . Value : = Trim( maxId) ;
2025-09-08 14:31:40 +08:00
FieldByName( 'BCPID' ) . Value : = Trim( maxsubid1) ;
2025-07-05 10:17:25 +08:00
RTSetSaveDataCDS( ADOQueryCmd, Tv1, CDS_1, 'Bs_Cloth_GY_Sub' , 0 ) ;
Post;
end ;
2025-09-08 14:31:40 +08:00
// CDS_1.Edit;
// CDS_1.FieldByName('PSID').Value := Trim(maxId);
2025-07-05 10:17:25 +08:00
Next;
end ;
end ;
2025-09-08 14:31:40 +08:00
//////////////// <20> <> <EFBFBD> 泤<EFBFBD> <E6B3A4> <EFBFBD> <EFBFBD> ϴ<EFBFBD> ӱ<EFBFBD> <D3B1> <EFBFBD> <EFBFBD> <EFBFBD> //////////////////////
////////////////// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ⱦ<EFBFBD> <C8BE> <EFBFBD> <EFBFBD> ϴ<EFBFBD> ӱ<EFBFBD> //////////////////////
2025-07-05 10:17:25 +08:00
with CDS_2 do
begin
First;
while not Eof do
begin
if Trim( CDS_2. fieldbyname( 'BCPID' ) . AsString) = '' then
begin
2025-09-08 14:31:40 +08:00
if GetLSNo( ADOQueryTemp, maxsubid2, 'RGQX' , 'Bs_Cloth_GY_Sub' , 5 , 1 ) = False then
2025-07-05 10:17:25 +08:00
begin
ADOQueryCmd. Connection. RollbackTrans;
Application. MessageBox( 'ȡ<> <C8A1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ˮ<EFBFBD> <CBAE> ʧ<EFBFBD> ܣ<EFBFBD> ' , '<27> <> ʾ ' , 0 ) ;
Exit;
end ;
end
else
begin
2025-09-08 14:31:40 +08:00
maxsubid2 : = Trim( CDS_2. fieldbyname( 'BCPID' ) . AsString) ;
2025-07-05 10:17:25 +08:00
end ;
with ADOQueryCmd do
begin
Close;
SQL. Clear;
sql. Add( 'select * from Bs_Cloth_GY_Sub where ' ) ;
2025-09-08 14:31:40 +08:00
sql. Add( ' BCPID=' '' + Trim( maxsubid2) + '' '' ) ;
2025-07-05 10:17:25 +08:00
Open;
end ;
with ADOQueryCmd do
begin
if Trim( CDS_2. fieldbyname( 'BCPID' ) . AsString) = '' then
begin
Append;
end
else
begin
Edit;
end ;
2025-09-08 14:31:40 +08:00
FieldByName( 'GYType' ) . Value : = '<27> <> Ⱦ<EFBFBD> <C8BE> <EFBFBD> <EFBFBD> ϴ' ;
2025-07-09 16:55:19 +08:00
FieldByName( 'PSID' ) . Value : = Trim( maxId) ;
2025-09-08 14:31:40 +08:00
FieldByName( 'BCPID' ) . Value : = Trim( maxsubid2) ;
2025-07-05 10:17:25 +08:00
RTSetSaveDataCDS( ADOQueryCmd, Tv2, CDS_2, 'Bs_Cloth_GY_Sub' , 0 ) ;
Post;
end ;
2025-09-08 14:31:40 +08:00
// CDS_2.Edit;
// CDS_2.FieldByName('PSID').Value := Trim(maxId);
// CDS_2.FieldByName('PSID').Value := Trim(maxid2);
2025-07-05 10:17:25 +08:00
Next;
end ;
end ;
2025-09-08 14:31:40 +08:00
//////////////// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ⱦ<EFBFBD> <C8BE> <EFBFBD> <EFBFBD> ϴ<EFBFBD> ӱ<EFBFBD> <D3B1> <EFBFBD> <EFBFBD> <EFBFBD> //////////////////////
////////////////// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ϴ<EFBFBD> ӱ<EFBFBD> //////////////////////
2025-07-05 10:17:25 +08:00
with CDS_3 do
begin
First;
while not Eof do
begin
2025-09-08 14:31:40 +08:00
2025-07-05 10:17:25 +08:00
if Trim( CDS_3. fieldbyname( 'BCPID' ) . AsString) = '' then
begin
2025-09-08 14:31:40 +08:00
if GetLSNo( ADOQueryTemp, maxsubid3, 'JGQX' , 'Bs_Cloth_GY_Sub' , 5 , 1 ) = False then
2025-07-05 10:17:25 +08:00
begin
ADOQueryCmd. Connection. RollbackTrans;
Application. MessageBox( 'ȡ<> <C8A1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ˮ<EFBFBD> <CBAE> ʧ<EFBFBD> ܣ<EFBFBD> ' , '<27> <> ʾ ' , 0 ) ;
Exit;
end ;
end
else
begin
2025-09-08 14:31:40 +08:00
maxsubid3 : = Trim( CDS_3. fieldbyname( 'BCPID' ) . AsString) ;
2025-07-05 10:17:25 +08:00
end ;
with ADOQueryCmd do
begin
Close;
SQL. Clear;
sql. Add( 'select * from Bs_Cloth_GY_Sub where ' ) ;
2025-09-08 14:31:40 +08:00
sql. Add( ' BCPID=' '' + Trim( maxsubid3) + '' '' ) ;
2025-07-05 10:17:25 +08:00
Open;
end ;
with ADOQueryCmd do
begin
if Trim( CDS_3. fieldbyname( 'BCPID' ) . AsString) = '' then
begin
Append;
end
else
begin
Edit;
end ;
2025-09-08 14:31:40 +08:00
FieldByName( 'GYType' ) . Value : = '<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ϴ' ;
2025-07-09 16:55:19 +08:00
FieldByName( 'PSID' ) . Value : = Trim( maxId) ;
2025-09-08 14:31:40 +08:00
FieldByName( 'BCPID' ) . Value : = Trim( maxsubid3) ;
2025-07-05 10:17:25 +08:00
RTSetSaveDataCDS( ADOQueryCmd, Tv3, CDS_3, 'Bs_Cloth_GY_Sub' , 0 ) ;
Post;
end ;
2025-09-08 14:31:40 +08:00
// CDS_2.Edit;
// CDS_2.FieldByName('PSID').Value := Trim(maxId);
// CDS_2.FieldByName('PSID').Value := Trim(maxid2);
2025-07-05 10:17:25 +08:00
Next;
end ;
end ;
2025-09-08 14:31:40 +08:00
//////////////// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ϴ<EFBFBD> ӱ<EFBFBD> <D3B1> <EFBFBD> <EFBFBD> <EFBFBD> //////////////////////
////////////////// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ˮ<EFBFBD> <CBAE> <EFBFBD> <EFBFBD> ˮ<EFBFBD> <CBAE> <EFBFBD> ͣ<EFBFBD> <CDA3> ӱ<EFBFBD> //////////////////////
with CDS_4 do
begin
First;
while not Eof do
begin
if Trim( CDS_4. fieldbyname( 'BCPID' ) . AsString) = '' then
begin
if GetLSNo( ADOQueryTemp, maxsubid4, 'FS' , 'Bs_Cloth_GY_Sub' , 5 , 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
maxsubid4 : = Trim( CDS_4. fieldbyname( 'BCPID' ) . AsString) ;
end ;
with ADOQueryCmd do
begin
Close;
SQL. Clear;
sql. Add( 'select * from Bs_Cloth_GY_Sub where ' ) ;
sql. Add( ' BCPID=' '' + Trim( maxsubid4) + '' '' ) ;
Open;
end ;
with ADOQueryCmd do
begin
if Trim( CDS_4. fieldbyname( 'BCPID' ) . AsString) = '' then
begin
Append;
end
else
begin
Edit;
end ;
FieldByName( 'GYType' ) . Value : = '<27> <> ˮ<EFBFBD> <CBAE> <EFBFBD> <EFBFBD> ' ;
FieldByName( 'PSID' ) . Value : = Trim( maxId) ;
FieldByName( 'BCPID' ) . Value : = Trim( maxsubid4) ;
RTSetSaveDataCDS( ADOQueryCmd, Tv4, CDS_4, 'Bs_Cloth_GY_Sub' , 0 ) ;
Post;
end ;
// CDS_1.Edit;
// CDS_1.FieldByName('PSID').Value := Trim(maxId);
// CDS_1.FieldByName('BCPID').Value := Trim(maxid1);
Next;
end ;
end ;
//////////////// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ˮ<EFBFBD> <CBAE> <EFBFBD> <EFBFBD> ˮ<EFBFBD> <CBAE> <EFBFBD> ͣ<EFBFBD> <CDA3> ӱ<EFBFBD> <D3B1> <EFBFBD> <EFBFBD> <EFBFBD> //////////////////////
////////////////// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ν <EFBFBD> <CEBD> ӱ<EFBFBD> //////////////////////
with CDS_5 do
begin
First;
while not Eof do
begin
if Trim( CDS_5. fieldbyname( 'BCPID' ) . AsString) = '' then
begin
if GetLSNo( ADOQueryTemp, maxsubid5, 'GJ' , 'Bs_Cloth_GY_Sub' , 5 , 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
maxsubid5 : = Trim( CDS_5. fieldbyname( 'BCPID' ) . AsString) ;
end ;
with ADOQueryCmd do
begin
Close;
SQL. Clear;
sql. Add( 'select * from Bs_Cloth_GY_Sub where ' ) ;
sql. Add( ' BCPID=' '' + Trim( maxsubid5) + '' '' ) ;
Open;
end ;
with ADOQueryCmd do
begin
if Trim( CDS_5. fieldbyname( 'BCPID' ) . AsString) = '' then
begin
Append;
end
else
begin
Edit;
end ;
FieldByName( 'GYType' ) . Value : = '<27> ν <EFBFBD> ' ;
FieldByName( 'PSID' ) . Value : = Trim( maxId) ;
FieldByName( 'BCPID' ) . Value : = Trim( maxsubid5) ;
RTSetSaveDataCDS( ADOQueryCmd, Tv5, CDS_5, 'Bs_Cloth_GY_Sub' , 0 ) ;
Post;
end ;
// CDS_5.Edit;
// CDS_5.FieldByName('PSID').Value := Trim(maxId);
// CDS_5.FieldByName('PSID').Value := Trim(maxid2);
Next;
end ;
end ;
//////////////// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ν <EFBFBD> <CEBD> ӱ<EFBFBD> <D3B1> <EFBFBD> <EFBFBD> <EFBFBD> //////////////////////
2025-07-05 10:17:25 +08:00
///
2025-09-08 14:31:40 +08:00
/// ////////////////// <20> <> <EFBFBD> 淢<EFBFBD> <E6B7A2> <EFBFBD> ӱ<EFBFBD> //////////////////////
with CDS_6 do
begin
First;
while not Eof do
begin
if Trim( CDS_6. Fieldbyname( 'BCPID' ) . AsString) = '' then
begin
if GetLSNo( ADOQueryTemp, maxsubid6, 'FP' , 'Bs_Cloth_GY_Sub' , 5 , 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
maxsubid6 : = Trim( CDS_6. fieldbyname( 'BCPID' ) . AsString) ;
end ;
with ADOQueryCmd do
begin
Close;
SQL. Clear;
sql. Add( 'select * from Bs_Cloth_GY_Sub where ' ) ;
sql. Add( 'BCPID=' '' + Trim( maxsubid6) + '' '' ) ;
Open;
end ;
with ADOQueryCmd do
begin
if Trim( CDS_6. fieldbyname( 'BCPID' ) . AsString) = '' then
begin
Append;
end
else
begin
Edit;
end ;
FieldByName( 'GYType' ) . Value : = '<27> <> <EFBFBD> <EFBFBD> ' ;
FieldByName( 'PSID' ) . Value : = Trim( maxId) ;
FieldByName( 'BCPID' ) . Value : = Trim( maxsubid6) ;
RTSetSaveDataCDS( ADOQueryCmd, Tv6, CDS_6, 'Bs_Cloth_GY_Sub' , 0 ) ;
Post;
end ;
// CDS_3.Edit;
// CDS_3.FieldByName('PSID').Value := Trim(maxId);
// CDS_3.FieldByName('PSID').Value := Trim(maxid3);
2025-07-05 10:17:25 +08:00
2025-09-08 14:31:40 +08:00
Next;
end ;
end ;
//////////////// <20> <> <EFBFBD> 淢<EFBFBD> <E6B7A2> <EFBFBD> ӱ<EFBFBD> <D3B1> <EFBFBD> <EFBFBD> <EFBFBD> //////////////////////
2025-07-05 10:17:25 +08:00
ADOQueryCmd. Connection. CommitTrans;
FPSID : = maxId;
Result : = True ;
except
Result : = False ;
ADOQueryCmd. Connection. RollbackTrans;
Application. MessageBox( '<27> <> <EFBFBD> <EFBFBD> ʧ<EFBFBD> <CAA7> !' , '<27> <> ʾ ' , 0 ) ;
end ;
end ;
procedure TfrmDyeProcessDefin. CYJGGYBtnDnClick( Sender: TObject) ;
begin
TBtnEditC( Sender) . Text : = '' ;
end ;
procedure TfrmDyeProcessDefin. TbSaveClick( Sender: TObject) ;
var
MC_Code: string ;
begin
if CheckData( ) and SaveData( ) then
begin
Application. MessageBox( '<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ɹ<EFBFBD> <C9B9> <EFBFBD> ' , '<27> <> ʾ ' , 0 ) ;
ModalResult : = 1 ;
end ;
end ;
2025-08-01 15:42:49 +08:00
procedure TfrmDyeProcessDefin. TbDXReplace1Click( Sender: TObject) ;
2025-07-05 10:17:25 +08:00
begin
2025-08-01 15:42:49 +08:00
FillAllTextEditsWithValue( panel_dx, '<27> ɶ<EFBFBD> <C9B6> <EFBFBD> <EFBFBD> ȷ<EFBFBD> ' , FindLastEditedTextEdit( panel_dx, '<27> ɶ<EFBFBD> <C9B6> <EFBFBD> <EFBFBD> ȷ<EFBFBD> ' ) ) ;
end ;
procedure TfrmDyeProcessDefin. TbDXReplace2Click( Sender: TObject) ;
begin
FillAllTextEditsWithValue( panel_dx, '<27> ɶ<EFBFBD> <C9B6> <EFBFBD> <EFBFBD> ¿<EFBFBD> ' , FindLastEditedTextEdit( panel_dx, '<27> ɶ<EFBFBD> <C9B6> <EFBFBD> <EFBFBD> ¿<EFBFBD> ' ) ) ;
end ;
2025-09-08 14:31:40 +08:00
procedure TfrmDyeProcessDefin. TbDXReplace3Click( Sender: TObject) ;
begin
FillAllTextEditsWithValue( panel_dx, '<27> ɶ<EFBFBD> <C9B6> <EFBFBD> <EFBFBD> ŷ<EFBFBD> ' , FindLastEditedTextEdit( panel_dx, '<27> ɶ<EFBFBD> <C9B6> <EFBFBD> <EFBFBD> ŷ<EFBFBD> ' ) ) ;
end ;
2025-08-01 15:42:49 +08:00
procedure TfrmDyeProcessDefin. TbFPClear1Click( Sender: TObject) ;
begin
ClearAllTextEditsByHint( panel_Fp, '<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ȷ<EFBFBD> ' ) ;
end ;
procedure TfrmDyeProcessDefin. TbFPClear2Click( Sender: TObject) ;
begin
ClearAllTextEditsByHint( panel_Fp, '<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ¿<EFBFBD> ' ) ;
end ;
2025-09-08 14:31:40 +08:00
procedure TfrmDyeProcessDefin. TbFPClear3Click( Sender: TObject) ;
begin
ClearAllTextEditsByHint( panel_Fp, '<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ŷ<EFBFBD> ' ) ;
end ;
2025-08-01 15:42:49 +08:00
procedure TfrmDyeProcessDefin. TbFPReplace1Click( Sender: TObject) ;
begin
FillAllTextEditsWithValue( panel_fp, '<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ȷ<EFBFBD> ' , FindLastEditedTextEdit( panel_fp, '<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ȷ<EFBFBD> ' ) ) ;
end ;
procedure TfrmDyeProcessDefin. TbFPReplace2Click( Sender: TObject) ;
begin
FillAllTextEditsWithValue( panel_fp, '<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ¿<EFBFBD> ' , FindLastEditedTextEdit( panel_fp, '<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ¿<EFBFBD> ' ) ) ;
2025-07-05 10:17:25 +08:00
end ;
procedure TfrmDyeProcessDefin. TbFPReplaceClick( Sender: TObject) ;
begin
FillAllTextEditsWithValue( panel5, '<27> <> <EFBFBD> ݺ<EFBFBD> <DDBA> <EFBFBD> <EFBFBD> ¶<EFBFBD> ' , FindLastEditedTextEdit( panel5, '<27> <> <EFBFBD> ݺ<EFBFBD> <DDBA> <EFBFBD> <EFBFBD> ¶<EFBFBD> ' ) ) ;
end ;
2025-08-01 15:42:49 +08:00
procedure TfrmDyeProcessDefin. TbFSClear1Click( Sender: TObject) ;
begin
ClearAllTextEditsByHint( Panel_fs, '<27> <> ˮ<EFBFBD> ȷ<EFBFBD> ' ) ;
end ;
procedure TfrmDyeProcessDefin. TBFScLEAR2Click( Sender: TObject) ;
begin
ClearAllTextEditsByHint( panel_FS, '<27> <> ˮ<EFBFBD> ¿<EFBFBD> ' ) ;
end ;
procedure TfrmDyeProcessDefin. TbGJReplace1Click( Sender: TObject) ;
begin
FillAllTextEditsWithValue( panel_gj, '<27> ν <EFBFBD> <CEBD> ȷ<EFBFBD> ' , FindLastEditedTextEdit( Panel_gj, '<27> ν <EFBFBD> <CEBD> ȷ<EFBFBD> ' ) ) ;
end ;
procedure TfrmDyeProcessDefin. TbGJReplace2Click( Sender: TObject) ;
begin
FillAllTextEditsWithValue( panel_gj, '<27> ν <EFBFBD> <CEBD> ¿<EFBFBD> ' , FindLastEditedTextEdit( panel_gj, '<27> ν <EFBFBD> <CEBD> ¿<EFBFBD> ' ) ) ;
end ;
2025-09-08 14:31:40 +08:00
procedure TfrmDyeProcessDefin. TbGJReplace3Click( Sender: TObject) ;
2025-07-05 10:17:25 +08:00
begin
2025-09-08 14:31:40 +08:00
FillAllTextEditsWithValue( panel_gj, '<27> ν <EFBFBD> <CEBD> ŷ<EFBFBD> ' , FindLastEditedTextEdit( Panel_gj, '<27> ν <EFBFBD> <CEBD> ŷ<EFBFBD> ' ) ) ;
2025-07-05 10:17:25 +08:00
end ;
2025-09-08 14:31:40 +08:00
procedure TfrmDyeProcessDefin. TbGJReplaceClick( Sender: TObject) ;
2025-07-05 10:17:25 +08:00
begin
2025-09-08 14:31:40 +08:00
FillAllTextEditsWithValue( panel6, '<27> ν <EFBFBD> <CEBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ¶<EFBFBD> ' , FindLastEditedTextEdit( panel6, '<27> ν <EFBFBD> <CEBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ¶<EFBFBD> ' ) ) ;
2025-07-05 10:17:25 +08:00
end ;
2025-09-08 14:31:40 +08:00
procedure TfrmDyeProcessDefin. TbjgqxAddClick( Sender: TObject) ;
2025-07-05 10:17:25 +08:00
begin
with CDS_3 do
begin
Append;
CDS_3. FieldByName( 'serialno' ) . Value : = CDS_3. RecordCount + 1 ;
2025-09-08 14:31:40 +08:00
CDS_3. FieldByName( 'jgqx_unit' ) . Value : = '%' ;
2025-07-05 10:17:25 +08:00
Post;
end ;
end ;
2025-09-08 14:31:40 +08:00
procedure TfrmDyeProcessDefin. TbjgqxDelClick( Sender: TObject) ;
var
i: Integer ;
begin
if not CDS_3. IsEmpty then
begin
if Application. MessageBox( 'ȷ<> <C8B7> Ҫɾ<D2AA> <C9BE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ' , '<27> <> ʾ ' , 3 2 + 4 ) = IDYES then
begin
if Trim( CDS_3. fieldbyname( 'BCPID' ) . AsString) < > '' then
begin
with ADOQueryCmd do
begin
Close;
sql. Clear;
sql. Add( 'delete BS_Cloth_GY_Sub where BCPID=' + QuotedStr( Trim( CDS_3. fieldbyname( 'BCPID' ) . AsString) ) ) ;
ExecSQL;
end ;
end ;
CDS_3. Delete;
end
else
exit;
i : = 0 ;
CDS_3. First;
while not CDS_3. Eof do
begin
i : = i + 1 ;
CDS_3. Edit;
CDS_3. fieldByName( 'serialno' ) . value : = i;
CDS_3. Post;
CDS_3. Next;
end ;
end
else
begin
Application. MessageBox( '<27> <EFBFBD> ɾ<EFBFBD> <C9BE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> !' , '<27> <> ʾ ' , 0 ) ;
Exit;
end ;
end ;
procedure TfrmDyeProcessDefin. TbrgqxAddClick( Sender: TObject) ;
begin
with CDS_2 do
begin
Append;
CDS_2. FieldByName( 'serialno' ) . Value : = CDS_2. RecordCount + 1 ;
CDS_2. FieldByName( 'rgqx_unit' ) . Value : = '%' ;
Post;
end ;
end ;
procedure TfrmDyeProcessDefin. TbrgqxDelClick( Sender: TObject) ;
var
i: Integer ;
begin
if not CDS_2. IsEmpty then
begin
if Application. MessageBox( 'ȷ<> <C8B7> Ҫɾ<D2AA> <C9BE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ' , '<27> <> ʾ ' , 3 2 + 4 ) = IDYES then
begin
if Trim( CDS_2. fieldbyname( 'BCPID' ) . AsString) < > '' then
begin
with ADOQueryCmd do
begin
Close;
sql. Clear;
sql. Add( 'delete BS_Cloth_GY_Sub where BCPID=' + QuotedStr( Trim( CDS_2. fieldbyname( 'BCPID' ) . AsString) ) ) ;
ExecSQL;
end ;
end ;
CDS_2. Delete;
end
else
exit;
i : = 0 ;
CDS_2. First;
while not CDS_2. Eof do
begin
i : = i + 1 ;
CDS_2. Edit;
CDS_2. fieldByName( 'serialno' ) . value : = i;
CDS_2. Post;
CDS_2. Next;
end ;
end
else
begin
Application. MessageBox( '<27> <EFBFBD> ɾ<EFBFBD> <C9BE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> !' , '<27> <> ʾ ' , 0 ) ;
Exit;
end ;
end ;
procedure TfrmDyeProcessDefin. TbfsAddClick( Sender: TObject) ;
begin
with CDS_4 do
begin
Append;
CDS_4. FieldByName( 'serialno' ) . Value : = CDS_4. RecordCount + 1 ;
CDS_4. FieldByName( 'fs_unit' ) . Value : = '%' ;
Post;
end ;
end ;
procedure TfrmDyeProcessDefin. TbfpAddClick( Sender: TObject) ;
begin
with CDS_6 do
begin
Append;
CDS_6. FieldByName( 'serialno' ) . Value : = CDS_6. RecordCount + 1 ;
CDS_6. FieldByName( 'fp_unit' ) . Value : = '%' ;
Post;
end ;
end ;
procedure TfrmDyeProcessDefin. TbgjAddClick( Sender: TObject) ;
begin
with CDS_5 do
begin
Append;
CDS_5. FieldByName( 'serialno' ) . Value : = CDS_5. RecordCount + 1 ;
CDS_5. FieldByName( 'gj_unit' ) . Value : = '%' ;
Post;
end ;
end ;
procedure TfrmDyeProcessDefin. TbccqxAddClick( Sender: TObject) ;
begin
with CDS_1 do
begin
Append;
CDS_1. FieldByName( 'serialno' ) . Value : = CDS_1. RecordCount + 1 ;
CDS_1. FieldByName( 'ccqx_unit' ) . Value : = '%' ;
Post;
end ;
end ;
procedure TfrmDyeProcessDefin. TbccqxClearClick( Sender: TObject) ;
2025-08-01 15:42:49 +08:00
begin
ClearAllTextEditsByHint( panel_ccqx, '<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ϴ<EFBFBD> ¿<EFBFBD> ' ) ;
end ;
2025-09-08 14:31:40 +08:00
procedure TfrmDyeProcessDefin. TbccqxDelClick( Sender: TObject) ;
2025-07-05 10:17:25 +08:00
var
i: Integer ;
begin
if not CDS_1. IsEmpty then
begin
if Application. MessageBox( 'ȷ<> <C8B7> Ҫɾ<D2AA> <C9BE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ' , '<27> <> ʾ ' , 3 2 + 4 ) = IDYES then
begin
if Trim( CDS_1. fieldbyname( 'BCPID' ) . AsString) < > '' then
begin
with ADOQueryCmd do
begin
Close;
sql. Clear;
2025-09-08 14:31:40 +08:00
sql. Add( 'delete BS_Cloth_GY_Sub where BCPID=' + quotedStr( Trim( CDS_1. fieldbyname( 'BCPID' ) . AsString) ) ) ;
2025-07-05 10:17:25 +08:00
ExecSQL;
end ;
end ;
CDS_1. Delete;
end
else
exit;
i : = 0 ;
CDS_1. First;
while not CDS_1. Eof do
begin
i : = i + 1 ;
CDS_1. Edit;
CDS_1. fieldByName( 'serialno' ) . value : = i;
CDS_1. Post;
CDS_1. Next;
end ;
end
else
begin
Application. MessageBox( '<27> <EFBFBD> ɾ<EFBFBD> <C9BE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> !' , '<27> <> ʾ ' , 0 ) ;
Exit;
end ;
end ;
2025-09-08 14:31:40 +08:00
procedure TfrmDyeProcessDefin. TbfsDelClick( Sender: TObject) ;
2025-07-05 10:17:25 +08:00
var
i: Integer ;
begin
2025-09-08 14:31:40 +08:00
if not CDS_4. IsEmpty then
2025-07-05 10:17:25 +08:00
begin
if Application. MessageBox( 'ȷ<> <C8B7> Ҫɾ<D2AA> <C9BE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ' , '<27> <> ʾ ' , 3 2 + 4 ) = IDYES then
begin
2025-09-08 14:31:40 +08:00
if Trim( CDS_4. fieldbyname( 'BCPID' ) . AsString) < > '' then
2025-07-05 10:17:25 +08:00
begin
with ADOQueryCmd do
begin
Close;
sql. Clear;
2025-09-08 14:31:40 +08:00
sql. Add( 'delete BS_Cloth_GY_Sub where BCPID=' + QuotedStr( Trim( CDS_4. fieldbyname( 'BCPID' ) . AsString) ) ) ;
2025-07-05 10:17:25 +08:00
ExecSQL;
end ;
end ;
2025-09-08 14:31:40 +08:00
CDS_4. Delete;
2025-07-05 10:17:25 +08:00
end
else
exit;
i : = 0 ;
2025-09-08 14:31:40 +08:00
CDS_4. First;
while not CDS_4. Eof do
2025-07-05 10:17:25 +08:00
begin
i : = i + 1 ;
2025-09-08 14:31:40 +08:00
CDS_4. Edit;
CDS_4. fieldByName( 'serialno' ) . value : = i;
CDS_4. Post;
CDS_4. Next;
2025-07-05 10:17:25 +08:00
end ;
end
else
begin
Application. MessageBox( '<27> <EFBFBD> ɾ<EFBFBD> <C9BE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> !' , '<27> <> ʾ ' , 0 ) ;
Exit;
end ;
end ;
2025-09-08 14:31:40 +08:00
procedure TfrmDyeProcessDefin. TbfpDelClick( Sender: TObject) ;
2025-07-05 10:17:25 +08:00
var
i: Integer ;
begin
2025-09-08 14:31:40 +08:00
if not CDS_6. IsEmpty then
2025-07-05 10:17:25 +08:00
begin
if Application. MessageBox( 'ȷ<> <C8B7> Ҫɾ<D2AA> <C9BE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ' , '<27> <> ʾ ' , 3 2 + 4 ) = IDYES then
begin
2025-09-08 14:31:40 +08:00
if Trim( CDS_6. fieldbyname( 'BCPID' ) . AsString) < > '' then
2025-07-05 10:17:25 +08:00
begin
with ADOQueryCmd do
begin
Close;
sql. Clear;
2025-09-08 14:31:40 +08:00
sql. Add( 'delete BS_Cloth_GY_Sub where BCPID=' + QuotedStr( ( CDS_6. fieldbyname( 'BCPID' ) . AsString) ) ) ;
2025-07-05 10:17:25 +08:00
ExecSQL;
end ;
end ;
2025-09-08 14:31:40 +08:00
CDS_6. Delete;
2025-07-05 10:17:25 +08:00
end
else
exit;
i : = 0 ;
2025-09-08 14:31:40 +08:00
CDS_6. First;
while not CDS_6. Eof do
2025-07-05 10:17:25 +08:00
begin
i : = i + 1 ;
2025-09-08 14:31:40 +08:00
CDS_6. Edit;
CDS_6. fieldByName( 'serialno' ) . value : = i;
CDS_6. Post;
CDS_6. Next;
end ;
end
else
begin
Application. MessageBox( '<27> <EFBFBD> ɾ<EFBFBD> <C9BE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> !' , '<27> <> ʾ ' , 0 ) ;
Exit;
end ;
end ;
procedure TfrmDyeProcessDefin. TbgjDelClick( Sender: TObject) ;
var
i: Integer ;
begin
if not CDS_5. IsEmpty then
begin
if Application. MessageBox( 'ȷ<> <C8B7> Ҫɾ<D2AA> <C9BE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ' , '<27> <> ʾ ' , 3 2 + 4 ) = IDYES then
begin
if Trim( CDS_5. fieldbyname( 'BCPID' ) . AsString) < > '' then
begin
with ADOQueryCmd do
begin
Close;
sql. Clear;
sql. Add( 'delete BS_Cloth_GY_Sub where BCPID=' + QuotedStr( Trim( CDS_5. fieldbyname( 'BCPID' ) . AsString) ) ) ;
ExecSQL;
end ;
end ;
CDS_5. Delete;
end
else
exit;
i : = 0 ;
CDS_5. First;
while not CDS_5. Eof do
begin
i : = i + 1 ;
CDS_5. Edit;
CDS_5. fieldByName( 'serialno' ) . value : = i;
CDS_5. Post;
CDS_5. Next;
2025-07-05 10:17:25 +08:00
end ;
end
else
begin
Application. MessageBox( '<27> <EFBFBD> ɾ<EFBFBD> <C9BE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> !' , '<27> <> ʾ ' , 0 ) ;
Exit;
end ;
end ;
procedure TfrmDyeProcessDefin. TbCPReplaceClick( Sender: TObject) ;
begin
FillAllTextEditsWithValue( panel2, '<27> <> ϴˮ<CFB4> <CBAE> ' , FindLastEditedTextEdit( panel2, '<27> <> ϴˮ<CFB4> <CBAE> ' ) ) ;
end ;
function TfrmDyeProcessDefin. FindLastEditedTextEdit( AParent: TWinControl; const AHint: string ) : string ;
var
i, j: Integer ;
AControl: TControl;
SortedControls: TList;
TempControl: TControl;
begin
Result : = '' ;
// <20> <> <EFBFBD> <EFBFBD> û<EFBFBD> <C3BB> <EFBFBD> ӿؼ<D3BF> <D8BC> <EFBFBD> ֱ<EFBFBD> ӷ<EFBFBD> <D3B7> ؿ<EFBFBD>
if AParent. ControlCount = 0 then
Exit;
// ʹ <> <CAB9> TList <20> 洢<EFBFBD> ؼ<EFBFBD> <D8BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ݾɰ<DDBE> Delphi<68> <69>
SortedControls : = TList. Create;
try
// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ӿؼ<D3BF> <D8BC> <EFBFBD> <EFBFBD> ӵ<EFBFBD> <D3B5> б <EFBFBD>
for i : = 0 to AParent. ControlCount - 1 do
SortedControls. Add( AParent. Controls[ i] ) ;
// <20> ֶ<EFBFBD> <D6B6> <EFBFBD> <EFBFBD> <EFBFBD> Top<6F> <70> Y<EFBFBD> <59> <EFBFBD> ꣩<EFBFBD> <EAA3A9> Left<66> <74> X<EFBFBD> <58> <EFBFBD> ꣩<EFBFBD> <EAA3A9> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
for i : = 0 to SortedControls. Count - 1 do
begin
for j : = i + 1 to SortedControls. Count - 1 do
begin
// <20> Ƚ<EFBFBD> <C8BD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ؼ<EFBFBD> <D8BC> <EFBFBD> Top <20> <> Left
if ( TControl( SortedControls[ i] ) . Top > TControl( SortedControls[ j] ) . Top) or ( ( TControl( SortedControls[ i] ) . Top = TControl( SortedControls[ j] ) . Top) and ( TControl( SortedControls[ i] ) . Left > TControl( SortedControls[ j] ) . Left) ) then
begin
// <20> <> <EFBFBD> <EFBFBD> λ<EFBFBD> <CEBB>
TempControl : = TControl( SortedControls[ i] ) ;
SortedControls[ i] : = SortedControls[ j] ;
SortedControls[ j] : = TempControl;
end ;
end ;
end ;
// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ŀؼ<C4BF>
for i : = 0 to SortedControls. Count - 1 do
begin
AControl : = TControl( SortedControls[ i] ) ;
if ( AControl is TcxTextEdit) and ( TcxTextEdit( AControl) . Hint = AHint) and ( TcxTextEdit( AControl) . Text < > '' ) then
begin
Result : = TcxTextEdit( AControl) . Text ; // <20> <> <EFBFBD> <EFBFBD> һ <EFBFBD> <D2BB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ļᱻ<C4BB> <E1B1BB> <EFBFBD> <EFBFBD>
end ;
end ;
finally
SortedControls. Free;
end ;
end ;
procedure TfrmDyeProcessDefin. FillAllTextEditsWithValue( AParent: TWinControl; const AHint, AValue: string ; AExclude: TcxTextEdit = nil ) ; // <20> <> ѡ <EFBFBD> <D1A1> <EFBFBD> ų<EFBFBD> <C5B3> ض<EFBFBD> <D8B6> ؼ<EFBFBD>
var
i: Integer ;
AControl: TControl;
ATextEdit: TcxTextEdit;
begin
for i : = 0 to AParent. ControlCount - 1 do
begin
AControl : = AParent. Controls[ i] ;
if ( AControl is TcxTextEdit) and ( ( AControl as TcxTextEdit) . Text = '' ) then
begin
ATextEdit : = AControl as TcxTextEdit;
if ( ATextEdit. Hint = AHint) and ( ATextEdit < > AExclude) then
ATextEdit. Text : = AValue;
end ;
end ;
end ;
procedure TfrmDyeProcessDefin. ClearAllTextEditsByHint( AParent: TWinControl; const AHint: string ; AExclude: TcxTextEdit = nil ) ;
var
i: Integer ;
AControl: TControl;
begin
for i : = 0 to AParent. ControlCount - 1 do
begin
AControl : = AParent. Controls[ i] ;
// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> Ƿ<EFBFBD> <C7B7> <EFBFBD> TcxTextEdit<69> <74> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Hint ƥ<> 䣬<EFBFBD> Ҳ<EFBFBD> <D2B2> <EFBFBD> <EFBFBD> ų<EFBFBD> <C5B3> Ŀؼ<C4BF>
if ( AControl is TcxTextEdit) and ( TcxTextEdit( AControl) . Hint = AHint) and ( TcxTextEdit( AControl) < > AExclude) then
begin
TcxTextEdit( AControl) . Text : = '' ; // ֱ<> <D6B1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
end ;
end ;
end ;
2025-08-12 13:42:42 +08:00
procedure TfrmDyeProcessDefin. TbFSReplace3Click( Sender: TObject) ;
2025-07-05 10:17:25 +08:00
begin
2025-08-12 13:42:42 +08:00
FillAllTextEditsWithValue( panel_fs, '<27> <> ˮ<EFBFBD> ŷ<EFBFBD> ' , FindLastEditedTextEdit( panel_fs, '<27> <> ˮ<EFBFBD> ŷ<EFBFBD> ' ) ) ;
2025-07-05 10:17:25 +08:00
end ;
2025-08-12 13:42:42 +08:00
procedure TfrmDyeProcessDefin. TbFSClear3Click( Sender: TObject) ;
2025-07-05 10:17:25 +08:00
begin
2025-08-12 13:42:42 +08:00
ClearAllTextEditsByHint( panel_fs, '<27> <> ˮ<EFBFBD> ŷ<EFBFBD> ' ) ;
2025-07-05 10:17:25 +08:00
end ;
2025-08-01 15:42:49 +08:00
procedure TfrmDyeProcessDefin. TbCCQXReplaceClick( Sender: TObject) ;
begin
FillAllTextEditsWithValue( panel_ccqx, '<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ϴ<EFBFBD> ¿<EFBFBD> ' , FindLastEditedTextEdit( panel_ccqx, '<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ϴ<EFBFBD> ¿<EFBFBD> ' ) ) ;
end ;
procedure TfrmDyeProcessDefin. TbDXClear1Click( Sender: TObject) ;
2025-07-05 10:17:25 +08:00
begin
2025-08-01 15:42:49 +08:00
ClearAllTextEditsByHint( panel_DX, '<27> ɶ<EFBFBD> <C9B6> <EFBFBD> <EFBFBD> ȷ<EFBFBD> ' ) ;
end ;
procedure TfrmDyeProcessDefin. TbDXClear2Click( Sender: TObject) ;
begin
ClearAllTextEditsByHint( panel_DX, '<27> ɶ<EFBFBD> <C9B6> <EFBFBD> <EFBFBD> ¿<EFBFBD> ' ) ;
2025-07-05 10:17:25 +08:00
end ;
2025-09-08 14:31:40 +08:00
procedure TfrmDyeProcessDefin. TbDXClear3Click( Sender: TObject) ;
2025-08-01 15:42:49 +08:00
begin
2025-09-08 14:31:40 +08:00
ClearAllTextEditsByHint( panel_DX, '<27> ɶ<EFBFBD> <C9B6> <EFBFBD> <EFBFBD> ŷ<EFBFBD> ' ) ;
2025-08-01 15:42:49 +08:00
end ;
2025-09-08 14:31:40 +08:00
procedure TfrmDyeProcessDefin. TbFPReplace3Click( Sender: TObject) ;
2025-07-05 10:17:25 +08:00
begin
2025-09-08 14:31:40 +08:00
FillAllTextEditsWithValue( panel_fp, '<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ŷ<EFBFBD> ' , FindLastEditedTextEdit( panel_fp, '<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ŷ<EFBFBD> ' ) ) ;
2025-07-05 10:17:25 +08:00
end ;
2025-09-08 14:31:40 +08:00
procedure TfrmDyeProcessDefin. cxButton4Click( Sender: TObject) ;
2025-08-01 15:42:49 +08:00
begin
2025-09-08 14:31:40 +08:00
ClearAllTextEditsByHint( panel5, '<27> <> <EFBFBD> ݺ<EFBFBD> <DDBA> <EFBFBD> <EFBFBD> ¶<EFBFBD> ' ) ;
2025-08-01 15:42:49 +08:00
end ;
2025-09-08 14:31:40 +08:00
procedure TfrmDyeProcessDefin. cxGridDBColumn11PropertiesEditValueChanged( Sender: TObject) ;
var
s: string ;
fValue: Double ;
2025-07-05 10:17:25 +08:00
begin
2025-09-08 14:31:40 +08:00
s : = TcxTextEdit( Sender) . EditingText;
2025-07-05 10:17:25 +08:00
2025-09-08 14:31:40 +08:00
if ( s < > '' ) and ( s[ Length( s) ] < > '%' ) then
2025-07-05 10:17:25 +08:00
begin
2025-09-08 14:31:40 +08:00
try
// <20> <> <EFBFBD> Խ<EFBFBD> <D4BD> ַ<EFBFBD> <D6B7> <EFBFBD> ת<EFBFBD> <D7AA> Ϊ<EFBFBD> <CEAA> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
fValue : = StrToFloat( s) ;
// <20> <> ʽ <EFBFBD> <CABD> Ϊ<EFBFBD> <CEAA> λС <CEBB> <D0A1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ӱٷֺ<D9B7>
Tv3. Controller. FocusedColumn. EditValue : = FormatFloat( '0.00' , fValue) + '%' ;
except
on E: EConvertError do
2025-07-05 10:17:25 +08:00
begin
2025-09-08 14:31:40 +08:00
// <20> <> <EFBFBD> <EFBFBD> ת<EFBFBD> <D7AA> ʧ<EFBFBD> ܣ<EFBFBD> <DCA3> <EFBFBD> <EFBFBD> <EFBFBD> ԭ<EFBFBD> <D4AD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ӱٷֺ<D9B7>
Tv3. Controller. FocusedColumn. EditValue : = s + '%' ;
2025-07-05 10:17:25 +08:00
end ;
end ;
end ;
end ;
2025-09-08 14:31:40 +08:00
procedure TfrmDyeProcessDefin. cxGridDBColumn14PropertiesButtonClick( Sender: TObject; AButtonIndex: Integer ) ;
2025-07-05 10:17:25 +08:00
begin
try
frmProductInfoSel : = TfrmProductInfoSel. Create( Application) ;
with frmProductInfoSel do
begin
FSTKName : = '<27> <> <EFBFBD> <EFBFBD> ' ;
if ShowModal = 1 then
begin
2025-09-08 14:31:40 +08:00
with Self. CDS_2 do
2025-07-05 10:17:25 +08:00
begin
Edit;
2025-09-08 14:31:40 +08:00
FieldByName( 'rgqx_Name' ) . Value : = frmProductInfoSel. CDS_1. fieldbyname( 'P_Name' ) . value;
FieldByName( 'rgqx_spel' ) . Value : = frmProductInfoSel. CDS_1. fieldbyname( 'P_Type' ) . value;
FieldByName( 'rgqx_unit' ) . Value : = frmProductInfoSel. CDS_1. fieldbyname( 'QtyUnit' ) . value;
2025-07-05 10:17:25 +08:00
end ;
end ;
end ;
finally
frmProductInfoSel. Free;
end ;
end ;
2025-09-08 14:31:40 +08:00
procedure TfrmDyeProcessDefin. cxGridDBColumn20PropertiesEditValueChanged( Sender: TObject) ;
2025-07-05 10:17:25 +08:00
var
s: string ;
2025-09-08 14:31:40 +08:00
fValue: Double ;
2025-07-05 10:17:25 +08:00
begin
s : = TcxTextEdit( Sender) . EditingText;
2025-09-08 14:31:40 +08:00
2025-07-05 10:17:25 +08:00
if ( s < > '' ) and ( s[ Length( s) ] < > '%' ) then
begin
2025-09-08 14:31:40 +08:00
try
// <20> <> <EFBFBD> Խ<EFBFBD> <D4BD> ַ<EFBFBD> <D6B7> <EFBFBD> ת<EFBFBD> <D7AA> Ϊ<EFBFBD> <CEAA> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
fValue : = StrToFloat( s) ;
// <20> <> ʽ <EFBFBD> <CABD> Ϊ<EFBFBD> <CEAA> λС <CEBB> <D0A1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ӱٷֺ<D9B7>
Tv2. Controller. FocusedColumn. EditValue : = FormatFloat( '0.00' , fValue) + '%' ;
except
on E: EConvertError do
begin
// <20> <> <EFBFBD> <EFBFBD> ת<EFBFBD> <D7AA> ʧ<EFBFBD> ܣ<EFBFBD> <DCA3> <EFBFBD> <EFBFBD> <EFBFBD> ԭ<EFBFBD> <D4AD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ӱٷֺ<D9B7>
Tv2. Controller. FocusedColumn. EditValue : = s + '%' ;
end ;
end ;
2025-07-05 10:17:25 +08:00
end ;
end ;
2025-09-08 14:31:40 +08:00
procedure TfrmDyeProcessDefin. cxGridDBColumn2PropertiesButtonClick( Sender: TObject; AButtonIndex: Integer ) ;
2025-07-05 10:17:25 +08:00
begin
try
frmProductInfoSel : = TfrmProductInfoSel. Create( Application) ;
with frmProductInfoSel do
begin
FSTKName : = '<27> <> <EFBFBD> <EFBFBD> ' ;
if ShowModal = 1 then
begin
2025-09-08 14:31:40 +08:00
with Self. CDS_1 do
2025-07-05 10:17:25 +08:00
begin
Edit;
2025-09-08 14:31:40 +08:00
FieldByName( 'ccqx_Name' ) . Value : = frmProductInfoSel. CDS_1. fieldbyname( 'P_Name' ) . value;
FieldByName( 'ccqx_spel' ) . Value : = frmProductInfoSel. CDS_1. fieldbyname( 'P_Type' ) . value;
FieldByName( 'ccqx_unit' ) . Value : = frmProductInfoSel. CDS_1. fieldbyname( 'QtyUnit' ) . value;
2025-07-05 10:17:25 +08:00
end ;
end ;
end ;
finally
frmProductInfoSel. Free;
end ;
end ;
2025-09-08 14:31:40 +08:00
//procedure TfrmDyeProcessDefin.cxGridDBColumn5PropertiesEditValueChanged(Sender: TObject);
//var
// s: string;
//begin
// s := TcxTextEdit(Sender).EditingText;
//
// if (s <> '') and (s[Length(s)] <> '%') then
// begin
// Tv1.Controller.FocusedColumn.EditValue := s + '%';
// end;
//end;
procedure TfrmDyeProcessDefin. cxGridDBColumn5PropertiesEditValueChanged( Sender: TObject) ;
2025-07-05 10:17:25 +08:00
var
s: string ;
2025-09-08 14:31:40 +08:00
fValue: Double ;
2025-07-05 10:17:25 +08:00
begin
s : = TcxTextEdit( Sender) . EditingText;
2025-09-08 14:31:40 +08:00
2025-07-05 10:17:25 +08:00
if ( s < > '' ) and ( s[ Length( s) ] < > '%' ) then
begin
2025-09-08 14:31:40 +08:00
try
// <20> <> <EFBFBD> Խ<EFBFBD> <D4BD> ַ<EFBFBD> <D6B7> <EFBFBD> ת<EFBFBD> <D7AA> Ϊ<EFBFBD> <CEAA> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
fValue : = StrToFloat( s) ;
// <20> <> ʽ <EFBFBD> <CABD> Ϊ<EFBFBD> <CEAA> λС <CEBB> <D0A1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ӱٷֺ<D9B7>
Tv1. Controller. FocusedColumn. EditValue : = FormatFloat( '0.00' , fValue) + '%' ;
except
on E: EConvertError do
begin
// <20> <> <EFBFBD> <EFBFBD> ת<EFBFBD> <D7AA> ʧ<EFBFBD> ܣ<EFBFBD> <DCA3> <EFBFBD> <EFBFBD> <EFBFBD> ԭ<EFBFBD> <D4AD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ӱٷֺ<D9B7>
Tv1. Controller. FocusedColumn. EditValue : = s + '%' ;
end ;
end ;
2025-07-05 10:17:25 +08:00
end ;
end ;
2025-09-08 14:31:40 +08:00
function TfrmDyeProcessDefin. AddPercentSuffixIfNeeded( const AText: string ) : string ;
begin
Result : = AText;
if ( AText < > '' ) and ( AText[ Length( AText) ] < > '%' ) then
Result : = AText + '%' ;
end ;
procedure TfrmDyeProcessDefin. cxGridDBColumn8PropertiesButtonClick( Sender: TObject; AButtonIndex: Integer ) ;
2025-07-05 10:17:25 +08:00
begin
try
frmProductInfoSel : = TfrmProductInfoSel. Create( Application) ;
with frmProductInfoSel do
begin
FSTKName : = '<27> <> <EFBFBD> <EFBFBD> ' ;
if ShowModal = 1 then
begin
with Self. CDS_3 do
begin
Edit;
2025-09-08 14:31:40 +08:00
FieldByName( 'jgqx_Name' ) . Value : = frmProductInfoSel. CDS_1. fieldbyname( 'P_Name' ) . value;
FieldByName( 'jgqx_spel' ) . Value : = frmProductInfoSel. CDS_1. fieldbyname( 'P_Type' ) . value;
FieldByName( 'jgqx_unit' ) . Value : = frmProductInfoSel. CDS_1. fieldbyname( 'QtyUnit' ) . value;
2025-07-05 10:17:25 +08:00
end ;
end ;
end ;
finally
frmProductInfoSel. Free;
end ;
end ;
2025-09-08 14:31:40 +08:00
procedure TfrmDyeProcessDefin. TbGjClear1Click( Sender: TObject) ;
2025-07-05 10:17:25 +08:00
begin
2025-09-08 14:31:40 +08:00
ClearAllTextEditsByHint( panel_gj, '<27> ν <EFBFBD> <CEBD> ȷ<EFBFBD> ' ) ;
end ;
procedure TfrmDyeProcessDefin. TbGJClear2Click( Sender: TObject) ;
begin
ClearAllTextEditsByHint( panel_gj, '<27> ν <EFBFBD> <CEBD> ¿<EFBFBD> ' ) ;
end ;
procedure TfrmDyeProcessDefin. TbGJClear3Click( Sender: TObject) ;
begin
ClearAllTextEditsByHint( panel_gj, '<27> ν <EFBFBD> <CEBD> ŷ<EFBFBD> ' ) ;
end ;
procedure TfrmDyeProcessDefin. TbGJClearClick( Sender: TObject) ;
begin
ClearAllTextEditsByHint( panel6, '<27> ν <EFBFBD> <CEBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ¶<EFBFBD> ' ) ;
end ;
procedure TfrmDyeProcessDefin. TbFSReplace1Click( Sender: TObject) ;
begin
FillAllTextEditsWithValue( panel_fs, '<27> <> ˮ<EFBFBD> ȷ<EFBFBD> ' , FindLastEditedTextEdit( panel_fs, '<27> <> ˮ<EFBFBD> ȷ<EFBFBD> ' ) ) ;
end ;
procedure TfrmDyeProcessDefin. TbFSReplace2Click( Sender: TObject) ;
begin
FillAllTextEditsWithValue( panel_fs, '<27> <> ˮ<EFBFBD> ¿<EFBFBD> ' , FindLastEditedTextEdit( panel_fs, '<27> <> ˮ<EFBFBD> ¿<EFBFBD> ' ) ) ;
end ;
procedure TfrmDyeProcessDefin. CYColorKeyPress( Sender: TObject; var Key: Char ) ;
begin
if Key = #13 then
begin
Key : = #0 ;
SelectNext( ActiveControl as TWinControl, True , True ) ;
end ;
end ;
procedure TfrmDyeProcessDefin. C_WidthBtnDnClick( Sender: TObject) ;
begin
TBtnEditC( Sender) . Text : = '' ;
TBtnEditC( Sender) . TxtCode : = '' ;
end ;
procedure TfrmDyeProcessDefin. 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 TfrmDyeProcessDefin. Tv11fs_NamePropertiesButtonClick( Sender: TObject; AButtonIndex: Integer ) ;
begin
try
frmProductInfoSel : = TfrmProductInfoSel. Create( Application) ;
with frmProductInfoSel do
begin
FSTKName : = '<27> <> <EFBFBD> <EFBFBD> ' ;
if ShowModal = 1 then
begin
with Self. CDS_1 do
begin
Edit;
FieldByName( 'fs_Name' ) . Value : = frmProductInfoSel. CDS_1. fieldbyname( 'P_Name' ) . value;
FieldByName( 'fs_spel' ) . Value : = frmProductInfoSel. CDS_1. fieldbyname( 'P_Spec' ) . value;
end ;
end ;
end ;
finally
frmProductInfoSel. Free;
end ;
end ;
procedure TfrmDyeProcessDefin. Tv1Column1PropertiesEditValueChanged( Sender: TObject) ;
var
TotalUse: Double ;
I: Integer ;
UseValue, RateValue: Variant ;
mvalue: string ;
begin
mvalue : = TcxTextEdit( Sender) . EditingText; //<2F> <> ȡ<EFBFBD> û<EFBFBD> <C3BB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ı <EFBFBD>
with CDS_1 do
begin
Edit;
FieldByName( 'ccqx_use' ) . Value : = mvalue;
Post;
end ;
// CalculateUsageRates;
// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ܺ<EFBFBD>
TotalUse : = 0 ;
for I : = 0 to Tv1. DataController. RecordCount - 1 do
begin
UseValue : = Tv1. DataController. Values[ I, Tv1ccqx_use. Index ] ;
if not VarIsNull( UseValue) and not VarIsEmpty( UseValue) then
TotalUse : = TotalUse + VarAsType( UseValue, varDouble) ;
end ;
// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ϊ0<CEAA> <30> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> б <EFBFBD> <D0B1> <EFBFBD> Ϊ0
if TotalUse = 0 then
begin
for I : = 0 to Tv1. DataController. RecordCount - 1 do
Tv1. DataController. Values[ I, Tv1ccqx_rate. Index ] : = 0 ;
Exit;
end ;
// <20> <> <EFBFBD> 㲢<EFBFBD> <E3B2A2> <EFBFBD> <EFBFBD> ÿһ <C3BF> е ı <D0B5> <C4B1> ʣ<EFBFBD> <CAA3> ٷֱȣ <D6B1>
CDS_1. First;
while not CDS_1. Eof do
begin
UseValue : = CDS_1. FieldByName( 'ccqx_use' ) . Value;
if not VarIsNull( UseValue) and not VarIsEmpty( UseValue) then
begin
RateValue : = ( VarAsType( UseValue, varDouble) / TotalUse) * 1 0 0 ;
with CDS_1 do
begin
Edit;
// FieldByName('ccqx_rate').Value := RoundFloat(RateValue,2);
FieldByName( 'ccqx_rate' ) . Value : = AddPercentSuffixIfNeeded( FloatToStr( RoundFloat( RateValue, 2 ) ) ) ;
Post;
end ;
end
else
begin
with CDS_1 do
begin
Edit;
FieldByName( 'ccqx_rate' ) . Value : = 0 ;
Post;
end ;
end ;
CDS_1. Next;
end ;
end ;
procedure TfrmDyeProcessDefin. Tv2Column1PropertiesEditValueChanged(
Sender: TObject) ;
var
TotalUse: Double ;
I: Integer ;
UseValue, RateValue: Variant ;
mvalue: string ;
begin
mvalue : = TcxTextEdit( Sender) . EditingText; //<2F> <> ȡ<EFBFBD> û<EFBFBD> <C3BB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ı <EFBFBD>
with CDS_2 do
begin
Edit;
FieldByName( 'rgqx_use' ) . Value : = mvalue;
Post;
end ;
// CalculateUsageRates;
// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ܺ<EFBFBD>
TotalUse : = 0 ;
for I : = 0 to Tv2. DataController. RecordCount - 1 do
begin
UseValue : = Tv2. DataController. Values[ I, Tv1ccqx_use. Index ] ;
if not VarIsNull( UseValue) and not VarIsEmpty( UseValue) then
TotalUse : = TotalUse + VarAsType( UseValue, varDouble) ;
end ;
// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ϊ0<CEAA> <30> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> б <EFBFBD> <D0B1> <EFBFBD> Ϊ0
if TotalUse = 0 then
begin
for I : = 0 to Tv2. DataController. RecordCount - 1 do
Tv2. DataController. Values[ I, Tv1ccqx_rate. Index ] : = 0 ;
Exit;
end ;
// <20> <> <EFBFBD> 㲢<EFBFBD> <E3B2A2> <EFBFBD> <EFBFBD> ÿһ <C3BF> е ı <D0B5> <C4B1> ʣ<EFBFBD> <CAA3> ٷֱȣ <D6B1>
CDS_2. First;
while not CDS_2. Eof do
begin
UseValue : = CDS_2. FieldByName( 'rgqx_use' ) . Value;
if not VarIsNull( UseValue) and not VarIsEmpty( UseValue) then
begin
RateValue : = ( VarAsType( UseValue, varDouble) / TotalUse) * 1 0 0 ;
with CDS_2 do
begin
Edit;
// FieldByName('ccqx_rate').Value := RoundFloat(RateValue,2);
FieldByName( 'rgqx_rate' ) . Value : = AddPercentSuffixIfNeeded( FloatToStr( RoundFloat( RateValue, 2 ) ) ) ;
Post;
end ;
end
else
begin
with CDS_2 do
begin
Edit;
FieldByName( 'rgqx_rate' ) . Value : = 0 ;
Post;
end ;
end ;
CDS_2. Next;
end ;
end ;
procedure TfrmDyeProcessDefin. Tv2fp_NamePropertiesButtonClick( Sender: TObject; AButtonIndex: Integer ) ;
begin
try
frmProductInfoSel : = TfrmProductInfoSel. Create( Application) ;
with frmProductInfoSel do
begin
FSTKName : = '<27> <> <EFBFBD> <EFBFBD> ' ;
if ShowModal = 1 then
begin
with Self. CDS_2 do
begin
Edit;
FieldByName( 'fp_Name' ) . Value : = frmProductInfoSel. CDS_1. fieldbyname( 'P_Name' ) . value;
FieldByName( 'fp_spel' ) . Value : = frmProductInfoSel. CDS_1. fieldbyname( 'P_Spec' ) . value;
end ;
end ;
end ;
finally
frmProductInfoSel. Free;
end ;
end ;
procedure TfrmDyeProcessDefin. Tv3Column1PropertiesEditValueChanged(
Sender: TObject) ;
var
TotalUse: Double ;
I: Integer ;
UseValue, RateValue: Variant ;
mvalue: string ;
begin
mvalue : = TcxTextEdit( Sender) . EditingText; //<2F> <> ȡ<EFBFBD> û<EFBFBD> <C3BB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ı <EFBFBD>
with CDS_3 do
begin
Edit;
FieldByName( 'jgqx_use' ) . Value : = mvalue;
Post;
end ;
// CalculateUsageRates;
// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ܺ<EFBFBD>
TotalUse : = 0 ;
for I : = 0 to Tv3. DataController. RecordCount - 1 do
begin
UseValue : = Tv3. DataController. Values[ I, Tv1ccqx_use. Index ] ;
if not VarIsNull( UseValue) and not VarIsEmpty( UseValue) then
TotalUse : = TotalUse + VarAsType( UseValue, varDouble) ;
end ;
// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ϊ0<CEAA> <30> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> б <EFBFBD> <D0B1> <EFBFBD> Ϊ0
if TotalUse = 0 then
begin
for I : = 0 to Tv3. DataController. RecordCount - 1 do
Tv3. DataController. Values[ I, Tv1ccqx_rate. Index ] : = 0 ;
Exit;
end ;
// <20> <> <EFBFBD> 㲢<EFBFBD> <E3B2A2> <EFBFBD> <EFBFBD> ÿһ <C3BF> е ı <D0B5> <C4B1> ʣ<EFBFBD> <CAA3> ٷֱȣ <D6B1>
CDS_3. First;
while not CDS_3. Eof do
begin
UseValue : = CDS_3. FieldByName( 'jgqx_use' ) . Value;
if not VarIsNull( UseValue) and not VarIsEmpty( UseValue) then
begin
RateValue : = ( VarAsType( UseValue, varDouble) / TotalUse) * 1 0 0 ;
with CDS_3 do
begin
Edit;
// FieldByName('ccqx_rate').Value := RoundFloat(RateValue,2);
FieldByName( 'jgqx_rate' ) . Value : = AddPercentSuffixIfNeeded( FloatToStr( RoundFloat( RateValue, 2 ) ) ) ;
Post;
end ;
end
else
begin
with CDS_3 do
begin
Edit;
FieldByName( 'ccqx_rate' ) . Value : = 0 ;
Post;
end ;
end ;
CDS_3. Next;
end ;
end ;
procedure TfrmDyeProcessDefin. Tv3gj_NamePropertiesButtonClick( Sender: TObject; AButtonIndex: Integer ) ;
begin
try
frmProductInfoSel : = TfrmProductInfoSel. Create( Application) ;
with frmProductInfoSel do
begin
FSTKName : = '<27> <> <EFBFBD> <EFBFBD> ' ;
if ShowModal = 1 then
begin
with Self. CDS_3 do
begin
Edit;
FieldByName( 'gj_Name' ) . Value : = frmProductInfoSel. CDS_1. fieldbyname( 'P_Name' ) . value;
FieldByName( 'gj_spel' ) . Value : = frmProductInfoSel. CDS_1. fieldbyname( 'P_Spec' ) . value;
end ;
end ;
end ;
finally
frmProductInfoSel. Free;
end ;
end ;
procedure TfrmDyeProcessDefin. Tv41fs_NamePropertiesButtonClick( Sender: TObject; AButtonIndex: Integer ) ;
begin
try
frmProductInfoSel : = TfrmProductInfoSel. Create( Application) ;
with frmProductInfoSel do
begin
FSTKName : = '<27> <> <EFBFBD> <EFBFBD> ' ;
if ShowModal = 1 then
begin
with Self. CDS_4 do
begin
Edit;
FieldByName( 'fs_Name' ) . Value : = frmProductInfoSel. CDS_1. fieldbyname( 'P_Name' ) . value;
FieldByName( 'fs_spel' ) . Value : = frmProductInfoSel. CDS_1. fieldbyname( 'P_Type' ) . value;
FieldByName( 'fs_unit' ) . Value : = frmProductInfoSel. CDS_1. fieldbyname( 'QtyUnit' ) . value;
end ;
end ;
end ;
finally
frmProductInfoSel. Free;
end ;
end ;
procedure TfrmDyeProcessDefin. Tv4fs_unitPropertiesEditValueChanged( Sender: TObject) ;
var
s: string ;
fValue: Double ;
begin
s : = TcxTextEdit( Sender) . EditingText;
if ( s < > '' ) and ( s[ Length( s) ] < > '%' ) then
begin
try
// <20> <> <EFBFBD> Խ<EFBFBD> <D4BD> ַ<EFBFBD> <D6B7> <EFBFBD> ת<EFBFBD> <D7AA> Ϊ<EFBFBD> <CEAA> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
fValue : = StrToFloat( s) ;
// <20> <> ʽ <EFBFBD> <CABD> Ϊ<EFBFBD> <CEAA> λС <CEBB> <D0A1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ӱٷֺ<D9B7>
Tv4. Controller. FocusedColumn. EditValue : = FormatFloat( '0.00' , fValue) + '%' ;
except
on E: EConvertError do
begin
// <20> <> <EFBFBD> <EFBFBD> ת<EFBFBD> <D7AA> ʧ<EFBFBD> ܣ<EFBFBD> <DCA3> <EFBFBD> <EFBFBD> <EFBFBD> ԭ<EFBFBD> <D4AD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ӱٷֺ<D9B7>
Tv4. Controller. FocusedColumn. EditValue : = s + '%' ;
end ;
end ;
end ;
end ;
procedure TfrmDyeProcessDefin. Tv4fs_usePropertiesEditValueChanged(
Sender: TObject) ;
var
TotalUse: Double ;
I: Integer ;
UseValue, RateValue: Variant ;
mvalue: string ;
begin
mvalue : = TcxTextEdit( Sender) . EditingText; //<2F> <> ȡ<EFBFBD> û<EFBFBD> <C3BB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ı <EFBFBD>
with CDS_4 do
begin
Edit;
FieldByName( 'fs_use' ) . Value : = mvalue;
Post;
end ;
// CalculateUsageRates;
// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ܺ<EFBFBD>
TotalUse : = 0 ;
for I : = 0 to Tv4. DataController. RecordCount - 1 do
begin
UseValue : = Tv4. DataController. Values[ I, Tv1ccqx_use. Index ] ;
if not VarIsNull( UseValue) and not VarIsEmpty( UseValue) then
TotalUse : = TotalUse + VarAsType( UseValue, varDouble) ;
end ;
// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ϊ0<CEAA> <30> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> б <EFBFBD> <D0B1> <EFBFBD> Ϊ0
if TotalUse = 0 then
begin
for I : = 0 to Tv4. DataController. RecordCount - 1 do
Tv4. DataController. Values[ I, Tv1ccqx_rate. Index ] : = 0 ;
Exit;
end ;
// <20> <> <EFBFBD> 㲢<EFBFBD> <E3B2A2> <EFBFBD> <EFBFBD> ÿһ <C3BF> е ı <D0B5> <C4B1> ʣ<EFBFBD> <CAA3> ٷֱȣ <D6B1>
CDS_4. First;
while not CDS_4. Eof do
begin
UseValue : = CDS_4. FieldByName( 'fs_use' ) . Value;
if not VarIsNull( UseValue) and not VarIsEmpty( UseValue) then
begin
RateValue : = ( VarAsType( UseValue, varDouble) / TotalUse) * 1 0 0 ;
with CDS_4 do
begin
Edit;
// FieldByName('ccqx_rate').Value := RoundFloat(RateValue,2);
FieldByName( 'fs_rate' ) . Value : = AddPercentSuffixIfNeeded( FloatToStr( RoundFloat( RateValue, 2 ) ) ) ;
Post;
end ;
end
else
begin
with CDS_4 do
begin
Edit;
FieldByName( 'fs_rate' ) . Value : = 0 ;
Post;
end ;
end ;
CDS_4. Next;
end ;
end ;
procedure TfrmDyeProcessDefin. Tv5gj_NamePropertiesButtonClick( Sender: TObject; AButtonIndex: Integer ) ;
begin
try
frmProductInfoSel : = TfrmProductInfoSel. Create( Application) ;
with frmProductInfoSel do
begin
FSTKName : = '<27> <> <EFBFBD> <EFBFBD> ' ;
if ShowModal = 1 then
begin
with Self. CDS_5 do
begin
Edit;
FieldByName( 'gj_Name' ) . Value : = frmProductInfoSel. CDS_1. fieldbyname( 'P_Name' ) . value;
FieldByName( 'gj_spel' ) . Value : = frmProductInfoSel. CDS_1. fieldbyname( 'P_Type' ) . value;
FieldByName( 'gj_unit' ) . Value : = frmProductInfoSel. CDS_1. fieldbyname( 'QtyUnit' ) . value;
end ;
end ;
end ;
finally
frmProductInfoSel. Free;
end ;
end ;
procedure TfrmDyeProcessDefin. Tv5gj_unitPropertiesEditValueChanged( Sender: TObject) ;
var
s: string ;
fValue: Double ;
begin
s : = TcxTextEdit( Sender) . EditingText;
if ( s < > '' ) and ( s[ Length( s) ] < > '%' ) then
begin
try
// <20> <> <EFBFBD> Խ<EFBFBD> <D4BD> ַ<EFBFBD> <D6B7> <EFBFBD> ת<EFBFBD> <D7AA> Ϊ<EFBFBD> <CEAA> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
fValue : = StrToFloat( s) ;
// <20> <> ʽ <EFBFBD> <CABD> Ϊ<EFBFBD> <CEAA> λС <CEBB> <D0A1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ӱٷֺ<D9B7>
Tv5. Controller. FocusedColumn. EditValue : = FormatFloat( '0.00' , fValue) + '%' ;
except
on E: EConvertError do
begin
// <20> <> <EFBFBD> <EFBFBD> ת<EFBFBD> <D7AA> ʧ<EFBFBD> ܣ<EFBFBD> <DCA3> <EFBFBD> <EFBFBD> <EFBFBD> ԭ<EFBFBD> <D4AD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ӱٷֺ<D9B7>
Tv5. Controller. FocusedColumn. EditValue : = s + '%' ;
end ;
end ;
end ;
end ;
procedure TfrmDyeProcessDefin. Tv5gj_usePropertiesEditValueChanged(
Sender: TObject) ;
var
TotalUse: Double ;
I: Integer ;
UseValue, RateValue: Variant ;
mvalue: string ;
begin
mvalue : = TcxTextEdit( Sender) . EditingText; //<2F> <> ȡ<EFBFBD> û<EFBFBD> <C3BB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ı <EFBFBD>
with CDS_5 do
begin
Edit;
FieldByName( 'gj_use' ) . Value : = mvalue;
Post;
end ;
// CalculateUsageRates;
// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ܺ<EFBFBD>
TotalUse : = 0 ;
for I : = 0 to Tv5. DataController. RecordCount - 1 do
begin
UseValue : = Tv5. DataController. Values[ I, Tv1ccqx_use. Index ] ;
if not VarIsNull( UseValue) and not VarIsEmpty( UseValue) then
TotalUse : = TotalUse + VarAsType( UseValue, varDouble) ;
end ;
// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ϊ0<CEAA> <30> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> б <EFBFBD> <D0B1> <EFBFBD> Ϊ0
if TotalUse = 0 then
begin
for I : = 0 to Tv5. DataController. RecordCount - 1 do
Tv5. DataController. Values[ I, Tv1ccqx_rate. Index ] : = 0 ;
Exit;
end ;
// <20> <> <EFBFBD> 㲢<EFBFBD> <E3B2A2> <EFBFBD> <EFBFBD> ÿһ <C3BF> е ı <D0B5> <C4B1> ʣ<EFBFBD> <CAA3> ٷֱȣ <D6B1>
CDS_5. First;
while not CDS_5. Eof do
begin
UseValue : = CDS_5. FieldByName( 'gj_use' ) . Value;
if not VarIsNull( UseValue) and not VarIsEmpty( UseValue) then
begin
RateValue : = ( VarAsType( UseValue, varDouble) / TotalUse) * 1 0 0 ;
with CDS_5 do
begin
Edit;
// FieldByName('ccqx_rate').Value := RoundFloat(RateValue,2);
FieldByName( 'gj_rate' ) . Value : = AddPercentSuffixIfNeeded( FloatToStr( RoundFloat( RateValue, 2 ) ) ) ;
Post;
end ;
end
else
begin
with CDS_5 do
begin
Edit;
FieldByName( 'gj_rate' ) . Value : = 0 ;
Post;
end ;
end ;
CDS_5. Next;
end ;
end ;
procedure TfrmDyeProcessDefin. Tv6Column2PropertiesEditValueChanged(
Sender: TObject) ;
var
TotalUse: Double ;
I: Integer ;
UseValue, RateValue: Variant ;
mvalue: string ;
begin
mvalue : = TcxTextEdit( Sender) . EditingText; //<2F> <> ȡ<EFBFBD> û<EFBFBD> <C3BB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ı <EFBFBD>
with CDS_6 do
begin
Edit;
FieldByName( 'fp_use' ) . Value : = mvalue;
Post;
end ;
// CalculateUsageRates;
// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ܺ<EFBFBD>
TotalUse : = 0 ;
for I : = 0 to Tv6. DataController. RecordCount - 1 do
begin
UseValue : = Tv6. DataController. Values[ I, Tv1ccqx_use. Index ] ;
if not VarIsNull( UseValue) and not VarIsEmpty( UseValue) then
TotalUse : = TotalUse + VarAsType( UseValue, varDouble) ;
end ;
// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ϊ0<CEAA> <30> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> б <EFBFBD> <D0B1> <EFBFBD> Ϊ0
if TotalUse = 0 then
begin
for I : = 0 to Tv6. DataController. RecordCount - 1 do
Tv6. DataController. Values[ I, Tv1ccqx_rate. Index ] : = 0 ;
Exit;
end ;
// <20> <> <EFBFBD> 㲢<EFBFBD> <E3B2A2> <EFBFBD> <EFBFBD> ÿһ <C3BF> е ı <D0B5> <C4B1> ʣ<EFBFBD> <CAA3> ٷֱȣ <D6B1>
CDS_6. First;
while not CDS_6. Eof do
begin
UseValue : = CDS_6. FieldByName( 'fp_use' ) . Value;
if not VarIsNull( UseValue) and not VarIsEmpty( UseValue) then
begin
RateValue : = ( VarAsType( UseValue, varDouble) / TotalUse) * 1 0 0 ;
with CDS_6 do
begin
Edit;
// FieldByName('ccqx_rate').Value := RoundFloat(RateValue,2);
FieldByName( 'fp_rate' ) . Value : = AddPercentSuffixIfNeeded( FloatToStr( RoundFloat( RateValue, 2 ) ) ) ;
Post;
end ;
end
else
begin
with CDS_6 do
begin
Edit;
FieldByName( 'fp_rate' ) . Value : = 0 ;
Post;
end ;
end ;
CDS_6. Next;
end ;
end ;
procedure TfrmDyeProcessDefin. Tv6fp_NamePropertiesButtonClick( Sender: TObject; AButtonIndex: Integer ) ;
begin
try
frmProductInfoSel : = TfrmProductInfoSel. Create( Application) ;
with frmProductInfoSel do
begin
FSTKName : = '<27> <> <EFBFBD> <EFBFBD> ' ;
if ShowModal = 1 then
begin
with Self. CDS_6 do
begin
Edit;
FieldByName( 'fp_Name' ) . Value : = frmProductInfoSel. CDS_1. fieldbyname( 'P_Name' ) . value;
FieldByName( 'fp_spel' ) . Value : = frmProductInfoSel. CDS_1. fieldbyname( 'P_Type' ) . value;
FieldByName( 'fp_unit' ) . Value : = frmProductInfoSel. CDS_1. fieldbyname( 'QtyUnit' ) . value;
end ;
end ;
end ;
finally
frmProductInfoSel. Free;
end ;
end ;
procedure TfrmDyeProcessDefin. Tv6fp_ratePropertiesEditValueChanged( Sender: TObject) ;
var
s: string ;
fValue: Double ;
begin
s : = TcxTextEdit( Sender) . EditingText;
if ( s < > '' ) and ( s[ Length( s) ] < > '%' ) then
begin
try
// <20> <> <EFBFBD> Խ<EFBFBD> <D4BD> ַ<EFBFBD> <D6B7> <EFBFBD> ת<EFBFBD> <D7AA> Ϊ<EFBFBD> <CEAA> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
fValue : = StrToFloat( s) ;
// <20> <> ʽ <EFBFBD> <CABD> Ϊ<EFBFBD> <CEAA> λС <CEBB> <D0A1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ӱٷֺ<D9B7>
Tv6. Controller. FocusedColumn. EditValue : = FormatFloat( '0.00' , fValue) + '%' ;
except
on E: EConvertError do
begin
// <20> <> <EFBFBD> <EFBFBD> ת<EFBFBD> <D7AA> ʧ<EFBFBD> ܣ<EFBFBD> <DCA3> <EFBFBD> <EFBFBD> <EFBFBD> ԭ<EFBFBD> <D4AD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ӱٷֺ<D9B7>
Tv6. Controller. FocusedColumn. EditValue : = s + '%' ;
end ;
end ;
2025-07-05 10:17:25 +08:00
end ;
end ;
end .