| | |
| | | state = { |
| | | dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | loadingview: true, |
| | | printing: false, |
| | | pages: null, |
| | | BID: '', |
| | | data: '', |
| | |
| | | horizontal: 1200, |
| | | verticaldefault: 1.45789, |
| | | verticalwithout: 1.41428, |
| | | horizontaldefault: 0.685, |
| | | horizontaldefault: 0.683, |
| | | horizontalwithout: 0.705, |
| | | }, |
| | | A3: { |
| | |
| | | } |
| | | |
| | | 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') |
| | |
| | | doc.write(`</body></html>`) |
| | | doc.close() |
| | | |
| | | setTimeout(() => { |
| | | iframe.contentWindow.focus() |
| | | iframe.contentWindow.print() |
| | | |
| | |
| | | setTimeout(() => { |
| | | window.close() |
| | | }, 2000) |
| | | }, 500) |
| | | } catch (e) { |
| | | notification.warning({ |
| | | top: 92, |
| | |
| | | <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} |
| | |
| | | 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) |
| | | } |