kts-component-invoice-operate 3.2.29 → 3.2.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. package/dist/Invoice/InvoiceController/InvoiceControllerState/AutoComplete/index.d.ts +1 -1
  2. package/dist/Invoice/ui/default/GoodsList/hook/useColumns/ui/ItemCodeInput/index.d.ts +1 -1
  3. package/dist/Invoice/ui/default/GoodsList/ui/TableRow/index.d.ts +1 -0
  4. package/dist/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/Drag/index.d.ts +7 -0
  5. package/dist/Invoice/ui/digtal/GoodsList/ui/TableRow/index.d.ts +1 -0
  6. package/dist/index.esm.js +4604 -3793
  7. package/dist/index.js +4604 -3793
  8. package/package.json +1 -1
  9. package/src/Invoice/InvoiceController/InvoiceControllerState/AutoComplete/index.ts +1 -1
  10. package/src/Invoice/_test/endowCode/index.tsx +1 -1
  11. package/src/Invoice/ui/default/GoodsList/hook/useColumns/index.tsx +12 -11
  12. package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/Drag/index.less +18 -0
  13. package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/Drag/index.tsx +143 -4
  14. package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/ItemCodeInput/index.tsx +15 -5
  15. package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/ItemNameInput/index.tsx +1 -1
  16. package/src/Invoice/ui/default/GoodsList/ui/TableRow/index.less +14 -0
  17. package/src/Invoice/ui/default/GoodsList/ui/TableRow/index.tsx +22 -3
  18. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/index.tsx +8 -0
  19. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/Drag/index.less +21 -0
  20. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/Drag/index.tsx +187 -0
  21. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/Drag/svg/I001.svg +1 -0
  22. package/src/Invoice/ui/digtal/GoodsList/ui/TableRow/index.less +14 -0
  23. package/src/Invoice/ui/digtal/GoodsList/ui/TableRow/index.tsx +18 -5
@@ -2,15 +2,22 @@ import React from "react";
2
2
  import Invoice from '../../../../..';
3
3
  import { LineAttributeType } from '../../../../../InvoiceController'
4
4
  import classnames from 'classnames'
5
+ import './index.less'
5
6
 
6
7
  export default function TableRow(props: any) {
7
8
 
9
+ const rowKey = props['data-row-key']
10
+
8
11
  const controller = Invoice.useInvoiceController();
9
12
 
10
13
  const goodsMap = controller.useMemo(s => s.goodsListState.goodsMap, [])
11
14
 
15
+ const current = controller.useMemo(s => s.goodsListState.drag.current, [])
16
+
17
+ const container = controller.useMemo(s => s.goodsListState.drag.container, [])
18
+
12
19
  const discount = React.useMemo(() => {
13
- const i = goodsMap.get(props['data-row-key']);
20
+ const i = goodsMap.get(rowKey);
14
21
  if (!i) return undefined;
15
22
 
16
23
  if (i.lineAttribute === LineAttributeType.折扣行) {
@@ -20,9 +27,15 @@ export default function TableRow(props: any) {
20
27
  } else {
21
28
  return undefined;
22
29
  }
23
- }, [props['data-row-key'], goodsMap])
30
+ }, [rowKey, goodsMap])
31
+
24
32
 
25
- return (
26
- <tr {...props} className={classnames(props.className, discount)} />
27
- )
33
+ return rowKey === current && current
34
+ ? (
35
+ <tr style={{ height: 50, position: 'relative' }} >
36
+ <div style={{ height: 0.5, width: '100%', background: '#E6E6E6', position: 'absolute', bottom: 0 }} />
37
+ </tr>
38
+ ) : (
39
+ <tr {...props} className={classnames(props.className, discount, (rowKey === container && current) ? 'kts-invoice-operate-goods-list-itemName-drag-container' : '')} />
40
+ )
28
41
  }