king
2022-04-10 c1b1976f059aea9b69e85f2bbc6bdf4381d5691a
2022-04-10
4个文件已修改
54 ■■■■ 已修改文件
public/options.json 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/index.jsx 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/modalform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/options.json
@@ -1,17 +1,17 @@
{
  "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": "",
  "debugger": false,
  "licenseKey": "7EFE13KIKLILIJB64C12",
  "probation": "2021-12-31",
  "host": "http://demo.mk9h.cn",
  "service": "erp_new/"
  "licenseKey": "",
  "probation": "",
  "host": "http://qingqiumarket.cn",
  "service": "MKWMS/"
}
src/tabviews/zshare/mutilform/index.jsx
@@ -231,10 +231,14 @@
        }, {
          required: item.required === 'true',
          message: item.label + '不可为空!'
        }, {
          max: item.fieldlength,
          message: formRule.input.formMessage.replace('@max', item.fieldlength)
        }]
        if (!item.lenControl || item.lenControl === 'limit') {
          _rules.push({
            max: item.fieldlength,
            message: formRule.input.formMessage.replace('@max', item.fieldlength)
          })
        }
        if (item.regular) {
          if (item.regular === 'number') {
@@ -906,6 +910,14 @@
              _item.type = 'text'
            }
          }
          if (item.type === 'text' && item.lenControl && item.lenControl !== 'limit') {
            if (item.lenControl === 'left') {
              _item.value = _item.value.substr(0, item.fieldlength)
            } else {
              _item.value = _item.value.slice(-item.fieldlength)
            }
          }
    
          search.push(_item)
        })
src/templates/zshare/formconfig.jsx
@@ -2837,7 +2837,7 @@
      label: Formdict['model.form.field'] + Formdict['model.length'],
      // tooltip: '文本、下拉框、日期等字段默认长度为50,多行文本与文件上传字段默认长度为512',
      initVal: card.fieldlength || _fieldlength,
      required: false
      required: true
    },
    {
      type: 'number',
@@ -3262,6 +3262,24 @@
      }]
    },
    {
      type: 'radio',
      key: 'lenControl',
      label: '长度控制',
      initVal: card.lenControl || 'limit',
      tooltip: '在设置字段长度后,对长度的控制方式。',
      required: false,
      options: [{
        value: 'limit',
        text: '限制输入'
      }, {
        value: 'left',
        text: '左截'
      }, {
        value: 'right',
        text: '右截'
      }]
    },
    {
      type: 'number',
      key: 'labelwidth',
      min: 1,
src/templates/zshare/modalform/index.jsx
@@ -19,7 +19,7 @@
const MkEditIcon = asyncComponent(() => import('@/components/mkIcon'))
const modalTypeOptions = {
  text: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'regular', 'interception', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'scan', 'splitline', 'placeholder', 'place', 'marginTop', 'marginBottom'],
  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'],
  checkbox: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'arrange', 'marginTop', 'marginBottom'],