@kmkf-fe-packages/basic-components 0.24.1 → 0.24.2-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.esm.js +971 -149
- package/dist/index.js +970 -147
- package/dist/src/bs/component/GoodItem/index.d.ts +1 -1
- package/dist/src/bs/component/model/WdtGoodsModal.d.ts +12 -0
- package/dist/src/common/CommonGoods/index.d.ts +3 -0
- package/dist/src/index.d.ts +1 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -7380,6 +7380,7 @@ 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();
|
|
7383
7384
|
var Province = function Province(props) {
|
|
7384
7385
|
var _props$type = props.type,
|
|
7385
7386
|
type = _props$type === void 0 ? 'workOrder' : _props$type,
|
|
@@ -7398,7 +7399,11 @@ var Province = function Province(props) {
|
|
|
7398
7399
|
while (1) switch (_context.prev = _context.next) {
|
|
7399
7400
|
case 0:
|
|
7400
7401
|
num++;
|
|
7401
|
-
options =
|
|
7402
|
+
options = ({
|
|
7403
|
+
bs: bsAddressData,
|
|
7404
|
+
wdt: wdtAddressData,
|
|
7405
|
+
workOrder: addressData
|
|
7406
|
+
}[type] || addressData).addressOptions || [];
|
|
7402
7407
|
if (!(options === null || options === void 0 ? void 0 : options.length) && num < 6) {
|
|
7403
7408
|
time.current = setTimeout(function () {
|
|
7404
7409
|
initPageSource();
|
|
@@ -7537,7 +7542,11 @@ var IdentifyAddress = function IdentifyAddress(props) {
|
|
|
7537
7542
|
receiverMobile: val === null || val === void 0 ? void 0 : val.phone,
|
|
7538
7543
|
address: []
|
|
7539
7544
|
};
|
|
7540
|
-
var addressData = type
|
|
7545
|
+
var addressData = (type && {
|
|
7546
|
+
bs: kmkfUtils.BsAddressData,
|
|
7547
|
+
wdt: kmkfUtils.WdtAddressData,
|
|
7548
|
+
workOrder: kmkfUtils.AddressData
|
|
7549
|
+
}[type] || kmkfUtils.AddressData).getInstance();
|
|
7541
7550
|
if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
|
|
7542
7551
|
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)];
|
|
7543
7552
|
}
|
|
@@ -11081,6 +11090,441 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
11081
11090
|
};
|
|
11082
11091
|
var GoodsModal$2 = /*#__PURE__*/React.forwardRef(GoodsModal$1);
|
|
11083
11092
|
|
|
11093
|
+
var RangePicker = antd.DatePicker.RangePicker;
|
|
11094
|
+
var columns$1 = [{
|
|
11095
|
+
dataIndex: 'index',
|
|
11096
|
+
title: 'NO',
|
|
11097
|
+
render: function render(val, record, index) {
|
|
11098
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11099
|
+
style: {
|
|
11100
|
+
width: 25
|
|
11101
|
+
}
|
|
11102
|
+
}, index + 1);
|
|
11103
|
+
},
|
|
11104
|
+
width: 100
|
|
11105
|
+
}, {
|
|
11106
|
+
dataIndex: 'goodName',
|
|
11107
|
+
title: '商品名称',
|
|
11108
|
+
width: 200,
|
|
11109
|
+
ellipsis: true
|
|
11110
|
+
}, {
|
|
11111
|
+
dataIndex: 'goodNo',
|
|
11112
|
+
title: '商品spu编码',
|
|
11113
|
+
width: 200,
|
|
11114
|
+
ellipsis: true
|
|
11115
|
+
}, {
|
|
11116
|
+
dataIndex: 'goodId',
|
|
11117
|
+
title: 'SPUID',
|
|
11118
|
+
width: 200,
|
|
11119
|
+
ellipsis: true
|
|
11120
|
+
}, {
|
|
11121
|
+
dataIndex: 'specCount',
|
|
11122
|
+
title: '规格数',
|
|
11123
|
+
width: 160,
|
|
11124
|
+
ellipsis: true
|
|
11125
|
+
}];
|
|
11126
|
+
var expandedColumns = [{
|
|
11127
|
+
dataIndex: 'specName',
|
|
11128
|
+
title: '商品sku名称',
|
|
11129
|
+
width: 200,
|
|
11130
|
+
ellipsis: true
|
|
11131
|
+
}, {
|
|
11132
|
+
dataIndex: 'specNo',
|
|
11133
|
+
title: '商品sku编码',
|
|
11134
|
+
width: 200,
|
|
11135
|
+
ellipsis: true
|
|
11136
|
+
}, {
|
|
11137
|
+
dataIndex: 'specId',
|
|
11138
|
+
title: 'SKUID',
|
|
11139
|
+
width: 200,
|
|
11140
|
+
ellipsis: true
|
|
11141
|
+
}, {
|
|
11142
|
+
dataIndex: 'imgUrl',
|
|
11143
|
+
title: '商品图片',
|
|
11144
|
+
width: 100,
|
|
11145
|
+
render: function render(picUrl) {
|
|
11146
|
+
return /*#__PURE__*/React__default['default'].createElement("img", {
|
|
11147
|
+
style: {
|
|
11148
|
+
width: '40px',
|
|
11149
|
+
height: '40px',
|
|
11150
|
+
objectFit: 'contain'
|
|
11151
|
+
},
|
|
11152
|
+
src: picUrl
|
|
11153
|
+
});
|
|
11154
|
+
}
|
|
11155
|
+
}, {
|
|
11156
|
+
dataIndex: 'marketPrice',
|
|
11157
|
+
title: '市场价',
|
|
11158
|
+
width: 140
|
|
11159
|
+
}, {
|
|
11160
|
+
dataIndex: 'retailPrice',
|
|
11161
|
+
title: '零售价',
|
|
11162
|
+
width: 140
|
|
11163
|
+
}, {
|
|
11164
|
+
dataIndex: 'memberPrice',
|
|
11165
|
+
title: '会员价',
|
|
11166
|
+
width: 140
|
|
11167
|
+
}];
|
|
11168
|
+
var dateFormat = 'YYYY-MM-DD HH:mm:ss';
|
|
11169
|
+
var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
11170
|
+
var initStartTime = hooks().subtract(30, 'd');
|
|
11171
|
+
var initEndTime = hooks();
|
|
11172
|
+
React.useImperativeHandle(ref, function () {
|
|
11173
|
+
return {
|
|
11174
|
+
open: function open(shopCode) {
|
|
11175
|
+
setVisible(true);
|
|
11176
|
+
setPageNo(1);
|
|
11177
|
+
setSelect([]);
|
|
11178
|
+
setSelectIds([]);
|
|
11179
|
+
form.setFieldsValue({
|
|
11180
|
+
dateTimePicker: [initStartTime, initEndTime],
|
|
11181
|
+
code: ''
|
|
11182
|
+
});
|
|
11183
|
+
// getShopList();
|
|
11184
|
+
}
|
|
11185
|
+
};
|
|
11186
|
+
});
|
|
11187
|
+
|
|
11188
|
+
var onSubmit = props.onSubmit,
|
|
11189
|
+
shopId = props.shopId,
|
|
11190
|
+
shopList = props.shopList,
|
|
11191
|
+
width = props.width,
|
|
11192
|
+
companyKey = props.companyKey;
|
|
11193
|
+
var _useState = React.useState(false),
|
|
11194
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
11195
|
+
visible = _useState2[0],
|
|
11196
|
+
setVisible = _useState2[1];
|
|
11197
|
+
var _useState3 = React.useState([]),
|
|
11198
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
11199
|
+
selectList = _useState4[0],
|
|
11200
|
+
setSelect = _useState4[1];
|
|
11201
|
+
var _useState5 = React.useState([]),
|
|
11202
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
11203
|
+
selectIds = _useState6[0],
|
|
11204
|
+
setSelectIds = _useState6[1];
|
|
11205
|
+
var _useState7 = React.useState(1),
|
|
11206
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
11207
|
+
pageNo = _useState8[0],
|
|
11208
|
+
setPageNo = _useState8[1];
|
|
11209
|
+
var _useState9 = React.useState(20),
|
|
11210
|
+
_useState10 = _slicedToArray(_useState9, 1),
|
|
11211
|
+
pageSize = _useState10[0];
|
|
11212
|
+
var _useState11 = React.useState([]),
|
|
11213
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
11214
|
+
goodList = _useState12[0],
|
|
11215
|
+
setGoodList = _useState12[1];
|
|
11216
|
+
var _useState13 = React.useState(false),
|
|
11217
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
11218
|
+
loading = _useState14[0],
|
|
11219
|
+
setLoading = _useState14[1];
|
|
11220
|
+
var _useState15 = React.useState(0),
|
|
11221
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
11222
|
+
total = _useState16[0],
|
|
11223
|
+
setTotal = _useState16[1];
|
|
11224
|
+
var displaySelectList = React.useMemo(function () {
|
|
11225
|
+
return selectList.map(function (item, i) {
|
|
11226
|
+
item.index = i + 1;
|
|
11227
|
+
return item;
|
|
11228
|
+
});
|
|
11229
|
+
}, [selectList]);
|
|
11230
|
+
React.useEffect(function () {
|
|
11231
|
+
if (visible) {
|
|
11232
|
+
queryItems();
|
|
11233
|
+
}
|
|
11234
|
+
}, [pageNo, visible]);
|
|
11235
|
+
var _Form$useForm = antd.Form.useForm(),
|
|
11236
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
11237
|
+
form = _Form$useForm2[0];
|
|
11238
|
+
//选择页码
|
|
11239
|
+
var pageChange = function pageChange(page) {
|
|
11240
|
+
setPageNo(page);
|
|
11241
|
+
};
|
|
11242
|
+
/**
|
|
11243
|
+
* 查询商品
|
|
11244
|
+
*/
|
|
11245
|
+
var queryItems = /*#__PURE__*/function () {
|
|
11246
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
11247
|
+
var search,
|
|
11248
|
+
_formData$dateTimePic,
|
|
11249
|
+
_formData$dateTimePic2,
|
|
11250
|
+
_formData$dateTimePic3,
|
|
11251
|
+
_formData$dateTimePic4,
|
|
11252
|
+
_formData$dateTimePic5,
|
|
11253
|
+
_formData$dateTimePic6,
|
|
11254
|
+
formData,
|
|
11255
|
+
startTime,
|
|
11256
|
+
endTime,
|
|
11257
|
+
params,
|
|
11258
|
+
res,
|
|
11259
|
+
_res$data,
|
|
11260
|
+
_res$data$productList,
|
|
11261
|
+
productList,
|
|
11262
|
+
_res$data$total,
|
|
11263
|
+
_total,
|
|
11264
|
+
errorMsg,
|
|
11265
|
+
newProducts,
|
|
11266
|
+
_args = arguments;
|
|
11267
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11268
|
+
while (1) switch (_context.prev = _context.next) {
|
|
11269
|
+
case 0:
|
|
11270
|
+
search = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
11271
|
+
_context.prev = 1;
|
|
11272
|
+
setLoading(true);
|
|
11273
|
+
formData = form.getFieldsValue();
|
|
11274
|
+
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);
|
|
11275
|
+
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);
|
|
11276
|
+
params = {
|
|
11277
|
+
// shopCode: shopCode,
|
|
11278
|
+
pageSize: pageSize,
|
|
11279
|
+
pageNo: pageNo - 1,
|
|
11280
|
+
goodNo: search.code,
|
|
11281
|
+
startTime: startTime,
|
|
11282
|
+
endTime: endTime
|
|
11283
|
+
};
|
|
11284
|
+
_context.next = 9;
|
|
11285
|
+
return extendRequest('/qy/gdfw/product/wdtListProduct', {
|
|
11286
|
+
method: 'post',
|
|
11287
|
+
data: params
|
|
11288
|
+
});
|
|
11289
|
+
case 9:
|
|
11290
|
+
res = _context.sent;
|
|
11291
|
+
_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;
|
|
11292
|
+
if (res.success) {
|
|
11293
|
+
newProducts = productList.map(function (item, index) {
|
|
11294
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
11295
|
+
index: index + 1
|
|
11296
|
+
});
|
|
11297
|
+
});
|
|
11298
|
+
setGoodList(_toConsumableArray(newProducts));
|
|
11299
|
+
if (pageNo === 1) {
|
|
11300
|
+
setTotal(_total);
|
|
11301
|
+
}
|
|
11302
|
+
} else {
|
|
11303
|
+
setGoodList([]);
|
|
11304
|
+
setTotal(0);
|
|
11305
|
+
antd.message.error(errorMsg || res.message);
|
|
11306
|
+
}
|
|
11307
|
+
case 12:
|
|
11308
|
+
_context.prev = 12;
|
|
11309
|
+
setLoading(false);
|
|
11310
|
+
return _context.finish(12);
|
|
11311
|
+
case 15:
|
|
11312
|
+
case "end":
|
|
11313
|
+
return _context.stop();
|
|
11314
|
+
}
|
|
11315
|
+
}, _callee, null, [[1,, 12, 15]]);
|
|
11316
|
+
}));
|
|
11317
|
+
return function queryItems() {
|
|
11318
|
+
return _ref.apply(this, arguments);
|
|
11319
|
+
};
|
|
11320
|
+
}();
|
|
11321
|
+
var _onCancel = function onCancel() {
|
|
11322
|
+
setVisible(false);
|
|
11323
|
+
};
|
|
11324
|
+
var onOk = function onOk() {
|
|
11325
|
+
onSubmit(selectList);
|
|
11326
|
+
_onCancel();
|
|
11327
|
+
};
|
|
11328
|
+
var onFinish = function onFinish(fieldsValue) {
|
|
11329
|
+
var searchValue = {
|
|
11330
|
+
code: fieldsValue.code
|
|
11331
|
+
};
|
|
11332
|
+
queryItems(searchValue);
|
|
11333
|
+
};
|
|
11334
|
+
var onReset = function onReset() {
|
|
11335
|
+
form.resetFields();
|
|
11336
|
+
form.setFieldsValue({
|
|
11337
|
+
dateTimePicker: [hooks().subtract(30, 'd'), hooks()],
|
|
11338
|
+
code: ''
|
|
11339
|
+
});
|
|
11340
|
+
setPageNo(function (prev) {
|
|
11341
|
+
if (prev === 1 && visible) {
|
|
11342
|
+
queryItems();
|
|
11343
|
+
}
|
|
11344
|
+
return 1;
|
|
11345
|
+
});
|
|
11346
|
+
};
|
|
11347
|
+
// const getShopList = async () => {
|
|
11348
|
+
// const { success, data } = await request('/qy/diamond/getConfigInfo', {
|
|
11349
|
+
// method: 'get',
|
|
11350
|
+
// params: {
|
|
11351
|
+
// key: 'company-third-shop-info',
|
|
11352
|
+
// },
|
|
11353
|
+
// });
|
|
11354
|
+
// const obj: any = JSON.parse(data || '{}');
|
|
11355
|
+
// if (success) {
|
|
11356
|
+
// const list = (obj?.[companyKey] || []).map((item: any) => {
|
|
11357
|
+
// return {
|
|
11358
|
+
// label: item.shopName,
|
|
11359
|
+
// value: item.shopCode,
|
|
11360
|
+
// };
|
|
11361
|
+
// });
|
|
11362
|
+
// setShopList(list);
|
|
11363
|
+
// }
|
|
11364
|
+
// };
|
|
11365
|
+
var onValuesChange = function onValuesChange(changedValues) {
|
|
11366
|
+
if (changedValues === null || changedValues === void 0 ? void 0 : changedValues['shopId']) {
|
|
11367
|
+
queryItems(changedValues === null || changedValues === void 0 ? void 0 : changedValues.shopId);
|
|
11368
|
+
pubsub__default['default'].publish('changeShopCode', {
|
|
11369
|
+
shopCode: changedValues.shopId
|
|
11370
|
+
});
|
|
11371
|
+
}
|
|
11372
|
+
};
|
|
11373
|
+
var handleDelete = function handleDelete(record, index) {
|
|
11374
|
+
var newSelectList = selectList.filter(function (item) {
|
|
11375
|
+
return item.specId !== record.specId;
|
|
11376
|
+
});
|
|
11377
|
+
setSelect(_toConsumableArray(newSelectList));
|
|
11378
|
+
setSelectIds(_toConsumableArray(newSelectList.map(function (item) {
|
|
11379
|
+
return item.specId;
|
|
11380
|
+
})));
|
|
11381
|
+
};
|
|
11382
|
+
var displaySelectedColumns = [{
|
|
11383
|
+
dataIndex: 'operation',
|
|
11384
|
+
title: '',
|
|
11385
|
+
render: function render(_, record, index) {
|
|
11386
|
+
return /*#__PURE__*/React__default['default'].createElement(icons.DeleteOutlined, {
|
|
11387
|
+
onClick: function onClick() {
|
|
11388
|
+
return handleDelete(record);
|
|
11389
|
+
}
|
|
11390
|
+
});
|
|
11391
|
+
}
|
|
11392
|
+
}, {
|
|
11393
|
+
dataIndex: 'index',
|
|
11394
|
+
title: 'NO',
|
|
11395
|
+
render: function render(val, record, index) {
|
|
11396
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11397
|
+
style: {
|
|
11398
|
+
width: 25
|
|
11399
|
+
}
|
|
11400
|
+
}, index + 1);
|
|
11401
|
+
}
|
|
11402
|
+
}];
|
|
11403
|
+
var expandedRowSelection = {
|
|
11404
|
+
fixed: true,
|
|
11405
|
+
selectedRowKeys: selectIds,
|
|
11406
|
+
onSelect: function onSelect(record, selected, selectedRows, nativeEvent) {
|
|
11407
|
+
var tempList = [];
|
|
11408
|
+
if (selected) {
|
|
11409
|
+
tempList = [].concat(_toConsumableArray(selectList), [record]);
|
|
11410
|
+
} else {
|
|
11411
|
+
tempList = selectList.filter(function (item) {
|
|
11412
|
+
return item.specId !== record.specId;
|
|
11413
|
+
});
|
|
11414
|
+
}
|
|
11415
|
+
setSelect(_toConsumableArray(tempList));
|
|
11416
|
+
setSelectIds(_toConsumableArray(tempList.map(function (item) {
|
|
11417
|
+
return item.specId;
|
|
11418
|
+
})));
|
|
11419
|
+
},
|
|
11420
|
+
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
11421
|
+
var tempAllList = [];
|
|
11422
|
+
if (selected) {
|
|
11423
|
+
tempAllList = [].concat(_toConsumableArray(selectList), _toConsumableArray(selectedRows.filter(Boolean)));
|
|
11424
|
+
} else {
|
|
11425
|
+
tempAllList = selectList.filter(function (list) {
|
|
11426
|
+
return changeRows.filter(Boolean).every(function (item) {
|
|
11427
|
+
return list.specId !== item.specId;
|
|
11428
|
+
});
|
|
11429
|
+
});
|
|
11430
|
+
}
|
|
11431
|
+
setSelect(_toConsumableArray(tempAllList));
|
|
11432
|
+
setSelectIds(_toConsumableArray(tempAllList.map(function (item) {
|
|
11433
|
+
return item.specId;
|
|
11434
|
+
})));
|
|
11435
|
+
}
|
|
11436
|
+
};
|
|
11437
|
+
var expandedRowRender = function expandedRowRender(record, index, indent, expanded) {
|
|
11438
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
11439
|
+
rowKey: 'specId',
|
|
11440
|
+
size: 'small',
|
|
11441
|
+
columns: expandedColumns,
|
|
11442
|
+
dataSource: record.itemDetailList || [],
|
|
11443
|
+
pagination: false,
|
|
11444
|
+
rowSelection: expandedRowSelection,
|
|
11445
|
+
scroll: {
|
|
11446
|
+
x: true
|
|
11447
|
+
}
|
|
11448
|
+
});
|
|
11449
|
+
};
|
|
11450
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
11451
|
+
title: '选择商品',
|
|
11452
|
+
okText: '确认',
|
|
11453
|
+
cancelText: '取消',
|
|
11454
|
+
visible: visible,
|
|
11455
|
+
width: width || 850,
|
|
11456
|
+
onCancel: function onCancel() {
|
|
11457
|
+
_onCancel();
|
|
11458
|
+
},
|
|
11459
|
+
onOk: onOk,
|
|
11460
|
+
wrapClassName: "goodModal"
|
|
11461
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Form, {
|
|
11462
|
+
layout: "inline",
|
|
11463
|
+
form: form,
|
|
11464
|
+
onFinish: onFinish,
|
|
11465
|
+
onValuesChange: onValuesChange,
|
|
11466
|
+
initialValues: {
|
|
11467
|
+
code: ''
|
|
11468
|
+
}
|
|
11469
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
11470
|
+
name: "dateTimePicker"
|
|
11471
|
+
}, /*#__PURE__*/React__default['default'].createElement(RangePicker, {
|
|
11472
|
+
placeholder: ['开始日期', '结束日期'],
|
|
11473
|
+
showTime: true,
|
|
11474
|
+
defaultValue: [hooks(initStartTime.format(dateFormat), dateFormat), hooks(initEndTime.format(dateFormat), dateFormat)]
|
|
11475
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
11476
|
+
name: "code"
|
|
11477
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11478
|
+
placeholder: "\u5546\u54C1\u7F16\u7801",
|
|
11479
|
+
allowClear: true,
|
|
11480
|
+
style: {
|
|
11481
|
+
width: 150
|
|
11482
|
+
}
|
|
11483
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
11484
|
+
type: "primary",
|
|
11485
|
+
htmlType: "submit"
|
|
11486
|
+
}, "\u67E5\u8BE2"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
11487
|
+
onClick: onReset
|
|
11488
|
+
}, "\u91CD\u7F6E"))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11489
|
+
style: {
|
|
11490
|
+
marginTop: '16px'
|
|
11491
|
+
}
|
|
11492
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
11493
|
+
rowKey: 'goodNo',
|
|
11494
|
+
columns: columns$1,
|
|
11495
|
+
dataSource: goodList,
|
|
11496
|
+
loading: loading,
|
|
11497
|
+
scroll: {
|
|
11498
|
+
x: true,
|
|
11499
|
+
y: 250
|
|
11500
|
+
},
|
|
11501
|
+
expandable: {
|
|
11502
|
+
expandedRowRender: expandedRowRender
|
|
11503
|
+
},
|
|
11504
|
+
pagination: {
|
|
11505
|
+
size: 'small',
|
|
11506
|
+
total: total,
|
|
11507
|
+
current: pageNo,
|
|
11508
|
+
pageSize: pageSize,
|
|
11509
|
+
pageSizeOptions: [],
|
|
11510
|
+
onChange: pageChange
|
|
11511
|
+
}
|
|
11512
|
+
})), !!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(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
11513
|
+
rowKey: 'specId',
|
|
11514
|
+
columns: [].concat(displaySelectedColumns, expandedColumns),
|
|
11515
|
+
dataSource: displaySelectList,
|
|
11516
|
+
pagination: false,
|
|
11517
|
+
scroll: {
|
|
11518
|
+
x: true,
|
|
11519
|
+
y: 250
|
|
11520
|
+
},
|
|
11521
|
+
style: {
|
|
11522
|
+
width: '100%'
|
|
11523
|
+
}
|
|
11524
|
+
})))));
|
|
11525
|
+
};
|
|
11526
|
+
var WdtGoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$3);
|
|
11527
|
+
|
|
11084
11528
|
// interface GoodsItem {
|
|
11085
11529
|
// title: string;
|
|
11086
11530
|
// pic: string;
|
|
@@ -11091,6 +11535,7 @@ var GoodsModal$2 = /*#__PURE__*/React.forwardRef(GoodsModal$1);
|
|
|
11091
11535
|
var GoodItem$1 = function GoodItem(props) {
|
|
11092
11536
|
var _props$value = props.value,
|
|
11093
11537
|
value = _props$value === void 0 ? [] : _props$value,
|
|
11538
|
+
type = props.type,
|
|
11094
11539
|
onChange = props.onChange,
|
|
11095
11540
|
disabled = props.disabled,
|
|
11096
11541
|
_props$showHeader = props.showHeader,
|
|
@@ -11138,105 +11583,214 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11138
11583
|
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(value));
|
|
11139
11584
|
}
|
|
11140
11585
|
};
|
|
11141
|
-
|
|
11142
|
-
var GOODS_INFO_COLUMNS = function GOODS_INFO_COLUMNS() {
|
|
11586
|
+
var COLUMNS_MAP = function COLUMNS_MAP() {
|
|
11143
11587
|
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
11144
|
-
return
|
|
11145
|
-
|
|
11146
|
-
|
|
11147
|
-
|
|
11148
|
-
|
|
11149
|
-
|
|
11150
|
-
|
|
11151
|
-
|
|
11152
|
-
|
|
11153
|
-
|
|
11154
|
-
value: '是'
|
|
11155
|
-
}, {
|
|
11156
|
-
label: '否',
|
|
11157
|
-
value: '否'
|
|
11158
|
-
}],
|
|
11159
|
-
disabled: disabled,
|
|
11160
|
-
value: val,
|
|
11161
|
-
onChange: function onChange(val) {
|
|
11162
|
-
return updateHandle(val, index, 'mark');
|
|
11163
|
-
}
|
|
11164
|
-
});
|
|
11165
|
-
}
|
|
11166
|
-
}, {
|
|
11167
|
-
dataIndex: 'skuName',
|
|
11168
|
-
title: "".concat(text, "sku\u540D\u79F0"),
|
|
11169
|
-
align: 'center',
|
|
11170
|
-
ellipsis: true,
|
|
11171
|
-
width: 250
|
|
11172
|
-
}, {
|
|
11173
|
-
dataIndex: 'sku',
|
|
11174
|
-
title: "".concat(text, "sku\u7F16\u7801"),
|
|
11175
|
-
align: 'center',
|
|
11176
|
-
ellipsis: true,
|
|
11177
|
-
width: 100
|
|
11178
|
-
}, {
|
|
11179
|
-
dataIndex: 'name',
|
|
11180
|
-
title: "".concat(text, "\u540D\u79F0"),
|
|
11181
|
-
align: 'center',
|
|
11182
|
-
ellipsis: true,
|
|
11183
|
-
width: 250
|
|
11184
|
-
}, {
|
|
11185
|
-
dataIndex: 'pic',
|
|
11186
|
-
title: "\u56FE\u7247",
|
|
11187
|
-
align: 'center',
|
|
11188
|
-
ellipsis: true,
|
|
11189
|
-
width: 100,
|
|
11190
|
-
render: function render(val) {
|
|
11191
|
-
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
11192
|
-
width: 60,
|
|
11193
|
-
src: val
|
|
11194
|
-
});
|
|
11195
|
-
}
|
|
11196
|
-
}, {
|
|
11197
|
-
dataIndex: 'code',
|
|
11198
|
-
title: "".concat(text, "\u7F16\u7801"),
|
|
11199
|
-
align: 'center',
|
|
11200
|
-
ellipsis: true,
|
|
11201
|
-
width: 100
|
|
11202
|
-
}, {
|
|
11203
|
-
dataIndex: 'money',
|
|
11204
|
-
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
11205
|
-
align: 'center',
|
|
11206
|
-
ellipsis: true,
|
|
11207
|
-
width: 100
|
|
11208
|
-
}, {
|
|
11209
|
-
dataIndex: 'number',
|
|
11210
|
-
title: "".concat(text, "\u6570\u91CF"),
|
|
11211
|
-
align: 'center',
|
|
11212
|
-
ellipsis: true,
|
|
11213
|
-
width: 100,
|
|
11214
|
-
render: function render(val, record, index) {
|
|
11215
|
-
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
11216
|
-
style: {
|
|
11588
|
+
return function (type) {
|
|
11589
|
+
var columns = [];
|
|
11590
|
+
switch (type) {
|
|
11591
|
+
case 'WDT_REISSUE_GOODS':
|
|
11592
|
+
case 'WDT_GOODS':
|
|
11593
|
+
columns = [{
|
|
11594
|
+
dataIndex: 'goodId',
|
|
11595
|
+
title: "SPUID",
|
|
11596
|
+
align: 'center',
|
|
11597
|
+
ellipsis: true,
|
|
11217
11598
|
width: 70
|
|
11599
|
+
}, {
|
|
11600
|
+
dataIndex: 'goodNo',
|
|
11601
|
+
title: "SPU\u5546\u54C1\u7F16\u7801",
|
|
11602
|
+
align: 'center',
|
|
11603
|
+
ellipsis: true,
|
|
11604
|
+
width: 100
|
|
11605
|
+
}, {
|
|
11606
|
+
dataIndex: 'goodName',
|
|
11607
|
+
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
11608
|
+
align: 'center',
|
|
11609
|
+
ellipsis: true,
|
|
11610
|
+
width: 250
|
|
11611
|
+
}, {
|
|
11612
|
+
dataIndex: 'specId',
|
|
11613
|
+
title: "".concat(text, "SKUID"),
|
|
11614
|
+
align: 'center',
|
|
11615
|
+
ellipsis: true,
|
|
11616
|
+
width: 100
|
|
11617
|
+
}, {
|
|
11618
|
+
dataIndex: 'specNo',
|
|
11619
|
+
title: "".concat(text, "sku\u7F16\u7801"),
|
|
11620
|
+
align: 'center',
|
|
11621
|
+
ellipsis: true,
|
|
11622
|
+
width: 100
|
|
11623
|
+
}, {
|
|
11624
|
+
dataIndex: 'specName',
|
|
11625
|
+
title: "".concat(text, "sku\u540D\u79F0"),
|
|
11626
|
+
align: 'center',
|
|
11627
|
+
ellipsis: true,
|
|
11628
|
+
width: 250
|
|
11629
|
+
}, {
|
|
11630
|
+
dataIndex: 'orderPrice',
|
|
11631
|
+
title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
|
|
11632
|
+
align: 'center',
|
|
11633
|
+
ellipsis: true,
|
|
11634
|
+
width: 100
|
|
11635
|
+
}, {
|
|
11636
|
+
dataIndex: 'num',
|
|
11637
|
+
title: "".concat(text, "\u6570\u91CF"),
|
|
11638
|
+
align: 'center',
|
|
11639
|
+
ellipsis: true,
|
|
11640
|
+
width: 100,
|
|
11641
|
+
render: function render(val, record, index) {
|
|
11642
|
+
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
11643
|
+
style: {
|
|
11644
|
+
width: 70
|
|
11645
|
+
},
|
|
11646
|
+
value: val,
|
|
11647
|
+
min: 0,
|
|
11648
|
+
precision: 0,
|
|
11649
|
+
onChange: function onChange(num) {
|
|
11650
|
+
return updateHandle(num, index, 'num');
|
|
11651
|
+
}
|
|
11652
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
11653
|
+
}
|
|
11218
11654
|
},
|
|
11219
|
-
|
|
11220
|
-
|
|
11221
|
-
|
|
11222
|
-
|
|
11223
|
-
|
|
11224
|
-
|
|
11225
|
-
|
|
11655
|
+
// {
|
|
11656
|
+
// dataIndex: 'actualNum',
|
|
11657
|
+
// title: `${text}实发数量`,
|
|
11658
|
+
// align: 'center',
|
|
11659
|
+
// ellipsis: true,
|
|
11660
|
+
// width: 100,
|
|
11661
|
+
// },
|
|
11662
|
+
{
|
|
11663
|
+
dataIndex: 'sharePrice',
|
|
11664
|
+
title: "\u5206\u644A\u4EF7",
|
|
11665
|
+
align: 'center',
|
|
11666
|
+
ellipsis: true,
|
|
11667
|
+
width: 70
|
|
11668
|
+
}, {
|
|
11669
|
+
dataIndex: 'giftType',
|
|
11670
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
11671
|
+
align: 'center',
|
|
11672
|
+
ellipsis: true,
|
|
11673
|
+
width: 100,
|
|
11674
|
+
render: function render(val) {
|
|
11675
|
+
var giftTypeMap = {
|
|
11676
|
+
0: '非赠品',
|
|
11677
|
+
1: '自动赠送',
|
|
11678
|
+
2: '手工赠送',
|
|
11679
|
+
3: '回购自动送赠品',
|
|
11680
|
+
4: '前N有礼送赠品',
|
|
11681
|
+
6: '天猫优仓赠品',
|
|
11682
|
+
7: '淘宝CRM会员送赠'
|
|
11683
|
+
};
|
|
11684
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
|
|
11685
|
+
}
|
|
11686
|
+
}];
|
|
11687
|
+
break;
|
|
11688
|
+
default:
|
|
11689
|
+
columns = [{
|
|
11690
|
+
dataIndex: 'mark',
|
|
11691
|
+
title: "\u5546\u54C1\u6807\u8BB0",
|
|
11692
|
+
align: 'center',
|
|
11693
|
+
ellipsis: true,
|
|
11694
|
+
width: 70,
|
|
11695
|
+
render: function render(val, record, index) {
|
|
11696
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
11697
|
+
options: [{
|
|
11698
|
+
label: '是',
|
|
11699
|
+
value: '是'
|
|
11700
|
+
}, {
|
|
11701
|
+
label: '否',
|
|
11702
|
+
value: '否'
|
|
11703
|
+
}],
|
|
11704
|
+
disabled: disabled,
|
|
11705
|
+
value: val,
|
|
11706
|
+
onChange: function onChange(val) {
|
|
11707
|
+
return updateHandle(val, index, 'mark');
|
|
11708
|
+
}
|
|
11709
|
+
});
|
|
11710
|
+
}
|
|
11711
|
+
}, {
|
|
11712
|
+
dataIndex: 'skuName',
|
|
11713
|
+
title: "".concat(text, "sku\u540D\u79F0"),
|
|
11714
|
+
align: 'center',
|
|
11715
|
+
ellipsis: true,
|
|
11716
|
+
width: 250
|
|
11717
|
+
}, {
|
|
11718
|
+
dataIndex: 'sku',
|
|
11719
|
+
title: "".concat(text, "sku\u7F16\u7801"),
|
|
11720
|
+
align: 'center',
|
|
11721
|
+
ellipsis: true,
|
|
11722
|
+
width: 100
|
|
11723
|
+
}, {
|
|
11724
|
+
dataIndex: 'name',
|
|
11725
|
+
title: "".concat(text, "\u540D\u79F0"),
|
|
11726
|
+
align: 'center',
|
|
11727
|
+
ellipsis: true,
|
|
11728
|
+
width: 250
|
|
11729
|
+
}, {
|
|
11730
|
+
dataIndex: 'pic',
|
|
11731
|
+
title: "\u56FE\u7247",
|
|
11732
|
+
align: 'center',
|
|
11733
|
+
ellipsis: true,
|
|
11734
|
+
width: 100,
|
|
11735
|
+
render: function render(val) {
|
|
11736
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
11737
|
+
width: 60,
|
|
11738
|
+
src: val
|
|
11739
|
+
});
|
|
11740
|
+
}
|
|
11741
|
+
}, {
|
|
11742
|
+
dataIndex: 'code',
|
|
11743
|
+
title: "".concat(text, "\u7F16\u7801"),
|
|
11744
|
+
align: 'center',
|
|
11745
|
+
ellipsis: true,
|
|
11746
|
+
width: 100
|
|
11747
|
+
}, {
|
|
11748
|
+
dataIndex: 'money',
|
|
11749
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
11750
|
+
align: 'center',
|
|
11751
|
+
ellipsis: true,
|
|
11752
|
+
width: 100
|
|
11753
|
+
}, {
|
|
11754
|
+
dataIndex: 'number',
|
|
11755
|
+
title: "".concat(text, "\u6570\u91CF"),
|
|
11756
|
+
align: 'center',
|
|
11757
|
+
ellipsis: true,
|
|
11758
|
+
width: 100,
|
|
11759
|
+
render: function render(val, record, index) {
|
|
11760
|
+
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
11761
|
+
style: {
|
|
11762
|
+
width: 70
|
|
11763
|
+
},
|
|
11764
|
+
value: val,
|
|
11765
|
+
min: 0,
|
|
11766
|
+
precision: 0,
|
|
11767
|
+
onChange: function onChange(num) {
|
|
11768
|
+
return updateHandle(num, index, 'number');
|
|
11769
|
+
}
|
|
11770
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
11771
|
+
}
|
|
11772
|
+
}, {
|
|
11773
|
+
dataIndex: 'share',
|
|
11774
|
+
title: "\u5206\u644A\u4EF7",
|
|
11775
|
+
align: 'center',
|
|
11776
|
+
ellipsis: true,
|
|
11777
|
+
width: 70
|
|
11778
|
+
}, {
|
|
11779
|
+
dataIndex: 'type',
|
|
11780
|
+
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
11781
|
+
align: 'center',
|
|
11782
|
+
ellipsis: true,
|
|
11783
|
+
width: 100
|
|
11784
|
+
}];
|
|
11226
11785
|
}
|
|
11227
|
-
|
|
11228
|
-
|
|
11229
|
-
|
|
11230
|
-
|
|
11231
|
-
|
|
11232
|
-
|
|
11233
|
-
|
|
11234
|
-
|
|
11235
|
-
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
11236
|
-
align: 'center',
|
|
11237
|
-
ellipsis: true,
|
|
11238
|
-
width: 100
|
|
11239
|
-
}];
|
|
11786
|
+
return columns;
|
|
11787
|
+
};
|
|
11788
|
+
};
|
|
11789
|
+
//商品信息
|
|
11790
|
+
var GOODS_INFO_COLUMNS = function GOODS_INFO_COLUMNS() {
|
|
11791
|
+
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
11792
|
+
var COLUMNS_INFO = COLUMNS_MAP(text);
|
|
11793
|
+
return COLUMNS_INFO(type);
|
|
11240
11794
|
};
|
|
11241
11795
|
var newColumns = React.useMemo(function () {
|
|
11242
11796
|
var columnList = [{
|
|
@@ -11271,30 +11825,43 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11271
11825
|
return columnList;
|
|
11272
11826
|
}, [showHeader, value, disabled]);
|
|
11273
11827
|
var onSubmit = function onSubmit(list) {
|
|
11274
|
-
var newList =
|
|
11275
|
-
|
|
11276
|
-
|
|
11277
|
-
|
|
11278
|
-
|
|
11279
|
-
|
|
11280
|
-
|
|
11281
|
-
|
|
11282
|
-
|
|
11283
|
-
|
|
11284
|
-
|
|
11285
|
-
|
|
11286
|
-
|
|
11287
|
-
|
|
11288
|
-
|
|
11289
|
-
|
|
11290
|
-
|
|
11291
|
-
|
|
11292
|
-
|
|
11293
|
-
|
|
11294
|
-
|
|
11295
|
-
|
|
11296
|
-
|
|
11297
|
-
|
|
11828
|
+
var newList = [];
|
|
11829
|
+
if (['WDT_REISSUE_GOODS', 'WDT_GOODS'].includes(type)) {
|
|
11830
|
+
newList = list.map(function (item) {
|
|
11831
|
+
item.uuid = kmkfUtils.uuid();
|
|
11832
|
+
item.canDelete = true;
|
|
11833
|
+
item.num = 1;
|
|
11834
|
+
item.orderPrice = 0;
|
|
11835
|
+
item.sharePrice = 0;
|
|
11836
|
+
item.canUpdateNumber = canUpdateNumber;
|
|
11837
|
+
return item;
|
|
11838
|
+
});
|
|
11839
|
+
} else {
|
|
11840
|
+
newList = list.map(function (item) {
|
|
11841
|
+
var goodsId = item.goodsId,
|
|
11842
|
+
name = item.name,
|
|
11843
|
+
code = item.code,
|
|
11844
|
+
skuCode = item.skuCode,
|
|
11845
|
+
marketPrice = item.marketPrice,
|
|
11846
|
+
skuName = item.skuName;
|
|
11847
|
+
return {
|
|
11848
|
+
id: goodsId,
|
|
11849
|
+
mark: '是',
|
|
11850
|
+
pic: '',
|
|
11851
|
+
skuName: skuName,
|
|
11852
|
+
name: name,
|
|
11853
|
+
code: code,
|
|
11854
|
+
sku: skuCode,
|
|
11855
|
+
money: marketPrice || 0,
|
|
11856
|
+
share: marketPrice || 0,
|
|
11857
|
+
number: 1,
|
|
11858
|
+
type: '',
|
|
11859
|
+
uuid: kmkfUtils.uuid(),
|
|
11860
|
+
canDelete: true,
|
|
11861
|
+
canUpdateNumber: canUpdateNumber
|
|
11862
|
+
};
|
|
11863
|
+
});
|
|
11864
|
+
}
|
|
11298
11865
|
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), _toConsumableArray(newList)));
|
|
11299
11866
|
};
|
|
11300
11867
|
var onSelectChange = function onSelectChange(newSelectedRowKeys) {
|
|
@@ -11337,7 +11904,15 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11337
11904
|
locale: {
|
|
11338
11905
|
emptyText: '暂无数据'
|
|
11339
11906
|
}
|
|
11340
|
-
})), /*#__PURE__*/React__default['default'].createElement(
|
|
11907
|
+
})), ['WDT_REISSUE_GOODS', 'WDT_GOODS'].includes(type) ? /*#__PURE__*/React__default['default'].createElement(WdtGoodsModal, {
|
|
11908
|
+
ref: refModal,
|
|
11909
|
+
onSubmit: onSubmit,
|
|
11910
|
+
width: width,
|
|
11911
|
+
shopList: shopList,
|
|
11912
|
+
shopId: shopId,
|
|
11913
|
+
maxLength: maxLength,
|
|
11914
|
+
companyKey: companyKey
|
|
11915
|
+
}) : /*#__PURE__*/React__default['default'].createElement(GoodsModal$2, {
|
|
11341
11916
|
ref: refModal,
|
|
11342
11917
|
onSubmit: onSubmit,
|
|
11343
11918
|
width: width,
|
|
@@ -11718,25 +12293,60 @@ var BsExchange = function BsExchange(props) {
|
|
|
11718
12293
|
}))) : null);
|
|
11719
12294
|
};
|
|
11720
12295
|
|
|
11721
|
-
var _excluded$e = ["value", "onChange", "reasonList", "disabled"];
|
|
12296
|
+
var _excluded$e = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
12297
|
+
var typeMap = {
|
|
12298
|
+
BS_REISSUE_GOODS: {
|
|
12299
|
+
key: 'bsReissueGoods',
|
|
12300
|
+
name: 'bs',
|
|
12301
|
+
typeName: 'bsReissueType',
|
|
12302
|
+
reissueSelectList: 'reissueSelectList',
|
|
12303
|
+
reissueSelectListReturn: 'reissueSelectListReturn',
|
|
12304
|
+
reissueDeleteGood: 'reissueDeleteGood',
|
|
12305
|
+
changeShopCode: 'changeShopCode',
|
|
12306
|
+
reissueType: 'reissueType',
|
|
12307
|
+
formatDefaultField: {
|
|
12308
|
+
money: 'money',
|
|
12309
|
+
share: 'share'
|
|
12310
|
+
}
|
|
12311
|
+
},
|
|
12312
|
+
WDT_REISSUE_GOODS: {
|
|
12313
|
+
key: 'wdtReissueGoods',
|
|
12314
|
+
name: '旺店通',
|
|
12315
|
+
typeName: 'wdtReissueType',
|
|
12316
|
+
reissueSelectList: 'wdtReissueSelectList',
|
|
12317
|
+
reissueSelectListReturn: 'wdtReissueSelectListReturn',
|
|
12318
|
+
reissueDeleteGood: 'wdtReissueDeleteGood',
|
|
12319
|
+
changeShopCode: 'wdtChangeShopCode',
|
|
12320
|
+
reissueType: 'wdtReissueType',
|
|
12321
|
+
formatDefaultField: {
|
|
12322
|
+
money: 'orderPrice',
|
|
12323
|
+
share: 'sharePrice'
|
|
12324
|
+
}
|
|
12325
|
+
}
|
|
12326
|
+
};
|
|
11722
12327
|
var BsReissue = function BsReissue(props) {
|
|
12328
|
+
var _typeMap$type20, _typeMap$type21, _typeMap$type22;
|
|
11723
12329
|
var value = props.value,
|
|
11724
12330
|
onChange = props.onChange,
|
|
11725
12331
|
_props$reasonList = props.reasonList,
|
|
11726
12332
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
11727
12333
|
disabled = props.disabled,
|
|
12334
|
+
type = props.type,
|
|
11728
12335
|
other = _objectWithoutProperties(props, _excluded$e);
|
|
11729
12336
|
var valueRef = React.useRef({});
|
|
11730
12337
|
React.useEffect(function () {
|
|
11731
|
-
|
|
12338
|
+
var _typeMap$type;
|
|
12339
|
+
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) {
|
|
12340
|
+
var _typeMap$type2;
|
|
11732
12341
|
// console.log('reissueSelectList', data);
|
|
11733
12342
|
if (disabled) return;
|
|
11734
12343
|
var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
|
|
11735
12344
|
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
11736
12345
|
});
|
|
11737
|
-
newValue.
|
|
11738
|
-
|
|
11739
|
-
item.
|
|
12346
|
+
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) {
|
|
12347
|
+
var _typeMap$type3, _typeMap$type4;
|
|
12348
|
+
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;
|
|
12349
|
+
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;
|
|
11740
12350
|
item.canUpdateNumber = true;
|
|
11741
12351
|
return item;
|
|
11742
12352
|
});
|
|
@@ -11744,15 +12354,18 @@ var BsReissue = function BsReissue(props) {
|
|
|
11744
12354
|
});
|
|
11745
12355
|
}, []);
|
|
11746
12356
|
React.useEffect(function () {
|
|
11747
|
-
|
|
12357
|
+
var _typeMap$type5;
|
|
12358
|
+
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) {
|
|
12359
|
+
var _typeMap$type6;
|
|
11748
12360
|
// console.log('reissueSelectListReturn', data);
|
|
11749
12361
|
if (disabled) return;
|
|
11750
12362
|
var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
|
|
11751
12363
|
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
11752
12364
|
});
|
|
11753
|
-
newValue.
|
|
11754
|
-
|
|
11755
|
-
item.
|
|
12365
|
+
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) {
|
|
12366
|
+
var _typeMap$type7, _typeMap$type8;
|
|
12367
|
+
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;
|
|
12368
|
+
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;
|
|
11756
12369
|
item.canUpdateNumber = true;
|
|
11757
12370
|
return item;
|
|
11758
12371
|
});
|
|
@@ -11760,50 +12373,55 @@ var BsReissue = function BsReissue(props) {
|
|
|
11760
12373
|
});
|
|
11761
12374
|
}, []);
|
|
11762
12375
|
React.useEffect(function () {
|
|
12376
|
+
var _typeMap$type9, _typeMap$type12;
|
|
11763
12377
|
valueRef.current = value;
|
|
11764
|
-
pubsub__default['default'].subscribeOnce(
|
|
12378
|
+
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) {
|
|
11765
12379
|
if (disabled) return;
|
|
11766
12380
|
if (value) {
|
|
12381
|
+
var _typeMap$type10, _typeMap$type11;
|
|
11767
12382
|
var newValue = _objectSpread2({}, value);
|
|
11768
|
-
newValue.
|
|
12383
|
+
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) {
|
|
11769
12384
|
return item.sku !== data;
|
|
11770
12385
|
});
|
|
11771
12386
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
11772
12387
|
}
|
|
11773
12388
|
});
|
|
11774
|
-
pubsub__default['default'].subscribeOnce(
|
|
12389
|
+
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) {
|
|
11775
12390
|
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11776
12391
|
shopCode: data.shopCode
|
|
11777
12392
|
}));
|
|
11778
12393
|
});
|
|
11779
12394
|
}, [value, disabled]);
|
|
11780
12395
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
12396
|
+
var _typeMap$type13, _typeMap$type14, _typeMap$type15;
|
|
11781
12397
|
var newValue = _objectSpread2({}, value);
|
|
11782
|
-
newValue[
|
|
11783
|
-
newValue.
|
|
12398
|
+
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type13 = typeMap[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.typeName)] = val;
|
|
12399
|
+
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type14 = typeMap[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key)] = [];
|
|
11784
12400
|
if (['2', '4'].includes(val[0])) {
|
|
11785
12401
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
11786
12402
|
valueRef.current = newValue;
|
|
11787
12403
|
}
|
|
11788
|
-
pubsub__default['default'].publish(
|
|
12404
|
+
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), {
|
|
11789
12405
|
val: val[0],
|
|
11790
12406
|
goodValue: newValue
|
|
11791
12407
|
});
|
|
11792
12408
|
};
|
|
11793
12409
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
12410
|
+
var _typeMap$type16;
|
|
11794
12411
|
var newValue = _objectSpread2({}, value);
|
|
11795
|
-
newValue[
|
|
11796
|
-
|
|
11797
|
-
item.
|
|
12412
|
+
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) {
|
|
12413
|
+
var _typeMap$type17, _typeMap$type18;
|
|
12414
|
+
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;
|
|
12415
|
+
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;
|
|
11798
12416
|
return item;
|
|
11799
12417
|
});
|
|
11800
12418
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
11801
12419
|
};
|
|
11802
12420
|
//显示选择商品按钮 原单换不显示选择商品
|
|
11803
12421
|
var showChangeBtn = React.useMemo(function () {
|
|
11804
|
-
var _value$
|
|
11805
|
-
return ['2', '3', '4'].includes(value === null || value === void 0 ? void 0 : (_value
|
|
11806
|
-
}, [value === null || value === void 0 ? void 0 : value.
|
|
12422
|
+
var _value, _typeMap$type19;
|
|
12423
|
+
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]);
|
|
12424
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.typeName]]);
|
|
11807
12425
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
11808
12426
|
style: {
|
|
11809
12427
|
marginBottom: '8px'
|
|
@@ -11811,18 +12429,19 @@ var BsReissue = function BsReissue(props) {
|
|
|
11811
12429
|
disabled: disabled,
|
|
11812
12430
|
allowClear: false,
|
|
11813
12431
|
options: reasonList,
|
|
11814
|
-
value: value === null || value === void 0 ? void 0 : value.
|
|
12432
|
+
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)],
|
|
11815
12433
|
onChange: function onChange(val) {
|
|
11816
12434
|
return changeTypeHandle(val);
|
|
11817
12435
|
}
|
|
11818
12436
|
}), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
11819
12437
|
key: 'reissueGoods'
|
|
11820
12438
|
}, other), {}, {
|
|
12439
|
+
type: type,
|
|
11821
12440
|
disabled: disabled,
|
|
11822
12441
|
canUpdateNumber: showChangeBtn,
|
|
11823
12442
|
showChangeBtn: showChangeBtn,
|
|
11824
12443
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
11825
|
-
value: value === null || value === void 0 ? void 0 : value.
|
|
12444
|
+
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)],
|
|
11826
12445
|
onChange: function onChange(val) {
|
|
11827
12446
|
return changeGoodHandle(val);
|
|
11828
12447
|
}
|
|
@@ -11934,6 +12553,10 @@ var columnsNameMap = {
|
|
|
11934
12553
|
WLN_SYSTEM_ORDER: {
|
|
11935
12554
|
typeName: '订单类型',
|
|
11936
12555
|
tagName: '标记'
|
|
12556
|
+
},
|
|
12557
|
+
WDT_SYSTEM_ORDER: {
|
|
12558
|
+
typeName: '订单类型',
|
|
12559
|
+
tagName: '订单标签'
|
|
11937
12560
|
}
|
|
11938
12561
|
};
|
|
11939
12562
|
var index$1 = (function (props) {
|
|
@@ -11948,6 +12571,8 @@ var index$1 = (function (props) {
|
|
|
11948
12571
|
getOrderList(value.orderNo);
|
|
11949
12572
|
} else if (type === 'WLN_SYSTEM_ORDER') {
|
|
11950
12573
|
getWlnOrderList(value.orderNo);
|
|
12574
|
+
} else if (type === 'WDT_SYSTEM_ORDER') {
|
|
12575
|
+
getWdtOrderList(value.orderNo);
|
|
11951
12576
|
}
|
|
11952
12577
|
}
|
|
11953
12578
|
}, [value, type]);
|
|
@@ -12048,6 +12673,51 @@ var index$1 = (function (props) {
|
|
|
12048
12673
|
return _ref2.apply(this, arguments);
|
|
12049
12674
|
};
|
|
12050
12675
|
}();
|
|
12676
|
+
var getWdtOrderList = /*#__PURE__*/function () {
|
|
12677
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(orderNo) {
|
|
12678
|
+
var _yield$request3, success, data;
|
|
12679
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
12680
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
12681
|
+
case 0:
|
|
12682
|
+
_context3.next = 2;
|
|
12683
|
+
return extendRequest('/qy/gdfw/order/wdtOrderDetail', {
|
|
12684
|
+
method: 'post',
|
|
12685
|
+
data: {
|
|
12686
|
+
billNo: orderNo
|
|
12687
|
+
}
|
|
12688
|
+
});
|
|
12689
|
+
case 2:
|
|
12690
|
+
_yield$request3 = _context3.sent;
|
|
12691
|
+
success = _yield$request3.success;
|
|
12692
|
+
data = _yield$request3.data;
|
|
12693
|
+
if (success) {
|
|
12694
|
+
_onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
12695
|
+
orders: ((data === null || data === void 0 ? void 0 : data.trades) || []).map(function (item) {
|
|
12696
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
12697
|
+
billNo: item.tradeNo,
|
|
12698
|
+
billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
12699
|
+
billTag: item.tagName
|
|
12700
|
+
});
|
|
12701
|
+
}),
|
|
12702
|
+
showOrderInfo: data === null || data === void 0 ? void 0 : data.trades.map(function (item) {
|
|
12703
|
+
return {
|
|
12704
|
+
billNo: item.tradeNo,
|
|
12705
|
+
billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
12706
|
+
billTag: item.tagName
|
|
12707
|
+
};
|
|
12708
|
+
})
|
|
12709
|
+
}));
|
|
12710
|
+
}
|
|
12711
|
+
case 6:
|
|
12712
|
+
case "end":
|
|
12713
|
+
return _context3.stop();
|
|
12714
|
+
}
|
|
12715
|
+
}, _callee3);
|
|
12716
|
+
}));
|
|
12717
|
+
return function getWdtOrderList(_x3) {
|
|
12718
|
+
return _ref3.apply(this, arguments);
|
|
12719
|
+
};
|
|
12720
|
+
}();
|
|
12051
12721
|
var rowSelection = {
|
|
12052
12722
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
|
|
12053
12723
|
fixed: true,
|
|
@@ -12102,13 +12772,165 @@ var WlnGoods = function WlnGoods(props) {
|
|
|
12102
12772
|
}));
|
|
12103
12773
|
};
|
|
12104
12774
|
|
|
12775
|
+
var componentMap$1 = {
|
|
12776
|
+
'WDT_GOODS': {
|
|
12777
|
+
type: 'wdt',
|
|
12778
|
+
key: 'wdtGoods',
|
|
12779
|
+
name: '旺店通',
|
|
12780
|
+
eventNameMap: {
|
|
12781
|
+
type: 'wdtType',
|
|
12782
|
+
selectListReturn: 'wdtSelectListReturn',
|
|
12783
|
+
selectList: 'wdtSelectList',
|
|
12784
|
+
reissueSelectList: 'wdtReissueSelectList',
|
|
12785
|
+
reissueSelectListReturn: 'wdtReissueSelectListReturn',
|
|
12786
|
+
reissueDeleteGood: 'wdtReissueDeleteGood',
|
|
12787
|
+
changeShopCode: 'wdtChangeShopCode',
|
|
12788
|
+
reissueType: 'wdtReissueType',
|
|
12789
|
+
returnType: 'wdtReturnType',
|
|
12790
|
+
returnSelectListReturn: 'wdtReturnSelectListReturn',
|
|
12791
|
+
deleteGood: 'wdtDeleteGood',
|
|
12792
|
+
returnDeleteGood: 'wdtReturnDeleteGood'
|
|
12793
|
+
}
|
|
12794
|
+
}
|
|
12795
|
+
};
|
|
12796
|
+
var CommonGoods = function CommonGoods(props) {
|
|
12797
|
+
var _withInfo$current3, _withInfo$current4;
|
|
12798
|
+
var value = props.value,
|
|
12799
|
+
disabled = props.disabled,
|
|
12800
|
+
onChange = props.onChange,
|
|
12801
|
+
compType = props.type;
|
|
12802
|
+
var _useState = React.useState(false),
|
|
12803
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12804
|
+
tableSelect = _useState2[0],
|
|
12805
|
+
setTableSelect = _useState2[1];
|
|
12806
|
+
var withInfo = React.useRef(null);
|
|
12807
|
+
var valueRef = React.useRef(null);
|
|
12808
|
+
React.useEffect(function () {
|
|
12809
|
+
valueRef.current = value;
|
|
12810
|
+
}, [value]);
|
|
12811
|
+
React.useEffect(function () {
|
|
12812
|
+
pubsub__default['default'].subscribe(componentMap$1[compType].eventNameMap.type, function (type, data) {
|
|
12813
|
+
if (disabled) return;
|
|
12814
|
+
// console.log(type, data);
|
|
12815
|
+
withInfo.current = {
|
|
12816
|
+
type: type,
|
|
12817
|
+
val: data.val,
|
|
12818
|
+
goodValue: data.goodValue
|
|
12819
|
+
};
|
|
12820
|
+
setTableSelect(['2', '4'].includes(data.val));
|
|
12821
|
+
if (['1', '3'].includes(data.val)) {
|
|
12822
|
+
var _valueRef$current, _valueRef$current2;
|
|
12823
|
+
pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.selectListReturn, {
|
|
12824
|
+
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]) || []),
|
|
12825
|
+
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.shopCode,
|
|
12826
|
+
goodValue: data === null || data === void 0 ? void 0 : data.goodValue
|
|
12827
|
+
});
|
|
12828
|
+
}
|
|
12829
|
+
});
|
|
12830
|
+
//补发
|
|
12831
|
+
pubsub__default['default'].subscribe(componentMap$1[compType].eventNameMap.reissueType, function (type, data) {
|
|
12832
|
+
if (disabled) return;
|
|
12833
|
+
withInfo.current = {
|
|
12834
|
+
type: type,
|
|
12835
|
+
val: data.val,
|
|
12836
|
+
goodValue: data.goodValue
|
|
12837
|
+
};
|
|
12838
|
+
setTableSelect(['2', '4'].includes(data.val));
|
|
12839
|
+
if (['1', '3'].includes(data.val)) {
|
|
12840
|
+
var _valueRef$current3, _valueRef$current4;
|
|
12841
|
+
pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.reissueSelectListReturn, {
|
|
12842
|
+
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]) || []),
|
|
12843
|
+
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current4 = valueRef.current) === null || _valueRef$current4 === void 0 ? void 0 : _valueRef$current4.shopCode,
|
|
12844
|
+
goodValue: data === null || data === void 0 ? void 0 : data.goodValue
|
|
12845
|
+
});
|
|
12846
|
+
}
|
|
12847
|
+
});
|
|
12848
|
+
//退货
|
|
12849
|
+
pubsub__default['default'].subscribe(componentMap$1[compType].eventNameMap.returnType, function (type, data) {
|
|
12850
|
+
if (disabled) return;
|
|
12851
|
+
withInfo.current = {
|
|
12852
|
+
type: type,
|
|
12853
|
+
val: data.val,
|
|
12854
|
+
goodValue: data.goodValue
|
|
12855
|
+
};
|
|
12856
|
+
setTableSelect(['2', '4'].includes(data.val));
|
|
12857
|
+
if (['1', '3'].includes(data.val)) {
|
|
12858
|
+
var _valueRef$current5, _valueRef$current6;
|
|
12859
|
+
pubsub__default['default'].publish(componentMap$1[type].eventNameMap.returnSelectListReturn, {
|
|
12860
|
+
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]) || []),
|
|
12861
|
+
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current6 = valueRef.current) === null || _valueRef$current6 === void 0 ? void 0 : _valueRef$current6.shopCode,
|
|
12862
|
+
goodValue: data === null || data === void 0 ? void 0 : data.goodValue
|
|
12863
|
+
});
|
|
12864
|
+
}
|
|
12865
|
+
});
|
|
12866
|
+
pubsub__default['default'].subscribeOnce(componentMap$1[compType].eventNameMap.changeShopCode, function (type, data) {
|
|
12867
|
+
// console.log(data);
|
|
12868
|
+
onChange(_objectSpread2(_objectSpread2({}, valueRef === null || valueRef === void 0 ? void 0 : valueRef.current), {}, {
|
|
12869
|
+
shopCode: data.shopCode
|
|
12870
|
+
}));
|
|
12871
|
+
});
|
|
12872
|
+
return function () {
|
|
12873
|
+
pubsub__default['default'].clearAllSubscriptions();
|
|
12874
|
+
};
|
|
12875
|
+
}, [disabled]);
|
|
12876
|
+
var _onSelect = function onSelect(list) {
|
|
12877
|
+
var _withInfo$current, _withInfo$current2, _valueRef$current7;
|
|
12878
|
+
if (disabled) return;
|
|
12879
|
+
var newList = lodash.cloneDeep(list);
|
|
12880
|
+
var typeMap = _defineProperty({
|
|
12881
|
+
// type: componentMap[compType].eventNameMap.selectList,
|
|
12882
|
+
// returnType: componentMap[compType].eventNameMap.returnSelectList,
|
|
12883
|
+
// reissueType: componentMap[compType].eventNameMap.reissueSelectList,
|
|
12884
|
+
type: componentMap$1[compType].eventNameMap.selectList
|
|
12885
|
+
}, "".concat(componentMap$1[compType].type, "ReissueType"), componentMap$1[compType].eventNameMap.reissueSelectList);
|
|
12886
|
+
var type = typeMap[(_withInfo$current = withInfo.current) === null || _withInfo$current === void 0 ? void 0 : _withInfo$current.type];
|
|
12887
|
+
// console.log('onSelect', type, withInfo.current, newList);
|
|
12888
|
+
pubsub__default['default'].publish(type, {
|
|
12889
|
+
type: (_withInfo$current2 = withInfo.current) === null || _withInfo$current2 === void 0 ? void 0 : _withInfo$current2.val,
|
|
12890
|
+
list: newList.map(function (item) {
|
|
12891
|
+
item.canDelete = true;
|
|
12892
|
+
return item;
|
|
12893
|
+
}),
|
|
12894
|
+
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current7 = valueRef.current) === null || _valueRef$current7 === void 0 ? void 0 : _valueRef$current7.shopCode,
|
|
12895
|
+
goodValue: withInfo.current.goodValue
|
|
12896
|
+
});
|
|
12897
|
+
};
|
|
12898
|
+
var _onDelete = function onDelete(item) {
|
|
12899
|
+
var deleteId = item === null || item === void 0 ? void 0 : item.specId;
|
|
12900
|
+
pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.deleteGood, deleteId);
|
|
12901
|
+
pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.reissueDeleteGood, deleteId);
|
|
12902
|
+
pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.returnDeleteGood, deleteId);
|
|
12903
|
+
};
|
|
12904
|
+
var changeHandle = function changeHandle(list) {
|
|
12905
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, componentMap$1[compType].key, list)));
|
|
12906
|
+
};
|
|
12907
|
+
return /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
12908
|
+
key: componentMap$1[compType].key
|
|
12909
|
+
}, props), {}, {
|
|
12910
|
+
disabled: disabled,
|
|
12911
|
+
value: value === null || value === void 0 ? void 0 : value[componentMap$1[compType].key],
|
|
12912
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
12913
|
+
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),
|
|
12914
|
+
selectType: withInfo === null || withInfo === void 0 ? void 0 : (_withInfo$current4 = withInfo.current) === null || _withInfo$current4 === void 0 ? void 0 : _withInfo$current4.type,
|
|
12915
|
+
onSelect: function onSelect(list) {
|
|
12916
|
+
return _onSelect(list);
|
|
12917
|
+
},
|
|
12918
|
+
onDelete: function onDelete(item) {
|
|
12919
|
+
return _onDelete(item);
|
|
12920
|
+
},
|
|
12921
|
+
onChange: function onChange(val) {
|
|
12922
|
+
return changeHandle(val);
|
|
12923
|
+
}
|
|
12924
|
+
}));
|
|
12925
|
+
};
|
|
12926
|
+
|
|
12105
12927
|
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";
|
|
12106
12928
|
styleInject(css_248z$a);
|
|
12107
12929
|
|
|
12108
12930
|
var TabPane$1 = antd.Tabs.TabPane;
|
|
12109
12931
|
var Option$2 = antd.Select.Option;
|
|
12110
12932
|
var Search$1 = antd.Input.Search;
|
|
12111
|
-
var GoodsModal$
|
|
12933
|
+
var GoodsModal$4 = function GoodsModal(props) {
|
|
12112
12934
|
var onSubmit = props.onSubmit,
|
|
12113
12935
|
_onCancel = props.onCancel,
|
|
12114
12936
|
visible = props.visible,
|
|
@@ -12559,7 +13381,7 @@ var Goods$1 = function Goods(props, ref) {
|
|
|
12559
13381
|
};
|
|
12560
13382
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12561
13383
|
className: "goodsBox"
|
|
12562
|
-
}, /*#__PURE__*/React__default['default'].createElement(GoodsModal$
|
|
13384
|
+
}, /*#__PURE__*/React__default['default'].createElement(GoodsModal$4, {
|
|
12563
13385
|
visible: visible,
|
|
12564
13386
|
onSubmit: onSubmit,
|
|
12565
13387
|
type: type,
|
|
@@ -12892,6 +13714,7 @@ exports.BsSystemOrder = index$1;
|
|
|
12892
13714
|
exports.BuyerNick = BuyerNick;
|
|
12893
13715
|
exports.CalculationInput = CalculationInput;
|
|
12894
13716
|
exports.ChooseBaby = ChooseBaby;
|
|
13717
|
+
exports.CommonGoods = CommonGoods;
|
|
12895
13718
|
exports.CommonMultiStatus = CommonSystemOrder$1;
|
|
12896
13719
|
exports.CommonStatus = CommonStatus;
|
|
12897
13720
|
exports.CommonSystemOrder = CommonSystemOrder;
|