@kmkf-fe-packages/basic-components 1.22.1-beta.7 → 1.22.1-beta.76

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, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterKmOrders, KM_SYSTEM_ORDER_CONFIG, BS_E3_ORDER_STATUS_MAP, updateWdtGoodsHandle, updateBsE3GoodsHandle } from '@kmkf-fe-packages/kmkf-utils';
7
- import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, takeRight, reject, isEmpty, intersection } from 'lodash';
6
+ import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterKmOrders, getIsPlatformCodesIncludeOrderNos, BS_SYSTEM_ORDER_CONFIG, KM_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, msgTypeCh } from '@kmkf-fe-packages/kmkf-utils';
7
+ import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, takeRight, reject, isEmpty, intersection, uniqBy } 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;
63
+ return exports;
64
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;
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({
@@ -928,7 +928,7 @@ var fn$1 = function fn() {
928
928
  var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
929
929
  var _document;
930
930
  var _ref$maxCount = _ref.maxCount,
931
- maxCount = _ref$maxCount === void 0 ? 10 : _ref$maxCount,
931
+ maxCount = _ref$maxCount === void 0 ? 20 : _ref$maxCount,
932
932
  _ref$maxSize = _ref.maxSize,
933
933
  maxSize = _ref$maxSize === void 0 ? 10 : _ref$maxSize,
934
934
  _ref$uploadText = _ref.uploadText,
@@ -6863,7 +6863,7 @@ var fn$2 = function fn() {
6863
6863
  };
6864
6864
  var ApaasUploadFile = function ApaasUploadFile(_ref) {
6865
6865
  var _ref$maxCount = _ref.maxCount,
6866
- maxCount = _ref$maxCount === void 0 ? 10 : _ref$maxCount,
6866
+ maxCount = _ref$maxCount === void 0 ? 20 : _ref$maxCount,
6867
6867
  _ref$maxSize = _ref.maxSize,
6868
6868
  maxSize = _ref$maxSize === void 0 ? 100 : _ref$maxSize,
6869
6869
  _ref$onChange = _ref.onChange,
@@ -7361,7 +7361,8 @@ var Province = function Province(props) {
7361
7361
  var mapping = {
7362
7362
  workOrder: AddressData.getInstance(),
7363
7363
  bs: BsAddressData.getInstance(),
7364
- wdt: WdtAddressData.getInstance()
7364
+ wdt: WdtAddressData.getInstance(),
7365
+ gy: GyAddressData.getInstance()
7365
7366
  };
7366
7367
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Cascader, _objectSpread2(_objectSpread2({}, props), {}, {
7367
7368
  options: ((_mapping$type = mapping[type]) === null || _mapping$type === void 0 ? void 0 : _mapping$type.addressOptions) || [],
@@ -7466,10 +7467,16 @@ var IdentifyAddress = function IdentifyAddress(props) {
7466
7467
  var addressData = (type && {
7467
7468
  bs: BsAddressData,
7468
7469
  wdt: WdtAddressData,
7470
+ gy: GyAddressData,
7469
7471
  workOrder: AddressData
7470
7472
  }[type] || AddressData).getInstance();
7471
7473
  if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
7472
- params.address = [addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province), addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.city), addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.district)];
7474
+ // params.address = [
7475
+ // addressData.getProCodeByName(val?.province),
7476
+ // addressData.getProCodeByName(val?.city),
7477
+ // addressData.getProCodeByName(val?.district),
7478
+ // ];
7479
+ params.address = addressData.getCodesByNames([val === null || val === void 0 ? void 0 : val.province, val === null || val === void 0 ? void 0 : val.city, val === null || val === void 0 ? void 0 : val.district]);
7473
7480
  }
7474
7481
  onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, params));
7475
7482
  };
@@ -7542,11 +7549,13 @@ function ApaasPosting(props) {
7542
7549
  });
7543
7550
  }
7544
7551
 
7545
- var _excluded$a = ["value", "onChange", "platformType"];
7552
+ var _excluded$a = ["value", "onChange", "platformType", "type"];
7546
7553
  function ApaasLogistics(props) {
7547
7554
  var value = props.value,
7548
7555
  onChange = props.onChange,
7549
7556
  platformType = props.platformType,
7557
+ _props$type = props.type,
7558
+ type = _props$type === void 0 ? 'select' : _props$type,
7550
7559
  other = _objectWithoutProperties(props, _excluded$a);
7551
7560
  var _useState = useState([]),
7552
7561
  _useState2 = _slicedToArray(_useState, 2),
@@ -7577,10 +7586,18 @@ function ApaasLogistics(props) {
7577
7586
  isFirst.current = true;
7578
7587
  }
7579
7588
  }, []);
7580
- return /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({}, other), {}, {
7589
+ var handleInputChange = function handleInputChange(e) {
7590
+ var val = e.target.value;
7591
+ onChange === null || onChange === void 0 ? void 0 : onChange(val);
7592
+ };
7593
+ return type === 'input' ? /*#__PURE__*/React.createElement(Input, _objectSpread2(_objectSpread2({}, other), {}, {
7594
+ value: value,
7595
+ onChange: handleInputChange
7596
+ })) : /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({}, other), {}, {
7581
7597
  value: value,
7582
7598
  onChange: onChange,
7583
- options: option
7599
+ options: option,
7600
+ virtual: true
7584
7601
  }));
7585
7602
  }
7586
7603
 
@@ -8110,7 +8127,7 @@ function ApaasAddress(props) {
8110
8127
  };
8111
8128
  var addressData = type === 'bs' ? BsAddressData.getInstance() : AddressData.getInstance();
8112
8129
  if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
8113
- params.address = [addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province), addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.city), addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.district)];
8130
+ params.address = addressData.getCodesByNames([val === null || val === void 0 ? void 0 : val.province, val === null || val === void 0 ? void 0 : val.city, val === null || val === void 0 ? void 0 : val.district]);
8114
8131
  }
8115
8132
  onChange === null || onChange === void 0 ? void 0 : onChange(params);
8116
8133
  };
@@ -9474,7 +9491,8 @@ var GoodItem = function GoodItem(props) {
9474
9491
  picUrl: item.picUrl,
9475
9492
  numIid: item.numIid,
9476
9493
  skuId: item.skuId,
9477
- outerSkuId: item.outerSkuId
9494
+ outerSkuId: item.outerSkuId,
9495
+ num: 1 //手动选择商品默认数量
9478
9496
  };
9479
9497
  // if (type === 1) {
9480
9498
  // params.outerId = item.outerId; //编码
@@ -9563,16 +9581,34 @@ var GoodItem = function GoodItem(props) {
9563
9581
  return _ref5.apply(this, arguments);
9564
9582
  };
9565
9583
  }();
9566
- var headerList = showHeader || {
9567
- 1: ['title', 'outerId', 'picUrl', 'numIid', 'skuId', 'outerSkuId', 'propertiesName' // sku 信息
9568
- ]
9569
- }[type] || [];
9584
+ var headerList = useMemo(function () {
9585
+ if (!Array.isArray(showHeader)) return columnsGoodsList.map(function (item) {
9586
+ return item.dataIndex;
9587
+ });
9588
+ var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === 'string';
9589
+ var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
9590
+ var dataIndexList = [];
9591
+ if (isStringArray) {
9592
+ dataIndexList = showHeader;
9593
+ } else if (isObjectArray) {
9594
+ dataIndexList = showHeader.filter(function (item) {
9595
+ return item.show !== false;
9596
+ }).map(function (item) {
9597
+ return item.dataIndex;
9598
+ });
9599
+ }
9600
+ return dataIndexList || {
9601
+ 1: columnsGoodsList.map(function (item) {
9602
+ return item.dataIndex;
9603
+ })
9604
+ }[type] || [];
9605
+ }, [showHeader]);
9570
9606
  //修改参数
9571
- var handleChangeValue = function handleChangeValue(key, index) {
9607
+ var handleChangeValue = function handleChangeValue(key, index, replaceFn) {
9572
9608
  return function (e) {
9573
- var _e$target;
9609
+ var _e$target, _e$target2;
9574
9610
  var newImgList = _toConsumableArray(imgList);
9575
- newImgList[index][key] = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value;
9611
+ newImgList[index][key] = replaceFn ? replaceFn(e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value) : e === null || e === void 0 ? void 0 : (_e$target2 = e.target) === null || _e$target2 === void 0 ? void 0 : _e$target2.value;
9576
9612
  var newValue = {
9577
9613
  shopId: shopId,
9578
9614
  imgList: newImgList
@@ -9581,35 +9617,67 @@ var GoodItem = function GoodItem(props) {
9581
9617
  };
9582
9618
  };
9583
9619
  // TODO: 目前只做了type 1的处理,其他的还是走老的文件 ./index.tsx
9584
- var goodItemAttrs = [{
9585
- isShow: headerList.includes('title'),
9586
- key: 'title',
9587
- label: '商品名称'
9588
- }, {
9589
- isShow: headerList.includes('outerId'),
9590
- key: 'outerId',
9591
- label: '商品编码'
9592
- },
9593
- // { isShow: headerList.includes('picUrl'), key: 'picUrl', label: '图片' },
9594
- {
9595
- isShow: headerList.includes('numIid'),
9596
- key: 'numIid',
9597
- label: '商品id'
9598
- }, {
9599
- isShow: changeSku && headerList.includes('skuId'),
9600
- key: 'skuId',
9601
- label: 'SKU ID'
9602
- }, {
9603
- isShow: changeSku && headerList.includes('outerSkuId'),
9604
- key: 'outerSkuId',
9605
- label: 'SKU 编码'
9606
- }, {
9607
- isShow: changeSku && headerList.includes('propertiesName'),
9608
- key: 'propertiesName',
9609
- label: 'SKU 信息'
9610
- }];
9611
- var hasPic = headerList.includes('picUrl');
9612
- var hasAttr = hasPic ? headerList.length > 1 : headerList.length > 0;
9620
+ var goodItemAttrs = useMemo(function () {
9621
+ var initList = [{
9622
+ isShow: headerList.includes('title'),
9623
+ key: 'title',
9624
+ label: '商品名称'
9625
+ }, {
9626
+ isShow: headerList.includes('outerId'),
9627
+ key: 'outerId',
9628
+ label: '商品编码'
9629
+ },
9630
+ // { isShow: headerList.includes('picUrl'), key: 'picUrl', label: '图片' },
9631
+ {
9632
+ isShow: headerList.includes('numIid'),
9633
+ key: 'numIid',
9634
+ label: '商品id'
9635
+ }, {
9636
+ isShow: headerList.includes('num'),
9637
+ key: 'num',
9638
+ label: '商品数量',
9639
+ replaceFn: function replaceFn(value) {
9640
+ // 使用正则表达式匹配所有数字字符
9641
+ var numbers = String(value || '').match(/\d+/g);
9642
+ // 如果没有匹配到任何数字字符,返回null
9643
+ if (!numbers) {
9644
+ return null;
9645
+ }
9646
+ // 将匹配到的数字字符拼接成一个新的数字
9647
+ return Number(numbers.join('')) ? Number(numbers.join('')) : null;
9648
+ }
9649
+ }, {
9650
+ isShow: changeSku && headerList.includes('skuId'),
9651
+ key: 'skuId',
9652
+ label: 'SKU ID'
9653
+ }, {
9654
+ isShow: changeSku && headerList.includes('outerSkuId'),
9655
+ key: 'outerSkuId',
9656
+ label: 'SKU 编码'
9657
+ }, {
9658
+ isShow: changeSku && headerList.includes('propertiesName'),
9659
+ key: 'propertiesName',
9660
+ label: 'SKU 信息'
9661
+ }];
9662
+ if (!Array.isArray(showHeader)) return initList;
9663
+ var newList = [];
9664
+ headerList.forEach(function (dataIndex) {
9665
+ if (initList.find(function (item) {
9666
+ return item.key === dataIndex;
9667
+ })) {
9668
+ newList.push(initList.find(function (item) {
9669
+ return item.key === dataIndex;
9670
+ }));
9671
+ }
9672
+ });
9673
+ return newList;
9674
+ }, [headerList, showHeader]);
9675
+ var hasPic = useMemo(function () {
9676
+ return headerList.includes('picUrl');
9677
+ }, [headerList]);
9678
+ var hasAttr = useMemo(function () {
9679
+ return hasPic ? headerList.length > 1 : headerList.length > 0;
9680
+ }, [hasPic, headerList]);
9613
9681
  return /*#__PURE__*/React.createElement("div", null, imgList.length === 0 ? /*#__PURE__*/React.createElement("p", {
9614
9682
  className: "goods-title"
9615
9683
  }, "\u6700\u591A\u6DFB\u52A0", maxLength, "\u4E2A\u5B9D\u8D1D") : /*#__PURE__*/React.createElement("p", {
@@ -9667,7 +9735,7 @@ var GoodItem = function GoodItem(props) {
9667
9735
  title: String(img[item.key] || ''),
9668
9736
  value: img[item.key],
9669
9737
  disabled: item.disabled || disabled,
9670
- onChange: handleChangeValue(item.key, index)
9738
+ onChange: handleChangeValue(item.key, index, item.replaceFn)
9671
9739
  }));
9672
9740
  }), !disabled && !hasPic && type !== 4 && changeSku ? /*#__PURE__*/React.createElement(Button, {
9673
9741
  style: {
@@ -10950,19 +11018,26 @@ var jstGoods = function jstGoods(props) {
10950
11018
  _props$showField = props.showField,
10951
11019
  showField = _props$showField === void 0 ? '' : _props$showField,
10952
11020
  _props$platformType = props.platformType,
10953
- platformType = _props$platformType === void 0 ? 'default' : _props$platformType;
11021
+ platformType = _props$platformType === void 0 ? 'default' : _props$platformType,
11022
+ onlyShowFieldSelect = props.onlyShowFieldSelect;
10954
11023
  var _useState = useState(0),
10955
11024
  _useState2 = _slicedToArray(_useState, 2),
10956
11025
  changeIndex = _useState2[0],
10957
11026
  setChangeIndex = _useState2[1]; //选中的包裹
10958
11027
  var sendOptions = SendDataCenter.getInstance(platformType).getSendData();
10959
- var isSelectName = ['wdt', 'bsE3', 'km'].includes(platformType);
11028
+ var isSelectName = ['wdt', 'bsE3', 'km', 'gy'].includes(platformType);
11029
+ var logisticsType = type === 1 && platformType === 'gy' ? 'input' : 'select';
10960
11030
  useEffect(function () {
10961
11031
  //没有值塞个默认值
10962
11032
  if (!(value === null || value === void 0 ? void 0 : value.length) && type !== 1) {
10963
11033
  onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap[type]);
10964
11034
  }
10965
11035
  }, [value, type]);
11036
+ useEffect(function () {
11037
+ if (changeIndex > (value === null || value === void 0 ? void 0 : value.length) - 1) {
11038
+ setChangeIndex(0);
11039
+ }
11040
+ }, value);
10966
11041
  var content = function content(item, index) {
10967
11042
  return /*#__PURE__*/React.createElement("div", {
10968
11043
  style: {
@@ -10973,7 +11048,7 @@ var jstGoods = function jstGoods(props) {
10973
11048
  style: {
10974
11049
  textAlign: 'center'
10975
11050
  }
10976
- }, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
11051
+ }, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F"), item.sid && /*#__PURE__*/React.createElement("span", null, "(\u7CFB\u7EDF\u5355\u53F7:", item.sid, ")")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
10977
11052
  return /*#__PURE__*/React.createElement("div", {
10978
11053
  key: index
10979
11054
  }, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Image, {
@@ -10983,10 +11058,12 @@ var jstGoods = function jstGoods(props) {
10983
11058
  }), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, t.title), /*#__PURE__*/React.createElement("div", null, "\u7F16\u7801\uFF1A", t.skuId))));
10984
11059
  }));
10985
11060
  };
10986
- var handleSelected = function handleSelected(val, type, option) {
11061
+ var handleSelected = function handleSelected(val, type, option, onlyShowFieldSelect) {
10987
11062
  var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
10988
11063
  changeOrderInfo[type] = val;
10989
- changeOrderInfo['sendId'] = option.value;
11064
+ if (!onlyShowFieldSelect) {
11065
+ changeOrderInfo['sendId'] = option.value;
11066
+ }
10990
11067
  if (isSelectName && type === 'sendName') {
10991
11068
  changeOrderInfo['sendSnapshotName'] = option.label;
10992
11069
  }
@@ -11025,24 +11102,32 @@ var jstGoods = function jstGoods(props) {
11025
11102
  return setChangeIndex(index);
11026
11103
  }
11027
11104
  }, "\u5305\u88F9".concat(index + 1)));
