kts-component-invoice-operate 3.1.20 → 3.2.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 (286) hide show
  1. package/dist/Invoice/Invoice-digtal/_test/disabled/index.d.ts +4 -0
  2. package/dist/Invoice/Invoice-digtal/_test/easiest/index.d.ts +4 -0
  3. package/dist/Invoice/Invoice-digtal/_test/header/index.d.ts +4 -0
  4. package/dist/Invoice/Invoice-digtal/_test/importStakeholder/index.d.ts +4 -0
  5. package/dist/Invoice/Invoice-digtal/_test/readOnly/index.d.ts +4 -0
  6. package/dist/Invoice/Invoice-digtal/_test/stakeholder/index.d.ts +4 -0
  7. package/dist/Invoice/Invoice-digtal/_test/typeSelection/index.d.ts +4 -0
  8. package/dist/Invoice/InvoiceController/InvoiceControllerState/Stakeholder/index.d.ts +10 -0
  9. package/dist/Invoice/InvoiceController/InvoiceControllerState/index.d.ts +6 -0
  10. package/dist/Invoice/InvoiceController/fns/addGoodDiscount.d.ts +1 -1
  11. package/dist/Invoice/InvoiceController/fns/addGoodDiscountV2.d.ts +12 -0
  12. package/dist/Invoice/InvoiceController/fns/delGood.d.ts +1 -1
  13. package/dist/Invoice/InvoiceController/index.d.ts +2 -0
  14. package/dist/Invoice/index.d.ts +25 -12
  15. package/dist/Invoice/tools/mounting/index.d.ts +3 -0
  16. package/dist/Invoice/{ui/GoodsList/hook → tools}/useToGenerateId/index.d.ts +1 -1
  17. package/dist/Invoice/ui/{Buyer → default/Buyer}/index.d.ts +1 -1
  18. package/dist/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/autoFillFn/index.d.ts +2 -2
  19. package/dist/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowMenu/hook/_useAddComparison/index.d.ts +0 -1
  20. package/dist/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowMenu/hook/useAddDiscount/index.d.ts +1 -1
  21. package/dist/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowMenu/hook/useDelItem/index.d.ts +1 -1
  22. package/dist/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowMenu/hook/useEndowCode/index.d.ts +1 -1
  23. package/dist/Invoice/ui/default/GoodsList/hook/useColumns/ui/RowMenu/index.d.ts +7 -0
  24. package/dist/Invoice/ui/default/GoodsList/hook/useDeduction/index.d.ts +8 -0
  25. package/dist/Invoice/ui/{GoodsList → default/GoodsList}/hook/useOnRow/index.d.ts +1 -1
  26. package/dist/Invoice/ui/default/GoodsList/hook/useWindowClick/index.d.ts +8 -0
  27. package/dist/Invoice/ui/default/ImportGoodsDrawer/index.d.ts +3 -0
  28. package/dist/Invoice/ui/{Seller → default/Seller}/index.d.ts +1 -1
  29. package/dist/Invoice/ui/digtal/GoodsList/hook/useColumns/autoFillFn/index.d.ts +35 -0
  30. package/dist/Invoice/ui/digtal/GoodsList/hook/useColumns/index.d.ts +3 -0
  31. package/dist/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/ItemNameInput/index.d.ts +8 -0
  32. package/dist/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowEditButton/index.d.ts +6 -0
  33. package/dist/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/hook/_useAddComparison/index.d.ts +4 -0
  34. package/dist/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/hook/useAddDiscount/index.d.ts +7 -0
  35. package/dist/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/hook/useDelItem/index.d.ts +7 -0
  36. package/dist/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/hook/useEndowCode/index.d.ts +7 -0
  37. package/dist/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/index.d.ts +7 -0
  38. package/dist/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowSaveButton/index.d.ts +6 -0
  39. package/dist/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/TitleText/index.d.ts +8 -0
  40. package/dist/Invoice/ui/digtal/GoodsList/hook/useOnRow/index.d.ts +8 -0
  41. package/dist/Invoice/ui/digtal/GoodsList/hook/useRowSelection/index.d.ts +8 -0
  42. package/dist/Invoice/ui/digtal/GoodsList/hook/useWindowClick/index.d.ts +8 -0
  43. package/dist/Invoice/ui/digtal/GoodsList/index.d.ts +17 -0
  44. package/dist/Invoice/ui/digtal/GoodsList/ui/AddRowButton/index.d.ts +3 -0
  45. package/dist/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useAddDiscountRowButton/index.d.ts +5 -0
  46. package/dist/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useCommodityComparisonButton/index.d.ts +5 -0
  47. package/dist/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useDelRowButton/index.d.ts +6 -0
  48. package/dist/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useEmptyRefill/index.d.ts +6 -0
  49. package/dist/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useEndowCodeButton/index.d.ts +6 -0
  50. package/dist/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useReselectInvoiceType/index.d.ts +5 -0
  51. package/dist/Invoice/ui/digtal/GoodsList/ui/DescribeSwitch/index.d.ts +3 -0
  52. package/dist/Invoice/ui/digtal/GoodsList/ui/Search/index.d.ts +3 -0
  53. package/dist/Invoice/ui/digtal/GoodsList/ui/Statistics/index.d.ts +4 -0
  54. package/dist/Invoice/ui/digtal/GoodsList/ui/TableRow/index.d.ts +2 -0
  55. package/dist/Invoice/ui/digtal/GoodsList/ui/TableVirtual/index.d.ts +4 -0
  56. package/dist/Invoice/ui/digtal/GoodsList/ui/TableVirtual.o/index.d.ts +4 -0
  57. package/dist/Invoice/ui/digtal/GoodsList/ui/TaxIncludedSwitch/index.d.ts +3 -0
  58. package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/autoFillFn/index.d.ts +35 -0
  59. package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/index.d.ts +3 -0
  60. package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/ItemNameInput/index.d.ts +7 -0
  61. package/dist/Invoice/ui/{GoodsList/hook/useColumns/ui/RowMenu → digtal/GoodsList.o/hook/useColumns/ui/RowEditButton}/index.d.ts +0 -1
  62. package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/hook/_useAddComparison/index.d.ts +4 -0
  63. package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/hook/useAddDiscount/index.d.ts +7 -0
  64. package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/hook/useDelItem/index.d.ts +7 -0
  65. package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/hook/useEndowCode/index.d.ts +7 -0
  66. package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/index.d.ts +7 -0
  67. package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowSaveButton/index.d.ts +6 -0
  68. package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/TitleText/index.d.ts +8 -0
  69. package/dist/Invoice/ui/digtal/GoodsList.o/hook/useOnRow/index.d.ts +8 -0
  70. package/dist/Invoice/ui/digtal/GoodsList.o/hook/useRowSelection/index.d.ts +8 -0
  71. package/dist/Invoice/ui/digtal/GoodsList.o/index.d.ts +20 -0
  72. package/dist/Invoice/ui/digtal/GoodsList.o/ui/AddRowButton/index.d.ts +3 -0
  73. package/dist/Invoice/ui/digtal/GoodsList.o/ui/TableRow/index.d.ts +2 -0
  74. package/dist/Invoice/ui/digtal/GoodsList.o/ui/TableVirtual/index.d.ts +4 -0
  75. package/dist/Invoice/ui/digtal/InvoiceHeader/index.d.ts +14 -0
  76. package/dist/Invoice/ui/digtal/Sign/index.d.ts +10 -0
  77. package/dist/Invoice/ui/digtal/Stakeholder/index.d.ts +12 -0
  78. package/dist/InvoiceTypeModal/_test/easiest/index.d.ts +3 -0
  79. package/dist/InvoiceTypeModal/index.d.ts +34 -0
  80. package/dist/index.d.ts +2 -0
  81. package/dist/index.esm.js +6379 -189
  82. package/dist/index.js +6365 -174
  83. package/docs-dist/404.html +33 -33
  84. package/docs-dist/index.html +33 -33
  85. package/docs-dist/static/add.a70623b4.svg +12 -0
  86. package/docs-dist/static/arrowDown.a1cbf0d8.svg +3 -0
  87. package/docs-dist/static/arrowUp.4c482054.svg +3 -0
  88. package/docs-dist/static/fork.5431267d.svg +12 -0
  89. package/docs-dist/umi.css +19 -19
  90. package/docs-dist/umi.js +1 -1
  91. package/package.json +1 -1
  92. package/src/Invoice/Invoice-digtal/_test/disabled/index.tsx +38 -0
  93. package/src/Invoice/Invoice-digtal/_test/easiest/index.tsx +5 -0
  94. package/src/Invoice/Invoice-digtal/_test/header/index.tsx +17 -0
  95. package/src/Invoice/Invoice-digtal/_test/importGoods/index.tsx +471 -0
  96. package/src/Invoice/Invoice-digtal/_test/importStakeholder/index.tsx +17 -0
  97. package/src/Invoice/Invoice-digtal/_test/readOnly/index.tsx +42 -0
  98. package/src/Invoice/Invoice-digtal/_test/stakeholder/index.tsx +12 -0
  99. package/src/Invoice/Invoice-digtal/_test/typeSelection/index.tsx +29 -0
  100. package/src/Invoice/Invoice-digtal/index.md +25 -0
  101. package/src/Invoice/InvoiceController/InvoiceControllerState/Stakeholder/index.ts +11 -0
  102. package/src/Invoice/InvoiceController/InvoiceControllerState/index.ts +8 -0
  103. package/src/Invoice/InvoiceController/fns/addGoodDiscount.ts +1 -1
  104. package/src/Invoice/InvoiceController/fns/addGoodDiscountV2.ts +84 -0
  105. package/src/Invoice/InvoiceController/fns/delGood.ts +26 -28
  106. package/src/Invoice/InvoiceController/fns/saveEditGood.ts +1 -0
  107. package/src/Invoice/InvoiceController/index.ts +4 -0
  108. package/src/Invoice/_test/buyerNameSearch/index.tsx +2 -2
  109. package/src/Invoice/_test/easiest/index.tsx +1 -1
  110. package/src/Invoice/_test/endowCode/index.tsx +4 -4
  111. package/src/Invoice/_test/goodsMenuExpand/index.tsx +1 -1
  112. package/src/Invoice/_test/importBuyer/index.tsx +1 -1
  113. package/src/Invoice/_test/importGoods/index.tsx +1 -1
  114. package/src/Invoice/_test/invoiceType/index.tsx +1 -1
  115. package/src/Invoice/_test/seller/index.tsx +1 -1
  116. package/src/Invoice/_test/setDataSource/index.tsx +1 -1
  117. package/src/Invoice/_test/unit/index.tsx +1 -1
  118. package/src/Invoice/index.less +19 -1
  119. package/src/Invoice/index.md +6 -6
  120. package/src/Invoice/index.tsx +75 -18
  121. package/src/Invoice/tools/mounting/index.ts +14 -0
  122. package/src/Invoice/{ui/GoodsList/hook → tools}/useToGenerateId/index.ts +1 -1
  123. package/src/Invoice/ui/{AddComparisonDrawer → default/AddComparisonDrawer}/index.tsx +5 -5
  124. package/src/Invoice/ui/{Buyer → default/Buyer}/index.tsx +2 -2
  125. package/src/Invoice/ui/{Buyer → default/Buyer}/ui/BuyerNameInput/index.tsx +2 -2
  126. package/src/Invoice/ui/{Buyer → default/Buyer}/ui/ImportBuyerButton/index.tsx +1 -1
  127. package/src/Invoice/ui/{EndowCodeDrawer → default/EndowCodeDrawer}/index.tsx +5 -5
  128. package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/autoFillFn/index.ts +4 -4
  129. package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/index.tsx +3 -3
  130. package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowMenu/hook/useAddDiscount/index.tsx +2 -2
  131. package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowMenu/hook/useDelItem/index.tsx +2 -2
  132. package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowMenu/hook/useEndowCode/index.tsx +3 -3
  133. package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowMenu/index.tsx +2 -2
  134. package/src/Invoice/ui/default/GoodsList/hook/useDeduction/index.tsx +24 -0
  135. package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useOnRow/index.tsx +3 -3
  136. package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useRowSelection/index.tsx +2 -2
  137. package/src/Invoice/ui/default/GoodsList/hook/useWindowClick/index.tsx +23 -0
  138. package/src/Invoice/ui/{GoodsList → default/GoodsList}/index.tsx +2 -2
  139. package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/AddRowButton/index.tsx +2 -2
  140. package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/BulkMenu/hooks/useAddDiscountRowButton/index.tsx +4 -4
  141. package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/BulkMenu/hooks/useDelRowButton/index.tsx +2 -2
  142. package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/BulkMenu/hooks/useEndowCodeButton/index.tsx +2 -2
  143. package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/DescribeSwitch/index.tsx +1 -1
  144. package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/Search/index.tsx +1 -1
  145. package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/Statistics/index.tsx +1 -1
  146. package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/TableRow/index.tsx +2 -2
  147. package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/TaxIncludedSwitch/index.tsx +1 -1
  148. package/src/Invoice/ui/{ImportBuyerDrawer → default/ImportBuyerDrawer}/index.tsx +1 -1
  149. package/src/Invoice/ui/{ImportGoodsDrawer → default/ImportGoodsDrawer}/index.tsx +4 -4
  150. package/src/Invoice/ui/{InvoiceHeader → default/InvoiceHeader}/index.tsx +1 -1
  151. package/src/Invoice/ui/{Seller → default/Seller}/index.tsx +2 -2
  152. package/src/Invoice/ui/{Sign → default/Sign}/index.tsx +1 -1
  153. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/autoFillFn/index.ts +520 -0
  154. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/index.tsx +636 -0
  155. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/svg/plus.svg +12 -0
  156. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/ItemNameInput/index.less +10 -0
  157. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/ItemNameInput/index.tsx +24 -0
  158. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowEditButton/index.tsx +30 -0
  159. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/hook/_useAddComparison/index.tsx +43 -0
  160. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/hook/useAddDiscount/index.tsx +76 -0
  161. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/hook/useDelItem/index.tsx +41 -0
  162. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/hook/useEndowCode/index.tsx +34 -0
  163. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/index.less +13 -0
  164. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/index.tsx +98 -0
  165. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/spot.svg +1 -0
  166. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowSaveButton/index.tsx +14 -0
  167. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/TitleText/index.tsx +20 -0
  168. package/src/Invoice/ui/digtal/GoodsList/hook/useOnRow/index.tsx +39 -0
  169. package/src/Invoice/ui/digtal/GoodsList/hook/useRowSelection/index.tsx +112 -0
  170. package/src/Invoice/ui/digtal/GoodsList/hook/useWindowClick/index.tsx +23 -0
  171. package/src/Invoice/ui/digtal/GoodsList/index.less +57 -0
  172. package/src/Invoice/ui/digtal/GoodsList/index.tsx +180 -0
  173. package/src/Invoice/ui/digtal/GoodsList/ui/AddRowButton/index.tsx +66 -0
  174. package/src/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useAddDiscountRowButton/index.tsx +320 -0
  175. package/src/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useAddDiscountRowButton/svg/add.svg +12 -0
  176. package/src/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useCommodityComparisonButton/index.tsx +75 -0
  177. package/src/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useDelRowButton/index.tsx +50 -0
  178. package/src/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useEmptyRefill/index.tsx +35 -0
  179. package/src/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useEndowCodeButton/index.tsx +82 -0
  180. package/src/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useReselectInvoiceType/index.tsx +56 -0
  181. package/src/Invoice/ui/digtal/GoodsList/ui/DescribeSwitch/index.tsx +37 -0
  182. package/src/Invoice/ui/digtal/GoodsList/ui/Search/icon/magnifier.svg +1 -0
  183. package/src/Invoice/ui/digtal/GoodsList/ui/Search/index.less +12 -0
  184. package/src/Invoice/ui/digtal/GoodsList/ui/Search/index.tsx +50 -0
  185. package/src/Invoice/ui/digtal/GoodsList/ui/Statistics/index.less +54 -0
  186. package/src/Invoice/ui/digtal/GoodsList/ui/Statistics/index.tsx +99 -0
  187. package/src/Invoice/ui/digtal/GoodsList/ui/Statistics/svg/fork.svg +12 -0
  188. package/src/Invoice/ui/digtal/GoodsList/ui/TableRow/index.tsx +28 -0
  189. package/src/Invoice/ui/digtal/GoodsList/ui/TableVirtual/index.less +39 -0
  190. package/src/Invoice/ui/digtal/GoodsList/ui/TableVirtual/index.tsx +109 -0
  191. package/src/Invoice/ui/digtal/GoodsList/ui/TableVirtual.o/index.less +44 -0
  192. package/src/Invoice/ui/digtal/GoodsList/ui/TableVirtual.o/index.tsx +96 -0
  193. package/src/Invoice/ui/digtal/GoodsList/ui/TaxIncludedSwitch/index.tsx +31 -0
  194. package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/autoFillFn/index.ts +520 -0
  195. package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/index.tsx +624 -0
  196. package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/ItemNameInput/index.less +10 -0
  197. package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/ItemNameInput/index.tsx +19 -0
  198. package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowEditButton/index.tsx +30 -0
  199. package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/hook/_useAddComparison/index.tsx +43 -0
  200. package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/hook/useAddDiscount/index.tsx +76 -0
  201. package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/hook/useDelItem/index.tsx +41 -0
  202. package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/hook/useEndowCode/index.tsx +34 -0
  203. package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/index.less +13 -0
  204. package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/index.tsx +98 -0
  205. package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/spot.svg +1 -0
  206. package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowSaveButton/index.tsx +14 -0
  207. package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/TitleText/index.tsx +20 -0
  208. package/src/Invoice/ui/digtal/GoodsList.o/hook/useOnRow/index.tsx +39 -0
  209. package/src/Invoice/ui/digtal/GoodsList.o/hook/useRowSelection/index.tsx +112 -0
  210. package/src/Invoice/ui/digtal/GoodsList.o/index.less +7 -0
  211. package/src/Invoice/ui/digtal/GoodsList.o/index.tsx +132 -0
  212. package/src/Invoice/ui/digtal/GoodsList.o/ui/AddRowButton/index.tsx +66 -0
  213. package/src/Invoice/ui/digtal/GoodsList.o/ui/TableRow/index.tsx +28 -0
  214. package/src/Invoice/ui/digtal/GoodsList.o/ui/TableVirtual/index.less +43 -0
  215. package/src/Invoice/ui/digtal/GoodsList.o/ui/TableVirtual/index.tsx +109 -0
  216. package/src/Invoice/ui/digtal/InvoiceHeader/index.less +58 -0
  217. package/src/Invoice/ui/digtal/InvoiceHeader/index.tsx +77 -0
  218. package/src/Invoice/ui/digtal/Sign/index.less +49 -0
  219. package/src/Invoice/ui/digtal/Sign/index.tsx +90 -0
  220. package/src/Invoice/ui/digtal/Stakeholder/index.less +57 -0
  221. package/src/Invoice/ui/digtal/Stakeholder/index.tsx +260 -0
  222. package/src/Invoice/ui/digtal/Stakeholder/svg/arrowDown.svg +3 -0
  223. package/src/Invoice/ui/digtal/Stakeholder/svg/arrowUp.svg +3 -0
  224. package/src/Invoice/ui/digtal/Stakeholder/svg/plus.svg +12 -0
  225. package/src/InvoiceTypeModal/_test/easiest/index.tsx +32 -0
  226. package/src/InvoiceTypeModal/index.less +8 -0
  227. package/src/InvoiceTypeModal/index.md +6 -0
  228. package/src/InvoiceTypeModal/index.tsx +127 -0
  229. package/src/index.ts +3 -0
  230. /package/dist/Invoice/{ui/Buyer/ui/ImportBuyerButton → Invoice-digtal/_test/importGoods}/index.d.ts +0 -0
  231. /package/dist/Invoice/ui/{AddComparisonDrawer → default/AddComparisonDrawer}/index.d.ts +0 -0
  232. /package/dist/Invoice/ui/{Buyer → default/Buyer}/ui/BuyerNameInput/index.d.ts +0 -0
  233. /package/dist/Invoice/ui/{GoodsList/ui/AddRowButton → default/Buyer/ui/ImportBuyerButton}/index.d.ts +0 -0
  234. /package/dist/Invoice/ui/{EndowCodeDrawer → default/EndowCodeDrawer}/index.d.ts +0 -0
  235. /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/index.d.ts +0 -0
  236. /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/ItemNameInput/index.d.ts +0 -0
  237. /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowEditButton/index.d.ts +0 -0
  238. /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowSaveButton/index.d.ts +0 -0
  239. /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/TitleText/index.d.ts +0 -0
  240. /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/hook/useRowSelection/index.d.ts +0 -0
  241. /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/index.d.ts +0 -0
  242. /package/dist/Invoice/ui/{GoodsList/ui/DescribeSwitch → default/GoodsList/ui/AddRowButton}/index.d.ts +0 -0
  243. /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/ui/BulkMenu/hooks/useAddDiscountRowButton/index.d.ts +0 -0
  244. /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/ui/BulkMenu/hooks/useCommodityComparisonButton/index.d.ts +0 -0
  245. /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/ui/BulkMenu/hooks/useDelRowButton/index.d.ts +0 -0
  246. /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/ui/BulkMenu/hooks/useEndowCodeButton/index.d.ts +0 -0
  247. /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/ui/BulkMenu/index.d.ts +0 -0
  248. /package/dist/Invoice/ui/{GoodsList/ui/TaxIncludedSwitch → default/GoodsList/ui/DescribeSwitch}/index.d.ts +0 -0
  249. /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/ui/Search/index.d.ts +0 -0
  250. /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/ui/Statistics/index.d.ts +0 -0
  251. /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/ui/TableRow/index.d.ts +0 -0
  252. /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/ui/TableVirtual/index.d.ts +0 -0
  253. /package/dist/Invoice/ui/{GoodsList → default/GoodsList}/ui/TableVirtual.o/index.d.ts +0 -0
  254. /package/dist/Invoice/ui/{ImportBuyerDrawer → default/GoodsList/ui/TaxIncludedSwitch}/index.d.ts +0 -0
  255. /package/dist/Invoice/ui/{ImportGoodsDrawer → default/ImportBuyerDrawer}/index.d.ts +0 -0
  256. /package/dist/Invoice/ui/{InvoiceHeader → default/InvoiceHeader}/index.d.ts +0 -0
  257. /package/dist/Invoice/ui/{Sign → default/Sign}/index.d.ts +0 -0
  258. /package/dist/Invoice/ui/{GoodsList → digtal/GoodsList.o}/hook/useDeduction/index.d.ts +0 -0
  259. /package/dist/Invoice/ui/{GoodsList → digtal/GoodsList.o}/hook/useWindowClick/index.d.ts +0 -0
  260. /package/src/Invoice/ui/{Buyer → default/Buyer}/index.less +0 -0
  261. /package/src/Invoice/ui/{EndowCodeDrawer → default/EndowCodeDrawer}/index.less +0 -0
  262. /package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/ItemNameInput/index.less +0 -0
  263. /package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/ItemNameInput/index.tsx +0 -0
  264. /package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowEditButton/index.tsx +0 -0
  265. /package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowMenu/hook/_useAddComparison/index.tsx +0 -0
  266. /package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowMenu/index.less +0 -0
  267. /package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowMenu/spot.svg +0 -0
  268. /package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/RowSaveButton/index.tsx +0 -0
  269. /package/src/Invoice/ui/{GoodsList → default/GoodsList}/hook/useColumns/ui/TitleText/index.tsx +0 -0
  270. /package/src/Invoice/ui/{GoodsList → default/GoodsList}/index.less +0 -0
  271. /package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/BulkMenu/hooks/useAddDiscountRowButton/index.less +0 -0
  272. /package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/BulkMenu/hooks/useCommodityComparisonButton/index.tsx +0 -0
  273. /package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/BulkMenu/index.tsx +0 -0
  274. /package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/Search/icon/magnifier.svg +0 -0
  275. /package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/Search/index.less +0 -0
  276. /package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/Statistics/index.less +0 -0
  277. /package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/TableVirtual/index.less +0 -0
  278. /package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/TableVirtual/index.tsx +0 -0
  279. /package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/TableVirtual.o/index.less +0 -0
  280. /package/src/Invoice/ui/{GoodsList → default/GoodsList}/ui/TableVirtual.o/index.tsx +0 -0
  281. /package/src/Invoice/ui/{InvoiceHeader → default/InvoiceHeader}/auto.svg +0 -0
  282. /package/src/Invoice/ui/{InvoiceHeader → default/InvoiceHeader}/index.less +0 -0
  283. /package/src/Invoice/ui/{Seller → default/Seller}/index.less +0 -0
  284. /package/src/Invoice/ui/{Sign → default/Sign}/index.less +0 -0
  285. /package/src/Invoice/ui/{GoodsList → digtal/GoodsList.o}/hook/useDeduction/index.tsx +0 -0
  286. /package/src/Invoice/ui/{GoodsList → digtal/GoodsList.o}/hook/useWindowClick/index.tsx +0 -0
