king
2025-04-13 d0ba373226e86b651e6306d35afc2d0b405938cd
2025-04-13
1个文件已修改
64 ■■■■■ 已修改文件
src/views/transystem/index.jsx 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/transystem/index.jsx
@@ -22,13 +22,14 @@
  changeType = (type) => {
    if (type === 'mk_func' && this.state.textInput) {
      if (this.state.textInput) {
      let val = this.state.textInput.replace(/(\s|\t|\v)*/ig, '')
      if (/^[a-zA-Z_]+$/.test(val)) {
        let params = {
          url: window.location.origin + '/star',
          method: 'post',
          data: JSON.stringify({
            FUNC: 's_get_userproc',
            LText: this.state.textInput.replace(/(\s|\t|\v)*/ig, ''),
            LText: val,
            UserID: '',
            USERNAME: ''
          })
@@ -40,6 +41,8 @@
      }
    }
    if (!this.state.type) {
      this.setState({type: type, value: null})
    } else if (['mk_fields', 'mk_cols'].includes(type) && ['mk_fields', 'mk_cols'].includes(this.state.type)) {
      this.setState({type: type, value: null})
    } else {
      this.setState({type: type, textInput: '', value: null})
@@ -169,7 +172,7 @@
          cell.pageTemplate = 'billprint'
        } else if (item.Action === 'View') {
          cell.OpenType = 'popview'
        } else if (item.Action === 'Prompt' || item.Action === 'Delete') {
        } else if (['PromptOnce', 'Prompt', 'Delete'].includes(item.Action)) {
          cell.OpenType = 'prompt'
        } else if (item.Action === 'ExportExcel') {
          cell.OpenType = 'excelOut'
@@ -343,9 +346,60 @@
      }
      result = []
      let cosCol = null
      list.forEach(item => {
        if (item.Hide === 'true') return
        if (item.ColSpanID && item.ColSpanTitle) {
          let _cell = {
            uuid: Utils.getuuid(),
            datatype: 'dynamic',
            width: 24,
            marks: null,
            height: '',
            noValue: 'hide',
            style: { paddingLeft: '4px' },
            prefix: '',
            postfix: '',
            eleType: 'text',
            field: item.FieldName.toLowerCase(),
            innerHeight: 'auto'
          }
          if (cosCol) {
            if (cosCol.ColSpanID === item.ColSpanID) {
              cosCol.elements.push(_cell)
            } else {
              result.push(JSON.parse(JSON.stringify(cosCol)))
              cosCol = {
                ColSpanID: item.ColSpanID,
                uuid: Utils.getuuid(),
                label: item.ColSpanTitle,
                Hide: 'false',
                Align: item.Align || 'left',
                IsSort: 'false',
                type: 'custom',
                Width: 120,
                elements: [_cell]
              }
            }
          } else {
            cosCol = {
              ColSpanID: item.ColSpanID,
              uuid: Utils.getuuid(),
              label: item.ColSpanTitle,
              Hide: 'false',
              Align: item.Align || 'left',
              IsSort: 'false',
              type: 'custom',
              Width: 120,
              elements: [_cell]
            }
          }
          return
        } else if (cosCol) {
          result.push(JSON.parse(JSON.stringify(cosCol)))
          cosCol = null
        }
        let cell = {
          uuid: Utils.getuuid(),
@@ -377,6 +431,10 @@
        result.push(cell)
      })
      if (cosCol) {
        result.push(JSON.parse(JSON.stringify(cosCol)))
      }
      result = JSON.stringify(result)
    } else if (type === 'mk_forms') {
      let list = JSON.parse(textInput)