Commit e53e82c26e9c4f12a5fd423a2225ee0c35052711
1 parent
bdad4eb5
修改函数名字
Showing
2 changed files
with
5 additions
and
4 deletions
src/pages/order3/SaleTask/components/SaleTaskAutoAssign.tsx
... | ... | @@ -71,13 +71,13 @@ const defaultColumns: (ColumnTypes[number] & { |
71 | 71 | interface SaleTaskAutoAssignProps { |
72 | 72 | id: number; |
73 | 73 | value?: API.ShopTaskItem[]; |
74 | - onCancel: () => void; | |
74 | + onRefresh: () => void; | |
75 | 75 | } |
76 | 76 | |
77 | 77 | export default function SaleTaskAutoAssign({ |
78 | 78 | id, |
79 | 79 | value, |
80 | - onCancel, | |
80 | + onRefresh, | |
81 | 81 | }: SaleTaskAutoAssignProps) { |
82 | 82 | const EditableContext = React.createContext<FormInstance<any> | null>(null); |
83 | 83 | const [dataSource, setDataSource] = useState<API.ShopTaskItem[]>([]); |
... | ... | @@ -208,6 +208,7 @@ export default function SaleTaskAutoAssign({ |
208 | 208 | }) |
209 | 209 | .then((res) => { |
210 | 210 | message.success("分配成功"); |
211 | + onRefresh(); | |
211 | 212 | }) |
212 | 213 | .catch((error: any) => { |
213 | 214 | message.error(error.message ?? "请求失败"); |
... | ... | @@ -253,7 +254,7 @@ export default function SaleTaskAutoAssign({ |
253 | 254 | columns={columns as ColumnTypes} |
254 | 255 | /> |
255 | 256 | <Row align="middle" justify="center" style={{ marginTop: 20 }}> |
256 | - <Button onClick={onCancel}>取消</Button> | |
257 | + <Button onClick={onRefresh}>取消</Button> | |
257 | 258 | <Button |
258 | 259 | type="primary" |
259 | 260 | style={{ marginLeft: 10 }} | ... | ... |
src/pages/order3/SaleTask/index.tsx