11028
- }))) : null, value.length || type === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React.createElement(ApaasLogistics, {
11105
+ }))) : null, value.length || type === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React.createElement(ApaasLogistics, _objectSpread2(_objectSpread2({
11106
+ type: logisticsType,
11029
11107
  disabled: disabled,
11030
11108
  placeholder: "\u7269\u6D41\u516C\u53F8",
11031
11109
  onChange: function onChange(val) {
11032
- return changeInputHandle(val, 'logisticsCompany');
11110
+ if (logisticsType === 'input') {
11111
+ changeInputHandle(null, 'logisticsCompany');
11112
+ changeInputHandle(val, 'logisticsCompanyName');
11113
+ } else {
11114
+ changeInputHandle(val, 'logisticsCompany');
11115
+ }
11033
11116
  },
11034
- value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex.logisticsCompany,
11117
+ value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex[logisticsType === 'input' ? 'logisticsCompanyName' : 'logisticsCompany']
11118
+ }, logisticsType === 'input' ? {} : {
11035
11119
  showSearch: true,
11120
+ dropdownMatchSelectWidth: false,
11036
11121
  filterOption: function filterOption(input, option) {
11037
11122
  return option.label.includes(input);
11038
- },
11039
- dropdownMatchSelectWidth: false,
11123
+ }
11124
+ }), {}, {
11040
11125
  style: {
11041
11126
  minWidth: '100px',
11042
11127
  maxWidth: '180px'
11043
11128
  },
11044
11129
  platformType: platformType
11045
- }) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React.createElement(Input, {
11130
+ })) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React.createElement(Input, {
11046
11131
  disabled: disabled,
11047
11132
  placeholder: "\u7269\u6D41\u5355\u53F7",
11048
11133
  onChange: function onChange(e) {
@@ -11082,7 +11167,7 @@ var jstGoods = function jstGoods(props) {
11082
11167
  filterOption: filterOption,
11083
11168
  value: ((_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName) || null,
11084
11169
  onChange: function onChange(value, option) {
11085
- return handleSelected(value, 'sendName', option);
11170
+ return handleSelected(value, 'sendName', option, onlyShowFieldSelect);
11086
11171
  }
11087
11172
  }) : /*#__PURE__*/React.createElement(Input, {
11088
11173
  disabled: disabled,
@@ -12426,199 +12511,1645 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
12426
12511
  };
12427
12512
  var BsE3GoodsModal = /*#__PURE__*/forwardRef(GoodsModal$4);
12428
12513
 
12514
+ var getTableData$2 = function getTableData(_ref, formData) {
12515
+ var current = _ref.current,
12516
+ pageSize = _ref.pageSize;
12517
+ var data = {
12518
+ skuName: formData.skuName || null,
12519
+ skuCode: formData.skuCode || null,
12520
+ goodName: formData.goodName || null,
12521
+ goodNo: formData.goodNo || null
12522
+ };
12523
+ return extendRequest('/qy/gdfw/product/product/page', {
12524
+ method: 'post',
12525
+ data: _objectSpread2({
12526
+ pageSize: pageSize,
12527
+ pageNo: current,
12528
+ platform: 'GY_ERP'
12529
+ }, data)
12530
+ }).then(function (res) {
12531
+ var _res$data = res.data,
12532
+ _res$data$productSkuL = _res$data.productSkuList,
12533
+ productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
12534
+ _res$data$total = _res$data.total,
12535
+ total = _res$data$total === void 0 ? 0 : _res$data$total;
12536
+ var newProducts = productSkuList.map(function (item, index) {
12537
+ return _objectSpread2({}, item);
12538
+ });
12539
+ return {
12540
+ total: total,
12541
+ list: newProducts
12542
+ };
12543
+ });
12544
+ };
12429
12545
  var columns$3 = [{
12430
- dataIndex: 'sku',
12431
- title: "SKU",
12432
- width: 150
12433
- }, {
12434
- dataIndex: 'skuId',
12435
- title: "SKU ID",
12436
- width: 150
12437
- }, {
12438
- dataIndex: 'goodsName',
12439
- title: "\u5546\u54C1\u540D\u79F0",
12440
- width: 150
12441
- }, {
12442
- dataIndex: 'goodsShortName',
12443
- title: "\u5546\u54C1\u7B80\u79F0",
12444
- width: 150
12445
- }, {
12446
- dataIndex: 'picPath',
12447
- title: "\u5546\u54C1\u56FE\u7247",
12448
- width: 150
12546
+ dataIndex: 'index',
12547
+ title: 'NO',
12548
+ render: function render(val, record, index) {
12549
+ return /*#__PURE__*/React.createElement("div", {
12550
+ style: {
12551
+ width: 25
12552
+ }
12553
+ }, index + 1);
12554
+ },
12555
+ width: 80
12449
12556
  }, {
12450
- dataIndex: 'goodsSn',
12451
- title: "\u8D27\u53F7",
12452
- width: 150
12557
+ dataIndex: 'specName',
12558
+ title: 'SKU名称',
12559
+ width: 250,
12560
+ ellipsis: true
12453
12561
  }, {
12454
- dataIndex: 'goodsId',
12455
- title: "\u8D27\u53F7ID",
12456
- width: 150
12562
+ dataIndex: 'specNo',
12563
+ title: 'SKU编码',
12564
+ width: 200,
12565
+ ellipsis: true
12457
12566
  }, {
12458
- dataIndex: 'colorName',
12459
- title: "\u989C\u8272\u540D\u79F0",
12460
- width: 150
12567
+ dataIndex: 'goodName',
12568
+ title: '商品名称',
12569
+ width: 250,
12570
+ ellipsis: true
12461
12571
  }, {
12462
- dataIndex: 'colorCode',
12463
- title: "\u989C\u8272\u4EE3\u7801",
12464
- width: 150
12572
+ dataIndex: 'goodShortName',
12573
+ title: "\u5546\u54C1\u7B80\u79F0",
12574
+ ellipsis: true,
12575
+ width: 250
12465
12576
  }, {
12466
- dataIndex: 'sizeName',
12467
- title: "\u5C3A\u7801\u540D\u79F0",
12468
- width: 150
12577
+ dataIndex: 'goodNo',
12578
+ title: '商品编码',
12579
+ width: 200,
12580
+ ellipsis: true
12469
12581
  }, {
12470
- dataIndex: 'sizeCode',
12471
- title: "\u5C3A\u7801\u4EE3\u7801",
12472
- width: 150
12582
+ dataIndex: 'goodPicUrl',
12583
+ title: '商品图片',
12584
+ width: 100,
12585
+ render: function render(picUrl) {
12586
+ return /*#__PURE__*/React.createElement("img", {
12587
+ style: {
12588
+ width: '40px',
12589
+ height: '40px',
12590
+ objectFit: 'contain'
12591
+ },
12592
+ src: picUrl
12593
+ });
12594
+ }
12473
12595
  }, {
12474
12596
  dataIndex: 'brandName',
12475
- title: "\u54C1\u724C\u540D\u79F0",
12476
- width: 150
12477
- }, {
12478
- dataIndex: 'goodsNumber',
12479
- title: "\u5546\u54C1\u6570\u91CF",
12480
- width: 150
12481
- }, {
12482
- dataIndex: 'goodsPrice',
12483
- title: "\u5546\u54C1\u5355\u4EF7",
12484
- width: 150
12597
+ title: '品牌名称',
12598
+ width: 200,
12599
+ ellipsis: true
12485
12600
  }, {
12486
- dataIndex: 'shopPrice',
12487
- title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
12488
- width: 150
12601
+ dataIndex: 'retailPrice',
12602
+ title: "\u6807\u51C6\u552E\u4EF7",
12603
+ ellipsis: true,
12604
+ width: 100
12489
12605
  }, {
12490
- dataIndex: 'isGift',
12491
- title: "\u662F\u5426\u8D60\u54C1",
12492
- width: 150,
12493
- render: function render(val) {
12494
- return /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
12495
- }
12606
+ dataIndex: 'costPrice',
12607
+ title: "\u6210\u672C\u4EF7",
12608
+ ellipsis: true,
12609
+ width: 100
12496
12610
  }];
12497
- var renderFieldMap = {
12498
- goodsNumber: function goodsNumber(_ref) {
12499
- var disabled = _ref.disabled,
12500
- updateHandle = _ref.updateHandle;
12501
- return function (val, record, index) {
12502
- return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12503
- style: {
12504
- width: 70
12505
- },
12506
- value: val,
12507
- min: 1,
12508
- precision: 0,
12509
- onChange: function onChange(num) {
12510
- return updateHandle(num, index, 'goodsNumber');
12511
- }
12512
- }) : /*#__PURE__*/React.createElement("span", null, val);
12513
- };
12514
- },
12515
- goodsPrice: function goodsPrice(_ref2) {
12516
- var disabled = _ref2.disabled,
12517
- updateHandle = _ref2.updateHandle;
12518
- return function (val, record, index) {
12519
- return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12520
- style: {
12521
- width: 70
12522
- },
12523
- value: val,
12524
- min: 0,
12525
- onChange: function onChange(value) {
12526
- return updateHandle(value, index, 'goodsPrice');
12527
- }
12528
- }) : /*#__PURE__*/React.createElement("span", null, val);
12529
- };
12530
- },
12531
- isGift: function isGift(_ref3) {
12532
- var disabled = _ref3.disabled,
12533
- updateHandle = _ref3.updateHandle;
12534
- return function (val, record, index) {
12535
- var options = [{
12536
- label: '是',
12537
- value: 1
12538
- }, {
12539
- label: '否',
12540
- value: 0
12541
- }];
12542
- return !disabled ? /*#__PURE__*/React.createElement(Select, {
12543
- style: {
12544
- width: 70
12545
- },
12546
- options: options,
12547
- value: val,
12548
- onChange: function onChange(value) {
12549
- return updateHandle(value, index, 'isGift');
12550
- },
12551
- getPopupContainer: function getPopupContainer() {
12552
- return document.getElementById('bsE3ReissueGoods');
12553
- }
12554
- }) : /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
12611
+ var GoodList$2 = function GoodList(props, ref) {
12612
+ var _useState = useState([]),
12613
+ _useState2 = _slicedToArray(_useState, 2),
12614
+ selectList = _useState2[0],
12615
+ setSelect = _useState2[1];
12616
+ var _useState3 = useState([]),
12617
+ _useState4 = _slicedToArray(_useState3, 2),
12618
+ selectIds = _useState4[0],
12619
+ setSelectIds = _useState4[1];
12620
+ useImperativeHandle(ref, function () {
12621
+ return {
12622
+ getSelectGoodList: function getSelectGoodList() {
12623
+ return selectList;
12624
+ }
12555
12625
  };
12556
- }
12557
- };
12558
- var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
12559
- var disabled = _ref4.disabled,
12560
- updateHandle = _ref4.updateHandle,
12561
- operate = _ref4.operate;
12562
- return columns$3.map(function (item) {
12626
+ });
12627
+ var _Form$useForm = Form.useForm(),
12628
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
12629
+ form = _Form$useForm2[0];
12630
+ var _useAntdTable = useAntdTable(getTableData$2, {
12631
+ defaultPageSize: 10,
12632
+ form: form
12633
+ }),
12634
+ tableProps = _useAntdTable.tableProps,
12635
+ search = _useAntdTable.search,
12636
+ params = _useAntdTable.params;
12637
+ var submit = search.submit,
12638
+ reset = search.reset;
12639
+ var advanceSearchForm = /*#__PURE__*/React.createElement(Form, {
12640
+ layout: "inline",
12641
+ form: form
12642
+ }, /*#__PURE__*/React.createElement(Form.Item, {
12643
+ name: "skuName",
12644
+ style: {
12645
+ marginBottom: '12px'
12646
+ }
12647
+ }, /*#__PURE__*/React.createElement(Input, {
12648
+ placeholder: "\u5546\u54C1sku\u540D\u79F0",
12649
+ allowClear: true,
12650
+ style: {
12651
+ width: 150
12652
+ }
12653
+ })), /*#__PURE__*/React.createElement(Form.Item, {
12654
+ name: "skuCode",
12655
+ style: {
12656
+ marginBottom: '12px'
12657
+ }
12658
+ }, /*#__PURE__*/React.createElement(Input, {
12659
+ placeholder: "\u5546\u54C1sku\u7F16\u7801",
12660
+ allowClear: true,
12661
+ style: {
12662
+ width: 150
12663
+ }
12664
+ })), /*#__PURE__*/React.createElement(Form.Item, {
12665
+ name: "goodName",
12666
+ style: {
12667
+ marginBottom: '12px'
12668
+ }
12669
+ }, /*#__PURE__*/React.createElement(Input, {
12670
+ placeholder: "\u5546\u54C1\u540D\u79F0",
12671
+ allowClear: true,
12672
+ style: {
12673
+ width: 150
12674
+ }
12675
+ })), /*#__PURE__*/React.createElement(Form.Item, {
12676
+ name: "goodNo",
12677
+ style: {
12678
+ marginBottom: '12px'
12679
+ }
12680
+ }, /*#__PURE__*/React.createElement(Input, {
12681
+ placeholder: "\u5546\u54C1\u7F16\u7801",
12682
+ allowClear: true,
12683
+ style: {
12684
+ width: 150
12685
+ }
12686
+ })), /*#__PURE__*/React.createElement(Form.Item, {
12687
+ style: {
12688
+ marginBottom: '12px'
12689
+ }
12690
+ }, /*#__PURE__*/React.createElement(Button, {
12691
+ type: "primary",
12692
+ style: {
12693
+ marginRight: '8px'
12694
+ },
12695
+ onClick: submit
12696
+ }, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
12697
+ onClick: reset
12698
+ }, "\u91CD\u7F6E")));
12699
+ var rowSelection = {
12700
+ selectedRowKeys: selectIds,
12701
+ fixed: true,
12702
+ onSelect: function onSelect(record, selected) {
12703
+ if (selected) {
12704
+ setSelectIds([].concat(_toConsumableArray(selectIds), [record.specNo]));
12705
+ setSelect([].concat(_toConsumableArray(selectList), [record]));
12706
+ } else {
12707
+ setSelectIds(selectIds.filter(function (t) {
12708
+ return t !== record.specNo;
12709
+ }));
12710
+ setSelect(selectList.filter(function (t) {
12711
+ return t.specNo !== record.specNo;
12712
+ }));
12713
+ }
12714
+ },
12715
+ onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
12716
+ if (selected) {
12717
+ setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
12718
+ return t.specNo;
12719
+ }))));
12720
+ setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
12721
+ } else {
12722
+ setSelectIds(difference(selectIds, changeRows.map(function (t) {
12723
+ return t.specNo;
12724
+ })));
12725
+ var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
12726
+ return arrVal.specNo !== othVal.specNo;
12727
+ });
12728
+ setSelect(list);
12729
+ }
12730
+ }
12731
+ };
12732
+ var showTable = function showTable() {
12733
+ var handleDelete = function handleDelete(record) {
12734
+ setSelectIds(selectIds.filter(function (t) {
12735
+ return t !== record.specNo;
12736
+ }));
12737
+ setSelect(selectList.filter(function (t) {
12738
+ return t.specNo !== record.specNo;
12739
+ }));
12740
+ };
12741
+ var showColumns = [{
12742
+ dataIndex: '',
12743
+ title: "\u64CD\u4F5C",
12744
+ ellipsis: true,
12745
+ width: 100,
12746
+ render: function render(val, record) {
12747
+ return /*#__PURE__*/React.createElement(Button, {
12748
+ type: "link",
12749
+ onClick: function onClick() {
12750
+ return handleDelete(record);
12751
+ }
12752
+ }, "\u5220\u9664");
12753
+ }
12754
+ }].concat(takeRight(columns$3, columns$3.length - 1));
12755
+ return selectList.length ? /*#__PURE__*/React.createElement("div", {
12756
+ style: {
12757
+ width: '100%',
12758
+ maxWidth: '387px'
12759
+ }
12760
+ }, /*#__PURE__*/React.createElement(Table, {
12761
+ columns: showColumns,
12762
+ rowKey: 'specNo',
12763
+ dataSource: selectList,
12764
+ scroll: {
12765
+ x: '100%',
12766
+ y: 250
12767
+ },
12768
+ pagination: {
12769
+ size: 'small',
12770
+ total: selectIds.length,
12771
+ pageSize: 10,
12772
+ showSizeChanger: false
12773
+ }
12774
+ })) : null;
12775
+ };
12776
+ return /*#__PURE__*/React.createElement(React.Fragment, null, advanceSearchForm, /*#__PURE__*/React.createElement("div", {
12777
+ style: {
12778
+ marginTop: '4px'
12779
+ }
12780
+ }, /*#__PURE__*/React.createElement(Table, _objectSpread2({
12781
+ rowSelection: rowSelection,
12782
+ rowKey: "specNo",
12783
+ columns: columns$3,
12784
+ scroll: {
12785
+ x: '100%',
12786
+ y: 250
12787
+ }
12788
+ }, tableProps))), /*#__PURE__*/React.createElement(Popover, {
12789
+ getPopupContainer: function getPopupContainer(triggerNode) {
12790
+ return triggerNode.parentElement;
12791
+ },
12792
+ content: showTable(),
12793
+ title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
12794
+ }, /*#__PURE__*/React.createElement(Button, {
12795
+ danger: true,
12796
+ type: "text"
12797
+ }, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
12798
+ };
12799
+ var GyGoodsList = /*#__PURE__*/forwardRef(GoodList$2);
12800
+
12801
+ var GyGoodsModal = function GyGoodsModal(props, ref) {
12802
+ useImperativeHandle(ref, function () {
12803
+ return {
12804
+ open: function open() {
12805
+ setVisible(true);
12806
+ }
12807
+ };
12808
+ });
12809
+ var onSubmit = props.onSubmit,
12810
+ width = props.width;
12811
+ var _useState = useState(false),
12812
+ _useState2 = _slicedToArray(_useState, 2),
12813
+ visible = _useState2[0],
12814
+ setVisible = _useState2[1];
12815
+ var gyGoodsListRef = useRef(null);
12816
+ var _onCancel = function onCancel() {
12817
+ setVisible(false);
12818
+ };
12819
+ var onOk = function onOk() {
12820
+ var _gyGoodsListRef$curre;
12821
+ var selectedList = ((_gyGoodsListRef$curre = gyGoodsListRef.current) === null || _gyGoodsListRef$curre === void 0 ? void 0 : _gyGoodsListRef$curre.getSelectGoodList()) || [];
12822
+ onSubmit(selectedList);
12823
+ _onCancel();
12824
+ };
12825
+ return /*#__PURE__*/React.createElement(React.Fragment, null, visible && /*#__PURE__*/React.createElement(Modal, {
12826
+ title: '选择商品',
12827
+ okText: '确认',
12828
+ cancelText: '取消',
12829
+ visible: visible,
12830
+ width: width || 850,
12831
+ onCancel: function onCancel() {
12832
+ _onCancel();
12833
+ },
12834
+ onOk: onOk,
12835
+ wrapClassName: "goodModal"
12836
+ }, /*#__PURE__*/React.createElement(GyGoodsList, {
12837
+ ref: gyGoodsListRef
12838
+ })));
12839
+ };
12840
+ var GyGoodsModal$1 = /*#__PURE__*/forwardRef(GyGoodsModal);
12841
+
12842
+ var getColumns = function getColumns(_ref) {
12843
+ var _ref$text = _ref.text,
12844
+ disabled = _ref.disabled,
12845
+ updateHandle = _ref.updateHandle;
12846
+ return {
12847
+ //百胜E3补发商品
12848
+ BS_E3_REISSUE_GOODS: [{
12849
+ dataIndex: 'sku',
12850
+ title: "SKU",
12851
+ width: 150
12852
+ }, {
12853
+ dataIndex: 'skuId',
12854
+ title: "SKU ID",
12855
+ width: 150
12856
+ }, {
12857
+ dataIndex: 'goodsName',
12858
+ title: "\u5546\u54C1\u540D\u79F0",
12859
+ width: 150
12860
+ }, {
12861
+ dataIndex: 'goodsShortName',
12862
+ title: "\u5546\u54C1\u7B80\u79F0",
12863
+ width: 150
12864
+ }, {
12865
+ dataIndex: 'picPath',
12866
+ title: "\u5546\u54C1\u56FE\u7247",
12867
+ width: 150,
12868
+ render: function render(val) {
12869
+ return /*#__PURE__*/React.createElement(Image, {
12870
+ width: 60,
12871
+ src: val
12872
+ });
12873
+ }
12874
+ }, {
12875
+ dataIndex: 'goodsSn',
12876
+ title: "\u8D27\u53F7",
12877
+ width: 150
12878
+ }, {
12879
+ dataIndex: 'goodsId',
12880
+ title: "\u8D27\u53F7ID",
12881
+ width: 150
12882
+ }, {
12883
+ dataIndex: 'colorName',
12884
+ title: "\u989C\u8272\u540D\u79F0",
12885
+ width: 150
12886
+ }, {
12887
+ dataIndex: 'colorCode',
12888
+ title: "\u989C\u8272\u4EE3\u7801",
12889
+ width: 150
12890
+ }, {
12891
+ dataIndex: 'sizeName',
12892
+ title: "\u5C3A\u7801\u540D\u79F0",
12893
+ width: 150
12894
+ }, {
12895
+ dataIndex: 'sizeCode',
12896
+ title: "\u5C3A\u7801\u4EE3\u7801",
12897
+ width: 150
12898
+ }, {
12899
+ dataIndex: 'brandName',
12900
+ title: "\u54C1\u724C\u540D\u79F0",
12901
+ width: 150
12902
+ }, {
12903
+ dataIndex: 'goodsNumber',
12904
+ title: "\u5546\u54C1\u6570\u91CF",
12905
+ width: 150
12906
+ }, {
12907
+ dataIndex: 'goodsPrice',
12908
+ title: "\u5546\u54C1\u5355\u4EF7",
12909
+ width: 150
12910
+ }, {
12911
+ dataIndex: 'shopPrice',
12912
+ title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
12913
+ width: 150
12914
+ }, {
12915
+ dataIndex: 'isGift',
12916
+ title: "\u662F\u5426\u8D60\u54C1",
12917
+ width: 150,
12918
+ render: function render(val) {
12919
+ return /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
12920
+ }
12921
+ }],
12922
+ //百胜E3商品信息
12923
+ BS_E3_GOODS: [{
12924
+ dataIndex: 'sku',
12925
+ title: "SKU",
12926
+ align: 'center',
12927
+ ellipsis: true,
12928
+ width: 150
12929
+ }, {
12930
+ dataIndex: 'skuId',
12931
+ title: "SKU ID",
12932
+ align: 'center',
12933
+ ellipsis: true,
12934
+ width: 150
12935
+ }, {
12936
+ dataIndex: 'goodsName',
12937
+ title: "\u5546\u54C1\u540D\u79F0",
12938
+ align: 'center',
12939
+ ellipsis: true,
12940
+ width: 150
12941
+ }, {
12942
+ dataIndex: 'goodsShortName',
12943
+ title: "\u5546\u54C1\u7B80\u79F0",
12944
+ align: 'center',
12945
+ ellipsis: true,
12946
+ width: 100
12947
+ }, {
12948
+ dataIndex: 'picPath',
12949
+ title: "\u5546\u54C1\u56FE\u7247",
12950
+ align: 'center',
12951
+ ellipsis: true,
12952
+ width: 100,
12953
+ render: function render(val) {
12954
+ return /*#__PURE__*/React.createElement(Image, {
12955
+ width: 60,
12956
+ src: val
12957
+ });
12958
+ }
12959
+ }, {
12960
+ dataIndex: 'goodsSn',
12961
+ title: "\u8D27\u53F7",
12962
+ align: 'center',
12963
+ ellipsis: true,
12964
+ width: 150
12965
+ }, {
12966
+ dataIndex: 'goodsId',
12967
+ title: "\u8D27\u53F7ID",
12968
+ align: 'center',
12969
+ ellipsis: true,
12970
+ width: 150
12971
+ }, {
12972
+ dataIndex: 'colorName',
12973
+ title: "\u989C\u8272\u540D\u79F0",
12974
+ align: 'center',
12975
+ ellipsis: true,
12976
+ width: 100
12977
+ }, {
12978
+ dataIndex: 'colorCode',
12979
+ title: "\u989C\u8272\u4EE3\u7801",
12980
+ align: 'center',
12981
+ ellipsis: true,
12982
+ width: 150
12983
+ }, {
12984
+ dataIndex: 'sizeName',
12985
+ title: "\u5C3A\u7801\u540D\u79F0",
12986
+ align: 'center',
12987
+ ellipsis: true,
12988
+ width: 100
12989
+ }, {
12990
+ dataIndex: 'sizeCode',
12991
+ title: "\u5C3A\u7801\u4EE3\u7801",
12992
+ align: 'center',
12993
+ ellipsis: true,
12994
+ width: 100
12995
+ }, {
12996
+ dataIndex: 'brandName',
12997
+ title: "\u54C1\u724C\u540D\u79F0",
12998
+ align: 'center',
12999
+ ellipsis: true,
13000
+ width: 150
13001
+ }, {
13002
+ dataIndex: 'goodsNumber',
13003
+ title: "\u5546\u54C1\u6570\u91CF",
13004
+ align: 'center',
13005
+ ellipsis: true,
13006
+ width: 100,
13007
+ render: function render(val, record, index) {
13008
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13009
+ style: {
13010
+ width: 70
13011
+ },
13012
+ value: val,
13013
+ min: 1,
13014
+ precision: 0,
13015
+ onChange: function onChange(num) {
13016
+ return updateHandle(num, index, 'goodsNumber');
13017
+ }
13018
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13019
+ }
13020
+ }, {
13021
+ dataIndex: 'goodsPrice',
13022
+ title: "\u5546\u54C1\u5355\u4EF7",
13023
+ align: 'center',
13024
+ ellipsis: true,
13025
+ width: 120,
13026
+ render: function render(val, record, index) {
13027
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13028
+ style: {
13029
+ width: 70
13030
+ },
13031
+ value: val,
13032
+ min: 0,
13033
+ precision: 2,
13034
+ onChange: function onChange(num) {
13035
+ return updateHandle(num, index, 'goodsPrice');
13036
+ }
13037
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13038
+ }
13039
+ }, {
13040
+ dataIndex: 'shopPrice',
13041
+ title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
13042
+ align: 'center',
13043
+ ellipsis: true,
13044
+ width: 120
13045
+ }, {
13046
+ dataIndex: 'sharePrice',
13047
+ title: "\u5206\u644A\u4EF7",
13048
+ align: 'center',
13049
+ ellipsis: true,
13050
+ width: 120
13051
+ }, {
13052
+ dataIndex: 'sharePayment',
13053
+ title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
13054
+ align: 'center',
13055
+ ellipsis: true,
13056
+ width: 120
13057
+ }, {
13058
+ dataIndex: 'payment',
13059
+ title: "\u5B9E\u4ED8\u91D1\u989D",
13060
+ align: 'center',
13061
+ ellipsis: true,
13062
+ width: 120,
13063
+ render: function render(val, record, index) {
13064
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13065
+ style: {
13066
+ width: 70
13067
+ },
13068
+ value: val,
13069
+ min: 0,
13070
+ precision: 2,
13071
+ onChange: function onChange(num) {
13072
+ return updateHandle(num, index, 'payment');
13073
+ }
13074
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13075
+ }
13076
+ }, {
13077
+ dataIndex: 'tcSku',
13078
+ title: "\u5957\u9910SKU",
13079
+ align: 'center',
13080
+ ellipsis: true,
13081
+ width: 150
13082
+ }, {
13083
+ dataIndex: 'tcGoodsNumber',
13084
+ title: "\u5957\u9910\u5957\u6570",
13085
+ align: 'center',
13086
+ ellipsis: true,
13087
+ width: 100
13088
+ }, {
13089
+ dataIndex: 'taoCanSingleSl',
13090
+ title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
13091
+ align: 'center',
13092
+ ellipsis: true,
13093
+ width: 100
13094
+ }, {
13095
+ dataIndex: 'isGift',
13096
+ title: "\u662F\u5426\u8D60\u54C1",
13097
+ align: 'center',
13098
+ ellipsis: true,
13099
+ width: 100,
13100
+ render: function render(val) {
13101
+ return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
13102
+ }
13103
+ }]
13104
+ };
13105
+ };
13106
+
13107
+ var getColumns$1 = function getColumns(_ref) {
13108
+ var _ref$text = _ref.text,
13109
+ text = _ref$text === void 0 ? '' : _ref$text,
13110
+ disabled = _ref.disabled,
13111
+ updateHandle = _ref.updateHandle;
13112
+ return {
13113
+ //bs商品信息
13114
+ BS_GOODS: [{
13115
+ dataIndex: 'mark',
13116
+ title: "\u5546\u54C1\u6807\u8BB0",
13117
+ align: 'center',
13118
+ ellipsis: true,
13119
+ width: 70,
13120
+ render: function render(val, record, index) {
13121
+ return /*#__PURE__*/React.createElement(Select, {
13122
+ options: [{
13123
+ label: '是',
13124
+ value: '是'
13125
+ }, {
13126
+ label: '否',
13127
+ value: '否'
13128
+ }],
13129
+ disabled: disabled,
13130
+ value: val,
13131
+ onChange: function onChange(val) {
13132
+ return updateHandle(val, index, 'mark');
13133
+ }
13134
+ });
13135
+ }
13136
+ }, {
13137
+ dataIndex: 'skuName',
13138
+ title: "".concat(text, "sku\u540D\u79F0"),
13139
+ align: 'center',
13140
+ ellipsis: true,
13141
+ width: 250
13142
+ }, {
13143
+ dataIndex: 'sku',
13144
+ title: "".concat(text, "sku\u7F16\u7801"),
13145
+ align: 'center',
13146
+ ellipsis: true,
13147
+ width: 100
13148
+ }, {
13149
+ dataIndex: 'name',
13150
+ title: "".concat(text, "\u540D\u79F0"),
13151
+ align: 'center',
13152
+ ellipsis: true,
13153
+ width: 250
13154
+ }, {
13155
+ dataIndex: 'pic',
13156
+ title: "\u56FE\u7247",
13157
+ align: 'center',
13158
+ ellipsis: true,
13159
+ width: 100,
13160
+ render: function render(val) {
13161
+ return /*#__PURE__*/React.createElement(Image, {
13162
+ width: 60,
13163
+ src: val
13164
+ });
13165
+ }
13166
+ }, {
13167
+ dataIndex: 'code',
13168
+ title: "".concat(text, "\u7F16\u7801"),
13169
+ align: 'center',
13170
+ ellipsis: true,
13171
+ width: 100
13172
+ }, {
13173
+ dataIndex: 'money',
13174
+ title: "\u5B9E\u4ED8\u91D1\u989D",
13175
+ align: 'center',
13176
+ ellipsis: true,
13177
+ width: 100
13178
+ }, {
13179
+ dataIndex: 'number',
13180
+ title: "".concat(text, "\u6570\u91CF"),
13181
+ align: 'center',
13182
+ ellipsis: true,
13183
+ width: 100,
13184
+ render: function render(val, record, index) {
13185
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13186
+ style: {
13187
+ width: 70
13188
+ },
13189
+ value: val,
13190
+ min: 1,
13191
+ precision: 0,
13192
+ onChange: function onChange(num) {
13193
+ return updateHandle(num, index, 'number');
13194
+ }
13195
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13196
+ }
13197
+ }, {
13198
+ dataIndex: 'share',
13199
+ title: "\u5206\u644A\u4EF7",
13200
+ align: 'center',
13201
+ ellipsis: true,
13202
+ width: 70
13203
+ }, {
13204
+ dataIndex: 'type',
13205
+ title: "\u8D60\u54C1\u7C7B\u578B",
13206
+ align: 'center',
13207
+ ellipsis: true,
13208
+ width: 100
13209
+ }, {
13210
+ dataIndex: 'batch',
13211
+ title: "\u6279\u6B21\u53F7",
13212
+ align: 'center',
13213
+ ellipsis: true,
13214
+ width: 100
13215
+ }, {
13216
+ dataIndex: 'expireDate',
13217
+ title: "\u6709\u6548\u671F",
13218
+ align: 'center',
13219
+ ellipsis: true,
13220
+ width: 100
13221
+ }]
13222
+ };
13223
+ };
13224
+
13225
+ var renderGiftType = function renderGiftType(val) {
13226
+ var giftTypeMap = {
13227
+ 0: '非赠品',
13228
+ 1: '自动赠送',
13229
+ 2: '手工赠送',
13230
+ 3: '回购自动送赠品',
13231
+ 4: '前N有礼送赠品',
13232
+ 6: '天猫优仓赠品',
13233
+ 7: '淘宝CRM会员送赠'
13234
+ };
13235
+ return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
13236
+ };
13237
+ var renderFieldMap = {
13238
+ num: function num(_ref) {
13239
+ var disabled = _ref.disabled,
13240
+ updateHandle = _ref.updateHandle;
13241
+ return function (val, record, index) {
13242
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13243
+ style: {
13244
+ width: 70
13245
+ },
13246
+ value: val,
13247
+ min: 1,
13248
+ precision: 0,
13249
+ onChange: function onChange(num) {
13250
+ return updateHandle(num, index, 'num');
13251
+ }
13252
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13253
+ };
13254
+ },
13255
+ giftType: function giftType() {
13256
+ return renderGiftType;
13257
+ }
13258
+ };
13259
+ var getWdtReissueGoodColumns = function getWdtReissueGoodColumns(_ref2) {
13260
+ var disabled = _ref2.disabled,
13261
+ updateHandle = _ref2.updateHandle,
13262
+ operate = _ref2.operate;
13263
+ return getColumnsMap()['WDT_REISSUE_GOODS'].map(function (item) {
12563
13264
  var newItem = _objectSpread2({
12564
13265
  align: 'center',
12565
- ellipsis: true
12566
- }, item);
12567
- if (operate && (renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex])) {
12568
- return _objectSpread2(_objectSpread2({}, newItem), {}, {
12569
- render: renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex]({
12570
- disabled: disabled,
12571
- updateHandle: updateHandle
12572
- })
12573
- });
12574
- }
12575
- return newItem;
13266
+ ellipsis: true
13267
+ }, item);
13268
+ if (operate && (renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex])) {
13269
+ return _objectSpread2(_objectSpread2({}, newItem), {}, {
13270
+ render: renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex]({
13271
+ disabled: disabled,
13272
+ updateHandle: updateHandle
13273
+ })
13274
+ });
13275
+ }
13276
+ return newItem;
13277
+ });
13278
+ };
13279
+
13280
+ var getColumns$2 = function getColumns(_ref) {
13281
+ var _ref$text = _ref.text,
13282
+ text = _ref$text === void 0 ? '' : _ref$text,
13283
+ disabled = _ref.disabled,
13284
+ updateHandle = _ref.updateHandle;
13285
+ return {
13286
+ //旺店通补发商品信息
13287
+ WDT_REISSUE_GOODS: [{
13288
+ dataIndex: 'goodId',
13289
+ title: "\u5546\u54C1ID",
13290
+ width: 120
13291
+ }, {
13292
+ dataIndex: 'goodNo',
13293
+ title: "\u5546\u54C1\u7F16\u7801",
13294
+ width: 200
13295
+ }, {
13296
+ dataIndex: 'goodName',
13297
+ title: "\u5546\u54C1\u540D\u79F0",
13298
+ width: 200
13299
+ }, {
13300
+ dataIndex: 'specId',
13301
+ title: "SKUID",
13302
+ width: 150
13303
+ }, {
13304
+ dataIndex: 'specNo',
13305
+ title: "\u5546\u54C1SKU\u7F16\u7801",
13306
+ width: 200
13307
+ }, {
13308
+ dataIndex: 'specName',
13309
+ title: "\u5546\u54C1SKU\u540D\u79F0",
13310
+ width: 250
13311
+ }, {
13312
+ dataIndex: 'orderPrice',
13313
+ title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
13314
+ width: 200
13315
+ }, {
13316
+ dataIndex: 'num',
13317
+ title: "\u6570\u91CF",
13318
+ width: 100
13319
+ }, {
13320
+ dataIndex: 'sharePrice',
13321
+ title: "\u5206\u644A\u4EF7",
13322
+ width: 150
13323
+ }, {
13324
+ dataIndex: 'giftType',
13325
+ title: "\u8D60\u54C1\u65B9\u5F0F",
13326
+ width: 100,
13327
+ render: renderGiftType
13328
+ }],
13329
+ //旺店通商品信息
13330
+ WDT_GOODS: [{
13331
+ dataIndex: 'goodId',
13332
+ title: "\u5546\u54C1ID",
13333
+ align: 'center',
13334
+ ellipsis: true,
13335
+ width: 70
13336
+ }, {
13337
+ dataIndex: 'goodNo',
13338
+ title: "\u5546\u54C1\u7F16\u7801",
13339
+ align: 'center',
13340
+ ellipsis: true,
13341
+ width: 180
13342
+ }, {
13343
+ dataIndex: 'goodName',
13344
+ title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
13345
+ align: 'center',
13346
+ ellipsis: true,
13347
+ width: 250
13348
+ }, {
13349
+ dataIndex: 'specId',
13350
+ title: "".concat(text, "SKUID"),
13351
+ align: 'center',
13352
+ ellipsis: true,
13353
+ width: 100
13354
+ }, {
13355
+ dataIndex: 'specNo',
13356
+ title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
13357
+ align: 'center',
13358
+ ellipsis: true,
13359
+ width: 180
13360
+ }, {
13361
+ dataIndex: 'specName',
13362
+ title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
13363
+ align: 'center',
13364
+ ellipsis: true,
13365
+ width: 250
13366
+ }, {
13367
+ dataIndex: 'orderPrice',
13368
+ title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
13369
+ align: 'center',
13370
+ ellipsis: true,
13371
+ width: 100
13372
+ }, {
13373
+ dataIndex: 'num',
13374
+ title: "".concat(text, "\u6570\u91CF"),
13375
+ align: 'center',
13376
+ ellipsis: true,
13377
+ width: 100,
13378
+ render: function render(val, record, index) {
13379
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13380
+ style: {
13381
+ width: 70
13382
+ },
13383
+ value: val,
13384
+ min: 1,
13385
+ precision: 0,
13386
+ onChange: function onChange(num) {
13387
+ return updateHandle(num, index, 'num');
13388
+ }
13389
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13390
+ }
13391
+ }, {
13392
+ dataIndex: 'sharePrice',
13393
+ title: "\u5206\u644A\u4EF7",
13394
+ align: 'center',
13395
+ ellipsis: true,
13396
+ width: 70
13397
+ }, {
13398
+ dataIndex: 'giftType',
13399
+ title: "\u8D60\u54C1\u65B9\u5F0F",
13400
+ align: 'center',
13401
+ ellipsis: true,
13402
+ width: 100,
13403
+ render: function render(val) {
13404
+ var giftTypeMap = {
13405
+ 0: '非赠品',
13406
+ 1: '自动赠送',
13407
+ 2: '手工赠送',
13408
+ 3: '回购自动送赠品',
13409
+ 4: '前N有礼送赠品',
13410
+ 6: '天猫优仓赠品',
13411
+ 7: '淘宝CRM会员送赠'
13412
+ };
13413
+ return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
13414
+ }
13415
+ }],
13416
+ //旺店通退货商品信息
13417
+ WDT_RETURN_GOODS: [{
13418
+ dataIndex: 'goodId',
13419
+ title: "\u5546\u54C1ID",
13420
+ align: 'center',
13421
+ ellipsis: true,
13422
+ width: 70
13423
+ }, {
13424
+ dataIndex: 'goodNo',
13425
+ title: "\u5546\u54C1\u7F16\u7801",
13426
+ align: 'center',
13427
+ ellipsis: true,
13428
+ width: 180
13429
+ }, {
13430
+ dataIndex: 'goodName',
13431
+ title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
13432
+ align: 'center',
13433
+ ellipsis: true,
13434
+ width: 250
13435
+ }, {
13436
+ dataIndex: 'specId',
13437
+ title: "".concat(text, "SKUID"),
13438
+ align: 'center',
13439
+ ellipsis: true,
13440
+ width: 100
13441
+ }, {
13442
+ dataIndex: 'specNo',
13443
+ title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
13444
+ align: 'center',
13445
+ ellipsis: true,
13446
+ width: 180
13447
+ }, {
13448
+ dataIndex: 'specName',
13449
+ title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
13450
+ align: 'center',
13451
+ ellipsis: true,
13452
+ width: 250
13453
+ }, {
13454
+ dataIndex: 'num',
13455
+ title: "".concat(text, "\u9000\u8D27\u6570\u91CF"),
13456
+ align: 'center',
13457
+ ellipsis: true,
13458
+ width: 100,
13459
+ render: function render(val, record, index) {
13460
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13461
+ style: {
13462
+ width: 70
13463
+ },
13464
+ value: val,
13465
+ min: 1,
13466
+ precision: 0,
13467
+ onChange: function onChange(num) {
13468
+ return updateHandle(num, index, 'num');
13469
+ }
13470
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13471
+ }
13472
+ }, {
13473
+ dataIndex: 'sharePrice',
13474
+ title: "\u5206\u644A\u4EF7",
13475
+ align: 'center',
13476
+ ellipsis: true,
13477
+ width: 80,
13478
+ render: function render(val, record, index) {
13479
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13480
+ style: {
13481
+ width: 70
13482
+ },
13483
+ value: val,
13484
+ min: 0,
13485
+ onChange: function onChange(value) {
13486
+ return updateHandle(value, index, 'sharePrice');
13487
+ }
13488
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13489
+ }
13490
+ }, {
13491
+ dataIndex: 'returnPrice',
13492
+ title: "".concat(text, "\u9000\u8D27\u91D1\u989D"),
13493
+ align: 'center',
13494
+ ellipsis: true,
13495
+ width: 100
13496
+ }, {
13497
+ dataIndex: 'giftType',
13498
+ title: "\u8D60\u54C1\u65B9\u5F0F",
13499
+ align: 'center',
13500
+ ellipsis: true,
13501
+ width: 100,
13502
+ render: function render(val) {
13503
+ var giftTypeMap = {
13504
+ 0: '非赠品',
13505
+ 1: '自动赠送',
13506
+ 2: '手工赠送',
13507
+ 3: '回购自动送赠品',
13508
+ 4: '前N有礼送赠品',
13509
+ 6: '天猫优仓赠品',
13510
+ 7: '淘宝CRM会员送赠'
13511
+ };
13512
+ return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
13513
+ }
13514
+ }, {
13515
+ dataIndex: 'type',
13516
+ title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
13517
+ align: 'center',
13518
+ ellipsis: true,
13519
+ width: 100,
13520
+ render: function render(val, record, index) {
13521
+ var options = [{
13522
+ label: '单品',
13523
+ value: '1'
13524
+ }, {
13525
+ label: '组合装',
13526
+ value: '2'
13527
+ }];
13528
+ return !disabled ? /*#__PURE__*/React.createElement(Select, {
13529
+ style: {
13530
+ width: 70
13531
+ },
13532
+ options: options,
13533
+ value: val,
13534
+ onChange: function onChange(value) {
13535
+ return updateHandle(value, index, 'type');
13536
+ }
13537
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13538
+ }
13539
+ }],
13540
+ //旺店通换出商品信息
13541
+ WDT_EXCHANGE_GOODS: [{
13542
+ dataIndex: 'goodId',
13543
+ title: "\u5546\u54C1ID",
13544
+ align: 'center',
13545
+ ellipsis: true,
13546
+ width: 70
13547
+ }, {
13548
+ dataIndex: 'goodNo',
13549
+ title: "\u5546\u54C1\u7F16\u7801",
13550
+ align: 'center',
13551
+ ellipsis: true,
13552
+ width: 180
13553
+ }, {
13554
+ dataIndex: 'goodName',
13555
+ title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
13556
+ align: 'center',
13557
+ ellipsis: true,
13558
+ width: 250
13559
+ }, {
13560
+ dataIndex: 'specId',
13561
+ title: "".concat(text, "SKUID"),
13562
+ align: 'center',
13563
+ ellipsis: true,
13564
+ width: 100
13565
+ }, {
13566
+ dataIndex: 'specNo',
13567
+ title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
13568
+ align: 'center',
13569
+ ellipsis: true,
13570
+ width: 180
13571
+ }, {
13572
+ dataIndex: 'specName',
13573
+ title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
13574
+ align: 'center',
13575
+ ellipsis: true,
13576
+ width: 250
13577
+ }, {
13578
+ dataIndex: 'num',
13579
+ title: "".concat(text, "\u6362\u51FA\u6570\u91CF"),
13580
+ align: 'center',
13581
+ ellipsis: true,
13582
+ width: 100,
13583
+ render: function render(val, record, index) {
13584
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13585
+ style: {
13586
+ width: 70
13587
+ },
13588
+ value: val,
13589
+ min: 1,
13590
+ precision: 0,
13591
+ onChange: function onChange(num) {
13592
+ return updateHandle(num, index, 'num');
13593
+ }
13594
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13595
+ }
13596
+ }, {
13597
+ dataIndex: 'price',
13598
+ title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
13599
+ align: 'center',
13600
+ ellipsis: true,
13601
+ width: 100,
13602
+ render: function render(val, record, index) {
13603
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13604
+ style: {
13605
+ width: 70
13606
+ },
13607
+ value: val,
13608
+ min: 0,
13609
+ onChange: function onChange(value) {
13610
+ return updateHandle(value, index, 'price');
13611
+ }
13612
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13613
+ }
13614
+ }, {
13615
+ dataIndex: 'exchangePrice',
13616
+ title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
13617
+ align: 'center',
13618
+ ellipsis: true,
13619
+ width: 100
13620
+ }, {
13621
+ dataIndex: 'giftType',
13622
+ title: "\u8D60\u54C1\u65B9\u5F0F",
13623
+ align: 'center',
13624
+ ellipsis: true,
13625
+ width: 100,
13626
+ render: function render(val) {
13627
+ var giftTypeMap = {
13628
+ 0: '非赠品',
13629
+ 1: '自动赠送',
13630
+ 2: '手工赠送',
13631
+ 3: '回购自动送赠品',
13632
+ 4: '前N有礼送赠品',
13633
+ 6: '天猫优仓赠品',
13634
+ 7: '淘宝CRM会员送赠'
13635
+ };
13636
+ return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
13637
+ }
13638
+ }, {
13639
+ dataIndex: 'type',
13640
+ title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
13641
+ align: 'center',
13642
+ ellipsis: true,
13643
+ width: 100,
13644
+ render: function render(val, record, index) {
13645
+ var options = [{
13646
+ label: '单品',
13647
+ value: '1'
13648
+ }, {
13649
+ label: '组合装',
13650
+ value: '2'
13651
+ }];
13652
+ return !disabled ? /*#__PURE__*/React.createElement(Select, {
13653
+ style: {
13654
+ width: 70
13655
+ },
13656
+ options: options,
13657
+ value: val,
13658
+ onChange: function onChange(value) {
13659
+ return updateHandle(value, index, 'type');
13660
+ }
13661
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13662
+ }
13663
+ }]
13664
+ };
13665
+ };
13666
+
13667
+ var getColumns$3 = function getColumns(_ref) {
13668
+ var _ref$text = _ref.text,
13669
+ text = _ref$text === void 0 ? '' : _ref$text,
13670
+ disabled = _ref.disabled,
13671
+ updateHandle = _ref.updateHandle;
13672
+ return {
13673
+ //万里牛商品信息
13674
+ WLN_GOODS: [{
13675
+ dataIndex: 'skuName',
13676
+ title: "".concat(text, "sku\u540D\u79F0"),
13677
+ align: 'center',
13678
+ ellipsis: true,
13679
+ width: 250
13680
+ }, {
13681
+ dataIndex: 'sku',
13682
+ title: "".concat(text, "sku\u7F16\u7801"),
13683
+ align: 'center',
13684
+ ellipsis: true,
13685
+ width: 100
13686
+ }, {
13687
+ dataIndex: 'name',
13688
+ title: "".concat(text, "\u540D\u79F0"),
13689
+ align: 'center',
13690
+ ellipsis: true,
13691
+ width: 250
13692
+ }, {
13693
+ dataIndex: 'pic',
13694
+ title: "\u56FE\u7247",
13695
+ align: 'center',
13696
+ ellipsis: true,
13697
+ width: 100,
13698
+ render: function render(val) {
13699
+ return /*#__PURE__*/React.createElement(Image, {
13700
+ width: 60,
13701
+ src: val
13702
+ });
13703
+ }
13704
+ }, {
13705
+ dataIndex: 'code',
13706
+ title: "".concat(text, "\u7F16\u7801"),
13707
+ align: 'center',
13708
+ ellipsis: true,
13709
+ width: 100
13710
+ }, {
13711
+ dataIndex: 'money',
13712
+ title: "\u5B9E\u4ED8\u91D1\u989D",
13713
+ align: 'center',
13714
+ ellipsis: true,
13715
+ width: 100
13716
+ }, {
13717
+ dataIndex: 'number',
13718
+ title: "".concat(text, "\u6570\u91CF"),
13719
+ align: 'center',
13720
+ ellipsis: true,
13721
+ width: 100,
13722
+ render: function render(val, record, index) {
13723
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13724
+ style: {
13725
+ width: 70
13726
+ },
13727
+ value: val,
13728
+ min: 1,
13729
+ precision: 0,
13730
+ onChange: function onChange(num) {
13731
+ return updateHandle(num, index, 'number');
13732
+ }
13733
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13734
+ }
13735
+ }, {
13736
+ dataIndex: 'share',
13737
+ title: "\u5206\u644A\u4EF7",
13738
+ align: 'center',
13739
+ ellipsis: true,
13740
+ width: 70
13741
+ }, {
13742
+ dataIndex: 'type',
13743
+ title: "\u8D60\u54C1\u7C7B\u578B",
13744
+ align: 'center',
13745
+ ellipsis: true,
13746
+ width: 100
13747
+ }]
13748
+ };
13749
+ };
13750
+
13751
+ var isNumberOrNumberString = function isNumberOrNumberString(value) {
13752
+ if (typeof value === 'number') return true;
13753
+ if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
13754
+ return false;
13755
+ };
13756
+ var getYesOrNo = function getYesOrNo(val) {
13757
+ if (isNull(val)) return null;
13758
+ return val ? '是' : '否';
13759
+ };
13760
+ var getColumns$4 = function getColumns(_ref) {
13761
+ var _ref$text = _ref.text,
13762
+ disabled = _ref.disabled,
13763
+ updateHandle = _ref.updateHandle,
13764
+ updateDataHandle = _ref.updateDataHandle;
13765
+ return {
13766
+ //管易商品信息
13767
+ GY_GOODS: [{
13768
+ dataIndex: 'goodName',
13769
+ title: "\u5546\u54C1\u540D\u79F0",
13770
+ width: 150
13771
+ }, {
13772
+ dataIndex: 'goodShortName',
13773
+ title: "\u5546\u54C1\u7B80\u79F0",
13774
+ width: 150
13775
+ }, {
13776
+ dataIndex: 'goodNo',
13777
+ title: "\u5546\u54C1\u7F16\u7801",
13778
+ width: 200
13779
+ }, {
13780
+ dataIndex: 'specName',
13781
+ title: "SKU\u540D\u79F0",
13782
+ align: 'center',
13783
+ ellipsis: true,
13784
+ width: 250
13785
+ }, {
13786
+ dataIndex: 'specNo',
13787
+ title: "SKU\u7F16\u7801",
13788
+ align: 'center',
13789
+ ellipsis: true,
13790
+ width: 150
13791
+ }, {
13792
+ dataIndex: 'qty',
13793
+ title: "\u6570\u91CF",
13794
+ width: 100,
13795
+ render: function render(val, record, index) {
13796
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13797
+ style: {
13798
+ width: 70
13799
+ },
13800
+ value: val,
13801
+ min: 1,
13802
+ precision: 0,
13803
+ onChange: function onChange(num) {
13804
+ updateDataHandle({
13805
+ qty: num,
13806
+ amount: num && isNumberOrNumberString(record.price) ? num * record.price : null,
13807
+ originAmount: num && isNumberOrNumberString(record.originPrice) ? num * record.originPrice : null
13808
+ }, index);
13809
+ }
13810
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13811
+ }
13812
+ }, {
13813
+ dataIndex: 'price',
13814
+ title: "\u5B9E\u9645\u5355\u4EF7",
13815
+ width: 150,
13816
+ render: function render(val, record, index) {
13817
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13818
+ style: {
13819
+ width: 130
13820
+ },
13821
+ value: val,
13822
+ min: 0,
13823
+ precision: 2,
13824
+ onChange: function onChange(num) {
13825
+ updateDataHandle({
13826
+ price: num,
13827
+ amount: num && isNumberOrNumberString(record.qty) ? num * record.qty : null
13828
+ }, index);
13829
+ }
13830
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13831
+ }
13832
+ }, {
13833
+ dataIndex: 'amount',
13834
+ title: "\u5B9E\u9645\u91D1\u989D",
13835
+ width: 150
13836
+ }, {
13837
+ dataIndex: 'originPrice',
13838
+ title: "\u6807\u51C6\u5355\u4EF7",
13839
+ width: 150
13840
+ }, {
13841
+ dataIndex: 'originAmount',
13842
+ title: "\u6807\u51C6\u91D1\u989D",
13843
+ width: 150
13844
+ }, {
13845
+ dataIndex: 'discountFee',
13846
+ title: "\u8BA9\u5229\u91D1\u989D",
13847
+ width: 150
13848
+ }, {
13849
+ dataIndex: 'amountAfter',
13850
+ title: "\u8BA9\u5229\u540E\u91D1\u989D",
13851
+ width: 150
13852
+ }, {
13853
+ dataIndex: 'cancel',
13854
+ title: "\u662F\u5426\u53D6\u6D88",
13855
+ width: 150,
13856
+ render: function render(val) {
13857
+ return /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
13858
+ }
13859
+ }, {
13860
+ dataIndex: 'isGift',
13861
+ title: "\u662F\u5426\u8D60\u54C1",
13862
+ width: 150,
13863
+ render: function render(val, record, index) {
13864
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
13865
+ value: val,
13866
+ onChange: function onChange(value) {
13867
+ updateHandle(value, index, 'isGift');
13868
+ },
13869
+ options: [{
13870
+ label: '是',
13871
+ value: 1
13872
+ }, {
13873
+ label: '否',
13874
+ value: 0
13875
+ }]
13876
+ }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
13877
+ }
13878
+ }, {
13879
+ dataIndex: 'skuNote',
13880
+ title: "\u5546\u54C1\u5907\u6CE8",
13881
+ width: 150
13882
+ }].map(function (item) {
13883
+ return _objectSpread2(_objectSpread2({}, item), {}, {
13884
+ align: 'center',
13885
+ ellipsis: true
13886
+ });
13887
+ }),
13888
+ //管易补发商品信息
13889
+ GY_REISSUE_GOODS: [{
13890
+ dataIndex: 'goodName',
13891
+ title: "\u5546\u54C1\u540D\u79F0",
13892
+ width: 150
13893
+ }, {
13894
+ dataIndex: 'goodShortName',
13895
+ title: "\u5546\u54C1\u7B80\u79F0",
13896
+ width: 150
13897
+ }, {
13898
+ dataIndex: 'goodNo',
13899
+ title: "\u5546\u54C1\u7F16\u7801",
13900
+ width: 200
13901
+ }, {
13902
+ dataIndex: 'specName',
13903
+ title: "SKU\u540D\u79F0",
13904
+ align: 'center',
13905
+ ellipsis: true,
13906
+ width: 250
13907
+ }, {
13908
+ dataIndex: 'specNo',
13909
+ title: "SKU\u7F16\u7801",
13910
+ align: 'center',
13911
+ ellipsis: true,
13912
+ width: 150
13913
+ }, {
13914
+ dataIndex: 'qty',
13915
+ title: "\u6570\u91CF",
13916
+ width: 100,
13917
+ render: function render(val, record, index) {
13918
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13919
+ style: {
13920
+ width: 70
13921
+ },
13922
+ value: val,
13923
+ min: 1,
13924
+ precision: 0,
13925
+ onChange: function onChange(num) {
13926
+ updateDataHandle({
13927
+ qty: num,
13928
+ amount: num && isNumberOrNumberString(record.price) ? num * record.price : null,
13929
+ originAmount: num && isNumberOrNumberString(record.originPrice) ? num * record.originPrice : null
13930
+ }, index);
13931
+ }
13932
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13933
+ }
13934
+ }, {
13935
+ dataIndex: 'price',
13936
+ title: "\u5B9E\u9645\u5355\u4EF7",
13937
+ width: 150,
13938
+ render: function render(val, record, index) {
13939
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13940
+ style: {
13941
+ width: 130
13942
+ },
13943
+ value: val,
13944
+ min: 0,
13945
+ precision: 2,
13946
+ onChange: function onChange(num) {
13947
+ updateDataHandle({
13948
+ price: num,
13949
+ amount: num && isNumberOrNumberString(record.qty) ? num * record.qty : null
13950
+ }, index);
13951
+ }
13952
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13953
+ }
13954
+ }, {
13955
+ dataIndex: 'amount',
13956
+ title: "\u5B9E\u9645\u91D1\u989D",
13957
+ width: 150
13958
+ }, {
13959
+ dataIndex: 'originPrice',
13960
+ title: "\u6807\u51C6\u5355\u4EF7",
13961
+ width: 150
13962
+ }, {
13963
+ dataIndex: 'originAmount',
13964
+ title: "\u6807\u51C6\u91D1\u989D",
13965
+ width: 150
13966
+ }, {
13967
+ dataIndex: 'isGift',
13968
+ title: "\u662F\u5426\u8D60\u54C1",
13969
+ width: 150,
13970
+ render: function render(val, record, index) {
13971
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
13972
+ value: val,
13973
+ onChange: function onChange(value) {
13974
+ updateHandle(value, index, 'isGift');
13975
+ },
13976
+ options: [{
13977
+ label: '是',
13978
+ value: 1
13979
+ }, {
13980
+ label: '否',
13981
+ value: 0
13982
+ }]
13983
+ }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
13984
+ }
13985
+ }].map(function (item) {
13986
+ return _objectSpread2(_objectSpread2({}, item), {}, {
13987
+ align: 'center',
13988
+ ellipsis: true
13989
+ });
13990
+ })
13991
+ };
13992
+ };
13993
+
13994
+ var getColumns$5 = function getColumns(_ref) {
13995
+ var _ref$text = _ref.text,
13996
+ text = _ref$text === void 0 ? '' : _ref$text,
13997
+ disabled = _ref.disabled,
13998
+ updateHandle = _ref.updateHandle;
13999
+ return {
14000
+ //bs商品信息
14001
+ default: [{
14002
+ dataIndex: 'mark',
14003
+ title: "\u5546\u54C1\u6807\u8BB0",
14004
+ align: 'center',
14005
+ ellipsis: true,
14006
+ width: 70,
14007
+ render: function render(val, record, index) {
14008
+ return /*#__PURE__*/React.createElement(Select, {
14009
+ options: [{
14010
+ label: '是',
14011
+ value: '是'
14012
+ }, {
14013
+ label: '否',
14014
+ value: '否'
14015
+ }],
14016
+ disabled: disabled,
14017
+ value: val,
14018
+ onChange: function onChange(val) {
14019
+ return updateHandle(val, index, 'mark');
14020
+ }
14021
+ });
14022
+ }
14023
+ }, {
14024
+ dataIndex: 'skuName',
14025
+ title: "".concat(text, "sku\u540D\u79F0"),
14026
+ align: 'center',
14027
+ ellipsis: true,
14028
+ width: 250
14029
+ }, {
14030
+ dataIndex: 'sku',
14031
+ title: "".concat(text, "sku\u7F16\u7801"),
14032
+ align: 'center',
14033
+ ellipsis: true,
14034
+ width: 100
14035
+ }, {
14036
+ dataIndex: 'name',
14037
+ title: "".concat(text, "\u540D\u79F0"),
14038
+ align: 'center',
14039
+ ellipsis: true,
14040
+ width: 250
14041
+ }, {
14042
+ dataIndex: 'pic',
14043
+ title: "\u56FE\u7247",
14044
+ align: 'center',
14045
+ ellipsis: true,
14046
+ width: 100,
14047
+ render: function render(val) {
14048
+ return /*#__PURE__*/React.createElement(Image, {
14049
+ width: 60,
14050
+ src: val
14051
+ });
14052
+ }
14053
+ }, {
14054
+ dataIndex: 'code',
14055
+ title: "".concat(text, "\u7F16\u7801"),
14056
+ align: 'center',
14057
+ ellipsis: true,
14058
+ width: 100
14059
+ }, {
14060
+ dataIndex: 'money',
14061
+ title: "\u5B9E\u4ED8\u91D1\u989D",
14062
+ align: 'center',
14063
+ ellipsis: true,
14064
+ width: 100
14065
+ }, {
14066
+ dataIndex: 'number',
14067
+ title: "".concat(text, "\u6570\u91CF"),
14068
+ align: 'center',
14069
+ ellipsis: true,
14070
+ width: 100,
14071
+ render: function render(val, record, index) {
14072
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
14073
+ style: {
14074
+ width: 70
14075
+ },
14076
+ value: val,
14077
+ min: 1,
14078
+ precision: 0,
14079
+ onChange: function onChange(num) {
14080
+ return updateHandle(num, index, 'number');
14081
+ }
14082
+ }) : /*#__PURE__*/React.createElement("span", null, val);
14083
+ }
14084
+ }, {
14085
+ dataIndex: 'share',
14086
+ title: "\u5206\u644A\u4EF7",
14087
+ align: 'center',
14088
+ ellipsis: true,
14089
+ width: 70
14090
+ }, {
14091
+ dataIndex: 'type',
14092
+ title: "\u8D60\u54C1\u7C7B\u578B",
14093
+ align: 'center',
14094
+ ellipsis: true,
14095
+ width: 100
14096
+ }]
14097
+ };
14098
+ };
14099
+
14100
+ var getColumnsMap = function getColumnsMap(args) {
14101
+ var _ref = args || {},
14102
+ _ref$text = _ref.text,
14103
+ text = _ref$text === void 0 ? '' : _ref$text,
14104
+ disabled = _ref.disabled,
14105
+ updateHandle = _ref.updateHandle,
14106
+ updateDataHandle = _ref.updateDataHandle;
14107
+ return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
14108
+ text: text,
14109
+ disabled: disabled,
14110
+ updateHandle: updateHandle
14111
+ })), getColumns({
14112
+ text: text,
14113
+ disabled: disabled,
14114
+ updateHandle: updateHandle
14115
+ })), getColumns$2({
14116
+ text: text,
14117
+ disabled: disabled,
14118
+ updateHandle: updateHandle
14119
+ })), getColumns$3({
14120
+ text: text,
14121
+ disabled: disabled,
14122
+ updateHandle: updateHandle
14123
+ })), getColumns$4({
14124
+ text: text,
14125
+ disabled: disabled,
14126
+ updateHandle: updateHandle,
14127
+ updateDataHandle: updateDataHandle
14128
+ })), {}, {
14129
+ default: getColumns$5({
14130
+ text: text,
14131
+ disabled: disabled,
14132
+ updateHandle: updateHandle
14133
+ })['default']
14134
+ });
14135
+ };
14136
+ var getColumnsBaseInfo = function getColumnsBaseInfo() {
14137
+ var clone_columnsMap = cloneDeep(getColumnsMap());
14138
+ var newColumns = {};
14139
+ Object.keys(clone_columnsMap).forEach(function (key) {
14140
+ newColumns[key] = clone_columnsMap[key].map(function (col) {
14141
+ return {
14142
+ title: col.title,
14143
+ dataIndex: col.dataIndex
14144
+ };
14145
+ });
12576
14146
  });
14147
+ return newColumns;
12577
14148
  };
