king
2022-10-20 6de5ea0a0c6f06e0321ae41846473118fb85de48
src/tabviews/zshare/actionList/printbutton/index.jsx
@@ -24,7 +24,6 @@
    BID: PropTypes.string,            // 主表ID
    BData: PropTypes.any,             // 主表数据
    selectedData: PropTypes.any,      // 子表中选择数据
    Tab: PropTypes.any,               // 如果当前元素为标签时,tab为标签信息
    MenuID: PropTypes.string,         // 菜单ID
    btn: PropTypes.object,            // 按钮
    setting: PropTypes.any,           // 页面通用设置
@@ -38,6 +37,7 @@
    formdata: null,
    selines: null,
    btnconfig: null,
    confirmLoading: false,
    loading: false,
    disabled: false,
    hidden: false,
@@ -142,13 +142,13 @@
   * @description 触发按钮操作
   */
  actionTrigger = (triggerId, record, type) => {
    const { Tab, BID, btn, selectedData, setting } = this.props
    const { BID, btn, selectedData, setting } = this.props
    const { loading, disabled } = this.state
    if (loading || disabled) return
    if (triggerId && btn.uuid !== triggerId) return
    if (((Tab && Tab.supMenu) || setting.supModule) && !BID) {
    if (setting.supModule && !BID) {
      notification.warning({
        top: 92,
        message: '需要上级主键值!',
@@ -843,6 +843,11 @@
          } else {
            res.rduri = btn.interface
          }
          let host = window.GLOB.baseurl.replace(/http(s):\/\//, '')
          if (res.rduri.indexOf(host) === -1 && /\/dostars/.test(res.rduri)) {
            res.$login = true
          }
        }
      }
@@ -1347,7 +1352,7 @@
   */
  execSuccess = (res) => {
    const { btn } = this.props
    const { autoMatic } = this.state
    const { autoMatic, btnconfig } = this.state
    if ((res.ErrCode === 'S' || !res.ErrCode) || autoMatic) { // 执行成功
      notification.success({
@@ -1363,8 +1368,15 @@
    }
    if (autoMatic || !btnconfig || btnconfig.setting.finish !== 'unclose') {
      this.setState({
        visible: false
      })
    }
    this.setState({
      loading: false
      loading: false,
      confirmLoading: false
    })
    if (autoMatic) {
@@ -1409,7 +1421,8 @@
    }
    
    this.setState({
      loading: false
      loading: false,
      confirmLoading: false
    })
    if (autoMatic) {
@@ -1529,16 +1542,10 @@
   * @description 模态框(表单),确认
   */
  handleOk = () => {
    const { btnconfig, autoMatic } = this.state
    if (!this.formRef) return
    this.formRef.handleConfirm().then(res => {
      if (btnconfig.setting.finish !== 'unclose' || autoMatic) {
        this.setState({
          visible: false
        })
      }
      this.setState({ confirmLoading: true })
      this.triggerPrint(this.state.selines, res)
    })
  }
@@ -1549,7 +1556,8 @@
  handleCancel = () => {
    this.setState({
      loading: false,
      visible: false
      visible: false,
      confirmLoading: false
    })
  }
@@ -1679,6 +1687,7 @@
        getContainer={container}
        wrapClassName='action-modal'
        visible={this.state.visible}
        confirmLoading={this.state.confirmLoading}
        width={width}
        onOk={this.handleOk}
        onCancel={this.handleCancel}