@kmkf-fe-packages/basic-components 2.2.12 → 2.3.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -8,6 +8,8 @@ var icons = require('@ant-design/icons');
|
|
|
8
8
|
var request = require('umi-request');
|
|
9
9
|
var reactCopyToClipboard = require('react-copy-to-clipboard');
|
|
10
10
|
var kmkfUtils = require('@kmkf-fe-packages/kmkf-utils');
|
|
11
|
+
var every = require('lodash/every');
|
|
12
|
+
var maxBy = require('lodash/maxBy');
|
|
11
13
|
var lodash = require('lodash');
|
|
12
14
|
var ahooks = require('ahooks');
|
|
13
15
|
var zhCN = require('antd/lib/locale/zh_CN');
|
|
@@ -20,6 +22,8 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
20
22
|
|
|
21
23
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
24
|
var request__default = /*#__PURE__*/_interopDefaultLegacy(request);
|
|
25
|
+
var every__default = /*#__PURE__*/_interopDefaultLegacy(every);
|
|
26
|
+
var maxBy__default = /*#__PURE__*/_interopDefaultLegacy(maxBy);
|
|
23
27
|
var zhCN__default = /*#__PURE__*/_interopDefaultLegacy(zhCN);
|
|
24
28
|
var pubsub__default = /*#__PURE__*/_interopDefaultLegacy(pubsub);
|
|
25
29
|
var zh_CN__default = /*#__PURE__*/_interopDefaultLegacy(zh_CN);
|
|
@@ -8059,6 +8063,1810 @@ function withFormItem(WrappedComponent) {
|
|
|
8059
8063
|
*/
|
|
8060
8064
|
var extendRequest = request.extend({});
|
|
8061
8065
|
|
|
8066
|
+
var updateWorkTypeKeys = {
|
|
8067
|
+
BASIC_GRADE: 'basicGrade',
|
|
8068
|
+
TRADE_ID_INPUT: 'tradeId',
|
|
8069
|
+
SHOP_NAME_INPUT: 'shopName',
|
|
8070
|
+
RECEIVER_NAME_INPUT: 'receiveName',
|
|
8071
|
+
RECEIVER_MOBILE_INPUT: 'receiveMobile',
|
|
8072
|
+
TRADE_CREATE_DATETIME: 'tradeCreateDateTime',
|
|
8073
|
+
TRADE_PAYMENT_DATETIME: 'tradePaymentDateTime',
|
|
8074
|
+
TRADE_DELIVERY_DATETIME: 'tradeDeliveryDateTime',
|
|
8075
|
+
TRADE_CLOSING_DATETIME: 'tradeClosingDateTime',
|
|
8076
|
+
TRADE_SIGNING_DATETIME: 'tradeSigningDateTime',
|
|
8077
|
+
ACTUAL_PAYMENT: 'actualPayment',
|
|
8078
|
+
SYSTEM_ORDER_NO: 'systemOrderNo',
|
|
8079
|
+
BS_SIGNING_TIME: 'bsSigningTime',
|
|
8080
|
+
BS_SEND_TIME: 'bsSendTime',
|
|
8081
|
+
BS_TRADE_PAYMENT_TIME: 'bsTradePaymentTime',
|
|
8082
|
+
BS_NET_RECEIPTS: 'bsNetReceipts',
|
|
8083
|
+
BS_PACKAGE_WEIGHT: 'bsPackageWeight',
|
|
8084
|
+
BS_DEPOSIT: 'bsDeposit',
|
|
8085
|
+
NEW_PAYMENT_STATUS: 'newPaymentStatus',
|
|
8086
|
+
BUSINESS_ORDER_NO: 'businessOrderNo',
|
|
8087
|
+
PAYMENT_VOUCHER_CODE: 'paymentVoucherCode',
|
|
8088
|
+
ACTUAL_RECEIPT_PAYMENT: 'actualReceiptPayment',
|
|
8089
|
+
WDT_SHOP: 'shopCode'
|
|
8090
|
+
};
|
|
8091
|
+
var systemOrderMap = {
|
|
8092
|
+
BS_SYSTEM_ORDER: {
|
|
8093
|
+
no: 'bsSystemOrderNo',
|
|
8094
|
+
ids: 'bsSystemSelectIds',
|
|
8095
|
+
order: 'bsSystemShowOrder'
|
|
8096
|
+
},
|
|
8097
|
+
KM_SYSTEM_ORDER: {
|
|
8098
|
+
no: 'kmSystemOrderNo',
|
|
8099
|
+
ids: 'kmSystemSelectIds',
|
|
8100
|
+
order: 'kmSystemShowOrder'
|
|
8101
|
+
},
|
|
8102
|
+
WLN_SYSTEM_ORDER: {
|
|
8103
|
+
no: 'wlnSystemOrderNo',
|
|
8104
|
+
ids: 'wlnSystemSelectIds',
|
|
8105
|
+
order: 'wlnSystemShowOrder'
|
|
8106
|
+
},
|
|
8107
|
+
WDT_SYSTEM_ORDER: {
|
|
8108
|
+
no: 'wdtSystemOrderNo',
|
|
8109
|
+
ids: 'wdtSystemSelectIds',
|
|
8110
|
+
order: 'wdtSystemShowOrder'
|
|
8111
|
+
},
|
|
8112
|
+
BS_E3_SYSTEM_ORDER: {
|
|
8113
|
+
no: 'bsE3SystemOrderNo',
|
|
8114
|
+
ids: 'bsE3SystemSelectIds',
|
|
8115
|
+
order: 'bsE3SystemShowOrder'
|
|
8116
|
+
},
|
|
8117
|
+
GY_SYSTEM_ORDER: {
|
|
8118
|
+
no: 'gySystemOrderNo',
|
|
8119
|
+
ids: 'gySystemSelectIds',
|
|
8120
|
+
order: 'gySystemShowOrder'
|
|
8121
|
+
},
|
|
8122
|
+
JST_SYSTEM_ORDER: {
|
|
8123
|
+
no: 'jstSystemOrderNo',
|
|
8124
|
+
ids: 'jstSystemSelectIds',
|
|
8125
|
+
order: 'jstSystemShowOrder'
|
|
8126
|
+
}
|
|
8127
|
+
};
|
|
8128
|
+
//直接将key component 添加到 transformWorkOrderData中的componentProcessors
|
|
8129
|
+
var processSingleFieldTypeMapping = {
|
|
8130
|
+
SKX_OUTBOUND_NOTICE_NO: 'skxOutboundNoticeNo',
|
|
8131
|
+
SKX_SHOP_NAME: 'skxShopName',
|
|
8132
|
+
SKX_WAREHOUSE: 'skxWarehouse',
|
|
8133
|
+
SKX_ORDER_TYPE: 'skxOrderType',
|
|
8134
|
+
SKX_ORDER_STATUS: 'skxOrderStatus',
|
|
8135
|
+
SKX_CREATE_TIME: 'dateTime'
|
|
8136
|
+
};
|
|
8137
|
+
var jsonParseSecurity = function jsonParseSecurity(value, securityValue) {
|
|
8138
|
+
try {
|
|
8139
|
+
return JSON.parse(value);
|
|
8140
|
+
} catch (e) {
|
|
8141
|
+
// console.error('JSON解析异常', value, typeof value);
|
|
8142
|
+
return securityValue;
|
|
8143
|
+
}
|
|
8144
|
+
};
|
|
8145
|
+
var transTextToNumber = function transTextToNumber(value) {
|
|
8146
|
+
return value ? +value : value;
|
|
8147
|
+
};
|
|
8148
|
+
var formatPictures = function formatPictures(pictures) {
|
|
8149
|
+
pictures = pictures.replace(/[\[\]]/g, '');
|
|
8150
|
+
pictures = pictures.replace(/\s/g, '');
|
|
8151
|
+
pictures = pictures ? pictures.split(',') : [];
|
|
8152
|
+
return pictures;
|
|
8153
|
+
};
|
|
8154
|
+
var getItemValue = function getItemValue(item) {
|
|
8155
|
+
return function (key) {
|
|
8156
|
+
return item.jsonMap[key];
|
|
8157
|
+
};
|
|
8158
|
+
};
|
|
8159
|
+
var processRadio = function processRadio(getValue) {
|
|
8160
|
+
return function (nex, config) {
|
|
8161
|
+
var radio, radioOther;
|
|
8162
|
+
if ((config === null || config === void 0 ? void 0 : config.radio) && (config === null || config === void 0 ? void 0 : config.radio) === '其他') {
|
|
8163
|
+
radio = config.showOther ? config.radio : undefined;
|
|
8164
|
+
radioOther = config.showOther ? config.radioOther : undefined;
|
|
8165
|
+
}
|
|
8166
|
+
if ((config === null || config === void 0 ? void 0 : config.radio) && (config === null || config === void 0 ? void 0 : config.radio) !== '其他') {
|
|
8167
|
+
radio = ((config === null || config === void 0 ? void 0 : config.options) || []).some(function (t) {
|
|
8168
|
+
return t.value === (config === null || config === void 0 ? void 0 : config.radio);
|
|
8169
|
+
}) ? config.radio : undefined;
|
|
8170
|
+
}
|
|
8171
|
+
return _defineProperty({}, nex.uniqueKey, getValue("".concat(nex.uniqueKey, "_radio")) || radio);
|
|
8172
|
+
};
|
|
8173
|
+
};
|
|
8174
|
+
var processInput = function processInput(getValue) {
|
|
8175
|
+
return function (nex, config) {
|
|
8176
|
+
var _getValue;
|
|
8177
|
+
return _defineProperty({}, nex.uniqueKey, (_getValue = getValue("".concat(nex.uniqueKey, "_input"))) !== null && _getValue !== void 0 ? _getValue : config === null || config === void 0 ? void 0 : config.input);
|
|
8178
|
+
};
|
|
8179
|
+
};
|
|
8180
|
+
var processNumericalCalculation = function processNumericalCalculation(getValue) {
|
|
8181
|
+
return function (nex, config) {
|
|
8182
|
+
var _getValue2;
|
|
8183
|
+
return _defineProperty({}, nex.uniqueKey, (_getValue2 = getValue("".concat(nex.uniqueKey, "_numericalCalculation"))) !== null && _getValue2 !== void 0 ? _getValue2 : config === null || config === void 0 ? void 0 : config.numericalCalculation);
|
|
8184
|
+
};
|
|
8185
|
+
};
|
|
8186
|
+
var processTextarea = function processTextarea(getValue) {
|
|
8187
|
+
return function (nex, config) {
|
|
8188
|
+
return _defineProperty({}, nex.uniqueKey, getValue("".concat(nex.uniqueKey, "_textarea")) || (config === null || config === void 0 ? void 0 : config.textarea));
|
|
8189
|
+
};
|
|
8190
|
+
};
|
|
8191
|
+
var processSelect = function processSelect(getValue) {
|
|
8192
|
+
return function (nex, config) {
|
|
8193
|
+
var select = ((config === null || config === void 0 ? void 0 : config.options) || []).some(function (item) {
|
|
8194
|
+
return item.value === (config === null || config === void 0 ? void 0 : config.select);
|
|
8195
|
+
}) ? config.select : undefined;
|
|
8196
|
+
return _defineProperty({}, nex.uniqueKey, getValue("".concat(nex.uniqueKey, "_select")) || select);
|
|
8197
|
+
};
|
|
8198
|
+
};
|
|
8199
|
+
var gyPaymentMethod = function gyPaymentMethod(getValue) {
|
|
8200
|
+
return function (nex, config) {
|
|
8201
|
+
return _defineProperty({}, nex.uniqueKey, getValue("".concat(nex.uniqueKey, "_gyPaymentMethod")));
|
|
8202
|
+
};
|
|
8203
|
+
};
|
|
8204
|
+
var processRate = function processRate(getValue) {
|
|
8205
|
+
return function (nex, config) {
|
|
8206
|
+
return _defineProperty({}, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_rate")), []));
|
|
8207
|
+
};
|
|
8208
|
+
};
|
|
8209
|
+
var processFile = function processFile(getValue) {
|
|
8210
|
+
return function (nex, config) {
|
|
8211
|
+
return _defineProperty({}, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_file")), []));
|
|
8212
|
+
};
|
|
8213
|
+
};
|
|
8214
|
+
var processKmVideo = function processKmVideo(getValue) {
|
|
8215
|
+
return function (nex, config) {
|
|
8216
|
+
return _defineProperty({}, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_kmVideo")), []));
|
|
8217
|
+
};
|
|
8218
|
+
};
|
|
8219
|
+
var processPosting = function processPosting(getValue) {
|
|
8220
|
+
return function (nex, config) {
|
|
8221
|
+
var address = [transTextToNumber(getValue("".concat(nex.uniqueKey, "_postingProvince"))), transTextToNumber(getValue("".concat(nex.uniqueKey, "_postingCity")))];
|
|
8222
|
+
var interceptDistrict = transTextToNumber(getValue("".concat(nex.uniqueKey, "_postingDistrict")));
|
|
8223
|
+
interceptDistrict && address.push(interceptDistrict);
|
|
8224
|
+
address = every__default['default'](address, function (item) {
|
|
8225
|
+
return !item;
|
|
8226
|
+
}) ? [] : address;
|
|
8227
|
+
return _defineProperty({}, nex.uniqueKey, {
|
|
8228
|
+
postingAddress: address,
|
|
8229
|
+
postingDetail: getValue("".concat(nex.uniqueKey, "_postingDetail")),
|
|
8230
|
+
postingReceiverName: getValue("".concat(nex.uniqueKey, "_postingReceiverName")),
|
|
8231
|
+
postingReceiverMobile: getValue("".concat(nex.uniqueKey, "_postingReceiverMobile"))
|
|
8232
|
+
});
|
|
8233
|
+
};
|
|
8234
|
+
};
|
|
8235
|
+
var processBuyerNickInput = function processBuyerNickInput(getValue) {
|
|
8236
|
+
return function (nex, config) {
|
|
8237
|
+
return _defineProperty({}, nex.uniqueKey, {
|
|
8238
|
+
buyerNick: getValue("".concat(nex.uniqueKey, "_buyerNick")),
|
|
8239
|
+
buyerOpenUid: getValue("".concat(nex.uniqueKey, "_buyerOpenUid"))
|
|
8240
|
+
});
|
|
8241
|
+
};
|
|
8242
|
+
};
|
|
8243
|
+
var processAliPayInput = function processAliPayInput(getValue) {
|
|
8244
|
+
return function (nex, config) {
|
|
8245
|
+
var _ref12;
|
|
8246
|
+
return _ref12 = {}, _defineProperty(_ref12, nex.uniqueKey, {
|
|
8247
|
+
name: getValue("".concat(nex.uniqueKey, "_alipayName")),
|
|
8248
|
+
user: getValue("".concat(nex.uniqueKey, "_alipayAccount"))
|
|
8249
|
+
}), _defineProperty(_ref12, "".concat(nex.uniqueKey, "_alipayName"), getValue("".concat(nex.uniqueKey, "_alipayName"))), _defineProperty(_ref12, "".concat(nex.uniqueKey, "_alipayAccount"), getValue("".concat(nex.uniqueKey, "_alipayAccount"))), _ref12;
|
|
8250
|
+
};
|
|
8251
|
+
};
|
|
8252
|
+
var processCheckbox = function processCheckbox(getValue) {
|
|
8253
|
+
return function (nex, config) {
|
|
8254
|
+
var _config$checkbox, _config$checkbox2, _config$checkbox3, _config$checkbox4;
|
|
8255
|
+
var checkbox = [],
|
|
8256
|
+
checkboxOther = '';
|
|
8257
|
+
if ((config === null || config === void 0 ? void 0 : (_config$checkbox = config.checkbox) === null || _config$checkbox === void 0 ? void 0 : _config$checkbox.length) && (config === null || config === void 0 ? void 0 : (_config$checkbox2 = config.checkbox) === null || _config$checkbox2 === void 0 ? void 0 : _config$checkbox2.includes('其他'))) {
|
|
8258
|
+
checkbox = config.showOther ? config.checkbox : config.checkbox.filter(function (t) {
|
|
8259
|
+
return t !== '其他';
|
|
8260
|
+
});
|
|
8261
|
+
checkboxOther = config.showOther ? config.checkboxOther : undefined;
|
|
8262
|
+
}
|
|
8263
|
+
if ((config === null || config === void 0 ? void 0 : (_config$checkbox3 = config.checkbox) === null || _config$checkbox3 === void 0 ? void 0 : _config$checkbox3.length) && !(config === null || config === void 0 ? void 0 : (_config$checkbox4 = config.checkbox) === null || _config$checkbox4 === void 0 ? void 0 : _config$checkbox4.includes('其他'))) {
|
|
8264
|
+
checkbox = ((config === null || config === void 0 ? void 0 : config.options) || []).reduce(function (prv, next) {
|
|
8265
|
+
if (config.checkbox.includes(next.value)) {
|
|
8266
|
+
prv.push(next.value);
|
|
8267
|
+
}
|
|
8268
|
+
return prv;
|
|
8269
|
+
}, []);
|
|
8270
|
+
}
|
|
8271
|
+
return _defineProperty({}, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_checkbox")), '') || checkbox);
|
|
8272
|
+
};
|
|
8273
|
+
};
|
|
8274
|
+
var processDatetime = function processDatetime(getValue) {
|
|
8275
|
+
return function (nex, config) {
|
|
8276
|
+
var v = getValue("".concat(nex.uniqueKey, "_dateTime"));
|
|
8277
|
+
return _defineProperty({}, nex.uniqueKey, jsonParseSecurity(v, v) || (config === null || config === void 0 ? void 0 : config.dateTime));
|
|
8278
|
+
};
|
|
8279
|
+
};
|
|
8280
|
+
var processPicture = function processPicture(getValue) {
|
|
8281
|
+
return function (nex, config) {
|
|
8282
|
+
var v = getValue("".concat(nex.uniqueKey, "_picture"));
|
|
8283
|
+
return _defineProperty({}, nex.uniqueKey, v ? formatPictures(v).map(function (item) {
|
|
8284
|
+
return "".concat(item);
|
|
8285
|
+
}) : (config === null || config === void 0 ? void 0 : config.picture) || []);
|
|
8286
|
+
};
|
|
8287
|
+
};
|
|
8288
|
+
var processPicturePro = function processPicturePro(getValue) {
|
|
8289
|
+
return function (nex, config) {
|
|
8290
|
+
var v = getValue("".concat(nex.uniqueKey, "_pictureProList"));
|
|
8291
|
+
var picturePro = jsonParseSecurity(v, v || []) || [];
|
|
8292
|
+
return _defineProperty({}, nex.uniqueKey, picturePro ? picturePro.map(function (item) {
|
|
8293
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
8294
|
+
url: item.url ? formatPictures(item.url)[0] : ''
|
|
8295
|
+
});
|
|
8296
|
+
}) : (config === null || config === void 0 ? void 0 : config.pictureProList) || []);
|
|
8297
|
+
};
|
|
8298
|
+
};
|
|
8299
|
+
var wdtTags = function wdtTags(getValue) {
|
|
8300
|
+
return function (nex, config) {
|
|
8301
|
+
return _defineProperty({}, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_wdtTags")), []));
|
|
8302
|
+
};
|
|
8303
|
+
};
|
|
8304
|
+
var processBasicMultSelect = function processBasicMultSelect(getValue) {
|
|
8305
|
+
return function (nex, config) {
|
|
8306
|
+
var v = getValue("".concat(nex.uniqueKey, "_basicMultSelect"));
|
|
8307
|
+
var basicMultSelect = ((config === null || config === void 0 ? void 0 : config.options) || []).reduce(function (prv, next) {
|
|
8308
|
+
var _config$basicMultSele;
|
|
8309
|
+
if (config === null || config === void 0 ? void 0 : (_config$basicMultSele = config.basicMultSelect) === null || _config$basicMultSele === void 0 ? void 0 : _config$basicMultSele.includes(next.value)) {
|
|
8310
|
+
prv.push(next.value);
|
|
8311
|
+
}
|
|
8312
|
+
return prv;
|
|
8313
|
+
}, []);
|
|
8314
|
+
return _defineProperty({}, nex.uniqueKey, jsonParseSecurity(v, '') || basicMultSelect);
|
|
8315
|
+
};
|
|
8316
|
+
};
|
|
8317
|
+
var processMultSelect = function processMultSelect(getValue) {
|
|
8318
|
+
return function (nex, config) {
|
|
8319
|
+
var v = getValue("".concat(nex.uniqueKey, "_multSelect"));
|
|
8320
|
+
var parseValue = jsonParseSecurity(v, v || []) || [];
|
|
8321
|
+
return _defineProperty({}, nex.uniqueKey, parseValue === null || parseValue === void 0 ? void 0 : parseValue.map(function (item) {
|
|
8322
|
+
return item.actived;
|
|
8323
|
+
}));
|
|
8324
|
+
};
|
|
8325
|
+
};
|
|
8326
|
+
var processBasicAddress = function processBasicAddress(getValue) {
|
|
8327
|
+
return function (nex, config) {
|
|
8328
|
+
var address = [transTextToNumber(getValue("".concat(nex.uniqueKey, "_basicProvince"))), transTextToNumber(getValue("".concat(nex.uniqueKey, "_basicCity"))), transTextToNumber(getValue("".concat(nex.uniqueKey, "_basicDistrict")))];
|
|
8329
|
+
address = every__default['default'](address, function (item) {
|
|
8330
|
+
return !item;
|
|
8331
|
+
}) ? [] : address;
|
|
8332
|
+
return _defineProperty({}, nex.uniqueKey, address);
|
|
8333
|
+
};
|
|
8334
|
+
};
|
|
8335
|
+
var processReceiverAddressInput = function processReceiverAddressInput(getValue) {
|
|
8336
|
+
return function (nex, config) {
|
|
8337
|
+
var address = [transTextToNumber(getValue("".concat(nex.uniqueKey, "_province"))), transTextToNumber(getValue("".concat(nex.uniqueKey, "_city"))), transTextToNumber(getValue("".concat(nex.uniqueKey, "_district")))];
|
|
8338
|
+
address = every__default['default'](address, function (item) {
|
|
8339
|
+
return !item;
|
|
8340
|
+
}) ? [] : address;
|
|
8341
|
+
return _defineProperty({}, nex.uniqueKey, {
|
|
8342
|
+
address: address,
|
|
8343
|
+
detail: getValue("".concat(nex.uniqueKey, "_address"))
|
|
8344
|
+
});
|
|
8345
|
+
};
|
|
8346
|
+
};
|
|
8347
|
+
var processSubForm = function processSubForm(getValue) {
|
|
8348
|
+
return function (nex, config) {
|
|
8349
|
+
return _defineProperty({}, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_productList")), []));
|
|
8350
|
+
};
|
|
8351
|
+
};
|
|
8352
|
+
var processExpressLogisticsSelect = function processExpressLogisticsSelect(getValue) {
|
|
8353
|
+
return function (nex, config) {
|
|
8354
|
+
var _ref23;
|
|
8355
|
+
return _ref23 = {}, _defineProperty(_ref23, nex.uniqueKey, {
|
|
8356
|
+
company: getValue("".concat(nex.uniqueKey, "_expressLogisticsCompany")),
|
|
8357
|
+
order: getValue("".concat(nex.uniqueKey, "_expressLogisticsCode"))
|
|
8358
|
+
}), _defineProperty(_ref23, "".concat(nex.uniqueKey, "_expressLogisticsCompany"), getValue("".concat(nex.uniqueKey, "_expressLogisticsCompany"))), _defineProperty(_ref23, "".concat(nex.uniqueKey, "_expressLogisticsCode"), getValue("".concat(nex.uniqueKey, "_expressLogisticsCode"))), _ref23;
|
|
8359
|
+
};
|
|
8360
|
+
};
|
|
8361
|
+
var processReturnLogisticsSelect = function processReturnLogisticsSelect(getValue) {
|
|
8362
|
+
return function (nex, config) {
|
|
8363
|
+
var _ref24;
|
|
8364
|
+
return _ref24 = {}, _defineProperty(_ref24, nex.uniqueKey, {
|
|
8365
|
+
company: getValue("".concat(nex.uniqueKey, "_returnLogisticsCompany")),
|
|
8366
|
+
order: getValue("".concat(nex.uniqueKey, "_returnLogisticsCode"))
|
|
8367
|
+
}), _defineProperty(_ref24, "".concat(nex.uniqueKey, "_returnLogisticsCompany"), getValue("".concat(nex.uniqueKey, "_returnLogisticsCompany"))), _defineProperty(_ref24, "".concat(nex.uniqueKey, "_returnLogisticsCode"), getValue("".concat(nex.uniqueKey, "_returnLogisticsCode"))), _ref24;
|
|
8368
|
+
};
|
|
8369
|
+
};
|
|
8370
|
+
var processRemarkInput = function processRemarkInput(getValue) {
|
|
8371
|
+
return function (nex, config) {
|
|
8372
|
+
var v = getValue("".concat(nex.uniqueKey, "_flag"));
|
|
8373
|
+
var remark = getValue("".concat(nex.uniqueKey, "_remark"));
|
|
8374
|
+
return _defineProperty({}, nex.uniqueKey, {
|
|
8375
|
+
flag: v ? +v : (config === null || config === void 0 ? void 0 : config.flag) ? +(config === null || config === void 0 ? void 0 : config.flag) : '',
|
|
8376
|
+
remark: remark || (config === null || config === void 0 ? void 0 : config.remark) || ''
|
|
8377
|
+
});
|
|
8378
|
+
};
|
|
8379
|
+
};
|
|
8380
|
+
var processStatus = function processStatus(getValue) {
|
|
8381
|
+
return function (nex, config) {
|
|
8382
|
+
var _ref26;
|
|
8383
|
+
var customerService = getValue("".concat(nex.uniqueKey, "_customerService"));
|
|
8384
|
+
return _ref26 = {}, _defineProperty(_ref26, nex.uniqueKey, {
|
|
8385
|
+
status: getValue("".concat(nex.uniqueKey, "_status")) || (config === null || config === void 0 ? void 0 : config.status),
|
|
8386
|
+
customerService: jsonParseSecurity(customerService, customerService)
|
|
8387
|
+
}), _defineProperty(_ref26, "".concat(nex.uniqueKey, "_processTime"), getValue('processTime')), _defineProperty(_ref26, "".concat(nex.uniqueKey, "_lastProcessingTime"), getValue('lastProcessingTime')), _ref26;
|
|
8388
|
+
};
|
|
8389
|
+
};
|
|
8390
|
+
var processOrdinaryInvoice = function processOrdinaryInvoice(getValue) {
|
|
8391
|
+
return function (nex, config) {
|
|
8392
|
+
var _ref27;
|
|
8393
|
+
var ordinaryMoney = getValue("".concat(nex.uniqueKey, "_ordinaryMoney"));
|
|
8394
|
+
var ordinarySerial = getValue("".concat(nex.uniqueKey, "_ordinarySerial"));
|
|
8395
|
+
var ordinaryTaitou = getValue("".concat(nex.uniqueKey, "_ordinaryTaitou"));
|
|
8396
|
+
return _ref27 = {}, _defineProperty(_ref27, nex.uniqueKey, {
|
|
8397
|
+
ordinaryMoney: ordinaryMoney,
|
|
8398
|
+
ordinarySerial: ordinarySerial,
|
|
8399
|
+
ordinaryTaitou: ordinaryTaitou
|
|
8400
|
+
}), _defineProperty(_ref27, "".concat(nex.uniqueKey, "_ordinaryMoney"), ordinaryMoney ? Number(ordinaryMoney).toFixed(2) : null), _defineProperty(_ref27, "".concat(nex.uniqueKey, "_ordinarySerial"), ordinarySerial), _defineProperty(_ref27, "".concat(nex.uniqueKey, "_ordinaryTaitou"), ordinaryTaitou), _ref27;
|
|
8401
|
+
};
|
|
8402
|
+
};
|
|
8403
|
+
var processLogisticsInterception = function processLogisticsInterception(getValue) {
|
|
8404
|
+
return function (nex, config) {
|
|
8405
|
+
var address = [transTextToNumber(getValue("".concat(nex.uniqueKey, "_interceptProvince"))), transTextToNumber(getValue("".concat(nex.uniqueKey, "_interceptCity")))];
|
|
8406
|
+
//兼容地址是只有省市的
|
|
8407
|
+
var interceptDistrict = transTextToNumber(getValue("".concat(nex.uniqueKey, "_interceptDistrict")));
|
|
8408
|
+
interceptDistrict && address.push(interceptDistrict);
|
|
8409
|
+
address = every__default['default'](address, function (item) {
|
|
8410
|
+
return !item;
|
|
8411
|
+
}) ? [] : address;
|
|
8412
|
+
var subFields = ['interceptCompany', 'interceptCode', 'interceptType', 'interceptSenderMobile', 'interceptDetail', 'interceptReceiverName', 'interceptReceiverMobile', 'interceptLogisticsStatus', 'interceptLogisticsStatusOther', 'interceptLogisticsSnapshot', 'qySelfInterceptLogisticsStatus', 'interceptLogisticsUserKCode', 'interceptLogisticsUserSecretKey'];
|
|
8413
|
+
var map = subFields.reduce(function (cur, nxt) {
|
|
8414
|
+
return _objectSpread2(_objectSpread2({}, cur), {}, _defineProperty({}, nxt, getValue("".concat(nex.uniqueKey, "_").concat(nxt))));
|
|
8415
|
+
}, {});
|
|
8416
|
+
return _defineProperty({}, nex.uniqueKey, _objectSpread2(_objectSpread2({}, map), {}, {
|
|
8417
|
+
interceptAddress: address,
|
|
8418
|
+
interceptLogisticsApiStatus: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_interceptLogisticsApiStatus")), {})
|
|
8419
|
+
}));
|
|
8420
|
+
};
|
|
8421
|
+
};
|
|
8422
|
+
var processLogisticsInterceptionMore = function processLogisticsInterceptionMore(getValue) {
|
|
8423
|
+
return function (nex, config) {
|
|
8424
|
+
return _defineProperty({}, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_logisticsInterceptList")), [{}]));
|
|
8425
|
+
};
|
|
8426
|
+
};
|
|
8427
|
+
var processLogisticsTrajectory = function processLogisticsTrajectory(getValue) {
|
|
8428
|
+
return function (nex, config) {
|
|
8429
|
+
var subFields = ['trajectoryCompany', 'trajectoryCode', 'trajectorySnapshot', 'trajectoryPhone', 'trajectoryApiStatus'];
|
|
8430
|
+
var map = subFields.reduce(function (cur, nxt) {
|
|
8431
|
+
return nxt === 'trajectoryApiStatus' ? _objectSpread2(_objectSpread2({}, cur), {}, _defineProperty({}, nxt, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_trajectoryApiStatus")), {}))) : _objectSpread2(_objectSpread2({}, cur), {}, _defineProperty({}, nxt, getValue("".concat(nex.uniqueKey, "_").concat(nxt))));
|
|
8432
|
+
}, {});
|
|
8433
|
+
return _defineProperty({}, nex.uniqueKey, map);
|
|
8434
|
+
};
|
|
8435
|
+
};
|
|
8436
|
+
var processLogisticsTrajectoryMore = function processLogisticsTrajectoryMore(getValue) {
|
|
8437
|
+
return function (nex, config) {
|
|
8438
|
+
return _defineProperty({}, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_trajectoryList")), []));
|
|
8439
|
+
};
|
|
8440
|
+
};
|
|
8441
|
+
var processGoods = function processGoods(getValue) {
|
|
8442
|
+
return function (nex, config) {
|
|
8443
|
+
return _defineProperty({}, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_itemList")), []));
|
|
8444
|
+
};
|
|
8445
|
+
};
|
|
8446
|
+
var processItemSelectThird = function processItemSelectThird(getValue) {
|
|
8447
|
+
return function (nex, config) {
|
|
8448
|
+
var itemList = jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_itemList")), []);
|
|
8449
|
+
itemList.forEach(function (key) {
|
|
8450
|
+
key.itemId = key.itemId || key.supplierItemOuterId;
|
|
8451
|
+
});
|
|
8452
|
+
return _defineProperty({}, nex.uniqueKey, itemList);
|
|
8453
|
+
};
|
|
8454
|
+
};
|
|
8455
|
+
var processEnterPrisePayment = function processEnterPrisePayment(getValue) {
|
|
8456
|
+
return function (nex, config) {
|
|
8457
|
+
var _ref34;
|
|
8458
|
+
var subFields = ['enterprisePaymentAlipayNick', 'enterprisePaymentAlipayNo', 'enterprisePaymentBuyerNick', 'enterprisePaymentBuyerOpenUid', 'enterprisePaymentRefundFee', 'enterprisePaymentStatus', 'enterprisePaymentTid'];
|
|
8459
|
+
var map = subFields.reduce(function (cur, nxt) {
|
|
8460
|
+
return _objectSpread2(_objectSpread2({}, cur), {}, _defineProperty({}, nxt, getValue("".concat(nex.uniqueKey, "_").concat(nxt))));
|
|
8461
|
+
}, {});
|
|
8462
|
+
return _ref34 = {}, _defineProperty(_ref34, nex.uniqueKey, map), _defineProperty(_ref34, "".concat(nex.uniqueKey, "_enterprisePaymentAlipayNick"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentAlipayNick"))), _defineProperty(_ref34, "".concat(nex.uniqueKey, "_enterprisePaymentAlipayNo"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentAlipayNo"))), _defineProperty(_ref34, "".concat(nex.uniqueKey, "_enterprisePaymentBuyerNick"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentBuyerNick"))), _defineProperty(_ref34, "".concat(nex.uniqueKey, "_enterprisePaymentRefundFee"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentRefundFee"))), _defineProperty(_ref34, "".concat(nex.uniqueKey, "_enterprisePaymentStatus"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentStatus"))), _defineProperty(_ref34, "".concat(nex.uniqueKey, "_enterprisePaymentTime"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentTime"))), _defineProperty(_ref34, "".concat(nex.uniqueKey, "_enterprisePaymentTid"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentTid"))), _ref34;
|
|
8463
|
+
};
|
|
8464
|
+
};
|
|
8465
|
+
var processJstLogistics = function processJstLogistics(getValue) {
|
|
8466
|
+
return function (nex, config) {
|
|
8467
|
+
var initValue = [{
|
|
8468
|
+
logisticsCompany: null,
|
|
8469
|
+
logisticsCode: null
|
|
8470
|
+
}];
|
|
8471
|
+
var itemList = jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_jstItemList")), initValue);
|
|
8472
|
+
return _defineProperty({}, nex.uniqueKey, (itemList === null || itemList === void 0 ? void 0 : itemList.length) ? itemList : initValue);
|
|
8473
|
+
};
|
|
8474
|
+
};
|
|
8475
|
+
var processJstItemSelectThird = function processJstItemSelectThird(getValue) {
|
|
8476
|
+
return function (nex, config) {
|
|
8477
|
+
var itemList = jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_jstItemList")), []);
|
|
8478
|
+
return _defineProperty({}, nex.uniqueKey, itemList);
|
|
8479
|
+
};
|
|
8480
|
+
};
|
|
8481
|
+
var processJstSupply = function processJstSupply(getValue) {
|
|
8482
|
+
return function (nex, config) {
|
|
8483
|
+
var initValue = [{
|
|
8484
|
+
supplyId: null
|
|
8485
|
+
}];
|
|
8486
|
+
var itemList = jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_jstItemList")), initValue);
|
|
8487
|
+
return _defineProperty({}, nex.uniqueKey, (itemList === null || itemList === void 0 ? void 0 : itemList.length) ? itemList : initValue);
|
|
8488
|
+
};
|
|
8489
|
+
};
|
|
8490
|
+
var processJstSendGood = function processJstSendGood(getValue) {
|
|
8491
|
+
return function (nex, config) {
|
|
8492
|
+
var initValue = [{
|
|
8493
|
+
sendName: '',
|
|
8494
|
+
sendId: '',
|
|
8495
|
+
sendSnapshotId: ''
|
|
8496
|
+
}];
|
|
8497
|
+
var itemList = jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_jstItemList")), initValue);
|
|
8498
|
+
return _defineProperty({}, nex.uniqueKey, (itemList === null || itemList === void 0 ? void 0 : itemList.length) ? itemList : initValue);
|
|
8499
|
+
};
|
|
8500
|
+
};
|
|
8501
|
+
var processBsMemo = function processBsMemo(getValue) {
|
|
8502
|
+
return function (nex, config) {
|
|
8503
|
+
return _defineProperty({}, nex.uniqueKey, {
|
|
8504
|
+
remark: getValue("".concat(nex.uniqueKey, "_bsRemark")),
|
|
8505
|
+
flag: getValue("".concat(nex.uniqueKey, "_bsFlag"))
|
|
8506
|
+
});
|
|
8507
|
+
};
|
|
8508
|
+
};
|
|
8509
|
+
var processReissueLogistics = function processReissueLogistics(getValue) {
|
|
8510
|
+
return function (nex, config) {
|
|
8511
|
+
var itemList = jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_reissueLogisticsList")), []);
|
|
8512
|
+
return _defineProperty({}, nex.uniqueKey, itemList);
|
|
8513
|
+
};
|
|
8514
|
+
};
|
|
8515
|
+
var processCallBackStatus = function processCallBackStatus(getValue) {
|
|
8516
|
+
return function (nex, config) {
|
|
8517
|
+
var STATUS_MAP = {
|
|
8518
|
+
REISSUE_STATUS: {
|
|
8519
|
+
status: 'reissueStatusValue',
|
|
8520
|
+
reason: 'reissueReason'
|
|
8521
|
+
},
|
|
8522
|
+
ADJUST_WORK_ORDER_STATUS: {
|
|
8523
|
+
status: 'adjustWorkOrderStatusValue',
|
|
8524
|
+
reason: 'adjustWorkOrderReason'
|
|
8525
|
+
},
|
|
8526
|
+
CREATE_STATUS: {
|
|
8527
|
+
status: 'createStatusValue',
|
|
8528
|
+
reason: 'createReason'
|
|
8529
|
+
},
|
|
8530
|
+
INVOICE_STATUS: {
|
|
8531
|
+
status: 'invoiceStatusValue',
|
|
8532
|
+
reason: 'invoiceReason'
|
|
8533
|
+
},
|
|
8534
|
+
INVOICING_STATUS: {
|
|
8535
|
+
status: 'invoicingStatusValue',
|
|
8536
|
+
reason: 'invoicingReason'
|
|
8537
|
+
},
|
|
8538
|
+
AGREE_REFUND_STATUS: {
|
|
8539
|
+
status: 'agreeRefundStatusValue',
|
|
8540
|
+
reason: 'agreeRefundStatusReason'
|
|
8541
|
+
},
|
|
8542
|
+
REJECT_REFUND_STATUS: {
|
|
8543
|
+
status: 'rejectRefundStatusValue',
|
|
8544
|
+
reason: 'rejectRefundStatusReason'
|
|
8545
|
+
},
|
|
8546
|
+
AGREE_RETURN_GOODS_STATUS: {
|
|
8547
|
+
status: 'agreeReturnGoodsStatusValue',
|
|
8548
|
+
reason: 'agreeReturnGoodsStatusReason'
|
|
8549
|
+
},
|
|
8550
|
+
REJECT_RETURN_GOODS_STATUS: {
|
|
8551
|
+
status: 'rejectReturnGoodsStatusValue',
|
|
8552
|
+
reason: 'rejectReturnGoodsStatusReason'
|
|
8553
|
+
},
|
|
8554
|
+
ERP_AFTER_SALE_STATUS: {
|
|
8555
|
+
status: 'erpAfterSaleStatusValue',
|
|
8556
|
+
reason: 'erpAfterSaleStatusReason'
|
|
8557
|
+
},
|
|
8558
|
+
RETURN_EXCHANGE_GOODS_REVIEW_STATUS: {
|
|
8559
|
+
status: 'returnExchangeGoodsReviewStatusValue',
|
|
8560
|
+
reason: 'returnExchangeGoodsReviewStatusReason'
|
|
8561
|
+
}
|
|
8562
|
+
};
|
|
8563
|
+
return _defineProperty({}, nex.uniqueKey, {
|
|
8564
|
+
status: getValue("".concat(nex.uniqueKey, "_").concat(STATUS_MAP[nex.workOrderComponentType].status)),
|
|
8565
|
+
reason: getValue("".concat(nex.uniqueKey, "_").concat(STATUS_MAP[nex.workOrderComponentType].reason))
|
|
8566
|
+
});
|
|
8567
|
+
};
|
|
8568
|
+
};
|
|
8569
|
+
var processSceneStatus = function processSceneStatus(getValue) {
|
|
8570
|
+
return function (nex, config) {
|
|
8571
|
+
var STATUS_LIST_MAP = {
|
|
8572
|
+
RETURN_GOODS_STATUS: 'returnGoodsStatusList',
|
|
8573
|
+
EXCHANGE_STATUS: 'exchangeReason',
|
|
8574
|
+
WAREHOUSING_STATUS: 'inStockStatusItemList',
|
|
8575
|
+
BS_E3_WAREHOUSING_STATUS: 'bsE3InStockStatusItemList',
|
|
8576
|
+
MSG_STATUS: 'msgStatusValues',
|
|
8577
|
+
WDT_WAREHOUSING_STATUS: 'wdtInStockStatusItemList'
|
|
8578
|
+
};
|
|
8579
|
+
return _defineProperty({}, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_").concat(STATUS_LIST_MAP[nex.workOrderComponentType])), []));
|
|
8580
|
+
};
|
|
8581
|
+
};
|
|
8582
|
+
var processErpLogistics = function processErpLogistics(getValue) {
|
|
8583
|
+
return function (nex, config) {
|
|
8584
|
+
var LogisticsMap = {
|
|
8585
|
+
BS_LOGISTICS: {
|
|
8586
|
+
listKey: 'bsLogisticsList'
|
|
8587
|
+
},
|
|
8588
|
+
WLN_LOGISTICS: {
|
|
8589
|
+
listKey: 'wlnLogisticsList'
|
|
8590
|
+
},
|
|
8591
|
+
WDT_LOGISTICS: {
|
|
8592
|
+
listKey: 'wdtLogisticsList'
|
|
8593
|
+
},
|
|
8594
|
+
BS_E3_LOGISTICS: {
|
|
8595
|
+
listKey: 'bsE3LogisticsList'
|
|
8596
|
+
},
|
|
8597
|
+
KM_LOGISTICS: {
|
|
8598
|
+
listKey: 'kmLogisticsList'
|
|
8599
|
+
},
|
|
8600
|
+
GY_LOGISTICS: {
|
|
8601
|
+
listKey: 'gyLogisticsList'
|
|
8602
|
+
},
|
|
8603
|
+
SKX_LOGISTICS: {
|
|
8604
|
+
listKey: 'skxLogisticsList'
|
|
8605
|
+
}
|
|
8606
|
+
};
|
|
8607
|
+
var initValue = [{
|
|
8608
|
+
logisticsCompany: null,
|
|
8609
|
+
logisticsCode: null
|
|
8610
|
+
}];
|
|
8611
|
+
var itemList = jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_").concat(LogisticsMap[nex.workOrderComponentType].listKey)), initValue);
|
|
8612
|
+
return _defineProperty({}, nex.uniqueKey, (itemList === null || itemList === void 0 ? void 0 : itemList.length) ? itemList : initValue);
|
|
8613
|
+
};
|
|
8614
|
+
};
|
|
8615
|
+
var processErpSendGood = function processErpSendGood(getValue) {
|
|
8616
|
+
return function (nex, config) {
|
|
8617
|
+
var sendGoodMap = {
|
|
8618
|
+
BS_SEND_GOOD: {
|
|
8619
|
+
list: 'bsSendGood'
|
|
8620
|
+
},
|
|
8621
|
+
WLN_SEND_GOOD: {
|
|
8622
|
+
list: 'wlnSendGood'
|
|
8623
|
+
},
|
|
8624
|
+
WDT_SEND_GOOD: {
|
|
8625
|
+
list: 'wdtSendGood'
|
|
8626
|
+
},
|
|
8627
|
+
KM_SEND_GOOD: {
|
|
8628
|
+
list: 'kmSendGood'
|
|
8629
|
+
},
|
|
8630
|
+
BS_E3_SEND_GOOD: {
|
|
8631
|
+
list: 'bsE3SendGood'
|
|
8632
|
+
},
|
|
8633
|
+
GY_SEND_GOOD: {
|
|
8634
|
+
list: 'gySendGood'
|
|
8635
|
+
}
|
|
8636
|
+
};
|
|
8637
|
+
var initValue = [{
|
|
8638
|
+
sendName: '',
|
|
8639
|
+
sendId: ''
|
|
8640
|
+
}];
|
|
8641
|
+
var itemList = jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_").concat(sendGoodMap[nex.workOrderComponentType].list)), initValue);
|
|
8642
|
+
return _defineProperty({}, nex.uniqueKey, (itemList === null || itemList === void 0 ? void 0 : itemList.length) ? itemList : initValue);
|
|
8643
|
+
};
|
|
8644
|
+
};
|
|
8645
|
+
var processBsPosting = function processBsPosting(getValue) {
|
|
8646
|
+
return function (nex, config) {
|
|
8647
|
+
var bsAddress = [transTextToNumber(getValue("".concat(nex.uniqueKey, "_bsPostingProvince"))), transTextToNumber(getValue("".concat(nex.uniqueKey, "_bsPostingCity")))];
|
|
8648
|
+
//兼容地址是只有省市的
|
|
8649
|
+
var bsInterceptDistrict = transTextToNumber(getValue("".concat(nex.uniqueKey, "_bsPostingDistrict")));
|
|
8650
|
+
bsInterceptDistrict && bsAddress.push(bsInterceptDistrict);
|
|
8651
|
+
bsAddress = every__default['default'](bsAddress, function (item) {
|
|
8652
|
+
return !item;
|
|
8653
|
+
}) ? [] : bsAddress;
|
|
8654
|
+
return _defineProperty({}, nex.uniqueKey, {
|
|
8655
|
+
postingAddress: bsAddress,
|
|
8656
|
+
postingDetail: getValue("".concat(nex.uniqueKey, "_bsPostingDetail")),
|
|
8657
|
+
postingReceiverName: getValue("".concat(nex.uniqueKey, "_bsPostingReceiverName")),
|
|
8658
|
+
postingReceiverMobile: getValue("".concat(nex.uniqueKey, "_bsPostingReceiverMobile"))
|
|
8659
|
+
});
|
|
8660
|
+
};
|
|
8661
|
+
};
|
|
8662
|
+
var processBsGoods = function processBsGoods(getValue) {
|
|
8663
|
+
return function (nex, config) {
|
|
8664
|
+
var _values = {
|
|
8665
|
+
bsGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_bsGoods")), []),
|
|
8666
|
+
shopCode: getValue("".concat(nex.uniqueKey, "_shopCode"))
|
|
8667
|
+
};
|
|
8668
|
+
return _defineProperty({}, nex.uniqueKey, _values);
|
|
8669
|
+
};
|
|
8670
|
+
};
|
|
8671
|
+
var processWdtGoods = function processWdtGoods(templateColumns) {
|
|
8672
|
+
return function (getValue) {
|
|
8673
|
+
return function (nex, config) {
|
|
8674
|
+
var _values = {
|
|
8675
|
+
wdtGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_wdtGoods")), []),
|
|
8676
|
+
shopCode: getValue("".concat(nex.uniqueKey, "_shopCode"))
|
|
8677
|
+
};
|
|
8678
|
+
var selectIds = [];
|
|
8679
|
+
var orderNo = '';
|
|
8680
|
+
var tradeId = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
8681
|
+
return col.workOrderComponentType === 'TRADE_ID_INPUT';
|
|
8682
|
+
});
|
|
8683
|
+
if (tradeId) {
|
|
8684
|
+
orderNo = getValue("".concat(tradeId.uniqueKey, "_").concat(updateWorkTypeKeys[tradeId.workOrderComponentType]));
|
|
8685
|
+
}
|
|
8686
|
+
var wdtSystemOrder = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
8687
|
+
return col.workOrderComponentType === 'WDT_SYSTEM_ORDER';
|
|
8688
|
+
});
|
|
8689
|
+
if (wdtSystemOrder) {
|
|
8690
|
+
selectIds = jsonParseSecurity(getValue("".concat(wdtSystemOrder.uniqueKey, "_").concat(systemOrderMap[wdtSystemOrder.workOrderComponentType].ids)), []);
|
|
8691
|
+
}
|
|
8692
|
+
_values.selectIds = selectIds;
|
|
8693
|
+
_values.orderNo = orderNo;
|
|
8694
|
+
return _defineProperty({}, nex.uniqueKey, _values);
|
|
8695
|
+
};
|
|
8696
|
+
};
|
|
8697
|
+
};
|
|
8698
|
+
var processBsE3Goods = function processBsE3Goods(templateColumns) {
|
|
8699
|
+
return function (getValue) {
|
|
8700
|
+
return function (nex, config) {
|
|
8701
|
+
var _values = {
|
|
8702
|
+
bsE3Goods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_bsE3Goods")), []),
|
|
8703
|
+
shopCode: getValue("".concat(nex.uniqueKey, "_shopCode"))
|
|
8704
|
+
};
|
|
8705
|
+
var selectIds = [];
|
|
8706
|
+
var orderNo = '';
|
|
8707
|
+
var tradeId = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
8708
|
+
return col.workOrderComponentType === 'TRADE_ID_INPUT';
|
|
8709
|
+
});
|
|
8710
|
+
if (tradeId) {
|
|
8711
|
+
orderNo = getValue("".concat(tradeId.uniqueKey, "_").concat(updateWorkTypeKeys[tradeId.workOrderComponentType]));
|
|
8712
|
+
}
|
|
8713
|
+
var bsE3SystemOrder = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
8714
|
+
return col.workOrderComponentType === 'BS_E3_SYSTEM_ORDER';
|
|
8715
|
+
});
|
|
8716
|
+
if (bsE3SystemOrder) {
|
|
8717
|
+
selectIds = jsonParseSecurity(getValue("".concat(bsE3SystemOrder.uniqueKey, "_").concat(systemOrderMap[bsE3SystemOrder.workOrderComponentType].ids)), []);
|
|
8718
|
+
}
|
|
8719
|
+
_values.selectIds = selectIds;
|
|
8720
|
+
_values.orderNo = orderNo;
|
|
8721
|
+
return _defineProperty({}, nex.uniqueKey, _values);
|
|
8722
|
+
};
|
|
8723
|
+
};
|
|
8724
|
+
};
|
|
8725
|
+
var processJstGoods = function processJstGoods(templateColumns) {
|
|
8726
|
+
return function (getValue) {
|
|
8727
|
+
return function (nex, config) {
|
|
8728
|
+
var _values = {
|
|
8729
|
+
jstGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_jstGoods")), []),
|
|
8730
|
+
shopCode: getValue("".concat(nex.uniqueKey, "_shopCode"))
|
|
8731
|
+
};
|
|
8732
|
+
var selectIds = [];
|
|
8733
|
+
var orderNo = '';
|
|
8734
|
+
var tradeId = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
8735
|
+
return col.workOrderComponentType === 'TRADE_ID_INPUT';
|
|
8736
|
+
});
|
|
8737
|
+
if (tradeId) {
|
|
8738
|
+
orderNo = getValue("".concat(tradeId.uniqueKey, "_").concat(updateWorkTypeKeys[tradeId.workOrderComponentType]));
|
|
8739
|
+
}
|
|
8740
|
+
var jstSystemOrder = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
8741
|
+
return col.workOrderComponentType === 'JST_SYSTEM_ORDER';
|
|
8742
|
+
});
|
|
8743
|
+
if (jstSystemOrder) {
|
|
8744
|
+
selectIds = jsonParseSecurity(getValue("".concat(jstSystemOrder.uniqueKey, "_").concat(systemOrderMap[jstSystemOrder.workOrderComponentType].ids)), []);
|
|
8745
|
+
}
|
|
8746
|
+
_values.selectIds = selectIds;
|
|
8747
|
+
_values.orderNo = orderNo;
|
|
8748
|
+
return _defineProperty({}, nex.uniqueKey, _values);
|
|
8749
|
+
};
|
|
8750
|
+
};
|
|
8751
|
+
};
|
|
8752
|
+
var processKmGoods = function processKmGoods(templateColumns) {
|
|
8753
|
+
return function (getValue) {
|
|
8754
|
+
return function (nex, config) {
|
|
8755
|
+
var _values = {
|
|
8756
|
+
kmGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_kmGoods")), []),
|
|
8757
|
+
shopCode: getValue("".concat(nex.uniqueKey, "_shopCode"))
|
|
8758
|
+
};
|
|
8759
|
+
var selectIds = [];
|
|
8760
|
+
var orderNo = '';
|
|
8761
|
+
var tradeId = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
8762
|
+
return col.workOrderComponentType === 'TRADE_ID_INPUT';
|
|
8763
|
+
});
|
|
8764
|
+
if (tradeId) {
|
|
8765
|
+
orderNo = getValue("".concat(tradeId.uniqueKey, "_").concat(updateWorkTypeKeys[tradeId.workOrderComponentType]));
|
|
8766
|
+
}
|
|
8767
|
+
var kmSystemOrder = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
8768
|
+
return col.workOrderComponentType === 'KM_SYSTEM_ORDER';
|
|
8769
|
+
});
|
|
8770
|
+
if (kmSystemOrder) {
|
|
8771
|
+
selectIds = jsonParseSecurity(getValue("".concat(kmSystemOrder.uniqueKey, "_").concat(systemOrderMap[kmSystemOrder.workOrderComponentType].ids)), []);
|
|
8772
|
+
}
|
|
8773
|
+
_values.selectIds = selectIds;
|
|
8774
|
+
_values.orderNo = orderNo;
|
|
8775
|
+
return _defineProperty({}, nex.uniqueKey, _values);
|
|
8776
|
+
};
|
|
8777
|
+
};
|
|
8778
|
+
};
|
|
8779
|
+
var processGyGoods = function processGyGoods(templateColumns) {
|
|
8780
|
+
return function (getValue) {
|
|
8781
|
+
return function (nex, config) {
|
|
8782
|
+
var _values = {
|
|
8783
|
+
gyGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_gyGoods")), []),
|
|
8784
|
+
shopCode: getValue("".concat(nex.uniqueKey, "_shopCode"))
|
|
8785
|
+
};
|
|
8786
|
+
var selectIds = [];
|
|
8787
|
+
var orderNo = '';
|
|
8788
|
+
var tradeId = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
8789
|
+
return col.workOrderComponentType === 'TRADE_ID_INPUT';
|
|
8790
|
+
});
|
|
8791
|
+
if (tradeId) {
|
|
8792
|
+
orderNo = getValue("".concat(tradeId.uniqueKey, "_").concat(updateWorkTypeKeys[tradeId.workOrderComponentType]));
|
|
8793
|
+
}
|
|
8794
|
+
var gySystemOrder = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
8795
|
+
return col.workOrderComponentType === 'GY_SYSTEM_ORDER';
|
|
8796
|
+
});
|
|
8797
|
+
if (gySystemOrder) {
|
|
8798
|
+
selectIds = jsonParseSecurity(getValue("".concat(gySystemOrder.uniqueKey, "_").concat(systemOrderMap[gySystemOrder.workOrderComponentType].ids)), []);
|
|
8799
|
+
}
|
|
8800
|
+
_values.selectIds = selectIds;
|
|
8801
|
+
_values.orderNo = orderNo;
|
|
8802
|
+
return _defineProperty({}, nex.uniqueKey, _values);
|
|
8803
|
+
};
|
|
8804
|
+
};
|
|
8805
|
+
};
|
|
8806
|
+
var processSkxGoods = function processSkxGoods(getValue) {
|
|
8807
|
+
return function (nex, config) {
|
|
8808
|
+
var _values = {
|
|
8809
|
+
skxGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_skxGoods")), [])
|
|
8810
|
+
};
|
|
8811
|
+
return _defineProperty({}, nex.uniqueKey, _values);
|
|
8812
|
+
};
|
|
8813
|
+
};
|
|
8814
|
+
var processBsReissueGoods = function processBsReissueGoods(getValue) {
|
|
8815
|
+
return function (nex, config) {
|
|
8816
|
+
return _defineProperty({}, nex.uniqueKey, {
|
|
8817
|
+
bsReissueType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_bsReissueType")), []),
|
|
8818
|
+
bsReissueGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_bsReissueGoods")), []),
|
|
8819
|
+
shopCode: getValue("".concat(nex.uniqueKey, "_shopCode"))
|
|
8820
|
+
});
|
|
8821
|
+
};
|
|
8822
|
+
};
|
|
8823
|
+
var processBsExchangeGoods = function processBsExchangeGoods(getValue) {
|
|
8824
|
+
return function (nex, config) {
|
|
8825
|
+
var bsExchangeType = jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_bsExchangeType")), []);
|
|
8826
|
+
var bsExchangeReturnGoods = jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_bsExchangeReturnGoods")), []);
|
|
8827
|
+
var bsExchangeSwapOutGoods = jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_bsExchangeSwapOutGoods")), []);
|
|
8828
|
+
//补发组装数据
|
|
8829
|
+
if ((bsExchangeType === null || bsExchangeType === void 0 ? void 0 : bsExchangeType.length) && ['2', '4'].includes(bsExchangeType[0])) {
|
|
8830
|
+
var maxLen = maxBy__default['default'](bsExchangeReturnGoods, function (t) {
|
|
8831
|
+
return t.index;
|
|
8832
|
+
});
|
|
8833
|
+
var newGoods = Array((maxLen === null || maxLen === void 0 ? void 0 : maxLen.index) + 1 || 0).map(function () {
|
|
8834
|
+
return {
|
|
8835
|
+
bsExchangeReturnGoods: [],
|
|
8836
|
+
bsExchangeSwapOutGoods: []
|
|
8837
|
+
};
|
|
8838
|
+
});
|
|
8839
|
+
bsExchangeReturnGoods.forEach(function (item) {
|
|
8840
|
+
if (!newGoods[item.index]) {
|
|
8841
|
+
newGoods[item.index] = {
|
|
8842
|
+
bsExchangeReturnGoods: [],
|
|
8843
|
+
bsExchangeSwapOutGoods: []
|
|
8844
|
+
};
|
|
8845
|
+
}
|
|
8846
|
+
newGoods[item.index].bsExchangeReturnGoods.push(item);
|
|
8847
|
+
});
|
|
8848
|
+
bsExchangeSwapOutGoods.forEach(function (item) {
|
|
8849
|
+
newGoods[item.index].bsExchangeSwapOutGoods.push(item);
|
|
8850
|
+
});
|
|
8851
|
+
bsExchangeReturnGoods = newGoods;
|
|
8852
|
+
bsExchangeSwapOutGoods = [];
|
|
8853
|
+
}
|
|
8854
|
+
return _defineProperty({}, nex.uniqueKey, {
|
|
8855
|
+
bsExchangeType: bsExchangeType,
|
|
8856
|
+
bsExchangeReturnGoods: bsExchangeReturnGoods,
|
|
8857
|
+
bsExchangeSwapOutGoods: bsExchangeSwapOutGoods,
|
|
8858
|
+
bsExchangeGiftGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_bsExchangeGiftGoods")), []),
|
|
8859
|
+
shopCode: getValue("".concat(nex.uniqueKey, "_shopCode"))
|
|
8860
|
+
});
|
|
8861
|
+
};
|
|
8862
|
+
};
|
|
8863
|
+
var processWdtExchangeGoods = function processWdtExchangeGoods(getValue) {
|
|
8864
|
+
return function (nex, config) {
|
|
8865
|
+
return _defineProperty({}, nex.uniqueKey, {
|
|
8866
|
+
wdtExchangeGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_wdtExchangeGoods")), []),
|
|
8867
|
+
shopCode: getValue("".concat(nex.uniqueKey, "_shopCode"))
|
|
8868
|
+
});
|
|
8869
|
+
};
|
|
8870
|
+
};
|
|
8871
|
+
var processJstExchangeGoods = function processJstExchangeGoods(getValue) {
|
|
8872
|
+
return function (nex, config) {
|
|
8873
|
+
return _defineProperty({}, nex.uniqueKey, {
|
|
8874
|
+
jstExchangeGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_jstExchangeGoods")), []),
|
|
8875
|
+
shopCode: getValue("".concat(nex.uniqueKey, "_shopCode"))
|
|
8876
|
+
});
|
|
8877
|
+
};
|
|
8878
|
+
};
|
|
8879
|
+
var processBsReturnGoods = function processBsReturnGoods(getValue) {
|
|
8880
|
+
return function (nex, config) {
|
|
8881
|
+
var _$concat;
|
|
8882
|
+
var compType = nex.workOrderComponentType;
|
|
8883
|
+
var returnGoodsMap = {
|
|
8884
|
+
BS_RETURN_GOODS: {
|
|
8885
|
+
returnTypeKey: 'bsReturnType',
|
|
8886
|
+
returnGoodsKey: 'bsReturnGoods',
|
|
8887
|
+
shopCodeKey: 'shopCode'
|
|
8888
|
+
}
|
|
8889
|
+
};
|
|
8890
|
+
return _defineProperty({}, "".concat(nex.uniqueKey), (_$concat = {}, _defineProperty(_$concat, returnGoodsMap[compType].returnTypeKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_").concat(returnGoodsMap[compType].returnTypeKey)), [])), _defineProperty(_$concat, returnGoodsMap[compType].returnGoodsKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_").concat(returnGoodsMap[compType].returnGoodsKey)), [])), _defineProperty(_$concat, returnGoodsMap[compType].shopCodeKey, getValue("".concat(nex.uniqueKey, "_").concat(returnGoodsMap[compType].shopCodeKey))), _$concat));
|
|
8891
|
+
};
|
|
8892
|
+
};
|
|
8893
|
+
var processErpSystemOrder = function processErpSystemOrder(getValue) {
|
|
8894
|
+
return function (nex, config) {
|
|
8895
|
+
var systemOrderMap = {
|
|
8896
|
+
BS_SYSTEM_ORDER: {
|
|
8897
|
+
no: 'bsSystemOrderNo',
|
|
8898
|
+
ids: 'bsSystemSelectIds',
|
|
8899
|
+
order: 'bsSystemShowOrder'
|
|
8900
|
+
},
|
|
8901
|
+
KM_SYSTEM_ORDER: {
|
|
8902
|
+
no: 'kmSystemOrderNo',
|
|
8903
|
+
ids: 'kmSystemSelectIds',
|
|
8904
|
+
order: 'kmSystemShowOrder'
|
|
8905
|
+
},
|
|
8906
|
+
WLN_SYSTEM_ORDER: {
|
|
8907
|
+
no: 'wlnSystemOrderNo',
|
|
8908
|
+
ids: 'wlnSystemSelectIds',
|
|
8909
|
+
order: 'wlnSystemShowOrder'
|
|
8910
|
+
},
|
|
8911
|
+
WDT_SYSTEM_ORDER: {
|
|
8912
|
+
no: 'wdtSystemOrderNo',
|
|
8913
|
+
ids: 'wdtSystemSelectIds',
|
|
8914
|
+
order: 'wdtSystemShowOrder'
|
|
8915
|
+
},
|
|
8916
|
+
BS_E3_SYSTEM_ORDER: {
|
|
8917
|
+
no: 'bsE3SystemOrderNo',
|
|
8918
|
+
ids: 'bsE3SystemSelectIds',
|
|
8919
|
+
order: 'bsE3SystemShowOrder'
|
|
8920
|
+
},
|
|
8921
|
+
GY_SYSTEM_ORDER: {
|
|
8922
|
+
no: 'gySystemOrderNo',
|
|
8923
|
+
ids: 'gySystemSelectIds',
|
|
8924
|
+
order: 'gySystemShowOrder'
|
|
8925
|
+
},
|
|
8926
|
+
JST_SYSTEM_ORDER: {
|
|
8927
|
+
no: 'jstSystemOrderNo',
|
|
8928
|
+
ids: 'jstSystemSelectIds',
|
|
8929
|
+
order: 'jstSystemShowOrder'
|
|
8930
|
+
}
|
|
8931
|
+
};
|
|
8932
|
+
return _defineProperty({}, nex.uniqueKey, {
|
|
8933
|
+
orderNo: getValue("".concat(nex.uniqueKey, "_").concat(systemOrderMap[nex.workOrderComponentType].no)),
|
|
8934
|
+
orders: [],
|
|
8935
|
+
selectIds: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_").concat(systemOrderMap[nex.workOrderComponentType].ids)), []),
|
|
8936
|
+
showOrderInfo: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_").concat(systemOrderMap[nex.workOrderComponentType].order)), [])
|
|
8937
|
+
});
|
|
8938
|
+
};
|
|
8939
|
+
};
|
|
8940
|
+
var processBuyerMessageNotice = function processBuyerMessageNotice(getValue) {
|
|
8941
|
+
return function (nex, config) {
|
|
8942
|
+
return _defineProperty({}, nex.uniqueKey, getValue("".concat(nex.uniqueKey, "_buyerMessageNotice")) || (config === null || config === void 0 ? void 0 : config.select));
|
|
8943
|
+
};
|
|
8944
|
+
};
|
|
8945
|
+
var processOrderType = function processOrderType(getValue) {
|
|
8946
|
+
return function (nex, config) {
|
|
8947
|
+
return _defineProperty({}, nex.uniqueKey, getValue("".concat(nex.uniqueKey, "_erpOrderType")) || (config === null || config === void 0 ? void 0 : config.select));
|
|
8948
|
+
};
|
|
8949
|
+
};
|
|
8950
|
+
var processRefundType = function processRefundType(getValue) {
|
|
8951
|
+
return function (nex, config) {
|
|
8952
|
+
return _defineProperty({}, nex.uniqueKey, getValue("".concat(nex.uniqueKey, "_orderRefundType")) || (config === null || config === void 0 ? void 0 : config.select));
|
|
8953
|
+
};
|
|
8954
|
+
};
|
|
8955
|
+
var processExecuteActionType = function processExecuteActionType(getValue) {
|
|
8956
|
+
return function (nex, config) {
|
|
8957
|
+
return _defineProperty({}, nex.uniqueKey, getValue("".concat(nex.uniqueKey, "_executeActionType")) || (config === null || config === void 0 ? void 0 : config.select));
|
|
8958
|
+
};
|
|
8959
|
+
};
|
|
8960
|
+
var processErpTradeId = function processErpTradeId(getValue) {
|
|
8961
|
+
return function (nex, config) {
|
|
8962
|
+
var SYSTEM_ORDER_MAP = {
|
|
8963
|
+
BS_DELIVERY_NO: {
|
|
8964
|
+
key: 'deliveryNoList',
|
|
8965
|
+
defaultValue: [{
|
|
8966
|
+
deliverNo: '',
|
|
8967
|
+
systemOrderId: ''
|
|
8968
|
+
}]
|
|
8969
|
+
},
|
|
8970
|
+
RETURN_GOODS_TRADE_ID: {
|
|
8971
|
+
key: 'returnGoodsTradeItemList',
|
|
8972
|
+
defaultValue: []
|
|
8973
|
+
},
|
|
8974
|
+
REISSUE_TRADE_ID: {
|
|
8975
|
+
key: 'tradeItemList',
|
|
8976
|
+
defaultValue: []
|
|
8977
|
+
},
|
|
8978
|
+
ERP_AFTER_SALE_TRADE_ID: {
|
|
8979
|
+
key: 'erpAfterSaleTradeItemList',
|
|
8980
|
+
defaultValue: []
|
|
8981
|
+
},
|
|
8982
|
+
EXCHANGE_TRADE_ID: {
|
|
8983
|
+
key: 'tradeItemList',
|
|
8984
|
+
defaultValue: []
|
|
8985
|
+
}
|
|
8986
|
+
};
|
|
8987
|
+
return _defineProperty({}, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_").concat(SYSTEM_ORDER_MAP[nex.workOrderComponentType].key)), SYSTEM_ORDER_MAP[nex.workOrderComponentType].defaultValue));
|
|
8988
|
+
};
|
|
8989
|
+
};
|
|
8990
|
+
var processWlnGoods = function processWlnGoods(templateColumns) {
|
|
8991
|
+
return function (getValue) {
|
|
8992
|
+
return function (nex, config) {
|
|
8993
|
+
var orderNo = '';
|
|
8994
|
+
var tradeId = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
8995
|
+
return col.workOrderComponentType === 'TRADE_ID_INPUT';
|
|
8996
|
+
});
|
|
8997
|
+
if (tradeId) {
|
|
8998
|
+
orderNo = getValue("".concat(tradeId.uniqueKey, "_").concat(updateWorkTypeKeys[tradeId.workOrderComponentType]));
|
|
8999
|
+
}
|
|
9000
|
+
return _defineProperty({}, nex.uniqueKey, {
|
|
9001
|
+
wlnGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_wlnGoods")), []),
|
|
9002
|
+
shopCode: getValue("".concat(nex.uniqueKey, "_shopCode")),
|
|
9003
|
+
orderNo: orderNo
|
|
9004
|
+
});
|
|
9005
|
+
};
|
|
9006
|
+
};
|
|
9007
|
+
};
|
|
9008
|
+
var processWdtReissueGoods = function processWdtReissueGoods(templateColumns) {
|
|
9009
|
+
return function (getValue) {
|
|
9010
|
+
return function (nex, config) {
|
|
9011
|
+
var orderNo = '';
|
|
9012
|
+
var tradeId = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
9013
|
+
return col.workOrderComponentType === 'TRADE_ID_INPUT';
|
|
9014
|
+
});
|
|
9015
|
+
if (tradeId) {
|
|
9016
|
+
orderNo = getValue("".concat(tradeId.uniqueKey, "_").concat(updateWorkTypeKeys[tradeId.workOrderComponentType]));
|
|
9017
|
+
}
|
|
9018
|
+
return _defineProperty({}, nex.uniqueKey, {
|
|
9019
|
+
wdtSystemOrder: {
|
|
9020
|
+
orderNo: orderNo
|
|
9021
|
+
},
|
|
9022
|
+
wdtReissueType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_wdtReissueType")), !kmkfUtils.isNull(config === null || config === void 0 ? void 0 : config.initReason) ? [config.initReason] : ['1']),
|
|
9023
|
+
wdtReissueGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_wdtReissueGoods")), []),
|
|
9024
|
+
shopCode: getValue("".concat(nex.uniqueKey, "_shopCode")),
|
|
9025
|
+
wdtSystemOrderNo: getValue("".concat(nex.uniqueKey, "_wdtSystemOrderNo"))
|
|
9026
|
+
});
|
|
9027
|
+
};
|
|
9028
|
+
};
|
|
9029
|
+
};
|
|
9030
|
+
var processWdtReturnGoods = function processWdtReturnGoods(templateColumns) {
|
|
9031
|
+
return function (getValue) {
|
|
9032
|
+
return function (nex, config) {
|
|
9033
|
+
// let orderNo = '';
|
|
9034
|
+
// const tradeId = templateColumns?.find(
|
|
9035
|
+
// (col: { workOrderComponentType: string }) => col.workOrderComponentType === 'TRADE_ID_INPUT',
|
|
9036
|
+
// );
|
|
9037
|
+
// if (tradeId) {
|
|
9038
|
+
// orderNo = getValue(
|
|
9039
|
+
// `${tradeId.uniqueKey}_${updateWorkTypeKeys[tradeId.workOrderComponentType]}`,
|
|
9040
|
+
// );
|
|
9041
|
+
// }
|
|
9042
|
+
return _defineProperty({}, nex.uniqueKey, {
|
|
9043
|
+
wdtReturnType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_wdtReturnType")), !kmkfUtils.isNull(config === null || config === void 0 ? void 0 : config.initReason) ? [config.initReason] : ['1']),
|
|
9044
|
+
wdtReturnGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_wdtReturnGoods")), []),
|
|
9045
|
+
shopCode: getValue("".concat(nex.uniqueKey, "_shopCode"))
|
|
9046
|
+
});
|
|
9047
|
+
};
|
|
9048
|
+
};
|
|
9049
|
+
};
|
|
9050
|
+
var processKmReissueGoods = function processKmReissueGoods(templateColumns) {
|
|
9051
|
+
return function (getValue) {
|
|
9052
|
+
return function (nex, config) {
|
|
9053
|
+
var orderNo = '';
|
|
9054
|
+
var tradeId = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
9055
|
+
return col.workOrderComponentType === 'TRADE_ID_INPUT';
|
|
9056
|
+
});
|
|
9057
|
+
if (tradeId) {
|
|
9058
|
+
orderNo = getValue("".concat(tradeId.uniqueKey, "_").concat(updateWorkTypeKeys[tradeId.workOrderComponentType]));
|
|
9059
|
+
}
|
|
9060
|
+
return _defineProperty({}, nex.uniqueKey, {
|
|
9061
|
+
kmSystemOrder: {
|
|
9062
|
+
orderNo: orderNo
|
|
9063
|
+
},
|
|
9064
|
+
kmReissueType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_kmReissueType")), !kmkfUtils.isNull(config === null || config === void 0 ? void 0 : config.initReason) ? [config.initReason] : ['1']),
|
|
9065
|
+
kmReissueGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_kmReissueGoods")), []),
|
|
9066
|
+
shopCode: getValue("".concat(nex.uniqueKey, "_shopCode")),
|
|
9067
|
+
kmSystemOrderNo: getValue("".concat(nex.uniqueKey, "_kmSystemOrderNo"))
|
|
9068
|
+
});
|
|
9069
|
+
};
|
|
9070
|
+
};
|
|
9071
|
+
};
|
|
9072
|
+
var processGyReissueGoods = function processGyReissueGoods(templateColumns) {
|
|
9073
|
+
return function (getValue) {
|
|
9074
|
+
return function (nex, config) {
|
|
9075
|
+
var orderNo = '';
|
|
9076
|
+
var tradeId = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
9077
|
+
return col.workOrderComponentType === 'TRADE_ID_INPUT';
|
|
9078
|
+
});
|
|
9079
|
+
if (tradeId) {
|
|
9080
|
+
orderNo = getValue("".concat(tradeId.uniqueKey, "_").concat(updateWorkTypeKeys[tradeId.workOrderComponentType]));
|
|
9081
|
+
}
|
|
9082
|
+
return _defineProperty({}, nex.uniqueKey, {
|
|
9083
|
+
gySystemOrder: {
|
|
9084
|
+
orderNo: orderNo
|
|
9085
|
+
},
|
|
9086
|
+
gyReissueType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_gyReissueType")), !kmkfUtils.isNull(config === null || config === void 0 ? void 0 : config.initReason) ? [config.initReason] : ['1']),
|
|
9087
|
+
gyReissueGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_gyReissueGoods")), []),
|
|
9088
|
+
shopCode: getValue("".concat(nex.uniqueKey, "_shopCode")),
|
|
9089
|
+
vipCode: getValue("".concat(nex.uniqueKey, "_vipCode")),
|
|
9090
|
+
gySystemOrderNo: getValue("".concat(nex.uniqueKey, "_gySystemOrderNo"))
|
|
9091
|
+
});
|
|
9092
|
+
};
|
|
9093
|
+
};
|
|
9094
|
+
};
|
|
9095
|
+
var processGyReturnGoods = function processGyReturnGoods(templateColumns) {
|
|
9096
|
+
return function (getValue) {
|
|
9097
|
+
return function (nex, config) {
|
|
9098
|
+
var orderNo = '';
|
|
9099
|
+
var tradeId = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
9100
|
+
return col.workOrderComponentType === 'TRADE_ID_INPUT';
|
|
9101
|
+
});
|
|
9102
|
+
if (tradeId) {
|
|
9103
|
+
orderNo = getValue("".concat(tradeId.uniqueKey, "_").concat(updateWorkTypeKeys[tradeId.workOrderComponentType]));
|
|
9104
|
+
}
|
|
9105
|
+
return _defineProperty({}, nex.uniqueKey, {
|
|
9106
|
+
gySystemOrder: {
|
|
9107
|
+
orderNo: orderNo
|
|
9108
|
+
},
|
|
9109
|
+
gyReturnType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_gyReturnType")), !kmkfUtils.isNull(config === null || config === void 0 ? void 0 : config.initReason) ? [config.initReason] : ['1']),
|
|
9110
|
+
gyReturnGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_gyReturnGoods")), []),
|
|
9111
|
+
shopCode: getValue("".concat(nex.uniqueKey, "_shopCode")),
|
|
9112
|
+
gySystemOrderNo: getValue("".concat(nex.uniqueKey, "_gySystemOrderNo"))
|
|
9113
|
+
});
|
|
9114
|
+
};
|
|
9115
|
+
};
|
|
9116
|
+
};
|
|
9117
|
+
var processJstReissueGoods = function processJstReissueGoods(templateColumns) {
|
|
9118
|
+
return function (getValue) {
|
|
9119
|
+
return function (nex, config) {
|
|
9120
|
+
var orderNo = '';
|
|
9121
|
+
var tradeId = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
9122
|
+
return col.workOrderComponentType === 'TRADE_ID_INPUT';
|
|
9123
|
+
});
|
|
9124
|
+
if (tradeId) {
|
|
9125
|
+
orderNo = getValue("".concat(tradeId.uniqueKey, "_").concat(updateWorkTypeKeys[tradeId.workOrderComponentType]));
|
|
9126
|
+
}
|
|
9127
|
+
return _defineProperty({}, nex.uniqueKey, {
|
|
9128
|
+
jstSystemOrder: {
|
|
9129
|
+
orderNo: orderNo
|
|
9130
|
+
},
|
|
9131
|
+
jstReissueType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_jstReissueType")), !kmkfUtils.isNull(config === null || config === void 0 ? void 0 : config.initReason) ? [config.initReason] : ['1']),
|
|
9132
|
+
jstReissueGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_jstReissueGoods")), []),
|
|
9133
|
+
jstSystemOrderBillType: getValue("".concat(nex.uniqueKey, "_jstSystemOrderBillType")) || '',
|
|
9134
|
+
shopCode: getValue("".concat(nex.uniqueKey, "_shopCode")),
|
|
9135
|
+
jstSystemOrderNo: getValue("".concat(nex.uniqueKey, "_jstSystemOrderNo"))
|
|
9136
|
+
});
|
|
9137
|
+
};
|
|
9138
|
+
};
|
|
9139
|
+
};
|
|
9140
|
+
var processJstReturnGoods = function processJstReturnGoods(templateColumns) {
|
|
9141
|
+
return function (getValue) {
|
|
9142
|
+
return function (nex, config) {
|
|
9143
|
+
var orderNo = '';
|
|
9144
|
+
var tradeId = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
9145
|
+
return col.workOrderComponentType === 'TRADE_ID_INPUT';
|
|
9146
|
+
});
|
|
9147
|
+
if (tradeId) {
|
|
9148
|
+
orderNo = getValue("".concat(tradeId.uniqueKey, "_").concat(updateWorkTypeKeys[tradeId.workOrderComponentType]));
|
|
9149
|
+
}
|
|
9150
|
+
return _defineProperty({}, nex.uniqueKey, {
|
|
9151
|
+
jstSystemOrder: {
|
|
9152
|
+
orderNo: orderNo
|
|
9153
|
+
},
|
|
9154
|
+
jstReturnType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_jstReturnType")), !kmkfUtils.isNull(config === null || config === void 0 ? void 0 : config.initReason) ? [config.initReason] : ['1']),
|
|
9155
|
+
jstReturnGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_jstReturnGoods")), []),
|
|
9156
|
+
jstSystemOrderBillType: getValue("".concat(nex.uniqueKey, "_jstSystemOrderBillType")) || '',
|
|
9157
|
+
shopCode: getValue("".concat(nex.uniqueKey, "_shopCode")),
|
|
9158
|
+
jstSystemOrderNo: getValue("".concat(nex.uniqueKey, "_jstSystemOrderNo"))
|
|
9159
|
+
});
|
|
9160
|
+
};
|
|
9161
|
+
};
|
|
9162
|
+
};
|
|
9163
|
+
var processLabel = function processLabel(getValue) {
|
|
9164
|
+
return function (nex, config) {
|
|
9165
|
+
var _ref72;
|
|
9166
|
+
return _ref72 = {}, _defineProperty(_ref72, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _defineProperty(_ref72, "".concat(nex.uniqueKey, "_label"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _ref72;
|
|
9167
|
+
};
|
|
9168
|
+
};
|
|
9169
|
+
var processMemberLevel = function processMemberLevel(getValue) {
|
|
9170
|
+
return function (nex, config) {
|
|
9171
|
+
var _ref73;
|
|
9172
|
+
return _ref73 = {}, _defineProperty(_ref73, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _defineProperty(_ref73, "".concat(nex.uniqueKey, "_memberLevel"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _ref73;
|
|
9173
|
+
};
|
|
9174
|
+
};
|
|
9175
|
+
var processAfterSalesOrderId = function processAfterSalesOrderId(getValue) {
|
|
9176
|
+
return function (nex, config) {
|
|
9177
|
+
return _defineProperty({}, nex.uniqueKey, getValue("".concat(nex.uniqueKey, "_afterSalesOrderId")));
|
|
9178
|
+
};
|
|
9179
|
+
};
|
|
9180
|
+
var processSingleField = function processSingleField(getValue) {
|
|
9181
|
+
return function (nex, config) {
|
|
9182
|
+
return _defineProperty({}, nex.uniqueKey, getValue("".concat(nex.uniqueKey, "_").concat(updateWorkTypeKeys[nex.workOrderComponentType])));
|
|
9183
|
+
};
|
|
9184
|
+
};
|
|
9185
|
+
var processSingleFieldByKey = function processSingleFieldByKey(key) {
|
|
9186
|
+
return function (getValue) {
|
|
9187
|
+
return function (nex, config) {
|
|
9188
|
+
return _defineProperty({}, nex.uniqueKey, getValue("".concat(nex.uniqueKey, "_").concat(key)));
|
|
9189
|
+
};
|
|
9190
|
+
};
|
|
9191
|
+
};
|
|
9192
|
+
var processBsE3ReissueGoods = function processBsE3ReissueGoods(templateColumns) {
|
|
9193
|
+
return function (getValue) {
|
|
9194
|
+
return function (nex, config) {
|
|
9195
|
+
var orderNo = '';
|
|
9196
|
+
var tradeId = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
9197
|
+
return col.workOrderComponentType === 'TRADE_ID_INPUT';
|
|
9198
|
+
});
|
|
9199
|
+
if (tradeId) {
|
|
9200
|
+
orderNo = getValue("".concat(tradeId.uniqueKey, "_").concat(updateWorkTypeKeys[tradeId.workOrderComponentType]));
|
|
9201
|
+
}
|
|
9202
|
+
return _defineProperty({}, nex.uniqueKey, {
|
|
9203
|
+
bsE3SystemOrder: {
|
|
9204
|
+
orderNo: orderNo
|
|
9205
|
+
},
|
|
9206
|
+
bsE3SystemOrderNo: getValue("".concat(nex.uniqueKey, "_bsE3SystemOrderNo")),
|
|
9207
|
+
bsE3ReissueType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_bsE3ReissueType")), !kmkfUtils.isNull(config === null || config === void 0 ? void 0 : config.initReason) ? [config.initReason] : ['1']),
|
|
9208
|
+
bsE3ReissueGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_bsE3ReissueGoods")), [])
|
|
9209
|
+
});
|
|
9210
|
+
};
|
|
9211
|
+
};
|
|
9212
|
+
};
|
|
9213
|
+
var transformWorkOrderData = function transformWorkOrderData(templateColumns) {
|
|
9214
|
+
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'edit';
|
|
9215
|
+
return function (item) {
|
|
9216
|
+
var getValue = getItemValue(item);
|
|
9217
|
+
var componentProcessors = _objectSpread2({
|
|
9218
|
+
RADIO: processRadio,
|
|
9219
|
+
INPUT: processInput,
|
|
9220
|
+
NUMERICAL_CALCULATION: processNumericalCalculation,
|
|
9221
|
+
TEXTAREA: processTextarea,
|
|
9222
|
+
SELECT: processSelect,
|
|
9223
|
+
GY_PAYMENT_METHOD: gyPaymentMethod,
|
|
9224
|
+
RATE: processRate,
|
|
9225
|
+
FILE: processFile,
|
|
9226
|
+
POSTING: processPosting,
|
|
9227
|
+
BUYER_NICK_INPUT: processBuyerNickInput,
|
|
9228
|
+
ALI_PAY_INPUT: processAliPayInput,
|
|
9229
|
+
CHECKBOX: processCheckbox,
|
|
9230
|
+
DATETIME: processDatetime,
|
|
9231
|
+
PICTURE: processPicture,
|
|
9232
|
+
PICTURE_PRO: processPicturePro,
|
|
9233
|
+
BASIC_MULT_SELECT: processBasicMultSelect,
|
|
9234
|
+
MULT_SELECT: processMultSelect,
|
|
9235
|
+
BASIC_ADDRESS: processBasicAddress,
|
|
9236
|
+
RECEIVER_ADDRESS_INPUT: processReceiverAddressInput,
|
|
9237
|
+
SUBFORM: processSubForm,
|
|
9238
|
+
EXPRESS_LOGISTICS_SELECT: processExpressLogisticsSelect,
|
|
9239
|
+
RETURN_LOGISTICS_SELECT: processReturnLogisticsSelect,
|
|
9240
|
+
REMARK_INPUT: processRemarkInput,
|
|
9241
|
+
STATUS: processStatus,
|
|
9242
|
+
ORDINARY_INVOICE: processOrdinaryInvoice,
|
|
9243
|
+
LOGISTICS_INTERCEPTION: processLogisticsInterception,
|
|
9244
|
+
LOGISTICS_INTERCEPTION_MORE: processLogisticsInterceptionMore,
|
|
9245
|
+
LOGISTICS_TRAJECTORY: processLogisticsTrajectory,
|
|
9246
|
+
LOGISTICS_TRAJECTORY_MORE: processLogisticsTrajectoryMore,
|
|
9247
|
+
ITEM_SELECT: processGoods,
|
|
9248
|
+
ITEM_ENCODE: processGoods,
|
|
9249
|
+
ITEM_ID: processGoods,
|
|
9250
|
+
ITEM_SELECT_THIRD: processItemSelectThird,
|
|
9251
|
+
ENTERPRISE_PAYMENT: processEnterPrisePayment,
|
|
9252
|
+
JST_LOGISTICS: processJstLogistics,
|
|
9253
|
+
JST_ITEM_SELECT_THIRD: processJstItemSelectThird,
|
|
9254
|
+
JST_SUPPLY: processJstSupply,
|
|
9255
|
+
JST_SEND_GOOD: processJstSendGood,
|
|
9256
|
+
BS_MEMO: processBsMemo,
|
|
9257
|
+
REISSUE_LOGISTICS: processReissueLogistics,
|
|
9258
|
+
REISSUE_STATUS: processCallBackStatus,
|
|
9259
|
+
ADJUST_WORK_ORDER_STATUS: processCallBackStatus,
|
|
9260
|
+
CREATE_STATUS: processCallBackStatus,
|
|
9261
|
+
INVOICE_STATUS: processCallBackStatus,
|
|
9262
|
+
INVOICING_STATUS: processCallBackStatus,
|
|
9263
|
+
AGREE_REFUND_STATUS: processCallBackStatus,
|
|
9264
|
+
REJECT_REFUND_STATUS: processCallBackStatus,
|
|
9265
|
+
ERP_AFTER_SALE_STATUS: processCallBackStatus,
|
|
9266
|
+
AGREE_RETURN_GOODS_STATUS: processCallBackStatus,
|
|
9267
|
+
REJECT_RETURN_GOODS_STATUS: processCallBackStatus,
|
|
9268
|
+
RETURN_EXCHANGE_GOODS_REVIEW_STATUS: processCallBackStatus,
|
|
9269
|
+
RETURN_GOODS_STATUS: processSceneStatus,
|
|
9270
|
+
EXCHANGE_STATUS: processSceneStatus,
|
|
9271
|
+
WAREHOUSING_STATUS: processSceneStatus,
|
|
9272
|
+
BS_E3_WAREHOUSING_STATUS: processSceneStatus,
|
|
9273
|
+
MSG_STATUS: processSceneStatus,
|
|
9274
|
+
WDT_WAREHOUSING_STATUS: processSceneStatus,
|
|
9275
|
+
BS_LOGISTICS: processErpLogistics,
|
|
9276
|
+
WLN_LOGISTICS: processErpLogistics,
|
|
9277
|
+
WDT_LOGISTICS: processErpLogistics,
|
|
9278
|
+
GY_LOGISTICS: processErpLogistics,
|
|
9279
|
+
BS_E3_LOGISTICS: processErpLogistics,
|
|
9280
|
+
KM_LOGISTICS: processErpLogistics,
|
|
9281
|
+
BS_SEND_GOOD: processErpSendGood,
|
|
9282
|
+
WLN_SEND_GOOD: processErpSendGood,
|
|
9283
|
+
WDT_SEND_GOOD: processErpSendGood,
|
|
9284
|
+
BS_E3_SEND_GOOD: processErpSendGood,
|
|
9285
|
+
KM_SEND_GOOD: processErpSendGood,
|
|
9286
|
+
GY_SEND_GOOD: processErpSendGood,
|
|
9287
|
+
BS_POSTING: processBsPosting,
|
|
9288
|
+
BS_GOODS: processBsGoods,
|
|
9289
|
+
WDT_GOODS: processWdtGoods(templateColumns),
|
|
9290
|
+
BS_E3_GOODS: processBsE3Goods(templateColumns),
|
|
9291
|
+
GY_GOODS: processGyGoods(templateColumns),
|
|
9292
|
+
KM_GOODS: processKmGoods(templateColumns),
|
|
9293
|
+
KM_REISSUE_GOODS: processKmReissueGoods(templateColumns),
|
|
9294
|
+
JST_GOODS: processJstGoods(templateColumns),
|
|
9295
|
+
BS_REISSUE_GOODS: processBsReissueGoods,
|
|
9296
|
+
BS_EXCHANGE_GOODS: processBsExchangeGoods,
|
|
9297
|
+
WDT_EXCHANGE_GOODS: processWdtExchangeGoods,
|
|
9298
|
+
JST_EXCHANGE_GOODS: processJstExchangeGoods,
|
|
9299
|
+
BS_RETURN_GOODS: processBsReturnGoods,
|
|
9300
|
+
WDT_RETURN_GOODS: processWdtReturnGoods(),
|
|
9301
|
+
JST_RETURN_GOODS: processJstReturnGoods(templateColumns),
|
|
9302
|
+
BS_SYSTEM_ORDER: processErpSystemOrder,
|
|
9303
|
+
KM_SYSTEM_ORDER: processErpSystemOrder,
|
|
9304
|
+
WLN_SYSTEM_ORDER: processErpSystemOrder,
|
|
9305
|
+
WDT_SYSTEM_ORDER: processErpSystemOrder,
|
|
9306
|
+
BS_E3_SYSTEM_ORDER: processErpSystemOrder,
|
|
9307
|
+
JST_SYSTEM_ORDER: processErpSystemOrder,
|
|
9308
|
+
GY_SYSTEM_ORDER: processErpSystemOrder,
|
|
9309
|
+
BUYER_MESSAGE_NOTICE: processBuyerMessageNotice,
|
|
9310
|
+
ORDER_TYPE: processOrderType,
|
|
9311
|
+
REFUND_TYPE: processRefundType,
|
|
9312
|
+
RETURN_GOODS_TRADE_ID: processErpTradeId,
|
|
9313
|
+
BS_DELIVERY_NO: processErpTradeId,
|
|
9314
|
+
REISSUE_TRADE_ID: processErpTradeId,
|
|
9315
|
+
ERP_AFTER_SALE_TRADE_ID: processErpTradeId,
|
|
9316
|
+
EXCHANGE_TRADE_ID: processErpTradeId,
|
|
9317
|
+
WLN_GOODS: processWlnGoods(templateColumns),
|
|
9318
|
+
WDT_REISSUE_GOODS: processWdtReissueGoods(templateColumns),
|
|
9319
|
+
GY_REISSUE_GOODS: processGyReissueGoods(templateColumns),
|
|
9320
|
+
GY_RETURN_GOODS: processGyReturnGoods(templateColumns),
|
|
9321
|
+
JST_REISSUE_GOODS: processJstReissueGoods(templateColumns),
|
|
9322
|
+
LABEL: processLabel,
|
|
9323
|
+
MEMBER_LEVEL: processMemberLevel,
|
|
9324
|
+
AFTER_SALES_ORDER_ID: processAfterSalesOrderId,
|
|
9325
|
+
BASIC_GRADE: processSingleField,
|
|
9326
|
+
TRADE_ID_INPUT: processSingleField,
|
|
9327
|
+
SHOP_NAME_INPUT: processSingleField,
|
|
9328
|
+
RECEIVER_NAME_INPUT: processSingleField,
|
|
9329
|
+
RECEIVER_MOBILE_INPUT: processSingleField,
|
|
9330
|
+
TRADE_CREATE_DATETIME: processSingleField,
|
|
9331
|
+
TRADE_PAYMENT_DATETIME: processSingleField,
|
|
9332
|
+
TRADE_DELIVERY_DATETIME: processSingleField,
|
|
9333
|
+
TRADE_CLOSING_DATETIME: processSingleField,
|
|
9334
|
+
TRADE_SIGNING_DATETIME: processSingleField,
|
|
9335
|
+
ACTUAL_PAYMENT: processSingleField,
|
|
9336
|
+
SYSTEM_ORDER_NO: processSingleField,
|
|
9337
|
+
BS_SIGNING_TIME: processSingleField,
|
|
9338
|
+
BS_SEND_TIME: processSingleField,
|
|
9339
|
+
BS_TRADE_PAYMENT_TIME: processSingleField,
|
|
9340
|
+
BS_NET_RECEIPTS: processSingleField,
|
|
9341
|
+
BS_PACKAGE_WEIGHT: processSingleField,
|
|
9342
|
+
BS_DEPOSIT: processSingleField,
|
|
9343
|
+
NEW_PAYMENT_STATUS: processSingleField,
|
|
9344
|
+
BUSINESS_ORDER_NO: processSingleField,
|
|
9345
|
+
PAYMENT_VOUCHER_CODE: processSingleField,
|
|
9346
|
+
BS_E3_REISSUE_GOODS: processBsE3ReissueGoods(templateColumns),
|
|
9347
|
+
ACTUAL_RECEIPT_PAYMENT: processSingleField,
|
|
9348
|
+
WDT_SHOP: processSingleField,
|
|
9349
|
+
KM_VIDEO: processKmVideo,
|
|
9350
|
+
WDT_TAGS: wdtTags,
|
|
9351
|
+
EXECUTE_ACTION_TYPE: processExecuteActionType,
|
|
9352
|
+
SKX_GOODS: processSkxGoods,
|
|
9353
|
+
SKX_LOGISTICS: processErpLogistics
|
|
9354
|
+
}, Object.keys(processSingleFieldTypeMapping).reduce(function (acc, key) {
|
|
9355
|
+
acc[key] = processSingleFieldByKey(processSingleFieldTypeMapping[key]);
|
|
9356
|
+
return acc;
|
|
9357
|
+
}, {}));
|
|
9358
|
+
return templateColumns.reduce(function (cur, nex) {
|
|
9359
|
+
var _componentProcessors$;
|
|
9360
|
+
var config = type === 'init' ? nex.componentConfig : {};
|
|
9361
|
+
var processFunc = (_componentProcessors$ = componentProcessors[nex.workOrderComponentType]) === null || _componentProcessors$ === void 0 ? void 0 : _componentProcessors$.call(componentProcessors, getValue);
|
|
9362
|
+
if (processFunc) {
|
|
9363
|
+
return _objectSpread2(_objectSpread2({}, cur), processFunc(nex, config));
|
|
9364
|
+
}
|
|
9365
|
+
return cur; // 如果没有找到处理函数,返回当前累积对象
|
|
9366
|
+
}, {});
|
|
9367
|
+
};
|
|
9368
|
+
};
|
|
9369
|
+
|
|
9370
|
+
var hostUrl = 'https://kefu.kuaimai.com';
|
|
9371
|
+
var FileRender = function FileRender(_ref) {
|
|
9372
|
+
var _ref$fileList = _ref.fileList,
|
|
9373
|
+
fileList = _ref$fileList === void 0 ? [] : _ref$fileList,
|
|
9374
|
+
_ref$canDownload = _ref.canDownload,
|
|
9375
|
+
canDownload = _ref$canDownload === void 0 ? false : _ref$canDownload,
|
|
9376
|
+
id = _ref.id;
|
|
9377
|
+
var _useState = React.useState(false),
|
|
9378
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
9379
|
+
visible = _useState2[0],
|
|
9380
|
+
setVisible = _useState2[1];
|
|
9381
|
+
var _useState3 = React.useState(''),
|
|
9382
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
9383
|
+
fileUrl = _useState4[0],
|
|
9384
|
+
setFileUrl = _useState4[1];
|
|
9385
|
+
var _useState5 = React.useState(''),
|
|
9386
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
9387
|
+
fileType = _useState6[0],
|
|
9388
|
+
setFileType = _useState6[1];
|
|
9389
|
+
var _useState7 = React.useState(''),
|
|
9390
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
9391
|
+
fileName = _useState8[0],
|
|
9392
|
+
setFileName = _useState8[1];
|
|
9393
|
+
var _useState9 = React.useState(false),
|
|
9394
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
9395
|
+
downloading = _useState10[0],
|
|
9396
|
+
setDownloading = _useState10[1];
|
|
9397
|
+
var handleCancel = function handleCancel() {
|
|
9398
|
+
setFileUrl('');
|
|
9399
|
+
setFileName('');
|
|
9400
|
+
setVisible(false);
|
|
9401
|
+
setDownloading(false);
|
|
9402
|
+
};
|
|
9403
|
+
var onPreview = function onPreview(file) {
|
|
9404
|
+
var _file$url;
|
|
9405
|
+
var fileArr = file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split('.');
|
|
9406
|
+
var fileType = fileArr[fileArr.length - 1];
|
|
9407
|
+
if (['png', 'jpg', 'jpeg', 'gif', 'bmp', 'svg'].includes(fileType.toLowerCase())) {
|
|
9408
|
+
setFileUrl(file === null || file === void 0 ? void 0 : file.url);
|
|
9409
|
+
setFileName(file === null || file === void 0 ? void 0 : file.name);
|
|
9410
|
+
setFileType('pic');
|
|
9411
|
+
setVisible(true);
|
|
9412
|
+
} else if (['mp4', 'avi', 'mpeg', 'asf', 'mov', '3gp', 'wmv', 'rmvb'].includes(fileType.toLowerCase())) {
|
|
9413
|
+
setFileUrl(file === null || file === void 0 ? void 0 : file.url);
|
|
9414
|
+
setFileName(file === null || file === void 0 ? void 0 : file.name);
|
|
9415
|
+
setFileType('video');
|
|
9416
|
+
setVisible(true);
|
|
9417
|
+
} else {
|
|
9418
|
+
window.open(file === null || file === void 0 ? void 0 : file.url);
|
|
9419
|
+
}
|
|
9420
|
+
};
|
|
9421
|
+
var download = function download(url, name) {
|
|
9422
|
+
setDownloading(true);
|
|
9423
|
+
fetch(url).then(function (res) {
|
|
9424
|
+
return res.blob();
|
|
9425
|
+
}).then(function (blob) {
|
|
9426
|
+
var a = document.createElement('a');
|
|
9427
|
+
document.body.appendChild(a);
|
|
9428
|
+
a.style.display = 'none';
|
|
9429
|
+
var url = window.URL.createObjectURL(blob);
|
|
9430
|
+
a.href = url;
|
|
9431
|
+
a.download = name;
|
|
9432
|
+
a.click();
|
|
9433
|
+
document.body.removeChild(a);
|
|
9434
|
+
window.URL.revokeObjectURL(url);
|
|
9435
|
+
}).finally(function () {
|
|
9436
|
+
setDownloading(false);
|
|
9437
|
+
});
|
|
9438
|
+
};
|
|
9439
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
9440
|
+
onClick: function onClick(e) {
|
|
9441
|
+
e.stopPropagation();
|
|
9442
|
+
},
|
|
9443
|
+
id: id
|
|
9444
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Popover, {
|
|
9445
|
+
getPopupContainer: function getPopupContainer() {
|
|
9446
|
+
return document.getElementById('subform');
|
|
9447
|
+
},
|
|
9448
|
+
content: /*#__PURE__*/React__default['default'].createElement("div", {
|
|
9449
|
+
onClick: function onClick(e) {
|
|
9450
|
+
e.stopPropagation();
|
|
9451
|
+
}
|
|
9452
|
+
}, fileList.map(function (item) {
|
|
9453
|
+
return /*#__PURE__*/React__default['default'].createElement("a", {
|
|
9454
|
+
style: {
|
|
9455
|
+
display: 'block',
|
|
9456
|
+
width: '100%',
|
|
9457
|
+
color: '#1890ff',
|
|
9458
|
+
cursor: 'pointer'
|
|
9459
|
+
},
|
|
9460
|
+
onClick: function onClick(e) {
|
|
9461
|
+
console.log('onPreview');
|
|
9462
|
+
e.preventDefault();
|
|
9463
|
+
onPreview(item);
|
|
9464
|
+
},
|
|
9465
|
+
href: item === null || item === void 0 ? void 0 : item.url
|
|
9466
|
+
}, item.name);
|
|
9467
|
+
})),
|
|
9468
|
+
trigger: "hover",
|
|
9469
|
+
placement: "bottom"
|
|
9470
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
9471
|
+
style: {
|
|
9472
|
+
overflow: 'hidden',
|
|
9473
|
+
textOverflow: 'ellipsis',
|
|
9474
|
+
whiteSpace: 'nowrap'
|
|
9475
|
+
},
|
|
9476
|
+
onClick: function onClick(e) {
|
|
9477
|
+
e.stopPropagation();
|
|
9478
|
+
}
|
|
9479
|
+
}, fileList.map(function (item) {
|
|
9480
|
+
return /*#__PURE__*/React__default['default'].createElement("a", {
|
|
9481
|
+
style: {
|
|
9482
|
+
display: 'block',
|
|
9483
|
+
width: '100%',
|
|
9484
|
+
color: '#1890ff',
|
|
9485
|
+
cursor: 'pointer',
|
|
9486
|
+
overflow: 'hidden',
|
|
9487
|
+
textOverflow: 'ellipsis',
|
|
9488
|
+
whiteSpace: 'nowrap'
|
|
9489
|
+
},
|
|
9490
|
+
onClick: function onClick(e) {
|
|
9491
|
+
e.stopPropagation();
|
|
9492
|
+
e.preventDefault();
|
|
9493
|
+
onPreview(item);
|
|
9494
|
+
},
|
|
9495
|
+
href: item === null || item === void 0 ? void 0 : item.url
|
|
9496
|
+
}, item.name);
|
|
9497
|
+
}))), /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
9498
|
+
visible: visible,
|
|
9499
|
+
title: fileName,
|
|
9500
|
+
footer: null,
|
|
9501
|
+
onCancel: handleCancel,
|
|
9502
|
+
getContainer: function getContainer() {
|
|
9503
|
+
return document.getElementById(id);
|
|
9504
|
+
}
|
|
9505
|
+
}, canDownload ? /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
9506
|
+
type: "link",
|
|
9507
|
+
onClick: function onClick() {
|
|
9508
|
+
return download(fileUrl, fileName);
|
|
9509
|
+
},
|
|
9510
|
+
loading: downloading
|
|
9511
|
+
}, "\u4E0B\u8F7D") : /*#__PURE__*/React__default['default'].createElement(reactCopyToClipboard.CopyToClipboard, {
|
|
9512
|
+
text: fileUrl,
|
|
9513
|
+
onCopy: function onCopy() {
|
|
9514
|
+
antd.message.success('复制成功');
|
|
9515
|
+
}
|
|
9516
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
9517
|
+
type: "link"
|
|
9518
|
+
}, "\u4E0B\u8F7D\u5730\u5740")), /*#__PURE__*/React__default['default'].createElement("div", null, fileType === 'pic' ? /*#__PURE__*/React__default['default'].createElement("img", {
|
|
9519
|
+
alt: "example",
|
|
9520
|
+
style: {
|
|
9521
|
+
width: '100%'
|
|
9522
|
+
},
|
|
9523
|
+
src: fileUrl
|
|
9524
|
+
}) : /*#__PURE__*/React__default['default'].createElement("video", {
|
|
9525
|
+
style: {
|
|
9526
|
+
width: '100%',
|
|
9527
|
+
height: '100%'
|
|
9528
|
+
},
|
|
9529
|
+
autoPlay: true,
|
|
9530
|
+
controls: true,
|
|
9531
|
+
src: fileUrl
|
|
9532
|
+
}))));
|
|
9533
|
+
};
|
|
9534
|
+
var PictureRender = function PictureRender(_ref2) {
|
|
9535
|
+
var _ref2$value = _ref2.value,
|
|
9536
|
+
value = _ref2$value === void 0 ? [] : _ref2$value,
|
|
9537
|
+
_ref2$width = _ref2.width,
|
|
9538
|
+
width = _ref2$width === void 0 ? 32 : _ref2$width;
|
|
9539
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image.PreviewGroup, null, value === null || value === void 0 ? void 0 : value.map(function (pic) {
|
|
9540
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
9541
|
+
style: {
|
|
9542
|
+
marginRight: '5px',
|
|
9543
|
+
display: 'inline-block'
|
|
9544
|
+
},
|
|
9545
|
+
onClick: function onClick(e) {
|
|
9546
|
+
return e.stopPropagation();
|
|
9547
|
+
}
|
|
9548
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
9549
|
+
width: width,
|
|
9550
|
+
src: kmkfUtils.imgResize(pic || ''),
|
|
9551
|
+
preview: {
|
|
9552
|
+
src: kmkfUtils.imgResize(pic || '', 0, 0)
|
|
9553
|
+
}
|
|
9554
|
+
}));
|
|
9555
|
+
}));
|
|
9556
|
+
};
|
|
9557
|
+
var MultipleSelectRender = function MultipleSelectRender(_ref5) {
|
|
9558
|
+
var _ref5$value = _ref5.value,
|
|
9559
|
+
value = _ref5$value === void 0 ? [] : _ref5$value;
|
|
9560
|
+
return value === null || value === void 0 ? void 0 : value.join(',');
|
|
9561
|
+
};
|
|
9562
|
+
var renderMap = {
|
|
9563
|
+
PICTURE: function PICTURE() {
|
|
9564
|
+
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
9565
|
+
var finalPictures = value.map(function (item) {
|
|
9566
|
+
return item.startsWith('http') ? item : "".concat(hostUrl, "/").concat(item);
|
|
9567
|
+
});
|
|
9568
|
+
return /*#__PURE__*/React__default['default'].createElement(PictureRender, {
|
|
9569
|
+
value: finalPictures,
|
|
9570
|
+
hostUrl: 'https://kefu.kuaimai.com'
|
|
9571
|
+
});
|
|
9572
|
+
},
|
|
9573
|
+
FILE: function FILE(value, platform) {
|
|
9574
|
+
return /*#__PURE__*/React__default['default'].createElement(FileRender, {
|
|
9575
|
+
id: "fileRender",
|
|
9576
|
+
fileList: value,
|
|
9577
|
+
canDownload: !['ks', 'fxg', 'xiaozhi'].includes(platform || '')
|
|
9578
|
+
});
|
|
9579
|
+
},
|
|
9580
|
+
CHECKBOX: function CHECKBOX(value) {
|
|
9581
|
+
return /*#__PURE__*/React__default['default'].createElement(MultipleSelectRender, {
|
|
9582
|
+
value: value
|
|
9583
|
+
});
|
|
9584
|
+
},
|
|
9585
|
+
BASIC_MULT_SELECT: function BASIC_MULT_SELECT(value) {
|
|
9586
|
+
return /*#__PURE__*/React__default['default'].createElement(MultipleSelectRender, {
|
|
9587
|
+
value: value
|
|
9588
|
+
});
|
|
9589
|
+
}
|
|
9590
|
+
};
|
|
9591
|
+
var EditPictureRender = function EditPictureRender(_ref6) {
|
|
9592
|
+
var _ref6$val = _ref6.val,
|
|
9593
|
+
val = _ref6$val === void 0 ? [] : _ref6$val,
|
|
9594
|
+
index = _ref6.index,
|
|
9595
|
+
t = _ref6.t,
|
|
9596
|
+
updateHandle = _ref6.updateHandle,
|
|
9597
|
+
disabled = _ref6.disabled,
|
|
9598
|
+
hostUrl = _ref6.hostUrl,
|
|
9599
|
+
platform = _ref6.platform;
|
|
9600
|
+
var finalPictures = val.map(function (item) {
|
|
9601
|
+
return item.startsWith('http') ? item : "".concat(hostUrl, "/").concat(item);
|
|
9602
|
+
});
|
|
9603
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
9604
|
+
style: {
|
|
9605
|
+
display: 'flex',
|
|
9606
|
+
flexWrap: 'wrap',
|
|
9607
|
+
border: '1px solid #d9d9d9',
|
|
9608
|
+
padding: '3px'
|
|
9609
|
+
}
|
|
9610
|
+
}, t.isEdit || disabled ? /*#__PURE__*/React__default['default'].createElement(icons.PlusSquareOutlined, {
|
|
9611
|
+
style: {
|
|
9612
|
+
fontSize: 18,
|
|
9613
|
+
color: '#aaa'
|
|
9614
|
+
}
|
|
9615
|
+
}) : /*#__PURE__*/React__default['default'].createElement(antd.Popover, {
|
|
9616
|
+
getPopupContainer: function getPopupContainer() {
|
|
9617
|
+
return document.getElementById('subform');
|
|
9618
|
+
},
|
|
9619
|
+
content: /*#__PURE__*/React__default['default'].createElement(ApaasUploadAsync$1, _objectSpread2(_objectSpread2({}, t.componentConfig), {}, {
|
|
9620
|
+
value: finalPictures,
|
|
9621
|
+
onChange: function onChange(e) {
|
|
9622
|
+
return updateHandle(e, index, t.key);
|
|
9623
|
+
},
|
|
9624
|
+
hostUrl: hostUrl,
|
|
9625
|
+
uniqueKey: t.key,
|
|
9626
|
+
platform: platform
|
|
9627
|
+
})),
|
|
9628
|
+
trigger: "click"
|
|
9629
|
+
}, /*#__PURE__*/React__default['default'].createElement(icons.PlusSquareOutlined, {
|
|
9630
|
+
style: {
|
|
9631
|
+
fontSize: 18
|
|
9632
|
+
}
|
|
9633
|
+
})), /*#__PURE__*/React__default['default'].createElement(PictureRender, {
|
|
9634
|
+
value: finalPictures,
|
|
9635
|
+
width: 24,
|
|
9636
|
+
hostUrl: hostUrl
|
|
9637
|
+
}));
|
|
9638
|
+
};
|
|
9639
|
+
var EditFileRender = function EditFileRender(_ref7) {
|
|
9640
|
+
var _ref7$val = _ref7.val,
|
|
9641
|
+
val = _ref7$val === void 0 ? [] : _ref7$val,
|
|
9642
|
+
index = _ref7.index,
|
|
9643
|
+
t = _ref7.t,
|
|
9644
|
+
updateHandle = _ref7.updateHandle,
|
|
9645
|
+
disabled = _ref7.disabled,
|
|
9646
|
+
hostUrl = _ref7.hostUrl,
|
|
9647
|
+
platform = _ref7.platform;
|
|
9648
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
9649
|
+
style: {
|
|
9650
|
+
display: 'flex',
|
|
9651
|
+
flexWrap: 'wrap',
|
|
9652
|
+
border: '1px solid #d9d9d9',
|
|
9653
|
+
padding: '3px'
|
|
9654
|
+
}
|
|
9655
|
+
}, t.isEdit || disabled ? /*#__PURE__*/React__default['default'].createElement(icons.PlusSquareOutlined, {
|
|
9656
|
+
style: {
|
|
9657
|
+
fontSize: 18,
|
|
9658
|
+
color: '#aaa'
|
|
9659
|
+
}
|
|
9660
|
+
}) : /*#__PURE__*/React__default['default'].createElement(antd.Popover, {
|
|
9661
|
+
getPopupContainer: function getPopupContainer() {
|
|
9662
|
+
return document.getElementById('subform');
|
|
9663
|
+
},
|
|
9664
|
+
content: /*#__PURE__*/React__default['default'].createElement(ApaasUploadFile, _objectSpread2(_objectSpread2({}, t.componentConfig), {}, {
|
|
9665
|
+
value: val,
|
|
9666
|
+
onChange: function onChange(e) {
|
|
9667
|
+
return updateHandle(e, index, t.key);
|
|
9668
|
+
},
|
|
9669
|
+
hostUrl: hostUrl,
|
|
9670
|
+
platform: platform
|
|
9671
|
+
})),
|
|
9672
|
+
trigger: "click"
|
|
9673
|
+
}, /*#__PURE__*/React__default['default'].createElement(icons.PlusSquareOutlined, {
|
|
9674
|
+
style: {
|
|
9675
|
+
fontSize: 18
|
|
9676
|
+
}
|
|
9677
|
+
})), /*#__PURE__*/React__default['default'].createElement(FileRender, {
|
|
9678
|
+
id: "fileEdit",
|
|
9679
|
+
fileList: val,
|
|
9680
|
+
canDownload: !['ks', 'fxg', 'xiaozhi'].includes(platform)
|
|
9681
|
+
}));
|
|
9682
|
+
};
|
|
9683
|
+
var EditRenderMap = {
|
|
9684
|
+
INPUT: function INPUT(_ref8) {
|
|
9685
|
+
var val = _ref8.val,
|
|
9686
|
+
record = _ref8.record,
|
|
9687
|
+
index = _ref8.index,
|
|
9688
|
+
t = _ref8.t,
|
|
9689
|
+
updateHandle = _ref8.updateHandle,
|
|
9690
|
+
disabled = _ref8.disabled;
|
|
9691
|
+
var precisionValue = t.precision === 'nolimit' ? undefined : t.precision;
|
|
9692
|
+
return !t.isEdit && !disabled ? t.isNumber ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
9693
|
+
style: {
|
|
9694
|
+
width: '100%'
|
|
9695
|
+
},
|
|
9696
|
+
value: val,
|
|
9697
|
+
precision: precisionValue,
|
|
9698
|
+
onChange: function onChange(e) {
|
|
9699
|
+
return updateHandle(e, index, t.key);
|
|
9700
|
+
},
|
|
9701
|
+
stringMode: true
|
|
9702
|
+
}) : /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
9703
|
+
style: {
|
|
9704
|
+
width: '100%'
|
|
9705
|
+
},
|
|
9706
|
+
value: val,
|
|
9707
|
+
onChange: function onChange(e) {
|
|
9708
|
+
var _e$target;
|
|
9709
|
+
return updateHandle(e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value, index, t.key);
|
|
9710
|
+
}
|
|
9711
|
+
}) : /*#__PURE__*/React__default['default'].createElement("div", null, val);
|
|
9712
|
+
},
|
|
9713
|
+
TEXTAREA: function TEXTAREA(_ref9) {
|
|
9714
|
+
var val = _ref9.val,
|
|
9715
|
+
record = _ref9.record,
|
|
9716
|
+
index = _ref9.index,
|
|
9717
|
+
t = _ref9.t,
|
|
9718
|
+
updateHandle = _ref9.updateHandle,
|
|
9719
|
+
disabled = _ref9.disabled;
|
|
9720
|
+
var precisionValue = t.precision === 'nolimit' ? undefined : t.precision;
|
|
9721
|
+
return !t.isEdit && !disabled ? t.isNumber ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
9722
|
+
style: {
|
|
9723
|
+
width: '100%'
|
|
9724
|
+
},
|
|
9725
|
+
value: val,
|
|
9726
|
+
precision: precisionValue,
|
|
9727
|
+
onChange: function onChange(e) {
|
|
9728
|
+
return updateHandle(e, index, t.key);
|
|
9729
|
+
},
|
|
9730
|
+
stringMode: true
|
|
9731
|
+
}) : /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
9732
|
+
style: {
|
|
9733
|
+
width: '100%'
|
|
9734
|
+
},
|
|
9735
|
+
value: val,
|
|
9736
|
+
onChange: function onChange(e) {
|
|
9737
|
+
var _e$target2;
|
|
9738
|
+
return updateHandle(e === null || e === void 0 ? void 0 : (_e$target2 = e.target) === null || _e$target2 === void 0 ? void 0 : _e$target2.value, index, t.key);
|
|
9739
|
+
}
|
|
9740
|
+
}) : /*#__PURE__*/React__default['default'].createElement("div", null, val);
|
|
9741
|
+
},
|
|
9742
|
+
PICTURE: function PICTURE(_ref10) {
|
|
9743
|
+
var val = _ref10.val,
|
|
9744
|
+
record = _ref10.record,
|
|
9745
|
+
index = _ref10.index,
|
|
9746
|
+
t = _ref10.t,
|
|
9747
|
+
updateHandle = _ref10.updateHandle,
|
|
9748
|
+
disabled = _ref10.disabled,
|
|
9749
|
+
platform = _ref10.platform;
|
|
9750
|
+
return /*#__PURE__*/React__default['default'].createElement(EditPictureRender, {
|
|
9751
|
+
val: val,
|
|
9752
|
+
t: t,
|
|
9753
|
+
disabled: disabled,
|
|
9754
|
+
index: index,
|
|
9755
|
+
updateHandle: updateHandle,
|
|
9756
|
+
hostUrl: hostUrl,
|
|
9757
|
+
platform: platform
|
|
9758
|
+
});
|
|
9759
|
+
},
|
|
9760
|
+
FILE: function FILE(_ref11) {
|
|
9761
|
+
var val = _ref11.val,
|
|
9762
|
+
record = _ref11.record,
|
|
9763
|
+
index = _ref11.index,
|
|
9764
|
+
t = _ref11.t,
|
|
9765
|
+
updateHandle = _ref11.updateHandle,
|
|
9766
|
+
disabled = _ref11.disabled,
|
|
9767
|
+
platform = _ref11.platform;
|
|
9768
|
+
return /*#__PURE__*/React__default['default'].createElement(EditFileRender, {
|
|
9769
|
+
val: val,
|
|
9770
|
+
t: t,
|
|
9771
|
+
disabled: disabled,
|
|
9772
|
+
index: index,
|
|
9773
|
+
updateHandle: updateHandle,
|
|
9774
|
+
hostUrl: hostUrl,
|
|
9775
|
+
platform: platform
|
|
9776
|
+
});
|
|
9777
|
+
},
|
|
9778
|
+
RADIO: function RADIO(_ref12) {
|
|
9779
|
+
var val = _ref12.val,
|
|
9780
|
+
record = _ref12.record,
|
|
9781
|
+
index = _ref12.index,
|
|
9782
|
+
t = _ref12.t,
|
|
9783
|
+
updateHandle = _ref12.updateHandle,
|
|
9784
|
+
disabled = _ref12.disabled,
|
|
9785
|
+
componentDto = _ref12.componentDto;
|
|
9786
|
+
return /*#__PURE__*/React__default['default'].createElement(ApaasSelect, _objectSpread2(_objectSpread2({
|
|
9787
|
+
getPopupContainer: function getPopupContainer() {
|
|
9788
|
+
return document.getElementById('subform');
|
|
9789
|
+
}
|
|
9790
|
+
}, componentDto === null || componentDto === void 0 ? void 0 : componentDto.componentConfig), {}, {
|
|
9791
|
+
value: val,
|
|
9792
|
+
disabled: t.isEdit || disabled,
|
|
9793
|
+
allowClear: true,
|
|
9794
|
+
placement: "topLeft",
|
|
9795
|
+
listHeight: 120,
|
|
9796
|
+
onChange: function onChange(e) {
|
|
9797
|
+
return updateHandle(e, index, t.key);
|
|
9798
|
+
}
|
|
9799
|
+
}));
|
|
9800
|
+
},
|
|
9801
|
+
SELECT: function SELECT(_ref13) {
|
|
9802
|
+
var val = _ref13.val,
|
|
9803
|
+
record = _ref13.record,
|
|
9804
|
+
index = _ref13.index,
|
|
9805
|
+
t = _ref13.t,
|
|
9806
|
+
updateHandle = _ref13.updateHandle,
|
|
9807
|
+
disabled = _ref13.disabled,
|
|
9808
|
+
componentDto = _ref13.componentDto;
|
|
9809
|
+
return /*#__PURE__*/React__default['default'].createElement(ApaasSelect, _objectSpread2(_objectSpread2({
|
|
9810
|
+
getPopupContainer: function getPopupContainer() {
|
|
9811
|
+
return document.getElementById('subform');
|
|
9812
|
+
}
|
|
9813
|
+
}, componentDto === null || componentDto === void 0 ? void 0 : componentDto.componentConfig), {}, {
|
|
9814
|
+
value: val,
|
|
9815
|
+
disabled: t.isEdit || disabled,
|
|
9816
|
+
allowClear: true,
|
|
9817
|
+
placement: "topLeft",
|
|
9818
|
+
listHeight: 120,
|
|
9819
|
+
onChange: function onChange(e) {
|
|
9820
|
+
return updateHandle(e, index, t.key);
|
|
9821
|
+
}
|
|
9822
|
+
}));
|
|
9823
|
+
},
|
|
9824
|
+
CHECKBOX: function CHECKBOX(_ref14) {
|
|
9825
|
+
var val = _ref14.val,
|
|
9826
|
+
record = _ref14.record,
|
|
9827
|
+
index = _ref14.index,
|
|
9828
|
+
t = _ref14.t,
|
|
9829
|
+
updateHandle = _ref14.updateHandle,
|
|
9830
|
+
disabled = _ref14.disabled,
|
|
9831
|
+
componentDto = _ref14.componentDto;
|
|
9832
|
+
return /*#__PURE__*/React__default['default'].createElement(ApaasMultipleSelect, _objectSpread2(_objectSpread2({
|
|
9833
|
+
getPopupContainer: function getPopupContainer() {
|
|
9834
|
+
return document.getElementById('subform');
|
|
9835
|
+
}
|
|
9836
|
+
}, componentDto === null || componentDto === void 0 ? void 0 : componentDto.componentConfig), {}, {
|
|
9837
|
+
value: val,
|
|
9838
|
+
placement: "topLeft",
|
|
9839
|
+
listHeight: 120,
|
|
9840
|
+
disabled: t.isEdit || disabled,
|
|
9841
|
+
onChange: function onChange(e) {
|
|
9842
|
+
return updateHandle(e, index, t.key);
|
|
9843
|
+
}
|
|
9844
|
+
}));
|
|
9845
|
+
},
|
|
9846
|
+
BASIC_MULT_SELECT: function BASIC_MULT_SELECT(_ref15) {
|
|
9847
|
+
var val = _ref15.val,
|
|
9848
|
+
record = _ref15.record,
|
|
9849
|
+
index = _ref15.index,
|
|
9850
|
+
t = _ref15.t,
|
|
9851
|
+
updateHandle = _ref15.updateHandle,
|
|
9852
|
+
disabled = _ref15.disabled,
|
|
9853
|
+
componentDto = _ref15.componentDto;
|
|
9854
|
+
return /*#__PURE__*/React__default['default'].createElement(ApaasMultipleSelect, _objectSpread2(_objectSpread2({
|
|
9855
|
+
getPopupContainer: function getPopupContainer() {
|
|
9856
|
+
return document.getElementById('subform');
|
|
9857
|
+
}
|
|
9858
|
+
}, componentDto === null || componentDto === void 0 ? void 0 : componentDto.componentConfig), {}, {
|
|
9859
|
+
value: val,
|
|
9860
|
+
placement: "topLeft",
|
|
9861
|
+
listHeight: 120,
|
|
9862
|
+
disabled: t.isEdit || disabled,
|
|
9863
|
+
onChange: function onChange(e) {
|
|
9864
|
+
return updateHandle(e, index, t.key);
|
|
9865
|
+
}
|
|
9866
|
+
}));
|
|
9867
|
+
}
|
|
9868
|
+
};
|
|
9869
|
+
|
|
8062
9870
|
function HoverTableRowDeleteIcon(_ref) {
|
|
8063
9871
|
var index = _ref.index,
|
|
8064
9872
|
hoveredRowIndex = _ref.hoveredRowIndex,
|
|
@@ -8084,8 +9892,15 @@ function HoverTableRowDeleteIcon(_ref) {
|
|
|
8084
9892
|
|
|
8085
9893
|
var WidgetMap = {
|
|
8086
9894
|
INPUT: 'input',
|
|
8087
|
-
TEXTAREA: 'textarea'
|
|
9895
|
+
TEXTAREA: 'textarea',
|
|
9896
|
+
PICTURE: 'picture',
|
|
9897
|
+
FILE: 'file',
|
|
9898
|
+
RADIO: 'radio',
|
|
9899
|
+
CHECKBOX: 'checkbox',
|
|
9900
|
+
SELECT: 'select',
|
|
9901
|
+
BASIC_MULT_SELECT: 'basicMultSelect'
|
|
8088
9902
|
};
|
|
9903
|
+
var filterComponentType = ['PICTURE', 'FILE'];
|
|
8089
9904
|
var pageSize = 50;
|
|
8090
9905
|
var SubForm = function SubForm(props) {
|
|
8091
9906
|
var _selectOptions$;
|
|
@@ -8134,6 +9949,10 @@ var SubForm = function SubForm(props) {
|
|
|
8134
9949
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
8135
9950
|
hoveredRowIndex = _useState14[0],
|
|
8136
9951
|
setHoveredRowIndex = _useState14[1];
|
|
9952
|
+
var _useState15 = React.useState([]),
|
|
9953
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
9954
|
+
componentDtoList = _useState16[0],
|
|
9955
|
+
setComponentDtoList = _useState16[1];
|
|
8137
9956
|
var updateHandle = function updateHandle(val, index, type) {
|
|
8138
9957
|
if (value === null || value === void 0 ? void 0 : value.length) {
|
|
8139
9958
|
var valueItem = tableHeader.find(function (t) {
|
|
@@ -8187,18 +10006,17 @@ var SubForm = function SubForm(props) {
|
|
|
8187
10006
|
ellipsis: true,
|
|
8188
10007
|
width: t.width,
|
|
8189
10008
|
render: function render(val, record, index) {
|
|
8190
|
-
|
|
8191
|
-
|
|
8192
|
-
|
|
8193
|
-
|
|
8194
|
-
|
|
8195
|
-
|
|
8196
|
-
|
|
8197
|
-
|
|
8198
|
-
|
|
8199
|
-
|
|
8200
|
-
|
|
8201
|
-
stringMode: true
|
|
10009
|
+
return EditRenderMap[t.workOrderComponentType] ? EditRenderMap[t.workOrderComponentType]({
|
|
10010
|
+
val: val,
|
|
10011
|
+
record: record,
|
|
10012
|
+
index: index,
|
|
10013
|
+
t: t,
|
|
10014
|
+
updateHandle: updateHandle,
|
|
10015
|
+
disabled: disabled,
|
|
10016
|
+
componentDto: componentDtoList.find(function (item) {
|
|
10017
|
+
return item.uniqueKey === t.key;
|
|
10018
|
+
}),
|
|
10019
|
+
platform: platform
|
|
8202
10020
|
}) : /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
8203
10021
|
style: {
|
|
8204
10022
|
width: '100%'
|
|
@@ -8208,7 +10026,7 @@ var SubForm = function SubForm(props) {
|
|
|
8208
10026
|
var _e$target;
|
|
8209
10027
|
return updateHandle(e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value, index, t.key);
|
|
8210
10028
|
}
|
|
8211
|
-
})
|
|
10029
|
+
});
|
|
8212
10030
|
}
|
|
8213
10031
|
};
|
|
8214
10032
|
})), [disabled ? {} : {
|
|
@@ -8249,28 +10067,44 @@ var SubForm = function SubForm(props) {
|
|
|
8249
10067
|
return index + 1;
|
|
8250
10068
|
}
|
|
8251
10069
|
}].concat(_toConsumableArray(newTableHeader.map(function (t) {
|
|
8252
|
-
|
|
10070
|
+
var item = {
|
|
8253
10071
|
dataIndex: t.key,
|
|
8254
10072
|
title: t.name,
|
|
8255
10073
|
width: 90
|
|
8256
10074
|
};
|
|
10075
|
+
if (renderMap[t.workOrderComponentType]) {
|
|
10076
|
+
item.render = function (val) {
|
|
10077
|
+
return renderMap[t.workOrderComponentType](val, platform);
|
|
10078
|
+
};
|
|
10079
|
+
}
|
|
10080
|
+
return item;
|
|
8257
10081
|
})));
|
|
8258
10082
|
}, [newTableHeader]);
|
|
8259
10083
|
var valueMap = React.useMemo(function () {
|
|
8260
10084
|
return newTableHeader.reduce(function (prv, next) {
|
|
8261
|
-
|
|
10085
|
+
var item = {
|
|
10086
|
+
key: next.key,
|
|
10087
|
+
workOrderComponentType: next.workOrderComponentType,
|
|
10088
|
+
defaultValue: ''
|
|
10089
|
+
};
|
|
10090
|
+
if (['PICTURE', 'FILE', 'BASIC_MULT_SELECT', 'CHECKBOX'].includes(next.workOrderComponentType)) {
|
|
10091
|
+
item.defaultValue = [];
|
|
10092
|
+
}
|
|
10093
|
+
prv["".concat(next.key, "_").concat(WidgetMap[next.workOrderComponentType])] = item;
|
|
8262
10094
|
return prv;
|
|
8263
10095
|
}, {});
|
|
8264
10096
|
}, [newTableHeader]);
|
|
8265
10097
|
var defaultValueMap = React.useMemo(function () {
|
|
8266
10098
|
return Object.keys(valueMap).reduce(function (prv, next) {
|
|
8267
|
-
prv["".concat(valueMap[next])] =
|
|
10099
|
+
prv["".concat(valueMap[next].key)] = valueMap[next].defaultValue;
|
|
8268
10100
|
return prv;
|
|
8269
10101
|
}, {});
|
|
8270
10102
|
}, [valueMap]);
|
|
8271
10103
|
var selectOptions = React.useMemo(function () {
|
|
8272
10104
|
var _options$;
|
|
8273
|
-
var options = newTableHeader.
|
|
10105
|
+
var options = newTableHeader.filter(function (item) {
|
|
10106
|
+
return !filterComponentType.includes(item.workOrderComponentType);
|
|
10107
|
+
}).map(function (item) {
|
|
8274
10108
|
return {
|
|
8275
10109
|
label: item.name,
|
|
8276
10110
|
value: "".concat(item.key, "_").concat(WidgetMap[item.workOrderComponentType])
|
|
@@ -8312,16 +10146,20 @@ var SubForm = function SubForm(props) {
|
|
|
8312
10146
|
var _ref2,
|
|
8313
10147
|
_ref2$pageNo,
|
|
8314
10148
|
pageNo,
|
|
10149
|
+
_ref2$componentList,
|
|
10150
|
+
componentList,
|
|
8315
10151
|
params,
|
|
8316
10152
|
res,
|
|
8317
10153
|
data,
|
|
8318
10154
|
success,
|
|
10155
|
+
transDataSourceItem,
|
|
10156
|
+
headerKeys,
|
|
8319
10157
|
newList,
|
|
8320
10158
|
_args = arguments;
|
|
8321
10159
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
8322
10160
|
while (1) switch (_context.prev = _context.next) {
|
|
8323
10161
|
case 0:
|
|
8324
|
-
_ref2 = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref2$pageNo = _ref2.pageNo, pageNo = _ref2$pageNo === void 0 ? 1 : _ref2$pageNo;
|
|
10162
|
+
_ref2 = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref2$pageNo = _ref2.pageNo, pageNo = _ref2$pageNo === void 0 ? 1 : _ref2$pageNo, _ref2$componentList = _ref2.componentList, componentList = _ref2$componentList === void 0 ? [] : _ref2$componentList;
|
|
8325
10163
|
if (!disabled) {
|
|
8326
10164
|
_context.next = 3;
|
|
8327
10165
|
break;
|
|
@@ -8362,13 +10200,18 @@ var SubForm = function SubForm(props) {
|
|
|
8362
10200
|
res = _context.sent;
|
|
8363
10201
|
data = res.data, success = res.success;
|
|
8364
10202
|
if (success) {
|
|
10203
|
+
transDataSourceItem = transformWorkOrderData(componentDtoList.length ? componentDtoList : componentList, 'edit');
|
|
10204
|
+
headerKeys = correlationList.map(function (t) {
|
|
10205
|
+
return t.key;
|
|
10206
|
+
});
|
|
8365
10207
|
newList = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
|
|
10208
|
+
var value = transDataSourceItem(item);
|
|
8366
10209
|
var params = {
|
|
8367
10210
|
uuid: kmkfUtils.uuid()
|
|
8368
10211
|
};
|
|
8369
|
-
Object.keys(
|
|
8370
|
-
if (
|
|
8371
|
-
params[
|
|
10212
|
+
Object.keys(value).forEach(function (key) {
|
|
10213
|
+
if (headerKeys.includes(key)) {
|
|
10214
|
+
params[key] = value[key];
|
|
8372
10215
|
}
|
|
8373
10216
|
});
|
|
8374
10217
|
return params;
|
|
@@ -8392,10 +10235,61 @@ var SubForm = function SubForm(props) {
|
|
|
8392
10235
|
return _ref.apply(this, arguments);
|
|
8393
10236
|
};
|
|
8394
10237
|
}();
|
|
10238
|
+
var getTemplateDetail = /*#__PURE__*/function () {
|
|
10239
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
10240
|
+
var _yield$request, templateDetail;
|
|
10241
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
10242
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
10243
|
+
case 0:
|
|
10244
|
+
_context2.next = 2;
|
|
10245
|
+
return extendRequest('/qy/gdfw/template/queryTemplateDetail', {
|
|
10246
|
+
method: 'post',
|
|
10247
|
+
data: {
|
|
10248
|
+
templateType: 'QY_CUSTOM',
|
|
10249
|
+
uniqueKey: workOrderTemplateId
|
|
10250
|
+
}
|
|
10251
|
+
});
|
|
10252
|
+
case 2:
|
|
10253
|
+
_yield$request = _context2.sent;
|
|
10254
|
+
templateDetail = _yield$request.data;
|
|
10255
|
+
setComponentDtoList((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList) || []);
|
|
10256
|
+
return _context2.abrupt("return", (templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList) || []);
|
|
10257
|
+
case 6:
|
|
10258
|
+
case "end":
|
|
10259
|
+
return _context2.stop();
|
|
10260
|
+
}
|
|
10261
|
+
}, _callee2);
|
|
10262
|
+
}));
|
|
10263
|
+
return function getTemplateDetail() {
|
|
10264
|
+
return _ref3.apply(this, arguments);
|
|
10265
|
+
};
|
|
10266
|
+
}();
|
|
10267
|
+
var initHandle = /*#__PURE__*/function () {
|
|
10268
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
10269
|
+
var componentList;
|
|
10270
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
10271
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
10272
|
+
case 0:
|
|
10273
|
+
_context3.next = 2;
|
|
10274
|
+
return getTemplateDetail();
|
|
10275
|
+
case 2:
|
|
10276
|
+
componentList = _context3.sent;
|
|
10277
|
+
getWorkOrderList({
|
|
10278
|
+
pageNo: 1,
|
|
10279
|
+
componentList: componentList
|
|
10280
|
+
});
|
|
10281
|
+
case 4:
|
|
10282
|
+
case "end":
|
|
10283
|
+
return _context3.stop();
|
|
10284
|
+
}
|
|
10285
|
+
}, _callee3);
|
|
10286
|
+
}));
|
|
10287
|
+
return function initHandle() {
|
|
10288
|
+
return _ref4.apply(this, arguments);
|
|
10289
|
+
};
|
|
10290
|
+
}();
|
|
8395
10291
|
React.useEffect(function () {
|
|
8396
|
-
|
|
8397
|
-
pageNo: 1
|
|
8398
|
-
});
|
|
10292
|
+
initHandle();
|
|
8399
10293
|
}, []);
|
|
8400
10294
|
ahooks.useUpdateEffect(function () {
|
|
8401
10295
|
setPageNo(1);
|
|
@@ -8460,7 +10354,7 @@ var SubForm = function SubForm(props) {
|
|
|
8460
10354
|
ref: ref,
|
|
8461
10355
|
onScrollCapture: onScrollCapture,
|
|
8462
10356
|
style: {
|
|
8463
|
-
height:
|
|
10357
|
+
height: 200,
|
|
8464
10358
|
maxWidth: platform !== 'pc' ? '325px' : '700px',
|
|
8465
10359
|
overflowY: 'scroll',
|
|
8466
10360
|
overflowX: 'auto'
|
|
@@ -8498,6 +10392,7 @@ var SubForm = function SubForm(props) {
|
|
|
8498
10392
|
onChangeInput(e.target.value);
|
|
8499
10393
|
}
|
|
8500
10394
|
}))), /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
10395
|
+
id: "subform",
|
|
8501
10396
|
columns: column,
|
|
8502
10397
|
dataSource: value,
|
|
8503
10398
|
rowKey: 'uuid',
|
|
@@ -18290,7 +20185,7 @@ var isErpType = {
|
|
|
18290
20185
|
return ['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type);
|
|
18291
20186
|
}
|
|
18292
20187
|
};
|
|
18293
|
-
var processGoods = function processGoods(_ref) {
|
|
20188
|
+
var processGoods$1 = function processGoods(_ref) {
|
|
18294
20189
|
var list = _ref.list,
|
|
18295
20190
|
type = _ref.type,
|
|
18296
20191
|
canUpdateNumber = _ref.canUpdateNumber,
|
|
@@ -18299,35 +20194,35 @@ var processGoods = function processGoods(_ref) {
|
|
|
18299
20194
|
var newList = [];
|
|
18300
20195
|
// 根据商品类型处理数据
|
|
18301
20196
|
if (isErpType.isWdt(type)) {
|
|
18302
|
-
newList = processWdtGoods({
|
|
20197
|
+
newList = processWdtGoods$1({
|
|
18303
20198
|
list: list,
|
|
18304
20199
|
type: type,
|
|
18305
20200
|
canUpdateNumber: canUpdateNumber,
|
|
18306
20201
|
source: source
|
|
18307
20202
|
});
|
|
18308
20203
|
} else if (isErpType.isBsE3(type)) {
|
|
18309
|
-
newList = processBsE3Goods({
|
|
20204
|
+
newList = processBsE3Goods$1({
|
|
18310
20205
|
list: list,
|
|
18311
20206
|
type: type,
|
|
18312
20207
|
canUpdateNumber: canUpdateNumber,
|
|
18313
20208
|
source: source
|
|
18314
20209
|
});
|
|
18315
20210
|
} else if (isErpType.isGy(type)) {
|
|
18316
|
-
newList = processGyGoods({
|
|
20211
|
+
newList = processGyGoods$1({
|
|
18317
20212
|
list: list,
|
|
18318
20213
|
type: type,
|
|
18319
20214
|
canUpdateNumber: canUpdateNumber,
|
|
18320
20215
|
source: source
|
|
18321
20216
|
});
|
|
18322
20217
|
} else if (isErpType.isJst(type)) {
|
|
18323
|
-
newList = processJstGoods({
|
|
20218
|
+
newList = processJstGoods$1({
|
|
18324
20219
|
list: list,
|
|
18325
20220
|
type: type,
|
|
18326
20221
|
canUpdateNumber: canUpdateNumber,
|
|
18327
20222
|
source: source
|
|
18328
20223
|
});
|
|
18329
20224
|
} else if (isErpType.isKm(type)) {
|
|
18330
|
-
newList = processKmGoods({
|
|
20225
|
+
newList = processKmGoods$1({
|
|
18331
20226
|
list: list,
|
|
18332
20227
|
type: type,
|
|
18333
20228
|
canUpdateNumber: canUpdateNumber,
|
|
@@ -18344,7 +20239,7 @@ var processGoods = function processGoods(_ref) {
|
|
|
18344
20239
|
return newList;
|
|
18345
20240
|
};
|
|
18346
20241
|
// 处理不同类型的商品数据
|
|
18347
|
-
var processWdtGoods = function processWdtGoods(_ref2) {
|
|
20242
|
+
var processWdtGoods$1 = function processWdtGoods(_ref2) {
|
|
18348
20243
|
var list = _ref2.list,
|
|
18349
20244
|
type = _ref2.type,
|
|
18350
20245
|
canUpdateNumber = _ref2.canUpdateNumber;
|
|
@@ -18365,7 +20260,7 @@ var processWdtGoods = function processWdtGoods(_ref2) {
|
|
|
18365
20260
|
return processedItem;
|
|
18366
20261
|
});
|
|
18367
20262
|
};
|
|
18368
|
-
var processBsE3Goods = function processBsE3Goods(_ref3) {
|
|
20263
|
+
var processBsE3Goods$1 = function processBsE3Goods(_ref3) {
|
|
18369
20264
|
var list = _ref3.list,
|
|
18370
20265
|
canUpdateNumber = _ref3.canUpdateNumber;
|
|
18371
20266
|
return list.map(function (item) {
|
|
@@ -18402,7 +20297,7 @@ var processBsE3Goods = function processBsE3Goods(_ref3) {
|
|
|
18402
20297
|
});
|
|
18403
20298
|
});
|
|
18404
20299
|
};
|
|
18405
|
-
var processGyGoods = function processGyGoods(_ref4) {
|
|
20300
|
+
var processGyGoods$1 = function processGyGoods(_ref4) {
|
|
18406
20301
|
var list = _ref4.list,
|
|
18407
20302
|
source = _ref4.source;
|
|
18408
20303
|
var isFormWorkOrder = source === 'workOrder';
|
|
@@ -18431,7 +20326,7 @@ var processGyGoods = function processGyGoods(_ref4) {
|
|
|
18431
20326
|
});
|
|
18432
20327
|
});
|
|
18433
20328
|
};
|
|
18434
|
-
var processJstGoods = function processJstGoods(_ref5) {
|
|
20329
|
+
var processJstGoods$1 = function processJstGoods(_ref5) {
|
|
18435
20330
|
var list = _ref5.list;
|
|
18436
20331
|
return list.map(function (item) {
|
|
18437
20332
|
return {
|
|
@@ -18450,7 +20345,7 @@ var processJstGoods = function processJstGoods(_ref5) {
|
|
|
18450
20345
|
};
|
|
18451
20346
|
});
|
|
18452
20347
|
};
|
|
18453
|
-
var processKmGoods = function processKmGoods(_ref6) {
|
|
20348
|
+
var processKmGoods$1 = function processKmGoods(_ref6) {
|
|
18454
20349
|
var list = _ref6.list,
|
|
18455
20350
|
type = _ref6.type;
|
|
18456
20351
|
var initParamsMap = {
|
|
@@ -18940,7 +20835,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
18940
20835
|
}].concat(_toConsumableArray(columns));
|
|
18941
20836
|
}, []);
|
|
18942
20837
|
var onSubmit = function onSubmit(list) {
|
|
18943
|
-
var newList = processGoods({
|
|
20838
|
+
var newList = processGoods$1({
|
|
18944
20839
|
list: list,
|
|
18945
20840
|
canUpdateNumber: canUpdateNumber,
|
|
18946
20841
|
type: type,
|
|
@@ -24890,3 +26785,4 @@ exports.getSkxColumns = getColumns$7;
|
|
|
24890
26785
|
exports.getWdtColumns = getColumns$2;
|
|
24891
26786
|
exports.getWlnColumns = getColumns$3;
|
|
24892
26787
|
exports.orderSubFormConstants = orderSubFormConstants;
|
|
26788
|
+
exports.renderMap = renderMap;
|