kts-component-invoice-operate 3.2.258 → 3.2.260

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 (338) hide show
  1. package/.dumi/theme/builtins/API.tsx +66 -66
  2. package/.editorconfig +16 -16
  3. package/.fatherrc.ts +4 -4
  4. package/.prettierignore +7 -7
  5. package/.prettierrc +11 -11
  6. package/.umirc.ts +8 -8
  7. package/.vscode/settings.json +13 -13
  8. package/BRANCH.md +4 -4
  9. package/README.md +12 -12
  10. package/dist/Invoice/Invoice-digtal/_test/passenger/index.d.ts +4 -0
  11. package/dist/Invoice/InvoiceController/InvoiceControllerState/PassengerListState/IColumnsReplenish/index.d.ts +6 -0
  12. package/dist/Invoice/InvoiceController/InvoiceControllerState/PassengerListState/IGood/index.d.ts +24 -0
  13. package/dist/Invoice/InvoiceController/InvoiceControllerState/PassengerListState/index.d.ts +44 -0
  14. package/dist/Invoice/InvoiceController/InvoiceControllerState/index.d.ts +5 -0
  15. package/dist/Invoice/InvoiceController/fns/addPassenger.d.ts +6 -0
  16. package/dist/Invoice/InvoiceController/fns/delPassenger.d.ts +6 -0
  17. package/dist/Invoice/InvoiceController/fns/saveEditPassenger.d.ts +6 -0
  18. package/dist/Invoice/InvoiceController/fns/setEditPassenger.d.ts +6 -0
  19. package/dist/Invoice/InvoiceController/index.d.ts +12 -0
  20. package/dist/Invoice/index.d.ts +2 -0
  21. package/dist/Invoice/ui/components/CustomCascader/index.d.ts +20 -0
  22. package/dist/Invoice/ui/default/ImportPassengerDrawer/index.d.ts +3 -0
  23. package/dist/Invoice/ui/digtal/PassengerList/hook/useColumns/index.d.ts +3 -0
  24. package/dist/Invoice/ui/digtal/PassengerList/hook/useColumns/ui/TitleText/index.d.ts +8 -0
  25. package/dist/Invoice/ui/digtal/PassengerList/hook/useOnRow/index.d.ts +8 -0
  26. package/dist/Invoice/ui/digtal/PassengerList/hook/useRowSelection/index.d.ts +8 -0
  27. package/dist/Invoice/ui/digtal/PassengerList/hook/useWindowClick/index.d.ts +8 -0
  28. package/dist/Invoice/ui/digtal/PassengerList/index.d.ts +18 -0
  29. package/dist/Invoice/ui/digtal/PassengerList/ui/AddRowButton/index.d.ts +3 -0
  30. package/dist/Invoice/ui/digtal/PassengerList/ui/BatchImportButton/index.d.ts +3 -0
  31. package/dist/Invoice/ui/digtal/PassengerList/ui/BulkMenu/hooks/useDelRowButton/index.d.ts +6 -0
  32. package/dist/Invoice/ui/digtal/PassengerList/ui/BulkMenu/hooks/useEmptyRefill/index.d.ts +6 -0
  33. package/dist/Invoice/ui/digtal/PassengerList/ui/TableRow/index.d.ts +3 -0
  34. package/dist/Invoice/ui/digtal/PassengerList/ui/TableVirtual/index.d.ts +4 -0
  35. package/dist/index.esm.js +3478 -41
  36. package/dist/index.js +3468 -31
  37. package/docs/index.md +5 -5
  38. package/docs-dist/404.html +33 -33
  39. package/docs-dist/index.html +33 -33
  40. package/docs-dist/static/arrowDown.a1cbf0d8.svg +2 -2
  41. package/docs-dist/static/arrowUp.4c482054.svg +2 -2
  42. package/docs-dist/static/fork.5431267d.svg +11 -11
  43. package/docs-dist/static/plus.44013ce3.svg +11 -11
  44. package/docs-dist/static/plus.4fd1af30.svg +11 -11
  45. package/docs-dist/umi.css +18 -18
  46. package/index.html +12 -12
  47. package/package.json +62 -62
  48. package/src/Invoice/Invoice-digtal/_test/architecture/index.tsx +21 -21
  49. package/src/Invoice/Invoice-digtal/_test/disabled/index.tsx +40 -40
  50. package/src/Invoice/Invoice-digtal/_test/easiest/index.tsx +214 -214
  51. package/src/Invoice/Invoice-digtal/_test/freight/index.tsx +14592 -14592
  52. package/src/Invoice/Invoice-digtal/_test/header/index.tsx +84 -84
  53. package/src/Invoice/Invoice-digtal/_test/importGoods/index.tsx +1635 -1635
  54. package/src/Invoice/Invoice-digtal/_test/importStakeholder/index.tsx +18 -18
  55. package/src/Invoice/Invoice-digtal/_test/lineCredit/index.tsx +19 -19
  56. package/src/Invoice/Invoice-digtal/_test/passenger/index.tsx +14602 -0
  57. package/src/Invoice/Invoice-digtal/_test/pay/index.tsx +14644 -14644
  58. package/src/Invoice/Invoice-digtal/_test/prefab/index.tsx +150 -150
  59. package/src/Invoice/Invoice-digtal/_test/readOnly/index.tsx +55 -55
  60. package/src/Invoice/Invoice-digtal/_test/realEstateInfo/index.tsx +83 -83
  61. package/src/Invoice/Invoice-digtal/_test/realEstateSales/index.tsx +76 -76
  62. package/src/Invoice/Invoice-digtal/_test/stakeholder/index.tsx +12 -12
  63. package/src/Invoice/Invoice-digtal/_test/typeSelection/index.tsx +29 -29
  64. package/src/Invoice/Invoice-digtal/index.md +49 -46
  65. package/src/Invoice/InvoiceController/InvoiceControllerForm/index.ts +128 -117
  66. package/src/Invoice/InvoiceController/InvoiceControllerState/AutoComplete/index.ts +26 -26
  67. package/src/Invoice/InvoiceController/InvoiceControllerState/BuyerState/index.tsx +88 -88
  68. package/src/Invoice/InvoiceController/InvoiceControllerState/FreightListState/IColumnsReplenish/index.ts +10 -10
  69. package/src/Invoice/InvoiceController/InvoiceControllerState/FreightListState/IGood/index.ts +33 -33
  70. package/src/Invoice/InvoiceController/InvoiceControllerState/FreightListState/ImportGoods/index.ts +81 -81
  71. package/src/Invoice/InvoiceController/InvoiceControllerState/FreightListState/index.ts +39 -39
  72. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/Drag/index.ts +15 -15
  73. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/EndowCode/index.tsx +104 -104
  74. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IColumnsReplenish/index.ts +10 -10
  75. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IGood/index.ts +93 -93
  76. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/ImportGoods/index.ts +84 -84
  77. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/LineAttributeType/index.ts +7 -7
  78. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/ProductComparison/index.ts +9 -9
  79. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/index.ts +150 -150
  80. package/src/Invoice/InvoiceController/InvoiceControllerState/PassengerListState/IColumnsReplenish/index.ts +10 -0
  81. package/src/Invoice/InvoiceController/InvoiceControllerState/PassengerListState/IGood/index.ts +34 -0
  82. package/src/Invoice/InvoiceController/InvoiceControllerState/PassengerListState/index.ts +179 -0
  83. package/src/Invoice/InvoiceController/InvoiceControllerState/PayListState/IColumnsReplenish/index.ts +10 -10
  84. package/src/Invoice/InvoiceController/InvoiceControllerState/PayListState/IGood/index.ts +35 -35
  85. package/src/Invoice/InvoiceController/InvoiceControllerState/PayListState/ImportGoods/index.ts +81 -81
  86. package/src/Invoice/InvoiceController/InvoiceControllerState/PayListState/index.ts +39 -39
  87. package/src/Invoice/InvoiceController/InvoiceControllerState/Stakeholder/index.ts +13 -13
  88. package/src/Invoice/InvoiceController/InvoiceControllerState/index.ts +82 -76
  89. package/src/Invoice/InvoiceController/fns/addFreight.ts +11 -11
  90. package/src/Invoice/InvoiceController/fns/addGood.ts +11 -11
  91. package/src/Invoice/InvoiceController/fns/addGoodDiscount.ts +126 -126
  92. package/src/Invoice/InvoiceController/fns/addGoodDiscountV2.ts +86 -86
  93. package/src/Invoice/InvoiceController/fns/addPassenger.ts +11 -0
  94. package/src/Invoice/InvoiceController/fns/addPay.ts +11 -11
  95. package/src/Invoice/InvoiceController/fns/delFreight.ts +38 -38
  96. package/src/Invoice/InvoiceController/fns/delGood.ts +41 -41
  97. package/src/Invoice/InvoiceController/fns/delPassenger.ts +38 -0
  98. package/src/Invoice/InvoiceController/fns/delPay.ts +38 -38
  99. package/src/Invoice/InvoiceController/fns/getGoodsSearch.ts +26 -26
  100. package/src/Invoice/InvoiceController/fns/importGoodsDrawer.ts +86 -86
  101. package/src/Invoice/InvoiceController/fns/itemBlur.ts +47 -47
  102. package/src/Invoice/InvoiceController/fns/mergeDetails.ts +201 -201
  103. package/src/Invoice/InvoiceController/fns/mergeDiscount.ts +35 -35
  104. package/src/Invoice/InvoiceController/fns/saveEditFreight.ts +24 -24
  105. package/src/Invoice/InvoiceController/fns/saveEditGood.ts +24 -24
  106. package/src/Invoice/InvoiceController/fns/saveEditPassenger.ts +24 -0
  107. package/src/Invoice/InvoiceController/fns/saveEditPay.ts +23 -23
  108. package/src/Invoice/InvoiceController/fns/setEditFreight.ts +16 -16
  109. package/src/Invoice/InvoiceController/fns/setEditGood.ts +16 -16
  110. package/src/Invoice/InvoiceController/fns/setEditPassenger.ts +16 -0
  111. package/src/Invoice/InvoiceController/fns/setEditPay.ts +16 -16
  112. package/src/Invoice/InvoiceController/fns/setFreight.ts +10 -10
  113. package/src/Invoice/InvoiceController/fns/setGoods.ts +10 -10
  114. package/src/Invoice/InvoiceController/fns/setPay.ts +10 -10
  115. package/src/Invoice/InvoiceController/fns/updateInvoiceNo.ts +8 -8
  116. package/src/Invoice/InvoiceController/index.ts +149 -127
  117. package/src/Invoice/_test/buyerNameSearch/index.tsx +42 -42
  118. package/src/Invoice/_test/children/index.tsx +214 -214
  119. package/src/Invoice/_test/deduction/index.tsx +956 -956
  120. package/src/Invoice/_test/draft/index.tsx +40 -40
  121. package/src/Invoice/_test/easiest/index.tsx +5 -5
  122. package/src/Invoice/_test/endowCode/index.tsx +1158 -1158
  123. package/src/Invoice/_test/goodsMenuExpand/index.tsx +32 -32
  124. package/src/Invoice/_test/importBuyer/index.tsx +75 -75
  125. package/src/Invoice/_test/importGoods/index.tsx +1375 -1375
  126. package/src/Invoice/_test/invoiceType/index.tsx +59 -59
  127. package/src/Invoice/_test/isInvoiceNo/index.tsx +12 -12
  128. package/src/Invoice/_test/replaceHead/index.tsx +22 -22
  129. package/src/Invoice/_test/retrieveData/index.tsx +22 -22
  130. package/src/Invoice/_test/seller/index.tsx +28 -28
  131. package/src/Invoice/_test/setDataSource/index.tsx +73 -73
  132. package/src/Invoice/_test/unit/index.tsx +19 -19
  133. package/src/Invoice/index.less +31 -31
  134. package/src/Invoice/index.md +56 -56
  135. package/src/Invoice/index.tsx +216 -211
  136. package/src/Invoice/tools/calculate/index.ts +144 -144
  137. package/src/Invoice/tools/coolingFn/index.ts +17 -17
  138. package/src/Invoice/tools/evaluate/index.ts +7 -7
  139. package/src/Invoice/tools/idGenerator/index.ts +2 -2
  140. package/src/Invoice/tools/itemName/index.ts +55 -55
  141. package/src/Invoice/tools/lazyFn/index.ts +19 -19
  142. package/src/Invoice/tools/mounting/index.ts +13 -13
  143. package/src/Invoice/tools/strringFn/index.ts +40 -40
  144. package/src/Invoice/tools/useToGenerateId/index.ts +12 -12
  145. package/src/Invoice/tools/utils/index.ts +1 -1
  146. package/src/Invoice/tools/utils/money/index.ts +20 -20
  147. package/src/Invoice/ui/components/CustomCascader/index.tsx +356 -0
  148. package/src/Invoice/ui/default/AddComparisonDrawer/index.tsx +149 -149
  149. package/src/Invoice/ui/default/Buyer/index.less +219 -219
  150. package/src/Invoice/ui/default/Buyer/index.tsx +114 -114
  151. package/src/Invoice/ui/default/Buyer/ui/BuyerNameInput/index.tsx +166 -166
  152. package/src/Invoice/ui/default/Buyer/ui/ImportBuyerButton/index.tsx +21 -21
  153. package/src/Invoice/ui/default/EndowCodeDrawer/index.less +8 -8
  154. package/src/Invoice/ui/default/EndowCodeDrawer/index.tsx +620 -620
  155. package/src/Invoice/ui/default/GoodsList/hook/useColumns/autoFillFn/index.ts +690 -690
  156. package/src/Invoice/ui/default/GoodsList/hook/useColumns/index.tsx +773 -773
  157. package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/Drag/index.less +20 -20
  158. package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/Drag/index.tsx +205 -205
  159. package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/Expand/index.tsx +57 -57
  160. package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/ItemCodeInput/index.less +18 -18
  161. package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/ItemCodeInput/index.tsx +49 -49
  162. package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/ItemNameInput/index.less +17 -17
  163. package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/ItemNameInput/index.tsx +91 -91
  164. package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/RowEditButton/index.tsx +30 -30
  165. package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/RowMenu/hook/_useAddComparison/index.tsx +43 -43
  166. package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/RowMenu/hook/useAddDiscount/index.tsx +118 -118
  167. package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/RowMenu/hook/useDelItem/dist/index.js +32 -32
  168. package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/RowMenu/hook/useDelItem/index.tsx +41 -41
  169. package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/RowMenu/hook/useEndowCode/index.tsx +25 -25
  170. package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/RowMenu/index.less +13 -13
  171. package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/RowMenu/index.tsx +99 -99
  172. package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/RowSaveButton/index.tsx +14 -14
  173. package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/TitleText/index.tsx +20 -20
  174. package/src/Invoice/ui/default/GoodsList/hook/useDeduction/index.tsx +24 -24
  175. package/src/Invoice/ui/default/GoodsList/hook/useOnRow/index.tsx +52 -52
  176. package/src/Invoice/ui/default/GoodsList/hook/useRowSelection/index.tsx +120 -120
  177. package/src/Invoice/ui/default/GoodsList/hook/useWindowClick/index.tsx +23 -23
  178. package/src/Invoice/ui/default/GoodsList/index.less +185 -185
  179. package/src/Invoice/ui/default/GoodsList/index.tsx +207 -207
  180. package/src/Invoice/ui/default/GoodsList/ui/AddRowButton/index.tsx +72 -72
  181. package/src/Invoice/ui/default/GoodsList/ui/BulkMenu/hooks/useAddDiscountRowButton/index.less +21 -21
  182. package/src/Invoice/ui/default/GoodsList/ui/BulkMenu/hooks/useAddDiscountRowButton/index.tsx +244 -244
  183. package/src/Invoice/ui/default/GoodsList/ui/BulkMenu/hooks/useCommodityComparisonButton/index.tsx +75 -75
  184. package/src/Invoice/ui/default/GoodsList/ui/BulkMenu/hooks/useDelRowButton/index.tsx +69 -69
  185. package/src/Invoice/ui/default/GoodsList/ui/BulkMenu/hooks/useEndowCodeButton/index.tsx +65 -65
  186. package/src/Invoice/ui/default/GoodsList/ui/BulkMenu/hooks/useMergeDetails/index.tsx +91 -91
  187. package/src/Invoice/ui/default/GoodsList/ui/BulkMenu/hooks/useMergeDiscount/index.tsx +36 -36
  188. package/src/Invoice/ui/default/GoodsList/ui/BulkMenu/hooks/useSalesDiscount/index.tsx +109 -109
  189. package/src/Invoice/ui/default/GoodsList/ui/BulkMenu/hooks/useSalesGifts/index.tsx +94 -94
  190. package/src/Invoice/ui/default/GoodsList/ui/BulkMenu/index.tsx +37 -37
  191. package/src/Invoice/ui/default/GoodsList/ui/DescribeSwitch/index.tsx +36 -36
  192. package/src/Invoice/ui/default/GoodsList/ui/Search/index.less +10 -10
  193. package/src/Invoice/ui/default/GoodsList/ui/Search/index.tsx +52 -52
  194. package/src/Invoice/ui/default/GoodsList/ui/Statistics/index.less +18 -18
  195. package/src/Invoice/ui/default/GoodsList/ui/Statistics/index.tsx +114 -114
  196. package/src/Invoice/ui/default/GoodsList/ui/TableRow/index.less +40 -40
  197. package/src/Invoice/ui/default/GoodsList/ui/TableRow/index.tsx +71 -71
  198. package/src/Invoice/ui/default/GoodsList/ui/TableVirtual/index.less +38 -38
  199. package/src/Invoice/ui/default/GoodsList/ui/TableVirtual/index.tsx +130 -130
  200. package/src/Invoice/ui/default/GoodsList/ui/TableVirtual.o/index.less +44 -44
  201. package/src/Invoice/ui/default/GoodsList/ui/TableVirtual.o/index.tsx +96 -96
  202. package/src/Invoice/ui/default/GoodsList/ui/TaxIncludedSwitch/index.tsx +31 -31
  203. package/src/Invoice/ui/default/ImportBuyerDrawer/index.tsx +75 -75
  204. package/src/Invoice/ui/default/ImportGoodsDrawer/index.tsx +207 -207
  205. package/src/Invoice/ui/default/ImportPassengerDrawer/index.tsx +213 -0
  206. package/src/Invoice/ui/default/InvoiceHeader/index.less +68 -68
  207. package/src/Invoice/ui/default/InvoiceHeader/index.tsx +246 -246
  208. package/src/Invoice/ui/default/MeiTanModal/index.less +39 -39
  209. package/src/Invoice/ui/default/MeiTanModal/index.tsx +165 -165
  210. package/src/Invoice/ui/default/Seller/index.less +113 -113
  211. package/src/Invoice/ui/default/Seller/index.tsx +98 -98
  212. package/src/Invoice/ui/default/Sign/index.less +14 -14
  213. package/src/Invoice/ui/default/Sign/index.tsx +71 -71
  214. package/src/Invoice/ui/digtal/Architecture/index.less +22 -22
  215. package/src/Invoice/ui/digtal/Architecture/index.tsx +227 -227
  216. package/src/Invoice/ui/digtal/FreightList/hook/useColumns/dist/index.js +616 -616
  217. package/src/Invoice/ui/digtal/FreightList/hook/useColumns/index.tsx +246 -246
  218. package/src/Invoice/ui/digtal/FreightList/hook/useColumns/ui/TitleText/index.tsx +20 -20
  219. package/src/Invoice/ui/digtal/FreightList/hook/useOnRow/index.tsx +37 -37
  220. package/src/Invoice/ui/digtal/FreightList/hook/useRowSelection/index.tsx +119 -119
  221. package/src/Invoice/ui/digtal/FreightList/hook/useWindowClick/index.tsx +23 -23
  222. package/src/Invoice/ui/digtal/FreightList/index.less +72 -72
  223. package/src/Invoice/ui/digtal/FreightList/index.tsx +129 -129
  224. package/src/Invoice/ui/digtal/FreightList/ui/AddRowButton/index.tsx +74 -74
  225. package/src/Invoice/ui/digtal/FreightList/ui/BulkMenu/hooks/useDelRowButton/index.tsx +50 -50
  226. package/src/Invoice/ui/digtal/FreightList/ui/BulkMenu/hooks/useEmptyRefill/index.tsx +36 -36
  227. package/src/Invoice/ui/digtal/FreightList/ui/TableRow/index.less +28 -28
  228. package/src/Invoice/ui/digtal/FreightList/ui/TableRow/index.tsx +20 -20
  229. package/src/Invoice/ui/digtal/FreightList/ui/TableVirtual/index.less +38 -38
  230. package/src/Invoice/ui/digtal/FreightList/ui/TableVirtual/index.tsx +108 -108
  231. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/autoFillFn/index.ts +690 -690
  232. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/dist/index.js +616 -616
  233. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/index.tsx +720 -720
  234. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/svg/plus.svg +11 -11
  235. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/Drag/index.less +20 -20
  236. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/Drag/index.tsx +205 -205
  237. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/ItemNameInput/index.less +9 -9
  238. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/ItemNameInput/index.tsx +87 -87
  239. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowEditButton/index.tsx +30 -30
  240. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/hook/_useAddComparison/index.tsx +43 -43
  241. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/hook/useAddDiscount/index.tsx +76 -76
  242. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/hook/useDelItem/index.tsx +41 -41
  243. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/hook/useEndowCode/index.tsx +34 -34
  244. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/index.less +13 -13
  245. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowMenu/index.tsx +98 -98
  246. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/RowSaveButton/index.tsx +14 -14
  247. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/TitleText/index.tsx +20 -20
  248. package/src/Invoice/ui/digtal/GoodsList/hook/useOnRow/index.tsx +51 -51
  249. package/src/Invoice/ui/digtal/GoodsList/hook/useRowSelection/index.tsx +121 -121
  250. package/src/Invoice/ui/digtal/GoodsList/hook/useWindowClick/index.tsx +23 -23
  251. package/src/Invoice/ui/digtal/GoodsList/index.less +56 -56
  252. package/src/Invoice/ui/digtal/GoodsList/index.tsx +181 -181
  253. package/src/Invoice/ui/digtal/GoodsList/ui/AddRowButton/index.tsx +87 -87
  254. package/src/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useAddDiscountRowButton/index.tsx +340 -340
  255. package/src/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useAddDiscountRowButton/svg/add.svg +11 -11
  256. package/src/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useCommodityComparisonButton/index.tsx +75 -75
  257. package/src/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useDelRowButton/index.tsx +50 -50
  258. package/src/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useEmptyRefill/index.tsx +37 -37
  259. package/src/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useEndowCodeButton/index.tsx +82 -82
  260. package/src/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useReselectInvoiceType/index.tsx +57 -57
  261. package/src/Invoice/ui/digtal/GoodsList/ui/DescribeSwitch/index.tsx +36 -36
  262. package/src/Invoice/ui/digtal/GoodsList/ui/Search/index.less +11 -11
  263. package/src/Invoice/ui/digtal/GoodsList/ui/Search/index.tsx +60 -60
  264. package/src/Invoice/ui/digtal/GoodsList/ui/Statistics/index.less +53 -53
  265. package/src/Invoice/ui/digtal/GoodsList/ui/Statistics/index.tsx +100 -100
  266. package/src/Invoice/ui/digtal/GoodsList/ui/Statistics/svg/fork.svg +11 -11
  267. package/src/Invoice/ui/digtal/GoodsList/ui/TableRow/index.less +28 -28
  268. package/src/Invoice/ui/digtal/GoodsList/ui/TableRow/index.tsx +52 -52
  269. package/src/Invoice/ui/digtal/GoodsList/ui/TableVirtual/index.less +38 -38
  270. package/src/Invoice/ui/digtal/GoodsList/ui/TableVirtual/index.tsx +113 -113
  271. package/src/Invoice/ui/digtal/GoodsList/ui/TaxIncludedSwitch/index.tsx +34 -34
  272. package/src/Invoice/ui/digtal/InvoiceHeader/index.less +57 -57
  273. package/src/Invoice/ui/digtal/InvoiceHeader/index.tsx +77 -77
  274. package/src/Invoice/ui/digtal/PassengerList/hook/useColumns/index.tsx +428 -0
  275. package/src/Invoice/ui/digtal/PassengerList/hook/useColumns/ui/TitleText/index.tsx +20 -0
  276. package/src/Invoice/ui/digtal/PassengerList/hook/useOnRow/index.tsx +37 -0
  277. package/src/Invoice/ui/digtal/PassengerList/hook/useRowSelection/index.tsx +120 -0
  278. package/src/Invoice/ui/digtal/PassengerList/hook/useWindowClick/index.tsx +23 -0
  279. package/src/Invoice/ui/digtal/PassengerList/index.less +73 -0
  280. package/src/Invoice/ui/digtal/PassengerList/index.tsx +152 -0
  281. package/src/Invoice/ui/digtal/PassengerList/ui/AddRowButton/index.tsx +75 -0
  282. package/src/Invoice/ui/digtal/PassengerList/ui/BatchImportButton/index.tsx +74 -0
  283. package/src/Invoice/ui/digtal/PassengerList/ui/BulkMenu/hooks/useDelRowButton/index.tsx +50 -0
  284. package/src/Invoice/ui/digtal/PassengerList/ui/BulkMenu/hooks/useEmptyRefill/index.tsx +37 -0
  285. package/src/Invoice/ui/digtal/PassengerList/ui/TableRow/index.less +29 -0
  286. package/src/Invoice/ui/digtal/PassengerList/ui/TableRow/index.tsx +21 -0
  287. package/src/Invoice/ui/digtal/PassengerList/ui/TableVirtual/index.less +39 -0
  288. package/src/Invoice/ui/digtal/PassengerList/ui/TableVirtual/index.tsx +109 -0
  289. package/src/Invoice/ui/digtal/PayList/hook/useColumns/dist/index.js +616 -616
  290. package/src/Invoice/ui/digtal/PayList/hook/useColumns/index.tsx +168 -168
  291. package/src/Invoice/ui/digtal/PayList/hook/useColumns/ui/TitleText/index.tsx +20 -20
  292. package/src/Invoice/ui/digtal/PayList/hook/useOnRow/index.tsx +37 -37
  293. package/src/Invoice/ui/digtal/PayList/hook/useRowSelection/index.tsx +119 -119
  294. package/src/Invoice/ui/digtal/PayList/hook/useWindowClick/index.tsx +19 -19
  295. package/src/Invoice/ui/digtal/PayList/index.less +72 -72
  296. package/src/Invoice/ui/digtal/PayList/index.tsx +132 -132
  297. package/src/Invoice/ui/digtal/PayList/ui/AddRowButton/index.tsx +74 -74
  298. package/src/Invoice/ui/digtal/PayList/ui/BulkMenu/hooks/useDelRowButton/index.tsx +50 -50
  299. package/src/Invoice/ui/digtal/PayList/ui/BulkMenu/hooks/useEmptyRefill/index.tsx +36 -36
  300. package/src/Invoice/ui/digtal/PayList/ui/TableRow/index.less +28 -28
  301. package/src/Invoice/ui/digtal/PayList/ui/TableRow/index.tsx +20 -20
  302. package/src/Invoice/ui/digtal/PayList/ui/TableVirtual/index.less +38 -38
  303. package/src/Invoice/ui/digtal/PayList/ui/TableVirtual/index.tsx +108 -108
  304. package/src/Invoice/ui/digtal/RealEstateInfo/index.less +21 -21
  305. package/src/Invoice/ui/digtal/RealEstateInfo/index.tsx +451 -451
  306. package/src/Invoice/ui/digtal/RealEstateSales/index.less +21 -21
  307. package/src/Invoice/ui/digtal/RealEstateSales/index.tsx +301 -301
  308. package/src/Invoice/ui/digtal/Sign/index.less +48 -48
  309. package/src/Invoice/ui/digtal/Sign/index.tsx +99 -99
  310. package/src/Invoice/ui/digtal/StakeFarmerholder/index.less +99 -99
  311. package/src/Invoice/ui/digtal/StakeFarmerholder/index.tsx +1102 -1102
  312. package/src/Invoice/ui/digtal/StakeFarmerholder/svg/arrowDown.svg +2 -2
  313. package/src/Invoice/ui/digtal/StakeFarmerholder/svg/arrowUp.svg +2 -2
  314. package/src/Invoice/ui/digtal/StakeFarmerholder/svg/plus.svg +11 -11
  315. package/src/Invoice/ui/digtal/Stakeholder/index.less +99 -99
  316. package/src/Invoice/ui/digtal/Stakeholder/index.tsx +458 -458
  317. package/src/Invoice/ui/digtal/Stakeholder/svg/arrowDown.svg +2 -2
  318. package/src/Invoice/ui/digtal/Stakeholder/svg/arrowUp.svg +2 -2
  319. package/src/Invoice/ui/digtal/Stakeholder/svg/plus.svg +11 -11
  320. package/src/InvoiceTypeModal/_test/easiest/index.tsx +31 -31
  321. package/src/InvoiceTypeModal/dist/index.js +92 -92
  322. package/src/InvoiceTypeModal/index.less +7 -7
  323. package/src/InvoiceTypeModal/index.md +5 -5
  324. package/src/InvoiceTypeModal/index.tsx +161 -161
  325. package/src/TaxClassificationCodeModal/_test/easiest/index.tsx +184 -184
  326. package/src/TaxClassificationCodeModal/index.less +17 -17
  327. package/src/TaxClassificationCodeModal/index.md +6 -6
  328. package/src/TaxClassificationCodeModal/index.tsx +152 -152
  329. package/src/index.ts +13 -13
  330. package/tsconfig.json +31 -31
  331. package/typings.d.ts +3 -3
  332. package/docs-dist/static/arrowDown.22c7885c.svg +0 -3
  333. package/docs-dist/static/arrowUp.d707a3e4.svg +0 -3
  334. package/docs-dist/static/download.18f10f45.svg +0 -1
  335. package/docs-dist/static/fork.43eb4ffa.svg +0 -12
  336. package/docs-dist/static/plus.0e60e9ea.svg +0 -12
  337. package/docs-dist/static/plus.384f41d9.svg +0 -12
  338. package/docs-dist/static/upload.d7ea1893.svg +0 -1
