|
|
@ -1,5 +1,5 @@
|
|
|
|
import { LinkOutlined, MailOutlined, PhoneOutlined, UserOutlined, WhatsAppOutlined, FieldNumberOutlined } from "@ant-design/icons";
|
|
|
|
import { LinkOutlined, MailOutlined, PhoneOutlined, UserOutlined, WhatsAppOutlined, FieldNumberOutlined } from "@ant-design/icons";
|
|
|
|
import { App, Button, Card, Empty, Flex, Select, Spin, Typography, Divider, Modal, List, Row, Col, Tag, Drawer, Input } from "antd";
|
|
|
|
import { App, Button, Card, Empty, Flex, Select, Spin, Typography, Divider, Modal, List, Row, Col, Tag, Checkbox, Drawer, Input } from "antd";
|
|
|
|
import { useEffect, useState, useRef, useCallback } from "react";
|
|
|
|
import { useEffect, useState, useRef, useCallback } from "react";
|
|
|
|
import { useNavigate } from "react-router-dom";
|
|
|
|
import { useNavigate } from "react-router-dom";
|
|
|
|
import { useShallow } from 'zustand/react/shallow';
|
|
|
|
import { useShallow } from 'zustand/react/shallow';
|
|
|
@ -7,7 +7,7 @@ import { useShallow } from 'zustand/react/shallow';
|
|
|
|
import { copy, isEmpty } from "@/utils/commons";
|
|
|
|
import { copy, isEmpty } from "@/utils/commons";
|
|
|
|
import { Conditional } from "@/components/Conditional";
|
|
|
|
import { Conditional } from "@/components/Conditional";
|
|
|
|
import useConversationStore from "@/stores/ConversationStore";
|
|
|
|
import useConversationStore from "@/stores/ConversationStore";
|
|
|
|
import { useOrderStore, OrderLabelDefaultOptions, OrderStatusDefaultOptions } from "@/stores/OrderStore";
|
|
|
|
import { useOrderStore, OrderLabelDefaultOptions, OrderStatusDefaultOptions, remindStatusOptions, fetchSetRemindStateAction } from "@/stores/OrderStore";
|
|
|
|
import useAuthStore from "@/stores/AuthStore";
|
|
|
|
import useAuthStore from "@/stores/AuthStore";
|
|
|
|
import QuotesHistory from "./QuotesHistory";
|
|
|
|
import QuotesHistory from "./QuotesHistory";
|
|
|
|
import ConversationBind from "./../ConversationBind";
|
|
|
|
import ConversationBind from "./../ConversationBind";
|
|
|
@ -148,6 +148,25 @@ const CustomerProfile = () => {
|
|
|
|
updateCurrentConversation({ coli_sn });
|
|
|
|
updateCurrentConversation({ coli_sn });
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const [orderRemindState, setOrderRemindState] = useState(orderDetail.remindstate);
|
|
|
|
|
|
|
|
const handleSetRemindState = async (checkedValue) => {
|
|
|
|
|
|
|
|
const state = checkedValue.filter(v => v !== orderRemindState);
|
|
|
|
|
|
|
|
const oldState = orderRemindState;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
if (isEmpty(state)) {
|
|
|
|
|
|
|
|
setOrderRemindState(null);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
setOrderRemindState(state[0]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
await fetchSetRemindStateAction({ coli_sn: chatOrder, remindstate: state });
|
|
|
|
|
|
|
|
message.success('设置成功');
|
|
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
|
|
notification.warning({ message: '设置失败', description: error.message, placement: 'top', duration: 60 });
|
|
|
|
|
|
|
|
setOrderRemindState(oldState);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (currentOrder) {
|
|
|
|
if (currentOrder) {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div className="divide-x-0 divide-y divide-dashed divide-gray-300">
|
|
|
|
<div className="divide-x-0 divide-y divide-dashed divide-gray-300">
|
|
|
@ -256,6 +275,10 @@ const CustomerProfile = () => {
|
|
|
|
</Flex>
|
|
|
|
</Flex>
|
|
|
|
</Flex>
|
|
|
|
</Flex>
|
|
|
|
</Card>
|
|
|
|
</Card>
|
|
|
|
|
|
|
|
<Divider orientation="left">
|
|
|
|
|
|
|
|
<Typography.Text strong>催信:</Typography.Text>
|
|
|
|
|
|
|
|
</Divider>
|
|
|
|
|
|
|
|
<Checkbox.Group key='substatus' value={[orderRemindState]} options={remindStatusOptions} onChange={handleSetRemindState} />
|
|
|
|
<Divider orientation="left">
|
|
|
|
<Divider orientation="left">
|
|
|
|
<Typography.Text strong>最新报价</Typography.Text>
|
|
|
|
<Typography.Text strong>最新报价</Typography.Text>
|
|
|
|
</Divider>
|
|
|
|
</Divider>
|
|
|
|