From 888095418c902cc94693cba8b45f31bb79cdf818 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 28 二月 2020 01:31:46 +0800 Subject: [PATCH] 2020-02-28 --- src/templates/tableshare/verifycard/index.jsx | 132 ------------------------------------------- 1 files changed, 1 insertions(+), 131 deletions(-) diff --git a/src/templates/tableshare/verifycard/index.jsx b/src/templates/tableshare/verifycard/index.jsx index 2f24da8..c93912e 100644 --- a/src/templates/tableshare/verifycard/index.jsx +++ b/src/templates/tableshare/verifycard/index.jsx @@ -1,6 +1,6 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { Form, Tabs, Row, Col, Radio, Button, Table, Popconfirm, Icon, notification, Modal, message, InputNumber, Tooltip, Input, Select } from 'antd' +import { Form, Tabs, Row, Col, Radio, Button, Table, Popconfirm, Icon, notification, Modal, message, InputNumber, Tooltip } from 'antd' import moment from 'moment' import Api from '@/api' @@ -33,8 +33,6 @@ orderModular: [], orderModularDetail: [], voucher: [], - templates: [], - selectimg: '', voucherDetail: [], uniqueColumns: [ { @@ -383,7 +381,6 @@ billcodes: _verify.billcodes || [], voucher: _verify.voucher || {enabled: false}, scripts: _verify.scripts || [], - Template: _verify.Template || '' } }) @@ -637,64 +634,6 @@ voucherDetail: result[1].data }) }) - - if (this.props.card.execMode) { - let _sql = `select ID,Images,PrintTempNO+PrintTempName as PN from sPrintTemplate - where appkey= @appkey@ and Deleted=0 - union select ID,Images,a.PrintTempNO+PrintTempName as PN - from (select * from sPrintTemplate where appkey= '' and Deleted=0 ) a - left join (select PrintTempNO from sPrintTemplate where appkey= @appkey@ and Deleted=0 ) b - on a.PrintTempNO=b.PrintTempNO - left join (select Srcid from sPrintTemplate_Log where appkey='' and apicode= @appkey@ and Deleted=0 ) c - on a.ID=c.Srcid where b.PrintTempNO is null and c.Srcid is null` - - let param = { - func: 'sPC_Get_SelectedList', - LText: Utils.formatOptions(_sql), - obj_name: 'data', - arr_field: 'PN,ID,Images' - } - - param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' - param.secretkey = Utils.encrypt(param.LText, param.timestamp) - - Api.getSystemConfig(param).then(res => { - if (res.status) { - let temps = res.data.map(temp => { - return { - value: temp.ID, - text: temp.PN, - img: temp.Images - } - }) - - let Template = this.state.verify.Template - let selectimg = '' - let selectTemp = temps.filter(temp => temp.value === Template)[0] - - if (!selectTemp) { - Template = '' - } else { - selectimg = selectTemp.img - } - - this.setState({ - selectimg: selectimg, - templates: temps, - verify: { - ...this.state.verify, - Template: Template - } - }) - } else { - notification.warning({ - top: 92, - message: res.message, - duration: 10 - }) - } - }) - } } uniqueChange = (values) => { @@ -1044,39 +983,7 @@ }) } - changeTemplate = (val) => { - const { templates } = this.state - - let temp = templates.filter(temp => temp.value === val)[0] - - this.setState({ - selectimg: temp.img - }) - } - - handleConfirm = () => { - const { verify } = this.state - // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭� - return new Promise((resolve, reject) => { - this.props.form.validateFieldsAndScroll((err, values) => { - if (!err) { - let _verify = {...verify, ...values} - - resolve(_verify) - } else { - notification.warning({ - top: 92, - message: '閾炬帴鍦板潃涓庢墦鍗版ā鏉夸笉鍙负绌�!', - duration: 10 - }) - } - }) - }) - } - render() { - const { getFieldDecorator } = this.props.form - const { verify, fields, uniqueColumns, contrastColumns, customColumns, orderColumns, scriptsColumns, orderModular, orderModularDetail, voucher, voucherDetail } = this.state const formItemLayout = { labelCol: { @@ -1124,43 +1031,6 @@ </Radio.Group> </Form.Item> </Col> - {this.props.card.execMode ? <Col span={8}> - <Form.Item label={'閾炬帴鍦板潃'}> - {getFieldDecorator('linkUrl', { - initialValue: verify.linkUrl || '127.0.0.1:13529', - rules: [ - { - required: true, - message: this.props.dict['form.required.input'] + '閾炬帴鍦板潃!' - } - ] - })(<Input placeholder="" autoComplete="off" />)} - </Form.Item> - </Col> : null} - {this.props.card.execMode ? <Col span={8}> - <Form.Item label={'鎵撳嵃妯℃澘'}> - {getFieldDecorator('Template', { - initialValue: verify.Template || '', - rules: [ - { - required: true, - message: this.props.dict['form.required.select'] + '鎵撳嵃妯℃澘!' - } - ] - })( - <Select onChange={this.changeTemplate}> - {this.state.templates.map((option, key) => - <Select.Option id={key} key={key} value={option.value}> - {option.text} - </Select.Option> - )} - </Select> - )} - </Form.Item> - </Col> : null} - {this.state.selectimg ? <Col span={9}> - <img style={{width: '90%', marginBottom: '25px'}} src={this.state.selectimg} alt=""/> - </Col> : null} </Row> </Form> </TabPane> -- Gitblit v1.8.0