package/dist/index.js CHANGED
@@ -515,6 +515,42 @@ function _isNativeReflectConstruct() {
515
515
  }
516
516
  }
517
517
 
518
+ function _objectWithoutPropertiesLoose(source, excluded) {
519
+ if (source == null) return {};
520
+ var target = {};
521
+ var sourceKeys = Object.keys(source);
522
+ var key, i;
523
+
524
+ for (i = 0; i < sourceKeys.length; i++) {
525
+ key = sourceKeys[i];
526
+ if (excluded.indexOf(key) >= 0) continue;
527
+ target[key] = source[key];
528
+ }
529
+
530
+ return target;
531
+ }
532
+
533
+ function _objectWithoutProperties(source, excluded) {
534
+ if (source == null) return {};
535
+
536
+ var target = _objectWithoutPropertiesLoose(source, excluded);
537
+
538
+ var key, i;
539
+
540
+ if (Object.getOwnPropertySymbols) {
541
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
542
+
543
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
544
+ key = sourceSymbolKeys[i];
545
+ if (excluded.indexOf(key) >= 0) continue;
546
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
547
+ target[key] = source[key];
548
+ }
549
+ }
550
+
551
+ return target;
552
+ }
553
+
518
554
  function _assertThisInitialized(self) {
519
555
  if (self === void 0) {
520
556
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
@@ -769,7 +805,7 @@ var InvoiceControllerForm = /*#__PURE__*/function (_GreyReactBox) {
769
805
  var _validateFields2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
770
806
  var _this3 = this;
771
807
 
772
- var _errors, _values, arr, i, key, _yield$_validateField, errors, values, _this$state$goodsList, _this$state$freightLi, _this$state$payListSt;
808
+ var _errors, _values, arr, i, key, _yield$_validateField, errors, values, _this$state$goodsList, _this$state$freightLi, _this$state$passenger, _this$state$payListSt;
773
809
 
774
810
  return _regeneratorRuntime().wrap(function _callee$(_context) {
775
811
  while (1) {
@@ -850,17 +886,17 @@ var InvoiceControllerForm = /*#__PURE__*/function (_GreyReactBox) {
850
886
  _errors.set('freightList', _context.t1.errors);
851
887
 
852
888
  case 37:
853
- _values.set('freightList', this.state.freightListState.goodsList.slice()); //支付
889
+ _values.set('freightList', this.state.freightListState.goodsList.slice()); //旅客运输列表
854
890
 
855
891
 
856
- if (!this.state.payListState.form) {
892
+ if (!this.state.passengerListState.form) {
857
893
  _context.next = 47;
858
894
  break;
859
895
  }
860
896
 
861
897
  _context.prev = 39;
862
898
  _context.next = 42;
863
- return (_this$state$payListSt = this.state.payListState.form) === null || _this$state$payListSt === void 0 ? void 0 : _this$state$payListSt.validateFields();
899
+ return (_this$state$passenger = this.state.passengerListState.form) === null || _this$state$passenger === void 0 ? void 0 : _this$state$passenger.validateFields();
864
900
 
865
901
  case 42:
866
902
  _context.next = 47;
@@ -870,9 +906,32 @@ var InvoiceControllerForm = /*#__PURE__*/function (_GreyReactBox) {
870
906
  _context.prev = 44;
871
907
  _context.t2 = _context["catch"](39);
872
908
 
873
- _errors.set('payList', _context.t2.errors);
909
+ _errors.set('passengerList', _context.t2.errors);
874
910
 
875
911
  case 47:
912
+ _values.set('passengerList', this.state.passengerListState.goodsList.slice()); //支付
913
+
914
+
915
+ if (!this.state.payListState.form) {
916
+ _context.next = 57;
917
+ break;
918
+ }
919
+
920
+ _context.prev = 49;
921
+ _context.next = 52;
922
+ return (_this$state$payListSt = this.state.payListState.form) === null || _this$state$payListSt === void 0 ? void 0 : _this$state$payListSt.validateFields();
923
+
924
+ case 52:
925
+ _context.next = 57;
926
+ break;
927
+
928
+ case 54:
929
+ _context.prev = 54;
930
+ _context.t3 = _context["catch"](49);
931
+
932
+ _errors.set('payList', _context.t3.errors);
933
+
934
+ case 57:
876
935
  _values.set('payList', this.state.payListState.goodsList.slice()); // 金额(不含税)
877
936
 
878
937
 
@@ -919,12 +978,12 @@ var InvoiceControllerForm = /*#__PURE__*/function (_GreyReactBox) {
919
978
  values: _values
920
979
  });
921
980
 
922
- case 53:
981
+ case 63:
923
982
  case "end":
924
983
  return _context.stop();
925
984
  }
926
985
  }
927
- }, _callee, this, [[19, 24], [29, 34], [39, 44]]);
986
+ }, _callee, this, [[19, 24], [29, 34], [39, 44], [49, 54]]);
928
987
  }));
929
988
 
930
989
  function validateFields() {
@@ -1337,6 +1396,261 @@ var AutoComplete = /*#__PURE__*/_createClass(function AutoComplete() {
1337
1396
  this.onItemCodeSearch = void 0;
1338
1397
  });
1339
1398
 
1399
+ var CertificateTypeList = [{
1400
+ value: 'COMPANY',
1401
+ label: '单位'
1402
+ }, {
1403
+ value: 'ORGANIZATION_CODE',
1404
+ label: '组织机构代码证'
1405
+ }, {
1406
+ value: 'BUSINESS_LICENSE',
1407
+ label: '营业执照'
1408
+ }, {
1409
+ value: 'TAX_REGISTRATION_CERTIFICATE',
1410
+ label: '税务登记证'
1411
+ }, {
1412
+ value: 'OTHER_COMPANY_CERTIFICATE',
1413
+ label: '其他单位证件'
1414
+ }, {
1415
+ value: 'INDIVIDUAL',
1416
+ label: '个人'
1417
+ }, {
1418
+ value: 'RESIDENT_ID_CARD',
1419
+ label: '居民身份证'
1420
+ }, {
1421
+ value: 'OFFICER_ID_CARD',
1422
+ label: '军官证'
1423
+ }, {
1424
+ value: 'ARMED_POLICE_ID_CARD',
1425
+ label: '武警警官证'
1426
+ }, {
1427
+ value: 'SOLDIER_ID_CARD',
1428
+ label: '士兵证'
1429
+ }, {
1430
+ value: 'RETIRED_MILITARY_CADRE_CERTIFICATE',
1431
+ label: '军队离退休干部证'
1432
+ }, {
1433
+ value: 'DISABLED_PERSON_CERTIFICATE',
1434
+ label: '残疾人证'
1435
+ }, {
1436
+ value: 'DISABLED_SOLDIER_CERTIFICATE',
1437
+ label: '残疾军人证(1-8级)'
1438
+ }, {
1439
+ value: 'FOREIGN_PASSPORT',
1440
+ label: '外国护照'
1441
+ }, {
1442
+ value: 'HOME_RETURN_PERMIT',
1443
+ label: '港澳同胞回乡证'
1444
+ }, {
1445
+ value: 'HONG_KONG_MACAO_MAINLAND_PERMIT',
1446
+ label: '港澳居民来往内地通行证'
1447
+ }, {
1448
+ value: 'TAIWAN_COMPATRIOT_PERMIT',
1449
+ label: '台胞证'
1450
+ }, {
1451
+ value: 'HONG_KONG_MACAO_PERMIT',
1452
+ label: '中华人民共和国往来港澳通行证'
1453
+ }, {
1454
+ value: 'TAIWAN_MAINLAND_PERMIT',
1455
+ label: '台湾居民来往大陆通行证'
1456
+ }, {
1457
+ value: 'MAINLAND_TAIWAN_PERMIT',
1458
+ label: '大陆居民往来台湾通行证'
1459
+ }, {
1460
+ value: 'FOREIGN_RESIDENCE_PERMIT',
1461
+ label: '外国人居留证'
1462
+ }, {
1463
+ value: 'DIPLOMATIC_ID_CARD',
1464
+ label: '外交官证'
1465
+ }, {
1466
+ value: 'CONSULATE_ID_CARD',
1467
+ label: '使(领事)馆证'
1468
+ }, {
1469
+ value: 'SEAMAN_BOOK',
1470
+ label: '海员证'
1471
+ }, {
1472
+ value: 'HONG_KONG_PERMANENT_ID_CARD',
1473
+ label: '香港永久性居民身份证'
1474
+ }, {
1475
+ value: 'TAIWAN_ID_CARD',
1476
+ label: '台湾身份证'
1477
+ }, {
1478
+ value: 'MACAO_PERMANENT_ID_CARD',
1479
+ label: '澳门特别行政区永久性居民身份证'
1480
+ }, {
1481
+ value: 'FOREIGNER_ID_CARD',
1482
+ label: '外国人身份证件'
1483
+ }, {
1484
+ value: 'GRADUATE_STARTUP_CERTIFICATE',
1485
+ label: '高校毕业生自主创业证'
1486
+ }, {
1487
+ value: 'EMPLOYMENT_UNEMPLOYMENT_CERTIFICATE',
1488
+ label: '就业失业登记证'
1489
+ }, {
1490
+ value: 'RETIREMENT_CERTIFICATE',
1491
+ label: '退休证'
1492
+ }, {
1493
+ value: 'RETIRED_CADRE_CERTIFICATE',
1494
+ label: '离休证'
1495
+ }, {
1496
+ value: 'CHINESE_PASSPORT',
1497
+ label: '中国护照'
1498
+ }, {
1499
+ value: 'RETIRED_SOLDIER_SELF_EMPLOYMENT_CERTIFICATE',
1500
+ label: '城镇退役士兵自谋职业证'
1501
+ }, {
1502
+ value: 'MILITARY_FAMILY_IDENTITY_CERTIFICATE',
1503
+ label: '随军家属身份证明'
1504
+ }, {
1505
+ value: 'MILITARY_OFFICER_TRANSFER_CERTIFICATE',
1506
+ label: '中国人民解放军军官转业证书'
1507
+ }, {
1508
+ value: 'MILITARY_CONSCRIPT_RETIREMENT_CERTIFICATE',
1509
+ label: '中国人民解放军义务兵退出现役证'
1510
+ }, {
1511
+ value: 'MILITARY_NCO_RETIREMENT_CERTIFICATE',
1512
+ label: '中国人民解放军士官退出现役证'
1513
+ }, {
1514
+ value: 'FOREIGN_PERMANENT_RESIDENCE_ID_CARD',
1515
+ label: '外国人永久居留身份证(外国人永久居留证)'
1516
+ }, {
1517
+ value: 'EMPLOYMENT_ENTREPRENEURSHIP_CERTIFICATE',
1518
+ label: '就业创业证'
1519
+ }, {
1520
+ value: 'HONG_KONG_PASSPORT',
1521
+ label: '香港特别行政区护照'
1522
+ }, {
1523
+ value: 'MACAO_PASSPORT',
1524
+ label: '澳门特别行政区护照'
1525
+ }, {
1526
+ value: 'HONG_KONG_MACAO_RESIDENCE_PERMIT',
1527
+ label: '中华人民共和国港澳居民居住证'
1528
+ }, {
1529
+ value: 'TAIWAN_RESIDENCE_PERMIT',
1530
+ label: '中华人民共和国台湾居民居住证'
1531
+ }, {
1532
+ value: 'FOREIGN_WORK_PERMIT_A',
1533
+ label: '中华人民共和国外国人工作许可证(A类)'
1534
+ }, {
1535
+ value: 'FOREIGN_WORK_PERMIT_B',
1536
+ label: '中华人民共和国外国人工作许可证(B类)'
1537
+ }, {
1538
+ value: 'FOREIGN_WORK_PERMIT_C',
1539
+ label: '中华人民共和国外国人工作许可证(C类)'
1540
+ }, {
1541
+ value: 'BIRTH_MEDICAL_CERTIFICATE',
1542
+ label: '出生医学证明'
1543
+ }, {
1544
+ value: 'OTHER_INDIVIDUAL_CERTIFICATE',
1545
+ label: '其他个人证件'
1546
+ }]; // 在 Antd 中使用方式:
1547
+ // <Select options={options} />
1548
+
1549
+ var VehicleTypeList = [{
1550
+ value: 'AIRCRAFT',
1551
+ label: '飞机'
1552
+ }, {
1553
+ value: 'TRAIN',
1554
+ label: '火车'
1555
+ }, {
1556
+ value: 'LONG_DISTANCE_BUS',
1557
+ label: '长途汽车'
1558
+ }, {
1559
+ value: 'PUBLIC_TRANSPORT',
1560
+ label: '公共交通'
1561
+ }, {
1562
+ value: 'TAXI',
1563
+ label: '出租车'
1564
+ }, {
1565
+ value: 'AUTOMOBILE',
1566
+ label: '汽车'
1567
+ }, {
1568
+ value: 'SHIP',
1569
+ label: '船舶'
1570
+ }, {
1571
+ value: 'OTHER',
1572
+ label: '其他'
1573
+ }];
1574
+
1575
+ var PassengerListState = /*#__PURE__*/_createClass(function PassengerListState() {
1576
+ _classCallCheck(this, PassengerListState);
1577
+
1578
+ this.goodMax = void 0;
1579
+ this.editGood = void 0;
1580
+ this.isAddRow = true;
1581
+ this.isRemRow = true;
1582
+ this.isBatchImport = true;
1583
+ this.isVisibleDrawer = false;
1584
+ this.goodsMap = new Map();
1585
+ this.form = void 0;
1586
+ this.certificateTypeList = CertificateTypeList;
1587
+ this.vehicleTypeList = VehicleTypeList;
1588
+ this.goodsList = [];
1589
+ this.selectedGoodIndex = [];
1590
+ this.area = [];
1591
+ this.addressFieldNames = {
1592
+ label: 'label',
1593
+ value: 'value',
1594
+ children: 'children'
1595
+ };
1596
+ this.dataSource = [];
1597
+ this.pagination = {};
1598
+ this.columns = [{
1599
+ title: '序号',
1600
+ dataIndex: 'i',
1601
+ key: 'i',
1602
+ render: function render(t, record, index) {
1603
+ return index + 1;
1604
+ }
1605
+ }, {
1606
+ title: '出行人',
1607
+ dataIndex: 'cxr',
1608
+ key: 'cxr'
1609
+ }, {
1610
+ title: '出行日期',
1611
+ dataIndex: 'chuxrq',
1612
+ key: 'chuxrq'
1613
+ }, {
1614
+ title: '出行人证件类型',
1615
+ dataIndex: 'cxrzjlxDm',
1616
+ key: 'cxrzjlxDm',
1617
+ render: function render(text) {
1618
+ var _CertificateTypeList$;
1619
+
1620
+ return ((_CertificateTypeList$ = CertificateTypeList.find(function (e) {
1621
+ return e.value === text;
1622
+ })) === null || _CertificateTypeList$ === void 0 ? void 0 : _CertificateTypeList$.label) || '';
1623
+ }
1624
+ }, {
1625
+ title: '出行人证件号码',
1626
+ dataIndex: 'sfzjhm',
1627
+ key: 'sfzjhm'
1628
+ }, {
1629
+ title: '出发点',
1630
+ dataIndex: 'cfd',
1631
+ key: 'cfd'
1632
+ }, {
1633
+ title: '到达地',
1634
+ dataIndex: 'ddd',
1635
+ key: 'ddd'
1636
+ }, {
1637
+ title: '交通工具类型',
1638
+ dataIndex: 'jtgjlxDm',
1639
+ key: 'jtgjlxDm',
1640
+ render: function render(text) {
1641
+ var _VehicleTypeList$find;
1642
+
1643
+ return ((_VehicleTypeList$find = VehicleTypeList.find(function (e) {
1644
+ return e.value === text;
1645
+ })) === null || _VehicleTypeList$find === void 0 ? void 0 : _VehicleTypeList$find.label) || '';
1646
+ }
1647
+ }, {
1648
+ title: '等级',
1649
+ dataIndex: 'zwdj',
1650
+ key: 'zwdj'
1651
+ }];
1652
+ });
1653
+
1340
1654
  var InvoiceControllerState = /*#__PURE__*/_createClass(function InvoiceControllerState() {
1341
1655
  _classCallCheck(this, InvoiceControllerState);
1342
1656
 
@@ -1355,6 +1669,7 @@ var InvoiceControllerState = /*#__PURE__*/_createClass(function InvoiceControlle
1355
1669
  this.taxClassificationProps = void 0;
1356
1670
  this.freightListState = new FreightListState();
1357
1671
  this.payListState = new PayListState();
1672
+ this.passengerListState = new PassengerListState();
1358
1673
  this.addGoodsCheck = void 0;
1359
1674
  });
1360
1675
 
@@ -1460,6 +1775,40 @@ var setEditPay = /*#__PURE__*/(function () {
1460
1775
  };
1461
1776
  })();
1462
1777
 
1778
+ /**
1779
+ * 设置当前的编辑货物运输
1780
+ */
1781
+ var setEditPassenger = /*#__PURE__*/(function () {
1782
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(state, newEditGood) {
1783
+ var editGood;
1784
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1785
+ while (1) {
1786
+ switch (_context.prev = _context.next) {
1787
+ case 0:
1788
+ if (newEditGood) {
1789
+ editGood = state.passengerListState.editGood;
1790
+ state.passengerListState = _objectSpread2(_objectSpread2({}, state.passengerListState), {}, {
1791
+ editGood: _objectSpread2(_objectSpread2({}, editGood), newEditGood)
1792
+ });
1793
+ } else {
1794
+ state.passengerListState = _objectSpread2(_objectSpread2({}, state.passengerListState), {}, {
1795
+ editGood: undefined
1796
+ });
1797
+ }
1798
+
1799
+ case 1:
1800
+ case "end":
1801
+ return _context.stop();
1802
+ }
1803
+ }
1804
+ }, _callee);
1805
+ }));
1806
+
1807
+ return function (_x, _x2) {
1808
+ return _ref.apply(this, arguments);
1809
+ };
1810
+ })();
1811
+
1463
1812
  /**
1464
1813
  * 设置单个货物属性
1465
1814
  */
