@kmkf-fe-packages/basic-components 1.17.8-beta.3 → 1.17.8-beta.30

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, updateWdtGoodsHandle } 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({
@@ -7520,7 +7520,9 @@ var IdentifyAddress = function IdentifyAddress(props) {
7520
7520
  onChange: function onChange(e) {
7521
7521
  return changeHandle(e.target.value, 'receiverMobile');
7522
7522
  }
7523
- })), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Province, {
7523
+ })), /*#__PURE__*/React.createElement(Space, {
7524
+ wrap: true
7525
+ }, /*#__PURE__*/React.createElement(Province, {
7524
7526
  value: value.address,
7525
7527
  onChange: function onChange(val) {
7526
7528
  return changeHandle(val, 'address');
@@ -11682,9 +11684,11 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
11682
11684
  var GoodsModal$2 = /*#__PURE__*/forwardRef(GoodsModal$1);
11683
11685
 
11684
11686
  var getTableData = function getTableData(_ref, formData) {
11687
+ var _formData$brandIds;
11685
11688
  var current = _ref.current,
11686
11689
  pageSize = _ref.pageSize;
11687
11690
  var data = {
11691
+ brandIds: ((_formData$brandIds = formData.brandIds) === null || _formData$brandIds === void 0 ? void 0 : _formData$brandIds.length) ? formData.brandIds : null,
11688
11692
  skuCode: formData.skuCode || null,
11689
11693
  skuName: formData.skuName || null,
11690
11694
  goodName: formData.goodName || null,
@@ -11769,6 +11773,11 @@ var columns$1 = [{
11769
11773
  title: '商品ID',
11770
11774
  width: 200,
11771
11775
  ellipsis: true
11776
+ }, {
11777
+ dataIndex: 'brandName',
11778
+ title: '品牌名称',
11779
+ width: 200,
11780
+ ellipsis: true
11772
11781
  }, {
11773
11782
  dataIndex: 'marketPrice',
11774
11783
  title: '市场价',
@@ -11800,6 +11809,10 @@ var GoodList = function GoodList(props, ref) {
11800
11809
  _useState4 = _slicedToArray(_useState3, 2),
11801
11810
  selectIds = _useState4[0],
11802
11811
  setSelectIds = _useState4[1];
11812
+ var _useState5 = useState([]),
11813
+ _useState6 = _slicedToArray(_useState5, 2),
11814
+ brandList = _useState6[0],
11815
+ setBrandList = _useState6[1];
11803
11816
  useImperativeHandle(ref, function () {
11804
11817
  return {
11805
11818
  getSelectGoodList: function getSelectGoodList() {
@@ -11819,6 +11832,38 @@ var GoodList = function GoodList(props, ref) {
11819
11832
  params = _useAntdTable.params;
11820
11833
  var submit = search.submit,
11821
11834
  reset = search.reset;
11835
+ var setGoodBrandList = function setGoodBrandList() {
11836
+ var list = [];
11837
+ var pageNo = 0;
11838
+ var pageSize = 100;
11839
+ var getMore = function getMore() {
11840
+ extendRequest('/qy/gdfw/wdt/erp/goodBrand/list', {
11841
+ method: 'post',
11842
+ data: {
11843
+ pageSize: pageSize,
11844
+ pageNo: pageNo
11845
+ }
11846
+ }).then(function (res) {
11847
+ var _res$data2;
11848
+ if (res.success && (res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.detailList)) {
11849
+ var _res$data3, _res$data4;
11850
+ 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) || []));
11851
+ if ((res === null || res === void 0 ? void 0 : (_res$data4 = res.data) === null || _res$data4 === void 0 ? void 0 : _res$data4.detailList.length) === pageSize) {
11852
+ pageNo += 1;
11853
+ getMore();
11854
+ } else {
11855
+ setBrandList(list);
11856
+ }
11857
+ } else {
11858
+ reject(res);
11859
+ }
11860
+ }).catch(console.error);
11861
+ };
11862
+ getMore();
11863
+ };
11864
+ React.useEffect(function () {
11865
+ setGoodBrandList();
11866
+ }, []);
11822
11867
  var advanceSearchForm = /*#__PURE__*/React.createElement(Form, {
11823
11868
  layout: "inline",
11824
11869
  form: form
@@ -11866,6 +11911,29 @@ var GoodList = function GoodList(props, ref) {
11866
11911
  style: {
11867
11912
  width: 150
11868
11913
  }
11914
+ })), /*#__PURE__*/React.createElement(Form.Item, {
11915
+ name: "brandIds",
11916
+ style: {
11917
+ marginBottom: '12px'
11918
+ }
11919
+ }, /*#__PURE__*/React.createElement(Select, {
11920
+ mode: "multiple",
11921
+ showSearch: true,
11922
+ allowClear: true,
11923
+ style: {
11924
+ width: 150
11925
+ },
11926
+ placeholder: "\u54C1\u724C",
11927
+ options: brandList.filter(function (item) {
11928
+ return !item.isDisabled;
11929
+ }).map(function (_ref2) {
11930
+ var value = _ref2.brandId,
11931
+ label = _ref2.brandName;
11932
+ return {
11933
+ value: value,
11934
+ label: label
11935
+ };
11936
+ })
11869
11937
  })), /*#__PURE__*/React.createElement(Form.Item, {
11870
11938
  style: {
11871
11939
  marginBottom: '12px'
@@ -12022,115 +12090,516 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
12022
12090
  };
12023
12091
  var WdtGoodsModal = /*#__PURE__*/forwardRef(GoodsModal$3);
12024
12092
 
12025
- // interface GoodsItem {
12026
- // title: string;
12027
- // pic: string;
12028
- // platform: string;
12029
- // skuId: string;
12030
- // styleId: string;
12031
- // }
12032
- var GoodItem$1 = function GoodItem(props) {
12033
- var _props$value = props.value,
12034
- value = _props$value === void 0 ? [] : _props$value,
12035
- type = props.type,
12036
- onChange = props.onChange,
12037
- disabled = props.disabled,
12038
- _props$showHeader = props.showHeader,
12039
- showHeader = _props$showHeader === void 0 ? [] : _props$showHeader,
12040
- width = props.width,
12041
- _props$shopList = props.shopList,
12042
- shopList = _props$shopList === void 0 ? [] : _props$shopList,
12043
- _props$shopId = props.shopId,
12044
- shopId = _props$shopId === void 0 ? '' : _props$shopId,
12045
- _props$maxLength = props.maxLength,
12046
- maxLength = _props$maxLength === void 0 ? 20 : _props$maxLength,
12047
- _props$showChangeBtn = props.showChangeBtn,
12048
- showChangeBtn = _props$showChangeBtn === void 0 ? true : _props$showChangeBtn,
12049
- _props$tableSelect = props.tableSelect,
12050
- tableSelect = _props$tableSelect === void 0 ? false : _props$tableSelect,
12051
- _props$selectType = props.selectType,
12052
- selectType = _props$selectType === void 0 ? '' : _props$selectType,
12053
- _props$otherOperation = props.otherOperations,
12054
- otherOperations = _props$otherOperation === void 0 ? null : _props$otherOperation,
12055
- _props$canUpdateNumbe = props.canUpdateNumber,
12056
- canUpdateNumber = _props$canUpdateNumbe === void 0 ? false : _props$canUpdateNumbe,
12057
- shopCode = props.shopCode,
12058
- _props$companyKey = props.companyKey,
12059
- companyKey = _props$companyKey === void 0 ? '' : _props$companyKey,
12060
- onSelect = props.onSelect,
12061
- onDelete = props.onDelete;
12062
- var refModal = useRef();
12063
- var handleDelete = function handleDelete(record, index) {
12064
- onDelete === null || onDelete === void 0 ? void 0 : onDelete(value[index]);
12065
- var newList = _toConsumableArray(value).filter(function (item, i) {
12066
- return index !== i;
12067
- });
12068
- onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(newList));
12093
+ var getTableData$1 = function getTableData(_ref, formData) {
12094
+ var current = _ref.current,
12095
+ pageSize = _ref.pageSize;
12096
+ var data = {
12097
+ goodsSn: formData.goodsSn || null,
12098
+ goodsName: formData.goodsName || null,
12099
+ sku: formData.sku || null,
12100
+ skuId: formData.skuId || null
12069
12101
  };
12102
+ return extendRequest('/qy/gdfw/product/product/page', {
12103
+ method: 'post',
12104
+ data: _objectSpread2({
12105
+ pageSize: pageSize,
12106
+ pageNo: current,
12107
+ platform: 'WDT_ERP'
12108
+ }, data)
12109
+ }).then(function (res) {
12110
+ var _res$data = res.data,
12111
+ _res$data$productSkuL = _res$data.productSkuList,
12112
+ productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
12113
+ _res$data$total = _res$data.total,
12114
+ total = _res$data$total === void 0 ? 0 : _res$data$total;
12115
+ var newProducts = productSkuList.map(function (item, index) {
12116
+ return _objectSpread2(_objectSpread2({}, item), {}, {
12117
+ index: index + 1
12118
+ });
12119
+ });
12120
+ return {
12121
+ total: total,
12122
+ list: newProducts
12123
+ };
12124
+ });
12125
+ };
12126
+ var columns$2 = [{
12127
+ dataIndex: 'index',
12128
+ title: 'NO',
12129
+ render: function render(val, record, index) {
12130
+ return /*#__PURE__*/React.createElement("div", {
12131
+ style: {
12132
+ width: 25
12133
+ }
12134
+ }, index + 1);
12135
+ },
12136
+ width: 100
12137
+ }, {
12138
+ dataIndex: 'sku',
12139
+ title: "SKU",
12140
+ ellipsis: true,
12141
+ width: 70
12142
+ }, {
12143
+ dataIndex: 'skuId',
12144
+ title: "SKU ID",
12145
+ ellipsis: true,
12146
+ width: 70
12147
+ }, {
12148
+ dataIndex: 'goodsName',
12149
+ title: "\u5546\u54C1\u540D\u79F0",
12150
+ ellipsis: true,
12151
+ width: 70
12152
+ }, {
12153
+ dataIndex: 'goodsSname',
12154
+ title: "\u5546\u54C1\u7B80\u79F0",
12155
+ ellipsis: true,
12156
+ width: 70
12157
+ }, {
12158
+ dataIndex: 'picPath',
12159
+ title: "\u5546\u54C1\u56FE\u7247",
12160
+ ellipsis: true,
12161
+ width: 100,
12162
+ render: function render(picUrl) {
12163
+ return /*#__PURE__*/React.createElement("img", {
12164
+ style: {
12165
+ width: '40px',
12166
+ height: '40px',
12167
+ objectFit: 'contain'
12168
+ },
12169
+ src: picUrl
12170
+ });
12171
+ }
12172
+ }, {
12173
+ dataIndex: 'goodsSn',
12174
+ title: "\u8D27\u53F7",
12175
+ ellipsis: true,
12176
+ width: 70
12177
+ }, {
12178
+ dataIndex: 'goodsId',
12179
+ title: "\u8D27\u53F7ID",
12180
+ ellipsis: true,
12181
+ width: 70
12182
+ }, {
12183
+ dataIndex: 'colorName',
12184
+ title: "\u989C\u8272\u540D\u79F0",
12185
+ ellipsis: true,
12186
+ width: 70
12187
+ }, {
12188
+ dataIndex: 'colorCode',
12189
+ title: "\u989C\u8272\u4EE3\u7801",
12190
+ ellipsis: true,
12191
+ width: 70
12192
+ }, {
12193
+ dataIndex: 'sizeName',
12194
+ title: "\u5C3A\u7801\u540D\u79F0",
12195
+ ellipsis: true,
12196
+ width: 70
12197
+ }, {
12198
+ dataIndex: 'sizeCode',
12199
+ title: "\u5C3A\u7801\u4EE3\u7801",
12200
+ ellipsis: true,
12201
+ width: 70
12202
+ }, {
12203
+ dataIndex: 'brandName',
12204
+ title: "\u54C1\u724C\u540D\u79F0",
12205
+ ellipsis: true,
12206
+ width: 70
12207
+ }, {
12208
+ dataIndex: 'goodsNumber',
12209
+ title: "\u5546\u54C1\u6570\u91CF",
12210
+ ellipsis: true,
12211
+ width: 70
12212
+ }, {
12213
+ dataIndex: 'goodsPrice',
12214
+ title: "\u5546\u54C1\u5355\u4EF7",
12215
+ ellipsis: true,
12216
+ width: 70
12217
+ }, {
12218
+ dataIndex: 'shopPrice',
12219
+ title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
12220
+ ellipsis: true,
12221
+ width: 70
12222
+ }, {
12223
+ dataIndex: 'sharePrice',
12224
+ title: "\u5206\u644A\u4EF7",
12225
+ ellipsis: true,
12226
+ width: 70
12227
+ }, {
12228
+ dataIndex: 'sharePayment',
12229
+ title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
12230
+ ellipsis: true,
12231
+ width: 70
12232
+ }, {
12233
+ dataIndex: 'payment',
12234
+ title: "\u5B9E\u4ED8\u91D1\u989D",
12235
+ ellipsis: true,
12236
+ width: 70
12237
+ }, {
12238
+ dataIndex: 'tcSku',
12239
+ title: "\u5957\u9910SKU",
12240
+ ellipsis: true,
12241
+ width: 70
12242
+ }, {
12243
+ dataIndex: 'tcGoodsNumber',
12244
+ title: "\u5957\u9910\u5957\u6570",
12245
+ ellipsis: true,
12246
+ width: 70
12247
+ }, {
12248
+ dataIndex: 'taocanSingleSl',
12249
+ title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
12250
+ ellipsis: true,
12251
+ width: 70
12252
+ }, {
12253
+ dataIndex: 'isGift',
12254
+ title: "\u662F\u5426\u8D60\u54C1",
12255
+ ellipsis: true,
12256
+ width: 70
12257
+ }];
12258
+ var GoodList$1 = function GoodList(props, ref) {
12070
12259
  var _useState = useState([]),
12071
12260
  _useState2 = _slicedToArray(_useState, 2),
12072
- selectedRowKeys = _useState2[0],
12073
- setSelectedRowKeys = _useState2[1];
12074
- useEffect(function () {
12075
- setSelectedRowKeys([]);
12076
- }, [tableSelect, selectType]);
12077
- var updateHandle = function updateHandle(val, index, columnType) {
12078
- if (value === null || value === void 0 ? void 0 : value.length) {
12079
- value[index][columnType] = val;
12080
- if (type === 'WDT_RETURN_GOODS') {
12081
- if (['sharePrice', 'num'].includes(columnType)) {
12082
- var totalMoney = null;
12083
- if (columnType === 'num') {
12084
- totalMoney = new BigNumber(value[index][columnType]).multipliedBy(new BigNumber(value[index].sharePrice));
12085
- } else {
12086
- totalMoney = new BigNumber(value[index][columnType]).multipliedBy(new BigNumber(value[index].num));
12087
- }
12088
- if (totalMoney !== null) {
12089
- value[index]['returnPrice'] = totalMoney.toString();
12090
- }
12091
- }
12092
- } else if (type === 'WDT_EXCHANGE_GOODS') {
12093
- if (['price', 'num'].includes(columnType)) {
12094
- var _totalMoney = null;
12095
- if (columnType === 'num') {
12096
- _totalMoney = new BigNumber(value[index][columnType]).multipliedBy(new BigNumber(value[index].price));
12097
- } else {
12098
- _totalMoney = new BigNumber(value[index][columnType]).multipliedBy(new BigNumber(value[index].num));
12099
- }
12100
- if (_totalMoney !== null) {
12101
- value[index]['exchangePrice'] = _totalMoney.toString();
12102
- }
12103
- }
12261
+ selectList = _useState2[0],
12262
+ setSelect = _useState2[1];
12263
+ var _useState3 = useState([]),
12264
+ _useState4 = _slicedToArray(_useState3, 2),
12265
+ selectIds = _useState4[0],
12266
+ setSelectIds = _useState4[1];
12267
+ useImperativeHandle(ref, function () {
12268
+ return {
12269
+ getSelectGoodList: function getSelectGoodList() {
12270
+ return selectList;
12104
12271
  }
12105
- onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(value));
12272
+ };
12273
+ });
12274
+ var _Form$useForm = Form.useForm(),
12275
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
12276
+ form = _Form$useForm2[0];
12277
+ var _useAntdTable = useAntdTable(getTableData$1, {
12278
+ defaultPageSize: 10,
12279
+ form: form
12280
+ }),
12281
+ tableProps = _useAntdTable.tableProps,
12282
+ search = _useAntdTable.search,
12283
+ params = _useAntdTable.params;
12284
+ var submit = search.submit,
12285
+ reset = search.reset;
12286
+ var advanceSearchForm = /*#__PURE__*/React.createElement(Form, {
12287
+ layout: "inline",
12288
+ form: form
12289
+ }, /*#__PURE__*/React.createElement(Form.Item, {
12290
+ name: "goodsSn",
12291
+ style: {
12292
+ marginBottom: '12px'
12106
12293
  }
12107
- };
12108
- var COLUMNS_MAP = function COLUMNS_MAP() {
12109
- var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
12110
- return function (type) {
12111
- var columns = [];
12112
- switch (type) {
12113
- case 'WDT_REISSUE_GOODS':
12114
- case 'WDT_GOODS':
12115
- columns = [{
12116
- dataIndex: 'goodId',
12117
- title: "\u5546\u54C1ID",
12118
- align: 'center',
12119
- ellipsis: true,
12120
- width: 70
12121
- }, {
12122
- dataIndex: 'goodNo',
12123
- title: "\u5546\u54C1\u7F16\u7801",
12124
- align: 'center',
12125
- ellipsis: true,
12126
- width: 180
12127
- }, {
12128
- dataIndex: 'goodName',
12129
- title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
12130
- align: 'center',
12131
- ellipsis: true,
12132
- width: 250
12133
- }, {
12294
+ }, /*#__PURE__*/React.createElement(Input, {
12295
+ placeholder: "\u5546\u54C1\u8D27\u53F7",
12296
+ allowClear: true,
12297
+ style: {
12298
+ width: 150
12299
+ }
12300
+ })), /*#__PURE__*/React.createElement(Form.Item, {
12301
+ name: "goodsName",
12302
+ style: {
12303
+ marginBottom: '12px'
12304
+ }
12305
+ }, /*#__PURE__*/React.createElement(Input, {
12306
+ placeholder: "\u5546\u54C1\u540D\u79F0",
12307
+ allowClear: true,
12308
+ style: {
12309
+ width: 150
12310
+ }
12311
+ })), /*#__PURE__*/React.createElement(Form.Item, {
12312
+ name: "sku",
12313
+ style: {
12314
+ marginBottom: '12px'
12315
+ }
12316
+ }, /*#__PURE__*/React.createElement(Input, {
12317
+ placeholder: "SKU",
12318
+ allowClear: true,
12319
+ style: {
12320
+ width: 150
12321
+ }
12322
+ })), /*#__PURE__*/React.createElement(Form.Item, {
12323
+ name: "skuId",
12324
+ style: {
12325
+ marginBottom: '12px'
12326
+ }
12327
+ }, /*#__PURE__*/React.createElement(Input, {
12328
+ placeholder: "SKU ID",
12329
+ allowClear: true,
12330
+ style: {
12331
+ width: 150
12332
+ }
12333
+ })), /*#__PURE__*/React.createElement(Form.Item, {
12334
+ style: {
12335
+ marginBottom: '12px'
12336
+ }
12337
+ }, /*#__PURE__*/React.createElement(Button, {
12338
+ type: "primary",
12339
+ style: {
12340
+ marginRight: '8px'
12341
+ },
12342
+ onClick: submit
12343
+ }, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
12344
+ onClick: reset
12345
+ }, "\u91CD\u7F6E")));
12346
+ var rowSelection = {
12347
+ selectedRowKeys: selectIds,
12348
+ fixed: true,
12349
+ onSelect: function onSelect(record, selected) {
12350
+ if (selected) {
12351
+ setSelectIds([].concat(_toConsumableArray(selectIds), [record.specNo]));
12352
+ setSelect([].concat(_toConsumableArray(selectList), [record]));
12353
+ } else {
12354
+ setSelectIds(selectIds.filter(function (t) {
12355
+ return t !== record.specNo;
12356
+ }));
12357
+ setSelect(selectList.filter(function (t) {
12358
+ return t.specNo !== record.specNo;
12359
+ }));
12360
+ }
12361
+ },
12362
+ onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
12363
+ if (selected) {
12364
+ setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
12365
+ return t.specNo;
12366
+ }))));
12367
+ setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
12368
+ } else {
12369
+ setSelectIds(difference(selectIds, changeRows.map(function (t) {
12370
+ return t.specNo;
12371
+ })));
12372
+ var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
12373
+ return arrVal.specNo !== othVal.specNo;
12374
+ });
12375
+ setSelect(list);
12376
+ }
12377
+ }
12378
+ };
12379
+ var showTable = function showTable() {
12380
+ var handleDelete = function handleDelete(record) {
12381
+ setSelectIds(selectIds.filter(function (t) {
12382
+ return t !== record.specNo;
12383
+ }));
12384
+ setSelect(selectList.filter(function (t) {
12385
+ return t.specNo !== record.specNo;
12386
+ }));
12387
+ };
12388
+ var showColumns = [{
12389
+ dataIndex: '',
12390
+ title: "\u64CD\u4F5C",
12391
+ ellipsis: true,
12392
+ width: 100,
12393
+ render: function render(val, record) {
12394
+ return /*#__PURE__*/React.createElement(Button, {
12395
+ type: "link",
12396
+ onClick: function onClick() {
12397
+ return handleDelete(record);
12398
+ }
12399
+ }, "\u5220\u9664");
12400
+ }
12401
+ }].concat(takeRight(columns$2, columns$2.length - 1));
12402
+ return selectList.length ? /*#__PURE__*/React.createElement("div", {
12403
+ style: {
12404
+ width: '100%',
12405
+ maxWidth: '387px'
12406
+ }
12407
+ }, /*#__PURE__*/React.createElement(Table, {
12408
+ columns: showColumns,
12409
+ rowKey: 'specNo',
12410
+ dataSource: selectList,
12411
+ scroll: {
12412
+ x: '100%',
12413
+ y: 250
12414
+ },
12415
+ pagination: {
12416
+ size: 'small',
12417
+ total: selectIds.length,
12418
+ pageSize: 10,
12419
+ showSizeChanger: false
12420
+ }
12421
+ })) : null;
12422
+ };
12423
+ return /*#__PURE__*/React.createElement(React.Fragment, null, advanceSearchForm, /*#__PURE__*/React.createElement("div", {
12424
+ style: {
12425
+ marginTop: '4px'
12426
+ }
12427
+ }, /*#__PURE__*/React.createElement(Table, _objectSpread2({
12428
+ rowSelection: rowSelection,
12429
+ rowKey: "goodsId",
12430
+ columns: columns$2,
12431
+ scroll: {
12432
+ x: '100%',
12433
+ y: 250
12434
+ }
12435
+ }, tableProps))), /*#__PURE__*/React.createElement(Popover, {
12436
+ getPopupContainer: function getPopupContainer(triggerNode) {
12437
+ return triggerNode.parentElement;
12438
+ },
12439
+ content: showTable(),
12440
+ title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
12441
+ }, /*#__PURE__*/React.createElement(Button, {
12442
+ danger: true,
12443
+ type: "text"
12444
+ }, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
12445
+ };
12446
+ var BsE3GoodList = /*#__PURE__*/forwardRef(GoodList$1);
12447
+
12448
+ var GoodsModal$4 = function GoodsModal(props, ref) {
12449
+ useImperativeHandle(ref, function () {
12450
+ return {
12451
+ open: function open() {
12452
+ setVisible(true);
12453
+ }
12454
+ };
12455
+ });
12456
+ var onSubmit = props.onSubmit,
12457
+ width = props.width;
12458
+ var _useState = useState(false),
12459
+ _useState2 = _slicedToArray(_useState, 2),
12460
+ visible = _useState2[0],
12461
+ setVisible = _useState2[1];
12462
+ var bsE3GoodListRef = useRef(null);
12463
+ var _onCancel = function onCancel() {
12464
+ setVisible(false);
12465
+ };
12466
+ var onOk = function onOk() {
12467
+ var _bsE3GoodListRef$curr;
12468
+ var selectedList = ((_bsE3GoodListRef$curr = bsE3GoodListRef.current) === null || _bsE3GoodListRef$curr === void 0 ? void 0 : _bsE3GoodListRef$curr.getSelectGoodList()) || [];
12469
+ onSubmit(selectedList);
12470
+ _onCancel();
12471
+ };
12472
+ return /*#__PURE__*/React.createElement(React.Fragment, null, visible && /*#__PURE__*/React.createElement(Modal, {
12473
+ title: '选择商品',
12474
+ okText: '确认',
12475
+ cancelText: '取消',
12476
+ visible: visible,
12477
+ width: width || 850,
12478
+ onCancel: function onCancel() {
12479
+ _onCancel();
12480
+ },
12481
+ onOk: onOk,
12482
+ wrapClassName: "goodModal"
12483
+ }, /*#__PURE__*/React.createElement(BsE3GoodList, {
12484
+ ref: bsE3GoodListRef
12485
+ })));
12486
+ };
12487
+ var BsE3GoodsModal = /*#__PURE__*/forwardRef(GoodsModal$4);
12488
+
12489
+ // interface GoodsItem {
12490
+ // title: string;
12491
+ // pic: string;
12492
+ // platform: string;
12493
+ // skuId: string;
12494
+ // styleId: string;
12495
+ // }
12496
+ var GoodItem$1 = function GoodItem(props) {
12497
+ var _props$value = props.value,
12498
+ value = _props$value === void 0 ? [] : _props$value,
12499
+ type = props.type,
12500
+ onChange = props.onChange,
12501
+ disabled = props.disabled,
12502
+ _props$showHeader = props.showHeader,
12503
+ showHeader = _props$showHeader === void 0 ? [] : _props$showHeader,
12504
+ width = props.width,
12505
+ _props$shopList = props.shopList,
12506
+ shopList = _props$shopList === void 0 ? [] : _props$shopList,
12507
+ _props$shopId = props.shopId,
12508
+ shopId = _props$shopId === void 0 ? '' : _props$shopId,
12509
+ _props$maxLength = props.maxLength,
12510
+ maxLength = _props$maxLength === void 0 ? 20 : _props$maxLength,
12511
+ _props$showChangeBtn = props.showChangeBtn,
12512
+ showChangeBtn = _props$showChangeBtn === void 0 ? true : _props$showChangeBtn,
12513
+ _props$showModeBtn = props.showModeBtn,
12514
+ showModeBtn = _props$showModeBtn === void 0 ? false : _props$showModeBtn,
12515
+ _props$isStrict = props.isStrict,
12516
+ isStrict = _props$isStrict === void 0 ? false : _props$isStrict,
12517
+ _props$tableSelect = props.tableSelect,
12518
+ tableSelect = _props$tableSelect === void 0 ? false : _props$tableSelect,
12519
+ _props$selectType = props.selectType,
12520
+ selectType = _props$selectType === void 0 ? '' : _props$selectType,
12521
+ _props$otherOperation = props.otherOperations,
12522
+ otherOperations = _props$otherOperation === void 0 ? null : _props$otherOperation,
12523
+ _props$canUpdateNumbe = props.canUpdateNumber,
12524
+ canUpdateNumber = _props$canUpdateNumbe === void 0 ? false : _props$canUpdateNumbe,
12525
+ shopCode = props.shopCode,
12526
+ _props$companyKey = props.companyKey,
12527
+ companyKey = _props$companyKey === void 0 ? '' : _props$companyKey,
12528
+ onSelect = props.onSelect,
12529
+ onDelete = props.onDelete,
12530
+ onModeChange = props.onModeChange;
12531
+ var refModal = useRef();
12532
+ var handleDelete = function handleDelete(record, index) {
12533
+ onDelete === null || onDelete === void 0 ? void 0 : onDelete(value[index]);
12534
+ var newList = _toConsumableArray(value).filter(function (item, i) {
12535
+ return index !== i;
12536
+ });
12537
+ onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(newList));
12538
+ };
12539
+ var _useState = useState([]),
12540
+ _useState2 = _slicedToArray(_useState, 2),
12541
+ selectedRowKeys = _useState2[0],
12542
+ setSelectedRowKeys = _useState2[1];
12543
+ useEffect(function () {
12544
+ setSelectedRowKeys([]);
12545
+ }, [tableSelect, selectType]);
12546
+ var updateHandle = function updateHandle(val, index, columnType) {
12547
+ if (value === null || value === void 0 ? void 0 : value.length) {
12548
+ value[index][columnType] = val;
12549
+ if (type === 'WDT_RETURN_GOODS') {
12550
+ if (['sharePrice', 'num'].includes(columnType)) {
12551
+ var totalMoney = null;
12552
+ if (columnType === 'num') {
12553
+ totalMoney = new BigNumber(value[index][columnType]).multipliedBy(new BigNumber(value[index].sharePrice));
12554
+ } else {
12555
+ totalMoney = new BigNumber(value[index][columnType]).multipliedBy(new BigNumber(value[index].num));
12556
+ }
12557
+ if (totalMoney !== null) {
12558
+ value[index]['returnPrice'] = totalMoney.toString();
12559
+ }
12560
+ }
12561
+ } else if (type === 'WDT_EXCHANGE_GOODS') {
12562
+ if (['price', 'num'].includes(columnType)) {
12563
+ var _totalMoney = null;
12564
+ if (columnType === 'num') {
12565
+ _totalMoney = new BigNumber(value[index][columnType]).multipliedBy(new BigNumber(value[index].price));
12566
+ } else {
12567
+ _totalMoney = new BigNumber(value[index][columnType]).multipliedBy(new BigNumber(value[index].num));
12568
+ }
12569
+ if (_totalMoney !== null) {
12570
+ value[index]['exchangePrice'] = _totalMoney.toString();
12571
+ }
12572
+ }
12573
+ }
12574
+ onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(value));
12575
+ }
12576
+ };
12577
+ var COLUMNS_MAP = function COLUMNS_MAP() {
12578
+ var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
12579
+ return function (type) {
12580
+ var columns = [];
12581
+ switch (type) {
12582
+ case 'WDT_REISSUE_GOODS':
12583
+ case 'WDT_GOODS':
12584
+ columns = [{
12585
+ dataIndex: 'goodId',
12586
+ title: "\u5546\u54C1ID",
12587
+ align: 'center',
12588
+ ellipsis: true,
12589
+ width: 70
12590
+ }, {
12591
+ dataIndex: 'goodNo',
12592
+ title: "\u5546\u54C1\u7F16\u7801",
12593
+ align: 'center',
12594
+ ellipsis: true,
12595
+ width: 180
12596
+ }, {
12597
+ dataIndex: 'goodName',
12598
+ title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
12599
+ align: 'center',
12600
+ ellipsis: true,
12601
+ width: 250
12602
+ }, {
12134
12603
  dataIndex: 'specId',
12135
12604
  title: "".concat(text, "SKUID"),
12136
12605
  align: 'center',
@@ -12353,111 +12822,248 @@ var GoodItem$1 = function GoodItem(props) {
12353
12822
  title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
12354
12823
  align: 'center',
12355
12824
  ellipsis: true,
12356
- width: 250
12825
+ width: 250
12826
+ }, {
12827
+ dataIndex: 'specId',
12828
+ title: "".concat(text, "SKUID"),
12829
+ align: 'center',
12830
+ ellipsis: true,
12831
+ width: 100
12832
+ }, {
12833
+ dataIndex: 'specNo',
12834
+ title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
12835
+ align: 'center',
12836
+ ellipsis: true,
12837
+ width: 180
12838
+ }, {
12839
+ dataIndex: 'specName',
12840
+ title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
12841
+ align: 'center',
12842
+ ellipsis: true,
12843
+ width: 250
12844
+ }, {
12845
+ dataIndex: 'num',
12846
+ title: "".concat(text, "\u6362\u51FA\u6570\u91CF"),
12847
+ align: 'center',
12848
+ ellipsis: true,
12849
+ width: 100,
12850
+ render: function render(val, record, index) {
12851
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12852
+ style: {
12853
+ width: 70
12854
+ },
12855
+ value: val,
12856
+ min: 1,
12857
+ precision: 0,
12858
+ onChange: function onChange(num) {
12859
+ return updateHandle(num, index, 'num');
12860
+ }
12861
+ }) : /*#__PURE__*/React.createElement("span", null, val);
12862
+ }
12863
+ }, {
12864
+ dataIndex: 'price',
12865
+ title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
12866
+ align: 'center',
12867
+ ellipsis: true,
12868
+ width: 100,
12869
+ render: function render(val, record, index) {
12870
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12871
+ style: {
12872
+ width: 70
12873
+ },
12874
+ value: val,
12875
+ min: 0,
12876
+ onChange: function onChange(value) {
12877
+ return updateHandle(value, index, 'price');
12878
+ }
12879
+ }) : /*#__PURE__*/React.createElement("span", null, val);
12880
+ }
12881
+ }, {
12882
+ dataIndex: 'exchangePrice',
12883
+ title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
12884
+ align: 'center',
12885
+ ellipsis: true,
12886
+ width: 100
12887
+ }, {
12888
+ dataIndex: 'giftType',
12889
+ title: "\u8D60\u54C1\u65B9\u5F0F",
12890
+ align: 'center',
12891
+ ellipsis: true,
12892
+ width: 100,
12893
+ render: function render(val) {
12894
+ var giftTypeMap = {
12895
+ 0: '非赠品',
12896
+ 1: '自动赠送',
12897
+ 2: '手工赠送',
12898
+ 3: '回购自动送赠品',
12899
+ 4: '前N有礼送赠品',
12900
+ 6: '天猫优仓赠品',
12901
+ 7: '淘宝CRM会员送赠'
12902
+ };
12903
+ return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
12904
+ }
12905
+ }, {
12906
+ dataIndex: 'type',
12907
+ title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
12908
+ align: 'center',
12909
+ ellipsis: true,
12910
+ width: 100,
12911
+ render: function render(val, record, index) {
12912
+ var options = [{
12913
+ label: '单品',
12914
+ value: '1'
12915
+ }, {
12916
+ label: '组合装',
12917
+ value: '2'
12918
+ }];
12919
+ return !disabled ? /*#__PURE__*/React.createElement(Select, {
12920
+ style: {
12921
+ width: 70
12922
+ },
12923
+ options: options,
12924
+ value: val,
12925
+ onChange: function onChange(value) {
12926
+ return updateHandle(value, index, 'type');
12927
+ }
12928
+ }) : /*#__PURE__*/React.createElement("span", null, val);
12929
+ }
12930
+ }];
12931
+ }
12932
+ break;
12933
+ case 'BS_E3_GOODS':
12934
+ {
12935
+ columns = [{
12936
+ dataIndex: 'sku',
12937
+ title: "SKU",
12938
+ align: 'center',
12939
+ ellipsis: true,
12940
+ width: 70
12941
+ }, {
12942
+ dataIndex: 'skuId',
12943
+ title: "SKU ID",
12944
+ align: 'center',
12945
+ ellipsis: true,
12946
+ width: 70
12947
+ }, {
12948
+ dataIndex: 'goodsName',
12949
+ title: "\u5546\u54C1\u540D\u79F0",
12950
+ align: 'center',
12951
+ ellipsis: true,
12952
+ width: 70
12953
+ }, {
12954
+ dataIndex: 'goodsSname',
12955
+ title: "\u5546\u54C1\u7B80\u79F0",
12956
+ align: 'center',
12957
+ ellipsis: true,
12958
+ width: 70
12959
+ }, {
12960
+ dataIndex: 'picPath',
12961
+ title: "\u5546\u54C1\u56FE\u7247",
12962
+ align: 'center',
12963
+ ellipsis: true,
12964
+ width: 70
12965
+ }, {
12966
+ dataIndex: 'goodsSn',
12967
+ title: "\u8D27\u53F7",
12968
+ align: 'center',
12969
+ ellipsis: true,
12970
+ width: 70
12971
+ }, {
12972
+ dataIndex: 'goodsId',
12973
+ title: "\u8D27\u53F7ID",
12974
+ align: 'center',
12975
+ ellipsis: true,
12976
+ width: 70
12977
+ }, {
12978
+ dataIndex: 'colorName',
12979
+ title: "\u989C\u8272\u540D\u79F0",
12980
+ align: 'center',
12981
+ ellipsis: true,
12982
+ width: 70
12983
+ }, {
12984
+ dataIndex: 'colorCode',
12985
+ title: "\u989C\u8272\u4EE3\u7801",
12986
+ align: 'center',
12987
+ ellipsis: true,
12988
+ width: 70
12989
+ }, {
12990
+ dataIndex: 'sizeName',
12991
+ title: "\u5C3A\u7801\u540D\u79F0",
12992
+ align: 'center',
12993
+ ellipsis: true,
12994
+ width: 70
12995
+ }, {
12996
+ dataIndex: 'sizeCode',
12997
+ title: "\u5C3A\u7801\u4EE3\u7801",
12998
+ align: 'center',
12999
+ ellipsis: true,
13000
+ width: 70
13001
+ }, {
13002
+ dataIndex: 'brandName',
13003
+ title: "\u54C1\u724C\u540D\u79F0",
13004
+ align: 'center',
13005
+ ellipsis: true,
13006
+ width: 70
13007
+ }, {
13008
+ dataIndex: 'goodsNumber',
13009
+ title: "\u5546\u54C1\u6570\u91CF",
13010
+ align: 'center',
13011
+ ellipsis: true,
13012
+ width: 70
13013
+ }, {
13014
+ dataIndex: 'goodsPrice',
13015
+ title: "\u5546\u54C1\u5355\u4EF7",
13016
+ align: 'center',
13017
+ ellipsis: true,
13018
+ width: 70
12357
13019
  }, {
12358
- dataIndex: 'specId',
12359
- title: "".concat(text, "SKUID"),
13020
+ dataIndex: 'shopPrice',
13021
+ title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
12360
13022
  align: 'center',
12361
13023
  ellipsis: true,
12362
- width: 100
13024
+ width: 70
12363
13025
  }, {
12364
- dataIndex: 'specNo',
12365
- title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
13026
+ dataIndex: 'sharePrice',
13027
+ title: "\u5206\u644A\u4EF7",
12366
13028
  align: 'center',
12367
13029
  ellipsis: true,
12368
- width: 180
13030
+ width: 70
12369
13031
  }, {
12370
- dataIndex: 'specName',
12371
- title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
13032
+ dataIndex: 'sharePayment',
13033
+ title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
12372
13034
  align: 'center',
12373
13035
  ellipsis: true,
12374
- width: 250
13036
+ width: 70
12375
13037
  }, {
12376
- dataIndex: 'num',
12377
- title: "".concat(text, "\u6362\u51FA\u6570\u91CF"),
13038
+ dataIndex: 'payment',
13039
+ title: "\u5B9E\u4ED8\u91D1\u989D",
12378
13040
  align: 'center',
12379
13041
  ellipsis: true,
12380
- width: 100,
12381
- render: function render(val, record, index) {
12382
- return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12383
- style: {
12384
- width: 70
12385
- },
12386
- value: val,
12387
- min: 1,
12388
- precision: 0,
12389
- onChange: function onChange(num) {
12390
- return updateHandle(num, index, 'num');
12391
- }
12392
- }) : /*#__PURE__*/React.createElement("span", null, val);
12393
- }
13042
+ width: 70
12394
13043
  }, {
12395
- dataIndex: 'price',
12396
- title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
13044
+ dataIndex: 'tcSku',
13045
+ title: "\u5957\u9910SKU",
12397
13046
  align: 'center',
12398
13047
  ellipsis: true,
12399
- width: 100,
12400
- render: function render(val, record, index) {
12401
- return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12402
- style: {
12403
- width: 70
12404
- },
12405
- value: val,
12406
- min: 0,
12407
- onChange: function onChange(value) {
12408
- return updateHandle(value, index, 'price');
12409
- }
12410
- }) : /*#__PURE__*/React.createElement("span", null, val);
12411
- }
13048
+ width: 70
12412
13049
  }, {
12413
- dataIndex: 'exchangePrice',
12414
- title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
13050
+ dataIndex: 'tcGoodsNumber',
13051
+ title: "\u5957\u9910\u5957\u6570",
12415
13052
  align: 'center',
12416
13053
  ellipsis: true,
12417
- width: 100
13054
+ width: 70
12418
13055
  }, {
12419
- dataIndex: 'giftType',
12420
- title: "\u8D60\u54C1\u65B9\u5F0F",
13056
+ dataIndex: 'taocanSingleSl',
13057
+ title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
12421
13058
  align: 'center',
12422
13059
  ellipsis: true,
12423
- width: 100,
12424
- render: function render(val) {
12425
- var giftTypeMap = {
12426
- 0: '非赠品',
12427
- 1: '自动赠送',
12428
- 2: '手工赠送',
12429
- 3: '回购自动送赠品',
12430
- 4: '前N有礼送赠品',
12431
- 6: '天猫优仓赠品',
12432
- 7: '淘宝CRM会员送赠'
12433
- };
12434
- return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
12435
- }
13060
+ width: 70
12436
13061
  }, {
12437
- dataIndex: 'type',
12438
- title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
13062
+ dataIndex: 'isGift',
13063
+ title: "\u662F\u5426\u8D60\u54C1",
12439
13064
  align: 'center',
12440
13065
  ellipsis: true,
12441
- width: 100,
12442
- render: function render(val, record, index) {
12443
- var options = [{
12444
- label: '单品',
12445
- value: '1'
12446
- }, {
12447
- label: '组合装',
12448
- value: '2'
12449
- }];
12450
- return !disabled ? /*#__PURE__*/React.createElement(Select, {
12451
- style: {
12452
- width: 70
12453
- },
12454
- options: options,
12455
- value: val,
12456
- onChange: function onChange(value) {
12457
- return updateHandle(value, index, 'type');
12458
- }
12459
- }) : /*#__PURE__*/React.createElement("span", null, val);
12460
- }
13066
+ width: 70
12461
13067
  }];
12462
13068
  }
12463
13069
  break;
@@ -12616,6 +13222,15 @@ var GoodItem$1 = function GoodItem(props) {
12616
13222
  }
12617
13223
  return item;
12618
13224
  });
13225
+ } else if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
13226
+ newList = list.map(function (item) {
13227
+ item.uuid = uuid();
13228
+ item.canDelete = true;
13229
+ item.goodsNumber = 1;
13230
+ item.goodsPrice = 0;
13231
+ item.canUpdateNumber = canUpdateNumber;
13232
+ return item;
13233
+ });
12619
13234
  } else {
12620
13235
  newList = list.map(function (item) {
12621
13236
  var goodsId = item.goodsId,
@@ -12658,6 +13273,9 @@ var GoodItem$1 = function GoodItem(props) {
12658
13273
  fixed: true,
12659
13274
  onChange: onSelectChange
12660
13275
  };
13276
+ var handleCheckboxChange = function handleCheckboxChange(e) {
13277
+ onModeChange === null || onModeChange === void 0 ? void 0 : onModeChange(e.target.checked);
13278
+ };
12661
13279
  var tableConfig = useMemo(function () {
12662
13280
  var params = {};
12663
13281
  if (tableSelect) {
@@ -12669,7 +13287,10 @@ var GoodItem$1 = function GoodItem(props) {
12669
13287
  style: {
12670
13288
  float: 'right'
12671
13289
  }
12672
- }, /*#__PURE__*/React.createElement(Button, {
13290
+ }, showModeBtn && /*#__PURE__*/React.createElement(Checkbox, {
13291
+ value: isStrict,
13292
+ onChange: handleCheckboxChange
13293
+ }, "\u5408\u5E76\u5355\uFF0C\u52FE\u9009\u540E\u53EA\u5C55\u793A\u5F53\u524D\u5E73\u53F0\u8BA2\u5355\u5546\u54C1"), /*#__PURE__*/React.createElement(Button, {
12673
13294
  type: "link",
12674
13295
  onClick: handleChangeGoods
12675
13296
  }, "\u9009\u62E9\u5546\u54C1"), otherOperations), /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
@@ -12692,6 +13313,14 @@ var GoodItem$1 = function GoodItem(props) {
12692
13313
  shopId: shopId,
12693
13314
  maxLength: maxLength,
12694
13315
  companyKey: companyKey
13316
+ }) : ['BS_E3_REISSUE_GOODS', 'BS_E3_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type) ? /*#__PURE__*/React.createElement(BsE3GoodsModal, {
13317
+ ref: refModal,
13318
+ onSubmit: onSubmit,
13319
+ width: width,
13320
+ shopList: shopList,
13321
+ shopId: shopId,
13322
+ maxLength: maxLength,
13323
+ companyKey: companyKey
12695
13324
  }) : /*#__PURE__*/React.createElement(GoodsModal$2, {
12696
13325
  ref: refModal,
12697
13326
  onSubmit: onSubmit,
@@ -13311,19 +13940,133 @@ var BsReturnGoods = function BsReturnGoods(props) {
13311
13940
  })));
13312
13941
  };
13313
13942
 
13314
- var columnsNameMap = {
13315
- BS_SYSTEM_ORDER: {
13316
- typeName: '单据类型',
13317
- tagName: '标签'
13318
- },
13319
- WLN_SYSTEM_ORDER: {
13320
- typeName: '订单类型',
13321
- tagName: '标记'
13322
- },
13323
- WDT_SYSTEM_ORDER: {
13324
- typeName: '订单类型',
13325
- tagName: '订单标签'
13943
+ var singletonMap = new Map();
13944
+ var getWdtOrderListSingleton = function getWdtOrderListSingleton(orderNo) {
13945
+ if (!singletonMap.has(orderNo)) {
13946
+ var p = new Promise(function (resolve, reject) {
13947
+ var doReject = function doReject(err) {
13948
+ // 清空掉错误的请求记录
13949
+ singletonMap.delete(orderNo);
13950
+ reject(err);
13951
+ };
13952
+ extendRequest('/qy/gdfw/order/wdtOrderDetail', {
13953
+ method: 'post',
13954
+ data: {
13955
+ billNo: orderNo
13956
+ }
13957
+ }).then(function (data) {
13958
+ if (data === null || data === void 0 ? void 0 : data.success) {
13959
+ var _data$data, _data$data$trades;
13960
+ 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) {
13961
+ data.data.trades = filterWdtOrders(data === null || data === void 0 ? void 0 : data.data, orderNo).map(function (item) {
13962
+ return _objectSpread2(_objectSpread2({}, item), {}, {
13963
+ billNo: item.tradeNo,
13964
+ billType: WDT_ORDER_TYPE_MAP[item.tradeType],
13965
+ billTag: item.tagName
13966
+ });
13967
+ });
13968
+ }
13969
+ resolve(data.data);
13970
+ // 延迟10秒清除,保证订单的时效性
13971
+ setTimeout(function () {
13972
+ singletonMap.delete(orderNo);
13973
+ }, 1000 * 10);
13974
+ } else {
13975
+ doReject(data);
13976
+ }
13977
+ }).catch(doReject);
13978
+ });
13979
+ singletonMap.set(orderNo, p);
13326
13980
  }
13981
+ return singletonMap.get(orderNo);
13982
+ };
13983
+ var wdtUtils = {
13984
+ getWdtOrderListSingleton: getWdtOrderListSingleton
13985
+ };
13986
+
13987
+ var columnsMap = {
13988
+ BS_SYSTEM_ORDER: [{
13989
+ title: '单据类型',
13990
+ dataIndex: 'billType',
13991
+ width: 150
13992
+ }, {
13993
+ title: '系统订单号',
13994
+ dataIndex: 'billNo',
13995
+ width: 150
13996
+ }, {
13997
+ title: '标签',
13998
+ dataIndex: 'billTag',
13999
+ width: 150
14000
+ }],
14001
+ WLN_SYSTEM_ORDER: [{
14002
+ title: '订单类型',
14003
+ dataIndex: 'billType',
14004
+ width: 150
14005
+ }, {
14006
+ title: '系统订单号',
14007
+ dataIndex: 'billNo',
14008
+ width: 150
14009
+ }, {
14010
+ title: '标记',
14011
+ dataIndex: 'billTag',
14012
+ width: 150
14013
+ }],
14014
+ WDT_SYSTEM_ORDER: [{
14015
+ title: '订单类型',
14016
+ dataIndex: 'billType',
14017
+ width: 150
14018
+ }, {
14019
+ title: '系统订单号',
14020
+ dataIndex: 'billNo',
14021
+ width: 150
14022
+ }, {
14023
+ title: '订单标签',
14024
+ dataIndex: 'billTag',
14025
+ width: 150
14026
+ }],
14027
+ BS_E3_SYSTEM_ORDER: [{
14028
+ title: '系统订单号',
14029
+ dataIndex: 'orderSn',
14030
+ width: 150
14031
+ }, {
14032
+ title: '订单状态',
14033
+ dataIndex: 'orderStatus',
14034
+ width: 100
14035
+ }, {
14036
+ title: '是否被拆分',
14037
+ dataIndex: 'isSplit',
14038
+ width: 100
14039
+ }, {
14040
+ title: '是否拆分子单',
14041
+ dataIndex: 'isSplitNew',
14042
+ width: 100
14043
+ }, {
14044
+ title: '是否被合并',
14045
+ dataIndex: 'isCombine',
14046
+ width: 100
14047
+ }, {
14048
+ title: '是否合并新单',
14049
+ dataIndex: 'isCombineNew',
14050
+ width: 100
14051
+ }, {
14052
+ title: '是否复制单',
14053
+ dataIndex: 'isCopy',
14054
+ width: 100
14055
+ }, {
14056
+ title: '是否换货单',
14057
+ dataIndex: 'isHH',
14058
+ width: 100
14059
+ }, {
14060
+ title: '订单备注',
14061
+ dataIndex: 'orderMsg',
14062
+ width: 150
14063
+ }]
14064
+ };
14065
+ var rowKeyMap = {
14066
+ BS_SYSTEM_ORDER: 'billNo',
14067
+ WLN_SYSTEM_ORDER: 'billNo',
14068
+ WDT_SYSTEM_ORDER: 'billNo',
14069
+ BS_E3_SYSTEM_ORDER: 'orderSn'
13327
14070
  };
13328
14071
  var index$1 = (function (props) {
13329
14072
  var value = props.value,
@@ -13341,21 +14084,11 @@ var index$1 = (function (props) {
13341
14084
  getWlnOrderList(value.orderNo);
13342
14085
  } else if (type === 'WDT_SYSTEM_ORDER') {
13343
14086
  getWdtOrderList(value.orderNo);
13344
- }
14087
+ } else ;
13345
14088
  }
13346
14089
  }, [value, type]);
13347
14090
  var columns = useMemo(function () {
13348
- var _columnsNameMap$type, _columnsNameMap$type2;
13349
- return [{
13350
- dataIndex: 'billType',
13351
- title: columnsNameMap === null || columnsNameMap === void 0 ? void 0 : (_columnsNameMap$type = columnsNameMap[type]) === null || _columnsNameMap$type === void 0 ? void 0 : _columnsNameMap$type.typeName
13352
- }, {
13353
- dataIndex: 'billNo',
13354
- title: '系统订单号'
13355
- }, {
13356
- dataIndex: 'billTag',
13357
- title: columnsNameMap === null || columnsNameMap === void 0 ? void 0 : (_columnsNameMap$type2 = columnsNameMap[type]) === null || _columnsNameMap$type2 === void 0 ? void 0 : _columnsNameMap$type2.tagName
13358
- }];
14091
+ return columnsMap[type] || [];
13359
14092
  }, [type]);
13360
14093
  var getOrderList = /*#__PURE__*/function () {
13361
14094
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
@@ -13445,51 +14178,29 @@ var index$1 = (function (props) {
13445
14178
  }();
13446
14179
  var getWdtOrderList = /*#__PURE__*/function () {
13447
14180
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(orderNo) {
13448
- var _yield$request3, success, data, trades;
13449
14181
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
13450
14182
  while (1) switch (_context3.prev = _context3.next) {
13451
14183
  case 0:
13452
- _context3.next = 2;
13453
- return extendRequest('/qy/gdfw/order/wdtOrderDetail', {
13454
- method: 'post',
13455
- data: {
13456
- billNo: orderNo
13457
- }
13458
- });
13459
- case 2:
13460
- _yield$request3 = _context3.sent;
13461
- success = _yield$request3.success;
13462
- data = _yield$request3.data;
13463
- if (success) {
13464
- trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
14184
+ wdtUtils.getWdtOrderListSingleton(orderNo).then(function (data) {
14185
+ var trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
13465
14186
  return (item.srcTid || '').split(',').includes(orderNo);
13466
- }).map(function (item) {
13467
- if (Array.isArray(item.goodDetails)) {
13468
- item.goodDetails = item.goodDetails.filter(function (good) {
13469
- return good.srcTid === orderNo;
13470
- });
13471
- }
13472
- return item;
13473
14187
  });
13474
- _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
13475
- orders: trades.map(function (item) {
13476
- return _objectSpread2(_objectSpread2({}, item), {}, {
13477
- billNo: item.tradeNo,
13478
- billType: WDT_ORDER_TYPE_MAP[item.tradeType],
13479
- billTag: item.tagName
13480
- });
13481
- }),
13482
- showOrderInfo: trades.map(function (item) {
14188
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
14189
+ orders: trades,
14190
+ showOrderInfo: trades.map(function (_ref4) {
14191
+ var billNo = _ref4.billNo,
14192
+ billType = _ref4.billType,
14193
+ billTag = _ref4.billTag;
13483
14194
  return {
13484
- billNo: item.tradeNo,
13485
- billType: WDT_ORDER_TYPE_MAP[item.tradeType],
13486
- billTag: item.tagName
14195
+ billNo: billNo,
14196
+ billType: billType,
14197
+ billTag: billTag
13487
14198
  };
13488
14199
  })
13489
14200
  }));
13490
- }
14201
+ });
13491
14202
  onceRef.current = false;
13492
- case 7:
14203
+ case 2:
13493
14204
  case "end":
13494
14205
  return _context3.stop();
13495
14206
  }
@@ -13519,7 +14230,7 @@ var index$1 = (function (props) {
13519
14230
  dataSource: (value === null || value === void 0 ? void 0 : value.orders) || [],
13520
14231
  columns: columns,
13521
14232
  rowSelection: rowSelection,
13522
- rowKey: 'billNo',
14233
+ rowKey: rowKeyMap[type] || 'billNo',
13523
14234
  size: "small",
13524
14235
  pagination: false,
13525
14236
  scroll: {
@@ -13574,6 +14285,27 @@ var componentMap$1 = {
13574
14285
  returnDeleteGood: 'wdtReturnDeleteGood',
13575
14286
  exchangeDeleteGood: 'wdtExchangeDeleteGood'
13576
14287
  }
14288
+ },
14289
+ 'BS_E3_GOODS': {
14290
+ type: 'e3',
14291
+ key: 'bsE3Goods',
14292
+ name: '旺店通',
14293
+ eventNameMap: {
14294
+ type: 'bsE3Type',
14295
+ selectListReturn: 'bsE3SelectListReturn',
14296
+ selectList: 'bsE3SelectList',
14297
+ reissueSelectList: 'bsE3ReissueSelectList',
14298
+ reissueSelectListReturn: 'bsE3ReissueSelectListReturn',
14299
+ reissueDeleteGood: 'bsE3ReissueDeleteGood',
14300
+ changeShopCode: 'bsE3ChangeShopCode',
14301
+ reissueType: 'bsE3ReissueType',
14302
+ returnType: 'bsE3ReturnType',
14303
+ returnSelectListReturn: 'bsE3ReturnSelectListReturn',
14304
+ returnSelectList: 'bsE3ReturnSelectList',
14305
+ deleteGood: 'bsE3DeleteGood',
14306
+ returnDeleteGood: 'bsE3ReturnDeleteGood',
14307
+ exchangeDeleteGood: 'bsE3ExchangeDeleteGood'
14308
+ }
13577
14309
  }
13578
14310
  };
13579
14311
  var CommonGoods = function CommonGoods(props) {
@@ -13582,6 +14314,7 @@ var CommonGoods = function CommonGoods(props) {
13582
14314
  disabled = props.disabled,
13583
14315
  onChange = props.onChange,
13584
14316
  compType = props.type;
14317
+ var getOrderFlag = useRef(false);
13585
14318
  var _useState = useState(false),
13586
14319
  _useState2 = _slicedToArray(_useState, 2),
13587
14320
  tableSelect = _useState2[0],
@@ -13589,8 +14322,36 @@ var CommonGoods = function CommonGoods(props) {
13589
14322
  var withInfo = useRef(null);
13590
14323
  var valueRef = useRef(null);
13591
14324
  useEffect(function () {
14325
+ var _value$orders;
13592
14326
  valueRef.current = value;
14327
+ 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)) {
14328
+ getOrderFlag.current = true;
14329
+ getWdtOrderList(value === null || value === void 0 ? void 0 : value.orderNo);
14330
+ }
13593
14331
  }, [value]);
14332
+ var getWdtOrderList = /*#__PURE__*/function () {
14333
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
14334
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
14335
+ while (1) switch (_context.prev = _context.next) {
14336
+ case 0:
14337
+ wdtUtils.getWdtOrderListSingleton(orderNo).then(function (data) {
14338
+ var orders = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (trade) {
14339
+ return (value.selectIds || []).includes(trade.tradeNo);
14340
+ });
14341
+ onChange(_objectSpread2(_objectSpread2({}, value), {}, {
14342
+ orders: orders
14343
+ }));
14344
+ });
14345
+ case 1:
14346
+ case "end":
14347
+ return _context.stop();
14348
+ }
14349
+ }, _callee);
14350
+ }));
14351
+ return function getWdtOrderList(_x) {
14352
+ return _ref.apply(this, arguments);
14353
+ };
14354
+ }();
13594
14355
  useEffect(function () {
13595
14356
  pubsub.subscribe(componentMap$1[compType].eventNameMap.type, function (type, data) {
13596
14357
  if (disabled) return;
@@ -13648,7 +14409,7 @@ var CommonGoods = function CommonGoods(props) {
13648
14409
  });
13649
14410
  pubsub.subscribeOnce(componentMap$1[compType].eventNameMap.changeShopCode, function (type, data) {
13650
14411
  // console.log(data);
13651
- onChange(_objectSpread2(_objectSpread2({}, valueRef === null || valueRef === void 0 ? void 0 : valueRef.current), {}, {
14412
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, valueRef === null || valueRef === void 0 ? void 0 : valueRef.current), {}, {
13652
14413
  shopCode: data.shopCode
13653
14414
  }));
13654
14415
  });
@@ -13688,6 +14449,22 @@ var CommonGoods = function CommonGoods(props) {
13688
14449
  var changeHandle = function changeHandle(list) {
13689
14450
  onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, componentMap$1[compType].key, list)));
13690
14451
  };
14452
+ var handleModeChange = function handleModeChange(isStrict) {
14453
+ // isStrict 是否只展示当前平台订单商品
14454
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({
14455
+ isStrict: isStrict
14456
+ }, componentMap$1[compType].key, getGoodDetails({
14457
+ mode: isStrict
14458
+ }))));
14459
+ };
14460
+ var getGoodDetails = function getGoodDetails(_ref2) {
14461
+ var mode = _ref2.mode;
14462
+ var goodDetails = updateWdtGoodsHandle(value.orders || []);
14463
+ var orderNo = value.orderNo;
14464
+ return mode ? goodDetails.filter(function (goodItem) {
14465
+ return !orderNo || goodItem.srcTid === orderNo;
14466
+ }) : goodDetails;
14467
+ };
13691
14468
  return /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
13692
14469
  key: componentMap$1[compType].key
13693
14470
  }, props), {}, {
@@ -13704,7 +14481,10 @@ var CommonGoods = function CommonGoods(props) {
13704
14481
  },
13705
14482
  onChange: function onChange(val) {
13706
14483
  return changeHandle(val);
13707
- }
14484
+ },
14485
+ onModeChange: handleModeChange,
14486
+ showModeBtn: true,
14487
+ isStrict: value === null || value === void 0 ? void 0 : value.isStrict
13708
14488
  }));
