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,18 @@
|
||||
// template_id : e5a03e54-37b2-4122-971f-7f0ac57c2650
|
||||
// template_name: 进项税发票(批量调整抵扣日期)-五建定制
|
||||
// seq : 6
|
||||
// label : HARD
|
||||
// 硬 S3 原因 : 动态创建 Vaadin 组件
|
||||
// 处置 : 原文保留,进人工排期(amis dialog/service 重写)
|
||||
// label : FULL_AUTO
|
||||
// 处置 : 全自动改写完成,直接入 P4 转换流水线
|
||||
|
||||
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;
|
||||
|
||||
def signDetails = group.getField("TASKS");
|
||||
|
||||
final Button cb0 = new Button("查询");
|
||||
cb0?.addClickListener(new ClickListener() {
|
||||
public void buttonClick(ClickEvent event) {
|
||||
|
||||
|
||||
|
||||
def thisuser = GetDefaultValueFunction.getCurrentUserId();
|
||||
|
||||
//将自定义的按钮添加至
|
||||
//addSubTableButton("TASKS", "SELECT", 0);
|
||||
addFieldButton("TASKS", "查询", {
|
||||
def thisuser = GetDefaultValueFunction.getCurrentUserId();
|
||||
def newlist = [];
|
||||
|
||||
def returncol = ["VIEW_ACT_RU_TASK_ID","PROCESSID","TITLE","TASKNAME","INITUSERID","STARTTIME","ASSIGNEE","DUEDATE","COMMENTTEXT","PROCESSNAME","INITUSERORGID"];
|
||||
@@ -46,17 +39,10 @@ cb0?.addClickListener(new ClickListener() {
|
||||
}else{
|
||||
bindField("TASKS",null);
|
||||
bindField("TASKS",newlist);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
final Button cb = new Button("全选");
|
||||
cb?.addClickListener(new ClickListener() {
|
||||
public void buttonClick(ClickEvent event) {
|
||||
def details = getFieldValue("TASKS");
|
||||
}
|
||||
}, 0)
|
||||
addFieldButton("TASKS", "全选", {
|
||||
def details = getFieldValue("TASKS");
|
||||
if(details != null){
|
||||
details.each{
|
||||
it.put("ISSIGN",true);
|
||||
@@ -64,14 +50,9 @@ cb?.addClickListener(new ClickListener() {
|
||||
bindField("TASKS",null);
|
||||
bindField("TASKS",details);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
final Button cb2 = new Button("取消全选");
|
||||
cb2?.addClickListener(new ClickListener() {
|
||||
public void buttonClick(ClickEvent event) {
|
||||
def details = getFieldValue("TASKS");
|
||||
}, 1)
|
||||
addFieldButton("TASKS", "取消全选", {
|
||||
def details = getFieldValue("TASKS");
|
||||
if(details != null){
|
||||
details.each{
|
||||
it.put("ISSIGN",false);
|
||||
@@ -79,11 +60,4 @@ cb2?.addClickListener(new ClickListener() {
|
||||
bindField("TASKS",null);
|
||||
bindField("TASKS",details);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//将自定义的按钮添加至
|
||||
//signDetails?.addButton(group.getField("SELECT"),0);
|
||||
signDetails?.addButton(cb0, 0);
|
||||
signDetails?.addButton(cb, 1);
|
||||
signDetails?.addButton(cb2, 2);
|
||||
}, 2)
|
||||
@@ -2,14 +2,11 @@
|
||||
// template_id : e5a03e54-37b2-4122-971f-7f0ac57c2650
|
||||
// template_name: 进项税发票(批量调整抵扣日期)-五建定制
|
||||
// seq : 9
|
||||
// label : HARD
|
||||
// 硬 S3 原因 : 动态创建 Vaadin 组件
|
||||
// 处置 : 原文保留,进人工排期(amis dialog/service 重写)
|
||||
// label : PARTIAL
|
||||
// 余留模式 : 数据源 addItem(非标准选项 idiom); 残留字段句柄链(未覆盖动词)
|
||||
// 处置 : 大部分已自动改写,余留行人工补全(见作业单)
|
||||
import com.dsasp.server.common.exception.ValidationException;
|
||||
import com.dsasp.server.common.util.HTTPClientUtils;
|
||||
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;
|
||||
|
||||
@@ -20,13 +17,12 @@ def transformnum (moneyStr) {
|
||||
}
|
||||
|
||||
|
||||
def invoicelist = group.getField("INVOICELIST");
|
||||
def document = group.getField("SELECT");
|
||||
|
||||
final Button cb = new Button("识别");
|
||||
cb?.addClickListener(new ClickListener() {
|
||||
public void buttonClick(ClickEvent event) {
|
||||
Object fplists = document?.getValue();
|
||||
|
||||
|
||||
//将自定义的按钮添加至
|
||||
addFieldButton("INVOICELIST", "识别", {
|
||||
Object fplists = getFieldValue("SELECT");
|
||||
def documentfp = [];
|
||||
for (int i = 0; i < fplists.size(); i++) {
|
||||
def item = fplists.get(i);
|
||||
@@ -36,7 +32,7 @@ cb?.addClickListener(new ClickListener() {
|
||||
};
|
||||
// Console.debug(documentfp);
|
||||
if (documentfp == null || documentfp.size()==0){
|
||||
Notification.show("请先上传发票信息!", Type.ERROR_MESSAGE);
|
||||
showToast("请先上传发票信息!", Type.ERROR_MESSAGE);
|
||||
return;
|
||||
};
|
||||
if(documentfp && documentfp.size()>0){
|
||||
@@ -136,9 +132,9 @@ cb?.addClickListener(new ClickListener() {
|
||||
};
|
||||
if(fplist!=null){
|
||||
def flag = true;
|
||||
if(invoicelist.getValue() && invoicelist.getValue().size()>0){
|
||||
for (int j = 0; j < invoicelist.getValue().size(); j++) {
|
||||
def tempitem = invoicelist.getValue().get(j);
|
||||
if(getFieldValue("INVOICELIST") && getFieldValue("INVOICELIST").size()>0){
|
||||
for (int j = 0; j < getFieldValue("INVOICELIST").size(); j++) {
|
||||
def tempitem = getFieldValue("INVOICELIST").get(j);
|
||||
if((fplist.get("INVOICENO")==null || (fplist.get("INVOICENO")!=null && tempitem.get("INVOICENO") == fplist.get("INVOICENO"))) && (fplist.get("INVOICECODE")==null || (fplist.get("INVOICECODE")!=null && tempitem.get("INVOICECODE") == fplist.get("INVOICECODE")))){
|
||||
flag = false;;
|
||||
}
|
||||
@@ -146,7 +142,7 @@ cb?.addClickListener(new ClickListener() {
|
||||
};
|
||||
if(flag){
|
||||
fplist.put("DOCUMENT",[it]);//附件图片
|
||||
invoicelist.addItem(fplist);
|
||||
group.getField("INVOICELIST").addItem(fplist);
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -161,12 +157,8 @@ cb?.addClickListener(new ClickListener() {
|
||||
}
|
||||
}
|
||||
if(message.trim()!=""){
|
||||
Notification.show(message, Type.ERROR_MESSAGE);
|
||||
showToast(message, Type.ERROR_MESSAGE);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
//将自定义的按钮添加至
|
||||
invoicelist?.addButton(cb, 0);
|
||||
}, 0)
|
||||
|
||||
Reference in New Issue
Block a user