Commit 7cf95c72 authored by 孙浩's avatar 孙浩

params插入空值问题修改

parent 3ac2ee23
...@@ -445,8 +445,13 @@ export default { ...@@ -445,8 +445,13 @@ export default {
submitForm: function() { submitForm: function() {
this.$refs['form'].validate(valid => { this.$refs['form'].validate(valid => {
if (valid) { if (valid) {
if (this.paramsItems.length > 0) { let isNull = true
if (this.paramsItems.length === 1 && this.paramsItems[0].key === '') { this.paramsItems.forEach(item => {
if (item.key !== '' && item.key !== null) {
isNull = false
}
})
if (isNull) {
this.form.params = null this.form.params = null
} else { } else {
// 4.校验paramsItems的值 // 4.校验paramsItems的值
...@@ -456,8 +461,6 @@ export default { ...@@ -456,8 +461,6 @@ export default {
return obj return obj
}, {})) }, {}))
} }
}
if (this.form.businessId !== undefined) { if (this.form.businessId !== undefined) {
this.addLoading = true this.addLoading = true
updateIncomeWmsLabel(this.form).then(response => { updateIncomeWmsLabel(this.form).then(response => {
......
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