13709
14489
  };
13710
14490
 
@@ -13971,8 +14751,8 @@ var typeMap$1 = {
13971
14751
  key: 'wdtReissueGoods',
13972
14752
  name: '旺店通',
13973
14753
  typeName: 'wdtReissueType',
13974
- wdtSystemOrder: 'wdtSystemOrder',
13975
- wdtSystemOrderNo: 'wdtSystemOrderNo',
14754
+ systemOrder: 'wdtSystemOrder',
14755
+ systemOrderNo: 'wdtSystemOrderNo',
13976
14756
  reissueSelectList: 'wdtReissueSelectList',
13977
14757
  reissueSelectListReturn: 'wdtReissueSelectListReturn',
13978
14758
  reissueDeleteGood: 'wdtReissueDeleteGood',
@@ -13985,7 +14765,7 @@ var typeMap$1 = {
13985
14765
  }
13986
14766
  };
13987
14767
  var wdtReissue = function wdtReissue(props) {
13988
- var _typeMap$type7, _value$typeMap$type$t3, _typeMap$type10, _typeMap$type26, _typeMap$type27, _value$typeMap$type$w2, _typeMap$type28, _typeMap$type29, _typeMap$type30;
14768
+ var _typeMap$type7, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s5, _typeMap$type27, _typeMap$type28, _typeMap$type29;
13989
14769
  var value = props.value,
13990
14770
  onChange = props.onChange,
13991
14771
  _props$reasonList = props.reasonList,
@@ -13993,177 +14773,144 @@ var wdtReissue = function wdtReissue(props) {
13993
14773
  disabled = props.disabled,
13994
14774
  type = props.type,
13995
14775
  other = _objectWithoutProperties(props, _excluded$g);
13996
- var valueRef = useRef({});
13997
- useEffect(function () {
13998
- var _typeMap$type, _typeMap$type4;
13999
- valueRef.current = value;
14000
- 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) {
14001
- if (disabled) return;
14002
- if (value) {
14003
- var _typeMap$type2, _typeMap$type3;
14004
- var newValue = _objectSpread2({}, value);
14005
- 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) {
14006
- return item.sku !== data;
14007
- });
14008
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
14009
- }
14010
- });
14011
- 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) {
14012
- onChange(_objectSpread2(_objectSpread2({}, value), {}, {
14013
- shopCode: data.shopCode
14014
- }));
14015
- });
14016
- }, [value, disabled]);
14776
+ var getOrderFlag = useRef(false);
14777
+ var _useState = useState(false),
14778
+ _useState2 = _slicedToArray(_useState, 2),
14779
+ isStrict = _useState2[0],
14780
+ setIsStrict = _useState2[1];
14017
14781
  useEffect(function () {
14018
- var _value$orders, _value$showOrderInfo;
14019
- 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)) {
14020
- if (type === 'WDT_SYSTEM_ORDER') {
14021
- getWdtOrderList(value.orderNo);
14022
- }
14782
+ var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
14783
+ 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)) {
14784
+ var _value$typeMap$type$s4, _typeMap$type3;
14785
+ getOrderFlag.current = true;
14786
+ 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);
14023
14787
  }
