@kmkf-fe-packages/basic-components 1.19.2 → 1.19.4-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -3,384 +3,370 @@ import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, messag
3
3
  import { EyeOutlined, DeleteOutlined, CloseCircleOutlined, CaretUpOutlined } from '@ant-design/icons';
4
4
  import request, { extend as extend$1 } from 'umi-request';
5
5
  import { CopyToClipboard } from 'react-copy-to-clipboard';
6
- import { AddressData, BsAddressData, WdtAddressData, request as request$1, ExpressData, uuid, LogisticsAddressData, WdtSendData, WDT_ORDER_TYPE_MAP } from '@kmkf-fe-packages/kmkf-utils';
7
- import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, takeRight } from 'lodash';
6
+ import { AddressData, BsAddressData, WdtAddressData, request as request$1, ExpressData, uuid, LogisticsAddressData, WdtSendData, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, BS_E3_ORDER_STATUS_MAP, BS_E3_BOOLEAN_STATUS_MAP, updateWdtGoodsHandle, updateBsE3GoodsHandle } from '@kmkf-fe-packages/kmkf-utils';
7
+ import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, takeRight, reject } from 'lodash';
8
8
  import { useUpdateEffect, useDebounceEffect, useAntdTable } from 'ahooks';
9
9
  import zhCN from 'antd/lib/locale/zh_CN';
10
10
  import pubsub from 'pubsub-js';
11
11
  import BigNumber from 'bignumber.js';
12
12
 
13
- function _iterableToArrayLimit(r, l) {
14
- var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
15
- if (null != t) {
16
- var e,
17
- n,
18
- i,
19
- u,
20
- a = [],
21
- f = !0,
22
- o = !1;
13
+ function _iterableToArrayLimit(arr, i) {
14
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
15
+ if (null != _i) {
16
+ var _s,
17
+ _e,
18
+ _x,
19
+ _r,
20
+ _arr = [],
21
+ _n = !0,
22
+ _d = !1;
23
23
  try {
24
- if (i = (t = t.call(r)).next, 0 === l) {
25
- if (Object(t) !== t) return;
26
- f = !1;
27
- } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
28
- } catch (r) {
29
- o = !0, n = r;
24
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
25
+ if (Object(_i) !== _i) return;
26
+ _n = !1;
27
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
28
+ } catch (err) {
29
+ _d = !0, _e = err;
30
30
  } finally {
31
31
  try {
32
- if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
32
+ if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
33
33
  } finally {
34
- if (o) throw n;
34
+ if (_d) throw _e;
35
35
  }
36
36
  }
37
- return a;
37
+ return _arr;
38
38
  }
39
39
  }
40
- function ownKeys(e, r) {
41
- var t = Object.keys(e);
40
+ function ownKeys(object, enumerableOnly) {
41
+ var keys = Object.keys(object);
42
42
  if (Object.getOwnPropertySymbols) {
43
- var o = Object.getOwnPropertySymbols(e);
44
- r && (o = o.filter(function (r) {
45
- return Object.getOwnPropertyDescriptor(e, r).enumerable;
46
- })), t.push.apply(t, o);
43
+ var symbols = Object.getOwnPropertySymbols(object);
44
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
45
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
46
+ })), keys.push.apply(keys, symbols);
47
47
  }
48
- return t;
49
- }
50
- function _objectSpread2(e) {
51
- for (var r = 1; r < arguments.length; r++) {
52
- var t = null != arguments[r] ? arguments[r] : {};
53
- r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
54
- _defineProperty(e, r, t[r]);
55
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
56
- Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
48
+ return keys;
49
+ }
50
+ function _objectSpread2(target) {
51
+ for (var i = 1; i < arguments.length; i++) {
52
+ var source = null != arguments[i] ? arguments[i] : {};
53
+ i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
54
+ _defineProperty(target, key, source[key]);
55
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
56
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
57
57
  });
58
58
  }
59
- return e;
59
+ return target;
60
60
  }