@@ -0,0 +1,66 @@
1
+ import React from 'react';
2
+ import Invoice from '../../../../..';
3
+ import { Button, message } from 'kts-xui';
4
+ import InvoiceController, { LineAttributeType } from '../../../../../InvoiceController';
5
+
6
+ export default () => {
7
+ const controller = Invoice.useInvoiceController();
8
+
9
+ const model = controller.useMemo(s => s.model, []);
10
+
11
+ const rootElement = controller.useMemo(s => s.rootElement, []);
12
+
13
+ /** 产品数据量 */
14
+ const goodsNum = controller.useMemo(s => s.goodsListState.goodsList.length, []);
15
+
16
+ /** 搜索条件 */
17
+ const searchValue = controller.useMemo(s => s.goodsListState.searchValue, []);
18
+
19
+ /** 搜索条件 */
20
+ const isAddRow = controller.useMemo(s => s.goodsListState.isAddRow, []);
21
+
22
+ /** 产品最大数 */
23
+ const goodMax = controller.useMemo(s => s.goodsListState.goodMax, []);
24
+
25
+ /** 按钮是否禁用 */
26
+ const disabled = React.useMemo(() => typeof goodMax === 'number' ? goodsNum >= goodMax : !!searchValue, [goodMax, goodsNum, searchValue])
27
+
28
+ const onClick = React.useCallback(async () => {
29
+ await addGood(controller);
30
+ await rollBottom(controller, rootElement);
31
+ }, [controller, rootElement]);
32
+
33
+ if (isAddRow === false) return <></>;
34
+ if (model === 'prefab') return <></>;
35
+ if (model === 'readOnly') return <></>;
36
+
37
+ return (
38
+ <Button onClick={onClick} disabled={disabled} size='small'>
39
+ 添加行
40
+ </Button>
41
+ );
42
+ };
43
+
44
+ /** 添加一个空货物 */
45
+ async function addGood(controller: InvoiceController) {
46
+ await controller.saveEditGood();
47
+ await controller.wait();
48
+ await controller.run(async (s) => {
49
+ if (s.goodsListState.editGood) {
50
+ message.error({
51
+ content: '你正在编辑一个货物',
52
+ key: '你正在编辑一个货物',
53
+ });
54
+ return;
55
+ }
56
+ s.goodsListState.editGood = await controller.addGood({ taxRate: s.goodsListState.defaultRate, lineAttribute: LineAttributeType.正常 });
57
+ });
58
+ }
59
+
60
+ /** 货物列表,滚动到底部 */
61
+ async function rollBottom(controller: InvoiceController, rootElement: HTMLDivElement | null | undefined) {
62
+ await controller.wait();
63
+ const cont = rootElement?.querySelector('.ktsAntX-table-body');
64
+ if (!cont) return;
65
+ cont.scrollTop = cont.scrollHeight;
66
+ }
@@ -0,0 +1,28 @@
1
+ import React from "react";
2
+ import Invoice from '../../../../..';
3
+ import { LineAttributeType } from '../../../../../InvoiceController'
4
+ import classnames from 'classnames'
5
+
6
+ export default function TableRow(props: any) {
7
+
8
+ const controller = Invoice.useInvoiceController();
9
+
10
+ const goodsMap = controller.useMemo(s => s.goodsListState.goodsMap, [])
11
+
12
+ const discount = React.useMemo(() => {
13
+ const i = goodsMap.get(props['data-row-key']);
14
+ if (!i) return undefined;
15
+
16
+ if (i.lineAttribute === LineAttributeType.折扣行) {
17
+ return 'kts-invoice-operate-goods-be-discount'
18
+ } else if (i.lineAttribute === LineAttributeType.被折扣行) {
19
+ return 'kts-invoice-operate-goods-discount'
20
+ } else {
21
+ return undefined;
22
+ }
23
+ }, [props['data-row-key'], goodsMap])
24
+
25
+ return (
26
+ <tr {...props} className={classnames(props.className, discount)} />
27
+ )
28
+ }
@@ -0,0 +1,43 @@
1
+ .kts-invoice-operate-goods-table-virtual-digtal {
2
+
3
+ .ktsAntX-table-body {
4
+ height: 280px;
5
+ }
6
+
7
+ .ktsAntX-table .ktsAntX-table-thead>tr>th {
8
+ color: #9F603D;
9
+ }
10
+
11
+ .ktsAntX-table.ktsAntX-table-bordered>.ktsAntX-table-container>.ktsAntX-table-header>table>thead>tr>th {
12
+ padding : 0 10px;
13
+ height : 32px;
14
+ background: #f4f4f4;
15
+ }
16
+
17
+ .ktsAntX-table.ktsAntX-table-bordered>.ktsAntX-table-container>.ktsAntX-table-body>table>tbody>tr>td {
18
+ padding: 0;
19
+ height : 32px;
20
+ }
21
+
22
+ .ktsAntX-table .ktsAntX-table-body {
23
+ position: relative;
24
+ }
25
+
26
+ .ktsAntX-table .ktsAntX-table-body>table {
27
+ position: absolute;
28
+ left : 0;
29
+ top : 0;
30
+ }
31
+
32
+ .ktsAntX-table .ktsAntX-table-tbody {
33
+ position: relative;
34
+ }
35
+
36
+ .ktsAntX-checkbox-wrapper .ktsAntX-checkbox-inner {
37
+ width : 16px;
38
+ height : 16px;
39
+ border : 1px solid #d9d9d9;
40
+ border-radius: 2px;
41
+ top : 1px;
42
+ }
43
+ }
@@ -0,0 +1,109 @@
1
+
2
+ import React from "react";
3
+ import { TableManual, TableProps } from "kts-xui";
4
+ import { Table } from 'kts-components-antd-x4-v4';
5
+ import './index.less';
6
+
7
+ export default function <T extends object = any>(props: TableProps<T>) {
8
+
9
+ const [self, setSelf] = React.useState<HTMLSpanElement | null>(null);
10
+
11
+ const tableBody = React.useMemo(() => {
12
+ if (!self) return;
13
+ return self.querySelector('.ktsAntX-table-body') as HTMLDivElement;
14
+ }, [self]);
15
+
16
+ /** 显示指针 */
17
+ const [pointer, setPointer] = React.useState(0);
18
+
19
+ /** 行高 */
20
+ const rowHeight = React.useMemo(() => {
21
+ if (!self) return 33;
22
+
23
+ const td = self.querySelector('.ktsAntX-table-tbody .ktsAntX-table-row');
24
+ if (!td) return 33;
25
+
26
+ return td.clientHeight;
27
+ }, [self, props.dataSource]);
28
+
29
+ /** 间隔容器 */
30
+ const placeholder = React.useMemo(() => {
31
+ if (!self || !tableBody) return;
32
+ let placeholder = tableBody.querySelector('.table-virtual-placeholder') as HTMLDivElement;
33
+ if (!placeholder) {
34
+ placeholder = document.createElement('div');
35
+ placeholder.className = 'table-virtual-placeholder';
36
+ tableBody.appendChild(placeholder);
37
+ }
38
+ return placeholder;
39
+ }, [self, tableBody]);
40
+
41
+ // 设置占位dom的搞
42
+ const placeholderHeight = React.useMemo(() => {
43
+ if (!self || !rowHeight || !props.dataSource || !placeholder) return;
44
+ const placeholderHeight = rowHeight * props.dataSource.length;
45
+ placeholder.style.height = `${placeholderHeight}px`;
46
+ return placeholderHeight;
47
+ }, [self, rowHeight, props.dataSource, placeholder]);
48
+
49
+ /** 可以容纳的行数 */
50
+ const rowSize = React.useMemo(() => {
51
+ if (!tableBody! || !rowHeight) return 0;
52
+ return Math.ceil(tableBody.clientHeight / rowHeight);
53
+ }, [tableBody, rowHeight, placeholderHeight]);
54
+
55
+ // 计算渲染的行
56
+ const dataSource = React.useMemo(() => {
57
+ if (!props.dataSource) return [];
58
+ if (props.dataSource.length < 10) return props.dataSource;
59
+
60
+ if (!rowSize) return [props.dataSource[0]];
61
+ return props.dataSource?.slice(pointer, pointer + 2 * rowSize);
62
+ }, [props.dataSource, pointer, rowSize]);
63
+
64
+ // 监听滚动
65
+ React.useEffect(() => {
66
+ if (!self || !placeholder || !props.dataSource || !rowHeight || !tableBody)
67
+ return;
68
+
69
+ const onScroll = () => {
70
+ if (!props.dataSource || !tableBody) return;
71
+ setPointer(Math.floor((props.dataSource.length - rowSize) * (tableBody.scrollTop / (placeholder.clientHeight - tableBody.clientHeight))));
72
+ };
73
+ onScroll();
74
+
75
+ tableBody.addEventListener('scroll', onScroll);
76
+ return () => {
77
+ tableBody.removeEventListener('scroll', onScroll);
78
+ };
79
+ }, [self, placeholder, props.dataSource, rowHeight, rowSize]);
80
+
81
+ // 移动列表
82
+ React.useEffect(() => {
83
+ if (!self) return;
84
+
85
+ const table = self.querySelector('.ktsAntX-table .ktsAntX-table-body>table') as HTMLDivElement;
86
+ if (!table) return;
87
+
88
+ table.style.top = `${pointer * rowHeight}px`;
89
+ }, [pointer, self, rowHeight]);
90
+
91
+ React.useEffect(() => {
92
+ if (!self) return;
93
+ const cont = self.querySelector('.kts-invoice-operate-goods-table-virtual .ktsAntX-table-body');
94
+ if (!cont) return;
95
+
96
+ cont.scrollTop = 0;
97
+ }, [props.dataSource?.length])
98
+
99
+ return (
100
+ <span className="kts-invoice-operate-goods-table-virtual-digtal" ref={(e) => { setSelf(e) }} >
101
+ <TableManual
102
+ {...props}
103
+ dataSource={dataSource}
104
+ // 新版本Table会有输入框无法连续输入的问题,先兼容老版本
105
+ tableComponent={Table as any}
106
+ />
107
+ </span>
108
+ )
109
+ }
@@ -0,0 +1,58 @@
1
+ .kts-invoice-operate-invoice-digtal-header {
2
+ height : 121px;
3
+ text-align: center;
4
+ position : relative;
5
+
6
+
7
+ .digtal-header-title {
8
+ font-size : 28px;
9
+ color : #9F603D;
10
+ width : 100%;
11
+ position : absolute;
12
+ top : 21px;
13
+ font-weight: 400;
14
+
15
+ &::after,
16
+ &::before {
17
+ content : "";
18
+ position : absolute;
19
+ width : 330px;
20
+ border-bottom: 2px solid #9F613E;
21
+ left : 50%;
22
+ bottom : -4px;
23
+ transform : translateX(-50%);
24
+ }
25
+
26
+ &::after {
27
+ bottom: -8px;
28
+ }
29
+ }
30
+
31
+ .digtal-header-tag {
32
+ position : absolute;
33
+ top : 47px;
34
+ left : 157px;
35
+ padding : 2px 8px;
36
+ border-radius: 4px;
37
+ border : 1px solid #0074FF;
38
+ color : #0074FF;
39
+ background : rgba(0, 116, 255, 0.20);
40
+ }
41
+
42
+ .digtal-header-fields {
43
+ display : flex;
44
+ flex-direction: column;
45
+ position : absolute;
46
+ right : 40px;
47
+ top : 23px;
48
+
49
+ .digtal-header-field {
50
+ display : flex;
51
+ font-weight: bold;
52
+
53
+ .digtal-header-field-title {
54
+ color: #9F613E;
55
+ }
56
+ }
57
+ }
58
+ }
@@ -0,0 +1,77 @@
1
+
2
+ import React from "react";
3
+ import { Form } from 'kts-components-antd-x3';
4
+ import { FormComponentProps } from 'kts-components-antd-x3/lib/form';
5
+ import { decorator } from "grey-react-box";
6
+ import Invoice from "../../../../Invoice";
7
+ import './index.less'
8
+
9
+
10
+ export interface IInvoiceHeader {
11
+ /** 标题 */
12
+ title?: string;
13
+
14
+ /** 标记文字 */
15
+ defaultTag?: string;
16
+
17
+ /** 默认 发票号码 */
18
+ defaultNo?: string;
19
+
20
+ /** 默认 开票日期 */
21
+ defaultInvoicingDate?: string;
22
+ }
23
+
24
+ export default decorator<IInvoiceHeader, IInvoiceHeader & FormComponentProps>(Form.create())(props => {
25
+
26
+ const { form } = props;
27
+
28
+ /** 控制器 */
29
+ const controller = Invoice.useInvoiceController();
30
+
31
+ const title = React.useMemo(() => {
32
+ if (props.title) {
33
+ return props.title
34
+ }
35
+ return '电子发票(增值税专用发票)'
36
+ }, [props.title])
37
+
38
+ controller.useForm('invoiceHeader', form);
39
+
40
+ return (
41
+ <div className="kts-invoice-operate-invoice-digtal-header" >
42
+ <div className="digtal-header-title" >{title}</div>
43
+ {form.getFieldDecorator('tag', { initialValue: props.defaultTag })(<Tag />)}
44
+ <div className="digtal-header-fields" >
45
+ {form.getFieldDecorator('no', { initialValue: props.defaultNo })(<Field title="发票号码:" />)}
46
+ {form.getFieldDecorator('invoicingDate', { initialValue: props.defaultInvoicingDate })(<Field title="开票日期:" />)}
47
+ </div>
48
+ </div>
49
+ )
50
+ })
51
+
52
+ /** 字段 */
53
+ class Field extends React.Component<{ title: string, value?: string }>{
54
+ render(): React.ReactNode {
55
+ const { title, value } = this.props;
56
+ if (value) {
57
+ return (
58
+ <div className="digtal-header-field" >
59
+ <div className="digtal-header-field-title" >{title}</div>
60
+ <div className="digtal-header-field-value" >{value}</div>
61
+ </div>
62
+ )
63
+ } else {
64
+ return <></>
65
+ }
66
+ }
67
+ }
68
+
69
+ class Tag extends React.Component<{ value?: string }>{
70
+ render(): React.ReactNode {
71
+ return (
72
+ this.props.value
73
+ ? <div className="digtal-header-tag" >{this.props.value}</div>
74
+ : <></>
75
+ )
76
+ }
77
+ }
@@ -0,0 +1,49 @@
1
+ .kts-invoice-operate-sign-digtal {
2
+ padding : 20px 20px 0;
3
+ border-bottom: 2px solid #9F613E;
4
+ border-left : 2px solid #9F613E;
5
+ border-right : 2px solid #9F613E;
6
+
7
+ .sign-digtal-label {
8
+ color : #9F613E;
9
+ font-weight: bold;
10
+ }
11
+ }
12
+
13
+ .kts-invoice-operate-sign-digtal-readOnly {
14
+ .sign-digtal-readOnly-cont {
15
+ border-bottom: 2px solid #9F613E;
16
+ border-left : 2px solid #9F613E;
17
+ border-right : 2px solid #9F613E;
18
+ display : flex;
19
+
20
+ &>div:nth-child(even) {
21
+ flex : 1;
22
+ display : flex;
23
+ flex-direction: column;
24
+ padding : 10px;
25
+ min-height : 189px;
26
+ }
27
+
28
+ &>div:nth-child(odd) {
29
+ flex : none;
30
+ text-align : center;
31
+ color : #9F613E;
32
+ display : flex;
33
+ flex-direction : column;
34
+ justify-content: center;
35
+ justify-items : center;
36
+ padding : 0 4px;
37
+ border-right : 2px solid #9F613E;
38
+ }
39
+ }
40
+
41
+ .digtal-readOnly-form {
42
+ padding-left: 30px;
43
+
44
+ .ktsAnt3x-form-item-label label {
45
+ color : #9F613E;
46
+ font-weight: bold;
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,90 @@
1
+
2
+ import React from 'react';
3
+ import { Input } from 'kts-xui';
4
+ import { Form } from 'kts-components-antd-x3';
5
+ import { decorator } from 'grey-react-box';
6
+ import { FormComponentProps } from 'kts-components-antd-x3/lib/form';
7
+ import Invoice from '../../..';
8
+ import './index.less';
9
+
10
+ export interface IBuyerProps {
11
+
12
+ /** 默认备注 */
13
+ defaultRemark?: string;
14
+
15
+ /** 默认开票人 */
16
+ defaultIssuer?: string;
17
+ }
18
+
19
+ export default decorator<IBuyerProps, IBuyerProps & FormComponentProps>(Form.create())((props) => {
20
+
21
+ const { form } = props;
22
+
23
+ const { getFieldDecorator } = form;
24
+
25
+ /** 控制器 */
26
+ const controller = Invoice.useInvoiceController();
27
+
28
+ const model = controller.useMemo(s => s.model, []);
29
+
30
+ const disableds = controller.useMemo(s => s.stakeholder.disableds || [], []);
31
+
32
+ const readOnly = React.useMemo(() => model === 'readOnly', [model]);
33
+
34
+ const isReadOnly = React.useCallback(field => disableds.indexOf(field) >= 0, [disableds])
35
+
36
+ // 注册 form
37
+ controller.useForm('sign', form);
38
+
39
+ if (readOnly) {
40
+ return (
41
+ <div className="kts-invoice-operate-sign-digtal-readOnly">
42
+ <div className='sign-digtal-readOnly-cont' >
43
+ <div>
44
+ <span>备</span>
45
+ <span>注</span>
46
+ </div>
47
+ <div>
48
+ {getFieldDecorator('remark', {
49
+ initialValue: props.defaultRemark
50
+ })(<MyDiv />)}
51
+ </div>
52
+ </div>
53
+ <Form layout='inline' className='digtal-readOnly-form' >
54
+ <Form.Item label='开票人' >
55
+ {getFieldDecorator('issuer', {
56
+ initialValue: props.defaultRemark
57
+ })(<MyDiv />)}
58
+ </Form.Item>
59
+ </Form>
60
+ </div>
61
+ );
62
+ } else {
63
+ return (
64
+ <div className="kts-invoice-operate-sign-digtal">
65
+ <div className='sign-digtal-label' >备注信息</div>
66
+ <Form>
67
+ <Form.Item label="备注" >
68
+ {getFieldDecorator('remark', {
69
+ initialValue: props.defaultRemark
70
+ })(<Input.TextArea readOnly={isReadOnly('remark')} autoSize placeholder='请输入' />)}
71
+ </Form.Item>
72
+
73
+ <Form.Item label="开票人" >
74
+ {getFieldDecorator('issuer', {
75
+ initialValue: props.defaultIssuer
76
+ })(<Input readOnly={isReadOnly('issuer')} style={{ width: 313 }} placeholder='请输入' />)}
77
+ </Form.Item>
78
+ </Form>
79
+ </div>
80
+ );
81
+ }
82
+ });
83
+
84
+ class MyDiv extends React.Component<{ value?: string }> {
85
+ render(): React.ReactNode {
86
+ return (
87
+ <div>{this.props.value}</div>
88
+ )
89
+ }
90
+ }
@@ -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
+ }