@kmkf-fe-packages/basic-components 2.0.19-beta.1 → 2.0.19-beta.10
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 +76 -52
- package/dist/index.js +75 -51
- package/dist/src/bs/component/GoodItem/index.d.ts +1 -0
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, messag
|
|
|
3
3
|
import { EyeOutlined, DeleteOutlined, CloseCircleOutlined, CaretUpOutlined } from '@ant-design/icons';
|
|
4
4
|
import request, { extend as extend$1 } from 'umi-request';
|
|
5
5
|
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
|
6
|
-
import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterJstOrders, filterKmOrders, getIsPlatformCodesIncludeOrderNos, BS_SYSTEM_ORDER_CONFIG, KM_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, jstMergeIdenticalGoods, msgTypeCh } from '@kmkf-fe-packages/kmkf-utils';
|
|
6
|
+
import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterJstOrders, filterKmOrders, getIsPlatformCodesIncludeOrderNos, BS_SYSTEM_ORDER_CONFIG, KM_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog } from '@kmkf-fe-packages/kmkf-utils';
|
|
7
7
|
import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, takeRight, reject, isEmpty, intersection, uniqBy } from 'lodash';
|
|
8
8
|
import { useUpdateEffect, useDebounceEffect, useAntdTable } from 'ahooks';
|
|
9
9
|
import zhCN from 'antd/lib/locale/zh_CN';
|
|
@@ -10387,7 +10387,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10387
10387
|
var changeHandle = function changeHandle(val, type) {
|
|
10388
10388
|
var newValue = _objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val));
|
|
10389
10389
|
if (type === 'interceptCompany') {
|
|
10390
|
-
var _matchKCodeList$;
|
|
10391
10390
|
var interceptCompany = expressInterceptData.find(function (item) {
|
|
10392
10391
|
return item.value === val;
|
|
10393
10392
|
});
|
|
@@ -10432,8 +10431,8 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10432
10431
|
status: '',
|
|
10433
10432
|
reason: ''
|
|
10434
10433
|
},
|
|
10435
|
-
interceptLogisticsUserKCode:
|
|
10436
|
-
interceptLogisticsUserSecretKey:
|
|
10434
|
+
interceptLogisticsUserKCode: undefined,
|
|
10435
|
+
interceptLogisticsUserSecretKey: undefined
|
|
10437
10436
|
});
|
|
10438
10437
|
}
|
|
10439
10438
|
if (type === 'interceptLogisticsApiStatus') {
|
|
@@ -10519,7 +10518,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10519
10518
|
}));
|
|
10520
10519
|
}
|
|
10521
10520
|
}, 'k码配置>>') : null),
|
|
10522
|
-
required: true,
|
|
10523
10521
|
key: 'interceptLogisticsUserKCode',
|
|
10524
10522
|
hidden: !showKcode
|
|
10525
10523
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
@@ -10543,7 +10541,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10543
10541
|
noStyle: true
|
|
10544
10542
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
10545
10543
|
style: {
|
|
10546
|
-
width: '
|
|
10544
|
+
width: platform === 'pc' ? 200 : 150,
|
|
10547
10545
|
marginTop: '6px'
|
|
10548
10546
|
},
|
|
10549
10547
|
placeholder: "\u5BA2\u6237\u5BC6\u94A5",
|
|
@@ -15416,6 +15414,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15416
15414
|
showErpGoodsBtn = _props$showErpGoodsBt === void 0 ? true : _props$showErpGoodsBt,
|
|
15417
15415
|
_props$showModeBtn = props.showModeBtn,
|
|
15418
15416
|
showModeBtn = _props$showModeBtn === void 0 ? false : _props$showModeBtn,
|
|
15417
|
+
_props$alwaysShowChoo = props.alwaysShowChooseErpGoodsBtn,
|
|
15418
|
+
alwaysShowChooseErpGoodsBtn = _props$alwaysShowChoo === void 0 ? false : _props$alwaysShowChoo,
|
|
15419
15419
|
_props$isStrict = props.isStrict,
|
|
15420
15420
|
isStrict = _props$isStrict === void 0 ? false : _props$isStrict,
|
|
15421
15421
|
_props$tableSelect = props.tableSelect,
|
|
@@ -15768,7 +15768,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15768
15768
|
return params;
|
|
15769
15769
|
}, [tableSelect, selectedRowKeys]);
|
|
15770
15770
|
var TheGoodsModal = GoodsModalMap[type || 'OTHER_GOODS'] || GoodsModalMap['OTHER_GOODS'];
|
|
15771
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, !disabled && showChangeBtn
|
|
15771
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !disabled && (showChangeBtn ? /*#__PURE__*/React.createElement("div", {
|
|
15772
15772
|
style: {
|
|
15773
15773
|
float: 'right'
|
|
15774
15774
|
}
|
|
@@ -15785,7 +15785,14 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15785
15785
|
}), showErpGoodsBtn && /*#__PURE__*/React.createElement(Button, {
|
|
15786
15786
|
type: "link",
|
|
15787
15787
|
onClick: handleChangeGoods
|
|
15788
|
-
}, getButtonText(type)), otherOperations)
|
|
15788
|
+
}, getButtonText(type)), otherOperations) : showErpGoodsBtn && alwaysShowChooseErpGoodsBtn && /*#__PURE__*/React.createElement("div", {
|
|
15789
|
+
style: {
|
|
15790
|
+
float: 'right'
|
|
15791
|
+
}
|
|
15792
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
15793
|
+
type: "link",
|
|
15794
|
+
onClick: handleChangeGoods
|
|
15795
|
+
}, getButtonText(type)))), /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
|
|
15789
15796
|
columns: newColumns,
|
|
15790
15797
|
dataSource: value,
|
|
15791
15798
|
rowKey: uniqueKey,
|
|
@@ -17884,6 +17891,7 @@ var typeMap$2 = {
|
|
|
17884
17891
|
systemOrderBillType: 'jstSystemOrderBillType',
|
|
17885
17892
|
getOrderList: jstUtils.getJstOrderListSingleton,
|
|
17886
17893
|
updateGoodsHandle: updateJstGoodsHandle,
|
|
17894
|
+
alwaysShowChooseErpGoodsBtn: true,
|
|
17887
17895
|
orderTypeKey: 'orderType',
|
|
17888
17896
|
oIdKey: 'oId',
|
|
17889
17897
|
outerOiIdKey: '',
|
|
@@ -17898,11 +17906,11 @@ var typeMap$2 = {
|
|
|
17898
17906
|
systemOrderBillType: 'jstSystemOrderBillType',
|
|
17899
17907
|
getOrderList: jstUtils.getJstOrderListSingleton,
|
|
17900
17908
|
updateGoodsHandle: updateJstGoodsHandle,
|
|
17909
|
+
alwaysShowChooseErpGoodsBtn: true,
|
|
17901
17910
|
orderTypeKey: 'orderType',
|
|
17902
17911
|
oIdKey: 'oId',
|
|
17903
17912
|
outerOiIdKey: '',
|
|
17904
17913
|
goodDetailsKey: 'items',
|
|
17905
|
-
showErpGoodsBtn: false,
|
|
17906
17914
|
eventNameMap: {
|
|
17907
17915
|
// pubsub 事件
|
|
17908
17916
|
exchangeCopyGood: 'jstExchangeCopyGood',
|
|
@@ -17913,7 +17921,7 @@ var typeMap$2 = {
|
|
|
17913
17921
|
}
|
|
17914
17922
|
};
|
|
17915
17923
|
var PublicReissue = function PublicReissue(props) {
|
|
17916
|
-
var _typeMap$type31, _typeMap$type34, _typeMap$type35, _typeMap$type36, _typeMap$type37, _value$typeMap$type$s6, _typeMap$type38, _typeMap$type39, _typeMap$type40, _typeMap$type41, _typeMap$type42, _typeMap$type43;
|
|
17924
|
+
var _typeMap$type31, _typeMap$type34, _typeMap$type35, _typeMap$type36, _typeMap$type37, _value$typeMap$type$s6, _typeMap$type38, _typeMap$type39, _typeMap$type40, _typeMap$type41, _typeMap$type42, _typeMap$type43, _typeMap$type44;
|
|
17917
17925
|
var value = props.value,
|
|
17918
17926
|
onChange = props.onChange,
|
|
17919
17927
|
_props$reasonList = props.reasonList,
|
|
@@ -18154,9 +18162,10 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18154
18162
|
disabled: disabled,
|
|
18155
18163
|
canUpdateNumber: showChangeBtn,
|
|
18156
18164
|
showChangeBtn: showChangeBtn,
|
|
18157
|
-
|
|
18165
|
+
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type42 = typeMap$2[type]) === null || _typeMap$type42 === void 0 ? void 0 : _typeMap$type42.alwaysShowChooseErpGoodsBtn,
|
|
18166
|
+
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type43 = typeMap$2[type]) === null || _typeMap$type43 === void 0 ? void 0 : _typeMap$type43.showErpGoodsBtn,
|
|
18158
18167
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18159
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18168
|
+
value: 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)],
|
|
18160
18169
|
onChange: function onChange(val) {
|
|
18161
18170
|
return changeGoodHandle(val);
|
|
18162
18171
|
},
|
|
@@ -19201,7 +19210,7 @@ var typeMap$4 = {
|
|
|
19201
19210
|
}
|
|
19202
19211
|
};
|
|
19203
19212
|
var GyReissue = function GyReissue(props) {
|
|
19204
|
-
var _value$gySystemOrder, _typeMap$
|
|
19213
|
+
var _value$gySystemOrder, _typeMap$type28, _typeMap$type30, _typeMap$type31, _value$typeMap$type$s5, _typeMap$type32, _typeMap$type33, _typeMap$type34;
|
|
19205
19214
|
var value = props.value,
|
|
19206
19215
|
onChange = props.onChange,
|
|
19207
19216
|
_props$reasonList = props.reasonList,
|
|
@@ -19234,7 +19243,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
19234
19243
|
while (1) switch (_context.prev = _context.next) {
|
|
19235
19244
|
case 0:
|
|
19236
19245
|
(_typeMap$type4 = typeMap$4[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
19237
|
-
var _typeMap$type5, _typeMap$type6;
|
|
19246
|
+
var _typeMap$type5, _typeMap$type6, _typeMap$type7, _typeMap$type8;
|
|
19238
19247
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
19239
19248
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
19240
19249
|
var billNo = _ref2.billNo,
|
|
@@ -19256,7 +19265,14 @@ var GyReissue = function GyReissue(props) {
|
|
|
19256
19265
|
shopCode: shopCode
|
|
19257
19266
|
});
|
|
19258
19267
|
});
|
|
19259
|
-
|
|
19268
|
+
pushGyLog('getOrderList', {
|
|
19269
|
+
before: value,
|
|
19270
|
+
after: _objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$4[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type6 = typeMap$4[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]), {}, {
|
|
19271
|
+
showOrderInfo: showOrderInfo,
|
|
19272
|
+
orders: orders
|
|
19273
|
+
})))
|
|
19274
|
+
});
|
|
19275
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type7 = typeMap$4[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type8 = typeMap$4[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.systemOrder]), {}, {
|
|
19260
19276
|
showOrderInfo: showOrderInfo,
|
|
19261
19277
|
orders: orders
|
|
19262
19278
|
}))));
|
|
@@ -19272,39 +19288,41 @@ var GyReissue = function GyReissue(props) {
|
|
|
19272
19288
|
};
|
|
19273
19289
|
}();
|
|
19274
19290
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
19275
|
-
var _value$typeMap$type$t, _typeMap$
|
|
19291
|
+
var _value$typeMap$type$t, _typeMap$type9, _typeMap$type10;
|
|
19292
|
+
pushGyLog('beforeChangeType', value);
|
|
19276
19293
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
19277
|
-
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$
|
|
19294
|
+
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type9 = typeMap$4[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) return;
|
|
19278
19295
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
19279
19296
|
var newValue = _objectSpread2({}, value);
|
|
19280
|
-
newValue[(_typeMap$
|
|
19297
|
+
newValue[(_typeMap$type10 = typeMap$4[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.typeName] = val;
|
|
19281
19298
|
if (typeName === '1') {
|
|
19282
|
-
var _typeMap$
|
|
19283
|
-
newValue[(_typeMap$
|
|
19299
|
+
var _typeMap$type11;
|
|
19300
|
+
newValue[(_typeMap$type11 = typeMap$4[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.key] = getGoodDetails({
|
|
19284
19301
|
mode: isStrict
|
|
19285
19302
|
});
|
|
19286
19303
|
} else if (typeName === '2') {
|
|
19287
|
-
var _typeMap$
|
|
19304
|
+
var _typeMap$type12;
|
|
19288
19305
|
// 切换到非原单,清空列表
|
|
19289
|
-
newValue[(_typeMap$
|
|
19306
|
+
newValue[(_typeMap$type12 = typeMap$4[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = [];
|
|
19290
19307
|
}
|
|
19308
|
+
pushGyLog('afterChangeType', newValue);
|
|
19291
19309
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19292
19310
|
};
|
|
19293
19311
|
var handleModeChange = function handleModeChange(mode) {
|
|
19294
|
-
var _value$typeMap$type$t2, _typeMap$
|
|
19295
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
19312
|
+
var _value$typeMap$type$t2, _typeMap$type13, _typeMap$type14;
|
|
19313
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type13 = typeMap$4[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0]) === '1';
|
|
19296
19314
|
setIsStrict(mode);
|
|
19297
19315
|
if (!isOriginalOrder) return;
|
|
19298
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$
|
|
19316
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type14 = typeMap$4[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key, getGoodDetails({
|
|
19299
19317
|
mode: mode
|
|
19300
19318
|
}))));
|
|
19301
19319
|
};
|
|
19302
19320
|
var getGoodDetails = function getGoodDetails(_ref3) {
|
|
19303
|
-
var _typeMap$
|
|
19321
|
+
var _typeMap$type15, _typeMap$type16, _order$details;
|
|
19304
19322
|
var mode = _ref3.mode,
|
|
19305
19323
|
sysOrderNo = _ref3.sysOrderNo;
|
|
19306
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19307
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19324
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type15 = typeMap$4[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.systemOrder];
|
|
19325
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type16 = typeMap$4[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.systemOrderNo];
|
|
19308
19326
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
19309
19327
|
return order.code === systemOrderNo;
|
|
19310
19328
|
});
|
|
@@ -19315,52 +19333,58 @@ var GyReissue = function GyReissue(props) {
|
|
|
19315
19333
|
}) : goodDetails;
|
|
19316
19334
|
};
|
|
19317
19335
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
19318
|
-
var _typeMap$
|
|
19336
|
+
var _typeMap$type17;
|
|
19337
|
+
pushGyLog('beforeChangeGood', value);
|
|
19319
19338
|
var newValue = _objectSpread2({}, value);
|
|
19320
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19321
|
-
var _typeMap$
|
|
19322
|
-
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19323
|
-
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19339
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type17 = typeMap$4[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.key)] = (val || []).map(function (item) {
|
|
19340
|
+
var _typeMap$type18, _typeMap$type19;
|
|
19341
|
+
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type18 = typeMap$4[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.formatDefaultField.money)] = 0;
|
|
19342
|
+
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type19 = typeMap$4[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.formatDefaultField.share)] = 0;
|
|
19324
19343
|
return item;
|
|
19325
19344
|
});
|
|
19345
|
+
pushGyLog('afterChangeGood', newValue);
|
|
19326
19346
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19327
19347
|
};
|
|
19328
19348
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
19329
|
-
var _typeMap$
|
|
19349
|
+
var _typeMap$type20, _value$typeMap$type$t3, _typeMap$type21, _value$typeMap$type$t4, _typeMap$type23;
|
|
19350
|
+
pushGyLog('beforeChangeSystemOrder', value);
|
|
19330
19351
|
var newValue = _objectSpread2({}, value);
|
|
19331
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19332
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
19333
|
-
var _typeMap$type20;
|
|
19334
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type20 = typeMap$4[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = [];
|
|
19335
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type21 = typeMap$4[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0])) {
|
|
19352
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type20 = typeMap$4[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrderNo)] = val;
|
|
19353
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type21 = typeMap$4[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
19336
19354
|
var _typeMap$type22;
|
|
19337
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type22 = typeMap$4[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] =
|
|
19355
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type22 = typeMap$4[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = [];
|
|
19356
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type23 = typeMap$4[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0])) {
|
|
19357
|
+
var _typeMap$type24;
|
|
19358
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type24 = typeMap$4[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = getGoodDetails({
|
|
19338
19359
|
mode: isStrict,
|
|
19339
19360
|
sysOrderNo: val
|
|
19340
19361
|
});
|
|
19341
19362
|
}
|
|
19363
|
+
pushGyLog('afterChangeSystemOrder', newValue);
|
|
19342
19364
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19343
19365
|
};
|
|
19344
19366
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
19345
|
-
var _typeMap$
|
|
19367
|
+
var _typeMap$type25, _typeMap$type26, _uniqBy, _typeMap$type27;
|
|
19368
|
+
pushGyLog('beforeSelectedGoodsChange', value);
|
|
19346
19369
|
var newValue = _objectSpread2({}, value);
|
|
19347
19370
|
// 原订单商品
|
|
19348
19371
|
var originTradeGoodList = getGoodDetails({
|
|
19349
19372
|
mode: isStrict
|
|
19350
19373
|
}) || [];
|
|
19351
19374
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
19352
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19353
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19375
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type25 = typeMap$4[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key)]) || [];
|
|
19376
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type26 = typeMap$4[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
19354
19377
|
return skuList.includes(item.uuid);
|
|
19355
19378
|
});
|
|
19356
|
-
console.log('商品发生变化', newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19379
|
+
console.log('商品发生变化', newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type27 = typeMap$4[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.key)]);
|
|
19357
19380
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19358
|
-
|
|
19381
|
+
pushGyLog('afterSelectedGoodsChange', newValue);
|
|
19382
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type28 = typeMap$4[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)], isStrict]);
|
|
19359
19383
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
19360
19384
|
var showChangeBtn = useMemo(function () {
|
|
19361
|
-
var _typeMap$
|
|
19362
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19363
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19385
|
+
var _typeMap$type29;
|
|
19386
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type29 = typeMap$4[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo]);
|
|
19387
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type30 = typeMap$4[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrderNo]]);
|
|
19364
19388
|
return /*#__PURE__*/React.createElement("div", {
|
|
19365
19389
|
id: "TEST_GY",
|
|
19366
19390
|
onClick: function onClick() {
|
|
@@ -19383,12 +19407,12 @@ var GyReissue = function GyReissue(props) {
|
|
|
19383
19407
|
},
|
|
19384
19408
|
disabled: disabled,
|
|
19385
19409
|
allowClear: false,
|
|
19386
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19410
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type31 = typeMap$4[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrderNo)],
|
|
19387
19411
|
onChange: function onChange(val) {
|
|
19388
19412
|
return changeSystemOrderHandle(val);
|
|
19389
19413
|
},
|
|
19390
19414
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
19391
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
19415
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type32 = typeMap$4[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
19392
19416
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
19393
19417
|
key: item.billNo,
|
|
19394
19418
|
value: item.billNo,
|
|
@@ -19409,7 +19433,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
19409
19433
|
disabled: disabled,
|
|
19410
19434
|
allowClear: false,
|
|
19411
19435
|
options: reasonList,
|
|
19412
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19436
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type33 = typeMap$4[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.typeName)],
|
|
19413
19437
|
onChange: function onChange(val) {
|
|
19414
19438
|
return changeTypeHandle(val);
|
|
19415
19439
|
}
|
|
@@ -19421,7 +19445,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
19421
19445
|
canUpdateNumber: showChangeBtn,
|
|
19422
19446
|
showChangeBtn: showChangeBtn,
|
|
19423
19447
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
19424
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19448
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type34 = typeMap$4[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.key)],
|
|
19425
19449
|
onChange: function onChange(val) {
|
|
19426
19450
|
return changeGoodHandle(val);
|
|
19427
19451
|
},
|
package/dist/index.js
CHANGED
|
@@ -10399,7 +10399,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10399
10399
|
var changeHandle = function changeHandle(val, type) {
|
|
10400
10400
|
var newValue = _objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val));
|
|
10401
10401
|
if (type === 'interceptCompany') {
|
|
10402
|
-
var _matchKCodeList$;
|
|
10403
10402
|
var interceptCompany = expressInterceptData.find(function (item) {
|
|
10404
10403
|
return item.value === val;
|
|
10405
10404
|
});
|
|
@@ -10444,8 +10443,8 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10444
10443
|
status: '',
|
|
10445
10444
|
reason: ''
|
|
10446
10445
|
},
|
|
10447
|
-
interceptLogisticsUserKCode:
|
|
10448
|
-
interceptLogisticsUserSecretKey:
|
|
10446
|
+
interceptLogisticsUserKCode: undefined,
|
|
10447
|
+
interceptLogisticsUserSecretKey: undefined
|
|
10449
10448
|
});
|
|
10450
10449
|
}
|
|
10451
10450
|
if (type === 'interceptLogisticsApiStatus') {
|
|
@@ -10531,7 +10530,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10531
10530
|
}));
|
|
10532
10531
|
}
|
|
10533
10532
|
}, 'k码配置>>') : null),
|
|
10534
|
-
required: true,
|
|
10535
10533
|
key: 'interceptLogisticsUserKCode',
|
|
10536
10534
|
hidden: !showKcode
|
|
10537
10535
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
@@ -10555,7 +10553,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10555
10553
|
noStyle: true
|
|
10556
10554
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
10557
10555
|
style: {
|
|
10558
|
-
width: '
|
|
10556
|
+
width: platform === 'pc' ? 200 : 150,
|
|
10559
10557
|
marginTop: '6px'
|
|
10560
10558
|
},
|
|
10561
10559
|
placeholder: "\u5BA2\u6237\u5BC6\u94A5",
|
|
@@ -15428,6 +15426,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15428
15426
|
showErpGoodsBtn = _props$showErpGoodsBt === void 0 ? true : _props$showErpGoodsBt,
|
|
15429
15427
|
_props$showModeBtn = props.showModeBtn,
|
|
15430
15428
|
showModeBtn = _props$showModeBtn === void 0 ? false : _props$showModeBtn,
|
|
15429
|
+
_props$alwaysShowChoo = props.alwaysShowChooseErpGoodsBtn,
|
|
15430
|
+
alwaysShowChooseErpGoodsBtn = _props$alwaysShowChoo === void 0 ? false : _props$alwaysShowChoo,
|
|
15431
15431
|
_props$isStrict = props.isStrict,
|
|
15432
15432
|
isStrict = _props$isStrict === void 0 ? false : _props$isStrict,
|
|
15433
15433
|
_props$tableSelect = props.tableSelect,
|
|
@@ -15780,7 +15780,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15780
15780
|
return params;
|
|
15781
15781
|
}, [tableSelect, selectedRowKeys]);
|
|
15782
15782
|
var TheGoodsModal = GoodsModalMap[type || 'OTHER_GOODS'] || GoodsModalMap['OTHER_GOODS'];
|
|
15783
|
-
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, !disabled && showChangeBtn
|
|
15783
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, !disabled && (showChangeBtn ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
15784
15784
|
style: {
|
|
15785
15785
|
float: 'right'
|
|
15786
15786
|
}
|
|
@@ -15797,7 +15797,14 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15797
15797
|
}), showErpGoodsBtn && /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
15798
15798
|
type: "link",
|
|
15799
15799
|
onClick: handleChangeGoods
|
|
15800
|
-
}, getButtonText(type)), otherOperations)
|
|
15800
|
+
}, getButtonText(type)), otherOperations) : showErpGoodsBtn && alwaysShowChooseErpGoodsBtn && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
15801
|
+
style: {
|
|
15802
|
+
float: 'right'
|
|
15803
|
+
}
|
|
15804
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
15805
|
+
type: "link",
|
|
15806
|
+
onClick: handleChangeGoods
|
|
15807
|
+
}, getButtonText(type)))), /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
|
|
15801
15808
|
columns: newColumns,
|
|
15802
15809
|
dataSource: value,
|
|
15803
15810
|
rowKey: uniqueKey,
|
|
@@ -17896,6 +17903,7 @@ var typeMap$2 = {
|
|
|
17896
17903
|
systemOrderBillType: 'jstSystemOrderBillType',
|
|
17897
17904
|
getOrderList: jstUtils.getJstOrderListSingleton,
|
|
17898
17905
|
updateGoodsHandle: kmkfUtils.updateJstGoodsHandle,
|
|
17906
|
+
alwaysShowChooseErpGoodsBtn: true,
|
|
17899
17907
|
orderTypeKey: 'orderType',
|
|
17900
17908
|
oIdKey: 'oId',
|
|
17901
17909
|
outerOiIdKey: '',
|
|
@@ -17910,11 +17918,11 @@ var typeMap$2 = {
|
|
|
17910
17918
|
systemOrderBillType: 'jstSystemOrderBillType',
|
|
17911
17919
|
getOrderList: jstUtils.getJstOrderListSingleton,
|
|
17912
17920
|
updateGoodsHandle: kmkfUtils.updateJstGoodsHandle,
|
|
17921
|
+
alwaysShowChooseErpGoodsBtn: true,
|
|
17913
17922
|
orderTypeKey: 'orderType',
|
|
17914
17923
|
oIdKey: 'oId',
|
|
17915
17924
|
outerOiIdKey: '',
|
|
17916
17925
|
goodDetailsKey: 'items',
|
|
17917
|
-
showErpGoodsBtn: false,
|
|
17918
17926
|
eventNameMap: {
|
|
17919
17927
|
// pubsub 事件
|
|
17920
17928
|
exchangeCopyGood: 'jstExchangeCopyGood',
|
|
@@ -17925,7 +17933,7 @@ var typeMap$2 = {
|
|
|
17925
17933
|
}
|
|
17926
17934
|
};
|
|
17927
17935
|
var PublicReissue = function PublicReissue(props) {
|
|
17928
|
-
var _typeMap$type31, _typeMap$type34, _typeMap$type35, _typeMap$type36, _typeMap$type37, _value$typeMap$type$s6, _typeMap$type38, _typeMap$type39, _typeMap$type40, _typeMap$type41, _typeMap$type42, _typeMap$type43;
|
|
17936
|
+
var _typeMap$type31, _typeMap$type34, _typeMap$type35, _typeMap$type36, _typeMap$type37, _value$typeMap$type$s6, _typeMap$type38, _typeMap$type39, _typeMap$type40, _typeMap$type41, _typeMap$type42, _typeMap$type43, _typeMap$type44;
|
|
17929
17937
|
var value = props.value,
|
|
17930
17938
|
onChange = props.onChange,
|
|
17931
17939
|
_props$reasonList = props.reasonList,
|
|
@@ -18166,9 +18174,10 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18166
18174
|
disabled: disabled,
|
|
18167
18175
|
canUpdateNumber: showChangeBtn,
|
|
18168
18176
|
showChangeBtn: showChangeBtn,
|
|
18169
|
-
|
|
18177
|
+
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type42 = typeMap$2[type]) === null || _typeMap$type42 === void 0 ? void 0 : _typeMap$type42.alwaysShowChooseErpGoodsBtn,
|
|
18178
|
+
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type43 = typeMap$2[type]) === null || _typeMap$type43 === void 0 ? void 0 : _typeMap$type43.showErpGoodsBtn,
|
|
18170
18179
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18171
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18180
|
+
value: 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)],
|
|
18172
18181
|
onChange: function onChange(val) {
|
|
18173
18182
|
return changeGoodHandle(val);
|
|
18174
18183
|
},
|
|
@@ -19213,7 +19222,7 @@ var typeMap$4 = {
|
|
|
19213
19222
|
}
|
|
19214
19223
|
};
|
|
19215
19224
|
var GyReissue = function GyReissue(props) {
|
|
19216
|
-
var _value$gySystemOrder, _typeMap$
|
|
19225
|
+
var _value$gySystemOrder, _typeMap$type28, _typeMap$type30, _typeMap$type31, _value$typeMap$type$s5, _typeMap$type32, _typeMap$type33, _typeMap$type34;
|
|
19217
19226
|
var value = props.value,
|
|
19218
19227
|
onChange = props.onChange,
|
|
19219
19228
|
_props$reasonList = props.reasonList,
|
|
@@ -19246,7 +19255,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
19246
19255
|
while (1) switch (_context.prev = _context.next) {
|
|
19247
19256
|
case 0:
|
|
19248
19257
|
(_typeMap$type4 = typeMap$4[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
19249
|
-
var _typeMap$type5, _typeMap$type6;
|
|
19258
|
+
var _typeMap$type5, _typeMap$type6, _typeMap$type7, _typeMap$type8;
|
|
19250
19259
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
19251
19260
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
19252
19261
|
var billNo = _ref2.billNo,
|
|
@@ -19268,7 +19277,14 @@ var GyReissue = function GyReissue(props) {
|
|
|
19268
19277
|
shopCode: shopCode
|
|
19269
19278
|
});
|
|
19270
19279
|
});
|
|
19271
|
-
|
|
19280
|
+
kmkfUtils.pushGyLog('getOrderList', {
|
|
19281
|
+
before: value,
|
|
19282
|
+
after: _objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$4[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type6 = typeMap$4[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]), {}, {
|
|
19283
|
+
showOrderInfo: showOrderInfo,
|
|
19284
|
+
orders: orders
|
|
19285
|
+
})))
|
|
19286
|
+
});
|
|
19287
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type7 = typeMap$4[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type8 = typeMap$4[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.systemOrder]), {}, {
|
|
19272
19288
|
showOrderInfo: showOrderInfo,
|
|
19273
19289
|
orders: orders
|
|
19274
19290
|
}))));
|
|
@@ -19284,39 +19300,41 @@ var GyReissue = function GyReissue(props) {
|
|
|
19284
19300
|
};
|
|
19285
19301
|
}();
|
|
19286
19302
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
19287
|
-
var _value$typeMap$type$t, _typeMap$
|
|
19303
|
+
var _value$typeMap$type$t, _typeMap$type9, _typeMap$type10;
|
|
19304
|
+
kmkfUtils.pushGyLog('beforeChangeType', value);
|
|
19288
19305
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
19289
|
-
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$
|
|
19306
|
+
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type9 = typeMap$4[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) return;
|
|
19290
19307
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
19291
19308
|
var newValue = _objectSpread2({}, value);
|
|
19292
|
-
newValue[(_typeMap$
|
|
19309
|
+
newValue[(_typeMap$type10 = typeMap$4[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.typeName] = val;
|
|
19293
19310
|
if (typeName === '1') {
|
|
19294
|
-
var _typeMap$
|
|
19295
|
-
newValue[(_typeMap$
|
|
19311
|
+
var _typeMap$type11;
|
|
19312
|
+
newValue[(_typeMap$type11 = typeMap$4[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.key] = getGoodDetails({
|
|
19296
19313
|
mode: isStrict
|
|
19297
19314
|
});
|
|
19298
19315
|
} else if (typeName === '2') {
|
|
19299
|
-
var _typeMap$
|
|
19316
|
+
var _typeMap$type12;
|
|
19300
19317
|
// 切换到非原单,清空列表
|
|
19301
|
-
newValue[(_typeMap$
|
|
19318
|
+
newValue[(_typeMap$type12 = typeMap$4[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = [];
|
|
19302
19319
|
}
|
|
19320
|
+
kmkfUtils.pushGyLog('afterChangeType', newValue);
|
|
19303
19321
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19304
19322
|
};
|
|
19305
19323
|
var handleModeChange = function handleModeChange(mode) {
|
|
19306
|
-
var _value$typeMap$type$t2, _typeMap$
|
|
19307
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
19324
|
+
var _value$typeMap$type$t2, _typeMap$type13, _typeMap$type14;
|
|
19325
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type13 = typeMap$4[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0]) === '1';
|
|
19308
19326
|
setIsStrict(mode);
|
|
19309
19327
|
if (!isOriginalOrder) return;
|
|
19310
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$
|
|
19328
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type14 = typeMap$4[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key, getGoodDetails({
|
|
19311
19329
|
mode: mode
|
|
19312
19330
|
}))));
|
|
19313
19331
|
};
|
|
19314
19332
|
var getGoodDetails = function getGoodDetails(_ref3) {
|
|
19315
|
-
var _typeMap$
|
|
19333
|
+
var _typeMap$type15, _typeMap$type16, _order$details;
|
|
19316
19334
|
var mode = _ref3.mode,
|
|
19317
19335
|
sysOrderNo = _ref3.sysOrderNo;
|
|
19318
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19319
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19336
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type15 = typeMap$4[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.systemOrder];
|
|
19337
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type16 = typeMap$4[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.systemOrderNo];
|
|
19320
19338
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
19321
19339
|
return order.code === systemOrderNo;
|
|
19322
19340
|
});
|
|
@@ -19327,52 +19345,58 @@ var GyReissue = function GyReissue(props) {
|
|
|
19327
19345
|
}) : goodDetails;
|
|
19328
19346
|
};
|
|
19329
19347
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
19330
|
-
var _typeMap$
|
|
19348
|
+
var _typeMap$type17;
|
|
19349
|
+
kmkfUtils.pushGyLog('beforeChangeGood', value);
|
|
19331
19350
|
var newValue = _objectSpread2({}, value);
|
|
19332
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19333
|
-
var _typeMap$
|
|
19334
|
-
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19335
|
-
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19351
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type17 = typeMap$4[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.key)] = (val || []).map(function (item) {
|
|
19352
|
+
var _typeMap$type18, _typeMap$type19;
|
|
19353
|
+
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type18 = typeMap$4[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.formatDefaultField.money)] = 0;
|
|
19354
|
+
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type19 = typeMap$4[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.formatDefaultField.share)] = 0;
|
|
19336
19355
|
return item;
|
|
19337
19356
|
});
|
|
19357
|
+
kmkfUtils.pushGyLog('afterChangeGood', newValue);
|
|
19338
19358
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19339
19359
|
};
|
|
19340
19360
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
19341
|
-
var _typeMap$
|
|
19361
|
+
var _typeMap$type20, _value$typeMap$type$t3, _typeMap$type21, _value$typeMap$type$t4, _typeMap$type23;
|
|
19362
|
+
kmkfUtils.pushGyLog('beforeChangeSystemOrder', value);
|
|
19342
19363
|
var newValue = _objectSpread2({}, value);
|
|
19343
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19344
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
19345
|
-
var _typeMap$type20;
|
|
19346
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type20 = typeMap$4[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = [];
|
|
19347
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type21 = typeMap$4[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0])) {
|
|
19364
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type20 = typeMap$4[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrderNo)] = val;
|
|
19365
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type21 = typeMap$4[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
19348
19366
|
var _typeMap$type22;
|
|
19349
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type22 = typeMap$4[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] =
|
|
19367
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type22 = typeMap$4[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = [];
|
|
19368
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type23 = typeMap$4[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0])) {
|
|
19369
|
+
var _typeMap$type24;
|
|
19370
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type24 = typeMap$4[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = getGoodDetails({
|
|
19350
19371
|
mode: isStrict,
|
|
19351
19372
|
sysOrderNo: val
|
|
19352
19373
|
});
|
|
19353
19374
|
}
|
|
19375
|
+
kmkfUtils.pushGyLog('afterChangeSystemOrder', newValue);
|
|
19354
19376
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19355
19377
|
};
|
|
19356
19378
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
19357
|
-
var _typeMap$
|
|
19379
|
+
var _typeMap$type25, _typeMap$type26, _uniqBy, _typeMap$type27;
|
|
19380
|
+
kmkfUtils.pushGyLog('beforeSelectedGoodsChange', value);
|
|
19358
19381
|
var newValue = _objectSpread2({}, value);
|
|
19359
19382
|
// 原订单商品
|
|
19360
19383
|
var originTradeGoodList = getGoodDetails({
|
|
19361
19384
|
mode: isStrict
|
|
19362
19385
|
}) || [];
|
|
19363
19386
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
19364
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19365
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19387
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type25 = typeMap$4[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key)]) || [];
|
|
19388
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type26 = typeMap$4[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
19366
19389
|
return skuList.includes(item.uuid);
|
|
19367
19390
|
});
|
|
19368
|
-
console.log('商品发生变化', newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19391
|
+
console.log('商品发生变化', newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type27 = typeMap$4[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.key)]);
|
|
19369
19392
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19370
|
-
|
|
19393
|
+
kmkfUtils.pushGyLog('afterSelectedGoodsChange', newValue);
|
|
19394
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type28 = typeMap$4[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)], isStrict]);
|
|
19371
19395
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
19372
19396
|
var showChangeBtn = React.useMemo(function () {
|
|
19373
|
-
var _typeMap$
|
|
19374
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19375
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19397
|
+
var _typeMap$type29;
|
|
19398
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type29 = typeMap$4[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo]);
|
|
19399
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type30 = typeMap$4[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrderNo]]);
|
|
19376
19400
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
19377
19401
|
id: "TEST_GY",
|
|
19378
19402
|
onClick: function onClick() {
|
|
@@ -19395,12 +19419,12 @@ var GyReissue = function GyReissue(props) {
|
|
|
19395
19419
|
},
|
|
19396
19420
|
disabled: disabled,
|
|
19397
19421
|
allowClear: false,
|
|
19398
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19422
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type31 = typeMap$4[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrderNo)],
|
|
19399
19423
|
onChange: function onChange(val) {
|
|
19400
19424
|
return changeSystemOrderHandle(val);
|
|
19401
19425
|
},
|
|
19402
19426
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
19403
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
19427
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type32 = typeMap$4[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
19404
19428
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
19405
19429
|
key: item.billNo,
|
|
19406
19430
|
value: item.billNo,
|
|
@@ -19421,7 +19445,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
19421
19445
|
disabled: disabled,
|
|
19422
19446
|
allowClear: false,
|
|
19423
19447
|
options: reasonList,
|
|
19424
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19448
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type33 = typeMap$4[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.typeName)],
|
|
19425
19449
|
onChange: function onChange(val) {
|
|
19426
19450
|
return changeTypeHandle(val);
|
|
19427
19451
|
}
|
|
@@ -19433,7 +19457,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
19433
19457
|
canUpdateNumber: showChangeBtn,
|
|
19434
19458
|
showChangeBtn: showChangeBtn,
|
|
19435
19459
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
19436
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19460
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type34 = typeMap$4[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.key)],
|
|
19437
19461
|
onChange: function onChange(val) {
|
|
19438
19462
|
return changeGoodHandle(val);
|
|
19439
19463
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "2.0.19-beta.
|
|
3
|
+
"version": "2.0.19-beta.10",
|
|
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.0.19-beta.
|
|
23
|
+
"@kmkf-fe-packages/kmkf-utils": "2.0.19-beta.10",
|
|
24
24
|
"ahooks": "^3.7.4",
|
|
25
25
|
"bignumber.js": "^9.1.2",
|
|
26
26
|
"kmkf-monitor": "^0.8.9",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"publishConfig": {
|
|
66
66
|
"access": "public"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "a7f3cd9b3f9f0a08cf5c739ab3013de7d3c522cd"
|
|
69
69
|
}
|