@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.js
CHANGED
|
@@ -12,6 +12,7 @@ var zhCN = require('antd/lib/locale/zh_CN');
|
|
|
12
12
|
var lodash = require('lodash');
|
|
13
13
|
var ahooks = require('ahooks');
|
|
14
14
|
var pubsub = require('pubsub-js');
|
|
15
|
+
var BigNumber = require('bignumber.js');
|
|
15
16
|
|
|
16
17
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
17
18
|
|
|
@@ -19,364 +20,379 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
19
20
|
var request__default = /*#__PURE__*/_interopDefaultLegacy(request);
|
|
20
21
|
var zhCN__default = /*#__PURE__*/_interopDefaultLegacy(zhCN);
|
|
21
22
|
var pubsub__default = /*#__PURE__*/_interopDefaultLegacy(pubsub);
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
var BigNumber__default = /*#__PURE__*/_interopDefaultLegacy(BigNumber);
|
|
24
|
+
|
|
25
|
+
function _iterableToArrayLimit(r, l) {
|
|
26
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
27
|
+
if (null != t) {
|
|
28
|
+
var e,
|
|
29
|
+
n,
|
|
30
|
+
i,
|
|
31
|
+
u,
|
|
32
|
+
a = [],
|
|
33
|
+
f = !0,
|
|
34
|
+
o = !1;
|
|
33
35
|
try {
|
|
34
|
-
if (
|
|
35
|
-
if (Object(
|
|
36
|
-
|
|
37
|
-
} else for (; !(
|
|
38
|
-
} catch (
|
|
39
|
-
|
|
36
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
37
|
+
if (Object(t) !== t) return;
|
|
38
|
+
f = !1;
|
|
39
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
40
|
+
} catch (r) {
|
|
41
|
+
o = !0, n = r;
|
|
40
42
|
} finally {
|
|
41
43
|
try {
|
|
42
|
-
if (!
|
|
44
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
43
45
|
} finally {
|
|
44
|
-
if (
|
|
46
|
+
if (o) throw n;
|
|
45
47
|
}
|
|
46
48
|
}
|
|
47
|
-
return
|
|
49
|
+
return a;
|
|
48
50
|
}
|
|
49
51
|
}
|
|
50
|
-
function ownKeys(
|
|
51
|
-
var
|
|
52
|
+
function ownKeys(e, r) {
|
|
53
|
+
var t = Object.keys(e);
|
|
52
54
|
if (Object.getOwnPropertySymbols) {
|
|
53
|
-
var
|
|
54
|
-
|
|
55
|
-
return Object.getOwnPropertyDescriptor(
|
|
56
|
-
})),
|
|
55
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
56
|
+
r && (o = o.filter(function (r) {
|
|
57
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
58
|
+
})), t.push.apply(t, o);
|
|
57
59
|
}
|
|
58
|
-
return
|
|
59
|
-
}
|
|
60
|
-
function _objectSpread2(
|
|
61
|
-
for (var
|
|
62
|
-
var
|
|
63
|
-
|
|
64
|
-
_defineProperty(
|
|
65
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
66
|
-
Object.defineProperty(
|
|
60
|
+
return t;
|
|
61
|
+
}
|
|
62
|
+
function _objectSpread2(e) {
|
|
63
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
64
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
65
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
66
|
+
_defineProperty(e, r, t[r]);
|
|
67
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
68
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
67
69
|
});
|
|
68
70
|
}
|
|
69
|
-
return
|
|
71
|
+
return e;
|
|
70
72
|
}
|
|
71
73
|
function _regeneratorRuntime() {
|
|
72
74
|
_regeneratorRuntime = function () {
|
|
73
|
-
return
|
|
74
|
-
};
|
|
75
|
-
var
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
return e;
|
|
76
|
+
};
|
|
77
|
+
var t,
|
|
78
|
+
e = {},
|
|
79
|
+
r = Object.prototype,
|
|
80
|
+
n = r.hasOwnProperty,
|
|
81
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
82
|
+
t[e] = r.value;
|
|
80
83
|
},
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
function define(
|
|
86
|
-
return Object.defineProperty(
|
|
87
|
-
value:
|
|
84
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
85
|
+
a = i.iterator || "@@iterator",
|
|
86
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
87
|
+
u = i.toStringTag || "@@toStringTag";
|
|
88
|
+
function define(t, e, r) {
|
|
89
|
+
return Object.defineProperty(t, e, {
|
|
90
|
+
value: r,
|
|
88
91
|
enumerable: !0,
|
|
89
92
|
configurable: !0,
|
|
90
93
|
writable: !0
|
|
91
|
-
}),
|
|
94
|
+
}), t[e];
|
|
92
95
|
}
|
|
93
96
|
try {
|
|
94
97
|
define({}, "");
|
|
95
|
-
} catch (
|
|
96
|
-
define = function (
|
|
97
|
-
return
|
|
98
|
+
} catch (t) {
|
|
99
|
+
define = function (t, e, r) {
|
|
100
|
+
return t[e] = r;
|
|
98
101
|
};
|
|
99
102
|
}
|
|
100
|
-
function wrap(
|
|
101
|
-
var
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
return
|
|
105
|
-
value: makeInvokeMethod(
|
|
106
|
-
}),
|
|
103
|
+
function wrap(t, e, r, n) {
|
|
104
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
105
|
+
a = Object.create(i.prototype),
|
|
106
|
+
c = new Context(n || []);
|
|
107
|
+
return o(a, "_invoke", {
|
|
108
|
+
value: makeInvokeMethod(t, r, c)
|
|
109
|
+
}), a;
|
|
107
110
|
}
|
|
108
|
-
function tryCatch(
|
|
111
|
+
function tryCatch(t, e, r) {
|
|
109
112
|
try {
|
|
110
113
|
return {
|
|
111
114
|
type: "normal",
|
|
112
|
-
arg:
|
|
115
|
+
arg: t.call(e, r)
|
|
113
116
|
};
|
|
114
|
-
} catch (
|
|
117
|
+
} catch (t) {
|
|
115
118
|
return {
|
|
116
119
|
type: "throw",
|
|
117
|
-
arg:
|
|
120
|
+
arg: t
|
|
118
121
|
};
|
|
119
122
|
}
|
|
120
123
|
}
|
|
121
|
-
|
|
122
|
-
var
|
|
124
|
+
e.wrap = wrap;
|
|
125
|
+
var h = "suspendedStart",
|
|
126
|
+
l = "suspendedYield",
|
|
127
|
+
f = "executing",
|
|
128
|
+
s = "completed",
|
|
129
|
+
y = {};
|
|
123
130
|
function Generator() {}
|
|
124
131
|
function GeneratorFunction() {}
|
|
125
132
|
function GeneratorFunctionPrototype() {}
|
|
126
|
-
var
|
|
127
|
-
define(
|
|
133
|
+
var p = {};
|
|
134
|
+
define(p, a, function () {
|
|
128
135
|
return this;
|
|
129
136
|
});
|
|
130
|
-
var
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
var
|
|
134
|
-
function defineIteratorMethods(
|
|
135
|
-
["next", "throw", "return"].forEach(function (
|
|
136
|
-
define(
|
|
137
|
-
return this._invoke(
|
|
137
|
+
var d = Object.getPrototypeOf,
|
|
138
|
+
v = d && d(d(values([])));
|
|
139
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
140
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
141
|
+
function defineIteratorMethods(t) {
|
|
142
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
143
|
+
define(t, e, function (t) {
|
|
144
|
+
return this._invoke(e, t);
|
|
138
145
|
});
|
|
139
146
|
});
|
|
140
147
|
}
|
|
141
|
-
function AsyncIterator(
|
|
142
|
-
function invoke(
|
|
143
|
-
var
|
|
144
|
-
if ("throw" !==
|
|
145
|
-
var
|
|
146
|
-
|
|
147
|
-
return
|
|
148
|
-
invoke("next",
|
|
149
|
-
}, function (
|
|
150
|
-
invoke("throw",
|
|
151
|
-
}) :
|
|
152
|
-
|
|
153
|
-
}, function (
|
|
154
|
-
return invoke("throw",
|
|
148
|
+
function AsyncIterator(t, e) {
|
|
149
|
+
function invoke(r, o, i, a) {
|
|
150
|
+
var c = tryCatch(t[r], t, o);
|
|
151
|
+
if ("throw" !== c.type) {
|
|
152
|
+
var u = c.arg,
|
|
153
|
+
h = u.value;
|
|
154
|
+
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
155
|
+
invoke("next", t, i, a);
|
|
156
|
+
}, function (t) {
|
|
157
|
+
invoke("throw", t, i, a);
|
|
158
|
+
}) : e.resolve(h).then(function (t) {
|
|
159
|
+
u.value = t, i(u);
|
|
160
|
+
}, function (t) {
|
|
161
|
+
return invoke("throw", t, i, a);
|
|
155
162
|
});
|
|
156
163
|
}
|
|
157
|
-
|
|
164
|
+
a(c.arg);
|
|
158
165
|
}
|
|
159
|
-
var
|
|
160
|
-
|
|
161
|
-
value: function (
|
|
166
|
+
var r;
|
|
167
|
+
o(this, "_invoke", {
|
|
168
|
+
value: function (t, n) {
|
|
162
169
|
function callInvokeWithMethodAndArg() {
|
|
163
|
-
return new
|
|
164
|
-
invoke(
|
|
170
|
+
return new e(function (e, r) {
|
|
171
|
+
invoke(t, n, e, r);
|
|
165
172
|
});
|
|
166
173
|
}
|
|
167
|
-
return
|
|
174
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
168
175
|
}
|
|
169
176
|
});
|
|
170
177
|
}
|
|
171
|
-
function makeInvokeMethod(
|
|
172
|
-
var
|
|
173
|
-
return function (
|
|
174
|
-
if (
|
|
175
|
-
if (
|
|
176
|
-
if ("throw" ===
|
|
177
|
-
return
|
|
178
|
+
function makeInvokeMethod(e, r, n) {
|
|
179
|
+
var o = h;
|
|
180
|
+
return function (i, a) {
|
|
181
|
+
if (o === f) throw new Error("Generator is already running");
|
|
182
|
+
if (o === s) {
|
|
183
|
+
if ("throw" === i) throw a;
|
|
184
|
+
return {
|
|
185
|
+
value: t,
|
|
186
|
+
done: !0
|
|
187
|
+
};
|
|
178
188
|
}
|
|
179
|
-
for (
|
|
180
|
-
var
|
|
181
|
-
if (
|
|
182
|
-
var
|
|
183
|
-
if (
|
|
184
|
-
if (
|
|
185
|
-
return
|
|
189
|
+
for (n.method = i, n.arg = a;;) {
|
|
190
|
+
var c = n.delegate;
|
|
191
|
+
if (c) {
|
|
192
|
+
var u = maybeInvokeDelegate(c, n);
|
|
193
|
+
if (u) {
|
|
194
|
+
if (u === y) continue;
|
|
195
|
+
return u;
|
|
186
196
|
}
|
|
187
197
|
}
|
|
188
|
-
if ("next" ===
|
|
189
|
-
if (
|
|
190
|
-
|
|
191
|
-
} else "return" ===
|
|
192
|
-
|
|
193
|
-
var
|
|
194
|
-
if ("normal" ===
|
|
195
|
-
if (
|
|
198
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
199
|
+
if (o === h) throw o = s, n.arg;
|
|
200
|
+
n.dispatchException(n.arg);
|
|
201
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
202
|
+
o = f;
|
|
203
|
+
var p = tryCatch(e, r, n);
|
|
204
|
+
if ("normal" === p.type) {
|
|
205
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
196
206
|
return {
|
|
197
|
-
value:
|
|
198
|
-
done:
|
|
207
|
+
value: p.arg,
|
|
208
|
+
done: n.done
|
|
199
209
|
};
|
|
200
210
|
}
|
|
201
|
-
"throw" ===
|
|
211
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
202
212
|
}
|
|
203
213
|
};
|
|
204
214
|
}
|
|
205
|
-
function maybeInvokeDelegate(
|
|
206
|
-
var
|
|
207
|
-
|
|
208
|
-
if (
|
|
209
|
-
var
|
|
210
|
-
if ("throw" ===
|
|
211
|
-
var
|
|
212
|
-
return
|
|
215
|
+
function maybeInvokeDelegate(e, r) {
|
|
216
|
+
var n = r.method,
|
|
217
|
+
o = e.iterator[n];
|
|
218
|
+
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;
|
|
219
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
220
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
221
|
+
var a = i.arg;
|
|
222
|
+
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);
|
|
213
223
|
}
|
|
214
|
-
function pushTryEntry(
|
|
215
|
-
var
|
|
216
|
-
tryLoc:
|
|
224
|
+
function pushTryEntry(t) {
|
|
225
|
+
var e = {
|
|
226
|
+
tryLoc: t[0]
|
|
217
227
|
};
|
|
218
|
-
1 in
|
|
228
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
219
229
|
}
|
|
220
|
-
function resetTryEntry(
|
|
221
|
-
var
|
|
222
|
-
|
|
230
|
+
function resetTryEntry(t) {
|
|
231
|
+
var e = t.completion || {};
|
|
232
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
223
233
|
}
|
|
224
|
-
function Context(
|
|
234
|
+
function Context(t) {
|
|
225
235
|
this.tryEntries = [{
|
|
226
236
|
tryLoc: "root"
|
|
227
|
-
}],
|
|
237
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
228
238
|
}
|
|
229
|
-
function values(
|
|
230
|
-
if (
|
|
231
|
-
var
|
|
232
|
-
if (
|
|
233
|
-
if ("function" == typeof
|
|
234
|
-
if (!isNaN(
|
|
235
|
-
var
|
|
236
|
-
|
|
237
|
-
for (; ++
|
|
238
|
-
return next.value =
|
|
239
|
+
function values(e) {
|
|
240
|
+
if (e || "" === e) {
|
|
241
|
+
var r = e[a];
|
|
242
|
+
if (r) return r.call(e);
|
|
243
|
+
if ("function" == typeof e.next) return e;
|
|
244
|
+
if (!isNaN(e.length)) {
|
|
245
|
+
var o = -1,
|
|
246
|
+
i = function next() {
|
|
247
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
248
|
+
return next.value = t, next.done = !0, next;
|
|
239
249
|
};
|
|
240
|
-
return
|
|
250
|
+
return i.next = i;
|
|
241
251
|
}
|
|
242
252
|
}
|
|
243
|
-
|
|
244
|
-
next: doneResult
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
function doneResult() {
|
|
248
|
-
return {
|
|
249
|
-
value: undefined,
|
|
250
|
-
done: !0
|
|
251
|
-
};
|
|
253
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
252
254
|
}
|
|
253
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype,
|
|
255
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
254
256
|
value: GeneratorFunctionPrototype,
|
|
255
257
|
configurable: !0
|
|
256
|
-
}),
|
|
258
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
257
259
|
value: GeneratorFunction,
|
|
258
260
|
configurable: !0
|
|
259
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype,
|
|
260
|
-
var
|
|
261
|
-
return !!
|
|
262
|
-
},
|
|
263
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(
|
|
264
|
-
},
|
|
261
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
262
|
+
var e = "function" == typeof t && t.constructor;
|
|
263
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
264
|
+
}, e.mark = function (t) {
|
|
265
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
266
|
+
}, e.awrap = function (t) {
|
|
265
267
|
return {
|
|
266
|
-
__await:
|
|
268
|
+
__await: t
|
|
267
269
|
};
|
|
268
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype,
|
|
270
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
269
271
|
return this;
|
|
270
|
-
}),
|
|
271
|
-
void 0 ===
|
|
272
|
-
var
|
|
273
|
-
return
|
|
274
|
-
return
|
|
272
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
273
|
+
void 0 === i && (i = Promise);
|
|
274
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
275
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
276
|
+
return t.done ? t.value : a.next();
|
|
275
277
|
});
|
|
276
|
-
}, defineIteratorMethods(
|
|
278
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
277
279
|
return this;
|
|
278
|
-
}), define(
|
|
280
|
+
}), define(g, "toString", function () {
|
|
279
281
|
return "[object Generator]";
|
|
280
|
-
}),
|
|
281
|
-
var
|
|
282
|
-
|
|
283
|
-
for (var
|
|
284
|
-
return
|
|
285
|
-
for (;
|
|
286
|
-
var
|
|
287
|
-
if (
|
|
282
|
+
}), e.keys = function (t) {
|
|
283
|
+
var e = Object(t),
|
|
284
|
+
r = [];
|
|
285
|
+
for (var n in e) r.push(n);
|
|
286
|
+
return r.reverse(), function next() {
|
|
287
|
+
for (; r.length;) {
|
|
288
|
+
var t = r.pop();
|
|
289
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
288
290
|
}
|
|
289
291
|
return next.done = !0, next;
|
|
290
292
|
};
|
|
291
|
-
},
|
|
293
|
+
}, e.values = values, Context.prototype = {
|
|
292
294
|
constructor: Context,
|
|
293
|
-
reset: function (
|
|
294
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent =
|
|
295
|
+
reset: function (e) {
|
|
296
|
+
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);
|
|
295
297
|
},
|
|
296
298
|
stop: function () {
|
|
297
299
|
this.done = !0;
|
|
298
|
-
var
|
|
299
|
-
if ("throw" ===
|
|
300
|
+
var t = this.tryEntries[0].completion;
|
|
301
|
+
if ("throw" === t.type) throw t.arg;
|
|
300
302
|
return this.rval;
|
|
301
303
|
},
|
|
302
|
-
dispatchException: function (
|
|
303
|
-
if (this.done) throw
|
|
304
|
-
var
|
|
305
|
-
function handle(
|
|
306
|
-
return
|
|
304
|
+
dispatchException: function (e) {
|
|
305
|
+
if (this.done) throw e;
|
|
306
|
+
var r = this;
|
|
307
|
+
function handle(n, o) {
|
|
308
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
307
309
|
}
|
|
308
|
-
for (var
|
|
309
|
-
var
|
|
310
|
-
|
|
311
|
-
if ("root" ===
|
|
312
|
-
if (
|
|
313
|
-
var
|
|
314
|
-
|
|
315
|
-
if (
|
|
316
|
-
if (this.prev <
|
|
317
|
-
if (this.prev <
|
|
318
|
-
} else if (
|
|
319
|
-
if (this.prev <
|
|
310
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
311
|
+
var i = this.tryEntries[o],
|
|
312
|
+
a = i.completion;
|
|
313
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
314
|
+
if (i.tryLoc <= this.prev) {
|
|
315
|
+
var c = n.call(i, "catchLoc"),
|
|
316
|
+
u = n.call(i, "finallyLoc");
|
|
317
|
+
if (c && u) {
|
|
318
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
319
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
320
|
+
} else if (c) {
|
|
321
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
320
322
|
} else {
|
|
321
|
-
if (!
|
|
322
|
-
if (this.prev <
|
|
323
|
+
if (!u) throw new Error("try statement without catch or finally");
|
|
324
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
323
325
|
}
|
|
324
326
|
}
|
|
325
327
|
}
|
|
326
328
|
},
|
|
327
|
-
abrupt: function (
|
|
328
|
-
for (var
|
|
329
|
-
var
|
|
330
|
-
if (
|
|
331
|
-
var
|
|
329
|
+
abrupt: function (t, e) {
|
|
330
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
331
|
+
var o = this.tryEntries[r];
|
|
332
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
333
|
+
var i = o;
|
|
332
334
|
break;
|
|
333
335
|
}
|
|
334
336
|
}
|
|
335
|
-
|
|
336
|
-
var
|
|
337
|
-
return
|
|
337
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
338
|
+
var a = i ? i.completion : {};
|
|
339
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
338
340
|
},
|
|
339
|
-
complete: function (
|
|
340
|
-
if ("throw" ===
|
|
341
|
-
return "break" ===
|
|
341
|
+
complete: function (t, e) {
|
|
342
|
+
if ("throw" === t.type) throw t.arg;
|
|
343
|
+
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;
|
|
342
344
|
},
|
|
343
|
-
finish: function (
|
|
344
|
-
for (var
|
|
345
|
-
var
|
|
346
|
-
if (
|
|
345
|
+
finish: function (t) {
|
|
346
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
347
|
+
var r = this.tryEntries[e];
|
|
348
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
347
349
|
}
|
|
348
350
|
},
|
|
349
|
-
catch: function (
|
|
350
|
-
for (var
|
|
351
|
-
var
|
|
352
|
-
if (
|
|
353
|
-
var
|
|
354
|
-
if ("throw" ===
|
|
355
|
-
var
|
|
356
|
-
resetTryEntry(
|
|
351
|
+
catch: function (t) {
|
|
352
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
353
|
+
var r = this.tryEntries[e];
|
|
354
|
+
if (r.tryLoc === t) {
|
|
355
|
+
var n = r.completion;
|
|
356
|
+
if ("throw" === n.type) {
|
|
357
|
+
var o = n.arg;
|
|
358
|
+
resetTryEntry(r);
|
|
357
359
|
}
|
|
358
|
-
return
|
|
360
|
+
return o;
|
|
359
361
|
}
|
|
360
362
|
}
|
|
361
363
|
throw new Error("illegal catch attempt");
|
|
362
364
|
},
|
|
363
|
-
delegateYield: function (
|
|
365
|
+
delegateYield: function (e, r, n) {
|
|
364
366
|
return this.delegate = {
|
|
365
|
-
iterator: values(
|
|
366
|
-
resultName:
|
|
367
|
-
nextLoc:
|
|
368
|
-
}, "next" === this.method && (this.arg =
|
|
369
|
-
}
|
|
370
|
-
},
|
|
367
|
+
iterator: values(e),
|
|
368
|
+
resultName: r,
|
|
369
|
+
nextLoc: n
|
|
370
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
371
|
+
}
|
|
372
|
+
}, e;
|
|
373
|
+
}
|
|
374
|
+
function _toPrimitive(t, r) {
|
|
375
|
+
if ("object" != typeof t || !t) return t;
|
|
376
|
+
var e = t[Symbol.toPrimitive];
|
|
377
|
+
if (void 0 !== e) {
|
|
378
|
+
var i = e.call(t, r || "default");
|
|
379
|
+
if ("object" != typeof i) return i;
|
|
380
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
381
|
+
}
|
|
382
|
+
return ("string" === r ? String : Number)(t);
|
|
371
383
|
}
|
|
372
|
-
function
|
|
384
|
+
function _toPropertyKey(t) {
|
|
385
|
+
var i = _toPrimitive(t, "string");
|
|
386
|
+
return "symbol" == typeof i ? i : String(i);
|
|
387
|
+
}
|
|
388
|
+
function _typeof(o) {
|
|
373
389
|
"@babel/helpers - typeof";
|
|
374
390
|
|
|
375
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
376
|
-
return typeof
|
|
377
|
-
} : function (
|
|
378
|
-
return
|
|
379
|
-
}, _typeof(
|
|
391
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
392
|
+
return typeof o;
|
|
393
|
+
} : function (o) {
|
|
394
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
395
|
+
}, _typeof(o);
|
|
380
396
|
}
|
|
381
397
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
382
398
|
try {
|
|
@@ -483,20 +499,6 @@ function _nonIterableSpread() {
|
|
|
483
499
|
function _nonIterableRest() {
|
|
484
500
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
485
501
|
}
|
|
486
|
-
function _toPrimitive(input, hint) {
|
|
487
|
-
if (typeof input !== "object" || input === null) return input;
|
|
488
|
-
var prim = input[Symbol.toPrimitive];
|
|
489
|
-
if (prim !== undefined) {
|
|
490
|
-
var res = prim.call(input, hint || "default");
|
|
491
|
-
if (typeof res !== "object") return res;
|
|
492
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
493
|
-
}
|
|
494
|
-
return (hint === "string" ? String : Number)(input);
|
|
495
|
-
}
|
|
496
|
-
function _toPropertyKey(arg) {
|
|
497
|
-
var key = _toPrimitive(arg, "string");
|
|
498
|
-
return typeof key === "symbol" ? key : String(key);
|
|
499
|
-
}
|
|
500
502
|
|
|
501
503
|
function ApaasCascader(props) {
|
|
502
504
|
return /*#__PURE__*/React__default['default'].createElement(antd.Cascader, _objectSpread2({
|
|
@@ -7648,19 +7650,21 @@ var BuyerNick = function BuyerNick(props) {
|
|
|
7648
7650
|
var changeValue = function changeValue(e, type) {
|
|
7649
7651
|
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, e.target.value)));
|
|
7650
7652
|
};
|
|
7651
|
-
|
|
7652
|
-
|
|
7653
|
-
|
|
7654
|
-
|
|
7655
|
-
|
|
7656
|
-
|
|
7657
|
-
|
|
7658
|
-
|
|
7659
|
-
|
|
7660
|
-
|
|
7661
|
-
|
|
7662
|
-
|
|
7663
|
-
}
|
|
7653
|
+
// useEffect(() => {
|
|
7654
|
+
// //淘宝平台和抖音平台需要展示买家id
|
|
7655
|
+
// const platformList = ['TAOBAO', 'FXG'];
|
|
7656
|
+
// const showBuyerId = (shopList || []).some(
|
|
7657
|
+
// (item) =>
|
|
7658
|
+
// item.shopId == shopId && platformList.includes(item.shopSourceStr),
|
|
7659
|
+
// );
|
|
7660
|
+
// //如果不是淘宝店铺 旺旺id为空
|
|
7661
|
+
// if (!showBuyerId) {
|
|
7662
|
+
// onChange?.({
|
|
7663
|
+
// ...value,
|
|
7664
|
+
// buyerOpenUid: '',
|
|
7665
|
+
// });
|
|
7666
|
+
// }
|
|
7667
|
+
// }, [shopId, shopList]);
|
|
7664
7668
|
return /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
7665
7669
|
disabled: disabled,
|
|
7666
7670
|
placeholder: "\u8BF7\u8F93\u5165\u4E70\u5BB6\u6635\u79F0",
|
|
@@ -10453,7 +10457,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
10453
10457
|
var wdtSendOptions = kmkfUtils.WdtSendData.getInstance().wdtSendData || [];
|
|
10454
10458
|
React.useEffect(function () {
|
|
10455
10459
|
//没有值塞个默认值
|
|
10456
|
-
if (!(value === null || value === void 0 ? void 0 : value.length)) {
|
|
10460
|
+
if (!(value === null || value === void 0 ? void 0 : value.length) && type !== 1) {
|
|
10457
10461
|
onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap[type]);
|
|
10458
10462
|
}
|
|
10459
10463
|
}, [value, type]);
|
|
@@ -10516,7 +10520,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
10516
10520
|
return setChangeIndex(index);
|
|
10517
10521
|
}
|
|
10518
10522
|
}, "\u5305\u88F9".concat(index + 1)));
|
|
10519
|
-
}))) : null, value.length ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, type === 1 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React__default['default'].createElement(ApaasLogistics, {
|
|
10523
|
+
}))) : null, value.length || type === 1 ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, type === 1 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React__default['default'].createElement(ApaasLogistics, {
|
|
10520
10524
|
disabled: disabled,
|
|
10521
10525
|
placeholder: "\u7269\u6D41\u516C\u53F8",
|
|
10522
10526
|
onChange: function onChange(val) {
|
|
@@ -11673,9 +11677,34 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11673
11677
|
React.useEffect(function () {
|
|
11674
11678
|
setSelectedRowKeys([]);
|
|
11675
11679
|
}, [tableSelect, selectType]);
|
|
11676
|
-
var updateHandle = function updateHandle(val, index,
|
|
11680
|
+
var updateHandle = function updateHandle(val, index, columnType) {
|
|
11677
11681
|
if (value === null || value === void 0 ? void 0 : value.length) {
|
|
11678
|
-
value[index][
|
|
11682
|
+
value[index][columnType] = val;
|
|
11683
|
+
if (type === 'WDT_RETURN_GOODS') {
|
|
11684
|
+
if (['sharePrice', 'num'].includes(columnType)) {
|
|
11685
|
+
var totalMoney = null;
|
|
11686
|
+
if (columnType === 'num') {
|
|
11687
|
+
totalMoney = new BigNumber__default['default'](value[index][columnType]).multipliedBy(new BigNumber__default['default'](value[index].sharePrice));
|
|
11688
|
+
} else {
|
|
11689
|
+
totalMoney = new BigNumber__default['default'](value[index][columnType]).multipliedBy(new BigNumber__default['default'](value[index].num));
|
|
11690
|
+
}
|
|
11691
|
+
if (totalMoney !== null) {
|
|
11692
|
+
value[index]['returnPrice'] = totalMoney.toString();
|
|
11693
|
+
}
|
|
11694
|
+
}
|
|
11695
|
+
} else if (type === 'WDT_EXCHANGE_GOODS') {
|
|
11696
|
+
if (['price', 'num'].includes(columnType)) {
|
|
11697
|
+
var _totalMoney = null;
|
|
11698
|
+
if (columnType === 'num') {
|
|
11699
|
+
_totalMoney = new BigNumber__default['default'](value[index][columnType]).multipliedBy(new BigNumber__default['default'](value[index].price));
|
|
11700
|
+
} else {
|
|
11701
|
+
_totalMoney = new BigNumber__default['default'](value[index][columnType]).multipliedBy(new BigNumber__default['default'](value[index].num));
|
|
11702
|
+
}
|
|
11703
|
+
if (_totalMoney !== null) {
|
|
11704
|
+
value[index]['exchangePrice'] = _totalMoney.toString();
|
|
11705
|
+
}
|
|
11706
|
+
}
|
|
11707
|
+
}
|
|
11679
11708
|
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(value));
|
|
11680
11709
|
}
|
|
11681
11710
|
};
|
|
@@ -11740,7 +11769,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11740
11769
|
width: 70
|
|
11741
11770
|
},
|
|
11742
11771
|
value: val,
|
|
11743
|
-
min:
|
|
11772
|
+
min: 1,
|
|
11744
11773
|
precision: 0,
|
|
11745
11774
|
onChange: function onChange(num) {
|
|
11746
11775
|
return updateHandle(num, index, 'num');
|
|
@@ -11781,6 +11810,260 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11781
11810
|
}
|
|
11782
11811
|
}];
|
|
11783
11812
|
break;
|
|
11813
|
+
case 'WDT_RETURN_GOODS':
|
|
11814
|
+
{
|
|
11815
|
+
columns = [{
|
|
11816
|
+
dataIndex: 'goodId',
|
|
11817
|
+
title: "SPUID",
|
|
11818
|
+
align: 'center',
|
|
11819
|
+
ellipsis: true,
|
|
11820
|
+
width: 70
|
|
11821
|
+
}, {
|
|
11822
|
+
dataIndex: 'goodNo',
|
|
11823
|
+
title: "\u5546\u54C1SPU\u7F16\u7801",
|
|
11824
|
+
align: 'center',
|
|
11825
|
+
ellipsis: true,
|
|
11826
|
+
width: 180
|
|
11827
|
+
}, {
|
|
11828
|
+
dataIndex: 'goodName',
|
|
11829
|
+
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
11830
|
+
align: 'center',
|
|
11831
|
+
ellipsis: true,
|
|
11832
|
+
width: 250
|
|
11833
|
+
}, {
|
|
11834
|
+
dataIndex: 'specId',
|
|
11835
|
+
title: "".concat(text, "SKUID"),
|
|
11836
|
+
align: 'center',
|
|
11837
|
+
ellipsis: true,
|
|
11838
|
+
width: 100
|
|
11839
|
+
}, {
|
|
11840
|
+
dataIndex: 'specNo',
|
|
11841
|
+
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
11842
|
+
align: 'center',
|
|
11843
|
+
ellipsis: true,
|
|
11844
|
+
width: 180
|
|
11845
|
+
}, {
|
|
11846
|
+
dataIndex: 'specName',
|
|
11847
|
+
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
11848
|
+
align: 'center',
|
|
11849
|
+
ellipsis: true,
|
|
11850
|
+
width: 250
|
|
11851
|
+
}, {
|
|
11852
|
+
dataIndex: 'num',
|
|
11853
|
+
title: "".concat(text, "\u9000\u8D27\u6570\u91CF"),
|
|
11854
|
+
align: 'center',
|
|
11855
|
+
ellipsis: true,
|
|
11856
|
+
width: 100,
|
|
11857
|
+
render: function render(val, record, index) {
|
|
11858
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
11859
|
+
style: {
|
|
11860
|
+
width: 70
|
|
11861
|
+
},
|
|
11862
|
+
value: val,
|
|
11863
|
+
min: 1,
|
|
11864
|
+
precision: 0,
|
|
11865
|
+
onChange: function onChange(num) {
|
|
11866
|
+
return updateHandle(num, index, 'num');
|
|
11867
|
+
}
|
|
11868
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
11869
|
+
}
|
|
11870
|
+
}, {
|
|
11871
|
+
dataIndex: 'sharePrice',
|
|
11872
|
+
title: "\u5206\u644A\u4EF7",
|
|
11873
|
+
align: 'center',
|
|
11874
|
+
ellipsis: true,
|
|
11875
|
+
width: 80,
|
|
11876
|
+
render: function render(val, record, index) {
|
|
11877
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
11878
|
+
style: {
|
|
11879
|
+
width: 70
|
|
11880
|
+
},
|
|
11881
|
+
value: val,
|
|
11882
|
+
min: 0,
|
|
11883
|
+
onChange: function onChange(value) {
|
|
11884
|
+
return updateHandle(value, index, 'sharePrice');
|
|
11885
|
+
}
|
|
11886
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
11887
|
+
}
|
|
11888
|
+
}, {
|
|
11889
|
+
dataIndex: 'returnPrice',
|
|
11890
|
+
title: "".concat(text, "\u9000\u8D27\u91D1\u989D"),
|
|
11891
|
+
align: 'center',
|
|
11892
|
+
ellipsis: true,
|
|
11893
|
+
width: 100
|
|
11894
|
+
}, {
|
|
11895
|
+
dataIndex: 'giftType',
|
|
11896
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
11897
|
+
align: 'center',
|
|
11898
|
+
ellipsis: true,
|
|
11899
|
+
width: 100,
|
|
11900
|
+
render: function render(val) {
|
|
11901
|
+
var giftTypeMap = {
|
|
11902
|
+
0: '非赠品',
|
|
11903
|
+
1: '自动赠送',
|
|
11904
|
+
2: '手工赠送',
|
|
11905
|
+
3: '回购自动送赠品',
|
|
11906
|
+
4: '前N有礼送赠品',
|
|
11907
|
+
6: '天猫优仓赠品',
|
|
11908
|
+
7: '淘宝CRM会员送赠'
|
|
11909
|
+
};
|
|
11910
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
|
|
11911
|
+
}
|
|
11912
|
+
}, {
|
|
11913
|
+
dataIndex: 'type',
|
|
11914
|
+
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
11915
|
+
align: 'center',
|
|
11916
|
+
ellipsis: true,
|
|
11917
|
+
width: 100,
|
|
11918
|
+
render: function render(val, record, index) {
|
|
11919
|
+
var options = [{
|
|
11920
|
+
label: '单品',
|
|
11921
|
+
value: '1'
|
|
11922
|
+
}, {
|
|
11923
|
+
label: '组合装',
|
|
11924
|
+
value: '2'
|
|
11925
|
+
}];
|
|
11926
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
11927
|
+
style: {
|
|
11928
|
+
width: 70
|
|
11929
|
+
},
|
|
11930
|
+
options: options,
|
|
11931
|
+
value: val,
|
|
11932
|
+
onChange: function onChange(value) {
|
|
11933
|
+
return updateHandle(value, index, 'type');
|
|
11934
|
+
}
|
|
11935
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
11936
|
+
}
|
|
11937
|
+
}];
|
|
11938
|
+
}
|
|
11939
|
+
break;
|
|
11940
|
+
case 'WDT_EXCHANGE_GOODS':
|
|
11941
|
+
{
|
|
11942
|
+
columns = [{
|
|
11943
|
+
dataIndex: 'goodId',
|
|
11944
|
+
title: "SPUID",
|
|
11945
|
+
align: 'center',
|
|
11946
|
+
ellipsis: true,
|
|
11947
|
+
width: 70
|
|
11948
|
+
}, {
|
|
11949
|
+
dataIndex: 'goodNo',
|
|
11950
|
+
title: "\u5546\u54C1SPU\u7F16\u7801",
|
|
11951
|
+
align: 'center',
|
|
11952
|
+
ellipsis: true,
|
|
11953
|
+
width: 180
|
|
11954
|
+
}, {
|
|
11955
|
+
dataIndex: 'goodName',
|
|
11956
|
+
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
11957
|
+
align: 'center',
|
|
11958
|
+
ellipsis: true,
|
|
11959
|
+
width: 250
|
|
11960
|
+
}, {
|
|
11961
|
+
dataIndex: 'specId',
|
|
11962
|
+
title: "".concat(text, "SKUID"),
|
|
11963
|
+
align: 'center',
|
|
11964
|
+
ellipsis: true,
|
|
11965
|
+
width: 100
|
|
11966
|
+
}, {
|
|
11967
|
+
dataIndex: 'specNo',
|
|
11968
|
+
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
11969
|
+
align: 'center',
|
|
11970
|
+
ellipsis: true,
|
|
11971
|
+
width: 180
|
|
11972
|
+
}, {
|
|
11973
|
+
dataIndex: 'specName',
|
|
11974
|
+
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
11975
|
+
align: 'center',
|
|
11976
|
+
ellipsis: true,
|
|
11977
|
+
width: 250
|
|
11978
|
+
}, {
|
|
11979
|
+
dataIndex: 'num',
|
|
11980
|
+
title: "".concat(text, "\u6362\u51FA\u6570\u91CF"),
|
|
11981
|
+
align: 'center',
|
|
11982
|
+
ellipsis: true,
|
|
11983
|
+
width: 100,
|
|
11984
|
+
render: function render(val, record, index) {
|
|
11985
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
11986
|
+
style: {
|
|
11987
|
+
width: 70
|
|
11988
|
+
},
|
|
11989
|
+
value: val,
|
|
11990
|
+
min: 1,
|
|
11991
|
+
precision: 0,
|
|
11992
|
+
onChange: function onChange(num) {
|
|
11993
|
+
return updateHandle(num, index, 'num');
|
|
11994
|
+
}
|
|
11995
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
11996
|
+
}
|
|
11997
|
+
}, {
|
|
11998
|
+
dataIndex: 'price',
|
|
11999
|
+
title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
|
|
12000
|
+
align: 'center',
|
|
12001
|
+
ellipsis: true,
|
|
12002
|
+
width: 100,
|
|
12003
|
+
render: function render(val, record, index) {
|
|
12004
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
12005
|
+
style: {
|
|
12006
|
+
width: 70
|
|
12007
|
+
},
|
|
12008
|
+
value: val,
|
|
12009
|
+
min: 0,
|
|
12010
|
+
onChange: function onChange(value) {
|
|
12011
|
+
return updateHandle(value, index, 'price');
|
|
12012
|
+
}
|
|
12013
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
12014
|
+
}
|
|
12015
|
+
}, {
|
|
12016
|
+
dataIndex: 'exchangePrice',
|
|
12017
|
+
title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
|
|
12018
|
+
align: 'center',
|
|
12019
|
+
ellipsis: true,
|
|
12020
|
+
width: 100
|
|
12021
|
+
}, {
|
|
12022
|
+
dataIndex: 'giftType',
|
|
12023
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
12024
|
+
align: 'center',
|
|
12025
|
+
ellipsis: true,
|
|
12026
|
+
width: 100,
|
|
12027
|
+
render: function render(val) {
|
|
12028
|
+
var giftTypeMap = {
|
|
12029
|
+
0: '非赠品',
|
|
12030
|
+
1: '自动赠送',
|
|
12031
|
+
2: '手工赠送',
|
|
12032
|
+
3: '回购自动送赠品',
|
|
12033
|
+
4: '前N有礼送赠品',
|
|
12034
|
+
6: '天猫优仓赠品',
|
|
12035
|
+
7: '淘宝CRM会员送赠'
|
|
12036
|
+
};
|
|
12037
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
|
|
12038
|
+
}
|
|
12039
|
+
}, {
|
|
12040
|
+
dataIndex: 'type',
|
|
12041
|
+
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
12042
|
+
align: 'center',
|
|
12043
|
+
ellipsis: true,
|
|
12044
|
+
width: 100,
|
|
12045
|
+
render: function render(val, record, index) {
|
|
12046
|
+
var options = [{
|
|
12047
|
+
label: '单品',
|
|
12048
|
+
value: '1'
|
|
12049
|
+
}, {
|
|
12050
|
+
label: '组合装',
|
|
12051
|
+
value: '2'
|
|
12052
|
+
}];
|
|
12053
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
12054
|
+
style: {
|
|
12055
|
+
width: 70
|
|
12056
|
+
},
|
|
12057
|
+
options: options,
|
|
12058
|
+
value: val,
|
|
12059
|
+
onChange: function onChange(value) {
|
|
12060
|
+
return updateHandle(value, index, 'type');
|
|
12061
|
+
}
|
|
12062
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
12063
|
+
}
|
|
12064
|
+
}];
|
|
12065
|
+
}
|
|
12066
|
+
break;
|
|
11784
12067
|
default:
|
|
11785
12068
|
columns = [{
|
|
11786
12069
|
dataIndex: 'mark',
|
|
@@ -11858,7 +12141,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11858
12141
|
width: 70
|
|
11859
12142
|
},
|
|
11860
12143
|
value: val,
|
|
11861
|
-
min:
|
|
12144
|
+
min: 1,
|
|
11862
12145
|
precision: 0,
|
|
11863
12146
|
onChange: function onChange(num) {
|
|
11864
12147
|
return updateHandle(num, index, 'number');
|
|
@@ -11922,7 +12205,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11922
12205
|
}, [showHeader, value, disabled]);
|
|
11923
12206
|
var onSubmit = function onSubmit(list) {
|
|
11924
12207
|
var newList = [];
|
|
11925
|
-
if (['WDT_REISSUE_GOODS', 'WDT_GOODS'].includes(type)) {
|
|
12208
|
+
if (['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type)) {
|
|
11926
12209
|
newList = list.map(function (item) {
|
|
11927
12210
|
item.uuid = kmkfUtils.uuid();
|
|
11928
12211
|
item.canDelete = true;
|
|
@@ -11930,6 +12213,10 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11930
12213
|
item.orderPrice = 0;
|
|
11931
12214
|
item.sharePrice = 0;
|
|
11932
12215
|
item.canUpdateNumber = canUpdateNumber;
|
|
12216
|
+
if (type === 'WDT_EXCHANGE_GOODS') {
|
|
12217
|
+
item.price = item.retailPrice;
|
|
12218
|
+
item.type = '1';
|
|
12219
|
+
}
|
|
11933
12220
|
return item;
|
|
11934
12221
|
});
|
|
11935
12222
|
} else {
|
|
@@ -12000,7 +12287,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12000
12287
|
locale: {
|
|
12001
12288
|
emptyText: '暂无数据'
|
|
12002
12289
|
}
|
|
12003
|
-
})), ['WDT_REISSUE_GOODS', 'WDT_GOODS'].includes(type) ? /*#__PURE__*/React__default['default'].createElement(WdtGoodsModal, {
|
|
12290
|
+
})), ['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type) ? /*#__PURE__*/React__default['default'].createElement(WdtGoodsModal, {
|
|
12004
12291
|
ref: refModal,
|
|
12005
12292
|
onSubmit: onSubmit,
|
|
12006
12293
|
width: width,
|
|
@@ -12646,9 +12933,11 @@ var index$1 = (function (props) {
|
|
|
12646
12933
|
_onChange = props.onChange,
|
|
12647
12934
|
disabled = props.disabled,
|
|
12648
12935
|
type = props.type;
|
|
12936
|
+
var onceRef = React.useRef(false);
|
|
12649
12937
|
React.useEffect(function () {
|
|
12650
12938
|
var _value$orders, _value$showOrderInfo;
|
|
12651
|
-
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)) {
|
|
12939
|
+
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) {
|
|
12940
|
+
onceRef.current = true;
|
|
12652
12941
|
if (type === 'BS_SYSTEM_ORDER') {
|
|
12653
12942
|
getOrderList(value.orderNo);
|
|
12654
12943
|
} else if (type === 'WLN_SYSTEM_ORDER') {
|
|
@@ -12657,7 +12946,7 @@ var index$1 = (function (props) {
|
|
|
12657
12946
|
getWdtOrderList(value.orderNo);
|
|
12658
12947
|
}
|
|
12659
12948
|
}
|
|
12660
|
-
}, [value
|
|
12949
|
+
}, [value, type]);
|
|
12661
12950
|
var columns = React.useMemo(function () {
|
|
12662
12951
|
var _columnsNameMap$type, _columnsNameMap$type2;
|
|
12663
12952
|
return [{
|
|
@@ -12700,7 +12989,8 @@ var index$1 = (function (props) {
|
|
|
12700
12989
|
})
|
|
12701
12990
|
}));
|
|
12702
12991
|
}
|
|
12703
|
-
|
|
12992
|
+
onceRef.current = false;
|
|
12993
|
+
case 7:
|
|
12704
12994
|
case "end":
|
|
12705
12995
|
return _context.stop();
|
|
12706
12996
|
}
|
|
@@ -12745,7 +13035,8 @@ var index$1 = (function (props) {
|
|
|
12745
13035
|
})
|
|
12746
13036
|
}));
|
|
12747
13037
|
}
|
|
12748
|
-
|
|
13038
|
+
onceRef.current = false;
|
|
13039
|
+
case 7:
|
|
12749
13040
|
case "end":
|
|
12750
13041
|
return _context2.stop();
|
|
12751
13042
|
}
|
|
@@ -12757,7 +13048,7 @@ var index$1 = (function (props) {
|
|
|
12757
13048
|
}();
|
|
12758
13049
|
var getWdtOrderList = /*#__PURE__*/function () {
|
|
12759
13050
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(orderNo) {
|
|
12760
|
-
var _yield$request3, success, data;
|
|
13051
|
+
var _yield$request3, success, data, trades;
|
|
12761
13052
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
12762
13053
|
while (1) switch (_context3.prev = _context3.next) {
|
|
12763
13054
|
case 0:
|
|
@@ -12773,15 +13064,25 @@ var index$1 = (function (props) {
|
|
|
12773
13064
|
success = _yield$request3.success;
|
|
12774
13065
|
data = _yield$request3.data;
|
|
12775
13066
|
if (success) {
|
|
13067
|
+
trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
|
|
13068
|
+
return (item.srcTid || '').split(',').includes(orderNo);
|
|
13069
|
+
}).map(function (item) {
|
|
13070
|
+
if (Array.isArray(item.goodDetails)) {
|
|
13071
|
+
item.goodDetails = item.goodDetails.filter(function (good) {
|
|
13072
|
+
return good.srcTid === orderNo;
|
|
13073
|
+
});
|
|
13074
|
+
}
|
|
13075
|
+
return item;
|
|
13076
|
+
});
|
|
12776
13077
|
_onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
12777
|
-
orders:
|
|
13078
|
+
orders: trades.map(function (item) {
|
|
12778
13079
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
12779
13080
|
billNo: item.tradeNo,
|
|
12780
13081
|
billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
12781
13082
|
billTag: item.tagName
|
|
12782
13083
|
});
|
|
12783
13084
|
}),
|
|
12784
|
-
showOrderInfo:
|
|
13085
|
+
showOrderInfo: trades.map(function (item) {
|
|
12785
13086
|
return {
|
|
12786
13087
|
billNo: item.tradeNo,
|
|
12787
13088
|
billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
@@ -12790,7 +13091,8 @@ var index$1 = (function (props) {
|
|
|
12790
13091
|
})
|
|
12791
13092
|
}));
|
|
12792
13093
|
}
|
|
12793
|
-
|
|
13094
|
+
onceRef.current = false;
|
|
13095
|
+
case 7:
|
|
12794
13096
|
case "end":
|
|
12795
13097
|
return _context3.stop();
|
|
12796
13098
|
}
|
|
@@ -12870,8 +13172,10 @@ var componentMap$1 = {
|
|
|
12870
13172
|
reissueType: 'wdtReissueType',
|
|
12871
13173
|
returnType: 'wdtReturnType',
|
|
12872
13174
|
returnSelectListReturn: 'wdtReturnSelectListReturn',
|
|
13175
|
+
returnSelectList: 'wdtReturnSelectList',
|
|
12873
13176
|
deleteGood: 'wdtDeleteGood',
|
|
12874
|
-
returnDeleteGood: 'wdtReturnDeleteGood'
|
|
13177
|
+
returnDeleteGood: 'wdtReturnDeleteGood',
|
|
13178
|
+
exchangeDeleteGood: 'wdtExchangeDeleteGood'
|
|
12875
13179
|
}
|
|
12876
13180
|
}
|
|
12877
13181
|
};
|
|
@@ -12938,7 +13242,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
12938
13242
|
setTableSelect(['2', '4'].includes(data.val));
|
|
12939
13243
|
if (['1', '3'].includes(data.val)) {
|
|
12940
13244
|
var _valueRef$current5, _valueRef$current6;
|
|
12941
|
-
pubsub__default['default'].publish(componentMap$1[
|
|
13245
|
+
pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.returnSelectListReturn, {
|
|
12942
13246
|
list: lodash.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]) || []),
|
|
12943
13247
|
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current6 = valueRef.current) === null || _valueRef$current6 === void 0 ? void 0 : _valueRef$current6.shopCode,
|
|
12944
13248
|
goodValue: data === null || data === void 0 ? void 0 : data.goodValue
|
|
@@ -12956,15 +13260,15 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
12956
13260
|
};
|
|
12957
13261
|
}, [disabled]);
|
|
12958
13262
|
var _onSelect = function onSelect(list) {
|
|
12959
|
-
var _withInfo$current, _withInfo$current2, _valueRef$current7;
|
|
13263
|
+
var _typeMap, _withInfo$current, _withInfo$current2, _valueRef$current7;
|
|
12960
13264
|
if (disabled) return;
|
|
12961
13265
|
var newList = lodash.cloneDeep(list);
|
|
12962
|
-
var typeMap =
|
|
13266
|
+
var typeMap = (_typeMap = {
|
|
12963
13267
|
// type: componentMap[compType].eventNameMap.selectList,
|
|
12964
13268
|
// returnType: componentMap[compType].eventNameMap.returnSelectList,
|
|
12965
13269
|
// reissueType: componentMap[compType].eventNameMap.reissueSelectList,
|
|
12966
13270
|
type: componentMap$1[compType].eventNameMap.selectList
|
|
12967
|
-
}, "".concat(componentMap$1[compType].type, "ReissueType"), componentMap$1[compType].eventNameMap.reissueSelectList);
|
|
13271
|
+
}, _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);
|
|
12968
13272
|
var type = typeMap[(_withInfo$current = withInfo.current) === null || _withInfo$current === void 0 ? void 0 : _withInfo$current.type];
|
|
12969
13273
|
// console.log('onSelect', type, withInfo.current, newList);
|
|
12970
13274
|
pubsub__default['default'].publish(type, {
|
|
@@ -12982,6 +13286,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
12982
13286
|
pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.deleteGood, deleteId);
|
|
12983
13287
|
pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.reissueDeleteGood, deleteId);
|
|
12984
13288
|
pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.returnDeleteGood, deleteId);
|
|
13289
|
+
pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.exchangeDeleteGood, deleteId);
|
|
12985
13290
|
};
|
|
12986
13291
|
var changeHandle = function changeHandle(list) {
|
|
12987
13292
|
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, componentMap$1[compType].key, list)));
|
|
@@ -13006,6 +13311,263 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
13006
13311
|
}));
|
|
13007
13312
|
};
|
|
13008
13313
|
|
|
13314
|
+
var componentMap$2 = {
|
|
13315
|
+
'WDT_RETURN_GOODS': {
|
|
13316
|
+
type: 'wdt',
|
|
13317
|
+
valueKey: 'wdtReturnGoods',
|
|
13318
|
+
returnTypeKey: 'wdtReturnType',
|
|
13319
|
+
name: '旺店通',
|
|
13320
|
+
eventNameMap: {
|
|
13321
|
+
changeShopCode: 'wdtChangeShopCode',
|
|
13322
|
+
returnType: 'wdtReturnType',
|
|
13323
|
+
returnSelectListReturn: 'wdtReturnSelectListReturn',
|
|
13324
|
+
returnDeleteGood: 'wdtReturnDeleteGood',
|
|
13325
|
+
returnSelectList: 'wdtReturnSelectList',
|
|
13326
|
+
exchangeCopyGood: 'wdtExchangeCopyGood',
|
|
13327
|
+
exchangeBackCopyGood: 'wdtExchangeBackCopyGood'
|
|
13328
|
+
}
|
|
13329
|
+
}
|
|
13330
|
+
};
|
|
13331
|
+
var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
13332
|
+
var value = props.value,
|
|
13333
|
+
onChange = props.onChange,
|
|
13334
|
+
_props$reasonList = props.reasonList,
|
|
13335
|
+
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
13336
|
+
disabled = props.disabled,
|
|
13337
|
+
compType = props.type;
|
|
13338
|
+
var valueRef = React.useRef({});
|
|
13339
|
+
React.useEffect(function () {
|
|
13340
|
+
var subscription = pubsub__default['default'].subscribe(componentMap$2[compType].eventNameMap.exchangeCopyGood, function () {
|
|
13341
|
+
var _valueRef$current, _valueRef$current2;
|
|
13342
|
+
pubsub__default['default'].publish(componentMap$2[compType].eventNameMap.exchangeBackCopyGood, {
|
|
13343
|
+
list: lodash.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]) || []),
|
|
13344
|
+
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.shopCode
|
|
13345
|
+
});
|
|
13346
|
+
});
|
|
13347
|
+
return function () {
|
|
13348
|
+
pubsub__default['default'].unsubscribe(subscription);
|
|
13349
|
+
};
|
|
13350
|
+
}, []);
|
|
13351
|
+
React.useEffect(function () {
|
|
13352
|
+
var subscription = pubsub__default['default'].subscribe(componentMap$2[compType].eventNameMap.returnSelectList, function (_, data) {
|
|
13353
|
+
if (disabled) return;
|
|
13354
|
+
var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
|
|
13355
|
+
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
13356
|
+
});
|
|
13357
|
+
if (compType === 'WDT_RETURN_GOODS') {
|
|
13358
|
+
newValue[componentMap$2[compType].valueKey] = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
|
|
13359
|
+
if (typeof item.type === 'undefined') {
|
|
13360
|
+
item.type = '1';
|
|
13361
|
+
}
|
|
13362
|
+
if (typeof item.returnPrice === 'undefined') {
|
|
13363
|
+
item.returnPrice = new BigNumber__default['default'](item.num).multipliedBy(new BigNumber__default['default'](item.sharePrice)).toString();
|
|
13364
|
+
}
|
|
13365
|
+
if (item.srcOid) {
|
|
13366
|
+
item.oid = item.srcOid;
|
|
13367
|
+
}
|
|
13368
|
+
return item;
|
|
13369
|
+
});
|
|
13370
|
+
} else {
|
|
13371
|
+
newValue[componentMap$2[compType].valueKey] = (data === null || data === void 0 ? void 0 : data.list) || [];
|
|
13372
|
+
}
|
|
13373
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13374
|
+
});
|
|
13375
|
+
return function () {
|
|
13376
|
+
pubsub__default['default'].unsubscribe(subscription);
|
|
13377
|
+
};
|
|
13378
|
+
}, []);
|
|
13379
|
+
React.useEffect(function () {
|
|
13380
|
+
var subscription = pubsub__default['default'].subscribe(componentMap$2[compType].eventNameMap.returnSelectListReturn, function (_, data) {
|
|
13381
|
+
if (disabled) return;
|
|
13382
|
+
var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
|
|
13383
|
+
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
13384
|
+
});
|
|
13385
|
+
if (compType === 'WDT_RETURN_GOODS') {
|
|
13386
|
+
newValue[componentMap$2[compType].valueKey] = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
|
|
13387
|
+
if (typeof item.type === 'undefined') {
|
|
13388
|
+
item.type = '1';
|
|
13389
|
+
}
|
|
13390
|
+
if (typeof item.returnPrice === 'undefined') {
|
|
13391
|
+
item.returnPrice = new BigNumber__default['default'](item.num).multipliedBy(new BigNumber__default['default'](item.sharePrice)).toString();
|
|
13392
|
+
}
|
|
13393
|
+
if (item.srcOid) {
|
|
13394
|
+
item.oid = item.srcOid;
|
|
13395
|
+
}
|
|
13396
|
+
return item;
|
|
13397
|
+
});
|
|
13398
|
+
} else {
|
|
13399
|
+
newValue[componentMap$2[compType].valueKey] = (data === null || data === void 0 ? void 0 : data.list) || [];
|
|
13400
|
+
}
|
|
13401
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13402
|
+
});
|
|
13403
|
+
return function () {
|
|
13404
|
+
pubsub__default['default'].unsubscribe(subscription);
|
|
13405
|
+
};
|
|
13406
|
+
}, []);
|
|
13407
|
+
React.useEffect(function () {
|
|
13408
|
+
valueRef.current = value;
|
|
13409
|
+
pubsub__default['default'].subscribeOnce(componentMap$2[compType].eventNameMap.returnDeleteGood, function (_, data) {
|
|
13410
|
+
if (disabled) return;
|
|
13411
|
+
if (value) {
|
|
13412
|
+
var newValue = _objectSpread2({}, value);
|
|
13413
|
+
newValue[componentMap$2[compType].valueKey] = newValue[componentMap$2[compType].valueKey].filter(function (item) {
|
|
13414
|
+
return item.sku !== data;
|
|
13415
|
+
});
|
|
13416
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13417
|
+
}
|
|
13418
|
+
});
|
|
13419
|
+
pubsub__default['default'].subscribeOnce(componentMap$2[compType].eventNameMap.changeShopCode, function (type, data) {
|
|
13420
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
13421
|
+
shopCode: data.shopCode
|
|
13422
|
+
}));
|
|
13423
|
+
});
|
|
13424
|
+
}, [value, disabled]);
|
|
13425
|
+
var changeTypeHandle = function changeTypeHandle(val) {
|
|
13426
|
+
var newValue = _objectSpread2({}, value);
|
|
13427
|
+
newValue[componentMap$2[compType].returnTypeKey] = val;
|
|
13428
|
+
newValue[componentMap$2[compType].valueKey] = [];
|
|
13429
|
+
if (['2'].includes(val[0])) {
|
|
13430
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13431
|
+
valueRef.current = newValue;
|
|
13432
|
+
}
|
|
13433
|
+
pubsub__default['default'].publish(componentMap$2[compType].eventNameMap.returnType, {
|
|
13434
|
+
val: val[0],
|
|
13435
|
+
goodValue: newValue
|
|
13436
|
+
});
|
|
13437
|
+
};
|
|
13438
|
+
var changeGoodHandle = function changeGoodHandle(val) {
|
|
13439
|
+
var newValue = _objectSpread2({}, value);
|
|
13440
|
+
newValue[componentMap$2[compType].valueKey] = val;
|
|
13441
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13442
|
+
};
|
|
13443
|
+
//显示选择商品按钮 原单换不显示选择商品
|
|
13444
|
+
// const showChangeBtn = useMemo(() => {
|
|
13445
|
+
// return ['2'].includes(value?.[componentMap[compType].returnTypeKey]?.[0]);
|
|
13446
|
+
// }, [value?.[componentMap[compType].returnTypeKey]]);
|
|
13447
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
13448
|
+
style: {
|
|
13449
|
+
marginBottom: '8px'
|
|
13450
|
+
},
|
|
13451
|
+
disabled: disabled,
|
|
13452
|
+
allowClear: false,
|
|
13453
|
+
options: reasonList,
|
|
13454
|
+
value: value === null || value === void 0 ? void 0 : value[componentMap$2[compType].returnTypeKey],
|
|
13455
|
+
onChange: function onChange(val) {
|
|
13456
|
+
return changeTypeHandle(val);
|
|
13457
|
+
}
|
|
13458
|
+
}), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
13459
|
+
key: componentMap$2[compType].type
|
|
13460
|
+
}, props), {}, {
|
|
13461
|
+
disabled: disabled,
|
|
13462
|
+
canUpdateNumber: true,
|
|
13463
|
+
showChangeBtn: false,
|
|
13464
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
13465
|
+
value: value === null || value === void 0 ? void 0 : value[componentMap$2[compType].valueKey],
|
|
13466
|
+
onChange: function onChange(val) {
|
|
13467
|
+
return changeGoodHandle(val);
|
|
13468
|
+
}
|
|
13469
|
+
})));
|
|
13470
|
+
};
|
|
13471
|
+
|
|
13472
|
+
var componentMap$3 = {
|
|
13473
|
+
'WDT_EXCHANGE_GOODS': {
|
|
13474
|
+
type: 'wdt',
|
|
13475
|
+
valueKey: 'wdtExchangeGoods',
|
|
13476
|
+
returnTypeKey: 'wdtExchangeType',
|
|
13477
|
+
name: '旺店通',
|
|
13478
|
+
eventNameMap: {
|
|
13479
|
+
changeShopCode: 'wdtChangeShopCode',
|
|
13480
|
+
exchangeDeleteGood: 'wdtExchangeDeleteGood',
|
|
13481
|
+
exchangeCopyGood: 'wdtExchangeCopyGood',
|
|
13482
|
+
exchangeBackCopyGood: 'wdtExchangeBackCopyGood'
|
|
13483
|
+
}
|
|
13484
|
+
}
|
|
13485
|
+
};
|
|
13486
|
+
var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
13487
|
+
var value = props.value,
|
|
13488
|
+
onChange = props.onChange,
|
|
13489
|
+
disabled = props.disabled,
|
|
13490
|
+
compType = props.type;
|
|
13491
|
+
var valueRef = React.useRef({});
|
|
13492
|
+
React.useEffect(function () {
|
|
13493
|
+
var subscription = pubsub__default['default'].subscribe(componentMap$3[compType].eventNameMap.exchangeBackCopyGood, function (_, data) {
|
|
13494
|
+
if (disabled) return;
|
|
13495
|
+
var newValue = {
|
|
13496
|
+
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
13497
|
+
};
|
|
13498
|
+
if (compType === 'WDT_EXCHANGE_GOODS') {
|
|
13499
|
+
newValue[componentMap$3[compType].valueKey] = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
|
|
13500
|
+
if (typeof item.type === 'undefined') {
|
|
13501
|
+
item.type = '1';
|
|
13502
|
+
}
|
|
13503
|
+
item.price = item.sharePrice;
|
|
13504
|
+
if (typeof item.exchangePrice === 'undefined') {
|
|
13505
|
+
item.exchangePrice = new BigNumber__default['default'](item.num).multipliedBy(new BigNumber__default['default'](item.price)).toString();
|
|
13506
|
+
}
|
|
13507
|
+
return item;
|
|
13508
|
+
});
|
|
13509
|
+
} else {
|
|
13510
|
+
newValue[componentMap$3[compType].valueKey] = (data === null || data === void 0 ? void 0 : data.list) || [];
|
|
13511
|
+
}
|
|
13512
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13513
|
+
});
|
|
13514
|
+
return function () {
|
|
13515
|
+
pubsub__default['default'].unsubscribe(subscription);
|
|
13516
|
+
};
|
|
13517
|
+
});
|
|
13518
|
+
React.useEffect(function () {
|
|
13519
|
+
valueRef.current = value;
|
|
13520
|
+
pubsub__default['default'].subscribeOnce(componentMap$3[compType].eventNameMap.exchangeDeleteGood, function (_, data) {
|
|
13521
|
+
if (disabled) return;
|
|
13522
|
+
if (value) {
|
|
13523
|
+
var newValue = _objectSpread2({}, value);
|
|
13524
|
+
newValue[componentMap$3[compType].valueKey] = newValue[componentMap$3[compType].valueKey].filter(function (item) {
|
|
13525
|
+
return item.sku !== data;
|
|
13526
|
+
});
|
|
13527
|
+
onChange(newValue);
|
|
13528
|
+
}
|
|
13529
|
+
});
|
|
13530
|
+
pubsub__default['default'].subscribeOnce(componentMap$3[compType].eventNameMap.changeShopCode, function (type, data) {
|
|
13531
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
13532
|
+
shopCode: data.shopCode
|
|
13533
|
+
}));
|
|
13534
|
+
});
|
|
13535
|
+
}, [value]);
|
|
13536
|
+
var changeGoodHandle = function changeGoodHandle(val) {
|
|
13537
|
+
var newValue = _objectSpread2({}, value);
|
|
13538
|
+
if (compType === 'WDT_EXCHANGE_GOODS') {
|
|
13539
|
+
val = val.map(function (item) {
|
|
13540
|
+
item.exchangePrice = new BigNumber__default['default'](item.num).multipliedBy(new BigNumber__default['default'](item.price)).toString();
|
|
13541
|
+
return item;
|
|
13542
|
+
});
|
|
13543
|
+
}
|
|
13544
|
+
newValue[componentMap$3[compType].valueKey] = val;
|
|
13545
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13546
|
+
};
|
|
13547
|
+
var copyGoods = function copyGoods() {
|
|
13548
|
+
var copyHandle = function copyHandle() {
|
|
13549
|
+
pubsub__default['default'].publish(componentMap$3[compType].eventNameMap.exchangeCopyGood, 'WDT_EXCHANGE_GOODS');
|
|
13550
|
+
};
|
|
13551
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
13552
|
+
type: "link",
|
|
13553
|
+
onClick: copyHandle
|
|
13554
|
+
}, "\u590D\u5236\u9000\u56DE\u5546\u54C1");
|
|
13555
|
+
};
|
|
13556
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
13557
|
+
key: componentMap$3[compType].type
|
|
13558
|
+
}, props), {}, {
|
|
13559
|
+
disabled: disabled,
|
|
13560
|
+
canUpdateNumber: true,
|
|
13561
|
+
showChangeBtn: true,
|
|
13562
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
13563
|
+
value: value === null || value === void 0 ? void 0 : value[componentMap$3[compType].valueKey],
|
|
13564
|
+
otherOperations: copyGoods(),
|
|
13565
|
+
onChange: function onChange(val) {
|
|
13566
|
+
return changeGoodHandle(val);
|
|
13567
|
+
}
|
|
13568
|
+
})));
|
|
13569
|
+
};
|
|
13570
|
+
|
|
13009
13571
|
var _excluded$g = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
13010
13572
|
var typeMap$1 = {
|
|
13011
13573
|
WDT_REISSUE_GOODS: {
|
|
@@ -13794,7 +14356,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
13794
14356
|
changeIndex = _useState2[0],
|
|
13795
14357
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
13796
14358
|
React.useEffect(function () {
|
|
13797
|
-
if (!(value === null || value === void 0 ? void 0 : value.length)) {
|
|
14359
|
+
if (!(value === null || value === void 0 ? void 0 : value.length) && type === 1) {
|
|
13798
14360
|
onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap$1[type].initValue);
|
|
13799
14361
|
}
|
|
13800
14362
|
}, [value, type]);
|
|
@@ -13833,7 +14395,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
13833
14395
|
return setChangeIndex(index);
|
|
13834
14396
|
}
|
|
13835
14397
|
}, "\u7CFB\u7EDF\u8BA2\u5355\u53F7".concat(index + 1)));
|
|
13836
|
-
}))) : null, value.length ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, type === 1 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
14398
|
+
}))) : null, value.length || type !== 1 ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, type === 1 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
13837
14399
|
disabled: disabled,
|
|
13838
14400
|
placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
|
|
13839
14401
|
onChange: function onChange(e) {
|
|
@@ -13848,12 +14410,18 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
13848
14410
|
},
|
|
13849
14411
|
value: (_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2.returnGoodsTradeId
|
|
13850
14412
|
})) : null, type === 3 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
13851
|
-
disabled:
|
|
14413
|
+
disabled: disabled,
|
|
13852
14414
|
placeholder: "\u8BF7\u8F93\u5165\u8865\u53D1\u5355id",
|
|
14415
|
+
onChange: function onChange(e) {
|
|
14416
|
+
return changeInputHandle(e.target.value, 'billNo');
|
|
14417
|
+
},
|
|
13853
14418
|
value: (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.billNo
|
|
13854
14419
|
})) : null, type === 4 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
13855
|
-
disabled:
|
|
14420
|
+
disabled: disabled,
|
|
13856
14421
|
placeholder: "\u8BF7\u8F93\u5165\u6362\u8D27\u5355id",
|
|
14422
|
+
onChange: function onChange(e) {
|
|
14423
|
+
return changeInputHandle(e.target.value, 'billNo');
|
|
14424
|
+
},
|
|
13857
14425
|
value: (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4.billNo
|
|
13858
14426
|
})) : null) : null);
|
|
13859
14427
|
};
|
|
@@ -13915,7 +14483,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
13915
14483
|
return setChangeIndex(index);
|
|
13916
14484
|
}
|
|
13917
14485
|
}, "\u7CFB\u7EDF\u8BA2\u5355\u53F7".concat(index + 1)));
|
|
13918
|
-
}))) : null,
|
|
14486
|
+
}))) : null, /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Select, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
13919
14487
|
showSearch: true,
|
|
13920
14488
|
value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex.status,
|
|
13921
14489
|
filterOption: function filterOption(input, option) {
|
|
@@ -13931,7 +14499,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
13931
14499
|
}
|
|
13932
14500
|
}))), ((_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2.reason) ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
13933
14501
|
className: "c-red"
|
|
13934
|
-
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null)
|
|
14502
|
+
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null));
|
|
13935
14503
|
};
|
|
13936
14504
|
|
|
13937
14505
|
var _excluded$j = ["value", "onChange", "disabled", "failValue", "type"];
|
|
@@ -14047,8 +14615,10 @@ exports.BsSystemOrder = index$1;
|
|
|
14047
14615
|
exports.BuyerNick = BuyerNick;
|
|
14048
14616
|
exports.CalculationInput = CalculationInput;
|
|
14049
14617
|
exports.ChooseBaby = ChooseBaby;
|
|
14618
|
+
exports.CommonExchangeGoods = CommonExchangeGoods;
|
|
14050
14619
|
exports.CommonGoods = CommonGoods;
|
|
14051
14620
|
exports.CommonMultiStatus = CommonSystemOrder$1;
|
|
14621
|
+
exports.CommonReturnGoods = CommonReturnGoods;
|
|
14052
14622
|
exports.CommonStatus = CommonStatus;
|
|
14053
14623
|
exports.CommonSystemOrder = CommonSystemOrder;
|
|
14054
14624
|
exports.ExpressLogistics = ExpressLogistics;
|