@kmkf-fe-packages/kmkf-work-order-service-component 0.24.1 → 0.25.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -84,7 +84,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
84
84
|
var logisticsMappingConfig = useMemo(function () {
|
|
85
85
|
return templateDetail.componentDtoList.filter(function (item) {
|
|
86
86
|
var _item$componentConfig;
|
|
87
|
-
return item.workOrderComponentType
|
|
87
|
+
return ['LOGISTICS_TRAJECTORY_MORE', 'LOGISTICS_INTERCEPTION_MORE'].includes(item.workOrderComponentType) && ((_item$componentConfig = item.componentConfig) === null || _item$componentConfig === void 0 ? void 0 : _item$componentConfig.isOpen);
|
|
88
88
|
});
|
|
89
89
|
}, [templateDetail]);
|
|
90
90
|
var finallyMappdingHideComponents = useRef(mappingConfig.hideComponents);
|
|
@@ -274,6 +274,43 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
|
|
|
274
274
|
content: get(nowData, "".concat(item.uniqueKey, ".interceptAddress[2]"), ''),
|
|
275
275
|
name: item.name
|
|
276
276
|
});
|
|
277
|
+
} else if (item.workOrderComponentType === 'LOGISTICS_INTERCEPTION_MORE') {
|
|
278
|
+
var logisticsInterceptionList = get(nowData, "".concat(item.uniqueKey), []);
|
|
279
|
+
contentVoList.push({
|
|
280
|
+
uniqueKey: "".concat(item.uniqueKey, "_logisticsInterceptList"),
|
|
281
|
+
content: logisticsInterceptionList,
|
|
282
|
+
name: item.name
|
|
283
|
+
}, {
|
|
284
|
+
uniqueKey: "".concat(item.uniqueKey, "_logisticsInterceptCompanyList"),
|
|
285
|
+
content: logisticsInterceptionList.map(function (t) {
|
|
286
|
+
return t.interceptCompany + '';
|
|
287
|
+
}),
|
|
288
|
+
name: item.name
|
|
289
|
+
}, {
|
|
290
|
+
uniqueKey: "".concat(item.uniqueKey, "_logisticsInterceptCodeList"),
|
|
291
|
+
content: logisticsInterceptionList.map(function (t) {
|
|
292
|
+
return t.interceptCode + '';
|
|
293
|
+
}),
|
|
294
|
+
name: item.name
|
|
295
|
+
}, {
|
|
296
|
+
uniqueKey: "".concat(item.uniqueKey, "_logisticsInterceptTypeList"),
|
|
297
|
+
content: logisticsInterceptionList.map(function (t) {
|
|
298
|
+
return t.interceptType + '';
|
|
299
|
+
}),
|
|
300
|
+
name: item.name
|
|
301
|
+
}, {
|
|
302
|
+
uniqueKey: "".concat(item.uniqueKey, "_logisticsInterceptStatusList"),
|
|
303
|
+
content: logisticsInterceptionList.map(function (t) {
|
|
304
|
+
return t.interceptLogisticsStatus + '';
|
|
305
|
+
}),
|
|
306
|
+
name: item.name
|
|
307
|
+
}, {
|
|
308
|
+
uniqueKey: "".concat(item.uniqueKey, "_logisticsInterceptSnapshotList"),
|
|
309
|
+
content: logisticsInterceptionList.map(function (t) {
|
|
310
|
+
return t.interceptLogisticsSnapshot + '';
|
|
311
|
+
}),
|
|
312
|
+
name: item.name
|
|
313
|
+
});
|
|
277
314
|
} else if (item.workOrderComponentType === 'PICTURE') {
|
|
278
315
|
var _value$map;
|
|
279
316
|
var host = cache.getHost() || window.location.origin;
|
|
@@ -1194,6 +1231,8 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1194
1231
|
interceptLogisticsStatusOther: item.jsonMap["".concat(nex.uniqueKey, "_interceptLogisticsStatusOther")],
|
|
1195
1232
|
interceptLogisticsSnapshot: item.jsonMap["".concat(nex.uniqueKey, "_interceptLogisticsSnapshot")]
|
|
1196
1233
|
}));
|
|
1234
|
+
} else if (nex.workOrderComponentType === 'LOGISTICS_INTERCEPTION_MORE') {
|
|
1235
|
+
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_logisticsInterceptList")], [])));
|
|
1197
1236
|
} else if (nex.workOrderComponentType === 'LOGISTICS_TRAJECTORY') {
|
|
1198
1237
|
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), {
|
|
1199
1238
|
trajectoryCompany: item.jsonMap["".concat(nex.uniqueKey, "_trajectoryCompany")],
|
|
@@ -1217,8 +1256,8 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1217
1256
|
});
|
|
1218
1257
|
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), _itemList));
|
|
1219
1258
|
} else if (nex.workOrderComponentType === 'ENTERPRISE_PAYMENT') {
|
|
1220
|
-
var
|
|
1221
|
-
return _objectSpread(_objectSpread({}, cur), {}, (
|
|
1259
|
+
var _objectSpread42;
|
|
1260
|
+
return _objectSpread(_objectSpread({}, cur), {}, (_objectSpread42 = {}, _defineProperty(_objectSpread42, "".concat(nex.uniqueKey), {
|
|
1222
1261
|
enterprisePaymentAlipayNick: item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentAlipayNick")],
|
|
1223
1262
|
enterprisePaymentAlipayNo: item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentAlipayNo")],
|
|
1224
1263
|
enterprisePaymentBuyerNick: item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentBuyerNick")],
|
|
@@ -1226,7 +1265,7 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1226
1265
|
enterprisePaymentRefundFee: item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentRefundFee")],
|
|
1227
1266
|
enterprisePaymentStatus: item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentStatus")],
|
|
1228
1267
|
enterprisePaymentTid: item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentTid")]
|
|
1229
|
-
}), _defineProperty(
|
|
1268
|
+
}), _defineProperty(_objectSpread42, "".concat(nex.uniqueKey, "_enterprisePaymentAlipayNick"), item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentAlipayNick")]), _defineProperty(_objectSpread42, "".concat(nex.uniqueKey, "_enterprisePaymentAlipayNo"), item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentAlipayNo")]), _defineProperty(_objectSpread42, "".concat(nex.uniqueKey, "_enterprisePaymentBuyerNick"), item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentBuyerNick")]), _defineProperty(_objectSpread42, "".concat(nex.uniqueKey, "_enterprisePaymentRefundFee"), item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentRefundFee")]), _defineProperty(_objectSpread42, "".concat(nex.uniqueKey, "_enterprisePaymentStatus"), item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentStatus")]), _defineProperty(_objectSpread42, "".concat(nex.uniqueKey, "_enterprisePaymentTime"), item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentTime")]), _defineProperty(_objectSpread42, "".concat(nex.uniqueKey, "_enterprisePaymentTid"), item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentTid")]), _objectSpread42));
|
|
1230
1269
|
} else if (nex.workOrderComponentType === 'SYSTEM_ORDER_NO') {
|
|
1231
1270
|
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), item.jsonMap["".concat(nex.uniqueKey, "_systemOrderNo")]));
|
|
1232
1271
|
} else if (nex.workOrderComponentType === 'JST_LOGISTICS') {
|
|
@@ -1505,7 +1544,7 @@ export var calcWorkOrderList = function calcWorkOrderList(source, templateColumn
|
|
|
1505
1544
|
//订单返填
|
|
1506
1545
|
export var orderBack = /*#__PURE__*/function () {
|
|
1507
1546
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
|
1508
|
-
var order_no, form, shopId, shopList, templateDetail, _ref$type, type, callback, fromQNCreateWorkOrderByOrderNo, _ref$plat, plat, JOIN_SHOP, hasBs, hasWln, _ref3, shopSourceStr, _ref3$thirdUserNick, thirdUserNick, _data$value, _jstOrder$value, _jstOrder$value$data, _bsOrder$value, _wlnOrder$value, _bsOrders$orders, _wlnOrders$orders, promise, hasJst, _yield$Promise$allSet, _yield$Promise$allSet2, data, jstOrder, bsOrder, wlnOrder, orderInfo, jstInfo, bsOrders, wlnOrders, bsInfo, wlnInfo, formValue, detail, hasSelectItem, erpPromiseList, list, promises, _detail$itemList, values, _templateDetail$compo, paymentUniqueKey, cacheOrderInfo,
|
|
1547
|
+
var order_no, form, shopId, shopList, templateDetail, _ref$type, type, callback, fromQNCreateWorkOrderByOrderNo, _ref$plat, plat, JOIN_SHOP, hasBs, hasWln, _ref3, shopSourceStr, _ref3$thirdUserNick, thirdUserNick, _data$value, _jstOrder$value, _jstOrder$value$data, _bsOrder$value, _wlnOrder$value, _bsOrders$orders, _wlnOrders$orders, promise, hasJst, _yield$Promise$allSet, _yield$Promise$allSet2, data, jstOrder, bsOrder, wlnOrder, orderInfo, jstInfo, bsOrders, wlnOrders, bsInfo, wlnInfo, formValue, detail, hasSelectItem, erpPromiseList, list, promises, _detail$itemList, values, _templateDetail$compo, paymentUniqueKey, cacheOrderInfo, _objectSpread70, _cacheOrderInfo;
|
|
1509
1548
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1510
1549
|
while (1) switch (_context.prev = _context.next) {
|
|
1511
1550
|
case 0:
|
|
@@ -1707,7 +1746,7 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1707
1746
|
sessionStorage.setItem('cacheOmsOrderInfo', JSON.stringify(_objectSpread(_objectSpread({}, cacheOrderInfo), {}, _defineProperty({}, "".concat(templateDetail.flowTemplateConfig.flowTemplateId, "-").concat(plat.buyerId), _defineProperty({}, plat === null || plat === void 0 ? void 0 : plat.subOrderNo, _objectSpread(_objectSpread({}, formValue), values))))));
|
|
1708
1747
|
} else {
|
|
1709
1748
|
_cacheOrderInfo = JSON.parse(sessionStorage.getItem('cacheOrderInfo') || '{}');
|
|
1710
|
-
sessionStorage.setItem('cacheOrderInfo', JSON.stringify(_objectSpread(_objectSpread({}, _cacheOrderInfo), {}, (
|
|
1749
|
+
sessionStorage.setItem('cacheOrderInfo', JSON.stringify(_objectSpread(_objectSpread({}, _cacheOrderInfo), {}, (_objectSpread70 = {}, _defineProperty(_objectSpread70, order_no, values), _defineProperty(_objectSpread70, "".concat(templateDetail.flowTemplateConfig.flowTemplateId, "-").concat(plat.buyerId), _defineProperty({}, order_no, _objectSpread(_objectSpread({}, formValue), values))), _objectSpread70))));
|
|
1711
1750
|
}
|
|
1712
1751
|
}
|
|
1713
1752
|
// console.log('orderback', values);
|
|
@@ -2083,7 +2122,7 @@ export var bsSystemOrderBackValues = function bsSystemOrderBackValues(_ref6) {
|
|
|
2083
2122
|
//如果没有选择的值不返填,会有两种情况 1.有值为空 2.没有值 为空的时候需要返填
|
|
2084
2123
|
if (!(value !== null && value !== void 0 && value.selectedRows)) return;
|
|
2085
2124
|
var bsGoodsComponent = (_templateList$compone = templateList.componentDtoList) === null || _templateList$compone === void 0 ? void 0 : _templateList$compone.filter(function (item) {
|
|
2086
|
-
return ['BS_GOODS', 'BS_DELIVERY_NO', 'BS_SEND_GOOD', 'BS_LOGISTICS', 'LOGISTICS_TRAJECTORY_MORE'].includes(item.workOrderComponentType);
|
|
2125
|
+
return ['BS_GOODS', 'BS_DELIVERY_NO', 'BS_SEND_GOOD', 'BS_LOGISTICS', 'LOGISTICS_TRAJECTORY_MORE', 'LOGISTICS_INTERCEPTION_MORE'].includes(item.workOrderComponentType);
|
|
2087
2126
|
});
|
|
2088
2127
|
if (!(bsGoodsComponent !== null && bsGoodsComponent !== void 0 && bsGoodsComponent.length)) return;
|
|
2089
2128
|
var bsGoodsValue = form.getFieldValue(bsGoodsComponent[0].uniqueKey);
|
|
@@ -2210,31 +2249,66 @@ export var setLogisticsInfo = function setLogisticsInfo(_ref8) {
|
|
|
2210
2249
|
codeUniqueKey = _componentConfig$logi.codeUniqueKey,
|
|
2211
2250
|
codeType = _componentConfig$logi.codeType;
|
|
2212
2251
|
if (companyUniqueKey === uniqueKey && workOrderComponentType === companyType) {
|
|
2213
|
-
if (
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2252
|
+
if (next.workOrderComponentType === 'LOGISTICS_TRAJECTORY_MORE') {
|
|
2253
|
+
if (companyType === 'INPUT') {
|
|
2254
|
+
prv[next.uniqueKey] = [_objectSpread(_objectSpread({}, logisticsValues === null || logisticsValues === void 0 ? void 0 : logisticsValues[0]), {}, {
|
|
2255
|
+
trajectoryCompany: ExpressData.getInstance().getExpressCodeByName(value, true)
|
|
2256
|
+
})];
|
|
2257
|
+
} else if (companyType === 'EXPRESS_LOGISTICS_SELECT') {
|
|
2258
|
+
prv[next.uniqueKey] = [_objectSpread(_objectSpread({}, logisticsValues === null || logisticsValues === void 0 ? void 0 : logisticsValues[0]), {}, {
|
|
2259
|
+
trajectoryCompany: value.company,
|
|
2260
|
+
trajectoryCode: value.order
|
|
2261
|
+
})];
|
|
2262
|
+
} else if (companyType === 'BS_LOGISTICS') {
|
|
2263
|
+
prv[next.uniqueKey] = value.map(function (item) {
|
|
2264
|
+
return {
|
|
2265
|
+
trajectoryCompany: item.logisticsCompany,
|
|
2266
|
+
trajectoryCode: item.logisticsCode,
|
|
2267
|
+
trajectorySnapshot: '',
|
|
2268
|
+
trajectoryPhone: ''
|
|
2269
|
+
};
|
|
2270
|
+
});
|
|
2271
|
+
}
|
|
2272
|
+
if (codeUniqueKey === uniqueKey && workOrderComponentType === codeType) {
|
|
2273
|
+
if (companyType === 'INPUT') {
|
|
2274
|
+
prv[next.uniqueKey] = [_objectSpread(_objectSpread({}, logisticsValues === null || logisticsValues === void 0 ? void 0 : logisticsValues[0]), {}, {
|
|
2275
|
+
trajectoryCode: value
|
|
2276
|
+
})];
|
|
2277
|
+
}
|
|
2278
|
+
}
|
|
2279
|
+
} else if (next.workOrderComponentType === 'LOGISTICS_INTERCEPTION_MORE') {
|
|
2280
|
+
if (companyType === 'INPUT') {
|
|
2281
|
+
prv[next.uniqueKey] = [_objectSpread(_objectSpread({}, logisticsValues === null || logisticsValues === void 0 ? void 0 : logisticsValues[0]), {}, {
|
|
2282
|
+
interceptCompany: ExpressData.getInstance().getExpressCodeByName(value, true)
|
|
2283
|
+
})];
|
|
2284
|
+
} else if (companyType === 'EXPRESS_LOGISTICS_SELECT') {
|
|
2285
|
+
prv[next.uniqueKey] = [_objectSpread(_objectSpread({}, logisticsValues === null || logisticsValues === void 0 ? void 0 : logisticsValues[0]), {}, {
|
|
2286
|
+
interceptCompany: value.company,
|
|
2287
|
+
interceptCode: value.order
|
|
2288
|
+
})];
|
|
2289
|
+
} else if (companyType === 'BS_LOGISTICS') {
|
|
2290
|
+
prv[next.uniqueKey] = value.map(function (item) {
|
|
2291
|
+
return {
|
|
2292
|
+
interceptCompany: item.logisticsCompany,
|
|
2293
|
+
interceptCode: item.logisticsCode,
|
|
2294
|
+
interceptType: undefined,
|
|
2295
|
+
interceptSenderMobile: undefined,
|
|
2296
|
+
interceptAddress: [],
|
|
2297
|
+
interceptDetail: undefined,
|
|
2298
|
+
interceptReceiverName: undefined,
|
|
2299
|
+
interceptReceiverMobile: undefined,
|
|
2300
|
+
interceptStatus: undefined,
|
|
2301
|
+
interceptOther: undefined
|
|
2302
|
+
};
|
|
2303
|
+
});
|
|
2304
|
+
}
|
|
2305
|
+
if (codeUniqueKey === uniqueKey && workOrderComponentType === codeType) {
|
|
2306
|
+
if (companyType === 'INPUT') {
|
|
2307
|
+
prv[next.uniqueKey] = [_objectSpread(_objectSpread({}, logisticsValues === null || logisticsValues === void 0 ? void 0 : logisticsValues[0]), {}, {
|
|
2308
|
+
interceptCode: value
|
|
2309
|
+
})];
|
|
2310
|
+
}
|
|
2311
|
+
}
|
|
2238
2312
|
}
|
|
2239
2313
|
}
|
|
2240
2314
|
return prv;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/kmkf-work-order-service-component",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0-alpha.0",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@ant-design/icons": "^4.7.0",
|
|
35
|
-
"@kmkf-fe-packages/basic-components": "^0.
|
|
36
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.
|
|
37
|
-
"@kmkf-fe-packages/services-components": "^0.
|
|
35
|
+
"@kmkf-fe-packages/basic-components": "^0.25.0-alpha.0",
|
|
36
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.25.0-alpha.0",
|
|
37
|
+
"@kmkf-fe-packages/services-components": "^0.25.0-alpha.0",
|
|
38
38
|
"@reduxjs/toolkit": "^1.8.5",
|
|
39
39
|
"ahooks": "^3.7.4",
|
|
40
40
|
"copy-to-clipboard": "^3.3.3",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "d78e11602412f0e388413cd529da58f64a5f6429",
|
|
77
77
|
"gitHooks": {
|
|
78
78
|
"pre-commit": "lint-staged"
|
|
79
79
|
}
|