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.
- package/README.md +26 -0
- package/dist/esm/assets/location.png +0 -0
- package/dist/esm/component/BiuAAutoComplete/index.d.ts +4 -0
- package/dist/esm/component/BiuAAutoComplete/index.js +13 -0
- package/dist/esm/component/BiuAButton/index.d.ts +18 -0
- package/dist/esm/component/BiuAButton/index.js +8 -0
- package/dist/esm/component/BiuACard/index.d.ts +2 -0
- package/dist/esm/component/BiuACard/index.js +9 -0
- package/dist/esm/component/BiuACascader/index.d.ts +10 -0
- package/dist/esm/component/BiuACascader/index.js +8 -0
- package/dist/esm/component/BiuADatePicker/index.d.ts +19 -0
- package/dist/esm/component/BiuADatePicker/index.js +18 -0
- package/dist/esm/component/BiuAForm/index.d.ts +7 -0
- package/dist/esm/component/BiuAForm/index.js +10 -0
- package/dist/esm/component/BiuAInput/index.d.ts +14 -0
- package/dist/esm/component/BiuAInput/index.js +32 -0
- package/dist/esm/component/BiuASelect/index.d.ts +6 -0
- package/dist/esm/component/BiuASelect/index.js +14 -0
- package/dist/esm/component/BiuASwitch/index.d.ts +2 -0
- package/dist/esm/component/BiuASwitch/index.js +9 -0
- package/dist/esm/component/BiuATimePicker/index.d.ts +4 -0
- package/dist/esm/component/BiuATimePicker/index.js +8 -0
- package/dist/esm/component/BiuATreeSelect/index.d.ts +2 -0
- package/dist/esm/component/BiuATreeSelect/index.js +8 -0
- package/dist/esm/component/BiuBar/index.d.ts +13 -0
- package/dist/esm/component/BiuBar/index.js +43 -0
- package/dist/esm/component/BiuComSelect/index.d.ts +19 -0
- package/dist/esm/component/BiuComSelect/index.js +107 -0
- package/dist/esm/component/BiuCue/index.d.ts +18 -0
- package/dist/esm/component/BiuCue/index.js +44 -0
- package/dist/esm/component/BiuCustomSelect/index.d.ts +19 -0
- package/dist/esm/component/BiuCustomSelect/index.js +198 -0
- package/dist/esm/component/BiuCustomTable/index.d.ts +15 -0
- package/dist/esm/component/BiuCustomTable/index.js +77 -0
- package/dist/esm/component/BiuCustomerOperCard/component/editTable.d.ts +9 -0
- package/dist/esm/component/BiuCustomerOperCard/component/editTable.js +268 -0
- package/dist/esm/component/BiuCustomerOperCard/component/index.d.ts +1 -0
- package/dist/esm/component/BiuCustomerOperCard/component/index.js +1 -0
- package/dist/esm/component/BiuCustomerOperCard/component/index.less +5 -0
- package/dist/esm/component/BiuCustomerOperCard/index.d.ts +20 -0
- package/dist/esm/component/BiuCustomerOperCard/index.js +56 -0
- package/dist/esm/component/BiuCustomerOperCard/type.d.ts +117 -0
- package/dist/esm/component/BiuCustomerOperCard/type.js +1 -0
- package/dist/esm/component/BiuCustomerOperCard/utils.d.ts +48 -0
- package/dist/esm/component/BiuCustomerOperCard/utils.js +236 -0
- package/dist/esm/component/BiuDescriptions/index.d.ts +9 -0
- package/dist/esm/component/BiuDescriptions/index.js +39 -0
- package/dist/esm/component/BiuDetailDrawer/index.d.ts +14 -0
- package/dist/esm/component/BiuDetailDrawer/index.js +55 -0
- package/dist/esm/component/BiuDivider/index.d.ts +4 -0
- package/dist/esm/component/BiuDivider/index.js +31 -0
- package/dist/esm/component/BiuField/component/AddressTableSelect.d.ts +3 -0
- package/dist/esm/component/BiuField/component/AddressTableSelect.js +150 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/index.d.ts +3 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/index.js +3 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useConvertSubValue.d.ts +2 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useConvertSubValue.js +49 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useConvertUnSubValue.d.ts +2 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useConvertUnSubValue.js +146 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useInConvertUnSubValue.d.ts +5 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useInConvertUnSubValue.js +82 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/index.d.ts +14 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/index.js +400 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/type.d.ts +123 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/type.js +1 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/utils.d.ts +5 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/utils.js +60 -0
- package/dist/esm/component/BiuField/component/OMSSystem/cityAreaSelect.d.ts +12 -0
- package/dist/esm/component/BiuField/component/OMSSystem/cityAreaSelect.js +131 -0
- package/dist/esm/component/BiuField/component/OMSSystem/warehouseSel.d.ts +7 -0
- package/dist/esm/component/BiuField/component/OMSSystem/warehouseSel.js +80 -0
- package/dist/esm/component/BiuField/component/SNInput.d.ts +13 -0
- package/dist/esm/component/BiuField/component/SNInput.js +623 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/addressSelect.d.ts +24 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/addressSelect.js +192 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/base.d.ts +13 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/base.js +204 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/goodSelect.d.ts +21 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/goodSelect.js +240 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/index.d.ts +3 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/index.js +74 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/interface.d.ts +16 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/interface.js +1 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/locationSelect.d.ts +28 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/locationSelect.js +178 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/newGoodsSelect.d.ts +21 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/newGoodsSelect.js +249 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/package.d.ts +3 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/package.js +151 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/supplierSelect.d.ts +18 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/supplierSelect.js +146 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseAreaSelect.d.ts +3 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseAreaSelect.js +147 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseInfoSelects.d.ts +18 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseInfoSelects.js +101 -0
- package/dist/esm/component/BiuField/component/appliedgoodsTypeSelect.d.ts +9 -0
- package/dist/esm/component/BiuField/component/appliedgoodsTypeSelect.js +75 -0
- package/dist/esm/component/BiuField/component/autoComplete.d.ts +8 -0
- package/dist/esm/component/BiuField/component/autoComplete.js +83 -0
- package/dist/esm/component/BiuField/component/biuMultipleAInput.d.ts +2 -0
- package/dist/esm/component/BiuField/component/biuMultipleAInput.js +133 -0
- package/dist/esm/component/BiuField/component/boxTypeSelect.d.ts +11 -0
- package/dist/esm/component/BiuField/component/boxTypeSelect.js +139 -0
- package/dist/esm/component/BiuField/component/businessdistrictselect.d.ts +55 -0
- package/dist/esm/component/BiuField/component/businessdistrictselect.js +414 -0
- package/dist/esm/component/BiuField/component/carrierInfoSelect.d.ts +13 -0
- package/dist/esm/component/BiuField/component/carrierInfoSelect.js +164 -0
- package/dist/esm/component/BiuField/component/channelSelect.d.ts +8 -0
- package/dist/esm/component/BiuField/component/channelSelect.js +95 -0
- package/dist/esm/component/BiuField/component/cityAreaCascader.d.ts +11 -0
- package/dist/esm/component/BiuField/component/cityAreaCascader.js +88 -0
- package/dist/esm/component/BiuField/component/clientInfoTableSelect.d.ts +3 -0
- package/dist/esm/component/BiuField/component/clientInfoTableSelect.js +199 -0
- package/dist/esm/component/BiuField/component/customMenu.d.ts +3 -0
- package/dist/esm/component/BiuField/component/customMenu.js +110 -0
- package/dist/esm/component/BiuField/component/databaseSelect.d.ts +6 -0
- package/dist/esm/component/BiuField/component/databaseSelect.js +42 -0
- package/dist/esm/component/BiuField/component/departmentTreeSelect.d.ts +3 -0
- package/dist/esm/component/BiuField/component/departmentTreeSelect.js +106 -0
- package/dist/esm/component/BiuField/component/dicNameSelect.d.ts +12 -0
- package/dist/esm/component/BiuField/component/dicNameSelect.js +53 -0
- package/dist/esm/component/BiuField/component/dicTypeSelect.d.ts +42 -0
- package/dist/esm/component/BiuField/component/dicTypeSelect.js +87 -0
- package/dist/esm/component/BiuField/component/dockingPartySelect.d.ts +8 -0
- package/dist/esm/component/BiuField/component/dockingPartySelect.js +63 -0
- package/dist/esm/component/BiuField/component/editLocationSelect.d.ts +21 -0
- package/dist/esm/component/BiuField/component/editLocationSelect.js +124 -0
- package/dist/esm/component/BiuField/component/electronicFaceSheet/accountSelect.d.ts +3 -0
- package/dist/esm/component/BiuField/component/electronicFaceSheet/accountSelect.js +36 -0
- package/dist/esm/component/BiuField/component/electronicFaceSheet/addresSelect.d.ts +14 -0
- package/dist/esm/component/BiuField/component/electronicFaceSheet/addresSelect.js +98 -0
- package/dist/esm/component/BiuField/component/electronicFaceSheet/platformSelect.d.ts +7 -0
- package/dist/esm/component/BiuField/component/electronicFaceSheet/platformSelect.js +74 -0
- package/dist/esm/component/BiuField/component/goodsTypeSelect.d.ts +10 -0
- package/dist/esm/component/BiuField/component/goodsTypeSelect.js +92 -0
- package/dist/esm/component/BiuField/component/index.d.ts +39 -0
- package/dist/esm/component/BiuField/component/index.js +39 -0
- package/dist/esm/component/BiuField/component/interfaceNameSelect.d.ts +9 -0
- package/dist/esm/component/BiuField/component/interfaceNameSelect.js +65 -0
- package/dist/esm/component/BiuField/component/lpnSelect.d.ts +3 -0
- package/dist/esm/component/BiuField/component/lpnSelect.js +96 -0
- package/dist/esm/component/BiuField/component/lpnSelectNew.d.ts +17 -0
- package/dist/esm/component/BiuField/component/lpnSelectNew.js +189 -0
- package/dist/esm/component/BiuField/component/newEditLocationSelect.d.ts +21 -0
- package/dist/esm/component/BiuField/component/newEditLocationSelect.js +129 -0
- package/dist/esm/component/BiuField/component/newUserSelect.d.ts +12 -0
- package/dist/esm/component/BiuField/component/newUserSelect.js +212 -0
- package/dist/esm/component/BiuField/component/orderTypeSelect.d.ts +16 -0
- package/dist/esm/component/BiuField/component/orderTypeSelect.js +82 -0
- package/dist/esm/component/BiuField/component/orderTypeTableSelect.d.ts +3 -0
- package/dist/esm/component/BiuField/component/orderTypeTableSelect.js +45 -0
- package/dist/esm/component/BiuField/component/parkSelect.d.ts +12 -0
- package/dist/esm/component/BiuField/component/parkSelect.js +88 -0
- package/dist/esm/component/BiuField/component/personnelinfoselect.d.ts +57 -0
- package/dist/esm/component/BiuField/component/personnelinfoselect.js +432 -0
- package/dist/esm/component/BiuField/component/propertNameSelect.d.ts +9 -0
- package/dist/esm/component/BiuField/component/propertNameSelect.js +114 -0
- package/dist/esm/component/BiuField/component/shipperTableSelect.d.ts +3 -0
- package/dist/esm/component/BiuField/component/shipperTableSelect.js +94 -0
- package/dist/esm/component/BiuField/component/userSelect.d.ts +11 -0
- package/dist/esm/component/BiuField/component/userSelect.js +174 -0
- package/dist/esm/component/BiuField/component/warehouseAreaSelect.d.ts +9 -0
- package/dist/esm/component/BiuField/component/warehouseAreaSelect.js +104 -0
- package/dist/esm/component/BiuField/component/warehouseInfoSelect.d.ts +14 -0
- package/dist/esm/component/BiuField/component/warehouseInfoSelect.js +94 -0
- package/dist/esm/component/BiuField/component/warehouseLoctionSelect.d.ts +14 -0
- package/dist/esm/component/BiuField/component/warehouseLoctionSelect.js +125 -0
- package/dist/esm/component/BiuField/index.d.ts +8 -0
- package/dist/esm/component/BiuField/index.js +680 -0
- package/dist/esm/component/BiuFileInput/index.d.ts +11 -0
- package/dist/esm/component/BiuFileInput/index.js +58 -0
- package/dist/esm/component/BiuForm/index.d.ts +14 -0
- package/dist/esm/component/BiuForm/index.js +270 -0
- package/dist/esm/component/BiuForm/type.d.ts +47 -0
- package/dist/esm/component/BiuForm/type.js +1 -0
- package/dist/esm/component/BiuForm/utils.d.ts +2 -0
- package/dist/esm/component/BiuForm/utils.js +53 -0
- package/dist/esm/component/BiuIcon/index.d.ts +3 -0
- package/dist/esm/component/BiuIcon/index.js +15 -0
- package/dist/esm/component/BiuMapSelectSite/index.d.ts +53 -0
- package/dist/esm/component/BiuMapSelectSite/index.js +593 -0
- package/dist/esm/component/BiuModal/index.d.ts +24 -0
- package/dist/esm/component/BiuModal/index.js +240 -0
- package/dist/esm/component/BiuOperForm/index.d.ts +22 -0
- package/dist/esm/component/BiuOperForm/index.js +390 -0
- package/dist/esm/component/BiuOperForm/type.d.ts +24 -0
- package/dist/esm/component/BiuOperForm/type.js +1 -0
- package/dist/esm/component/BiuOperTable/index.d.ts +15 -0
- package/dist/esm/component/BiuOperTable/index.js +349 -0
- package/dist/esm/component/BiuOperTable/type.d.ts +142 -0
- package/dist/esm/component/BiuOperTable/type.js +1 -0
- package/dist/esm/component/BiuOperTable/utils.d.ts +6 -0
- package/dist/esm/component/BiuOperTable/utils.js +13 -0
- package/dist/esm/component/BiuPagination/index.d.ts +15 -0
- package/dist/esm/component/BiuPagination/index.js +34 -0
- package/dist/esm/component/BiuResizeTable/component/VirtualTable.d.ts +3 -0
- package/dist/esm/component/BiuResizeTable/component/VirtualTable.js +127 -0
- package/dist/esm/component/BiuResizeTable/component/biuTableCell.d.ts +1 -0
- package/dist/esm/component/BiuResizeTable/component/biuTableCell.js +78 -0
- package/dist/esm/component/BiuResizeTable/component/index.d.ts +1 -0
- package/dist/esm/component/BiuResizeTable/component/index.js +1 -0
- package/dist/esm/component/BiuResizeTable/index.d.ts +2 -0
- package/dist/esm/component/BiuResizeTable/index.js +71 -0
- package/dist/esm/component/BiuResizeTable/index.less +19 -0
- package/dist/esm/component/BiuSplit/index.d.ts +32 -0
- package/dist/esm/component/BiuSplit/index.js +57 -0
- package/dist/esm/component/BiuTable/component/index.d.ts +3 -0
- package/dist/esm/component/BiuTable/component/index.js +3 -0
- package/dist/esm/component/BiuTable/component/tableActionBarRender.d.ts +9 -0
- package/dist/esm/component/BiuTable/component/tableActionBarRender.js +206 -0
- package/dist/esm/component/BiuTable/component/tableCellRender.d.ts +14 -0
- package/dist/esm/component/BiuTable/component/tableCellRender.js +125 -0
- package/dist/esm/component/BiuTable/component/tableSettingRender.d.ts +2 -0
- package/dist/esm/component/BiuTable/component/tableSettingRender.js +347 -0
- package/dist/esm/component/BiuTable/context.d.ts +2 -0
- package/dist/esm/component/BiuTable/context.js +2 -0
- package/dist/esm/component/BiuTable/index.d.ts +67 -0
- package/dist/esm/component/BiuTable/index.js +586 -0
- package/dist/esm/component/BiuTable/type.d.ts +200 -0
- package/dist/esm/component/BiuTable/type.js +1 -0
- package/dist/esm/component/BiuTable/utils.d.ts +12 -0
- package/dist/esm/component/BiuTable/utils.js +123 -0
- package/dist/esm/component/BiuTableLink/index.d.ts +11 -0
- package/dist/esm/component/BiuTableLink/index.js +54 -0
- package/dist/esm/component/BiuTableSelect/index.d.ts +54 -0
- package/dist/esm/component/BiuTableSelect/index.js +231 -0
- package/dist/esm/component/BiuTabs/index.d.ts +4 -0
- package/dist/esm/component/BiuTabs/index.js +18 -0
- package/dist/esm/component/index.d.ts +34 -0
- package/dist/esm/component/index.js +34 -0
- package/dist/esm/constant/Cache_Key.d.ts +28 -0
- package/dist/esm/constant/Cache_Key.js +28 -0
- package/dist/esm/constant/DateTime.d.ts +12 -0
- package/dist/esm/constant/DateTime.js +15 -0
- package/dist/esm/constant/External.d.ts +64 -0
- package/dist/esm/constant/External.js +260 -0
- package/dist/esm/constant/Gateway_Path.d.ts +5 -0
- package/dist/esm/constant/Gateway_Path.js +5 -0
- package/dist/esm/constant/Layout.d.ts +210 -0
- package/dist/esm/constant/Layout.js +215 -0
- package/dist/esm/constant/Regexp.d.ts +109 -0
- package/dist/esm/constant/Regexp.js +130 -0
- package/dist/esm/constant/index.d.ts +6 -0
- package/dist/esm/constant/index.js +6 -0
- package/dist/esm/hooks/index.d.ts +7 -0
- package/dist/esm/hooks/index.js +7 -0
- package/dist/esm/hooks/useAuth.d.ts +4 -0
- package/dist/esm/hooks/useAuth.js +22 -0
- package/dist/esm/hooks/useCurrentSystem.d.ts +6 -0
- package/dist/esm/hooks/useCurrentSystem.js +17 -0
- package/dist/esm/hooks/useLayoutInfo.d.ts +10 -0
- package/dist/esm/hooks/useLayoutInfo.js +14 -0
- package/dist/esm/hooks/useReducerState.d.ts +16 -0
- package/dist/esm/hooks/useReducerState.js +45 -0
- package/dist/esm/hooks/useUmeng.d.ts +5 -0
- package/dist/esm/hooks/useUmeng.js +168 -0
- package/dist/esm/hooks/useUserInfo.d.ts +4 -0
- package/dist/esm/hooks/useUserInfo.js +17 -0
- package/dist/esm/hooks/useWareInfo.d.ts +4 -0
- package/dist/esm/hooks/useWareInfo.js +17 -0
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/package/index.d.ts +1 -0
- package/dist/esm/package/index.js +1 -0
- package/dist/esm/package/requestWrapper/baseRequest.d.ts +3 -0
- package/dist/esm/package/requestWrapper/baseRequest.js +47 -0
- package/dist/esm/package/requestWrapper/index.d.ts +4 -0
- package/dist/esm/package/requestWrapper/index.js +425 -0
- package/dist/esm/package/requestWrapper/type.d.ts +41 -0
- package/dist/esm/package/requestWrapper/type.js +1 -0
- package/dist/esm/package/requestWrapper/utils.d.ts +10 -0
- package/dist/esm/package/requestWrapper/utils.js +45 -0
- package/dist/esm/types/track.d.ts +113 -0
- package/dist/esm/types/track.js +63 -0
- package/dist/esm/types/umeng.d.ts +7 -0
- package/dist/esm/utils/authUtils.d.ts +18 -0
- package/dist/esm/utils/authUtils.js +36 -0
- package/dist/esm/utils/cacheUtils.d.ts +4 -0
- package/dist/esm/utils/cacheUtils.js +24 -0
- package/dist/esm/utils/chainUtils.d.ts +26 -0
- package/dist/esm/utils/chainUtils.js +54 -0
- package/dist/esm/utils/dateUtils.d.ts +23 -0
- package/dist/esm/utils/dateUtils.js +55 -0
- package/dist/esm/utils/decimalUtils.d.ts +5 -0
- package/dist/esm/utils/decimalUtils.js +7 -0
- package/dist/esm/utils/excelUtils.d.ts +22 -0
- package/dist/esm/utils/excelUtils.js +165 -0
- package/dist/esm/utils/index.d.ts +11 -0
- package/dist/esm/utils/index.js +11 -0
- package/dist/esm/utils/layoutUtils.d.ts +1 -0
- package/dist/esm/utils/layoutUtils.js +13 -0
- package/dist/esm/utils/objectUtils.d.ts +1 -0
- package/dist/esm/utils/objectUtils.js +3 -0
- package/dist/esm/utils/soundUtils.d.ts +5 -0
- package/dist/esm/utils/soundUtils.js +29 -0
- package/dist/esm/utils/stringUtils.d.ts +24 -0
- package/dist/esm/utils/stringUtils.js +39 -0
- package/dist/esm/utils/sysUtils.d.ts +8 -0
- package/dist/esm/utils/sysUtils.js +33 -0
- package/dist/esm/utils/umeng.d.ts +3 -0
- package/dist/esm/utils/umeng.js +161 -0
- package/package.json +60 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
3
|
+
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); }
|
|
4
|
+
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; }
|
|
5
|
+
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; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import React, { forwardRef, useCallback, useEffect, useMemo, useState } from 'react';
|
|
8
|
+
import { BiuCustomSelect } from "../..";
|
|
9
|
+
import { GATEWAY_ROUTE_WMS } from "../../../constant";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
var requestConfig = {
|
|
12
|
+
GatewayRoute: GATEWAY_ROUTE_WMS
|
|
13
|
+
};
|
|
14
|
+
export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
15
|
+
var _useState = useState(''),
|
|
16
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
17
|
+
notFoundContent = _useState2[0],
|
|
18
|
+
setNotFoundContent = _useState2[1];
|
|
19
|
+
var value = props.value,
|
|
20
|
+
ownerId = props.ownerId,
|
|
21
|
+
_props$noOwnerContent = props.noOwnerContent,
|
|
22
|
+
noOwnerContent = _props$noOwnerContent === void 0 ? '请先选择货主' : _props$noOwnerContent,
|
|
23
|
+
onChange = props.onChange;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 加载原始数据源,根据传入值查询
|
|
27
|
+
* ps。依赖传入参数
|
|
28
|
+
*/
|
|
29
|
+
useEffect(function () {
|
|
30
|
+
if (!ownerId) {
|
|
31
|
+
setNotFoundContent(noOwnerContent);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
setNotFoundContent('');
|
|
35
|
+
}, [noOwnerContent, ownerId]);
|
|
36
|
+
var requestParams = useMemo(function () {
|
|
37
|
+
return {
|
|
38
|
+
ownerId: ownerId
|
|
39
|
+
};
|
|
40
|
+
}, [ownerId]);
|
|
41
|
+
var onFetchData = useCallback(function (res) {
|
|
42
|
+
var data = res || [];
|
|
43
|
+
var optionData = [];
|
|
44
|
+
var obj = {};
|
|
45
|
+
for (var i = 0; i < data.length; i += 1) {
|
|
46
|
+
if (!obj[data[i].fatherTypeId]) {
|
|
47
|
+
optionData.push(data[i]);
|
|
48
|
+
obj[data[i].fatherTypeId] = true;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return optionData.filter(function (d) {
|
|
52
|
+
return d.fatherTypeId !== null && d.fatherTypeId !== '';
|
|
53
|
+
}).map(function (item) {
|
|
54
|
+
return {
|
|
55
|
+
label: item.fatherTypeName || '',
|
|
56
|
+
value: item.fatherTypeId
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
}, []);
|
|
60
|
+
var isOnReady = useCallback(function (params) {
|
|
61
|
+
if (!params.ownerId) return false;
|
|
62
|
+
return true;
|
|
63
|
+
}, []);
|
|
64
|
+
return /*#__PURE__*/_jsx(BiuCustomSelect, {
|
|
65
|
+
ref: ref,
|
|
66
|
+
requestName: "/wms/base/goodsInfo/queryByID2",
|
|
67
|
+
requestParams: requestParams,
|
|
68
|
+
requestConfig: requestConfig,
|
|
69
|
+
onReady: isOnReady,
|
|
70
|
+
notFoundContent: notFoundContent,
|
|
71
|
+
onFetchData: onFetchData,
|
|
72
|
+
onChange: onChange,
|
|
73
|
+
value: value
|
|
74
|
+
}, "appliedgoodsTypeSelect");
|
|
75
|
+
}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SelectProps } from 'antd';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<{
|
|
4
|
+
clientId?: string | undefined;
|
|
5
|
+
onChangeData?: ((value: any, record: any) => void) | undefined;
|
|
6
|
+
isFirstLoad?: boolean | undefined;
|
|
7
|
+
} & SelectProps<any, import("antd/lib/select").DefaultOptionType> & React.RefAttributes<unknown>>>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,83 @@
|
|
|
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 = ["clientId", "onChange", "onChangeData", "isFirstLoad"];
|
|
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 _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; }
|
|
9
|
+
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; }
|
|
10
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
|
+
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."); }
|
|
12
|
+
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); }
|
|
13
|
+
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; }
|
|
14
|
+
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; } }
|
|
15
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
+
import { AutoComplete } from 'antd';
|
|
17
|
+
import React, { forwardRef, useCallback, useEffect, useState } from 'react';
|
|
18
|
+
import { GATEWAY_ROUTE_WMS } from "../../../constant";
|
|
19
|
+
import { request } from "../../../package";
|
|
20
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
|
+
var getByClientIdData = function getByClientIdData(queryData) {
|
|
22
|
+
return request({
|
|
23
|
+
apiName: '/wms/base/goodsInfo/getByClientIdData',
|
|
24
|
+
dubbo: true,
|
|
25
|
+
data: queryData,
|
|
26
|
+
requestConfig: {
|
|
27
|
+
GatewayRoute: GATEWAY_ROUTE_WMS
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
32
|
+
var _useState = useState([]),
|
|
33
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
34
|
+
result = _useState2[0],
|
|
35
|
+
setResult = _useState2[1];
|
|
36
|
+
var clientId = props.clientId,
|
|
37
|
+
onChange = props.onChange,
|
|
38
|
+
onChangeData = props.onChangeData,
|
|
39
|
+
_props$isFirstLoad = props.isFirstLoad,
|
|
40
|
+
isFirstLoad = _props$isFirstLoad === void 0 ? true : _props$isFirstLoad,
|
|
41
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
42
|
+
var _useState3 = useState(isFirstLoad),
|
|
43
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
44
|
+
isFirstLoadSearch = _useState4[0],
|
|
45
|
+
setIsFirstLoadSearch = _useState4[1];
|
|
46
|
+
useEffect(function () {
|
|
47
|
+
if (!clientId && !isFirstLoadSearch) {
|
|
48
|
+
setResult([]);
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
getByClientIdData({
|
|
52
|
+
clientId: clientId
|
|
53
|
+
}).then(function (res) {
|
|
54
|
+
setResult(res || []);
|
|
55
|
+
});
|
|
56
|
+
}, [clientId, isFirstLoadSearch]);
|
|
57
|
+
var handleOnChange = useCallback(function (value, option) {
|
|
58
|
+
if (onChange) onChange(value, option);
|
|
59
|
+
if (onChangeData) {
|
|
60
|
+
onChangeData(value, result.filter(function (item) {
|
|
61
|
+
return "".concat(item.goodsCode) === "".concat(value);
|
|
62
|
+
})[0]);
|
|
63
|
+
}
|
|
64
|
+
}, [onChange, onChangeData, result]);
|
|
65
|
+
var onSearch = useCallback(function () {
|
|
66
|
+
setIsFirstLoadSearch(true);
|
|
67
|
+
}, []);
|
|
68
|
+
return /*#__PURE__*/_jsx(AutoComplete, _objectSpread(_objectSpread({
|
|
69
|
+
ref: ref,
|
|
70
|
+
onChange: handleOnChange,
|
|
71
|
+
onSearch: onSearch,
|
|
72
|
+
filterOption: function filterOption(inputValue, option) {
|
|
73
|
+
return (option === null || option === void 0 ? void 0 : option.value.toUpperCase().indexOf(inputValue === null || inputValue === void 0 ? void 0 : inputValue.toUpperCase())) !== -1;
|
|
74
|
+
}
|
|
75
|
+
}, restProps), {}, {
|
|
76
|
+
children: result.map(function (email) {
|
|
77
|
+
return /*#__PURE__*/_jsx(AutoComplete.Option, {
|
|
78
|
+
value: email === null || email === void 0 ? void 0 : email.goodsCode,
|
|
79
|
+
children: email === null || email === void 0 ? void 0 : email.goodsCode
|
|
80
|
+
}, email === null || email === void 0 ? void 0 : email.id);
|
|
81
|
+
})
|
|
82
|
+
}));
|
|
83
|
+
}));
|
|
@@ -0,0 +1,133 @@
|
|
|
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 = ["value", "onChange"];
|
|
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 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); } }
|
|
10
|
+
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); }); }; }
|
|
11
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
|
+
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."); }
|
|
13
|
+
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); }
|
|
14
|
+
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; }
|
|
15
|
+
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; } }
|
|
16
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
|
+
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; }
|
|
18
|
+
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; }
|
|
19
|
+
import { MenuOutlined } from '@ant-design/icons';
|
|
20
|
+
import { useControllableValue } from 'ahooks';
|
|
21
|
+
import { Input } from 'antd';
|
|
22
|
+
import React, { forwardRef, useCallback, useImperativeHandle, useRef, useState } from 'react';
|
|
23
|
+
import { styled } from 'styled-components';
|
|
24
|
+
import { BiuATextArea } from "../../BiuAInput";
|
|
25
|
+
import { BiuModal } from "../../BiuModal";
|
|
26
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
27
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
28
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
|
+
var StyledInput = styled(Input).withConfig({
|
|
30
|
+
displayName: "StyledInput",
|
|
31
|
+
componentId: "wt-antd__sc-rgkcot-0"
|
|
32
|
+
})(["height:28px !important;.ant-input-wrapper{height:26px !important;.ant-input{height:26px !important;}.ant-input-suffix{height:26px !important;}}.ant-input-suffix{cursor:pointer;}"]);
|
|
33
|
+
var StyledArea = styled(BiuATextArea).withConfig({
|
|
34
|
+
displayName: "StyledArea",
|
|
35
|
+
componentId: "wt-antd__sc-rgkcot-1"
|
|
36
|
+
})([""]);
|
|
37
|
+
export var BiuMultipleAInput = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
38
|
+
var value = props.value,
|
|
39
|
+
onChange = props.onChange,
|
|
40
|
+
otherProps = _objectWithoutProperties(props, _excluded);
|
|
41
|
+
var _useControllableValue = useControllableValue({
|
|
42
|
+
value: value,
|
|
43
|
+
onChange: onChange
|
|
44
|
+
}),
|
|
45
|
+
_useControllableValue2 = _slicedToArray(_useControllableValue, 2),
|
|
46
|
+
state = _useControllableValue2[0],
|
|
47
|
+
setState = _useControllableValue2[1];
|
|
48
|
+
var _useState = useState(''),
|
|
49
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
50
|
+
extendedValue = _useState2[0],
|
|
51
|
+
setExtendedValue = _useState2[1];
|
|
52
|
+
useImperativeHandle(ref, function () {
|
|
53
|
+
return {};
|
|
54
|
+
}, []);
|
|
55
|
+
var inputRef = useRef();
|
|
56
|
+
var _useState3 = useState(false),
|
|
57
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
58
|
+
visible = _useState4[0],
|
|
59
|
+
setVisible = _useState4[1];
|
|
60
|
+
var onExpandClick = useCallback(function () {
|
|
61
|
+
setVisible(true);
|
|
62
|
+
if (value) {
|
|
63
|
+
var newValue = value.replace(/,/g, '\n');
|
|
64
|
+
setExtendedValue(newValue);
|
|
65
|
+
} else {
|
|
66
|
+
setExtendedValue(state);
|
|
67
|
+
}
|
|
68
|
+
}, [state, value]);
|
|
69
|
+
var onModelCancel = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
70
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
71
|
+
while (1) switch (_context.prev = _context.next) {
|
|
72
|
+
case 0:
|
|
73
|
+
setVisible(false);
|
|
74
|
+
case 1:
|
|
75
|
+
case "end":
|
|
76
|
+
return _context.stop();
|
|
77
|
+
}
|
|
78
|
+
}, _callee);
|
|
79
|
+
})), []);
|
|
80
|
+
var onModelOk = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
81
|
+
var result, temResult;
|
|
82
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
83
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
84
|
+
case 0:
|
|
85
|
+
result = (extendedValue || '').replace(/^\s*(?:\r\n?|\n)/gm, '').trim().replace(/\n|,/g, ',');
|
|
86
|
+
temResult = result.split(',');
|
|
87
|
+
if (temResult.length) {
|
|
88
|
+
temResult = temResult.map(function (item) {
|
|
89
|
+
item = item.trim();
|
|
90
|
+
return item;
|
|
91
|
+
});
|
|
92
|
+
temResult = temResult.filter(function (item) {
|
|
93
|
+
return item !== '';
|
|
94
|
+
});
|
|
95
|
+
console.log('temResult', temResult);
|
|
96
|
+
temResult = temResult.join(',');
|
|
97
|
+
}
|
|
98
|
+
console.log('temResult', temResult);
|
|
99
|
+
setState(temResult);
|
|
100
|
+
setVisible(false);
|
|
101
|
+
case 6:
|
|
102
|
+
case "end":
|
|
103
|
+
return _context2.stop();
|
|
104
|
+
}
|
|
105
|
+
}, _callee2);
|
|
106
|
+
})), [extendedValue, setState]);
|
|
107
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
108
|
+
children: [/*#__PURE__*/_jsx(StyledInput, _objectSpread({
|
|
109
|
+
ref: inputRef,
|
|
110
|
+
value: state,
|
|
111
|
+
onChange: setState,
|
|
112
|
+
suffix: /*#__PURE__*/_jsx(MenuOutlined, {
|
|
113
|
+
onClick: onExpandClick
|
|
114
|
+
})
|
|
115
|
+
}, otherProps)), /*#__PURE__*/_jsx(BiuModal, {
|
|
116
|
+
width: '65vw',
|
|
117
|
+
fullScreen: false,
|
|
118
|
+
title: '扩展输入信息',
|
|
119
|
+
open: visible,
|
|
120
|
+
onOk: onModelOk,
|
|
121
|
+
onCancel: onModelCancel,
|
|
122
|
+
children: /*#__PURE__*/_jsx(StyledArea, {
|
|
123
|
+
value: extendedValue,
|
|
124
|
+
rows: 10,
|
|
125
|
+
maxLength: 1000,
|
|
126
|
+
onChange: function onChange(e) {
|
|
127
|
+
return setExtendedValue(e.target.value);
|
|
128
|
+
},
|
|
129
|
+
placeholder: "\u5F53\u524D\u8F93\u5165\u4FE1\u606F\u786E\u8BA4\u7684\u65F6\u5019\u4F1A\u53BB\u9664\u524D\u540E\u7A7A\u683C\u4FE1\u606F\uFF0C\u6362\u884C\u4F1A\u88AB\u66FF\u6362\u6210\u9017\u53F7\u8FDB\u884C\u62FC\u63A5\u3002"
|
|
130
|
+
})
|
|
131
|
+
})]
|
|
132
|
+
});
|
|
133
|
+
}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { LabeledValue, SelectProps } from 'antd/es/select';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<{
|
|
4
|
+
clientid: string;
|
|
5
|
+
noOwnerContent?: string | undefined;
|
|
6
|
+
initialLabeledValue?: LabeledValue | undefined;
|
|
7
|
+
requiredOwner?: boolean | undefined;
|
|
8
|
+
onChangeData?: ((value: any, record: any) => void) | undefined;
|
|
9
|
+
isFirstLoad?: boolean | undefined;
|
|
10
|
+
} & SelectProps<any, import("antd/es/select").DefaultOptionType> & React.RefAttributes<unknown>>>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,139 @@
|
|
|
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 = ["clientid", "noOwnerContent", "initialLabeledValue", "requiredOwner", "onChange", "onChangeData", "value", "isFirstLoad"];
|
|
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 { toString } from 'lodash';
|
|
17
|
+
import React, { forwardRef, useCallback, useEffect, useMemo, useState } from 'react';
|
|
18
|
+
import { BiuCustomSelect } from "../..";
|
|
19
|
+
import { GATEWAY_ROUTE_WMS } from "../../../constant";
|
|
20
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
|
+
var requestConfig = {
|
|
22
|
+
GatewayRoute: GATEWAY_ROUTE_WMS
|
|
23
|
+
};
|
|
24
|
+
export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
25
|
+
var clientid = props.clientid,
|
|
26
|
+
_props$noOwnerContent = props.noOwnerContent,
|
|
27
|
+
noOwnerContent = _props$noOwnerContent === void 0 ? '请先选择货主' : _props$noOwnerContent,
|
|
28
|
+
initialLabeledValue = props.initialLabeledValue,
|
|
29
|
+
_props$requiredOwner = props.requiredOwner,
|
|
30
|
+
requiredOwner = _props$requiredOwner === void 0 ? true : _props$requiredOwner,
|
|
31
|
+
onChange = props.onChange,
|
|
32
|
+
onChangeData = props.onChangeData,
|
|
33
|
+
value = props.value,
|
|
34
|
+
_props$isFirstLoad = props.isFirstLoad,
|
|
35
|
+
isFirstLoad = _props$isFirstLoad === void 0 ? true : _props$isFirstLoad,
|
|
36
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
37
|
+
var _useState = useState([]),
|
|
38
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
39
|
+
boxTypeList = _useState2[0],
|
|
40
|
+
setBoxTypeList = _useState2[1];
|
|
41
|
+
var _useState3 = useState(),
|
|
42
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
43
|
+
notFoundContent = _useState4[0],
|
|
44
|
+
setNotFoundContent = _useState4[1];
|
|
45
|
+
var _useState5 = useState(value),
|
|
46
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
47
|
+
newValue = _useState6[0],
|
|
48
|
+
setNewValue = _useState6[1];
|
|
49
|
+
var _useState7 = useState(isFirstLoad),
|
|
50
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
51
|
+
isFirstLoadSearch = _useState8[0],
|
|
52
|
+
setIsFirstLoadSearch = _useState8[1];
|
|
53
|
+
|
|
54
|
+
// 搜索
|
|
55
|
+
var _useState9 = useState(),
|
|
56
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
57
|
+
remoteSearchCValue = _useState10[0],
|
|
58
|
+
setRemoteSearchCValue = _useState10[1];
|
|
59
|
+
var handleSearch = useCallback(function (svalue) {
|
|
60
|
+
if (!clientid && requiredOwner === true) return;
|
|
61
|
+
setNotFoundContent(undefined);
|
|
62
|
+
setRemoteSearchCValue(svalue);
|
|
63
|
+
setIsFirstLoadSearch(true);
|
|
64
|
+
}, [clientid, requiredOwner]);
|
|
65
|
+
useEffect(function () {
|
|
66
|
+
if (!clientid && requiredOwner === true) {
|
|
67
|
+
setNotFoundContent(noOwnerContent);
|
|
68
|
+
setBoxTypeList([]);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
if (initialLabeledValue && initialLabeledValue.key) {
|
|
72
|
+
setNotFoundContent(undefined);
|
|
73
|
+
if (restProps.labelInValue) {
|
|
74
|
+
setNewValue(initialLabeledValue);
|
|
75
|
+
} else {
|
|
76
|
+
setNewValue("".concat(initialLabeledValue.key));
|
|
77
|
+
}
|
|
78
|
+
setBoxTypeList([{
|
|
79
|
+
id: toString(initialLabeledValue.key),
|
|
80
|
+
carriername: initialLabeledValue.label
|
|
81
|
+
}]);
|
|
82
|
+
} else {
|
|
83
|
+
setNotFoundContent('请输入编码或名称搜索');
|
|
84
|
+
}
|
|
85
|
+
}, [clientid, initialLabeledValue, noOwnerContent, requiredOwner, restProps.labelInValue]);
|
|
86
|
+
useEffect(function () {
|
|
87
|
+
if (restProps.labelInValue) {
|
|
88
|
+
setNewValue(value);
|
|
89
|
+
} else {
|
|
90
|
+
setNewValue(value ? "".concat(value) : '');
|
|
91
|
+
}
|
|
92
|
+
}, [restProps.labelInValue, value]);
|
|
93
|
+
var requestParams = useMemo(function () {
|
|
94
|
+
return {
|
|
95
|
+
page: 1,
|
|
96
|
+
size: 20,
|
|
97
|
+
isEnable: 0,
|
|
98
|
+
ownerIdORNull: clientid,
|
|
99
|
+
remoteSearchCValue: remoteSearchCValue,
|
|
100
|
+
isFirstLoadSearch: isFirstLoadSearch
|
|
101
|
+
};
|
|
102
|
+
}, [clientid, remoteSearchCValue, isFirstLoadSearch]);
|
|
103
|
+
var handleOnChange = useCallback(function (_value, option) {
|
|
104
|
+
if (onChange) onChange(_value, option);
|
|
105
|
+
if (onChangeData) {
|
|
106
|
+
onChangeData(_value, boxTypeList.filter(function (item) {
|
|
107
|
+
return "".concat(item.id) === "".concat(_value);
|
|
108
|
+
})[0]);
|
|
109
|
+
}
|
|
110
|
+
}, [boxTypeList, onChange, onChangeData]);
|
|
111
|
+
var isOnReady = useCallback(function (params) {
|
|
112
|
+
if (!params.ownerIdORNull && requiredOwner === true) return false;
|
|
113
|
+
if (!params.isFirstLoadSearch) return false;
|
|
114
|
+
return true;
|
|
115
|
+
}, [requiredOwner]);
|
|
116
|
+
var onFetchData = useCallback(function (res) {
|
|
117
|
+
setBoxTypeList(res.rows);
|
|
118
|
+
return res.rows.map(function (item) {
|
|
119
|
+
return {
|
|
120
|
+
label: item.boxName,
|
|
121
|
+
value: "".concat(item.id)
|
|
122
|
+
};
|
|
123
|
+
});
|
|
124
|
+
}, []);
|
|
125
|
+
return /*#__PURE__*/_jsx(BiuCustomSelect, _objectSpread({
|
|
126
|
+
ref: ref,
|
|
127
|
+
requestName: "/wms/base/boxType/query",
|
|
128
|
+
requestParams: requestParams,
|
|
129
|
+
onReady: isOnReady,
|
|
130
|
+
requestConfig: requestConfig,
|
|
131
|
+
allowClear: true,
|
|
132
|
+
notFoundContent: notFoundContent,
|
|
133
|
+
filterOption: false,
|
|
134
|
+
onSearch: handleSearch,
|
|
135
|
+
value: newValue,
|
|
136
|
+
onChange: handleOnChange,
|
|
137
|
+
onFetchData: onFetchData
|
|
138
|
+
}, restProps), "boxTypeSelect");
|
|
139
|
+
}));
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { SelectProps } from 'antd';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { RequestConfig } from "../../../package";
|
|
4
|
+
type ValueType = string | string[] | number | number[];
|
|
5
|
+
export interface SelectOption {
|
|
6
|
+
/** id */
|
|
7
|
+
id: number;
|
|
8
|
+
/** 商圈名称 */
|
|
9
|
+
busDistrictName: string;
|
|
10
|
+
/** 所属机构 */
|
|
11
|
+
companyName: string;
|
|
12
|
+
/** 岗位 */
|
|
13
|
+
postName: string;
|
|
14
|
+
/** 商圈编码 */
|
|
15
|
+
busDistrictCode: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* 下拉框props
|
|
19
|
+
* @param requestName 请求接口名字
|
|
20
|
+
* @param requestParams 请求接口参数, 约束为对象
|
|
21
|
+
* @param value 选中值
|
|
22
|
+
* @param responseFun 接口请求完成后调用函数, (接口返回值, 过滤后的结果, 最终select选项) => void
|
|
23
|
+
* @param formatValue 格式化value函数,通常用来转换value类型确保选中
|
|
24
|
+
* @param optionLabel 接口响应结果绑定到Select.Option的显示值, 当传入optionList时此字段无效
|
|
25
|
+
* @param optionValue 接口响应结果绑定到Select.Option的value值, 当传入optionList时此字段无效
|
|
26
|
+
* @param optionList 自定义下拉项,通常用于接口格式不规范
|
|
27
|
+
* @param onChange change事件
|
|
28
|
+
*/
|
|
29
|
+
export type CustomSelectProps<T extends Record<string, any>> = {
|
|
30
|
+
requestName?: string;
|
|
31
|
+
requestParams?: T;
|
|
32
|
+
requestConfig?: RequestConfig;
|
|
33
|
+
value?: ValueType;
|
|
34
|
+
responseFun?: (res: any, filterRes?: any, optionList?: SelectOption[]) => void;
|
|
35
|
+
formatValue?: (value: ValueType) => ValueType;
|
|
36
|
+
optionLabel?: string;
|
|
37
|
+
optionValue?: string;
|
|
38
|
+
optionList?: (filterRes?: any) => SelectOption[];
|
|
39
|
+
/**
|
|
40
|
+
* 绑定的值是id还是编码
|
|
41
|
+
*/
|
|
42
|
+
valueKey?: 'id' | 'busDistrictCode';
|
|
43
|
+
/**
|
|
44
|
+
* 初始化显示的文本
|
|
45
|
+
*/
|
|
46
|
+
defaultLabel?: string | string[];
|
|
47
|
+
ref?: any;
|
|
48
|
+
onChange?: (val: string | number | string[] | number[], options: SelectOption[]) => void;
|
|
49
|
+
/**
|
|
50
|
+
* 值改变时触发
|
|
51
|
+
*/
|
|
52
|
+
onChangeData?: (val: string | number | string[] | number[]) => void;
|
|
53
|
+
} & SelectProps<any>;
|
|
54
|
+
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<CustomSelectProps<Record<string, any>>, "ref"> & React.RefAttributes<unknown>>>;
|
|
55
|
+
export default _default;
|