king
2021-01-04 7c35ece1b6c9df4bd8da7e86e535a096bde2b223
2021-01-04
2个文件已修改
22 ■■■■ 已修改文件
src/views/billprint/index.jsx 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/index.jsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/billprint/index.jsx
@@ -26,6 +26,7 @@
  state = {
    dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    loadingview: true,
    printing: false,
    pages: null,
    BID: '',
    data: '',
@@ -120,7 +121,7 @@
            horizontal: 1200,
            verticaldefault: 1.45789,
            verticalwithout: 1.41428,
            horizontaldefault: 0.685,
            horizontaldefault: 0.683,
            horizontalwithout: 0.705,
          },
          A3: {
@@ -476,8 +477,13 @@
  }
  print = () => {
    const { config } = this.state
    const { config, printing } = this.state
    if (printing) return
    let jubuData = document.getElementById('bill-print').innerHTML
    this.setState({printing: true})
    
    try {
      let iframe = document.createElement('IFRAME')
@@ -503,6 +509,7 @@
      doc.write(`</body></html>`)
      doc.close()
      setTimeout(() => {
      iframe.contentWindow.focus()
      iframe.contentWindow.print()
@@ -511,6 +518,7 @@
      setTimeout(() => {
        window.close()
      }, 2000)
      }, 500)
    } catch (e) {
      notification.warning({
        top: 92,
@@ -571,7 +579,7 @@
      <div className="bill-print-wrap" >
        {loadingview && <Spin size="large" />}
        {pages ? <div id="bill-print">
          {pages.map((components, index) => (<div className="print-page" key={index} style={{...config.style, overflow: 'hidden'}}><Row>{this.getComponents(components)}</Row></div>))}
          {pages.map((components, index) => (<div className="print-page" key={index} style={{...config.style, overflow: 'hidden', boxSizing: 'border-box'}}><Row>{this.getComponents(components)}</Row></div>))}
        </div> : null}
        {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
        {pages && !loadingview && !viewlost ? <div className="print-button"><Button icon="printer" size="large" shape="circle" onClick={this.print}></Button></div> : null}
src/views/login/index.jsx
@@ -358,6 +358,14 @@
              sessionStorage.setItem('Member_Level', md5('mksoft' + moment().format('YYYYMM') + memberLevel))
              this.props.modifyMemberLevel(memberLevel)
            }
            if (res.users_upt === 'true' && window.GLOB.systemType === 'production') {
              Api.getLocalConfig ({func: 's_Get_local_u_deleted', users_upt_date: res.users_upt_date}).then(localres => {
                Api.getSystemConfig({func: 's_get_sso_u_create', user_ids: localres.user_ids, user_ids_local: localres.user_ids_local, users_upt_date: localres.users_upt_date}).then(ssores => {
                  Api.getLocalConfig ({func: 's_get_local_u_create', user_ids_local: ssores.user_ids_local})
                })
              })
            }
          } else {
            message.warning(res.message)
          }