wt-antd 4.2.3

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 (302) hide show
  1. package/README.md +26 -0
  2. package/dist/esm/assets/location.png +0 -0
  3. package/dist/esm/component/BiuAAutoComplete/index.d.ts +4 -0
  4. package/dist/esm/component/BiuAAutoComplete/index.js +13 -0
  5. package/dist/esm/component/BiuAButton/index.d.ts +18 -0
  6. package/dist/esm/component/BiuAButton/index.js +8 -0
  7. package/dist/esm/component/BiuACard/index.d.ts +2 -0
  8. package/dist/esm/component/BiuACard/index.js +9 -0
  9. package/dist/esm/component/BiuACascader/index.d.ts +10 -0
  10. package/dist/esm/component/BiuACascader/index.js +8 -0
  11. package/dist/esm/component/BiuADatePicker/index.d.ts +19 -0
  12. package/dist/esm/component/BiuADatePicker/index.js +18 -0
  13. package/dist/esm/component/BiuAForm/index.d.ts +7 -0
  14. package/dist/esm/component/BiuAForm/index.js +10 -0
  15. package/dist/esm/component/BiuAInput/index.d.ts +14 -0
  16. package/dist/esm/component/BiuAInput/index.js +32 -0
  17. package/dist/esm/component/BiuASelect/index.d.ts +6 -0
  18. package/dist/esm/component/BiuASelect/index.js +14 -0
  19. package/dist/esm/component/BiuASwitch/index.d.ts +2 -0
  20. package/dist/esm/component/BiuASwitch/index.js +9 -0
  21. package/dist/esm/component/BiuATimePicker/index.d.ts +4 -0
  22. package/dist/esm/component/BiuATimePicker/index.js +8 -0
  23. package/dist/esm/component/BiuATreeSelect/index.d.ts +2 -0
  24. package/dist/esm/component/BiuATreeSelect/index.js +8 -0
  25. package/dist/esm/component/BiuBar/index.d.ts +13 -0
  26. package/dist/esm/component/BiuBar/index.js +43 -0
  27. package/dist/esm/component/BiuComSelect/index.d.ts +19 -0
  28. package/dist/esm/component/BiuComSelect/index.js +107 -0
  29. package/dist/esm/component/BiuCue/index.d.ts +18 -0
  30. package/dist/esm/component/BiuCue/index.js +44 -0
  31. package/dist/esm/component/BiuCustomSelect/index.d.ts +19 -0
  32. package/dist/esm/component/BiuCustomSelect/index.js +198 -0
  33. package/dist/esm/component/BiuCustomTable/index.d.ts +15 -0
  34. package/dist/esm/component/BiuCustomTable/index.js +77 -0
  35. package/dist/esm/component/BiuCustomerOperCard/component/editTable.d.ts +9 -0
  36. package/dist/esm/component/BiuCustomerOperCard/component/editTable.js +268 -0
  37. package/dist/esm/component/BiuCustomerOperCard/component/index.d.ts +1 -0
  38. package/dist/esm/component/BiuCustomerOperCard/component/index.js +1 -0
  39. package/dist/esm/component/BiuCustomerOperCard/component/index.less +5 -0
  40. package/dist/esm/component/BiuCustomerOperCard/index.d.ts +20 -0
  41. package/dist/esm/component/BiuCustomerOperCard/index.js +56 -0
  42. package/dist/esm/component/BiuCustomerOperCard/type.d.ts +117 -0
  43. package/dist/esm/component/BiuCustomerOperCard/type.js +1 -0
  44. package/dist/esm/component/BiuCustomerOperCard/utils.d.ts +48 -0
  45. package/dist/esm/component/BiuCustomerOperCard/utils.js +236 -0
  46. package/dist/esm/component/BiuDescriptions/index.d.ts +9 -0
  47. package/dist/esm/component/BiuDescriptions/index.js +39 -0
  48. package/dist/esm/component/BiuDetailDrawer/index.d.ts +14 -0
  49. package/dist/esm/component/BiuDetailDrawer/index.js +55 -0
  50. package/dist/esm/component/BiuDivider/index.d.ts +4 -0
  51. package/dist/esm/component/BiuDivider/index.js +31 -0
  52. package/dist/esm/component/BiuField/component/AddressTableSelect.d.ts +3 -0
  53. package/dist/esm/component/BiuField/component/AddressTableSelect.js +150 -0
  54. package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/index.d.ts +3 -0
  55. package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/index.js +3 -0
  56. package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useConvertSubValue.d.ts +2 -0
  57. package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useConvertSubValue.js +49 -0
  58. package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useConvertUnSubValue.d.ts +2 -0
  59. package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useConvertUnSubValue.js +146 -0
  60. package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useInConvertUnSubValue.d.ts +5 -0
  61. package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useInConvertUnSubValue.js +82 -0
  62. package/dist/esm/component/BiuField/component/DepartOrgSelect/index.d.ts +14 -0
  63. package/dist/esm/component/BiuField/component/DepartOrgSelect/index.js +400 -0
  64. package/dist/esm/component/BiuField/component/DepartOrgSelect/type.d.ts +123 -0
  65. package/dist/esm/component/BiuField/component/DepartOrgSelect/type.js +1 -0
  66. package/dist/esm/component/BiuField/component/DepartOrgSelect/utils.d.ts +5 -0
  67. package/dist/esm/component/BiuField/component/DepartOrgSelect/utils.js +60 -0
  68. package/dist/esm/component/BiuField/component/OMSSystem/cityAreaSelect.d.ts +12 -0
  69. package/dist/esm/component/BiuField/component/OMSSystem/cityAreaSelect.js +131 -0
  70. package/dist/esm/component/BiuField/component/OMSSystem/warehouseSel.d.ts +7 -0
  71. package/dist/esm/component/BiuField/component/OMSSystem/warehouseSel.js +80 -0
  72. package/dist/esm/component/BiuField/component/SNInput.d.ts +13 -0
  73. package/dist/esm/component/BiuField/component/SNInput.js +623 -0
  74. package/dist/esm/component/BiuField/component/TableSelectLocal/addressSelect.d.ts +24 -0
  75. package/dist/esm/component/BiuField/component/TableSelectLocal/addressSelect.js +192 -0
  76. package/dist/esm/component/BiuField/component/TableSelectLocal/base.d.ts +13 -0
  77. package/dist/esm/component/BiuField/component/TableSelectLocal/base.js +204 -0
  78. package/dist/esm/component/BiuField/component/TableSelectLocal/goodSelect.d.ts +21 -0
  79. package/dist/esm/component/BiuField/component/TableSelectLocal/goodSelect.js +240 -0
  80. package/dist/esm/component/BiuField/component/TableSelectLocal/index.d.ts +3 -0
  81. package/dist/esm/component/BiuField/component/TableSelectLocal/index.js +74 -0
  82. package/dist/esm/component/BiuField/component/TableSelectLocal/interface.d.ts +16 -0
  83. package/dist/esm/component/BiuField/component/TableSelectLocal/interface.js +1 -0
  84. package/dist/esm/component/BiuField/component/TableSelectLocal/locationSelect.d.ts +28 -0
  85. package/dist/esm/component/BiuField/component/TableSelectLocal/locationSelect.js +178 -0
  86. package/dist/esm/component/BiuField/component/TableSelectLocal/newGoodsSelect.d.ts +21 -0
  87. package/dist/esm/component/BiuField/component/TableSelectLocal/newGoodsSelect.js +249 -0
  88. package/dist/esm/component/BiuField/component/TableSelectLocal/package.d.ts +3 -0
  89. package/dist/esm/component/BiuField/component/TableSelectLocal/package.js +151 -0
  90. package/dist/esm/component/BiuField/component/TableSelectLocal/supplierSelect.d.ts +18 -0
  91. package/dist/esm/component/BiuField/component/TableSelectLocal/supplierSelect.js +146 -0
  92. package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseAreaSelect.d.ts +3 -0
  93. package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseAreaSelect.js +147 -0
  94. package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseInfoSelects.d.ts +18 -0
  95. package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseInfoSelects.js +101 -0
  96. package/dist/esm/component/BiuField/component/appliedgoodsTypeSelect.d.ts +9 -0
  97. package/dist/esm/component/BiuField/component/appliedgoodsTypeSelect.js +75 -0
  98. package/dist/esm/component/BiuField/component/autoComplete.d.ts +8 -0
  99. package/dist/esm/component/BiuField/component/autoComplete.js +83 -0
  100. package/dist/esm/component/BiuField/component/biuMultipleAInput.d.ts +2 -0
  101. package/dist/esm/component/BiuField/component/biuMultipleAInput.js +133 -0
  102. package/dist/esm/component/BiuField/component/boxTypeSelect.d.ts +11 -0
  103. package/dist/esm/component/BiuField/component/boxTypeSelect.js +139 -0
  104. package/dist/esm/component/BiuField/component/businessdistrictselect.d.ts +55 -0
  105. package/dist/esm/component/BiuField/component/businessdistrictselect.js +414 -0
  106. package/dist/esm/component/BiuField/component/carrierInfoSelect.d.ts +13 -0
  107. package/dist/esm/component/BiuField/component/carrierInfoSelect.js +164 -0
  108. package/dist/esm/component/BiuField/component/channelSelect.d.ts +8 -0
  109. package/dist/esm/component/BiuField/component/channelSelect.js +95 -0
  110. package/dist/esm/component/BiuField/component/cityAreaCascader.d.ts +11 -0
  111. package/dist/esm/component/BiuField/component/cityAreaCascader.js +88 -0
  112. package/dist/esm/component/BiuField/component/clientInfoTableSelect.d.ts +3 -0
  113. package/dist/esm/component/BiuField/component/clientInfoTableSelect.js +199 -0
  114. package/dist/esm/component/BiuField/component/customMenu.d.ts +3 -0
  115. package/dist/esm/component/BiuField/component/customMenu.js +110 -0
  116. package/dist/esm/component/BiuField/component/databaseSelect.d.ts +6 -0
  117. package/dist/esm/component/BiuField/component/databaseSelect.js +42 -0
  118. package/dist/esm/component/BiuField/component/departmentTreeSelect.d.ts +3 -0
  119. package/dist/esm/component/BiuField/component/departmentTreeSelect.js +106 -0
  120. package/dist/esm/component/BiuField/component/dicNameSelect.d.ts +12 -0
  121. package/dist/esm/component/BiuField/component/dicNameSelect.js +53 -0
  122. package/dist/esm/component/BiuField/component/dicTypeSelect.d.ts +42 -0
  123. package/dist/esm/component/BiuField/component/dicTypeSelect.js +87 -0
  124. package/dist/esm/component/BiuField/component/dockingPartySelect.d.ts +8 -0
  125. package/dist/esm/component/BiuField/component/dockingPartySelect.js +63 -0
  126. package/dist/esm/component/BiuField/component/editLocationSelect.d.ts +21 -0
  127. package/dist/esm/component/BiuField/component/editLocationSelect.js +124 -0
  128. package/dist/esm/component/BiuField/component/electronicFaceSheet/accountSelect.d.ts +3 -0
  129. package/dist/esm/component/BiuField/component/electronicFaceSheet/accountSelect.js +36 -0
  130. package/dist/esm/component/BiuField/component/electronicFaceSheet/addresSelect.d.ts +14 -0
  131. package/dist/esm/component/BiuField/component/electronicFaceSheet/addresSelect.js +98 -0
  132. package/dist/esm/component/BiuField/component/electronicFaceSheet/platformSelect.d.ts +7 -0
  133. package/dist/esm/component/BiuField/component/electronicFaceSheet/platformSelect.js +74 -0
  134. package/dist/esm/component/BiuField/component/goodsTypeSelect.d.ts +10 -0
  135. package/dist/esm/component/BiuField/component/goodsTypeSelect.js +92 -0
  136. package/dist/esm/component/BiuField/component/index.d.ts +39 -0
  137. package/dist/esm/component/BiuField/component/index.js +39 -0
  138. package/dist/esm/component/BiuField/component/interfaceNameSelect.d.ts +9 -0
  139. package/dist/esm/component/BiuField/component/interfaceNameSelect.js +65 -0
  140. package/dist/esm/component/BiuField/component/lpnSelect.d.ts +3 -0
  141. package/dist/esm/component/BiuField/component/lpnSelect.js +96 -0
  142. package/dist/esm/component/BiuField/component/lpnSelectNew.d.ts +17 -0
  143. package/dist/esm/component/BiuField/component/lpnSelectNew.js +189 -0
  144. package/dist/esm/component/BiuField/component/newEditLocationSelect.d.ts +21 -0
  145. package/dist/esm/component/BiuField/component/newEditLocationSelect.js +129 -0
  146. package/dist/esm/component/BiuField/component/newUserSelect.d.ts +12 -0
  147. package/dist/esm/component/BiuField/component/newUserSelect.js +212 -0
  148. package/dist/esm/component/BiuField/component/orderTypeSelect.d.ts +16 -0
  149. package/dist/esm/component/BiuField/component/orderTypeSelect.js +82 -0
  150. package/dist/esm/component/BiuField/component/orderTypeTableSelect.d.ts +3 -0
  151. package/dist/esm/component/BiuField/component/orderTypeTableSelect.js +45 -0
  152. package/dist/esm/component/BiuField/component/parkSelect.d.ts +12 -0
  153. package/dist/esm/component/BiuField/component/parkSelect.js +88 -0
  154. package/dist/esm/component/BiuField/component/personnelinfoselect.d.ts +57 -0
  155. package/dist/esm/component/BiuField/component/personnelinfoselect.js +432 -0
  156. package/dist/esm/component/BiuField/component/propertNameSelect.d.ts +9 -0
  157. package/dist/esm/component/BiuField/component/propertNameSelect.js +114 -0
  158. package/dist/esm/component/BiuField/component/shipperTableSelect.d.ts +3 -0
  159. package/dist/esm/component/BiuField/component/shipperTableSelect.js +94 -0
  160. package/dist/esm/component/BiuField/component/userSelect.d.ts +11 -0
  161. package/dist/esm/component/BiuField/component/userSelect.js +174 -0
  162. package/dist/esm/component/BiuField/component/warehouseAreaSelect.d.ts +9 -0
  163. package/dist/esm/component/BiuField/component/warehouseAreaSelect.js +104 -0
  164. package/dist/esm/component/BiuField/component/warehouseInfoSelect.d.ts +14 -0
  165. package/dist/esm/component/BiuField/component/warehouseInfoSelect.js +94 -0
  166. package/dist/esm/component/BiuField/component/warehouseLoctionSelect.d.ts +14 -0
  167. package/dist/esm/component/BiuField/component/warehouseLoctionSelect.js +125 -0
  168. package/dist/esm/component/BiuField/index.d.ts +8 -0
  169. package/dist/esm/component/BiuField/index.js +680 -0
  170. package/dist/esm/component/BiuFileInput/index.d.ts +11 -0
  171. package/dist/esm/component/BiuFileInput/index.js +58 -0
  172. package/dist/esm/component/BiuForm/index.d.ts +14 -0
  173. package/dist/esm/component/BiuForm/index.js +270 -0
  174. package/dist/esm/component/BiuForm/type.d.ts +47 -0
  175. package/dist/esm/component/BiuForm/type.js +1 -0
  176. package/dist/esm/component/BiuForm/utils.d.ts +2 -0
  177. package/dist/esm/component/BiuForm/utils.js +53 -0
  178. package/dist/esm/component/BiuIcon/index.d.ts +3 -0
  179. package/dist/esm/component/BiuIcon/index.js +15 -0
  180. package/dist/esm/component/BiuMapSelectSite/index.d.ts +53 -0
  181. package/dist/esm/component/BiuMapSelectSite/index.js +593 -0
  182. package/dist/esm/component/BiuModal/index.d.ts +24 -0
  183. package/dist/esm/component/BiuModal/index.js +240 -0
  184. package/dist/esm/component/BiuOperForm/index.d.ts +22 -0
  185. package/dist/esm/component/BiuOperForm/index.js +390 -0
  186. package/dist/esm/component/BiuOperForm/type.d.ts +24 -0
  187. package/dist/esm/component/BiuOperForm/type.js +1 -0
  188. package/dist/esm/component/BiuOperTable/index.d.ts +15 -0
  189. package/dist/esm/component/BiuOperTable/index.js +349 -0
  190. package/dist/esm/component/BiuOperTable/type.d.ts +142 -0
  191. package/dist/esm/component/BiuOperTable/type.js +1 -0
  192. package/dist/esm/component/BiuOperTable/utils.d.ts +6 -0
  193. package/dist/esm/component/BiuOperTable/utils.js +13 -0
  194. package/dist/esm/component/BiuPagination/index.d.ts +15 -0
  195. package/dist/esm/component/BiuPagination/index.js +34 -0
  196. package/dist/esm/component/BiuResizeTable/component/VirtualTable.d.ts +3 -0
  197. package/dist/esm/component/BiuResizeTable/component/VirtualTable.js +127 -0
  198. package/dist/esm/component/BiuResizeTable/component/biuTableCell.d.ts +1 -0
  199. package/dist/esm/component/BiuResizeTable/component/biuTableCell.js +78 -0
  200. package/dist/esm/component/BiuResizeTable/component/index.d.ts +1 -0
  201. package/dist/esm/component/BiuResizeTable/component/index.js +1 -0
  202. package/dist/esm/component/BiuResizeTable/index.d.ts +2 -0
  203. package/dist/esm/component/BiuResizeTable/index.js +71 -0
  204. package/dist/esm/component/BiuResizeTable/index.less +19 -0
  205. package/dist/esm/component/BiuSplit/index.d.ts +32 -0
  206. package/dist/esm/component/BiuSplit/index.js +57 -0
  207. package/dist/esm/component/BiuTable/component/index.d.ts +3 -0
  208. package/dist/esm/component/BiuTable/component/index.js +3 -0
  209. package/dist/esm/component/BiuTable/component/tableActionBarRender.d.ts +9 -0
  210. package/dist/esm/component/BiuTable/component/tableActionBarRender.js +206 -0
  211. package/dist/esm/component/BiuTable/component/tableCellRender.d.ts +14 -0
  212. package/dist/esm/component/BiuTable/component/tableCellRender.js +125 -0
  213. package/dist/esm/component/BiuTable/component/tableSettingRender.d.ts +2 -0
  214. package/dist/esm/component/BiuTable/component/tableSettingRender.js +347 -0
  215. package/dist/esm/component/BiuTable/context.d.ts +2 -0
  216. package/dist/esm/component/BiuTable/context.js +2 -0
  217. package/dist/esm/component/BiuTable/index.d.ts +67 -0
  218. package/dist/esm/component/BiuTable/index.js +586 -0
  219. package/dist/esm/component/BiuTable/type.d.ts +200 -0
  220. package/dist/esm/component/BiuTable/type.js +1 -0
  221. package/dist/esm/component/BiuTable/utils.d.ts +12 -0
  222. package/dist/esm/component/BiuTable/utils.js +123 -0
  223. package/dist/esm/component/BiuTableLink/index.d.ts +11 -0
  224. package/dist/esm/component/BiuTableLink/index.js +54 -0
  225. package/dist/esm/component/BiuTableSelect/index.d.ts +54 -0
  226. package/dist/esm/component/BiuTableSelect/index.js +231 -0
  227. package/dist/esm/component/BiuTabs/index.d.ts +4 -0
  228. package/dist/esm/component/BiuTabs/index.js +18 -0
  229. package/dist/esm/component/index.d.ts +34 -0
  230. package/dist/esm/component/index.js +34 -0
  231. package/dist/esm/constant/Cache_Key.d.ts +28 -0
  232. package/dist/esm/constant/Cache_Key.js +28 -0
  233. package/dist/esm/constant/DateTime.d.ts +12 -0
  234. package/dist/esm/constant/DateTime.js +15 -0
  235. package/dist/esm/constant/External.d.ts +64 -0
  236. package/dist/esm/constant/External.js +260 -0
  237. package/dist/esm/constant/Gateway_Path.d.ts +5 -0
  238. package/dist/esm/constant/Gateway_Path.js +5 -0
  239. package/dist/esm/constant/Layout.d.ts +210 -0
  240. package/dist/esm/constant/Layout.js +215 -0
  241. package/dist/esm/constant/Regexp.d.ts +109 -0
  242. package/dist/esm/constant/Regexp.js +130 -0
  243. package/dist/esm/constant/index.d.ts +6 -0
  244. package/dist/esm/constant/index.js +6 -0
  245. package/dist/esm/hooks/index.d.ts +7 -0
  246. package/dist/esm/hooks/index.js +7 -0
  247. package/dist/esm/hooks/useAuth.d.ts +4 -0
  248. package/dist/esm/hooks/useAuth.js +22 -0
  249. package/dist/esm/hooks/useCurrentSystem.d.ts +6 -0
  250. package/dist/esm/hooks/useCurrentSystem.js +17 -0
  251. package/dist/esm/hooks/useLayoutInfo.d.ts +10 -0
  252. package/dist/esm/hooks/useLayoutInfo.js +14 -0
  253. package/dist/esm/hooks/useReducerState.d.ts +16 -0
  254. package/dist/esm/hooks/useReducerState.js +45 -0
  255. package/dist/esm/hooks/useUmeng.d.ts +5 -0
  256. package/dist/esm/hooks/useUmeng.js +168 -0
  257. package/dist/esm/hooks/useUserInfo.d.ts +4 -0
  258. package/dist/esm/hooks/useUserInfo.js +17 -0
  259. package/dist/esm/hooks/useWareInfo.d.ts +4 -0
  260. package/dist/esm/hooks/useWareInfo.js +17 -0
  261. package/dist/esm/index.d.ts +5 -0
  262. package/dist/esm/index.js +5 -0
  263. package/dist/esm/package/index.d.ts +1 -0
  264. package/dist/esm/package/index.js +1 -0
  265. package/dist/esm/package/requestWrapper/baseRequest.d.ts +3 -0
  266. package/dist/esm/package/requestWrapper/baseRequest.js +47 -0
  267. package/dist/esm/package/requestWrapper/index.d.ts +4 -0
  268. package/dist/esm/package/requestWrapper/index.js +425 -0
  269. package/dist/esm/package/requestWrapper/type.d.ts +41 -0
  270. package/dist/esm/package/requestWrapper/type.js +1 -0
  271. package/dist/esm/package/requestWrapper/utils.d.ts +10 -0
  272. package/dist/esm/package/requestWrapper/utils.js +45 -0
  273. package/dist/esm/types/track.d.ts +113 -0
  274. package/dist/esm/types/track.js +63 -0
  275. package/dist/esm/types/umeng.d.ts +7 -0
  276. package/dist/esm/utils/authUtils.d.ts +18 -0
  277. package/dist/esm/utils/authUtils.js +36 -0
  278. package/dist/esm/utils/cacheUtils.d.ts +4 -0
  279. package/dist/esm/utils/cacheUtils.js +24 -0
  280. package/dist/esm/utils/chainUtils.d.ts +26 -0
  281. package/dist/esm/utils/chainUtils.js +54 -0
  282. package/dist/esm/utils/dateUtils.d.ts +23 -0
  283. package/dist/esm/utils/dateUtils.js +55 -0
  284. package/dist/esm/utils/decimalUtils.d.ts +5 -0
  285. package/dist/esm/utils/decimalUtils.js +7 -0
  286. package/dist/esm/utils/excelUtils.d.ts +22 -0
  287. package/dist/esm/utils/excelUtils.js +165 -0
  288. package/dist/esm/utils/index.d.ts +11 -0
  289. package/dist/esm/utils/index.js +11 -0
  290. package/dist/esm/utils/layoutUtils.d.ts +1 -0
  291. package/dist/esm/utils/layoutUtils.js +13 -0
  292. package/dist/esm/utils/objectUtils.d.ts +1 -0
  293. package/dist/esm/utils/objectUtils.js +3 -0
  294. package/dist/esm/utils/soundUtils.d.ts +5 -0
  295. package/dist/esm/utils/soundUtils.js +29 -0
  296. package/dist/esm/utils/stringUtils.d.ts +24 -0
  297. package/dist/esm/utils/stringUtils.js +39 -0
  298. package/dist/esm/utils/sysUtils.d.ts +8 -0
  299. package/dist/esm/utils/sysUtils.js +33 -0
  300. package/dist/esm/utils/umeng.d.ts +3 -0
  301. package/dist/esm/utils/umeng.js +161 -0
  302. package/package.json +60 -0
