@fle-ui/plus-choose-site-goods 1.1.11-alpha.0 → 1.1.12-alpha.0
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/es/index.d.ts +1 -0
- package/es/index.js +8 -8
- package/lib/index.d.ts +1 -0
- package/lib/index.js +8 -8
- package/package.json +3 -3
package/es/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export interface ChooseSiteGoodsProps extends ModalProps {
|
|
|
18
18
|
hiddenColumns?: Array<string>;
|
|
19
19
|
hiddenSearchProps?: Array<string>;
|
|
20
20
|
needControl?: boolean;
|
|
21
|
+
customParams?: Record<string, any>;
|
|
21
22
|
}
|
|
22
23
|
declare const ChooseSiteGoods: FC<ChooseSiteGoodsProps>;
|
|
23
24
|
export default ChooseSiteGoods;
|
package/es/index.js
CHANGED
|
@@ -31,7 +31,7 @@ import "antd/es/input/style";
|
|
|
31
31
|
import _Input from "antd/es/input";
|
|
32
32
|
import "antd/es/tabs/style";
|
|
33
33
|
import _Tabs from "antd/es/tabs";
|
|
34
|
-
var _excluded = ["env", "token", "loginErrFn", "onClose", "siteId", "app", "multiple", "defaultSelectedGoodsIds", "onSelectOk", "showMore", "showMoreText", "tabsConfig", "hiddenColumns", "hiddenSearchProps", "needControl"];
|
|
34
|
+
var _excluded = ["env", "token", "loginErrFn", "onClose", "siteId", "app", "multiple", "defaultSelectedGoodsIds", "onSelectOk", "showMore", "showMoreText", "tabsConfig", "hiddenColumns", "hiddenSearchProps", "needControl", "customParams"];
|
|
35
35
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
36
36
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
37
37
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
@@ -55,12 +55,12 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
55
55
|
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; }
|
|
56
56
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
57
57
|
import React, { useEffect, useState, useRef } from 'react';
|
|
58
|
+
import _ from 'lodash';
|
|
58
59
|
import ProImage from '@fle-ui/plus-image';
|
|
59
60
|
import ChooseMallGoods from '@fle-ui/plus-choose-mall-goods';
|
|
60
61
|
import AddressSelection from '@fle-ui/plus-address-selection';
|
|
61
62
|
import { QuestionCircleOutlined, LoadingOutlined } from '@ant-design/icons';
|
|
62
63
|
import PlusConfigProvider from '@fle-ui/plus-config-provider';
|
|
63
|
-
import _ from 'lodash';
|
|
64
64
|
import Icon from './components/icon';
|
|
65
65
|
import { tabs, tabsSearchParamsMap, priceRangeForOnce, priceRangeForPurchase, profitRangeForOnce, profitRangeForPurchase, sortOptions } from './utils/options';
|
|
66
66
|
import api from './utils/api';
|
|
@@ -97,6 +97,8 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
97
97
|
hiddenSearchProps = _props$hiddenSearchPr === void 0 ? [] : _props$hiddenSearchPr,
|
|
98
98
|
_props$needControl = props.needControl,
|
|
99
99
|
needControl = _props$needControl === void 0 ? false : _props$needControl,
|
|
100
|
+
_props$customParams = props.customParams,
|
|
101
|
+
customParams = _props$customParams === void 0 ? {} : _props$customParams,
|
|
100
102
|
otherProps = _objectWithoutProperties(props, _excluded);
|
|
101
103
|
var showTabs = useRef(tabs.filter(function (tab) {
|
|
102
104
|
return tabsConfig.includes(tab.key);
|
|
@@ -121,13 +123,11 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
121
123
|
flagCategory: undefined,
|
|
122
124
|
saleableCity: undefined // dgss可售卖城市
|
|
123
125
|
};
|
|
124
|
-
// http ------------ begin
|
|
125
126
|
var $http = request({
|
|
126
127
|
baseUrl: getApiHost(env),
|
|
127
128
|
token: token,
|
|
128
129
|
loginErrFn: loginErrFn
|
|
129
130
|
});
|
|
130
|
-
// http ------------ end
|
|
131
131
|
useEffect(function () {
|
|
132
132
|
if (env) {
|
|
133
133
|
window.localStorage.setItem('env', env);
|
|
@@ -224,7 +224,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
224
224
|
}).join(',') : '',
|
|
225
225
|
flagIndustry: searchParams.flagIndustry,
|
|
226
226
|
flagCategory: ((_searchParams$flagCat = searchParams.flagCategory) === null || _searchParams$flagCat === void 0 ? void 0 : _searchParams$flagCat.length) ? searchParams.flagCategory[searchParams.flagCategory.length - 1] : undefined
|
|
227
|
-
});
|
|
227
|
+
}, customParams);
|
|
228
228
|
if ((_searchParams$priceTy = searchParams.priceType) === null || _searchParams$priceTy === void 0 ? void 0 : _searchParams$priceTy.includes('once')) {
|
|
229
229
|
params['isOnce'] = 1;
|
|
230
230
|
}
|
|
@@ -601,7 +601,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
601
601
|
// 获取全局控制状态
|
|
602
602
|
var getGoodControlInfo = /*#__PURE__*/function () {
|
|
603
603
|
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
604
|
-
var res, _res$data3
|
|
604
|
+
var res, _res$data3;
|
|
605
605
|
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
606
606
|
while (1) switch (_context7.prev = _context7.next) {
|
|
607
607
|
case 0:
|
|
@@ -611,8 +611,8 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
611
611
|
res = _context7.sent;
|
|
612
612
|
if (res === null || res === void 0 ? void 0 : res.success) {
|
|
613
613
|
setShow({
|
|
614
|
-
priceShow: ((_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.
|
|
615
|
-
supplierShow:
|
|
614
|
+
priceShow: ((_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.customer_mall_cost_price_show) == '1' ? true : false,
|
|
615
|
+
supplierShow: true
|
|
616
616
|
});
|
|
617
617
|
}
|
|
618
618
|
case 4:
|
package/lib/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export interface ChooseSiteGoodsProps extends ModalProps {
|
|
|
18
18
|
hiddenColumns?: Array<string>;
|
|
19
19
|
hiddenSearchProps?: Array<string>;
|
|
20
20
|
needControl?: boolean;
|
|
21
|
+
customParams?: Record<string, any>;
|
|
21
22
|
}
|
|
22
23
|
declare const ChooseSiteGoods: FC<ChooseSiteGoodsProps>;
|
|
23
24
|
export default ChooseSiteGoods;
|
package/lib/index.js
CHANGED
|
@@ -7,12 +7,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _antd = require("antd");
|
|
10
|
+
var _lodash = _interopRequireDefault(require("lodash"));
|
|
10
11
|
var _plusImage = _interopRequireDefault(require("@fle-ui/plus-image"));
|
|
11
12
|
var _plusChooseMallGoods = _interopRequireDefault(require("@fle-ui/plus-choose-mall-goods"));
|
|
12
13
|
var _plusAddressSelection = _interopRequireDefault(require("@fle-ui/plus-address-selection"));
|
|
13
14
|
var _icons = require("@ant-design/icons");
|
|
14
15
|
var _plusConfigProvider = _interopRequireDefault(require("@fle-ui/plus-config-provider"));
|
|
15
|
-
var _lodash = _interopRequireDefault(require("lodash"));
|
|
16
16
|
var _icon = _interopRequireDefault(require("./components/icon"));
|
|
17
17
|
var _options = require("./utils/options");
|
|
18
18
|
var _api = _interopRequireDefault(require("./utils/api"));
|
|
@@ -20,7 +20,7 @@ var _request = _interopRequireDefault(require("./utils/request"));
|
|
|
20
20
|
var _serviceEnv = require("./utils/serviceEnv");
|
|
21
21
|
var _common = require("./utils/common");
|
|
22
22
|
require("./index.less");
|
|
23
|
-
var _excluded = ["env", "token", "loginErrFn", "onClose", "siteId", "app", "multiple", "defaultSelectedGoodsIds", "onSelectOk", "showMore", "showMoreText", "tabsConfig", "hiddenColumns", "hiddenSearchProps", "needControl"];
|
|
23
|
+
var _excluded = ["env", "token", "loginErrFn", "onClose", "siteId", "app", "multiple", "defaultSelectedGoodsIds", "onSelectOk", "showMore", "showMoreText", "tabsConfig", "hiddenColumns", "hiddenSearchProps", "needControl", "customParams"];
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
26
26
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -75,6 +75,8 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
75
75
|
hiddenSearchProps = _props$hiddenSearchPr === void 0 ? [] : _props$hiddenSearchPr,
|
|
76
76
|
_props$needControl = props.needControl,
|
|
77
77
|
needControl = _props$needControl === void 0 ? false : _props$needControl,
|
|
78
|
+
_props$customParams = props.customParams,
|
|
79
|
+
customParams = _props$customParams === void 0 ? {} : _props$customParams,
|
|
78
80
|
otherProps = _objectWithoutProperties(props, _excluded);
|
|
79
81
|
var showTabs = (0, _react.useRef)(_options.tabs.filter(function (tab) {
|
|
80
82
|
return tabsConfig.includes(tab.key);
|
|
@@ -99,13 +101,11 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
99
101
|
flagCategory: undefined,
|
|
100
102
|
saleableCity: undefined // dgss可售卖城市
|
|
101
103
|
};
|
|
102
|
-
// http ------------ begin
|
|
103
104
|
var $http = (0, _request.default)({
|
|
104
105
|
baseUrl: (0, _serviceEnv.getApiHost)(env),
|
|
105
106
|
token: token,
|
|
106
107
|
loginErrFn: loginErrFn
|
|
107
108
|
});
|
|
108
|
-
// http ------------ end
|
|
109
109
|
(0, _react.useEffect)(function () {
|
|
110
110
|
if (env) {
|
|
111
111
|
window.localStorage.setItem('env', env);
|
|
@@ -202,7 +202,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
202
202
|
}).join(',') : '',
|
|
203
203
|
flagIndustry: searchParams.flagIndustry,
|
|
204
204
|
flagCategory: ((_searchParams$flagCat = searchParams.flagCategory) === null || _searchParams$flagCat === void 0 ? void 0 : _searchParams$flagCat.length) ? searchParams.flagCategory[searchParams.flagCategory.length - 1] : undefined
|
|
205
|
-
});
|
|
205
|
+
}, customParams);
|
|
206
206
|
if ((_searchParams$priceTy = searchParams.priceType) === null || _searchParams$priceTy === void 0 ? void 0 : _searchParams$priceTy.includes('once')) {
|
|
207
207
|
params['isOnce'] = 1;
|
|
208
208
|
}
|
|
@@ -579,7 +579,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
579
579
|
// 获取全局控制状态
|
|
580
580
|
var getGoodControlInfo = /*#__PURE__*/function () {
|
|
581
581
|
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
582
|
-
var res, _res$data3
|
|
582
|
+
var res, _res$data3;
|
|
583
583
|
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
584
584
|
while (1) switch (_context7.prev = _context7.next) {
|
|
585
585
|
case 0:
|
|
@@ -589,8 +589,8 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
589
589
|
res = _context7.sent;
|
|
590
590
|
if (res === null || res === void 0 ? void 0 : res.success) {
|
|
591
591
|
setShow({
|
|
592
|
-
priceShow: ((_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.
|
|
593
|
-
supplierShow:
|
|
592
|
+
priceShow: ((_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.customer_mall_cost_price_show) == '1' ? true : false,
|
|
593
|
+
supplierShow: true
|
|
594
594
|
});
|
|
595
595
|
}
|
|
596
596
|
case 4:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fle-ui/plus-choose-site-goods",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.12-alpha.0",
|
|
4
4
|
"description": "@fle-ui/plus-choose-site-goods",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fle-ui",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@ant-design/icons": "^5.3.0",
|
|
29
29
|
"@fle-tools/env": "^1.0.3",
|
|
30
30
|
"@fle-ui/plus-address-selection": "^1.0.14",
|
|
31
|
-
"@fle-ui/plus-choose-mall-goods": "^1.1.
|
|
31
|
+
"@fle-ui/plus-choose-mall-goods": "^1.1.12-alpha.0"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"antd": ">=4.23.0 || >=5.0.0",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "d4a05bbe850cdda174903f0591a84b48a63dc7b3"
|
|
49
49
|
}
|