@kmkf-fe-packages/basic-components 0.27.1-test.2 → 0.27.1-test.4
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 +296 -32
- package/dist/index.js +295 -30
- package/dist/src/index.d.ts +1 -0
- package/dist/src/jst/Goods/index.d.ts +1 -0
- package/dist/src/wdt/Reissue/index.d.ts +3 -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, request as request$1, ExpressData, uuid, LogisticsAddressData, WDT_ORDER_TYPE_MAP } from '@kmkf-fe-packages/kmkf-utils';
|
|
6
|
+
import { AddressData, BsAddressData, WdtAddressData, request as request$1, ExpressData, uuid, LogisticsAddressData, WDT, WDT_ORDER_TYPE_MAP } from '@kmkf-fe-packages/kmkf-utils';
|
|
7
7
|
import zhCN from 'antd/lib/locale/zh_CN';
|
|
8
8
|
import { cloneDeep, difference, differenceWith } from 'lodash';
|
|
9
9
|
import { useDebounceEffect } from 'ahooks';
|
|
@@ -10402,7 +10402,7 @@ var typeInitValueMap = {
|
|
|
10402
10402
|
}]
|
|
10403
10403
|
};
|
|
10404
10404
|
var jstGoods = function jstGoods(props) {
|
|
10405
|
-
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7;
|
|
10405
|
+
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8;
|
|
10406
10406
|
var _props$value = props.value,
|
|
10407
10407
|
value = _props$value === void 0 ? [] : _props$value,
|
|
10408
10408
|
onChange = props.onChange,
|
|
@@ -10410,17 +10410,30 @@ var jstGoods = function jstGoods(props) {
|
|
|
10410
10410
|
_props$type = props.type,
|
|
10411
10411
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
10412
10412
|
_props$showField = props.showField,
|
|
10413
|
-
showField = _props$showField === void 0 ? '' : _props$showField
|
|
10413
|
+
showField = _props$showField === void 0 ? '' : _props$showField,
|
|
10414
|
+
_props$componentType = props.componentType,
|
|
10415
|
+
componentType = _props$componentType === void 0 ? '' : _props$componentType;
|
|
10414
10416
|
var _useState = useState(0),
|
|
10415
10417
|
_useState2 = _slicedToArray(_useState, 2),
|
|
10416
10418
|
changeIndex = _useState2[0],
|
|
10417
10419
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
10420
|
+
var _useState3 = useState([]),
|
|
10421
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
10422
|
+
wdtSendOptions = _useState4[0],
|
|
10423
|
+
setSendOptions = _useState4[1];
|
|
10418
10424
|
useEffect(function () {
|
|
10419
10425
|
//没有值塞个默认值
|
|
10420
10426
|
if (!(value === null || value === void 0 ? void 0 : value.length)) {
|
|
10421
10427
|
onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap[type]);
|
|
10422
10428
|
}
|
|
10423
10429
|
}, [value, type]);
|
|
10430
|
+
useEffect(function () {
|
|
10431
|
+
if (type === 3 && componentType === 'WDT_SEND_GOOD' && ['sendName', 'all'].includes(showField)) {
|
|
10432
|
+
WDT.getWarehouseDataAsync().then(setSendOptions).catch(function (e) {
|
|
10433
|
+
message.error((e === null || e === void 0 ? void 0 : e.message) || '获取发货仓数据失败,请刷新重试');
|
|
10434
|
+
});
|
|
10435
|
+
}
|
|
10436
|
+
}, []);
|
|
10424
10437
|
var content = function content(item, index) {
|
|
10425
10438
|
return /*#__PURE__*/React.createElement("div", {
|
|
10426
10439
|
style: {
|
|
@@ -10441,6 +10454,18 @@ var jstGoods = function jstGoods(props) {
|
|
|
10441
10454
|
}), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, t.title), /*#__PURE__*/React.createElement("div", null, "\u7F16\u7801\uFF1A", t.skuId))));
|
|
10442
10455
|
}));
|
|
10443
10456
|
};
|
|
10457
|
+
var handleSelected = function handleSelected(val, type, option) {
|
|
10458
|
+
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
10459
|
+
changeOrderInfo[type] = val;
|
|
10460
|
+
changeOrderInfo['sendId'] = option.warehouseNo;
|
|
10461
|
+
var newList = _toConsumableArray(value);
|
|
10462
|
+
newList[changeIndex] = changeOrderInfo;
|
|
10463
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
10464
|
+
};
|
|
10465
|
+
var filterOption = function filterOption(input, option) {
|
|
10466
|
+
var _option$label;
|
|
10467
|
+
return ((_option$label = option === null || option === void 0 ? void 0 : option.label) !== null && _option$label !== void 0 ? _option$label : '').includes(input);
|
|
10468
|
+
};
|
|
10444
10469
|
var changeInputHandle = function changeInputHandle(val, type) {
|
|
10445
10470
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
10446
10471
|
changeOrderInfo[type] = val;
|
|
@@ -10511,20 +10536,34 @@ var jstGoods = function jstGoods(props) {
|
|
|
10511
10536
|
return changeInputHandle(e.target.value, 'sendId');
|
|
10512
10537
|
},
|
|
10513
10538
|
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.sendId
|
|
10514
|
-
}), ['sendName', 'all'].includes(showField) && /*#__PURE__*/React.createElement(
|
|
10539
|
+
}), ['sendName', 'all'].includes(showField) && (componentType === 'WDT_SEND_GOOD' ? /*#__PURE__*/React.createElement(Select, {
|
|
10540
|
+
style: {
|
|
10541
|
+
minWidth: '100px',
|
|
10542
|
+
maxWidth: '180px'
|
|
10543
|
+
},
|
|
10544
|
+
disabled: disabled,
|
|
10545
|
+
placeholder: "\u53D1\u8D27\u4ED3\u540D\u79F0",
|
|
10546
|
+
showSearch: true,
|
|
10547
|
+
options: wdtSendOptions,
|
|
10548
|
+
filterOption: filterOption,
|
|
10549
|
+
value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName,
|
|
10550
|
+
onChange: function onChange(value, option) {
|
|
10551
|
+
return handleSelected(value, 'sendName', option);
|
|
10552
|
+
}
|
|
10553
|
+
}) : /*#__PURE__*/React.createElement(Input, {
|
|
10515
10554
|
disabled: disabled,
|
|
10516
10555
|
placeholder: "\u8BF7\u8F93\u5165\u53D1\u8D27\u4ED3\u540D\u79F0",
|
|
10517
10556
|
onChange: function onChange(e) {
|
|
10518
10557
|
return changeInputHandle(e.target.value, 'sendName');
|
|
10519
10558
|
},
|
|
10520
|
-
value: (_value$
|
|
10521
|
-
})) : null, type === 4 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
10559
|
+
value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.sendName
|
|
10560
|
+
}))) : null, type === 4 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
10522
10561
|
disabled: disabled,
|
|
10523
10562
|
placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
|
|
10524
10563
|
onChange: function onChange(e) {
|
|
10525
10564
|
return changeInputHandle(e.target.value, 'deliveryNo');
|
|
10526
10565
|
},
|
|
10527
|
-
value: (_value$
|
|
10566
|
+
value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendName
|
|
10528
10567
|
})) : null) : null);
|
|
10529
10568
|
};
|
|
10530
10569
|
|
|
@@ -11185,7 +11224,7 @@ var GoodList = function GoodList(props, ref) {
|
|
|
11185
11224
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
11186
11225
|
pageNo = _useState4[0],
|
|
11187
11226
|
setPageNo = _useState4[1];
|
|
11188
|
-
var _useState5 = useState(
|
|
11227
|
+
var _useState5 = useState(10),
|
|
11189
11228
|
_useState6 = _slicedToArray(_useState5, 1),
|
|
11190
11229
|
pageSize = _useState6[0];
|
|
11191
11230
|
var _useState7 = useState([]),
|
|
@@ -11236,7 +11275,8 @@ var GoodList = function GoodList(props, ref) {
|
|
|
11236
11275
|
startTime = ((_formData$dateTimePic = formData.dateTimePicker) === null || _formData$dateTimePic === void 0 ? void 0 : (_formData$dateTimePic2 = _formData$dateTimePic[0]) === null || _formData$dateTimePic2 === void 0 ? void 0 : (_formData$dateTimePic3 = _formData$dateTimePic2.format) === null || _formData$dateTimePic3 === void 0 ? void 0 : _formData$dateTimePic3.call(_formData$dateTimePic2, 'YYYY-MM-DD HH:mm:ss')) || start.format('YYYY-MM-DD HH:mm:ss');
|
|
11237
11276
|
endTime = ((_formData$dateTimePic4 = formData.dateTimePicker) === null || _formData$dateTimePic4 === void 0 ? void 0 : (_formData$dateTimePic5 = _formData$dateTimePic4[1]) === null || _formData$dateTimePic5 === void 0 ? void 0 : (_formData$dateTimePic6 = _formData$dateTimePic5.format) === null || _formData$dateTimePic6 === void 0 ? void 0 : _formData$dateTimePic6.call(_formData$dateTimePic5, 'YYYY-MM-DD HH:mm:ss')) || end.format('YYYY-MM-DD HH:mm:ss');
|
|
11238
11277
|
endTime = hooks(endTime).hours(23).minutes(59).seconds(59).format('YYYY-MM-DD HH:mm:ss');
|
|
11239
|
-
|
|
11278
|
+
// PS: 故意推前3分钟,不然极端情况下,接口会报错
|
|
11279
|
+
newTime = hooks().subtract(3, 'm'); // 只能选比现在早的时间
|
|
11240
11280
|
if (hooks(endTime).diff(newTime, 'seconds') > 0) {
|
|
11241
11281
|
endTime = newTime.format('YYYY-MM-DD HH:mm:ss');
|
|
11242
11282
|
}
|
|
@@ -12339,20 +12379,6 @@ var typeMap = {
|
|
|
12339
12379
|
money: 'money',
|
|
12340
12380
|
share: 'share'
|
|
12341
12381
|
}
|
|
12342
|
-
},
|
|
12343
|
-
WDT_REISSUE_GOODS: {
|
|
12344
|
-
key: 'wdtReissueGoods',
|
|
12345
|
-
name: '旺店通',
|
|
12346
|
-
typeName: 'wdtReissueType',
|
|
12347
|
-
reissueSelectList: 'wdtReissueSelectList',
|
|
12348
|
-
reissueSelectListReturn: 'wdtReissueSelectListReturn',
|
|
12349
|
-
reissueDeleteGood: 'wdtReissueDeleteGood',
|
|
12350
|
-
changeShopCode: 'wdtChangeShopCode',
|
|
12351
|
-
reissueType: 'wdtReissueType',
|
|
12352
|
-
formatDefaultField: {
|
|
12353
|
-
money: 'orderPrice',
|
|
12354
|
-
share: 'sharePrice'
|
|
12355
|
-
}
|
|
12356
12382
|
}
|
|
12357
12383
|
};
|
|
12358
12384
|
var BsReissue = function BsReissue(props) {
|
|
@@ -12955,6 +12981,245 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
12955
12981
|
}));
|
|
12956
12982
|
};
|
|
12957
12983
|
|
|
12984
|
+
var _excluded$g = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
12985
|
+
var typeMap$1 = {
|
|
12986
|
+
WDT_REISSUE_GOODS: {
|
|
12987
|
+
key: 'wdtReissueGoods',
|
|
12988
|
+
name: '旺店通',
|
|
12989
|
+
typeName: 'wdtReissueType',
|
|
12990
|
+
wdtSystemOrder: 'wdtSystemOrder',
|
|
12991
|
+
wdtSystemOrderNo: 'wdtSystemOrderNo',
|
|
12992
|
+
reissueSelectList: 'wdtReissueSelectList',
|
|
12993
|
+
reissueSelectListReturn: 'wdtReissueSelectListReturn',
|
|
12994
|
+
reissueDeleteGood: 'wdtReissueDeleteGood',
|
|
12995
|
+
changeShopCode: 'wdtChangeShopCode',
|
|
12996
|
+
reissueType: 'wdtReissueType',
|
|
12997
|
+
formatDefaultField: {
|
|
12998
|
+
money: 'orderPrice',
|
|
12999
|
+
share: 'sharePrice'
|
|
13000
|
+
}
|
|
13001
|
+
}
|
|
13002
|
+
};
|
|
13003
|
+
var wdtReissue = function wdtReissue(props) {
|
|
13004
|
+
var _typeMap$type7, _value$typeMap$type$t3, _typeMap$type11, _typeMap$type25, _typeMap$type26, _value$typeMap$type$w2, _typeMap$type27, _typeMap$type28, _typeMap$type29;
|
|
13005
|
+
var value = props.value,
|
|
13006
|
+
onChange = props.onChange,
|
|
13007
|
+
_props$reasonList = props.reasonList,
|
|
13008
|
+
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
13009
|
+
disabled = props.disabled,
|
|
13010
|
+
type = props.type,
|
|
13011
|
+
other = _objectWithoutProperties(props, _excluded$g);
|
|
13012
|
+
var valueRef = useRef({});
|
|
13013
|
+
useEffect(function () {
|
|
13014
|
+
var _typeMap$type, _typeMap$type4;
|
|
13015
|
+
valueRef.current = value;
|
|
13016
|
+
pubsub.subscribeOnce("".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type = typeMap$1[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.reissueDeleteGood), function (_, data) {
|
|
13017
|
+
if (disabled) return;
|
|
13018
|
+
if (value) {
|
|
13019
|
+
var _typeMap$type2, _typeMap$type3;
|
|
13020
|
+
var newValue = _objectSpread2({}, value);
|
|
13021
|
+
newValue["".concat((_typeMap$type2 = typeMap$1[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.key)] = newValue === null || newValue === void 0 ? void 0 : newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type3 = typeMap$1[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.key)].filter(function (item) {
|
|
13022
|
+
return item.sku !== data;
|
|
13023
|
+
});
|
|
13024
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13025
|
+
}
|
|
13026
|
+
});
|
|
13027
|
+
pubsub.subscribeOnce("".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type4 = typeMap$1[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.changeShopCode), function (type, data) {
|
|
13028
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
13029
|
+
shopCode: data.shopCode
|
|
13030
|
+
}));
|
|
13031
|
+
});
|
|
13032
|
+
}, [value, disabled]);
|
|
13033
|
+
useEffect(function () {
|
|
13034
|
+
var _value$orders, _value$showOrderInfo;
|
|
13035
|
+
if (!(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo) && (value === null || value === void 0 ? void 0 : (_value$showOrderInfo = value.showOrderInfo) === null || _value$showOrderInfo === void 0 ? void 0 : _value$showOrderInfo.length)) {
|
|
13036
|
+
if (type === 'WDT_SYSTEM_ORDER') {
|
|
13037
|
+
getWdtOrderList(value.orderNo);
|
|
13038
|
+
}
|
|
13039
|
+
}
|
|
13040
|
+
return;
|
|
13041
|
+
}, [value]);
|
|
13042
|
+
useEffect(function () {
|
|
13043
|
+
var _typeMap$type5;
|
|
13044
|
+
var wdtSystemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type5 = typeMap$1[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.wdtSystemOrderNo];
|
|
13045
|
+
if (wdtSystemOrderNo) {
|
|
13046
|
+
var _value$typeMap$type$t, _typeMap$type6;
|
|
13047
|
+
if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type6 = typeMap$1[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) {
|
|
13048
|
+
getGoodItems(wdtSystemOrderNo);
|
|
13049
|
+
}
|
|
13050
|
+
}
|
|
13051
|
+
return;
|
|
13052
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type7 = typeMap$1[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.wdtSystemOrderNo]]);
|
|
13053
|
+
useEffect(function () {
|
|
13054
|
+
var _value$typeMap$type$t2, _typeMap$type8, _typeMap$type9;
|
|
13055
|
+
var typeName = value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type8 = typeMap$1[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0];
|
|
13056
|
+
var wdtSystemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type9 = typeMap$1[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.wdtSystemOrderNo];
|
|
13057
|
+
if (['1'].includes(typeName)) {
|
|
13058
|
+
wdtSystemOrderNo && getGoodItems(wdtSystemOrderNo);
|
|
13059
|
+
} else if (['2'].includes(typeName)) {
|
|
13060
|
+
var _typeMap$type10;
|
|
13061
|
+
var newValue = _objectSpread2({}, value);
|
|
13062
|
+
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type10 = typeMap$1[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key)] = [];
|
|
13063
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13064
|
+
}
|
|
13065
|
+
return;
|
|
13066
|
+
}, [value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type11 = typeMap$1[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0]]);
|
|
13067
|
+
var getGoodItems = function getGoodItems(wdtSystemOrderNo) {
|
|
13068
|
+
var _value$typeMap$type$w, _typeMap$type12, _ref;
|
|
13069
|
+
var orders = value === null || value === void 0 ? void 0 : (_value$typeMap$type$w = value[(_typeMap$type12 = typeMap$1[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.wdtSystemOrder]) === null || _value$typeMap$type$w === void 0 ? void 0 : _value$typeMap$type$w.orders;
|
|
13070
|
+
var order = (_ref = orders || []) === null || _ref === void 0 ? void 0 : _ref.find(function (orderItem) {
|
|
13071
|
+
return orderItem.billNo === wdtSystemOrderNo;
|
|
13072
|
+
});
|
|
13073
|
+
if (order) {
|
|
13074
|
+
var _typeMap$type13, _order$goodDetails;
|
|
13075
|
+
var newValue = _objectSpread2({}, value);
|
|
13076
|
+
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type13 = typeMap$1[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key)] = order === null || order === void 0 ? void 0 : (_order$goodDetails = order.goodDetails) === null || _order$goodDetails === void 0 ? void 0 : _order$goodDetails.map(function (item) {
|
|
13077
|
+
var _typeMap$type14, _typeMap$type15;
|
|
13078
|
+
item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type14 = typeMap$1[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.formatDefaultField.money)] = 0;
|
|
13079
|
+
item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type15 = typeMap$1[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.formatDefaultField.share)] = 0;
|
|
13080
|
+
item.canUpdateNumber = true;
|
|
13081
|
+
return item;
|
|
13082
|
+
});
|
|
13083
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13084
|
+
}
|
|
13085
|
+
};
|
|
13086
|
+
var getWdtOrderList = /*#__PURE__*/function () {
|
|
13087
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
13088
|
+
var _yield$request, success, data, _typeMap$type16, _typeMap$type17, orders, showOrderInfo;
|
|
13089
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
13090
|
+
while (1) switch (_context.prev = _context.next) {
|
|
13091
|
+
case 0:
|
|
13092
|
+
_context.next = 2;
|
|
13093
|
+
return extendRequest('/qy/gdfw/order/wdtOrderDetail', {
|
|
13094
|
+
method: 'post',
|
|
13095
|
+
data: {
|
|
13096
|
+
billNo: orderNo
|
|
13097
|
+
}
|
|
13098
|
+
});
|
|
13099
|
+
case 2:
|
|
13100
|
+
_yield$request = _context.sent;
|
|
13101
|
+
success = _yield$request.success;
|
|
13102
|
+
data = _yield$request.data;
|
|
13103
|
+
if (success) {
|
|
13104
|
+
orders = ((data === null || data === void 0 ? void 0 : data.trades) || []).map(function (item) {
|
|
13105
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
13106
|
+
billNo: item.tradeNo,
|
|
13107
|
+
billType: WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
13108
|
+
billTag: item.tagName
|
|
13109
|
+
});
|
|
13110
|
+
});
|
|
13111
|
+
showOrderInfo = data === null || data === void 0 ? void 0 : data.trades.map(function (item) {
|
|
13112
|
+
return {
|
|
13113
|
+
billNo: item.tradeNo,
|
|
13114
|
+
billType: WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
13115
|
+
billTag: item.tagName
|
|
13116
|
+
};
|
|
13117
|
+
});
|
|
13118
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type16 = typeMap$1[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.wdtSystemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type17 = typeMap$1[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.wdtSystemOrder]), {}, {
|
|
13119
|
+
showOrderInfo: showOrderInfo,
|
|
13120
|
+
orders: orders
|
|
13121
|
+
}))));
|
|
13122
|
+
}
|
|
13123
|
+
case 6:
|
|
13124
|
+
case "end":
|
|
13125
|
+
return _context.stop();
|
|
13126
|
+
}
|
|
13127
|
+
}, _callee);
|
|
13128
|
+
}));
|
|
13129
|
+
return function getWdtOrderList(_x) {
|
|
13130
|
+
return _ref2.apply(this, arguments);
|
|
13131
|
+
};
|
|
13132
|
+
}();
|
|
13133
|
+
var changeTypeHandle = function changeTypeHandle(val) {
|
|
13134
|
+
var _typeMap$type18, _typeMap$type19;
|
|
13135
|
+
var newValue = _objectSpread2({}, value);
|
|
13136
|
+
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type18 = typeMap$1[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.typeName)] = val;
|
|
13137
|
+
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type19 = typeMap$1[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = [];
|
|
13138
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13139
|
+
valueRef.current = newValue;
|
|
13140
|
+
// if (['2'].includes(val[0])) {
|
|
13141
|
+
// onChange?.(newValue);
|
|
13142
|
+
// valueRef.current = newValue;
|
|
13143
|
+
// }
|
|
13144
|
+
// pubsub.publish(`${typeMap?.[type]?.reissueType}`, {
|
|
13145
|
+
// val: val[0],
|
|
13146
|
+
// goodValue: newValue,
|
|
13147
|
+
// });
|
|
13148
|
+
};
|
|
13149
|
+
|
|
13150
|
+
var changeGoodHandle = function changeGoodHandle(val) {
|
|
13151
|
+
var _typeMap$type20;
|
|
13152
|
+
var newValue = _objectSpread2({}, value);
|
|
13153
|
+
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type20 = typeMap$1[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = (val || []).map(function (item) {
|
|
13154
|
+
var _typeMap$type21, _typeMap$type22;
|
|
13155
|
+
item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type21 = typeMap$1[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.formatDefaultField.money)] = 0;
|
|
13156
|
+
item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type22 = typeMap$1[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.formatDefaultField.share)] = 0;
|
|
13157
|
+
return item;
|
|
13158
|
+
});
|
|
13159
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13160
|
+
};
|
|
13161
|
+
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
13162
|
+
var _typeMap$type23;
|
|
13163
|
+
var newValue = _objectSpread2({}, value);
|
|
13164
|
+
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.wdtSystemOrderNo)] = val;
|
|
13165
|
+
console.log('changeSystemOrderHandle', val, newValue);
|
|
13166
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13167
|
+
};
|
|
13168
|
+
//显示选择商品按钮 原单换不显示选择商品
|
|
13169
|
+
var showChangeBtn = useMemo(function () {
|
|
13170
|
+
var _typeMap$type24;
|
|
13171
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.wdtSystemOrderNo]);
|
|
13172
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.wdtSystemOrderNo]]);
|
|
13173
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
13174
|
+
gutter: 8
|
|
13175
|
+
}, /*#__PURE__*/React.createElement(Col, {
|
|
13176
|
+
className: "gutter-row",
|
|
13177
|
+
span: 6
|
|
13178
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
13179
|
+
style: {
|
|
13180
|
+
marginBottom: '8px'
|
|
13181
|
+
},
|
|
13182
|
+
disabled: disabled,
|
|
13183
|
+
allowClear: false,
|
|
13184
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.wdtSystemOrderNo)],
|
|
13185
|
+
onChange: function onChange(val) {
|
|
13186
|
+
return changeSystemOrderHandle(val);
|
|
13187
|
+
}
|
|
13188
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$w2 = value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.wdtSystemOrder]) === null || _value$typeMap$type$w2 === void 0 ? void 0 : _value$typeMap$type$w2.showOrderInfo) || []).map(function (item) {
|
|
13189
|
+
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
13190
|
+
key: item.billNo,
|
|
13191
|
+
value: item.billNo,
|
|
13192
|
+
label: item.billNo
|
|
13193
|
+
}, item.billNo);
|
|
13194
|
+
}))), /*#__PURE__*/React.createElement(Col, {
|
|
13195
|
+
className: "gutter-row",
|
|
13196
|
+
span: 6
|
|
13197
|
+
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
13198
|
+
style: {
|
|
13199
|
+
marginBottom: '8px'
|
|
13200
|
+
},
|
|
13201
|
+
disabled: disabled,
|
|
13202
|
+
allowClear: false,
|
|
13203
|
+
options: reasonList,
|
|
13204
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.typeName)],
|
|
13205
|
+
onChange: function onChange(val) {
|
|
13206
|
+
return changeTypeHandle(val);
|
|
13207
|
+
}
|
|
13208
|
+
}))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
13209
|
+
key: 'reissueGoods'
|
|
13210
|
+
}, other), {}, {
|
|
13211
|
+
type: type,
|
|
13212
|
+
disabled: disabled,
|
|
13213
|
+
canUpdateNumber: showChangeBtn,
|
|
13214
|
+
showChangeBtn: showChangeBtn,
|
|
13215
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
13216
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type29 = typeMap$1[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)],
|
|
13217
|
+
onChange: function onChange(val) {
|
|
13218
|
+
return changeGoodHandle(val);
|
|
13219
|
+
}
|
|
13220
|
+
})));
|
|
13221
|
+
};
|
|
13222
|
+
|
|
12958
13223
|
var css_248z$a = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border: 1px solid #F2F3F5;\n margin: 0 10px 10px 0;\n text-align: center;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4E5969;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodMain {\n display: flex;\n flex-wrap: wrap;\n height: 265px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodMain .goodItem {\n width: 140px;\n height: 175px;\n padding: 11px 10px 0;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n margin-bottom: 10px;\n margin-right: 30px;\n border: 1px solid #e6e6e6;\n cursor: pointer;\n transition: border 0.3s;\n}\n.goodMain .goodItem .goodImg {\n width: 120px;\n height: 120px;\n}\n.goodMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodMain .goodItem.active {\n border: 1px solid #3089dc;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n";
|
|
12959
13224
|
styleInject(css_248z$a);
|
|
12960
13225
|
|
|
@@ -13431,12 +13696,12 @@ var Goods$1 = function Goods(props, ref) {
|
|
|
13431
13696
|
};
|
|
13432
13697
|
var index$2 = /*#__PURE__*/forwardRef(Goods$1);
|
|
13433
13698
|
|
|
13434
|
-
var _excluded$
|
|
13699
|
+
var _excluded$h = ["onChange", "value", "failValue"];
|
|
13435
13700
|
function CommonStatus(props) {
|
|
13436
13701
|
var onChange = props.onChange,
|
|
13437
13702
|
value = props.value,
|
|
13438
13703
|
failValue = props.failValue,
|
|
13439
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
13704
|
+
other = _objectWithoutProperties(props, _excluded$h);
|
|
13440
13705
|
var changeHandle = function changeHandle(val) {
|
|
13441
13706
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
13442
13707
|
status: val,
|
|
@@ -13508,7 +13773,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
13508
13773
|
changeOrderInfo[type] = val;
|
|
13509
13774
|
var newList = _toConsumableArray(value);
|
|
13510
13775
|
newList[changeIndex] = changeOrderInfo;
|
|
13511
|
-
console.log(newList, val, type);
|
|
13776
|
+
// console.log(newList, val, type);
|
|
13512
13777
|
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
13513
13778
|
};
|
|
13514
13779
|
//判断是否是单个且没有商品数据
|
|
@@ -13555,7 +13820,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
13555
13820
|
})) : null) : null);
|
|
13556
13821
|
};
|
|
13557
13822
|
|
|
13558
|
-
var _excluded$
|
|
13823
|
+
var _excluded$i = ["value", "onChange", "disabled", "failValue", "type"];
|
|
13559
13824
|
var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
13560
13825
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
|
|
13561
13826
|
var _props$value = props.value,
|
|
@@ -13565,7 +13830,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
13565
13830
|
failValue = props.failValue,
|
|
13566
13831
|
_props$type = props.type,
|
|
13567
13832
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
13568
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
13833
|
+
other = _objectWithoutProperties(props, _excluded$i);
|
|
13569
13834
|
var _useState = useState(0),
|
|
13570
13835
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13571
13836
|
changeIndex = _useState2[0],
|
|
@@ -13584,7 +13849,6 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
13584
13849
|
}, [1, 2].includes(type) ? /*#__PURE__*/React.createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
|
|
13585
13850
|
};
|
|
13586
13851
|
var changeHandle = function changeHandle(val, valType) {
|
|
13587
|
-
console.log(val, valType);
|
|
13588
13852
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
13589
13853
|
changeOrderInfo[valType] = val;
|
|
13590
13854
|
if (val !== failValue) {
|
|
@@ -13632,7 +13896,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
13632
13896
|
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
|
|
13633
13897
|
};
|
|
13634
13898
|
|
|
13635
|
-
var _excluded$
|
|
13899
|
+
var _excluded$j = ["value", "onChange", "disabled", "failValue", "type"];
|
|
13636
13900
|
var msgTypeCh = {
|
|
13637
13901
|
ding: '钉钉',
|
|
13638
13902
|
wechat: '微信',
|
|
@@ -13648,7 +13912,7 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
13648
13912
|
failValue = props.failValue,
|
|
13649
13913
|
_props$type = props.type,
|
|
13650
13914
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
13651
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
13915
|
+
other = _objectWithoutProperties(props, _excluded$j);
|
|
13652
13916
|
var _useState = useState(0),
|
|
13653
13917
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13654
13918
|
changeIndex = _useState2[0],
|
|
@@ -13717,4 +13981,4 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
13717
13981
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
13718
13982
|
};
|
|
13719
13983
|
|
|
13720
|
-
export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, WlnGoods };
|
|
13984
|
+
export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods };
|
package/dist/index.js
CHANGED
|
@@ -10413,7 +10413,7 @@ var typeInitValueMap = {
|
|
|
10413
10413
|
}]
|
|
10414
10414
|
};
|
|
10415
10415
|
var jstGoods = function jstGoods(props) {
|
|
10416
|
-
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7;
|
|
10416
|
+
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8;
|
|
10417
10417
|
var _props$value = props.value,
|
|
10418
10418
|
value = _props$value === void 0 ? [] : _props$value,
|
|
10419
10419
|
onChange = props.onChange,
|
|
@@ -10421,17 +10421,30 @@ var jstGoods = function jstGoods(props) {
|
|
|
10421
10421
|
_props$type = props.type,
|
|
10422
10422
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
10423
10423
|
_props$showField = props.showField,
|
|
10424
|
-
showField = _props$showField === void 0 ? '' : _props$showField
|
|
10424
|
+
showField = _props$showField === void 0 ? '' : _props$showField,
|
|
10425
|
+
_props$componentType = props.componentType,
|
|
10426
|
+
componentType = _props$componentType === void 0 ? '' : _props$componentType;
|
|
10425
10427
|
var _useState = React.useState(0),
|
|
10426
10428
|
_useState2 = _slicedToArray(_useState, 2),
|
|
10427
10429
|
changeIndex = _useState2[0],
|
|
10428
10430
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
10431
|
+
var _useState3 = React.useState([]),
|
|
10432
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
10433
|
+
wdtSendOptions = _useState4[0],
|
|
10434
|
+
setSendOptions = _useState4[1];
|
|
10429
10435
|
React.useEffect(function () {
|
|
10430
10436
|
//没有值塞个默认值
|
|
10431
10437
|
if (!(value === null || value === void 0 ? void 0 : value.length)) {
|
|
10432
10438
|
onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap[type]);
|
|
10433
10439
|
}
|
|
10434
10440
|
}, [value, type]);
|
|
10441
|
+
React.useEffect(function () {
|
|
10442
|
+
if (type === 3 && componentType === 'WDT_SEND_GOOD' && ['sendName', 'all'].includes(showField)) {
|
|
10443
|
+
kmkfUtils.WDT.getWarehouseDataAsync().then(setSendOptions).catch(function (e) {
|
|
10444
|
+
antd.message.error((e === null || e === void 0 ? void 0 : e.message) || '获取发货仓数据失败,请刷新重试');
|
|
10445
|
+
});
|
|
10446
|
+
}
|
|
10447
|
+
}, []);
|
|
10435
10448
|
var content = function content(item, index) {
|
|
10436
10449
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
10437
10450
|
style: {
|
|
@@ -10452,6 +10465,18 @@ var jstGoods = function jstGoods(props) {
|
|
|
10452
10465
|
}), /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("div", null, t.title), /*#__PURE__*/React__default['default'].createElement("div", null, "\u7F16\u7801\uFF1A", t.skuId))));
|
|
10453
10466
|
}));
|
|
10454
10467
|
};
|
|
10468
|
+
var handleSelected = function handleSelected(val, type, option) {
|
|
10469
|
+
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
10470
|
+
changeOrderInfo[type] = val;
|
|
10471
|
+
changeOrderInfo['sendId'] = option.warehouseNo;
|
|
10472
|
+
var newList = _toConsumableArray(value);
|
|
10473
|
+
newList[changeIndex] = changeOrderInfo;
|
|
10474
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
10475
|
+
};
|
|
10476
|
+
var filterOption = function filterOption(input, option) {
|
|
10477
|
+
var _option$label;
|
|
10478
|
+
return ((_option$label = option === null || option === void 0 ? void 0 : option.label) !== null && _option$label !== void 0 ? _option$label : '').includes(input);
|
|
10479
|
+
};
|
|
10455
10480
|
var changeInputHandle = function changeInputHandle(val, type) {
|
|
10456
10481
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
10457
10482
|
changeOrderInfo[type] = val;
|
|
@@ -10522,20 +10547,34 @@ var jstGoods = function jstGoods(props) {
|
|
|
10522
10547
|
return changeInputHandle(e.target.value, 'sendId');
|
|
10523
10548
|
},
|
|
10524
10549
|
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.sendId
|
|
10525
|
-
}), ['sendName', 'all'].includes(showField) && /*#__PURE__*/React__default['default'].createElement(antd.
|
|
10550
|
+
}), ['sendName', 'all'].includes(showField) && (componentType === 'WDT_SEND_GOOD' ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
10551
|
+
style: {
|
|
10552
|
+
minWidth: '100px',
|
|
10553
|
+
maxWidth: '180px'
|
|
10554
|
+
},
|
|
10555
|
+
disabled: disabled,
|
|
10556
|
+
placeholder: "\u53D1\u8D27\u4ED3\u540D\u79F0",
|
|
10557
|
+
showSearch: true,
|
|
10558
|
+
options: wdtSendOptions,
|
|
10559
|
+
filterOption: filterOption,
|
|
10560
|
+
value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName,
|
|
10561
|
+
onChange: function onChange(value, option) {
|
|
10562
|
+
return handleSelected(value, 'sendName', option);
|
|
10563
|
+
}
|
|
10564
|
+
}) : /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
10526
10565
|
disabled: disabled,
|
|
10527
10566
|
placeholder: "\u8BF7\u8F93\u5165\u53D1\u8D27\u4ED3\u540D\u79F0",
|
|
10528
10567
|
onChange: function onChange(e) {
|
|
10529
10568
|
return changeInputHandle(e.target.value, 'sendName');
|
|
10530
10569
|
},
|
|
10531
|
-
value: (_value$
|
|
10532
|
-
})) : null, type === 4 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
10570
|
+
value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.sendName
|
|
10571
|
+
}))) : null, type === 4 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
10533
10572
|
disabled: disabled,
|
|
10534
10573
|
placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
|
|
10535
10574
|
onChange: function onChange(e) {
|
|
10536
10575
|
return changeInputHandle(e.target.value, 'deliveryNo');
|
|
10537
10576
|
},
|
|
10538
|
-
value: (_value$
|
|
10577
|
+
value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendName
|
|
10539
10578
|
})) : null) : null);
|
|
10540
10579
|
};
|
|
10541
10580
|
|
|
@@ -11196,7 +11235,7 @@ var GoodList = function GoodList(props, ref) {
|
|
|
11196
11235
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
11197
11236
|
pageNo = _useState4[0],
|
|
11198
11237
|
setPageNo = _useState4[1];
|
|
11199
|
-
var _useState5 = React.useState(
|
|
11238
|
+
var _useState5 = React.useState(10),
|
|
11200
11239
|
_useState6 = _slicedToArray(_useState5, 1),
|
|
11201
11240
|
pageSize = _useState6[0];
|
|
11202
11241
|
var _useState7 = React.useState([]),
|
|
@@ -11247,7 +11286,8 @@ var GoodList = function GoodList(props, ref) {
|
|
|
11247
11286
|
startTime = ((_formData$dateTimePic = formData.dateTimePicker) === null || _formData$dateTimePic === void 0 ? void 0 : (_formData$dateTimePic2 = _formData$dateTimePic[0]) === null || _formData$dateTimePic2 === void 0 ? void 0 : (_formData$dateTimePic3 = _formData$dateTimePic2.format) === null || _formData$dateTimePic3 === void 0 ? void 0 : _formData$dateTimePic3.call(_formData$dateTimePic2, 'YYYY-MM-DD HH:mm:ss')) || start.format('YYYY-MM-DD HH:mm:ss');
|
|
11248
11287
|
endTime = ((_formData$dateTimePic4 = formData.dateTimePicker) === null || _formData$dateTimePic4 === void 0 ? void 0 : (_formData$dateTimePic5 = _formData$dateTimePic4[1]) === null || _formData$dateTimePic5 === void 0 ? void 0 : (_formData$dateTimePic6 = _formData$dateTimePic5.format) === null || _formData$dateTimePic6 === void 0 ? void 0 : _formData$dateTimePic6.call(_formData$dateTimePic5, 'YYYY-MM-DD HH:mm:ss')) || end.format('YYYY-MM-DD HH:mm:ss');
|
|
11249
11288
|
endTime = hooks(endTime).hours(23).minutes(59).seconds(59).format('YYYY-MM-DD HH:mm:ss');
|
|
11250
|
-
|
|
11289
|
+
// PS: 故意推前3分钟,不然极端情况下,接口会报错
|
|
11290
|
+
newTime = hooks().subtract(3, 'm'); // 只能选比现在早的时间
|
|
11251
11291
|
if (hooks(endTime).diff(newTime, 'seconds') > 0) {
|
|
11252
11292
|
endTime = newTime.format('YYYY-MM-DD HH:mm:ss');
|
|
11253
11293
|
}
|
|
@@ -12350,20 +12390,6 @@ var typeMap = {
|
|
|
12350
12390
|
money: 'money',
|
|
12351
12391
|
share: 'share'
|
|
12352
12392
|
}
|
|
12353
|
-
},
|
|
12354
|
-
WDT_REISSUE_GOODS: {
|
|
12355
|
-
key: 'wdtReissueGoods',
|
|
12356
|
-
name: '旺店通',
|
|
12357
|
-
typeName: 'wdtReissueType',
|
|
12358
|
-
reissueSelectList: 'wdtReissueSelectList',
|
|
12359
|
-
reissueSelectListReturn: 'wdtReissueSelectListReturn',
|
|
12360
|
-
reissueDeleteGood: 'wdtReissueDeleteGood',
|
|
12361
|
-
changeShopCode: 'wdtChangeShopCode',
|
|
12362
|
-
reissueType: 'wdtReissueType',
|
|
12363
|
-
formatDefaultField: {
|
|
12364
|
-
money: 'orderPrice',
|
|
12365
|
-
share: 'sharePrice'
|
|
12366
|
-
}
|
|
12367
12393
|
}
|
|
12368
12394
|
};
|
|
12369
12395
|
var BsReissue = function BsReissue(props) {
|
|
@@ -12966,6 +12992,245 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
12966
12992
|
}));
|
|
12967
12993
|
};
|
|
12968
12994
|
|
|
12995
|
+
var _excluded$g = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
12996
|
+
var typeMap$1 = {
|
|
12997
|
+
WDT_REISSUE_GOODS: {
|
|
12998
|
+
key: 'wdtReissueGoods',
|
|
12999
|
+
name: '旺店通',
|
|
13000
|
+
typeName: 'wdtReissueType',
|
|
13001
|
+
wdtSystemOrder: 'wdtSystemOrder',
|
|
13002
|
+
wdtSystemOrderNo: 'wdtSystemOrderNo',
|
|
13003
|
+
reissueSelectList: 'wdtReissueSelectList',
|
|
13004
|
+
reissueSelectListReturn: 'wdtReissueSelectListReturn',
|
|
13005
|
+
reissueDeleteGood: 'wdtReissueDeleteGood',
|
|
13006
|
+
changeShopCode: 'wdtChangeShopCode',
|
|
13007
|
+
reissueType: 'wdtReissueType',
|
|
13008
|
+
formatDefaultField: {
|
|
13009
|
+
money: 'orderPrice',
|
|
13010
|
+
share: 'sharePrice'
|
|
13011
|
+
}
|
|
13012
|
+
}
|
|
13013
|
+
};
|
|
13014
|
+
var wdtReissue = function wdtReissue(props) {
|
|
13015
|
+
var _typeMap$type7, _value$typeMap$type$t3, _typeMap$type11, _typeMap$type25, _typeMap$type26, _value$typeMap$type$w2, _typeMap$type27, _typeMap$type28, _typeMap$type29;
|
|
13016
|
+
var value = props.value,
|
|
13017
|
+
onChange = props.onChange,
|
|
13018
|
+
_props$reasonList = props.reasonList,
|
|
13019
|
+
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
13020
|
+
disabled = props.disabled,
|
|
13021
|
+
type = props.type,
|
|
13022
|
+
other = _objectWithoutProperties(props, _excluded$g);
|
|
13023
|
+
var valueRef = React.useRef({});
|
|
13024
|
+
React.useEffect(function () {
|
|
13025
|
+
var _typeMap$type, _typeMap$type4;
|
|
13026
|
+
valueRef.current = value;
|
|
13027
|
+
pubsub__default['default'].subscribeOnce("".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type = typeMap$1[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.reissueDeleteGood), function (_, data) {
|
|
13028
|
+
if (disabled) return;
|
|
13029
|
+
if (value) {
|
|
13030
|
+
var _typeMap$type2, _typeMap$type3;
|
|
13031
|
+
var newValue = _objectSpread2({}, value);
|
|
13032
|
+
newValue["".concat((_typeMap$type2 = typeMap$1[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.key)] = newValue === null || newValue === void 0 ? void 0 : newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type3 = typeMap$1[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.key)].filter(function (item) {
|
|
13033
|
+
return item.sku !== data;
|
|
13034
|
+
});
|
|
13035
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13036
|
+
}
|
|
13037
|
+
});
|
|
13038
|
+
pubsub__default['default'].subscribeOnce("".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type4 = typeMap$1[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.changeShopCode), function (type, data) {
|
|
13039
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
13040
|
+
shopCode: data.shopCode
|
|
13041
|
+
}));
|
|
13042
|
+
});
|
|
13043
|
+
}, [value, disabled]);
|
|
13044
|
+
React.useEffect(function () {
|
|
13045
|
+
var _value$orders, _value$showOrderInfo;
|
|
13046
|
+
if (!(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo) && (value === null || value === void 0 ? void 0 : (_value$showOrderInfo = value.showOrderInfo) === null || _value$showOrderInfo === void 0 ? void 0 : _value$showOrderInfo.length)) {
|
|
13047
|
+
if (type === 'WDT_SYSTEM_ORDER') {
|
|
13048
|
+
getWdtOrderList(value.orderNo);
|
|
13049
|
+
}
|
|
13050
|
+
}
|
|
13051
|
+
return;
|
|
13052
|
+
}, [value]);
|
|
13053
|
+
React.useEffect(function () {
|
|
13054
|
+
var _typeMap$type5;
|
|
13055
|
+
var wdtSystemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type5 = typeMap$1[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.wdtSystemOrderNo];
|
|
13056
|
+
if (wdtSystemOrderNo) {
|
|
13057
|
+
var _value$typeMap$type$t, _typeMap$type6;
|
|
13058
|
+
if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type6 = typeMap$1[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) {
|
|
13059
|
+
getGoodItems(wdtSystemOrderNo);
|
|
13060
|
+
}
|
|
13061
|
+
}
|
|
13062
|
+
return;
|
|
13063
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type7 = typeMap$1[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.wdtSystemOrderNo]]);
|
|
13064
|
+
React.useEffect(function () {
|
|
13065
|
+
var _value$typeMap$type$t2, _typeMap$type8, _typeMap$type9;
|
|
13066
|
+
var typeName = value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type8 = typeMap$1[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0];
|
|
13067
|
+
var wdtSystemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type9 = typeMap$1[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.wdtSystemOrderNo];
|
|
13068
|
+
if (['1'].includes(typeName)) {
|
|
13069
|
+
wdtSystemOrderNo && getGoodItems(wdtSystemOrderNo);
|
|
13070
|
+
} else if (['2'].includes(typeName)) {
|
|
13071
|
+
var _typeMap$type10;
|
|
13072
|
+
var newValue = _objectSpread2({}, value);
|
|
13073
|
+
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type10 = typeMap$1[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key)] = [];
|
|
13074
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13075
|
+
}
|
|
13076
|
+
return;
|
|
13077
|
+
}, [value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type11 = typeMap$1[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0]]);
|
|
13078
|
+
var getGoodItems = function getGoodItems(wdtSystemOrderNo) {
|
|
13079
|
+
var _value$typeMap$type$w, _typeMap$type12, _ref;
|
|
13080
|
+
var orders = value === null || value === void 0 ? void 0 : (_value$typeMap$type$w = value[(_typeMap$type12 = typeMap$1[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.wdtSystemOrder]) === null || _value$typeMap$type$w === void 0 ? void 0 : _value$typeMap$type$w.orders;
|
|
13081
|
+
var order = (_ref = orders || []) === null || _ref === void 0 ? void 0 : _ref.find(function (orderItem) {
|
|
13082
|
+
return orderItem.billNo === wdtSystemOrderNo;
|
|
13083
|
+
});
|
|
13084
|
+
if (order) {
|
|
13085
|
+
var _typeMap$type13, _order$goodDetails;
|
|
13086
|
+
var newValue = _objectSpread2({}, value);
|
|
13087
|
+
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type13 = typeMap$1[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key)] = order === null || order === void 0 ? void 0 : (_order$goodDetails = order.goodDetails) === null || _order$goodDetails === void 0 ? void 0 : _order$goodDetails.map(function (item) {
|
|
13088
|
+
var _typeMap$type14, _typeMap$type15;
|
|
13089
|
+
item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type14 = typeMap$1[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.formatDefaultField.money)] = 0;
|
|
13090
|
+
item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type15 = typeMap$1[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.formatDefaultField.share)] = 0;
|
|
13091
|
+
item.canUpdateNumber = true;
|
|
13092
|
+
return item;
|
|
13093
|
+
});
|
|
13094
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13095
|
+
}
|
|
13096
|
+
};
|
|
13097
|
+
var getWdtOrderList = /*#__PURE__*/function () {
|
|
13098
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
13099
|
+
var _yield$request, success, data, _typeMap$type16, _typeMap$type17, orders, showOrderInfo;
|
|
13100
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
13101
|
+
while (1) switch (_context.prev = _context.next) {
|
|
13102
|
+
case 0:
|
|
13103
|
+
_context.next = 2;
|
|
13104
|
+
return extendRequest('/qy/gdfw/order/wdtOrderDetail', {
|
|
13105
|
+
method: 'post',
|
|
13106
|
+
data: {
|
|
13107
|
+
billNo: orderNo
|
|
13108
|
+
}
|
|
13109
|
+
});
|
|
13110
|
+
case 2:
|
|
13111
|
+
_yield$request = _context.sent;
|
|
13112
|
+
success = _yield$request.success;
|
|
13113
|
+
data = _yield$request.data;
|
|
13114
|
+
if (success) {
|
|
13115
|
+
orders = ((data === null || data === void 0 ? void 0 : data.trades) || []).map(function (item) {
|
|
13116
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
13117
|
+
billNo: item.tradeNo,
|
|
13118
|
+
billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
13119
|
+
billTag: item.tagName
|
|
13120
|
+
});
|
|
13121
|
+
});
|
|
13122
|
+
showOrderInfo = data === null || data === void 0 ? void 0 : data.trades.map(function (item) {
|
|
13123
|
+
return {
|
|
13124
|
+
billNo: item.tradeNo,
|
|
13125
|
+
billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
13126
|
+
billTag: item.tagName
|
|
13127
|
+
};
|
|
13128
|
+
});
|
|
13129
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type16 = typeMap$1[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.wdtSystemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type17 = typeMap$1[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.wdtSystemOrder]), {}, {
|
|
13130
|
+
showOrderInfo: showOrderInfo,
|
|
13131
|
+
orders: orders
|
|
13132
|
+
}))));
|
|
13133
|
+
}
|
|
13134
|
+
case 6:
|
|
13135
|
+
case "end":
|
|
13136
|
+
return _context.stop();
|
|
13137
|
+
}
|
|
13138
|
+
}, _callee);
|
|
13139
|
+
}));
|
|
13140
|
+
return function getWdtOrderList(_x) {
|
|
13141
|
+
return _ref2.apply(this, arguments);
|
|
13142
|
+
};
|
|
13143
|
+
}();
|
|
13144
|
+
var changeTypeHandle = function changeTypeHandle(val) {
|
|
13145
|
+
var _typeMap$type18, _typeMap$type19;
|
|
13146
|
+
var newValue = _objectSpread2({}, value);
|
|
13147
|
+
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type18 = typeMap$1[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.typeName)] = val;
|
|
13148
|
+
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type19 = typeMap$1[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = [];
|
|
13149
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13150
|
+
valueRef.current = newValue;
|
|
13151
|
+
// if (['2'].includes(val[0])) {
|
|
13152
|
+
// onChange?.(newValue);
|
|
13153
|
+
// valueRef.current = newValue;
|
|
13154
|
+
// }
|
|
13155
|
+
// pubsub.publish(`${typeMap?.[type]?.reissueType}`, {
|
|
13156
|
+
// val: val[0],
|
|
13157
|
+
// goodValue: newValue,
|
|
13158
|
+
// });
|
|
13159
|
+
};
|
|
13160
|
+
|
|
13161
|
+
var changeGoodHandle = function changeGoodHandle(val) {
|
|
13162
|
+
var _typeMap$type20;
|
|
13163
|
+
var newValue = _objectSpread2({}, value);
|
|
13164
|
+
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type20 = typeMap$1[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = (val || []).map(function (item) {
|
|
13165
|
+
var _typeMap$type21, _typeMap$type22;
|
|
13166
|
+
item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type21 = typeMap$1[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.formatDefaultField.money)] = 0;
|
|
13167
|
+
item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type22 = typeMap$1[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.formatDefaultField.share)] = 0;
|
|
13168
|
+
return item;
|
|
13169
|
+
});
|
|
13170
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13171
|
+
};
|
|
13172
|
+
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
13173
|
+
var _typeMap$type23;
|
|
13174
|
+
var newValue = _objectSpread2({}, value);
|
|
13175
|
+
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.wdtSystemOrderNo)] = val;
|
|
13176
|
+
console.log('changeSystemOrderHandle', val, newValue);
|
|
13177
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13178
|
+
};
|
|
13179
|
+
//显示选择商品按钮 原单换不显示选择商品
|
|
13180
|
+
var showChangeBtn = React.useMemo(function () {
|
|
13181
|
+
var _typeMap$type24;
|
|
13182
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.wdtSystemOrderNo]);
|
|
13183
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.wdtSystemOrderNo]]);
|
|
13184
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
13185
|
+
gutter: 8
|
|
13186
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
13187
|
+
className: "gutter-row",
|
|
13188
|
+
span: 6
|
|
13189
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
13190
|
+
style: {
|
|
13191
|
+
marginBottom: '8px'
|
|
13192
|
+
},
|
|
13193
|
+
disabled: disabled,
|
|
13194
|
+
allowClear: false,
|
|
13195
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.wdtSystemOrderNo)],
|
|
13196
|
+
onChange: function onChange(val) {
|
|
13197
|
+
return changeSystemOrderHandle(val);
|
|
13198
|
+
}
|
|
13199
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$w2 = value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.wdtSystemOrder]) === null || _value$typeMap$type$w2 === void 0 ? void 0 : _value$typeMap$type$w2.showOrderInfo) || []).map(function (item) {
|
|
13200
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
13201
|
+
key: item.billNo,
|
|
13202
|
+
value: item.billNo,
|
|
13203
|
+
label: item.billNo
|
|
13204
|
+
}, item.billNo);
|
|
13205
|
+
}))), /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
13206
|
+
className: "gutter-row",
|
|
13207
|
+
span: 6
|
|
13208
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
13209
|
+
style: {
|
|
13210
|
+
marginBottom: '8px'
|
|
13211
|
+
},
|
|
13212
|
+
disabled: disabled,
|
|
13213
|
+
allowClear: false,
|
|
13214
|
+
options: reasonList,
|
|
13215
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.typeName)],
|
|
13216
|
+
onChange: function onChange(val) {
|
|
13217
|
+
return changeTypeHandle(val);
|
|
13218
|
+
}
|
|
13219
|
+
}))), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
13220
|
+
key: 'reissueGoods'
|
|
13221
|
+
}, other), {}, {
|
|
13222
|
+
type: type,
|
|
13223
|
+
disabled: disabled,
|
|
13224
|
+
canUpdateNumber: showChangeBtn,
|
|
13225
|
+
showChangeBtn: showChangeBtn,
|
|
13226
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
13227
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type29 = typeMap$1[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)],
|
|
13228
|
+
onChange: function onChange(val) {
|
|
13229
|
+
return changeGoodHandle(val);
|
|
13230
|
+
}
|
|
13231
|
+
})));
|
|
13232
|
+
};
|
|
13233
|
+
|
|
12969
13234
|
var css_248z$a = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border: 1px solid #F2F3F5;\n margin: 0 10px 10px 0;\n text-align: center;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4E5969;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodMain {\n display: flex;\n flex-wrap: wrap;\n height: 265px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodMain .goodItem {\n width: 140px;\n height: 175px;\n padding: 11px 10px 0;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n margin-bottom: 10px;\n margin-right: 30px;\n border: 1px solid #e6e6e6;\n cursor: pointer;\n transition: border 0.3s;\n}\n.goodMain .goodItem .goodImg {\n width: 120px;\n height: 120px;\n}\n.goodMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodMain .goodItem.active {\n border: 1px solid #3089dc;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n";
|
|
12970
13235
|
styleInject(css_248z$a);
|
|
12971
13236
|
|
|
@@ -13442,12 +13707,12 @@ var Goods$1 = function Goods(props, ref) {
|
|
|
13442
13707
|
};
|
|
13443
13708
|
var index$2 = /*#__PURE__*/React.forwardRef(Goods$1);
|
|
13444
13709
|
|
|
13445
|
-
var _excluded$
|
|
13710
|
+
var _excluded$h = ["onChange", "value", "failValue"];
|
|
13446
13711
|
function CommonStatus(props) {
|
|
13447
13712
|
var onChange = props.onChange,
|
|
13448
13713
|
value = props.value,
|
|
13449
13714
|
failValue = props.failValue,
|
|
13450
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
13715
|
+
other = _objectWithoutProperties(props, _excluded$h);
|
|
13451
13716
|
var changeHandle = function changeHandle(val) {
|
|
13452
13717
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
13453
13718
|
status: val,
|
|
@@ -13519,7 +13784,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
13519
13784
|
changeOrderInfo[type] = val;
|
|
13520
13785
|
var newList = _toConsumableArray(value);
|
|
13521
13786
|
newList[changeIndex] = changeOrderInfo;
|
|
13522
|
-
console.log(newList, val, type);
|
|
13787
|
+
// console.log(newList, val, type);
|
|
13523
13788
|
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
13524
13789
|
};
|
|
13525
13790
|
//判断是否是单个且没有商品数据
|
|
@@ -13566,7 +13831,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
13566
13831
|
})) : null) : null);
|
|
13567
13832
|
};
|
|
13568
13833
|
|
|
13569
|
-
var _excluded$
|
|
13834
|
+
var _excluded$i = ["value", "onChange", "disabled", "failValue", "type"];
|
|
13570
13835
|
var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
13571
13836
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
|
|
13572
13837
|
var _props$value = props.value,
|
|
@@ -13576,7 +13841,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
13576
13841
|
failValue = props.failValue,
|
|
13577
13842
|
_props$type = props.type,
|
|
13578
13843
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
13579
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
13844
|
+
other = _objectWithoutProperties(props, _excluded$i);
|
|
13580
13845
|
var _useState = React.useState(0),
|
|
13581
13846
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13582
13847
|
changeIndex = _useState2[0],
|
|
@@ -13595,7 +13860,6 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
13595
13860
|
}, [1, 2].includes(type) ? /*#__PURE__*/React__default['default'].createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
|
|
13596
13861
|
};
|
|
13597
13862
|
var changeHandle = function changeHandle(val, valType) {
|
|
13598
|
-
console.log(val, valType);
|
|
13599
13863
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
13600
13864
|
changeOrderInfo[valType] = val;
|
|
13601
13865
|
if (val !== failValue) {
|
|
@@ -13643,7 +13907,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
13643
13907
|
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
|
|
13644
13908
|
};
|
|
13645
13909
|
|
|
13646
|
-
var _excluded$
|
|
13910
|
+
var _excluded$j = ["value", "onChange", "disabled", "failValue", "type"];
|
|
13647
13911
|
var msgTypeCh = {
|
|
13648
13912
|
ding: '钉钉',
|
|
13649
13913
|
wechat: '微信',
|
|
@@ -13659,7 +13923,7 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
13659
13923
|
failValue = props.failValue,
|
|
13660
13924
|
_props$type = props.type,
|
|
13661
13925
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
13662
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
13926
|
+
other = _objectWithoutProperties(props, _excluded$j);
|
|
13663
13927
|
var _useState = React.useState(0),
|
|
13664
13928
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13665
13929
|
changeIndex = _useState2[0],
|
|
@@ -13783,4 +14047,5 @@ exports.TBGoodId = TBGoodId;
|
|
|
13783
14047
|
exports.TBGoodSerial = TBGoodSerial;
|
|
13784
14048
|
exports.TradeId = TradeId;
|
|
13785
14049
|
exports.WdtGoodList = WdtGoodList;
|
|
14050
|
+
exports.WdtReissue = wdtReissue;
|
|
13786
14051
|
exports.WlnGoods = WlnGoods;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ export { default as BsReturn } from './bs/Return';
|
|
|
45
45
|
export { default as BsSystemOrder } from './bs/SystemOrder';
|
|
46
46
|
export { default as WlnGoods } from './wln/Goods';
|
|
47
47
|
export { default as CommonGoods } from './common/CommonGoods';
|
|
48
|
+
export { default as WdtReissue } from './wdt/Reissue';
|
|
48
49
|
export { default as GoodsTable } from './common/GoodsTable';
|
|
49
50
|
export { default as CommonStatus } from './common/CommonStatus';
|
|
50
51
|
export { default as CommonSystemOrder } from './common/CommonSystemOrder';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "0.27.1-test.
|
|
3
|
+
"version": "0.27.1-test.4",
|
|
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": "^0.27.1-test.
|
|
23
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.27.1-test.4",
|
|
24
24
|
"ahooks": "^3.7.4",
|
|
25
25
|
"kmkf-monitor": "^0.8.8",
|
|
26
26
|
"lodash": "^4.17.21",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "156d314130701c3e3fd39a375bea1456b569591e"
|
|
68
68
|
}
|