@fle-ui/plus-choose-goods 0.0.17-beta.0 → 0.0.20
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 +2 -1
- package/es/index.js +55 -51
- package/es/utils/options.d.ts +0 -4
- package/es/utils/options.js +0 -14
- package/es/utils/request.js +1 -1
- package/es/utils/serviceEnv.js +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +56 -53
- package/lib/utils/options.d.ts +0 -4
- package/lib/utils/options.js +1 -15
- package/lib/utils/request.js +2 -2
- package/lib/utils/serviceEnv.js +1 -1
- package/package.json +5 -5
- package/LICENSE +0 -1
package/es/index.d.ts
CHANGED
|
@@ -8,7 +8,9 @@ export interface ChooseGoodsProps {
|
|
|
8
8
|
/** 按钮文案 */
|
|
9
9
|
actionText?: string;
|
|
10
10
|
open: boolean;
|
|
11
|
+
/** 接口环境,默认取localstorage中的env */
|
|
11
12
|
env?: EnvType;
|
|
13
|
+
/** 默认取Cookies中的token */
|
|
12
14
|
token?: string;
|
|
13
15
|
loginErrFn?: () => void;
|
|
14
16
|
multiple?: boolean;
|
|
@@ -26,7 +28,6 @@ export interface ChooseGoodsProps {
|
|
|
26
28
|
onOk?: (selectedGoodsId: React.Key[], selectedGoods: any[]) => void;
|
|
27
29
|
onCancel?: () => void;
|
|
28
30
|
needControl?: boolean;
|
|
29
|
-
muduleType?: string;
|
|
30
31
|
}
|
|
31
32
|
declare const ChooseSiteGoods: FC<ChooseGoodsProps>;
|
|
32
33
|
export default ChooseSiteGoods;
|
package/es/index.js
CHANGED
|
@@ -15,25 +15,33 @@ import "antd/es/input/style";
|
|
|
15
15
|
import _Input from "antd/es/input";
|
|
16
16
|
import "antd/es/typography/style";
|
|
17
17
|
import _Typography from "antd/es/typography";
|
|
18
|
-
function _toConsumableArray(
|
|
18
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
19
19
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
20
|
-
function _iterableToArray(
|
|
21
|
-
function _arrayWithoutHoles(
|
|
22
|
-
function _createForOfIteratorHelper(
|
|
23
|
-
function _regeneratorRuntime() { "use strict";
|
|
24
|
-
function
|
|
25
|
-
function
|
|
20
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
21
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
22
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, 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 o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
23
|
+
function _regeneratorRuntime() { "use strict"; var r = _regenerator(), e = r.m(_regeneratorRuntime), t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; function n(r) { var e = "function" == typeof r && r.constructor; return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); } var o = { throw: 1, return: 2, break: 3, continue: 3 }; function a(r) { var e, t; return function (n) { e || (e = { stop: function stop() { return t(n.a, 2); }, catch: function _catch() { return n.v; }, abrupt: function abrupt(r, e) { return t(n.a, o[r], e); }, delegateYield: function delegateYield(r, o, a) { return e.resultName = o, t(n.d, _regeneratorValues(r), a); }, finish: function finish(r) { return t(n.f, r); } }, t = function t(r, _t, o) { n.p = e.prev, n.n = e.next; try { return r(_t, o); } finally { e.next = n.n; } }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; try { return r.call(this, e); } finally { n.p = e.prev, n.n = e.next; } }; } return (_regeneratorRuntime = function _regeneratorRuntime() { return { wrap: function wrap(e, t, n, o) { return r.w(a(e), t, n, o && o.reverse()); }, isGeneratorFunction: n, mark: r.m, awrap: function awrap(r, e) { return new _OverloadYield(r, e); }, AsyncIterator: _regeneratorAsyncIterator, async: function async(r, e, t, o, u) { return (n(e) ? _regeneratorAsyncGen : _regeneratorAsync)(a(r), e, t, o, u); }, keys: _regeneratorKeys, values: _regeneratorValues }; })(); }
|
|
24
|
+
function _regeneratorValues(e) { if (null != e) { var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], r = 0; if (t) return t.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) return { next: function next() { return e && r >= e.length && (e = void 0), { value: e && e[r++], done: !e }; } }; } throw new TypeError(_typeof(e) + " is not iterable"); }
|
|
25
|
+
function _regeneratorKeys(e) { var n = Object(e), r = []; for (var t in n) r.unshift(t); return function e() { for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; return e.done = !0, e; }; }
|
|
26
|
+
function _regeneratorAsync(n, e, r, t, o) { var a = _regeneratorAsyncGen(n, e, r, t, o); return a.next().then(function (n) { return n.done ? n.value : a.next(); }); }
|
|
27
|
+
function _regeneratorAsyncGen(r, e, t, o, n) { return new _regeneratorAsyncIterator(_regenerator().w(r, e, t, o), n || Promise); }
|
|
28
|
+
function _regeneratorAsyncIterator(t, e) { function n(r, o, i, f) { try { var c = t[r](o), u = c.value; return u instanceof _OverloadYield ? e.resolve(u.v).then(function (t) { n("next", t, i, f); }, function (t) { n("throw", t, i, f); }) : e.resolve(u).then(function (t) { c.value = t, i(c); }, function (t) { return n("throw", t, i, f); }); } catch (t) { f(t); } } var r; this.next || (_regeneratorDefine2(_regeneratorAsyncIterator.prototype), _regeneratorDefine2(_regeneratorAsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () { return this; })), _regeneratorDefine2(this, "_invoke", function (t, o, i) { function f() { return new e(function (e, r) { n(t, i, e, r); }); } return r = r ? r.then(f, f) : f(); }, !0); }
|
|
29
|
+
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
30
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
31
|
+
function _OverloadYield(e, d) { this.v = e, this.k = d; }
|
|
32
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
33
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
26
34
|
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; }
|
|
27
35
|
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; }
|
|
28
|
-
function _defineProperty(
|
|
36
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
29
37
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
30
38
|
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); }
|
|
31
|
-
function _slicedToArray(
|
|
39
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
32
40
|
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."); }
|
|
33
|
-
function _unsupportedIterableToArray(
|
|
34
|
-
function _arrayLikeToArray(
|
|
41
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
42
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
35
43
|
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; } }
|
|
36
|
-
function _arrayWithHoles(
|
|
44
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
37
45
|
import React, { useEffect, useState, useRef, useMemo } from 'react';
|
|
38
46
|
import lodash from 'lodash';
|
|
39
47
|
import { useRequest } from 'ahooks';
|
|
@@ -41,16 +49,13 @@ import PlusRangeInput from '@fle-ui/plus-range-input';
|
|
|
41
49
|
import PlusConfigProvider from '@fle-ui/plus-config-provider';
|
|
42
50
|
import { ProTable, QueryFilter } from '@ant-design/pro-components';
|
|
43
51
|
import ProImage from '@fle-ui/plus-image';
|
|
44
|
-
import { priceRangeForPurchase, sortOptions
|
|
52
|
+
import { priceRangeForPurchase, sortOptions } from './utils/options';
|
|
45
53
|
import httpClient from './utils/request';
|
|
46
54
|
import { getApiHost } from './utils/serviceEnv';
|
|
47
55
|
import api from './utils/api';
|
|
48
56
|
import Icon from './components/icon';
|
|
49
57
|
import { showMoney, formartNum } from './utils/common';
|
|
50
58
|
import './index.less';
|
|
51
|
-
var priceTypeOptionEnum = {
|
|
52
|
-
mall: mallPriceRangeForPurchase
|
|
53
|
-
};
|
|
54
59
|
var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
55
60
|
var _props$title = props.title,
|
|
56
61
|
title = _props$title === void 0 ? '挑选商品' : _props$title,
|
|
@@ -82,8 +87,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
82
87
|
y: 400
|
|
83
88
|
} : _props$scroll,
|
|
84
89
|
_props$needControl = props.needControl,
|
|
85
|
-
needControl = _props$needControl === void 0 ? false : _props$needControl
|
|
86
|
-
muduleType = props.muduleType;
|
|
90
|
+
needControl = _props$needControl === void 0 ? false : _props$needControl;
|
|
87
91
|
var formRef = useRef();
|
|
88
92
|
var $http = httpClient({
|
|
89
93
|
baseURL: getApiHost(env),
|
|
@@ -105,8 +109,8 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
105
109
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
106
110
|
searchParams = _useState4[0],
|
|
107
111
|
setSearchParams = _useState4[1];
|
|
108
|
-
var _useRequest = useRequest(
|
|
109
|
-
var _ref = _asyncToGenerator(
|
|
112
|
+
var _useRequest = useRequest(/*#__PURE__*/function () {
|
|
113
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(val) {
|
|
110
114
|
var _val$flagCategory, _res$data, _res$data2;
|
|
111
115
|
var params, _val$rangePrice, _val$rangePrice2, _val$priceType, _val$priceType2, res;
|
|
112
116
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -164,27 +168,27 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
164
168
|
flagTagsOptions = _useState8[0],
|
|
165
169
|
setFlagTagsOptions = _useState8[1]; // 商品标签
|
|
166
170
|
var _useState9 = useState([]),
|
|
167
|
-
|
|
168
|
-
flagIndustryOptions =
|
|
169
|
-
setFlagIndustryOptions =
|
|
171
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
172
|
+
flagIndustryOptions = _useState0[0],
|
|
173
|
+
setFlagIndustryOptions = _useState0[1]; // 行业标签
|
|
174
|
+
var _useState1 = useState([]),
|
|
175
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
176
|
+
flagCategoryOptions = _useState10[0],
|
|
177
|
+
setFlagCategoryOptions = _useState10[1]; // 品类标签
|
|
170
178
|
var _useState11 = useState([]),
|
|
171
179
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
var _useState13 = useState(
|
|
175
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
176
|
-
cascaderOptions = _useState14[0],
|
|
177
|
-
setCascaderOptions = _useState14[1]; //商品标签组
|
|
178
|
-
var _useState15 = useState({
|
|
180
|
+
cascaderOptions = _useState12[0],
|
|
181
|
+
setCascaderOptions = _useState12[1]; //商品标签组
|
|
182
|
+
var _useState13 = useState({
|
|
179
183
|
priceShow: true,
|
|
180
184
|
supplierShow: true
|
|
181
185
|
}),
|
|
182
|
-
|
|
183
|
-
show =
|
|
184
|
-
setShow =
|
|
186
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
187
|
+
show = _useState14[0],
|
|
188
|
+
setShow = _useState14[1];
|
|
185
189
|
// 获取自有商品标签 - 场景 商品 行业
|
|
186
190
|
var getSelfGoodsFlag = /*#__PURE__*/function () {
|
|
187
|
-
var _ref2 = _asyncToGenerator(
|
|
191
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
188
192
|
var res, list;
|
|
189
193
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
190
194
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -211,7 +215,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
211
215
|
}();
|
|
212
216
|
// 获取自有商品标签 - 品类
|
|
213
217
|
var getSelfGoodsFlagCategory = /*#__PURE__*/function () {
|
|
214
|
-
var _ref3 = _asyncToGenerator(
|
|
218
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
215
219
|
var res;
|
|
216
220
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
217
221
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -235,7 +239,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
235
239
|
}();
|
|
236
240
|
// 获取商品标签组 - 商品
|
|
237
241
|
var getAllGoodTagList = /*#__PURE__*/function () {
|
|
238
|
-
var _ref4 = _asyncToGenerator(
|
|
242
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
239
243
|
var res, optionsObj;
|
|
240
244
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
241
245
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -288,7 +292,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
288
292
|
};
|
|
289
293
|
// 获取全局控制状态
|
|
290
294
|
var getGoodControlInfo = /*#__PURE__*/function () {
|
|
291
|
-
var _ref5 = _asyncToGenerator(
|
|
295
|
+
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
292
296
|
var res, _res$data3, _res$data4;
|
|
293
297
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
294
298
|
while (1) switch (_context5.prev = _context5.next) {
|
|
@@ -331,14 +335,14 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
331
335
|
(_formRef$current2 = formRef.current) === null || _formRef$current2 === void 0 ? void 0 : _formRef$current2.resetFields();
|
|
332
336
|
}
|
|
333
337
|
}, [open]);
|
|
338
|
+
var _useState15 = useState([]),
|
|
339
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
340
|
+
selectedRowKeys = _useState16[0],
|
|
341
|
+
setSelectedRowKeys = _useState16[1];
|
|
334
342
|
var _useState17 = useState([]),
|
|
335
343
|
_useState18 = _slicedToArray(_useState17, 2),
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
var _useState19 = useState([]),
|
|
339
|
-
_useState20 = _slicedToArray(_useState19, 2),
|
|
340
|
-
selectedRows = _useState20[0],
|
|
341
|
-
setSelectedRows = _useState20[1];
|
|
344
|
+
selectedRows = _useState18[0],
|
|
345
|
+
setSelectedRows = _useState18[1];
|
|
342
346
|
var onSelectChange = function onSelectChange(newSelectedRowKeys, newSelectedRows) {
|
|
343
347
|
var key = newSelectedRowKeys.filter(function (key) {
|
|
344
348
|
return !defaultSelectedGoodsIds.includes(key);
|
|
@@ -388,8 +392,8 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
388
392
|
}
|
|
389
393
|
}, {
|
|
390
394
|
title: '商品品牌',
|
|
391
|
-
dataIndex: '
|
|
392
|
-
key: '
|
|
395
|
+
dataIndex: 'brandName',
|
|
396
|
+
key: 'brandName',
|
|
393
397
|
align: 'center',
|
|
394
398
|
width: 120
|
|
395
399
|
}, {
|
|
@@ -406,14 +410,14 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
406
410
|
key: 'subSupplierName',
|
|
407
411
|
align: 'center',
|
|
408
412
|
width: 150,
|
|
409
|
-
hidden: !show.supplierShow
|
|
413
|
+
hidden: !show.supplierShow
|
|
410
414
|
}, {
|
|
411
415
|
title: '一件代发价格',
|
|
412
416
|
key: 'oncePrice',
|
|
413
417
|
align: 'center',
|
|
414
418
|
render: function render(_, record) {
|
|
415
|
-
var _record$onceInfo, _record$onceInfo2, _record$onceInfo3, _record$onceInfo4, _record$onceInfo5, _record$onceInfo6, _record$onceInfo7, _record$onceInfo8, _record$onceInfo9, _record$onceInfo10, _record$onceInfo11, _record$onceInfo12, _record$onceInfo13, _record$onceInfo14, _record$onceInfo15, _record$onceInfo16, _record$onceInfo17, _record$onceInfo18
|
|
416
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, !lodash.isNil(record === null || record === void 0 ? void 0 : (_record$onceInfo = record.onceInfo) === null || _record$onceInfo === void 0 ? void 0 : _record$onceInfo.purchasePriceMin) && show.priceShow &&
|
|
419
|
+
var _record$onceInfo, _record$onceInfo2, _record$onceInfo3, _record$onceInfo4, _record$onceInfo5, _record$onceInfo6, _record$onceInfo7, _record$onceInfo8, _record$onceInfo9, _record$onceInfo0, _record$onceInfo1, _record$onceInfo10, _record$onceInfo11, _record$onceInfo12, _record$onceInfo13, _record$onceInfo14, _record$onceInfo15, _record$onceInfo16, _record$onceInfo17, _record$onceInfo18;
|
|
420
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !lodash.isNil(record === null || record === void 0 ? void 0 : (_record$onceInfo = record.onceInfo) === null || _record$onceInfo === void 0 ? void 0 : _record$onceInfo.purchasePriceMin) && show.priceShow && /*#__PURE__*/React.createElement("div", null, "\u91C7\u8D2D\u4EF7\uFF1A", showMoney(record === null || record === void 0 ? void 0 : (_record$onceInfo2 = record.onceInfo) === null || _record$onceInfo2 === void 0 ? void 0 : _record$onceInfo2.purchasePriceMin), (record === null || record === void 0 ? void 0 : (_record$onceInfo3 = record.onceInfo) === null || _record$onceInfo3 === void 0 ? void 0 : _record$onceInfo3.purchasePriceMax) !== (record === null || record === void 0 ? void 0 : (_record$onceInfo4 = record.onceInfo) === null || _record$onceInfo4 === void 0 ? void 0 : _record$onceInfo4.purchasePriceMin) ? "~".concat(showMoney(record.onceInfo.purchasePriceMax)) : ''), !lodash.isNil(record === null || record === void 0 ? void 0 : (_record$onceInfo5 = record.onceInfo) === null || _record$onceInfo5 === void 0 ? void 0 : _record$onceInfo5.marketPriceMin) && /*#__PURE__*/React.createElement("div", null, "\u5E02\u573A\u4EF7\uFF1A", showMoney(record === null || record === void 0 ? void 0 : (_record$onceInfo6 = record.onceInfo) === null || _record$onceInfo6 === void 0 ? void 0 : _record$onceInfo6.marketPriceMin), (record === null || record === void 0 ? void 0 : (_record$onceInfo7 = record.onceInfo) === null || _record$onceInfo7 === void 0 ? void 0 : _record$onceInfo7.marketPriceMax) !== (record === null || record === void 0 ? void 0 : (_record$onceInfo8 = record.onceInfo) === null || _record$onceInfo8 === void 0 ? void 0 : _record$onceInfo8.marketPriceMin) ? "~".concat(showMoney(record.onceInfo.marketPriceMax)) : ''), !lodash.isNil(record === null || record === void 0 ? void 0 : (_record$onceInfo9 = record.onceInfo) === null || _record$onceInfo9 === void 0 ? void 0 : _record$onceInfo9.salePriceMin) && /*#__PURE__*/React.createElement("div", null, "\u9500\u552E\u4EF7\uFF1A", showMoney(record === null || record === void 0 ? void 0 : (_record$onceInfo0 = record.onceInfo) === null || _record$onceInfo0 === void 0 ? void 0 : _record$onceInfo0.salePriceMin), (record === null || record === void 0 ? void 0 : (_record$onceInfo1 = record.onceInfo) === null || _record$onceInfo1 === void 0 ? void 0 : _record$onceInfo1.salePriceMax) !== (record === null || record === void 0 ? void 0 : (_record$onceInfo10 = record.onceInfo) === null || _record$onceInfo10 === void 0 ? void 0 : _record$onceInfo10.salePriceMin) ? "~".concat(showMoney(record.onceInfo.salePriceMax)) : ''), !lodash.isNil(record === null || record === void 0 ? void 0 : (_record$onceInfo11 = record.onceInfo) === null || _record$onceInfo11 === void 0 ? void 0 : _record$onceInfo11.sitePriceMin) && /*#__PURE__*/React.createElement("div", null, "\u5206\u9500\u4EF7\uFF1A", showMoney(record === null || record === void 0 ? void 0 : (_record$onceInfo12 = record.onceInfo) === null || _record$onceInfo12 === void 0 ? void 0 : _record$onceInfo12.sitePriceMin), (record === null || record === void 0 ? void 0 : (_record$onceInfo13 = record.onceInfo) === null || _record$onceInfo13 === void 0 ? void 0 : _record$onceInfo13.sitePriceMax) !== (record === null || record === void 0 ? void 0 : (_record$onceInfo14 = record.onceInfo) === null || _record$onceInfo14 === void 0 ? void 0 : _record$onceInfo14.sitePriceMin) ? "~".concat(showMoney(record.onceInfo.sitePriceMax)) : ''), [record === null || record === void 0 ? void 0 : (_record$onceInfo15 = record.onceInfo) === null || _record$onceInfo15 === void 0 ? void 0 : _record$onceInfo15.purchasePriceMin, record === null || record === void 0 ? void 0 : (_record$onceInfo16 = record.onceInfo) === null || _record$onceInfo16 === void 0 ? void 0 : _record$onceInfo16.marketPriceMin, record === null || record === void 0 ? void 0 : (_record$onceInfo17 = record.onceInfo) === null || _record$onceInfo17 === void 0 ? void 0 : _record$onceInfo17.salePriceMin, record === null || record === void 0 ? void 0 : (_record$onceInfo18 = record.onceInfo) === null || _record$onceInfo18 === void 0 ? void 0 : _record$onceInfo18.sitePriceMin].every(function (num) {
|
|
417
421
|
return num == null;
|
|
418
422
|
}) && '-');
|
|
419
423
|
}
|
|
@@ -422,8 +426,8 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
422
426
|
key: 'purchasePrice',
|
|
423
427
|
align: 'center',
|
|
424
428
|
render: function render(_, record) {
|
|
425
|
-
var _record$purchaseInfo, _record$purchaseInfo2, _record$purchaseInfo3, _record$purchaseInfo4, _record$purchaseInfo5, _record$purchaseInfo6, _record$purchaseInfo7, _record$purchaseInfo8, _record$purchaseInfo9, _record$purchaseInfo10, _record$purchaseInfo11, _record$purchaseInfo12, _record$purchaseInfo13, _record$purchaseInfo14, _record$purchaseInfo15, _record$purchaseInfo16, _record$purchaseInfo17, _record$purchaseInfo18
|
|
426
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, !lodash.isNil(record === null || record === void 0 ? void 0 : (_record$purchaseInfo = record.purchaseInfo) === null || _record$purchaseInfo === void 0 ? void 0 : _record$purchaseInfo.purchasePriceMin) && show.priceShow &&
|
|
429
|
+
var _record$purchaseInfo, _record$purchaseInfo2, _record$purchaseInfo3, _record$purchaseInfo4, _record$purchaseInfo5, _record$purchaseInfo6, _record$purchaseInfo7, _record$purchaseInfo8, _record$purchaseInfo9, _record$purchaseInfo0, _record$purchaseInfo1, _record$purchaseInfo10, _record$purchaseInfo11, _record$purchaseInfo12, _record$purchaseInfo13, _record$purchaseInfo14, _record$purchaseInfo15, _record$purchaseInfo16, _record$purchaseInfo17, _record$purchaseInfo18;
|
|
430
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !lodash.isNil(record === null || record === void 0 ? void 0 : (_record$purchaseInfo = record.purchaseInfo) === null || _record$purchaseInfo === void 0 ? void 0 : _record$purchaseInfo.purchasePriceMin) && show.priceShow && /*#__PURE__*/React.createElement("div", null, "\u91C7\u8D2D\u4EF7\uFF1A", showMoney(record === null || record === void 0 ? void 0 : (_record$purchaseInfo2 = record.purchaseInfo) === null || _record$purchaseInfo2 === void 0 ? void 0 : _record$purchaseInfo2.purchasePriceMin), (record === null || record === void 0 ? void 0 : (_record$purchaseInfo3 = record.purchaseInfo) === null || _record$purchaseInfo3 === void 0 ? void 0 : _record$purchaseInfo3.purchasePriceMax) !== (record === null || record === void 0 ? void 0 : (_record$purchaseInfo4 = record.purchaseInfo) === null || _record$purchaseInfo4 === void 0 ? void 0 : _record$purchaseInfo4.purchasePriceMin) ? "~".concat(showMoney(record.purchaseInfo.purchasePriceMax)) : ''), !lodash.isNil(record === null || record === void 0 ? void 0 : (_record$purchaseInfo5 = record.purchaseInfo) === null || _record$purchaseInfo5 === void 0 ? void 0 : _record$purchaseInfo5.marketPriceMin) && /*#__PURE__*/React.createElement("div", null, "\u5E02\u573A\u4EF7\uFF1A", showMoney(record === null || record === void 0 ? void 0 : (_record$purchaseInfo6 = record.purchaseInfo) === null || _record$purchaseInfo6 === void 0 ? void 0 : _record$purchaseInfo6.marketPriceMin), (record === null || record === void 0 ? void 0 : (_record$purchaseInfo7 = record.purchaseInfo) === null || _record$purchaseInfo7 === void 0 ? void 0 : _record$purchaseInfo7.marketPriceMax) !== (record === null || record === void 0 ? void 0 : (_record$purchaseInfo8 = record.purchaseInfo) === null || _record$purchaseInfo8 === void 0 ? void 0 : _record$purchaseInfo8.marketPriceMin) ? "~".concat(showMoney(record.purchaseInfo.marketPriceMax)) : ''), !lodash.isNil(record === null || record === void 0 ? void 0 : (_record$purchaseInfo9 = record.purchaseInfo) === null || _record$purchaseInfo9 === void 0 ? void 0 : _record$purchaseInfo9.salePriceMin) && /*#__PURE__*/React.createElement("div", null, "\u9500\u552E\u4EF7\uFF1A", showMoney(record === null || record === void 0 ? void 0 : (_record$purchaseInfo0 = record.purchaseInfo) === null || _record$purchaseInfo0 === void 0 ? void 0 : _record$purchaseInfo0.salePriceMin), (record === null || record === void 0 ? void 0 : (_record$purchaseInfo1 = record.purchaseInfo) === null || _record$purchaseInfo1 === void 0 ? void 0 : _record$purchaseInfo1.salePriceMax) !== (record === null || record === void 0 ? void 0 : (_record$purchaseInfo10 = record.purchaseInfo) === null || _record$purchaseInfo10 === void 0 ? void 0 : _record$purchaseInfo10.salePriceMin) ? "~".concat(showMoney(record.purchaseInfo.salePriceMax)) : ''), !lodash.isNil(record === null || record === void 0 ? void 0 : (_record$purchaseInfo11 = record.purchaseInfo) === null || _record$purchaseInfo11 === void 0 ? void 0 : _record$purchaseInfo11.sitePriceMin) && /*#__PURE__*/React.createElement("div", null, "\u5206\u9500\u4EF7\uFF1A", showMoney(record === null || record === void 0 ? void 0 : (_record$purchaseInfo12 = record.purchaseInfo) === null || _record$purchaseInfo12 === void 0 ? void 0 : _record$purchaseInfo12.sitePriceMin), (record === null || record === void 0 ? void 0 : (_record$purchaseInfo13 = record.purchaseInfo) === null || _record$purchaseInfo13 === void 0 ? void 0 : _record$purchaseInfo13.sitePriceMax) !== (record === null || record === void 0 ? void 0 : (_record$purchaseInfo14 = record.purchaseInfo) === null || _record$purchaseInfo14 === void 0 ? void 0 : _record$purchaseInfo14.sitePriceMin) ? "~".concat(showMoney(record.purchaseInfo.sitePriceMax / 100)) : ''), [record === null || record === void 0 ? void 0 : (_record$purchaseInfo15 = record.purchaseInfo) === null || _record$purchaseInfo15 === void 0 ? void 0 : _record$purchaseInfo15.purchasePriceMin, record === null || record === void 0 ? void 0 : (_record$purchaseInfo16 = record.purchaseInfo) === null || _record$purchaseInfo16 === void 0 ? void 0 : _record$purchaseInfo16.marketPriceMin, record === null || record === void 0 ? void 0 : (_record$purchaseInfo17 = record.purchaseInfo) === null || _record$purchaseInfo17 === void 0 ? void 0 : _record$purchaseInfo17.salePriceMin, record === null || record === void 0 ? void 0 : (_record$purchaseInfo18 = record.purchaseInfo) === null || _record$purchaseInfo18 === void 0 ? void 0 : _record$purchaseInfo18.sitePriceMin].every(function (num) {
|
|
427
431
|
return num == null;
|
|
428
432
|
}) && '-');
|
|
429
433
|
}
|
|
@@ -514,7 +518,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
514
518
|
},
|
|
515
519
|
className: "price-type",
|
|
516
520
|
placeholder: "\u4EF7\u683C\u7C7B\u578B",
|
|
517
|
-
options:
|
|
521
|
+
options: priceRangeForPurchase,
|
|
518
522
|
variant: "borderless"
|
|
519
523
|
}))
|
|
520
524
|
}, /*#__PURE__*/React.createElement(_Form.Item, {
|
package/es/utils/options.d.ts
CHANGED
|
@@ -11,10 +11,6 @@ export declare const priceRangeForPurchase: {
|
|
|
11
11
|
label: string;
|
|
12
12
|
value: string;
|
|
13
13
|
}[];
|
|
14
|
-
export declare const mallPriceRangeForPurchase: {
|
|
15
|
-
label: string;
|
|
16
|
-
value: string;
|
|
17
|
-
}[];
|
|
18
14
|
export declare const profitRangeForOnce: {
|
|
19
15
|
label: string;
|
|
20
16
|
value: string;
|
package/es/utils/options.js
CHANGED
|
@@ -66,20 +66,6 @@ export var priceRangeForPurchase = [{
|
|
|
66
66
|
label: '代发销售价',
|
|
67
67
|
value: 'onceSalePrice'
|
|
68
68
|
}];
|
|
69
|
-
// 集采价格筛选配置 - 妙货
|
|
70
|
-
export var mallPriceRangeForPurchase = [{
|
|
71
|
-
label: '集采市场价',
|
|
72
|
-
value: 'purchaseMarketPrice'
|
|
73
|
-
}, {
|
|
74
|
-
label: '代发市场价',
|
|
75
|
-
value: 'onceMarketPrice'
|
|
76
|
-
}, {
|
|
77
|
-
label: '集采销售价',
|
|
78
|
-
value: 'purchaseSalePrice'
|
|
79
|
-
}, {
|
|
80
|
-
label: '代发销售价',
|
|
81
|
-
value: 'onceSalePrice'
|
|
82
|
-
}];
|
|
83
69
|
// 一件代发利润率筛选配置 - 非营销云
|
|
84
70
|
export var profitRangeForOnce = [{
|
|
85
71
|
label: '利润率',
|
package/es/utils/request.js
CHANGED
|
@@ -3,7 +3,7 @@ import _notification from "antd/es/notification";
|
|
|
3
3
|
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); }
|
|
4
4
|
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; }
|
|
5
5
|
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; }
|
|
6
|
-
function _defineProperty(
|
|
6
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
7
7
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
8
8
|
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); }
|
|
9
9
|
import Cookies from 'js-cookie';
|
package/es/utils/serviceEnv.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export var baseURLMap = {
|
|
2
2
|
dev: 'https://dev-gateway.fxqifu.net/pangu',
|
|
3
|
-
test: 'https://qa-gateway.fxqifu.net/pangu',
|
|
4
3
|
qa: 'https://qa-gateway.fxqifu.net/pangu',
|
|
4
|
+
test: 'https://test-gateway.fxqifu.net/pangu',
|
|
5
5
|
prod: 'https://gateway.fxqifu.net/pangu'
|
|
6
6
|
};
|
|
7
7
|
export var getApiHost = function getApiHost(env) {
|
package/lib/index.d.ts
CHANGED
|
@@ -8,7 +8,9 @@ export interface ChooseGoodsProps {
|
|
|
8
8
|
/** 按钮文案 */
|
|
9
9
|
actionText?: string;
|
|
10
10
|
open: boolean;
|
|
11
|
+
/** 接口环境,默认取localstorage中的env */
|
|
11
12
|
env?: EnvType;
|
|
13
|
+
/** 默认取Cookies中的token */
|
|
12
14
|
token?: string;
|
|
13
15
|
loginErrFn?: () => void;
|
|
14
16
|
multiple?: boolean;
|
|
@@ -26,7 +28,6 @@ export interface ChooseGoodsProps {
|
|
|
26
28
|
onOk?: (selectedGoodsId: React.Key[], selectedGoods: any[]) => void;
|
|
27
29
|
onCancel?: () => void;
|
|
28
30
|
needControl?: boolean;
|
|
29
|
-
muduleType?: string;
|
|
30
31
|
}
|
|
31
32
|
declare const ChooseSiteGoods: FC<ChooseGoodsProps>;
|
|
32
33
|
export default ChooseSiteGoods;
|
package/lib/index.js
CHANGED
|
@@ -20,31 +20,35 @@ var _api = _interopRequireDefault(require("./utils/api"));
|
|
|
20
20
|
var _icon = _interopRequireDefault(require("./components/icon"));
|
|
21
21
|
var _common = require("./utils/common");
|
|
22
22
|
require("./index.less");
|
|
23
|
-
function _interopRequireDefault(
|
|
24
|
-
function
|
|
25
|
-
function
|
|
26
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
23
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
24
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); }
|
|
25
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
27
26
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
28
|
-
function _iterableToArray(
|
|
29
|
-
function _arrayWithoutHoles(
|
|
30
|
-
function _createForOfIteratorHelper(
|
|
31
|
-
function _regeneratorRuntime() { "use strict";
|
|
32
|
-
function
|
|
33
|
-
function
|
|
27
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
28
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
29
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, 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 o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
30
|
+
function _regeneratorRuntime() { "use strict"; var r = _regenerator(), e = r.m(_regeneratorRuntime), t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; function n(r) { var e = "function" == typeof r && r.constructor; return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); } var o = { throw: 1, return: 2, break: 3, continue: 3 }; function a(r) { var e, t; return function (n) { e || (e = { stop: function stop() { return t(n.a, 2); }, catch: function _catch() { return n.v; }, abrupt: function abrupt(r, e) { return t(n.a, o[r], e); }, delegateYield: function delegateYield(r, o, a) { return e.resultName = o, t(n.d, _regeneratorValues(r), a); }, finish: function finish(r) { return t(n.f, r); } }, t = function t(r, _t, o) { n.p = e.prev, n.n = e.next; try { return r(_t, o); } finally { e.next = n.n; } }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; try { return r.call(this, e); } finally { n.p = e.prev, n.n = e.next; } }; } return (_regeneratorRuntime = function _regeneratorRuntime() { return { wrap: function wrap(e, t, n, o) { return r.w(a(e), t, n, o && o.reverse()); }, isGeneratorFunction: n, mark: r.m, awrap: function awrap(r, e) { return new _OverloadYield(r, e); }, AsyncIterator: _regeneratorAsyncIterator, async: function async(r, e, t, o, u) { return (n(e) ? _regeneratorAsyncGen : _regeneratorAsync)(a(r), e, t, o, u); }, keys: _regeneratorKeys, values: _regeneratorValues }; })(); }
|
|
31
|
+
function _regeneratorValues(e) { if (null != e) { var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], r = 0; if (t) return t.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) return { next: function next() { return e && r >= e.length && (e = void 0), { value: e && e[r++], done: !e }; } }; } throw new TypeError(_typeof(e) + " is not iterable"); }
|
|
32
|
+
function _regeneratorKeys(e) { var n = Object(e), r = []; for (var t in n) r.unshift(t); return function e() { for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; return e.done = !0, e; }; }
|
|
33
|
+
function _regeneratorAsync(n, e, r, t, o) { var a = _regeneratorAsyncGen(n, e, r, t, o); return a.next().then(function (n) { return n.done ? n.value : a.next(); }); }
|
|
34
|
+
function _regeneratorAsyncGen(r, e, t, o, n) { return new _regeneratorAsyncIterator(_regenerator().w(r, e, t, o), n || Promise); }
|
|
35
|
+
function _regeneratorAsyncIterator(t, e) { function n(r, o, i, f) { try { var c = t[r](o), u = c.value; return u instanceof _OverloadYield ? e.resolve(u.v).then(function (t) { n("next", t, i, f); }, function (t) { n("throw", t, i, f); }) : e.resolve(u).then(function (t) { c.value = t, i(c); }, function (t) { return n("throw", t, i, f); }); } catch (t) { f(t); } } var r; this.next || (_regeneratorDefine2(_regeneratorAsyncIterator.prototype), _regeneratorDefine2(_regeneratorAsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () { return this; })), _regeneratorDefine2(this, "_invoke", function (t, o, i) { function f() { return new e(function (e, r) { n(t, i, e, r); }); } return r = r ? r.then(f, f) : f(); }, !0); }
|
|
36
|
+
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
37
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
38
|
+
function _OverloadYield(e, d) { this.v = e, this.k = d; }
|
|
39
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
40
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
34
41
|
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; }
|
|
35
42
|
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; }
|
|
36
|
-
function _defineProperty(
|
|
43
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
37
44
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
38
45
|
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); }
|
|
39
|
-
function _slicedToArray(
|
|
46
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
40
47
|
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."); }
|
|
41
|
-
function _unsupportedIterableToArray(
|
|
42
|
-
function _arrayLikeToArray(
|
|
48
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
49
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
43
50
|
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; } }
|
|
44
|
-
function _arrayWithHoles(
|
|
45
|
-
var priceTypeOptionEnum = {
|
|
46
|
-
mall: _options.mallPriceRangeForPurchase
|
|
47
|
-
};
|
|
51
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
48
52
|
var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
49
53
|
var _props$title = props.title,
|
|
50
54
|
title = _props$title === void 0 ? '挑选商品' : _props$title,
|
|
@@ -76,8 +80,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
76
80
|
y: 400
|
|
77
81
|
} : _props$scroll,
|
|
78
82
|
_props$needControl = props.needControl,
|
|
79
|
-
needControl = _props$needControl === void 0 ? false : _props$needControl
|
|
80
|
-
muduleType = props.muduleType;
|
|
83
|
+
needControl = _props$needControl === void 0 ? false : _props$needControl;
|
|
81
84
|
var formRef = (0, _react.useRef)();
|
|
82
85
|
var $http = (0, _request.default)({
|
|
83
86
|
baseURL: (0, _serviceEnv.getApiHost)(env),
|
|
@@ -99,8 +102,8 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
99
102
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
100
103
|
searchParams = _useState4[0],
|
|
101
104
|
setSearchParams = _useState4[1];
|
|
102
|
-
var _useRequest = (0, _ahooks.useRequest)(
|
|
103
|
-
var _ref = _asyncToGenerator(
|
|
105
|
+
var _useRequest = (0, _ahooks.useRequest)(/*#__PURE__*/function () {
|
|
106
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(val) {
|
|
104
107
|
var _val$flagCategory, _res$data, _res$data2;
|
|
105
108
|
var params, _val$rangePrice, _val$rangePrice2, _val$priceType, _val$priceType2, res;
|
|
106
109
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -158,27 +161,27 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
158
161
|
flagTagsOptions = _useState8[0],
|
|
159
162
|
setFlagTagsOptions = _useState8[1]; // 商品标签
|
|
160
163
|
var _useState9 = (0, _react.useState)([]),
|
|
161
|
-
|
|
162
|
-
flagIndustryOptions =
|
|
163
|
-
setFlagIndustryOptions =
|
|
164
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
165
|
+
flagIndustryOptions = _useState0[0],
|
|
166
|
+
setFlagIndustryOptions = _useState0[1]; // 行业标签
|
|
167
|
+
var _useState1 = (0, _react.useState)([]),
|
|
168
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
169
|
+
flagCategoryOptions = _useState10[0],
|
|
170
|
+
setFlagCategoryOptions = _useState10[1]; // 品类标签
|
|
164
171
|
var _useState11 = (0, _react.useState)([]),
|
|
165
172
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
var _useState13 = (0, _react.useState)(
|
|
169
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
170
|
-
cascaderOptions = _useState14[0],
|
|
171
|
-
setCascaderOptions = _useState14[1]; //商品标签组
|
|
172
|
-
var _useState15 = (0, _react.useState)({
|
|
173
|
+
cascaderOptions = _useState12[0],
|
|
174
|
+
setCascaderOptions = _useState12[1]; //商品标签组
|
|
175
|
+
var _useState13 = (0, _react.useState)({
|
|
173
176
|
priceShow: true,
|
|
174
177
|
supplierShow: true
|
|
175
178
|
}),
|
|
176
|
-
|
|
177
|
-
show =
|
|
178
|
-
setShow =
|
|
179
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
180
|
+
show = _useState14[0],
|
|
181
|
+
setShow = _useState14[1];
|
|
179
182
|
// 获取自有商品标签 - 场景 商品 行业
|
|
180
183
|
var getSelfGoodsFlag = /*#__PURE__*/function () {
|
|
181
|
-
var _ref2 = _asyncToGenerator(
|
|
184
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
182
185
|
var res, list;
|
|
183
186
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
184
187
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -205,7 +208,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
205
208
|
}();
|
|
206
209
|
// 获取自有商品标签 - 品类
|
|
207
210
|
var getSelfGoodsFlagCategory = /*#__PURE__*/function () {
|
|
208
|
-
var _ref3 = _asyncToGenerator(
|
|
211
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
209
212
|
var res;
|
|
210
213
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
211
214
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -229,7 +232,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
229
232
|
}();
|
|
230
233
|
// 获取商品标签组 - 商品
|
|
231
234
|
var getAllGoodTagList = /*#__PURE__*/function () {
|
|
232
|
-
var _ref4 = _asyncToGenerator(
|
|
235
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
233
236
|
var res, optionsObj;
|
|
234
237
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
235
238
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -282,7 +285,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
282
285
|
};
|
|
283
286
|
// 获取全局控制状态
|
|
284
287
|
var getGoodControlInfo = /*#__PURE__*/function () {
|
|
285
|
-
var _ref5 = _asyncToGenerator(
|
|
288
|
+
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
286
289
|
var res, _res$data3, _res$data4;
|
|
287
290
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
288
291
|
while (1) switch (_context5.prev = _context5.next) {
|
|
@@ -325,14 +328,14 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
325
328
|
(_formRef$current2 = formRef.current) === null || _formRef$current2 === void 0 ? void 0 : _formRef$current2.resetFields();
|
|
326
329
|
}
|
|
327
330
|
}, [open]);
|
|
331
|
+
var _useState15 = (0, _react.useState)([]),
|
|
332
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
333
|
+
selectedRowKeys = _useState16[0],
|
|
334
|
+
setSelectedRowKeys = _useState16[1];
|
|
328
335
|
var _useState17 = (0, _react.useState)([]),
|
|
329
336
|
_useState18 = _slicedToArray(_useState17, 2),
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
var _useState19 = (0, _react.useState)([]),
|
|
333
|
-
_useState20 = _slicedToArray(_useState19, 2),
|
|
334
|
-
selectedRows = _useState20[0],
|
|
335
|
-
setSelectedRows = _useState20[1];
|
|
337
|
+
selectedRows = _useState18[0],
|
|
338
|
+
setSelectedRows = _useState18[1];
|
|
336
339
|
var onSelectChange = function onSelectChange(newSelectedRowKeys, newSelectedRows) {
|
|
337
340
|
var key = newSelectedRowKeys.filter(function (key) {
|
|
338
341
|
return !defaultSelectedGoodsIds.includes(key);
|
|
@@ -382,8 +385,8 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
382
385
|
}
|
|
383
386
|
}, {
|
|
384
387
|
title: '商品品牌',
|
|
385
|
-
dataIndex: '
|
|
386
|
-
key: '
|
|
388
|
+
dataIndex: 'brandName',
|
|
389
|
+
key: 'brandName',
|
|
387
390
|
align: 'center',
|
|
388
391
|
width: 120
|
|
389
392
|
}, {
|
|
@@ -400,14 +403,14 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
400
403
|
key: 'subSupplierName',
|
|
401
404
|
align: 'center',
|
|
402
405
|
width: 150,
|
|
403
|
-
hidden: !show.supplierShow
|
|
406
|
+
hidden: !show.supplierShow
|
|
404
407
|
}, {
|
|
405
408
|
title: '一件代发价格',
|
|
406
409
|
key: 'oncePrice',
|
|
407
410
|
align: 'center',
|
|
408
411
|
render: function render(_, record) {
|
|
409
|
-
var _record$onceInfo, _record$onceInfo2, _record$onceInfo3, _record$onceInfo4, _record$onceInfo5, _record$onceInfo6, _record$onceInfo7, _record$onceInfo8, _record$onceInfo9, _record$onceInfo10, _record$onceInfo11, _record$onceInfo12, _record$onceInfo13, _record$onceInfo14, _record$onceInfo15, _record$onceInfo16, _record$onceInfo17, _record$onceInfo18
|
|
410
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !_lodash.default.isNil(record === null || record === void 0 ? void 0 : (_record$onceInfo = record.onceInfo) === null || _record$onceInfo === void 0 ? void 0 : _record$onceInfo.purchasePriceMin) && show.priceShow &&
|
|
412
|
+
var _record$onceInfo, _record$onceInfo2, _record$onceInfo3, _record$onceInfo4, _record$onceInfo5, _record$onceInfo6, _record$onceInfo7, _record$onceInfo8, _record$onceInfo9, _record$onceInfo0, _record$onceInfo1, _record$onceInfo10, _record$onceInfo11, _record$onceInfo12, _record$onceInfo13, _record$onceInfo14, _record$onceInfo15, _record$onceInfo16, _record$onceInfo17, _record$onceInfo18;
|
|
413
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !_lodash.default.isNil(record === null || record === void 0 ? void 0 : (_record$onceInfo = record.onceInfo) === null || _record$onceInfo === void 0 ? void 0 : _record$onceInfo.purchasePriceMin) && show.priceShow && /*#__PURE__*/_react.default.createElement("div", null, "\u91C7\u8D2D\u4EF7\uFF1A", (0, _common.showMoney)(record === null || record === void 0 ? void 0 : (_record$onceInfo2 = record.onceInfo) === null || _record$onceInfo2 === void 0 ? void 0 : _record$onceInfo2.purchasePriceMin), (record === null || record === void 0 ? void 0 : (_record$onceInfo3 = record.onceInfo) === null || _record$onceInfo3 === void 0 ? void 0 : _record$onceInfo3.purchasePriceMax) !== (record === null || record === void 0 ? void 0 : (_record$onceInfo4 = record.onceInfo) === null || _record$onceInfo4 === void 0 ? void 0 : _record$onceInfo4.purchasePriceMin) ? "~".concat((0, _common.showMoney)(record.onceInfo.purchasePriceMax)) : ''), !_lodash.default.isNil(record === null || record === void 0 ? void 0 : (_record$onceInfo5 = record.onceInfo) === null || _record$onceInfo5 === void 0 ? void 0 : _record$onceInfo5.marketPriceMin) && /*#__PURE__*/_react.default.createElement("div", null, "\u5E02\u573A\u4EF7\uFF1A", (0, _common.showMoney)(record === null || record === void 0 ? void 0 : (_record$onceInfo6 = record.onceInfo) === null || _record$onceInfo6 === void 0 ? void 0 : _record$onceInfo6.marketPriceMin), (record === null || record === void 0 ? void 0 : (_record$onceInfo7 = record.onceInfo) === null || _record$onceInfo7 === void 0 ? void 0 : _record$onceInfo7.marketPriceMax) !== (record === null || record === void 0 ? void 0 : (_record$onceInfo8 = record.onceInfo) === null || _record$onceInfo8 === void 0 ? void 0 : _record$onceInfo8.marketPriceMin) ? "~".concat((0, _common.showMoney)(record.onceInfo.marketPriceMax)) : ''), !_lodash.default.isNil(record === null || record === void 0 ? void 0 : (_record$onceInfo9 = record.onceInfo) === null || _record$onceInfo9 === void 0 ? void 0 : _record$onceInfo9.salePriceMin) && /*#__PURE__*/_react.default.createElement("div", null, "\u9500\u552E\u4EF7\uFF1A", (0, _common.showMoney)(record === null || record === void 0 ? void 0 : (_record$onceInfo0 = record.onceInfo) === null || _record$onceInfo0 === void 0 ? void 0 : _record$onceInfo0.salePriceMin), (record === null || record === void 0 ? void 0 : (_record$onceInfo1 = record.onceInfo) === null || _record$onceInfo1 === void 0 ? void 0 : _record$onceInfo1.salePriceMax) !== (record === null || record === void 0 ? void 0 : (_record$onceInfo10 = record.onceInfo) === null || _record$onceInfo10 === void 0 ? void 0 : _record$onceInfo10.salePriceMin) ? "~".concat((0, _common.showMoney)(record.onceInfo.salePriceMax)) : ''), !_lodash.default.isNil(record === null || record === void 0 ? void 0 : (_record$onceInfo11 = record.onceInfo) === null || _record$onceInfo11 === void 0 ? void 0 : _record$onceInfo11.sitePriceMin) && /*#__PURE__*/_react.default.createElement("div", null, "\u5206\u9500\u4EF7\uFF1A", (0, _common.showMoney)(record === null || record === void 0 ? void 0 : (_record$onceInfo12 = record.onceInfo) === null || _record$onceInfo12 === void 0 ? void 0 : _record$onceInfo12.sitePriceMin), (record === null || record === void 0 ? void 0 : (_record$onceInfo13 = record.onceInfo) === null || _record$onceInfo13 === void 0 ? void 0 : _record$onceInfo13.sitePriceMax) !== (record === null || record === void 0 ? void 0 : (_record$onceInfo14 = record.onceInfo) === null || _record$onceInfo14 === void 0 ? void 0 : _record$onceInfo14.sitePriceMin) ? "~".concat((0, _common.showMoney)(record.onceInfo.sitePriceMax)) : ''), [record === null || record === void 0 ? void 0 : (_record$onceInfo15 = record.onceInfo) === null || _record$onceInfo15 === void 0 ? void 0 : _record$onceInfo15.purchasePriceMin, record === null || record === void 0 ? void 0 : (_record$onceInfo16 = record.onceInfo) === null || _record$onceInfo16 === void 0 ? void 0 : _record$onceInfo16.marketPriceMin, record === null || record === void 0 ? void 0 : (_record$onceInfo17 = record.onceInfo) === null || _record$onceInfo17 === void 0 ? void 0 : _record$onceInfo17.salePriceMin, record === null || record === void 0 ? void 0 : (_record$onceInfo18 = record.onceInfo) === null || _record$onceInfo18 === void 0 ? void 0 : _record$onceInfo18.sitePriceMin].every(function (num) {
|
|
411
414
|
return num == null;
|
|
412
415
|
}) && '-');
|
|
413
416
|
}
|
|
@@ -416,8 +419,8 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
416
419
|
key: 'purchasePrice',
|
|
417
420
|
align: 'center',
|
|
418
421
|
render: function render(_, record) {
|
|
419
|
-
var _record$purchaseInfo, _record$purchaseInfo2, _record$purchaseInfo3, _record$purchaseInfo4, _record$purchaseInfo5, _record$purchaseInfo6, _record$purchaseInfo7, _record$purchaseInfo8, _record$purchaseInfo9, _record$purchaseInfo10, _record$purchaseInfo11, _record$purchaseInfo12, _record$purchaseInfo13, _record$purchaseInfo14, _record$purchaseInfo15, _record$purchaseInfo16, _record$purchaseInfo17, _record$purchaseInfo18
|
|
420
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !_lodash.default.isNil(record === null || record === void 0 ? void 0 : (_record$purchaseInfo = record.purchaseInfo) === null || _record$purchaseInfo === void 0 ? void 0 : _record$purchaseInfo.purchasePriceMin) && show.priceShow &&
|
|
422
|
+
var _record$purchaseInfo, _record$purchaseInfo2, _record$purchaseInfo3, _record$purchaseInfo4, _record$purchaseInfo5, _record$purchaseInfo6, _record$purchaseInfo7, _record$purchaseInfo8, _record$purchaseInfo9, _record$purchaseInfo0, _record$purchaseInfo1, _record$purchaseInfo10, _record$purchaseInfo11, _record$purchaseInfo12, _record$purchaseInfo13, _record$purchaseInfo14, _record$purchaseInfo15, _record$purchaseInfo16, _record$purchaseInfo17, _record$purchaseInfo18;
|
|
423
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !_lodash.default.isNil(record === null || record === void 0 ? void 0 : (_record$purchaseInfo = record.purchaseInfo) === null || _record$purchaseInfo === void 0 ? void 0 : _record$purchaseInfo.purchasePriceMin) && show.priceShow && /*#__PURE__*/_react.default.createElement("div", null, "\u91C7\u8D2D\u4EF7\uFF1A", (0, _common.showMoney)(record === null || record === void 0 ? void 0 : (_record$purchaseInfo2 = record.purchaseInfo) === null || _record$purchaseInfo2 === void 0 ? void 0 : _record$purchaseInfo2.purchasePriceMin), (record === null || record === void 0 ? void 0 : (_record$purchaseInfo3 = record.purchaseInfo) === null || _record$purchaseInfo3 === void 0 ? void 0 : _record$purchaseInfo3.purchasePriceMax) !== (record === null || record === void 0 ? void 0 : (_record$purchaseInfo4 = record.purchaseInfo) === null || _record$purchaseInfo4 === void 0 ? void 0 : _record$purchaseInfo4.purchasePriceMin) ? "~".concat((0, _common.showMoney)(record.purchaseInfo.purchasePriceMax)) : ''), !_lodash.default.isNil(record === null || record === void 0 ? void 0 : (_record$purchaseInfo5 = record.purchaseInfo) === null || _record$purchaseInfo5 === void 0 ? void 0 : _record$purchaseInfo5.marketPriceMin) && /*#__PURE__*/_react.default.createElement("div", null, "\u5E02\u573A\u4EF7\uFF1A", (0, _common.showMoney)(record === null || record === void 0 ? void 0 : (_record$purchaseInfo6 = record.purchaseInfo) === null || _record$purchaseInfo6 === void 0 ? void 0 : _record$purchaseInfo6.marketPriceMin), (record === null || record === void 0 ? void 0 : (_record$purchaseInfo7 = record.purchaseInfo) === null || _record$purchaseInfo7 === void 0 ? void 0 : _record$purchaseInfo7.marketPriceMax) !== (record === null || record === void 0 ? void 0 : (_record$purchaseInfo8 = record.purchaseInfo) === null || _record$purchaseInfo8 === void 0 ? void 0 : _record$purchaseInfo8.marketPriceMin) ? "~".concat((0, _common.showMoney)(record.purchaseInfo.marketPriceMax)) : ''), !_lodash.default.isNil(record === null || record === void 0 ? void 0 : (_record$purchaseInfo9 = record.purchaseInfo) === null || _record$purchaseInfo9 === void 0 ? void 0 : _record$purchaseInfo9.salePriceMin) && /*#__PURE__*/_react.default.createElement("div", null, "\u9500\u552E\u4EF7\uFF1A", (0, _common.showMoney)(record === null || record === void 0 ? void 0 : (_record$purchaseInfo0 = record.purchaseInfo) === null || _record$purchaseInfo0 === void 0 ? void 0 : _record$purchaseInfo0.salePriceMin), (record === null || record === void 0 ? void 0 : (_record$purchaseInfo1 = record.purchaseInfo) === null || _record$purchaseInfo1 === void 0 ? void 0 : _record$purchaseInfo1.salePriceMax) !== (record === null || record === void 0 ? void 0 : (_record$purchaseInfo10 = record.purchaseInfo) === null || _record$purchaseInfo10 === void 0 ? void 0 : _record$purchaseInfo10.salePriceMin) ? "~".concat((0, _common.showMoney)(record.purchaseInfo.salePriceMax)) : ''), !_lodash.default.isNil(record === null || record === void 0 ? void 0 : (_record$purchaseInfo11 = record.purchaseInfo) === null || _record$purchaseInfo11 === void 0 ? void 0 : _record$purchaseInfo11.sitePriceMin) && /*#__PURE__*/_react.default.createElement("div", null, "\u5206\u9500\u4EF7\uFF1A", (0, _common.showMoney)(record === null || record === void 0 ? void 0 : (_record$purchaseInfo12 = record.purchaseInfo) === null || _record$purchaseInfo12 === void 0 ? void 0 : _record$purchaseInfo12.sitePriceMin), (record === null || record === void 0 ? void 0 : (_record$purchaseInfo13 = record.purchaseInfo) === null || _record$purchaseInfo13 === void 0 ? void 0 : _record$purchaseInfo13.sitePriceMax) !== (record === null || record === void 0 ? void 0 : (_record$purchaseInfo14 = record.purchaseInfo) === null || _record$purchaseInfo14 === void 0 ? void 0 : _record$purchaseInfo14.sitePriceMin) ? "~".concat((0, _common.showMoney)(record.purchaseInfo.sitePriceMax / 100)) : ''), [record === null || record === void 0 ? void 0 : (_record$purchaseInfo15 = record.purchaseInfo) === null || _record$purchaseInfo15 === void 0 ? void 0 : _record$purchaseInfo15.purchasePriceMin, record === null || record === void 0 ? void 0 : (_record$purchaseInfo16 = record.purchaseInfo) === null || _record$purchaseInfo16 === void 0 ? void 0 : _record$purchaseInfo16.marketPriceMin, record === null || record === void 0 ? void 0 : (_record$purchaseInfo17 = record.purchaseInfo) === null || _record$purchaseInfo17 === void 0 ? void 0 : _record$purchaseInfo17.salePriceMin, record === null || record === void 0 ? void 0 : (_record$purchaseInfo18 = record.purchaseInfo) === null || _record$purchaseInfo18 === void 0 ? void 0 : _record$purchaseInfo18.sitePriceMin].every(function (num) {
|
|
421
424
|
return num == null;
|
|
422
425
|
}) && '-');
|
|
423
426
|
}
|
|
@@ -508,7 +511,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
508
511
|
},
|
|
509
512
|
className: "price-type",
|
|
510
513
|
placeholder: "\u4EF7\u683C\u7C7B\u578B",
|
|
511
|
-
options:
|
|
514
|
+
options: _options.priceRangeForPurchase,
|
|
512
515
|
variant: "borderless"
|
|
513
516
|
}))
|
|
514
517
|
}, /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
package/lib/utils/options.d.ts
CHANGED
|
@@ -11,10 +11,6 @@ export declare const priceRangeForPurchase: {
|
|
|
11
11
|
label: string;
|
|
12
12
|
value: string;
|
|
13
13
|
}[];
|
|
14
|
-
export declare const mallPriceRangeForPurchase: {
|
|
15
|
-
label: string;
|
|
16
|
-
value: string;
|
|
17
|
-
}[];
|
|
18
14
|
export declare const profitRangeForOnce: {
|
|
19
15
|
label: string;
|
|
20
16
|
value: string;
|
package/lib/utils/options.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.tabsSearchParamsMap = exports.tabs = exports.sortOptions = exports.profitRangeForPurchase = exports.profitRangeForOnce = exports.priceRangeForPurchase = exports.priceRangeForOnce =
|
|
6
|
+
exports.tabsSearchParamsMap = exports.tabs = exports.sortOptions = exports.profitRangeForPurchase = exports.profitRangeForOnce = exports.priceRangeForPurchase = exports.priceRangeForOnce = void 0;
|
|
7
7
|
var tabs = exports.tabs = [{
|
|
8
8
|
label: '京东商品',
|
|
9
9
|
key: 'jd'
|
|
@@ -72,20 +72,6 @@ var priceRangeForPurchase = exports.priceRangeForPurchase = [{
|
|
|
72
72
|
label: '代发销售价',
|
|
73
73
|
value: 'onceSalePrice'
|
|
74
74
|
}];
|
|
75
|
-
// 集采价格筛选配置 - 妙货
|
|
76
|
-
var mallPriceRangeForPurchase = exports.mallPriceRangeForPurchase = [{
|
|
77
|
-
label: '集采市场价',
|
|
78
|
-
value: 'purchaseMarketPrice'
|
|
79
|
-
}, {
|
|
80
|
-
label: '代发市场价',
|
|
81
|
-
value: 'onceMarketPrice'
|
|
82
|
-
}, {
|
|
83
|
-
label: '集采销售价',
|
|
84
|
-
value: 'purchaseSalePrice'
|
|
85
|
-
}, {
|
|
86
|
-
label: '代发销售价',
|
|
87
|
-
value: 'onceSalePrice'
|
|
88
|
-
}];
|
|
89
75
|
// 一件代发利润率筛选配置 - 非营销云
|
|
90
76
|
var profitRangeForOnce = exports.profitRangeForOnce = [{
|
|
91
77
|
label: '利润率',
|
package/lib/utils/request.js
CHANGED
|
@@ -7,11 +7,11 @@ exports.default = void 0;
|
|
|
7
7
|
var _jsCookie = _interopRequireDefault(require("js-cookie"));
|
|
8
8
|
var _axios = _interopRequireDefault(require("axios"));
|
|
9
9
|
var _antd = require("antd");
|
|
10
|
-
function _interopRequireDefault(
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
11
|
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); }
|
|
12
12
|
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; }
|
|
13
13
|
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; }
|
|
14
|
-
function _defineProperty(
|
|
14
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
15
15
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
16
|
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); }
|
|
17
17
|
// 默认配置
|
package/lib/utils/serviceEnv.js
CHANGED
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.getApiUrl = exports.getApiHost = exports.baseURLMap = void 0;
|
|
7
7
|
var baseURLMap = exports.baseURLMap = {
|
|
8
8
|
dev: 'https://dev-gateway.fxqifu.net/pangu',
|
|
9
|
-
test: 'https://qa-gateway.fxqifu.net/pangu',
|
|
10
9
|
qa: 'https://qa-gateway.fxqifu.net/pangu',
|
|
10
|
+
test: 'https://test-gateway.fxqifu.net/pangu',
|
|
11
11
|
prod: 'https://gateway.fxqifu.net/pangu'
|
|
12
12
|
};
|
|
13
13
|
var getApiHost = exports.getApiHost = function getApiHost(env) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fle-ui/plus-choose-goods",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20",
|
|
4
4
|
"description": "@fle-ui/plus-choose-goods",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fle-ui",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@ant-design/icons": "^5.3.0",
|
|
25
25
|
"@fle-tools/env": "^1.0.3",
|
|
26
|
-
"@fle-ui/plus-address-selection": "^1.0.
|
|
27
|
-
"@fle-ui/plus-choose-mall-goods": "^1.1.
|
|
28
|
-
"@fle-ui/plus-config-provider": "
|
|
26
|
+
"@fle-ui/plus-address-selection": "^1.0.18",
|
|
27
|
+
"@fle-ui/plus-choose-mall-goods": "^1.1.17",
|
|
28
|
+
"@fle-ui/plus-config-provider": "^1.0.17",
|
|
29
29
|
"ahooks": "^3.8.0",
|
|
30
30
|
"lodash": "^4.17.21"
|
|
31
31
|
},
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "ff88c78a868b90efa3b70af5d281252445c6d4e8"
|
|
49
49
|
}
|
package/LICENSE
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
MIT
|