@kmkf-fe-packages/kmkf-work-order-service-component 2.0.40 → 2.0.42
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.
|
@@ -688,7 +688,8 @@ var FormRender = function FormRender(props, ref) {
|
|
|
688
688
|
//订单返填
|
|
689
689
|
var changeHandle = function changeHandle(order_no) {
|
|
690
690
|
if (!order_no) return;
|
|
691
|
-
console.log('[订单返填 changeHandle order_no ] >', order_no);
|
|
691
|
+
// console.log('[订单返填 changeHandle order_no ] >', order_no);
|
|
692
|
+
|
|
692
693
|
sessionStorage.setItem('order_no_test', order_no);
|
|
693
694
|
orderBack({
|
|
694
695
|
order_no: order_no,
|
|
@@ -816,6 +817,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
816
817
|
// 切换店铺
|
|
817
818
|
var handleChangeShopId = function handleChangeShopId(val) {
|
|
818
819
|
setShopId(val);
|
|
820
|
+
setIsOrderBackShopId(true);
|
|
819
821
|
// 清空表单字段
|
|
820
822
|
var needClearFormFields = get(templateDetail, 'componentDtoList', []).reduce(function (cur, nxt) {
|
|
821
823
|
if (NEED_CLEAR_FIELDS_WHEN_SHOP_ID_CHANGE.includes(nxt === null || nxt === void 0 ? void 0 : nxt.workOrderComponentType)) {
|
|
@@ -909,7 +911,13 @@ var FormRender = function FormRender(props, ref) {
|
|
|
909
911
|
templateDetail: templateDetail,
|
|
910
912
|
callback: orderBackReplace,
|
|
911
913
|
fromQNCreateWorkOrderByOrderNo: false,
|
|
912
|
-
plat: plat
|
|
914
|
+
plat: plat,
|
|
915
|
+
callbackShopId: function callbackShopId(id) {
|
|
916
|
+
setIsOrderBackShopId(true);
|
|
917
|
+
setTimeout(function () {
|
|
918
|
+
setShopId(id);
|
|
919
|
+
}, 0);
|
|
920
|
+
}
|
|
913
921
|
});
|
|
914
922
|
}
|
|
915
923
|
}
|
|
@@ -930,7 +938,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
930
938
|
});
|
|
931
939
|
};
|
|
932
940
|
var conditionItemResult = function conditionItemResult(item, getFieldValue) {
|
|
933
|
-
var _item$leftValue$split, _item$leftValue$split2,
|
|
941
|
+
var _item$leftValue$split, _item$leftValue$split2, _item$compareSymbol;
|
|
934
942
|
//现支持子组件控制显隐,格式为${uniqueKey}_${type}与普通组件做区分
|
|
935
943
|
var isChildField = item.leftValue.includes('_');
|
|
936
944
|
var prefixId = isChildField ? (_item$leftValue$split = item.leftValue.split('_')) === null || _item$leftValue$split === void 0 ? void 0 : _item$leftValue$split[0] : item.leftValue;
|
|
@@ -963,8 +971,14 @@ var FormRender = function FormRender(props, ref) {
|
|
|
963
971
|
if (Reflect.has(currentComponentDisplayStatus.current, prefixId) && !currentComponentDisplayStatus.current[prefixId]) {
|
|
964
972
|
return false;
|
|
965
973
|
}
|
|
966
|
-
console.debug(
|
|
967
|
-
|
|
974
|
+
// console.debug(
|
|
975
|
+
// '显影计算',
|
|
976
|
+
// dependenceDetail?.type,
|
|
977
|
+
// leftValue,
|
|
978
|
+
// item.compareSymbol?.toUpperCase(),
|
|
979
|
+
// item.rightValue,
|
|
980
|
+
// );
|
|
981
|
+
return getExpression((_item$compareSymbol = item.compareSymbol) === null || _item$compareSymbol === void 0 ? void 0 : _item$compareSymbol.toUpperCase(), leftValue, item.rightValue);
|
|
968
982
|
};
|
|
969
983
|
var getDisplayAndDisabledConfig = function getDisplayAndDisabledConfig(config) {
|
|
970
984
|
if (isNull(config)) {
|
|
@@ -132,7 +132,7 @@ var getBasicsOrderInfo = function getBasicsOrderInfo(orderInfo, xiaozhiOrder) {
|
|
|
132
132
|
//订单返填
|
|
133
133
|
export var orderBack = /*#__PURE__*/function () {
|
|
134
134
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
|
135
|
-
var order_no, form, propsShopid, shopList, templateDetail, _ref$type, type, callback, fromQNCreateWorkOrderByOrderNo, _ref$plat, plat, callbackShopId, shopId, _res$data,
|
|
135
|
+
var order_no, form, propsShopid, shopList, templateDetail, _ref$type, type, callback, fromQNCreateWorkOrderByOrderNo, _ref$plat, plat, callbackShopId, shopId, _res$data, res, shopInfo, _res$data3, _res$data4, _res$data5, JOIN_SHOP, hasFlagMap, _ref3, shopSourceStr, _ref3$thirdUserNick, thirdUserNick, thirdShopMainType, _data$value, _data$value3, _jstOrder$value, _jstOrder$value2, _bsOrder$value, _wlnOrder$value, _wdtOrder$value, _bsE3Order$value, _kmOrder$value, _gyOrder$value, _bsOrders$orders, _bsE3Orders$orderList, _wlnOrders$orders, _wdtOrders$trades, _gyOrders$trades, _kmOrders$orderDetail, promise, _yield$Promise$allSet, _yield$Promise$allSet2, data, xiaozhiOrder, jstOrder, bsOrder, wlnOrder, wdtOrder, bsE3Order, kmOrder, gyOrder, _data$value2, orderInfo, jstOrders, bsOrders, wlnOrders, wdtOrders, bsE3Orders, kmOrders, gyOrders, bsInfo, wlnInfo, bsE3Info, wdtInfo, kmInfo, gyInfo, jstInfo, formValue, detail, hasSelectItem, erpPromiseList, list, promises, _detail$itemList, values, paymentUniqueKey;
|
|
136
136
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
137
137
|
while (1) switch (_context.prev = _context.next) {
|
|
138
138
|
case 0:
|
|
@@ -149,14 +149,21 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
149
149
|
});
|
|
150
150
|
case 6:
|
|
151
151
|
res = _context.sent;
|
|
152
|
-
if (res !== null && res !== void 0 && (_res$data = res.data) !== null && _res$data !== void 0 && _res$data.shopId
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
152
|
+
if (res !== null && res !== void 0 && (_res$data = res.data) !== null && _res$data !== void 0 && _res$data.shopId) {
|
|
153
|
+
shopInfo = shopList.find(function (item) {
|
|
154
|
+
var _res$data2;
|
|
155
|
+
return item.shopId === (res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.shopId);
|
|
156
|
+
});
|
|
157
|
+
if (!shopInfo) {
|
|
158
|
+
message.error("\u5339\u914D\u5E97\u94FA\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u662F\u5426\u6709".concat(res === null || res === void 0 ? void 0 : (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.shopName, "\u5E97\u94FA\u6743\u9650"));
|
|
159
|
+
} else {
|
|
160
|
+
if (!shopInfo.auditStatus) {
|
|
161
|
+
message.error("\u5339\u914D\u5E97\u94FA\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5".concat(res === null || res === void 0 ? void 0 : (_res$data4 = res.data) === null || _res$data4 === void 0 ? void 0 : _res$data4.shopName, "\u6388\u6743\u662F\u5426\u6B63\u5E38"));
|
|
162
|
+
} else {
|
|
163
|
+
shopId = res === null || res === void 0 ? void 0 : (_res$data5 = res.data) === null || _res$data5 === void 0 ? void 0 : _res$data5.shopId;
|
|
164
|
+
callbackShopId === null || callbackShopId === void 0 ? void 0 : callbackShopId(shopId);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
160
167
|
}
|
|
161
168
|
_context.next = 13;
|
|
162
169
|
break;
|
|
@@ -180,15 +187,21 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
180
187
|
}).every(function (item) {
|
|
181
188
|
return item === false;
|
|
182
189
|
}))) {
|
|
183
|
-
_context.next =
|
|
190
|
+
_context.next = 18;
|
|
184
191
|
break;
|
|
185
192
|
}
|
|
193
|
+
//处理店铺映射存在店铺信息却没有返填的问题
|
|
194
|
+
if (shopId) {
|
|
195
|
+
form.setFieldsValue({
|
|
196
|
+
shopId: shopId
|
|
197
|
+
});
|
|
198
|
+
}
|
|
186
199
|
return _context.abrupt("return");
|
|
187
|
-
case
|
|
200
|
+
case 18:
|
|
188
201
|
_ref3 = shopList.find(function (item) {
|
|
189
202
|
return item.shopId == shopId;
|
|
190
203
|
}) || {}, shopSourceStr = _ref3.shopSourceStr, _ref3$thirdUserNick = _ref3.thirdUserNick, thirdUserNick = _ref3$thirdUserNick === void 0 ? '' : _ref3$thirdUserNick, thirdShopMainType = _ref3.thirdShopMainType;
|
|
191
|
-
_context.prev =
|
|
204
|
+
_context.prev = 19;
|
|
192
205
|
promise = [];
|
|
193
206
|
if (!JOIN_SHOP || thirdShopMainType === '1' && shopSourceStr === 'JD') {
|
|
194
207
|
promise.push(Promise.resolve([]));
|
|
@@ -223,9 +236,9 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
223
236
|
});
|
|
224
237
|
|
|
225
238
|
//需按照orderBackMap中的顺序结构
|
|
226
|
-
_context.next =
|
|
239
|
+
_context.next = 26;
|
|
227
240
|
return Promise.allSettled(promise);
|
|
228
|
-
case
|
|
241
|
+
case 26:
|
|
229
242
|
_yield$Promise$allSet = _context.sent;
|
|
230
243
|
_yield$Promise$allSet2 = _slicedToArray(_yield$Promise$allSet, 9);
|
|
231
244
|
data = _yield$Promise$allSet2[0];
|
|
@@ -413,7 +426,7 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
413
426
|
hasSelectItem = HasErpItemSelectHandle(templateDetail);
|
|
414
427
|
erpPromiseList = [];
|
|
415
428
|
if (!(shopSourceStr === 'TAOBAO' && hasSelectItem)) {
|
|
416
|
-
_context.next =
|
|
429
|
+
_context.next = 90;
|
|
417
430
|
break;
|
|
418
431
|
}
|
|
419
432
|
list = detail['itemList'];
|
|
@@ -431,10 +444,10 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
431
444
|
resolve({});
|
|
432
445
|
});
|
|
433
446
|
});
|
|
434
|
-
_context.prev =
|
|
435
|
-
_context.next =
|
|
447
|
+
_context.prev = 80;
|
|
448
|
+
_context.next = 83;
|
|
436
449
|
return Promise.all(promises);
|
|
437
|
-
case
|
|
450
|
+
case 83:
|
|
438
451
|
erpPromiseList = _context.sent;
|
|
439
452
|
detail['itemList'] = (_detail$itemList = detail['itemList']) === null || _detail$itemList === void 0 ? void 0 : _detail$itemList.map(function (item, index) {
|
|
440
453
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
@@ -444,13 +457,13 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
444
457
|
})
|
|
445
458
|
});
|
|
446
459
|
});
|
|
447
|
-
_context.next =
|
|
460
|
+
_context.next = 90;
|
|
448
461
|
break;
|
|
449
|
-
case
|
|
450
|
-
_context.prev =
|
|
451
|
-
_context.t1 = _context["catch"](
|
|
462
|
+
case 87:
|
|
463
|
+
_context.prev = 87;
|
|
464
|
+
_context.t1 = _context["catch"](80);
|
|
452
465
|
console.error('调用erp获取宝贝编码错误', _context.t1);
|
|
453
|
-
case
|
|
466
|
+
case 90:
|
|
454
467
|
// console.log('detail', detail);
|
|
455
468
|
values = orderBackFormValues({
|
|
456
469
|
detail: detail,
|
|
@@ -461,11 +474,8 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
461
474
|
fromQNCreateWorkOrderByOrderNo: fromQNCreateWorkOrderByOrderNo
|
|
462
475
|
});
|
|
463
476
|
pushGyLog('values', values);
|
|
464
|
-
console.log('formValue', formValue);
|
|
465
|
-
console.log('values', values, {
|
|
466
|
-
type: type,
|
|
467
|
-
plat: plat
|
|
468
|
-
});
|
|
477
|
+
// console.log('formValue', formValue);
|
|
478
|
+
// console.log('values', values, { type, plat });
|
|
469
479
|
//新建的情况下订单返填不能清空打款信息
|
|
470
480
|
if (type !== 'edit') {
|
|
471
481
|
paymentUniqueKey = findComponentUniqueKeyByType(templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList, 'ENTERPRISE_PAYMENT');
|
|
@@ -498,17 +508,17 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
498
508
|
shopId: shopId
|
|
499
509
|
}));
|
|
500
510
|
callback === null || callback === void 0 ? void 0 : callback(detail, templateDetail);
|
|
501
|
-
_context.next =
|
|
511
|
+
_context.next = 101;
|
|
502
512
|
break;
|
|
503
|
-
case
|
|
504
|
-
_context.prev =
|
|
505
|
-
_context.t2 = _context["catch"](
|
|
513
|
+
case 98:
|
|
514
|
+
_context.prev = 98;
|
|
515
|
+
_context.t2 = _context["catch"](19);
|
|
506
516
|
console.error(_context.t2);
|
|
507
|
-
case
|
|
517
|
+
case 101:
|
|
508
518
|
case "end":
|
|
509
519
|
return _context.stop();
|
|
510
520
|
}
|
|
511
|
-
}, _callee, null, [[3, 10], [
|
|
521
|
+
}, _callee, null, [[3, 10], [19, 98], [80, 87]]);
|
|
512
522
|
}));
|
|
513
523
|
return function orderBack(_x) {
|
|
514
524
|
return _ref2.apply(this, arguments);
|
|
@@ -942,7 +952,6 @@ export var bsE3SystemOrderBackValues = function bsE3SystemOrderBackValues(_ref7)
|
|
|
942
952
|
var values = bsE3OrderBackFormValues(orderInfo, {
|
|
943
953
|
componentDtoList: bsE3GoodsComponent
|
|
944
954
|
});
|
|
945
|
-
console.log('values', values);
|
|
946
955
|
form.setFieldsValue(values);
|
|
947
956
|
};
|
|
948
957
|
|
|
@@ -1052,7 +1061,6 @@ export var gySystemOrderBackValues = function gySystemOrderBackValues(_ref11) {
|
|
|
1052
1061
|
var values = gyOrderBackFormValues(orderInfo, {
|
|
1053
1062
|
componentDtoList: gyGoodsComponent
|
|
1054
1063
|
}, 2);
|
|
1055
|
-
console.log('values', values);
|
|
1056
1064
|
form.setFieldsValue(values);
|
|
1057
1065
|
};
|
|
1058
1066
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/kmkf-work-order-service-component",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.42",
|
|
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": "2.0.
|
|
36
|
-
"@kmkf-fe-packages/kmkf-utils": "2.0.
|
|
37
|
-
"@kmkf-fe-packages/services-components": "2.0.
|
|
35
|
+
"@kmkf-fe-packages/basic-components": "2.0.42",
|
|
36
|
+
"@kmkf-fe-packages/kmkf-utils": "2.0.42",
|
|
37
|
+
"@kmkf-fe-packages/services-components": "2.0.42",
|
|
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": "fa256bbf3b073a798c5d523e27d7205c1bd197e6",
|
|
77
77
|
"gitHooks": {
|
|
78
78
|
"pre-commit": "lint-staged"
|
|
79
79
|
}
|