@kmkf-fe-packages/basic-components 2.2.13-beta.33 → 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 +108 -53
- package/dist/index.js +107 -52
- 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,
|
|
@@ -21569,7 +21621,9 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
21569
21621
|
tradeGoods = props.tradeGoods,
|
|
21570
21622
|
form = props.form,
|
|
21571
21623
|
systemOrders = props.systemOrders,
|
|
21572
|
-
selectedSystemOrders = props.selectedSystemOrders
|
|
21624
|
+
selectedSystemOrders = props.selectedSystemOrders,
|
|
21625
|
+
_props$templateDetail = props.templateDetail,
|
|
21626
|
+
templateDetail = _props$templateDetail === void 0 ? {} : _props$templateDetail;
|
|
21573
21627
|
var uniqueKey = (tradeGoods === null || tradeGoods === void 0 ? void 0 : tradeGoods.uniqueKey) || 'uuid';
|
|
21574
21628
|
// 监听聚水潭退货商品
|
|
21575
21629
|
var jstReturnGoods = Form === null || Form === void 0 ? void 0 : Form.useWatch('3979edfd6d', form);
|
|
@@ -21894,7 +21948,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
21894
21948
|
companyKey: companyKey,
|
|
21895
21949
|
goodsSource: goodsSource,
|
|
21896
21950
|
useGoodsSourceFormat: useGoodsSourceFormat,
|
|
21897
|
-
form: form
|
|
21951
|
+
form: form,
|
|
21952
|
+
templateDetail: templateDetail
|
|
21898
21953
|
}));
|
|
21899
21954
|
};
|
|
21900
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", {
|
|
@@ -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,
|
|
@@ -21584,7 +21636,9 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
21584
21636
|
tradeGoods = props.tradeGoods,
|
|
21585
21637
|
form = props.form,
|
|
21586
21638
|
systemOrders = props.systemOrders,
|
|
21587
|
-
selectedSystemOrders = props.selectedSystemOrders
|
|
21639
|
+
selectedSystemOrders = props.selectedSystemOrders,
|
|
21640
|
+
_props$templateDetail = props.templateDetail,
|
|
21641
|
+
templateDetail = _props$templateDetail === void 0 ? {} : _props$templateDetail;
|
|
21588
21642
|
var uniqueKey = (tradeGoods === null || tradeGoods === void 0 ? void 0 : tradeGoods.uniqueKey) || 'uuid';
|
|
21589
21643
|
// 监听聚水潭退货商品
|
|
21590
21644
|
var jstReturnGoods = antd.Form === null || antd.Form === void 0 ? void 0 : antd.Form.useWatch('3979edfd6d', form);
|
|
@@ -21909,7 +21963,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
21909
21963
|
companyKey: companyKey,
|
|
21910
21964
|
goodsSource: goodsSource,
|
|
21911
21965
|
useGoodsSourceFormat: useGoodsSourceFormat,
|
|
21912
|
-
form: form
|
|
21966
|
+
form: form,
|
|
21967
|
+
templateDetail: templateDetail
|
|
21913
21968
|
}));
|
|
21914
21969
|
};
|
|
21915
21970
|
|
|
@@ -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.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
|
}
|