@@ -1820,6 +2169,87 @@ var delPay = /*#__PURE__*/(function () {
1820
2169
  };
1821
2170
  })();
1822
2171
 
2172
+ /**
2173
+ * 删除一个货物运输
2174
+ */
2175
+ var delPassenger = /*#__PURE__*/(function () {
2176
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(state, $index) {
2177
+ var goods, goodsList, goodsMap, i;
2178
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
2179
+ while (1) {
2180
+ switch (_context.prev = _context.next) {
2181
+ case 0:
2182
+ if ($index) {
2183
+ _context.next = 2;
2184
+ break;
2185
+ }
2186
+
2187
+ return _context.abrupt("return");
2188
+
2189
+ case 2:
2190
+ // 查下要删除的货物
2191
+ goods = state.passengerListState.goodsList.filter(function (e) {
2192
+ return e.$index === $index;
2193
+ })[0];
2194
+
2195
+ if (goods) {
2196
+ _context.next = 5;
2197
+ break;
2198
+ }
2199
+
2200
+ return _context.abrupt("return");
2201
+
2202
+ case 5:
2203
+ // 如果正在编辑 就取消编辑
2204
+ if (state.passengerListState.editGood && state.passengerListState.editGood.$index === $index) {
2205
+ state.passengerListState.editGood = undefined;
2206
+ }
2207
+
2208
+ goodsList = state.passengerListState.goodsList;
2209
+ goodsMap = state.passengerListState.goodsMap;
2210
+ goodsMap.delete($index);
2211
+ i = 0;
2212
+
2213
+ case 10:
2214
+ if (!(i < goodsList.length)) {
2215
+ _context.next = 17;
2216
+ break;
2217
+ }
2218
+
2219
+ if (!(goodsList[i].$index === $index)) {
2220
+ _context.next = 14;
2221
+ break;
2222
+ }
2223
+
2224
+ // const good = goodsList[i];
2225
+ // if (good.lineAttribute === LineAttributeType.折扣行 && goodsList[i - 1] && goodsList[i - 1].lineAttribute === LineAttributeType.被折扣行) {
2226
+ // goodsList[i - 1].lineAttribute = LineAttributeType.正常;
2227
+ // }
2228
+ goodsList.splice(i, 1);
2229
+ return _context.abrupt("break", 17);
2230
+
2231
+ case 14:
2232
+ i++;
2233
+ _context.next = 10;
2234
+ break;
2235
+
2236
+ case 17:
2237
+ state.passengerListState.goodsList = _toConsumableArray(goodsList);
2238
+ state.passengerListState.goodsMap = new Map(goodsMap);
2239
+
2240
+ case 19:
2241
+ case "end":
2242
+ return _context.stop();
2243
+ }
2244
+ }
2245
+ }, _callee);
2246
+ }));
2247
+
2248
+ return function (_x, _x2) {
2249
+ return _ref.apply(this, arguments);
2250
+ };
2251
+ })();
2252
+
1823
2253
  var idGenerator = (function () {
1824
2254
  return uuid.v4();
1825
2255
  });
@@ -2225,6 +2655,33 @@ var addFreight = /*#__PURE__*/(function () {
2225
2655
  };
2226
2656
  })();
2227
2657
 
2658
+ /**
2659
+ * 添加的编旅客运输
2660
+ */
2661
+
2662
+ var addPassenger = /*#__PURE__*/(function () {
2663
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(state, options) {
2664
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
2665
+ while (1) {
2666
+ switch (_context.prev = _context.next) {
2667
+ case 0:
2668
+ options.$index = idGenerator();
2669
+ state.passengerListState.goodsList = [].concat(_toConsumableArray(state.passengerListState.goodsList), [options]);
2670
+ return _context.abrupt("return", options);
2671
+
2672
+ case 3:
2673
+ case "end":
2674
+ return _context.stop();
2675
+ }
2676
+ }
2677
+ }, _callee);
2678
+ }));
2679
+
2680
+ return function (_x, _x2) {
2681
+ return _ref.apply(this, arguments);
2682
+ };
2683
+ })();
2684
+
2228
2685
  /**
2229
2686
  * 添加的付款
2230
2687
  */
@@ -2489,6 +2946,85 @@ var validateFields$2 = function validateFields(form) {
2489
2946
  });
2490
2947
  };
2491
2948
 
2949
+ /**
2950
+ * 保存正在编辑的货物
2951
+ */
2952
+ var saveEditPassenger = /*#__PURE__*/(function () {
2953
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(state) {
2954
+ var editGood, form;
2955
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
2956
+ while (1) {
2957
+ switch (_context.prev = _context.next) {
2958
+ case 0:
2959
+ editGood = state.passengerListState.editGood;
2960
+ form = state.passengerListState.form;
2961
+
2962
+ if (!(!editGood || !form)) {
2963
+ _context.next = 4;
2964
+ break;
2965
+ }
2966
+
2967
+ return _context.abrupt("return");
2968
+
2969
+ case 4:
2970
+ _context.next = 6;
2971
+ return validateFields$3(form);
2972
+
2973
+ case 6:
2974
+ if (!_context.sent.err) {
2975
+ _context.next = 8;
2976
+ break;
2977
+ }
2978
+
2979
+ return _context.abrupt("return");
2980
+
2981
+ case 8:
2982
+ state.passengerListState.goodsList = state.passengerListState.goodsList.map(function (e) {
2983
+ return e.$index === editGood.$index ? _objectSpread2(_objectSpread2({}, e), editGood) : e;
2984
+ });
2985
+ state.passengerListState.editGood = undefined;
2986
+
2987
+ case 10:
2988
+ case "end":
2989
+ return _context.stop();
2990
+ }
2991
+ }
2992
+ }, _callee);
2993
+ }));
2994
+
2995
+ return function (_x) {
2996
+ return _ref.apply(this, arguments);
2997
+ };
2998
+ })();
2999
+
3000
+ var validateFields$3 = function validateFields(form) {
3001
+ return new Promise(function (resolve) {
3002
+ form.validateFields( /*#__PURE__*/function () {
3003
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(err, values) {
3004
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
3005
+ while (1) {
3006
+ switch (_context2.prev = _context2.next) {
3007
+ case 0:
3008
+ resolve({
3009
+ err: err,
3010
+ values: values
3011
+ });
3012
+
3013
+ case 1:
3014
+ case "end":
3015
+ return _context2.stop();
3016
+ }
3017
+ }
3018
+ }, _callee2);
3019
+ }));
3020
+
3021
+ return function (_x2, _x3) {
3022
+ return _ref2.apply(this, arguments);
3023
+ };
3024
+ }());
3025
+ });
3026
+ };
3027
+
2492
3028
  /**
2493
3029
  * 计算搜索商品
2494
3030
  * @param goodsList 被搜索列表
@@ -10499,16 +11035,20 @@ var InvoiceController = /*#__PURE__*/function (_InvoiceControllerFor) {
10499
11035
  _this.setFreight = _this.pipeline(setFreight);
10500
11036
  _this.setPay = _this.pipeline(setPay);
10501
11037
  _this.setEditFreight = _this.pipeline(setEditFreight);
11038
+ _this.setEditPassenger = _this.pipeline(setEditPassenger);
10502
11039
  _this.setEditPay = _this.pipeline(setEditPay);
10503
11040
  _this.setEditGood = _this.pipeline(setEditGood);
10504
11041
  _this.saveEditGood = _this.pipeline(saveEditGood);
10505
11042
  _this.saveEditFreight = _this.pipeline(saveEditFreight);
11043
+ _this.saveEditPassenger = _this.pipeline(saveEditPassenger);
10506
11044
  _this.saveEditPay = _this.pipeline(saveEditPay);
10507
11045
  _this.delGood = _this.pipeline(delGood);
10508
11046
  _this.delFreight = _this.pipeline(delFreight);
11047
+ _this.delPassenger = _this.pipeline(delPassenger);
10509
11048
  _this.delPay = _this.pipeline(delPay);
10510
11049
  _this.addGood = _this.pipeline(addGood);
10511
11050
  _this.addFreight = _this.pipeline(addFreight);
11051
+ _this.addPassenger = _this.pipeline(addPassenger);
10512
11052
  _this.addPay = _this.pipeline(addPay);
10513
11053
  _this.mergeDetails = _this.pipeline(mergeDetails);
10514
11054
  _this.mergeDiscount = _this.pipeline(mergeDiscount);
@@ -10521,6 +11061,8 @@ var InvoiceController = /*#__PURE__*/function (_InvoiceControllerFor) {
10521
11061
  _this.getGoodsSearch = getGoodsSearch;
10522
11062
  _this.getGoodsTaxRateList = void 0;
10523
11063
  _this.setColumnsConfig = void 0;
11064
+ _this.downloadPassengerTpt = void 0;
11065
+ _this.uploadPassenger = void 0;
10524
11066
  return _this;
10525
11067
  } // ----------------- 发票头 模块相关 -----------------
10526
11068
 
@@ -12480,7 +13022,68 @@ function _objectSpread2$1(target) {
12480
13022
  return target;
12481
13023
  }
12482
13024
 
12483
- function _objectWithoutPropertiesLoose(source, excluded) {
13025
+ function _arrayWithHoles$1(arr) {
13026
+ if (Array.isArray(arr)) return arr;
13027
+ }
13028
+
13029
+ function _iterableToArrayLimit$1(arr, i) {
13030
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
13031
+
13032
+ if (_i == null) return;
13033
+ var _arr = [];
13034
+ var _n = true;
13035
+ var _d = false;
13036
+
13037
+ var _s, _e;
13038
+
13039
+ try {
13040
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
13041
+ _arr.push(_s.value);
13042
+
13043
+ if (i && _arr.length === i) break;
13044
+ }
13045
+ } catch (err) {
13046
+ _d = true;
13047
+ _e = err;
13048
+ } finally {
13049
+ try {
13050
+ if (!_n && _i["return"] != null) _i["return"]();
13051
+ } finally {
13052
+ if (_d) throw _e;
13053
+ }
13054
+ }
13055
+
13056
+ return _arr;
13057
+ }
13058
+
13059
+ function _arrayLikeToArray$1(arr, len) {
13060
+ if (len == null || len > arr.length) len = arr.length;
13061
+
13062
+ for (var i = 0, arr2 = new Array(len); i < len; i++) {
13063
+ arr2[i] = arr[i];
13064
+ }
13065
+
13066
+ return arr2;
13067
+ }
13068
+
13069
+ function _unsupportedIterableToArray$1(o, minLen) {
13070
+ if (!o) return;
13071
+ if (typeof o === "string") return _arrayLikeToArray$1(o, minLen);
13072
+ var n = Object.prototype.toString.call(o).slice(8, -1);
13073
+ if (n === "Object" && o.constructor) n = o.constructor.name;
13074
+ if (n === "Map" || n === "Set") return Array.from(o);
13075
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);
13076
+ }
13077
+
13078
+ function _nonIterableRest$1() {
13079
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
13080
+ }
13081
+
13082
+ function _slicedToArray$1(arr, i) {
13083
+ return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest$1();
13084
+ }
13085
+
13086
+ function _objectWithoutPropertiesLoose$1(source, excluded) {
12484
13087
  if (source == null) return {};
12485
13088
  var target = {};
12486
13089
  var sourceKeys = Object.keys(source);
@@ -12495,9 +13098,9 @@ function _objectWithoutPropertiesLoose(source, excluded) {
12495
13098
  return target;
12496
13099
  }
12497
13100
 
12498
- function _objectWithoutProperties(source, excluded) {
13101
+ function _objectWithoutProperties$1(source, excluded) {
12499
13102
  if (source == null) return {};
12500
- var target = _objectWithoutPropertiesLoose(source, excluded);
13103
+ var target = _objectWithoutPropertiesLoose$1(source, excluded);
12501
13104
  var key, i;
12502
13105
 
12503
13106
  if (Object.getOwnPropertySymbols) {
@@ -12514,6 +13117,16 @@ function _objectWithoutProperties(source, excluded) {
12514
13117
  return target;
12515
13118
  }
12516
13119
 
13120
+ function _typeof(obj) {
13121
+ "@babel/helpers - typeof";
13122
+
13123
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
13124
+ return typeof obj;
13125
+ } : function (obj) {
13126
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
13127
+ }, _typeof(obj);
13128
+ }
13129
+
12517
13130
  /**
12518
13131
  * Take input from [0, n] and return it as [0, 1]
12519
13132
  * @hidden
@@ -13415,6 +14028,53 @@ function updateCSS(css, key) {
13415
14028
  function warning$1(valid, message) {
13416
14029
  warningOnce(valid, "[@ant-design/icons] ".concat(message));
13417
14030
  }
14031
+ function isIconDefinition(target) {
14032
+ return _typeof(target) === 'object' && typeof target.name === 'string' && typeof target.theme === 'string' && (_typeof(target.icon) === 'object' || typeof target.icon === 'function');
14033
+ }
14034
+ function normalizeAttrs() {
14035
+ var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
14036
+ return Object.keys(attrs).reduce(function (acc, key) {
14037
+ var val = attrs[key];
14038
+
14039
+ switch (key) {
14040
+ case 'class':
14041
+ acc.className = val;
14042
+ delete acc.class;
14043
+ break;
14044
+
14045
+ default:
14046
+ acc[key] = val;
14047
+ }
14048
+
14049
+ return acc;
14050
+ }, {});
14051
+ }
14052
+ function generate$1(node, key, rootProps) {
14053
+ if (!rootProps) {
14054
+ return /*#__PURE__*/React__default['default'].createElement(node.tag, _objectSpread2$1({
14055
+ key: key
14056
+ }, normalizeAttrs(node.attrs)), (node.children || []).map(function (child, index) {
14057
+ return generate$1(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
14058
+ }));
14059
+ }
14060
+
14061
+ return /*#__PURE__*/React__default['default'].createElement(node.tag, _objectSpread2$1(_objectSpread2$1({
14062
+ key: key
14063
+ }, normalizeAttrs(node.attrs)), rootProps), (node.children || []).map(function (child, index) {
14064
+ return generate$1(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
14065
+ }));
14066
+ }
14067
+ function getSecondaryColor(primaryColor) {
14068
+ // choose the second color
14069
+ return generate(primaryColor)[0];
14070
+ }
14071
+ function normalizeTwoToneColors(twoToneColor) {
14072
+ if (!twoToneColor) {
14073
+ return [];
14074
+ }
14075
+
14076
+ return Array.isArray(twoToneColor) ? twoToneColor : [twoToneColor];
14077
+ } // These props make sure that the SVG behaviours like general text.
13418
14078
  // Reference: https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4
13419
14079
 
13420
14080
  var svgBaseProps = {
@@ -13439,8 +14099,192 @@ var useInsertStyles = function useInsertStyles() {
13439
14099
  }, []);
13440
14100
  };
13441
14101
 
13442
- var _excluded = ["className", "component", "viewBox", "spin", "rotate", "tabIndex", "onClick", "children"];
14102
+ var _excluded = ["icon", "className", "onClick", "style", "primaryColor", "secondaryColor"];
14103
+ var twoToneColorPalette = {
14104
+ primaryColor: '#333',
14105
+ secondaryColor: '#E6E6E6',
14106
+ calculated: false
14107
+ };
14108
+
14109
+ function setTwoToneColors(_ref) {
14110
+ var primaryColor = _ref.primaryColor,
14111
+ secondaryColor = _ref.secondaryColor;
14112
+ twoToneColorPalette.primaryColor = primaryColor;
14113
+ twoToneColorPalette.secondaryColor = secondaryColor || getSecondaryColor(primaryColor);
14114
+ twoToneColorPalette.calculated = !!secondaryColor;
14115
+ }
14116
+
14117
+ function getTwoToneColors() {
14118
+ return _objectSpread2$1({}, twoToneColorPalette);
14119
+ }
14120
+
14121
+ var IconBase = function IconBase(props) {
14122
+ var icon = props.icon,
14123
+ className = props.className,
14124
+ onClick = props.onClick,
14125
+ style = props.style,
14126
+ primaryColor = props.primaryColor,
14127
+ secondaryColor = props.secondaryColor,
14128
+ restProps = _objectWithoutProperties$1(props, _excluded);
14129
+
14130
+ var colors = twoToneColorPalette;
14131
+
14132
+ if (primaryColor) {
14133
+ colors = {
14134
+ primaryColor: primaryColor,
14135
+ secondaryColor: secondaryColor || getSecondaryColor(primaryColor)
14136
+ };
14137
+ }
14138
+
14139
+ useInsertStyles();
14140
+ warning$1(isIconDefinition(icon), "icon should be icon definiton, but got ".concat(icon));
14141
+
14142
+ if (!isIconDefinition(icon)) {
14143
+ return null;
14144
+ }
14145
+
14146
+ var target = icon;
14147
+
14148
+ if (target && typeof target.icon === 'function') {
14149
+ target = _objectSpread2$1(_objectSpread2$1({}, target), {}, {
14150
+ icon: target.icon(colors.primaryColor, colors.secondaryColor)
14151
+ });
14152
+ }
14153
+
14154
+ return generate$1(target.icon, "svg-".concat(target.name), _objectSpread2$1({
14155
+ className: className,
14156
+ onClick: onClick,
14157
+ style: style,
14158
+ 'data-icon': target.name,
14159
+ width: '1em',
14160
+ height: '1em',
14161
+ fill: 'currentColor',
14162
+ 'aria-hidden': 'true'
14163
+ }, restProps));
14164
+ };
14165
+
14166
+ IconBase.displayName = 'IconReact';
14167
+ IconBase.getTwoToneColors = getTwoToneColors;
14168
+ IconBase.setTwoToneColors = setTwoToneColors;
14169
+
14170
+ function setTwoToneColor(twoToneColor) {
14171
+ var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor),
14172
+ _normalizeTwoToneColo2 = _slicedToArray$1(_normalizeTwoToneColo, 2),
14173
+ primaryColor = _normalizeTwoToneColo2[0],
14174
+ secondaryColor = _normalizeTwoToneColo2[1];
14175
+
14176
+ return IconBase.setTwoToneColors({
14177
+ primaryColor: primaryColor,
14178
+ secondaryColor: secondaryColor
14179
+ });
14180
+ }
14181
+ function getTwoToneColor() {
14182
+ var colors = IconBase.getTwoToneColors();
14183
+
14184
+ if (!colors.calculated) {
14185
+ return colors.primaryColor;
14186
+ }
14187
+
14188
+ return [colors.primaryColor, colors.secondaryColor];
14189
+ }
14190
+
14191
+ var _excluded$1 = ["className", "icon", "spin", "rotate", "tabIndex", "onClick", "twoToneColor"];
14192
+ // should move it to antd main repo?
14193
+
14194
+ setTwoToneColor('#1890ff');
13443
14195
  var Icon = /*#__PURE__*/React.forwardRef(function (props, ref) {
14196
+ var _classNames;
14197
+
14198
+ var className = props.className,
14199
+ icon = props.icon,
14200
+ spin = props.spin,
14201
+ rotate = props.rotate,
14202
+ tabIndex = props.tabIndex,
14203
+ onClick = props.onClick,
14204
+ twoToneColor = props.twoToneColor,
14205
+ restProps = _objectWithoutProperties$1(props, _excluded$1);
14206
+
14207
+ var _React$useContext = React.useContext(IconContext),
14208
+ _React$useContext$pre = _React$useContext.prefixCls,
14209
+ prefixCls = _React$useContext$pre === void 0 ? 'anticon' : _React$useContext$pre;
14210
+
14211
+ var classString = classnames__default['default'](prefixCls, (_classNames = {}, _defineProperty$1(_classNames, "".concat(prefixCls, "-").concat(icon.name), !!icon.name), _defineProperty$1(_classNames, "".concat(prefixCls, "-spin"), !!spin || icon.name === 'loading'), _classNames), className);
14212
+ var iconTabIndex = tabIndex;
14213
+
14214
+ if (iconTabIndex === undefined && onClick) {
14215
+ iconTabIndex = -1;
14216
+ }
14217
+
14218
+ var svgStyle = rotate ? {
14219
+ msTransform: "rotate(".concat(rotate, "deg)"),
14220
+ transform: "rotate(".concat(rotate, "deg)")
14221
+ } : undefined;
14222
+
14223
+ var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor),
14224
+ _normalizeTwoToneColo2 = _slicedToArray$1(_normalizeTwoToneColo, 2),
14225
+ primaryColor = _normalizeTwoToneColo2[0],
14226
+ secondaryColor = _normalizeTwoToneColo2[1];
14227
+
14228
+ return /*#__PURE__*/React.createElement("span", _objectSpread2$1(_objectSpread2$1({
14229
+ role: "img",
14230
+ "aria-label": icon.name
14231
+ }, restProps), {}, {
14232
+ ref: ref,
14233
+ tabIndex: iconTabIndex,
14234
+ onClick: onClick,
14235
+ className: classString
14236
+ }), /*#__PURE__*/React.createElement(IconBase, {
14237
+ icon: icon,
14238
+ primaryColor: primaryColor,
14239
+ secondaryColor: secondaryColor,
14240
+ style: svgStyle
14241
+ }));
14242
+ });
14243
+ Icon.displayName = 'AntdIcon';
14244
+ Icon.getTwoToneColor = getTwoToneColor;
14245
+ Icon.setTwoToneColor = setTwoToneColor;
14246
+
14247
+ // This icon file is generated automatically.
14248
+ var CheckCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" } }] }, "name": "check-circle", "theme": "filled" };
14249
+
14250
+ var CheckCircleFilled$1 = function CheckCircleFilled$1(props, ref) {
14251
+ return /*#__PURE__*/React.createElement(Icon, _objectSpread2$1(_objectSpread2$1({}, props), {}, {
14252
+ ref: ref,
14253
+ icon: CheckCircleFilled
14254
+ }));
14255
+ };
14256
+
14257
+ CheckCircleFilled$1.displayName = 'CheckCircleFilled';
14258
+ var CheckCircleFilled$2 = /*#__PURE__*/React.forwardRef(CheckCircleFilled$1);
14259
+
14260
+ // This icon file is generated automatically.
14261
+ var CloseOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z" } }] }, "name": "close", "theme": "outlined" };
14262
+
14263
+ var CloseOutlined$1 = function CloseOutlined$1(props, ref) {
14264
+ return /*#__PURE__*/React.createElement(Icon, _objectSpread2$1(_objectSpread2$1({}, props), {}, {
14265
+ ref: ref,
14266
+ icon: CloseOutlined
14267
+ }));
14268
+ };
14269
+
14270
+ CloseOutlined$1.displayName = 'CloseOutlined';
14271
+ var CloseOutlined$2 = /*#__PURE__*/React.forwardRef(CloseOutlined$1);
14272
+
14273
+ // This icon file is generated automatically.
14274
+ var DownOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, "name": "down", "theme": "outlined" };
14275
+
14276
+ var DownOutlined$1 = function DownOutlined$1(props, ref) {
14277
+ return /*#__PURE__*/React.createElement(Icon, _objectSpread2$1(_objectSpread2$1({}, props), {}, {
14278
+ ref: ref,
14279
+ icon: DownOutlined
14280
+ }));
14281
+ };
14282
+
14283
+ DownOutlined$1.displayName = 'DownOutlined';
14284
+ var DownOutlined$2 = /*#__PURE__*/React.forwardRef(DownOutlined$1);
14285
+
14286
+ var _excluded$2 = ["className", "component", "viewBox", "spin", "rotate", "tabIndex", "onClick", "children"];
14287
+ var Icon$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
13444
14288
  var className = props.className,
