@kmkf-fe-packages/basic-components 0.24.0-beta.0 → 0.24.1-alpha.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 +430 -48
- package/dist/index.js +429 -47
- package/dist/src/business/Address/index.d.ts +2 -0
- package/dist/src/business/TBGoodSerial/index.d.ts +2 -2
- package/dist/src/common/Goods/RichItem.d.ts +26 -0
- package/dist/src/common/Goods/goodModel.d.ts +1 -0
- package/dist/src/common/Sku/index.d.ts +1 -0
- package/package.json +5 -3
package/dist/index.js
CHANGED
|
@@ -369,6 +369,15 @@ function _regeneratorRuntime() {
|
|
|
369
369
|
}
|
|
370
370
|
}, exports;
|
|
371
371
|
}
|
|
372
|
+
function _typeof(obj) {
|
|
373
|
+
"@babel/helpers - typeof";
|
|
374
|
+
|
|
375
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
376
|
+
return typeof obj;
|
|
377
|
+
} : function (obj) {
|
|
378
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
379
|
+
}, _typeof(obj);
|
|
380
|
+
}
|
|
372
381
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
373
382
|
try {
|
|
374
383
|
var info = gen[key](arg);
|
|
@@ -7369,11 +7378,12 @@ function ApaasRate(props) {
|
|
|
7369
7378
|
}));
|
|
7370
7379
|
}
|
|
7371
7380
|
|
|
7372
|
-
kmkfUtils.AddressData.getInstance();
|
|
7373
|
-
kmkfUtils.BsAddressData.getInstance();
|
|
7381
|
+
var addressData = kmkfUtils.AddressData.getInstance();
|
|
7382
|
+
var bsAddressData = kmkfUtils.BsAddressData.getInstance();
|
|
7374
7383
|
var Province = function Province(props) {
|
|
7375
7384
|
var _props$type = props.type,
|
|
7376
|
-
type = _props$type === void 0 ? 'workOrder' : _props$type
|
|
7385
|
+
type = _props$type === void 0 ? 'workOrder' : _props$type,
|
|
7386
|
+
value = props.value;
|
|
7377
7387
|
var _useState = React.useState([]),
|
|
7378
7388
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7379
7389
|
option = _useState2[0],
|
|
@@ -7388,7 +7398,7 @@ var Province = function Province(props) {
|
|
|
7388
7398
|
while (1) switch (_context.prev = _context.next) {
|
|
7389
7399
|
case 0:
|
|
7390
7400
|
num++;
|
|
7391
|
-
options = type !== 'bs' ?
|
|
7401
|
+
options = type !== 'bs' ? addressData.addressOptions || [] : bsAddressData.addressOptions || [];
|
|
7392
7402
|
if (!(options === null || options === void 0 ? void 0 : options.length) && num < 6) {
|
|
7393
7403
|
time.current = setTimeout(function () {
|
|
7394
7404
|
initPageSource();
|
|
@@ -7405,6 +7415,19 @@ var Province = function Province(props) {
|
|
|
7405
7415
|
return _ref.apply(this, arguments);
|
|
7406
7416
|
};
|
|
7407
7417
|
}();
|
|
7418
|
+
var getBsAddress = function getBsAddress() {
|
|
7419
|
+
var data = JSON.parse(localStorage.getItem('bsAddressData') || '[]');
|
|
7420
|
+
if (data.length) {
|
|
7421
|
+
var options = kmkfUtils.toTree(data, 1);
|
|
7422
|
+
setOptions(options);
|
|
7423
|
+
}
|
|
7424
|
+
};
|
|
7425
|
+
//如果值改变地址不存在则再获取一遍
|
|
7426
|
+
React.useEffect(function () {
|
|
7427
|
+
if (value && type == 'bs' && !option.length) {
|
|
7428
|
+
getBsAddress();
|
|
7429
|
+
}
|
|
7430
|
+
}, [value, type, option]);
|
|
7408
7431
|
React.useEffect(function () {
|
|
7409
7432
|
if (!isFirst.current) {
|
|
7410
7433
|
initPageSource();
|
|
@@ -7726,7 +7749,10 @@ var ShopNameSelect = function ShopNameSelect(props) {
|
|
|
7726
7749
|
function ApaasAddress(props) {
|
|
7727
7750
|
var value = props.value,
|
|
7728
7751
|
onChange = props.onChange,
|
|
7729
|
-
disabled = props.disabled
|
|
7752
|
+
disabled = props.disabled,
|
|
7753
|
+
_props$showIdentify = props.showIdentify,
|
|
7754
|
+
showIdentify = _props$showIdentify === void 0 ? true : _props$showIdentify,
|
|
7755
|
+
type = props.type;
|
|
7730
7756
|
var changeCity = function changeCity(city) {
|
|
7731
7757
|
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
7732
7758
|
address: city
|
|
@@ -7738,7 +7764,20 @@ function ApaasAddress(props) {
|
|
|
7738
7764
|
detail: e.target.value
|
|
7739
7765
|
});
|
|
7740
7766
|
};
|
|
7741
|
-
|
|
7767
|
+
var handleParseLogistics = function handleParseLogistics(val) {
|
|
7768
|
+
var params = {
|
|
7769
|
+
detail: val === null || val === void 0 ? void 0 : val.addressDetail,
|
|
7770
|
+
address: []
|
|
7771
|
+
};
|
|
7772
|
+
var addressData = type === 'bs' ? kmkfUtils.BsAddressData.getInstance() : kmkfUtils.AddressData.getInstance();
|
|
7773
|
+
if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
|
|
7774
|
+
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)];
|
|
7775
|
+
}
|
|
7776
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(params);
|
|
7777
|
+
};
|
|
7778
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, !disabled && showIdentify && /*#__PURE__*/React__default['default'].createElement(ParseLogistics, {
|
|
7779
|
+
onChange: handleParseLogistics
|
|
7780
|
+
}), /*#__PURE__*/React__default['default'].createElement(Province, {
|
|
7742
7781
|
value: value === null || value === void 0 ? void 0 : value.address,
|
|
7743
7782
|
onChange: changeCity,
|
|
7744
7783
|
disabled: disabled
|
|
@@ -7936,7 +7975,9 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
7936
7975
|
maxLength = props.maxLength,
|
|
7937
7976
|
shopList = props.shopList,
|
|
7938
7977
|
changeSku = props.changeSku,
|
|
7939
|
-
width = props.width
|
|
7978
|
+
width = props.width,
|
|
7979
|
+
_props$numIidType = props.numIidType,
|
|
7980
|
+
numIidType = _props$numIidType === void 0 ? 'string' : _props$numIidType;
|
|
7940
7981
|
var _useState = React.useState([]),
|
|
7941
7982
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7942
7983
|
selectList = _useState2[0],
|
|
@@ -7953,6 +7994,25 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
7953
7994
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
7954
7995
|
loading = _useState8[0],
|
|
7955
7996
|
setLoading = _useState8[1];
|
|
7997
|
+
var transformIdType = function transformIdType(id) {
|
|
7998
|
+
if (!['string', 'number'].includes(_typeof(id))) return id;
|
|
7999
|
+
return numIidType === 'string' ? id + '' : +id;
|
|
8000
|
+
};
|
|
8001
|
+
var transformType = function transformType(item) {
|
|
8002
|
+
if (!(item === null || item === void 0 ? void 0 : item.numIid)) return item;
|
|
8003
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
8004
|
+
numIid: transformIdType(item.numIid)
|
|
8005
|
+
});
|
|
8006
|
+
};
|
|
8007
|
+
var handleSetSelect = function handleSetSelect(list) {
|
|
8008
|
+
return setSelect(list.map(transformType));
|
|
8009
|
+
};
|
|
8010
|
+
var handleSelectIds = function handleSelectIds(list) {
|
|
8011
|
+
return setSelectIds(list.map(transformIdType));
|
|
8012
|
+
};
|
|
8013
|
+
var handleSetGoodList = function handleSetGoodList(list) {
|
|
8014
|
+
return setGoodList(list.map(transformType));
|
|
8015
|
+
};
|
|
7956
8016
|
var _useState9 = React.useState({
|
|
7957
8017
|
apiName: 'queryItems',
|
|
7958
8018
|
desc: true,
|
|
@@ -8046,15 +8106,15 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8046
8106
|
var newSelect = selectList.filter(function (item) {
|
|
8047
8107
|
return item.numIid !== good.numIid;
|
|
8048
8108
|
});
|
|
8049
|
-
|
|
8109
|
+
handleSetSelect(_toConsumableArray(newSelect));
|
|
8050
8110
|
var ids = newSelect.map(function (item) {
|
|
8051
8111
|
return item.numIid;
|
|
8052
8112
|
});
|
|
8053
|
-
|
|
8113
|
+
handleSelectIds(ids);
|
|
8054
8114
|
} else {
|
|
8055
8115
|
if (type === 4 || changeSku) {
|
|
8056
|
-
|
|
8057
|
-
|
|
8116
|
+
handleSetSelect([good]);
|
|
8117
|
+
handleSelectIds([good.numIid]);
|
|
8058
8118
|
} else {
|
|
8059
8119
|
if (selectList.length >= maxLength) {
|
|
8060
8120
|
antd.message.error("\u6700\u591A\u6DFB\u52A0".concat(maxLength, "\u5F20"));
|
|
@@ -8067,14 +8127,14 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8067
8127
|
var newSelectList = selectList.filter(function (item) {
|
|
8068
8128
|
return item.numIid !== good.numIid;
|
|
8069
8129
|
});
|
|
8070
|
-
|
|
8130
|
+
handleSetSelect(newSelectList);
|
|
8071
8131
|
var _ids = newSelectList.map(function (item) {
|
|
8072
8132
|
return item.numIid;
|
|
8073
8133
|
});
|
|
8074
|
-
|
|
8134
|
+
handleSelectIds(_ids);
|
|
8075
8135
|
} else {
|
|
8076
|
-
|
|
8077
|
-
|
|
8136
|
+
handleSetSelect([].concat(_toConsumableArray(selectList), [good]));
|
|
8137
|
+
handleSelectIds([].concat(_toConsumableArray(selectIds), [good.numIid]));
|
|
8078
8138
|
}
|
|
8079
8139
|
}
|
|
8080
8140
|
}
|
|
@@ -8166,7 +8226,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8166
8226
|
items.forEach(function (item) {
|
|
8167
8227
|
item.platform = platform;
|
|
8168
8228
|
});
|
|
8169
|
-
|
|
8229
|
+
handleSetGoodList(_toConsumableArray(items));
|
|
8170
8230
|
setTotal(totalCount);
|
|
8171
8231
|
_context.next = 26;
|
|
8172
8232
|
break;
|
|
@@ -8194,7 +8254,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8194
8254
|
item.title = item.productName;
|
|
8195
8255
|
item.platform = platform;
|
|
8196
8256
|
});
|
|
8197
|
-
|
|
8257
|
+
handleSetGoodList(_toConsumableArray(newList));
|
|
8198
8258
|
setTotal(_total);
|
|
8199
8259
|
if (platform === 'sph' && nextKey && !nextKeyList.includes(nextKey)) {
|
|
8200
8260
|
setNextKeyList([].concat(_toConsumableArray(nextKeyList), [nextKey]));
|
|
@@ -8280,12 +8340,12 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8280
8340
|
React.useEffect(function () {
|
|
8281
8341
|
setPlatformHandle(platform);
|
|
8282
8342
|
if (imgList.length) {
|
|
8283
|
-
|
|
8343
|
+
handleSetSelect(imgList);
|
|
8284
8344
|
var ids = imgList === null || imgList === void 0 ? void 0 : imgList.map(function (item) {
|
|
8285
8345
|
return item.numIid;
|
|
8286
8346
|
});
|
|
8287
8347
|
if (!(changeSku || type === 4)) {
|
|
8288
|
-
|
|
8348
|
+
handleSelectIds(ids);
|
|
8289
8349
|
}
|
|
8290
8350
|
}
|
|
8291
8351
|
}, [platform]);
|
|
@@ -8383,9 +8443,9 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8383
8443
|
spinning: loading
|
|
8384
8444
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
8385
8445
|
className: "goodsMain"
|
|
8386
|
-
}, (searchParams.type == 'select' ? selectList : goodList).map(function (good) {
|
|
8446
|
+
}, (searchParams.type == 'select' ? selectList : goodList).map(function (good, index) {
|
|
8387
8447
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
8388
|
-
key: good.numIid,
|
|
8448
|
+
key: good.numIid + "".concat(index),
|
|
8389
8449
|
className: "goodItem ".concat(selectIds.includes(good.numIid) ? 'active' : ''),
|
|
8390
8450
|
onClick: function onClick() {
|
|
8391
8451
|
changeItem(good);
|
|
@@ -8447,7 +8507,7 @@ var Sku = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
8447
8507
|
});
|
|
8448
8508
|
var handleSure = /*#__PURE__*/function () {
|
|
8449
8509
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
8450
|
-
var type, SKU, _ref3, _ref4, _ref5, _ref6, _ref7, _yield$request, _yield$request$data, data;
|
|
8510
|
+
var type, SKU, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _yield$request, _yield$request$data, data;
|
|
8451
8511
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
8452
8512
|
while (1) switch (_context.prev = _context.next) {
|
|
8453
8513
|
case 0:
|
|
@@ -8482,7 +8542,10 @@ var Sku = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
8482
8542
|
}) === null || _ref4 === void 0 ? void 0 : _ref4.picUrl,
|
|
8483
8543
|
outerSkuId: (_ref5 = SKU || {
|
|
8484
8544
|
outerSkuId: ''
|
|
8485
|
-
}) === null || _ref5 === void 0 ? void 0 : _ref5.outerSkuId
|
|
8545
|
+
}) === null || _ref5 === void 0 ? void 0 : _ref5.outerSkuId,
|
|
8546
|
+
skuId: ((_ref6 = SKU || {
|
|
8547
|
+
skuId: ''
|
|
8548
|
+
}) === null || _ref6 === void 0 ? void 0 : _ref6.skuId) || ''
|
|
8486
8549
|
});
|
|
8487
8550
|
_context.next = 16;
|
|
8488
8551
|
break;
|
|
@@ -8503,12 +8566,15 @@ var Sku = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
8503
8566
|
props.handleOk({
|
|
8504
8567
|
enableItemId: data.length > 0 ? data[0]['supplierItemOuterId'] : '',
|
|
8505
8568
|
enableSupplierName: data.length > 0 ? data[0]['supplierName'] : '',
|
|
8506
|
-
propertiesName: ((
|
|
8569
|
+
propertiesName: ((_ref7 = SKU || {
|
|
8507
8570
|
label: ''
|
|
8508
|
-
}) === null ||
|
|
8509
|
-
picUrl: (
|
|
8571
|
+
}) === null || _ref7 === void 0 ? void 0 : _ref7.label) || '',
|
|
8572
|
+
picUrl: (_ref8 = SKU || {
|
|
8510
8573
|
picUrl: ''
|
|
8511
|
-
}) === null ||
|
|
8574
|
+
}) === null || _ref8 === void 0 ? void 0 : _ref8.picUrl,
|
|
8575
|
+
skuId: ((_ref9 = SKU || {
|
|
8576
|
+
skuId: ''
|
|
8577
|
+
}) === null || _ref9 === void 0 ? void 0 : _ref9.skuId) || ''
|
|
8512
8578
|
});
|
|
8513
8579
|
case 16:
|
|
8514
8580
|
setVisible(false);
|
|
@@ -8886,8 +8952,324 @@ var ChooseBaby = function ChooseBaby(props) {
|
|
|
8886
8952
|
}));
|
|
8887
8953
|
};
|
|
8888
8954
|
|
|
8955
|
+
var css_248z$6 = ".goodsBox.single-row {\n max-height: 800px;\n overflow-y: auto;\n padding-top: 4px;\n flex-basis: 100%;\n}\n.goodsBox.single-row .goodBox-Img.rich-item.with-pic,\n.goodsBox.single-row .goodBox-Img.rich-item.with-attr,\n.goodsBox.single-row .goodBox-Img.rich-item.with-attr.with-pic {\n flex-basis: 100%;\n}\n.goodsBox.single-row .goodBox-Img.rich-item .right-context {\n flex-grow: 1;\n flex-shrink: 1;\n}\n.goodsBox.single-row .goodBox-Img.rich-item .right-context .good-item-attr {\n flex-grow: 1;\n flex-shrink: 1;\n max-width: 80px;\n width: 20px;\n flex-basis: 20px;\n}\n.goodsBox.single-row .goodBox-Img.rich-item .right-context .ant-input {\n flex-shrink: 1;\n flex-grow: 1;\n width: 20px;\n flex-basis: 40px;\n}\n.goodBox-Img.rich-item {\n position: relative;\n border: 1px solid #ccc;\n display: flex;\n flex-basis: 80px;\n flex-wrap: wrap;\n margin: 0 10px 10px 0;\n padding: 4px;\n}\n.goodBox-Img.rich-item.with-pic {\n flex-basis: 90px;\n}\n.goodBox-Img.rich-item.with-attr {\n flex-basis: 150px;\n}\n.goodBox-Img.rich-item.with-attr.with-pic {\n flex-basis: 238px;\n}\n.goodBox-Img.rich-item.with-attr.with-pic .goods-imgBox {\n margin-right: 8px;\n}\n.goodBox-Img.rich-item .good-item-attr {\n margin-right: 6px;\n width: 52px;\n flex-basis: 52px;\n}\n.goodBox-Img.rich-item .goods-imgBox {\n margin-bottom: 0;\n}\n.goodBox-Img.rich-item .right-context div {\n display: flex;\n}\n.goodBox-Img.rich-item .right-context div:not(:first-child) {\n margin-top: 4px;\n}\n";
|
|
8956
|
+
styleInject(css_248z$6);
|
|
8957
|
+
|
|
8958
|
+
var GoodItem = function GoodItem(props) {
|
|
8959
|
+
var _props$isSingleRow = props.isSingleRow,
|
|
8960
|
+
isSingleRow = _props$isSingleRow === void 0 ? true : _props$isSingleRow,
|
|
8961
|
+
_props$value = props.value,
|
|
8962
|
+
value = _props$value === void 0 ? {
|
|
8963
|
+
shopId: '',
|
|
8964
|
+
imgList: []
|
|
8965
|
+
} : _props$value,
|
|
8966
|
+
_props$maxLength = props.maxLength,
|
|
8967
|
+
maxLength = _props$maxLength === void 0 ? 999999999 : _props$maxLength,
|
|
8968
|
+
onChange = props.onChange,
|
|
8969
|
+
_props$type = props.type,
|
|
8970
|
+
type = _props$type === void 0 ? 2 : _props$type,
|
|
8971
|
+
_props$shopList = props.shopList,
|
|
8972
|
+
shopList = _props$shopList === void 0 ? [] : _props$shopList,
|
|
8973
|
+
showHeader = props.showHeader,
|
|
8974
|
+
_props$showChangeBtn = props.showChangeBtn,
|
|
8975
|
+
otherOperations = props.otherOperations,
|
|
8976
|
+
canUpdateNumber = props.canUpdateNumber,
|
|
8977
|
+
enableItemId = props.enableItemId,
|
|
8978
|
+
enableSupplierName = props.enableSupplierName,
|
|
8979
|
+
userNick = props.userNick,
|
|
8980
|
+
disabled = props.disabled,
|
|
8981
|
+
changeSku = props.changeSku,
|
|
8982
|
+
width = props.width;
|
|
8983
|
+
var shopId = value.shopId,
|
|
8984
|
+
imgList = value.imgList;
|
|
8985
|
+
var _useState = React.useState(false),
|
|
8986
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
8987
|
+
visible = _useState2[0],
|
|
8988
|
+
setVisible = _useState2[1];
|
|
8989
|
+
var skuRef = React.useRef();
|
|
8990
|
+
var boxRef = React.useRef();
|
|
8991
|
+
//是否是淘宝店铺
|
|
8992
|
+
var isTaobaoPlat = React.useMemo(function () {
|
|
8993
|
+
return shopList.some(function (item) {
|
|
8994
|
+
return item.shopId === shopId && item.shopSourceStr === 'TAOBAO';
|
|
8995
|
+
});
|
|
8996
|
+
}, [shopId]);
|
|
8997
|
+
// 查询SKU
|
|
8998
|
+
var querySkus = /*#__PURE__*/function () {
|
|
8999
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
|
9000
|
+
var shopId, numIids;
|
|
9001
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
9002
|
+
while (1) switch (_context.prev = _context.next) {
|
|
9003
|
+
case 0:
|
|
9004
|
+
shopId = _ref.shopId, numIids = _ref.numIids;
|
|
9005
|
+
return _context.abrupt("return", extendRequest('/qy/gdfw/workOrder/queryItemSkus', {
|
|
9006
|
+
method: 'post',
|
|
9007
|
+
data: {
|
|
9008
|
+
shopId: shopId,
|
|
9009
|
+
numIids: numIids
|
|
9010
|
+
}
|
|
9011
|
+
}));
|
|
9012
|
+
case 2:
|
|
9013
|
+
case "end":
|
|
9014
|
+
return _context.stop();
|
|
9015
|
+
}
|
|
9016
|
+
}, _callee);
|
|
9017
|
+
}));
|
|
9018
|
+
return function querySkus(_x) {
|
|
9019
|
+
return _ref2.apply(this, arguments);
|
|
9020
|
+
};
|
|
9021
|
+
}();
|
|
9022
|
+
//删除商品
|
|
9023
|
+
var handleDelete = function handleDelete(index) {
|
|
9024
|
+
var newSelect = imgList.filter(function (_, i) {
|
|
9025
|
+
return index !== i;
|
|
9026
|
+
});
|
|
9027
|
+
var newValue = {
|
|
9028
|
+
shopId: shopId,
|
|
9029
|
+
imgList: _toConsumableArray(newSelect)
|
|
9030
|
+
};
|
|
9031
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
9032
|
+
};
|
|
9033
|
+
//选择sku
|
|
9034
|
+
var handleSelectSku = function handleSelectSku(_ref3) {
|
|
9035
|
+
var enableItemId = _ref3.enableItemId,
|
|
9036
|
+
enableSupplierName = _ref3.enableSupplierName,
|
|
9037
|
+
propertiesName = _ref3.propertiesName,
|
|
9038
|
+
picUrl = _ref3.picUrl,
|
|
9039
|
+
outerSkuId = _ref3.outerSkuId,
|
|
9040
|
+
skuId = _ref3.skuId;
|
|
9041
|
+
var newList = JSON.parse(JSON.stringify(imgList));
|
|
9042
|
+
if (type === 4) {
|
|
9043
|
+
newList[newList.length - 1].itemId = enableItemId;
|
|
9044
|
+
newList[newList.length - 1].supplierName = enableSupplierName;
|
|
9045
|
+
} else {
|
|
9046
|
+
newList[newList.length - 1].propertiesName = propertiesName;
|
|
9047
|
+
}
|
|
9048
|
+
if (type === 1) {
|
|
9049
|
+
if (outerSkuId) newList[newList.length - 1].outerSkuId = outerSkuId;
|
|
9050
|
+
if (skuId) newList[newList.length - 1].skuId = skuId;
|
|
9051
|
+
}
|
|
9052
|
+
//替换成sku的图片
|
|
9053
|
+
picUrl && (newList[newList.length - 1].picUrl = picUrl);
|
|
9054
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
9055
|
+
shopId: shopId,
|
|
9056
|
+
imgList: newList
|
|
9057
|
+
});
|
|
9058
|
+
};
|
|
9059
|
+
//选择回调
|
|
9060
|
+
var onSubmit = /*#__PURE__*/function () {
|
|
9061
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(list) {
|
|
9062
|
+
var newList, newImgList, _yield$querySkus, data, _skuRef$current, options;
|
|
9063
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
9064
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
9065
|
+
case 0:
|
|
9066
|
+
newList = list.map(function (item) {
|
|
9067
|
+
//过滤属性 只保存需要的字段
|
|
9068
|
+
var params = {
|
|
9069
|
+
uuid: kmkfUtils.uuid(),
|
|
9070
|
+
platform: item.platform,
|
|
9071
|
+
price: item.price,
|
|
9072
|
+
canDelete: true,
|
|
9073
|
+
title: item.title,
|
|
9074
|
+
outerId: item.outerId,
|
|
9075
|
+
picUrl: item.picUrl,
|
|
9076
|
+
numIid: item.numIid,
|
|
9077
|
+
skuId: item.skuId,
|
|
9078
|
+
outerSkuId: item.outerSkuId
|
|
9079
|
+
};
|
|
9080
|
+
// if (type === 1) {
|
|
9081
|
+
// params.outerId = item.outerId; //编码
|
|
9082
|
+
// }
|
|
9083
|
+
if (changeSku) {
|
|
9084
|
+
params.propertiesName = '';
|
|
9085
|
+
}
|
|
9086
|
+
// if (type === 4) {
|
|
9087
|
+
// if (enableItemId) {
|
|
9088
|
+
// params.itemId = '';
|
|
9089
|
+
// }
|
|
9090
|
+
// if (enableSupplierName) {
|
|
9091
|
+
// params.supplierName = '';
|
|
9092
|
+
// }
|
|
9093
|
+
// }
|
|
9094
|
+
return params;
|
|
9095
|
+
});
|
|
9096
|
+
newImgList = changeSku || type === 4 ? [].concat(_toConsumableArray(imgList), _toConsumableArray(newList)) : _toConsumableArray(newList);
|
|
9097
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
9098
|
+
shopId: shopId,
|
|
9099
|
+
imgList: newImgList
|
|
9100
|
+
});
|
|
9101
|
+
setVisible(false);
|
|
9102
|
+
//供应上编码组件 || 商品组件且可以选择sku
|
|
9103
|
+
if (!(type === 4 && (enableItemId || enableSupplierName) || type !== 4 && changeSku && isTaobaoPlat && list.length > 0)) {
|
|
9104
|
+
_context2.next = 10;
|
|
9105
|
+
break;
|
|
9106
|
+
}
|
|
9107
|
+
_context2.next = 7;
|
|
9108
|
+
return querySkus({
|
|
9109
|
+
shopId: shopId,
|
|
9110
|
+
numIids: list[0].numIid
|
|
9111
|
+
});
|
|
9112
|
+
case 7:
|
|
9113
|
+
_yield$querySkus = _context2.sent;
|
|
9114
|
+
data = _yield$querySkus.data;
|
|
9115
|
+
if (data.length > 0 && data[0]['skus'] && data[0]['skus']['length'] > 0) {
|
|
9116
|
+
options = data[0]['skus'].map(function (item) {
|
|
9117
|
+
return {
|
|
9118
|
+
label: item.propertiesName.split(';').map(function (i) {
|
|
9119
|
+
return i.split(':').slice(2);
|
|
9120
|
+
}).join(';'),
|
|
9121
|
+
value: item.skuId,
|
|
9122
|
+
picUrl: item.picUrl,
|
|
9123
|
+
outerSkuId: item === null || item === void 0 ? void 0 : item.outerSkuId,
|
|
9124
|
+
skuId: item.skuId
|
|
9125
|
+
};
|
|
9126
|
+
});
|
|
9127
|
+
(_skuRef$current = skuRef.current) === null || _skuRef$current === void 0 ? void 0 : _skuRef$current.open({
|
|
9128
|
+
shopId: shopId,
|
|
9129
|
+
numIids: list[0].numIid,
|
|
9130
|
+
options: options
|
|
9131
|
+
});
|
|
9132
|
+
}
|
|
9133
|
+
case 10:
|
|
9134
|
+
case "end":
|
|
9135
|
+
return _context2.stop();
|
|
9136
|
+
}
|
|
9137
|
+
}, _callee2);
|
|
9138
|
+
}));
|
|
9139
|
+
return function onSubmit(_x2) {
|
|
9140
|
+
return _ref4.apply(this, arguments);
|
|
9141
|
+
};
|
|
9142
|
+
}();
|
|
9143
|
+
var headerList = showHeader || {
|
|
9144
|
+
1: ['title', 'outerId', 'picUrl', 'numIid', 'skuId', 'outerSkuId', 'propertiesName' // sku 信息
|
|
9145
|
+
]
|
|
9146
|
+
}[type] || [];
|
|
9147
|
+
//修改参数
|
|
9148
|
+
var handleChangeValue = function handleChangeValue(key, index) {
|
|
9149
|
+
return function (e) {
|
|
9150
|
+
var _e$target;
|
|
9151
|
+
var newImgList = _toConsumableArray(imgList);
|
|
9152
|
+
newImgList[index][key] = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value;
|
|
9153
|
+
var newValue = {
|
|
9154
|
+
shopId: shopId,
|
|
9155
|
+
imgList: newImgList
|
|
9156
|
+
};
|
|
9157
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, newValue));
|
|
9158
|
+
};
|
|
9159
|
+
};
|
|
9160
|
+
// TODO: 目前只做了type 1的处理,其他的还是走老的文件 ./index.tsx
|
|
9161
|
+
var goodItemAttrs = [{
|
|
9162
|
+
isShow: headerList.includes('title'),
|
|
9163
|
+
key: 'title',
|
|
9164
|
+
label: '商品名称'
|
|
9165
|
+
}, {
|
|
9166
|
+
isShow: headerList.includes('outerId'),
|
|
9167
|
+
key: 'outerId',
|
|
9168
|
+
label: '商品编码'
|
|
9169
|
+
},
|
|
9170
|
+
// { isShow: headerList.includes('picUrl'), key: 'picUrl', label: '图片' },
|
|
9171
|
+
{
|
|
9172
|
+
isShow: headerList.includes('numIid'),
|
|
9173
|
+
key: 'numIid',
|
|
9174
|
+
label: '商品id'
|
|
9175
|
+
}, {
|
|
9176
|
+
isShow: changeSku && headerList.includes('skuId'),
|
|
9177
|
+
key: 'skuId',
|
|
9178
|
+
label: 'SKU ID'
|
|
9179
|
+
}, {
|
|
9180
|
+
isShow: changeSku && headerList.includes('outerSkuId'),
|
|
9181
|
+
key: 'outerSkuId',
|
|
9182
|
+
label: 'SKU 编码'
|
|
9183
|
+
}, {
|
|
9184
|
+
isShow: changeSku && headerList.includes('propertiesName'),
|
|
9185
|
+
key: 'propertiesName',
|
|
9186
|
+
label: 'SKU 信息'
|
|
9187
|
+
}];
|
|
9188
|
+
var hasPic = headerList.includes('picUrl');
|
|
9189
|
+
var hasAttr = hasPic ? headerList.length > 1 : headerList.length > 0;
|
|
9190
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
9191
|
+
ref: boxRef,
|
|
9192
|
+
className: "goodsBox goodsBox-item-horizontal--box".concat(isSingleRow ? ' single-row' : '')
|
|
9193
|
+
}, imgList === null || imgList === void 0 ? void 0 : imgList.map(function (img, index) {
|
|
9194
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
9195
|
+
key: index,
|
|
9196
|
+
className: "goodBox-Img rich-item".concat(hasPic ? ' with-pic' : '').concat(hasAttr ? ' with-attr' : '')
|
|
9197
|
+
}, !disabled && /*#__PURE__*/React__default['default'].createElement("img", {
|
|
9198
|
+
src: iconDelete,
|
|
9199
|
+
alt: "",
|
|
9200
|
+
className: "icon-close",
|
|
9201
|
+
onClick: function onClick() {
|
|
9202
|
+
handleDelete(index);
|
|
9203
|
+
}
|
|
9204
|
+
}), hasPic && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
9205
|
+
className: "goods-imgBox",
|
|
9206
|
+
key: "".concat(img.picUrl, "-").concat(index, "-goods")
|
|
9207
|
+
}, img.platform !== 'taobao' ? /*#__PURE__*/React__default['default'].createElement("img", {
|
|
9208
|
+
src: img.picUrl || defaultImg,
|
|
9209
|
+
className: "img",
|
|
9210
|
+
alt: ""
|
|
9211
|
+
}) : /*#__PURE__*/React__default['default'].createElement("a", {
|
|
9212
|
+
href: "https://item.taobao.com/item.htm?id=".concat(img.numIid),
|
|
9213
|
+
target: "_blank"
|
|
9214
|
+
}, /*#__PURE__*/React__default['default'].createElement("img", {
|
|
9215
|
+
src: img.picUrl || defaultImg,
|
|
9216
|
+
className: "img",
|
|
9217
|
+
alt: ""
|
|
9218
|
+
}))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
9219
|
+
className: "right-context",
|
|
9220
|
+
key: "".concat(img.picUrl, "-").concat(index, "-context")
|
|
9221
|
+
}, goodItemAttrs.map(function (item) {
|
|
9222
|
+
return item.isShow && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
9223
|
+
key: item.key
|
|
9224
|
+
}, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
9225
|
+
className: "good-item-attr"
|
|
9226
|
+
}, item.label), /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
9227
|
+
placeholder: "\u8BF7\u8F93\u5165".concat(item.label),
|
|
9228
|
+
title: String(img[item.key] || ''),
|
|
9229
|
+
value: img[item.key],
|
|
9230
|
+
disabled: item.disabled || disabled,
|
|
9231
|
+
onChange: handleChangeValue(item.key, index)
|
|
9232
|
+
}));
|
|
9233
|
+
})));
|
|
9234
|
+
}), imgList.length < maxLength && !disabled ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
9235
|
+
className: "goods-imgBox",
|
|
9236
|
+
onClick: function onClick() {
|
|
9237
|
+
if (!shopId) {
|
|
9238
|
+
antd.message.error('请选择店铺');
|
|
9239
|
+
return;
|
|
9240
|
+
}
|
|
9241
|
+
setVisible(true);
|
|
9242
|
+
}
|
|
9243
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
9244
|
+
className: "add-btn",
|
|
9245
|
+
style: {
|
|
9246
|
+
marginTop: '15px'
|
|
9247
|
+
}
|
|
9248
|
+
}, "+"), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
9249
|
+
className: "text"
|
|
9250
|
+
}, "\u6DFB\u52A0")) : null, visible ? /*#__PURE__*/React__default['default'].createElement(GoodsModal, {
|
|
9251
|
+
visible: visible,
|
|
9252
|
+
onSubmit: onSubmit,
|
|
9253
|
+
width: width,
|
|
9254
|
+
type: type,
|
|
9255
|
+
imgList: imgList,
|
|
9256
|
+
shopList: shopList,
|
|
9257
|
+
shopId: shopId,
|
|
9258
|
+
maxLength: maxLength,
|
|
9259
|
+
changeSku: changeSku,
|
|
9260
|
+
onCancel: function onCancel() {
|
|
9261
|
+
setVisible(false);
|
|
9262
|
+
}
|
|
9263
|
+
}) : null, /*#__PURE__*/React__default['default'].createElement(Sku, {
|
|
9264
|
+
handleOk: handleSelectSku,
|
|
9265
|
+
ref: skuRef,
|
|
9266
|
+
userNick: userNick,
|
|
9267
|
+
type: type
|
|
9268
|
+
}));
|
|
9269
|
+
};
|
|
9270
|
+
|
|
8889
9271
|
var TBGoodSerial = function TBGoodSerial(props) {
|
|
8890
|
-
return /*#__PURE__*/React__default['default'].createElement(
|
|
9272
|
+
return /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
8891
9273
|
type: 1
|
|
8892
9274
|
}));
|
|
8893
9275
|
};
|
|
@@ -8898,8 +9280,8 @@ var Supplier = function Supplier(props) {
|
|
|
8898
9280
|
}));
|
|
8899
9281
|
};
|
|
8900
9282
|
|
|
8901
|
-
var css_248z$
|
|
8902
|
-
styleInject(css_248z$
|
|
9283
|
+
var css_248z$7 = ".cardBox {\n position: absolute;\n z-index: 1;\n border: 1px solid #e6e6e6;\n background-color: #fff;\n color: #303133;\n border-radius: 4px;\n overflow: auto;\n height: 200px;\n cursor: pointer;\n}\n.cardBox .cardli {\n padding: 7px 13px;\n width: 332px;\n}\n.cardBox .cardli:hover {\n background-color: #f5f7fa;\n}\n.cardBox .cardText {\n font-size: 14px;\n color: #333;\n margin: 0;\n padding: 0;\n line-height: 26px;\n}\n.cardBox .c-f60 {\n color: #f60;\n}\n.btn-discern {\n margin-left: 10px;\n height: 24px;\n font-size: 12px;\n color: #1B5BF3;\n border-color: #1B5BF3;\n padding: 0;\n}\n";
|
|
9284
|
+
styleInject(css_248z$7);
|
|
8903
9285
|
|
|
8904
9286
|
var Invoice = function Invoice(props) {
|
|
8905
9287
|
var _props$value = props.value,
|
|
@@ -9328,8 +9710,8 @@ var Payment = function Payment(props) {
|
|
|
9328
9710
|
}));
|
|
9329
9711
|
};
|
|
9330
9712
|
|
|
9331
|
-
var css_248z$
|
|
9332
|
-
styleInject(css_248z$
|
|
9713
|
+
var css_248z$8 = ".interceptBox :global(.ant-select-item-option-content) {\n overflow: auto !important;\n white-space: initial !important;\n}\n";
|
|
9714
|
+
styleInject(css_248z$8);
|
|
9333
9715
|
|
|
9334
9716
|
var Item = antd.Form.Item;
|
|
9335
9717
|
var LogisticsInterception = function LogisticsInterception(props) {
|
|
@@ -9510,7 +9892,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
9510
9892
|
}
|
|
9511
9893
|
};
|
|
9512
9894
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
9513
|
-
className: css_248z$
|
|
9895
|
+
className: css_248z$8.interceptBox
|
|
9514
9896
|
}, /*#__PURE__*/React__default['default'].createElement(Item, {
|
|
9515
9897
|
label: '物流信息',
|
|
9516
9898
|
required: required,
|
|
@@ -10120,8 +10502,8 @@ var jstGoods = function jstGoods(props) {
|
|
|
10120
10502
|
})) : null) : null);
|
|
10121
10503
|
};
|
|
10122
10504
|
|
|
10123
|
-
var css_248z$
|
|
10124
|
-
styleInject(css_248z$
|
|
10505
|
+
var css_248z$9 = ".jstGoodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.jstGoodsBox .goodBox-Img {\n width: 80px;\n margin: 0 10px 10px 0;\n}\n.jstGoodsBox .right-context {\n font-size: 12px;\n}\n.jstGoodsBox .right-context .ant-input {\n font-size: 12px;\n width: 80px;\n height: 20px;\n padding-left: 5px;\n padding-right: 5px;\n}\n.jstGoodsBox .right-context .ant-input.id-textarea {\n width: 80px;\n resize: none;\n height: 45px;\n}\n.jstGoodsBox.goodsBox-item-horizontal--box {\n flex-direction: row;\n width: auto;\n}\n.jstimgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border-radius: 4px;\n border: 1px solid #f2f3f5;\n margin: 0 10px 10px 0;\n text-align: center;\n background-color: #f2f3f5;\n display: flex;\n justify-items: center;\n align-items: center;\n}\n.jstimgBox .add-btn {\n color: #86909c;\n}\n.jstimgBox .text {\n color: #86909c;\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.searchBox {\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n margin-bottom: 10px;\n}\n.searchBox .search {\n width: 150px;\n margin-left: 6px;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodsMain {\n display: flex;\n flex-wrap: wrap;\n height: 400px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodsMain .goodItem {\n width: 142px;\n height: 184px;\n padding: 7px;\n margin: 0 16px 16px 0;\n border-radius: 4px;\n background: #ffffff;\n box-sizing: border-box;\n /* 主题色/常规 */\n border: 1px solid #c9cdd4;\n}\n.goodsMain .goodItem .goodImg {\n width: 128px;\n height: 128px;\n border-radius: 4px;\n overflow: hidden;\n}\n.goodsMain .goodItem .goodImg img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goodsMain .goodItem .goodText {\n text-align: center;\n font-size: 12px;\n color: #4e5969;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodsMain .goodItem .goodPrice {\n text-align: center;\n font-size: 14px;\n color: #1d2129;\n}\n.goodsMain .goodItem.active {\n border: 1px solid #1b5bf3;\n}\n@media screen and (max-width: 500px) {\n .goodsMain {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 8px;\n height: 300px;\n }\n .goodsMain .goodItem {\n height: 126px;\n width: 83px;\n padding: 4px;\n margin: 0;\n border-radius: 4px;\n background: #FFFFFF;\n box-sizing: border-box;\n border: 1px solid rgba(0, 0, 0, 0.15);\n }\n .goodsMain .goodItem .goodImg {\n width: 98%;\n height: 77px;\n }\n .goodsMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .goodsMain .goodItem.active {\n border: 1px solid #3089dc;\n }\n .searchBox {\n display: flex;\n flex-wrap: wrap;\n justify-content: initial;\n }\n .searchBox .classify {\n width: 120px;\n }\n .goodModal .ant-modal-body {\n padding: 8px;\n }\n}\n.goods-uploaded-count {\n color: #ff3638;\n}\n.footer {\n display: flex;\n justify-content: flex-end;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n.right-context .info-row {\n width: 80px;\n display: flex;\n align-items: center;\n padding: 0px 8px;\n border-radius: 2px;\n cursor: pointer;\n background: #f2f3f5;\n margin-bottom: 4px;\n}\n.right-context .info-row > div {\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n word-break: break-all;\n}\n.sphPagination {\n display: flex;\n align-items: center;\n}\n.sphPagination .shpBtn {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 0 8px;\n height: 32px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n cursor: pointer;\n margin: 0 8px;\n}\n.sphPagination .shpBtn.unCursor {\n color: #eee;\n cursor: not-allowed;\n}\n";
|
|
10506
|
+
styleInject(css_248z$9);
|
|
10125
10507
|
|
|
10126
10508
|
var ItemList = function ItemList(props) {
|
|
10127
10509
|
var _props$value = props.value,
|
|
@@ -10561,7 +10943,7 @@ var GoodsModal$2 = /*#__PURE__*/React.forwardRef(GoodsModal$1);
|
|
|
10561
10943
|
// skuId: string;
|
|
10562
10944
|
// styleId: string;
|
|
10563
10945
|
// }
|
|
10564
|
-
var GoodItem = function GoodItem(props) {
|
|
10946
|
+
var GoodItem$1 = function GoodItem(props) {
|
|
10565
10947
|
var _props$value = props.value,
|
|
10566
10948
|
value = _props$value === void 0 ? [] : _props$value,
|
|
10567
10949
|
onChange = props.onChange,
|
|
@@ -10936,7 +11318,7 @@ var BsGoods = function BsGoods(props) {
|
|
|
10936
11318
|
bsGoods: list
|
|
10937
11319
|
}));
|
|
10938
11320
|
};
|
|
10939
|
-
return /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
|
|
11321
|
+
return /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
10940
11322
|
key: 'bsGoods'
|
|
10941
11323
|
}, props), {}, {
|
|
10942
11324
|
disabled: disabled,
|
|
@@ -11134,12 +11516,12 @@ var BsExchange = function BsExchange(props) {
|
|
|
11134
11516
|
onChange: function onChange(val) {
|
|
11135
11517
|
return changeTypeHandle(val);
|
|
11136
11518
|
}
|
|
11137
|
-
}), !(value === null || value === void 0 ? void 0 : (_value$bsExchangeType4 = value.bsExchangeType) === null || _value$bsExchangeType4 === void 0 ? void 0 : _value$bsExchangeType4.length) ? /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
|
|
11519
|
+
}), !(value === null || value === void 0 ? void 0 : (_value$bsExchangeType4 = value.bsExchangeType) === null || _value$bsExchangeType4 === void 0 ? void 0 : _value$bsExchangeType4.length) ? /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
11138
11520
|
key: 'bsExchangeGoods'
|
|
11139
11521
|
}, other), {}, {
|
|
11140
11522
|
disabled: disabled,
|
|
11141
11523
|
showChangeBtn: false
|
|
11142
|
-
})) : null, ['1', '3'].includes(value === null || value === void 0 ? void 0 : (_value$bsExchangeType5 = value.bsExchangeType) === null || _value$bsExchangeType5 === void 0 ? void 0 : _value$bsExchangeType5[0]) ? /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
|
|
11524
|
+
})) : null, ['1', '3'].includes(value === null || value === void 0 ? void 0 : (_value$bsExchangeType5 = value.bsExchangeType) === null || _value$bsExchangeType5 === void 0 ? void 0 : _value$bsExchangeType5[0]) ? /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
11143
11525
|
key: 'bsExchangeGoods'
|
|
11144
11526
|
}, other), {}, {
|
|
11145
11527
|
disabled: disabled,
|
|
@@ -11155,7 +11537,7 @@ var BsExchange = function BsExchange(props) {
|
|
|
11155
11537
|
border: '1px dashed',
|
|
11156
11538
|
marginBottom: '8px'
|
|
11157
11539
|
}
|
|
11158
|
-
}, /*#__PURE__*/React__default['default'].createElement("div", null, "\u9000\u56DE\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
|
|
11540
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", null, "\u9000\u56DE\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
11159
11541
|
key: 'bsReturnGoods'
|
|
11160
11542
|
}, other), {}, {
|
|
11161
11543
|
disabled: disabled,
|
|
@@ -11165,7 +11547,7 @@ var BsExchange = function BsExchange(props) {
|
|
|
11165
11547
|
onChange: function onChange(val) {
|
|
11166
11548
|
return changeReturnHandle(val, index, 'bsExchangeReturnGoods');
|
|
11167
11549
|
}
|
|
11168
|
-
})), /*#__PURE__*/React__default['default'].createElement("div", null, "\u6362\u51FA\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
|
|
11550
|
+
})), /*#__PURE__*/React__default['default'].createElement("div", null, "\u6362\u51FA\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
11169
11551
|
key: 'bsOutGoods'
|
|
11170
11552
|
}, other), {}, {
|
|
11171
11553
|
disabled: disabled,
|
|
@@ -11177,7 +11559,7 @@ var BsExchange = function BsExchange(props) {
|
|
|
11177
11559
|
return changeReturnHandle(val, index, 'bsExchangeSwapOutGoods');
|
|
11178
11560
|
}
|
|
11179
11561
|
})));
|
|
11180
|
-
})), ['3', '4'].includes(value === null || value === void 0 ? void 0 : (_value$bsExchangeType6 = value.bsExchangeType) === null || _value$bsExchangeType6 === void 0 ? void 0 : _value$bsExchangeType6[0]) ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", null, "\u8D60\u54C1\u4FE1\u606F"), /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
|
|
11562
|
+
})), ['3', '4'].includes(value === null || value === void 0 ? void 0 : (_value$bsExchangeType6 = value.bsExchangeType) === null || _value$bsExchangeType6 === void 0 ? void 0 : _value$bsExchangeType6[0]) ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", null, "\u8D60\u54C1\u4FE1\u606F"), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
11181
11563
|
headerText: "\u8D60\u54C1",
|
|
11182
11564
|
key: 'bsGiftGoods',
|
|
11183
11565
|
disabled: disabled,
|
|
@@ -11288,7 +11670,7 @@ var BsReissue = function BsReissue(props) {
|
|
|
11288
11670
|
onChange: function onChange(val) {
|
|
11289
11671
|
return changeTypeHandle(val);
|
|
11290
11672
|
}
|
|
11291
|
-
}), /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
|
|
11673
|
+
}), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
11292
11674
|
key: 'reissueGoods'
|
|
11293
11675
|
}, other), {}, {
|
|
11294
11676
|
disabled: disabled,
|
|
@@ -11385,7 +11767,7 @@ var BsReturnGoods = function BsReturnGoods(props) {
|
|
|
11385
11767
|
onChange: function onChange(val) {
|
|
11386
11768
|
return changeTypeHandle(val);
|
|
11387
11769
|
}
|
|
11388
|
-
}), /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
|
|
11770
|
+
}), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
11389
11771
|
key: 'returnGoods'
|
|
11390
11772
|
}, other), {}, {
|
|
11391
11773
|
disabled: disabled,
|
|
@@ -11562,7 +11944,7 @@ var WlnGoods = function WlnGoods(props) {
|
|
|
11562
11944
|
wlnGoods: list
|
|
11563
11945
|
}));
|
|
11564
11946
|
};
|
|
11565
|
-
return /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
|
|
11947
|
+
return /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
11566
11948
|
key: 'wlnGoods'
|
|
11567
11949
|
}, props), {}, {
|
|
11568
11950
|
disabled: disabled,
|
|
@@ -11575,8 +11957,8 @@ var WlnGoods = function WlnGoods(props) {
|
|
|
11575
11957
|
}));
|
|
11576
11958
|
};
|
|
11577
11959
|
|
|
11578
|
-
var css_248z$
|
|
11579
|
-
styleInject(css_248z$
|
|
11960
|
+
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";
|
|
11961
|
+
styleInject(css_248z$a);
|
|
11580
11962
|
|
|
11581
11963
|
var TabPane$1 = antd.Tabs.TabPane;
|
|
11582
11964
|
var Option$2 = antd.Select.Option;
|