14149
+ var columnsBaseInfoMap = getColumnsBaseInfo();
12578
14150
 
12579
- var columns$4 = [{
12580
- dataIndex: 'goodId',
12581
- title: "\u5546\u54C1ID",
12582
- width: 70
12583
- }, {
12584
- dataIndex: 'goodNo',
12585
- title: "\u5546\u54C1\u7F16\u7801",
12586
- width: 180
12587
- }, {
12588
- dataIndex: 'goodName',
12589
- title: "\u5546\u54C1\u540D\u79F0",
12590
- width: 250
12591
- }, {
12592
- dataIndex: 'specId',
12593
- title: "SKUID",
12594
- width: 100
12595
- }, {
12596
- dataIndex: 'specNo',
12597
- title: "\u5546\u54C1SKU\u7F16\u7801",
12598
- width: 180
12599
- }, {
12600
- dataIndex: 'specName',
12601
- title: "\u5546\u54C1SKU\u540D\u79F0",
12602
- width: 250
12603
- }, {
12604
- dataIndex: 'orderPrice',
12605
- title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
12606
- width: 100
12607
- }, {
12608
- dataIndex: 'num',
12609
- title: "\u6570\u91CF",
12610
- width: 100
12611
- }, {
12612
- dataIndex: 'sharePrice',
12613
- title: "\u5206\u644A\u4EF7",
12614
- width: 70
12615
- }, {
12616
- dataIndex: 'giftType',
12617
- title: "\u8D60\u54C1\u65B9\u5F0F",
12618
- width: 100
12619
- }];
12620
14151
  var renderFieldMap$1 = {
12621
- num: function num(_ref) {
14152
+ goodsNumber: function goodsNumber(_ref) {
12622
14153
  var disabled = _ref.disabled,
12623
14154
  updateHandle = _ref.updateHandle;
12624
14155
  return function (val, record, index) {
@@ -12630,33 +14161,59 @@ var renderFieldMap$1 = {
12630
14161
  min: 1,
12631
14162
  precision: 0,
12632
14163
  onChange: function onChange(num) {
12633
- return updateHandle(num, index, 'num');
14164
+ return updateHandle(num, index, 'goodsNumber');
12634
14165
  }
12635
14166
  }) : /*#__PURE__*/React.createElement("span", null, val);
12636
14167
  };
12637
14168
  },
12638
- giftType: function giftType(_ref2) {
14169
+ goodsPrice: function goodsPrice(_ref2) {
12639
14170
  var disabled = _ref2.disabled,
12640
14171
  updateHandle = _ref2.updateHandle;
12641
- return function (val) {
12642
- var giftTypeMap = {
12643
- 0: '非赠品',
12644
- 1: '自动赠送',
12645
- 2: '手工赠送',
12646
- 3: '回购自动送赠品',
12647
- 4: '前N有礼送赠品',
12648
- 6: '天猫优仓赠品',
12649
- 7: '淘宝CRM会员送赠'
12650
- };
12651
- return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
14172
+ return function (val, record, index) {
14173
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
14174
+ style: {
14175
+ width: 70
14176
+ },
14177
+ value: val,
14178
+ min: 0,
14179
+ onChange: function onChange(value) {
14180
+ return updateHandle(value, index, 'goodsPrice');
14181
+ }
14182
+ }) : /*#__PURE__*/React.createElement("span", null, val);
14183
+ };
14184
+ },
14185
+ isGift: function isGift(_ref3) {
14186
+ var disabled = _ref3.disabled,
14187
+ updateHandle = _ref3.updateHandle;
14188
+ return function (val, record, index) {
14189
+ var options = [{
14190
+ label: '是',
14191
+ value: 1
14192
+ }, {
14193
+ label: '否',
14194
+ value: 0
14195
+ }];
14196
+ return !disabled ? /*#__PURE__*/React.createElement(Select, {
14197
+ style: {
14198
+ width: 70
14199
+ },
14200
+ options: options,
14201
+ value: val,
14202
+ onChange: function onChange(value) {
14203
+ return updateHandle(value, index, 'isGift');
14204
+ },
14205
+ getPopupContainer: function getPopupContainer() {
14206
+ return document.getElementById('bsE3ReissueGoods');
14207
+ }
14208
+ }) : /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
12652
14209
  };
12653
14210
  }
12654
14211
  };
