kts-component-invoice-operate 3.2.239 → 3.2.240

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 (67) hide show
  1. package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IGood/index.d.ts +0 -1
  2. package/dist/Invoice/InvoiceController/InvoiceControllerState/index.d.ts +0 -2
  3. package/dist/Invoice/InvoiceController/index.d.ts +0 -6
  4. package/dist/Invoice/index.d.ts +0 -2
  5. package/dist/index.esm.js +2749 -5772
  6. package/dist/index.js +2748 -5771
  7. package/package.json +1 -1
  8. package/src/Invoice/Invoice-digtal/_test/easiest/index.tsx +8 -40
  9. package/src/Invoice/Invoice-digtal/_test/freight/index.tsx +17 -23
  10. package/src/Invoice/Invoice-digtal/_test/realEstateInfo/index.tsx +0 -47
  11. package/src/Invoice/Invoice-digtal/index.md +6 -7
  12. package/src/Invoice/InvoiceController/InvoiceControllerForm/index.ts +0 -11
  13. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IGood/index.ts +0 -2
  14. package/src/Invoice/InvoiceController/InvoiceControllerState/index.ts +0 -3
  15. package/src/Invoice/InvoiceController/index.ts +0 -21
  16. package/src/Invoice/index.tsx +0 -3
  17. package/src/Invoice/tools/useToGenerateId/index.ts +0 -2
  18. package/src/Invoice/ui/default/GoodsList/hook/useColumns/index.tsx +7 -0
  19. package/src/Invoice/ui/digtal/RealEstateInfo/index.tsx +37 -246
  20. package/src/Invoice/ui/digtal/StakeFarmerholder/index.less +1 -1
  21. package/src/Invoice/ui/digtal/StakeFarmerholder/index.tsx +204 -809
  22. package/dist/Invoice/Invoice-digtal/_test/pay/index.d.ts +0 -4
  23. package/dist/Invoice/InvoiceController/InvoiceControllerState/PayListState/IColumnsReplenish/index.d.ts +0 -6
  24. package/dist/Invoice/InvoiceController/InvoiceControllerState/PayListState/IGood/index.d.ts +0 -12
  25. package/dist/Invoice/InvoiceController/InvoiceControllerState/PayListState/ImportGoods/index.d.ts +0 -21
  26. package/dist/Invoice/InvoiceController/InvoiceControllerState/PayListState/index.d.ts +0 -31
  27. package/dist/Invoice/InvoiceController/fns/addPay.d.ts +0 -6
  28. package/dist/Invoice/InvoiceController/fns/delPay.d.ts +0 -6
  29. package/dist/Invoice/InvoiceController/fns/saveEditPay.d.ts +0 -6
  30. package/dist/Invoice/InvoiceController/fns/setEditPay.d.ts +0 -6
  31. package/dist/Invoice/InvoiceController/fns/setPay.d.ts +0 -6
  32. package/dist/Invoice/ui/digtal/PayList/hook/useColumns/index.d.ts +0 -3
  33. package/dist/Invoice/ui/digtal/PayList/hook/useColumns/ui/TitleText/index.d.ts +0 -8
  34. package/dist/Invoice/ui/digtal/PayList/hook/useOnRow/index.d.ts +0 -8
  35. package/dist/Invoice/ui/digtal/PayList/hook/useRowSelection/index.d.ts +0 -8
  36. package/dist/Invoice/ui/digtal/PayList/hook/useWindowClick/index.d.ts +0 -5
  37. package/dist/Invoice/ui/digtal/PayList/index.d.ts +0 -18
  38. package/dist/Invoice/ui/digtal/PayList/ui/AddRowButton/index.d.ts +0 -3
  39. package/dist/Invoice/ui/digtal/PayList/ui/BulkMenu/hooks/useDelRowButton/index.d.ts +0 -6
  40. package/dist/Invoice/ui/digtal/PayList/ui/BulkMenu/hooks/useEmptyRefill/index.d.ts +0 -6
  41. package/dist/Invoice/ui/digtal/PayList/ui/TableRow/index.d.ts +0 -3
  42. package/dist/Invoice/ui/digtal/PayList/ui/TableVirtual/index.d.ts +0 -4
  43. package/src/Invoice/Invoice-digtal/_test/pay/index.tsx +0 -14637
  44. package/src/Invoice/InvoiceController/InvoiceControllerState/PayListState/IColumnsReplenish/index.ts +0 -10
  45. package/src/Invoice/InvoiceController/InvoiceControllerState/PayListState/IGood/index.ts +0 -35
  46. package/src/Invoice/InvoiceController/InvoiceControllerState/PayListState/ImportGoods/index.ts +0 -81
  47. package/src/Invoice/InvoiceController/InvoiceControllerState/PayListState/index.ts +0 -40
  48. package/src/Invoice/InvoiceController/fns/addPay.ts +0 -11
  49. package/src/Invoice/InvoiceController/fns/delPay.ts +0 -38
  50. package/src/Invoice/InvoiceController/fns/saveEditPay.ts +0 -23
  51. package/src/Invoice/InvoiceController/fns/setEditPay.ts +0 -16
  52. package/src/Invoice/InvoiceController/fns/setPay.ts +0 -11
  53. package/src/Invoice/ui/digtal/PayList/hook/useColumns/dist/index.js +0 -616
  54. package/src/Invoice/ui/digtal/PayList/hook/useColumns/index.tsx +0 -168
  55. package/src/Invoice/ui/digtal/PayList/hook/useColumns/ui/TitleText/index.tsx +0 -20
  56. package/src/Invoice/ui/digtal/PayList/hook/useOnRow/index.tsx +0 -37
  57. package/src/Invoice/ui/digtal/PayList/hook/useRowSelection/index.tsx +0 -120
  58. package/src/Invoice/ui/digtal/PayList/hook/useWindowClick/index.tsx +0 -19
  59. package/src/Invoice/ui/digtal/PayList/index.less +0 -73
  60. package/src/Invoice/ui/digtal/PayList/index.tsx +0 -132
  61. package/src/Invoice/ui/digtal/PayList/ui/AddRowButton/index.tsx +0 -75
  62. package/src/Invoice/ui/digtal/PayList/ui/BulkMenu/hooks/useDelRowButton/index.tsx +0 -50
  63. package/src/Invoice/ui/digtal/PayList/ui/BulkMenu/hooks/useEmptyRefill/index.tsx +0 -37
  64. package/src/Invoice/ui/digtal/PayList/ui/TableRow/index.less +0 -29
  65. package/src/Invoice/ui/digtal/PayList/ui/TableRow/index.tsx +0 -21
  66. package/src/Invoice/ui/digtal/PayList/ui/TableVirtual/index.less +0 -39
  67. package/src/Invoice/ui/digtal/PayList/ui/TableVirtual/index.tsx +0 -109