@@ -0,0 +1,623 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["onChange", "onChangeData", "value", "serialNumber", "ownerId", "goodsId", "goodsType"];
3
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
9
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
10
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
11
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
12
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
13
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
14
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
15
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
16
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
17
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
18
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
19
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
20
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
21
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
22
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
23
+ import { FullscreenOutlined, MinusOutlined } from '@ant-design/icons';
24
+ import { useUpdateEffect } from 'ahooks';
25
+ import { Button, Form, Modal, Table, Tooltip } from 'antd';
26
+ import { concat, isArray, keys, trim } from 'lodash';
27
+ import React, { forwardRef, useCallback, useEffect, useMemo, useRef } from 'react';
28
+ import { BiuCue, BiuFileInput, BiuAInput } from "../..";
29
+ import { GATEWAY_ROUTE_WMS } from "../../../constant";
30
+ import { useReducerState } from "../../../hooks";
31
+ import { request } from "../../../package";
32
+ import { exportExcelTemp, importExcel } from "../../../utils";
33
+ import { jsx as _jsx } from "react/jsx-runtime";
34
+ import { jsxs as _jsxs } from "react/jsx-runtime";
35
+ import { Fragment as _Fragment } from "react/jsx-runtime";
36
+ var getSnRule = function getSnRule(data) {
37
+ return request({
38
+ apiName: '/wms/base/snRule/query',
39
+ dubbo: true,
40
+ data: data,
41
+ requestConfig: {
42
+ GatewayRoute: GATEWAY_ROUTE_WMS
43
+ }
44
+ });
45
+ };
46
+ var initialState = {
47
+ visible: false,
48
+ sncodeStr: '',
49
+ sncodeArr: [],
50
+ data: [],
51
+ filterData: [],
52
+ snRuleData: []
53
+ };
54
+ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props, ref) {
55
+ /**
56
+ * size 需要单独取出来赋值,保证按钮和前面输入框一致
57
+ */
58
+ var _onChange = props.onChange,
59
+ onChangeData = props.onChangeData,
60
+ value = props.value,
61
+ _props$serialNumber = props.serialNumber,
62
+ serialNumber = _props$serialNumber === void 0 ? 0 : _props$serialNumber,
63
+ ownerId = props.ownerId,
64
+ goodsId = props.goodsId,
65
+ goodsType = props.goodsType,
66
+ inputProps = _objectWithoutProperties(props, _excluded);
67
+ var _useReducerState = useReducerState(initialState),
68
+ _useReducerState2 = _slicedToArray(_useReducerState, 2),
69
+ state = _useReducerState2[0],
70
+ setState = _useReducerState2[1];
71
+ var inputRef = useRef();
72
+ var searchRef = useRef();
73
+ useEffect(function () {
74
+ setState({
75
+ sncodeStr: value
76
+ });
77
+ // eslint-disable-next-line react-hooks/exhaustive-deps
78
+ }, [value]);
79
+
80
+ // useEffect(() => {
81
+ // if (ownerId) {
82
+ // getSnRule({ ownerId }).then((data: any) => {
83
+ // setState({ snRuleData: data.rows });
84
+ // });
85
+ // }
86
+ // // eslint-disable-next-line react-hooks/exhaustive-deps
87
+ // }, [ownerId]);
88
+
89
+ useUpdateEffect(function () {
90
+ var visible = state.visible,
91
+ sncodeStr = state.sncodeStr;
92
+ if (visible === true) {
93
+ var code = trim(sncodeStr, ', ');
94
+ setState({
95
+ sncodeArr: code === '' ? [] : code.split(',').reverse()
96
+ });
97
+ }
98
+ }, [state.visible]);
99
+ useUpdateEffect(function () {
100
+ var sncodeArr = state.sncodeArr,
101
+ searchCode = state.searchCode;
102
+ var data = sncodeArr.map(function (d, i) {
103
+ return {
104
+ sncode: d,
105
+ No: sncodeArr.length - i
106
+ };
107
+ });
108
+ var filterData = data.filter(function (d) {
109
+ return d.sncode.includes(trim(searchCode));
110
+ });
111
+ setState({
112
+ data: data,
113
+ filterData: filterData
114
+ });
115
+ }, [state.sncodeArr]);
116
+ useUpdateEffect(function () {
117
+ var data = state.data,
118
+ searchCode = state.searchCode;
119
+ if (data !== null && data !== void 0 && data.length) {
120
+ var filterData = data.filter(function (d) {
121
+ return d.sncode.includes(trim(searchCode));
122
+ });
123
+ setState({
124
+ filterData: filterData
125
+ });
126
+ // 当筛选数据为空或者从空恢复的时候,会引发表格重新渲染,失去焦点,需要重新获取焦点
127
+ if (filterData.length === 0 || state.filterData.length === 0) {
128
+ setTimeout(function () {
129
+ searchRef.current.focus();
130
+ }, 100);
131
+ }
132
+ }
133
+ }, [state.searchCode, "".concat(state.data.length), state.data]);
134
+ var showModal = useCallback(function () {
135
+ setState({
136
+ visible: true
137
+ });
138
+ // eslint-disable-next-line react-hooks/exhaustive-deps
139
+ }, []);
140
+ var hideModal = useCallback(function () {
141
+ setState({
142
+ visible: false
143
+ });
144
+ // eslint-disable-next-line react-hooks/exhaustive-deps
145
+ }, []);
146
+ var addSncode = useCallback( /*#__PURE__*/function () {
147
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(sncodeData) {
148
+ var sncodeArr, snRuleData, data, sncode, newSnData, newSnCode, i;
149
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
150
+ while (1) switch (_context.prev = _context.next) {
151
+ case 0:
152
+ sncodeArr = state.sncodeArr;
153
+ snRuleData = [];
154
+ if (!ownerId) {
155
+ _context.next = 7;
156
+ break;
157
+ }
158
+ _context.next = 5;
159
+ return getSnRule({
160
+ ownerId: ownerId
161
+ });
162
+ case 5:
163
+ data = _context.sent;
164
+ snRuleData = data === null || data === void 0 ? void 0 : data.rows;
165
+ case 7:
166
+ if (!(sncodeArr.length === serialNumber)) {
167
+ _context.next = 10;
168
+ break;
169
+ }
170
+ BiuCue.Warning("\u6DFB\u52A0\u6570\u91CF\u5230\u8FBE\u4E0A\u9650", {
171
+ type: 'warning',
172
+ soundAudioType: 'error'
173
+ });
174
+ return _context.abrupt("return");
175
+ case 10:
176
+ sncode = sncodeData.trim();
177
+ if (!(snRuleData.length > 0)) {
178
+ _context.next = 45;
179
+ break;
180
+ }
181
+ newSnData = snRuleData.filter(function (e) {
182
+ return e.goodsId === goodsId;
183
+ }).length > 0 ? snRuleData.filter(function (e) {
184
+ return e.goodsId === goodsId;
185
+ })[0] : snRuleData.filter(function (e) {
186
+ return e.goodsType === goodsType;
187
+ })[0];
188
+ if (!(newSnData && keys(newSnData).length > 0)) {
189
+ _context.next = 38;
190
+ break;
191
+ }
192
+ if (newSnData && newSnData.minLength >= sncode.length && sncodeArr.includes(sncode)) {
193
+ BiuCue.Warning("SN\u53F7 ".concat(sncode, " \u5DF2\u5B58\u5728\uFF0C\u8BF7\u52FF\u91CD\u590D\u6DFB\u52A0/\u626B\u63CF"), {
194
+ type: 'warning',
195
+ soundAudioType: 'error'
196
+ });
197
+ }
198
+ if (!(newSnData && newSnData.minLength < sncode.length)) {
199
+ _context.next = 36;
200
+ break;
201
+ }
202
+ newSnCode = sncode;
203
+ newSnData.snRuleDetailPOList.sort(function (a, b) {
204
+ return a.sort - b.sort;
205
+ }).forEach(function (element) {
206
+ switch ("".concat(element.operType)) {
207
+ case '1':
208
+ // 去掉前缀
209
+ if (!isArray(newSnCode)) {
210
+ if (newSnCode.substring(0, element.snRule.length) === element.snRule) {
211
+ newSnCode = newSnCode.substring(element.snRule.length);
212
+ }
213
+ } else {
214
+ newSnCode = newSnCode.map(function (e) {
215
+ if (e.substring(0, element.snRule.length) === element.snRule) {
216
+ return e.substring(element.snRule.length);
217
+ }
218
+ return e;
219
+ });
220
+ }
221
+ break;
222
+ case '2':
223
+ // 去掉后缀
224
+ if (!isArray(newSnCode)) {
225
+ if (newSnCode.substring(newSnCode.length - element.snRule.length) === element.snRule) {
226
+ newSnCode = newSnCode.substring(0, newSnCode.length - element.snRule.length);
227
+ }
228
+ } else {
229
+ newSnCode = newSnCode.map(function (e) {
230
+ if (e.substring(e.length - element.snRule.length) === element.snRule) {
231
+ return e.substring(0, e.length - element.snRule.length);
232
+ }
233
+ return e;
234
+ });
235
+ }
236
+ break;
237
+ case '3':
238
+ // 去掉空格
239
+ if (!isArray(newSnCode)) {
240
+ newSnCode = newSnCode.split(' ').join('');
241
+ } else {
242
+ newSnCode = newSnCode.map(function (w) {
243
+ return w.split(' ').join('');
244
+ });
245
+ }
246
+ break;
247
+ case '4':
248
+ // 分隔符
249
+ if (!isArray(newSnCode)) {
250
+ newSnCode = newSnCode.split(element.snRule);
251
+ } else {
252
+ newSnCode = newSnCode.map(function (e) {
253
+ return e.split(element.snRule);
254
+ });
255
+ }
256
+ break;
257
+ case '5':
258
+ // 正则表达式
259
+ if (!isArray(newSnCode)) {
260
+ newSnCode = element.snRule.test(newSnCode) ? newSnCode : undefined;
261
+ } else {
262
+ newSnCode = newSnCode.filter(function (e) {
263
+ return element.snRule.test(e);
264
+ });
265
+ }
266
+ break;
267
+ default:
268
+ }
269
+ });
270
+ if (isArray(newSnCode)) {
271
+ _context.next = 24;
272
+ break;
273
+ }
274
+ if (sncodeArr.includes(newSnCode)) {
275
+ BiuCue.Warning("SN\u53F7 ".concat(newSnCode, " \u5DF2\u5B58\u5728\uFF0C\u8BF7\u52FF\u91CD\u590D\u6DFB\u52A0/\u626B\u63CF"), {
276
+ type: 'warning',
277
+ soundAudioType: 'error'
278
+ });
279
+ }
280
+ sncodeArr.unshift(newSnCode);
281
+ setState({
282
+ sncodeArr: _toConsumableArray(sncodeArr),
283
+ scanCode: ''
284
+ });
285
+ _context.next = 36;
286
+ break;
287
+ case 24:
288
+ if (!(newSnCode.length > serialNumber)) {
289
+ _context.next = 27;
290
+ break;
291
+ }
292
+ BiuCue.Warning("\u626B\u63CF\u6570\u91CF\u8D85\u51FA\uFF0C\u626B\u63CFSN\u6570\u91CF".concat(newSnCode.length, ",\u5141\u8BB8\u6570\u91CF").concat(serialNumber), {
293
+ type: 'warning',
294
+ soundAudioType: 'error'
295
+ });
296
+ return _context.abrupt("return");
297
+ case 27:
298
+ i = 0;
299
+ case 28:
300
+ if (!(i < newSnCode.length)) {
301
+ _context.next = 35;
302
+ break;
303
+ }
304
+ if (!sncodeArr.includes(newSnCode[i])) {
305
+ _context.next = 32;
306
+ break;
307
+ }
308
+ BiuCue.Warning("SN\u53F7 ".concat(newSnCode[i], " \u5DF2\u5B58\u5728\uFF0C\u8BF7\u52FF\u91CD\u590D\u6DFB\u52A0/\u626B\u63CF"), {
309
+ type: 'warning',
310
+ soundAudioType: 'error'
311
+ });
312
+ return _context.abrupt("return");
313
+ case 32:
314
+ i += 1;
315
+ _context.next = 28;
316
+ break;
317
+ case 35:
318
+ setState({
319
+ sncodeArr: concat(newSnCode, sncodeArr),
320
+ scanCode: ''
321
+ });
322
+ case 36:
323
+ _context.next = 43;
324
+ break;
325
+ case 38:
326
+ if (!sncodeArr.includes(sncode)) {
327
+ _context.next = 41;
328
+ break;
329
+ }
330
+ BiuCue.Warning("SN\u53F7 ".concat(sncode, " \u5DF2\u5B58\u5728\uFF0C\u8BF7\u52FF\u91CD\u590D\u6DFB\u52A0/\u626B\u63CF"), {
331
+ type: 'warning',
332
+ soundAudioType: 'error'
333
+ });
334
+ return _context.abrupt("return");
335
+ case 41:
336
+ sncodeArr.unshift(sncode);
337
+ setState({
338
+ sncodeArr: _toConsumableArray(sncodeArr),
339
+ scanCode: ''
340
+ });
341
+ case 43:
342
+ _context.next = 50;
343
+ break;
344
+ case 45:
345
+ if (!sncodeArr.includes(sncode)) {
346
+ _context.next = 48;
347
+ break;
348
+ }
349
+ BiuCue.Warning("SN\u53F7 ".concat(sncode, " \u5DF2\u5B58\u5728\uFF0C\u8BF7\u52FF\u91CD\u590D\u6DFB\u52A0/\u626B\u63CF"), {
350
+ type: 'warning',
351
+ soundAudioType: 'error'
352
+ });
353
+ return _context.abrupt("return");
354
+ case 48:
355
+ sncodeArr.unshift(sncode);
356
+ setState({
357
+ sncodeArr: _toConsumableArray(sncodeArr),
358
+ scanCode: ''
359
+ });
360
+ case 50:
361
+ case "end":
362
+ return _context.stop();
363
+ }
364
+ }, _callee);
365
+ }));
366
+ return function (_x) {
367
+ return _ref.apply(this, arguments);
368
+ };
369
+ }(),
370
+ // eslint-disable-next-line react-hooks/exhaustive-deps
371
+ [state.sncodeArr]);
372
+ var handleRemoveRow = useCallback(function (row, i) {
373
+ var sncodeArr = state.sncodeArr;
374
+ sncodeArr.splice(i, 1);
375
+ setState({
376
+ sncodeArr: _toConsumableArray(sncodeArr)
377
+ });
378
+ },
379
+ // eslint-disable-next-line react-hooks/exhaustive-deps
380
+ [state.sncodeArr]);
381
+ var handleOk = useCallback(function () {
382
+ var sncodeArr = state.sncodeArr;
383
+ var sncodeStr = sncodeArr.length ? "".concat(sncodeArr.reverse().join(','), ",") : '';
384
+ setState({
385
+ sncodeStr: sncodeStr
386
+ });
387
+ if (_onChange) {
388
+ _onChange(sncodeStr);
389
+ }
390
+ if (onChangeData) {
391
+ onChangeData(sncodeStr, sncodeArr);
392
+ }
393
+ hideModal();
394
+ // eslint-disable-next-line react-hooks/exhaustive-deps
395
+ }, [state.sncodeArr]);
396
+
397
+ /* *********************************导入相关********************************* */
398
+ // 导出模板表格列
399
+ var exportColumns = useMemo(function () {
400
+ return [{
401
+ width: 120,
402
+ title: 'SN号',
403
+ dataIndex: 'sncode'
404
+ }];
405
+ }, []);
406
+ var fieldMap = useCallback(function () {
407
+ return exportColumns.reduce(function (map, cur) {
408
+ map[cur.title] = cur.dataIndex;
409
+ return map;
410
+ }, {});
411
+ }, [exportColumns]);
412
+ var onImportFile = useCallback( /*#__PURE__*/function () {
413
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(files) {
414
+ var file, dataSource;
415
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
416
+ while (1) switch (_context2.prev = _context2.next) {
417
+ case 0:
418
+ if (!(files === null)) {
419
+ _context2.next = 2;
420
+ break;
421
+ }
422
+ return _context2.abrupt("return");
423
+ case 2:
424
+ file = files[0];
425
+ _context2.next = 5;
426
+ return importExcel(file, fieldMap(), function (jObject, index) {
427
+ jObject.sort = index + 1;
428
+ return jObject;
429
+ });
430
+ case 5:
431
+ dataSource = _context2.sent;
432
+ if (!(dataSource.length > serialNumber)) {
433
+ _context2.next = 9;
434
+ break;
435
+ }
436
+ BiuCue.Warning('导入数量超出上限,请重新导入');
437
+ return _context2.abrupt("return");
438
+ case 9:
439
+ setState({
440
+ sncodeArr: [].concat(_toConsumableArray(state.sncodeArr), _toConsumableArray(dataSource.map(function (e) {
441
+ return e.sncode;
442
+ })))
443
+ });
444
+ case 10:
445
+ case "end":
446
+ return _context2.stop();
447
+ }
448
+ }, _callee2);
449
+ }));
450
+ return function (_x2) {
451
+ return _ref2.apply(this, arguments);
452
+ };
453
+ }(), [fieldMap, serialNumber, setState, state.sncodeArr]);
454
+ /* ********************************************************************** */
455
+ return /*#__PURE__*/_jsx(_Fragment, {
456
+ children: /*#__PURE__*/_jsxs("span", {
457
+ className: "ant-input-group",
458
+ style: {
459
+ display: 'table'
460
+ },
461
+ children: [/*#__PURE__*/_jsx(BiuAInput, _objectSpread(_objectSpread({}, inputProps), {}, {
462
+ ref: inputRef,
463
+ value: inputProps.disabled ? undefined : state.sncodeStr,
464
+ onChange: function onChange(e) {
465
+ var _e$target, _e$target2, _e$target3, _e$target4;
466
+ setState({
467
+ sncodeStr: (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value
468
+ });
469
+ var newData = (_e$target2 = e.target) !== null && _e$target2 !== void 0 && _e$target2.value ? (_e$target3 = e.target) === null || _e$target3 === void 0 ? void 0 : _e$target3.value.split(',').filter(function (s) {
470
+ return s;
471
+ }) : [];
472
+ if ((_e$target4 = e.target) !== null && _e$target4 !== void 0 && _e$target4.value && newData.length > serialNumber) {
473
+ BiuCue.Warning("\u6DFB\u52A0\u6570\u91CF\u5230\u8FBE\u4E0A\u9650", {
474
+ type: 'warning',
475
+ soundAudioType: 'error'
476
+ });
477
+ inputRef.current.blur();
478
+ setTimeout(function () {
479
+ setState({
480
+ sncodeStr: newData.filter(function (f) {
481
+ return newData.indexOf(f) < serialNumber;
482
+ })
483
+ });
484
+ }, 100);
485
+ }
486
+ if (_onChange) {
487
+ _onChange(newData.filter(function (f) {
488
+ return newData.indexOf(f) < serialNumber;
489
+ }).join(','));
490
+ }
491
+ if (onChangeData) {
492
+ onChangeData(newData.filter(function (f) {
493
+ return newData.indexOf(f) < serialNumber;
494
+ }).join(','));
495
+ }
496
+ },
497
+ onPressEnter: function onPressEnter(e) {
498
+ e.stopPropagation();
499
+ setState(function (_ref3) {
500
+ var sncodeStr = _ref3.sncodeStr;
501
+ return {
502
+ sncodeStr: sncodeStr.lastIndexOf(',') === 0 ? sncodeStr : "".concat(sncodeStr, ",")
503
+ };
504
+ });
505
+ }
506
+ })), /*#__PURE__*/_jsx("span", {
507
+ style: {
508
+ display: 'table-cell',
509
+ width: 1,
510
+ whiteSpace: 'nowrap',
511
+ verticalAlign: 'middle'
512
+ },
513
+ children: /*#__PURE__*/_jsx(Tooltip, {
514
+ title: "\u6253\u5F00SN\u53F7\u8BE6\u7EC6\u64CD\u4F5C\u754C\u9762",
515
+ children: /*#__PURE__*/_jsx(Button, {
516
+ style: {
517
+ marginLeft: -1
518
+ },
519
+ disabled: inputProps.disabled,
520
+ icon: /*#__PURE__*/_jsx(FullscreenOutlined, {}),
521
+ onClick: showModal
522
+ })
523
+ })
524
+ }), /*#__PURE__*/_jsxs(Modal, {
525
+ title: "SN\u53F7\u8BE6\u7EC6\u64CD\u4F5C",
526
+ okText: "\u786E\u5B9A",
527
+ cancelText: "\u53D6\u6D88",
528
+ open: state.visible,
529
+ onCancel: hideModal,
530
+ onOk: handleOk,
531
+ maskClosable: false,
532
+ children: [/*#__PURE__*/_jsx("div", {
533
+ style: {
534
+ marginBottom: 16
535
+ },
536
+ children: /*#__PURE__*/_jsx(BiuAInput, {
537
+ ref: function ref(node) {
538
+ return node === null || node === void 0 ? void 0 : node.focus();
539
+ },
540
+ allowClear: true,
541
+ value: state.scanCode,
542
+ placeholder: "\u626B\u63CF/\u8F93\u5165SN\u53F7\u7801\uFF0C\u6309Enter(\u56DE\u8F66\u952E)\u6DFB\u52A0",
543
+ onChange: function onChange(e) {
544
+ var _e$target5;
545
+ setState({
546
+ scanCode: trim((_e$target5 = e.target) === null || _e$target5 === void 0 ? void 0 : _e$target5.value)
547
+ });
548
+ },
549
+ onPressEnter: function onPressEnter(e) {
550
+ var _e$target6;
551
+ var v = trim((_e$target6 = e.target) === null || _e$target6 === void 0 ? void 0 : _e$target6.value);
552
+ if (v === '') return;
553
+ addSncode(v);
554
+ }
555
+ })
556
+ }), /*#__PURE__*/_jsxs(Form, {
557
+ layout: "inline",
558
+ children: [/*#__PURE__*/_jsx(Form.Item, {
559
+ children: /*#__PURE__*/_jsx(Button, {
560
+ type: "primary",
561
+ onClick: function onClick() {
562
+ exportExcelTemp(exportColumns, 'SN导入模板', 'sort');
563
+ },
564
+ children: "\u5BFC\u51FA\u6A21\u677F"
565
+ })
566
+ }), /*#__PURE__*/_jsx(Form.Item, {
567
+ children: /*#__PURE__*/_jsx(BiuFileInput, {
568
+ accept: ".xls,.xlsx",
569
+ onImportFile: onImportFile
570
+ })
571
+ })]
572
+ }), /*#__PURE__*/_jsx(Table, {
573
+ ref: ref,
574
+ pagination: false,
575
+ scroll: {
576
+ x: true,
577
+ y: 300
578
+ },
579
+ columns: [{
580
+ dataIndex: 'No',
581
+ key: 'No',
582
+ title: '#',
583
+ width: 60
584
+ }, {
585
+ dataIndex: 'sncode',
586
+ key: 'sncode',
587
+ title: /*#__PURE__*/_jsxs("div", {
588
+ children: ["SN\u53F7", /*#__PURE__*/_jsx(BiuAInput, {
589
+ ref: searchRef,
590
+ value: state.searchCode,
591
+ placeholder: "\u952E\u5165SN\u53F7\u8FDB\u884C\u641C\u7D22",
592
+ onChange: function onChange(e) {
593
+ var _e$target7;
594
+ setState({
595
+ searchCode: (_e$target7 = e.target) === null || _e$target7 === void 0 ? void 0 : _e$target7.value
596
+ });
597
+ }
598
+ })]
599
+ }),
600
+ width: 200
601
+ }, {
602
+ title: '操作',
603
+ align: 'center',
604
+ dataIndex: 'oper',
605
+ key: 'oper',
606
+ render: function render(_, record, index) {
607
+ return /*#__PURE__*/_jsx(Button, {
608
+ type: "primary",
609
+ shape: "circle",
610
+ icon: /*#__PURE__*/_jsx(MinusOutlined, {}),
611
+ onClick: function onClick() {
612
+ handleRemoveRow(record, index);
613
+ }
614
+ });
615
+ },
616
+ width: 80
617
+ }],
618
+ dataSource: state.filterData
619
+ }, "sncode")]
620
+ })]
621
+ })
622
+ });
623
+ }));
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import type { BiuColumnType } from "../../..";
3
+ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<import("antd/es/table").TableProps<any> & import("antd").SelectProps<any, import("antd/lib/select").DefaultOptionType> & {
4
+ columns?: BiuColumnType[] | undefined;
5
+ bindField?: {
6
+ rowKey?: string | undefined;
7
+ rowLabel?: string | undefined;
8
+ } | undefined;
9
+ value?: string | undefined;
10
+ initialValue?: any;
11
+ initSelectValue?: any;
12
+ onChangeData?: ((value: any, record: any) => void) | undefined;
13
+ } & {
14
+ clientid?: string | undefined;
15
+ initialValue?: number | undefined;
16
+ searchTimes?: number | undefined;
17
+ rowLabel?: string | undefined;
18
+ addresstype?: "1" | "2" | undefined;
19
+ clientidNull?: string | undefined;
20
+ addresstypeStr?: string | undefined;
21
+ addressAttrStr?: string | undefined;
22
+ requestParams?: ((params: any) => any) | undefined;
23
+ } & React.RefAttributes<unknown>>>;
24
+ export default _default;