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