diff --git a/src/models/Staff.ts b/src/models/Staff.ts index 0b25b2e..666fed7 100644 --- a/src/models/Staff.ts +++ b/src/models/Staff.ts @@ -95,8 +95,7 @@ export class InvoiceCommit { invoiceCheckCode:string invoiceRegionCode: Nullable invoiceSellerTaxCode:Nullable - - invoiceExtraInfo: [] + invoiceExtraInfo:Nullable|[] constructor() { this.invoiceFileName = "" this.invoiceNo = "" @@ -108,7 +107,7 @@ export class InvoiceCommit { this.invoiceCheckCode = "000000" this.invoiceRegionCode = null this.invoiceSellerTaxCode = null - this.invoiceExtraInfo = [] + this.invoiceExtraInfo = null } setValue(props: FormData) { console.log("1111"+props.toString()) diff --git a/src/pages/Invoice/mine/InvoiceUploadView.tsx b/src/pages/Invoice/mine/InvoiceUploadView.tsx index 06c8df4..00cec81 100644 --- a/src/pages/Invoice/mine/InvoiceUploadView.tsx +++ b/src/pages/Invoice/mine/InvoiceUploadView.tsx @@ -90,7 +90,7 @@ class InvoiceUploadView extends React.Component{ let data= new FormData(); data.append('invoiceFile',tempFile) axiosInstance({ - url: '/invoice/identify',//123131',//FIXME + url: 'common/invoice/identify', method: 'POST', data: data }).then(response => { @@ -103,7 +103,10 @@ class InvoiceUploadView extends React.Component{ result.invoiceCheckCode = response.data.invoiceCheckCode result.invoiceKind = response.data.invoiceKind result.invoiceFileName = response.data.invoiceFileName - result.invoiceExtraInfo = response.data.invoiceExtraInfo.toString() + result.invoiceExtraInfo = "" + for(let i=0;i{ this.setOpen(false); }; submit=()=>{ + let result=this.formRef.current!.getFieldsValue() + result.invoiceDate=result.invoiceDate.format("YYYY-MM-DD") + let extraInfo=[] + let line = result.invoiceExtraInfo.split('\n') + for(let i=0;i { + //TODO + console.log(response.data) + }).catch(function (error) { + console.log(error) + }) } render() { @@ -200,12 +224,12 @@ class InvoiceUploadView extends React.Component{ > - - - + {/**/} + {/* */} + {/**/}