12655
- var getWdtReissueGoodColumns = function getWdtReissueGoodColumns(_ref3) {
12656
- var disabled = _ref3.disabled,
12657
- updateHandle = _ref3.updateHandle,
12658
- operate = _ref3.operate;
12659
- return columns$4.map(function (item) {
14212
+ var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
14213
+ var disabled = _ref4.disabled,
14214
+ updateHandle = _ref4.updateHandle,
14215
+ operate = _ref4.operate;
14216
+ return getColumnsMap()['BS_E3_REISSUE_GOODS'].map(function (item) {
12660
14217
  var newItem = _objectSpread2({
12661
14218
  align: 'center',
12662
14219
  ellipsis: true
@@ -12673,7 +14230,7 @@ var getWdtReissueGoodColumns = function getWdtReissueGoodColumns(_ref3) {
12673
14230
  });
12674
14231
  };
12675
14232
 
12676
- var MAIN_FIELD = 'id';
14233
+ var MAIN_FIELD = 'uuid';
12677
14234
  var SelectTradeGoods = function SelectTradeGoods(_ref) {
12678
14235
  var columns = _ref.columns,
12679
14236
  dataSource = _ref.dataSource,
@@ -12731,6 +14288,9 @@ var getButtonText = function getButtonText() {
12731
14288
  if (['WDT_REISSUE_GOODS'].includes(type)) {
12732
14289
  return '选择旺店通商品';
12733
14290
  }
14291
+ if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
14292
+ return '选择管易ERP商品';
14293
+ }
12734
14294
  return '选择商品';
12735
14295
  };
12736
14296
  var GoodItem$1 = function GoodItem(props) {
@@ -12822,515 +14382,42 @@ var GoodItem$1 = function GoodItem(props) {
12822
14382
  onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(value));
12823
14383
  }
12824
14384
  };
14385
+ var updateDataHandle = function updateDataHandle(data, index) {
14386
+ if (value === null || value === void 0 ? void 0 : value.length) {
14387
+ value[index] = _objectSpread2(_objectSpread2({}, value[index]), data);
14388
+ onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(value));
14389
+ }
14390
+ };
12825
14391
  var COLUMNS_MAP = function COLUMNS_MAP() {
12826
14392
  var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
12827
14393
  var operate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
12828
14394
  return function (type) {
12829
14395
  var columns = [];
12830
14396
  switch (type) {
12831
- case 'WDT_REISSUE_GOODS':
12832
- {
12833
- columns = getWdtReissueGoodColumns({
12834
- disabled: disabled,
12835
- updateHandle: updateHandle,
12836
- operate: operate
12837
- });
12838
- }
12839
- break;
12840
14397
  case 'WDT_GOODS':
12841
- columns = [{
12842
- dataIndex: 'goodId',
12843
- title: "\u5546\u54C1ID",
12844
- align: 'center',
12845
- ellipsis: true,
12846
- width: 70
12847
- }, {
12848
- dataIndex: 'goodNo',
12849
- title: "\u5546\u54C1\u7F16\u7801",
12850
- align: 'center',
12851
- ellipsis: true,
12852
- width: 180
12853
- }, {
12854
- dataIndex: 'goodName',
12855
- title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
12856
- align: 'center',
12857
- ellipsis: true,
12858
- width: 250
12859
- }, {
12860
- dataIndex: 'specId',
12861
- title: "".concat(text, "SKUID"),
12862
- align: 'center',
12863
- ellipsis: true,
12864
- width: 100
12865
- }, {
12866
- dataIndex: 'specNo',
12867
- title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
12868
- align: 'center',
12869
- ellipsis: true,
12870
- width: 180
12871
- }, {
12872
- dataIndex: 'specName',
12873
- title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
12874
- align: 'center',
12875
- ellipsis: true,
12876
- width: 250
12877
- }, {
12878
- dataIndex: 'orderPrice',
12879
- title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
12880
- align: 'center',
12881
- ellipsis: true,
12882
- width: 100
12883
- }, {
12884
- dataIndex: 'num',
12885
- title: "".concat(text, "\u6570\u91CF"),
12886
- align: 'center',
12887
- ellipsis: true,
12888
- width: 100,
12889
- render: function render(val, record, index) {
12890
- return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12891
- style: {
12892
- width: 70
12893
- },
12894
- value: val,
12895
- min: 1,
12896
- precision: 0,
12897
- onChange: function onChange(num) {
12898
- return updateHandle(num, index, 'num');
12899
- }
12900
- }) : /*#__PURE__*/React.createElement("span", null, val);
12901
- }
12902
- },
12903
- // {
12904
- // dataIndex: 'actualNum',
12905
- // title: `${text}实发数量`,
12906
- // align: 'center',
12907
- // ellipsis: true,
12908
- // width: 100,
12909
- // },
12910
- {
12911
- dataIndex: 'sharePrice',
12912
- title: "\u5206\u644A\u4EF7",
12913
- align: 'center',
12914
- ellipsis: true,
12915
- width: 70
12916
- }, {
12917
- dataIndex: 'giftType',
12918
- title: "\u8D60\u54C1\u65B9\u5F0F",
12919
- align: 'center',
12920
- ellipsis: true,
12921
- width: 100,
12922
- render: function render(val) {
12923
- var giftTypeMap = {
12924
- 0: '非赠品',
12925
- 1: '自动赠送',
12926
- 2: '手工赠送',
12927
- 3: '回购自动送赠品',
12928
- 4: '前N有礼送赠品',
12929
- 6: '天猫优仓赠品',
12930
- 7: '淘宝CRM会员送赠'
12931
- };
12932
- return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
12933
- }
12934
- }];
12935
- break;
12936
14398
  case 'WDT_RETURN_GOODS':
12937
- {
12938
- columns = [{
12939
- dataIndex: 'goodId',
12940
- title: "\u5546\u54C1ID",
12941
- align: 'center',
12942
- ellipsis: true,
12943
- width: 70
12944
- }, {
12945
- dataIndex: 'goodNo',
12946
- title: "\u5546\u54C1\u7F16\u7801",
12947
- align: 'center',
12948
- ellipsis: true,
12949
- width: 180
12950
- }, {
12951
- dataIndex: 'goodName',
12952
- title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
12953
- align: 'center',
12954
- ellipsis: true,
12955
- width: 250
12956
- }, {
12957
- dataIndex: 'specId',
12958
- title: "".concat(text, "SKUID"),
12959
- align: 'center',
12960
- ellipsis: true,
12961
- width: 100
12962
- }, {
12963
- dataIndex: 'specNo',
12964
- title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
12965
- align: 'center',
12966
- ellipsis: true,
12967
- width: 180
12968
- }, {
12969
- dataIndex: 'specName',
12970
- title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
12971
- align: 'center',
12972
- ellipsis: true,
12973
- width: 250
12974
- }, {
12975
- dataIndex: 'num',
12976
- title: "".concat(text, "\u9000\u8D27\u6570\u91CF"),
12977
- align: 'center',
12978
- ellipsis: true,
12979
- width: 100,
12980
- render: function render(val, record, index) {
12981
- return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12982
- style: {
12983
- width: 70
12984
- },
12985
- value: val,
12986
- min: 1,
12987
- precision: 0,
12988
- onChange: function onChange(num) {
12989
- return updateHandle(num, index, 'num');
12990
- }
12991
- }) : /*#__PURE__*/React.createElement("span", null, val);
12992
- }
12993
- }, {
12994
- dataIndex: 'sharePrice',
12995
- title: "\u5206\u644A\u4EF7",
12996
- align: 'center',
12997
- ellipsis: true,
12998
- width: 80,
12999
- render: function render(val, record, index) {
13000
- return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13001
- style: {
13002
- width: 70
13003
- },
13004
- value: val,
13005
- min: 0,
13006
- onChange: function onChange(value) {
13007
- return updateHandle(value, index, 'sharePrice');
13008
- }
13009
- }) : /*#__PURE__*/React.createElement("span", null, val);
13010
- }
13011
- }, {
13012
- dataIndex: 'returnPrice',
13013
- title: "".concat(text, "\u9000\u8D27\u91D1\u989D"),
13014
- align: 'center',
13015
- ellipsis: true,
13016
- width: 100
13017
- }, {
13018
- dataIndex: 'giftType',
13019
- title: "\u8D60\u54C1\u65B9\u5F0F",
13020
- align: 'center',
13021
- ellipsis: true,
13022
- width: 100,
13023
- render: function render(val) {
13024
- var giftTypeMap = {
13025
- 0: '非赠品',
13026
- 1: '自动赠送',
13027
- 2: '手工赠送',
13028
- 3: '回购自动送赠品',
13029
- 4: '前N有礼送赠品',
13030
- 6: '天猫优仓赠品',
13031
- 7: '淘宝CRM会员送赠'
13032
- };
13033
- return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
13034
- }
13035
- }, {
13036
- dataIndex: 'type',
13037
- title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
13038
- align: 'center',
13039
- ellipsis: true,
13040
- width: 100,
13041
- render: function render(val, record, index) {
13042
- var options = [{
13043
- label: '单品',
13044
- value: '1'
13045
- }, {
13046
- label: '组合装',
13047
- value: '2'
13048
- }];
13049
- return !disabled ? /*#__PURE__*/React.createElement(Select, {
13050
- style: {
13051
- width: 70
13052
- },
13053
- options: options,
13054
- value: val,
13055
- onChange: function onChange(value) {
13056
- return updateHandle(value, index, 'type');
13057
- }
13058
- }) : /*#__PURE__*/React.createElement("span", null, val);
13059
- }
13060
- }];
13061
- }
13062
- break;
13063
14399
  case 'WDT_EXCHANGE_GOODS':
