| | |
| | | value: '0' |
| | | }) |
| | | options.push(item) |
| | | } else if (['datemonth', 'dateweek', 'daterange'].includes(search.type)) { |
| | | } else if (['datemonth', 'dateweek'].includes(search.type)) { |
| | | options.push(item) |
| | | options.push({ |
| | | key: item.key + '1', |
| | | value: '0' |
| | | }) |
| | | } else if (search.type === 'daterange') { |
| | | let _skey = search.field |
| | | let _ekey = search.field + '1' |
| | | |
| | | if (/,/.test(search.field)) { |
| | | _skey = search.field.split(',')[0] |
| | | _ekey = search.field.split(',')[1] |
| | | } |
| | | |
| | | options.push({ |
| | | key: _skey, |
| | | value: '0' |
| | | }) |
| | | options.push({ |
| | | key: _ekey, |
| | | value: '0' |
| | | }) |
| | | } else if (search.type === 'text' || search.type === 'select') { |
| | |
| | | } |
| | | |
| | | Api.genericInterface(param).then(result => { |
| | | if (result.status) { |
| | | if (result.status || result.ErrCode === '-2') { |
| | | if (sumParam) { |
| | | Api.genericInterface(sumParam).then(res => { |
| | | if (res.status) { |
| | | if (res.status || res.ErrCode === '-2') { |
| | | _resolve() |
| | | } else { |
| | | _reject() |