@@ -1,10 +0,0 @@
1
-
2
- /** 商品表格补充配置 */
3
-
4
- import { ValidationRule } from "kts-components-antd-x3/lib/form";
5
-
6
- export default interface IColumnsReplenish {
7
-
8
- /** 补充的规则 */
9
- rules: ValidationRule[];
10
- }
@@ -1,35 +0,0 @@
1
- export default interface IGood {
2
- /** 数据索引 */
3
- $index: string;
4
- /** 序号 */
5
- sortNumber?: number;
6
- /** 运输工具种类列表 */
7
- vehicleList?: any[] | null;
8
-
9
- /** 运输工具种类 */
10
- vehicle?: string;
11
-
12
- channel:string;
13
-
14
- number:string;
15
-
16
-
17
-
18
- // itemName?:string;
19
-
20
- /** 运输工具牌号 */
21
- // vehicleNo?: string;
22
-
23
- /** 起运地 */
24
- // origin?: string[];
25
-
26
- /** 到达地 */
27
- // destination?: string[];
28
-
29
- /** 运输货物名称 */
30
- // goodName?: string;
31
-
32
- /** 地区 */
33
- // area?: string[];
34
-
35
- }
@@ -1,81 +0,0 @@
1
- import { ColumnProps } from 'kts-components-antd-x3/lib/Table/interface';
2
- import { PaginationConfig } from 'kts-components-antd-x3/lib/Table';
3
- import { message } from 'kts-components-antd-x3';
4
- import React from 'react';
5
-
6
- export interface IGetGoodsListOption {
7
- /** 分页数据 */
8
- pagination: PaginationConfig;
9
- }
10
-
11
- export default class ImportGoods<ColumnType = any> {
12
- /** 表头 */
13
- columns: ColumnProps<ColumnType>[] = [
14
- {
15
- title: '商品分类',
16
- dataIndex: 'itemType',
17
- key: 'itemType',
18
- },
19
- {
20
- title: '商品编码',
21
- dataIndex: 'itemNo',
22
- key: 'itemNo',
23
- },
24
- {
25
- title: '商品名称',
26
- dataIndex: 'itemName',
27
- key: 'itemName',
28
- },
29
- {
30
- title: '规格型号',
31
- dataIndex: 'itemModelName',
32
- key: 'itemModelName',
33
- },
34
- {
35
- title: '计量单位',
36
- dataIndex: 'unit',
37
- key: 'unit',
38
- },
39
- {
40
- title: '税率',
41
- dataIndex: 'taxRate',
42
- key: 'taxRate',
43
- render: text => text || text === 0 ? `${text}%` : ''
44
- },
45
- {
46
- title: '单价(含税)',
47
- dataIndex: 'priceIncludeTax',
48
- key: 'priceIncludeTax',
49
- },
50
- {
51
- title: '税收分类编码',
52
- dataIndex: 'taxClassificationCode',
53
- key: 'taxClassificationCode',
54
- },
55
- ];
56
-
57
- /** 货物列表 */
58
- dataSource: ColumnType[] = [];
59
-
60
- /** 分页数据 */
61
- pagination: PaginationConfig = {};
62
-
63
- /** 是否显示导入 */
64
- isVisibleDrawer = false;
65
-
66
- /** 顶部扩展 */
67
- topExpand?: React.ReactNode;
68
-
69
- /** 导入时校验函数 */
70
- verifyFn: (record: any) => Promise<boolean> = async record => {
71
- if (!record.taxClassificationCode) {
72
- message.error({ content: '请维护该商品的税收分类编码!', key: '请维护该商品的税收分类编码!' })
73
- return false;
74
- }
75
- if (record.productStatus === 0) {
76
- message.error({ content: '当前货物为禁用', key: '当前货物为禁用' })
77
- return false;
78
- }
79
- return true;
80
- };
81
- }
@@ -1,40 +0,0 @@
1
- import IGood from './IGood';
2
- import { WrappedFormUtils } from 'kts-components-antd-x3/lib/form/Form';
3
-
4
- export default class PayListState {
5
-
6
- /** 产品最大数 */
7
- goodMax?: number;
8
-
9
- /** 正在编辑的货物 */
10
- editGood?: IGood;
11
-
12
- /** 是否可以添加行 */
13
- isAddRow = true;
14
-
15
- /** 是否可以删除行 */
16
- isRemRow = true;
17
-
18
- /** 货物字典 */
19
- goodsMap = new Map<string, IGood>();
20
-
21
- /** 被编辑行的form对象 */
22
- form?: WrappedFormUtils;
23
-
24
- /** 运输工具种类列表 */
25
- vehicleTypeList: any[] = [];
26
-
27
- /** 货物列表 */
28
- goodsList: IGood[] = [];
29
-
30
- /** 列表选中的货物索引列表 */
31
- selectedGoodIndex: string[] = [];
32
-
33
- /** 地区 */
34
- area: any[] = [];
35
-
36
- addressFieldNames: IFieldNames = { label: 'label', value: 'value', children: 'children' }
37
- }
38
- interface IFieldNames {
39
- label: string; value: string; children: string
40
- }
@@ -1,11 +0,0 @@
1
- import { InvoiceControllerState } from '..';
2
- import idGenerator from '../../tools/idGenerator';
3
-
4
- /**
5
- * 添加的付款
6
- */
7
- export default async (state: InvoiceControllerState, options?: any) => {
8
- options.$index = idGenerator();
9
- state.payListState.goodsList = [...state.payListState.goodsList, options];
10
- return options;
11
- };
@@ -1,38 +0,0 @@
1
- import { InvoiceControllerState } from '..';
2
-
3
- /**
4
- * 删除一个付款行
5
- */
6
- export default async (state: InvoiceControllerState, $index?: string) => {
7
- if (!$index) return;
8
- // 查下要删除的货物
9
- const goods = state.payListState.goodsList.filter((e) => e.$index === $index)[0];
10
- if (!goods) return;
11
-
12
- // 如果正在编辑 就取消编辑
13
- if (state.payListState.editGood && state.payListState.editGood.$index === $index) {
14
- state.payListState.editGood = undefined;
15
- }
16
- const goodsList = state.payListState.goodsList;
17
- const goodsMap = state.payListState.goodsMap;
18
-
19
- goodsMap.delete($index);
20
-
21
- for (let i = 0; i < goodsList.length; i++) {
22
-
23
- if (goodsList[i].$index === $index) {
24
- // const good = goodsList[i];
25
-
26
- // if (good.lineAttribute === LineAttributeType.折扣行 && goodsList[i - 1] && goodsList[i - 1].lineAttribute === LineAttributeType.被折扣行) {
27
- // goodsList[i - 1].lineAttribute = LineAttributeType.正常;
28
- // }
29
-
30
- goodsList.splice(i, 1);
31
-
32
- break;
33
- }
34
- }
35
-
36
- state.payListState.goodsList = [...goodsList];
37
- state.payListState.goodsMap = new Map(goodsMap);
38
- };
@@ -1,23 +0,0 @@
1
- import { InvoiceControllerState } from '..';
2
-
3
- /**
4
- * 保存正在编辑的支付信息
5
- */
6
- export default async (state: InvoiceControllerState) => {
7
-
8
- const editGood = state.payListState.editGood;
9
- const form = state.payListState.form;
10
- if (!editGood || !form ) return;
11
- if ((await validateFields(form)).err) return;
12
-
13
- state.payListState.goodsList = state.payListState.goodsList.map((e) =>
14
- e.$index === editGood.$index ? { ...e, ...editGood } : e,
15
- );
16
- state.payListState.editGood = undefined;
17
- };
18
-
19
- const validateFields = (form: any) => new Promise((resolve: (v: { err: any; values: any }) => void) => {
20
- form.validateFields(async (err: any, values: any) => {
21
- resolve({ err, values });
22
- });
23
- });
@@ -1,16 +0,0 @@
1
- import { InvoiceControllerState, IGood3 } from '..';
2
-
3
- /**
4
- * 设置当前的编辑的付款信息
5
- */
6
- export default async (state: InvoiceControllerState, newEditGood?: any) => {
7
- if (newEditGood) {
8
- const editGood = state.payListState.editGood as IGood3;
9
- state.payListState = {
10
- ...state.payListState,
11
- editGood: { ...editGood, ...newEditGood },
12
- };
13
- } else {
14
- state.payListState = { ...state.payListState, editGood: undefined };
15
- }
16
- };
@@ -1,11 +0,0 @@
1
-
2
- import { InvoiceControllerState, IGood } from '..';
3
-
4
- /**
5
- * 设置单个商品的付款信息
6
- */
7
- export default async (state: InvoiceControllerState, options?: IGood) => {
8
- if (!options || !options.$index) return;
9
- const goodsList = state.payListState.goodsList.map(e => e.$index === options.$index ? { ...e, ...options } : e);
10
- state.payListState = { ...state.payListState, goodsList };
11
- };