61
61
  function _regeneratorRuntime() {
62
62
  _regeneratorRuntime = function () {
63
- return e;
64
- };
65
- var t,
66
- e = {},
67
- r = Object.prototype,
68
- n = r.hasOwnProperty,
69
- o = Object.defineProperty || function (t, e, r) {
70
- t[e] = r.value;
63
+ return exports;
64
+ };
65
+ var exports = {},
66
+ Op = Object.prototype,
67
+ hasOwn = Op.hasOwnProperty,
68
+ defineProperty = Object.defineProperty || function (obj, key, desc) {
69
+ obj[key] = desc.value;
71
70
  },
72
- i = "function" == typeof Symbol ? Symbol : {},
73
- a = i.iterator || "@@iterator",
74
- c = i.asyncIterator || "@@asyncIterator",
75
- u = i.toStringTag || "@@toStringTag";
76
- function define(t, e, r) {
77
- return Object.defineProperty(t, e, {
78
- value: r,
71
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
72
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
73
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
74
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
75
+ function define(obj, key, value) {
76
+ return Object.defineProperty(obj, key, {
77
+ value: value,
79
78
  enumerable: !0,
80
79
  configurable: !0,
81
80
  writable: !0
82
- }), t[e];
81
+ }), obj[key];
83
82
  }
84
83
  try {
85
84
  define({}, "");
86
- } catch (t) {
87
- define = function (t, e, r) {
88
- return t[e] = r;
85
+ } catch (err) {
86
+ define = function (obj, key, value) {
87
+ return obj[key] = value;
89
88
  };
90
89
  }
91
- function wrap(t, e, r, n) {
92
- var i = e && e.prototype instanceof Generator ? e : Generator,
93
- a = Object.create(i.prototype),
94
- c = new Context(n || []);
95
- return o(a, "_invoke", {
96
- value: makeInvokeMethod(t, r, c)
97
- }), a;
90
+ function wrap(innerFn, outerFn, self, tryLocsList) {
91
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
92
+ generator = Object.create(protoGenerator.prototype),
93
+ context = new Context(tryLocsList || []);
94
+ return defineProperty(generator, "_invoke", {
95
+ value: makeInvokeMethod(innerFn, self, context)
96
+ }), generator;
98
97
  }
99
- function tryCatch(t, e, r) {
98
+ function tryCatch(fn, obj, arg) {
100
99
  try {
101
100
  return {
102
101
  type: "normal",
103
- arg: t.call(e, r)
102
+ arg: fn.call(obj, arg)
104
103
  };
105
- } catch (t) {
104
+ } catch (err) {
106
105
  return {
107
106
  type: "throw",
108
- arg: t
107
+ arg: err
109
108
  };
110
109
  }
111
110
  }
112
- e.wrap = wrap;
113
- var h = "suspendedStart",
114
- l = "suspendedYield",
115
- f = "executing",
116
- s = "completed",
117
- y = {};
111
+ exports.wrap = wrap;
112
+ var ContinueSentinel = {};
118
113
  function Generator() {}
119
114
  function GeneratorFunction() {}
120
115
  function GeneratorFunctionPrototype() {}
121
- var p = {};
122
- define(p, a, function () {
116
+ var IteratorPrototype = {};
117
+ define(IteratorPrototype, iteratorSymbol, function () {
123
118
  return this;
124
119
  });
125
- var d = Object.getPrototypeOf,
126
- v = d && d(d(values([])));
127
- v && v !== r && n.call(v, a) && (p = v);
128
- var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
129
- function defineIteratorMethods(t) {
130
- ["next", "throw", "return"].forEach(function (e) {
131
- define(t, e, function (t) {
132
- return this._invoke(e, t);
120
+ var getProto = Object.getPrototypeOf,
121
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
122
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
123
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
124
+ function defineIteratorMethods(prototype) {
125
+ ["next", "throw", "return"].forEach(function (method) {
126
+ define(prototype, method, function (arg) {
127
+ return this._invoke(method, arg);
133
128
  });
134
129
  });
135
130
  }
136
- function AsyncIterator(t, e) {
137
- function invoke(r, o, i, a) {
138
- var c = tryCatch(t[r], t, o);
139
- if ("throw" !== c.type) {
140
- var u = c.arg,
141
- h = u.value;
142
- return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
143
- invoke("next", t, i, a);
144
- }, function (t) {
145
- invoke("throw", t, i, a);
146
- }) : e.resolve(h).then(function (t) {
147
- u.value = t, i(u);
148
- }, function (t) {
149
- return invoke("throw", t, i, a);
131
+ function AsyncIterator(generator, PromiseImpl) {
132
+ function invoke(method, arg, resolve, reject) {
133
+ var record = tryCatch(generator[method], generator, arg);
134
+ if ("throw" !== record.type) {
135
+ var result = record.arg,
136
+ value = result.value;
137
+ return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
138
+ invoke("next", value, resolve, reject);
139
+ }, function (err) {
140
+ invoke("throw", err, resolve, reject);
141
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
142
+ result.value = unwrapped, resolve(result);
143
+ }, function (error) {
144
+ return invoke("throw", error, resolve, reject);
150
145
  });
151
146
  }
152
- a(c.arg);
147
+ reject(record.arg);
153
148
  }
154
- var r;
155
- o(this, "_invoke", {
156
- value: function (t, n) {
149
+ var previousPromise;
150
+ defineProperty(this, "_invoke", {
151
+ value: function (method, arg) {
157
152
  function callInvokeWithMethodAndArg() {
158
- return new e(function (e, r) {
159
- invoke(t, n, e, r);
153
+ return new PromiseImpl(function (resolve, reject) {
154
+ invoke(method, arg, resolve, reject);
160
155
  });
161
156
  }
162
- return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
157
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
163
158
  }
164
159
  });
165
160
  }
166
- function makeInvokeMethod(e, r, n) {
167
- var o = h;
168
- return function (i, a) {
169
- if (o === f) throw new Error("Generator is already running");
170
- if (o === s) {
171
- if ("throw" === i) throw a;
172
- return {
173
- value: t,
174
- done: !0
175
- };
161
+ function makeInvokeMethod(innerFn, self, context) {
162
+ var state = "suspendedStart";
163
+ return function (method, arg) {
164
+ if ("executing" === state) throw new Error("Generator is already running");
165
+ if ("completed" === state) {
166
+ if ("throw" === method) throw arg;
167
+ return doneResult();
176
168
  }
177
- for (n.method = i, n.arg = a;;) {
178
- var c = n.delegate;
179
- if (c) {
180
- var u = maybeInvokeDelegate(c, n);
181
- if (u) {
182
- if (u === y) continue;
183
- return u;
169
+ for (context.method = method, context.arg = arg;;) {
170
+ var delegate = context.delegate;
171
+ if (delegate) {
172
+ var delegateResult = maybeInvokeDelegate(delegate, context);
173
+ if (delegateResult) {
174
+ if (delegateResult === ContinueSentinel) continue;
175
+ return delegateResult;
184
176
  }
185
177
  }
186
- if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
187
- if (o === h) throw o = s, n.arg;
188
- n.dispatchException(n.arg);
189
- } else "return" === n.method && n.abrupt("return", n.arg);
190
- o = f;
191
- var p = tryCatch(e, r, n);
192
- if ("normal" === p.type) {
193
- if (o = n.done ? s : l, p.arg === y) continue;
178
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
179
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
180
+ context.dispatchException(context.arg);
181
+ } else "return" === context.method && context.abrupt("return", context.arg);
182
+ state = "executing";
183
+ var record = tryCatch(innerFn, self, context);
184
+ if ("normal" === record.type) {
185
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
194
186
  return {
195
- value: p.arg,
196
- done: n.done
187
+ value: record.arg,
188
+ done: context.done
197
189
  };
198
190
  }
199
- "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
191
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
200
192
  }
201
193
  };
202
194
  }
203
- function maybeInvokeDelegate(e, r) {
204
- var n = r.method,
205
- o = e.iterator[n];
206
- 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;
207
- var i = tryCatch(o, e.iterator, r.arg);
208
- if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
209
- var a = i.arg;
210
- 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);
195
+ function maybeInvokeDelegate(delegate, context) {
196
+ var methodName = context.method,
197
+ method = delegate.iterator[methodName];
198
+ if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
199
+ var record = tryCatch(method, delegate.iterator, context.arg);
200
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
201
+ var info = record.arg;
202
+ return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
211
203
  }
212
- function pushTryEntry(t) {
213
- var e = {
214
- tryLoc: t[0]
204
+ function pushTryEntry(locs) {
205
+ var entry = {
206
+ tryLoc: locs[0]
215
207
  };
216
- 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
208
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
217
209
  }
218
- function resetTryEntry(t) {
219
- var e = t.completion || {};
220
- e.type = "normal", delete e.arg, t.completion = e;
210
+ function resetTryEntry(entry) {
211
+ var record = entry.completion || {};
212
+ record.type = "normal", delete record.arg, entry.completion = record;
221
213
  }
222
- function Context(t) {
214
+ function Context(tryLocsList) {
223
215
  this.tryEntries = [{
224
216
  tryLoc: "root"
225
- }], t.forEach(pushTryEntry, this), this.reset(!0);
217
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
226
218
  }
227
- function values(e) {
228
- if (e || "" === e) {
229
- var r = e[a];
230
- if (r) return r.call(e);
231
- if ("function" == typeof e.next) return e;
232
- if (!isNaN(e.length)) {
233
- var o = -1,
234
- i = function next() {
235
- for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
236
- return next.value = t, next.done = !0, next;
219
+ function values(iterable) {
220
+ if (iterable) {
221
+ var iteratorMethod = iterable[iteratorSymbol];
222
+ if (iteratorMethod) return iteratorMethod.call(iterable);
223
+ if ("function" == typeof iterable.next) return iterable;
224
+ if (!isNaN(iterable.length)) {
225
+ var i = -1,
226
+ next = function next() {
227
+ for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
228
+ return next.value = undefined, next.done = !0, next;
237
229
  };
238
- return i.next = i;
230
+ return next.next = next;
239
231
  }
240
232
  }
241
- throw new TypeError(typeof e + " is not iterable");
233
+ return {
234
+ next: doneResult
235
+ };
236
+ }
237
+ function doneResult() {
238
+ return {
239
+ value: undefined,
240
+ done: !0
241
+ };
242
242
  }
243
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
243
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
244
244
  value: GeneratorFunctionPrototype,
245
245
  configurable: !0
246
- }), o(GeneratorFunctionPrototype, "constructor", {
246
+ }), defineProperty(GeneratorFunctionPrototype, "constructor", {
247
247
  value: GeneratorFunction,
248
248
  configurable: !0
249
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
250
- var e = "function" == typeof t && t.constructor;
251
- return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
252
- }, e.mark = function (t) {
253
- return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
254
- }, e.awrap = function (t) {
249
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
250
+ var ctor = "function" == typeof genFun && genFun.constructor;
251
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
252
+ }, exports.mark = function (genFun) {
253
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
254
+ }, exports.awrap = function (arg) {
255
255
  return {
256
- __await: t
256
+ __await: arg
257
257
  };
258
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
258
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
259
259
  return this;
260
- }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
261
- void 0 === i && (i = Promise);
262
- var a = new AsyncIterator(wrap(t, r, n, o), i);
263
- return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
264
- return t.done ? t.value : a.next();
260
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
261
+ void 0 === PromiseImpl && (PromiseImpl = Promise);
262
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
263
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
264
+ return result.done ? result.value : iter.next();
265
265
  });
266
- }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
266
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
267
267
  return this;
268
- }), define(g, "toString", function () {
268
+ }), define(Gp, "toString", function () {
269
269
  return "[object Generator]";
270
- }), e.keys = function (t) {
271
- var e = Object(t),
272
- r = [];
273
- for (var n in e) r.push(n);
274
- return r.reverse(), function next() {
275
- for (; r.length;) {
276
- var t = r.pop();
277
- if (t in e) return next.value = t, next.done = !1, next;
270
+ }), exports.keys = function (val) {
271
+ var object = Object(val),
272
+ keys = [];
273
+ for (var key in object) keys.push(key);
274
+ return keys.reverse(), function next() {
275
+ for (; keys.length;) {
276
+ var key = keys.pop();
277
+ if (key in object) return next.value = key, next.done = !1, next;
278
278
  }
279
279
  return next.done = !0, next;
280
280
  };
281
- }, e.values = values, Context.prototype = {
281
+ }, exports.values = values, Context.prototype = {
282
282
  constructor: Context,
283
- reset: function (e) {
284
- 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);
283
+ reset: function (skipTempReset) {
284
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
285
285
  },
286
286
  stop: function () {
287
287
  this.done = !0;
288
- var t = this.tryEntries[0].completion;
289
- if ("throw" === t.type) throw t.arg;
288
+ var rootRecord = this.tryEntries[0].completion;
289
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
290
290
  return this.rval;
291
291
  },
292
- dispatchException: function (e) {
293
- if (this.done) throw e;
294
- var r = this;
295
- function handle(n, o) {
296
- return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
292
+ dispatchException: function (exception) {
293
+ if (this.done) throw exception;
294
+ var context = this;
295
+ function handle(loc, caught) {
296
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
297
297
  }
298
- for (var o = this.tryEntries.length - 1; o >= 0; --o) {
299
- var i = this.tryEntries[o],
300
- a = i.completion;
301
- if ("root" === i.tryLoc) return handle("end");
302
- if (i.tryLoc <= this.prev) {
303
- var c = n.call(i, "catchLoc"),
304
- u = n.call(i, "finallyLoc");
305
- if (c && u) {
306
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
307
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
308
- } else if (c) {
309
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
298
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
299
+ var entry = this.tryEntries[i],
300
+ record = entry.completion;
301
+ if ("root" === entry.tryLoc) return handle("end");
302
+ if (entry.tryLoc <= this.prev) {
303
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
304
+ hasFinally = hasOwn.call(entry, "finallyLoc");
305
+ if (hasCatch && hasFinally) {
306
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
307
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
308
+ } else if (hasCatch) {
309
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
310
310
  } else {
311
- if (!u) throw new Error("try statement without catch or finally");
312
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
311
+ if (!hasFinally) throw new Error("try statement without catch or finally");
312
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
313
313
  }
314
314
  }
315
315
  }
316
316
  },
317
- abrupt: function (t, e) {
318
- for (var r = this.tryEntries.length - 1; r >= 0; --r) {
319
- var o = this.tryEntries[r];
320
- if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
321
- var i = o;
317
+ abrupt: function (type, arg) {
318
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
319
+ var entry = this.tryEntries[i];
320
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
321
+ var finallyEntry = entry;
322
322
  break;
323
323
  }
324
324
  }
325
- i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
326
- var a = i ? i.completion : {};
327
- return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
325
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
326
+ var record = finallyEntry ? finallyEntry.completion : {};
327
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
328
328
  },
329
- complete: function (t, e) {
330
- if ("throw" === t.type) throw t.arg;
331
- 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;
329
+ complete: function (record, afterLoc) {
330
+ if ("throw" === record.type) throw record.arg;
331
+ return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
332
332
  },
333
- finish: function (t) {
334
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
335
- var r = this.tryEntries[e];
336
- if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
333
+ finish: function (finallyLoc) {
334
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
335
+ var entry = this.tryEntries[i];
336
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
337
337
  }
338
338
  },
339
- catch: function (t) {
340
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
341
- var r = this.tryEntries[e];
342
- if (r.tryLoc === t) {
343
- var n = r.completion;
344
- if ("throw" === n.type) {
345
- var o = n.arg;
346
- resetTryEntry(r);
339
+ catch: function (tryLoc) {
340
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
341
+ var entry = this.tryEntries[i];
342
+ if (entry.tryLoc === tryLoc) {
343
+ var record = entry.completion;
344
+ if ("throw" === record.type) {
345
+ var thrown = record.arg;
346
+ resetTryEntry(entry);
347
347
  }
348
- return o;
348
+ return thrown;
349
349
  }
350
350
  }
351
351
  throw new Error("illegal catch attempt");
352
352
  },
353
- delegateYield: function (e, r, n) {
353
+ delegateYield: function (iterable, resultName, nextLoc) {
354
354
  return this.delegate = {
355
- iterator: values(e),
356
- resultName: r,
357
- nextLoc: n
358
- }, "next" === this.method && (this.arg = t), y;
359
- }
360
- }, e;
361
- }
362
- function _toPrimitive(t, r) {
363
- if ("object" != typeof t || !t) return t;
364
- var e = t[Symbol.toPrimitive];
365
- if (void 0 !== e) {
366
- var i = e.call(t, r || "default");
367
- if ("object" != typeof i) return i;
368
- throw new TypeError("@@toPrimitive must return a primitive value.");
369
- }
370
- return ("string" === r ? String : Number)(t);
371
- }
372
- function _toPropertyKey(t) {
373
- var i = _toPrimitive(t, "string");
374
- return "symbol" == typeof i ? i : String(i);
355
+ iterator: values(iterable),
356
+ resultName: resultName,
357
+ nextLoc: nextLoc
358
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
359
+ }
360
+ }, exports;
375
361
  }
376
- function _typeof(o) {
362
+ function _typeof(obj) {
377
363
  "@babel/helpers - typeof";
378
364
 
379
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
380
- return typeof o;
381
- } : function (o) {
382
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
383
- }, _typeof(o);
365
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
366
+ return typeof obj;
367
+ } : function (obj) {
368
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
369
+ }, _typeof(obj);
384
370
  }
385
371
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
386
372
  try {
@@ -487,6 +473,20 @@ function _nonIterableSpread() {
487
473
  function _nonIterableRest() {
488
474
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
489
475
  }
476
+ function _toPrimitive(input, hint) {
477
+ if (typeof input !== "object" || input === null) return input;
478
+ var prim = input[Symbol.toPrimitive];
479
+ if (prim !== undefined) {
480
+ var res = prim.call(input, hint || "default");
481
+ if (typeof res !== "object") return res;
482
+ throw new TypeError("@@toPrimitive must return a primitive value.");
483
+ }
484
+ return (hint === "string" ? String : Number)(input);
485
+ }
486
+ function _toPropertyKey(arg) {
487
+ var key = _toPrimitive(arg, "string");
488
+ return typeof key === "symbol" ? key : String(key);
489
+ }
490
490
 
491
491
  function ApaasCascader(props) {
492
492
  return /*#__PURE__*/React.createElement(Cascader, _objectSpread2({
@@ -917,7 +917,7 @@ function dataURLtoFile(dataurl, filename) {
917
917
  });
918
918
  }
919
919
 
920
- var css_248z$1 = ".index-module_imageBox__8zj7A {\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_imageBox__8zj7A .ant-upload-picture-card-wrapper {\n width: auto;\n}\n.index-module_imageBox__8zj7A .index-module_inputImage__3VrvC {\n width: 80px;\n height: 80px;\n border: 1px dashed #ccc;\n outline: none;\n background-color: rgba(0, 0, 0, 0);\n text-indent: 8px;\n}\n.index-module_imageBox__8zj7A .index-module_imageShow__3wD4d {\n padding: 8px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo {\n width: 80px;\n height: 80px;\n position: relative;\n border-radius: 2px;\n margin-right: 8px;\n margin-bottom: 8px;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo:hover {\n background: transparent;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo:hover .index-module_mask__3LUIn:before {\n opacity: 1;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo .index-module_delete__2cFpf {\n position: absolute;\n right: 0px;\n top: 0px;\n}\n.index-module_imageBox__8zj7A .index-module_mask__3LUIn {\n position: relative;\n height: 100%;\n overflow: hidden;\n}\n.index-module_imageBox__8zj7A .index-module_mask__3LUIn::before {\n position: absolute;\n z-index: 1;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n opacity: 0;\n transition: all 0.3s;\n content: ' ';\n}\n.index-module_imageBox__8zj7A .index-module_mask__3LUIn:hover .index-module_actions__2tY_V {\n opacity: 1;\n}\n.index-module_imageBox__8zj7A .index-module_mask__3LUIn .index-module_actions__2tY_V {\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: 10;\n white-space: nowrap;\n transform: translate(-50%, -50%);\n opacity: 0;\n transition: all 0.3s;\n}\n.index-module_imageBox__8zj7A .index-module_mask__3LUIn .index-module_actions__2tY_V .index-module_icon__ZI-2P {\n font-size: 16px;\n color: #fff;\n padding: 0 4px;\n}\n.index-module_imageBox__8zj7A .index-module_imagePaste__2X-K1 {\n display: inline-block;\n margin-right: 8px;\n}\n.index-module_imageBox__8zj7A .index-module_imagePaste__2X-K1 .index-module_fakeBox__2_3rA {\n width: 80px;\n height: 80px;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n padding-top: 16px;\n}\n.index-module_imageBox__8zj7A .index-module_imagePaste__2X-K1 .index-module_fakeBox__2_3rA .index-module_addBtn__2m5lC {\n color: #86909C;\n}\n.index-module_imageBox__8zj7A .index-module_upload__2igU3 .ant-upload {\n height: 80px;\n width: 80px;\n border: none;\n background-color: #F2F3F5;\n color: #86909C;\n}\n.index-module_imageBox__8zj7A .index-module_upload__2igU3 .ant-upload .index-module_addBtn__2m5lC {\n color: #86909C;\n}\n.index-module_tips__1ATcr {\n color: #4E5969;\n font-size: 12px;\n}\n";
920
+ var css_248z$1 = ".index-module_imageBox__8zj7A {\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_imageBox__8zj7A .ant-upload-picture-card-wrapper {\n width: auto;\n}\n.index-module_imageBox__8zj7A .index-module_inputImage__3VrvC {\n width: 80px;\n height: 80px;\n border: 1px dashed #ccc;\n outline: none;\n background-color: rgba(0, 0, 0, 0);\n text-indent: 8px;\n}\n.index-module_imageBox__8zj7A .index-module_imageShow__3wD4d {\n padding: 8px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo {\n width: 80px;\n height: 80px;\n position: relative;\n border-radius: 2px;\n margin-right: 8px;\n margin-bottom: 8px;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo:hover {\n background: transparent;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo:hover .index-module_mask__3LUIn:before {\n opacity: 1;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo .index-module_delete__2cFpf {\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n}\n.index-module_imageBox__8zj7A .index-module_mask__3LUIn {\n position: relative;\n height: 100%;\n overflow: hidden;\n}\n.index-module_imageBox__8zj7A .index-module_mask__3LUIn::before {\n position: absolute;\n z-index: 1;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n opacity: 0;\n transition: all 0.3s;\n content: ' ';\n}\n.index-module_imageBox__8zj7A .index-module_mask__3LUIn:hover .index-module_actions__2tY_V {\n opacity: 1;\n}\n.index-module_imageBox__8zj7A .index-module_mask__3LUIn .index-module_actions__2tY_V {\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: 10;\n white-space: nowrap;\n transform: translate(-50%, -50%);\n opacity: 0;\n transition: all 0.3s;\n}\n.index-module_imageBox__8zj7A .index-module_mask__3LUIn .index-module_actions__2tY_V .index-module_icon__ZI-2P {\n font-size: 16px;\n color: #fff;\n padding: 0 4px;\n}\n.index-module_imageBox__8zj7A .index-module_imagePaste__2X-K1 {\n display: inline-block;\n margin-right: 8px;\n}\n.index-module_imageBox__8zj7A .index-module_imagePaste__2X-K1 .index-module_fakeBox__2_3rA {\n width: 80px;\n height: 80px;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n padding-top: 16px;\n}\n.index-module_imageBox__8zj7A .index-module_imagePaste__2X-K1 .index-module_fakeBox__2_3rA .index-module_addBtn__2m5lC {\n color: #86909C;\n}\n.index-module_imageBox__8zj7A .index-module_upload__2igU3 .ant-upload {\n height: 80px;\n width: 80px;\n border: none;\n background-color: #F2F3F5;\n color: #86909C;\n}\n.index-module_imageBox__8zj7A .index-module_upload__2igU3 .ant-upload .index-module_addBtn__2m5lC {\n color: #86909C;\n}\n.index-module_tips__1ATcr {\n color: #4E5969;\n font-size: 12px;\n}\n";
921
921
  var styles$1 = {"imageBox":"index-module_imageBox__8zj7A","inputImage":"index-module_inputImage__3VrvC","imageShow":"index-module_imageShow__3wD4d","imageWrap":"index-module_imageWrap__JkMJo","-webkit-mask":"index-module_mask__3LUIn","mask":"index-module_mask__3LUIn","delete":"index-module_delete__2cFpf","actions":"index-module_actions__2tY_V","icon":"index-module_icon__ZI-2P","imagePaste":"index-module_imagePaste__2X-K1","fakeBox":"index-module_fakeBox__2_3rA","addBtn":"index-module_addBtn__2m5lC","upload":"index-module_upload__2igU3","tips":"index-module_tips__1ATcr"};
922
922
  styleInject(css_248z$1);
923
923
 
@@ -939,7 +939,6 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
939
939
  _ref$accept = _ref.accept,
940
940
  accept = _ref$accept === void 0 ? 'image/gif,image/jpg,image/jpeg,image/png' : _ref$accept,
941
941
  _ref$canPreview = _ref.canPreview,
942
- canPreview = _ref$canPreview === void 0 ? true : _ref$canPreview,
943
942
  _ref$disabled = _ref.disabled,
944
943
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
945
944
  uniqueKey = _ref.uniqueKey,
@@ -1096,39 +1095,25 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
1096
1095
  }));
1097
1096
  };
1098
1097
  };
1099
- var handlePreview = function handlePreview(imgUrl) {
1100
- return function () {
1101
- setCurrentPreviewImg(imgUrl);
1102
- setVisible(true);
1103
- };
1104
- };
1105
1098
  var renderImages = function renderImages(images) {
1106
- return images.map(function (image, index) {
1099
+ return /*#__PURE__*/React.createElement(Image.PreviewGroup, null, images.map(function (image, index) {
1107
1100
  var finalImage = "".concat(/^pic\/[\s\S]*$/.test(image) ? "".concat(hostUrl, "/").concat(image) : image, "?x-oss-process=image/resize,h_60,w_60");
1101
+ var showImage = /^pic\/[\s\S]*$/.test(image) ? "".concat(hostUrl, "/").concat(image) : image;
1108
1102
  return /*#__PURE__*/React.createElement("div", {
1109
1103
  className: styles$1.imageWrap,
1110
1104
  key: index
1111
- }, /*#__PURE__*/React.createElement("div", {
1112
- className: styles$1.mask
1113
- }, /*#__PURE__*/React.createElement("img", {
1114
- src: finalImage
1115
- }), /*#__PURE__*/React.createElement("div", {
1116
- className: styles$1.actions
1117
- }, canPreview && /*#__PURE__*/React.createElement(EyeOutlined, {
1118
- style: {
1119
- fontSize: '16px',
1120
- color: '#FFF',
1121
- marginRight: '8px'
1122
- },
1123
- onClick: handlePreview(/^pic\/[\s\S]*$/.test(image) ? "".concat(hostUrl, "/").concat(image) : image)
1124
- }), /*#__PURE__*/React.createElement(DeleteOutlined, {
1125
- style: {
1126
- fontSize: '16px',
1127
- color: '#FFF'
1105
+ }, /*#__PURE__*/React.createElement(Image, {
1106
+ src: finalImage,
1107
+ preview: {
1108
+ src: showImage
1128
1109
  },
1110
+ width: '100%',
1111
+ height: '80%'
1112
+ }), /*#__PURE__*/React.createElement("div", {
1113
+ className: styles$1.delete,
1129
1114
  onClick: handleDelete(index)
1130
- }))));
1131
- });
1115
+ }, "\u5220\u9664"));
1116
+ }));
1132
1117
  };
1133
1118
  useEffect(function () {
1134
1119
  var _inputRef$current2;
@@ -11685,9 +11670,11 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
11685
11670
  var GoodsModal$2 = /*#__PURE__*/forwardRef(GoodsModal$1);
11686
11671
 
11687
11672
  var getTableData = function getTableData(_ref, formData) {
11673
+ var _formData$brandIds;
11688
11674
  var current = _ref.current,
11689
11675
  pageSize = _ref.pageSize;
11690
11676
  var data = {
11677
+ brandIds: ((_formData$brandIds = formData.brandIds) === null || _formData$brandIds === void 0 ? void 0 : _formData$brandIds.length) ? formData.brandIds : null,
11691
11678
  skuCode: formData.skuCode || null,
11692
11679
  skuName: formData.skuName || null,
11693
11680
  goodName: formData.goodName || null,
@@ -11772,6 +11759,11 @@ var columns$1 = [{
11772
11759
  title: '商品ID',
11773
11760
  width: 200,
11774
11761
  ellipsis: true
11762
+ }, {
11763
+ dataIndex: 'brandName',
11764
+ title: '品牌名称',
11765
+ width: 200,
11766
+ ellipsis: true
11775
11767
  }, {
11776
11768
  dataIndex: 'marketPrice',
11777
11769
  title: '市场价',
@@ -11803,6 +11795,10 @@ var GoodList = function GoodList(props, ref) {
11803
11795
  _useState4 = _slicedToArray(_useState3, 2),
11804
11796
  selectIds = _useState4[0],
11805
11797
  setSelectIds = _useState4[1];
11798
+ var _useState5 = useState([]),
11799
+ _useState6 = _slicedToArray(_useState5, 2),
11800
+ brandList = _useState6[0],
11801
+ setBrandList = _useState6[1];
11806
11802
  useImperativeHandle(ref, function () {
11807
11803
  return {
11808
11804
  getSelectGoodList: function getSelectGoodList() {
@@ -11822,6 +11818,38 @@ var GoodList = function GoodList(props, ref) {
11822
11818
  params = _useAntdTable.params;
11823
11819
  var submit = search.submit,
11824
11820
  reset = search.reset;
11821
+ var setGoodBrandList = function setGoodBrandList() {
11822
+ var list = [];
11823
+ var pageNo = 0;
11824
+ var pageSize = 100;
11825
+ var getMore = function getMore() {
11826
+ extendRequest('/qy/gdfw/wdt/erp/goodBrand/list', {
11827
+ method: 'post',
11828
+ data: {
11829
+ pageSize: pageSize,
11830
+ pageNo: pageNo
11831
+ }
11832
+ }).then(function (res) {
11833
+ var _res$data2;
11834
+ if (res.success && (res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.detailList)) {
11835
+ var _res$data3, _res$data4;
11836
+ list.push.apply(list, _toConsumableArray((res === null || res === void 0 ? void 0 : (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.detailList) || []));
11837
+ if ((res === null || res === void 0 ? void 0 : (_res$data4 = res.data) === null || _res$data4 === void 0 ? void 0 : _res$data4.detailList.length) === pageSize) {
11838
+ pageNo += 1;
11839
+ getMore();
11840
+ } else {
11841
+ setBrandList(list);
11842
+ }
11843
+ } else {
11844
+ reject(res);
11845
+ }
11846
+ }).catch(console.error);
11847
+ };
11848
+ getMore();
11849
+ };
11850
+ React.useEffect(function () {
11851
+ setGoodBrandList();
11852
+ }, []);
11825
11853
  var advanceSearchForm = /*#__PURE__*/React.createElement(Form, {
11826
11854
  layout: "inline",
11827
11855
  form: form
@@ -11869,6 +11897,32 @@ var GoodList = function GoodList(props, ref) {
11869
11897
  style: {
11870
11898
  width: 150
11871
11899
  }
11900
+ })), /*#__PURE__*/React.createElement(Form.Item, {
11901
+ name: "brandIds",
11902
+ style: {
11903
+ marginBottom: '12px'
11904
+ }
11905
+ }, /*#__PURE__*/React.createElement(Select, {
11906
+ mode: "multiple",
11907
+ showSearch: true,
11908
+ allowClear: true,
11909
+ filterOption: function filterOption(input, option) {
11910
+ return option.label.includes(input);
11911
+ },
11912
+ style: {
11913
+ width: 150
11914
+ },
11915
+ placeholder: "\u54C1\u724C",
11916
+ options: brandList.filter(function (item) {
11917
+ return !item.isDisabled;
11918
+ }).map(function (_ref2) {
11919
+ var value = _ref2.brandId,
11920
+ label = _ref2.brandName;
11921
+ return {
11922
+ value: value,
11923
+ label: label
11924
+ };
11925
+ })
11872
11926
  })), /*#__PURE__*/React.createElement(Form.Item, {
11873
11927
  style: {
11874
11928
  marginBottom: '12px'
@@ -12025,91 +12079,493 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
12025
12079
  };
12026
12080
  var WdtGoodsModal = /*#__PURE__*/forwardRef(GoodsModal$3);
12027
12081
 
12028
- // interface GoodsItem {
12029
- // title: string;
12030
- // pic: string;
12031
- // platform: string;
12032
- // skuId: string;
12033
- // styleId: string;
12034
- // }
12035
- var GoodItem$1 = function GoodItem(props) {
12036
- var _props$value = props.value,
12037
- value = _props$value === void 0 ? [] : _props$value,
12038
- type = props.type,
12039
- onChange = props.onChange,
12040
- disabled = props.disabled,
12041
- _props$showHeader = props.showHeader,
12042
- showHeader = _props$showHeader === void 0 ? [] : _props$showHeader,
12043
- width = props.width,
12044
- _props$shopList = props.shopList,
12045
- shopList = _props$shopList === void 0 ? [] : _props$shopList,
12046
- _props$shopId = props.shopId,
12047
- shopId = _props$shopId === void 0 ? '' : _props$shopId,
12048
- _props$maxLength = props.maxLength,
12049
- maxLength = _props$maxLength === void 0 ? 20 : _props$maxLength,
12050
- _props$showChangeBtn = props.showChangeBtn,
12051
- showChangeBtn = _props$showChangeBtn === void 0 ? true : _props$showChangeBtn,
12052
- _props$tableSelect = props.tableSelect,
12053
- tableSelect = _props$tableSelect === void 0 ? false : _props$tableSelect,
12054
- _props$selectType = props.selectType,
12055
- selectType = _props$selectType === void 0 ? '' : _props$selectType,
12056
- _props$otherOperation = props.otherOperations,
12057
- otherOperations = _props$otherOperation === void 0 ? null : _props$otherOperation,
12058
- _props$canUpdateNumbe = props.canUpdateNumber,
12059
- canUpdateNumber = _props$canUpdateNumbe === void 0 ? false : _props$canUpdateNumbe,
12060
- shopCode = props.shopCode,
12061
- _props$companyKey = props.companyKey,
12062
- companyKey = _props$companyKey === void 0 ? '' : _props$companyKey,
12063
- onSelect = props.onSelect,
12064
- onDelete = props.onDelete;
12065
- var refModal = useRef();
12066
- var handleDelete = function handleDelete(record, index) {
12067
- onDelete === null || onDelete === void 0 ? void 0 : onDelete(value[index]);
12068
- var newList = _toConsumableArray(value).filter(function (item, i) {
12069
- return index !== i;
12070
- });
12071
- onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(newList));
12082
+ var getTableData$1 = function getTableData(_ref, formData) {
12083
+ var current = _ref.current,
12084
+ pageSize = _ref.pageSize;
12085
+ var data = {
12086
+ goodsSn: formData.goodsSn || null,
12087
+ goodsName: formData.goodsName || null,
12088
+ sku: formData.sku || null,
12089
+ skuId: formData.skuId || null
12072
12090
  };
12091
+ return extendRequest('/qy/gdfw/product/product/page', {
12092
+ method: 'post',
12093
+ data: _objectSpread2({
12094
+ pageSize: pageSize,
12095
+ pageNo: current,
12096
+ platform: 'WDT_ERP'
12097
+ }, data)
12098
+ }).then(function (res) {
12099
+ var _res$data = res.data,
12100
+ _res$data$productSkuL = _res$data.productSkuList,
12101
+ productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
12102
+ _res$data$total = _res$data.total,
12103
+ total = _res$data$total === void 0 ? 0 : _res$data$total;
12104
+ var newProducts = productSkuList.map(function (item, index) {
12105
+ return _objectSpread2(_objectSpread2({}, item), {}, {
12106
+ index: index + 1
12107
+ });
12108
+ });
12109
+ return {
12110
+ total: total,
12111
+ list: newProducts
12112
+ };
12113
+ });
12114
+ };
12115
+ var columns$2 = [{
12116
+ dataIndex: 'index',
12117
+ title: 'NO',
12118
+ render: function render(val, record, index) {
12119
+ return /*#__PURE__*/React.createElement("div", {
12120
+ style: {
12121
+ width: 25
12122
+ }
12123
+ }, index + 1);
12124
+ },
12125
+ width: 100
12126
+ }, {
12127
+ dataIndex: 'sku',
12128
+ title: "SKU",
12129
+ ellipsis: true,
12130
+ width: 70
12131
+ }, {
12132
+ dataIndex: 'skuId',
12133
+ title: "SKU ID",
12134
+ ellipsis: true,
12135
+ width: 70
12136
+ }, {
12137
+ dataIndex: 'goodsName',
12138
+ title: "\u5546\u54C1\u540D\u79F0",
12139
+ ellipsis: true,
12140
+ width: 70
12141
+ }, {
12142
+ dataIndex: 'goodsShortName',
12143
+ title: "\u5546\u54C1\u7B80\u79F0",
12144
+ ellipsis: true,
12145
+ width: 70
12146
+ }, {
12147
+ dataIndex: 'picPath',
12148
+ title: "\u5546\u54C1\u56FE\u7247",
12149
+ ellipsis: true,
12150
+ width: 100,
12151
+ render: function render(picUrl) {
12152
+ return /*#__PURE__*/React.createElement("img", {
12153
+ style: {
12154
+ width: '60px',
12155
+ height: '60px',
12156
+ objectFit: 'contain'
12157
+ },
12158
+ src: picUrl
12159
+ });
12160
+ }
12161
+ }, {
12162
+ dataIndex: 'goodsSn',
12163
+ title: "\u8D27\u53F7",
12164
+ ellipsis: true,
12165
+ width: 70
12166
+ }, {
12167
+ dataIndex: 'goodsId',
12168
+ title: "\u8D27\u53F7ID",
12169
+ ellipsis: true,
12170
+ width: 70
12171
+ }, {
12172
+ dataIndex: 'colorName',
12173
+ title: "\u989C\u8272\u540D\u79F0",
12174
+ ellipsis: true,
12175
+ width: 70
12176
+ }, {
12177
+ dataIndex: 'colorCode',
12178
+ title: "\u989C\u8272\u4EE3\u7801",
12179
+ ellipsis: true,
12180
+ width: 70
12181
+ }, {
12182
+ dataIndex: 'sizeName',
12183
+ title: "\u5C3A\u7801\u540D\u79F0",
12184
+ ellipsis: true,
12185
+ width: 70
12186
+ }, {
12187
+ dataIndex: 'sizeCode',
12188
+ title: "\u5C3A\u7801\u4EE3\u7801",
12189
+ ellipsis: true,
12190
+ width: 70
12191
+ }, {
12192
+ dataIndex: 'brandName',
12193
+ title: "\u54C1\u724C\u540D\u79F0",
12194
+ ellipsis: true,
12195
+ width: 70
12196
+ }, {
12197
+ dataIndex: 'goodsNumber',
12198
+ title: "\u5546\u54C1\u6570\u91CF",
12199
+ ellipsis: true,
12200
+ width: 70
12201
+ }, {
12202
+ dataIndex: 'goodsPrice',
12203
+ title: "\u5546\u54C1\u5355\u4EF7",
12204
+ ellipsis: true,
12205
+ width: 70
12206
+ }, {
12207
+ dataIndex: 'shopPrice',
12208
+ title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
12209
+ ellipsis: true,
12210
+ width: 70
12211
+ }, {
12212
+ dataIndex: 'sharePrice',
12213
+ title: "\u5206\u644A\u4EF7",
12214
+ ellipsis: true,
12215
+ width: 70
12216
+ }, {
12217
+ dataIndex: 'sharePayment',
12218
+ title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
12219
+ ellipsis: true,
12220
+ width: 70
12221
+ }, {
12222
+ dataIndex: 'payment',
12223
+ title: "\u5B9E\u4ED8\u91D1\u989D",
12224
+ ellipsis: true,
12225
+ width: 70
12226
+ }, {
12227
+ dataIndex: 'tcSku',
12228
+ title: "\u5957\u9910SKU",
12229
+ ellipsis: true,
12230
+ width: 70
12231
+ }, {
12232
+ dataIndex: 'tcGoodsNumber',
12233
+ title: "\u5957\u9910\u5957\u6570",
12234
+ ellipsis: true,
12235
+ width: 70
12236
+ }, {
12237
+ dataIndex: 'taoCanSingleSl',
12238
+ title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
12239
+ ellipsis: true,
12240
+ width: 70
12241
+ }, {
12242
+ dataIndex: 'isGift',
12243
+ title: "\u662F\u5426\u8D60\u54C1",
12244
+ ellipsis: true,
12245
+ width: 70
12246
+ }];
12247
+ var GoodList$1 = function GoodList(props, ref) {
12073
12248
  var _useState = useState([]),
12074
12249
  _useState2 = _slicedToArray(_useState, 2),
12075
- selectedRowKeys = _useState2[0],
12076
- setSelectedRowKeys = _useState2[1];
12077
- useEffect(function () {
12078
- setSelectedRowKeys([]);
12079
- }, [tableSelect, selectType]);
12080
- var updateHandle = function updateHandle(val, index, columnType) {
12081
- if (value === null || value === void 0 ? void 0 : value.length) {
12082
- value[index][columnType] = val;
12083
- if (type === 'WDT_RETURN_GOODS') {
12084
- if (['sharePrice', 'num'].includes(columnType)) {
12085
- var totalMoney = null;
12086
- if (columnType === 'num') {
12087
- totalMoney = new BigNumber(value[index][columnType]).multipliedBy(new BigNumber(value[index].sharePrice));
12088
- } else {
12089
- totalMoney = new BigNumber(value[index][columnType]).multipliedBy(new BigNumber(value[index].num));
12090
- }
12091
- if (totalMoney !== null) {
12092
- value[index]['returnPrice'] = totalMoney.toString();
12093
- }
12094
- }
12095
- } else if (type === 'WDT_EXCHANGE_GOODS') {
12096
- if (['price', 'num'].includes(columnType)) {
12097
- var _totalMoney = null;
12098
- if (columnType === 'num') {
12099
- _totalMoney = new BigNumber(value[index][columnType]).multipliedBy(new BigNumber(value[index].price));
12100
- } else {
12101
- _totalMoney = new BigNumber(value[index][columnType]).multipliedBy(new BigNumber(value[index].num));
12102
- }
12103
- if (_totalMoney !== null) {
12104
- value[index]['exchangePrice'] = _totalMoney.toString();
12105
- }
12106
- }
12250
+ selectList = _useState2[0],
12251
+ setSelect = _useState2[1];
12252
+ var _useState3 = useState([]),
12253
+ _useState4 = _slicedToArray(_useState3, 2),
12254
+ selectIds = _useState4[0],
12255
+ setSelectIds = _useState4[1];
12256
+ useImperativeHandle(ref, function () {
12257
+ return {
12258
+ getSelectGoodList: function getSelectGoodList() {
12259
+ return selectList;
12107
12260
  }
12108
- onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(value));
12261
+ };
12262
+ });
12263
+ var _Form$useForm = Form.useForm(),
12264
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
12265
+ form = _Form$useForm2[0];
12266
+ var _useAntdTable = useAntdTable(getTableData$1, {
12267
+ defaultPageSize: 10,
12268
+ form: form
12269
+ }),
12270
+ tableProps = _useAntdTable.tableProps,
12271
+ search = _useAntdTable.search,
12272
+ params = _useAntdTable.params;
12273
+ var submit = search.submit,
12274
+ reset = search.reset;
12275
+ var advanceSearchForm = /*#__PURE__*/React.createElement(Form, {
12276
+ layout: "inline",
12277
+ form: form
12278
+ }, /*#__PURE__*/React.createElement(Form.Item, {
12279
+ name: "goodsSn",
12280
+ style: {
12281
+ marginBottom: '12px'
12109
12282
  }
12110
- };
12111
- var COLUMNS_MAP = function COLUMNS_MAP() {
12112
- var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
12283
+ }, /*#__PURE__*/React.createElement(Input, {
12284
+ placeholder: "\u5546\u54C1\u8D27\u53F7",
12285
+ allowClear: true,
12286
+ style: {
12287
+ width: 150
12288
+ }
12289
+ })), /*#__PURE__*/React.createElement(Form.Item, {
12290
+ name: "goodsName",
12291
+ style: {
12292
+ marginBottom: '12px'
12293
+ }
12294
+ }, /*#__PURE__*/React.createElement(Input, {
12295
+ placeholder: "\u5546\u54C1\u540D\u79F0",
12296
+ allowClear: true,
12297
+ style: {
12298
+ width: 150
12299
+ }
12300
+ })), /*#__PURE__*/React.createElement(Form.Item, {
12301
+ name: "sku",
12302
+ style: {
12303
+ marginBottom: '12px'
12304
+ }
12305
+ }, /*#__PURE__*/React.createElement(Input, {
12306
+ placeholder: "SKU",
12307
+ allowClear: true,
12308
+ style: {
12309
+ width: 150
12310
+ }
12311
+ })), /*#__PURE__*/React.createElement(Form.Item, {
12312
+ name: "skuId",
12313
+ style: {
12314
+ marginBottom: '12px'
12315
+ }
12316
+ }, /*#__PURE__*/React.createElement(Input, {
12317
+ placeholder: "SKU ID",
12318
+ allowClear: true,
12319
+ style: {
12320
+ width: 150
12321
+ }
12322
+ })), /*#__PURE__*/React.createElement(Form.Item, {
12323
+ style: {
12324
+ marginBottom: '12px'
12325
+ }
12326
+ }, /*#__PURE__*/React.createElement(Button, {
12327
+ type: "primary",
12328
+ style: {
12329
+ marginRight: '8px'
12330
+ },
12331
+ onClick: submit
12332
+ }, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
12333
+ onClick: reset
12334
+ }, "\u91CD\u7F6E")));
12335
+ var rowSelection = {
12336
+ selectedRowKeys: selectIds,
12337
+ fixed: true,
12338
+ onSelect: function onSelect(record, selected) {
12339
+ if (selected) {
12340
+ setSelectIds([].concat(_toConsumableArray(selectIds), [record.specNo]));
12341
+ setSelect([].concat(_toConsumableArray(selectList), [record]));
12342
+ } else {
12343
+ setSelectIds(selectIds.filter(function (t) {
12344
+ return t !== record.specNo;
12345
+ }));
12346
+ setSelect(selectList.filter(function (t) {
12347
+ return t.specNo !== record.specNo;
12348
+ }));
12349
+ }
12350
+ },
12351
+ onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
12352
+ if (selected) {
12353
+ setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
12354
+ return t.specNo;
12355
+ }))));
12356
+ setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
12357
+ } else {
12358
+ setSelectIds(difference(selectIds, changeRows.map(function (t) {
12359
+ return t.specNo;
12360
+ })));
12361
+ var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
12362
+ return arrVal.specNo !== othVal.specNo;
12363
+ });
12364
+ setSelect(list);
12365
+ }
12366
+ }
12367
+ };
12368
+ var showTable = function showTable() {
12369
+ var handleDelete = function handleDelete(record) {
12370
+ setSelectIds(selectIds.filter(function (t) {
12371
+ return t !== record.specNo;
12372
+ }));
12373
+ setSelect(selectList.filter(function (t) {
12374
+ return t.specNo !== record.specNo;
12375
+ }));
12376
+ };
12377
+ var showColumns = [{
12378
+ dataIndex: '',
12379
+ title: "\u64CD\u4F5C",
12380
+ ellipsis: true,
12381
+ width: 100,
12382
+ render: function render(val, record) {
12383
+ return /*#__PURE__*/React.createElement(Button, {
12384
+ type: "link",
12385
+ onClick: function onClick() {
12386
+ return handleDelete(record);
12387
+ }
12388
+ }, "\u5220\u9664");
12389
+ }
12390
+ }].concat(takeRight(columns$2, columns$2.length - 1));
12391
+ return selectList.length ? /*#__PURE__*/React.createElement("div", {
12392
+ style: {
12393
+ width: '100%',
12394
+ maxWidth: '387px'
12395
+ }
12396
+ }, /*#__PURE__*/React.createElement(Table, {
12397
+ columns: showColumns,
12398
+ rowKey: 'specNo',
12399
+ dataSource: selectList,
12400
+ scroll: {
12401
+ x: '100%',
12402
+ y: 250
12403
+ },
12404
+ pagination: {
12405
+ size: 'small',
12406
+ total: selectIds.length,
12407
+ pageSize: 10,
12408
+ showSizeChanger: false
12409
+ }
12410
+ })) : null;
12411
+ };
12412
+ return /*#__PURE__*/React.createElement(React.Fragment, null, advanceSearchForm, /*#__PURE__*/React.createElement("div", {
12413
+ style: {
12414
+ marginTop: '4px'
12415
+ }
12416
+ }, /*#__PURE__*/React.createElement(Table, _objectSpread2({
12417
+ rowSelection: rowSelection,
12418
+ rowKey: "goodsId",
12419
+ columns: columns$2,
12420
+ scroll: {
12421
+ x: '100%',
12422
+ y: 250
12423
+ }
12424
+ }, tableProps))), /*#__PURE__*/React.createElement(Popover, {
12425
+ getPopupContainer: function getPopupContainer(triggerNode) {
12426
+ return triggerNode.parentElement;
12427
+ },
12428
+ content: showTable(),
12429
+ title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
12430
+ }, /*#__PURE__*/React.createElement(Button, {
12431
+ danger: true,
12432
+ type: "text"
12433
+ }, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
12434
+ };
12435
+ var BsE3GoodList = /*#__PURE__*/forwardRef(GoodList$1);
12436
+
12437
+ var GoodsModal$4 = function GoodsModal(props, ref) {
12438
+ useImperativeHandle(ref, function () {
12439
+ return {
12440
+ open: function open() {
12441
+ setVisible(true);
12442
+ }
12443
+ };
12444
+ });
12445
+ var onSubmit = props.onSubmit,
12446
+ width = props.width;
12447
+ var _useState = useState(false),
12448
+ _useState2 = _slicedToArray(_useState, 2),
12449
+ visible = _useState2[0],
12450
+ setVisible = _useState2[1];
12451
+ var bsE3GoodListRef = useRef(null);
12452
+ var _onCancel = function onCancel() {
12453
+ setVisible(false);
12454
+ };
12455
+ var onOk = function onOk() {
12456
+ var _bsE3GoodListRef$curr;
12457
+ var selectedList = ((_bsE3GoodListRef$curr = bsE3GoodListRef.current) === null || _bsE3GoodListRef$curr === void 0 ? void 0 : _bsE3GoodListRef$curr.getSelectGoodList()) || [];
12458
+ onSubmit(selectedList);
12459
+ _onCancel();
12460
+ };
12461
+ return /*#__PURE__*/React.createElement(React.Fragment, null, visible && /*#__PURE__*/React.createElement(Modal, {
12462
+ title: '选择商品',
12463
+ okText: '确认',
12464
+ cancelText: '取消',
12465
+ visible: visible,
12466
+ width: width || 850,
12467
+ onCancel: function onCancel() {
12468
+ _onCancel();
12469
+ },
12470
+ onOk: onOk,
12471
+ wrapClassName: "goodModal"
12472
+ }, /*#__PURE__*/React.createElement(BsE3GoodList, {
12473
+ ref: bsE3GoodListRef
12474
+ })));
12475
+ };
12476
+ var BsE3GoodsModal = /*#__PURE__*/forwardRef(GoodsModal$4);
12477
+
12478
+ // interface GoodsItem {
12479
+ // title: string;
12480
+ // pic: string;
12481
+ // platform: string;
12482
+ // skuId: string;
12483
+ // styleId: string;
12484
+ // }
12485
+ var GoodItem$1 = function GoodItem(props) {
12486
+ var _ref;
12487
+ var _props$value = props.value,
12488
+ value = _props$value === void 0 ? [] : _props$value,
12489
+ type = props.type,
12490
+ onChange = props.onChange,
12491
+ disabled = props.disabled,
12492
+ _props$showHeader = props.showHeader,
12493
+ showHeader = _props$showHeader === void 0 ? [] : _props$showHeader,
12494
+ width = props.width,
12495
+ _props$shopList = props.shopList,
12496
+ shopList = _props$shopList === void 0 ? [] : _props$shopList,
12497
+ _props$shopId = props.shopId,
12498
+ shopId = _props$shopId === void 0 ? '' : _props$shopId,
12499
+ _props$maxLength = props.maxLength,
12500
+ maxLength = _props$maxLength === void 0 ? 20 : _props$maxLength,
12501
+ _props$showChangeBtn = props.showChangeBtn,
12502
+ showChangeBtn = _props$showChangeBtn === void 0 ? true : _props$showChangeBtn,
12503
+ _props$showModeBtn = props.showModeBtn,
12504
+ showModeBtn = _props$showModeBtn === void 0 ? false : _props$showModeBtn,
12505
+ _props$isStrict = props.isStrict,
12506
+ isStrict = _props$isStrict === void 0 ? false : _props$isStrict,
12507
+ _props$tableSelect = props.tableSelect,
12508
+ tableSelect = _props$tableSelect === void 0 ? false : _props$tableSelect,
12509
+ _props$selectType = props.selectType,
12510
+ selectType = _props$selectType === void 0 ? '' : _props$selectType,
12511
+ _props$otherOperation = props.otherOperations,
12512
+ otherOperations = _props$otherOperation === void 0 ? null : _props$otherOperation,
12513
+ _props$canUpdateNumbe = props.canUpdateNumber,
12514
+ canUpdateNumber = _props$canUpdateNumbe === void 0 ? false : _props$canUpdateNumbe,
12515
+ shopCode = props.shopCode,
12516
+ _props$companyKey = props.companyKey,
12517
+ companyKey = _props$companyKey === void 0 ? '' : _props$companyKey,
12518
+ onSelect = props.onSelect,
12519
+ onDelete = props.onDelete,
12520
+ onModeChange = props.onModeChange;
12521
+ var refModal = useRef();
12522
+ var handleDelete = function handleDelete(record, index) {
12523
+ onDelete === null || onDelete === void 0 ? void 0 : onDelete(value[index]);
12524
+ var newList = _toConsumableArray(value).filter(function (item, i) {
12525
+ return index !== i;
12526
+ });
12527
+ onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(newList));
12528
+ };
12529
+ var _useState = useState([]),
12530
+ _useState2 = _slicedToArray(_useState, 2),
12531
+ selectedRowKeys = _useState2[0],
12532
+ setSelectedRowKeys = _useState2[1];
12533
+ useEffect(function () {
12534
+ setSelectedRowKeys([]);
12535
+ }, [tableSelect, selectType]);
12536
+ var updateHandle = function updateHandle(val, index, columnType) {
12537
+ if (value === null || value === void 0 ? void 0 : value.length) {
12538
+ value[index][columnType] = val;
12539
+ if (type === 'WDT_RETURN_GOODS') {
12540
+ if (['sharePrice', 'num'].includes(columnType)) {
12541
+ var totalMoney = null;
12542
+ if (columnType === 'num') {
12543
+ totalMoney = new BigNumber(value[index][columnType]).multipliedBy(new BigNumber(value[index].sharePrice));
12544
+ } else {
12545
+ totalMoney = new BigNumber(value[index][columnType]).multipliedBy(new BigNumber(value[index].num));
12546
+ }
12547
+ if (totalMoney !== null) {
12548
+ value[index]['returnPrice'] = totalMoney.toString();
12549
+ }
12550
+ }
12551
+ } else if (type === 'WDT_EXCHANGE_GOODS') {
12552
+ if (['price', 'num'].includes(columnType)) {
12553
+ var _totalMoney = null;
12554
+ if (columnType === 'num') {
12555
+ _totalMoney = new BigNumber(value[index][columnType]).multipliedBy(new BigNumber(value[index].price));
12556
+ } else {
12557
+ _totalMoney = new BigNumber(value[index][columnType]).multipliedBy(new BigNumber(value[index].num));
12558
+ }
12559
+ if (_totalMoney !== null) {
12560
+ value[index]['exchangePrice'] = _totalMoney.toString();
12561
+ }
12562
+ }
12563
+ }
12564
+ onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(value));
12565
+ }
12566
+ };
12567
+ var COLUMNS_MAP = function COLUMNS_MAP() {
12568
+ var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
12113
12569
  return function (type) {
12114
12570
  var columns = [];
12115
12571
  switch (type) {
@@ -12395,72 +12851,215 @@ var GoodItem$1 = function GoodItem(props) {
12395
12851
  }) : /*#__PURE__*/React.createElement("span", null, val);
12396
12852
  }
12397
12853
  }, {
12398
- dataIndex: 'price',
12399
- title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
12854
+ dataIndex: 'price',
12855
+ title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
12856
+ align: 'center',
12857
+ ellipsis: true,
12858
+ width: 100,
12859
+ render: function render(val, record, index) {
12860
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12861
+ style: {
12862
+ width: 70
12863
+ },
12864
+ value: val,
12865
+ min: 0,
12866
+ onChange: function onChange(value) {
12867
+ return updateHandle(value, index, 'price');
12868
+ }
12869
+ }) : /*#__PURE__*/React.createElement("span", null, val);
12870
+ }
12871
+ }, {
12872
+ dataIndex: 'exchangePrice',
12873
+ title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
12874
+ align: 'center',
12875
+ ellipsis: true,
12876
+ width: 100
12877
+ }, {
12878
+ dataIndex: 'giftType',
12879
+ title: "\u8D60\u54C1\u65B9\u5F0F",
12880
+ align: 'center',
12881
+ ellipsis: true,
12882
+ width: 100,
12883
+ render: function render(val) {
12884
+ var giftTypeMap = {
12885
+ 0: '非赠品',
12886
+ 1: '自动赠送',
12887
+ 2: '手工赠送',
12888
+ 3: '回购自动送赠品',
12889
+ 4: '前N有礼送赠品',
12890
+ 6: '天猫优仓赠品',
12891
+ 7: '淘宝CRM会员送赠'
12892
+ };
12893
+ return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
12894
+ }
12895
+ }, {
12896
+ dataIndex: 'type',
12897
+ title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
12898
+ align: 'center',
12899
+ ellipsis: true,
12900
+ width: 100,
12901
+ render: function render(val, record, index) {
12902
+ var options = [{
12903
+ label: '单品',
12904
+ value: '1'
12905
+ }, {
12906
+ label: '组合装',
12907
+ value: '2'
12908
+ }];
12909
+ return !disabled ? /*#__PURE__*/React.createElement(Select, {
12910
+ style: {
12911
+ width: 70
12912
+ },
12913
+ options: options,
12914
+ value: val,
12915
+ onChange: function onChange(value) {
12916
+ return updateHandle(value, index, 'type');
12917
+ }
12918
+ }) : /*#__PURE__*/React.createElement("span", null, val);
12919
+ }
12920
+ }];
12921
+ }
12922
+ break;
12923
+ case 'BS_E3_GOODS':
12924
+ {
12925
+ columns = [{
12926
+ dataIndex: 'sku',
12927
+ title: "SKU",
12928
+ align: 'center',
12929
+ ellipsis: true,
12930
+ width: 150
12931
+ }, {
12932
+ dataIndex: 'skuId',
12933
+ title: "SKU ID",
12934
+ align: 'center',
12935
+ ellipsis: true,
12936
+ width: 150
12937
+ }, {
12938
+ dataIndex: 'goodsName',
12939
+ title: "\u5546\u54C1\u540D\u79F0",
12940
+ align: 'center',
12941
+ ellipsis: true,
12942
+ width: 150
12943
+ }, {
12944
+ dataIndex: 'goodsShortName',
12945
+ title: "\u5546\u54C1\u7B80\u79F0",
12946
+ align: 'center',
12947
+ ellipsis: true,
12948
+ width: 100
12949
+ }, {
12950
+ dataIndex: 'picPath',
12951
+ title: "\u5546\u54C1\u56FE\u7247",
12952
+ align: 'center',
12953
+ ellipsis: true,
12954
+ width: 100,
12955
+ render: function render(val) {
12956
+ return /*#__PURE__*/React.createElement(Image, {
12957
+ width: 60,
12958
+ src: val
12959
+ });
12960
+ }
12961
+ }, {
12962
+ dataIndex: 'goodsSn',
12963
+ title: "\u8D27\u53F7",
12964
+ align: 'center',
12965
+ ellipsis: true,
12966
+ width: 150
12967
+ }, {
12968
+ dataIndex: 'goodsId',
12969
+ title: "\u8D27\u53F7ID",
12970
+ align: 'center',
12971
+ ellipsis: true,
12972
+ width: 150
12973
+ }, {
12974
+ dataIndex: 'colorName',
12975
+ title: "\u989C\u8272\u540D\u79F0",
12976
+ align: 'center',
12977
+ ellipsis: true,
12978
+ width: 100
12979
+ }, {
12980
+ dataIndex: 'colorCode',
12981
+ title: "\u989C\u8272\u4EE3\u7801",
12982
+ align: 'center',
12983
+ ellipsis: true,
12984
+ width: 150
12985
+ }, {
12986
+ dataIndex: 'sizeName',
12987
+ title: "\u5C3A\u7801\u540D\u79F0",
12988
+ align: 'center',
12989
+ ellipsis: true,
12990
+ width: 100
12991
+ }, {
12992
+ dataIndex: 'sizeCode',
12993
+ title: "\u5C3A\u7801\u4EE3\u7801",
12994
+ align: 'center',
12995
+ ellipsis: true,
12996
+ width: 100
12997
+ }, {
12998
+ dataIndex: 'brandName',
12999
+ title: "\u54C1\u724C\u540D\u79F0",
13000
+ align: 'center',
13001
+ ellipsis: true,
13002
+ width: 150
13003
+ }, {
13004
+ dataIndex: 'goodsNumber',
13005
+ title: "\u5546\u54C1\u6570\u91CF",
13006
+ align: 'center',
13007
+ ellipsis: true,
13008
+ width: 100
13009
+ }, {
13010
+ dataIndex: 'goodsPrice',
13011
+ title: "\u5546\u54C1\u5355\u4EF7",
13012
+ align: 'center',
13013
+ ellipsis: true,
13014
+ width: 120
13015
+ }, {
13016
+ dataIndex: 'shopPrice',
13017
+ title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
13018
+ align: 'center',
13019
+ ellipsis: true,
13020
+ width: 120
13021
+ }, {
13022
+ dataIndex: 'sharePrice',
13023
+ title: "\u5206\u644A\u4EF7",
12400
13024
  align: 'center',
12401
13025
  ellipsis: true,
12402
- width: 100,
12403
- render: function render(val, record, index) {
12404
- return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12405
- style: {
12406
- width: 70
12407
- },
12408
- value: val,
12409
- min: 0,
12410
- onChange: function onChange(value) {
12411
- return updateHandle(value, index, 'price');
12412
- }
12413
- }) : /*#__PURE__*/React.createElement("span", null, val);
12414
- }
13026
+ width: 120
12415
13027
  }, {
12416
- dataIndex: 'exchangePrice',
12417
- title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
13028
+ dataIndex: 'sharePayment',
13029
+ title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
13030
+ align: 'center',
13031
+ ellipsis: true,
13032
+ width: 120
13033
+ }, {
13034
+ dataIndex: 'payment',
13035
+ title: "\u5B9E\u4ED8\u91D1\u989D",
13036
+ align: 'center',
13037
+ ellipsis: true,
13038
+ width: 120
13039
+ }, {
13040
+ dataIndex: 'tcSku',
13041
+ title: "\u5957\u9910SKU",
13042
+ align: 'center',
13043
+ ellipsis: true,
13044
+ width: 150
13045
+ }, {
13046
+ dataIndex: 'tcGoodsNumber',
13047
+ title: "\u5957\u9910\u5957\u6570",
12418
13048
  align: 'center',
12419
13049
  ellipsis: true,
12420
13050
  width: 100
12421
13051
  }, {
12422
- dataIndex: 'giftType',
12423
- title: "\u8D60\u54C1\u65B9\u5F0F",
13052
+ dataIndex: 'taoCanSingleSl',
13053
+ title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
12424
13054
  align: 'center',
12425
13055
  ellipsis: true,
12426
- width: 100,
12427
- render: function render(val) {
12428
- var giftTypeMap = {
12429
- 0: '非赠品',
12430
- 1: '自动赠送',
12431
- 2: '手工赠送',
12432
- 3: '回购自动送赠品',
12433
- 4: '前N有礼送赠品',
12434
- 6: '天猫优仓赠品',
12435
- 7: '淘宝CRM会员送赠'
12436
- };
12437
- return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
12438
- }
13056
+ width: 100
12439
13057
  }, {
12440
- dataIndex: 'type',
12441
- title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
13058
+ dataIndex: 'isGift',
13059
+ title: "\u662F\u5426\u8D60\u54C1",
12442
13060
  align: 'center',
12443
13061
  ellipsis: true,
12444
- width: 100,
12445
- render: function render(val, record, index) {
12446
- var options = [{
12447
- label: '单品',
12448
- value: '1'
12449
- }, {
12450
- label: '组合装',
12451
- value: '2'
12452
- }];
12453
- return !disabled ? /*#__PURE__*/React.createElement(Select, {
12454
- style: {
12455
- width: 70
12456
- },
12457
- options: options,
12458
- value: val,
12459
- onChange: function onChange(value) {
12460
- return updateHandle(value, index, 'type');
12461
- }
12462
- }) : /*#__PURE__*/React.createElement("span", null, val);
12463
- }
13062
+ width: 100
12464
13063
  }];
12465
13064
  }
12466
13065
  break;
@@ -12619,6 +13218,15 @@ var GoodItem$1 = function GoodItem(props) {
12619
13218
  }
12620
13219
  return item;
12621
13220
  });
13221
+ } else if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
13222
+ newList = list.map(function (item) {
13223
+ item.uuid = uuid();
13224
+ item.canDelete = true;
13225
+ item.goodsNumber = 1;
13226
+ item.goodsPrice = 0;
13227
+ item.canUpdateNumber = canUpdateNumber;
13228
+ return item;
13229
+ });
12622
13230
  } else {
12623
13231
  newList = list.map(function (item) {
12624
13232
  var goodsId = item.goodsId,
@@ -12661,6 +13269,9 @@ var GoodItem$1 = function GoodItem(props) {
12661
13269
  fixed: true,
12662
13270
  onChange: onSelectChange
12663
13271
  };
13272
+ var handleCheckboxChange = function handleCheckboxChange(e) {
13273
+ onModeChange === null || onModeChange === void 0 ? void 0 : onModeChange(e.target.checked);
13274
+ };
12664
13275
  var tableConfig = useMemo(function () {
12665
13276
  var params = {};
12666
13277
  if (tableSelect) {
@@ -12672,7 +13283,10 @@ var GoodItem$1 = function GoodItem(props) {
12672
13283
  style: {
12673
13284
  float: 'right'
12674
13285
  }
12675
- }, /*#__PURE__*/React.createElement(Button, {
13286
+ }, showModeBtn && /*#__PURE__*/React.createElement(Checkbox, {
13287
+ checked: isStrict,
13288
+ onChange: handleCheckboxChange
13289
+ }, "\u5408\u5E76\u5355\uFF0C\u52FE\u9009\u540E\u53EA\u5C55\u793A\u5F53\u524D\u5E73\u53F0\u8BA2\u5355\u5546\u54C1"), !((_ref = ['BS_E3_GOODS']) === null || _ref === void 0 ? void 0 : _ref.includes(type)) && /*#__PURE__*/React.createElement(Button, {
12676
13290
  type: "link",
12677
13291
  onClick: handleChangeGoods
12678
13292
  }, "\u9009\u62E9\u5546\u54C1"), otherOperations), /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
@@ -12695,6 +13309,14 @@ var GoodItem$1 = function GoodItem(props) {
12695
13309
  shopId: shopId,
12696
13310
  maxLength: maxLength,
12697
13311
  companyKey: companyKey
13312
+ }) : ['BS_E3_REISSUE_GOODS', 'BS_E3_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type) ? /*#__PURE__*/React.createElement(BsE3GoodsModal, {
13313
+ ref: refModal,
13314
+ onSubmit: onSubmit,
13315
+ width: width,
13316
+ shopList: shopList,
13317
+ shopId: shopId,
13318
+ maxLength: maxLength,
13319
+ companyKey: companyKey
12698
13320
  }) : /*#__PURE__*/React.createElement(GoodsModal$2, {
12699
13321
  ref: refModal,
12700
13322
  onSubmit: onSubmit,
@@ -13314,19 +13936,185 @@ var BsReturnGoods = function BsReturnGoods(props) {
13314
13936
  })));
13315
13937
  };
13316
13938
 
13317
- var columnsNameMap = {
13318
- BS_SYSTEM_ORDER: {
13319
- typeName: '单据类型',
13320
- tagName: '标签'
13321
- },
13322
- WLN_SYSTEM_ORDER: {
13323
- typeName: '订单类型',
13324
- tagName: '标记'
13325
- },
13326
- WDT_SYSTEM_ORDER: {
13327
- typeName: '订单类型',
13328
- tagName: '订单标签'
13939
+ var singletonMap = new Map();
13940
+ var getWdtOrderListSingleton = function getWdtOrderListSingleton(orderNo) {
13941
+ if (!singletonMap.has(orderNo)) {
13942
+ var p = new Promise(function (resolve, reject) {
13943
+ var doReject = function doReject(err) {
13944
+ // 清空掉错误的请求记录
13945
+ singletonMap.delete(orderNo);
13946
+ reject(err);
13947
+ };
13948
+ extendRequest('/qy/gdfw/order/wdtOrderDetail', {
13949
+ method: 'post',
13950
+ data: {
13951
+ billNo: orderNo
13952
+ }
13953
+ }).then(function (data) {
13954
+ if (data === null || data === void 0 ? void 0 : data.success) {
13955
+ var _data$data, _data$data$trades;
13956
+ if (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$trades = _data$data.trades) === null || _data$data$trades === void 0 ? void 0 : _data$data$trades.length) {
13957
+ data.data.trades = filterWdtOrders(data === null || data === void 0 ? void 0 : data.data, orderNo).map(function (item) {
13958
+ return _objectSpread2(_objectSpread2({}, item), {}, {
13959
+ billNo: item.tradeNo,
13960
+ billType: WDT_ORDER_TYPE_MAP[item.tradeType],
13961
+ billTag: item.tagName
13962
+ });
13963
+ });
13964
+ }
13965
+ resolve(data.data);
13966
+ // 延迟10秒清除,保证订单的时效性
13967
+ setTimeout(function () {
13968
+ singletonMap.delete(orderNo);
13969
+ }, 1000 * 10);
13970
+ } else {
13971
+ doReject(data);
13972
+ }
13973
+ }).catch(doReject);
13974
+ });
13975
+ singletonMap.set(orderNo, p);
13976
+ }
13977
+ return singletonMap.get(orderNo);
13978
+ };
13979
+ var wdtUtils = {
13980
+ getWdtOrderListSingleton: getWdtOrderListSingleton
13981
+ };
13982
+
13983
+ var singletonMap$1 = new Map();
13984
+ var getBsE3OrderListSingleton = function getBsE3OrderListSingleton(orderNo) {
13985
+ if (!singletonMap$1.has(orderNo)) {
13986
+ var p = new Promise(function (resolve, reject) {
13987
+ var doReject = function doReject(err) {
13988
+ // 清空掉错误的请求记录
13989
+ // singletonMap.delete(orderNo);
13990
+ reject(err);
13991
+ };
13992
+ extendRequest('/qy/gdfw/order/bse3OrderDetail', {
13993
+ method: 'post',
13994
+ data: {
13995
+ billNo: orderNo
13996
+ }
13997
+ }).then(function (data) {
13998
+ if (data === null || data === void 0 ? void 0 : data.success) {
13999
+ var _data$data, _data$data$orderList;
14000
+ if (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$orderList = _data$data.orderList) === null || _data$data$orderList === void 0 ? void 0 : _data$data$orderList.length) {
14001
+ var _filterBsE3Orders;
14002
+ data.data.orderList = (_filterBsE3Orders = filterBsE3Orders(data === null || data === void 0 ? void 0 : data.data, orderNo)) === null || _filterBsE3Orders === void 0 ? void 0 : _filterBsE3Orders.map(function (item) {
14003
+ var isSplit = item.isSplit,
14004
+ isSplitNew = item.isSplitNew,
14005
+ isCopy = item.isCopy,
14006
+ isExchangeOrder = item.isExchangeOrder,
14007
+ isCombineNew = item.isCombineNew,
14008
+ isCombine = item.isCombine,
14009
+ orderStatus = item.orderStatus;
14010
+ return _objectSpread2(_objectSpread2({}, item), {}, {
14011
+ orderStatus: BS_E3_ORDER_STATUS_MAP[orderStatus],
14012
+ isSplit: BS_E3_BOOLEAN_STATUS_MAP[isSplit],
14013
+ isSplitNew: BS_E3_BOOLEAN_STATUS_MAP[isSplitNew],
14014
+ isExchangeOrder: BS_E3_BOOLEAN_STATUS_MAP[isExchangeOrder],
14015
+ isCopy: BS_E3_BOOLEAN_STATUS_MAP[isCopy],
14016
+ isCombineNew: BS_E3_BOOLEAN_STATUS_MAP[isCombineNew],
14017
+ isCombine: BS_E3_BOOLEAN_STATUS_MAP[isCombine]
14018
+ });
14019
+ });
14020
+ }
14021
+ resolve(data.data);
14022
+ } else {
14023
+ doReject(data);
14024
+ }
14025
+ }).catch(doReject);
14026
+ });
14027
+ singletonMap$1.set(orderNo, p);
13329
14028
  }
14029
+ return singletonMap$1.get(orderNo);
14030
+ };
14031
+ var bsE3Utils = {
14032
+ getBsE3OrderListSingleton: getBsE3OrderListSingleton
14033
+ };
14034
+
14035
+ var columnsMap = {
14036
+ BS_SYSTEM_ORDER: [{
14037
+ title: '单据类型',
14038
+ dataIndex: 'billType',
14039
+ width: 150
14040
+ }, {
14041
+ title: '系统订单号',
14042
+ dataIndex: 'billNo',
14043
+ width: 150
14044
+ }, {
14045
+ title: '标签',
14046
+ dataIndex: 'billTag',
14047
+ width: 150
14048
+ }],
14049
+ WLN_SYSTEM_ORDER: [{
14050
+ title: '订单类型',
14051
+ dataIndex: 'billType',
14052
+ width: 150
14053
+ }, {
14054
+ title: '系统订单号',
14055
+ dataIndex: 'billNo',
14056
+ width: 150
14057
+ }, {
14058
+ title: '标记',
14059
+ dataIndex: 'billTag',
14060
+ width: 150
14061
+ }],
14062
+ WDT_SYSTEM_ORDER: [{
14063
+ title: '订单类型',
14064
+ dataIndex: 'billType',
14065
+ width: 150
14066
+ }, {
14067
+ title: '系统订单号',
14068
+ dataIndex: 'billNo',
14069
+ width: 150
14070
+ }, {
14071
+ title: '订单标签',
14072
+ dataIndex: 'billTag',
14073
+ width: 150
14074
+ }],
14075
+ BS_E3_SYSTEM_ORDER: [{
14076
+ title: '系统订单号',
14077
+ dataIndex: 'orderSn',
14078
+ width: 150
14079
+ }, {
14080
+ title: '订单状态',
14081
+ dataIndex: 'orderStatus',
14082
+ width: 100
14083
+ }, {
14084
+ title: '是否被拆分',
14085
+ dataIndex: 'isSplit',
14086
+ width: 70
14087
+ }, {
14088
+ title: '是否拆分子单',
14089
+ dataIndex: 'isSplitNew',
14090
+ width: 70
14091
+ }, {
14092
+ title: '是否被合并',
14093
+ dataIndex: 'isCombine',
14094
+ width: 70
14095
+ }, {
14096
+ title: '是否合并新单',
14097
+ dataIndex: 'isCombineNew',
14098
+ width: 70
14099
+ }, {
14100
+ title: '是否复制单',
14101
+ dataIndex: 'isCopy',
14102
+ width: 70
14103
+ }, {
14104
+ title: '是否换货单',
14105
+ dataIndex: 'isExchangeOrder',
14106
+ width: 70
14107
+ }, {
14108
+ title: '订单备注',
14109
+ dataIndex: 'orderMsg',
14110
+ width: 150
14111
+ }]
14112
+ };
14113
+ var rowKeyMap = {
14114
+ BS_SYSTEM_ORDER: 'billNo',
14115
+ WLN_SYSTEM_ORDER: 'billNo',
14116
+ WDT_SYSTEM_ORDER: 'billNo',
14117
+ BS_E3_SYSTEM_ORDER: 'orderSn'
13330
14118
  };
13331
14119
  var index$1 = (function (props) {
13332
14120
  var value = props.value,
@@ -13344,21 +14132,13 @@ var index$1 = (function (props) {
13344
14132
  getWlnOrderList(value.orderNo);
13345
14133
  } else if (type === 'WDT_SYSTEM_ORDER') {
13346
14134
  getWdtOrderList(value.orderNo);
14135
+ } else if (type === 'BS_E3_SYSTEM_ORDER') {
14136
+ getBsE3OrderList(value.orderNo);
13347
14137
  }
13348
14138
  }
13349
14139
  }, [value, type]);
13350
14140
  var columns = useMemo(function () {
13351
- var _columnsNameMap$type, _columnsNameMap$type2;
13352
- return [{
13353
- dataIndex: 'billType',
13354
- title: columnsNameMap === null || columnsNameMap === void 0 ? void 0 : (_columnsNameMap$type = columnsNameMap[type]) === null || _columnsNameMap$type === void 0 ? void 0 : _columnsNameMap$type.typeName
13355
- }, {
13356
- dataIndex: 'billNo',
13357
- title: '系统订单号'
13358
- }, {
13359
- dataIndex: 'billTag',
13360
- title: columnsNameMap === null || columnsNameMap === void 0 ? void 0 : (_columnsNameMap$type2 = columnsNameMap[type]) === null || _columnsNameMap$type2 === void 0 ? void 0 : _columnsNameMap$type2.tagName
13361
- }];
14141
+ return columnsMap[type] || [];
13362
14142
  }, [type]);
13363
14143
  var getOrderList = /*#__PURE__*/function () {
13364
14144
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
@@ -13448,51 +14228,29 @@ var index$1 = (function (props) {
13448
14228
  }();
13449
14229
  var getWdtOrderList = /*#__PURE__*/function () {
13450
14230
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(orderNo) {
13451
- var _yield$request3, success, data, trades;
13452
14231
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
13453
14232
  while (1) switch (_context3.prev = _context3.next) {
13454
14233
  case 0:
13455
- _context3.next = 2;
13456
- return extendRequest('/qy/gdfw/order/wdtOrderDetail', {
13457
- method: 'post',
13458
- data: {
13459
- billNo: orderNo
13460
- }
13461
- });
13462
- case 2:
13463
- _yield$request3 = _context3.sent;
13464
- success = _yield$request3.success;
13465
- data = _yield$request3.data;
13466
- if (success) {
13467
- trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
14234
+ wdtUtils.getWdtOrderListSingleton(orderNo).then(function (data) {
14235
+ var trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
13468
14236
  return (item.srcTid || '').split(',').includes(orderNo);
13469
- }).map(function (item) {
13470
- if (Array.isArray(item.goodDetails)) {
13471
- item.goodDetails = item.goodDetails.filter(function (good) {
13472
- return good.srcTid === orderNo;
13473
- });
13474
- }
13475
- return item;
13476
14237
  });
13477
- _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
13478
- orders: trades.map(function (item) {
13479
- return _objectSpread2(_objectSpread2({}, item), {}, {
13480
- billNo: item.tradeNo,
13481
- billType: WDT_ORDER_TYPE_MAP[item.tradeType],
13482
- billTag: item.tagName
13483
- });
13484
- }),
13485
- showOrderInfo: trades.map(function (item) {
14238
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
14239
+ orders: trades,
14240
+ showOrderInfo: trades.map(function (_ref4) {
14241
+ var billNo = _ref4.billNo,
14242
+ billType = _ref4.billType,
14243
+ billTag = _ref4.billTag;
13486
14244
  return {
13487
- billNo: item.tradeNo,
13488
- billType: WDT_ORDER_TYPE_MAP[item.tradeType],
13489
- billTag: item.tagName
14245
+ billNo: billNo,
14246
+ billType: billType,
14247
+ billTag: billTag
13490
14248
  };
13491
14249
  })
13492
14250
  }));
13493
- }
14251
+ });
13494
14252
  onceRef.current = false;
13495
- case 7:
14253
+ case 2:
13496
14254
  case "end":
13497
14255
  return _context3.stop();
13498
14256
  }
@@ -13502,6 +14260,31 @@ var index$1 = (function (props) {
13502
14260
  return _ref3.apply(this, arguments);
13503
14261
  };
13504
14262
  }();
14263
+ var getBsE3OrderList = /*#__PURE__*/function () {
14264
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(orderNo) {
14265
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
14266
+ while (1) switch (_context4.prev = _context4.next) {
14267
+ case 0:
14268
+ bsE3Utils.getBsE3OrderListSingleton(orderNo).then(function (data) {
14269
+ var trades = ((data === null || data === void 0 ? void 0 : data.orderList) || []).filter(function (item) {
14270
+ return (item.dealCode || '').split(',').includes(orderNo);
14271
+ });
14272
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
14273
+ orders: trades,
14274
+ showOrderInfo: trades
14275
+ }));
14276
+ });
14277
+ onceRef.current = false;
14278
+ case 2:
14279
+ case "end":
14280
+ return _context4.stop();
14281
+ }
14282
+ }, _callee4);
14283
+ }));
14284
+ return function getBsE3OrderList(_x4) {
14285
+ return _ref5.apply(this, arguments);
14286
+ };
14287
+ }();
13505
14288
  var rowSelection = {
13506
14289
  selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
13507
14290
  fixed: true,
@@ -13522,7 +14305,7 @@ var index$1 = (function (props) {
13522
14305
  dataSource: (value === null || value === void 0 ? void 0 : value.orders) || [],
13523
14306
  columns: columns,
13524
14307
  rowSelection: rowSelection,
13525
- rowKey: 'billNo',
14308
+ rowKey: rowKeyMap[type] || 'billNo',
13526
14309
  size: "small",
13527
14310
  pagination: false,
13528
14311
  scroll: {
@@ -13561,8 +14344,11 @@ var componentMap$1 = {
13561
14344
  type: 'wdt',
13562
14345
  key: 'wdtGoods',
13563
14346
  name: '旺店通',
14347
+ orderNo: 'srcTid',
14348
+ goodDetailOrderNo: 'srcTid',
13564
14349
  eventNameMap: {
13565
14350
  type: 'wdtType',
14351
+ updateGoodsHandle: updateWdtGoodsHandle,
13566
14352
  selectListReturn: 'wdtSelectListReturn',
13567
14353
  selectList: 'wdtSelectList',
13568
14354
  reissueSelectList: 'wdtReissueSelectList',
@@ -13577,6 +14363,30 @@ var componentMap$1 = {
13577
14363
  returnDeleteGood: 'wdtReturnDeleteGood',
13578
14364
  exchangeDeleteGood: 'wdtExchangeDeleteGood'
13579
14365
  }
14366
+ },
14367
+ 'BS_E3_GOODS': {
14368
+ type: 'e3',
14369
+ key: 'bsE3Goods',
14370
+ name: '百胜E3',
14371
+ orderNo: 'dealCode',
14372
+ goodDetailOrderNo: 'originalDealCode',
14373
+ eventNameMap: {
14374
+ type: 'bsE3Type',
14375
+ updateGoodsHandle: updateBsE3GoodsHandle,
14376
+ selectListReturn: 'bsE3SelectListReturn',
14377
+ selectList: 'bsE3SelectList',
14378
+ reissueSelectList: 'bsE3ReissueSelectList',
14379
+ reissueSelectListReturn: 'bsE3ReissueSelectListReturn',
14380
+ reissueDeleteGood: 'bsE3ReissueDeleteGood',
14381
+ changeShopCode: 'bsE3ChangeShopCode',
14382
+ reissueType: 'bsE3ReissueType',
14383
+ returnType: 'bsE3ReturnType',
14384
+ returnSelectListReturn: 'bsE3ReturnSelectListReturn',
14385
+ returnSelectList: 'bsE3ReturnSelectList',
14386
+ deleteGood: 'bsE3DeleteGood',
14387
+ returnDeleteGood: 'bsE3ReturnDeleteGood',
14388
+ exchangeDeleteGood: 'bsE3ExchangeDeleteGood'
14389
+ }
13580
14390
  }
13581
14391
  };
13582
14392
  var CommonGoods = function CommonGoods(props) {
@@ -13585,6 +14395,13 @@ var CommonGoods = function CommonGoods(props) {
13585
14395
  disabled = props.disabled,
13586
14396
  onChange = props.onChange,
13587
14397
  compType = props.type;
14398
+ console.log('value?.orders', value === null || value === void 0 ? void 0 : value.orders);
14399
+ // 合并单订单会包含","
14400
+ var showModeBtn = ((value === null || value === void 0 ? void 0 : value.orders) || []).some(function (order) {
14401
+ var _order$componentMap$c;
14402
+ return order === null || order === void 0 ? void 0 : (_order$componentMap$c = order[componentMap$1[compType].orderNo]) === null || _order$componentMap$c === void 0 ? void 0 : _order$componentMap$c.includes(',');
14403
+ });
14404
+ var getOrderFlag = useRef(false);
13588
14405
  var _useState = useState(false),
13589
14406
  _useState2 = _slicedToArray(_useState, 2),
13590
14407
  tableSelect = _useState2[0],
@@ -13592,8 +14409,36 @@ var CommonGoods = function CommonGoods(props) {
13592
14409
  var withInfo = useRef(null);
13593
14410
  var valueRef = useRef(null);
13594
14411
  useEffect(function () {
14412
+ var _value$orders;
13595
14413
  valueRef.current = value;
14414
+ if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo)) {
14415
+ getOrderFlag.current = true;
14416
+ getWdtOrderList(value === null || value === void 0 ? void 0 : value.orderNo);
14417
+ }
13596
14418
  }, [value]);
14419
+ var getWdtOrderList = /*#__PURE__*/function () {
14420
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
14421
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
14422
+ while (1) switch (_context.prev = _context.next) {
14423
+ case 0:
14424
+ wdtUtils.getWdtOrderListSingleton(orderNo).then(function (data) {
14425
+ var orders = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (trade) {
14426
+ return (value.selectIds || []).includes(trade.tradeNo);
14427
+ });
14428
+ onChange(_objectSpread2(_objectSpread2({}, value), {}, {
14429
+ orders: orders
14430
+ }));
14431
+ });
14432
+ case 1:
14433
+ case "end":
14434
+ return _context.stop();
14435
+ }
14436
+ }, _callee);
14437
+ }));
14438
+ return function getWdtOrderList(_x) {
14439
+ return _ref.apply(this, arguments);
14440
+ };
14441
+ }();
13597
14442
  useEffect(function () {
13598
14443
  pubsub.subscribe(componentMap$1[compType].eventNameMap.type, function (type, data) {
13599
14444
  if (disabled) return;
@@ -13651,7 +14496,7 @@ var CommonGoods = function CommonGoods(props) {
13651
14496
  });
13652
14497
  pubsub.subscribeOnce(componentMap$1[compType].eventNameMap.changeShopCode, function (type, data) {
13653
14498
  // console.log(data);
13654
- onChange(_objectSpread2(_objectSpread2({}, valueRef === null || valueRef === void 0 ? void 0 : valueRef.current), {}, {
14499
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, valueRef === null || valueRef === void 0 ? void 0 : valueRef.current), {}, {
13655
14500
  shopCode: data.shopCode
13656
14501
  }));
13657
14502
  });
@@ -13691,6 +14536,25 @@ var CommonGoods = function CommonGoods(props) {
13691
14536
  var changeHandle = function changeHandle(list) {
13692
14537
  onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, componentMap$1[compType].key, list)));
13693
14538
  };
14539
+ var handleModeChange = function handleModeChange(isStrict) {
14540
+ // isStrict 是否只展示当前平台订单商品
14541
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({
14542
+ isStrict: isStrict
14543
+ }, componentMap$1[compType].key, getGoodDetails({
14544
+ mode: isStrict
14545
+ }))));
14546
+ };
14547
+ var getGoodDetails = function getGoodDetails(_ref2) {
14548
+ var mode = _ref2.mode;
14549
+ var updateHandle = componentMap$1[compType].eventNameMap['updateGoodsHandle'];
14550
+ var goodDetails = updateHandle(value.orders || []);
14551
+ var orderNo = value.orderNo;
14552
+ return mode ? goodDetails.filter(function (goodItem) {
14553
+ var _componentMap$compTyp;
14554
+ return !orderNo || (goodItem === null || goodItem === void 0 ? void 0 : goodItem[(_componentMap$compTyp = componentMap$1[compType]) === null || _componentMap$compTyp === void 0 ? void 0 : _componentMap$compTyp.goodDetailOrderNo]) === orderNo;
14555
+ }) : goodDetails;
14556
+ };
14557
+ console.log('commonStatus', value, compType);
13694
14558
  return /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
13695
14559
  key: componentMap$1[compType].key
13696
14560
  }, props), {}, {
@@ -13707,7 +14571,10 @@ var CommonGoods = function CommonGoods(props) {
13707
14571
  },
13708
14572
  onChange: function onChange(val) {
13709
14573
  return changeHandle(val);
13710
- }
14574
+ },
14575
+ onModeChange: handleModeChange,
14576
+ showModeBtn: showModeBtn,
14577
+ isStrict: value === null || value === void 0 ? void 0 : value.isStrict
13711
14578
  }));
13712
14579
  };
13713
14580
 
@@ -13974,8 +14841,8 @@ var typeMap$1 = {
13974
14841
  key: 'wdtReissueGoods',
13975
14842
  name: '旺店通',
13976
14843
  typeName: 'wdtReissueType',
13977
- wdtSystemOrder: 'wdtSystemOrder',
13978
- wdtSystemOrderNo: 'wdtSystemOrderNo',
14844
+ systemOrder: 'wdtSystemOrder',
14845
+ systemOrderNo: 'wdtSystemOrderNo',
13979
14846
  reissueSelectList: 'wdtReissueSelectList',
13980
14847
  reissueSelectListReturn: 'wdtReissueSelectListReturn',
13981
14848
  reissueDeleteGood: 'wdtReissueDeleteGood',
@@ -13988,7 +14855,7 @@ var typeMap$1 = {
13988
14855
  }
13989
14856
  };
13990
14857
  var wdtReissue = function wdtReissue(props) {
13991
- var _typeMap$type7, _value$typeMap$type$t3, _typeMap$type10, _typeMap$type26, _typeMap$type27, _value$typeMap$type$w2, _typeMap$type28, _typeMap$type29, _typeMap$type30;
14858
+ var _value$wdtSystemOrder, _typeMap$type7, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s5, _typeMap$type27, _typeMap$type28, _typeMap$type29;
13992
14859
  var value = props.value,
13993
14860
  onChange = props.onChange,
13994
14861
  _props$reasonList = props.reasonList,
@@ -13996,177 +14863,148 @@ var wdtReissue = function wdtReissue(props) {
13996
14863
  disabled = props.disabled,
13997
14864
  type = props.type,
13998
14865
  other = _objectWithoutProperties(props, _excluded$g);
13999
- var valueRef = useRef({});
14000
- useEffect(function () {
14001
- var _typeMap$type, _typeMap$type4;
14002
- valueRef.current = value;
14003
- pubsub.subscribeOnce("".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type = typeMap$1[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.reissueDeleteGood), function (_, data) {
14004
- if (disabled) return;
14005
- if (value) {
14006
- var _typeMap$type2, _typeMap$type3;
14007
- var newValue = _objectSpread2({}, value);
14008
- newValue["".concat((_typeMap$type2 = typeMap$1[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.key)] = newValue === null || newValue === void 0 ? void 0 : newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type3 = typeMap$1[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.key)].filter(function (item) {
14009
- return item.sku !== data;
14010
- });
14011
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
14012
- }
14013
- });
14014
- pubsub.subscribeOnce("".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type4 = typeMap$1[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.changeShopCode), function (type, data) {
14015
- onChange(_objectSpread2(_objectSpread2({}, value), {}, {
14016
- shopCode: data.shopCode
14017
- }));
14018
- });
14019
- }, [value, disabled]);
14866
+ var showModeBtn = ((value === null || value === void 0 ? void 0 : (_value$wdtSystemOrder = value.wdtSystemOrder) === null || _value$wdtSystemOrder === void 0 ? void 0 : _value$wdtSystemOrder.orders) || []).some(function (order) {
14867
+ var _order$srcTid;
14868
+ return order === null || order === void 0 ? void 0 : (_order$srcTid = order.srcTid) === null || _order$srcTid === void 0 ? void 0 : _order$srcTid.includes(',');
14869
+ });
14870
+ var getOrderFlag = useRef(false);
14871
+ var _useState = useState(false),
14872
+ _useState2 = _slicedToArray(_useState, 2),
14873
+ isStrict = _useState2[0],
14874
+ setIsStrict = _useState2[1];
14020
14875
  useEffect(function () {
14021
- var _value$orders, _value$showOrderInfo;
14022
- if (!(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo) && (value === null || value === void 0 ? void 0 : (_value$showOrderInfo = value.showOrderInfo) === null || _value$showOrderInfo === void 0 ? void 0 : _value$showOrderInfo.length)) {
14023
- if (type === 'WDT_SYSTEM_ORDER') {
14024
- getWdtOrderList(value.orderNo);
14025
- }
14876
+ var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
14877
+ if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$1[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.systemOrder]) === null || _value$typeMap$type$s === void 0 ? void 0 : (_value$typeMap$type$s2 = _value$typeMap$type$s.orders) === null || _value$typeMap$type$s2 === void 0 ? void 0 : _value$typeMap$type$s2.length) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s3 = value[(_typeMap$type2 = typeMap$1[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.systemOrder]) === null || _value$typeMap$type$s3 === void 0 ? void 0 : _value$typeMap$type$s3.orderNo)) {
14878
+ var _value$typeMap$type$s4, _typeMap$type3;
14879
+ getOrderFlag.current = true;
14880
+ getWdtOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$1[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.systemOrder]) === null || _value$typeMap$type$s4 === void 0 ? void 0 : _value$typeMap$type$s4.orderNo);
14026
14881
  }
14027
14882
  return;
14028
14883
  }, [value]);
14029
14884
  useEffect(function () {
14030
- var _typeMap$type5;
14031
- var wdtSystemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type5 = typeMap$1[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.wdtSystemOrderNo];
14032
- if (wdtSystemOrderNo) {
14033
- var _value$typeMap$type$t, _typeMap$type6;
14034
- if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type6 = typeMap$1[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) {
14035
- getGoodItems(wdtSystemOrderNo);
14885
+ var _typeMap$type4;
14886
+ var systemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type4 = typeMap$1[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.systemOrderNo];
14887
+ if (systemOrderNo) {
14888
+ var _value$typeMap$type$t, _typeMap$type5;
14889
+ if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type5 = typeMap$1[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) {
14890
+ var _typeMap$type6;
14891
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type6 = typeMap$1[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.key, getGoodDetails({
14892
+ mode: isStrict
14893
+ }))));
14036
14894
  }
14037
14895
  }
14038
14896
  return;
14039
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type7 = typeMap$1[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.wdtSystemOrderNo]]);
14040
- useEffect(function () {
14041
- var _value$typeMap$type$t2, _typeMap$type8, _typeMap$type9;
14042
- var typeName = value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type8 = typeMap$1[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0];
14043
- var wdtSystemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type9 = typeMap$1[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.wdtSystemOrderNo];
14044
- if (['1'].includes(typeName)) {
14045
- wdtSystemOrderNo && getGoodItems(wdtSystemOrderNo);
14046
- } else if (['2'].includes(typeName)) {
14047
- var newValue = _objectSpread2({}, value);
14048
- // newValue[`${typeMap?.[type]?.key}`] = [];
14049
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
14050
- }
14051
- return;
14052
- }, [value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type10 = typeMap$1[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0]]);
14053
- var getGoodItems = function getGoodItems(wdtSystemOrderNo) {
14054
- var _value$typeMap$type$w, _typeMap$type11, _ref;
14055
- var orders = value === null || value === void 0 ? void 0 : (_value$typeMap$type$w = value[(_typeMap$type11 = typeMap$1[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.wdtSystemOrder]) === null || _value$typeMap$type$w === void 0 ? void 0 : _value$typeMap$type$w.orders;
14056
- var order = (_ref = orders || []) === null || _ref === void 0 ? void 0 : _ref.find(function (orderItem) {
14057
- return orderItem.billNo === wdtSystemOrderNo;
14058
- });
14059
- if (order) {
14060
- var _typeMap$type12, _order$goodDetails;
14061
- var newValue = _objectSpread2({}, value);
14062
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type12 = typeMap$1[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key)] = order === null || order === void 0 ? void 0 : (_order$goodDetails = order.goodDetails) === null || _order$goodDetails === void 0 ? void 0 : _order$goodDetails.map(function (item) {
14063
- var _typeMap$type13, _typeMap$type14;
14064
- item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type13 = typeMap$1[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.formatDefaultField.money)] = 0;
14065
- item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type14 = typeMap$1[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.formatDefaultField.share)] = 0;
14066
- item.canUpdateNumber = true;
14067
- return item;
14068
- });
14069
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
14070
- }
14071
- };
14897
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type7 = typeMap$1[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.systemOrderNo]]);
14072
14898
  var getWdtOrderList = /*#__PURE__*/function () {
14073
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
14074
- var _yield$request, success, data, _typeMap$type15, _typeMap$type16, orders, showOrderInfo;
14899
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
14075
14900
  return _regeneratorRuntime().wrap(function _callee$(_context) {
14076
14901
  while (1) switch (_context.prev = _context.next) {
14077
14902
  case 0:
14078
- _context.next = 2;
14079
- return extendRequest('/qy/gdfw/order/wdtOrderDetail', {
14080
- method: 'post',
14081
- data: {
14082
- billNo: orderNo
14083
- }
14084
- });
14085
- case 2:
14086
- _yield$request = _context.sent;
14087
- success = _yield$request.success;
14088
- data = _yield$request.data;
14089
- if (success) {
14090
- orders = ((data === null || data === void 0 ? void 0 : data.trades) || []).map(function (item) {
14091
- return _objectSpread2(_objectSpread2({}, item), {}, {
14092
- billNo: item.tradeNo,
14093
- billType: WDT_ORDER_TYPE_MAP[item.tradeType],
14094
- billTag: item.tagName
14095
- });
14096
- });
14097
- showOrderInfo = data === null || data === void 0 ? void 0 : data.trades.map(function (item) {
14903
+ wdtUtils.getWdtOrderListSingleton(orderNo).then(function (data) {
14904
+ var _typeMap$type8, _typeMap$type9;
14905
+ var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
14906
+ var showOrderInfo = orders.map(function (_ref2) {
14907
+ var billNo = _ref2.billNo,
14908
+ billType = _ref2.billType,
14909
+ billTag = _ref2.billTag;
14098
14910
  return {
14099
- billNo: item.tradeNo,
14100
- billType: WDT_ORDER_TYPE_MAP[item.tradeType],
14101
- billTag: item.tagName
14911
+ billNo: billNo,
14912
+ billType: billType,
14913
+ billTag: billTag
14102
14914
  };
14103
14915
  });
14104
- onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type15 = typeMap$1[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.wdtSystemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type16 = typeMap$1[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.wdtSystemOrder]), {}, {
14916
+ onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type8 = typeMap$1[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type9 = typeMap$1[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.systemOrder]), {}, {
14105
14917
  showOrderInfo: showOrderInfo,
14106
14918
  orders: orders
14107
14919
  }))));
14108
- }
14109
- case 6:
14920
+ });
14921
+ case 1:
14110
14922
  case "end":
14111
14923
  return _context.stop();
14112
14924
  }
14113
14925
  }, _callee);
14114
14926
  }));
14115
14927
  return function getWdtOrderList(_x) {
14116
- return _ref2.apply(this, arguments);
14928
+ return _ref.apply(this, arguments);
14117
14929
  };
14118
14930
  }();
14119
14931
  var changeTypeHandle = function changeTypeHandle(val) {
14120
- var _typeMap$type17, _typeMap$type18;
14932
+ var _value$typeMap$type$t2, _typeMap$type10, _typeMap$type11;
14933
+ var typeName = val === null || val === void 0 ? void 0 : val[0];
14934
+ if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type10 = typeMap$1[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) return;
14935
+ // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
14121
14936
  var newValue = _objectSpread2({}, value);
14122
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type17 = typeMap$1[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.typeName)] = val;
14123
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type18 = typeMap$1[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.key)] = [];
14937
+ newValue[(_typeMap$type11 = typeMap$1[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName] = val;
14938
+ if (typeName === '1') {
14939
+ var _typeMap$type12;
14940
+ newValue[(_typeMap$type12 = typeMap$1[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = getGoodDetails({
14941
+ mode: isStrict
14942
+ });
14943
+ } else if (typeName === '2') {
14944
+ var _typeMap$type13;
14945
+ // 切换到非原单,清空列表
14946
+ newValue[(_typeMap$type13 = typeMap$1[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = [];
14947
+ }
14124
14948
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
14125
- valueRef.current = newValue;
14126
- // if (['2'].includes(val[0])) {
14127
- // onChange?.(newValue);
14128
- // valueRef.current = newValue;
14129
- // }
14130
- // pubsub.publish(`${typeMap?.[type]?.reissueType}`, {
14131
- // val: val[0],
14132
- // goodValue: newValue,
14133
- // });
14134
14949
  };
14135
-
14950
+ var handleModeChange = function handleModeChange(mode) {
14951
+ var _value$typeMap$type$t3, _typeMap$type14, _typeMap$type15;
14952
+ var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type14 = typeMap$1[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0]) === '1';
14953
+ setIsStrict(mode);
14954
+ if (!isOriginalOrder) return;
14955
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type15 = typeMap$1[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.key, getGoodDetails({
14956
+ mode: mode
14957
+ }))));
14958
+ };
14959
+ var getGoodDetails = function getGoodDetails(_ref3) {
14960
+ var _typeMap$type16, _typeMap$type17, _order$goodDetails;
14961
+ var mode = _ref3.mode;
14962
+ var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type16 = typeMap$1[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.systemOrder];
14963
+ var systemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type17 = typeMap$1[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrderNo];
14964
+ var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
14965
+ return order.tradeNo === systemOrderNo;
14966
+ });
14967
+ var goodDetails = (order === null || order === void 0 ? void 0 : (_order$goodDetails = order.goodDetails) === null || _order$goodDetails === void 0 ? void 0 : _order$goodDetails.length) ? updateWdtGoodsHandle([order]) : [];
14968
+ var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
14969
+ return mode ? goodDetails.filter(function (goodItem) {
14970
+ return !orderNo || goodItem.srcTid === orderNo;
14971
+ }) : goodDetails;
14972
+ };
14136
14973
  var changeGoodHandle = function changeGoodHandle(val) {
14137
- var _typeMap$type19;
14974
+ var _typeMap$type18;
14138
14975
  var newValue = _objectSpread2({}, value);
14139
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type19 = typeMap$1[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = (val || []).map(function (item) {
14140
- var _typeMap$type20, _typeMap$type21;
14141
- item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type20 = typeMap$1[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.formatDefaultField.money)] = 0;
14142
- item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type21 = typeMap$1[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.formatDefaultField.share)] = 0;
14976
+ newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type18 = typeMap$1[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.key)] = (val || []).map(function (item) {
14977
+ var _typeMap$type19, _typeMap$type20;
14978
+ item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type19 = typeMap$1[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.formatDefaultField.money)] = 0;
14979
+ item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type20 = typeMap$1[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.formatDefaultField.share)] = 0;
14143
14980
  return item;
14144
14981
  });
14145
14982
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
14146
14983
  };
14147
14984
  var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
14148
- var _typeMap$type22, _value$typeMap$type$t4, _typeMap$type23;
14985
+ var _typeMap$type21, _value$typeMap$type$t4, _typeMap$type22;
14149
14986
  var newValue = _objectSpread2({}, value);
14150
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type22 = typeMap$1[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.wdtSystemOrderNo)] = val;
14151
- if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0])) {
14152
- var _typeMap$type24;
14153
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = [];
14987
+ newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type21 = typeMap$1[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo)] = val;
14988
+ if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type22 = typeMap$1[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0])) {
14989
+ var _typeMap$type23;
14990
+ newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)] = [];
14154
14991
  }
