@kmkf-fe-packages/basic-components 1.3.0 → 1.4.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/dist/index.esm.js +868 -301
- package/dist/index.js +870 -300
- package/dist/src/common/CommonExchangeGoods/index.d.ts +3 -0
- package/dist/src/common/CommonReturnGoods/index.d.ts +3 -0
- package/dist/src/index.d.ts +2 -0
- package/package.json +4 -3
package/dist/index.esm.js
CHANGED
|
@@ -8,364 +8,379 @@ import zhCN from 'antd/lib/locale/zh_CN';
|
|
|
8
8
|
import { cloneDeep, difference, differenceWith } from 'lodash';
|
|
9
9
|
import { useDebounceEffect } from 'ahooks';
|
|
10
10
|
import pubsub from 'pubsub-js';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
import BigNumber from 'bignumber.js';
|
|
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;
|
|
22
23
|
try {
|
|
23
|
-
if (
|
|
24
|
-
if (Object(
|
|
25
|
-
|
|
26
|
-
} else for (; !(
|
|
27
|
-
} catch (
|
|
28
|
-
|
|
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;
|
|
29
30
|
} finally {
|
|
30
31
|
try {
|
|
31
|
-
if (!
|
|
32
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
32
33
|
} finally {
|
|
33
|
-
if (
|
|
34
|
+
if (o) throw n;
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
|
-
return
|
|
37
|
+
return a;
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
|
-
function ownKeys(
|
|
40
|
-
var
|
|
40
|
+
function ownKeys(e, r) {
|
|
41
|
+
var t = Object.keys(e);
|
|
41
42
|
if (Object.getOwnPropertySymbols) {
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
return Object.getOwnPropertyDescriptor(
|
|
45
|
-
})),
|
|
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);
|
|
46
47
|
}
|
|
47
|
-
return
|
|
48
|
-
}
|
|
49
|
-
function _objectSpread2(
|
|
50
|
-
for (var
|
|
51
|
-
var
|
|
52
|
-
|
|
53
|
-
_defineProperty(
|
|
54
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
55
|
-
Object.defineProperty(
|
|
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));
|
|
56
57
|
});
|
|
57
58
|
}
|
|
58
|
-
return
|
|
59
|
+
return e;
|
|
59
60
|
}
|
|
60
61
|
function _regeneratorRuntime() {
|
|
61
62
|
_regeneratorRuntime = function () {
|
|
62
|
-
return
|
|
63
|
-
};
|
|
64
|
-
var
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
return e;
|
|
64
|
+
};
|
|
65
|
+
var t,
|
|
66
|
+
e = {},
|
|
67
|
+
r = Object.prototype,
|
|
68
|
+
n = r.hasOwnProperty,
|
|
69
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
70
|
+
t[e] = r.value;
|
|
69
71
|
},
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
function define(
|
|
75
|
-
return Object.defineProperty(
|
|
76
|
-
value:
|
|
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,
|
|
77
79
|
enumerable: !0,
|
|
78
80
|
configurable: !0,
|
|
79
81
|
writable: !0
|
|
80
|
-
}),
|
|
82
|
+
}), t[e];
|
|
81
83
|
}
|
|
82
84
|
try {
|
|
83
85
|
define({}, "");
|
|
84
|
-
} catch (
|
|
85
|
-
define = function (
|
|
86
|
-
return
|
|
86
|
+
} catch (t) {
|
|
87
|
+
define = function (t, e, r) {
|
|
88
|
+
return t[e] = r;
|
|
87
89
|
};
|
|
88
90
|
}
|
|
89
|
-
function wrap(
|
|
90
|
-
var
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
return
|
|
94
|
-
value: makeInvokeMethod(
|
|
95
|
-
}),
|
|
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;
|
|
96
98
|
}
|
|
97
|
-
function tryCatch(
|
|
99
|
+
function tryCatch(t, e, r) {
|
|
98
100
|
try {
|
|
99
101
|
return {
|
|
100
102
|
type: "normal",
|
|
101
|
-
arg:
|
|
103
|
+
arg: t.call(e, r)
|
|
102
104
|
};
|
|
103
|
-
} catch (
|
|
105
|
+
} catch (t) {
|
|
104
106
|
return {
|
|
105
107
|
type: "throw",
|
|
106
|
-
arg:
|
|
108
|
+
arg: t
|
|
107
109
|
};
|
|
108
110
|
}
|
|
109
111
|
}
|
|
110
|
-
|
|
111
|
-
var
|
|
112
|
+
e.wrap = wrap;
|
|
113
|
+
var h = "suspendedStart",
|
|
114
|
+
l = "suspendedYield",
|
|
115
|
+
f = "executing",
|
|
116
|
+
s = "completed",
|
|
117
|
+
y = {};
|
|
112
118
|
function Generator() {}
|
|
113
119
|
function GeneratorFunction() {}
|
|
114
120
|
function GeneratorFunctionPrototype() {}
|
|
115
|
-
var
|
|
116
|
-
define(
|
|
121
|
+
var p = {};
|
|
122
|
+
define(p, a, function () {
|
|
117
123
|
return this;
|
|
118
124
|
});
|
|
119
|
-
var
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
var
|
|
123
|
-
function defineIteratorMethods(
|
|
124
|
-
["next", "throw", "return"].forEach(function (
|
|
125
|
-
define(
|
|
126
|
-
return this._invoke(
|
|
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);
|
|
127
133
|
});
|
|
128
134
|
});
|
|
129
135
|
}
|
|
130
|
-
function AsyncIterator(
|
|
131
|
-
function invoke(
|
|
132
|
-
var
|
|
133
|
-
if ("throw" !==
|
|
134
|
-
var
|
|
135
|
-
|
|
136
|
-
return
|
|
137
|
-
invoke("next",
|
|
138
|
-
}, function (
|
|
139
|
-
invoke("throw",
|
|
140
|
-
}) :
|
|
141
|
-
|
|
142
|
-
}, function (
|
|
143
|
-
return invoke("throw",
|
|
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);
|
|
144
150
|
});
|
|
145
151
|
}
|
|
146
|
-
|
|
152
|
+
a(c.arg);
|
|
147
153
|
}
|
|
148
|
-
var
|
|
149
|
-
|
|
150
|
-
value: function (
|
|
154
|
+
var r;
|
|
155
|
+
o(this, "_invoke", {
|
|
156
|
+
value: function (t, n) {
|
|
151
157
|
function callInvokeWithMethodAndArg() {
|
|
152
|
-
return new
|
|
153
|
-
invoke(
|
|
158
|
+
return new e(function (e, r) {
|
|
159
|
+
invoke(t, n, e, r);
|
|
154
160
|
});
|
|
155
161
|
}
|
|
156
|
-
return
|
|
162
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
157
163
|
}
|
|
158
164
|
});
|
|
159
165
|
}
|
|
160
|
-
function makeInvokeMethod(
|
|
161
|
-
var
|
|
162
|
-
return function (
|
|
163
|
-
if (
|
|
164
|
-
if (
|
|
165
|
-
if ("throw" ===
|
|
166
|
-
return
|
|
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
|
+
};
|
|
167
176
|
}
|
|
168
|
-
for (
|
|
169
|
-
var
|
|
170
|
-
if (
|
|
171
|
-
var
|
|
172
|
-
if (
|
|
173
|
-
if (
|
|
174
|
-
return
|
|
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;
|
|
175
184
|
}
|
|
176
185
|
}
|
|
177
|
-
if ("next" ===
|
|
178
|
-
if (
|
|
179
|
-
|
|
180
|
-
} else "return" ===
|
|
181
|
-
|
|
182
|
-
var
|
|
183
|
-
if ("normal" ===
|
|
184
|
-
if (
|
|
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;
|
|
185
194
|
return {
|
|
186
|
-
value:
|
|
187
|
-
done:
|
|
195
|
+
value: p.arg,
|
|
196
|
+
done: n.done
|
|
188
197
|
};
|
|
189
198
|
}
|
|
190
|
-
"throw" ===
|
|
199
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
191
200
|
}
|
|
192
201
|
};
|
|
193
202
|
}
|
|
194
|
-
function maybeInvokeDelegate(
|
|
195
|
-
var
|
|
196
|
-
|
|
197
|
-
if (
|
|
198
|
-
var
|
|
199
|
-
if ("throw" ===
|
|
200
|
-
var
|
|
201
|
-
return
|
|
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);
|
|
202
211
|
}
|
|
203
|
-
function pushTryEntry(
|
|
204
|
-
var
|
|
205
|
-
tryLoc:
|
|
212
|
+
function pushTryEntry(t) {
|
|
213
|
+
var e = {
|
|
214
|
+
tryLoc: t[0]
|
|
206
215
|
};
|
|
207
|
-
1 in
|
|
216
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
208
217
|
}
|
|
209
|
-
function resetTryEntry(
|
|
210
|
-
var
|
|
211
|
-
|
|
218
|
+
function resetTryEntry(t) {
|
|
219
|
+
var e = t.completion || {};
|
|
220
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
212
221
|
}
|
|
213
|
-
function Context(
|
|
222
|
+
function Context(t) {
|
|
214
223
|
this.tryEntries = [{
|
|
215
224
|
tryLoc: "root"
|
|
216
|
-
}],
|
|
225
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
217
226
|
}
|
|
218
|
-
function values(
|
|
219
|
-
if (
|
|
220
|
-
var
|
|
221
|
-
if (
|
|
222
|
-
if ("function" == typeof
|
|
223
|
-
if (!isNaN(
|
|
224
|
-
var
|
|
225
|
-
|
|
226
|
-
for (; ++
|
|
227
|
-
return next.value =
|
|
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;
|
|
228
237
|
};
|
|
229
|
-
return
|
|
238
|
+
return i.next = i;
|
|
230
239
|
}
|
|
231
240
|
}
|
|
232
|
-
|
|
233
|
-
next: doneResult
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
|
-
function doneResult() {
|
|
237
|
-
return {
|
|
238
|
-
value: undefined,
|
|
239
|
-
done: !0
|
|
240
|
-
};
|
|
241
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
241
242
|
}
|
|
242
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype,
|
|
243
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
243
244
|
value: GeneratorFunctionPrototype,
|
|
244
245
|
configurable: !0
|
|
245
|
-
}),
|
|
246
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
246
247
|
value: GeneratorFunction,
|
|
247
248
|
configurable: !0
|
|
248
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype,
|
|
249
|
-
var
|
|
250
|
-
return !!
|
|
251
|
-
},
|
|
252
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(
|
|
253
|
-
},
|
|
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) {
|
|
254
255
|
return {
|
|
255
|
-
__await:
|
|
256
|
+
__await: t
|
|
256
257
|
};
|
|
257
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype,
|
|
258
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
258
259
|
return this;
|
|
259
|
-
}),
|
|
260
|
-
void 0 ===
|
|
261
|
-
var
|
|
262
|
-
return
|
|
263
|
-
return
|
|
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();
|
|
264
265
|
});
|
|
265
|
-
}, defineIteratorMethods(
|
|
266
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
266
267
|
return this;
|
|
267
|
-
}), define(
|
|
268
|
+
}), define(g, "toString", function () {
|
|
268
269
|
return "[object Generator]";
|
|
269
|
-
}),
|
|
270
|
-
var
|
|
271
|
-
|
|
272
|
-
for (var
|
|
273
|
-
return
|
|
274
|
-
for (;
|
|
275
|
-
var
|
|
276
|
-
if (
|
|
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;
|
|
277
278
|
}
|
|
278
279
|
return next.done = !0, next;
|
|
279
280
|
};
|
|
280
|
-
},
|
|
281
|
+
}, e.values = values, Context.prototype = {
|
|
281
282
|
constructor: Context,
|
|
282
|
-
reset: function (
|
|
283
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent =
|
|
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);
|
|
284
285
|
},
|
|
285
286
|
stop: function () {
|
|
286
287
|
this.done = !0;
|
|
287
|
-
var
|
|
288
|
-
if ("throw" ===
|
|
288
|
+
var t = this.tryEntries[0].completion;
|
|
289
|
+
if ("throw" === t.type) throw t.arg;
|
|
289
290
|
return this.rval;
|
|
290
291
|
},
|
|
291
|
-
dispatchException: function (
|
|
292
|
-
if (this.done) throw
|
|
293
|
-
var
|
|
294
|
-
function handle(
|
|
295
|
-
return
|
|
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;
|
|
296
297
|
}
|
|
297
|
-
for (var
|
|
298
|
-
var
|
|
299
|
-
|
|
300
|
-
if ("root" ===
|
|
301
|
-
if (
|
|
302
|
-
var
|
|
303
|
-
|
|
304
|
-
if (
|
|
305
|
-
if (this.prev <
|
|
306
|
-
if (this.prev <
|
|
307
|
-
} else if (
|
|
308
|
-
if (this.prev <
|
|
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);
|
|
309
310
|
} else {
|
|
310
|
-
if (!
|
|
311
|
-
if (this.prev <
|
|
311
|
+
if (!u) throw new Error("try statement without catch or finally");
|
|
312
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
312
313
|
}
|
|
313
314
|
}
|
|
314
315
|
}
|
|
315
316
|
},
|
|
316
|
-
abrupt: function (
|
|
317
|
-
for (var
|
|
318
|
-
var
|
|
319
|
-
if (
|
|
320
|
-
var
|
|
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;
|
|
321
322
|
break;
|
|
322
323
|
}
|
|
323
324
|
}
|
|
324
|
-
|
|
325
|
-
var
|
|
326
|
-
return
|
|
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);
|
|
327
328
|
},
|
|
328
|
-
complete: function (
|
|
329
|
-
if ("throw" ===
|
|
330
|
-
return "break" ===
|
|
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;
|
|
331
332
|
},
|
|
332
|
-
finish: function (
|
|
333
|
-
for (var
|
|
334
|
-
var
|
|
335
|
-
if (
|
|
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;
|
|
336
337
|
}
|
|
337
338
|
},
|
|
338
|
-
catch: function (
|
|
339
|
-
for (var
|
|
340
|
-
var
|
|
341
|
-
if (
|
|
342
|
-
var
|
|
343
|
-
if ("throw" ===
|
|
344
|
-
var
|
|
345
|
-
resetTryEntry(
|
|
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);
|
|
346
347
|
}
|
|
347
|
-
return
|
|
348
|
+
return o;
|
|
348
349
|
}
|
|
349
350
|
}
|
|
350
351
|
throw new Error("illegal catch attempt");
|
|
351
352
|
},
|
|
352
|
-
delegateYield: function (
|
|
353
|
+
delegateYield: function (e, r, n) {
|
|
353
354
|
return this.delegate = {
|
|
354
|
-
iterator: values(
|
|
355
|
-
resultName:
|
|
356
|
-
nextLoc:
|
|
357
|
-
}, "next" === this.method && (this.arg =
|
|
358
|
-
}
|
|
359
|
-
},
|
|
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);
|
|
360
371
|
}
|
|
361
|
-
function
|
|
372
|
+
function _toPropertyKey(t) {
|
|
373
|
+
var i = _toPrimitive(t, "string");
|
|
374
|
+
return "symbol" == typeof i ? i : String(i);
|
|
375
|
+
}
|
|
376
|
+
function _typeof(o) {
|
|
362
377
|
"@babel/helpers - typeof";
|
|
363
378
|
|
|
364
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
365
|
-
return typeof
|
|
366
|
-
} : function (
|
|
367
|
-
return
|
|
368
|
-
}, _typeof(
|
|
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);
|
|
369
384
|
}
|
|
370
385
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
371
386
|
try {
|
|
@@ -472,20 +487,6 @@ function _nonIterableSpread() {
|
|
|
472
487
|
function _nonIterableRest() {
|
|
473
488
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
474
489
|
}
|
|
475
|
-
function _toPrimitive(input, hint) {
|
|
476
|
-
if (typeof input !== "object" || input === null) return input;
|
|
477
|
-
var prim = input[Symbol.toPrimitive];
|
|
478
|
-
if (prim !== undefined) {
|
|
479
|
-
var res = prim.call(input, hint || "default");
|
|
480
|
-
if (typeof res !== "object") return res;
|
|
481
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
482
|
-
}
|
|
483
|
-
return (hint === "string" ? String : Number)(input);
|
|
484
|
-
}
|
|
485
|
-
function _toPropertyKey(arg) {
|
|
486
|
-
var key = _toPrimitive(arg, "string");
|
|
487
|
-
return typeof key === "symbol" ? key : String(key);
|
|
488
|
-
}
|
|
489
490
|
|
|
490
491
|
function ApaasCascader(props) {
|
|
491
492
|
return /*#__PURE__*/React.createElement(Cascader, _objectSpread2({
|
|
@@ -7637,19 +7638,21 @@ var BuyerNick = function BuyerNick(props) {
|
|
|
7637
7638
|
var changeValue = function changeValue(e, type) {
|
|
7638
7639
|
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, e.target.value)));
|
|
7639
7640
|
};
|
|
7640
|
-
useEffect(
|
|
7641
|
-
|
|
7642
|
-
|
|
7643
|
-
|
|
7644
|
-
|
|
7645
|
-
|
|
7646
|
-
|
|
7647
|
-
|
|
7648
|
-
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
}
|
|
7641
|
+
// useEffect(() => {
|
|
7642
|
+
// //淘宝平台和抖音平台需要展示买家id
|
|
7643
|
+
// const platformList = ['TAOBAO', 'FXG'];
|
|
7644
|
+
// const showBuyerId = (shopList || []).some(
|
|
7645
|
+
// (item) =>
|
|
7646
|
+
// item.shopId == shopId && platformList.includes(item.shopSourceStr),
|
|
7647
|
+
// );
|
|
7648
|
+
// //如果不是淘宝店铺 旺旺id为空
|
|
7649
|
+
// if (!showBuyerId) {
|
|
7650
|
+
// onChange?.({
|
|
7651
|
+
// ...value,
|
|
7652
|
+
// buyerOpenUid: '',
|
|
7653
|
+
// });
|
|
7654
|
+
// }
|
|
7655
|
+
// }, [shopId, shopList]);
|
|
7653
7656
|
return /*#__PURE__*/React.createElement(Input, {
|
|
7654
7657
|
disabled: disabled,
|
|
7655
7658
|
placeholder: "\u8BF7\u8F93\u5165\u4E70\u5BB6\u6635\u79F0",
|
|
@@ -10442,7 +10445,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
10442
10445
|
var wdtSendOptions = WdtSendData.getInstance().wdtSendData || [];
|
|
10443
10446
|
useEffect(function () {
|
|
10444
10447
|
//没有值塞个默认值
|
|
10445
|
-
if (!(value === null || value === void 0 ? void 0 : value.length)) {
|
|
10448
|
+
if (!(value === null || value === void 0 ? void 0 : value.length) && type !== 1) {
|
|
10446
10449
|
onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap[type]);
|
|
10447
10450
|
}
|
|
10448
10451
|
}, [value, type]);
|
|
@@ -10505,7 +10508,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
10505
10508
|
return setChangeIndex(index);
|
|
10506
10509
|
}
|
|
10507
10510
|
}, "\u5305\u88F9".concat(index + 1)));
|
|
10508
|
-
}))) : null, value.length ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React.createElement(ApaasLogistics, {
|
|
10511
|
+
}))) : 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, {
|
|
10509
10512
|
disabled: disabled,
|
|
10510
10513
|
placeholder: "\u7269\u6D41\u516C\u53F8",
|
|
10511
10514
|
onChange: function onChange(val) {
|
|
@@ -11662,9 +11665,34 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11662
11665
|
useEffect(function () {
|
|
11663
11666
|
setSelectedRowKeys([]);
|
|
11664
11667
|
}, [tableSelect, selectType]);
|
|
11665
|
-
var updateHandle = function updateHandle(val, index,
|
|
11668
|
+
var updateHandle = function updateHandle(val, index, columnType) {
|
|
11666
11669
|
if (value === null || value === void 0 ? void 0 : value.length) {
|
|
11667
|
-
value[index][
|
|
11670
|
+
value[index][columnType] = val;
|
|
11671
|
+
if (type === 'WDT_RETURN_GOODS') {
|
|
11672
|
+
if (['sharePrice', 'num'].includes(columnType)) {
|
|
11673
|
+
var totalMoney = null;
|
|
11674
|
+
if (columnType === 'num') {
|
|
11675
|
+
totalMoney = new BigNumber(value[index][columnType]).multipliedBy(new BigNumber(value[index].sharePrice));
|
|
11676
|
+
} else {
|
|
11677
|
+
totalMoney = new BigNumber(value[index][columnType]).multipliedBy(new BigNumber(value[index].num));
|
|
11678
|
+
}
|
|
11679
|
+
if (totalMoney !== null) {
|
|
11680
|
+
value[index]['returnPrice'] = totalMoney.toString();
|
|
11681
|
+
}
|
|
11682
|
+
}
|
|
11683
|
+
} else if (type === 'WDT_EXCHANGE_GOODS') {
|
|
11684
|
+
if (['price', 'num'].includes(columnType)) {
|
|
11685
|
+
var _totalMoney = null;
|
|
11686
|
+
if (columnType === 'num') {
|
|
11687
|
+
_totalMoney = new BigNumber(value[index][columnType]).multipliedBy(new BigNumber(value[index].price));
|
|
11688
|
+
} else {
|
|
11689
|
+
_totalMoney = new BigNumber(value[index][columnType]).multipliedBy(new BigNumber(value[index].num));
|
|
11690
|
+
}
|
|
11691
|
+
if (_totalMoney !== null) {
|
|
11692
|
+
value[index]['exchangePrice'] = _totalMoney.toString();
|
|
11693
|
+
}
|
|
11694
|
+
}
|
|
11695
|
+
}
|
|
11668
11696
|
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(value));
|
|
11669
11697
|
}
|
|
11670
11698
|
};
|
|
@@ -11729,7 +11757,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11729
11757
|
width: 70
|
|
11730
11758
|
},
|
|
11731
11759
|
value: val,
|
|
11732
|
-
min:
|
|
11760
|
+
min: 1,
|
|
11733
11761
|
precision: 0,
|
|
11734
11762
|
onChange: function onChange(num) {
|
|
11735
11763
|
return updateHandle(num, index, 'num');
|
|
@@ -11770,6 +11798,260 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11770
11798
|
}
|
|
11771
11799
|
}];
|
|
11772
11800
|
break;
|
|
11801
|
+
case 'WDT_RETURN_GOODS':
|
|
11802
|
+
{
|
|
11803
|
+
columns = [{
|
|
11804
|
+
dataIndex: 'goodId',
|
|
11805
|
+
title: "SPUID",
|
|
11806
|
+
align: 'center',
|
|
11807
|
+
ellipsis: true,
|
|
11808
|
+
width: 70
|
|
11809
|
+
}, {
|
|
11810
|
+
dataIndex: 'goodNo',
|
|
11811
|
+
title: "\u5546\u54C1SPU\u7F16\u7801",
|
|
11812
|
+
align: 'center',
|
|
11813
|
+
ellipsis: true,
|
|
11814
|
+
width: 180
|
|
11815
|
+
}, {
|
|
11816
|
+
dataIndex: 'goodName',
|
|
11817
|
+
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
11818
|
+
align: 'center',
|
|
11819
|
+
ellipsis: true,
|
|
11820
|
+
width: 250
|
|
11821
|
+
}, {
|
|
11822
|
+
dataIndex: 'specId',
|
|
11823
|
+
title: "".concat(text, "SKUID"),
|
|
11824
|
+
align: 'center',
|
|
11825
|
+
ellipsis: true,
|
|
11826
|
+
width: 100
|
|
11827
|
+
}, {
|
|
11828
|
+
dataIndex: 'specNo',
|
|
11829
|
+
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
11830
|
+
align: 'center',
|
|
11831
|
+
ellipsis: true,
|
|
11832
|
+
width: 180
|
|
11833
|
+
}, {
|
|
11834
|
+
dataIndex: 'specName',
|
|
11835
|
+
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
11836
|
+
align: 'center',
|
|
11837
|
+
ellipsis: true,
|
|
11838
|
+
width: 250
|
|
11839
|
+
}, {
|
|
11840
|
+
dataIndex: 'num',
|
|
11841
|
+
title: "".concat(text, "\u9000\u8D27\u6570\u91CF"),
|
|
11842
|
+
align: 'center',
|
|
11843
|
+
ellipsis: true,
|
|
11844
|
+
width: 100,
|
|
11845
|
+
render: function render(val, record, index) {
|
|
11846
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
11847
|
+
style: {
|
|
11848
|
+
width: 70
|
|
11849
|
+
},
|
|
11850
|
+
value: val,
|
|
11851
|
+
min: 1,
|
|
11852
|
+
precision: 0,
|
|
11853
|
+
onChange: function onChange(num) {
|
|
11854
|
+
return updateHandle(num, index, 'num');
|
|
11855
|
+
}
|
|
11856
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
11857
|
+
}
|
|
11858
|
+
}, {
|
|
11859
|
+
dataIndex: 'sharePrice',
|
|
11860
|
+
title: "\u5206\u644A\u4EF7",
|
|
11861
|
+
align: 'center',
|
|
11862
|
+
ellipsis: true,
|
|
11863
|
+
width: 80,
|
|
11864
|
+
render: function render(val, record, index) {
|
|
11865
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
11866
|
+
style: {
|
|
11867
|
+
width: 70
|
|
11868
|
+
},
|
|
11869
|
+
value: val,
|
|
11870
|
+
min: 0,
|
|
11871
|
+
onChange: function onChange(value) {
|
|
11872
|
+
return updateHandle(value, index, 'sharePrice');
|
|
11873
|
+
}
|
|
11874
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
11875
|
+
}
|
|
11876
|
+
}, {
|
|
11877
|
+
dataIndex: 'returnPrice',
|
|
11878
|
+
title: "".concat(text, "\u9000\u8D27\u91D1\u989D"),
|
|
11879
|
+
align: 'center',
|
|
11880
|
+
ellipsis: true,
|
|
11881
|
+
width: 100
|
|
11882
|
+
}, {
|
|
11883
|
+
dataIndex: 'giftType',
|
|
11884
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
11885
|
+
align: 'center',
|
|
11886
|
+
ellipsis: true,
|
|
11887
|
+
width: 100,
|
|
11888
|
+
render: function render(val) {
|
|
11889
|
+
var giftTypeMap = {
|
|
11890
|
+
0: '非赠品',
|
|
11891
|
+
1: '自动赠送',
|
|
11892
|
+
2: '手工赠送',
|
|
11893
|
+
3: '回购自动送赠品',
|
|
11894
|
+
4: '前N有礼送赠品',
|
|
11895
|
+
6: '天猫优仓赠品',
|
|
11896
|
+
7: '淘宝CRM会员送赠'
|
|
11897
|
+
};
|
|
11898
|
+
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
11899
|
+
}
|
|
11900
|
+
}, {
|
|
11901
|
+
dataIndex: 'type',
|
|
11902
|
+
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
11903
|
+
align: 'center',
|
|
11904
|
+
ellipsis: true,
|
|
11905
|
+
width: 100,
|
|
11906
|
+
render: function render(val, record, index) {
|
|
11907
|
+
var options = [{
|
|
11908
|
+
label: '单品',
|
|
11909
|
+
value: '1'
|
|
11910
|
+
}, {
|
|
11911
|
+
label: '组合装',
|
|
11912
|
+
value: '2'
|
|
11913
|
+
}];
|
|
11914
|
+
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
11915
|
+
style: {
|
|
11916
|
+
width: 70
|
|
11917
|
+
},
|
|
11918
|
+
options: options,
|
|
11919
|
+
value: val,
|
|
11920
|
+
onChange: function onChange(value) {
|
|
11921
|
+
return updateHandle(value, index, 'type');
|
|
11922
|
+
}
|
|
11923
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
11924
|
+
}
|
|
11925
|
+
}];
|
|
11926
|
+
}
|
|
11927
|
+
break;
|
|
11928
|
+
case 'WDT_EXCHANGE_GOODS':
|
|
11929
|
+
{
|
|
11930
|
+
columns = [{
|
|
11931
|
+
dataIndex: 'goodId',
|
|
11932
|
+
title: "SPUID",
|
|
11933
|
+
align: 'center',
|
|
11934
|
+
ellipsis: true,
|
|
11935
|
+
width: 70
|
|
11936
|
+
}, {
|
|
11937
|
+
dataIndex: 'goodNo',
|
|
11938
|
+
title: "\u5546\u54C1SPU\u7F16\u7801",
|
|
11939
|
+
align: 'center',
|
|
11940
|
+
ellipsis: true,
|
|
11941
|
+
width: 180
|
|
11942
|
+
}, {
|
|
11943
|
+
dataIndex: 'goodName',
|
|
11944
|
+
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
11945
|
+
align: 'center',
|
|
11946
|
+
ellipsis: true,
|
|
11947
|
+
width: 250
|
|
11948
|
+
}, {
|
|
11949
|
+
dataIndex: 'specId',
|
|
11950
|
+
title: "".concat(text, "SKUID"),
|
|
11951
|
+
align: 'center',
|
|
11952
|
+
ellipsis: true,
|
|
11953
|
+
width: 100
|
|
11954
|
+
}, {
|
|
11955
|
+
dataIndex: 'specNo',
|
|
11956
|
+
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
11957
|
+
align: 'center',
|
|
11958
|
+
ellipsis: true,
|
|
11959
|
+
width: 180
|
|
11960
|
+
}, {
|
|
11961
|
+
dataIndex: 'specName',
|
|
11962
|
+
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
11963
|
+
align: 'center',
|
|
11964
|
+
ellipsis: true,
|
|
11965
|
+
width: 250
|
|
11966
|
+
}, {
|
|
11967
|
+
dataIndex: 'num',
|
|
11968
|
+
title: "".concat(text, "\u6362\u51FA\u6570\u91CF"),
|
|
11969
|
+
align: 'center',
|
|
11970
|
+
ellipsis: true,
|
|
11971
|
+
width: 100,
|
|
11972
|
+
render: function render(val, record, index) {
|
|
11973
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
11974
|
+
style: {
|
|
11975
|
+
width: 70
|
|
11976
|
+
},
|
|
11977
|
+
value: val,
|
|
11978
|
+
min: 1,
|
|
11979
|
+
precision: 0,
|
|
11980
|
+
onChange: function onChange(num) {
|
|
11981
|
+
return updateHandle(num, index, 'num');
|
|
11982
|
+
}
|
|
11983
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
11984
|
+
}
|
|
11985
|
+
}, {
|
|
11986
|
+
dataIndex: 'price',
|
|
11987
|
+
title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
|
|
11988
|
+
align: 'center',
|
|
11989
|
+
ellipsis: true,
|
|
11990
|
+
width: 100,
|
|
11991
|
+
render: function render(val, record, index) {
|
|
11992
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
11993
|
+
style: {
|
|
11994
|
+
width: 70
|
|
11995
|
+
},
|
|
11996
|
+
value: val,
|
|
11997
|
+
min: 0,
|
|
11998
|
+
onChange: function onChange(value) {
|
|
11999
|
+
return updateHandle(value, index, 'price');
|
|
12000
|
+
}
|
|
12001
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
12002
|
+
}
|
|
12003
|
+
}, {
|
|
12004
|
+
dataIndex: 'exchangePrice',
|
|
12005
|
+
title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
|
|
12006
|
+
align: 'center',
|
|
12007
|
+
ellipsis: true,
|
|
12008
|
+
width: 100
|
|
12009
|
+
}, {
|
|
12010
|
+
dataIndex: 'giftType',
|
|
12011
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
12012
|
+
align: 'center',
|
|
12013
|
+
ellipsis: true,
|
|
12014
|
+
width: 100,
|
|
12015
|
+
render: function render(val) {
|
|
12016
|
+
var giftTypeMap = {
|
|
12017
|
+
0: '非赠品',
|
|
12018
|
+
1: '自动赠送',
|
|
12019
|
+
2: '手工赠送',
|
|
12020
|
+
3: '回购自动送赠品',
|
|
12021
|
+
4: '前N有礼送赠品',
|
|
12022
|
+
6: '天猫优仓赠品',
|
|
12023
|
+
7: '淘宝CRM会员送赠'
|
|
12024
|
+
};
|
|
12025
|
+
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
12026
|
+
}
|
|
12027
|
+
}, {
|
|
12028
|
+
dataIndex: 'type',
|
|
12029
|
+
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
12030
|
+
align: 'center',
|
|
12031
|
+
ellipsis: true,
|
|
12032
|
+
width: 100,
|
|
12033
|
+
render: function render(val, record, index) {
|
|
12034
|
+
var options = [{
|
|
12035
|
+
label: '单品',
|
|
12036
|
+
value: '1'
|
|
12037
|
+
}, {
|
|
12038
|
+
label: '组合装',
|
|
12039
|
+
value: '2'
|
|
12040
|
+
}];
|
|
12041
|
+
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
12042
|
+
style: {
|
|
12043
|
+
width: 70
|
|
12044
|
+
},
|
|
12045
|
+
options: options,
|
|
12046
|
+
value: val,
|
|
12047
|
+
onChange: function onChange(value) {
|
|
12048
|
+
return updateHandle(value, index, 'type');
|
|
12049
|
+
}
|
|
12050
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
12051
|
+
}
|
|
12052
|
+
}];
|
|
12053
|
+
}
|
|
12054
|
+
break;
|
|
11773
12055
|
default:
|
|
11774
12056
|
columns = [{
|
|
11775
12057
|
dataIndex: 'mark',
|
|
@@ -11847,7 +12129,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11847
12129
|
width: 70
|
|
11848
12130
|
},
|
|
11849
12131
|
value: val,
|
|
11850
|
-
min:
|
|
12132
|
+
min: 1,
|
|
11851
12133
|
precision: 0,
|
|
11852
12134
|
onChange: function onChange(num) {
|
|
11853
12135
|
return updateHandle(num, index, 'number');
|
|
@@ -11911,7 +12193,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11911
12193
|
}, [showHeader, value, disabled]);
|
|
11912
12194
|
var onSubmit = function onSubmit(list) {
|
|
11913
12195
|
var newList = [];
|
|
11914
|
-
if (['WDT_REISSUE_GOODS', 'WDT_GOODS'].includes(type)) {
|
|
12196
|
+
if (['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type)) {
|
|
11915
12197
|
newList = list.map(function (item) {
|
|
11916
12198
|
item.uuid = uuid();
|
|
11917
12199
|
item.canDelete = true;
|
|
@@ -11919,6 +12201,10 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11919
12201
|
item.orderPrice = 0;
|
|
11920
12202
|
item.sharePrice = 0;
|
|
11921
12203
|
item.canUpdateNumber = canUpdateNumber;
|
|
12204
|
+
if (type === 'WDT_EXCHANGE_GOODS') {
|
|
12205
|
+
item.price = item.retailPrice;
|
|
12206
|
+
item.type = '1';
|
|
12207
|
+
}
|
|
11922
12208
|
return item;
|
|
11923
12209
|
});
|
|
11924
12210
|
} else {
|
|
@@ -11989,7 +12275,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11989
12275
|
locale: {
|
|
11990
12276
|
emptyText: '暂无数据'
|
|
11991
12277
|
}
|
|
11992
|
-
})), ['WDT_REISSUE_GOODS', 'WDT_GOODS'].includes(type) ? /*#__PURE__*/React.createElement(WdtGoodsModal, {
|
|
12278
|
+
})), ['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type) ? /*#__PURE__*/React.createElement(WdtGoodsModal, {
|
|
11993
12279
|
ref: refModal,
|
|
11994
12280
|
onSubmit: onSubmit,
|
|
11995
12281
|
width: width,
|
|
@@ -12635,9 +12921,11 @@ var index$1 = (function (props) {
|
|
|
12635
12921
|
_onChange = props.onChange,
|
|
12636
12922
|
disabled = props.disabled,
|
|
12637
12923
|
type = props.type;
|
|
12924
|
+
var onceRef = useRef(false);
|
|
12638
12925
|
useEffect(function () {
|
|
12639
12926
|
var _value$orders, _value$showOrderInfo;
|
|
12640
|
-
if (!(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo) && (value === null || value === void 0 ? void 0 : (_value$showOrderInfo = value.showOrderInfo) === null || _value$showOrderInfo === void 0 ? void 0 : _value$showOrderInfo.length)) {
|
|
12927
|
+
if (!(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo) && (value === null || value === void 0 ? void 0 : (_value$showOrderInfo = value.showOrderInfo) === null || _value$showOrderInfo === void 0 ? void 0 : _value$showOrderInfo.length) && !onceRef.current) {
|
|
12928
|
+
onceRef.current = true;
|
|
12641
12929
|
if (type === 'BS_SYSTEM_ORDER') {
|
|
12642
12930
|
getOrderList(value.orderNo);
|
|
12643
12931
|
} else if (type === 'WLN_SYSTEM_ORDER') {
|
|
@@ -12646,7 +12934,7 @@ var index$1 = (function (props) {
|
|
|
12646
12934
|
getWdtOrderList(value.orderNo);
|
|
12647
12935
|
}
|
|
12648
12936
|
}
|
|
12649
|
-
}, [value
|
|
12937
|
+
}, [value, type]);
|
|
12650
12938
|
var columns = useMemo(function () {
|
|
12651
12939
|
var _columnsNameMap$type, _columnsNameMap$type2;
|
|
12652
12940
|
return [{
|
|
@@ -12689,7 +12977,8 @@ var index$1 = (function (props) {
|
|
|
12689
12977
|
})
|
|
12690
12978
|
}));
|
|
12691
12979
|
}
|
|
12692
|
-
|
|
12980
|
+
onceRef.current = false;
|
|
12981
|
+
case 7:
|
|
12693
12982
|
case "end":
|
|
12694
12983
|
return _context.stop();
|
|
12695
12984
|
}
|
|
@@ -12734,7 +13023,8 @@ var index$1 = (function (props) {
|
|
|
12734
13023
|
})
|
|
12735
13024
|
}));
|
|
12736
13025
|
}
|
|
12737
|
-
|
|
13026
|
+
onceRef.current = false;
|
|
13027
|
+
case 7:
|
|
12738
13028
|
case "end":
|
|
12739
13029
|
return _context2.stop();
|
|
12740
13030
|
}
|
|
@@ -12746,7 +13036,7 @@ var index$1 = (function (props) {
|
|
|
12746
13036
|
}();
|
|
12747
13037
|
var getWdtOrderList = /*#__PURE__*/function () {
|
|
12748
13038
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(orderNo) {
|
|
12749
|
-
var _yield$request3, success, data;
|
|
13039
|
+
var _yield$request3, success, data, trades;
|
|
12750
13040
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
12751
13041
|
while (1) switch (_context3.prev = _context3.next) {
|
|
12752
13042
|
case 0:
|
|
@@ -12762,15 +13052,25 @@ var index$1 = (function (props) {
|
|
|
12762
13052
|
success = _yield$request3.success;
|
|
12763
13053
|
data = _yield$request3.data;
|
|
12764
13054
|
if (success) {
|
|
13055
|
+
trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
|
|
13056
|
+
return (item.srcTid || '').split(',').includes(orderNo);
|
|
13057
|
+
}).map(function (item) {
|
|
13058
|
+
if (Array.isArray(item.goodDetails)) {
|
|
13059
|
+
item.goodDetails = item.goodDetails.filter(function (good) {
|
|
13060
|
+
return good.srcTid === orderNo;
|
|
13061
|
+
});
|
|
13062
|
+
}
|
|
13063
|
+
return item;
|
|
13064
|
+
});
|
|
12765
13065
|
_onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
12766
|
-
orders:
|
|
13066
|
+
orders: trades.map(function (item) {
|
|
12767
13067
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
12768
13068
|
billNo: item.tradeNo,
|
|
12769
13069
|
billType: WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
12770
13070
|
billTag: item.tagName
|
|
12771
13071
|
});
|
|
12772
13072
|
}),
|
|
12773
|
-
showOrderInfo:
|
|
13073
|
+
showOrderInfo: trades.map(function (item) {
|
|
12774
13074
|
return {
|
|
12775
13075
|
billNo: item.tradeNo,
|
|
12776
13076
|
billType: WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
@@ -12779,7 +13079,8 @@ var index$1 = (function (props) {
|
|
|
12779
13079
|
})
|
|
12780
13080
|
}));
|
|
12781
13081
|
}
|
|
12782
|
-
|
|
13082
|
+
onceRef.current = false;
|
|
13083
|
+
case 7:
|
|
12783
13084
|
case "end":
|
|
12784
13085
|
return _context3.stop();
|
|
12785
13086
|
}
|
|
@@ -12859,8 +13160,10 @@ var componentMap$1 = {
|
|
|
12859
13160
|
reissueType: 'wdtReissueType',
|
|
12860
13161
|
returnType: 'wdtReturnType',
|
|
12861
13162
|
returnSelectListReturn: 'wdtReturnSelectListReturn',
|
|
13163
|
+
returnSelectList: 'wdtReturnSelectList',
|
|
12862
13164
|
deleteGood: 'wdtDeleteGood',
|
|
12863
|
-
returnDeleteGood: 'wdtReturnDeleteGood'
|
|
13165
|
+
returnDeleteGood: 'wdtReturnDeleteGood',
|
|
13166
|
+
exchangeDeleteGood: 'wdtExchangeDeleteGood'
|
|
12864
13167
|
}
|
|
12865
13168
|
}
|
|
12866
13169
|
};
|
|
@@ -12927,7 +13230,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
12927
13230
|
setTableSelect(['2', '4'].includes(data.val));
|
|
12928
13231
|
if (['1', '3'].includes(data.val)) {
|
|
12929
13232
|
var _valueRef$current5, _valueRef$current6;
|
|
12930
|
-
pubsub.publish(componentMap$1[
|
|
13233
|
+
pubsub.publish(componentMap$1[compType].eventNameMap.returnSelectListReturn, {
|
|
12931
13234
|
list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current5 = valueRef.current) === null || _valueRef$current5 === void 0 ? void 0 : _valueRef$current5[componentMap$1[compType].key]) || []),
|
|
12932
13235
|
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current6 = valueRef.current) === null || _valueRef$current6 === void 0 ? void 0 : _valueRef$current6.shopCode,
|
|
12933
13236
|
goodValue: data === null || data === void 0 ? void 0 : data.goodValue
|
|
@@ -12945,15 +13248,15 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
12945
13248
|
};
|
|
12946
13249
|
}, [disabled]);
|
|
12947
13250
|
var _onSelect = function onSelect(list) {
|
|
12948
|
-
var _withInfo$current, _withInfo$current2, _valueRef$current7;
|
|
13251
|
+
var _typeMap, _withInfo$current, _withInfo$current2, _valueRef$current7;
|
|
12949
13252
|
if (disabled) return;
|
|
12950
13253
|
var newList = cloneDeep(list);
|
|
12951
|
-
var typeMap =
|
|
13254
|
+
var typeMap = (_typeMap = {
|
|
12952
13255
|
// type: componentMap[compType].eventNameMap.selectList,
|
|
12953
13256
|
// returnType: componentMap[compType].eventNameMap.returnSelectList,
|
|
12954
13257
|
// reissueType: componentMap[compType].eventNameMap.reissueSelectList,
|
|
12955
13258
|
type: componentMap$1[compType].eventNameMap.selectList
|
|
12956
|
-
}, "".concat(componentMap$1[compType].type, "ReissueType"), componentMap$1[compType].eventNameMap.reissueSelectList);
|
|
13259
|
+
}, _defineProperty(_typeMap, "".concat(componentMap$1[compType].type, "ReissueType"), componentMap$1[compType].eventNameMap.reissueSelectList), _defineProperty(_typeMap, "".concat(componentMap$1[compType].type, "ReturnType"), componentMap$1[compType].eventNameMap.returnSelectList), _typeMap);
|
|
12957
13260
|
var type = typeMap[(_withInfo$current = withInfo.current) === null || _withInfo$current === void 0 ? void 0 : _withInfo$current.type];
|
|
12958
13261
|
// console.log('onSelect', type, withInfo.current, newList);
|
|
12959
13262
|
pubsub.publish(type, {
|
|
@@ -12971,6 +13274,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
12971
13274
|
pubsub.publish(componentMap$1[compType].eventNameMap.deleteGood, deleteId);
|
|
12972
13275
|
pubsub.publish(componentMap$1[compType].eventNameMap.reissueDeleteGood, deleteId);
|
|
12973
13276
|
pubsub.publish(componentMap$1[compType].eventNameMap.returnDeleteGood, deleteId);
|
|
13277
|
+
pubsub.publish(componentMap$1[compType].eventNameMap.exchangeDeleteGood, deleteId);
|
|
12974
13278
|
};
|
|
12975
13279
|
var changeHandle = function changeHandle(list) {
|
|
12976
13280
|
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, componentMap$1[compType].key, list)));
|
|
@@ -12995,6 +13299,263 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
12995
13299
|
}));
|
|
12996
13300
|
};
|
|
12997
13301
|
|
|
13302
|
+
var componentMap$2 = {
|
|
13303
|
+
'WDT_RETURN_GOODS': {
|
|
13304
|
+
type: 'wdt',
|
|
13305
|
+
valueKey: 'wdtReturnGoods',
|
|
13306
|
+
returnTypeKey: 'wdtReturnType',
|
|
13307
|
+
name: '旺店通',
|
|
13308
|
+
eventNameMap: {
|
|
13309
|
+
changeShopCode: 'wdtChangeShopCode',
|
|
13310
|
+
returnType: 'wdtReturnType',
|
|
13311
|
+
returnSelectListReturn: 'wdtReturnSelectListReturn',
|
|
13312
|
+
returnDeleteGood: 'wdtReturnDeleteGood',
|
|
13313
|
+
returnSelectList: 'wdtReturnSelectList',
|
|
13314
|
+
exchangeCopyGood: 'wdtExchangeCopyGood',
|
|
13315
|
+
exchangeBackCopyGood: 'wdtExchangeBackCopyGood'
|
|
13316
|
+
}
|
|
13317
|
+
}
|
|
13318
|
+
};
|
|
13319
|
+
var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
13320
|
+
var value = props.value,
|
|
13321
|
+
onChange = props.onChange,
|
|
13322
|
+
_props$reasonList = props.reasonList,
|
|
13323
|
+
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
13324
|
+
disabled = props.disabled,
|
|
13325
|
+
compType = props.type;
|
|
13326
|
+
var valueRef = useRef({});
|
|
13327
|
+
useEffect(function () {
|
|
13328
|
+
var subscription = pubsub.subscribe(componentMap$2[compType].eventNameMap.exchangeCopyGood, function () {
|
|
13329
|
+
var _valueRef$current, _valueRef$current2;
|
|
13330
|
+
pubsub.publish(componentMap$2[compType].eventNameMap.exchangeBackCopyGood, {
|
|
13331
|
+
list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current = valueRef.current) === null || _valueRef$current === void 0 ? void 0 : _valueRef$current[componentMap$2[compType].valueKey]) || []),
|
|
13332
|
+
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.shopCode
|
|
13333
|
+
});
|
|
13334
|
+
});
|
|
13335
|
+
return function () {
|
|
13336
|
+
pubsub.unsubscribe(subscription);
|
|
13337
|
+
};
|
|
13338
|
+
}, []);
|
|
13339
|
+
useEffect(function () {
|
|
13340
|
+
var subscription = pubsub.subscribe(componentMap$2[compType].eventNameMap.returnSelectList, function (_, data) {
|
|
13341
|
+
if (disabled) return;
|
|
13342
|
+
var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
|
|
13343
|
+
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
13344
|
+
});
|
|
13345
|
+
if (compType === 'WDT_RETURN_GOODS') {
|
|
13346
|
+
newValue[componentMap$2[compType].valueKey] = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
|
|
13347
|
+
if (typeof item.type === 'undefined') {
|
|
13348
|
+
item.type = '1';
|
|
13349
|
+
}
|
|
13350
|
+
if (typeof item.returnPrice === 'undefined') {
|
|
13351
|
+
item.returnPrice = new BigNumber(item.num).multipliedBy(new BigNumber(item.sharePrice)).toString();
|
|
13352
|
+
}
|
|
13353
|
+
if (item.srcOid) {
|
|
13354
|
+
item.oid = item.srcOid;
|
|
13355
|
+
}
|
|
13356
|
+
return item;
|
|
13357
|
+
});
|
|
13358
|
+
} else {
|
|
13359
|
+
newValue[componentMap$2[compType].valueKey] = (data === null || data === void 0 ? void 0 : data.list) || [];
|
|
13360
|
+
}
|
|
13361
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13362
|
+
});
|
|
13363
|
+
return function () {
|
|
13364
|
+
pubsub.unsubscribe(subscription);
|
|
13365
|
+
};
|
|
13366
|
+
}, []);
|
|
13367
|
+
useEffect(function () {
|
|
13368
|
+
var subscription = pubsub.subscribe(componentMap$2[compType].eventNameMap.returnSelectListReturn, function (_, data) {
|
|
13369
|
+
if (disabled) return;
|
|
13370
|
+
var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
|
|
13371
|
+
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
13372
|
+
});
|
|
13373
|
+
if (compType === 'WDT_RETURN_GOODS') {
|
|
13374
|
+
newValue[componentMap$2[compType].valueKey] = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
|
|
13375
|
+
if (typeof item.type === 'undefined') {
|
|
13376
|
+
item.type = '1';
|
|
13377
|
+
}
|
|
13378
|
+
if (typeof item.returnPrice === 'undefined') {
|
|
13379
|
+
item.returnPrice = new BigNumber(item.num).multipliedBy(new BigNumber(item.sharePrice)).toString();
|
|
13380
|
+
}
|
|
13381
|
+
if (item.srcOid) {
|
|
13382
|
+
item.oid = item.srcOid;
|
|
13383
|
+
}
|
|
13384
|
+
return item;
|
|
13385
|
+
});
|
|
13386
|
+
} else {
|
|
13387
|
+
newValue[componentMap$2[compType].valueKey] = (data === null || data === void 0 ? void 0 : data.list) || [];
|
|
13388
|
+
}
|
|
13389
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13390
|
+
});
|
|
13391
|
+
return function () {
|
|
13392
|
+
pubsub.unsubscribe(subscription);
|
|
13393
|
+
};
|
|
13394
|
+
}, []);
|
|
13395
|
+
useEffect(function () {
|
|
13396
|
+
valueRef.current = value;
|
|
13397
|
+
pubsub.subscribeOnce(componentMap$2[compType].eventNameMap.returnDeleteGood, function (_, data) {
|
|
13398
|
+
if (disabled) return;
|
|
13399
|
+
if (value) {
|
|
13400
|
+
var newValue = _objectSpread2({}, value);
|
|
13401
|
+
newValue[componentMap$2[compType].valueKey] = newValue[componentMap$2[compType].valueKey].filter(function (item) {
|
|
13402
|
+
return item.sku !== data;
|
|
13403
|
+
});
|
|
13404
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13405
|
+
}
|
|
13406
|
+
});
|
|
13407
|
+
pubsub.subscribeOnce(componentMap$2[compType].eventNameMap.changeShopCode, function (type, data) {
|
|
13408
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
13409
|
+
shopCode: data.shopCode
|
|
13410
|
+
}));
|
|
13411
|
+
});
|
|
13412
|
+
}, [value, disabled]);
|
|
13413
|
+
var changeTypeHandle = function changeTypeHandle(val) {
|
|
13414
|
+
var newValue = _objectSpread2({}, value);
|
|
13415
|
+
newValue[componentMap$2[compType].returnTypeKey] = val;
|
|
13416
|
+
newValue[componentMap$2[compType].valueKey] = [];
|
|
13417
|
+
if (['2'].includes(val[0])) {
|
|
13418
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13419
|
+
valueRef.current = newValue;
|
|
13420
|
+
}
|
|
13421
|
+
pubsub.publish(componentMap$2[compType].eventNameMap.returnType, {
|
|
13422
|
+
val: val[0],
|
|
13423
|
+
goodValue: newValue
|
|
13424
|
+
});
|
|
13425
|
+
};
|
|
13426
|
+
var changeGoodHandle = function changeGoodHandle(val) {
|
|
13427
|
+
var newValue = _objectSpread2({}, value);
|
|
13428
|
+
newValue[componentMap$2[compType].valueKey] = val;
|
|
13429
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13430
|
+
};
|
|
13431
|
+
//显示选择商品按钮 原单换不显示选择商品
|
|
13432
|
+
// const showChangeBtn = useMemo(() => {
|
|
13433
|
+
// return ['2'].includes(value?.[componentMap[compType].returnTypeKey]?.[0]);
|
|
13434
|
+
// }, [value?.[componentMap[compType].returnTypeKey]]);
|
|
13435
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Cascader, {
|
|
13436
|
+
style: {
|
|
13437
|
+
marginBottom: '8px'
|
|
13438
|
+
},
|
|
13439
|
+
disabled: disabled,
|
|
13440
|
+
allowClear: false,
|
|
13441
|
+
options: reasonList,
|
|
13442
|
+
value: value === null || value === void 0 ? void 0 : value[componentMap$2[compType].returnTypeKey],
|
|
13443
|
+
onChange: function onChange(val) {
|
|
13444
|
+
return changeTypeHandle(val);
|
|
13445
|
+
}
|
|
13446
|
+
}), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
13447
|
+
key: componentMap$2[compType].type
|
|
13448
|
+
}, props), {}, {
|
|
13449
|
+
disabled: disabled,
|
|
13450
|
+
canUpdateNumber: true,
|
|
13451
|
+
showChangeBtn: false,
|
|
13452
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
13453
|
+
value: value === null || value === void 0 ? void 0 : value[componentMap$2[compType].valueKey],
|
|
13454
|
+
onChange: function onChange(val) {
|
|
13455
|
+
return changeGoodHandle(val);
|
|
13456
|
+
}
|
|
13457
|
+
})));
|
|
13458
|
+
};
|
|
13459
|
+
|
|
13460
|
+
var componentMap$3 = {
|
|
13461
|
+
'WDT_EXCHANGE_GOODS': {
|
|
13462
|
+
type: 'wdt',
|
|
13463
|
+
valueKey: 'wdtExchangeGoods',
|
|
13464
|
+
returnTypeKey: 'wdtExchangeType',
|
|
13465
|
+
name: '旺店通',
|
|
13466
|
+
eventNameMap: {
|
|
13467
|
+
changeShopCode: 'wdtChangeShopCode',
|
|
13468
|
+
exchangeDeleteGood: 'wdtExchangeDeleteGood',
|
|
13469
|
+
exchangeCopyGood: 'wdtExchangeCopyGood',
|
|
13470
|
+
exchangeBackCopyGood: 'wdtExchangeBackCopyGood'
|
|
13471
|
+
}
|
|
13472
|
+
}
|
|
13473
|
+
};
|
|
13474
|
+
var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
13475
|
+
var value = props.value,
|
|
13476
|
+
onChange = props.onChange,
|
|
13477
|
+
disabled = props.disabled,
|
|
13478
|
+
compType = props.type;
|
|
13479
|
+
var valueRef = useRef({});
|
|
13480
|
+
useEffect(function () {
|
|
13481
|
+
var subscription = pubsub.subscribe(componentMap$3[compType].eventNameMap.exchangeBackCopyGood, function (_, data) {
|
|
13482
|
+
if (disabled) return;
|
|
13483
|
+
var newValue = {
|
|
13484
|
+
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
13485
|
+
};
|
|
13486
|
+
if (compType === 'WDT_EXCHANGE_GOODS') {
|
|
13487
|
+
newValue[componentMap$3[compType].valueKey] = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
|
|
13488
|
+
if (typeof item.type === 'undefined') {
|
|
13489
|
+
item.type = '1';
|
|
13490
|
+
}
|
|
13491
|
+
item.price = item.sharePrice;
|
|
13492
|
+
if (typeof item.exchangePrice === 'undefined') {
|
|
13493
|
+
item.exchangePrice = new BigNumber(item.num).multipliedBy(new BigNumber(item.price)).toString();
|
|
13494
|
+
}
|
|
13495
|
+
return item;
|
|
13496
|
+
});
|
|
13497
|
+
} else {
|
|
13498
|
+
newValue[componentMap$3[compType].valueKey] = (data === null || data === void 0 ? void 0 : data.list) || [];
|
|
13499
|
+
}
|
|
13500
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13501
|
+
});
|
|
13502
|
+
return function () {
|
|
13503
|
+
pubsub.unsubscribe(subscription);
|
|
13504
|
+
};
|
|
13505
|
+
});
|
|
13506
|
+
useEffect(function () {
|
|
13507
|
+
valueRef.current = value;
|
|
13508
|
+
pubsub.subscribeOnce(componentMap$3[compType].eventNameMap.exchangeDeleteGood, function (_, data) {
|
|
13509
|
+
if (disabled) return;
|
|
13510
|
+
if (value) {
|
|
13511
|
+
var newValue = _objectSpread2({}, value);
|
|
13512
|
+
newValue[componentMap$3[compType].valueKey] = newValue[componentMap$3[compType].valueKey].filter(function (item) {
|
|
13513
|
+
return item.sku !== data;
|
|
13514
|
+
});
|
|
13515
|
+
onChange(newValue);
|
|
13516
|
+
}
|
|
13517
|
+
});
|
|
13518
|
+
pubsub.subscribeOnce(componentMap$3[compType].eventNameMap.changeShopCode, function (type, data) {
|
|
13519
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
13520
|
+
shopCode: data.shopCode
|
|
13521
|
+
}));
|
|
13522
|
+
});
|
|
13523
|
+
}, [value]);
|
|
13524
|
+
var changeGoodHandle = function changeGoodHandle(val) {
|
|
13525
|
+
var newValue = _objectSpread2({}, value);
|
|
13526
|
+
if (compType === 'WDT_EXCHANGE_GOODS') {
|
|
13527
|
+
val = val.map(function (item) {
|
|
13528
|
+
item.exchangePrice = new BigNumber(item.num).multipliedBy(new BigNumber(item.price)).toString();
|
|
13529
|
+
return item;
|
|
13530
|
+
});
|
|
13531
|
+
}
|
|
13532
|
+
newValue[componentMap$3[compType].valueKey] = val;
|
|
13533
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13534
|
+
};
|
|
13535
|
+
var copyGoods = function copyGoods() {
|
|
13536
|
+
var copyHandle = function copyHandle() {
|
|
13537
|
+
pubsub.publish(componentMap$3[compType].eventNameMap.exchangeCopyGood, 'WDT_EXCHANGE_GOODS');
|
|
13538
|
+
};
|
|
13539
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
13540
|
+
type: "link",
|
|
13541
|
+
onClick: copyHandle
|
|
13542
|
+
}, "\u590D\u5236\u9000\u56DE\u5546\u54C1");
|
|
13543
|
+
};
|
|
13544
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
13545
|
+
key: componentMap$3[compType].type
|
|
13546
|
+
}, props), {}, {
|
|
13547
|
+
disabled: disabled,
|
|
13548
|
+
canUpdateNumber: true,
|
|
13549
|
+
showChangeBtn: true,
|
|
13550
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
13551
|
+
value: value === null || value === void 0 ? void 0 : value[componentMap$3[compType].valueKey],
|
|
13552
|
+
otherOperations: copyGoods(),
|
|
13553
|
+
onChange: function onChange(val) {
|
|
13554
|
+
return changeGoodHandle(val);
|
|
13555
|
+
}
|
|
13556
|
+
})));
|
|
13557
|
+
};
|
|
13558
|
+
|
|
12998
13559
|
var _excluded$g = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
12999
13560
|
var typeMap$1 = {
|
|
13000
13561
|
WDT_REISSUE_GOODS: {
|
|
@@ -13783,7 +14344,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
13783
14344
|
changeIndex = _useState2[0],
|
|
13784
14345
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
13785
14346
|
useEffect(function () {
|
|
13786
|
-
if (!(value === null || value === void 0 ? void 0 : value.length)) {
|
|
14347
|
+
if (!(value === null || value === void 0 ? void 0 : value.length) && type === 1) {
|
|
13787
14348
|
onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap$1[type].initValue);
|
|
13788
14349
|
}
|
|
13789
14350
|
}, [value, type]);
|
|
@@ -13822,7 +14383,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
13822
14383
|
return setChangeIndex(index);
|
|
13823
14384
|
}
|
|
13824
14385
|
}, "\u7CFB\u7EDF\u8BA2\u5355\u53F7".concat(index + 1)));
|
|
13825
|
-
}))) : null, value.length ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
14386
|
+
}))) : null, value.length || type !== 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
13826
14387
|
disabled: disabled,
|
|
13827
14388
|
placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
|
|
13828
14389
|
onChange: function onChange(e) {
|
|
@@ -13837,12 +14398,18 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
13837
14398
|
},
|
|
13838
14399
|
value: (_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2.returnGoodsTradeId
|
|
13839
14400
|
})) : null, type === 3 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
13840
|
-
disabled:
|
|
14401
|
+
disabled: disabled,
|
|
13841
14402
|
placeholder: "\u8BF7\u8F93\u5165\u8865\u53D1\u5355id",
|
|
14403
|
+
onChange: function onChange(e) {
|
|
14404
|
+
return changeInputHandle(e.target.value, 'billNo');
|
|
14405
|
+
},
|
|
13842
14406
|
value: (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.billNo
|
|
13843
14407
|
})) : null, type === 4 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
13844
|
-
disabled:
|
|
14408
|
+
disabled: disabled,
|
|
13845
14409
|
placeholder: "\u8BF7\u8F93\u5165\u6362\u8D27\u5355id",
|
|
14410
|
+
onChange: function onChange(e) {
|
|
14411
|
+
return changeInputHandle(e.target.value, 'billNo');
|
|
14412
|
+
},
|
|
13846
14413
|
value: (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4.billNo
|
|
13847
14414
|
})) : null) : null);
|
|
13848
14415
|
};
|
|
@@ -13904,7 +14471,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
13904
14471
|
return setChangeIndex(index);
|
|
13905
14472
|
}
|
|
13906
14473
|
}, "\u7CFB\u7EDF\u8BA2\u5355\u53F7".concat(index + 1)));
|
|
13907
|
-
}))) : null,
|
|
14474
|
+
}))) : null, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
13908
14475
|
showSearch: true,
|
|
13909
14476
|
value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex.status,
|
|
13910
14477
|
filterOption: function filterOption(input, option) {
|
|
@@ -13920,7 +14487,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
13920
14487
|
}
|
|
13921
14488
|
}))), ((_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2.reason) ? /*#__PURE__*/React.createElement("div", {
|
|
13922
14489
|
className: "c-red"
|
|
13923
|
-
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null)
|
|
14490
|
+
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null));
|
|
13924
14491
|
};
|
|
13925
14492
|
|
|
13926
14493
|
var _excluded$j = ["value", "onChange", "disabled", "failValue", "type"];
|
|
@@ -14008,4 +14575,4 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
14008
14575
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
14009
14576
|
};
|
|
14010
14577
|
|
|
14011
|
-
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, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, 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, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods };
|
|
14578
|
+
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, 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, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods };
|