14400
+ case 'BS_E3_GOODS':
14401
+ case 'BS_GOODS':
14402
+ case 'WLN_GOODS':
14403
+ case 'GY_GOODS':
14404
+ case 'GY_REISSUE_GOODS':
13064
14405
  {
13065
- columns = [{
13066
- dataIndex: 'goodId',
13067
- title: "\u5546\u54C1ID",
13068
- align: 'center',
13069
- ellipsis: true,
13070
- width: 70
13071
- }, {
13072
- dataIndex: 'goodNo',
13073
- title: "\u5546\u54C1\u7F16\u7801",
13074
- align: 'center',
13075
- ellipsis: true,
13076
- width: 180
13077
- }, {
13078
- dataIndex: 'goodName',
13079
- title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
13080
- align: 'center',
13081
- ellipsis: true,
13082
- width: 250
13083
- }, {
13084
- dataIndex: 'specId',
13085
- title: "".concat(text, "SKUID"),
13086
- align: 'center',
13087
- ellipsis: true,
13088
- width: 100
13089
- }, {
13090
- dataIndex: 'specNo',
13091
- title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
13092
- align: 'center',
13093
- ellipsis: true,
13094
- width: 180
13095
- }, {
13096
- dataIndex: 'specName',
13097
- title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
13098
- align: 'center',
13099
- ellipsis: true,
13100
- width: 250
13101
- }, {
13102
- dataIndex: 'num',
13103
- title: "".concat(text, "\u6362\u51FA\u6570\u91CF"),
13104
- align: 'center',
13105
- ellipsis: true,
13106
- width: 100,
13107
- render: function render(val, record, index) {
13108
- return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13109
- style: {
13110
- width: 70
13111
- },
13112
- value: val,
13113
- min: 1,
13114
- precision: 0,
13115
- onChange: function onChange(num) {
13116
- return updateHandle(num, index, 'num');
13117
- }
13118
- }) : /*#__PURE__*/React.createElement("span", null, val);
13119
- }
13120
- }, {
13121
- dataIndex: 'price',
13122
- title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
13123
- align: 'center',
13124
- ellipsis: true,
13125
- width: 100,
13126
- render: function render(val, record, index) {
13127
- return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13128
- style: {
13129
- width: 70
13130
- },
13131
- value: val,
13132
- min: 0,
13133
- onChange: function onChange(value) {
13134
- return updateHandle(value, index, 'price');
13135
- }
13136
- }) : /*#__PURE__*/React.createElement("span", null, val);
13137
- }
13138
- }, {
13139
- dataIndex: 'exchangePrice',
13140
- title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
13141
- align: 'center',
13142
- ellipsis: true,
13143
- width: 100
13144
- }, {
13145
- dataIndex: 'giftType',
13146
- title: "\u8D60\u54C1\u65B9\u5F0F",
13147
- align: 'center',
13148
- ellipsis: true,
13149
- width: 100,
13150
- render: function render(val) {
13151
- var giftTypeMap = {
13152
- 0: '非赠品',
13153
- 1: '自动赠送',
13154
- 2: '手工赠送',
13155
- 3: '回购自动送赠品',
13156
- 4: '前N有礼送赠品',
13157
- 6: '天猫优仓赠品',
13158
- 7: '淘宝CRM会员送赠'
13159
- };
13160
- return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
13161
- }
13162
- }, {
13163
- dataIndex: 'type',
13164
- title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
13165
- align: 'center',
13166
- ellipsis: true,
13167
- width: 100,
13168
- render: function render(val, record, index) {
13169
- var options = [{
13170
- label: '单品',
13171
- value: '1'
13172
- }, {
13173
- label: '组合装',
13174
- value: '2'
13175
- }];
13176
- return !disabled ? /*#__PURE__*/React.createElement(Select, {
13177
- style: {
13178
- width: 70
13179
- },
13180
- options: options,
13181
- value: val,
13182
- onChange: function onChange(value) {
13183
- return updateHandle(value, index, 'type');
13184
- }
13185
- }) : /*#__PURE__*/React.createElement("span", null, val);
13186
- }
13187
- }];
14406
+ columns = getColumnsMap({
14407
+ text: text,
14408
+ disabled: disabled,
14409
+ updateHandle: updateHandle,
14410
+ updateDataHandle: updateDataHandle
14411
+ })[type];
13188
14412
  }
