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,25 +2,22 @@
|
||||
// template_id : 884f0dde-564a-4e6e-9a5d-55d12d0a16e1
|
||||
// template_name: 物资采购申请(土建-项目)
|
||||
// seq : 1
|
||||
// label : HARD
|
||||
// 硬 S3 原因 : 动态创建 Vaadin 组件
|
||||
// 处置 : 原文保留,进人工排期(amis dialog/service 重写)
|
||||
import com.vaadin.ui.Button;
|
||||
import com.vaadin.ui.Button.ClickEvent;
|
||||
import com.vaadin.ui.Button.ClickListener;
|
||||
// label : PARTIAL
|
||||
// 余留模式 : raw .table 组件访问; 数据源 addItem(非标准选项 idiom); 残留字段句柄链(未覆盖动词)
|
||||
// 处置 : 大部分已自动改写,余留行人工补全(见作业单)
|
||||
import com.vaadin.ui.Notification;
|
||||
import com.vaadin.ui.Notification.Type;
|
||||
|
||||
def materialList = group.getField("MATERIALDETAILS");
|
||||
final Button cb = new Button("复制");
|
||||
final Object table = materialList?.table;
|
||||
|
||||
final Object table = group.getField("MATERIALDETAILS")?.table;
|
||||
table?.setImmediate(true);//设置验证
|
||||
final group1 = group;
|
||||
cb?.addClickListener(new ClickListener() {
|
||||
public void buttonClick(ClickEvent event) {
|
||||
Object o = table?.getValue();
|
||||
//将自定义的按钮添加至
|
||||
addSubTableButton("MATERIALDETAILS", "SELECT", 0);
|
||||
addFieldButton("MATERIALDETAILS", "复制", {
|
||||
Object o = table?.getValue();
|
||||
if (o == null){
|
||||
Notification.show("请选择一条记录!", Type.ERROR_MESSAGE);
|
||||
showToast("请选择一条记录!", Type.ERROR_MESSAGE);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -43,14 +40,9 @@ cb?.addClickListener(new ClickListener() {
|
||||
itemMap["REMARK"] = getFieldValue(o, "REMARK");//备注
|
||||
|
||||
//调用addItem()方法可直接在
|
||||
materialList.addItem(itemMap);
|
||||
group.getField("MATERIALDETAILS").addItem(itemMap);
|
||||
table.select(o);
|
||||
}
|
||||
});
|
||||
|
||||
//将自定义的按钮添加至
|
||||
materialList?.addButton(group.getField("SELECT"),0);
|
||||
materialList?.addButton(cb, 1);
|
||||
}, 1)
|
||||
|
||||
import com.dsasp.client.viewframework.util.TableImportExport;
|
||||
def tie = new TableImportExport(materialList,"com.dsasp.pm.materialmanagertj.client.MaterialApplyDetailImportOfTJ");
|
||||
@@ -59,6 +51,6 @@ tie.addExportButton(5);
|
||||
|
||||
|
||||
|
||||
group.getField("MATERIALDETAILS")?.addButton(group.getField("SELECT"),0);
|
||||
group.getField("ISPREPARATION")?.setVisible(false);
|
||||
//group.getField("ISPREPARATION").setCaption("公司备料");
|
||||
addSubTableButton("MATERIALDETAILS", "SELECT", 0);
|
||||
setFieldVisible("ISPREPARATION", false);
|
||||
//setFieldCaption("ISPREPARATION", "公司备料");
|
||||
Reference in New Issue
Block a user