13445
14289
  Component = props.component,
13446
14290
  viewBox = props.viewBox,
@@ -13449,7 +14293,7 @@ var Icon = /*#__PURE__*/React.forwardRef(function (props, ref) {
13449
14293
  tabIndex = props.tabIndex,
13450
14294
  onClick = props.onClick,
13451
14295
  children = props.children,
13452
- restProps = _objectWithoutProperties(props, _excluded);
14296
+ restProps = _objectWithoutProperties$1(props, _excluded$2);
13453
14297
 
13454
14298
  warning$1(Boolean(Component || children), 'Should have `component` prop or `children`.');
13455
14299
  useInsertStyles();
@@ -13506,7 +14350,7 @@ var Icon = /*#__PURE__*/React.forwardRef(function (props, ref) {
13506
14350
  className: classString
13507
14351
  }), renderInnerNode());
13508
14352
  });
13509
- Icon.displayName = 'AntdIcon';
14353
+ Icon$1.displayName = 'AntdIcon';
13510
14354
 
13511
14355
  var _path$3;
13512
14356
 
@@ -13833,7 +14677,7 @@ function Drag$1(props) {
13833
14677
  },
13834
14678
  className: "kts-invoice-operate-goods-list-itemName-drag",
13835
14679
  onMouseOver: controller.saveEditGood
13836
- }, /*#__PURE__*/React__default['default'].createElement(Icon, {
14680
+ }, /*#__PURE__*/React__default['default'].createElement(Icon$1, {
13837
14681
  component: SvgI001
13838
14682
  }));
13839
14683
  }, [onMouseDown, controller]);
@@ -18108,7 +18952,7 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
18108
18952
  }),
18109
18953
  /*#__PURE__*/
18110
18954
  // !readOnly &&
18111
- React__default['default'].createElement(Icon, {
18955
+ React__default['default'].createElement(Icon$1, {
18112
18956
  className: "digtal-stakeholder-expand-button",
18113
18957
  component: isExpand ? SvgArrowUp : SvgArrowDown,
18114
18958
  onClick: onExpand
@@ -18145,7 +18989,7 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
18145
18989
  width: 20,
18146
18990
  height: '100%'
18147
18991
  },
18148
- icon: /*#__PURE__*/React__default['default'].createElement(Icon, {
18992
+ icon: /*#__PURE__*/React__default['default'].createElement(Icon$1, {
18149
18993
  component: SvgPlus
18150
18994
  }),
18151
18995
  onClick: function onClick() {
@@ -18263,7 +19107,7 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
18263
19107
  }),
18264
19108
  /*#__PURE__*/
18265
19109
  // !readOnly &&
18266
- React__default['default'].createElement(Icon, {
19110
+ React__default['default'].createElement(Icon$1, {
18267
19111
  className: "digtal-stakeholder-expand-button",
18268
19112
  component: isExpand ? SvgArrowUp : SvgArrowDown,
18269
19113
  onClick: onExpand
@@ -19063,7 +19907,7 @@ var StakeFarmerholder = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create()
19063
19907
  })
19064
19908
  }, /*#__PURE__*/React__default['default'].createElement("div", null, '销售方信息'.split('').map(function (e) {
19065
19909
  return /*#__PURE__*/React__default['default'].createElement("span", null, e);
19066
- }), !readOnly && /*#__PURE__*/React__default['default'].createElement(Icon, {
19910
+ }), !readOnly && /*#__PURE__*/React__default['default'].createElement(Icon$1, {
19067
19911
  className: "digtal-stakeholder-expand-button",
19068
19912
  component: isExpand ? SvgArrowUp$1 : SvgArrowDown$1,
19069
19913
  onClick: onExpand
@@ -19101,7 +19945,7 @@ var StakeFarmerholder = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create()
19101
19945
  width: 20,
19102
19946
  height: '100%'
19103
19947
  },
19104
- icon: /*#__PURE__*/React__default['default'].createElement(Icon, {
19948
+ icon: /*#__PURE__*/React__default['default'].createElement(Icon$1, {
19105
19949
  component: SvgPlus$1
19106
19950
  }),
19107
19951
  onClick: function onClick() {
@@ -19217,7 +20061,7 @@ var StakeFarmerholder = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create()
19217
20061
  }
19218
20062
  }, "\u662F\u5426\u5C55\u793A"))))))), /*#__PURE__*/React__default['default'].createElement("div", null, '购买方信息'.split('').map(function (e) {
19219
20063
  return /*#__PURE__*/React__default['default'].createElement("span", null, e);
19220
- }), !readOnly && /*#__PURE__*/React__default['default'].createElement(Icon, {
20064
+ }), !readOnly && /*#__PURE__*/React__default['default'].createElement(Icon$1, {
19221
20065
  className: "digtal-stakeholder-expand-button",
19222
20066
  component: isExpand ? SvgArrowUp$1 : SvgArrowDown$1,
19223
20067
  onClick: onExpand
@@ -19257,7 +20101,7 @@ var StakeFarmerholder = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create()
19257
20101
  width: 20,
19258
20102
  height: '100%'
19259
20103
  },
19260
- icon: /*#__PURE__*/React__default['default'].createElement(Icon, {
20104
+ icon: /*#__PURE__*/React__default['default'].createElement(Icon$1, {
19261
20105
  component: SvgPlus$1
19262
20106
  }),
19263
20107
  onClick: function onClick() {
@@ -20889,7 +21733,7 @@ var Statistics$1 = (function () {
20889
21733
  style: {
20890
21734
  paddingLeft: 30
20891
21735
  }
20892
- }, /*#__PURE__*/React__default['default'].createElement(Icon, {
21736
+ }, /*#__PURE__*/React__default['default'].createElement(Icon$1, {
20893
21737
  style: {
20894
21738
  fontSize: 16
20895
21739
  },
@@ -23275,7 +24119,7 @@ function Drag$2(props) {
23275
24119
  },
23276
24120
  className: "kts-invoice-operate-goods-list-itemName-drag",
23277
24121
  onMouseOver: controller.saveEditGood
23278
- }, /*#__PURE__*/React__default['default'].createElement(Icon, {
24122
+ }, /*#__PURE__*/React__default['default'].createElement(Icon$1, {
23279
24123
  component: SvgI001$1
23280
24124
  }));
23281
24125
  }, [onMouseDown, controller]);
@@ -27259,7 +28103,7 @@ var Architecture = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fun
27259
28103
  width: "auto"
27260
28104
  },
27261
28105
  type: "link",
27262
- icon: /*#__PURE__*/React__default['default'].createElement(Icon, {
28106
+ icon: /*#__PURE__*/React__default['default'].createElement(Icon$1, {
27263
28107
  component: SvgPlus$3
27264
28108
  }),
27265
28109
  disabled: readOnly || crossCitiesSign !== 'Y',
@@ -30545,6 +31389,283 @@ var getItemCode = function getItemCode(record, editGood) {
30545
31389
  return record.productCode;
30546
31390
  };
30547
31391
 
31392
+ var Dragger = ktsComponentsAntdX4.Upload.Dragger;
31393
+ var Text$8 = ktsComponentsAntdX4.Typography.Text;
31394
+ var ImportPassengerDrawer = (function () {
31395
+ var controller = Invoice.useInvoiceController();
31396
+ var visible = controller.useMemo(function (s) {
31397
+ return s.passengerListState.isVisibleDrawer;
31398
+ }, []);
31399
+ var dataSource = controller.useMemo(function (s) {
31400
+ return s.passengerListState.dataSource;
31401
+ }, []);
31402
+ var onClose = React__default['default'].useCallback(function () {
31403
+ controller.pipeline( /*#__PURE__*/function () {
31404
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
31405
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
31406
+ while (1) {
31407
+ switch (_context.prev = _context.next) {
31408
+ case 0:
31409
+ s.passengerListState.isVisibleDrawer = false;
31410
+ s.passengerListState.dataSource = [];
31411
+
31412
+ case 2:
31413
+ case "end":
31414
+ return _context.stop();
31415
+ }
31416
+ }
31417
+ }, _callee);
31418
+ }));
31419
+
31420
+ return function (_x) {
31421
+ return _ref.apply(this, arguments);
31422
+ };
31423
+ }())();
31424
+ }, [controller]);
31425
+ var onConfirm = React__default['default'].useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
31426
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
31427
+ while (1) {
31428
+ switch (_context3.prev = _context3.next) {
31429
+ case 0:
31430
+ if (!dataSource.length) {
31431
+ _context3.next = 5;
31432
+ break;
31433
+ }
31434
+
31435
+ _context3.next = 3;
31436
+ return controller.pipeline( /*#__PURE__*/function () {
31437
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
31438
+ var data;
31439
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
31440
+ while (1) {
31441
+ switch (_context2.prev = _context2.next) {
31442
+ case 0:
31443
+ data = dataSource.map(function (item) {
31444
+ return _objectSpread2({
31445
+ $index: idGenerator()
31446
+ }, item);
31447
+ });
31448
+ s.passengerListState.goodsList = [].concat(_toConsumableArray(s.passengerListState.goodsList), _toConsumableArray(data));
31449
+ s.passengerListState.dataSource = [];
31450
+
31451
+ case 3:
31452
+ case "end":
31453
+ return _context2.stop();
31454
+ }
31455
+ }
31456
+ }, _callee2);
31457
+ }));
31458
+
31459
+ return function (_x2) {
31460
+ return _ref3.apply(this, arguments);
31461
+ };
31462
+ }())();
31463
+
31464
+ case 3:
31465
+ _context3.next = 5;
31466
+ return controller.wait();
31467
+
31468
+ case 5:
31469
+ onClose();
31470
+
31471
+ case 6:
31472
+ case "end":
31473
+ return _context3.stop();
31474
+ }
31475
+ }
31476
+ }, _callee3);
31477
+ })), [controller, dataSource]);
31478
+ return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Drawer, {
31479
+ title: "\u6279\u91CF\u5BFC\u5165",
31480
+ placement: "right",
31481
+ // closable={false}
31482
+ destroyOnClose: true,
31483
+ width: 983,
31484
+ onClose: onClose,
31485
+ visible: visible,
31486
+ // 使用 footer 属性放置底部按钮
31487
+ footer: /*#__PURE__*/React__default['default'].createElement("div", {
31488
+ style: {
31489
+ textAlign: 'right'
31490
+ }
31491
+ }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Space, null, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Button, {
31492
+ onClick: function onClick() {
31493
+ return onClose();
31494
+ }
31495
+ }, "\u53D6\u6D88"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Button, {
31496
+ type: "primary",
31497
+ onClick: onConfirm
31498
+ }, "\u786E\u5B9A")))
31499
+ }, /*#__PURE__*/React__default['default'].createElement(DrawerBody$3, null));
31500
+ });
31501
+
31502
+ var DrawerBody$3 = function DrawerBody() {
31503
+ var controller = Invoice.useInvoiceController();
31504
+
31505
+ var _React$useState = React__default['default'].useState(''),
31506
+ _React$useState2 = _slicedToArray(_React$useState, 2),
31507
+ fileName = _React$useState2[0],
31508
+ setFileName = _React$useState2[1];
31509
+
31510
+ var _React$useState3 = React__default['default'].useState('idle'),
31511
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
31512
+ status = _React$useState4[0],
31513
+ setStatus = _React$useState4[1];
31514
+
31515
+ var _React$useState5 = React__default['default'].useState(0),
31516
+ _React$useState6 = _slicedToArray(_React$useState5, 2),
31517
+ percent = _React$useState6[0],
31518
+ setPercent = _React$useState6[1];
31519
+
31520
+ var columns = controller.useMemo(function (s) {
31521
+ return s.passengerListState.columns;
31522
+ }, []);
31523
+ var dataSource = controller.useMemo(function (s) {
31524
+ return s.passengerListState.dataSource;
31525
+ }, []);
31526
+ var pagination = controller.useMemo(function (s) {
31527
+ return s.passengerListState.pagination;
31528
+ }, []);
31529
+ var handleDownloadTemplate = React__default['default'].useCallback(function () {
31530
+ if (controller.downloadPassengerTpt) {
31531
+ controller.downloadPassengerTpt();
31532
+ }
31533
+ }, [controller]); // 1. 前置校验:限制文件类型为 .xls, .xlsx
31534
+
31535
+ var beforeUpload = React__default['default'].useCallback(function (file) {
31536
+ var isExcel = file.type === 'application/vnd.ms-excel' || file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' || /\.(xls|xlsx)$/.test(file.name); // 兜底判断文件名后缀
31537
+
31538
+ if (!isExcel) {
31539
+ ktsComponentsAntdX4.message.error('只能上传 .xls 或 .xlsx 格式的Excel文件!');
31540
+ return ktsComponentsAntdX4.Upload.LIST_IGNORE; // 阻止上传
31541
+ }
31542
+
31543
+ setFileName(file.name);
31544
+ setStatus('uploading');
31545
+ setPercent(0);
31546
+ return true;
31547
+ }, []); // 2. 正确类型定义的 customRequest
31548
+ // 直接使用 UploadProps['customRequest'] 可以完美推导出 options 内所有的类型!
31549
+
31550
+ var customRequest = /*#__PURE__*/function () {
31551
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(options) {
31552
+ var file, onSuccess, onError, onProgress, res;
31553
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
31554
+ while (1) {
31555
+ switch (_context4.prev = _context4.next) {
31556
+ case 0:
31557
+ file = options.file, onSuccess = options.onSuccess, onError = options.onError, onProgress = options.onProgress;
31558
+
31559
+ if (!controller.uploadPassenger) {
31560
+ _context4.next = 6;
31561
+ break;
31562
+ }
31563
+
31564
+ _context4.next = 4;
31565
+ return controller.uploadPassenger(file);
31566
+
31567
+ case 4:
31568
+ res = _context4.sent;
31569
+
31570
+ if (res) {
31571
+ setStatus('done');
31572
+ setPercent(100);
31573
+ }
31574
+
31575
+ case 6:
31576
+ case "end":
31577
+ return _context4.stop();
31578
+ }
31579
+ }
31580
+ }, _callee4);
31581
+ }));
31582
+
31583
+ return function customRequest(_x3) {
31584
+ return _ref4.apply(this, arguments);
31585
+ };
31586
+ }(); // 3. 处理文件选择状态(更新左侧 Input 显示的文件名)
31587
+
31588
+ React__default['default'].useEffect(function () {
31589
+ controller.getBuyerList && controller.getBuyerList({
31590
+ pagination: {
31591
+ current: 1
31592
+ }
31593
+ });
31594
+ }, [controller]);
31595
+ return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Alert, {
31596
+ type: "info",
31597
+ showIcon: true,
31598
+ message: /*#__PURE__*/React__default['default'].createElement("span", null, "\u8BF7\u5148\u4E0B\u8F7D\u6A21\u677F", /*#__PURE__*/React__default['default'].createElement("a", {
31599
+ href: "#",
31600
+ style: {
31601
+ margin: '0 4px'
31602
+ },
31603
+ onClick: handleDownloadTemplate
31604
+ }, "\u300A\u65C5\u5BA2\u8FD0\u8F93\u670D\u52A1\u7279\u5B9A\u4FE1\u606F-\u6279\u91CF\u5BFC\u5165\u6A21\u677F\u300B"), "\uFF0C\u6309\u7167\u6A21\u677F\u586B\u5199\u540E\u4E0A\u4F20\u3002")
31605
+ }), /*#__PURE__*/React__default['default'].createElement("div", {
31606
+ style: {
31607
+ display: 'flex',
31608
+ alignItems: 'center',
31609
+ gap: 8,
31610
+ marginBottom: 20,
31611
+ marginTop: 20
31612
+ }
31613
+ }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Input, {
31614
+ placeholder: "\u9009\u62E9\u6587\u4EF6",
31615
+ value: fileName,
31616
+ readOnly: true,
31617
+ style: {
31618
+ width: 400,
31619
+ height: 32
31620
+ },
31621
+ suffix: status === 'uploading' ? /*#__PURE__*/React__default['default'].createElement("div", {
31622
+ style: {
31623
+ display: 'flex',
31624
+ alignItems: 'center',
31625
+ gap: 4
31626
+ }
31627
+ }, /*#__PURE__*/React__default['default'].createElement("span", {
31628
+ style: {
31629
+ fontSize: 12,
31630
+ color: '#1890ff'
31631
+ }
31632
+ }, percent, "%")) : status === 'done' ? /*#__PURE__*/React__default['default'].createElement(CheckCircleFilled$2, {
31633
+ style: {
31634
+ color: '#52c41a',
31635
+ fontSize: 16
31636
+ }
31637
+ }) : null
31638
+ }), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Upload, {
31639
+ accept: ".xls,.xlsx",
31640
+ showUploadList: false,
31641
+ beforeUpload: beforeUpload,
31642
+ customRequest: customRequest
31643
+ }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Button, {
31644
+ style: status === 'uploading' ? {
31645
+ color: '#1890ff',
31646
+ borderColor: '#1890ff'
31647
+ } : undefined
31648
+ }, fileName ? '重新选择' : "选择文件"))), dataSource && dataSource.length && /*#__PURE__*/React__default['default'].createElement("div", {
31649
+ style: {
31650
+ marginBottom: 20,
31651
+ marginTop: 20
31652
+ }
31653
+ }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Alert, {
31654
+ type: "success",
31655
+ showIcon: true,
31656
+ message: /*#__PURE__*/React__default['default'].createElement("span", null, "\u6587\u4EF6\u5BFC\u5165\u6210\u529F\uFF0C\u5904\u7406\u65C5\u5BA2\u8FD0\u8F93\u670D\u52A1\u7279\u5B9A\u4FE1\u606F\u8BB0\u5F55", dataSource.length, "\u6761\uFF0C\u5904\u7406\u6210\u529F", dataSource.length, "\u6761\u3002")
31657
+ })), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Table, {
31658
+ bordered: true,
31659
+ size: "small",
31660
+ columns: columns,
31661
+ dataSource: dataSource,
31662
+ locale: {
31663
+ emptyText: '暂无数据'
31664
+ },
31665
+ pagination: false
31666
+ }));
31667
+ };
31668
+
30548
31669
  var css_248z$A = ".kts-invoice-operate-goods-endow-code-button-list {\n display: flex;\n flex-direction: column;\n}\n.kts-invoice-operate-goods-endow-code-button-list > button {\n margin-bottom: 10px;\n}\n";
30549
31670
  styleInject(css_248z$A);
30550
31671
 
@@ -30685,12 +31806,12 @@ var EndowCodeDrawer = (function () {
30685
31806
  width: 383,
30686
31807
  onClose: onClose,
30687
31808
  visible: visible
30688
- }, defaultValue && /*#__PURE__*/React__default['default'].createElement(DrawerBody$3, {
31809
+ }, defaultValue && /*#__PURE__*/React__default['default'].createElement(DrawerBody$4, {
30689
31810
  defaultValue: defaultValue
30690
31811
  }));
30691
31812
  });
30692
31813
 
30693
- var DrawerBody$3 = function DrawerBody(props) {
31814
+ var DrawerBody$4 = function DrawerBody(props) {
30694
31815
  var _defaultValue$taxRate, _defaultValue$favoure;
30695
31816
 
30696
31817
  var controller = Invoice.useInvoiceController();
@@ -31987,6 +33108,2321 @@ var MeiTanModal = (function () {
31987
33108
  }, "\u5E02\u573A\u7164"))))))));
31988
33109
  });
31989
33110
 
