| | |
| | | } |
| | | |
| | | changeTemplate = (val) => { |
| | | const { templates } = this.state |
| | | const { templates, verify } = this.state |
| | | |
| | | let temp = templates.filter(temp => temp.value === val)[0] |
| | | |
| | | this.setState({ |
| | | selectimg: temp.img |
| | | selectimg: temp.img, |
| | | verify: { |
| | | ...verify, |
| | | Template: val |
| | | } |
| | | }) |
| | | } |
| | | |
| | |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {printMode !== 'custom' ? <Col span={8}> |
| | | <Form.Item label="打印模板"> |
| | | <Form.Item label="打印模板" help={(() => { |
| | | if (verify.Template) { |
| | | return <span onClick={() => { |
| | | sessionStorage.setItem('mk-print-tab-temp', verify.Template) |
| | | window.open('#/hs') |
| | | |
| | | setTimeout(() => { |
| | | sessionStorage.removeItem('mk-print-tab-temp') |
| | | }, 50) |
| | | }} style={{color: '#1890ff', cursor: 'pointer', fontSize: '13px'}}>#查看模板</span> |
| | | } |
| | | return null |
| | | })()}> |
| | | {getFieldDecorator('Template', { |
| | | initialValue: verify.Template || '', |
| | | rules: [ |