@kmkf-fe-packages/kmkf-work-order-service-component 0.26.0-alpha.2 → 0.26.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/FlowTemplateDetail/components/FormRender/index.js +26 -5
- package/dist/esm/FlowTemplateDetail/index.js +2 -1
- package/dist/esm/WorkOrder/index.js +2 -1
- package/dist/esm/common/utils/tools.d.ts +1 -0
- package/dist/esm/common/utils/tools.js +187 -62
- package/dist/esm/model/servers/api.d.ts +1 -0
- package/dist/esm/model/servers/api.js +10 -0
- package/package.json +5 -5
|
@@ -28,10 +28,10 @@ import { get, some, set, every, cloneDeep, isEmpty, intersection, throttle } fro
|
|
|
28
28
|
import 'moment/locale/zh-cn';
|
|
29
29
|
import { calcWorkOrderList, orderBack, getReplaceWarnValues, COMPONENT_MAP_NAME, EXCLUDE_REPLACE_TOP_COMPONENT,
|
|
30
30
|
// 重复检验不需要展示在顶部的
|
|
31
|
-
INNER_REPLACE_COMPONENT, reversalFormValues, bsSystemOrderBackValues, wlnSystemOrderBackValues, getMappingConfigByTemplateDetail, setLogisticsInfo } from "../../../common/utils/tools";
|
|
31
|
+
INNER_REPLACE_COMPONENT, reversalFormValues, bsSystemOrderBackValues, wlnSystemOrderBackValues, getMappingConfigByTemplateDetail, wdtSystemOrderBackValues, setLogisticsInfo } from "../../../common/utils/tools";
|
|
32
32
|
import { replaceCheck, orderDetail } from "../../../model/servers/api";
|
|
33
33
|
import { factory } from '@kmkf-fe-packages/services-components';
|
|
34
|
-
import { AddressData, ExpressData, ExpressInterceptData, PlatData, LogisticsAddressData, getExpression, formatDisplayConfig, BsAddressData, isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
34
|
+
import { AddressData, ExpressData, ExpressInterceptData, PlatData, LogisticsAddressData, getExpression, formatDisplayConfig, BsAddressData, WdtAddressData, isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
35
35
|
import ShopName from "../ShopName";
|
|
36
36
|
import { PlatForm } from "../../../model/flowTemplateDetail/types";
|
|
37
37
|
import { groupByPreNode, getCurrentNodeModifiedShowHideRule } from "./common";
|
|
@@ -117,6 +117,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
117
117
|
PlatData.getInstance();
|
|
118
118
|
LogisticsAddressData.getInstance();
|
|
119
119
|
BsAddressData.getInstance();
|
|
120
|
+
WdtAddressData.getInstance();
|
|
120
121
|
var _Form$useForm = Form.useForm(),
|
|
121
122
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
122
123
|
preNodeForm = _Form$useForm2[0];
|
|
@@ -132,7 +133,17 @@ var FormRender = function FormRender(props, ref) {
|
|
|
132
133
|
// TODO: 前置节点form单独设置指
|
|
133
134
|
useEffect(function () {
|
|
134
135
|
if (!isEmpty(record)) {
|
|
135
|
-
var
|
|
136
|
+
var preNodeComponentDtoList = cloneDeep((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.preNodeComponentDtoList) || []);
|
|
137
|
+
var componentTemplateConfigVos = cloneDeep((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentTemplateConfigVos) || []);
|
|
138
|
+
preNodeComponentDtoList.forEach(function (item) {
|
|
139
|
+
var currentConfig = componentTemplateConfigVos.find(function (configItem) {
|
|
140
|
+
return configItem.componentUniqueKey === item.uniqueKey;
|
|
141
|
+
});
|
|
142
|
+
if (currentConfig !== null && currentConfig !== void 0 && currentConfig.config) {
|
|
143
|
+
item.componentConfig = currentConfig.config;
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
var transData = calcWorkOrderList([record], preNodeComponentDtoList);
|
|
136
147
|
preNodeForm.setFieldsValue(_objectSpread({}, get(transData, '0', {})));
|
|
137
148
|
fillByShopId(get(transData, '0', {}).shopId);
|
|
138
149
|
}
|
|
@@ -515,6 +526,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
515
526
|
//订单返填
|
|
516
527
|
var changeHandle = function changeHandle(order_no) {
|
|
517
528
|
if (!order_no) return;
|
|
529
|
+
console.log('[订单返填 changeHandle order_no ] >', order_no);
|
|
518
530
|
orderBack({
|
|
519
531
|
order_no: order_no,
|
|
520
532
|
form: form,
|
|
@@ -547,6 +559,13 @@ var FormRender = function FormRender(props, ref) {
|
|
|
547
559
|
form: form
|
|
548
560
|
});
|
|
549
561
|
}
|
|
562
|
+
if (workOrderComponentType === 'WDT_SYSTEM_ORDER') {
|
|
563
|
+
wdtSystemOrderBackValues({
|
|
564
|
+
templateList: templateDetail,
|
|
565
|
+
value: value,
|
|
566
|
+
form: form
|
|
567
|
+
});
|
|
568
|
+
}
|
|
550
569
|
if (logisticsMappingConfig && ['INPUT', 'EXPRESS_LOGISTICS_SELECT', 'BS_LOGISTICS'].includes(workOrderComponentType)) {
|
|
551
570
|
setLogisticsInfo({
|
|
552
571
|
logisticsMappingConfig: logisticsMappingConfig,
|
|
@@ -596,7 +615,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
596
615
|
setShopId(val);
|
|
597
616
|
// 清空表单字段
|
|
598
617
|
var needClearFormFields = get(templateDetail, 'componentDtoList', []).reduce(function (cur, nxt) {
|
|
599
|
-
if (['ITEM_SELECT_THIRD', 'STATUS', 'ITEM_SELECT', 'ITEM_ID', 'ITEM_ENCODE', 'JST_LOGISTICS', 'JST_ITEM_SELECT_THIRD', 'JST_SUPPLY', 'JST_SEND_GOOD', 'BS_GOODS', 'BS_EXCHANGE_GOODS', 'BS_REISSUE_GOODS', 'BS_RETURN_GOODS', 'BS_LOGISTICS', 'BS_SEND_GOOD', 'BS_SYSTEM_ORDER', 'WLN_SYSTEM_ORDER', 'WLN_GOODS', 'WLN_LOGISTICS', 'WLN_SEND_GOOD'].includes(nxt === null || nxt === void 0 ? void 0 : nxt.workOrderComponentType)) {
|
|
618
|
+
if (['ITEM_SELECT_THIRD', 'STATUS', 'ITEM_SELECT', 'ITEM_ID', 'ITEM_ENCODE', 'JST_LOGISTICS', 'JST_ITEM_SELECT_THIRD', 'JST_SUPPLY', 'JST_SEND_GOOD', 'BS_GOODS', 'BS_EXCHANGE_GOODS', 'BS_REISSUE_GOODS', 'BS_RETURN_GOODS', 'BS_LOGISTICS', 'BS_SEND_GOOD', 'BS_SYSTEM_ORDER', 'WLN_SYSTEM_ORDER', 'WLN_GOODS', 'WLN_LOGISTICS', 'WLN_SEND_GOOD', 'WDT_LOGISTICS', 'WDT_SEND_GOOD', 'WDT_SYSTEM_ORDER', 'WDT_REISSUE_GOODS'].includes(nxt === null || nxt === void 0 ? void 0 : nxt.workOrderComponentType)) {
|
|
600
619
|
cur.push(nxt === null || nxt === void 0 ? void 0 : nxt.uniqueKey);
|
|
601
620
|
}
|
|
602
621
|
return cur;
|
|
@@ -634,13 +653,14 @@ var FormRender = function FormRender(props, ref) {
|
|
|
634
653
|
}
|
|
635
654
|
//如果有bs组件 设置成初始值
|
|
636
655
|
var hasBs = get(templateDetail, 'componentDtoList', []).some(function (item) {
|
|
637
|
-
return ['BS_LOGISTICS', 'BS_SEND_GOOD', 'WLN_LOGISTICS', 'WLN_SEND_GOOD'].includes(item.workOrderComponentType);
|
|
656
|
+
return ['BS_LOGISTICS', 'BS_SEND_GOOD', 'WDT_LOGISTICS', 'WDT_SEND_GOOD', 'WLN_LOGISTICS', 'WLN_SEND_GOOD'].includes(item.workOrderComponentType);
|
|
638
657
|
});
|
|
639
658
|
if (hasBs) {
|
|
640
659
|
var bsValue = get(templateDetail, 'componentDtoList', []).reduce(function (prv, next) {
|
|
641
660
|
switch (next.workOrderComponentType) {
|
|
642
661
|
case 'BS_LOGISTICS':
|
|
643
662
|
case 'WLN_LOGISTICS':
|
|
663
|
+
case 'WDT_LOGISTICS':
|
|
644
664
|
prv[next.uniqueKey] = [{
|
|
645
665
|
logisticsCompany: null,
|
|
646
666
|
logisticsCode: null
|
|
@@ -648,6 +668,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
648
668
|
break;
|
|
649
669
|
case 'BS_SEND_GOOD':
|
|
650
670
|
case 'WLN_SEND_GOOD':
|
|
671
|
+
case 'WDT_SEND_GOOD':
|
|
651
672
|
prv[next.uniqueKey] = [{
|
|
652
673
|
sendName: '',
|
|
653
674
|
sendId: ''
|
|
@@ -20,7 +20,7 @@ import { get, find, isEmpty } from 'lodash';
|
|
|
20
20
|
import { useDispatch, useSelector, Provider, batch } from 'react-redux';
|
|
21
21
|
import store from "../model/store";
|
|
22
22
|
import zhCN from 'antd/es/locale/zh_CN';
|
|
23
|
-
import { AddressData, ExpressData, ExpressInterceptData, PlatData, BsAddressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
23
|
+
import { AddressData, ExpressData, ExpressInterceptData, PlatData, BsAddressData, WdtAddressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
24
24
|
import { calcWorkOrderList, deleteCacheOrder } from "../common/utils/tools";
|
|
25
25
|
import { setPlat, fetchPanelInfo, fetchAllFlowOperateRecord, setAction, setVisibleRemarkList, setAddRemarkVisible, setLoading, setClearStore } from "../model/flowTemplateDetail";
|
|
26
26
|
import { selectFlowRecordList, selectRemarkRecordList, selectCurrentNodeDetail, selectTid, selectShopUniqueKey, selectOperateParams, selectFlowStatus, selectCurrentTradeIdWOrkOrderNumber, selectFlowTemplateId, selectLoading, selectWithDrawOrder, selectNodeAssistantMap, selectFlowTemplateType } from "../model/flowTemplateDetail/selector";
|
|
@@ -144,6 +144,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
144
144
|
ExpressInterceptData.getInstance();
|
|
145
145
|
PlatData.getInstance();
|
|
146
146
|
BsAddressData.getInstance();
|
|
147
|
+
WdtAddressData.getInstance();
|
|
147
148
|
};
|
|
148
149
|
var onUpdateRemark = function onUpdateRemark(remark) {
|
|
149
150
|
var flag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
@@ -22,7 +22,7 @@ import { fetchQueryCurrentCompanyUser } from "../model/workOrder";
|
|
|
22
22
|
import { fetchLogicFlowList } from "../model/logicFlow";
|
|
23
23
|
import { setCurrentBuyerChecked, showPayment } from "../model/customizeWorkOrder";
|
|
24
24
|
import store from "../model/store";
|
|
25
|
-
import { AddressData, BsAddressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
25
|
+
import { AddressData, BsAddressData, WdtAddressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
26
26
|
import OrderList from "./components/WorkOrderList";
|
|
27
27
|
import Reminder from "./components/Reminder";
|
|
28
28
|
import PaymentWorkOrderList from "./components/PaymentWorkOrderList";
|
|
@@ -113,6 +113,7 @@ var WorkOrder = function WorkOrder(props) {
|
|
|
113
113
|
// ExpressData.getInstance();
|
|
114
114
|
AddressData.getInstance().initData();
|
|
115
115
|
BsAddressData.getInstance().initData();
|
|
116
|
+
WdtAddressData.getInstance().initData();
|
|
116
117
|
// ExpressInterceptData.getInstance();
|
|
117
118
|
};
|
|
118
119
|
//判断是否店铺是否授权
|
|
@@ -103,6 +103,7 @@ export declare const deleteCacheOrder: ({ templateList, values, nodeId, flowTemp
|
|
|
103
103
|
}) => void;
|
|
104
104
|
export declare const bsSystemOrderBackValues: ({ templateList, value, form }: any) => void;
|
|
105
105
|
export declare const wlnSystemOrderBackValues: ({ templateList, value, form }: any) => void;
|
|
106
|
+
export declare const wdtSystemOrderBackValues: ({ templateList, value, form }: any) => void;
|
|
106
107
|
export declare const getMappingConfigByTemplateDetail: (templateDetail: {
|
|
107
108
|
componentDtoList: any;
|
|
108
109
|
uniqueKey: string;
|
|
@@ -19,9 +19,9 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
19
19
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
20
20
|
import { get, every, maxBy } from 'lodash';
|
|
21
21
|
import V from 'voca';
|
|
22
|
-
import { orderDetail, jstOrderDetail, bsOrderDetail, wlnOrderDetail } from "../../model/servers/api";
|
|
22
|
+
import { orderDetail, jstOrderDetail, bsOrderDetail, wlnOrderDetail, wdtOrderDetail } from "../../model/servers/api";
|
|
23
23
|
import moment from 'moment';
|
|
24
|
-
import { AddressData, ExpressData, orderBackFormValues, bsOrderBackFormValues, wlnOrderBackFormValues, findLabelBySelectValue, request, isNull, bsOrderTransform, wlnOrderTransform, unTransField } from '@kmkf-fe-packages/kmkf-utils';
|
|
24
|
+
import { AddressData, ExpressData, orderBackFormValues, bsOrderBackFormValues, wlnOrderBackFormValues, wdtOrderBackFormValues, findLabelBySelectValue, request, isNull, bsOrderTransform, wlnOrderTransform, wdtOrderTransform, unTransField } from '@kmkf-fe-packages/kmkf-utils';
|
|
25
25
|
import { cloneDeep, isEqual, set } from 'lodash';
|
|
26
26
|
import Monitor from 'kmkf-monitor';
|
|
27
27
|
import { PlatForm } from "../../model/flowTemplateDetail/types";
|
|
@@ -644,7 +644,7 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
|
|
|
644
644
|
}),
|
|
645
645
|
name: item.name
|
|
646
646
|
});
|
|
647
|
-
} else if (['BS_LOGISTICS', 'WLN_LOGISTICS'].includes(item.workOrderComponentType)) {
|
|
647
|
+
} else if (['BS_LOGISTICS', 'WLN_LOGISTICS', 'WDT_LOGISTICS'].includes(item.workOrderComponentType)) {
|
|
648
648
|
var logisticsMap = {
|
|
649
649
|
BS_LOGISTICS: {
|
|
650
650
|
list: 'bsLogisticsList',
|
|
@@ -655,6 +655,11 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
|
|
|
655
655
|
list: 'wlnLogisticsList',
|
|
656
656
|
company: 'wlnLogisticsCompany',
|
|
657
657
|
code: 'wlnLogisticsCode'
|
|
658
|
+
},
|
|
659
|
+
WDT_LOGISTICS: {
|
|
660
|
+
list: 'wdtLogisticsList',
|
|
661
|
+
company: 'wdtLogisticsCompany',
|
|
662
|
+
code: 'wdtLogisticsCode'
|
|
658
663
|
}
|
|
659
664
|
};
|
|
660
665
|
var bsLogisticsList = get(nowData, "".concat(item.uniqueKey), []);
|
|
@@ -690,7 +695,7 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
|
|
|
690
695
|
}),
|
|
691
696
|
name: item.name
|
|
692
697
|
});
|
|
693
|
-
} else if (['BS_SEND_GOOD', 'WLN_SEND_GOOD'].includes(item.workOrderComponentType)) {
|
|
698
|
+
} else if (['BS_SEND_GOOD', 'WLN_SEND_GOOD', 'WDT_SEND_GOOD'].includes(item.workOrderComponentType)) {
|
|
694
699
|
var sendGoodMap = {
|
|
695
700
|
BS_SEND_GOOD: {
|
|
696
701
|
list: 'bsSendGood',
|
|
@@ -701,6 +706,11 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
|
|
|
701
706
|
list: 'wlnSendGood',
|
|
702
707
|
id: 'wlnSendId',
|
|
703
708
|
name: 'wlnSendName'
|
|
709
|
+
},
|
|
710
|
+
WDT_SEND_GOOD: {
|
|
711
|
+
list: 'wdtSendGood',
|
|
712
|
+
id: 'wdtSendId',
|
|
713
|
+
name: 'wdtSendName'
|
|
704
714
|
}
|
|
705
715
|
};
|
|
706
716
|
var bsSendList = get(nowData, "".concat(item.uniqueKey), []);
|
|
@@ -764,16 +774,26 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
|
|
|
764
774
|
}),
|
|
765
775
|
name: item.name
|
|
766
776
|
});
|
|
767
|
-
} else if (item.workOrderComponentType
|
|
768
|
-
var
|
|
777
|
+
} else if (['BS_GOODS', 'WDT_GOODS'].includes(item.workOrderComponentType)) {
|
|
778
|
+
var gooodsMap = {
|
|
779
|
+
BS_GOODS: {
|
|
780
|
+
type: 'bsGoods',
|
|
781
|
+
shopCode: 'shopCode'
|
|
782
|
+
},
|
|
783
|
+
WDT_GOODS: {
|
|
784
|
+
type: 'wdtGoods',
|
|
785
|
+
shopCode: 'shopCode'
|
|
786
|
+
}
|
|
787
|
+
};
|
|
788
|
+
var goods = get(nowData, "".concat(item.uniqueKey), {});
|
|
769
789
|
contentVoList.push({
|
|
770
|
-
uniqueKey: "".concat(item.uniqueKey, "
|
|
771
|
-
content:
|
|
790
|
+
uniqueKey: "".concat(item.uniqueKey, "_").concat(gooodsMap[item.workOrderComponentType].type),
|
|
791
|
+
content: goods === null || goods === void 0 ? void 0 : goods[gooodsMap[item.workOrderComponentType].type],
|
|
772
792
|
name: item.name
|
|
773
793
|
});
|
|
774
794
|
contentVoList.push({
|
|
775
|
-
uniqueKey: "".concat(item.uniqueKey, "
|
|
776
|
-
content: (
|
|
795
|
+
uniqueKey: "".concat(item.uniqueKey, "_").concat(gooodsMap[item.workOrderComponentType].shopCode),
|
|
796
|
+
content: (goods === null || goods === void 0 ? void 0 : goods[gooodsMap[item.workOrderComponentType].shopCode]) || '',
|
|
777
797
|
name: item.name
|
|
778
798
|
});
|
|
779
799
|
} else if (item.workOrderComponentType === 'BS_EXCHANGE_GOODS') {
|
|
@@ -826,21 +846,33 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
|
|
|
826
846
|
name: item.name
|
|
827
847
|
});
|
|
828
848
|
}
|
|
829
|
-
} else if (item.workOrderComponentType
|
|
830
|
-
var
|
|
849
|
+
} else if (['BS_REISSUE_GOODS', 'WDT_REISSUE_GOODS'].includes(item.workOrderComponentType)) {
|
|
850
|
+
var reissueMap = {
|
|
851
|
+
BS_REISSUE_GOODS: {
|
|
852
|
+
type: 'bsReissueType',
|
|
853
|
+
goods: 'bsReissueGoods',
|
|
854
|
+
shopCode: 'shopCode'
|
|
855
|
+
},
|
|
856
|
+
WDT_REISSUE_GOODS: {
|
|
857
|
+
type: 'wdtReissueType',
|
|
858
|
+
goods: 'wdtReissueGoods',
|
|
859
|
+
shopCode: 'shopCode'
|
|
860
|
+
}
|
|
861
|
+
};
|
|
862
|
+
var reissue = get(nowData, "".concat(item.uniqueKey), {});
|
|
831
863
|
contentVoList.push({
|
|
832
|
-
uniqueKey: "".concat(item.uniqueKey, "
|
|
833
|
-
content:
|
|
864
|
+
uniqueKey: "".concat(item.uniqueKey, "_").concat(reissueMap[item.workOrderComponentType].type),
|
|
865
|
+
content: reissue === null || reissue === void 0 ? void 0 : reissue[reissueMap[item.workOrderComponentType].type],
|
|
834
866
|
name: item.name
|
|
835
867
|
});
|
|
836
868
|
contentVoList.push({
|
|
837
|
-
uniqueKey: "".concat(item.uniqueKey, "
|
|
838
|
-
content:
|
|
869
|
+
uniqueKey: "".concat(item.uniqueKey, "_").concat(reissueMap[item.workOrderComponentType].goods),
|
|
870
|
+
content: reissue === null || reissue === void 0 ? void 0 : reissue[reissueMap[item.workOrderComponentType].goods],
|
|
839
871
|
name: item.name
|
|
840
872
|
});
|
|
841
873
|
contentVoList.push({
|
|
842
|
-
uniqueKey: "".concat(item.uniqueKey, "
|
|
843
|
-
content: (
|
|
874
|
+
uniqueKey: "".concat(item.uniqueKey, "_").concat(reissueMap[item.workOrderComponentType].shopCode),
|
|
875
|
+
content: (reissue === null || reissue === void 0 ? void 0 : reissue.shopCode) || '',
|
|
844
876
|
name: item.name
|
|
845
877
|
});
|
|
846
878
|
} else if (item.workOrderComponentType === 'BS_RETURN_GOODS') {
|
|
@@ -886,7 +918,7 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
|
|
|
886
918
|
content: get(nowData, "".concat(item.uniqueKey, ".postingReceiverMobile"), ''),
|
|
887
919
|
name: item.name
|
|
888
920
|
});
|
|
889
|
-
} else if (['BS_SYSTEM_ORDER', 'WLN_SYSTEM_ORDER'].includes(item.workOrderComponentType)) {
|
|
921
|
+
} else if (['BS_SYSTEM_ORDER', 'WLN_SYSTEM_ORDER', 'WDT_SYSTEM_ORDER'].includes(item.workOrderComponentType)) {
|
|
890
922
|
var systemOrderMap = {
|
|
891
923
|
BS_SYSTEM_ORDER: {
|
|
892
924
|
no: 'bsSystemOrderNo',
|
|
@@ -897,6 +929,11 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
|
|
|
897
929
|
no: 'wlnSystemOrderNo',
|
|
898
930
|
ids: 'wlnSystemSelectIds',
|
|
899
931
|
order: 'wlnSystemShowOrder'
|
|
932
|
+
},
|
|
933
|
+
WDT_SYSTEM_ORDER: {
|
|
934
|
+
no: 'wdtSystemOrderNo',
|
|
935
|
+
ids: 'wdtSystemSelectIds',
|
|
936
|
+
order: 'wdtSystemShowOrder'
|
|
900
937
|
}
|
|
901
938
|
};
|
|
902
939
|
var selectIds = get(nowData, "".concat(item.uniqueKey, ".selectIds"), '');
|
|
@@ -1068,9 +1105,12 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1068
1105
|
} else if (nex.workOrderComponentType === 'FILE') {
|
|
1069
1106
|
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_file")], [])));
|
|
1070
1107
|
} else if (nex.workOrderComponentType === 'POSTING') {
|
|
1071
|
-
|
|
1108
|
+
// PS: 旺店通收寄地址和其他的统一用code, 所以固定需要转,代码先保留
|
|
1109
|
+
var needTrans = true;
|
|
1110
|
+
// const needTrans = nex.componentConfig?.showField !== 'wdt'
|
|
1111
|
+
var address = [needTrans ? transTextToNumber(item.jsonMap["".concat(nex.uniqueKey, "_postingProvince")]) : item.jsonMap["".concat(nex.uniqueKey, "_postingProvince")], needTrans ? transTextToNumber(item.jsonMap["".concat(nex.uniqueKey, "_postingCity")]) : item.jsonMap["".concat(nex.uniqueKey, "_postingCity")]];
|
|
1072
1112
|
//兼容地址是只有省市的
|
|
1073
|
-
var interceptDistrict = transTextToNumber(item.jsonMap["".concat(nex.uniqueKey, "_postingDistrict")]);
|
|
1113
|
+
var interceptDistrict = needTrans ? transTextToNumber(item.jsonMap["".concat(nex.uniqueKey, "_postingDistrict")]) : item.jsonMap["".concat(nex.uniqueKey, "_postingDistrict")];
|
|
1074
1114
|
interceptDistrict && address.push(interceptDistrict);
|
|
1075
1115
|
address = every(address, function (item) {
|
|
1076
1116
|
return !item;
|
|
@@ -1319,13 +1359,16 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1319
1359
|
reason: '',
|
|
1320
1360
|
systemOrderId: ''
|
|
1321
1361
|
}])));
|
|
1322
|
-
} else if (['BS_LOGISTICS', 'WLN_LOGISTICS'].includes(nex.workOrderComponentType)) {
|
|
1362
|
+
} else if (['BS_LOGISTICS', 'WLN_LOGISTICS', 'WDT_LOGISTICS'].includes(nex.workOrderComponentType)) {
|
|
1323
1363
|
var LogisticsMap = {
|
|
1324
1364
|
BS_LOGISTICS: {
|
|
1325
1365
|
listKey: 'bsLogisticsList'
|
|
1326
1366
|
},
|
|
1327
1367
|
WLN_LOGISTICS: {
|
|
1328
1368
|
listKey: 'wlnLogisticsList'
|
|
1369
|
+
},
|
|
1370
|
+
WDT_LOGISTICS: {
|
|
1371
|
+
listKey: 'wdtLogisticsList'
|
|
1329
1372
|
}
|
|
1330
1373
|
};
|
|
1331
1374
|
var _itemList7 = jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_").concat(LogisticsMap[nex.workOrderComponentType].listKey)], [{
|
|
@@ -1336,13 +1379,16 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1336
1379
|
logisticsCompany: null,
|
|
1337
1380
|
logisticsCode: null
|
|
1338
1381
|
}]));
|
|
1339
|
-
} else if (['BS_SEND_GOOD', 'WLN_SEND_GOOD'].includes(nex.workOrderComponentType)) {
|
|
1382
|
+
} else if (['BS_SEND_GOOD', 'WLN_SEND_GOOD', 'WDT_SEND_GOOD'].includes(nex.workOrderComponentType)) {
|
|
1340
1383
|
var sendGoodMap = {
|
|
1341
1384
|
BS_SEND_GOOD: {
|
|
1342
1385
|
list: 'bsSendGood'
|
|
1343
1386
|
},
|
|
1344
1387
|
WLN_SEND_GOOD: {
|
|
1345
1388
|
list: 'wlnSendGood'
|
|
1389
|
+
},
|
|
1390
|
+
WDT_SEND_GOOD: {
|
|
1391
|
+
list: 'wdtSendGood'
|
|
1346
1392
|
}
|
|
1347
1393
|
};
|
|
1348
1394
|
var _itemList8 = jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_").concat(sendGoodMap[nex.workOrderComponentType].list)], [{
|
|
@@ -1367,11 +1413,19 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1367
1413
|
postingReceiverName: item.jsonMap["".concat(nex.uniqueKey, "_bsPostingReceiverName")],
|
|
1368
1414
|
postingReceiverMobile: item.jsonMap["".concat(nex.uniqueKey, "_bsPostingReceiverMobile")]
|
|
1369
1415
|
}));
|
|
1370
|
-
} else if (nex.workOrderComponentType
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1416
|
+
} else if (['BS_GOODS', 'WDT_GOODS'].includes(nex.workOrderComponentType)) {
|
|
1417
|
+
var _$concat;
|
|
1418
|
+
var gooodsMap = {
|
|
1419
|
+
BS_GOODS: {
|
|
1420
|
+
type: 'bsGoods',
|
|
1421
|
+
shopCode: 'shopCode'
|
|
1422
|
+
},
|
|
1423
|
+
WDT_GOODS: {
|
|
1424
|
+
type: 'wdtGoods',
|
|
1425
|
+
shopCode: 'shopCode'
|
|
1426
|
+
}
|
|
1427
|
+
};
|
|
1428
|
+
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), (_$concat = {}, _defineProperty(_$concat, gooodsMap[nex.workOrderComponentType].type, jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_").concat(gooodsMap[nex.workOrderComponentType].type)], [])), _defineProperty(_$concat, gooodsMap[nex.workOrderComponentType].shopCode, item.jsonMap["".concat(nex.uniqueKey, "_").concat(gooodsMap[nex.workOrderComponentType].shopCode)]), _$concat)));
|
|
1375
1429
|
} else if (nex.workOrderComponentType === 'BS_REISSUE_GOODS') {
|
|
1376
1430
|
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), {
|
|
1377
1431
|
bsReissueType: jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_bsReissueType")], []),
|
|
@@ -1426,7 +1480,7 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1426
1480
|
bsReturnGoods: jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_bsReturnGoods")], []),
|
|
1427
1481
|
shopCode: item.jsonMap["".concat(nex.uniqueKey, "_shopCode")]
|
|
1428
1482
|
}));
|
|
1429
|
-
} else if (['BS_SYSTEM_ORDER', 'WLN_SYSTEM_ORDER'].includes(nex.workOrderComponentType)) {
|
|
1483
|
+
} else if (['BS_SYSTEM_ORDER', 'WLN_SYSTEM_ORDER', 'WDT_SYSTEM_ORDER'].includes(nex.workOrderComponentType)) {
|
|
1430
1484
|
var systemOrderMap = {
|
|
1431
1485
|
BS_SYSTEM_ORDER: {
|
|
1432
1486
|
no: 'bsSystemOrderNo',
|
|
@@ -1437,6 +1491,11 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1437
1491
|
no: 'wlnSystemOrderNo',
|
|
1438
1492
|
ids: 'wlnSystemSelectIds',
|
|
1439
1493
|
order: 'wlnSystemShowOrder'
|
|
1494
|
+
},
|
|
1495
|
+
WDT_SYSTEM_ORDER: {
|
|
1496
|
+
no: 'wdtSystemOrderNo',
|
|
1497
|
+
ids: 'wdtSystemSelectIds',
|
|
1498
|
+
order: 'wdtSystemShowOrder'
|
|
1440
1499
|
}
|
|
1441
1500
|
};
|
|
1442
1501
|
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), {
|
|
@@ -1484,6 +1543,12 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1484
1543
|
wlnGoods: jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_wlnGoods")], []),
|
|
1485
1544
|
shopCode: item.jsonMap["".concat(nex.uniqueKey, "_shopCode")]
|
|
1486
1545
|
}));
|
|
1546
|
+
} else if (nex.workOrderComponentType === 'WDT_REISSUE_GOODS') {
|
|
1547
|
+
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), {
|
|
1548
|
+
wdtReissueType: jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_wdtReissueType")], []),
|
|
1549
|
+
wdtReissueGoods: jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_wdtReissueGoods")], []),
|
|
1550
|
+
shopCode: item.jsonMap["".concat(nex.uniqueKey, "_shopCode")]
|
|
1551
|
+
}));
|
|
1487
1552
|
}
|
|
1488
1553
|
}, {});
|
|
1489
1554
|
};
|
|
@@ -1505,7 +1570,7 @@ export var calcWorkOrderList = function calcWorkOrderList(source, templateColumn
|
|
|
1505
1570
|
//订单返填
|
|
1506
1571
|
export var orderBack = /*#__PURE__*/function () {
|
|
1507
1572
|
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,
|
|
1573
|
+
var order_no, form, shopId, shopList, templateDetail, _ref$type, type, callback, fromQNCreateWorkOrderByOrderNo, _ref$plat, plat, JOIN_SHOP, hasBs, hasWdt, hasWln, _ref3, shopSourceStr, _ref3$thirdUserNick, thirdUserNick, _data$value, _jstOrder$value, _jstOrder$value$data, _bsOrder$value, _wlnOrder$value, _wdtOrder$value, _bsOrders$orders, _wlnOrders$orders, promise, hasJst, _yield$Promise$allSet, _yield$Promise$allSet2, data, jstOrder, bsOrder, wlnOrder, wdtOrder, orderInfo, jstInfo, bsOrders, wlnOrders, wdtOrders, bsInfo, wlnInfo, wdtInfo, formValue, detail, hasSelectItem, erpPromiseList, list, promises, _detail$itemList, values, _templateDetail$compo, paymentUniqueKey, cacheOrderInfo, _objectSpread70, _cacheOrderInfo;
|
|
1509
1574
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1510
1575
|
while (1) switch (_context.prev = _context.next) {
|
|
1511
1576
|
case 0:
|
|
@@ -1514,18 +1579,28 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1514
1579
|
JOIN_SHOP = shopList.find(function (item) {
|
|
1515
1580
|
return !item.notJoin && item.shopId == shopId;
|
|
1516
1581
|
}); //判断是否有百胜组件 有就请求bs订单接口
|
|
1517
|
-
hasBs = HasFilterHandle(templateDetail, ['BS_SIGNING_TIME', 'BS_SEND_TIME', 'BS_TRADE_PAYMENT_TIME', 'BS_NET_RECEIPTS', 'BS_PACKAGE_WEIGHT', 'BS_GOODS', 'BS_DEPOSIT', 'BS_LOGISTICS', 'BS_SEND_GOOD', 'BS_POSTING', 'BS_SYSTEM_ORDER', 'BS_DELIVERY_NO']);
|
|
1582
|
+
hasBs = HasFilterHandle(templateDetail, ['BS_SIGNING_TIME', 'BS_SEND_TIME', 'BS_TRADE_PAYMENT_TIME', 'BS_NET_RECEIPTS', 'BS_PACKAGE_WEIGHT', 'BS_GOODS', 'BS_DEPOSIT', 'BS_LOGISTICS', 'BS_SEND_GOOD', 'BS_POSTING', 'BS_SYSTEM_ORDER', 'BS_DELIVERY_NO']); //判断是否有旺店通组件 有就请求wdt订单接口
|
|
1583
|
+
hasWdt = HasFilterHandle(templateDetail, ['WDT_SYSTEM_ORDER', 'WDT_GOODS', 'WDT_LOGISTICS', 'WDT_SEND_GOOD'
|
|
1584
|
+
// 'WDT_SIGNING_TIME',
|
|
1585
|
+
// 'WDT_SEND_TIME',
|
|
1586
|
+
// 'WDT_TRADE_PAYMENT_TIME',
|
|
1587
|
+
// 'WDT_NET_RECEIPTS',
|
|
1588
|
+
// 'WDT_PACKAGE_WEIGHT',
|
|
1589
|
+
// 'WDT_DEPOSIT',
|
|
1590
|
+
// 'WDT_POSTING',
|
|
1591
|
+
// 'WDT_DELIVERY_NO',
|
|
1592
|
+
]); //判断是否有万里牛组件 有就请求wln订单接口
|
|
1518
1593
|
hasWln = HasFilterHandle(templateDetail, ['WLN_SYSTEM_ORDER', 'WLN_GOODS', 'WLN_LOGISTICS', 'WLN_SEND_GOOD']); //如果不是对接店铺且百胜组件都没有
|
|
1519
|
-
if (!(!JOIN_SHOP && !hasBs && !hasWln)) {
|
|
1520
|
-
_context.next =
|
|
1594
|
+
if (!(!JOIN_SHOP && !hasBs && !hasWln && !hasWdt)) {
|
|
1595
|
+
_context.next = 7;
|
|
1521
1596
|
break;
|
|
1522
1597
|
}
|
|
1523
1598
|
return _context.abrupt("return");
|
|
1524
|
-
case
|
|
1599
|
+
case 7:
|
|
1525
1600
|
_ref3 = shopList.find(function (item) {
|
|
1526
1601
|
return item.shopId == shopId;
|
|
1527
1602
|
}) || {}, shopSourceStr = _ref3.shopSourceStr, _ref3$thirdUserNick = _ref3.thirdUserNick, thirdUserNick = _ref3$thirdUserNick === void 0 ? '' : _ref3$thirdUserNick;
|
|
1528
|
-
_context.prev =
|
|
1603
|
+
_context.prev = 8;
|
|
1529
1604
|
promise = [];
|
|
1530
1605
|
if (!JOIN_SHOP) {
|
|
1531
1606
|
promise.push(new Promise(function (resolve) {
|
|
@@ -1576,21 +1651,32 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1576
1651
|
resolve({});
|
|
1577
1652
|
}));
|
|
1578
1653
|
}
|
|
1579
|
-
|
|
1654
|
+
if (hasWdt) {
|
|
1655
|
+
promise.push(wdtOrderDetail({
|
|
1656
|
+
billNo: order_no
|
|
1657
|
+
}));
|
|
1658
|
+
} else {
|
|
1659
|
+
promise.push(new Promise(function (resolve) {
|
|
1660
|
+
resolve([]);
|
|
1661
|
+
}));
|
|
1662
|
+
}
|
|
1663
|
+
_context.next = 18;
|
|
1580
1664
|
return Promise.allSettled(promise);
|
|
1581
|
-
case
|
|
1665
|
+
case 18:
|
|
1582
1666
|
_yield$Promise$allSet = _context.sent;
|
|
1583
|
-
_yield$Promise$allSet2 = _slicedToArray(_yield$Promise$allSet,
|
|
1667
|
+
_yield$Promise$allSet2 = _slicedToArray(_yield$Promise$allSet, 5);
|
|
1584
1668
|
data = _yield$Promise$allSet2[0];
|
|
1585
1669
|
jstOrder = _yield$Promise$allSet2[1];
|
|
1586
1670
|
bsOrder = _yield$Promise$allSet2[2];
|
|
1587
1671
|
wlnOrder = _yield$Promise$allSet2[3];
|
|
1672
|
+
wdtOrder = _yield$Promise$allSet2[4];
|
|
1588
1673
|
orderInfo = (data === null || data === void 0 ? void 0 : (_data$value = data.value) === null || _data$value === void 0 ? void 0 : _data$value.data) || {};
|
|
1589
1674
|
jstInfo = (jstOrder === null || jstOrder === void 0 ? void 0 : (_jstOrder$value = jstOrder.value) === null || _jstOrder$value === void 0 ? void 0 : (_jstOrder$value$data = _jstOrder$value.data) === null || _jstOrder$value$data === void 0 ? void 0 : _jstOrder$value$data.orders) || [];
|
|
1590
1675
|
bsOrders = (bsOrder === null || bsOrder === void 0 ? void 0 : (_bsOrder$value = bsOrder.value) === null || _bsOrder$value === void 0 ? void 0 : _bsOrder$value.data) || {};
|
|
1591
1676
|
wlnOrders = (wlnOrder === null || wlnOrder === void 0 ? void 0 : (_wlnOrder$value = wlnOrder.value) === null || _wlnOrder$value === void 0 ? void 0 : _wlnOrder$value.data) || {};
|
|
1677
|
+
wdtOrders = (wdtOrder === null || wdtOrder === void 0 ? void 0 : (_wdtOrder$value = wdtOrder.value) === null || _wdtOrder$value === void 0 ? void 0 : _wdtOrder$value.data) || {};
|
|
1592
1678
|
Monitor.automaticReport({
|
|
1593
|
-
message: "orderBack:\u8BA2\u5355\u53F7:".concat(order_no, ",\u5E97\u94FAid:").concat(shopId, ", \u8BA2\u5355\u4FE1\u606F\uFF1A").concat(JSON.stringify(orderInfo), ",jst\u4FE1\u606F:").concat(JSON.stringify(jstInfo), ",bs\u4FE1\u606F:").concat(JSON.stringify(bsOrders), ",wln\u4FE1\u606F:").concat(JSON.stringify(wlnOrders))
|
|
1679
|
+
message: "orderBack:\u8BA2\u5355\u53F7:".concat(order_no, ",\u5E97\u94FAid:").concat(shopId, ", \u8BA2\u5355\u4FE1\u606F\uFF1A").concat(JSON.stringify(orderInfo), ",jst\u4FE1\u606F:").concat(JSON.stringify(jstInfo), ",bs\u4FE1\u606F:").concat(JSON.stringify(bsOrders), ",wln\u4FE1\u606F:").concat(JSON.stringify(wlnOrders), ",wdt\u4FE1\u606F:").concat(JSON.stringify(wdtOrders))
|
|
1594
1680
|
});
|
|
1595
1681
|
if (plat !== null && plat !== void 0 && plat.subOrderNo) {
|
|
1596
1682
|
bsOrders.orders = bsOrders.orders.filter(function (item) {
|
|
@@ -1599,6 +1685,7 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1599
1685
|
}
|
|
1600
1686
|
bsInfo = bsOrderTransform(bsOrders || {});
|
|
1601
1687
|
wlnInfo = wlnOrderTransform(wlnOrders || {});
|
|
1688
|
+
wdtInfo = wdtOrderTransform(wdtOrders || {});
|
|
1602
1689
|
if ((bsOrders === null || bsOrders === void 0 ? void 0 : (_bsOrders$orders = bsOrders.orders) === null || _bsOrders$orders === void 0 ? void 0 : _bsOrders$orders.length) > 1) {
|
|
1603
1690
|
bsInfo.bsGoods = _objectSpread(_objectSpread({}, bsInfo.bsGoods), {}, {
|
|
1604
1691
|
bsGoods: []
|
|
@@ -1628,13 +1715,23 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1628
1715
|
sendName: ''
|
|
1629
1716
|
}];
|
|
1630
1717
|
}
|
|
1718
|
+
// if (wdtOrders?.orders?.length > 1) {
|
|
1719
|
+
// wdtInfo.bsGoods = {
|
|
1720
|
+
// ...wdtInfo.bsGoods,
|
|
1721
|
+
// bsGoods: [],
|
|
1722
|
+
// };
|
|
1723
|
+
// wdtInfo.bsLogistics = [{ logisticsCompany: null, logisticsCode: '' }];
|
|
1724
|
+
// wdtInfo.bsSendGood = [{ sendId: '', sendName: '' }];
|
|
1725
|
+
// wdtInfo.bsDeliveryNo = [{ deliveryNo: '' }];
|
|
1726
|
+
// }
|
|
1631
1727
|
|
|
1632
1728
|
//获取当前表单字段
|
|
1633
1729
|
formValue = form.getFieldsValue();
|
|
1634
1730
|
detail = _objectSpread(_objectSpread({}, orderInfo), {}, {
|
|
1635
1731
|
jstItemList: jstInfo,
|
|
1636
1732
|
bsOrder: bsInfo,
|
|
1637
|
-
wlnOrder: wlnInfo
|
|
1733
|
+
wlnOrder: wlnInfo,
|
|
1734
|
+
wdtOrder: wdtInfo
|
|
1638
1735
|
}); //抖音数据特殊处理
|
|
1639
1736
|
if (shopSourceStr === 'FXG') {
|
|
1640
1737
|
detail = updateDYDetails(detail);
|
|
@@ -1645,7 +1742,7 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1645
1742
|
hasSelectItem = HasErpItemSelectHandle(templateDetail);
|
|
1646
1743
|
erpPromiseList = [];
|
|
1647
1744
|
if (!(shopSourceStr === 'TAOBAO' && hasSelectItem)) {
|
|
1648
|
-
_context.next =
|
|
1745
|
+
_context.next = 55;
|
|
1649
1746
|
break;
|
|
1650
1747
|
}
|
|
1651
1748
|
list = detail['itemList'];
|
|
@@ -1663,10 +1760,10 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1663
1760
|
resolve({});
|
|
1664
1761
|
});
|
|
1665
1762
|
});
|
|
1666
|
-
_context.prev =
|
|
1667
|
-
_context.next =
|
|
1763
|
+
_context.prev = 45;
|
|
1764
|
+
_context.next = 48;
|
|
1668
1765
|
return Promise.all(promises);
|
|
1669
|
-
case
|
|
1766
|
+
case 48:
|
|
1670
1767
|
erpPromiseList = _context.sent;
|
|
1671
1768
|
detail['itemList'] = (_detail$itemList = detail['itemList']) === null || _detail$itemList === void 0 ? void 0 : _detail$itemList.map(function (item, index) {
|
|
1672
1769
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
@@ -1676,13 +1773,13 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1676
1773
|
})
|
|
1677
1774
|
});
|
|
1678
1775
|
});
|
|
1679
|
-
_context.next =
|
|
1776
|
+
_context.next = 55;
|
|
1680
1777
|
break;
|
|
1681
|
-
case
|
|
1682
|
-
_context.prev =
|
|
1683
|
-
_context.t0 = _context["catch"](
|
|
1778
|
+
case 52:
|
|
1779
|
+
_context.prev = 52;
|
|
1780
|
+
_context.t0 = _context["catch"](45);
|
|
1684
1781
|
console.error('调用erp获取宝贝编码错误', _context.t0);
|
|
1685
|
-
case
|
|
1782
|
+
case 55:
|
|
1686
1783
|
// console.log('detail', detail);
|
|
1687
1784
|
values = orderBackFormValues({
|
|
1688
1785
|
detail: detail,
|
|
@@ -1707,23 +1804,23 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1707
1804
|
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
1805
|
} else {
|
|
1709
1806
|
_cacheOrderInfo = JSON.parse(sessionStorage.getItem('cacheOrderInfo') || '{}');
|
|
1710
|
-
sessionStorage.setItem('cacheOrderInfo', JSON.stringify(_objectSpread(_objectSpread({}, _cacheOrderInfo), {}, (
|
|
1807
|
+
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
1808
|
}
|
|
1712
1809
|
}
|
|
1713
1810
|
// console.log('orderback', values);
|
|
1714
1811
|
form.setFieldsValue(_objectSpread(_objectSpread({}, formValue), values));
|
|
1715
1812
|
callback === null || callback === void 0 ? void 0 : callback(detail, templateDetail);
|
|
1716
|
-
_context.next =
|
|
1813
|
+
_context.next = 64;
|
|
1717
1814
|
break;
|
|
1718
|
-
case
|
|
1719
|
-
_context.prev =
|
|
1720
|
-
_context.t1 = _context["catch"](
|
|
1815
|
+
case 61:
|
|
1816
|
+
_context.prev = 61;
|
|
1817
|
+
_context.t1 = _context["catch"](8);
|
|
1721
1818
|
console.error(_context.t1);
|
|
1722
|
-
case
|
|
1819
|
+
case 64:
|
|
1723
1820
|
case "end":
|
|
1724
1821
|
return _context.stop();
|
|
1725
1822
|
}
|
|
1726
|
-
}, _callee, null, [[
|
|
1823
|
+
}, _callee, null, [[8, 61], [45, 52]]);
|
|
1727
1824
|
}));
|
|
1728
1825
|
return function orderBack(_x) {
|
|
1729
1826
|
return _ref2.apply(this, arguments);
|
|
@@ -2027,6 +2124,7 @@ export var reversalFormValues = function reversalFormValues() {
|
|
|
2027
2124
|
case 'BS_REISSUE_GOODS':
|
|
2028
2125
|
case 'BS_EXCHANGE_GOODS':
|
|
2029
2126
|
case 'BS_RETURN_GOODS':
|
|
2127
|
+
case 'WDT_REISSUE_GOODS':
|
|
2030
2128
|
prv["".concat(next.uniqueKey, "_shopCode")] = values[next.uniqueKey]['shopCode'];
|
|
2031
2129
|
break;
|
|
2032
2130
|
case 'BS_DELIVERY_NO':
|
|
@@ -2041,6 +2139,10 @@ export var reversalFormValues = function reversalFormValues() {
|
|
|
2041
2139
|
case 'EXCHANGE_TRADE_ID':
|
|
2042
2140
|
prv["".concat(next.uniqueKey, "_tradeItemList")] = JSON.stringify(values[next.uniqueKey] || []);
|
|
2043
2141
|
break;
|
|
2142
|
+
case 'WDT_GOODS':
|
|
2143
|
+
prv["".concat(next.uniqueKey, "_wdtGoods")] = JSON.stringify(values[next.uniqueKey]['wdtGoods']);
|
|
2144
|
+
prv["".concat(next.uniqueKey, "_shopCode")] = values[next.uniqueKey]['shopCode'];
|
|
2145
|
+
break;
|
|
2044
2146
|
}
|
|
2045
2147
|
return prv;
|
|
2046
2148
|
}, {});
|
|
@@ -2121,6 +2223,29 @@ export var wlnSystemOrderBackValues = function wlnSystemOrderBackValues(_ref7) {
|
|
|
2121
2223
|
form.setFieldsValue(values);
|
|
2122
2224
|
};
|
|
2123
2225
|
|
|
2226
|
+
// wdt商品信息返填
|
|
2227
|
+
export var wdtSystemOrderBackValues = function wdtSystemOrderBackValues(_ref8) {
|
|
2228
|
+
var _templateList$compone3;
|
|
2229
|
+
var templateList = _ref8.templateList,
|
|
2230
|
+
value = _ref8.value,
|
|
2231
|
+
form = _ref8.form;
|
|
2232
|
+
//如果没有选择的值不返填,会有两种情况 1.有值为空 2.没有值 为空的时候需要返填
|
|
2233
|
+
if (!(value !== null && value !== void 0 && value.selectedRows)) return;
|
|
2234
|
+
var wdtGoodsComponent = (_templateList$compone3 = templateList.componentDtoList) === null || _templateList$compone3 === void 0 ? void 0 : _templateList$compone3.filter(function (item) {
|
|
2235
|
+
return ['WDT_GOODS', 'WDT_DELIVERY_NO', 'WDT_SEND_GOOD', 'WDT_LOGISTICS'].includes(item.workOrderComponentType);
|
|
2236
|
+
});
|
|
2237
|
+
if (!(wdtGoodsComponent !== null && wdtGoodsComponent !== void 0 && wdtGoodsComponent.length)) return;
|
|
2238
|
+
var wdtGoodsValue = form.getFieldValue(wdtGoodsComponent[0].uniqueKey);
|
|
2239
|
+
var orderInfo = wdtOrderTransform({
|
|
2240
|
+
trades: value.selectedRows,
|
|
2241
|
+
shopCode: wdtGoodsValue.shopCode
|
|
2242
|
+
});
|
|
2243
|
+
var values = wdtOrderBackFormValues(orderInfo, {
|
|
2244
|
+
componentDtoList: wdtGoodsComponent
|
|
2245
|
+
});
|
|
2246
|
+
form.setFieldsValue(values);
|
|
2247
|
+
};
|
|
2248
|
+
|
|
2124
2249
|
// 获取映射关系
|
|
2125
2250
|
export var getMappingConfigByTemplateDetail = function getMappingConfigByTemplateDetail(templateDetail) {
|
|
2126
2251
|
var readonlyComponents = {};
|
|
@@ -2195,12 +2320,12 @@ export var transformWorkOrderDetail = function transformWorkOrderDetail(detail)
|
|
|
2195
2320
|
};
|
|
2196
2321
|
|
|
2197
2322
|
// 返填物流轨迹信息
|
|
2198
|
-
export var setLogisticsInfo = function setLogisticsInfo(
|
|
2199
|
-
var logisticsMappingConfig =
|
|
2200
|
-
uniqueKey =
|
|
2201
|
-
workOrderComponentType =
|
|
2202
|
-
value =
|
|
2203
|
-
form =
|
|
2323
|
+
export var setLogisticsInfo = function setLogisticsInfo(_ref9) {
|
|
2324
|
+
var logisticsMappingConfig = _ref9.logisticsMappingConfig,
|
|
2325
|
+
uniqueKey = _ref9.uniqueKey,
|
|
2326
|
+
workOrderComponentType = _ref9.workOrderComponentType,
|
|
2327
|
+
value = _ref9.value,
|
|
2328
|
+
form = _ref9.form;
|
|
2204
2329
|
var values = logisticsMappingConfig.reduce(function (prv, next) {
|
|
2205
2330
|
var logisticsValues = form.getFieldValue(next.uniqueKey);
|
|
2206
2331
|
var componentConfig = next.componentConfig;
|
|
@@ -59,6 +59,7 @@ export declare const queryAllWorkOrderList: (s: string, data: any) => Promise<an
|
|
|
59
59
|
export declare const getAlipayBillReceipt: (data: any) => Promise<any>;
|
|
60
60
|
export declare const jstOrderDetail: (data: any) => Promise<any>;
|
|
61
61
|
export declare const bsOrderDetail: (data: any) => Promise<any>;
|
|
62
|
+
export declare const wdtOrderDetail: (data: any) => Promise<any>;
|
|
62
63
|
export declare const getRepeatWorkOrderList: (data: any) => Promise<any>;
|
|
63
64
|
export declare const logisticsInterceptCancel: (data: any) => Promise<any>;
|
|
64
65
|
export declare const queryLogisticsTrack: (data: any) => Promise<any>;
|
|
@@ -370,6 +370,16 @@ export var bsOrderDetail = function bsOrderDetail(data) {
|
|
|
370
370
|
});
|
|
371
371
|
};
|
|
372
372
|
|
|
373
|
+
// wdt订单详情
|
|
374
|
+
export var wdtOrderDetail = function wdtOrderDetail(data) {
|
|
375
|
+
return request({
|
|
376
|
+
url: '/qy/gdfw/order/wdtOrderDetail',
|
|
377
|
+
method: 'post',
|
|
378
|
+
data: data,
|
|
379
|
+
infoLevel: 'warning'
|
|
380
|
+
});
|
|
381
|
+
};
|
|
382
|
+
|
|
373
383
|
// 获取重复详情
|
|
374
384
|
export var getRepeatWorkOrderList = function getRepeatWorkOrderList(data) {
|
|
375
385
|
return request({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/kmkf-work-order-service-component",
|
|
3
|
-
"version": "0.26.0-alpha.
|
|
3
|
+
"version": "0.26.0-alpha.3",
|
|
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.26.0-alpha.
|
|
36
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.26.0-alpha.
|
|
37
|
-
"@kmkf-fe-packages/services-components": "^0.26.0-alpha.
|
|
35
|
+
"@kmkf-fe-packages/basic-components": "^0.26.0-alpha.3",
|
|
36
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.26.0-alpha.3",
|
|
37
|
+
"@kmkf-fe-packages/services-components": "^0.26.0-alpha.3",
|
|
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": "9424ac24583b226832383f26ca4da2ec597e2d76",
|
|
77
77
|
"gitHooks": {
|
|
78
78
|
"pre-commit": "lint-staged"
|
|
79
79
|
}
|