king
2020-03-10 4e1ff4a312e5c5655de7c2ba611bab70415f3eda
2020-03-10
6个文件已修改
738 ■■■■ 已修改文件
src/tabviews/tableshare/actionList/index.jsx 626 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/tableshare/verifycard/actionform/index.jsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/tableshare/verifycard/index.jsx 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/actionform/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/subtableconfig/actionform/index.jsx 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/subtableconfig/index.jsx 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/tableshare/actionList/index.jsx
@@ -218,11 +218,13 @@
  /**
   * @description 触发打印
   */
  triggerPrint = (item, data, formdata) => {
    console.log(item)
    console.log(data)
    console.log(formdata)
    if (!item.verify || !item.verify.Template || !item.verify.linkUrl) {
  triggerPrint = (btn, data, formlist = []) => {
    let formdata = {}
    formlist.forEach(_data => {
      formdata[_data.key] = _data.value
    })
    if (!btn.verify || !btn.verify.Template || !btn.verify.linkUrl) {
      notification.warning({
        top: 92,
        message: '请完善打印验证信息!',
@@ -231,160 +233,478 @@
      return
    }
    let printlist = []
    let templates = []
    this.setState({loadingUuid: btn.uuid})
    new Promise(resolve => {
      let param = {
        func: 's_PrintTemplateMGetData',
        Type: 'Y',
        ID: item.verify.Template
      }
      if (btn.intertype === 'inner' && !btn.innerFunc) {
        formdata.TemplateID = btn.verify.Template
        templates.push(btn.verify.Template)
      if (options.cloudServiceApi) {
        param.rduri = options.cloudServiceApi.replace('dostars', 'dostar')
      }
        if (btn.Ot === 'notRequired') {
          printlist.push(formdata)
        } else {
          printlist = data.map(cell => {
            let _cell = {...cell, ...formdata}
      Api.getLocalConfig(param).then(res => {
        if (res.status) {
          if (!res.ConfigParam) {
            notification.warning({
              top: 92,
              message: '未获取到打印模板信息!',
              duration: 15
            })
            resolve(false)
          } else {
            let configParam = ''
            try {
              configParam = JSON.parse(window.decodeURIComponent(window.atob(res.ConfigParam)))
            } catch (e) {
              configParam = ''
            }
            if (!configParam) {
              notification.warning({
                top: 92,
                message: '打印模板解析错误!',
                duration: 15
              })
            return _cell
          })
        }
        resolve('getTemp')
      } else {
        this.getprintdata(btn, data, formdata, formlist).then(result => {
          printlist = result.list.map(item => {
            if (item.TemplateID) {
              templates.push(item.TemplateID)
            } else {
              resolve(configParam)
              item.TemplateID = btn.verify.Template
            }
          }
        } else {
          this.execError(res, item)
          resolve(false)
        }
      })
    }).then(res => {
      console.log(res)
      if (!res) return
            return item
          })
      if (!socket || socket.readyState !== 1 || socket.url !== 'ws://' + item.verify.linkUrl) {
        socket = new WebSocket('ws://' + item.verify.linkUrl)
      }
      // 打开Socket
      socket.onopen = () =>{
        if (!item.printer) {
          let request  = {
            requestID: '',
            version: '',
            cmd: 'getPrinters'
          }
          socket.send(JSON.stringify(request))
        } else {
          let printdata = {
            cmd: 'print',
            requestID: '',
            version: '',
            task: {
              taskID: '1',
              preview: false,
              printer: item.printer,
              documents: [
                {
                  documentID: '9890000106027',
                  contents: [
                    {
                      data: {
                        barcode: '12345'
                      },
                      templateURL: '{"Version":"","Title":"1234","Author":"U000000001","Description":"","PrintTempNO":"","PageSetting":{"Width":210,"Height":297,"Left":"0","Right":"0","Top":"0","Bottom":"0","Landscape":false},"PageHeader":[],"ReportHeader":{"Control":[{"Name":"","Type":"barcode","Value":"","Field":"barcode","Left":71,"Top":32,"Width":52,"Height":26,"Rotate":0,"BorderSize":0.1,"BorderColor":"black","Align":"center","VerticalAlign":"middle","BackColor":"white","ForeColor":"black","BarcodeType":"code128","BarcodeWidth":31,"BarcodeHeight":10,"BarcodeLabel":true,"LabelSize":12}]},"ReportFooter":[],"PageFooter":[]}'
                    }
                  ]
                }
              ]
            }
          }
          socket.send(JSON.stringify(printdata))
        }
      }
      // 监听消息
      socket.onmessage = (event) => {
        let data = JSON.parse(event.data)
        if (data.defaultPrinter) {
          let printdata = {
            cmd: 'print',
            requestID: '',
            version: '',
            task: {
              taskID: '1',
              preview: false,
              printer: data.defaultPrinter,
              documents: [
                {
                  documentID: '9890000106027',
                  contents: [
                    {
                      data: {
                        barcode: '12345'
                      },
                      templateURL: '{"Version":"","Title":"1234","Author":"U000000001","Description":"","PrintTempNO":"","PageSetting":{"Width":210,"Height":297,"Left":"0","Right":"0","Top":"0","Bottom":"0","Landscape":false},"PageHeader":[],"ReportHeader":{"Control":[{"Name":"","Type":"barcode","Value":"","Field":"barcode","Left":71,"Top":32,"Width":52,"Height":26,"Rotate":0,"BorderSize":0.1,"BorderColor":"black","Align":"center","VerticalAlign":"middle","BackColor":"white","ForeColor":"black","BarcodeType":"code128","BarcodeWidth":31,"BarcodeHeight":10,"BarcodeLabel":true,"LabelSize":12}]},"ReportFooter":[],"PageFooter":[]}'
                    }
                  ]
                }
              ]
            }
          }
          socket.send(JSON.stringify(printdata))
        }
      }
      socket.onerror = () => {
        notification.warning({
          top: 92,
          message: '无法连接到:' + item.verify.linkUrl,
          duration: 10
          resolve(result.next)
        })
      }
    })
    }).then(res => {
      if (!res) return
      templates = Array.from(new Set(templates)) // 去重
      let deffers = templates.map(tempId => {
        return new Promise(resolve => {
          let param = {
            func: 's_PrintTemplateMGetData',
            Type: 'Y',
            ID: tempId
          }
    
    // socket = new WebSocket('ws://127.0.0.1:13529')
          if (options.cloudServiceApi) {
            param.rduri = options.cloudServiceApi.replace('dostars', 'dostar')
          }
          Api.getLocalConfig(param).then(result => {
            result.tempId = tempId
            resolve(result)
          })
        })
      })
    // // 打开Socket
    // socket.onopen = function(event) {
    //     // 监听消息
    //     socket.onmessage = function(event)
    //     {
    //         //取打印机信息的返回是在这里,所以第一次的打印比较麻烦,看是不是可以在调打印前先判断你有没有存打印机名
    //         //,没有就调getPrinters来取打印机去设置,要是调了打印再调取打印机,第一条打印任务就要在这里重发,就太麻烦了
    //         //提前取打印机就只能用127.0.0.1:13529来取,这个地址就要写死了
    //         console.log('Client received a message',event);
    //     };
      return Promise.all(deffers)
    }).then(result => {
      if (!result) return
    //     // 监听Socket的关闭
    //     socket.onclose = function(event)
    //     {
    //         console.log('Client notified socket has closed',event);
    //     };
      let errorMsg = ''
      let _temps = {}
    // };
      result.forEach(res => {
        if (res.status && !errorMsg) {
          let _temp = this.getPrintConfigParam(res)
          if (_temp.error) {
            errorMsg = {
              ErrCode: 'N',
              message: _temp.error,
              ErrMesg: _temp.error,
              status: false
            }
          } else {
            _temps[res.tempId] = _temp.config
          }
        } else if (!errorMsg) {
          errorMsg = res
        }
      })
      if (!errorMsg) {
        this.execPrint(btn, printlist, _temps)
      } else {
        this.execError(errorMsg, btn)
      }
    })
  }
  getprintdata = (btn, data, formdata, formlist) => {
    const { setting } = this.props
    let _list = []
    return new Promise(resolve => {
      let params = []
      let param = {
        BID: this.props.BID
      }
      if (btn.Ot === 'notRequired') {
        let _param = { ...param, ...formdata }
        params.push(_param)
      } else if (btn.Ot === 'requiredSgl') {
        param[setting.primaryKey] = data[0][setting.primaryKey]
        let _param = { ...param, ...formdata }
        params.push(_param)
      } else if (btn.Ot === 'requiredOnce') {
        let ids = data.map(d => { return d[setting.primaryKey]})
        ids = ids.filter(Boolean)
        ids = ids.join(',')
        param[setting.primaryKey] = ids
        let _param = { ...param, ...formdata }
        params.push(_param)
      } else if (btn.Ot === 'required') {
        params = data.map((cell, index) => {
          let _param = { ...param }
          _param[setting.primaryKey] = cell[setting.primaryKey]
          formlist.forEach(_data => {
            if (index !== 0 && _data.readin && cell.hasOwnProperty(_data.key)) {
              _param[_data.key] = cell[_data.key]
            } else {
              _param[_data.key] = _data.value
            }
          })
          return _param
        })
      }
      if (btn.intertype === 'inner') {
        params = params.map(_param => {
          _param.func = btn.innerFunc
          return _param
        })
        if (params.length <= 20) {
          let deffers = params.map(par => {
            return new Promise(resolve => {
              Api.genericInterface(par).then(res => {
                resolve(res)
              })
            })
          })
          Promise.all(deffers).then(result => {
            let errorMsg = ''
            result.forEach(res => {
              if (res.status) {
                _list.push(res.data)
              } else {
                errorMsg = res
              }
            })
            if (!errorMsg) {
              resolve({next: 'getTemp', list: _list})
            } else {
              this.execError(errorMsg, btn)
              resolve({next: false, list: _list})
            }
          })
        } else {
          this.printInnerLoopRequest(params, btn, _list, resolve)
        }
      } else {
        this.printOuterLoopRequest(params, btn, _list, resolve)
      }
    })
  }
  /**
   * @description 外部请求循环执行
   */
  printOuterLoopRequest = (params, btn, _list, _resolve) => {
    let param = params.shift()
    new Promise(resolve => {
      // 内部请求
      if (btn.innerFunc) {
        param.func = btn.innerFunc
        // 存在内部函数时,数据预处理
        Api.genericInterface(param).then(res => {
          if (res.status) {
            delete res.ErrCode
            delete res.ErrMesg
            delete res.message
            delete res.status
            // 使用处理后的数据调用外部接口
            resolve(res)
          } else {
            this.execError(res, btn)
            resolve(false)
            _resolve({next: false, list: _list})
          }
        })
      } else {
        resolve(param)
      }
    }).then(res => {
      if (!res) return
      // 外部请求
      if (this.props.menuType === 'HS') {
        if (btn.sysInterface === 'true' && options.cloudServiceApi) {
          res.rduri = options.cloudServiceApi
        } else if (btn.sysInterface !== 'true') {
          res.rduri = btn.interface
        }
      } else {
        if (btn.sysInterface === 'true') {
          res.rduri = window.GLOB.mainSystemApi || window.GLOB.subSystemApi
        } else {
          res.rduri = btn.interface
        }
      }
      if (btn.outerFunc) {
        res.func = btn.outerFunc
      }
      res.appkey = window.GLOB.appkey || '' // 外部请求时,统一添加appkey
      return Api.genericInterface(res)
    }).then(response => {
      if (!response) return
      // 回调请求
      if (response.status) {
        // 一次请求成功,进行下一项请求
        if (params.length === 0) {
          _resolve({next: 'getTemp', list: _list})
        } else {
          this.printOuterLoopRequest(params, btn, _list, _resolve)
        }
      } else {
        this.execError(response, btn)
        _resolve({next: false, list: _list})
      }
    })
  }
  /**
   * @description 内部请求循环执行
   */
  printInnerLoopRequest = (params, btn, _list, _resolve) => {
    let param = params.shift()
    Api.genericInterface(param).then(res => {
      if (res.status) {
        _list.push(res.data)
        if (params.length === 0) {
          _resolve({next: 'getTemp', list: _list})
        } else {
          this.printInnerLoopRequest(params, btn, _list, _resolve)
        }
      } else {
        this.execError(res, btn)
        _resolve({next: false, list: _list})
      }
    })
  }
  getPrintConfigParam = (res) => {
    let error = ''
    let configParam = ''
    let _configparam = ''
    if (!res.ConfigParam) {
      error = '未获取到打印模板信息!'
    } else {
      try {
        configParam = JSON.parse(window.decodeURIComponent(window.atob(res.ConfigParam)))
      } catch (e) {
        configParam = ''
      }
      if (!configParam) {
        error = '打印模板解析错误!'
      } else {
        let control = configParam.elements.map(element => {
          let item = {
            Name: element.name || '',
            Type: element.type,
            Value: element.value || '',
            Field: element.field || '',
            Left: element.left,
            Top: element.top,
            Width: element.width,
            Height: element.height,
            Rotate: element.rotate,
            BorderSize: element.borderSize / 10,
            BorderColor: element.borderColor,
            Align: element.align,
            VerticalAlign: element.vertialAlign,
            BackColor: element.background,
            ForeColor: 'black'
          }
          if (!item.Width || !item.Height) {
            item.Type = 'line'
            item.Value = ''
            item.Field = ''
            item.FontFamily = element.fontFamily || ''
            item.FontSize = element.fontSize || ''
            item.FontStyle = (!element.fontWeight || element.fontWeight === 'normal') ? 'regular' : element.fontWeight
            item.Padding = 0
            item.Trimming = ''
          } else if (item.Type === 'image') {
            item.ImageWidth = element.imgWidth
            item.ImageHeight = element.imgHeight
            item.Trimming = ''
          } else if (item.Type === 'text') {
            item.FontFamily = element.fontFamily
            item.FontSize = element.fontSize
            item.FontStyle = element.fontWeight === 'normal' ? 'regular' : element.fontWeight
            item.Padding = element.padding / 2
            item.Trimming = ''
          } else if (item.Type === 'barcode') {
            item.BarcodeType = element.barcodeType
            item.BarcodeWidth = element.barcodeWidth
            item.BarcodeHeight = element.barcodeHeight
            item.BarcodeLabel = element.barcodeLabel
            item.LabelSize = element.fontSize
          } else if (item.Type === 'qrcode') {
            item.Type = 'barcode'
            item.BarcodeType = element.barcodeType
            item.BarcodeWidth = element.qrcodeWidth
            item.BarcodeHeight = element.qrcodeWidth
            item.BarcodeLabel = false
          }
          return item
        })
        _configparam = {
          Version: '',
          Title: configParam.name,
          Author: sessionStorage.getItem('UserID'),
          Description: configParam.remark,
          PrintTempNO: configParam.PrintTempNO,
          PageSetting: {
            Width: configParam.width,
            Height: configParam.height,
            Left: '0',
            Right: '0',
            Top: '0',
            Bottom: '0',
            Landscape: false
          },
          PageHeader: [],
          ReportHeader: {
            Control: control
          },
          ReportFooter: [],
          PageFooter: []
        }
      }
    }
    return {
      error: error,
      config: _configparam
    }
  }
  execPrint = (item, list, template) => {
    let printdata = {
      cmd: 'print',
      requestID: '',
      version: '',
      task: {
        taskID: Utils.getuuid(),
        preview: false,
        printer: item.printer,
        documents: list.map(cell => {
          return {
            documentID: Utils.getuuid(),
            contents: [
              {
                data: cell,
                templateURL: JSON.stringify(template[cell.TemplateID])
              }
            ]
          }
        })
      }
    }
    console.log(JSON.stringify(printdata))
    if (!socket || socket.readyState !== 1 || socket.url !== 'ws://' + item.verify.linkUrl) {
      socket = new WebSocket('ws://' + item.verify.linkUrl)
    } else {
      if (!item.printer) {
        let request  = {
          requestID: '',
          version: '',
          cmd: 'getPrinters'
        }
        socket.send(JSON.stringify(request))
      } else {
        this.setState({loadingUuid: ''})
        notification.success({
          top: 92,
          message: '打印请求已发出。',
          duration: 2
        })
        socket.send(JSON.stringify(printdata))
      }
    }
    // 打开Socket
    socket.onopen = () =>{
      if (!item.printer) {
        let request  = {
          requestID: '',
          version: '',
          cmd: 'getPrinters'
        }
        socket.send(JSON.stringify(request))
      } else {
        this.setState({loadingUuid: ''})
        notification.success({
          top: 92,
          message: '打印请求已发出。',
          duration: 2
        })
        socket.send(JSON.stringify(printdata))
      }
    }
    // 监听消息
    socket.onmessage = (event) => {
      let data = ''
      if (event.data) {
        try {
          data = JSON.parse(event.data)
        } catch {
          notification.warning({
            top: 92,
            message: event.data,
            duration: 10
          })
          this.setState({loadingUuid: ''})
          data = ''
        }
      }
      if (data && data.defaultPrinter) {
        printdata.task.printer = data.defaultPrinter
        this.setState({loadingUuid: ''})
        notification.success({
          top: 92,
          message: '打印请求已发出。',
          duration: 2
        })
        socket.send(JSON.stringify(printdata))
      }
    }
    socket.onerror = () => {
      notification.warning({
        top: 92,
        message: '无法连接到:' + item.verify.linkUrl,
        duration: 10
      })
      this.setState({loadingUuid: ''})
    }
  }
  /**
@@ -878,11 +1198,11 @@
      this.setState({
        visible: false
      })
    } else if (btn.OpenType === 'excelOut' || btn.OpenType === 'excelIn') { // 导出excel
      this.setState({
        loadingUuid: ''
      })
    }
    this.setState({
      loadingUuid: ''
    })
    this.refreshdata(btn, 'success')
  }
@@ -915,11 +1235,9 @@
      message.error(res.message || res.ErrMesg)
    }
    
    if (btn.OpenType === 'excelOut' || btn.OpenType === 'excelIn') {
      this.setState({
        loadingUuid: ''
      })
    }
    this.setState({
      loadingUuid: ''
    })
    
    this.refreshdata(btn, 'error')
  }
src/tabviews/tableshare/verifycard/actionform/index.jsx
@@ -60,6 +60,14 @@
  shortcutChange = (value) => {
    this.setState({
      shortcut: value
    }, () => {
      let shortkey = this.props.form.getFieldValue('shortcutkey')
      if (shortkey && ((value === 'alt' && shortkey === 65) || (value === 'ctrl' && (shortkey === 67 || shortkey === 86))) ) {
        this.props.form.setFieldsValue({
          shortcutkey: ''
        })
      }
    })
  }
src/tabviews/tableshare/verifycard/index.jsx
@@ -130,8 +130,14 @@
        }
        // 监听消息
        socket.onmessage = (event) => {
          let data = JSON.parse(event.data)
          if (data.defaultPrinter) {
          let data = ''
          try {
            data = JSON.parse(event.data)
          } catch {
            data = ''
          }
          if (data && data.defaultPrinter) {
            let printers = Array.from(new Set(data.printers))
            
            let _config = JSON.parse(JSON.stringify(this.state.config))
src/templates/comtableconfig/actionform/index.jsx
@@ -603,9 +603,11 @@
            values.Ot = 'notRequired'
          } else if (values.OpenType === 'popview' && !values.linkTab) { // 没有关联标签(新建时),创建新标签Id
            values.linkTab = Utils.getuuid()
          } else if (values.OpenType === 'funcbutton' && values.funcType === 'print') { // 转换打印时打开方式
            values.OpenType = values.execMode
          } else if (values.OpenType === 'funcbutton') { // 转换打印时打开方式
            values.position = 'toolbar'
            if (values.funcType === 'print') {
              values.OpenType = values.execMode
            }
          }
          if (values.innerFunc === '' && values.sql === '') {
src/templates/subtableconfig/actionform/index.jsx
@@ -21,6 +21,7 @@
    formlist: null,
    openType: null,
    interType: null,
    funcType: null,  // 功能类型
    position: null,
    reqOptionSgl: [{
      value: 'requiredSgl',
@@ -90,17 +91,24 @@
    let _intertype = ''
    let _position = ''
    let _tabType = ''
    let _funcType = ''   // 功能按钮类型
    let _options = null
    this.props.formlist.forEach(form => {
      if (form.key === 'OpenType') {
        _opentype = form.initVal
        if (this.props.card.execMode) { // 转换打印时打开方式
          _opentype = 'funcbutton'
        } else {
          _opentype = form.initVal
        }
      } else if (form.key === 'intertype') {
        _intertype = form.initVal
      } else if (form.key === 'position') {
        _position = form.initVal
      } else if (form.key === 'tabType') {
        _tabType = form.initVal
      } else if (form.key === 'funcType') {
        _funcType = form.initVal
      }
    })
@@ -120,6 +128,18 @@
      } else {
        _options = ['label', 'Ot', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'sheet', 'execSuccess', 'execError']
      }
    } else if (_opentype === 'funcbutton') {
      if (!_funcType) {
        _options = ['label', 'OpenType', 'funcType', 'icon', 'class']
      } else if (_funcType === 'changeuser') {
        _options = ['label', 'OpenType', 'funcType', 'icon', 'class']
      } else if (_funcType === 'print') {
        if (_intertype === 'outer') {
          _options = ['label', 'OpenType', 'funcType', 'execMode', 'intertype', 'innerFunc', 'sysInterface', 'interface', 'outerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError']
        } else {
          _options = ['label', 'OpenType', 'funcType', 'execMode', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError']
        }
      }
    } else {
      if (_intertype === 'outer') {
        _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError']
@@ -131,6 +151,7 @@
      openType: _opentype,
      interType: _intertype,
      position: _position,
      funcType: _funcType,
      formlist: this.props.formlist.map(item => {
        if (item.key === 'class') {
          item.options = btnClasses
@@ -176,8 +197,12 @@
            }, {
              value: 'popview',
              text: this.props.dict['header.form.popview']
            }, {
              value: 'funcbutton',
              text: this.props.dict['header.form.funcbutton']
            }
          ]
          item.initVal = _opentype
        } else if (item.key === 'execSuccess') {
          item.options = this.state.closeOptions
        } else if (item.key === 'execError') {
@@ -224,6 +249,18 @@
        } else {
          _options = ['label', 'Ot', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'sheet', 'execSuccess', 'execError']
        }
      } else if (value === 'funcbutton') {
        if (!this.state.funcType) {
          _options = ['label', 'OpenType', 'funcType', 'icon', 'class']
        } else if (this.state.funcType === 'changeuser') {
          _options = ['label', 'OpenType', 'funcType', 'icon', 'class']
        } else if (this.state.funcType === 'print') {
          if (this.state.interType === 'outer') {
            _options = ['label', 'OpenType', 'funcType', 'execMode', 'intertype', 'innerFunc', 'sysInterface', 'interface', 'outerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError']
          } else {
            _options = ['label', 'OpenType', 'funcType', 'execMode', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError']
          }
        }
      } else {
        if (this.state.interType === 'inner') {
          _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'sql', 'sqlType']
@@ -268,7 +305,7 @@
        this.setState({
          formlist: this.state.formlist.map(item => {
            if (item.key === 'Ot') {
            if (item.key === 'Ot' && !(value === 'funcbutton' && (!this.state.funcType || this.state.funcType === 'changeuser'))) {
              item.hidden = false
            } else if (item.key === 'sqlType' && ['prompt', 'exec', 'pop'].includes(value) && this.state.interType === 'inner') {
              item.hidden = false
@@ -332,6 +369,33 @@
          })
        })
      })
    } else if (key === 'funcType') {
      let _options = null
      if (!value) {
        _options = ['label', 'OpenType', 'funcType', 'icon', 'class']
      } else if (value === 'changeuser') {
        _options = ['label', 'OpenType', 'funcType', 'icon', 'class']
      } else if (value === 'print') {
        if (this.state.interType === 'outer') {
          _options = ['label', 'OpenType', 'funcType', 'execMode', 'intertype', 'innerFunc', 'sysInterface', 'interface', 'outerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError']
        } else {
          _options = ['label', 'OpenType', 'funcType', 'execMode', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError']
        }
      }
      this.setState({
        formlist: this.state.formlist.map(item => {
          item.hidden = !_options.includes(item.key)
          if (item.hidden) return item
          if (item.key === 'Ot' && value === 'print') {
            item.options = this.state.reqOptionsMutil
          }
          return item
        })
      })
    }
  }
@@ -352,6 +416,12 @@
          _options = ['label', 'Ot', 'OpenType', 'intertype', 'innerFunc', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc', 'icon', 'class', 'sheet', 'execSuccess', 'execError']
        } else {
          _options = ['label', 'Ot', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'sheet', 'execSuccess', 'execError']
        }
      } else if (openType === 'funcbutton') {
        if (value === 'outer') {
          _options = ['label', 'OpenType', 'funcType', 'execMode', 'intertype', 'innerFunc', 'sysInterface', 'interface', 'outerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError']
        } else {
          _options = ['label', 'OpenType', 'funcType', 'execMode', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError']
        }
      } else {
        if (value === 'inner') {
@@ -571,6 +641,11 @@
            values.Ot = 'notRequired'
          } else if (values.OpenType === 'popview' && !values.linkTab) { // 没有关联标签(新建时),创建新标签Id
            values.linkTab = Utils.getuuid()
          } else if (values.OpenType === 'funcbutton') { // 转换打印时打开方式
            values.position = 'toolbar'
            if (values.funcType === 'print') {
              values.OpenType = values.execMode
            }
          }
          if (values.innerFunc === '' && values.sql === '') {
src/templates/subtableconfig/index.jsx
@@ -2370,14 +2370,6 @@
                    <Icon type="unlock" />
                  </div>
                </div>
                {configAction.length > 0 ?
                  <p className="config-btn-title">
                    <Tooltip placement="topLeft" title="点击按钮,可完成或查看按钮配置信息。">
                      <Icon type="question-circle" />
                    </Tooltip>
                    {this.state.dict['header.menu.action.configurable']}
                  </p> : null
                }
                {configAction.map((item, index) => {
                  return (
                    <div key={index}>
@@ -2434,6 +2426,7 @@
                <DragElement
                  type="action"
                  list={this.state.config.action}
                  setting={this.state.config.setting}
                  handleList={this.handleList}
                  handleMenu={this.handleAction}
                  copyElement={(val) => this.handleAction(val, 'copy')}