13189
14413
  break;
13190
- case 'BS_E3_GOODS':
14414
+ case 'WDT_REISSUE_GOODS':
13191
14415
  {
13192
- columns = [{
13193
- dataIndex: 'sku',
13194
- title: "SKU",
13195
- align: 'center',
13196
- ellipsis: true,
13197
- width: 150
13198
- }, {
13199
- dataIndex: 'skuId',
13200
- title: "SKU ID",
13201
- align: 'center',
13202
- ellipsis: true,
13203
- width: 150
13204
- }, {
13205
- dataIndex: 'goodsName',
13206
- title: "\u5546\u54C1\u540D\u79F0",
13207
- align: 'center',
13208
- ellipsis: true,
13209
- width: 150
13210
- }, {
13211
- dataIndex: 'goodsShortName',
13212
- title: "\u5546\u54C1\u7B80\u79F0",
13213
- align: 'center',
13214
- ellipsis: true,
13215
- width: 100
13216
- }, {
13217
- dataIndex: 'picPath',
13218
- title: "\u5546\u54C1\u56FE\u7247",
13219
- align: 'center',
13220
- ellipsis: true,
13221
- width: 100,
13222
- render: function render(val) {
13223
- return /*#__PURE__*/React.createElement(Image, {
13224
- width: 60,
13225
- src: val
13226
- });
13227
- }
13228
- }, {
13229
- dataIndex: 'goodsSn',
13230
- title: "\u8D27\u53F7",
13231
- align: 'center',
13232
- ellipsis: true,
13233
- width: 150
13234
- }, {
13235
- dataIndex: 'goodsId',
13236
- title: "\u8D27\u53F7ID",
13237
- align: 'center',
13238
- ellipsis: true,
13239
- width: 150
13240
- }, {
13241
- dataIndex: 'colorName',
13242
- title: "\u989C\u8272\u540D\u79F0",
13243
- align: 'center',
13244
- ellipsis: true,
13245
- width: 100
13246
- }, {
13247
- dataIndex: 'colorCode',
13248
- title: "\u989C\u8272\u4EE3\u7801",
13249
- align: 'center',
13250
- ellipsis: true,
13251
- width: 150
13252
- }, {
13253
- dataIndex: 'sizeName',
13254
- title: "\u5C3A\u7801\u540D\u79F0",
13255
- align: 'center',
13256
- ellipsis: true,
13257
- width: 100
13258
- }, {
13259
- dataIndex: 'sizeCode',
13260
- title: "\u5C3A\u7801\u4EE3\u7801",
13261
- align: 'center',
13262
- ellipsis: true,
13263
- width: 100
13264
- }, {
13265
- dataIndex: 'brandName',
13266
- title: "\u54C1\u724C\u540D\u79F0",
13267
- align: 'center',
13268
- ellipsis: true,
13269
- width: 150
13270
- }, {
13271
- dataIndex: 'goodsNumber',
13272
- title: "\u5546\u54C1\u6570\u91CF",
13273
- align: 'center',
13274
- ellipsis: true,
13275
- width: 100
13276
- }, {
13277
- dataIndex: 'goodsPrice',
13278
- title: "\u5546\u54C1\u5355\u4EF7",
13279
- align: 'center',
13280
- ellipsis: true,
13281
- width: 120
13282
- }, {
13283
- dataIndex: 'shopPrice',
13284
- title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
13285
- align: 'center',
13286
- ellipsis: true,
13287
- width: 120
13288
- }, {
13289
- dataIndex: 'sharePrice',
13290
- title: "\u5206\u644A\u4EF7",
13291
- align: 'center',
13292
- ellipsis: true,
13293
- width: 120
13294
- }, {
13295
- dataIndex: 'sharePayment',
13296
- title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
13297
- align: 'center',
13298
- ellipsis: true,
13299
- width: 120
13300
- }, {
13301
- dataIndex: 'payment',
13302
- title: "\u5B9E\u4ED8\u91D1\u989D",
13303
- align: 'center',
13304
- ellipsis: true,
13305
- width: 120
13306
- }, {
13307
- dataIndex: 'tcSku',
13308
- title: "\u5957\u9910SKU",
13309
- align: 'center',
13310
- ellipsis: true,
13311
- width: 150
13312
- }, {
13313
- dataIndex: 'tcGoodsNumber',
13314
- title: "\u5957\u9910\u5957\u6570",
13315
- align: 'center',
13316
- ellipsis: true,
13317
- width: 100
13318
- }, {
13319
- dataIndex: 'taoCanSingleSl',
13320
- title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
13321
- align: 'center',
13322
- ellipsis: true,
13323
- width: 100
13324
- }, {
13325
- dataIndex: 'isGift',
13326
- title: "\u662F\u5426\u8D60\u54C1",
13327
- align: 'center',
13328
- ellipsis: true,
13329
- width: 100,
13330
- render: function render(val) {
13331
- return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
13332
- }
13333
- }];
14416
+ columns = getWdtReissueGoodColumns({
14417
+ disabled: disabled,
14418
+ updateHandle: updateHandle,
14419
+ operate: operate
14420
+ });
13334
14421
  }
13335
14422
  break;
13336
14423
  case 'BS_E3_REISSUE_GOODS':
@@ -13343,102 +14430,12 @@ var GoodItem$1 = function GoodItem(props) {
13343
14430
  }
13344
14431
  break;
13345
14432
  default:
13346
- columns = [{
13347
- dataIndex: 'mark',
13348
- title: "\u5546\u54C1\u6807\u8BB0",
13349
- align: 'center',
13350
- ellipsis: true,
13351
- width: 70,
13352
- render: function render(val, record, index) {
13353
- return /*#__PURE__*/React.createElement(Select, {
13354
- options: [{
13355
- label: '是',
13356
- value: '是'
13357
- }, {
13358
- label: '否',
13359
- value: '否'
13360
- }],
13361
- disabled: disabled,
13362
- value: val,
13363
- onChange: function onChange(val) {
13364
- return updateHandle(val, index, 'mark');
13365
- }
13366
- });
13367
- }
13368
- }, {
13369
- dataIndex: 'skuName',
13370
- title: "".concat(text, "sku\u540D\u79F0"),
13371
- align: 'center',
13372
- ellipsis: true,
13373
- width: 250
13374
- }, {
13375
- dataIndex: 'sku',
13376
- title: "".concat(text, "sku\u7F16\u7801"),
13377
- align: 'center',
13378
- ellipsis: true,
13379
- width: 100
13380
- }, {
13381
- dataIndex: 'name',
13382
- title: "".concat(text, "\u540D\u79F0"),
13383
- align: 'center',
13384
- ellipsis: true,
13385
- width: 250
13386
- }, {
13387
- dataIndex: 'pic',
13388
- title: "\u56FE\u7247",
13389
- align: 'center',
13390
- ellipsis: true,
13391
- width: 100,
13392
- render: function render(val) {
13393
- return /*#__PURE__*/React.createElement(Image, {
13394
- width: 60,
13395
- src: val
13396
- });
13397
- }
13398
- }, {
13399
- dataIndex: 'code',
13400
- title: "".concat(text, "\u7F16\u7801"),
13401
- align: 'center',
13402
- ellipsis: true,
13403
- width: 100
13404
- }, {
13405
- dataIndex: 'money',
13406
- title: "\u5B9E\u4ED8\u91D1\u989D",
13407
- align: 'center',
13408
- ellipsis: true,
13409
- width: 100
13410
- }, {
13411
- dataIndex: 'number',
13412
- title: "".concat(text, "\u6570\u91CF"),
13413
- align: 'center',
13414
- ellipsis: true,
13415
- width: 100,
13416
- render: function render(val, record, index) {
13417
- return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13418
- style: {
13419
- width: 70
13420
- },
13421
- value: val,
13422
- min: 1,
13423
- precision: 0,
13424
- onChange: function onChange(num) {
13425
- return updateHandle(num, index, 'number');
13426
- }
13427
- }) : /*#__PURE__*/React.createElement("span", null, val);
13428
- }
13429
- }, {
13430
- dataIndex: 'share',
13431
- title: "\u5206\u644A\u4EF7",
13432
- align: 'center',
13433
- ellipsis: true,
13434
- width: 70
13435
- }, {
13436
- dataIndex: 'type',
13437
- title: "\u8D60\u54C1\u7C7B\u578B",
13438
- align: 'center',
13439
- ellipsis: true,
13440
- width: 100
13441
- }];
14433
+ columns = getColumnsMap({
14434
+ text: text,
14435
+ disabled: disabled,
14436
+ updateHandle: updateHandle,
14437
+ updateDataHandle: updateDataHandle
14438
+ })['default'];
13442
14439
  }
13443
14440
  return columns;
13444
14441
  };
@@ -13450,6 +14447,24 @@ var GoodItem$1 = function GoodItem(props) {
13450
14447
  return COLUMNS_INFO(type);
13451
14448
  };