14024
14788
  return;
14025
14789
  }, [value]);
14026
14790
  useEffect(function () {
14027
- var _typeMap$type5;
14028
- 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];
14029
- if (wdtSystemOrderNo) {
14030
- var _value$typeMap$type$t, _typeMap$type6;
14031
- 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])) {
14032
- getGoodItems(wdtSystemOrderNo);
14791
+ var _typeMap$type4;
14792
+ 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];
14793
+ if (systemOrderNo) {
14794
+ var _value$typeMap$type$t, _typeMap$type5;
14795
+ 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])) {
14796
+ var _typeMap$type6;
14797
+ 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({
14798
+ mode: isStrict
14799
+ }))));
14033
14800
  }
14034
14801
  }
14035
14802
  return;
14036
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type7 = typeMap$1[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.wdtSystemOrderNo]]);
14037
- useEffect(function () {
14038
- var _value$typeMap$type$t2, _typeMap$type8, _typeMap$type9;
14039
- 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];
14040
- 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];
14041
- if (['1'].includes(typeName)) {
14042
- wdtSystemOrderNo && getGoodItems(wdtSystemOrderNo);
14043
- } else if (['2'].includes(typeName)) {
14044
- var newValue = _objectSpread2({}, value);
14045
- // newValue[`${typeMap?.[type]?.key}`] = [];
14046
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
14047
- }
14048
- return;
14049
- }, [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]]);
14050
- var getGoodItems = function getGoodItems(wdtSystemOrderNo) {
14051
- var _value$typeMap$type$w, _typeMap$type11, _ref;
14052
- 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;
14053
- var order = (_ref = orders || []) === null || _ref === void 0 ? void 0 : _ref.find(function (orderItem) {
14054
- return orderItem.billNo === wdtSystemOrderNo;
14055
- });
14056
- if (order) {
14057
- var _typeMap$type12, _order$goodDetails;
14058
- var newValue = _objectSpread2({}, value);
14059
- 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) {
14060
- var _typeMap$type13, _typeMap$type14;
14061
- 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;
14062
- 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;
14063
- item.canUpdateNumber = true;
14064
- return item;
14065
- });
14066
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
14067
- }
14068
- };
14803
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type7 = typeMap$1[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.systemOrderNo]]);
14069
14804
  var getWdtOrderList = /*#__PURE__*/function () {
14070
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
14071
- var _yield$request, success, data, _typeMap$type15, _typeMap$type16, orders, showOrderInfo;
14805
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
14072
14806
  return _regeneratorRuntime().wrap(function _callee$(_context) {
14073
14807
  while (1) switch (_context.prev = _context.next) {
14074
14808
  case 0:
14075
- _context.next = 2;
14076
- return extendRequest('/qy/gdfw/order/wdtOrderDetail', {
14077
- method: 'post',
14078
- data: {
14079
- billNo: orderNo
14080
- }
14081
- });
14082
- case 2:
14083
- _yield$request = _context.sent;
14084
- success = _yield$request.success;
14085
- data = _yield$request.data;
14086
- if (success) {
14087
- orders = ((data === null || data === void 0 ? void 0 : data.trades) || []).map(function (item) {
14088
- return _objectSpread2(_objectSpread2({}, item), {}, {
14089
- billNo: item.tradeNo,
14090
- billType: WDT_ORDER_TYPE_MAP[item.tradeType],
14091
- billTag: item.tagName
14092
- });
14093
- });
14094
- showOrderInfo = data === null || data === void 0 ? void 0 : data.trades.map(function (item) {
14809
+ wdtUtils.getWdtOrderListSingleton(orderNo).then(function (data) {
14810
+ var _typeMap$type8, _typeMap$type9;
14811
+ var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
14812
+ var showOrderInfo = orders.map(function (_ref2) {
14813
+ var billNo = _ref2.billNo,
14814
+ billType = _ref2.billType,
14815
+ billTag = _ref2.billTag;
14095
14816
  return {
14096
- billNo: item.tradeNo,
14097
- billType: WDT_ORDER_TYPE_MAP[item.tradeType],
14098
- billTag: item.tagName
14817
+ billNo: billNo,
14818
+ billType: billType,
14819
+ billTag: billTag
14099
14820
  };
14100
14821
  });
14101
- 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]), {}, {
14822
+ 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]), {}, {
14102
14823
  showOrderInfo: showOrderInfo,
14103
14824
  orders: orders
14104
14825
  }))));
14105
- }
14106
- case 6:
14826
+ });
14827
+ case 1:
14107
14828
  case "end":
