kts-component-invoice-operate 3.1.19 → 3.2.0
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.
- package/.dumi/theme/builtins/API.tsx +66 -66
- package/.editorconfig +16 -16
- package/.fatherrc.ts +4 -4
- package/.prettierignore +7 -7
- package/.prettierrc +11 -11
- package/.umirc.ts +8 -8
- package/README.md +5 -5
- package/dist/Invoice/Invoice-digtal/_test/disabled/index.d.ts +4 -0
- package/dist/Invoice/Invoice-digtal/_test/easiest/index.d.ts +4 -0
- package/dist/Invoice/Invoice-digtal/_test/header/index.d.ts +4 -0
- package/dist/Invoice/Invoice-digtal/_test/readOnly/index.d.ts +4 -0
- package/dist/Invoice/Invoice-digtal/_test/stakeholder/index.d.ts +4 -0
- package/dist/Invoice/Invoice-digtal/_test/typeSelection/index.d.ts +4 -0
- package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/index.d.ts +4 -0
- package/dist/Invoice/InvoiceController/InvoiceControllerState/Stakeholder/index.d.ts +10 -0
- package/dist/Invoice/InvoiceController/InvoiceControllerState/index.d.ts +6 -0
- package/dist/Invoice/InvoiceController/fns/addGoodDiscount.d.ts +1 -1
- package/dist/Invoice/InvoiceController/fns/addGoodDiscountV2.d.ts +12 -0
- package/dist/Invoice/InvoiceController/fns/delGood.d.ts +1 -1
- package/dist/Invoice/InvoiceController/index.d.ts +2 -0
- package/dist/Invoice/index.d.ts +25 -12
- package/dist/Invoice/tools/mounting/index.d.ts +3 -0
- package/dist/Invoice/{ui/GoodsList/hook → tools}/useToGenerateId/index.d.ts +1 -1
- package/dist/Invoice/ui/{Buyer → default/Buyer}/index.d.ts +1 -1
- package/dist/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/autoFillFn/index.d.ts +2 -2
- package/dist/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowMenu/hook/_useAddComparison/index.d.ts +0 -1
- package/dist/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowMenu/hook/useAddDiscount/index.d.ts +1 -1
- package/dist/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowMenu/hook/useDelItem/index.d.ts +1 -1
- package/dist/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowMenu/hook/useEndowCode/index.d.ts +1 -1
- package/dist/Invoice/ui/default/GoodsList/hook/useColumns/ui/RowMenu/index.d.ts +7 -0
- package/dist/Invoice/ui/default/GoodsList/hook/useDeduction/index.d.ts +8 -0
- package/dist/Invoice/ui/{GoodsList → default/GoodsList}/hook/useOnRow/index.d.ts +1 -1
- package/dist/Invoice/ui/default/GoodsList/hook/useWindowClick/index.d.ts +8 -0
- package/dist/Invoice/ui/{Seller → default/Seller}/index.d.ts +1 -1
- package/dist/Invoice/ui/digtal/GoodsList/hook/useColumns/autoFillFn/index.d.ts +35 -0
- package/dist/Invoice/ui/digtal/GoodsList/hook/useColumns/index.d.ts +3 -0
- package/dist/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/ItemNameInput/index.d.ts +7 -0
- package/dist/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowEditButton/index.d.ts +6 -0
- package/dist/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/hook/_useAddComparison/index.d.ts +4 -0
- package/dist/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/hook/useAddDiscount/index.d.ts +7 -0
- package/dist/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/hook/useDelItem/index.d.ts +7 -0
- package/dist/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/hook/useEndowCode/index.d.ts +7 -0
- package/dist/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/index.d.ts +7 -0
- package/dist/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowSaveButton/index.d.ts +6 -0
- package/dist/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/TitleText/index.d.ts +8 -0
- package/dist/Invoice/ui/digtal/GoodsList/hook/useOnRow/index.d.ts +8 -0
- package/dist/Invoice/ui/digtal/GoodsList/hook/useRowSelection/index.d.ts +8 -0
- package/dist/Invoice/ui/digtal/GoodsList/hook/useWindowClick/index.d.ts +8 -0
- package/dist/Invoice/ui/digtal/GoodsList/index.d.ts +17 -0
- package/dist/Invoice/ui/digtal/GoodsList/ui/AddRowButton/index.d.ts +3 -0
- package/dist/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useAddDiscountRowButton/index.d.ts +5 -0
- package/dist/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useCommodityComparisonButton/index.d.ts +5 -0
- package/dist/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useDelRowButton/index.d.ts +6 -0
- package/dist/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useEmptyRefill/index.d.ts +6 -0
- package/dist/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useEndowCodeButton/index.d.ts +6 -0
- package/dist/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useReselectInvoiceType/index.d.ts +5 -0
- package/dist/Invoice/ui/digtal/GoodsList/ui/DescribeSwitch/index.d.ts +3 -0
- package/dist/Invoice/ui/digtal/GoodsList/ui/Search/index.d.ts +3 -0
- package/dist/Invoice/ui/digtal/GoodsList/ui/Statistics/index.d.ts +4 -0
- package/dist/Invoice/ui/digtal/GoodsList/ui/TableRow/index.d.ts +2 -0
- package/dist/Invoice/ui/digtal/GoodsList/ui/TableVirtual/index.d.ts +4 -0
- package/dist/Invoice/ui/digtal/GoodsList/ui/TableVirtual.o/index.d.ts +4 -0
- package/dist/Invoice/ui/digtal/GoodsList/ui/TaxIncludedSwitch/index.d.ts +3 -0
- package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/autoFillFn/index.d.ts +35 -0
- package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/index.d.ts +3 -0
- package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/ItemNameInput/index.d.ts +7 -0
- package/dist/Invoice/ui/{GoodsList/hook/useColumns/ui/RowMenu → digtal/GoodsList.o/hook/useColumns/ui/RowEditButton}/index.d.ts +0 -1
- package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/hook/_useAddComparison/index.d.ts +4 -0
- package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/hook/useAddDiscount/index.d.ts +7 -0
- package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/hook/useDelItem/index.d.ts +7 -0
- package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/hook/useEndowCode/index.d.ts +7 -0
- package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/index.d.ts +7 -0
- package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowSaveButton/index.d.ts +6 -0
- package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/TitleText/index.d.ts +8 -0
- package/dist/Invoice/ui/digtal/GoodsList.o/hook/useOnRow/index.d.ts +8 -0
- package/dist/Invoice/ui/digtal/GoodsList.o/hook/useRowSelection/index.d.ts +8 -0
- package/dist/Invoice/ui/digtal/GoodsList.o/index.d.ts +20 -0
- package/dist/Invoice/ui/digtal/GoodsList.o/ui/AddRowButton/index.d.ts +3 -0
- package/dist/Invoice/ui/digtal/GoodsList.o/ui/TableRow/index.d.ts +2 -0
- package/dist/Invoice/ui/digtal/GoodsList.o/ui/TableVirtual/index.d.ts +4 -0
- package/dist/Invoice/ui/digtal/InvoiceHeader/index.d.ts +14 -0
- package/dist/Invoice/ui/digtal/Sign/index.d.ts +10 -0
- package/dist/Invoice/ui/digtal/Stakeholder/index.d.ts +7 -0
- package/dist/InvoiceTypeModal/_test/easiest/index.d.ts +3 -0
- package/dist/InvoiceTypeModal/index.d.ts +34 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +10107 -2821
- package/dist/index.js +10101 -2814
- package/docs/index.md +5 -5
- package/docs-dist/404.html +33 -33
- package/docs-dist/index.html +33 -33
- package/docs-dist/umi.css +19 -19
- package/index.html +12 -12
- package/package.json +60 -60
- package/src/Invoice/Invoice-digtal/_test/disabled/index.tsx +38 -0
- package/src/Invoice/Invoice-digtal/_test/easiest/index.tsx +5 -0
- package/src/Invoice/Invoice-digtal/_test/header/index.tsx +17 -0
- package/src/Invoice/Invoice-digtal/_test/readOnly/index.tsx +42 -0
- package/src/Invoice/Invoice-digtal/_test/stakeholder/index.tsx +12 -0
- package/src/Invoice/Invoice-digtal/_test/typeSelection/index.tsx +29 -0
- package/src/Invoice/Invoice-digtal/index.md +19 -0
- package/src/Invoice/InvoiceController/InvoiceControllerForm/index.ts +94 -94
- package/src/Invoice/InvoiceController/InvoiceControllerState/BuyerState/index.tsx +88 -88
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/EndowCode/index.tsx +93 -93
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IColumnsReplenish/index.ts +10 -10
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IGood/index.ts +75 -75
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/ImportGoods/index.ts +80 -80
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/LineAttributeType/index.ts +5 -5
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/ProductComparison/index.ts +9 -9
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/index.ts +94 -88
- package/src/Invoice/InvoiceController/InvoiceControllerState/Stakeholder/index.ts +11 -0
- package/src/Invoice/InvoiceController/InvoiceControllerState/index.ts +56 -48
- package/src/Invoice/InvoiceController/fns/addGood.ts +11 -11
- package/src/Invoice/InvoiceController/fns/addGoodDiscount.ts +125 -125
- package/src/Invoice/InvoiceController/fns/addGoodDiscountV2.ts +84 -0
- package/src/Invoice/InvoiceController/fns/delGood.ts +41 -43
- package/src/Invoice/InvoiceController/fns/getGoodsSearch.ts +23 -23
- package/src/Invoice/InvoiceController/fns/saveEditGood.ts +24 -23
- package/src/Invoice/InvoiceController/fns/setEditGood.ts +16 -16
- package/src/Invoice/InvoiceController/fns/setGoods.ts +10 -10
- package/src/Invoice/InvoiceController/fns/updateInvoiceNo.ts +8 -8
- package/src/Invoice/InvoiceController/index.ts +65 -61
- package/src/Invoice/_test/buyerNameSearch/index.tsx +41 -41
- package/src/Invoice/_test/deduction/index.tsx +935 -935
- package/src/Invoice/_test/draft/index.tsx +40 -40
- package/src/Invoice/_test/easiest/index.tsx +5 -5
- package/src/Invoice/_test/endowCode/index.tsx +1095 -1095
- package/src/Invoice/_test/goodsMenuExpand/index.tsx +32 -32
- package/src/Invoice/_test/importBuyer/index.tsx +74 -74
- package/src/Invoice/_test/importGoods/index.tsx +515 -515
- package/src/Invoice/_test/invoiceType/index.tsx +59 -59
- package/src/Invoice/_test/isInvoiceNo/index.tsx +12 -12
- package/src/Invoice/_test/replaceHead/index.tsx +22 -22
- package/src/Invoice/_test/retrieveData/index.tsx +22 -22
- package/src/Invoice/_test/seller/index.tsx +28 -28
- package/src/Invoice/_test/setDataSource/index.tsx +22 -22
- package/src/Invoice/_test/unit/index.tsx +19 -19
- package/src/Invoice/index.less +30 -12
- package/src/Invoice/index.md +53 -53
- package/src/Invoice/index.tsx +164 -109
- package/src/Invoice/tools/calculate/index.ts +112 -112
- package/src/Invoice/tools/coolingFn/index.ts +17 -17
- package/src/Invoice/tools/evaluate/index.ts +7 -7
- package/src/Invoice/tools/idGenerator/index.ts +2 -2
- package/src/Invoice/tools/itemName/index.ts +55 -55
- package/src/Invoice/tools/lazyFn/index.ts +19 -19
- package/src/Invoice/tools/mounting/index.ts +14 -0
- package/src/Invoice/tools/strringFn/index.ts +40 -40
- package/src/Invoice/{ui/GoodsList/hook → tools}/useToGenerateId/index.ts +8 -8
- package/src/Invoice/ui/{AddComparisonDrawer → default/AddComparisonDrawer}/index.tsx +149 -149
- package/src/Invoice/ui/{Buyer → default/Buyer}/index.less +219 -219
- package/src/Invoice/ui/{Buyer → default/Buyer}/index.tsx +114 -114
- package/src/Invoice/ui/{Buyer → default/Buyer}/ui/BuyerNameInput/index.tsx +166 -166
- package/src/Invoice/ui/{Buyer → default/Buyer}/ui/ImportBuyerButton/index.tsx +21 -21
- package/src/Invoice/ui/{EndowCodeDrawer → default/EndowCodeDrawer}/index.less +8 -8
- package/src/Invoice/ui/{EndowCodeDrawer → default/EndowCodeDrawer}/index.tsx +431 -431
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/autoFillFn/index.ts +519 -519
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/index.tsx +620 -620
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/ItemNameInput/index.less +9 -9
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/ItemNameInput/index.tsx +19 -19
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowEditButton/index.tsx +30 -30
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowMenu/hook/_useAddComparison/index.tsx +43 -43
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowMenu/hook/useAddDiscount/index.tsx +76 -76
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowMenu/hook/useDelItem/index.tsx +41 -35
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowMenu/hook/useEndowCode/index.tsx +34 -34
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowMenu/index.less +13 -13
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowMenu/index.tsx +98 -98
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowSaveButton/index.tsx +14 -14
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/TitleText/index.tsx +20 -20
- package/src/Invoice/ui/default/GoodsList/hook/useDeduction/index.tsx +24 -0
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useOnRow/index.tsx +39 -39
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useRowSelection/index.tsx +111 -111
- package/src/Invoice/ui/default/GoodsList/hook/useWindowClick/index.tsx +23 -0
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/index.less +177 -177
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/index.tsx +177 -177
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/AddRowButton/index.tsx +65 -61
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/BulkMenu/hooks/useAddDiscountRowButton/index.less +21 -21
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/BulkMenu/hooks/useAddDiscountRowButton/index.tsx +244 -244
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/BulkMenu/hooks/useCommodityComparisonButton/index.tsx +75 -75
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/BulkMenu/hooks/useDelRowButton/index.tsx +69 -66
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/BulkMenu/hooks/useEndowCodeButton/index.tsx +58 -58
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/BulkMenu/index.tsx +37 -37
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/DescribeSwitch/index.tsx +36 -36
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/Search/index.less +10 -10
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/Search/index.tsx +50 -50
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/Statistics/index.less +18 -18
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/Statistics/index.tsx +109 -109
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/TableRow/index.tsx +27 -27
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/TableVirtual/index.less +38 -38
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/TableVirtual/index.tsx +108 -108
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/TableVirtual.o/index.less +44 -44
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/TableVirtual.o/index.tsx +96 -96
- package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/TaxIncludedSwitch/index.tsx +30 -30
- package/src/Invoice/ui/{ImportBuyerDrawer → default/ImportBuyerDrawer}/index.tsx +75 -75
- package/src/Invoice/ui/{ImportGoodsDrawer → default/ImportGoodsDrawer}/index.tsx +170 -170
- package/src/Invoice/ui/{InvoiceHeader → default/InvoiceHeader}/index.less +68 -68
- package/src/Invoice/ui/{InvoiceHeader → default/InvoiceHeader}/index.tsx +246 -246
- package/src/Invoice/ui/{Seller → default/Seller}/index.less +113 -113
- package/src/Invoice/ui/{Seller → default/Seller}/index.tsx +98 -98
- package/src/Invoice/ui/{Sign → default/Sign}/index.less +14 -14
- package/src/Invoice/ui/{Sign → default/Sign}/index.tsx +71 -71
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/autoFillFn/index.ts +520 -0
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/index.tsx +623 -0
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/ItemNameInput/index.less +10 -0
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/ItemNameInput/index.tsx +19 -0
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowEditButton/index.tsx +30 -0
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/hook/_useAddComparison/index.tsx +43 -0
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/hook/useAddDiscount/index.tsx +76 -0
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/hook/useDelItem/index.tsx +41 -0
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/hook/useEndowCode/index.tsx +34 -0
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/index.less +13 -0
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/index.tsx +98 -0
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/spot.svg +1 -0
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowSaveButton/index.tsx +14 -0
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/TitleText/index.tsx +20 -0
- package/src/Invoice/ui/digtal/GoodsList/hook/useOnRow/index.tsx +39 -0
- package/src/Invoice/ui/digtal/GoodsList/hook/useRowSelection/index.tsx +112 -0
- package/src/Invoice/ui/digtal/GoodsList/hook/useWindowClick/index.tsx +23 -0
- package/src/Invoice/ui/digtal/GoodsList/index.less +57 -0
- package/src/Invoice/ui/digtal/GoodsList/index.tsx +181 -0
- package/src/Invoice/ui/digtal/GoodsList/ui/AddRowButton/index.tsx +66 -0
- package/src/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useAddDiscountRowButton/index.tsx +321 -0
- package/src/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useAddDiscountRowButton/svg/add.svg +12 -0
- package/src/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useCommodityComparisonButton/index.tsx +75 -0
- package/src/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useDelRowButton/index.tsx +50 -0
- package/src/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useEmptyRefill/index.tsx +35 -0
- package/src/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useEndowCodeButton/index.tsx +82 -0
- package/src/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useReselectInvoiceType/index.tsx +56 -0
- package/src/Invoice/ui/digtal/GoodsList/ui/DescribeSwitch/index.tsx +37 -0
- package/src/Invoice/ui/digtal/GoodsList/ui/Search/icon/magnifier.svg +1 -0
- package/src/Invoice/ui/digtal/GoodsList/ui/Search/index.less +12 -0
- package/src/Invoice/ui/digtal/GoodsList/ui/Search/index.tsx +50 -0
- package/src/Invoice/ui/digtal/GoodsList/ui/Statistics/index.less +54 -0
- package/src/Invoice/ui/digtal/GoodsList/ui/Statistics/index.tsx +99 -0
- package/src/Invoice/ui/digtal/GoodsList/ui/Statistics/svg/fork.svg +12 -0
- package/src/Invoice/ui/digtal/GoodsList/ui/TableRow/index.tsx +28 -0
- package/src/Invoice/ui/digtal/GoodsList/ui/TableVirtual/index.less +39 -0
- package/src/Invoice/ui/digtal/GoodsList/ui/TableVirtual/index.tsx +109 -0
- package/src/Invoice/ui/digtal/GoodsList/ui/TableVirtual.o/index.less +44 -0
- package/src/Invoice/ui/digtal/GoodsList/ui/TableVirtual.o/index.tsx +96 -0
- package/src/Invoice/ui/digtal/GoodsList/ui/TaxIncludedSwitch/index.tsx +31 -0
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/autoFillFn/index.ts +520 -0
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/index.tsx +624 -0
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/ItemNameInput/index.less +10 -0
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/ItemNameInput/index.tsx +19 -0
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowEditButton/index.tsx +30 -0
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/hook/_useAddComparison/index.tsx +43 -0
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/hook/useAddDiscount/index.tsx +76 -0
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/hook/useDelItem/index.tsx +41 -0
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/hook/useEndowCode/index.tsx +34 -0
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/index.less +13 -0
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/index.tsx +98 -0
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/spot.svg +1 -0
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowSaveButton/index.tsx +14 -0
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/TitleText/index.tsx +20 -0
- package/src/Invoice/ui/{GoodsList → digtal/GoodsList.o}/hook/useDeduction/index.tsx +24 -24
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useOnRow/index.tsx +39 -0
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useRowSelection/index.tsx +112 -0
- package/src/Invoice/ui/{GoodsList → digtal/GoodsList.o}/hook/useWindowClick/index.tsx +23 -23
- package/src/Invoice/ui/digtal/GoodsList.o/index.less +7 -0
- package/src/Invoice/ui/digtal/GoodsList.o/index.tsx +132 -0
- package/src/Invoice/ui/digtal/GoodsList.o/ui/AddRowButton/index.tsx +66 -0
- package/src/Invoice/ui/digtal/GoodsList.o/ui/TableRow/index.tsx +28 -0
- package/src/Invoice/ui/digtal/GoodsList.o/ui/TableVirtual/index.less +43 -0
- package/src/Invoice/ui/digtal/GoodsList.o/ui/TableVirtual/index.tsx +109 -0
- package/src/Invoice/ui/digtal/InvoiceHeader/index.less +58 -0
- package/src/Invoice/ui/digtal/InvoiceHeader/index.tsx +77 -0
- package/src/Invoice/ui/digtal/Sign/index.less +49 -0
- package/src/Invoice/ui/digtal/Sign/index.tsx +90 -0
- package/src/Invoice/ui/digtal/Stakeholder/index.less +57 -0
- package/src/Invoice/ui/digtal/Stakeholder/index.tsx +237 -0
- package/src/Invoice/ui/digtal/Stakeholder/svg/arrowDown.svg +3 -0
- package/src/Invoice/ui/digtal/Stakeholder/svg/arrowUp.svg +3 -0
- package/src/InvoiceTypeModal/_test/easiest/index.tsx +32 -0
- package/src/InvoiceTypeModal/index.less +8 -0
- package/src/InvoiceTypeModal/index.md +6 -0
- package/src/InvoiceTypeModal/index.tsx +123 -0
- package/src/index.ts +9 -6
- package/tsconfig.json +31 -31
- package/typings.d.ts +3 -3
- package/yarn.e.lock +14331 -14331
- package/yarn.o.lock +14800 -14800
- /package/dist/Invoice/ui/{AddComparisonDrawer → default/AddComparisonDrawer}/index.d.ts +0 -0
- /package/dist/Invoice/ui/{Buyer → default/Buyer}/ui/BuyerNameInput/index.d.ts +0 -0
- /package/dist/Invoice/ui/{Buyer → default/Buyer}/ui/ImportBuyerButton/index.d.ts +0 -0
- /package/dist/Invoice/ui/{EndowCodeDrawer → default/EndowCodeDrawer}/index.d.ts +0 -0
- /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/index.d.ts +0 -0
- /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/ItemNameInput/index.d.ts +0 -0
- /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowEditButton/index.d.ts +0 -0
- /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowSaveButton/index.d.ts +0 -0
- /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/TitleText/index.d.ts +0 -0
- /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/hook/useRowSelection/index.d.ts +0 -0
- /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/index.d.ts +0 -0
- /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/ui/AddRowButton/index.d.ts +0 -0
- /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/ui/BulkMenu/hooks/useAddDiscountRowButton/index.d.ts +0 -0
- /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/ui/BulkMenu/hooks/useCommodityComparisonButton/index.d.ts +0 -0
- /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/ui/BulkMenu/hooks/useDelRowButton/index.d.ts +0 -0
- /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/ui/BulkMenu/hooks/useEndowCodeButton/index.d.ts +0 -0
- /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/ui/BulkMenu/index.d.ts +0 -0
- /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/ui/DescribeSwitch/index.d.ts +0 -0
- /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/ui/Search/index.d.ts +0 -0
- /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/ui/Statistics/index.d.ts +0 -0
- /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/ui/TableRow/index.d.ts +0 -0
- /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/ui/TableVirtual/index.d.ts +0 -0
- /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/ui/TableVirtual.o/index.d.ts +0 -0
- /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/ui/TaxIncludedSwitch/index.d.ts +0 -0
- /package/dist/Invoice/ui/{ImportBuyerDrawer → default/ImportBuyerDrawer}/index.d.ts +0 -0
- /package/dist/Invoice/ui/{ImportGoodsDrawer → default/ImportGoodsDrawer}/index.d.ts +0 -0
- /package/dist/Invoice/ui/{InvoiceHeader → default/InvoiceHeader}/index.d.ts +0 -0
- /package/dist/Invoice/ui/{Sign → default/Sign}/index.d.ts +0 -0
- /package/dist/Invoice/ui/{GoodsList → digtal/GoodsList.o}/hook/useDeduction/index.d.ts +0 -0
- /package/dist/Invoice/ui/{GoodsList → digtal/GoodsList.o}/hook/useWindowClick/index.d.ts +0 -0
- /package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowMenu/spot.svg +0 -0
- /package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/Search/icon/magnifier.svg +0 -0
- /package/src/Invoice/ui/{InvoiceHeader → default/InvoiceHeader}/auto.svg +0 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
.kts-invoice-operate-invoice-digtal-stakeholder {
|
|
2
|
+
|
|
3
|
+
display: flex;
|
|
4
|
+
|
|
5
|
+
.digtal-stakeholder-expand-button{
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
&>div {
|
|
10
|
+
border-right: 2px solid #9F613E;
|
|
11
|
+
|
|
12
|
+
&:nth-child(even) {
|
|
13
|
+
flex : 1;
|
|
14
|
+
display : flex;
|
|
15
|
+
flex-direction : column;
|
|
16
|
+
justify-content: end;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&:nth-child(odd) {
|
|
20
|
+
flex : none;
|
|
21
|
+
text-align : center;
|
|
22
|
+
color : #9F613E;
|
|
23
|
+
display : flex;
|
|
24
|
+
flex-direction : column;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
justify-items : center;
|
|
27
|
+
padding : 0 4px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:last-child {
|
|
31
|
+
border-right: none;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.digtal-stakeholder-form {
|
|
36
|
+
|
|
37
|
+
padding: 20px 10px;
|
|
38
|
+
|
|
39
|
+
.ktsAnt3x-row.ktsAnt3x-form-item {
|
|
40
|
+
display : flex;
|
|
41
|
+
margin-bottom: 0;
|
|
42
|
+
|
|
43
|
+
.ktsAnt3x-form-item-label {
|
|
44
|
+
flex : none;
|
|
45
|
+
font-weight: 500;
|
|
46
|
+
|
|
47
|
+
label {
|
|
48
|
+
color: #9F603D;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.ktsAnt3x-form-item-control-wrapper {
|
|
53
|
+
flex: 1;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
|
|
2
|
+
import React from "react";
|
|
3
|
+
import Icon from '@ant-design/icons';
|
|
4
|
+
import { decorator } from "grey-react-box";
|
|
5
|
+
import { Form } from "kts-components-antd-x3";
|
|
6
|
+
import { Button, Col, Input, InputProps, Row } from 'kts-xui'
|
|
7
|
+
import { FormComponentProps } from "kts-components-antd-x3/lib/form";
|
|
8
|
+
import { ReactComponent as ArrowUpSvg } from './svg/arrowUp.svg';
|
|
9
|
+
import { ReactComponent as ArrowDownSvg } from './svg/arrowDown.svg';
|
|
10
|
+
import Invoice from "../../../../Invoice";
|
|
11
|
+
import './index.less';
|
|
12
|
+
|
|
13
|
+
const RULES = {
|
|
14
|
+
companyName: (label: string) => [
|
|
15
|
+
{ required: true, message: `${label}必填` },
|
|
16
|
+
{ max: 300, message: `${label}内容超长` },
|
|
17
|
+
{ pattern: /^([A-Za-z()\u4e00-\u9fa5])*$/g, message: `${label}仅能中文、英文、括号` }
|
|
18
|
+
],
|
|
19
|
+
taxId: (label: string) => [
|
|
20
|
+
{ max: 26, message: `${label}内容超长` },
|
|
21
|
+
{ pattern: /^([A-Z0-9])*$/g, message: `${label}仅能数字、英文大写` }
|
|
22
|
+
],
|
|
23
|
+
bankName: (label: string) => [
|
|
24
|
+
{ max: 120, message: `${label}内容超长` },
|
|
25
|
+
{ pattern: /^([\u4e00-\u9fa5])*$/g, message: `${label}仅能中文` }
|
|
26
|
+
],
|
|
27
|
+
bankAccount: (label: string) => [
|
|
28
|
+
{ max: 100, message: `${label}内容超长` },
|
|
29
|
+
{ pattern: /^([0-9])*$/g, message: `${label}仅能数字` }
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const formatCompanyName = (e: any) => {
|
|
34
|
+
const value = e?.target?.value;
|
|
35
|
+
if (value) {
|
|
36
|
+
return value.replace('(', '(').replace(')', ')').replace(' ', '');
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface IStakeholder {
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** 干系人 */
|
|
44
|
+
export default decorator<IStakeholder, IStakeholder & FormComponentProps>(Form.create())(props => {
|
|
45
|
+
|
|
46
|
+
const { form } = props;
|
|
47
|
+
|
|
48
|
+
const [isExpand, setExpand] = React.useState(true);
|
|
49
|
+
|
|
50
|
+
const { getFieldDecorator } = form;
|
|
51
|
+
|
|
52
|
+
const controller = Invoice.useInvoiceController();
|
|
53
|
+
|
|
54
|
+
const model = controller.useMemo(s => s.model, []);
|
|
55
|
+
|
|
56
|
+
const disableds = controller.useMemo(s => s.stakeholder.disableds || [], []);
|
|
57
|
+
|
|
58
|
+
const rulesMap = controller.useMemo(s => s.stakeholder.rulesMap || {}, []);
|
|
59
|
+
|
|
60
|
+
const readOnly = React.useMemo(() => model === 'readOnly', [model]);
|
|
61
|
+
|
|
62
|
+
const onExpand = React.useCallback(() => { setExpand(e => !e) }, []);
|
|
63
|
+
|
|
64
|
+
const isReadOnly = React.useCallback(field => readOnly || disableds.indexOf(field) >= 0, [disableds, readOnly]);
|
|
65
|
+
|
|
66
|
+
const getRules = React.useCallback((field, defaultRules) => {
|
|
67
|
+
if (isReadOnly(field)) return [];
|
|
68
|
+
return rulesMap[field] || defaultRules;
|
|
69
|
+
}, [rulesMap, isReadOnly, isReadOnly]);
|
|
70
|
+
|
|
71
|
+
controller.useForm('stakeholder', form);
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<div className="kts-invoice-operate-invoice-digtal-stakeholder" >
|
|
75
|
+
<div>
|
|
76
|
+
{'购买方信息'.split('').map(e => <span>{e}</span>)}
|
|
77
|
+
{
|
|
78
|
+
!readOnly &&
|
|
79
|
+
<Icon
|
|
80
|
+
className="digtal-stakeholder-expand-button"
|
|
81
|
+
component={isExpand ? ArrowUpSvg : ArrowDownSvg}
|
|
82
|
+
onClick={onExpand}
|
|
83
|
+
/>
|
|
84
|
+
}
|
|
85
|
+
</div>
|
|
86
|
+
<div>
|
|
87
|
+
<Form className="digtal-stakeholder-form" >
|
|
88
|
+
<Row gutter={[16, 0]}>
|
|
89
|
+
<Col span={24} >
|
|
90
|
+
<Form.Item label='名称' colon={false}>
|
|
91
|
+
{getFieldDecorator('buyerName', {
|
|
92
|
+
rules: getRules('buyerName', RULES.companyName('购买方名称')),
|
|
93
|
+
getValueFromEvent: formatCompanyName
|
|
94
|
+
})(<MyInput readOnly={isReadOnly('buyerName')} placeholder="请输入" autoComplete="off" />)}
|
|
95
|
+
</Form.Item>
|
|
96
|
+
</Col>
|
|
97
|
+
|
|
98
|
+
<Col span={24} >
|
|
99
|
+
<Form.Item label='统一社会信用代码/纳税人识别号' colon={false}>
|
|
100
|
+
{getFieldDecorator('buyerTaxId', {
|
|
101
|
+
rules: getRules('buyerTaxId', [{ required: true, message: '购买方纳税人识别号必填' }, ...RULES.taxId('购买方纳税人识别号')])
|
|
102
|
+
})(<MyInput readOnly={isReadOnly('buyerTaxId')} placeholder="请输入" autoComplete="off" />)}
|
|
103
|
+
</Form.Item>
|
|
104
|
+
</Col>
|
|
105
|
+
{
|
|
106
|
+
!readOnly && isExpand && (
|
|
107
|
+
<>
|
|
108
|
+
<Col span={15} >
|
|
109
|
+
<Form.Item label='购买方地址' colon={false}>
|
|
110
|
+
{getFieldDecorator('buyerAddress', {
|
|
111
|
+
rules: getRules('buyerAddress', [{ max: 300, message: '购买方地址内容超长' }])
|
|
112
|
+
})(<MyInput readOnly={isReadOnly('buyerAddress')} placeholder="请输入" autoComplete="off" />)}
|
|
113
|
+
</Form.Item>
|
|
114
|
+
</Col>
|
|
115
|
+
|
|
116
|
+
<Col span={9} >
|
|
117
|
+
<Form.Item label='电话' colon={false}>
|
|
118
|
+
{getFieldDecorator('buyerPhone', {
|
|
119
|
+
rules: getRules('buyerPhone', [{ max: 60, message: '购买方电话内容超长' }])
|
|
120
|
+
})(<MyInput readOnly={isReadOnly('buyerPhone')} placeholder="请输入" autoComplete="off" />)}
|
|
121
|
+
</Form.Item>
|
|
122
|
+
</Col>
|
|
123
|
+
|
|
124
|
+
<Col span={12} >
|
|
125
|
+
<Form.Item label='购买方开户银行' colon={false}>
|
|
126
|
+
{getFieldDecorator('buyerBank', {
|
|
127
|
+
rules: getRules('buyerBank', RULES.bankName('购买方开户银行'))
|
|
128
|
+
})(<MyInput readOnly={isReadOnly('buyerBank')} placeholder="请输入" autoComplete="off" />)}
|
|
129
|
+
</Form.Item>
|
|
130
|
+
</Col>
|
|
131
|
+
|
|
132
|
+
<Col span={12} >
|
|
133
|
+
<Form.Item label='银行账号' colon={false}>
|
|
134
|
+
{getFieldDecorator('buyerAccount', {
|
|
135
|
+
rules: getRules('buyerAccount', RULES.bankAccount('购买方银行账号'))
|
|
136
|
+
})(<MyInput readOnly={isReadOnly('buyerAccount')} placeholder="请输入" autoComplete="off" />)}
|
|
137
|
+
</Form.Item>
|
|
138
|
+
</Col>
|
|
139
|
+
</>
|
|
140
|
+
)
|
|
141
|
+
}
|
|
142
|
+
</Row>
|
|
143
|
+
</Form>
|
|
144
|
+
</div>
|
|
145
|
+
<div>
|
|
146
|
+
{'销售方信息'.split('').map(e => <span>{e}</span>)}
|
|
147
|
+
{
|
|
148
|
+
!readOnly &&
|
|
149
|
+
<Icon
|
|
150
|
+
className="digtal-stakeholder-expand-button"
|
|
151
|
+
component={isExpand ? ArrowUpSvg : ArrowDownSvg}
|
|
152
|
+
onClick={onExpand}
|
|
153
|
+
/>
|
|
154
|
+
}
|
|
155
|
+
</div>
|
|
156
|
+
<div>
|
|
157
|
+
{
|
|
158
|
+
!readOnly &&
|
|
159
|
+
<div style={{ marginTop: 20 }} >
|
|
160
|
+
<Button type="link" >查看当前可用授信额度</Button>
|
|
161
|
+
</div>
|
|
162
|
+
}
|
|
163
|
+
<Form className="digtal-stakeholder-form" >
|
|
164
|
+
<Row gutter={[16, 0]}>
|
|
165
|
+
<Col span={24} >
|
|
166
|
+
<Form.Item label='名称' colon={false}>
|
|
167
|
+
{getFieldDecorator('supplierName', {
|
|
168
|
+
rules: getRules('supplierName', RULES.companyName('销售方名称')),
|
|
169
|
+
getValueFromEvent: formatCompanyName
|
|
170
|
+
})(<MyInput readOnly={isReadOnly('supplierName')} placeholder="请输入" autoComplete="off" />)}
|
|
171
|
+
</Form.Item>
|
|
172
|
+
</Col>
|
|
173
|
+
|
|
174
|
+
<Col span={24} >
|
|
175
|
+
<Form.Item label='统一社会信用代码/纳税人识别号' colon={false}>
|
|
176
|
+
{getFieldDecorator('supplierTaxId', {
|
|
177
|
+
rules: getRules('supplierTaxId', [{ required: true, message: '销售方纳税人识别号必填' }, ...RULES.taxId('销售方纳税人识别号')])
|
|
178
|
+
})(<MyInput readOnly={isReadOnly('supplierTaxId')} placeholder="请输入" autoComplete="off" />)}
|
|
179
|
+
</Form.Item>
|
|
180
|
+
</Col>
|
|
181
|
+
{
|
|
182
|
+
!readOnly && isExpand && (
|
|
183
|
+
<>
|
|
184
|
+
<Col span={15} >
|
|
185
|
+
<Form.Item label='销售方地址' colon={false}>
|
|
186
|
+
{getFieldDecorator('sellerAddress', {
|
|
187
|
+
rules: getRules('sellerAddress', [{ max: 300, message: '销售方地址内容超长' }])
|
|
188
|
+
})(<MyInput readOnly={isReadOnly('sellerAddress')} placeholder="请输入" autoComplete="off" />)}
|
|
189
|
+
</Form.Item>
|
|
190
|
+
</Col>
|
|
191
|
+
|
|
192
|
+
<Col span={9} >
|
|
193
|
+
<Form.Item label='电话' colon={false}>
|
|
194
|
+
{getFieldDecorator('sellerPhone', {
|
|
195
|
+
rules: getRules('sellerPhone', [
|
|
196
|
+
{ required: true, message: '销售方电话必填' },
|
|
197
|
+
{ max: 60, message: '销售方电话内容超长' }
|
|
198
|
+
])
|
|
199
|
+
})(<MyInput readOnly={isReadOnly('sellerPhone')} placeholder="请输入" autoComplete="off" />)}
|
|
200
|
+
</Form.Item>
|
|
201
|
+
</Col>
|
|
202
|
+
|
|
203
|
+
<Col span={12} >
|
|
204
|
+
<Form.Item label='销售方开户银行' colon={false}>
|
|
205
|
+
{getFieldDecorator('sellerBank', {
|
|
206
|
+
rules: getRules('sellerBank', RULES.bankName('销售方开户银行'))
|
|
207
|
+
})(<MyInput readOnly={isReadOnly('sellerBank')} placeholder="请输入" autoComplete="off" />)}
|
|
208
|
+
</Form.Item>
|
|
209
|
+
</Col>
|
|
210
|
+
|
|
211
|
+
<Col span={12} >
|
|
212
|
+
<Form.Item label='银行账号' colon={false}>
|
|
213
|
+
{getFieldDecorator('sellerAccount', {
|
|
214
|
+
rules: getRules('sellerAccount', RULES.bankAccount('销售方银行账号'))
|
|
215
|
+
})(<MyInput readOnly={isReadOnly('sellerAccount')} placeholder="请输入" autoComplete="off" />)}
|
|
216
|
+
</Form.Item>
|
|
217
|
+
</Col>
|
|
218
|
+
</>
|
|
219
|
+
)
|
|
220
|
+
}
|
|
221
|
+
</Row>
|
|
222
|
+
</Form>
|
|
223
|
+
</div>
|
|
224
|
+
</div>
|
|
225
|
+
)
|
|
226
|
+
})
|
|
227
|
+
|
|
228
|
+
class MyInput extends React.Component<InputProps>{
|
|
229
|
+
render() {
|
|
230
|
+
const props = this.props;
|
|
231
|
+
if (props.readOnly) {
|
|
232
|
+
return <span>{props.value}</span>
|
|
233
|
+
} else {
|
|
234
|
+
return <Input {...props} />
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="13" viewBox="0 0 12 13" fill="none">
|
|
2
|
+
<path d="M2.94338 4.42663C3.03458 4.42662 3.12571 4.46481 3.19459 4.54096L5.99164 7.6327L8.78868 4.54096C8.92463 4.39067 9.14733 4.38824 9.28606 4.53554C9.4248 4.68285 9.42705 4.92408 9.29107 5.07437L6.24283 8.44378C6.17667 8.5169 6.08613 8.55811 5.99164 8.55811C5.89714 8.55811 5.80659 8.5169 5.74044 8.44378L2.69221 5.07437C2.55623 4.92408 2.55849 4.68285 2.69722 4.53554C2.76567 4.46287 2.85455 4.42665 2.94338 4.42663Z"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 13 13" fill="none">
|
|
2
|
+
<path d="M9.55662 8.57337C9.46542 8.57338 9.37429 8.53519 9.30541 8.45904L6.50836 5.3673L3.71132 8.45904C3.57537 8.60933 3.35267 8.61176 3.21394 8.46446C3.0752 8.31715 3.07295 8.07592 3.20893 7.92563L6.25717 4.55622C6.32333 4.4831 6.41387 4.44189 6.50836 4.44189C6.60286 4.44189 6.69341 4.4831 6.75956 4.55622L9.80779 7.92563C9.94377 8.07592 9.94151 8.31715 9.80278 8.46446C9.73433 8.53713 9.64545 8.57335 9.55662 8.57337Z"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InvoiceTypeModal } from '../../..';
|
|
3
|
+
import { Button } from 'kts-xui';
|
|
4
|
+
|
|
5
|
+
export default () => {
|
|
6
|
+
|
|
7
|
+
const [open, setOpen] = React.useState(false);
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<>
|
|
11
|
+
<Button onClick={() => { setOpen(true) }} >打开</Button>
|
|
12
|
+
<InvoiceTypeModal
|
|
13
|
+
open={open}
|
|
14
|
+
disableds={['business']}
|
|
15
|
+
onOk={e => console.log(e)}
|
|
16
|
+
onCancel={() => { setOpen(false) }}
|
|
17
|
+
defaultBusiness='1'
|
|
18
|
+
defaultInvoiceType='1'
|
|
19
|
+
businessOptions={[
|
|
20
|
+
{ label: '成品油', value: '1' }
|
|
21
|
+
]}
|
|
22
|
+
invoiceTypeOptions={[
|
|
23
|
+
{ label: '类型1', value: '1' },
|
|
24
|
+
{ label: '类型2', value: '2' },
|
|
25
|
+
{ label: '类型3', value: '3' },
|
|
26
|
+
{ label: '类型4', value: '4' },
|
|
27
|
+
{ label: '类型5', value: '5' },
|
|
28
|
+
]}
|
|
29
|
+
/>
|
|
30
|
+
</>
|
|
31
|
+
)
|
|
32
|
+
};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Col, Form, Modal, Radio, Row, Select } from "kts-xui";
|
|
4
|
+
import { DefaultOptionType } from "kts-components-antd-x4/lib/select";
|
|
5
|
+
import './index.less';
|
|
6
|
+
|
|
7
|
+
export interface IFormValues {
|
|
8
|
+
|
|
9
|
+
/** 开票种类 */
|
|
10
|
+
billingType: 'digital' | 'taxation';
|
|
11
|
+
|
|
12
|
+
/** 特定业务 */
|
|
13
|
+
business: any;
|
|
14
|
+
|
|
15
|
+
/** 选择票类 */
|
|
16
|
+
invoiceType: any;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface IInvoiceTypeModalProps {
|
|
20
|
+
|
|
21
|
+
/** 窗口标题 */
|
|
22
|
+
modalTitle?: string;
|
|
23
|
+
|
|
24
|
+
/** 是否开启 */
|
|
25
|
+
open?: boolean;
|
|
26
|
+
|
|
27
|
+
/** 点击了确认 */
|
|
28
|
+
onOk?: (values: IFormValues) => void;
|
|
29
|
+
|
|
30
|
+
/** 点击了取消 */
|
|
31
|
+
onCancel?: () => void;
|
|
32
|
+
|
|
33
|
+
/** 禁用列表 */
|
|
34
|
+
disableds?: ('billingType' | 'invoiceType' | 'business')[];
|
|
35
|
+
|
|
36
|
+
/** 选择票类 选项 */
|
|
37
|
+
invoiceTypeOptions?: DefaultOptionType[];
|
|
38
|
+
|
|
39
|
+
/** 特定业务 选项 */
|
|
40
|
+
businessOptions?: DefaultOptionType[];
|
|
41
|
+
|
|
42
|
+
/** 票类默认值 */
|
|
43
|
+
defaultInvoiceType?: any;
|
|
44
|
+
|
|
45
|
+
/** 特定业务默认值 */
|
|
46
|
+
defaultBusiness?: any;
|
|
47
|
+
|
|
48
|
+
/** 开票种类 默认值 */
|
|
49
|
+
defaultBillingType?: 'digital' | 'taxation';
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export default function InvoiceTypeModal(props: IInvoiceTypeModalProps) {
|
|
53
|
+
|
|
54
|
+
const { disableds = [] } = props;
|
|
55
|
+
|
|
56
|
+
const [form] = Form.useForm<IFormValues>();
|
|
57
|
+
|
|
58
|
+
const onConfirm = React.useCallback(async () => {
|
|
59
|
+
const values = await form.validateFields();
|
|
60
|
+
props.onOk && props.onOk(values);
|
|
61
|
+
}, [props.onOk])
|
|
62
|
+
|
|
63
|
+
React.useEffect(() => {
|
|
64
|
+
if (props.open) {
|
|
65
|
+
form.resetFields();
|
|
66
|
+
form.setFieldsValue({
|
|
67
|
+
billingType: props.defaultBillingType || 'digital',
|
|
68
|
+
invoiceType: props.defaultInvoiceType,
|
|
69
|
+
business: props.defaultBusiness,
|
|
70
|
+
})
|
|
71
|
+
}
|
|
72
|
+
}, [props.open, props.defaultBillingType, props.defaultBusiness, props.defaultInvoiceType, form])
|
|
73
|
+
|
|
74
|
+
return (
|
|
75
|
+
<Modal
|
|
76
|
+
title={props.modalTitle || "选择开具信息"}
|
|
77
|
+
open={props.open}
|
|
78
|
+
onOk={onConfirm}
|
|
79
|
+
onCancel={props.onCancel}
|
|
80
|
+
okText='确定'
|
|
81
|
+
cancelText='取消'
|
|
82
|
+
>
|
|
83
|
+
<Form form={form} layout="vertical" style={{ paddingTop: 20 }} >
|
|
84
|
+
<Row gutter={[16, 16]}>
|
|
85
|
+
<Col span={24} >
|
|
86
|
+
<Form.Item name='billingType' >
|
|
87
|
+
<Radio.Group
|
|
88
|
+
size='large'
|
|
89
|
+
className="goods-list-digtal-reselect-invoice-typeModal-radio"
|
|
90
|
+
optionType="button"
|
|
91
|
+
disabled={disableds.indexOf('billingType') >= 0}
|
|
92
|
+
options={[
|
|
93
|
+
{ label: '数电发票', value: 'digital' },
|
|
94
|
+
{ label: '税控发票', value: 'taxation' },
|
|
95
|
+
]}
|
|
96
|
+
/>
|
|
97
|
+
</Form.Item>
|
|
98
|
+
</Col>
|
|
99
|
+
|
|
100
|
+
<Col span={12} >
|
|
101
|
+
<Form.Item name='invoiceType' label="选择票类" >
|
|
102
|
+
<Select
|
|
103
|
+
size='large'
|
|
104
|
+
disabled={disableds.indexOf('invoiceType') >= 0}
|
|
105
|
+
options={props.invoiceTypeOptions}
|
|
106
|
+
/>
|
|
107
|
+
</Form.Item>
|
|
108
|
+
</Col>
|
|
109
|
+
|
|
110
|
+
<Col span={12} >
|
|
111
|
+
<Form.Item name='business' label="特定业务">
|
|
112
|
+
<Select
|
|
113
|
+
size='large'
|
|
114
|
+
disabled={disableds.indexOf('business') >= 0}
|
|
115
|
+
options={props.businessOptions}
|
|
116
|
+
/>
|
|
117
|
+
</Form.Item>
|
|
118
|
+
</Col>
|
|
119
|
+
</Row>
|
|
120
|
+
</Form>
|
|
121
|
+
</Modal>
|
|
122
|
+
)
|
|
123
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import 'kts-components-antd-x3/dist/kts-components-antd-x3.css';
|
|
3
|
-
|
|
4
|
-
export { default as Invoice } from './Invoice';
|
|
5
|
-
export { default as InvoiceController } from './Invoice/InvoiceController';
|
|
6
|
-
export type { default as IGood } from './Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IGood';
|
|
1
|
+
|
|
2
|
+
import 'kts-components-antd-x3/dist/kts-components-antd-x3.css';
|
|
3
|
+
|
|
4
|
+
export { default as Invoice } from './Invoice';
|
|
5
|
+
export { default as InvoiceController } from './Invoice/InvoiceController';
|
|
6
|
+
export type { default as IGood } from './Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IGood';
|
|
7
|
+
|
|
8
|
+
export { default as InvoiceTypeModal } from './InvoiceTypeModal';
|
|
9
|
+
export type { IInvoiceTypeModalProps } from './InvoiceTypeModal';
|
package/tsconfig.json
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "esnext",
|
|
4
|
-
"module": "esnext",
|
|
5
|
-
"moduleResolution": "node",
|
|
6
|
-
"importHelpers": true,
|
|
7
|
-
"jsx": "react",
|
|
8
|
-
"esModuleInterop": true,
|
|
9
|
-
"sourceMap": true,
|
|
10
|
-
"baseUrl": "./",
|
|
11
|
-
"strict": true,
|
|
12
|
-
"paths": {
|
|
13
|
-
"@/*": ["src/*"],
|
|
14
|
-
"@@/*": ["src/.umi/*"],
|
|
15
|
-
"kts-component-invoice-operate": ["src/*"]
|
|
16
|
-
},
|
|
17
|
-
"experimentalDecorators": true,
|
|
18
|
-
"allowSyntheticDefaultImports": true
|
|
19
|
-
},
|
|
20
|
-
"exclude": [
|
|
21
|
-
"node_modules",
|
|
22
|
-
"lib",
|
|
23
|
-
"es",
|
|
24
|
-
"dist",
|
|
25
|
-
"typings",
|
|
26
|
-
"**/__test__",
|
|
27
|
-
"test",
|
|
28
|
-
"docs",
|
|
29
|
-
"tests"
|
|
30
|
-
]
|
|
31
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "esnext",
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"moduleResolution": "node",
|
|
6
|
+
"importHelpers": true,
|
|
7
|
+
"jsx": "react",
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"sourceMap": true,
|
|
10
|
+
"baseUrl": "./",
|
|
11
|
+
"strict": true,
|
|
12
|
+
"paths": {
|
|
13
|
+
"@/*": ["src/*"],
|
|
14
|
+
"@@/*": ["src/.umi/*"],
|
|
15
|
+
"kts-component-invoice-operate": ["src/*"]
|
|
16
|
+
},
|
|
17
|
+
"experimentalDecorators": true,
|
|
18
|
+
"allowSyntheticDefaultImports": true
|
|
19
|
+
},
|
|
20
|
+
"exclude": [
|
|
21
|
+
"node_modules",
|
|
22
|
+
"lib",
|
|
23
|
+
"es",
|
|
24
|
+
"dist",
|
|
25
|
+
"typings",
|
|
26
|
+
"**/__test__",
|
|
27
|
+
"test",
|
|
28
|
+
"docs",
|
|
29
|
+
"tests"
|
|
30
|
+
]
|
|
31
|
+
}
|
package/typings.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare module '*.css';
|
|
2
|
-
declare module '*.less';
|
|
3
|
-
declare module '*.svg';
|
|
1
|
+
declare module '*.css';
|
|
2
|
+
declare module '*.less';
|
|
3
|
+
declare module '*.svg';
|