33111
+ var css_248z$C = ".kts-invoice-operate-goods-table-virtual .ktsAntX-table-body {\n height: 280px;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table.ktsAntX-table-bordered > .ktsAntX-table-container > .ktsAntX-table-header > table > thead > tr > th {\n padding: 0 10px;\n height: 32px;\n background: #f4f4f4;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table.ktsAntX-table-bordered > .ktsAntX-table-container > .ktsAntX-table-body > table > tbody > tr > td {\n padding: 0;\n height: 32px;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table .ktsAntX-table-body {\n position: relative;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table .ktsAntX-table-body > table {\n position: absolute;\n left: 0;\n top: 0;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table .ktsAntX-table-tbody {\n position: relative;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-checkbox-wrapper .ktsAntX-checkbox-inner {\n width: 16px;\n height: 16px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n top: 1px;\n}\n";
33112
+ styleInject(css_248z$C);
33113
+
33114
+ function TableVirtual$4 (props) {
33115
+ var _props$dataSource2;
33116
+
33117
+ var _React$useState = React__default['default'].useState(null),
33118
+ _React$useState2 = _slicedToArray(_React$useState, 2),
33119
+ self = _React$useState2[0],
33120
+ setSelf = _React$useState2[1];
33121
+
33122
+ var tableBody = React__default['default'].useMemo(function () {
33123
+ if (!self) return;
33124
+ return self.querySelector('.ktsAntX-table-body');
33125
+ }, [self]);
33126
+ /** 显示指针 */
33127
+
33128
+ var _React$useState3 = React__default['default'].useState(0),
33129
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
33130
+ pointer = _React$useState4[0],
33131
+ setPointer = _React$useState4[1];
33132
+ /** 行高 */
33133
+
33134
+
33135
+ var rowHeight = React__default['default'].useMemo(function () {
33136
+ if (!self) return 50;
33137
+ var td = self.querySelector('.ktsAntX-table-tbody .ktsAntX-table-row');
33138
+ if (!td) return 50;
33139
+ return td.clientHeight;
33140
+ }, [self, props.dataSource]);
33141
+ /** 间隔容器 */
33142
+
33143
+ var placeholder = React__default['default'].useMemo(function () {
33144
+ if (!self || !tableBody) return;
33145
+ var placeholder = tableBody.querySelector('.table-virtual-placeholder');
33146
+
33147
+ if (!placeholder) {
33148
+ placeholder = document.createElement('div');
33149
+ placeholder.className = 'table-virtual-placeholder';
33150
+ tableBody.appendChild(placeholder);
33151
+ }
33152
+
33153
+ return placeholder;
33154
+ }, [self, tableBody]); // 设置占位dom的搞
33155
+
33156
+ var placeholderHeight = React__default['default'].useMemo(function () {
33157
+ if (!self || !rowHeight || !props.dataSource || !placeholder) return;
33158
+ var placeholderHeight = rowHeight * props.dataSource.length;
33159
+ placeholder.style.height = "".concat(placeholderHeight, "px");
33160
+ return placeholderHeight;
33161
+ }, [self, rowHeight, props.dataSource, placeholder]);
33162
+ /** 可以容纳的行数 */
33163
+
33164
+ var rowSize = React__default['default'].useMemo(function () {
33165
+ if (!tableBody || !rowHeight) return 0;
33166
+ return Math.ceil(tableBody.clientHeight / rowHeight);
33167
+ }, [tableBody, rowHeight, placeholderHeight]); // 计算渲染的行
33168
+
33169
+ var dataSource = React__default['default'].useMemo(function () {
33170
+ var _props$dataSource;
33171
+
33172
+ if (!props.dataSource) return [];
33173
+ if (props.dataSource.length < 10) return props.dataSource;
33174
+ if (!rowSize) return [props.dataSource[0]];
33175
+ return (_props$dataSource = props.dataSource) === null || _props$dataSource === void 0 ? void 0 : _props$dataSource.slice(pointer, pointer + 2 * rowSize);
33176
+ }, [props.dataSource, pointer, rowSize]); // 监听滚动
33177
+
33178
+ React__default['default'].useEffect(function () {
33179
+ if (!self || !placeholder || !props.dataSource || !rowHeight || !tableBody || props.dataSource.length < 10) return;
33180
+
33181
+ var onScroll = function onScroll() {
33182
+ if (!props.dataSource || !tableBody) return;
33183
+ setPointer(Math.floor((props.dataSource.length - rowSize) * (tableBody.scrollTop / (placeholder.clientHeight - tableBody.clientHeight))));
33184
+ };
33185
+
33186
+ onScroll();
33187
+ tableBody.addEventListener('scroll', onScroll);
33188
+ return function () {
33189
+ tableBody.removeEventListener('scroll', onScroll);
33190
+ };
33191
+ }, [self, placeholder, props.dataSource, rowHeight, rowSize]); // 移动列表
33192
+
33193
+ React__default['default'].useEffect(function () {
33194
+ if (!self) return;
33195
+ var table = self.querySelector('.ktsAntX-table .ktsAntX-table-body>table');
33196
+ if (!table) return;
33197
+ table.style.top = "".concat(pointer * rowHeight, "px");
33198
+ }, [pointer, self, rowHeight]);
33199
+ React__default['default'].useEffect(function () {
33200
+ if (!self) return;
33201
+ var cont = self.querySelector('.kts-invoice-operate-goods-table-virtual .ktsAntX-table-body');
33202
+ if (!cont) return;
33203
+ cont.scrollTop = 0;
33204
+ }, [(_props$dataSource2 = props.dataSource) === null || _props$dataSource2 === void 0 ? void 0 : _props$dataSource2.length]);
33205
+ return /*#__PURE__*/React__default['default'].createElement("span", {
33206
+ className: "kts-invoice-operate-goods-table-virtual",
33207
+ ref: function ref(e) {
33208
+ setSelf(e);
33209
+ }
33210
+ }, /*#__PURE__*/React__default['default'].createElement(ktsXui.TableManual, _objectSpread2(_objectSpread2({}, props), {}, {
33211
+ dataSource: dataSource,
33212
+ // 新版本Table会有输入框无法连续输入的问题,先兼容老版本
33213
+ tableComponent: ktsComponentsAntdX4V4.Table
33214
+ })));
33215
+ }
33216
+
33217
+ var AddRowButton$4 = (function () {
33218
+ var controller = Invoice.useInvoiceController();
33219
+ var model = controller.useMemo(function (s) {
33220
+ return s.model;
33221
+ }, []);
33222
+ var rootElement = controller.useMemo(function (s) {
33223
+ return s.rootElement;
33224
+ }, []);
33225
+ /** 产品数据量 */
33226
+
33227
+ var goodsNum = controller.useMemo(function (s) {
33228
+ return s.passengerListState.goodsList.length;
33229
+ }, []);
33230
+ /** 搜索条件 */
33231
+
33232
+ var isAddRow = controller.useMemo(function (s) {
33233
+ return s.passengerListState.isAddRow;
33234
+ }, []);
33235
+ /** 产品最大数 */
33236
+
33237
+ var goodMax = controller.useMemo(function (s) {
33238
+ return s.passengerListState.goodMax;
33239
+ }, []);
33240
+ /** 按钮是否禁用 */
33241
+
33242
+ var disabled = React__default['default'].useMemo(function () {
33243
+ return typeof goodMax === 'number' ? goodsNum >= goodMax : false;
33244
+ }, [goodMax, goodsNum]);
33245
+ var onClick = React__default['default'].useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
33246
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
33247
+ while (1) {
33248
+ switch (_context.prev = _context.next) {
33249
+ case 0:
33250
+ _context.next = 2;
33251
+ return addGood$5(controller);
33252
+
33253
+ case 2:
33254
+ _context.next = 4;
33255
+ return rollBottom$4(controller, rootElement);
33256
+
33257
+ case 4:
33258
+ case "end":
33259
+ return _context.stop();
33260
+ }
33261
+ }
33262
+ }, _callee);
33263
+ })), [controller, rootElement]);
33264
+ if (isAddRow === false) return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
33265
+ if (model === 'prefab') return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
33266
+ if (model === 'readOnly') return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
33267
+ return /*#__PURE__*/React__default['default'].createElement(ktsXui.Button, {
33268
+ size: 'small',
33269
+ type: 'primary',
33270
+ onClick: onClick,
33271
+ disabled: disabled
33272
+ }, "\u589E\u884C");
33273
+ });
33274
+ /** 添加一个空货物 */
33275
+
33276
+ function addGood$5(_x) {
33277
+ return _addGood$4.apply(this, arguments);
33278
+ }
33279
+ /** 货物列表,滚动到底部 */
33280
+
33281
+
33282
+ function _addGood$4() {
33283
+ _addGood$4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(controller) {
33284
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
33285
+ while (1) {
33286
+ switch (_context4.prev = _context4.next) {
33287
+ case 0:
33288
+ _context4.next = 2;
33289
+ return controller.saveEditPassenger();
33290
+
33291
+ case 2:
33292
+ _context4.next = 4;
33293
+ return controller.wait();
33294
+
33295
+ case 4:
33296
+ _context4.next = 6;
33297
+ return controller.run( /*#__PURE__*/function () {
33298
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(s) {
33299
+ var _controller$state$pas;
33300
+
33301
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
33302
+ while (1) {
33303
+ switch (_context3.prev = _context3.next) {
33304
+ case 0:
33305
+ if (!s.passengerListState.editGood) {
33306
+ _context3.next = 3;
33307
+ break;
33308
+ }
33309
+
33310
+ _context3.next = 3;
33311
+ return (_controller$state$pas = controller.state.passengerListState.form) === null || _controller$state$pas === void 0 ? void 0 : _controller$state$pas.validateFields( /*#__PURE__*/function () {
33312
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(err, values) {
33313
+ var firstError;
33314
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
33315
+ while (1) {
33316
+ switch (_context2.prev = _context2.next) {
33317
+ case 0:
33318
+ if (!err) {
33319
+ _context2.next = 4;
33320
+ break;
33321
+ }
33322
+
33323
+ firstError = Object.values(err)[0];
33324
+ ktsXui.message.error({
33325
+ content: firstError.errors[0].message,
33326
+ key: '你正在编辑一条数据'
33327
+ });
33328
+ return _context2.abrupt("return");
33329
+
33330
+ case 4:
33331
+ case "end":
33332
+ return _context2.stop();
33333
+ }
33334
+ }
33335
+ }, _callee2);
33336
+ }));
33337
+
33338
+ return function (_x5, _x6) {
33339
+ return _ref3.apply(this, arguments);
33340
+ };
33341
+ }());
33342
+
33343
+ case 3:
33344
+ _context3.next = 5;
33345
+ return controller.addPassenger({});
33346
+
33347
+ case 5:
33348
+ s.passengerListState.editGood = _context3.sent;
33349
+
33350
+ case 6:
33351
+ case "end":
33352
+ return _context3.stop();
33353
+ }
33354
+ }
33355
+ }, _callee3);
33356
+ }));
33357
+
33358
+ return function (_x4) {
33359
+ return _ref2.apply(this, arguments);
33360
+ };
33361
+ }());
33362
+
33363
+ case 6:
33364
+ case "end":
33365
+ return _context4.stop();
33366
+ }
33367
+ }
33368
+ }, _callee4);
33369
+ }));
33370
+ return _addGood$4.apply(this, arguments);
33371
+ }
33372
+
33373
+ function rollBottom$4(_x2, _x3) {
33374
+ return _rollBottom$4.apply(this, arguments);
33375
+ }
33376
+
33377
+ function _rollBottom$4() {
33378
+ _rollBottom$4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(controller, rootElement) {
33379
+ var cont;
33380
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
33381
+ while (1) {
33382
+ switch (_context5.prev = _context5.next) {
33383
+ case 0:
33384
+ _context5.next = 2;
33385
+ return controller.wait();
33386
+
33387
+ case 2:
33388
+ cont = rootElement === null || rootElement === void 0 ? void 0 : rootElement.querySelector('.ktsAntX-table-body');
33389
+
33390
+ if (cont) {
33391
+ _context5.next = 5;
33392
+ break;
33393
+ }
33394
+
33395
+ return _context5.abrupt("return");
33396
+
33397
+ case 5:
33398
+ cont.scrollTop = cont.scrollHeight;
33399
+
33400
+ case 6:
33401
+ case "end":
33402
+ return _context5.stop();
33403
+ }
33404
+ }
33405
+ }, _callee5);
33406
+ }));
33407
+ return _rollBottom$4.apply(this, arguments);
33408
+ }
33409
+
33410
+ var css_248z$D = ".kts-invoice-operate-goods-list-itemName-drag-container-u {\n position: relative;\n}\n.kts-invoice-operate-goods-list-itemName-drag-container-u::after {\n content: \" \";\n width: 100%;\n height: 2px;\n background: #0074ff;\n position: absolute;\n left: 0;\n top: 0;\n z-index: 9999;\n}\n.kts-invoice-operate-goods-list-itemName-drag-container-d {\n position: relative;\n}\n.kts-invoice-operate-goods-list-itemName-drag-container-d::after {\n content: \" \";\n width: 100%;\n height: 2px;\n background: #0074ff;\n position: absolute;\n left: 0;\n bottom: 0;\n z-index: 9999;\n}\n";
33411
+ styleInject(css_248z$D);
33412
+
33413
+ function TableRow$4(props) {
33414
+ var rowKey = props['data-row-key'];
33415
+ return /*#__PURE__*/React__default['default'].createElement("tr", _objectSpread2(_objectSpread2({}, props), {}, {
33416
+ className: classnames__default['default'](props.className)
33417
+ }));
33418
+ }
33419
+
33420
+ var Text$9 = ktsComponentsAntdX3.Typography.Text;
33421
+ var TitleText$4 = (function (props) {
33422
+ var rules = props.rules,
33423
+ children = props.children;
33424
+ var required = React__default['default'].useMemo(function () {
33425
+ return (rules === null || rules === void 0 ? void 0 : rules.some(function (e) {
33426
+ return !!e.required;
33427
+ })) || props.required;
33428
+ }, [rules, props.required]);
33429
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, required ? /*#__PURE__*/React__default['default'].createElement(Text$9, {
33430
+ type: "danger"
33431
+ }, "*") : /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null), children);
33432
+ });
33433
+
33434
+ var _excluded$3 = ["options", "fieldNames", "placeholder", "onChange", "value", "className", "style", "onBlur"];
33435
+ var DROPDOWN_CLASS = 'custom-cascader-dropdown';
33436
+ var ARROW_CLASS = 'custom-cascader-arrow';
33437
+ var CLEAR_CLASS = 'custom-cascader-clear';
33438
+ var CustomCascader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
33439
+ var _ref$options = _ref.options,
33440
+ options = _ref$options === void 0 ? [] : _ref$options,
33441
+ _ref$fieldNames = _ref.fieldNames,
33442
+ fieldNames = _ref$fieldNames === void 0 ? {
33443
+ label: 'label',
33444
+ value: 'value',
33445
+ children: 'children'
33446
+ } : _ref$fieldNames,
33447
+ _ref$placeholder = _ref.placeholder,
33448
+ placeholder = _ref$placeholder === void 0 ? '请选择或输入地址' : _ref$placeholder,
33449
+ onChange = _ref.onChange,
33450
+ externalValue = _ref.value,
33451
+ _ref$className = _ref.className,
33452
+ className = _ref$className === void 0 ? '' : _ref$className,
33453
+ _ref$style = _ref.style,
33454
+ style = _ref$style === void 0 ? {} : _ref$style,
33455
+ onBlurProp = _ref.onBlur,
33456
+ restProps = _objectWithoutProperties(_ref, _excluded$3);
33457
+
33458
+ var _useState = React.useState(false),
33459
+ _useState2 = _slicedToArray(_useState, 2),
33460
+ open = _useState2[0],
33461
+ setOpen = _useState2[1];
33462
+
33463
+ var _useState3 = React.useState(''),
33464
+ _useState4 = _slicedToArray(_useState3, 2),
33465
+ inputText = _useState4[0],
33466
+ setInputText = _useState4[1];
33467
+
33468
+ var isComposingRef = React.useRef(false);
33469
+ var inputRef = React.useRef(null);
33470
+ var containerRef = React.useRef(null);
33471
+ var blurTimerRef = React.useRef(null);
33472
+ var isMenuClickRef = React.useRef(false);
33473
+ var preventOpenRef = React.useRef(false);
33474
+ var labelKey = fieldNames.label || 'label';
33475
+ var valueKey = fieldNames.value || 'value';
33476
+ var childrenKey = fieldNames.children || 'children'; // ---------- 工具函数 ----------
33477
+
33478
+ var getPathLabel = React.useCallback(function (val) {
33479
+ if (!val || val.length === 0) return '';
33480
+ var current = options;
33481
+ var labels = [];
33482
+
33483
+ var _iterator = _createForOfIteratorHelper(val),
33484
+ _step;
33485
+
33486
+ try {
33487
+ var _loop = function _loop() {
33488
+ var _found$labelKey;
33489
+
33490
+ var v = _step.value;
33491
+ var found = current.find(function (node) {
33492
+ return node[valueKey] === v;
33493
+ });
33494
+ if (!found) return "break";
33495
+ labels.push(((_found$labelKey = found[labelKey]) === null || _found$labelKey === void 0 ? void 0 : _found$labelKey.toString()) || '');
33496
+ current = found[childrenKey] || [];
33497
+ };
33498
+
33499
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
33500
+ var _ret = _loop();
33501
+
33502
+ if (_ret === "break") break;
33503
+ }
33504
+ } catch (err) {
33505
+ _iterator.e(err);
33506
+ } finally {
33507
+ _iterator.f();
33508
+ }
33509
+
33510
+ return labels.length === val.length ? labels.join('') : val[val.length - 1].toString();
33511
+ }, [options, valueKey, labelKey, childrenKey]);
33512
+ var findInTree = React.useCallback(function (searchVal, nodes) {
33513
+ if (!searchVal || !nodes) return false;
33514
+
33515
+ var _iterator2 = _createForOfIteratorHelper(nodes),
33516
+ _step2;
33517
+
33518
+ try {
33519
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
33520
+ var _node$labelKey;
33521
+
33522
+ var node = _step2.value;
33523
+ var nodeLabel = ((_node$labelKey = node[labelKey]) === null || _node$labelKey === void 0 ? void 0 : _node$labelKey.toString()) || '';
33524
+ if (nodeLabel === searchVal) return true;
33525
+ if (node[childrenKey] && findInTree(searchVal, node[childrenKey])) return true;
33526
+ }
33527
+ } catch (err) {
33528
+ _iterator2.e(err);
33529
+ } finally {
33530
+ _iterator2.f();
33531
+ }
33532
+
33533
+ return false;
33534
+ }, [labelKey, childrenKey]); // ---------- 同步外部值 ----------
33535
+
33536
+ React.useEffect(function () {
33537
+ if (externalValue && externalValue.length > 0) {
33538
+ var pathLabel = getPathLabel(externalValue);
33539
+ setInputText(pathLabel);
33540
+ } else {
33541
+ setInputText('');
33542
+ }
33543
+ }, [externalValue, getPathLabel]); // ---------- 清理定时器 ----------
33544
+
33545
+ React.useEffect(function () {
33546
+ return function () {
33547
+ if (blurTimerRef.current) clearTimeout(blurTimerRef.current);
33548
+ };
33549
+ }, []); // ---------- 核心逻辑 ----------
33550
+
33551
+ var processText = React.useCallback(function (text) {
33552
+ if (!text.trim()) {
33553
+ onChange === null || onChange === void 0 ? void 0 : onChange(undefined, []);
33554
+ setOpen(false);
33555
+ } else {
33556
+ var _ref2;
33557
+
33558
+ var matched = findInTree(text, options);
33559
+ var newValue = [text];
33560
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue, [(_ref2 = {}, _defineProperty(_ref2, labelKey, text), _defineProperty(_ref2, valueKey, text), _defineProperty(_ref2, "isCustom", true), _ref2)]);
33561
+ setOpen(matched);
33562
+ }
33563
+ }, [options, findInTree, labelKey, valueKey, onChange]); // ---------- 全局 mousedown 监听 ----------
33564
+
33565
+ React.useEffect(function () {
33566
+ var handleMouseDown = function handleMouseDown(e) {
33567
+ var _inputRef$current, _target$closest, _target$closest2;
33568
+
33569
+ var target = e.target;
33570
+ var container = containerRef.current;
33571
+ if (!container) return;
33572
+ var inputElement = (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.input;
33573
+ var hasFocus = inputElement && document.activeElement === inputElement; // 检查是否点击在级联菜单内
33574
+
33575
+ var isMenu = (_target$closest = target.closest) === null || _target$closest === void 0 ? void 0 : _target$closest.call(target, ".".concat(DROPDOWN_CLASS));
33576
+
33577
+ if (isMenu) {
33578
+ isMenuClickRef.current = true;
33579
+
33580
+ if (hasFocus) {
33581
+ requestAnimationFrame(function () {
33582
+ var _inputRef$current2;
33583
+
33584
+ (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.focus();
33585
+ });
33586
+ }
33587
+
33588
+ return;
33589
+ } // 检查是否点击在自定义内部元素(箭头、清除按钮)
33590
+
33591
+
33592
+ var isInternal = (_target$closest2 = target.closest) === null || _target$closest2 === void 0 ? void 0 : _target$closest2.call(target, ".".concat(ARROW_CLASS, ", .").concat(CLEAR_CLASS));
33593
+
33594
+ if (isInternal) {
33595
+ // 如果是箭头,允许 toggleOpen 处理,不干预焦点
33596
+ // 如果是清除,也不干预
33597
+ return;
33598
+ }
33599
+
33600
+ isMenuClickRef.current = false;
33601
+
33602
+ if (container.contains(target)) {
33603
+ return;
33604
+ }
33605
+
33606
+ if (hasFocus) {
33607
+ if (blurTimerRef.current) clearTimeout(blurTimerRef.current);
33608
+ blurTimerRef.current = setTimeout(function () {
33609
+ if (inputElement && document.activeElement === inputElement) {
33610
+ var _inputRef$current3;
33611
+
33612
+ (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.blur();
33613
+ }
33614
+
33615
+ blurTimerRef.current = null;
33616
+ }, 0);
33617
+ }
33618
+ };
33619
+
33620
+ document.addEventListener('mousedown', handleMouseDown);
33621
+ return function () {
33622
+ document.removeEventListener('mousedown', handleMouseDown);
33623
+ };
33624
+ }, []); // ---------- 事件处理 ----------
33625
+
33626
+ var handleInputChange = function handleInputChange(e) {
33627
+ var text = e.target.value;
33628
+ setInputText(text);
33629
+ if (isComposingRef.current) return;
33630
+ processText(text);
33631
+ };
33632
+
33633
+ var handleCompositionStart = function handleCompositionStart() {
33634
+ isComposingRef.current = true;
33635
+ };
33636
+
33637
+ var handleCompositionEnd = function handleCompositionEnd(e) {
33638
+ isComposingRef.current = false;
33639
+ var text = e.target.value;
33640
+ processText(text);
33641
+ };
33642
+
33643
+ var handleInputFocus = function handleInputFocus() {
33644
+ if (preventOpenRef.current) {
33645
+ preventOpenRef.current = false;
33646
+ return;
33647
+ }
33648
+
33649
+ setOpen(true);
33650
+ };
33651
+
33652
+ var handleInputBlur = function handleInputBlur(e) {
33653
+ if (isMenuClickRef.current) {
33654
+ isMenuClickRef.current = false;
33655
+ return;
33656
+ }
33657
+
33658
+ var relatedTarget = e.relatedTarget;
33659
+
33660
+ if (relatedTarget) {
33661
+ var _relatedTarget$closes, _relatedTarget$closes2;
33662
+
33663
+ // 如果焦点移向菜单或内部自定义元素(箭头、清除),忽略失焦
33664
+ var isMenu = (_relatedTarget$closes = relatedTarget.closest) === null || _relatedTarget$closes === void 0 ? void 0 : _relatedTarget$closes.call(relatedTarget, ".".concat(DROPDOWN_CLASS));
33665
+ var isInternal = (_relatedTarget$closes2 = relatedTarget.closest) === null || _relatedTarget$closes2 === void 0 ? void 0 : _relatedTarget$closes2.call(relatedTarget, ".".concat(ARROW_CLASS, ", .").concat(CLEAR_CLASS));
33666
+
33667
+ if (isMenu || isInternal) {
33668
+ return;
33669
+ }
33670
+ }
33671
+
33672
+ setOpen(false);
33673
+ onBlurProp === null || onBlurProp === void 0 ? void 0 : onBlurProp(e);
33674
+ };
33675
+
33676
+ var handleCascaderChange = function handleCascaderChange(selectedValue, selectedOptions) {
33677
+ var path = selectedOptions.map(function (opt) {
33678
+ var _opt$labelKey;
33679
+
33680
+ return ((_opt$labelKey = opt[labelKey]) === null || _opt$labelKey === void 0 ? void 0 : _opt$labelKey.toString()) || '';
33681
+ }).join('');
33682
+ setInputText(path);
33683
+ onChange === null || onChange === void 0 ? void 0 : onChange(selectedValue, selectedOptions);
33684
+ var lastOption = selectedOptions[selectedOptions.length - 1];
33685
+ var hasChildren = (lastOption === null || lastOption === void 0 ? void 0 : lastOption[childrenKey]) && lastOption[childrenKey].length > 0;
33686
+
33687
+ if (hasChildren) {
33688
+ setOpen(true);
33689
+ setTimeout(function () {
33690
+ var _inputRef$current4;
33691
+
33692
+ (_inputRef$current4 = inputRef.current) === null || _inputRef$current4 === void 0 ? void 0 : _inputRef$current4.focus();
33693
+ }, 0);
33694
+ } else {
33695
+ setOpen(false);
33696
+ preventOpenRef.current = true;
33697
+ setTimeout(function () {
33698
+ var _inputRef$current5;
33699
+
33700
+ (_inputRef$current5 = inputRef.current) === null || _inputRef$current5 === void 0 ? void 0 : _inputRef$current5.focus();
33701
+ }, 0);
33702
+ }
33703
+ };
33704
+
33705
+ var handleClear = function handleClear(e) {
33706
+ var _inputRef$current6;
33707
+
33708
+ e === null || e === void 0 ? void 0 : e.stopPropagation();
33709
+ setInputText('');
33710
+ setOpen(false);
33711
+ onChange === null || onChange === void 0 ? void 0 : onChange(undefined, []); // 保持焦点
33712
+
33713
+ (_inputRef$current6 = inputRef.current) === null || _inputRef$current6 === void 0 ? void 0 : _inputRef$current6.focus();
33714
+ };
33715
+
33716
+ var toggleOpen = function toggleOpen() {
33717
+ if (open) {
33718
+ var _inputRef$current7;
33719
+
33720
+ setOpen(false); // 保持焦点
33721
+
33722
+ (_inputRef$current7 = inputRef.current) === null || _inputRef$current7 === void 0 ? void 0 : _inputRef$current7.focus();
33723
+ } else {
33724
+ var _inputRef$current8;
33725
+
33726
+ // 打开弹窗,清除阻止标记,确保 onFocus 能正常工作
33727
+ preventOpenRef.current = false;
33728
+ setOpen(true);
33729
+ (_inputRef$current8 = inputRef.current) === null || _inputRef$current8 === void 0 ? void 0 : _inputRef$current8.focus();
33730
+ }
33731
+ };
33732
+
33733
+ var showClear = externalValue && externalValue.length > 0;
33734
+ React.useImperativeHandle(ref, function () {
33735
+ return {
33736
+ focus: function focus() {
33737
+ var _inputRef$current9;
33738
+
33739
+ return (_inputRef$current9 = inputRef.current) === null || _inputRef$current9 === void 0 ? void 0 : _inputRef$current9.focus();
33740
+ },
33741
+ blur: function blur() {
33742
+ var _inputRef$current10;
33743
+
33744
+ return (_inputRef$current10 = inputRef.current) === null || _inputRef$current10 === void 0 ? void 0 : _inputRef$current10.blur();
33745
+ }
33746
+ };
33747
+ });
33748
+ return /*#__PURE__*/React__default['default'].createElement("div", {
33749
+ ref: containerRef,
33750
+ className: className,
33751
+ style: _objectSpread2({
33752
+ position: 'relative',
33753
+ width: '100%'
33754
+ }, style)
33755
+ }, /*#__PURE__*/React__default['default'].createElement(ktsXui.Input, {
33756
+ ref: inputRef,
33757
+ placeholder: placeholder,
33758
+ value: inputText,
33759
+ onChange: handleInputChange,
33760
+ onCompositionStart: handleCompositionStart,
33761
+ onCompositionEnd: handleCompositionEnd,
33762
+ onFocus: handleInputFocus,
33763
+ onBlur: handleInputBlur,
33764
+ style: _objectSpread2({}, style),
33765
+ suffix: /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, showClear && /*#__PURE__*/React__default['default'].createElement(CloseOutlined$2, {
33766
+ className: CLEAR_CLASS,
33767
+ onClick: handleClear,
33768
+ style: {
33769
+ color: 'rgba(0,0,0,0.25)',
33770
+ cursor: 'pointer',
33771
+ marginRight: 4
33772
+ }
33773
+ }), /*#__PURE__*/React__default['default'].createElement(DownOutlined$2, {
33774
+ className: ARROW_CLASS,
33775
+ onClick: toggleOpen,
33776
+ style: {
33777
+ color: open ? '#1677ff' : 'rgba(0,0,0,0.25)',
33778
+ cursor: 'pointer',
33779
+ transition: 'transform 0.2s',
33780
+ transform: open ? 'rotate(180deg)' : 'none'
33781
+ }
33782
+ }))
33783
+ }), /*#__PURE__*/React__default['default'].createElement(ktsXui.Cascader, _objectSpread2(_objectSpread2({}, restProps), {}, {
33784
+ options: options,
33785
+ fieldNames: fieldNames,
33786
+ value: externalValue,
33787
+ onChange: handleCascaderChange,
33788
+ open: open,
33789
+ getPopupContainer: function getPopupContainer() {
33790
+ return document.body;
33791
+ },
33792
+ dropdownClassName: DROPDOWN_CLASS,
33793
+ style: {
33794
+ position: 'absolute',
33795
+ top: 0,
33796
+ left: 0,
33797
+ width: '100%',
33798
+ height: '100%',
33799
+ opacity: 0,
33800
+ pointerEvents: 'none',
33801
+ zIndex: -1
33802
+ },
33803
+ showSearch: false,
33804
+ expandIcon: null
33805
+ })));
33806
+ });
33807
+ CustomCascader.displayName = 'CustomCascader';
33808
+
33809
+ var useColumns$4 = (function (form, isRequired) {
33810
+ var getFieldDecorator = form.getFieldDecorator;
33811
+ var controller = Invoice.useInvoiceController();
33812
+ var rootElement = controller.useMemo(function (s) {
33813
+ return s.rootElement;
33814
+ }, []);
33815
+ /** 组件模式 */
33816
+
33817
+ var model = controller.useMemo(function (e) {
33818
+ return e.model;
33819
+ }, []);
33820
+ /** 正在编辑的货物 */
33821
+
33822
+ var editGood = controller.useMemo(function (e) {
33823
+ return e.passengerListState.editGood;
33824
+ }, []);
33825
+ /** 禁用字段 */
33826
+
33827
+ var disableds = controller.useMemo(function (e) {
33828
+ return e.stakeholder.disableds || [];
33829
+ }, []);
33830
+ /** 运输工具种类列表 */
33831
+
33832
+ var vehicleTypeList = controller.useMemo(function (e) {
33833
+ return e.passengerListState.vehicleTypeList;
33834
+ }, []);
33835
+ /** 证件类型列表 */
33836
+
33837
+ var certificateTypeList = controller.useMemo(function (e) {
33838
+ return e.passengerListState.certificateTypeList;
33839
+ }, []);
33840
+ var area = controller.useMemo(function (e) {
33841
+ return e.passengerListState.area;
33842
+ }, []);
33843
+ var addressFieldNames = controller.useMemo(function (e) {
33844
+ return e.passengerListState.addressFieldNames;
33845
+ }, []);
33846
+ var getVehicle = React__default['default'].useCallback(function (value) {
33847
+ if (vehicleTypeList && vehicleTypeList.length > 0) {
33848
+ var _vehicleTypeList$find;
33849
+
33850
+ return ((_vehicleTypeList$find = vehicleTypeList.find(function (e) {
33851
+ return e.value === value;
33852
+ })) === null || _vehicleTypeList$find === void 0 ? void 0 : _vehicleTypeList$find.label) || '';
33853
+ }
33854
+ }, [vehicleTypeList]);
33855
+ var getCertificateType = React__default['default'].useCallback(function (value) {
33856
+ if (certificateTypeList && certificateTypeList.length > 0) {
33857
+ var _certificateTypeList$;
33858
+
33859
+ return ((_certificateTypeList$ = certificateTypeList.find(function (e) {
33860
+ return e.value === value;
33861
+ })) === null || _certificateTypeList$ === void 0 ? void 0 : _certificateTypeList$.label) || '';
33862
+ }
33863
+ }, [certificateTypeList]); // 等级选项配置
33864
+
33865
+ var levelOptionsMap = React__default['default'].useMemo(function () {
33866
+ return {
33867
+ 'AIRCRAFT': {
33868
+ options: [{
33869
+ value: '公务舱',
33870
+ label: '公务舱'
33871
+ }, {
33872
+ value: '头等舱',
33873
+ label: '头等舱'
33874
+ }, {
33875
+ value: '经济舱',
33876
+ label: '经济舱'
33877
+ }],
33878
+ required: true
33879
+ },
33880
+ 'TRAIN': {
33881
+ options: [{
33882
+ value: '一等座',
33883
+ label: '一等座'
33884
+ }, {
33885
+ value: '二等座',
33886
+ label: '二等座'
33887
+ }, {
33888
+ value: '软席(软座、软卧)',
33889
+ label: '软席(软座、软卧)'
33890
+ }, {
33891
+ value: '硬席(硬座、硬卧)',
33892
+ label: '硬席(硬座、硬卧)'
33893
+ }],
33894
+ required: true
33895
+ },
33896
+ 'SHIP': {
33897
+ options: [{
33898
+ value: '一等舱',
33899
+ label: '一等舱'
33900
+ }, {
33901
+ value: '二等舱',
33902
+ label: '二等舱'
33903
+ }, {
33904
+ value: '三等舱',
33905
+ label: '三等舱'
33906
+ }],
33907
+ required: true
33908
+ } // 其他类型不配置,则等级为非必填的文本输入
33909
+
33910
+ };
33911
+ }, []);
33912
+ var splitArea = React__default['default'].useCallback(function (value) {
33913
+ if (value) {
33914
+ var _array = value.split(',');
33915
+
33916
+ return _array;
33917
+ } else {
33918
+ return [];
33919
+ }
33920
+ }, []);
33921
+ /** 表头 */
33922
+
33923
+ var columns = React__default['default'].useMemo(function () {
33924
+ return [// {
33925
+ // title: '序号',
33926
+ // key: 'cxrxh',
33927
+ // dataIndex: 'cxrxh',
33928
+ // width: 50,
33929
+ // render: (e: number) => <span style={{ padding: '0 10px' }}>{e}</span>,
33930
+ // },
33931
+ {
33932
+ title: /*#__PURE__*/React__default['default'].createElement(TitleText$4, {
33933
+ required: true
33934
+ }, "\u51FA\u884C\u4EBA"),
33935
+ dataIndex: 'cxr',
33936
+ key: 'cxr',
33937
+ width: 100,
33938
+ render: function render(_, record) {
33939
+ if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
33940
+ return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('cxr', {
33941
+ initialValue: editGood.cxr,
33942
+ rules: [{
33943
+ required: true,
33944
+ message: '请输入出行人'
33945
+ }]
33946
+ })( /*#__PURE__*/React__default['default'].createElement(MyInput$6, {
33947
+ maxLength: 20,
33948
+ onChange: function () {
33949
+ var _onChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
33950
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
33951
+ while (1) {
33952
+ switch (_context.prev = _context.next) {
33953
+ case 0:
33954
+ _context.next = 2;
33955
+ return controller.wait();
33956
+
33957
+ case 2:
33958
+ _context.next = 4;
33959
+ return controller.setEditPassenger({
33960
+ cxr: form.getFieldsValue().cxr
33961
+ });
33962
+
33963
+ case 4:
33964
+ case "end":
33965
+ return _context.stop();
33966
+ }
33967
+ }
33968
+ }, _callee);
33969
+ }));
33970
+
33971
+ function onChange() {
33972
+ return _onChange.apply(this, arguments);
33973
+ }
33974
+
33975
+ return onChange;
33976
+ }()
33977
+ })));
33978
+ } else {
33979
+ return /*#__PURE__*/React__default['default'].createElement("span", {
33980
+ style: {
33981
+ padding: '0 10px'
33982
+ }
33983
+ }, record.cxr);
33984
+ }
33985
+ }
33986
+ }, {
33987
+ title: /*#__PURE__*/React__default['default'].createElement(TitleText$4, {
33988
+ required: isRequired
33989
+ }, "\u51FA\u884C\u65E5\u671F"),
33990
+ dataIndex: 'chuxrq',
33991
+ key: 'chuxrq',
33992
+ width: 130,
33993
+ render: function render(_, record) {
33994
+ if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
33995
+ return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('chuxrq', {
33996
+ initialValue: editGood.chuxrq ? hooks(editGood.chuxrq) : undefined,
33997
+ rules: [{
33998
+ required: isRequired,
33999
+ message: '请选择出行日期'
34000
+ }]
34001
+ })( /*#__PURE__*/React__default['default'].createElement(ktsXui.DatePicker, {
34002
+ format: "YYYY-MM-DD",
34003
+ placeholder: "\u8BF7\u9009\u62E9",
34004
+ onChange: function () {
34005
+ var _onChange2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(v) {
34006
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
34007
+ while (1) {
34008
+ switch (_context2.prev = _context2.next) {
34009
+ case 0:
34010
+ _context2.next = 2;
34011
+ return controller.wait();
34012
+
34013
+ case 2:
34014
+ _context2.next = 4;
34015
+ return controller.setEditPassenger({
34016
+ chuxrq: hooks(v).format('YYYY-MM-DD')
34017
+ });
34018
+
34019
+ case 4:
34020
+ case "end":
34021
+ return _context2.stop();
34022
+ }
34023
+ }
34024
+ }, _callee2);
34025
+ }));
34026
+
34027
+ function onChange(_x) {
34028
+ return _onChange2.apply(this, arguments);
34029
+ }
34030
+
34031
+ return onChange;
34032
+ }()
34033
+ })));
34034
+ } else {
34035
+ return /*#__PURE__*/React__default['default'].createElement("span", {
34036
+ style: {
34037
+ padding: '0 10px'
34038
+ }
34039
+ }, record.chuxrq);
34040
+ }
34041
+ }
34042
+ }, {
34043
+ title: /*#__PURE__*/React__default['default'].createElement(TitleText$4, {
34044
+ required: isRequired
34045
+ }, "\u51FA\u884C\u4EBA\u8BC1\u4EF6\u7C7B\u578B"),
34046
+ key: 'cxrzjlxDm',
34047
+ dataIndex: 'cxrzjlxDm',
34048
+ width: 160,
34049
+ render: function render(_, record) {
34050
+ if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !(model === 'prefab')) {
34051
+ return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('cxrzjlxDm', {
34052
+ initialValue: editGood.cxrzjlxDm,
34053
+ rules: [{
34054
+ required: isRequired,
34055
+ message: '请选择出行人证件类型'
34056
+ }]
34057
+ })( /*#__PURE__*/React__default['default'].createElement(ktsXui.Select, {
34058
+ className: "kts-invoice-operate-goods-list-table-tax-rate",
34059
+ showArrow: true,
34060
+ allowClear: true,
34061
+ style: {
34062
+ width: '100%'
34063
+ },
34064
+ getPopupContainer: function getPopupContainer() {
34065
+ return rootElement || document.body;
34066
+ },
34067
+ onChange: function () {
34068
+ var _onChange3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(value) {
34069
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
34070
+ while (1) {
34071
+ switch (_context3.prev = _context3.next) {
34072
+ case 0:
34073
+ _context3.next = 2;
34074
+ return controller.wait();
34075
+
34076
+ case 2:
34077
+ controller.setEditPassenger({
34078
+ cxrzjlxDm: value
34079
+ });
34080
+
34081
+ case 3:
34082
+ case "end":
34083
+ return _context3.stop();
34084
+ }
34085
+ }
34086
+ }, _callee3);
34087
+ }));
34088
+
34089
+ function onChange(_x2) {
34090
+ return _onChange3.apply(this, arguments);
34091
+ }
34092
+
34093
+ return onChange;
34094
+ }()
34095
+ }, certificateTypeList.map(function (e, i) {
34096
+ return /*#__PURE__*/React__default['default'].createElement(ktsXui.Select.Option, {
34097
+ key: i,
34098
+ value: e.value
34099
+ }, e.label);
34100
+ }))));
34101
+ } else {
34102
+ return /*#__PURE__*/React__default['default'].createElement("span", {
34103
+ style: {
34104
+ padding: '0 10px'
34105
+ }
34106
+ }, getCertificateType(record.cxrzjlxDm));
34107
+ }
34108
+ }
34109
+ }, {
34110
+ title: /*#__PURE__*/React__default['default'].createElement(TitleText$4, {
34111
+ required: isRequired
34112
+ }, "\u51FA\u884C\u4EBA\u8BC1\u4EF6\u53F7\u7801"),
34113
+ dataIndex: 'sfzjhm',
34114
+ key: 'sfzjhm',
34115
+ width: 150,
34116
+ render: function render(_, record) {
34117
+ if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
34118
+ return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('sfzjhm', {
34119
+ initialValue: editGood.sfzjhm,
34120
+ rules: [{
34121
+ required: isRequired,
34122
+ message: '请输入证件号码'
34123
+ }]
34124
+ })( /*#__PURE__*/React__default['default'].createElement(MyInput$6, {
34125
+ maxLength: 20,
34126
+ onChange: function () {
34127
+ var _onChange4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
34128
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
34129
+ while (1) {
34130
+ switch (_context4.prev = _context4.next) {
34131
+ case 0:
34132
+ _context4.next = 2;
34133
+ return controller.wait();
34134
+
34135
+ case 2:
34136
+ _context4.next = 4;
34137
+ return controller.setEditPassenger({
34138
+ sfzjhm: form.getFieldsValue().sfzjhm
34139
+ });
34140
+
34141
+ case 4:
34142
+ case "end":
34143
+ return _context4.stop();
34144
+ }
34145
+ }
34146
+ }, _callee4);
34147
+ }));
34148
+
34149
+ function onChange() {
34150
+ return _onChange4.apply(this, arguments);
34151
+ }
34152
+
34153
+ return onChange;
34154
+ }()
34155
+ })));
34156
+ } else {
34157
+ return /*#__PURE__*/React__default['default'].createElement("span", {
34158
+ style: {
34159
+ padding: '0 10px'
34160
+ }
34161
+ }, record.sfzjhm);
34162
+ }
34163
+ }
34164
+ }, {
34165
+ title: /*#__PURE__*/React__default['default'].createElement(TitleText$4, {
34166
+ required: isRequired
34167
+ }, "\u51FA\u53D1\u70B9"),
34168
+ key: 'cfd',
34169
+ dataIndex: 'cfd',
34170
+ width: 180,
34171
+ render: function render(_, record) {
34172
+ if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
34173
+ return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('cfd', {
34174
+ initialValue: editGood.cfd,
34175
+ rules: [{
34176
+ required: isRequired,
34177
+ message: '请输入出发点'
34178
+ }]
34179
+ })( /*#__PURE__*/React__default['default'].createElement(CustomCascader, {
34180
+ style: {
34181
+ width: '100%'
34182
+ },
34183
+ options: area,
34184
+ fieldNames: addressFieldNames,
34185
+ onChange: function () {
34186
+ var _onChange5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(value) {
34187
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
34188
+ while (1) {
34189
+ switch (_context5.prev = _context5.next) {
34190
+ case 0:
34191
+ _context5.next = 2;
34192
+ return controller.setEditPassenger({
34193
+ cfd: value
34194
+ });
34195
+
34196
+ case 2:
34197
+ case "end":
34198
+ return _context5.stop();
34199
+ }
34200
+ }
34201
+ }, _callee5);
34202
+ }));
34203
+
34204
+ function onChange(_x3) {
34205
+ return _onChange5.apply(this, arguments);
34206
+ }
34207
+
34208
+ return onChange;
34209
+ }()
34210
+ })));
34211
+ } else {
34212
+ return /*#__PURE__*/React__default['default'].createElement("span", {
34213
+ style: {
34214
+ padding: '0 10px'
34215
+ }
34216
+ }, record.cfd);
34217
+ }
34218
+ }
34219
+ }, {
34220
+ title: /*#__PURE__*/React__default['default'].createElement(TitleText$4, {
34221
+ required: isRequired
34222
+ }, "\u5230\u8FBE\u5730"),
34223
+ dataIndex: 'ddd',
34224
+ key: 'ddd',
34225
+ width: 180,
34226
+ render: function render(_, record) {
34227
+ if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
34228
+ return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('ddd', {
34229
+ initialValue: editGood.ddd,
34230
+ rules: [{
34231
+ required: isRequired,
34232
+ message: '请输入到达地'
34233
+ }]
34234
+ })( /*#__PURE__*/React__default['default'].createElement(CustomCascader, {
34235
+ options: area,
34236
+ fieldNames: addressFieldNames,
34237
+ style: {
34238
+ width: '100%'
34239
+ },
34240
+ onChange: function () {
34241
+ var _onChange6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(value) {
34242
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
34243
+ while (1) {
34244
+ switch (_context6.prev = _context6.next) {
34245
+ case 0:
34246
+ _context6.next = 2;
34247
+ return controller.setEditPassenger({
34248
+ ddd: value
34249
+ });
34250
+
34251
+ case 2:
34252
+ case "end":
34253
+ return _context6.stop();
34254
+ }
34255
+ }
34256
+ }, _callee6);
34257
+ }));
34258
+
34259
+ function onChange(_x4) {
34260
+ return _onChange6.apply(this, arguments);
34261
+ }
34262
+
34263
+ return onChange;
34264
+ }()
34265
+ })));
34266
+ } else {
34267
+ return /*#__PURE__*/React__default['default'].createElement("span", {
34268
+ style: {
34269
+ padding: '0 10px'
34270
+ }
34271
+ }, record.ddd);
34272
+ }
34273
+ }
34274
+ }, {
34275
+ title: /*#__PURE__*/React__default['default'].createElement(TitleText$4, {
34276
+ required: isRequired
34277
+ }, "\u4EA4\u901A\u5DE5\u5177\u7C7B\u578B"),
34278
+ key: 'jtgjlxDm',
34279
+ dataIndex: 'jtgjlxDm',
34280
+ width: 130,
34281
+ render: function render(_, record) {
34282
+ if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !(model === 'prefab')) {
34283
+ return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('jtgjlxDm', {
34284
+ initialValue: editGood.jtgjlxDm,
34285
+ rules: [{
34286
+ required: isRequired,
34287
+ message: '请选择交通工具类型'
34288
+ }]
34289
+ })( /*#__PURE__*/React__default['default'].createElement(ktsXui.Select, {
34290
+ className: "kts-invoice-operate-goods-list-table-tax-rate",
34291
+ showArrow: true,
34292
+ allowClear: true,
34293
+ style: {
34294
+ width: '100%'
34295
+ },
34296
+ getPopupContainer: function getPopupContainer() {
34297
+ return rootElement || document.body;
34298
+ },
34299
+ onChange: function () {
34300
+ var _onChange7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(value) {
34301
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
34302
+ while (1) {
34303
+ switch (_context7.prev = _context7.next) {
34304
+ case 0:
34305
+ _context7.next = 2;
34306
+ return controller.wait();
34307
+
34308
+ case 2:
34309
+ controller.setEditPassenger({
34310
+ jtgjlxDm: value
34311
+ });
34312
+
34313
+ case 3:
34314
+ case "end":
34315
+ return _context7.stop();
34316
+ }
34317
+ }
34318
+ }, _callee7);
34319
+ }));
34320
+
34321
+ function onChange(_x5) {
34322
+ return _onChange7.apply(this, arguments);
34323
+ }
34324
+
34325
+ return onChange;
34326
+ }()
34327
+ }, vehicleTypeList.map(function (e, i) {
34328
+ return /*#__PURE__*/React__default['default'].createElement(ktsXui.Select.Option, {
34329
+ key: i,
34330
+ value: e.value,
34331
+ disabled: e.disabled
34332
+ }, e.label, e.disabled ? '(暂不支持)' : '');
34333
+ }))));
34334
+ } else {
34335
+ return /*#__PURE__*/React__default['default'].createElement("span", {
34336
+ style: {
34337
+ padding: '0 10px'
34338
+ }
34339
+ }, getVehicle(record.jtgjlxDm));
34340
+ }
34341
+ }
34342
+ }, {
34343
+ title: /*#__PURE__*/React__default['default'].createElement(TitleText$4, {
34344
+ required: false
34345
+ }, "\u7B49\u7EA7"),
34346
+ dataIndex: 'zwdj',
34347
+ key: 'zwdj',
34348
+ width: 110,
34349
+ render: function render(_, record) {
34350
+ if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
34351
+ // 获取当前等级配置
34352
+ var levelConfig = editGood.jtgjlxDm ? levelOptionsMap[editGood.jtgjlxDm] : undefined;
34353
+ var isLevelSelect = !!levelConfig;
34354
+ var isLevelRequired = (levelConfig === null || levelConfig === void 0 ? void 0 : levelConfig.required) || false;
34355
+ var levelOptions = (levelConfig === null || levelConfig === void 0 ? void 0 : levelConfig.options) || [];
34356
+ return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('zwdj', {
34357
+ initialValue: editGood.zwdj,
34358
+ rules: [{
34359
+ required: isLevelRequired,
34360
+ message: '请选择等级'
34361
+ }]
34362
+ })(isLevelSelect ? /*#__PURE__*/React__default['default'].createElement(ktsXui.Select, {
34363
+ className: "kts-invoice-operate-goods-list-table-tax-rate",
34364
+ showArrow: true,
34365
+ allowClear: true,
34366
+ style: {
34367
+ width: '100%'
34368
+ },
34369
+ getPopupContainer: function getPopupContainer() {
34370
+ return rootElement || document.body;
34371
+ },
34372
+ onChange: function () {
34373
+ var _onChange8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(value) {
34374
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
34375
+ while (1) {
34376
+ switch (_context8.prev = _context8.next) {
34377
+ case 0:
34378
+ _context8.next = 2;
34379
+ return controller.wait();
34380
+
34381
+ case 2:
34382
+ controller.setEditPassenger({
34383
+ zwdj: value
34384
+ });
34385
+
34386
+ case 3:
34387
+ case "end":
34388
+ return _context8.stop();
34389
+ }
34390
+ }
34391
+ }, _callee8);
34392
+ }));
34393
+
34394
+ function onChange(_x6) {
34395
+ return _onChange8.apply(this, arguments);
34396
+ }
34397
+
34398
+ return onChange;
34399
+ }()
34400
+ }, levelOptions.map(function (e, i) {
34401
+ return /*#__PURE__*/React__default['default'].createElement(ktsXui.Select.Option, {
34402
+ key: i,
34403
+ value: e.value
34404
+ }, e.label);
34405
+ })) : /*#__PURE__*/React__default['default'].createElement(MyInput$6, {
34406
+ maxLength: 20,
34407
+ onChange: function () {
34408
+ var _onChange9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
34409
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
34410
+ while (1) {
34411
+ switch (_context9.prev = _context9.next) {
34412
+ case 0:
34413
+ _context9.next = 2;
34414
+ return controller.wait();
34415
+
34416
+ case 2:
34417
+ _context9.next = 4;
34418
+ return controller.setEditPassenger({
34419
+ zwdj: form.getFieldsValue().zwdj
34420
+ });
34421
+
34422
+ case 4:
34423
+ case "end":
34424
+ return _context9.stop();
34425
+ }
34426
+ }
34427
+ }, _callee9);
34428
+ }));
34429
+
34430
+ function onChange() {
34431
+ return _onChange9.apply(this, arguments);
34432
+ }
34433
+
34434
+ return onChange;
34435
+ }()
34436
+ })));
34437
+ } else {
34438
+ return /*#__PURE__*/React__default['default'].createElement("span", {
34439
+ style: {
34440
+ padding: '0 10px'
34441
+ }
34442
+ }, record.zwdj);
34443
+ }
34444
+ }
34445
+ }] // 只读
34446
+ .filter(function (e) {
34447
+ if (model === 'readOnly') {
34448
+ return e.key !== 'operating';
34449
+ } else {
34450
+ return true;
34451
+ }
34452
+ }).map(function (e) {
34453
+ return _objectSpread2(_objectSpread2({}, e), {}, {
34454
+ ellipsis: true
34455
+ });
34456
+ });
34457
+ }, [editGood, controller, model, getVehicle]);
34458
+ return columns;
34459
+ });
34460
+
34461
+ var MyInput$6 = /*#__PURE__*/function (_React$Component) {
34462
+ _inherits(MyInput, _React$Component);
34463
+
34464
+ var _super = _createSuper(MyInput);
34465
+
34466
+ function MyInput() {
34467
+ _classCallCheck(this, MyInput);
34468
+
34469
+ return _super.apply(this, arguments);
34470
+ }
34471
+
34472
+ _createClass(MyInput, [{
34473
+ key: "render",
34474
+ value: function render() {
34475
+ if (this.props.loading) {
34476
+ return /*#__PURE__*/React__default['default'].createElement(ktsXui.Spin, {
34477
+ size: "small"
34478
+ }, /*#__PURE__*/React__default['default'].createElement(ktsXui.Input, _objectSpread2(_objectSpread2({}, this.props), {}, {
34479
+ autoComplete: "off"
34480
+ })));
34481
+ } else {
34482
+ return /*#__PURE__*/React__default['default'].createElement(ktsXui.Input, _objectSpread2(_objectSpread2({}, this.props), {}, {
34483
+ autoComplete: "off"
34484
+ }));
34485
+ }
34486
+ }
34487
+ }]);
34488
+
34489
+ return MyInput;
34490
+ }(React__default['default'].Component);
34491
+
34492
+ var useOnRow$4 = (function () {
34493
+ /** 控制器 */
34494
+ var controller = Invoice.useInvoiceController();
34495
+ var model = controller.useMemo(function (s) {
34496
+ return s.model;
34497
+ }, []);
34498
+ var onClick = React__default['default'].useCallback( /*#__PURE__*/function () {
34499
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(record) {
34500
+ var editGood;
34501
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
34502
+ while (1) {
34503
+ switch (_context2.prev = _context2.next) {
34504
+ case 0:
34505
+ if (!(model === 'readOnly')) {
34506
+ _context2.next = 2;
34507
+ break;
34508
+ }
34509
+
34510
+ return _context2.abrupt("return");
34511
+
34512
+ case 2:
34513
+ editGood = controller.state.passengerListState.editGood;
34514
+
34515
+ if (!editGood) {
34516
+ _context2.next = 14;
34517
+ break;
34518
+ }
34519
+
34520
+ if (!(editGood.$index === record.$index)) {
34521
+ _context2.next = 6;
34522
+ break;
34523
+ }
34524
+
34525
+ return _context2.abrupt("return");
34526
+
34527
+ case 6:
34528
+ _context2.next = 8;
34529
+ return controller.saveEditPassenger();
34530
+
34531
+ case 8:
34532
+ _context2.next = 10;
34533
+ return controller.wait();
34534
+
34535
+ case 10:
34536
+ _context2.next = 12;
34537
+ return controller.pipeline( /*#__PURE__*/function () {
34538
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
34539
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
34540
+ while (1) {
34541
+ switch (_context.prev = _context.next) {
34542
+ case 0:
34543
+ _context.t0 = s.passengerListState.editGood;
34544
+
34545
+ if (_context.t0) {
34546
+ _context.next = 4;
34547
+ break;
34548
+ }
34549
+
34550
+ _context.next = 4;
34551
+ return controller.setEditPassenger(record);
34552
+
34553
+ case 4:
34554
+ case "end":
34555
+ return _context.stop();
34556
+ }
34557
+ }
34558
+ }, _callee);
34559
+ }));
34560
+
34561
+ return function (_x2) {
34562
+ return _ref2.apply(this, arguments);
34563
+ };
34564
+ }())();
34565
+
34566
+ case 12:
34567
+ _context2.next = 16;
34568
+ break;
34569
+
34570
+ case 14:
34571
+ _context2.next = 16;
34572
+ return controller.setEditPassenger(record);
34573
+
34574
+ case 16:
34575
+ case "end":
34576
+ return _context2.stop();
34577
+ }
34578
+ }
34579
+ }, _callee2);
34580
+ }));
34581
+
34582
+ return function (_x) {
34583
+ return _ref.apply(this, arguments);
34584
+ };
34585
+ }(), [controller, model]);
34586
+ return {
34587
+ onClick: onClick
34588
+ };
34589
+ });
34590
+
34591
+ /**
34592
+ * 点击组件外部 保存正在编辑的行
34593
+ */
34594
+ /**
34595
+ * 点击组件外部 保存正在编辑的货物
34596
+ */
34597
+
34598
+ function useWindowClick$4(controller) {
34599
+ /** 点击组件外部 保存正在编辑的货物 */
34600
+ React__default['default'].useEffect(function () {
34601
+ var click = function click() {
34602
+ setTimeout(controller.saveEditPassenger);
34603
+ };
34604
+
34605
+ window.addEventListener('click', click);
34606
+ return function () {
34607
+ window.removeEventListener('click', click);
34608
+ };
34609
+ }, [controller]);
34610
+ }
34611
+
34612
+ var useRowSelection$4 = (function () {
34613
+ /** 控制器 */
34614
+ var controller = Invoice.useInvoiceController();
34615
+ /** 列表选中的货物索引列表 */
34616
+
34617
+ var selectedRowKeys = controller.useMemo(function (s) {
34618
+ return s.passengerListState.selectedGoodIndex;
34619
+ }, []);
34620
+ /** 货物列表 */
34621
+
34622
+ var goodsList = controller.useMemo(function (s) {
34623
+ return s.passengerListState.goodsList;
34624
+ }, []);
34625
+ /** 组件模式 */
34626
+
34627
+ var model = controller.useMemo(function (s) {
34628
+ return s.model;
34629
+ }, []);
34630
+ /** 搜索条件 */
34631
+ // const searchValue = controller.useMemo(s => s.goodsListState.searchValue, []);
34632
+
34633
+ /** 是否显示选择框 */
34634
+
34635
+ var isShow = React__default['default'].useMemo(function () {
34636
+ if (model === 'readOnly' || model === 'prefab') return false;
34637
+ return true;
34638
+ }, [model]);
34639
+ /** 是否全选 */
34640
+ // const isAll = controller.useMemo(s => s.goodsListState.goodsList.length > 0 && s.goodsListState.selectedGoodIndex.length === s.goodsListState.goodsList.length, [])
34641
+
34642
+ var isAll = controller.useMemo(function (s) {
34643
+ if (s.passengerListState.selectedGoodIndex.length <= 0) return false;
34644
+ var seeGoodsIndex = s.passengerListState.goodsList.map(function (e) {
34645
+ return e.$index;
34646
+ });
34647
+ var selectedGoodIndex = s.passengerListState.selectedGoodIndex.filter(function (e) {
34648
+ return seeGoodsIndex.some(function (t) {
34649
+ return e === t;
34650
+ });
34651
+ });
34652
+ return selectedGoodIndex.length === seeGoodsIndex.length;
34653
+ }, []);
34654
+ var indeterminate = controller.useMemo(function (s) {
34655
+ var seeGoodsIndex = s.passengerListState.goodsList.map(function (e) {
34656
+ return e.$index;
34657
+ });
34658
+ var selectedGoodIndex = s.passengerListState.selectedGoodIndex.filter(function (e) {
34659
+ return seeGoodsIndex.some(function (t) {
34660
+ return e === t;
34661
+ });
34662
+ });
34663
+ if (selectedGoodIndex.length === 0) return false;
34664
+ return selectedGoodIndex.length < seeGoodsIndex.length;
34665
+ }, []);
34666
+ /** 点击了全选 */
34667
+
34668
+ var onClickSelectAll = React__default['default'].useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
34669
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
34670
+ while (1) {
34671
+ switch (_context3.prev = _context3.next) {
34672
+ case 0:
34673
+ if (!isAll) {
34674
+ _context3.next = 5;
34675
+ break;
34676
+ }
34677
+
34678
+ _context3.next = 3;
34679
+ return controller.pipeline( /*#__PURE__*/function () {
34680
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
34681
+ var seeGoodsIndex;
34682
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
34683
+ while (1) {
34684
+ switch (_context.prev = _context.next) {
34685
+ case 0:
34686
+ seeGoodsIndex = s.passengerListState.goodsList.map(function (e) {
34687
+ return e.$index;
34688
+ });
34689
+ s.passengerListState.selectedGoodIndex = s.passengerListState.selectedGoodIndex.filter(function (e) {
34690
+ return !seeGoodsIndex.some(function (t) {
34691
+ return e === t;
34692
+ });
34693
+ });
34694
+
34695
+ case 2:
34696
+ case "end":
34697
+ return _context.stop();
34698
+ }
34699
+ }
34700
+ }, _callee);
34701
+ }));
34702
+
34703
+ return function (_x) {
34704
+ return _ref2.apply(this, arguments);
34705
+ };
34706
+ }())();
34707
+
34708
+ case 3:
34709
+ _context3.next = 7;
34710
+ break;
34711
+
34712
+ case 5:
34713
+ _context3.next = 7;
34714
+ return controller.pipeline( /*#__PURE__*/function () {
34715
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
34716
+ var seeGoodsIndex;
34717
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
34718
+ while (1) {
34719
+ switch (_context2.prev = _context2.next) {
34720
+ case 0:
34721
+ seeGoodsIndex = s.passengerListState.goodsList.map(function (e) {
34722
+ return e.$index;
34723
+ });
34724
+ s.passengerListState.selectedGoodIndex = [].concat(_toConsumableArray(s.passengerListState.selectedGoodIndex), _toConsumableArray(seeGoodsIndex));
34725
+ s.passengerListState.selectedGoodIndex = Array.from(new Set(s.passengerListState.selectedGoodIndex));
34726
+
34727
+ case 3:
34728
+ case "end":
34729
+ return _context2.stop();
34730
+ }
34731
+ }
34732
+ }, _callee2);
34733
+ }));
34734
+
34735
+ return function (_x2) {
34736
+ return _ref3.apply(this, arguments);
34737
+ };
34738
+ }())();
34739
+
34740
+ case 7:
34741
+ case "end":
34742
+ return _context3.stop();
34743
+ }
34744
+ }
34745
+ }, _callee3);
34746
+ })), [controller, isAll]);
34747
+ var onSelect = React__default['default'].useCallback( /*#__PURE__*/function () {
34748
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(record, selected) {
34749
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
34750
+ while (1) {
34751
+ switch (_context6.prev = _context6.next) {
34752
+ case 0:
34753
+ if (!selected) {
34754
+ _context6.next = 5;
34755
+ break;
34756
+ }
34757
+
34758
+ _context6.next = 3;
34759
+ return controller.pipeline( /*#__PURE__*/function () {
34760
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(s) {
34761
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
34762
+ while (1) {
34763
+ switch (_context4.prev = _context4.next) {
34764
+ case 0:
34765
+ s.passengerListState.selectedGoodIndex = [].concat(_toConsumableArray(s.passengerListState.selectedGoodIndex), [record.$index]);
34766
+ s.passengerListState = _objectSpread2({}, s.passengerListState);
34767
+
34768
+ case 2:
34769
+ case "end":
34770
+ return _context4.stop();
34771
+ }
34772
+ }
34773
+ }, _callee4);
34774
+ }));
34775
+
34776
+ return function (_x5) {
34777
+ return _ref5.apply(this, arguments);
34778
+ };
34779
+ }())();
34780
+
34781
+ case 3:
34782
+ _context6.next = 7;
34783
+ break;
34784
+
34785
+ case 5:
34786
+ _context6.next = 7;
34787
+ return controller.pipeline( /*#__PURE__*/function () {
34788
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(s) {
34789
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
34790
+ while (1) {
34791
+ switch (_context5.prev = _context5.next) {
34792
+ case 0:
34793
+ s.passengerListState.selectedGoodIndex = s.passengerListState.selectedGoodIndex.filter(function (e) {
34794
+ return e !== record.$index;
34795
+ });
34796
+ s.passengerListState = _objectSpread2({}, s.passengerListState);
34797
+
34798
+ case 2:
34799
+ case "end":
34800
+ return _context5.stop();
34801
+ }
34802
+ }
34803
+ }, _callee5);
34804
+ }));
34805
+
34806
+ return function (_x6) {
34807
+ return _ref6.apply(this, arguments);
34808
+ };
34809
+ }())();
34810
+
34811
+ case 7:
34812
+ case "end":
34813
+ return _context6.stop();
34814
+ }
34815
+ }
34816
+ }, _callee6);
34817
+ }));
34818
+
34819
+ return function (_x3, _x4) {
34820
+ return _ref4.apply(this, arguments);
34821
+ };
34822
+ }(), [controller]);
34823
+ var columnTitle = React__default['default'].useMemo(function () {
34824
+ return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Checkbox, {
34825
+ onChange: onClickSelectAll,
34826
+ indeterminate: indeterminate,
34827
+ checked: isAll
34828
+ });
34829
+ }, [goodsList, selectedRowKeys, onClickSelectAll, isAll, indeterminate]);
34830
+ /** 选择了商品后 调整 折扣行 和 被折扣行 */
34831
+
34832
+ var sortOut = React__default['default'].useCallback( /*#__PURE__*/function () {
34833
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(selected) {
34834
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
34835
+ while (1) {
34836
+ switch (_context8.prev = _context8.next) {
34837
+ case 0:
34838
+ _context8.next = 2;
34839
+ return controller.wait();
34840
+
34841
+ case 2:
34842
+ _context8.next = 4;
34843
+ return controller.pipeline( /*#__PURE__*/function () {
34844
+ var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(s) {
34845
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
34846
+ while (1) {
34847
+ switch (_context7.prev = _context7.next) {
34848
+ case 0:
34849
+ s.passengerListState.selectedGoodIndex.forEach(function ($index) {
34850
+ var goods = s.passengerListState.goodsMap.get($index);
34851
+ if (!goods) return; // 数组位置
34852
+
34853
+ var t = s.passengerListState.goodsList.indexOf(goods); // goods.lineAttribute === LineAttributeType.折扣行 ? t : t++;
34854
+
34855
+ var i = s.goodsListState.goodsList[t].$index;
34856
+
34857
+ if (selected) {
34858
+ if (s.passengerListState.selectedGoodIndex.indexOf(i) < 0) s.passengerListState.selectedGoodIndex = [].concat(_toConsumableArray(s.passengerListState.selectedGoodIndex), [i]);
34859
+ } else {
34860
+ if (s.passengerListState.selectedGoodIndex.indexOf(i) < 0) s.passengerListState.selectedGoodIndex = s.passengerListState.selectedGoodIndex.filter(function (e) {
34861
+ return e !== $index;
34862
+ });
34863
+ }
34864
+ });
34865
+
34866
+ case 1:
34867
+ case "end":
34868
+ return _context7.stop();
34869
+ }
34870
+ }
34871
+ }, _callee7);
34872
+ }));
34873
+
34874
+ return function (_x8) {
34875
+ return _ref8.apply(this, arguments);
34876
+ };
34877
+ }())();
34878
+
34879
+ case 4:
34880
+ case "end":
34881
+ return _context8.stop();
34882
+ }
34883
+ }
34884
+ }, _callee8);
34885
+ }));
34886
+
34887
+ return function (_x7) {
34888
+ return _ref7.apply(this, arguments);
34889
+ };
34890
+ }(), [controller]); // React.useEffect(() => {
34891
+ // sortOut(true);
34892
+ // }, [sortOut, goodsList])
34893
+
34894
+ if (isShow === false) return undefined;
34895
+ return {
34896
+ columnWidth: 45,
34897
+ columnTitle: columnTitle,
34898
+ onSelect: onSelect,
34899
+ selectedRowKeys: selectedRowKeys
34900
+ };
34901
+ });
34902
+
34903
+ var useDelRowButton$4 = (function () {
34904
+ var controller = Invoice.useInvoiceController();
34905
+ var model = controller.useMemo(function (s) {
34906
+ return s.model;
34907
+ }, []);
34908
+ var isRemRow = controller.useMemo(function (s) {
34909
+ return s.passengerListState.isRemRow;
34910
+ }, []);
34911
+ /** 是否禁用 */
34912
+
34913
+ var disabled = controller.useMemo(function (s) {
34914
+ if (s.passengerListState.selectedGoodIndex.length <= 0) return true;
34915
+ return false;
34916
+ }, []);
34917
+ /** 点击了删除 */
34918
+
34919
+ var onClick = React__default['default'].useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
34920
+ var selectedGoodIndex, i;
34921
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
34922
+ while (1) {
34923
+ switch (_context2.prev = _context2.next) {
34924
+ case 0:
34925
+ selectedGoodIndex = controller.state.passengerListState.selectedGoodIndex.slice();
34926
+ i = 0;
34927
+
34928
+ case 2:
34929
+ if (!(i < selectedGoodIndex.length)) {
34930
+ _context2.next = 8;
34931
+ break;
34932
+ }
34933
+
34934
+ _context2.next = 5;
34935
+ return controller.delPassenger(selectedGoodIndex[i]);
34936
+
34937
+ case 5:
34938
+ i++;
34939
+ _context2.next = 2;
34940
+ break;
34941
+
34942
+ case 8:
34943
+ _context2.next = 10;
34944
+ return controller.run( /*#__PURE__*/function () {
34945
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
34946
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
34947
+ while (1) {
34948
+ switch (_context.prev = _context.next) {
34949
+ case 0:
34950
+ s.passengerListState.selectedGoodIndex = [];
34951
+
34952
+ case 1:
34953
+ case "end":
34954
+ return _context.stop();
34955
+ }
34956
+ }
34957
+ }, _callee);
34958
+ }));
34959
+
34960
+ return function (_x) {
34961
+ return _ref2.apply(this, arguments);
34962
+ };
34963
+ }());
34964
+
34965
+ case 10:
34966
+ case "end":
34967
+ return _context2.stop();
34968
+ }
34969
+ }
34970
+ }, _callee2);
34971
+ })), []);
34972
+ var menuItem = React__default['default'].useMemo(function () {
34973
+ if (model === 'prefab') return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
34974
+ if (model === 'readOnly') return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
34975
+ return /*#__PURE__*/React__default['default'].createElement(ktsXui.Menu.Item, {
34976
+ key: "1",
34977
+ onClick: onClick,
34978
+ disabled: disabled
34979
+ }, " \u5220\u9664\u884C ");
34980
+ }, [model, onClick, disabled]);
34981
+ var button = React__default['default'].useMemo(function () {
34982
+ if (isRemRow === false) return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
34983
+ if (model === 'prefab') return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
34984
+ if (model === 'readOnly') return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
34985
+ return /*#__PURE__*/React__default['default'].createElement(ktsXui.Button, {
34986
+ size: 'small',
34987
+ onClick: onClick,
34988
+ disabled: disabled
34989
+ }, "\u5220\u9664");
34990
+ }, [model, onClick, disabled, isRemRow]);
34991
+ return {
34992
+ button: button,
34993
+ menuItem: menuItem
34994
+ };
34995
+ });
34996
+
34997
+ var css_248z$E = ".kts-invoice-operate-freight {\n border-bottom: 2px solid #9F613E;\n border-left: 2px solid #9F613E;\n border-right: 2px solid #9F613E;\n}\n.kts-invoice-operate-freight .real-estate-info-digtal-label {\n padding: 20px 20px 0;\n color: #9F613E;\n font-weight: bold;\n}\n.kts-invoice-operate-freight .ktsAnt3x-row.ktsAnt3x-form-item {\n margin-bottom: 0;\n}\n.kts-invoice-operate-goods-list-digtal .goods-list-digtal-discount-tag {\n display: inline-block;\n height: 20px;\n line-height: 20px;\n border: 1px solid;\n padding: 0 5px;\n border-radius: 4px;\n}\n.kts-invoice-operate-goods-list-digtal .kts-invoice-operate-goods-list-table-tax-rate .ktsAnt3x-select-selection-selected-value {\n float: right;\n}\n.kts-invoice-operate-goods-list-digtal .kts-invoice-operate-freight-list-able {\n display: flex;\n padding: 10px;\n border-bottom: 2px solid #9F613E;\n gap: 10px;\n align-items: center;\n}\n.kts-invoice-operate-goods-list-digtal .ktsAntX-table .ktsAntX-table-row.kts-invoice-operate-goods-be-discount .ktsAntX-table-cell {\n color: #f00;\n}\n.kts-invoice-operate-goods-list-table-digtal .ktsAnt3x-form-item-control.has-error {\n border: 1px solid #f00;\n}\n.kts-invoice-operate-goods-list-table-digtal .kts-invoice-operate-goods-list-table.kts-invoice-operate-prefab .ktsAnt3x-table-row {\n color: rgba(0, 0, 0, 0.25);\n background: #f5f5f5;\n}\n.kts-invoice-operate-goods-list-table-digtal .kts-invoice-operate-goods-list-table-search-protrude {\n background: #ff0;\n color: #000;\n font-weight: bold;\n}\n";
34998
+ styleInject(css_248z$E);
34999
+
35000
+ var BatchImportButton = (function () {
35001
+ var controller = Invoice.useInvoiceController();
35002
+ var model = controller.useMemo(function (s) {
35003
+ return s.model;
35004
+ }, []);
35005
+ var rootElement = controller.useMemo(function (s) {
35006
+ return s.rootElement;
35007
+ }, []);
35008
+ /** 产品数据量 */
35009
+
35010
+ var goodsNum = controller.useMemo(function (s) {
35011
+ return s.passengerListState.goodsList.length;
35012
+ }, []);
35013
+ var isBatchImport = controller.useMemo(function (s) {
35014
+ return s.passengerListState.isBatchImport;
35015
+ }, []);
35016
+ /** 产品最大数 */
35017
+
35018
+ var goodMax = controller.useMemo(function (s) {
35019
+ return s.passengerListState.goodMax;
35020
+ }, []);
35021
+ /** 按钮是否禁用 */
35022
+
35023
+ var disabled = React__default['default'].useMemo(function () {
35024
+ return typeof goodMax === 'number' ? goodsNum >= goodMax : false;
35025
+ }, [goodMax, goodsNum]);
35026
+ var onClick = React__default['default'].useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
35027
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
35028
+ while (1) {
35029
+ switch (_context.prev = _context.next) {
35030
+ case 0:
35031
+ _context.next = 2;
35032
+ return importGood(controller);
35033
+
35034
+ case 2:
35035
+ _context.next = 4;
35036
+ return rollBottom$5(controller, rootElement);
35037
+
35038
+ case 4:
35039
+ case "end":
35040
+ return _context.stop();
35041
+ }
35042
+ }
35043
+ }, _callee);
35044
+ })), [controller, rootElement]);
35045
+ if (isBatchImport === false) return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
35046
+ if (model === 'prefab') return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
35047
+ if (model === 'readOnly') return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
35048
+ return /*#__PURE__*/React__default['default'].createElement(ktsXui.Button, {
35049
+ size: 'small',
35050
+ onClick: onClick,
35051
+ disabled: disabled
35052
+ }, "\u6279\u91CF\u5BFC\u5165");
35053
+ });
35054
+ /** 导入 */
35055
+
35056
+ function importGood(_x) {
35057
+ return _importGood.apply(this, arguments);
35058
+ }
35059
+ /** 货物列表,滚动到底部 */
35060
+
35061
+
35062
+ function _importGood() {
35063
+ _importGood = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(controller) {
35064
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
35065
+ while (1) {
35066
+ switch (_context4.prev = _context4.next) {
35067
+ case 0:
35068
+ _context4.next = 2;
35069
+ return controller.saveEditPassenger();
35070
+
35071
+ case 2:
35072
+ _context4.next = 4;
35073
+ return controller.wait();
35074
+
35075
+ case 4:
35076
+ _context4.next = 6;
35077
+ return controller.run( /*#__PURE__*/function () {
35078
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(s) {
35079
+ var _controller$state$pas;
35080
+
35081
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
35082
+ while (1) {
35083
+ switch (_context3.prev = _context3.next) {
35084
+ case 0:
35085
+ if (!s.passengerListState.editGood) {
35086
+ _context3.next = 3;
35087
+ break;
35088
+ }
35089
+
35090
+ _context3.next = 3;
35091
+ return (_controller$state$pas = controller.state.passengerListState.form) === null || _controller$state$pas === void 0 ? void 0 : _controller$state$pas.validateFields( /*#__PURE__*/function () {
35092
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(err, values) {
35093
+ var firstError;
35094
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
35095
+ while (1) {
35096
+ switch (_context2.prev = _context2.next) {
35097
+ case 0:
35098
+ if (!err) {
35099
+ _context2.next = 4;
35100
+ break;
35101
+ }
35102
+
35103
+ firstError = Object.values(err)[0];
35104
+ ktsXui.message.error({
35105
+ content: firstError.errors[0].message,
35106
+ key: '你正在编辑一条数据'
35107
+ });
35108
+ return _context2.abrupt("return");
35109
+
35110
+ case 4:
35111
+ case "end":
35112
+ return _context2.stop();
35113
+ }
35114
+ }
35115
+ }, _callee2);
35116
+ }));
35117
+
35118
+ return function (_x5, _x6) {
35119
+ return _ref3.apply(this, arguments);
35120
+ };
35121
+ }());
35122
+
35123
+ case 3:
35124
+ s.passengerListState.isVisibleDrawer = true;
35125
+
35126
+ case 4:
35127
+ case "end":
35128
+ return _context3.stop();
35129
+ }
35130
+ }
35131
+ }, _callee3);
35132
+ }));
35133
+
35134
+ return function (_x4) {
35135
+ return _ref2.apply(this, arguments);
35136
+ };
35137
+ }());
35138
+
35139
+ case 6:
35140
+ case "end":
35141
+ return _context4.stop();
35142
+ }
35143
+ }
35144
+ }, _callee4);
35145
+ }));
35146
+ return _importGood.apply(this, arguments);
35147
+ }
35148
+
35149
+ function rollBottom$5(_x2, _x3) {
35150
+ return _rollBottom$5.apply(this, arguments);
35151
+ }
35152
+
35153
+ function _rollBottom$5() {
35154
+ _rollBottom$5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(controller, rootElement) {
35155
+ var cont;
35156
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
35157
+ while (1) {
35158
+ switch (_context5.prev = _context5.next) {
35159
+ case 0:
35160
+ _context5.next = 2;
35161
+ return controller.wait();
35162
+
35163
+ case 2:
35164
+ cont = rootElement === null || rootElement === void 0 ? void 0 : rootElement.querySelector('.ktsAntX-table-body');
35165
+
35166
+ if (cont) {
35167
+ _context5.next = 5;
35168
+ break;
35169
+ }
35170
+
35171
+ return _context5.abrupt("return");
35172
+
35173
+ case 5:
35174
+ cont.scrollTop = cont.scrollHeight;
35175
+
35176
+ case 6:
35177
+ case "end":
35178
+ return _context5.stop();
35179
+ }
35180
+ }
35181
+ }, _callee5);
35182
+ }));
35183
+ return _rollBottom$5.apply(this, arguments);
35184
+ }
35185
+
35186
+ var PassengerList = /*#__PURE__*/function (_React$Component) {
35187
+ _inherits(PassengerList, _React$Component);
35188
+
35189
+ var _super = _createSuper(PassengerList);
35190
+
35191
+ function PassengerList() {
35192
+ _classCallCheck(this, PassengerList);
35193
+
35194
+ return _super.apply(this, arguments);
35195
+ }
35196
+
35197
+ _createClass(PassengerList, [{
35198
+ key: "render",
35199
+ value: function render() {
35200
+ return /*#__PURE__*/React__default['default'].createElement(Main$6, _objectSpread2({}, this.props));
35201
+ }
35202
+ }]);
35203
+
35204
+ return PassengerList;
35205
+ }(React__default['default'].Component);
35206
+ var Main$6 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function (props) {
35207
+ var form = props.form;
35208
+
35209
+ var _React$useState = React__default['default'].useState(typeof props.required === 'boolean' ? props.required : true),
35210
+ _React$useState2 = _slicedToArray(_React$useState, 2),
35211
+ isRequired = _React$useState2[0],
35212
+ setRequired = _React$useState2[1];
35213
+ /** 控制器 */
35214
+
35215
+
35216
+ var controller = Invoice.useInvoiceController();
35217
+ var goodsList = controller.useMemo(function (s) {
35218
+ return s.passengerListState.goodsList;
35219
+ }, []);
35220
+ /** 货物列表 */
35221
+
35222
+ var dataSource = controller.useMemo(function (s) {
35223
+ return s.passengerListState.goodsList;
35224
+ }, []);
35225
+ /** 表格行事件 */
35226
+
35227
+ var _onRow = useOnRow$4();
35228
+ /** 批量删除 */
35229
+
35230
+
35231
+ var delRowButton = useDelRowButton$4();
35232
+ useWindowClick$4(controller); // 点击组件外部 保存正在编辑的货物
35233
+
35234
+ /** 注册 from 对象 */
35235
+
35236
+ React__default['default'].useEffect(function () {
35237
+ controller.pipeline( /*#__PURE__*/function () {
35238
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s, form) {
35239
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
35240
+ while (1) {
35241
+ switch (_context.prev = _context.next) {
35242
+ case 0:
35243
+ s.passengerListState = _objectSpread2(_objectSpread2({}, s.passengerListState), {}, {
35244
+ form: form
35245
+ });
35246
+
35247
+ case 1:
35248
+ case "end":
35249
+ return _context.stop();
35250
+ }
35251
+ }
35252
+ }, _callee);
35253
+ }));
35254
+
35255
+ return function (_x, _x2) {
35256
+ return _ref.apply(this, arguments);
35257
+ };
35258
+ }())(props.form);
35259
+ }, [controller, props.form]);
35260
+ React__default['default'].useEffect(function () {
35261
+ controller.run( /*#__PURE__*/function () {
35262
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
35263
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
35264
+ while (1) {
35265
+ switch (_context2.prev = _context2.next) {
35266
+ case 0:
35267
+ s.passengerListState.addressFieldNames = props.fieldNames;
35268
+
35269
+ case 1:
35270
+ case "end":
35271
+ return _context2.stop();
35272
+ }
35273
+ }
35274
+ }, _callee2);
35275
+ }));
35276
+
35277
+ return function (_x3) {
35278
+ return _ref2.apply(this, arguments);
35279
+ };
35280
+ }());
35281
+ }, [props.fieldNames]);
35282
+ React__default['default'].useEffect(function () {
35283
+ controller.run( /*#__PURE__*/function () {
35284
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(s) {
35285
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
35286
+ while (1) {
35287
+ switch (_context3.prev = _context3.next) {
35288
+ case 0:
35289
+ if (props.certificateTypeList) {
35290
+ s.passengerListState.certificateTypeList = props.certificateTypeList;
35291
+ }
35292
+
35293
+ if (props.vehicleTypeList) {
35294
+ s.passengerListState.vehicleTypeList = props.vehicleTypeList;
35295
+ }
35296
+
35297
+ case 2:
35298
+ case "end":
35299
+ return _context3.stop();
35300
+ }
35301
+ }
35302
+ }, _callee3);
35303
+ }));
35304
+
35305
+ return function (_x4) {
35306
+ return _ref3.apply(this, arguments);
35307
+ };
35308
+ }());
35309
+ }, [props.vehicleTypeList, props.certificateTypeList]);
35310
+ React__default['default'].useEffect(function () {
35311
+ controller.run( /*#__PURE__*/function () {
35312
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(s) {
35313
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
35314
+ while (1) {
35315
+ switch (_context4.prev = _context4.next) {
35316
+ case 0:
35317
+ s.passengerListState.area = props.addressOptions;
35318
+
35319
+ case 1:
35320
+ case "end":
35321
+ return _context4.stop();
35322
+ }
35323
+ }
35324
+ }, _callee4);
35325
+ }));
35326
+
35327
+ return function (_x5) {
35328
+ return _ref4.apply(this, arguments);
35329
+ };
35330
+ }());
35331
+ }, [props.addressOptions]); // 跟新 货物
35332
+
35333
+ React__default['default'].useEffect(function () {
35334
+ controller.run( /*#__PURE__*/function () {
35335
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(s) {
35336
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
35337
+ while (1) {
35338
+ switch (_context5.prev = _context5.next) {
35339
+ case 0:
35340
+ s.passengerListState.goodsMap = new Map();
35341
+ goodsList.forEach(function (e) {
35342
+ s.passengerListState.goodsMap.set(e.$index, e);
35343
+ });
35344
+
35345
+ case 2:
35346
+ case "end":
35347
+ return _context5.stop();
35348
+ }
35349
+ }
35350
+ }, _callee5);
35351
+ }));
35352
+
35353
+ return function (_x6) {
35354
+ return _ref5.apply(this, arguments);
35355
+ };
35356
+ }());
35357
+ }, [controller, goodsList]);
35358
+ /** props 产品最大数 更新 */
35359
+
35360
+ React__default['default'].useEffect(function () {
35361
+ controller.pipeline( /*#__PURE__*/function () {
35362
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(s) {
35363
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
35364
+ while (1) {
35365
+ switch (_context6.prev = _context6.next) {
35366
+ case 0:
35367
+ s.passengerListState.goodMax = props.goodMax;
35368
+
35369
+ case 1:
35370
+ case "end":
35371
+ return _context6.stop();
35372
+ }
35373
+ }
35374
+ }, _callee6);
35375
+ }));
35376
+
35377
+ return function (_x7) {
35378
+ return _ref6.apply(this, arguments);
35379
+ };
35380
+ }())();
35381
+ }, [controller, props.goodMax]); // 注册 form
35382
+ // controller.useForm('freightInfo', form);
35383
+
35384
+ return /*#__PURE__*/React__default['default'].createElement("div", {
35385
+ className: "kts-invoice-operate-freight"
35386
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
35387
+ className: 'real-estate-info-digtal-label'
35388
+ }, "\u7279\u5B9A\u4FE1\u606F-\u65C5\u5BA2\u8FD0\u8F93\u670D\u52A1"), /*#__PURE__*/React__default['default'].createElement("div", {
35389
+ className: "kts-invoice-operate-goods-list-digtal",
35390
+ onClick: function onClick(e) {
35391
+ e.stopPropagation();
35392
+ }
35393
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
35394
+ className: "kts-invoice-operate-freight-list-able"
35395
+ }, /*#__PURE__*/React__default['default'].createElement(AddRowButton$4, null), delRowButton.button, /*#__PURE__*/React__default['default'].createElement(BatchImportButton, null), /*#__PURE__*/React__default['default'].createElement("div", {
35396
+ style: {
35397
+ flex: 1
35398
+ }
35399
+ })), /*#__PURE__*/React__default['default'].createElement("div", {
35400
+ className: classnames__default['default']('kts-invoice-operate-goods-list-table-digtal')
35401
+ }, /*#__PURE__*/React__default['default'].createElement(TableVirtual$4, {
35402
+ size: "small",
35403
+ rowKey: "$index",
35404
+ pagination: false,
35405
+ scroll: {
35406
+ y: 280
35407
+ },
35408
+ components: {
35409
+ body: {
35410
+ row: TableRow$4
35411
+ }
35412
+ },
35413
+ dataSource: dataSource,
35414
+ columns: useColumns$4(props.form, isRequired),
35415
+ rowSelection: useRowSelection$4(),
35416
+ onRow: function onRow(record) {
35417
+ return {
35418
+ onClick: function onClick() {
35419
+ _onRow.onClick(record);
35420
+ }
35421
+ };
35422
+ }
35423
+ }))));
35424
+ });
35425
+
31990
35426
  // const config = {
