kts-component-invoice-operate 1.2.22 → 2.0.1

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 (69) hide show
  1. package/d.dio +2 -69
  2. package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{EndowCode.d.ts → EndowCode/index.d.ts} +2 -2
  3. package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{IGood.d.ts → IGood/index.d.ts} +15 -5
  4. package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{ImportGoods.d.ts → ImportGoods/index.d.ts} +0 -0
  5. package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{LineAttributeType.d.ts → LineAttributeType/index.d.ts} +0 -0
  6. package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/ProductComparison/index.d.ts +7 -0
  7. package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/index.d.ts +9 -0
  8. package/dist/Invoice/InvoiceController/fns/getGoodsSearch.d.ts +2 -0
  9. package/dist/Invoice/InvoiceController/index.d.ts +3 -0
  10. package/dist/Invoice/index.d.ts +1 -1
  11. package/dist/Invoice/tools/itemName/index.d.ts +14 -0
  12. package/dist/Invoice/ui/AddComparisonDrawer/index.d.ts +3 -0
  13. package/dist/Invoice/ui/GoodsList/hook/useColumns/autoFillFn/index.d.ts +2 -0
  14. package/dist/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/hook/useAddComparison/index.d.ts +4 -0
  15. package/dist/Invoice/ui/GoodsList/ui/{AddDiscountRowButton → BulkMenu/hooks/useAddDiscountRowButton}/index.d.ts +4 -2
  16. package/dist/Invoice/ui/GoodsList/ui/BulkMenu/hooks/useCommodityComparisonButton/index.d.ts +4 -0
  17. package/dist/Invoice/ui/GoodsList/ui/BulkMenu/hooks/useDelRowButton/index.d.ts +4 -0
  18. package/dist/Invoice/ui/GoodsList/ui/BulkMenu/hooks/useEndowCodeButton/index.d.ts +4 -0
  19. package/dist/Invoice/ui/GoodsList/ui/BulkMenu/index.d.ts +1 -0
  20. package/dist/Invoice/ui/GoodsList/ui/{DelRowButton → DescribeSwitch}/index.d.ts +0 -0
  21. package/dist/Invoice/ui/GoodsList/ui/Search/index.d.ts +2 -0
  22. package/dist/index.d.ts +1 -0
  23. package/dist/index.esm.js +1650 -615
  24. package/dist/index.js +1649 -614
  25. package/docs/index.md +1 -1
  26. package/package.json +6 -1
  27. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{EndowCode.tsx → EndowCode/index.tsx} +3 -3
  28. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{IGood.ts → IGood/index.ts} +20 -5
  29. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{ImportGoods.ts → ImportGoods/index.ts} +0 -0
  30. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{LineAttributeType.ts → LineAttributeType/index.ts} +0 -0
  31. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/ProductComparison/index.ts +10 -0
  32. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/index.ts +14 -1
  33. package/src/Invoice/InvoiceController/fns/getGoodsSearch.ts +17 -0
  34. package/src/Invoice/InvoiceController/index.ts +4 -0
  35. package/src/Invoice/_test/importGoods/index.tsx +21 -3
  36. package/src/Invoice/index.tsx +5 -1
  37. package/src/Invoice/tools/itemName/index.ts +48 -0
  38. package/src/Invoice/ui/AddComparisonDrawer/index.tsx +175 -0
  39. package/src/Invoice/ui/EndowCodeDrawer/index.tsx +6 -17
  40. package/src/Invoice/ui/GoodsList/hook/useColumns/autoFillFn/index.ts +15 -0
  41. package/src/Invoice/ui/GoodsList/hook/useColumns/index.tsx +100 -32
  42. package/src/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/hook/useAddComparison/index.tsx +39 -0
  43. package/src/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/index.tsx +5 -2
  44. package/src/Invoice/ui/GoodsList/hook/useRowSelection/index.tsx +34 -8
  45. package/src/Invoice/ui/GoodsList/index.less +42 -37
  46. package/src/Invoice/ui/GoodsList/index.tsx +21 -17
  47. package/src/Invoice/ui/GoodsList/ui/AddRowButton/index.tsx +5 -2
  48. package/src/Invoice/ui/GoodsList/ui/{AddDiscountRowButton → BulkMenu/hooks/useAddDiscountRowButton}/index.less +0 -0
  49. package/src/Invoice/ui/GoodsList/ui/{AddDiscountRowButton → BulkMenu/hooks/useAddDiscountRowButton}/index.tsx +20 -17
  50. package/src/Invoice/ui/GoodsList/ui/BulkMenu/hooks/useCommodityComparisonButton/index.tsx +80 -0
  51. package/src/Invoice/ui/GoodsList/ui/{DelRowButton → BulkMenu/hooks/useDelRowButton}/index.tsx +15 -7
  52. package/src/Invoice/ui/GoodsList/ui/{EndowCodeButton → BulkMenu/hooks/useEndowCodeButton}/index.tsx +13 -9
  53. package/src/Invoice/ui/GoodsList/ui/BulkMenu/index.tsx +43 -0
  54. package/src/Invoice/ui/GoodsList/ui/DescribeSwitch/index.tsx +37 -0
  55. package/src/Invoice/ui/GoodsList/ui/Search/icon/magnifier.svg +1 -0
  56. package/src/Invoice/ui/GoodsList/ui/Search/index.less +10 -0
  57. package/src/Invoice/ui/GoodsList/ui/Search/index.tsx +47 -0
  58. package/src/Invoice/ui/GoodsList/ui/TaxIncludedSwitch/index.tsx +2 -2
  59. package/src/Invoice/ui/ImportGoodsDrawer/index.tsx +70 -18
  60. package/src/index.ts +1 -0
  61. package/yarn.e.lock +14331 -0
  62. package/yarn.o.lock +14800 -0
  63. package/dist/Invoice/ui/GoodsList/ui/EndowCodeButton/index.d.ts +0 -2
  64. package/docs-dist/404.html +0 -33
  65. package/docs-dist/index.html +0 -33
  66. package/docs-dist/static/auto.a6cd905c.svg +0 -1
  67. package/docs-dist/static/spot.42e620e1.svg +0 -1
  68. package/docs-dist/umi.css +0 -20
  69. package/docs-dist/umi.js +0 -1
