mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 10:45:47 +08:00
Add invoiceType to payment.
This commit is contained in:
parent
9e5a64c021
commit
3f90c18a19
@ -49,6 +49,7 @@ type Payment struct {
|
|||||||
PersonIdCard string `xorm:"varchar(100)" json:"personIdCard"`
|
PersonIdCard string `xorm:"varchar(100)" json:"personIdCard"`
|
||||||
PersonEmail string `xorm:"varchar(100)" json:"personEmail"`
|
PersonEmail string `xorm:"varchar(100)" json:"personEmail"`
|
||||||
PersonPhone string `xorm:"varchar(100)" json:"personPhone"`
|
PersonPhone string `xorm:"varchar(100)" json:"personPhone"`
|
||||||
|
InvoiceType string `xorm:"varchar(100)" json:"invoiceType"`
|
||||||
InvoiceTitle string `xorm:"varchar(100)" json:"invoiceTitle"`
|
InvoiceTitle string `xorm:"varchar(100)" json:"invoiceTitle"`
|
||||||
InvoiceTaxId string `xorm:"varchar(100)" json:"invoiceTaxId"`
|
InvoiceTaxId string `xorm:"varchar(100)" json:"invoiceTaxId"`
|
||||||
InvoiceRemark string `xorm:"varchar(100)" json:"invoiceRemark"`
|
InvoiceRemark string `xorm:"varchar(100)" json:"invoiceRemark"`
|
||||||
|
@ -13,11 +13,13 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import {Button, Card, Col, Input, Row} from 'antd';
|
import {Button, Card, Col, Input, Row, Select} from 'antd';
|
||||||
import * as PaymentBackend from "./backend/PaymentBackend";
|
import * as PaymentBackend from "./backend/PaymentBackend";
|
||||||
import * as Setting from "./Setting";
|
import * as Setting from "./Setting";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
|
const { Option } = Select;
|
||||||
|
|
||||||
class PaymentEditPage extends React.Component {
|
class PaymentEditPage extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
@ -177,6 +179,10 @@ class PaymentEditPage extends React.Component {
|
|||||||
<Col span={22} >
|
<Col span={22} >
|
||||||
<Input value={this.state.payment.personName} onChange={e => {
|
<Input value={this.state.payment.personName} onChange={e => {
|
||||||
this.updatePaymentField('personName', e.target.value);
|
this.updatePaymentField('personName', e.target.value);
|
||||||
|
if (this.state.payment.invoiceType === "Individual") {
|
||||||
|
this.updatePaymentField('invoiceTitle', e.target.value);
|
||||||
|
this.updatePaymentField('invoiceTaxId', "");
|
||||||
|
}
|
||||||
}} />
|
}} />
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
@ -210,12 +216,33 @@ class PaymentEditPage extends React.Component {
|
|||||||
}} />
|
}} />
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
<Row style={{marginTop: '20px'}} >
|
||||||
|
<Col style={{marginTop: '5px'}} span={(Setting.isMobile()) ? 22 : 2}>
|
||||||
|
{Setting.getLabel(i18next.t("payment:Invoice type"), i18next.t("payment:Invoice type - Tooltip"))} :
|
||||||
|
</Col>
|
||||||
|
<Col span={22} >
|
||||||
|
<Select virtual={false} style={{width: '100%'}} value={this.state.payment.invoiceType} onChange={(value => {
|
||||||
|
this.updatePaymentField('invoiceType', value);
|
||||||
|
if (value === "Individual") {
|
||||||
|
this.updatePaymentField('invoiceTitle', this.state.payment.personName);
|
||||||
|
this.updatePaymentField('invoiceTaxId', "");
|
||||||
|
}
|
||||||
|
})}>
|
||||||
|
{
|
||||||
|
[
|
||||||
|
{id: 'Individual', name: i18next.t("payment:Individual")},
|
||||||
|
{id: 'Organization', name: i18next.t("payment:Organization")},
|
||||||
|
].map((item, index) => <Option key={index} value={item.id}>{item.name}</Option>)
|
||||||
|
}
|
||||||
|
</Select>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
<Row style={{marginTop: '20px'}} >
|
<Row style={{marginTop: '20px'}} >
|
||||||
<Col style={{marginTop: '5px'}} span={(Setting.isMobile()) ? 22 : 2}>
|
<Col style={{marginTop: '5px'}} span={(Setting.isMobile()) ? 22 : 2}>
|
||||||
{Setting.getLabel(i18next.t("payment:Invoice title"), i18next.t("payment:Invoice title - Tooltip"))} :
|
{Setting.getLabel(i18next.t("payment:Invoice title"), i18next.t("payment:Invoice title - Tooltip"))} :
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={22} >
|
<Col span={22} >
|
||||||
<Input value={this.state.payment.invoiceTitle} onChange={e => {
|
<Input disabled={this.state.payment.invoiceType === "Individual"} value={this.state.payment.invoiceTitle} onChange={e => {
|
||||||
this.updatePaymentField('invoiceTitle', e.target.value);
|
this.updatePaymentField('invoiceTitle', e.target.value);
|
||||||
}} />
|
}} />
|
||||||
</Col>
|
</Col>
|
||||||
@ -225,7 +252,7 @@ class PaymentEditPage extends React.Component {
|
|||||||
{Setting.getLabel(i18next.t("payment:Invoice Tax ID"), i18next.t("payment:Invoice Tax ID - Tooltip"))} :
|
{Setting.getLabel(i18next.t("payment:Invoice Tax ID"), i18next.t("payment:Invoice Tax ID - Tooltip"))} :
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={22} >
|
<Col span={22} >
|
||||||
<Input value={this.state.payment.invoiceTaxId} onChange={e => {
|
<Input disabled={this.state.payment.invoiceType === "Individual"} value={this.state.payment.invoiceTaxId} onChange={e => {
|
||||||
this.updatePaymentField('invoiceTaxId', e.target.value);
|
this.updatePaymentField('invoiceTaxId', e.target.value);
|
||||||
}} />
|
}} />
|
||||||
</Col>
|
</Col>
|
||||||
|
@ -261,15 +261,19 @@
|
|||||||
"Currency": "Currency",
|
"Currency": "Currency",
|
||||||
"Currency - Tooltip": "Currency - Tooltip",
|
"Currency - Tooltip": "Currency - Tooltip",
|
||||||
"Edit Payment": "Edit Payment",
|
"Edit Payment": "Edit Payment",
|
||||||
|
"Individual": "Individual",
|
||||||
"Invoice Tax ID": "Invoice Tax ID",
|
"Invoice Tax ID": "Invoice Tax ID",
|
||||||
"Invoice Tax ID - Tooltip": "Invoice Tax ID - Tooltip",
|
"Invoice Tax ID - Tooltip": "Invoice Tax ID - Tooltip",
|
||||||
"Invoice remark": "Invoice remark",
|
"Invoice remark": "Invoice remark",
|
||||||
"Invoice remark - Tooltip": "Invoice remark - Tooltip",
|
"Invoice remark - Tooltip": "Invoice remark - Tooltip",
|
||||||
"Invoice title": "Invoice title",
|
"Invoice title": "Invoice title",
|
||||||
"Invoice title - Tooltip": "Invoice title - Tooltip",
|
"Invoice title - Tooltip": "Invoice title - Tooltip",
|
||||||
|
"Invoice type": "Invoice type",
|
||||||
|
"Invoice type - Tooltip": "Invoice type - Tooltip",
|
||||||
"Message": "Message",
|
"Message": "Message",
|
||||||
"Message - Tooltip": "Message - Tooltip",
|
"Message - Tooltip": "Message - Tooltip",
|
||||||
"New Payment": "New Payment",
|
"New Payment": "New Payment",
|
||||||
|
"Organization": "Organization",
|
||||||
"Person Email": "Person Email",
|
"Person Email": "Person Email",
|
||||||
"Person Email - Tooltip": "Person Email - Tooltip",
|
"Person Email - Tooltip": "Person Email - Tooltip",
|
||||||
"Person ID card": "Person ID card",
|
"Person ID card": "Person ID card",
|
||||||
|
@ -261,15 +261,19 @@
|
|||||||
"Currency": "Currency",
|
"Currency": "Currency",
|
||||||
"Currency - Tooltip": "Currency - Tooltip",
|
"Currency - Tooltip": "Currency - Tooltip",
|
||||||
"Edit Payment": "Edit Payment",
|
"Edit Payment": "Edit Payment",
|
||||||
|
"Individual": "Individual",
|
||||||
"Invoice Tax ID": "Invoice Tax ID",
|
"Invoice Tax ID": "Invoice Tax ID",
|
||||||
"Invoice Tax ID - Tooltip": "Invoice Tax ID - Tooltip",
|
"Invoice Tax ID - Tooltip": "Invoice Tax ID - Tooltip",
|
||||||
"Invoice remark": "Invoice remark",
|
"Invoice remark": "Invoice remark",
|
||||||
"Invoice remark - Tooltip": "Invoice remark - Tooltip",
|
"Invoice remark - Tooltip": "Invoice remark - Tooltip",
|
||||||
"Invoice title": "Invoice title",
|
"Invoice title": "Invoice title",
|
||||||
"Invoice title - Tooltip": "Invoice title - Tooltip",
|
"Invoice title - Tooltip": "Invoice title - Tooltip",
|
||||||
|
"Invoice type": "Invoice type",
|
||||||
|
"Invoice type - Tooltip": "Invoice type - Tooltip",
|
||||||
"Message": "Message",
|
"Message": "Message",
|
||||||
"Message - Tooltip": "Message - Tooltip",
|
"Message - Tooltip": "Message - Tooltip",
|
||||||
"New Payment": "New Payment",
|
"New Payment": "New Payment",
|
||||||
|
"Organization": "Organization",
|
||||||
"Person Email": "Person Email",
|
"Person Email": "Person Email",
|
||||||
"Person Email - Tooltip": "Person Email - Tooltip",
|
"Person Email - Tooltip": "Person Email - Tooltip",
|
||||||
"Person ID card": "Person ID card",
|
"Person ID card": "Person ID card",
|
||||||
|
@ -261,15 +261,19 @@
|
|||||||
"Currency": "Currency",
|
"Currency": "Currency",
|
||||||
"Currency - Tooltip": "Currency - Tooltip",
|
"Currency - Tooltip": "Currency - Tooltip",
|
||||||
"Edit Payment": "Edit Payment",
|
"Edit Payment": "Edit Payment",
|
||||||
|
"Individual": "Individual",
|
||||||
"Invoice Tax ID": "Invoice Tax ID",
|
"Invoice Tax ID": "Invoice Tax ID",
|
||||||
"Invoice Tax ID - Tooltip": "Invoice Tax ID - Tooltip",
|
"Invoice Tax ID - Tooltip": "Invoice Tax ID - Tooltip",
|
||||||
"Invoice remark": "Invoice remark",
|
"Invoice remark": "Invoice remark",
|
||||||
"Invoice remark - Tooltip": "Invoice remark - Tooltip",
|
"Invoice remark - Tooltip": "Invoice remark - Tooltip",
|
||||||
"Invoice title": "Invoice title",
|
"Invoice title": "Invoice title",
|
||||||
"Invoice title - Tooltip": "Invoice title - Tooltip",
|
"Invoice title - Tooltip": "Invoice title - Tooltip",
|
||||||
|
"Invoice type": "Invoice type",
|
||||||
|
"Invoice type - Tooltip": "Invoice type - Tooltip",
|
||||||
"Message": "Message",
|
"Message": "Message",
|
||||||
"Message - Tooltip": "Message - Tooltip",
|
"Message - Tooltip": "Message - Tooltip",
|
||||||
"New Payment": "New Payment",
|
"New Payment": "New Payment",
|
||||||
|
"Organization": "Organization",
|
||||||
"Person Email": "Person Email",
|
"Person Email": "Person Email",
|
||||||
"Person Email - Tooltip": "Person Email - Tooltip",
|
"Person Email - Tooltip": "Person Email - Tooltip",
|
||||||
"Person ID card": "Person ID card",
|
"Person ID card": "Person ID card",
|
||||||
|
@ -261,15 +261,19 @@
|
|||||||
"Currency": "Currency",
|
"Currency": "Currency",
|
||||||
"Currency - Tooltip": "Currency - Tooltip",
|
"Currency - Tooltip": "Currency - Tooltip",
|
||||||
"Edit Payment": "Edit Payment",
|
"Edit Payment": "Edit Payment",
|
||||||
|
"Individual": "Individual",
|
||||||
"Invoice Tax ID": "Invoice Tax ID",
|
"Invoice Tax ID": "Invoice Tax ID",
|
||||||
"Invoice Tax ID - Tooltip": "Invoice Tax ID - Tooltip",
|
"Invoice Tax ID - Tooltip": "Invoice Tax ID - Tooltip",
|
||||||
"Invoice remark": "Invoice remark",
|
"Invoice remark": "Invoice remark",
|
||||||
"Invoice remark - Tooltip": "Invoice remark - Tooltip",
|
"Invoice remark - Tooltip": "Invoice remark - Tooltip",
|
||||||
"Invoice title": "Invoice title",
|
"Invoice title": "Invoice title",
|
||||||
"Invoice title - Tooltip": "Invoice title - Tooltip",
|
"Invoice title - Tooltip": "Invoice title - Tooltip",
|
||||||
|
"Invoice type": "Invoice type",
|
||||||
|
"Invoice type - Tooltip": "Invoice type - Tooltip",
|
||||||
"Message": "Message",
|
"Message": "Message",
|
||||||
"Message - Tooltip": "Message - Tooltip",
|
"Message - Tooltip": "Message - Tooltip",
|
||||||
"New Payment": "New Payment",
|
"New Payment": "New Payment",
|
||||||
|
"Organization": "Organization",
|
||||||
"Person Email": "Person Email",
|
"Person Email": "Person Email",
|
||||||
"Person Email - Tooltip": "Person Email - Tooltip",
|
"Person Email - Tooltip": "Person Email - Tooltip",
|
||||||
"Person ID card": "Person ID card",
|
"Person ID card": "Person ID card",
|
||||||
|
@ -261,15 +261,19 @@
|
|||||||
"Currency": "Currency",
|
"Currency": "Currency",
|
||||||
"Currency - Tooltip": "Currency - Tooltip",
|
"Currency - Tooltip": "Currency - Tooltip",
|
||||||
"Edit Payment": "Edit Payment",
|
"Edit Payment": "Edit Payment",
|
||||||
|
"Individual": "Individual",
|
||||||
"Invoice Tax ID": "Invoice Tax ID",
|
"Invoice Tax ID": "Invoice Tax ID",
|
||||||
"Invoice Tax ID - Tooltip": "Invoice Tax ID - Tooltip",
|
"Invoice Tax ID - Tooltip": "Invoice Tax ID - Tooltip",
|
||||||
"Invoice remark": "Invoice remark",
|
"Invoice remark": "Invoice remark",
|
||||||
"Invoice remark - Tooltip": "Invoice remark - Tooltip",
|
"Invoice remark - Tooltip": "Invoice remark - Tooltip",
|
||||||
"Invoice title": "Invoice title",
|
"Invoice title": "Invoice title",
|
||||||
"Invoice title - Tooltip": "Invoice title - Tooltip",
|
"Invoice title - Tooltip": "Invoice title - Tooltip",
|
||||||
|
"Invoice type": "Invoice type",
|
||||||
|
"Invoice type - Tooltip": "Invoice type - Tooltip",
|
||||||
"Message": "Message",
|
"Message": "Message",
|
||||||
"Message - Tooltip": "Message - Tooltip",
|
"Message - Tooltip": "Message - Tooltip",
|
||||||
"New Payment": "New Payment",
|
"New Payment": "New Payment",
|
||||||
|
"Organization": "Organization",
|
||||||
"Person Email": "Person Email",
|
"Person Email": "Person Email",
|
||||||
"Person Email - Tooltip": "Person Email - Tooltip",
|
"Person Email - Tooltip": "Person Email - Tooltip",
|
||||||
"Person ID card": "Person ID card",
|
"Person ID card": "Person ID card",
|
||||||
|
@ -261,15 +261,19 @@
|
|||||||
"Currency": "Currency",
|
"Currency": "Currency",
|
||||||
"Currency - Tooltip": "Currency - Tooltip",
|
"Currency - Tooltip": "Currency - Tooltip",
|
||||||
"Edit Payment": "Edit Payment",
|
"Edit Payment": "Edit Payment",
|
||||||
|
"Individual": "Individual",
|
||||||
"Invoice Tax ID": "Invoice Tax ID",
|
"Invoice Tax ID": "Invoice Tax ID",
|
||||||
"Invoice Tax ID - Tooltip": "Invoice Tax ID - Tooltip",
|
"Invoice Tax ID - Tooltip": "Invoice Tax ID - Tooltip",
|
||||||
"Invoice remark": "Invoice remark",
|
"Invoice remark": "Invoice remark",
|
||||||
"Invoice remark - Tooltip": "Invoice remark - Tooltip",
|
"Invoice remark - Tooltip": "Invoice remark - Tooltip",
|
||||||
"Invoice title": "Invoice title",
|
"Invoice title": "Invoice title",
|
||||||
"Invoice title - Tooltip": "Invoice title - Tooltip",
|
"Invoice title - Tooltip": "Invoice title - Tooltip",
|
||||||
|
"Invoice type": "Invoice type",
|
||||||
|
"Invoice type - Tooltip": "Invoice type - Tooltip",
|
||||||
"Message": "Message",
|
"Message": "Message",
|
||||||
"Message - Tooltip": "Message - Tooltip",
|
"Message - Tooltip": "Message - Tooltip",
|
||||||
"New Payment": "New Payment",
|
"New Payment": "New Payment",
|
||||||
|
"Organization": "Organization",
|
||||||
"Person Email": "Person Email",
|
"Person Email": "Person Email",
|
||||||
"Person Email - Tooltip": "Person Email - Tooltip",
|
"Person Email - Tooltip": "Person Email - Tooltip",
|
||||||
"Person ID card": "Person ID card",
|
"Person ID card": "Person ID card",
|
||||||
|
@ -261,15 +261,19 @@
|
|||||||
"Currency": "币种",
|
"Currency": "币种",
|
||||||
"Currency - Tooltip": "如USD(美元),CNY(人民币)等",
|
"Currency - Tooltip": "如USD(美元),CNY(人民币)等",
|
||||||
"Edit Payment": "编辑付款",
|
"Edit Payment": "编辑付款",
|
||||||
|
"Individual": "个人",
|
||||||
"Invoice Tax ID": "纳税人识别号",
|
"Invoice Tax ID": "纳税人识别号",
|
||||||
"Invoice Tax ID - Tooltip": "开票类型为单位时,必须输入单位纳税人识别号;开票类型为个人时,不需要填写",
|
"Invoice Tax ID - Tooltip": "开票类型为单位时,必须输入单位纳税人识别号;开票类型为个人时,不需要填写",
|
||||||
"Invoice remark": "发票备注",
|
"Invoice remark": "发票备注",
|
||||||
"Invoice remark - Tooltip": "备注不超过50个字",
|
"Invoice remark - Tooltip": "备注不超过50个字",
|
||||||
"Invoice title": "发票抬头",
|
"Invoice title": "发票抬头",
|
||||||
"Invoice title - Tooltip": "开票类型为单位时,发票抬头可输入单位名称;开票类型为个人时,系统自动填写为缴费人姓名",
|
"Invoice title - Tooltip": "开票类型为单位时,发票抬头可输入单位名称;开票类型为个人时,系统自动填写为缴费人姓名",
|
||||||
|
"Invoice type": "开票类型",
|
||||||
|
"Invoice type - Tooltip": "开票类型可以为个人或者单位",
|
||||||
"Message": "消息",
|
"Message": "消息",
|
||||||
"Message - Tooltip": "付款处理结果消息",
|
"Message - Tooltip": "付款处理结果消息",
|
||||||
"New Payment": "添加付款",
|
"New Payment": "添加付款",
|
||||||
|
"Organization": "单位",
|
||||||
"Person Email": "缴费人电子邮箱",
|
"Person Email": "缴费人电子邮箱",
|
||||||
"Person Email - Tooltip": "缴费人本人的电子邮箱",
|
"Person Email - Tooltip": "缴费人本人的电子邮箱",
|
||||||
"Person ID card": "缴费人身份证号",
|
"Person ID card": "缴费人身份证号",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user