31991
35427
  // number: 'BigNumber',
31992
35428
  // precision: 64,
@@ -32050,7 +35486,7 @@ var Invoice = /*#__PURE__*/function (_React$PureComponent) {
32050
35486
  if (this.props.invoiceType === 'digtal') {
32051
35487
  return /*#__PURE__*/React__default['default'].createElement(Digtal, _objectSpread2({}, this.props));
32052
35488
  } else {
32053
- return /*#__PURE__*/React__default['default'].createElement(Main$6, _objectSpread2({}, this.props));
35489
+ return /*#__PURE__*/React__default['default'].createElement(Main$7, _objectSpread2({}, this.props));
32054
35490
  }
32055
35491
  }
32056
35492
  }]);
@@ -32074,6 +35510,7 @@ Invoice.RealEstateInfo = RealEstateInfo;
32074
35510
  Invoice.RealEstateSales = RealEstateSales;
32075
35511
  Invoice.Architecture = Architecture;
32076
35512
  Invoice.FreightList = FreightList;
35513
+ Invoice.PassengerList = PassengerList;
32077
35514
  Invoice.PayList = PayList;
32078
35515
  Invoice.GoodsListDigtal = GoodsList$1;
32079
35516
  Invoice.idGenerator = idGenerator;
@@ -32084,7 +35521,7 @@ Invoice.useInvoiceController = function () {
32084
35521
  return React__default['default'].useContext(InvoiceContext);
32085
35522
  };
