king
2022-03-24 26d0fa42ea8c63a87e8ef93d0915f75f46fb1f9c
2022-03-24
9个文件已修改
127 ■■■■■ 已修改文件
public/options.json 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/normalform/modalform/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/options.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/carousel/data-card/options.jsx 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/prop-card/index.jsx 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/table-card/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/carousel/data-card/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/carousel/prop-card/index.jsx 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/index.jsx 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/options.json
@@ -1,17 +1,17 @@
{
  "appId": "201912040924165801464FF1788654BC5AC73",
  "appkey": "20191106103859640976D6E924E464D029CF0",
  "appId": "202108312122504607B107A83F55B40C98CCF",
  "appkey": "20210831212235413F287EC3BF489424496C8",
  "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars",
  "systemType": "",
  "externalDatabase": "false",
  "lineColor": "",
  "filter": "false",
  "defaultApp": "mk",
  "defaultApp": "mkindustry",
  "defaultLang": "zh-CN",
  "WXAppID": "",
  "debugger": false,
  "licenseKey": "",
  "probation": "",
  "host": "http://qingqiumarket.cn",
  "service": "MKWMS/"
  "licenseKey": "7EFE13KIKLILIJB64C12",
  "probation": "2021-12-31",
  "host": "http://demo.mk9h.cn",
  "service": "erp_new/"
}
src/components/normalform/modalform/index.jsx
@@ -109,7 +109,9 @@
        if (cell.hidden) return
        if (supItem.hidden) {
        if (cell.skip && supItem.forbid) { // 上级表单禁用时,此表单不受控制
        } else if (supItem.hidden) {
          cell.hidden = true
        } else if (supItem.type === 'checkbox') {
          let vals = [...supItem.initval, ...item.values]
src/menu/components/card/data-card/options.jsx
@@ -70,6 +70,7 @@
      linkFields: ['priKeyType'],
      controlFields: [
        {field: 'goback', values: ['dynamic']},
        {field: 'empty', values: ['dynamic']},
        {field: 'supModule', values: ['static']},
      ],
      forbid: subtype !== 'propcard'
@@ -233,11 +234,11 @@
      initval: wrap.empty || 'show',
      tooltip: '当查询数据为空时,隐藏该组件。',
      required: false,
      skip: true,
      options: [
        {value: 'show', label: '否'},
        {value: 'hidden', label: '是'},
      ],
      forbid: subtype !== 'datacard'
    },
    {
      type: 'radio',
src/menu/components/carousel/data-card/options.jsx
@@ -46,6 +46,9 @@
        {value: 'dynamic', label: '动态'},
        {value: 'static', label: '静态'},
      ],
      controlFields: [
        {field: 'empty', values: ['dynamic']},
      ],
      forbid: subtype !== 'propcard'
    },
    {
@@ -120,6 +123,19 @@
      forbid: appType === 'mob'
    },
    {
      type: 'radio',
      field: 'empty',
      label: '空值隐藏',
      initval: wrap.empty || 'show',
      tooltip: '当查询数据为空时,隐藏该组件。',
      required: false,
      skip: true,
      options: [
        {value: 'show', label: '否'},
        {value: 'hidden', label: '是'},
      ],
    },
    {
      type: 'multiselect',
      field: 'blacklist',
      label: '黑名单',
src/tabviews/custom/components/card/prop-card/index.jsx
@@ -47,15 +47,15 @@
      _sync = _config.setting.sync === 'true'
      if (_sync && data) {
        _data = data[_config.dataName] || {}
        _data = data[_config.dataName] || {$$empty: true}
        if (Array.isArray(_data)) {
          _data = _data[0] || {}
          _data = _data[0] || {$$empty: true}
        }
        _sync = false
      } else if (_sync && initdata) {
        _data = initdata || {}
        _data = initdata || {$$empty: true}
        if (Array.isArray(_data)) {
          _data = _data[0] || {}
          _data = _data[0] || {$$empty: true}
        }
        _sync = false
      }
@@ -167,9 +167,9 @@
    if (sync && !is(fromJS(this.props.data), fromJS(nextProps.data))) {
      let _data = { $$empty: true }
      if (nextProps.data && nextProps.data[config.dataName]) {
        _data = nextProps.data[config.dataName] || {}
        _data = nextProps.data[config.dataName]
        if (Array.isArray(_data)) {
          _data = _data[0] || {}
          _data = _data[0] || {$$empty: true}
        }
      }
@@ -399,6 +399,8 @@
  render() {
    const { config, loading, data, activeKey } = this.state
    if (config.wrap.empty === 'hidden' && (!data || data.$$empty)) return null
    return (
      <div className="custom-prop-card-box" style={config.style}>
        {loading ?
src/tabviews/custom/components/card/table-card/index.jsx
@@ -412,6 +412,8 @@
  render() {
    const { config, loading, data, BID, pageIndex, total } = this.state
    if (config.wrap.empty === 'hidden' && (!data || data.length === 0)) return null
    return (
      <div className="custom-table-card-box" style={{...config.style}}>
        {loading ?
src/tabviews/custom/components/carousel/data-card/index.jsx
@@ -248,6 +248,8 @@
  render() {
    const { config, loading, data, card } = this.state
    if (config.wrap.empty === 'hidden' && (!data || data.length === 0)) return null
    return (
      <div className="custom-data-carousel-box" style={config.style}>
        {loading ?
src/tabviews/custom/components/carousel/prop-card/index.jsx
@@ -41,15 +41,15 @@
      _sync = _config.setting.sync === 'true'
      if (_sync && data) {
        _data = data[_config.dataName] || {}
        _data = data[_config.dataName] || {$$empty: true}
        if (Array.isArray(_data)) {
          _data = _data[0] || {}
          _data = _data[0] || {$$empty: true}
        }
        _sync = false
      } else if (_sync && initdata) {
        _data = initdata || {}
        _data = initdata
        if (Array.isArray(_data)) {
          _data = _data[0] || {}
          _data = _data[0] || {$$empty: true}
        }
        _sync = false
      }
@@ -122,9 +122,9 @@
    if (sync && !is(fromJS(this.props.data), fromJS(nextProps.data))) {
      let _data = {$$empty: true}
      if (nextProps.data && nextProps.data[config.dataName]) {
        _data = nextProps.data[config.dataName] || {}
        _data = nextProps.data[config.dataName]
        if (Array.isArray(_data)) {
          _data = _data[0] || {}
          _data = _data[0] || {$$empty: true}
        }
      }
@@ -245,6 +245,8 @@
  render() {
    const { config, loading, data } = this.state
    if (config.wrap.empty === 'hidden' && (!data || data.$$empty)) return null
    return (
      <div className="custom-prop-carousel-box" style={config.style}>
        {loading ?
src/tabviews/zshare/mutilform/index.jsx
@@ -735,43 +735,43 @@
  recordChange = (values, item) => {
    this.record = {...this.record, ...values}
    if (item && item.controlFields) {
      let map = new Map()
      this.state.formlist.forEach(cell => {
        if (!cell.field) return
        map.set(cell.field, cell)
      })
    if (!item || !item.controlFields) return
      let reset = (current) => {
        let val = this.record[current.field]
    let map = new Map()
    this.state.formlist.forEach(cell => {
      if (!cell.field) return
      map.set(cell.field, cell)
    })
        current.controlFields.forEach(cell => {
          let m = map.get(cell.field)
          m.hidden = current.hidden || !cell.values.includes(val)
    let reset = (current) => {
      let val = this.record[current.field]
          if (m.hidden) {
            m.initval = this.record[m.field]
          }
      current.controlFields.forEach(cell => {
        let m = map.get(cell.field)
        m.hidden = current.hidden || !cell.values.includes(val)
          map.set(cell.field, m)
        if (m.hidden) {
          m.initval = this.record[m.field]
        }
          if (m.controlFields) {
            reset(m)
          }
        })
      }
        map.set(cell.field, m)
      reset(item)
      this.setState({
        formlist: this.state.formlist.map(cell => {
          if (cell.field) {
            return map.get(cell.field)
          }
          return cell
        })
        if (m.controlFields) {
          reset(m)
        }
      })
    }
    reset(item)
    this.setState({
      formlist: this.state.formlist.map(cell => {
        if (cell.field) {
          return map.get(cell.field)
        }
        return cell
      })
    })
  }
  getFields() {