Karlis 进行的变更
parent
45818588e9
commit
7c21780a92
|
@ -34,12 +34,12 @@ type Nullable<T> = T | undefined | null;
|
||||||
export class InvoiceSearchOption{
|
export class InvoiceSearchOption{
|
||||||
invoiceNo: Nullable<string>
|
invoiceNo: Nullable<string>
|
||||||
invoiceCode: Nullable<string>
|
invoiceCode: Nullable<string>
|
||||||
invoiceUploadTimeStart: Nullable<Date>
|
invoiceUploadTimeStart: Nullable<string>
|
||||||
invoiceUploadTimeEnd:Nullable<Date>
|
invoiceUploadTimeEnd:Nullable<string>
|
||||||
invoiceState:Nullable<number>
|
invoiceState:Nullable<number>
|
||||||
invoiceKind:Nullable<string>
|
invoiceKind:Nullable<string>
|
||||||
invoiceDateStart:Nullable<Date>
|
invoiceDateStart:Nullable<string>
|
||||||
invoiceDateEnd:Nullable<Date>
|
invoiceDateEnd:Nullable<string>
|
||||||
invoiceNote:Nullable<string>
|
invoiceNote:Nullable<string>
|
||||||
invoiceUploader:Nullable<string>
|
invoiceUploader:Nullable<string>
|
||||||
pageNum:number
|
pageNum:number
|
||||||
|
@ -75,16 +75,16 @@ export class InvoiceSearchOption{
|
||||||
|
|
||||||
toString(){
|
toString(){
|
||||||
let res="pageNum="+this.pageNum+"&pageSize="+this.pageSize
|
let res="pageNum="+this.pageNum+"&pageSize="+this.pageSize
|
||||||
res+=(this.invoiceNo===null||this.invoiceNo===""?"":("&invoiceNo="+this.invoiceNo));
|
res+=(this.invoiceNo===undefined||this.invoiceNo===null||this.invoiceNo===""?"":("&invoiceNo="+this.invoiceNo));
|
||||||
res+=(this.invoiceCode===null||this.invoiceCode===""?"":("&invoiceCode="+this.invoiceCode));
|
res+=(this.invoiceCode===undefined||this.invoiceCode===null||this.invoiceCode===""?"":("&invoiceCode="+this.invoiceCode));
|
||||||
res+=(this.invoiceUploadTimeStart===null?"":("&invoiceUploadTimeStart="+this.invoiceUploadTimeStart?.toDateString()));
|
res+=(this.invoiceUploadTimeStart===undefined||this.invoiceUploadTimeStart===null?"":("&invoiceUploadTimeStart="+this.invoiceUploadTimeStart));
|
||||||
res+=(this.invoiceUploadTimeEnd===null?"":("&invoiceUploadTimeEnd="+this.invoiceUploadTimeEnd?.toDateString()));
|
res+=(this.invoiceUploadTimeEnd===undefined||this.invoiceUploadTimeEnd===null?"":("&invoiceUploadTimeEnd="+this.invoiceUploadTimeEnd));
|
||||||
res+=(this.invoiceState===null?"":("&invoiceState="+this.invoiceState));
|
res+=(this.invoiceState===undefined||this.invoiceState===null?"":("&invoiceState="+this.invoiceState));
|
||||||
res+=(this.invoiceKind===null?"":("&invoiceKind="+this.invoiceKind));
|
res+=(this.invoiceKind===undefined||this.invoiceKind===null?"":("&invoiceKind="+this.invoiceKind));
|
||||||
res+=(this.invoiceDateStart===null?"":("&invoiceDateStart="+this.invoiceDateStart?.toDateString()));
|
res+=(this.invoiceDateStart===undefined||this.invoiceDateStart===null?"":("&invoiceDateStart="+this.invoiceDateStart));
|
||||||
res+=(this.invoiceDateEnd===null?"":("&invoiceDateEnd="+this.invoiceDateEnd?.toDateString()));
|
res+=(this.invoiceDateEnd===undefined||this.invoiceDateEnd===null?"":("&invoiceDateEnd="+this.invoiceDateEnd));
|
||||||
res+=(this.invoiceNote===null?"":("&invoiceNote="+this.invoiceNote));
|
res+=(this.invoiceNote===undefined||this.invoiceNote===null?"":("&invoiceNote="+this.invoiceNote));
|
||||||
res+=(this.invoiceUploader===null?"":("&invoiceUploader="+this.invoiceUploader));
|
res+=(this.invoiceUploader===undefined||this.invoiceUploader===null?"":("&invoiceUploader="+this.invoiceUploader));
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -53,8 +53,10 @@ class InvoiceSearch extends React.Component<any, any> {
|
||||||
console.log(this.state.invoiceSearchOption.toString())
|
console.log(this.state.invoiceSearchOption.toString())
|
||||||
if (this.state.activatedOption === "发票代码") {
|
if (this.state.activatedOption === "发票代码") {
|
||||||
this.state.invoiceSearchOption.invoiceCode = value;
|
this.state.invoiceSearchOption.invoiceCode = value;
|
||||||
|
this.state.invoiceSearchOption.invoiceNo = null;
|
||||||
} else {
|
} else {
|
||||||
this.state.invoiceSearchOption.invoiceNo = value;
|
this.state.invoiceSearchOption.invoiceNo = value;
|
||||||
|
this.state.invoiceSearchOption.invoiceCode = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const {handleSearchData} = this.props
|
const {handleSearchData} = this.props
|
||||||
|
@ -65,7 +67,7 @@ class InvoiceSearch extends React.Component<any, any> {
|
||||||
console.log(response.data)
|
console.log(response.data)
|
||||||
//console.log(this.state)
|
//console.log(this.state)
|
||||||
handleSearchData(response.data.records)
|
handleSearchData(response.data.records)
|
||||||
//dispatch(this.props.handleSearchData(response.data.records))
|
//dispatch(handleSearchData(response.data.records))
|
||||||
//models.commit('setStaff', response.data.data)
|
//models.commit('setStaff', response.data.data)
|
||||||
//navigate('/')
|
//navigate('/')
|
||||||
}).catch(function (error) {
|
}).catch(function (error) {
|
||||||
|
@ -100,8 +102,29 @@ class InvoiceSearch extends React.Component<any, any> {
|
||||||
</a>)
|
</a>)
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
const onValuesChange = (changedValues: any, allValues: any) => {
|
||||||
|
this.state.invoiceSearchOption.clear()
|
||||||
|
if (allValues['upload-time-picker'] !== null) {
|
||||||
|
this.state.invoiceSearchOption.invoiceUploadTimeStart = allValues['upload-time-picker'][0].format('YYYY-MM-DDtHH:mm:ss')
|
||||||
|
this.state.invoiceSearchOption.invoiceUploadTimeEnd = allValues['upload-time-picker'][1].format('YYYY-MM-DDtHH:mm:ss')
|
||||||
|
}
|
||||||
|
if (allValues['invoice-time-picker'] !== null) {
|
||||||
|
this.state.invoiceSearchOption.invoiceDateStart = allValues['invoice-time-picker'][0].format('YYYY-MM-DD')
|
||||||
|
this.state.invoiceSearchOption.invoiceDateEnd = allValues['invoice-time-picker'][1].format('YYYY-MM-DD')
|
||||||
|
}
|
||||||
|
if (allValues['invoice-state'] !== "全部") {
|
||||||
|
this.state.invoiceSearchOption.invoiceState = allValues['invoice-state']
|
||||||
|
}
|
||||||
|
if (allValues['invoice-kind'] !== "全部") {
|
||||||
|
this.state.invoiceSearchOption.invoiceKind = allValues['invoice-kind']
|
||||||
|
}
|
||||||
|
if (allValues['invoice-uploader'] !== null) {
|
||||||
|
this.state.invoiceSearchOption.invoiceUploader = allValues['invoice-uploader'].trim()
|
||||||
|
}
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<div className="simpleSearchBar" style={{display:"flex",justifyContent: "space-evenly"}}>
|
<div className="headBar">
|
||||||
|
<div className="simpleSearchBar" style={{display: "flex", justifyContent: "space-evenly"}}>
|
||||||
<Search className="simpleSearch"
|
<Search className="simpleSearch"
|
||||||
addonBefore={<Dropdown
|
addonBefore={<Dropdown
|
||||||
menu={{
|
menu={{
|
||||||
|
@ -113,20 +136,59 @@ class InvoiceSearch extends React.Component<any, any> {
|
||||||
<Typography.Link>
|
<Typography.Link>
|
||||||
<Space>
|
<Space>
|
||||||
{this.state.activatedOption}
|
{this.state.activatedOption}
|
||||||
<DownOutlined />
|
<DownOutlined/>
|
||||||
</Space>
|
</Space>
|
||||||
</Typography.Link>
|
</Typography.Link>
|
||||||
</Dropdown>}
|
</Dropdown>}
|
||||||
placeholder={this.state.searchContent}
|
placeholder={this.state.searchContent}
|
||||||
allowClear
|
allowClear
|
||||||
onSearch={(value)=>this.onSearch(value)}
|
onSearch={(value) => this.onSearch(value)}
|
||||||
style={{ width: 304 }}
|
style={{width: 304}}
|
||||||
enterButton
|
enterButton
|
||||||
/>
|
/>
|
||||||
<Button className="uploadButton" type="primary" icon={<UploadOutlined />} size="large">
|
<Button className="uploadButton" type="primary" icon={<UploadOutlined/>} size="large">
|
||||||
上传
|
上传
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="complexSearchBar" hidden={!this.state.complexEnabled} style={{display: "flex"}}>
|
||||||
|
<Form name="time_related_controls" {...formItemLayout} onValuesChange={onValuesChange}>
|
||||||
|
<Form.Item name="upload-time-picker" label="发票上传时间" {...rangeConfig}>
|
||||||
|
<RangePicker/>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item name="invoice-time-picker" label="发票开票日期" {...rangeConfig}>
|
||||||
|
<RangePicker/>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
name={`invoice-state`}
|
||||||
|
label={`发票状态`}
|
||||||
|
><Select defaultValue="全部">
|
||||||
|
<Option value="全部">全部</Option>
|
||||||
|
<Option value="0">未使用</Option>
|
||||||
|
<Option value="1">报销中</Option>
|
||||||
|
<Option value="2">已报销</Option>
|
||||||
|
</Select>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
name={`invoice-kind`}
|
||||||
|
label={`发票类型`}
|
||||||
|
><Select defaultValue="全部">
|
||||||
|
<Option value="全部">全部</Option>
|
||||||
|
<Option value="增值税普通发票">增值税普通发票</Option>
|
||||||
|
<Option value="增值税专用发票">增值税专用发票</Option>
|
||||||
|
<Option value="定额发票">定额发票</Option>
|
||||||
|
</Select>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
name={`invoice-uploader`}
|
||||||
|
label={`上传者`}
|
||||||
|
>
|
||||||
|
<Input placeholder="任意上传者"/>
|
||||||
|
</Form.Item>
|
||||||
|
</Form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue