@kmkf-fe-packages/kmkf-work-order-service-component 2.2.32 → 2.2.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/FlowTemplateDetailV2/components/JumpBuyer/index.d.ts +9 -0
- package/dist/esm/FlowTemplateDetailV2/components/JumpBuyer/index.js +58 -0
- package/dist/esm/FlowTemplateDetailV2/index.js +12 -4
- package/dist/esm/FlowTemplateDetailV2/type.d.ts +1 -0
- package/dist/esm/WorkOrder/components/WorkOrderList/components/CustomizeWorkOrderCard/index.js +13 -3
- package/dist/esm/WorkOrder/components/WorkOrderList/index.js +3 -0
- package/dist/esm/WorkOrder/index.js +3 -3
- package/dist/esm/common/imgs/contact.png +0 -0
- package/dist/esm/model/logicFlow/selector.d.ts +3 -0
- package/dist/esm/model/paymentWorkOrder/selector.d.ts +9 -0
- package/dist/esm/model/singleShopWorkOrder/selector.d.ts +5 -0
- package/package.json +6 -5
- package/dist/esm/GlobalContext/hook/dist/useGetHasErpData.js +0 -52
- package/dist/esm/GlobalContext/orderQuery/dist/useGetErpAddressData.js +0 -180
- package/dist/esm/GlobalContext/orderQuery/dist/useGetErpLogisticsCompany.js +0 -186
- package/dist/esm/common/utils/dist/submitDataTransOldFormat.js +0 -899
- package/dist/esm/common/utils/dist/tools.js +0 -1326
- package/dist/esm/common/utils/dist/transformWorkOrderData.js +0 -965
- package/dist/esm/model/customizeWorkOrder/dist/api.js +0 -48
- package/dist/esm/model/customizeWorkOrder/dist/index.js +0 -370
- package/dist/esm/model/customizeWorkOrder/dist/selector.js +0 -63
- package/dist/esm/model/customizeWorkOrder/dist/types.js +0 -3
- package/dist/esm/model/dist/global.js +0 -44
- package/dist/esm/model/dist/hooks.js +0 -15
- package/dist/esm/model/dist/login.js +0 -245
- package/dist/esm/model/dist/store.js +0 -30
- package/dist/esm/model/dist/userData.js +0 -41
- package/dist/esm/model/dist/workOrder.js +0 -329
- package/dist/esm/model/flowTemplateDetail/dist/api.js +0 -192
- package/dist/esm/model/flowTemplateDetail/dist/types.js +0 -48
- package/dist/esm/model/logicFlow/dist/api.js +0 -14
- package/dist/esm/model/logicFlow/dist/index.js +0 -235
- package/dist/esm/model/logicFlow/dist/selector.js +0 -18
- package/dist/esm/model/logicFlow/dist/types.js +0 -3
- package/dist/esm/model/paymentWorkOrder/dist/index.js +0 -77
- package/dist/esm/model/paymentWorkOrder/dist/selector.js +0 -36
- package/dist/esm/model/paymentWorkOrder/dist/types.js +0 -3
- package/dist/esm/model/servers/dist/api.js +0 -545
- package/dist/esm/model/servers/dist/request.js +0 -63
- package/dist/esm/model/singleShopWorkOrder/dist/index.js +0 -216
- package/dist/esm/model/singleShopWorkOrder/dist/selector.js +0 -24
- package/dist/esm/model/singleShopWorkOrder/dist/types.js +0 -3
- package/dist/esm/model/types/dist/login.js +0 -3
- package/dist/esm/model/types/dist/singleWorkOrder.js +0 -3
- package/dist/esm/model/types/dist/workOrder.js +0 -3
|
@@ -1,965 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __assign = this && this.__assign || function () {
|
|
4
|
-
__assign = Object.assign || function (t) {
|
|
5
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
-
s = arguments[i];
|
|
7
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
exports.__esModule = true;
|
|
14
|
-
var every_1 = require("lodash/every");
|
|
15
|
-
var maxBy_1 = require("lodash/maxBy");
|
|
16
|
-
var tools_1 = require("./tools");
|
|
17
|
-
var constant_1 = require("./constant");
|
|
18
|
-
var getItemValue = function getItemValue(item) {
|
|
19
|
-
return function (key) {
|
|
20
|
-
return item.jsonMap[key];
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
var processRadio = function processRadio(getValue) {
|
|
24
|
-
return function (nex, config) {
|
|
25
|
-
var _a;
|
|
26
|
-
return _a = {}, _a[nex.uniqueKey] = {
|
|
27
|
-
value: getValue(nex.uniqueKey + "_radio") || (config === null || config === void 0 ? void 0 : config.radio),
|
|
28
|
-
other: getValue(nex.uniqueKey + "_radioOther") || (config === null || config === void 0 ? void 0 : config.radioOther)
|
|
29
|
-
}, _a;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
var processInput = function processInput(getValue) {
|
|
33
|
-
return function (nex, config) {
|
|
34
|
-
var _a;
|
|
35
|
-
return _a = {}, _a[nex.uniqueKey] = getValue(nex.uniqueKey + "_input") || (config === null || config === void 0 ? void 0 : config.input), _a;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
var processNumericalCalculation = function processNumericalCalculation(getValue) {
|
|
39
|
-
return function (nex, config) {
|
|
40
|
-
var _a;
|
|
41
|
-
var _b;
|
|
42
|
-
return _a = {}, _a[nex.uniqueKey] = (_b = getValue(nex.uniqueKey + "_numericalCalculation")) !== null && _b !== void 0 ? _b : config === null || config === void 0 ? void 0 : config.numericalCalculation, _a;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
var processTextarea = function processTextarea(getValue) {
|
|
46
|
-
return function (nex, config) {
|
|
47
|
-
var _a;
|
|
48
|
-
return _a = {}, _a[nex.uniqueKey] = getValue(nex.uniqueKey + "_textarea") || (config === null || config === void 0 ? void 0 : config.textarea), _a;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
var processSelect = function processSelect(getValue) {
|
|
52
|
-
return function (nex, config) {
|
|
53
|
-
var _a;
|
|
54
|
-
return _a = {}, _a[nex.uniqueKey] = getValue(nex.uniqueKey + "_select") || (config === null || config === void 0 ? void 0 : config.select), _a;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
var processRate = function processRate(getValue) {
|
|
58
|
-
return function (nex, config) {
|
|
59
|
-
var _a;
|
|
60
|
-
return _a = {}, _a[nex.uniqueKey] = tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_rate"), []), _a;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
var processFile = function processFile(getValue) {
|
|
64
|
-
return function (nex, config) {
|
|
65
|
-
var _a;
|
|
66
|
-
return _a = {}, _a[nex.uniqueKey] = tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_file"), []), _a;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
var processPosting = function processPosting(getValue) {
|
|
70
|
-
return function (nex, config) {
|
|
71
|
-
var _a;
|
|
72
|
-
var address = [tools_1.transTextToNumber(getValue(nex.uniqueKey + "_postingProvince")), tools_1.transTextToNumber(getValue(nex.uniqueKey + "_postingCity"))];
|
|
73
|
-
var interceptDistrict = tools_1.transTextToNumber(getValue(nex.uniqueKey + "_postingDistrict"));
|
|
74
|
-
interceptDistrict && address.push(interceptDistrict);
|
|
75
|
-
address = every_1["default"](address, function (item) {
|
|
76
|
-
return !item;
|
|
77
|
-
}) ? [] : address;
|
|
78
|
-
return _a = {}, _a[nex.uniqueKey] = {
|
|
79
|
-
postingAddress: address,
|
|
80
|
-
postingDetail: getValue(nex.uniqueKey + "_postingDetail"),
|
|
81
|
-
postingReceiverName: getValue(nex.uniqueKey + "_postingReceiverName"),
|
|
82
|
-
postingReceiverMobile: getValue(nex.uniqueKey + "_postingReceiverMobile")
|
|
83
|
-
}, _a;
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
var processBuyerNickInput = function processBuyerNickInput(getValue) {
|
|
87
|
-
return function (nex, config) {
|
|
88
|
-
var _a;
|
|
89
|
-
return _a = {}, _a[nex.uniqueKey] = {
|
|
90
|
-
buyerNick: getValue(nex.uniqueKey + "_buyerNick"),
|
|
91
|
-
buyerOpenUid: getValue(nex.uniqueKey + "_buyerOpenUid")
|
|
92
|
-
}, _a;
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
var processAliPayInput = function processAliPayInput(getValue) {
|
|
96
|
-
return function (nex, config) {
|
|
97
|
-
var _a;
|
|
98
|
-
return _a = {}, _a[nex.uniqueKey] = {
|
|
99
|
-
name: getValue(nex.uniqueKey + "_alipayName"),
|
|
100
|
-
user: getValue(nex.uniqueKey + "_alipayAccount")
|
|
101
|
-
}, _a[nex.uniqueKey + "_alipayName"] = getValue(nex.uniqueKey + "_alipayName"), _a[nex.uniqueKey + "_alipayAccount"] = getValue(nex.uniqueKey + "_alipayAccount"), _a;
|
|
102
|
-
};
|
|
103
|
-
};
|
|
104
|
-
var processCheckbox = function processCheckbox(getValue) {
|
|
105
|
-
return function (nex, config) {
|
|
106
|
-
var _a;
|
|
107
|
-
return _a = {}, _a[nex.uniqueKey] = {
|
|
108
|
-
value: tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_checkbox"), '') || (config === null || config === void 0 ? void 0 : config.checkbox) || [],
|
|
109
|
-
other: getValue(nex.uniqueKey + "_checkboxOther") || (config === null || config === void 0 ? void 0 : config.checkboxOther)
|
|
110
|
-
}, _a;
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
|
-
var processDatetime = function processDatetime(getValue) {
|
|
114
|
-
return function (nex, config) {
|
|
115
|
-
var _a;
|
|
116
|
-
var v = getValue(nex.uniqueKey + "_dateTime");
|
|
117
|
-
return _a = {}, _a[nex.uniqueKey] = tools_1.jsonParseSecurity(v, v) || (config === null || config === void 0 ? void 0 : config.dateTime), _a;
|
|
118
|
-
};
|
|
119
|
-
};
|
|
120
|
-
var processPicture = function processPicture(getValue) {
|
|
121
|
-
return function (nex, config) {
|
|
122
|
-
var _a;
|
|
123
|
-
var v = getValue(nex.uniqueKey + "_picture");
|
|
124
|
-
return _a = {}, _a[nex.uniqueKey] = v ? tools_1.formatPictures(v).map(function (item) {
|
|
125
|
-
return "" + item;
|
|
126
|
-
}) : (config === null || config === void 0 ? void 0 : config.picture) || [], _a;
|
|
127
|
-
};
|
|
128
|
-
};
|
|
129
|
-
var processBasicMultSelect = function processBasicMultSelect(getValue) {
|
|
130
|
-
return function (nex, config) {
|
|
131
|
-
var _a;
|
|
132
|
-
var v = getValue(nex.uniqueKey + "_basicMultSelect");
|
|
133
|
-
return _a = {}, _a[nex.uniqueKey] = tools_1.jsonParseSecurity(v, '') || (config === null || config === void 0 ? void 0 : config.basicMultSelect) || [], _a;
|
|
134
|
-
};
|
|
135
|
-
};
|
|
136
|
-
var processMultSelect = function processMultSelect(getValue) {
|
|
137
|
-
return function (nex, config) {
|
|
138
|
-
var _a;
|
|
139
|
-
var v = getValue(nex.uniqueKey + "_multSelect");
|
|
140
|
-
var parseValue = tools_1.jsonParseSecurity(v, v || []) || [];
|
|
141
|
-
return _a = {}, _a[nex.uniqueKey] = parseValue === null || parseValue === void 0 ? void 0 : parseValue.map(function (item) {
|
|
142
|
-
return item.actived;
|
|
143
|
-
}), _a;
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
var processBasicAddress = function processBasicAddress(getValue) {
|
|
147
|
-
return function (nex, config) {
|
|
148
|
-
var _a;
|
|
149
|
-
var address = [tools_1.transTextToNumber(getValue(nex.uniqueKey + "_basicProvince")), tools_1.transTextToNumber(getValue(nex.uniqueKey + "_basicCity")), tools_1.transTextToNumber(getValue(nex.uniqueKey + "_basicDistrict"))];
|
|
150
|
-
address = every_1["default"](address, function (item) {
|
|
151
|
-
return !item;
|
|
152
|
-
}) ? [] : address;
|
|
153
|
-
return _a = {}, _a[nex.uniqueKey] = address, _a;
|
|
154
|
-
};
|
|
155
|
-
};
|
|
156
|
-
var processReceiverAddressInput = function processReceiverAddressInput(getValue) {
|
|
157
|
-
return function (nex, config) {
|
|
158
|
-
var _a;
|
|
159
|
-
var address = [tools_1.transTextToNumber(getValue(nex.uniqueKey + "_province")), tools_1.transTextToNumber(getValue(nex.uniqueKey + "_city")), tools_1.transTextToNumber(getValue(nex.uniqueKey + "_district"))];
|
|
160
|
-
address = every_1["default"](address, function (item) {
|
|
161
|
-
return !item;
|
|
162
|
-
}) ? [] : address;
|
|
163
|
-
return _a = {}, _a[nex.uniqueKey] = {
|
|
164
|
-
address: address,
|
|
165
|
-
detail: getValue(nex.uniqueKey + "_address")
|
|
166
|
-
}, _a;
|
|
167
|
-
};
|
|
168
|
-
};
|
|
169
|
-
var processSubForm = function processSubForm(getValue) {
|
|
170
|
-
return function (nex, config) {
|
|
171
|
-
var _a;
|
|
172
|
-
return _a = {}, _a[nex.uniqueKey] = tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_productList"), []), _a;
|
|
173
|
-
};
|
|
174
|
-
};
|
|
175
|
-
var processExpressLogisticsSelect = function processExpressLogisticsSelect(getValue) {
|
|
176
|
-
return function (nex, config) {
|
|
177
|
-
var _a;
|
|
178
|
-
return _a = {}, _a[nex.uniqueKey] = {
|
|
179
|
-
company: getValue(nex.uniqueKey + "_expressLogisticsCompany"),
|
|
180
|
-
order: getValue(nex.uniqueKey + "_expressLogisticsCode")
|
|
181
|
-
}, _a[nex.uniqueKey + "_expressLogisticsCompany"] = getValue(nex.uniqueKey + "_expressLogisticsCompany"), _a[nex.uniqueKey + "_expressLogisticsCode"] = getValue(nex.uniqueKey + "_expressLogisticsCode"), _a;
|
|
182
|
-
};
|
|
183
|
-
};
|
|
184
|
-
var processReturnLogisticsSelect = function processReturnLogisticsSelect(getValue) {
|
|
185
|
-
return function (nex, config) {
|
|
186
|
-
var _a;
|
|
187
|
-
return _a = {}, _a[nex.uniqueKey] = {
|
|
188
|
-
company: getValue(nex.uniqueKey + "_returnLogisticsCompany"),
|
|
189
|
-
order: getValue(nex.uniqueKey + "_returnLogisticsCode")
|
|
190
|
-
}, _a[nex.uniqueKey + "_returnLogisticsCompany"] = getValue(nex.uniqueKey + "_returnLogisticsCompany"), _a[nex.uniqueKey + "_returnLogisticsCode"] = getValue(nex.uniqueKey + "_returnLogisticsCode"), _a;
|
|
191
|
-
};
|
|
192
|
-
};
|
|
193
|
-
var processRemarkInput = function processRemarkInput(getValue) {
|
|
194
|
-
return function (nex, config) {
|
|
195
|
-
var _a;
|
|
196
|
-
var v = getValue(nex.uniqueKey + "_flag");
|
|
197
|
-
var remark = getValue(nex.uniqueKey + "_remark");
|
|
198
|
-
return _a = {}, _a[nex.uniqueKey] = {
|
|
199
|
-
flag: v ? +v : (config === null || config === void 0 ? void 0 : config.flag) ? +(config === null || config === void 0 ? void 0 : config.flag) : '',
|
|
200
|
-
remark: remark || (config === null || config === void 0 ? void 0 : config.remark) || ''
|
|
201
|
-
}, _a;
|
|
202
|
-
};
|
|
203
|
-
};
|
|
204
|
-
var processStatus = function processStatus(getValue) {
|
|
205
|
-
return function (nex, config) {
|
|
206
|
-
var _a;
|
|
207
|
-
var customerService = getValue(nex.uniqueKey + "_customerService");
|
|
208
|
-
return _a = {}, _a[nex.uniqueKey] = {
|
|
209
|
-
status: getValue(nex.uniqueKey + "_status") || (config === null || config === void 0 ? void 0 : config.status),
|
|
210
|
-
customerService: tools_1.jsonParseSecurity(customerService, customerService)
|
|
211
|
-
}, _a[nex.uniqueKey + "_processTime"] = getValue('processTime'), _a[nex.uniqueKey + "_lastProcessingTime"] = getValue('lastProcessingTime'), _a;
|
|
212
|
-
};
|
|
213
|
-
};
|
|
214
|
-
var processOrdinaryInvoice = function processOrdinaryInvoice(getValue) {
|
|
215
|
-
return function (nex, config) {
|
|
216
|
-
var _a;
|
|
217
|
-
var ordinaryMoney = getValue(nex.uniqueKey + "_ordinaryMoney");
|
|
218
|
-
var ordinarySerial = getValue(nex.uniqueKey + "_ordinarySerial");
|
|
219
|
-
var ordinaryTaitou = getValue(nex.uniqueKey + "_ordinaryTaitou");
|
|
220
|
-
return _a = {}, _a[nex.uniqueKey] = {
|
|
221
|
-
ordinaryMoney: ordinaryMoney,
|
|
222
|
-
ordinarySerial: ordinarySerial,
|
|
223
|
-
ordinaryTaitou: ordinaryTaitou
|
|
224
|
-
}, _a[nex.uniqueKey + "_ordinaryMoney"] = ordinaryMoney ? Number(ordinaryMoney).toFixed(2) : null, _a[nex.uniqueKey + "_ordinarySerial"] = ordinarySerial, _a[nex.uniqueKey + "_ordinaryTaitou"] = ordinaryTaitou, _a;
|
|
225
|
-
};
|
|
226
|
-
};
|
|
227
|
-
var processLogisticsInterception = function processLogisticsInterception(getValue) {
|
|
228
|
-
return function (nex, config) {
|
|
229
|
-
var _a;
|
|
230
|
-
var address = [tools_1.transTextToNumber(getValue(nex.uniqueKey + "_interceptProvince")), tools_1.transTextToNumber(getValue(nex.uniqueKey + "_interceptCity"))];
|
|
231
|
-
//兼容地址是只有省市的
|
|
232
|
-
var interceptDistrict = tools_1.transTextToNumber(getValue(nex.uniqueKey + "_interceptDistrict"));
|
|
233
|
-
interceptDistrict && address.push(interceptDistrict);
|
|
234
|
-
address = every_1["default"](address, function (item) {
|
|
235
|
-
return !item;
|
|
236
|
-
}) ? [] : address;
|
|
237
|
-
var subFields = ['interceptCompany', 'interceptCode', 'interceptType', 'interceptSenderMobile', 'interceptDetail', 'interceptReceiverName', 'interceptReceiverMobile', 'interceptLogisticsStatus', 'interceptLogisticsStatusOther', 'interceptLogisticsSnapshot', 'qySelfInterceptLogisticsStatus'];
|
|
238
|
-
var map = subFields.reduce(function (cur, nxt) {
|
|
239
|
-
var _a;
|
|
240
|
-
return __assign(__assign({}, cur), (_a = {}, _a[nxt] = getValue(nex.uniqueKey + "_" + nxt), _a));
|
|
241
|
-
}, {});
|
|
242
|
-
return _a = {}, _a[nex.uniqueKey] = __assign(__assign({}, map), {
|
|
243
|
-
interceptAddress: address,
|
|
244
|
-
interceptLogisticsApiStatus: tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_interceptLogisticsApiStatus"), {})
|
|
245
|
-
}), _a;
|
|
246
|
-
};
|
|
247
|
-
};
|
|
248
|
-
var processLogisticsInterceptionMore = function processLogisticsInterceptionMore(getValue) {
|
|
249
|
-
return function (nex, config) {
|
|
250
|
-
var _a;
|
|
251
|
-
return _a = {}, _a[nex.uniqueKey] = tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_logisticsInterceptList"), [{}]), _a;
|
|
252
|
-
};
|
|
253
|
-
};
|
|
254
|
-
var processLogisticsTrajectory = function processLogisticsTrajectory(getValue) {
|
|
255
|
-
return function (nex, config) {
|
|
256
|
-
var _a;
|
|
257
|
-
var subFields = ['trajectoryCompany', 'trajectoryCode', 'trajectorySnapshot', 'trajectoryPhone'];
|
|
258
|
-
var map = subFields.reduce(function (cur, nxt) {
|
|
259
|
-
var _a;
|
|
260
|
-
return __assign(__assign({}, cur), (_a = {}, _a[nxt] = getValue(nex.uniqueKey + "_" + nxt), _a));
|
|
261
|
-
}, {});
|
|
262
|
-
return _a = {}, _a[nex.uniqueKey] = map, _a;
|
|
263
|
-
};
|
|
264
|
-
};
|
|
265
|
-
var processLogisticsTrajectoryMore = function processLogisticsTrajectoryMore(getValue) {
|
|
266
|
-
return function (nex, config) {
|
|
267
|
-
var _a;
|
|
268
|
-
return _a = {}, _a[nex.uniqueKey] = tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_trajectoryList"), []), _a;
|
|
269
|
-
};
|
|
270
|
-
};
|
|
271
|
-
var processGoods = function processGoods(getValue) {
|
|
272
|
-
return function (nex, config) {
|
|
273
|
-
var _a;
|
|
274
|
-
return _a = {}, _a[nex.uniqueKey] = tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_itemList"), []), _a;
|
|
275
|
-
};
|
|
276
|
-
};
|
|
277
|
-
var processItemSelectThird = function processItemSelectThird(getValue) {
|
|
278
|
-
return function (nex, config) {
|
|
279
|
-
var _a;
|
|
280
|
-
var itemList = tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_itemList"), []);
|
|
281
|
-
itemList.forEach(function (key) {
|
|
282
|
-
key.itemId = key.itemId || key.supplierItemOuterId;
|
|
283
|
-
});
|
|
284
|
-
return _a = {}, _a[nex.uniqueKey] = itemList, _a;
|
|
285
|
-
};
|
|
286
|
-
};
|
|
287
|
-
var processEnterPrisePayment = function processEnterPrisePayment(getValue) {
|
|
288
|
-
return function (nex, config) {
|
|
289
|
-
var _a;
|
|
290
|
-
var subFields = ['enterprisePaymentAlipayNick', 'enterprisePaymentAlipayNo', 'enterprisePaymentBuyerNick', 'enterprisePaymentBuyerOpenUid', 'enterprisePaymentRefundFee', 'enterprisePaymentStatus', 'enterprisePaymentTid'];
|
|
291
|
-
var map = subFields.reduce(function (cur, nxt) {
|
|
292
|
-
var _a;
|
|
293
|
-
return __assign(__assign({}, cur), (_a = {}, _a[nxt] = getValue(nex.uniqueKey + "_" + nxt), _a));
|
|
294
|
-
}, {});
|
|
295
|
-
return _a = {}, _a[nex.uniqueKey] = map, _a[nex.uniqueKey + "_enterprisePaymentAlipayNick"] = getValue(nex.uniqueKey + "_enterprisePaymentAlipayNick"), _a[nex.uniqueKey + "_enterprisePaymentAlipayNo"] = getValue(nex.uniqueKey + "_enterprisePaymentAlipayNo"), _a[nex.uniqueKey + "_enterprisePaymentBuyerNick"] = getValue(nex.uniqueKey + "_enterprisePaymentBuyerNick"), _a[nex.uniqueKey + "_enterprisePaymentRefundFee"] = getValue(nex.uniqueKey + "_enterprisePaymentRefundFee"), _a[nex.uniqueKey + "_enterprisePaymentStatus"] = getValue(nex.uniqueKey + "_enterprisePaymentStatus"), _a[nex.uniqueKey + "_enterprisePaymentTime"] = getValue(nex.uniqueKey + "_enterprisePaymentTime"), _a[nex.uniqueKey + "_enterprisePaymentTid"] = getValue(nex.uniqueKey + "_enterprisePaymentTid"), _a;
|
|
296
|
-
};
|
|
297
|
-
};
|
|
298
|
-
var processJstLogistics = function processJstLogistics(getValue) {
|
|
299
|
-
return function (nex, config) {
|
|
300
|
-
var _a;
|
|
301
|
-
var initValue = [{
|
|
302
|
-
logisticsCompany: null,
|
|
303
|
-
logisticsCode: null
|
|
304
|
-
}];
|
|
305
|
-
var itemList = tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_jstItemList"), initValue);
|
|
306
|
-
return _a = {}, _a[nex.uniqueKey] = (itemList === null || itemList === void 0 ? void 0 : itemList.length) ? itemList : initValue, _a;
|
|
307
|
-
};
|
|
308
|
-
};
|
|
309
|
-
var processJstItemSelectThird = function processJstItemSelectThird(getValue) {
|
|
310
|
-
return function (nex, config) {
|
|
311
|
-
var _a;
|
|
312
|
-
var itemList = tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_jstItemList"), []);
|
|
313
|
-
return _a = {}, _a[nex.uniqueKey] = itemList, _a;
|
|
314
|
-
};
|
|
315
|
-
};
|
|
316
|
-
var processJstSupply = function processJstSupply(getValue) {
|
|
317
|
-
return function (nex, config) {
|
|
318
|
-
var _a;
|
|
319
|
-
var initValue = [{
|
|
320
|
-
supplyId: null
|
|
321
|
-
}];
|
|
322
|
-
var itemList = tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_jstItemList"), initValue);
|
|
323
|
-
return _a = {}, _a[nex.uniqueKey] = (itemList === null || itemList === void 0 ? void 0 : itemList.length) ? itemList : initValue, _a;
|
|
324
|
-
};
|
|
325
|
-
};
|
|
326
|
-
var processJstSendGood = function processJstSendGood(getValue) {
|
|
327
|
-
return function (nex, config) {
|
|
328
|
-
var _a;
|
|
329
|
-
var initValue = [{
|
|
330
|
-
sendName: '',
|
|
331
|
-
sendId: ''
|
|
332
|
-
}];
|
|
333
|
-
var itemList = tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_jstItemList"), initValue);
|
|
334
|
-
return _a = {}, _a[nex.uniqueKey] = (itemList === null || itemList === void 0 ? void 0 : itemList.length) ? itemList : initValue, _a;
|
|
335
|
-
};
|
|
336
|
-
};
|
|
337
|
-
var processBsMemo = function processBsMemo(getValue) {
|
|
338
|
-
return function (nex, config) {
|
|
339
|
-
var _a;
|
|
340
|
-
return _a = {}, _a[nex.uniqueKey] = {
|
|
341
|
-
remark: getValue(nex.uniqueKey + "_bsRemark"),
|
|
342
|
-
flag: getValue(nex.uniqueKey + "_bsFlag")
|
|
343
|
-
}, _a;
|
|
344
|
-
};
|
|
345
|
-
};
|
|
346
|
-
var processReissueLogistics = function processReissueLogistics(getValue) {
|
|
347
|
-
return function (nex, config) {
|
|
348
|
-
var _a;
|
|
349
|
-
var itemList = tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_reissueLogisticsList"), []);
|
|
350
|
-
return _a = {}, _a[nex.uniqueKey] = itemList, _a;
|
|
351
|
-
};
|
|
352
|
-
};
|
|
353
|
-
var processCallBackStatus = function processCallBackStatus(getValue) {
|
|
354
|
-
return function (nex, config) {
|
|
355
|
-
var _a;
|
|
356
|
-
var STATUS_MAP = {
|
|
357
|
-
REISSUE_STATUS: {
|
|
358
|
-
status: 'reissueStatusValue',
|
|
359
|
-
reason: 'reissueReason'
|
|
360
|
-
},
|
|
361
|
-
ADJUST_WORK_ORDER_STATUS: {
|
|
362
|
-
status: 'adjustWorkOrderStatusValue',
|
|
363
|
-
reason: 'adjustWorkOrderReason'
|
|
364
|
-
},
|
|
365
|
-
CREATE_STATUS: {
|
|
366
|
-
status: 'createStatusValue',
|
|
367
|
-
reason: 'createReason'
|
|
368
|
-
},
|
|
369
|
-
INVOICE_STATUS: {
|
|
370
|
-
status: 'invoiceStatusValue',
|
|
371
|
-
reason: 'invoiceReason'
|
|
372
|
-
},
|
|
373
|
-
INVOICING_STATUS: {
|
|
374
|
-
status: 'invoicingStatusValue',
|
|
375
|
-
reason: 'invoicingReason'
|
|
376
|
-
},
|
|
377
|
-
AGREE_REFUND_STATUS: {
|
|
378
|
-
status: 'agreeRefundStatusValue',
|
|
379
|
-
reason: 'agreeRefundStatusReason'
|
|
380
|
-
},
|
|
381
|
-
REJECT_REFUND_STATUS: {
|
|
382
|
-
status: 'rejectRefundStatusValue',
|
|
383
|
-
reason: 'rejectRefundStatusReason'
|
|
384
|
-
}
|
|
385
|
-
};
|
|
386
|
-
return _a = {}, _a[nex.uniqueKey] = {
|
|
387
|
-
status: getValue(nex.uniqueKey + "_" + STATUS_MAP[nex.workOrderComponentType].status),
|
|
388
|
-
reason: getValue(nex.uniqueKey + "_" + STATUS_MAP[nex.workOrderComponentType].reason)
|
|
389
|
-
}, _a;
|
|
390
|
-
};
|
|
391
|
-
};
|
|
392
|
-
var processSceneStatus = function processSceneStatus(getValue) {
|
|
393
|
-
return function (nex, config) {
|
|
394
|
-
var _a;
|
|
395
|
-
var STATUS_LIST_MAP = {
|
|
396
|
-
RETURN_GOODS_STATUS: 'returnGoodsStatusList',
|
|
397
|
-
EXCHANGE_STATUS: 'exchangeReason',
|
|
398
|
-
WAREHOUSING_STATUS: 'inStockStatusItemList',
|
|
399
|
-
BS_E3_WAREHOUSING_STATUS: 'bsE3InStockStatusItemList',
|
|
400
|
-
MSG_STATUS: 'msgStatusValues'
|
|
401
|
-
};
|
|
402
|
-
return _a = {}, _a[nex.uniqueKey] = tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_" + STATUS_LIST_MAP[nex.workOrderComponentType]), []), _a;
|
|
403
|
-
};
|
|
404
|
-
};
|
|
405
|
-
var processErpLogistics = function processErpLogistics(getValue) {
|
|
406
|
-
return function (nex, config) {
|
|
407
|
-
var _a;
|
|
408
|
-
var LogisticsMap = {
|
|
409
|
-
BS_LOGISTICS: {
|
|
410
|
-
listKey: 'bsLogisticsList'
|
|
411
|
-
},
|
|
412
|
-
WLN_LOGISTICS: {
|
|
413
|
-
listKey: 'wlnLogisticsList'
|
|
414
|
-
},
|
|
415
|
-
WDT_LOGISTICS: {
|
|
416
|
-
listKey: 'wdtLogisticsList'
|
|
417
|
-
},
|
|
418
|
-
BS_E3_LOGISTICS: {
|
|
419
|
-
listKey: 'bsE3LogisticsList'
|
|
420
|
-
}
|
|
421
|
-
};
|
|
422
|
-
var initValue = [{
|
|
423
|
-
logisticsCompany: null,
|
|
424
|
-
logisticsCode: null
|
|
425
|
-
}];
|
|
426
|
-
var itemList = tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_" + LogisticsMap[nex.workOrderComponentType].listKey), initValue);
|
|
427
|
-
return _a = {}, _a[nex.uniqueKey] = (itemList === null || itemList === void 0 ? void 0 : itemList.length) ? itemList : initValue, _a;
|
|
428
|
-
};
|
|
429
|
-
};
|
|
430
|
-
var processErpSendGood = function processErpSendGood(getValue) {
|
|
431
|
-
return function (nex, config) {
|
|
432
|
-
var _a;
|
|
433
|
-
var sendGoodMap = {
|
|
434
|
-
BS_SEND_GOOD: {
|
|
435
|
-
list: 'bsSendGood'
|
|
436
|
-
},
|
|
437
|
-
WLN_SEND_GOOD: {
|
|
438
|
-
list: 'wlnSendGood'
|
|
439
|
-
},
|
|
440
|
-
WDT_SEND_GOOD: {
|
|
441
|
-
list: 'wdtSendGood'
|
|
442
|
-
},
|
|
443
|
-
KM_SEND_GOOD: {
|
|
444
|
-
list: 'kmSendGood'
|
|
445
|
-
},
|
|
446
|
-
BS_E3_SEND_GOOD: {
|
|
447
|
-
list: 'bsE3SendGood'
|
|
448
|
-
},
|
|
449
|
-
GY_SEND_GOOD: {
|
|
450
|
-
list: 'gySendGood'
|
|
451
|
-
}
|
|
452
|
-
};
|
|
453
|
-
var initValue = [{
|
|
454
|
-
sendName: '',
|
|
455
|
-
sendId: ''
|
|
456
|
-
}];
|
|
457
|
-
var itemList = tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_" + sendGoodMap[nex.workOrderComponentType].list), initValue);
|
|
458
|
-
return _a = {}, _a[nex.uniqueKey] = (itemList === null || itemList === void 0 ? void 0 : itemList.length) ? itemList : initValue, _a;
|
|
459
|
-
};
|
|
460
|
-
};
|
|
461
|
-
var processBsPosting = function processBsPosting(getValue) {
|
|
462
|
-
return function (nex, config) {
|
|
463
|
-
var _a;
|
|
464
|
-
var bsAddress = [tools_1.transTextToNumber(getValue(nex.uniqueKey + "_bsPostingProvince")), tools_1.transTextToNumber(getValue(nex.uniqueKey + "_bsPostingCity"))];
|
|
465
|
-
//兼容地址是只有省市的
|
|
466
|
-
var bsInterceptDistrict = tools_1.transTextToNumber(getValue(nex.uniqueKey + "_bsPostingDistrict"));
|
|
467
|
-
bsInterceptDistrict && bsAddress.push(bsInterceptDistrict);
|
|
468
|
-
bsAddress = every_1["default"](bsAddress, function (item) {
|
|
469
|
-
return !item;
|
|
470
|
-
}) ? [] : bsAddress;
|
|
471
|
-
return _a = {}, _a[nex.uniqueKey] = {
|
|
472
|
-
postingAddress: bsAddress,
|
|
473
|
-
postingDetail: getValue(nex.uniqueKey + "_bsPostingDetail"),
|
|
474
|
-
postingReceiverName: getValue(nex.uniqueKey + "_bsPostingReceiverName"),
|
|
475
|
-
postingReceiverMobile: getValue(nex.uniqueKey + "_bsPostingReceiverMobile")
|
|
476
|
-
}, _a;
|
|
477
|
-
};
|
|
478
|
-
};
|
|
479
|
-
var processBsGoods = function processBsGoods(getValue) {
|
|
480
|
-
return function (nex, config) {
|
|
481
|
-
var _a;
|
|
482
|
-
var _values = {
|
|
483
|
-
bsGoods: tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_bsGoods"), []),
|
|
484
|
-
shopCode: getValue(nex.uniqueKey + "_shopCode")
|
|
485
|
-
};
|
|
486
|
-
return _a = {}, _a[nex.uniqueKey] = _values, _a;
|
|
487
|
-
};
|
|
488
|
-
};
|
|
489
|
-
var processWdtGoods = function processWdtGoods(templateColumns) {
|
|
490
|
-
return function (getValue) {
|
|
491
|
-
return function (nex, config) {
|
|
492
|
-
var _a;
|
|
493
|
-
var _values = {
|
|
494
|
-
wdtGoods: tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_wdtGoods"), []),
|
|
495
|
-
shopCode: getValue(nex.uniqueKey + "_shopCode")
|
|
496
|
-
};
|
|
497
|
-
var selectIds = [];
|
|
498
|
-
var orderNo = '';
|
|
499
|
-
var tradeId = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
500
|
-
return col.workOrderComponentType === 'TRADE_ID_INPUT';
|
|
501
|
-
});
|
|
502
|
-
if (tradeId) {
|
|
503
|
-
orderNo = getValue(tradeId.uniqueKey + "_" + constant_1.updateWorkTypeKeys[tradeId.workOrderComponentType]);
|
|
504
|
-
}
|
|
505
|
-
var wdtSystemOrder = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
506
|
-
return col.workOrderComponentType === 'WDT_SYSTEM_ORDER';
|
|
507
|
-
});
|
|
508
|
-
if (wdtSystemOrder) {
|
|
509
|
-
selectIds = tools_1.jsonParseSecurity(getValue(wdtSystemOrder.uniqueKey + "_" + constant_1.systemOrderMap[wdtSystemOrder.workOrderComponentType].ids), []);
|
|
510
|
-
}
|
|
511
|
-
_values.selectIds = selectIds;
|
|
512
|
-
_values.orderNo = orderNo;
|
|
513
|
-
return _a = {}, _a[nex.uniqueKey] = _values, _a;
|
|
514
|
-
};
|
|
515
|
-
};
|
|
516
|
-
};
|
|
517
|
-
var processBsE3Goods = function processBsE3Goods(templateColumns) {
|
|
518
|
-
return function (getValue) {
|
|
519
|
-
return function (nex, config) {
|
|
520
|
-
var _a;
|
|
521
|
-
var _values = {
|
|
522
|
-
bsE3Goods: tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_bsE3Goods"), []),
|
|
523
|
-
shopCode: getValue(nex.uniqueKey + "_shopCode")
|
|
524
|
-
};
|
|
525
|
-
var selectIds = [];
|
|
526
|
-
var orderNo = '';
|
|
527
|
-
var tradeId = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
528
|
-
return col.workOrderComponentType === 'TRADE_ID_INPUT';
|
|
529
|
-
});
|
|
530
|
-
if (tradeId) {
|
|
531
|
-
orderNo = getValue(tradeId.uniqueKey + "_" + constant_1.updateWorkTypeKeys[tradeId.workOrderComponentType]);
|
|
532
|
-
}
|
|
533
|
-
var bsE3SystemOrder = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
534
|
-
return col.workOrderComponentType === 'BS_E3_SYSTEM_ORDER';
|
|
535
|
-
});
|
|
536
|
-
if (bsE3SystemOrder) {
|
|
537
|
-
selectIds = tools_1.jsonParseSecurity(getValue(bsE3SystemOrder.uniqueKey + "_" + constant_1.systemOrderMap[bsE3SystemOrder.workOrderComponentType].ids), []);
|
|
538
|
-
}
|
|
539
|
-
_values.selectIds = selectIds;
|
|
540
|
-
_values.orderNo = orderNo;
|
|
541
|
-
return _a = {}, _a[nex.uniqueKey] = _values, _a;
|
|
542
|
-
};
|
|
543
|
-
};
|
|
544
|
-
};
|
|
545
|
-
var processGyGoods = function processGyGoods(templateColumns) {
|
|
546
|
-
return function (getValue) {
|
|
547
|
-
return function (nex, config) {
|
|
548
|
-
var _a;
|
|
549
|
-
var _values = {
|
|
550
|
-
gyGoods: tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_gyGoods"), []),
|
|
551
|
-
shopCode: getValue(nex.uniqueKey + "_shopCode")
|
|
552
|
-
};
|
|
553
|
-
var selectIds = [];
|
|
554
|
-
var orderNo = '';
|
|
555
|
-
var tradeId = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
556
|
-
return col.workOrderComponentType === 'TRADE_ID_INPUT';
|
|
557
|
-
});
|
|
558
|
-
if (tradeId) {
|
|
559
|
-
orderNo = getValue(tradeId.uniqueKey + "_" + constant_1.updateWorkTypeKeys[tradeId.workOrderComponentType]);
|
|
560
|
-
}
|
|
561
|
-
var gySystemOrder = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
562
|
-
return col.workOrderComponentType === 'GY_SYSTEM_ORDER';
|
|
563
|
-
});
|
|
564
|
-
if (gySystemOrder) {
|
|
565
|
-
selectIds = tools_1.jsonParseSecurity(getValue(gySystemOrder.uniqueKey + "_" + constant_1.systemOrderMap[gySystemOrder.workOrderComponentType].ids), []);
|
|
566
|
-
}
|
|
567
|
-
_values.selectIds = selectIds;
|
|
568
|
-
_values.orderNo = orderNo;
|
|
569
|
-
return _a = {}, _a[nex.uniqueKey] = _values, _a;
|
|
570
|
-
};
|
|
571
|
-
};
|
|
572
|
-
};
|
|
573
|
-
var processBsReissueGoods = function processBsReissueGoods(getValue) {
|
|
574
|
-
return function (nex, config) {
|
|
575
|
-
var _a;
|
|
576
|
-
return _a = {}, _a[nex.uniqueKey] = {
|
|
577
|
-
bsReissueType: tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_bsReissueType"), []),
|
|
578
|
-
bsReissueGoods: tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_bsReissueGoods"), []),
|
|
579
|
-
shopCode: getValue(nex.uniqueKey + "_shopCode")
|
|
580
|
-
}, _a;
|
|
581
|
-
};
|
|
582
|
-
};
|
|
583
|
-
var processBsExchangeGoods = function processBsExchangeGoods(getValue) {
|
|
584
|
-
return function (nex, config) {
|
|
585
|
-
var _a;
|
|
586
|
-
var bsExchangeType = tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_bsExchangeType"), []);
|
|
587
|
-
var bsExchangeReturnGoods = tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_bsExchangeReturnGoods"), []);
|
|
588
|
-
var bsExchangeSwapOutGoods = tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_bsExchangeSwapOutGoods"), []);
|
|
589
|
-
//补发组装数据
|
|
590
|
-
if ((bsExchangeType === null || bsExchangeType === void 0 ? void 0 : bsExchangeType.length) && ['2', '4'].includes(bsExchangeType[0])) {
|
|
591
|
-
var maxLen = maxBy_1["default"](bsExchangeReturnGoods, function (t) {
|
|
592
|
-
return t.index;
|
|
593
|
-
});
|
|
594
|
-
var newGoods_1 = Array((maxLen === null || maxLen === void 0 ? void 0 : maxLen.index) + 1 || 0).map(function () {
|
|
595
|
-
return {
|
|
596
|
-
bsExchangeReturnGoods: [],
|
|
597
|
-
bsExchangeSwapOutGoods: []
|
|
598
|
-
};
|
|
599
|
-
});
|
|
600
|
-
bsExchangeReturnGoods.forEach(function (item) {
|
|
601
|
-
if (!newGoods_1[item.index]) {
|
|
602
|
-
newGoods_1[item.index] = {
|
|
603
|
-
bsExchangeReturnGoods: [],
|
|
604
|
-
bsExchangeSwapOutGoods: []
|
|
605
|
-
};
|
|
606
|
-
}
|
|
607
|
-
newGoods_1[item.index].bsExchangeReturnGoods.push(item);
|
|
608
|
-
});
|
|
609
|
-
bsExchangeSwapOutGoods.forEach(function (item) {
|
|
610
|
-
newGoods_1[item.index].bsExchangeSwapOutGoods.push(item);
|
|
611
|
-
});
|
|
612
|
-
bsExchangeReturnGoods = newGoods_1;
|
|
613
|
-
bsExchangeSwapOutGoods = [];
|
|
614
|
-
}
|
|
615
|
-
return _a = {}, _a[nex.uniqueKey] = {
|
|
616
|
-
bsExchangeType: bsExchangeType,
|
|
617
|
-
bsExchangeReturnGoods: bsExchangeReturnGoods,
|
|
618
|
-
bsExchangeSwapOutGoods: bsExchangeSwapOutGoods,
|
|
619
|
-
bsExchangeGiftGoods: tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_bsExchangeGiftGoods"), []),
|
|
620
|
-
shopCode: getValue(nex.uniqueKey + "_shopCode")
|
|
621
|
-
}, _a;
|
|
622
|
-
};
|
|
623
|
-
};
|
|
624
|
-
var processWdtExchangeGoods = function processWdtExchangeGoods(getValue) {
|
|
625
|
-
return function (nex, config) {
|
|
626
|
-
var _a;
|
|
627
|
-
return _a = {}, _a[nex.uniqueKey] = {
|
|
628
|
-
wdtExchangeGoods: tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_wdtExchangeGoods"), []),
|
|
629
|
-
shopCode: getValue(nex.uniqueKey + "_shopCode")
|
|
630
|
-
}, _a;
|
|
631
|
-
};
|
|
632
|
-
};
|
|
633
|
-
var processBsOrWdtReturnGoods = function processBsOrWdtReturnGoods(getValue) {
|
|
634
|
-
return function (nex, config) {
|
|
635
|
-
var _a, _b;
|
|
636
|
-
var compType = nex.workOrderComponentType;
|
|
637
|
-
var returnGoodsMap = {
|
|
638
|
-
BS_RETURN_GOODS: {
|
|
639
|
-
returnTypeKey: 'bsReturnType',
|
|
640
|
-
returnGoodsKey: 'bsReturnGoods',
|
|
641
|
-
shopCodeKey: 'shopCode'
|
|
642
|
-
},
|
|
643
|
-
WDT_RETURN_GOODS: {
|
|
644
|
-
returnTypeKey: 'wdtReturnType',
|
|
645
|
-
returnGoodsKey: 'wdtReturnGoods',
|
|
646
|
-
shopCodeKey: 'shopCode'
|
|
647
|
-
}
|
|
648
|
-
};
|
|
649
|
-
return _a = {}, _a["" + nex.uniqueKey] = (_b = {}, _b[returnGoodsMap[compType].returnTypeKey] = tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_" + returnGoodsMap[compType].returnTypeKey), []), _b[returnGoodsMap[compType].returnGoodsKey] = tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_" + returnGoodsMap[compType].returnGoodsKey), []), _b[returnGoodsMap[compType].shopCodeKey] = getValue(nex.uniqueKey + "_" + returnGoodsMap[compType].shopCodeKey), _b), _a;
|
|
650
|
-
};
|
|
651
|
-
};
|
|
652
|
-
var processErpSystemOrder = function processErpSystemOrder(getValue) {
|
|
653
|
-
return function (nex, config) {
|
|
654
|
-
var _a;
|
|
655
|
-
var systemOrderMap = {
|
|
656
|
-
BS_SYSTEM_ORDER: {
|
|
657
|
-
no: 'bsSystemOrderNo',
|
|
658
|
-
ids: 'bsSystemSelectIds',
|
|
659
|
-
order: 'bsSystemShowOrder'
|
|
660
|
-
},
|
|
661
|
-
KM_SYSTEM_ORDER: {
|
|
662
|
-
no: 'kmSystemOrderNo',
|
|
663
|
-
ids: 'kmSystemSelectIds',
|
|
664
|
-
order: 'kmSystemShowOrder'
|
|
665
|
-
},
|
|
666
|
-
WLN_SYSTEM_ORDER: {
|
|
667
|
-
no: 'wlnSystemOrderNo',
|
|
668
|
-
ids: 'wlnSystemSelectIds',
|
|
669
|
-
order: 'wlnSystemShowOrder'
|
|
670
|
-
},
|
|
671
|
-
WDT_SYSTEM_ORDER: {
|
|
672
|
-
no: 'wdtSystemOrderNo',
|
|
673
|
-
ids: 'wdtSystemSelectIds',
|
|
674
|
-
order: 'wdtSystemShowOrder'
|
|
675
|
-
},
|
|
676
|
-
BS_E3_SYSTEM_ORDER: {
|
|
677
|
-
no: 'bsE3SystemOrderNo',
|
|
678
|
-
ids: 'bsE3SystemSelectIds',
|
|
679
|
-
order: 'bsE3SystemShowOrder'
|
|
680
|
-
},
|
|
681
|
-
GY_SYSTEM_ORDER: {
|
|
682
|
-
no: 'gySystemOrderNo',
|
|
683
|
-
ids: 'gySystemSelectIds',
|
|
684
|
-
order: 'gySystemShowOrder'
|
|
685
|
-
}
|
|
686
|
-
};
|
|
687
|
-
console.log('触发---getGyOrderList--6', {
|
|
688
|
-
orderNo: getValue(nex.uniqueKey + "_" + systemOrderMap[nex.workOrderComponentType].no),
|
|
689
|
-
orders: [],
|
|
690
|
-
isTest: 6,
|
|
691
|
-
selectIds: tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_" + systemOrderMap[nex.workOrderComponentType].ids), []),
|
|
692
|
-
showOrderInfo: tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_" + systemOrderMap[nex.workOrderComponentType].order), [])
|
|
693
|
-
});
|
|
694
|
-
return _a = {}, _a[nex.uniqueKey] = {
|
|
695
|
-
orderNo: getValue(nex.uniqueKey + "_" + systemOrderMap[nex.workOrderComponentType].no),
|
|
696
|
-
orders: [],
|
|
697
|
-
isTest: 6,
|
|
698
|
-
selectIds: tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_" + systemOrderMap[nex.workOrderComponentType].ids), []),
|
|
699
|
-
showOrderInfo: tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_" + systemOrderMap[nex.workOrderComponentType].order), [])
|
|
700
|
-
}, _a;
|
|
701
|
-
};
|
|
702
|
-
};
|
|
703
|
-
var processBuyerMessageNotice = function processBuyerMessageNotice(getValue) {
|
|
704
|
-
return function (nex, config) {
|
|
705
|
-
var _a;
|
|
706
|
-
return _a = {}, _a[nex.uniqueKey] = getValue(nex.uniqueKey + "_buyerMessageNotice") || (config === null || config === void 0 ? void 0 : config.select), _a;
|
|
707
|
-
};
|
|
708
|
-
};
|
|
709
|
-
var processErpTradeId = function processErpTradeId(getValue) {
|
|
710
|
-
return function (nex, config) {
|
|
711
|
-
var _a;
|
|
712
|
-
var SYSTEM_ORDER_MAP = {
|
|
713
|
-
BS_DELIVERY_NO: {
|
|
714
|
-
key: 'deliveryNoList',
|
|
715
|
-
defaultValue: [{
|
|
716
|
-
deliverNo: '',
|
|
717
|
-
systemOrderId: ''
|
|
718
|
-
}]
|
|
719
|
-
},
|
|
720
|
-
RETURN_GOODS_TRADE_ID: {
|
|
721
|
-
key: 'returnGoodsTradeItemList',
|
|
722
|
-
defaultValue: []
|
|
723
|
-
},
|
|
724
|
-
REISSUE_TRADE_ID: {
|
|
725
|
-
key: 'tradeItemList',
|
|
726
|
-
defaultValue: []
|
|
727
|
-
},
|
|
728
|
-
EXCHANGE_TRADE_ID: {
|
|
729
|
-
key: 'tradeItemList',
|
|
730
|
-
defaultValue: []
|
|
731
|
-
}
|
|
732
|
-
};
|
|
733
|
-
return _a = {}, _a[nex.uniqueKey] = tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_" + SYSTEM_ORDER_MAP[nex.workOrderComponentType].key), SYSTEM_ORDER_MAP[nex.workOrderComponentType].defaultValue), _a;
|
|
734
|
-
};
|
|
735
|
-
};
|
|
736
|
-
var processWlnGoods = function processWlnGoods(getValue) {
|
|
737
|
-
return function (nex, config) {
|
|
738
|
-
var _a;
|
|
739
|
-
return _a = {}, _a[nex.uniqueKey] = {
|
|
740
|
-
wlnGoods: tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_wlnGoods"), []),
|
|
741
|
-
shopCode: getValue(nex.uniqueKey + "_shopCode")
|
|
742
|
-
}, _a;
|
|
743
|
-
};
|
|
744
|
-
};
|
|
745
|
-
var processWdtReissueGoods = function processWdtReissueGoods(templateColumns) {
|
|
746
|
-
return function (getValue) {
|
|
747
|
-
return function (nex, config) {
|
|
748
|
-
var _a;
|
|
749
|
-
var orderNo = '';
|
|
750
|
-
var tradeId = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
751
|
-
return col.workOrderComponentType === 'TRADE_ID_INPUT';
|
|
752
|
-
});
|
|
753
|
-
if (tradeId) {
|
|
754
|
-
orderNo = getValue(tradeId.uniqueKey + "_" + constant_1.updateWorkTypeKeys[tradeId.workOrderComponentType]);
|
|
755
|
-
}
|
|
756
|
-
return _a = {}, _a[nex.uniqueKey] = {
|
|
757
|
-
wdtSystemOrder: {
|
|
758
|
-
orderNo: orderNo
|
|
759
|
-
},
|
|
760
|
-
wdtReissueType: tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_wdtReissueType"), ['1']),
|
|
761
|
-
wdtReissueGoods: tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_wdtReissueGoods"), []),
|
|
762
|
-
shopCode: getValue(nex.uniqueKey + "_shopCode"),
|
|
763
|
-
wdtSystemOrderNo: getValue(nex.uniqueKey + "_wdtSystemOrderNo")
|
|
764
|
-
}, _a;
|
|
765
|
-
};
|
|
766
|
-
};
|
|
767
|
-
};
|
|
768
|
-
var processGyReissueGoods = function processGyReissueGoods(templateColumns) {
|
|
769
|
-
return function (getValue) {
|
|
770
|
-
return function (nex, config) {
|
|
771
|
-
var _a;
|
|
772
|
-
var orderNo = '';
|
|
773
|
-
var tradeId = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
774
|
-
return col.workOrderComponentType === 'TRADE_ID_INPUT';
|
|
775
|
-
});
|
|
776
|
-
if (tradeId) {
|
|
777
|
-
orderNo = getValue(tradeId.uniqueKey + "_" + constant_1.updateWorkTypeKeys[tradeId.workOrderComponentType]);
|
|
778
|
-
}
|
|
779
|
-
return _a = {}, _a[nex.uniqueKey] = {
|
|
780
|
-
gySystemOrder: {
|
|
781
|
-
orderNo: orderNo
|
|
782
|
-
},
|
|
783
|
-
gyReissueType: tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_gyReissueType"), ['1']),
|
|
784
|
-
gyReissueGoods: tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_gyReissueGoods"), []),
|
|
785
|
-
shopCode: getValue(nex.uniqueKey + "_shopCode"),
|
|
786
|
-
vipCode: getValue(nex.uniqueKey + "_vipCode"),
|
|
787
|
-
gySystemOrderNo: getValue(nex.uniqueKey + "_gySystemOrderNo")
|
|
788
|
-
}, _a;
|
|
789
|
-
};
|
|
790
|
-
};
|
|
791
|
-
};
|
|
792
|
-
var processLabel = function processLabel(getValue) {
|
|
793
|
-
return function (nex, config) {
|
|
794
|
-
var _a;
|
|
795
|
-
return _a = {}, _a[nex.uniqueKey] = tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_label"), []), _a[nex.uniqueKey + "_label"] = tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_label"), []), _a;
|
|
796
|
-
};
|
|
797
|
-
};
|
|
798
|
-
var processMemberLevel = function processMemberLevel(getValue) {
|
|
799
|
-
return function (nex, config) {
|
|
800
|
-
var _a;
|
|
801
|
-
return _a = {}, _a[nex.uniqueKey] = tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_memberLevel"), []), _a[nex.uniqueKey + "_memberLevel"] = tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_memberLevel"), []), _a;
|
|
802
|
-
};
|
|
803
|
-
};
|
|
804
|
-
var processAfterSalesOrderId = function processAfterSalesOrderId(getValue) {
|
|
805
|
-
return function (nex, config) {
|
|
806
|
-
var _a;
|
|
807
|
-
return _a = {}, _a[nex.uniqueKey] = getValue(nex.uniqueKey + "_afterSalesOrderId"), _a;
|
|
808
|
-
};
|
|
809
|
-
};
|
|
810
|
-
var processSingleField = function processSingleField(getValue) {
|
|
811
|
-
return function (nex, config) {
|
|
812
|
-
var _a;
|
|
813
|
-
return _a = {}, _a[nex.uniqueKey] = getValue(nex.uniqueKey + "_" + constant_1.updateWorkTypeKeys[nex.workOrderComponentType]), _a;
|
|
814
|
-
};
|
|
815
|
-
};
|
|
816
|
-
var processBsE3ReissueGoods = function processBsE3ReissueGoods(templateColumns) {
|
|
817
|
-
return function (getValue) {
|
|
818
|
-
return function (nex, config) {
|
|
819
|
-
var _a;
|
|
820
|
-
var orderNo = '';
|
|
821
|
-
var tradeId = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
822
|
-
return col.workOrderComponentType === 'TRADE_ID_INPUT';
|
|
823
|
-
});
|
|
824
|
-
if (tradeId) {
|
|
825
|
-
orderNo = getValue(tradeId.uniqueKey + "_" + constant_1.updateWorkTypeKeys[tradeId.workOrderComponentType]);
|
|
826
|
-
}
|
|
827
|
-
return _a = {}, _a[nex.uniqueKey] = {
|
|
828
|
-
bsE3SystemOrder: {
|
|
829
|
-
orderNo: orderNo
|
|
830
|
-
},
|
|
831
|
-
bsE3SystemOrderNo: getValue(nex.uniqueKey + "_bsE3SystemOrderNo"),
|
|
832
|
-
bsE3ReissueType: tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_bsE3ReissueType"), ['1']),
|
|
833
|
-
bsE3ReissueGoods: tools_1.jsonParseSecurity(getValue(nex.uniqueKey + "_bsE3ReissueGoods"), [])
|
|
834
|
-
}, _a;
|
|
835
|
-
};
|
|
836
|
-
};
|
|
837
|
-
};
|
|
838
|
-
var transformWorkOrderData = function transformWorkOrderData(templateColumns, type) {
|
|
839
|
-
if (type === void 0) {
|
|
840
|
-
type = 'edit';
|
|
841
|
-
}
|
|
842
|
-
return function (item) {
|
|
843
|
-
var getValue = getItemValue(item);
|
|
844
|
-
var componentProcessors = {
|
|
845
|
-
RADIO: processRadio,
|
|
846
|
-
INPUT: processInput,
|
|
847
|
-
NUMERICAL_CALCULATION: processNumericalCalculation,
|
|
848
|
-
TEXTAREA: processTextarea,
|
|
849
|
-
SELECT: processSelect,
|
|
850
|
-
RATE: processRate,
|
|
851
|
-
FILE: processFile,
|
|
852
|
-
POSTING: processPosting,
|
|
853
|
-
BUYER_NICK_INPUT: processBuyerNickInput,
|
|
854
|
-
ALI_PAY_INPUT: processAliPayInput,
|
|
855
|
-
CHECKBOX: processCheckbox,
|
|
856
|
-
DATETIME: processDatetime,
|
|
857
|
-
PICTURE: processPicture,
|
|
858
|
-
BASIC_MULT_SELECT: processBasicMultSelect,
|
|
859
|
-
MULT_SELECT: processMultSelect,
|
|
860
|
-
BASIC_ADDRESS: processBasicAddress,
|
|
861
|
-
RECEIVER_ADDRESS_INPUT: processReceiverAddressInput,
|
|
862
|
-
SUBFORM: processSubForm,
|
|
863
|
-
EXPRESS_LOGISTICS_SELECT: processExpressLogisticsSelect,
|
|
864
|
-
RETURN_LOGISTICS_SELECT: processReturnLogisticsSelect,
|
|
865
|
-
REMARK_INPUT: processRemarkInput,
|
|
866
|
-
STATUS: processStatus,
|
|
867
|
-
ORDINARY_INVOICE: processOrdinaryInvoice,
|
|
868
|
-
LOGISTICS_INTERCEPTION: processLogisticsInterception,
|
|
869
|
-
LOGISTICS_INTERCEPTION_MORE: processLogisticsInterceptionMore,
|
|
870
|
-
LOGISTICS_TRAJECTORY: processLogisticsTrajectory,
|
|
871
|
-
LOGISTICS_TRAJECTORY_MORE: processLogisticsTrajectoryMore,
|
|
872
|
-
ITEM_SELECT: processGoods,
|
|
873
|
-
ITEM_ENCODE: processGoods,
|
|
874
|
-
ITEM_ID: processGoods,
|
|
875
|
-
ITEM_SELECT_THIRD: processItemSelectThird,
|
|
876
|
-
ENTERPRISE_PAYMENT: processEnterPrisePayment,
|
|
877
|
-
JST_LOGISTICS: processJstLogistics,
|
|
878
|
-
JST_ITEM_SELECT_THIRD: processJstItemSelectThird,
|
|
879
|
-
JST_SUPPLY: processJstSupply,
|
|
880
|
-
JST_SEND_GOOD: processJstSendGood,
|
|
881
|
-
BS_MEMO: processBsMemo,
|
|
882
|
-
REISSUE_LOGISTICS: processReissueLogistics,
|
|
883
|
-
REISSUE_STATUS: processCallBackStatus,
|
|
884
|
-
ADJUST_WORK_ORDER_STATUS: processCallBackStatus,
|
|
885
|
-
CREATE_STATUS: processCallBackStatus,
|
|
886
|
-
INVOICE_STATUS: processCallBackStatus,
|
|
887
|
-
INVOICING_STATUS: processCallBackStatus,
|
|
888
|
-
AGREE_REFUND_STATUS: processCallBackStatus,
|
|
889
|
-
REJECT_REFUND_STATUS: processCallBackStatus,
|
|
890
|
-
RETURN_GOODS_STATUS: processSceneStatus,
|
|
891
|
-
EXCHANGE_STATUS: processSceneStatus,
|
|
892
|
-
WAREHOUSING_STATUS: processSceneStatus,
|
|
893
|
-
BS_E3_WAREHOUSING_STATUS: processSceneStatus,
|
|
894
|
-
MSG_STATUS: processSceneStatus,
|
|
895
|
-
BS_LOGISTICS: processErpLogistics,
|
|
896
|
-
WLN_LOGISTICS: processErpLogistics,
|
|
897
|
-
WDT_LOGISTICS: processErpLogistics,
|
|
898
|
-
BS_E3_LOGISTICS: processErpLogistics,
|
|
899
|
-
BS_SEND_GOOD: processErpSendGood,
|
|
900
|
-
WLN_SEND_GOOD: processErpSendGood,
|
|
901
|
-
WDT_SEND_GOOD: processErpSendGood,
|
|
902
|
-
BS_E3_SEND_GOOD: processErpSendGood,
|
|
903
|
-
KM_SEND_GOOD: processErpSendGood,
|
|
904
|
-
GY_SEND_GOOD: processErpSendGood,
|
|
905
|
-
BS_POSTING: processBsPosting,
|
|
906
|
-
BS_GOODS: processBsGoods,
|
|
907
|
-
WDT_GOODS: processWdtGoods(templateColumns),
|
|
908
|
-
BS_E3_GOODS: processBsE3Goods(templateColumns),
|
|
909
|
-
GY_GOODS: processGyGoods(templateColumns),
|
|
910
|
-
BS_REISSUE_GOODS: processBsReissueGoods,
|
|
911
|
-
BS_EXCHANGE_GOODS: processBsExchangeGoods,
|
|
912
|
-
WDT_EXCHANGE_GOODS: processWdtExchangeGoods,
|
|
913
|
-
BS_RETURN_GOODS: processBsOrWdtReturnGoods,
|
|
914
|
-
WDT_RETURN_GOODS: processBsOrWdtReturnGoods,
|
|
915
|
-
BS_SYSTEM_ORDER: processErpSystemOrder,
|
|
916
|
-
KM_SYSTEM_ORDER: processErpSystemOrder,
|
|
917
|
-
WLN_SYSTEM_ORDER: processErpSystemOrder,
|
|
918
|
-
WDT_SYSTEM_ORDER: processErpSystemOrder,
|
|
919
|
-
BS_E3_SYSTEM_ORDER: processErpSystemOrder,
|
|
920
|
-
GY_SYSTEM_ORDER: processErpSystemOrder,
|
|
921
|
-
BUYER_MESSAGE_NOTICE: processBuyerMessageNotice,
|
|
922
|
-
RETURN_GOODS_TRADE_ID: processErpTradeId,
|
|
923
|
-
BS_DELIVERY_NO: processErpTradeId,
|
|
924
|
-
REISSUE_TRADE_ID: processErpTradeId,
|
|
925
|
-
EXCHANGE_TRADE_ID: processErpTradeId,
|
|
926
|
-
WLN_GOODS: processWlnGoods,
|
|
927
|
-
WDT_REISSUE_GOODS: processWdtReissueGoods(templateColumns),
|
|
928
|
-
GY_REISSUE_GOODS: processGyReissueGoods(templateColumns),
|
|
929
|
-
LABEL: processLabel,
|
|
930
|
-
MEMBER_LEVEL: processMemberLevel,
|
|
931
|
-
AFTER_SALES_ORDER_ID: processAfterSalesOrderId,
|
|
932
|
-
BASIC_GRADE: processSingleField,
|
|
933
|
-
TRADE_ID_INPUT: processSingleField,
|
|
934
|
-
SHOP_NAME_INPUT: processSingleField,
|
|
935
|
-
RECEIVER_NAME_INPUT: processSingleField,
|
|
936
|
-
RECEIVER_MOBILE_INPUT: processSingleField,
|
|
937
|
-
TRADE_CREATE_DATETIME: processSingleField,
|
|
938
|
-
TRADE_PAYMENT_DATETIME: processSingleField,
|
|
939
|
-
TRADE_DELIVERY_DATETIME: processSingleField,
|
|
940
|
-
TRADE_CLOSING_DATETIME: processSingleField,
|
|
941
|
-
ACTUAL_PAYMENT: processSingleField,
|
|
942
|
-
SYSTEM_ORDER_NO: processSingleField,
|
|
943
|
-
BS_SIGNING_TIME: processSingleField,
|
|
944
|
-
BS_SEND_TIME: processSingleField,
|
|
945
|
-
BS_TRADE_PAYMENT_TIME: processSingleField,
|
|
946
|
-
BS_NET_RECEIPTS: processSingleField,
|
|
947
|
-
BS_PACKAGE_WEIGHT: processSingleField,
|
|
948
|
-
BS_DEPOSIT: processSingleField,
|
|
949
|
-
NEW_PAYMENT_STATUS: processSingleField,
|
|
950
|
-
BUSINESS_ORDER_NO: processSingleField,
|
|
951
|
-
PAYMENT_VOUCHER_CODE: processSingleField,
|
|
952
|
-
BS_E3_REISSUE_GOODS: processBsE3ReissueGoods(templateColumns),
|
|
953
|
-
ACTUAL_RECEIPT_PAYMENT: processSingleField
|
|
954
|
-
};
|
|
955
|
-
return templateColumns.reduce(function (cur, nex) {
|
|
956
|
-
var config = type === 'init' ? nex.componentConfig : {};
|
|
957
|
-
var processFunc = componentProcessors[nex.workOrderComponentType](getValue);
|
|
958
|
-
if (processFunc) {
|
|
959
|
-
return __assign(__assign({}, cur), processFunc(nex, config));
|
|
960
|
-
}
|
|
961
|
-
return cur; // 如果没有找到处理函数,返回当前累积对象
|
|
962
|
-
}, {});
|
|
963
|
-
};
|
|
964
|
-
};
|
|
965
|
-
exports["default"] = transformWorkOrderData;
|