Merge branch 'main' of github.com:hainatravel/GHHub

release
YCC 2 years ago
commit bd1b8340ec

@ -182,12 +182,11 @@ 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"
@ -195,7 +194,8 @@ function Detail() {
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>
@ -207,7 +207,13 @@ function Detail() {
<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
placeholder="Select Currency type"
allowClear
options={bindCurrency()}
value={data.GMD_Currency}
>
</Select>
</Col> </Col>
<Col span={8}> <Col span={8}>
<Input addonBefore="Due Dat:" value={data.GMD_PayDate} /> <Input addonBefore="Due Dat:" value={data.GMD_PayDate} />
@ -216,15 +222,17 @@ function Detail() {
{addButton(index + 1 == invoiceZDDetail.length)} {addButton(index + 1 == invoiceZDDetail.length)}
</Col> </Col>
<Col span={4}></Col> <Col span={4}></Col>
</Row> </Row>
);
)
} else { } else {
// //
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} >
<Form name="invoice_submit" onFinish={onFinish} labelCol={{ span: 5 }} form={form} style={{ backgroundColor: "#fff", padding: "20px" }}> <Form name="invoice_submit" onFinish={onFinish} labelCol={{ span: 5 }} form={form} style={{backgroundColor:"#fff" , padding:"20px"}}>
<Divider orientation="left">Invoice {index + 1}</Divider> <Divider orientation="left">Invoice {index + 1}</Divider>
<Form.Item> <Form.Item>
<Upload <Upload
@ -244,9 +252,8 @@ function Detail() {
</Form.Item> </Form.Item>
<Divider orientation="left">Details</Divider> <Divider orientation="left">Details</Divider>
<Row gutter={16}> <Row gutter={16}>
<Col span={8}>
{" "} <Col span={8}> <Form.Item
<Form.Item
name="info_money" name="info_money"
label="Amount" label="Amount"
rules={[ rules={[
@ -254,12 +261,11 @@ function Detail() {
required: true, required: true,
message: "Please input your money!", message: "Please input your money!",
}, },
]}> ]}
>
<Input /> <Input />
</Form.Item> </Form.Item></Col>
</Col> <Col span={8}><Form.Item
<Col span={8}>
<Form.Item
name="info_Currency" name="info_Currency"
label="Currency" label="Currency"
rules={[ rules={[
@ -267,17 +273,29 @@ function Detail() {
required: true, required: true,
message: "Please select Currency type!", message: "Please select Currency type!",
}, },
]}> ]}
<Select placeholder="Select Currency type" onChange={onCurrencyChange} allowClear options={bindCurrency()}></Select> >
</Form.Item> <Select
</Col> placeholder="Select Currency type"
onChange={onCurrencyChange}
allowClear
options={bindCurrency()}
>
</Select>
</Form.Item></Col>
<Col span={8}> <Col span={8}>
<Form.Item name="info_date" label="Due Date: "> <Form.Item
name="info_date"
label="Due Date: "
>
<DatePicker /> <DatePicker />
</Form.Item> </Form.Item></Col>
</Col>
</Row> </Row>
<Form.Item name="info_gmdsn" hidden={true}> <Form.Item
name="info_gmdsn"
hidden={true}
>
<input /> <input />
</Form.Item> </Form.Item>
<Form.Item> <Form.Item>
@ -285,25 +303,32 @@ function Detail() {
Submit Submit
</Button> </Button>
</Form.Item> </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> </Form>
</Col> </Col>
<Col span={4}></Col> <Col span={4}></Col>
</Row> </Row>
); )
} }
});
})
return submitForm; return submitForm;
} }
return ( return (
<> <>
<Space direction="vertical" style={{ width: "100%" }}> <Space direction="vertical" style={{ width: "100%" }}>
<Row gutter={16}> <Row gutter={16}>
<Col span={20}> <Col span={20}>
<Title level={4}>Reference Number: {invoiceGroupInfo.VGroupInfo}</Title> <Title level={4}>Reference Number: {invoiceGroupInfo.VGroupInfo}</Title>
</Col> </Col>
<Col span={4}> <Col span={4}>
<NavLink to="/invoice">Back</NavLink> <Button type="link" onClick={() => navigate("/invoice")}>
Back
</Button>
</Col> </Col>
</Row> </Row>
<Title level={5}></Title> <Title level={5}></Title>
@ -311,6 +336,10 @@ function Detail() {
</Space> </Space>
</> </>
); );
} }
export default observer(Detail); export default observer(Detail);

Loading…
Cancel
Save