@kmkf-fe-packages/basic-components 0.24.1 → 0.24.2-beta.1
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/README.md +1 -1
- package/dist/index.esm.js +971 -149
- package/dist/index.js +970 -147
- package/dist/src/bs/component/GoodItem/index.d.ts +1 -1
- package/dist/src/bs/component/model/WdtGoodsModal.d.ts +12 -0
- package/dist/src/common/CommonGoods/index.d.ts +3 -0
- package/dist/src/index.d.ts +1 -0
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, messag
|
|
|
3
3
|
import { EyeOutlined, DeleteOutlined, CaretUpOutlined } 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, toTree, request as request$1, ExpressData, uuid, LogisticsAddressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
6
|
+
import { AddressData, BsAddressData, WdtAddressData, toTree, request as request$1, ExpressData, uuid, LogisticsAddressData, WDT_ORDER_TYPE_MAP } from '@kmkf-fe-packages/kmkf-utils';
|
|
7
7
|
import zhCN from 'antd/lib/locale/zh_CN';
|
|
8
8
|
import { cloneDeep, difference, differenceWith } from 'lodash';
|
|
9
9
|
import { useDebounceEffect } from 'ahooks';
|
|
@@ -7369,6 +7369,7 @@ function ApaasRate(props) {
|
|
|
7369
7369
|
|
|
7370
7370
|
var addressData = AddressData.getInstance();
|
|
7371
7371
|
var bsAddressData = BsAddressData.getInstance();
|
|
7372
|
+
var wdtAddressData = WdtAddressData.getInstance();
|
|
7372
7373
|
var Province = function Province(props) {
|
|
7373
7374
|
var _props$type = props.type,
|
|
7374
7375
|
type = _props$type === void 0 ? 'workOrder' : _props$type,
|
|
@@ -7387,7 +7388,11 @@ var Province = function Province(props) {
|
|
|
7387
7388
|
while (1) switch (_context.prev = _context.next) {
|
|
7388
7389
|
case 0:
|
|
7389
7390
|
num++;
|
|
7390
|
-
options =
|
|
7391
|
+
options = ({
|
|
7392
|
+
bs: bsAddressData,
|
|
7393
|
+
wdt: wdtAddressData,
|
|
7394
|
+
workOrder: addressData
|
|
7395
|
+
}[type] || addressData).addressOptions || [];
|
|
7391
7396
|
if (!(options === null || options === void 0 ? void 0 : options.length) && num < 6) {
|
|
7392
7397
|
time.current = setTimeout(function () {
|
|
7393
7398
|
initPageSource();
|
|
@@ -7526,7 +7531,11 @@ var IdentifyAddress = function IdentifyAddress(props) {
|
|
|
7526
7531
|
receiverMobile: val === null || val === void 0 ? void 0 : val.phone,
|
|
7527
7532
|
address: []
|
|
7528
7533
|
};
|
|
7529
|
-
var addressData = type
|
|
7534
|
+
var addressData = (type && {
|
|
7535
|
+
bs: BsAddressData,
|
|
7536
|
+
wdt: WdtAddressData,
|
|
7537
|
+
workOrder: AddressData
|
|
7538
|
+
}[type] || AddressData).getInstance();
|
|
7530
7539
|
if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
|
|
7531
7540
|
params.address = [addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province), addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.city), addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.district)];
|
|
7532
7541
|
}
|
|
@@ -11070,6 +11079,441 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
11070
11079
|
};
|
|
11071
11080
|
var GoodsModal$2 = /*#__PURE__*/forwardRef(GoodsModal$1);
|
|
11072
11081
|
|
|
11082
|
+
var RangePicker = DatePicker.RangePicker;
|
|
11083
|
+
var columns$1 = [{
|
|
11084
|
+
dataIndex: 'index',
|
|
11085
|
+
title: 'NO',
|
|
11086
|
+
render: function render(val, record, index) {
|
|
11087
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
11088
|
+
style: {
|
|
11089
|
+
width: 25
|
|
11090
|
+
}
|
|
11091
|
+
}, index + 1);
|
|
11092
|
+
},
|
|
11093
|
+
width: 100
|
|
11094
|
+
}, {
|
|
11095
|
+
dataIndex: 'goodName',
|
|
11096
|
+
title: '商品名称',
|
|
11097
|
+
width: 200,
|
|
11098
|
+
ellipsis: true
|
|
11099
|
+
}, {
|
|
11100
|
+
dataIndex: 'goodNo',
|
|
11101
|
+
title: '商品spu编码',
|
|
11102
|
+
width: 200,
|
|
11103
|
+
ellipsis: true
|
|
11104
|
+
}, {
|
|
11105
|
+
dataIndex: 'goodId',
|
|
11106
|
+
title: 'SPUID',
|
|
11107
|
+
width: 200,
|
|
11108
|
+
ellipsis: true
|
|
11109
|
+
}, {
|
|
11110
|
+
dataIndex: 'specCount',
|
|
11111
|
+
title: '规格数',
|
|
11112
|
+
width: 160,
|
|
11113
|
+
ellipsis: true
|
|
11114
|
+
}];
|
|
11115
|
+
var expandedColumns = [{
|
|
11116
|
+
dataIndex: 'specName',
|
|
11117
|
+
title: '商品sku名称',
|
|
11118
|
+
width: 200,
|
|
11119
|
+
ellipsis: true
|
|
11120
|
+
}, {
|
|
11121
|
+
dataIndex: 'specNo',
|
|
11122
|
+
title: '商品sku编码',
|
|
11123
|
+
width: 200,
|
|
11124
|
+
ellipsis: true
|
|
11125
|
+
}, {
|
|
11126
|
+
dataIndex: 'specId',
|
|
11127
|
+
title: 'SKUID',
|
|
11128
|
+
width: 200,
|
|
11129
|
+
ellipsis: true
|
|
11130
|
+
}, {
|
|
11131
|
+
dataIndex: 'imgUrl',
|
|
11132
|
+
title: '商品图片',
|
|
11133
|
+
width: 100,
|
|
11134
|
+
render: function render(picUrl) {
|
|
11135
|
+
return /*#__PURE__*/React.createElement("img", {
|
|
11136
|
+
style: {
|
|
11137
|
+
width: '40px',
|
|
11138
|
+
height: '40px',
|
|
11139
|
+
objectFit: 'contain'
|
|
11140
|
+
},
|
|
11141
|
+
src: picUrl
|
|
11142
|
+
});
|
|
11143
|
+
}
|
|
11144
|
+
}, {
|
|
11145
|
+
dataIndex: 'marketPrice',
|
|
11146
|
+
title: '市场价',
|
|
11147
|
+
width: 140
|
|
11148
|
+
}, {
|
|
11149
|
+
dataIndex: 'retailPrice',
|
|
11150
|
+
title: '零售价',
|
|
11151
|
+
width: 140
|
|
11152
|
+
}, {
|
|
11153
|
+
dataIndex: 'memberPrice',
|
|
11154
|
+
title: '会员价',
|
|
11155
|
+
width: 140
|
|
11156
|
+
}];
|
|
11157
|
+
var dateFormat = 'YYYY-MM-DD HH:mm:ss';
|
|
11158
|
+
var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
11159
|
+
var initStartTime = hooks().subtract(30, 'd');
|
|
11160
|
+
var initEndTime = hooks();
|
|
11161
|
+
useImperativeHandle(ref, function () {
|
|
11162
|
+
return {
|
|
11163
|
+
open: function open(shopCode) {
|
|
11164
|
+
setVisible(true);
|
|
11165
|
+
setPageNo(1);
|
|
11166
|
+
setSelect([]);
|
|
11167
|
+
setSelectIds([]);
|
|
11168
|
+
form.setFieldsValue({
|
|
11169
|
+
dateTimePicker: [initStartTime, initEndTime],
|
|
11170
|
+
code: ''
|
|
11171
|
+
});
|
|
11172
|
+
// getShopList();
|
|
11173
|
+
}
|
|
11174
|
+
};
|
|
11175
|
+
});
|
|
11176
|
+
|
|
11177
|
+
var onSubmit = props.onSubmit,
|
|
11178
|
+
shopId = props.shopId,
|
|
11179
|
+
shopList = props.shopList,
|
|
11180
|
+
width = props.width,
|
|
11181
|
+
companyKey = props.companyKey;
|
|
11182
|
+
var _useState = useState(false),
|
|
11183
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
11184
|
+
visible = _useState2[0],
|
|
11185
|
+
setVisible = _useState2[1];
|
|
11186
|
+
var _useState3 = useState([]),
|
|
11187
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
11188
|
+
selectList = _useState4[0],
|
|
11189
|
+
setSelect = _useState4[1];
|
|
11190
|
+
var _useState5 = useState([]),
|
|
11191
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
11192
|
+
selectIds = _useState6[0],
|
|
11193
|
+
setSelectIds = _useState6[1];
|
|
11194
|
+
var _useState7 = useState(1),
|
|
11195
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
11196
|
+
pageNo = _useState8[0],
|
|
11197
|
+
setPageNo = _useState8[1];
|
|
11198
|
+
var _useState9 = useState(20),
|
|
11199
|
+
_useState10 = _slicedToArray(_useState9, 1),
|
|
11200
|
+
pageSize = _useState10[0];
|
|
11201
|
+
var _useState11 = useState([]),
|
|
11202
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
11203
|
+
goodList = _useState12[0],
|
|
11204
|
+
setGoodList = _useState12[1];
|
|
11205
|
+
var _useState13 = useState(false),
|
|
11206
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
11207
|
+
loading = _useState14[0],
|
|
11208
|
+
setLoading = _useState14[1];
|
|
11209
|
+
var _useState15 = useState(0),
|
|
11210
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
11211
|
+
total = _useState16[0],
|
|
11212
|
+
setTotal = _useState16[1];
|
|
11213
|
+
var displaySelectList = useMemo(function () {
|
|
11214
|
+
return selectList.map(function (item, i) {
|
|
11215
|
+
item.index = i + 1;
|
|
11216
|
+
return item;
|
|
11217
|
+
});
|
|
11218
|
+
}, [selectList]);
|
|
11219
|
+
useEffect(function () {
|
|
11220
|
+
if (visible) {
|
|
11221
|
+
queryItems();
|
|
11222
|
+
}
|
|
11223
|
+
}, [pageNo, visible]);
|
|
11224
|
+
var _Form$useForm = Form.useForm(),
|
|
11225
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
11226
|
+
form = _Form$useForm2[0];
|
|
11227
|
+
//选择页码
|
|
11228
|
+
var pageChange = function pageChange(page) {
|
|
11229
|
+
setPageNo(page);
|
|
11230
|
+
};
|
|
11231
|
+
/**
|
|
11232
|
+
* 查询商品
|
|
11233
|
+
*/
|
|
11234
|
+
var queryItems = /*#__PURE__*/function () {
|
|
11235
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
11236
|
+
var search,
|
|
11237
|
+
_formData$dateTimePic,
|
|
11238
|
+
_formData$dateTimePic2,
|
|
11239
|
+
_formData$dateTimePic3,
|
|
11240
|
+
_formData$dateTimePic4,
|
|
11241
|
+
_formData$dateTimePic5,
|
|
11242
|
+
_formData$dateTimePic6,
|
|
11243
|
+
formData,
|
|
11244
|
+
startTime,
|
|
11245
|
+
endTime,
|
|
11246
|
+
params,
|
|
11247
|
+
res,
|
|
11248
|
+
_res$data,
|
|
11249
|
+
_res$data$productList,
|
|
11250
|
+
productList,
|
|
11251
|
+
_res$data$total,
|
|
11252
|
+
_total,
|
|
11253
|
+
errorMsg,
|
|
11254
|
+
newProducts,
|
|
11255
|
+
_args = arguments;
|
|
11256
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11257
|
+
while (1) switch (_context.prev = _context.next) {
|
|
11258
|
+
case 0:
|
|
11259
|
+
search = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
11260
|
+
_context.prev = 1;
|
|
11261
|
+
setLoading(true);
|
|
11262
|
+
formData = form.getFieldsValue();
|
|
11263
|
+
startTime = ((_formData$dateTimePic = formData.dateTimePicker) === null || _formData$dateTimePic === void 0 ? void 0 : (_formData$dateTimePic2 = _formData$dateTimePic[0]) === null || _formData$dateTimePic2 === void 0 ? void 0 : (_formData$dateTimePic3 = _formData$dateTimePic2.format) === null || _formData$dateTimePic3 === void 0 ? void 0 : _formData$dateTimePic3.call(_formData$dateTimePic2, dateFormat)) || hooks().subtract(30, 'd').format(dateFormat);
|
|
11264
|
+
endTime = ((_formData$dateTimePic4 = formData.dateTimePicker) === null || _formData$dateTimePic4 === void 0 ? void 0 : (_formData$dateTimePic5 = _formData$dateTimePic4[1]) === null || _formData$dateTimePic5 === void 0 ? void 0 : (_formData$dateTimePic6 = _formData$dateTimePic5.format) === null || _formData$dateTimePic6 === void 0 ? void 0 : _formData$dateTimePic6.call(_formData$dateTimePic5, dateFormat)) || hooks().format(dateFormat);
|
|
11265
|
+
params = {
|
|
11266
|
+
// shopCode: shopCode,
|
|
11267
|
+
pageSize: pageSize,
|
|
11268
|
+
pageNo: pageNo - 1,
|
|
11269
|
+
goodNo: search.code,
|
|
11270
|
+
startTime: startTime,
|
|
11271
|
+
endTime: endTime
|
|
11272
|
+
};
|
|
11273
|
+
_context.next = 9;
|
|
11274
|
+
return extendRequest('/qy/gdfw/product/wdtListProduct', {
|
|
11275
|
+
method: 'post',
|
|
11276
|
+
data: params
|
|
11277
|
+
});
|
|
11278
|
+
case 9:
|
|
11279
|
+
res = _context.sent;
|
|
11280
|
+
_res$data = res.data, _res$data$productList = _res$data.productList, productList = _res$data$productList === void 0 ? [] : _res$data$productList, _res$data$total = _res$data.total, _total = _res$data$total === void 0 ? 0 : _res$data$total, errorMsg = _res$data.errorMsg;
|
|
11281
|
+
if (res.success) {
|
|
11282
|
+
newProducts = productList.map(function (item, index) {
|
|
11283
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
11284
|
+
index: index + 1
|
|
11285
|
+
});
|
|
11286
|
+
});
|
|
11287
|
+
setGoodList(_toConsumableArray(newProducts));
|
|
11288
|
+
if (pageNo === 1) {
|
|
11289
|
+
setTotal(_total);
|
|
11290
|
+
}
|
|
11291
|
+
} else {
|
|
11292
|
+
setGoodList([]);
|
|
11293
|
+
setTotal(0);
|
|
11294
|
+
message.error(errorMsg || res.message);
|
|
11295
|
+
}
|
|
11296
|
+
case 12:
|
|
11297
|
+
_context.prev = 12;
|
|
11298
|
+
setLoading(false);
|
|
11299
|
+
return _context.finish(12);
|
|
11300
|
+
case 15:
|
|
11301
|
+
case "end":
|
|
11302
|
+
return _context.stop();
|
|
11303
|
+
}
|
|
11304
|
+
}, _callee, null, [[1,, 12, 15]]);
|
|
11305
|
+
}));
|
|
11306
|
+
return function queryItems() {
|
|
11307
|
+
return _ref.apply(this, arguments);
|
|
11308
|
+
};
|
|
11309
|
+
}();
|
|
11310
|
+
var _onCancel = function onCancel() {
|
|
11311
|
+
setVisible(false);
|
|
11312
|
+
};
|
|
11313
|
+
var onOk = function onOk() {
|
|
11314
|
+
onSubmit(selectList);
|
|
11315
|
+
_onCancel();
|
|
11316
|
+
};
|
|
11317
|
+
var onFinish = function onFinish(fieldsValue) {
|
|
11318
|
+
var searchValue = {
|
|
11319
|
+
code: fieldsValue.code
|
|
11320
|
+
};
|
|
11321
|
+
queryItems(searchValue);
|
|
11322
|
+
};
|
|
11323
|
+
var onReset = function onReset() {
|
|
11324
|
+
form.resetFields();
|
|
11325
|
+
form.setFieldsValue({
|
|
11326
|
+
dateTimePicker: [hooks().subtract(30, 'd'), hooks()],
|
|
11327
|
+
code: ''
|
|
11328
|
+
});
|
|
11329
|
+
setPageNo(function (prev) {
|
|
11330
|
+
if (prev === 1 && visible) {
|
|
11331
|
+
queryItems();
|
|
11332
|
+
}
|
|
11333
|
+
return 1;
|
|
11334
|
+
});
|
|
11335
|
+
};
|
|
11336
|
+
// const getShopList = async () => {
|
|
11337
|
+
// const { success, data } = await request('/qy/diamond/getConfigInfo', {
|
|
11338
|
+
// method: 'get',
|
|
11339
|
+
// params: {
|
|
11340
|
+
// key: 'company-third-shop-info',
|
|
11341
|
+
// },
|
|
11342
|
+
// });
|
|
11343
|
+
// const obj: any = JSON.parse(data || '{}');
|
|
11344
|
+
// if (success) {
|
|
11345
|
+
// const list = (obj?.[companyKey] || []).map((item: any) => {
|
|
11346
|
+
// return {
|
|
11347
|
+
// label: item.shopName,
|
|
11348
|
+
// value: item.shopCode,
|
|
11349
|
+
// };
|
|
11350
|
+
// });
|
|
11351
|
+
// setShopList(list);
|
|
11352
|
+
// }
|
|
11353
|
+
// };
|
|
11354
|
+
var onValuesChange = function onValuesChange(changedValues) {
|
|
11355
|
+
if (changedValues === null || changedValues === void 0 ? void 0 : changedValues['shopId']) {
|
|
11356
|
+
queryItems(changedValues === null || changedValues === void 0 ? void 0 : changedValues.shopId);
|
|
11357
|
+
pubsub.publish('changeShopCode', {
|
|
11358
|
+
shopCode: changedValues.shopId
|
|
11359
|
+
});
|
|
11360
|
+
}
|
|
11361
|
+
};
|
|
11362
|
+
var handleDelete = function handleDelete(record, index) {
|
|
11363
|
+
var newSelectList = selectList.filter(function (item) {
|
|
11364
|
+
return item.specId !== record.specId;
|
|
11365
|
+
});
|
|
11366
|
+
setSelect(_toConsumableArray(newSelectList));
|
|
11367
|
+
setSelectIds(_toConsumableArray(newSelectList.map(function (item) {
|
|
11368
|
+
return item.specId;
|
|
11369
|
+
})));
|
|
11370
|
+
};
|
|
11371
|
+
var displaySelectedColumns = [{
|
|
11372
|
+
dataIndex: 'operation',
|
|
11373
|
+
title: '',
|
|
11374
|
+
render: function render(_, record, index) {
|
|
11375
|
+
return /*#__PURE__*/React.createElement(DeleteOutlined, {
|
|
11376
|
+
onClick: function onClick() {
|
|
11377
|
+
return handleDelete(record);
|
|
11378
|
+
}
|
|
11379
|
+
});
|
|
11380
|
+
}
|
|
11381
|
+
}, {
|
|
11382
|
+
dataIndex: 'index',
|
|
11383
|
+
title: 'NO',
|
|
11384
|
+
render: function render(val, record, index) {
|
|
11385
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
11386
|
+
style: {
|
|
11387
|
+
width: 25
|
|
11388
|
+
}
|
|
11389
|
+
}, index + 1);
|
|
11390
|
+
}
|
|
11391
|
+
}];
|
|
11392
|
+
var expandedRowSelection = {
|
|
11393
|
+
fixed: true,
|
|
11394
|
+
selectedRowKeys: selectIds,
|
|
11395
|
+
onSelect: function onSelect(record, selected, selectedRows, nativeEvent) {
|
|
11396
|
+
var tempList = [];
|
|
11397
|
+
if (selected) {
|
|
11398
|
+
tempList = [].concat(_toConsumableArray(selectList), [record]);
|
|
11399
|
+
} else {
|
|
11400
|
+
tempList = selectList.filter(function (item) {
|
|
11401
|
+
return item.specId !== record.specId;
|
|
11402
|
+
});
|
|
11403
|
+
}
|
|
11404
|
+
setSelect(_toConsumableArray(tempList));
|
|
11405
|
+
setSelectIds(_toConsumableArray(tempList.map(function (item) {
|
|
11406
|
+
return item.specId;
|
|
11407
|
+
})));
|
|
11408
|
+
},
|
|
11409
|
+
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
11410
|
+
var tempAllList = [];
|
|
11411
|
+
if (selected) {
|
|
11412
|
+
tempAllList = [].concat(_toConsumableArray(selectList), _toConsumableArray(selectedRows.filter(Boolean)));
|
|
11413
|
+
} else {
|
|
11414
|
+
tempAllList = selectList.filter(function (list) {
|
|
11415
|
+
return changeRows.filter(Boolean).every(function (item) {
|
|
11416
|
+
return list.specId !== item.specId;
|
|
11417
|
+
});
|
|
11418
|
+
});
|
|
11419
|
+
}
|
|
11420
|
+
setSelect(_toConsumableArray(tempAllList));
|
|
11421
|
+
setSelectIds(_toConsumableArray(tempAllList.map(function (item) {
|
|
11422
|
+
return item.specId;
|
|
11423
|
+
})));
|
|
11424
|
+
}
|
|
11425
|
+
};
|
|
11426
|
+
var expandedRowRender = function expandedRowRender(record, index, indent, expanded) {
|
|
11427
|
+
return /*#__PURE__*/React.createElement(Table, {
|
|
11428
|
+
rowKey: 'specId',
|
|
11429
|
+
size: 'small',
|
|
11430
|
+
columns: expandedColumns,
|
|
11431
|
+
dataSource: record.itemDetailList || [],
|
|
11432
|
+
pagination: false,
|
|
11433
|
+
rowSelection: expandedRowSelection,
|
|
11434
|
+
scroll: {
|
|
11435
|
+
x: true
|
|
11436
|
+
}
|
|
11437
|
+
});
|
|
11438
|
+
};
|
|
11439
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Modal, {
|
|
11440
|
+
title: '选择商品',
|
|
11441
|
+
okText: '确认',
|
|
11442
|
+
cancelText: '取消',
|
|
11443
|
+
visible: visible,
|
|
11444
|
+
width: width || 850,
|
|
11445
|
+
onCancel: function onCancel() {
|
|
11446
|
+
_onCancel();
|
|
11447
|
+
},
|
|
11448
|
+
onOk: onOk,
|
|
11449
|
+
wrapClassName: "goodModal"
|
|
11450
|
+
}, /*#__PURE__*/React.createElement(Form, {
|
|
11451
|
+
layout: "inline",
|
|
11452
|
+
form: form,
|
|
11453
|
+
onFinish: onFinish,
|
|
11454
|
+
onValuesChange: onValuesChange,
|
|
11455
|
+
initialValues: {
|
|
11456
|
+
code: ''
|
|
11457
|
+
}
|
|
11458
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
11459
|
+
name: "dateTimePicker"
|
|
11460
|
+
}, /*#__PURE__*/React.createElement(RangePicker, {
|
|
11461
|
+
placeholder: ['开始日期', '结束日期'],
|
|
11462
|
+
showTime: true,
|
|
11463
|
+
defaultValue: [hooks(initStartTime.format(dateFormat), dateFormat), hooks(initEndTime.format(dateFormat), dateFormat)]
|
|
11464
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
11465
|
+
name: "code"
|
|
11466
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
11467
|
+
placeholder: "\u5546\u54C1\u7F16\u7801",
|
|
11468
|
+
allowClear: true,
|
|
11469
|
+
style: {
|
|
11470
|
+
width: 150
|
|
11471
|
+
}
|
|
11472
|
+
})), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Button, {
|
|
11473
|
+
type: "primary",
|
|
11474
|
+
htmlType: "submit"
|
|
11475
|
+
}, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
|
|
11476
|
+
onClick: onReset
|
|
11477
|
+
}, "\u91CD\u7F6E"))), /*#__PURE__*/React.createElement("div", {
|
|
11478
|
+
style: {
|
|
11479
|
+
marginTop: '16px'
|
|
11480
|
+
}
|
|
11481
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
11482
|
+
rowKey: 'goodNo',
|
|
11483
|
+
columns: columns$1,
|
|
11484
|
+
dataSource: goodList,
|
|
11485
|
+
loading: loading,
|
|
11486
|
+
scroll: {
|
|
11487
|
+
x: true,
|
|
11488
|
+
y: 250
|
|
11489
|
+
},
|
|
11490
|
+
expandable: {
|
|
11491
|
+
expandedRowRender: expandedRowRender
|
|
11492
|
+
},
|
|
11493
|
+
pagination: {
|
|
11494
|
+
size: 'small',
|
|
11495
|
+
total: total,
|
|
11496
|
+
current: pageNo,
|
|
11497
|
+
pageSize: pageSize,
|
|
11498
|
+
pageSizeOptions: [],
|
|
11499
|
+
onChange: pageChange
|
|
11500
|
+
}
|
|
11501
|
+
})), !!selectList.length && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Space, null, "\u5DF2\u7ECF\u9009\u62E9\u5546\u54C1\uFF08", selectList.length, "\uFF09"), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Table, {
|
|
11502
|
+
rowKey: 'specId',
|
|
11503
|
+
columns: [].concat(displaySelectedColumns, expandedColumns),
|
|
11504
|
+
dataSource: displaySelectList,
|
|
11505
|
+
pagination: false,
|
|
11506
|
+
scroll: {
|
|
11507
|
+
x: true,
|
|
11508
|
+
y: 250
|
|
11509
|
+
},
|
|
11510
|
+
style: {
|
|
11511
|
+
width: '100%'
|
|
11512
|
+
}
|
|
11513
|
+
})))));
|
|
11514
|
+
};
|
|
11515
|
+
var WdtGoodsModal = /*#__PURE__*/forwardRef(GoodsModal$3);
|
|
11516
|
+
|
|
11073
11517
|
// interface GoodsItem {
|
|
11074
11518
|
// title: string;
|
|
11075
11519
|
// pic: string;
|
|
@@ -11080,6 +11524,7 @@ var GoodsModal$2 = /*#__PURE__*/forwardRef(GoodsModal$1);
|
|
|
11080
11524
|
var GoodItem$1 = function GoodItem(props) {
|
|
11081
11525
|
var _props$value = props.value,
|
|
11082
11526
|
value = _props$value === void 0 ? [] : _props$value,
|
|
11527
|
+
type = props.type,
|
|
11083
11528
|
onChange = props.onChange,
|
|
11084
11529
|
disabled = props.disabled,
|
|
11085
11530
|
_props$showHeader = props.showHeader,
|
|
@@ -11127,105 +11572,214 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11127
11572
|
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(value));
|
|
11128
11573
|
}
|
|
11129
11574
|
};
|
|
11130
|
-
|
|
11131
|
-
var GOODS_INFO_COLUMNS = function GOODS_INFO_COLUMNS() {
|
|
11575
|
+
var COLUMNS_MAP = function COLUMNS_MAP() {
|
|
11132
11576
|
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
11133
|
-
return
|
|
11134
|
-
|
|
11135
|
-
|
|
11136
|
-
|
|
11137
|
-
|
|
11138
|
-
|
|
11139
|
-
|
|
11140
|
-
|
|
11141
|
-
|
|
11142
|
-
|
|
11143
|
-
value: '是'
|
|
11144
|
-
}, {
|
|
11145
|
-
label: '否',
|
|
11146
|
-
value: '否'
|
|
11147
|
-
}],
|
|
11148
|
-
disabled: disabled,
|
|
11149
|
-
value: val,
|
|
11150
|
-
onChange: function onChange(val) {
|
|
11151
|
-
return updateHandle(val, index, 'mark');
|
|
11152
|
-
}
|
|
11153
|
-
});
|
|
11154
|
-
}
|
|
11155
|
-
}, {
|
|
11156
|
-
dataIndex: 'skuName',
|
|
11157
|
-
title: "".concat(text, "sku\u540D\u79F0"),
|
|
11158
|
-
align: 'center',
|
|
11159
|
-
ellipsis: true,
|
|
11160
|
-
width: 250
|
|
11161
|
-
}, {
|
|
11162
|
-
dataIndex: 'sku',
|
|
11163
|
-
title: "".concat(text, "sku\u7F16\u7801"),
|
|
11164
|
-
align: 'center',
|
|
11165
|
-
ellipsis: true,
|
|
11166
|
-
width: 100
|
|
11167
|
-
}, {
|
|
11168
|
-
dataIndex: 'name',
|
|
11169
|
-
title: "".concat(text, "\u540D\u79F0"),
|
|
11170
|
-
align: 'center',
|
|
11171
|
-
ellipsis: true,
|
|
11172
|
-
width: 250
|
|
11173
|
-
}, {
|
|
11174
|
-
dataIndex: 'pic',
|
|
11175
|
-
title: "\u56FE\u7247",
|
|
11176
|
-
align: 'center',
|
|
11177
|
-
ellipsis: true,
|
|
11178
|
-
width: 100,
|
|
11179
|
-
render: function render(val) {
|
|
11180
|
-
return /*#__PURE__*/React.createElement(Image, {
|
|
11181
|
-
width: 60,
|
|
11182
|
-
src: val
|
|
11183
|
-
});
|
|
11184
|
-
}
|
|
11185
|
-
}, {
|
|
11186
|
-
dataIndex: 'code',
|
|
11187
|
-
title: "".concat(text, "\u7F16\u7801"),
|
|
11188
|
-
align: 'center',
|
|
11189
|
-
ellipsis: true,
|
|
11190
|
-
width: 100
|
|
11191
|
-
}, {
|
|
11192
|
-
dataIndex: 'money',
|
|
11193
|
-
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
11194
|
-
align: 'center',
|
|
11195
|
-
ellipsis: true,
|
|
11196
|
-
width: 100
|
|
11197
|
-
}, {
|
|
11198
|
-
dataIndex: 'number',
|
|
11199
|
-
title: "".concat(text, "\u6570\u91CF"),
|
|
11200
|
-
align: 'center',
|
|
11201
|
-
ellipsis: true,
|
|
11202
|
-
width: 100,
|
|
11203
|
-
render: function render(val, record, index) {
|
|
11204
|
-
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
11205
|
-
style: {
|
|
11577
|
+
return function (type) {
|
|
11578
|
+
var columns = [];
|
|
11579
|
+
switch (type) {
|
|
11580
|
+
case 'WDT_REISSUE_GOODS':
|
|
11581
|
+
case 'WDT_GOODS':
|
|
11582
|
+
columns = [{
|
|
11583
|
+
dataIndex: 'goodId',
|
|
11584
|
+
title: "SPUID",
|
|
11585
|
+
align: 'center',
|
|
11586
|
+
ellipsis: true,
|
|
11206
11587
|
width: 70
|
|
11588
|
+
}, {
|
|
11589
|
+
dataIndex: 'goodNo',
|
|
11590
|
+
title: "SPU\u5546\u54C1\u7F16\u7801",
|
|
11591
|
+
align: 'center',
|
|
11592
|
+
ellipsis: true,
|
|
11593
|
+
width: 100
|
|
11594
|
+
}, {
|
|
11595
|
+
dataIndex: 'goodName',
|
|
11596
|
+
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
11597
|
+
align: 'center',
|
|
11598
|
+
ellipsis: true,
|
|
11599
|
+
width: 250
|
|
11600
|
+
}, {
|
|
11601
|
+
dataIndex: 'specId',
|
|
11602
|
+
title: "".concat(text, "SKUID"),
|
|
11603
|
+
align: 'center',
|
|
11604
|
+
ellipsis: true,
|
|
11605
|
+
width: 100
|
|
11606
|
+
}, {
|
|
11607
|
+
dataIndex: 'specNo',
|
|
11608
|
+
title: "".concat(text, "sku\u7F16\u7801"),
|
|
11609
|
+
align: 'center',
|
|
11610
|
+
ellipsis: true,
|
|
11611
|
+
width: 100
|
|
11612
|
+
}, {
|
|
11613
|
+
dataIndex: 'specName',
|
|
11614
|
+
title: "".concat(text, "sku\u540D\u79F0"),
|
|
11615
|
+
align: 'center',
|
|
11616
|
+
ellipsis: true,
|
|
11617
|
+
width: 250
|
|
11618
|
+
}, {
|
|
11619
|
+
dataIndex: 'orderPrice',
|
|
11620
|
+
title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
|
|
11621
|
+
align: 'center',
|
|
11622
|
+
ellipsis: true,
|
|
11623
|
+
width: 100
|
|
11624
|
+
}, {
|
|
11625
|
+
dataIndex: 'num',
|
|
11626
|
+
title: "".concat(text, "\u6570\u91CF"),
|
|
11627
|
+
align: 'center',
|
|
11628
|
+
ellipsis: true,
|
|
11629
|
+
width: 100,
|
|
11630
|
+
render: function render(val, record, index) {
|
|
11631
|
+
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
11632
|
+
style: {
|
|
11633
|
+
width: 70
|
|
11634
|
+
},
|
|
11635
|
+
value: val,
|
|
11636
|
+
min: 0,
|
|
11637
|
+
precision: 0,
|
|
11638
|
+
onChange: function onChange(num) {
|
|
11639
|
+
return updateHandle(num, index, 'num');
|
|
11640
|
+
}
|
|
11641
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
11642
|
+
}
|
|
11207
11643
|
},
|
|
11208
|
-
|
|
11209
|
-
|
|
11210
|
-
|
|
11211
|
-
|
|
11212
|
-
|
|
11213
|
-
|
|
11214
|
-
|
|
11644
|
+
// {
|
|
11645
|
+
// dataIndex: 'actualNum',
|
|
11646
|
+
// title: `${text}实发数量`,
|
|
11647
|
+
// align: 'center',
|
|
11648
|
+
// ellipsis: true,
|
|
11649
|
+
// width: 100,
|
|
11650
|
+
// },
|
|
11651
|
+
{
|
|
11652
|
+
dataIndex: 'sharePrice',
|
|
11653
|
+
title: "\u5206\u644A\u4EF7",
|
|
11654
|
+
align: 'center',
|
|
11655
|
+
ellipsis: true,
|
|
11656
|
+
width: 70
|
|
11657
|
+
}, {
|
|
11658
|
+
dataIndex: 'giftType',
|
|
11659
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
11660
|
+
align: 'center',
|
|
11661
|
+
ellipsis: true,
|
|
11662
|
+
width: 100,
|
|
11663
|
+
render: function render(val) {
|
|
11664
|
+
var giftTypeMap = {
|
|
11665
|
+
0: '非赠品',
|
|
11666
|
+
1: '自动赠送',
|
|
11667
|
+
2: '手工赠送',
|
|
11668
|
+
3: '回购自动送赠品',
|
|
11669
|
+
4: '前N有礼送赠品',
|
|
11670
|
+
6: '天猫优仓赠品',
|
|
11671
|
+
7: '淘宝CRM会员送赠'
|
|
11672
|
+
};
|
|
11673
|
+
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
11674
|
+
}
|
|
11675
|
+
}];
|
|
11676
|
+
break;
|
|
11677
|
+
default:
|
|
11678
|
+
columns = [{
|
|
11679
|
+
dataIndex: 'mark',
|
|
11680
|
+
title: "\u5546\u54C1\u6807\u8BB0",
|
|
11681
|
+
align: 'center',
|
|
11682
|
+
ellipsis: true,
|
|
11683
|
+
width: 70,
|
|
11684
|
+
render: function render(val, record, index) {
|
|
11685
|
+
return /*#__PURE__*/React.createElement(Select, {
|
|
11686
|
+
options: [{
|
|
11687
|
+
label: '是',
|
|
11688
|
+
value: '是'
|
|
11689
|
+
}, {
|
|
11690
|
+
label: '否',
|
|
11691
|
+
value: '否'
|
|
11692
|
+
}],
|
|
11693
|
+
disabled: disabled,
|
|
11694
|
+
value: val,
|
|
11695
|
+
onChange: function onChange(val) {
|
|
11696
|
+
return updateHandle(val, index, 'mark');
|
|
11697
|
+
}
|
|
11698
|
+
});
|
|
11699
|
+
}
|
|
11700
|
+
}, {
|
|
11701
|
+
dataIndex: 'skuName',
|
|
11702
|
+
title: "".concat(text, "sku\u540D\u79F0"),
|
|
11703
|
+
align: 'center',
|
|
11704
|
+
ellipsis: true,
|
|
11705
|
+
width: 250
|
|
11706
|
+
}, {
|
|
11707
|
+
dataIndex: 'sku',
|
|
11708
|
+
title: "".concat(text, "sku\u7F16\u7801"),
|
|
11709
|
+
align: 'center',
|
|
11710
|
+
ellipsis: true,
|
|
11711
|
+
width: 100
|
|
11712
|
+
}, {
|
|
11713
|
+
dataIndex: 'name',
|
|
11714
|
+
title: "".concat(text, "\u540D\u79F0"),
|
|
11715
|
+
align: 'center',
|
|
11716
|
+
ellipsis: true,
|
|
11717
|
+
width: 250
|
|
11718
|
+
}, {
|
|
11719
|
+
dataIndex: 'pic',
|
|
11720
|
+
title: "\u56FE\u7247",
|
|
11721
|
+
align: 'center',
|
|
11722
|
+
ellipsis: true,
|
|
11723
|
+
width: 100,
|
|
11724
|
+
render: function render(val) {
|
|
11725
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
11726
|
+
width: 60,
|
|
11727
|
+
src: val
|
|
11728
|
+
});
|
|
11729
|
+
}
|
|
11730
|
+
}, {
|
|
11731
|
+
dataIndex: 'code',
|
|
11732
|
+
title: "".concat(text, "\u7F16\u7801"),
|
|
11733
|
+
align: 'center',
|
|
11734
|
+
ellipsis: true,
|
|
11735
|
+
width: 100
|
|
11736
|
+
}, {
|
|
11737
|
+
dataIndex: 'money',
|
|
11738
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
11739
|
+
align: 'center',
|
|
11740
|
+
ellipsis: true,
|
|
11741
|
+
width: 100
|
|
11742
|
+
}, {
|
|
11743
|
+
dataIndex: 'number',
|
|
11744
|
+
title: "".concat(text, "\u6570\u91CF"),
|
|
11745
|
+
align: 'center',
|
|
11746
|
+
ellipsis: true,
|
|
11747
|
+
width: 100,
|
|
11748
|
+
render: function render(val, record, index) {
|
|
11749
|
+
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
11750
|
+
style: {
|
|
11751
|
+
width: 70
|
|
11752
|
+
},
|
|
11753
|
+
value: val,
|
|
11754
|
+
min: 0,
|
|
11755
|
+
precision: 0,
|
|
11756
|
+
onChange: function onChange(num) {
|
|
11757
|
+
return updateHandle(num, index, 'number');
|
|
11758
|
+
}
|
|
11759
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
11760
|
+
}
|
|
11761
|
+
}, {
|
|
11762
|
+
dataIndex: 'share',
|
|
11763
|
+
title: "\u5206\u644A\u4EF7",
|
|
11764
|
+
align: 'center',
|
|
11765
|
+
ellipsis: true,
|
|
11766
|
+
width: 70
|
|
11767
|
+
}, {
|
|
11768
|
+
dataIndex: 'type',
|
|
11769
|
+
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
11770
|
+
align: 'center',
|
|
11771
|
+
ellipsis: true,
|
|
11772
|
+
width: 100
|
|
11773
|
+
}];
|
|
11215
11774
|
}
|
|
11216
|
-
|
|
11217
|
-
|
|
11218
|
-
|
|
11219
|
-
|
|
11220
|
-
|
|
11221
|
-
|
|
11222
|
-
|
|
11223
|
-
|
|
11224
|
-
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
11225
|
-
align: 'center',
|
|
11226
|
-
ellipsis: true,
|
|
11227
|
-
width: 100
|
|
11228
|
-
}];
|
|
11775
|
+
return columns;
|
|
11776
|
+
};
|
|
11777
|
+
};
|
|
11778
|
+
//商品信息
|
|
11779
|
+
var GOODS_INFO_COLUMNS = function GOODS_INFO_COLUMNS() {
|
|
11780
|
+
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
11781
|
+
var COLUMNS_INFO = COLUMNS_MAP(text);
|
|
11782
|
+
return COLUMNS_INFO(type);
|
|
11229
11783
|
};
|
|
11230
11784
|
var newColumns = useMemo(function () {
|
|
11231
11785
|
var columnList = [{
|
|
@@ -11260,30 +11814,43 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11260
11814
|
return columnList;
|
|
11261
11815
|
}, [showHeader, value, disabled]);
|
|
11262
11816
|
var onSubmit = function onSubmit(list) {
|
|
11263
|
-
var newList =
|
|
11264
|
-
|
|
11265
|
-
|
|
11266
|
-
|
|
11267
|
-
|
|
11268
|
-
|
|
11269
|
-
|
|
11270
|
-
|
|
11271
|
-
|
|
11272
|
-
|
|
11273
|
-
|
|
11274
|
-
|
|
11275
|
-
|
|
11276
|
-
|
|
11277
|
-
|
|
11278
|
-
|
|
11279
|
-
|
|
11280
|
-
|
|
11281
|
-
|
|
11282
|
-
|
|
11283
|
-
|
|
11284
|
-
|
|
11285
|
-
|
|
11286
|
-
|
|
11817
|
+
var newList = [];
|
|
11818
|
+
if (['WDT_REISSUE_GOODS', 'WDT_GOODS'].includes(type)) {
|
|
11819
|
+
newList = list.map(function (item) {
|
|
11820
|
+
item.uuid = uuid();
|
|
11821
|
+
item.canDelete = true;
|
|
11822
|
+
item.num = 1;
|
|
11823
|
+
item.orderPrice = 0;
|
|
11824
|
+
item.sharePrice = 0;
|
|
11825
|
+
item.canUpdateNumber = canUpdateNumber;
|
|
11826
|
+
return item;
|
|
11827
|
+
});
|
|
11828
|
+
} else {
|
|
11829
|
+
newList = list.map(function (item) {
|
|
11830
|
+
var goodsId = item.goodsId,
|
|
11831
|
+
name = item.name,
|
|
11832
|
+
code = item.code,
|
|
11833
|
+
skuCode = item.skuCode,
|
|
11834
|
+
marketPrice = item.marketPrice,
|
|
11835
|
+
skuName = item.skuName;
|
|
11836
|
+
return {
|
|
11837
|
+
id: goodsId,
|
|
11838
|
+
mark: '是',
|
|
11839
|
+
pic: '',
|
|
11840
|
+
skuName: skuName,
|
|
11841
|
+
name: name,
|
|
11842
|
+
code: code,
|
|
11843
|
+
sku: skuCode,
|
|
11844
|
+
money: marketPrice || 0,
|
|
11845
|
+
share: marketPrice || 0,
|
|
11846
|
+
number: 1,
|
|
11847
|
+
type: '',
|
|
11848
|
+
uuid: uuid(),
|
|
11849
|
+
canDelete: true,
|
|
11850
|
+
canUpdateNumber: canUpdateNumber
|
|
11851
|
+
};
|
|
11852
|
+
});
|
|
11853
|
+
}
|
|
11287
11854
|
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), _toConsumableArray(newList)));
|
|
11288
11855
|
};
|
|
11289
11856
|
var onSelectChange = function onSelectChange(newSelectedRowKeys) {
|
|
@@ -11326,7 +11893,15 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11326
11893
|
locale: {
|
|
11327
11894
|
emptyText: '暂无数据'
|
|
11328
11895
|
}
|
|
11329
|
-
})), /*#__PURE__*/React.createElement(
|
|
11896
|
+
})), ['WDT_REISSUE_GOODS', 'WDT_GOODS'].includes(type) ? /*#__PURE__*/React.createElement(WdtGoodsModal, {
|
|
11897
|
+
ref: refModal,
|
|
11898
|
+
onSubmit: onSubmit,
|
|
11899
|
+
width: width,
|
|
11900
|
+
shopList: shopList,
|
|
11901
|
+
shopId: shopId,
|
|
11902
|
+
maxLength: maxLength,
|
|
11903
|
+
companyKey: companyKey
|
|
11904
|
+
}) : /*#__PURE__*/React.createElement(GoodsModal$2, {
|
|
11330
11905
|
ref: refModal,
|
|
11331
11906
|
onSubmit: onSubmit,
|
|
11332
11907
|
width: width,
|
|
@@ -11707,25 +12282,60 @@ var BsExchange = function BsExchange(props) {
|
|
|
11707
12282
|
}))) : null);
|
|
11708
12283
|
};
|
|
11709
12284
|
|
|
11710
|
-
var _excluded$e = ["value", "onChange", "reasonList", "disabled"];
|
|
12285
|
+
var _excluded$e = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
12286
|
+
var typeMap = {
|
|
12287
|
+
BS_REISSUE_GOODS: {
|
|
12288
|
+
key: 'bsReissueGoods',
|
|
12289
|
+
name: 'bs',
|
|
12290
|
+
typeName: 'bsReissueType',
|
|
12291
|
+
reissueSelectList: 'reissueSelectList',
|
|
12292
|
+
reissueSelectListReturn: 'reissueSelectListReturn',
|
|
12293
|
+
reissueDeleteGood: 'reissueDeleteGood',
|
|
12294
|
+
changeShopCode: 'changeShopCode',
|
|
12295
|
+
reissueType: 'reissueType',
|
|
12296
|
+
formatDefaultField: {
|
|
12297
|
+
money: 'money',
|
|
12298
|
+
share: 'share'
|
|
12299
|
+
}
|
|
12300
|
+
},
|
|
12301
|
+
WDT_REISSUE_GOODS: {
|
|
12302
|
+
key: 'wdtReissueGoods',
|
|
12303
|
+
name: '旺店通',
|
|
12304
|
+
typeName: 'wdtReissueType',
|
|
12305
|
+
reissueSelectList: 'wdtReissueSelectList',
|
|
12306
|
+
reissueSelectListReturn: 'wdtReissueSelectListReturn',
|
|
12307
|
+
reissueDeleteGood: 'wdtReissueDeleteGood',
|
|
12308
|
+
changeShopCode: 'wdtChangeShopCode',
|
|
12309
|
+
reissueType: 'wdtReissueType',
|
|
12310
|
+
formatDefaultField: {
|
|
12311
|
+
money: 'orderPrice',
|
|
12312
|
+
share: 'sharePrice'
|
|
12313
|
+
}
|
|
12314
|
+
}
|
|
12315
|
+
};
|
|
11711
12316
|
var BsReissue = function BsReissue(props) {
|
|
12317
|
+
var _typeMap$type20, _typeMap$type21, _typeMap$type22;
|
|
11712
12318
|
var value = props.value,
|
|
11713
12319
|
onChange = props.onChange,
|
|
11714
12320
|
_props$reasonList = props.reasonList,
|
|
11715
12321
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
11716
12322
|
disabled = props.disabled,
|
|
12323
|
+
type = props.type,
|
|
11717
12324
|
other = _objectWithoutProperties(props, _excluded$e);
|
|
11718
12325
|
var valueRef = useRef({});
|
|
11719
12326
|
useEffect(function () {
|
|
11720
|
-
|
|
12327
|
+
var _typeMap$type;
|
|
12328
|
+
pubsub.subscribe("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type = typeMap[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.reissueSelectList), function (_, data) {
|
|
12329
|
+
var _typeMap$type2;
|
|
11721
12330
|
// console.log('reissueSelectList', data);
|
|
11722
12331
|
if (disabled) return;
|
|
11723
12332
|
var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
|
|
11724
12333
|
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
11725
12334
|
});
|
|
11726
|
-
newValue.
|
|
11727
|
-
|
|
11728
|
-
item.
|
|
12335
|
+
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type2 = typeMap[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.key)] = data === null || data === void 0 ? void 0 : data.list.map(function (item) {
|
|
12336
|
+
var _typeMap$type3, _typeMap$type4;
|
|
12337
|
+
item["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type3 = typeMap[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.formatDefaultField.money)] = 0;
|
|
12338
|
+
item["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type4 = typeMap[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.formatDefaultField.share)] = 0;
|
|
11729
12339
|
item.canUpdateNumber = true;
|
|
11730
12340
|
return item;
|
|
11731
12341
|
});
|
|
@@ -11733,15 +12343,18 @@ var BsReissue = function BsReissue(props) {
|
|
|
11733
12343
|
});
|
|
11734
12344
|
}, []);
|
|
11735
12345
|
useEffect(function () {
|
|
11736
|
-
|
|
12346
|
+
var _typeMap$type5;
|
|
12347
|
+
pubsub.subscribe("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type5 = typeMap[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.reissueSelectListReturn), function (_, data) {
|
|
12348
|
+
var _typeMap$type6;
|
|
11737
12349
|
// console.log('reissueSelectListReturn', data);
|
|
11738
12350
|
if (disabled) return;
|
|
11739
12351
|
var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
|
|
11740
12352
|
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
11741
12353
|
});
|
|
11742
|
-
newValue.
|
|
11743
|
-
|
|
11744
|
-
item.
|
|
12354
|
+
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type6 = typeMap[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.key)] = data === null || data === void 0 ? void 0 : data.list.map(function (item) {
|
|
12355
|
+
var _typeMap$type7, _typeMap$type8;
|
|
12356
|
+
item["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type7 = typeMap[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.formatDefaultField.money)] = 0;
|
|
12357
|
+
item["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type8 = typeMap[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.formatDefaultField.share)] = 0;
|
|
11745
12358
|
item.canUpdateNumber = true;
|
|
11746
12359
|
return item;
|
|
11747
12360
|
});
|
|
@@ -11749,50 +12362,55 @@ var BsReissue = function BsReissue(props) {
|
|
|
11749
12362
|
});
|
|
11750
12363
|
}, []);
|
|
11751
12364
|
useEffect(function () {
|
|
12365
|
+
var _typeMap$type9, _typeMap$type12;
|
|
11752
12366
|
valueRef.current = value;
|
|
11753
|
-
pubsub.subscribeOnce(
|
|
12367
|
+
pubsub.subscribeOnce("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type9 = typeMap[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.reissueDeleteGood), function (_, data) {
|
|
11754
12368
|
if (disabled) return;
|
|
11755
12369
|
if (value) {
|
|
12370
|
+
var _typeMap$type10, _typeMap$type11;
|
|
11756
12371
|
var newValue = _objectSpread2({}, value);
|
|
11757
|
-
newValue.
|
|
12372
|
+
newValue["".concat((_typeMap$type10 = typeMap[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key)] = newValue === null || newValue === void 0 ? void 0 : newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type11 = typeMap[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.key)].filter(function (item) {
|
|
11758
12373
|
return item.sku !== data;
|
|
11759
12374
|
});
|
|
11760
12375
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
11761
12376
|
}
|
|
11762
12377
|
});
|
|
11763
|
-
pubsub.subscribeOnce(
|
|
12378
|
+
pubsub.subscribeOnce("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type12 = typeMap[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.changeShopCode), function (type, data) {
|
|
11764
12379
|
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11765
12380
|
shopCode: data.shopCode
|
|
11766
12381
|
}));
|
|
11767
12382
|
});
|
|
11768
12383
|
}, [value, disabled]);
|
|
11769
12384
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
12385
|
+
var _typeMap$type13, _typeMap$type14, _typeMap$type15;
|
|
11770
12386
|
var newValue = _objectSpread2({}, value);
|
|
11771
|
-
newValue[
|
|
11772
|
-
newValue.
|
|
12387
|
+
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type13 = typeMap[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.typeName)] = val;
|
|
12388
|
+
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type14 = typeMap[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key)] = [];
|
|
11773
12389
|
if (['2', '4'].includes(val[0])) {
|
|
11774
12390
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
11775
12391
|
valueRef.current = newValue;
|
|
11776
12392
|
}
|
|
11777
|
-
pubsub.publish(
|
|
12393
|
+
pubsub.publish("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type15 = typeMap[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.reissueType), {
|
|
11778
12394
|
val: val[0],
|
|
11779
12395
|
goodValue: newValue
|
|
11780
12396
|
});
|
|
11781
12397
|
};
|
|
11782
12398
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
12399
|
+
var _typeMap$type16;
|
|
11783
12400
|
var newValue = _objectSpread2({}, value);
|
|
11784
|
-
newValue[
|
|
11785
|
-
|
|
11786
|
-
item.
|
|
12401
|
+
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type16 = typeMap[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.key)] = (val || []).map(function (item) {
|
|
12402
|
+
var _typeMap$type17, _typeMap$type18;
|
|
12403
|
+
item["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type17 = typeMap[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.formatDefaultField.money)] = 0;
|
|
12404
|
+
item["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type18 = typeMap[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.formatDefaultField.share)] = 0;
|
|
11787
12405
|
return item;
|
|
11788
12406
|
});
|
|
11789
12407
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
11790
12408
|
};
|
|
11791
12409
|
//显示选择商品按钮 原单换不显示选择商品
|
|
11792
12410
|
var showChangeBtn = useMemo(function () {
|
|
11793
|
-
var _value$
|
|
11794
|
-
return ['2', '3', '4'].includes(value === null || value === void 0 ? void 0 : (_value
|
|
11795
|
-
}, [value === null || value === void 0 ? void 0 : value.
|
|
12411
|
+
var _value, _typeMap$type19;
|
|
12412
|
+
return ['2', '3', '4'].includes(value === null || value === void 0 ? void 0 : (_value = value["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type19 = typeMap[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.typeName)]) === null || _value === void 0 ? void 0 : _value[0]);
|
|
12413
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.typeName]]);
|
|
11796
12414
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Cascader, {
|
|
11797
12415
|
style: {
|
|
11798
12416
|
marginBottom: '8px'
|
|
@@ -11800,18 +12418,19 @@ var BsReissue = function BsReissue(props) {
|
|
|
11800
12418
|
disabled: disabled,
|
|
11801
12419
|
allowClear: false,
|
|
11802
12420
|
options: reasonList,
|
|
11803
|
-
value: value === null || value === void 0 ? void 0 : value.
|
|
12421
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type21 = typeMap[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.typeName)],
|
|
11804
12422
|
onChange: function onChange(val) {
|
|
11805
12423
|
return changeTypeHandle(val);
|
|
11806
12424
|
}
|
|
11807
12425
|
}), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
11808
12426
|
key: 'reissueGoods'
|
|
11809
12427
|
}, other), {}, {
|
|
12428
|
+
type: type,
|
|
11810
12429
|
disabled: disabled,
|
|
11811
12430
|
canUpdateNumber: showChangeBtn,
|
|
11812
12431
|
showChangeBtn: showChangeBtn,
|
|
11813
12432
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
11814
|
-
value: value === null || value === void 0 ? void 0 : value.
|
|
12433
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type22 = typeMap[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)],
|
|
11815
12434
|
onChange: function onChange(val) {
|
|
11816
12435
|
return changeGoodHandle(val);
|
|
11817
12436
|
}
|
|
@@ -11923,6 +12542,10 @@ var columnsNameMap = {
|
|
|
11923
12542
|
WLN_SYSTEM_ORDER: {
|
|
11924
12543
|
typeName: '订单类型',
|
|
11925
12544
|
tagName: '标记'
|
|
12545
|
+
},
|
|
12546
|
+
WDT_SYSTEM_ORDER: {
|
|
12547
|
+
typeName: '订单类型',
|
|
12548
|
+
tagName: '订单标签'
|
|
11926
12549
|
}
|
|
11927
12550
|
};
|
|
11928
12551
|
var index$1 = (function (props) {
|
|
@@ -11937,6 +12560,8 @@ var index$1 = (function (props) {
|
|
|
11937
12560
|
getOrderList(value.orderNo);
|
|
11938
12561
|
} else if (type === 'WLN_SYSTEM_ORDER') {
|
|
11939
12562
|
getWlnOrderList(value.orderNo);
|
|
12563
|
+
} else if (type === 'WDT_SYSTEM_ORDER') {
|
|
12564
|
+
getWdtOrderList(value.orderNo);
|
|
11940
12565
|
}
|
|
11941
12566
|
}
|
|
11942
12567
|
}, [value, type]);
|
|
@@ -12037,6 +12662,51 @@ var index$1 = (function (props) {
|
|
|
12037
12662
|
return _ref2.apply(this, arguments);
|
|
12038
12663
|
};
|
|
12039
12664
|
}();
|
|
12665
|
+
var getWdtOrderList = /*#__PURE__*/function () {
|
|
12666
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(orderNo) {
|
|
12667
|
+
var _yield$request3, success, data;
|
|
12668
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
12669
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
12670
|
+
case 0:
|
|
12671
|
+
_context3.next = 2;
|
|
12672
|
+
return extendRequest('/qy/gdfw/order/wdtOrderDetail', {
|
|
12673
|
+
method: 'post',
|
|
12674
|
+
data: {
|
|
12675
|
+
billNo: orderNo
|
|
12676
|
+
}
|
|
12677
|
+
});
|
|
12678
|
+
case 2:
|
|
12679
|
+
_yield$request3 = _context3.sent;
|
|
12680
|
+
success = _yield$request3.success;
|
|
12681
|
+
data = _yield$request3.data;
|
|
12682
|
+
if (success) {
|
|
12683
|
+
_onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
12684
|
+
orders: ((data === null || data === void 0 ? void 0 : data.trades) || []).map(function (item) {
|
|
12685
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
12686
|
+
billNo: item.tradeNo,
|
|
12687
|
+
billType: WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
12688
|
+
billTag: item.tagName
|
|
12689
|
+
});
|
|
12690
|
+
}),
|
|
12691
|
+
showOrderInfo: data === null || data === void 0 ? void 0 : data.trades.map(function (item) {
|
|
12692
|
+
return {
|
|
12693
|
+
billNo: item.tradeNo,
|
|
12694
|
+
billType: WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
12695
|
+
billTag: item.tagName
|
|
12696
|
+
};
|
|
12697
|
+
})
|
|
12698
|
+
}));
|
|
12699
|
+
}
|
|
12700
|
+
case 6:
|
|
12701
|
+
case "end":
|
|
12702
|
+
return _context3.stop();
|
|
12703
|
+
}
|
|
12704
|
+
}, _callee3);
|
|
12705
|
+
}));
|
|
12706
|
+
return function getWdtOrderList(_x3) {
|
|
12707
|
+
return _ref3.apply(this, arguments);
|
|
12708
|
+
};
|
|
12709
|
+
}();
|
|
12040
12710
|
var rowSelection = {
|
|
12041
12711
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
|
|
12042
12712
|
fixed: true,
|
|
@@ -12091,13 +12761,165 @@ var WlnGoods = function WlnGoods(props) {
|
|
|
12091
12761
|
}));
|
|
12092
12762
|
};
|
|
12093
12763
|
|
|
12764
|
+
var componentMap$1 = {
|
|
12765
|
+
'WDT_GOODS': {
|
|
12766
|
+
type: 'wdt',
|
|
12767
|
+
key: 'wdtGoods',
|
|
12768
|
+
name: '旺店通',
|
|
12769
|
+
eventNameMap: {
|
|
12770
|
+
type: 'wdtType',
|
|
12771
|
+
selectListReturn: 'wdtSelectListReturn',
|
|
12772
|
+
selectList: 'wdtSelectList',
|
|
12773
|
+
reissueSelectList: 'wdtReissueSelectList',
|
|
12774
|
+
reissueSelectListReturn: 'wdtReissueSelectListReturn',
|
|
12775
|
+
reissueDeleteGood: 'wdtReissueDeleteGood',
|
|
12776
|
+
changeShopCode: 'wdtChangeShopCode',
|
|
12777
|
+
reissueType: 'wdtReissueType',
|
|
12778
|
+
returnType: 'wdtReturnType',
|
|
12779
|
+
returnSelectListReturn: 'wdtReturnSelectListReturn',
|
|
12780
|
+
deleteGood: 'wdtDeleteGood',
|
|
12781
|
+
returnDeleteGood: 'wdtReturnDeleteGood'
|
|
12782
|
+
}
|
|
12783
|
+
}
|
|
12784
|
+
};
|
|
12785
|
+
var CommonGoods = function CommonGoods(props) {
|
|
12786
|
+
var _withInfo$current3, _withInfo$current4;
|
|
12787
|
+
var value = props.value,
|
|
12788
|
+
disabled = props.disabled,
|
|
12789
|
+
onChange = props.onChange,
|
|
12790
|
+
compType = props.type;
|
|
12791
|
+
var _useState = useState(false),
|
|
12792
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12793
|
+
tableSelect = _useState2[0],
|
|
12794
|
+
setTableSelect = _useState2[1];
|
|
12795
|
+
var withInfo = useRef(null);
|
|
12796
|
+
var valueRef = useRef(null);
|
|
12797
|
+
useEffect(function () {
|
|
12798
|
+
valueRef.current = value;
|
|
12799
|
+
}, [value]);
|
|
12800
|
+
useEffect(function () {
|
|
12801
|
+
pubsub.subscribe(componentMap$1[compType].eventNameMap.type, function (type, data) {
|
|
12802
|
+
if (disabled) return;
|
|
12803
|
+
// console.log(type, data);
|
|
12804
|
+
withInfo.current = {
|
|
12805
|
+
type: type,
|
|
12806
|
+
val: data.val,
|
|
12807
|
+
goodValue: data.goodValue
|
|
12808
|
+
};
|
|
12809
|
+
setTableSelect(['2', '4'].includes(data.val));
|
|
12810
|
+
if (['1', '3'].includes(data.val)) {
|
|
12811
|
+
var _valueRef$current, _valueRef$current2;
|
|
12812
|
+
pubsub.publish(componentMap$1[compType].eventNameMap.selectListReturn, {
|
|
12813
|
+
list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current = valueRef.current) === null || _valueRef$current === void 0 ? void 0 : _valueRef$current[componentMap$1[compType].key]) || []),
|
|
12814
|
+
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.shopCode,
|
|
12815
|
+
goodValue: data === null || data === void 0 ? void 0 : data.goodValue
|
|
12816
|
+
});
|
|
12817
|
+
}
|
|
12818
|
+
});
|
|
12819
|
+
//补发
|
|
12820
|
+
pubsub.subscribe(componentMap$1[compType].eventNameMap.reissueType, function (type, data) {
|
|
12821
|
+
if (disabled) return;
|
|
12822
|
+
withInfo.current = {
|
|
12823
|
+
type: type,
|
|
12824
|
+
val: data.val,
|
|
12825
|
+
goodValue: data.goodValue
|
|
12826
|
+
};
|
|
12827
|
+
setTableSelect(['2', '4'].includes(data.val));
|
|
12828
|
+
if (['1', '3'].includes(data.val)) {
|
|
12829
|
+
var _valueRef$current3, _valueRef$current4;
|
|
12830
|
+
pubsub.publish(componentMap$1[compType].eventNameMap.reissueSelectListReturn, {
|
|
12831
|
+
list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current3 = valueRef.current) === null || _valueRef$current3 === void 0 ? void 0 : _valueRef$current3[componentMap$1[compType].key]) || []),
|
|
12832
|
+
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current4 = valueRef.current) === null || _valueRef$current4 === void 0 ? void 0 : _valueRef$current4.shopCode,
|
|
12833
|
+
goodValue: data === null || data === void 0 ? void 0 : data.goodValue
|
|
12834
|
+
});
|
|
12835
|
+
}
|
|
12836
|
+
});
|
|
12837
|
+
//退货
|
|
12838
|
+
pubsub.subscribe(componentMap$1[compType].eventNameMap.returnType, function (type, data) {
|
|
12839
|
+
if (disabled) return;
|
|
12840
|
+
withInfo.current = {
|
|
12841
|
+
type: type,
|
|
12842
|
+
val: data.val,
|
|
12843
|
+
goodValue: data.goodValue
|
|
12844
|
+
};
|
|
12845
|
+
setTableSelect(['2', '4'].includes(data.val));
|
|
12846
|
+
if (['1', '3'].includes(data.val)) {
|
|
12847
|
+
var _valueRef$current5, _valueRef$current6;
|
|
12848
|
+
pubsub.publish(componentMap$1[type].eventNameMap.returnSelectListReturn, {
|
|
12849
|
+
list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current5 = valueRef.current) === null || _valueRef$current5 === void 0 ? void 0 : _valueRef$current5[componentMap$1[compType].key]) || []),
|
|
12850
|
+
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current6 = valueRef.current) === null || _valueRef$current6 === void 0 ? void 0 : _valueRef$current6.shopCode,
|
|
12851
|
+
goodValue: data === null || data === void 0 ? void 0 : data.goodValue
|
|
12852
|
+
});
|
|
12853
|
+
}
|
|
12854
|
+
});
|
|
12855
|
+
pubsub.subscribeOnce(componentMap$1[compType].eventNameMap.changeShopCode, function (type, data) {
|
|
12856
|
+
// console.log(data);
|
|
12857
|
+
onChange(_objectSpread2(_objectSpread2({}, valueRef === null || valueRef === void 0 ? void 0 : valueRef.current), {}, {
|
|
12858
|
+
shopCode: data.shopCode
|
|
12859
|
+
}));
|
|
12860
|
+
});
|
|
12861
|
+
return function () {
|
|
12862
|
+
pubsub.clearAllSubscriptions();
|
|
12863
|
+
};
|
|
12864
|
+
}, [disabled]);
|
|
12865
|
+
var _onSelect = function onSelect(list) {
|
|
12866
|
+
var _withInfo$current, _withInfo$current2, _valueRef$current7;
|
|
12867
|
+
if (disabled) return;
|
|
12868
|
+
var newList = cloneDeep(list);
|
|
12869
|
+
var typeMap = _defineProperty({
|
|
12870
|
+
// type: componentMap[compType].eventNameMap.selectList,
|
|
12871
|
+
// returnType: componentMap[compType].eventNameMap.returnSelectList,
|
|
12872
|
+
// reissueType: componentMap[compType].eventNameMap.reissueSelectList,
|
|
12873
|
+
type: componentMap$1[compType].eventNameMap.selectList
|
|
12874
|
+
}, "".concat(componentMap$1[compType].type, "ReissueType"), componentMap$1[compType].eventNameMap.reissueSelectList);
|
|
12875
|
+
var type = typeMap[(_withInfo$current = withInfo.current) === null || _withInfo$current === void 0 ? void 0 : _withInfo$current.type];
|
|
12876
|
+
// console.log('onSelect', type, withInfo.current, newList);
|
|
12877
|
+
pubsub.publish(type, {
|
|
12878
|
+
type: (_withInfo$current2 = withInfo.current) === null || _withInfo$current2 === void 0 ? void 0 : _withInfo$current2.val,
|
|
12879
|
+
list: newList.map(function (item) {
|
|
12880
|
+
item.canDelete = true;
|
|
12881
|
+
return item;
|
|
12882
|
+
}),
|
|
12883
|
+
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current7 = valueRef.current) === null || _valueRef$current7 === void 0 ? void 0 : _valueRef$current7.shopCode,
|
|
12884
|
+
goodValue: withInfo.current.goodValue
|
|
12885
|
+
});
|
|
12886
|
+
};
|
|
12887
|
+
var _onDelete = function onDelete(item) {
|
|
12888
|
+
var deleteId = item === null || item === void 0 ? void 0 : item.specId;
|
|
12889
|
+
pubsub.publish(componentMap$1[compType].eventNameMap.deleteGood, deleteId);
|
|
12890
|
+
pubsub.publish(componentMap$1[compType].eventNameMap.reissueDeleteGood, deleteId);
|
|
12891
|
+
pubsub.publish(componentMap$1[compType].eventNameMap.returnDeleteGood, deleteId);
|
|
12892
|
+
};
|
|
12893
|
+
var changeHandle = function changeHandle(list) {
|
|
12894
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, componentMap$1[compType].key, list)));
|
|
12895
|
+
};
|
|
12896
|
+
return /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
12897
|
+
key: componentMap$1[compType].key
|
|
12898
|
+
}, props), {}, {
|
|
12899
|
+
disabled: disabled,
|
|
12900
|
+
value: value === null || value === void 0 ? void 0 : value[componentMap$1[compType].key],
|
|
12901
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
12902
|
+
tableSelect: ['2', '4'].includes(withInfo === null || withInfo === void 0 ? void 0 : (_withInfo$current3 = withInfo.current) === null || _withInfo$current3 === void 0 ? void 0 : _withInfo$current3.val),
|
|
12903
|
+
selectType: withInfo === null || withInfo === void 0 ? void 0 : (_withInfo$current4 = withInfo.current) === null || _withInfo$current4 === void 0 ? void 0 : _withInfo$current4.type,
|
|
12904
|
+
onSelect: function onSelect(list) {
|
|
12905
|
+
return _onSelect(list);
|
|
12906
|
+
},
|
|
12907
|
+
onDelete: function onDelete(item) {
|
|
12908
|
+
return _onDelete(item);
|
|
12909
|
+
},
|
|
12910
|
+
onChange: function onChange(val) {
|
|
12911
|
+
return changeHandle(val);
|
|
12912
|
+
}
|
|
12913
|
+
}));
|
|
12914
|
+
};
|
|
12915
|
+
|
|
12094
12916
|
var css_248z$a = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border: 1px solid #F2F3F5;\n margin: 0 10px 10px 0;\n text-align: center;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4E5969;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodMain {\n display: flex;\n flex-wrap: wrap;\n height: 265px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodMain .goodItem {\n width: 140px;\n height: 175px;\n padding: 11px 10px 0;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n margin-bottom: 10px;\n margin-right: 30px;\n border: 1px solid #e6e6e6;\n cursor: pointer;\n transition: border 0.3s;\n}\n.goodMain .goodItem .goodImg {\n width: 120px;\n height: 120px;\n}\n.goodMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodMain .goodItem.active {\n border: 1px solid #3089dc;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n";
|
|
12095
12917
|
styleInject(css_248z$a);
|
|
12096
12918
|
|
|
12097
12919
|
var TabPane$1 = Tabs.TabPane;
|
|
12098
12920
|
var Option$2 = Select.Option;
|
|
12099
12921
|
var Search$1 = Input.Search;
|
|
12100
|
-
var GoodsModal$
|
|
12922
|
+
var GoodsModal$4 = function GoodsModal(props) {
|
|
12101
12923
|
var onSubmit = props.onSubmit,
|
|
12102
12924
|
_onCancel = props.onCancel,
|
|
12103
12925
|
visible = props.visible,
|
|
@@ -12548,7 +13370,7 @@ var Goods$1 = function Goods(props, ref) {
|
|
|
12548
13370
|
};
|
|
12549
13371
|
return /*#__PURE__*/React.createElement("div", {
|
|
12550
13372
|
className: "goodsBox"
|
|
12551
|
-
}, /*#__PURE__*/React.createElement(GoodsModal$
|
|
13373
|
+
}, /*#__PURE__*/React.createElement(GoodsModal$4, {
|
|
12552
13374
|
visible: visible,
|
|
12553
13375
|
onSubmit: onSubmit,
|
|
12554
13376
|
type: type,
|
|
@@ -12853,4 +13675,4 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
12853
13675
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
12854
13676
|
};
|
|
12855
13677
|
|
|
12856
|
-
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, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonSystemOrder$1 as CommonMultiStatus, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId, WlnGoods };
|
|
13678
|
+
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, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId, WlnGoods };
|