32086
35523
 
32087
- var Main$6 = function Main(props) {
35524
+ var Main$7 = function Main(props) {
32088
35525
  var controller = React__default['default'].useMemo(function () {
32089
35526
  return props.controller || new InvoiceController();
32090
35527
  }, [props.controller]);
@@ -32193,11 +35630,11 @@ var Digtal = function Digtal(props) {
32193
35630
  /** 特殊信息 */
32194
35631
  , props.sign || /*#__PURE__*/React__default['default'].createElement(SignDigtal, null)
32195
35632
  /** 落款 */
32196
- ), /*#__PURE__*/React__default['default'].createElement(ImportGoodsDrawer, null), /*#__PURE__*/React__default['default'].createElement(EndowCodeDrawer, null), /*#__PURE__*/React__default['default'].createElement(MeiTanModal, null), " ");
35633
+ ), /*#__PURE__*/React__default['default'].createElement(ImportGoodsDrawer, null), /*#__PURE__*/React__default['default'].createElement(ImportPassengerDrawer, null), /*#__PURE__*/React__default['default'].createElement(EndowCodeDrawer, null), /*#__PURE__*/React__default['default'].createElement(MeiTanModal, null), " ");
32197
35634
  };
32198
35635
 
32199
- var css_248z$C = ".taxdetailsbox {\n display: flex;\n justify-content: flex-start;\n flex-direction: row;\n}\n.taxdetailsbox .taxrightbox {\n width: 340px;\n position: absolute;\n right: 30px;\n top: 79px;\n bottom: 50px;\n min-height: 300px;\n}\n.taxdetailsbox .taxrightbox .taxdesc {\n height: calc(100vh - 323px);\n min-height: 105px;\n overflow: auto;\n}\n";
32200
- styleInject(css_248z$C);
35636
+ var css_248z$F = ".taxdetailsbox {\n display: flex;\n justify-content: flex-start;\n flex-direction: row;\n}\n.taxdetailsbox .taxrightbox {\n width: 340px;\n position: absolute;\n right: 30px;\n top: 79px;\n bottom: 50px;\n min-height: 300px;\n}\n.taxdetailsbox .taxrightbox .taxdesc {\n height: calc(100vh - 323px);\n min-height: 105px;\n overflow: auto;\n}\n";
35637
+ styleInject(css_248z$F);
32201
35638
 
32202
35639
  function TaxClassificationModal(props) {
32203
35640
  var _props$info6;