@fle-ui/plus-choose-site-goods 1.0.5 → 1.0.8
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/LICENSE +1 -0
- package/es/components/icon/index.d.ts +3 -0
- package/es/components/icon/index.js +7 -0
- package/es/index.d.ts +20 -0
- package/es/index.js +1263 -0
- package/es/index.less +107 -0
- package/es/utils/api.d.ts +9 -0
- package/es/utils/api.js +8 -0
- package/es/utils/common.d.ts +26 -0
- package/es/utils/common.js +31 -0
- package/es/utils/options.d.ts +25 -0
- package/es/utils/options.js +95 -0
- package/es/utils/request.d.ts +26 -0
- package/es/utils/request.js +176 -0
- package/es/utils/serviceEnv.d.ts +6 -0
- package/es/utils/serviceEnv.js +12 -0
- package/lib/components/icon/index.d.ts +3 -0
- package/lib/components/icon/index.js +13 -0
- package/lib/index.d.ts +20 -0
- package/lib/index.less +107 -0
- package/lib/utils/api.d.ts +9 -0
- package/lib/utils/api.js +14 -0
- package/lib/utils/common.d.ts +26 -0
- package/lib/utils/common.js +38 -0
- package/lib/utils/options.d.ts +25 -0
- package/lib/utils/options.js +101 -0
- package/lib/utils/request.d.ts +26 -0
- package/lib/utils/request.js +180 -0
- package/lib/utils/serviceEnv.d.ts +6 -0
- package/lib/utils/serviceEnv.js +18 -0
- package/package.json +4 -4
package/es/index.js
ADDED
|
@@ -0,0 +1,1263 @@
|
|
|
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
|
+
import "antd/es/modal/style";
|
|
3
|
+
import _Modal from "antd/es/modal";
|
|
4
|
+
import "antd/es/message/style";
|
|
5
|
+
import _message from "antd/es/message";
|
|
6
|
+
import "antd/es/table/style";
|
|
7
|
+
import _Table from "antd/es/table";
|
|
8
|
+
import "antd/es/spin/style";
|
|
9
|
+
import _Spin from "antd/es/spin";
|
|
10
|
+
import "antd/es/tooltip/style";
|
|
11
|
+
import _Tooltip from "antd/es/tooltip";
|
|
12
|
+
import "antd/es/row/style";
|
|
13
|
+
import _Row from "antd/es/row";
|
|
14
|
+
import "antd/es/radio/style";
|
|
15
|
+
import _Radio from "antd/es/radio";
|
|
16
|
+
import "antd/es/cascader/style";
|
|
17
|
+
import _Cascader from "antd/es/cascader";
|
|
18
|
+
import "antd/es/input-number/style";
|
|
19
|
+
import _InputNumber from "antd/es/input-number";
|
|
20
|
+
import "antd/es/select/style";
|
|
21
|
+
import _Select from "antd/es/select";
|
|
22
|
+
import "antd/es/col/style";
|
|
23
|
+
import _Col from "antd/es/col";
|
|
24
|
+
import "antd/es/tree-select/style";
|
|
25
|
+
import _TreeSelect from "antd/es/tree-select";
|
|
26
|
+
import "antd/es/button/style";
|
|
27
|
+
import _Button from "antd/es/button";
|
|
28
|
+
import "antd/es/input/style";
|
|
29
|
+
import _Input from "antd/es/input";
|
|
30
|
+
import "antd/es/tabs/style";
|
|
31
|
+
import _Tabs from "antd/es/tabs";
|
|
32
|
+
var _excluded = ["env", "token", "loginErrFn", "onClose", "siteId", "app", "multiple", "defaultSelectedGoodsIds", "onSelectOk", "showMore", "showMoreText", "tabsConfig"];
|
|
33
|
+
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); }
|
|
34
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
35
|
+
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."); }
|
|
36
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
37
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
38
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
39
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
40
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
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; }
|
|
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; }
|
|
43
|
+
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; }
|
|
44
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
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); }
|
|
46
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
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."); }
|
|
48
|
+
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); }
|
|
49
|
+
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; }
|
|
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; } }
|
|
51
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
52
|
+
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; }
|
|
53
|
+
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; }
|
|
54
|
+
import React, { useEffect, useState, useRef } from 'react';
|
|
55
|
+
import request from './utils/request';
|
|
56
|
+
import { getApiHost } from './utils/serviceEnv';
|
|
57
|
+
import api from './utils/api';
|
|
58
|
+
import ProImage from '@fle-ui/plus-image';
|
|
59
|
+
import ChooseMallGoods from '@fle-ui/plus-choose-mall-goods';
|
|
60
|
+
import AddressSelection from '@fle-ui/plus-address-selection';
|
|
61
|
+
import { QuestionCircleOutlined, LoadingOutlined } from '@ant-design/icons';
|
|
62
|
+
import Icon from './components/icon';
|
|
63
|
+
import { tabs, tabsSearchParamsMap, priceRangeForOnce, priceRangeForPurchase, profitRangeForOnce, profitRangeForPurchase, sortOptions } from './utils/options';
|
|
64
|
+
import { showMoney } from './utils/common';
|
|
65
|
+
import './index.less';
|
|
66
|
+
var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
67
|
+
var _props$env = props.env,
|
|
68
|
+
env = _props$env === void 0 ? 'prod' : _props$env,
|
|
69
|
+
token = props.token,
|
|
70
|
+
_props$loginErrFn = props.loginErrFn,
|
|
71
|
+
loginErrFn = _props$loginErrFn === void 0 ? function () {} : _props$loginErrFn,
|
|
72
|
+
_props$onClose = props.onClose,
|
|
73
|
+
onClose = _props$onClose === void 0 ? function () {} : _props$onClose,
|
|
74
|
+
siteId = props.siteId,
|
|
75
|
+
_props$app = props.app,
|
|
76
|
+
app = _props$app === void 0 ? 1 : _props$app,
|
|
77
|
+
_props$multiple = props.multiple,
|
|
78
|
+
multiple = _props$multiple === void 0 ? false : _props$multiple,
|
|
79
|
+
_props$defaultSelecte = props.defaultSelectedGoodsIds,
|
|
80
|
+
defaultSelectedGoodsIds = _props$defaultSelecte === void 0 ? [] : _props$defaultSelecte,
|
|
81
|
+
_props$onSelectOk = props.onSelectOk,
|
|
82
|
+
onSelectOk = _props$onSelectOk === void 0 ? function () {} : _props$onSelectOk,
|
|
83
|
+
_props$showMore = props.showMore,
|
|
84
|
+
showMore = _props$showMore === void 0 ? false : _props$showMore,
|
|
85
|
+
_props$showMoreText = props.showMoreText,
|
|
86
|
+
showMoreText = _props$showMoreText === void 0 ? '挑选更多商品到站点' : _props$showMoreText,
|
|
87
|
+
_props$tabsConfig = props.tabsConfig,
|
|
88
|
+
tabsConfig = _props$tabsConfig === void 0 ? ['jd', 'jx', 'zy', 'xhdg', 'mc'] : _props$tabsConfig,
|
|
89
|
+
otherProps = _objectWithoutProperties(props, _excluded);
|
|
90
|
+
var showTabs = useRef(tabs.filter(function (tab) {
|
|
91
|
+
return tabsConfig.includes(tab.key);
|
|
92
|
+
}));
|
|
93
|
+
// 默认搜索条件
|
|
94
|
+
var initSearchParams = {
|
|
95
|
+
tab: showTabs.current[0].key,
|
|
96
|
+
keyword: undefined,
|
|
97
|
+
categoryTree: undefined,
|
|
98
|
+
priceType: undefined,
|
|
99
|
+
priceRangeMin: undefined,
|
|
100
|
+
priceRangeMax: undefined,
|
|
101
|
+
profitType: undefined,
|
|
102
|
+
profitRangeMin: undefined,
|
|
103
|
+
profitRangeMax: undefined,
|
|
104
|
+
addressCodes: undefined,
|
|
105
|
+
orderName: sortOptions[0].value,
|
|
106
|
+
orderWay: 'desc',
|
|
107
|
+
flagScene: undefined,
|
|
108
|
+
flagTags: undefined,
|
|
109
|
+
flagIndustry: undefined,
|
|
110
|
+
flagCategory: undefined,
|
|
111
|
+
saleableCity: undefined // dgss可售卖城市
|
|
112
|
+
};
|
|
113
|
+
// http ------------ begin
|
|
114
|
+
var $http = request({
|
|
115
|
+
baseUrl: getApiHost(env),
|
|
116
|
+
token: token,
|
|
117
|
+
loginErrFn: loginErrFn
|
|
118
|
+
});
|
|
119
|
+
// http ------------ end
|
|
120
|
+
var _useState = useState(0),
|
|
121
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
122
|
+
searchFlag = _useState2[0],
|
|
123
|
+
setSearchFlag = _useState2[1]; // 获取列表数据标志位
|
|
124
|
+
useEffect(function () {
|
|
125
|
+
getGoodsList();
|
|
126
|
+
}, [searchFlag]);
|
|
127
|
+
var _useState3 = useState(0),
|
|
128
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
129
|
+
total = _useState4[0],
|
|
130
|
+
setTotal = _useState4[1];
|
|
131
|
+
var _useState5 = useState(1),
|
|
132
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
133
|
+
pageNo = _useState6[0],
|
|
134
|
+
setPageNo = _useState6[1];
|
|
135
|
+
var _useState7 = useState(10),
|
|
136
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
137
|
+
pageSize = _useState8[0],
|
|
138
|
+
setPageSize = _useState8[1];
|
|
139
|
+
// pageNo 或者 pageSize
|
|
140
|
+
var onPageChange = function onPageChange() {
|
|
141
|
+
var page = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
142
|
+
var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : pageSize;
|
|
143
|
+
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'page';
|
|
144
|
+
if (type === 'page' && size === pageSize) {
|
|
145
|
+
setPageNo(page);
|
|
146
|
+
setSearchFlag(searchFlag + 1);
|
|
147
|
+
} else if (type === 'size') {
|
|
148
|
+
setPageNo(1);
|
|
149
|
+
setPageSize(size);
|
|
150
|
+
setSearchFlag(searchFlag + 1);
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
var _useState9 = useState([]),
|
|
154
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
155
|
+
goodsList = _useState10[0],
|
|
156
|
+
setGoodsList = _useState10[1];
|
|
157
|
+
var _useState11 = useState(_objectSpread({}, initSearchParams)),
|
|
158
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
159
|
+
searchParams = _useState12[0],
|
|
160
|
+
setSearchParams = _useState12[1];
|
|
161
|
+
var handleChangeParams = function handleChangeParams(obj) {
|
|
162
|
+
setSearchParams(_objectSpread(_objectSpread({}, searchParams), obj));
|
|
163
|
+
};
|
|
164
|
+
// 初始化价格和利润率搜索项
|
|
165
|
+
var initRangeParams = function initRangeParams() {
|
|
166
|
+
var obj = {};
|
|
167
|
+
if (app === 1) {
|
|
168
|
+
obj = {
|
|
169
|
+
priceType: priceRangeForPurchase[0].value,
|
|
170
|
+
profitType: profitRangeForPurchase[0].value
|
|
171
|
+
};
|
|
172
|
+
} else {
|
|
173
|
+
obj = {
|
|
174
|
+
priceType: priceRangeForOnce[0].value,
|
|
175
|
+
profitType: profitRangeForOnce[0].value
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
handleChangeParams(_objectSpread(_objectSpread({}, initSearchParams), obj));
|
|
179
|
+
return obj;
|
|
180
|
+
};
|
|
181
|
+
useEffect(function () {
|
|
182
|
+
initRangeParams();
|
|
183
|
+
}, [app]);
|
|
184
|
+
var _useState13 = useState(false),
|
|
185
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
186
|
+
loading = _useState14[0],
|
|
187
|
+
setLoading = _useState14[1];
|
|
188
|
+
var getGoodsList = /*#__PURE__*/function () {
|
|
189
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
190
|
+
var _searchParams$flagCat, _searchParams$saleabl, params, text, res, _res$data, _res$data2, list, jdGoods;
|
|
191
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
192
|
+
while (1) switch (_context.prev = _context.next) {
|
|
193
|
+
case 0:
|
|
194
|
+
_context.prev = 0;
|
|
195
|
+
params = _objectSpread(_objectSpread({
|
|
196
|
+
pageNo: pageNo,
|
|
197
|
+
pageSize: pageSize,
|
|
198
|
+
siteId: siteId,
|
|
199
|
+
poolSaasStatus: 10,
|
|
200
|
+
keyword: searchParams.keyword
|
|
201
|
+
}, tabsSearchParamsMap[searchParams.tab] || {}), {}, {
|
|
202
|
+
categoryTree: searchParams.categoryTree,
|
|
203
|
+
orderName: searchParams.orderName,
|
|
204
|
+
orderWay: searchParams.orderWay,
|
|
205
|
+
flagScene: searchParams.flagScene,
|
|
206
|
+
flagTags: searchParams.flagTags,
|
|
207
|
+
flagIndustry: searchParams.flagIndustry,
|
|
208
|
+
flagCategory: ((_searchParams$flagCat = searchParams.flagCategory) === null || _searchParams$flagCat === void 0 ? void 0 : _searchParams$flagCat.length) ? searchParams.flagCategory[searchParams.flagCategory.length - 1] : undefined
|
|
209
|
+
}); // 价格区间
|
|
210
|
+
if (searchParams.priceRangeMin !== undefined) {
|
|
211
|
+
params[searchParams.priceType + 'Min'] = Number(searchParams.priceRangeMin * 100);
|
|
212
|
+
}
|
|
213
|
+
if (searchParams.priceRangeMax !== undefined) {
|
|
214
|
+
params[searchParams.priceType + 'Max'] = Number(searchParams.priceRangeMax * 100);
|
|
215
|
+
}
|
|
216
|
+
// 利润率区间
|
|
217
|
+
if (searchParams.profitRangeMin !== undefined) {
|
|
218
|
+
params[searchParams.profitType + 'Min'] = Number(searchParams.profitRangeMin);
|
|
219
|
+
}
|
|
220
|
+
if (searchParams.profitRangeMax !== undefined) {
|
|
221
|
+
params[searchParams.profitType + 'Max'] = Number(searchParams.profitRangeMax);
|
|
222
|
+
}
|
|
223
|
+
// 发货地
|
|
224
|
+
if (searchParams.addressCodes) {
|
|
225
|
+
params.cityCode = searchParams.addressCodes[1];
|
|
226
|
+
}
|
|
227
|
+
// 蛋糕叔叔城市
|
|
228
|
+
if ((_searchParams$saleabl = searchParams.saleableCity) === null || _searchParams$saleabl === void 0 ? void 0 : _searchParams$saleabl.length) {
|
|
229
|
+
text = '';
|
|
230
|
+
searchParams.saleableCity.forEach(function (item) {
|
|
231
|
+
var findItem = dgssCitys.find(function (v) {
|
|
232
|
+
return v.dgssCityId == item;
|
|
233
|
+
});
|
|
234
|
+
findItem && (text += findItem.name + ',');
|
|
235
|
+
});
|
|
236
|
+
text = text.slice(0, text.length - 1);
|
|
237
|
+
params.saleableCity = text;
|
|
238
|
+
}
|
|
239
|
+
// console.log(params);
|
|
240
|
+
// return;
|
|
241
|
+
setLoading(true);
|
|
242
|
+
_context.next = 11;
|
|
243
|
+
return $http.post(api['getGoodsList'], params);
|
|
244
|
+
case 11:
|
|
245
|
+
res = _context.sent;
|
|
246
|
+
if (res === null || res === void 0 ? void 0 : res.success) {
|
|
247
|
+
list = (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list) || [];
|
|
248
|
+
setGoodsList(list);
|
|
249
|
+
setTotal((res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.total) || 0);
|
|
250
|
+
setSelectedRowKeys([]);
|
|
251
|
+
setSelectedRows([]);
|
|
252
|
+
// 如有京东商品 则调接口查询库存
|
|
253
|
+
jdGoods = list.filter(function (goods) {
|
|
254
|
+
return goods.thirdType === 10;
|
|
255
|
+
});
|
|
256
|
+
if (jdGoods.length) {
|
|
257
|
+
getJdStock(list, jdGoods);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
case 13:
|
|
261
|
+
_context.prev = 13;
|
|
262
|
+
setLoading(false);
|
|
263
|
+
return _context.finish(13);
|
|
264
|
+
case 16:
|
|
265
|
+
case "end":
|
|
266
|
+
return _context.stop();
|
|
267
|
+
}
|
|
268
|
+
}, _callee, null, [[0,, 13, 16]]);
|
|
269
|
+
}));
|
|
270
|
+
return function getGoodsList() {
|
|
271
|
+
return _ref.apply(this, arguments);
|
|
272
|
+
};
|
|
273
|
+
}();
|
|
274
|
+
// 缓存解决查询JD库存慢的问题
|
|
275
|
+
var goodsRef = useRef([]);
|
|
276
|
+
useEffect(function () {
|
|
277
|
+
goodsRef.current = goodsList;
|
|
278
|
+
}, [goodsList]);
|
|
279
|
+
var _useState15 = useState(false),
|
|
280
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
281
|
+
getJdStockLoading = _useState16[0],
|
|
282
|
+
setGetJdStockLoading = _useState16[1];
|
|
283
|
+
// 获取京东商品库存
|
|
284
|
+
var getJdStock = /*#__PURE__*/function () {
|
|
285
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(list, jdGoods) {
|
|
286
|
+
var arr, params, res, stockArr, listCopy, stockObj;
|
|
287
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
288
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
289
|
+
case 0:
|
|
290
|
+
arr = searchParams.addressCodes;
|
|
291
|
+
params = {
|
|
292
|
+
countyId: 0,
|
|
293
|
+
provinceId: (arr === null || arr === void 0 ? void 0 : arr.length) ? arr[0] : 15,
|
|
294
|
+
cityId: (arr === null || arr === void 0 ? void 0 : arr.length) ? arr[1] : 1213,
|
|
295
|
+
idList: jdGoods.map(function (goods) {
|
|
296
|
+
return {
|
|
297
|
+
goodsId: goods.goodsId,
|
|
298
|
+
num: 1
|
|
299
|
+
};
|
|
300
|
+
})
|
|
301
|
+
};
|
|
302
|
+
_context2.prev = 2;
|
|
303
|
+
setGetJdStockLoading(true);
|
|
304
|
+
_context2.next = 6;
|
|
305
|
+
return $http.post(api['getJDGoodsStock'], params);
|
|
306
|
+
case 6:
|
|
307
|
+
res = _context2.sent;
|
|
308
|
+
if (res === null || res === void 0 ? void 0 : res.success) {
|
|
309
|
+
stockArr = (res === null || res === void 0 ? void 0 : res.data) || [];
|
|
310
|
+
listCopy = _toConsumableArray(goodsRef.current);
|
|
311
|
+
stockObj = {};
|
|
312
|
+
stockArr.forEach(function (item) {
|
|
313
|
+
stockObj[item.goodsId] = item.stockText;
|
|
314
|
+
});
|
|
315
|
+
listCopy.forEach(function (goods) {
|
|
316
|
+
goods.stockText = stockObj[goods.goodsId];
|
|
317
|
+
});
|
|
318
|
+
setGoodsList(listCopy);
|
|
319
|
+
}
|
|
320
|
+
case 8:
|
|
321
|
+
_context2.prev = 8;
|
|
322
|
+
setGetJdStockLoading(false);
|
|
323
|
+
return _context2.finish(8);
|
|
324
|
+
case 11:
|
|
325
|
+
case "end":
|
|
326
|
+
return _context2.stop();
|
|
327
|
+
}
|
|
328
|
+
}, _callee2, null, [[2,, 8, 11]]);
|
|
329
|
+
}));
|
|
330
|
+
return function getJdStock(_x, _x2) {
|
|
331
|
+
return _ref2.apply(this, arguments);
|
|
332
|
+
};
|
|
333
|
+
}();
|
|
334
|
+
var handleMainSearch = function handleMainSearch() {
|
|
335
|
+
setPageNo(1);
|
|
336
|
+
setSearchParams(_objectSpread(_objectSpread({}, initSearchParams), {}, {
|
|
337
|
+
tab: searchParams.tab,
|
|
338
|
+
keyword: searchParams.keyword
|
|
339
|
+
}, initRangeParams()));
|
|
340
|
+
setSearchFlag(searchFlag + 1);
|
|
341
|
+
};
|
|
342
|
+
var handleSearch = function handleSearch() {
|
|
343
|
+
setPageNo(1);
|
|
344
|
+
setSearchFlag(searchFlag + 1);
|
|
345
|
+
};
|
|
346
|
+
var handleReset = function handleReset() {
|
|
347
|
+
setPageNo(1);
|
|
348
|
+
setSearchParams(_objectSpread(_objectSpread({}, initSearchParams), {}, {
|
|
349
|
+
tab: searchParams.tab,
|
|
350
|
+
keyword: searchParams.keyword
|
|
351
|
+
}, initRangeParams()));
|
|
352
|
+
setSearchFlag(searchFlag + 1);
|
|
353
|
+
};
|
|
354
|
+
// 系统类目 begin
|
|
355
|
+
var _useState17 = useState([]),
|
|
356
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
357
|
+
categoryOptions = _useState18[0],
|
|
358
|
+
setCategoryOptions = _useState18[1]; // 系统类目
|
|
359
|
+
var getCategoryList = /*#__PURE__*/function () {
|
|
360
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
361
|
+
var res;
|
|
362
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
363
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
364
|
+
case 0:
|
|
365
|
+
_context3.next = 2;
|
|
366
|
+
return $http.post(api['getCategoryAllList'], {
|
|
367
|
+
parentId: 0
|
|
368
|
+
});
|
|
369
|
+
case 2:
|
|
370
|
+
res = _context3.sent;
|
|
371
|
+
if (res === null || res === void 0 ? void 0 : res.success) {
|
|
372
|
+
setCategoryOptions((res === null || res === void 0 ? void 0 : res.data) || []);
|
|
373
|
+
}
|
|
374
|
+
case 4:
|
|
375
|
+
case "end":
|
|
376
|
+
return _context3.stop();
|
|
377
|
+
}
|
|
378
|
+
}, _callee3);
|
|
379
|
+
}));
|
|
380
|
+
return function getCategoryList() {
|
|
381
|
+
return _ref3.apply(this, arguments);
|
|
382
|
+
};
|
|
383
|
+
}();
|
|
384
|
+
useEffect(function () {
|
|
385
|
+
getCategoryList();
|
|
386
|
+
}, []);
|
|
387
|
+
// 系统类目 end
|
|
388
|
+
// tab begin
|
|
389
|
+
var onTabChange = function onTabChange(v) {
|
|
390
|
+
handleChangeParams(_objectSpread(_objectSpread({}, initSearchParams), {}, {
|
|
391
|
+
tab: v
|
|
392
|
+
}, initRangeParams()));
|
|
393
|
+
setPageNo(1);
|
|
394
|
+
setSearchFlag(searchFlag + 1);
|
|
395
|
+
};
|
|
396
|
+
var renderTabs = function renderTabs() {
|
|
397
|
+
var _showTabs$current;
|
|
398
|
+
return ((_showTabs$current = showTabs.current) === null || _showTabs$current === void 0 ? void 0 : _showTabs$current.length) > 1 && /*#__PURE__*/React.createElement(_Tabs, {
|
|
399
|
+
activeKey: searchParams.tab,
|
|
400
|
+
onChange: onTabChange,
|
|
401
|
+
items: showTabs.current
|
|
402
|
+
});
|
|
403
|
+
};
|
|
404
|
+
// tab end
|
|
405
|
+
// mainSearch begin
|
|
406
|
+
var _useState19 = useState(false),
|
|
407
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
408
|
+
showMoreModal = _useState20[0],
|
|
409
|
+
setShowMoreModal = _useState20[1];
|
|
410
|
+
var renderMainSearch = function renderMainSearch() {
|
|
411
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
412
|
+
className: "main-search"
|
|
413
|
+
}, /*#__PURE__*/React.createElement(_Input.Search, {
|
|
414
|
+
onSearch: handleMainSearch,
|
|
415
|
+
onChange: function onChange(e) {
|
|
416
|
+
handleChangeParams({
|
|
417
|
+
keyword: e.target.value
|
|
418
|
+
});
|
|
419
|
+
},
|
|
420
|
+
value: searchParams.keyword,
|
|
421
|
+
placeholder: '请输入商品名称/商品id/品牌',
|
|
422
|
+
enterButton: "\u641C\u7D22",
|
|
423
|
+
prefix: /*#__PURE__*/React.createElement(Icon, {
|
|
424
|
+
type: "Lined-a-search-Common"
|
|
425
|
+
}),
|
|
426
|
+
style: {
|
|
427
|
+
width: 500
|
|
428
|
+
},
|
|
429
|
+
loading: loading,
|
|
430
|
+
maxLength: 20
|
|
431
|
+
}), showMore && /*#__PURE__*/React.createElement(_Button, {
|
|
432
|
+
type: "link",
|
|
433
|
+
className: "choose-more-btn",
|
|
434
|
+
onClick: function onClick() {
|
|
435
|
+
setShowMoreModal(true);
|
|
436
|
+
}
|
|
437
|
+
}, showMoreText));
|
|
438
|
+
};
|
|
439
|
+
// mainSearch end
|
|
440
|
+
// sort begin
|
|
441
|
+
var handleSortChange = function handleSortChange(e) {
|
|
442
|
+
handleChangeParams({
|
|
443
|
+
orderName: e.target.value
|
|
444
|
+
});
|
|
445
|
+
setPageNo(1);
|
|
446
|
+
setSearchFlag(searchFlag + 1);
|
|
447
|
+
};
|
|
448
|
+
// sort end
|
|
449
|
+
// 自有商品 标签 begin
|
|
450
|
+
var _useState21 = useState([]),
|
|
451
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
|
452
|
+
flagSceneOptions = _useState22[0],
|
|
453
|
+
setFlagSceneOptions = _useState22[1]; // 场景标签
|
|
454
|
+
var _useState23 = useState([]),
|
|
455
|
+
_useState24 = _slicedToArray(_useState23, 2),
|
|
456
|
+
flagTagsOptions = _useState24[0],
|
|
457
|
+
setFlagTagsOptions = _useState24[1]; // 商品标签
|
|
458
|
+
var _useState25 = useState([]),
|
|
459
|
+
_useState26 = _slicedToArray(_useState25, 2),
|
|
460
|
+
flagIndustryOptions = _useState26[0],
|
|
461
|
+
setFlagIndustryOptions = _useState26[1]; // 行业标签
|
|
462
|
+
var _useState27 = useState([]),
|
|
463
|
+
_useState28 = _slicedToArray(_useState27, 2),
|
|
464
|
+
flagCategoryOptions = _useState28[0],
|
|
465
|
+
setFlagCategoryOptions = _useState28[1]; // 品类标签
|
|
466
|
+
// 获取自有商品标签 - 场景 商品 行业
|
|
467
|
+
var getSelfGoodsFlag = /*#__PURE__*/function () {
|
|
468
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
469
|
+
var res, list;
|
|
470
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
471
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
472
|
+
case 0:
|
|
473
|
+
_context4.next = 2;
|
|
474
|
+
return $http.post(api['getSelfGoodsFlag']);
|
|
475
|
+
case 2:
|
|
476
|
+
res = _context4.sent;
|
|
477
|
+
if (res === null || res === void 0 ? void 0 : res.success) {
|
|
478
|
+
list = (res === null || res === void 0 ? void 0 : res.data) || [];
|
|
479
|
+
setFlagSceneOptions(list[3]);
|
|
480
|
+
setFlagTagsOptions(list[1]);
|
|
481
|
+
setFlagIndustryOptions(list[2]);
|
|
482
|
+
}
|
|
483
|
+
case 4:
|
|
484
|
+
case "end":
|
|
485
|
+
return _context4.stop();
|
|
486
|
+
}
|
|
487
|
+
}, _callee4);
|
|
488
|
+
}));
|
|
489
|
+
return function getSelfGoodsFlag() {
|
|
490
|
+
return _ref4.apply(this, arguments);
|
|
491
|
+
};
|
|
492
|
+
}();
|
|
493
|
+
// 获取自有商品标签 - 品类
|
|
494
|
+
var getSelfGoodsFlagCategory = /*#__PURE__*/function () {
|
|
495
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
496
|
+
var res;
|
|
497
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
498
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
499
|
+
case 0:
|
|
500
|
+
_context5.next = 2;
|
|
501
|
+
return $http.get(api['getSelfGoodsFlagCategory']);
|
|
502
|
+
case 2:
|
|
503
|
+
res = _context5.sent;
|
|
504
|
+
if (res === null || res === void 0 ? void 0 : res.success) {
|
|
505
|
+
setFlagCategoryOptions((res === null || res === void 0 ? void 0 : res.data) || []);
|
|
506
|
+
}
|
|
507
|
+
case 4:
|
|
508
|
+
case "end":
|
|
509
|
+
return _context5.stop();
|
|
510
|
+
}
|
|
511
|
+
}, _callee5);
|
|
512
|
+
}));
|
|
513
|
+
return function getSelfGoodsFlagCategory() {
|
|
514
|
+
return _ref5.apply(this, arguments);
|
|
515
|
+
};
|
|
516
|
+
}();
|
|
517
|
+
useEffect(function () {
|
|
518
|
+
if (searchParams.tab === 'zy') {
|
|
519
|
+
getSelfGoodsFlag();
|
|
520
|
+
getSelfGoodsFlagCategory();
|
|
521
|
+
}
|
|
522
|
+
}, [searchParams.tab]);
|
|
523
|
+
// 自有商品 标签 end
|
|
524
|
+
// dgss 城市列表 begin
|
|
525
|
+
var _useState29 = useState([]),
|
|
526
|
+
_useState30 = _slicedToArray(_useState29, 2),
|
|
527
|
+
dgssCitys = _useState30[0],
|
|
528
|
+
setDgssCitys = _useState30[1];
|
|
529
|
+
var getDgssCitys = /*#__PURE__*/function () {
|
|
530
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
531
|
+
var res;
|
|
532
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
533
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
534
|
+
case 0:
|
|
535
|
+
_context6.next = 2;
|
|
536
|
+
return $http.post(api['getDgssCityAllList']);
|
|
537
|
+
case 2:
|
|
538
|
+
res = _context6.sent;
|
|
539
|
+
if (res === null || res === void 0 ? void 0 : res.success) {
|
|
540
|
+
setDgssCitys((res === null || res === void 0 ? void 0 : res.data) || []);
|
|
541
|
+
}
|
|
542
|
+
case 4:
|
|
543
|
+
case "end":
|
|
544
|
+
return _context6.stop();
|
|
545
|
+
}
|
|
546
|
+
}, _callee6);
|
|
547
|
+
}));
|
|
548
|
+
return function getDgssCitys() {
|
|
549
|
+
return _ref6.apply(this, arguments);
|
|
550
|
+
};
|
|
551
|
+
}();
|
|
552
|
+
useEffect(function () {
|
|
553
|
+
if (searchParams.tab === 'xhdg') {
|
|
554
|
+
getDgssCitys();
|
|
555
|
+
}
|
|
556
|
+
}, [searchParams.tab]);
|
|
557
|
+
// dgss 城市列表 end
|
|
558
|
+
// search-2 begin
|
|
559
|
+
var renderSearch2 = function renderSearch2() {
|
|
560
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
561
|
+
className: "ww-search search-2"
|
|
562
|
+
}, /*#__PURE__*/React.createElement(_Row, {
|
|
563
|
+
gutter: [24, 24]
|
|
564
|
+
}, /*#__PURE__*/React.createElement(_Col, {
|
|
565
|
+
span: 8
|
|
566
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
567
|
+
className: "ww-search-flex"
|
|
568
|
+
}, "\u5546\u54C1\u7C7B\u76EE\uFF1A", /*#__PURE__*/React.createElement(_TreeSelect, {
|
|
569
|
+
style: {
|
|
570
|
+
flex: 1
|
|
571
|
+
},
|
|
572
|
+
value: searchParams.categoryTree,
|
|
573
|
+
dropdownStyle: {
|
|
574
|
+
maxHeight: 400,
|
|
575
|
+
overflow: 'auto'
|
|
576
|
+
},
|
|
577
|
+
placeholder: "\u9009\u62E9\u5546\u54C1\u7C7B\u76EE",
|
|
578
|
+
allowClear: true,
|
|
579
|
+
onChange: function onChange(e) {
|
|
580
|
+
handleChangeParams({
|
|
581
|
+
categoryTree: e
|
|
582
|
+
});
|
|
583
|
+
},
|
|
584
|
+
treeData: categoryOptions,
|
|
585
|
+
fieldNames: {
|
|
586
|
+
label: 'categoryName',
|
|
587
|
+
value: 'categoryTree',
|
|
588
|
+
children: 'childNodes'
|
|
589
|
+
}
|
|
590
|
+
}))), /*#__PURE__*/React.createElement(_Col, {
|
|
591
|
+
span: 8
|
|
592
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
593
|
+
className: "ww-search-flex"
|
|
594
|
+
}, /*#__PURE__*/React.createElement(_Select, {
|
|
595
|
+
style: {
|
|
596
|
+
width: 120,
|
|
597
|
+
marginRight: 6
|
|
598
|
+
},
|
|
599
|
+
value: searchParams.priceType,
|
|
600
|
+
onChange: function onChange(e) {
|
|
601
|
+
handleChangeParams({
|
|
602
|
+
priceType: e
|
|
603
|
+
});
|
|
604
|
+
},
|
|
605
|
+
options: app === 1 ? priceRangeForPurchase : priceRangeForOnce
|
|
606
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
607
|
+
className: "ww-search-range-input"
|
|
608
|
+
}, /*#__PURE__*/React.createElement(_InputNumber, {
|
|
609
|
+
min: 0,
|
|
610
|
+
max: 100000,
|
|
611
|
+
precision: 2,
|
|
612
|
+
value: searchParams.priceRangeMin,
|
|
613
|
+
onChange: function onChange(v) {
|
|
614
|
+
handleChangeParams({
|
|
615
|
+
priceRangeMin: v
|
|
616
|
+
});
|
|
617
|
+
},
|
|
618
|
+
placeholder: "\u6700\u4F4E\u4EF7",
|
|
619
|
+
style: {
|
|
620
|
+
flex: 1
|
|
621
|
+
}
|
|
622
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
623
|
+
style: {
|
|
624
|
+
margin: '0 8px'
|
|
625
|
+
}
|
|
626
|
+
}, "-"), /*#__PURE__*/React.createElement(_InputNumber, {
|
|
627
|
+
min: 0,
|
|
628
|
+
max: 100000,
|
|
629
|
+
precision: 2,
|
|
630
|
+
value: searchParams.priceRangeMax,
|
|
631
|
+
onChange: function onChange(v) {
|
|
632
|
+
handleChangeParams({
|
|
633
|
+
priceRangeMax: v
|
|
634
|
+
});
|
|
635
|
+
},
|
|
636
|
+
placeholder: "\u6700\u9AD8\u4EF7",
|
|
637
|
+
style: {
|
|
638
|
+
flex: 1
|
|
639
|
+
}
|
|
640
|
+
})))), /*#__PURE__*/React.createElement(_Col, {
|
|
641
|
+
span: 8
|
|
642
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
643
|
+
className: "ww-search-flex"
|
|
644
|
+
}, /*#__PURE__*/React.createElement(_Select, {
|
|
645
|
+
style: {
|
|
646
|
+
width: 120,
|
|
647
|
+
marginRight: 6
|
|
648
|
+
},
|
|
649
|
+
value: searchParams.profitType,
|
|
650
|
+
onChange: function onChange(e) {
|
|
651
|
+
handleChangeParams({
|
|
652
|
+
profitType: e
|
|
653
|
+
});
|
|
654
|
+
},
|
|
655
|
+
options: app === 1 ? profitRangeForPurchase : profitRangeForOnce
|
|
656
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
657
|
+
className: "ww-search-range-input"
|
|
658
|
+
}, /*#__PURE__*/React.createElement(_InputNumber, {
|
|
659
|
+
min: 0,
|
|
660
|
+
max: 100000,
|
|
661
|
+
precision: 2,
|
|
662
|
+
value: searchParams.profitRangeMin,
|
|
663
|
+
onChange: function onChange(v) {
|
|
664
|
+
handleChangeParams({
|
|
665
|
+
profitRangeMin: v
|
|
666
|
+
});
|
|
667
|
+
},
|
|
668
|
+
placeholder: "\u6700\u4F4E\u5229\u6DA6\u7387",
|
|
669
|
+
style: {
|
|
670
|
+
flex: 1
|
|
671
|
+
}
|
|
672
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
673
|
+
style: {
|
|
674
|
+
margin: '0 8px'
|
|
675
|
+
}
|
|
676
|
+
}, "-"), /*#__PURE__*/React.createElement(_InputNumber, {
|
|
677
|
+
min: 0,
|
|
678
|
+
max: 100000,
|
|
679
|
+
precision: 2,
|
|
680
|
+
value: searchParams.profitRangeMax,
|
|
681
|
+
onChange: function onChange(v) {
|
|
682
|
+
handleChangeParams({
|
|
683
|
+
profitRangeMax: v
|
|
684
|
+
});
|
|
685
|
+
},
|
|
686
|
+
placeholder: "\u6700\u9AD8\u5229\u6DA6\u7387",
|
|
687
|
+
style: {
|
|
688
|
+
flex: 1
|
|
689
|
+
}
|
|
690
|
+
})))), searchParams.tab === 'zy' && /*#__PURE__*/React.createElement(_Col, {
|
|
691
|
+
span: 16
|
|
692
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
693
|
+
className: "ww-search-flex"
|
|
694
|
+
}, /*#__PURE__*/React.createElement(_Select, {
|
|
695
|
+
style: {
|
|
696
|
+
width: 170,
|
|
697
|
+
marginRight: 8
|
|
698
|
+
},
|
|
699
|
+
value: searchParams.flagScene,
|
|
700
|
+
onChange: function onChange(v) {
|
|
701
|
+
handleChangeParams({
|
|
702
|
+
flagScene: v
|
|
703
|
+
});
|
|
704
|
+
},
|
|
705
|
+
options: flagSceneOptions,
|
|
706
|
+
fieldNames: {
|
|
707
|
+
label: 'flag',
|
|
708
|
+
value: 'id'
|
|
709
|
+
},
|
|
710
|
+
placeholder: "\u9009\u62E9\u573A\u666F\u6807\u7B7E",
|
|
711
|
+
allowClear: true
|
|
712
|
+
}), /*#__PURE__*/React.createElement(_Select, {
|
|
713
|
+
style: {
|
|
714
|
+
width: 170,
|
|
715
|
+
marginRight: 8
|
|
716
|
+
},
|
|
717
|
+
value: searchParams.flagTags,
|
|
718
|
+
onChange: function onChange(v) {
|
|
719
|
+
handleChangeParams({
|
|
720
|
+
flagTags: v
|
|
721
|
+
});
|
|
722
|
+
},
|
|
723
|
+
options: flagTagsOptions,
|
|
724
|
+
fieldNames: {
|
|
725
|
+
label: 'flag',
|
|
726
|
+
value: 'id'
|
|
727
|
+
},
|
|
728
|
+
placeholder: "\u9009\u62E9\u5546\u54C1\u6807\u7B7E",
|
|
729
|
+
allowClear: true
|
|
730
|
+
}), /*#__PURE__*/React.createElement(_Select, {
|
|
731
|
+
style: {
|
|
732
|
+
width: 170,
|
|
733
|
+
marginRight: 8
|
|
734
|
+
},
|
|
735
|
+
value: searchParams.flagIndustry,
|
|
736
|
+
onChange: function onChange(v) {
|
|
737
|
+
handleChangeParams({
|
|
738
|
+
flagIndustry: v
|
|
739
|
+
});
|
|
740
|
+
},
|
|
741
|
+
options: flagIndustryOptions,
|
|
742
|
+
fieldNames: {
|
|
743
|
+
label: 'flag',
|
|
744
|
+
value: 'id'
|
|
745
|
+
},
|
|
746
|
+
placeholder: "\u9009\u62E9\u884C\u4E1A\u6807\u7B7E",
|
|
747
|
+
allowClear: true
|
|
748
|
+
}), /*#__PURE__*/React.createElement(_Cascader, {
|
|
749
|
+
placeholder: "\u9009\u62E9\u5546\u54C1\u54C1\u7C7B",
|
|
750
|
+
fieldNames: {
|
|
751
|
+
label: 'name',
|
|
752
|
+
value: 'id'
|
|
753
|
+
},
|
|
754
|
+
options: flagCategoryOptions,
|
|
755
|
+
value: searchParams.flagCategory,
|
|
756
|
+
style: {
|
|
757
|
+
width: 250
|
|
758
|
+
},
|
|
759
|
+
onChange: function onChange(v) {
|
|
760
|
+
handleChangeParams({
|
|
761
|
+
flagCategory: v
|
|
762
|
+
});
|
|
763
|
+
},
|
|
764
|
+
allowClear: true,
|
|
765
|
+
expandTrigger: "hover",
|
|
766
|
+
changeOnSelect: true
|
|
767
|
+
}))), searchParams.tab === 'xhdg' && /*#__PURE__*/React.createElement(_Col, {
|
|
768
|
+
span: 8
|
|
769
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
770
|
+
className: "ww-search-flex"
|
|
771
|
+
}, "\u53EF\u552E\u5356\u57CE\u5E02\uFF1A", /*#__PURE__*/React.createElement(_Select, {
|
|
772
|
+
showSearch: true,
|
|
773
|
+
mode: "multiple",
|
|
774
|
+
allowClear: true,
|
|
775
|
+
placeholder: "\u5168\u90E8",
|
|
776
|
+
onChange: function onChange(v) {
|
|
777
|
+
handleChangeParams({
|
|
778
|
+
saleableCity: v
|
|
779
|
+
});
|
|
780
|
+
},
|
|
781
|
+
value: searchParams.saleableCity,
|
|
782
|
+
filterOption: function filterOption(input, option) {
|
|
783
|
+
return option.children.toLowerCase().includes(input.toLowerCase());
|
|
784
|
+
},
|
|
785
|
+
style: {
|
|
786
|
+
flex: 1
|
|
787
|
+
}
|
|
788
|
+
}, dgssCitys.map(function (item) {
|
|
789
|
+
return /*#__PURE__*/React.createElement(_Select.Option, {
|
|
790
|
+
key: item.dgssCityId,
|
|
791
|
+
value: item.dgssCityId
|
|
792
|
+
}, item.name);
|
|
793
|
+
})))), /*#__PURE__*/React.createElement(_Col, {
|
|
794
|
+
span: 8
|
|
795
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
796
|
+
className: "ww-search-flex"
|
|
797
|
+
}, "\u53D1\u8D27\u5730\uFF1A", /*#__PURE__*/React.createElement(AddressSelection, {
|
|
798
|
+
value: searchParams.addressCodes,
|
|
799
|
+
onChange: function onChange(v) {
|
|
800
|
+
handleChangeParams({
|
|
801
|
+
addressCodes: v
|
|
802
|
+
});
|
|
803
|
+
},
|
|
804
|
+
placeholder: "\u8BF7\u9009\u62E9\u5730\u5740",
|
|
805
|
+
level: 2,
|
|
806
|
+
style: {
|
|
807
|
+
flex: 1
|
|
808
|
+
}
|
|
809
|
+
}))), /*#__PURE__*/React.createElement(_Col, {
|
|
810
|
+
span: 8
|
|
811
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
812
|
+
className: "ww-search-flex"
|
|
813
|
+
}, "\u6392\u5E8F\uFF1A", /*#__PURE__*/React.createElement(_Radio.Group, {
|
|
814
|
+
onChange: handleSortChange,
|
|
815
|
+
value: searchParams.orderName,
|
|
816
|
+
optionType: "button",
|
|
817
|
+
buttonStyle: "solid"
|
|
818
|
+
}, sortOptions.map(function (item) {
|
|
819
|
+
return /*#__PURE__*/React.createElement(_Radio.Button, {
|
|
820
|
+
key: item.value,
|
|
821
|
+
value: item.value
|
|
822
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
823
|
+
className: "sort-item"
|
|
824
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
825
|
+
className: "sort-item-label"
|
|
826
|
+
}, item.label), /*#__PURE__*/React.createElement(Icon, {
|
|
827
|
+
type: "icon-paixu",
|
|
828
|
+
className: "sort-item-icon"
|
|
829
|
+
})));
|
|
830
|
+
})))), /*#__PURE__*/React.createElement(_Col, {
|
|
831
|
+
span: 8
|
|
832
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
833
|
+
className: "ww-search-flex"
|
|
834
|
+
}, /*#__PURE__*/React.createElement(_Button, {
|
|
835
|
+
type: "primary",
|
|
836
|
+
onClick: handleSearch,
|
|
837
|
+
loading: loading
|
|
838
|
+
}, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(_Button, {
|
|
839
|
+
style: {
|
|
840
|
+
marginLeft: 8
|
|
841
|
+
},
|
|
842
|
+
onClick: handleReset
|
|
843
|
+
}, "\u91CD\u7F6E"), multiple && /*#__PURE__*/React.createElement("div", {
|
|
844
|
+
style: {
|
|
845
|
+
flex: 1,
|
|
846
|
+
textAlign: 'right'
|
|
847
|
+
}
|
|
848
|
+
}, /*#__PURE__*/React.createElement(_Button, {
|
|
849
|
+
type: "primary",
|
|
850
|
+
onClick: handleBatchChoose,
|
|
851
|
+
disabled: selectedRowKeys.length === 0
|
|
852
|
+
}, "\u6279\u91CF\u6311\u9009(", selectedRowKeys.length, ")"))))));
|
|
853
|
+
};
|
|
854
|
+
// search-2 end
|
|
855
|
+
// 选择 begin
|
|
856
|
+
var _useState31 = useState([]),
|
|
857
|
+
_useState32 = _slicedToArray(_useState31, 2),
|
|
858
|
+
selectedRowKeys = _useState32[0],
|
|
859
|
+
setSelectedRowKeys = _useState32[1];
|
|
860
|
+
var _useState33 = useState([]),
|
|
861
|
+
_useState34 = _slicedToArray(_useState33, 2),
|
|
862
|
+
selectedRows = _useState34[0],
|
|
863
|
+
setSelectedRows = _useState34[1];
|
|
864
|
+
var onSelectChange = function onSelectChange(newSelectedRowKeys, newSelectedRows) {
|
|
865
|
+
setSelectedRowKeys(newSelectedRowKeys);
|
|
866
|
+
setSelectedRows(newSelectedRows);
|
|
867
|
+
};
|
|
868
|
+
var rowSelection = {
|
|
869
|
+
selectedRowKeys: selectedRowKeys,
|
|
870
|
+
onChange: onSelectChange,
|
|
871
|
+
getCheckboxProps: function getCheckboxProps(row) {
|
|
872
|
+
return {
|
|
873
|
+
disabled: defaultSelectedGoodsIds.includes(row.goodsId)
|
|
874
|
+
};
|
|
875
|
+
}
|
|
876
|
+
};
|
|
877
|
+
// 单选
|
|
878
|
+
var handleChoose = function handleChoose(record) {
|
|
879
|
+
onSelectOk([record.goodsId], [record]);
|
|
880
|
+
};
|
|
881
|
+
var handleBatchChoose = function handleBatchChoose() {
|
|
882
|
+
onSelectOk(selectedRowKeys, selectedRows);
|
|
883
|
+
};
|
|
884
|
+
// 选择 end
|
|
885
|
+
// 营销云
|
|
886
|
+
var columns1 = [{
|
|
887
|
+
title: '集采市场价',
|
|
888
|
+
dataIndex: 'marketPriceMin',
|
|
889
|
+
key: 'marketPriceMin',
|
|
890
|
+
align: 'center',
|
|
891
|
+
width: 120,
|
|
892
|
+
render: function render(text, record) {
|
|
893
|
+
var _record$purchaseInfo, _record$purchaseInfo2, _record$purchaseInfo4, _record$purchaseInfo5;
|
|
894
|
+
if (record.isPurchase === 0) return '-';
|
|
895
|
+
if ((record === null || record === void 0 ? void 0 : (_record$purchaseInfo = record.purchaseInfo) === null || _record$purchaseInfo === void 0 ? void 0 : _record$purchaseInfo.marketPriceMin) === (record === null || record === void 0 ? void 0 : (_record$purchaseInfo2 = record.purchaseInfo) === null || _record$purchaseInfo2 === void 0 ? void 0 : _record$purchaseInfo2.marketPriceMax)) {
|
|
896
|
+
var _record$purchaseInfo3;
|
|
897
|
+
return /*#__PURE__*/React.createElement("div", null, "\uFFE5", showMoney(record === null || record === void 0 ? void 0 : (_record$purchaseInfo3 = record.purchaseInfo) === null || _record$purchaseInfo3 === void 0 ? void 0 : _record$purchaseInfo3.marketPriceMin));
|
|
898
|
+
}
|
|
899
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\uFFE5", showMoney(record === null || record === void 0 ? void 0 : (_record$purchaseInfo4 = record.purchaseInfo) === null || _record$purchaseInfo4 === void 0 ? void 0 : _record$purchaseInfo4.marketPriceMin)), /*#__PURE__*/React.createElement("div", null, "~"), /*#__PURE__*/React.createElement("div", null, "\uFFE5", showMoney(record === null || record === void 0 ? void 0 : (_record$purchaseInfo5 = record.purchaseInfo) === null || _record$purchaseInfo5 === void 0 ? void 0 : _record$purchaseInfo5.marketPriceMax)));
|
|
900
|
+
}
|
|
901
|
+
}, {
|
|
902
|
+
title: '代发市场价',
|
|
903
|
+
dataIndex: 'marketPriceMin',
|
|
904
|
+
key: 'marketPriceMin',
|
|
905
|
+
align: 'center',
|
|
906
|
+
width: 120,
|
|
907
|
+
render: function render(text, record) {
|
|
908
|
+
var _record$onceInfo, _record$onceInfo2, _record$onceInfo4, _record$onceInfo5;
|
|
909
|
+
if (record.isOnce === 0) return '-';
|
|
910
|
+
if ((record === null || record === void 0 ? void 0 : (_record$onceInfo = record.onceInfo) === null || _record$onceInfo === void 0 ? void 0 : _record$onceInfo.marketPriceMin) === (record === null || record === void 0 ? void 0 : (_record$onceInfo2 = record.onceInfo) === null || _record$onceInfo2 === void 0 ? void 0 : _record$onceInfo2.marketPriceMax)) {
|
|
911
|
+
var _record$onceInfo3;
|
|
912
|
+
return /*#__PURE__*/React.createElement("div", null, "\uFFE5", showMoney(record === null || record === void 0 ? void 0 : (_record$onceInfo3 = record.onceInfo) === null || _record$onceInfo3 === void 0 ? void 0 : _record$onceInfo3.marketPriceMin));
|
|
913
|
+
}
|
|
914
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\uFFE5", showMoney(record === null || record === void 0 ? void 0 : (_record$onceInfo4 = record.onceInfo) === null || _record$onceInfo4 === void 0 ? void 0 : _record$onceInfo4.marketPriceMin)), /*#__PURE__*/React.createElement("div", null, "~"), /*#__PURE__*/React.createElement("div", null, "\uFFE5", showMoney(record === null || record === void 0 ? void 0 : (_record$onceInfo5 = record.onceInfo) === null || _record$onceInfo5 === void 0 ? void 0 : _record$onceInfo5.marketPriceMax)));
|
|
915
|
+
}
|
|
916
|
+
}, {
|
|
917
|
+
title: '集采价',
|
|
918
|
+
dataIndex: 'salePriceMin',
|
|
919
|
+
key: 'salePriceMin',
|
|
920
|
+
align: 'center',
|
|
921
|
+
width: 150,
|
|
922
|
+
render: function render(text, record) {
|
|
923
|
+
if ((record === null || record === void 0 ? void 0 : record.isPurchase) === 1) {
|
|
924
|
+
var _record$purchaseInfo6, _record$purchaseInfo12;
|
|
925
|
+
if ((record === null || record === void 0 ? void 0 : (_record$purchaseInfo6 = record.purchaseInfo) === null || _record$purchaseInfo6 === void 0 ? void 0 : _record$purchaseInfo6.salesType) === 2) {
|
|
926
|
+
var _record$purchaseInfo7, _record$purchaseInfo8, _record$purchaseInfo10, _record$purchaseInfo11;
|
|
927
|
+
if ((record === null || record === void 0 ? void 0 : (_record$purchaseInfo7 = record.purchaseInfo) === null || _record$purchaseInfo7 === void 0 ? void 0 : _record$purchaseInfo7.salePriceMin) === (record === null || record === void 0 ? void 0 : (_record$purchaseInfo8 = record.purchaseInfo) === null || _record$purchaseInfo8 === void 0 ? void 0 : _record$purchaseInfo8.salePriceMax)) {
|
|
928
|
+
var _record$purchaseInfo9;
|
|
929
|
+
return /*#__PURE__*/React.createElement("div", null, "\uFFE5", showMoney(record === null || record === void 0 ? void 0 : (_record$purchaseInfo9 = record.purchaseInfo) === null || _record$purchaseInfo9 === void 0 ? void 0 : _record$purchaseInfo9.salePriceMin));
|
|
930
|
+
}
|
|
931
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\uFFE5", showMoney(record === null || record === void 0 ? void 0 : (_record$purchaseInfo10 = record.purchaseInfo) === null || _record$purchaseInfo10 === void 0 ? void 0 : _record$purchaseInfo10.salePriceMin)), /*#__PURE__*/React.createElement("div", null, "~"), /*#__PURE__*/React.createElement("div", null, "\uFFE5", showMoney(record === null || record === void 0 ? void 0 : (_record$purchaseInfo11 = record.purchaseInfo) === null || _record$purchaseInfo11 === void 0 ? void 0 : _record$purchaseInfo11.salePriceMax)));
|
|
932
|
+
}
|
|
933
|
+
if ((record === null || record === void 0 ? void 0 : (_record$purchaseInfo12 = record.purchaseInfo) === null || _record$purchaseInfo12 === void 0 ? void 0 : _record$purchaseInfo12.salesType) === 1) {
|
|
934
|
+
var _record$purchaseInfo13;
|
|
935
|
+
return record === null || record === void 0 ? void 0 : (_record$purchaseInfo13 = record.purchaseInfo) === null || _record$purchaseInfo13 === void 0 ? void 0 : _record$purchaseInfo13.stairList.map(function (item, index) {
|
|
936
|
+
var _record$purchaseInfo14, _record$purchaseInfo15;
|
|
937
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
938
|
+
key: index
|
|
939
|
+
}, "\xA5".concat(showMoney(item.salePrice), "\uFF08").concat(index === (record === null || record === void 0 ? void 0 : (_record$purchaseInfo14 = record.purchaseInfo) === null || _record$purchaseInfo14 === void 0 ? void 0 : (_record$purchaseInfo15 = _record$purchaseInfo14.stairList) === null || _record$purchaseInfo15 === void 0 ? void 0 : _record$purchaseInfo15.length) - 1 ? "\u2265".concat(item === null || item === void 0 ? void 0 : item.minNum) : "".concat(item.minNum, "-").concat(item.maxNum), ")"));
|
|
940
|
+
});
|
|
941
|
+
}
|
|
942
|
+
return '-';
|
|
943
|
+
}
|
|
944
|
+
return '-';
|
|
945
|
+
}
|
|
946
|
+
}, {
|
|
947
|
+
title: '代发价',
|
|
948
|
+
dataIndex: 'supplyPriceMin',
|
|
949
|
+
key: 'supplyPriceMin',
|
|
950
|
+
align: 'center',
|
|
951
|
+
width: 120,
|
|
952
|
+
render: function render(text, record) {
|
|
953
|
+
if ((record === null || record === void 0 ? void 0 : record.isOnce) === 1) {
|
|
954
|
+
var _record$onceInfo6, _record$onceInfo7, _record$onceInfo9, _record$onceInfo10;
|
|
955
|
+
if ((record === null || record === void 0 ? void 0 : (_record$onceInfo6 = record.onceInfo) === null || _record$onceInfo6 === void 0 ? void 0 : _record$onceInfo6.salePriceMin) === (record === null || record === void 0 ? void 0 : (_record$onceInfo7 = record.onceInfo) === null || _record$onceInfo7 === void 0 ? void 0 : _record$onceInfo7.salePriceMax)) {
|
|
956
|
+
var _record$onceInfo8;
|
|
957
|
+
return /*#__PURE__*/React.createElement("div", null, "\uFFE5", showMoney(record === null || record === void 0 ? void 0 : (_record$onceInfo8 = record.onceInfo) === null || _record$onceInfo8 === void 0 ? void 0 : _record$onceInfo8.salePriceMin));
|
|
958
|
+
}
|
|
959
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\uFFE5", showMoney(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, "~"), /*#__PURE__*/React.createElement("div", null, "\uFFE5", showMoney(record === null || record === void 0 ? void 0 : (_record$onceInfo10 = record.onceInfo) === null || _record$onceInfo10 === void 0 ? void 0 : _record$onceInfo10.salePriceMax)));
|
|
960
|
+
}
|
|
961
|
+
return '-';
|
|
962
|
+
}
|
|
963
|
+
}, {
|
|
964
|
+
title: '集采销售价',
|
|
965
|
+
dataIndex: 'sitePriceMaxPurchase',
|
|
966
|
+
key: 'sitePriceMaxPurchase',
|
|
967
|
+
align: 'center',
|
|
968
|
+
width: 120,
|
|
969
|
+
render: function render(text, record) {
|
|
970
|
+
var _record$purchaseInfo16, _record$purchaseInfo17, _record$purchaseInfo19, _record$purchaseInfo20;
|
|
971
|
+
if (record.isPurchase === 0) return '-';
|
|
972
|
+
if ((record === null || record === void 0 ? void 0 : (_record$purchaseInfo16 = record.purchaseInfo) === null || _record$purchaseInfo16 === void 0 ? void 0 : _record$purchaseInfo16.sitePriceMin) === (record === null || record === void 0 ? void 0 : (_record$purchaseInfo17 = record.purchaseInfo) === null || _record$purchaseInfo17 === void 0 ? void 0 : _record$purchaseInfo17.sitePriceMax)) {
|
|
973
|
+
var _record$purchaseInfo18;
|
|
974
|
+
return /*#__PURE__*/React.createElement("div", null, "\uFFE5", showMoney(record === null || record === void 0 ? void 0 : (_record$purchaseInfo18 = record.purchaseInfo) === null || _record$purchaseInfo18 === void 0 ? void 0 : _record$purchaseInfo18.sitePriceMax));
|
|
975
|
+
}
|
|
976
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\uFFE5", showMoney(record === null || record === void 0 ? void 0 : (_record$purchaseInfo19 = record.purchaseInfo) === null || _record$purchaseInfo19 === void 0 ? void 0 : _record$purchaseInfo19.sitePriceMin)), /*#__PURE__*/React.createElement("div", null, "~"), /*#__PURE__*/React.createElement("div", null, "\uFFE5", showMoney(record === null || record === void 0 ? void 0 : (_record$purchaseInfo20 = record.purchaseInfo) === null || _record$purchaseInfo20 === void 0 ? void 0 : _record$purchaseInfo20.sitePriceMax)));
|
|
977
|
+
}
|
|
978
|
+
}, {
|
|
979
|
+
title: '代发销售价',
|
|
980
|
+
dataIndex: 'sitePriceMaxOnce',
|
|
981
|
+
key: 'sitePriceMaxOnce',
|
|
982
|
+
align: 'center',
|
|
983
|
+
width: 120,
|
|
984
|
+
render: function render(text, record) {
|
|
985
|
+
var _record$onceInfo11, _record$onceInfo12, _record$onceInfo14, _record$onceInfo15;
|
|
986
|
+
if (record.isOnce === 0) return '-';
|
|
987
|
+
if ((record === null || record === void 0 ? void 0 : (_record$onceInfo11 = record.onceInfo) === null || _record$onceInfo11 === void 0 ? void 0 : _record$onceInfo11.sitePriceMin) === (record === null || record === void 0 ? void 0 : (_record$onceInfo12 = record.onceInfo) === null || _record$onceInfo12 === void 0 ? void 0 : _record$onceInfo12.sitePriceMax)) {
|
|
988
|
+
var _record$onceInfo13;
|
|
989
|
+
return /*#__PURE__*/React.createElement("div", null, "\uFFE5", showMoney(record === null || record === void 0 ? void 0 : (_record$onceInfo13 = record.onceInfo) === null || _record$onceInfo13 === void 0 ? void 0 : _record$onceInfo13.sitePriceMax));
|
|
990
|
+
}
|
|
991
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\uFFE5", showMoney(record === null || record === void 0 ? void 0 : (_record$onceInfo14 = record.onceInfo) === null || _record$onceInfo14 === void 0 ? void 0 : _record$onceInfo14.sitePriceMin)), /*#__PURE__*/React.createElement("div", null, "~"), /*#__PURE__*/React.createElement("div", null, "\uFFE5", showMoney(record === null || record === void 0 ? void 0 : (_record$onceInfo15 = record.onceInfo) === null || _record$onceInfo15 === void 0 ? void 0 : _record$onceInfo15.sitePriceMax)));
|
|
992
|
+
}
|
|
993
|
+
}, {
|
|
994
|
+
title: function title() {
|
|
995
|
+
return /*#__PURE__*/React.createElement(_Tooltip, {
|
|
996
|
+
title: '集采利润率=(集采销售价-集采价)/集采销售价*100%'
|
|
997
|
+
}, /*#__PURE__*/React.createElement("div", null, "\u96C6\u91C7\u5229\u6DA6\u7387", /*#__PURE__*/React.createElement(QuestionCircleOutlined, {
|
|
998
|
+
className: "ml-3"
|
|
999
|
+
})));
|
|
1000
|
+
},
|
|
1001
|
+
dataIndex: 'purchaseSiteProfitMax',
|
|
1002
|
+
key: 'purchaseSiteProfitMax',
|
|
1003
|
+
align: 'center',
|
|
1004
|
+
width: 150,
|
|
1005
|
+
render: function render(text, record) {
|
|
1006
|
+
if ((record === null || record === void 0 ? void 0 : record.isPurchase) === 1) {
|
|
1007
|
+
var _record$purchaseInfo21, _record$purchaseInfo22, _record$purchaseInfo24, _record$purchaseInfo25;
|
|
1008
|
+
if ((record === null || record === void 0 ? void 0 : (_record$purchaseInfo21 = record.purchaseInfo) === null || _record$purchaseInfo21 === void 0 ? void 0 : _record$purchaseInfo21.siteProfitMin) === (record === null || record === void 0 ? void 0 : (_record$purchaseInfo22 = record.purchaseInfo) === null || _record$purchaseInfo22 === void 0 ? void 0 : _record$purchaseInfo22.siteProfitMax)) {
|
|
1009
|
+
var _record$purchaseInfo23;
|
|
1010
|
+
return /*#__PURE__*/React.createElement("div", null, record === null || record === void 0 ? void 0 : (_record$purchaseInfo23 = record.purchaseInfo) === null || _record$purchaseInfo23 === void 0 ? void 0 : _record$purchaseInfo23.siteProfitMin, "%");
|
|
1011
|
+
}
|
|
1012
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, record === null || record === void 0 ? void 0 : (_record$purchaseInfo24 = record.purchaseInfo) === null || _record$purchaseInfo24 === void 0 ? void 0 : _record$purchaseInfo24.siteProfitMin, "%"), /*#__PURE__*/React.createElement("div", null, "~"), /*#__PURE__*/React.createElement("div", null, record === null || record === void 0 ? void 0 : (_record$purchaseInfo25 = record.purchaseInfo) === null || _record$purchaseInfo25 === void 0 ? void 0 : _record$purchaseInfo25.siteProfitMax, "%"));
|
|
1013
|
+
}
|
|
1014
|
+
return '-';
|
|
1015
|
+
}
|
|
1016
|
+
}, {
|
|
1017
|
+
title: function title() {
|
|
1018
|
+
return /*#__PURE__*/React.createElement(_Tooltip, {
|
|
1019
|
+
title: '代发利润率=(代发销售价-代发价)/代发销售价*100%'
|
|
1020
|
+
}, /*#__PURE__*/React.createElement("div", null, "\u4EE3\u53D1\u5229\u6DA6\u7387", /*#__PURE__*/React.createElement(QuestionCircleOutlined, {
|
|
1021
|
+
className: "ml-3"
|
|
1022
|
+
})));
|
|
1023
|
+
},
|
|
1024
|
+
dataIndex: 'purchaseSiteProfitMax',
|
|
1025
|
+
key: 'purchaseSiteProfitMax',
|
|
1026
|
+
align: 'center',
|
|
1027
|
+
width: 150,
|
|
1028
|
+
render: function render(text, record) {
|
|
1029
|
+
if ((record === null || record === void 0 ? void 0 : record.isOnce) === 1) {
|
|
1030
|
+
var _record$onceInfo16, _record$onceInfo17, _record$onceInfo19, _record$onceInfo20;
|
|
1031
|
+
if ((record === null || record === void 0 ? void 0 : (_record$onceInfo16 = record.onceInfo) === null || _record$onceInfo16 === void 0 ? void 0 : _record$onceInfo16.siteProfitMin) === (record === null || record === void 0 ? void 0 : (_record$onceInfo17 = record.onceInfo) === null || _record$onceInfo17 === void 0 ? void 0 : _record$onceInfo17.siteProfitMax)) {
|
|
1032
|
+
var _record$onceInfo18;
|
|
1033
|
+
return /*#__PURE__*/React.createElement("div", null, record === null || record === void 0 ? void 0 : (_record$onceInfo18 = record.onceInfo) === null || _record$onceInfo18 === void 0 ? void 0 : _record$onceInfo18.siteProfitMin, "%");
|
|
1034
|
+
}
|
|
1035
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, record === null || record === void 0 ? void 0 : (_record$onceInfo19 = record.onceInfo) === null || _record$onceInfo19 === void 0 ? void 0 : _record$onceInfo19.siteProfitMin, "%"), /*#__PURE__*/React.createElement("div", null, "~"), /*#__PURE__*/React.createElement("div", null, record === null || record === void 0 ? void 0 : (_record$onceInfo20 = record.onceInfo) === null || _record$onceInfo20 === void 0 ? void 0 : _record$onceInfo20.siteProfitMax, "%"));
|
|
1036
|
+
}
|
|
1037
|
+
return null;
|
|
1038
|
+
}
|
|
1039
|
+
}];
|
|
1040
|
+
// 非营销云
|
|
1041
|
+
var columns2 = [{
|
|
1042
|
+
title: '市场价',
|
|
1043
|
+
dataIndex: 'marketPriceMax',
|
|
1044
|
+
key: 'marketPriceMax',
|
|
1045
|
+
align: 'center',
|
|
1046
|
+
width: 98,
|
|
1047
|
+
render: function render(text, record) {
|
|
1048
|
+
var _record$onceInfo21, _record$onceInfo22, _record$onceInfo24, _record$onceInfo25;
|
|
1049
|
+
if ((record === null || record === void 0 ? void 0 : (_record$onceInfo21 = record.onceInfo) === null || _record$onceInfo21 === void 0 ? void 0 : _record$onceInfo21.marketPriceMin) === (record === null || record === void 0 ? void 0 : (_record$onceInfo22 = record.onceInfo) === null || _record$onceInfo22 === void 0 ? void 0 : _record$onceInfo22.marketPriceMax)) {
|
|
1050
|
+
var _record$onceInfo23;
|
|
1051
|
+
return /*#__PURE__*/React.createElement("div", null, "\uFFE5", showMoney(record === null || record === void 0 ? void 0 : (_record$onceInfo23 = record.onceInfo) === null || _record$onceInfo23 === void 0 ? void 0 : _record$onceInfo23.marketPriceMax));
|
|
1052
|
+
}
|
|
1053
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\uFFE5", showMoney(record === null || record === void 0 ? void 0 : (_record$onceInfo24 = record.onceInfo) === null || _record$onceInfo24 === void 0 ? void 0 : _record$onceInfo24.marketPriceMin)), /*#__PURE__*/React.createElement("div", null, "~"), /*#__PURE__*/React.createElement("div", null, "\uFFE5", showMoney(record === null || record === void 0 ? void 0 : (_record$onceInfo25 = record.onceInfo) === null || _record$onceInfo25 === void 0 ? void 0 : _record$onceInfo25.marketPriceMax)));
|
|
1054
|
+
}
|
|
1055
|
+
}, {
|
|
1056
|
+
title: '会员价',
|
|
1057
|
+
dataIndex: 'salePriceMax',
|
|
1058
|
+
key: 'salePriceMax',
|
|
1059
|
+
align: 'center',
|
|
1060
|
+
width: 86,
|
|
1061
|
+
render: function render(text, record) {
|
|
1062
|
+
var _record$onceInfo26, _record$onceInfo27, _record$onceInfo29, _record$onceInfo30;
|
|
1063
|
+
if ((record === null || record === void 0 ? void 0 : (_record$onceInfo26 = record.onceInfo) === null || _record$onceInfo26 === void 0 ? void 0 : _record$onceInfo26.salePriceMin) === (record === null || record === void 0 ? void 0 : (_record$onceInfo27 = record.onceInfo) === null || _record$onceInfo27 === void 0 ? void 0 : _record$onceInfo27.salePriceMax)) {
|
|
1064
|
+
var _record$onceInfo28;
|
|
1065
|
+
return /*#__PURE__*/React.createElement("div", null, "\uFFE5", showMoney(record === null || record === void 0 ? void 0 : (_record$onceInfo28 = record.onceInfo) === null || _record$onceInfo28 === void 0 ? void 0 : _record$onceInfo28.salePriceMax));
|
|
1066
|
+
}
|
|
1067
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\uFFE5", showMoney(record === null || record === void 0 ? void 0 : (_record$onceInfo29 = record.onceInfo) === null || _record$onceInfo29 === void 0 ? void 0 : _record$onceInfo29.salePriceMin)), /*#__PURE__*/React.createElement("div", null, "~"), /*#__PURE__*/React.createElement("div", null, "\uFFE5", showMoney(record === null || record === void 0 ? void 0 : (_record$onceInfo30 = record.onceInfo) === null || _record$onceInfo30 === void 0 ? void 0 : _record$onceInfo30.salePriceMax)));
|
|
1068
|
+
}
|
|
1069
|
+
}, {
|
|
1070
|
+
title: '销售价',
|
|
1071
|
+
dataIndex: 'sitePriceMax',
|
|
1072
|
+
key: 'sitePriceMax',
|
|
1073
|
+
align: 'center',
|
|
1074
|
+
width: 86,
|
|
1075
|
+
render: function render(text, record) {
|
|
1076
|
+
var _record$onceInfo31, _record$onceInfo32, _record$onceInfo34, _record$onceInfo35;
|
|
1077
|
+
if ((record === null || record === void 0 ? void 0 : (_record$onceInfo31 = record.onceInfo) === null || _record$onceInfo31 === void 0 ? void 0 : _record$onceInfo31.sitePriceMin) === (record === null || record === void 0 ? void 0 : (_record$onceInfo32 = record.onceInfo) === null || _record$onceInfo32 === void 0 ? void 0 : _record$onceInfo32.sitePriceMax)) {
|
|
1078
|
+
var _record$onceInfo33;
|
|
1079
|
+
return /*#__PURE__*/React.createElement("div", null, "\uFFE5", showMoney(record === null || record === void 0 ? void 0 : (_record$onceInfo33 = record.onceInfo) === null || _record$onceInfo33 === void 0 ? void 0 : _record$onceInfo33.sitePriceMin));
|
|
1080
|
+
}
|
|
1081
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\uFFE5", showMoney(record === null || record === void 0 ? void 0 : (_record$onceInfo34 = record.onceInfo) === null || _record$onceInfo34 === void 0 ? void 0 : _record$onceInfo34.sitePriceMin)), /*#__PURE__*/React.createElement("div", null, "~"), /*#__PURE__*/React.createElement("div", null, "\uFFE5", showMoney(record === null || record === void 0 ? void 0 : (_record$onceInfo35 = record.onceInfo) === null || _record$onceInfo35 === void 0 ? void 0 : _record$onceInfo35.sitePriceMax)));
|
|
1082
|
+
}
|
|
1083
|
+
}, {
|
|
1084
|
+
title: function title() {
|
|
1085
|
+
return /*#__PURE__*/React.createElement(_Tooltip, {
|
|
1086
|
+
title: "\u5229\u6DA6\u7387=(\u9500\u552E\u4EF7-\u4F1A\u5458\u4EF7\uFF09/\u9500\u552E\u4EF7*100%"
|
|
1087
|
+
}, /*#__PURE__*/React.createElement("div", null, "\u5229\u6DA6\u7387", /*#__PURE__*/React.createElement(QuestionCircleOutlined, {
|
|
1088
|
+
className: "ml-3"
|
|
1089
|
+
})));
|
|
1090
|
+
},
|
|
1091
|
+
dataIndex: 'siteProfitMin',
|
|
1092
|
+
key: 'siteProfitMin',
|
|
1093
|
+
align: 'center',
|
|
1094
|
+
width: 100,
|
|
1095
|
+
render: function render(text, record) {
|
|
1096
|
+
var _record$onceInfo36, _record$onceInfo37, _record$onceInfo39, _record$onceInfo40;
|
|
1097
|
+
if ((record === null || record === void 0 ? void 0 : (_record$onceInfo36 = record.onceInfo) === null || _record$onceInfo36 === void 0 ? void 0 : _record$onceInfo36.siteProfitMin) === (record === null || record === void 0 ? void 0 : (_record$onceInfo37 = record.onceInfo) === null || _record$onceInfo37 === void 0 ? void 0 : _record$onceInfo37.siteProfitMax)) {
|
|
1098
|
+
var _record$onceInfo38;
|
|
1099
|
+
return /*#__PURE__*/React.createElement("div", null, record === null || record === void 0 ? void 0 : (_record$onceInfo38 = record.onceInfo) === null || _record$onceInfo38 === void 0 ? void 0 : _record$onceInfo38.siteProfitMax, "%");
|
|
1100
|
+
}
|
|
1101
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, record === null || record === void 0 ? void 0 : (_record$onceInfo39 = record.onceInfo) === null || _record$onceInfo39 === void 0 ? void 0 : _record$onceInfo39.siteProfitMin, "%"), /*#__PURE__*/React.createElement("div", null, "~"), /*#__PURE__*/React.createElement("div", null, record === null || record === void 0 ? void 0 : (_record$onceInfo40 = record.onceInfo) === null || _record$onceInfo40 === void 0 ? void 0 : _record$onceInfo40.siteProfitMax, "%"));
|
|
1102
|
+
}
|
|
1103
|
+
}];
|
|
1104
|
+
// 蛋糕叔叔
|
|
1105
|
+
var dgssColumns = [{
|
|
1106
|
+
title: '可售卖城市',
|
|
1107
|
+
dataIndex: 'saleableCity',
|
|
1108
|
+
key: 'saleableCity',
|
|
1109
|
+
align: 'center',
|
|
1110
|
+
width: 230,
|
|
1111
|
+
render: function render(v) {
|
|
1112
|
+
return /*#__PURE__*/React.createElement(_Tooltip, {
|
|
1113
|
+
title: v
|
|
1114
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1115
|
+
className: "table-cityNameList"
|
|
1116
|
+
}, v === null || v === void 0 ? void 0 : v.slice(0, 50)));
|
|
1117
|
+
}
|
|
1118
|
+
}];
|
|
1119
|
+
var columns = function columns() {
|
|
1120
|
+
var list = app === 1 ? columns1 : columns2;
|
|
1121
|
+
var list2 = searchParams.tab === 'xhdg' ? dgssColumns : [];
|
|
1122
|
+
return [{
|
|
1123
|
+
title: '商品',
|
|
1124
|
+
dataIndex: 'goodsId',
|
|
1125
|
+
key: 'goodsId',
|
|
1126
|
+
align: 'center',
|
|
1127
|
+
width: 230,
|
|
1128
|
+
fixed: 'left',
|
|
1129
|
+
render: function render(text, record) {
|
|
1130
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1131
|
+
className: 'table-goods-wrap'
|
|
1132
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1133
|
+
className: 'table-goods-img-wrap'
|
|
1134
|
+
}, /*#__PURE__*/React.createElement(ProImage, {
|
|
1135
|
+
preview: true,
|
|
1136
|
+
src: record.mainImage,
|
|
1137
|
+
className: "pro-image",
|
|
1138
|
+
needOssProcess: false
|
|
1139
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
1140
|
+
className: 'table-goods-content'
|
|
1141
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1142
|
+
className: 'table-goods-content-title'
|
|
1143
|
+
}, record.name), /*#__PURE__*/React.createElement("div", {
|
|
1144
|
+
title: record.goodsId,
|
|
1145
|
+
className: 'table-goods-content-sub-title'
|
|
1146
|
+
}, "\u5546\u54C1ID\uFF1A", record.goodsId)));
|
|
1147
|
+
}
|
|
1148
|
+
}, {
|
|
1149
|
+
title: '商品品牌',
|
|
1150
|
+
dataIndex: 'brandName',
|
|
1151
|
+
key: 'brandName',
|
|
1152
|
+
align: 'center',
|
|
1153
|
+
width: 140
|
|
1154
|
+
}, {
|
|
1155
|
+
title: '商品类目',
|
|
1156
|
+
dataIndex: 'categoryId',
|
|
1157
|
+
key: 'categoryId',
|
|
1158
|
+
align: 'center',
|
|
1159
|
+
width: 170,
|
|
1160
|
+
render: function render(text, record) {
|
|
1161
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, record.isEntity ? '实物商品' : '虚拟商品'), /*#__PURE__*/React.createElement("div", null, record.categoryTreeName));
|
|
1162
|
+
}
|
|
1163
|
+
}].concat(list, [{
|
|
1164
|
+
title: '库存',
|
|
1165
|
+
dataIndex: 'stock',
|
|
1166
|
+
key: 'stock',
|
|
1167
|
+
align: 'center',
|
|
1168
|
+
width: 80,
|
|
1169
|
+
render: function render(text, record) {
|
|
1170
|
+
if (record.thirdType === 10) {
|
|
1171
|
+
return /*#__PURE__*/React.createElement(_Spin, {
|
|
1172
|
+
spinning: getJdStockLoading,
|
|
1173
|
+
indicator: /*#__PURE__*/React.createElement(LoadingOutlined, null)
|
|
1174
|
+
}, /*#__PURE__*/React.createElement("span", null, record.stockText));
|
|
1175
|
+
} else {
|
|
1176
|
+
return text;
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
}], list2, [{
|
|
1180
|
+
title: '操作',
|
|
1181
|
+
dataIndex: 'action',
|
|
1182
|
+
key: 'action',
|
|
1183
|
+
align: 'center',
|
|
1184
|
+
fixed: 'right',
|
|
1185
|
+
width: 100,
|
|
1186
|
+
render: function render(text, record) {
|
|
1187
|
+
if (defaultSelectedGoodsIds.includes(record.goodsId)) {
|
|
1188
|
+
return /*#__PURE__*/React.createElement(_Button, {
|
|
1189
|
+
disabled: true,
|
|
1190
|
+
type: "link"
|
|
1191
|
+
}, "\u5DF2\u6311\u9009");
|
|
1192
|
+
}
|
|
1193
|
+
return /*#__PURE__*/React.createElement(_Button, {
|
|
1194
|
+
onClick: function onClick() {
|
|
1195
|
+
handleChoose(record);
|
|
1196
|
+
},
|
|
1197
|
+
type: "link"
|
|
1198
|
+
}, "\u6311\u9009");
|
|
1199
|
+
}
|
|
1200
|
+
}]);
|
|
1201
|
+
};
|
|
1202
|
+
return /*#__PURE__*/React.createElement(_Modal, _extends({
|
|
1203
|
+
title: "\u6311\u9009\u7AD9\u70B9\u5546\u54C1",
|
|
1204
|
+
open: true,
|
|
1205
|
+
footer: null,
|
|
1206
|
+
width: 1366,
|
|
1207
|
+
onCancel: onClose,
|
|
1208
|
+
className: "choose-site-goods-modal",
|
|
1209
|
+
centered: true
|
|
1210
|
+
}, otherProps), renderTabs(), renderMainSearch(), renderSearch2(), /*#__PURE__*/React.createElement(_Table, {
|
|
1211
|
+
dataSource: goodsList,
|
|
1212
|
+
columns: columns(),
|
|
1213
|
+
size: "small",
|
|
1214
|
+
bordered: true,
|
|
1215
|
+
pagination: {
|
|
1216
|
+
current: pageNo,
|
|
1217
|
+
position: ['bottomRight'],
|
|
1218
|
+
total: total,
|
|
1219
|
+
showQuickJumper: true,
|
|
1220
|
+
showSizeChanger: true,
|
|
1221
|
+
defaultPageSize: pageSize || 10,
|
|
1222
|
+
onChange: function onChange(page, size) {
|
|
1223
|
+
onPageChange(page, size, 'page');
|
|
1224
|
+
},
|
|
1225
|
+
onShowSizeChange: function onShowSizeChange(page, size) {
|
|
1226
|
+
onPageChange(page, size, 'size');
|
|
1227
|
+
},
|
|
1228
|
+
showTotal: function showTotal(total) {
|
|
1229
|
+
return "\u5171 ".concat(total, " \u6761\u6570\u636E");
|
|
1230
|
+
}
|
|
1231
|
+
},
|
|
1232
|
+
rowKey: "goodsId",
|
|
1233
|
+
loading: loading,
|
|
1234
|
+
style: {
|
|
1235
|
+
marginTop: '20px'
|
|
1236
|
+
},
|
|
1237
|
+
scroll: {
|
|
1238
|
+
x: 1500,
|
|
1239
|
+
y: 500
|
|
1240
|
+
},
|
|
1241
|
+
rowSelection: multiple ? rowSelection : undefined
|
|
1242
|
+
}), showMoreModal && /*#__PURE__*/React.createElement(ChooseMallGoods, {
|
|
1243
|
+
env: env,
|
|
1244
|
+
token: token,
|
|
1245
|
+
app: app,
|
|
1246
|
+
siteId: siteId,
|
|
1247
|
+
onClose: function onClose() {
|
|
1248
|
+
setShowMoreModal(false);
|
|
1249
|
+
},
|
|
1250
|
+
loginErrFn: loginErrFn
|
|
1251
|
+
// onSelectOk={handleSelectOk}
|
|
1252
|
+
,
|
|
1253
|
+
multiple: true,
|
|
1254
|
+
isChangePrice: true,
|
|
1255
|
+
onChangePriceOk: function onChangePriceOk() {
|
|
1256
|
+
_message.success('商品挑到站点成功');
|
|
1257
|
+
setShowMoreModal(false);
|
|
1258
|
+
},
|
|
1259
|
+
title: "\u6311\u9009\u5546\u54C1\u5230\u7AD9\u70B9",
|
|
1260
|
+
tabsConfig: tabsConfig
|
|
1261
|
+
}));
|
|
1262
|
+
};
|
|
1263
|
+
export default ChooseSiteGoods;
|