Commit bc7d44ea authored by 田翔's avatar 田翔

fix: 台账选择器触发多个计算规则问题

parent 570ae465
{
"name": "panda-xform",
"version": "6.10.8",
"description": "6.10.8 增加是否初始调用参数",
"version": "6.10.9",
"description": "6.10.9 台账选择器触发多个计算规则问题",
"keywords": [
"panda-xform"
],
......
......@@ -202,22 +202,24 @@ const AccountSelector = (props) => {
if (isObject(childObj)) {
Object.keys(childObj).forEach(sun => {
fieldshine.forEach((v, index) => {
if (sun === v.toField) {
const schema = addons.getSchemaByPath(`${child}.${sun}`);
if (['TextInput', 'fileUpload'].includes(schema.widget)) {
addons.setSchemaByPath(`${child}.${sun}`, { ...schema, otherValue: row[v.fromField] });
} else if (schema.widget === 'NumberInput') {
let numberValue = formatterFn({ value: row[v.fromField] || '', formatter: schema.formatter, decimalDigits: schema.decimalDigits })
addons.setValue(`${child}.${sun}`, numberValue);
} else {
addons.setValue(`${child}.${sun}`, row[v.fromField] || '');
setTimeout(() => {
if (sun === v.toField) {
const schema = addons.getSchemaByPath(`${child}.${sun}`);
if (['TextInput', 'fileUpload'].includes(schema.widget)) {
addons.setSchemaByPath(`${child}.${sun}`, { ...schema, otherValue: row[v.fromField] });
} else if (schema.widget === 'NumberInput') {
let numberValue = formatterFn({ value: row[v.fromField] || '', formatter: schema.formatter, decimalDigits: schema.decimalDigits })
addons.setValue(`${child}.${sun}`, numberValue);
} else {
addons.setValue(`${child}.${sun}`, row[v.fromField] || '');
}
//存储ID特殊处理
if (isStoreID && index === 0) {
addons.setValue(`${child}.${sun}`, keys[0] || '')
getShowValue(keys)
}
}
//存储ID特殊处理
if (isStoreID && index === 0) {
addons.setValue(`${child}.${sun}`, keys[0] || '')
getShowValue(keys)
}
}
}, (index + 1) * 10)
});
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment