@kmkf-fe-packages/basic-components 2.7.7-beta.0 → 2.7.7-beta.11
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.esm.js
CHANGED
|
@@ -13309,13 +13309,26 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
13309
13309
|
var changeHandle = function changeHandle(val, type) {
|
|
13310
13310
|
var newValue = _objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val));
|
|
13311
13311
|
if (type === 'interceptCompany') {
|
|
13312
|
+
var _props$interceptTypeD, _defaultInterceptType;
|
|
13312
13313
|
var interceptCompany = expressInterceptData.find(function (item) {
|
|
13313
13314
|
return item.value === val;
|
|
13314
13315
|
});
|
|
13315
|
-
|
|
13316
|
-
|
|
13317
|
-
|
|
13318
|
-
|
|
13316
|
+
// 优先使用配置的默认值
|
|
13317
|
+
var defaultInterceptType;
|
|
13318
|
+
var configuredDefault = (_props$interceptTypeD = props.interceptTypeDefaults) === null || _props$interceptTypeD === void 0 ? void 0 : _props$interceptTypeD[val];
|
|
13319
|
+
if (configuredDefault) {
|
|
13320
|
+
// 使用配置的默认值
|
|
13321
|
+
defaultInterceptType = ((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionTypeList) || []).find(function (item) {
|
|
13322
|
+
return item.value === configuredDefault;
|
|
13323
|
+
});
|
|
13324
|
+
}
|
|
13325
|
+
// 如果没有配置默认值,使用原有的 isDefault 逻辑
|
|
13326
|
+
if (!defaultInterceptType) {
|
|
13327
|
+
defaultInterceptType = ((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionTypeList) || []).find(function (item) {
|
|
13328
|
+
var _item$config4;
|
|
13329
|
+
return item === null || item === void 0 ? void 0 : (_item$config4 = item.config) === null || _item$config4 === void 0 ? void 0 : _item$config4.isDefault;
|
|
13330
|
+
});
|
|
13331
|
+
}
|
|
13319
13332
|
// const demoList = [
|
|
13320
13333
|
// {
|
|
13321
13334
|
// city: 330100,
|
|
@@ -13339,7 +13352,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
13339
13352
|
});
|
|
13340
13353
|
newValue = _objectSpread2(_objectSpread2({}, newValue), {}, {
|
|
13341
13354
|
interceptCompany: val,
|
|
13342
|
-
interceptType:
|
|
13355
|
+
interceptType: (_defaultInterceptType = defaultInterceptType) === null || _defaultInterceptType === void 0 ? void 0 : _defaultInterceptType.value,
|
|
13343
13356
|
interceptSenderMobile: undefined,
|
|
13344
13357
|
interceptAddress: [],
|
|
13345
13358
|
interceptDetail: undefined,
|
|
@@ -13637,7 +13650,8 @@ var LogisticsMoreInterception = function LogisticsMoreInterception(props) {
|
|
|
13637
13650
|
disabled = props.disabled,
|
|
13638
13651
|
onChange = props.onChange,
|
|
13639
13652
|
isEditing = props.isEditing,
|
|
13640
|
-
effects = props.effects
|
|
13653
|
+
effects = props.effects,
|
|
13654
|
+
interceptTypeDefaults = props.interceptTypeDefaults;
|
|
13641
13655
|
var _useState = useState(0),
|
|
13642
13656
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13643
13657
|
changeIndex = _useState2[0],
|
|
@@ -13683,7 +13697,8 @@ var LogisticsMoreInterception = function LogisticsMoreInterception(props) {
|
|
|
13683
13697
|
onJumpPage: effects === null || effects === void 0 ? void 0 : effects.onJumpPage,
|
|
13684
13698
|
onChange: function onChange(val) {
|
|
13685
13699
|
return handleChange(val, index);
|
|
13686
|
-
}
|
|
13700
|
+
},
|
|
13701
|
+
interceptTypeDefaults: interceptTypeDefaults
|
|
13687
13702
|
}) : null;
|
|
13688
13703
|
}) : null);
|
|
13689
13704
|
};
|
|
@@ -14246,8 +14261,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
14246
14261
|
return option.label.includes(input);
|
|
14247
14262
|
},
|
|
14248
14263
|
style: {
|
|
14249
|
-
|
|
14250
|
-
maxWidth: '180px'
|
|
14264
|
+
width: '180px'
|
|
14251
14265
|
},
|
|
14252
14266
|
platformType: platformType
|
|
14253
14267
|
})) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React.createElement(Input, {
|
|
@@ -20956,6 +20970,15 @@ var getYesOrNo$4 = function getYesOrNo(val) {
|
|
|
20956
20970
|
if (isNull(val)) return null;
|
|
20957
20971
|
return val ? '是' : '否';
|
|
20958
20972
|
};
|
|
20973
|
+
function toNum$1(value) {
|
|
20974
|
+
if (typeof value === 'string') {
|
|
20975
|
+
return value ? +value : void 0;
|
|
20976
|
+
}
|
|
20977
|
+
if (typeof value === 'number') {
|
|
20978
|
+
return value;
|
|
20979
|
+
}
|
|
20980
|
+
return void 0;
|
|
20981
|
+
}
|
|
20959
20982
|
var getColumns$3 = function getColumns(_ref) {
|
|
20960
20983
|
var _ref$text = _ref.text,
|
|
20961
20984
|
text = _ref$text === void 0 ? '' : _ref$text,
|
|
@@ -20970,13 +20993,6 @@ var getColumns$3 = function getColumns(_ref) {
|
|
|
20970
20993
|
ellipsis: true,
|
|
20971
20994
|
width: 250,
|
|
20972
20995
|
render: renderTextEllipsis
|
|
20973
|
-
}, {
|
|
20974
|
-
dataIndex: 'goodsCode',
|
|
20975
|
-
title: "\u5546\u54C1\u7F16\u7801",
|
|
20976
|
-
align: 'center',
|
|
20977
|
-
ellipsis: true,
|
|
20978
|
-
width: 250,
|
|
20979
|
-
render: renderTextEllipsis
|
|
20980
20996
|
}, {
|
|
20981
20997
|
dataIndex: 'wlnSkuName',
|
|
20982
20998
|
title: "sku\u540D\u79F0",
|
|
@@ -21032,7 +21048,7 @@ var getColumns$3 = function getColumns(_ref) {
|
|
|
21032
21048
|
});
|
|
21033
21049
|
}
|
|
21034
21050
|
}, {
|
|
21035
|
-
dataIndex: '
|
|
21051
|
+
dataIndex: 'olnItemCode',
|
|
21036
21052
|
title: "\u7EBF\u4E0A\u5546\u54C1\u7F16\u7801",
|
|
21037
21053
|
align: 'center',
|
|
21038
21054
|
ellipsis: true,
|
|
@@ -21066,7 +21082,7 @@ var getColumns$3 = function getColumns(_ref) {
|
|
|
21066
21082
|
ellipsis: true,
|
|
21067
21083
|
width: 100,
|
|
21068
21084
|
render: function render(val, record, index) {
|
|
21069
|
-
return record.
|
|
21085
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
21070
21086
|
style: {
|
|
21071
21087
|
width: 70
|
|
21072
21088
|
},
|
|
@@ -21092,44 +21108,76 @@ var getColumns$3 = function getColumns(_ref) {
|
|
|
21092
21108
|
ellipsis: true,
|
|
21093
21109
|
width: 250,
|
|
21094
21110
|
render: renderTextEllipsis
|
|
21095
|
-
}, {
|
|
21096
|
-
dataIndex: 'originPrice',
|
|
21097
|
-
title: "\u539F\u4EF7",
|
|
21098
|
-
align: 'center',
|
|
21099
|
-
ellipsis: true,
|
|
21100
|
-
width: 250,
|
|
21101
|
-
render: renderTextEllipsis
|
|
21102
21111
|
}, {
|
|
21103
21112
|
dataIndex: 'price',
|
|
21104
21113
|
title: "\u5355\u4EF7",
|
|
21105
21114
|
align: 'center',
|
|
21106
21115
|
ellipsis: true,
|
|
21107
21116
|
width: 250,
|
|
21108
|
-
render:
|
|
21117
|
+
render: function render(val, record, index) {
|
|
21118
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
21119
|
+
style: {
|
|
21120
|
+
width: 70
|
|
21121
|
+
},
|
|
21122
|
+
value: val,
|
|
21123
|
+
min: 0,
|
|
21124
|
+
precision: 2,
|
|
21125
|
+
onChange: function onChange(num) {
|
|
21126
|
+
return updateHandle(num, index, 'price');
|
|
21127
|
+
}
|
|
21128
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
21129
|
+
}
|
|
21109
21130
|
}, {
|
|
21110
21131
|
dataIndex: 'receivable',
|
|
21111
21132
|
title: "\u9500\u552E\u91D1\u989D",
|
|
21112
21133
|
align: 'center',
|
|
21113
21134
|
ellipsis: true,
|
|
21114
21135
|
width: 250,
|
|
21115
|
-
render:
|
|
21136
|
+
render: function render(val, record, index) {
|
|
21137
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
21138
|
+
style: {
|
|
21139
|
+
width: 70
|
|
21140
|
+
},
|
|
21141
|
+
value: val,
|
|
21142
|
+
min: 0,
|
|
21143
|
+
precision: 2,
|
|
21144
|
+
onChange: function onChange(num) {
|
|
21145
|
+
return updateHandle(num, index, 'receivable');
|
|
21146
|
+
}
|
|
21147
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
21148
|
+
}
|
|
21116
21149
|
}, {
|
|
21117
21150
|
dataIndex: 'type',
|
|
21118
21151
|
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
21119
21152
|
align: 'center',
|
|
21120
21153
|
ellipsis: true,
|
|
21121
21154
|
width: 100,
|
|
21122
|
-
render:
|
|
21155
|
+
render: function render(val, record, index) {
|
|
21156
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
21157
|
+
value: val,
|
|
21158
|
+
onChange: function onChange(value) {
|
|
21159
|
+
updateHandle(value, index, 'type');
|
|
21160
|
+
},
|
|
21161
|
+
options: [{
|
|
21162
|
+
label: '赠品',
|
|
21163
|
+
value: 1
|
|
21164
|
+
}, {
|
|
21165
|
+
label: '非赠品',
|
|
21166
|
+
value: 0
|
|
21167
|
+
}]
|
|
21168
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$4(val));
|
|
21169
|
+
}
|
|
21123
21170
|
}, {
|
|
21124
21171
|
dataIndex: 'isPackage',
|
|
21125
21172
|
title: "\u662F\u5426\u7EC4\u5408\u5546\u54C1",
|
|
21126
21173
|
align: 'center',
|
|
21127
21174
|
ellipsis: true,
|
|
21175
|
+
width: 200,
|
|
21128
21176
|
render: function render(val, record, index) {
|
|
21129
21177
|
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
21130
21178
|
value: val,
|
|
21131
21179
|
onChange: function onChange(value) {
|
|
21132
|
-
updateHandle(value, index, '
|
|
21180
|
+
updateHandle(value, index, 'isPackage');
|
|
21133
21181
|
},
|
|
21134
21182
|
options: [{
|
|
21135
21183
|
label: '是',
|
|
@@ -21139,28 +21187,15 @@ var getColumns$3 = function getColumns(_ref) {
|
|
|
21139
21187
|
value: false
|
|
21140
21188
|
}]
|
|
21141
21189
|
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$4(val));
|
|
21142
|
-
}
|
|
21143
|
-
width: 200
|
|
21190
|
+
}
|
|
21144
21191
|
}, {
|
|
21145
21192
|
dataIndex: 'hasRefund',
|
|
21146
21193
|
title: "\u662F\u5426\u9000\u6B3E",
|
|
21147
21194
|
align: 'center',
|
|
21148
21195
|
ellipsis: true,
|
|
21149
21196
|
width: 100,
|
|
21150
|
-
render: function render(val
|
|
21151
|
-
return
|
|
21152
|
-
value: val,
|
|
21153
|
-
onChange: function onChange(value) {
|
|
21154
|
-
updateHandle(value, index, 'isGift');
|
|
21155
|
-
},
|
|
21156
|
-
options: [{
|
|
21157
|
-
label: '是',
|
|
21158
|
-
value: 1
|
|
21159
|
-
}, {
|
|
21160
|
-
label: '否',
|
|
21161
|
-
value: 0
|
|
21162
|
-
}]
|
|
21163
|
-
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$4(val));
|
|
21197
|
+
render: function render(val) {
|
|
21198
|
+
return getYesOrNo$4(val);
|
|
21164
21199
|
}
|
|
21165
21200
|
}, {
|
|
21166
21201
|
dataIndex: 'unit',
|
|
@@ -21198,13 +21233,6 @@ var getColumns$3 = function getColumns(_ref) {
|
|
|
21198
21233
|
ellipsis: true,
|
|
21199
21234
|
width: 250,
|
|
21200
21235
|
render: renderTextEllipsis
|
|
21201
|
-
}, {
|
|
21202
|
-
dataIndex: 'goodsCode',
|
|
21203
|
-
title: "\u5546\u54C1\u7F16\u7801",
|
|
21204
|
-
align: 'center',
|
|
21205
|
-
ellipsis: true,
|
|
21206
|
-
width: 250,
|
|
21207
|
-
render: renderTextEllipsis
|
|
21208
21236
|
}, {
|
|
21209
21237
|
dataIndex: 'wlnSkuName',
|
|
21210
21238
|
title: "sku\u540D\u79F0",
|
|
@@ -21260,7 +21288,7 @@ var getColumns$3 = function getColumns(_ref) {
|
|
|
21260
21288
|
});
|
|
21261
21289
|
}
|
|
21262
21290
|
}, {
|
|
21263
|
-
dataIndex: '
|
|
21291
|
+
dataIndex: 'olnItemCode',
|
|
21264
21292
|
title: "\u7EBF\u4E0A\u5546\u54C1\u7F16\u7801",
|
|
21265
21293
|
align: 'center',
|
|
21266
21294
|
ellipsis: true,
|
|
@@ -21286,15 +21314,41 @@ var getColumns$3 = function getColumns(_ref) {
|
|
|
21286
21314
|
align: 'center',
|
|
21287
21315
|
ellipsis: true,
|
|
21288
21316
|
width: 250,
|
|
21289
|
-
render:
|
|
21317
|
+
render: function render(val, record, index) {
|
|
21318
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
21319
|
+
style: {
|
|
21320
|
+
width: 70
|
|
21321
|
+
},
|
|
21322
|
+
value: val,
|
|
21323
|
+
min: 0,
|
|
21324
|
+
precision: 2,
|
|
21325
|
+
onChange: function onChange(num) {
|
|
21326
|
+
updateHandle(num, index, 'price');
|
|
21327
|
+
if ((num || num === 0) && (record.number || record.number === 0)) updateHandle(num * (record.number || 0), index, 'money');
|
|
21328
|
+
}
|
|
21329
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
21330
|
+
}
|
|
21290
21331
|
}, {
|
|
21291
21332
|
dataIndex: 'number',
|
|
21292
21333
|
title: "".concat(text, "\u6570\u91CF"),
|
|
21293
21334
|
align: 'center',
|
|
21294
21335
|
ellipsis: true,
|
|
21295
21336
|
width: 100,
|
|
21337
|
+
validator: function validator(_rule, value) {
|
|
21338
|
+
var productName = '';
|
|
21339
|
+
if (((value === null || value === void 0 ? void 0 : value.wlnReissueGoods) || []).some(function (goods) {
|
|
21340
|
+
var qty = toNum$1(goods === null || goods === void 0 ? void 0 : goods.number);
|
|
21341
|
+
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
21342
|
+
if (res) {
|
|
21343
|
+
productName = (goods === null || goods === void 0 ? void 0 : goods.wlnItemName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.wlnItemName, "]") : '';
|
|
21344
|
+
}
|
|
21345
|
+
return res;
|
|
21346
|
+
})) {
|
|
21347
|
+
return Promise.reject("".concat(productName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
21348
|
+
}
|
|
21349
|
+
},
|
|
21296
21350
|
render: function render(val, record, index) {
|
|
21297
|
-
return record.
|
|
21351
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
21298
21352
|
style: {
|
|
21299
21353
|
width: 70
|
|
21300
21354
|
},
|
|
@@ -21302,33 +21356,27 @@ var getColumns$3 = function getColumns(_ref) {
|
|
|
21302
21356
|
min: 1,
|
|
21303
21357
|
precision: 0,
|
|
21304
21358
|
onChange: function onChange(num) {
|
|
21305
|
-
|
|
21359
|
+
updateHandle(num, index, 'number');
|
|
21360
|
+
if ((num || num === 0) && (record.price || record.price === 0)) updateHandle(num * (record.price || 0), index, 'money');
|
|
21306
21361
|
}
|
|
21307
21362
|
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
21308
21363
|
}
|
|
21309
21364
|
}, {
|
|
21310
|
-
dataIndex: '
|
|
21365
|
+
dataIndex: 'money',
|
|
21311
21366
|
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
21312
21367
|
width: 150,
|
|
21313
|
-
render: function render(
|
|
21314
|
-
|
|
21315
|
-
|
|
21316
|
-
|
|
21317
|
-
|
|
21318
|
-
|
|
21319
|
-
|
|
21320
|
-
|
|
21321
|
-
|
|
21322
|
-
|
|
21323
|
-
|
|
21324
|
-
|
|
21325
|
-
precision: 0,
|
|
21326
|
-
onChange: function onChange(num) {
|
|
21327
|
-
return updateHandle(num, index, 'total');
|
|
21328
|
-
}
|
|
21329
|
-
});
|
|
21330
|
-
}
|
|
21331
|
-
return value || value === 0 ? value : '';
|
|
21368
|
+
render: function render(val, record, index) {
|
|
21369
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
21370
|
+
style: {
|
|
21371
|
+
width: 130
|
|
21372
|
+
},
|
|
21373
|
+
value: val,
|
|
21374
|
+
min: 0,
|
|
21375
|
+
precision: 2,
|
|
21376
|
+
onChange: function onChange(num) {
|
|
21377
|
+
updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'money');
|
|
21378
|
+
}
|
|
21379
|
+
}) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
21332
21380
|
}
|
|
21333
21381
|
}, {
|
|
21334
21382
|
dataIndex: 'type',
|
|
@@ -21336,17 +21384,32 @@ var getColumns$3 = function getColumns(_ref) {
|
|
|
21336
21384
|
align: 'center',
|
|
21337
21385
|
ellipsis: true,
|
|
21338
21386
|
width: 100,
|
|
21339
|
-
render:
|
|
21387
|
+
render: function render(val, record, index) {
|
|
21388
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
21389
|
+
value: val,
|
|
21390
|
+
onChange: function onChange(value) {
|
|
21391
|
+
updateHandle(value, index, 'type');
|
|
21392
|
+
},
|
|
21393
|
+
options: [{
|
|
21394
|
+
label: '赠品',
|
|
21395
|
+
value: 1
|
|
21396
|
+
}, {
|
|
21397
|
+
label: '非赠品',
|
|
21398
|
+
value: 0
|
|
21399
|
+
}]
|
|
21400
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$4(val));
|
|
21401
|
+
}
|
|
21340
21402
|
}, {
|
|
21341
21403
|
dataIndex: 'isPackage',
|
|
21342
21404
|
title: "\u662F\u5426\u7EC4\u5408\u5546\u54C1",
|
|
21343
21405
|
align: 'center',
|
|
21344
21406
|
ellipsis: true,
|
|
21407
|
+
width: 200,
|
|
21345
21408
|
render: function render(val, record, index) {
|
|
21346
21409
|
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
21347
21410
|
value: val,
|
|
21348
21411
|
onChange: function onChange(value) {
|
|
21349
|
-
updateHandle(value, index, '
|
|
21412
|
+
updateHandle(value, index, 'isPackage');
|
|
21350
21413
|
},
|
|
21351
21414
|
options: [{
|
|
21352
21415
|
label: '是',
|
|
@@ -21356,8 +21419,7 @@ var getColumns$3 = function getColumns(_ref) {
|
|
|
21356
21419
|
value: false
|
|
21357
21420
|
}]
|
|
21358
21421
|
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$4(val));
|
|
21359
|
-
}
|
|
21360
|
-
width: 100
|
|
21422
|
+
}
|
|
21361
21423
|
}, {
|
|
21362
21424
|
dataIndex: 'unit',
|
|
21363
21425
|
title: "\u5355\u4F4D",
|
|
@@ -21399,7 +21461,7 @@ var getYesOrNo$5 = function getYesOrNo(val) {
|
|
|
21399
21461
|
if (isNull(val)) return null;
|
|
21400
21462
|
return val ? '是' : '否';
|
|
21401
21463
|
};
|
|
21402
|
-
function toNum$
|
|
21464
|
+
function toNum$2(value) {
|
|
21403
21465
|
if (typeof value === 'string') {
|
|
21404
21466
|
return value ? +value : void 0;
|
|
21405
21467
|
}
|
|
@@ -21579,7 +21641,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
21579
21641
|
validator: function validator(_rule, value) {
|
|
21580
21642
|
var goodsName = '';
|
|
21581
21643
|
if (((value === null || value === void 0 ? void 0 : value.gyReissueGoods) || []).some(function (goods) {
|
|
21582
|
-
var qty = toNum$
|
|
21644
|
+
var qty = toNum$2(goods === null || goods === void 0 ? void 0 : goods.qty);
|
|
21583
21645
|
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
21584
21646
|
if (res) {
|
|
21585
21647
|
goodsName = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
@@ -21700,7 +21762,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
21700
21762
|
validator: function validator(_rule, value) {
|
|
21701
21763
|
var goodsName = '';
|
|
21702
21764
|
if (((value === null || value === void 0 ? void 0 : value.gyReturnGoods) || []).some(function (goods) {
|
|
21703
|
-
var qty = toNum$
|
|
21765
|
+
var qty = toNum$2(goods === null || goods === void 0 ? void 0 : goods.qty);
|
|
21704
21766
|
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
21705
21767
|
if (res) {
|
|
21706
21768
|
goodsName = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
@@ -21801,7 +21863,7 @@ var fillAttrs = function fillAttrs(item) {
|
|
|
21801
21863
|
if (!item.align) item.align = 'center';
|
|
21802
21864
|
return item;
|
|
21803
21865
|
};
|
|
21804
|
-
function toNum$
|
|
21866
|
+
function toNum$3(value) {
|
|
21805
21867
|
if (typeof value === 'string') {
|
|
21806
21868
|
return value ? +value : void 0;
|
|
21807
21869
|
}
|
|
@@ -22041,7 +22103,7 @@ var getColumns$5 = function getColumns() {
|
|
|
22041
22103
|
validator: function validator(_rule, value) {
|
|
22042
22104
|
var goodsName = '';
|
|
22043
22105
|
if (((value === null || value === void 0 ? void 0 : value.jstReissueGoods) || []).some(function (goods) {
|
|
22044
|
-
var qty = toNum$
|
|
22106
|
+
var qty = toNum$3(goods === null || goods === void 0 ? void 0 : goods.qty);
|
|
22045
22107
|
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
22046
22108
|
if (res) {
|
|
22047
22109
|
goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
@@ -22142,7 +22204,7 @@ var getColumns$5 = function getColumns() {
|
|
|
22142
22204
|
validator: function validator(_rule, value) {
|
|
22143
22205
|
var goodsName = '';
|
|
22144
22206
|
if (((value === null || value === void 0 ? void 0 : value.jstReturnGoods) || []).some(function (goods) {
|
|
22145
|
-
var v = toNum$
|
|
22207
|
+
var v = toNum$3(goods === null || goods === void 0 ? void 0 : goods.salePrice);
|
|
22146
22208
|
var res = typeof v === 'number' ? v < 0 : true;
|
|
22147
22209
|
if (res) {
|
|
22148
22210
|
goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
@@ -22172,7 +22234,7 @@ var getColumns$5 = function getColumns() {
|
|
|
22172
22234
|
validator: function validator(_rule, value) {
|
|
22173
22235
|
var goodsName = '';
|
|
22174
22236
|
if (((value === null || value === void 0 ? void 0 : value.jstReturnGoods) || []).some(function (goods) {
|
|
22175
|
-
var qty = toNum$
|
|
22237
|
+
var qty = toNum$3(goods === null || goods === void 0 ? void 0 : goods.qty);
|
|
22176
22238
|
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
22177
22239
|
if (res) {
|
|
22178
22240
|
goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
@@ -22517,7 +22579,7 @@ var getColumns$5 = function getColumns() {
|
|
|
22517
22579
|
};
|
|
22518
22580
|
};
|
|
22519
22581
|
|
|
22520
|
-
function toNum$
|
|
22582
|
+
function toNum$4(value) {
|
|
22521
22583
|
if (typeof value === 'string') {
|
|
22522
22584
|
return value ? +value : void 0;
|
|
22523
22585
|
}
|
|
@@ -22735,7 +22797,7 @@ var getColumns$6 = function getColumns() {
|
|
|
22735
22797
|
if (!(extraParams === null || extraParams === void 0 ? void 0 : extraParams.quantityVerify)) return undefined;
|
|
22736
22798
|
var title = '';
|
|
22737
22799
|
if (((value === null || value === void 0 ? void 0 : value.kmReissueGoods) || []).some(function (goods) {
|
|
22738
|
-
var realNum = toNum$
|
|
22800
|
+
var realNum = toNum$4(goods === null || goods === void 0 ? void 0 : goods.realNum);
|
|
22739
22801
|
var res = typeof realNum === 'number' ? realNum < 1 : true;
|
|
22740
22802
|
if (res) {
|
|
22741
22803
|
title = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
@@ -22765,7 +22827,7 @@ var getColumns$6 = function getColumns() {
|
|
|
22765
22827
|
validator: function validator(_rule, value) {
|
|
22766
22828
|
var title = '';
|
|
22767
22829
|
if (((value === null || value === void 0 ? void 0 : value.kmReissueGoods) || []).some(function (goods) {
|
|
22768
|
-
var desiredNum = toNum$
|
|
22830
|
+
var desiredNum = toNum$4(goods === null || goods === void 0 ? void 0 : goods.desiredNum);
|
|
22769
22831
|
var res = typeof desiredNum === 'number' ? desiredNum < 1 : true;
|
|
22770
22832
|
if (res) {
|
|
22771
22833
|
title = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
@@ -22926,7 +22988,7 @@ var getColumns$6 = function getColumns() {
|
|
|
22926
22988
|
validator: function validator(_rule, value) {
|
|
22927
22989
|
var title = '';
|
|
22928
22990
|
if (((value === null || value === void 0 ? void 0 : value.kmReturnGoods) || []).some(function (goods) {
|
|
22929
|
-
var desiredNum = toNum$
|
|
22991
|
+
var desiredNum = toNum$4(goods === null || goods === void 0 ? void 0 : goods.desiredNum);
|
|
22930
22992
|
var res = typeof desiredNum === 'number' ? desiredNum < 1 : true;
|
|
22931
22993
|
if (res) {
|
|
22932
22994
|
title = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
@@ -23093,7 +23155,7 @@ var getColumns$6 = function getColumns() {
|
|
|
23093
23155
|
if (!(extraParams === null || extraParams === void 0 ? void 0 : extraParams.quantityVerify)) return undefined;
|
|
23094
23156
|
var title = '';
|
|
23095
23157
|
if (((value === null || value === void 0 ? void 0 : value.kmExchangeGoods) || []).some(function (goods) {
|
|
23096
|
-
var realNum = toNum$
|
|
23158
|
+
var realNum = toNum$4(goods === null || goods === void 0 ? void 0 : goods.realNum);
|
|
23097
23159
|
var res = typeof realNum === 'number' ? realNum < 1 : true;
|
|
23098
23160
|
if (res) {
|
|
23099
23161
|
title = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
@@ -23126,7 +23188,7 @@ var getColumns$6 = function getColumns() {
|
|
|
23126
23188
|
validator: function validator(_rule, value) {
|
|
23127
23189
|
var title = '';
|
|
23128
23190
|
if (((value === null || value === void 0 ? void 0 : value.kmExchangeGoods) || []).some(function (goods) {
|
|
23129
|
-
var desiredNum = toNum$
|
|
23191
|
+
var desiredNum = toNum$4(goods === null || goods === void 0 ? void 0 : goods.desiredNum);
|
|
23130
23192
|
var res = typeof desiredNum === 'number' ? desiredNum < 1 : true;
|
|
23131
23193
|
if (res) {
|
|
23132
23194
|
title = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
@@ -23187,7 +23249,7 @@ var isNumberOrNumberString$3 = function isNumberOrNumberString(value) {
|
|
|
23187
23249
|
if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
|
|
23188
23250
|
return false;
|
|
23189
23251
|
};
|
|
23190
|
-
function toNum$
|
|
23252
|
+
function toNum$5(value) {
|
|
23191
23253
|
if (typeof value === 'string') {
|
|
23192
23254
|
return value ? +value : void 0;
|
|
23193
23255
|
}
|
|
@@ -23522,7 +23584,7 @@ var getColumns$7 = function getColumns(_ref) {
|
|
|
23522
23584
|
validator: function validator(_rule, value) {
|
|
23523
23585
|
var productName = '';
|
|
23524
23586
|
if (((value === null || value === void 0 ? void 0 : value.jyReissueGoods) || []).some(function (goods) {
|
|
23525
|
-
var qty = toNum$
|
|
23587
|
+
var qty = toNum$5(goods === null || goods === void 0 ? void 0 : goods.sellCount);
|
|
23526
23588
|
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
23527
23589
|
if (res) {
|
|
23528
23590
|
productName = (goods === null || goods === void 0 ? void 0 : goods.productName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.productName, "]") : '';
|
|
@@ -23680,7 +23742,7 @@ var isNumberOrNumberString$4 = function isNumberOrNumberString(value) {
|
|
|
23680
23742
|
if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
|
|
23681
23743
|
return false;
|
|
23682
23744
|
};
|
|
23683
|
-
function toNum$
|
|
23745
|
+
function toNum$6(value) {
|
|
23684
23746
|
if (typeof value === 'string') {
|
|
23685
23747
|
return value ? +value : void 0;
|
|
23686
23748
|
}
|
|
@@ -24068,7 +24130,7 @@ var getColumns$9 = function getColumns(_ref) {
|
|
|
24068
24130
|
validator: function validator(_rule, value) {
|
|
24069
24131
|
var goodsName = '';
|
|
24070
24132
|
if (((value === null || value === void 0 ? void 0 : value.jkyReissueGoods) || []).some(function (goods) {
|
|
24071
|
-
var qty = toNum$
|
|
24133
|
+
var qty = toNum$6(goods === null || goods === void 0 ? void 0 : goods.sellCount);
|
|
24072
24134
|
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
24073
24135
|
if (res) {
|
|
24074
24136
|
goodsName = (goods === null || goods === void 0 ? void 0 : goods.goodsName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodsName, "]") : '';
|
|
@@ -26436,6 +26498,7 @@ var jstUtils = {
|
|
|
26436
26498
|
|
|
26437
26499
|
var singletonMap$4 = new Map();
|
|
26438
26500
|
var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
26501
|
+
var isSplit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
26439
26502
|
if (!singletonMap$4.has(orderNo)) {
|
|
26440
26503
|
var p = new Promise(function (resolve, reject) {
|
|
26441
26504
|
var doReject = function doReject(err) {
|
|
@@ -26446,7 +26509,8 @@ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
|
26446
26509
|
extendRequest('/qy/gdfw/order/wlnOrderList', {
|
|
26447
26510
|
method: 'post',
|
|
26448
26511
|
data: {
|
|
26449
|
-
billCode: orderNo
|
|
26512
|
+
billCode: orderNo,
|
|
26513
|
+
isSplit: isSplit
|
|
26450
26514
|
}
|
|
26451
26515
|
}).then(function (data) {
|
|
26452
26516
|
if (data === null || data === void 0 ? void 0 : data.success) {
|
|
@@ -28444,7 +28508,7 @@ var componentMap$2 = {
|
|
|
28444
28508
|
key: 'wlnGoods',
|
|
28445
28509
|
name: '吉客云',
|
|
28446
28510
|
orderNo: 'tradeNo',
|
|
28447
|
-
goodDetailOrderNo: '
|
|
28511
|
+
goodDetailOrderNo: 'tpTid',
|
|
28448
28512
|
eventNameMap: {
|
|
28449
28513
|
// pubsub 事件
|
|
28450
28514
|
type: 'wlnType',
|
|
@@ -28463,7 +28527,14 @@ var componentMap$2 = {
|
|
|
28463
28527
|
returnDeleteGood: 'wlnReturnDeleteGood',
|
|
28464
28528
|
exchangeDeleteGood: 'wlnExchangeDeleteGood'
|
|
28465
28529
|
},
|
|
28466
|
-
getOrderList: wlnUtils.getOrderListSingleton
|
|
28530
|
+
getOrderList: wlnUtils.getOrderListSingleton,
|
|
28531
|
+
checkShowModeBtn: function checkShowModeBtn(value) {
|
|
28532
|
+
var _value$allOrders;
|
|
28533
|
+
return value === null || value === void 0 ? void 0 : (_value$allOrders = value.allOrders) === null || _value$allOrders === void 0 ? void 0 : _value$allOrders.some(function (order) {
|
|
28534
|
+
var _order$tpTid;
|
|
28535
|
+
return order === null || order === void 0 ? void 0 : (_order$tpTid = order.tpTid) === null || _order$tpTid === void 0 ? void 0 : _order$tpTid.includes('|');
|
|
28536
|
+
});
|
|
28537
|
+
}
|
|
28467
28538
|
},
|
|
28468
28539
|
WDT_AFTERSALE_GOODS: {
|
|
28469
28540
|
type: 'wdtAftersale',
|
|
@@ -28496,14 +28567,14 @@ var componentMap$2 = {
|
|
|
28496
28567
|
}
|
|
28497
28568
|
};
|
|
28498
28569
|
var CommonGoods = function CommonGoods(props) {
|
|
28499
|
-
var _withInfo$current3, _withInfo$current4, _componentMap$
|
|
28570
|
+
var _componentMap$compTyp, _withInfo$current3, _withInfo$current4, _componentMap$compTyp7;
|
|
28500
28571
|
var value = props.value,
|
|
28501
28572
|
disabled = props.disabled,
|
|
28502
28573
|
onChange = props.onChange,
|
|
28503
28574
|
compType = props.type;
|
|
28504
28575
|
// console.log('value?.orders', value?.orders);
|
|
28505
28576
|
// 合并单订单会包含","
|
|
28506
|
-
var showModeBtn = !['BS_E3_GOODS'].includes(compType) && ((value === null || value === void 0 ? void 0 : value.orders) || []).some(function (order) {
|
|
28577
|
+
var showModeBtn = ((_componentMap$compTyp = componentMap$2[compType]) === null || _componentMap$compTyp === void 0 ? void 0 : _componentMap$compTyp.checkShowModeBtn) ? componentMap$2[compType].checkShowModeBtn(value) : !['BS_E3_GOODS'].includes(compType) && ((value === null || value === void 0 ? void 0 : value.orders) || []).some(function (order) {
|
|
28507
28578
|
var _order$componentMap$c;
|
|
28508
28579
|
return order === null || order === void 0 ? void 0 : (_order$componentMap$c = order[componentMap$2[compType].orderNo]) === null || _order$componentMap$c === void 0 ? void 0 : _order$componentMap$c.includes(',');
|
|
28509
28580
|
});
|
|
@@ -28747,8 +28818,8 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
28747
28818
|
});
|
|
28748
28819
|
var orderNo = value === null || value === void 0 ? void 0 : value.orderNo;
|
|
28749
28820
|
return mode ? goodDetails.filter(function (goodItem) {
|
|
28750
|
-
var _componentMap$
|
|
28751
|
-
return !orderNo || (goodItem === null || goodItem === void 0 ? void 0 : goodItem[(_componentMap$
|
|
28821
|
+
var _componentMap$compTyp2;
|
|
28822
|
+
return !orderNo || (goodItem === null || goodItem === void 0 ? void 0 : goodItem[(_componentMap$compTyp2 = componentMap$2[compType]) === null || _componentMap$compTyp2 === void 0 ? void 0 : _componentMap$compTyp2.goodDetailOrderNo]) === orderNo;
|
|
28752
28823
|
}) : goodDetails;
|
|
28753
28824
|
};
|
|
28754
28825
|
// 找到该订单号下所有商品
|
|
@@ -28773,8 +28844,8 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
28773
28844
|
// await getKmSupplier(goodDetails);
|
|
28774
28845
|
// }
|
|
28775
28846
|
return _context3.abrupt("return", mode ? goodDetails.filter(function (goodItem) {
|
|
28776
|
-
var _componentMap$
|
|
28777
|
-
return !orderNo || (goodItem === null || goodItem === void 0 ? void 0 : goodItem[(_componentMap$
|
|
28847
|
+
var _componentMap$compTyp3;
|
|
28848
|
+
return !orderNo || (goodItem === null || goodItem === void 0 ? void 0 : goodItem[(_componentMap$compTyp3 = componentMap$2[compType]) === null || _componentMap$compTyp3 === void 0 ? void 0 : _componentMap$compTyp3.goodDetailOrderNo]) === orderNo;
|
|
28778
28849
|
}) : goodDetails);
|
|
28779
28850
|
case 7:
|
|
28780
28851
|
case "end":
|
|
@@ -28815,7 +28886,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
28815
28886
|
}, [value === null || value === void 0 ? void 0 : value.allOrders, value === null || value === void 0 ? void 0 : value.isStrict, value === null || value === void 0 ? void 0 : value.orderNo, compType]);
|
|
28816
28887
|
var selectedGoodsChange = /*#__PURE__*/function () {
|
|
28817
28888
|
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(skuList) {
|
|
28818
|
-
var _valueRef$current9, _componentMap$
|
|
28889
|
+
var _valueRef$current9, _componentMap$compTyp4, _componentMap$compTyp5, _uniqBy;
|
|
28819
28890
|
var newValue, isStrict, originTradeGoodList, currentSelectGoodList;
|
|
28820
28891
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
28821
28892
|
while (1) switch (_context5.prev = _context5.next) {
|
|
@@ -28836,8 +28907,8 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
28836
28907
|
case 7:
|
|
28837
28908
|
originTradeGoodList = _context5.t0;
|
|
28838
28909
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
28839
|
-
currentSelectGoodList = ((_valueRef$current9 = valueRef.current) === null || _valueRef$current9 === void 0 ? void 0 : _valueRef$current9["".concat(componentMap$2 === null || componentMap$2 === void 0 ? void 0 : (_componentMap$
|
|
28840
|
-
newValue["".concat(componentMap$2 === null || componentMap$2 === void 0 ? void 0 : (_componentMap$
|
|
28910
|
+
currentSelectGoodList = ((_valueRef$current9 = valueRef.current) === null || _valueRef$current9 === void 0 ? void 0 : _valueRef$current9["".concat(componentMap$2 === null || componentMap$2 === void 0 ? void 0 : (_componentMap$compTyp4 = componentMap$2[compType]) === null || _componentMap$compTyp4 === void 0 ? void 0 : _componentMap$compTyp4.key)]) || [];
|
|
28911
|
+
newValue["".concat(componentMap$2 === null || componentMap$2 === void 0 ? void 0 : (_componentMap$compTyp5 = componentMap$2[compType]) === null || _componentMap$compTyp5 === void 0 ? void 0 : _componentMap$compTyp5.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
28841
28912
|
return skuList.includes(item.uuid);
|
|
28842
28913
|
});
|
|
28843
28914
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
@@ -28853,8 +28924,8 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
28853
28924
|
}();
|
|
28854
28925
|
// 商品信息组件暂存后 重新编辑,此时需要重新获取订单下所有系统自订单的商品信息
|
|
28855
28926
|
var getDataSourceAsync = function getDataSourceAsync() {
|
|
28856
|
-
var _componentMap$
|
|
28857
|
-
return (value === null || value === void 0 ? void 0 : value.orderNo) ? (_componentMap$
|
|
28927
|
+
var _componentMap$compTyp6;
|
|
28928
|
+
return (value === null || value === void 0 ? void 0 : value.orderNo) ? (_componentMap$compTyp6 = componentMap$2[compType]) === null || _componentMap$compTyp6 === void 0 ? void 0 : _componentMap$compTyp6.getOrderList(value === null || value === void 0 ? void 0 : value.orderNo).then(function (data) {
|
|
28858
28929
|
var list = processAllOrders({
|
|
28859
28930
|
data: data,
|
|
28860
28931
|
orderNo: value === null || value === void 0 ? void 0 : value.orderNo,
|
|
@@ -28887,7 +28958,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
28887
28958
|
isStrict: value === null || value === void 0 ? void 0 : value.isStrict,
|
|
28888
28959
|
systemOrders: value === null || value === void 0 ? void 0 : value.allOrders,
|
|
28889
28960
|
selectedSystemOrders: value === null || value === void 0 ? void 0 : value.orders,
|
|
28890
|
-
showChangeBtn: (_componentMap$
|
|
28961
|
+
showChangeBtn: (_componentMap$compTyp7 = componentMap$2[compType]) === null || _componentMap$compTyp7 === void 0 ? void 0 : _componentMap$compTyp7.showChangeBtn,
|
|
28891
28962
|
tradeGoods: {
|
|
28892
28963
|
originDataSource: originDataSource,
|
|
28893
28964
|
getDataSourceAsync: getDataSourceAsync,
|
|
@@ -29660,15 +29731,21 @@ var typeMap$2 = {
|
|
|
29660
29731
|
updateGoodsHandle: updateWlnGoodsHandle,
|
|
29661
29732
|
alwaysShowChooseErpGoodsBtn: true,
|
|
29662
29733
|
orderTypeKey: 'orderType',
|
|
29663
|
-
oIdKey: '
|
|
29734
|
+
oIdKey: 'tradeNo',
|
|
29664
29735
|
outerOiIdKey: 'tpTid',
|
|
29665
29736
|
goodDetailsKey: 'items',
|
|
29666
29737
|
isShowSelectTradeGoods: true,
|
|
29667
|
-
|
|
29738
|
+
checkShowModeBtn: function checkShowModeBtn(value) {
|
|
29739
|
+
var _value$wlnSystemOrder, _value$wlnSystemOrder2, _selectOrder$tpTid, _selectOrder$tid;
|
|
29740
|
+
var selectOrder = (value === null || value === void 0 ? void 0 : value.wlnSystemOrderNo) && (value === null || value === void 0 ? void 0 : (_value$wlnSystemOrder = value.wlnSystemOrder) === null || _value$wlnSystemOrder === void 0 ? void 0 : (_value$wlnSystemOrder2 = _value$wlnSystemOrder.orders) === null || _value$wlnSystemOrder2 === void 0 ? void 0 : _value$wlnSystemOrder2.find(function (order) {
|
|
29741
|
+
return (value === null || value === void 0 ? void 0 : value.wlnSystemOrderNo) === (order === null || order === void 0 ? void 0 : order.billNo);
|
|
29742
|
+
}));
|
|
29743
|
+
return (selectOrder === null || selectOrder === void 0 ? void 0 : (_selectOrder$tpTid = selectOrder.tpTid) === null || _selectOrder$tpTid === void 0 ? void 0 : _selectOrder$tpTid.includes('|')) || (selectOrder === null || selectOrder === void 0 ? void 0 : (_selectOrder$tid = selectOrder.tid) === null || _selectOrder$tid === void 0 ? void 0 : _selectOrder$tid.includes('|'));
|
|
29744
|
+
}
|
|
29668
29745
|
}
|
|
29669
29746
|
};
|
|
29670
29747
|
var PublicReissue = function PublicReissue(props) {
|
|
29671
|
-
var _typeMap$
|
|
29748
|
+
var _typeMap$type, _typeMap$type2, _typeMap$type20, _typeMap$type38, _typeMap$type44, _typeMap$type45, _typeMap$type46, _typeMap$type47, _value$typeMap$type$s8, _typeMap$type48, _typeMap$type49, _typeMap$type50, _typeMap$type51, _typeMap$type52, _typeMap$type53, _typeMap$type54, _typeMap$type55, _value$typeMap$type$s9, _typeMap$type56, _typeMap$type57, _typeMap$type58, _typeMap$type59;
|
|
29672
29749
|
var value = props.value,
|
|
29673
29750
|
onChange = props.onChange,
|
|
29674
29751
|
_props$reasonList = props.reasonList,
|
|
@@ -29677,6 +29754,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
29677
29754
|
type = props.type,
|
|
29678
29755
|
isSettingConfig = props.isSettingConfig,
|
|
29679
29756
|
other = _objectWithoutProperties(props, _excluded$m);
|
|
29757
|
+
var showModeBtn = ((_typeMap$type = typeMap$2[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.checkShowModeBtn) ? typeMap$2[type].checkShowModeBtn(value) : !!((_typeMap$type2 = typeMap$2[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.showModeBtn) || false;
|
|
29680
29758
|
var getOrderFlag = useRef(false);
|
|
29681
29759
|
var _useState = useState(false),
|
|
29682
29760
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -29684,11 +29762,11 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
29684
29762
|
setIsStrict = _useState2[1];
|
|
29685
29763
|
// TODO: 在修改场景下手动获取一次订单详情中数据
|
|
29686
29764
|
useEffect(function () {
|
|
29687
|
-
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$
|
|
29688
|
-
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$
|
|
29689
|
-
var _value$typeMap$type$s5, _typeMap$
|
|
29765
|
+
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type3, _value$typeMap$type$s3, _typeMap$type4, _value$typeMap$type$s4, _typeMap$type5;
|
|
29766
|
+
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type3 = typeMap$2[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.systemOrder]) === null || _value$typeMap$type$s === void 0 ? void 0 : (_value$typeMap$type$s2 = _value$typeMap$type$s.orders) === null || _value$typeMap$type$s2 === void 0 ? void 0 : _value$typeMap$type$s2.length) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s3 = value[(_typeMap$type4 = typeMap$2[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.systemOrder]) === null || _value$typeMap$type$s3 === void 0 ? void 0 : _value$typeMap$type$s3.orderNo) && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type5 = typeMap$2[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder]) === null || _value$typeMap$type$s4 === void 0 ? void 0 : _value$typeMap$type$s4.isRequest)) {
|
|
29767
|
+
var _value$typeMap$type$s5, _typeMap$type6;
|
|
29690
29768
|
getOrderFlag.current = true;
|
|
29691
|
-
getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
29769
|
+
getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type6 = typeMap$2[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.orderNo, type === 'WLN_REISSUE_GOODS' ? props.orderBackGoodsLevel !== '2' : void 0);
|
|
29692
29770
|
}
|
|
29693
29771
|
return;
|
|
29694
29772
|
}, [value]);
|
|
@@ -29718,27 +29796,30 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
29718
29796
|
}, []);
|
|
29719
29797
|
var getOrderList = /*#__PURE__*/function () {
|
|
29720
29798
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
29721
|
-
var _typeMap$
|
|
29799
|
+
var _typeMap$type7;
|
|
29800
|
+
var isSplit,
|
|
29801
|
+
_args = arguments;
|
|
29722
29802
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
29723
29803
|
while (1) switch (_context.prev = _context.next) {
|
|
29724
29804
|
case 0:
|
|
29725
|
-
|
|
29726
|
-
|
|
29805
|
+
isSplit = _args.length > 1 && _args[1] !== undefined ? _args[1] : false;
|
|
29806
|
+
(_typeMap$type7 = typeMap$2[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.getOrderList(orderNo, isSplit).then(function (data) {
|
|
29807
|
+
var _valueRef$current3, _typeMap$type8, _typeMap$type9, _typeMap$type13, _ref3, _typeMap$type14;
|
|
29727
29808
|
var orders = (type === 'WLN_REISSUE_GOODS' ? data === null || data === void 0 ? void 0 : data.orders : data) || [];
|
|
29728
29809
|
var showOrderInfo = orders === null || orders === void 0 ? void 0 : orders.map(function (orderItem) {
|
|
29729
29810
|
return _defineProperty({}, typeMap$2[type].oIdKey, orderItem[typeMap$2[type].oIdKey]);
|
|
29730
29811
|
});
|
|
29731
29812
|
var typeObj = {};
|
|
29732
|
-
var systemOrderNo = valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current3 = valueRef.current) === null || _valueRef$current3 === void 0 ? void 0 : _valueRef$current3[(_typeMap$
|
|
29733
|
-
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
29734
|
-
var _typeMap$
|
|
29813
|
+
var systemOrderNo = valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current3 = valueRef.current) === null || _valueRef$current3 === void 0 ? void 0 : _valueRef$current3[(_typeMap$type8 = typeMap$2[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.systemOrderNo];
|
|
29814
|
+
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type9 = typeMap$2[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.systemOrderBillType) {
|
|
29815
|
+
var _typeMap$type11, _typeMap$type12;
|
|
29735
29816
|
var targetOrder = orders.find(function (oItem) {
|
|
29736
|
-
var _typeMap$
|
|
29737
|
-
return oItem[(_typeMap$
|
|
29817
|
+
var _typeMap$type10;
|
|
29818
|
+
return oItem[(_typeMap$type10 = typeMap$2[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.oIdKey] === systemOrderNo;
|
|
29738
29819
|
});
|
|
29739
|
-
typeObj[(_typeMap$
|
|
29820
|
+
typeObj[(_typeMap$type11 = typeMap$2[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.systemOrderBillType] = targetOrder === null || targetOrder === void 0 ? void 0 : targetOrder[(_typeMap$type12 = typeMap$2[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.orderTypeKey];
|
|
29740
29821
|
}
|
|
29741
|
-
var newValue = _objectSpread2(_objectSpread2(_objectSpread2({}, valueRef.current || {}), typeObj), {}, _defineProperty({}, (_typeMap$
|
|
29822
|
+
var newValue = _objectSpread2(_objectSpread2(_objectSpread2({}, valueRef.current || {}), typeObj), {}, _defineProperty({}, (_typeMap$type13 = typeMap$2[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.systemOrder, _objectSpread2(_objectSpread2({}, ((_ref3 = valueRef.current || {}) === null || _ref3 === void 0 ? void 0 : _ref3[(_typeMap$type14 = typeMap$2[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.systemOrder]) || {}), {}, {
|
|
29742
29823
|
showOrderInfo: showOrderInfo,
|
|
29743
29824
|
orders: orders
|
|
29744
29825
|
})));
|
|
@@ -29746,7 +29827,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
29746
29827
|
onChange(newValue);
|
|
29747
29828
|
}
|
|
29748
29829
|
});
|
|
29749
|
-
case
|
|
29830
|
+
case 2:
|
|
29750
29831
|
case "end":
|
|
29751
29832
|
return _context.stop();
|
|
29752
29833
|
}
|
|
@@ -29757,31 +29838,30 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
29757
29838
|
};
|
|
29758
29839
|
}();
|
|
29759
29840
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
29760
|
-
var _typeMap$
|
|
29841
|
+
var _typeMap$type15;
|
|
29761
29842
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
29762
29843
|
// if (typeName === value?.[typeMap[type]?.typeName]?.[0]) return
|
|
29763
29844
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
29764
29845
|
var newValue = _objectSpread2({}, value);
|
|
29765
|
-
newValue[(_typeMap$
|
|
29846
|
+
newValue[(_typeMap$type15 = typeMap$2[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.typeName] = val;
|
|
29766
29847
|
if (typeName === '1') {
|
|
29767
|
-
var _typeMap$
|
|
29768
|
-
newValue[(_typeMap$
|
|
29848
|
+
var _typeMap$type16;
|
|
29849
|
+
newValue[(_typeMap$type16 = typeMap$2[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.key] = getGoodDetails({
|
|
29769
29850
|
mode: isStrict
|
|
29770
29851
|
});
|
|
29771
29852
|
} else if (typeName === '2') {
|
|
29772
|
-
var _typeMap$
|
|
29853
|
+
var _typeMap$type17;
|
|
29773
29854
|
// 切换到非原单,清空列表
|
|
29774
|
-
newValue[(_typeMap$
|
|
29855
|
+
newValue[(_typeMap$type17 = typeMap$2[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.key] = [];
|
|
29775
29856
|
}
|
|
29776
|
-
console.log('**** changeTypeHandle', newValue);
|
|
29777
29857
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
29778
29858
|
};
|
|
29779
29859
|
var handleModeChange = function handleModeChange(mode) {
|
|
29780
|
-
var _value$typeMap$type$t, _typeMap$
|
|
29781
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$
|
|
29860
|
+
var _value$typeMap$type$t, _typeMap$type18, _typeMap$type19;
|
|
29861
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type18 = typeMap$2[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0]) === '1';
|
|
29782
29862
|
setIsStrict(mode);
|
|
29783
29863
|
if (!isOriginalOrder) return;
|
|
29784
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$
|
|
29864
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type19 = typeMap$2[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key, getGoodDetails({
|
|
29785
29865
|
mode: mode
|
|
29786
29866
|
}))));
|
|
29787
29867
|
};
|
|
@@ -29798,7 +29878,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
29798
29878
|
});
|
|
29799
29879
|
}
|
|
29800
29880
|
return map;
|
|
29801
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
29881
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key]]);
|
|
29802
29882
|
// 用于跟踪已经处理过的 sysItemId,避免重复处理
|
|
29803
29883
|
var processedSysItemIdsRef = useRef(new Set());
|
|
29804
29884
|
useEffect(function () {
|
|
@@ -29870,13 +29950,13 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
29870
29950
|
}
|
|
29871
29951
|
}, [sysItemIdMap]);
|
|
29872
29952
|
var getGoodDetails = function getGoodDetails(_ref5) {
|
|
29873
|
-
var _typeMap$
|
|
29953
|
+
var _typeMap$type21, _typeMap$type22, _value$typeMap$type$s6, _typeMap$type23, _typeMap$type24, _typeMap$type25, _typeMap$type26;
|
|
29874
29954
|
var mode = _ref5.mode,
|
|
29875
29955
|
sysOrderNo = _ref5.sysOrderNo,
|
|
29876
29956
|
_ref5$isAllOrders = _ref5.isAllOrders,
|
|
29877
29957
|
isAllOrders = _ref5$isAllOrders === void 0 ? false : _ref5$isAllOrders;
|
|
29878
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
29879
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
29958
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrder];
|
|
29959
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrderNo];
|
|
29880
29960
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
29881
29961
|
return order[typeMap$2[type].oIdKey] === systemOrderNo;
|
|
29882
29962
|
});
|
|
@@ -29903,12 +29983,12 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
29903
29983
|
canEdit: true
|
|
29904
29984
|
};
|
|
29905
29985
|
}
|
|
29906
|
-
var orders = isAllOrders ? (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$
|
|
29986
|
+
var orders = isAllOrders ? (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrder]) === null || _value$typeMap$type$s6 === void 0 ? void 0 : _value$typeMap$type$s6.orders) || [] : order ? [order] : [];
|
|
29907
29987
|
var hasGoodDetails = orders === null || orders === void 0 ? void 0 : orders.some(function (order) {
|
|
29908
29988
|
var _order$typeMap$type$g;
|
|
29909
29989
|
return order === null || order === void 0 ? void 0 : (_order$typeMap$type$g = order[typeMap$2[type].goodDetailsKey]) === null || _order$typeMap$type$g === void 0 ? void 0 : _order$typeMap$type$g.length;
|
|
29910
29990
|
});
|
|
29911
|
-
var goodDetails = hasGoodDetails ? (!isAllOrders || ((_typeMap$
|
|
29991
|
+
var goodDetails = hasGoodDetails ? (!isAllOrders || ((_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.isSelectTradeGoodsMerge)) && typeMap$2[type].mergeIdenticalGoods ? typeMap$2[type].mergeIdenticalGoods((_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.updateGoodsHandle(orders, orderRest, type)) : (_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.updateGoodsHandle(orders, orderRest, type) : [];
|
|
29912
29992
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
29913
29993
|
var list = mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
29914
29994
|
return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
|
|
@@ -29916,30 +29996,30 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
29916
29996
|
return list;
|
|
29917
29997
|
};
|
|
29918
29998
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
29919
|
-
var _typeMap$
|
|
29999
|
+
var _typeMap$type27;
|
|
29920
30000
|
var newValue = _objectSpread2({}, value);
|
|
29921
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30001
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.key)] = val || [];
|
|
29922
30002
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
29923
30003
|
};
|
|
29924
30004
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
29925
|
-
var _typeMap$
|
|
30005
|
+
var _typeMap$type28, _typeMap$type29, _value$typeMap$type$t2, _typeMap$type34, _value$typeMap$type$t3, _typeMap$type36;
|
|
29926
30006
|
var newValue = _objectSpread2({}, value);
|
|
29927
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
29928
|
-
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
29929
|
-
var _value$typeMap$type$s7, _typeMap$
|
|
29930
|
-
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s7 = value[(_typeMap$
|
|
30007
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type28 = typeMap$2[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo)] = val;
|
|
30008
|
+
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type29 = typeMap$2[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderBillType) {
|
|
30009
|
+
var _value$typeMap$type$s7, _typeMap$type30, _typeMap$type32, _typeMap$type33;
|
|
30010
|
+
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s7 = value[(_typeMap$type30 = typeMap$2[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrder]) === null || _value$typeMap$type$s7 === void 0 ? void 0 : _value$typeMap$type$s7.orders) || [];
|
|
29931
30011
|
var targetOrder = val && orders.find(function (oItem) {
|
|
29932
|
-
var _typeMap$
|
|
29933
|
-
return oItem[(_typeMap$
|
|
30012
|
+
var _typeMap$type31;
|
|
30013
|
+
return oItem[(_typeMap$type31 = typeMap$2[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.oIdKey] === val;
|
|
29934
30014
|
});
|
|
29935
|
-
newValue[(_typeMap$
|
|
30015
|
+
newValue[(_typeMap$type32 = typeMap$2[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrderBillType] = targetOrder === null || targetOrder === void 0 ? void 0 : targetOrder[(_typeMap$type33 = typeMap$2[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.orderTypeKey];
|
|
29936
30016
|
}
|
|
29937
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
29938
|
-
var _typeMap$type33;
|
|
29939
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type33 = typeMap$2[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.key)] = [];
|
|
29940
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type34 = typeMap$2[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
30017
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type34 = typeMap$2[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
|
|
29941
30018
|
var _typeMap$type35;
|
|
29942
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type35 = typeMap$2[type]) === null || _typeMap$type35 === void 0 ? void 0 : _typeMap$type35.key)] =
|
|
30019
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type35 = typeMap$2[type]) === null || _typeMap$type35 === void 0 ? void 0 : _typeMap$type35.key)] = [];
|
|
30020
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type36 = typeMap$2[type]) === null || _typeMap$type36 === void 0 ? void 0 : _typeMap$type36.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
30021
|
+
var _typeMap$type37;
|
|
30022
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type37 = typeMap$2[type]) === null || _typeMap$type37 === void 0 ? void 0 : _typeMap$type37.key)] = getGoodDetails({
|
|
29943
30023
|
mode: isStrict,
|
|
29944
30024
|
sysOrderNo: val
|
|
29945
30025
|
});
|
|
@@ -29947,27 +30027,27 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
29947
30027
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue, 'systemOrder');
|
|
29948
30028
|
};
|
|
29949
30029
|
//显示选择商品按钮
|
|
29950
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
30030
|
+
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type38 = typeMap$2[type]) === null || _typeMap$type38 === void 0 ? void 0 : _typeMap$type38.systemOrderNo]);
|
|
29951
30031
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
29952
|
-
var _typeMap$
|
|
30032
|
+
var _typeMap$type39, _typeMap$type40, _typeMap$type41, _uniqBy, _typeMap$type42;
|
|
29953
30033
|
var newValue = _objectSpread2({}, value);
|
|
29954
30034
|
// 原订单商品
|
|
29955
30035
|
var originTradeGoodList = getGoodDetails({
|
|
29956
30036
|
mode: isStrict,
|
|
29957
|
-
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30037
|
+
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type39 = typeMap$2[type]) === null || _typeMap$type39 === void 0 ? void 0 : _typeMap$type39.isShowSelectTradeGoods
|
|
29958
30038
|
}) || [];
|
|
29959
30039
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
29960
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
29961
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
29962
|
-
var _typeMap$
|
|
29963
|
-
return skuList.includes(item[(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30040
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type40 = typeMap$2[type]) === null || _typeMap$type40 === void 0 ? void 0 : _typeMap$type40.key)]) || [];
|
|
30041
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type41 = typeMap$2[type]) === null || _typeMap$type41 === void 0 ? void 0 : _typeMap$type41.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type42 = typeMap$2[type]) === null || _typeMap$type42 === void 0 ? void 0 : _typeMap$type42.uniqueKey) || 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
30042
|
+
var _typeMap$type43;
|
|
30043
|
+
return skuList.includes(item[(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type43 = typeMap$2[type]) === null || _typeMap$type43 === void 0 ? void 0 : _typeMap$type43.uniqueKey) || 'uuid']);
|
|
29964
30044
|
});
|
|
29965
30045
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
29966
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30046
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type44 = typeMap$2[type]) === null || _typeMap$type44 === void 0 ? void 0 : _typeMap$type44.key)], isStrict]);
|
|
29967
30047
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
29968
30048
|
gutter: 8,
|
|
29969
30049
|
wrap: true,
|
|
29970
|
-
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30050
|
+
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type45 = typeMap$2[type]) === null || _typeMap$type45 === void 0 ? void 0 : _typeMap$type45.key) || "".concat(Date.now())
|
|
29971
30051
|
}, /*#__PURE__*/React.createElement(Col, {
|
|
29972
30052
|
className: "gutter-row",
|
|
29973
30053
|
xs: {
|
|
@@ -29983,12 +30063,12 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
29983
30063
|
},
|
|
29984
30064
|
disabled: disabled,
|
|
29985
30065
|
allowClear: false,
|
|
29986
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30066
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type46 = typeMap$2[type]) === null || _typeMap$type46 === void 0 ? void 0 : _typeMap$type46.systemOrderNo)],
|
|
29987
30067
|
onChange: function onChange(val) {
|
|
29988
30068
|
return changeSystemOrderHandle(val);
|
|
29989
30069
|
},
|
|
29990
|
-
placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
29991
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s8 = value[(_typeMap$
|
|
30070
|
+
placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type47 = typeMap$2[type]) === null || _typeMap$type47 === void 0 ? void 0 : _typeMap$type47.compType) || '', "\u7CFB\u7EDF\u5355")
|
|
30071
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s8 = value[(_typeMap$type48 = typeMap$2[type]) === null || _typeMap$type48 === void 0 ? void 0 : _typeMap$type48.systemOrder]) === null || _value$typeMap$type$s8 === void 0 ? void 0 : _value$typeMap$type$s8.showOrderInfo) || []).map(function (item) {
|
|
29992
30072
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
29993
30073
|
key: item[typeMap$2[type].oIdKey],
|
|
29994
30074
|
value: item[typeMap$2[type].oIdKey],
|
|
@@ -30010,11 +30090,11 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
30010
30090
|
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
30011
30091
|
allowClear: false,
|
|
30012
30092
|
options: reasonList,
|
|
30013
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30093
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type49 = typeMap$2[type]) === null || _typeMap$type49 === void 0 ? void 0 : _typeMap$type49.typeName)],
|
|
30014
30094
|
onChange: function onChange(val) {
|
|
30015
30095
|
return changeTypeHandle(val);
|
|
30016
30096
|
}
|
|
30017
|
-
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30097
|
+
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type50 = typeMap$2[type]) === null || _typeMap$type50 === void 0 ? void 0 : _typeMap$type50.systemOrderBillType) && !isSettingConfig && /*#__PURE__*/React.createElement(Col, {
|
|
30018
30098
|
className: "gutter-row",
|
|
30019
30099
|
xs: {
|
|
30020
30100
|
span: 11
|
|
@@ -30023,7 +30103,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
30023
30103
|
span: 6
|
|
30024
30104
|
}
|
|
30025
30105
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
30026
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30106
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type51 = typeMap$2[type]) === null || _typeMap$type51 === void 0 ? void 0 : _typeMap$type51.systemOrderBillType)],
|
|
30027
30107
|
disabled: disabled,
|
|
30028
30108
|
readOnly: true
|
|
30029
30109
|
}))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
@@ -30034,25 +30114,25 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
30034
30114
|
canUpdateNumber: showChangeBtn,
|
|
30035
30115
|
hasSelectedSystemOrder: showChangeBtn,
|
|
30036
30116
|
// showChangeBtn={showChangeBtn || typeMap?.[type]?.isShowSelectTradeGoods}
|
|
30037
|
-
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30038
|
-
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30117
|
+
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type52 = typeMap$2[type]) === null || _typeMap$type52 === void 0 ? void 0 : _typeMap$type52.alwaysShowChooseErpGoodsBtn,
|
|
30118
|
+
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type53 = typeMap$2[type]) === null || _typeMap$type53 === void 0 ? void 0 : _typeMap$type53.showErpGoodsBtn,
|
|
30039
30119
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
30040
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30120
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type54 = typeMap$2[type]) === null || _typeMap$type54 === void 0 ? void 0 : _typeMap$type54.key)],
|
|
30041
30121
|
onChange: function onChange(val) {
|
|
30042
30122
|
return changeGoodHandle(val);
|
|
30043
30123
|
},
|
|
30044
30124
|
onModeChange: handleModeChange,
|
|
30045
|
-
showModeBtn:
|
|
30125
|
+
showModeBtn: showModeBtn,
|
|
30046
30126
|
isStrict: isStrict,
|
|
30047
|
-
isShowSelectTradeGoods: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30048
|
-
systemOrders: value === null || value === void 0 ? void 0 : (_value$typeMap$type$s9 = value[(_typeMap$
|
|
30049
|
-
selectedSystemOrders: showChangeBtn ? [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30127
|
+
isShowSelectTradeGoods: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type55 = typeMap$2[type]) === null || _typeMap$type55 === void 0 ? void 0 : _typeMap$type55.isShowSelectTradeGoods,
|
|
30128
|
+
systemOrders: value === null || value === void 0 ? void 0 : (_value$typeMap$type$s9 = value[(_typeMap$type56 = typeMap$2[type]) === null || _typeMap$type56 === void 0 ? void 0 : _typeMap$type56.systemOrder]) === null || _value$typeMap$type$s9 === void 0 ? void 0 : _value$typeMap$type$s9.orders,
|
|
30129
|
+
selectedSystemOrders: showChangeBtn ? [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type57 = typeMap$2[type]) === null || _typeMap$type57 === void 0 ? void 0 : _typeMap$type57.systemOrderNo)]] : [],
|
|
30050
30130
|
tradeGoods: {
|
|
30051
30131
|
originDataSource: getGoodDetails({
|
|
30052
30132
|
mode: isStrict,
|
|
30053
|
-
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30133
|
+
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type58 = typeMap$2[type]) === null || _typeMap$type58 === void 0 ? void 0 : _typeMap$type58.isShowSelectTradeGoods
|
|
30054
30134
|
}),
|
|
30055
|
-
uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30135
|
+
uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type59 = typeMap$2[type]) === null || _typeMap$type59 === void 0 ? void 0 : _typeMap$type59.uniqueKey) || 'uuid',
|
|
30056
30136
|
selectedGoodsChange: selectedGoodsChange
|
|
30057
30137
|
}
|
|
30058
30138
|
})));
|
|
@@ -32,6 +32,7 @@ interface LogisticsInterceptionProps {
|
|
|
32
32
|
showReason?: boolean;
|
|
33
33
|
onJumpPage?: (val: any) => void;
|
|
34
34
|
preCreateAndNotModified?: boolean;
|
|
35
|
+
interceptTypeDefaults?: Record<string, string>;
|
|
35
36
|
}
|
|
36
37
|
declare const LogisticsInterception: (props: Partial<LogisticsInterceptionProps>) => React.JSX.Element;
|
|
37
38
|
export default LogisticsInterception;
|
|
@@ -33,8 +33,20 @@ declare const SYSTEM_ORDER_COLUMNS_MAP: {
|
|
|
33
33
|
title: string;
|
|
34
34
|
dataIndex: string;
|
|
35
35
|
width: number;
|
|
36
|
-
render: (val:
|
|
37
|
-
renderExport: (val:
|
|
36
|
+
render: (val: boolean) => "否" | "是";
|
|
37
|
+
renderExport: (val: boolean) => "否" | "是";
|
|
38
|
+
} | {
|
|
39
|
+
title: string;
|
|
40
|
+
dataIndex: string;
|
|
41
|
+
width: number;
|
|
42
|
+
render: (val: string[]) => string;
|
|
43
|
+
renderExport: (val: string[]) => string;
|
|
44
|
+
} | {
|
|
45
|
+
title: string;
|
|
46
|
+
dataIndex: string;
|
|
47
|
+
width: number;
|
|
48
|
+
render: (val: any, record: any, _?: any, parent?: any, index?: number | undefined) => any;
|
|
49
|
+
renderExport: (val: any, record: any, _?: any, parent?: any, index?: number | undefined) => any;
|
|
38
50
|
})[];
|
|
39
51
|
WDT_SYSTEM_ORDER: {
|
|
40
52
|
title: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "2.7.7-beta.
|
|
3
|
+
"version": "2.7.7-beta.11",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e ts,tsx,less --debug -x 'yarn async'"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@kmkf-fe-packages/kmkf-utils": "2.7.7-beta.
|
|
23
|
+
"@kmkf-fe-packages/kmkf-utils": "2.7.7-beta.9",
|
|
24
24
|
"ahooks": "^3.7.4",
|
|
25
25
|
"ali-react-table": "2.6.1",
|
|
26
26
|
"bignumber.js": "^9.1.2",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "f4be4364c58551b9abe6211a3c661456f7c8770e"
|
|
70
70
|
}
|