king
2022-09-22 24446b2a5bfb7c50181049a60062bb2802317041
Merge branch 'develop'
16个文件已修改
194 ■■■■ 已修改文件
public/options.json 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/dragaction/action.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcomponent/options.jsx 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardsimplecomponent/options.jsx 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/formaction/formconfig.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/actionform/index.jsx 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/formconfig.jsx 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/modulecell/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/viewnodes/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/modulesource/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/modulesource/option.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/normalbutton/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/fileupload/index.jsx 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/modalform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | 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": "",
@@ -16,6 +16,6 @@
  "transfer": "false",
  "keepPassword": "true",
  "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"],
  "host": "http://demo.mk9h.cn",
  "service": "erp_new/"
  "host": "http://qingqiumarket.cn",
  "service": "MKWMS/"
}
src/menu/components/card/cardcellcomponent/dragaction/action.jsx
@@ -53,8 +53,10 @@
  if (card.OpenType === 'form') {
    if (card.formType === 'switch') {
      btnElement = (<Switch style={_style} className={card.size === 'large' ? 'ant-switch-large' : ''} size={card.size} checkedChildren={card.openText || ''} unCheckedChildren={card.closeText || ''}/>)
    } else {
    } else if (card.formType === 'radio') {
      btnElement = (<Checkbox style={_style}></Checkbox>)
    } else {
      btnElement = (<Button style={_style} type="link"><MkIcon type="scan"/></Button>)
    }
  } else if (card.show === 'icon') {
    btnElement = (<Button style={_style} type="link"><MkIcon type={card.icon}/>{warning}</Button>)
src/menu/components/card/cardcellcomponent/index.jsx
@@ -149,7 +149,7 @@
    let options = ['font', 'border', 'padding', 'margin', 'background']
    if (element.eleType === 'button') {
      if (element.OpenType === 'form') {
      if (element.OpenType === 'form' && element.formType !== 'scan') {
        options = ['margin', 'float']
      } else {
        options.push('width', 'minHeight', 'float')
src/menu/components/card/cardcomponent/options.jsx
@@ -40,6 +40,12 @@
  if (hasMenus) {
    ops = [{value: 'menus', label: '菜单组'}]
  }
  let adapters = sessionStorage.getItem('adapter') || ''
  if (adapters.indexOf('wxmini') > -1) {
    ops.push({value: 'miniprogram', label: '小程序'})
  } else if (setting.click === 'miniprogram') {
    setting.click = ''
  }
  const cardSettingForm = [
    {
@@ -97,11 +103,11 @@
      forbid: subtype !== 'propcard'
    },
    {
      type: !hasMenus ? 'radio' : 'select',
      type: ops.length === 0 ? 'radio' : 'select',
      field: 'click',
      label: '点击事件',
      initval: setting.click || '',
      tooltip: '当绑定点击事件时,卡片的切换功能将失效。',
      // tooltip: '当绑定点击事件时,卡片的切换功能将失效。',
      required: false,
      options: [
        {value: '', label: '无'},
@@ -114,11 +120,13 @@
        {field: 'menu', values: ['menu']},
        {field: 'linkurl', values: ['link']},
        {field: 'open', values: ['menu', 'link', 'menus']},
        {field: 'joint', values: ['menu', 'link', 'menus']},
        {field: 'joint', values: ['menu', 'link', 'menus', 'miniprogram']},
        {field: 'linkbtn', values: ['button']},
        {field: 'clickType', values: ['button']},
        {field: 'menuType', values: ['menus']},
        {field: 'menus', values: ['menus']},
        {field: 'miniAppId', values: ['miniprogram']},
        {field: 'miniPath', values: ['miniprogram']},
      ]
    },
    {
@@ -148,6 +156,21 @@
      span: 24
    },
    {
      type: 'text',
      field: 'miniAppId',
      label: '小程序AppID',
      initval: setting.miniAppId || '',
      required: true
    },
    {
      type: 'text',
      field: 'miniPath',
      label: '页面路径',
      initval: setting.miniPath || '',
      tooltip: '可指定跳转小程序页面,为空时打开首页,注:参数拼接在指定页面时有效。',
      required: false
    },
    {
      type: 'radio',
      field: 'open',
      label: '打开方式',
src/menu/components/card/cardsimplecomponent/options.jsx
@@ -83,7 +83,7 @@
      field: 'click',
      label: '点击事件',
      initval: setting.click || '',
      tooltip: '当选择触发按钮时,只有当卡片中只存在一个按钮时有效。',
      // tooltip: '当选择触发按钮时,只有当卡片中只存在一个按钮时有效。',
      required: false,
      options: [
        {value: '', label: '无'},
@@ -198,6 +198,14 @@
    }
  }
  let ops = []
  let adapters = sessionStorage.getItem('adapter') || ''
  if (adapters.indexOf('wxmini') > -1) {
    ops.push({value: 'miniprogram', label: '小程序'})
  } else if (setting.click === 'miniprogram') {
    setting.click = ''
  }
  const cardSettingForm = [
    {
      type: 'text',
@@ -218,12 +226,15 @@
        {value: '', label: '无'},
        {value: 'menu', label: '菜单'},
        {value: 'link', label: '链接'},
        ...ops
      ],
      controlFields: [
        {field: 'menu', values: ['menu']},
        {field: 'linkurl', values: ['link']},
        {field: 'open', values: ['menu', 'link']},
        {field: 'joint', values: ['menu', 'link']},
        {field: 'joint', values: ['menu', 'link', 'miniprogram']},
        {field: 'miniAppId', values: ['miniprogram']},
        {field: 'miniPath', values: ['miniprogram']},
      ]
    },
    {
@@ -248,6 +259,21 @@
      forbid: appType !== 'pc' && appType !== 'mob'
    },
    {
      type: 'text',
      field: 'miniAppId',
      label: '小程序AppID',
      initval: setting.miniAppId || '',
      required: true
    },
    {
      type: 'text',
      field: 'miniPath',
      label: '页面路径',
      initval: setting.miniPath || '',
      tooltip: '可指定跳转小程序页面,为空时打开首页,注:参数拼接在指定页面时有效。',
      required: false
    },
    {
      type: 'radio',
      field: 'joint',
      label: '参数拼接',
src/menu/components/form/formaction/formconfig.jsx
@@ -296,7 +296,7 @@
      type: 'text',
      key: 'output',
      label: '返回值',
      tooltip: '执行成功后的返回值。系统函数可指定返回的变量(以@符开头,如@id);自定义函数可指定返回字段(如id)。',
      tooltip: '执行成功后的返回值。系统函数可指定返回的变量(以@符开头,返回id时可使用@id@);自定义函数可指定返回字段(如id)。',
      initVal: card.output || '',
      required: false
    },
src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -236,8 +236,10 @@
      if (this.record.formType === 'switch') {
        shows.push('field', 'size', 'openVal', 'closeVal', 'openText', 'closeText')
      } else {
      } else if (this.record.formType === 'radio') {
        shows.push('field', 'openVal', 'closeVal')
      } else {
        shows.push('field')
      }
      reOptions.intertype = this.state.interTypeOptions.filter(item => item.value !== 'custom')
@@ -428,6 +430,9 @@
        shows.push('innerFunc', 'Ot', 'execSuccess', 'execError', 'urlkey')
      } else if (_funcType === 'pay') {
        shows.push('payType', 'Ot', 'execSuccess', 'execError', 'syncComponent', 'openmenu')
        if (this.record.openmenu && this.record.openmenu !== 'goback') {
          shows.push('open')
        }
        reOptions.Ot = requireOptions.filter(op => ['requiredSgl'].includes(op.value))
      } else if (_funcType === 'refund') {
        shows.push('Ot', 'execSuccess', 'execError', 'syncComponent', 'openmenu')
@@ -878,9 +883,14 @@
          values.modal = card.modal || null
          if (values.OpenType === 'form') {
            if (/^(0|[1-9]\d*)$/.test(values.openVal) && /^(0|[1-9]\d*)$/.test(values.closeVal)) {
              values.openVal = +values.openVal
              values.closeVal = +values.closeVal
            if (values.formType !== 'scan') {
              if (/^(0|[1-9]\d*)$/.test(values.openVal) && /^(0|[1-9]\d*)$/.test(values.closeVal)) {
                values.openVal = +values.openVal
                values.closeVal = +values.closeVal
              }
            } else {
              values.show = 'icon'
              values.icon = 'scan'
            }
          } else if (values.OpenType === 'excelOut') {
            values.Ot = 'notRequired'
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -173,7 +173,7 @@
  if (type === 'card') {
    opentypes.push({
      value: 'form',
      text: '表单(开关或勾选框)'
      text: '表单'
    })
  } else if (card.OpenType === 'form') { // 拖拽添加类型转换
    card.OpenType = 'pop'
@@ -197,6 +197,16 @@
      value: 'closetab',
      text: '关闭标签'
    }]
  }
  let formTypes = []
  if (appType === 'mob') {
    formTypes = [{
      value: 'scan',
      text: '扫描'
    }]
  } else if (card.formType === 'scan') {
    card.formType = 'switch'
  }
  let forms = [
@@ -245,7 +255,8 @@
      }, {
        value: 'radio',
        text: '勾选框'
      }]
      },
      ...formTypes]
    },
    {
      type: 'select',
@@ -281,9 +292,9 @@
      options: [{
        value: 'wxpay',
        text: '微信'
      }, {
        value: 'alipay',
        text: '支付宝'
      // }, {
      //   value: 'alipay',
      //   text: '支付宝'
      }]
    },
    {
@@ -737,6 +748,7 @@
      tooltip: '执行成功后需要打开的菜单。',
      initVal: card.openmenu || (!appType ? [] : ''),
      help: appType === 'mob' || appType === 'pc' ? '可返回上一页。' : null,
      extendName: 'MenuNo',
      required: false,
      allowClear: true,
      options: appType === 'mob' || appType === 'pc' ? [...appMenus, {value: 'goback', text: '返回(上一页)'}] : menulist,
@@ -746,7 +758,7 @@
      type: 'text',
      key: 'output',
      label: '返回值',
      tooltip: '执行成功后的返回值。系统函数可指定返回的变量(以@符开头,如@id);自定义函数可指定返回字段(如id)。',
      tooltip: '执行成功后的返回值。系统函数可指定返回的变量(以@符开头,返回id时可使用@id@);自定义函数可指定返回字段(如id)。',
      initVal: card.output || '',
      required: false,
      forbid: viewType === 'popview'
@@ -907,6 +919,21 @@
      required: false
    },
    {
      type: 'radio',
      key: 'hidden',
      label: '隐藏',
      initVal: card.hidden || 'false',
      tooltip: '隐藏后按钮在页面中不显示,且不参与权限分配。',
      required: false,
      options: [{
        value: 'false',
        text: '否'
      }, {
        value: 'true',
        text: '是'
      }]
    },
    {
      type: 'splitLine',
      key: 'title',
      label: '表单',
@@ -965,21 +992,6 @@
      label: '关闭提示',
      initVal: card.closeText || '',
      required: false,
    },
    {
      type: 'radio',
      key: 'hidden',
      label: '隐藏',
      initVal: card.hidden || 'false',
      tooltip: '隐藏后按钮在页面中不显示,且不参与权限分配。',
      required: false,
      options: [{
        value: 'false',
        text: '否'
      }, {
        value: 'true',
        text: '是'
      }]
    },
    {
      type: 'radio',
src/menu/modulecell/index.jsx
@@ -38,7 +38,7 @@
          { value: 'tab', text: '标签页', type: 'action', class: 'button', $init: true },
          { value: 'innerpage', text: '新页面', type: 'action', class: 'button', $init: true },
          { value: 'funcbutton', text: '功能按钮', type: 'action', class: 'button', $init: true },
          { value: 'form', text: '表单(开关)', type: 'action', class: 'button', $init: true }
          { value: 'form', text: '表单', type: 'action', class: 'button', $init: true }
        ]
      },
      {
src/menu/viewnodes/index.jsx
@@ -174,7 +174,7 @@
          return `
          <group>
            <rect draggable="true" style={{width: ${width}, height: 26, cursor: 'pointer', fill: 'transparent' }}>
              <text style={{ fontSize: 12, fill: ${cfg.deleted ? '#959595' : 'black'}, marginLeft: 12, marginTop: 6 }}>${cfg.label}</text>
              <text style={{ fontSize: 12, fill: ${cfg.deleted ? '#959595' : 'black'}, cursor: 'pointer', marginLeft: 12, marginTop: 6 }}>${cfg.label}</text>
            </rect>
            <rect style={{ fill: ${color}, width: ${width}, cursor: 'pointer', height: 2, x: 0, y: 32 }} />
          </group>
src/mob/modulesource/index.jsx
@@ -23,6 +23,10 @@
      options = fromJS(components).toJS()
    } else {
      options = fromJS(menuOptions).toJS()
      let adapters = sessionStorage.getItem('adapter') || ''
      if (adapters.indexOf('wxmini') === -1) {
        options = options.filter(item => item.adapter !== 'mini')
      }
    }
    this.setState({
src/mob/modulesource/option.jsx
@@ -60,5 +60,5 @@
  { type: 'menu', url: SandBox, component: 'code', subtype: 'sandbox', title: '自定义', width: 24 },
  { type: 'menu', url: group, component: 'group', subtype: 'normalgroup', title: '分组', width: 24 },
  { type: 'menu', url: Login, component: 'login', subtype: 'normallogin', title: '注册/登录', width: 24 },
  { type: 'menu', url: officialAccount, component: 'officialAccount', subtype: 'officialAccount', title: '关注公众号(小程序中)', width: 24 },
  { type: 'menu', url: officialAccount, component: 'officialAccount', subtype: 'officialAccount', title: '关注公众号(小程序中)', width: 24, adapter: 'mini' },
]
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -2563,10 +2563,12 @@
    if (hidden) return null
    if (btn.OpenType === 'form') {
      if (btn.formType === 'switch') {
      if (btn.formType === 'switch') {
        return <Switch loading={loading} checked={check} disabled={disabled || loading} title={disabled ? (btn.reason || '') : ''} onChange={(val,e) => {e.stopPropagation();this.actionTrigger()}} style={btn.style} className={btn.size === 'large' ? 'ant-switch-large' : ''} size={btn.size} checkedChildren={btn.openText || ''} unCheckedChildren={btn.closeText || ''}/>
      } else {
      } else if (btn.formType === 'radio') {
        return <Checkbox disabled={disabled || loading} title={disabled ? (btn.reason || '') : ''} checked={check} onChange={(e) => {e.stopPropagation();this.actionTrigger()}} style={btn.style}></Checkbox>
      } else {
        return <Button type="link" icon="scan" disabled={true} style={btn.style} onClick={(e) => {e.stopPropagation()}}></Button>
      }
    }
src/tabviews/zshare/fileupload/index.jsx
@@ -24,6 +24,7 @@
    compress: 'false',
    fileType: 'text',
    showprogress: false,
    maxSize: 0,
    filelist: []
  }
@@ -89,6 +90,7 @@
      filelist,
      compress,
      limit: config.limit || 2,
      maxSize: config.maxSize || 0,
      maxFile: maxFile,
      fileType: config.fileType || 'text'
    })
@@ -218,7 +220,7 @@
  }
  beforeUpload = (file) => {
    const { accepts, compress, limit, rduri } = this.state
    const { accepts, compress, limit, rduri, maxSize } = this.state
    if (accepts && file.name) {
      let pass = false
@@ -235,6 +237,16 @@
        return false
      }
    }
    if (maxSize) {
      let fileSize = file.size / 1024 / 1024
      if (fileSize > maxSize) {
        setTimeout(() => {
          this.onFail(`文件大小不可超过${maxSize}M`)
        }, 10)
        return false
      }
    }
    this.setState({
      showprogress: true,
src/templates/zshare/formconfig.jsx
@@ -1371,7 +1371,7 @@
      type: 'text',
      key: 'output',
      label: '返回值',
      tooltip: '执行成功后的返回值。系统函数可指定返回的变量(以@符开头,如@id);自定义函数可指定返回字段(如id)。',
      tooltip: '执行成功后的返回值。系统函数可指定返回的变量(以@符开头,返回id时可使用@id@);自定义函数可指定返回字段(如id)。',
      initVal: card.output || '',
      required: false
    },
@@ -3561,6 +3561,17 @@
    },
    {
      type: 'number',
      key: 'maxSize',
      min: 0.01,
      max: 1024,
      precision: 2,
      label: '最大值(M)',
      initVal: card.maxSize,
      tooltip: '文件最大值,超出时不允许上传,值为空时不限制。',
      required: false
    },
    {
      type: 'number',
      key: 'span',
      min: 1,
      max: 24,
src/templates/zshare/modalform/index.jsx
@@ -27,7 +27,7 @@
  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', 'dropdown'],
  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', 'miniSet', 'splitline', 'marginTop', 'marginBottom'],
  fileupload: ['readonly', 'required', 'readin', 'fieldlength', 'maxfile', 'fileType', 'span', 'labelwidth', 'tooltip', 'extra', 'compress', 'miniSet', 'splitline', 'marginTop', 'marginBottom', 'maxSize'],
  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'],
  datemonth: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'splitline', 'marginTop', 'marginBottom'],