14108
14829
  return _context.stop();
14109
14830
  }
14110
14831
  }, _callee);
14111
14832
  }));
14112
14833
  return function getWdtOrderList(_x) {
14113
- return _ref2.apply(this, arguments);
14834
+ return _ref.apply(this, arguments);
14114
14835
  };
14115
14836
  }();
14116
14837
  var changeTypeHandle = function changeTypeHandle(val) {
14117
- var _typeMap$type17, _typeMap$type18;
14838
+ var _value$typeMap$type$t2, _typeMap$type10, _typeMap$type11;
14839
+ var typeName = val === null || val === void 0 ? void 0 : val[0];
14840
+ 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;
14841
+ // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
14118
14842
  var newValue = _objectSpread2({}, value);
14119
- 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;
14120
- 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)] = [];
14843
+ newValue[(_typeMap$type11 = typeMap$1[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName] = val;
14844
+ if (typeName === '1') {
14845
+ var _typeMap$type12;
14846
+ newValue[(_typeMap$type12 = typeMap$1[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = getGoodDetails({
14847
+ mode: isStrict
14848
+ });
14849
+ } else if (typeName === '2') {
14850
+ var _typeMap$type13;
14851
+ // 切换到非原单,清空列表
14852
+ newValue[(_typeMap$type13 = typeMap$1[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = [];
14853
+ }
14121
14854
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
14122
- valueRef.current = newValue;
14123
- // if (['2'].includes(val[0])) {
14124
- // onChange?.(newValue);
14125
- // valueRef.current = newValue;
14126
- // }
14127
- // pubsub.publish(`${typeMap?.[type]?.reissueType}`, {
14128
- // val: val[0],
14129
- // goodValue: newValue,
14130
- // });
14131
14855
  };
14132
-
14856
+ var handleModeChange = function handleModeChange(mode) {
14857
+ var _value$typeMap$type$t3, _typeMap$type14, _typeMap$type15;
14858
+ 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';
14859
+ setIsStrict(mode);
14860
+ if (!isOriginalOrder) return;
14861
+ 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({
14862
+ mode: mode
14863
+ }))));
14864
+ };
14865
+ var getGoodDetails = function getGoodDetails(_ref3) {
14866
+ var _typeMap$type16, _typeMap$type17, _order$goodDetails;
14867
+ var mode = _ref3.mode;
14868
+ 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];
14869
+ 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];
14870
+ var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
14871
+ return order.tradeNo === systemOrderNo;
14872
+ });
14873
+ 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]) : [];
14874
+ var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
14875
+ return mode ? goodDetails.filter(function (goodItem) {
14876
+ return !orderNo || goodItem.srcTid === orderNo;
14877
+ }) : goodDetails;
14878
+ };
14133
14879
  var changeGoodHandle = function changeGoodHandle(val) {
14134
- var _typeMap$type19;
14880
+ var _typeMap$type18;
14135
14881
  var newValue = _objectSpread2({}, value);
14136
- 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) {
14137
- var _typeMap$type20, _typeMap$type21;
14138
- 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;
14139
- 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;
14882
+ 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) {
14883
+ var _typeMap$type19, _typeMap$type20;
14884
+ 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;
14885
+ 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;
14140
14886
  return item;
14141
14887
  });
