Commit 3252dfbe authored by 田翔's avatar 田翔

fix: 唯一值文本校验不验证本身

parent b866d29c
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "6.10.3", "version": "6.10.4",
"description": "6.10.3 父级台账批量操作台账名称传参问题", "description": "6.10.4 唯一值文本校验不验证本身",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -128,9 +128,13 @@ const TextInput = (props) => { ...@@ -128,9 +128,13 @@ const TextInput = (props) => {
if (addons) { if (addons) {
let getValue = async (params) => { let getValue = async (params) => {
const [rule, value, callback] = params const [rule, value, callback] = params
const { code, data, msg } = await GetFieldValueFromTable(tableName, fieldName, `${fieldName}='${value}'`) if (presetValue !== value) {
if (Array.isArray(data) && data.length) { const { code, data, msg } = await GetFieldValueFromTable(tableName, fieldName, `${fieldName}='${value}'`)
callback(new Error(`${title}已重复,请重新输入`)); if (Array.isArray(data) && data.length) {
callback(new Error(`${title}已重复,请重新输入`));
} else {
callback()
}
} else { } else {
callback() callback()
} }
......
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