@kmkf-fe-packages/basic-components 2.0.54-beta.3 → 2.0.54-beta.33
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 +997 -294
- package/dist/index.js +996 -291
- package/dist/src/bs/component/GoodItem/constants/bsE3ReissueGoodsColumns.d.ts +1 -1
- package/dist/src/bs/component/GoodItem/constants/index.d.ts +5 -0
- package/dist/src/bs/component/GoodItem/constants/wdtReissueGoodsColumns.d.ts +2 -2
- package/dist/src/bs/component/model/Columns/Erp/km.d.ts +27 -0
- package/dist/src/bs/component/model/Columns/useGetColumns.d.ts +2 -2
- package/dist/src/bs/component/model/JstGoodsModal/index.d.ts +2 -10
- package/dist/src/bs/component/model/KmGoodsModal/GoodsList.d.ts +25 -0
- package/dist/src/bs/component/model/KmGoodsModal/index.d.ts +5 -0
- package/dist/src/bs/component/model/type.d.ts +9 -0
- package/dist/src/common/AsyncSelect/index.d.ts +6 -0
- package/dist/src/constants/columnsBaseInfoMap.d.ts +1 -1
- package/dist/src/constants/index.d.ts +1 -0
- package/dist/src/constants/km.d.ts +3 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/jst/Goods/index.d.ts +2 -0
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -3,8 +3,8 @@ import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, messag
|
|
|
3
3
|
import { EyeOutlined, DeleteOutlined, CloseOutlined, CopyOutlined, CloseCircleOutlined, CaretUpOutlined, MinusCircleFilled } 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, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, servers, filterJstOrders, 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, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog } from '@kmkf-fe-packages/kmkf-utils';
|
|
7
|
-
import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, isEqual, takeRight, reject, isEmpty, intersection, uniqBy } from 'lodash';
|
|
6
|
+
import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, tradeStatusMap, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, servers, filterJstOrders, 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, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, updateKmGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog } from '@kmkf-fe-packages/kmkf-utils';
|
|
7
|
+
import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, isBoolean, isEqual, takeRight, reject, isEmpty, intersection, uniqBy } from 'lodash';
|
|
8
8
|
import { useUpdateEffect, useDebounceEffect, useAntdTable } from 'ahooks';
|
|
9
9
|
import zhCN from 'antd/lib/locale/zh_CN';
|
|
10
10
|
import pubsub from 'pubsub-js';
|
|
@@ -8001,7 +8001,8 @@ var WidgetMap = {
|
|
|
8001
8001
|
var pageSize = 50;
|
|
8002
8002
|
var SubForm = function SubForm(props) {
|
|
8003
8003
|
var _selectOptions$;
|
|
8004
|
-
var value = props.value,
|
|
8004
|
+
var _props$value = props.value,
|
|
8005
|
+
value = _props$value === void 0 ? [] : _props$value,
|
|
8005
8006
|
onChange = props.onChange,
|
|
8006
8007
|
needFilterShopByPermission = props.needFilterShopByPermission,
|
|
8007
8008
|
_props$subConfig = props.subConfig,
|
|
@@ -8303,7 +8304,7 @@ var SubForm = function SubForm(props) {
|
|
|
8303
8304
|
}
|
|
8304
8305
|
});
|
|
8305
8306
|
}
|
|
8306
|
-
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), [_objectSpread2(_objectSpread2({}, newValue), {}, {
|
|
8307
|
+
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value || []), [_objectSpread2(_objectSpread2({}, newValue), {}, {
|
|
8307
8308
|
uuid: uuid()
|
|
8308
8309
|
})]));
|
|
8309
8310
|
};
|
|
@@ -10961,7 +10962,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10961
10962
|
}
|
|
10962
10963
|
})), /*#__PURE__*/React.createElement(Item, {
|
|
10963
10964
|
label: '发件人手机号',
|
|
10964
|
-
required
|
|
10965
|
+
// required={true}
|
|
10965
10966
|
key: 'interceptSenderMobile',
|
|
10966
10967
|
hidden: !showSenderMobile
|
|
10967
10968
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
@@ -11141,7 +11142,11 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11141
11142
|
_props$value = props.value,
|
|
11142
11143
|
value = _props$value === void 0 ? {} : _props$value,
|
|
11143
11144
|
disabled = props.disabled,
|
|
11144
|
-
onChange = props.onChange
|
|
11145
|
+
onChange = props.onChange,
|
|
11146
|
+
_props$isSingle = props.isSingle,
|
|
11147
|
+
isSingle = _props$isSingle === void 0 ? true : _props$isSingle,
|
|
11148
|
+
_props$trajectoryApiS = props.trajectoryApiStatus,
|
|
11149
|
+
trajectoryApiStatus = _props$trajectoryApiS === void 0 ? false : _props$trajectoryApiS;
|
|
11145
11150
|
var handleInputChange = function handleInputChange(e, type) {
|
|
11146
11151
|
var val = e.target.value;
|
|
11147
11152
|
typeof onChange === 'function' && onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val)));
|
|
@@ -11152,13 +11157,23 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11152
11157
|
}));
|
|
11153
11158
|
handleSearchSnapshot(val);
|
|
11154
11159
|
};
|
|
11160
|
+
var handleStatusChange = function handleStatusChange(val) {
|
|
11161
|
+
var _value$trajectoryApiS;
|
|
11162
|
+
var newVal = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
11163
|
+
trajectoryApiStatus: {
|
|
11164
|
+
status: val,
|
|
11165
|
+
reason: (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS = value.trajectoryApiStatus) === null || _value$trajectoryApiS === void 0 ? void 0 : _value$trajectoryApiS.reason) || ''
|
|
11166
|
+
}
|
|
11167
|
+
});
|
|
11168
|
+
onChange(newVal);
|
|
11169
|
+
};
|
|
11155
11170
|
var handleSearchSnapshot = function handleSearchSnapshot(company) {
|
|
11156
11171
|
var trajectoryCompany = value.trajectoryCompany,
|
|
11157
11172
|
trajectoryCode = value.trajectoryCode,
|
|
11158
11173
|
trajectoryPhone = value.trajectoryPhone;
|
|
11159
11174
|
var newCompany = company ? company : trajectoryCompany;
|
|
11160
11175
|
//不展示拦截状态不请求
|
|
11161
|
-
if (!(showField && showField.includes('snapshot'))) {
|
|
11176
|
+
if (!(showField && showField.includes('snapshot')) && !trajectoryApiStatus) {
|
|
11162
11177
|
return;
|
|
11163
11178
|
}
|
|
11164
11179
|
if (disabled) {
|
|
@@ -11183,13 +11198,19 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11183
11198
|
data = res.data,
|
|
11184
11199
|
msg = res.message;
|
|
11185
11200
|
if (result === 100 || success) {
|
|
11186
|
-
|
|
11187
|
-
trajectorySnapshot: data === null || data === void 0 ? void 0 : data.logisticsStatusDesc,
|
|
11201
|
+
var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
11188
11202
|
trajectoryCompany: newCompany
|
|
11189
|
-
})
|
|
11203
|
+
});
|
|
11204
|
+
if (trajectoryApiStatus) newValue.trajectoryApiStatus = data === null || data === void 0 ? void 0 : data.apiStatusObject;
|
|
11205
|
+
if (showField && showField.includes('snapshot')) newValue.trajectorySnapshot = data === null || data === void 0 ? void 0 : data.logisticsStatusDesc;
|
|
11206
|
+
onChange(newValue);
|
|
11190
11207
|
} else {
|
|
11191
11208
|
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11192
11209
|
trajectorySnapshot: '',
|
|
11210
|
+
trajectoryApiStatus: {
|
|
11211
|
+
reason: '',
|
|
11212
|
+
status: ''
|
|
11213
|
+
},
|
|
11193
11214
|
trajectoryCompany: newCompany
|
|
11194
11215
|
}));
|
|
11195
11216
|
msg && message.error(msg);
|
|
@@ -11198,6 +11219,10 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11198
11219
|
} catch (err) {
|
|
11199
11220
|
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11200
11221
|
trajectorySnapshot: '',
|
|
11222
|
+
trajectoryApiStatus: {
|
|
11223
|
+
reason: '',
|
|
11224
|
+
status: ''
|
|
11225
|
+
},
|
|
11201
11226
|
trajectoryCompany: newCompany
|
|
11202
11227
|
}));
|
|
11203
11228
|
(err === null || err === void 0 ? void 0 : err.message) && message.error(err === null || err === void 0 ? void 0 : err.message);
|
|
@@ -11251,6 +11276,31 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11251
11276
|
}
|
|
11252
11277
|
});
|
|
11253
11278
|
};
|
|
11279
|
+
// 接口状态
|
|
11280
|
+
var LogisticsApiStatus = function LogisticsApiStatus() {
|
|
11281
|
+
var _value$trajectoryApiS2, _value$trajectoryApiS3, _value$trajectoryApiS4;
|
|
11282
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Select, {
|
|
11283
|
+
value: (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS2 = value.trajectoryApiStatus) === null || _value$trajectoryApiS2 === void 0 ? void 0 : _value$trajectoryApiS2.status) || null,
|
|
11284
|
+
disabled: true,
|
|
11285
|
+
style: {
|
|
11286
|
+
width: '100%',
|
|
11287
|
+
marginTop: '8px'
|
|
11288
|
+
},
|
|
11289
|
+
placeholder: "\u63A5\u53E3\u72B6\u6001",
|
|
11290
|
+
onChange: handleStatusChange,
|
|
11291
|
+
options: [{
|
|
11292
|
+
label: '成功',
|
|
11293
|
+
value: '成功'
|
|
11294
|
+
}, {
|
|
11295
|
+
label: '失败',
|
|
11296
|
+
value: '失败'
|
|
11297
|
+
}]
|
|
11298
|
+
}), (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS3 = value.trajectoryApiStatus) === null || _value$trajectoryApiS3 === void 0 ? void 0 : _value$trajectoryApiS3.reason) ? /*#__PURE__*/React.createElement("div", {
|
|
11299
|
+
style: {
|
|
11300
|
+
color: 'red'
|
|
11301
|
+
}
|
|
11302
|
+
}, "\u5931\u8D25\u539F\u56E0\uFF1A", value === null || value === void 0 ? void 0 : (_value$trajectoryApiS4 = value.trajectoryApiStatus) === null || _value$trajectoryApiS4 === void 0 ? void 0 : _value$trajectoryApiS4.reason) : null);
|
|
11303
|
+
};
|
|
11254
11304
|
//物流快照
|
|
11255
11305
|
var LogisticsSnapshot = function LogisticsSnapshot() {
|
|
11256
11306
|
return /*#__PURE__*/React.createElement(Input, {
|
|
@@ -11265,7 +11315,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11265
11315
|
value: value === null || value === void 0 ? void 0 : value.trajectorySnapshot
|
|
11266
11316
|
});
|
|
11267
11317
|
};
|
|
11268
|
-
return /*#__PURE__*/React.createElement("div", null, LogisticsCompany(), LogisticsCode(), (value === null || value === void 0 ? void 0 : value.trajectoryCompany) === 'SF' ? LogisticsPhone() : null, showField && showField.includes('snapshot') ? /*#__PURE__*/React.createElement(LogisticsSnapshot, null) : null);
|
|
11318
|
+
return /*#__PURE__*/React.createElement("div", null, LogisticsCompany(), LogisticsCode(), (value === null || value === void 0 ? void 0 : value.trajectoryCompany) === 'SF' ? LogisticsPhone() : null, trajectoryApiStatus && isSingle && LogisticsApiStatus(), showField && showField.includes('snapshot') ? /*#__PURE__*/React.createElement(LogisticsSnapshot, null) : null);
|
|
11269
11319
|
};
|
|
11270
11320
|
|
|
11271
11321
|
var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
|
|
@@ -11478,7 +11528,8 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
|
|
|
11478
11528
|
disabled: disabled,
|
|
11479
11529
|
onChange: function onChange(val) {
|
|
11480
11530
|
return handleChange(val, changeIndex);
|
|
11481
|
-
}
|
|
11531
|
+
},
|
|
11532
|
+
isSingle: false
|
|
11482
11533
|
}));
|
|
11483
11534
|
};
|
|
11484
11535
|
|
|
@@ -11501,7 +11552,7 @@ var typeInitValueMap = {
|
|
|
11501
11552
|
}]
|
|
11502
11553
|
};
|
|
11503
11554
|
var jstGoods = function jstGoods(props) {
|
|
11504
|
-
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8, _value$changeIndex9;
|
|
11555
|
+
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8, _value$changeIndex9, _value$changeIndex10, _value$changeIndex11, _value$changeIndex12;
|
|
11505
11556
|
var _props$value = props.value,
|
|
11506
11557
|
value = _props$value === void 0 ? [] : _props$value,
|
|
11507
11558
|
onChange = props.onChange,
|
|
@@ -11519,8 +11570,8 @@ var jstGoods = function jstGoods(props) {
|
|
|
11519
11570
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
11520
11571
|
var sendOptions = SendDataCenter.getInstance(platformType).getSendData();
|
|
11521
11572
|
var isSelectName = ['wdt', 'bsE3', 'km', 'gy', 'jst'].includes(platformType);
|
|
11573
|
+
var expressDateInstance = ExpressData.getInstance(platformType);
|
|
11522
11574
|
var isSendGoodSavedId = isSelectName && !['jst'].includes(platformType);
|
|
11523
|
-
var logisticsType = type === 1 && platformType === 'gy' ? 'input' : 'select';
|
|
11524
11575
|
useEffect(function () {
|
|
11525
11576
|
//没有值塞个默认值
|
|
11526
11577
|
if (!(value === null || value === void 0 ? void 0 : value.length) && type !== 1) {
|
|
@@ -11603,59 +11654,51 @@ var jstGoods = function jstGoods(props) {
|
|
|
11603
11654
|
return setChangeIndex(index);
|
|
11604
11655
|
}
|
|
11605
11656
|
}, "\u5305\u88F9".concat(index + 1)));
|
|
11606
|
-
}))) : null, value.length || type === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React.createElement(ApaasLogistics,
|
|
11607
|
-
type: logisticsType,
|
|
11657
|
+
}))) : null, value.length || type === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React.createElement(ApaasLogistics, {
|
|
11608
11658
|
disabled: disabled,
|
|
11609
11659
|
placeholder: "\u7269\u6D41\u516C\u53F8",
|
|
11610
11660
|
onChange: function onChange(val) {
|
|
11611
|
-
|
|
11612
|
-
changeInputHandle(null, 'logisticsCompany');
|
|
11613
|
-
changeInputHandle(val, 'logisticsCompanyName');
|
|
11614
|
-
} else {
|
|
11615
|
-
changeInputHandle(val, 'logisticsCompany');
|
|
11616
|
-
}
|
|
11661
|
+
changeInputHandle(val, 'logisticsCompany');
|
|
11617
11662
|
},
|
|
11618
|
-
value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex[
|
|
11619
|
-
}, logisticsType === 'input' ? {} : {
|
|
11663
|
+
value: platformType === 'gy' ? expressDateInstance.getExpressNameByCode((_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex['logisticsCompany'], false) ? (_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2['logisticsCompany'] : (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3['logisticsCompanyName'] : (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4['logisticsCompany'],
|
|
11620
11664
|
showSearch: true,
|
|
11621
11665
|
dropdownMatchSelectWidth: false,
|
|
11622
11666
|
filterOption: function filterOption(input, option) {
|
|
11623
11667
|
return option.label.includes(input);
|
|
11624
|
-
}
|
|
11625
|
-
}), {}, {
|
|
11668
|
+
},
|
|
11626
11669
|
style: {
|
|
11627
11670
|
minWidth: '100px',
|
|
11628
11671
|
maxWidth: '180px'
|
|
11629
11672
|
},
|
|
11630
11673
|
platformType: platformType
|
|
11631
|
-
})
|
|
11674
|
+
}) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React.createElement(Input, {
|
|
11632
11675
|
disabled: disabled,
|
|
11633
11676
|
placeholder: "\u7269\u6D41\u5355\u53F7",
|
|
11634
11677
|
onChange: function onChange(e) {
|
|
11635
11678
|
return changeInputHandle(e.target.value, 'logisticsCode');
|
|
11636
11679
|
},
|
|
11637
|
-
value: (_value$
|
|
11680
|
+
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.logisticsCode
|
|
11638
11681
|
}) : null) : null, type === 2 ? /*#__PURE__*/React.createElement(Space, null, ['supplyId', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
|
|
11639
11682
|
disabled: disabled,
|
|
11640
11683
|
placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u7F16\u7801",
|
|
11641
11684
|
onChange: function onChange(e) {
|
|
11642
11685
|
return changeInputHandle(e.target.value, 'supplyId');
|
|
11643
11686
|
},
|
|
11644
|
-
value: (_value$
|
|
11687
|
+
value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.supplyId
|
|
11645
11688
|
}), ['supplyName', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
|
|
11646
11689
|
disabled: disabled,
|
|
11647
11690
|
placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u540D\u79F0",
|
|
11648
11691
|
onChange: function onChange(e) {
|
|
11649
11692
|
return changeInputHandle(e.target.value, 'supplyName');
|
|
11650
11693
|
},
|
|
11651
|
-
value: (_value$
|
|
11694
|
+
value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.supplyName
|
|
11652
11695
|
})) : null, type === 3 ? /*#__PURE__*/React.createElement(Space, null, ['sendId', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
|
|
11653
11696
|
disabled: disabled,
|
|
11654
11697
|
placeholder: "\u8BF7\u8F93\u5165\u53D1\u8D27\u4ED3\u7F16\u7801",
|
|
11655
11698
|
onChange: function onChange(e) {
|
|
11656
11699
|
return changeInputHandle(e.target.value, 'sendId');
|
|
11657
11700
|
},
|
|
11658
|
-
value: (_value$
|
|
11701
|
+
value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendId
|
|
11659
11702
|
}), ['sendName', 'all'].includes(showField) && (isSelectName ? /*#__PURE__*/React.createElement(Select, {
|
|
11660
11703
|
style: {
|
|
11661
11704
|
minWidth: '100px',
|
|
@@ -11666,7 +11709,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11666
11709
|
showSearch: true,
|
|
11667
11710
|
options: sendOptions,
|
|
11668
11711
|
filterOption: filterOption,
|
|
11669
|
-
value: ((_value$
|
|
11712
|
+
value: ((_value$changeIndex9 = value[changeIndex]) === null || _value$changeIndex9 === void 0 ? void 0 : _value$changeIndex9.sendSnapshotId) || ((_value$changeIndex10 = value[changeIndex]) === null || _value$changeIndex10 === void 0 ? void 0 : _value$changeIndex10.sendName) || null,
|
|
11670
11713
|
onChange: function onChange(value, option) {
|
|
11671
11714
|
return handleSelected(value, 'sendName', option, onlyShowFieldSelect);
|
|
11672
11715
|
}
|
|
@@ -11676,14 +11719,14 @@ var jstGoods = function jstGoods(props) {
|
|
|
11676
11719
|
onChange: function onChange(e) {
|
|
11677
11720
|
return changeInputHandle(e.target.value, 'sendName');
|
|
11678
11721
|
},
|
|
11679
|
-
value: (_value$
|
|
11722
|
+
value: (_value$changeIndex11 = value[changeIndex]) === null || _value$changeIndex11 === void 0 ? void 0 : _value$changeIndex11.sendName
|
|
11680
11723
|
}))) : null, type === 4 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
11681
11724
|
disabled: disabled,
|
|
11682
11725
|
placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
|
|
11683
11726
|
onChange: function onChange(e) {
|
|
11684
11727
|
return changeInputHandle(e.target.value, 'deliveryNo');
|
|
11685
11728
|
},
|
|
11686
|
-
value: (_value$
|
|
11729
|
+
value: (_value$changeIndex12 = value[changeIndex]) === null || _value$changeIndex12 === void 0 ? void 0 : _value$changeIndex12.sendName
|
|
11687
11730
|
})) : null) : null);
|
|
11688
11731
|
};
|
|
11689
11732
|
|
|
@@ -12538,12 +12581,144 @@ var bse3Columns = [{
|
|
|
12538
12581
|
width: 100
|
|
12539
12582
|
}];
|
|
12540
12583
|
|
|
12584
|
+
var getYesOrNo = function getYesOrNo(val) {
|
|
12585
|
+
if (!isBoolean(val)) return null;
|
|
12586
|
+
return val ? '是' : '否';
|
|
12587
|
+
};
|
|
12588
|
+
var kmColumns = [{
|
|
12589
|
+
dataIndex: 'goodName',
|
|
12590
|
+
title: '商品名称',
|
|
12591
|
+
width: 250,
|
|
12592
|
+
ellipsis: true
|
|
12593
|
+
}, {
|
|
12594
|
+
dataIndex: 'goodNo',
|
|
12595
|
+
title: '商品编码',
|
|
12596
|
+
width: 150,
|
|
12597
|
+
ellipsis: true
|
|
12598
|
+
}, {
|
|
12599
|
+
dataIndex: 'goodId',
|
|
12600
|
+
title: '商品ID',
|
|
12601
|
+
width: 200,
|
|
12602
|
+
ellipsis: true
|
|
12603
|
+
}, {
|
|
12604
|
+
dataIndex: 'goodPicUrl',
|
|
12605
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
12606
|
+
width: 150,
|
|
12607
|
+
render: function render(val) {
|
|
12608
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
12609
|
+
width: 60,
|
|
12610
|
+
src: val
|
|
12611
|
+
});
|
|
12612
|
+
}
|
|
12613
|
+
}, {
|
|
12614
|
+
dataIndex: 'goodShortName',
|
|
12615
|
+
title: '商品简称',
|
|
12616
|
+
width: 200,
|
|
12617
|
+
ellipsis: true
|
|
12618
|
+
}, {
|
|
12619
|
+
dataIndex: 'goodBarcode',
|
|
12620
|
+
title: '商品条码',
|
|
12621
|
+
width: 200,
|
|
12622
|
+
ellipsis: true
|
|
12623
|
+
}, {
|
|
12624
|
+
dataIndex: 'brandName',
|
|
12625
|
+
title: "\u54C1\u724C\u540D\u79F0",
|
|
12626
|
+
ellipsis: true,
|
|
12627
|
+
width: 150
|
|
12628
|
+
}, {
|
|
12629
|
+
dataIndex: 'skuType',
|
|
12630
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
12631
|
+
ellipsis: true,
|
|
12632
|
+
width: 150
|
|
12633
|
+
}, {
|
|
12634
|
+
dataIndex: 'specName',
|
|
12635
|
+
title: "SKU\u540D\u79F0",
|
|
12636
|
+
ellipsis: true,
|
|
12637
|
+
width: 150
|
|
12638
|
+
}, {
|
|
12639
|
+
dataIndex: 'specNo',
|
|
12640
|
+
title: "SKU\u7F16\u7801",
|
|
12641
|
+
ellipsis: true,
|
|
12642
|
+
width: 150
|
|
12643
|
+
}, {
|
|
12644
|
+
dataIndex: 'specId',
|
|
12645
|
+
title: "SKU ID",
|
|
12646
|
+
ellipsis: true,
|
|
12647
|
+
width: 150
|
|
12648
|
+
}, {
|
|
12649
|
+
dataIndex: 'propertiesValue',
|
|
12650
|
+
title: "\u89C4\u683C\u503C",
|
|
12651
|
+
ellipsis: true,
|
|
12652
|
+
width: 150
|
|
12653
|
+
}, {
|
|
12654
|
+
dataIndex: 'skuShortTitle',
|
|
12655
|
+
title: "\u89C4\u683C\u7B80\u79F0",
|
|
12656
|
+
ellipsis: true,
|
|
12657
|
+
width: 150
|
|
12658
|
+
}, {
|
|
12659
|
+
dataIndex: 'specBarcode',
|
|
12660
|
+
title: "\u89C4\u683C\u6761\u7801",
|
|
12661
|
+
ellipsis: true,
|
|
12662
|
+
width: 150
|
|
12663
|
+
}, {
|
|
12664
|
+
dataIndex: 'specImgUrl',
|
|
12665
|
+
title: "SKU \u56FE\u7247",
|
|
12666
|
+
ellipsis: true,
|
|
12667
|
+
width: 150,
|
|
12668
|
+
render: function render(val) {
|
|
12669
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
12670
|
+
width: 60,
|
|
12671
|
+
src: val
|
|
12672
|
+
});
|
|
12673
|
+
}
|
|
12674
|
+
}, {
|
|
12675
|
+
dataIndex: 'isGift',
|
|
12676
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
12677
|
+
ellipsis: true,
|
|
12678
|
+
width: 150,
|
|
12679
|
+
render: function render(val) {
|
|
12680
|
+
return /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
12681
|
+
}
|
|
12682
|
+
}, {
|
|
12683
|
+
dataIndex: 'isVirtual',
|
|
12684
|
+
title: "\u662F\u5426\u865A\u62DF\u5546\u54C1",
|
|
12685
|
+
ellipsis: true,
|
|
12686
|
+
width: 150,
|
|
12687
|
+
render: function render(val) {
|
|
12688
|
+
return /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
12689
|
+
}
|
|
12690
|
+
}, {
|
|
12691
|
+
dataIndex: 'isSkuItem',
|
|
12692
|
+
title: "\u662F\u5426\u542B\u6709SKU",
|
|
12693
|
+
ellipsis: true,
|
|
12694
|
+
width: 150,
|
|
12695
|
+
render: function render(val) {
|
|
12696
|
+
return /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
12697
|
+
}
|
|
12698
|
+
}, {
|
|
12699
|
+
dataIndex: 'marketPrice',
|
|
12700
|
+
title: "\u5E02\u573A\u4EF7",
|
|
12701
|
+
ellipsis: true,
|
|
12702
|
+
width: 150
|
|
12703
|
+
}, {
|
|
12704
|
+
dataIndex: 'retailPrice',
|
|
12705
|
+
title: "\u96F6\u552E\u4EF7",
|
|
12706
|
+
ellipsis: true,
|
|
12707
|
+
width: 150
|
|
12708
|
+
}, {
|
|
12709
|
+
dataIndex: 'costPrice',
|
|
12710
|
+
title: "\u6210\u672C\u4EF7",
|
|
12711
|
+
ellipsis: true,
|
|
12712
|
+
width: 150
|
|
12713
|
+
}];
|
|
12714
|
+
|
|
12541
12715
|
var getColumnsMap = function getColumnsMap() {
|
|
12542
12716
|
return cloneDeep({
|
|
12543
12717
|
gy: gyColumns,
|
|
12544
12718
|
jst: jstColumns,
|
|
12545
12719
|
wdt: wdtColumns,
|
|
12546
|
-
bse3: bse3Columns
|
|
12720
|
+
bse3: bse3Columns,
|
|
12721
|
+
km: kmColumns
|
|
12547
12722
|
});
|
|
12548
12723
|
};
|
|
12549
12724
|
var getColumnsBaseInfo = function getColumnsBaseInfo() {
|
|
@@ -12598,9 +12773,7 @@ var useGetColumns = (function (type) {
|
|
|
12598
12773
|
loading = _useState4[0],
|
|
12599
12774
|
setLoading = _useState4[1];
|
|
12600
12775
|
var showColumnsDataIndexList = useMemo(function () {
|
|
12601
|
-
return columns.
|
|
12602
|
-
return Object.hasOwn(item, 'dataIndex');
|
|
12603
|
-
}).map(function (item) {
|
|
12776
|
+
return columns.map(function (item) {
|
|
12604
12777
|
return item.dataIndex;
|
|
12605
12778
|
});
|
|
12606
12779
|
}, [columns]);
|
|
@@ -13302,15 +13475,241 @@ var searchFormData$1 = [{
|
|
|
13302
13475
|
label: '商品名称',
|
|
13303
13476
|
name: 'goodName'
|
|
13304
13477
|
}, {
|
|
13305
|
-
label: 'SKU',
|
|
13478
|
+
label: 'SKU',
|
|
13479
|
+
name: 'skuCode',
|
|
13480
|
+
dataIndex: 'specNo'
|
|
13481
|
+
}, {
|
|
13482
|
+
label: 'SKU ID',
|
|
13483
|
+
name: 'skuId',
|
|
13484
|
+
dataIndex: 'specId'
|
|
13485
|
+
}];
|
|
13486
|
+
var GoodList$2 = function GoodList(props, ref) {
|
|
13487
|
+
var _useState = useState([]),
|
|
13488
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
13489
|
+
selectList = _useState2[0],
|
|
13490
|
+
setSelect = _useState2[1];
|
|
13491
|
+
var _useState3 = useState([]),
|
|
13492
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
13493
|
+
selectIds = _useState4[0],
|
|
13494
|
+
setSelectIds = _useState4[1];
|
|
13495
|
+
var _useGetColumns = useGetColumns('bse3'),
|
|
13496
|
+
_useGetColumns2 = _slicedToArray(_useGetColumns, 3),
|
|
13497
|
+
columns = _useGetColumns2[0],
|
|
13498
|
+
showColumnsDataIndexList = _useGetColumns2[1],
|
|
13499
|
+
loading = _useGetColumns2[2];
|
|
13500
|
+
useImperativeHandle(ref, function () {
|
|
13501
|
+
return {
|
|
13502
|
+
getSelectGoodList: function getSelectGoodList() {
|
|
13503
|
+
return selectList;
|
|
13504
|
+
}
|
|
13505
|
+
};
|
|
13506
|
+
});
|
|
13507
|
+
var _Form$useForm = Form.useForm(),
|
|
13508
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
13509
|
+
form = _Form$useForm2[0];
|
|
13510
|
+
var _useAntdTable = useAntdTable(getTableData$2, {
|
|
13511
|
+
defaultPageSize: 10,
|
|
13512
|
+
form: form
|
|
13513
|
+
}),
|
|
13514
|
+
tableProps = _useAntdTable.tableProps,
|
|
13515
|
+
search = _useAntdTable.search,
|
|
13516
|
+
params = _useAntdTable.params;
|
|
13517
|
+
var submit = search.submit,
|
|
13518
|
+
reset = search.reset;
|
|
13519
|
+
var rowSelection = {
|
|
13520
|
+
selectedRowKeys: selectIds,
|
|
13521
|
+
fixed: true,
|
|
13522
|
+
onSelect: function onSelect(record, selected) {
|
|
13523
|
+
if (selected) {
|
|
13524
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), [record.specNo]));
|
|
13525
|
+
setSelect([].concat(_toConsumableArray(selectList), [record]));
|
|
13526
|
+
} else {
|
|
13527
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
13528
|
+
return t !== record.specNo;
|
|
13529
|
+
}));
|
|
13530
|
+
setSelect(selectList.filter(function (t) {
|
|
13531
|
+
return t.specNo !== record.specNo;
|
|
13532
|
+
}));
|
|
13533
|
+
}
|
|
13534
|
+
},
|
|
13535
|
+
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
13536
|
+
if (selected) {
|
|
13537
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
|
|
13538
|
+
return t.specNo;
|
|
13539
|
+
}))));
|
|
13540
|
+
setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
|
|
13541
|
+
} else {
|
|
13542
|
+
setSelectIds(difference(selectIds, changeRows.map(function (t) {
|
|
13543
|
+
return t.specNo;
|
|
13544
|
+
})));
|
|
13545
|
+
var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
|
|
13546
|
+
return arrVal.specNo !== othVal.specNo;
|
|
13547
|
+
});
|
|
13548
|
+
setSelect(list);
|
|
13549
|
+
}
|
|
13550
|
+
}
|
|
13551
|
+
};
|
|
13552
|
+
var showTable = function showTable() {
|
|
13553
|
+
var handleDelete = function handleDelete(record) {
|
|
13554
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
13555
|
+
return t !== record.specNo;
|
|
13556
|
+
}));
|
|
13557
|
+
setSelect(selectList.filter(function (t) {
|
|
13558
|
+
return t.specNo !== record.specNo;
|
|
13559
|
+
}));
|
|
13560
|
+
};
|
|
13561
|
+
var showColumns = [{
|
|
13562
|
+
dataIndex: '',
|
|
13563
|
+
title: "\u64CD\u4F5C",
|
|
13564
|
+
ellipsis: true,
|
|
13565
|
+
width: 100,
|
|
13566
|
+
render: function render(val, record) {
|
|
13567
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
13568
|
+
type: "link",
|
|
13569
|
+
onClick: function onClick() {
|
|
13570
|
+
return handleDelete(record);
|
|
13571
|
+
}
|
|
13572
|
+
}, "\u5220\u9664");
|
|
13573
|
+
}
|
|
13574
|
+
}].concat(takeRight(columns, columns.length - 1));
|
|
13575
|
+
return selectList.length ? /*#__PURE__*/React.createElement("div", {
|
|
13576
|
+
style: {
|
|
13577
|
+
width: '100%',
|
|
13578
|
+
maxWidth: '387px'
|
|
13579
|
+
}
|
|
13580
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
13581
|
+
columns: showColumns,
|
|
13582
|
+
rowKey: 'specNo',
|
|
13583
|
+
dataSource: selectList,
|
|
13584
|
+
scroll: {
|
|
13585
|
+
x: '100%',
|
|
13586
|
+
y: 250
|
|
13587
|
+
},
|
|
13588
|
+
pagination: {
|
|
13589
|
+
size: 'small',
|
|
13590
|
+
total: selectIds.length,
|
|
13591
|
+
pageSize: 10,
|
|
13592
|
+
showSizeChanger: false
|
|
13593
|
+
}
|
|
13594
|
+
})) : null;
|
|
13595
|
+
};
|
|
13596
|
+
return /*#__PURE__*/React.createElement(Skeleton, {
|
|
13597
|
+
active: true,
|
|
13598
|
+
loading: loading
|
|
13599
|
+
}, /*#__PURE__*/React.createElement(SearchForm, {
|
|
13600
|
+
searchFormData: searchFormData$1,
|
|
13601
|
+
form: form,
|
|
13602
|
+
showColumnsDataIndexList: showColumnsDataIndexList,
|
|
13603
|
+
submit: submit,
|
|
13604
|
+
reset: reset
|
|
13605
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
13606
|
+
style: {
|
|
13607
|
+
marginTop: '4px'
|
|
13608
|
+
}
|
|
13609
|
+
}, /*#__PURE__*/React.createElement(Table, _objectSpread2({
|
|
13610
|
+
rowSelection: rowSelection,
|
|
13611
|
+
rowKey: "specNo",
|
|
13612
|
+
columns: columns,
|
|
13613
|
+
scroll: {
|
|
13614
|
+
x: '100%',
|
|
13615
|
+
y: 250
|
|
13616
|
+
}
|
|
13617
|
+
}, tableProps))), /*#__PURE__*/React.createElement(Popover, {
|
|
13618
|
+
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
13619
|
+
return triggerNode.parentElement;
|
|
13620
|
+
},
|
|
13621
|
+
content: showTable(),
|
|
13622
|
+
title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
|
|
13623
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
13624
|
+
danger: true,
|
|
13625
|
+
type: "text"
|
|
13626
|
+
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
|
|
13627
|
+
};
|
|
13628
|
+
var BsE3GoodList = /*#__PURE__*/forwardRef(GoodList$2);
|
|
13629
|
+
|
|
13630
|
+
var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
13631
|
+
useImperativeHandle(ref, function () {
|
|
13632
|
+
return {
|
|
13633
|
+
open: function open() {
|
|
13634
|
+
setVisible(true);
|
|
13635
|
+
}
|
|
13636
|
+
};
|
|
13637
|
+
});
|
|
13638
|
+
var onSubmit = props.onSubmit,
|
|
13639
|
+
width = props.width;
|
|
13640
|
+
var _useState = useState(false),
|
|
13641
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
13642
|
+
visible = _useState2[0],
|
|
13643
|
+
setVisible = _useState2[1];
|
|
13644
|
+
var bsE3GoodListRef = useRef(null);
|
|
13645
|
+
var _onCancel = function onCancel() {
|
|
13646
|
+
setVisible(false);
|
|
13647
|
+
};
|
|
13648
|
+
var onOk = function onOk() {
|
|
13649
|
+
var _bsE3GoodListRef$curr;
|
|
13650
|
+
var selectedList = ((_bsE3GoodListRef$curr = bsE3GoodListRef.current) === null || _bsE3GoodListRef$curr === void 0 ? void 0 : _bsE3GoodListRef$curr.getSelectGoodList()) || [];
|
|
13651
|
+
onSubmit(selectedList);
|
|
13652
|
+
_onCancel();
|
|
13653
|
+
};
|
|
13654
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, visible && /*#__PURE__*/React.createElement(Modal, {
|
|
13655
|
+
title: '选择商品',
|
|
13656
|
+
okText: '确认',
|
|
13657
|
+
cancelText: '取消',
|
|
13658
|
+
visible: visible,
|
|
13659
|
+
width: width || 850,
|
|
13660
|
+
onCancel: function onCancel() {
|
|
13661
|
+
_onCancel();
|
|
13662
|
+
},
|
|
13663
|
+
onOk: onOk,
|
|
13664
|
+
wrapClassName: "goodModal"
|
|
13665
|
+
}, /*#__PURE__*/React.createElement(BsE3GoodList, {
|
|
13666
|
+
ref: bsE3GoodListRef
|
|
13667
|
+
})));
|
|
13668
|
+
};
|
|
13669
|
+
var BsE3GoodsModal = /*#__PURE__*/forwardRef(GoodsModal$4);
|
|
13670
|
+
|
|
13671
|
+
var rowCheckKey = 'id';
|
|
13672
|
+
var getTableData$3 = function getTableData(_ref, formData) {
|
|
13673
|
+
var current = _ref.current,
|
|
13674
|
+
pageSize = _ref.pageSize;
|
|
13675
|
+
return extendRequest('/qy/gdfw/product/product/page', {
|
|
13676
|
+
method: 'post',
|
|
13677
|
+
data: _objectSpread2({
|
|
13678
|
+
pageSize: pageSize,
|
|
13679
|
+
pageNo: current,
|
|
13680
|
+
platform: 'KM_ERP'
|
|
13681
|
+
}, formData)
|
|
13682
|
+
}).then(function (res) {
|
|
13683
|
+
var _res$data = res.data,
|
|
13684
|
+
_res$data$productSkuL = _res$data.productSkuList,
|
|
13685
|
+
productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
|
|
13686
|
+
_res$data$total = _res$data.total,
|
|
13687
|
+
total = _res$data$total === void 0 ? 0 : _res$data$total;
|
|
13688
|
+
var newProducts = productSkuList.map(function (item, index) {
|
|
13689
|
+
return _objectSpread2({}, item);
|
|
13690
|
+
});
|
|
13691
|
+
return {
|
|
13692
|
+
total: total,
|
|
13693
|
+
list: newProducts
|
|
13694
|
+
};
|
|
13695
|
+
});
|
|
13696
|
+
};
|
|
13697
|
+
var searchFormData$2 = [{
|
|
13698
|
+
label: '商品名称',
|
|
13699
|
+
name: 'goodName'
|
|
13700
|
+
}, {
|
|
13701
|
+
label: '商品编码',
|
|
13702
|
+
name: 'goodNo'
|
|
13703
|
+
}, {
|
|
13704
|
+
label: 'SKU名称',
|
|
13705
|
+
name: 'skuName',
|
|
13706
|
+
dataIndex: 'specName'
|
|
13707
|
+
}, {
|
|
13708
|
+
label: 'SKU编码',
|
|
13306
13709
|
name: 'skuCode',
|
|
13307
13710
|
dataIndex: 'specNo'
|
|
13308
|
-
}, {
|
|
13309
|
-
label: 'SKU ID',
|
|
13310
|
-
name: 'skuId',
|
|
13311
|
-
dataIndex: 'specId'
|
|
13312
13711
|
}];
|
|
13313
|
-
var GoodList$
|
|
13712
|
+
var GoodList$3 = function GoodList(props, ref) {
|
|
13314
13713
|
var _useState = useState([]),
|
|
13315
13714
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13316
13715
|
selectList = _useState2[0],
|
|
@@ -13319,7 +13718,7 @@ var GoodList$2 = function GoodList(props, ref) {
|
|
|
13319
13718
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
13320
13719
|
selectIds = _useState4[0],
|
|
13321
13720
|
setSelectIds = _useState4[1];
|
|
13322
|
-
var _useGetColumns = useGetColumns('
|
|
13721
|
+
var _useGetColumns = useGetColumns('km'),
|
|
13323
13722
|
_useGetColumns2 = _slicedToArray(_useGetColumns, 3),
|
|
13324
13723
|
columns = _useGetColumns2[0],
|
|
13325
13724
|
showColumnsDataIndexList = _useGetColumns2[1],
|
|
@@ -13334,7 +13733,7 @@ var GoodList$2 = function GoodList(props, ref) {
|
|
|
13334
13733
|
var _Form$useForm = Form.useForm(),
|
|
13335
13734
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
13336
13735
|
form = _Form$useForm2[0];
|
|
13337
|
-
var _useAntdTable = useAntdTable(getTableData$
|
|
13736
|
+
var _useAntdTable = useAntdTable(getTableData$3, {
|
|
13338
13737
|
defaultPageSize: 10,
|
|
13339
13738
|
form: form
|
|
13340
13739
|
}),
|
|
@@ -13348,41 +13747,50 @@ var GoodList$2 = function GoodList(props, ref) {
|
|
|
13348
13747
|
fixed: true,
|
|
13349
13748
|
onSelect: function onSelect(record, selected) {
|
|
13350
13749
|
if (selected) {
|
|
13351
|
-
setSelectIds([].concat(_toConsumableArray(selectIds), [record
|
|
13750
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), [record[rowCheckKey]]));
|
|
13352
13751
|
setSelect([].concat(_toConsumableArray(selectList), [record]));
|
|
13353
13752
|
} else {
|
|
13354
13753
|
setSelectIds(selectIds.filter(function (t) {
|
|
13355
|
-
return t !== record
|
|
13754
|
+
return t !== record[rowCheckKey];
|
|
13356
13755
|
}));
|
|
13357
13756
|
setSelect(selectList.filter(function (t) {
|
|
13358
|
-
return t
|
|
13757
|
+
return t[rowCheckKey] !== record[rowCheckKey];
|
|
13359
13758
|
}));
|
|
13360
13759
|
}
|
|
13361
13760
|
},
|
|
13362
13761
|
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
13363
13762
|
if (selected) {
|
|
13364
13763
|
setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
|
|
13365
|
-
return t
|
|
13764
|
+
return t[rowCheckKey];
|
|
13366
13765
|
}))));
|
|
13367
13766
|
setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
|
|
13368
13767
|
} else {
|
|
13369
13768
|
setSelectIds(difference(selectIds, changeRows.map(function (t) {
|
|
13370
|
-
return t
|
|
13769
|
+
return t[rowCheckKey];
|
|
13371
13770
|
})));
|
|
13372
13771
|
var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
|
|
13373
|
-
return arrVal
|
|
13772
|
+
return arrVal[rowCheckKey] !== othVal[rowCheckKey];
|
|
13374
13773
|
});
|
|
13375
13774
|
setSelect(list);
|
|
13376
13775
|
}
|
|
13776
|
+
},
|
|
13777
|
+
getCheckboxProps: function getCheckboxProps(record) {
|
|
13778
|
+
var options = {
|
|
13779
|
+
disabled: (props.selectedRows || []).map(function (row) {
|
|
13780
|
+
return row[rowCheckKey] || row.skuId;
|
|
13781
|
+
}).includes(record[rowCheckKey] || record.skuId),
|
|
13782
|
+
name: record[rowCheckKey]
|
|
13783
|
+
};
|
|
13784
|
+
return options;
|
|
13377
13785
|
}
|
|
13378
13786
|
};
|
|
13379
13787
|
var showTable = function showTable() {
|
|
13380
13788
|
var handleDelete = function handleDelete(record) {
|
|
13381
13789
|
setSelectIds(selectIds.filter(function (t) {
|
|
13382
|
-
return t !== record
|
|
13790
|
+
return t !== record[rowCheckKey];
|
|
13383
13791
|
}));
|
|
13384
13792
|
setSelect(selectList.filter(function (t) {
|
|
13385
|
-
return t
|
|
13793
|
+
return t[rowCheckKey] !== record[rowCheckKey];
|
|
13386
13794
|
}));
|
|
13387
13795
|
};
|
|
13388
13796
|
var showColumns = [{
|
|
@@ -13406,7 +13814,7 @@ var GoodList$2 = function GoodList(props, ref) {
|
|
|
13406
13814
|
}
|
|
13407
13815
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
13408
13816
|
columns: showColumns,
|
|
13409
|
-
rowKey:
|
|
13817
|
+
rowKey: rowCheckKey,
|
|
13410
13818
|
dataSource: selectList,
|
|
13411
13819
|
scroll: {
|
|
13412
13820
|
x: '100%',
|
|
@@ -13424,7 +13832,7 @@ var GoodList$2 = function GoodList(props, ref) {
|
|
|
13424
13832
|
active: true,
|
|
13425
13833
|
loading: loading
|
|
13426
13834
|
}, /*#__PURE__*/React.createElement(SearchForm, {
|
|
13427
|
-
searchFormData: searchFormData$
|
|
13835
|
+
searchFormData: searchFormData$2,
|
|
13428
13836
|
form: form,
|
|
13429
13837
|
showColumnsDataIndexList: showColumnsDataIndexList,
|
|
13430
13838
|
submit: submit,
|
|
@@ -13435,7 +13843,7 @@ var GoodList$2 = function GoodList(props, ref) {
|
|
|
13435
13843
|
}
|
|
13436
13844
|
}, /*#__PURE__*/React.createElement(Table, _objectSpread2({
|
|
13437
13845
|
rowSelection: rowSelection,
|
|
13438
|
-
rowKey:
|
|
13846
|
+
rowKey: rowCheckKey,
|
|
13439
13847
|
columns: columns,
|
|
13440
13848
|
scroll: {
|
|
13441
13849
|
x: '100%',
|
|
@@ -13452,13 +13860,15 @@ var GoodList$2 = function GoodList(props, ref) {
|
|
|
13452
13860
|
type: "text"
|
|
13453
13861
|
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
|
|
13454
13862
|
};
|
|
13455
|
-
var
|
|
13863
|
+
var ErpGoodsList = /*#__PURE__*/forwardRef(GoodList$3);
|
|
13456
13864
|
|
|
13457
|
-
var
|
|
13865
|
+
var ErpGoodsModal = function ErpGoodsModal(props, ref) {
|
|
13458
13866
|
useImperativeHandle(ref, function () {
|
|
13459
13867
|
return {
|
|
13460
|
-
open: function open() {
|
|
13868
|
+
open: function open(shopCode) {
|
|
13869
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
13461
13870
|
setVisible(true);
|
|
13871
|
+
setSelectedRows(options.value || []);
|
|
13462
13872
|
}
|
|
13463
13873
|
};
|
|
13464
13874
|
});
|
|
@@ -13468,13 +13878,17 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
|
13468
13878
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13469
13879
|
visible = _useState2[0],
|
|
13470
13880
|
setVisible = _useState2[1];
|
|
13471
|
-
var
|
|
13881
|
+
var _useState3 = useState([]),
|
|
13882
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
13883
|
+
selectedRows = _useState4[0],
|
|
13884
|
+
setSelectedRows = _useState4[1];
|
|
13885
|
+
var erpGoodsListRef = useRef(null);
|
|
13472
13886
|
var _onCancel = function onCancel() {
|
|
13473
13887
|
setVisible(false);
|
|
13474
13888
|
};
|
|
13475
13889
|
var onOk = function onOk() {
|
|
13476
|
-
var
|
|
13477
|
-
var selectedList = ((
|
|
13890
|
+
var _erpGoodsListRef$curr;
|
|
13891
|
+
var selectedList = ((_erpGoodsListRef$curr = erpGoodsListRef.current) === null || _erpGoodsListRef$curr === void 0 ? void 0 : _erpGoodsListRef$curr.getSelectGoodList()) || [];
|
|
13478
13892
|
onSubmit(selectedList);
|
|
13479
13893
|
_onCancel();
|
|
13480
13894
|
};
|
|
@@ -13489,13 +13903,14 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
|
13489
13903
|
},
|
|
13490
13904
|
onOk: onOk,
|
|
13491
13905
|
wrapClassName: "goodModal"
|
|
13492
|
-
}, /*#__PURE__*/React.createElement(
|
|
13493
|
-
ref:
|
|
13906
|
+
}, /*#__PURE__*/React.createElement(ErpGoodsList, {
|
|
13907
|
+
ref: erpGoodsListRef,
|
|
13908
|
+
selectedRows: selectedRows
|
|
13494
13909
|
})));
|
|
13495
13910
|
};
|
|
13496
|
-
var
|
|
13911
|
+
var KmGoodsModal = /*#__PURE__*/forwardRef(ErpGoodsModal);
|
|
13497
13912
|
|
|
13498
|
-
var getTableData$
|
|
13913
|
+
var getTableData$4 = function getTableData(_ref, formData) {
|
|
13499
13914
|
var current = _ref.current,
|
|
13500
13915
|
pageSize = _ref.pageSize;
|
|
13501
13916
|
var data = {
|
|
@@ -13527,7 +13942,7 @@ var getTableData$3 = function getTableData(_ref, formData) {
|
|
|
13527
13942
|
};
|
|
13528
13943
|
});
|
|
13529
13944
|
};
|
|
13530
|
-
var searchFormData$
|
|
13945
|
+
var searchFormData$3 = [{
|
|
13531
13946
|
label: '商品简称',
|
|
13532
13947
|
name: 'goodShortName'
|
|
13533
13948
|
}, {
|
|
@@ -13545,7 +13960,7 @@ var searchFormData$2 = [{
|
|
|
13545
13960
|
label: '商品编码',
|
|
13546
13961
|
name: 'goodNo'
|
|
13547
13962
|
}];
|
|
13548
|
-
var GoodList$
|
|
13963
|
+
var GoodList$4 = function GoodList(props, ref) {
|
|
13549
13964
|
var _useState = useState([]),
|
|
13550
13965
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13551
13966
|
selectList = _useState2[0],
|
|
@@ -13569,7 +13984,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13569
13984
|
var _Form$useForm = Form.useForm(),
|
|
13570
13985
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
13571
13986
|
form = _Form$useForm2[0];
|
|
13572
|
-
var _useAntdTable = useAntdTable(getTableData$
|
|
13987
|
+
var _useAntdTable = useAntdTable(getTableData$4, {
|
|
13573
13988
|
defaultPageSize: 10,
|
|
13574
13989
|
form: form
|
|
13575
13990
|
}),
|
|
@@ -13659,7 +14074,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13659
14074
|
active: true,
|
|
13660
14075
|
loading: loading
|
|
13661
14076
|
}, /*#__PURE__*/React.createElement(SearchForm, {
|
|
13662
|
-
searchFormData: searchFormData$
|
|
14077
|
+
searchFormData: searchFormData$3,
|
|
13663
14078
|
form: form,
|
|
13664
14079
|
showColumnsDataIndexList: showColumnsDataIndexList,
|
|
13665
14080
|
submit: submit,
|
|
@@ -13687,7 +14102,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13687
14102
|
type: "text"
|
|
13688
14103
|
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
|
|
13689
14104
|
};
|
|
13690
|
-
var GyGoodsList$1 = /*#__PURE__*/forwardRef(GoodList$
|
|
14105
|
+
var GyGoodsList$1 = /*#__PURE__*/forwardRef(GoodList$4);
|
|
13691
14106
|
|
|
13692
14107
|
var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
13693
14108
|
useImperativeHandle(ref, function () {
|
|
@@ -14436,6 +14851,10 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14436
14851
|
label: '组合装',
|
|
14437
14852
|
value: '2'
|
|
14438
14853
|
}];
|
|
14854
|
+
var typeMap = {
|
|
14855
|
+
'1': '单品',
|
|
14856
|
+
'2': '组合装'
|
|
14857
|
+
};
|
|
14439
14858
|
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
14440
14859
|
style: {
|
|
14441
14860
|
width: 70
|
|
@@ -14445,7 +14864,7 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14445
14864
|
onChange: function onChange(value) {
|
|
14446
14865
|
return updateHandle(value, index, 'type');
|
|
14447
14866
|
}
|
|
14448
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
14867
|
+
}) : /*#__PURE__*/React.createElement("span", null, typeMap[val]);
|
|
14449
14868
|
}
|
|
14450
14869
|
}],
|
|
14451
14870
|
//旺店通换出商品信息
|
|
@@ -14557,6 +14976,10 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14557
14976
|
label: '组合装',
|
|
14558
14977
|
value: '2'
|
|
14559
14978
|
}];
|
|
14979
|
+
var typeMap = {
|
|
14980
|
+
'1': '单品',
|
|
14981
|
+
'2': '组合装'
|
|
14982
|
+
};
|
|
14560
14983
|
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
14561
14984
|
style: {
|
|
14562
14985
|
width: 70
|
|
@@ -14566,13 +14989,13 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14566
14989
|
onChange: function onChange(value) {
|
|
14567
14990
|
return updateHandle(value, index, 'type');
|
|
14568
14991
|
}
|
|
14569
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
14992
|
+
}) : /*#__PURE__*/React.createElement("span", null, typeMap[val]);
|
|
14570
14993
|
}
|
|
14571
14994
|
}]
|
|
14572
14995
|
};
|
|
14573
14996
|
};
|
|
14574
14997
|
|
|
14575
|
-
var getYesOrNo = function getYesOrNo(val) {
|
|
14998
|
+
var getYesOrNo$1 = function getYesOrNo(val) {
|
|
14576
14999
|
if (isNull(val)) return null;
|
|
14577
15000
|
return val ? '是' : '否';
|
|
14578
15001
|
};
|
|
@@ -14710,7 +15133,7 @@ var getColumns$3 = function getColumns(_ref) {
|
|
|
14710
15133
|
label: '否',
|
|
14711
15134
|
value: false
|
|
14712
15135
|
}]
|
|
14713
|
-
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
15136
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$1(val));
|
|
14714
15137
|
},
|
|
14715
15138
|
width: 100
|
|
14716
15139
|
}]
|
|
@@ -14722,7 +15145,7 @@ var isNumberOrNumberString = function isNumberOrNumberString(value) {
|
|
|
14722
15145
|
if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
|
|
14723
15146
|
return false;
|
|
14724
15147
|
};
|
|
14725
|
-
var getYesOrNo$
|
|
15148
|
+
var getYesOrNo$2 = function getYesOrNo(val) {
|
|
14726
15149
|
if (isNull(val)) return null;
|
|
14727
15150
|
return val ? '是' : '否';
|
|
14728
15151
|
};
|
|
@@ -14832,7 +15255,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14832
15255
|
title: "\u662F\u5426\u53D6\u6D88",
|
|
14833
15256
|
width: 150,
|
|
14834
15257
|
render: function render(val) {
|
|
14835
|
-
return /*#__PURE__*/React.createElement("span", null, getYesOrNo$
|
|
15258
|
+
return /*#__PURE__*/React.createElement("span", null, getYesOrNo$2(val));
|
|
14836
15259
|
}
|
|
14837
15260
|
}, {
|
|
14838
15261
|
dataIndex: 'isGift',
|
|
@@ -14851,7 +15274,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14851
15274
|
label: '否',
|
|
14852
15275
|
value: 0
|
|
14853
15276
|
}]
|
|
14854
|
-
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$
|
|
15277
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$2(val));
|
|
14855
15278
|
}
|
|
14856
15279
|
}, {
|
|
14857
15280
|
dataIndex: 'skuNote',
|
|
@@ -14971,7 +15394,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14971
15394
|
label: '否',
|
|
14972
15395
|
value: 0
|
|
14973
15396
|
}]
|
|
14974
|
-
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$
|
|
15397
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$2(val));
|
|
14975
15398
|
}
|
|
14976
15399
|
}].map(function (item) {
|
|
14977
15400
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
@@ -15095,7 +15518,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
15095
15518
|
label: '否',
|
|
15096
15519
|
value: 0
|
|
15097
15520
|
}]
|
|
15098
|
-
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$
|
|
15521
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$2(val));
|
|
15099
15522
|
}
|
|
15100
15523
|
}].map(function (item) {
|
|
15101
15524
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
@@ -15217,7 +15640,7 @@ var getColumns$5 = function getColumns() {
|
|
|
15217
15640
|
ellipsis: true,
|
|
15218
15641
|
align: 'center',
|
|
15219
15642
|
render: function render(val, record, index) {
|
|
15220
|
-
return (record.qty || 0) * (+record.salePrice || 0);
|
|
15643
|
+
return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
|
|
15221
15644
|
}
|
|
15222
15645
|
}, {
|
|
15223
15646
|
dataIndex: 'batchId',
|
|
@@ -15493,7 +15916,7 @@ var getColumns$5 = function getColumns() {
|
|
|
15493
15916
|
dataIndex: 'saleAmount',
|
|
15494
15917
|
title: '总金额',
|
|
15495
15918
|
render: function render(val, record) {
|
|
15496
|
-
return (record.qty || 0) * (+record.salePrice || 0);
|
|
15919
|
+
return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
|
|
15497
15920
|
}
|
|
15498
15921
|
}, {
|
|
15499
15922
|
dataIndex: 'batchId',
|
|
@@ -15602,7 +16025,7 @@ var getColumns$5 = function getColumns() {
|
|
|
15602
16025
|
dataIndex: 'saleAmount',
|
|
15603
16026
|
title: '总金额',
|
|
15604
16027
|
render: function render(val, record) {
|
|
15605
|
-
return (record.qty || 0) * (+record.salePrice || 0);
|
|
16028
|
+
return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
|
|
15606
16029
|
}
|
|
15607
16030
|
}, {
|
|
15608
16031
|
dataIndex: 'isGift',
|
|
@@ -15642,6 +16065,104 @@ var getColumns$5 = function getColumns() {
|
|
|
15642
16065
|
};
|
|
15643
16066
|
|
|
15644
16067
|
var getColumns$6 = function getColumns(_ref) {
|
|
16068
|
+
var _ref$text = _ref.text,
|
|
16069
|
+
disabled = _ref.disabled,
|
|
16070
|
+
updateHandle = _ref.updateHandle;
|
|
16071
|
+
return {
|
|
16072
|
+
KM_GOODS: [{
|
|
16073
|
+
dataIndex: 'sysSkuPropertiesName',
|
|
16074
|
+
title: "\u89C4\u683C\u540D\u79F0",
|
|
16075
|
+
width: 250
|
|
16076
|
+
}, {
|
|
16077
|
+
dataIndex: 'sysTitle',
|
|
16078
|
+
title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
|
|
16079
|
+
width: 150
|
|
16080
|
+
}, {
|
|
16081
|
+
dataIndex: 'title',
|
|
16082
|
+
title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
|
|
16083
|
+
width: 150
|
|
16084
|
+
}, {
|
|
16085
|
+
dataIndex: 'shortTitle',
|
|
16086
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
16087
|
+
width: 150
|
|
16088
|
+
}, {
|
|
16089
|
+
dataIndex: 'sysOuterId',
|
|
16090
|
+
title: "\u7CFB\u7EDF\u5546\u5BB6\u7F16\u7801",
|
|
16091
|
+
width: 150
|
|
16092
|
+
}, {
|
|
16093
|
+
dataIndex: 'outerId',
|
|
16094
|
+
title: "\u5546\u5BB6\u7F16\u7801",
|
|
16095
|
+
width: 150
|
|
16096
|
+
}, {
|
|
16097
|
+
dataIndex: 'skuSysId',
|
|
16098
|
+
title: "\u7CFB\u7EDF\u89C4\u683CID",
|
|
16099
|
+
width: 150
|
|
16100
|
+
}, {
|
|
16101
|
+
dataIndex: 'itemSysId',
|
|
16102
|
+
title: "\u7CFB\u7EDF\u5546\u54C1ID",
|
|
16103
|
+
width: 150
|
|
16104
|
+
}, {
|
|
16105
|
+
dataIndex: 'sysPicPath',
|
|
16106
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
16107
|
+
width: 100,
|
|
16108
|
+
render: function render(val) {
|
|
16109
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
16110
|
+
width: 60,
|
|
16111
|
+
src: val
|
|
16112
|
+
});
|
|
16113
|
+
}
|
|
16114
|
+
}, {
|
|
16115
|
+
dataIndex: 'num',
|
|
16116
|
+
title: "\u6570\u91CF",
|
|
16117
|
+
width: 100,
|
|
16118
|
+
render: function render(val, record, index) {
|
|
16119
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
16120
|
+
style: {
|
|
16121
|
+
width: 70
|
|
16122
|
+
},
|
|
16123
|
+
value: val,
|
|
16124
|
+
min: 1,
|
|
16125
|
+
precision: 0,
|
|
16126
|
+
onChange: function onChange(num) {
|
|
16127
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'num');
|
|
16128
|
+
}
|
|
16129
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
16130
|
+
}
|
|
16131
|
+
}, {
|
|
16132
|
+
dataIndex: 'payment',
|
|
16133
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
16134
|
+
width: 150,
|
|
16135
|
+
render: function render(val, record, index) {
|
|
16136
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
16137
|
+
style: {
|
|
16138
|
+
width: 130
|
|
16139
|
+
},
|
|
16140
|
+
value: val,
|
|
16141
|
+
min: 0,
|
|
16142
|
+
precision: 2,
|
|
16143
|
+
onChange: function onChange(num) {
|
|
16144
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'payment');
|
|
16145
|
+
}
|
|
16146
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
16147
|
+
}
|
|
16148
|
+
}, {
|
|
16149
|
+
dataIndex: 'price',
|
|
16150
|
+
title: "\u5546\u54C1\u9500\u552E\u4EF7",
|
|
16151
|
+
width: 150
|
|
16152
|
+
}, {
|
|
16153
|
+
dataIndex: 'type',
|
|
16154
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
16155
|
+
width: 150
|
|
16156
|
+
}].map(function (item) {
|
|
16157
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16158
|
+
align: 'center',
|
|
16159
|
+
ellipsis: true
|
|
16160
|
+
});
|
|
16161
|
+
})
|
|
16162
|
+
};
|
|
16163
|
+
};
|
|
16164
|
+
|
|
16165
|
+
var getColumns$7 = function getColumns(_ref) {
|
|
15645
16166
|
var _ref$text = _ref.text,
|
|
15646
16167
|
text = _ref$text === void 0 ? '' : _ref$text,
|
|
15647
16168
|
disabled = _ref.disabled,
|
|
@@ -15754,7 +16275,7 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
15754
16275
|
disabled = _ref.disabled,
|
|
15755
16276
|
updateHandle = _ref.updateHandle,
|
|
15756
16277
|
updateDataHandle = _ref.updateDataHandle;
|
|
15757
|
-
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
16278
|
+
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
15758
16279
|
text: text,
|
|
15759
16280
|
disabled: disabled,
|
|
15760
16281
|
updateHandle: updateHandle
|
|
@@ -15779,8 +16300,12 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
15779
16300
|
text: text,
|
|
15780
16301
|
disabled: disabled,
|
|
15781
16302
|
updateHandle: updateHandle
|
|
16303
|
+
})), getColumns$6({
|
|
16304
|
+
text: text,
|
|
16305
|
+
disabled: disabled,
|
|
16306
|
+
updateHandle: updateHandle
|
|
15782
16307
|
})), {}, {
|
|
15783
|
-
default: getColumns$
|
|
16308
|
+
default: getColumns$7({
|
|
15784
16309
|
text: text,
|
|
15785
16310
|
disabled: disabled,
|
|
15786
16311
|
updateHandle: updateHandle
|
|
@@ -15932,6 +16457,222 @@ function HoverTableRowDeleteIcon(_ref) {
|
|
|
15932
16457
|
})));
|
|
15933
16458
|
}
|
|
15934
16459
|
|
|
16460
|
+
var isErpType = {
|
|
16461
|
+
isWdt: function isWdt(type) {
|
|
16462
|
+
return ['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type);
|
|
16463
|
+
},
|
|
16464
|
+
isBsE3: function isBsE3(type) {
|
|
16465
|
+
return ['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type);
|
|
16466
|
+
},
|
|
16467
|
+
isGy: function isGy(type) {
|
|
16468
|
+
return ['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type);
|
|
16469
|
+
},
|
|
16470
|
+
isJst: function isJst(type) {
|
|
16471
|
+
return ['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type);
|
|
16472
|
+
},
|
|
16473
|
+
isKm: function isKm(type) {
|
|
16474
|
+
return ['KM_GOODS'].includes(type);
|
|
16475
|
+
}
|
|
16476
|
+
};
|
|
16477
|
+
var processGoods = function processGoods(_ref) {
|
|
16478
|
+
var list = _ref.list,
|
|
16479
|
+
type = _ref.type,
|
|
16480
|
+
canUpdateNumber = _ref.canUpdateNumber;
|
|
16481
|
+
var newList = [];
|
|
16482
|
+
// 根据商品类型处理数据
|
|
16483
|
+
if (isErpType.isWdt(type)) {
|
|
16484
|
+
newList = processWdtGoods({
|
|
16485
|
+
list: list,
|
|
16486
|
+
type: type,
|
|
16487
|
+
canUpdateNumber: canUpdateNumber
|
|
16488
|
+
});
|
|
16489
|
+
} else if (isErpType.isBsE3(type)) {
|
|
16490
|
+
newList = processBsE3Goods({
|
|
16491
|
+
list: list,
|
|
16492
|
+
type: type,
|
|
16493
|
+
canUpdateNumber: canUpdateNumber
|
|
16494
|
+
});
|
|
16495
|
+
} else if (isErpType.isGy(type)) {
|
|
16496
|
+
newList = processGyGoods({
|
|
16497
|
+
list: list,
|
|
16498
|
+
type: type,
|
|
16499
|
+
canUpdateNumber: canUpdateNumber
|
|
16500
|
+
});
|
|
16501
|
+
} else if (isErpType.isJst(type)) {
|
|
16502
|
+
newList = processJstGoods({
|
|
16503
|
+
list: list,
|
|
16504
|
+
type: type,
|
|
16505
|
+
canUpdateNumber: canUpdateNumber
|
|
16506
|
+
});
|
|
16507
|
+
} else if (isErpType.isKm(type)) {
|
|
16508
|
+
newList = processKmGoods({
|
|
16509
|
+
list: list,
|
|
16510
|
+
type: type,
|
|
16511
|
+
canUpdateNumber: canUpdateNumber
|
|
16512
|
+
});
|
|
16513
|
+
} else {
|
|
16514
|
+
newList = processDefaultGoods({
|
|
16515
|
+
list: list,
|
|
16516
|
+
type: type,
|
|
16517
|
+
canUpdateNumber: canUpdateNumber
|
|
16518
|
+
});
|
|
16519
|
+
}
|
|
16520
|
+
return newList;
|
|
16521
|
+
};
|
|
16522
|
+
// 处理不同类型的商品数据
|
|
16523
|
+
var processWdtGoods = function processWdtGoods(_ref2) {
|
|
16524
|
+
var list = _ref2.list,
|
|
16525
|
+
type = _ref2.type,
|
|
16526
|
+
canUpdateNumber = _ref2.canUpdateNumber;
|
|
16527
|
+
return list.map(function (item) {
|
|
16528
|
+
var processedItem = _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16529
|
+
uuid: uuid(),
|
|
16530
|
+
canDelete: true,
|
|
16531
|
+
num: 1,
|
|
16532
|
+
orderPrice: 0,
|
|
16533
|
+
sharePrice: 0,
|
|
16534
|
+
canUpdateNumber: canUpdateNumber
|
|
16535
|
+
});
|
|
16536
|
+
// 特殊处理换货商品
|
|
16537
|
+
if (type === 'WDT_EXCHANGE_GOODS') {
|
|
16538
|
+
processedItem.price = item.retailPrice;
|
|
16539
|
+
processedItem.type = '1';
|
|
16540
|
+
}
|
|
16541
|
+
return processedItem;
|
|
16542
|
+
});
|
|
16543
|
+
};
|
|
16544
|
+
var processBsE3Goods = function processBsE3Goods(_ref3) {
|
|
16545
|
+
var list = _ref3.list,
|
|
16546
|
+
canUpdateNumber = _ref3.canUpdateNumber;
|
|
16547
|
+
return list.map(function (item) {
|
|
16548
|
+
var specNo = item.specNo,
|
|
16549
|
+
specId = item.specId,
|
|
16550
|
+
goodName = item.goodName,
|
|
16551
|
+
goodShortName = item.goodShortName,
|
|
16552
|
+
goodPicUrl = item.goodPicUrl,
|
|
16553
|
+
goodNo = item.goodNo,
|
|
16554
|
+
goodId = item.goodId,
|
|
16555
|
+
retailPrice = item.retailPrice;
|
|
16556
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16557
|
+
sku: specNo,
|
|
16558
|
+
skuId: specId,
|
|
16559
|
+
goodsName: goodName,
|
|
16560
|
+
goodsShortName: goodShortName,
|
|
16561
|
+
picPath: goodPicUrl,
|
|
16562
|
+
goodsSn: goodNo,
|
|
16563
|
+
goodsId: goodId,
|
|
16564
|
+
goodsPrice: retailPrice,
|
|
16565
|
+
shopPrice: retailPrice,
|
|
16566
|
+
sharePayment: '',
|
|
16567
|
+
sharePrice: '',
|
|
16568
|
+
payment: '',
|
|
16569
|
+
tcSku: '',
|
|
16570
|
+
tcGoodsNumber: '',
|
|
16571
|
+
taoCanSingleSl: '',
|
|
16572
|
+
isGift: '',
|
|
16573
|
+
uuid: uuid(),
|
|
16574
|
+
canDelete: true,
|
|
16575
|
+
canEdit: true,
|
|
16576
|
+
goodsNumber: 1,
|
|
16577
|
+
canUpdateNumber: canUpdateNumber
|
|
16578
|
+
});
|
|
16579
|
+
});
|
|
16580
|
+
};
|
|
16581
|
+
var processGyGoods = function processGyGoods(_ref4) {
|
|
16582
|
+
var list = _ref4.list;
|
|
16583
|
+
return list.map(function (item) {
|
|
16584
|
+
var goodName = item.goodName,
|
|
16585
|
+
goodShortName = item.goodShortName,
|
|
16586
|
+
goodNo = item.goodNo,
|
|
16587
|
+
specName = item.specName,
|
|
16588
|
+
specNo = item.specNo,
|
|
16589
|
+
retailPrice = item.retailPrice;
|
|
16590
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16591
|
+
uuid: uuid(),
|
|
16592
|
+
canDelete: true,
|
|
16593
|
+
canEdit: true,
|
|
16594
|
+
qty: 1,
|
|
16595
|
+
goodName: goodName,
|
|
16596
|
+
goodShortName: goodShortName,
|
|
16597
|
+
goodNo: goodNo,
|
|
16598
|
+
specName: specName,
|
|
16599
|
+
specNo: specNo,
|
|
16600
|
+
originPrice: !isNull(retailPrice) ? Number(retailPrice) : null,
|
|
16601
|
+
originAmount: !isNull(retailPrice) ? Number(retailPrice) : null
|
|
16602
|
+
});
|
|
16603
|
+
});
|
|
16604
|
+
};
|
|
16605
|
+
var processJstGoods = function processJstGoods(_ref5) {
|
|
16606
|
+
var list = _ref5.list;
|
|
16607
|
+
return list.map(function (item) {
|
|
16608
|
+
return {
|
|
16609
|
+
name: item.goodName,
|
|
16610
|
+
skuId: item.goodNo,
|
|
16611
|
+
iId: item.styleCode,
|
|
16612
|
+
pic: item.goodPicUrl,
|
|
16613
|
+
propertiesValue: item.propertiesValue,
|
|
16614
|
+
saleBasePrice: item.retailPrice,
|
|
16615
|
+
salePrice: item.retailPrice,
|
|
16616
|
+
remark: '',
|
|
16617
|
+
uuid: uuid(),
|
|
16618
|
+
canDelete: true,
|
|
16619
|
+
canEdit: true,
|
|
16620
|
+
qty: 1
|
|
16621
|
+
};
|
|
16622
|
+
});
|
|
16623
|
+
};
|
|
16624
|
+
var processKmGoods = function processKmGoods(_ref6) {
|
|
16625
|
+
var list = _ref6.list;
|
|
16626
|
+
return list.map(function (item) {
|
|
16627
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16628
|
+
sysSkuPropertiesName: item.specName,
|
|
16629
|
+
sysTitle: item.goodName,
|
|
16630
|
+
title: null,
|
|
16631
|
+
shortTitle: item.goodShortName,
|
|
16632
|
+
sysOuterId: item.goodNo,
|
|
16633
|
+
outerId: item.goodNo,
|
|
16634
|
+
skuSysId: item.specId,
|
|
16635
|
+
itemSysId: item.goodId,
|
|
16636
|
+
sysPicPath: item.goodPicUrl,
|
|
16637
|
+
payment: null,
|
|
16638
|
+
price: item.retailPrice,
|
|
16639
|
+
type: null,
|
|
16640
|
+
uuid: uuid(),
|
|
16641
|
+
canDelete: true,
|
|
16642
|
+
canEdit: true,
|
|
16643
|
+
num: 1
|
|
16644
|
+
});
|
|
16645
|
+
});
|
|
16646
|
+
};
|
|
16647
|
+
var processDefaultGoods = function processDefaultGoods(_ref7) {
|
|
16648
|
+
var list = _ref7.list,
|
|
16649
|
+
canUpdateNumber = _ref7.canUpdateNumber;
|
|
16650
|
+
return list.map(function (item) {
|
|
16651
|
+
var goodsId = item.goodsId,
|
|
16652
|
+
name = item.name,
|
|
16653
|
+
code = item.code,
|
|
16654
|
+
skuCode = item.skuCode,
|
|
16655
|
+
marketPrice = item.marketPrice,
|
|
16656
|
+
skuName = item.skuName;
|
|
16657
|
+
return {
|
|
16658
|
+
id: goodsId,
|
|
16659
|
+
mark: '是',
|
|
16660
|
+
pic: '',
|
|
16661
|
+
skuName: skuName,
|
|
16662
|
+
name: name,
|
|
16663
|
+
code: code,
|
|
16664
|
+
sku: skuCode,
|
|
16665
|
+
money: marketPrice || 0,
|
|
16666
|
+
share: marketPrice || 0,
|
|
16667
|
+
number: 1,
|
|
16668
|
+
type: '',
|
|
16669
|
+
uuid: uuid(),
|
|
16670
|
+
canDelete: true,
|
|
16671
|
+
canUpdateNumber: canUpdateNumber
|
|
16672
|
+
};
|
|
16673
|
+
});
|
|
16674
|
+
};
|
|
16675
|
+
|
|
15935
16676
|
var GoodsModalMap = {
|
|
15936
16677
|
WDT_REISSUE_GOODS: WdtGoodsModal,
|
|
15937
16678
|
WDT_GOODS: WdtGoodsModal,
|
|
@@ -15941,10 +16682,12 @@ var GoodsModalMap = {
|
|
|
15941
16682
|
BS_E3_EXCHANGE_GOODS: BsE3GoodsModal,
|
|
15942
16683
|
GY_GOODS: GyGoodsModal$2,
|
|
15943
16684
|
GY_REISSUE_GOODS: GyGoodsModal$2,
|
|
16685
|
+
GY_RETURN_GOODS: GyGoodsModal$2,
|
|
15944
16686
|
JST_GOODS: JstGoodsModal,
|
|
15945
16687
|
JST_REISSUE_GOODS: JstGoodsModal,
|
|
15946
16688
|
JST_RETURN_GOODS: JstGoodsModal,
|
|
15947
16689
|
JST_EXCHANGE_GOODS: JstGoodsModal,
|
|
16690
|
+
KM_GOODS: KmGoodsModal,
|
|
15948
16691
|
OTHER_GOODS: GoodsModal$2
|
|
15949
16692
|
};
|
|
15950
16693
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
@@ -15978,7 +16721,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
15978
16721
|
return item === null || item === void 0 ? void 0 : item[uniqueKey];
|
|
15979
16722
|
}));
|
|
15980
16723
|
var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
|
|
15981
|
-
console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
16724
|
+
// console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
15982
16725
|
onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
|
|
15983
16726
|
};
|
|
15984
16727
|
var rowSelection = {
|
|
@@ -16007,13 +16750,16 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
16007
16750
|
};
|
|
16008
16751
|
var getButtonText = function getButtonText() {
|
|
16009
16752
|
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
16753
|
+
if (['KM_GOODS'].includes(type)) {
|
|
16754
|
+
return '选择快麦ERP商品';
|
|
16755
|
+
}
|
|
16010
16756
|
if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
|
|
16011
16757
|
return '选择百胜ERP商品';
|
|
16012
16758
|
}
|
|
16013
16759
|
if (['WDT_REISSUE_GOODS'].includes(type)) {
|
|
16014
16760
|
return '选择旺店通商品';
|
|
16015
16761
|
}
|
|
16016
|
-
if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
|
|
16762
|
+
if (['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type)) {
|
|
16017
16763
|
return '选择管易ERP商品';
|
|
16018
16764
|
}
|
|
16019
16765
|
if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
|
|
@@ -16150,6 +16896,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
16150
16896
|
case 'JST_RETURN_GOODS':
|
|
16151
16897
|
case 'GY_REISSUE_GOODS':
|
|
16152
16898
|
case 'GY_RETURN_GOODS':
|
|
16899
|
+
case 'KM_GOODS':
|
|
16153
16900
|
{
|
|
16154
16901
|
columns = getColumnsMap$1({
|
|
16155
16902
|
text: text,
|
|
@@ -16267,120 +17014,11 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
16267
17014
|
}].concat(_toConsumableArray(columns));
|
|
16268
17015
|
}, []);
|
|
16269
17016
|
var onSubmit = function onSubmit(list) {
|
|
16270
|
-
var newList =
|
|
16271
|
-
|
|
16272
|
-
|
|
16273
|
-
|
|
16274
|
-
|
|
16275
|
-
item.num = 1;
|
|
16276
|
-
item.orderPrice = 0;
|
|
16277
|
-
item.sharePrice = 0;
|
|
16278
|
-
item.canUpdateNumber = canUpdateNumber;
|
|
16279
|
-
if (type === 'WDT_EXCHANGE_GOODS') {
|
|
16280
|
-
item.price = item.retailPrice;
|
|
16281
|
-
item.type = '1';
|
|
16282
|
-
}
|
|
16283
|
-
return item;
|
|
16284
|
-
});
|
|
16285
|
-
} else if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
|
|
16286
|
-
newList = list.map(function (item) {
|
|
16287
|
-
var specNo = item.specNo,
|
|
16288
|
-
specId = item.specId,
|
|
16289
|
-
goodName = item.goodName,
|
|
16290
|
-
goodShortName = item.goodShortName,
|
|
16291
|
-
goodPicUrl = item.goodPicUrl,
|
|
16292
|
-
goodNo = item.goodNo,
|
|
16293
|
-
goodId = item.goodId,
|
|
16294
|
-
retailPrice = item.retailPrice;
|
|
16295
|
-
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16296
|
-
sku: specNo,
|
|
16297
|
-
skuId: specId,
|
|
16298
|
-
goodsName: goodName,
|
|
16299
|
-
goodsShortName: goodShortName,
|
|
16300
|
-
picPath: goodPicUrl,
|
|
16301
|
-
goodsSn: goodNo,
|
|
16302
|
-
goodsId: goodId,
|
|
16303
|
-
goodsPrice: retailPrice,
|
|
16304
|
-
shopPrice: retailPrice,
|
|
16305
|
-
sharePayment: '',
|
|
16306
|
-
sharePrice: '',
|
|
16307
|
-
payment: '',
|
|
16308
|
-
tcSku: '',
|
|
16309
|
-
tcGoodsNumber: '',
|
|
16310
|
-
taoCanSingleSl: '',
|
|
16311
|
-
isGift: '',
|
|
16312
|
-
uuid: uuid(),
|
|
16313
|
-
canDelete: true,
|
|
16314
|
-
canEdit: true,
|
|
16315
|
-
goodsNumber: 1,
|
|
16316
|
-
canUpdateNumber: canUpdateNumber
|
|
16317
|
-
});
|
|
16318
|
-
});
|
|
16319
|
-
} else if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
|
|
16320
|
-
newList = list.map(function (item) {
|
|
16321
|
-
var goodName = item.goodName,
|
|
16322
|
-
goodShortName = item.goodShortName,
|
|
16323
|
-
goodNo = item.goodNo,
|
|
16324
|
-
specName = item.specName,
|
|
16325
|
-
specNo = item.specNo,
|
|
16326
|
-
retailPrice = item.retailPrice;
|
|
16327
|
-
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16328
|
-
uuid: uuid(),
|
|
16329
|
-
canDelete: true,
|
|
16330
|
-
canEdit: true,
|
|
16331
|
-
qty: 1,
|
|
16332
|
-
goodName: goodName,
|
|
16333
|
-
goodShortName: goodShortName,
|
|
16334
|
-
goodNo: goodNo,
|
|
16335
|
-
specName: specName,
|
|
16336
|
-
specNo: specNo,
|
|
16337
|
-
originPrice: !isNull(retailPrice) ? Number(retailPrice) : null,
|
|
16338
|
-
originAmount: !isNull(retailPrice) ? Number(retailPrice) : null
|
|
16339
|
-
});
|
|
16340
|
-
});
|
|
16341
|
-
} else if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
|
|
16342
|
-
newList = list.map(function (item) {
|
|
16343
|
-
return {
|
|
16344
|
-
name: item.goodName,
|
|
16345
|
-
skuId: item.goodNo,
|
|
16346
|
-
iId: item.styleCode,
|
|
16347
|
-
pic: item.goodPicUrl,
|
|
16348
|
-
propertiesValue: item.propertiesValue,
|
|
16349
|
-
saleBasePrice: item.retailPrice,
|
|
16350
|
-
salePrice: item.retailPrice,
|
|
16351
|
-
remark: '',
|
|
16352
|
-
uuid: uuid(),
|
|
16353
|
-
canDelete: true,
|
|
16354
|
-
canEdit: true,
|
|
16355
|
-
qty: 1
|
|
16356
|
-
};
|
|
16357
|
-
});
|
|
16358
|
-
} else {
|
|
16359
|
-
newList = list.map(function (item) {
|
|
16360
|
-
var goodsId = item.goodsId,
|
|
16361
|
-
name = item.name,
|
|
16362
|
-
code = item.code,
|
|
16363
|
-
skuCode = item.skuCode,
|
|
16364
|
-
marketPrice = item.marketPrice,
|
|
16365
|
-
skuName = item.skuName;
|
|
16366
|
-
return {
|
|
16367
|
-
id: goodsId,
|
|
16368
|
-
mark: '是',
|
|
16369
|
-
pic: '',
|
|
16370
|
-
skuName: skuName,
|
|
16371
|
-
name: name,
|
|
16372
|
-
code: code,
|
|
16373
|
-
sku: skuCode,
|
|
16374
|
-
money: marketPrice || 0,
|
|
16375
|
-
share: marketPrice || 0,
|
|
16376
|
-
number: 1,
|
|
16377
|
-
type: '',
|
|
16378
|
-
uuid: uuid(),
|
|
16379
|
-
canDelete: true,
|
|
16380
|
-
canUpdateNumber: canUpdateNumber
|
|
16381
|
-
};
|
|
16382
|
-
});
|
|
16383
|
-
}
|
|
17017
|
+
var newList = processGoods({
|
|
17018
|
+
list: list,
|
|
17019
|
+
canUpdateNumber: canUpdateNumber,
|
|
17020
|
+
type: type
|
|
17021
|
+
});
|
|
16384
17022
|
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), _toConsumableArray(newList)));
|
|
16385
17023
|
};
|
|
16386
17024
|
var onSelectChange = function onSelectChange(newSelectedRowKeys) {
|
|
@@ -17094,10 +17732,12 @@ var getWdtOrderListSingleton = function getWdtOrderListSingleton(orderNo) {
|
|
|
17094
17732
|
var _data$data, _data$data$trades;
|
|
17095
17733
|
if (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$trades = _data$data.trades) === null || _data$data$trades === void 0 ? void 0 : _data$data$trades.length) {
|
|
17096
17734
|
data.data.trades = filterWdtOrders(data === null || data === void 0 ? void 0 : data.data, orderNo).map(function (item) {
|
|
17735
|
+
var _tradeStatusMap$data$;
|
|
17097
17736
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
17098
17737
|
billNo: item.tradeNo,
|
|
17099
17738
|
billType: WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
17100
|
-
billTag: item.tagName
|
|
17739
|
+
billTag: item.tagName,
|
|
17740
|
+
tradeStatusValue: tradeStatusMap === null || tradeStatusMap === void 0 ? void 0 : (_tradeStatusMap$data$ = tradeStatusMap[data.data.version]) === null || _tradeStatusMap$data$ === void 0 ? void 0 : _tradeStatusMap$data$[item.tradeStatus]
|
|
17101
17741
|
});
|
|
17102
17742
|
});
|
|
17103
17743
|
}
|
|
@@ -17340,7 +17980,6 @@ var index$3 = (function (props) {
|
|
|
17340
17980
|
} else if (type === 'BS_E3_SYSTEM_ORDER') {
|
|
17341
17981
|
getBsE3OrderList(value.orderNo);
|
|
17342
17982
|
} else if (type === 'GY_SYSTEM_ORDER') {
|
|
17343
|
-
console.log('触发gy--getGyOrderList--1');
|
|
17344
17983
|
getGyOrderList(value.orderNo);
|
|
17345
17984
|
} else if (type === 'JST_SYSTEM_ORDER') {
|
|
17346
17985
|
getJstOrderList(value.orderNo);
|
|
@@ -17454,11 +18093,13 @@ var index$3 = (function (props) {
|
|
|
17454
18093
|
showOrderInfo: trades.map(function (_ref4) {
|
|
17455
18094
|
var billNo = _ref4.billNo,
|
|
17456
18095
|
billType = _ref4.billType,
|
|
17457
|
-
billTag = _ref4.billTag
|
|
18096
|
+
billTag = _ref4.billTag,
|
|
18097
|
+
tradeStatusValue = _ref4.tradeStatusValue;
|
|
17458
18098
|
return {
|
|
17459
18099
|
billNo: billNo,
|
|
17460
18100
|
billType: billType,
|
|
17461
|
-
billTag: billTag
|
|
18101
|
+
billTag: billTag,
|
|
18102
|
+
tradeStatusValue: tradeStatusValue
|
|
17462
18103
|
};
|
|
17463
18104
|
})
|
|
17464
18105
|
}));
|
|
@@ -17768,6 +18409,31 @@ var componentMap$1 = {
|
|
|
17768
18409
|
returnDeleteGood: 'jstReturnDeleteGood',
|
|
17769
18410
|
exchangeDeleteGood: 'jstExchangeDeleteGood'
|
|
17770
18411
|
}
|
|
18412
|
+
},
|
|
18413
|
+
KM_GOODS: {
|
|
18414
|
+
type: 'km',
|
|
18415
|
+
key: 'kmGoods',
|
|
18416
|
+
name: '快麦',
|
|
18417
|
+
orderNo: 'tid',
|
|
18418
|
+
goodDetailOrderNo: 'originalDealCode',
|
|
18419
|
+
eventNameMap: {
|
|
18420
|
+
// pubsub 事件
|
|
18421
|
+
type: 'kmType',
|
|
18422
|
+
updateGoodsHandle: updateKmGoodsHandle,
|
|
18423
|
+
selectListReturn: 'kmSelectListReturn',
|
|
18424
|
+
selectList: 'kmSelectList',
|
|
18425
|
+
reissueSelectList: 'kmReissueSelectList',
|
|
18426
|
+
reissueSelectListReturn: 'kmReissueSelectListReturn',
|
|
18427
|
+
reissueDeleteGood: 'kmReissueDeleteGood',
|
|
18428
|
+
changeShopCode: 'kmChangeShopCode',
|
|
18429
|
+
reissueType: 'kmReissueType',
|
|
18430
|
+
returnType: 'kmReturnType',
|
|
18431
|
+
returnSelectListReturn: 'kmReturnSelectListReturn',
|
|
18432
|
+
returnSelectList: 'kmReturnSelectList',
|
|
18433
|
+
deleteGood: 'kmDeleteGood',
|
|
18434
|
+
returnDeleteGood: 'kmReturnDeleteGood',
|
|
18435
|
+
exchangeDeleteGood: 'kmExchangeDeleteGood'
|
|
18436
|
+
}
|
|
17771
18437
|
}
|
|
17772
18438
|
};
|
|
17773
18439
|
var CommonGoods = function CommonGoods(props) {
|
|
@@ -17776,7 +18442,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
17776
18442
|
disabled = props.disabled,
|
|
17777
18443
|
onChange = props.onChange,
|
|
17778
18444
|
compType = props.type;
|
|
17779
|
-
console.log('value?.orders', value
|
|
18445
|
+
// console.log('value?.orders', value?.orders);
|
|
17780
18446
|
// 合并单订单会包含","
|
|
17781
18447
|
var showModeBtn = !['BS_E3_GOODS'].includes(compType) && ((value === null || value === void 0 ? void 0 : value.orders) || []).some(function (order) {
|
|
17782
18448
|
var _order$componentMap$c;
|
|
@@ -17983,7 +18649,8 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
17983
18649
|
_props$reasonList = props.reasonList,
|
|
17984
18650
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
17985
18651
|
disabled = props.disabled,
|
|
17986
|
-
compType = props.type
|
|
18652
|
+
compType = props.type,
|
|
18653
|
+
isSettingConfig = props.isSettingConfig;
|
|
17987
18654
|
var valueRef = useRef({});
|
|
17988
18655
|
useEffect(function () {
|
|
17989
18656
|
var subscription = pubsub.subscribe(componentMap$2[compType].eventNameMap.exchangeCopyGood, function () {
|
|
@@ -18075,7 +18742,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
18075
18742
|
var newValue = _objectSpread2({}, value);
|
|
18076
18743
|
newValue[componentMap$2[compType].returnTypeKey] = val;
|
|
18077
18744
|
newValue[componentMap$2[compType].valueKey] = [];
|
|
18078
|
-
if (['2'].includes(val[0])) {
|
|
18745
|
+
if (isSettingConfig || ['2'].includes(val[0])) {
|
|
18079
18746
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18080
18747
|
valueRef.current = newValue;
|
|
18081
18748
|
}
|
|
@@ -18097,7 +18764,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
18097
18764
|
style: {
|
|
18098
18765
|
marginBottom: '8px'
|
|
18099
18766
|
},
|
|
18100
|
-
disabled: disabled,
|
|
18767
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
18101
18768
|
allowClear: false,
|
|
18102
18769
|
options: reasonList,
|
|
18103
18770
|
value: value === null || value === void 0 ? void 0 : value[componentMap$2[compType].returnTypeKey],
|
|
@@ -18279,7 +18946,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
18279
18946
|
})));
|
|
18280
18947
|
};
|
|
18281
18948
|
|
|
18282
|
-
var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
18949
|
+
var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
|
|
18283
18950
|
var typeMap$1 = {
|
|
18284
18951
|
WDT_REISSUE_GOODS: {
|
|
18285
18952
|
key: 'wdtReissueGoods',
|
|
@@ -18300,13 +18967,14 @@ var typeMap$1 = {
|
|
|
18300
18967
|
}
|
|
18301
18968
|
};
|
|
18302
18969
|
var wdtReissue = function wdtReissue(props) {
|
|
18303
|
-
var _value$wdtSystemOrder, _typeMap$
|
|
18970
|
+
var _value$wdtSystemOrder, _typeMap$type23, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s5, _typeMap$type27, _typeMap$type28, _typeMap$type29;
|
|
18304
18971
|
var value = props.value,
|
|
18305
18972
|
onChange = props.onChange,
|
|
18306
18973
|
_props$reasonList = props.reasonList,
|
|
18307
18974
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
18308
18975
|
disabled = props.disabled,
|
|
18309
18976
|
type = props.type,
|
|
18977
|
+
isSettingConfig = props.isSettingConfig,
|
|
18310
18978
|
other = _objectWithoutProperties(props, _excluded$i);
|
|
18311
18979
|
var showModeBtn = ((value === null || value === void 0 ? void 0 : (_value$wdtSystemOrder = value.wdtSystemOrder) === null || _value$wdtSystemOrder === void 0 ? void 0 : _value$wdtSystemOrder.orders) || []).some(function (order) {
|
|
18312
18980
|
var _order$srcTid;
|
|
@@ -18370,11 +19038,13 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18370
19038
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
18371
19039
|
var billNo = _ref2.billNo,
|
|
18372
19040
|
billType = _ref2.billType,
|
|
18373
|
-
billTag = _ref2.billTag
|
|
19041
|
+
billTag = _ref2.billTag,
|
|
19042
|
+
tradeStatusValue = _ref2.tradeStatusValue;
|
|
18374
19043
|
return {
|
|
18375
19044
|
billNo: billNo,
|
|
18376
19045
|
billType: billType,
|
|
18377
|
-
billTag: billTag
|
|
19046
|
+
billTag: billTag,
|
|
19047
|
+
tradeStatusValue: tradeStatusValue
|
|
18378
19048
|
};
|
|
18379
19049
|
});
|
|
18380
19050
|
onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, _defineProperty({}, (_typeMap$type5 = typeMap$1[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, ((_ref3 = valueRef.current || {}) === null || _ref3 === void 0 ? void 0 : _ref3[(_typeMap$type6 = typeMap$1[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]) || {}), {}, {
|
|
@@ -18457,7 +19127,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18457
19127
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18458
19128
|
};
|
|
18459
19129
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
18460
|
-
var _typeMap$type21, _typeMap$type22, _uniqBy
|
|
19130
|
+
var _typeMap$type21, _typeMap$type22, _uniqBy;
|
|
18461
19131
|
var newValue = _objectSpread2({}, value);
|
|
18462
19132
|
// 原订单商品
|
|
18463
19133
|
var originTradeGoodList = getGoodDetails({
|
|
@@ -18468,14 +19138,14 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18468
19138
|
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type22 = typeMap$1[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
18469
19139
|
return skuList.includes(item.uuid);
|
|
18470
19140
|
});
|
|
18471
|
-
console.log('商品发生变化', newValue[
|
|
19141
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
18472
19142
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18473
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19143
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)], isStrict]);
|
|
18474
19144
|
//显示选择商品按钮 原单换不显示选择商品
|
|
18475
19145
|
var showChangeBtn = useMemo(function () {
|
|
18476
|
-
var _typeMap$
|
|
18477
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
18478
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19146
|
+
var _typeMap$type24;
|
|
19147
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo]);
|
|
19148
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]]);
|
|
18479
19149
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
18480
19150
|
gutter: 8,
|
|
18481
19151
|
wrap: true
|
|
@@ -18493,12 +19163,12 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18493
19163
|
},
|
|
18494
19164
|
disabled: disabled,
|
|
18495
19165
|
allowClear: false,
|
|
18496
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19166
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo)],
|
|
18497
19167
|
onChange: function onChange(val) {
|
|
18498
19168
|
return changeSystemOrderHandle(val);
|
|
18499
19169
|
},
|
|
18500
19170
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
18501
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
19171
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
18502
19172
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
18503
19173
|
key: item.billNo,
|
|
18504
19174
|
value: item.billNo,
|
|
@@ -18516,10 +19186,10 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18516
19186
|
style: {
|
|
18517
19187
|
marginBottom: '8px'
|
|
18518
19188
|
},
|
|
18519
|
-
disabled: disabled,
|
|
19189
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
18520
19190
|
allowClear: false,
|
|
18521
19191
|
options: reasonList,
|
|
18522
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19192
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.typeName)],
|
|
18523
19193
|
onChange: function onChange(val) {
|
|
18524
19194
|
return changeTypeHandle(val);
|
|
18525
19195
|
}
|
|
@@ -18531,7 +19201,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18531
19201
|
canUpdateNumber: showChangeBtn,
|
|
18532
19202
|
showChangeBtn: showChangeBtn,
|
|
18533
19203
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18534
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19204
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type29 = typeMap$1[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)],
|
|
18535
19205
|
onChange: function onChange(val) {
|
|
18536
19206
|
return changeGoodHandle(val);
|
|
18537
19207
|
},
|
|
@@ -18547,7 +19217,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18547
19217
|
})));
|
|
18548
19218
|
};
|
|
18549
19219
|
|
|
18550
|
-
var _excluded$j = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
19220
|
+
var _excluded$j = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
|
|
18551
19221
|
var typeMap$2 = {
|
|
18552
19222
|
JST_REISSUE_GOODS: {
|
|
18553
19223
|
compType: '补发',
|
|
@@ -18595,6 +19265,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18595
19265
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
18596
19266
|
disabled = props.disabled,
|
|
18597
19267
|
type = props.type,
|
|
19268
|
+
isSettingConfig = props.isSettingConfig,
|
|
18598
19269
|
other = _objectWithoutProperties(props, _excluded$j);
|
|
18599
19270
|
var getOrderFlag = useRef(false);
|
|
18600
19271
|
var _useState = useState(false),
|
|
@@ -18803,7 +19474,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18803
19474
|
style: {
|
|
18804
19475
|
marginBottom: '8px'
|
|
18805
19476
|
},
|
|
18806
|
-
disabled: disabled,
|
|
19477
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
18807
19478
|
allowClear: false,
|
|
18808
19479
|
options: reasonList,
|
|
18809
19480
|
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type39 = typeMap$2[type]) === null || _typeMap$type39 === void 0 ? void 0 : _typeMap$type39.typeName)],
|
|
@@ -19603,6 +20274,39 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
19603
20274
|
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
|
|
19604
20275
|
};
|
|
19605
20276
|
|
|
20277
|
+
var _excluded$n = ["showOnly", "getOptionsAsync"];
|
|
20278
|
+
var AsyncSelect = function AsyncSelect(props) {
|
|
20279
|
+
var _props$showOnly = props.showOnly,
|
|
20280
|
+
showOnly = _props$showOnly === void 0 ? false : _props$showOnly,
|
|
20281
|
+
getOptionsAsync = props.getOptionsAsync,
|
|
20282
|
+
otherProps = _objectWithoutProperties(props, _excluded$n);
|
|
20283
|
+
var _React$useState = React.useState([]),
|
|
20284
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
20285
|
+
data = _React$useState2[0],
|
|
20286
|
+
setData = _React$useState2[1];
|
|
20287
|
+
React.useEffect(function () {
|
|
20288
|
+
getOptionsAsync === null || getOptionsAsync === void 0 ? void 0 : getOptionsAsync().then(function (list) {
|
|
20289
|
+
setData(list);
|
|
20290
|
+
});
|
|
20291
|
+
}, []);
|
|
20292
|
+
var options = [].concat(_toConsumableArray(props.options || []), _toConsumableArray(data || []));
|
|
20293
|
+
if (showOnly) {
|
|
20294
|
+
var selectedItem = options.find(function (option) {
|
|
20295
|
+
return option.value === props.value;
|
|
20296
|
+
});
|
|
20297
|
+
return selectedItem ? selectedItem.label : props.value;
|
|
20298
|
+
}
|
|
20299
|
+
return /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({
|
|
20300
|
+
showSearch: true,
|
|
20301
|
+
filterOption: function filterOption(input, option) {
|
|
20302
|
+
return option.label.includes(input);
|
|
20303
|
+
},
|
|
20304
|
+
notFoundContent: null
|
|
20305
|
+
}, otherProps), {}, {
|
|
20306
|
+
options: options
|
|
20307
|
+
}));
|
|
20308
|
+
};
|
|
20309
|
+
|
|
19606
20310
|
var CalculationInput = function CalculationInput(props) {
|
|
19607
20311
|
var _props$config = props.config,
|
|
19608
20312
|
config = _props$config === void 0 ? {} : _props$config;
|
|
@@ -19621,7 +20325,7 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
19621
20325
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
19622
20326
|
};
|
|
19623
20327
|
|
|
19624
|
-
var _excluded$
|
|
20328
|
+
var _excluded$o = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
|
|
19625
20329
|
var typeMap$3 = {
|
|
19626
20330
|
BS_E3_REISSUE_GOODS: {
|
|
19627
20331
|
key: 'bsE3ReissueGoods',
|
|
@@ -19639,7 +20343,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19639
20343
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
19640
20344
|
disabled = props.disabled,
|
|
19641
20345
|
type = props.type,
|
|
19642
|
-
|
|
20346
|
+
isSettingConfig = props.isSettingConfig,
|
|
20347
|
+
other = _objectWithoutProperties(props, _excluded$o);
|
|
19643
20348
|
var getOrderFlag = useRef(false);
|
|
19644
20349
|
var valueRef = useRef(null);
|
|
19645
20350
|
var _useState = useState(false),
|
|
@@ -19826,7 +20531,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19826
20531
|
style: {
|
|
19827
20532
|
marginBottom: '8px'
|
|
19828
20533
|
},
|
|
19829
|
-
disabled: disabled,
|
|
20534
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
19830
20535
|
allowClear: false,
|
|
19831
20536
|
options: reasonList,
|
|
19832
20537
|
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type27 = typeMap$3[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.typeName)],
|
|
@@ -19857,7 +20562,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19857
20562
|
})));
|
|
19858
20563
|
};
|
|
19859
20564
|
|
|
19860
|
-
var _excluded$
|
|
20565
|
+
var _excluded$p = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
|
|
19861
20566
|
_excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
19862
20567
|
var typeMap$4 = {
|
|
19863
20568
|
GY_REISSUE_GOODS: {
|
|
@@ -19879,14 +20584,15 @@ var typeMap$4 = {
|
|
|
19879
20584
|
}
|
|
19880
20585
|
};
|
|
19881
20586
|
var GyReissue = function GyReissue(props) {
|
|
19882
|
-
var _typeMap$type28, _typeMap$
|
|
20587
|
+
var _typeMap$type27, _typeMap$type28, _typeMap$type29, _systemOrder$orders, _typeMap$type30, _value$typeMap$type$s5, _typeMap$type31, _typeMap$type32, _typeMap$type33;
|
|
19883
20588
|
var value = props.value,
|
|
19884
20589
|
onChange = props.onChange,
|
|
19885
20590
|
_props$reasonList = props.reasonList,
|
|
19886
20591
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
19887
20592
|
disabled = props.disabled,
|
|
19888
20593
|
type = props.type,
|
|
19889
|
-
|
|
20594
|
+
isSettingConfig = props.isSettingConfig,
|
|
20595
|
+
other = _objectWithoutProperties(props, _excluded$p);
|
|
19890
20596
|
// const showModeBtn = (value?.gySystemOrder?.orders || []).some((order: any) =>
|
|
19891
20597
|
// order?.platformCode?.includes(';'),
|
|
19892
20598
|
// );
|
|
@@ -20034,7 +20740,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20034
20740
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20035
20741
|
};
|
|
20036
20742
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
20037
|
-
var _ref12, _typeMap$type25, _typeMap$type26, _uniqBy
|
|
20743
|
+
var _ref12, _typeMap$type25, _typeMap$type26, _uniqBy;
|
|
20038
20744
|
pushGyLog('beforeSelectedGoodsChange', valueRef.current || {});
|
|
20039
20745
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20040
20746
|
// 原订单商品
|
|
@@ -20046,21 +20752,15 @@ var GyReissue = function GyReissue(props) {
|
|
|
20046
20752
|
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type26 = typeMap$4[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
20047
20753
|
return skuList.includes(item.uuid);
|
|
20048
20754
|
});
|
|
20049
|
-
console.log('商品发生变化', newValue[
|
|
20755
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
20050
20756
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20051
20757
|
pushGyLog('afterSelectedGoodsChange', newValue);
|
|
20052
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20758
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type27 = typeMap$4[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.key)], isStrict]);
|
|
20053
20759
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
20054
|
-
var
|
|
20055
|
-
|
|
20056
|
-
|
|
20057
|
-
|
|
20058
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
20059
|
-
id: "TEST_GY",
|
|
20060
|
-
onClick: function onClick() {
|
|
20061
|
-
console.log('TEST_GY', value);
|
|
20062
|
-
}
|
|
20063
|
-
}, /*#__PURE__*/React.createElement(Row, {
|
|
20760
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$4[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrder];
|
|
20761
|
+
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type29 = typeMap$4[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo]);
|
|
20762
|
+
var showErpGoodsBtn = showChangeBtn || type === 'GY_REISSUE_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
|
|
20763
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Row, {
|
|
20064
20764
|
gutter: 8,
|
|
20065
20765
|
wrap: true
|
|
20066
20766
|
}, /*#__PURE__*/React.createElement(Col, {
|
|
@@ -20077,12 +20777,12 @@ var GyReissue = function GyReissue(props) {
|
|
|
20077
20777
|
},
|
|
20078
20778
|
disabled: disabled,
|
|
20079
20779
|
allowClear: false,
|
|
20080
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20780
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type30 = typeMap$4[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrderNo)],
|
|
20081
20781
|
onChange: function onChange(val) {
|
|
20082
20782
|
return changeSystemOrderHandle(val);
|
|
20083
20783
|
},
|
|
20084
20784
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
20085
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
20785
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type31 = typeMap$4[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
20086
20786
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
20087
20787
|
key: item.billNo,
|
|
20088
20788
|
value: item.billNo,
|
|
@@ -20100,10 +20800,10 @@ var GyReissue = function GyReissue(props) {
|
|
|
20100
20800
|
style: {
|
|
20101
20801
|
marginBottom: '8px'
|
|
20102
20802
|
},
|
|
20103
|
-
disabled: disabled,
|
|
20803
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
20104
20804
|
allowClear: false,
|
|
20105
20805
|
options: reasonList,
|
|
20106
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20806
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type32 = typeMap$4[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.typeName)],
|
|
20107
20807
|
onChange: function onChange(val) {
|
|
20108
20808
|
return changeTypeHandle(val);
|
|
20109
20809
|
}
|
|
@@ -20114,8 +20814,10 @@ var GyReissue = function GyReissue(props) {
|
|
|
20114
20814
|
disabled: disabled,
|
|
20115
20815
|
canUpdateNumber: showChangeBtn,
|
|
20116
20816
|
showChangeBtn: showChangeBtn,
|
|
20817
|
+
showErpGoodsBtn: showErpGoodsBtn,
|
|
20818
|
+
alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
|
|
20117
20819
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
20118
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20820
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type33 = typeMap$4[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.key)],
|
|
20119
20821
|
onChange: function onChange(val) {
|
|
20120
20822
|
return changeGoodHandle(val);
|
|
20121
20823
|
},
|
|
@@ -20130,7 +20832,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20130
20832
|
})));
|
|
20131
20833
|
};
|
|
20132
20834
|
|
|
20133
|
-
var _excluded$
|
|
20835
|
+
var _excluded$q = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
|
|
20134
20836
|
_excluded2$1 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
20135
20837
|
var typeMap$5 = {
|
|
20136
20838
|
GY_RETURN_GOODS: {
|
|
@@ -20152,14 +20854,15 @@ var typeMap$5 = {
|
|
|
20152
20854
|
}
|
|
20153
20855
|
};
|
|
20154
20856
|
var GyReturnGoods = function GyReturnGoods(props) {
|
|
20155
|
-
var _typeMap$
|
|
20857
|
+
var _typeMap$type9, _typeMap$type26, _systemOrder$orders, _typeMap$type27, _typeMap$type28, _value$typeMap$type$s5, _typeMap$type29, _typeMap$type30, _typeMap$type31;
|
|
20156
20858
|
var value = props.value,
|
|
20157
20859
|
onChange = props.onChange,
|
|
20158
20860
|
_props$reasonList = props.reasonList,
|
|
20159
20861
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
20160
20862
|
disabled = props.disabled,
|
|
20161
20863
|
type = props.type,
|
|
20162
|
-
|
|
20864
|
+
isSettingConfig = props.isSettingConfig,
|
|
20865
|
+
other = _objectWithoutProperties(props, _excluded$q);
|
|
20163
20866
|
var valueRef = useRef({});
|
|
20164
20867
|
var getOrderFlag = useRef(false);
|
|
20165
20868
|
var _useState = useState(false),
|
|
@@ -20260,7 +20963,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20260
20963
|
};
|
|
20261
20964
|
}();
|
|
20262
20965
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
20263
|
-
var _typeMap$type7, _typeMap$type8, _uniqBy
|
|
20966
|
+
var _typeMap$type7, _typeMap$type8, _uniqBy;
|
|
20264
20967
|
var newValue = _objectSpread2({}, value);
|
|
20265
20968
|
// 原订单商品
|
|
20266
20969
|
var originTradeGoodList = getGoodDetails({
|
|
@@ -20271,49 +20974,49 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20271
20974
|
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type8 = typeMap$5[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
20272
20975
|
return skuList.includes(item.uuid);
|
|
20273
20976
|
});
|
|
20274
|
-
console.log('商品发生变化', newValue[
|
|
20977
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
20275
20978
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20276
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20979
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type9 = typeMap$5[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key)], isStrict]);
|
|
20277
20980
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
20278
|
-
var _value$typeMap$type$t, _typeMap$
|
|
20981
|
+
var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
|
|
20279
20982
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
20280
|
-
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$
|
|
20983
|
+
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type10 = typeMap$5[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) return;
|
|
20281
20984
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
20282
20985
|
var newValue = _objectSpread2({}, value);
|
|
20283
|
-
newValue[(_typeMap$
|
|
20986
|
+
newValue[(_typeMap$type11 = typeMap$5[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName] = val;
|
|
20284
20987
|
if (typeName === '1') {
|
|
20285
|
-
var _typeMap$
|
|
20286
|
-
newValue[(_typeMap$
|
|
20988
|
+
var _typeMap$type12;
|
|
20989
|
+
newValue[(_typeMap$type12 = typeMap$5[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = getGoodDetails({
|
|
20287
20990
|
mode: isStrict
|
|
20288
20991
|
});
|
|
20289
20992
|
} else if (typeName === '2') {
|
|
20290
|
-
var _typeMap$
|
|
20993
|
+
var _typeMap$type13;
|
|
20291
20994
|
// 切换到非原单,清空列表
|
|
20292
|
-
newValue[(_typeMap$
|
|
20995
|
+
newValue[(_typeMap$type13 = typeMap$5[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = [];
|
|
20293
20996
|
}
|
|
20294
20997
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20295
20998
|
};
|
|
20296
20999
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
20297
|
-
var _typeMap$
|
|
21000
|
+
var _typeMap$type14;
|
|
20298
21001
|
var newValue = _objectSpread2({}, value);
|
|
20299
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20300
|
-
var _typeMap$
|
|
20301
|
-
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20302
|
-
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21002
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type14 = typeMap$5[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key)] = (val || []).map(function (item) {
|
|
21003
|
+
var _typeMap$type15, _typeMap$type16;
|
|
21004
|
+
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type15 = typeMap$5[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.formatDefaultField.money)] = 0;
|
|
21005
|
+
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type16 = typeMap$5[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.formatDefaultField.share)] = 0;
|
|
20303
21006
|
return item;
|
|
20304
21007
|
});
|
|
20305
21008
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20306
21009
|
};
|
|
20307
21010
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
20308
|
-
var _typeMap$
|
|
21011
|
+
var _typeMap$type17, _value$typeMap$type$t2, _typeMap$type18, _value$typeMap$type$t3, _typeMap$type20;
|
|
20309
21012
|
var newValue = _objectSpread2({}, value);
|
|
20310
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20311
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
20312
|
-
var _typeMap$
|
|
20313
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20314
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
20315
|
-
var _typeMap$
|
|
20316
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21013
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type17 = typeMap$5[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrderNo)] = val;
|
|
21014
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type18 = typeMap$5[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
|
|
21015
|
+
var _typeMap$type19;
|
|
21016
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type19 = typeMap$5[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = [];
|
|
21017
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type20 = typeMap$5[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
21018
|
+
var _typeMap$type21;
|
|
21019
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type21 = typeMap$5[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.key)] = getGoodDetails({
|
|
20317
21020
|
mode: isStrict,
|
|
20318
21021
|
sysOrderNo: val
|
|
20319
21022
|
});
|
|
@@ -20321,11 +21024,11 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20321
21024
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20322
21025
|
};
|
|
20323
21026
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
20324
|
-
var _typeMap$
|
|
21027
|
+
var _typeMap$type22, _typeMap$type23, _order$details;
|
|
20325
21028
|
var mode = _ref4.mode,
|
|
20326
21029
|
sysOrderNo = _ref4.sysOrderNo;
|
|
20327
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
20328
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
21030
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type22 = typeMap$5[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrder];
|
|
21031
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type23 = typeMap$5[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrderNo];
|
|
20329
21032
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
20330
21033
|
return order.code === systemOrderNo;
|
|
20331
21034
|
});
|
|
@@ -20336,19 +21039,18 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20336
21039
|
}) : goodDetails;
|
|
20337
21040
|
};
|
|
20338
21041
|
var handleModeChange = function handleModeChange(mode) {
|
|
20339
|
-
var _value$typeMap$type$t4, _typeMap$
|
|
20340
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$
|
|
21042
|
+
var _value$typeMap$type$t4, _typeMap$type24, _typeMap$type25;
|
|
21043
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type24 = typeMap$5[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0]) === '1';
|
|
20341
21044
|
setIsStrict(mode);
|
|
20342
21045
|
if (!isOriginalOrder) return;
|
|
20343
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$
|
|
21046
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type25 = typeMap$5[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key, getGoodDetails({
|
|
20344
21047
|
mode: mode
|
|
20345
21048
|
}))));
|
|
20346
21049
|
};
|
|
20347
21050
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
20348
|
-
var
|
|
20349
|
-
|
|
20350
|
-
|
|
20351
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$5[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
|
|
21051
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$5[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrder];
|
|
21052
|
+
var showErpGoodsBtn = type === 'GY_RETURN_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
|
|
21053
|
+
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$5[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
|
|
20352
21054
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
20353
21055
|
gutter: 8,
|
|
20354
21056
|
wrap: true
|
|
@@ -20366,12 +21068,12 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20366
21068
|
},
|
|
20367
21069
|
disabled: disabled,
|
|
20368
21070
|
allowClear: false,
|
|
20369
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21071
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type28 = typeMap$5[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo)],
|
|
20370
21072
|
onChange: function onChange(val) {
|
|
20371
21073
|
return changeSystemOrderHandle(val);
|
|
20372
21074
|
},
|
|
20373
21075
|
placeholder: "\u9009\u62E9\u9000\u8D27\u7684\u7CFB\u7EDF\u5355"
|
|
20374
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
21076
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type29 = typeMap$5[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
20375
21077
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
20376
21078
|
key: item.billNo,
|
|
20377
21079
|
value: item.billNo,
|
|
@@ -20389,10 +21091,10 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20389
21091
|
style: {
|
|
20390
21092
|
marginBottom: '8px'
|
|
20391
21093
|
},
|
|
20392
|
-
disabled: disabled,
|
|
21094
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
20393
21095
|
allowClear: false,
|
|
20394
21096
|
options: reasonList,
|
|
20395
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21097
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type30 = typeMap$5[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.typeName)],
|
|
20396
21098
|
onChange: function onChange(val) {
|
|
20397
21099
|
return changeTypeHandle(val);
|
|
20398
21100
|
}
|
|
@@ -20404,13 +21106,14 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20404
21106
|
canUpdateNumber: showChangeBtn,
|
|
20405
21107
|
showChangeBtn: showChangeBtn,
|
|
20406
21108
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
20407
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21109
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type31 = typeMap$5[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.key)],
|
|
20408
21110
|
onChange: function onChange(val) {
|
|
20409
21111
|
return changeGoodHandle(val);
|
|
20410
21112
|
},
|
|
20411
21113
|
onModeChange: handleModeChange,
|
|
20412
21114
|
isStrict: isStrict,
|
|
20413
|
-
showErpGoodsBtn:
|
|
21115
|
+
showErpGoodsBtn: showErpGoodsBtn,
|
|
21116
|
+
alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
|
|
20414
21117
|
tradeGoods: {
|
|
20415
21118
|
originDataSource: getGoodDetails({
|
|
20416
21119
|
mode: isStrict
|
|
@@ -20420,4 +21123,4 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20420
21123
|
})));
|
|
20421
21124
|
};
|
|
20422
21125
|
|
|
20423
|
-
export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, index$1 as ApaasUploadProAsync, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$3 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, CopyTextIcon, ExpressLogistics, Goods, index$4 as GoodsTable, GyReissue, GyReturnGoods as GyReturn, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, PublicReissue, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap, erpColumnsMap, erpFormValidator, index$2 as erpModalColumnsMap, getColumns$4 as getGyColumns, getColumns$5 as getJstColumns, getColumns$2 as getWdtColumns, getColumns$3 as getWlnColumns };
|
|
21126
|
+
export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, index$1 as ApaasUploadProAsync, AsyncSelect, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$3 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, CopyTextIcon, ExpressLogistics, Goods, index$4 as GoodsTable, GyReissue, GyReturnGoods as GyReturn, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, PublicReissue, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap, erpColumnsMap, erpFormValidator, index$2 as erpModalColumnsMap, getColumns$4 as getGyColumns, getColumns$5 as getJstColumns, getColumns$6 as getKmColumns, getColumns$2 as getWdtColumns, getColumns$3 as getWlnColumns };
|