F2-3:运行时动词闭包子指令机制 + staging 晋级(FULL_AUTO 507/HARD 74)
ScriptFacade:addFieldButton 扩第3参闭包(onClick 子指令数组)+ showConfirm 新动词,服务端急切求值闭包,子指令收进子缓冲,输出嵌套指令 JSON。 前端 scriptCommands.ts/registerReplayAction.ts:处理 addButton onClick/ confirmDialog onOk 嵌套重放,onClickActions/onOkActions 透传给 amis。 ScriptFacadeTest 补 7 个正反例(24/24 全绿)。 staging 晋级:FULL_AUTO 507(+10)/HARD 74(-12)/自动化率 82.7%, 双库各更新 801 条,e2e 30/30 全绿。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,13 +2,10 @@
|
||||
// template_id : 2cceb83c-4079-43e4-b7b7-c395fd68cbbc
|
||||
// template_name: 建造师注册证
|
||||
// seq : 3
|
||||
// label : HARD
|
||||
// 硬 S3 原因 : 动态创建 Vaadin 组件
|
||||
// 处置 : 原文保留,进人工排期(amis dialog/service 重写)
|
||||
// label : PARTIAL
|
||||
// 余留模式 : raw .table 组件访问; 残留字段句柄链(未覆盖动词)
|
||||
// 处置 : 大部分已自动改写,余留行人工补全(见作业单)
|
||||
|
||||
import com.vaadin.ui.Button;
|
||||
import com.vaadin.ui.Button.ClickEvent;
|
||||
import com.vaadin.ui.Button.ClickListener;
|
||||
import com.vaadin.ui.Notification;
|
||||
import com.vaadin.ui.Notification.Type;
|
||||
import com.vaadin.data.Property.ValueChangeListener;
|
||||
@@ -21,32 +18,30 @@ import com.vaadin.ui.Label;
|
||||
|
||||
|
||||
final def professionals = group.getField("PROFESSIONALS");
|
||||
final Button but = new Button("注销");
|
||||
|
||||
final Object table = professionals?.table;
|
||||
table?.setImmediate(true);
|
||||
|
||||
|
||||
final group1 = group;
|
||||
but?.addClickListener(new ClickListener() {
|
||||
public void buttonClick(ClickEvent event) {
|
||||
def id = table?.getValue();
|
||||
addFieldButton("PROFESSIONALS", "注销", {
|
||||
def id = table?.getValue();
|
||||
if (id == null){
|
||||
Notification.show("请选择一条记录!", Type.ERROR_MESSAGE);
|
||||
showToast("请选择一条记录!", Type.ERROR_MESSAGE);
|
||||
return;
|
||||
}
|
||||
|
||||
def hr_con_id = id?.getField("HR_CONSTRUCTORREGISTERED_ID")?.getValue();
|
||||
def islogout = id?.getField("ISLOGOUT")?.getValue();
|
||||
if(islogout){
|
||||
Notification.show("已经注销!", Type.ERROR_MESSAGE);
|
||||
showToast("已经注销!", Type.ERROR_MESSAGE);
|
||||
return;
|
||||
}
|
||||
|
||||
final pojo = GetServicesFunction.loadPOJO(hr_con_id,"HR_CONSTRUCTORREGISTERED",false);
|
||||
if(pojo!=null){
|
||||
if(pojo.get_Value("ISMAINITEMS")){
|
||||
Notification.show("如要注销主项注册专业,请注销建造师注册证!", Type.ERROR_MESSAGE);
|
||||
showToast("如要注销主项注册专业,请注销建造师注册证!", Type.ERROR_MESSAGE);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -63,11 +58,8 @@ but?.addClickListener(new ClickListener() {
|
||||
|
||||
setFieldReadOnly(id,"ISLOGOUT",true);
|
||||
professionals.setValue(new ArrayList(professionals.getValue()));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
professionals?.addButton(but,0);
|
||||
}
|
||||
}, 0)
|
||||
|
||||
professionals?.showAddButton(false);
|
||||
professionals?.showDeleteButton(false);
|
||||
Reference in New Issue
Block a user