package/d.dio CHANGED
@@ -1,76 +1,9 @@
1
1
  <mxfile host="65bd71144e">
2
- <diagram id="w7p1MQGa3Cr9dDrN48fI" name="第 1 页">
3
- <mxGraphModel dx="966" dy="284" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
2
+ <diagram id="fPgEJXQJnfzUtXCRGjsd" name="第 1 页">
3
+ <mxGraphModel dx="1721" dy="1025" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
4
4
  <root>
5
5
  <mxCell id="0"/>
6
6
  <mxCell id="1" parent="0"/>
7
- <mxCell id="5" style="edgeStyle=none;html=1;" edge="1" parent="1" source="3" target="4">
8
- <mxGeometry relative="1" as="geometry"/>
9
- </mxCell>
10
- <mxCell id="3" value="Schema 编辑器" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
11
- <mxGeometry x="105" y="10" width="110" height="40" as="geometry"/>
12
- </mxCell>
13
- <mxCell id="7" style="edgeStyle=none;html=1;" edge="1" parent="1" source="4" target="12">
14
- <mxGeometry relative="1" as="geometry">
15
- <mxPoint x="260" y="200" as="targetPoint"/>
16
- </mxGeometry>
17
- </mxCell>
18
- <mxCell id="24" style="edgeStyle=none;html=1;" edge="1" parent="1" source="4" target="25">
19
- <mxGeometry relative="1" as="geometry">
20
- <mxPoint x="720" y="120" as="targetPoint"/>
21
- </mxGeometry>
22
- </mxCell>
23
- <mxCell id="4" value="schema Data" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
24
- <mxGeometry x="105" y="100" width="110" height="40" as="geometry"/>
25
- </mxCell>
26
- <mxCell id="8" value="表格" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
27
- <mxGeometry x="10" y="340" width="100" height="30" as="geometry"/>
28
- </mxCell>
29
- <mxCell id="9" value="表单" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
30
- <mxGeometry x="130" y="340" width="100" height="30" as="geometry"/>
31
- </mxCell>
32
- <mxCell id="10" value="详情" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
33
- <mxGeometry x="250" y="340" width="100" height="30" as="geometry"/>
34
- </mxCell>
35
- <mxCell id="11" value="编辑" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
36
- <mxGeometry x="370" y="340" width="100" height="30" as="geometry"/>
37
- </mxCell>
38
- <mxCell id="13" style="edgeStyle=none;html=1;" edge="1" parent="1" source="12" target="8">
39
- <mxGeometry relative="1" as="geometry"/>
40
- </mxCell>
41
- <mxCell id="15" style="edgeStyle=none;html=1;" edge="1" parent="1" source="12" target="9">
42
- <mxGeometry relative="1" as="geometry"/>
43
- </mxCell>
44
- <mxCell id="16" style="edgeStyle=none;html=1;" edge="1" parent="1" source="12" target="10">
45
- <mxGeometry relative="1" as="geometry"/>
46
- </mxCell>
47
- <mxCell id="17" style="edgeStyle=none;html=1;" edge="1" parent="1" source="12" target="11">
48
- <mxGeometry relative="1" as="geometry"/>
49
- </mxCell>
50
- <mxCell id="21" style="edgeStyle=none;html=1;" edge="1" parent="1" source="12" target="20">
51
- <mxGeometry relative="1" as="geometry"/>
52
- </mxCell>
53
- <mxCell id="12" value="schema 解析器" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
54
- <mxGeometry x="10" y="180" width="300" height="50" as="geometry"/>
55
- </mxCell>
56
- <mxCell id="19" style="edgeStyle=none;html=1;" edge="1" parent="1" source="18" target="12">
57
- <mxGeometry relative="1" as="geometry"/>
58
- </mxCell>
59
- <mxCell id="18" value="业务方 schema 解析器" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
60
- <mxGeometry x="460" y="180" width="140" height="50" as="geometry"/>
61
- </mxCell>
62
- <mxCell id="20" value="搜索" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
63
- <mxGeometry x="500" y="340" width="100" height="30" as="geometry"/>
64
- </mxCell>
65
- <mxCell id="23" style="edgeStyle=none;html=1;" edge="1" parent="1" source="22" target="3">
66
- <mxGeometry relative="1" as="geometry"/>
67
- </mxCell>
68
- <mxCell id="22" value="&lt;h1&gt;&lt;span style=&quot;font-size: 12px ; font-weight: 400&quot;&gt;字段,规则&lt;/span&gt;&lt;/h1&gt;" style="text;html=1;strokeColor=none;fillColor=none;spacing=5;spacingTop=-20;whiteSpace=wrap;overflow=hidden;rounded=0;" vertex="1" parent="1">
69
- <mxGeometry x="293" y="10" width="130" height="40" as="geometry"/>
70
- </mxCell>
71
- <mxCell id="25" value="平台统一管理" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
72
- <mxGeometry x="500" y="100" width="100" height="40" as="geometry"/>
73
- </mxCell>
74
7
  </root>
