Commit 90c2447f6b443c28dd75abe269687497f4c9a9b6
1 parent
02999d30
零售任务快捷分配交互优化
Showing
4 changed files
with
20 additions
and
12 deletions
src/pages/order3/SaleTask/components/SaleTaskAutoAssign.tsx
... | ... | @@ -3,7 +3,6 @@ import { |
3 | 3 | Table, |
4 | 4 | Form, |
5 | 5 | InputRef, |
6 | - Input, | |
7 | 6 | Row, |
8 | 7 | Button, |
9 | 8 | message, |
... | ... | @@ -12,7 +11,7 @@ import { |
12 | 11 | } from "antd"; |
13 | 12 | import type { FormInstance } from "antd/es/form"; |
14 | 13 | import * as API from "../api"; |
15 | -import styles from "./index.less"; | |
14 | +import "./index.less"; | |
16 | 15 | import { MAX_NUM } from "../entity"; |
17 | 16 | |
18 | 17 | type EditableTableProps = Parameters<typeof Table>[0]; |
... | ... | @@ -71,6 +70,7 @@ const defaultColumns: (ColumnTypes[number] & { |
71 | 70 | interface SaleTaskAutoAssignProps { |
72 | 71 | id: number; |
73 | 72 | value?: API.ShopTaskItem[]; |
73 | + onCancel: () => void; | |
74 | 74 | onRefresh: () => void; |
75 | 75 | } |
76 | 76 | |
... | ... | @@ -179,7 +179,6 @@ export default function SaleTaskAutoAssign(props: SaleTaskAutoAssignProps) { |
179 | 179 | newRow.fuelVehicleTaskCount = 0; |
180 | 180 | } |
181 | 181 | newData.splice(index, 1, newRow); |
182 | - console.log("handleSave newData", newData); | |
183 | 182 | setDataSource(newData); |
184 | 183 | }; |
185 | 184 | |
... | ... | @@ -250,7 +249,7 @@ export default function SaleTaskAutoAssign(props: SaleTaskAutoAssignProps) { |
250 | 249 | columns={columns as ColumnTypes} |
251 | 250 | /> |
252 | 251 | <Row align="middle" justify="center" style={{ marginTop: 20 }}> |
253 | - <Button onClick={props.onRefresh}>取消</Button> | |
252 | + <Button onClick={props.onCancel}>取消</Button> | |
254 | 253 | <Button |
255 | 254 | type="primary" |
256 | 255 | style={{ marginLeft: 10 }} | ... | ... |
src/pages/order3/SaleTask/components/SaleTaskBatchSet.tsx
... | ... | @@ -17,6 +17,7 @@ import ShopSelectNew from "@/components/ShopSelectNew"; |
17 | 17 | |
18 | 18 | interface SaleTaskBatchSetProps { |
19 | 19 | id: number; |
20 | + onCancel: () => void; | |
20 | 21 | onRefresh: () => void; |
21 | 22 | } |
22 | 23 | |
... | ... | @@ -269,7 +270,7 @@ export default function SaleTaskBatchSet(props: SaleTaskBatchSetProps) { |
269 | 270 | )} |
270 | 271 | </Form.List> |
271 | 272 | <Row align="middle" justify="center" style={{ marginTop: 20 }}> |
272 | - <Button onClick={props.onRefresh}>取消</Button> | |
273 | + <Button onClick={props.onCancel}>取消</Button> | |
273 | 274 | <Button |
274 | 275 | type="primary" |
275 | 276 | style={{ marginLeft: 10 }} | ... | ... |
src/pages/order3/SaleTask/components/index.less
1 | -.editable-row:hover .editableCellValueWrap { | |
2 | - // box-shadow: 0 0 0 1px #d9d9d9; | |
3 | - background-color: #eee; | |
4 | -} | |
5 | 1 | \ No newline at end of file |
2 | +.editable-row:hover .editable-cell-value-wrap { | |
3 | + border: 1px solid #d9d9d9; | |
4 | +} | |
5 | +.editable-cell-value-wrap { | |
6 | + border: 1px solid transparent; | |
7 | + cursor: pointer; | |
8 | +} | ... | ... |
src/pages/order3/SaleTask/index.tsx
... | ... | @@ -518,7 +518,7 @@ function SaleTaskList() { |
518 | 518 | width={800} |
519 | 519 | title="零售任务快捷分配" |
520 | 520 | open={autoVisible} |
521 | - onCancel={handleAutoAssignRefresh} | |
521 | + onCancel={() => setAutoVisible(false)} | |
522 | 522 | destroyOnClose |
523 | 523 | footer={null} |
524 | 524 | maskClosable={false} |
... | ... | @@ -526,6 +526,7 @@ function SaleTaskList() { |
526 | 526 | <SaleTaskAutoAssign |
527 | 527 | id={data.id} |
528 | 528 | value={data.shopTaskList} |
529 | + onCancel={() => setAutoVisible(false)} | |
529 | 530 | onRefresh={handleAutoAssignRefresh} |
530 | 531 | /> |
531 | 532 | </Modal> |
... | ... | @@ -533,12 +534,16 @@ function SaleTaskList() { |
533 | 534 | width={800} |
534 | 535 | title="批量设置" |
535 | 536 | open={batchVisible} |
536 | - onCancel={handleBatchSetRefresh} | |
537 | + onCancel={() => setBatchVisible(false)} | |
537 | 538 | destroyOnClose |
538 | 539 | footer={null} |
539 | 540 | maskClosable={false} |
540 | 541 | > |
541 | - <SaleTaskBatchSet id={data.id} onRefresh={handleBatchSetRefresh} /> | |
542 | + <SaleTaskBatchSet | |
543 | + id={data.id} | |
544 | + onCancel={() => setBatchVisible(false)} | |
545 | + onRefresh={handleBatchSetRefresh} | |
546 | + /> | |
542 | 547 | </Modal> |
543 | 548 | <ApprovalProgressModal |
544 | 549 | visible={approve.visible} | ... | ... |