king
2022-07-12 2a3fc3e6493833ef25eb0d25c9b00c42e5735f4d
2022-07-12
15个文件已修改
158 ■■■■■ 已修改文件
public/options.json 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/index.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/index.js 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/dragtitle/card.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/dragtitle/options.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/normal-form/index.scss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/tab-form/index.scss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/actionform/index.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/normal-form/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/tab-form/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/index.jsx 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/actionform/index.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/dragaction/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/modalform/index.jsx 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/options.json
@@ -1,12 +1,12 @@
{
  "appId": "202108312122504607B107A83F55B40C98CCF",
  "appkey": "20210831212235413F287EC3BF489424496C8",
  "appId": "201912040924165801464FF1788654BC5AC73",
  "appkey": "20191106103859640976D6E924E464D029CF0",
  "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars",
  "systemType": "",
  "externalDatabase": "false",
  "lineColor": "",
  "filter": "false",
  "defaultApp": "mkindustry",
  "defaultApp": "mk",
  "defaultLang": "zh-CN",
  "WXAppID": "",
  "WXminiAppID": "",
@@ -15,6 +15,6 @@
  "probation": "",
  "keepPassword": "true",
  "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"],
  "host": "http://demo.mk9h.cn",
  "service": "erp_new/"
  "host": "http://qingqiumarket.cn",
  "service": "MKWMS/"
}
src/api/index.js
@@ -144,6 +144,9 @@
    if (process.env.NODE_ENV === 'production') {
      _url = document.location.origin + ':8080/' + url
    }
    if (/https/.test(_url)) {
      _url = _url.replace(/:8080/g, ':8443')
    }
    
    if (param) {
      return axios({
src/index.js
@@ -73,10 +73,7 @@
    GLOB.keepKey = config.keepPassword !== 'false'
    GLOB.WXAppID = config.WXAppID || ''
    GLOB.WXminiAppID = config.WXminiAppID || ''
    GLOB.accessToken = {
      accessTime: parseInt(new Date().getTime() / 1000),
      oa_access_token: '58_n--VVhcdIR_Y70FreSGNCqoKuhIjY9CHYjIiVNaOQ3k_wZYvz9FaZdU65WJ6qKAHCmePComqYfyEd11qaqhXIrUToUvP8cFxVo6gvNeIFO2XR4HgBzbhHCNtxH6spvlsXoH5xlUmNB-9cIIoOEQgACAXNZ'
    }
    GLOB.accessToken = {}
    if (config.externalDatabase !== false && config.externalDatabase !== 'false' && config.externalDatabase !== undefined) {
      GLOB.externalDatabase = config.externalDatabase ? `[${config.externalDatabase}]..` : ''
src/menu/components/form/dragtitle/card.jsx
@@ -43,7 +43,7 @@
    selectCard(id)
  }
  const getForms = () =>{
  const getForms = () => {
    return getForm(card)
  }
src/menu/components/form/dragtitle/options.jsx
@@ -46,6 +46,18 @@
    },
    {
      type: 'radio',
      field: 'cache',
      label: '选项查询',
      initval: group.setting.cache || 'true',
      tooltip: '需要通过数据源查询的选项,是否使用缓存。',
      required: false,
      options: [
        {value: 'true', label: '缓存'},
        {value: 'false', label: '实时'},
      ]
    },
    {
      type: 'radio',
      field: 'align',
      label: '表单排列',
      initval: group.setting.align || 'left_right',
src/menu/components/form/normal-form/index.scss
@@ -67,6 +67,10 @@
      padding-top: 10px;
      padding-bottom: 30px;
    }
    .modal-fields-row:not(.mob-form) {
      padding-left: 10px;
      padding-right: 10px;
    }
    .am-list-item {
      background-color: transparent;
    }
src/menu/components/form/tab-form/index.scss
@@ -67,6 +67,10 @@
      padding-top: 10px;
      padding-bottom: 30px;
    }
    .modal-fields-row:not(.mob-form) {
      padding-left: 10px;
      padding-right: 10px;
    }
    .am-list-item {
      background-color: transparent;
    }
src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -476,7 +476,6 @@
      if (value === 'pop' || value === 'prompt' || value === 'exec') {
        _fieldval.intertype = 'system'
        _fieldval.sqlType = ''
      } else if (value === 'form') {
        _fieldval.Ot = 'requiredSgl'
@@ -496,9 +495,11 @@
        _fieldval.intertype = 'system'
        _fieldval.label = this.props.dict['model.form.excelOut']
        _fieldval.class = 'dgreen'
        _fieldval.execSuccess = 'never'
        this.record.Ot = 'notRequired'
        this.record.label = this.props.dict['model.form.excelOut']
        this.record.class = 'dgreen'
        this.record.execSuccess = 'never'
  
      } else if (value === 'popview') {
        _fieldval.display = 'modal'
@@ -563,7 +564,7 @@
        }
      } else if (value === 'audit') {
        _fieldval.label = '审核'
        _fieldval.Ot = 'requiredSgl'
        _fieldval.Ot = 'required'
        if (hasclass) {
          _fieldval.class = 'primary'
        } else {
@@ -571,12 +572,14 @@
        }
      } else if (value === 'LogicDelete' || value === 'delete') {
        _fieldval.label = '删除'
        _fieldval.Ot = 'requiredSgl'
        _fieldval.Ot = 'required'
        if (hasclass) {
          _fieldval.class = 'danger'
        } else {
          _fieldval.color = 'danger'
        }
      } else if (value === 'custom') {
        _fieldval.Ot = 'required'
      }
      this.record.label = _fieldval.label || this.record.label || ''
src/tabviews/custom/components/form/normal-form/index.jsx
@@ -258,7 +258,9 @@
    if (config.wrap.datatype === 'static' || (config.setting.supModule && !BID)) {
      this.setState({
        data: {$$empty: true}
        data: null
      }, () => {
        this.setState({data: {$$empty: true}})
      })
      return
    }
src/tabviews/custom/components/form/tab-form/index.jsx
@@ -219,7 +219,9 @@
    if (config.wrap.datatype === 'static' || (config.setting.supModule && !BID)) {
      this.setState({
        data: {$$empty: true}
        data: null
      }, () => {
        this.setState({data: {$$empty: true}})
      })
      return
    }
src/tabviews/zshare/mutilform/index.jsx
@@ -935,6 +935,9 @@
            if (item.declareType === 'nvarchar(50)') {
              _item.type = 'text'
            }
          } else if (item.declare === 'decimal' && ['select', 'link', 'radio', 'checkcard'].includes(item.type)) {
            _item.type = 'number'
            _item.fieldlen = item.decimal || 0
          }
          if (item.type === 'text' && item.lenControl && item.lenControl !== 'limit') {
src/templates/sharecomponent/actioncomponent/actionform/index.jsx
@@ -341,7 +341,6 @@
      if (value === 'pop' || value === 'prompt' || value === 'exec') {
        _fieldval.intertype = 'system'
        _fieldval.sqlType = ''
      } else if (value === 'excelIn') {
        _fieldval.intertype = 'system'
        _fieldval.Ot = 'notRequired'
@@ -351,15 +350,15 @@
        this.record.Ot = 'notRequired'
        this.record.label = this.props.dict['model.form.excelIn']
        this.record.class = 'dgreen'
      } else if (value === 'excelOut') {
        _fieldval.intertype = 'system'
        _fieldval.label = this.props.dict['model.form.excelOut']
        _fieldval.class = 'dgreen'
        _fieldval.execSuccess = 'never'
        this.record.Ot = 'notRequired'
        this.record.label = this.props.dict['model.form.excelOut']
        this.record.class = 'dgreen'
        this.record.execSuccess = 'never'
  
      } else if (value === 'popview') {
        _fieldval.display = 'modal'
@@ -424,13 +423,16 @@
        _fieldval.class = 'purple'
      } else if (value === 'audit') {
        _fieldval.label = '审核'
        _fieldval.Ot = 'requiredSgl'
        _fieldval.Ot = 'required'
        _fieldval.class = 'primary'
      } else if (value === 'LogicDelete' || value === 'delete') {
        _fieldval.label = '删除'
        _fieldval.Ot = 'requiredSgl'
        _fieldval.Ot = 'required'
        _fieldval.class = 'danger'
      } else if (value === 'custom') {
        _fieldval.Ot = 'required'
      }
      if (this.record.position === 'grid') {
        _fieldval.Ot = 'requiredSgl'
src/templates/sharecomponent/actioncomponent/dragaction/index.jsx
@@ -131,6 +131,7 @@
        newcard.sysInterface = setting.sysInterface
        newcard.outerFunc = setting.outerFunc
        newcard.interface = setting.interface
        newcard.execSuccess = 'never'
        newcard.class = 'dgreen'
      }
      
src/templates/zshare/formconfig.jsx
@@ -2768,16 +2768,6 @@
    },
    {
      type: 'number',
      key: 'decimal',
      min: 0,
      max: 18,
      precision: 0,
      label: Formdict['header.form.decimal'],
      initVal: card.decimal || 0,
      required: true
    },
    {
      type: 'number',
      key: 'min',
      label: '最小值',
      initVal: card.min || card.min === 0 ? card.min : '',
@@ -2908,6 +2898,44 @@
        value: 'second',
        text: '秒'
      }]
    },
    {
      type: 'radio',
      key: 'declareType',
      label: '数据类型',
      tooltip: '声明变量时的类型,时间格式datetime或文本格式nvarchar(50)。',
      initVal: card.declareType || 'datetime',
      options: [{
        value: 'datetime',
        text: 'datetime'
      }, {
        value: 'nvarchar(50)',
        text: 'nvarchar(50)'
      }]
    },
    {
      type: 'radio',
      key: 'declare',
      label: '数据类型',
      initVal: card.declare || 'nvarchar',
      tooltip: '声明变量时的类型。使用 decimal 时,请确认Value为数值,且不可为空。',
      options: [{
        value: 'nvarchar',
        text: 'nvarchar'
      }, {
        value: 'decimal',
        text: 'decimal'
      }]
    },
    {
      type: 'number',
      key: 'decimal',
      min: 0,
      max: 18,
      precision: 0,
      label: Formdict['header.form.decimal'],
      initVal: card.decimal || 0,
      required: true
    },
    {
      type: 'number',
@@ -3196,20 +3224,6 @@
      initVal: card.backgroundColor || '',
      tooltip: '设置背景色后,选中效果由背景颜色控制。',
      required: true
    },
    {
      type: 'radio',
      key: 'declareType',
      label: '数据类型',
      tooltip: '声明变量时的类型,时间格式datetime或文本格式nvarchar(50)。',
      initVal: card.declareType || 'datetime',
      options: [{
        value: 'datetime',
        text: 'datetime'
      }, {
        value: 'nvarchar(50)',
        text: 'nvarchar(50)'
      }]
    },
    // {
    //   type: 'radio',