14142
14888
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
14143
14889
  };
14144
14890
  var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
14145
- var _typeMap$type22, _value$typeMap$type$t4, _typeMap$type23;
14891
+ var _typeMap$type21, _value$typeMap$type$t4, _typeMap$type22;
14146
14892
  var newValue = _objectSpread2({}, value);
14147
- 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;
14148
- 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])) {
14149
- var _typeMap$type24;
14150
- 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)] = [];
14893
+ 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;
14894
+ 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])) {
14895
+ var _typeMap$type23;
14896
+ 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)] = [];
14151
14897
  }
14152
14898
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
14153
14899
  };
14154
14900
  //显示选择商品按钮 原单换不显示选择商品
14155
14901
  var showChangeBtn = useMemo(function () {
14156
- var _typeMap$type25;
14157
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.wdtSystemOrderNo]);
14158
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.wdtSystemOrderNo]]);
14902
+ var _typeMap$type24;
14903
+ return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo]);
14904
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]]);
14159
14905
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
14160
- gutter: 8
14906
+ gutter: 8,
14907
+ wrap: true
14161
14908
  }, /*#__PURE__*/React.createElement(Col, {
14162
14909
  className: "gutter-row",
14163
14910
  xs: {
14164
14911
  span: 11
14165
14912
  },
14166
- md: {
14913
+ sm: {
14167
14914
  span: 6
14168
14915
  }
14169
14916
  }, /*#__PURE__*/React.createElement(Select, {
@@ -14172,12 +14919,12 @@ var wdtReissue = function wdtReissue(props) {
14172
14919
  },
14173
14920
  disabled: disabled,
14174
14921
  allowClear: false,
14175
- 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)],
14922
+ 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)],
14176
14923
  onChange: function onChange(val) {
14177
14924
  return changeSystemOrderHandle(val);
14178
14925
  },
