@kmkf-fe-packages/basic-components 1.19.4 → 1.19.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -929,8 +929,8 @@ function dataURLtoFile(dataurl, filename) {
|
|
|
929
929
|
});
|
|
930
930
|
}
|
|
931
931
|
|
|
932
|
-
var css_248z$1 = ".index-module_imageBox__8zj7A {\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_imageBox__8zj7A .ant-upload-picture-card-wrapper {\n width: auto;\n}\n.index-module_imageBox__8zj7A .index-module_inputImage__3VrvC {\n width: 80px;\n height: 80px;\n border: 1px dashed #ccc;\n outline: none;\n background-color: rgba(0, 0, 0, 0);\n text-indent: 8px;\n}\n.index-module_imageBox__8zj7A .index-module_imageShow__3wD4d {\n padding: 8px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo {\n width: 80px;\n height: 80px;\n position: relative;\n border-radius: 2px;\n margin-right: 8px;\n margin-bottom: 8px;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo:hover {\n background: transparent;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo:hover .index-module_mask__3LUIn:before {\n opacity: 1;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo .index-
|
|
933
|
-
var styles$1 = {"imageBox":"index-module_imageBox__8zj7A","inputImage":"index-module_inputImage__3VrvC","imageShow":"index-module_imageShow__3wD4d","imageWrap":"index-module_imageWrap__JkMJo","-webkit-mask":"index-module_mask__3LUIn","mask":"index-module_mask__3LUIn","
|
|
932
|
+
var css_248z$1 = ".index-module_imageBox__8zj7A {\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_imageBox__8zj7A .ant-upload-picture-card-wrapper {\n width: auto;\n}\n.index-module_imageBox__8zj7A .index-module_inputImage__3VrvC {\n width: 80px;\n height: 80px;\n border: 1px dashed #ccc;\n outline: none;\n background-color: rgba(0, 0, 0, 0);\n text-indent: 8px;\n}\n.index-module_imageBox__8zj7A .index-module_imageShow__3wD4d {\n padding: 8px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo {\n width: 80px;\n height: 80px;\n position: relative;\n border-radius: 2px;\n margin-right: 8px;\n margin-bottom: 8px;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo:hover {\n background: transparent;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo:hover .index-module_mask__3LUIn:before {\n opacity: 1;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo .index-module_deleteIcon__20Wzd {\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n}\n.index-module_imageBox__8zj7A .index-module_mask__3LUIn {\n position: relative;\n height: 100%;\n overflow: hidden;\n}\n.index-module_imageBox__8zj7A .index-module_mask__3LUIn::before {\n position: absolute;\n z-index: 1;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n opacity: 0;\n transition: all 0.3s;\n content: ' ';\n}\n.index-module_imageBox__8zj7A .index-module_mask__3LUIn:hover .index-module_actions__2tY_V {\n opacity: 1;\n}\n.index-module_imageBox__8zj7A .index-module_mask__3LUIn .index-module_actions__2tY_V {\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: 10;\n white-space: nowrap;\n transform: translate(-50%, -50%);\n opacity: 0;\n transition: all 0.3s;\n}\n.index-module_imageBox__8zj7A .index-module_mask__3LUIn .index-module_actions__2tY_V .index-module_icon__ZI-2P {\n font-size: 16px;\n color: #fff;\n padding: 0 4px;\n}\n.index-module_imageBox__8zj7A .index-module_imagePaste__2X-K1 {\n display: inline-block;\n margin-right: 8px;\n}\n.index-module_imageBox__8zj7A .index-module_imagePaste__2X-K1 .index-module_fakeBox__2_3rA {\n width: 80px;\n height: 80px;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n padding-top: 16px;\n}\n.index-module_imageBox__8zj7A .index-module_imagePaste__2X-K1 .index-module_fakeBox__2_3rA .index-module_addBtn__2m5lC {\n color: #86909C;\n}\n.index-module_imageBox__8zj7A .index-module_upload__2igU3 .ant-upload {\n height: 80px;\n width: 80px;\n border: none;\n background-color: #F2F3F5;\n color: #86909C;\n}\n.index-module_imageBox__8zj7A .index-module_upload__2igU3 .ant-upload .index-module_addBtn__2m5lC {\n color: #86909C;\n}\n.index-module_tips__1ATcr {\n color: #4E5969;\n font-size: 12px;\n}\n";
|
|
933
|
+
var styles$1 = {"imageBox":"index-module_imageBox__8zj7A","inputImage":"index-module_inputImage__3VrvC","imageShow":"index-module_imageShow__3wD4d","imageWrap":"index-module_imageWrap__JkMJo","-webkit-mask":"index-module_mask__3LUIn","mask":"index-module_mask__3LUIn","deleteIcon":"index-module_deleteIcon__20Wzd","actions":"index-module_actions__2tY_V","icon":"index-module_icon__ZI-2P","imagePaste":"index-module_imagePaste__2X-K1","fakeBox":"index-module_fakeBox__2_3rA","addBtn":"index-module_addBtn__2m5lC","upload":"index-module_upload__2igU3","tips":"index-module_tips__1ATcr"};
|
|
934
934
|
styleInject(css_248z$1);
|
|
935
935
|
|
|
936
936
|
var _excluded$6 = ["maxCount", "maxSize", "uploadText", "onChange", "value", "accept", "canPreview", "disabled", "uniqueKey", "hostUrl", "actionUrl"];
|
|
@@ -951,7 +951,6 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
|
|
|
951
951
|
_ref$accept = _ref.accept,
|
|
952
952
|
accept = _ref$accept === void 0 ? 'image/gif,image/jpg,image/jpeg,image/png' : _ref$accept,
|
|
953
953
|
_ref$canPreview = _ref.canPreview,
|
|
954
|
-
canPreview = _ref$canPreview === void 0 ? true : _ref$canPreview,
|
|
955
954
|
_ref$disabled = _ref.disabled,
|
|
956
955
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
957
956
|
uniqueKey = _ref.uniqueKey,
|
|
@@ -1108,39 +1107,25 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
|
|
|
1108
1107
|
}));
|
|
1109
1108
|
};
|
|
1110
1109
|
};
|
|
1111
|
-
var handlePreview = function handlePreview(imgUrl) {
|
|
1112
|
-
return function () {
|
|
1113
|
-
setCurrentPreviewImg(imgUrl);
|
|
1114
|
-
setVisible(true);
|
|
1115
|
-
};
|
|
1116
|
-
};
|
|
1117
1110
|
var renderImages = function renderImages(images) {
|
|
1118
|
-
return images.map(function (image, index) {
|
|
1111
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image.PreviewGroup, null, images.map(function (image, index) {
|
|
1119
1112
|
var finalImage = "".concat(/^pic\/[\s\S]*$/.test(image) ? "".concat(hostUrl, "/").concat(image) : image, "?x-oss-process=image/resize,h_60,w_60");
|
|
1113
|
+
var showImage = /^pic\/[\s\S]*$/.test(image) ? "".concat(hostUrl, "/").concat(image) : image;
|
|
1120
1114
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1121
1115
|
className: styles$1.imageWrap,
|
|
1122
1116
|
key: index
|
|
1123
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1128
|
-
className: styles$1.actions
|
|
1129
|
-
}, canPreview && /*#__PURE__*/React__default['default'].createElement(icons.EyeOutlined, {
|
|
1130
|
-
style: {
|
|
1131
|
-
fontSize: '16px',
|
|
1132
|
-
color: '#FFF',
|
|
1133
|
-
marginRight: '8px'
|
|
1134
|
-
},
|
|
1135
|
-
onClick: handlePreview(/^pic\/[\s\S]*$/.test(image) ? "".concat(hostUrl, "/").concat(image) : image)
|
|
1136
|
-
}), /*#__PURE__*/React__default['default'].createElement(icons.DeleteOutlined, {
|
|
1137
|
-
style: {
|
|
1138
|
-
fontSize: '16px',
|
|
1139
|
-
color: '#FFF'
|
|
1117
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
1118
|
+
src: finalImage,
|
|
1119
|
+
preview: {
|
|
1120
|
+
src: showImage
|
|
1140
1121
|
},
|
|
1122
|
+
width: '100%',
|
|
1123
|
+
height: '80%'
|
|
1124
|
+
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1125
|
+
className: styles$1.deleteIcon,
|
|
1141
1126
|
onClick: handleDelete(index)
|
|
1142
|
-
}))
|
|
1143
|
-
});
|
|
1127
|
+
}, "\u5220\u9664"));
|
|
1128
|
+
}));
|
|
1144
1129
|
};
|
|
1145
1130
|
React.useEffect(function () {
|
|
1146
1131
|
var _inputRef$current2;
|
|
@@ -12106,6 +12091,402 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
12106
12091
|
};
|
|
12107
12092
|
var WdtGoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$3);
|
|
12108
12093
|
|
|
12094
|
+
var getTableData$1 = function getTableData(_ref, formData) {
|
|
12095
|
+
var current = _ref.current,
|
|
12096
|
+
pageSize = _ref.pageSize;
|
|
12097
|
+
var data = {
|
|
12098
|
+
goodsSn: formData.goodsSn || null,
|
|
12099
|
+
goodsName: formData.goodsName || null,
|
|
12100
|
+
sku: formData.sku || null,
|
|
12101
|
+
skuId: formData.skuId || null
|
|
12102
|
+
};
|
|
12103
|
+
return extendRequest('/qy/gdfw/product/product/page', {
|
|
12104
|
+
method: 'post',
|
|
12105
|
+
data: _objectSpread2({
|
|
12106
|
+
pageSize: pageSize,
|
|
12107
|
+
pageNo: current,
|
|
12108
|
+
platform: 'WDT_ERP'
|
|
12109
|
+
}, data)
|
|
12110
|
+
}).then(function (res) {
|
|
12111
|
+
var _res$data = res.data,
|
|
12112
|
+
_res$data$productSkuL = _res$data.productSkuList,
|
|
12113
|
+
productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
|
|
12114
|
+
_res$data$total = _res$data.total,
|
|
12115
|
+
total = _res$data$total === void 0 ? 0 : _res$data$total;
|
|
12116
|
+
var newProducts = productSkuList.map(function (item, index) {
|
|
12117
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
12118
|
+
index: index + 1
|
|
12119
|
+
});
|
|
12120
|
+
});
|
|
12121
|
+
return {
|
|
12122
|
+
total: total,
|
|
12123
|
+
list: newProducts
|
|
12124
|
+
};
|
|
12125
|
+
});
|
|
12126
|
+
};
|
|
12127
|
+
var columns$2 = [{
|
|
12128
|
+
dataIndex: 'index',
|
|
12129
|
+
title: 'NO',
|
|
12130
|
+
render: function render(val, record, index) {
|
|
12131
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12132
|
+
style: {
|
|
12133
|
+
width: 25
|
|
12134
|
+
}
|
|
12135
|
+
}, index + 1);
|
|
12136
|
+
},
|
|
12137
|
+
width: 100
|
|
12138
|
+
}, {
|
|
12139
|
+
dataIndex: 'sku',
|
|
12140
|
+
title: "SKU",
|
|
12141
|
+
ellipsis: true,
|
|
12142
|
+
width: 70
|
|
12143
|
+
}, {
|
|
12144
|
+
dataIndex: 'skuId',
|
|
12145
|
+
title: "SKU ID",
|
|
12146
|
+
ellipsis: true,
|
|
12147
|
+
width: 70
|
|
12148
|
+
}, {
|
|
12149
|
+
dataIndex: 'goodsName',
|
|
12150
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
12151
|
+
ellipsis: true,
|
|
12152
|
+
width: 70
|
|
12153
|
+
}, {
|
|
12154
|
+
dataIndex: 'goodsShortName',
|
|
12155
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12156
|
+
ellipsis: true,
|
|
12157
|
+
width: 70
|
|
12158
|
+
}, {
|
|
12159
|
+
dataIndex: 'picPath',
|
|
12160
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
12161
|
+
ellipsis: true,
|
|
12162
|
+
width: 100,
|
|
12163
|
+
render: function render(picUrl) {
|
|
12164
|
+
return /*#__PURE__*/React__default['default'].createElement("img", {
|
|
12165
|
+
style: {
|
|
12166
|
+
width: '60px',
|
|
12167
|
+
height: '60px',
|
|
12168
|
+
objectFit: 'contain'
|
|
12169
|
+
},
|
|
12170
|
+
src: picUrl
|
|
12171
|
+
});
|
|
12172
|
+
}
|
|
12173
|
+
}, {
|
|
12174
|
+
dataIndex: 'goodsSn',
|
|
12175
|
+
title: "\u8D27\u53F7",
|
|
12176
|
+
ellipsis: true,
|
|
12177
|
+
width: 70
|
|
12178
|
+
}, {
|
|
12179
|
+
dataIndex: 'goodsId',
|
|
12180
|
+
title: "\u8D27\u53F7ID",
|
|
12181
|
+
ellipsis: true,
|
|
12182
|
+
width: 70
|
|
12183
|
+
}, {
|
|
12184
|
+
dataIndex: 'colorName',
|
|
12185
|
+
title: "\u989C\u8272\u540D\u79F0",
|
|
12186
|
+
ellipsis: true,
|
|
12187
|
+
width: 70
|
|
12188
|
+
}, {
|
|
12189
|
+
dataIndex: 'colorCode',
|
|
12190
|
+
title: "\u989C\u8272\u4EE3\u7801",
|
|
12191
|
+
ellipsis: true,
|
|
12192
|
+
width: 70
|
|
12193
|
+
}, {
|
|
12194
|
+
dataIndex: 'sizeName',
|
|
12195
|
+
title: "\u5C3A\u7801\u540D\u79F0",
|
|
12196
|
+
ellipsis: true,
|
|
12197
|
+
width: 70
|
|
12198
|
+
}, {
|
|
12199
|
+
dataIndex: 'sizeCode',
|
|
12200
|
+
title: "\u5C3A\u7801\u4EE3\u7801",
|
|
12201
|
+
ellipsis: true,
|
|
12202
|
+
width: 70
|
|
12203
|
+
}, {
|
|
12204
|
+
dataIndex: 'brandName',
|
|
12205
|
+
title: "\u54C1\u724C\u540D\u79F0",
|
|
12206
|
+
ellipsis: true,
|
|
12207
|
+
width: 70
|
|
12208
|
+
}, {
|
|
12209
|
+
dataIndex: 'goodsNumber',
|
|
12210
|
+
title: "\u5546\u54C1\u6570\u91CF",
|
|
12211
|
+
ellipsis: true,
|
|
12212
|
+
width: 70
|
|
12213
|
+
}, {
|
|
12214
|
+
dataIndex: 'goodsPrice',
|
|
12215
|
+
title: "\u5546\u54C1\u5355\u4EF7",
|
|
12216
|
+
ellipsis: true,
|
|
12217
|
+
width: 70
|
|
12218
|
+
}, {
|
|
12219
|
+
dataIndex: 'shopPrice',
|
|
12220
|
+
title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
|
|
12221
|
+
ellipsis: true,
|
|
12222
|
+
width: 70
|
|
12223
|
+
}, {
|
|
12224
|
+
dataIndex: 'sharePrice',
|
|
12225
|
+
title: "\u5206\u644A\u4EF7",
|
|
12226
|
+
ellipsis: true,
|
|
12227
|
+
width: 70
|
|
12228
|
+
}, {
|
|
12229
|
+
dataIndex: 'sharePayment',
|
|
12230
|
+
title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
|
|
12231
|
+
ellipsis: true,
|
|
12232
|
+
width: 70
|
|
12233
|
+
}, {
|
|
12234
|
+
dataIndex: 'payment',
|
|
12235
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
12236
|
+
ellipsis: true,
|
|
12237
|
+
width: 70
|
|
12238
|
+
}, {
|
|
12239
|
+
dataIndex: 'tcSku',
|
|
12240
|
+
title: "\u5957\u9910SKU",
|
|
12241
|
+
ellipsis: true,
|
|
12242
|
+
width: 70
|
|
12243
|
+
}, {
|
|
12244
|
+
dataIndex: 'tcGoodsNumber',
|
|
12245
|
+
title: "\u5957\u9910\u5957\u6570",
|
|
12246
|
+
ellipsis: true,
|
|
12247
|
+
width: 70
|
|
12248
|
+
}, {
|
|
12249
|
+
dataIndex: 'taoCanSingleSl',
|
|
12250
|
+
title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
|
|
12251
|
+
ellipsis: true,
|
|
12252
|
+
width: 70
|
|
12253
|
+
}, {
|
|
12254
|
+
dataIndex: 'isGift',
|
|
12255
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
12256
|
+
ellipsis: true,
|
|
12257
|
+
width: 70
|
|
12258
|
+
}];
|
|
12259
|
+
var GoodList$1 = function GoodList(props, ref) {
|
|
12260
|
+
var _useState = React.useState([]),
|
|
12261
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12262
|
+
selectList = _useState2[0],
|
|
12263
|
+
setSelect = _useState2[1];
|
|
12264
|
+
var _useState3 = React.useState([]),
|
|
12265
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
12266
|
+
selectIds = _useState4[0],
|
|
12267
|
+
setSelectIds = _useState4[1];
|
|
12268
|
+
React.useImperativeHandle(ref, function () {
|
|
12269
|
+
return {
|
|
12270
|
+
getSelectGoodList: function getSelectGoodList() {
|
|
12271
|
+
return selectList;
|
|
12272
|
+
}
|
|
12273
|
+
};
|
|
12274
|
+
});
|
|
12275
|
+
var _Form$useForm = antd.Form.useForm(),
|
|
12276
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
12277
|
+
form = _Form$useForm2[0];
|
|
12278
|
+
var _useAntdTable = ahooks.useAntdTable(getTableData$1, {
|
|
12279
|
+
defaultPageSize: 10,
|
|
12280
|
+
form: form
|
|
12281
|
+
}),
|
|
12282
|
+
tableProps = _useAntdTable.tableProps,
|
|
12283
|
+
search = _useAntdTable.search,
|
|
12284
|
+
params = _useAntdTable.params;
|
|
12285
|
+
var submit = search.submit,
|
|
12286
|
+
reset = search.reset;
|
|
12287
|
+
var advanceSearchForm = /*#__PURE__*/React__default['default'].createElement(antd.Form, {
|
|
12288
|
+
layout: "inline",
|
|
12289
|
+
form: form
|
|
12290
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12291
|
+
name: "goodsSn",
|
|
12292
|
+
style: {
|
|
12293
|
+
marginBottom: '12px'
|
|
12294
|
+
}
|
|
12295
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
12296
|
+
placeholder: "\u5546\u54C1\u8D27\u53F7",
|
|
12297
|
+
allowClear: true,
|
|
12298
|
+
style: {
|
|
12299
|
+
width: 150
|
|
12300
|
+
}
|
|
12301
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12302
|
+
name: "goodsName",
|
|
12303
|
+
style: {
|
|
12304
|
+
marginBottom: '12px'
|
|
12305
|
+
}
|
|
12306
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
12307
|
+
placeholder: "\u5546\u54C1\u540D\u79F0",
|
|
12308
|
+
allowClear: true,
|
|
12309
|
+
style: {
|
|
12310
|
+
width: 150
|
|
12311
|
+
}
|
|
12312
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12313
|
+
name: "sku",
|
|
12314
|
+
style: {
|
|
12315
|
+
marginBottom: '12px'
|
|
12316
|
+
}
|
|
12317
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
12318
|
+
placeholder: "SKU",
|
|
12319
|
+
allowClear: true,
|
|
12320
|
+
style: {
|
|
12321
|
+
width: 150
|
|
12322
|
+
}
|
|
12323
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12324
|
+
name: "skuId",
|
|
12325
|
+
style: {
|
|
12326
|
+
marginBottom: '12px'
|
|
12327
|
+
}
|
|
12328
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
12329
|
+
placeholder: "SKU ID",
|
|
12330
|
+
allowClear: true,
|
|
12331
|
+
style: {
|
|
12332
|
+
width: 150
|
|
12333
|
+
}
|
|
12334
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12335
|
+
style: {
|
|
12336
|
+
marginBottom: '12px'
|
|
12337
|
+
}
|
|
12338
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12339
|
+
type: "primary",
|
|
12340
|
+
style: {
|
|
12341
|
+
marginRight: '8px'
|
|
12342
|
+
},
|
|
12343
|
+
onClick: submit
|
|
12344
|
+
}, "\u67E5\u8BE2"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12345
|
+
onClick: reset
|
|
12346
|
+
}, "\u91CD\u7F6E")));
|
|
12347
|
+
var rowSelection = {
|
|
12348
|
+
selectedRowKeys: selectIds,
|
|
12349
|
+
fixed: true,
|
|
12350
|
+
onSelect: function onSelect(record, selected) {
|
|
12351
|
+
if (selected) {
|
|
12352
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), [record.specNo]));
|
|
12353
|
+
setSelect([].concat(_toConsumableArray(selectList), [record]));
|
|
12354
|
+
} else {
|
|
12355
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
12356
|
+
return t !== record.specNo;
|
|
12357
|
+
}));
|
|
12358
|
+
setSelect(selectList.filter(function (t) {
|
|
12359
|
+
return t.specNo !== record.specNo;
|
|
12360
|
+
}));
|
|
12361
|
+
}
|
|
12362
|
+
},
|
|
12363
|
+
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
12364
|
+
if (selected) {
|
|
12365
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
|
|
12366
|
+
return t.specNo;
|
|
12367
|
+
}))));
|
|
12368
|
+
setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
|
|
12369
|
+
} else {
|
|
12370
|
+
setSelectIds(lodash.difference(selectIds, changeRows.map(function (t) {
|
|
12371
|
+
return t.specNo;
|
|
12372
|
+
})));
|
|
12373
|
+
var list = lodash.differenceWith(selectList, changeRows, function (arrVal, othVal) {
|
|
12374
|
+
return arrVal.specNo !== othVal.specNo;
|
|
12375
|
+
});
|
|
12376
|
+
setSelect(list);
|
|
12377
|
+
}
|
|
12378
|
+
}
|
|
12379
|
+
};
|
|
12380
|
+
var showTable = function showTable() {
|
|
12381
|
+
var handleDelete = function handleDelete(record) {
|
|
12382
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
12383
|
+
return t !== record.specNo;
|
|
12384
|
+
}));
|
|
12385
|
+
setSelect(selectList.filter(function (t) {
|
|
12386
|
+
return t.specNo !== record.specNo;
|
|
12387
|
+
}));
|
|
12388
|
+
};
|
|
12389
|
+
var showColumns = [{
|
|
12390
|
+
dataIndex: '',
|
|
12391
|
+
title: "\u64CD\u4F5C",
|
|
12392
|
+
ellipsis: true,
|
|
12393
|
+
width: 100,
|
|
12394
|
+
render: function render(val, record) {
|
|
12395
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12396
|
+
type: "link",
|
|
12397
|
+
onClick: function onClick() {
|
|
12398
|
+
return handleDelete(record);
|
|
12399
|
+
}
|
|
12400
|
+
}, "\u5220\u9664");
|
|
12401
|
+
}
|
|
12402
|
+
}].concat(lodash.takeRight(columns$2, columns$2.length - 1));
|
|
12403
|
+
return selectList.length ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12404
|
+
style: {
|
|
12405
|
+
width: '100%',
|
|
12406
|
+
maxWidth: '387px'
|
|
12407
|
+
}
|
|
12408
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
12409
|
+
columns: showColumns,
|
|
12410
|
+
rowKey: 'specNo',
|
|
12411
|
+
dataSource: selectList,
|
|
12412
|
+
scroll: {
|
|
12413
|
+
x: '100%',
|
|
12414
|
+
y: 250
|
|
12415
|
+
},
|
|
12416
|
+
pagination: {
|
|
12417
|
+
size: 'small',
|
|
12418
|
+
total: selectIds.length,
|
|
12419
|
+
pageSize: 10,
|
|
12420
|
+
showSizeChanger: false
|
|
12421
|
+
}
|
|
12422
|
+
})) : null;
|
|
12423
|
+
};
|
|
12424
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, advanceSearchForm, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12425
|
+
style: {
|
|
12426
|
+
marginTop: '4px'
|
|
12427
|
+
}
|
|
12428
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2({
|
|
12429
|
+
rowSelection: rowSelection,
|
|
12430
|
+
rowKey: "goodsId",
|
|
12431
|
+
columns: columns$2,
|
|
12432
|
+
scroll: {
|
|
12433
|
+
x: '100%',
|
|
12434
|
+
y: 250
|
|
12435
|
+
}
|
|
12436
|
+
}, tableProps))), /*#__PURE__*/React__default['default'].createElement(antd.Popover, {
|
|
12437
|
+
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
12438
|
+
return triggerNode.parentElement;
|
|
12439
|
+
},
|
|
12440
|
+
content: showTable(),
|
|
12441
|
+
title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
|
|
12442
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12443
|
+
danger: true,
|
|
12444
|
+
type: "text"
|
|
12445
|
+
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(icons.CaretUpOutlined, null))));
|
|
12446
|
+
};
|
|
12447
|
+
var BsE3GoodList = /*#__PURE__*/React.forwardRef(GoodList$1);
|
|
12448
|
+
|
|
12449
|
+
var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
12450
|
+
React.useImperativeHandle(ref, function () {
|
|
12451
|
+
return {
|
|
12452
|
+
open: function open() {
|
|
12453
|
+
setVisible(true);
|
|
12454
|
+
}
|
|
12455
|
+
};
|
|
12456
|
+
});
|
|
12457
|
+
var onSubmit = props.onSubmit,
|
|
12458
|
+
width = props.width;
|
|
12459
|
+
var _useState = React.useState(false),
|
|
12460
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12461
|
+
visible = _useState2[0],
|
|
12462
|
+
setVisible = _useState2[1];
|
|
12463
|
+
var bsE3GoodListRef = React.useRef(null);
|
|
12464
|
+
var _onCancel = function onCancel() {
|
|
12465
|
+
setVisible(false);
|
|
12466
|
+
};
|
|
12467
|
+
var onOk = function onOk() {
|
|
12468
|
+
var _bsE3GoodListRef$curr;
|
|
12469
|
+
var selectedList = ((_bsE3GoodListRef$curr = bsE3GoodListRef.current) === null || _bsE3GoodListRef$curr === void 0 ? void 0 : _bsE3GoodListRef$curr.getSelectGoodList()) || [];
|
|
12470
|
+
onSubmit(selectedList);
|
|
12471
|
+
_onCancel();
|
|
12472
|
+
};
|
|
12473
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, visible && /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
12474
|
+
title: '选择商品',
|
|
12475
|
+
okText: '确认',
|
|
12476
|
+
cancelText: '取消',
|
|
12477
|
+
visible: visible,
|
|
12478
|
+
width: width || 850,
|
|
12479
|
+
onCancel: function onCancel() {
|
|
12480
|
+
_onCancel();
|
|
12481
|
+
},
|
|
12482
|
+
onOk: onOk,
|
|
12483
|
+
wrapClassName: "goodModal"
|
|
12484
|
+
}, /*#__PURE__*/React__default['default'].createElement(BsE3GoodList, {
|
|
12485
|
+
ref: bsE3GoodListRef
|
|
12486
|
+
})));
|
|
12487
|
+
};
|
|
12488
|
+
var BsE3GoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$4);
|
|
12489
|
+
|
|
12109
12490
|
// interface GoodsItem {
|
|
12110
12491
|
// title: string;
|
|
12111
12492
|
// pic: string;
|
|
@@ -12114,6 +12495,7 @@ var WdtGoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$3);
|
|
|
12114
12495
|
// styleId: string;
|
|
12115
12496
|
// }
|
|
12116
12497
|
var GoodItem$1 = function GoodItem(props) {
|
|
12498
|
+
var _ref;
|
|
12117
12499
|
var _props$value = props.value,
|
|
12118
12500
|
value = _props$value === void 0 ? [] : _props$value,
|
|
12119
12501
|
type = props.type,
|
|
@@ -12550,6 +12932,149 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12550
12932
|
}];
|
|
12551
12933
|
}
|
|
12552
12934
|
break;
|
|
12935
|
+
case 'BS_E3_GOODS':
|
|
12936
|
+
{
|
|
12937
|
+
columns = [{
|
|
12938
|
+
dataIndex: 'sku',
|
|
12939
|
+
title: "SKU",
|
|
12940
|
+
align: 'center',
|
|
12941
|
+
ellipsis: true,
|
|
12942
|
+
width: 150
|
|
12943
|
+
}, {
|
|
12944
|
+
dataIndex: 'skuId',
|
|
12945
|
+
title: "SKU ID",
|
|
12946
|
+
align: 'center',
|
|
12947
|
+
ellipsis: true,
|
|
12948
|
+
width: 150
|
|
12949
|
+
}, {
|
|
12950
|
+
dataIndex: 'goodsName',
|
|
12951
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
12952
|
+
align: 'center',
|
|
12953
|
+
ellipsis: true,
|
|
12954
|
+
width: 150
|
|
12955
|
+
}, {
|
|
12956
|
+
dataIndex: 'goodsShortName',
|
|
12957
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12958
|
+
align: 'center',
|
|
12959
|
+
ellipsis: true,
|
|
12960
|
+
width: 100
|
|
12961
|
+
}, {
|
|
12962
|
+
dataIndex: 'picPath',
|
|
12963
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
12964
|
+
align: 'center',
|
|
12965
|
+
ellipsis: true,
|
|
12966
|
+
width: 100,
|
|
12967
|
+
render: function render(val) {
|
|
12968
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
12969
|
+
width: 60,
|
|
12970
|
+
src: val
|
|
12971
|
+
});
|
|
12972
|
+
}
|
|
12973
|
+
}, {
|
|
12974
|
+
dataIndex: 'goodsSn',
|
|
12975
|
+
title: "\u8D27\u53F7",
|
|
12976
|
+
align: 'center',
|
|
12977
|
+
ellipsis: true,
|
|
12978
|
+
width: 150
|
|
12979
|
+
}, {
|
|
12980
|
+
dataIndex: 'goodsId',
|
|
12981
|
+
title: "\u8D27\u53F7ID",
|
|
12982
|
+
align: 'center',
|
|
12983
|
+
ellipsis: true,
|
|
12984
|
+
width: 150
|
|
12985
|
+
}, {
|
|
12986
|
+
dataIndex: 'colorName',
|
|
12987
|
+
title: "\u989C\u8272\u540D\u79F0",
|
|
12988
|
+
align: 'center',
|
|
12989
|
+
ellipsis: true,
|
|
12990
|
+
width: 100
|
|
12991
|
+
}, {
|
|
12992
|
+
dataIndex: 'colorCode',
|
|
12993
|
+
title: "\u989C\u8272\u4EE3\u7801",
|
|
12994
|
+
align: 'center',
|
|
12995
|
+
ellipsis: true,
|
|
12996
|
+
width: 150
|
|
12997
|
+
}, {
|
|
12998
|
+
dataIndex: 'sizeName',
|
|
12999
|
+
title: "\u5C3A\u7801\u540D\u79F0",
|
|
13000
|
+
align: 'center',
|
|
13001
|
+
ellipsis: true,
|
|
13002
|
+
width: 100
|
|
13003
|
+
}, {
|
|
13004
|
+
dataIndex: 'sizeCode',
|
|
13005
|
+
title: "\u5C3A\u7801\u4EE3\u7801",
|
|
13006
|
+
align: 'center',
|
|
13007
|
+
ellipsis: true,
|
|
13008
|
+
width: 100
|
|
13009
|
+
}, {
|
|
13010
|
+
dataIndex: 'brandName',
|
|
13011
|
+
title: "\u54C1\u724C\u540D\u79F0",
|
|
13012
|
+
align: 'center',
|
|
13013
|
+
ellipsis: true,
|
|
13014
|
+
width: 150
|
|
13015
|
+
}, {
|
|
13016
|
+
dataIndex: 'goodsNumber',
|
|
13017
|
+
title: "\u5546\u54C1\u6570\u91CF",
|
|
13018
|
+
align: 'center',
|
|
13019
|
+
ellipsis: true,
|
|
13020
|
+
width: 100
|
|
13021
|
+
}, {
|
|
13022
|
+
dataIndex: 'goodsPrice',
|
|
13023
|
+
title: "\u5546\u54C1\u5355\u4EF7",
|
|
13024
|
+
align: 'center',
|
|
13025
|
+
ellipsis: true,
|
|
13026
|
+
width: 120
|
|
13027
|
+
}, {
|
|
13028
|
+
dataIndex: 'shopPrice',
|
|
13029
|
+
title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
|
|
13030
|
+
align: 'center',
|
|
13031
|
+
ellipsis: true,
|
|
13032
|
+
width: 120
|
|
13033
|
+
}, {
|
|
13034
|
+
dataIndex: 'sharePrice',
|
|
13035
|
+
title: "\u5206\u644A\u4EF7",
|
|
13036
|
+
align: 'center',
|
|
13037
|
+
ellipsis: true,
|
|
13038
|
+
width: 120
|
|
13039
|
+
}, {
|
|
13040
|
+
dataIndex: 'sharePayment',
|
|
13041
|
+
title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
|
|
13042
|
+
align: 'center',
|
|
13043
|
+
ellipsis: true,
|
|
13044
|
+
width: 120
|
|
13045
|
+
}, {
|
|
13046
|
+
dataIndex: 'payment',
|
|
13047
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
13048
|
+
align: 'center',
|
|
13049
|
+
ellipsis: true,
|
|
13050
|
+
width: 120
|
|
13051
|
+
}, {
|
|
13052
|
+
dataIndex: 'tcSku',
|
|
13053
|
+
title: "\u5957\u9910SKU",
|
|
13054
|
+
align: 'center',
|
|
13055
|
+
ellipsis: true,
|
|
13056
|
+
width: 150
|
|
13057
|
+
}, {
|
|
13058
|
+
dataIndex: 'tcGoodsNumber',
|
|
13059
|
+
title: "\u5957\u9910\u5957\u6570",
|
|
13060
|
+
align: 'center',
|
|
13061
|
+
ellipsis: true,
|
|
13062
|
+
width: 100
|
|
13063
|
+
}, {
|
|
13064
|
+
dataIndex: 'taoCanSingleSl',
|
|
13065
|
+
title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
|
|
13066
|
+
align: 'center',
|
|
13067
|
+
ellipsis: true,
|
|
13068
|
+
width: 100
|
|
13069
|
+
}, {
|
|
13070
|
+
dataIndex: 'isGift',
|
|
13071
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
13072
|
+
align: 'center',
|
|
13073
|
+
ellipsis: true,
|
|
13074
|
+
width: 100
|
|
13075
|
+
}];
|
|
13076
|
+
}
|
|
13077
|
+
break;
|
|
12553
13078
|
default:
|
|
12554
13079
|
columns = [{
|
|
12555
13080
|
dataIndex: 'mark',
|
|
@@ -12705,6 +13230,15 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12705
13230
|
}
|
|
12706
13231
|
return item;
|
|
12707
13232
|
});
|
|
13233
|
+
} else if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
|
|
13234
|
+
newList = list.map(function (item) {
|
|
13235
|
+
item.uuid = kmkfUtils.uuid();
|
|
13236
|
+
item.canDelete = true;
|
|
13237
|
+
item.goodsNumber = 1;
|
|
13238
|
+
item.goodsPrice = 0;
|
|
13239
|
+
item.canUpdateNumber = canUpdateNumber;
|
|
13240
|
+
return item;
|
|
13241
|
+
});
|
|
12708
13242
|
} else {
|
|
12709
13243
|
newList = list.map(function (item) {
|
|
12710
13244
|
var goodsId = item.goodsId,
|
|
@@ -12764,7 +13298,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12764
13298
|
}, showModeBtn && /*#__PURE__*/React__default['default'].createElement(antd.Checkbox, {
|
|
12765
13299
|
checked: isStrict,
|
|
12766
13300
|
onChange: handleCheckboxChange
|
|
12767
|
-
}, "\u5408\u5E76\u5355\uFF0C\u52FE\u9009\u540E\u53EA\u5C55\u793A\u5F53\u524D\u5E73\u53F0\u8BA2\u5355\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
13301
|
+
}, "\u5408\u5E76\u5355\uFF0C\u52FE\u9009\u540E\u53EA\u5C55\u793A\u5F53\u524D\u5E73\u53F0\u8BA2\u5355\u5546\u54C1"), !((_ref = ['BS_E3_GOODS']) === null || _ref === void 0 ? void 0 : _ref.includes(type)) && /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12768
13302
|
type: "link",
|
|
12769
13303
|
onClick: handleChangeGoods
|
|
12770
13304
|
}, "\u9009\u62E9\u5546\u54C1"), otherOperations), /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
|
|
@@ -12787,6 +13321,14 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12787
13321
|
shopId: shopId,
|
|
12788
13322
|
maxLength: maxLength,
|
|
12789
13323
|
companyKey: companyKey
|
|
13324
|
+
}) : ['BS_E3_REISSUE_GOODS', 'BS_E3_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type) ? /*#__PURE__*/React__default['default'].createElement(BsE3GoodsModal, {
|
|
13325
|
+
ref: refModal,
|
|
13326
|
+
onSubmit: onSubmit,
|
|
13327
|
+
width: width,
|
|
13328
|
+
shopList: shopList,
|
|
13329
|
+
shopId: shopId,
|
|
13330
|
+
maxLength: maxLength,
|
|
13331
|
+
companyKey: companyKey
|
|
12790
13332
|
}) : /*#__PURE__*/React__default['default'].createElement(GoodsModal$2, {
|
|
12791
13333
|
ref: refModal,
|
|
12792
13334
|
onSubmit: onSubmit,
|
|
@@ -13450,19 +13992,150 @@ var wdtUtils = {
|
|
|
13450
13992
|
getWdtOrderListSingleton: getWdtOrderListSingleton
|
|
13451
13993
|
};
|
|
13452
13994
|
|
|
13453
|
-
var
|
|
13454
|
-
|
|
13455
|
-
|
|
13456
|
-
|
|
13457
|
-
|
|
13458
|
-
|
|
13459
|
-
|
|
13460
|
-
|
|
13461
|
-
|
|
13462
|
-
|
|
13463
|
-
|
|
13464
|
-
|
|
13995
|
+
var singletonMap$1 = new Map();
|
|
13996
|
+
var getBsE3OrderListSingleton = function getBsE3OrderListSingleton(orderNo) {
|
|
13997
|
+
if (!singletonMap$1.has(orderNo)) {
|
|
13998
|
+
var p = new Promise(function (resolve, reject) {
|
|
13999
|
+
var doReject = function doReject(err) {
|
|
14000
|
+
// 清空掉错误的请求记录
|
|
14001
|
+
// singletonMap.delete(orderNo);
|
|
14002
|
+
reject(err);
|
|
14003
|
+
};
|
|
14004
|
+
extendRequest('/qy/gdfw/order/bse3OrderDetail', {
|
|
14005
|
+
method: 'post',
|
|
14006
|
+
data: {
|
|
14007
|
+
billNo: orderNo
|
|
14008
|
+
}
|
|
14009
|
+
}).then(function (data) {
|
|
14010
|
+
if (data === null || data === void 0 ? void 0 : data.success) {
|
|
14011
|
+
var _data$data, _data$data$orderList;
|
|
14012
|
+
if (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$orderList = _data$data.orderList) === null || _data$data$orderList === void 0 ? void 0 : _data$data$orderList.length) {
|
|
14013
|
+
var _filterBsE3Orders;
|
|
14014
|
+
data.data.orderList = (_filterBsE3Orders = kmkfUtils.filterBsE3Orders(data === null || data === void 0 ? void 0 : data.data, orderNo)) === null || _filterBsE3Orders === void 0 ? void 0 : _filterBsE3Orders.map(function (item) {
|
|
14015
|
+
var isSplit = item.isSplit,
|
|
14016
|
+
isSplitNew = item.isSplitNew,
|
|
14017
|
+
isCopy = item.isCopy,
|
|
14018
|
+
isExchangeOrder = item.isExchangeOrder,
|
|
14019
|
+
isCombineNew = item.isCombineNew,
|
|
14020
|
+
isCombine = item.isCombine,
|
|
14021
|
+
orderStatus = item.orderStatus;
|
|
14022
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
14023
|
+
orderStatus: kmkfUtils.BS_E3_ORDER_STATUS_MAP[orderStatus],
|
|
14024
|
+
isSplit: kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[isSplit],
|
|
14025
|
+
isSplitNew: kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[isSplitNew],
|
|
14026
|
+
isExchangeOrder: kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[isExchangeOrder],
|
|
14027
|
+
isCopy: kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[isCopy],
|
|
14028
|
+
isCombineNew: kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[isCombineNew],
|
|
14029
|
+
isCombine: kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[isCombine]
|
|
14030
|
+
});
|
|
14031
|
+
});
|
|
14032
|
+
}
|
|
14033
|
+
resolve(data.data);
|
|
14034
|
+
} else {
|
|
14035
|
+
doReject(data);
|
|
14036
|
+
}
|
|
14037
|
+
}).catch(doReject);
|
|
14038
|
+
});
|
|
14039
|
+
singletonMap$1.set(orderNo, p);
|
|
13465
14040
|
}
|
|
14041
|
+
return singletonMap$1.get(orderNo);
|
|
14042
|
+
};
|
|
14043
|
+
var bsE3Utils = {
|
|
14044
|
+
getBsE3OrderListSingleton: getBsE3OrderListSingleton
|
|
14045
|
+
};
|
|
14046
|
+
|
|
14047
|
+
var columnsMap = {
|
|
14048
|
+
BS_SYSTEM_ORDER: [{
|
|
14049
|
+
title: '单据类型',
|
|
14050
|
+
dataIndex: 'billType',
|
|
14051
|
+
width: 150
|
|
14052
|
+
}, {
|
|
14053
|
+
title: '系统订单号',
|
|
14054
|
+
dataIndex: 'billNo',
|
|
14055
|
+
width: 150
|
|
14056
|
+
}, {
|
|
14057
|
+
title: '标签',
|
|
14058
|
+
dataIndex: 'billTag',
|
|
14059
|
+
width: 150
|
|
14060
|
+
}],
|
|
14061
|
+
WLN_SYSTEM_ORDER: [{
|
|
14062
|
+
title: '订单类型',
|
|
14063
|
+
dataIndex: 'billType',
|
|
14064
|
+
width: 150
|
|
14065
|
+
}, {
|
|
14066
|
+
title: '系统订单号',
|
|
14067
|
+
dataIndex: 'billNo',
|
|
14068
|
+
width: 150
|
|
14069
|
+
}, {
|
|
14070
|
+
title: '标记',
|
|
14071
|
+
dataIndex: 'billTag',
|
|
14072
|
+
width: 150
|
|
14073
|
+
}],
|
|
14074
|
+
WDT_SYSTEM_ORDER: [{
|
|
14075
|
+
title: '订单类型',
|
|
14076
|
+
dataIndex: 'billType',
|
|
14077
|
+
width: 150
|
|
14078
|
+
}, {
|
|
14079
|
+
title: '系统订单号',
|
|
14080
|
+
dataIndex: 'billNo',
|
|
14081
|
+
width: 150
|
|
14082
|
+
}, {
|
|
14083
|
+
title: '订单标签',
|
|
14084
|
+
dataIndex: 'billTag',
|
|
14085
|
+
width: 150
|
|
14086
|
+
}],
|
|
14087
|
+
BS_E3_SYSTEM_ORDER: [{
|
|
14088
|
+
title: '系统订单号',
|
|
14089
|
+
dataIndex: 'orderSn',
|
|
14090
|
+
width: 150,
|
|
14091
|
+
ellipsis: true
|
|
14092
|
+
}, {
|
|
14093
|
+
title: '订单状态',
|
|
14094
|
+
dataIndex: 'orderStatus',
|
|
14095
|
+
width: 100,
|
|
14096
|
+
ellipsis: true
|
|
14097
|
+
}, {
|
|
14098
|
+
title: '是否被拆分',
|
|
14099
|
+
dataIndex: 'isSplit',
|
|
14100
|
+
width: 70,
|
|
14101
|
+
ellipsis: true
|
|
14102
|
+
}, {
|
|
14103
|
+
title: '是否拆分子单',
|
|
14104
|
+
dataIndex: 'isSplitNew',
|
|
14105
|
+
width: 70,
|
|
14106
|
+
ellipsis: true
|
|
14107
|
+
}, {
|
|
14108
|
+
title: '是否被合并',
|
|
14109
|
+
dataIndex: 'isCombine',
|
|
14110
|
+
width: 70,
|
|
14111
|
+
ellipsis: true
|
|
14112
|
+
}, {
|
|
14113
|
+
title: '是否合并新单',
|
|
14114
|
+
dataIndex: 'isCombineNew',
|
|
14115
|
+
width: 70,
|
|
14116
|
+
ellipsis: true
|
|
14117
|
+
}, {
|
|
14118
|
+
title: '是否复制单',
|
|
14119
|
+
dataIndex: 'isCopy',
|
|
14120
|
+
width: 70,
|
|
14121
|
+
ellipsis: true
|
|
14122
|
+
}, {
|
|
14123
|
+
title: '是否换货单',
|
|
14124
|
+
dataIndex: 'isExchangeOrder',
|
|
14125
|
+
width: 70,
|
|
14126
|
+
ellipsis: true
|
|
14127
|
+
}, {
|
|
14128
|
+
title: '订单备注',
|
|
14129
|
+
dataIndex: 'orderMsg',
|
|
14130
|
+
width: 150,
|
|
14131
|
+
ellipsis: true
|
|
14132
|
+
}]
|
|
14133
|
+
};
|
|
14134
|
+
var rowKeyMap = {
|
|
14135
|
+
BS_SYSTEM_ORDER: 'billNo',
|
|
14136
|
+
WLN_SYSTEM_ORDER: 'billNo',
|
|
14137
|
+
WDT_SYSTEM_ORDER: 'billNo',
|
|
14138
|
+
BS_E3_SYSTEM_ORDER: 'orderSn'
|
|
13466
14139
|
};
|
|
13467
14140
|
var index$1 = (function (props) {
|
|
13468
14141
|
var value = props.value,
|
|
@@ -13480,21 +14153,13 @@ var index$1 = (function (props) {
|
|
|
13480
14153
|
getWlnOrderList(value.orderNo);
|
|
13481
14154
|
} else if (type === 'WDT_SYSTEM_ORDER') {
|
|
13482
14155
|
getWdtOrderList(value.orderNo);
|
|
14156
|
+
} else if (type === 'BS_E3_SYSTEM_ORDER') {
|
|
14157
|
+
getBsE3OrderList(value.orderNo);
|
|
13483
14158
|
}
|
|
13484
14159
|
}
|
|
13485
14160
|
}, [value, type]);
|
|
13486
14161
|
var columns = React.useMemo(function () {
|
|
13487
|
-
|
|
13488
|
-
return [{
|
|
13489
|
-
dataIndex: 'billType',
|
|
13490
|
-
title: columnsNameMap === null || columnsNameMap === void 0 ? void 0 : (_columnsNameMap$type = columnsNameMap[type]) === null || _columnsNameMap$type === void 0 ? void 0 : _columnsNameMap$type.typeName
|
|
13491
|
-
}, {
|
|
13492
|
-
dataIndex: 'billNo',
|
|
13493
|
-
title: '系统订单号'
|
|
13494
|
-
}, {
|
|
13495
|
-
dataIndex: 'billTag',
|
|
13496
|
-
title: columnsNameMap === null || columnsNameMap === void 0 ? void 0 : (_columnsNameMap$type2 = columnsNameMap[type]) === null || _columnsNameMap$type2 === void 0 ? void 0 : _columnsNameMap$type2.tagName
|
|
13497
|
-
}];
|
|
14162
|
+
return columnsMap[type] || [];
|
|
13498
14163
|
}, [type]);
|
|
13499
14164
|
var getOrderList = /*#__PURE__*/function () {
|
|
13500
14165
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
@@ -13616,6 +14281,31 @@ var index$1 = (function (props) {
|
|
|
13616
14281
|
return _ref3.apply(this, arguments);
|
|
13617
14282
|
};
|
|
13618
14283
|
}();
|
|
14284
|
+
var getBsE3OrderList = /*#__PURE__*/function () {
|
|
14285
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(orderNo) {
|
|
14286
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
14287
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
14288
|
+
case 0:
|
|
14289
|
+
bsE3Utils.getBsE3OrderListSingleton(orderNo).then(function (data) {
|
|
14290
|
+
var trades = ((data === null || data === void 0 ? void 0 : data.orderList) || []).filter(function (item) {
|
|
14291
|
+
return (item === null || item === void 0 ? void 0 : item.dealCode) === orderNo;
|
|
14292
|
+
});
|
|
14293
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
14294
|
+
orders: trades,
|
|
14295
|
+
showOrderInfo: trades
|
|
14296
|
+
}));
|
|
14297
|
+
});
|
|
14298
|
+
onceRef.current = false;
|
|
14299
|
+
case 2:
|
|
14300
|
+
case "end":
|
|
14301
|
+
return _context4.stop();
|
|
14302
|
+
}
|
|
14303
|
+
}, _callee4);
|
|
14304
|
+
}));
|
|
14305
|
+
return function getBsE3OrderList(_x4) {
|
|
14306
|
+
return _ref5.apply(this, arguments);
|
|
14307
|
+
};
|
|
14308
|
+
}();
|
|
13619
14309
|
var rowSelection = {
|
|
13620
14310
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
|
|
13621
14311
|
fixed: true,
|
|
@@ -13636,7 +14326,7 @@ var index$1 = (function (props) {
|
|
|
13636
14326
|
dataSource: (value === null || value === void 0 ? void 0 : value.orders) || [],
|
|
13637
14327
|
columns: columns,
|
|
13638
14328
|
rowSelection: rowSelection,
|
|
13639
|
-
rowKey: 'billNo',
|
|
14329
|
+
rowKey: rowKeyMap[type] || 'billNo',
|
|
13640
14330
|
size: "small",
|
|
13641
14331
|
pagination: false,
|
|
13642
14332
|
scroll: {
|
|
@@ -13675,8 +14365,11 @@ var componentMap$1 = {
|
|
|
13675
14365
|
type: 'wdt',
|
|
13676
14366
|
key: 'wdtGoods',
|
|
13677
14367
|
name: '旺店通',
|
|
14368
|
+
orderNo: 'srcTid',
|
|
14369
|
+
goodDetailOrderNo: 'srcTid',
|
|
13678
14370
|
eventNameMap: {
|
|
13679
14371
|
type: 'wdtType',
|
|
14372
|
+
updateGoodsHandle: kmkfUtils.updateWdtGoodsHandle,
|
|
13680
14373
|
selectListReturn: 'wdtSelectListReturn',
|
|
13681
14374
|
selectList: 'wdtSelectList',
|
|
13682
14375
|
reissueSelectList: 'wdtReissueSelectList',
|
|
@@ -13691,6 +14384,30 @@ var componentMap$1 = {
|
|
|
13691
14384
|
returnDeleteGood: 'wdtReturnDeleteGood',
|
|
13692
14385
|
exchangeDeleteGood: 'wdtExchangeDeleteGood'
|
|
13693
14386
|
}
|
|
14387
|
+
},
|
|
14388
|
+
'BS_E3_GOODS': {
|
|
14389
|
+
type: 'e3',
|
|
14390
|
+
key: 'bsE3Goods',
|
|
14391
|
+
name: '百胜E3',
|
|
14392
|
+
orderNo: 'dealCode',
|
|
14393
|
+
goodDetailOrderNo: 'originalDealCode',
|
|
14394
|
+
eventNameMap: {
|
|
14395
|
+
type: 'bsE3Type',
|
|
14396
|
+
updateGoodsHandle: kmkfUtils.updateBsE3GoodsHandle,
|
|
14397
|
+
selectListReturn: 'bsE3SelectListReturn',
|
|
14398
|
+
selectList: 'bsE3SelectList',
|
|
14399
|
+
reissueSelectList: 'bsE3ReissueSelectList',
|
|
14400
|
+
reissueSelectListReturn: 'bsE3ReissueSelectListReturn',
|
|
14401
|
+
reissueDeleteGood: 'bsE3ReissueDeleteGood',
|
|
14402
|
+
changeShopCode: 'bsE3ChangeShopCode',
|
|
14403
|
+
reissueType: 'bsE3ReissueType',
|
|
14404
|
+
returnType: 'bsE3ReturnType',
|
|
14405
|
+
returnSelectListReturn: 'bsE3ReturnSelectListReturn',
|
|
14406
|
+
returnSelectList: 'bsE3ReturnSelectList',
|
|
14407
|
+
deleteGood: 'bsE3DeleteGood',
|
|
14408
|
+
returnDeleteGood: 'bsE3ReturnDeleteGood',
|
|
14409
|
+
exchangeDeleteGood: 'bsE3ExchangeDeleteGood'
|
|
14410
|
+
}
|
|
13694
14411
|
}
|
|
13695
14412
|
};
|
|
13696
14413
|
var CommonGoods = function CommonGoods(props) {
|
|
@@ -13699,8 +14416,11 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
13699
14416
|
disabled = props.disabled,
|
|
13700
14417
|
onChange = props.onChange,
|
|
13701
14418
|
compType = props.type;
|
|
13702
|
-
|
|
13703
|
-
|
|
14419
|
+
console.log('value?.orders', value === null || value === void 0 ? void 0 : value.orders);
|
|
14420
|
+
// 合并单订单会包含","
|
|
14421
|
+
var showModeBtn = !['BS_E3_GOODS'].includes(compType) && ((value === null || value === void 0 ? void 0 : value.orders) || []).some(function (order) {
|
|
14422
|
+
var _order$componentMap$c;
|
|
14423
|
+
return order === null || order === void 0 ? void 0 : (_order$componentMap$c = order[componentMap$1[compType].orderNo]) === null || _order$componentMap$c === void 0 ? void 0 : _order$componentMap$c.includes(',');
|
|
13704
14424
|
});
|
|
13705
14425
|
var getOrderFlag = React.useRef(false);
|
|
13706
14426
|
var _useState = React.useState(false),
|
|
@@ -13847,10 +14567,12 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
13847
14567
|
};
|
|
13848
14568
|
var getGoodDetails = function getGoodDetails(_ref2) {
|
|
13849
14569
|
var mode = _ref2.mode;
|
|
13850
|
-
var
|
|
14570
|
+
var updateHandle = componentMap$1[compType].eventNameMap['updateGoodsHandle'];
|
|
14571
|
+
var goodDetails = updateHandle(value.orders || []);
|
|
13851
14572
|
var orderNo = value.orderNo;
|
|
13852
14573
|
return mode ? goodDetails.filter(function (goodItem) {
|
|
13853
|
-
|
|
14574
|
+
var _componentMap$compTyp;
|
|
14575
|
+
return !orderNo || (goodItem === null || goodItem === void 0 ? void 0 : goodItem[(_componentMap$compTyp = componentMap$1[compType]) === null || _componentMap$compTyp === void 0 ? void 0 : _componentMap$compTyp.goodDetailOrderNo]) === orderNo;
|
|
13854
14576
|
}) : goodDetails;
|
|
13855
14577
|
};
|
|
13856
14578
|
return /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
@@ -14162,7 +14884,8 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
14162
14884
|
type = props.type,
|
|
14163
14885
|
other = _objectWithoutProperties(props, _excluded$g);
|
|
14164
14886
|
var showModeBtn = ((value === null || value === void 0 ? void 0 : (_value$wdtSystemOrder = value.wdtSystemOrder) === null || _value$wdtSystemOrder === void 0 ? void 0 : _value$wdtSystemOrder.orders) || []).some(function (order) {
|
|
14165
|
-
|
|
14887
|
+
var _order$srcTid;
|
|
14888
|
+
return order === null || order === void 0 ? void 0 : (_order$srcTid = order.srcTid) === null || _order$srcTid === void 0 ? void 0 : _order$srcTid.includes(',');
|
|
14166
14889
|
});
|
|
14167
14890
|
var getOrderFlag = React.useRef(false);
|
|
14168
14891
|
var _useState = React.useState(false),
|
|
@@ -14364,7 +15087,7 @@ styleInject(css_248z$a);
|
|
|
14364
15087
|
var TabPane$1 = antd.Tabs.TabPane;
|
|
14365
15088
|
var Option$2 = antd.Select.Option;
|
|
14366
15089
|
var Search$1 = antd.Input.Search;
|
|
14367
|
-
var GoodsModal$
|
|
15090
|
+
var GoodsModal$5 = function GoodsModal(props) {
|
|
14368
15091
|
var onSubmit = props.onSubmit,
|
|
14369
15092
|
_onCancel = props.onCancel,
|
|
14370
15093
|
visible = props.visible,
|
|
@@ -14815,7 +15538,7 @@ var Goods$1 = function Goods(props, ref) {
|
|
|
14815
15538
|
};
|
|
14816
15539
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
14817
15540
|
className: "goodsBox"
|
|
14818
|
-
}, /*#__PURE__*/React__default['default'].createElement(GoodsModal$
|
|
15541
|
+
}, /*#__PURE__*/React__default['default'].createElement(GoodsModal$5, {
|
|
14819
15542
|
visible: visible,
|
|
14820
15543
|
onSubmit: onSubmit,
|
|
14821
15544
|
type: type,
|