@kmkf-fe-packages/basic-components 0.25.2 → 0.25.3-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -7390,6 +7390,7 @@ function ApaasRate(props) {
|
|
|
7390
7390
|
|
|
7391
7391
|
var addressData = kmkfUtils.AddressData.getInstance();
|
|
7392
7392
|
var bsAddressData = kmkfUtils.BsAddressData.getInstance();
|
|
7393
|
+
var wdtAddressData = kmkfUtils.WdtAddressData.getInstance();
|
|
7393
7394
|
var Province = function Province(props) {
|
|
7394
7395
|
var _props$type = props.type,
|
|
7395
7396
|
type = _props$type === void 0 ? 'workOrder' : _props$type,
|
|
@@ -7408,7 +7409,11 @@ var Province = function Province(props) {
|
|
|
7408
7409
|
while (1) switch (_context.prev = _context.next) {
|
|
7409
7410
|
case 0:
|
|
7410
7411
|
num++;
|
|
7411
|
-
options =
|
|
7412
|
+
options = ({
|
|
7413
|
+
bs: bsAddressData,
|
|
7414
|
+
wdt: wdtAddressData,
|
|
7415
|
+
workOrder: addressData
|
|
7416
|
+
}[type] || addressData).addressOptions || [];
|
|
7412
7417
|
if (!(options === null || options === void 0 ? void 0 : options.length) && num < 6) {
|
|
7413
7418
|
time.current = setTimeout(function () {
|
|
7414
7419
|
initPageSource();
|
|
@@ -7547,7 +7552,11 @@ var IdentifyAddress = function IdentifyAddress(props) {
|
|
|
7547
7552
|
receiverMobile: val === null || val === void 0 ? void 0 : val.phone,
|
|
7548
7553
|
address: []
|
|
7549
7554
|
};
|
|
7550
|
-
var addressData = type
|
|
7555
|
+
var addressData = (type && {
|
|
7556
|
+
bs: kmkfUtils.BsAddressData,
|
|
7557
|
+
wdt: kmkfUtils.WdtAddressData,
|
|
7558
|
+
workOrder: kmkfUtils.AddressData
|
|
7559
|
+
}[type] || kmkfUtils.AddressData).getInstance();
|
|
7551
7560
|
if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
|
|
7552
7561
|
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)];
|
|
7553
7562
|
}
|
|
@@ -11091,6 +11100,461 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
11091
11100
|
};
|
|
11092
11101
|
var GoodsModal$2 = /*#__PURE__*/React.forwardRef(GoodsModal$1);
|
|
11093
11102
|
|
|
11103
|
+
var RangePicker = antd.DatePicker.RangePicker;
|
|
11104
|
+
var columns$1 = [{
|
|
11105
|
+
dataIndex: 'index',
|
|
11106
|
+
title: 'NO',
|
|
11107
|
+
render: function render(val, record, index) {
|
|
11108
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11109
|
+
style: {
|
|
11110
|
+
width: 25
|
|
11111
|
+
}
|
|
11112
|
+
}, index + 1);
|
|
11113
|
+
},
|
|
11114
|
+
width: 100
|
|
11115
|
+
}, {
|
|
11116
|
+
dataIndex: 'goodName',
|
|
11117
|
+
title: '商品名称',
|
|
11118
|
+
width: 250,
|
|
11119
|
+
ellipsis: true
|
|
11120
|
+
}, {
|
|
11121
|
+
dataIndex: 'goodNo',
|
|
11122
|
+
title: '商品SPU编码',
|
|
11123
|
+
width: 200,
|
|
11124
|
+
ellipsis: true
|
|
11125
|
+
}, {
|
|
11126
|
+
dataIndex: 'goodId',
|
|
11127
|
+
title: 'SPUID',
|
|
11128
|
+
width: 200,
|
|
11129
|
+
ellipsis: true
|
|
11130
|
+
}, {
|
|
11131
|
+
dataIndex: 'specCount',
|
|
11132
|
+
title: '规格数',
|
|
11133
|
+
width: 100,
|
|
11134
|
+
ellipsis: true
|
|
11135
|
+
}];
|
|
11136
|
+
var expandedColumns = [{
|
|
11137
|
+
dataIndex: 'specName',
|
|
11138
|
+
title: '商品SKU名称',
|
|
11139
|
+
width: 250,
|
|
11140
|
+
ellipsis: true
|
|
11141
|
+
}, {
|
|
11142
|
+
dataIndex: 'specNo',
|
|
11143
|
+
title: '商品SKU编码',
|
|
11144
|
+
width: 200,
|
|
11145
|
+
ellipsis: true
|
|
11146
|
+
}, {
|
|
11147
|
+
dataIndex: 'specId',
|
|
11148
|
+
title: 'SKUID',
|
|
11149
|
+
width: 200,
|
|
11150
|
+
ellipsis: true
|
|
11151
|
+
}, {
|
|
11152
|
+
dataIndex: 'imgUrl',
|
|
11153
|
+
title: '商品图片',
|
|
11154
|
+
width: 100,
|
|
11155
|
+
render: function render(picUrl) {
|
|
11156
|
+
return /*#__PURE__*/React__default['default'].createElement("img", {
|
|
11157
|
+
style: {
|
|
11158
|
+
width: '40px',
|
|
11159
|
+
height: '40px',
|
|
11160
|
+
objectFit: 'contain'
|
|
11161
|
+
},
|
|
11162
|
+
src: picUrl
|
|
11163
|
+
});
|
|
11164
|
+
}
|
|
11165
|
+
}, {
|
|
11166
|
+
dataIndex: 'marketPrice',
|
|
11167
|
+
title: '市场价',
|
|
11168
|
+
width: 140
|
|
11169
|
+
}, {
|
|
11170
|
+
dataIndex: 'retailPrice',
|
|
11171
|
+
title: '零售价',
|
|
11172
|
+
width: 140
|
|
11173
|
+
}, {
|
|
11174
|
+
dataIndex: 'memberPrice',
|
|
11175
|
+
title: '会员价',
|
|
11176
|
+
width: 140
|
|
11177
|
+
}];
|
|
11178
|
+
var dateFormat = 'YYYY-MM-DD HH:mm:ss';
|
|
11179
|
+
var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
11180
|
+
var initStartTime = hooks().subtract(30, 'd');
|
|
11181
|
+
var initEndTime = hooks();
|
|
11182
|
+
React.useImperativeHandle(ref, function () {
|
|
11183
|
+
return {
|
|
11184
|
+
open: function open(shopCode) {
|
|
11185
|
+
setVisible(true);
|
|
11186
|
+
setPageNo(1);
|
|
11187
|
+
setSelect([]);
|
|
11188
|
+
setSelectIds([]);
|
|
11189
|
+
form.setFieldsValue({
|
|
11190
|
+
dateTimePicker: [initStartTime, initEndTime],
|
|
11191
|
+
code: ''
|
|
11192
|
+
});
|
|
11193
|
+
// getShopList();
|
|
11194
|
+
}
|
|
11195
|
+
};
|
|
11196
|
+
});
|
|
11197
|
+
|
|
11198
|
+
var onSubmit = props.onSubmit,
|
|
11199
|
+
shopId = props.shopId,
|
|
11200
|
+
shopList = props.shopList,
|
|
11201
|
+
width = props.width,
|
|
11202
|
+
companyKey = props.companyKey;
|
|
11203
|
+
var _useState = React.useState(false),
|
|
11204
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
11205
|
+
visible = _useState2[0],
|
|
11206
|
+
setVisible = _useState2[1];
|
|
11207
|
+
var _useState3 = React.useState([]),
|
|
11208
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
11209
|
+
selectList = _useState4[0],
|
|
11210
|
+
setSelect = _useState4[1];
|
|
11211
|
+
var _useState5 = React.useState([]),
|
|
11212
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
11213
|
+
selectIds = _useState6[0],
|
|
11214
|
+
setSelectIds = _useState6[1];
|
|
11215
|
+
var _useState7 = React.useState(1),
|
|
11216
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
11217
|
+
pageNo = _useState8[0],
|
|
11218
|
+
setPageNo = _useState8[1];
|
|
11219
|
+
var _useState9 = React.useState(20),
|
|
11220
|
+
_useState10 = _slicedToArray(_useState9, 1),
|
|
11221
|
+
pageSize = _useState10[0];
|
|
11222
|
+
var _useState11 = React.useState([]),
|
|
11223
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
11224
|
+
goodList = _useState12[0],
|
|
11225
|
+
setGoodList = _useState12[1];
|
|
11226
|
+
var _useState13 = React.useState(false),
|
|
11227
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
11228
|
+
loading = _useState14[0],
|
|
11229
|
+
setLoading = _useState14[1];
|
|
11230
|
+
var _useState15 = React.useState(0),
|
|
11231
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
11232
|
+
total = _useState16[0],
|
|
11233
|
+
setTotal = _useState16[1];
|
|
11234
|
+
var displaySelectList = React.useMemo(function () {
|
|
11235
|
+
return selectList.map(function (item, i) {
|
|
11236
|
+
item.index = i + 1;
|
|
11237
|
+
return item;
|
|
11238
|
+
});
|
|
11239
|
+
}, [selectList]);
|
|
11240
|
+
React.useEffect(function () {
|
|
11241
|
+
if (visible) {
|
|
11242
|
+
queryItems();
|
|
11243
|
+
}
|
|
11244
|
+
}, [pageNo, visible]);
|
|
11245
|
+
var _Form$useForm = antd.Form.useForm(),
|
|
11246
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
11247
|
+
form = _Form$useForm2[0];
|
|
11248
|
+
//选择页码
|
|
11249
|
+
var pageChange = function pageChange(page) {
|
|
11250
|
+
setPageNo(page);
|
|
11251
|
+
};
|
|
11252
|
+
/**
|
|
11253
|
+
* 查询商品
|
|
11254
|
+
*/
|
|
11255
|
+
var queryItems = /*#__PURE__*/function () {
|
|
11256
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
11257
|
+
var search,
|
|
11258
|
+
_formData$dateTimePic,
|
|
11259
|
+
_formData$dateTimePic2,
|
|
11260
|
+
_formData$dateTimePic3,
|
|
11261
|
+
_formData$dateTimePic4,
|
|
11262
|
+
_formData$dateTimePic5,
|
|
11263
|
+
_formData$dateTimePic6,
|
|
11264
|
+
formData,
|
|
11265
|
+
startTime,
|
|
11266
|
+
endTime,
|
|
11267
|
+
params,
|
|
11268
|
+
res,
|
|
11269
|
+
_res$data,
|
|
11270
|
+
_res$data$productList,
|
|
11271
|
+
productList,
|
|
11272
|
+
_res$data$total,
|
|
11273
|
+
_total,
|
|
11274
|
+
errorMsg,
|
|
11275
|
+
newProducts,
|
|
11276
|
+
_args = arguments;
|
|
11277
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11278
|
+
while (1) switch (_context.prev = _context.next) {
|
|
11279
|
+
case 0:
|
|
11280
|
+
search = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
11281
|
+
_context.prev = 1;
|
|
11282
|
+
setLoading(true);
|
|
11283
|
+
formData = form.getFieldsValue();
|
|
11284
|
+
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);
|
|
11285
|
+
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);
|
|
11286
|
+
params = {
|
|
11287
|
+
// shopCode: shopCode,
|
|
11288
|
+
pageSize: pageSize,
|
|
11289
|
+
pageNo: pageNo - 1,
|
|
11290
|
+
goodNo: search.code,
|
|
11291
|
+
startTime: startTime,
|
|
11292
|
+
endTime: endTime
|
|
11293
|
+
};
|
|
11294
|
+
_context.next = 9;
|
|
11295
|
+
return extendRequest('/qy/gdfw/product/wdtListProduct', {
|
|
11296
|
+
method: 'post',
|
|
11297
|
+
data: params
|
|
11298
|
+
});
|
|
11299
|
+
case 9:
|
|
11300
|
+
res = _context.sent;
|
|
11301
|
+
_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;
|
|
11302
|
+
if (res.success) {
|
|
11303
|
+
newProducts = productList.map(function (item, index) {
|
|
11304
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
11305
|
+
index: index + 1
|
|
11306
|
+
});
|
|
11307
|
+
});
|
|
11308
|
+
setGoodList(_toConsumableArray(newProducts));
|
|
11309
|
+
if (pageNo === 1) {
|
|
11310
|
+
setTotal(_total);
|
|
11311
|
+
}
|
|
11312
|
+
} else {
|
|
11313
|
+
setGoodList([]);
|
|
11314
|
+
setTotal(0);
|
|
11315
|
+
antd.message.error(errorMsg || res.message);
|
|
11316
|
+
}
|
|
11317
|
+
case 12:
|
|
11318
|
+
_context.prev = 12;
|
|
11319
|
+
setLoading(false);
|
|
11320
|
+
return _context.finish(12);
|
|
11321
|
+
case 15:
|
|
11322
|
+
case "end":
|
|
11323
|
+
return _context.stop();
|
|
11324
|
+
}
|
|
11325
|
+
}, _callee, null, [[1,, 12, 15]]);
|
|
11326
|
+
}));
|
|
11327
|
+
return function queryItems() {
|
|
11328
|
+
return _ref.apply(this, arguments);
|
|
11329
|
+
};
|
|
11330
|
+
}();
|
|
11331
|
+
var _onCancel = function onCancel() {
|
|
11332
|
+
setVisible(false);
|
|
11333
|
+
};
|
|
11334
|
+
var onOk = function onOk() {
|
|
11335
|
+
onSubmit(selectList);
|
|
11336
|
+
_onCancel();
|
|
11337
|
+
};
|
|
11338
|
+
var onFinish = function onFinish(fieldsValue) {
|
|
11339
|
+
var searchValue = {
|
|
11340
|
+
code: fieldsValue.code
|
|
11341
|
+
};
|
|
11342
|
+
queryItems(searchValue);
|
|
11343
|
+
};
|
|
11344
|
+
var onReset = function onReset() {
|
|
11345
|
+
form.resetFields();
|
|
11346
|
+
form.setFieldsValue({
|
|
11347
|
+
dateTimePicker: [hooks().subtract(30, 'd'), hooks()],
|
|
11348
|
+
code: ''
|
|
11349
|
+
});
|
|
11350
|
+
setPageNo(function (prev) {
|
|
11351
|
+
if (prev === 1 && visible) {
|
|
11352
|
+
queryItems();
|
|
11353
|
+
}
|
|
11354
|
+
return 1;
|
|
11355
|
+
});
|
|
11356
|
+
};
|
|
11357
|
+
// const getShopList = async () => {
|
|
11358
|
+
// const { success, data } = await request('/qy/diamond/getConfigInfo', {
|
|
11359
|
+
// method: 'get',
|
|
11360
|
+
// params: {
|
|
11361
|
+
// key: 'company-third-shop-info',
|
|
11362
|
+
// },
|
|
11363
|
+
// });
|
|
11364
|
+
// const obj: any = JSON.parse(data || '{}');
|
|
11365
|
+
// if (success) {
|
|
11366
|
+
// const list = (obj?.[companyKey] || []).map((item: any) => {
|
|
11367
|
+
// return {
|
|
11368
|
+
// label: item.shopName,
|
|
11369
|
+
// value: item.shopCode,
|
|
11370
|
+
// };
|
|
11371
|
+
// });
|
|
11372
|
+
// setShopList(list);
|
|
11373
|
+
// }
|
|
11374
|
+
// };
|
|
11375
|
+
var onValuesChange = function onValuesChange(changedValues) {
|
|
11376
|
+
if (changedValues === null || changedValues === void 0 ? void 0 : changedValues['shopId']) {
|
|
11377
|
+
queryItems(changedValues === null || changedValues === void 0 ? void 0 : changedValues.shopId);
|
|
11378
|
+
pubsub__default['default'].publish('changeShopCode', {
|
|
11379
|
+
shopCode: changedValues.shopId
|
|
11380
|
+
});
|
|
11381
|
+
}
|
|
11382
|
+
};
|
|
11383
|
+
var handleDelete = function handleDelete(record, index) {
|
|
11384
|
+
var newSelectList = selectList.filter(function (item) {
|
|
11385
|
+
return item.specId !== record.specId;
|
|
11386
|
+
});
|
|
11387
|
+
setSelect(_toConsumableArray(newSelectList));
|
|
11388
|
+
setSelectIds(_toConsumableArray(newSelectList.map(function (item) {
|
|
11389
|
+
return item.specId;
|
|
11390
|
+
})));
|
|
11391
|
+
};
|
|
11392
|
+
var displaySelectedColumns = [{
|
|
11393
|
+
dataIndex: 'operation',
|
|
11394
|
+
title: '',
|
|
11395
|
+
ellipsis: true,
|
|
11396
|
+
width: 50,
|
|
11397
|
+
render: function render(_, record, index) {
|
|
11398
|
+
return /*#__PURE__*/React__default['default'].createElement(icons.DeleteOutlined, {
|
|
11399
|
+
onClick: function onClick() {
|
|
11400
|
+
return handleDelete(record);
|
|
11401
|
+
}
|
|
11402
|
+
});
|
|
11403
|
+
}
|
|
11404
|
+
}, {
|
|
11405
|
+
dataIndex: 'index',
|
|
11406
|
+
title: 'NO',
|
|
11407
|
+
width: 100,
|
|
11408
|
+
render: function render(val, record, index) {
|
|
11409
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11410
|
+
style: {
|
|
11411
|
+
width: 25
|
|
11412
|
+
}
|
|
11413
|
+
}, index + 1);
|
|
11414
|
+
}
|
|
11415
|
+
}, {
|
|
11416
|
+
dataIndex: 'goodName',
|
|
11417
|
+
title: '商品名称',
|
|
11418
|
+
width: 250,
|
|
11419
|
+
ellipsis: true
|
|
11420
|
+
}, {
|
|
11421
|
+
dataIndex: 'goodNo',
|
|
11422
|
+
title: "\u5546\u54C1SPU\u7F16\u7801",
|
|
11423
|
+
ellipsis: true,
|
|
11424
|
+
width: 200
|
|
11425
|
+
}];
|
|
11426
|
+
var expandedRowSelection = {
|
|
11427
|
+
fixed: true,
|
|
11428
|
+
selectedRowKeys: selectIds,
|
|
11429
|
+
onSelect: function onSelect(record, selected, selectedRows, nativeEvent) {
|
|
11430
|
+
var tempList = [];
|
|
11431
|
+
if (selected) {
|
|
11432
|
+
tempList = [].concat(_toConsumableArray(selectList), [record]);
|
|
11433
|
+
} else {
|
|
11434
|
+
tempList = selectList.filter(function (item) {
|
|
11435
|
+
return item.specId !== record.specId;
|
|
11436
|
+
});
|
|
11437
|
+
}
|
|
11438
|
+
setSelect(_toConsumableArray(tempList));
|
|
11439
|
+
setSelectIds(_toConsumableArray(tempList.map(function (item) {
|
|
11440
|
+
return item.specId;
|
|
11441
|
+
})));
|
|
11442
|
+
},
|
|
11443
|
+
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
11444
|
+
var tempAllList = [];
|
|
11445
|
+
if (selected) {
|
|
11446
|
+
tempAllList = [].concat(_toConsumableArray(selectList), _toConsumableArray(selectedRows.filter(Boolean)));
|
|
11447
|
+
} else {
|
|
11448
|
+
tempAllList = selectList.filter(function (list) {
|
|
11449
|
+
return changeRows.filter(Boolean).every(function (item) {
|
|
11450
|
+
return list.specId !== item.specId;
|
|
11451
|
+
});
|
|
11452
|
+
});
|
|
11453
|
+
}
|
|
11454
|
+
setSelect(_toConsumableArray(tempAllList));
|
|
11455
|
+
setSelectIds(_toConsumableArray(tempAllList.map(function (item) {
|
|
11456
|
+
return item.specId;
|
|
11457
|
+
})));
|
|
11458
|
+
}
|
|
11459
|
+
};
|
|
11460
|
+
var expandedRowRender = function expandedRowRender(record, index, indent, expanded) {
|
|
11461
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
11462
|
+
rowKey: 'specId',
|
|
11463
|
+
size: 'small',
|
|
11464
|
+
columns: expandedColumns,
|
|
11465
|
+
dataSource: record.itemDetailList || [],
|
|
11466
|
+
pagination: false,
|
|
11467
|
+
rowSelection: expandedRowSelection,
|
|
11468
|
+
scroll: {
|
|
11469
|
+
x: '100%'
|
|
11470
|
+
}
|
|
11471
|
+
});
|
|
11472
|
+
};
|
|
11473
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
11474
|
+
title: '选择商品',
|
|
11475
|
+
okText: '确认',
|
|
11476
|
+
cancelText: '取消',
|
|
11477
|
+
visible: visible,
|
|
11478
|
+
width: width || 850,
|
|
11479
|
+
onCancel: function onCancel() {
|
|
11480
|
+
_onCancel();
|
|
11481
|
+
},
|
|
11482
|
+
onOk: onOk,
|
|
11483
|
+
wrapClassName: "goodModal"
|
|
11484
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Form, {
|
|
11485
|
+
layout: "inline",
|
|
11486
|
+
form: form,
|
|
11487
|
+
onFinish: onFinish,
|
|
11488
|
+
onValuesChange: onValuesChange,
|
|
11489
|
+
initialValues: {
|
|
11490
|
+
code: ''
|
|
11491
|
+
}
|
|
11492
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
11493
|
+
name: "dateTimePicker"
|
|
11494
|
+
}, /*#__PURE__*/React__default['default'].createElement(RangePicker, {
|
|
11495
|
+
placeholder: ['开始日期', '结束日期'],
|
|
11496
|
+
showTime: true,
|
|
11497
|
+
defaultValue: [hooks(initStartTime.format(dateFormat), dateFormat), hooks(initEndTime.format(dateFormat), dateFormat)]
|
|
11498
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
11499
|
+
name: "code"
|
|
11500
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11501
|
+
placeholder: "\u5546\u54C1SPU\u7F16\u7801",
|
|
11502
|
+
allowClear: true,
|
|
11503
|
+
style: {
|
|
11504
|
+
width: 150
|
|
11505
|
+
}
|
|
11506
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
11507
|
+
type: "primary",
|
|
11508
|
+
htmlType: "submit",
|
|
11509
|
+
style: {
|
|
11510
|
+
marginRight: '8px'
|
|
11511
|
+
}
|
|
11512
|
+
}, "\u67E5\u8BE2"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
11513
|
+
onClick: onReset
|
|
11514
|
+
}, "\u91CD\u7F6E"))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11515
|
+
style: {
|
|
11516
|
+
marginTop: '16px'
|
|
11517
|
+
}
|
|
11518
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
11519
|
+
rowKey: 'goodNo',
|
|
11520
|
+
columns: columns$1,
|
|
11521
|
+
dataSource: goodList,
|
|
11522
|
+
loading: loading,
|
|
11523
|
+
scroll: {
|
|
11524
|
+
x: '100%',
|
|
11525
|
+
y: 250
|
|
11526
|
+
},
|
|
11527
|
+
expandable: {
|
|
11528
|
+
expandedRowRender: expandedRowRender
|
|
11529
|
+
},
|
|
11530
|
+
pagination: {
|
|
11531
|
+
size: 'small',
|
|
11532
|
+
total: total,
|
|
11533
|
+
current: pageNo,
|
|
11534
|
+
pageSize: pageSize,
|
|
11535
|
+
pageSizeOptions: [],
|
|
11536
|
+
onChange: pageChange
|
|
11537
|
+
}
|
|
11538
|
+
})), !!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", {
|
|
11539
|
+
style: {
|
|
11540
|
+
marginTop: '16px'
|
|
11541
|
+
}
|
|
11542
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
11543
|
+
rowKey: 'specId',
|
|
11544
|
+
columns: [].concat(displaySelectedColumns, expandedColumns),
|
|
11545
|
+
dataSource: displaySelectList,
|
|
11546
|
+
pagination: false,
|
|
11547
|
+
scroll: {
|
|
11548
|
+
x: '100%',
|
|
11549
|
+
y: 250
|
|
11550
|
+
},
|
|
11551
|
+
style: {
|
|
11552
|
+
width: '100%'
|
|
11553
|
+
}
|
|
11554
|
+
})))));
|
|
11555
|
+
};
|
|
11556
|
+
var WdtGoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$3);
|
|
11557
|
+
|
|
11094
11558
|
// interface GoodsItem {
|
|
11095
11559
|
// title: string;
|
|
11096
11560
|
// pic: string;
|
|
@@ -11101,6 +11565,7 @@ var GoodsModal$2 = /*#__PURE__*/React.forwardRef(GoodsModal$1);
|
|
|
11101
11565
|
var GoodItem$1 = function GoodItem(props) {
|
|
11102
11566
|
var _props$value = props.value,
|
|
11103
11567
|
value = _props$value === void 0 ? [] : _props$value,
|
|
11568
|
+
type = props.type,
|
|
11104
11569
|
onChange = props.onChange,
|
|
11105
11570
|
disabled = props.disabled,
|
|
11106
11571
|
_props$showHeader = props.showHeader,
|
|
@@ -11148,105 +11613,214 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11148
11613
|
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(value));
|
|
11149
11614
|
}
|
|
11150
11615
|
};
|
|
11151
|
-
|
|
11152
|
-
var GOODS_INFO_COLUMNS = function GOODS_INFO_COLUMNS() {
|
|
11616
|
+
var COLUMNS_MAP = function COLUMNS_MAP() {
|
|
11153
11617
|
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
11154
|
-
return
|
|
11155
|
-
|
|
11156
|
-
|
|
11157
|
-
|
|
11158
|
-
|
|
11159
|
-
|
|
11160
|
-
|
|
11161
|
-
|
|
11162
|
-
|
|
11163
|
-
|
|
11164
|
-
value: '是'
|
|
11165
|
-
}, {
|
|
11166
|
-
label: '否',
|
|
11167
|
-
value: '否'
|
|
11168
|
-
}],
|
|
11169
|
-
disabled: disabled,
|
|
11170
|
-
value: val,
|
|
11171
|
-
onChange: function onChange(val) {
|
|
11172
|
-
return updateHandle(val, index, 'mark');
|
|
11173
|
-
}
|
|
11174
|
-
});
|
|
11175
|
-
}
|
|
11176
|
-
}, {
|
|
11177
|
-
dataIndex: 'skuName',
|
|
11178
|
-
title: "".concat(text, "sku\u540D\u79F0"),
|
|
11179
|
-
align: 'center',
|
|
11180
|
-
ellipsis: true,
|
|
11181
|
-
width: 250
|
|
11182
|
-
}, {
|
|
11183
|
-
dataIndex: 'sku',
|
|
11184
|
-
title: "".concat(text, "sku\u7F16\u7801"),
|
|
11185
|
-
align: 'center',
|
|
11186
|
-
ellipsis: true,
|
|
11187
|
-
width: 100
|
|
11188
|
-
}, {
|
|
11189
|
-
dataIndex: 'name',
|
|
11190
|
-
title: "".concat(text, "\u540D\u79F0"),
|
|
11191
|
-
align: 'center',
|
|
11192
|
-
ellipsis: true,
|
|
11193
|
-
width: 250
|
|
11194
|
-
}, {
|
|
11195
|
-
dataIndex: 'pic',
|
|
11196
|
-
title: "\u56FE\u7247",
|
|
11197
|
-
align: 'center',
|
|
11198
|
-
ellipsis: true,
|
|
11199
|
-
width: 100,
|
|
11200
|
-
render: function render(val) {
|
|
11201
|
-
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
11202
|
-
width: 60,
|
|
11203
|
-
src: val
|
|
11204
|
-
});
|
|
11205
|
-
}
|
|
11206
|
-
}, {
|
|
11207
|
-
dataIndex: 'code',
|
|
11208
|
-
title: "".concat(text, "\u7F16\u7801"),
|
|
11209
|
-
align: 'center',
|
|
11210
|
-
ellipsis: true,
|
|
11211
|
-
width: 100
|
|
11212
|
-
}, {
|
|
11213
|
-
dataIndex: 'money',
|
|
11214
|
-
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
11215
|
-
align: 'center',
|
|
11216
|
-
ellipsis: true,
|
|
11217
|
-
width: 100
|
|
11218
|
-
}, {
|
|
11219
|
-
dataIndex: 'number',
|
|
11220
|
-
title: "".concat(text, "\u6570\u91CF"),
|
|
11221
|
-
align: 'center',
|
|
11222
|
-
ellipsis: true,
|
|
11223
|
-
width: 100,
|
|
11224
|
-
render: function render(val, record, index) {
|
|
11225
|
-
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
11226
|
-
style: {
|
|
11618
|
+
return function (type) {
|
|
11619
|
+
var columns = [];
|
|
11620
|
+
switch (type) {
|
|
11621
|
+
case 'WDT_REISSUE_GOODS':
|
|
11622
|
+
case 'WDT_GOODS':
|
|
11623
|
+
columns = [{
|
|
11624
|
+
dataIndex: 'goodId',
|
|
11625
|
+
title: "SPUID",
|
|
11626
|
+
align: 'center',
|
|
11627
|
+
ellipsis: true,
|
|
11227
11628
|
width: 70
|
|
11629
|
+
}, {
|
|
11630
|
+
dataIndex: 'goodNo',
|
|
11631
|
+
title: "\u5546\u54C1SPU\u7F16\u7801",
|
|
11632
|
+
align: 'center',
|
|
11633
|
+
ellipsis: true,
|
|
11634
|
+
width: 180
|
|
11635
|
+
}, {
|
|
11636
|
+
dataIndex: 'goodName',
|
|
11637
|
+
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
11638
|
+
align: 'center',
|
|
11639
|
+
ellipsis: true,
|
|
11640
|
+
width: 250
|
|
11641
|
+
}, {
|
|
11642
|
+
dataIndex: 'specId',
|
|
11643
|
+
title: "".concat(text, "SKUID"),
|
|
11644
|
+
align: 'center',
|
|
11645
|
+
ellipsis: true,
|
|
11646
|
+
width: 100
|
|
11647
|
+
}, {
|
|
11648
|
+
dataIndex: 'specNo',
|
|
11649
|
+
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
11650
|
+
align: 'center',
|
|
11651
|
+
ellipsis: true,
|
|
11652
|
+
width: 180
|
|
11653
|
+
}, {
|
|
11654
|
+
dataIndex: 'specName',
|
|
11655
|
+
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
11656
|
+
align: 'center',
|
|
11657
|
+
ellipsis: true,
|
|
11658
|
+
width: 250
|
|
11659
|
+
}, {
|
|
11660
|
+
dataIndex: 'orderPrice',
|
|
11661
|
+
title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
|
|
11662
|
+
align: 'center',
|
|
11663
|
+
ellipsis: true,
|
|
11664
|
+
width: 100
|
|
11665
|
+
}, {
|
|
11666
|
+
dataIndex: 'num',
|
|
11667
|
+
title: "".concat(text, "\u6570\u91CF"),
|
|
11668
|
+
align: 'center',
|
|
11669
|
+
ellipsis: true,
|
|
11670
|
+
width: 100,
|
|
11671
|
+
render: function render(val, record, index) {
|
|
11672
|
+
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
11673
|
+
style: {
|
|
11674
|
+
width: 70
|
|
11675
|
+
},
|
|
11676
|
+
value: val,
|
|
11677
|
+
min: 0,
|
|
11678
|
+
precision: 0,
|
|
11679
|
+
onChange: function onChange(num) {
|
|
11680
|
+
return updateHandle(num, index, 'num');
|
|
11681
|
+
}
|
|
11682
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
11683
|
+
}
|
|
11228
11684
|
},
|
|
11229
|
-
|
|
11230
|
-
|
|
11231
|
-
|
|
11232
|
-
|
|
11233
|
-
|
|
11234
|
-
|
|
11235
|
-
|
|
11685
|
+
// {
|
|
11686
|
+
// dataIndex: 'actualNum',
|
|
11687
|
+
// title: `${text}实发数量`,
|
|
11688
|
+
// align: 'center',
|
|
11689
|
+
// ellipsis: true,
|
|
11690
|
+
// width: 100,
|
|
11691
|
+
// },
|
|
11692
|
+
{
|
|
11693
|
+
dataIndex: 'sharePrice',
|
|
11694
|
+
title: "\u5206\u644A\u4EF7",
|
|
11695
|
+
align: 'center',
|
|
11696
|
+
ellipsis: true,
|
|
11697
|
+
width: 70
|
|
11698
|
+
}, {
|
|
11699
|
+
dataIndex: 'giftType',
|
|
11700
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
11701
|
+
align: 'center',
|
|
11702
|
+
ellipsis: true,
|
|
11703
|
+
width: 100,
|
|
11704
|
+
render: function render(val) {
|
|
11705
|
+
var giftTypeMap = {
|
|
11706
|
+
0: '非赠品',
|
|
11707
|
+
1: '自动赠送',
|
|
11708
|
+
2: '手工赠送',
|
|
11709
|
+
3: '回购自动送赠品',
|
|
11710
|
+
4: '前N有礼送赠品',
|
|
11711
|
+
6: '天猫优仓赠品',
|
|
11712
|
+
7: '淘宝CRM会员送赠'
|
|
11713
|
+
};
|
|
11714
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
|
|
11715
|
+
}
|
|
11716
|
+
}];
|
|
11717
|
+
break;
|
|
11718
|
+
default:
|
|
11719
|
+
columns = [{
|
|
11720
|
+
dataIndex: 'mark',
|
|
11721
|
+
title: "\u5546\u54C1\u6807\u8BB0",
|
|
11722
|
+
align: 'center',
|
|
11723
|
+
ellipsis: true,
|
|
11724
|
+
width: 70,
|
|
11725
|
+
render: function render(val, record, index) {
|
|
11726
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
11727
|
+
options: [{
|
|
11728
|
+
label: '是',
|
|
11729
|
+
value: '是'
|
|
11730
|
+
}, {
|
|
11731
|
+
label: '否',
|
|
11732
|
+
value: '否'
|
|
11733
|
+
}],
|
|
11734
|
+
disabled: disabled,
|
|
11735
|
+
value: val,
|
|
11736
|
+
onChange: function onChange(val) {
|
|
11737
|
+
return updateHandle(val, index, 'mark');
|
|
11738
|
+
}
|
|
11739
|
+
});
|
|
11740
|
+
}
|
|
11741
|
+
}, {
|
|
11742
|
+
dataIndex: 'skuName',
|
|
11743
|
+
title: "".concat(text, "sku\u540D\u79F0"),
|
|
11744
|
+
align: 'center',
|
|
11745
|
+
ellipsis: true,
|
|
11746
|
+
width: 250
|
|
11747
|
+
}, {
|
|
11748
|
+
dataIndex: 'sku',
|
|
11749
|
+
title: "".concat(text, "sku\u7F16\u7801"),
|
|
11750
|
+
align: 'center',
|
|
11751
|
+
ellipsis: true,
|
|
11752
|
+
width: 100
|
|
11753
|
+
}, {
|
|
11754
|
+
dataIndex: 'name',
|
|
11755
|
+
title: "".concat(text, "\u540D\u79F0"),
|
|
11756
|
+
align: 'center',
|
|
11757
|
+
ellipsis: true,
|
|
11758
|
+
width: 250
|
|
11759
|
+
}, {
|
|
11760
|
+
dataIndex: 'pic',
|
|
11761
|
+
title: "\u56FE\u7247",
|
|
11762
|
+
align: 'center',
|
|
11763
|
+
ellipsis: true,
|
|
11764
|
+
width: 100,
|
|
11765
|
+
render: function render(val) {
|
|
11766
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
11767
|
+
width: 60,
|
|
11768
|
+
src: val
|
|
11769
|
+
});
|
|
11770
|
+
}
|
|
11771
|
+
}, {
|
|
11772
|
+
dataIndex: 'code',
|
|
11773
|
+
title: "".concat(text, "\u7F16\u7801"),
|
|
11774
|
+
align: 'center',
|
|
11775
|
+
ellipsis: true,
|
|
11776
|
+
width: 100
|
|
11777
|
+
}, {
|
|
11778
|
+
dataIndex: 'money',
|
|
11779
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
11780
|
+
align: 'center',
|
|
11781
|
+
ellipsis: true,
|
|
11782
|
+
width: 100
|
|
11783
|
+
}, {
|
|
11784
|
+
dataIndex: 'number',
|
|
11785
|
+
title: "".concat(text, "\u6570\u91CF"),
|
|
11786
|
+
align: 'center',
|
|
11787
|
+
ellipsis: true,
|
|
11788
|
+
width: 100,
|
|
11789
|
+
render: function render(val, record, index) {
|
|
11790
|
+
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
11791
|
+
style: {
|
|
11792
|
+
width: 70
|
|
11793
|
+
},
|
|
11794
|
+
value: val,
|
|
11795
|
+
min: 0,
|
|
11796
|
+
precision: 0,
|
|
11797
|
+
onChange: function onChange(num) {
|
|
11798
|
+
return updateHandle(num, index, 'number');
|
|
11799
|
+
}
|
|
11800
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
11801
|
+
}
|
|
11802
|
+
}, {
|
|
11803
|
+
dataIndex: 'share',
|
|
11804
|
+
title: "\u5206\u644A\u4EF7",
|
|
11805
|
+
align: 'center',
|
|
11806
|
+
ellipsis: true,
|
|
11807
|
+
width: 70
|
|
11808
|
+
}, {
|
|
11809
|
+
dataIndex: 'type',
|
|
11810
|
+
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
11811
|
+
align: 'center',
|
|
11812
|
+
ellipsis: true,
|
|
11813
|
+
width: 100
|
|
11814
|
+
}];
|
|
11236
11815
|
}
|
|
11237
|
-
|
|
11238
|
-
|
|
11239
|
-
|
|
11240
|
-
|
|
11241
|
-
|
|
11242
|
-
|
|
11243
|
-
|
|
11244
|
-
|
|
11245
|
-
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
11246
|
-
align: 'center',
|
|
11247
|
-
ellipsis: true,
|
|
11248
|
-
width: 100
|
|
11249
|
-
}];
|
|
11816
|
+
return columns;
|
|
11817
|
+
};
|
|
11818
|
+
};
|
|
11819
|
+
//商品信息
|
|
11820
|
+
var GOODS_INFO_COLUMNS = function GOODS_INFO_COLUMNS() {
|
|
11821
|
+
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
11822
|
+
var COLUMNS_INFO = COLUMNS_MAP(text);
|
|
11823
|
+
return COLUMNS_INFO(type);
|
|
11250
11824
|
};
|
|
11251
11825
|
var newColumns = React.useMemo(function () {
|
|
11252
11826
|
var columnList = [{
|
|
@@ -11281,30 +11855,43 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11281
11855
|
return columnList;
|
|
11282
11856
|
}, [showHeader, value, disabled]);
|
|
11283
11857
|
var onSubmit = function onSubmit(list) {
|
|
11284
|
-
var newList =
|
|
11285
|
-
|
|
11286
|
-
|
|
11287
|
-
|
|
11288
|
-
|
|
11289
|
-
|
|
11290
|
-
|
|
11291
|
-
|
|
11292
|
-
|
|
11293
|
-
|
|
11294
|
-
|
|
11295
|
-
|
|
11296
|
-
|
|
11297
|
-
|
|
11298
|
-
|
|
11299
|
-
|
|
11300
|
-
|
|
11301
|
-
|
|
11302
|
-
|
|
11303
|
-
|
|
11304
|
-
|
|
11305
|
-
|
|
11306
|
-
|
|
11307
|
-
|
|
11858
|
+
var newList = [];
|
|
11859
|
+
if (['WDT_REISSUE_GOODS', 'WDT_GOODS'].includes(type)) {
|
|
11860
|
+
newList = list.map(function (item) {
|
|
11861
|
+
item.uuid = kmkfUtils.uuid();
|
|
11862
|
+
item.canDelete = true;
|
|
11863
|
+
item.num = 1;
|
|
11864
|
+
item.orderPrice = 0;
|
|
11865
|
+
item.sharePrice = 0;
|
|
11866
|
+
item.canUpdateNumber = canUpdateNumber;
|
|
11867
|
+
return item;
|
|
11868
|
+
});
|
|
11869
|
+
} else {
|
|
11870
|
+
newList = list.map(function (item) {
|
|
11871
|
+
var goodsId = item.goodsId,
|
|
11872
|
+
name = item.name,
|
|
11873
|
+
code = item.code,
|
|
11874
|
+
skuCode = item.skuCode,
|
|
11875
|
+
marketPrice = item.marketPrice,
|
|
11876
|
+
skuName = item.skuName;
|
|
11877
|
+
return {
|
|
11878
|
+
id: goodsId,
|
|
11879
|
+
mark: '是',
|
|
11880
|
+
pic: '',
|
|
11881
|
+
skuName: skuName,
|
|
11882
|
+
name: name,
|
|
11883
|
+
code: code,
|
|
11884
|
+
sku: skuCode,
|
|
11885
|
+
money: marketPrice || 0,
|
|
11886
|
+
share: marketPrice || 0,
|
|
11887
|
+
number: 1,
|
|
11888
|
+
type: '',
|
|
11889
|
+
uuid: kmkfUtils.uuid(),
|
|
11890
|
+
canDelete: true,
|
|
11891
|
+
canUpdateNumber: canUpdateNumber
|
|
11892
|
+
};
|
|
11893
|
+
});
|
|
11894
|
+
}
|
|
11308
11895
|
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), _toConsumableArray(newList)));
|
|
11309
11896
|
};
|
|
11310
11897
|
var onSelectChange = function onSelectChange(newSelectedRowKeys) {
|
|
@@ -11347,7 +11934,15 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11347
11934
|
locale: {
|
|
11348
11935
|
emptyText: '暂无数据'
|
|
11349
11936
|
}
|
|
11350
|
-
})), /*#__PURE__*/React__default['default'].createElement(
|
|
11937
|
+
})), ['WDT_REISSUE_GOODS', 'WDT_GOODS'].includes(type) ? /*#__PURE__*/React__default['default'].createElement(WdtGoodsModal, {
|
|
11938
|
+
ref: refModal,
|
|
11939
|
+
onSubmit: onSubmit,
|
|
11940
|
+
width: width,
|
|
11941
|
+
shopList: shopList,
|
|
11942
|
+
shopId: shopId,
|
|
11943
|
+
maxLength: maxLength,
|
|
11944
|
+
companyKey: companyKey
|
|
11945
|
+
}) : /*#__PURE__*/React__default['default'].createElement(GoodsModal$2, {
|
|
11351
11946
|
ref: refModal,
|
|
11352
11947
|
onSubmit: onSubmit,
|
|
11353
11948
|
width: width,
|
|
@@ -11728,25 +12323,60 @@ var BsExchange = function BsExchange(props) {
|
|
|
11728
12323
|
}))) : null);
|
|
11729
12324
|
};
|
|
11730
12325
|
|
|
11731
|
-
var _excluded$e = ["value", "onChange", "reasonList", "disabled"];
|
|
12326
|
+
var _excluded$e = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
12327
|
+
var typeMap = {
|
|
12328
|
+
BS_REISSUE_GOODS: {
|
|
12329
|
+
key: 'bsReissueGoods',
|
|
12330
|
+
name: 'bs',
|
|
12331
|
+
typeName: 'bsReissueType',
|
|
12332
|
+
reissueSelectList: 'reissueSelectList',
|
|
12333
|
+
reissueSelectListReturn: 'reissueSelectListReturn',
|
|
12334
|
+
reissueDeleteGood: 'reissueDeleteGood',
|
|
12335
|
+
changeShopCode: 'changeShopCode',
|
|
12336
|
+
reissueType: 'reissueType',
|
|
12337
|
+
formatDefaultField: {
|
|
12338
|
+
money: 'money',
|
|
12339
|
+
share: 'share'
|
|
12340
|
+
}
|
|
12341
|
+
},
|
|
12342
|
+
WDT_REISSUE_GOODS: {
|
|
12343
|
+
key: 'wdtReissueGoods',
|
|
12344
|
+
name: '旺店通',
|
|
12345
|
+
typeName: 'wdtReissueType',
|
|
12346
|
+
reissueSelectList: 'wdtReissueSelectList',
|
|
12347
|
+
reissueSelectListReturn: 'wdtReissueSelectListReturn',
|
|
12348
|
+
reissueDeleteGood: 'wdtReissueDeleteGood',
|
|
12349
|
+
changeShopCode: 'wdtChangeShopCode',
|
|
12350
|
+
reissueType: 'wdtReissueType',
|
|
12351
|
+
formatDefaultField: {
|
|
12352
|
+
money: 'orderPrice',
|
|
12353
|
+
share: 'sharePrice'
|
|
12354
|
+
}
|
|
12355
|
+
}
|
|
12356
|
+
};
|
|
11732
12357
|
var BsReissue = function BsReissue(props) {
|
|
12358
|
+
var _typeMap$type20, _typeMap$type21, _typeMap$type22;
|
|
11733
12359
|
var value = props.value,
|
|
11734
12360
|
onChange = props.onChange,
|
|
11735
12361
|
_props$reasonList = props.reasonList,
|
|
11736
12362
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
11737
12363
|
disabled = props.disabled,
|
|
12364
|
+
type = props.type,
|
|
11738
12365
|
other = _objectWithoutProperties(props, _excluded$e);
|
|
11739
12366
|
var valueRef = React.useRef({});
|
|
11740
12367
|
React.useEffect(function () {
|
|
11741
|
-
|
|
12368
|
+
var _typeMap$type;
|
|
12369
|
+
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) {
|
|
12370
|
+
var _typeMap$type2;
|
|
11742
12371
|
// console.log('reissueSelectList', data);
|
|
11743
12372
|
if (disabled) return;
|
|
11744
12373
|
var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
|
|
11745
12374
|
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
11746
12375
|
});
|
|
11747
|
-
newValue.
|
|
11748
|
-
|
|
11749
|
-
item.
|
|
12376
|
+
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) {
|
|
12377
|
+
var _typeMap$type3, _typeMap$type4;
|
|
12378
|
+
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;
|
|
12379
|
+
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;
|
|
11750
12380
|
item.canUpdateNumber = true;
|
|
11751
12381
|
return item;
|
|
11752
12382
|
});
|
|
@@ -11754,15 +12384,18 @@ var BsReissue = function BsReissue(props) {
|
|
|
11754
12384
|
});
|
|
11755
12385
|
}, []);
|
|
11756
12386
|
React.useEffect(function () {
|
|
11757
|
-
|
|
12387
|
+
var _typeMap$type5;
|
|
12388
|
+
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) {
|
|
12389
|
+
var _typeMap$type6;
|
|
11758
12390
|
// console.log('reissueSelectListReturn', data);
|
|
11759
12391
|
if (disabled) return;
|
|
11760
12392
|
var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
|
|
11761
12393
|
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
11762
12394
|
});
|
|
11763
|
-
newValue.
|
|
11764
|
-
|
|
11765
|
-
item.
|
|
12395
|
+
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) {
|
|
12396
|
+
var _typeMap$type7, _typeMap$type8;
|
|
12397
|
+
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;
|
|
12398
|
+
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;
|
|
11766
12399
|
item.canUpdateNumber = true;
|
|
11767
12400
|
return item;
|
|
11768
12401
|
});
|
|
@@ -11770,50 +12403,55 @@ var BsReissue = function BsReissue(props) {
|
|
|
11770
12403
|
});
|
|
11771
12404
|
}, []);
|
|
11772
12405
|
React.useEffect(function () {
|
|
12406
|
+
var _typeMap$type9, _typeMap$type12;
|
|
11773
12407
|
valueRef.current = value;
|
|
11774
|
-
pubsub__default['default'].subscribeOnce(
|
|
12408
|
+
pubsub__default['default'].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) {
|
|
11775
12409
|
if (disabled) return;
|
|
11776
12410
|
if (value) {
|
|
12411
|
+
var _typeMap$type10, _typeMap$type11;
|
|
11777
12412
|
var newValue = _objectSpread2({}, value);
|
|
11778
|
-
newValue.
|
|
12413
|
+
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) {
|
|
11779
12414
|
return item.sku !== data;
|
|
11780
12415
|
});
|
|
11781
12416
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
11782
12417
|
}
|
|
11783
12418
|
});
|
|
11784
|
-
pubsub__default['default'].subscribeOnce(
|
|
12419
|
+
pubsub__default['default'].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) {
|
|
11785
12420
|
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11786
12421
|
shopCode: data.shopCode
|
|
11787
12422
|
}));
|
|
11788
12423
|
});
|
|
11789
12424
|
}, [value, disabled]);
|
|
11790
12425
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
12426
|
+
var _typeMap$type13, _typeMap$type14, _typeMap$type15;
|
|
11791
12427
|
var newValue = _objectSpread2({}, value);
|
|
11792
|
-
newValue[
|
|
11793
|
-
newValue.
|
|
12428
|
+
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type13 = typeMap[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.typeName)] = val;
|
|
12429
|
+
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type14 = typeMap[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key)] = [];
|
|
11794
12430
|
if (['2', '4'].includes(val[0])) {
|
|
11795
12431
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
11796
12432
|
valueRef.current = newValue;
|
|
11797
12433
|
}
|
|
11798
|
-
pubsub__default['default'].publish(
|
|
12434
|
+
pubsub__default['default'].publish("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type15 = typeMap[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.reissueType), {
|
|
11799
12435
|
val: val[0],
|
|
11800
12436
|
goodValue: newValue
|
|
11801
12437
|
});
|
|
11802
12438
|
};
|
|
11803
12439
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
12440
|
+
var _typeMap$type16;
|
|
11804
12441
|
var newValue = _objectSpread2({}, value);
|
|
11805
|
-
newValue[
|
|
11806
|
-
|
|
11807
|
-
item.
|
|
12442
|
+
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) {
|
|
12443
|
+
var _typeMap$type17, _typeMap$type18;
|
|
12444
|
+
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;
|
|
12445
|
+
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;
|
|
11808
12446
|
return item;
|
|
11809
12447
|
});
|
|
11810
12448
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
11811
12449
|
};
|
|
11812
12450
|
//显示选择商品按钮 原单换不显示选择商品
|
|
11813
12451
|
var showChangeBtn = React.useMemo(function () {
|
|
11814
|
-
var _value$
|
|
11815
|
-
return ['2', '3', '4'].includes(value === null || value === void 0 ? void 0 : (_value
|
|
11816
|
-
}, [value === null || value === void 0 ? void 0 : value.
|
|
12452
|
+
var _value, _typeMap$type19;
|
|
12453
|
+
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]);
|
|
12454
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.typeName]]);
|
|
11817
12455
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
11818
12456
|
style: {
|
|
11819
12457
|
marginBottom: '8px'
|
|
@@ -11821,18 +12459,19 @@ var BsReissue = function BsReissue(props) {
|
|
|
11821
12459
|
disabled: disabled,
|
|
11822
12460
|
allowClear: false,
|
|
11823
12461
|
options: reasonList,
|
|
11824
|
-
value: value === null || value === void 0 ? void 0 : value.
|
|
12462
|
+
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)],
|
|
11825
12463
|
onChange: function onChange(val) {
|
|
11826
12464
|
return changeTypeHandle(val);
|
|
11827
12465
|
}
|
|
11828
12466
|
}), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
11829
12467
|
key: 'reissueGoods'
|
|
11830
12468
|
}, other), {}, {
|
|
12469
|
+
type: type,
|
|
11831
12470
|
disabled: disabled,
|
|
11832
12471
|
canUpdateNumber: showChangeBtn,
|
|
11833
12472
|
showChangeBtn: showChangeBtn,
|
|
11834
12473
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
11835
|
-
value: value === null || value === void 0 ? void 0 : value.
|
|
12474
|
+
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)],
|
|
11836
12475
|
onChange: function onChange(val) {
|
|
11837
12476
|
return changeGoodHandle(val);
|
|
11838
12477
|
}
|
|
@@ -11944,6 +12583,10 @@ var columnsNameMap = {
|
|
|
11944
12583
|
WLN_SYSTEM_ORDER: {
|
|
11945
12584
|
typeName: '订单类型',
|
|
11946
12585
|
tagName: '标记'
|
|
12586
|
+
},
|
|
12587
|
+
WDT_SYSTEM_ORDER: {
|
|
12588
|
+
typeName: '订单类型',
|
|
12589
|
+
tagName: '订单标签'
|
|
11947
12590
|
}
|
|
11948
12591
|
};
|
|
11949
12592
|
var index$1 = (function (props) {
|
|
@@ -11958,6 +12601,8 @@ var index$1 = (function (props) {
|
|
|
11958
12601
|
getOrderList(value.orderNo);
|
|
11959
12602
|
} else if (type === 'WLN_SYSTEM_ORDER') {
|
|
11960
12603
|
getWlnOrderList(value.orderNo);
|
|
12604
|
+
} else if (type === 'WDT_SYSTEM_ORDER') {
|
|
12605
|
+
getWdtOrderList(value.orderNo);
|
|
11961
12606
|
}
|
|
11962
12607
|
}
|
|
11963
12608
|
}, [value, type]);
|
|
@@ -12058,6 +12703,51 @@ var index$1 = (function (props) {
|
|
|
12058
12703
|
return _ref2.apply(this, arguments);
|
|
12059
12704
|
};
|
|
12060
12705
|
}();
|
|
12706
|
+
var getWdtOrderList = /*#__PURE__*/function () {
|
|
12707
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(orderNo) {
|
|
12708
|
+
var _yield$request3, success, data;
|
|
12709
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
12710
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
12711
|
+
case 0:
|
|
12712
|
+
_context3.next = 2;
|
|
12713
|
+
return extendRequest('/qy/gdfw/order/wdtOrderDetail', {
|
|
12714
|
+
method: 'post',
|
|
12715
|
+
data: {
|
|
12716
|
+
billNo: orderNo
|
|
12717
|
+
}
|
|
12718
|
+
});
|
|
12719
|
+
case 2:
|
|
12720
|
+
_yield$request3 = _context3.sent;
|
|
12721
|
+
success = _yield$request3.success;
|
|
12722
|
+
data = _yield$request3.data;
|
|
12723
|
+
if (success) {
|
|
12724
|
+
_onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
12725
|
+
orders: ((data === null || data === void 0 ? void 0 : data.trades) || []).map(function (item) {
|
|
12726
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
12727
|
+
billNo: item.tradeNo,
|
|
12728
|
+
billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
12729
|
+
billTag: item.tagName
|
|
12730
|
+
});
|
|
12731
|
+
}),
|
|
12732
|
+
showOrderInfo: data === null || data === void 0 ? void 0 : data.trades.map(function (item) {
|
|
12733
|
+
return {
|
|
12734
|
+
billNo: item.tradeNo,
|
|
12735
|
+
billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
12736
|
+
billTag: item.tagName
|
|
12737
|
+
};
|
|
12738
|
+
})
|
|
12739
|
+
}));
|
|
12740
|
+
}
|
|
12741
|
+
case 6:
|
|
12742
|
+
case "end":
|
|
12743
|
+
return _context3.stop();
|
|
12744
|
+
}
|
|
12745
|
+
}, _callee3);
|
|
12746
|
+
}));
|
|
12747
|
+
return function getWdtOrderList(_x3) {
|
|
12748
|
+
return _ref3.apply(this, arguments);
|
|
12749
|
+
};
|
|
12750
|
+
}();
|
|
12061
12751
|
var rowSelection = {
|
|
12062
12752
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
|
|
12063
12753
|
fixed: true,
|
|
@@ -12112,13 +12802,165 @@ var WlnGoods = function WlnGoods(props) {
|
|
|
12112
12802
|
}));
|
|
12113
12803
|
};
|
|
12114
12804
|
|
|
12805
|
+
var componentMap$1 = {
|
|
12806
|
+
'WDT_GOODS': {
|
|
12807
|
+
type: 'wdt',
|
|
12808
|
+
key: 'wdtGoods',
|
|
12809
|
+
name: '旺店通',
|
|
12810
|
+
eventNameMap: {
|
|
12811
|
+
type: 'wdtType',
|
|
12812
|
+
selectListReturn: 'wdtSelectListReturn',
|
|
12813
|
+
selectList: 'wdtSelectList',
|
|
12814
|
+
reissueSelectList: 'wdtReissueSelectList',
|
|
12815
|
+
reissueSelectListReturn: 'wdtReissueSelectListReturn',
|
|
12816
|
+
reissueDeleteGood: 'wdtReissueDeleteGood',
|
|
12817
|
+
changeShopCode: 'wdtChangeShopCode',
|
|
12818
|
+
reissueType: 'wdtReissueType',
|
|
12819
|
+
returnType: 'wdtReturnType',
|
|
12820
|
+
returnSelectListReturn: 'wdtReturnSelectListReturn',
|
|
12821
|
+
deleteGood: 'wdtDeleteGood',
|
|
12822
|
+
returnDeleteGood: 'wdtReturnDeleteGood'
|
|
12823
|
+
}
|
|
12824
|
+
}
|
|
12825
|
+
};
|
|
12826
|
+
var CommonGoods = function CommonGoods(props) {
|
|
12827
|
+
var _withInfo$current3, _withInfo$current4;
|
|
12828
|
+
var value = props.value,
|
|
12829
|
+
disabled = props.disabled,
|
|
12830
|
+
onChange = props.onChange,
|
|
12831
|
+
compType = props.type;
|
|
12832
|
+
var _useState = React.useState(false),
|
|
12833
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12834
|
+
tableSelect = _useState2[0],
|
|
12835
|
+
setTableSelect = _useState2[1];
|
|
12836
|
+
var withInfo = React.useRef(null);
|
|
12837
|
+
var valueRef = React.useRef(null);
|
|
12838
|
+
React.useEffect(function () {
|
|
12839
|
+
valueRef.current = value;
|
|
12840
|
+
}, [value]);
|
|
12841
|
+
React.useEffect(function () {
|
|
12842
|
+
pubsub__default['default'].subscribe(componentMap$1[compType].eventNameMap.type, function (type, data) {
|
|
12843
|
+
if (disabled) return;
|
|
12844
|
+
// console.log(type, data);
|
|
12845
|
+
withInfo.current = {
|
|
12846
|
+
type: type,
|
|
12847
|
+
val: data.val,
|
|
12848
|
+
goodValue: data.goodValue
|
|
12849
|
+
};
|
|
12850
|
+
setTableSelect(['2', '4'].includes(data.val));
|
|
12851
|
+
if (['1', '3'].includes(data.val)) {
|
|
12852
|
+
var _valueRef$current, _valueRef$current2;
|
|
12853
|
+
pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.selectListReturn, {
|
|
12854
|
+
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]) || []),
|
|
12855
|
+
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.shopCode,
|
|
12856
|
+
goodValue: data === null || data === void 0 ? void 0 : data.goodValue
|
|
12857
|
+
});
|
|
12858
|
+
}
|
|
12859
|
+
});
|
|
12860
|
+
//补发
|
|
12861
|
+
pubsub__default['default'].subscribe(componentMap$1[compType].eventNameMap.reissueType, function (type, data) {
|
|
12862
|
+
if (disabled) return;
|
|
12863
|
+
withInfo.current = {
|
|
12864
|
+
type: type,
|
|
12865
|
+
val: data.val,
|
|
12866
|
+
goodValue: data.goodValue
|
|
12867
|
+
};
|
|
12868
|
+
setTableSelect(['2', '4'].includes(data.val));
|
|
12869
|
+
if (['1', '3'].includes(data.val)) {
|
|
12870
|
+
var _valueRef$current3, _valueRef$current4;
|
|
12871
|
+
pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.reissueSelectListReturn, {
|
|
12872
|
+
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]) || []),
|
|
12873
|
+
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current4 = valueRef.current) === null || _valueRef$current4 === void 0 ? void 0 : _valueRef$current4.shopCode,
|
|
12874
|
+
goodValue: data === null || data === void 0 ? void 0 : data.goodValue
|
|
12875
|
+
});
|
|
12876
|
+
}
|
|
12877
|
+
});
|
|
12878
|
+
//退货
|
|
12879
|
+
pubsub__default['default'].subscribe(componentMap$1[compType].eventNameMap.returnType, function (type, data) {
|
|
12880
|
+
if (disabled) return;
|
|
12881
|
+
withInfo.current = {
|
|
12882
|
+
type: type,
|
|
12883
|
+
val: data.val,
|
|
12884
|
+
goodValue: data.goodValue
|
|
12885
|
+
};
|
|
12886
|
+
setTableSelect(['2', '4'].includes(data.val));
|
|
12887
|
+
if (['1', '3'].includes(data.val)) {
|
|
12888
|
+
var _valueRef$current5, _valueRef$current6;
|
|
12889
|
+
pubsub__default['default'].publish(componentMap$1[type].eventNameMap.returnSelectListReturn, {
|
|
12890
|
+
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]) || []),
|
|
12891
|
+
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current6 = valueRef.current) === null || _valueRef$current6 === void 0 ? void 0 : _valueRef$current6.shopCode,
|
|
12892
|
+
goodValue: data === null || data === void 0 ? void 0 : data.goodValue
|
|
12893
|
+
});
|
|
12894
|
+
}
|
|
12895
|
+
});
|
|
12896
|
+
pubsub__default['default'].subscribeOnce(componentMap$1[compType].eventNameMap.changeShopCode, function (type, data) {
|
|
12897
|
+
// console.log(data);
|
|
12898
|
+
onChange(_objectSpread2(_objectSpread2({}, valueRef === null || valueRef === void 0 ? void 0 : valueRef.current), {}, {
|
|
12899
|
+
shopCode: data.shopCode
|
|
12900
|
+
}));
|
|
12901
|
+
});
|
|
12902
|
+
return function () {
|
|
12903
|
+
pubsub__default['default'].clearAllSubscriptions();
|
|
12904
|
+
};
|
|
12905
|
+
}, [disabled]);
|
|
12906
|
+
var _onSelect = function onSelect(list) {
|
|
12907
|
+
var _withInfo$current, _withInfo$current2, _valueRef$current7;
|
|
12908
|
+
if (disabled) return;
|
|
12909
|
+
var newList = lodash.cloneDeep(list);
|
|
12910
|
+
var typeMap = _defineProperty({
|
|
12911
|
+
// type: componentMap[compType].eventNameMap.selectList,
|
|
12912
|
+
// returnType: componentMap[compType].eventNameMap.returnSelectList,
|
|
12913
|
+
// reissueType: componentMap[compType].eventNameMap.reissueSelectList,
|
|
12914
|
+
type: componentMap$1[compType].eventNameMap.selectList
|
|
12915
|
+
}, "".concat(componentMap$1[compType].type, "ReissueType"), componentMap$1[compType].eventNameMap.reissueSelectList);
|
|
12916
|
+
var type = typeMap[(_withInfo$current = withInfo.current) === null || _withInfo$current === void 0 ? void 0 : _withInfo$current.type];
|
|
12917
|
+
// console.log('onSelect', type, withInfo.current, newList);
|
|
12918
|
+
pubsub__default['default'].publish(type, {
|
|
12919
|
+
type: (_withInfo$current2 = withInfo.current) === null || _withInfo$current2 === void 0 ? void 0 : _withInfo$current2.val,
|
|
12920
|
+
list: newList.map(function (item) {
|
|
12921
|
+
item.canDelete = true;
|
|
12922
|
+
return item;
|
|
12923
|
+
}),
|
|
12924
|
+
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current7 = valueRef.current) === null || _valueRef$current7 === void 0 ? void 0 : _valueRef$current7.shopCode,
|
|
12925
|
+
goodValue: withInfo.current.goodValue
|
|
12926
|
+
});
|
|
12927
|
+
};
|
|
12928
|
+
var _onDelete = function onDelete(item) {
|
|
12929
|
+
var deleteId = item === null || item === void 0 ? void 0 : item.specId;
|
|
12930
|
+
pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.deleteGood, deleteId);
|
|
12931
|
+
pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.reissueDeleteGood, deleteId);
|
|
12932
|
+
pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.returnDeleteGood, deleteId);
|
|
12933
|
+
};
|
|
12934
|
+
var changeHandle = function changeHandle(list) {
|
|
12935
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, componentMap$1[compType].key, list)));
|
|
12936
|
+
};
|
|
12937
|
+
return /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
12938
|
+
key: componentMap$1[compType].key
|
|
12939
|
+
}, props), {}, {
|
|
12940
|
+
disabled: disabled,
|
|
12941
|
+
value: value === null || value === void 0 ? void 0 : value[componentMap$1[compType].key],
|
|
12942
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
12943
|
+
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),
|
|
12944
|
+
selectType: withInfo === null || withInfo === void 0 ? void 0 : (_withInfo$current4 = withInfo.current) === null || _withInfo$current4 === void 0 ? void 0 : _withInfo$current4.type,
|
|
12945
|
+
onSelect: function onSelect(list) {
|
|
12946
|
+
return _onSelect(list);
|
|
12947
|
+
},
|
|
12948
|
+
onDelete: function onDelete(item) {
|
|
12949
|
+
return _onDelete(item);
|
|
12950
|
+
},
|
|
12951
|
+
onChange: function onChange(val) {
|
|
12952
|
+
return changeHandle(val);
|
|
12953
|
+
}
|
|
12954
|
+
}));
|
|
12955
|
+
};
|
|
12956
|
+
|
|
12115
12957
|
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";
|
|
12116
12958
|
styleInject(css_248z$a);
|
|
12117
12959
|
|
|
12118
12960
|
var TabPane$1 = antd.Tabs.TabPane;
|
|
12119
12961
|
var Option$2 = antd.Select.Option;
|
|
12120
12962
|
var Search$1 = antd.Input.Search;
|
|
12121
|
-
var GoodsModal$
|
|
12963
|
+
var GoodsModal$4 = function GoodsModal(props) {
|
|
12122
12964
|
var onSubmit = props.onSubmit,
|
|
12123
12965
|
_onCancel = props.onCancel,
|
|
12124
12966
|
visible = props.visible,
|
|
@@ -12569,7 +13411,7 @@ var Goods$1 = function Goods(props, ref) {
|
|
|
12569
13411
|
};
|
|
12570
13412
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12571
13413
|
className: "goodsBox"
|
|
12572
|
-
}, /*#__PURE__*/React__default['default'].createElement(GoodsModal$
|
|
13414
|
+
}, /*#__PURE__*/React__default['default'].createElement(GoodsModal$4, {
|
|
12573
13415
|
visible: visible,
|
|
12574
13416
|
onSubmit: onSubmit,
|
|
12575
13417
|
type: type,
|
|
@@ -12902,6 +13744,7 @@ exports.BsSystemOrder = index$1;
|
|
|
12902
13744
|
exports.BuyerNick = BuyerNick;
|
|
12903
13745
|
exports.CalculationInput = CalculationInput;
|
|
12904
13746
|
exports.ChooseBaby = ChooseBaby;
|
|
13747
|
+
exports.CommonGoods = CommonGoods;
|
|
12905
13748
|
exports.CommonMultiStatus = CommonSystemOrder$1;
|
|
12906
13749
|
exports.CommonStatus = CommonStatus;
|
|
12907
13750
|
exports.CommonSystemOrder = CommonSystemOrder;
|