75
8
  </mxGraphModel>
76
9
  </diagram>
@@ -1,5 +1,5 @@
1
- import GoodsListState from '../GoodsListState';
2
- import IGood from './IGood';
1
+ import GoodsListState from '../../GoodsListState';
2
+ import IGood from '../IGood';
3
3
  export default class EndowCode {
4
4
  /** 准备赋码的货物索引列表 */
5
5
  endowcodeGoodIndex: number[];
@@ -1,4 +1,4 @@
1
- import LineAttributeType from './LineAttributeType';
1
+ import LineAttributeType from '../LineAttributeType';
2
2
  export default interface IGood {
3
3
  /** 数据索引 */
4
4
  $index: number;
@@ -6,12 +6,22 @@ export default interface IGood {
6
6
  discountGroup?: string;
7
7
  /** 发票ID */
8
8
  id?: string;
9
- /** 货物名称 */
9
+ /** 商品编码(我方) */
10
+ itemCode?: string;
11
+ /** 货物名称(我方) */
10
12
  itemName?: string;
11
- /** 货物规格型号 */
12
- itemModelName?: string;
13
- /** 单位 */
13
+ /** 单位(我方) */
14
14
  unit?: string;
15
+ /** 货物规格型号(我方) */
16
+ itemModelName?: string;
17
+ /** 商品编码(对方) */
18
+ itemCodeOther?: string;
19
+ /** 货物名称(对方) */
20
+ itemNameOther?: string;
21
+ /** 单位(对方) */
22
+ unitOther?: string;
23
+ /** 货物规格型号(对方) */
24
+ itemModelNameOther?: string;
15
25
  /** 数量 */
16
26
  quantity?: number;
17
27
  /** 单价(含税) */
@@ -0,0 +1,7 @@
1
+ import IGood from "../IGood";
2
+ export default class ProductComparison {
3
+ /** 执行商品对照 */
4
+ onComply?: (e: IGood[]) => Promise<IGood[]>;
5
+ /** 更新对照表 */
6
+ onUpdateComparisonTable?: (e: IGood, values: any) => Promise<void>;
7
+ }
@@ -2,6 +2,7 @@
2
2
  import IGood from './IGood';
3
3
  import ImportGoods from './ImportGoods';
4
4
  import EndowCode from './EndowCode';
5
+ import ProductComparison from './ProductComparison';
5
6
  import { WrappedFormUtils } from 'kts-components-antd-x3/lib/form/Form';
6
7
  import InvoiceController from '../..';
7
8
  export default class GoodsListState {
@@ -15,6 +16,8 @@ export default class GoodsListState {
15
16
  isAddDiscount?: boolean;
16
17
  /** 是否含税 */
17
18
  isTaxIncluded: boolean;
19
+ /** 是否显示我方 */
20
+ isMyShow: boolean;
18
21
  /** 正在编辑的货物 */
19
22
  editGood?: IGood;
20
23
  /** 被编辑行的form对象 */
@@ -25,6 +28,8 @@ export default class GoodsListState {
25
28
  defaultRate: number;
26
29
  /** 税率列表 */
27
30
  taxRateList: number[];
31
+ /** 搜索条件 */
32
+ searchValue: string;
28
33
  /** 货物列表 */
29
34
  goodsList: IGood[];
30
35
  /** 货物字典 */
@@ -39,6 +44,10 @@ export default class GoodsListState {
39
44
  endowCode: EndowCode;
40
45
  /** 导入商品的相关数据 */
41
46
  importGoods: ImportGoods<any>;
47
+ /** 商品对照 相关 */
48
+ productComparison: ProductComparison;
42
49
  /** 是否显购买示导入抽屉 */
43
50
  isVisibleDrawer: boolean;
51
+ /** 正在 添加商品对照 的货物 */
52
+ addComparisonIndex?: number;
44
53
  }
@@ -0,0 +1,2 @@
1
+ import IGood from "../InvoiceControllerState/GoodsListState/IGood";
2
+ export default function getGoodsSearch(goodsList: IGood[], search: string): IGood[];
@@ -2,6 +2,7 @@ import InvoiceControllerForm from './InvoiceControllerForm';
2
2
  import InvoiceControllerState from './InvoiceControllerState';
3
3
  import { IGetBuyerListOption } from './InvoiceControllerState/BuyerState';
4
4
  import { IGetGoodsListOption } from './InvoiceControllerState/GoodsListState/ImportGoods';
5
+ import getGoodsSearch from './fns/getGoodsSearch';
5
6
  export { default as InvoiceControllerState } from './InvoiceControllerState';
6
7
  export { default as IGood } from './InvoiceControllerState/GoodsListState/IGood';
7
8
  export { default as LineAttributeType } from './InvoiceControllerState/GoodsListState/LineAttributeType';
@@ -27,4 +28,6 @@ export default class InvoiceController extends InvoiceControllerForm {
27
28
  getGoodsList?: (option?: IGetGoodsListOption | undefined) => Promise<any>;
28
29
  /** 税收分类编码列表 */
29
30
  getTaxCategoryCodeList?: () => Promise<any>;
31
+ /** 获取筛选后的列表 */
32
+ getGoodsSearch: typeof getGoodsSearch;
30
33
  }
@@ -22,7 +22,7 @@ export interface IInvoiceProps {
22
22
  /** 底部扩展UI */
23
23
  footExpand?: React.ReactNode;
24
24
  }
25
- export default class extends React.PureComponent<IInvoiceProps> {
25
+ export default class Invoice extends React.PureComponent<IInvoiceProps> {
26
26
  /** 控制器 */
27
27
  static readonly InvoiceController: typeof InvoiceController;
28
28
  /** 发票头 */
@@ -0,0 +1,14 @@
1
+ export interface ISN {
2
+ /** 简称 */
3
+ shorthand?: string;
4
+ /** 全称 */
5
+ full: string;
6
+ }
7
+ /** 拆分全称加简称 */
8
+ export declare const getSN: (value?: string) => ISN | undefined;
9
+ /** 组合全称加简称 */
10
+ export declare const getItemName: (value: ISN) => string;
11
+ /** 设置全称 */
12
+ export declare const setFull: (name?: string, full?: string) => string | undefined;
13
+ /** 设置简称 */
14
+ export declare const setShorthand: (name?: string, shorthand?: string) => string | undefined;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const AddComparisonDrawer: React.FunctionComponent<{}>;
3
+ export default AddComparisonDrawer;
@@ -29,3 +29,5 @@ export declare const updateUnitPriceTax: (controller: InvoiceController, form: W
29
29
  export declare const onSaveEditGood: (...par: any[]) => void;
30
30
  /** 单调赋码 */
31
31
  export declare const endowCode: (controller: InvoiceController, goods: IGood) => Promise<void>;
32
+ /** 修改了 货物名称 */
33
+ export declare const onChangeItemName: (controller: InvoiceController, form: WrappedFormUtils<any>, record: IGood) => Promise<void>;
@@ -0,0 +1,4 @@
1
+ /** 添加商品对照 */
2
+ import { IGood } from '../../../../../../../../InvoiceController';
3
+ declare const _default: (goods: IGood) => JSX.Element;
4
+ export default _default;
@@ -5,7 +5,9 @@
5
5
  * 不含税扣额 = 含税折扣额 / (1+税率)
6
6
  * 折扣税额 = 含税折扣额 - 不含税扣额
7
7
  */
8
- import React from 'react';
9
8
  import './index.less';
10
- declare const _default: React.FunctionComponent<{}>;
9
+ declare const _default: () => {
10
+ menuItem: JSX.Element | undefined;
11
+ drawer: JSX.Element;
12
+ };
11
13
  export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: () => {
2
+ menuItem: JSX.Element;
3
+ };
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: () => {
2
+ menuItem: JSX.Element;
3
+ };
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: () => {
2
+ menuItem: JSX.Element;
3
+ };
4
+ export default _default;
@@ -0,0 +1 @@
1
+ export default function BulkMenu(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ import './index.less';
2
+ export default function Search(): JSX.Element;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  import 'kts-components-antd-x3/dist/kts-components-antd-x3.css';
2
2
  export { default as Invoice } from './Invoice';
3
3
  export { default as InvoiceController } from './Invoice/InvoiceController';
4
+ export type { default as IGood } from './Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IGood';