king
2024-02-03 8acfcd6e349ef2d1b797a7483940a2f3f2dfcfe6
src/views/billprint/index.jsx
@@ -44,7 +44,8 @@
    visible: false,
    rePos: false,
    loading: false,
    auto: true
    auto: true,
    ismob: /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(navigator.userAgent)
  }
  UNSAFE_componentWillMount() {
@@ -166,8 +167,6 @@
        sessionStorage.setItem('LoginUID', result.LoginUID || '')
        sessionStorage.setItem('dataM', 'false')
        this.getMenuParam()
        // 获取系统信息
        let _param = {
          func: 's_Get_style',
@@ -198,6 +197,8 @@
              document.getElementsByTagName('head')[0].appendChild(link)
            }
          }
          this.getMenuParam()
        })
      } else {
        notification.warning({
@@ -249,6 +250,10 @@
            lostmsg: '抱歉,您访问的页面未启用,请联系管理员。'
          })
          return
        }
        if (config.webTitle) {
          document.title = config.webTitle
        }
        config.style = config.style || {}
@@ -837,8 +842,6 @@
    let param = {
      func: 'sPC_Get_structured_data',
      LText: LText.join(' union all '),
      LText_field: LText_field.join(' union all '),
      BID: BID || '',
      username: userName,
      fullName: fullName
@@ -848,10 +851,12 @@
      param.menuname = MenuName
    }
    param.LText = Utils.formatOptions(param.LText)
    param.LText_field = Utils.formatOptions(param.LText_field)
    param.exec_type = 'y'
    param.LText = Utils.formatOptions(LText.join(' union all '))
    param.custom_script = Utils.formatOptions(LText_field.join(' union all '))
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    param.secretkey = Utils.encrypt(param.LText, param.timestamp)
    param.secretkey = Utils.encrypt('', param.timestamp)
    return param
  }
@@ -1319,7 +1324,7 @@
  }
  render() {
    const { loadingview, viewlost, config, pages, auto, rePos, loading } = this.state
    const { loadingview, viewlost, config, pages, auto, rePos, loading, ismob } = this.state
    return (
      <div className="bill-print-wrap" >
@@ -1329,8 +1334,8 @@
        </div> : null}
        {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
        {config && window.GLOB.breakpoint ? <DebugTable /> : null}
        {pages && !loadingview && !viewlost ? <div className="print-button"><Button icon="printer" size="large" shape="circle" onClick={this.print}></Button></div> : null}
        {!loadingview && !viewlost ? <div className="refresh-button"><Button icon="reload" size="large" shape="circle" onClick={this.reload}></Button></div> : null}
        {pages && !loadingview && !viewlost && !ismob ? <div className="print-button"><Button icon="printer" size="large" shape="circle" onClick={this.print}></Button></div> : null}
        {!loadingview && !viewlost && !ismob ? <div className="refresh-button"><Button icon="reload" size="large" shape="circle" onClick={this.reload}></Button></div> : null}
      </div>
    )
  }