From 212af14409d731303769f15ffadd7d5f81c818c6 Mon Sep 17 00:00:00 2001 From: LanHeron Date: Wed, 23 Jul 2025 13:29:35 +0800 Subject: [PATCH] vault backup: 2025-07-23 13:29:35 --- .../相关操作/4.0-other/999.Delphi脚本记录.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/SanPinPLM/相关操作/4.0-other/999.Delphi脚本记录.md b/SanPinPLM/相关操作/4.0-other/999.Delphi脚本记录.md index 9416ed29..eaf6ee50 100644 --- a/SanPinPLM/相关操作/4.0-other/999.Delphi脚本记录.md +++ b/SanPinPLM/相关操作/4.0-other/999.Delphi脚本记录.md @@ -718,4 +718,24 @@ begin fedtFShtName.Text := TempStr; // 直接赋值 end. +``` + +## 多选枚举控件同步 + +多选枚举同步,需要在属性保存下来后,通过同步按钮进行同步 + +```delphi +uses MyClass,Variables,BaseUtil,CommonFunc,DataConst,CFFrm,CFSimplePropFrm,Forms,StdCtrls,Variants,SysUtils,Classes,Controls,Dialogs, + CHostIntf,ProductClas,DocClas,LoginClas,VirtualTrees,CEntClas,PathClas; +var + str:string; +begin + + //注释:在下面添加您的脚本代码 + if fedtusr_mj1.Text <> '' then + begin // 添加begin + str := chiGetFieldValueBySql('select usr_mj1 from pdmitem where itemcode = ' + QuotedStr(fedtItemCode.Text)); + chiExecuteSqlNoResultRec('update pdmitem set usr_mj2 = ' + QuotedStr(str) + ' where itemcode = ' + QuotedStr(fedtItemCode.Text)); + end; // 添加end +end. ``` \ No newline at end of file