效果–
//window.WeFormSDK.showMessage("这是一个E10的提示", 3, 2);
const onClickCreate = () => console.log("create");
const onClickSave = () => console.log("save");
const onClickCancel = () => dialogComponent?.destroy();
// 获取表单实例
const weFormSdk = window.WeFormSDK.getWeFormInstance();
// 获取主表字段fieldId
const bt = weFormSdk.convertFieldNameToId("bt");
const lcbh = weFormSdk.convertFieldNameToId("lcbh");
// 绑定事件,对主表字段和明细表的某一行绑定
weFormSdk.bindFieldChangeEvent(`${bt},${lcbh}`, (data) => {
// 取字段标识
const fieldMark = data.id;
// 取字段修改的值
const value = data.value;
console.log(data);
window.WeFormSDK.openCustomDialog({
content: "数据:" + JSON.stringify(data),
width: "400px",
height: "300px"
});
});