wt-enjoy-link-antd-repack 4.1.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (286) hide show
  1. package/README.md +26 -0
  2. package/dist/esm/assets/location.png +0 -0
  3. package/dist/esm/component/BiuAButton/index.d.ts +18 -0
  4. package/dist/esm/component/BiuAButton/index.js +8 -0
  5. package/dist/esm/component/BiuACard/index.d.ts +2 -0
  6. package/dist/esm/component/BiuACard/index.js +9 -0
  7. package/dist/esm/component/BiuACascader/index.d.ts +10 -0
  8. package/dist/esm/component/BiuACascader/index.js +8 -0
  9. package/dist/esm/component/BiuADatePicker/index.d.ts +19 -0
  10. package/dist/esm/component/BiuADatePicker/index.js +18 -0
  11. package/dist/esm/component/BiuAForm/index.d.ts +7 -0
  12. package/dist/esm/component/BiuAForm/index.js +10 -0
  13. package/dist/esm/component/BiuAInput/index.d.ts +14 -0
  14. package/dist/esm/component/BiuAInput/index.js +32 -0
  15. package/dist/esm/component/BiuASelect/index.d.ts +6 -0
  16. package/dist/esm/component/BiuASelect/index.js +14 -0
  17. package/dist/esm/component/BiuASwitch/index.d.ts +2 -0
  18. package/dist/esm/component/BiuASwitch/index.js +9 -0
  19. package/dist/esm/component/BiuATimePicker/index.d.ts +4 -0
  20. package/dist/esm/component/BiuATimePicker/index.js +8 -0
  21. package/dist/esm/component/BiuATreeSelect/index.d.ts +2 -0
  22. package/dist/esm/component/BiuATreeSelect/index.js +8 -0
  23. package/dist/esm/component/BiuBar/index.d.ts +13 -0
  24. package/dist/esm/component/BiuBar/index.js +42 -0
  25. package/dist/esm/component/BiuComSelect/index.d.ts +24 -0
  26. package/dist/esm/component/BiuComSelect/index.js +104 -0
  27. package/dist/esm/component/BiuCue/index.d.ts +18 -0
  28. package/dist/esm/component/BiuCue/index.js +44 -0
  29. package/dist/esm/component/BiuCustomSelect/index.d.ts +19 -0
  30. package/dist/esm/component/BiuCustomSelect/index.js +153 -0
  31. package/dist/esm/component/BiuCustomTable/index.d.ts +14 -0
  32. package/dist/esm/component/BiuCustomTable/index.js +76 -0
  33. package/dist/esm/component/BiuCustomerOperCard/component/editTable.d.ts +8 -0
  34. package/dist/esm/component/BiuCustomerOperCard/component/editTable.js +264 -0
  35. package/dist/esm/component/BiuCustomerOperCard/component/index.d.ts +1 -0
  36. package/dist/esm/component/BiuCustomerOperCard/component/index.js +1 -0
  37. package/dist/esm/component/BiuCustomerOperCard/index.d.ts +20 -0
  38. package/dist/esm/component/BiuCustomerOperCard/index.js +56 -0
  39. package/dist/esm/component/BiuCustomerOperCard/type.d.ts +117 -0
  40. package/dist/esm/component/BiuCustomerOperCard/type.js +1 -0
  41. package/dist/esm/component/BiuCustomerOperCard/utils.d.ts +48 -0
  42. package/dist/esm/component/BiuCustomerOperCard/utils.js +236 -0
  43. package/dist/esm/component/BiuDescriptions/index.d.ts +9 -0
  44. package/dist/esm/component/BiuDescriptions/index.js +39 -0
  45. package/dist/esm/component/BiuDetailDrawer/index.d.ts +15 -0
  46. package/dist/esm/component/BiuDetailDrawer/index.js +54 -0
  47. package/dist/esm/component/BiuDivider/index.d.ts +4 -0
  48. package/dist/esm/component/BiuDivider/index.js +29 -0
  49. package/dist/esm/component/BiuField/component/AddressTableSelect.d.ts +3 -0
  50. package/dist/esm/component/BiuField/component/AddressTableSelect.js +150 -0
  51. package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/index.d.ts +3 -0
  52. package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/index.js +3 -0
  53. package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useConvertSubValue.d.ts +2 -0
  54. package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useConvertSubValue.js +49 -0
  55. package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useConvertUnSubValue.d.ts +2 -0
  56. package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useConvertUnSubValue.js +98 -0
  57. package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useInConvertUnSubValue.d.ts +5 -0
  58. package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useInConvertUnSubValue.js +82 -0
  59. package/dist/esm/component/BiuField/component/DepartOrgSelect/index.d.ts +14 -0
  60. package/dist/esm/component/BiuField/component/DepartOrgSelect/index.js +393 -0
  61. package/dist/esm/component/BiuField/component/DepartOrgSelect/type.d.ts +123 -0
  62. package/dist/esm/component/BiuField/component/DepartOrgSelect/type.js +1 -0
  63. package/dist/esm/component/BiuField/component/DepartOrgSelect/utils.d.ts +5 -0
  64. package/dist/esm/component/BiuField/component/DepartOrgSelect/utils.js +59 -0
  65. package/dist/esm/component/BiuField/component/OMSSystem/cityAreaSelect.d.ts +12 -0
  66. package/dist/esm/component/BiuField/component/OMSSystem/cityAreaSelect.js +130 -0
  67. package/dist/esm/component/BiuField/component/OMSSystem/warehouseSel.d.ts +7 -0
  68. package/dist/esm/component/BiuField/component/OMSSystem/warehouseSel.js +80 -0
  69. package/dist/esm/component/BiuField/component/SNInput.d.ts +13 -0
  70. package/dist/esm/component/BiuField/component/SNInput.js +622 -0
  71. package/dist/esm/component/BiuField/component/TableSelectLocal/addressSelect.d.ts +23 -0
  72. package/dist/esm/component/BiuField/component/TableSelectLocal/addressSelect.js +187 -0
  73. package/dist/esm/component/BiuField/component/TableSelectLocal/base.d.ts +13 -0
  74. package/dist/esm/component/BiuField/component/TableSelectLocal/base.js +153 -0
  75. package/dist/esm/component/BiuField/component/TableSelectLocal/goodSelect.d.ts +21 -0
  76. package/dist/esm/component/BiuField/component/TableSelectLocal/goodSelect.js +238 -0
  77. package/dist/esm/component/BiuField/component/TableSelectLocal/index.d.ts +3 -0
  78. package/dist/esm/component/BiuField/component/TableSelectLocal/index.js +66 -0
  79. package/dist/esm/component/BiuField/component/TableSelectLocal/interface.d.ts +16 -0
  80. package/dist/esm/component/BiuField/component/TableSelectLocal/interface.js +1 -0
  81. package/dist/esm/component/BiuField/component/TableSelectLocal/locationSelect.d.ts +24 -0
  82. package/dist/esm/component/BiuField/component/TableSelectLocal/locationSelect.js +164 -0
  83. package/dist/esm/component/BiuField/component/TableSelectLocal/package.d.ts +3 -0
  84. package/dist/esm/component/BiuField/component/TableSelectLocal/package.js +149 -0
  85. package/dist/esm/component/BiuField/component/TableSelectLocal/supplierSelect.d.ts +18 -0
  86. package/dist/esm/component/BiuField/component/TableSelectLocal/supplierSelect.js +145 -0
  87. package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseAreaSelect.d.ts +3 -0
  88. package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseAreaSelect.js +113 -0
  89. package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseInfoSelects.d.ts +18 -0
  90. package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseInfoSelects.js +100 -0
  91. package/dist/esm/component/BiuField/component/appliedgoodsTypeSelect.d.ts +9 -0
  92. package/dist/esm/component/BiuField/component/appliedgoodsTypeSelect.js +75 -0
  93. package/dist/esm/component/BiuField/component/autoComplete.d.ts +8 -0
  94. package/dist/esm/component/BiuField/component/autoComplete.js +82 -0
  95. package/dist/esm/component/BiuField/component/boxTypeSelect.d.ts +11 -0
  96. package/dist/esm/component/BiuField/component/boxTypeSelect.js +139 -0
  97. package/dist/esm/component/BiuField/component/businessdistrictselect.d.ts +55 -0
  98. package/dist/esm/component/BiuField/component/businessdistrictselect.js +414 -0
  99. package/dist/esm/component/BiuField/component/carrierInfoSelect.d.ts +13 -0
  100. package/dist/esm/component/BiuField/component/carrierInfoSelect.js +145 -0
  101. package/dist/esm/component/BiuField/component/channelSelect.d.ts +8 -0
  102. package/dist/esm/component/BiuField/component/channelSelect.js +94 -0
  103. package/dist/esm/component/BiuField/component/cityAreaCascader.d.ts +11 -0
  104. package/dist/esm/component/BiuField/component/cityAreaCascader.js +86 -0
  105. package/dist/esm/component/BiuField/component/clientInfoTableSelect.d.ts +3 -0
  106. package/dist/esm/component/BiuField/component/clientInfoTableSelect.js +175 -0
  107. package/dist/esm/component/BiuField/component/customMenu.d.ts +3 -0
  108. package/dist/esm/component/BiuField/component/customMenu.js +110 -0
  109. package/dist/esm/component/BiuField/component/databaseSelect.d.ts +6 -0
  110. package/dist/esm/component/BiuField/component/databaseSelect.js +42 -0
  111. package/dist/esm/component/BiuField/component/departmentTreeSelect.d.ts +3 -0
  112. package/dist/esm/component/BiuField/component/departmentTreeSelect.js +107 -0
  113. package/dist/esm/component/BiuField/component/dicNameSelect.d.ts +12 -0
  114. package/dist/esm/component/BiuField/component/dicNameSelect.js +53 -0
  115. package/dist/esm/component/BiuField/component/dicTypeSelect.d.ts +41 -0
  116. package/dist/esm/component/BiuField/component/dicTypeSelect.js +84 -0
  117. package/dist/esm/component/BiuField/component/dockingPartySelect.d.ts +8 -0
  118. package/dist/esm/component/BiuField/component/dockingPartySelect.js +63 -0
  119. package/dist/esm/component/BiuField/component/editLocationSelect.d.ts +18 -0
  120. package/dist/esm/component/BiuField/component/editLocationSelect.js +119 -0
  121. package/dist/esm/component/BiuField/component/electronicFaceSheet/accountSelect.d.ts +3 -0
  122. package/dist/esm/component/BiuField/component/electronicFaceSheet/accountSelect.js +36 -0
  123. package/dist/esm/component/BiuField/component/electronicFaceSheet/addresSelect.d.ts +14 -0
  124. package/dist/esm/component/BiuField/component/electronicFaceSheet/addresSelect.js +97 -0
  125. package/dist/esm/component/BiuField/component/electronicFaceSheet/platformSelect.d.ts +7 -0
  126. package/dist/esm/component/BiuField/component/electronicFaceSheet/platformSelect.js +73 -0
  127. package/dist/esm/component/BiuField/component/goodsTypeSelect.d.ts +10 -0
  128. package/dist/esm/component/BiuField/component/goodsTypeSelect.js +92 -0
  129. package/dist/esm/component/BiuField/component/index.d.ts +37 -0
  130. package/dist/esm/component/BiuField/component/index.js +37 -0
  131. package/dist/esm/component/BiuField/component/interfaceNameSelect.d.ts +9 -0
  132. package/dist/esm/component/BiuField/component/interfaceNameSelect.js +65 -0
  133. package/dist/esm/component/BiuField/component/lpnSelect.d.ts +3 -0
  134. package/dist/esm/component/BiuField/component/lpnSelect.js +88 -0
  135. package/dist/esm/component/BiuField/component/orderTypeSelect.d.ts +15 -0
  136. package/dist/esm/component/BiuField/component/orderTypeSelect.js +79 -0
  137. package/dist/esm/component/BiuField/component/orderTypeTableSelect.d.ts +3 -0
  138. package/dist/esm/component/BiuField/component/orderTypeTableSelect.js +45 -0
  139. package/dist/esm/component/BiuField/component/parkSelect.d.ts +12 -0
  140. package/dist/esm/component/BiuField/component/parkSelect.js +88 -0
  141. package/dist/esm/component/BiuField/component/personnelinfoselect.d.ts +57 -0
  142. package/dist/esm/component/BiuField/component/personnelinfoselect.js +431 -0
  143. package/dist/esm/component/BiuField/component/propertNameSelect.d.ts +9 -0
  144. package/dist/esm/component/BiuField/component/propertNameSelect.js +114 -0
  145. package/dist/esm/component/BiuField/component/shipperTableSelect.d.ts +3 -0
  146. package/dist/esm/component/BiuField/component/shipperTableSelect.js +94 -0
  147. package/dist/esm/component/BiuField/component/userSelect.d.ts +8 -0
  148. package/dist/esm/component/BiuField/component/userSelect.js +163 -0
  149. package/dist/esm/component/BiuField/component/warehouseAreaSelect.d.ts +9 -0
  150. package/dist/esm/component/BiuField/component/warehouseAreaSelect.js +103 -0
  151. package/dist/esm/component/BiuField/component/warehouseInfoSelect.d.ts +13 -0
  152. package/dist/esm/component/BiuField/component/warehouseInfoSelect.js +92 -0
  153. package/dist/esm/component/BiuField/component/warehouseLoctionSelect.d.ts +14 -0
  154. package/dist/esm/component/BiuField/component/warehouseLoctionSelect.js +124 -0
  155. package/dist/esm/component/BiuField/index.d.ts +8 -0
  156. package/dist/esm/component/BiuField/index.js +607 -0
  157. package/dist/esm/component/BiuFileInput/index.d.ts +11 -0
  158. package/dist/esm/component/BiuFileInput/index.js +53 -0
  159. package/dist/esm/component/BiuForm/index.d.ts +12 -0
  160. package/dist/esm/component/BiuForm/index.js +241 -0
  161. package/dist/esm/component/BiuForm/type.d.ts +45 -0
  162. package/dist/esm/component/BiuForm/type.js +1 -0
  163. package/dist/esm/component/BiuForm/utils.d.ts +2 -0
  164. package/dist/esm/component/BiuForm/utils.js +46 -0
  165. package/dist/esm/component/BiuIcon/index.d.ts +3 -0
  166. package/dist/esm/component/BiuIcon/index.js +15 -0
  167. package/dist/esm/component/BiuMapSelectSite/index.d.ts +48 -0
  168. package/dist/esm/component/BiuMapSelectSite/index.js +453 -0
  169. package/dist/esm/component/BiuModal/index.d.ts +24 -0
  170. package/dist/esm/component/BiuModal/index.js +239 -0
  171. package/dist/esm/component/BiuOperForm/index.d.ts +15 -0
  172. package/dist/esm/component/BiuOperForm/index.js +375 -0
  173. package/dist/esm/component/BiuOperForm/type.d.ts +23 -0
  174. package/dist/esm/component/BiuOperForm/type.js +1 -0
  175. package/dist/esm/component/BiuOperTable/index.d.ts +15 -0
  176. package/dist/esm/component/BiuOperTable/index.js +349 -0
  177. package/dist/esm/component/BiuOperTable/type.d.ts +142 -0
  178. package/dist/esm/component/BiuOperTable/type.js +1 -0
  179. package/dist/esm/component/BiuOperTable/utils.d.ts +6 -0
  180. package/dist/esm/component/BiuOperTable/utils.js +13 -0
  181. package/dist/esm/component/BiuPagination/index.d.ts +14 -0
  182. package/dist/esm/component/BiuPagination/index.js +34 -0
  183. package/dist/esm/component/BiuResizeTable/component/biuTableCell.d.ts +1 -0
  184. package/dist/esm/component/BiuResizeTable/component/biuTableCell.js +74 -0
  185. package/dist/esm/component/BiuResizeTable/component/index.d.ts +1 -0
  186. package/dist/esm/component/BiuResizeTable/component/index.js +1 -0
  187. package/dist/esm/component/BiuResizeTable/index.d.ts +2 -0
  188. package/dist/esm/component/BiuResizeTable/index.js +71 -0
  189. package/dist/esm/component/BiuResizeTable/index.less +19 -0
  190. package/dist/esm/component/BiuSplit/index.d.ts +32 -0
  191. package/dist/esm/component/BiuSplit/index.js +57 -0
  192. package/dist/esm/component/BiuTable/component/index.d.ts +3 -0
  193. package/dist/esm/component/BiuTable/component/index.js +3 -0
  194. package/dist/esm/component/BiuTable/component/tableActionBarRender.d.ts +9 -0
  195. package/dist/esm/component/BiuTable/component/tableActionBarRender.js +88 -0
  196. package/dist/esm/component/BiuTable/component/tableCellRender.d.ts +14 -0
  197. package/dist/esm/component/BiuTable/component/tableCellRender.js +108 -0
  198. package/dist/esm/component/BiuTable/component/tableSettingRender.d.ts +2 -0
  199. package/dist/esm/component/BiuTable/component/tableSettingRender.js +345 -0
  200. package/dist/esm/component/BiuTable/context.d.ts +2 -0
  201. package/dist/esm/component/BiuTable/context.js +2 -0
  202. package/dist/esm/component/BiuTable/hooks/index.d.ts +1 -0
  203. package/dist/esm/component/BiuTable/hooks/index.js +1 -0
  204. package/dist/esm/component/BiuTable/hooks/useFetchData.d.ts +4 -0
  205. package/dist/esm/component/BiuTable/hooks/useFetchData.js +64 -0
  206. package/dist/esm/component/BiuTable/index.d.ts +42 -0
  207. package/dist/esm/component/BiuTable/index.js +484 -0
  208. package/dist/esm/component/BiuTable/type.d.ts +168 -0
  209. package/dist/esm/component/BiuTable/type.js +1 -0
  210. package/dist/esm/component/BiuTable/utils.d.ts +10 -0
  211. package/dist/esm/component/BiuTable/utils.js +117 -0
  212. package/dist/esm/component/BiuTableLink/index.d.ts +11 -0
  213. package/dist/esm/component/BiuTableLink/index.js +54 -0
  214. package/dist/esm/component/BiuTableSelect/index.d.ts +49 -0
  215. package/dist/esm/component/BiuTableSelect/index.js +209 -0
  216. package/dist/esm/component/BiuTabs/index.d.ts +4 -0
  217. package/dist/esm/component/BiuTabs/index.js +18 -0
  218. package/dist/esm/component/BiuVirtualTable/index.d.ts +21 -0
  219. package/dist/esm/component/BiuVirtualTable/index.js +161 -0
  220. package/dist/esm/component/index.d.ts +35 -0
  221. package/dist/esm/component/index.js +35 -0
  222. package/dist/esm/constant/Cache_Key.d.ts +28 -0
  223. package/dist/esm/constant/Cache_Key.js +28 -0
  224. package/dist/esm/constant/DateTime.d.ts +12 -0
  225. package/dist/esm/constant/DateTime.js +15 -0
  226. package/dist/esm/constant/External.d.ts +64 -0
  227. package/dist/esm/constant/External.js +260 -0
  228. package/dist/esm/constant/Gateway_Path.d.ts +5 -0
  229. package/dist/esm/constant/Gateway_Path.js +5 -0
  230. package/dist/esm/constant/Layout.d.ts +210 -0
  231. package/dist/esm/constant/Layout.js +215 -0
  232. package/dist/esm/constant/Regexp.d.ts +109 -0
  233. package/dist/esm/constant/Regexp.js +130 -0
  234. package/dist/esm/constant/index.d.ts +6 -0
  235. package/dist/esm/constant/index.js +6 -0
  236. package/dist/esm/hooks/index.d.ts +6 -0
  237. package/dist/esm/hooks/index.js +6 -0
  238. package/dist/esm/hooks/useAuth.d.ts +4 -0
  239. package/dist/esm/hooks/useAuth.js +22 -0
  240. package/dist/esm/hooks/useCurrentSystem.d.ts +6 -0
  241. package/dist/esm/hooks/useCurrentSystem.js +15 -0
  242. package/dist/esm/hooks/useLayoutInfo.d.ts +10 -0
  243. package/dist/esm/hooks/useLayoutInfo.js +14 -0
  244. package/dist/esm/hooks/useReducerState.d.ts +16 -0
  245. package/dist/esm/hooks/useReducerState.js +43 -0
  246. package/dist/esm/hooks/useUserInfo.d.ts +4 -0
  247. package/dist/esm/hooks/useUserInfo.js +15 -0
  248. package/dist/esm/hooks/useWareInfo.d.ts +4 -0
  249. package/dist/esm/hooks/useWareInfo.js +15 -0
  250. package/dist/esm/index.d.ts +5 -0
  251. package/dist/esm/index.js +5 -0
  252. package/dist/esm/package/index.d.ts +1 -0
  253. package/dist/esm/package/index.js +1 -0
  254. package/dist/esm/package/requestWrapper/baseRequest.d.ts +3 -0
  255. package/dist/esm/package/requestWrapper/baseRequest.js +47 -0
  256. package/dist/esm/package/requestWrapper/index.d.ts +4 -0
  257. package/dist/esm/package/requestWrapper/index.js +402 -0
  258. package/dist/esm/package/requestWrapper/type.d.ts +36 -0
  259. package/dist/esm/package/requestWrapper/type.js +1 -0
  260. package/dist/esm/package/requestWrapper/utils.d.ts +10 -0
  261. package/dist/esm/package/requestWrapper/utils.js +35 -0
  262. package/dist/esm/utils/authUtils.d.ts +18 -0
  263. package/dist/esm/utils/authUtils.js +36 -0
  264. package/dist/esm/utils/cacheUtils.d.ts +4 -0
  265. package/dist/esm/utils/cacheUtils.js +24 -0
  266. package/dist/esm/utils/chainUtils.d.ts +26 -0
  267. package/dist/esm/utils/chainUtils.js +54 -0
  268. package/dist/esm/utils/dateUtils.d.ts +23 -0
  269. package/dist/esm/utils/dateUtils.js +55 -0
  270. package/dist/esm/utils/decimalUtils.d.ts +5 -0
  271. package/dist/esm/utils/decimalUtils.js +7 -0
  272. package/dist/esm/utils/excelUtils.d.ts +22 -0
  273. package/dist/esm/utils/excelUtils.js +153 -0
  274. package/dist/esm/utils/index.d.ts +11 -0
  275. package/dist/esm/utils/index.js +11 -0
  276. package/dist/esm/utils/layoutUtils.d.ts +1 -0
  277. package/dist/esm/utils/layoutUtils.js +13 -0
  278. package/dist/esm/utils/objectUtils.d.ts +1 -0
  279. package/dist/esm/utils/objectUtils.js +3 -0
  280. package/dist/esm/utils/soundUtils.d.ts +5 -0
  281. package/dist/esm/utils/soundUtils.js +29 -0
  282. package/dist/esm/utils/stringUtils.d.ts +24 -0
  283. package/dist/esm/utils/stringUtils.js +39 -0
  284. package/dist/esm/utils/sysUtils.d.ts +4 -0
  285. package/dist/esm/utils/sysUtils.js +4 -0
  286. package/package.json +59 -0
