| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Button, notification } from 'antd' |
| | | import { Button, notification, Modal } from 'antd' |
| | | |
| | | import zhCN from '@/locales/zh-CN/main.js' |
| | | import enUS from '@/locales/en-US/main.js' |
| | | import './index.scss' |
| | | |
| | | const { confirm } = Modal |
| | | |
| | | class NewPageButton extends Component { |
| | | static propTpyes = { |
| | |
| | | btn: PropTypes.object, // 按钮 |
| | | selectedData: PropTypes.any, // 子表中选择数据 |
| | | setting: PropTypes.any, // 页面通用设置 |
| | | updateStatus: PropTypes.func, // 按钮状态更新 |
| | | triggerBtn: PropTypes.any, |
| | | } |
| | | |
| | | state = { |
| | | dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS |
| | | dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | visible: false |
| | | } |
| | | |
| | | /** |
| | |
| | | let src = '#/print/' + window.btoa('ID=' + Id + msg + cloudmsg) |
| | | window.open(src) |
| | | } else if (btn.pageTemplate === 'pay') { |
| | | let _p = `ID=${Id}&userid=${sessionStorage.getItem('UserID')}&LoginUID=${sessionStorage.getItem('LoginUID')}&logo=${window.GLOB.mainlogo}&name=${sessionStorage.getItem('Full_Name')}&suid=${sessionStorage.getItem('SessionUid')}&icp=${window.GLOB.ICP}©Right=${window.GLOB.copyRight}` |
| | | let _p = `ID=${Id}&userid=${sessionStorage.getItem('UserID')}&LoginUID=${sessionStorage.getItem('LoginUID')}&logo=${window.GLOB.doclogo}&name=${sessionStorage.getItem('Full_Name')}&suid=${sessionStorage.getItem('SessionUid')}&icp=${window.GLOB.ICP}©Right=${window.GLOB.copyRight}` |
| | | let url = '#/pay/' + window.btoa(window.encodeURIComponent(_p)) |
| | | let _this = this |
| | | |
| | | _this.props.updateStatus('start') |
| | | confirm({ |
| | | title: '请在付款页面完成订单支付。', |
| | | content: '', |
| | | className: 'pay-query', |
| | | okText: '支付成功', |
| | | cancelText: '支付遇到问题', |
| | | onOk() { |
| | | _this.props.updateStatus('refresh', 'grid') |
| | | }, |
| | | onCancel() { |
| | | _this.props.updateStatus('refresh', 'grid') |
| | | // _this.props.updateStatus('over') |
| | | }, |
| | | }) |
| | | window.open(url) |
| | | } else if (btn.pageTemplate === 'custom') { |
| | | let url = btn.url |