14179
14926
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
14180
- }, ((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) {
14927
+ }, ((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) {
14181
14928
  return /*#__PURE__*/React.createElement(Select.Option, {
14182
14929
  key: item.billNo,
14183
14930
  value: item.billNo,
@@ -14188,7 +14935,7 @@ var wdtReissue = function wdtReissue(props) {
14188
14935
  xs: {
14189
14936
  span: 11
14190
14937
  },
14191
- md: {
14938
+ sm: {
14192
14939
  span: 6
14193
14940
  }
14194
14941
  }, /*#__PURE__*/React.createElement(Cascader, {
@@ -14198,7 +14945,7 @@ var wdtReissue = function wdtReissue(props) {
14198
14945
  disabled: disabled,
14199
14946
  allowClear: false,
14200
14947
  options: reasonList,
14201
- 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)],
14948
+ 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)],
14202
14949
  onChange: function onChange(val) {
14203
14950
  return changeTypeHandle(val);
14204
14951
  }
@@ -14210,10 +14957,13 @@ var wdtReissue = function wdtReissue(props) {
14210
14957
  canUpdateNumber: showChangeBtn,
14211
14958
  showChangeBtn: showChangeBtn,
14212
14959
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
14213
- 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)],
14960
+ 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)],
14214
14961
  onChange: function onChange(val) {
14215
14962
  return changeGoodHandle(val);
14216
- }
14963
+ },
14964
+ onModeChange: handleModeChange,
14965
+ showModeBtn: true,
14966
+ isStrict: isStrict
14217
14967
  })));