13452
14449
  var newColumns = useMemo(function () {
14450
+ var initBaseInfoColumns = GOODS_INFO_COLUMNS();
14451
+ var baseInfoColumns = [];
14452
+ var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === 'string';
14453
+ var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
14454
+ if (isStringArray) {
14455
+ baseInfoColumns = initBaseInfoColumns.filter(function (col) {
14456
+ return showHeader.includes(col.dataIndex);
14457
+ });
14458
+ } else if (isObjectArray) {
14459
+ baseInfoColumns = showHeader.filter(function (col) {
14460
+ return col.show !== false;
14461
+ }).map(function (col) {
14462
+ var currentCol = initBaseInfoColumns.find(function (item) {
14463
+ return item.dataIndex === col.dataIndex;
14464
+ });
14465
+ return currentCol ? currentCol : undefined;
14466
+ }).filter(Boolean);
14467
+ }
13453
14468
  var columnList = [{
13454
14469
  dataIndex: '',
13455
14470
  title: '序号',
@@ -13459,9 +14474,7 @@ var GoodItem$1 = function GoodItem(props) {
13459
14474
  render: function render(val, record, index) {
13460
14475
  return /*#__PURE__*/React.createElement("span", null, index + 1);
13461
14476
  }
13462
- }].concat(_toConsumableArray(GOODS_INFO_COLUMNS().filter(function (t) {
13463
- return showHeader.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
13464
- })));
14477
+ }].concat(_toConsumableArray(baseInfoColumns));
13465
14478
  if (!disabled) {
13466
14479
  columnList.push({
13467
14480
  dataIndex: '',
@@ -13539,10 +14552,33 @@ var GoodItem$1 = function GoodItem(props) {
13539
14552
  isGift: '',
13540
14553
  uuid: uuid(),
13541
14554
  canDelete: true,
14555
+ canEdit: true,
13542
14556
  goodsNumber: 1,
13543
14557
  canUpdateNumber: canUpdateNumber
13544
14558
  });
13545
14559
  });
14560
+ } else if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
14561
+ newList = list.map(function (item) {
14562
+ var goodName = item.goodName,
14563
+ goodShortName = item.goodShortName,
14564
+ goodNo = item.goodNo,
14565
+ specName = item.specName,
14566
+ specNo = item.specNo,
14567
+ retailPrice = item.retailPrice;
14568
+ return _objectSpread2(_objectSpread2({}, item), {}, {
14569
+ uuid: uuid(),
14570
+ canDelete: true,
14571
+ canEdit: true,
14572
+ qty: 1,
14573
+ goodName: goodName,
14574
+ goodShortName: goodShortName,
14575
+ goodNo: goodNo,
14576
+ specName: specName,
14577
+ specNo: specNo,
14578
+ originPrice: !isNull(retailPrice) ? Number(retailPrice) : null,
14579
+ originAmount: !isNull(retailPrice) ? Number(retailPrice) : null
14580
+ });
14581
+ });
13546
14582
  } else {
13547
14583
  newList = list.map(function (item) {
13548
14584
  var goodsId = item.goodsId,
@@ -13638,6 +14674,14 @@ var GoodItem$1 = function GoodItem(props) {
13638
14674
  shopId: shopId,
13639
14675
  maxLength: maxLength,
13640
14676
  companyKey: companyKey
14677
+ }) : ['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type) ? /*#__PURE__*/React.createElement(GyGoodsModal$1, {
14678
+ ref: refModal,
14679
+ onSubmit: onSubmit,
14680
+ width: width,
14681
+ shopList: shopList,
14682
+ shopId: shopId,
14683
+ maxLength: maxLength,
14684
+ companyKey: companyKey
13641
14685
  }) : /*#__PURE__*/React.createElement(GoodsModal$2, {
13642
14686
  ref: refModal,
13643
14687
  onSubmit: onSubmit,
@@ -14323,25 +15367,72 @@ var getBsE3OrderListSingleton = function getBsE3OrderListSingleton(orderNo) {
14323
15367
  }
14324
15368
  resolve(data.data);
14325
15369
  } else {
14326
- doReject(data);
15370
+ doReject(data);
15371
+ }
15372
+ }).catch(doReject);
15373
+ });
15374
+ singletonMap$1.set(orderNo, p);
15375
+ }
15376
+ return singletonMap$1.get(orderNo);
15377
+ };
15378
+ var bsE3Utils = {
15379
+ getBsE3OrderListSingleton: getBsE3OrderListSingleton
15380
+ };
15381
+
15382
+ var singletonMap$2 = new Map();
15383
+ var getGyOrderListSingleton = function getGyOrderListSingleton(orderNo) {
15384
+ if (!singletonMap$2.has(orderNo)) {
15385
+ var p = new Promise(function (resolve, reject) {
15386
+ var doReject = function doReject(err) {
15387
+ // 清空掉错误的请求记录
15388
+ singletonMap$2.delete(orderNo);
15389
+ reject(err);
15390
+ };
15391
+ extendRequest('/qy/gdfw/oms/gyOrderDetail', {
15392
+ method: 'post',
15393
+ data: {
15394
+ tid: orderNo
15395
+ }
15396
+ }).then(function (res) {
15397
+ if (res === null || res === void 0 ? void 0 : res.success) {
15398
+ var _res$data;
15399
+ if (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.length) {
15400
+ res.data.trades = filterGyOrders(res === null || res === void 0 ? void 0 : res.data, orderNo).map(function (item) {
15401
+ return _objectSpread2(_objectSpread2({}, item), {}, {
15402
+ billNo: item.code,
15403
+ billType: item.orderTypeName,
15404
+ billTag: item.tagName,
15405
+ tradeTagName: item.tradeTagName,
15406
+ deliveryState: item.deliveryState,
15407
+ deliveryStateName: GY_DELIVERY_STATE_MAPPING[item.deliveryState]
15408
+ });
15409
+ });
15410
+ }
15411
+ resolve(res.data);
15412
+ // 延迟10秒清除,保证订单的时效性
15413
+ setTimeout(function () {
15414
+ singletonMap$2.delete(orderNo);
15415
+ }, 1000 * 10);
15416
+ } else {
15417
+ doReject(res);
14327
15418
  }
14328
15419
  }).catch(doReject);
14329
15420
  });
14330
- singletonMap$1.set(orderNo, p);
15421
+ singletonMap$2.set(orderNo, p);
14331
15422
  }
14332
- return singletonMap$1.get(orderNo);
15423
+ return singletonMap$2.get(orderNo);
14333
15424
  };
14334
- var bsE3Utils = {
14335
- getBsE3OrderListSingleton: getBsE3OrderListSingleton
15425
+ var gyUtils = {
15426
+ getGyOrderListSingleton: getGyOrderListSingleton
14336
15427
  };
14337
15428
 
14338
- var singletonMap$2 = new Map();
15429
+ var singletonMap$3 = new Map();
14339
15430
  var getOrderListSingleton = function getOrderListSingleton(orderNo) {
14340
- if (!singletonMap$2.has(orderNo)) {
15431
+ if (!singletonMap$3.has(orderNo)) {
14341
15432
  var p = new Promise(function (resolve, reject) {
14342
15433
  var doReject = function doReject(err) {
14343
15434
  // 清空掉错误的请求记录
14344
- singletonMap$2.delete(orderNo);
15435
+ singletonMap$3.delete(orderNo);
14345
15436
  reject(err);
14346
15437
  };
14347
15438
  extendRequest('/qy/gdfw/order/kmErpOrderDetail', {
@@ -14367,151 +15458,36 @@ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
14367
15458
  }
14368
15459
  // 延迟10秒清除,保证订单的时效性
14369
15460
  setTimeout(function () {
14370
- singletonMap$2.delete(orderNo);
15461
+ singletonMap$3.delete(orderNo);
14371
15462
  }, 1000 * 10);
14372
15463
  } else {
14373
15464
  doReject(data);
14374
15465
  }
14375
15466
  }).catch(doReject);
14376
15467
  });
14377
- singletonMap$2.set(orderNo, p);
15468
+ singletonMap$3.set(orderNo, p);
14378
15469
  }
14379
- return singletonMap$2.get(orderNo);
15470
+ return singletonMap$3.get(orderNo);
14380
15471
  };
14381
15472
  var kmUtils = {
14382
15473
  getOrderListSingleton: getOrderListSingleton
14383
15474
  };
14384
15475
 
14385
15476
  var columnsMap = {
14386
- BS_SYSTEM_ORDER: [{
14387
- title: '单据类型',
14388
- dataIndex: 'billType',
14389
- width: 150
14390
- }, {
14391
- title: '系统订单号',
14392
- dataIndex: 'billNo',
14393
- width: 150
14394
- }, {
14395
- title: '标签',
14396
- dataIndex: 'billTag',
14397
- width: 150
14398
- }, {
14399
- title: '主播名称',
14400
- dataIndex: 'authorName',
14401
- width: 150
14402
- }, {
14403
- title: '主播ID',
14404
- dataIndex: 'authorId',
14405
- width: 150
14406
- }
14407
- // {
14408
- // title: '直播活动',
14409
- // dataIndex: 'liveActivites',
14410
- // width: 150,
14411
- // },
14412
- ],
14413
-
15477
+ BS_SYSTEM_ORDER: BS_SYSTEM_ORDER_CONFIG.columns,
14414
15478
  KM_SYSTEM_ORDER: KM_SYSTEM_ORDER_CONFIG.columns,
14415
- WLN_SYSTEM_ORDER: [{
14416
- title: '订单类型',
14417
- dataIndex: 'billType',
14418
- width: 150
14419
- }, {
14420
- title: '系统订单号',
14421
- dataIndex: 'billNo',
14422
- width: 150
14423
- }, {
14424
- title: '标记',
14425
- dataIndex: 'billTag',
14426
- width: 150
14427
- }],
14428
- WDT_SYSTEM_ORDER: [{
14429
- title: '订单类型',
14430
- dataIndex: 'billType',
14431
- width: 150
14432
- }, {
14433
- title: '系统订单号',
14434
- dataIndex: 'billNo',
14435
- width: 150
14436
- }, {
14437
- title: '订单标签',
14438
- dataIndex: 'billTag',
14439
- width: 150
14440
- }],
14441
- BS_E3_SYSTEM_ORDER: [{
14442
- title: '系统订单号',
14443
- dataIndex: 'orderSn',
14444
- width: 150,
14445
- ellipsis: true
14446
- }, {
14447
- title: '订单状态',
14448
- dataIndex: 'orderStatus',
14449
- width: 100,
14450
- ellipsis: true,
14451
- render: function render(val) {
14452
- return /*#__PURE__*/React.createElement("span", null, BS_E3_ORDER_STATUS_MAP[val] || val);
14453
- }
14454
- }, {
14455
- title: '是否被拆分',
14456
- dataIndex: 'isSplit',
14457
- width: 100,
14458
- ellipsis: true,
14459
- render: function render(val) {
14460
- return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
14461
- }
14462
- }, {
14463
- title: '是否拆分子单',
14464
- dataIndex: 'isSplitNew',
14465
- width: 100,
14466
- ellipsis: true,
14467
- render: function render(val) {
14468
- return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
14469
- }
14470
- }, {
14471
- title: '是否被合并',
14472
- dataIndex: 'isCombine',
14473
- width: 100,
14474
- ellipsis: true,
14475
- render: function render(val) {
14476
- return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
14477
- }
14478
- }, {
14479
- title: '是否合并新单',
14480
- dataIndex: 'isCombineNew',
14481
- width: 100,
14482
- ellipsis: true,
14483
- render: function render(val) {
14484
- return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
14485
- }
14486
- }, {
14487
- title: '是否复制单',
14488
- dataIndex: 'isCopy',
14489
- width: 100,
14490
- ellipsis: true,
14491
- render: function render(val) {
14492
- return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
14493
- }
14494
- }, {
14495
- title: '是否换货单',
14496
- dataIndex: 'isExchangeOrder',
14497
- width: 100,
14498
- ellipsis: true,
14499
- render: function render(val) {
14500
- return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
14501
- }
14502
- }, {
14503
- title: '订单备注',
14504
- dataIndex: 'orderMsg',
14505
- width: 150,
14506
- ellipsis: true
14507
- }]
15479
+ WLN_SYSTEM_ORDER: WLN_SYSTEM_ORDER_CONFIG.columns,
15480
+ WDT_SYSTEM_ORDER: WDT_SYSTEM_ORDER_CONFIG.columns,
15481
+ BS_E3_SYSTEM_ORDER: BS_E3_SYSTEM_ORDER_CONFIG.columns,
15482
+ GY_SYSTEM_ORDER: GY_SYSTEM_ORDER_CONFIG.columns
14508
15483
  };
14509
15484
  var rowKeyMap = {
14510
15485
  BS_SYSTEM_ORDER: 'billNo',
14511
15486
  KM_SYSTEM_ORDER: 'billNo',
14512
15487
  WLN_SYSTEM_ORDER: 'billNo',
14513
15488
  WDT_SYSTEM_ORDER: 'billNo',
14514
- BS_E3_SYSTEM_ORDER: 'orderSn'
15489
+ BS_E3_SYSTEM_ORDER: 'orderSn',
15490
+ GY_SYSTEM_ORDER: 'billNo'
14515
15491
  };
14516
15492
  var index$1 = (function (props) {
14517
15493
  var value = props.value,
@@ -14533,6 +15509,9 @@ var index$1 = (function (props) {
14533
15509
  getWdtOrderList(value.orderNo);
14534
15510
  } else if (type === 'BS_E3_SYSTEM_ORDER') {
14535
15511
  getBsE3OrderList(value.orderNo);
15512
+ } else if (type === 'GY_SYSTEM_ORDER') {
15513
+ console.log('触发gy--getGyOrderList--1');
15514
+ getGyOrderList(value.orderNo);
14536
15515
  }
14537
15516
  }
14538
15517
  }, [value, type]);
@@ -14719,6 +15698,45 @@ var index$1 = (function (props) {
14719
15698
  return _ref6.apply(this, arguments);
14720
15699
  };
14721
15700
  }();
15701
+ var getGyOrderList = /*#__PURE__*/function () {
15702
+ var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(orderNo) {
15703
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
15704
+ while (1) switch (_context6.prev = _context6.next) {
15705
+ case 0:
15706
+ gyUtils.getGyOrderListSingleton(orderNo).then(function (data) {
15707
+ var trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
15708
+ return getIsPlatformCodesIncludeOrderNos(item.platformCode, orderNo);
15709
+ });
15710
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
15711
+ orders: trades,
15712
+ showOrderInfo: trades.map(function (_ref9) {
15713
+ var billNo = _ref9.billNo,
15714
+ billType = _ref9.billType,
15715
+ billTag = _ref9.billTag,
15716
+ tradeTagName = _ref9.tradeTagName,
15717
+ deliveryState = _ref9.deliveryState;
15718
+ return {
15719
+ billNo: billNo,
15720
+ billType: billType,
15721
+ billTag: billTag,
15722
+ tradeTagName: tradeTagName,
15723
+ deliveryState: deliveryState,
15724
+ deliveryStateName: GY_DELIVERY_STATE_MAPPING[deliveryState]
15725
+ };
15726
+ })
15727
+ }));
15728
+ });
15729
+ onceRef.current = false;
15730
+ case 2:
15731
+ case "end":
15732
+ return _context6.stop();
15733
+ }
15734
+ }, _callee6);
15735
+ }));
15736
+ return function getGyOrderList(_x6) {
15737
+ return _ref8.apply(this, arguments);
15738
+ };
15739
+ }();
14722
15740
  var rowSelection = {
14723
15741
  selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
14724
15742
  fixed: true,
@@ -14735,7 +15753,24 @@ var index$1 = (function (props) {
14735
15753
  };
14736
15754
  }
14737
15755
  };
14738
- return /*#__PURE__*/React.createElement(Table, {
15756
+ // useEffect(() => {
15757
+ // const dom = document.querySelector(
15758
+ // `.${type}_SYSTEM_ORDER_COMPONENT .ant-table-content`,
15759
+ // );
15760
+ // //解决列表出现横向滚动条时选择数据造成行内闪烁问题
15761
+ // if (
15762
+ // (value?.selectIds || []).length > 0 &&
15763
+ // dom &&
15764
+ // dom.scrollWidth > dom.clientWidth &&
15765
+ // dom.scrollLeft === 0
15766
+ // ) {
15767
+ // console.log(dom.scrollWidth > dom.clientWidth, dom.scrollLeft === 0);
15768
+ // dom.scrollLeft = 1;
15769
+ // }
15770
+ // }, [JSON.stringify(value?.selectIds || [])]);
15771
+ return /*#__PURE__*/React.createElement("div", {
15772
+ className: "".concat(type, "_SYSTEM_ORDER_COMPONENT")
15773
+ }, /*#__PURE__*/React.createElement(Table, {
14739
15774
  dataSource: (value === null || value === void 0 ? void 0 : value.orders) || [],
14740
15775
  columns: columns,
14741
15776
  rowSelection: rowSelection,
@@ -14743,12 +15778,12 @@ var index$1 = (function (props) {
14743
15778
  size: "small",
14744
15779
  pagination: false,
14745
15780
  scroll: {
14746
- x: '100%'
15781
+ x: 'max-content'
14747
15782
  },
14748
15783
  locale: {
14749
15784
  emptyText: '暂无数据'
14750
15785
  }
14751
- });
15786
+ }));
14752
15787
  });
14753
15788
 
14754
15789
  var WlnGoods = function WlnGoods(props) {
@@ -14774,13 +15809,14 @@ var WlnGoods = function WlnGoods(props) {
14774
15809
  };
14775
15810
 
14776
15811
  var componentMap$1 = {
14777
- 'WDT_GOODS': {
15812
+ WDT_GOODS: {
14778
15813
  type: 'wdt',
14779
15814
  key: 'wdtGoods',
14780
15815
  name: '旺店通',
14781
15816
  orderNo: 'srcTid',
14782
15817
  goodDetailOrderNo: 'srcTid',
14783
15818
  eventNameMap: {
15819
+ // pubsub 事件
14784
15820
  type: 'wdtType',
14785
15821
  updateGoodsHandle: updateWdtGoodsHandle,
14786
15822
  selectListReturn: 'wdtSelectListReturn',
@@ -14798,13 +15834,14 @@ var componentMap$1 = {
14798
15834
  exchangeDeleteGood: 'wdtExchangeDeleteGood'
14799
15835
  }
14800
15836
  },
14801
- 'BS_E3_GOODS': {
15837
+ BS_E3_GOODS: {
14802
15838
  type: 'e3',
14803
15839
  key: 'bsE3Goods',
14804
15840
  name: '百胜E3',
14805
15841
  orderNo: 'dealCode',
14806
15842
  goodDetailOrderNo: 'originalDealCode',
14807
15843
  eventNameMap: {
15844
+ // pubsub 事件
14808
15845
  type: 'bsE3Type',
14809
15846
  updateGoodsHandle: updateBsE3GoodsHandle,
14810
15847
  selectListReturn: 'bsE3SelectListReturn',
@@ -14821,6 +15858,31 @@ var componentMap$1 = {
14821
15858
  returnDeleteGood: 'bsE3ReturnDeleteGood',
14822
15859
  exchangeDeleteGood: 'bsE3ExchangeDeleteGood'
14823
15860
  }
15861
+ },
15862
+ GY_GOODS: {
15863
+ type: 'gy',
15864
+ key: 'gyGoods',
15865
+ name: '管易',
15866
+ orderNo: 'dealCode',
15867
+ goodDetailOrderNo: 'originalDealCode',
15868
+ eventNameMap: {
15869
+ // pubsub 事件
15870
+ type: 'gyType',
15871
+ updateGoodsHandle: updateGyGoodsHandle,
15872
+ selectListReturn: 'gySelectListReturn',
15873
+ selectList: 'gySelectList',
15874
+ reissueSelectList: 'gyReissueSelectList',
15875
+ reissueSelectListReturn: 'gyReissueSelectListReturn',
15876
+ reissueDeleteGood: 'gyReissueDeleteGood',
15877
+ changeShopCode: 'gyChangeShopCode',
15878
+ reissueType: 'gyReissueType',
15879
+ returnType: 'gyReturnType',
15880
+ returnSelectListReturn: 'gyReturnSelectListReturn',
15881
+ returnSelectList: 'gyReturnSelectList',
15882
+ deleteGood: 'gyDeleteGood',
15883
+ returnDeleteGood: 'gyReturnDeleteGood',
15884
+ exchangeDeleteGood: 'gyExchangeDeleteGood'
15885
+ }
14824
15886
  }
14825
15887
  };
14826
15888
  var CommonGoods = function CommonGoods(props) {
@@ -15289,7 +16351,7 @@ var typeMap$1 = {
15289
16351
  }
15290
16352
  };
15291
16353
  var wdtReissue = function wdtReissue(props) {
15292
- var _value$wdtSystemOrder, _typeMap$type25, _typeMap$type27, _typeMap$type28, _value$typeMap$type$s5, _typeMap$type29, _typeMap$type30, _typeMap$type31;
16354
+ var _value$wdtSystemOrder, _typeMap$type26, _typeMap$type28, _typeMap$type29, _value$typeMap$type$s5, _typeMap$type30, _typeMap$type31, _typeMap$type32;
15293
16355
  var value = props.value,
15294
16356
  onChange = props.onChange,
15295
16357
  _props$reasonList = props.reasonList,
@@ -15450,19 +16512,25 @@ var wdtReissue = function wdtReissue(props) {
15450
16512
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
15451
16513
  };
15452
16514
  var selectedGoodsChange = useCallback(function (skuList) {
15453
- var _typeMap$type23, _value, _typeMap$type24;
16515
+ var _typeMap$type23, _typeMap$type24, _uniqBy, _typeMap$type25;
15454
16516
  var newValue = _objectSpread2({}, value);
15455
- 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)] = value === null || value === void 0 ? void 0 : (_value = value["".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)]) === null || _value === void 0 ? void 0 : _value.filter(function (item) {
15456
- return skuList.includes(item.id);
16517
+ // 原订单商品
16518
+ var originTradeGoodList = getGoodDetails({
16519
+ mode: isStrict
16520
+ }) || [];
16521
+ // 当前选中的所有商品【包含了原订单+商品库】
16522
+ var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".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)]) || [];
16523
+ 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)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
16524
+ return skuList.includes(item.uuid);
15457
16525
  });
15458
- console.log('newValue', newValue);
16526
+ console.log('商品发生变化', newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key)]);
15459
16527
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
15460
- }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key)]]);
16528
+ }, [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.key)], isStrict]);
15461
16529
  //显示选择商品按钮 原单换不显示选择商品
