king
2020-02-16 5088d267c69e87673c85ba302dd9dc62c9da4951
src/tabviews/tableshare/mutilform/index.jsx
@@ -570,63 +570,25 @@
          })
          Object.keys(values).forEach(key => {
            let _value = ''
            if (this.state.datatype[key] === 'datetime') {
              let _value = ''
              if (values[key]) {
                _value = moment(values[key]).format('YYYY-MM-DD HH:mm:ss')
              }
              search.push({
                type: this.state.datatype[key],
                readonly: this.state.readtype[key],
                readin: this.state.readin[key],
                fieldlen: this.state.fieldlen[key],
                key: key,
                value: _value
              })
            } else if (this.state.datatype[key] === 'datemonth') {
              let _value = ''
              if (values[key]) {
                _value = moment(values[key]).format('YYYY-MM')
              }
              search.push({
                type: this.state.datatype[key],
                readonly: this.state.readtype[key],
                readin: this.state.readin[key],
                fieldlen: this.state.fieldlen[key],
                key: key,
                value: _value
              })
            } else if (this.state.datatype[key] === 'date') {
              let _value = ''
              if (values[key]) {
                _value = moment(values[key]).format('YYYY-MM-DD')
              }
              search.push({
                type: this.state.datatype[key],
                readonly: this.state.readtype[key],
                readin: this.state.readin[key],
                fieldlen: this.state.fieldlen[key],
                key: key,
                value: _value
              })
            } else if (this.state.datatype[key] === 'number') {
              search.push({
                type: this.state.datatype[key],
                readonly: this.state.readtype[key],
                readin: this.state.readin[key],
                fieldlen: this.state.fieldlen[key],
                key: key,
                value: values[key]
              })
              _value = values[key]
            } else if (this.state.datatype[key] === 'multiselect') {
              search.push({
                type: this.state.datatype[key],
                readonly: this.state.readtype[key],
                readin: this.state.readin[key],
                fieldlen: this.state.fieldlen[key],
                key: key,
                value: values[key] ? values[key].join(',') : ''
              })
              _value = values[key] ? values[key].join(',') : ''
            } else if (this.state.datatype[key] === 'fileupload') {
              let vals = []
@@ -640,33 +602,23 @@
                })
              }
              search.push({
                type: this.state.datatype[key],
                readonly: this.state.readtype[key],
                readin: this.state.readin[key],
                fieldlen: this.state.fieldlen[key],
                key: key,
                value: vals.join(',')
              })
              _value = vals.join(',')
            } else if (this.state.datatype[key] === 'text') {
              search.push({
                type: this.state.datatype[key],
                readonly: this.state.readtype[key],
                readin: this.state.readin[key],
                fieldlen: this.state.fieldlen[key],
                key: key,
                value: values[key].replace(/(^\s*|\s*$) | \t* | \v*/ig, '')
              })
              _value = values[key].replace(/(^\s*|\s*$) | \t* | \v*/ig, '')
            } else {
              search.push({
                type: this.state.datatype[key],
                readonly: this.state.readtype[key],
                readin: this.state.readin[key],
                fieldlen: this.state.fieldlen[key],
                key: key,
                value: values[key]
              })
              _value = values[key]
            }
            search.push({
              type: this.state.datatype[key],
              readonly: this.state.readtype[key],
              readin: this.state.readin[key],
              fieldlen: this.state.fieldlen[key],
              key: key,
              value: _value
            })
          })
          resolve(search)