@kmkf-fe-packages/basic-components 0.24.2-beta.7 → 0.25.0-alpha.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 +149 -991
- package/dist/index.js +147 -990
- package/dist/src/bs/component/GoodItem/index.d.ts +1 -1
- package/dist/src/index.d.ts +0 -1
- package/package.json +3 -3
- package/dist/src/bs/component/model/WdtGoodsModal.d.ts +0 -12
- package/dist/src/common/CommonGoods/index.d.ts +0 -3
package/dist/index.js
CHANGED
|
@@ -7380,7 +7380,6 @@ function ApaasRate(props) {
|
|
|
7380
7380
|
|
|
7381
7381
|
var addressData = kmkfUtils.AddressData.getInstance();
|
|
7382
7382
|
var bsAddressData = kmkfUtils.BsAddressData.getInstance();
|
|
7383
|
-
var wdtAddressData = kmkfUtils.WdtAddressData.getInstance();
|
|
7384
7383
|
var Province = function Province(props) {
|
|
7385
7384
|
var _props$type = props.type,
|
|
7386
7385
|
type = _props$type === void 0 ? 'workOrder' : _props$type,
|
|
@@ -7399,11 +7398,7 @@ var Province = function Province(props) {
|
|
|
7399
7398
|
while (1) switch (_context.prev = _context.next) {
|
|
7400
7399
|
case 0:
|
|
7401
7400
|
num++;
|
|
7402
|
-
options =
|
|
7403
|
-
bs: bsAddressData,
|
|
7404
|
-
wdt: wdtAddressData,
|
|
7405
|
-
workOrder: addressData
|
|
7406
|
-
}[type] || addressData).addressOptions || [];
|
|
7401
|
+
options = type !== 'bs' ? addressData.addressOptions || [] : bsAddressData.addressOptions || [];
|
|
7407
7402
|
if (!(options === null || options === void 0 ? void 0 : options.length) && num < 6) {
|
|
7408
7403
|
getBsAddress();
|
|
7409
7404
|
time.current = setTimeout(function () {
|
|
@@ -7545,11 +7540,7 @@ var IdentifyAddress = function IdentifyAddress(props) {
|
|
|
7545
7540
|
receiverMobile: val === null || val === void 0 ? void 0 : val.phone,
|
|
7546
7541
|
address: []
|
|
7547
7542
|
};
|
|
7548
|
-
var addressData =
|
|
7549
|
-
bs: kmkfUtils.BsAddressData,
|
|
7550
|
-
wdt: kmkfUtils.WdtAddressData,
|
|
7551
|
-
workOrder: kmkfUtils.AddressData
|
|
7552
|
-
}[type] || kmkfUtils.AddressData).getInstance();
|
|
7543
|
+
var addressData = type === 'bs' ? kmkfUtils.BsAddressData.getInstance() : kmkfUtils.AddressData.getInstance();
|
|
7553
7544
|
if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
|
|
7554
7545
|
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)];
|
|
7555
7546
|
}
|
|
@@ -11150,461 +11141,6 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
11150
11141
|
};
|
|
11151
11142
|
var GoodsModal$2 = /*#__PURE__*/React.forwardRef(GoodsModal$1);
|
|
11152
11143
|
|
|
11153
|
-
var RangePicker = antd.DatePicker.RangePicker;
|
|
11154
|
-
var columns$1 = [{
|
|
11155
|
-
dataIndex: 'index',
|
|
11156
|
-
title: 'NO',
|
|
11157
|
-
render: function render(val, record, index) {
|
|
11158
|
-
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11159
|
-
style: {
|
|
11160
|
-
width: 25
|
|
11161
|
-
}
|
|
11162
|
-
}, index + 1);
|
|
11163
|
-
},
|
|
11164
|
-
width: 100
|
|
11165
|
-
}, {
|
|
11166
|
-
dataIndex: 'goodName',
|
|
11167
|
-
title: '商品名称',
|
|
11168
|
-
width: 250,
|
|
11169
|
-
ellipsis: true
|
|
11170
|
-
}, {
|
|
11171
|
-
dataIndex: 'goodNo',
|
|
11172
|
-
title: '商品SPU编码',
|
|
11173
|
-
width: 200,
|
|
11174
|
-
ellipsis: true
|
|
11175
|
-
}, {
|
|
11176
|
-
dataIndex: 'goodId',
|
|
11177
|
-
title: 'SPUID',
|
|
11178
|
-
width: 200,
|
|
11179
|
-
ellipsis: true
|
|
11180
|
-
}, {
|
|
11181
|
-
dataIndex: 'specCount',
|
|
11182
|
-
title: '规格数',
|
|
11183
|
-
width: 100,
|
|
11184
|
-
ellipsis: true
|
|
11185
|
-
}];
|
|
11186
|
-
var expandedColumns = [{
|
|
11187
|
-
dataIndex: 'specName',
|
|
11188
|
-
title: '商品SKU名称',
|
|
11189
|
-
width: 200,
|
|
11190
|
-
ellipsis: true
|
|
11191
|
-
}, {
|
|
11192
|
-
dataIndex: 'specNo',
|
|
11193
|
-
title: '商品SKU编码',
|
|
11194
|
-
width: 200,
|
|
11195
|
-
ellipsis: true
|
|
11196
|
-
}, {
|
|
11197
|
-
dataIndex: 'specId',
|
|
11198
|
-
title: 'SKUID',
|
|
11199
|
-
width: 200,
|
|
11200
|
-
ellipsis: true
|
|
11201
|
-
}, {
|
|
11202
|
-
dataIndex: 'imgUrl',
|
|
11203
|
-
title: '商品图片',
|
|
11204
|
-
width: 100,
|
|
11205
|
-
render: function render(picUrl) {
|
|
11206
|
-
return /*#__PURE__*/React__default['default'].createElement("img", {
|
|
11207
|
-
style: {
|
|
11208
|
-
width: '40px',
|
|
11209
|
-
height: '40px',
|
|
11210
|
-
objectFit: 'contain'
|
|
11211
|
-
},
|
|
11212
|
-
src: picUrl
|
|
11213
|
-
});
|
|
11214
|
-
}
|
|
11215
|
-
}, {
|
|
11216
|
-
dataIndex: 'marketPrice',
|
|
11217
|
-
title: '市场价',
|
|
11218
|
-
width: 140
|
|
11219
|
-
}, {
|
|
11220
|
-
dataIndex: 'retailPrice',
|
|
11221
|
-
title: '零售价',
|
|
11222
|
-
width: 140
|
|
11223
|
-
}, {
|
|
11224
|
-
dataIndex: 'memberPrice',
|
|
11225
|
-
title: '会员价',
|
|
11226
|
-
width: 140
|
|
11227
|
-
}];
|
|
11228
|
-
var dateFormat = 'YYYY-MM-DD HH:mm:ss';
|
|
11229
|
-
var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
11230
|
-
var initStartTime = hooks().subtract(30, 'd');
|
|
11231
|
-
var initEndTime = hooks();
|
|
11232
|
-
React.useImperativeHandle(ref, function () {
|
|
11233
|
-
return {
|
|
11234
|
-
open: function open(shopCode) {
|
|
11235
|
-
setVisible(true);
|
|
11236
|
-
setPageNo(1);
|
|
11237
|
-
setSelect([]);
|
|
11238
|
-
setSelectIds([]);
|
|
11239
|
-
form.setFieldsValue({
|
|
11240
|
-
dateTimePicker: [initStartTime, initEndTime],
|
|
11241
|
-
code: ''
|
|
11242
|
-
});
|
|
11243
|
-
// getShopList();
|
|
11244
|
-
}
|
|
11245
|
-
};
|
|
11246
|
-
});
|
|
11247
|
-
|
|
11248
|
-
var onSubmit = props.onSubmit,
|
|
11249
|
-
shopId = props.shopId,
|
|
11250
|
-
shopList = props.shopList,
|
|
11251
|
-
width = props.width,
|
|
11252
|
-
companyKey = props.companyKey;
|
|
11253
|
-
var _useState = React.useState(false),
|
|
11254
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
11255
|
-
visible = _useState2[0],
|
|
11256
|
-
setVisible = _useState2[1];
|
|
11257
|
-
var _useState3 = React.useState([]),
|
|
11258
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
11259
|
-
selectList = _useState4[0],
|
|
11260
|
-
setSelect = _useState4[1];
|
|
11261
|
-
var _useState5 = React.useState([]),
|
|
11262
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
11263
|
-
selectIds = _useState6[0],
|
|
11264
|
-
setSelectIds = _useState6[1];
|
|
11265
|
-
var _useState7 = React.useState(1),
|
|
11266
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
11267
|
-
pageNo = _useState8[0],
|
|
11268
|
-
setPageNo = _useState8[1];
|
|
11269
|
-
var _useState9 = React.useState(20),
|
|
11270
|
-
_useState10 = _slicedToArray(_useState9, 1),
|
|
11271
|
-
pageSize = _useState10[0];
|
|
11272
|
-
var _useState11 = React.useState([]),
|
|
11273
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
11274
|
-
goodList = _useState12[0],
|
|
11275
|
-
setGoodList = _useState12[1];
|
|
11276
|
-
var _useState13 = React.useState(false),
|
|
11277
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
11278
|
-
loading = _useState14[0],
|
|
11279
|
-
setLoading = _useState14[1];
|
|
11280
|
-
var _useState15 = React.useState(0),
|
|
11281
|
-
_useState16 = _slicedToArray(_useState15, 2),
|
|
11282
|
-
total = _useState16[0],
|
|
11283
|
-
setTotal = _useState16[1];
|
|
11284
|
-
var displaySelectList = React.useMemo(function () {
|
|
11285
|
-
return selectList.map(function (item, i) {
|
|
11286
|
-
item.index = i + 1;
|
|
11287
|
-
return item;
|
|
11288
|
-
});
|
|
11289
|
-
}, [selectList]);
|
|
11290
|
-
React.useEffect(function () {
|
|
11291
|
-
if (visible) {
|
|
11292
|
-
queryItems();
|
|
11293
|
-
}
|
|
11294
|
-
}, [pageNo, visible]);
|
|
11295
|
-
var _Form$useForm = antd.Form.useForm(),
|
|
11296
|
-
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
11297
|
-
form = _Form$useForm2[0];
|
|
11298
|
-
//选择页码
|
|
11299
|
-
var pageChange = function pageChange(page) {
|
|
11300
|
-
setPageNo(page);
|
|
11301
|
-
};
|
|
11302
|
-
/**
|
|
11303
|
-
* 查询商品
|
|
11304
|
-
*/
|
|
11305
|
-
var queryItems = /*#__PURE__*/function () {
|
|
11306
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
11307
|
-
var search,
|
|
11308
|
-
_formData$dateTimePic,
|
|
11309
|
-
_formData$dateTimePic2,
|
|
11310
|
-
_formData$dateTimePic3,
|
|
11311
|
-
_formData$dateTimePic4,
|
|
11312
|
-
_formData$dateTimePic5,
|
|
11313
|
-
_formData$dateTimePic6,
|
|
11314
|
-
formData,
|
|
11315
|
-
startTime,
|
|
11316
|
-
endTime,
|
|
11317
|
-
params,
|
|
11318
|
-
res,
|
|
11319
|
-
_res$data,
|
|
11320
|
-
_res$data$productList,
|
|
11321
|
-
productList,
|
|
11322
|
-
_res$data$total,
|
|
11323
|
-
_total,
|
|
11324
|
-
errorMsg,
|
|
11325
|
-
newProducts,
|
|
11326
|
-
_args = arguments;
|
|
11327
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11328
|
-
while (1) switch (_context.prev = _context.next) {
|
|
11329
|
-
case 0:
|
|
11330
|
-
search = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
11331
|
-
_context.prev = 1;
|
|
11332
|
-
setLoading(true);
|
|
11333
|
-
formData = form.getFieldsValue();
|
|
11334
|
-
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);
|
|
11335
|
-
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);
|
|
11336
|
-
params = {
|
|
11337
|
-
// shopCode: shopCode,
|
|
11338
|
-
pageSize: pageSize,
|
|
11339
|
-
pageNo: pageNo - 1,
|
|
11340
|
-
goodNo: search.code,
|
|
11341
|
-
startTime: startTime,
|
|
11342
|
-
endTime: endTime
|
|
11343
|
-
};
|
|
11344
|
-
_context.next = 9;
|
|
11345
|
-
return extendRequest('/qy/gdfw/product/wdtListProduct', {
|
|
11346
|
-
method: 'post',
|
|
11347
|
-
data: params
|
|
11348
|
-
});
|
|
11349
|
-
case 9:
|
|
11350
|
-
res = _context.sent;
|
|
11351
|
-
_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;
|
|
11352
|
-
if (res.success) {
|
|
11353
|
-
newProducts = productList.map(function (item, index) {
|
|
11354
|
-
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
11355
|
-
index: index + 1
|
|
11356
|
-
});
|
|
11357
|
-
});
|
|
11358
|
-
setGoodList(_toConsumableArray(newProducts));
|
|
11359
|
-
if (pageNo === 1) {
|
|
11360
|
-
setTotal(_total);
|
|
11361
|
-
}
|
|
11362
|
-
} else {
|
|
11363
|
-
setGoodList([]);
|
|
11364
|
-
setTotal(0);
|
|
11365
|
-
antd.message.error(errorMsg || res.message);
|
|
11366
|
-
}
|
|
11367
|
-
case 12:
|
|
11368
|
-
_context.prev = 12;
|
|
11369
|
-
setLoading(false);
|
|
11370
|
-
return _context.finish(12);
|
|
11371
|
-
case 15:
|
|
11372
|
-
case "end":
|
|
11373
|
-
return _context.stop();
|
|
11374
|
-
}
|
|
11375
|
-
}, _callee, null, [[1,, 12, 15]]);
|
|
11376
|
-
}));
|
|
11377
|
-
return function queryItems() {
|
|
11378
|
-
return _ref.apply(this, arguments);
|
|
11379
|
-
};
|
|
11380
|
-
}();
|
|
11381
|
-
var _onCancel = function onCancel() {
|
|
11382
|
-
setVisible(false);
|
|
11383
|
-
};
|
|
11384
|
-
var onOk = function onOk() {
|
|
11385
|
-
onSubmit(selectList);
|
|
11386
|
-
_onCancel();
|
|
11387
|
-
};
|
|
11388
|
-
var onFinish = function onFinish(fieldsValue) {
|
|
11389
|
-
var searchValue = {
|
|
11390
|
-
code: fieldsValue.code
|
|
11391
|
-
};
|
|
11392
|
-
queryItems(searchValue);
|
|
11393
|
-
};
|
|
11394
|
-
var onReset = function onReset() {
|
|
11395
|
-
form.resetFields();
|
|
11396
|
-
form.setFieldsValue({
|
|
11397
|
-
dateTimePicker: [hooks().subtract(30, 'd'), hooks()],
|
|
11398
|
-
code: ''
|
|
11399
|
-
});
|
|
11400
|
-
setPageNo(function (prev) {
|
|
11401
|
-
if (prev === 1 && visible) {
|
|
11402
|
-
queryItems();
|
|
11403
|
-
}
|
|
11404
|
-
return 1;
|
|
11405
|
-
});
|
|
11406
|
-
};
|
|
11407
|
-
// const getShopList = async () => {
|
|
11408
|
-
// const { success, data } = await request('/qy/diamond/getConfigInfo', {
|
|
11409
|
-
// method: 'get',
|
|
11410
|
-
// params: {
|
|
11411
|
-
// key: 'company-third-shop-info',
|
|
11412
|
-
// },
|
|
11413
|
-
// });
|
|
11414
|
-
// const obj: any = JSON.parse(data || '{}');
|
|
11415
|
-
// if (success) {
|
|
11416
|
-
// const list = (obj?.[companyKey] || []).map((item: any) => {
|
|
11417
|
-
// return {
|
|
11418
|
-
// label: item.shopName,
|
|
11419
|
-
// value: item.shopCode,
|
|
11420
|
-
// };
|
|
11421
|
-
// });
|
|
11422
|
-
// setShopList(list);
|
|
11423
|
-
// }
|
|
11424
|
-
// };
|
|
11425
|
-
var onValuesChange = function onValuesChange(changedValues) {
|
|
11426
|
-
if (changedValues === null || changedValues === void 0 ? void 0 : changedValues['shopId']) {
|
|
11427
|
-
queryItems(changedValues === null || changedValues === void 0 ? void 0 : changedValues.shopId);
|
|
11428
|
-
pubsub__default['default'].publish('changeShopCode', {
|
|
11429
|
-
shopCode: changedValues.shopId
|
|
11430
|
-
});
|
|
11431
|
-
}
|
|
11432
|
-
};
|
|
11433
|
-
var handleDelete = function handleDelete(record, index) {
|
|
11434
|
-
var newSelectList = selectList.filter(function (item) {
|
|
11435
|
-
return item.specId !== record.specId;
|
|
11436
|
-
});
|
|
11437
|
-
setSelect(_toConsumableArray(newSelectList));
|
|
11438
|
-
setSelectIds(_toConsumableArray(newSelectList.map(function (item) {
|
|
11439
|
-
return item.specId;
|
|
11440
|
-
})));
|
|
11441
|
-
};
|
|
11442
|
-
var displaySelectedColumns = [{
|
|
11443
|
-
dataIndex: 'operation',
|
|
11444
|
-
title: '',
|
|
11445
|
-
ellipsis: true,
|
|
11446
|
-
width: 50,
|
|
11447
|
-
render: function render(_, record, index) {
|
|
11448
|
-
return /*#__PURE__*/React__default['default'].createElement(icons.DeleteOutlined, {
|
|
11449
|
-
onClick: function onClick() {
|
|
11450
|
-
return handleDelete(record);
|
|
11451
|
-
}
|
|
11452
|
-
});
|
|
11453
|
-
}
|
|
11454
|
-
}, {
|
|
11455
|
-
dataIndex: 'index',
|
|
11456
|
-
title: 'NO',
|
|
11457
|
-
width: 100,
|
|
11458
|
-
render: function render(val, record, index) {
|
|
11459
|
-
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11460
|
-
style: {
|
|
11461
|
-
width: 25
|
|
11462
|
-
}
|
|
11463
|
-
}, index + 1);
|
|
11464
|
-
}
|
|
11465
|
-
}, {
|
|
11466
|
-
dataIndex: 'goodName',
|
|
11467
|
-
title: '商品名称',
|
|
11468
|
-
width: 250,
|
|
11469
|
-
ellipsis: true
|
|
11470
|
-
}, {
|
|
11471
|
-
dataIndex: 'goodNo',
|
|
11472
|
-
title: "\u5546\u54C1SPU\u7F16\u7801",
|
|
11473
|
-
ellipsis: true,
|
|
11474
|
-
width: 200
|
|
11475
|
-
}];
|
|
11476
|
-
var expandedRowSelection = {
|
|
11477
|
-
fixed: true,
|
|
11478
|
-
selectedRowKeys: selectIds,
|
|
11479
|
-
onSelect: function onSelect(record, selected, selectedRows, nativeEvent) {
|
|
11480
|
-
var tempList = [];
|
|
11481
|
-
if (selected) {
|
|
11482
|
-
tempList = [].concat(_toConsumableArray(selectList), [record]);
|
|
11483
|
-
} else {
|
|
11484
|
-
tempList = selectList.filter(function (item) {
|
|
11485
|
-
return item.specId !== record.specId;
|
|
11486
|
-
});
|
|
11487
|
-
}
|
|
11488
|
-
setSelect(_toConsumableArray(tempList));
|
|
11489
|
-
setSelectIds(_toConsumableArray(tempList.map(function (item) {
|
|
11490
|
-
return item.specId;
|
|
11491
|
-
})));
|
|
11492
|
-
},
|
|
11493
|
-
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
11494
|
-
var tempAllList = [];
|
|
11495
|
-
if (selected) {
|
|
11496
|
-
tempAllList = [].concat(_toConsumableArray(selectList), _toConsumableArray(selectedRows.filter(Boolean)));
|
|
11497
|
-
} else {
|
|
11498
|
-
tempAllList = selectList.filter(function (list) {
|
|
11499
|
-
return changeRows.filter(Boolean).every(function (item) {
|
|
11500
|
-
return list.specId !== item.specId;
|
|
11501
|
-
});
|
|
11502
|
-
});
|
|
11503
|
-
}
|
|
11504
|
-
setSelect(_toConsumableArray(tempAllList));
|
|
11505
|
-
setSelectIds(_toConsumableArray(tempAllList.map(function (item) {
|
|
11506
|
-
return item.specId;
|
|
11507
|
-
})));
|
|
11508
|
-
}
|
|
11509
|
-
};
|
|
11510
|
-
var expandedRowRender = function expandedRowRender(record, index, indent, expanded) {
|
|
11511
|
-
return /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
11512
|
-
rowKey: 'specId',
|
|
11513
|
-
size: 'small',
|
|
11514
|
-
columns: expandedColumns,
|
|
11515
|
-
dataSource: record.itemDetailList || [],
|
|
11516
|
-
pagination: false,
|
|
11517
|
-
rowSelection: expandedRowSelection,
|
|
11518
|
-
scroll: {
|
|
11519
|
-
x: true
|
|
11520
|
-
}
|
|
11521
|
-
});
|
|
11522
|
-
};
|
|
11523
|
-
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
11524
|
-
title: '选择商品',
|
|
11525
|
-
okText: '确认',
|
|
11526
|
-
cancelText: '取消',
|
|
11527
|
-
visible: visible,
|
|
11528
|
-
width: width || 850,
|
|
11529
|
-
onCancel: function onCancel() {
|
|
11530
|
-
_onCancel();
|
|
11531
|
-
},
|
|
11532
|
-
onOk: onOk,
|
|
11533
|
-
wrapClassName: "goodModal"
|
|
11534
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Form, {
|
|
11535
|
-
layout: "inline",
|
|
11536
|
-
form: form,
|
|
11537
|
-
onFinish: onFinish,
|
|
11538
|
-
onValuesChange: onValuesChange,
|
|
11539
|
-
initialValues: {
|
|
11540
|
-
code: ''
|
|
11541
|
-
}
|
|
11542
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
11543
|
-
name: "dateTimePicker"
|
|
11544
|
-
}, /*#__PURE__*/React__default['default'].createElement(RangePicker, {
|
|
11545
|
-
placeholder: ['开始日期', '结束日期'],
|
|
11546
|
-
showTime: true,
|
|
11547
|
-
defaultValue: [hooks(initStartTime.format(dateFormat), dateFormat), hooks(initEndTime.format(dateFormat), dateFormat)]
|
|
11548
|
-
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
11549
|
-
name: "code"
|
|
11550
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11551
|
-
placeholder: "\u5546\u54C1SPU\u7F16\u7801",
|
|
11552
|
-
allowClear: true,
|
|
11553
|
-
style: {
|
|
11554
|
-
width: 150
|
|
11555
|
-
}
|
|
11556
|
-
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
11557
|
-
type: "primary",
|
|
11558
|
-
htmlType: "submit",
|
|
11559
|
-
style: {
|
|
11560
|
-
marginRight: '8px'
|
|
11561
|
-
}
|
|
11562
|
-
}, "\u67E5\u8BE2"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
11563
|
-
onClick: onReset
|
|
11564
|
-
}, "\u91CD\u7F6E"))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11565
|
-
style: {
|
|
11566
|
-
marginTop: '16px'
|
|
11567
|
-
}
|
|
11568
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
11569
|
-
rowKey: 'goodNo',
|
|
11570
|
-
columns: columns$1,
|
|
11571
|
-
dataSource: goodList,
|
|
11572
|
-
loading: loading,
|
|
11573
|
-
scroll: {
|
|
11574
|
-
x: '100%',
|
|
11575
|
-
y: 250
|
|
11576
|
-
},
|
|
11577
|
-
expandable: {
|
|
11578
|
-
expandedRowRender: expandedRowRender
|
|
11579
|
-
},
|
|
11580
|
-
pagination: {
|
|
11581
|
-
size: 'small',
|
|
11582
|
-
total: total,
|
|
11583
|
-
current: pageNo,
|
|
11584
|
-
pageSize: pageSize,
|
|
11585
|
-
pageSizeOptions: [],
|
|
11586
|
-
onChange: pageChange
|
|
11587
|
-
}
|
|
11588
|
-
})), !!selectList.length && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Space, null, "\u5DF2\u7ECF\u9009\u62E9\u5546\u54C1\uFF08", selectList.length, "\uFF09"), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11589
|
-
style: {
|
|
11590
|
-
marginTop: '16px'
|
|
11591
|
-
}
|
|
11592
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
11593
|
-
rowKey: 'specId',
|
|
11594
|
-
columns: [].concat(displaySelectedColumns, expandedColumns),
|
|
11595
|
-
dataSource: displaySelectList,
|
|
11596
|
-
pagination: false,
|
|
11597
|
-
scroll: {
|
|
11598
|
-
x: '100%',
|
|
11599
|
-
y: 250
|
|
11600
|
-
},
|
|
11601
|
-
style: {
|
|
11602
|
-
width: '100%'
|
|
11603
|
-
}
|
|
11604
|
-
})))));
|
|
11605
|
-
};
|
|
11606
|
-
var WdtGoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$3);
|
|
11607
|
-
|
|
11608
11144
|
// interface GoodsItem {
|
|
11609
11145
|
// title: string;
|
|
11610
11146
|
// pic: string;
|
|
@@ -11615,7 +11151,6 @@ var WdtGoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$3);
|
|
|
11615
11151
|
var GoodItem$1 = function GoodItem(props) {
|
|
11616
11152
|
var _props$value = props.value,
|
|
11617
11153
|
value = _props$value === void 0 ? [] : _props$value,
|
|
11618
|
-
type = props.type,
|
|
11619
11154
|
onChange = props.onChange,
|
|
11620
11155
|
disabled = props.disabled,
|
|
11621
11156
|
_props$showHeader = props.showHeader,
|
|
@@ -11663,214 +11198,105 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11663
11198
|
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(value));
|
|
11664
11199
|
}
|
|
11665
11200
|
};
|
|
11666
|
-
|
|
11201
|
+
//商品信息
|
|
11202
|
+
var GOODS_INFO_COLUMNS = function GOODS_INFO_COLUMNS() {
|
|
11667
11203
|
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
11668
|
-
return
|
|
11669
|
-
|
|
11670
|
-
|
|
11671
|
-
|
|
11672
|
-
|
|
11673
|
-
|
|
11674
|
-
|
|
11675
|
-
|
|
11676
|
-
|
|
11677
|
-
|
|
11678
|
-
|
|
11679
|
-
}, {
|
|
11680
|
-
dataIndex: 'goodNo',
|
|
11681
|
-
title: "\u5546\u54C1SPU\u7F16\u7801",
|
|
11682
|
-
align: 'center',
|
|
11683
|
-
ellipsis: true,
|
|
11684
|
-
width: 180
|
|
11685
|
-
}, {
|
|
11686
|
-
dataIndex: 'goodName',
|
|
11687
|
-
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
11688
|
-
align: 'center',
|
|
11689
|
-
ellipsis: true,
|
|
11690
|
-
width: 250
|
|
11691
|
-
}, {
|
|
11692
|
-
dataIndex: 'specId',
|
|
11693
|
-
title: "".concat(text, "SKUID"),
|
|
11694
|
-
align: 'center',
|
|
11695
|
-
ellipsis: true,
|
|
11696
|
-
width: 100
|
|
11697
|
-
}, {
|
|
11698
|
-
dataIndex: 'specNo',
|
|
11699
|
-
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
11700
|
-
align: 'center',
|
|
11701
|
-
ellipsis: true,
|
|
11702
|
-
width: 180
|
|
11703
|
-
}, {
|
|
11704
|
-
dataIndex: 'specName',
|
|
11705
|
-
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
11706
|
-
align: 'center',
|
|
11707
|
-
ellipsis: true,
|
|
11708
|
-
width: 250
|
|
11709
|
-
}, {
|
|
11710
|
-
dataIndex: 'orderPrice',
|
|
11711
|
-
title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
|
|
11712
|
-
align: 'center',
|
|
11713
|
-
ellipsis: true,
|
|
11714
|
-
width: 100
|
|
11715
|
-
}, {
|
|
11716
|
-
dataIndex: 'num',
|
|
11717
|
-
title: "".concat(text, "\u6570\u91CF"),
|
|
11718
|
-
align: 'center',
|
|
11719
|
-
ellipsis: true,
|
|
11720
|
-
width: 100,
|
|
11721
|
-
render: function render(val, record, index) {
|
|
11722
|
-
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
11723
|
-
style: {
|
|
11724
|
-
width: 70
|
|
11725
|
-
},
|
|
11726
|
-
value: val,
|
|
11727
|
-
min: 0,
|
|
11728
|
-
precision: 0,
|
|
11729
|
-
onChange: function onChange(num) {
|
|
11730
|
-
return updateHandle(num, index, 'num');
|
|
11731
|
-
}
|
|
11732
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
11733
|
-
}
|
|
11734
|
-
},
|
|
11735
|
-
// {
|
|
11736
|
-
// dataIndex: 'actualNum',
|
|
11737
|
-
// title: `${text}实发数量`,
|
|
11738
|
-
// align: 'center',
|
|
11739
|
-
// ellipsis: true,
|
|
11740
|
-
// width: 100,
|
|
11741
|
-
// },
|
|
11742
|
-
{
|
|
11743
|
-
dataIndex: 'sharePrice',
|
|
11744
|
-
title: "\u5206\u644A\u4EF7",
|
|
11745
|
-
align: 'center',
|
|
11746
|
-
ellipsis: true,
|
|
11747
|
-
width: 70
|
|
11748
|
-
}, {
|
|
11749
|
-
dataIndex: 'giftType',
|
|
11750
|
-
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
11751
|
-
align: 'center',
|
|
11752
|
-
ellipsis: true,
|
|
11753
|
-
width: 100,
|
|
11754
|
-
render: function render(val) {
|
|
11755
|
-
var giftTypeMap = {
|
|
11756
|
-
0: '非赠品',
|
|
11757
|
-
1: '自动赠送',
|
|
11758
|
-
2: '手工赠送',
|
|
11759
|
-
3: '回购自动送赠品',
|
|
11760
|
-
4: '前N有礼送赠品',
|
|
11761
|
-
6: '天猫优仓赠品',
|
|
11762
|
-
7: '淘宝CRM会员送赠'
|
|
11763
|
-
};
|
|
11764
|
-
return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
|
|
11765
|
-
}
|
|
11766
|
-
}];
|
|
11767
|
-
break;
|
|
11768
|
-
default:
|
|
11769
|
-
columns = [{
|
|
11770
|
-
dataIndex: 'mark',
|
|
11771
|
-
title: "\u5546\u54C1\u6807\u8BB0",
|
|
11772
|
-
align: 'center',
|
|
11773
|
-
ellipsis: true,
|
|
11774
|
-
width: 70,
|
|
11775
|
-
render: function render(val, record, index) {
|
|
11776
|
-
return /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
11777
|
-
options: [{
|
|
11778
|
-
label: '是',
|
|
11779
|
-
value: '是'
|
|
11780
|
-
}, {
|
|
11781
|
-
label: '否',
|
|
11782
|
-
value: '否'
|
|
11783
|
-
}],
|
|
11784
|
-
disabled: disabled,
|
|
11785
|
-
value: val,
|
|
11786
|
-
onChange: function onChange(val) {
|
|
11787
|
-
return updateHandle(val, index, 'mark');
|
|
11788
|
-
}
|
|
11789
|
-
});
|
|
11790
|
-
}
|
|
11791
|
-
}, {
|
|
11792
|
-
dataIndex: 'skuName',
|
|
11793
|
-
title: "".concat(text, "sku\u540D\u79F0"),
|
|
11794
|
-
align: 'center',
|
|
11795
|
-
ellipsis: true,
|
|
11796
|
-
width: 250
|
|
11797
|
-
}, {
|
|
11798
|
-
dataIndex: 'sku',
|
|
11799
|
-
title: "".concat(text, "sku\u7F16\u7801"),
|
|
11800
|
-
align: 'center',
|
|
11801
|
-
ellipsis: true,
|
|
11802
|
-
width: 100
|
|
11803
|
-
}, {
|
|
11804
|
-
dataIndex: 'name',
|
|
11805
|
-
title: "".concat(text, "\u540D\u79F0"),
|
|
11806
|
-
align: 'center',
|
|
11807
|
-
ellipsis: true,
|
|
11808
|
-
width: 250
|
|
11809
|
-
}, {
|
|
11810
|
-
dataIndex: 'pic',
|
|
11811
|
-
title: "\u56FE\u7247",
|
|
11812
|
-
align: 'center',
|
|
11813
|
-
ellipsis: true,
|
|
11814
|
-
width: 100,
|
|
11815
|
-
render: function render(val) {
|
|
11816
|
-
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
11817
|
-
width: 60,
|
|
11818
|
-
src: val
|
|
11819
|
-
});
|
|
11820
|
-
}
|
|
11821
|
-
}, {
|
|
11822
|
-
dataIndex: 'code',
|
|
11823
|
-
title: "".concat(text, "\u7F16\u7801"),
|
|
11824
|
-
align: 'center',
|
|
11825
|
-
ellipsis: true,
|
|
11826
|
-
width: 100
|
|
11827
|
-
}, {
|
|
11828
|
-
dataIndex: 'money',
|
|
11829
|
-
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
11830
|
-
align: 'center',
|
|
11831
|
-
ellipsis: true,
|
|
11832
|
-
width: 100
|
|
11833
|
-
}, {
|
|
11834
|
-
dataIndex: 'number',
|
|
11835
|
-
title: "".concat(text, "\u6570\u91CF"),
|
|
11836
|
-
align: 'center',
|
|
11837
|
-
ellipsis: true,
|
|
11838
|
-
width: 100,
|
|
11839
|
-
render: function render(val, record, index) {
|
|
11840
|
-
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
11841
|
-
style: {
|
|
11842
|
-
width: 70
|
|
11843
|
-
},
|
|
11844
|
-
value: val,
|
|
11845
|
-
min: 0,
|
|
11846
|
-
precision: 0,
|
|
11847
|
-
onChange: function onChange(num) {
|
|
11848
|
-
return updateHandle(num, index, 'number');
|
|
11849
|
-
}
|
|
11850
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
11851
|
-
}
|
|
11204
|
+
return [{
|
|
11205
|
+
dataIndex: 'mark',
|
|
11206
|
+
title: "\u5546\u54C1\u6807\u8BB0",
|
|
11207
|
+
align: 'center',
|
|
11208
|
+
ellipsis: true,
|
|
11209
|
+
width: 70,
|
|
11210
|
+
render: function render(val, record, index) {
|
|
11211
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
11212
|
+
options: [{
|
|
11213
|
+
label: '是',
|
|
11214
|
+
value: '是'
|
|
11852
11215
|
}, {
|
|
11853
|
-
|
|
11854
|
-
|
|
11855
|
-
|
|
11856
|
-
|
|
11216
|
+
label: '否',
|
|
11217
|
+
value: '否'
|
|
11218
|
+
}],
|
|
11219
|
+
disabled: disabled,
|
|
11220
|
+
value: val,
|
|
11221
|
+
onChange: function onChange(val) {
|
|
11222
|
+
return updateHandle(val, index, 'mark');
|
|
11223
|
+
}
|
|
11224
|
+
});
|
|
11225
|
+
}
|
|
11226
|
+
}, {
|
|
11227
|
+
dataIndex: 'skuName',
|
|
11228
|
+
title: "".concat(text, "sku\u540D\u79F0"),
|
|
11229
|
+
align: 'center',
|
|
11230
|
+
ellipsis: true,
|
|
11231
|
+
width: 250
|
|
11232
|
+
}, {
|
|
11233
|
+
dataIndex: 'sku',
|
|
11234
|
+
title: "".concat(text, "sku\u7F16\u7801"),
|
|
11235
|
+
align: 'center',
|
|
11236
|
+
ellipsis: true,
|
|
11237
|
+
width: 100
|
|
11238
|
+
}, {
|
|
11239
|
+
dataIndex: 'name',
|
|
11240
|
+
title: "".concat(text, "\u540D\u79F0"),
|
|
11241
|
+
align: 'center',
|
|
11242
|
+
ellipsis: true,
|
|
11243
|
+
width: 250
|
|
11244
|
+
}, {
|
|
11245
|
+
dataIndex: 'pic',
|
|
11246
|
+
title: "\u56FE\u7247",
|
|
11247
|
+
align: 'center',
|
|
11248
|
+
ellipsis: true,
|
|
11249
|
+
width: 100,
|
|
11250
|
+
render: function render(val) {
|
|
11251
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
11252
|
+
width: 60,
|
|
11253
|
+
src: val
|
|
11254
|
+
});
|
|
11255
|
+
}
|
|
11256
|
+
}, {
|
|
11257
|
+
dataIndex: 'code',
|
|
11258
|
+
title: "".concat(text, "\u7F16\u7801"),
|
|
11259
|
+
align: 'center',
|
|
11260
|
+
ellipsis: true,
|
|
11261
|
+
width: 100
|
|
11262
|
+
}, {
|
|
11263
|
+
dataIndex: 'money',
|
|
11264
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
11265
|
+
align: 'center',
|
|
11266
|
+
ellipsis: true,
|
|
11267
|
+
width: 100
|
|
11268
|
+
}, {
|
|
11269
|
+
dataIndex: 'number',
|
|
11270
|
+
title: "".concat(text, "\u6570\u91CF"),
|
|
11271
|
+
align: 'center',
|
|
11272
|
+
ellipsis: true,
|
|
11273
|
+
width: 100,
|
|
11274
|
+
render: function render(val, record, index) {
|
|
11275
|
+
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
11276
|
+
style: {
|
|
11857
11277
|
width: 70
|
|
11858
|
-
},
|
|
11859
|
-
|
|
11860
|
-
|
|
11861
|
-
|
|
11862
|
-
|
|
11863
|
-
|
|
11864
|
-
}
|
|
11278
|
+
},
|
|
11279
|
+
value: val,
|
|
11280
|
+
min: 0,
|
|
11281
|
+
precision: 0,
|
|
11282
|
+
onChange: function onChange(num) {
|
|
11283
|
+
return updateHandle(num, index, 'number');
|
|
11284
|
+
}
|
|
11285
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
11865
11286
|
}
|
|
11866
|
-
|
|
11867
|
-
|
|
11868
|
-
|
|
11869
|
-
|
|
11870
|
-
|
|
11871
|
-
|
|
11872
|
-
|
|
11873
|
-
|
|
11287
|
+
}, {
|
|
11288
|
+
dataIndex: 'share',
|
|
11289
|
+
title: "\u5206\u644A\u4EF7",
|
|
11290
|
+
align: 'center',
|
|
11291
|
+
ellipsis: true,
|
|
11292
|
+
width: 70
|
|
11293
|
+
}, {
|
|
11294
|
+
dataIndex: 'type',
|
|
11295
|
+
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
11296
|
+
align: 'center',
|
|
11297
|
+
ellipsis: true,
|
|
11298
|
+
width: 100
|
|
11299
|
+
}];
|
|
11874
11300
|
};
|
|
11875
11301
|
var newColumns = React.useMemo(function () {
|
|
11876
11302
|
var columnList = [{
|
|
@@ -11905,43 +11331,30 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11905
11331
|
return columnList;
|
|
11906
11332
|
}, [showHeader, value, disabled]);
|
|
11907
11333
|
var onSubmit = function onSubmit(list) {
|
|
11908
|
-
var newList =
|
|
11909
|
-
|
|
11910
|
-
|
|
11911
|
-
|
|
11912
|
-
|
|
11913
|
-
|
|
11914
|
-
|
|
11915
|
-
|
|
11916
|
-
|
|
11917
|
-
|
|
11918
|
-
|
|
11919
|
-
|
|
11920
|
-
|
|
11921
|
-
|
|
11922
|
-
|
|
11923
|
-
|
|
11924
|
-
|
|
11925
|
-
|
|
11926
|
-
|
|
11927
|
-
|
|
11928
|
-
|
|
11929
|
-
|
|
11930
|
-
|
|
11931
|
-
|
|
11932
|
-
name: name,
|
|
11933
|
-
code: code,
|
|
11934
|
-
sku: skuCode,
|
|
11935
|
-
money: marketPrice || 0,
|
|
11936
|
-
share: marketPrice || 0,
|
|
11937
|
-
number: 1,
|
|
11938
|
-
type: '',
|
|
11939
|
-
uuid: kmkfUtils.uuid(),
|
|
11940
|
-
canDelete: true,
|
|
11941
|
-
canUpdateNumber: canUpdateNumber
|
|
11942
|
-
};
|
|
11943
|
-
});
|
|
11944
|
-
}
|
|
11334
|
+
var newList = list.map(function (item) {
|
|
11335
|
+
var goodsId = item.goodsId,
|
|
11336
|
+
name = item.name,
|
|
11337
|
+
code = item.code,
|
|
11338
|
+
skuCode = item.skuCode,
|
|
11339
|
+
marketPrice = item.marketPrice,
|
|
11340
|
+
skuName = item.skuName;
|
|
11341
|
+
return {
|
|
11342
|
+
id: goodsId,
|
|
11343
|
+
mark: '是',
|
|
11344
|
+
pic: '',
|
|
11345
|
+
skuName: skuName,
|
|
11346
|
+
name: name,
|
|
11347
|
+
code: code,
|
|
11348
|
+
sku: skuCode,
|
|
11349
|
+
money: marketPrice || 0,
|
|
11350
|
+
share: marketPrice || 0,
|
|
11351
|
+
number: 1,
|
|
11352
|
+
type: '',
|
|
11353
|
+
uuid: kmkfUtils.uuid(),
|
|
11354
|
+
canDelete: true,
|
|
11355
|
+
canUpdateNumber: canUpdateNumber
|
|
11356
|
+
};
|
|
11357
|
+
});
|
|
11945
11358
|
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), _toConsumableArray(newList)));
|
|
11946
11359
|
};
|
|
11947
11360
|
var onSelectChange = function onSelectChange(newSelectedRowKeys) {
|
|
@@ -11984,15 +11397,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11984
11397
|
locale: {
|
|
11985
11398
|
emptyText: '暂无数据'
|
|
11986
11399
|
}
|
|
11987
|
-
})),
|
|
11988
|
-
ref: refModal,
|
|
11989
|
-
onSubmit: onSubmit,
|
|
11990
|
-
width: width,
|
|
11991
|
-
shopList: shopList,
|
|
11992
|
-
shopId: shopId,
|
|
11993
|
-
maxLength: maxLength,
|
|
11994
|
-
companyKey: companyKey
|
|
11995
|
-
}) : /*#__PURE__*/React__default['default'].createElement(GoodsModal$2, {
|
|
11400
|
+
})), /*#__PURE__*/React__default['default'].createElement(GoodsModal$2, {
|
|
11996
11401
|
ref: refModal,
|
|
11997
11402
|
onSubmit: onSubmit,
|
|
11998
11403
|
width: width,
|
|
@@ -12373,60 +11778,25 @@ var BsExchange = function BsExchange(props) {
|
|
|
12373
11778
|
}))) : null);
|
|
12374
11779
|
};
|
|
12375
11780
|
|
|
12376
|
-
var _excluded$e = ["value", "onChange", "reasonList", "disabled"
|
|
12377
|
-
var typeMap = {
|
|
12378
|
-
BS_REISSUE_GOODS: {
|
|
12379
|
-
key: 'bsReissueGoods',
|
|
12380
|
-
name: 'bs',
|
|
12381
|
-
typeName: 'bsReissueType',
|
|
12382
|
-
reissueSelectList: 'reissueSelectList',
|
|
12383
|
-
reissueSelectListReturn: 'reissueSelectListReturn',
|
|
12384
|
-
reissueDeleteGood: 'reissueDeleteGood',
|
|
12385
|
-
changeShopCode: 'changeShopCode',
|
|
12386
|
-
reissueType: 'reissueType',
|
|
12387
|
-
formatDefaultField: {
|
|
12388
|
-
money: 'money',
|
|
12389
|
-
share: 'share'
|
|
12390
|
-
}
|
|
12391
|
-
},
|
|
12392
|
-
WDT_REISSUE_GOODS: {
|
|
12393
|
-
key: 'wdtReissueGoods',
|
|
12394
|
-
name: '旺店通',
|
|
12395
|
-
typeName: 'wdtReissueType',
|
|
12396
|
-
reissueSelectList: 'wdtReissueSelectList',
|
|
12397
|
-
reissueSelectListReturn: 'wdtReissueSelectListReturn',
|
|
12398
|
-
reissueDeleteGood: 'wdtReissueDeleteGood',
|
|
12399
|
-
changeShopCode: 'wdtChangeShopCode',
|
|
12400
|
-
reissueType: 'wdtReissueType',
|
|
12401
|
-
formatDefaultField: {
|
|
12402
|
-
money: 'orderPrice',
|
|
12403
|
-
share: 'sharePrice'
|
|
12404
|
-
}
|
|
12405
|
-
}
|
|
12406
|
-
};
|
|
11781
|
+
var _excluded$e = ["value", "onChange", "reasonList", "disabled"];
|
|
12407
11782
|
var BsReissue = function BsReissue(props) {
|
|
12408
|
-
var _typeMap$type20, _typeMap$type21, _typeMap$type22;
|
|
12409
11783
|
var value = props.value,
|
|
12410
11784
|
onChange = props.onChange,
|
|
12411
11785
|
_props$reasonList = props.reasonList,
|
|
12412
11786
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
12413
11787
|
disabled = props.disabled,
|
|
12414
|
-
type = props.type,
|
|
12415
11788
|
other = _objectWithoutProperties(props, _excluded$e);
|
|
12416
11789
|
var valueRef = React.useRef({});
|
|
12417
11790
|
React.useEffect(function () {
|
|
12418
|
-
|
|
12419
|
-
pubsub__default['default'].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) {
|
|
12420
|
-
var _typeMap$type2;
|
|
11791
|
+
pubsub__default['default'].subscribe('reissueSelectList', function (_, data) {
|
|
12421
11792
|
// console.log('reissueSelectList', data);
|
|
12422
11793
|
if (disabled) return;
|
|
12423
11794
|
var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
|
|
12424
11795
|
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
12425
11796
|
});
|
|
12426
|
-
newValue
|
|
12427
|
-
|
|
12428
|
-
item
|
|
12429
|
-
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;
|
|
11797
|
+
newValue.bsReissueGoods = data === null || data === void 0 ? void 0 : data.list.map(function (item) {
|
|
11798
|
+
item.money = 0;
|
|
11799
|
+
item.share = 0;
|
|
12430
11800
|
item.canUpdateNumber = true;
|
|
12431
11801
|
return item;
|
|
12432
11802
|
});
|
|
@@ -12434,18 +11804,15 @@ var BsReissue = function BsReissue(props) {
|
|
|
12434
11804
|
});
|
|
12435
11805
|
}, []);
|
|
12436
11806
|
React.useEffect(function () {
|
|
12437
|
-
|
|
12438
|
-
pubsub__default['default'].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) {
|
|
12439
|
-
var _typeMap$type6;
|
|
11807
|
+
pubsub__default['default'].subscribe('reissueSelectListReturn', function (_, data) {
|
|
12440
11808
|
// console.log('reissueSelectListReturn', data);
|
|
12441
11809
|
if (disabled) return;
|
|
12442
11810
|
var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
|
|
12443
11811
|
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
12444
11812
|
});
|
|
12445
|
-
newValue
|
|
12446
|
-
|
|
12447
|
-
item
|
|
12448
|
-
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;
|
|
11813
|
+
newValue.bsReissueGoods = data === null || data === void 0 ? void 0 : data.list.map(function (item) {
|
|
11814
|
+
item.money = 0;
|
|
11815
|
+
item.share = 0;
|
|
12449
11816
|
item.canUpdateNumber = true;
|
|
12450
11817
|
return item;
|
|
12451
11818
|
});
|
|
@@ -12453,55 +11820,50 @@ var BsReissue = function BsReissue(props) {
|
|
|
12453
11820
|
});
|
|
12454
11821
|
}, []);
|
|
12455
11822
|
React.useEffect(function () {
|
|
12456
|
-
var _typeMap$type9, _typeMap$type12;
|
|
12457
11823
|
valueRef.current = value;
|
|
12458
|
-
pubsub__default['default'].subscribeOnce(
|
|
11824
|
+
pubsub__default['default'].subscribeOnce('reissueDeleteGood', function (_, data) {
|
|
12459
11825
|
if (disabled) return;
|
|
12460
11826
|
if (value) {
|
|
12461
|
-
var _typeMap$type10, _typeMap$type11;
|
|
12462
11827
|
var newValue = _objectSpread2({}, value);
|
|
12463
|
-
newValue
|
|
11828
|
+
newValue.bsReissueGoods = newValue.bsReissueGoods.filter(function (item) {
|
|
12464
11829
|
return item.sku !== data;
|
|
12465
11830
|
});
|
|
12466
11831
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
12467
11832
|
}
|
|
12468
11833
|
});
|
|
12469
|
-
pubsub__default['default'].subscribeOnce(
|
|
11834
|
+
pubsub__default['default'].subscribeOnce('changeShopCode', function (type, data) {
|
|
12470
11835
|
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
12471
11836
|
shopCode: data.shopCode
|
|
12472
11837
|
}));
|
|
12473
11838
|
});
|
|
12474
11839
|
}, [value, disabled]);
|
|
12475
11840
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
12476
|
-
var _typeMap$type13, _typeMap$type14, _typeMap$type15;
|
|
12477
11841
|
var newValue = _objectSpread2({}, value);
|
|
12478
|
-
newValue[
|
|
12479
|
-
newValue
|
|
11842
|
+
newValue['bsReissueType'] = val;
|
|
11843
|
+
newValue.bsReissueGoods = [];
|
|
12480
11844
|
if (['2', '4'].includes(val[0])) {
|
|
12481
11845
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
12482
11846
|
valueRef.current = newValue;
|
|
12483
11847
|
}
|
|
12484
|
-
pubsub__default['default'].publish(
|
|
11848
|
+
pubsub__default['default'].publish('reissueType', {
|
|
12485
11849
|
val: val[0],
|
|
12486
11850
|
goodValue: newValue
|
|
12487
11851
|
});
|
|
12488
11852
|
};
|
|
12489
11853
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
12490
|
-
var _typeMap$type16;
|
|
12491
11854
|
var newValue = _objectSpread2({}, value);
|
|
12492
|
-
newValue[
|
|
12493
|
-
|
|
12494
|
-
item
|
|
12495
|
-
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;
|
|
11855
|
+
newValue['bsReissueGoods'] = (val || []).map(function (item) {
|
|
11856
|
+
item.money = 0;
|
|
11857
|
+
item.share = 0;
|
|
12496
11858
|
return item;
|
|
12497
11859
|
});
|
|
12498
11860
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
12499
11861
|
};
|
|
12500
11862
|
//显示选择商品按钮 原单换不显示选择商品
|
|
12501
11863
|
var showChangeBtn = React.useMemo(function () {
|
|
12502
|
-
var _value
|
|
12503
|
-
return ['2', '3', '4'].includes(value === null || value === void 0 ? void 0 : (_value = value
|
|
12504
|
-
}, [value === null || value === void 0 ? void 0 : value
|
|
11864
|
+
var _value$bsReissueType;
|
|
11865
|
+
return ['2', '3', '4'].includes(value === null || value === void 0 ? void 0 : (_value$bsReissueType = value.bsReissueType) === null || _value$bsReissueType === void 0 ? void 0 : _value$bsReissueType[0]);
|
|
11866
|
+
}, [value === null || value === void 0 ? void 0 : value.bsReissueType]);
|
|
12505
11867
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
12506
11868
|
style: {
|
|
12507
11869
|
marginBottom: '8px'
|
|
@@ -12509,19 +11871,18 @@ var BsReissue = function BsReissue(props) {
|
|
|
12509
11871
|
disabled: disabled,
|
|
12510
11872
|
allowClear: false,
|
|
12511
11873
|
options: reasonList,
|
|
12512
|
-
value: value === null || value === void 0 ? void 0 : value
|
|
11874
|
+
value: value === null || value === void 0 ? void 0 : value.bsReissueType,
|
|
12513
11875
|
onChange: function onChange(val) {
|
|
12514
11876
|
return changeTypeHandle(val);
|
|
12515
11877
|
}
|
|
12516
11878
|
}), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
12517
11879
|
key: 'reissueGoods'
|
|
12518
11880
|
}, other), {}, {
|
|
12519
|
-
type: type,
|
|
12520
11881
|
disabled: disabled,
|
|
12521
11882
|
canUpdateNumber: showChangeBtn,
|
|
12522
11883
|
showChangeBtn: showChangeBtn,
|
|
12523
11884
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
12524
|
-
value: value === null || value === void 0 ? void 0 : value
|
|
11885
|
+
value: value === null || value === void 0 ? void 0 : value.bsReissueGoods,
|
|
12525
11886
|
onChange: function onChange(val) {
|
|
12526
11887
|
return changeGoodHandle(val);
|
|
12527
11888
|
}
|
|
@@ -12633,10 +11994,6 @@ var columnsNameMap = {
|
|
|
12633
11994
|
WLN_SYSTEM_ORDER: {
|
|
12634
11995
|
typeName: '订单类型',
|
|
12635
11996
|
tagName: '标记'
|
|
12636
|
-
},
|
|
12637
|
-
WDT_SYSTEM_ORDER: {
|
|
12638
|
-
typeName: '订单类型',
|
|
12639
|
-
tagName: '订单标签'
|
|
12640
11997
|
}
|
|
12641
11998
|
};
|
|
12642
11999
|
var index$1 = (function (props) {
|
|
@@ -12651,8 +12008,6 @@ var index$1 = (function (props) {
|
|
|
12651
12008
|
getOrderList(value.orderNo);
|
|
12652
12009
|
} else if (type === 'WLN_SYSTEM_ORDER') {
|
|
12653
12010
|
getWlnOrderList(value.orderNo);
|
|
12654
|
-
} else if (type === 'WDT_SYSTEM_ORDER') {
|
|
12655
|
-
getWdtOrderList(value.orderNo);
|
|
12656
12011
|
}
|
|
12657
12012
|
}
|
|
12658
12013
|
}, [value, type]);
|
|
@@ -12753,51 +12108,6 @@ var index$1 = (function (props) {
|
|
|
12753
12108
|
return _ref2.apply(this, arguments);
|
|
12754
12109
|
};
|
|
12755
12110
|
}();
|
|
12756
|
-
var getWdtOrderList = /*#__PURE__*/function () {
|
|
12757
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(orderNo) {
|
|
12758
|
-
var _yield$request3, success, data;
|
|
12759
|
-
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
12760
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
12761
|
-
case 0:
|
|
12762
|
-
_context3.next = 2;
|
|
12763
|
-
return extendRequest('/qy/gdfw/order/wdtOrderDetail', {
|
|
12764
|
-
method: 'post',
|
|
12765
|
-
data: {
|
|
12766
|
-
billNo: orderNo
|
|
12767
|
-
}
|
|
12768
|
-
});
|
|
12769
|
-
case 2:
|
|
12770
|
-
_yield$request3 = _context3.sent;
|
|
12771
|
-
success = _yield$request3.success;
|
|
12772
|
-
data = _yield$request3.data;
|
|
12773
|
-
if (success) {
|
|
12774
|
-
_onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
12775
|
-
orders: ((data === null || data === void 0 ? void 0 : data.trades) || []).map(function (item) {
|
|
12776
|
-
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
12777
|
-
billNo: item.tradeNo,
|
|
12778
|
-
billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
12779
|
-
billTag: item.tagName
|
|
12780
|
-
});
|
|
12781
|
-
}),
|
|
12782
|
-
showOrderInfo: data === null || data === void 0 ? void 0 : data.trades.map(function (item) {
|
|
12783
|
-
return {
|
|
12784
|
-
billNo: item.tradeNo,
|
|
12785
|
-
billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
12786
|
-
billTag: item.tagName
|
|
12787
|
-
};
|
|
12788
|
-
})
|
|
12789
|
-
}));
|
|
12790
|
-
}
|
|
12791
|
-
case 6:
|
|
12792
|
-
case "end":
|
|
12793
|
-
return _context3.stop();
|
|
12794
|
-
}
|
|
12795
|
-
}, _callee3);
|
|
12796
|
-
}));
|
|
12797
|
-
return function getWdtOrderList(_x3) {
|
|
12798
|
-
return _ref3.apply(this, arguments);
|
|
12799
|
-
};
|
|
12800
|
-
}();
|
|
12801
12111
|
var rowSelection = {
|
|
12802
12112
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
|
|
12803
12113
|
fixed: true,
|
|
@@ -12852,165 +12162,13 @@ var WlnGoods = function WlnGoods(props) {
|
|
|
12852
12162
|
}));
|
|
12853
12163
|
};
|
|
12854
12164
|
|
|
12855
|
-
var componentMap$1 = {
|
|
12856
|
-
'WDT_GOODS': {
|
|
12857
|
-
type: 'wdt',
|
|
12858
|
-
key: 'wdtGoods',
|
|
12859
|
-
name: '旺店通',
|
|
12860
|
-
eventNameMap: {
|
|
12861
|
-
type: 'wdtType',
|
|
12862
|
-
selectListReturn: 'wdtSelectListReturn',
|
|
12863
|
-
selectList: 'wdtSelectList',
|
|
12864
|
-
reissueSelectList: 'wdtReissueSelectList',
|
|
12865
|
-
reissueSelectListReturn: 'wdtReissueSelectListReturn',
|
|
12866
|
-
reissueDeleteGood: 'wdtReissueDeleteGood',
|
|
12867
|
-
changeShopCode: 'wdtChangeShopCode',
|
|
12868
|
-
reissueType: 'wdtReissueType',
|
|
12869
|
-
returnType: 'wdtReturnType',
|
|
12870
|
-
returnSelectListReturn: 'wdtReturnSelectListReturn',
|
|
12871
|
-
deleteGood: 'wdtDeleteGood',
|
|
12872
|
-
returnDeleteGood: 'wdtReturnDeleteGood'
|
|
12873
|
-
}
|
|
12874
|
-
}
|
|
12875
|
-
};
|
|
12876
|
-
var CommonGoods = function CommonGoods(props) {
|
|
12877
|
-
var _withInfo$current3, _withInfo$current4;
|
|
12878
|
-
var value = props.value,
|
|
12879
|
-
disabled = props.disabled,
|
|
12880
|
-
onChange = props.onChange,
|
|
12881
|
-
compType = props.type;
|
|
12882
|
-
var _useState = React.useState(false),
|
|
12883
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
12884
|
-
tableSelect = _useState2[0],
|
|
12885
|
-
setTableSelect = _useState2[1];
|
|
12886
|
-
var withInfo = React.useRef(null);
|
|
12887
|
-
var valueRef = React.useRef(null);
|
|
12888
|
-
React.useEffect(function () {
|
|
12889
|
-
valueRef.current = value;
|
|
12890
|
-
}, [value]);
|
|
12891
|
-
React.useEffect(function () {
|
|
12892
|
-
pubsub__default['default'].subscribe(componentMap$1[compType].eventNameMap.type, function (type, data) {
|
|
12893
|
-
if (disabled) return;
|
|
12894
|
-
// console.log(type, data);
|
|
12895
|
-
withInfo.current = {
|
|
12896
|
-
type: type,
|
|
12897
|
-
val: data.val,
|
|
12898
|
-
goodValue: data.goodValue
|
|
12899
|
-
};
|
|
12900
|
-
setTableSelect(['2', '4'].includes(data.val));
|
|
12901
|
-
if (['1', '3'].includes(data.val)) {
|
|
12902
|
-
var _valueRef$current, _valueRef$current2;
|
|
12903
|
-
pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.selectListReturn, {
|
|
12904
|
-
list: lodash.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]) || []),
|
|
12905
|
-
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.shopCode,
|
|
12906
|
-
goodValue: data === null || data === void 0 ? void 0 : data.goodValue
|
|
12907
|
-
});
|
|
12908
|
-
}
|
|
12909
|
-
});
|
|
12910
|
-
//补发
|
|
12911
|
-
pubsub__default['default'].subscribe(componentMap$1[compType].eventNameMap.reissueType, function (type, data) {
|
|
12912
|
-
if (disabled) return;
|
|
12913
|
-
withInfo.current = {
|
|
12914
|
-
type: type,
|
|
12915
|
-
val: data.val,
|
|
12916
|
-
goodValue: data.goodValue
|
|
12917
|
-
};
|
|
12918
|
-
setTableSelect(['2', '4'].includes(data.val));
|
|
12919
|
-
if (['1', '3'].includes(data.val)) {
|
|
12920
|
-
var _valueRef$current3, _valueRef$current4;
|
|
12921
|
-
pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.reissueSelectListReturn, {
|
|
12922
|
-
list: lodash.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]) || []),
|
|
12923
|
-
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current4 = valueRef.current) === null || _valueRef$current4 === void 0 ? void 0 : _valueRef$current4.shopCode,
|
|
12924
|
-
goodValue: data === null || data === void 0 ? void 0 : data.goodValue
|
|
12925
|
-
});
|
|
12926
|
-
}
|
|
12927
|
-
});
|
|
12928
|
-
//退货
|
|
12929
|
-
pubsub__default['default'].subscribe(componentMap$1[compType].eventNameMap.returnType, function (type, data) {
|
|
12930
|
-
if (disabled) return;
|
|
12931
|
-
withInfo.current = {
|
|
12932
|
-
type: type,
|
|
12933
|
-
val: data.val,
|
|
12934
|
-
goodValue: data.goodValue
|
|
12935
|
-
};
|
|
12936
|
-
setTableSelect(['2', '4'].includes(data.val));
|
|
12937
|
-
if (['1', '3'].includes(data.val)) {
|
|
12938
|
-
var _valueRef$current5, _valueRef$current6;
|
|
12939
|
-
pubsub__default['default'].publish(componentMap$1[type].eventNameMap.returnSelectListReturn, {
|
|
12940
|
-
list: lodash.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]) || []),
|
|
12941
|
-
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current6 = valueRef.current) === null || _valueRef$current6 === void 0 ? void 0 : _valueRef$current6.shopCode,
|
|
12942
|
-
goodValue: data === null || data === void 0 ? void 0 : data.goodValue
|
|
12943
|
-
});
|
|
12944
|
-
}
|
|
12945
|
-
});
|
|
12946
|
-
pubsub__default['default'].subscribeOnce(componentMap$1[compType].eventNameMap.changeShopCode, function (type, data) {
|
|
12947
|
-
// console.log(data);
|
|
12948
|
-
onChange(_objectSpread2(_objectSpread2({}, valueRef === null || valueRef === void 0 ? void 0 : valueRef.current), {}, {
|
|
12949
|
-
shopCode: data.shopCode
|
|
12950
|
-
}));
|
|
12951
|
-
});
|
|
12952
|
-
return function () {
|
|
12953
|
-
pubsub__default['default'].clearAllSubscriptions();
|
|
12954
|
-
};
|
|
12955
|
-
}, [disabled]);
|
|
12956
|
-
var _onSelect = function onSelect(list) {
|
|
12957
|
-
var _withInfo$current, _withInfo$current2, _valueRef$current7;
|
|
12958
|
-
if (disabled) return;
|
|
12959
|
-
var newList = lodash.cloneDeep(list);
|
|
12960
|
-
var typeMap = _defineProperty({
|
|
12961
|
-
// type: componentMap[compType].eventNameMap.selectList,
|
|
12962
|
-
// returnType: componentMap[compType].eventNameMap.returnSelectList,
|
|
12963
|
-
// reissueType: componentMap[compType].eventNameMap.reissueSelectList,
|
|
12964
|
-
type: componentMap$1[compType].eventNameMap.selectList
|
|
12965
|
-
}, "".concat(componentMap$1[compType].type, "ReissueType"), componentMap$1[compType].eventNameMap.reissueSelectList);
|
|
12966
|
-
var type = typeMap[(_withInfo$current = withInfo.current) === null || _withInfo$current === void 0 ? void 0 : _withInfo$current.type];
|
|
12967
|
-
// console.log('onSelect', type, withInfo.current, newList);
|
|
12968
|
-
pubsub__default['default'].publish(type, {
|
|
12969
|
-
type: (_withInfo$current2 = withInfo.current) === null || _withInfo$current2 === void 0 ? void 0 : _withInfo$current2.val,
|
|
12970
|
-
list: newList.map(function (item) {
|
|
12971
|
-
item.canDelete = true;
|
|
12972
|
-
return item;
|
|
12973
|
-
}),
|
|
12974
|
-
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current7 = valueRef.current) === null || _valueRef$current7 === void 0 ? void 0 : _valueRef$current7.shopCode,
|
|
12975
|
-
goodValue: withInfo.current.goodValue
|
|
12976
|
-
});
|
|
12977
|
-
};
|
|
12978
|
-
var _onDelete = function onDelete(item) {
|
|
12979
|
-
var deleteId = item === null || item === void 0 ? void 0 : item.specId;
|
|
12980
|
-
pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.deleteGood, deleteId);
|
|
12981
|
-
pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.reissueDeleteGood, deleteId);
|
|
12982
|
-
pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.returnDeleteGood, deleteId);
|
|
12983
|
-
};
|
|
12984
|
-
var changeHandle = function changeHandle(list) {
|
|
12985
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, componentMap$1[compType].key, list)));
|
|
12986
|
-
};
|
|
12987
|
-
return /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
12988
|
-
key: componentMap$1[compType].key
|
|
12989
|
-
}, props), {}, {
|
|
12990
|
-
disabled: disabled,
|
|
12991
|
-
value: value === null || value === void 0 ? void 0 : value[componentMap$1[compType].key],
|
|
12992
|
-
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
12993
|
-
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),
|
|
12994
|
-
selectType: withInfo === null || withInfo === void 0 ? void 0 : (_withInfo$current4 = withInfo.current) === null || _withInfo$current4 === void 0 ? void 0 : _withInfo$current4.type,
|
|
12995
|
-
onSelect: function onSelect(list) {
|
|
12996
|
-
return _onSelect(list);
|
|
12997
|
-
},
|
|
12998
|
-
onDelete: function onDelete(item) {
|
|
12999
|
-
return _onDelete(item);
|
|
13000
|
-
},
|
|
13001
|
-
onChange: function onChange(val) {
|
|
13002
|
-
return changeHandle(val);
|
|
13003
|
-
}
|
|
13004
|
-
}));
|
|
13005
|
-
};
|
|
13006
|
-
|
|
13007
12165
|
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";
|
|
13008
12166
|
styleInject(css_248z$a);
|
|
13009
12167
|
|
|
13010
12168
|
var TabPane$1 = antd.Tabs.TabPane;
|
|
13011
12169
|
var Option$2 = antd.Select.Option;
|
|
13012
12170
|
var Search$1 = antd.Input.Search;
|
|
13013
|
-
var GoodsModal$
|
|
12171
|
+
var GoodsModal$3 = function GoodsModal(props) {
|
|
13014
12172
|
var onSubmit = props.onSubmit,
|
|
13015
12173
|
_onCancel = props.onCancel,
|
|
13016
12174
|
visible = props.visible,
|
|
@@ -13461,7 +12619,7 @@ var Goods$1 = function Goods(props, ref) {
|
|
|
13461
12619
|
};
|
|
13462
12620
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
13463
12621
|
className: "goodsBox"
|
|
13464
|
-
}, /*#__PURE__*/React__default['default'].createElement(GoodsModal$
|
|
12622
|
+
}, /*#__PURE__*/React__default['default'].createElement(GoodsModal$3, {
|
|
13465
12623
|
visible: visible,
|
|
13466
12624
|
onSubmit: onSubmit,
|
|
13467
12625
|
type: type,
|
|
@@ -13794,7 +12952,6 @@ exports.BsSystemOrder = index$1;
|
|
|
13794
12952
|
exports.BuyerNick = BuyerNick;
|
|
13795
12953
|
exports.CalculationInput = CalculationInput;
|
|
13796
12954
|
exports.ChooseBaby = ChooseBaby;
|
|
13797
|
-
exports.CommonGoods = CommonGoods;
|
|
13798
12955
|
exports.CommonMultiStatus = CommonSystemOrder$1;
|
|
13799
12956
|
exports.CommonStatus = CommonStatus;
|
|
13800
12957
|
exports.CommonSystemOrder = CommonSystemOrder;
|