| | |
| | | "display": "standalone", |
| | | "theme_color": "#000000", |
| | | "background_color": "#ffffff", |
| | | "mk_version": "20240302" |
| | | "mk_version": "20240401" |
| | | } |
| | |
| | | type: 'radio', |
| | | key: 'permission', |
| | | label: '权限验证', |
| | | initVal: setting.permission || 'true', |
| | | initVal: card.permission || 'true', |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', text: '继承菜单'}, |
| | |
| | | type: 'radio', |
| | | key: 'permission', |
| | | label: '权限验证', |
| | | initVal: setting.permission || 'true', |
| | | initVal: card.permission || 'true', |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', text: '启用'}, |
| | |
| | | remark: '', |
| | | attachments: 0, |
| | | vouAduited: false, |
| | | vouReadOnly: false, |
| | | attachlist: [], |
| | | oriAttachs: [], |
| | | tempTypes: [], |
| | |
| | | attachlist: files, |
| | | vouDate: res.fibvoucherdate ? moment(res.fibvoucherdate, 'YYYY-MM-DD') : null, |
| | | charType: res.voucher_class || 'keeping', |
| | | vouAduited: res.voucher_status === 'true', |
| | | vouAduited: res.voucher_status === 'true' || res.read_only === 'true', |
| | | vouReadOnly: res.read_only === 'true', |
| | | charName: res.voucher_char, |
| | | charInt: res.voucher_char_int, |
| | | // orgcode: res.orgcode, |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { type, status, loading, config, orgcode, typeOptions, tempTypes, charType, charInt, data, vouDate, username, remark, attachments, title, attachlist, tempTypeClass, vouAduited } = this.state |
| | | const { type, status, loading, config, orgcode, typeOptions, tempTypes, charType, charInt, data, vouDate, username, remark, attachments, title, attachlist, tempTypeClass, vouAduited, vouReadOnly, voucherCode } = this.state |
| | | |
| | | if (type === 'checkVoucher') { |
| | | return ( |
| | |
| | | {!vouAduited ?<Button disabled={status === 'empty' || status === 'saved'} onClick={() => this.triggersave()}>保存</Button> : null} |
| | | {/* <PrintVoucher ID={config.uuid + 'print'} data={data} orgname={orgname} vouDate={vouDate} charName={charName} charInt={charInt} attachments={attachments} disabled={status !== 'saved'}/> */} |
| | | <Button disabled={status !== 'saved'} onClick={this.triggerPrint}>打印</Button> |
| | | {vouAduited ? |
| | | <Button onClick={this.triggerUnAduit}>取消审核</Button> : |
| | | <Button onClick={this.triggerAduit}>审核</Button>} |
| | | {vouAduited && !vouReadOnly ? <Button onClick={this.triggerUnAduit}>取消审核</Button> : null} |
| | | {!vouAduited && !vouReadOnly ? <Button onClick={this.triggerAduit}>审核</Button> : null} |
| | | <Button onClick={this.triggerclose}>关闭</Button> |
| | | </div> |
| | | <div className="voucher-body" style={{padding: `0px ${config.wrap.space || 0}px`}}> |
| | | <div className="pre-wrap"> |
| | | <div className="voucher-number"> |
| | | 凭证号:{voucherCode} |
| | | </div> |
| | | <div className="voucher-code"> |
| | | <Select value={charType} disabled={vouAduited} dropdownClassName="mk-vcode-dropdown" onChange={(val, option) => this.setState({status: 'change', charType: val, charName: option.props.charname, charInt: option.props.charint})}> |
| | | {typeOptions.map(option => |
| | |
| | | 日期:<DatePicker value={vouDate} disabled={vouAduited} onChange={this.changeVouDate}/> |
| | | </div> |
| | | <div className="voucher-text"> |
| | | <Input value={title} placeholder="凭证文本" disabled={vouAduited} autoComplete="off" onChange={(e) => this.setState({status: 'change', title: e.target.value})}/> |
| | | <Input value={title} placeholder={vouAduited ? '' : '凭证文本'} disabled={vouAduited} autoComplete="off" onChange={(e) => this.setState({status: 'change', title: e.target.value})}/> |
| | | </div> |
| | | <div className="voucher-affix"> |
| | | 附单据 <InputNumber precision={0} disabled={vouAduited} value={attachments || 0} autoComplete="off" onChange={this.changeAttach}/> 张 |
| | |
| | | } |
| | | } |
| | | .voucher-body { |
| | | .voucher-number { |
| | | display: inline-block; |
| | | white-space: nowrap; |
| | | margin-right: 15px; |
| | | } |
| | | .voucher-code { |
| | | display: inline-block; |
| | | width: 160px; |
| | |
| | | } |
| | | .pre-wrap { |
| | | padding: 10px 0px; |
| | | |
| | | .ant-input.ant-input-disabled, .ant-input-number.ant-input-number-disabled, .ant-select.ant-select-disabled { |
| | | color: rgba(0, 0, 0, 0.65); |
| | | } |
| | | } |
| | | .voucher-date { |
| | | display: inline-block; |
| | |
| | | } |
| | | .voucher-text { |
| | | display: inline-block; |
| | | width: calc(56% - 350px); |
| | | width: calc(68% - 545px); |
| | | margin-left: 12px; |
| | | } |
| | | .voucher-affix { |