| | |
| | | { |
| | | "appId": "202108312122504607B107A83F55B40C98CCF", |
| | | "appkey": "20210831212235413F287EC3BF489424496C8", |
| | | "appId": "201912040924165801464FF1788654BC5AC73", |
| | | "appkey": "20191106103859640976D6E924E464D029CF0", |
| | | "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars", |
| | | "systemType": "", |
| | | "externalDatabase": "", |
| | | "lineColor": "", |
| | | "filter": "false", |
| | | "defaultApp": "mkindustry", |
| | | "defaultApp": "mk", |
| | | "defaultLang": "zh-CN", |
| | | "WXAppID": "", |
| | | "WXminiAppID": "", |
| | |
| | | "transfer": "false", |
| | | "keepPassword": "true", |
| | | "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"], |
| | | "host": "http://demo.mk9h.cn", |
| | | "service": "erp_new/" |
| | | "host": "http://qingqiumarket.cn", |
| | | "service": "MKWMS/" |
| | | } |
| | |
| | | // </div> |
| | | // ) |
| | | } else if (card.eleType === 'picture') { |
| | | let _imagestyle = {} |
| | | let _imagestyle = { |
| | | backgroundSize: card.style.backgroundSize || 'cover', |
| | | backgroundPosition: card.style.backgroundPosition || 'center', |
| | | backgroundRepeat: card.style.backgroundRepeat || 'no-repeat', |
| | | borderRadius: card.style.borderRadius || 0 |
| | | } |
| | | let url = card.url !== '@icon@' ? card.url : sessionStorage.getItem('CloudAvatar') |
| | | |
| | | if (url) { |
| | | url = url.replace(/@mywebsite@\//ig, window.GLOB.baseurl) |
| | | _imagestyle = {backgroundImage: `url('${url}')`} |
| | | _imagestyle.backgroundImage = `url('${url}')` |
| | | } else { |
| | | let index = card.uuid.match(/\d{1}/g) |
| | | index = index.slice(-1)[0] % 5 |
| | | let demos = [demo1, demo2, demo3, demo4, demo5] |
| | | |
| | | _imagestyle = {backgroundImage: `url('${demos[index]}')`} |
| | | } |
| | | |
| | | if (card.style && card.style.borderRadius) { |
| | | _imagestyle.borderRadius = card.style.borderRadius |
| | | _imagestyle.backgroundImage = `url('${demos[index]}')` |
| | | } |
| | | |
| | | if (PicRadio[card.lenWidRadio]) { |
| | | _imagestyle.paddingTop = PicRadio[card.lenWidRadio] |
| | | } else { |
| | | _imagestyle.paddingTop = '100%' |
| | | } |
| | | |
| | | if (card.backgroundSize) { |
| | | _imagestyle.backgroundSize = card.backgroundSize |
| | | } |
| | | |
| | | return ( |
| | |
| | | sequence: ['eleType', 'width'], |
| | | text: ['eleType', 'datatype', 'format', 'width', 'height', 'prefix', 'postfix', 'link', 'anchors', 'noValue', 'bgImage', 'fixStyle', 'copyable'], |
| | | number: ['eleType', 'datatype', 'width', 'height', 'prefix', 'postfix', 'noValue', 'fixStyle'], |
| | | picture: ['eleType', 'datatype', 'width', 'lenWidRadio', 'backgroundSize', 'maxWidth', 'link', 'noValue'], |
| | | picture: ['eleType', 'datatype', 'width', 'lenWidRadio', 'maxWidth', 'link', 'noValue'], |
| | | video: ['eleType', 'datatype', 'width', 'aspectRatio', 'autoPlay', 'loop', 'startTime', 'noValue', 'posterType'], |
| | | icon: ['eleType', 'datatype', 'width', 'tooltip'], |
| | | slider: ['eleType', 'datatype', 'width', 'color', 'maxValue', 'showInfo', 'showType', 'strokeWidth', 'strokeLinecap', 'trailColor'], |
| | |
| | | { value: '9:16', text: '9:16' }, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'backgroundSize', |
| | | label: '图像大小', |
| | | initVal: card.backgroundSize || 'cover', |
| | | required: false, |
| | | options: [ |
| | | { value: 'cover', text: '覆盖' }, |
| | | { value: 'contain', text: '包含' }, |
| | | { value: 'auto', text: '自适应' }, |
| | | ] |
| | | }, |
| | | // { |
| | | // type: 'radio', |
| | | // key: 'backgroundSize', |
| | | // label: '图像大小', |
| | | // initVal: card.backgroundSize || 'cover', |
| | | // required: false, |
| | | // options: [ |
| | | // { value: 'cover', text: '覆盖' }, |
| | | // { value: 'contain', text: '包含' }, |
| | | // { value: 'auto', text: '自适应' }, |
| | | // ] |
| | | // }, |
| | | { |
| | | type: 'number', |
| | | key: 'maxWidth', |
| | |
| | | _style.float = element.wrapStyle.textAlign || 'left' |
| | | } |
| | | } else if (element.eleType === 'picture') { |
| | | options = ['border', 'margin'] |
| | | options = ['background', 'border', 'margin'] |
| | | } else if (element.eleType === 'color') { |
| | | options = ['border', 'margin', 'padding'] |
| | | } else if (element.eleType === 'text') { |
| | |
| | | card: element |
| | | }) |
| | | |
| | | MKEmitter.emit('changeStyle', options, _style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', options, _style, this.getStyle, 'mk-' + element.eleType) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | _card.wrapStyle = {textAlign: style.float} |
| | | delete _card.style.float |
| | | } |
| | | } else if (_card.eleType === 'picture') { |
| | | _card.style = style |
| | | delete _card.style.backgroundImage |
| | | } else { |
| | | _card.style = style |
| | | } |
| | |
| | | } |
| | | |
| | | res.innerHeight = res.barHeight + (res.displayValue === 'true' ? fontSize + 2 : 0) |
| | | } else if (res.eleType === 'picture') { |
| | | delete res.style.backgroundImage |
| | | } |
| | | |
| | | return res |
| | |
| | | {value: 'backFont', label: '背景+文字'}, |
| | | {value: 'font', label: '文字'}, |
| | | {value: 'tabs', label: '标签页'}, |
| | | ...(subtype === 'datacard' && appType === 'mob' ? [{value: 'check', label: '勾选'}] : []) |
| | | ...(subtype === 'datacard' ? [ |
| | | {value: 'check', label: '勾选(圆框)'}, |
| | | {value: 'check square', label: '勾选(方框)'} |
| | | ] : []) |
| | | ], |
| | | forbid: subtype === 'tablecard' |
| | | }, |
| | |
| | | field: 'modalContent', |
| | | label: '弹窗内容', |
| | | initval: wrap.modalContent || 'message', |
| | | tooltip: '使用系统更新时,如果返回值的ErrCode为-1,只会做系统配置更新不会显示弹窗。注:数据源使用同步查询时无效。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'message', label: '消息提醒'}, |
| | |
| | | {field: 'voucherType', values: ['createVoucher', 'checkVoucher']}, |
| | | {field: 'voucherTypeText', values: ['createVoucher', 'checkVoucher']}, |
| | | {field: 'voucherSign', values: ['createVoucher', 'checkVoucher']}, |
| | | {field: 'supModule', values: ['checkTemp', 'checkVoucher']}, |
| | | ] |
| | | }, |
| | | { |
| | |
| | | fonts: null, |
| | | backgroundImage: '', |
| | | options: [], |
| | | borposition: 'outer' |
| | | borposition: 'outer', |
| | | type: '' |
| | | } |
| | | |
| | | callback = null |
| | |
| | | MKEmitter.removeListener('changeStyle', this.initStyle) |
| | | } |
| | | |
| | | initStyle = (options, style = {}, callback) => { |
| | | initStyle = (options, style = {}, callback, type) => { |
| | | let backgroundImage = '' |
| | | if (style.backgroundImage && /^url/ig.test(style.backgroundImage)) { |
| | | backgroundImage = style.backgroundImage.replace(/^url\(/ig, '').replace(/\)$/ig, '') |
| | |
| | | |
| | | this.setState({ |
| | | visible: true, |
| | | type: type || '', |
| | | fonts: fonts, |
| | | card: card, |
| | | options: options, |
| | |
| | | } |
| | | |
| | | render () { |
| | | const { card, options, backgroundImage, borposition, fonts } = this.state |
| | | const { card, options, backgroundImage, borposition, fonts, type } = this.state |
| | | const formItemLayout = { |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | |
| | | maskStyle={{opacity: 0.1}} |
| | | visible={this.state.visible} |
| | | > |
| | | <div className="menu-style-controller"> |
| | | <div className={'menu-style-controller ' + (type || '')}> |
| | | <Form {...formItemLayout}> |
| | | {card ? <Collapse expandIconPosition="right" destroyInactivePanel={true} defaultActiveKey={options[0]}> |
| | | {options.includes('width') ? <Panel header="宽度" key="width"> |
| | |
| | | </Col> : null} |
| | | </Panel> : null} |
| | | {options.includes('background') || options.includes('backgroundColor') ? <Panel header="背景" key="background"> |
| | | <Col span={24}> |
| | | <Col span={24} className="bg-color-panel"> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<BgColorsOutlined title="背景颜色"/>} |
| | |
| | | <Input value={card.background || ''} onChange={(e) => this.changeBackground(e.target.value)} /> |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {!options.includes('backgroundColor') ? <Col span={24}> |
| | | {!options.includes('backgroundColor') ? <Col span={24} className="bg-image-panel"> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<PictureOutlined title="背景图片"/>} |
| | |
| | | } |
| | | } |
| | | } |
| | | .menu-style-controller.mk-picture { |
| | | .bg-image-panel { |
| | | display: none; |
| | | } |
| | | } |
| | | |
| | | .margin-popover { |
| | | padding-top: 0px; |
| | |
| | | return null |
| | | } |
| | | |
| | | if (_style.borderRadius) { |
| | | _imagestyle.borderRadius = _style.borderRadius |
| | | } |
| | | |
| | | if (PicRadio[card.lenWidRadio]) { |
| | | _imagestyle.paddingTop = PicRadio[card.lenWidRadio] |
| | | } else { |
| | | _imagestyle.paddingTop = '100%' |
| | | } |
| | | |
| | | _imagestyle.backgroundSize = card.backgroundSize || 'cover' |
| | | _imagestyle.borderRadius = _style.borderRadius || 0 |
| | | _imagestyle.backgroundSize = _style.backgroundSize || 'cover' |
| | | _imagestyle.backgroundPosition = _style.backgroundPosition || 'center' |
| | | _imagestyle.backgroundRepeat = _style.backgroundRepeat || 'no-repeat' |
| | | |
| | | if (card.link) { |
| | | _style.cursor = 'pointer' |
| | |
| | | this.timer && this.timer.stop() |
| | | } |
| | | |
| | | openModal = () => { |
| | | openModal = (ErrCode) => { |
| | | const { config, data } = this.state |
| | | |
| | | if (config.wrap.display !== 'modal' || !data || data.length === 0) return |
| | |
| | | localStorage.setItem(code, data[0].$$uuid + data.length) |
| | | |
| | | Api.getAppVersion(true) |
| | | |
| | | if (ErrCode === '-1') { |
| | | return |
| | | } |
| | | } |
| | | |
| | | setTimeout(() => { |
| | |
| | | }), |
| | | loading: false |
| | | }, () => { |
| | | this.openModal() |
| | | this.openModal(result.ErrCode) |
| | | }) |
| | | } else { |
| | | this.setState({ |
| | |
| | | } |
| | | } |
| | | |
| | | openModal = () => { |
| | | openModal = (ErrCode) => { |
| | | const { config, data } = this.state |
| | | |
| | | let code = config.wrap.code || ('modal' + config.uuid) |
| | |
| | | localStorage.setItem(code, data.$$uuid || 'true') |
| | | |
| | | Api.getAppVersion(true) |
| | | |
| | | if (ErrCode === '-1') { |
| | | return |
| | | } |
| | | } |
| | | |
| | | setTimeout(() => { |
| | |
| | | loading: false |
| | | }, () => { |
| | | if (config.wrap.display === 'modal') { |
| | | this.openModal() |
| | | this.openModal(result.ErrCode) |
| | | } |
| | | }) |
| | | } else { |
| | |
| | | BID = BData.$BID || '' |
| | | } |
| | | |
| | | let book = null |
| | | let vouDate = null |
| | | if (config.wrap.supBook) { |
| | | book = window.GLOB.CacheData.get(config.wrap.supBook) || null |
| | | |
| | | if (book) { |
| | | let month = book.months |
| | | vouDate = moment() |
| | | |
| | | if (month && month < moment().format('YYYY-MM')) { |
| | | vouDate = moment(month, 'YYYY-MM').endOf('month') |
| | | } |
| | | } |
| | | } |
| | | |
| | | window.GLOB.CacheVoucher.delete(config.uuid) |
| | | let type = config.wrap.type || 'createVoucher' |
| | | |
| | | type = 'checkVoucher' |
| | | // type = 'checkVoucher' |
| | | // BID = '202302081418373862P8Q29OUD19CT1AVMU6' |
| | | |
| | | if (type === 'createVoucher' || type === 'createTemp') { |
| | | BID = Utils.getguid() |
| | | } |
| | | |
| | | this.setState({ |
| | | book: book, |
| | | vouDate: vouDate, |
| | | config: fromJS(config).toJS(), |
| | | type: type, |
| | | BID: BID || '', |
| | | status: 'empty', |
| | | book: window.GLOB.CacheData.get(config.wrap.supBook) || null |
| | | status: 'empty' |
| | | }, () => { |
| | | this.loadData() |
| | | this.getVoucher() |
| | | }) |
| | | } |
| | |
| | | } |
| | | |
| | | resetParentParam = (MenuID, id, data) => { |
| | | const { config } = this.state |
| | | const { config, type } = this.state |
| | | |
| | | if (config.wrap.supBook === MenuID) { |
| | | let month = data.months |
| | |
| | | return |
| | | } |
| | | |
| | | if (!config.wrap.supModule || config.wrap.supModule !== MenuID) return |
| | | if (!config.wrap.supModule || config.wrap.supModule !== MenuID || type === 'createVoucher' || type === 'createTemp') return |
| | | if (id !== this.state.BID || id !== '') { |
| | | this.setState({ BID: id }, () => { |
| | | this.getVoucher() |
| | |
| | | func: 's_get_fcc_account_data', |
| | | // account_code: book.account_code || '', |
| | | fcc_date: book.months ? book.months + '-01' : moment().format('YYYY-MM-DD'), |
| | | account_year_code: book.account_year_code || '', |
| | | months: book.months ? book.months : moment().format('YYYY-MM'), |
| | | BID: book.id |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | getVoucher = () => { |
| | | // const { book, BID, type } = this.state |
| | | const { book, type } = this.state |
| | | const { book, BID, type } = this.state |
| | | |
| | | // if (!book || !BID || type === 'createVoucher' || type === 'createTemp') return |
| | | if (!book || type === 'createVoucher' || type === 'createTemp') return |
| | | if (!book || !BID || type === 'createVoucher' || type === 'createTemp') return |
| | | |
| | | let param = { |
| | | func: 's_get_fcc_voucher', |
| | | BID: book.id, |
| | | // ID: BID |
| | | ID: '20230207175535042UOMRLECLIVPKOBU7L2N' |
| | | ID: BID |
| | | } |
| | | |
| | | Api.genericInterface(param).then(res => { |
| | |
| | | line.exratecode = line.foreign_exratecode || '' |
| | | line.exratename = line.foreign_exratename || '' |
| | | line.local_currency = line.local_exratecode || '' |
| | | |
| | | if (line.unitratio && line.foreign_amount) { |
| | | line.foreign_currency_type = 'Y' |
| | | } |
| | | |
| | | if (line.net_unitprice && line.fcc_count) { |
| | | line.count_type = 'Y' |
| | | } |
| | | line.foreign_currency_type = line.foreign_type || '' |
| | | |
| | | if (line.sup) { |
| | | line.supAccounts = line.sup.map(cell => { |
| | | cell.uuid = cell.sup_id |
| | | return cell |
| | | }) |
| | | delete line.sup |
| | | } |
| | | |
| | | return line |
| | |
| | | } |
| | | |
| | | voucherSave = (list, t) => { |
| | | const { data, config, charInt, charType, vouDate, book, remark, charName, attachments, title, orgcode, orgname } = this.state |
| | | const { type, data, config, charInt, charType, vouDate, book, remark, charName, attachments, title, orgcode, orgname } = this.state |
| | | |
| | | if (!book) { |
| | | notification.warning({ |
| | |
| | | orgname: orgname || '', |
| | | voucher_class: charType, |
| | | years: book.years, |
| | | months: moment(vouDate).format('YYYY-MM'), |
| | | business_type: config.wrap.businessType || '', |
| | | voucher_sign: config.wrap.voucherSign || '', |
| | | voucher_char: charName, |
| | |
| | | let sup_data = [] |
| | | let voucherMap = new Map() |
| | | let supMap = new Map() |
| | | let extract = localStorage.getItem(window.GLOB.host + '_voucher_extract') |
| | | extract = extract ? JSON.parse(extract) : [] |
| | | |
| | | data.forEach(item => { |
| | | voucherMap.set(item.uuid, item) |
| | |
| | | let curr = item.foreign_currency_type === 'Y' |
| | | let direct = item.debit ? 'debit' : 'credit' |
| | | |
| | | if (type === 'createVoucher' && item.subject_voucher_text && item.subject_voucher_text.length < 20) { |
| | | extract.unshift(item.subject_voucher_text) |
| | | } |
| | | |
| | | if (voucherMap.has(item.uuid)) { |
| | | voucherMap.delete(item.uuid) |
| | | } |
| | |
| | | sup_data.push(`'${n.uuid}','${item.subject_voucher_code || ''}','${item.voucher_lp || ''}','${n.voucher_sup_lp || ''}','${item.subject_code}','${item.subject_name}','${n.sup_voucher_text || ''}','${direct}',${item.debit || item.credit},'${n.customercode || ''}','${n.customername || ''}','${n.suppliercode || ''}','${n.suppliername || ''}','${n.co_pro_code || ''}','${n.co_pro_name || ''}','${n.workercode || ''}','${n.workername || ''}','${n.project_code || ''}','${n.project_name || ''}','${n.productcode || ''}','${n.productname || ''}','${n.cash_flow_code || ''}','${n.cash_flow_name || ''}','${n.sup_acc_code || ''}','${n.sup_acc_name || ''}','${n.sup_acc_type || ''}','${item.uuid}',0`) |
| | | }) |
| | | } |
| | | return `'${item.uuid}','${item.subject_voucher_code || ''}','${item.voucher_lp || ''}','${item.subject_code}','${item.subject_name}','${item.subject_voucher_text || ''}',${count ? item.fcc_count || 0 : 0},${count ? item.net_unitprice || 0 : 0},'${item.unit}',${item.debit || item.credit},'${direct}','${curr ? item.exratecode : '01010001'}','${curr ? item.exratename : 'CNY'}',${curr ? item.unitratio || 0 : 0},'${item.sup_accounting}',${item.debit ? 1 : -1},${curr ? item.foreign_amount || 0 : 0},0,'${item.local_currency || ''}'` |
| | | return `'${item.uuid}','${item.subject_voucher_code || ''}','${item.voucher_lp || ''}','${item.subject_code}','${item.subject_name}','${item.subject_voucher_text || ''}',${count ? item.fcc_count || 0 : 0},${count ? item.net_unitprice || 0 : 0},'${item.unit}',${item.debit || item.credit},'${direct}','${curr ? item.exratecode : '01010001'}','${curr ? item.exratename : 'CNY'}',${curr ? item.unitratio || 0 : 0},'${item.sup_accounting}',${item.debit ? 1 : -1},${curr ? item.foreign_amount || 0 : 0},0,'${item.local_currency || ''}','${count ? 'Y' : ''}','${curr ? 'Y' : ''}'` |
| | | }) |
| | | |
| | | if (type === 'createVoucher') { |
| | | extract = Array.from(new Set(extract)) |
| | | if (extract.length > 20) { |
| | | extract.length = 20 |
| | | } |
| | | localStorage.setItem(window.GLOB.host + '_voucher_extract', JSON.stringify(extract)) |
| | | } |
| | | |
| | | voucherMap.forEach(item => { |
| | | let count = item.count_type === 'Y' |
| | | let curr = item.foreign_currency_type === 'Y' |
| | | let direct = item.debit ? 'debit' : 'credit' |
| | | |
| | | subject_data.push(`'${item.uuid}','${item.subject_voucher_code || ''}','${item.voucher_lp || ''}','${item.subject_code}','${item.subject_name}','${item.subject_voucher_text || ''}',${count ? item.fcc_count || 0 : 0},${count ? item.net_unitprice || 0 : 0},'${item.unit}',${item.debit || item.credit},'${direct}','${curr ? item.exratecode : '01010001'}','${curr ? item.exratename : 'CNY'}',${curr ? item.unitratio || 0 : 0},'${item.sup_accounting}',${item.debit ? 1 : -1},${curr ? item.foreign_amount || 0 : 0},1,'${item.local_currency || ''}'`) |
| | | subject_data.push(`'${item.uuid}','${item.subject_voucher_code || ''}','${item.voucher_lp || ''}','${item.subject_code}','${item.subject_name}','${item.subject_voucher_text || ''}',${count ? item.fcc_count || 0 : 0},${count ? item.net_unitprice || 0 : 0},'${item.unit}',${item.debit || item.credit},'${direct}','${curr ? item.exratecode : '01010001'}','${curr ? item.exratename : 'CNY'}',${curr ? item.unitratio || 0 : 0},'${item.sup_accounting}',${item.debit ? 1 : -1},${curr ? item.foreign_amount || 0 : 0},1,'${item.local_currency || ''}','${count ? 'Y' : ''}','${curr ? 'Y' : ''}'`) |
| | | }) |
| | | |
| | | supMap.forEach(n => { |
| | |
| | | return |
| | | } |
| | | |
| | | notification.success({ |
| | | top: 92, |
| | | message: '保存成功!' + (res.voucher_char_int !== charInt ? charInt + '号凭证号已经存在,已为您更新为' + res.voucher_char_int + '号凭证。' : ''), |
| | | duration: 5 |
| | | }) |
| | | |
| | | if (t === 'add') { |
| | | this.setState({ |
| | | status: 'empty', |
| | | remark: '', |
| | | tbdata: [], |
| | | charInt: charInt + 1 |
| | | charInt: res.voucher_char_int + 1, |
| | | BID: Utils.getguid() |
| | | }) |
| | | MKEmitter.emit('cleartable', config.uuid) |
| | | } else { |
| | | this.setState({ |
| | | status: 'saved', |
| | | charInt: res.voucher_char_int || charInt, |
| | | data: fromJS(list).toJS() |
| | | }) |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | triggerAttach = () => { |
| | | |
| | | } |
| | | |
| | | render() { |
| | | const { type, status, loading, config, typeOptions, charType, charInt, data, vouDate, username, remark, remarkVisible, attachments, title } = this.state |
| | | |
| | |
| | | </div> |
| | | <div className="voucher-affix"> |
| | | 附单据 <InputNumber precision={0} value={attachments || 0} autoComplete="off" onChange={this.changeAttach}/> 张 |
| | | <Button type="link" className="" onClick={this.triggerprint}>附件</Button> |
| | | <Button type="link" className="" onClick={this.triggerAttach}>附件</Button> |
| | | <Button type="link" className="" onClick={this.triggerprint}>备注</Button> |
| | | </div> |
| | | </div> : null} |
| | |
| | | this.setState({ |
| | | subAccounts: fromJS(this.state.subAccounts).toJS().map(cell => { |
| | | if (key === cell.field) { |
| | | cell.value = option.props.value |
| | | cell.name = option.props.name |
| | | cell.value = option ? option.props.value : '' |
| | | cell.name = option ? option.props.name : '' |
| | | } |
| | | return cell |
| | | }) |
| | |
| | | extra = <PlusOutlined onClick={this.plusLine}/> |
| | | |
| | | if (editing) { |
| | | let options = ['现金', '发票'] |
| | | let options = localStorage.getItem(window.GLOB.host + '_voucher_extract') |
| | | options = options ? JSON.parse(options) : [] |
| | | |
| | | children = <AutoComplete |
| | | dataSource={options.map((cell, i) => <AutoComplete.Option value={cell} key={i}> |
| | | {cell} |
| | |
| | | _type = 'text' |
| | | } |
| | | } else if (props.type === 'form') { |
| | | if (_type !== 'number') { |
| | | if (_type === 'datetime' || _type === 'date') { |
| | | _type = 'date' |
| | | } else if (_type !== 'number') { |
| | | _type = 'text' |
| | | } |
| | | } |