|
|
@@ -5,9 +5,9 @@ import type { ColumnsType } from 'antd/es/table';
|
|
|
import dayjs from 'dayjs';
|
|
|
import { InferRequestType, InferResponseType } from 'hono/client';
|
|
|
import { orderRecordClient } from '@/client/api';
|
|
|
-import { ClientSelect } from '@/client/admin/components/ClientSelect';
|
|
|
-import { UserSelect } from '@/client/admin/components/UserSelect';
|
|
|
-import { LinkmanSelect } from '@/client/admin/components/LinkmanSelect';
|
|
|
+import ClientSelect from '@/client/admin/components/ClientSelect';
|
|
|
+import UserSelect from '@/client/admin/components/UserSelect';
|
|
|
+import LinkmanSelect from '@/client/admin/components/LinkmanSelect';
|
|
|
|
|
|
const { RangePicker } = DatePicker;
|
|
|
const { Option } = Select;
|
|
|
@@ -152,7 +152,7 @@ const OrderRecords: React.FC = () => {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- if (response.status === 200) {
|
|
|
+ if (response.ok) {
|
|
|
const result = await response.json();
|
|
|
setData(result.data);
|
|
|
setPagination({
|
|
|
@@ -234,7 +234,7 @@ const OrderRecords: React.FC = () => {
|
|
|
param: { id }
|
|
|
});
|
|
|
|
|
|
- if (response.status === 200) {
|
|
|
+ if (response.ok) {
|
|
|
message.success('删除成功');
|
|
|
fetchData(pagination.current, pagination.pageSize, searchParams);
|
|
|
}
|
|
|
@@ -261,7 +261,7 @@ const OrderRecords: React.FC = () => {
|
|
|
json: formData as UpdateRequest
|
|
|
});
|
|
|
|
|
|
- if (response.status === 200) {
|
|
|
+ if (response.ok) {
|
|
|
message.success('更新成功');
|
|
|
setModalVisible(false);
|
|
|
fetchData(pagination.current, pagination.pageSize, searchParams);
|
|
|
@@ -272,7 +272,7 @@ const OrderRecords: React.FC = () => {
|
|
|
json: formData as CreateRequest
|
|
|
});
|
|
|
|
|
|
- if (response.status === 200) {
|
|
|
+ if (response.ok) {
|
|
|
message.success('新增成功');
|
|
|
setModalVisible(false);
|
|
|
fetchData(1, pagination.pageSize, searchParams);
|