15462
16530
  var showChangeBtn = useMemo(function () {
15463
- var _typeMap$type26;
15464
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo]);
15465
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]]);
16531
+ var _typeMap$type27;
16532
+ return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
16533
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
15466
16534
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
15467
16535
  gutter: 8,
15468
16536
  wrap: true
@@ -15480,12 +16548,12 @@ var wdtReissue = function wdtReissue(props) {
15480
16548
  },
15481
16549
  disabled: disabled,
15482
16550
  allowClear: false,
15483
- 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.systemOrderNo)],
16551
+ 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.systemOrderNo)],
15484
16552
  onChange: function onChange(val) {
15485
16553
  return changeSystemOrderHandle(val);
15486
16554
  },
15487
16555
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
15488
- }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type29 = typeMap$1[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
16556
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type30 = typeMap$1[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
15489
16557
  return /*#__PURE__*/React.createElement(Select.Option, {
15490
16558
  key: item.billNo,
15491
16559
  value: item.billNo,
@@ -15506,7 +16574,7 @@ var wdtReissue = function wdtReissue(props) {
15506
16574
  disabled: disabled,
15507
16575
  allowClear: false,
15508
16576
  options: reasonList,
15509
- 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.typeName)],
16577
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type31 = typeMap$1[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.typeName)],
15510
16578
  onChange: function onChange(val) {
15511
16579
  return changeTypeHandle(val);
15512
16580
  }
@@ -15518,7 +16586,7 @@ var wdtReissue = function wdtReissue(props) {
15518
16586
  canUpdateNumber: showChangeBtn,
15519
16587
  showChangeBtn: showChangeBtn,
15520
16588
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
15521
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type31 = typeMap$1[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.key)],
16589
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type32 = typeMap$1[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.key)],
15522
16590
  onChange: function onChange(val) {
15523
16591
  return changeGoodHandle(val);
15524
16592
  },
@@ -16217,16 +17285,6 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
16217
17285
  };
16218
17286
 
16219
17287
  var _excluded$j = ["value", "onChange", "disabled", "failValue", "type"];
16220
- var msgTypeCh = {
16221
- pdd: '拼多多',
16222
- ding: '钉钉',
16223
- wechat: '微信',
16224
- qq: 'QQ',
16225
- qywx: '企业微信',
16226
- YZDKH: '邮政拦截',
16227
- YT: '圆通拦截',
16228
- feishu: '飞书'
16229
- };
16230
17288
  var MsgStatus = function MsgStatus(props) {
16231
17289
  var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
16232
17290
  var _props$value = props.value,
@@ -16316,7 +17374,7 @@ var typeMap$2 = {
16316
17374
  }
16317
17375
  };
16318
17376
  var bsE3Reissue = function bsE3Reissue(props) {
16319
- var _typeMap$type21, _typeMap$type23, _typeMap$type24, _value$typeMap$type$s5, _typeMap$type25, _typeMap$type26, _typeMap$type27;
17377
+ var _typeMap$type21, _typeMap$type24, _typeMap$type25, _value$typeMap$type$s5, _typeMap$type26, _typeMap$type27, _typeMap$type28;
16320
17378
  var value = props.value,
16321
17379
  onChange = props.onChange,
16322
17380
  _props$reasonList = props.reasonList,
@@ -16454,15 +17512,19 @@ var bsE3Reissue = function bsE3Reissue(props) {
16454
17512
  return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrderNo]);
16455
17513
  }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo]]);
16456
17514
  var selectedGoodsChange = useCallback(function (skuList) {
16457
- var _typeMap$type22, _getGoodDetails;
17515
+ var _typeMap$type22, _typeMap$type23, _uniqBy;
16458
17516
  var newValue = _objectSpread2({}, value);
16459
- newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = (_getGoodDetails = getGoodDetails({
17517
+ // 原订单商品
17518
+ var originTradeGoodList = getGoodDetails({
16460
17519
  mode: isStrict
16461
- })) === null || _getGoodDetails === void 0 ? void 0 : _getGoodDetails.filter(function (item) {
16462
- return skuList.includes(item.id);
17520
+ }) || [];
17521
+ // 当前选中的所有商品【包含了原订单+商品库】
17522
+ var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)]) || [];
17523
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
17524
+ return skuList.includes(item.uuid);
16463
17525
  });
16464
17526
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
16465
- }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)], isStrict]);
17527
+ }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)], isStrict]);
16466
17528
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
16467
17529
  gutter: 8,
16468
17530
  wrap: true,
@@ -16481,12 +17543,12 @@ var bsE3Reissue = function bsE3Reissue(props) {
16481
17543
  },
16482
17544
  disabled: disabled,
16483
17545
  allowClear: false,
16484
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo)],
17546
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo)],
16485
17547
  onChange: function onChange(val) {
16486
17548
  return changeSystemOrderHandle(val);
16487
17549
  },
16488
17550
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
16489
- }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
17551
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
16490
17552
  return /*#__PURE__*/React.createElement(Select.Option, {
16491
17553
  key: item.billNo,
16492
17554
  value: item.billNo,
@@ -16507,7 +17569,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
16507
17569
  disabled: disabled,
16508
17570
  allowClear: false,
16509
17571
  options: reasonList,
16510
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.typeName)],
17572
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.typeName)],
16511
17573
  onChange: function onChange(val) {
16512
17574
  return changeTypeHandle(val);
16513
17575
  }
@@ -16519,7 +17581,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
16519
17581
  canUpdateNumber: showChangeBtn,
16520
17582
  showChangeBtn: showChangeBtn,
16521
17583
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
16522
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.key)],
17584
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type28 = typeMap$2[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)],
16523
17585
  onChange: function onChange(val) {
16524
17586
  return changeGoodHandle(val);
16525
17587
  },
@@ -16535,4 +17597,253 @@ var bsE3Reissue = function bsE3Reissue(props) {
16535
17597
  })));
16536
17598
  };
16537
17599
 
16538
- export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods };
17600
+ var _excluded$l = ["value", "onChange", "reasonList", "disabled", "type"],
17601
+ _excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState"];
17602
+ var typeMap$3 = {
17603
+ GY_REISSUE_GOODS: {
17604
+ key: 'gyReissueGoods',
17605
+ name: '管易',
17606
+ typeName: 'gyReissueType',
17607
+ systemOrder: 'gySystemOrder',
17608
+ systemOrderNo: 'gySystemOrderNo',
17609
+ reissueSelectList: 'gyReissueSelectList',
17610
+ reissueSelectListReturn: 'gyReissueSelectListReturn',
17611
+ reissueDeleteGood: 'gyReissueDeleteGood',
17612
+ changeShopCode: 'gyChangeShopCode',
17613
+ reissueType: 'gyReissueType',
17614
+ formatDefaultField: {
17615
+ money: 'orderPrice',
17616
+ share: 'sharePrice'
17617
+ },
17618
+ getOrderList: gyUtils.getGyOrderListSingleton
17619
+ }
17620
+ };
17621
+ var GyReissue = function GyReissue(props) {
17622
+ var _value$gySystemOrder, _typeMap$type26, _typeMap$type28, _typeMap$type29, _value$typeMap$type$s5, _typeMap$type30, _typeMap$type31, _typeMap$type32;
17623
+ var value = props.value,
17624
+ onChange = props.onChange,
17625
+ _props$reasonList = props.reasonList,
17626
+ reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
17627
+ disabled = props.disabled,
17628
+ type = props.type,
17629
+ other = _objectWithoutProperties(props, _excluded$l);
17630
+ var showModeBtn = ((value === null || value === void 0 ? void 0 : (_value$gySystemOrder = value.gySystemOrder) === null || _value$gySystemOrder === void 0 ? void 0 : _value$gySystemOrder.orders) || []).some(function (order) {
17631
+ var _order$platformCode;
17632
+ return order === null || order === void 0 ? void 0 : (_order$platformCode = order.platformCode) === null || _order$platformCode === void 0 ? void 0 : _order$platformCode.includes(';');
17633
+ });
17634
+ var getOrderFlag = useRef(false);
17635
+ var _useState = useState(false),
17636
+ _useState2 = _slicedToArray(_useState, 2),
17637
+ isStrict = _useState2[0],
17638
+ setIsStrict = _useState2[1];
17639
+ useEffect(function () {
17640
+ var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
17641
+ if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$3[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$3[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)) {
17642
+ var _value$typeMap$type$s4, _typeMap$type3;
17643
+ getOrderFlag.current = true;
17644
+ getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$3[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);
17645
+ }
17646
+ return;
17647
+ }, [value]);
17648
+ var getOrderList = /*#__PURE__*/function () {
17649
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
17650
+ var _typeMap$type4;
17651
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
17652
+ while (1) switch (_context.prev = _context.next) {
17653
+ case 0:
17654
+ (_typeMap$type4 = typeMap$3[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
17655
+ var _typeMap$type5, _typeMap$type6;
17656
+ var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
17657
+ var showOrderInfo = orders.map(function (_ref2) {
17658
+ var billNo = _ref2.billNo,
17659
+ billType = _ref2.billType,
17660
+ billTag = _ref2.billTag,
17661
+ tradeTagName = _ref2.tradeTagName,
17662
+ deliveryState = _ref2.deliveryState,
17663
+ rest = _objectWithoutProperties(_ref2, _excluded2);
17664
+ return _objectSpread2(_objectSpread2({}, rest), {}, {
17665
+ billNo: billNo,
17666
+ billType: billType,
17667
+ billTag: billTag,
17668
+ tradeTagName: tradeTagName,
17669
+ deliveryState: deliveryState,
17670
+ deliveryStateName: GY_DELIVERY_STATE_MAPPING[deliveryState]
17671
+ });
17672
+ });
17673
+ onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$3[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type6 = typeMap$3[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]), {}, {
17674
+ showOrderInfo: showOrderInfo,
17675
+ orders: orders
17676
+ }))));
17677
+ });
17678
+ case 1:
17679
+ case "end":
17680
+ return _context.stop();
17681
+ }
17682
+ }, _callee);
17683
+ }));
17684
+ return function getOrderList(_x) {
17685
+ return _ref.apply(this, arguments);
17686
+ };
17687
+ }();
17688
+ var changeTypeHandle = function changeTypeHandle(val) {
17689
+ var _value$typeMap$type$t, _typeMap$type7, _typeMap$type8;
17690
+ var typeName = val === null || val === void 0 ? void 0 : val[0];
17691
+ if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type7 = typeMap$3[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) return;
17692
+ // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
17693
+ var newValue = _objectSpread2({}, value);
17694
+ newValue[(_typeMap$type8 = typeMap$3[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName] = val;
17695
+ if (typeName === '1') {
17696
+ var _typeMap$type9;
17697
+ newValue[(_typeMap$type9 = typeMap$3[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = getGoodDetails({
17698
+ mode: isStrict
17699
+ });
17700
+ } else if (typeName === '2') {
17701
+ var _typeMap$type10;
17702
+ // 切换到非原单,清空列表
17703
+ newValue[(_typeMap$type10 = typeMap$3[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key] = [];
17704
+ }
17705
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17706
+ };
17707
+ var handleModeChange = function handleModeChange(mode) {
17708
+ var _value$typeMap$type$t2, _typeMap$type11, _typeMap$type12;
17709
+ var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type11 = typeMap$3[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0]) === '1';
17710
+ setIsStrict(mode);
17711
+ if (!isOriginalOrder) return;
17712
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type12 = typeMap$3[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key, getGoodDetails({
17713
+ mode: mode
17714
+ }))));
17715
+ };
17716
+ var getGoodDetails = function getGoodDetails(_ref3) {
17717
+ var _typeMap$type13, _typeMap$type14, _order$details;
17718
+ var mode = _ref3.mode,
17719
+ sysOrderNo = _ref3.sysOrderNo;
17720
+ var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$3[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.systemOrder];
17721
+ var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type14 = typeMap$3[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.systemOrderNo];
17722
+ var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
17723
+ return order.code === systemOrderNo;
17724
+ });
17725
+ var goodDetails = (order === null || order === void 0 ? void 0 : (_order$details = order.details) === null || _order$details === void 0 ? void 0 : _order$details.length) ? updateGyGoodsHandle([order]) : [];
17726
+ var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
17727
+ return mode ? goodDetails.filter(function (goodItem) {
17728
+ return !orderNo || (orderNo || '').includes(goodItem.oid);
17729
+ }) : goodDetails;
17730
+ };
17731
+ var changeGoodHandle = function changeGoodHandle(val) {
17732
+ var _typeMap$type15;
17733
+ var newValue = _objectSpread2({}, value);
17734
+ newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type15 = typeMap$3[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.key)] = (val || []).map(function (item) {
17735
+ var _typeMap$type16, _typeMap$type17;
17736
+ item["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type16 = typeMap$3[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.formatDefaultField.money)] = 0;
17737
+ item["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type17 = typeMap$3[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.formatDefaultField.share)] = 0;
17738
+ return item;
17739
+ });
17740
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17741
+ };
17742
+ var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
17743
+ var _typeMap$type18, _value$typeMap$type$t3, _typeMap$type19, _value$typeMap$type$t4, _typeMap$type21;
17744
+ var newValue = _objectSpread2({}, value);
17745
+ newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type18 = typeMap$3[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrderNo)] = val;
17746
+ if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type19 = typeMap$3[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
17747
+ var _typeMap$type20;
17748
+ newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type20 = typeMap$3[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = [];
17749
+ } else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type21 = typeMap$3[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0])) {
17750
+ var _typeMap$type22;
17751
+ newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type22 = typeMap$3[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = getGoodDetails({
17752
+ mode: isStrict,
17753
+ sysOrderNo: val
17754
+ });
17755
+ }
17756
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17757
+ };
17758
+ var selectedGoodsChange = useCallback(function (skuList) {
17759
+ var _typeMap$type23, _typeMap$type24, _uniqBy, _typeMap$type25;
17760
+ var newValue = _objectSpread2({}, value);
17761
+ // 原订单商品
17762
+ var originTradeGoodList = getGoodDetails({
17763
+ mode: isStrict
17764
+ }) || [];
17765
+ // 当前选中的所有商品【包含了原订单+商品库】
17766
+ var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type23 = typeMap$3[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)]) || [];
17767
+ newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type24 = typeMap$3[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
17768
+ return skuList.includes(item.uuid);
17769
+ });
17770
+ console.log('商品发生变化', newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type25 = typeMap$3[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key)]);
17771
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17772
+ }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type26 = typeMap$3[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key)], isStrict]);
17773
+ //显示选择商品按钮 原单换不显示选择商品
17774
+ var showChangeBtn = useMemo(function () {
17775
+ var _typeMap$type27;
17776
+ return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$3[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
17777
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$3[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
17778
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
17779
+ gutter: 8,
17780
+ wrap: true
17781
+ }, /*#__PURE__*/React.createElement(Col, {
17782
+ className: "gutter-row",
17783
+ xs: {
17784
+ span: 11
17785
+ },
17786
+ sm: {
17787
+ span: 6
17788
+ }
17789
+ }, /*#__PURE__*/React.createElement(Select, {
17790
+ style: {
17791
+ marginBottom: '8px'
17792
+ },
17793
+ disabled: disabled,
17794
+ allowClear: false,
17795
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type29 = typeMap$3[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo)],
17796
+ onChange: function onChange(val) {
17797
+ return changeSystemOrderHandle(val);
17798
+ },
17799
+ placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
17800
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type30 = typeMap$3[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
17801
+ return /*#__PURE__*/React.createElement(Select.Option, {
17802
+ key: item.billNo,
17803
+ value: item.billNo,
17804
+ label: item.billNo
17805
+ }, item.billNo);
17806
+ }))), /*#__PURE__*/React.createElement(Col, {
17807
+ className: "gutter-row",
17808
+ xs: {
17809
+ span: 11
17810
+ },
17811
+ sm: {
17812
+ span: 6
17813
+ }
17814
+ }, /*#__PURE__*/React.createElement(Cascader, {
17815
+ style: {
17816
+ marginBottom: '8px'
17817
+ },
17818
+ disabled: disabled,
17819
+ allowClear: false,
17820
+ options: reasonList,
17821
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type31 = typeMap$3[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.typeName)],
17822
+ onChange: function onChange(val) {
17823
+ return changeTypeHandle(val);
17824
+ }
17825
+ }))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
17826
+ key: 'reissueGoods'
17827
+ }, other), {}, {
17828
+ type: type,
17829
+ disabled: disabled,
17830
+ canUpdateNumber: showChangeBtn,
17831
+ showChangeBtn: showChangeBtn,
17832
+ shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
17833
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type32 = typeMap$3[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.key)],
17834
+ onChange: function onChange(val) {
17835
+ return changeGoodHandle(val);
17836
+ },
17837
+ onModeChange: handleModeChange,
17838
+ showModeBtn: showModeBtn,
17839
+ isStrict: isStrict,
17840
+ tradeGoods: {
17841
+ originDataSource: getGoodDetails({
17842
+ mode: isStrict
17843
+ }),
17844
+ selectedGoodsChange: selectedGoodsChange
17845
+ }
17846
+ })));
17847
+ };
17848
+
17849
+ export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, GyReissue, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap };