|
|
@ -179,138 +179,167 @@ function Detail() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//循环生成多次报账信息
|
|
|
|
//循环生成多次报账信息
|
|
|
|
function bindSubmitForm() {
|
|
|
|
function bindSubmitForm() {
|
|
|
|
let submitForm = invoiceZDDetail.map((data, index) => {
|
|
|
|
let submitForm = invoiceZDDetail.map((data, index) => {
|
|
|
|
if (data.GMD_Dealed) {
|
|
|
|
if (data.GMD_Dealed) { //已审核的直接显示信息即可,无需表单
|
|
|
|
//已审核的直接显示信息即可,无需表单
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<Row key={data.GMD_SN} gutter={16} style={{ backgroundColor: "#f6f7f9", width: "100%", padding: "20px 40px" }} >
|
|
|
|
<Row key={data.GMD_SN} gutter={16} style={{ backgroundColor: "#f6f7f9", width: "100%", padding: "20px 40px" }}>
|
|
|
|
<Col span={4}></Col>
|
|
|
|
<Col span={4}></Col>
|
|
|
|
<Col span={18} >
|
|
|
|
<Col span={18}>
|
|
|
|
<Divider orientation="left">Invoice {index + 1}</Divider>
|
|
|
|
<Divider orientation="left">Invoice {index + 1}</Divider>
|
|
|
|
<Upload
|
|
|
|
<Upload
|
|
|
|
name="ghhfile"
|
|
|
|
name="ghhfile"
|
|
|
|
accept="image/*"
|
|
|
|
accept="image/*"
|
|
|
|
multiple={true}
|
|
|
|
multiple={true}
|
|
|
|
action={config.HT_HOST + `/service-fileServer/FileUpload?GRI_SN=${GSN}&VEI_SN=${authStore.login.travelAgencyId}&FilePathName=invoice&token=${authStore.login.token}`}
|
|
|
|
action={config.HT_HOST + `/service-fileServer/FileUpload?GRI_SN=${GSN}&VEI_SN=${authStore.login.travelAgencyId}&FilePathName=invoice&token=${authStore.login.token}`}
|
|
|
|
fileList={invoicePicList[index]}
|
|
|
|
fileList={invoicePicList[index]}
|
|
|
|
listType="picture-card"
|
|
|
|
listType="picture-card">
|
|
|
|
>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<PlusOutlined />
|
|
|
|
<PlusOutlined />
|
|
|
|
<div style={{ marginTop: 8 }}>Click to Upload</div>
|
|
|
|
<div style={{ marginTop: 8 }}>Click to Upload</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</Upload>
|
|
|
|
</Upload>
|
|
|
|
<Divider orientation="left">Details</Divider>
|
|
|
|
<Divider orientation="left">Details</Divider>
|
|
|
|
<Row gutter={16}>
|
|
|
|
<Row gutter={16}>
|
|
|
|
<Col span={8}>
|
|
|
|
<Col span={8}>
|
|
|
|
<Input addonBefore="Amount:" value={data.GMD_Cost} />
|
|
|
|
<Input addonBefore="Amount:" value={data.GMD_Cost} />
|
|
|
|
</Col>
|
|
|
|
</Col>
|
|
|
|
<Col span={8}>
|
|
|
|
<Col span={8}>
|
|
|
|
Currency: <Select placeholder="Select Currency type" allowClear options={bindCurrency()} value={data.GMD_Currency}></Select>
|
|
|
|
Currency: <Select
|
|
|
|
</Col>
|
|
|
|
placeholder="Select Currency type"
|
|
|
|
<Col span={8}>
|
|
|
|
allowClear
|
|
|
|
<Input addonBefore="Due Dat:" value={data.GMD_PayDate} />
|
|
|
|
options={bindCurrency()}
|
|
|
|
</Col>
|
|
|
|
value={data.GMD_Currency}
|
|
|
|
</Row>
|
|
|
|
>
|
|
|
|
{addButton(index + 1 == invoiceZDDetail.length)}
|
|
|
|
</Select>
|
|
|
|
</Col>
|
|
|
|
</Col>
|
|
|
|
<Col span={4}></Col>
|
|
|
|
<Col span={8}>
|
|
|
|
</Row>
|
|
|
|
<Input addonBefore="Due Dat:" value={data.GMD_PayDate} />
|
|
|
|
);
|
|
|
|
</Col>
|
|
|
|
} else {
|
|
|
|
</Row>
|
|
|
|
// 一个团只能有一个未审核的账单记录
|
|
|
|
{addButton(index + 1 == invoiceZDDetail.length)}
|
|
|
|
return (
|
|
|
|
</Col>
|
|
|
|
<Row key={data.GMD_SN} gutter={16} style={{ backgroundColor: "#f6f7f9", width: "100%", padding: "20px 40px" }}>
|
|
|
|
<Col span={4}></Col>
|
|
|
|
<Col span={4}></Col>
|
|
|
|
|
|
|
|
<Col span={18}>
|
|
|
|
</Row>
|
|
|
|
<Form name="invoice_submit" onFinish={onFinish} labelCol={{ span: 5 }} form={form} style={{ backgroundColor: "#fff", padding: "20px" }}>
|
|
|
|
|
|
|
|
<Divider orientation="left">Invoice {index + 1}</Divider>
|
|
|
|
)
|
|
|
|
<Form.Item>
|
|
|
|
} else {
|
|
|
|
<Upload
|
|
|
|
// 一个团只能有一个未审核的账单记录
|
|
|
|
name="ghhfile"
|
|
|
|
return (
|
|
|
|
accept="image/*"
|
|
|
|
<Row key={data.GMD_SN} gutter={16} style={{ backgroundColor: "#f6f7f9", width: "100%", padding: "20px 40px" }} >
|
|
|
|
multiple={true}
|
|
|
|
<Col span={4}></Col>
|
|
|
|
action={config.HT_HOST + `/service-fileServer/FileUpload?GRI_SN=${GSN}&VEI_SN=${authStore.login.travelAgencyId}&FilePathName=invoice&token=${authStore.login.token}`}
|
|
|
|
<Col span={18} >
|
|
|
|
fileList={fileList}
|
|
|
|
<Form name="invoice_submit" onFinish={onFinish} labelCol={{ span: 5 }} form={form} style={{backgroundColor:"#fff" , padding:"20px"}}>
|
|
|
|
listType="picture-card"
|
|
|
|
<Divider orientation="left">Invoice {index + 1}</Divider>
|
|
|
|
onChange={handleChange}
|
|
|
|
<Form.Item>
|
|
|
|
onRemove={handRemove}>
|
|
|
|
<Upload
|
|
|
|
<div>
|
|
|
|
name="ghhfile"
|
|
|
|
<PlusOutlined />
|
|
|
|
accept="image/*"
|
|
|
|
<div style={{ marginTop: 8 }}>Click to Upload</div>
|
|
|
|
multiple={true}
|
|
|
|
</div>
|
|
|
|
action={config.HT_HOST + `/service-fileServer/FileUpload?GRI_SN=${GSN}&VEI_SN=${authStore.login.travelAgencyId}&FilePathName=invoice&token=${authStore.login.token}`}
|
|
|
|
</Upload>
|
|
|
|
fileList={fileList}
|
|
|
|
</Form.Item>
|
|
|
|
listType="picture-card"
|
|
|
|
<Divider orientation="left">Details</Divider>
|
|
|
|
onChange={handleChange}
|
|
|
|
<Row gutter={16}>
|
|
|
|
onRemove={handRemove}>
|
|
|
|
<Col span={8}>
|
|
|
|
<div>
|
|
|
|
{" "}
|
|
|
|
<PlusOutlined />
|
|
|
|
<Form.Item
|
|
|
|
<div style={{ marginTop: 8 }}>Click to Upload</div>
|
|
|
|
name="info_money"
|
|
|
|
</div>
|
|
|
|
label="Amount:"
|
|
|
|
</Upload>
|
|
|
|
rules={[
|
|
|
|
</Form.Item>
|
|
|
|
{
|
|
|
|
<Divider orientation="left">Details</Divider>
|
|
|
|
required: true,
|
|
|
|
<Row gutter={16}>
|
|
|
|
message: "Please input your money!",
|
|
|
|
|
|
|
|
},
|
|
|
|
<Col span={8}> <Form.Item
|
|
|
|
]}>
|
|
|
|
name="info_money"
|
|
|
|
<Input />
|
|
|
|
label="Amount:"
|
|
|
|
</Form.Item>
|
|
|
|
rules={[
|
|
|
|
</Col>
|
|
|
|
{
|
|
|
|
<Col span={8}>
|
|
|
|
required: true,
|
|
|
|
<Form.Item
|
|
|
|
message: "Please input your money!",
|
|
|
|
name="info_Currency"
|
|
|
|
},
|
|
|
|
label="Currency:"
|
|
|
|
]}
|
|
|
|
rules={[
|
|
|
|
>
|
|
|
|
{
|
|
|
|
<Input />
|
|
|
|
required: true,
|
|
|
|
</Form.Item></Col>
|
|
|
|
message: "Please select Currency type!",
|
|
|
|
<Col span={8}><Form.Item
|
|
|
|
},
|
|
|
|
name="info_Currency"
|
|
|
|
]}>
|
|
|
|
label="Currency:"
|
|
|
|
<Select placeholder="Select Currency type" onChange={onCurrencyChange} allowClear options={bindCurrency()}></Select>
|
|
|
|
rules={[
|
|
|
|
</Form.Item>
|
|
|
|
{
|
|
|
|
</Col>
|
|
|
|
required: true,
|
|
|
|
<Col span={8}>
|
|
|
|
message: "Please select Currency type!",
|
|
|
|
<Form.Item name="info_date" label="Due Date: ">
|
|
|
|
},
|
|
|
|
<DatePicker />
|
|
|
|
]}
|
|
|
|
</Form.Item>
|
|
|
|
>
|
|
|
|
</Col>
|
|
|
|
<Select
|
|
|
|
</Row>
|
|
|
|
placeholder="Select Currency type"
|
|
|
|
<Form.Item name="info_gmdsn" hidden={true}>
|
|
|
|
onChange={onCurrencyChange}
|
|
|
|
<input />
|
|
|
|
allowClear
|
|
|
|
</Form.Item>
|
|
|
|
options={bindCurrency()}
|
|
|
|
<Form.Item>
|
|
|
|
>
|
|
|
|
<Button type="primary" htmlType="submit">
|
|
|
|
</Select>
|
|
|
|
Submit
|
|
|
|
</Form.Item></Col>
|
|
|
|
</Button>
|
|
|
|
<Col span={8}>
|
|
|
|
</Form.Item>
|
|
|
|
<Form.Item
|
|
|
|
</Form>
|
|
|
|
name="info_date"
|
|
|
|
</Col>
|
|
|
|
label="Due Date: "
|
|
|
|
<Col span={4}></Col>
|
|
|
|
>
|
|
|
|
</Row>
|
|
|
|
<DatePicker />
|
|
|
|
);
|
|
|
|
</Form.Item></Col>
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
</Row>
|
|
|
|
return submitForm;
|
|
|
|
<Form.Item
|
|
|
|
}
|
|
|
|
name="info_gmdsn"
|
|
|
|
|
|
|
|
hidden={true}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<input />
|
|
|
|
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
<Form.Item>
|
|
|
|
|
|
|
|
<Button type="primary" htmlType="submit">
|
|
|
|
|
|
|
|
Submit
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
<p>Our Finance Dept makes payment during the last week in each month. So due date can only the last day of each month. If there's urgent payment, please contact the travel advisor and send invoice separately.</p>
|
|
|
|
|
|
|
|
</Form>
|
|
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
|
|
<Col span={4}></Col>
|
|
|
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return submitForm;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
<>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Space direction="vertical" style={{ width: "100%" }}>
|
|
|
|
|
|
|
|
<Row gutter={16}>
|
|
|
|
|
|
|
|
<Col span={20}>
|
|
|
|
|
|
|
|
<Title level={4}>Reference Number: {invoiceGroupInfo.VGroupInfo}</Title>
|
|
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
|
|
<Col span={4}>
|
|
|
|
|
|
|
|
<Button type="link" onClick={() => navigate("/invoice")}>
|
|
|
|
|
|
|
|
Back
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
<Title level={5}></Title>
|
|
|
|
|
|
|
|
{bindSubmitForm()}
|
|
|
|
|
|
|
|
</Space>
|
|
|
|
|
|
|
|
</>
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
<>
|
|
|
|
|
|
|
|
<Space direction="vertical" style={{ width: "100%" }}>
|
|
|
|
|
|
|
|
<Row gutter={16}>
|
|
|
|
|
|
|
|
<Col span={20}>
|
|
|
|
|
|
|
|
<Title level={4}>Reference Number: {invoiceGroupInfo.VGroupInfo}</Title>
|
|
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
|
|
<Col span={4}>
|
|
|
|
|
|
|
|
<NavLink to="/invoice">Back</NavLink>
|
|
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
<Title level={5}></Title>
|
|
|
|
|
|
|
|
{bindSubmitForm()}
|
|
|
|
|
|
|
|
</Space>
|
|
|
|
|
|
|
|
</>
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export default observer(Detail);
|
|
|
|
export default observer(Detail);
|
|
|
|