14218
14968
  };
14219
14969
 
@@ -14223,7 +14973,7 @@ styleInject(css_248z$a);
14223
14973
  var TabPane$1 = Tabs.TabPane;
14224
14974
  var Option$2 = Select.Option;
14225
14975
  var Search$1 = Input.Search;
14226
- var GoodsModal$4 = function GoodsModal(props) {
14976
+ var GoodsModal$5 = function GoodsModal(props) {
14227
14977
  var onSubmit = props.onSubmit,
14228
14978
  _onCancel = props.onCancel,
14229
14979
  visible = props.visible,
@@ -14674,7 +15424,7 @@ var Goods$1 = function Goods(props, ref) {
14674
15424
  };
14675
15425
  return /*#__PURE__*/React.createElement("div", {
14676
15426
  className: "goodsBox"
14677
- }, /*#__PURE__*/React.createElement(GoodsModal$4, {
15427
+ }, /*#__PURE__*/React.createElement(GoodsModal$5, {
14678
15428
  visible: visible,
14679
15429
  onSubmit: onSubmit,
14680
15430
  type: type,
@@ -14904,7 +15654,10 @@ var msgTypeCh = {
14904
15654
  ding: '钉钉',
14905
15655
  wechat: '微信',
14906
15656
  qq: 'QQ',
14907
- qywx: '企业微信'
15657
+ qywx: '企业微信',
15658
+ YZDKH: '邮政拦截',
15659
+ YT: '圆通拦截',
15660
+ feishu: '飞书'
14908
15661
  };
14909
15662
  var MsgStatus = function MsgStatus(props) {
14910
15663
  var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;