Commit e53e82c26e9c4f12a5fd423a2225ee0c35052711

Authored by Shinner
1 parent bdad4eb5

修改函数名字

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
... ... @@ -469,7 +469,7 @@ function SaleTaskList() {
469 469 <SaleTaskAutoAssign
470 470 id={data.id}
471 471 value={data.shopTaskList}
472   - onCancel={() => {
  472 + onRefresh={() => {
473 473 setAutoVisible(false);
474 474 setParams({}, true);
475 475 }}
... ...