聊天记录增加顾问选项

dev/mobile
Jimmy Liow 2 years ago
parent dd533c7caa
commit 7256ceb5d2

@ -15,10 +15,11 @@ const useOrderStore = create((set, get) => ({
fetchOrderDetail: async (colisn) => {
const json = await fetchJSON(`${API_HOST}/getorderinfo`, { colisn })
if (json.errcode === 0 && json.result.length > 0) {
const orderResult = json.result[0]
set(() => ({
orderDetail: json.result[0],
customerDetail: json.result[0].contact[0],
lastQuotation: json.result[0].quotes.length > 0 ? json.result[0].quotes[0] : {},
orderDetail: orderResult,
customerDetail: orderResult.contact.length > 0 ? orderResult.contact[0] : {},
lastQuotation: orderResult.quotes.length > 0 ? orderResult.quotes[0] : {},
}))
}
},

@ -103,7 +103,11 @@ function AuthApp() {
trigger={['click']}
>
<a onClick={(e) => e.preventDefault()} style={{ color: colorPrimary }}>
<Space><Avatar src={loginUser.avatarUrl}>{loginUser.username.substring(1)}</Avatar>{loginUser.username}<DownOutlined /></Space>
<Space><Avatar
style={{
backgroundColor: colorPrimary,
}}
src={loginUser.avatarUrl}>{loginUser.username.substring(1)}</Avatar>{loginUser.username}<DownOutlined /></Space>
</a>
</Dropdown>

@ -67,6 +67,29 @@ const SearchForm = memo(function ({ onSubmit }) {
]}
/>
</Form.Item>
<Form.Item label='顾问' name='travel' style={{width: '200px'}}>
<Select
showSearch
placeholder='Select a person'
optionFilterProp='children'
filterOption={(input, option) =>
(option?.label ?? '').toLowerCase().includes(input.toLowerCase())}
options={[
{
value: 'Coco',
label: 'Coco',
},
{
value: 'Ann',
label: 'Ann',
},
{
value: 'Lora',
label: 'Lora',
},
]}
/>
</Form.Item>
<Form.Item label='关键词' name='orderNumber'>
<Input placeholder='关键词' allowClear />
</Form.Item>

Loading…
Cancel
Save