@@ -0,0 +1,431 @@
1
+ var _excluded = ["requestName", "requestParams", "requestConfig", "value", "filterFun", "responseFun", "formatValue", "optionLabel", "optionValue", "optionList", "placeholder", "allowClear", "showSearch", "optionFilterProp", "valueKey", "defaultLabel", "onChange", "onChangeData"];
2
+ 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; }
3
+ 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; }
4
+ 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; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ 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); }
7
+ 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); }
8
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
+ 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."); }
10
+ 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); }
11
+ 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; }
12
+ 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; } }
13
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
+ 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; }
15
+ 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; }
16
+ import { useBoolean } from 'ahooks';
17
+ import { debounce } from 'lodash';
18
+ import React, { forwardRef, useCallback, useEffect, useRef, useState } from 'react';
19
+ import { styled } from 'styled-components';
20
+ import { BiuASelect, BiuASelectOption } from "../..";
21
+ import { GATEWAY_ROUTE_MDM } from "../../../constant";
22
+ import { request } from "../../../package";
23
+
24
+ // value的类型
25
+
26
+ /**
27
+ * 下拉框props
28
+ * @param requestName 请求接口名字
29
+ * @param requestParams 请求接口参数, 约束为对象
30
+ * @param value 选中值
31
+ * @param filterFun 过滤函数,可通过此参数控制显示的选项, 参数为接口的返回值
32
+ * @param responseFun 接口请求完成后调用函数, (接口返回值, 过滤后的结果, 最终select选项) => void
33
+ * @param formatValue 格式化value函数,通常用来转换value类型确保选中
34
+ * @param optionLabel 接口响应结果绑定到Select.Option的显示值, 当传入optionList时此字段无效
35
+ * @param optionValue 接口响应结果绑定到Select.Option的value值, 当传入optionList时此字段无效
36
+ * @param optionList 自定义下拉项,通常用于接口格式不规范
37
+ * @param onChange change事件
38
+ */
39
+ import { jsx as _jsx } from "react/jsx-runtime";
40
+ import { jsxs as _jsxs } from "react/jsx-runtime";
41
+ var StyledWrapper = styled.div.withConfig({
42
+ displayName: "StyledWrapper",
43
+ componentId: "enjoy-link-antd-repack__sc-z7klyb-0"
44
+ })([".ant-select{.ant-select-selector{.ant-select-selection-overflow{flex-wrap:nowrap !important;overflow:hidden !important;}.ant-select-selection-search{width:100% !important;}.ant-select-selection-search-input{width:100% !important;opacity:1 !important;input{opacity:1 !important;}}}}.ant-select-selection-overflow-item{display:none;flex:1;}.ant-select-selection-overflow-item.ant-select-selection-overflow-item-suffix{display:block;}"]);
45
+ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props, ref) {
46
+ var requestName = props.requestName,
47
+ requestParams = props.requestParams,
48
+ requestConfig = props.requestConfig,
49
+ value = props.value,
50
+ filterFun = props.filterFun,
51
+ responseFun = props.responseFun,
52
+ formatValue = props.formatValue,
53
+ _props$optionLabel = props.optionLabel,
54
+ optionLabel = _props$optionLabel === void 0 ? 'employeeName' : _props$optionLabel,
55
+ _props$optionValue = props.optionValue,
56
+ optionValue = _props$optionValue === void 0 ? 'employeeCode' : _props$optionValue,
57
+ optionList = props.optionList,
58
+ _props$placeholder = props.placeholder,
59
+ placeholder = _props$placeholder === void 0 ? '请选择' : _props$placeholder,
60
+ _props$allowClear = props.allowClear,
61
+ allowClear = _props$allowClear === void 0 ? true : _props$allowClear,
62
+ _props$showSearch = props.showSearch,
63
+ showSearch = _props$showSearch === void 0 ? true : _props$showSearch,
64
+ _props$optionFilterPr = props.optionFilterProp,
65
+ optionFilterProp = _props$optionFilterPr === void 0 ? 'children' : _props$optionFilterPr,
66
+ _props$valueKey = props.valueKey,
67
+ valueKey = _props$valueKey === void 0 ? 'employeeCode' : _props$valueKey,
68
+ defaultLabel = props.defaultLabel,
69
+ onChange = props.onChange,
70
+ onChangeData = props.onChangeData,
71
+ restProps = _objectWithoutProperties(props, _excluded);
72
+ var multiple = (props === null || props === void 0 ? void 0 : props.mode) === 'multiple';
73
+ /** 生成唯一id */
74
+ var id = useRef("user-select-".concat(Math.random().toString(36).substring(2, 9)));
75
+ // select的加载状态
76
+ var _useBoolean = useBoolean(false),
77
+ _useBoolean2 = _slicedToArray(_useBoolean, 2),
78
+ loading = _useBoolean2[0],
79
+ _useBoolean2$ = _useBoolean2[1],
80
+ setTrue = _useBoolean2$.setTrue,
81
+ setFalse = _useBoolean2$.setFalse;
82
+ var _useState = useState(''),
83
+ _useState2 = _slicedToArray(_useState, 2),
84
+ inputValue = _useState2[0],
85
+ setInputValue = _useState2[1];
86
+ var _useState3 = useState(1),
87
+ _useState4 = _slicedToArray(_useState3, 2),
88
+ refreshInputValueKey = _useState4[0],
89
+ setInputValueKey = _useState4[1];
90
+
91
+ // 菜单展示项
92
+ var _useState5 = useState([]),
93
+ _useState6 = _slicedToArray(_useState5, 2),
94
+ options = _useState6[0],
95
+ setOptions = _useState6[1];
96
+
97
+ // select的命中值
98
+ var defaultValue = value ? value : multiple ? [] : undefined;
99
+ var _useState7 = useState(defaultValue),
100
+ _useState8 = _slicedToArray(_useState7, 2),
101
+ customValue = _useState8[0],
102
+ _setCustomValue = _useState8[1];
103
+ var setCustomValue = useCallback(function (setValue) {
104
+ // 改变外部的值
105
+ if (onChangeData) onChangeData(setValue);
106
+ _setCustomValue(setValue);
107
+ }, [onChangeData]);
108
+ useEffect(function () {
109
+ var modelValue = value;
110
+ if (multiple) {
111
+ if (typeof modelValue === 'string') {
112
+ setCustomValue(modelValue ? modelValue.split(',').map(Number) : []);
113
+ } else if (typeof modelValue === 'number') {
114
+ setCustomValue([modelValue]);
115
+ return;
116
+ } else setCustomValue(modelValue || []);
117
+ }
118
+ setCustomValue(modelValue);
119
+ return;
120
+ }, [multiple, setCustomValue, value]);
121
+ var refreshInputValue = function refreshInputValue(val) {
122
+ setCustomValue(val);
123
+ if (!multiple) {
124
+ var _options$find;
125
+ var _str = ((_options$find = options.find(function (i) {
126
+ return i[valueKey] === val;
127
+ })) === null || _options$find === void 0 ? void 0 : _options$find.employeeName) || '';
128
+ // 强制输入框内容为选中的内容
129
+ setInputValue(_str);
130
+ var _inputDom = document.querySelector("#".concat(id.current, " .ant-select-selection-search-input"));
131
+ _inputDom === null || _inputDom === void 0 || _inputDom.setAttribute('placeholder', _str);
132
+ return;
133
+ }
134
+ var str = val.filter(function (item) {
135
+ return item;
136
+ }).reduce(function (currentStr, item) {
137
+ var _options$find2;
138
+ var employeeName = (_options$find2 = options.find(function (i) {
139
+ return i[valueKey] === item;
140
+ })) === null || _options$find2 === void 0 ? void 0 : _options$find2.employeeName;
141
+ if (employeeName) {
142
+ return "".concat(currentStr, ",").concat(employeeName);
143
+ } else {
144
+ return "".concat(currentStr, ",\u3010").concat(item, "\u3011");
145
+ }
146
+ }, '');
147
+
148
+ // 强制输入框内容为选中的内容
149
+ setInputValue(str.slice(1));
150
+ var inputDom = document.querySelector("#".concat(id.current, " .ant-select-selection-search-input"));
151
+ inputDom === null || inputDom === void 0 || inputDom.setAttribute('placeholder', str.slice(1));
152
+ };
153
+ /**
154
+ * 选中改变事件
155
+ */
156
+ var change = function change(val) {
157
+ setCustomValue(val);
158
+ refreshInputValue(val);
159
+ if (!multiple) {
160
+ if (onChange) onChange(val, options);
161
+ return;
162
+ }
163
+ if (onChange) onChange(val, options);
164
+ };
165
+
166
+ // 接口请求数据
167
+ var handleSearch = useCallback(function (keyword) {
168
+ var params = {
169
+ page: 1,
170
+ size: 10,
171
+ employeeName: keyword
172
+ };
173
+ if (valueKey === 'id') {
174
+ if (multiple) {
175
+ params.ids = customValue.join(',');
176
+ } else {
177
+ params.ids = customValue;
178
+ }
179
+ } else if (valueKey === 'employeeCode') {
180
+ if (multiple) {
181
+ params.employeeCodes = customValue.join(',');
182
+ } else {
183
+ params.employeeCodes = customValue;
184
+ }
185
+ }
186
+ setTrue();
187
+ var employeeCodes = undefined;
188
+ if (_typeof(value) === 'object' && Array.isArray(value)) {
189
+ // 数据是数组
190
+ employeeCodes = value;
191
+ } else if (typeof value === 'string') {
192
+ // 数据是字符串
193
+ employeeCodes = value.split(',');
194
+ }
195
+ return request({
196
+ apiName: 'wms.mdm.user.spinnerQuery',
197
+ data: _objectSpread(_objectSpread({
198
+ page: 1,
199
+ size: 50,
200
+ employeeCodes: employeeCodes
201
+ }, requestParams), params),
202
+ requestConfig: {
203
+ GatewayRoute: GATEWAY_ROUTE_MDM
204
+ }
205
+ }).then(function (res) {
206
+ var filterRes = res.rows;
207
+ // 数据过滤
208
+ if (filterFun) {
209
+ filterRes = filterFun(res);
210
+ }
211
+
212
+ // 将结果转化为 select 需要的格式
213
+ var list;
214
+ if (optionList) {
215
+ list = optionList(filterRes); // 这里传入过滤之后的结果
216
+ } else {
217
+ list = filterRes.map(function (item) {
218
+ return _objectSpread({
219
+ label: item[optionLabel],
220
+ value: item[optionValue]
221
+ }, item);
222
+ });
223
+ }
224
+ // 执行接口请求完成的回调
225
+ if (responseFun) responseFun(res, filterRes, list);
226
+ setOptions(list);
227
+ setFalse();
228
+ }).catch(function () {
229
+ setFalse();
230
+ });
231
+ }, [customValue, filterFun, multiple, optionLabel, optionList, optionValue, requestParams, responseFun, setFalse, setTrue, value, valueKey]);
232
+ useEffect(function () {
233
+ refreshInputValue(customValue);
234
+ }, [refreshInputValueKey]);
235
+
236
+ // 格式化命中值
237
+ useEffect(function () {
238
+ var label = defaultLabel;
239
+ var labelstr = Array.isArray(label) ? label.join(',') : label;
240
+ /**
241
+ * 校验customValue是不是在options全部存在,如果全部存在则不自动生成options
242
+ */
243
+ if (options !== null && options !== void 0 && options.length && labelstr) {
244
+ var labelArr = labelstr.split(',');
245
+ var existentArr = labelArr.filter(function (str) {
246
+ return options.find(function (item) {
247
+ return item.employeeName === str;
248
+ });
249
+ });
250
+ if (labelArr.length === existentArr.length) return;
251
+ }
252
+ /**
253
+ * 数据初始化显示,支持传入label进入,初始化的时候不用调用接口
254
+ * 自己生成一个options,这样使组件显示正常
255
+ */
256
+ if (multiple && labelstr) {
257
+ var _labelArr = labelstr.split(',');
258
+ setInputValue(labelstr);
259
+ if (valueKey === 'id') {
260
+ var fleetingOptions = customValue.map(function (item, index) {
261
+ return {
262
+ id: item,
263
+ employeeCode: 0,
264
+ employeeName: _labelArr[index] || String(item),
265
+ postName: '',
266
+ companyName: ''
267
+ };
268
+ });
269
+ setOptions(fleetingOptions);
270
+ } else {
271
+ var _fleetingOptions = customValue.map(function (item, index) {
272
+ return {
273
+ id: 0,
274
+ employeeCode: item,
275
+ employeeName: _labelArr[index] || String(item),
276
+ postName: '',
277
+ companyName: ''
278
+ };
279
+ });
280
+ setOptions(_fleetingOptions);
281
+ }
282
+ } else if (labelstr) {
283
+ setInputValue(labelstr);
284
+ if (valueKey === 'id') {
285
+ var _fleetingOptions2 = [{
286
+ id: customValue,
287
+ employeeCode: 0,
288
+ employeeName: labelstr,
289
+ postName: '',
290
+ companyName: ''
291
+ }];
292
+ setOptions(_fleetingOptions2);
293
+ } else {
294
+ var _fleetingOptions3 = [{
295
+ id: 0,
296
+ employeeCode: customValue,
297
+ employeeName: labelstr,
298
+ postName: '',
299
+ companyName: ''
300
+ }];
301
+ setOptions(_fleetingOptions3);
302
+ }
303
+ } else if (multiple && multiple && customValue.length || !multiple && customValue) {
304
+ // eslint-disable-next-line no-console
305
+ console.warn("\u7EC4\u4EF6\u521D\u59CB\u5316\u65F6\u6709\u503C\uFF0C\u4F46\u662F\u6CA1\u6709\u4F20\u5165defaultLabel\uFF0C\u8BF7\u4F18\u5316\uFF0C\u7EC4\u4EF6\uFF1AUserSelect\uFF0C\u5F53\u524Dvalue: ".concat(customValue));
306
+ handleSearch('').then(function () {
307
+ setInputValueKey(function (v) {
308
+ return v + 1;
309
+ });
310
+ });
311
+ }
312
+ if (labelstr) {
313
+ setTimeout(function () {
314
+ var inputDom = document.querySelector("#".concat(id.current, " .ant-select-selection-search-input"));
315
+ if (inputDom) {
316
+ inputDom.value = labelstr;
317
+ }
318
+ var spanDom = document.querySelector("#".concat(id.current, " .ant-select-selection-item"));
319
+ if (spanDom) {
320
+ spanDom.innerHTML = labelstr;
321
+ }
322
+ }, 0);
323
+ }
324
+ }, [defaultLabel]);
325
+
326
+ /**
327
+ * 聚焦事件
328
+ * 1、查询数据
329
+ * 2、聚焦时将输入框的value改成placeholder
330
+ */
331
+ var focus = useCallback(function () {
332
+ // 查询数据
333
+ handleSearch('');
334
+ if (!inputValue) {
335
+ return;
336
+ }
337
+ var inputDom = document.querySelector("#".concat(id.current, " .ant-select-selection-search-input"));
338
+ inputDom === null || inputDom === void 0 || inputDom.setAttribute('placeholder', inputValue);
339
+ inputDom.value = '';
340
+ }, [handleSearch, inputValue]);
341
+ /**
342
+ * 失焦事件
343
+ * 1、失焦时将输入框的placeholder还原成value
344
+ */
345
+ var blur = useCallback(function () {
346
+ if (!inputValue) {
347
+ return;
348
+ }
349
+ var inputDom = document.querySelector("#".concat(id.current, " .ant-select-selection-search-input"));
350
+ if (!customValue || Array.isArray(customValue) && customValue.length === 0) {
351
+ inputDom.value = inputDom.getAttribute('placeholder') || '';
352
+ inputDom === null || inputDom === void 0 || inputDom.setAttribute('placeholder', placeholder || '');
353
+ }
354
+ }, [inputValue, placeholder]);
355
+
356
+ /**
357
+ * 自定义判断过滤时是否命中
358
+ * 1、多选时全部展示(展示接口返回的数据)
359
+ * 2、单选时逐条判断是否显示。原因:假如此时value是1,搜索2,但是接口返回的是1,我们想要展示空。
360
+ */
361
+ var filterOption = function filterOption(text, option) {
362
+ if (multiple) {
363
+ return true;
364
+ }
365
+ // eslint-disable-next-line no-param-reassign
366
+ option = options.find(function (item) {
367
+ return item[valueKey] === option.value;
368
+ });
369
+ if (option) {
370
+ delete option.class;
371
+ if (Object.values(option).filter(function (i) {
372
+ return i;
373
+ }).map(String).some(function (values) {
374
+ if (values.indexOf(text) > -1) {
375
+ return true;
376
+ }
377
+ return false;
378
+ })) {
379
+ return true;
380
+ }
381
+ }
382
+ return false;
383
+ };
384
+ return /*#__PURE__*/_jsx(StyledWrapper, {
385
+ id: id.current,
386
+ children: /*#__PURE__*/_jsx(BiuASelect, _objectSpread(_objectSpread({
387
+ ref: ref,
388
+ loading: loading,
389
+ value: loading ? undefined : customValue,
390
+ allowClear: allowClear,
391
+ placeholder: placeholder,
392
+ showSearch: showSearch,
393
+ filterOption: filterOption,
394
+ optionLabelProp: "label",
395
+ optionFilterProp: optionFilterProp
396
+ }, restProps), {}, {
397
+ onSearch: debounce(handleSearch, 500),
398
+ onChange: change,
399
+ onFocus: focus,
400
+ onBlur: blur,
401
+ dropdownRender: function dropdownRender(menu) {
402
+ return /*#__PURE__*/_jsx("div", {
403
+ onMouseDown: function onMouseDown(e) {
404
+ e.preventDefault();
405
+ e.stopPropagation();
406
+ },
407
+ children: menu
408
+ });
409
+ },
410
+ children: options.map(function (item) {
411
+ return /*#__PURE__*/_jsxs(BiuASelectOption, {
412
+ label: item.employeeName,
413
+ value: item[valueKey],
414
+ children: [/*#__PURE__*/_jsx("div", {
415
+ style: {
416
+ fontSize: 14,
417
+ color: 'rgb(29, 33, 41)'
418
+ },
419
+ children: "".concat(item.employeeCode, "_").concat(item.employeeName)
420
+ }), item.companyName || item.postName ? /*#__PURE__*/_jsx("div", {
421
+ style: {
422
+ fontSize: 12,
423
+ color: '#999'
424
+ },
425
+ children: "".concat(item.companyName, "_").concat(item.postName)
426
+ }) : '']
427
+ }, item.employeeCode + item.id);
428
+ })
429
+ }))
430
+ });
431
+ }));
@@ -0,0 +1,9 @@
1
+ import type { SelectProps } from 'antd';
2
+ import React from 'react';
3
+ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<{
4
+ returnOwnerArray?: string[] | number[] | undefined;
5
+ serialNumber: string;
6
+ value?: string | number | string[] | number[] | undefined;
7
+ openType?: string | undefined;
8
+ } & SelectProps<any, import("antd/lib/select").DefaultOptionType> & React.RefAttributes<unknown>>>;
9
+ export default _default;
@@ -0,0 +1,114 @@
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 = ["returnOwnerArray", "serialNumber", "openType", "value"];
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
+ 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."); }
10
+ 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); }
11
+ 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; }
12
+ 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; } }
13
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
+ 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; }
15
+ 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; }
16
+ import React, { forwardRef, useCallback, useEffect, useState } from 'react';
17
+ import { BiuField, BiuAInput, BiuASelect, BiuASelectOption } from "../..";
18
+ import { DATE_FORMAT } from "../../../constant";
19
+
20
+ /**
21
+ * 组件封装对所有字段去掉验证,组件验证对于开发来说不需要,组件参数错误,数据也就错了
22
+ */
23
+ import { jsx as _jsx } from "react/jsx-runtime";
24
+ import { Fragment as _Fragment } from "react/jsx-runtime";
25
+ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props, ref) {
26
+ var returnOwnerArray = props.returnOwnerArray,
27
+ serialNumber = props.serialNumber,
28
+ openType = props.openType,
29
+ _props$value = props.value,
30
+ value = _props$value === void 0 ? '' : _props$value,
31
+ restProps = _objectWithoutProperties(props, _excluded);
32
+ // Hooks 定义 State 不会重复执行
33
+ var _useState = useState([]),
34
+ _useState2 = _slicedToArray(_useState, 2),
35
+ properList = _useState2[0],
36
+ setproperList = _useState2[1];
37
+ var _useState3 = useState('-1'),
38
+ _useState4 = _slicedToArray(_useState3, 2),
39
+ properNumber = _useState4[0],
40
+ setproperNumber = _useState4[1];
41
+ var _useState5 = useState(''),
42
+ _useState6 = _slicedToArray(_useState5, 2),
43
+ properValue = _useState6[0],
44
+ setproperValue = _useState6[1];
45
+
46
+ // 更具类型加载不同的控件
47
+ var getControls = useCallback(function () {
48
+ // 根据序号找出对应的数据
49
+ var attrArray = properList.filter(function (v) {
50
+ return v.attributeNumber === properNumber;
51
+ });
52
+ if (attrArray.length > 0) {
53
+ var type = attrArray[0].controlType;
54
+ if (type === '1') {
55
+ return openType === '2' ? /*#__PURE__*/_jsx(BiuAInput, _objectSpread({
56
+ ref: ref,
57
+ value: value
58
+ }, restProps)) : /*#__PURE__*/_jsx(BiuAInput, _objectSpread({
59
+ ref: ref,
60
+ defaultValue: properValue
61
+ }, restProps));
62
+ }
63
+ if (type === '2') {
64
+ var _attrArray$;
65
+ var str = (_attrArray$ = attrArray[0]) === null || _attrArray$ === void 0 ? void 0 : _attrArray$.selectContent.split(';');
66
+ return /*#__PURE__*/_jsx(BiuASelect, _objectSpread(_objectSpread({
67
+ ref: ref,
68
+ defaultValue: properValue
69
+ }, restProps), {}, {
70
+ children: str.map(function (item) {
71
+ return /*#__PURE__*/_jsx(BiuASelectOption, {
72
+ value: item,
73
+ children: item || ' '
74
+ }, item);
75
+ })
76
+ }));
77
+ }
78
+ // 年月
79
+ if (type === '3') {
80
+ return /*#__PURE__*/_jsx(BiuField, _objectSpread({
81
+ ref: ref,
82
+ valueType: "month",
83
+ format: DATE_FORMAT.month,
84
+ value: value
85
+ }, restProps));
86
+ }
87
+ // 年月日
88
+ if (type === '4') {
89
+ return /*#__PURE__*/_jsx(BiuField, _objectSpread({
90
+ ref: ref,
91
+ valueType: "date",
92
+ format: DATE_FORMAT.day,
93
+ value: value
94
+ }, restProps));
95
+ }
96
+ }
97
+ return /*#__PURE__*/_jsx(BiuAInput, _objectSpread({
98
+ defaultValue: properValue
99
+ }, restProps));
100
+ }, [openType, properList, properNumber, properValue, ref, restProps, value]);
101
+
102
+ /**
103
+ * 加载原始数据源,根据传入值查询
104
+ * ps。依赖传入参数
105
+ */
106
+ useEffect(function () {
107
+ if (openType === '1') setproperValue('');else if (openType === '2') setproperValue(value);
108
+ setproperNumber(serialNumber);
109
+ setproperList(returnOwnerArray);
110
+ }, [openType, returnOwnerArray, serialNumber, value]);
111
+ return /*#__PURE__*/_jsx(_Fragment, {
112
+ children: getControls()
113
+ });
114
+ }));
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>>;
3
+ export default _default;
@@ -0,0 +1,94 @@
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 = ["searchTimes"];
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
+ 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."); }
10
+ 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); }
11
+ 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; }
12
+ 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; } }
13
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
+ 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; }
15
+ 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; }
16
+ import { useDebounceFn } from 'ahooks';
17
+ import React, { forwardRef, useState } from 'react';
18
+ import { BiuTableSelect } from "../..";
19
+ import { GATEWAY_ROUTE_MDM } from "../../../constant";
20
+ import { jsx as _jsx } from "react/jsx-runtime";
21
+ var columns = [{
22
+ title: '供应商编码',
23
+ dataIndex: 'addresscode',
24
+ ellipsis: true,
25
+ width: 100
26
+ }, {
27
+ title: '供应商名称',
28
+ dataIndex: 'addressname',
29
+ ellipsis: true,
30
+ width: 100
31
+ }, {
32
+ title: '联系人',
33
+ dataIndex: 'linkman',
34
+ ellipsis: true,
35
+ width: 100
36
+ }, {
37
+ title: '联系方式',
38
+ dataIndex: 'linkway',
39
+ ellipsis: true,
40
+ width: 100
41
+ }, {
42
+ title: '详细地址',
43
+ dataIndex: 'detailedaddress',
44
+ ellipsis: true,
45
+ width: 100
46
+ }];
47
+ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props, ref) {
48
+ var _props$searchTimes = props.searchTimes,
49
+ searchTimes = _props$searchTimes === void 0 ? 300 : _props$searchTimes,
50
+ restProps = _objectWithoutProperties(props, _excluded);
51
+ var _useState = useState({
52
+ addresstype: 1,
53
+ page: 1,
54
+ size: 20
55
+ }),
56
+ _useState2 = _slicedToArray(_useState, 2),
57
+ queryData = _useState2[0],
58
+ setQueryData = _useState2[1];
59
+ var _useDebounceFn = useDebounceFn(function (value) {
60
+ setQueryData({
61
+ remoteSearchCValue: value,
62
+ addresstype: 1,
63
+ page: 1,
64
+ size: 100
65
+ });
66
+ }, {
67
+ wait: searchTimes
68
+ }),
69
+ handleSearch = _useDebounceFn.run;
70
+ return /*#__PURE__*/_jsx(BiuTableSelect, _objectSpread({
71
+ ref: ref,
72
+ showSearch: true,
73
+ columns: columns,
74
+ bindField: {
75
+ rowLabel: 'addressname'
76
+ },
77
+ interfaceName: "wms.mdm.addresslibrarymanageQuery",
78
+ requestConfig: {
79
+ GatewayRoute: GATEWAY_ROUTE_MDM
80
+ },
81
+ queryData: queryData,
82
+ onSearch: handleSearch,
83
+ dataOption: function dataOption(_ref) {
84
+ var _ref$rows = _ref.rows,
85
+ rows = _ref$rows === void 0 ? [] : _ref$rows;
86
+ return rows.reduce(function (arr, current) {
87
+ arr.push(_objectSpread(_objectSpread({}, current), {}, {
88
+ id: "".concat(current.id)
89
+ }));
90
+ return arr;
91
+ }, []);
92
+ }
93
+ }, restProps), "shipperTableSelect");
94
+ }));
@@ -0,0 +1,8 @@
1
+ import type { SelectProps } from 'antd';
2
+ import React from 'react';
3
+ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<{
4
+ isModel?: "multiple" | "tags" | undefined;
5
+ onChangeData?: any;
6
+ warehouseFilter?: any;
7
+ } & SelectProps<any, import("antd/lib/select").DefaultOptionType> & React.RefAttributes<unknown>>>;
8
+ export default _default;