@kmkf-fe-packages/basic-components 2.2.14 → 2.2.16
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 +1375 -229
- package/dist/index.js +1375 -228
- package/dist/src/bs/component/GoodItem/index.d.ts +1 -0
- package/dist/src/bs/component/model/Columns/Erp/jy.d.ts +27 -0
- package/dist/src/bs/component/model/GyGoodsList.d.ts +1 -0
- package/dist/src/bs/component/model/JyGoodsModal/GoodsList.d.ts +31 -0
- package/dist/src/bs/component/model/JyGoodsModal/index.d.ts +5 -0
- package/dist/src/bs/component/model/WorkOrderList/index.d.ts +1 -0
- package/dist/src/bs/component/model/WorkOrderList/useDefaultSearchValue.d.ts +10 -0
- package/dist/src/bs/component/model/type.d.ts +3 -0
- package/dist/src/constants/index.d.ts +1 -0
- package/dist/src/constants/jy.d.ts +3 -0
- package/dist/src/jy/common/index.d.ts +3 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -13747,7 +13747,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
13747
13747
|
changeIndex = _useState2[0],
|
|
13748
13748
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
13749
13749
|
var sendOptions = kmkfUtils.SendDataCenter.getInstance(platformType).getSendData();
|
|
13750
|
-
var isSelectName = ['wdt', 'bsE3', 'km', 'gy', 'jst'].includes(platformType);
|
|
13750
|
+
var isSelectName = ['wdt', 'bsE3', 'km', 'gy', 'jst', 'jy'].includes(platformType);
|
|
13751
13751
|
var expressDateInstance = kmkfUtils.ExpressData.getInstance(platformType);
|
|
13752
13752
|
var isSendGoodSavedId = isSelectName && !['jst'].includes(platformType);
|
|
13753
13753
|
React.useEffect(function () {
|
|
@@ -13845,7 +13845,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
13845
13845
|
onChange: function onChange(val) {
|
|
13846
13846
|
changeInputHandle(val, 'logisticsCompany');
|
|
13847
13847
|
},
|
|
13848
|
-
value:
|
|
13848
|
+
value: ['gy', 'jy'].includes(platformType) ? (expressDateInstance === null || expressDateInstance === void 0 ? void 0 : expressDateInstance.getExpressNameByCode((_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2['logisticsCompany'], false)) ? (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3['logisticsCompany'] : (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4['logisticsCompanyName'] : (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5['logisticsCompany'],
|
|
13849
13849
|
showSearch: true,
|
|
13850
13850
|
dropdownMatchSelectWidth: false,
|
|
13851
13851
|
filterOption: function filterOption(input, option) {
|
|
@@ -14900,13 +14900,139 @@ var kmColumns = [{
|
|
|
14900
14900
|
width: 150
|
|
14901
14901
|
}];
|
|
14902
14902
|
|
|
14903
|
+
var getYesOrNo$1 = function getYesOrNo(val) {
|
|
14904
|
+
if (!lodash.isBoolean(val)) return null;
|
|
14905
|
+
return val ? '是' : '否';
|
|
14906
|
+
};
|
|
14907
|
+
var jyColumns = [{
|
|
14908
|
+
dataIndex: 'goodName',
|
|
14909
|
+
title: '商品名称',
|
|
14910
|
+
width: 250,
|
|
14911
|
+
ellipsis: true
|
|
14912
|
+
}, {
|
|
14913
|
+
dataIndex: 'goodNo',
|
|
14914
|
+
title: '商品编码',
|
|
14915
|
+
width: 150,
|
|
14916
|
+
ellipsis: true
|
|
14917
|
+
}, {
|
|
14918
|
+
dataIndex: 'goodId',
|
|
14919
|
+
title: '商品ID',
|
|
14920
|
+
width: 150,
|
|
14921
|
+
ellipsis: true
|
|
14922
|
+
}, {
|
|
14923
|
+
dataIndex: 'imageUrl',
|
|
14924
|
+
title: '商品图片',
|
|
14925
|
+
width: 100,
|
|
14926
|
+
render: function render(picUrl) {
|
|
14927
|
+
return picUrl ? /*#__PURE__*/React__default['default'].createElement("img", {
|
|
14928
|
+
style: {
|
|
14929
|
+
width: '40px',
|
|
14930
|
+
height: '40px',
|
|
14931
|
+
objectFit: 'contain'
|
|
14932
|
+
},
|
|
14933
|
+
src: picUrl
|
|
14934
|
+
}) : null;
|
|
14935
|
+
}
|
|
14936
|
+
}, {
|
|
14937
|
+
dataIndex: 'goodShortName',
|
|
14938
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
14939
|
+
ellipsis: true,
|
|
14940
|
+
width: 150
|
|
14941
|
+
}, {
|
|
14942
|
+
dataIndex: 'categoryName',
|
|
14943
|
+
title: "\u5546\u54C1\u7EC4",
|
|
14944
|
+
ellipsis: true,
|
|
14945
|
+
width: 150
|
|
14946
|
+
}, {
|
|
14947
|
+
dataIndex: 'brandName',
|
|
14948
|
+
title: '品牌名称',
|
|
14949
|
+
width: 200,
|
|
14950
|
+
ellipsis: true
|
|
14951
|
+
}, {
|
|
14952
|
+
dataIndex: 'specName',
|
|
14953
|
+
title: '规格名称',
|
|
14954
|
+
width: 250,
|
|
14955
|
+
ellipsis: true
|
|
14956
|
+
}, {
|
|
14957
|
+
dataIndex: 'specNo',
|
|
14958
|
+
title: '规格编码',
|
|
14959
|
+
width: 150,
|
|
14960
|
+
ellipsis: true
|
|
14961
|
+
}, {
|
|
14962
|
+
dataIndex: 'specId',
|
|
14963
|
+
title: '规格ID',
|
|
14964
|
+
width: 250,
|
|
14965
|
+
ellipsis: true
|
|
14966
|
+
}, {
|
|
14967
|
+
dataIndex: 'specBarcode',
|
|
14968
|
+
title: '规格条码',
|
|
14969
|
+
width: 150,
|
|
14970
|
+
ellipsis: true
|
|
14971
|
+
}, {
|
|
14972
|
+
dataIndex: 'specImgUrl',
|
|
14973
|
+
title: '规格图片',
|
|
14974
|
+
width: 100,
|
|
14975
|
+
render: function render(picUrl) {
|
|
14976
|
+
return picUrl ? /*#__PURE__*/React__default['default'].createElement("img", {
|
|
14977
|
+
style: {
|
|
14978
|
+
width: '40px',
|
|
14979
|
+
height: '40px',
|
|
14980
|
+
objectFit: 'contain'
|
|
14981
|
+
},
|
|
14982
|
+
src: picUrl
|
|
14983
|
+
}) : null;
|
|
14984
|
+
}
|
|
14985
|
+
}, {
|
|
14986
|
+
dataIndex: 'colorName',
|
|
14987
|
+
title: "\u989C\u8272",
|
|
14988
|
+
ellipsis: true,
|
|
14989
|
+
width: 100
|
|
14990
|
+
}, {
|
|
14991
|
+
dataIndex: 'sizeName',
|
|
14992
|
+
title: "\u5C3A\u7801",
|
|
14993
|
+
ellipsis: true,
|
|
14994
|
+
width: 100
|
|
14995
|
+
}, {
|
|
14996
|
+
dataIndex: 'marketPrice',
|
|
14997
|
+
title: "\u5E02\u573A\u4EF7",
|
|
14998
|
+
ellipsis: true,
|
|
14999
|
+
width: 100
|
|
15000
|
+
}, {
|
|
15001
|
+
dataIndex: 'retailPrice',
|
|
15002
|
+
title: "\u96F6\u552E\u4EF7",
|
|
15003
|
+
ellipsis: true,
|
|
15004
|
+
width: 100
|
|
15005
|
+
}, {
|
|
15006
|
+
dataIndex: 'costPrice',
|
|
15007
|
+
title: "\u6210\u672C\u4EF7",
|
|
15008
|
+
ellipsis: true,
|
|
15009
|
+
width: 100
|
|
15010
|
+
}, {
|
|
15011
|
+
dataIndex: 'isGift',
|
|
15012
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
15013
|
+
ellipsis: true,
|
|
15014
|
+
width: 150,
|
|
15015
|
+
render: function render(val) {
|
|
15016
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$1(val));
|
|
15017
|
+
}
|
|
15018
|
+
}, {
|
|
15019
|
+
dataIndex: 'skuType',
|
|
15020
|
+
title: "\u662F\u5426\u7EC4\u5408\u88C5",
|
|
15021
|
+
ellipsis: true,
|
|
15022
|
+
width: 150,
|
|
15023
|
+
render: function render(val) {
|
|
15024
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$1(val === 'combine'));
|
|
15025
|
+
}
|
|
15026
|
+
}];
|
|
15027
|
+
|
|
14903
15028
|
var getColumnsMap = function getColumnsMap() {
|
|
14904
15029
|
return lodash.cloneDeep({
|
|
14905
15030
|
gy: gyColumns,
|
|
14906
15031
|
jst: jstColumns,
|
|
14907
15032
|
wdt: wdtColumns,
|
|
14908
15033
|
bse3: bse3Columns,
|
|
14909
|
-
km: kmColumns
|
|
15034
|
+
km: kmColumns,
|
|
15035
|
+
jy: jyColumns
|
|
14910
15036
|
});
|
|
14911
15037
|
};
|
|
14912
15038
|
var getColumnsBaseInfo = function getColumnsBaseInfo() {
|
|
@@ -17181,11 +17307,12 @@ var SearchHeader = function SearchHeader(_ref) {
|
|
|
17181
17307
|
timeOptions = _ref.timeOptions,
|
|
17182
17308
|
ShopList = _ref.ShopList,
|
|
17183
17309
|
onSubmit = _ref.onSubmit;
|
|
17310
|
+
console.log('allFields', allFields);
|
|
17184
17311
|
// const fixedFieldsOptions = useMemo(() => {
|
|
17185
17312
|
// return allFields.filter(item => fixedFields?.includes(item.id));
|
|
17186
17313
|
// }, [fixedFields, allFields]);
|
|
17187
17314
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
17188
|
-
className:
|
|
17315
|
+
className: "search-header-wrap"
|
|
17189
17316
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
17190
17317
|
className: "".concat(status ? 'is-open' : 'not-open')
|
|
17191
17318
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -17342,6 +17469,9 @@ var WorkorderList = function WorkorderList(props, ref) {
|
|
|
17342
17469
|
return selectedList.map(function (workOrderData) {
|
|
17343
17470
|
return goodsSourceFormat.workOrderDataToGoods(workOrderData, props.erp);
|
|
17344
17471
|
});
|
|
17472
|
+
},
|
|
17473
|
+
setDefaultSearchValue: function setDefaultSearchValue(value) {
|
|
17474
|
+
value && form.setFieldsValue(_objectSpread2({}, value));
|
|
17345
17475
|
}
|
|
17346
17476
|
};
|
|
17347
17477
|
});
|
|
@@ -17620,21 +17750,112 @@ var WorkorderList = function WorkorderList(props, ref) {
|
|
|
17620
17750
|
};
|
|
17621
17751
|
var WorkorderList$1 = /*#__PURE__*/React.forwardRef(WorkorderList);
|
|
17622
17752
|
|
|
17623
|
-
|
|
17624
|
-
|
|
17625
|
-
|
|
17626
|
-
|
|
17627
|
-
|
|
17628
|
-
|
|
17629
|
-
|
|
17630
|
-
|
|
17631
|
-
|
|
17753
|
+
var goodClassTransformValue = function goodClassTransformValue(value, config) {
|
|
17754
|
+
var label = '';
|
|
17755
|
+
var options = (config === null || config === void 0 ? void 0 : config.options) || [];
|
|
17756
|
+
var labelList = kmkfUtils.findLabelBySelectValue(value, options);
|
|
17757
|
+
var labelItem = labelList === null || labelList === void 0 ? void 0 : labelList.pop();
|
|
17758
|
+
label = labelItem === null || labelItem === void 0 ? void 0 : labelItem.label;
|
|
17759
|
+
return {
|
|
17760
|
+
type: 'anylike',
|
|
17761
|
+
keywords: label
|
|
17762
|
+
};
|
|
17763
|
+
};
|
|
17764
|
+
var goodTypeTransformValue = function goodTypeTransformValue(value) {
|
|
17765
|
+
return (value === null || value === void 0 ? void 0 : value.value) ? [value === null || value === void 0 ? void 0 : value.value] : '';
|
|
17766
|
+
};
|
|
17767
|
+
var relationComponentUniqueKeyMap = {
|
|
17768
|
+
//小白熊自定义组件
|
|
17769
|
+
PCE2Z5TXEVPL5D26I7KMBKMB: {
|
|
17770
|
+
//补发类型
|
|
17771
|
+
goodType: {
|
|
17772
|
+
relationComponentKey: '6hldjQ9aMz',
|
|
17773
|
+
reflectKey: 'C7M9rWJMjD_radio',
|
|
17774
|
+
transformValue: function transformValue(value) {
|
|
17775
|
+
return goodTypeTransformValue(value);
|
|
17776
|
+
}
|
|
17777
|
+
},
|
|
17778
|
+
// 产品分类
|
|
17779
|
+
goodClass: {
|
|
17780
|
+
relationComponentKey: '8gozpyUFtA',
|
|
17781
|
+
reflectKey: 'c66dt8s48A_input',
|
|
17782
|
+
transformValue: function transformValue(value, config) {
|
|
17783
|
+
return goodClassTransformValue(value, config);
|
|
17784
|
+
}
|
|
17785
|
+
}
|
|
17786
|
+
},
|
|
17787
|
+
// 测马奔腾
|
|
17788
|
+
SZF4ZGWZSNW6PYXMCIFEWBXT: {
|
|
17789
|
+
goodType: {
|
|
17790
|
+
relationComponentKey: 'abVTwFX34E',
|
|
17791
|
+
reflectKey: 'ipOHnYquYB_radio',
|
|
17792
|
+
transformValue: function transformValue(value) {
|
|
17793
|
+
return goodTypeTransformValue(value);
|
|
17794
|
+
}
|
|
17795
|
+
},
|
|
17796
|
+
goodClass: {
|
|
17797
|
+
relationComponentKey: 'U0es1pIDaE',
|
|
17798
|
+
reflectKey: 'K1puYheEaE_input',
|
|
17799
|
+
transformValue: function transformValue(value, config) {
|
|
17800
|
+
return goodClassTransformValue(value, config);
|
|
17801
|
+
}
|
|
17802
|
+
}
|
|
17803
|
+
}
|
|
17804
|
+
};
|
|
17805
|
+
// 该方法只用于小白熊定制,当管易商品/管易补发/管易退换货组件的数据来源于关联工单数据,且其补发类型自定义组件选了值,根据该值填充到商品库弹框中类型筛选项
|
|
17806
|
+
var useDefaultSearchValue = (function (props) {
|
|
17807
|
+
var form = props.form,
|
|
17808
|
+
_props$companyKey = props.companyKey,
|
|
17809
|
+
companyKey = _props$companyKey === void 0 ? '' : _props$companyKey,
|
|
17810
|
+
source = props.source,
|
|
17811
|
+
erp = props.erp,
|
|
17812
|
+
_props$templateDetail = props.templateDetail,
|
|
17813
|
+
templateDetail = _props$templateDetail === void 0 ? {} : _props$templateDetail;
|
|
17814
|
+
if (source !== 'workOrder' || erp !== 'gy') {
|
|
17815
|
+
return '';
|
|
17816
|
+
}
|
|
17817
|
+
var result = {};
|
|
17818
|
+
var relationComponentKeyMap = relationComponentUniqueKeyMap === null || relationComponentUniqueKeyMap === void 0 ? void 0 : relationComponentUniqueKeyMap[companyKey];
|
|
17819
|
+
Object.entries(relationComponentKeyMap).forEach(function (_ref) {
|
|
17820
|
+
var _templateDetail$compo;
|
|
17821
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
17822
|
+
key = _ref2[0],
|
|
17823
|
+
value = _ref2[1];
|
|
17824
|
+
var matchComponent = templateDetail === null || templateDetail === void 0 ? void 0 : (_templateDetail$compo = templateDetail.componentDtoList) === null || _templateDetail$compo === void 0 ? void 0 : _templateDetail$compo.find(function (item) {
|
|
17825
|
+
return item.uniqueKey === value.relationComponentKey;
|
|
17826
|
+
});
|
|
17827
|
+
if (!matchComponent) {
|
|
17828
|
+
return;
|
|
17829
|
+
}
|
|
17830
|
+
var relationComponentValue = form === null || form === void 0 ? void 0 : form.getFieldValue(value.relationComponentKey);
|
|
17831
|
+
if (relationComponentValue) {
|
|
17832
|
+
if ((value === null || value === void 0 ? void 0 : value.transformValue) && typeof (value === null || value === void 0 ? void 0 : value.transformValue) === 'function') {
|
|
17833
|
+
var _value$transformValue;
|
|
17834
|
+
var newValue = value === null || value === void 0 ? void 0 : (_value$transformValue = value.transformValue) === null || _value$transformValue === void 0 ? void 0 : _value$transformValue.call(value, relationComponentValue, (matchComponent === null || matchComponent === void 0 ? void 0 : matchComponent.componentConfig) || {});
|
|
17835
|
+
if (newValue) {
|
|
17836
|
+
result[value.reflectKey] = newValue;
|
|
17837
|
+
}
|
|
17838
|
+
} else {
|
|
17839
|
+
result[value.reflectKey] = relationComponentValue;
|
|
17840
|
+
}
|
|
17841
|
+
}
|
|
17842
|
+
});
|
|
17843
|
+
return result;
|
|
17844
|
+
});
|
|
17845
|
+
|
|
17632
17846
|
var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
17633
|
-
var _props$
|
|
17847
|
+
var _props$goodsSource2;
|
|
17634
17848
|
var _useState = React.useState(),
|
|
17635
17849
|
_useState2 = _slicedToArray(_useState, 2),
|
|
17636
17850
|
seletedGooods = _useState2[0],
|
|
17637
17851
|
setSeletedGooods = _useState2[1];
|
|
17852
|
+
var onSubmit = props.onSubmit,
|
|
17853
|
+
width = props.width;
|
|
17854
|
+
var _useState3 = React.useState(false),
|
|
17855
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
17856
|
+
visible = _useState4[0],
|
|
17857
|
+
setVisible = _useState4[1];
|
|
17858
|
+
var goodsListRef = React.useRef(null);
|
|
17638
17859
|
React.useImperativeHandle(ref, function () {
|
|
17639
17860
|
return {
|
|
17640
17861
|
open: function open(shopCode, options) {
|
|
@@ -17643,19 +17864,28 @@ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
|
17643
17864
|
}
|
|
17644
17865
|
};
|
|
17645
17866
|
});
|
|
17646
|
-
|
|
17647
|
-
|
|
17648
|
-
|
|
17649
|
-
|
|
17650
|
-
|
|
17651
|
-
|
|
17652
|
-
|
|
17867
|
+
React.useEffect(function () {
|
|
17868
|
+
if (visible && goodsListRef.current) {
|
|
17869
|
+
var _props$goodsSource;
|
|
17870
|
+
var defaultSearchValue = useDefaultSearchValue({
|
|
17871
|
+
form: props === null || props === void 0 ? void 0 : props.form,
|
|
17872
|
+
companyKey: props === null || props === void 0 ? void 0 : props.companyKey,
|
|
17873
|
+
source: (_props$goodsSource = props.goodsSource) === null || _props$goodsSource === void 0 ? void 0 : _props$goodsSource.source,
|
|
17874
|
+
erp: 'gy',
|
|
17875
|
+
templateDetail: props === null || props === void 0 ? void 0 : props.templateDetail
|
|
17876
|
+
});
|
|
17877
|
+
if (defaultSearchValue) {
|
|
17878
|
+
var _goodsListRef$current, _goodsListRef$current2;
|
|
17879
|
+
(_goodsListRef$current = goodsListRef.current) === null || _goodsListRef$current === void 0 ? void 0 : (_goodsListRef$current2 = _goodsListRef$current.setDefaultSearchValue) === null || _goodsListRef$current2 === void 0 ? void 0 : _goodsListRef$current2.call(_goodsListRef$current, defaultSearchValue);
|
|
17880
|
+
}
|
|
17881
|
+
}
|
|
17882
|
+
}, [visible]);
|
|
17653
17883
|
var _onCancel = function onCancel() {
|
|
17654
17884
|
setVisible(false);
|
|
17655
17885
|
};
|
|
17656
17886
|
var onOk = function onOk() {
|
|
17657
|
-
var _goodsListRef$
|
|
17658
|
-
var selectedList = ((_goodsListRef$
|
|
17887
|
+
var _goodsListRef$current3;
|
|
17888
|
+
var selectedList = ((_goodsListRef$current3 = goodsListRef.current) === null || _goodsListRef$current3 === void 0 ? void 0 : _goodsListRef$current3.getSelectGoodList()) || [];
|
|
17659
17889
|
onSubmit(selectedList);
|
|
17660
17890
|
_onCancel();
|
|
17661
17891
|
};
|
|
@@ -17670,7 +17900,7 @@ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
|
17670
17900
|
},
|
|
17671
17901
|
onOk: onOk,
|
|
17672
17902
|
wrapClassName: "goodModal"
|
|
17673
|
-
}, ((_props$
|
|
17903
|
+
}, ((_props$goodsSource2 = props.goodsSource) === null || _props$goodsSource2 === void 0 ? void 0 : _props$goodsSource2.source) === 'workOrder' ? /*#__PURE__*/React__default['default'].createElement(WorkorderList$1, {
|
|
17674
17904
|
erp: "gy",
|
|
17675
17905
|
goodsSource: props.goodsSource,
|
|
17676
17906
|
seletedGooods: seletedGooods,
|
|
@@ -17682,45 +17912,286 @@ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
|
17682
17912
|
};
|
|
17683
17913
|
var GyGoodsModal$2 = /*#__PURE__*/React.forwardRef(GyGoodsModal$1);
|
|
17684
17914
|
|
|
17685
|
-
var
|
|
17686
|
-
var
|
|
17687
|
-
|
|
17688
|
-
|
|
17689
|
-
|
|
17690
|
-
|
|
17691
|
-
|
|
17692
|
-
|
|
17693
|
-
|
|
17694
|
-
|
|
17695
|
-
|
|
17696
|
-
|
|
17697
|
-
|
|
17698
|
-
|
|
17699
|
-
|
|
17700
|
-
|
|
17701
|
-
|
|
17702
|
-
|
|
17703
|
-
}
|
|
17704
|
-
|
|
17705
|
-
|
|
17706
|
-
|
|
17707
|
-
}
|
|
17708
|
-
|
|
17709
|
-
|
|
17710
|
-
|
|
17711
|
-
|
|
17712
|
-
|
|
17713
|
-
|
|
17714
|
-
|
|
17715
|
-
|
|
17915
|
+
var getTableData$5 = function getTableData(_ref, formData) {
|
|
17916
|
+
var current = _ref.current,
|
|
17917
|
+
pageSize = _ref.pageSize;
|
|
17918
|
+
return extendRequest('/qy/gdfw/product/product/page', {
|
|
17919
|
+
method: 'post',
|
|
17920
|
+
data: _objectSpread2({
|
|
17921
|
+
pageSize: pageSize,
|
|
17922
|
+
pageNo: current,
|
|
17923
|
+
platform: 'JY_ERP'
|
|
17924
|
+
}, formData)
|
|
17925
|
+
}).then(function (res) {
|
|
17926
|
+
var _res$data = res.data,
|
|
17927
|
+
_res$data$productSkuL = _res$data.productSkuList,
|
|
17928
|
+
productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
|
|
17929
|
+
_res$data$total = _res$data.total,
|
|
17930
|
+
total = _res$data$total === void 0 ? 0 : _res$data$total;
|
|
17931
|
+
var newProducts = productSkuList.map(function (item, index) {
|
|
17932
|
+
return _objectSpread2({}, item);
|
|
17933
|
+
});
|
|
17934
|
+
return {
|
|
17935
|
+
total: total,
|
|
17936
|
+
list: newProducts
|
|
17937
|
+
};
|
|
17938
|
+
});
|
|
17939
|
+
};
|
|
17940
|
+
var searchFormData$4 = [{
|
|
17941
|
+
label: '规格名称',
|
|
17942
|
+
name: 'skuName',
|
|
17943
|
+
dataIndex: 'specName'
|
|
17944
|
+
}, {
|
|
17945
|
+
label: '规格编码',
|
|
17946
|
+
name: 'skuCode',
|
|
17947
|
+
dataIndex: 'specNo'
|
|
17948
|
+
}, {
|
|
17949
|
+
label: '商品名称',
|
|
17950
|
+
name: 'goodName'
|
|
17951
|
+
}, {
|
|
17952
|
+
label: '商品编码',
|
|
17953
|
+
name: 'goodNo'
|
|
17954
|
+
}];
|
|
17955
|
+
var GoodList$5 = function GoodList(props, ref) {
|
|
17956
|
+
var _useState = React.useState([]),
|
|
17957
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
17958
|
+
selectList = _useState2[0],
|
|
17959
|
+
setSelect = _useState2[1];
|
|
17960
|
+
var _useState3 = React.useState([]),
|
|
17961
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
17962
|
+
selectIds = _useState4[0],
|
|
17963
|
+
setSelectIds = _useState4[1];
|
|
17964
|
+
var _useGetColumns = useGetColumns('jy'),
|
|
17965
|
+
_useGetColumns2 = _slicedToArray(_useGetColumns, 3),
|
|
17966
|
+
columns = _useGetColumns2[0],
|
|
17967
|
+
showColumnsDataIndexList = _useGetColumns2[1],
|
|
17968
|
+
loading = _useGetColumns2[2];
|
|
17969
|
+
React.useImperativeHandle(ref, function () {
|
|
17970
|
+
return {
|
|
17971
|
+
getSelectGoodList: function getSelectGoodList() {
|
|
17972
|
+
return selectList;
|
|
17716
17973
|
}
|
|
17717
|
-
}
|
|
17718
|
-
|
|
17719
|
-
|
|
17720
|
-
|
|
17721
|
-
|
|
17722
|
-
|
|
17723
|
-
|
|
17974
|
+
};
|
|
17975
|
+
});
|
|
17976
|
+
var _Form$useForm = antd.Form.useForm(),
|
|
17977
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
17978
|
+
form = _Form$useForm2[0];
|
|
17979
|
+
var _useAntdTable = ahooks.useAntdTable(getTableData$5, {
|
|
17980
|
+
defaultPageSize: 10,
|
|
17981
|
+
form: form
|
|
17982
|
+
}),
|
|
17983
|
+
tableProps = _useAntdTable.tableProps,
|
|
17984
|
+
search = _useAntdTable.search,
|
|
17985
|
+
params = _useAntdTable.params;
|
|
17986
|
+
var submit = search.submit,
|
|
17987
|
+
reset = search.reset;
|
|
17988
|
+
var rowSelection = {
|
|
17989
|
+
selectedRowKeys: selectIds,
|
|
17990
|
+
fixed: true,
|
|
17991
|
+
onSelect: function onSelect(record, selected) {
|
|
17992
|
+
if (selected) {
|
|
17993
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), [record.id]));
|
|
17994
|
+
setSelect([].concat(_toConsumableArray(selectList), [record]));
|
|
17995
|
+
} else {
|
|
17996
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
17997
|
+
return t !== record.id;
|
|
17998
|
+
}));
|
|
17999
|
+
setSelect(selectList.filter(function (t) {
|
|
18000
|
+
return t.id !== record.id;
|
|
18001
|
+
}));
|
|
18002
|
+
}
|
|
18003
|
+
},
|
|
18004
|
+
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
18005
|
+
if (selected) {
|
|
18006
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
|
|
18007
|
+
return t.id;
|
|
18008
|
+
}))));
|
|
18009
|
+
setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
|
|
18010
|
+
} else {
|
|
18011
|
+
setSelectIds(lodash.difference(selectIds, changeRows.map(function (t) {
|
|
18012
|
+
return t.id;
|
|
18013
|
+
})));
|
|
18014
|
+
var list = lodash.differenceWith(selectList, changeRows, function (arrVal, othVal) {
|
|
18015
|
+
return arrVal.id !== othVal.id;
|
|
18016
|
+
});
|
|
18017
|
+
setSelect(list);
|
|
18018
|
+
}
|
|
18019
|
+
},
|
|
18020
|
+
getCheckboxProps: function getCheckboxProps(record) {
|
|
18021
|
+
var options = {
|
|
18022
|
+
disabled: (props.selectedRows || []).map(function (row) {
|
|
18023
|
+
return row.id || row.specId;
|
|
18024
|
+
}).includes(record.id || record.specId),
|
|
18025
|
+
name: record.id
|
|
18026
|
+
};
|
|
18027
|
+
return options;
|
|
18028
|
+
}
|
|
18029
|
+
};
|
|
18030
|
+
var showTable = function showTable() {
|
|
18031
|
+
var handleDelete = function handleDelete(record) {
|
|
18032
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
18033
|
+
return t !== record.id;
|
|
18034
|
+
}));
|
|
18035
|
+
setSelect(selectList.filter(function (t) {
|
|
18036
|
+
return t.id !== record.id;
|
|
18037
|
+
}));
|
|
18038
|
+
};
|
|
18039
|
+
var showColumns = [{
|
|
18040
|
+
dataIndex: '',
|
|
18041
|
+
title: "\u64CD\u4F5C",
|
|
18042
|
+
ellipsis: true,
|
|
18043
|
+
width: 100,
|
|
18044
|
+
render: function render(val, record) {
|
|
18045
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
18046
|
+
type: "link",
|
|
18047
|
+
onClick: function onClick() {
|
|
18048
|
+
return handleDelete(record);
|
|
18049
|
+
}
|
|
18050
|
+
}, "\u5220\u9664");
|
|
18051
|
+
}
|
|
18052
|
+
}].concat(lodash.takeRight(columns, columns.length - 1));
|
|
18053
|
+
return selectList.length ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
18054
|
+
style: {
|
|
18055
|
+
width: '100%',
|
|
18056
|
+
maxWidth: '387px'
|
|
18057
|
+
}
|
|
18058
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
18059
|
+
columns: showColumns,
|
|
18060
|
+
rowKey: 'id',
|
|
18061
|
+
dataSource: selectList,
|
|
18062
|
+
scroll: {
|
|
18063
|
+
x: '100%',
|
|
18064
|
+
y: 250
|
|
18065
|
+
},
|
|
18066
|
+
pagination: {
|
|
18067
|
+
size: 'small',
|
|
18068
|
+
total: selectIds.length,
|
|
18069
|
+
pageSize: 10,
|
|
18070
|
+
showSizeChanger: false
|
|
18071
|
+
}
|
|
18072
|
+
})) : null;
|
|
18073
|
+
};
|
|
18074
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Skeleton, {
|
|
18075
|
+
active: true,
|
|
18076
|
+
loading: loading
|
|
18077
|
+
}, /*#__PURE__*/React__default['default'].createElement(SearchForm, {
|
|
18078
|
+
searchFormData: searchFormData$4,
|
|
18079
|
+
form: form,
|
|
18080
|
+
showColumnsDataIndexList: showColumnsDataIndexList,
|
|
18081
|
+
submit: submit,
|
|
18082
|
+
reset: reset
|
|
18083
|
+
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
18084
|
+
style: {
|
|
18085
|
+
marginTop: '4px'
|
|
18086
|
+
}
|
|
18087
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2({
|
|
18088
|
+
rowSelection: rowSelection,
|
|
18089
|
+
rowKey: "id",
|
|
18090
|
+
columns: columns,
|
|
18091
|
+
scroll: {
|
|
18092
|
+
x: '100%',
|
|
18093
|
+
y: 250
|
|
18094
|
+
}
|
|
18095
|
+
}, tableProps))), /*#__PURE__*/React__default['default'].createElement(antd.Popover, {
|
|
18096
|
+
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
18097
|
+
return triggerNode.parentElement;
|
|
18098
|
+
},
|
|
18099
|
+
content: showTable(),
|
|
18100
|
+
title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
|
|
18101
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
18102
|
+
danger: true,
|
|
18103
|
+
type: "text"
|
|
18104
|
+
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(icons.CaretUpOutlined, null))));
|
|
18105
|
+
};
|
|
18106
|
+
var JyGoodsList = /*#__PURE__*/React.forwardRef(GoodList$5);
|
|
18107
|
+
|
|
18108
|
+
var JyGoodsModal = function JyGoodsModal(props, ref) {
|
|
18109
|
+
React.useImperativeHandle(ref, function () {
|
|
18110
|
+
return {
|
|
18111
|
+
open: function open(shopCode) {
|
|
18112
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
18113
|
+
setVisible(true);
|
|
18114
|
+
setSelectedRows(options.value || []);
|
|
18115
|
+
}
|
|
18116
|
+
};
|
|
18117
|
+
});
|
|
18118
|
+
var onSubmit = props.onSubmit,
|
|
18119
|
+
width = props.width;
|
|
18120
|
+
var _useState = React.useState(false),
|
|
18121
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
18122
|
+
visible = _useState2[0],
|
|
18123
|
+
setVisible = _useState2[1];
|
|
18124
|
+
var _useState3 = React.useState([]),
|
|
18125
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
18126
|
+
selectedRows = _useState4[0],
|
|
18127
|
+
setSelectedRows = _useState4[1];
|
|
18128
|
+
var jyGoodsListRef = React.useRef(null);
|
|
18129
|
+
var _onCancel = function onCancel() {
|
|
18130
|
+
setVisible(false);
|
|
18131
|
+
};
|
|
18132
|
+
var onOk = function onOk() {
|
|
18133
|
+
var _jyGoodsListRef$curre;
|
|
18134
|
+
var selectedList = ((_jyGoodsListRef$curre = jyGoodsListRef.current) === null || _jyGoodsListRef$curre === void 0 ? void 0 : _jyGoodsListRef$curre.getSelectGoodList()) || [];
|
|
18135
|
+
onSubmit(selectedList);
|
|
18136
|
+
_onCancel();
|
|
18137
|
+
};
|
|
18138
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, visible && /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
18139
|
+
title: '选择商品',
|
|
18140
|
+
okText: '确认',
|
|
18141
|
+
cancelText: '取消',
|
|
18142
|
+
visible: visible,
|
|
18143
|
+
width: width || 850,
|
|
18144
|
+
onCancel: function onCancel() {
|
|
18145
|
+
_onCancel();
|
|
18146
|
+
},
|
|
18147
|
+
onOk: onOk,
|
|
18148
|
+
wrapClassName: "goodModal"
|
|
18149
|
+
}, /*#__PURE__*/React__default['default'].createElement(JyGoodsList, {
|
|
18150
|
+
ref: jyGoodsListRef,
|
|
18151
|
+
selectedRows: selectedRows
|
|
18152
|
+
})));
|
|
18153
|
+
};
|
|
18154
|
+
var JyGoodsModal$1 = /*#__PURE__*/React.forwardRef(JyGoodsModal);
|
|
18155
|
+
|
|
18156
|
+
var getColumns = function getColumns(_ref) {
|
|
18157
|
+
var _ref$text = _ref.text,
|
|
18158
|
+
disabled = _ref.disabled,
|
|
18159
|
+
updateHandle = _ref.updateHandle;
|
|
18160
|
+
return {
|
|
18161
|
+
//百胜E3补发商品
|
|
18162
|
+
BS_E3_REISSUE_GOODS: [{
|
|
18163
|
+
dataIndex: 'sku',
|
|
18164
|
+
title: "SKU",
|
|
18165
|
+
width: 150
|
|
18166
|
+
}, {
|
|
18167
|
+
dataIndex: 'skuId',
|
|
18168
|
+
title: "SKU ID",
|
|
18169
|
+
width: 150
|
|
18170
|
+
}, {
|
|
18171
|
+
dataIndex: 'goodsName',
|
|
18172
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
18173
|
+
width: 150
|
|
18174
|
+
}, {
|
|
18175
|
+
dataIndex: 'goodsShortName',
|
|
18176
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
18177
|
+
width: 150
|
|
18178
|
+
}, {
|
|
18179
|
+
dataIndex: 'picPath',
|
|
18180
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
18181
|
+
width: 150,
|
|
18182
|
+
render: function render(val) {
|
|
18183
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
18184
|
+
width: 60,
|
|
18185
|
+
src: val
|
|
18186
|
+
});
|
|
18187
|
+
}
|
|
18188
|
+
}, {
|
|
18189
|
+
dataIndex: 'goodsSn',
|
|
18190
|
+
title: "\u8D27\u53F7",
|
|
18191
|
+
width: 150
|
|
18192
|
+
}, {
|
|
18193
|
+
dataIndex: 'goodsId',
|
|
18194
|
+
title: "\u8D27\u53F7ID",
|
|
17724
18195
|
width: 150
|
|
17725
18196
|
}, {
|
|
17726
18197
|
dataIndex: 'colorName',
|
|
@@ -18612,7 +19083,7 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
18612
19083
|
};
|
|
18613
19084
|
};
|
|
18614
19085
|
|
|
18615
|
-
var getYesOrNo$
|
|
19086
|
+
var getYesOrNo$2 = function getYesOrNo(val) {
|
|
18616
19087
|
if (kmkfUtils.isNull(val)) return null;
|
|
18617
19088
|
return val ? '是' : '否';
|
|
18618
19089
|
};
|
|
@@ -18750,7 +19221,7 @@ var getColumns$3 = function getColumns(_ref) {
|
|
|
18750
19221
|
label: '否',
|
|
18751
19222
|
value: false
|
|
18752
19223
|
}]
|
|
18753
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$
|
|
19224
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$2(val));
|
|
18754
19225
|
},
|
|
18755
19226
|
width: 100
|
|
18756
19227
|
}]
|
|
@@ -18762,7 +19233,7 @@ var isNumberOrNumberString = function isNumberOrNumberString(value) {
|
|
|
18762
19233
|
if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
|
|
18763
19234
|
return false;
|
|
18764
19235
|
};
|
|
18765
|
-
var getYesOrNo$
|
|
19236
|
+
var getYesOrNo$3 = function getYesOrNo(val) {
|
|
18766
19237
|
if (kmkfUtils.isNull(val)) return null;
|
|
18767
19238
|
return val ? '是' : '否';
|
|
18768
19239
|
};
|
|
@@ -18872,7 +19343,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
18872
19343
|
title: "\u662F\u5426\u53D6\u6D88",
|
|
18873
19344
|
width: 150,
|
|
18874
19345
|
render: function render(val) {
|
|
18875
|
-
return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$
|
|
19346
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$3(val));
|
|
18876
19347
|
}
|
|
18877
19348
|
}, {
|
|
18878
19349
|
dataIndex: 'isGift',
|
|
@@ -18891,7 +19362,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
18891
19362
|
label: '否',
|
|
18892
19363
|
value: 0
|
|
18893
19364
|
}]
|
|
18894
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$
|
|
19365
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$3(val));
|
|
18895
19366
|
}
|
|
18896
19367
|
}, {
|
|
18897
19368
|
dataIndex: 'skuNote',
|
|
@@ -19011,7 +19482,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
19011
19482
|
label: '否',
|
|
19012
19483
|
value: 0
|
|
19013
19484
|
}]
|
|
19014
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$
|
|
19485
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$3(val));
|
|
19015
19486
|
}
|
|
19016
19487
|
}].map(function (item) {
|
|
19017
19488
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
@@ -19135,7 +19606,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
19135
19606
|
label: '否',
|
|
19136
19607
|
value: 0
|
|
19137
19608
|
}]
|
|
19138
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$
|
|
19609
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$3(val));
|
|
19139
19610
|
}
|
|
19140
19611
|
}].map(function (item) {
|
|
19141
19612
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
@@ -19782,59 +20253,487 @@ var getColumns$6 = function getColumns(_ref) {
|
|
|
19782
20253
|
dataIndex: 'type',
|
|
19783
20254
|
title: "\u5546\u54C1\u7C7B\u578B",
|
|
19784
20255
|
width: 150
|
|
19785
|
-
}].map(function (item) {
|
|
19786
|
-
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
19787
|
-
align: 'center',
|
|
19788
|
-
ellipsis: true
|
|
19789
|
-
});
|
|
19790
|
-
}),
|
|
19791
|
-
KM_REISSUE_GOODS: [{
|
|
19792
|
-
dataIndex: 'skuPropertiesName',
|
|
19793
|
-
title: "\u89C4\u683C\u540D\u79F0",
|
|
19794
|
-
width: 250
|
|
20256
|
+
}].map(function (item) {
|
|
20257
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
20258
|
+
align: 'center',
|
|
20259
|
+
ellipsis: true
|
|
20260
|
+
});
|
|
20261
|
+
}),
|
|
20262
|
+
KM_REISSUE_GOODS: [{
|
|
20263
|
+
dataIndex: 'skuPropertiesName',
|
|
20264
|
+
title: "\u89C4\u683C\u540D\u79F0",
|
|
20265
|
+
width: 250
|
|
20266
|
+
}, {
|
|
20267
|
+
dataIndex: 'sysTitle',
|
|
20268
|
+
title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
|
|
20269
|
+
width: 150
|
|
20270
|
+
}, {
|
|
20271
|
+
dataIndex: 'shortTitle',
|
|
20272
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
20273
|
+
width: 150
|
|
20274
|
+
}, {
|
|
20275
|
+
dataIndex: 'title',
|
|
20276
|
+
title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
|
|
20277
|
+
width: 150
|
|
20278
|
+
}, {
|
|
20279
|
+
dataIndex: 'sysOuterId',
|
|
20280
|
+
title: "\u7CFB\u7EDF\u5546\u5BB6\u7F16\u7801",
|
|
20281
|
+
width: 150
|
|
20282
|
+
}, {
|
|
20283
|
+
dataIndex: 'itemSysId',
|
|
20284
|
+
title: "\u7CFB\u7EDF\u5546\u54C1ID",
|
|
20285
|
+
width: 150
|
|
20286
|
+
}, {
|
|
20287
|
+
dataIndex: 'skuSysId',
|
|
20288
|
+
title: "\u7CFB\u7EDF\u89C4\u683CID",
|
|
20289
|
+
width: 150
|
|
20290
|
+
}, {
|
|
20291
|
+
dataIndex: 'skuId',
|
|
20292
|
+
title: "\u5E73\u53F0\u89C4\u683C\u7F16\u53F7",
|
|
20293
|
+
width: 170
|
|
20294
|
+
}, {
|
|
20295
|
+
dataIndex: 'realNum',
|
|
20296
|
+
title: "\u5B9E\u9645\u8865\u53D1\u6570\u91CF",
|
|
20297
|
+
width: 100,
|
|
20298
|
+
validator: function validator(_rule, value) {
|
|
20299
|
+
var title = '';
|
|
20300
|
+
if (((value === null || value === void 0 ? void 0 : value.kmReissueGoods) || []).some(function (goods) {
|
|
20301
|
+
var realNum = toNum$2(goods === null || goods === void 0 ? void 0 : goods.realNum);
|
|
20302
|
+
var res = typeof realNum === 'number' ? realNum < 1 : true;
|
|
20303
|
+
if (res) {
|
|
20304
|
+
title = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
20305
|
+
}
|
|
20306
|
+
return res;
|
|
20307
|
+
})) {
|
|
20308
|
+
return Promise.reject("".concat(title, "\u5B9E\u9645\u8865\u53D1\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
20309
|
+
}
|
|
20310
|
+
},
|
|
20311
|
+
render: function render(val, record, index) {
|
|
20312
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
20313
|
+
style: {
|
|
20314
|
+
width: 70
|
|
20315
|
+
},
|
|
20316
|
+
value: val,
|
|
20317
|
+
min: 1,
|
|
20318
|
+
precision: 0,
|
|
20319
|
+
onChange: function onChange(num) {
|
|
20320
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'realNum');
|
|
20321
|
+
}
|
|
20322
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
20323
|
+
}
|
|
20324
|
+
}, {
|
|
20325
|
+
dataIndex: 'desiredNum',
|
|
20326
|
+
title: "\u5E94\u8865\u53D1\u6570\u91CF",
|
|
20327
|
+
width: 100,
|
|
20328
|
+
render: function render(val, record, index) {
|
|
20329
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
20330
|
+
style: {
|
|
20331
|
+
width: 70
|
|
20332
|
+
},
|
|
20333
|
+
value: val,
|
|
20334
|
+
min: 1,
|
|
20335
|
+
precision: 0,
|
|
20336
|
+
onChange: function onChange(num) {
|
|
20337
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'desiredNum');
|
|
20338
|
+
}
|
|
20339
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
20340
|
+
}
|
|
20341
|
+
}, {
|
|
20342
|
+
dataIndex: 'price',
|
|
20343
|
+
title: "\u5546\u54C1\u9500\u552E\u4EF7",
|
|
20344
|
+
width: 150,
|
|
20345
|
+
render: function render(val) {
|
|
20346
|
+
return val || val === 0 ? Number(val).toFixed(2) : '';
|
|
20347
|
+
}
|
|
20348
|
+
}, {
|
|
20349
|
+
dataIndex: 'payment',
|
|
20350
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
20351
|
+
width: 150,
|
|
20352
|
+
render: function render(val, record, index) {
|
|
20353
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
20354
|
+
style: {
|
|
20355
|
+
width: 130
|
|
20356
|
+
},
|
|
20357
|
+
value: val,
|
|
20358
|
+
min: 0,
|
|
20359
|
+
precision: 2,
|
|
20360
|
+
onChange: function onChange(num) {
|
|
20361
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'payment');
|
|
20362
|
+
}
|
|
20363
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
20364
|
+
}
|
|
20365
|
+
}, {
|
|
20366
|
+
dataIndex: 'type',
|
|
20367
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
20368
|
+
width: 150
|
|
20369
|
+
}, {
|
|
20370
|
+
dataIndex: 'sysPicPath',
|
|
20371
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
20372
|
+
width: 100,
|
|
20373
|
+
render: function render(val) {
|
|
20374
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
20375
|
+
width: 60,
|
|
20376
|
+
src: val
|
|
20377
|
+
});
|
|
20378
|
+
}
|
|
20379
|
+
}].map(function (item) {
|
|
20380
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
20381
|
+
align: 'center',
|
|
20382
|
+
ellipsis: true
|
|
20383
|
+
});
|
|
20384
|
+
})
|
|
20385
|
+
};
|
|
20386
|
+
};
|
|
20387
|
+
|
|
20388
|
+
var isNumberOrNumberString$1 = function isNumberOrNumberString(value) {
|
|
20389
|
+
if (typeof value === 'number') return true;
|
|
20390
|
+
if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
|
|
20391
|
+
return false;
|
|
20392
|
+
};
|
|
20393
|
+
function toNum$3(value) {
|
|
20394
|
+
if (typeof value === 'string') {
|
|
20395
|
+
return value ? +value : void 0;
|
|
20396
|
+
}
|
|
20397
|
+
if (typeof value === 'number') {
|
|
20398
|
+
return value;
|
|
20399
|
+
}
|
|
20400
|
+
return void 0;
|
|
20401
|
+
}
|
|
20402
|
+
var getColumns$7 = function getColumns(_ref) {
|
|
20403
|
+
var _ref$text = _ref.text,
|
|
20404
|
+
disabled = _ref.disabled,
|
|
20405
|
+
updateHandle = _ref.updateHandle,
|
|
20406
|
+
updateDataHandle = _ref.updateDataHandle;
|
|
20407
|
+
return {
|
|
20408
|
+
//巨益商品信息
|
|
20409
|
+
JY_GOODS: [{
|
|
20410
|
+
dataIndex: 'productName',
|
|
20411
|
+
title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
|
|
20412
|
+
align: 'center',
|
|
20413
|
+
ellipsis: true,
|
|
20414
|
+
width: 150
|
|
20415
|
+
}, {
|
|
20416
|
+
dataIndex: 'productCode',
|
|
20417
|
+
title: "\u7CFB\u7EDF\u5546\u54C1\u7F16\u7801",
|
|
20418
|
+
align: 'center',
|
|
20419
|
+
ellipsis: true,
|
|
20420
|
+
width: 150
|
|
20421
|
+
}, {
|
|
20422
|
+
dataIndex: 'productId',
|
|
20423
|
+
title: "\u7CFB\u7EDF\u5546\u54C1ID",
|
|
20424
|
+
align: 'center',
|
|
20425
|
+
ellipsis: true,
|
|
20426
|
+
width: 150
|
|
20427
|
+
}, {
|
|
20428
|
+
dataIndex: 'skuName',
|
|
20429
|
+
title: "\u7CFB\u7EDF\u89C4\u683C\u540D\u79F0",
|
|
20430
|
+
align: 'center',
|
|
20431
|
+
ellipsis: true,
|
|
20432
|
+
width: 150
|
|
20433
|
+
}, {
|
|
20434
|
+
dataIndex: 'skuCode',
|
|
20435
|
+
title: "\u7CFB\u7EDF\u89C4\u683C\u7F16\u7801",
|
|
20436
|
+
align: 'center',
|
|
20437
|
+
ellipsis: true,
|
|
20438
|
+
width: 150
|
|
20439
|
+
}, {
|
|
20440
|
+
dataIndex: 'specId',
|
|
20441
|
+
title: "\u89C4\u683CID",
|
|
20442
|
+
align: 'center',
|
|
20443
|
+
ellipsis: true,
|
|
20444
|
+
width: 150
|
|
20445
|
+
},
|
|
20446
|
+
// {
|
|
20447
|
+
// dataIndex: 'goodsName',
|
|
20448
|
+
// title: `货品名称`,
|
|
20449
|
+
// width: 250,
|
|
20450
|
+
// },
|
|
20451
|
+
// {
|
|
20452
|
+
// dataIndex: 'goodsCode',
|
|
20453
|
+
// title: `货品编号`,
|
|
20454
|
+
// width: 200,
|
|
20455
|
+
// },
|
|
20456
|
+
// {
|
|
20457
|
+
// dataIndex: 'goodsId',
|
|
20458
|
+
// title: `货品ID`,
|
|
20459
|
+
// width: 150,
|
|
20460
|
+
// },
|
|
20461
|
+
{
|
|
20462
|
+
dataIndex: 'goodsClass',
|
|
20463
|
+
title: "\u8D27\u54C1\u7C7B\u522B",
|
|
20464
|
+
width: 150
|
|
20465
|
+
}, {
|
|
20466
|
+
dataIndex: 'code',
|
|
20467
|
+
title: "\u6761\u7801",
|
|
20468
|
+
width: 150
|
|
20469
|
+
},
|
|
20470
|
+
// {
|
|
20471
|
+
// dataIndex: 'specName',
|
|
20472
|
+
// title: `规格名称`,
|
|
20473
|
+
// align: 'center',
|
|
20474
|
+
// ellipsis: true,
|
|
20475
|
+
// width: 200,
|
|
20476
|
+
// },
|
|
20477
|
+
// {
|
|
20478
|
+
// dataIndex: 'specCode',
|
|
20479
|
+
// title: `规格编号`,
|
|
20480
|
+
// align: 'center',
|
|
20481
|
+
// ellipsis: true,
|
|
20482
|
+
// width: 150,
|
|
20483
|
+
// },
|
|
20484
|
+
{
|
|
20485
|
+
dataIndex: 'mallProductName',
|
|
20486
|
+
title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
|
|
20487
|
+
align: 'center',
|
|
20488
|
+
ellipsis: true,
|
|
20489
|
+
width: 250
|
|
20490
|
+
}, {
|
|
20491
|
+
dataIndex: 'mallProductOutCode',
|
|
20492
|
+
title: "\u5E73\u53F0\u5546\u54C1\u7F16\u7801",
|
|
20493
|
+
align: 'center',
|
|
20494
|
+
ellipsis: true,
|
|
20495
|
+
width: 150
|
|
20496
|
+
}, {
|
|
20497
|
+
dataIndex: 'mallProductId',
|
|
20498
|
+
title: "\u5E73\u53F0\u5546\u54C1ID",
|
|
20499
|
+
align: 'center',
|
|
20500
|
+
ellipsis: true,
|
|
20501
|
+
width: 250
|
|
20502
|
+
}, {
|
|
20503
|
+
dataIndex: 'mallSkuName',
|
|
20504
|
+
title: "\u5E73\u53F0\u89C4\u683C\u540D\u79F0",
|
|
20505
|
+
align: 'center',
|
|
20506
|
+
ellipsis: true,
|
|
20507
|
+
width: 250
|
|
20508
|
+
}, {
|
|
20509
|
+
dataIndex: 'mallSkuId',
|
|
20510
|
+
title: "\u5E73\u53F0\u89C4\u683CID",
|
|
20511
|
+
align: 'center',
|
|
20512
|
+
ellipsis: true,
|
|
20513
|
+
width: 250
|
|
20514
|
+
}, {
|
|
20515
|
+
dataIndex: 'sellCount',
|
|
20516
|
+
title: "\u6570\u91CF",
|
|
20517
|
+
width: 100,
|
|
20518
|
+
validator: function validator(_rule, value) {
|
|
20519
|
+
var productName = '';
|
|
20520
|
+
if (((value === null || value === void 0 ? void 0 : value.jyGoods) || []).some(function (goods) {
|
|
20521
|
+
var qty = toNum$3(goods === null || goods === void 0 ? void 0 : goods.sellCount);
|
|
20522
|
+
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
20523
|
+
if (res) {
|
|
20524
|
+
productName = (goods === null || goods === void 0 ? void 0 : goods.productName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.productName, "]") : '';
|
|
20525
|
+
}
|
|
20526
|
+
return res;
|
|
20527
|
+
})) {
|
|
20528
|
+
return Promise.reject("".concat(productName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
20529
|
+
}
|
|
20530
|
+
},
|
|
20531
|
+
render: function render(val, record, index) {
|
|
20532
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
20533
|
+
style: {
|
|
20534
|
+
width: 70
|
|
20535
|
+
},
|
|
20536
|
+
value: val,
|
|
20537
|
+
min: 1,
|
|
20538
|
+
precision: 0,
|
|
20539
|
+
onChange: function onChange(num) {
|
|
20540
|
+
updateDataHandle({
|
|
20541
|
+
sellCount: num,
|
|
20542
|
+
sellTotal: num && isNumberOrNumberString$1(record.sellPrice) ? num * record.sellPrice : null
|
|
20543
|
+
}, index);
|
|
20544
|
+
}
|
|
20545
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
20546
|
+
}
|
|
20547
|
+
}, {
|
|
20548
|
+
dataIndex: 'sellPrice',
|
|
20549
|
+
title: "\u5355\u4EF7",
|
|
20550
|
+
width: 150,
|
|
20551
|
+
render: function render(val, record, index) {
|
|
20552
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
20553
|
+
style: {
|
|
20554
|
+
width: 130
|
|
20555
|
+
},
|
|
20556
|
+
value: val,
|
|
20557
|
+
min: 0,
|
|
20558
|
+
precision: 2,
|
|
20559
|
+
onChange: function onChange(num) {
|
|
20560
|
+
updateDataHandle({
|
|
20561
|
+
sellPrice: num,
|
|
20562
|
+
sellTotal: num && isNumberOrNumberString$1(record.sellCount) ? num * record.sellCount : null
|
|
20563
|
+
}, index);
|
|
20564
|
+
}
|
|
20565
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
20566
|
+
}
|
|
20567
|
+
}, {
|
|
20568
|
+
dataIndex: 'mallSellingPrice',
|
|
20569
|
+
title: "\u5E73\u53F0\u5546\u54C1\u4EF7\u683C",
|
|
20570
|
+
width: 150
|
|
20571
|
+
}, {
|
|
20572
|
+
dataIndex: 'sellTotal',
|
|
20573
|
+
title: "\u91D1\u989D",
|
|
20574
|
+
width: 150
|
|
20575
|
+
}, {
|
|
20576
|
+
dataIndex: 'settlementPrice',
|
|
20577
|
+
title: "\u7ED3\u7B97\u4EF7",
|
|
20578
|
+
width: 150
|
|
20579
|
+
}, {
|
|
20580
|
+
dataIndex: 'divideOrderFee',
|
|
20581
|
+
title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
|
|
20582
|
+
width: 150
|
|
20583
|
+
}, {
|
|
20584
|
+
dataIndex: 'bfit',
|
|
20585
|
+
title: "\u662F\u5426\u7EC4\u5408\u88C5",
|
|
20586
|
+
width: 150,
|
|
20587
|
+
render: function render(val, record, index) {
|
|
20588
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
20589
|
+
dropdownStyle: {
|
|
20590
|
+
zIndex: 2000
|
|
20591
|
+
},
|
|
20592
|
+
getPopupContainer: function getPopupContainer() {
|
|
20593
|
+
return document.body;
|
|
20594
|
+
},
|
|
20595
|
+
value: val,
|
|
20596
|
+
onChange: function onChange(value) {
|
|
20597
|
+
updateHandle(value, index, 'bfit');
|
|
20598
|
+
},
|
|
20599
|
+
options: [{
|
|
20600
|
+
label: '是',
|
|
20601
|
+
value: 'True'
|
|
20602
|
+
}, {
|
|
20603
|
+
label: '否',
|
|
20604
|
+
value: 'False'
|
|
20605
|
+
}]
|
|
20606
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val === 'True' ? '是' : '否');
|
|
20607
|
+
}
|
|
20608
|
+
}, {
|
|
20609
|
+
dataIndex: 'combinationName',
|
|
20610
|
+
title: "\u7EC4\u5408\u5546\u54C1\u540D\u79F0",
|
|
20611
|
+
width: 150
|
|
20612
|
+
}, {
|
|
20613
|
+
dataIndex: 'combinationCode',
|
|
20614
|
+
title: "\u7EC4\u5408\u5546\u54C1\u7F16\u7801",
|
|
20615
|
+
width: 150
|
|
20616
|
+
}, {
|
|
20617
|
+
dataIndex: 'gift',
|
|
20618
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
20619
|
+
width: 150,
|
|
20620
|
+
render: function render(val, record, index) {
|
|
20621
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
20622
|
+
dropdownStyle: {
|
|
20623
|
+
zIndex: 2000
|
|
20624
|
+
},
|
|
20625
|
+
getPopupContainer: function getPopupContainer() {
|
|
20626
|
+
return document.body;
|
|
20627
|
+
},
|
|
20628
|
+
value: val,
|
|
20629
|
+
onChange: function onChange(value) {
|
|
20630
|
+
updateHandle(value, index, 'gift');
|
|
20631
|
+
},
|
|
20632
|
+
options: [{
|
|
20633
|
+
label: '是',
|
|
20634
|
+
value: '1'
|
|
20635
|
+
}, {
|
|
20636
|
+
label: '否',
|
|
20637
|
+
value: '0'
|
|
20638
|
+
}]
|
|
20639
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val === '1' ? '是' : '否');
|
|
20640
|
+
}
|
|
20641
|
+
}].map(function (item) {
|
|
20642
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
20643
|
+
align: 'center',
|
|
20644
|
+
ellipsis: true
|
|
20645
|
+
});
|
|
20646
|
+
}),
|
|
20647
|
+
// 巨益补发商品信息
|
|
20648
|
+
JY_REISSUE_GOODS: [{
|
|
20649
|
+
dataIndex: 'productName',
|
|
20650
|
+
title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
|
|
20651
|
+
align: 'center',
|
|
20652
|
+
ellipsis: true,
|
|
20653
|
+
width: 150
|
|
20654
|
+
}, {
|
|
20655
|
+
dataIndex: 'productCode',
|
|
20656
|
+
title: "\u7CFB\u7EDF\u5546\u54C1\u7F16\u7801",
|
|
20657
|
+
align: 'center',
|
|
20658
|
+
ellipsis: true,
|
|
20659
|
+
width: 150
|
|
20660
|
+
}, {
|
|
20661
|
+
dataIndex: 'productId',
|
|
20662
|
+
title: "\u7CFB\u7EDF\u5546\u54C1ID",
|
|
20663
|
+
align: 'center',
|
|
20664
|
+
ellipsis: true,
|
|
20665
|
+
width: 150
|
|
20666
|
+
}, {
|
|
20667
|
+
dataIndex: 'skuName',
|
|
20668
|
+
title: "\u7CFB\u7EDF\u89C4\u683C\u540D\u79F0",
|
|
20669
|
+
align: 'center',
|
|
20670
|
+
ellipsis: true,
|
|
20671
|
+
width: 150
|
|
20672
|
+
}, {
|
|
20673
|
+
dataIndex: 'skuCode',
|
|
20674
|
+
title: "\u7CFB\u7EDF\u89C4\u683C\u7F16\u7801",
|
|
20675
|
+
align: 'center',
|
|
20676
|
+
ellipsis: true,
|
|
20677
|
+
width: 150
|
|
20678
|
+
}, {
|
|
20679
|
+
dataIndex: 'specId',
|
|
20680
|
+
title: "\u89C4\u683CID",
|
|
20681
|
+
align: 'center',
|
|
20682
|
+
ellipsis: true,
|
|
20683
|
+
width: 150
|
|
19795
20684
|
}, {
|
|
19796
|
-
dataIndex: '
|
|
19797
|
-
title: "\
|
|
20685
|
+
dataIndex: 'goodsClass',
|
|
20686
|
+
title: "\u8D27\u54C1\u7C7B\u522B",
|
|
19798
20687
|
width: 150
|
|
19799
20688
|
}, {
|
|
19800
|
-
dataIndex: '
|
|
19801
|
-
title: "\
|
|
20689
|
+
dataIndex: 'code',
|
|
20690
|
+
title: "\u6761\u7801",
|
|
19802
20691
|
width: 150
|
|
19803
20692
|
}, {
|
|
19804
|
-
dataIndex: '
|
|
20693
|
+
dataIndex: 'mallProductName',
|
|
19805
20694
|
title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
|
|
20695
|
+
align: 'center',
|
|
20696
|
+
ellipsis: true,
|
|
19806
20697
|
width: 150
|
|
19807
20698
|
}, {
|
|
19808
|
-
dataIndex: '
|
|
19809
|
-
title: "\
|
|
20699
|
+
dataIndex: 'mallProductOutCode',
|
|
20700
|
+
title: "\u5E73\u53F0\u5546\u54C1\u7F16\u7801",
|
|
20701
|
+
align: 'center',
|
|
20702
|
+
ellipsis: true,
|
|
19810
20703
|
width: 150
|
|
19811
20704
|
}, {
|
|
19812
|
-
dataIndex: '
|
|
19813
|
-
title: "\
|
|
20705
|
+
dataIndex: 'mallProductId',
|
|
20706
|
+
title: "\u5E73\u53F0\u5546\u54C1ID",
|
|
20707
|
+
align: 'center',
|
|
20708
|
+
ellipsis: true,
|
|
19814
20709
|
width: 150
|
|
19815
20710
|
}, {
|
|
19816
|
-
dataIndex: '
|
|
19817
|
-
title: "\
|
|
20711
|
+
dataIndex: 'mallSkuName',
|
|
20712
|
+
title: "\u5E73\u53F0\u89C4\u683C\u540D\u79F0",
|
|
20713
|
+
align: 'center',
|
|
20714
|
+
ellipsis: true,
|
|
19818
20715
|
width: 150
|
|
19819
20716
|
}, {
|
|
19820
|
-
dataIndex: '
|
|
19821
|
-
title: "\u5E73\u53F0\u89C4\
|
|
19822
|
-
|
|
20717
|
+
dataIndex: 'mallSkuId',
|
|
20718
|
+
title: "\u5E73\u53F0\u89C4\u683CID",
|
|
20719
|
+
align: 'center',
|
|
20720
|
+
ellipsis: true,
|
|
20721
|
+
width: 150
|
|
19823
20722
|
}, {
|
|
19824
|
-
dataIndex: '
|
|
19825
|
-
title: "\
|
|
20723
|
+
dataIndex: 'sellCount',
|
|
20724
|
+
title: "\u6570\u91CF",
|
|
19826
20725
|
width: 100,
|
|
19827
20726
|
validator: function validator(_rule, value) {
|
|
19828
|
-
var
|
|
19829
|
-
if (((value === null || value === void 0 ? void 0 : value.
|
|
19830
|
-
var
|
|
19831
|
-
var res = typeof
|
|
20727
|
+
var productName = '';
|
|
20728
|
+
if (((value === null || value === void 0 ? void 0 : value.jyReissueGoods) || []).some(function (goods) {
|
|
20729
|
+
var qty = toNum$3(goods === null || goods === void 0 ? void 0 : goods.sellCount);
|
|
20730
|
+
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
19832
20731
|
if (res) {
|
|
19833
|
-
|
|
20732
|
+
productName = (goods === null || goods === void 0 ? void 0 : goods.productName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.productName, "]") : '';
|
|
19834
20733
|
}
|
|
19835
20734
|
return res;
|
|
19836
20735
|
})) {
|
|
19837
|
-
return Promise.reject("".concat(
|
|
20736
|
+
return Promise.reject("".concat(productName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
19838
20737
|
}
|
|
19839
20738
|
},
|
|
19840
20739
|
render: function render(val, record, index) {
|
|
@@ -19846,64 +20745,86 @@ var getColumns$6 = function getColumns(_ref) {
|
|
|
19846
20745
|
min: 1,
|
|
19847
20746
|
precision: 0,
|
|
19848
20747
|
onChange: function onChange(num) {
|
|
19849
|
-
|
|
20748
|
+
updateDataHandle({
|
|
20749
|
+
sellCount: num,
|
|
20750
|
+
sellTotal: num && isNumberOrNumberString$1(record.sellPrice) ? num * record.sellPrice : null
|
|
20751
|
+
}, index);
|
|
19850
20752
|
}
|
|
19851
20753
|
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
19852
20754
|
}
|
|
19853
20755
|
}, {
|
|
19854
|
-
dataIndex: '
|
|
19855
|
-
title: "\
|
|
19856
|
-
width:
|
|
20756
|
+
dataIndex: 'sellPrice',
|
|
20757
|
+
title: "\u5355\u4EF7",
|
|
20758
|
+
width: 150,
|
|
19857
20759
|
render: function render(val, record, index) {
|
|
19858
20760
|
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
19859
20761
|
style: {
|
|
19860
|
-
width:
|
|
20762
|
+
width: 130
|
|
19861
20763
|
},
|
|
19862
20764
|
value: val,
|
|
19863
|
-
min:
|
|
19864
|
-
precision:
|
|
20765
|
+
min: 0,
|
|
20766
|
+
precision: 2,
|
|
19865
20767
|
onChange: function onChange(num) {
|
|
19866
|
-
|
|
20768
|
+
updateDataHandle({
|
|
20769
|
+
sellPrice: num,
|
|
20770
|
+
sellTotal: num && isNumberOrNumberString$1(record.sellCount) ? num * record.sellCount : null
|
|
20771
|
+
}, index);
|
|
19867
20772
|
}
|
|
19868
20773
|
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
19869
20774
|
}
|
|
19870
20775
|
}, {
|
|
19871
|
-
dataIndex: '
|
|
19872
|
-
title: "\u5546\u54C1\
|
|
19873
|
-
width: 150
|
|
19874
|
-
render: function render(val) {
|
|
19875
|
-
return val || val === 0 ? Number(val).toFixed(2) : '';
|
|
19876
|
-
}
|
|
20776
|
+
dataIndex: 'mallSellingPrice',
|
|
20777
|
+
title: "\u5E73\u53F0\u5546\u54C1\u4EF7\u683C",
|
|
20778
|
+
width: 150
|
|
19877
20779
|
}, {
|
|
19878
|
-
dataIndex: '
|
|
19879
|
-
title: "\
|
|
20780
|
+
dataIndex: 'sellTotal',
|
|
20781
|
+
title: "\u91D1\u989D",
|
|
20782
|
+
width: 150
|
|
20783
|
+
}, {
|
|
20784
|
+
dataIndex: 'bfit',
|
|
20785
|
+
title: "\u662F\u5426\u7EC4\u5408\u88C5",
|
|
19880
20786
|
width: 150,
|
|
19881
20787
|
render: function render(val, record, index) {
|
|
19882
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.
|
|
19883
|
-
style: {
|
|
19884
|
-
width: 130
|
|
19885
|
-
},
|
|
20788
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
19886
20789
|
value: val,
|
|
19887
|
-
|
|
19888
|
-
|
|
19889
|
-
|
|
19890
|
-
|
|
19891
|
-
|
|
19892
|
-
|
|
20790
|
+
onChange: function onChange(value) {
|
|
20791
|
+
updateHandle(value, index, 'bfit');
|
|
20792
|
+
},
|
|
20793
|
+
options: [{
|
|
20794
|
+
label: '是',
|
|
20795
|
+
value: 'True'
|
|
20796
|
+
}, {
|
|
20797
|
+
label: '否',
|
|
20798
|
+
value: 'False'
|
|
20799
|
+
}]
|
|
20800
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val === 'True' ? '是' : '否');
|
|
19893
20801
|
}
|
|
19894
20802
|
}, {
|
|
19895
|
-
dataIndex: '
|
|
19896
|
-
title: "\u5546\u54C1\
|
|
20803
|
+
dataIndex: 'combinationName',
|
|
20804
|
+
title: "\u7EC4\u5408\u5546\u54C1\u540D\u79F0",
|
|
19897
20805
|
width: 150
|
|
19898
20806
|
}, {
|
|
19899
|
-
dataIndex: '
|
|
19900
|
-
title: "\u5546\u54C1\
|
|
19901
|
-
width:
|
|
19902
|
-
|
|
19903
|
-
|
|
19904
|
-
|
|
19905
|
-
|
|
19906
|
-
|
|
20807
|
+
dataIndex: 'combinationCode',
|
|
20808
|
+
title: "\u7EC4\u5408\u5546\u54C1\u7F16\u7801",
|
|
20809
|
+
width: 150
|
|
20810
|
+
}, {
|
|
20811
|
+
dataIndex: 'gift',
|
|
20812
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
20813
|
+
width: 150,
|
|
20814
|
+
render: function render(val, record, index) {
|
|
20815
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
20816
|
+
value: val,
|
|
20817
|
+
onChange: function onChange(value) {
|
|
20818
|
+
updateHandle(value, index, 'gift');
|
|
20819
|
+
},
|
|
20820
|
+
options: [{
|
|
20821
|
+
label: '是',
|
|
20822
|
+
value: '1'
|
|
20823
|
+
}, {
|
|
20824
|
+
label: '否',
|
|
20825
|
+
value: '0'
|
|
20826
|
+
}]
|
|
20827
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val === '1' ? '是' : '否');
|
|
19907
20828
|
}
|
|
19908
20829
|
}].map(function (item) {
|
|
19909
20830
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
@@ -19914,7 +20835,7 @@ var getColumns$6 = function getColumns(_ref) {
|
|
|
19914
20835
|
};
|
|
19915
20836
|
};
|
|
19916
20837
|
|
|
19917
|
-
var getColumns$
|
|
20838
|
+
var getColumns$8 = function getColumns(_ref) {
|
|
19918
20839
|
var _ref$text = _ref.text,
|
|
19919
20840
|
disabled = _ref.disabled,
|
|
19920
20841
|
updateHandle = _ref.updateHandle,
|
|
@@ -19956,7 +20877,7 @@ var getColumns$7 = function getColumns(_ref) {
|
|
|
19956
20877
|
};
|
|
19957
20878
|
};
|
|
19958
20879
|
|
|
19959
|
-
var getColumns$
|
|
20880
|
+
var getColumns$9 = function getColumns(_ref) {
|
|
19960
20881
|
var _ref$text = _ref.text,
|
|
19961
20882
|
text = _ref$text === void 0 ? '' : _ref$text,
|
|
19962
20883
|
disabled = _ref.disabled,
|
|
@@ -20069,7 +20990,7 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
20069
20990
|
disabled = _ref.disabled,
|
|
20070
20991
|
updateHandle = _ref.updateHandle,
|
|
20071
20992
|
updateDataHandle = _ref.updateDataHandle;
|
|
20072
|
-
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
20993
|
+
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
20073
20994
|
text: text,
|
|
20074
20995
|
disabled: disabled,
|
|
20075
20996
|
updateHandle: updateHandle
|
|
@@ -20099,11 +21020,16 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
20099
21020
|
disabled: disabled,
|
|
20100
21021
|
updateHandle: updateHandle
|
|
20101
21022
|
})), getColumns$7({
|
|
21023
|
+
text: text,
|
|
21024
|
+
disabled: disabled,
|
|
21025
|
+
updateHandle: updateHandle,
|
|
21026
|
+
updateDataHandle: updateDataHandle
|
|
21027
|
+
})), getColumns$8({
|
|
20102
21028
|
text: text,
|
|
20103
21029
|
disabled: disabled,
|
|
20104
21030
|
updateHandle: updateHandle
|
|
20105
21031
|
})), {}, {
|
|
20106
|
-
default: getColumns$
|
|
21032
|
+
default: getColumns$9({
|
|
20107
21033
|
text: text,
|
|
20108
21034
|
disabled: disabled,
|
|
20109
21035
|
updateHandle: updateHandle
|
|
@@ -20247,6 +21173,9 @@ var isErpType = {
|
|
|
20247
21173
|
},
|
|
20248
21174
|
isKm: function isKm(type) {
|
|
20249
21175
|
return ['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type);
|
|
21176
|
+
},
|
|
21177
|
+
isJy: function isJy(type) {
|
|
21178
|
+
return ['JY_GOODS', 'JY_REISSUE_GOODS'].includes(type);
|
|
20250
21179
|
}
|
|
20251
21180
|
};
|
|
20252
21181
|
var processGoods$1 = function processGoods(_ref) {
|
|
@@ -20292,6 +21221,13 @@ var processGoods$1 = function processGoods(_ref) {
|
|
|
20292
21221
|
canUpdateNumber: canUpdateNumber,
|
|
20293
21222
|
source: source
|
|
20294
21223
|
});
|
|
21224
|
+
} else if (isErpType.isJy(type)) {
|
|
21225
|
+
newList = processJyGoods({
|
|
21226
|
+
list: list,
|
|
21227
|
+
type: type,
|
|
21228
|
+
canUpdateNumber: canUpdateNumber,
|
|
21229
|
+
source: source
|
|
21230
|
+
});
|
|
20295
21231
|
} else {
|
|
20296
21232
|
newList = processDefaultGoods({
|
|
20297
21233
|
list: list,
|
|
@@ -20302,11 +21238,49 @@ var processGoods$1 = function processGoods(_ref) {
|
|
|
20302
21238
|
}
|
|
20303
21239
|
return newList;
|
|
20304
21240
|
};
|
|
20305
|
-
|
|
20306
|
-
var processWdtGoods$1 = function processWdtGoods(_ref2) {
|
|
21241
|
+
var processJyGoods = function processJyGoods(_ref2) {
|
|
20307
21242
|
var list = _ref2.list,
|
|
20308
|
-
type = _ref2.type,
|
|
20309
21243
|
canUpdateNumber = _ref2.canUpdateNumber;
|
|
21244
|
+
return list.map(function (item) {
|
|
21245
|
+
var goodName = item.goodName,
|
|
21246
|
+
goodNo = item.goodNo,
|
|
21247
|
+
goodId = item.goodId,
|
|
21248
|
+
specName = item.specName,
|
|
21249
|
+
specNo = item.specNo,
|
|
21250
|
+
specBarcode = item.specBarcode,
|
|
21251
|
+
retailPrice = item.retailPrice,
|
|
21252
|
+
isGift = item.isGift,
|
|
21253
|
+
skuType = item.skuType;
|
|
21254
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
21255
|
+
goodsName: goodName,
|
|
21256
|
+
goodsCode: goodNo,
|
|
21257
|
+
goodsId: goodId,
|
|
21258
|
+
code: specBarcode,
|
|
21259
|
+
specCode: specNo,
|
|
21260
|
+
productName: goodName,
|
|
21261
|
+
productCode: goodNo,
|
|
21262
|
+
productId: goodId,
|
|
21263
|
+
skuName: specName,
|
|
21264
|
+
skuCode: specNo,
|
|
21265
|
+
combinationName: goodName,
|
|
21266
|
+
combinationCode: goodNo,
|
|
21267
|
+
gift: isGift ? '1' : '0',
|
|
21268
|
+
bfit: skuType === 'combine' ? 'True' : 'False',
|
|
21269
|
+
uuid: kmkfUtils.uuid(),
|
|
21270
|
+
canDelete: true,
|
|
21271
|
+
sellCount: 1,
|
|
21272
|
+
sellPrice: retailPrice,
|
|
21273
|
+
sellTotal: (retailPrice * 1).toFixed(2),
|
|
21274
|
+
canEdit: true,
|
|
21275
|
+
canUpdateNumber: canUpdateNumber
|
|
21276
|
+
});
|
|
21277
|
+
});
|
|
21278
|
+
};
|
|
21279
|
+
// 处理不同类型的商品数据
|
|
21280
|
+
var processWdtGoods$1 = function processWdtGoods(_ref3) {
|
|
21281
|
+
var list = _ref3.list,
|
|
21282
|
+
type = _ref3.type,
|
|
21283
|
+
canUpdateNumber = _ref3.canUpdateNumber;
|
|
20310
21284
|
return list.map(function (item) {
|
|
20311
21285
|
var processedItem = _objectSpread2(_objectSpread2({}, item), {}, {
|
|
20312
21286
|
uuid: kmkfUtils.uuid(),
|
|
@@ -20324,9 +21298,9 @@ var processWdtGoods$1 = function processWdtGoods(_ref2) {
|
|
|
20324
21298
|
return processedItem;
|
|
20325
21299
|
});
|
|
20326
21300
|
};
|
|
20327
|
-
var processBsE3Goods$1 = function processBsE3Goods(
|
|
20328
|
-
var list =
|
|
20329
|
-
canUpdateNumber =
|
|
21301
|
+
var processBsE3Goods$1 = function processBsE3Goods(_ref4) {
|
|
21302
|
+
var list = _ref4.list,
|
|
21303
|
+
canUpdateNumber = _ref4.canUpdateNumber;
|
|
20330
21304
|
return list.map(function (item) {
|
|
20331
21305
|
var specNo = item.specNo,
|
|
20332
21306
|
specId = item.specId,
|
|
@@ -20361,9 +21335,9 @@ var processBsE3Goods$1 = function processBsE3Goods(_ref3) {
|
|
|
20361
21335
|
});
|
|
20362
21336
|
});
|
|
20363
21337
|
};
|
|
20364
|
-
var processGyGoods$1 = function processGyGoods(
|
|
20365
|
-
var list =
|
|
20366
|
-
source =
|
|
21338
|
+
var processGyGoods$1 = function processGyGoods(_ref5) {
|
|
21339
|
+
var list = _ref5.list,
|
|
21340
|
+
source = _ref5.source;
|
|
20367
21341
|
var isFormWorkOrder = source === 'workOrder';
|
|
20368
21342
|
return list.map(function (item) {
|
|
20369
21343
|
var goodName = item.goodName,
|
|
@@ -20390,8 +21364,8 @@ var processGyGoods$1 = function processGyGoods(_ref4) {
|
|
|
20390
21364
|
});
|
|
20391
21365
|
});
|
|
20392
21366
|
};
|
|
20393
|
-
var processJstGoods$1 = function processJstGoods(
|
|
20394
|
-
var list =
|
|
21367
|
+
var processJstGoods$1 = function processJstGoods(_ref6) {
|
|
21368
|
+
var list = _ref6.list;
|
|
20395
21369
|
return list.map(function (item) {
|
|
20396
21370
|
return {
|
|
20397
21371
|
name: item.goodName,
|
|
@@ -20409,9 +21383,9 @@ var processJstGoods$1 = function processJstGoods(_ref5) {
|
|
|
20409
21383
|
};
|
|
20410
21384
|
});
|
|
20411
21385
|
};
|
|
20412
|
-
var processKmGoods$1 = function processKmGoods(
|
|
20413
|
-
var list =
|
|
20414
|
-
type =
|
|
21386
|
+
var processKmGoods$1 = function processKmGoods(_ref7) {
|
|
21387
|
+
var list = _ref7.list,
|
|
21388
|
+
type = _ref7.type;
|
|
20415
21389
|
var initParamsMap = {
|
|
20416
21390
|
KM_GOODS: {
|
|
20417
21391
|
num: 1
|
|
@@ -20441,9 +21415,9 @@ var processKmGoods$1 = function processKmGoods(_ref6) {
|
|
|
20441
21415
|
}, initParamsMap[type] || {});
|
|
20442
21416
|
});
|
|
20443
21417
|
};
|
|
20444
|
-
var processDefaultGoods = function processDefaultGoods(
|
|
20445
|
-
var list =
|
|
20446
|
-
canUpdateNumber =
|
|
21418
|
+
var processDefaultGoods = function processDefaultGoods(_ref8) {
|
|
21419
|
+
var list = _ref8.list,
|
|
21420
|
+
canUpdateNumber = _ref8.canUpdateNumber;
|
|
20447
21421
|
return list.map(function (item) {
|
|
20448
21422
|
var goodsId = item.goodsId,
|
|
20449
21423
|
name = item.name,
|
|
@@ -20486,6 +21460,8 @@ var GoodsModalMap = {
|
|
|
20486
21460
|
JST_EXCHANGE_GOODS: JstGoodsModal,
|
|
20487
21461
|
KM_GOODS: KmGoodsModal,
|
|
20488
21462
|
KM_REISSUE_GOODS: KmGoodsModal,
|
|
21463
|
+
JY_GOODS: JyGoodsModal$1,
|
|
21464
|
+
JY_REISSUE_GOODS: JyGoodsModal$1,
|
|
20489
21465
|
OTHER_GOODS: GoodsModal$2
|
|
20490
21466
|
};
|
|
20491
21467
|
var systemOrderNoMap = {
|
|
@@ -20494,7 +21470,9 @@ var systemOrderNoMap = {
|
|
|
20494
21470
|
WDT_GOODS: 'tradeNo',
|
|
20495
21471
|
BS_E3_GOODS: 'orderSn',
|
|
20496
21472
|
JST_GOODS: 'oId',
|
|
20497
|
-
WLN_GOODS: 'tradeNo'
|
|
21473
|
+
WLN_GOODS: 'tradeNo',
|
|
21474
|
+
JY_GOODS: 'tradeNo',
|
|
21475
|
+
JY_REISSUE_GOODS: 'tradeNo'
|
|
20498
21476
|
};
|
|
20499
21477
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
20500
21478
|
var columns = _ref.columns,
|
|
@@ -20552,6 +21530,12 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
20552
21530
|
return item === null || item === void 0 ? void 0 : item[uniqueKey];
|
|
20553
21531
|
}));
|
|
20554
21532
|
var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
|
|
21533
|
+
console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
21534
|
+
console.log('filterDataSource', filterDataSource === null || filterDataSource === void 0 ? void 0 : filterDataSource.map(function (item) {
|
|
21535
|
+
return item === null || item === void 0 ? void 0 : item[uniqueKey];
|
|
21536
|
+
}));
|
|
21537
|
+
console.log('selectedRowKeys', selectedRowKeys);
|
|
21538
|
+
console.log('currentTradeOriginGoods', currentTradeOriginGoods);
|
|
20555
21539
|
onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
|
|
20556
21540
|
};
|
|
20557
21541
|
var rowSelection = {
|
|
@@ -20626,6 +21610,9 @@ var getButtonText = function getButtonText() {
|
|
|
20626
21610
|
if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
|
|
20627
21611
|
return '选择聚水潭ERP商品';
|
|
20628
21612
|
}
|
|
21613
|
+
if (['JY_GOODS', 'JY_REISSUE_GOODS'].includes(type)) {
|
|
21614
|
+
return '选择巨益ERP商品';
|
|
21615
|
+
}
|
|
20629
21616
|
return '选择商品';
|
|
20630
21617
|
};
|
|
20631
21618
|
var GoodItem$1 = function GoodItem(props) {
|
|
@@ -20672,13 +21659,15 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
20672
21659
|
tradeGoods = props.tradeGoods,
|
|
20673
21660
|
form = props.form,
|
|
20674
21661
|
systemOrders = props.systemOrders,
|
|
20675
|
-
selectedSystemOrders = props.selectedSystemOrders
|
|
21662
|
+
selectedSystemOrders = props.selectedSystemOrders,
|
|
21663
|
+
_props$templateDetail = props.templateDetail,
|
|
21664
|
+
templateDetail = _props$templateDetail === void 0 ? {} : _props$templateDetail;
|
|
20676
21665
|
var uniqueKey = (tradeGoods === null || tradeGoods === void 0 ? void 0 : tradeGoods.uniqueKey) || 'uuid';
|
|
20677
21666
|
// 监听聚水潭退货商品
|
|
20678
21667
|
var jstReturnGoods = antd.Form === null || antd.Form === void 0 ? void 0 : antd.Form.useWatch('3979edfd6d', form);
|
|
20679
21668
|
var isShowSelectTradeGoods = type !== 'JST_EXCHANGE_GOODS' || (jstReturnGoods === null || jstReturnGoods === void 0 ? void 0 : jstReturnGoods.jstSystemOrderNo);
|
|
20680
21669
|
// 判断是否为商品信息组件
|
|
20681
|
-
var isGoods = type && ['WDT_GOODS', 'BS_E3_GOODS', 'GY_GOODS', 'JST_GOODS', 'WLN_GOODS', 'KM_GOODS'].includes(type) || false;
|
|
21670
|
+
var isGoods = type && ['WDT_GOODS', 'BS_E3_GOODS', 'GY_GOODS', 'JST_GOODS', 'WLN_GOODS', 'KM_GOODS', 'JY_GOODS', 'JY_REISSUE_GOODS'].includes(type) || false;
|
|
20682
21671
|
var refModal = React.useRef();
|
|
20683
21672
|
console.debug('表格数据', value);
|
|
20684
21673
|
var handleDelete = function handleDelete(record, index) {
|
|
@@ -20765,6 +21754,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
20765
21754
|
case 'GY_RETURN_GOODS':
|
|
20766
21755
|
case 'KM_GOODS':
|
|
20767
21756
|
case 'KM_REISSUE_GOODS':
|
|
21757
|
+
case 'JY_GOODS':
|
|
21758
|
+
case 'JY_REISSUE_GOODS':
|
|
20768
21759
|
case 'SKX_GOODS':
|
|
20769
21760
|
case 'SKX_RETURN_GOODS':
|
|
20770
21761
|
{
|
|
@@ -20994,7 +21985,9 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
20994
21985
|
maxLength: maxLength,
|
|
20995
21986
|
companyKey: companyKey,
|
|
20996
21987
|
goodsSource: goodsSource,
|
|
20997
|
-
useGoodsSourceFormat: useGoodsSourceFormat
|
|
21988
|
+
useGoodsSourceFormat: useGoodsSourceFormat,
|
|
21989
|
+
form: form,
|
|
21990
|
+
templateDetail: templateDetail
|
|
20998
21991
|
}));
|
|
20999
21992
|
};
|
|
21000
21993
|
|
|
@@ -21862,7 +22855,7 @@ var bsUtils = {
|
|
|
21862
22855
|
};
|
|
21863
22856
|
|
|
21864
22857
|
var singletonMap$6 = new Map();
|
|
21865
|
-
var
|
|
22858
|
+
var getJyOrderListSingleton = function getJyOrderListSingleton(orderNo) {
|
|
21866
22859
|
if (!singletonMap$6.has(orderNo)) {
|
|
21867
22860
|
var p = new Promise(function (resolve, reject) {
|
|
21868
22861
|
var doReject = function doReject(err) {
|
|
@@ -21870,6 +22863,50 @@ var getOrderListSingleton$2 = function getOrderListSingleton(orderNo) {
|
|
|
21870
22863
|
singletonMap$6.delete(orderNo);
|
|
21871
22864
|
reject(err);
|
|
21872
22865
|
};
|
|
22866
|
+
extendRequest('/qy/gdfw/order/jyOrderDetail', {
|
|
22867
|
+
method: 'post',
|
|
22868
|
+
data: {
|
|
22869
|
+
billNo: orderNo
|
|
22870
|
+
}
|
|
22871
|
+
}).then(function (res) {
|
|
22872
|
+
if (res === null || res === void 0 ? void 0 : res.success) {
|
|
22873
|
+
var _res$data, _res$data$tradeOrderD;
|
|
22874
|
+
if (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : (_res$data$tradeOrderD = _res$data.tradeOrderDetails) === null || _res$data$tradeOrderD === void 0 ? void 0 : _res$data$tradeOrderD.length) {
|
|
22875
|
+
var _filterJyOrders, _res$data2;
|
|
22876
|
+
res.data.trades = (_filterJyOrders = kmkfUtils.filterJyOrders(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.tradeOrderDetails, orderNo)) === null || _filterJyOrders === void 0 ? void 0 : _filterJyOrders.map(function (item) {
|
|
22877
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
22878
|
+
tradeType: kmkfUtils.JY_ORDER_TYPE_MAP[item.tradeType],
|
|
22879
|
+
tradeStatus: kmkfUtils.JY_ORDER_STATUS_MAP[item.tradeStatus]
|
|
22880
|
+
});
|
|
22881
|
+
});
|
|
22882
|
+
}
|
|
22883
|
+
resolve(res.data);
|
|
22884
|
+
// 延迟10秒清除,保证订单的时效性
|
|
22885
|
+
setTimeout(function () {
|
|
22886
|
+
singletonMap$6.delete(orderNo);
|
|
22887
|
+
}, 1000 * 10);
|
|
22888
|
+
} else {
|
|
22889
|
+
doReject(res);
|
|
22890
|
+
}
|
|
22891
|
+
}).catch(doReject);
|
|
22892
|
+
});
|
|
22893
|
+
singletonMap$6.set(orderNo, p);
|
|
22894
|
+
}
|
|
22895
|
+
return singletonMap$6.get(orderNo);
|
|
22896
|
+
};
|
|
22897
|
+
var jyUtils = {
|
|
22898
|
+
getJyOrderListSingleton: getJyOrderListSingleton
|
|
22899
|
+
};
|
|
22900
|
+
|
|
22901
|
+
var singletonMap$7 = new Map();
|
|
22902
|
+
var getOrderListSingleton$2 = function getOrderListSingleton(orderNo) {
|
|
22903
|
+
if (!singletonMap$7.has(orderNo)) {
|
|
22904
|
+
var p = new Promise(function (resolve, reject) {
|
|
22905
|
+
var doReject = function doReject(err) {
|
|
22906
|
+
// 清空掉错误的请求记录
|
|
22907
|
+
singletonMap$7.delete(orderNo);
|
|
22908
|
+
reject(err);
|
|
22909
|
+
};
|
|
21873
22910
|
extendRequest('/qy/gdfw/order/kmErpOrderDetail', {
|
|
21874
22911
|
method: 'post',
|
|
21875
22912
|
data: {
|
|
@@ -21893,22 +22930,23 @@ var getOrderListSingleton$2 = function getOrderListSingleton(orderNo) {
|
|
|
21893
22930
|
}
|
|
21894
22931
|
// 延迟10秒清除,保证订单的时效性
|
|
21895
22932
|
setTimeout(function () {
|
|
21896
|
-
singletonMap$
|
|
22933
|
+
singletonMap$7.delete(orderNo);
|
|
21897
22934
|
}, 1000 * 10);
|
|
21898
22935
|
} else {
|
|
21899
22936
|
doReject(data);
|
|
21900
22937
|
}
|
|
21901
22938
|
}).catch(doReject);
|
|
21902
22939
|
});
|
|
21903
|
-
singletonMap$
|
|
22940
|
+
singletonMap$7.set(orderNo, p);
|
|
21904
22941
|
}
|
|
21905
|
-
return singletonMap$
|
|
22942
|
+
return singletonMap$7.get(orderNo);
|
|
21906
22943
|
};
|
|
21907
22944
|
var kmUtils = {
|
|
21908
22945
|
getOrderListSingleton: getOrderListSingleton$2
|
|
21909
22946
|
};
|
|
21910
22947
|
|
|
21911
|
-
var _excluded$k = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode", "cancel"]
|
|
22948
|
+
var _excluded$k = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode", "cancel"],
|
|
22949
|
+
_excluded2 = ["shopCode"];
|
|
21912
22950
|
var columnsMap = {
|
|
21913
22951
|
BS_SYSTEM_ORDER: kmkfUtils.BS_SYSTEM_ORDER_CONFIG.columns,
|
|
21914
22952
|
KM_SYSTEM_ORDER: kmkfUtils.KM_SYSTEM_ORDER_CONFIG.columns,
|
|
@@ -21916,7 +22954,8 @@ var columnsMap = {
|
|
|
21916
22954
|
WDT_SYSTEM_ORDER: kmkfUtils.WDT_SYSTEM_ORDER_CONFIG.columns,
|
|
21917
22955
|
BS_E3_SYSTEM_ORDER: kmkfUtils.BS_E3_SYSTEM_ORDER_CONFIG.columns,
|
|
21918
22956
|
GY_SYSTEM_ORDER: kmkfUtils.GY_SYSTEM_ORDER_CONFIG.columns,
|
|
21919
|
-
JST_SYSTEM_ORDER: kmkfUtils.JST_SYSTEM_ORDER_CONFIG.columns
|
|
22957
|
+
JST_SYSTEM_ORDER: kmkfUtils.JST_SYSTEM_ORDER_CONFIG.columns,
|
|
22958
|
+
JY_SYSTEM_ORDER: kmkfUtils.JY_SYSTEM_ORDER_CONFIG.columns
|
|
21920
22959
|
};
|
|
21921
22960
|
var rowKeyMap = {
|
|
21922
22961
|
BS_SYSTEM_ORDER: 'billNo',
|
|
@@ -21925,7 +22964,8 @@ var rowKeyMap = {
|
|
|
21925
22964
|
WDT_SYSTEM_ORDER: 'billNo',
|
|
21926
22965
|
BS_E3_SYSTEM_ORDER: 'orderSn',
|
|
21927
22966
|
GY_SYSTEM_ORDER: 'billNo',
|
|
21928
|
-
JST_SYSTEM_ORDER: 'oId'
|
|
22967
|
+
JST_SYSTEM_ORDER: 'oId',
|
|
22968
|
+
JY_SYSTEM_ORDER: 'tradeNo'
|
|
21929
22969
|
};
|
|
21930
22970
|
var index$2 = (function (props) {
|
|
21931
22971
|
var value = props.value,
|
|
@@ -21953,6 +22993,8 @@ var index$2 = (function (props) {
|
|
|
21953
22993
|
getGyOrderList(value.orderNo);
|
|
21954
22994
|
} else if (type === 'JST_SYSTEM_ORDER') {
|
|
21955
22995
|
getJstOrderList(value.orderNo);
|
|
22996
|
+
} else if (type === 'JY_SYSTEM_ORDER') {
|
|
22997
|
+
getJyOrderList(value.orderNo);
|
|
21956
22998
|
}
|
|
21957
22999
|
}
|
|
21958
23000
|
}, [value, type]);
|
|
@@ -22188,6 +23230,37 @@ var index$2 = (function (props) {
|
|
|
22188
23230
|
return _ref9.apply(this, arguments);
|
|
22189
23231
|
};
|
|
22190
23232
|
}();
|
|
23233
|
+
var getJyOrderList = /*#__PURE__*/function () {
|
|
23234
|
+
var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(orderNo) {
|
|
23235
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
23236
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
23237
|
+
case 0:
|
|
23238
|
+
jyUtils.getJyOrderListSingleton(orderNo).then(function (data) {
|
|
23239
|
+
var trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
|
|
23240
|
+
return kmkfUtils.getIsPlatformCodesIncludeOrderNos(item.platformCode, orderNo);
|
|
23241
|
+
});
|
|
23242
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, {
|
|
23243
|
+
orders: trades,
|
|
23244
|
+
showOrderInfo: trades.map(function (_ref12) {
|
|
23245
|
+
var shopCode = _ref12.shopCode,
|
|
23246
|
+
rest = _objectWithoutProperties(_ref12, _excluded2);
|
|
23247
|
+
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
23248
|
+
shopCode: shopCode
|
|
23249
|
+
});
|
|
23250
|
+
})
|
|
23251
|
+
}));
|
|
23252
|
+
});
|
|
23253
|
+
onceRef.current = false;
|
|
23254
|
+
case 2:
|
|
23255
|
+
case "end":
|
|
23256
|
+
return _context8.stop();
|
|
23257
|
+
}
|
|
23258
|
+
}, _callee8);
|
|
23259
|
+
}));
|
|
23260
|
+
return function getJyOrderList(_x8) {
|
|
23261
|
+
return _ref11.apply(this, arguments);
|
|
23262
|
+
};
|
|
23263
|
+
}();
|
|
22191
23264
|
var rowSelection = {
|
|
22192
23265
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
|
|
22193
23266
|
fixed: true,
|
|
@@ -22229,7 +23302,8 @@ var index$2 = (function (props) {
|
|
|
22229
23302
|
size: "small",
|
|
22230
23303
|
pagination: false,
|
|
22231
23304
|
scroll: {
|
|
22232
|
-
x: 'max-content'
|
|
23305
|
+
x: 'max-content',
|
|
23306
|
+
y: 500
|
|
22233
23307
|
},
|
|
22234
23308
|
locale: {
|
|
22235
23309
|
emptyText: '暂无数据'
|
|
@@ -22611,16 +23685,16 @@ var orderSubFormConstants = {
|
|
|
22611
23685
|
};
|
|
22612
23686
|
|
|
22613
23687
|
var getSelectWidgetMap$1 = orderSubFormConstants.getSelectWidgetMap;
|
|
22614
|
-
var singletonMap$
|
|
23688
|
+
var singletonMap$8 = new Map();
|
|
22615
23689
|
var getOrderListSingleton$3 = function getOrderListSingleton(parmas) {
|
|
22616
23690
|
var orderNo = parmas.orderNo,
|
|
22617
23691
|
shopId = parmas.shopId;
|
|
22618
23692
|
var key = "".concat(orderNo, "-").concat(shopId);
|
|
22619
|
-
if (!singletonMap$
|
|
23693
|
+
if (!singletonMap$8.has(key)) {
|
|
22620
23694
|
var p = new Promise(function (resolve, reject) {
|
|
22621
23695
|
var doReject = function doReject(err) {
|
|
22622
23696
|
// 清空掉错误的请求记录
|
|
22623
|
-
singletonMap$
|
|
23697
|
+
singletonMap$8.delete(key);
|
|
22624
23698
|
reject(err);
|
|
22625
23699
|
};
|
|
22626
23700
|
extendRequest('/qy/gdfw/order/subOrderItemsDetail', {
|
|
@@ -22636,16 +23710,16 @@ var getOrderListSingleton$3 = function getOrderListSingleton(parmas) {
|
|
|
22636
23710
|
}
|
|
22637
23711
|
// 延迟10秒清除,保证订单的时效性
|
|
22638
23712
|
setTimeout(function () {
|
|
22639
|
-
singletonMap$
|
|
23713
|
+
singletonMap$8.delete(key);
|
|
22640
23714
|
}, 1000 * 10);
|
|
22641
23715
|
} else {
|
|
22642
23716
|
doReject(data);
|
|
22643
23717
|
}
|
|
22644
23718
|
}).catch(doReject);
|
|
22645
23719
|
});
|
|
22646
|
-
singletonMap$
|
|
23720
|
+
singletonMap$8.set(key, p);
|
|
22647
23721
|
}
|
|
22648
|
-
return singletonMap$
|
|
23722
|
+
return singletonMap$8.get(key);
|
|
22649
23723
|
};
|
|
22650
23724
|
var renderEditItem = function renderEditItem(_ref) {
|
|
22651
23725
|
var item = _ref.item,
|
|
@@ -23075,6 +24149,9 @@ var isErpType$1 = {
|
|
|
23075
24149
|
},
|
|
23076
24150
|
isWln: function isWln(type) {
|
|
23077
24151
|
return ['WLN_GOODS'].includes(type);
|
|
24152
|
+
},
|
|
24153
|
+
isJy: function isJy(type) {
|
|
24154
|
+
return ['JY_GOODS'].includes(type);
|
|
23078
24155
|
}
|
|
23079
24156
|
};
|
|
23080
24157
|
var processAllOrders = function processAllOrders(_ref) {
|
|
@@ -23102,6 +24179,11 @@ var processAllOrders = function processAllOrders(_ref) {
|
|
|
23102
24179
|
newList = processWlnOrders({
|
|
23103
24180
|
data: data
|
|
23104
24181
|
});
|
|
24182
|
+
} else if (isErpType$1.isJy(type)) {
|
|
24183
|
+
newList = processJyOrders({
|
|
24184
|
+
data: data,
|
|
24185
|
+
orderNo: orderNo
|
|
24186
|
+
});
|
|
23105
24187
|
} else {
|
|
23106
24188
|
newList = processDefaultOrders({
|
|
23107
24189
|
data: data
|
|
@@ -23133,12 +24215,20 @@ var processGyOrders = function processGyOrders(_ref4) {
|
|
|
23133
24215
|
});
|
|
23134
24216
|
return trades;
|
|
23135
24217
|
};
|
|
23136
|
-
var
|
|
23137
|
-
var data = _ref5.data
|
|
23138
|
-
|
|
24218
|
+
var processJyOrders = function processJyOrders(_ref5) {
|
|
24219
|
+
var data = _ref5.data,
|
|
24220
|
+
orderNo = _ref5.orderNo;
|
|
24221
|
+
var trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
|
|
24222
|
+
return kmkfUtils.getIsPlatformCodesIncludeOrderNos(item.platformCode, orderNo);
|
|
24223
|
+
});
|
|
24224
|
+
return trades;
|
|
23139
24225
|
};
|
|
23140
|
-
var
|
|
24226
|
+
var processWlnOrders = function processWlnOrders(_ref6) {
|
|
23141
24227
|
var data = _ref6.data;
|
|
24228
|
+
return (data === null || data === void 0 ? void 0 : data.orders) || [];
|
|
24229
|
+
};
|
|
24230
|
+
var processDefaultOrders = function processDefaultOrders(_ref7) {
|
|
24231
|
+
var data = _ref7.data;
|
|
23142
24232
|
return data || [];
|
|
23143
24233
|
};
|
|
23144
24234
|
|
|
@@ -23332,6 +24422,32 @@ var componentMap$2 = {
|
|
|
23332
24422
|
exchangeDeleteGood: 'kmExchangeDeleteGood'
|
|
23333
24423
|
},
|
|
23334
24424
|
getOrderList: kmUtils.getOrderListSingleton
|
|
24425
|
+
},
|
|
24426
|
+
JY_GOODS: {
|
|
24427
|
+
type: 'jy',
|
|
24428
|
+
key: 'jyGoods',
|
|
24429
|
+
name: '巨益',
|
|
24430
|
+
orderNo: 'tid',
|
|
24431
|
+
goodDetailOrderNo: 'originalDealCode',
|
|
24432
|
+
eventNameMap: {
|
|
24433
|
+
// pubsub 事件
|
|
24434
|
+
type: 'jyType',
|
|
24435
|
+
updateGoodsHandle: kmkfUtils.updateJyGoodsHandle,
|
|
24436
|
+
selectListReturn: 'jySelectListReturn',
|
|
24437
|
+
selectList: 'jySelectList',
|
|
24438
|
+
reissueSelectList: 'jyReissueSelectList',
|
|
24439
|
+
reissueSelectListReturn: 'jyReissueSelectListReturn',
|
|
24440
|
+
reissueDeleteGood: 'jyReissueDeleteGood',
|
|
24441
|
+
changeShopCode: 'jyChangeShopCode',
|
|
24442
|
+
reissueType: 'jyReissueType',
|
|
24443
|
+
returnType: 'jyReturnType',
|
|
24444
|
+
returnSelectListReturn: 'jyReturnSelectListReturn',
|
|
24445
|
+
returnSelectList: 'jyReturnSelectList',
|
|
24446
|
+
deleteGood: 'jyDeleteGood',
|
|
24447
|
+
returnDeleteGood: 'jyReturnDeleteGood',
|
|
24448
|
+
exchangeDeleteGood: 'jyExchangeDeleteGood'
|
|
24449
|
+
},
|
|
24450
|
+
getOrderList: jyUtils.getJyOrderListSingleton
|
|
23335
24451
|
}
|
|
23336
24452
|
};
|
|
23337
24453
|
var CommonGoods = function CommonGoods(props) {
|
|
@@ -24230,10 +25346,25 @@ var typeMap$2 = {
|
|
|
24230
25346
|
outerOiIdKey: '',
|
|
24231
25347
|
goodDetailsKey: 'subOrders',
|
|
24232
25348
|
uniqueKey: 'id'
|
|
25349
|
+
},
|
|
25350
|
+
JY_REISSUE_GOODS: {
|
|
25351
|
+
compType: '补发',
|
|
25352
|
+
key: 'jyReissueGoods',
|
|
25353
|
+
typeName: 'jyReissueType',
|
|
25354
|
+
systemOrder: 'jySystemOrder',
|
|
25355
|
+
systemOrderNo: 'jySystemOrderNo',
|
|
25356
|
+
getOrderList: jyUtils.getJyOrderListSingleton,
|
|
25357
|
+
updateGoodsHandle: kmkfUtils.updateJyGoodsHandle,
|
|
25358
|
+
alwaysShowChooseErpGoodsBtn: true,
|
|
25359
|
+
orderTypeKey: 'orderType',
|
|
25360
|
+
oIdKey: 'tradeNo',
|
|
25361
|
+
outerOiIdKey: '',
|
|
25362
|
+
goodDetailsKey: 'subOrderDetails',
|
|
25363
|
+
isShowSelectTradeGoods: true
|
|
24233
25364
|
}
|
|
24234
25365
|
};
|
|
24235
25366
|
var PublicReissue = function PublicReissue(props) {
|
|
24236
|
-
var _typeMap$
|
|
25367
|
+
var _typeMap$type34, _typeMap$type40, _typeMap$type41, _typeMap$type42, _typeMap$type43, _value$typeMap$type$s8, _typeMap$type44, _typeMap$type45, _typeMap$type46, _typeMap$type47, _typeMap$type48, _typeMap$type49, _typeMap$type50, _typeMap$type51, _typeMap$type52, _value$typeMap$type$s9, _typeMap$type53, _typeMap$type54, _typeMap$type55;
|
|
24237
25368
|
var value = props.value,
|
|
24238
25369
|
onChange = props.onChange,
|
|
24239
25370
|
_props$reasonList = props.reasonList,
|
|
@@ -24350,9 +25481,11 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
24350
25481
|
}))));
|
|
24351
25482
|
};
|
|
24352
25483
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
24353
|
-
var _typeMap$type18, _typeMap$type19,
|
|
25484
|
+
var _typeMap$type18, _typeMap$type19, _value$typeMap$type$s6, _typeMap$type20, _typeMap$type21, _typeMap$type22;
|
|
24354
25485
|
var mode = _ref4.mode,
|
|
24355
|
-
sysOrderNo = _ref4.sysOrderNo
|
|
25486
|
+
sysOrderNo = _ref4.sysOrderNo,
|
|
25487
|
+
_ref4$isAllOrders = _ref4.isAllOrders,
|
|
25488
|
+
isAllOrders = _ref4$isAllOrders === void 0 ? false : _ref4$isAllOrders;
|
|
24356
25489
|
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type18 = typeMap$2[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrder];
|
|
24357
25490
|
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type19 = typeMap$2[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.systemOrderNo];
|
|
24358
25491
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
@@ -24366,39 +25499,48 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
24366
25499
|
orderBackGoodsLevel: props.orderBackGoodsLevel,
|
|
24367
25500
|
canEdit: true
|
|
24368
25501
|
};
|
|
25502
|
+
} else if (['JY_REISSUE_GOODS', 'JY_RETURN_GOODS'].includes(type)) {
|
|
25503
|
+
orderRest = {
|
|
25504
|
+
canEdit: true
|
|
25505
|
+
};
|
|
24369
25506
|
}
|
|
24370
|
-
var
|
|
25507
|
+
var orders = isAllOrders ? (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrder]) === null || _value$typeMap$type$s6 === void 0 ? void 0 : _value$typeMap$type$s6.orders) || [] : [order];
|
|
25508
|
+
var hasGoodDetails = orders === null || orders === void 0 ? void 0 : orders.some(function (order) {
|
|
25509
|
+
var _order$typeMap$type$g;
|
|
25510
|
+
return order === null || order === void 0 ? void 0 : (_order$typeMap$type$g = order[typeMap$2[type].goodDetailsKey]) === null || _order$typeMap$type$g === void 0 ? void 0 : _order$typeMap$type$g.length;
|
|
25511
|
+
});
|
|
25512
|
+
var goodDetails = hasGoodDetails ? typeMap$2[type].mergeIdenticalGoods ? typeMap$2[type].mergeIdenticalGoods((_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.updateGoodsHandle(orders, orderRest)) : (_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.updateGoodsHandle(orders, orderRest) : [];
|
|
24371
25513
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
24372
|
-
var list = mode ? goodDetails.filter(function (goodItem) {
|
|
25514
|
+
var list = mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
24373
25515
|
return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
|
|
24374
25516
|
}) : goodDetails;
|
|
24375
25517
|
return list;
|
|
24376
25518
|
};
|
|
24377
25519
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
24378
|
-
var _typeMap$
|
|
25520
|
+
var _typeMap$type23;
|
|
24379
25521
|
var newValue = _objectSpread2({}, value);
|
|
24380
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25522
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)] = val || [];
|
|
24381
25523
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
24382
25524
|
};
|
|
24383
25525
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
24384
|
-
var _typeMap$
|
|
25526
|
+
var _typeMap$type24, _typeMap$type25, _value$typeMap$type$t2, _typeMap$type30, _value$typeMap$type$t3, _typeMap$type32;
|
|
24385
25527
|
var newValue = _objectSpread2({}, value);
|
|
24386
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
24387
|
-
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
24388
|
-
var _value$typeMap$type$
|
|
24389
|
-
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$
|
|
25528
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo)] = val;
|
|
25529
|
+
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderBillType) {
|
|
25530
|
+
var _value$typeMap$type$s7, _typeMap$type26, _typeMap$type28, _typeMap$type29;
|
|
25531
|
+
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s7 = value[(_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrder]) === null || _value$typeMap$type$s7 === void 0 ? void 0 : _value$typeMap$type$s7.orders) || [];
|
|
24390
25532
|
var targetOrder = val && orders.find(function (oItem) {
|
|
24391
|
-
var _typeMap$
|
|
24392
|
-
return oItem[(_typeMap$
|
|
25533
|
+
var _typeMap$type27;
|
|
25534
|
+
return oItem[(_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.oIdKey] === val;
|
|
24393
25535
|
});
|
|
24394
|
-
newValue[(_typeMap$
|
|
24395
|
-
}
|
|
24396
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
24397
|
-
var _typeMap$
|
|
24398
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
24399
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
24400
|
-
var _typeMap$
|
|
24401
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25536
|
+
newValue[(_typeMap$type28 = typeMap$2[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderBillType] = targetOrder === null || targetOrder === void 0 ? void 0 : targetOrder[(_typeMap$type29 = typeMap$2[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.orderTypeKey];
|
|
25537
|
+
}
|
|
25538
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type30 = typeMap$2[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
|
|
25539
|
+
var _typeMap$type31;
|
|
25540
|
+
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)] = [];
|
|
25541
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type32 = typeMap$2[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
25542
|
+
var _typeMap$type33;
|
|
25543
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type33 = typeMap$2[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.key)] = getGoodDetails({
|
|
24402
25544
|
mode: isStrict,
|
|
24403
25545
|
sysOrderNo: val
|
|
24404
25546
|
});
|
|
@@ -24406,26 +25548,27 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
24406
25548
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue, 'systemOrder');
|
|
24407
25549
|
};
|
|
24408
25550
|
//显示选择商品按钮
|
|
24409
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
25551
|
+
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type34 = typeMap$2[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.systemOrderNo]);
|
|
24410
25552
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
24411
|
-
var _typeMap$
|
|
25553
|
+
var _typeMap$type35, _typeMap$type36, _typeMap$type37, _uniqBy, _typeMap$type38;
|
|
24412
25554
|
var newValue = _objectSpread2({}, value);
|
|
24413
25555
|
// 原订单商品
|
|
24414
25556
|
var originTradeGoodList = getGoodDetails({
|
|
24415
|
-
mode: isStrict
|
|
25557
|
+
mode: isStrict,
|
|
25558
|
+
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type35 = typeMap$2[type]) === null || _typeMap$type35 === void 0 ? void 0 : _typeMap$type35.isShowSelectTradeGoods
|
|
24416
25559
|
}) || [];
|
|
24417
25560
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
24418
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
24419
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
24420
|
-
var _typeMap$
|
|
24421
|
-
return skuList.includes(item[typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25561
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type36 = typeMap$2[type]) === null || _typeMap$type36 === void 0 ? void 0 : _typeMap$type36.key)]) || [];
|
|
25562
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type37 = typeMap$2[type]) === null || _typeMap$type37 === void 0 ? void 0 : _typeMap$type37.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type38 = typeMap$2[type]) === null || _typeMap$type38 === void 0 ? void 0 : _typeMap$type38.uniqueKey) || 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
25563
|
+
var _typeMap$type39;
|
|
25564
|
+
return skuList.includes(item[(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type39 = typeMap$2[type]) === null || _typeMap$type39 === void 0 ? void 0 : _typeMap$type39.uniqueKey) || 'uuid']);
|
|
24422
25565
|
});
|
|
24423
25566
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
24424
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25567
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type40 = typeMap$2[type]) === null || _typeMap$type40 === void 0 ? void 0 : _typeMap$type40.key)], isStrict]);
|
|
24425
25568
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
24426
25569
|
gutter: 8,
|
|
24427
25570
|
wrap: true,
|
|
24428
|
-
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25571
|
+
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type41 = typeMap$2[type]) === null || _typeMap$type41 === void 0 ? void 0 : _typeMap$type41.key) || "".concat(Date.now())
|
|
24429
25572
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
24430
25573
|
className: "gutter-row",
|
|
24431
25574
|
xs: {
|
|
@@ -24441,12 +25584,12 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
24441
25584
|
},
|
|
24442
25585
|
disabled: disabled,
|
|
24443
25586
|
allowClear: false,
|
|
24444
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25587
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type42 = typeMap$2[type]) === null || _typeMap$type42 === void 0 ? void 0 : _typeMap$type42.systemOrderNo)],
|
|
24445
25588
|
onChange: function onChange(val) {
|
|
24446
25589
|
return changeSystemOrderHandle(val);
|
|
24447
25590
|
},
|
|
24448
|
-
placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
24449
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$
|
|
25591
|
+
placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type43 = typeMap$2[type]) === null || _typeMap$type43 === void 0 ? void 0 : _typeMap$type43.compType) || '', "\u7CFB\u7EDF\u5355")
|
|
25592
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s8 = value[(_typeMap$type44 = typeMap$2[type]) === null || _typeMap$type44 === void 0 ? void 0 : _typeMap$type44.systemOrder]) === null || _value$typeMap$type$s8 === void 0 ? void 0 : _value$typeMap$type$s8.showOrderInfo) || []).map(function (item) {
|
|
24450
25593
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
24451
25594
|
key: item[typeMap$2[type].oIdKey],
|
|
24452
25595
|
value: item[typeMap$2[type].oIdKey],
|
|
@@ -24468,11 +25611,11 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
24468
25611
|
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
24469
25612
|
allowClear: false,
|
|
24470
25613
|
options: reasonList,
|
|
24471
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25614
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type45 = typeMap$2[type]) === null || _typeMap$type45 === void 0 ? void 0 : _typeMap$type45.typeName)],
|
|
24472
25615
|
onChange: function onChange(val) {
|
|
24473
25616
|
return changeTypeHandle(val);
|
|
24474
25617
|
}
|
|
24475
|
-
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25618
|
+
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type46 = typeMap$2[type]) === null || _typeMap$type46 === void 0 ? void 0 : _typeMap$type46.systemOrderBillType) && !isSettingConfig && /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
24476
25619
|
className: "gutter-row",
|
|
24477
25620
|
xs: {
|
|
24478
25621
|
span: 11
|
|
@@ -24481,7 +25624,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
24481
25624
|
span: 6
|
|
24482
25625
|
}
|
|
24483
25626
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
24484
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25627
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type47 = typeMap$2[type]) === null || _typeMap$type47 === void 0 ? void 0 : _typeMap$type47.systemOrderBillType)],
|
|
24485
25628
|
disabled: disabled,
|
|
24486
25629
|
readOnly: true
|
|
24487
25630
|
}))), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
@@ -24490,22 +25633,25 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
24490
25633
|
type: type,
|
|
24491
25634
|
disabled: disabled,
|
|
24492
25635
|
canUpdateNumber: showChangeBtn,
|
|
24493
|
-
showChangeBtn: showChangeBtn,
|
|
24494
|
-
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
24495
|
-
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25636
|
+
showChangeBtn: showChangeBtn || (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type48 = typeMap$2[type]) === null || _typeMap$type48 === void 0 ? void 0 : _typeMap$type48.isShowSelectTradeGoods),
|
|
25637
|
+
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type49 = typeMap$2[type]) === null || _typeMap$type49 === void 0 ? void 0 : _typeMap$type49.alwaysShowChooseErpGoodsBtn,
|
|
25638
|
+
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type50 = typeMap$2[type]) === null || _typeMap$type50 === void 0 ? void 0 : _typeMap$type50.showErpGoodsBtn,
|
|
24496
25639
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
24497
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25640
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type51 = typeMap$2[type]) === null || _typeMap$type51 === void 0 ? void 0 : _typeMap$type51.key)],
|
|
24498
25641
|
onChange: function onChange(val) {
|
|
24499
25642
|
return changeGoodHandle(val);
|
|
24500
25643
|
},
|
|
24501
25644
|
onModeChange: handleModeChange,
|
|
24502
25645
|
showModeBtn: false,
|
|
24503
25646
|
isStrict: isStrict,
|
|
25647
|
+
isShowSelectTradeGoods: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type52 = typeMap$2[type]) === null || _typeMap$type52 === void 0 ? void 0 : _typeMap$type52.isShowSelectTradeGoods,
|
|
25648
|
+
systemOrders: value === null || value === void 0 ? void 0 : (_value$typeMap$type$s9 = value[(_typeMap$type53 = typeMap$2[type]) === null || _typeMap$type53 === void 0 ? void 0 : _typeMap$type53.systemOrder]) === null || _value$typeMap$type$s9 === void 0 ? void 0 : _value$typeMap$type$s9.orders,
|
|
24504
25649
|
tradeGoods: {
|
|
24505
25650
|
originDataSource: getGoodDetails({
|
|
24506
|
-
mode: isStrict
|
|
25651
|
+
mode: isStrict,
|
|
25652
|
+
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type54 = typeMap$2[type]) === null || _typeMap$type54 === void 0 ? void 0 : _typeMap$type54.isShowSelectTradeGoods
|
|
24507
25653
|
}),
|
|
24508
|
-
uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25654
|
+
uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type55 = typeMap$2[type]) === null || _typeMap$type55 === void 0 ? void 0 : _typeMap$type55.uniqueKey) || 'uuid',
|
|
24509
25655
|
selectedGoodsChange: selectedGoodsChange
|
|
24510
25656
|
}
|
|
24511
25657
|
})));
|
|
@@ -25533,7 +26679,7 @@ var styles$6 = {"systemNoDisabled":"index-module_systemNoDisabled__1s7aJ"};
|
|
|
25533
26679
|
styleInject(css_248z$f);
|
|
25534
26680
|
|
|
25535
26681
|
var _excluded$r = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
|
|
25536
|
-
_excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
26682
|
+
_excluded2$1 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
25537
26683
|
var typeMap$4 = {
|
|
25538
26684
|
GY_REISSUE_GOODS: {
|
|
25539
26685
|
key: 'gyReissueGoods',
|
|
@@ -25604,7 +26750,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
25604
26750
|
deliveryState = _ref2.deliveryState,
|
|
25605
26751
|
vipCode = _ref2.vipCode,
|
|
25606
26752
|
shopCode = _ref2.shopCode,
|
|
25607
|
-
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
26753
|
+
rest = _objectWithoutProperties(_ref2, _excluded2$1);
|
|
25608
26754
|
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
25609
26755
|
billNo: billNo,
|
|
25610
26756
|
billType: billType,
|
|
@@ -25844,7 +26990,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
25844
26990
|
};
|
|
25845
26991
|
|
|
25846
26992
|
var _excluded$s = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
|
|
25847
|
-
_excluded2$
|
|
26993
|
+
_excluded2$2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
25848
26994
|
var typeMap$5 = {
|
|
25849
26995
|
GY_RETURN_GOODS: {
|
|
25850
26996
|
key: 'gyReturnGoods',
|
|
@@ -25946,7 +27092,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
25946
27092
|
deliveryState = _ref2.deliveryState,
|
|
25947
27093
|
vipCode = _ref2.vipCode,
|
|
25948
27094
|
shopCode = _ref2.shopCode,
|
|
25949
|
-
rest = _objectWithoutProperties(_ref2, _excluded2$
|
|
27095
|
+
rest = _objectWithoutProperties(_ref2, _excluded2$2);
|
|
25950
27096
|
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
25951
27097
|
billNo: billNo,
|
|
25952
27098
|
billType: billType,
|
|
@@ -26844,8 +27990,9 @@ exports.erpFormValidator = erpFormValidator;
|
|
|
26844
27990
|
exports.erpModalColumnsMap = index$1;
|
|
26845
27991
|
exports.getGyColumns = getColumns$4;
|
|
26846
27992
|
exports.getJstColumns = getColumns$5;
|
|
27993
|
+
exports.getJyColumns = getColumns$7;
|
|
26847
27994
|
exports.getKmColumns = getColumns$6;
|
|
26848
|
-
exports.getSkxColumns = getColumns$
|
|
27995
|
+
exports.getSkxColumns = getColumns$8;
|
|
26849
27996
|
exports.getWdtColumns = getColumns$2;
|
|
26850
27997
|
exports.getWlnColumns = getColumns$3;
|
|
26851
27998
|
exports.orderSubFormConstants = orderSubFormConstants;
|