|
@@ -32,6 +32,8 @@ const tailFormItemLayout = {
|
32
|
32
|
},
|
33
|
33
|
}
|
34
|
34
|
|
|
35
|
+const isEmpty = o => !o || (Array.isArray(o) && !o.length) || (typeof o === 'object' && !Object.keys(o).length)
|
|
36
|
+
|
35
|
37
|
export default Form.create()(props => {
|
36
|
38
|
const {
|
37
|
39
|
phaseId,
|
|
@@ -63,7 +65,9 @@ export default Form.create()(props => {
|
63
|
65
|
const ownerTel = props.form.getFieldValue('ownerTel')
|
64
|
66
|
if (ownerTel) {
|
65
|
67
|
taUserHas({params: {ownerTel}}).then(res => {
|
66
|
|
- setTelAccUser(res)
|
|
68
|
+ if (!isEmpty(res)) {
|
|
69
|
+ setTelAccUser(res)
|
|
70
|
+ }
|
67
|
71
|
})
|
68
|
72
|
}
|
69
|
73
|
}
|
|
@@ -87,7 +91,7 @@ export default Form.create()(props => {
|
87
|
91
|
|
88
|
92
|
const handleSubmit = e => {
|
89
|
93
|
e.preventDefault();
|
90
|
|
- if (telAccUser) {
|
|
94
|
+ if (!isEmpty(telAccUser)) {
|
91
|
95
|
return
|
92
|
96
|
}
|
93
|
97
|
|