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.
- package/README.md +26 -0
- package/dist/esm/assets/location.png +0 -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 +42 -0
- package/dist/esm/component/BiuComSelect/index.d.ts +24 -0
- package/dist/esm/component/BiuComSelect/index.js +104 -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 +153 -0
- package/dist/esm/component/BiuCustomTable/index.d.ts +14 -0
- package/dist/esm/component/BiuCustomTable/index.js +76 -0
- package/dist/esm/component/BiuCustomerOperCard/component/editTable.d.ts +8 -0
- package/dist/esm/component/BiuCustomerOperCard/component/editTable.js +264 -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/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 +15 -0
- package/dist/esm/component/BiuDetailDrawer/index.js +54 -0
- package/dist/esm/component/BiuDivider/index.d.ts +4 -0
- package/dist/esm/component/BiuDivider/index.js +29 -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 +98 -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 +393 -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 +59 -0
- package/dist/esm/component/BiuField/component/OMSSystem/cityAreaSelect.d.ts +12 -0
- package/dist/esm/component/BiuField/component/OMSSystem/cityAreaSelect.js +130 -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 +622 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/addressSelect.d.ts +23 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/addressSelect.js +187 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/base.d.ts +13 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/base.js +153 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/goodSelect.d.ts +21 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/goodSelect.js +238 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/index.d.ts +3 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/index.js +66 -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 +24 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/locationSelect.js +164 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/package.d.ts +3 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/package.js +149 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/supplierSelect.d.ts +18 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/supplierSelect.js +145 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseAreaSelect.d.ts +3 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseAreaSelect.js +113 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseInfoSelects.d.ts +18 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseInfoSelects.js +100 -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 +82 -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 +145 -0
- package/dist/esm/component/BiuField/component/channelSelect.d.ts +8 -0
- package/dist/esm/component/BiuField/component/channelSelect.js +94 -0
- package/dist/esm/component/BiuField/component/cityAreaCascader.d.ts +11 -0
- package/dist/esm/component/BiuField/component/cityAreaCascader.js +86 -0
- package/dist/esm/component/BiuField/component/clientInfoTableSelect.d.ts +3 -0
- package/dist/esm/component/BiuField/component/clientInfoTableSelect.js +175 -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 +107 -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 +41 -0
- package/dist/esm/component/BiuField/component/dicTypeSelect.js +84 -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 +18 -0
- package/dist/esm/component/BiuField/component/editLocationSelect.js +119 -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 +97 -0
- package/dist/esm/component/BiuField/component/electronicFaceSheet/platformSelect.d.ts +7 -0
- package/dist/esm/component/BiuField/component/electronicFaceSheet/platformSelect.js +73 -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 +37 -0
- package/dist/esm/component/BiuField/component/index.js +37 -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 +88 -0
- package/dist/esm/component/BiuField/component/orderTypeSelect.d.ts +15 -0
- package/dist/esm/component/BiuField/component/orderTypeSelect.js +79 -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 +431 -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 +8 -0
- package/dist/esm/component/BiuField/component/userSelect.js +163 -0
- package/dist/esm/component/BiuField/component/warehouseAreaSelect.d.ts +9 -0
- package/dist/esm/component/BiuField/component/warehouseAreaSelect.js +103 -0
- package/dist/esm/component/BiuField/component/warehouseInfoSelect.d.ts +13 -0
- package/dist/esm/component/BiuField/component/warehouseInfoSelect.js +92 -0
- package/dist/esm/component/BiuField/component/warehouseLoctionSelect.d.ts +14 -0
- package/dist/esm/component/BiuField/component/warehouseLoctionSelect.js +124 -0
- package/dist/esm/component/BiuField/index.d.ts +8 -0
- package/dist/esm/component/BiuField/index.js +607 -0
- package/dist/esm/component/BiuFileInput/index.d.ts +11 -0
- package/dist/esm/component/BiuFileInput/index.js +53 -0
- package/dist/esm/component/BiuForm/index.d.ts +12 -0
- package/dist/esm/component/BiuForm/index.js +241 -0
- package/dist/esm/component/BiuForm/type.d.ts +45 -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 +46 -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 +48 -0
- package/dist/esm/component/BiuMapSelectSite/index.js +453 -0
- package/dist/esm/component/BiuModal/index.d.ts +24 -0
- package/dist/esm/component/BiuModal/index.js +239 -0
- package/dist/esm/component/BiuOperForm/index.d.ts +15 -0
- package/dist/esm/component/BiuOperForm/index.js +375 -0
- package/dist/esm/component/BiuOperForm/type.d.ts +23 -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 +14 -0
- package/dist/esm/component/BiuPagination/index.js +34 -0
- package/dist/esm/component/BiuResizeTable/component/biuTableCell.d.ts +1 -0
- package/dist/esm/component/BiuResizeTable/component/biuTableCell.js +74 -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 +88 -0
- package/dist/esm/component/BiuTable/component/tableCellRender.d.ts +14 -0
- package/dist/esm/component/BiuTable/component/tableCellRender.js +108 -0
- package/dist/esm/component/BiuTable/component/tableSettingRender.d.ts +2 -0
- package/dist/esm/component/BiuTable/component/tableSettingRender.js +345 -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/hooks/index.d.ts +1 -0
- package/dist/esm/component/BiuTable/hooks/index.js +1 -0
- package/dist/esm/component/BiuTable/hooks/useFetchData.d.ts +4 -0
- package/dist/esm/component/BiuTable/hooks/useFetchData.js +64 -0
- package/dist/esm/component/BiuTable/index.d.ts +42 -0
- package/dist/esm/component/BiuTable/index.js +484 -0
- package/dist/esm/component/BiuTable/type.d.ts +168 -0
- package/dist/esm/component/BiuTable/type.js +1 -0
- package/dist/esm/component/BiuTable/utils.d.ts +10 -0
- package/dist/esm/component/BiuTable/utils.js +117 -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 +49 -0
- package/dist/esm/component/BiuTableSelect/index.js +209 -0
- package/dist/esm/component/BiuTabs/index.d.ts +4 -0
- package/dist/esm/component/BiuTabs/index.js +18 -0
- package/dist/esm/component/BiuVirtualTable/index.d.ts +21 -0
- package/dist/esm/component/BiuVirtualTable/index.js +161 -0
- package/dist/esm/component/index.d.ts +35 -0
- package/dist/esm/component/index.js +35 -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 +6 -0
- package/dist/esm/hooks/index.js +6 -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 +15 -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 +43 -0
- package/dist/esm/hooks/useUserInfo.d.ts +4 -0
- package/dist/esm/hooks/useUserInfo.js +15 -0
- package/dist/esm/hooks/useWareInfo.d.ts +4 -0
- package/dist/esm/hooks/useWareInfo.js +15 -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 +402 -0
- package/dist/esm/package/requestWrapper/type.d.ts +36 -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 +35 -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 +153 -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 +4 -0
- package/dist/esm/utils/sysUtils.js +4 -0
- package/package.json +59 -0
@@ -0,0 +1,187 @@
|
|
1
|
+
var _excluded = ["clientid", "initialValue", "searchTimes", "addresstype", "rowLabel", "clientidNull", "addresstypeStr", "value", "requestParams"];
|
2
|
+
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); }
|
3
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
4
|
+
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."); }
|
5
|
+
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); }
|
6
|
+
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; }
|
7
|
+
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; } }
|
8
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
9
|
+
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; }
|
10
|
+
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; }
|
11
|
+
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; }
|
12
|
+
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; }
|
13
|
+
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; }
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
15
|
+
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); }
|
16
|
+
import React, { forwardRef, useCallback, useEffect, useRef, useState } from 'react';
|
17
|
+
import TableSelectBase from "./base";
|
18
|
+
import { GATEWAY_ROUTE_MDM } from "../../../../constant";
|
19
|
+
import { request } from "../../../../package";
|
20
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
21
|
+
var addresslibrarymanageQuery = function addresslibrarymanageQuery(data) {
|
22
|
+
return request({
|
23
|
+
apiName: 'wms.mdm.addresslibrarymanageQuery',
|
24
|
+
data: _objectSpread({
|
25
|
+
invalid: 0,
|
26
|
+
isenableaddress: 1,
|
27
|
+
page: 1,
|
28
|
+
size: 20
|
29
|
+
}, data),
|
30
|
+
requestConfig: {
|
31
|
+
GatewayRoute: GATEWAY_ROUTE_MDM
|
32
|
+
}
|
33
|
+
});
|
34
|
+
};
|
35
|
+
var columns = [{
|
36
|
+
title: '地址编码',
|
37
|
+
dataIndex: 'addresscode',
|
38
|
+
ellipsis: true,
|
39
|
+
width: 100
|
40
|
+
}, {
|
41
|
+
title: '地址名称',
|
42
|
+
dataIndex: 'addressname',
|
43
|
+
ellipsis: true,
|
44
|
+
width: 100
|
45
|
+
}, {
|
46
|
+
title: '联系人',
|
47
|
+
dataIndex: 'linkman',
|
48
|
+
ellipsis: true,
|
49
|
+
width: 100
|
50
|
+
}, {
|
51
|
+
title: '联系方式',
|
52
|
+
dataIndex: 'linkway',
|
53
|
+
ellipsis: true,
|
54
|
+
width: 100
|
55
|
+
}, {
|
56
|
+
title: '详细地址',
|
57
|
+
dataIndex: 'detailedaddress',
|
58
|
+
ellipsis: true,
|
59
|
+
width: 100
|
60
|
+
}, {
|
61
|
+
title: '省',
|
62
|
+
dataIndex: 'province',
|
63
|
+
ellipsis: true,
|
64
|
+
width: 100
|
65
|
+
}, {
|
66
|
+
title: '市',
|
67
|
+
dataIndex: 'city',
|
68
|
+
ellipsis: true,
|
69
|
+
width: 100
|
70
|
+
}, {
|
71
|
+
title: '区/县',
|
72
|
+
dataIndex: 'area',
|
73
|
+
ellipsis: true,
|
74
|
+
width: 100
|
75
|
+
}];
|
76
|
+
export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
77
|
+
var clientid = props.clientid,
|
78
|
+
initialValue = props.initialValue,
|
79
|
+
_props$searchTimes = props.searchTimes,
|
80
|
+
searchTimes = _props$searchTimes === void 0 ? 300 : _props$searchTimes,
|
81
|
+
_props$addresstype = props.addresstype,
|
82
|
+
addresstype = _props$addresstype === void 0 ? '' : _props$addresstype,
|
83
|
+
_props$rowLabel = props.rowLabel,
|
84
|
+
rowLabel = _props$rowLabel === void 0 ? 'addresscode' : _props$rowLabel,
|
85
|
+
_props$clientidNull = props.clientidNull,
|
86
|
+
clientidNull = _props$clientidNull === void 0 ? '' : _props$clientidNull,
|
87
|
+
_props$addresstypeStr = props.addresstypeStr,
|
88
|
+
addresstypeStr = _props$addresstypeStr === void 0 ? '' : _props$addresstypeStr,
|
89
|
+
value = props.value,
|
90
|
+
_props$requestParams = props.requestParams,
|
91
|
+
requestParams = _props$requestParams === void 0 ? function (params) {
|
92
|
+
return params;
|
93
|
+
} : _props$requestParams,
|
94
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
95
|
+
var _useState = useState(),
|
96
|
+
_useState2 = _slicedToArray(_useState, 2),
|
97
|
+
addressList = _useState2[0],
|
98
|
+
setAddressList = _useState2[1];
|
99
|
+
var _useState3 = useState(false),
|
100
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
101
|
+
loading = _useState4[0],
|
102
|
+
setLoading = _useState4[1];
|
103
|
+
var _useState5 = useState(),
|
104
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
105
|
+
initSelectValue = _useState6[0],
|
106
|
+
setInitSelectValue = _useState6[1];
|
107
|
+
var timerRef = useRef();
|
108
|
+
useEffect(function () {
|
109
|
+
if (!props.initSelectValue) {
|
110
|
+
setInitSelectValue(value);
|
111
|
+
}
|
112
|
+
}, [props.initSelectValue, value]);
|
113
|
+
useEffect(function () {
|
114
|
+
if (initialValue && !props.initSelectValue && (props.value === initialValue || props.value === undefined || props.value === null)) {
|
115
|
+
setLoading(true);
|
116
|
+
addresslibrarymanageQuery({
|
117
|
+
id: initialValue,
|
118
|
+
addresstype: addresstype,
|
119
|
+
clientidNull: clientidNull,
|
120
|
+
addresstypeStr: addresstypeStr
|
121
|
+
}).then(function (_ref) {
|
122
|
+
var _ref$rows = _ref.rows,
|
123
|
+
rows = _ref$rows === void 0 ? [] : _ref$rows;
|
124
|
+
if (rows !== null && rows !== void 0 && rows.length && rows[0].id) {
|
125
|
+
setAddressList(rows);
|
126
|
+
setInitSelectValue(rows[0][rowLabel]);
|
127
|
+
if (props.onChange) {
|
128
|
+
props.onChange(initialValue, rows[0]);
|
129
|
+
}
|
130
|
+
if (props.onChangeData) {
|
131
|
+
props.onChangeData(initialValue, rows[0]);
|
132
|
+
}
|
133
|
+
} else {
|
134
|
+
setAddressList([]);
|
135
|
+
setInitSelectValue(undefined);
|
136
|
+
if (props.onChange) {
|
137
|
+
props.onChange(undefined, undefined);
|
138
|
+
}
|
139
|
+
if (props.onChangeData) {
|
140
|
+
props.onChangeData(undefined, {});
|
141
|
+
}
|
142
|
+
}
|
143
|
+
}).finally(function () {
|
144
|
+
setLoading(false);
|
145
|
+
});
|
146
|
+
}
|
147
|
+
}, [addresstype, addresstypeStr, clientidNull, initialValue, props, rowLabel]);
|
148
|
+
var onSearch = useCallback(function (sValue) {
|
149
|
+
if (timerRef.current) clearTimeout(timerRef.current);
|
150
|
+
timerRef.current = setTimeout(function () {
|
151
|
+
setLoading(true);
|
152
|
+
addresslibrarymanageQuery(requestParams({
|
153
|
+
clientid: clientid,
|
154
|
+
remoteSearchCValue: sValue,
|
155
|
+
addresstype: addresstype,
|
156
|
+
clientidNull: clientidNull,
|
157
|
+
addresstypeStr: addresstypeStr
|
158
|
+
})).then(function (_ref2) {
|
159
|
+
var _ref2$rows = _ref2.rows,
|
160
|
+
rows = _ref2$rows === void 0 ? [] : _ref2$rows;
|
161
|
+
if (rows.length === 0) {
|
162
|
+
setAddressList([{
|
163
|
+
addresscode: sValue,
|
164
|
+
addressname: sValue
|
165
|
+
}]);
|
166
|
+
} else {
|
167
|
+
setAddressList(rows);
|
168
|
+
}
|
169
|
+
}).finally(function () {
|
170
|
+
setLoading(false);
|
171
|
+
});
|
172
|
+
}, searchTimes);
|
173
|
+
}, [addresstype, addresstypeStr, clientid, clientidNull, requestParams, searchTimes]);
|
174
|
+
return /*#__PURE__*/_jsx(TableSelectBase, _objectSpread(_objectSpread({
|
175
|
+
ref: ref
|
176
|
+
}, restProps), {}, {
|
177
|
+
initSelectValue: initSelectValue || restProps.initSelectValue,
|
178
|
+
loading: loading,
|
179
|
+
bindField: {
|
180
|
+
rowKey: 'id',
|
181
|
+
rowLabel: rowLabel
|
182
|
+
},
|
183
|
+
onSearch: onSearch,
|
184
|
+
columns: columns,
|
185
|
+
dataSource: addressList
|
186
|
+
}));
|
187
|
+
}));
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<import("antd/es/table").TableProps<any> & import("antd").SelectProps<any, import("antd/lib/select").DefaultOptionType> & {
|
3
|
+
columns?: import("../../..").BiuColumnType[] | undefined;
|
4
|
+
bindField?: {
|
5
|
+
rowKey?: string | undefined;
|
6
|
+
rowLabel?: string | undefined;
|
7
|
+
} | undefined;
|
8
|
+
value?: string | undefined;
|
9
|
+
initialValue?: any;
|
10
|
+
initSelectValue?: string | undefined;
|
11
|
+
onChangeData?: ((value: any, record: any) => void) | undefined;
|
12
|
+
} & React.RefAttributes<unknown>>>;
|
13
|
+
export default _default;
|
@@ -0,0 +1,153 @@
|
|
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 = ["bindField", "columns", "value", "initialValue", "initSelectValue", "dataSource", "onChange", "onChangeData", "loading"];
|
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 { SearchOutlined } from '@ant-design/icons';
|
17
|
+
import { useUpdateLayoutEffect } from 'ahooks';
|
18
|
+
import { Tooltip, Typography } from 'antd';
|
19
|
+
import React, { forwardRef, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
20
|
+
import { BiuASelect, BiuCustomTable } from "../../..";
|
21
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
22
|
+
var Paragraph = Typography.Paragraph;
|
23
|
+
export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
24
|
+
var _props$bindField = props.bindField,
|
25
|
+
_props$bindField2 = _props$bindField === void 0 ? {} : _props$bindField,
|
26
|
+
_props$bindField2$row = _props$bindField2.rowKey,
|
27
|
+
rowKey = _props$bindField2$row === void 0 ? 'id' : _props$bindField2$row,
|
28
|
+
_props$bindField2$row2 = _props$bindField2.rowLabel,
|
29
|
+
rowLabel = _props$bindField2$row2 === void 0 ? 'title' : _props$bindField2$row2,
|
30
|
+
columns = props.columns,
|
31
|
+
value = props.value,
|
32
|
+
initialValue = props.initialValue,
|
33
|
+
initSelectValue = props.initSelectValue,
|
34
|
+
dataSource = props.dataSource,
|
35
|
+
onChange = props.onChange,
|
36
|
+
onChangeData = props.onChangeData,
|
37
|
+
loading = props.loading,
|
38
|
+
exProps = _objectWithoutProperties(props, _excluded);
|
39
|
+
var _useState = useState(initSelectValue),
|
40
|
+
_useState2 = _slicedToArray(_useState, 2),
|
41
|
+
selectValue = _useState2[0],
|
42
|
+
setSelectValue = _useState2[1];
|
43
|
+
var _useState3 = useState(dataSource),
|
44
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
45
|
+
operDataSource = _useState4[0],
|
46
|
+
setOperDataSource = _useState4[1];
|
47
|
+
var formRef = useRef(null);
|
48
|
+
useUpdateLayoutEffect(function () {
|
49
|
+
setOperDataSource(dataSource);
|
50
|
+
}, [dataSource]);
|
51
|
+
useUpdateLayoutEffect(function () {
|
52
|
+
setSelectValue(initSelectValue);
|
53
|
+
}, [initSelectValue]);
|
54
|
+
|
55
|
+
// useUpdateLayoutEffect(() => {
|
56
|
+
// if ((value === undefined || value === null) && operDataSource !== undefined) {
|
57
|
+
// console.log('执行undefined', value, operDataSource);
|
58
|
+
// setSelectValue(undefined);
|
59
|
+
// setOperDataSource([]);
|
60
|
+
// if (onChange) {
|
61
|
+
// onChange(undefined, undefined as any);
|
62
|
+
// }
|
63
|
+
// if (onChangeData) {
|
64
|
+
// onChangeData(undefined, {});
|
65
|
+
// }
|
66
|
+
// }
|
67
|
+
// }, [value]);
|
68
|
+
|
69
|
+
useUpdateLayoutEffect(function () {
|
70
|
+
if (selectValue === undefined || selectValue === null) {
|
71
|
+
setOperDataSource([]);
|
72
|
+
if (onChange) {
|
73
|
+
onChange(undefined, undefined);
|
74
|
+
}
|
75
|
+
if (onChangeData) {
|
76
|
+
onChangeData(undefined, {});
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}, [selectValue]);
|
80
|
+
if (exProps.onSearch) {
|
81
|
+
exProps.suffixIcon = /*#__PURE__*/_jsx(SearchOutlined, {
|
82
|
+
className: "select-search"
|
83
|
+
});
|
84
|
+
}
|
85
|
+
var btnTooltip = useMemo(function () {
|
86
|
+
return /*#__PURE__*/_jsx(Paragraph, {
|
87
|
+
style: {
|
88
|
+
marginBottom: 0,
|
89
|
+
color: '#fff'
|
90
|
+
},
|
91
|
+
copyable: true,
|
92
|
+
children: selectValue
|
93
|
+
});
|
94
|
+
}, [selectValue]);
|
95
|
+
useImperativeHandle(ref, function () {
|
96
|
+
return _objectSpread({}, formRef.current);
|
97
|
+
});
|
98
|
+
return /*#__PURE__*/_jsx(Tooltip, {
|
99
|
+
placement: "top",
|
100
|
+
title: selectValue ? btnTooltip : undefined,
|
101
|
+
children: /*#__PURE__*/_jsx(BiuASelect, _objectSpread(_objectSpread({}, exProps), {}, {
|
102
|
+
ref: formRef,
|
103
|
+
virtual: false,
|
104
|
+
showSearch: true,
|
105
|
+
value: selectValue,
|
106
|
+
defaultActiveFirstOption: false,
|
107
|
+
filterOption: false,
|
108
|
+
dropdownMatchSelectWidth: 400,
|
109
|
+
dropdownRender: function dropdownRender() {
|
110
|
+
return /*#__PURE__*/_jsx("div", {
|
111
|
+
onMouseDown: function onMouseDown(event) {
|
112
|
+
return event.preventDefault();
|
113
|
+
},
|
114
|
+
style: {
|
115
|
+
maxWidth: '400px'
|
116
|
+
},
|
117
|
+
children: /*#__PURE__*/_jsx(BiuCustomTable, {
|
118
|
+
loading: loading,
|
119
|
+
bordered: false,
|
120
|
+
scroll: {
|
121
|
+
y: 300,
|
122
|
+
x: true
|
123
|
+
},
|
124
|
+
onRow: function onRow(record) {
|
125
|
+
return {
|
126
|
+
onDoubleClick: function onDoubleClick() {
|
127
|
+
var _formRef$current;
|
128
|
+
setSelectValue(record[rowLabel]);
|
129
|
+
if (onChange) {
|
130
|
+
onChange(record[rowKey], record);
|
131
|
+
}
|
132
|
+
if (onChangeData) {
|
133
|
+
onChangeData(record[rowKey], record);
|
134
|
+
}
|
135
|
+
(_formRef$current = formRef.current) === null || _formRef$current === void 0 || _formRef$current.blur();
|
136
|
+
}
|
137
|
+
};
|
138
|
+
},
|
139
|
+
rowKey: rowKey,
|
140
|
+
pagination: false,
|
141
|
+
columns: columns,
|
142
|
+
dataSource: operDataSource
|
143
|
+
})
|
144
|
+
});
|
145
|
+
},
|
146
|
+
onChange: function onChange(cValue) {
|
147
|
+
if (exProps.allowClear && cValue === undefined) {
|
148
|
+
setSelectValue(undefined);
|
149
|
+
}
|
150
|
+
}
|
151
|
+
}))
|
152
|
+
});
|
153
|
+
}));
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import type { BiuColumnType } from "../../..";
|
3
|
+
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<import("antd/es/table").TableProps<any> & import("antd").SelectProps<any, import("antd/lib/select").DefaultOptionType> & {
|
4
|
+
columns?: BiuColumnType[] | undefined;
|
5
|
+
bindField?: {
|
6
|
+
rowKey?: string | undefined;
|
7
|
+
rowLabel?: string | undefined;
|
8
|
+
} | undefined;
|
9
|
+
value?: string | undefined;
|
10
|
+
initialValue?: any;
|
11
|
+
initSelectValue?: string | undefined;
|
12
|
+
onChangeData?: ((value: any, record: any) => void) | undefined;
|
13
|
+
} & {
|
14
|
+
ownerId: number;
|
15
|
+
clientId: number;
|
16
|
+
searchTimes?: number | undefined;
|
17
|
+
rowLabel?: string | undefined;
|
18
|
+
goodsAttribute: string;
|
19
|
+
isLoadAttribute: boolean;
|
20
|
+
} & React.RefAttributes<unknown>>>;
|
21
|
+
export default _default;
|
@@ -0,0 +1,238 @@
|
|
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 = ["ownerId", "clientId", "initialValue", "searchTimes", "rowLabel", "goodsAttribute", "isLoadAttribute", "onChangeData", "onChange", "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, useRef, useState } from 'react';
|
17
|
+
import TableSelectBase from "./base";
|
18
|
+
import { GATEWAY_ROUTE_WMS } from "../../../../constant";
|
19
|
+
import { request } from "../../../../package";
|
20
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
21
|
+
var getClientInfoExtendAttributeList = function getClientInfoExtendAttributeList(data) {
|
22
|
+
return request({
|
23
|
+
apiName: 'wms.basedata.extendAttributeQuery',
|
24
|
+
data: data,
|
25
|
+
requestConfig: {
|
26
|
+
GatewayRoute: GATEWAY_ROUTE_WMS
|
27
|
+
}
|
28
|
+
});
|
29
|
+
};
|
30
|
+
var EXT_INFO = /*#__PURE__*/function (EXT_INFO) {
|
31
|
+
EXT_INFO["prefix"] = "ext";
|
32
|
+
EXT_INFO["prefixAttr"] = "attribute";
|
33
|
+
EXT_INFO["\u5165\u5E93\u5FC5\u586B"] = "isInFill";
|
34
|
+
EXT_INFO["\u4E0A\u67B6\u5FC5\u586B"] = "isSheFill";
|
35
|
+
EXT_INFO["\u5E93\u5B58\u5FC5\u586B"] = "isInvFill";
|
36
|
+
EXT_INFO["\u51FA\u5E93\u5FC5\u586B"] = "isOutFill";
|
37
|
+
EXT_INFO["\u5165\u5E93\u8BA2\u5355\u663E\u793A"] = "isInShow";
|
38
|
+
EXT_INFO["\u5165\u5E93\u4E0A\u67B6\u663E\u793A"] = "isSheShow";
|
39
|
+
EXT_INFO["\u51FA\u5E93\u8BA2\u5355\u663E\u793A"] = "isOutShow";
|
40
|
+
EXT_INFO["\u62E3\u8D27\u5355\u663E\u793A"] = "isPickingShow";
|
41
|
+
EXT_INFO["\u5165\u5E93\u6253\u5370\u663E\u793A"] = "isInPrintShow";
|
42
|
+
EXT_INFO["\u51FA\u5E93\u6253\u5370\u663E\u793A"] = "isOutPrintShow";
|
43
|
+
EXT_INFO["\u62E3\u8D27\u6253\u5370\u663E\u793A"] = "isPicPrintShow";
|
44
|
+
EXT_INFO["\u5E93\u5B58\u663E\u793A"] = "isInvShow";
|
45
|
+
return EXT_INFO;
|
46
|
+
}(EXT_INFO || {});
|
47
|
+
var queryGoodsInfo = function queryGoodsInfo(data) {
|
48
|
+
return request({
|
49
|
+
apiName: 'wms.basedata.queryGoodsInfo',
|
50
|
+
data: data,
|
51
|
+
requestConfig: {
|
52
|
+
GatewayRoute: GATEWAY_ROUTE_WMS
|
53
|
+
}
|
54
|
+
});
|
55
|
+
};
|
56
|
+
var initColumns = [{
|
57
|
+
title: '商品编码',
|
58
|
+
dataIndex: 'goodsCode',
|
59
|
+
ellipsis: true,
|
60
|
+
width: 80
|
61
|
+
}, {
|
62
|
+
title: '商品名称',
|
63
|
+
dataIndex: 'goodsName',
|
64
|
+
ellipsis: true,
|
65
|
+
width: 80
|
66
|
+
}, {
|
67
|
+
title: '客户商品编码',
|
68
|
+
dataIndex: 'clientGoodsCode',
|
69
|
+
ellipsis: true,
|
70
|
+
width: 80
|
71
|
+
}];
|
72
|
+
export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
73
|
+
var ownerId = props.ownerId,
|
74
|
+
clientId = props.clientId,
|
75
|
+
initialValue = props.initialValue,
|
76
|
+
_props$searchTimes = props.searchTimes,
|
77
|
+
searchTimes = _props$searchTimes === void 0 ? 300 : _props$searchTimes,
|
78
|
+
_props$rowLabel = props.rowLabel,
|
79
|
+
rowLabel = _props$rowLabel === void 0 ? 'goodsCode' : _props$rowLabel,
|
80
|
+
goodsAttribute = props.goodsAttribute,
|
81
|
+
_props$isLoadAttribut = props.isLoadAttribute,
|
82
|
+
isLoadAttribute = _props$isLoadAttribut === void 0 ? false : _props$isLoadAttribut,
|
83
|
+
onChangeData = props.onChangeData,
|
84
|
+
onChange = props.onChange,
|
85
|
+
value = props.value,
|
86
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
87
|
+
var _useState = useState(initColumns),
|
88
|
+
_useState2 = _slicedToArray(_useState, 2),
|
89
|
+
columns = _useState2[0],
|
90
|
+
setColumns = _useState2[1];
|
91
|
+
var _useState3 = useState(),
|
92
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
93
|
+
goodsList = _useState4[0],
|
94
|
+
setGoodsList = _useState4[1];
|
95
|
+
var _useState5 = useState(false),
|
96
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
97
|
+
loading = _useState6[0],
|
98
|
+
setLoading = _useState6[1];
|
99
|
+
var _useState7 = useState(),
|
100
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
101
|
+
initSelectValue = _useState8[0],
|
102
|
+
setInitSelectValue = _useState8[1];
|
103
|
+
var timerRef = useRef();
|
104
|
+
useEffect(function () {
|
105
|
+
if (ownerId) {
|
106
|
+
// 加载货物拓展属性
|
107
|
+
getClientInfoExtendAttributeList({
|
108
|
+
ownerId: ownerId,
|
109
|
+
attributeType: '1',
|
110
|
+
isActive: '1',
|
111
|
+
isDelete: '1'
|
112
|
+
}).then(function (_ref) {
|
113
|
+
var _ref$rows = _ref.rows,
|
114
|
+
rows = _ref$rows === void 0 ? [] : _ref$rows;
|
115
|
+
setColumns(initColumns.concat(rows.map(function (item) {
|
116
|
+
return {
|
117
|
+
title: item.attributeName,
|
118
|
+
dataIndex: "".concat(EXT_INFO.prefix).concat(item.attributeNumber),
|
119
|
+
ellipsis: true,
|
120
|
+
width: 60
|
121
|
+
};
|
122
|
+
})));
|
123
|
+
});
|
124
|
+
}
|
125
|
+
setGoodsList([]);
|
126
|
+
}, [ownerId]);
|
127
|
+
useEffect(function () {
|
128
|
+
if ((ownerId || clientId) && initialValue && !props.initSelectValue && (value === initialValue || value === undefined || value === null)) {
|
129
|
+
setLoading(true);
|
130
|
+
queryGoodsInfo({
|
131
|
+
id: initialValue,
|
132
|
+
ownerId: ownerId,
|
133
|
+
clientId: clientId,
|
134
|
+
goodsAttribute: goodsAttribute
|
135
|
+
}).then(function (_ref2) {
|
136
|
+
var _ref2$rows = _ref2.rows,
|
137
|
+
rows = _ref2$rows === void 0 ? [] : _ref2$rows;
|
138
|
+
if (rows !== null && rows !== void 0 && rows.length && rows[0].id) {
|
139
|
+
setGoodsList(rows);
|
140
|
+
setInitSelectValue(rows[0][rowLabel]);
|
141
|
+
getClientInfoExtendAttributeList({
|
142
|
+
ownerId: clientId,
|
143
|
+
goodsId: initialValue,
|
144
|
+
attributeType: 2,
|
145
|
+
isActive: '1'
|
146
|
+
}).then(function (data) {
|
147
|
+
if (onChange) {
|
148
|
+
onChange(initialValue, _objectSpread(_objectSpread({}, rows[0]), {}, {
|
149
|
+
extendAttributeList: data.rows
|
150
|
+
}));
|
151
|
+
}
|
152
|
+
if (onChangeData) {
|
153
|
+
onChangeData(initialValue, _objectSpread(_objectSpread({}, rows[0]), {}, {
|
154
|
+
extendAttributeList: data.rows
|
155
|
+
}));
|
156
|
+
}
|
157
|
+
});
|
158
|
+
} else {
|
159
|
+
setGoodsList([]);
|
160
|
+
setInitSelectValue(undefined);
|
161
|
+
if (onChange) {
|
162
|
+
onChange(undefined, undefined);
|
163
|
+
}
|
164
|
+
if (onChangeData) {
|
165
|
+
onChangeData(undefined, {});
|
166
|
+
}
|
167
|
+
}
|
168
|
+
}).finally(function () {
|
169
|
+
setLoading(false);
|
170
|
+
});
|
171
|
+
}
|
172
|
+
}, [initialValue, ownerId, clientId, onChange, onChangeData, goodsAttribute, rowLabel, props.initSelectValue, props.value, value]);
|
173
|
+
var onSearch = useCallback(function (sValue) {
|
174
|
+
if (timerRef.current) clearTimeout(timerRef.current);
|
175
|
+
timerRef.current = setTimeout(function () {
|
176
|
+
setLoading(true);
|
177
|
+
queryGoodsInfo({
|
178
|
+
ownerId: ownerId,
|
179
|
+
clientId: clientId,
|
180
|
+
remoteSearchCValue: sValue,
|
181
|
+
isEnable: 0,
|
182
|
+
isExt: 0,
|
183
|
+
goodsAttribute: goodsAttribute
|
184
|
+
}).then(function (_ref3) {
|
185
|
+
var rows = _ref3.rows;
|
186
|
+
setGoodsList(rows || []);
|
187
|
+
}).finally(function () {
|
188
|
+
setLoading(false);
|
189
|
+
});
|
190
|
+
}, searchTimes);
|
191
|
+
}, [searchTimes, ownerId, clientId, goodsAttribute]);
|
192
|
+
var baseChangeData = useCallback(function (params, record) {
|
193
|
+
if (isLoadAttribute) {
|
194
|
+
getClientInfoExtendAttributeList({
|
195
|
+
ownerId: clientId,
|
196
|
+
goodsId: params,
|
197
|
+
attributeType: 2,
|
198
|
+
isActive: '1'
|
199
|
+
}).then(function (data) {
|
200
|
+
if (onChange) {
|
201
|
+
onChange(params, _objectSpread(_objectSpread({}, record), {}, {
|
202
|
+
extendAttributeList: data.rows
|
203
|
+
}));
|
204
|
+
}
|
205
|
+
if (onChangeData) {
|
206
|
+
onChangeData(params, _objectSpread(_objectSpread({}, record), {}, {
|
207
|
+
extendAttributeList: data.rows
|
208
|
+
}));
|
209
|
+
}
|
210
|
+
});
|
211
|
+
} else {
|
212
|
+
if (onChange) {
|
213
|
+
onChange(params, _objectSpread(_objectSpread({}, record), {}, {
|
214
|
+
extendAttributeList: []
|
215
|
+
}));
|
216
|
+
}
|
217
|
+
if (onChangeData) {
|
218
|
+
onChangeData(params, _objectSpread(_objectSpread({}, record), {}, {
|
219
|
+
extendAttributeList: []
|
220
|
+
}));
|
221
|
+
}
|
222
|
+
}
|
223
|
+
}, [isLoadAttribute, clientId, onChange, onChangeData]);
|
224
|
+
return /*#__PURE__*/_jsx(TableSelectBase, _objectSpread(_objectSpread({
|
225
|
+
ref: ref
|
226
|
+
}, restProps), {}, {
|
227
|
+
loading: loading,
|
228
|
+
initSelectValue: initSelectValue || restProps.initSelectValue,
|
229
|
+
bindField: {
|
230
|
+
rowKey: 'id',
|
231
|
+
rowLabel: rowLabel
|
232
|
+
},
|
233
|
+
onSearch: onSearch,
|
234
|
+
columns: columns,
|
235
|
+
dataSource: goodsList,
|
236
|
+
onChangeData: baseChangeData
|
237
|
+
}));
|
238
|
+
}));
|