src/templates/zshare/modalform/index.jsx
@@ -21,12 +21,12 @@
const modalTypeOptions = {
  text: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'regular', 'interception', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'scan', 'splitline', 'placeholder', 'place', 'marginTop', 'marginBottom', 'lenControl'],
  number: ['initval', 'readonly', 'hidden', 'decimal', 'min', 'max', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'splitline', 'place', 'marginTop', 'marginBottom'],
  select: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'setAll', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown', 'marginTop', 'marginBottom'],
  select: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'declare', 'setAll', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown', 'marginTop', 'marginBottom'],
  checkbox: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'arrange', 'marginTop', 'marginBottom'],
  radio: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'setAll', 'emptyText', 'splitline', 'arrange', 'marginTop', 'marginBottom'],
  checkcard: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'display', 'tooltip', 'extra', 'width', 'multiple', 'splitline', 'marginTop', 'marginBottom'],
  radio: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'declare', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'setAll', 'emptyText', 'splitline', 'arrange', 'marginTop', 'marginBottom'],
  checkcard: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'span', 'labelwidth', 'display', 'tooltip', 'extra', 'width', 'multiple', 'splitline', 'marginTop', 'marginBottom'],
  multiselect: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'marginTop', 'marginBottom'],
  link: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'setAll', 'linkField', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown', 'marginTop', 'marginBottom'],
  link: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'declare', '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', 'minDate', 'maxDate', 'precision'],
@@ -162,6 +162,13 @@
        shows.push('linkField')
        reRequired.linkField = false
      }
      if (['select', 'link', 'radio'].includes(type)) {
        if (this.record.declare === 'nvarchar') {
          shows.push('fieldlength')
        } else if (this.record.declare === 'decimal') {
          shows.push('decimal')
        }
      }
    } else if (type === 'checkcard') {
      reRequired.fields = false
      if (this.record.display === 'picture') {
@@ -189,8 +196,14 @@
      }
      if (this.record.multiple === 'false') {
        shows.push('linkSubField')
        shows.push('linkSubField', 'declare')
        if (this.record.declare === 'nvarchar') {
          shows.push('fieldlength')
        } else if (this.record.declare === 'decimal') {
          shows.push('decimal')
        }
      } else {
        shows.push('fieldlength')
        reTooltip.initval = '添加多个初始值请使用逗号分隔。'
      }