kts-component-invoice-operate 1.2.25 → 2.0.2

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 (55) 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} +13 -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 +5 -0
  7. package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/index.d.ts +7 -0
  8. package/dist/Invoice/index.d.ts +1 -1
  9. package/dist/Invoice/tools/itemName/index.d.ts +14 -0
  10. package/dist/Invoice/ui/AddComparisonDrawer/index.d.ts +2 -0
  11. package/dist/Invoice/ui/GoodsList/hook/useColumns/autoFillFn/index.d.ts +2 -0
  12. package/dist/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/hook/useAddComparison/index.d.ts +5 -0
  13. package/dist/Invoice/ui/GoodsList/ui/{AddDiscountRowButton → BulkMenu/hooks/useAddDiscountRowButton}/index.d.ts +5 -2
  14. package/dist/Invoice/ui/GoodsList/ui/BulkMenu/hooks/useCommodityComparisonButton/index.d.ts +5 -0
  15. package/dist/Invoice/ui/GoodsList/ui/BulkMenu/hooks/useDelRowButton/index.d.ts +5 -0
  16. package/dist/Invoice/ui/GoodsList/ui/BulkMenu/hooks/useEndowCodeButton/index.d.ts +5 -0
  17. package/dist/Invoice/ui/GoodsList/ui/BulkMenu/index.d.ts +2 -0
  18. package/dist/Invoice/ui/GoodsList/ui/{DelRowButton → DescribeSwitch}/index.d.ts +0 -0
  19. package/dist/index.d.ts +1 -0
  20. package/dist/index.esm.js +1084 -314
  21. package/dist/index.js +1083 -313
  22. package/docs/index.md +1 -1
  23. package/docs-dist/umi.css +8 -7
  24. package/docs-dist/umi.js +1 -1
  25. package/package.json +8 -1
  26. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{EndowCode.tsx → EndowCode/index.tsx} +3 -3
  27. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{IGood.ts → IGood/index.ts} +17 -5
  28. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{ImportGoods.ts → ImportGoods/index.ts} +0 -0
  29. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{LineAttributeType.ts → LineAttributeType/index.ts} +0 -0
  30. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/ProductComparison/index.ts +10 -0
  31. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/index.ts +10 -0
  32. package/src/Invoice/_test/importGoods/index.tsx +21 -3
  33. package/src/Invoice/index.tsx +5 -1
  34. package/src/Invoice/tools/itemName/index.ts +48 -0
  35. package/src/Invoice/ui/AddComparisonDrawer/index.tsx +135 -0
  36. package/src/Invoice/ui/EndowCodeDrawer/index.tsx +6 -17
  37. package/src/Invoice/ui/GoodsList/hook/useColumns/autoFillFn/index.ts +16 -0
  38. package/src/Invoice/ui/GoodsList/hook/useColumns/index.tsx +101 -36
  39. package/src/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/hook/useAddComparison/index.tsx +39 -0
  40. package/src/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/index.tsx +5 -2
  41. package/src/Invoice/ui/GoodsList/index.less +1 -4
  42. package/src/Invoice/ui/GoodsList/index.tsx +11 -17
  43. package/src/Invoice/ui/GoodsList/ui/{AddDiscountRowButton → BulkMenu/hooks/useAddDiscountRowButton}/index.less +0 -0
  44. package/src/Invoice/ui/GoodsList/ui/{AddDiscountRowButton → BulkMenu/hooks/useAddDiscountRowButton}/index.tsx +20 -17
  45. package/src/Invoice/ui/GoodsList/ui/BulkMenu/hooks/useCommodityComparisonButton/index.tsx +75 -0
  46. package/src/Invoice/ui/GoodsList/ui/{DelRowButton → BulkMenu/hooks/useDelRowButton}/index.tsx +15 -7
  47. package/src/Invoice/ui/GoodsList/ui/{EndowCodeButton → BulkMenu/hooks/useEndowCodeButton}/index.tsx +13 -9
  48. package/src/Invoice/ui/GoodsList/ui/BulkMenu/index.tsx +43 -0
  49. package/src/Invoice/ui/GoodsList/ui/DescribeSwitch/index.tsx +37 -0
  50. package/src/Invoice/ui/GoodsList/ui/TaxIncludedSwitch/index.tsx +2 -2
  51. package/src/Invoice/ui/ImportGoodsDrawer/index.tsx +70 -18
  52. package/src/index.ts +1 -0
  53. package/yarn.e.lock +14331 -0
  54. package/yarn.o.lock +14800 -0
  55. package/dist/Invoice/ui/GoodsList/ui/EndowCodeButton/index.d.ts +0 -3
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,20 @@ 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
+ itemCodeSelf?: string;
19
+ /** 货物名称(我方-购买) */
20
+ itemNameSelf?: string;
21
+ /** 货物规格型号(我方-购买) */
22
+ itemModelNameSelf?: string;
15
23
  /** 数量 */
16
24
  quantity?: number;
17
25
  /** 单价(含税) */
@@ -0,0 +1,5 @@
1
+ import IGood from "../IGood";
2
+ export default class ProductComparison {
3
+ /** 执行商品对照 */
4
+ onComply?: (e: IGood[]) => Promise<IGood[]>;
5
+ }
@@ -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对象 */
@@ -41,6 +44,10 @@ export default class GoodsListState {
41
44
  endowCode: EndowCode;
42
45
  /** 导入商品的相关数据 */
43
46
  importGoods: ImportGoods<any>;
47
+ /** 商品对照 相关 */
48
+ productComparison: ProductComparison;
44
49
  /** 是否显购买示导入抽屉 */
45
50
  isVisibleDrawer: boolean;
51
+ /** 正在 添加商品对照 的货物 */
52
+ addComparisonIndex?: number;
46
53
  }
@@ -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,2 @@
1
+ /// <reference types="react" />
2
+ export default function AddComparisonDrawer(): JSX.Element;
@@ -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,5 @@
1
+ /** 添加商品对照 */
2
+ /// <reference types="react" />
3
+ import { IGood } from '../../../../../../../../InvoiceController';
4
+ declare const _default: (goods: IGood) => JSX.Element;
5
+ export default _default;
@@ -5,7 +5,10 @@
5
5
  * 不含税扣额 = 含税折扣额 / (1+税率)
6
6
  * 折扣税额 = 含税折扣额 - 不含税扣额
7
7
  */
8
- import React from 'react';
8
+ /// <reference types="react" />
9
9
  import './index.less';
10
- declare const _default: React.FunctionComponent<{}>;
10
+ declare const _default: () => {
11
+ menuItem: JSX.Element | undefined;
12
+ drawer: JSX.Element;
13
+ };
11
14
  export default _default;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ declare const _default: () => {
3
+ menuItem: JSX.Element;
4
+ };
5
+ export default _default;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ declare const _default: () => {
3
+ menuItem: JSX.Element;
4
+ };
5
+ export default _default;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ declare const _default: () => {
3
+ menuItem: JSX.Element;
4
+ };
5
+ export default _default;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function BulkMenu(): 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';