14155
14992
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
14156
14993
  };
14157
14994
  //显示选择商品按钮 原单换不显示选择商品
14158
14995
  var showChangeBtn = useMemo(function () {
14159
- var _typeMap$type25;
14160
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.wdtSystemOrderNo]);
14161
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.wdtSystemOrderNo]]);
14996
+ var _typeMap$type24;
14997
+ return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo]);
14998
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]]);
14162
14999
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
14163
- gutter: 8
15000
+ gutter: 8,
15001
+ wrap: true
14164
15002
  }, /*#__PURE__*/React.createElement(Col, {
14165
15003
  className: "gutter-row",
14166
15004
  xs: {
14167
15005
  span: 11
14168
15006
  },
14169
- md: {
15007
+ sm: {
14170
15008
  span: 6
14171
15009
  }
14172
15010
  }, /*#__PURE__*/React.createElement(Select, {
@@ -14175,12 +15013,12 @@ var wdtReissue = function wdtReissue(props) {
14175
15013
  },
14176
15014
  disabled: disabled,
14177
15015
  allowClear: false,
14178
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.wdtSystemOrderNo)],
15016
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo)],
14179
15017
  onChange: function onChange(val) {
14180
15018
  return changeSystemOrderHandle(val);
14181
15019
  },
14182
15020
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
14183
- }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$w2 = value[(_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.wdtSystemOrder]) === null || _value$typeMap$type$w2 === void 0 ? void 0 : _value$typeMap$type$w2.showOrderInfo) || []).map(function (item) {
15021
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
14184
15022
  return /*#__PURE__*/React.createElement(Select.Option, {
14185
15023
  key: item.billNo,
14186
15024
  value: item.billNo,
@@ -14191,7 +15029,7 @@ var wdtReissue = function wdtReissue(props) {
14191
15029
  xs: {
14192
15030
  span: 11
14193
15031
  },
14194
- md: {
15032
+ sm: {
14195
15033
  span: 6
14196
15034
  }
14197
15035
  }, /*#__PURE__*/React.createElement(Cascader, {
@@ -14201,7 +15039,7 @@ var wdtReissue = function wdtReissue(props) {
14201
15039
  disabled: disabled,
14202
15040
  allowClear: false,
14203
15041
  options: reasonList,
14204
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type29 = typeMap$1[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.typeName)],
15042
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.typeName)],
14205
15043
  onChange: function onChange(val) {
14206
15044
  return changeTypeHandle(val);
14207
15045
  }
@@ -14213,10 +15051,13 @@ var wdtReissue = function wdtReissue(props) {
14213
15051
  canUpdateNumber: showChangeBtn,
14214
15052
  showChangeBtn: showChangeBtn,
14215
15053
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
14216
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type30 = typeMap$1[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.key)],
15054
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type29 = typeMap$1[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)],
14217
15055
  onChange: function onChange(val) {
14218
15056
  return changeGoodHandle(val);
14219
- }
15057
+ },
15058
+ onModeChange: handleModeChange,
15059
+ showModeBtn: showModeBtn,
15060
+ isStrict: isStrict
14220
15061
  })));
