@kmkf-fe-packages/basic-components 2.2.13-beta.35 → 2.2.13-beta.37
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 +94 -46
- package/dist/index.js +94 -46
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -20376,6 +20376,15 @@ var isNumberOrNumberString$1 = function isNumberOrNumberString(value) {
|
|
|
20376
20376
|
if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
|
|
20377
20377
|
return false;
|
|
20378
20378
|
};
|
|
20379
|
+
function toNum$3(value) {
|
|
20380
|
+
if (typeof value === 'string') {
|
|
20381
|
+
return value ? +value : void 0;
|
|
20382
|
+
}
|
|
20383
|
+
if (typeof value === 'number') {
|
|
20384
|
+
return value;
|
|
20385
|
+
}
|
|
20386
|
+
return void 0;
|
|
20387
|
+
}
|
|
20379
20388
|
var getColumns$7 = function getColumns(_ref) {
|
|
20380
20389
|
var _ref$text = _ref.text,
|
|
20381
20390
|
disabled = _ref.disabled,
|
|
@@ -20492,6 +20501,19 @@ var getColumns$7 = function getColumns(_ref) {
|
|
|
20492
20501
|
dataIndex: 'sellCount',
|
|
20493
20502
|
title: "\u6570\u91CF",
|
|
20494
20503
|
width: 100,
|
|
20504
|
+
validator: function validator(_rule, value) {
|
|
20505
|
+
var productName = '';
|
|
20506
|
+
if (((value === null || value === void 0 ? void 0 : value.jyGoods) || []).some(function (goods) {
|
|
20507
|
+
var qty = toNum$3(goods === null || goods === void 0 ? void 0 : goods.sellCount);
|
|
20508
|
+
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
20509
|
+
if (res) {
|
|
20510
|
+
productName = (goods === null || goods === void 0 ? void 0 : goods.productName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.productName, "]") : '';
|
|
20511
|
+
}
|
|
20512
|
+
return res;
|
|
20513
|
+
})) {
|
|
20514
|
+
return Promise.reject("".concat(productName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
20515
|
+
}
|
|
20516
|
+
},
|
|
20495
20517
|
render: function render(val, record, index) {
|
|
20496
20518
|
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
20497
20519
|
style: {
|
|
@@ -20687,6 +20709,19 @@ var getColumns$7 = function getColumns(_ref) {
|
|
|
20687
20709
|
dataIndex: 'sellCount',
|
|
20688
20710
|
title: "\u6570\u91CF",
|
|
20689
20711
|
width: 100,
|
|
20712
|
+
validator: function validator(_rule, value) {
|
|
20713
|
+
var productName = '';
|
|
20714
|
+
if (((value === null || value === void 0 ? void 0 : value.jyReissueGoods) || []).some(function (goods) {
|
|
20715
|
+
var qty = toNum$3(goods === null || goods === void 0 ? void 0 : goods.sellCount);
|
|
20716
|
+
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
20717
|
+
if (res) {
|
|
20718
|
+
productName = (goods === null || goods === void 0 ? void 0 : goods.productName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.productName, "]") : '';
|
|
20719
|
+
}
|
|
20720
|
+
return res;
|
|
20721
|
+
})) {
|
|
20722
|
+
return Promise.reject("".concat(productName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
20723
|
+
}
|
|
20724
|
+
},
|
|
20690
20725
|
render: function render(val, record, index) {
|
|
20691
20726
|
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
20692
20727
|
style: {
|
|
@@ -21434,7 +21469,8 @@ var systemOrderNoMap = {
|
|
|
21434
21469
|
BS_E3_GOODS: 'orderSn',
|
|
21435
21470
|
JST_GOODS: 'oId',
|
|
21436
21471
|
WLN_GOODS: 'tradeNo',
|
|
21437
|
-
JY_GOODS: 'tradeNo'
|
|
21472
|
+
JY_GOODS: 'tradeNo',
|
|
21473
|
+
JY_REISSUE_GOODS: 'tradeNo'
|
|
21438
21474
|
};
|
|
21439
21475
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
21440
21476
|
var columns = _ref.columns,
|
|
@@ -21629,7 +21665,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
21629
21665
|
var jstReturnGoods = Form === null || Form === void 0 ? void 0 : Form.useWatch('3979edfd6d', form);
|
|
21630
21666
|
var isShowSelectTradeGoods = type !== 'JST_EXCHANGE_GOODS' || (jstReturnGoods === null || jstReturnGoods === void 0 ? void 0 : jstReturnGoods.jstSystemOrderNo);
|
|
21631
21667
|
// 判断是否为商品信息组件
|
|
21632
|
-
var isGoods = type && ['WDT_GOODS', 'BS_E3_GOODS', 'GY_GOODS', 'JST_GOODS', 'WLN_GOODS', 'KM_GOODS', 'JY_GOODS'].includes(type) || false;
|
|
21668
|
+
var isGoods = type && ['WDT_GOODS', 'BS_E3_GOODS', 'GY_GOODS', 'JST_GOODS', 'WLN_GOODS', 'KM_GOODS', 'JY_GOODS', 'JY_REISSUE_GOODS'].includes(type) || false;
|
|
21633
21669
|
var refModal = useRef();
|
|
21634
21670
|
console.debug('表格数据', value);
|
|
21635
21671
|
var handleDelete = function handleDelete(record, index) {
|
|
@@ -25321,11 +25357,12 @@ var typeMap$2 = {
|
|
|
25321
25357
|
orderTypeKey: 'orderType',
|
|
25322
25358
|
oIdKey: 'tradeNo',
|
|
25323
25359
|
outerOiIdKey: '',
|
|
25324
|
-
goodDetailsKey: 'subOrderDetails'
|
|
25360
|
+
goodDetailsKey: 'subOrderDetails',
|
|
25361
|
+
isShowSelectTradeGoods: true
|
|
25325
25362
|
}
|
|
25326
25363
|
};
|
|
25327
25364
|
var PublicReissue = function PublicReissue(props) {
|
|
25328
|
-
var _typeMap$
|
|
25365
|
+
var _typeMap$type34, _typeMap$type40, _typeMap$type41, _typeMap$type42, _typeMap$type43, _value$typeMap$type$s8, _typeMap$type44, _typeMap$type45, _typeMap$type46, _typeMap$type47, _typeMap$type48, _typeMap$type49, _typeMap$type50, _typeMap$type51, _typeMap$type52, _value$typeMap$type$s9, _typeMap$type53, _typeMap$type54, _typeMap$type55;
|
|
25329
25366
|
var value = props.value,
|
|
25330
25367
|
onChange = props.onChange,
|
|
25331
25368
|
_props$reasonList = props.reasonList,
|
|
@@ -25442,9 +25479,11 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25442
25479
|
}))));
|
|
25443
25480
|
};
|
|
25444
25481
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
25445
|
-
var _typeMap$type18, _typeMap$type19,
|
|
25482
|
+
var _typeMap$type18, _typeMap$type19, _value$typeMap$type$s6, _typeMap$type20, _typeMap$type21, _typeMap$type22;
|
|
25446
25483
|
var mode = _ref4.mode,
|
|
25447
|
-
sysOrderNo = _ref4.sysOrderNo
|
|
25484
|
+
sysOrderNo = _ref4.sysOrderNo,
|
|
25485
|
+
_ref4$isAllOrders = _ref4.isAllOrders,
|
|
25486
|
+
isAllOrders = _ref4$isAllOrders === void 0 ? false : _ref4$isAllOrders;
|
|
25448
25487
|
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type18 = typeMap$2[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrder];
|
|
25449
25488
|
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type19 = typeMap$2[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.systemOrderNo];
|
|
25450
25489
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
@@ -25463,38 +25502,43 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25463
25502
|
canEdit: true
|
|
25464
25503
|
};
|
|
25465
25504
|
}
|
|
25466
|
-
var
|
|
25505
|
+
var orders = isAllOrders ? (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrder]) === null || _value$typeMap$type$s6 === void 0 ? void 0 : _value$typeMap$type$s6.orders) || [] : [order];
|
|
25506
|
+
var hasGoodDetails = orders === null || orders === void 0 ? void 0 : orders.some(function (order) {
|
|
25507
|
+
var _order$typeMap$type$g;
|
|
25508
|
+
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;
|
|
25509
|
+
});
|
|
25510
|
+
var goodDetails = hasGoodDetails ? typeMap$2[type].mergeIdenticalGoods ? typeMap$2[type].mergeIdenticalGoods((_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.updateGoodsHandle(orders, orderRest)) : (_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.updateGoodsHandle(orders, orderRest) : [];
|
|
25467
25511
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
25468
|
-
var list = mode ? goodDetails.filter(function (goodItem) {
|
|
25512
|
+
var list = mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
25469
25513
|
return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
|
|
25470
25514
|
}) : goodDetails;
|
|
25471
25515
|
return list;
|
|
25472
25516
|
};
|
|
25473
25517
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
25474
|
-
var _typeMap$
|
|
25518
|
+
var _typeMap$type23;
|
|
25475
25519
|
var newValue = _objectSpread2({}, value);
|
|
25476
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25520
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)] = val || [];
|
|
25477
25521
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
25478
25522
|
};
|
|
25479
25523
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
25480
|
-
var _typeMap$
|
|
25524
|
+
var _typeMap$type24, _typeMap$type25, _value$typeMap$type$t2, _typeMap$type30, _value$typeMap$type$t3, _typeMap$type32;
|
|
25481
25525
|
var newValue = _objectSpread2({}, value);
|
|
25482
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25483
|
-
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25484
|
-
var _value$typeMap$type$
|
|
25485
|
-
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$
|
|
25526
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo)] = val;
|
|
25527
|
+
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderBillType) {
|
|
25528
|
+
var _value$typeMap$type$s7, _typeMap$type26, _typeMap$type28, _typeMap$type29;
|
|
25529
|
+
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s7 = value[(_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrder]) === null || _value$typeMap$type$s7 === void 0 ? void 0 : _value$typeMap$type$s7.orders) || [];
|
|
25486
25530
|
var targetOrder = val && orders.find(function (oItem) {
|
|
25487
|
-
var _typeMap$
|
|
25488
|
-
return oItem[(_typeMap$
|
|
25531
|
+
var _typeMap$type27;
|
|
25532
|
+
return oItem[(_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.oIdKey] === val;
|
|
25489
25533
|
});
|
|
25490
|
-
newValue[(_typeMap$
|
|
25491
|
-
}
|
|
25492
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
25493
|
-
var _typeMap$
|
|
25494
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25495
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
25496
|
-
var _typeMap$
|
|
25497
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25534
|
+
newValue[(_typeMap$type28 = typeMap$2[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderBillType] = targetOrder === null || targetOrder === void 0 ? void 0 : targetOrder[(_typeMap$type29 = typeMap$2[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.orderTypeKey];
|
|
25535
|
+
}
|
|
25536
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type30 = typeMap$2[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
|
|
25537
|
+
var _typeMap$type31;
|
|
25538
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type31 = typeMap$2[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.key)] = [];
|
|
25539
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type32 = typeMap$2[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
25540
|
+
var _typeMap$type33;
|
|
25541
|
+
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)] = getGoodDetails({
|
|
25498
25542
|
mode: isStrict,
|
|
25499
25543
|
sysOrderNo: val
|
|
25500
25544
|
});
|
|
@@ -25502,26 +25546,27 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25502
25546
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue, 'systemOrder');
|
|
25503
25547
|
};
|
|
25504
25548
|
//显示选择商品按钮
|
|
25505
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
25549
|
+
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type34 = typeMap$2[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.systemOrderNo]);
|
|
25506
25550
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
25507
|
-
var _typeMap$
|
|
25551
|
+
var _typeMap$type35, _typeMap$type36, _typeMap$type37, _uniqBy, _typeMap$type38;
|
|
25508
25552
|
var newValue = _objectSpread2({}, value);
|
|
25509
25553
|
// 原订单商品
|
|
25510
25554
|
var originTradeGoodList = getGoodDetails({
|
|
25511
|
-
mode: isStrict
|
|
25555
|
+
mode: isStrict,
|
|
25556
|
+
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type35 = typeMap$2[type]) === null || _typeMap$type35 === void 0 ? void 0 : _typeMap$type35.isShowSelectTradeGoods
|
|
25512
25557
|
}) || [];
|
|
25513
25558
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
25514
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25515
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25516
|
-
var _typeMap$
|
|
25517
|
-
return skuList.includes(item[(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25559
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type36 = typeMap$2[type]) === null || _typeMap$type36 === void 0 ? void 0 : _typeMap$type36.key)]) || [];
|
|
25560
|
+
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)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type38 = typeMap$2[type]) === null || _typeMap$type38 === void 0 ? void 0 : _typeMap$type38.uniqueKey) || 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
25561
|
+
var _typeMap$type39;
|
|
25562
|
+
return skuList.includes(item[(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type39 = typeMap$2[type]) === null || _typeMap$type39 === void 0 ? void 0 : _typeMap$type39.uniqueKey) || 'uuid']);
|
|
25518
25563
|
});
|
|
25519
25564
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
25520
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25565
|
+
}, [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)], isStrict]);
|
|
25521
25566
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
25522
25567
|
gutter: 8,
|
|
25523
25568
|
wrap: true,
|
|
25524
|
-
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25569
|
+
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type41 = typeMap$2[type]) === null || _typeMap$type41 === void 0 ? void 0 : _typeMap$type41.key) || "".concat(Date.now())
|
|
25525
25570
|
}, /*#__PURE__*/React.createElement(Col, {
|
|
25526
25571
|
className: "gutter-row",
|
|
25527
25572
|
xs: {
|
|
@@ -25537,12 +25582,12 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25537
25582
|
},
|
|
25538
25583
|
disabled: disabled,
|
|
25539
25584
|
allowClear: false,
|
|
25540
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25585
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type42 = typeMap$2[type]) === null || _typeMap$type42 === void 0 ? void 0 : _typeMap$type42.systemOrderNo)],
|
|
25541
25586
|
onChange: function onChange(val) {
|
|
25542
25587
|
return changeSystemOrderHandle(val);
|
|
25543
25588
|
},
|
|
25544
|
-
placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25545
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$
|
|
25589
|
+
placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type43 = typeMap$2[type]) === null || _typeMap$type43 === void 0 ? void 0 : _typeMap$type43.compType) || '', "\u7CFB\u7EDF\u5355")
|
|
25590
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s8 = value[(_typeMap$type44 = typeMap$2[type]) === null || _typeMap$type44 === void 0 ? void 0 : _typeMap$type44.systemOrder]) === null || _value$typeMap$type$s8 === void 0 ? void 0 : _value$typeMap$type$s8.showOrderInfo) || []).map(function (item) {
|
|
25546
25591
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
25547
25592
|
key: item[typeMap$2[type].oIdKey],
|
|
25548
25593
|
value: item[typeMap$2[type].oIdKey],
|
|
@@ -25564,11 +25609,11 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25564
25609
|
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
25565
25610
|
allowClear: false,
|
|
25566
25611
|
options: reasonList,
|
|
25567
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25612
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type45 = typeMap$2[type]) === null || _typeMap$type45 === void 0 ? void 0 : _typeMap$type45.typeName)],
|
|
25568
25613
|
onChange: function onChange(val) {
|
|
25569
25614
|
return changeTypeHandle(val);
|
|
25570
25615
|
}
|
|
25571
|
-
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25616
|
+
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type46 = typeMap$2[type]) === null || _typeMap$type46 === void 0 ? void 0 : _typeMap$type46.systemOrderBillType) && !isSettingConfig && /*#__PURE__*/React.createElement(Col, {
|
|
25572
25617
|
className: "gutter-row",
|
|
25573
25618
|
xs: {
|
|
25574
25619
|
span: 11
|
|
@@ -25577,7 +25622,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25577
25622
|
span: 6
|
|
25578
25623
|
}
|
|
25579
25624
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
25580
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25625
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type47 = typeMap$2[type]) === null || _typeMap$type47 === void 0 ? void 0 : _typeMap$type47.systemOrderBillType)],
|
|
25581
25626
|
disabled: disabled,
|
|
25582
25627
|
readOnly: true
|
|
25583
25628
|
}))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
@@ -25586,22 +25631,25 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25586
25631
|
type: type,
|
|
25587
25632
|
disabled: disabled,
|
|
25588
25633
|
canUpdateNumber: showChangeBtn,
|
|
25589
|
-
showChangeBtn: showChangeBtn,
|
|
25590
|
-
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25591
|
-
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25634
|
+
showChangeBtn: showChangeBtn || (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type48 = typeMap$2[type]) === null || _typeMap$type48 === void 0 ? void 0 : _typeMap$type48.isShowSelectTradeGoods),
|
|
25635
|
+
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type49 = typeMap$2[type]) === null || _typeMap$type49 === void 0 ? void 0 : _typeMap$type49.alwaysShowChooseErpGoodsBtn,
|
|
25636
|
+
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type50 = typeMap$2[type]) === null || _typeMap$type50 === void 0 ? void 0 : _typeMap$type50.showErpGoodsBtn,
|
|
25592
25637
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
25593
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25638
|
+
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.key)],
|
|
25594
25639
|
onChange: function onChange(val) {
|
|
25595
25640
|
return changeGoodHandle(val);
|
|
25596
25641
|
},
|
|
25597
25642
|
onModeChange: handleModeChange,
|
|
25598
25643
|
showModeBtn: false,
|
|
25599
25644
|
isStrict: isStrict,
|
|
25645
|
+
isShowSelectTradeGoods: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type52 = typeMap$2[type]) === null || _typeMap$type52 === void 0 ? void 0 : _typeMap$type52.isShowSelectTradeGoods,
|
|
25646
|
+
systemOrders: value === null || value === void 0 ? void 0 : (_value$typeMap$type$s9 = value[(_typeMap$type53 = typeMap$2[type]) === null || _typeMap$type53 === void 0 ? void 0 : _typeMap$type53.systemOrder]) === null || _value$typeMap$type$s9 === void 0 ? void 0 : _value$typeMap$type$s9.orders,
|
|
25600
25647
|
tradeGoods: {
|
|
25601
25648
|
originDataSource: getGoodDetails({
|
|
25602
|
-
mode: isStrict
|
|
25649
|
+
mode: isStrict,
|
|
25650
|
+
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type54 = typeMap$2[type]) === null || _typeMap$type54 === void 0 ? void 0 : _typeMap$type54.isShowSelectTradeGoods
|
|
25603
25651
|
}),
|
|
25604
|
-
uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25652
|
+
uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type55 = typeMap$2[type]) === null || _typeMap$type55 === void 0 ? void 0 : _typeMap$type55.uniqueKey) || 'uuid',
|
|
25605
25653
|
selectedGoodsChange: selectedGoodsChange
|
|
25606
25654
|
}
|
|
25607
25655
|
})));
|
package/dist/index.js
CHANGED
|
@@ -20391,6 +20391,15 @@ var isNumberOrNumberString$1 = function isNumberOrNumberString(value) {
|
|
|
20391
20391
|
if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
|
|
20392
20392
|
return false;
|
|
20393
20393
|
};
|
|
20394
|
+
function toNum$3(value) {
|
|
20395
|
+
if (typeof value === 'string') {
|
|
20396
|
+
return value ? +value : void 0;
|
|
20397
|
+
}
|
|
20398
|
+
if (typeof value === 'number') {
|
|
20399
|
+
return value;
|
|
20400
|
+
}
|
|
20401
|
+
return void 0;
|
|
20402
|
+
}
|
|
20394
20403
|
var getColumns$7 = function getColumns(_ref) {
|
|
20395
20404
|
var _ref$text = _ref.text,
|
|
20396
20405
|
disabled = _ref.disabled,
|
|
@@ -20507,6 +20516,19 @@ var getColumns$7 = function getColumns(_ref) {
|
|
|
20507
20516
|
dataIndex: 'sellCount',
|
|
20508
20517
|
title: "\u6570\u91CF",
|
|
20509
20518
|
width: 100,
|
|
20519
|
+
validator: function validator(_rule, value) {
|
|
20520
|
+
var productName = '';
|
|
20521
|
+
if (((value === null || value === void 0 ? void 0 : value.jyGoods) || []).some(function (goods) {
|
|
20522
|
+
var qty = toNum$3(goods === null || goods === void 0 ? void 0 : goods.sellCount);
|
|
20523
|
+
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
20524
|
+
if (res) {
|
|
20525
|
+
productName = (goods === null || goods === void 0 ? void 0 : goods.productName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.productName, "]") : '';
|
|
20526
|
+
}
|
|
20527
|
+
return res;
|
|
20528
|
+
})) {
|
|
20529
|
+
return Promise.reject("".concat(productName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
20530
|
+
}
|
|
20531
|
+
},
|
|
20510
20532
|
render: function render(val, record, index) {
|
|
20511
20533
|
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
20512
20534
|
style: {
|
|
@@ -20702,6 +20724,19 @@ var getColumns$7 = function getColumns(_ref) {
|
|
|
20702
20724
|
dataIndex: 'sellCount',
|
|
20703
20725
|
title: "\u6570\u91CF",
|
|
20704
20726
|
width: 100,
|
|
20727
|
+
validator: function validator(_rule, value) {
|
|
20728
|
+
var productName = '';
|
|
20729
|
+
if (((value === null || value === void 0 ? void 0 : value.jyReissueGoods) || []).some(function (goods) {
|
|
20730
|
+
var qty = toNum$3(goods === null || goods === void 0 ? void 0 : goods.sellCount);
|
|
20731
|
+
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
20732
|
+
if (res) {
|
|
20733
|
+
productName = (goods === null || goods === void 0 ? void 0 : goods.productName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.productName, "]") : '';
|
|
20734
|
+
}
|
|
20735
|
+
return res;
|
|
20736
|
+
})) {
|
|
20737
|
+
return Promise.reject("".concat(productName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
20738
|
+
}
|
|
20739
|
+
},
|
|
20705
20740
|
render: function render(val, record, index) {
|
|
20706
20741
|
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
20707
20742
|
style: {
|
|
@@ -21449,7 +21484,8 @@ var systemOrderNoMap = {
|
|
|
21449
21484
|
BS_E3_GOODS: 'orderSn',
|
|
21450
21485
|
JST_GOODS: 'oId',
|
|
21451
21486
|
WLN_GOODS: 'tradeNo',
|
|
21452
|
-
JY_GOODS: 'tradeNo'
|
|
21487
|
+
JY_GOODS: 'tradeNo',
|
|
21488
|
+
JY_REISSUE_GOODS: 'tradeNo'
|
|
21453
21489
|
};
|
|
21454
21490
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
21455
21491
|
var columns = _ref.columns,
|
|
@@ -21644,7 +21680,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
21644
21680
|
var jstReturnGoods = antd.Form === null || antd.Form === void 0 ? void 0 : antd.Form.useWatch('3979edfd6d', form);
|
|
21645
21681
|
var isShowSelectTradeGoods = type !== 'JST_EXCHANGE_GOODS' || (jstReturnGoods === null || jstReturnGoods === void 0 ? void 0 : jstReturnGoods.jstSystemOrderNo);
|
|
21646
21682
|
// 判断是否为商品信息组件
|
|
21647
|
-
var isGoods = type && ['WDT_GOODS', 'BS_E3_GOODS', 'GY_GOODS', 'JST_GOODS', 'WLN_GOODS', 'KM_GOODS', 'JY_GOODS'].includes(type) || false;
|
|
21683
|
+
var isGoods = type && ['WDT_GOODS', 'BS_E3_GOODS', 'GY_GOODS', 'JST_GOODS', 'WLN_GOODS', 'KM_GOODS', 'JY_GOODS', 'JY_REISSUE_GOODS'].includes(type) || false;
|
|
21648
21684
|
var refModal = React.useRef();
|
|
21649
21685
|
console.debug('表格数据', value);
|
|
21650
21686
|
var handleDelete = function handleDelete(record, index) {
|
|
@@ -25336,11 +25372,12 @@ var typeMap$2 = {
|
|
|
25336
25372
|
orderTypeKey: 'orderType',
|
|
25337
25373
|
oIdKey: 'tradeNo',
|
|
25338
25374
|
outerOiIdKey: '',
|
|
25339
|
-
goodDetailsKey: 'subOrderDetails'
|
|
25375
|
+
goodDetailsKey: 'subOrderDetails',
|
|
25376
|
+
isShowSelectTradeGoods: true
|
|
25340
25377
|
}
|
|
25341
25378
|
};
|
|
25342
25379
|
var PublicReissue = function PublicReissue(props) {
|
|
25343
|
-
var _typeMap$
|
|
25380
|
+
var _typeMap$type34, _typeMap$type40, _typeMap$type41, _typeMap$type42, _typeMap$type43, _value$typeMap$type$s8, _typeMap$type44, _typeMap$type45, _typeMap$type46, _typeMap$type47, _typeMap$type48, _typeMap$type49, _typeMap$type50, _typeMap$type51, _typeMap$type52, _value$typeMap$type$s9, _typeMap$type53, _typeMap$type54, _typeMap$type55;
|
|
25344
25381
|
var value = props.value,
|
|
25345
25382
|
onChange = props.onChange,
|
|
25346
25383
|
_props$reasonList = props.reasonList,
|
|
@@ -25457,9 +25494,11 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25457
25494
|
}))));
|
|
25458
25495
|
};
|
|
25459
25496
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
25460
|
-
var _typeMap$type18, _typeMap$type19,
|
|
25497
|
+
var _typeMap$type18, _typeMap$type19, _value$typeMap$type$s6, _typeMap$type20, _typeMap$type21, _typeMap$type22;
|
|
25461
25498
|
var mode = _ref4.mode,
|
|
25462
|
-
sysOrderNo = _ref4.sysOrderNo
|
|
25499
|
+
sysOrderNo = _ref4.sysOrderNo,
|
|
25500
|
+
_ref4$isAllOrders = _ref4.isAllOrders,
|
|
25501
|
+
isAllOrders = _ref4$isAllOrders === void 0 ? false : _ref4$isAllOrders;
|
|
25463
25502
|
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type18 = typeMap$2[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrder];
|
|
25464
25503
|
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type19 = typeMap$2[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.systemOrderNo];
|
|
25465
25504
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
@@ -25478,38 +25517,43 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25478
25517
|
canEdit: true
|
|
25479
25518
|
};
|
|
25480
25519
|
}
|
|
25481
|
-
var
|
|
25520
|
+
var orders = isAllOrders ? (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrder]) === null || _value$typeMap$type$s6 === void 0 ? void 0 : _value$typeMap$type$s6.orders) || [] : [order];
|
|
25521
|
+
var hasGoodDetails = orders === null || orders === void 0 ? void 0 : orders.some(function (order) {
|
|
25522
|
+
var _order$typeMap$type$g;
|
|
25523
|
+
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;
|
|
25524
|
+
});
|
|
25525
|
+
var goodDetails = hasGoodDetails ? typeMap$2[type].mergeIdenticalGoods ? typeMap$2[type].mergeIdenticalGoods((_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.updateGoodsHandle(orders, orderRest)) : (_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.updateGoodsHandle(orders, orderRest) : [];
|
|
25482
25526
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
25483
|
-
var list = mode ? goodDetails.filter(function (goodItem) {
|
|
25527
|
+
var list = mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
25484
25528
|
return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
|
|
25485
25529
|
}) : goodDetails;
|
|
25486
25530
|
return list;
|
|
25487
25531
|
};
|
|
25488
25532
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
25489
|
-
var _typeMap$
|
|
25533
|
+
var _typeMap$type23;
|
|
25490
25534
|
var newValue = _objectSpread2({}, value);
|
|
25491
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25535
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)] = val || [];
|
|
25492
25536
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
25493
25537
|
};
|
|
25494
25538
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
25495
|
-
var _typeMap$
|
|
25539
|
+
var _typeMap$type24, _typeMap$type25, _value$typeMap$type$t2, _typeMap$type30, _value$typeMap$type$t3, _typeMap$type32;
|
|
25496
25540
|
var newValue = _objectSpread2({}, value);
|
|
25497
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25498
|
-
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25499
|
-
var _value$typeMap$type$
|
|
25500
|
-
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$
|
|
25541
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo)] = val;
|
|
25542
|
+
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderBillType) {
|
|
25543
|
+
var _value$typeMap$type$s7, _typeMap$type26, _typeMap$type28, _typeMap$type29;
|
|
25544
|
+
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s7 = value[(_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrder]) === null || _value$typeMap$type$s7 === void 0 ? void 0 : _value$typeMap$type$s7.orders) || [];
|
|
25501
25545
|
var targetOrder = val && orders.find(function (oItem) {
|
|
25502
|
-
var _typeMap$
|
|
25503
|
-
return oItem[(_typeMap$
|
|
25546
|
+
var _typeMap$type27;
|
|
25547
|
+
return oItem[(_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.oIdKey] === val;
|
|
25504
25548
|
});
|
|
25505
|
-
newValue[(_typeMap$
|
|
25506
|
-
}
|
|
25507
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
25508
|
-
var _typeMap$
|
|
25509
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25510
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
25511
|
-
var _typeMap$
|
|
25512
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25549
|
+
newValue[(_typeMap$type28 = typeMap$2[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderBillType] = targetOrder === null || targetOrder === void 0 ? void 0 : targetOrder[(_typeMap$type29 = typeMap$2[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.orderTypeKey];
|
|
25550
|
+
}
|
|
25551
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type30 = typeMap$2[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
|
|
25552
|
+
var _typeMap$type31;
|
|
25553
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type31 = typeMap$2[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.key)] = [];
|
|
25554
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type32 = typeMap$2[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
25555
|
+
var _typeMap$type33;
|
|
25556
|
+
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)] = getGoodDetails({
|
|
25513
25557
|
mode: isStrict,
|
|
25514
25558
|
sysOrderNo: val
|
|
25515
25559
|
});
|
|
@@ -25517,26 +25561,27 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25517
25561
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue, 'systemOrder');
|
|
25518
25562
|
};
|
|
25519
25563
|
//显示选择商品按钮
|
|
25520
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
25564
|
+
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type34 = typeMap$2[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.systemOrderNo]);
|
|
25521
25565
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
25522
|
-
var _typeMap$
|
|
25566
|
+
var _typeMap$type35, _typeMap$type36, _typeMap$type37, _uniqBy, _typeMap$type38;
|
|
25523
25567
|
var newValue = _objectSpread2({}, value);
|
|
25524
25568
|
// 原订单商品
|
|
25525
25569
|
var originTradeGoodList = getGoodDetails({
|
|
25526
|
-
mode: isStrict
|
|
25570
|
+
mode: isStrict,
|
|
25571
|
+
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type35 = typeMap$2[type]) === null || _typeMap$type35 === void 0 ? void 0 : _typeMap$type35.isShowSelectTradeGoods
|
|
25527
25572
|
}) || [];
|
|
25528
25573
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
25529
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25530
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25531
|
-
var _typeMap$
|
|
25532
|
-
return skuList.includes(item[(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25574
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type36 = typeMap$2[type]) === null || _typeMap$type36 === void 0 ? void 0 : _typeMap$type36.key)]) || [];
|
|
25575
|
+
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)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type38 = typeMap$2[type]) === null || _typeMap$type38 === void 0 ? void 0 : _typeMap$type38.uniqueKey) || 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
25576
|
+
var _typeMap$type39;
|
|
25577
|
+
return skuList.includes(item[(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type39 = typeMap$2[type]) === null || _typeMap$type39 === void 0 ? void 0 : _typeMap$type39.uniqueKey) || 'uuid']);
|
|
25533
25578
|
});
|
|
25534
25579
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
25535
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25580
|
+
}, [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)], isStrict]);
|
|
25536
25581
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
25537
25582
|
gutter: 8,
|
|
25538
25583
|
wrap: true,
|
|
25539
|
-
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25584
|
+
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type41 = typeMap$2[type]) === null || _typeMap$type41 === void 0 ? void 0 : _typeMap$type41.key) || "".concat(Date.now())
|
|
25540
25585
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
25541
25586
|
className: "gutter-row",
|
|
25542
25587
|
xs: {
|
|
@@ -25552,12 +25597,12 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25552
25597
|
},
|
|
25553
25598
|
disabled: disabled,
|
|
25554
25599
|
allowClear: false,
|
|
25555
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25600
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type42 = typeMap$2[type]) === null || _typeMap$type42 === void 0 ? void 0 : _typeMap$type42.systemOrderNo)],
|
|
25556
25601
|
onChange: function onChange(val) {
|
|
25557
25602
|
return changeSystemOrderHandle(val);
|
|
25558
25603
|
},
|
|
25559
|
-
placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25560
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$
|
|
25604
|
+
placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type43 = typeMap$2[type]) === null || _typeMap$type43 === void 0 ? void 0 : _typeMap$type43.compType) || '', "\u7CFB\u7EDF\u5355")
|
|
25605
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s8 = value[(_typeMap$type44 = typeMap$2[type]) === null || _typeMap$type44 === void 0 ? void 0 : _typeMap$type44.systemOrder]) === null || _value$typeMap$type$s8 === void 0 ? void 0 : _value$typeMap$type$s8.showOrderInfo) || []).map(function (item) {
|
|
25561
25606
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
25562
25607
|
key: item[typeMap$2[type].oIdKey],
|
|
25563
25608
|
value: item[typeMap$2[type].oIdKey],
|
|
@@ -25579,11 +25624,11 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25579
25624
|
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
25580
25625
|
allowClear: false,
|
|
25581
25626
|
options: reasonList,
|
|
25582
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25627
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type45 = typeMap$2[type]) === null || _typeMap$type45 === void 0 ? void 0 : _typeMap$type45.typeName)],
|
|
25583
25628
|
onChange: function onChange(val) {
|
|
25584
25629
|
return changeTypeHandle(val);
|
|
25585
25630
|
}
|
|
25586
|
-
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25631
|
+
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type46 = typeMap$2[type]) === null || _typeMap$type46 === void 0 ? void 0 : _typeMap$type46.systemOrderBillType) && !isSettingConfig && /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
25587
25632
|
className: "gutter-row",
|
|
25588
25633
|
xs: {
|
|
25589
25634
|
span: 11
|
|
@@ -25592,7 +25637,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25592
25637
|
span: 6
|
|
25593
25638
|
}
|
|
25594
25639
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
25595
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25640
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type47 = typeMap$2[type]) === null || _typeMap$type47 === void 0 ? void 0 : _typeMap$type47.systemOrderBillType)],
|
|
25596
25641
|
disabled: disabled,
|
|
25597
25642
|
readOnly: true
|
|
25598
25643
|
}))), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
@@ -25601,22 +25646,25 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25601
25646
|
type: type,
|
|
25602
25647
|
disabled: disabled,
|
|
25603
25648
|
canUpdateNumber: showChangeBtn,
|
|
25604
|
-
showChangeBtn: showChangeBtn,
|
|
25605
|
-
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25606
|
-
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25649
|
+
showChangeBtn: showChangeBtn || (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type48 = typeMap$2[type]) === null || _typeMap$type48 === void 0 ? void 0 : _typeMap$type48.isShowSelectTradeGoods),
|
|
25650
|
+
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type49 = typeMap$2[type]) === null || _typeMap$type49 === void 0 ? void 0 : _typeMap$type49.alwaysShowChooseErpGoodsBtn,
|
|
25651
|
+
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type50 = typeMap$2[type]) === null || _typeMap$type50 === void 0 ? void 0 : _typeMap$type50.showErpGoodsBtn,
|
|
25607
25652
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
25608
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25653
|
+
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.key)],
|
|
25609
25654
|
onChange: function onChange(val) {
|
|
25610
25655
|
return changeGoodHandle(val);
|
|
25611
25656
|
},
|
|
25612
25657
|
onModeChange: handleModeChange,
|
|
25613
25658
|
showModeBtn: false,
|
|
25614
25659
|
isStrict: isStrict,
|
|
25660
|
+
isShowSelectTradeGoods: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type52 = typeMap$2[type]) === null || _typeMap$type52 === void 0 ? void 0 : _typeMap$type52.isShowSelectTradeGoods,
|
|
25661
|
+
systemOrders: value === null || value === void 0 ? void 0 : (_value$typeMap$type$s9 = value[(_typeMap$type53 = typeMap$2[type]) === null || _typeMap$type53 === void 0 ? void 0 : _typeMap$type53.systemOrder]) === null || _value$typeMap$type$s9 === void 0 ? void 0 : _value$typeMap$type$s9.orders,
|
|
25615
25662
|
tradeGoods: {
|
|
25616
25663
|
originDataSource: getGoodDetails({
|
|
25617
|
-
mode: isStrict
|
|
25664
|
+
mode: isStrict,
|
|
25665
|
+
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type54 = typeMap$2[type]) === null || _typeMap$type54 === void 0 ? void 0 : _typeMap$type54.isShowSelectTradeGoods
|
|
25618
25666
|
}),
|
|
25619
|
-
uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25667
|
+
uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type55 = typeMap$2[type]) === null || _typeMap$type55 === void 0 ? void 0 : _typeMap$type55.uniqueKey) || 'uuid',
|
|
25620
25668
|
selectedGoodsChange: selectedGoodsChange
|
|
25621
25669
|
}
|
|
25622
25670
|
})));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "2.2.13-beta.
|
|
3
|
+
"version": "2.2.13-beta.37",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "3977215f50acaf734d943755b66458971d4451d7"
|
|
70
70
|
}
|