@kmkf-fe-packages/basic-components 2.2.13-beta.33 → 2.2.13-beta.36
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 +167 -99
- package/dist/index.js +166 -98
- package/dist/src/bs/component/GoodItem/index.d.ts +1 -0
- package/dist/src/bs/component/model/GyGoodsList.d.ts +1 -1
- package/dist/src/bs/component/model/WorkOrderList/index.d.ts +1 -0
- package/dist/src/bs/component/model/WorkOrderList/{useTypeDefaultSearchValue.d.ts → useDefaultSearchValue.d.ts} +2 -3
- package/dist/src/bs/component/model/type.d.ts +1 -0
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, messag
|
|
|
3
3
|
import { EyeOutlined, DeleteOutlined, CloseOutlined, PlusSquareOutlined, MinusCircleFilled, PlusCircleFilled, CopyOutlined, CloseCircleOutlined, CaretUpOutlined, UpOutlined, DownOutlined, PlusOutlined, VideoCameraTwoTone } from '@ant-design/icons';
|
|
4
4
|
import request, { extend as extend$1 } from 'umi-request';
|
|
5
5
|
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
|
6
|
-
import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, isNull, imgResize, uuid, servers, columnsGoodsList, LogisticsAddressData, SendDataCenter, hasAddNullComponent, SUBMIT_TIME_ID, UPGRADE_TIME_ID, FINAL_TIME_ID, CUSTOM_TIME_ID, useStatus, finalFormData, transformList, dataSourceTrans, DATA_SPLIT_COMPONENT_FIELDS_MAP, BS_E3_BOOLEAN_STATUS_MAP, filterWdtOrders, WDT_ORDER_TYPE_MAP, tradeStatusMap, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterJstOrders, filterJyOrders, JY_ORDER_TYPE_MAP, JY_ORDER_STATUS_MAP, filterKmOrders, getIsPlatformCodesIncludeOrderNos, BS_SYSTEM_ORDER_CONFIG, KM_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, JY_SYSTEM_ORDER_CONFIG, updateOrderSubFormGoodsHandle, updateWlnGoodsHandle, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, updateKmGoodsHandle, updateJyGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog, skxSystemOrderBackValues, skxReturnSystemOrderBackValues, formatTrade, updateSkxGoodsHandle, formatReturnTrade, updateSkxReturnGoodsHandle } from '@kmkf-fe-packages/kmkf-utils';
|
|
6
|
+
import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, isNull, imgResize, uuid, servers, columnsGoodsList, LogisticsAddressData, SendDataCenter, hasAddNullComponent, SUBMIT_TIME_ID, UPGRADE_TIME_ID, FINAL_TIME_ID, CUSTOM_TIME_ID, useStatus, finalFormData, transformList, dataSourceTrans, DATA_SPLIT_COMPONENT_FIELDS_MAP, findLabelBySelectValue, BS_E3_BOOLEAN_STATUS_MAP, filterWdtOrders, WDT_ORDER_TYPE_MAP, tradeStatusMap, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterJstOrders, filterJyOrders, JY_ORDER_TYPE_MAP, JY_ORDER_STATUS_MAP, filterKmOrders, getIsPlatformCodesIncludeOrderNos, BS_SYSTEM_ORDER_CONFIG, KM_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, JY_SYSTEM_ORDER_CONFIG, updateOrderSubFormGoodsHandle, updateWlnGoodsHandle, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, updateKmGoodsHandle, updateJyGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog, skxSystemOrderBackValues, skxReturnSystemOrderBackValues, formatTrade, updateSkxGoodsHandle, formatReturnTrade, updateSkxReturnGoodsHandle } from '@kmkf-fe-packages/kmkf-utils';
|
|
7
7
|
import every from 'lodash/every';
|
|
8
8
|
import maxBy from 'lodash/maxBy';
|
|
9
9
|
import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, uniqBy, cloneDeep, difference, differenceWith, isBoolean, isEqual, takeRight, reject as reject$1, intersection, isEmpty } from 'lodash';
|
|
@@ -17293,11 +17293,12 @@ var SearchHeader = function SearchHeader(_ref) {
|
|
|
17293
17293
|
timeOptions = _ref.timeOptions,
|
|
17294
17294
|
ShopList = _ref.ShopList,
|
|
17295
17295
|
onSubmit = _ref.onSubmit;
|
|
17296
|
+
console.log('allFields', allFields);
|
|
17296
17297
|
// const fixedFieldsOptions = useMemo(() => {
|
|
17297
17298
|
// return allFields.filter(item => fixedFields?.includes(item.id));
|
|
17298
17299
|
// }, [fixedFields, allFields]);
|
|
17299
17300
|
return /*#__PURE__*/React.createElement("div", {
|
|
17300
|
-
className:
|
|
17301
|
+
className: "search-header-wrap"
|
|
17301
17302
|
}, /*#__PURE__*/React.createElement("div", {
|
|
17302
17303
|
className: "".concat(status ? 'is-open' : 'not-open')
|
|
17303
17304
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -17455,7 +17456,7 @@ var WorkorderList = function WorkorderList(props, ref) {
|
|
|
17455
17456
|
return goodsSourceFormat.workOrderDataToGoods(workOrderData, props.erp);
|
|
17456
17457
|
});
|
|
17457
17458
|
},
|
|
17458
|
-
|
|
17459
|
+
setDefaultSearchValue: function setDefaultSearchValue(value) {
|
|
17459
17460
|
value && form.setFieldsValue(_objectSpread2({}, value));
|
|
17460
17461
|
}
|
|
17461
17462
|
};
|
|
@@ -17735,43 +17736,101 @@ var WorkorderList = function WorkorderList(props, ref) {
|
|
|
17735
17736
|
};
|
|
17736
17737
|
var WorkorderList$1 = /*#__PURE__*/forwardRef(WorkorderList);
|
|
17737
17738
|
|
|
17738
|
-
var
|
|
17739
|
-
|
|
17740
|
-
|
|
17739
|
+
var goodClassTransformValue = function goodClassTransformValue(value, config) {
|
|
17740
|
+
var label = '';
|
|
17741
|
+
var options = (config === null || config === void 0 ? void 0 : config.options) || [];
|
|
17742
|
+
var labelList = findLabelBySelectValue(value, options);
|
|
17743
|
+
var labelItem = labelList === null || labelList === void 0 ? void 0 : labelList.pop();
|
|
17744
|
+
label = labelItem === null || labelItem === void 0 ? void 0 : labelItem.label;
|
|
17745
|
+
return {
|
|
17746
|
+
type: 'anylike',
|
|
17747
|
+
keywords: label
|
|
17748
|
+
};
|
|
17741
17749
|
};
|
|
17742
|
-
|
|
17743
|
-
|
|
17744
|
-
|
|
17745
|
-
|
|
17750
|
+
var goodTypeTransformValue = function goodTypeTransformValue(value) {
|
|
17751
|
+
return (value === null || value === void 0 ? void 0 : value.value) ? [value === null || value === void 0 ? void 0 : value.value] : '';
|
|
17752
|
+
};
|
|
17753
|
+
var relationComponentUniqueKeyMap = {
|
|
17754
|
+
//小白熊自定义组件
|
|
17755
|
+
PCE2Z5TXEVPL5D26I7KMBKMB: {
|
|
17756
|
+
//补发类型
|
|
17757
|
+
goodType: {
|
|
17758
|
+
relationComponentKey: '6hldjQ9aMz',
|
|
17759
|
+
reflectKey: 'C7M9rWJMjD_radio',
|
|
17760
|
+
transformValue: function transformValue(value) {
|
|
17761
|
+
return goodTypeTransformValue(value);
|
|
17762
|
+
}
|
|
17763
|
+
},
|
|
17764
|
+
// 产品分类
|
|
17765
|
+
goodClass: {
|
|
17766
|
+
relationComponentKey: '8gozpyUFtA',
|
|
17767
|
+
reflectKey: 'c66dt8s48A_input',
|
|
17768
|
+
transformValue: function transformValue(value, config) {
|
|
17769
|
+
return goodClassTransformValue(value, config);
|
|
17770
|
+
}
|
|
17771
|
+
}
|
|
17772
|
+
},
|
|
17773
|
+
// 测马奔腾
|
|
17774
|
+
SZF4ZGWZSNW6PYXMCIFEWBXT: {
|
|
17775
|
+
goodType: {
|
|
17776
|
+
relationComponentKey: 'abVTwFX34E',
|
|
17777
|
+
reflectKey: 'ipOHnYquYB_radio',
|
|
17778
|
+
transformValue: function transformValue(value) {
|
|
17779
|
+
return goodTypeTransformValue(value);
|
|
17780
|
+
}
|
|
17781
|
+
},
|
|
17782
|
+
goodClass: {
|
|
17783
|
+
relationComponentKey: 'U0es1pIDaE',
|
|
17784
|
+
reflectKey: 'K1puYheEaE_input',
|
|
17785
|
+
transformValue: function transformValue(value, config) {
|
|
17786
|
+
return goodClassTransformValue(value, config);
|
|
17787
|
+
}
|
|
17788
|
+
}
|
|
17789
|
+
}
|
|
17746
17790
|
};
|
|
17747
17791
|
// 该方法只用于小白熊定制,当管易商品/管易补发/管易退换货组件的数据来源于关联工单数据,且其补发类型自定义组件选了值,根据该值填充到商品库弹框中类型筛选项
|
|
17748
|
-
var
|
|
17749
|
-
var _form$getFieldValue, _form$getFieldValue2;
|
|
17792
|
+
var useDefaultSearchValue = (function (props) {
|
|
17750
17793
|
var form = props.form,
|
|
17751
17794
|
_props$companyKey = props.companyKey,
|
|
17752
17795
|
companyKey = _props$companyKey === void 0 ? '' : _props$companyKey,
|
|
17753
17796
|
source = props.source,
|
|
17754
|
-
erp = props.erp
|
|
17797
|
+
erp = props.erp,
|
|
17798
|
+
_props$templateDetail = props.templateDetail,
|
|
17799
|
+
templateDetail = _props$templateDetail === void 0 ? {} : _props$templateDetail;
|
|
17755
17800
|
if (source !== 'workOrder' || erp !== 'gy') {
|
|
17756
17801
|
return '';
|
|
17757
17802
|
}
|
|
17758
|
-
var
|
|
17759
|
-
var
|
|
17760
|
-
|
|
17761
|
-
|
|
17803
|
+
var result = {};
|
|
17804
|
+
var relationComponentKeyMap = relationComponentUniqueKeyMap === null || relationComponentUniqueKeyMap === void 0 ? void 0 : relationComponentUniqueKeyMap[companyKey];
|
|
17805
|
+
Object.entries(relationComponentKeyMap).forEach(function (_ref) {
|
|
17806
|
+
var _templateDetail$compo;
|
|
17807
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
17808
|
+
key = _ref2[0],
|
|
17809
|
+
value = _ref2[1];
|
|
17810
|
+
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) {
|
|
17811
|
+
return item.uniqueKey === value.relationComponentKey;
|
|
17812
|
+
});
|
|
17813
|
+
if (!matchComponent) {
|
|
17814
|
+
return;
|
|
17815
|
+
}
|
|
17816
|
+
var relationComponentValue = form === null || form === void 0 ? void 0 : form.getFieldValue(value.relationComponentKey);
|
|
17817
|
+
if (relationComponentValue) {
|
|
17818
|
+
if ((value === null || value === void 0 ? void 0 : value.transformValue) && typeof (value === null || value === void 0 ? void 0 : value.transformValue) === 'function') {
|
|
17819
|
+
var _value$transformValue;
|
|
17820
|
+
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) || {});
|
|
17821
|
+
if (newValue) {
|
|
17822
|
+
result[value.reflectKey] = newValue;
|
|
17823
|
+
}
|
|
17824
|
+
} else {
|
|
17825
|
+
result[value.reflectKey] = relationComponentValue;
|
|
17826
|
+
}
|
|
17827
|
+
}
|
|
17828
|
+
});
|
|
17829
|
+
return result;
|
|
17762
17830
|
});
|
|
17763
17831
|
|
|
17764
|
-
// interface GoodModelProps {
|
|
17765
|
-
// shopId: number | string;
|
|
17766
|
-
// maxLength: number;
|
|
17767
|
-
// shopList: any[];
|
|
17768
|
-
// width?: string | number;
|
|
17769
|
-
// shopCode?: string;
|
|
17770
|
-
// companyKey: string;
|
|
17771
|
-
// onSubmit: (...args: any[]) => any;
|
|
17772
|
-
// }
|
|
17773
17832
|
var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
17774
|
-
var _props$
|
|
17833
|
+
var _props$goodsSource2;
|
|
17775
17834
|
var _useState = useState(),
|
|
17776
17835
|
_useState2 = _slicedToArray(_useState, 2),
|
|
17777
17836
|
seletedGooods = _useState2[0],
|
|
@@ -17783,43 +17842,36 @@ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
|
17783
17842
|
visible = _useState4[0],
|
|
17784
17843
|
setVisible = _useState4[1];
|
|
17785
17844
|
var goodsListRef = useRef(null);
|
|
17786
|
-
var typeDefaultSearchValue = useTypeDefaultSearchValue({
|
|
17787
|
-
form: props === null || props === void 0 ? void 0 : props.form,
|
|
17788
|
-
companyKey: props === null || props === void 0 ? void 0 : props.companyKey,
|
|
17789
|
-
source: (_props$goodsSource = props.goodsSource) === null || _props$goodsSource === void 0 ? void 0 : _props$goodsSource.source,
|
|
17790
|
-
erp: 'gy'
|
|
17791
|
-
});
|
|
17792
17845
|
useImperativeHandle(ref, function () {
|
|
17793
17846
|
return {
|
|
17794
17847
|
open: function open(shopCode, options) {
|
|
17795
|
-
var _props$goodsSource2;
|
|
17796
17848
|
setSeletedGooods((options === null || options === void 0 ? void 0 : options.value) || []);
|
|
17797
|
-
var typeDefaultSearchValue = useTypeDefaultSearchValue({
|
|
17798
|
-
form: props === null || props === void 0 ? void 0 : props.form,
|
|
17799
|
-
companyKey: props === null || props === void 0 ? void 0 : props.companyKey,
|
|
17800
|
-
source: (_props$goodsSource2 = props.goodsSource) === null || _props$goodsSource2 === void 0 ? void 0 : _props$goodsSource2.source,
|
|
17801
|
-
erp: 'gy'
|
|
17802
|
-
});
|
|
17803
|
-
if (typeDefaultSearchValue) {
|
|
17804
|
-
var _goodsListRef$current, _goodsListRef$current2;
|
|
17805
|
-
(_goodsListRef$current = goodsListRef.current) === null || _goodsListRef$current === void 0 ? void 0 : (_goodsListRef$current2 = _goodsListRef$current.setTypeDefaultSearchValue) === null || _goodsListRef$current2 === void 0 ? void 0 : _goodsListRef$current2.call(_goodsListRef$current, typeDefaultSearchValue);
|
|
17806
|
-
}
|
|
17807
17849
|
setVisible(true);
|
|
17808
17850
|
}
|
|
17809
17851
|
};
|
|
17810
17852
|
});
|
|
17811
17853
|
useEffect(function () {
|
|
17812
|
-
if (visible &&
|
|
17813
|
-
var
|
|
17814
|
-
|
|
17854
|
+
if (visible && goodsListRef.current) {
|
|
17855
|
+
var _props$goodsSource;
|
|
17856
|
+
var defaultSearchValue = useDefaultSearchValue({
|
|
17857
|
+
form: props === null || props === void 0 ? void 0 : props.form,
|
|
17858
|
+
companyKey: props === null || props === void 0 ? void 0 : props.companyKey,
|
|
17859
|
+
source: (_props$goodsSource = props.goodsSource) === null || _props$goodsSource === void 0 ? void 0 : _props$goodsSource.source,
|
|
17860
|
+
erp: 'gy',
|
|
17861
|
+
templateDetail: props === null || props === void 0 ? void 0 : props.templateDetail
|
|
17862
|
+
});
|
|
17863
|
+
if (defaultSearchValue) {
|
|
17864
|
+
var _goodsListRef$current, _goodsListRef$current2;
|
|
17865
|
+
(_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);
|
|
17866
|
+
}
|
|
17815
17867
|
}
|
|
17816
|
-
}, [visible
|
|
17868
|
+
}, [visible]);
|
|
17817
17869
|
var _onCancel = function onCancel() {
|
|
17818
17870
|
setVisible(false);
|
|
17819
17871
|
};
|
|
17820
17872
|
var onOk = function onOk() {
|
|
17821
|
-
var _goodsListRef$
|
|
17822
|
-
var selectedList = ((_goodsListRef$
|
|
17873
|
+
var _goodsListRef$current3;
|
|
17874
|
+
var selectedList = ((_goodsListRef$current3 = goodsListRef.current) === null || _goodsListRef$current3 === void 0 ? void 0 : _goodsListRef$current3.getSelectGoodList()) || [];
|
|
17823
17875
|
onSubmit(selectedList);
|
|
17824
17876
|
_onCancel();
|
|
17825
17877
|
};
|
|
@@ -17834,7 +17886,7 @@ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
|
17834
17886
|
},
|
|
17835
17887
|
onOk: onOk,
|
|
17836
17888
|
wrapClassName: "goodModal"
|
|
17837
|
-
}, ((_props$
|
|
17889
|
+
}, ((_props$goodsSource2 = props.goodsSource) === null || _props$goodsSource2 === void 0 ? void 0 : _props$goodsSource2.source) === 'workOrder' ? /*#__PURE__*/React.createElement(WorkorderList$1, {
|
|
17838
17890
|
erp: "gy",
|
|
17839
17891
|
goodsSource: props.goodsSource,
|
|
17840
17892
|
seletedGooods: seletedGooods,
|
|
@@ -21382,7 +21434,8 @@ var systemOrderNoMap = {
|
|
|
21382
21434
|
BS_E3_GOODS: 'orderSn',
|
|
21383
21435
|
JST_GOODS: 'oId',
|
|
21384
21436
|
WLN_GOODS: 'tradeNo',
|
|
21385
|
-
JY_GOODS: 'tradeNo'
|
|
21437
|
+
JY_GOODS: 'tradeNo',
|
|
21438
|
+
JY_REISSUE_GOODS: 'tradeNo'
|
|
21386
21439
|
};
|
|
21387
21440
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
21388
21441
|
var columns = _ref.columns,
|
|
@@ -21569,13 +21622,15 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
21569
21622
|
tradeGoods = props.tradeGoods,
|
|
21570
21623
|
form = props.form,
|
|
21571
21624
|
systemOrders = props.systemOrders,
|
|
21572
|
-
selectedSystemOrders = props.selectedSystemOrders
|
|
21625
|
+
selectedSystemOrders = props.selectedSystemOrders,
|
|
21626
|
+
_props$templateDetail = props.templateDetail,
|
|
21627
|
+
templateDetail = _props$templateDetail === void 0 ? {} : _props$templateDetail;
|
|
21573
21628
|
var uniqueKey = (tradeGoods === null || tradeGoods === void 0 ? void 0 : tradeGoods.uniqueKey) || 'uuid';
|
|
21574
21629
|
// 监听聚水潭退货商品
|
|
21575
21630
|
var jstReturnGoods = Form === null || Form === void 0 ? void 0 : Form.useWatch('3979edfd6d', form);
|
|
21576
21631
|
var isShowSelectTradeGoods = type !== 'JST_EXCHANGE_GOODS' || (jstReturnGoods === null || jstReturnGoods === void 0 ? void 0 : jstReturnGoods.jstSystemOrderNo);
|
|
21577
21632
|
// 判断是否为商品信息组件
|
|
21578
|
-
var isGoods = type && ['WDT_GOODS', 'BS_E3_GOODS', 'GY_GOODS', 'JST_GOODS', 'WLN_GOODS', 'KM_GOODS', 'JY_GOODS'].includes(type) || false;
|
|
21633
|
+
var isGoods = type && ['WDT_GOODS', 'BS_E3_GOODS', 'GY_GOODS', 'JST_GOODS', 'WLN_GOODS', 'KM_GOODS', 'JY_GOODS', 'JY_REISSUE_GOODS'].includes(type) || false;
|
|
21579
21634
|
var refModal = useRef();
|
|
21580
21635
|
console.debug('表格数据', value);
|
|
21581
21636
|
var handleDelete = function handleDelete(record, index) {
|
|
@@ -21894,7 +21949,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
21894
21949
|
companyKey: companyKey,
|
|
21895
21950
|
goodsSource: goodsSource,
|
|
21896
21951
|
useGoodsSourceFormat: useGoodsSourceFormat,
|
|
21897
|
-
form: form
|
|
21952
|
+
form: form,
|
|
21953
|
+
templateDetail: templateDetail
|
|
21898
21954
|
}));
|
|
21899
21955
|
};
|
|
21900
21956
|
|
|
@@ -25266,11 +25322,12 @@ var typeMap$2 = {
|
|
|
25266
25322
|
orderTypeKey: 'orderType',
|
|
25267
25323
|
oIdKey: 'tradeNo',
|
|
25268
25324
|
outerOiIdKey: '',
|
|
25269
|
-
goodDetailsKey: 'subOrderDetails'
|
|
25325
|
+
goodDetailsKey: 'subOrderDetails',
|
|
25326
|
+
isShowSelectTradeGoods: true
|
|
25270
25327
|
}
|
|
25271
25328
|
};
|
|
25272
25329
|
var PublicReissue = function PublicReissue(props) {
|
|
25273
|
-
var _typeMap$
|
|
25330
|
+
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;
|
|
25274
25331
|
var value = props.value,
|
|
25275
25332
|
onChange = props.onChange,
|
|
25276
25333
|
_props$reasonList = props.reasonList,
|
|
@@ -25387,9 +25444,11 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25387
25444
|
}))));
|
|
25388
25445
|
};
|
|
25389
25446
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
25390
|
-
var _typeMap$type18, _typeMap$type19,
|
|
25447
|
+
var _typeMap$type18, _typeMap$type19, _value$typeMap$type$s6, _typeMap$type20, _typeMap$type21, _typeMap$type22;
|
|
25391
25448
|
var mode = _ref4.mode,
|
|
25392
|
-
sysOrderNo = _ref4.sysOrderNo
|
|
25449
|
+
sysOrderNo = _ref4.sysOrderNo,
|
|
25450
|
+
_ref4$isAllOrders = _ref4.isAllOrders,
|
|
25451
|
+
isAllOrders = _ref4$isAllOrders === void 0 ? false : _ref4$isAllOrders;
|
|
25393
25452
|
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];
|
|
25394
25453
|
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];
|
|
25395
25454
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
@@ -25408,38 +25467,43 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25408
25467
|
canEdit: true
|
|
25409
25468
|
};
|
|
25410
25469
|
}
|
|
25411
|
-
var
|
|
25470
|
+
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];
|
|
25471
|
+
var hasGoodDetails = orders === null || orders === void 0 ? void 0 : orders.some(function (order) {
|
|
25472
|
+
var _order$typeMap$type$g;
|
|
25473
|
+
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;
|
|
25474
|
+
});
|
|
25475
|
+
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) : [];
|
|
25412
25476
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
25413
|
-
var list = mode ? goodDetails.filter(function (goodItem) {
|
|
25477
|
+
var list = mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
25414
25478
|
return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
|
|
25415
25479
|
}) : goodDetails;
|
|
25416
25480
|
return list;
|
|
25417
25481
|
};
|
|
25418
25482
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
25419
|
-
var _typeMap$
|
|
25483
|
+
var _typeMap$type23;
|
|
25420
25484
|
var newValue = _objectSpread2({}, value);
|
|
25421
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25485
|
+
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 || [];
|
|
25422
25486
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
25423
25487
|
};
|
|
25424
25488
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
25425
|
-
var _typeMap$
|
|
25489
|
+
var _typeMap$type24, _typeMap$type25, _value$typeMap$type$t2, _typeMap$type30, _value$typeMap$type$t3, _typeMap$type32;
|
|
25426
25490
|
var newValue = _objectSpread2({}, value);
|
|
25427
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25428
|
-
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25429
|
-
var _value$typeMap$type$
|
|
25430
|
-
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$
|
|
25491
|
+
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;
|
|
25492
|
+
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) {
|
|
25493
|
+
var _value$typeMap$type$s7, _typeMap$type26, _typeMap$type28, _typeMap$type29;
|
|
25494
|
+
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) || [];
|
|
25431
25495
|
var targetOrder = val && orders.find(function (oItem) {
|
|
25432
|
-
var _typeMap$
|
|
25433
|
-
return oItem[(_typeMap$
|
|
25496
|
+
var _typeMap$type27;
|
|
25497
|
+
return oItem[(_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.oIdKey] === val;
|
|
25434
25498
|
});
|
|
25435
|
-
newValue[(_typeMap$
|
|
25436
|
-
}
|
|
25437
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
25438
|
-
var _typeMap$
|
|
25439
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25440
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
25441
|
-
var _typeMap$
|
|
25442
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25499
|
+
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];
|
|
25500
|
+
}
|
|
25501
|
+
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])) {
|
|
25502
|
+
var _typeMap$type31;
|
|
25503
|
+
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)] = [];
|
|
25504
|
+
} 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])) {
|
|
25505
|
+
var _typeMap$type33;
|
|
25506
|
+
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({
|
|
25443
25507
|
mode: isStrict,
|
|
25444
25508
|
sysOrderNo: val
|
|
25445
25509
|
});
|
|
@@ -25447,26 +25511,27 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25447
25511
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue, 'systemOrder');
|
|
25448
25512
|
};
|
|
25449
25513
|
//显示选择商品按钮
|
|
25450
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
25514
|
+
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]);
|
|
25451
25515
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
25452
|
-
var _typeMap$
|
|
25516
|
+
var _typeMap$type35, _typeMap$type36, _typeMap$type37, _uniqBy, _typeMap$type38;
|
|
25453
25517
|
var newValue = _objectSpread2({}, value);
|
|
25454
25518
|
// 原订单商品
|
|
25455
25519
|
var originTradeGoodList = getGoodDetails({
|
|
25456
|
-
mode: isStrict
|
|
25520
|
+
mode: isStrict,
|
|
25521
|
+
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
|
|
25457
25522
|
}) || [];
|
|
25458
25523
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
25459
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25460
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25461
|
-
var _typeMap$
|
|
25462
|
-
return skuList.includes(item[(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25524
|
+
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)]) || [];
|
|
25525
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type37 = typeMap$2[type]) === null || _typeMap$type37 === void 0 ? void 0 : _typeMap$type37.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type38 = typeMap$2[type]) === null || _typeMap$type38 === void 0 ? void 0 : _typeMap$type38.uniqueKey) || 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
25526
|
+
var _typeMap$type39;
|
|
25527
|
+
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']);
|
|
25463
25528
|
});
|
|
25464
25529
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
25465
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25530
|
+
}, [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]);
|
|
25466
25531
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
25467
25532
|
gutter: 8,
|
|
25468
25533
|
wrap: true,
|
|
25469
|
-
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25534
|
+
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())
|
|
25470
25535
|
}, /*#__PURE__*/React.createElement(Col, {
|
|
25471
25536
|
className: "gutter-row",
|
|
25472
25537
|
xs: {
|
|
@@ -25482,12 +25547,12 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25482
25547
|
},
|
|
25483
25548
|
disabled: disabled,
|
|
25484
25549
|
allowClear: false,
|
|
25485
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25550
|
+
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)],
|
|
25486
25551
|
onChange: function onChange(val) {
|
|
25487
25552
|
return changeSystemOrderHandle(val);
|
|
25488
25553
|
},
|
|
25489
|
-
placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25490
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$
|
|
25554
|
+
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")
|
|
25555
|
+
}, ((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) {
|
|
25491
25556
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
25492
25557
|
key: item[typeMap$2[type].oIdKey],
|
|
25493
25558
|
value: item[typeMap$2[type].oIdKey],
|
|
@@ -25509,11 +25574,11 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25509
25574
|
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
25510
25575
|
allowClear: false,
|
|
25511
25576
|
options: reasonList,
|
|
25512
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25577
|
+
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)],
|
|
25513
25578
|
onChange: function onChange(val) {
|
|
25514
25579
|
return changeTypeHandle(val);
|
|
25515
25580
|
}
|
|
25516
|
-
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25581
|
+
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type46 = typeMap$2[type]) === null || _typeMap$type46 === void 0 ? void 0 : _typeMap$type46.systemOrderBillType) && !isSettingConfig && /*#__PURE__*/React.createElement(Col, {
|
|
25517
25582
|
className: "gutter-row",
|
|
25518
25583
|
xs: {
|
|
25519
25584
|
span: 11
|
|
@@ -25522,7 +25587,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25522
25587
|
span: 6
|
|
25523
25588
|
}
|
|
25524
25589
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
25525
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25590
|
+
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)],
|
|
25526
25591
|
disabled: disabled,
|
|
25527
25592
|
readOnly: true
|
|
25528
25593
|
}))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
@@ -25531,22 +25596,25 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25531
25596
|
type: type,
|
|
25532
25597
|
disabled: disabled,
|
|
25533
25598
|
canUpdateNumber: showChangeBtn,
|
|
25534
|
-
showChangeBtn: showChangeBtn,
|
|
25535
|
-
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25536
|
-
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25599
|
+
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),
|
|
25600
|
+
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,
|
|
25601
|
+
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,
|
|
25537
25602
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
25538
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25603
|
+
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)],
|
|
25539
25604
|
onChange: function onChange(val) {
|
|
25540
25605
|
return changeGoodHandle(val);
|
|
25541
25606
|
},
|
|
25542
25607
|
onModeChange: handleModeChange,
|
|
25543
25608
|
showModeBtn: false,
|
|
25544
25609
|
isStrict: isStrict,
|
|
25610
|
+
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,
|
|
25611
|
+
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,
|
|
25545
25612
|
tradeGoods: {
|
|
25546
25613
|
originDataSource: getGoodDetails({
|
|
25547
|
-
mode: isStrict
|
|
25614
|
+
mode: isStrict,
|
|
25615
|
+
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
|
|
25548
25616
|
}),
|
|
25549
|
-
uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25617
|
+
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',
|
|
25550
25618
|
selectedGoodsChange: selectedGoodsChange
|
|
25551
25619
|
}
|
|
25552
25620
|
})));
|
package/dist/index.js
CHANGED
|
@@ -17308,11 +17308,12 @@ var SearchHeader = function SearchHeader(_ref) {
|
|
|
17308
17308
|
timeOptions = _ref.timeOptions,
|
|
17309
17309
|
ShopList = _ref.ShopList,
|
|
17310
17310
|
onSubmit = _ref.onSubmit;
|
|
17311
|
+
console.log('allFields', allFields);
|
|
17311
17312
|
// const fixedFieldsOptions = useMemo(() => {
|
|
17312
17313
|
// return allFields.filter(item => fixedFields?.includes(item.id));
|
|
17313
17314
|
// }, [fixedFields, allFields]);
|
|
17314
17315
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
17315
|
-
className:
|
|
17316
|
+
className: "search-header-wrap"
|
|
17316
17317
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
17317
17318
|
className: "".concat(status ? 'is-open' : 'not-open')
|
|
17318
17319
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -17470,7 +17471,7 @@ var WorkorderList = function WorkorderList(props, ref) {
|
|
|
17470
17471
|
return goodsSourceFormat.workOrderDataToGoods(workOrderData, props.erp);
|
|
17471
17472
|
});
|
|
17472
17473
|
},
|
|
17473
|
-
|
|
17474
|
+
setDefaultSearchValue: function setDefaultSearchValue(value) {
|
|
17474
17475
|
value && form.setFieldsValue(_objectSpread2({}, value));
|
|
17475
17476
|
}
|
|
17476
17477
|
};
|
|
@@ -17750,43 +17751,101 @@ var WorkorderList = function WorkorderList(props, ref) {
|
|
|
17750
17751
|
};
|
|
17751
17752
|
var WorkorderList$1 = /*#__PURE__*/React.forwardRef(WorkorderList);
|
|
17752
17753
|
|
|
17753
|
-
var
|
|
17754
|
-
|
|
17755
|
-
|
|
17754
|
+
var goodClassTransformValue = function goodClassTransformValue(value, config) {
|
|
17755
|
+
var label = '';
|
|
17756
|
+
var options = (config === null || config === void 0 ? void 0 : config.options) || [];
|
|
17757
|
+
var labelList = kmkfUtils.findLabelBySelectValue(value, options);
|
|
17758
|
+
var labelItem = labelList === null || labelList === void 0 ? void 0 : labelList.pop();
|
|
17759
|
+
label = labelItem === null || labelItem === void 0 ? void 0 : labelItem.label;
|
|
17760
|
+
return {
|
|
17761
|
+
type: 'anylike',
|
|
17762
|
+
keywords: label
|
|
17763
|
+
};
|
|
17756
17764
|
};
|
|
17757
|
-
|
|
17758
|
-
|
|
17759
|
-
|
|
17760
|
-
|
|
17765
|
+
var goodTypeTransformValue = function goodTypeTransformValue(value) {
|
|
17766
|
+
return (value === null || value === void 0 ? void 0 : value.value) ? [value === null || value === void 0 ? void 0 : value.value] : '';
|
|
17767
|
+
};
|
|
17768
|
+
var relationComponentUniqueKeyMap = {
|
|
17769
|
+
//小白熊自定义组件
|
|
17770
|
+
PCE2Z5TXEVPL5D26I7KMBKMB: {
|
|
17771
|
+
//补发类型
|
|
17772
|
+
goodType: {
|
|
17773
|
+
relationComponentKey: '6hldjQ9aMz',
|
|
17774
|
+
reflectKey: 'C7M9rWJMjD_radio',
|
|
17775
|
+
transformValue: function transformValue(value) {
|
|
17776
|
+
return goodTypeTransformValue(value);
|
|
17777
|
+
}
|
|
17778
|
+
},
|
|
17779
|
+
// 产品分类
|
|
17780
|
+
goodClass: {
|
|
17781
|
+
relationComponentKey: '8gozpyUFtA',
|
|
17782
|
+
reflectKey: 'c66dt8s48A_input',
|
|
17783
|
+
transformValue: function transformValue(value, config) {
|
|
17784
|
+
return goodClassTransformValue(value, config);
|
|
17785
|
+
}
|
|
17786
|
+
}
|
|
17787
|
+
},
|
|
17788
|
+
// 测马奔腾
|
|
17789
|
+
SZF4ZGWZSNW6PYXMCIFEWBXT: {
|
|
17790
|
+
goodType: {
|
|
17791
|
+
relationComponentKey: 'abVTwFX34E',
|
|
17792
|
+
reflectKey: 'ipOHnYquYB_radio',
|
|
17793
|
+
transformValue: function transformValue(value) {
|
|
17794
|
+
return goodTypeTransformValue(value);
|
|
17795
|
+
}
|
|
17796
|
+
},
|
|
17797
|
+
goodClass: {
|
|
17798
|
+
relationComponentKey: 'U0es1pIDaE',
|
|
17799
|
+
reflectKey: 'K1puYheEaE_input',
|
|
17800
|
+
transformValue: function transformValue(value, config) {
|
|
17801
|
+
return goodClassTransformValue(value, config);
|
|
17802
|
+
}
|
|
17803
|
+
}
|
|
17804
|
+
}
|
|
17761
17805
|
};
|
|
17762
17806
|
// 该方法只用于小白熊定制,当管易商品/管易补发/管易退换货组件的数据来源于关联工单数据,且其补发类型自定义组件选了值,根据该值填充到商品库弹框中类型筛选项
|
|
17763
|
-
var
|
|
17764
|
-
var _form$getFieldValue, _form$getFieldValue2;
|
|
17807
|
+
var useDefaultSearchValue = (function (props) {
|
|
17765
17808
|
var form = props.form,
|
|
17766
17809
|
_props$companyKey = props.companyKey,
|
|
17767
17810
|
companyKey = _props$companyKey === void 0 ? '' : _props$companyKey,
|
|
17768
17811
|
source = props.source,
|
|
17769
|
-
erp = props.erp
|
|
17812
|
+
erp = props.erp,
|
|
17813
|
+
_props$templateDetail = props.templateDetail,
|
|
17814
|
+
templateDetail = _props$templateDetail === void 0 ? {} : _props$templateDetail;
|
|
17770
17815
|
if (source !== 'workOrder' || erp !== 'gy') {
|
|
17771
17816
|
return '';
|
|
17772
17817
|
}
|
|
17773
|
-
var
|
|
17774
|
-
var
|
|
17775
|
-
|
|
17776
|
-
|
|
17818
|
+
var result = {};
|
|
17819
|
+
var relationComponentKeyMap = relationComponentUniqueKeyMap === null || relationComponentUniqueKeyMap === void 0 ? void 0 : relationComponentUniqueKeyMap[companyKey];
|
|
17820
|
+
Object.entries(relationComponentKeyMap).forEach(function (_ref) {
|
|
17821
|
+
var _templateDetail$compo;
|
|
17822
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
17823
|
+
key = _ref2[0],
|
|
17824
|
+
value = _ref2[1];
|
|
17825
|
+
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) {
|
|
17826
|
+
return item.uniqueKey === value.relationComponentKey;
|
|
17827
|
+
});
|
|
17828
|
+
if (!matchComponent) {
|
|
17829
|
+
return;
|
|
17830
|
+
}
|
|
17831
|
+
var relationComponentValue = form === null || form === void 0 ? void 0 : form.getFieldValue(value.relationComponentKey);
|
|
17832
|
+
if (relationComponentValue) {
|
|
17833
|
+
if ((value === null || value === void 0 ? void 0 : value.transformValue) && typeof (value === null || value === void 0 ? void 0 : value.transformValue) === 'function') {
|
|
17834
|
+
var _value$transformValue;
|
|
17835
|
+
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) || {});
|
|
17836
|
+
if (newValue) {
|
|
17837
|
+
result[value.reflectKey] = newValue;
|
|
17838
|
+
}
|
|
17839
|
+
} else {
|
|
17840
|
+
result[value.reflectKey] = relationComponentValue;
|
|
17841
|
+
}
|
|
17842
|
+
}
|
|
17843
|
+
});
|
|
17844
|
+
return result;
|
|
17777
17845
|
});
|
|
17778
17846
|
|
|
17779
|
-
// interface GoodModelProps {
|
|
17780
|
-
// shopId: number | string;
|
|
17781
|
-
// maxLength: number;
|
|
17782
|
-
// shopList: any[];
|
|
17783
|
-
// width?: string | number;
|
|
17784
|
-
// shopCode?: string;
|
|
17785
|
-
// companyKey: string;
|
|
17786
|
-
// onSubmit: (...args: any[]) => any;
|
|
17787
|
-
// }
|
|
17788
17847
|
var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
17789
|
-
var _props$
|
|
17848
|
+
var _props$goodsSource2;
|
|
17790
17849
|
var _useState = React.useState(),
|
|
17791
17850
|
_useState2 = _slicedToArray(_useState, 2),
|
|
17792
17851
|
seletedGooods = _useState2[0],
|
|
@@ -17798,43 +17857,36 @@ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
|
17798
17857
|
visible = _useState4[0],
|
|
17799
17858
|
setVisible = _useState4[1];
|
|
17800
17859
|
var goodsListRef = React.useRef(null);
|
|
17801
|
-
var typeDefaultSearchValue = useTypeDefaultSearchValue({
|
|
17802
|
-
form: props === null || props === void 0 ? void 0 : props.form,
|
|
17803
|
-
companyKey: props === null || props === void 0 ? void 0 : props.companyKey,
|
|
17804
|
-
source: (_props$goodsSource = props.goodsSource) === null || _props$goodsSource === void 0 ? void 0 : _props$goodsSource.source,
|
|
17805
|
-
erp: 'gy'
|
|
17806
|
-
});
|
|
17807
17860
|
React.useImperativeHandle(ref, function () {
|
|
17808
17861
|
return {
|
|
17809
17862
|
open: function open(shopCode, options) {
|
|
17810
|
-
var _props$goodsSource2;
|
|
17811
17863
|
setSeletedGooods((options === null || options === void 0 ? void 0 : options.value) || []);
|
|
17812
|
-
var typeDefaultSearchValue = useTypeDefaultSearchValue({
|
|
17813
|
-
form: props === null || props === void 0 ? void 0 : props.form,
|
|
17814
|
-
companyKey: props === null || props === void 0 ? void 0 : props.companyKey,
|
|
17815
|
-
source: (_props$goodsSource2 = props.goodsSource) === null || _props$goodsSource2 === void 0 ? void 0 : _props$goodsSource2.source,
|
|
17816
|
-
erp: 'gy'
|
|
17817
|
-
});
|
|
17818
|
-
if (typeDefaultSearchValue) {
|
|
17819
|
-
var _goodsListRef$current, _goodsListRef$current2;
|
|
17820
|
-
(_goodsListRef$current = goodsListRef.current) === null || _goodsListRef$current === void 0 ? void 0 : (_goodsListRef$current2 = _goodsListRef$current.setTypeDefaultSearchValue) === null || _goodsListRef$current2 === void 0 ? void 0 : _goodsListRef$current2.call(_goodsListRef$current, typeDefaultSearchValue);
|
|
17821
|
-
}
|
|
17822
17864
|
setVisible(true);
|
|
17823
17865
|
}
|
|
17824
17866
|
};
|
|
17825
17867
|
});
|
|
17826
17868
|
React.useEffect(function () {
|
|
17827
|
-
if (visible &&
|
|
17828
|
-
var
|
|
17829
|
-
|
|
17869
|
+
if (visible && goodsListRef.current) {
|
|
17870
|
+
var _props$goodsSource;
|
|
17871
|
+
var defaultSearchValue = useDefaultSearchValue({
|
|
17872
|
+
form: props === null || props === void 0 ? void 0 : props.form,
|
|
17873
|
+
companyKey: props === null || props === void 0 ? void 0 : props.companyKey,
|
|
17874
|
+
source: (_props$goodsSource = props.goodsSource) === null || _props$goodsSource === void 0 ? void 0 : _props$goodsSource.source,
|
|
17875
|
+
erp: 'gy',
|
|
17876
|
+
templateDetail: props === null || props === void 0 ? void 0 : props.templateDetail
|
|
17877
|
+
});
|
|
17878
|
+
if (defaultSearchValue) {
|
|
17879
|
+
var _goodsListRef$current, _goodsListRef$current2;
|
|
17880
|
+
(_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);
|
|
17881
|
+
}
|
|
17830
17882
|
}
|
|
17831
|
-
}, [visible
|
|
17883
|
+
}, [visible]);
|
|
17832
17884
|
var _onCancel = function onCancel() {
|
|
17833
17885
|
setVisible(false);
|
|
17834
17886
|
};
|
|
17835
17887
|
var onOk = function onOk() {
|
|
17836
|
-
var _goodsListRef$
|
|
17837
|
-
var selectedList = ((_goodsListRef$
|
|
17888
|
+
var _goodsListRef$current3;
|
|
17889
|
+
var selectedList = ((_goodsListRef$current3 = goodsListRef.current) === null || _goodsListRef$current3 === void 0 ? void 0 : _goodsListRef$current3.getSelectGoodList()) || [];
|
|
17838
17890
|
onSubmit(selectedList);
|
|
17839
17891
|
_onCancel();
|
|
17840
17892
|
};
|
|
@@ -17849,7 +17901,7 @@ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
|
17849
17901
|
},
|
|
17850
17902
|
onOk: onOk,
|
|
17851
17903
|
wrapClassName: "goodModal"
|
|
17852
|
-
}, ((_props$
|
|
17904
|
+
}, ((_props$goodsSource2 = props.goodsSource) === null || _props$goodsSource2 === void 0 ? void 0 : _props$goodsSource2.source) === 'workOrder' ? /*#__PURE__*/React__default['default'].createElement(WorkorderList$1, {
|
|
17853
17905
|
erp: "gy",
|
|
17854
17906
|
goodsSource: props.goodsSource,
|
|
17855
17907
|
seletedGooods: seletedGooods,
|
|
@@ -21397,7 +21449,8 @@ var systemOrderNoMap = {
|
|
|
21397
21449
|
BS_E3_GOODS: 'orderSn',
|
|
21398
21450
|
JST_GOODS: 'oId',
|
|
21399
21451
|
WLN_GOODS: 'tradeNo',
|
|
21400
|
-
JY_GOODS: 'tradeNo'
|
|
21452
|
+
JY_GOODS: 'tradeNo',
|
|
21453
|
+
JY_REISSUE_GOODS: 'tradeNo'
|
|
21401
21454
|
};
|
|
21402
21455
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
21403
21456
|
var columns = _ref.columns,
|
|
@@ -21584,13 +21637,15 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
21584
21637
|
tradeGoods = props.tradeGoods,
|
|
21585
21638
|
form = props.form,
|
|
21586
21639
|
systemOrders = props.systemOrders,
|
|
21587
|
-
selectedSystemOrders = props.selectedSystemOrders
|
|
21640
|
+
selectedSystemOrders = props.selectedSystemOrders,
|
|
21641
|
+
_props$templateDetail = props.templateDetail,
|
|
21642
|
+
templateDetail = _props$templateDetail === void 0 ? {} : _props$templateDetail;
|
|
21588
21643
|
var uniqueKey = (tradeGoods === null || tradeGoods === void 0 ? void 0 : tradeGoods.uniqueKey) || 'uuid';
|
|
21589
21644
|
// 监听聚水潭退货商品
|
|
21590
21645
|
var jstReturnGoods = antd.Form === null || antd.Form === void 0 ? void 0 : antd.Form.useWatch('3979edfd6d', form);
|
|
21591
21646
|
var isShowSelectTradeGoods = type !== 'JST_EXCHANGE_GOODS' || (jstReturnGoods === null || jstReturnGoods === void 0 ? void 0 : jstReturnGoods.jstSystemOrderNo);
|
|
21592
21647
|
// 判断是否为商品信息组件
|
|
21593
|
-
var isGoods = type && ['WDT_GOODS', 'BS_E3_GOODS', 'GY_GOODS', 'JST_GOODS', 'WLN_GOODS', 'KM_GOODS', 'JY_GOODS'].includes(type) || false;
|
|
21648
|
+
var isGoods = type && ['WDT_GOODS', 'BS_E3_GOODS', 'GY_GOODS', 'JST_GOODS', 'WLN_GOODS', 'KM_GOODS', 'JY_GOODS', 'JY_REISSUE_GOODS'].includes(type) || false;
|
|
21594
21649
|
var refModal = React.useRef();
|
|
21595
21650
|
console.debug('表格数据', value);
|
|
21596
21651
|
var handleDelete = function handleDelete(record, index) {
|
|
@@ -21909,7 +21964,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
21909
21964
|
companyKey: companyKey,
|
|
21910
21965
|
goodsSource: goodsSource,
|
|
21911
21966
|
useGoodsSourceFormat: useGoodsSourceFormat,
|
|
21912
|
-
form: form
|
|
21967
|
+
form: form,
|
|
21968
|
+
templateDetail: templateDetail
|
|
21913
21969
|
}));
|
|
21914
21970
|
};
|
|
21915
21971
|
|
|
@@ -25281,11 +25337,12 @@ var typeMap$2 = {
|
|
|
25281
25337
|
orderTypeKey: 'orderType',
|
|
25282
25338
|
oIdKey: 'tradeNo',
|
|
25283
25339
|
outerOiIdKey: '',
|
|
25284
|
-
goodDetailsKey: 'subOrderDetails'
|
|
25340
|
+
goodDetailsKey: 'subOrderDetails',
|
|
25341
|
+
isShowSelectTradeGoods: true
|
|
25285
25342
|
}
|
|
25286
25343
|
};
|
|
25287
25344
|
var PublicReissue = function PublicReissue(props) {
|
|
25288
|
-
var _typeMap$
|
|
25345
|
+
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;
|
|
25289
25346
|
var value = props.value,
|
|
25290
25347
|
onChange = props.onChange,
|
|
25291
25348
|
_props$reasonList = props.reasonList,
|
|
@@ -25402,9 +25459,11 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25402
25459
|
}))));
|
|
25403
25460
|
};
|
|
25404
25461
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
25405
|
-
var _typeMap$type18, _typeMap$type19,
|
|
25462
|
+
var _typeMap$type18, _typeMap$type19, _value$typeMap$type$s6, _typeMap$type20, _typeMap$type21, _typeMap$type22;
|
|
25406
25463
|
var mode = _ref4.mode,
|
|
25407
|
-
sysOrderNo = _ref4.sysOrderNo
|
|
25464
|
+
sysOrderNo = _ref4.sysOrderNo,
|
|
25465
|
+
_ref4$isAllOrders = _ref4.isAllOrders,
|
|
25466
|
+
isAllOrders = _ref4$isAllOrders === void 0 ? false : _ref4$isAllOrders;
|
|
25408
25467
|
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];
|
|
25409
25468
|
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];
|
|
25410
25469
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
@@ -25423,38 +25482,43 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25423
25482
|
canEdit: true
|
|
25424
25483
|
};
|
|
25425
25484
|
}
|
|
25426
|
-
var
|
|
25485
|
+
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];
|
|
25486
|
+
var hasGoodDetails = orders === null || orders === void 0 ? void 0 : orders.some(function (order) {
|
|
25487
|
+
var _order$typeMap$type$g;
|
|
25488
|
+
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;
|
|
25489
|
+
});
|
|
25490
|
+
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) : [];
|
|
25427
25491
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
25428
|
-
var list = mode ? goodDetails.filter(function (goodItem) {
|
|
25492
|
+
var list = mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
25429
25493
|
return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
|
|
25430
25494
|
}) : goodDetails;
|
|
25431
25495
|
return list;
|
|
25432
25496
|
};
|
|
25433
25497
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
25434
|
-
var _typeMap$
|
|
25498
|
+
var _typeMap$type23;
|
|
25435
25499
|
var newValue = _objectSpread2({}, value);
|
|
25436
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25500
|
+
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 || [];
|
|
25437
25501
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
25438
25502
|
};
|
|
25439
25503
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
25440
|
-
var _typeMap$
|
|
25504
|
+
var _typeMap$type24, _typeMap$type25, _value$typeMap$type$t2, _typeMap$type30, _value$typeMap$type$t3, _typeMap$type32;
|
|
25441
25505
|
var newValue = _objectSpread2({}, value);
|
|
25442
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25443
|
-
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25444
|
-
var _value$typeMap$type$
|
|
25445
|
-
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$
|
|
25506
|
+
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;
|
|
25507
|
+
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) {
|
|
25508
|
+
var _value$typeMap$type$s7, _typeMap$type26, _typeMap$type28, _typeMap$type29;
|
|
25509
|
+
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) || [];
|
|
25446
25510
|
var targetOrder = val && orders.find(function (oItem) {
|
|
25447
|
-
var _typeMap$
|
|
25448
|
-
return oItem[(_typeMap$
|
|
25511
|
+
var _typeMap$type27;
|
|
25512
|
+
return oItem[(_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.oIdKey] === val;
|
|
25449
25513
|
});
|
|
25450
|
-
newValue[(_typeMap$
|
|
25451
|
-
}
|
|
25452
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
25453
|
-
var _typeMap$
|
|
25454
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25455
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
25456
|
-
var _typeMap$
|
|
25457
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25514
|
+
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];
|
|
25515
|
+
}
|
|
25516
|
+
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])) {
|
|
25517
|
+
var _typeMap$type31;
|
|
25518
|
+
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)] = [];
|
|
25519
|
+
} 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])) {
|
|
25520
|
+
var _typeMap$type33;
|
|
25521
|
+
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({
|
|
25458
25522
|
mode: isStrict,
|
|
25459
25523
|
sysOrderNo: val
|
|
25460
25524
|
});
|
|
@@ -25462,26 +25526,27 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25462
25526
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue, 'systemOrder');
|
|
25463
25527
|
};
|
|
25464
25528
|
//显示选择商品按钮
|
|
25465
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
25529
|
+
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]);
|
|
25466
25530
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
25467
|
-
var _typeMap$
|
|
25531
|
+
var _typeMap$type35, _typeMap$type36, _typeMap$type37, _uniqBy, _typeMap$type38;
|
|
25468
25532
|
var newValue = _objectSpread2({}, value);
|
|
25469
25533
|
// 原订单商品
|
|
25470
25534
|
var originTradeGoodList = getGoodDetails({
|
|
25471
|
-
mode: isStrict
|
|
25535
|
+
mode: isStrict,
|
|
25536
|
+
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
|
|
25472
25537
|
}) || [];
|
|
25473
25538
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
25474
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25475
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25476
|
-
var _typeMap$
|
|
25477
|
-
return skuList.includes(item[(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25539
|
+
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)]) || [];
|
|
25540
|
+
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) {
|
|
25541
|
+
var _typeMap$type39;
|
|
25542
|
+
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']);
|
|
25478
25543
|
});
|
|
25479
25544
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
25480
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25545
|
+
}, [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]);
|
|
25481
25546
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
25482
25547
|
gutter: 8,
|
|
25483
25548
|
wrap: true,
|
|
25484
|
-
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25549
|
+
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())
|
|
25485
25550
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
25486
25551
|
className: "gutter-row",
|
|
25487
25552
|
xs: {
|
|
@@ -25497,12 +25562,12 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25497
25562
|
},
|
|
25498
25563
|
disabled: disabled,
|
|
25499
25564
|
allowClear: false,
|
|
25500
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25565
|
+
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)],
|
|
25501
25566
|
onChange: function onChange(val) {
|
|
25502
25567
|
return changeSystemOrderHandle(val);
|
|
25503
25568
|
},
|
|
25504
|
-
placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25505
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$
|
|
25569
|
+
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")
|
|
25570
|
+
}, ((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) {
|
|
25506
25571
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
25507
25572
|
key: item[typeMap$2[type].oIdKey],
|
|
25508
25573
|
value: item[typeMap$2[type].oIdKey],
|
|
@@ -25524,11 +25589,11 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25524
25589
|
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
25525
25590
|
allowClear: false,
|
|
25526
25591
|
options: reasonList,
|
|
25527
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25592
|
+
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)],
|
|
25528
25593
|
onChange: function onChange(val) {
|
|
25529
25594
|
return changeTypeHandle(val);
|
|
25530
25595
|
}
|
|
25531
|
-
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25596
|
+
})), (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, {
|
|
25532
25597
|
className: "gutter-row",
|
|
25533
25598
|
xs: {
|
|
25534
25599
|
span: 11
|
|
@@ -25537,7 +25602,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25537
25602
|
span: 6
|
|
25538
25603
|
}
|
|
25539
25604
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
25540
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25605
|
+
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)],
|
|
25541
25606
|
disabled: disabled,
|
|
25542
25607
|
readOnly: true
|
|
25543
25608
|
}))), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
@@ -25546,22 +25611,25 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25546
25611
|
type: type,
|
|
25547
25612
|
disabled: disabled,
|
|
25548
25613
|
canUpdateNumber: showChangeBtn,
|
|
25549
|
-
showChangeBtn: showChangeBtn,
|
|
25550
|
-
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25551
|
-
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25614
|
+
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),
|
|
25615
|
+
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,
|
|
25616
|
+
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,
|
|
25552
25617
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
25553
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25618
|
+
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)],
|
|
25554
25619
|
onChange: function onChange(val) {
|
|
25555
25620
|
return changeGoodHandle(val);
|
|
25556
25621
|
},
|
|
25557
25622
|
onModeChange: handleModeChange,
|
|
25558
25623
|
showModeBtn: false,
|
|
25559
25624
|
isStrict: isStrict,
|
|
25625
|
+
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,
|
|
25626
|
+
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,
|
|
25560
25627
|
tradeGoods: {
|
|
25561
25628
|
originDataSource: getGoodDetails({
|
|
25562
|
-
mode: isStrict
|
|
25629
|
+
mode: isStrict,
|
|
25630
|
+
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
|
|
25563
25631
|
}),
|
|
25564
|
-
uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
25632
|
+
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',
|
|
25565
25633
|
selectedGoodsChange: selectedGoodsChange
|
|
25566
25634
|
}
|
|
25567
25635
|
})));
|
|
@@ -30,7 +30,7 @@ export declare namespace BsE3Goods {
|
|
|
30
30
|
}
|
|
31
31
|
interface SelectDrawerRefObject {
|
|
32
32
|
getSelectGoodList: () => BsE3Goods.GoodsInfo[];
|
|
33
|
-
|
|
33
|
+
setDefaultSearchValue?: (value: Record<string, any>) => void;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
declare const _default: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<BsE3Goods.SelectDrawerRefObject>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface SelectDrawerRefObject {
|
|
3
3
|
getSelectGoodList: () => any[];
|
|
4
|
+
setDefaultSearchValue?: (value: Record<string, any>) => void;
|
|
4
5
|
}
|
|
5
6
|
declare const _default: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<SelectDrawerRefObject>>;
|
|
6
7
|
export default _default;
|
|
@@ -4,8 +4,7 @@ type PropsType = {
|
|
|
4
4
|
companyKey: string;
|
|
5
5
|
source?: 'workOrder' | 'erp';
|
|
6
6
|
erp: string;
|
|
7
|
+
templateDetail?: any;
|
|
7
8
|
};
|
|
8
|
-
declare const _default: (props: PropsType) => "" |
|
|
9
|
-
[x: string]: any[];
|
|
10
|
-
};
|
|
9
|
+
declare const _default: (props: PropsType) => "" | Record<string, any>;
|
|
11
10
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "2.2.13-beta.
|
|
3
|
+
"version": "2.2.13-beta.36",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "373ef728a9fd645bdfba37e85e7facdf2a50617b"
|
|
70
70
|
}
|