king
2021-11-04 4190affb665438b1067af88f09e8557abbbfea2b
2021-11-04
7个文件已修改
104 ■■■■■ 已修改文件
src/mob/components/formdragelement/index.scss 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/modalconfig/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/modalconfig/source.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/mkDatePicker/index.jsx 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/settingform/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/modalform/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/formdragelement/index.scss
@@ -50,6 +50,7 @@
        font-size: 16px;
        flex: 1 1;
        text-align: right;
        padding-right: 15px;
      }
      .am-input-control.left {
        text-align: left;
@@ -78,7 +79,9 @@
        line-height: 24px;
      }
      .am-list-extra {
        display: none;
        position: absolute;
        top: 30px;
        right: 10px;
      }
    }
  }
src/mob/modalconfig/index.jsx
@@ -91,6 +91,7 @@
    let _config = fromJS(this.state.config).toJS()
    if (list.length > _config.fields.length) {
      _config.fields = list
      this.setState({
        config: _config
      }, () => {
src/mob/modalconfig/source.jsx
@@ -18,7 +18,7 @@
  },
  {
    type: 'form',
    label: CommonDict['model.form.select'],
    label: '选择器',
    subType: 'select',
    url: ''
  },
src/tabviews/zshare/mutilform/mkDatePicker/index.jsx
@@ -31,6 +31,8 @@
    this.state = {
      value,
      minDate: config.minDate ? moment().add(config.minDate, 'days').endOf('day') : '',
      maxDate: config.maxDate ? moment().add(config.maxDate, 'days').endOf('day') : '',
      mode,
      format
    }
@@ -52,16 +54,32 @@
    this.props.onChange(val ? moment(val).format(format) : '')
  }
  disabledDate = (current) => {
    const { minDate, maxDate } = this.state
    if (!current || (!maxDate && !minDate)) {
      return false
    }
    if (!maxDate) {
      return current < minDate
    } else if (!minDate) {
      return current > maxDate
    } else {
      return current < minDate || current > maxDate
    }
  }
  render() {
    const { config } = this.props
    const { value, mode } = this.state
    if (mode === 'date') {
      return <DatePicker defaultValue={value} disabled={config.readonly} onChange={this.onChange}/>
      return <DatePicker defaultValue={value} disabledDate={this.disabledDate} disabled={config.readonly} onChange={this.onChange}/>
    } else if (mode === 'month') {
      return <MonthPicker defaultValue={value} disabled={config.readonly} onChange={this.onChange}/>
    } else if (mode === 'datetime') {
      return <DatePicker defaultValue={value} showTime disabled={config.readonly} onChange={this.onChange}/>
      return <DatePicker defaultValue={value} disabledDate={this.disabledDate} showTime disabled={config.readonly} onChange={this.onChange}/>
    }
  }
}
src/templates/modalconfig/settingform/index.jsx
@@ -180,7 +180,7 @@
              )}
            </Form.Item>
          </Col>
          <Col span={12}>
          {appType !== 'mob' ? <Col span={12}>
            <Form.Item label="点击空白处">
              {getFieldDecorator('clickouter', {
                initialValue: config.setting.clickouter || 'unclose'
@@ -191,7 +191,7 @@
                </Radio.Group>
              )}
            </Form.Item>
          </Col>
          </Col> : null}
          <Col span={12}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="需要通过数据源查询的选项,是否使用缓存。">
src/templates/zshare/formconfig.jsx
@@ -2615,6 +2615,70 @@
      required: false
    },
    {
      type: 'select',
      key: 'minDate',
      label: '最小值',
      initVal: card.minDate || '',
      required: false,
      options: [{
        value: '',
        text: '无'
      }, {
        value: '0',
        text: '当天'
      }, {
        value: '-1',
        text: '前一天'
      }, {
        value: '-2',
        text: '前两天'
      }, {
        value: '-3',
        text: '前三天'
      }, {
        value: '-7',
        text: '前七天'
      }, {
        value: '-30',
        text: '前30天'
      }, {
        value: '-90',
        text: '前90天'
      }]
    },
    {
      type: 'select',
      key: 'maxDate',
      label: '最大值',
      initVal: card.maxDate || '',
      required: false,
      options: [{
        value: '',
        text: '无'
      }, {
        value: '0',
        text: '当天'
      }, {
        value: '1',
        text: '后一天'
      }, {
        value: '2',
        text: '后两天'
      }, {
        value: '3',
        text: '后三天'
      }, {
        value: '7',
        text: '后七天'
      }, {
        value: '30',
        text: '后30天'
      }, {
        value: '90',
        text: '后90天'
      }]
    },
    {
      type: 'number',
      key: 'fieldlength',
      min: 1,
@@ -3007,7 +3071,7 @@
      key: 'place',
      label: '排列',
      initVal: card.place || 'left_right',
      tooltip: '提示文字与输入框的位置关系。注:上下排列是会禁用扫码功能。',
      tooltip: '提示文字与输入框的位置关系。',
      forbid: appType !== 'mob',
      options: [{
        value: 'left_right',
src/templates/zshare/modalform/index.jsx
@@ -26,9 +26,9 @@
  link: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'setAll', 'linkField', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown', 'marginTop', 'marginBottom'],
  fileupload: ['readonly', 'required', 'readin', 'fieldlength', 'maxfile', 'fileType', 'span', 'labelwidth', 'tooltip', 'extra', 'compress', 'splitline', 'marginTop', 'marginBottom'],
  switch: ['initval', 'openVal', 'closeVal', 'openText', 'closeText', 'readonly', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'marginTop', 'marginBottom'],
  date: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline', 'marginTop', 'marginBottom'],
  date: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline', 'marginTop', 'marginBottom', 'minDate', 'maxDate'],
  datemonth: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'splitline', 'marginTop', 'marginBottom'],
  datetime: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline', 'marginTop', 'marginBottom'],
  datetime: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline', 'marginTop', 'marginBottom', 'minDate', 'maxDate'],
  textarea: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'span', 'labelwidth', 'maxRows', 'encryption', 'interception', 'tooltip', 'extra', 'count', 'placeholder', 'marginTop', 'marginBottom'],
  color: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'marginTop', 'marginBottom'],
  hint: ['label', 'type', 'blacklist', 'message', 'span', 'labelwidth', 'splitline', 'marginTop', 'marginBottom'],