@kmkf-fe-packages/basic-components 2.2.13-beta.32 → 2.2.13-beta.35
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 +132 -24
- package/dist/index.js +131 -23
- package/dist/src/bs/component/GoodItem/index.d.ts +1 -0
- package/dist/src/bs/component/model/GyGoodsList.d.ts +1 -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/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", {
|
|
@@ -17454,6 +17455,9 @@ var WorkorderList = function WorkorderList(props, ref) {
|
|
|
17454
17455
|
return selectedList.map(function (workOrderData) {
|
|
17455
17456
|
return goodsSourceFormat.workOrderDataToGoods(workOrderData, props.erp);
|
|
17456
17457
|
});
|
|
17458
|
+
},
|
|
17459
|
+
setDefaultSearchValue: function setDefaultSearchValue(value) {
|
|
17460
|
+
value && form.setFieldsValue(_objectSpread2({}, value));
|
|
17457
17461
|
}
|
|
17458
17462
|
};
|
|
17459
17463
|
});
|
|
@@ -17732,21 +17736,112 @@ var WorkorderList = function WorkorderList(props, ref) {
|
|
|
17732
17736
|
};
|
|
17733
17737
|
var WorkorderList$1 = /*#__PURE__*/forwardRef(WorkorderList);
|
|
17734
17738
|
|
|
17735
|
-
|
|
17736
|
-
|
|
17737
|
-
|
|
17738
|
-
|
|
17739
|
-
|
|
17740
|
-
|
|
17741
|
-
|
|
17742
|
-
|
|
17743
|
-
|
|
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
|
+
};
|
|
17749
|
+
};
|
|
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
|
+
}
|
|
17790
|
+
};
|
|
17791
|
+
// 该方法只用于小白熊定制,当管易商品/管易补发/管易退换货组件的数据来源于关联工单数据,且其补发类型自定义组件选了值,根据该值填充到商品库弹框中类型筛选项
|
|
17792
|
+
var useDefaultSearchValue = (function (props) {
|
|
17793
|
+
var form = props.form,
|
|
17794
|
+
_props$companyKey = props.companyKey,
|
|
17795
|
+
companyKey = _props$companyKey === void 0 ? '' : _props$companyKey,
|
|
17796
|
+
source = props.source,
|
|
17797
|
+
erp = props.erp,
|
|
17798
|
+
_props$templateDetail = props.templateDetail,
|
|
17799
|
+
templateDetail = _props$templateDetail === void 0 ? {} : _props$templateDetail;
|
|
17800
|
+
if (source !== 'workOrder' || erp !== 'gy') {
|
|
17801
|
+
return '';
|
|
17802
|
+
}
|
|
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;
|
|
17830
|
+
});
|
|
17831
|
+
|
|
17744
17832
|
var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
17745
|
-
var _props$
|
|
17833
|
+
var _props$goodsSource2;
|
|
17746
17834
|
var _useState = useState(),
|
|
17747
17835
|
_useState2 = _slicedToArray(_useState, 2),
|
|
17748
17836
|
seletedGooods = _useState2[0],
|
|
17749
17837
|
setSeletedGooods = _useState2[1];
|
|
17838
|
+
var onSubmit = props.onSubmit,
|
|
17839
|
+
width = props.width;
|
|
17840
|
+
var _useState3 = useState(false),
|
|
17841
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
17842
|
+
visible = _useState4[0],
|
|
17843
|
+
setVisible = _useState4[1];
|
|
17844
|
+
var goodsListRef = useRef(null);
|
|
17750
17845
|
useImperativeHandle(ref, function () {
|
|
17751
17846
|
return {
|
|
17752
17847
|
open: function open(shopCode, options) {
|
|
@@ -17755,19 +17850,28 @@ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
|
17755
17850
|
}
|
|
17756
17851
|
};
|
|
17757
17852
|
});
|
|
17758
|
-
|
|
17759
|
-
|
|
17760
|
-
|
|
17761
|
-
|
|
17762
|
-
|
|
17763
|
-
|
|
17764
|
-
|
|
17853
|
+
useEffect(function () {
|
|
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
|
+
}
|
|
17867
|
+
}
|
|
17868
|
+
}, [visible]);
|
|
17765
17869
|
var _onCancel = function onCancel() {
|
|
17766
17870
|
setVisible(false);
|
|
17767
17871
|
};
|
|
17768
17872
|
var onOk = function onOk() {
|
|
17769
|
-
var _goodsListRef$
|
|
17770
|
-
var selectedList = ((_goodsListRef$
|
|
17873
|
+
var _goodsListRef$current3;
|
|
17874
|
+
var selectedList = ((_goodsListRef$current3 = goodsListRef.current) === null || _goodsListRef$current3 === void 0 ? void 0 : _goodsListRef$current3.getSelectGoodList()) || [];
|
|
17771
17875
|
onSubmit(selectedList);
|
|
17772
17876
|
_onCancel();
|
|
17773
17877
|
};
|
|
@@ -17782,7 +17886,7 @@ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
|
17782
17886
|
},
|
|
17783
17887
|
onOk: onOk,
|
|
17784
17888
|
wrapClassName: "goodModal"
|
|
17785
|
-
}, ((_props$
|
|
17889
|
+
}, ((_props$goodsSource2 = props.goodsSource) === null || _props$goodsSource2 === void 0 ? void 0 : _props$goodsSource2.source) === 'workOrder' ? /*#__PURE__*/React.createElement(WorkorderList$1, {
|
|
17786
17890
|
erp: "gy",
|
|
17787
17891
|
goodsSource: props.goodsSource,
|
|
17788
17892
|
seletedGooods: seletedGooods,
|
|
@@ -21517,7 +21621,9 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
21517
21621
|
tradeGoods = props.tradeGoods,
|
|
21518
21622
|
form = props.form,
|
|
21519
21623
|
systemOrders = props.systemOrders,
|
|
21520
|
-
selectedSystemOrders = props.selectedSystemOrders
|
|
21624
|
+
selectedSystemOrders = props.selectedSystemOrders,
|
|
21625
|
+
_props$templateDetail = props.templateDetail,
|
|
21626
|
+
templateDetail = _props$templateDetail === void 0 ? {} : _props$templateDetail;
|
|
21521
21627
|
var uniqueKey = (tradeGoods === null || tradeGoods === void 0 ? void 0 : tradeGoods.uniqueKey) || 'uuid';
|
|
21522
21628
|
// 监听聚水潭退货商品
|
|
21523
21629
|
var jstReturnGoods = Form === null || Form === void 0 ? void 0 : Form.useWatch('3979edfd6d', form);
|
|
@@ -21841,7 +21947,9 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
21841
21947
|
maxLength: maxLength,
|
|
21842
21948
|
companyKey: companyKey,
|
|
21843
21949
|
goodsSource: goodsSource,
|
|
21844
|
-
useGoodsSourceFormat: useGoodsSourceFormat
|
|
21950
|
+
useGoodsSourceFormat: useGoodsSourceFormat,
|
|
21951
|
+
form: form,
|
|
21952
|
+
templateDetail: templateDetail
|
|
21845
21953
|
}));
|
|
21846
21954
|
};
|
|
21847
21955
|
|
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", {
|
|
@@ -17469,6 +17470,9 @@ var WorkorderList = function WorkorderList(props, ref) {
|
|
|
17469
17470
|
return selectedList.map(function (workOrderData) {
|
|
17470
17471
|
return goodsSourceFormat.workOrderDataToGoods(workOrderData, props.erp);
|
|
17471
17472
|
});
|
|
17473
|
+
},
|
|
17474
|
+
setDefaultSearchValue: function setDefaultSearchValue(value) {
|
|
17475
|
+
value && form.setFieldsValue(_objectSpread2({}, value));
|
|
17472
17476
|
}
|
|
17473
17477
|
};
|
|
17474
17478
|
});
|
|
@@ -17747,21 +17751,112 @@ var WorkorderList = function WorkorderList(props, ref) {
|
|
|
17747
17751
|
};
|
|
17748
17752
|
var WorkorderList$1 = /*#__PURE__*/React.forwardRef(WorkorderList);
|
|
17749
17753
|
|
|
17750
|
-
|
|
17751
|
-
|
|
17752
|
-
|
|
17753
|
-
|
|
17754
|
-
|
|
17755
|
-
|
|
17756
|
-
|
|
17757
|
-
|
|
17758
|
-
|
|
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
|
+
};
|
|
17764
|
+
};
|
|
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
|
+
}
|
|
17805
|
+
};
|
|
17806
|
+
// 该方法只用于小白熊定制,当管易商品/管易补发/管易退换货组件的数据来源于关联工单数据,且其补发类型自定义组件选了值,根据该值填充到商品库弹框中类型筛选项
|
|
17807
|
+
var useDefaultSearchValue = (function (props) {
|
|
17808
|
+
var form = props.form,
|
|
17809
|
+
_props$companyKey = props.companyKey,
|
|
17810
|
+
companyKey = _props$companyKey === void 0 ? '' : _props$companyKey,
|
|
17811
|
+
source = props.source,
|
|
17812
|
+
erp = props.erp,
|
|
17813
|
+
_props$templateDetail = props.templateDetail,
|
|
17814
|
+
templateDetail = _props$templateDetail === void 0 ? {} : _props$templateDetail;
|
|
17815
|
+
if (source !== 'workOrder' || erp !== 'gy') {
|
|
17816
|
+
return '';
|
|
17817
|
+
}
|
|
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;
|
|
17845
|
+
});
|
|
17846
|
+
|
|
17759
17847
|
var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
17760
|
-
var _props$
|
|
17848
|
+
var _props$goodsSource2;
|
|
17761
17849
|
var _useState = React.useState(),
|
|
17762
17850
|
_useState2 = _slicedToArray(_useState, 2),
|
|
17763
17851
|
seletedGooods = _useState2[0],
|
|
17764
17852
|
setSeletedGooods = _useState2[1];
|
|
17853
|
+
var onSubmit = props.onSubmit,
|
|
17854
|
+
width = props.width;
|
|
17855
|
+
var _useState3 = React.useState(false),
|
|
17856
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
17857
|
+
visible = _useState4[0],
|
|
17858
|
+
setVisible = _useState4[1];
|
|
17859
|
+
var goodsListRef = React.useRef(null);
|
|
17765
17860
|
React.useImperativeHandle(ref, function () {
|
|
17766
17861
|
return {
|
|
17767
17862
|
open: function open(shopCode, options) {
|
|
@@ -17770,19 +17865,28 @@ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
|
17770
17865
|
}
|
|
17771
17866
|
};
|
|
17772
17867
|
});
|
|
17773
|
-
|
|
17774
|
-
|
|
17775
|
-
|
|
17776
|
-
|
|
17777
|
-
|
|
17778
|
-
|
|
17779
|
-
|
|
17868
|
+
React.useEffect(function () {
|
|
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
|
+
}
|
|
17882
|
+
}
|
|
17883
|
+
}, [visible]);
|
|
17780
17884
|
var _onCancel = function onCancel() {
|
|
17781
17885
|
setVisible(false);
|
|
17782
17886
|
};
|
|
17783
17887
|
var onOk = function onOk() {
|
|
17784
|
-
var _goodsListRef$
|
|
17785
|
-
var selectedList = ((_goodsListRef$
|
|
17888
|
+
var _goodsListRef$current3;
|
|
17889
|
+
var selectedList = ((_goodsListRef$current3 = goodsListRef.current) === null || _goodsListRef$current3 === void 0 ? void 0 : _goodsListRef$current3.getSelectGoodList()) || [];
|
|
17786
17890
|
onSubmit(selectedList);
|
|
17787
17891
|
_onCancel();
|
|
17788
17892
|
};
|
|
@@ -17797,7 +17901,7 @@ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
|
17797
17901
|
},
|
|
17798
17902
|
onOk: onOk,
|
|
17799
17903
|
wrapClassName: "goodModal"
|
|
17800
|
-
}, ((_props$
|
|
17904
|
+
}, ((_props$goodsSource2 = props.goodsSource) === null || _props$goodsSource2 === void 0 ? void 0 : _props$goodsSource2.source) === 'workOrder' ? /*#__PURE__*/React__default['default'].createElement(WorkorderList$1, {
|
|
17801
17905
|
erp: "gy",
|
|
17802
17906
|
goodsSource: props.goodsSource,
|
|
17803
17907
|
seletedGooods: seletedGooods,
|
|
@@ -21532,7 +21636,9 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
21532
21636
|
tradeGoods = props.tradeGoods,
|
|
21533
21637
|
form = props.form,
|
|
21534
21638
|
systemOrders = props.systemOrders,
|
|
21535
|
-
selectedSystemOrders = props.selectedSystemOrders
|
|
21639
|
+
selectedSystemOrders = props.selectedSystemOrders,
|
|
21640
|
+
_props$templateDetail = props.templateDetail,
|
|
21641
|
+
templateDetail = _props$templateDetail === void 0 ? {} : _props$templateDetail;
|
|
21536
21642
|
var uniqueKey = (tradeGoods === null || tradeGoods === void 0 ? void 0 : tradeGoods.uniqueKey) || 'uuid';
|
|
21537
21643
|
// 监听聚水潭退货商品
|
|
21538
21644
|
var jstReturnGoods = antd.Form === null || antd.Form === void 0 ? void 0 : antd.Form.useWatch('3979edfd6d', form);
|
|
@@ -21856,7 +21962,9 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
21856
21962
|
maxLength: maxLength,
|
|
21857
21963
|
companyKey: companyKey,
|
|
21858
21964
|
goodsSource: goodsSource,
|
|
21859
|
-
useGoodsSourceFormat: useGoodsSourceFormat
|
|
21965
|
+
useGoodsSourceFormat: useGoodsSourceFormat,
|
|
21966
|
+
form: form,
|
|
21967
|
+
templateDetail: templateDetail
|
|
21860
21968
|
}));
|
|
21861
21969
|
};
|
|
21862
21970
|
|
|
@@ -30,6 +30,7 @@ export declare namespace BsE3Goods {
|
|
|
30
30
|
}
|
|
31
31
|
interface SelectDrawerRefObject {
|
|
32
32
|
getSelectGoodList: () => BsE3Goods.GoodsInfo[];
|
|
33
|
+
setDefaultSearchValue?: (value: Record<string, any>) => void;
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
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;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FormInstance } from 'antd/es/form';
|
|
2
|
+
type PropsType = {
|
|
3
|
+
form: FormInstance;
|
|
4
|
+
companyKey: string;
|
|
5
|
+
source?: 'workOrder' | 'erp';
|
|
6
|
+
erp: string;
|
|
7
|
+
templateDetail?: any;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: (props: PropsType) => "" | Record<string, any>;
|
|
10
|
+
export default _default;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import type { FormInstance } from 'antd/es/form';
|
|
2
3
|
export type GoodsSourceFormatType = {
|
|
3
4
|
filterItems?: any[];
|
|
4
5
|
flowNodeId: string;
|
|
@@ -41,12 +42,14 @@ export type GoodsSourceType = {
|
|
|
41
42
|
};
|
|
42
43
|
};
|
|
43
44
|
export interface ErpGoodModelProps<T = any[]> {
|
|
45
|
+
templateDetail?: any;
|
|
44
46
|
shopId: number | string;
|
|
45
47
|
maxLength: number;
|
|
46
48
|
shopList: any[];
|
|
47
49
|
width?: string | number;
|
|
48
50
|
shopCode?: string;
|
|
49
51
|
companyKey: string;
|
|
52
|
+
form?: FormInstance;
|
|
50
53
|
useGoodsSourceFormat: (goodsSource?: GoodsSourceType) => GoodsSourceFormatType;
|
|
51
54
|
goodsSource?: GoodsSourceType;
|
|
52
55
|
onSubmit: (goodsList: T) => any;
|
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.35",
|
|
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": "59d3b7da9799909a9583dff6e7bd65e94edf9ea0"
|
|
70
70
|
}
|