Commit bc7d44ea authored by 田翔's avatar 田翔

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

parent 570ae465
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "6.10.8", "version": "6.10.9",
"description": "6.10.8 增加是否初始调用参数", "description": "6.10.9 台账选择器触发多个计算规则问题",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -202,22 +202,24 @@ const AccountSelector = (props) => { ...@@ -202,22 +202,24 @@ const AccountSelector = (props) => {
if (isObject(childObj)) { if (isObject(childObj)) {
Object.keys(childObj).forEach(sun => { Object.keys(childObj).forEach(sun => {
fieldshine.forEach((v, index) => { fieldshine.forEach((v, index) => {
if (sun === v.toField) { setTimeout(() => {
const schema = addons.getSchemaByPath(`${child}.${sun}`); if (sun === v.toField) {
if (['TextInput', 'fileUpload'].includes(schema.widget)) { const schema = addons.getSchemaByPath(`${child}.${sun}`);
addons.setSchemaByPath(`${child}.${sun}`, { ...schema, otherValue: row[v.fromField] }); if (['TextInput', 'fileUpload'].includes(schema.widget)) {
} else if (schema.widget === 'NumberInput') { addons.setSchemaByPath(`${child}.${sun}`, { ...schema, otherValue: row[v.fromField] });
let numberValue = formatterFn({ value: row[v.fromField] || '', formatter: schema.formatter, decimalDigits: schema.decimalDigits }) } else if (schema.widget === 'NumberInput') {
addons.setValue(`${child}.${sun}`, numberValue); let numberValue = formatterFn({ value: row[v.fromField] || '', formatter: schema.formatter, decimalDigits: schema.decimalDigits })
} else { addons.setValue(`${child}.${sun}`, numberValue);
addons.setValue(`${child}.${sun}`, row[v.fromField] || ''); } else {
addons.setValue(`${child}.${sun}`, row[v.fromField] || '');
}
//存储ID特殊处理
if (isStoreID && index === 0) {
addons.setValue(`${child}.${sun}`, keys[0] || '')
getShowValue(keys)
}
} }
//存储ID特殊处理 }, (index + 1) * 10)
if (isStoreID && index === 0) {
addons.setValue(`${child}.${sun}`, keys[0] || '')
getShowValue(keys)
}
}
}); });
}); });
} }
......
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