|
|
|
|
@ -3,6 +3,7 @@ import { useParams, useNavigate } from 'react-router-dom';
|
|
|
|
|
import { App, Row, Col, Space, Typography, Divider, Form, Input, Select, Button, Tag } from 'antd';
|
|
|
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
|
import { fetchNotifsDetail, fetchNotifsStatusAgency, postNotifsNewOrEdit } from '@/stores/Notice';
|
|
|
|
|
import useFormStore from "@/stores/Form";
|
|
|
|
|
import BackBtn from '@/components/BackBtn';
|
|
|
|
|
import { usingStorage } from '@/hooks/usingStorage';
|
|
|
|
|
import VendorSelector from '@/components/VendorSelector';
|
|
|
|
|
@ -11,6 +12,21 @@ import Editor from '@/components/Editor';
|
|
|
|
|
|
|
|
|
|
const { Title, Paragraph } = Typography;
|
|
|
|
|
|
|
|
|
|
const allOverseasAgency = [
|
|
|
|
|
{ key: 30008, value: 30008, label: 'Luxe Voyage Tours-已签海纳协议' },
|
|
|
|
|
{ key: 31596, value: 31596, label: '印度Legend' },
|
|
|
|
|
{ key: 32531, value: 32531, label: '越南ANP TRAVEL' },
|
|
|
|
|
{ key: 32704, value: 32704, label: '泰北 NUT ' },
|
|
|
|
|
{ key: 32717, value: 32717, label: 'JCT株式会社' },
|
|
|
|
|
{ key: 32865, value: 32865, label: '泰国IAT' },
|
|
|
|
|
{ key: 32876, value: 32876, label: 'Japan Fleet' },
|
|
|
|
|
// { key: 33031, value: 33031, label: 'test海外地接A' },
|
|
|
|
|
// { key: 33032, value: 33032, label: 'test海外地接B' },
|
|
|
|
|
{ key: 33200, value: 33200, label: '新加坡途游' },
|
|
|
|
|
{ key: 33508, value: 33508, label: '日本DJ(注意加服务交通费)' },
|
|
|
|
|
{ key: 33796, value: 33796, label: '韩国 Halla Tour' },
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
const Edit = ({ ...props }) => {
|
|
|
|
|
const { t } = useTranslation();
|
|
|
|
|
const { message } = App.useApp();
|
|
|
|
|
@ -22,8 +38,10 @@ const Edit = ({ ...props }) => {
|
|
|
|
|
const [form] = Form.useForm();
|
|
|
|
|
const clickedButton = useRef('');
|
|
|
|
|
const quillRef = useRef();
|
|
|
|
|
const setCache = useFormStore(state => state.setCache);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const [showAgencySelector, setShowAgencySelector] = useState(0);
|
|
|
|
|
const [showAgencySelector, setShowAgencySelector] = useState(1);
|
|
|
|
|
const [showAgencySeleted, setShowAgencySeleted] = useState(0);
|
|
|
|
|
|
|
|
|
|
// const [noticeInfo, setNoticeInfo] = useState({});
|
|
|
|
|
@ -45,7 +63,10 @@ const Edit = ({ ...props }) => {
|
|
|
|
|
form.setFieldsValue({
|
|
|
|
|
agency_list: _list,
|
|
|
|
|
});
|
|
|
|
|
setCache({ vendorList: _list })
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
setCache({ vendorList: allOverseasAgency })
|
|
|
|
|
}
|
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
|
|
@ -131,7 +152,7 @@ const Edit = ({ ...props }) => {
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item noStyle>
|
|
|
|
|
<Space.Compact className='w-full'>
|
|
|
|
|
<Form.Item name='target' label='公告区域' className='w-1/3' rules={[{ required: true }]}>
|
|
|
|
|
<Form.Item name='target' label='公告区域' initialValue={{value: '_list', label: '我自己选'}} className='w-1/3' rules={[{ required: true }]}>
|
|
|
|
|
<Select placeholder='请选择公告区域' labelInValue>
|
|
|
|
|
<Select.Option value='all'>所有</Select.Option>
|
|
|
|
|
<Select.Option value='domestic'>国内</Select.Option>
|
|
|
|
|
@ -179,7 +200,7 @@ const Edit = ({ ...props }) => {
|
|
|
|
|
}
|
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
|
|
<Form.Item name='body' label='公告内容' rules={[{ required: true }]}>
|
|
|
|
|
<Form.Item name='body' label='公告内容' rules={[{ required: true, max: 4000 }]}>
|
|
|
|
|
<Editor ref={quillRef} />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
|
|
|