14221
15062
  };
14222
15063
 
@@ -14226,7 +15067,7 @@ styleInject(css_248z$a);
14226
15067
  var TabPane$1 = Tabs.TabPane;
14227
15068
  var Option$2 = Select.Option;
14228
15069
  var Search$1 = Input.Search;
14229
- var GoodsModal$4 = function GoodsModal(props) {
15070
+ var GoodsModal$5 = function GoodsModal(props) {
14230
15071
  var onSubmit = props.onSubmit,
14231
15072
  _onCancel = props.onCancel,
14232
15073
  visible = props.visible,
@@ -14677,7 +15518,7 @@ var Goods$1 = function Goods(props, ref) {
14677
15518
  };
14678
15519
  return /*#__PURE__*/React.createElement("div", {
14679
15520
  className: "goodsBox"
14680
- }, /*#__PURE__*/React.createElement(GoodsModal$4, {
15521
+ }, /*#__PURE__*/React.createElement(GoodsModal$5, {
14681
15522
  visible: visible,
14682
15523
  onSubmit: onSubmit,
14683
15524
  type: type,
@@ -14907,7 +15748,10 @@ var msgTypeCh = {
14907
15748
  ding: '钉钉',
14908
15749
  wechat: '微信',
14909
15750
  qq: 'QQ',
14910
- qywx: '企业微信'
15751
+ qywx: '企业微信',
15752
+ YZDKH: '邮政拦截',
15753
+ YT: '圆通拦截',
15754
+ feishu: '飞书'
14911
15755
  };
14912
15756
  var MsgStatus = function MsgStatus(props) {
14913
15757
  var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;