修改样式

release
YCC 2 years ago
parent bd1b8340ec
commit b4ebb06c88

@ -177,6 +177,7 @@ class Invoice {
removeFeedbackImages(fileurl) { removeFeedbackImages(fileurl) {
let url = `/service-fileServer/FileDelete`; let url = `/service-fileServer/FileDelete`;
url += `?fileurl=${fileurl}`; url += `?fileurl=${fileurl}`;
url += `&token=${this.root.authStore.login.token}`;
return fetch(config.HT_HOST + url) return fetch(config.HT_HOST + url)
.then(response => response.json()) .then(response => response.json())
.then(json => { .then(json => {

@ -2,7 +2,7 @@ import { useParams, useNavigate, NavLink } from "react-router-dom";
import { useEffect, useState, useRef } from "react"; import { useEffect, useState, useRef } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { toJS, runInAction } from "mobx"; import { toJS, runInAction } from "mobx";
import { Row, Col, Space, Button, Typography, Card, Form, Upload, Input, Divider, DatePicker, Select, App, Modal } from "antd"; import { Row, Col, Space, Button, Typography, Card, Form, Upload, Input, Divider, DatePicker, Select, App, Descriptions } from "antd";
import { useStore } from "@/stores/StoreContext.js"; import { useStore } from "@/stores/StoreContext.js";
import { PlusOutlined } from "@ant-design/icons"; import { PlusOutlined } from "@ant-design/icons";
import { isNotEmpty } from "@/utils/commons"; import { isNotEmpty } from "@/utils/commons";
@ -182,7 +182,8 @@ 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>
@ -194,38 +195,18 @@ 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"></Upload>
> <Descriptions title={"Detail"}>
<div> <Descriptions.Item label="Amount">{data.GMD_Cost}</Descriptions.Item>
<PlusOutlined /> <Descriptions.Item label="Currency">{data.GMD_Currency}</Descriptions.Item>
<div style={{ marginTop: 8 }}>Click to Upload</div> <Descriptions.Item label="Due Dat">{data.GMD_PayDate}</Descriptions.Item>
</div> </Descriptions>
</Upload>
<Divider orientation="left">Details</Divider>
<Row gutter={16}>
<Col span={8}>
<Input addonBefore="Amount" value={data.GMD_Cost} />
</Col>
<Col span={8}>
Currency <Select
placeholder="Select Currency type"
allowClear
options={bindCurrency()}
value={data.GMD_Currency}
>
</Select>
</Col>
<Col span={8}>
<Input addonBefore="Due Dat:" value={data.GMD_PayDate} />
</Col>
</Row>
{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 (
@ -252,8 +233,9 @@ 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={[
@ -261,11 +243,12 @@ function Detail() {
required: true, required: true,
message: "Please input your money!", message: "Please input your money!",
}, },
]} ]}>
>
<Input /> <Input />
</Form.Item></Col> </Form.Item>
<Col span={8}><Form.Item </Col>
<Col span={8}>
<Form.Item
name="info_Currency" name="info_Currency"
label="Currency" label="Currency"
rules={[ rules={[
@ -273,29 +256,17 @@ function Detail() {
required: true, required: true,
message: "Please select Currency type!", message: "Please select Currency type!",
}, },
]} ]}>
> <Select placeholder="Select Currency type" onChange={onCurrencyChange} options={bindCurrency()}></Select>
<Select </Form.Item>
placeholder="Select Currency type" </Col>
onChange={onCurrencyChange}
allowClear
options={bindCurrency()}
>
</Select>
</Form.Item></Col>
<Col span={8}> <Col span={8}>
<Form.Item <Form.Item name="info_date" label="Due Date: ">
name="info_date"
label="Due Date: "
>
<DatePicker /> <DatePicker />
</Form.Item></Col> </Form.Item>
</Col>
</Row> </Row>
<Form.Item <Form.Item name="info_gmdsn" hidden={true}>
name="info_gmdsn"
hidden={true}
>
<input /> <input />
</Form.Item> </Form.Item>
<Form.Item> <Form.Item>
@ -303,23 +274,22 @@ 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> <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}>
@ -336,10 +306,6 @@ function Detail() {
</Space> </Space>
</> </>
); );
} }
export default observer(Detail); export default observer(Detail);

@ -100,7 +100,7 @@ function Index() {
</Row> </Row>
<Title level={3}></Title> <Title level={3}></Title>
<Row> <Row>
<Col span={24}> <Col md={24} lg={24} xxl={12}>
<Table bordered pagination={{ defaultPageSize: 20, showTotal: showTotal }} columns={invoiceListColumns} dataSource={toJS(invoiceList)} /> <Table bordered pagination={{ defaultPageSize: 20, showTotal: showTotal }} columns={invoiceListColumns} dataSource={toJS(invoiceList)} />
</Col> </Col>
</Row> </Row>

Loading…
Cancel
Save