|
|
|
@ -2,7 +2,7 @@ import { useParams, useNavigate } from "react-router-dom";
|
|
|
|
|
import { useEffect, useState } from "react";
|
|
|
|
|
import { observer } from "mobx-react";
|
|
|
|
|
import { toJS, runInAction } from "mobx";
|
|
|
|
|
import { Row, Col, Space, Button, Typography,Card,Form,Upload ,Input,Divider} from "antd";
|
|
|
|
|
import { Row, Col, Space, Button, Typography, Card, Form, Upload, Input, Divider, DatePicker, Select } from "antd";
|
|
|
|
|
import { useStore } from "@/stores/StoreContext.js";
|
|
|
|
|
import { PlusOutlined } from "@ant-design/icons";
|
|
|
|
|
import * as config from "@/config";
|
|
|
|
@ -12,9 +12,11 @@ function Detail() {
|
|
|
|
|
const navigate = useNavigate();
|
|
|
|
|
const { GMDSN, GSN } = useParams();
|
|
|
|
|
const { invoiceStore, authStore } = useStore();
|
|
|
|
|
const { invoicekImages ,invoiceGroupInfo,invocieProductList} = invoiceStore;
|
|
|
|
|
const { invoicekImages, invoiceGroupInfo, invocieProductList, invocieCurrencyList } = invoiceStore;
|
|
|
|
|
const [form] = Form.useForm();
|
|
|
|
|
const [dataLoading, setDataLoading] = useState(false);
|
|
|
|
|
const { formDate, onDateChange } = useState();
|
|
|
|
|
const { formCurrency, onCurrencyChange } = useState();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
@ -37,10 +39,12 @@ function Detail() {
|
|
|
|
|
|
|
|
|
|
const fileList = toJS(invoicekImages);
|
|
|
|
|
const onFinish = values => {
|
|
|
|
|
console.log("Success:", values);
|
|
|
|
|
if (values) {
|
|
|
|
|
alert(values);
|
|
|
|
|
const fieldVaule = {
|
|
|
|
|
...values,
|
|
|
|
|
'info_date': values['info_date'].format('YYYY-MM-DD'),
|
|
|
|
|
'info_images': fileList,
|
|
|
|
|
}
|
|
|
|
|
console.log("Success:", fieldVaule);
|
|
|
|
|
};
|
|
|
|
|
const handleChange = info => {
|
|
|
|
|
console.log(info);
|
|
|
|
@ -62,6 +66,20 @@ function Detail() {
|
|
|
|
|
return true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function bindCurrency() {
|
|
|
|
|
let arr = [];
|
|
|
|
|
arr = invocieCurrencyList.map((data, index) => {
|
|
|
|
|
return {
|
|
|
|
|
value: data.CRI_Code,
|
|
|
|
|
label: data.CRI_Name
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// (<Option value="data.CRI_Code">data.CRI_Name</Option>);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return arr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Space direction="vertical" style={{ width: "100%" }}>
|
|
|
|
@ -116,24 +134,47 @@ function Detail() {
|
|
|
|
|
</Upload>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Divider orientation="left">提交信息</Divider>
|
|
|
|
|
<Form.Item>
|
|
|
|
|
<Input addonBefore="报账总额:" defaultValue="0.00" />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item>
|
|
|
|
|
<Input addonBefore="币种选择:" defaultValue="0.00" />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item
|
|
|
|
|
name="info_content"
|
|
|
|
|
<Row gutter={16}>
|
|
|
|
|
|
|
|
|
|
<Col span={8}> <Form.Item
|
|
|
|
|
name="info_money"
|
|
|
|
|
label="报账总额:"
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: "Please input your messages!",
|
|
|
|
|
message: "Please input your money!",
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
>
|
|
|
|
|
<Input defaultValue="0.00" />
|
|
|
|
|
</Form.Item></Col>
|
|
|
|
|
<Col span={8}><Form.Item
|
|
|
|
|
name="info_Currency"
|
|
|
|
|
label="金额币种:"
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: "Please select Currency type!",
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
>
|
|
|
|
|
<Select
|
|
|
|
|
placeholder="Select Currency type"
|
|
|
|
|
onChange={onCurrencyChange}
|
|
|
|
|
allowClear
|
|
|
|
|
options={bindCurrency()}
|
|
|
|
|
>
|
|
|
|
|
</Select>
|
|
|
|
|
</Form.Item></Col>
|
|
|
|
|
<Col span={8}>
|
|
|
|
|
<Form.Item
|
|
|
|
|
name="info_date"
|
|
|
|
|
label="最迟付款日期: "
|
|
|
|
|
>
|
|
|
|
|
<DatePicker />
|
|
|
|
|
</Form.Item></Col>
|
|
|
|
|
|
|
|
|
|
<Input addonBefore="付款日期:" defaultValue="0.00" />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Row>
|
|
|
|
|
<Form.Item>
|
|
|
|
|
<Button type="primary" htmlType="submit">
|
|
|
|
|
Submit
|
|
|
|
|