@kmkf-fe-packages/basic-components 2.0.54-beta.1 → 2.0.54-beta.100
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 +1992 -490
- package/dist/index.js +1992 -486
- package/dist/src/apaas/ApaasAddress/index.d.ts +1 -1
- package/dist/src/bs/common/index.d.ts +3 -0
- package/dist/src/bs/component/GoodItem/constants/bsE3ReissueGoodsColumns.d.ts +1 -1
- package/dist/src/bs/component/GoodItem/constants/index.d.ts +5 -0
- package/dist/src/bs/component/GoodItem/constants/wdtReissueGoodsColumns.d.ts +2 -2
- package/dist/src/bs/component/model/Columns/Erp/km.d.ts +27 -0
- package/dist/src/bs/component/model/Columns/useGetColumns.d.ts +2 -2
- package/dist/src/bs/component/model/JstGoodsModal/index.d.ts +2 -10
- package/dist/src/bs/component/model/KmGoodsModal/GoodsList.d.ts +25 -0
- package/dist/src/bs/component/model/KmGoodsModal/index.d.ts +5 -0
- package/dist/src/bs/component/model/type.d.ts +9 -0
- package/dist/src/common/AsyncSelect/index.d.ts +9 -0
- package/dist/src/common/CommonSystemOrder/index.d.ts +2 -1
- package/dist/src/common/Goods/RichItem.d.ts +3 -0
- package/dist/src/common/Goods/goodModel.d.ts +3 -0
- package/dist/src/common/IdentifyAddress/index.d.ts +1 -1
- package/dist/src/constants/columnsBaseInfoMap.d.ts +2 -1
- package/dist/src/constants/index.d.ts +1 -0
- package/dist/src/constants/km.d.ts +3 -0
- package/dist/src/index.d.ts +3 -1
- package/dist/src/jst/Goods/index.d.ts +2 -0
- package/dist/src/km/KmVideo/index.d.ts +20 -0
- package/dist/src/wln/common/index.d.ts +3 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -485,6 +485,57 @@ function _nonIterableSpread() {
|
|
|
485
485
|
function _nonIterableRest() {
|
|
486
486
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
487
487
|
}
|
|
488
|
+
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
489
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
490
|
+
if (!it) {
|
|
491
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
492
|
+
if (it) o = it;
|
|
493
|
+
var i = 0;
|
|
494
|
+
var F = function () {};
|
|
495
|
+
return {
|
|
496
|
+
s: F,
|
|
497
|
+
n: function () {
|
|
498
|
+
if (i >= o.length) return {
|
|
499
|
+
done: true
|
|
500
|
+
};
|
|
501
|
+
return {
|
|
502
|
+
done: false,
|
|
503
|
+
value: o[i++]
|
|
504
|
+
};
|
|
505
|
+
},
|
|
506
|
+
e: function (e) {
|
|
507
|
+
throw e;
|
|
508
|
+
},
|
|
509
|
+
f: F
|
|
510
|
+
};
|
|
511
|
+
}
|
|
512
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
513
|
+
}
|
|
514
|
+
var normalCompletion = true,
|
|
515
|
+
didErr = false,
|
|
516
|
+
err;
|
|
517
|
+
return {
|
|
518
|
+
s: function () {
|
|
519
|
+
it = it.call(o);
|
|
520
|
+
},
|
|
521
|
+
n: function () {
|
|
522
|
+
var step = it.next();
|
|
523
|
+
normalCompletion = step.done;
|
|
524
|
+
return step;
|
|
525
|
+
},
|
|
526
|
+
e: function (e) {
|
|
527
|
+
didErr = true;
|
|
528
|
+
err = e;
|
|
529
|
+
},
|
|
530
|
+
f: function () {
|
|
531
|
+
try {
|
|
532
|
+
if (!normalCompletion && it.return != null) it.return();
|
|
533
|
+
} finally {
|
|
534
|
+
if (didErr) throw err;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
};
|
|
538
|
+
}
|
|
488
539
|
function _toPrimitive(input, hint) {
|
|
489
540
|
if (typeof input !== "object" || input === null) return input;
|
|
490
541
|
var prim = input[Symbol.toPrimitive];
|
|
@@ -7683,7 +7734,8 @@ var Province = function Province(props) {
|
|
|
7683
7734
|
workOrder: kmkfUtils.AddressData.getInstance(),
|
|
7684
7735
|
bs: kmkfUtils.BsAddressData.getInstance(),
|
|
7685
7736
|
wdt: kmkfUtils.WdtAddressData.getInstance(),
|
|
7686
|
-
gy: kmkfUtils.GyAddressData.getInstance()
|
|
7737
|
+
gy: kmkfUtils.GyAddressData.getInstance(),
|
|
7738
|
+
km: kmkfUtils.AddressData.getInstance()
|
|
7687
7739
|
};
|
|
7688
7740
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
7689
7741
|
options: ((_mapping$type = mapping[type]) === null || _mapping$type === void 0 ? void 0 : _mapping$type.addressOptions) || [],
|
|
@@ -7697,8 +7749,7 @@ var Province = function Province(props) {
|
|
|
7697
7749
|
var TextArea$1 = antd.Input.TextArea;
|
|
7698
7750
|
var ParseLogistics = function ParseLogistics(props) {
|
|
7699
7751
|
var onChange = props.onChange,
|
|
7700
|
-
_props$selfCalibratio = props.selfCalibration
|
|
7701
|
-
selfCalibration = _props$selfCalibratio === void 0 ? false : _props$selfCalibratio;
|
|
7752
|
+
_props$selfCalibratio = props.selfCalibration;
|
|
7702
7753
|
var _useState = React.useState(''),
|
|
7703
7754
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7704
7755
|
value = _useState2[0],
|
|
@@ -7707,29 +7758,70 @@ var ParseLogistics = function ParseLogistics(props) {
|
|
|
7707
7758
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
7708
7759
|
isCopy = _useState4[0],
|
|
7709
7760
|
setIsCopy = _useState4[1];
|
|
7710
|
-
var
|
|
7761
|
+
var _useState5 = React.useState(false),
|
|
7762
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
7763
|
+
loading = _useState6[0],
|
|
7764
|
+
setLoading = _useState6[1];
|
|
7765
|
+
var _useState7 = React.useState(false),
|
|
7766
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
7767
|
+
aiLoading = _useState8[0],
|
|
7768
|
+
setAiLoading = _useState8[1];
|
|
7769
|
+
var handleIdentify = function handleIdentify() {
|
|
7770
|
+
var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
7711
7771
|
if (!value && !val) {
|
|
7712
7772
|
return;
|
|
7713
7773
|
}
|
|
7774
|
+
setLoading(true);
|
|
7714
7775
|
var fullAddress = value || val;
|
|
7715
|
-
|
|
7776
|
+
// const needCalibration = selfCalibration && !/1\d{10}/.test(fullAddress);
|
|
7716
7777
|
setIsCopy(false);
|
|
7717
7778
|
kmkfUtils.request({
|
|
7718
7779
|
url: '/qy/logistics/addressAnalysis',
|
|
7719
7780
|
method: 'post',
|
|
7720
7781
|
data: {
|
|
7721
|
-
fullAddress:
|
|
7782
|
+
fullAddress: fullAddress
|
|
7783
|
+
// fullAddress: needCalibration
|
|
7784
|
+
// ? `${fullAddress} 张三 18888888888`
|
|
7785
|
+
// : fullAddress,
|
|
7722
7786
|
}
|
|
7723
7787
|
}).then(function (res) {
|
|
7724
7788
|
var data = res.data;
|
|
7725
7789
|
// 如果是通过内部校准添加的姓名和手机号,则去除
|
|
7726
|
-
if (needCalibration) {
|
|
7727
|
-
|
|
7728
|
-
|
|
7790
|
+
// if (needCalibration) {
|
|
7791
|
+
// data.name = '';
|
|
7792
|
+
// data.phone = '';
|
|
7793
|
+
// }
|
|
7794
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(data);
|
|
7795
|
+
}).catch(function (e) {
|
|
7796
|
+
handleAIIdentify(fullAddress);
|
|
7797
|
+
console.log(e);
|
|
7798
|
+
}).finally(function () {
|
|
7799
|
+
setLoading(false);
|
|
7800
|
+
});
|
|
7801
|
+
};
|
|
7802
|
+
var handleAIIdentify = function handleAIIdentify() {
|
|
7803
|
+
var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
7804
|
+
if (!value && !val) {
|
|
7805
|
+
return;
|
|
7806
|
+
}
|
|
7807
|
+
setAiLoading(true);
|
|
7808
|
+
var fullAddress = value || val;
|
|
7809
|
+
setIsCopy(false);
|
|
7810
|
+
kmkfUtils.request({
|
|
7811
|
+
url: '/qy/logistics/addressAnalysis',
|
|
7812
|
+
method: 'post',
|
|
7813
|
+
data: {
|
|
7814
|
+
fullAddress: fullAddress,
|
|
7815
|
+
isAiParse: true
|
|
7729
7816
|
}
|
|
7817
|
+
}).then(function (res) {
|
|
7818
|
+
var data = res.data;
|
|
7730
7819
|
onChange === null || onChange === void 0 ? void 0 : onChange(data);
|
|
7731
7820
|
}).catch(function (e) {
|
|
7732
7821
|
console.log(e);
|
|
7822
|
+
antd.message.error('识别失败,请输入正确的信息');
|
|
7823
|
+
}).finally(function () {
|
|
7824
|
+
setAiLoading(false);
|
|
7733
7825
|
});
|
|
7734
7826
|
};
|
|
7735
7827
|
var _onKeyDown = function onKeyDown(e) {
|
|
@@ -7756,10 +7848,18 @@ var ParseLogistics = function ParseLogistics(props) {
|
|
|
7756
7848
|
}), /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
7757
7849
|
size: "small",
|
|
7758
7850
|
type: "primary",
|
|
7851
|
+
loading: loading,
|
|
7852
|
+
onClick: function onClick() {
|
|
7853
|
+
return handleIdentify();
|
|
7854
|
+
}
|
|
7855
|
+
}, "\u4E00\u952E\u8BC6\u522B"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
7856
|
+
size: "small",
|
|
7857
|
+
type: "primary",
|
|
7858
|
+
loading: aiLoading,
|
|
7759
7859
|
onClick: function onClick() {
|
|
7760
|
-
return
|
|
7860
|
+
return handleAIIdentify();
|
|
7761
7861
|
}
|
|
7762
|
-
}, "\
|
|
7862
|
+
}, "AI\u8BC6\u522B"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
7763
7863
|
size: "small",
|
|
7764
7864
|
onClick: function onClick() {
|
|
7765
7865
|
return setValue('');
|
|
@@ -7789,6 +7889,7 @@ var IdentifyAddress = function IdentifyAddress(props) {
|
|
|
7789
7889
|
bs: kmkfUtils.BsAddressData,
|
|
7790
7890
|
wdt: kmkfUtils.WdtAddressData,
|
|
7791
7891
|
gy: kmkfUtils.GyAddressData,
|
|
7892
|
+
km: kmkfUtils.AddressData,
|
|
7792
7893
|
workOrder: kmkfUtils.AddressData
|
|
7793
7894
|
}[type] || kmkfUtils.AddressData).getInstance();
|
|
7794
7895
|
if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
|
|
@@ -7962,7 +8063,8 @@ var WidgetMap = {
|
|
|
7962
8063
|
var pageSize = 50;
|
|
7963
8064
|
var SubForm = function SubForm(props) {
|
|
7964
8065
|
var _selectOptions$;
|
|
7965
|
-
var value = props.value,
|
|
8066
|
+
var _props$value = props.value,
|
|
8067
|
+
value = _props$value === void 0 ? [] : _props$value,
|
|
7966
8068
|
onChange = props.onChange,
|
|
7967
8069
|
needFilterShopByPermission = props.needFilterShopByPermission,
|
|
7968
8070
|
_props$subConfig = props.subConfig,
|
|
@@ -8091,17 +8193,16 @@ var SubForm = function SubForm(props) {
|
|
|
8091
8193
|
return [{
|
|
8092
8194
|
dataIndex: 'index',
|
|
8093
8195
|
title: '序号',
|
|
8196
|
+
fixed: 'left',
|
|
8197
|
+
width: 20,
|
|
8094
8198
|
render: function render(val, record, index) {
|
|
8095
|
-
return
|
|
8096
|
-
style: {
|
|
8097
|
-
width: 25
|
|
8098
|
-
}
|
|
8099
|
-
}, index + 1);
|
|
8199
|
+
return index + 1;
|
|
8100
8200
|
}
|
|
8101
8201
|
}].concat(_toConsumableArray(newTableHeader.map(function (t) {
|
|
8102
8202
|
return {
|
|
8103
8203
|
dataIndex: t.key,
|
|
8104
|
-
title: t.name
|
|
8204
|
+
title: t.name,
|
|
8205
|
+
width: 90
|
|
8105
8206
|
};
|
|
8106
8207
|
})));
|
|
8107
8208
|
}, [newTableHeader]);
|
|
@@ -8264,7 +8365,7 @@ var SubForm = function SubForm(props) {
|
|
|
8264
8365
|
}
|
|
8265
8366
|
});
|
|
8266
8367
|
}
|
|
8267
|
-
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), [_objectSpread2(_objectSpread2({}, newValue), {}, {
|
|
8368
|
+
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value || []), [_objectSpread2(_objectSpread2({}, newValue), {}, {
|
|
8268
8369
|
uuid: kmkfUtils.uuid()
|
|
8269
8370
|
})]));
|
|
8270
8371
|
};
|
|
@@ -8289,7 +8390,7 @@ var SubForm = function SubForm(props) {
|
|
|
8289
8390
|
onScrollCapture: onScrollCapture,
|
|
8290
8391
|
style: {
|
|
8291
8392
|
height: 320,
|
|
8292
|
-
maxWidth: platform !== 'pc' ? '325px' : '
|
|
8393
|
+
maxWidth: platform !== 'pc' ? '325px' : '700px',
|
|
8293
8394
|
overflowY: 'scroll',
|
|
8294
8395
|
overflowX: 'auto'
|
|
8295
8396
|
}
|
|
@@ -8300,7 +8401,7 @@ var SubForm = function SubForm(props) {
|
|
|
8300
8401
|
size: "small",
|
|
8301
8402
|
pagination: false,
|
|
8302
8403
|
scroll: {
|
|
8303
|
-
x: '
|
|
8404
|
+
x: 'max-content'
|
|
8304
8405
|
},
|
|
8305
8406
|
locale: {
|
|
8306
8407
|
emptyText: '暂无数据'
|
|
@@ -8673,7 +8774,9 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8673
8774
|
changeSku = props.changeSku,
|
|
8674
8775
|
width = props.width,
|
|
8675
8776
|
_props$numIidType = props.numIidType,
|
|
8676
|
-
numIidType = _props$numIidType === void 0 ? 'string' : _props$numIidType
|
|
8777
|
+
numIidType = _props$numIidType === void 0 ? 'string' : _props$numIidType,
|
|
8778
|
+
form = props.form,
|
|
8779
|
+
isPriorityDisplayOfOrderNo = props.isPriorityDisplayOfOrderNo;
|
|
8677
8780
|
var _useState = React.useState([]),
|
|
8678
8781
|
_useState2 = _slicedToArray(_useState, 2),
|
|
8679
8782
|
selectList = _useState2[0],
|
|
@@ -8686,10 +8789,14 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8686
8789
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
8687
8790
|
goodList = _useState6[0],
|
|
8688
8791
|
setGoodList = _useState6[1];
|
|
8689
|
-
var _useState7 = React.useState(
|
|
8792
|
+
var _useState7 = React.useState([]),
|
|
8690
8793
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
8691
|
-
|
|
8692
|
-
|
|
8794
|
+
orderNoItems = _useState8[0],
|
|
8795
|
+
setOrderNoItems = _useState8[1];
|
|
8796
|
+
var _useState9 = React.useState(false),
|
|
8797
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
8798
|
+
loading = _useState10[0],
|
|
8799
|
+
setLoading = _useState10[1];
|
|
8693
8800
|
var transformIdType = function transformIdType(id) {
|
|
8694
8801
|
if (!['string', 'number'].includes(_typeof(id))) return id;
|
|
8695
8802
|
return numIidType === 'string' ? id + '' : +id;
|
|
@@ -8709,7 +8816,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8709
8816
|
var handleSetGoodList = function handleSetGoodList(list) {
|
|
8710
8817
|
return setGoodList(list.map(transformType));
|
|
8711
8818
|
};
|
|
8712
|
-
var
|
|
8819
|
+
var _useState11 = React.useState({
|
|
8713
8820
|
apiName: 'queryItems',
|
|
8714
8821
|
desc: true,
|
|
8715
8822
|
numIids: '',
|
|
@@ -8721,30 +8828,30 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8721
8828
|
cids: '',
|
|
8722
8829
|
title: ''
|
|
8723
8830
|
}),
|
|
8724
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
8725
|
-
searchParams = _useState10[0],
|
|
8726
|
-
setSearch = _useState10[1];
|
|
8727
|
-
var _useState11 = React.useState(0),
|
|
8728
8831
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
8729
|
-
|
|
8730
|
-
|
|
8731
|
-
var _useState13 = React.useState(
|
|
8832
|
+
searchParams = _useState12[0],
|
|
8833
|
+
setSearch = _useState12[1];
|
|
8834
|
+
var _useState13 = React.useState(0),
|
|
8732
8835
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
8733
|
-
|
|
8734
|
-
|
|
8735
|
-
var _useState15 = React.useState(
|
|
8836
|
+
total = _useState14[0],
|
|
8837
|
+
setTotal = _useState14[1];
|
|
8838
|
+
var _useState15 = React.useState(''),
|
|
8736
8839
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
8737
|
-
|
|
8738
|
-
|
|
8739
|
-
var _useState17 = React.useState(
|
|
8840
|
+
platform = _useState16[0],
|
|
8841
|
+
setPlatform = _useState16[1]; //平台 taobao=淘宝 fxg=抖音 pdd=拼多多 sph=微信视屏号
|
|
8842
|
+
var _useState17 = React.useState({}),
|
|
8740
8843
|
_useState18 = _slicedToArray(_useState17, 2),
|
|
8741
|
-
|
|
8742
|
-
|
|
8743
|
-
var _useState19 = React.useState(
|
|
8844
|
+
shopInfo = _useState18[0],
|
|
8845
|
+
setShopInfo = _useState18[1]; //店铺信息
|
|
8846
|
+
var _useState19 = React.useState(true),
|
|
8744
8847
|
_useState20 = _slicedToArray(_useState19, 2),
|
|
8745
|
-
|
|
8746
|
-
|
|
8747
|
-
var _useState21 = React.useState([
|
|
8848
|
+
canSearch = _useState20[0],
|
|
8849
|
+
setCanSearch = _useState20[1];
|
|
8850
|
+
var _useState21 = React.useState([null]),
|
|
8851
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
|
8852
|
+
nextKeyList = _useState22[0],
|
|
8853
|
+
setNextKeyList = _useState22[1];
|
|
8854
|
+
var _useState23 = React.useState([{
|
|
8748
8855
|
tab: '出售中',
|
|
8749
8856
|
key: 'onSale'
|
|
8750
8857
|
}, {
|
|
@@ -8754,10 +8861,10 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8754
8861
|
tab: '已选择',
|
|
8755
8862
|
key: 'select'
|
|
8756
8863
|
}]),
|
|
8757
|
-
|
|
8758
|
-
tabs =
|
|
8759
|
-
setTabs =
|
|
8760
|
-
var
|
|
8864
|
+
_useState24 = _slicedToArray(_useState23, 2),
|
|
8865
|
+
tabs = _useState24[0],
|
|
8866
|
+
setTabs = _useState24[1];
|
|
8867
|
+
var _useState25 = React.useState([{
|
|
8761
8868
|
name: '上架时间',
|
|
8762
8869
|
value: 'list_time'
|
|
8763
8870
|
}, {
|
|
@@ -8767,13 +8874,13 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8767
8874
|
name: '按价格',
|
|
8768
8875
|
value: 'price'
|
|
8769
8876
|
}]),
|
|
8770
|
-
|
|
8771
|
-
goodSort =
|
|
8877
|
+
_useState26 = _slicedToArray(_useState25, 1),
|
|
8878
|
+
goodSort = _useState26[0];
|
|
8772
8879
|
//宝贝分类
|
|
8773
|
-
var
|
|
8774
|
-
|
|
8775
|
-
shell =
|
|
8776
|
-
setShell =
|
|
8880
|
+
var _useState27 = React.useState([]),
|
|
8881
|
+
_useState28 = _slicedToArray(_useState27, 2),
|
|
8882
|
+
shell = _useState28[0],
|
|
8883
|
+
setShell = _useState28[1];
|
|
8777
8884
|
var clickOrder = function clickOrder(sort) {
|
|
8778
8885
|
if (sort.value === searchParams.orderBy) {
|
|
8779
8886
|
setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
|
|
@@ -9046,8 +9153,112 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9046
9153
|
}
|
|
9047
9154
|
}, [platform]);
|
|
9048
9155
|
React.useEffect(function () {
|
|
9049
|
-
platform && canSearch
|
|
9156
|
+
if (platform && canSearch) {
|
|
9157
|
+
if (searchParams.type === 'orderProduct') {
|
|
9158
|
+
getOrderProductItem(searchParams);
|
|
9159
|
+
} else {
|
|
9160
|
+
getItem(searchParams, platform);
|
|
9161
|
+
}
|
|
9162
|
+
}
|
|
9050
9163
|
}, [searchParams, platform]);
|
|
9164
|
+
React.useEffect(function () {
|
|
9165
|
+
if (visible && platform !== 'fxg') {
|
|
9166
|
+
var val = (form === null || form === void 0 ? void 0 : form.getFieldsValue()) || {};
|
|
9167
|
+
var orderNo = val['m3ap1EvEyd'];
|
|
9168
|
+
if (orderNo) {
|
|
9169
|
+
setTabs(function (prev) {
|
|
9170
|
+
return lodash.uniqBy([{
|
|
9171
|
+
tab: '订单商品',
|
|
9172
|
+
key: 'orderProduct'
|
|
9173
|
+
}].concat(_toConsumableArray(prev)), 'key');
|
|
9174
|
+
});
|
|
9175
|
+
if (isPriorityDisplayOfOrderNo) {
|
|
9176
|
+
setSearch(function (prev) {
|
|
9177
|
+
return _objectSpread2(_objectSpread2({}, prev), {}, {
|
|
9178
|
+
type: 'orderProduct'
|
|
9179
|
+
});
|
|
9180
|
+
});
|
|
9181
|
+
}
|
|
9182
|
+
}
|
|
9183
|
+
}
|
|
9184
|
+
if (!visible) {
|
|
9185
|
+
setOrderNoItems([]);
|
|
9186
|
+
}
|
|
9187
|
+
}, [visible]);
|
|
9188
|
+
var getOrderProductItem = /*#__PURE__*/function () {
|
|
9189
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
|
|
9190
|
+
var val, orderNo, shopId, res, items, totalCount, pageNo, pageSize, _pageNo, _pageSize, title, _items;
|
|
9191
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
9192
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
9193
|
+
case 0:
|
|
9194
|
+
val = (form === null || form === void 0 ? void 0 : form.getFieldsValue()) || {};
|
|
9195
|
+
orderNo = val.m3ap1EvEyd, shopId = val.shopId;
|
|
9196
|
+
if (orderNo) {
|
|
9197
|
+
_context2.next = 4;
|
|
9198
|
+
break;
|
|
9199
|
+
}
|
|
9200
|
+
return _context2.abrupt("return", handleSetGoodList([]));
|
|
9201
|
+
case 4:
|
|
9202
|
+
if (orderNoItems.length) {
|
|
9203
|
+
_context2.next = 20;
|
|
9204
|
+
break;
|
|
9205
|
+
}
|
|
9206
|
+
_context2.prev = 5;
|
|
9207
|
+
setLoading(true);
|
|
9208
|
+
_context2.next = 9;
|
|
9209
|
+
return kmkfUtils.servers.orderDetail({
|
|
9210
|
+
shopId: shopId,
|
|
9211
|
+
orderNo: orderNo
|
|
9212
|
+
});
|
|
9213
|
+
case 9:
|
|
9214
|
+
res = _context2.sent;
|
|
9215
|
+
if (res.success) {
|
|
9216
|
+
_context2.next = 14;
|
|
9217
|
+
break;
|
|
9218
|
+
}
|
|
9219
|
+
handleSetGoodList([]);
|
|
9220
|
+
antd.message.warn(res.message);
|
|
9221
|
+
return _context2.abrupt("return");
|
|
9222
|
+
case 14:
|
|
9223
|
+
if (res.data && res.data.itemList && res.data.itemList.length) {
|
|
9224
|
+
items = res.data.itemList;
|
|
9225
|
+
totalCount = items.length;
|
|
9226
|
+
items.forEach(function (item) {
|
|
9227
|
+
item.platform = platform;
|
|
9228
|
+
});
|
|
9229
|
+
setOrderNoItems(items);
|
|
9230
|
+
pageNo = params.pageNo, pageSize = params.pageSize;
|
|
9231
|
+
handleSetGoodList(_toConsumableArray(items.slice((pageNo - 1) * pageSize, pageNo * pageSize)));
|
|
9232
|
+
setTotal(totalCount);
|
|
9233
|
+
}
|
|
9234
|
+
case 15:
|
|
9235
|
+
_context2.prev = 15;
|
|
9236
|
+
setLoading(false);
|
|
9237
|
+
return _context2.finish(15);
|
|
9238
|
+
case 18:
|
|
9239
|
+
_context2.next = 26;
|
|
9240
|
+
break;
|
|
9241
|
+
case 20:
|
|
9242
|
+
_pageNo = params.pageNo, _pageSize = params.pageSize;
|
|
9243
|
+
title = params.title;
|
|
9244
|
+
if (platform !== 'taobao') {
|
|
9245
|
+
title = params.numIids;
|
|
9246
|
+
}
|
|
9247
|
+
_items = title ? orderNoItems.filter(function (item) {
|
|
9248
|
+
return item.title.includes(title.trim());
|
|
9249
|
+
}) : orderNoItems;
|
|
9250
|
+
handleSetGoodList(_toConsumableArray(_items.slice((_pageNo - 1) * _pageSize, _pageNo * _pageSize)));
|
|
9251
|
+
setTotal(_items.length);
|
|
9252
|
+
case 26:
|
|
9253
|
+
case "end":
|
|
9254
|
+
return _context2.stop();
|
|
9255
|
+
}
|
|
9256
|
+
}, _callee2, null, [[5,, 15, 18]]);
|
|
9257
|
+
}));
|
|
9258
|
+
return function getOrderProductItem(_x2) {
|
|
9259
|
+
return _ref4.apply(this, arguments);
|
|
9260
|
+
};
|
|
9261
|
+
}();
|
|
9051
9262
|
return /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
9052
9263
|
title: '选择宝贝',
|
|
9053
9264
|
okText: '确认',
|
|
@@ -9081,7 +9292,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9081
9292
|
style: {
|
|
9082
9293
|
display: searchParams.type === 'select' ? 'none' : ''
|
|
9083
9294
|
}
|
|
9084
|
-
}, platform === 'taobao' && /*#__PURE__*/React__default['default'].createElement(antd.Radio.Group, {
|
|
9295
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", null, platform === 'taobao' && searchParams.type !== 'orderProduct' && /*#__PURE__*/React__default['default'].createElement(antd.Radio.Group, {
|
|
9085
9296
|
value: searchParams.orderBy,
|
|
9086
9297
|
onChange: function onChange(e) {
|
|
9087
9298
|
setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
|
|
@@ -9097,7 +9308,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9097
9308
|
},
|
|
9098
9309
|
key: sort.value
|
|
9099
9310
|
}, sort.name, sort.value === searchParams.orderBy ? searchParams.desc ? /*#__PURE__*/React__default['default'].createElement("span", null, "\u21BE") : /*#__PURE__*/React__default['default'].createElement("span", null, "\u21C2") : /*#__PURE__*/React__default['default'].createElement("span", null, "\u21C5"));
|
|
9100
|
-
})), /*#__PURE__*/React__default['default'].createElement("div", null, platform === 'taobao' && /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
9311
|
+
}))), /*#__PURE__*/React__default['default'].createElement("div", null, platform === 'taobao' && searchParams.type !== 'orderProduct' && /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
9101
9312
|
className: "classify",
|
|
9102
9313
|
value: searchParams.cids,
|
|
9103
9314
|
onChange: function onChange(value) {
|
|
@@ -9112,7 +9323,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9112
9323
|
key: item.value
|
|
9113
9324
|
}, item.label);
|
|
9114
9325
|
})), /*#__PURE__*/React__default['default'].createElement(Search, {
|
|
9115
|
-
placeholder: platform === 'taobao' ? '宝贝链接,标题' : '商品ID',
|
|
9326
|
+
placeholder: searchParams.type !== 'orderProduct' ? platform === 'taobao' ? '宝贝链接,标题' : '商品ID' : '宝贝标题',
|
|
9116
9327
|
// enterButton="搜索"
|
|
9117
9328
|
className: "search",
|
|
9118
9329
|
value: platform === 'taobao' ? searchParams.title : searchParams.numIids,
|
|
@@ -9735,7 +9946,9 @@ var GoodItem = function GoodItem(props) {
|
|
|
9735
9946
|
userNick = props.userNick,
|
|
9736
9947
|
disabled = props.disabled,
|
|
9737
9948
|
changeSku = props.changeSku,
|
|
9738
|
-
width = props.width
|
|
9949
|
+
width = props.width,
|
|
9950
|
+
form = props.form,
|
|
9951
|
+
isPriorityDisplayOfOrderNo = props.isPriorityDisplayOfOrderNo;
|
|
9739
9952
|
var shopId = value.shopId,
|
|
9740
9953
|
imgList = value.imgList;
|
|
9741
9954
|
var _useState = React.useState(false),
|
|
@@ -9826,7 +10039,7 @@ var GoodItem = function GoodItem(props) {
|
|
|
9826
10039
|
var onSubmit = /*#__PURE__*/function () {
|
|
9827
10040
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(list) {
|
|
9828
10041
|
var _list$;
|
|
9829
|
-
var newList, newImgList;
|
|
10042
|
+
var newList, newImgList, _list$2;
|
|
9830
10043
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
9831
10044
|
while (1) switch (_context2.prev = _context2.next) {
|
|
9832
10045
|
case 0:
|
|
@@ -9848,7 +10061,11 @@ var GoodItem = function GoodItem(props) {
|
|
|
9848
10061
|
// if (type === 1) {
|
|
9849
10062
|
// params.outerId = item.outerId; //编码
|
|
9850
10063
|
// }
|
|
9851
|
-
|
|
10064
|
+
//返填商品属性 && 为订单商品
|
|
10065
|
+
if (changeSku && item.skuInfoDTO) {
|
|
10066
|
+
params.outerSkuId = item.skuInfoDTO.outerSkuId;
|
|
10067
|
+
params.propertiesName = item.skuInfoDTO.propertiesName;
|
|
10068
|
+
} else if (changeSku) {
|
|
9852
10069
|
params.propertiesName = '';
|
|
9853
10070
|
}
|
|
9854
10071
|
// if (type === 4) {
|
|
@@ -9867,7 +10084,9 @@ var GoodItem = function GoodItem(props) {
|
|
|
9867
10084
|
imgList: newImgList
|
|
9868
10085
|
});
|
|
9869
10086
|
setVisible(false);
|
|
9870
|
-
|
|
10087
|
+
if (!(list === null || list === void 0 ? void 0 : (_list$ = list[0]) === null || _list$ === void 0 ? void 0 : _list$.skuInfoDTO)) {
|
|
10088
|
+
checkSkus(list === null || list === void 0 ? void 0 : (_list$2 = list[0]) === null || _list$2 === void 0 ? void 0 : _list$2.numIid, newImgList.length - 1);
|
|
10089
|
+
}
|
|
9871
10090
|
case 5:
|
|
9872
10091
|
case "end":
|
|
9873
10092
|
return _context2.stop();
|
|
@@ -10124,6 +10343,8 @@ var GoodItem = function GoodItem(props) {
|
|
|
10124
10343
|
shopId: shopId,
|
|
10125
10344
|
maxLength: maxLength,
|
|
10126
10345
|
changeSku: changeSku,
|
|
10346
|
+
form: form,
|
|
10347
|
+
isPriorityDisplayOfOrderNo: isPriorityDisplayOfOrderNo,
|
|
10127
10348
|
onCancel: function onCancel() {
|
|
10128
10349
|
setVisible(false);
|
|
10129
10350
|
}
|
|
@@ -10922,7 +11143,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10922
11143
|
}
|
|
10923
11144
|
})), /*#__PURE__*/React__default['default'].createElement(Item, {
|
|
10924
11145
|
label: '发件人手机号',
|
|
10925
|
-
required
|
|
11146
|
+
// required={true}
|
|
10926
11147
|
key: 'interceptSenderMobile',
|
|
10927
11148
|
hidden: !showSenderMobile
|
|
10928
11149
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
@@ -10951,7 +11172,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10951
11172
|
value: item.uk
|
|
10952
11173
|
}, "".concat(address.getNameByCode(item === null || item === void 0 ? void 0 : item.province) || '').concat(address.getNameByCode(item === null || item === void 0 ? void 0 : item.city) || '').concat(address.getNameByCode(item === null || item === void 0 ? void 0 : item.district) || '').concat(item.detail, " ").concat(item === null || item === void 0 ? void 0 : item.userName, ":").concat(item === null || item === void 0 ? void 0 : item.mobile));
|
|
10953
11174
|
}))), /*#__PURE__*/React__default['default'].createElement(Item, {
|
|
10954
|
-
label: '
|
|
11175
|
+
label: '修改后派送地址',
|
|
10955
11176
|
required: true,
|
|
10956
11177
|
key: 'newAddress',
|
|
10957
11178
|
hidden: !showNewAddress
|
|
@@ -11102,7 +11323,11 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11102
11323
|
_props$value = props.value,
|
|
11103
11324
|
value = _props$value === void 0 ? {} : _props$value,
|
|
11104
11325
|
disabled = props.disabled,
|
|
11105
|
-
onChange = props.onChange
|
|
11326
|
+
onChange = props.onChange,
|
|
11327
|
+
_props$isSingle = props.isSingle,
|
|
11328
|
+
isSingle = _props$isSingle === void 0 ? true : _props$isSingle,
|
|
11329
|
+
_props$trajectoryApiS = props.trajectoryApiStatus,
|
|
11330
|
+
trajectoryApiStatus = _props$trajectoryApiS === void 0 ? false : _props$trajectoryApiS;
|
|
11106
11331
|
var handleInputChange = function handleInputChange(e, type) {
|
|
11107
11332
|
var val = e.target.value;
|
|
11108
11333
|
typeof onChange === 'function' && onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val)));
|
|
@@ -11113,13 +11338,23 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11113
11338
|
}));
|
|
11114
11339
|
handleSearchSnapshot(val);
|
|
11115
11340
|
};
|
|
11341
|
+
var handleStatusChange = function handleStatusChange(val) {
|
|
11342
|
+
var _value$trajectoryApiS;
|
|
11343
|
+
var newVal = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
11344
|
+
trajectoryApiStatus: {
|
|
11345
|
+
status: val,
|
|
11346
|
+
reason: (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS = value.trajectoryApiStatus) === null || _value$trajectoryApiS === void 0 ? void 0 : _value$trajectoryApiS.reason) || ''
|
|
11347
|
+
}
|
|
11348
|
+
});
|
|
11349
|
+
onChange(newVal);
|
|
11350
|
+
};
|
|
11116
11351
|
var handleSearchSnapshot = function handleSearchSnapshot(company) {
|
|
11117
11352
|
var trajectoryCompany = value.trajectoryCompany,
|
|
11118
11353
|
trajectoryCode = value.trajectoryCode,
|
|
11119
11354
|
trajectoryPhone = value.trajectoryPhone;
|
|
11120
11355
|
var newCompany = company ? company : trajectoryCompany;
|
|
11121
11356
|
//不展示拦截状态不请求
|
|
11122
|
-
if (!(showField && showField.includes('snapshot'))) {
|
|
11357
|
+
if (!(showField && showField.includes('snapshot')) && !trajectoryApiStatus) {
|
|
11123
11358
|
return;
|
|
11124
11359
|
}
|
|
11125
11360
|
if (disabled) {
|
|
@@ -11144,13 +11379,19 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11144
11379
|
data = res.data,
|
|
11145
11380
|
msg = res.message;
|
|
11146
11381
|
if (result === 100 || success) {
|
|
11147
|
-
|
|
11148
|
-
trajectorySnapshot: data === null || data === void 0 ? void 0 : data.logisticsStatusDesc,
|
|
11382
|
+
var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
11149
11383
|
trajectoryCompany: newCompany
|
|
11150
|
-
})
|
|
11384
|
+
});
|
|
11385
|
+
if (trajectoryApiStatus) newValue.trajectoryApiStatus = data === null || data === void 0 ? void 0 : data.apiStatusObject;
|
|
11386
|
+
if (showField && showField.includes('snapshot')) newValue.trajectorySnapshot = data === null || data === void 0 ? void 0 : data.logisticsStatusDesc;
|
|
11387
|
+
onChange(newValue);
|
|
11151
11388
|
} else {
|
|
11152
11389
|
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11153
11390
|
trajectorySnapshot: '',
|
|
11391
|
+
trajectoryApiStatus: {
|
|
11392
|
+
reason: '',
|
|
11393
|
+
status: ''
|
|
11394
|
+
},
|
|
11154
11395
|
trajectoryCompany: newCompany
|
|
11155
11396
|
}));
|
|
11156
11397
|
msg && antd.message.error(msg);
|
|
@@ -11159,6 +11400,10 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11159
11400
|
} catch (err) {
|
|
11160
11401
|
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11161
11402
|
trajectorySnapshot: '',
|
|
11403
|
+
trajectoryApiStatus: {
|
|
11404
|
+
reason: '',
|
|
11405
|
+
status: ''
|
|
11406
|
+
},
|
|
11162
11407
|
trajectoryCompany: newCompany
|
|
11163
11408
|
}));
|
|
11164
11409
|
(err === null || err === void 0 ? void 0 : err.message) && antd.message.error(err === null || err === void 0 ? void 0 : err.message);
|
|
@@ -11212,6 +11457,31 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11212
11457
|
}
|
|
11213
11458
|
});
|
|
11214
11459
|
};
|
|
11460
|
+
// 接口状态
|
|
11461
|
+
var LogisticsApiStatus = function LogisticsApiStatus() {
|
|
11462
|
+
var _value$trajectoryApiS2, _value$trajectoryApiS3, _value$trajectoryApiS4;
|
|
11463
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
11464
|
+
value: (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS2 = value.trajectoryApiStatus) === null || _value$trajectoryApiS2 === void 0 ? void 0 : _value$trajectoryApiS2.status) || null,
|
|
11465
|
+
disabled: true,
|
|
11466
|
+
style: {
|
|
11467
|
+
width: '100%',
|
|
11468
|
+
marginTop: '8px'
|
|
11469
|
+
},
|
|
11470
|
+
placeholder: "\u63A5\u53E3\u72B6\u6001",
|
|
11471
|
+
onChange: handleStatusChange,
|
|
11472
|
+
options: [{
|
|
11473
|
+
label: '成功',
|
|
11474
|
+
value: '成功'
|
|
11475
|
+
}, {
|
|
11476
|
+
label: '失败',
|
|
11477
|
+
value: '失败'
|
|
11478
|
+
}]
|
|
11479
|
+
}), (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS3 = value.trajectoryApiStatus) === null || _value$trajectoryApiS3 === void 0 ? void 0 : _value$trajectoryApiS3.reason) ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11480
|
+
style: {
|
|
11481
|
+
color: 'red'
|
|
11482
|
+
}
|
|
11483
|
+
}, "\u5931\u8D25\u539F\u56E0\uFF1A", value === null || value === void 0 ? void 0 : (_value$trajectoryApiS4 = value.trajectoryApiStatus) === null || _value$trajectoryApiS4 === void 0 ? void 0 : _value$trajectoryApiS4.reason) : null);
|
|
11484
|
+
};
|
|
11215
11485
|
//物流快照
|
|
11216
11486
|
var LogisticsSnapshot = function LogisticsSnapshot() {
|
|
11217
11487
|
return /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
@@ -11226,7 +11496,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11226
11496
|
value: value === null || value === void 0 ? void 0 : value.trajectorySnapshot
|
|
11227
11497
|
});
|
|
11228
11498
|
};
|
|
11229
|
-
return /*#__PURE__*/React__default['default'].createElement("div", null, LogisticsCompany(), LogisticsCode(), (value === null || value === void 0 ? void 0 : value.trajectoryCompany) === 'SF' ? LogisticsPhone() : null, showField && showField.includes('snapshot') ? /*#__PURE__*/React__default['default'].createElement(LogisticsSnapshot, null) : null);
|
|
11499
|
+
return /*#__PURE__*/React__default['default'].createElement("div", null, LogisticsCompany(), LogisticsCode(), (value === null || value === void 0 ? void 0 : value.trajectoryCompany) === 'SF' ? LogisticsPhone() : null, trajectoryApiStatus && isSingle && LogisticsApiStatus(), showField && showField.includes('snapshot') ? /*#__PURE__*/React__default['default'].createElement(LogisticsSnapshot, null) : null);
|
|
11230
11500
|
};
|
|
11231
11501
|
|
|
11232
11502
|
var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
|
|
@@ -11439,7 +11709,8 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
|
|
|
11439
11709
|
disabled: disabled,
|
|
11440
11710
|
onChange: function onChange(val) {
|
|
11441
11711
|
return handleChange(val, changeIndex);
|
|
11442
|
-
}
|
|
11712
|
+
},
|
|
11713
|
+
isSingle: false
|
|
11443
11714
|
}));
|
|
11444
11715
|
};
|
|
11445
11716
|
|
|
@@ -11462,7 +11733,7 @@ var typeInitValueMap = {
|
|
|
11462
11733
|
}]
|
|
11463
11734
|
};
|
|
11464
11735
|
var jstGoods = function jstGoods(props) {
|
|
11465
|
-
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8, _value$changeIndex9;
|
|
11736
|
+
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8, _value$changeIndex9, _value$changeIndex10, _value$changeIndex11, _value$changeIndex12;
|
|
11466
11737
|
var _props$value = props.value,
|
|
11467
11738
|
value = _props$value === void 0 ? [] : _props$value,
|
|
11468
11739
|
onChange = props.onChange,
|
|
@@ -11480,8 +11751,8 @@ var jstGoods = function jstGoods(props) {
|
|
|
11480
11751
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
11481
11752
|
var sendOptions = kmkfUtils.SendDataCenter.getInstance(platformType).getSendData();
|
|
11482
11753
|
var isSelectName = ['wdt', 'bsE3', 'km', 'gy', 'jst'].includes(platformType);
|
|
11754
|
+
var expressDateInstance = kmkfUtils.ExpressData.getInstance(platformType);
|
|
11483
11755
|
var isSendGoodSavedId = isSelectName && !['jst'].includes(platformType);
|
|
11484
|
-
var logisticsType = type === 1 && platformType === 'gy' ? 'input' : 'select';
|
|
11485
11756
|
React.useEffect(function () {
|
|
11486
11757
|
//没有值塞个默认值
|
|
11487
11758
|
if (!(value === null || value === void 0 ? void 0 : value.length) && type !== 1) {
|
|
@@ -11564,59 +11835,51 @@ var jstGoods = function jstGoods(props) {
|
|
|
11564
11835
|
return setChangeIndex(index);
|
|
11565
11836
|
}
|
|
11566
11837
|
}, "\u5305\u88F9".concat(index + 1)));
|
|
11567
|
-
}))) : null, value.length || type === 1 ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, type === 1 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React__default['default'].createElement(ApaasLogistics,
|
|
11568
|
-
type: logisticsType,
|
|
11838
|
+
}))) : null, value.length || type === 1 ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, type === 1 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React__default['default'].createElement(ApaasLogistics, {
|
|
11569
11839
|
disabled: disabled,
|
|
11570
11840
|
placeholder: "\u7269\u6D41\u516C\u53F8",
|
|
11571
11841
|
onChange: function onChange(val) {
|
|
11572
|
-
|
|
11573
|
-
changeInputHandle(null, 'logisticsCompany');
|
|
11574
|
-
changeInputHandle(val, 'logisticsCompanyName');
|
|
11575
|
-
} else {
|
|
11576
|
-
changeInputHandle(val, 'logisticsCompany');
|
|
11577
|
-
}
|
|
11842
|
+
changeInputHandle(val, 'logisticsCompany');
|
|
11578
11843
|
},
|
|
11579
|
-
value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex[
|
|
11580
|
-
}, logisticsType === 'input' ? {} : {
|
|
11844
|
+
value: platformType === 'gy' ? expressDateInstance.getExpressNameByCode((_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex['logisticsCompany'], false) ? (_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2['logisticsCompany'] : (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3['logisticsCompanyName'] : (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4['logisticsCompany'],
|
|
11581
11845
|
showSearch: true,
|
|
11582
11846
|
dropdownMatchSelectWidth: false,
|
|
11583
11847
|
filterOption: function filterOption(input, option) {
|
|
11584
11848
|
return option.label.includes(input);
|
|
11585
|
-
}
|
|
11586
|
-
}), {}, {
|
|
11849
|
+
},
|
|
11587
11850
|
style: {
|
|
11588
11851
|
minWidth: '100px',
|
|
11589
11852
|
maxWidth: '180px'
|
|
11590
11853
|
},
|
|
11591
11854
|
platformType: platformType
|
|
11592
|
-
})
|
|
11855
|
+
}) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11593
11856
|
disabled: disabled,
|
|
11594
11857
|
placeholder: "\u7269\u6D41\u5355\u53F7",
|
|
11595
11858
|
onChange: function onChange(e) {
|
|
11596
11859
|
return changeInputHandle(e.target.value, 'logisticsCode');
|
|
11597
11860
|
},
|
|
11598
|
-
value: (_value$
|
|
11861
|
+
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.logisticsCode
|
|
11599
11862
|
}) : null) : null, type === 2 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, ['supplyId', 'all'].includes(showField) && /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11600
11863
|
disabled: disabled,
|
|
11601
11864
|
placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u7F16\u7801",
|
|
11602
11865
|
onChange: function onChange(e) {
|
|
11603
11866
|
return changeInputHandle(e.target.value, 'supplyId');
|
|
11604
11867
|
},
|
|
11605
|
-
value: (_value$
|
|
11868
|
+
value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.supplyId
|
|
11606
11869
|
}), ['supplyName', 'all'].includes(showField) && /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11607
11870
|
disabled: disabled,
|
|
11608
11871
|
placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u540D\u79F0",
|
|
11609
11872
|
onChange: function onChange(e) {
|
|
11610
11873
|
return changeInputHandle(e.target.value, 'supplyName');
|
|
11611
11874
|
},
|
|
11612
|
-
value: (_value$
|
|
11875
|
+
value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.supplyName
|
|
11613
11876
|
})) : null, type === 3 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, ['sendId', 'all'].includes(showField) && /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11614
11877
|
disabled: disabled,
|
|
11615
11878
|
placeholder: "\u8BF7\u8F93\u5165\u53D1\u8D27\u4ED3\u7F16\u7801",
|
|
11616
11879
|
onChange: function onChange(e) {
|
|
11617
11880
|
return changeInputHandle(e.target.value, 'sendId');
|
|
11618
11881
|
},
|
|
11619
|
-
value: (_value$
|
|
11882
|
+
value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendId
|
|
11620
11883
|
}), ['sendName', 'all'].includes(showField) && (isSelectName ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
11621
11884
|
style: {
|
|
11622
11885
|
minWidth: '100px',
|
|
@@ -11627,7 +11890,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11627
11890
|
showSearch: true,
|
|
11628
11891
|
options: sendOptions,
|
|
11629
11892
|
filterOption: filterOption,
|
|
11630
|
-
value: ((_value$
|
|
11893
|
+
value: ((_value$changeIndex9 = value[changeIndex]) === null || _value$changeIndex9 === void 0 ? void 0 : _value$changeIndex9.sendSnapshotId) || ((_value$changeIndex10 = value[changeIndex]) === null || _value$changeIndex10 === void 0 ? void 0 : _value$changeIndex10.sendName) || null,
|
|
11631
11894
|
onChange: function onChange(value, option) {
|
|
11632
11895
|
return handleSelected(value, 'sendName', option, onlyShowFieldSelect);
|
|
11633
11896
|
}
|
|
@@ -11637,14 +11900,14 @@ var jstGoods = function jstGoods(props) {
|
|
|
11637
11900
|
onChange: function onChange(e) {
|
|
11638
11901
|
return changeInputHandle(e.target.value, 'sendName');
|
|
11639
11902
|
},
|
|
11640
|
-
value: (_value$
|
|
11903
|
+
value: (_value$changeIndex11 = value[changeIndex]) === null || _value$changeIndex11 === void 0 ? void 0 : _value$changeIndex11.sendName
|
|
11641
11904
|
}))) : null, type === 4 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11642
11905
|
disabled: disabled,
|
|
11643
11906
|
placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
|
|
11644
11907
|
onChange: function onChange(e) {
|
|
11645
11908
|
return changeInputHandle(e.target.value, 'deliveryNo');
|
|
11646
11909
|
},
|
|
11647
|
-
value: (_value$
|
|
11910
|
+
value: (_value$changeIndex12 = value[changeIndex]) === null || _value$changeIndex12 === void 0 ? void 0 : _value$changeIndex12.sendName
|
|
11648
11911
|
})) : null) : null);
|
|
11649
11912
|
};
|
|
11650
11913
|
|
|
@@ -12211,7 +12474,7 @@ var gyColumns = [{
|
|
|
12211
12474
|
}, {
|
|
12212
12475
|
dataIndex: 'specNo',
|
|
12213
12476
|
title: 'SKU编码',
|
|
12214
|
-
width:
|
|
12477
|
+
width: 150,
|
|
12215
12478
|
ellipsis: true
|
|
12216
12479
|
}, {
|
|
12217
12480
|
dataIndex: 'goodName',
|
|
@@ -12222,11 +12485,11 @@ var gyColumns = [{
|
|
|
12222
12485
|
dataIndex: 'goodShortName',
|
|
12223
12486
|
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12224
12487
|
ellipsis: true,
|
|
12225
|
-
width:
|
|
12488
|
+
width: 150
|
|
12226
12489
|
}, {
|
|
12227
12490
|
dataIndex: 'goodNo',
|
|
12228
12491
|
title: '商品编码',
|
|
12229
|
-
width:
|
|
12492
|
+
width: 150,
|
|
12230
12493
|
ellipsis: true
|
|
12231
12494
|
}, {
|
|
12232
12495
|
dataIndex: 'goodPicUrl',
|
|
@@ -12499,12 +12762,144 @@ var bse3Columns = [{
|
|
|
12499
12762
|
width: 100
|
|
12500
12763
|
}];
|
|
12501
12764
|
|
|
12765
|
+
var getYesOrNo = function getYesOrNo(val) {
|
|
12766
|
+
if (!lodash.isBoolean(val)) return null;
|
|
12767
|
+
return val ? '是' : '否';
|
|
12768
|
+
};
|
|
12769
|
+
var kmColumns = [{
|
|
12770
|
+
dataIndex: 'goodName',
|
|
12771
|
+
title: '商品名称',
|
|
12772
|
+
width: 250,
|
|
12773
|
+
ellipsis: true
|
|
12774
|
+
}, {
|
|
12775
|
+
dataIndex: 'goodNo',
|
|
12776
|
+
title: '商品编码',
|
|
12777
|
+
width: 150,
|
|
12778
|
+
ellipsis: true
|
|
12779
|
+
}, {
|
|
12780
|
+
dataIndex: 'goodId',
|
|
12781
|
+
title: '商品ID',
|
|
12782
|
+
width: 200,
|
|
12783
|
+
ellipsis: true
|
|
12784
|
+
}, {
|
|
12785
|
+
dataIndex: 'goodPicUrl',
|
|
12786
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
12787
|
+
width: 150,
|
|
12788
|
+
render: function render(val) {
|
|
12789
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
12790
|
+
width: 60,
|
|
12791
|
+
src: val
|
|
12792
|
+
});
|
|
12793
|
+
}
|
|
12794
|
+
}, {
|
|
12795
|
+
dataIndex: 'goodShortName',
|
|
12796
|
+
title: '商品简称',
|
|
12797
|
+
width: 200,
|
|
12798
|
+
ellipsis: true
|
|
12799
|
+
}, {
|
|
12800
|
+
dataIndex: 'goodBarcode',
|
|
12801
|
+
title: '商品条码',
|
|
12802
|
+
width: 200,
|
|
12803
|
+
ellipsis: true
|
|
12804
|
+
}, {
|
|
12805
|
+
dataIndex: 'brandName',
|
|
12806
|
+
title: "\u54C1\u724C\u540D\u79F0",
|
|
12807
|
+
ellipsis: true,
|
|
12808
|
+
width: 150
|
|
12809
|
+
}, {
|
|
12810
|
+
dataIndex: 'skuType',
|
|
12811
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
12812
|
+
ellipsis: true,
|
|
12813
|
+
width: 150
|
|
12814
|
+
}, {
|
|
12815
|
+
dataIndex: 'specName',
|
|
12816
|
+
title: "SKU\u540D\u79F0",
|
|
12817
|
+
ellipsis: true,
|
|
12818
|
+
width: 150
|
|
12819
|
+
}, {
|
|
12820
|
+
dataIndex: 'specNo',
|
|
12821
|
+
title: "SKU\u7F16\u7801",
|
|
12822
|
+
ellipsis: true,
|
|
12823
|
+
width: 150
|
|
12824
|
+
}, {
|
|
12825
|
+
dataIndex: 'specId',
|
|
12826
|
+
title: "SKU ID",
|
|
12827
|
+
ellipsis: true,
|
|
12828
|
+
width: 150
|
|
12829
|
+
}, {
|
|
12830
|
+
dataIndex: 'propertiesValue',
|
|
12831
|
+
title: "\u89C4\u683C\u503C",
|
|
12832
|
+
ellipsis: true,
|
|
12833
|
+
width: 150
|
|
12834
|
+
}, {
|
|
12835
|
+
dataIndex: 'skuShortTitle',
|
|
12836
|
+
title: "\u89C4\u683C\u7B80\u79F0",
|
|
12837
|
+
ellipsis: true,
|
|
12838
|
+
width: 150
|
|
12839
|
+
}, {
|
|
12840
|
+
dataIndex: 'specBarcode',
|
|
12841
|
+
title: "\u89C4\u683C\u6761\u7801",
|
|
12842
|
+
ellipsis: true,
|
|
12843
|
+
width: 150
|
|
12844
|
+
}, {
|
|
12845
|
+
dataIndex: 'specImgUrl',
|
|
12846
|
+
title: "SKU \u56FE\u7247",
|
|
12847
|
+
ellipsis: true,
|
|
12848
|
+
width: 150,
|
|
12849
|
+
render: function render(val) {
|
|
12850
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
12851
|
+
width: 60,
|
|
12852
|
+
src: val
|
|
12853
|
+
});
|
|
12854
|
+
}
|
|
12855
|
+
}, {
|
|
12856
|
+
dataIndex: 'isGift',
|
|
12857
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
12858
|
+
ellipsis: true,
|
|
12859
|
+
width: 150,
|
|
12860
|
+
render: function render(val) {
|
|
12861
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo(val));
|
|
12862
|
+
}
|
|
12863
|
+
}, {
|
|
12864
|
+
dataIndex: 'isVirtual',
|
|
12865
|
+
title: "\u662F\u5426\u865A\u62DF\u5546\u54C1",
|
|
12866
|
+
ellipsis: true,
|
|
12867
|
+
width: 150,
|
|
12868
|
+
render: function render(val) {
|
|
12869
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo(val));
|
|
12870
|
+
}
|
|
12871
|
+
}, {
|
|
12872
|
+
dataIndex: 'isSkuItem',
|
|
12873
|
+
title: "\u662F\u5426\u542B\u6709SKU",
|
|
12874
|
+
ellipsis: true,
|
|
12875
|
+
width: 150,
|
|
12876
|
+
render: function render(val) {
|
|
12877
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo(val));
|
|
12878
|
+
}
|
|
12879
|
+
}, {
|
|
12880
|
+
dataIndex: 'marketPrice',
|
|
12881
|
+
title: "\u5E02\u573A\u4EF7",
|
|
12882
|
+
ellipsis: true,
|
|
12883
|
+
width: 150
|
|
12884
|
+
}, {
|
|
12885
|
+
dataIndex: 'retailPrice',
|
|
12886
|
+
title: "\u96F6\u552E\u4EF7",
|
|
12887
|
+
ellipsis: true,
|
|
12888
|
+
width: 150
|
|
12889
|
+
}, {
|
|
12890
|
+
dataIndex: 'costPrice',
|
|
12891
|
+
title: "\u6210\u672C\u4EF7",
|
|
12892
|
+
ellipsis: true,
|
|
12893
|
+
width: 150
|
|
12894
|
+
}];
|
|
12895
|
+
|
|
12502
12896
|
var getColumnsMap = function getColumnsMap() {
|
|
12503
12897
|
return lodash.cloneDeep({
|
|
12504
12898
|
gy: gyColumns,
|
|
12505
12899
|
jst: jstColumns,
|
|
12506
12900
|
wdt: wdtColumns,
|
|
12507
|
-
bse3: bse3Columns
|
|
12901
|
+
bse3: bse3Columns,
|
|
12902
|
+
km: kmColumns
|
|
12508
12903
|
});
|
|
12509
12904
|
};
|
|
12510
12905
|
var getColumnsBaseInfo = function getColumnsBaseInfo() {
|
|
@@ -12559,9 +12954,7 @@ var useGetColumns = (function (type) {
|
|
|
12559
12954
|
loading = _useState4[0],
|
|
12560
12955
|
setLoading = _useState4[1];
|
|
12561
12956
|
var showColumnsDataIndexList = React.useMemo(function () {
|
|
12562
|
-
return columns.
|
|
12563
|
-
return Object.hasOwn(item, 'dataIndex');
|
|
12564
|
-
}).map(function (item) {
|
|
12957
|
+
return columns.map(function (item) {
|
|
12565
12958
|
return item.dataIndex;
|
|
12566
12959
|
});
|
|
12567
12960
|
}, [columns]);
|
|
@@ -13456,23 +13849,17 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
|
13456
13849
|
};
|
|
13457
13850
|
var BsE3GoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$4);
|
|
13458
13851
|
|
|
13852
|
+
var rowCheckKey = 'id';
|
|
13459
13853
|
var getTableData$3 = function getTableData(_ref, formData) {
|
|
13460
13854
|
var current = _ref.current,
|
|
13461
13855
|
pageSize = _ref.pageSize;
|
|
13462
|
-
var data = {
|
|
13463
|
-
goodShortName: formData.goodShortName || null,
|
|
13464
|
-
skuName: formData.skuName || null,
|
|
13465
|
-
skuCode: formData.skuCode || null,
|
|
13466
|
-
goodName: formData.goodName || null,
|
|
13467
|
-
goodNo: formData.goodNo || null
|
|
13468
|
-
};
|
|
13469
13856
|
return extendRequest('/qy/gdfw/product/product/page', {
|
|
13470
13857
|
method: 'post',
|
|
13471
13858
|
data: _objectSpread2({
|
|
13472
13859
|
pageSize: pageSize,
|
|
13473
13860
|
pageNo: current,
|
|
13474
|
-
platform: '
|
|
13475
|
-
},
|
|
13861
|
+
platform: 'KM_ERP'
|
|
13862
|
+
}, formData)
|
|
13476
13863
|
}).then(function (res) {
|
|
13477
13864
|
var _res$data = res.data,
|
|
13478
13865
|
_res$data$productSkuL = _res$data.productSkuList,
|
|
@@ -13489,6 +13876,254 @@ var getTableData$3 = function getTableData(_ref, formData) {
|
|
|
13489
13876
|
});
|
|
13490
13877
|
};
|
|
13491
13878
|
var searchFormData$2 = [{
|
|
13879
|
+
label: '商品名称',
|
|
13880
|
+
name: 'goodName'
|
|
13881
|
+
}, {
|
|
13882
|
+
label: '商品编码',
|
|
13883
|
+
name: 'goodNo'
|
|
13884
|
+
}, {
|
|
13885
|
+
label: 'SKU名称',
|
|
13886
|
+
name: 'skuName',
|
|
13887
|
+
dataIndex: 'specName'
|
|
13888
|
+
}, {
|
|
13889
|
+
label: 'SKU编码',
|
|
13890
|
+
name: 'skuCode',
|
|
13891
|
+
dataIndex: 'specNo'
|
|
13892
|
+
}];
|
|
13893
|
+
var GoodList$3 = function GoodList(props, ref) {
|
|
13894
|
+
var _useState = React.useState([]),
|
|
13895
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
13896
|
+
selectList = _useState2[0],
|
|
13897
|
+
setSelect = _useState2[1];
|
|
13898
|
+
var _useState3 = React.useState([]),
|
|
13899
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
13900
|
+
selectIds = _useState4[0],
|
|
13901
|
+
setSelectIds = _useState4[1];
|
|
13902
|
+
var _useGetColumns = useGetColumns('km'),
|
|
13903
|
+
_useGetColumns2 = _slicedToArray(_useGetColumns, 3),
|
|
13904
|
+
columns = _useGetColumns2[0],
|
|
13905
|
+
showColumnsDataIndexList = _useGetColumns2[1],
|
|
13906
|
+
loading = _useGetColumns2[2];
|
|
13907
|
+
React.useImperativeHandle(ref, function () {
|
|
13908
|
+
return {
|
|
13909
|
+
getSelectGoodList: function getSelectGoodList() {
|
|
13910
|
+
return selectList;
|
|
13911
|
+
}
|
|
13912
|
+
};
|
|
13913
|
+
});
|
|
13914
|
+
var _Form$useForm = antd.Form.useForm(),
|
|
13915
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
13916
|
+
form = _Form$useForm2[0];
|
|
13917
|
+
var _useAntdTable = ahooks.useAntdTable(getTableData$3, {
|
|
13918
|
+
defaultPageSize: 10,
|
|
13919
|
+
form: form
|
|
13920
|
+
}),
|
|
13921
|
+
tableProps = _useAntdTable.tableProps,
|
|
13922
|
+
search = _useAntdTable.search,
|
|
13923
|
+
params = _useAntdTable.params;
|
|
13924
|
+
var submit = search.submit,
|
|
13925
|
+
reset = search.reset;
|
|
13926
|
+
var rowSelection = {
|
|
13927
|
+
selectedRowKeys: selectIds,
|
|
13928
|
+
fixed: true,
|
|
13929
|
+
onSelect: function onSelect(record, selected) {
|
|
13930
|
+
if (selected) {
|
|
13931
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), [record[rowCheckKey]]));
|
|
13932
|
+
setSelect([].concat(_toConsumableArray(selectList), [record]));
|
|
13933
|
+
} else {
|
|
13934
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
13935
|
+
return t !== record[rowCheckKey];
|
|
13936
|
+
}));
|
|
13937
|
+
setSelect(selectList.filter(function (t) {
|
|
13938
|
+
return t[rowCheckKey] !== record[rowCheckKey];
|
|
13939
|
+
}));
|
|
13940
|
+
}
|
|
13941
|
+
},
|
|
13942
|
+
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
13943
|
+
if (selected) {
|
|
13944
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
|
|
13945
|
+
return t[rowCheckKey];
|
|
13946
|
+
}))));
|
|
13947
|
+
setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
|
|
13948
|
+
} else {
|
|
13949
|
+
setSelectIds(lodash.difference(selectIds, changeRows.map(function (t) {
|
|
13950
|
+
return t[rowCheckKey];
|
|
13951
|
+
})));
|
|
13952
|
+
var list = lodash.differenceWith(selectList, changeRows, function (arrVal, othVal) {
|
|
13953
|
+
return arrVal[rowCheckKey] !== othVal[rowCheckKey];
|
|
13954
|
+
});
|
|
13955
|
+
setSelect(list);
|
|
13956
|
+
}
|
|
13957
|
+
},
|
|
13958
|
+
getCheckboxProps: function getCheckboxProps(record) {
|
|
13959
|
+
var options = {
|
|
13960
|
+
disabled: (props.selectedRows || []).map(function (row) {
|
|
13961
|
+
return row[rowCheckKey] || row.skuId;
|
|
13962
|
+
}).includes(record[rowCheckKey] || record.skuId),
|
|
13963
|
+
name: record[rowCheckKey]
|
|
13964
|
+
};
|
|
13965
|
+
return options;
|
|
13966
|
+
}
|
|
13967
|
+
};
|
|
13968
|
+
var showTable = function showTable() {
|
|
13969
|
+
var handleDelete = function handleDelete(record) {
|
|
13970
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
13971
|
+
return t !== record[rowCheckKey];
|
|
13972
|
+
}));
|
|
13973
|
+
setSelect(selectList.filter(function (t) {
|
|
13974
|
+
return t[rowCheckKey] !== record[rowCheckKey];
|
|
13975
|
+
}));
|
|
13976
|
+
};
|
|
13977
|
+
var showColumns = [{
|
|
13978
|
+
dataIndex: '',
|
|
13979
|
+
title: "\u64CD\u4F5C",
|
|
13980
|
+
ellipsis: true,
|
|
13981
|
+
width: 100,
|
|
13982
|
+
render: function render(val, record) {
|
|
13983
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
13984
|
+
type: "link",
|
|
13985
|
+
onClick: function onClick() {
|
|
13986
|
+
return handleDelete(record);
|
|
13987
|
+
}
|
|
13988
|
+
}, "\u5220\u9664");
|
|
13989
|
+
}
|
|
13990
|
+
}].concat(lodash.takeRight(columns, columns.length - 1));
|
|
13991
|
+
return selectList.length ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
13992
|
+
style: {
|
|
13993
|
+
width: '100%',
|
|
13994
|
+
maxWidth: '387px'
|
|
13995
|
+
}
|
|
13996
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
13997
|
+
columns: showColumns,
|
|
13998
|
+
rowKey: rowCheckKey,
|
|
13999
|
+
dataSource: selectList,
|
|
14000
|
+
scroll: {
|
|
14001
|
+
x: '100%',
|
|
14002
|
+
y: 250
|
|
14003
|
+
},
|
|
14004
|
+
pagination: {
|
|
14005
|
+
size: 'small',
|
|
14006
|
+
total: selectIds.length,
|
|
14007
|
+
pageSize: 10,
|
|
14008
|
+
showSizeChanger: false
|
|
14009
|
+
}
|
|
14010
|
+
})) : null;
|
|
14011
|
+
};
|
|
14012
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Skeleton, {
|
|
14013
|
+
active: true,
|
|
14014
|
+
loading: loading
|
|
14015
|
+
}, /*#__PURE__*/React__default['default'].createElement(SearchForm, {
|
|
14016
|
+
searchFormData: searchFormData$2,
|
|
14017
|
+
form: form,
|
|
14018
|
+
showColumnsDataIndexList: showColumnsDataIndexList,
|
|
14019
|
+
submit: submit,
|
|
14020
|
+
reset: reset
|
|
14021
|
+
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
14022
|
+
style: {
|
|
14023
|
+
marginTop: '4px'
|
|
14024
|
+
}
|
|
14025
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2({
|
|
14026
|
+
rowSelection: rowSelection,
|
|
14027
|
+
rowKey: rowCheckKey,
|
|
14028
|
+
columns: columns,
|
|
14029
|
+
scroll: {
|
|
14030
|
+
x: '100%',
|
|
14031
|
+
y: 250
|
|
14032
|
+
}
|
|
14033
|
+
}, tableProps))), /*#__PURE__*/React__default['default'].createElement(antd.Popover, {
|
|
14034
|
+
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
14035
|
+
return triggerNode.parentElement;
|
|
14036
|
+
},
|
|
14037
|
+
content: showTable(),
|
|
14038
|
+
title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
|
|
14039
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
14040
|
+
danger: true,
|
|
14041
|
+
type: "text"
|
|
14042
|
+
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(icons.CaretUpOutlined, null))));
|
|
14043
|
+
};
|
|
14044
|
+
var ErpGoodsList = /*#__PURE__*/React.forwardRef(GoodList$3);
|
|
14045
|
+
|
|
14046
|
+
var ErpGoodsModal = function ErpGoodsModal(props, ref) {
|
|
14047
|
+
React.useImperativeHandle(ref, function () {
|
|
14048
|
+
return {
|
|
14049
|
+
open: function open(shopCode) {
|
|
14050
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
14051
|
+
setVisible(true);
|
|
14052
|
+
setSelectedRows(options.value || []);
|
|
14053
|
+
}
|
|
14054
|
+
};
|
|
14055
|
+
});
|
|
14056
|
+
var onSubmit = props.onSubmit,
|
|
14057
|
+
width = props.width;
|
|
14058
|
+
var _useState = React.useState(false),
|
|
14059
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
14060
|
+
visible = _useState2[0],
|
|
14061
|
+
setVisible = _useState2[1];
|
|
14062
|
+
var _useState3 = React.useState([]),
|
|
14063
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
14064
|
+
selectedRows = _useState4[0],
|
|
14065
|
+
setSelectedRows = _useState4[1];
|
|
14066
|
+
var erpGoodsListRef = React.useRef(null);
|
|
14067
|
+
var _onCancel = function onCancel() {
|
|
14068
|
+
setVisible(false);
|
|
14069
|
+
};
|
|
14070
|
+
var onOk = function onOk() {
|
|
14071
|
+
var _erpGoodsListRef$curr;
|
|
14072
|
+
var selectedList = ((_erpGoodsListRef$curr = erpGoodsListRef.current) === null || _erpGoodsListRef$curr === void 0 ? void 0 : _erpGoodsListRef$curr.getSelectGoodList()) || [];
|
|
14073
|
+
onSubmit(selectedList);
|
|
14074
|
+
_onCancel();
|
|
14075
|
+
};
|
|
14076
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, visible && /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
14077
|
+
title: '选择商品',
|
|
14078
|
+
okText: '确认',
|
|
14079
|
+
cancelText: '取消',
|
|
14080
|
+
visible: visible,
|
|
14081
|
+
width: width || 850,
|
|
14082
|
+
onCancel: function onCancel() {
|
|
14083
|
+
_onCancel();
|
|
14084
|
+
},
|
|
14085
|
+
onOk: onOk,
|
|
14086
|
+
wrapClassName: "goodModal"
|
|
14087
|
+
}, /*#__PURE__*/React__default['default'].createElement(ErpGoodsList, {
|
|
14088
|
+
ref: erpGoodsListRef,
|
|
14089
|
+
selectedRows: selectedRows
|
|
14090
|
+
})));
|
|
14091
|
+
};
|
|
14092
|
+
var KmGoodsModal = /*#__PURE__*/React.forwardRef(ErpGoodsModal);
|
|
14093
|
+
|
|
14094
|
+
var getTableData$4 = function getTableData(_ref, formData) {
|
|
14095
|
+
var current = _ref.current,
|
|
14096
|
+
pageSize = _ref.pageSize;
|
|
14097
|
+
var data = {
|
|
14098
|
+
goodShortName: formData.goodShortName || null,
|
|
14099
|
+
skuName: formData.skuName || null,
|
|
14100
|
+
skuCode: formData.skuCode || null,
|
|
14101
|
+
goodName: formData.goodName || null,
|
|
14102
|
+
goodNo: formData.goodNo || null
|
|
14103
|
+
};
|
|
14104
|
+
return extendRequest('/qy/gdfw/product/product/page', {
|
|
14105
|
+
method: 'post',
|
|
14106
|
+
data: _objectSpread2({
|
|
14107
|
+
pageSize: pageSize,
|
|
14108
|
+
pageNo: current,
|
|
14109
|
+
platform: 'GY_ERP'
|
|
14110
|
+
}, data)
|
|
14111
|
+
}).then(function (res) {
|
|
14112
|
+
var _res$data = res.data,
|
|
14113
|
+
_res$data$productSkuL = _res$data.productSkuList,
|
|
14114
|
+
productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
|
|
14115
|
+
_res$data$total = _res$data.total,
|
|
14116
|
+
total = _res$data$total === void 0 ? 0 : _res$data$total;
|
|
14117
|
+
var newProducts = productSkuList.map(function (item, index) {
|
|
14118
|
+
return _objectSpread2({}, item);
|
|
14119
|
+
});
|
|
14120
|
+
return {
|
|
14121
|
+
total: total,
|
|
14122
|
+
list: newProducts
|
|
14123
|
+
};
|
|
14124
|
+
});
|
|
14125
|
+
};
|
|
14126
|
+
var searchFormData$3 = [{
|
|
13492
14127
|
label: '商品简称',
|
|
13493
14128
|
name: 'goodShortName'
|
|
13494
14129
|
}, {
|
|
@@ -13506,7 +14141,7 @@ var searchFormData$2 = [{
|
|
|
13506
14141
|
label: '商品编码',
|
|
13507
14142
|
name: 'goodNo'
|
|
13508
14143
|
}];
|
|
13509
|
-
var GoodList$
|
|
14144
|
+
var GoodList$4 = function GoodList(props, ref) {
|
|
13510
14145
|
var _useState = React.useState([]),
|
|
13511
14146
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13512
14147
|
selectList = _useState2[0],
|
|
@@ -13530,7 +14165,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13530
14165
|
var _Form$useForm = antd.Form.useForm(),
|
|
13531
14166
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
13532
14167
|
form = _Form$useForm2[0];
|
|
13533
|
-
var _useAntdTable = ahooks.useAntdTable(getTableData$
|
|
14168
|
+
var _useAntdTable = ahooks.useAntdTable(getTableData$4, {
|
|
13534
14169
|
defaultPageSize: 10,
|
|
13535
14170
|
form: form
|
|
13536
14171
|
}),
|
|
@@ -13620,7 +14255,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13620
14255
|
active: true,
|
|
13621
14256
|
loading: loading
|
|
13622
14257
|
}, /*#__PURE__*/React__default['default'].createElement(SearchForm, {
|
|
13623
|
-
searchFormData: searchFormData$
|
|
14258
|
+
searchFormData: searchFormData$3,
|
|
13624
14259
|
form: form,
|
|
13625
14260
|
showColumnsDataIndexList: showColumnsDataIndexList,
|
|
13626
14261
|
submit: submit,
|
|
@@ -13648,7 +14283,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13648
14283
|
type: "text"
|
|
13649
14284
|
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(icons.CaretUpOutlined, null))));
|
|
13650
14285
|
};
|
|
13651
|
-
var GyGoodsList$1 = /*#__PURE__*/React.forwardRef(GoodList$
|
|
14286
|
+
var GyGoodsList$1 = /*#__PURE__*/React.forwardRef(GoodList$4);
|
|
13652
14287
|
|
|
13653
14288
|
var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
13654
14289
|
React.useImperativeHandle(ref, function () {
|
|
@@ -14397,6 +15032,10 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14397
15032
|
label: '组合装',
|
|
14398
15033
|
value: '2'
|
|
14399
15034
|
}];
|
|
15035
|
+
var typeMap = {
|
|
15036
|
+
'1': '单品',
|
|
15037
|
+
'2': '组合装'
|
|
15038
|
+
};
|
|
14400
15039
|
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
14401
15040
|
style: {
|
|
14402
15041
|
width: 70
|
|
@@ -14406,7 +15045,7 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14406
15045
|
onChange: function onChange(value) {
|
|
14407
15046
|
return updateHandle(value, index, 'type');
|
|
14408
15047
|
}
|
|
14409
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
15048
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, typeMap[val]);
|
|
14410
15049
|
}
|
|
14411
15050
|
}],
|
|
14412
15051
|
//旺店通换出商品信息
|
|
@@ -14518,6 +15157,10 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14518
15157
|
label: '组合装',
|
|
14519
15158
|
value: '2'
|
|
14520
15159
|
}];
|
|
15160
|
+
var typeMap = {
|
|
15161
|
+
'1': '单品',
|
|
15162
|
+
'2': '组合装'
|
|
15163
|
+
};
|
|
14521
15164
|
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
14522
15165
|
style: {
|
|
14523
15166
|
width: 70
|
|
@@ -14527,13 +15170,13 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14527
15170
|
onChange: function onChange(value) {
|
|
14528
15171
|
return updateHandle(value, index, 'type');
|
|
14529
15172
|
}
|
|
14530
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
15173
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, typeMap[val]);
|
|
14531
15174
|
}
|
|
14532
15175
|
}]
|
|
14533
15176
|
};
|
|
14534
15177
|
};
|
|
14535
15178
|
|
|
14536
|
-
var getYesOrNo = function getYesOrNo(val) {
|
|
15179
|
+
var getYesOrNo$1 = function getYesOrNo(val) {
|
|
14537
15180
|
if (kmkfUtils.isNull(val)) return null;
|
|
14538
15181
|
return val ? '是' : '否';
|
|
14539
15182
|
};
|
|
@@ -14671,7 +15314,7 @@ var getColumns$3 = function getColumns(_ref) {
|
|
|
14671
15314
|
label: '否',
|
|
14672
15315
|
value: false
|
|
14673
15316
|
}]
|
|
14674
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo(val));
|
|
15317
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$1(val));
|
|
14675
15318
|
},
|
|
14676
15319
|
width: 100
|
|
14677
15320
|
}]
|
|
@@ -14683,7 +15326,7 @@ var isNumberOrNumberString = function isNumberOrNumberString(value) {
|
|
|
14683
15326
|
if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
|
|
14684
15327
|
return false;
|
|
14685
15328
|
};
|
|
14686
|
-
var getYesOrNo$
|
|
15329
|
+
var getYesOrNo$2 = function getYesOrNo(val) {
|
|
14687
15330
|
if (kmkfUtils.isNull(val)) return null;
|
|
14688
15331
|
return val ? '是' : '否';
|
|
14689
15332
|
};
|
|
@@ -14793,7 +15436,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14793
15436
|
title: "\u662F\u5426\u53D6\u6D88",
|
|
14794
15437
|
width: 150,
|
|
14795
15438
|
render: function render(val) {
|
|
14796
|
-
return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$
|
|
15439
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$2(val));
|
|
14797
15440
|
}
|
|
14798
15441
|
}, {
|
|
14799
15442
|
dataIndex: 'isGift',
|
|
@@ -14812,7 +15455,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14812
15455
|
label: '否',
|
|
14813
15456
|
value: 0
|
|
14814
15457
|
}]
|
|
14815
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$
|
|
15458
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$2(val));
|
|
14816
15459
|
}
|
|
14817
15460
|
}, {
|
|
14818
15461
|
dataIndex: 'skuNote',
|
|
@@ -14932,7 +15575,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14932
15575
|
label: '否',
|
|
14933
15576
|
value: 0
|
|
14934
15577
|
}]
|
|
14935
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$
|
|
15578
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$2(val));
|
|
14936
15579
|
}
|
|
14937
15580
|
}].map(function (item) {
|
|
14938
15581
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
@@ -15056,7 +15699,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
15056
15699
|
label: '否',
|
|
15057
15700
|
value: 0
|
|
15058
15701
|
}]
|
|
15059
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$
|
|
15702
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$2(val));
|
|
15060
15703
|
}
|
|
15061
15704
|
}].map(function (item) {
|
|
15062
15705
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
@@ -15178,7 +15821,7 @@ var getColumns$5 = function getColumns() {
|
|
|
15178
15821
|
ellipsis: true,
|
|
15179
15822
|
align: 'center',
|
|
15180
15823
|
render: function render(val, record, index) {
|
|
15181
|
-
return (record.qty || 0) * (+record.salePrice || 0);
|
|
15824
|
+
return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
|
|
15182
15825
|
}
|
|
15183
15826
|
}, {
|
|
15184
15827
|
dataIndex: 'batchId',
|
|
@@ -15454,7 +16097,7 @@ var getColumns$5 = function getColumns() {
|
|
|
15454
16097
|
dataIndex: 'saleAmount',
|
|
15455
16098
|
title: '总金额',
|
|
15456
16099
|
render: function render(val, record) {
|
|
15457
|
-
return (record.qty || 0) * (+record.salePrice || 0);
|
|
16100
|
+
return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
|
|
15458
16101
|
}
|
|
15459
16102
|
}, {
|
|
15460
16103
|
dataIndex: 'batchId',
|
|
@@ -15563,7 +16206,7 @@ var getColumns$5 = function getColumns() {
|
|
|
15563
16206
|
dataIndex: 'saleAmount',
|
|
15564
16207
|
title: '总金额',
|
|
15565
16208
|
render: function render(val, record) {
|
|
15566
|
-
return (record.qty || 0) * (+record.salePrice || 0);
|
|
16209
|
+
return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
|
|
15567
16210
|
}
|
|
15568
16211
|
}, {
|
|
15569
16212
|
dataIndex: 'isGift',
|
|
@@ -15602,22 +16245,255 @@ var getColumns$5 = function getColumns() {
|
|
|
15602
16245
|
};
|
|
15603
16246
|
};
|
|
15604
16247
|
|
|
16248
|
+
function toNum$2(value) {
|
|
16249
|
+
if (typeof value === 'string') {
|
|
16250
|
+
return value ? +value : void 0;
|
|
16251
|
+
}
|
|
16252
|
+
if (typeof value === 'number') {
|
|
16253
|
+
return value;
|
|
16254
|
+
}
|
|
16255
|
+
return void 0;
|
|
16256
|
+
}
|
|
15605
16257
|
var getColumns$6 = function getColumns(_ref) {
|
|
15606
16258
|
var _ref$text = _ref.text,
|
|
15607
|
-
text = _ref$text === void 0 ? '' : _ref$text,
|
|
15608
16259
|
disabled = _ref.disabled,
|
|
15609
16260
|
updateHandle = _ref.updateHandle;
|
|
15610
16261
|
return {
|
|
15611
|
-
|
|
15612
|
-
|
|
15613
|
-
|
|
15614
|
-
|
|
15615
|
-
|
|
15616
|
-
|
|
15617
|
-
|
|
15618
|
-
|
|
15619
|
-
|
|
15620
|
-
|
|
16262
|
+
KM_GOODS: [{
|
|
16263
|
+
dataIndex: 'skuPropertiesName',
|
|
16264
|
+
title: "\u89C4\u683C\u540D\u79F0",
|
|
16265
|
+
width: 250
|
|
16266
|
+
}, {
|
|
16267
|
+
dataIndex: 'sysTitle',
|
|
16268
|
+
title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
|
|
16269
|
+
width: 150
|
|
16270
|
+
}, {
|
|
16271
|
+
dataIndex: 'title',
|
|
16272
|
+
title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
|
|
16273
|
+
width: 150
|
|
16274
|
+
}, {
|
|
16275
|
+
dataIndex: 'shortTitle',
|
|
16276
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
16277
|
+
width: 150
|
|
16278
|
+
}, {
|
|
16279
|
+
dataIndex: 'sysOuterId',
|
|
16280
|
+
title: "\u7CFB\u7EDF\u5546\u5BB6\u7F16\u7801",
|
|
16281
|
+
width: 150
|
|
16282
|
+
}, {
|
|
16283
|
+
dataIndex: 'skuSysId',
|
|
16284
|
+
title: "\u7CFB\u7EDF\u89C4\u683CID",
|
|
16285
|
+
width: 150
|
|
16286
|
+
}, {
|
|
16287
|
+
dataIndex: 'skuId',
|
|
16288
|
+
title: "\u5E73\u53F0\u89C4\u683C\u7F16\u53F7",
|
|
16289
|
+
width: 170
|
|
16290
|
+
}, {
|
|
16291
|
+
dataIndex: 'itemSysId',
|
|
16292
|
+
title: "\u7CFB\u7EDF\u5546\u54C1ID",
|
|
16293
|
+
width: 150
|
|
16294
|
+
}, {
|
|
16295
|
+
dataIndex: 'sysPicPath',
|
|
16296
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
16297
|
+
width: 100,
|
|
16298
|
+
render: function render(val) {
|
|
16299
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
16300
|
+
width: 60,
|
|
16301
|
+
src: val
|
|
16302
|
+
});
|
|
16303
|
+
}
|
|
16304
|
+
}, {
|
|
16305
|
+
dataIndex: 'num',
|
|
16306
|
+
title: "\u6570\u91CF",
|
|
16307
|
+
width: 100,
|
|
16308
|
+
render: function render(val, record, index) {
|
|
16309
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
16310
|
+
style: {
|
|
16311
|
+
width: 70
|
|
16312
|
+
},
|
|
16313
|
+
value: val,
|
|
16314
|
+
min: 1,
|
|
16315
|
+
precision: 0,
|
|
16316
|
+
onChange: function onChange(num) {
|
|
16317
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'num');
|
|
16318
|
+
}
|
|
16319
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
16320
|
+
}
|
|
16321
|
+
}, {
|
|
16322
|
+
dataIndex: 'payment',
|
|
16323
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
16324
|
+
width: 150,
|
|
16325
|
+
render: function render(val, record, index) {
|
|
16326
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
16327
|
+
style: {
|
|
16328
|
+
width: 130
|
|
16329
|
+
},
|
|
16330
|
+
value: val,
|
|
16331
|
+
min: 0,
|
|
16332
|
+
precision: 2,
|
|
16333
|
+
onChange: function onChange(num) {
|
|
16334
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'payment');
|
|
16335
|
+
}
|
|
16336
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
16337
|
+
}
|
|
16338
|
+
}, {
|
|
16339
|
+
dataIndex: 'price',
|
|
16340
|
+
title: "\u5546\u54C1\u9500\u552E\u4EF7",
|
|
16341
|
+
width: 150,
|
|
16342
|
+
render: function render(val) {
|
|
16343
|
+
return val || val === 0 ? Number(val).toFixed(2) : '';
|
|
16344
|
+
}
|
|
16345
|
+
}, {
|
|
16346
|
+
dataIndex: 'type',
|
|
16347
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
16348
|
+
width: 150
|
|
16349
|
+
}].map(function (item) {
|
|
16350
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16351
|
+
align: 'center',
|
|
16352
|
+
ellipsis: true
|
|
16353
|
+
});
|
|
16354
|
+
}),
|
|
16355
|
+
KM_REISSUE_GOODS: [{
|
|
16356
|
+
dataIndex: 'skuPropertiesName',
|
|
16357
|
+
title: "\u89C4\u683C\u540D\u79F0",
|
|
16358
|
+
width: 250
|
|
16359
|
+
}, {
|
|
16360
|
+
dataIndex: 'sysTitle',
|
|
16361
|
+
title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
|
|
16362
|
+
width: 150
|
|
16363
|
+
}, {
|
|
16364
|
+
dataIndex: 'shortTitle',
|
|
16365
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
16366
|
+
width: 150
|
|
16367
|
+
}, {
|
|
16368
|
+
dataIndex: 'title',
|
|
16369
|
+
title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
|
|
16370
|
+
width: 150
|
|
16371
|
+
}, {
|
|
16372
|
+
dataIndex: 'sysOuterId',
|
|
16373
|
+
title: "\u7CFB\u7EDF\u5546\u5BB6\u7F16\u7801",
|
|
16374
|
+
width: 150
|
|
16375
|
+
}, {
|
|
16376
|
+
dataIndex: 'itemSysId',
|
|
16377
|
+
title: "\u7CFB\u7EDF\u5546\u54C1ID",
|
|
16378
|
+
width: 150
|
|
16379
|
+
}, {
|
|
16380
|
+
dataIndex: 'skuSysId',
|
|
16381
|
+
title: "\u7CFB\u7EDF\u89C4\u683CID",
|
|
16382
|
+
width: 150
|
|
16383
|
+
}, {
|
|
16384
|
+
dataIndex: 'skuId',
|
|
16385
|
+
title: "\u5E73\u53F0\u89C4\u683C\u7F16\u53F7",
|
|
16386
|
+
width: 170
|
|
16387
|
+
}, {
|
|
16388
|
+
dataIndex: 'realNum',
|
|
16389
|
+
title: "\u5B9E\u9645\u8865\u53D1\u6570\u91CF",
|
|
16390
|
+
width: 100,
|
|
16391
|
+
validator: function validator(_rule, value) {
|
|
16392
|
+
var title = '';
|
|
16393
|
+
if (((value === null || value === void 0 ? void 0 : value.kmReissueGoods) || []).some(function (goods) {
|
|
16394
|
+
var realNum = toNum$2(goods === null || goods === void 0 ? void 0 : goods.realNum);
|
|
16395
|
+
var res = typeof realNum === 'number' ? realNum < 1 : true;
|
|
16396
|
+
if (res) {
|
|
16397
|
+
title = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
16398
|
+
}
|
|
16399
|
+
return res;
|
|
16400
|
+
})) {
|
|
16401
|
+
return Promise.reject("".concat(title, "\u5B9E\u9645\u8865\u53D1\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
16402
|
+
}
|
|
16403
|
+
},
|
|
16404
|
+
render: function render(val, record, index) {
|
|
16405
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
16406
|
+
style: {
|
|
16407
|
+
width: 70
|
|
16408
|
+
},
|
|
16409
|
+
value: val,
|
|
16410
|
+
min: 1,
|
|
16411
|
+
precision: 0,
|
|
16412
|
+
onChange: function onChange(num) {
|
|
16413
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'realNum');
|
|
16414
|
+
}
|
|
16415
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
16416
|
+
}
|
|
16417
|
+
}, {
|
|
16418
|
+
dataIndex: 'desiredNum',
|
|
16419
|
+
title: "\u5E94\u8865\u53D1\u6570\u91CF",
|
|
16420
|
+
width: 100,
|
|
16421
|
+
render: function render(val, record, index) {
|
|
16422
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
16423
|
+
style: {
|
|
16424
|
+
width: 70
|
|
16425
|
+
},
|
|
16426
|
+
value: val,
|
|
16427
|
+
min: 1,
|
|
16428
|
+
precision: 0,
|
|
16429
|
+
onChange: function onChange(num) {
|
|
16430
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'desiredNum');
|
|
16431
|
+
}
|
|
16432
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
16433
|
+
}
|
|
16434
|
+
}, {
|
|
16435
|
+
dataIndex: 'price',
|
|
16436
|
+
title: "\u5546\u54C1\u9500\u552E\u4EF7",
|
|
16437
|
+
width: 150,
|
|
16438
|
+
render: function render(val) {
|
|
16439
|
+
return val || val === 0 ? Number(val).toFixed(2) : '';
|
|
16440
|
+
}
|
|
16441
|
+
}, {
|
|
16442
|
+
dataIndex: 'payment',
|
|
16443
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
16444
|
+
width: 150,
|
|
16445
|
+
render: function render(val, record, index) {
|
|
16446
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
16447
|
+
style: {
|
|
16448
|
+
width: 130
|
|
16449
|
+
},
|
|
16450
|
+
value: val,
|
|
16451
|
+
min: 0,
|
|
16452
|
+
precision: 2,
|
|
16453
|
+
onChange: function onChange(num) {
|
|
16454
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'payment');
|
|
16455
|
+
}
|
|
16456
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
16457
|
+
}
|
|
16458
|
+
}, {
|
|
16459
|
+
dataIndex: 'type',
|
|
16460
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
16461
|
+
width: 150
|
|
16462
|
+
}, {
|
|
16463
|
+
dataIndex: 'sysPicPath',
|
|
16464
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
16465
|
+
width: 100,
|
|
16466
|
+
render: function render(val) {
|
|
16467
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
16468
|
+
width: 60,
|
|
16469
|
+
src: val
|
|
16470
|
+
});
|
|
16471
|
+
}
|
|
16472
|
+
}].map(function (item) {
|
|
16473
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16474
|
+
align: 'center',
|
|
16475
|
+
ellipsis: true
|
|
16476
|
+
});
|
|
16477
|
+
})
|
|
16478
|
+
};
|
|
16479
|
+
};
|
|
16480
|
+
|
|
16481
|
+
var getColumns$7 = function getColumns(_ref) {
|
|
16482
|
+
var _ref$text = _ref.text,
|
|
16483
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
16484
|
+
disabled = _ref.disabled,
|
|
16485
|
+
updateHandle = _ref.updateHandle;
|
|
16486
|
+
return {
|
|
16487
|
+
//bs商品信息
|
|
16488
|
+
default: [{
|
|
16489
|
+
dataIndex: 'mark',
|
|
16490
|
+
title: "\u5546\u54C1\u6807\u8BB0",
|
|
16491
|
+
align: 'center',
|
|
16492
|
+
ellipsis: true,
|
|
16493
|
+
width: 70,
|
|
16494
|
+
render: function render(val, record, index) {
|
|
16495
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
16496
|
+
options: [{
|
|
15621
16497
|
label: '是',
|
|
15622
16498
|
value: '是'
|
|
15623
16499
|
}, {
|
|
@@ -15715,7 +16591,7 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
15715
16591
|
disabled = _ref.disabled,
|
|
15716
16592
|
updateHandle = _ref.updateHandle,
|
|
15717
16593
|
updateDataHandle = _ref.updateDataHandle;
|
|
15718
|
-
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
16594
|
+
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
15719
16595
|
text: text,
|
|
15720
16596
|
disabled: disabled,
|
|
15721
16597
|
updateHandle: updateHandle
|
|
@@ -15740,8 +16616,12 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
15740
16616
|
text: text,
|
|
15741
16617
|
disabled: disabled,
|
|
15742
16618
|
updateHandle: updateHandle
|
|
16619
|
+
})), getColumns$6({
|
|
16620
|
+
text: text,
|
|
16621
|
+
disabled: disabled,
|
|
16622
|
+
updateHandle: updateHandle
|
|
15743
16623
|
})), {}, {
|
|
15744
|
-
default: getColumns$
|
|
16624
|
+
default: getColumns$7({
|
|
15745
16625
|
text: text,
|
|
15746
16626
|
disabled: disabled,
|
|
15747
16627
|
updateHandle: updateHandle
|
|
@@ -15749,6 +16629,29 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
15749
16629
|
});
|
|
15750
16630
|
};
|
|
15751
16631
|
var erpColumnsMap = getColumnsMap$1();
|
|
16632
|
+
var erpFormValidator = function erpFormValidator(_rule, value, type) {
|
|
16633
|
+
var validatorFnList = (erpColumnsMap[type] || erpColumnsMap['default']).map(function (column) {
|
|
16634
|
+
return column.validator;
|
|
16635
|
+
}).filter(Boolean);
|
|
16636
|
+
var res = null;
|
|
16637
|
+
var _iterator = _createForOfIteratorHelper(validatorFnList),
|
|
16638
|
+
_step;
|
|
16639
|
+
try {
|
|
16640
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
16641
|
+
var validatorFn = _step.value;
|
|
16642
|
+
var validatorResult = validatorFn(_rule, value, type);
|
|
16643
|
+
if (validatorResult) {
|
|
16644
|
+
res = validatorResult;
|
|
16645
|
+
break;
|
|
16646
|
+
}
|
|
16647
|
+
}
|
|
16648
|
+
} catch (err) {
|
|
16649
|
+
_iterator.e(err);
|
|
16650
|
+
} finally {
|
|
16651
|
+
_iterator.f();
|
|
16652
|
+
}
|
|
16653
|
+
return res;
|
|
16654
|
+
};
|
|
15752
16655
|
var getColumnsBaseInfo$1 = function getColumnsBaseInfo() {
|
|
15753
16656
|
var clone_columnsMap = lodash.cloneDeep(getColumnsMap$1());
|
|
15754
16657
|
var newColumns = {};
|
|
@@ -15870,6 +16773,231 @@ function HoverTableRowDeleteIcon(_ref) {
|
|
|
15870
16773
|
})));
|
|
15871
16774
|
}
|
|
15872
16775
|
|
|
16776
|
+
var isErpType = {
|
|
16777
|
+
isWdt: function isWdt(type) {
|
|
16778
|
+
return ['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type);
|
|
16779
|
+
},
|
|
16780
|
+
isBsE3: function isBsE3(type) {
|
|
16781
|
+
return ['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type);
|
|
16782
|
+
},
|
|
16783
|
+
isGy: function isGy(type) {
|
|
16784
|
+
return ['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type);
|
|
16785
|
+
},
|
|
16786
|
+
isJst: function isJst(type) {
|
|
16787
|
+
return ['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type);
|
|
16788
|
+
},
|
|
16789
|
+
isKm: function isKm(type) {
|
|
16790
|
+
return ['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type);
|
|
16791
|
+
}
|
|
16792
|
+
};
|
|
16793
|
+
var processGoods = function processGoods(_ref) {
|
|
16794
|
+
var list = _ref.list,
|
|
16795
|
+
type = _ref.type,
|
|
16796
|
+
canUpdateNumber = _ref.canUpdateNumber;
|
|
16797
|
+
var newList = [];
|
|
16798
|
+
// 根据商品类型处理数据
|
|
16799
|
+
if (isErpType.isWdt(type)) {
|
|
16800
|
+
newList = processWdtGoods({
|
|
16801
|
+
list: list,
|
|
16802
|
+
type: type,
|
|
16803
|
+
canUpdateNumber: canUpdateNumber
|
|
16804
|
+
});
|
|
16805
|
+
} else if (isErpType.isBsE3(type)) {
|
|
16806
|
+
newList = processBsE3Goods({
|
|
16807
|
+
list: list,
|
|
16808
|
+
type: type,
|
|
16809
|
+
canUpdateNumber: canUpdateNumber
|
|
16810
|
+
});
|
|
16811
|
+
} else if (isErpType.isGy(type)) {
|
|
16812
|
+
newList = processGyGoods({
|
|
16813
|
+
list: list,
|
|
16814
|
+
type: type,
|
|
16815
|
+
canUpdateNumber: canUpdateNumber
|
|
16816
|
+
});
|
|
16817
|
+
} else if (isErpType.isJst(type)) {
|
|
16818
|
+
newList = processJstGoods({
|
|
16819
|
+
list: list,
|
|
16820
|
+
type: type,
|
|
16821
|
+
canUpdateNumber: canUpdateNumber
|
|
16822
|
+
});
|
|
16823
|
+
} else if (isErpType.isKm(type)) {
|
|
16824
|
+
newList = processKmGoods({
|
|
16825
|
+
list: list,
|
|
16826
|
+
type: type,
|
|
16827
|
+
canUpdateNumber: canUpdateNumber
|
|
16828
|
+
});
|
|
16829
|
+
} else {
|
|
16830
|
+
newList = processDefaultGoods({
|
|
16831
|
+
list: list,
|
|
16832
|
+
type: type,
|
|
16833
|
+
canUpdateNumber: canUpdateNumber
|
|
16834
|
+
});
|
|
16835
|
+
}
|
|
16836
|
+
return newList;
|
|
16837
|
+
};
|
|
16838
|
+
// 处理不同类型的商品数据
|
|
16839
|
+
var processWdtGoods = function processWdtGoods(_ref2) {
|
|
16840
|
+
var list = _ref2.list,
|
|
16841
|
+
type = _ref2.type,
|
|
16842
|
+
canUpdateNumber = _ref2.canUpdateNumber;
|
|
16843
|
+
return list.map(function (item) {
|
|
16844
|
+
var processedItem = _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16845
|
+
uuid: kmkfUtils.uuid(),
|
|
16846
|
+
canDelete: true,
|
|
16847
|
+
num: 1,
|
|
16848
|
+
orderPrice: 0,
|
|
16849
|
+
sharePrice: 0,
|
|
16850
|
+
canUpdateNumber: canUpdateNumber
|
|
16851
|
+
});
|
|
16852
|
+
// 特殊处理换货商品
|
|
16853
|
+
if (type === 'WDT_EXCHANGE_GOODS') {
|
|
16854
|
+
processedItem.price = item.retailPrice;
|
|
16855
|
+
processedItem.type = '1';
|
|
16856
|
+
}
|
|
16857
|
+
return processedItem;
|
|
16858
|
+
});
|
|
16859
|
+
};
|
|
16860
|
+
var processBsE3Goods = function processBsE3Goods(_ref3) {
|
|
16861
|
+
var list = _ref3.list,
|
|
16862
|
+
canUpdateNumber = _ref3.canUpdateNumber;
|
|
16863
|
+
return list.map(function (item) {
|
|
16864
|
+
var specNo = item.specNo,
|
|
16865
|
+
specId = item.specId,
|
|
16866
|
+
goodName = item.goodName,
|
|
16867
|
+
goodShortName = item.goodShortName,
|
|
16868
|
+
goodPicUrl = item.goodPicUrl,
|
|
16869
|
+
goodNo = item.goodNo,
|
|
16870
|
+
goodId = item.goodId,
|
|
16871
|
+
retailPrice = item.retailPrice;
|
|
16872
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16873
|
+
sku: specNo,
|
|
16874
|
+
skuId: specId,
|
|
16875
|
+
goodsName: goodName,
|
|
16876
|
+
goodsShortName: goodShortName,
|
|
16877
|
+
picPath: goodPicUrl,
|
|
16878
|
+
goodsSn: goodNo,
|
|
16879
|
+
goodsId: goodId,
|
|
16880
|
+
goodsPrice: retailPrice,
|
|
16881
|
+
shopPrice: retailPrice,
|
|
16882
|
+
sharePayment: '',
|
|
16883
|
+
sharePrice: '',
|
|
16884
|
+
payment: '',
|
|
16885
|
+
tcSku: '',
|
|
16886
|
+
tcGoodsNumber: '',
|
|
16887
|
+
taoCanSingleSl: '',
|
|
16888
|
+
isGift: '',
|
|
16889
|
+
uuid: kmkfUtils.uuid(),
|
|
16890
|
+
canDelete: true,
|
|
16891
|
+
canEdit: true,
|
|
16892
|
+
goodsNumber: 1,
|
|
16893
|
+
canUpdateNumber: canUpdateNumber
|
|
16894
|
+
});
|
|
16895
|
+
});
|
|
16896
|
+
};
|
|
16897
|
+
var processGyGoods = function processGyGoods(_ref4) {
|
|
16898
|
+
var list = _ref4.list;
|
|
16899
|
+
return list.map(function (item) {
|
|
16900
|
+
var goodName = item.goodName,
|
|
16901
|
+
goodShortName = item.goodShortName,
|
|
16902
|
+
goodNo = item.goodNo,
|
|
16903
|
+
specName = item.specName,
|
|
16904
|
+
specNo = item.specNo,
|
|
16905
|
+
retailPrice = item.retailPrice;
|
|
16906
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16907
|
+
uuid: kmkfUtils.uuid(),
|
|
16908
|
+
canDelete: true,
|
|
16909
|
+
canEdit: true,
|
|
16910
|
+
qty: 1,
|
|
16911
|
+
goodName: goodName,
|
|
16912
|
+
goodShortName: goodShortName,
|
|
16913
|
+
goodNo: goodNo,
|
|
16914
|
+
specName: specName,
|
|
16915
|
+
specNo: specNo,
|
|
16916
|
+
originPrice: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null,
|
|
16917
|
+
originAmount: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null
|
|
16918
|
+
});
|
|
16919
|
+
});
|
|
16920
|
+
};
|
|
16921
|
+
var processJstGoods = function processJstGoods(_ref5) {
|
|
16922
|
+
var list = _ref5.list;
|
|
16923
|
+
return list.map(function (item) {
|
|
16924
|
+
return {
|
|
16925
|
+
name: item.goodName,
|
|
16926
|
+
skuId: item.goodNo,
|
|
16927
|
+
iId: item.styleCode,
|
|
16928
|
+
pic: item.goodPicUrl,
|
|
16929
|
+
propertiesValue: item.propertiesValue,
|
|
16930
|
+
saleBasePrice: item.retailPrice,
|
|
16931
|
+
salePrice: item.retailPrice,
|
|
16932
|
+
remark: '',
|
|
16933
|
+
uuid: kmkfUtils.uuid(),
|
|
16934
|
+
canDelete: true,
|
|
16935
|
+
canEdit: true,
|
|
16936
|
+
qty: 1
|
|
16937
|
+
};
|
|
16938
|
+
});
|
|
16939
|
+
};
|
|
16940
|
+
var processKmGoods = function processKmGoods(_ref6) {
|
|
16941
|
+
var list = _ref6.list,
|
|
16942
|
+
type = _ref6.type;
|
|
16943
|
+
var initParamsMap = {
|
|
16944
|
+
KM_GOODS: {
|
|
16945
|
+
num: 1
|
|
16946
|
+
},
|
|
16947
|
+
KM_REISSUE_GOODS: {
|
|
16948
|
+
realNum: 1,
|
|
16949
|
+
desiredNum: 1
|
|
16950
|
+
}
|
|
16951
|
+
};
|
|
16952
|
+
return list.map(function (item) {
|
|
16953
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16954
|
+
skuPropertiesName: item.specName,
|
|
16955
|
+
sysTitle: item.goodName,
|
|
16956
|
+
title: null,
|
|
16957
|
+
shortTitle: item.goodShortName,
|
|
16958
|
+
sysOuterId: item.goodNo,
|
|
16959
|
+
outerId: item.goodNo,
|
|
16960
|
+
skuSysId: item.specId,
|
|
16961
|
+
itemSysId: item.goodId,
|
|
16962
|
+
sysPicPath: item.goodPicUrl,
|
|
16963
|
+
payment: null,
|
|
16964
|
+
price: item.retailPrice,
|
|
16965
|
+
type: null,
|
|
16966
|
+
uuid: kmkfUtils.uuid(),
|
|
16967
|
+
canDelete: true,
|
|
16968
|
+
canEdit: true
|
|
16969
|
+
}, initParamsMap[type] || {});
|
|
16970
|
+
});
|
|
16971
|
+
};
|
|
16972
|
+
var processDefaultGoods = function processDefaultGoods(_ref7) {
|
|
16973
|
+
var list = _ref7.list,
|
|
16974
|
+
canUpdateNumber = _ref7.canUpdateNumber;
|
|
16975
|
+
return list.map(function (item) {
|
|
16976
|
+
var goodsId = item.goodsId,
|
|
16977
|
+
name = item.name,
|
|
16978
|
+
code = item.code,
|
|
16979
|
+
skuCode = item.skuCode,
|
|
16980
|
+
marketPrice = item.marketPrice,
|
|
16981
|
+
skuName = item.skuName;
|
|
16982
|
+
return {
|
|
16983
|
+
id: goodsId,
|
|
16984
|
+
mark: '是',
|
|
16985
|
+
pic: '',
|
|
16986
|
+
skuName: skuName,
|
|
16987
|
+
name: name,
|
|
16988
|
+
code: code,
|
|
16989
|
+
sku: skuCode,
|
|
16990
|
+
money: marketPrice || 0,
|
|
16991
|
+
share: marketPrice || 0,
|
|
16992
|
+
number: 1,
|
|
16993
|
+
type: '',
|
|
16994
|
+
uuid: kmkfUtils.uuid(),
|
|
16995
|
+
canDelete: true,
|
|
16996
|
+
canUpdateNumber: canUpdateNumber
|
|
16997
|
+
};
|
|
16998
|
+
});
|
|
16999
|
+
};
|
|
17000
|
+
|
|
15873
17001
|
var GoodsModalMap = {
|
|
15874
17002
|
WDT_REISSUE_GOODS: WdtGoodsModal,
|
|
15875
17003
|
WDT_GOODS: WdtGoodsModal,
|
|
@@ -15879,10 +17007,13 @@ var GoodsModalMap = {
|
|
|
15879
17007
|
BS_E3_EXCHANGE_GOODS: BsE3GoodsModal,
|
|
15880
17008
|
GY_GOODS: GyGoodsModal$2,
|
|
15881
17009
|
GY_REISSUE_GOODS: GyGoodsModal$2,
|
|
17010
|
+
GY_RETURN_GOODS: GyGoodsModal$2,
|
|
15882
17011
|
JST_GOODS: JstGoodsModal,
|
|
15883
17012
|
JST_REISSUE_GOODS: JstGoodsModal,
|
|
15884
17013
|
JST_RETURN_GOODS: JstGoodsModal,
|
|
15885
17014
|
JST_EXCHANGE_GOODS: JstGoodsModal,
|
|
17015
|
+
KM_GOODS: KmGoodsModal,
|
|
17016
|
+
KM_REISSUE_GOODS: KmGoodsModal,
|
|
15886
17017
|
OTHER_GOODS: GoodsModal$2
|
|
15887
17018
|
};
|
|
15888
17019
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
@@ -15916,7 +17047,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
15916
17047
|
return item === null || item === void 0 ? void 0 : item[uniqueKey];
|
|
15917
17048
|
}));
|
|
15918
17049
|
var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
|
|
15919
|
-
console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
17050
|
+
// console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
15920
17051
|
onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
|
|
15921
17052
|
};
|
|
15922
17053
|
var rowSelection = {
|
|
@@ -15945,13 +17076,16 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
15945
17076
|
};
|
|
15946
17077
|
var getButtonText = function getButtonText() {
|
|
15947
17078
|
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
17079
|
+
if (['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type)) {
|
|
17080
|
+
return '选择快麦ERP商品';
|
|
17081
|
+
}
|
|
15948
17082
|
if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
|
|
15949
17083
|
return '选择百胜ERP商品';
|
|
15950
17084
|
}
|
|
15951
17085
|
if (['WDT_REISSUE_GOODS'].includes(type)) {
|
|
15952
17086
|
return '选择旺店通商品';
|
|
15953
17087
|
}
|
|
15954
|
-
if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
|
|
17088
|
+
if (['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type)) {
|
|
15955
17089
|
return '选择管易ERP商品';
|
|
15956
17090
|
}
|
|
15957
17091
|
if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
|
|
@@ -16088,6 +17222,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
16088
17222
|
case 'JST_RETURN_GOODS':
|
|
16089
17223
|
case 'GY_REISSUE_GOODS':
|
|
16090
17224
|
case 'GY_RETURN_GOODS':
|
|
17225
|
+
case 'KM_GOODS':
|
|
17226
|
+
case 'KM_REISSUE_GOODS':
|
|
16091
17227
|
{
|
|
16092
17228
|
columns = getColumnsMap$1({
|
|
16093
17229
|
text: text,
|
|
@@ -16205,120 +17341,11 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
16205
17341
|
}].concat(_toConsumableArray(columns));
|
|
16206
17342
|
}, []);
|
|
16207
17343
|
var onSubmit = function onSubmit(list) {
|
|
16208
|
-
var newList =
|
|
16209
|
-
|
|
16210
|
-
|
|
16211
|
-
|
|
16212
|
-
|
|
16213
|
-
item.num = 1;
|
|
16214
|
-
item.orderPrice = 0;
|
|
16215
|
-
item.sharePrice = 0;
|
|
16216
|
-
item.canUpdateNumber = canUpdateNumber;
|
|
16217
|
-
if (type === 'WDT_EXCHANGE_GOODS') {
|
|
16218
|
-
item.price = item.retailPrice;
|
|
16219
|
-
item.type = '1';
|
|
16220
|
-
}
|
|
16221
|
-
return item;
|
|
16222
|
-
});
|
|
16223
|
-
} else if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
|
|
16224
|
-
newList = list.map(function (item) {
|
|
16225
|
-
var specNo = item.specNo,
|
|
16226
|
-
specId = item.specId,
|
|
16227
|
-
goodName = item.goodName,
|
|
16228
|
-
goodShortName = item.goodShortName,
|
|
16229
|
-
goodPicUrl = item.goodPicUrl,
|
|
16230
|
-
goodNo = item.goodNo,
|
|
16231
|
-
goodId = item.goodId,
|
|
16232
|
-
retailPrice = item.retailPrice;
|
|
16233
|
-
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16234
|
-
sku: specNo,
|
|
16235
|
-
skuId: specId,
|
|
16236
|
-
goodsName: goodName,
|
|
16237
|
-
goodsShortName: goodShortName,
|
|
16238
|
-
picPath: goodPicUrl,
|
|
16239
|
-
goodsSn: goodNo,
|
|
16240
|
-
goodsId: goodId,
|
|
16241
|
-
goodsPrice: retailPrice,
|
|
16242
|
-
shopPrice: retailPrice,
|
|
16243
|
-
sharePayment: '',
|
|
16244
|
-
sharePrice: '',
|
|
16245
|
-
payment: '',
|
|
16246
|
-
tcSku: '',
|
|
16247
|
-
tcGoodsNumber: '',
|
|
16248
|
-
taoCanSingleSl: '',
|
|
16249
|
-
isGift: '',
|
|
16250
|
-
uuid: kmkfUtils.uuid(),
|
|
16251
|
-
canDelete: true,
|
|
16252
|
-
canEdit: true,
|
|
16253
|
-
goodsNumber: 1,
|
|
16254
|
-
canUpdateNumber: canUpdateNumber
|
|
16255
|
-
});
|
|
16256
|
-
});
|
|
16257
|
-
} else if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
|
|
16258
|
-
newList = list.map(function (item) {
|
|
16259
|
-
var goodName = item.goodName,
|
|
16260
|
-
goodShortName = item.goodShortName,
|
|
16261
|
-
goodNo = item.goodNo,
|
|
16262
|
-
specName = item.specName,
|
|
16263
|
-
specNo = item.specNo,
|
|
16264
|
-
retailPrice = item.retailPrice;
|
|
16265
|
-
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16266
|
-
uuid: kmkfUtils.uuid(),
|
|
16267
|
-
canDelete: true,
|
|
16268
|
-
canEdit: true,
|
|
16269
|
-
qty: 1,
|
|
16270
|
-
goodName: goodName,
|
|
16271
|
-
goodShortName: goodShortName,
|
|
16272
|
-
goodNo: goodNo,
|
|
16273
|
-
specName: specName,
|
|
16274
|
-
specNo: specNo,
|
|
16275
|
-
originPrice: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null,
|
|
16276
|
-
originAmount: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null
|
|
16277
|
-
});
|
|
16278
|
-
});
|
|
16279
|
-
} else if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
|
|
16280
|
-
newList = list.map(function (item) {
|
|
16281
|
-
return {
|
|
16282
|
-
name: item.goodName,
|
|
16283
|
-
skuId: item.goodNo,
|
|
16284
|
-
iId: item.styleCode,
|
|
16285
|
-
pic: item.goodPicUrl,
|
|
16286
|
-
propertiesValue: item.propertiesValue,
|
|
16287
|
-
saleBasePrice: item.retailPrice,
|
|
16288
|
-
salePrice: item.retailPrice,
|
|
16289
|
-
remark: '',
|
|
16290
|
-
uuid: kmkfUtils.uuid(),
|
|
16291
|
-
canDelete: true,
|
|
16292
|
-
canEdit: true,
|
|
16293
|
-
qty: 1
|
|
16294
|
-
};
|
|
16295
|
-
});
|
|
16296
|
-
} else {
|
|
16297
|
-
newList = list.map(function (item) {
|
|
16298
|
-
var goodsId = item.goodsId,
|
|
16299
|
-
name = item.name,
|
|
16300
|
-
code = item.code,
|
|
16301
|
-
skuCode = item.skuCode,
|
|
16302
|
-
marketPrice = item.marketPrice,
|
|
16303
|
-
skuName = item.skuName;
|
|
16304
|
-
return {
|
|
16305
|
-
id: goodsId,
|
|
16306
|
-
mark: '是',
|
|
16307
|
-
pic: '',
|
|
16308
|
-
skuName: skuName,
|
|
16309
|
-
name: name,
|
|
16310
|
-
code: code,
|
|
16311
|
-
sku: skuCode,
|
|
16312
|
-
money: marketPrice || 0,
|
|
16313
|
-
share: marketPrice || 0,
|
|
16314
|
-
number: 1,
|
|
16315
|
-
type: '',
|
|
16316
|
-
uuid: kmkfUtils.uuid(),
|
|
16317
|
-
canDelete: true,
|
|
16318
|
-
canUpdateNumber: canUpdateNumber
|
|
16319
|
-
};
|
|
16320
|
-
});
|
|
16321
|
-
}
|
|
17344
|
+
var newList = processGoods({
|
|
17345
|
+
list: list,
|
|
17346
|
+
canUpdateNumber: canUpdateNumber,
|
|
17347
|
+
type: type
|
|
17348
|
+
});
|
|
16322
17349
|
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), _toConsumableArray(newList)));
|
|
16323
17350
|
};
|
|
16324
17351
|
var onSelectChange = function onSelectChange(newSelectedRowKeys) {
|
|
@@ -17032,10 +18059,12 @@ var getWdtOrderListSingleton = function getWdtOrderListSingleton(orderNo) {
|
|
|
17032
18059
|
var _data$data, _data$data$trades;
|
|
17033
18060
|
if (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$trades = _data$data.trades) === null || _data$data$trades === void 0 ? void 0 : _data$data$trades.length) {
|
|
17034
18061
|
data.data.trades = kmkfUtils.filterWdtOrders(data === null || data === void 0 ? void 0 : data.data, orderNo).map(function (item) {
|
|
18062
|
+
var _tradeStatusMap$data$;
|
|
17035
18063
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
17036
18064
|
billNo: item.tradeNo,
|
|
17037
18065
|
billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
17038
|
-
billTag: item.tagName
|
|
18066
|
+
billTag: item.tagName,
|
|
18067
|
+
tradeStatusValue: kmkfUtils.tradeStatusMap === null || kmkfUtils.tradeStatusMap === void 0 ? void 0 : (_tradeStatusMap$data$ = kmkfUtils.tradeStatusMap[data.data.version]) === null || _tradeStatusMap$data$ === void 0 ? void 0 : _tradeStatusMap$data$[item.tradeStatus]
|
|
17039
18068
|
});
|
|
17040
18069
|
});
|
|
17041
18070
|
}
|
|
@@ -17078,6 +18107,10 @@ var getBsE3OrderListSingleton = function getBsE3OrderListSingleton(orderNo) {
|
|
|
17078
18107
|
data.data.orderList = kmkfUtils.filterBsE3Orders(data === null || data === void 0 ? void 0 : data.data, orderNo);
|
|
17079
18108
|
}
|
|
17080
18109
|
resolve(data.data);
|
|
18110
|
+
// 延迟10秒清除,保证订单的时效性
|
|
18111
|
+
setTimeout(function () {
|
|
18112
|
+
singletonMap$1.delete(orderNo);
|
|
18113
|
+
}, 1000 * 10);
|
|
17081
18114
|
} else {
|
|
17082
18115
|
doReject(data);
|
|
17083
18116
|
}
|
|
@@ -17118,6 +18151,7 @@ var getGyOrderListSingleton = function getGyOrderListSingleton(orderNo) {
|
|
|
17118
18151
|
deliveryState: item.deliveryState,
|
|
17119
18152
|
vipCode: item.vipCode,
|
|
17120
18153
|
shopCode: item.shopCode,
|
|
18154
|
+
cancelName: item.cancel ? '是' : '否',
|
|
17121
18155
|
deliveryStateName: kmkfUtils.GY_DELIVERY_STATE_MAPPING[item.deliveryState]
|
|
17122
18156
|
});
|
|
17123
18157
|
});
|
|
@@ -17155,7 +18189,11 @@ var getJstOrderListSingleton = function getJstOrderListSingleton(orderNo) {
|
|
|
17155
18189
|
orderList: (data === null || data === void 0 ? void 0 : data.data) || []
|
|
17156
18190
|
}, orderNo);
|
|
17157
18191
|
resolve(data.data);
|
|
17158
|
-
|
|
18192
|
+
// 延迟10秒清除,保证订单的时效性
|
|
18193
|
+
setTimeout(function () {
|
|
18194
|
+
singletonMap$3.delete(orderNo);
|
|
18195
|
+
}, 1000 * 10);
|
|
18196
|
+
} else {
|
|
17159
18197
|
doReject(data);
|
|
17160
18198
|
}
|
|
17161
18199
|
}).catch(doReject);
|
|
@@ -17198,6 +18236,74 @@ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
|
17198
18236
|
singletonMap$4.delete(orderNo);
|
|
17199
18237
|
reject(err);
|
|
17200
18238
|
};
|
|
18239
|
+
extendRequest('/qy/gdfw/order/wlnOrderList', {
|
|
18240
|
+
method: 'post',
|
|
18241
|
+
data: {
|
|
18242
|
+
billNo: orderNo
|
|
18243
|
+
}
|
|
18244
|
+
}).then(function (data) {
|
|
18245
|
+
if (data === null || data === void 0 ? void 0 : data.success) {
|
|
18246
|
+
resolve(data.data);
|
|
18247
|
+
// 延迟10秒清除,保证订单的时效性
|
|
18248
|
+
setTimeout(function () {
|
|
18249
|
+
singletonMap$4.delete(orderNo);
|
|
18250
|
+
}, 1000 * 10);
|
|
18251
|
+
} else {
|
|
18252
|
+
doReject(data);
|
|
18253
|
+
}
|
|
18254
|
+
}).catch(doReject);
|
|
18255
|
+
});
|
|
18256
|
+
singletonMap$4.set(orderNo, p);
|
|
18257
|
+
}
|
|
18258
|
+
return singletonMap$4.get(orderNo);
|
|
18259
|
+
};
|
|
18260
|
+
var wlnUtils = {
|
|
18261
|
+
getOrderListSingleton: getOrderListSingleton
|
|
18262
|
+
};
|
|
18263
|
+
|
|
18264
|
+
var singletonMap$5 = new Map();
|
|
18265
|
+
var getOrderListSingleton$1 = function getOrderListSingleton(orderNo) {
|
|
18266
|
+
if (!singletonMap$5.has(orderNo)) {
|
|
18267
|
+
var p = new Promise(function (resolve, reject) {
|
|
18268
|
+
var doReject = function doReject(err) {
|
|
18269
|
+
// 清空掉错误的请求记录
|
|
18270
|
+
singletonMap$5.delete(orderNo);
|
|
18271
|
+
reject(err);
|
|
18272
|
+
};
|
|
18273
|
+
extendRequest('/qy/gdfw/order/bsOrderDetail', {
|
|
18274
|
+
method: 'post',
|
|
18275
|
+
data: {
|
|
18276
|
+
billNo: orderNo
|
|
18277
|
+
}
|
|
18278
|
+
}).then(function (data) {
|
|
18279
|
+
if (data === null || data === void 0 ? void 0 : data.success) {
|
|
18280
|
+
resolve(data.data);
|
|
18281
|
+
// 延迟10秒清除,保证订单的时效性
|
|
18282
|
+
setTimeout(function () {
|
|
18283
|
+
singletonMap$5.delete(orderNo);
|
|
18284
|
+
}, 1000 * 10);
|
|
18285
|
+
} else {
|
|
18286
|
+
doReject(data);
|
|
18287
|
+
}
|
|
18288
|
+
}).catch(doReject);
|
|
18289
|
+
});
|
|
18290
|
+
singletonMap$5.set(orderNo, p);
|
|
18291
|
+
}
|
|
18292
|
+
return singletonMap$5.get(orderNo);
|
|
18293
|
+
};
|
|
18294
|
+
var bsUtils = {
|
|
18295
|
+
getOrderListSingleton: getOrderListSingleton$1
|
|
18296
|
+
};
|
|
18297
|
+
|
|
18298
|
+
var singletonMap$6 = new Map();
|
|
18299
|
+
var getOrderListSingleton$2 = function getOrderListSingleton(orderNo) {
|
|
18300
|
+
if (!singletonMap$6.has(orderNo)) {
|
|
18301
|
+
var p = new Promise(function (resolve, reject) {
|
|
18302
|
+
var doReject = function doReject(err) {
|
|
18303
|
+
// 清空掉错误的请求记录
|
|
18304
|
+
singletonMap$6.delete(orderNo);
|
|
18305
|
+
reject(err);
|
|
18306
|
+
};
|
|
17201
18307
|
extendRequest('/qy/gdfw/order/kmErpOrderDetail', {
|
|
17202
18308
|
method: 'post',
|
|
17203
18309
|
data: {
|
|
@@ -17221,22 +18327,22 @@ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
|
17221
18327
|
}
|
|
17222
18328
|
// 延迟10秒清除,保证订单的时效性
|
|
17223
18329
|
setTimeout(function () {
|
|
17224
|
-
singletonMap$
|
|
18330
|
+
singletonMap$6.delete(orderNo);
|
|
17225
18331
|
}, 1000 * 10);
|
|
17226
18332
|
} else {
|
|
17227
18333
|
doReject(data);
|
|
17228
18334
|
}
|
|
17229
18335
|
}).catch(doReject);
|
|
17230
18336
|
});
|
|
17231
|
-
singletonMap$
|
|
18337
|
+
singletonMap$6.set(orderNo, p);
|
|
17232
18338
|
}
|
|
17233
|
-
return singletonMap$
|
|
18339
|
+
return singletonMap$6.get(orderNo);
|
|
17234
18340
|
};
|
|
17235
18341
|
var kmUtils = {
|
|
17236
|
-
getOrderListSingleton: getOrderListSingleton
|
|
18342
|
+
getOrderListSingleton: getOrderListSingleton$2
|
|
17237
18343
|
};
|
|
17238
18344
|
|
|
17239
|
-
var _excluded$h = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
18345
|
+
var _excluded$h = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode", "cancel"];
|
|
17240
18346
|
var columnsMap = {
|
|
17241
18347
|
BS_SYSTEM_ORDER: kmkfUtils.BS_SYSTEM_ORDER_CONFIG.columns,
|
|
17242
18348
|
KM_SYSTEM_ORDER: kmkfUtils.KM_SYSTEM_ORDER_CONFIG.columns,
|
|
@@ -17278,7 +18384,6 @@ var index$3 = (function (props) {
|
|
|
17278
18384
|
} else if (type === 'BS_E3_SYSTEM_ORDER') {
|
|
17279
18385
|
getBsE3OrderList(value.orderNo);
|
|
17280
18386
|
} else if (type === 'GY_SYSTEM_ORDER') {
|
|
17281
|
-
console.log('触发gy--getGyOrderList--1');
|
|
17282
18387
|
getGyOrderList(value.orderNo);
|
|
17283
18388
|
} else if (type === 'JST_SYSTEM_ORDER') {
|
|
17284
18389
|
getJstOrderList(value.orderNo);
|
|
@@ -17290,22 +18395,11 @@ var index$3 = (function (props) {
|
|
|
17290
18395
|
}, [type]);
|
|
17291
18396
|
var getOrderList = /*#__PURE__*/function () {
|
|
17292
18397
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
17293
|
-
var _yield$request, success, data, _valueRef$current;
|
|
17294
18398
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
17295
18399
|
while (1) switch (_context.prev = _context.next) {
|
|
17296
18400
|
case 0:
|
|
17297
|
-
|
|
17298
|
-
|
|
17299
|
-
method: 'post',
|
|
17300
|
-
data: {
|
|
17301
|
-
billNo: orderNo
|
|
17302
|
-
}
|
|
17303
|
-
});
|
|
17304
|
-
case 2:
|
|
17305
|
-
_yield$request = _context.sent;
|
|
17306
|
-
success = _yield$request.success;
|
|
17307
|
-
data = _yield$request.data;
|
|
17308
|
-
if (success) {
|
|
18401
|
+
bsUtils.getOrderListSingleton(orderNo).then(function (data) {
|
|
18402
|
+
var _valueRef$current;
|
|
17309
18403
|
_onChange(_objectSpread2(_objectSpread2({}, (_valueRef$current = valueRef.current) !== null && _valueRef$current !== void 0 ? _valueRef$current : {}), {}, {
|
|
17310
18404
|
orders: (data === null || data === void 0 ? void 0 : data.orders) || [],
|
|
17311
18405
|
showOrderInfo: data === null || data === void 0 ? void 0 : data.orders.map(function (item) {
|
|
@@ -17319,10 +18413,10 @@ var index$3 = (function (props) {
|
|
|
17319
18413
|
};
|
|
17320
18414
|
})
|
|
17321
18415
|
}));
|
|
17322
|
-
}
|
|
18416
|
+
});
|
|
17323
18417
|
|
|
17324
18418
|
onceRef.current = false;
|
|
17325
|
-
case
|
|
18419
|
+
case 2:
|
|
17326
18420
|
case "end":
|
|
17327
18421
|
return _context.stop();
|
|
17328
18422
|
}
|
|
@@ -17334,22 +18428,11 @@ var index$3 = (function (props) {
|
|
|
17334
18428
|
}();
|
|
17335
18429
|
var getWlnOrderList = /*#__PURE__*/function () {
|
|
17336
18430
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(orderNo) {
|
|
17337
|
-
var _yield$request2, success, data, _valueRef$current2;
|
|
17338
18431
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
17339
18432
|
while (1) switch (_context2.prev = _context2.next) {
|
|
17340
18433
|
case 0:
|
|
17341
|
-
|
|
17342
|
-
|
|
17343
|
-
method: 'post',
|
|
17344
|
-
data: {
|
|
17345
|
-
billCode: orderNo
|
|
17346
|
-
}
|
|
17347
|
-
});
|
|
17348
|
-
case 2:
|
|
17349
|
-
_yield$request2 = _context2.sent;
|
|
17350
|
-
success = _yield$request2.success;
|
|
17351
|
-
data = _yield$request2.data;
|
|
17352
|
-
if (success) {
|
|
18434
|
+
wlnUtils.getOrderListSingleton(orderNo).then(function (data) {
|
|
18435
|
+
var _valueRef$current2;
|
|
17353
18436
|
_onChange(_objectSpread2(_objectSpread2({}, (_valueRef$current2 = valueRef.current) !== null && _valueRef$current2 !== void 0 ? _valueRef$current2 : {}), {}, {
|
|
17354
18437
|
orders: data === null || data === void 0 ? void 0 : data.orders.map(function (item) {
|
|
17355
18438
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
@@ -17366,9 +18449,9 @@ var index$3 = (function (props) {
|
|
|
17366
18449
|
};
|
|
17367
18450
|
})
|
|
17368
18451
|
}));
|
|
17369
|
-
}
|
|
18452
|
+
});
|
|
17370
18453
|
onceRef.current = false;
|
|
17371
|
-
case
|
|
18454
|
+
case 2:
|
|
17372
18455
|
case "end":
|
|
17373
18456
|
return _context2.stop();
|
|
17374
18457
|
}
|
|
@@ -17392,11 +18475,13 @@ var index$3 = (function (props) {
|
|
|
17392
18475
|
showOrderInfo: trades.map(function (_ref4) {
|
|
17393
18476
|
var billNo = _ref4.billNo,
|
|
17394
18477
|
billType = _ref4.billType,
|
|
17395
|
-
billTag = _ref4.billTag
|
|
18478
|
+
billTag = _ref4.billTag,
|
|
18479
|
+
tradeStatusValue = _ref4.tradeStatusValue;
|
|
17396
18480
|
return {
|
|
17397
18481
|
billNo: billNo,
|
|
17398
18482
|
billType: billType,
|
|
17399
|
-
billTag: billTag
|
|
18483
|
+
billTag: billTag,
|
|
18484
|
+
tradeStatusValue: tradeStatusValue
|
|
17400
18485
|
};
|
|
17401
18486
|
})
|
|
17402
18487
|
}));
|
|
@@ -17510,6 +18595,7 @@ var index$3 = (function (props) {
|
|
|
17510
18595
|
deliveryState = _ref10.deliveryState,
|
|
17511
18596
|
vipCode = _ref10.vipCode,
|
|
17512
18597
|
shopCode = _ref10.shopCode,
|
|
18598
|
+
cancel = _ref10.cancel,
|
|
17513
18599
|
rest = _objectWithoutProperties(_ref10, _excluded$h);
|
|
17514
18600
|
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
17515
18601
|
billNo: billNo,
|
|
@@ -17517,6 +18603,7 @@ var index$3 = (function (props) {
|
|
|
17517
18603
|
billTag: billTag,
|
|
17518
18604
|
tradeTagName: tradeTagName,
|
|
17519
18605
|
deliveryState: deliveryState,
|
|
18606
|
+
cancelName: cancel ? '是' : '否',
|
|
17520
18607
|
deliveryStateName: kmkfUtils.GY_DELIVERY_STATE_MAPPING[deliveryState],
|
|
17521
18608
|
vipCode: vipCode,
|
|
17522
18609
|
shopCode: shopCode
|
|
@@ -17706,6 +18793,31 @@ var componentMap$1 = {
|
|
|
17706
18793
|
returnDeleteGood: 'jstReturnDeleteGood',
|
|
17707
18794
|
exchangeDeleteGood: 'jstExchangeDeleteGood'
|
|
17708
18795
|
}
|
|
18796
|
+
},
|
|
18797
|
+
KM_GOODS: {
|
|
18798
|
+
type: 'km',
|
|
18799
|
+
key: 'kmGoods',
|
|
18800
|
+
name: '快麦',
|
|
18801
|
+
orderNo: 'tid',
|
|
18802
|
+
goodDetailOrderNo: 'originalDealCode',
|
|
18803
|
+
eventNameMap: {
|
|
18804
|
+
// pubsub 事件
|
|
18805
|
+
type: 'kmType',
|
|
18806
|
+
updateGoodsHandle: kmkfUtils.updateKmGoodsHandle,
|
|
18807
|
+
selectListReturn: 'kmSelectListReturn',
|
|
18808
|
+
selectList: 'kmSelectList',
|
|
18809
|
+
reissueSelectList: 'kmReissueSelectList',
|
|
18810
|
+
reissueSelectListReturn: 'kmReissueSelectListReturn',
|
|
18811
|
+
reissueDeleteGood: 'kmReissueDeleteGood',
|
|
18812
|
+
changeShopCode: 'kmChangeShopCode',
|
|
18813
|
+
reissueType: 'kmReissueType',
|
|
18814
|
+
returnType: 'kmReturnType',
|
|
18815
|
+
returnSelectListReturn: 'kmReturnSelectListReturn',
|
|
18816
|
+
returnSelectList: 'kmReturnSelectList',
|
|
18817
|
+
deleteGood: 'kmDeleteGood',
|
|
18818
|
+
returnDeleteGood: 'kmReturnDeleteGood',
|
|
18819
|
+
exchangeDeleteGood: 'kmExchangeDeleteGood'
|
|
18820
|
+
}
|
|
17709
18821
|
}
|
|
17710
18822
|
};
|
|
17711
18823
|
var CommonGoods = function CommonGoods(props) {
|
|
@@ -17714,7 +18826,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
17714
18826
|
disabled = props.disabled,
|
|
17715
18827
|
onChange = props.onChange,
|
|
17716
18828
|
compType = props.type;
|
|
17717
|
-
console.log('value?.orders', value
|
|
18829
|
+
// console.log('value?.orders', value?.orders);
|
|
17718
18830
|
// 合并单订单会包含","
|
|
17719
18831
|
var showModeBtn = !['BS_E3_GOODS'].includes(compType) && ((value === null || value === void 0 ? void 0 : value.orders) || []).some(function (order) {
|
|
17720
18832
|
var _order$componentMap$c;
|
|
@@ -17867,7 +18979,9 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
17867
18979
|
var getGoodDetails = function getGoodDetails(_ref2) {
|
|
17868
18980
|
var mode = _ref2.mode;
|
|
17869
18981
|
var updateHandle = componentMap$1[compType].eventNameMap['updateGoodsHandle'];
|
|
17870
|
-
var goodDetails = updateHandle(value.orders || []
|
|
18982
|
+
var goodDetails = updateHandle(value.orders || [], {
|
|
18983
|
+
orderBackGoodsLevel: props.orderBackGoodsLevel
|
|
18984
|
+
});
|
|
17871
18985
|
var orderNo = value.orderNo;
|
|
17872
18986
|
return mode ? goodDetails.filter(function (goodItem) {
|
|
17873
18987
|
var _componentMap$compTyp;
|
|
@@ -17921,7 +19035,8 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
17921
19035
|
_props$reasonList = props.reasonList,
|
|
17922
19036
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
17923
19037
|
disabled = props.disabled,
|
|
17924
|
-
compType = props.type
|
|
19038
|
+
compType = props.type,
|
|
19039
|
+
isSettingConfig = props.isSettingConfig;
|
|
17925
19040
|
var valueRef = React.useRef({});
|
|
17926
19041
|
React.useEffect(function () {
|
|
17927
19042
|
var subscription = pubsub__default['default'].subscribe(componentMap$2[compType].eventNameMap.exchangeCopyGood, function () {
|
|
@@ -18013,7 +19128,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
18013
19128
|
var newValue = _objectSpread2({}, value);
|
|
18014
19129
|
newValue[componentMap$2[compType].returnTypeKey] = val;
|
|
18015
19130
|
newValue[componentMap$2[compType].valueKey] = [];
|
|
18016
|
-
if (['2'].includes(val[0])) {
|
|
19131
|
+
if (isSettingConfig || ['2'].includes(val[0])) {
|
|
18017
19132
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18018
19133
|
valueRef.current = newValue;
|
|
18019
19134
|
}
|
|
@@ -18035,7 +19150,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
18035
19150
|
style: {
|
|
18036
19151
|
marginBottom: '8px'
|
|
18037
19152
|
},
|
|
18038
|
-
disabled: disabled,
|
|
19153
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
18039
19154
|
allowClear: false,
|
|
18040
19155
|
options: reasonList,
|
|
18041
19156
|
value: value === null || value === void 0 ? void 0 : value[componentMap$2[compType].returnTypeKey],
|
|
@@ -18217,7 +19332,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
18217
19332
|
})));
|
|
18218
19333
|
};
|
|
18219
19334
|
|
|
18220
|
-
var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
19335
|
+
var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
|
|
18221
19336
|
var typeMap$1 = {
|
|
18222
19337
|
WDT_REISSUE_GOODS: {
|
|
18223
19338
|
key: 'wdtReissueGoods',
|
|
@@ -18238,13 +19353,14 @@ var typeMap$1 = {
|
|
|
18238
19353
|
}
|
|
18239
19354
|
};
|
|
18240
19355
|
var wdtReissue = function wdtReissue(props) {
|
|
18241
|
-
var _value$wdtSystemOrder, _typeMap$
|
|
19356
|
+
var _value$wdtSystemOrder, _typeMap$type23, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s5, _typeMap$type27, _typeMap$type28, _typeMap$type29;
|
|
18242
19357
|
var value = props.value,
|
|
18243
19358
|
onChange = props.onChange,
|
|
18244
19359
|
_props$reasonList = props.reasonList,
|
|
18245
19360
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
18246
19361
|
disabled = props.disabled,
|
|
18247
19362
|
type = props.type,
|
|
19363
|
+
isSettingConfig = props.isSettingConfig,
|
|
18248
19364
|
other = _objectWithoutProperties(props, _excluded$i);
|
|
18249
19365
|
var showModeBtn = ((value === null || value === void 0 ? void 0 : (_value$wdtSystemOrder = value.wdtSystemOrder) === null || _value$wdtSystemOrder === void 0 ? void 0 : _value$wdtSystemOrder.orders) || []).some(function (order) {
|
|
18250
19366
|
var _order$srcTid;
|
|
@@ -18308,11 +19424,13 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18308
19424
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
18309
19425
|
var billNo = _ref2.billNo,
|
|
18310
19426
|
billType = _ref2.billType,
|
|
18311
|
-
billTag = _ref2.billTag
|
|
19427
|
+
billTag = _ref2.billTag,
|
|
19428
|
+
tradeStatusValue = _ref2.tradeStatusValue;
|
|
18312
19429
|
return {
|
|
18313
19430
|
billNo: billNo,
|
|
18314
19431
|
billType: billType,
|
|
18315
|
-
billTag: billTag
|
|
19432
|
+
billTag: billTag,
|
|
19433
|
+
tradeStatusValue: tradeStatusValue
|
|
18316
19434
|
};
|
|
18317
19435
|
});
|
|
18318
19436
|
onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, _defineProperty({}, (_typeMap$type5 = typeMap$1[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, ((_ref3 = valueRef.current || {}) === null || _ref3 === void 0 ? void 0 : _ref3[(_typeMap$type6 = typeMap$1[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]) || {}), {}, {
|
|
@@ -18395,7 +19513,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18395
19513
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18396
19514
|
};
|
|
18397
19515
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
18398
|
-
var _typeMap$type21, _typeMap$type22, _uniqBy
|
|
19516
|
+
var _typeMap$type21, _typeMap$type22, _uniqBy;
|
|
18399
19517
|
var newValue = _objectSpread2({}, value);
|
|
18400
19518
|
// 原订单商品
|
|
18401
19519
|
var originTradeGoodList = getGoodDetails({
|
|
@@ -18406,14 +19524,14 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18406
19524
|
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type22 = typeMap$1[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
18407
19525
|
return skuList.includes(item.uuid);
|
|
18408
19526
|
});
|
|
18409
|
-
console.log('商品发生变化', newValue[
|
|
19527
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
18410
19528
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18411
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19529
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)], isStrict]);
|
|
18412
19530
|
//显示选择商品按钮 原单换不显示选择商品
|
|
18413
19531
|
var showChangeBtn = React.useMemo(function () {
|
|
18414
|
-
var _typeMap$
|
|
18415
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
18416
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19532
|
+
var _typeMap$type24;
|
|
19533
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo]);
|
|
19534
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]]);
|
|
18417
19535
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
18418
19536
|
gutter: 8,
|
|
18419
19537
|
wrap: true
|
|
@@ -18427,16 +19545,17 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18427
19545
|
}
|
|
18428
19546
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
18429
19547
|
style: {
|
|
18430
|
-
marginBottom: '8px'
|
|
19548
|
+
marginBottom: '8px',
|
|
19549
|
+
width: '100%'
|
|
18431
19550
|
},
|
|
18432
19551
|
disabled: disabled,
|
|
18433
19552
|
allowClear: false,
|
|
18434
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19553
|
+
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.systemOrderNo)],
|
|
18435
19554
|
onChange: function onChange(val) {
|
|
18436
19555
|
return changeSystemOrderHandle(val);
|
|
18437
19556
|
},
|
|
18438
19557
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
18439
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
19558
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
18440
19559
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
18441
19560
|
key: item.billNo,
|
|
18442
19561
|
value: item.billNo,
|
|
@@ -18452,12 +19571,13 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18452
19571
|
}
|
|
18453
19572
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
18454
19573
|
style: {
|
|
18455
|
-
marginBottom: '8px'
|
|
19574
|
+
marginBottom: '8px',
|
|
19575
|
+
width: '100%'
|
|
18456
19576
|
},
|
|
18457
|
-
disabled: disabled,
|
|
19577
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
18458
19578
|
allowClear: false,
|
|
18459
19579
|
options: reasonList,
|
|
18460
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19580
|
+
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)],
|
|
18461
19581
|
onChange: function onChange(val) {
|
|
18462
19582
|
return changeTypeHandle(val);
|
|
18463
19583
|
}
|
|
@@ -18469,7 +19589,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18469
19589
|
canUpdateNumber: showChangeBtn,
|
|
18470
19590
|
showChangeBtn: showChangeBtn,
|
|
18471
19591
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18472
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19592
|
+
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)],
|
|
18473
19593
|
onChange: function onChange(val) {
|
|
18474
19594
|
return changeGoodHandle(val);
|
|
18475
19595
|
},
|
|
@@ -18485,7 +19605,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18485
19605
|
})));
|
|
18486
19606
|
};
|
|
18487
19607
|
|
|
18488
|
-
var _excluded$j = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
19608
|
+
var _excluded$j = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
|
|
18489
19609
|
var typeMap$2 = {
|
|
18490
19610
|
JST_REISSUE_GOODS: {
|
|
18491
19611
|
compType: '补发',
|
|
@@ -18500,7 +19620,9 @@ var typeMap$2 = {
|
|
|
18500
19620
|
orderTypeKey: 'orderType',
|
|
18501
19621
|
oIdKey: 'oId',
|
|
18502
19622
|
outerOiIdKey: '',
|
|
18503
|
-
goodDetailsKey: 'items'
|
|
19623
|
+
goodDetailsKey: 'items',
|
|
19624
|
+
mergeIdenticalGoods: kmkfUtils.jstMergeIdenticalGoods,
|
|
19625
|
+
uniqueKey: 'uuid'
|
|
18504
19626
|
},
|
|
18505
19627
|
JST_RETURN_GOODS: {
|
|
18506
19628
|
compType: '退货',
|
|
@@ -18516,6 +19638,8 @@ var typeMap$2 = {
|
|
|
18516
19638
|
oIdKey: 'oId',
|
|
18517
19639
|
outerOiIdKey: '',
|
|
18518
19640
|
goodDetailsKey: 'items',
|
|
19641
|
+
mergeIdenticalGoods: kmkfUtils.jstMergeIdenticalGoods,
|
|
19642
|
+
uniqueKey: 'uuid',
|
|
18519
19643
|
eventNameMap: {
|
|
18520
19644
|
// pubsub 事件
|
|
18521
19645
|
exchangeCopyGood: 'jstExchangeCopyGood',
|
|
@@ -18523,16 +19647,32 @@ var typeMap$2 = {
|
|
|
18523
19647
|
returnGoodsSysorder: 'jstReturnGoodsSysorder',
|
|
18524
19648
|
returnGoodsSysorderBack: 'jstReturnGoodsSysorderBack'
|
|
18525
19649
|
}
|
|
19650
|
+
},
|
|
19651
|
+
KM_REISSUE_GOODS: {
|
|
19652
|
+
compType: '补发',
|
|
19653
|
+
key: 'kmReissueGoods',
|
|
19654
|
+
typeName: 'kmReissueType',
|
|
19655
|
+
systemOrder: 'kmSystemOrder',
|
|
19656
|
+
systemOrderNo: 'kmSystemOrderNo',
|
|
19657
|
+
getOrderList: kmUtils.getOrderListSingleton,
|
|
19658
|
+
updateGoodsHandle: kmkfUtils.updateKmGoodsHandle,
|
|
19659
|
+
alwaysShowChooseErpGoodsBtn: true,
|
|
19660
|
+
orderTypeKey: 'orderType',
|
|
19661
|
+
oIdKey: 'billNo',
|
|
19662
|
+
outerOiIdKey: '',
|
|
19663
|
+
goodDetailsKey: 'subOrders',
|
|
19664
|
+
uniqueKey: 'id'
|
|
18526
19665
|
}
|
|
18527
19666
|
};
|
|
18528
19667
|
var PublicReissue = function PublicReissue(props) {
|
|
18529
|
-
var _typeMap$
|
|
19668
|
+
var _typeMap$type32, _typeMap$type37, _typeMap$type38, _typeMap$type39, _typeMap$type40, _value$typeMap$type$s6, _typeMap$type41, _typeMap$type42, _typeMap$type43, _typeMap$type44, _typeMap$type45, _typeMap$type46, _typeMap$type47, _typeMap$type48;
|
|
18530
19669
|
var value = props.value,
|
|
18531
19670
|
onChange = props.onChange,
|
|
18532
19671
|
_props$reasonList = props.reasonList,
|
|
18533
19672
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
18534
19673
|
disabled = props.disabled,
|
|
18535
19674
|
type = props.type,
|
|
19675
|
+
isSettingConfig = props.isSettingConfig,
|
|
18536
19676
|
other = _objectWithoutProperties(props, _excluded$j);
|
|
18537
19677
|
var getOrderFlag = React.useRef(false);
|
|
18538
19678
|
var _useState = React.useState(false),
|
|
@@ -18639,7 +19779,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18639
19779
|
}))));
|
|
18640
19780
|
};
|
|
18641
19781
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
18642
|
-
var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19;
|
|
19782
|
+
var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19, _typeMap$type20;
|
|
18643
19783
|
var mode = _ref4.mode,
|
|
18644
19784
|
sysOrderNo = _ref4.sysOrderNo;
|
|
18645
19785
|
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type17 = typeMap$2[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrder];
|
|
@@ -18647,63 +19787,74 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18647
19787
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
18648
19788
|
return order[typeMap$2[type].oIdKey] === systemOrderNo;
|
|
18649
19789
|
});
|
|
18650
|
-
var
|
|
19790
|
+
var orderRest = undefined;
|
|
19791
|
+
if (['JST_REISSUE_GOODS', 'JST_RETURN_GOODS'].includes(type)) {
|
|
19792
|
+
orderRest = true;
|
|
19793
|
+
} else if (type === 'KM_REISSUE_GOODS') {
|
|
19794
|
+
orderRest = {
|
|
19795
|
+
orderBackGoodsLevel: props.orderBackGoodsLevel,
|
|
19796
|
+
canEdit: true
|
|
19797
|
+
};
|
|
19798
|
+
}
|
|
19799
|
+
var goodDetails = (order === null || order === void 0 ? void 0 : (_order$typeMap$type$g = order[typeMap$2[type].goodDetailsKey]) === null || _order$typeMap$type$g === void 0 ? void 0 : _order$typeMap$type$g.length) ? typeMap$2[type].mergeIdenticalGoods ? typeMap$2[type].mergeIdenticalGoods((_typeMap$type19 = typeMap$2[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.updateGoodsHandle([order], orderRest)) : (_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.updateGoodsHandle([order], orderRest) : [];
|
|
18651
19800
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
18652
|
-
|
|
19801
|
+
var list = mode ? goodDetails.filter(function (goodItem) {
|
|
18653
19802
|
return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
|
|
18654
19803
|
}) : goodDetails;
|
|
19804
|
+
return list;
|
|
18655
19805
|
};
|
|
18656
19806
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
18657
|
-
var _typeMap$
|
|
19807
|
+
var _typeMap$type21;
|
|
18658
19808
|
var newValue = _objectSpread2({}, value);
|
|
18659
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19809
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.key)] = val || [];
|
|
18660
19810
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18661
19811
|
};
|
|
18662
19812
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
18663
|
-
var _typeMap$
|
|
19813
|
+
var _typeMap$type22, _typeMap$type23, _value$typeMap$type$t2, _typeMap$type28, _value$typeMap$type$t3, _typeMap$type30;
|
|
18664
19814
|
var newValue = _objectSpread2({}, value);
|
|
18665
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18666
|
-
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18667
|
-
var _value$typeMap$type$s5, _typeMap$
|
|
18668
|
-
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
19815
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrderNo)] = val;
|
|
19816
|
+
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrderBillType) {
|
|
19817
|
+
var _value$typeMap$type$s5, _typeMap$type24, _typeMap$type26, _typeMap$type27;
|
|
19818
|
+
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.orders) || [];
|
|
18669
19819
|
var targetOrder = val && orders.find(function (oItem) {
|
|
18670
|
-
var _typeMap$
|
|
18671
|
-
return oItem[(_typeMap$
|
|
19820
|
+
var _typeMap$type25;
|
|
19821
|
+
return oItem[(_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.oIdKey] === val;
|
|
18672
19822
|
});
|
|
18673
|
-
newValue[(_typeMap$
|
|
18674
|
-
}
|
|
18675
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
18676
|
-
var _typeMap$
|
|
18677
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18678
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
18679
|
-
var _typeMap$
|
|
18680
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19823
|
+
newValue[(_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderBillType] = targetOrder === null || targetOrder === void 0 ? void 0 : targetOrder[(_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.orderTypeKey];
|
|
19824
|
+
}
|
|
19825
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type28 = typeMap$2[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
|
|
19826
|
+
var _typeMap$type29;
|
|
19827
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type29 = typeMap$2[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)] = [];
|
|
19828
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type30 = typeMap$2[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
19829
|
+
var _typeMap$type31;
|
|
19830
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type31 = typeMap$2[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.key)] = getGoodDetails({
|
|
18681
19831
|
mode: isStrict,
|
|
18682
19832
|
sysOrderNo: val
|
|
18683
19833
|
});
|
|
18684
19834
|
}
|
|
18685
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19835
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue, 'systemOrder');
|
|
18686
19836
|
};
|
|
18687
19837
|
//显示选择商品按钮
|
|
18688
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19838
|
+
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type32 = typeMap$2[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrderNo]);
|
|
18689
19839
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
18690
|
-
var _typeMap$
|
|
19840
|
+
var _typeMap$type33, _typeMap$type34, _uniqBy, _typeMap$type35;
|
|
18691
19841
|
var newValue = _objectSpread2({}, value);
|
|
18692
19842
|
// 原订单商品
|
|
18693
19843
|
var originTradeGoodList = getGoodDetails({
|
|
18694
19844
|
mode: isStrict
|
|
18695
19845
|
}) || [];
|
|
18696
19846
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
18697
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18698
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18699
|
-
|
|
19847
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type33 = typeMap$2[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.key)]) || [];
|
|
19848
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type34 = typeMap$2[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type35 = typeMap$2[type]) === null || _typeMap$type35 === void 0 ? void 0 : _typeMap$type35.uniqueKey) || 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
19849
|
+
var _typeMap$type36;
|
|
19850
|
+
return skuList.includes(item[typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type36 = typeMap$2[type]) === null || _typeMap$type36 === void 0 ? void 0 : _typeMap$type36.uniqueKey]);
|
|
18700
19851
|
});
|
|
18701
19852
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18702
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19853
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type37 = typeMap$2[type]) === null || _typeMap$type37 === void 0 ? void 0 : _typeMap$type37.key)], isStrict]);
|
|
18703
19854
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
18704
19855
|
gutter: 8,
|
|
18705
19856
|
wrap: true,
|
|
18706
|
-
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19857
|
+
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type38 = typeMap$2[type]) === null || _typeMap$type38 === void 0 ? void 0 : _typeMap$type38.key) || "".concat(Date.now())
|
|
18707
19858
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
18708
19859
|
className: "gutter-row",
|
|
18709
19860
|
xs: {
|
|
@@ -18714,16 +19865,17 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18714
19865
|
}
|
|
18715
19866
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
18716
19867
|
style: {
|
|
18717
|
-
marginBottom: '8px'
|
|
19868
|
+
marginBottom: '8px',
|
|
19869
|
+
width: '100%'
|
|
18718
19870
|
},
|
|
18719
19871
|
disabled: disabled,
|
|
18720
19872
|
allowClear: false,
|
|
18721
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19873
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type39 = typeMap$2[type]) === null || _typeMap$type39 === void 0 ? void 0 : _typeMap$type39.systemOrderNo)],
|
|
18722
19874
|
onChange: function onChange(val) {
|
|
18723
19875
|
return changeSystemOrderHandle(val);
|
|
18724
19876
|
},
|
|
18725
|
-
placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18726
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$
|
|
19877
|
+
placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type40 = typeMap$2[type]) === null || _typeMap$type40 === void 0 ? void 0 : _typeMap$type40.compType) || '', "\u7CFB\u7EDF\u5355")
|
|
19878
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$type41 = typeMap$2[type]) === null || _typeMap$type41 === void 0 ? void 0 : _typeMap$type41.systemOrder]) === null || _value$typeMap$type$s6 === void 0 ? void 0 : _value$typeMap$type$s6.showOrderInfo) || []).map(function (item) {
|
|
18727
19879
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
18728
19880
|
key: item[typeMap$2[type].oIdKey],
|
|
18729
19881
|
value: item[typeMap$2[type].oIdKey],
|
|
@@ -18739,16 +19891,17 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18739
19891
|
}
|
|
18740
19892
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
18741
19893
|
style: {
|
|
18742
|
-
marginBottom: '8px'
|
|
19894
|
+
marginBottom: '8px',
|
|
19895
|
+
width: '100%'
|
|
18743
19896
|
},
|
|
18744
|
-
disabled: disabled,
|
|
19897
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
18745
19898
|
allowClear: false,
|
|
18746
19899
|
options: reasonList,
|
|
18747
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19900
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type42 = typeMap$2[type]) === null || _typeMap$type42 === void 0 ? void 0 : _typeMap$type42.typeName)],
|
|
18748
19901
|
onChange: function onChange(val) {
|
|
18749
19902
|
return changeTypeHandle(val);
|
|
18750
19903
|
}
|
|
18751
|
-
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19904
|
+
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type43 = typeMap$2[type]) === null || _typeMap$type43 === void 0 ? void 0 : _typeMap$type43.systemOrderBillType) && !isSettingConfig && /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
18752
19905
|
className: "gutter-row",
|
|
18753
19906
|
xs: {
|
|
18754
19907
|
span: 11
|
|
@@ -18757,7 +19910,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18757
19910
|
span: 6
|
|
18758
19911
|
}
|
|
18759
19912
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
18760
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19913
|
+
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.systemOrderBillType)],
|
|
18761
19914
|
disabled: disabled,
|
|
18762
19915
|
readOnly: true
|
|
18763
19916
|
}))), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
@@ -18767,10 +19920,10 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18767
19920
|
disabled: disabled,
|
|
18768
19921
|
canUpdateNumber: showChangeBtn,
|
|
18769
19922
|
showChangeBtn: showChangeBtn,
|
|
18770
|
-
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18771
|
-
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19923
|
+
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type45 = typeMap$2[type]) === null || _typeMap$type45 === void 0 ? void 0 : _typeMap$type45.alwaysShowChooseErpGoodsBtn,
|
|
19924
|
+
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type46 = typeMap$2[type]) === null || _typeMap$type46 === void 0 ? void 0 : _typeMap$type46.showErpGoodsBtn,
|
|
18772
19925
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18773
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19926
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type47 = typeMap$2[type]) === null || _typeMap$type47 === void 0 ? void 0 : _typeMap$type47.key)],
|
|
18774
19927
|
onChange: function onChange(val) {
|
|
18775
19928
|
return changeGoodHandle(val);
|
|
18776
19929
|
},
|
|
@@ -18781,6 +19934,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18781
19934
|
originDataSource: getGoodDetails({
|
|
18782
19935
|
mode: isStrict
|
|
18783
19936
|
}),
|
|
19937
|
+
uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type48 = typeMap$2[type]) === null || _typeMap$type48 === void 0 ? void 0 : _typeMap$type48.uniqueKey) || 'uuid',
|
|
18784
19938
|
selectedGoodsChange: selectedGoodsChange
|
|
18785
19939
|
}
|
|
18786
19940
|
})));
|
|
@@ -19319,6 +20473,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
19319
20473
|
var _props$value = props.value,
|
|
19320
20474
|
value = _props$value === void 0 ? [] : _props$value,
|
|
19321
20475
|
onChange = props.onChange,
|
|
20476
|
+
onBlur = props.onBlur,
|
|
19322
20477
|
disabled = props.disabled,
|
|
19323
20478
|
_props$type = props.type,
|
|
19324
20479
|
type = _props$type === void 0 ? 1 : _props$type;
|
|
@@ -19400,6 +20555,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
19400
20555
|
onChange: function onChange(e) {
|
|
19401
20556
|
return changeInputHandle(e.target.value, 'billNo');
|
|
19402
20557
|
},
|
|
20558
|
+
onBlur: onBlur,
|
|
19403
20559
|
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.billNo
|
|
19404
20560
|
})) : null) : null);
|
|
19405
20561
|
};
|
|
@@ -19541,6 +20697,64 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
19541
20697
|
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
|
|
19542
20698
|
};
|
|
19543
20699
|
|
|
20700
|
+
var _excluded$n = ["mode", "maxSelectCount", "showOnly", "getOptionsAsync", "onChange"];
|
|
20701
|
+
var AsyncSelect = function AsyncSelect(props) {
|
|
20702
|
+
var mode = props.mode,
|
|
20703
|
+
maxSelectCount = props.maxSelectCount,
|
|
20704
|
+
_props$showOnly = props.showOnly,
|
|
20705
|
+
showOnly = _props$showOnly === void 0 ? false : _props$showOnly,
|
|
20706
|
+
getOptionsAsync = props.getOptionsAsync,
|
|
20707
|
+
_onChange = props.onChange,
|
|
20708
|
+
otherProps = _objectWithoutProperties(props, _excluded$n);
|
|
20709
|
+
var _React$useState = React__default['default'].useState([]),
|
|
20710
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
20711
|
+
data = _React$useState2[0],
|
|
20712
|
+
setData = _React$useState2[1];
|
|
20713
|
+
React__default['default'].useEffect(function () {
|
|
20714
|
+
getOptionsAsync === null || getOptionsAsync === void 0 ? void 0 : getOptionsAsync().then(function (list) {
|
|
20715
|
+
setData(list);
|
|
20716
|
+
});
|
|
20717
|
+
}, []);
|
|
20718
|
+
var options = [].concat(_toConsumableArray(props.options || []), _toConsumableArray(data || []));
|
|
20719
|
+
var getValueString = function getValueString(value) {
|
|
20720
|
+
var list = options;
|
|
20721
|
+
if (mode === 'multiple' && Array.isArray(value)) {
|
|
20722
|
+
var _list$filter$map$join;
|
|
20723
|
+
return (_list$filter$map$join = list.filter(function (item) {
|
|
20724
|
+
return value.includes(item.value);
|
|
20725
|
+
}).map(function (item) {
|
|
20726
|
+
return item.label;
|
|
20727
|
+
}).join(',')) !== null && _list$filter$map$join !== void 0 ? _list$filter$map$join : '--';
|
|
20728
|
+
} else {
|
|
20729
|
+
var selectedItem = list.find(function (item) {
|
|
20730
|
+
return item.value === value;
|
|
20731
|
+
});
|
|
20732
|
+
return selectedItem ? selectedItem.label : value !== null && value !== void 0 ? value : '--';
|
|
20733
|
+
}
|
|
20734
|
+
};
|
|
20735
|
+
if (showOnly) {
|
|
20736
|
+
return getValueString(props.value);
|
|
20737
|
+
}
|
|
20738
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Select, _objectSpread2(_objectSpread2({
|
|
20739
|
+
showArrow: true,
|
|
20740
|
+
showSearch: true,
|
|
20741
|
+
filterOption: function filterOption(input, option) {
|
|
20742
|
+
return option.label.includes(input);
|
|
20743
|
+
},
|
|
20744
|
+
notFoundContent: null
|
|
20745
|
+
}, otherProps), {}, {
|
|
20746
|
+
options: options,
|
|
20747
|
+
mode: mode,
|
|
20748
|
+
onChange: function onChange(value, option) {
|
|
20749
|
+
if (mode === 'multiple' && maxSelectCount && maxSelectCount < value.length) {
|
|
20750
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(value.slice(-maxSelectCount), option);
|
|
20751
|
+
} else {
|
|
20752
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(value, option);
|
|
20753
|
+
}
|
|
20754
|
+
}
|
|
20755
|
+
}));
|
|
20756
|
+
};
|
|
20757
|
+
|
|
19544
20758
|
var CalculationInput = function CalculationInput(props) {
|
|
19545
20759
|
var _props$config = props.config,
|
|
19546
20760
|
config = _props$config === void 0 ? {} : _props$config;
|
|
@@ -19559,7 +20773,7 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
19559
20773
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
19560
20774
|
};
|
|
19561
20775
|
|
|
19562
|
-
var _excluded$
|
|
20776
|
+
var _excluded$o = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
|
|
19563
20777
|
var typeMap$3 = {
|
|
19564
20778
|
BS_E3_REISSUE_GOODS: {
|
|
19565
20779
|
key: 'bsE3ReissueGoods',
|
|
@@ -19577,7 +20791,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19577
20791
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
19578
20792
|
disabled = props.disabled,
|
|
19579
20793
|
type = props.type,
|
|
19580
|
-
|
|
20794
|
+
isSettingConfig = props.isSettingConfig,
|
|
20795
|
+
other = _objectWithoutProperties(props, _excluded$o);
|
|
19581
20796
|
var getOrderFlag = React.useRef(false);
|
|
19582
20797
|
var valueRef = React.useRef(null);
|
|
19583
20798
|
var _useState = React.useState(false),
|
|
@@ -19737,7 +20952,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19737
20952
|
}
|
|
19738
20953
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
19739
20954
|
style: {
|
|
19740
|
-
marginBottom: '8px'
|
|
20955
|
+
marginBottom: '8px',
|
|
20956
|
+
width: '100%'
|
|
19741
20957
|
},
|
|
19742
20958
|
disabled: disabled,
|
|
19743
20959
|
allowClear: false,
|
|
@@ -19762,9 +20978,10 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19762
20978
|
}
|
|
19763
20979
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
19764
20980
|
style: {
|
|
19765
|
-
marginBottom: '8px'
|
|
20981
|
+
marginBottom: '8px',
|
|
20982
|
+
width: '100%'
|
|
19766
20983
|
},
|
|
19767
|
-
disabled: disabled,
|
|
20984
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
19768
20985
|
allowClear: false,
|
|
19769
20986
|
options: reasonList,
|
|
19770
20987
|
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type27 = typeMap$3[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.typeName)],
|
|
@@ -19795,7 +21012,11 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19795
21012
|
})));
|
|
19796
21013
|
};
|
|
19797
21014
|
|
|
19798
|
-
var
|
|
21015
|
+
var css_248z$c = ".index-module_systemNoDisabled__1s7aJ.ant-select-item-option-disabled {\n color: #dadada !important;\n}\n";
|
|
21016
|
+
var styles$5 = {"systemNoDisabled":"index-module_systemNoDisabled__1s7aJ"};
|
|
21017
|
+
styleInject(css_248z$c);
|
|
21018
|
+
|
|
21019
|
+
var _excluded$p = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
|
|
19799
21020
|
_excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
19800
21021
|
var typeMap$4 = {
|
|
19801
21022
|
GY_REISSUE_GOODS: {
|
|
@@ -19817,17 +21038,19 @@ var typeMap$4 = {
|
|
|
19817
21038
|
}
|
|
19818
21039
|
};
|
|
19819
21040
|
var GyReissue = function GyReissue(props) {
|
|
19820
|
-
var _typeMap$
|
|
21041
|
+
var _typeMap$type29, _typeMap$type30, _typeMap$type31, _systemOrder$orders, _typeMap$type32, _value$typeMap$type$s7, _typeMap$type33, _typeMap$type34, _typeMap$type35;
|
|
19821
21042
|
var value = props.value,
|
|
19822
21043
|
onChange = props.onChange,
|
|
19823
21044
|
_props$reasonList = props.reasonList,
|
|
19824
21045
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
19825
21046
|
disabled = props.disabled,
|
|
19826
21047
|
type = props.type,
|
|
19827
|
-
|
|
21048
|
+
isSettingConfig = props.isSettingConfig,
|
|
21049
|
+
other = _objectWithoutProperties(props, _excluded$p);
|
|
19828
21050
|
// const showModeBtn = (value?.gySystemOrder?.orders || []).some((order: any) =>
|
|
19829
21051
|
// order?.platformCode?.includes(';'),
|
|
19830
21052
|
// );
|
|
21053
|
+
var getVipCodeFlag = React.useRef(false);
|
|
19831
21054
|
var getOrderFlag = React.useRef(false);
|
|
19832
21055
|
var valueRef = React.useRef(null);
|
|
19833
21056
|
var _useState = React.useState(false),
|
|
@@ -19835,23 +21058,27 @@ var GyReissue = function GyReissue(props) {
|
|
|
19835
21058
|
isStrict = _useState2[0],
|
|
19836
21059
|
setIsStrict = _useState2[1];
|
|
19837
21060
|
React.useEffect(function () {
|
|
19838
|
-
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
21061
|
+
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2, _typeMap$type4, _value$typeMap$type$s5, _typeMap$type5;
|
|
19839
21062
|
valueRef.current = value;
|
|
19840
21063
|
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$4[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.systemOrder]) === null || _value$typeMap$type$s === void 0 ? void 0 : (_value$typeMap$type$s2 = _value$typeMap$type$s.orders) === null || _value$typeMap$type$s2 === void 0 ? void 0 : _value$typeMap$type$s2.length) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s3 = value[(_typeMap$type2 = typeMap$4[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.systemOrder]) === null || _value$typeMap$type$s3 === void 0 ? void 0 : _value$typeMap$type$s3.orderNo)) {
|
|
19841
21064
|
var _value$typeMap$type$s4, _typeMap$type3;
|
|
19842
21065
|
getOrderFlag.current = true;
|
|
19843
21066
|
getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$4[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.systemOrder]) === null || _value$typeMap$type$s4 === void 0 ? void 0 : _value$typeMap$type$s4.orderNo);
|
|
21067
|
+
} else if (!getVipCodeFlag.current && (value === null || value === void 0 ? void 0 : value[(_typeMap$type4 = typeMap$4[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.systemOrderNo]) && !(value === null || value === void 0 ? void 0 : value.vipCode) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type5 = typeMap$4[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.orderNo)) {
|
|
21068
|
+
var _value$typeMap$type$s6, _typeMap$type6;
|
|
21069
|
+
getVipCodeFlag.current = true;
|
|
21070
|
+
getVipCode(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$type6 = typeMap$4[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]) === null || _value$typeMap$type$s6 === void 0 ? void 0 : _value$typeMap$type$s6.orderNo);
|
|
19844
21071
|
}
|
|
19845
21072
|
return;
|
|
19846
21073
|
}, [value]);
|
|
19847
21074
|
var getOrderList = /*#__PURE__*/function () {
|
|
19848
21075
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
19849
|
-
var _typeMap$
|
|
21076
|
+
var _typeMap$type7;
|
|
19850
21077
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
19851
21078
|
while (1) switch (_context.prev = _context.next) {
|
|
19852
21079
|
case 0:
|
|
19853
|
-
(_typeMap$
|
|
19854
|
-
var _typeMap$
|
|
21080
|
+
(_typeMap$type7 = typeMap$4[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.getOrderList(orderNo).then(function (data) {
|
|
21081
|
+
var _typeMap$type8, _ref3, _typeMap$type9, _orders$, _orders$2, _objectSpread2$1;
|
|
19855
21082
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
19856
21083
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
19857
21084
|
var billNo = _ref2.billNo,
|
|
@@ -19873,17 +21100,15 @@ var GyReissue = function GyReissue(props) {
|
|
|
19873
21100
|
shopCode: shopCode
|
|
19874
21101
|
});
|
|
19875
21102
|
});
|
|
21103
|
+
var newValue = _objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, (_objectSpread2$1 = {}, _defineProperty(_objectSpread2$1, (_typeMap$type8 = typeMap$4[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.systemOrder, _objectSpread2(_objectSpread2({}, ((_ref3 = valueRef.current || {}) === null || _ref3 === void 0 ? void 0 : _ref3[(_typeMap$type9 = typeMap$4[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.systemOrder]) || {}), {}, {
|
|
21104
|
+
showOrderInfo: showOrderInfo,
|
|
21105
|
+
orders: orders
|
|
21106
|
+
})), _defineProperty(_objectSpread2$1, "shopCode", (valueRef.current || {}).shopCode || (orders === null || orders === void 0 ? void 0 : (_orders$ = orders[0]) === null || _orders$ === void 0 ? void 0 : _orders$.shopCode)), _defineProperty(_objectSpread2$1, "vipCode", (valueRef.current || {}).vipCode || (orders === null || orders === void 0 ? void 0 : (_orders$2 = orders[0]) === null || _orders$2 === void 0 ? void 0 : _orders$2.vipCode)), _objectSpread2$1));
|
|
19876
21107
|
kmkfUtils.pushGyLog('getOrderList', {
|
|
19877
21108
|
before: valueRef.current,
|
|
19878
|
-
after:
|
|
19879
|
-
showOrderInfo: showOrderInfo,
|
|
19880
|
-
orders: orders
|
|
19881
|
-
})))
|
|
21109
|
+
after: newValue
|
|
19882
21110
|
});
|
|
19883
|
-
onChange(
|
|
19884
|
-
showOrderInfo: showOrderInfo,
|
|
19885
|
-
orders: orders
|
|
19886
|
-
}))));
|
|
21111
|
+
onChange(newValue);
|
|
19887
21112
|
});
|
|
19888
21113
|
case 1:
|
|
19889
21114
|
case "end":
|
|
@@ -19895,42 +21120,71 @@ var GyReissue = function GyReissue(props) {
|
|
|
19895
21120
|
return _ref.apply(this, arguments);
|
|
19896
21121
|
};
|
|
19897
21122
|
}();
|
|
21123
|
+
var getVipCode = /*#__PURE__*/function () {
|
|
21124
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(orderNo) {
|
|
21125
|
+
var _typeMap$type10;
|
|
21126
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
21127
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
21128
|
+
case 0:
|
|
21129
|
+
return _context2.abrupt("return", (_typeMap$type10 = typeMap$4[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.getOrderList(orderNo).then(function (data) {
|
|
21130
|
+
var _orders$3, _orders$4;
|
|
21131
|
+
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
21132
|
+
var newValue = _objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, {
|
|
21133
|
+
shopCode: (valueRef.current || {}).shopCode || (orders === null || orders === void 0 ? void 0 : (_orders$3 = orders[0]) === null || _orders$3 === void 0 ? void 0 : _orders$3.shopCode),
|
|
21134
|
+
vipCode: (valueRef.current || {}).vipCode || (orders === null || orders === void 0 ? void 0 : (_orders$4 = orders[0]) === null || _orders$4 === void 0 ? void 0 : _orders$4.vipCode)
|
|
21135
|
+
});
|
|
21136
|
+
kmkfUtils.pushGyLog('getVipCode', {
|
|
21137
|
+
before: valueRef.current,
|
|
21138
|
+
after: newValue
|
|
21139
|
+
});
|
|
21140
|
+
onChange(newValue);
|
|
21141
|
+
}));
|
|
21142
|
+
case 1:
|
|
21143
|
+
case "end":
|
|
21144
|
+
return _context2.stop();
|
|
21145
|
+
}
|
|
21146
|
+
}, _callee2);
|
|
21147
|
+
}));
|
|
21148
|
+
return function getVipCode(_x2) {
|
|
21149
|
+
return _ref4.apply(this, arguments);
|
|
21150
|
+
};
|
|
21151
|
+
}();
|
|
19898
21152
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
19899
|
-
var _ref5, _ref5$typeMap$type$ty, _typeMap$
|
|
21153
|
+
var _ref5, _ref5$typeMap$type$ty, _typeMap$type11, _typeMap$type12;
|
|
19900
21154
|
kmkfUtils.pushGyLog('beforeChangeType', valueRef.current || {});
|
|
19901
21155
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
19902
|
-
if (typeName === ((_ref5 = valueRef.current || {}) === null || _ref5 === void 0 ? void 0 : (_ref5$typeMap$type$ty = _ref5[(_typeMap$
|
|
21156
|
+
if (typeName === ((_ref5 = valueRef.current || {}) === null || _ref5 === void 0 ? void 0 : (_ref5$typeMap$type$ty = _ref5[(_typeMap$type11 = typeMap$4[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName]) === null || _ref5$typeMap$type$ty === void 0 ? void 0 : _ref5$typeMap$type$ty[0])) return;
|
|
19903
21157
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
19904
21158
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
19905
|
-
newValue[(_typeMap$
|
|
21159
|
+
newValue[(_typeMap$type12 = typeMap$4[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
|
|
19906
21160
|
if (typeName === '1') {
|
|
19907
|
-
var _typeMap$
|
|
19908
|
-
newValue[(_typeMap$
|
|
21161
|
+
var _typeMap$type13;
|
|
21162
|
+
newValue[(_typeMap$type13 = typeMap$4[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
|
|
19909
21163
|
mode: isStrict
|
|
19910
21164
|
});
|
|
19911
21165
|
} else if (typeName === '2') {
|
|
19912
|
-
var _typeMap$
|
|
21166
|
+
var _typeMap$type14;
|
|
19913
21167
|
// 切换到非原单,清空列表
|
|
19914
|
-
newValue[(_typeMap$
|
|
21168
|
+
newValue[(_typeMap$type14 = typeMap$4[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
|
|
19915
21169
|
}
|
|
19916
21170
|
kmkfUtils.pushGyLog('afterChangeType', newValue);
|
|
19917
21171
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19918
21172
|
};
|
|
19919
21173
|
var handleModeChange = function handleModeChange(mode) {
|
|
19920
|
-
var _ref6, _ref6$typeMap$type$ty, _typeMap$
|
|
19921
|
-
var isOriginalOrder = ((_ref6 = valueRef.current || {}) === null || _ref6 === void 0 ? void 0 : (_ref6$typeMap$type$ty = _ref6[(_typeMap$
|
|
21174
|
+
var _ref6, _ref6$typeMap$type$ty, _typeMap$type15, _typeMap$type16;
|
|
21175
|
+
var isOriginalOrder = ((_ref6 = valueRef.current || {}) === null || _ref6 === void 0 ? void 0 : (_ref6$typeMap$type$ty = _ref6[(_typeMap$type15 = typeMap$4[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.typeName]) === null || _ref6$typeMap$type$ty === void 0 ? void 0 : _ref6$typeMap$type$ty[0]) === '1';
|
|
19922
21176
|
setIsStrict(mode);
|
|
19923
21177
|
if (!isOriginalOrder) return;
|
|
19924
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, _defineProperty({}, (_typeMap$
|
|
21178
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, _defineProperty({}, (_typeMap$type16 = typeMap$4[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.key, getGoodDetails({
|
|
19925
21179
|
mode: mode
|
|
19926
21180
|
}))));
|
|
19927
21181
|
};
|
|
19928
21182
|
var getGoodDetails = function getGoodDetails(_ref7) {
|
|
19929
|
-
var _ref8, _typeMap$
|
|
21183
|
+
var _ref8, _typeMap$type17, _ref9, _typeMap$type18, _order$details;
|
|
19930
21184
|
var mode = _ref7.mode,
|
|
19931
21185
|
sysOrderNo = _ref7.sysOrderNo;
|
|
19932
|
-
var systemOrder = (_ref8 = valueRef.current || {}) === null || _ref8 === void 0 ? void 0 : _ref8[(_typeMap$
|
|
19933
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : (_ref9 = valueRef.current || {}) === null || _ref9 === void 0 ? void 0 : _ref9[(_typeMap$
|
|
21186
|
+
var systemOrder = (_ref8 = valueRef.current || {}) === null || _ref8 === void 0 ? void 0 : _ref8[(_typeMap$type17 = typeMap$4[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrder];
|
|
21187
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : (_ref9 = valueRef.current || {}) === null || _ref9 === void 0 ? void 0 : _ref9[(_typeMap$type18 = typeMap$4[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrderNo];
|
|
19934
21188
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
19935
21189
|
return order.code === systemOrderNo;
|
|
19936
21190
|
});
|
|
@@ -19941,29 +21195,29 @@ var GyReissue = function GyReissue(props) {
|
|
|
19941
21195
|
}) : goodDetails;
|
|
19942
21196
|
};
|
|
19943
21197
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
19944
|
-
var _typeMap$
|
|
21198
|
+
var _typeMap$type19;
|
|
19945
21199
|
kmkfUtils.pushGyLog('beforeChangeGood', valueRef.current || {});
|
|
19946
21200
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
19947
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19948
|
-
var _typeMap$
|
|
19949
|
-
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19950
|
-
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21201
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type19 = typeMap$4[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = (val || []).map(function (item) {
|
|
21202
|
+
var _typeMap$type20, _typeMap$type21;
|
|
21203
|
+
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type20 = typeMap$4[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.formatDefaultField.money)] = 0;
|
|
21204
|
+
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type21 = typeMap$4[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.formatDefaultField.share)] = 0;
|
|
19951
21205
|
return item;
|
|
19952
21206
|
});
|
|
19953
21207
|
kmkfUtils.pushGyLog('afterChangeGood', newValue);
|
|
19954
21208
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19955
21209
|
};
|
|
19956
21210
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
19957
|
-
var _typeMap$
|
|
21211
|
+
var _typeMap$type22, _ref10, _ref10$typeMap$type$t, _typeMap$type23, _ref11, _ref11$typeMap$type$t, _typeMap$type25;
|
|
19958
21212
|
kmkfUtils.pushGyLog('beforeChangeSystemOrder', valueRef.current || {});
|
|
19959
21213
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
19960
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19961
|
-
if (['2'].includes((_ref10 = valueRef.current || {}) === null || _ref10 === void 0 ? void 0 : (_ref10$typeMap$type$t = _ref10[(_typeMap$
|
|
19962
|
-
var _typeMap$type22;
|
|
19963
|
-
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)] = [];
|
|
19964
|
-
} else if (['1'].includes((_ref11 = valueRef.current || {}) === null || _ref11 === void 0 ? void 0 : (_ref11$typeMap$type$t = _ref11[(_typeMap$type23 = typeMap$4[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.typeName]) === null || _ref11$typeMap$type$t === void 0 ? void 0 : _ref11$typeMap$type$t[0])) {
|
|
21214
|
+
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.systemOrderNo)] = val;
|
|
21215
|
+
if (['2'].includes((_ref10 = valueRef.current || {}) === null || _ref10 === void 0 ? void 0 : (_ref10$typeMap$type$t = _ref10[(_typeMap$type23 = typeMap$4[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.typeName]) === null || _ref10$typeMap$type$t === void 0 ? void 0 : _ref10$typeMap$type$t[0])) {
|
|
19965
21216
|
var _typeMap$type24;
|
|
19966
|
-
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)] =
|
|
21217
|
+
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)] = [];
|
|
21218
|
+
} else if (['1'].includes((_ref11 = valueRef.current || {}) === null || _ref11 === void 0 ? void 0 : (_ref11$typeMap$type$t = _ref11[(_typeMap$type25 = typeMap$4[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.typeName]) === null || _ref11$typeMap$type$t === void 0 ? void 0 : _ref11$typeMap$type$t[0])) {
|
|
21219
|
+
var _typeMap$type26;
|
|
21220
|
+
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)] = getGoodDetails({
|
|
19967
21221
|
mode: isStrict,
|
|
19968
21222
|
sysOrderNo: val
|
|
19969
21223
|
});
|
|
@@ -19972,7 +21226,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
19972
21226
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19973
21227
|
};
|
|
19974
21228
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
19975
|
-
var _ref12, _typeMap$
|
|
21229
|
+
var _ref12, _typeMap$type27, _typeMap$type28, _uniqBy;
|
|
19976
21230
|
kmkfUtils.pushGyLog('beforeSelectedGoodsChange', valueRef.current || {});
|
|
19977
21231
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
19978
21232
|
// 原订单商品
|
|
@@ -19980,68 +21234,66 @@ var GyReissue = function GyReissue(props) {
|
|
|
19980
21234
|
mode: isStrict
|
|
19981
21235
|
}) || [];
|
|
19982
21236
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
19983
|
-
var currentSelectGoodList = ((_ref12 = valueRef.current || {}) === null || _ref12 === void 0 ? void 0 : _ref12["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19984
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21237
|
+
var currentSelectGoodList = ((_ref12 = valueRef.current || {}) === null || _ref12 === void 0 ? void 0 : _ref12["".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)]) || [];
|
|
21238
|
+
newValue["".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)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
19985
21239
|
return skuList.includes(item.uuid);
|
|
19986
21240
|
});
|
|
19987
|
-
console.log('商品发生变化', newValue[
|
|
21241
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
19988
21242
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19989
21243
|
kmkfUtils.pushGyLog('afterSelectedGoodsChange', newValue);
|
|
19990
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21244
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type29 = typeMap$4[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)], isStrict]);
|
|
19991
21245
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
19992
|
-
var
|
|
19993
|
-
|
|
19994
|
-
|
|
19995
|
-
|
|
19996
|
-
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
19997
|
-
id: "TEST_GY",
|
|
19998
|
-
onClick: function onClick() {
|
|
19999
|
-
console.log('TEST_GY', value);
|
|
20000
|
-
}
|
|
20001
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
21246
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type30 = typeMap$4[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrder];
|
|
21247
|
+
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type31 = typeMap$4[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrderNo]);
|
|
21248
|
+
var showErpGoodsBtn = showChangeBtn || type === 'GY_REISSUE_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
|
|
21249
|
+
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
20002
21250
|
gutter: 8,
|
|
20003
21251
|
wrap: true
|
|
20004
21252
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
20005
21253
|
className: "gutter-row",
|
|
20006
21254
|
xs: {
|
|
20007
|
-
span:
|
|
21255
|
+
span: 12
|
|
20008
21256
|
},
|
|
20009
21257
|
sm: {
|
|
20010
|
-
span:
|
|
21258
|
+
span: 8
|
|
20011
21259
|
}
|
|
20012
21260
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
20013
21261
|
style: {
|
|
20014
|
-
marginBottom: '8px'
|
|
21262
|
+
marginBottom: '8px',
|
|
21263
|
+
width: '100%'
|
|
20015
21264
|
},
|
|
20016
21265
|
disabled: disabled,
|
|
20017
21266
|
allowClear: false,
|
|
20018
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21267
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type32 = typeMap$4[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrderNo)],
|
|
20019
21268
|
onChange: function onChange(val) {
|
|
20020
21269
|
return changeSystemOrderHandle(val);
|
|
20021
21270
|
},
|
|
20022
21271
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
20023
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$
|
|
21272
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s7 = value[(_typeMap$type33 = typeMap$4[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.systemOrder]) === null || _value$typeMap$type$s7 === void 0 ? void 0 : _value$typeMap$type$s7.showOrderInfo) || []).map(function (item) {
|
|
20024
21273
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
21274
|
+
className: styles$5.systemNoDisabled,
|
|
20025
21275
|
key: item.billNo,
|
|
20026
21276
|
value: item.billNo,
|
|
20027
|
-
label: item.billNo
|
|
20028
|
-
|
|
21277
|
+
label: item.billNo,
|
|
21278
|
+
disabled: item.cancel
|
|
21279
|
+
}, (item === null || item === void 0 ? void 0 : item.cancel) ? '[已取消]' : '', item.billNo);
|
|
20029
21280
|
}))), /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
20030
21281
|
className: "gutter-row",
|
|
20031
21282
|
xs: {
|
|
20032
|
-
span:
|
|
21283
|
+
span: 12
|
|
20033
21284
|
},
|
|
20034
21285
|
sm: {
|
|
20035
|
-
span:
|
|
21286
|
+
span: 4
|
|
20036
21287
|
}
|
|
20037
21288
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
20038
21289
|
style: {
|
|
20039
|
-
marginBottom: '8px'
|
|
21290
|
+
marginBottom: '8px',
|
|
21291
|
+
width: '100%'
|
|
20040
21292
|
},
|
|
20041
|
-
disabled: disabled,
|
|
21293
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
20042
21294
|
allowClear: false,
|
|
20043
21295
|
options: reasonList,
|
|
20044
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21296
|
+
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.typeName)],
|
|
20045
21297
|
onChange: function onChange(val) {
|
|
20046
21298
|
return changeTypeHandle(val);
|
|
20047
21299
|
}
|
|
@@ -20052,8 +21304,10 @@ var GyReissue = function GyReissue(props) {
|
|
|
20052
21304
|
disabled: disabled,
|
|
20053
21305
|
canUpdateNumber: showChangeBtn,
|
|
20054
21306
|
showChangeBtn: showChangeBtn,
|
|
21307
|
+
showErpGoodsBtn: showErpGoodsBtn,
|
|
21308
|
+
alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
|
|
20055
21309
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
20056
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21310
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type35 = typeMap$4[type]) === null || _typeMap$type35 === void 0 ? void 0 : _typeMap$type35.key)],
|
|
20057
21311
|
onChange: function onChange(val) {
|
|
20058
21312
|
return changeGoodHandle(val);
|
|
20059
21313
|
},
|
|
@@ -20068,7 +21322,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20068
21322
|
})));
|
|
20069
21323
|
};
|
|
20070
21324
|
|
|
20071
|
-
var _excluded$
|
|
21325
|
+
var _excluded$q = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
|
|
20072
21326
|
_excluded2$1 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
20073
21327
|
var typeMap$5 = {
|
|
20074
21328
|
GY_RETURN_GOODS: {
|
|
@@ -20090,14 +21344,15 @@ var typeMap$5 = {
|
|
|
20090
21344
|
}
|
|
20091
21345
|
};
|
|
20092
21346
|
var GyReturnGoods = function GyReturnGoods(props) {
|
|
20093
|
-
var _typeMap$
|
|
21347
|
+
var _typeMap$type9, _typeMap$type26, _systemOrder$orders, _typeMap$type27, _typeMap$type28, _value$typeMap$type$s5, _typeMap$type29, _typeMap$type30, _typeMap$type31;
|
|
20094
21348
|
var value = props.value,
|
|
20095
21349
|
onChange = props.onChange,
|
|
20096
21350
|
_props$reasonList = props.reasonList,
|
|
20097
21351
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
20098
21352
|
disabled = props.disabled,
|
|
20099
21353
|
type = props.type,
|
|
20100
|
-
|
|
21354
|
+
isSettingConfig = props.isSettingConfig,
|
|
21355
|
+
other = _objectWithoutProperties(props, _excluded$q);
|
|
20101
21356
|
var valueRef = React.useRef({});
|
|
20102
21357
|
var getOrderFlag = React.useRef(false);
|
|
20103
21358
|
var _useState = React.useState(false),
|
|
@@ -20160,7 +21415,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20160
21415
|
while (1) switch (_context.prev = _context.next) {
|
|
20161
21416
|
case 0:
|
|
20162
21417
|
(_typeMap$type4 = typeMap$5[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
20163
|
-
var _valueRef$current, _typeMap$type5, _typeMap$type$systemO, _ref3, _valueRef$current2, _typeMap$type6;
|
|
21418
|
+
var _valueRef$current, _typeMap$type5, _typeMap$type$systemO, _ref3, _valueRef$current2, _typeMap$type6, _orders$, _objectSpread2$1;
|
|
20164
21419
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
20165
21420
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
20166
21421
|
var billNo = _ref2.billNo,
|
|
@@ -20182,10 +21437,10 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20182
21437
|
shopCode: shopCode
|
|
20183
21438
|
});
|
|
20184
21439
|
});
|
|
20185
|
-
onChange(_objectSpread2(_objectSpread2({}, (_valueRef$current = valueRef.current) !== null && _valueRef$current !== void 0 ? _valueRef$current : {}), {},
|
|
21440
|
+
onChange(_objectSpread2(_objectSpread2({}, (_valueRef$current = valueRef.current) !== null && _valueRef$current !== void 0 ? _valueRef$current : {}), {}, (_objectSpread2$1 = {}, _defineProperty(_objectSpread2$1, (_typeMap$type5 = typeMap$5[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, (_typeMap$type$systemO = (_ref3 = (_valueRef$current2 = valueRef.current) !== null && _valueRef$current2 !== void 0 ? _valueRef$current2 : {}) === null || _ref3 === void 0 ? void 0 : _ref3[(_typeMap$type6 = typeMap$5[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]) !== null && _typeMap$type$systemO !== void 0 ? _typeMap$type$systemO : {}), {}, {
|
|
20186
21441
|
showOrderInfo: showOrderInfo,
|
|
20187
21442
|
orders: orders
|
|
20188
|
-
}))));
|
|
21443
|
+
})), _defineProperty(_objectSpread2$1, "shopCode", (valueRef.current || {}).shopCode || (orders === null || orders === void 0 ? void 0 : (_orders$ = orders[0]) === null || _orders$ === void 0 ? void 0 : _orders$.shopCode)), _objectSpread2$1)));
|
|
20189
21444
|
});
|
|
20190
21445
|
case 1:
|
|
20191
21446
|
case "end":
|
|
@@ -20198,7 +21453,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20198
21453
|
};
|
|
20199
21454
|
}();
|
|
20200
21455
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
20201
|
-
var _typeMap$type7, _typeMap$type8, _uniqBy
|
|
21456
|
+
var _typeMap$type7, _typeMap$type8, _uniqBy;
|
|
20202
21457
|
var newValue = _objectSpread2({}, value);
|
|
20203
21458
|
// 原订单商品
|
|
20204
21459
|
var originTradeGoodList = getGoodDetails({
|
|
@@ -20209,49 +21464,49 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20209
21464
|
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type8 = typeMap$5[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
20210
21465
|
return skuList.includes(item.uuid);
|
|
20211
21466
|
});
|
|
20212
|
-
console.log('商品发生变化', newValue[
|
|
21467
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
20213
21468
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20214
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21469
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type9 = typeMap$5[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key)], isStrict]);
|
|
20215
21470
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
20216
|
-
var _value$typeMap$type$t, _typeMap$
|
|
21471
|
+
var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
|
|
20217
21472
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
20218
|
-
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$
|
|
21473
|
+
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type10 = typeMap$5[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) return;
|
|
20219
21474
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
20220
21475
|
var newValue = _objectSpread2({}, value);
|
|
20221
|
-
newValue[(_typeMap$
|
|
21476
|
+
newValue[(_typeMap$type11 = typeMap$5[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName] = val;
|
|
20222
21477
|
if (typeName === '1') {
|
|
20223
|
-
var _typeMap$
|
|
20224
|
-
newValue[(_typeMap$
|
|
21478
|
+
var _typeMap$type12;
|
|
21479
|
+
newValue[(_typeMap$type12 = typeMap$5[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = getGoodDetails({
|
|
20225
21480
|
mode: isStrict
|
|
20226
21481
|
});
|
|
20227
21482
|
} else if (typeName === '2') {
|
|
20228
|
-
var _typeMap$
|
|
21483
|
+
var _typeMap$type13;
|
|
20229
21484
|
// 切换到非原单,清空列表
|
|
20230
|
-
newValue[(_typeMap$
|
|
21485
|
+
newValue[(_typeMap$type13 = typeMap$5[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = [];
|
|
20231
21486
|
}
|
|
20232
21487
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20233
21488
|
};
|
|
20234
21489
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
20235
|
-
var _typeMap$
|
|
21490
|
+
var _typeMap$type14;
|
|
20236
21491
|
var newValue = _objectSpread2({}, value);
|
|
20237
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20238
|
-
var _typeMap$
|
|
20239
|
-
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20240
|
-
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21492
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type14 = typeMap$5[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key)] = (val || []).map(function (item) {
|
|
21493
|
+
var _typeMap$type15, _typeMap$type16;
|
|
21494
|
+
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type15 = typeMap$5[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.formatDefaultField.money)] = 0;
|
|
21495
|
+
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type16 = typeMap$5[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.formatDefaultField.share)] = 0;
|
|
20241
21496
|
return item;
|
|
20242
21497
|
});
|
|
20243
21498
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20244
21499
|
};
|
|
20245
21500
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
20246
|
-
var _typeMap$
|
|
21501
|
+
var _typeMap$type17, _value$typeMap$type$t2, _typeMap$type18, _value$typeMap$type$t3, _typeMap$type20;
|
|
20247
21502
|
var newValue = _objectSpread2({}, value);
|
|
20248
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20249
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
20250
|
-
var _typeMap$
|
|
20251
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20252
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
20253
|
-
var _typeMap$
|
|
20254
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21503
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type17 = typeMap$5[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrderNo)] = val;
|
|
21504
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type18 = typeMap$5[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
|
|
21505
|
+
var _typeMap$type19;
|
|
21506
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type19 = typeMap$5[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = [];
|
|
21507
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type20 = typeMap$5[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
21508
|
+
var _typeMap$type21;
|
|
21509
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type21 = typeMap$5[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.key)] = getGoodDetails({
|
|
20255
21510
|
mode: isStrict,
|
|
20256
21511
|
sysOrderNo: val
|
|
20257
21512
|
});
|
|
@@ -20259,11 +21514,11 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20259
21514
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20260
21515
|
};
|
|
20261
21516
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
20262
|
-
var _typeMap$
|
|
21517
|
+
var _typeMap$type22, _typeMap$type23, _order$details;
|
|
20263
21518
|
var mode = _ref4.mode,
|
|
20264
21519
|
sysOrderNo = _ref4.sysOrderNo;
|
|
20265
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
20266
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
21520
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type22 = typeMap$5[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrder];
|
|
21521
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type23 = typeMap$5[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrderNo];
|
|
20267
21522
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
20268
21523
|
return order.code === systemOrderNo;
|
|
20269
21524
|
});
|
|
@@ -20274,63 +21529,66 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20274
21529
|
}) : goodDetails;
|
|
20275
21530
|
};
|
|
20276
21531
|
var handleModeChange = function handleModeChange(mode) {
|
|
20277
|
-
var _value$typeMap$type$t4, _typeMap$
|
|
20278
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$
|
|
21532
|
+
var _value$typeMap$type$t4, _typeMap$type24, _typeMap$type25;
|
|
21533
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type24 = typeMap$5[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0]) === '1';
|
|
20279
21534
|
setIsStrict(mode);
|
|
20280
21535
|
if (!isOriginalOrder) return;
|
|
20281
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$
|
|
21536
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type25 = typeMap$5[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key, getGoodDetails({
|
|
20282
21537
|
mode: mode
|
|
20283
21538
|
}))));
|
|
20284
21539
|
};
|
|
20285
21540
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
20286
|
-
var
|
|
20287
|
-
|
|
20288
|
-
|
|
20289
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$5[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
|
|
21541
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$5[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrder];
|
|
21542
|
+
var showErpGoodsBtn = type === 'GY_RETURN_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
|
|
21543
|
+
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$5[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
|
|
20290
21544
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
20291
21545
|
gutter: 8,
|
|
20292
21546
|
wrap: true
|
|
20293
21547
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
20294
21548
|
className: "gutter-row",
|
|
20295
21549
|
xs: {
|
|
20296
|
-
span:
|
|
21550
|
+
span: 12
|
|
20297
21551
|
},
|
|
20298
21552
|
sm: {
|
|
20299
|
-
span:
|
|
21553
|
+
span: 8
|
|
20300
21554
|
}
|
|
20301
21555
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
20302
21556
|
style: {
|
|
20303
|
-
marginBottom: '8px'
|
|
21557
|
+
marginBottom: '8px',
|
|
21558
|
+
width: '100%'
|
|
20304
21559
|
},
|
|
20305
21560
|
disabled: disabled,
|
|
20306
21561
|
allowClear: false,
|
|
20307
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21562
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type28 = typeMap$5[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo)],
|
|
20308
21563
|
onChange: function onChange(val) {
|
|
20309
21564
|
return changeSystemOrderHandle(val);
|
|
20310
21565
|
},
|
|
20311
21566
|
placeholder: "\u9009\u62E9\u9000\u8D27\u7684\u7CFB\u7EDF\u5355"
|
|
20312
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
21567
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type29 = typeMap$5[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
20313
21568
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
21569
|
+
className: styles$5.systemNoDisabled,
|
|
20314
21570
|
key: item.billNo,
|
|
20315
21571
|
value: item.billNo,
|
|
20316
|
-
label: item.billNo
|
|
20317
|
-
|
|
21572
|
+
label: item.billNo,
|
|
21573
|
+
disabled: item === null || item === void 0 ? void 0 : item.cancel
|
|
21574
|
+
}, (item === null || item === void 0 ? void 0 : item.cancel) ? '[已取消]' : '', " ", item.billNo);
|
|
20318
21575
|
}))), /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
20319
21576
|
className: "gutter-row",
|
|
20320
21577
|
xs: {
|
|
20321
|
-
span:
|
|
21578
|
+
span: 12
|
|
20322
21579
|
},
|
|
20323
21580
|
sm: {
|
|
20324
|
-
span:
|
|
21581
|
+
span: 4
|
|
20325
21582
|
}
|
|
20326
21583
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
20327
21584
|
style: {
|
|
20328
|
-
marginBottom: '8px'
|
|
21585
|
+
marginBottom: '8px',
|
|
21586
|
+
width: '100%'
|
|
20329
21587
|
},
|
|
20330
|
-
disabled: disabled,
|
|
21588
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
20331
21589
|
allowClear: false,
|
|
20332
21590
|
options: reasonList,
|
|
20333
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21591
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type30 = typeMap$5[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.typeName)],
|
|
20334
21592
|
onChange: function onChange(val) {
|
|
20335
21593
|
return changeTypeHandle(val);
|
|
20336
21594
|
}
|
|
@@ -20342,13 +21600,14 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20342
21600
|
canUpdateNumber: showChangeBtn,
|
|
20343
21601
|
showChangeBtn: showChangeBtn,
|
|
20344
21602
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
20345
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21603
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type31 = typeMap$5[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.key)],
|
|
20346
21604
|
onChange: function onChange(val) {
|
|
20347
21605
|
return changeGoodHandle(val);
|
|
20348
21606
|
},
|
|
20349
21607
|
onModeChange: handleModeChange,
|
|
20350
21608
|
isStrict: isStrict,
|
|
20351
|
-
showErpGoodsBtn:
|
|
21609
|
+
showErpGoodsBtn: showErpGoodsBtn,
|
|
21610
|
+
alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
|
|
20352
21611
|
tradeGoods: {
|
|
20353
21612
|
originDataSource: getGoodDetails({
|
|
20354
21613
|
mode: isStrict
|
|
@@ -20358,6 +21617,249 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20358
21617
|
})));
|
|
20359
21618
|
};
|
|
20360
21619
|
|
|
21620
|
+
var css_248z$d = ".index-module_imageBox__1f2AI {\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_imageBox__1f2AI .ant-upload {\n padding: 0;\n height: 80px;\n width: 80px;\n border: none;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n font-size: 14px;\n}\n.index-module_imageBox__1f2AI .ant-upload .index-module_addBtn__1DY59 {\n color: #86909C;\n font-size: 14px;\n}\n.index-module_imageBox__1f2AI > span {\n max-width: 100%;\n}\n.index-module_tips__1XQjf {\n color: #4E5969;\n font-size: 12px;\n}\n";
|
|
21621
|
+
var styles$6 = {"imageBox":"index-module_imageBox__1f2AI","addBtn":"index-module_addBtn__1DY59","tips":"index-module_tips__1XQjf"};
|
|
21622
|
+
styleInject(css_248z$d);
|
|
21623
|
+
|
|
21624
|
+
var _excluded$r = ["maxCount", "maxSize", "onChange", "value", "disabled", "hostUrl", "canDownload", "actionUrl"];
|
|
21625
|
+
var Dragger$1 = antd.Upload.Dragger;
|
|
21626
|
+
var fn$4 = function fn() {
|
|
21627
|
+
return void 0;
|
|
21628
|
+
};
|
|
21629
|
+
var videoSuffixList = ['mp4', 'avi', 'mpeg', 'asf', 'mov', '3gp', 'wmv', 'rmvb'];
|
|
21630
|
+
var KmVideo = function KmVideo(_ref) {
|
|
21631
|
+
var _ref$maxCount = _ref.maxCount,
|
|
21632
|
+
maxCount = _ref$maxCount === void 0 ? 20 : _ref$maxCount,
|
|
21633
|
+
_ref$maxSize = _ref.maxSize,
|
|
21634
|
+
maxSize = _ref$maxSize === void 0 ? 500 : _ref$maxSize,
|
|
21635
|
+
_ref$onChange = _ref.onChange,
|
|
21636
|
+
onChange = _ref$onChange === void 0 ? fn$4 : _ref$onChange,
|
|
21637
|
+
_ref$value = _ref.value,
|
|
21638
|
+
value = _ref$value === void 0 ? [] : _ref$value,
|
|
21639
|
+
_ref$disabled = _ref.disabled,
|
|
21640
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
21641
|
+
_ref$hostUrl = _ref.hostUrl,
|
|
21642
|
+
hostUrl = _ref$hostUrl === void 0 ? '' : _ref$hostUrl,
|
|
21643
|
+
_ref$canDownload = _ref.canDownload,
|
|
21644
|
+
canDownload = _ref$canDownload === void 0 ? false : _ref$canDownload,
|
|
21645
|
+
_ref$actionUrl = _ref.actionUrl,
|
|
21646
|
+
actionUrl = _ref$actionUrl === void 0 ? '/qy/common/uploadWorkOrderImg' : _ref$actionUrl,
|
|
21647
|
+
resetProps = _objectWithoutProperties(_ref, _excluded$r);
|
|
21648
|
+
var _useState = React.useState(false),
|
|
21649
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
21650
|
+
visible = _useState2[0],
|
|
21651
|
+
setVisible = _useState2[1];
|
|
21652
|
+
var _useState3 = React.useState(''),
|
|
21653
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
21654
|
+
fileUrl = _useState4[0],
|
|
21655
|
+
setFileUrl = _useState4[1];
|
|
21656
|
+
var _useState5 = React.useState(''),
|
|
21657
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
21658
|
+
fileType = _useState6[0],
|
|
21659
|
+
setFileType = _useState6[1];
|
|
21660
|
+
var _useState7 = React.useState(''),
|
|
21661
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
21662
|
+
fileName = _useState8[0],
|
|
21663
|
+
setFileName = _useState8[1];
|
|
21664
|
+
var valueRef = React.useRef(value);
|
|
21665
|
+
var uploadCount = React.useRef(0);
|
|
21666
|
+
var _useState9 = React.useState(false),
|
|
21667
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
21668
|
+
uploading = _useState10[0],
|
|
21669
|
+
setUploading = _useState10[1];
|
|
21670
|
+
var fileList = React.useMemo(function () {
|
|
21671
|
+
return value.map(function (t, i) {
|
|
21672
|
+
return _objectSpread2(_objectSpread2({}, t), {}, {
|
|
21673
|
+
percent: 100,
|
|
21674
|
+
uid: i + ''
|
|
21675
|
+
});
|
|
21676
|
+
});
|
|
21677
|
+
}, [value]);
|
|
21678
|
+
React.useEffect(function () {
|
|
21679
|
+
valueRef.current = value;
|
|
21680
|
+
}, [value]);
|
|
21681
|
+
var asyncUpload = /*#__PURE__*/function () {
|
|
21682
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
|
|
21683
|
+
var formData, fileName, _yield$request, success, data;
|
|
21684
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
21685
|
+
while (1) switch (_context.prev = _context.next) {
|
|
21686
|
+
case 0:
|
|
21687
|
+
setUploading(true);
|
|
21688
|
+
uploadCount.current++;
|
|
21689
|
+
formData = new FormData();
|
|
21690
|
+
formData.append('file', file);
|
|
21691
|
+
fileName = "".concat(hooks(new Date().getTime()).format('YYYY-MM-DD hh:mm:ss'), "_").concat(file.name);
|
|
21692
|
+
formData.append('fileName', fileName);
|
|
21693
|
+
_context.prev = 6;
|
|
21694
|
+
_context.next = 9;
|
|
21695
|
+
return request__default['default'](actionUrl, {
|
|
21696
|
+
method: 'post',
|
|
21697
|
+
body: formData
|
|
21698
|
+
});
|
|
21699
|
+
case 9:
|
|
21700
|
+
_yield$request = _context.sent;
|
|
21701
|
+
success = _yield$request.success;
|
|
21702
|
+
data = _yield$request.data;
|
|
21703
|
+
if (success) {
|
|
21704
|
+
handleChange([].concat(_toConsumableArray(valueRef.current), [{
|
|
21705
|
+
kmVideoName: file.name,
|
|
21706
|
+
kmVideoUrl: "".concat(hostUrl, "/").concat(data)
|
|
21707
|
+
}]));
|
|
21708
|
+
}
|
|
21709
|
+
_context.next = 18;
|
|
21710
|
+
break;
|
|
21711
|
+
case 15:
|
|
21712
|
+
_context.prev = 15;
|
|
21713
|
+
_context.t0 = _context["catch"](6);
|
|
21714
|
+
antd.message.error('文件上传失败');
|
|
21715
|
+
case 18:
|
|
21716
|
+
_context.prev = 18;
|
|
21717
|
+
uploadCount.current--;
|
|
21718
|
+
if (uploadCount.current < 1) {
|
|
21719
|
+
setUploading(false);
|
|
21720
|
+
}
|
|
21721
|
+
return _context.finish(18);
|
|
21722
|
+
case 22:
|
|
21723
|
+
case "end":
|
|
21724
|
+
return _context.stop();
|
|
21725
|
+
}
|
|
21726
|
+
}, _callee, null, [[6, 15, 18, 22]]);
|
|
21727
|
+
}));
|
|
21728
|
+
return function asyncUpload(_x) {
|
|
21729
|
+
return _ref2.apply(this, arguments);
|
|
21730
|
+
};
|
|
21731
|
+
}();
|
|
21732
|
+
var download = function download(url, name) {
|
|
21733
|
+
if (url === null || url === void 0 ? void 0 : url.startsWith('https://erp-storage-video.oss-cn-beijing.aliyuncs.com')) {
|
|
21734
|
+
window.open(url);
|
|
21735
|
+
return;
|
|
21736
|
+
}
|
|
21737
|
+
fetch(url).then(function (res) {
|
|
21738
|
+
return res.blob();
|
|
21739
|
+
}).then(function (blob) {
|
|
21740
|
+
var a = document.createElement('a');
|
|
21741
|
+
document.body.appendChild(a);
|
|
21742
|
+
a.style.display = 'none';
|
|
21743
|
+
var url = window.URL.createObjectURL(blob);
|
|
21744
|
+
a.href = url;
|
|
21745
|
+
a.download = name;
|
|
21746
|
+
a.click();
|
|
21747
|
+
document.body.removeChild(a);
|
|
21748
|
+
window.URL.revokeObjectURL(url);
|
|
21749
|
+
});
|
|
21750
|
+
};
|
|
21751
|
+
var handleChange = function handleChange(list) {
|
|
21752
|
+
valueRef.current = list;
|
|
21753
|
+
onChange(list);
|
|
21754
|
+
};
|
|
21755
|
+
// 手动上传模式, 一直返回false
|
|
21756
|
+
var beforeUpload = function beforeUpload(file, fileList) {
|
|
21757
|
+
// console.log('beforeUpload', file);
|
|
21758
|
+
var size = file.size / 1024 / 1024 < maxSize;
|
|
21759
|
+
// TODO: 批量提交的时候
|
|
21760
|
+
if ((fileList === null || fileList === void 0 ? void 0 : fileList.length) + value.length > maxCount) {
|
|
21761
|
+
antd.message.error("\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u4E2A\u6587\u4EF6\uFF01"));
|
|
21762
|
+
return antd.Upload.LIST_IGNORE;
|
|
21763
|
+
}
|
|
21764
|
+
if (!size) {
|
|
21765
|
+
antd.message.error("\u6587\u4EF6\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
|
|
21766
|
+
return antd.Upload.LIST_IGNORE;
|
|
21767
|
+
}
|
|
21768
|
+
asyncUpload(file);
|
|
21769
|
+
return antd.Upload.LIST_IGNORE;
|
|
21770
|
+
};
|
|
21771
|
+
var onRemove = function onRemove(file) {
|
|
21772
|
+
var newValue = value.filter(function (item) {
|
|
21773
|
+
return item.kmVideoUrl !== file.kmVideoUrl;
|
|
21774
|
+
});
|
|
21775
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
21776
|
+
};
|
|
21777
|
+
var onPreview = function onPreview(file) {
|
|
21778
|
+
var _file$url;
|
|
21779
|
+
var fileArr = file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split('.');
|
|
21780
|
+
var fileType = fileArr[fileArr.length - 1];
|
|
21781
|
+
if (videoSuffixList.includes(fileType.toLowerCase())) {
|
|
21782
|
+
setFileUrl(file === null || file === void 0 ? void 0 : file.url);
|
|
21783
|
+
setFileName(file === null || file === void 0 ? void 0 : file.name);
|
|
21784
|
+
setFileType('video');
|
|
21785
|
+
setVisible(true);
|
|
21786
|
+
} else {
|
|
21787
|
+
window.open(file === null || file === void 0 ? void 0 : file.url);
|
|
21788
|
+
}
|
|
21789
|
+
};
|
|
21790
|
+
var handleCancel = function handleCancel() {
|
|
21791
|
+
setFileUrl('');
|
|
21792
|
+
setFileName('');
|
|
21793
|
+
setVisible(false);
|
|
21794
|
+
};
|
|
21795
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Spin, {
|
|
21796
|
+
spinning: uploading
|
|
21797
|
+
}, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
21798
|
+
className: styles$6.tips
|
|
21799
|
+
}, "\u5141\u8BB8\u4E0A\u4F20", maxCount, "\u4E2A\u6587\u4EF6\uFF0C\u652F\u6301", videoSuffixList.join('/'), "\u683C\u5F0F\u6587\u4EF6"), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
21800
|
+
className: styles$6.imageBox
|
|
21801
|
+
}, /*#__PURE__*/React__default['default'].createElement(Dragger$1, _objectSpread2({
|
|
21802
|
+
disabled: disabled,
|
|
21803
|
+
multiple: true,
|
|
21804
|
+
name: "file",
|
|
21805
|
+
maxCount: maxCount,
|
|
21806
|
+
beforeUpload: beforeUpload,
|
|
21807
|
+
onPreview: onPreview,
|
|
21808
|
+
fileList: fileList.map(function (item) {
|
|
21809
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
21810
|
+
url: item.kmVideoUrl,
|
|
21811
|
+
name: item.kmVideoName
|
|
21812
|
+
});
|
|
21813
|
+
}),
|
|
21814
|
+
onRemove: onRemove,
|
|
21815
|
+
accept: ".".concat(videoSuffixList.join(',.')),
|
|
21816
|
+
iconRender: function iconRender(file) {
|
|
21817
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Space, {
|
|
21818
|
+
align: "center"
|
|
21819
|
+
}, /*#__PURE__*/React__default['default'].createElement(icons.VideoCameraTwoTone, {
|
|
21820
|
+
style: {
|
|
21821
|
+
fontSize: 16
|
|
21822
|
+
}
|
|
21823
|
+
}), file.kmVideoType && "".concat(file.kmVideoType));
|
|
21824
|
+
}
|
|
21825
|
+
}, resetProps), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
21826
|
+
className: styles$6.addBtn
|
|
21827
|
+
}, "+"), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
21828
|
+
className: styles$6.addBtn
|
|
21829
|
+
}, "\u9009\u62E9\u6587\u4EF6")), /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
21830
|
+
visible: visible,
|
|
21831
|
+
title: fileName,
|
|
21832
|
+
footer: null,
|
|
21833
|
+
onCancel: handleCancel
|
|
21834
|
+
}, canDownload ? /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
21835
|
+
type: "link",
|
|
21836
|
+
onClick: function onClick() {
|
|
21837
|
+
return download(fileUrl, fileName);
|
|
21838
|
+
}
|
|
21839
|
+
}, "\u4E0B\u8F7D") : /*#__PURE__*/React__default['default'].createElement(reactCopyToClipboard.CopyToClipboard, {
|
|
21840
|
+
text: fileUrl,
|
|
21841
|
+
onCopy: function onCopy() {
|
|
21842
|
+
antd.message.success('复制成功');
|
|
21843
|
+
}
|
|
21844
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
21845
|
+
type: "link"
|
|
21846
|
+
}, "\u4E0B\u8F7D\u5730\u5740")), fileType === 'pic' ? /*#__PURE__*/React__default['default'].createElement("img", {
|
|
21847
|
+
alt: "example",
|
|
21848
|
+
style: {
|
|
21849
|
+
width: '100%'
|
|
21850
|
+
},
|
|
21851
|
+
src: fileUrl
|
|
21852
|
+
}) : /*#__PURE__*/React__default['default'].createElement("video", {
|
|
21853
|
+
style: {
|
|
21854
|
+
width: '100%',
|
|
21855
|
+
height: '100%'
|
|
21856
|
+
},
|
|
21857
|
+
autoPlay: true,
|
|
21858
|
+
controls: true,
|
|
21859
|
+
src: fileUrl
|
|
21860
|
+
}))));
|
|
21861
|
+
};
|
|
21862
|
+
|
|
20361
21863
|
exports.Address = ApaasAddress;
|
|
20362
21864
|
exports.AliPay = AliPay;
|
|
20363
21865
|
exports.ApaasAddress = Province;
|
|
@@ -20379,6 +21881,7 @@ exports.ApaasUpload = ApaasUpload;
|
|
|
20379
21881
|
exports.ApaasUploadAsync = index;
|
|
20380
21882
|
exports.ApaasUploadFile = ApaasUploadFile;
|
|
20381
21883
|
exports.ApaasUploadProAsync = index$1;
|
|
21884
|
+
exports.AsyncSelect = AsyncSelect;
|
|
20382
21885
|
exports.BsE3Reissue = bsE3Reissue;
|
|
20383
21886
|
exports.BsExchange = BsExchange;
|
|
20384
21887
|
exports.BsGoods = BsGoods;
|
|
@@ -20404,6 +21907,7 @@ exports.IdentifyAddress = IdentifyAddress;
|
|
|
20404
21907
|
exports.Invoice = Invoice;
|
|
20405
21908
|
exports.JstGoods = jstGoods;
|
|
20406
21909
|
exports.JstItemList = ItemList;
|
|
21910
|
+
exports.KmVideo = KmVideo;
|
|
20407
21911
|
exports.LogisticsInterception = LogisticsInterception;
|
|
20408
21912
|
exports.LogisticsMoreInterception = LogisticsMoreInterception;
|
|
20409
21913
|
exports.LogisticsMoreTrajectory = LogisticsMoreTrajectory;
|
|
@@ -20426,8 +21930,10 @@ exports.WdtReissue = wdtReissue;
|
|
|
20426
21930
|
exports.WlnGoods = WlnGoods;
|
|
20427
21931
|
exports.columnsBaseInfoMap = columnsBaseInfoMap;
|
|
20428
21932
|
exports.erpColumnsMap = erpColumnsMap;
|
|
21933
|
+
exports.erpFormValidator = erpFormValidator;
|
|
20429
21934
|
exports.erpModalColumnsMap = index$2;
|
|
20430
21935
|
exports.getGyColumns = getColumns$4;
|
|
20431
21936
|
exports.getJstColumns = getColumns$5;
|
|
21937
|
+
exports.getKmColumns = getColumns$6;
|
|
20432
21938
|
exports.getWdtColumns = getColumns$2;
|
|
20433
21939
|
exports.getWlnColumns = getColumns$3;
|