@kmkf-fe-packages/basic-components 0.7.15-alpha.47 → 0.7.15-alpha.49
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.esm.js +16 -8
- package/dist/index.js +16 -8
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -9837,7 +9837,7 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
9837
9837
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
9838
9838
|
rowSelection: rowSelection,
|
|
9839
9839
|
columns: columns,
|
|
9840
|
-
rowKey: '
|
|
9840
|
+
rowKey: 'skuCode',
|
|
9841
9841
|
dataSource: goodList,
|
|
9842
9842
|
scroll: {
|
|
9843
9843
|
x: '100%',
|
|
@@ -10034,7 +10034,7 @@ var GoodItem = function GoodItem(props) {
|
|
|
10034
10034
|
var onSelectChange = function onSelectChange(newSelectedRowKeys) {
|
|
10035
10035
|
setSelectedRowKeys(newSelectedRowKeys);
|
|
10036
10036
|
onSelect === null || onSelect === void 0 ? void 0 : onSelect(value.filter(function (t) {
|
|
10037
|
-
return newSelectedRowKeys.includes(t.
|
|
10037
|
+
return newSelectedRowKeys.includes(t.sku);
|
|
10038
10038
|
}));
|
|
10039
10039
|
};
|
|
10040
10040
|
var handleChangeGoods = function handleChangeGoods() {
|
|
@@ -10062,7 +10062,7 @@ var GoodItem = function GoodItem(props) {
|
|
|
10062
10062
|
}, "\u9009\u62E9\u5546\u54C1"), otherOperations), /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
|
|
10063
10063
|
columns: newColumns,
|
|
10064
10064
|
dataSource: value,
|
|
10065
|
-
rowKey: '
|
|
10065
|
+
rowKey: 'sku',
|
|
10066
10066
|
size: "small",
|
|
10067
10067
|
pagination: false,
|
|
10068
10068
|
scroll: {
|
|
@@ -10102,6 +10102,7 @@ var BsGoods = function BsGoods(props) {
|
|
|
10102
10102
|
useEffect(function () {
|
|
10103
10103
|
ref.current = pubsub.subscribeOnce('type', function (type, val) {
|
|
10104
10104
|
var _value$bsGoods;
|
|
10105
|
+
console.log(value);
|
|
10105
10106
|
if (disabled) return;
|
|
10106
10107
|
setWithInfo({
|
|
10107
10108
|
type: type,
|
|
@@ -10109,9 +10110,10 @@ var BsGoods = function BsGoods(props) {
|
|
|
10109
10110
|
});
|
|
10110
10111
|
setTableSelect(['2', '4'].includes(val));
|
|
10111
10112
|
if (['1', '3'].includes(val) && (value === null || value === void 0 ? void 0 : (_value$bsGoods = value.bsGoods) === null || _value$bsGoods === void 0 ? void 0 : _value$bsGoods.length)) {
|
|
10113
|
+
var newGoods = cloneDeep(value === null || value === void 0 ? void 0 : value.bsGoods);
|
|
10112
10114
|
pubsub.publish('selectList', {
|
|
10113
10115
|
type: val,
|
|
10114
|
-
list: (
|
|
10116
|
+
list: (newGoods || []).map(function (item) {
|
|
10115
10117
|
item.canDelete = false;
|
|
10116
10118
|
return item;
|
|
10117
10119
|
})
|
|
@@ -10128,9 +10130,10 @@ var BsGoods = function BsGoods(props) {
|
|
|
10128
10130
|
});
|
|
10129
10131
|
setTableSelect(['2', '4'].includes(val));
|
|
10130
10132
|
if (['1', '3'].includes(val) && (value === null || value === void 0 ? void 0 : (_value$bsGoods2 = value.bsGoods) === null || _value$bsGoods2 === void 0 ? void 0 : _value$bsGoods2.length)) {
|
|
10133
|
+
var newGoods = cloneDeep(value === null || value === void 0 ? void 0 : value.bsGoods);
|
|
10131
10134
|
pubsub.publish('reissueSelectList', {
|
|
10132
10135
|
type: val,
|
|
10133
|
-
list: (
|
|
10136
|
+
list: (newGoods || []).map(function (item) {
|
|
10134
10137
|
item.canDelete = false;
|
|
10135
10138
|
return item;
|
|
10136
10139
|
})
|
|
@@ -10264,7 +10267,7 @@ var BsExchange = function BsExchange(props) {
|
|
|
10264
10267
|
newValue.bsExchangeGiftGoods = [];
|
|
10265
10268
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
10266
10269
|
pubsub.publish('type', val[0]);
|
|
10267
|
-
pubsub.
|
|
10270
|
+
pubsub.subscribe('selectList', function (_, data) {
|
|
10268
10271
|
if (disabled) return;
|
|
10269
10272
|
if (newValue) {
|
|
10270
10273
|
var newData = cloneDeep(data);
|
|
@@ -10338,7 +10341,12 @@ var BsExchange = function BsExchange(props) {
|
|
|
10338
10341
|
return changeHandle(val, 'bsExchangeReturnGoods');
|
|
10339
10342
|
}
|
|
10340
10343
|
})) : /*#__PURE__*/React.createElement(React.Fragment, null, ((value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods) || []).map(function (item, index) {
|
|
10341
|
-
return /*#__PURE__*/React.createElement(
|
|
10344
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
10345
|
+
style: {
|
|
10346
|
+
border: '1px dashed #eee',
|
|
10347
|
+
marginBottom: '8px'
|
|
10348
|
+
}
|
|
10349
|
+
}, /*#__PURE__*/React.createElement("div", null, "\u9000\u56DE\u5546\u54C1"), /*#__PURE__*/React.createElement(GoodItem, _objectSpread2(_objectSpread2({
|
|
10342
10350
|
key: 'bsReturnGoods'
|
|
10343
10351
|
}, other), {}, {
|
|
10344
10352
|
disabled: disabled,
|
|
@@ -10407,7 +10415,7 @@ var BsReissue = function BsReissue(props) {
|
|
|
10407
10415
|
}
|
|
10408
10416
|
if (key === 'bsReissueType') {
|
|
10409
10417
|
pubsub.publish('reissueType', val[0]);
|
|
10410
|
-
pubsub.
|
|
10418
|
+
pubsub.subscribe('reissueSelectList', function (_, data) {
|
|
10411
10419
|
if (disabled) return;
|
|
10412
10420
|
if (value) {
|
|
10413
10421
|
var newData = cloneDeep(data);
|
package/dist/index.js
CHANGED
|
@@ -9848,7 +9848,7 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
9848
9848
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
9849
9849
|
rowSelection: rowSelection,
|
|
9850
9850
|
columns: columns,
|
|
9851
|
-
rowKey: '
|
|
9851
|
+
rowKey: 'skuCode',
|
|
9852
9852
|
dataSource: goodList,
|
|
9853
9853
|
scroll: {
|
|
9854
9854
|
x: '100%',
|
|
@@ -10045,7 +10045,7 @@ var GoodItem = function GoodItem(props) {
|
|
|
10045
10045
|
var onSelectChange = function onSelectChange(newSelectedRowKeys) {
|
|
10046
10046
|
setSelectedRowKeys(newSelectedRowKeys);
|
|
10047
10047
|
onSelect === null || onSelect === void 0 ? void 0 : onSelect(value.filter(function (t) {
|
|
10048
|
-
return newSelectedRowKeys.includes(t.
|
|
10048
|
+
return newSelectedRowKeys.includes(t.sku);
|
|
10049
10049
|
}));
|
|
10050
10050
|
};
|
|
10051
10051
|
var handleChangeGoods = function handleChangeGoods() {
|
|
@@ -10073,7 +10073,7 @@ var GoodItem = function GoodItem(props) {
|
|
|
10073
10073
|
}, "\u9009\u62E9\u5546\u54C1"), otherOperations), /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
|
|
10074
10074
|
columns: newColumns,
|
|
10075
10075
|
dataSource: value,
|
|
10076
|
-
rowKey: '
|
|
10076
|
+
rowKey: 'sku',
|
|
10077
10077
|
size: "small",
|
|
10078
10078
|
pagination: false,
|
|
10079
10079
|
scroll: {
|
|
@@ -10113,6 +10113,7 @@ var BsGoods = function BsGoods(props) {
|
|
|
10113
10113
|
React.useEffect(function () {
|
|
10114
10114
|
ref.current = pubsub__default['default'].subscribeOnce('type', function (type, val) {
|
|
10115
10115
|
var _value$bsGoods;
|
|
10116
|
+
console.log(value);
|
|
10116
10117
|
if (disabled) return;
|
|
10117
10118
|
setWithInfo({
|
|
10118
10119
|
type: type,
|
|
@@ -10120,9 +10121,10 @@ var BsGoods = function BsGoods(props) {
|
|
|
10120
10121
|
});
|
|
10121
10122
|
setTableSelect(['2', '4'].includes(val));
|
|
10122
10123
|
if (['1', '3'].includes(val) && (value === null || value === void 0 ? void 0 : (_value$bsGoods = value.bsGoods) === null || _value$bsGoods === void 0 ? void 0 : _value$bsGoods.length)) {
|
|
10124
|
+
var newGoods = lodash.cloneDeep(value === null || value === void 0 ? void 0 : value.bsGoods);
|
|
10123
10125
|
pubsub__default['default'].publish('selectList', {
|
|
10124
10126
|
type: val,
|
|
10125
|
-
list: (
|
|
10127
|
+
list: (newGoods || []).map(function (item) {
|
|
10126
10128
|
item.canDelete = false;
|
|
10127
10129
|
return item;
|
|
10128
10130
|
})
|
|
@@ -10139,9 +10141,10 @@ var BsGoods = function BsGoods(props) {
|
|
|
10139
10141
|
});
|
|
10140
10142
|
setTableSelect(['2', '4'].includes(val));
|
|
10141
10143
|
if (['1', '3'].includes(val) && (value === null || value === void 0 ? void 0 : (_value$bsGoods2 = value.bsGoods) === null || _value$bsGoods2 === void 0 ? void 0 : _value$bsGoods2.length)) {
|
|
10144
|
+
var newGoods = lodash.cloneDeep(value === null || value === void 0 ? void 0 : value.bsGoods);
|
|
10142
10145
|
pubsub__default['default'].publish('reissueSelectList', {
|
|
10143
10146
|
type: val,
|
|
10144
|
-
list: (
|
|
10147
|
+
list: (newGoods || []).map(function (item) {
|
|
10145
10148
|
item.canDelete = false;
|
|
10146
10149
|
return item;
|
|
10147
10150
|
})
|
|
@@ -10275,7 +10278,7 @@ var BsExchange = function BsExchange(props) {
|
|
|
10275
10278
|
newValue.bsExchangeGiftGoods = [];
|
|
10276
10279
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
10277
10280
|
pubsub__default['default'].publish('type', val[0]);
|
|
10278
|
-
pubsub__default['default'].
|
|
10281
|
+
pubsub__default['default'].subscribe('selectList', function (_, data) {
|
|
10279
10282
|
if (disabled) return;
|
|
10280
10283
|
if (newValue) {
|
|
10281
10284
|
var newData = lodash.cloneDeep(data);
|
|
@@ -10349,7 +10352,12 @@ var BsExchange = function BsExchange(props) {
|
|
|
10349
10352
|
return changeHandle(val, 'bsExchangeReturnGoods');
|
|
10350
10353
|
}
|
|
10351
10354
|
})) : /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, ((value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods) || []).map(function (item, index) {
|
|
10352
|
-
return /*#__PURE__*/React__default['default'].createElement(
|
|
10355
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
10356
|
+
style: {
|
|
10357
|
+
border: '1px dashed #eee',
|
|
10358
|
+
marginBottom: '8px'
|
|
10359
|
+
}
|
|
10360
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", null, "\u9000\u56DE\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
|
|
10353
10361
|
key: 'bsReturnGoods'
|
|
10354
10362
|
}, other), {}, {
|
|
10355
10363
|
disabled: disabled,
|
|
@@ -10418,7 +10426,7 @@ var BsReissue = function BsReissue(props) {
|
|
|
10418
10426
|
}
|
|
10419
10427
|
if (key === 'bsReissueType') {
|
|
10420
10428
|
pubsub__default['default'].publish('reissueType', val[0]);
|
|
10421
|
-
pubsub__default['default'].
|
|
10429
|
+
pubsub__default['default'].subscribe('reissueSelectList', function (_, data) {
|
|
10422
10430
|
if (disabled) return;
|
|
10423
10431
|
if (value) {
|
|
10424
10432
|
var newData = lodash.cloneDeep(data);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "0.7.15-alpha.
|
|
3
|
+
"version": "0.7.15-alpha.49",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e ts,tsx,less --debug -x 'yarn async'"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.
|
|
23
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.49",
|
|
24
24
|
"lodash": "^4.17.21",
|
|
25
25
|
"pubsub-js": "^1.9.4",
|
|
26
26
|
"umi-request": "^1.4.0"
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "83a1112fe9ef93e93431e2c4ae163b9b4e5bc0c8"
|
|
62
62
|
}
|