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