@bit-sun/business-component 1.2.3 → 1.2.4-alpha.2
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 +23 -11
- package/dist/index.js +23 -11
- package/dist/utils/CheckOneUser/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/Functional/DataImport/index.tsx +6 -0
- package/src/components/Functional/DataValidation/index.md +1 -0
- package/src/components/Functional/DataValidation/index.tsx +16 -1
package/dist/index.esm.js
CHANGED
|
@@ -92,18 +92,17 @@ function _inherits(subClass, superClass) {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
function _getPrototypeOf(o) {
|
|
95
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
95
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
96
96
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
97
97
|
};
|
|
98
98
|
return _getPrototypeOf(o);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
function _setPrototypeOf(o, p) {
|
|
102
|
-
_setPrototypeOf = Object.setPrototypeOf
|
|
102
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
103
103
|
o.__proto__ = p;
|
|
104
104
|
return o;
|
|
105
105
|
};
|
|
106
|
-
|
|
107
106
|
return _setPrototypeOf(o, p);
|
|
108
107
|
}
|
|
109
108
|
|
|
@@ -1659,7 +1658,7 @@ var luckysheet; // const mapping = [
|
|
|
1659
1658
|
// { "key": "price", "name": "单价", "rule": "price" }
|
|
1660
1659
|
// ]
|
|
1661
1660
|
|
|
1662
|
-
var mapping = new Map([['skuCode', 'SKU编码'], ['quantity', '数量'], ['price', '单价'], ['regionCode', '库区'], ['checkQuantity', '实盘数量'], ['shareRatio', '共享比例'], ['lotNumberCode', '批号'], ['warehouseCode', '仓库编码'], ['regionCode', '库区'], ['locationCode', '货位'], ['rowNumber', '货位排数'], ['layerNumber', '货位层数'], ['gridNumber', '货位格号'], ['oldUniqueCode', '原始唯一码'], ['newUniqueCode', '新唯一码'], ['relationRecordCode', '单据编码'], ['remark', '备注']]); // for dnd
|
|
1661
|
+
var mapping = new Map([['skuCode', 'SKU编码'], ['quantity', '数量'], ['price', '单价'], ['regionCode', '库区'], ['checkQuantity', '实盘数量'], ['shareRatio', '共享比例'], ['lotNumberCode', '批号'], ['warehouseCode', '仓库编码'], ['regionCode', '库区'], ['locationCode', '货位'], ['rowNumber', '货位排数'], ['layerNumber', '货位层数'], ['gridNumber', '货位格号'], ['oldUniqueCode', '原始唯一码'], ['newUniqueCode', '新唯一码'], ['relationRecordCode', '单据编码'], ['remark', '备注'], ['externalCode', 'JDE商品编码'], ['realWarehouseCode', '仓库编码'], ['syncRate', '按百分比'], ['assignQuantity', '按指定数量'], ['retainQuantity', ' 按保留数量'], ['priority', ' 优先级']]); // for dnd
|
|
1663
1662
|
|
|
1664
1663
|
|
|
1665
1664
|
var reorder = function reorder(list, startIndex, endIndex) {
|
|
@@ -1969,17 +1968,31 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
1969
1968
|
_this.resetData = function () {
|
|
1970
1969
|
var _this$props = _this.props,
|
|
1971
1970
|
validDataUrl = _this$props.validDataUrl,
|
|
1971
|
+
validDataParams = _this$props.validDataParams,
|
|
1972
1972
|
updateData = _this$props.updateData,
|
|
1973
|
-
columns = _this$props.columns
|
|
1973
|
+
columns = _this$props.columns,
|
|
1974
|
+
isBrandAuth = _this$props.isBrandAuth,
|
|
1975
|
+
_this$props$isCheckSt = _this$props.isCheckStockNum,
|
|
1976
|
+
isCheckStockNum = _this$props$isCheckSt === void 0 ? true : _this$props$isCheckSt;
|
|
1974
1977
|
|
|
1975
1978
|
var resultData = _this.getData().filter(function (d) {
|
|
1976
1979
|
return _.compact(Object.values(d)).length;
|
|
1977
|
-
});
|
|
1980
|
+
}); // 处理业务参数
|
|
1978
1981
|
|
|
1979
|
-
|
|
1982
|
+
|
|
1983
|
+
var otherParams = {};
|
|
1984
|
+
|
|
1985
|
+
if (isBrandAuth) {
|
|
1986
|
+
otherParams = {
|
|
1987
|
+
brandAuth: 'ctl-withAuth'
|
|
1988
|
+
};
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1991
|
+
axios.post(validDataUrl, _objectSpread2(_objectSpread2(_objectSpread2({}, otherParams), validDataParams), {}, {
|
|
1980
1992
|
columns: columns,
|
|
1981
|
-
data: resultData
|
|
1982
|
-
|
|
1993
|
+
data: resultData,
|
|
1994
|
+
checkStockNum: isCheckStockNum
|
|
1995
|
+
})).then(function (result) {
|
|
1983
1996
|
result = result.data;
|
|
1984
1997
|
|
|
1985
1998
|
if (result.status !== '0') {
|
|
@@ -2272,7 +2285,7 @@ var luckysheet$1; // const mapping = [
|
|
|
2272
2285
|
// { "key": "price", "name": "单价", "rule": "price" }
|
|
2273
2286
|
// ]
|
|
2274
2287
|
|
|
2275
|
-
var mapping$1 = new Map([['skuCode', 'SKU编码'], ['quantity', '数量'], ['price', '单价'], ['regionCode', '库区'], ['checkQuantity', '实盘数量'], ['shareRatio', '共享比例'], ['lotNumberCode', '批号'], ['warehouseCode', '仓库编码'], ['regionCode', '库区'], ['locationCode', '货位'], ['rowNumber', '货位排数'], ['layerNumber', '货位层数'], ['gridNumber', '货位格号'], ['oldUniqueCode', '原始唯一码'], ['newUniqueCode', '新唯一码'], ['relationRecordCode', '单据编码'], ['remark', '备注']]); // for dnd
|
|
2288
|
+
var mapping$1 = new Map([['skuCode', 'SKU编码'], ['quantity', '数量'], ['price', '单价'], ['regionCode', '库区'], ['checkQuantity', '实盘数量'], ['shareRatio', '共享比例'], ['lotNumberCode', '批号'], ['warehouseCode', '仓库编码'], ['regionCode', '库区'], ['locationCode', '货位'], ['rowNumber', '货位排数'], ['layerNumber', '货位层数'], ['gridNumber', '货位格号'], ['oldUniqueCode', '原始唯一码'], ['newUniqueCode', '新唯一码'], ['relationRecordCode', '单据编码'], ['remark', '备注'], ['externalCode', 'JDE商品编码'], ['realWarehouseCode', '仓库编码'], ['syncRate', '按百分比'], ['assignQuantity', '按指定数量'], ['retainQuantity', ' 按保留数量'], ['priority', ' 优先级']]); // for dnd
|
|
2276
2289
|
|
|
2277
2290
|
|
|
2278
2291
|
var reorder$1 = function reorder(list, startIndex, endIndex) {
|
|
@@ -3138,7 +3151,6 @@ var SearchSelect = function SearchSelect(props) {
|
|
|
3138
3151
|
} // 防抖函数 待定
|
|
3139
3152
|
|
|
3140
3153
|
|
|
3141
|
-
// 防抖函数 待定
|
|
3142
3154
|
getData(searchParams);
|
|
3143
3155
|
}, {
|
|
3144
3156
|
wait: 1000
|
package/dist/index.js
CHANGED
|
@@ -103,18 +103,17 @@ function _inherits(subClass, superClass) {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
function _getPrototypeOf(o) {
|
|
106
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
106
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
107
107
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
108
108
|
};
|
|
109
109
|
return _getPrototypeOf(o);
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
function _setPrototypeOf(o, p) {
|
|
113
|
-
_setPrototypeOf = Object.setPrototypeOf
|
|
113
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
114
114
|
o.__proto__ = p;
|
|
115
115
|
return o;
|
|
116
116
|
};
|
|
117
|
-
|
|
118
117
|
return _setPrototypeOf(o, p);
|
|
119
118
|
}
|
|
120
119
|
|
|
@@ -1670,7 +1669,7 @@ var luckysheet; // const mapping = [
|
|
|
1670
1669
|
// { "key": "price", "name": "单价", "rule": "price" }
|
|
1671
1670
|
// ]
|
|
1672
1671
|
|
|
1673
|
-
var mapping = new Map([['skuCode', 'SKU编码'], ['quantity', '数量'], ['price', '单价'], ['regionCode', '库区'], ['checkQuantity', '实盘数量'], ['shareRatio', '共享比例'], ['lotNumberCode', '批号'], ['warehouseCode', '仓库编码'], ['regionCode', '库区'], ['locationCode', '货位'], ['rowNumber', '货位排数'], ['layerNumber', '货位层数'], ['gridNumber', '货位格号'], ['oldUniqueCode', '原始唯一码'], ['newUniqueCode', '新唯一码'], ['relationRecordCode', '单据编码'], ['remark', '备注']]); // for dnd
|
|
1672
|
+
var mapping = new Map([['skuCode', 'SKU编码'], ['quantity', '数量'], ['price', '单价'], ['regionCode', '库区'], ['checkQuantity', '实盘数量'], ['shareRatio', '共享比例'], ['lotNumberCode', '批号'], ['warehouseCode', '仓库编码'], ['regionCode', '库区'], ['locationCode', '货位'], ['rowNumber', '货位排数'], ['layerNumber', '货位层数'], ['gridNumber', '货位格号'], ['oldUniqueCode', '原始唯一码'], ['newUniqueCode', '新唯一码'], ['relationRecordCode', '单据编码'], ['remark', '备注'], ['externalCode', 'JDE商品编码'], ['realWarehouseCode', '仓库编码'], ['syncRate', '按百分比'], ['assignQuantity', '按指定数量'], ['retainQuantity', ' 按保留数量'], ['priority', ' 优先级']]); // for dnd
|
|
1674
1673
|
|
|
1675
1674
|
|
|
1676
1675
|
var reorder = function reorder(list, startIndex, endIndex) {
|
|
@@ -1980,17 +1979,31 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
1980
1979
|
_this.resetData = function () {
|
|
1981
1980
|
var _this$props = _this.props,
|
|
1982
1981
|
validDataUrl = _this$props.validDataUrl,
|
|
1982
|
+
validDataParams = _this$props.validDataParams,
|
|
1983
1983
|
updateData = _this$props.updateData,
|
|
1984
|
-
columns = _this$props.columns
|
|
1984
|
+
columns = _this$props.columns,
|
|
1985
|
+
isBrandAuth = _this$props.isBrandAuth,
|
|
1986
|
+
_this$props$isCheckSt = _this$props.isCheckStockNum,
|
|
1987
|
+
isCheckStockNum = _this$props$isCheckSt === void 0 ? true : _this$props$isCheckSt;
|
|
1985
1988
|
|
|
1986
1989
|
var resultData = _this.getData().filter(function (d) {
|
|
1987
1990
|
return ___default['default'].compact(Object.values(d)).length;
|
|
1988
|
-
});
|
|
1991
|
+
}); // 处理业务参数
|
|
1989
1992
|
|
|
1990
|
-
|
|
1993
|
+
|
|
1994
|
+
var otherParams = {};
|
|
1995
|
+
|
|
1996
|
+
if (isBrandAuth) {
|
|
1997
|
+
otherParams = {
|
|
1998
|
+
brandAuth: 'ctl-withAuth'
|
|
1999
|
+
};
|
|
2000
|
+
}
|
|
2001
|
+
|
|
2002
|
+
axios__default['default'].post(validDataUrl, _objectSpread2(_objectSpread2(_objectSpread2({}, otherParams), validDataParams), {}, {
|
|
1991
2003
|
columns: columns,
|
|
1992
|
-
data: resultData
|
|
1993
|
-
|
|
2004
|
+
data: resultData,
|
|
2005
|
+
checkStockNum: isCheckStockNum
|
|
2006
|
+
})).then(function (result) {
|
|
1994
2007
|
result = result.data;
|
|
1995
2008
|
|
|
1996
2009
|
if (result.status !== '0') {
|
|
@@ -2283,7 +2296,7 @@ var luckysheet$1; // const mapping = [
|
|
|
2283
2296
|
// { "key": "price", "name": "单价", "rule": "price" }
|
|
2284
2297
|
// ]
|
|
2285
2298
|
|
|
2286
|
-
var mapping$1 = new Map([['skuCode', 'SKU编码'], ['quantity', '数量'], ['price', '单价'], ['regionCode', '库区'], ['checkQuantity', '实盘数量'], ['shareRatio', '共享比例'], ['lotNumberCode', '批号'], ['warehouseCode', '仓库编码'], ['regionCode', '库区'], ['locationCode', '货位'], ['rowNumber', '货位排数'], ['layerNumber', '货位层数'], ['gridNumber', '货位格号'], ['oldUniqueCode', '原始唯一码'], ['newUniqueCode', '新唯一码'], ['relationRecordCode', '单据编码'], ['remark', '备注']]); // for dnd
|
|
2299
|
+
var mapping$1 = new Map([['skuCode', 'SKU编码'], ['quantity', '数量'], ['price', '单价'], ['regionCode', '库区'], ['checkQuantity', '实盘数量'], ['shareRatio', '共享比例'], ['lotNumberCode', '批号'], ['warehouseCode', '仓库编码'], ['regionCode', '库区'], ['locationCode', '货位'], ['rowNumber', '货位排数'], ['layerNumber', '货位层数'], ['gridNumber', '货位格号'], ['oldUniqueCode', '原始唯一码'], ['newUniqueCode', '新唯一码'], ['relationRecordCode', '单据编码'], ['remark', '备注'], ['externalCode', 'JDE商品编码'], ['realWarehouseCode', '仓库编码'], ['syncRate', '按百分比'], ['assignQuantity', '按指定数量'], ['retainQuantity', ' 按保留数量'], ['priority', ' 优先级']]); // for dnd
|
|
2287
2300
|
|
|
2288
2301
|
|
|
2289
2302
|
var reorder$1 = function reorder(list, startIndex, endIndex) {
|
|
@@ -3149,7 +3162,6 @@ var SearchSelect = function SearchSelect(props) {
|
|
|
3149
3162
|
} // 防抖函数 待定
|
|
3150
3163
|
|
|
3151
3164
|
|
|
3152
|
-
// 防抖函数 待定
|
|
3153
3165
|
getData(searchParams);
|
|
3154
3166
|
}, {
|
|
3155
3167
|
wait: 1000
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: (storageKeyString: string, seconds?: number, tipsCallFunction?: (
|
|
1
|
+
declare const _default: (storageKeyString: string, seconds?: number, tipsCallFunction?: () => {}) => void;
|
|
2
2
|
export default _default;
|
package/package.json
CHANGED
|
@@ -58,6 +58,12 @@ const mapping = new Map([
|
|
|
58
58
|
['newUniqueCode', '新唯一码'],
|
|
59
59
|
['relationRecordCode', '单据编码'],
|
|
60
60
|
['remark', '备注'],
|
|
61
|
+
['externalCode', 'JDE商品编码'],
|
|
62
|
+
['realWarehouseCode', '仓库编码'],
|
|
63
|
+
['syncRate', '按百分比'],
|
|
64
|
+
['assignQuantity', '按指定数量'],
|
|
65
|
+
['retainQuantity', ' 按保留数量'],
|
|
66
|
+
['priority', ' 优先级'],
|
|
61
67
|
]);
|
|
62
68
|
|
|
63
69
|
// for dnd
|
|
@@ -26,6 +26,7 @@ export default () => {
|
|
|
26
26
|
// columns={['skuCode', 'quantity', 'price']}
|
|
27
27
|
columns={["skuCode", "quantity", "price"]} // 需要哪些列展示,以及展示的顺序
|
|
28
28
|
validDataUrl="/wms-ops/recordDetailImport/check" // 校验的接口url
|
|
29
|
+
validDataParams={{ recordCode: '111' }}
|
|
29
30
|
onRef={(ref) => {
|
|
30
31
|
dataValidationRef = ref;
|
|
31
32
|
}}
|
|
@@ -58,6 +58,12 @@ const mapping = new Map([
|
|
|
58
58
|
['newUniqueCode', '新唯一码'],
|
|
59
59
|
['relationRecordCode', '单据编码'],
|
|
60
60
|
['remark', '备注'],
|
|
61
|
+
['externalCode', 'JDE商品编码'],
|
|
62
|
+
['realWarehouseCode', '仓库编码'],
|
|
63
|
+
['syncRate', '按百分比'],
|
|
64
|
+
['assignQuantity', '按指定数量'],
|
|
65
|
+
['retainQuantity', ' 按保留数量'],
|
|
66
|
+
['priority', ' 优先级'],
|
|
61
67
|
]);
|
|
62
68
|
|
|
63
69
|
// for dnd
|
|
@@ -400,15 +406,24 @@ class DataValidation extends React.Component {
|
|
|
400
406
|
};
|
|
401
407
|
|
|
402
408
|
resetData = () => {
|
|
403
|
-
const { validDataUrl, updateData, columns } = this.props;
|
|
409
|
+
const { validDataUrl, validDataParams, updateData, columns, isBrandAuth, isCheckStockNum = true } = this.props;
|
|
404
410
|
const resultData = this.getData().filter(d => {
|
|
405
411
|
return _.compact(Object.values(d)).length
|
|
406
412
|
})
|
|
407
413
|
|
|
414
|
+
// 处理业务参数
|
|
415
|
+
let otherParams={}
|
|
416
|
+
if(isBrandAuth){
|
|
417
|
+
otherParams = { brandAuth: 'ctl-withAuth' }
|
|
418
|
+
}
|
|
419
|
+
|
|
408
420
|
axios
|
|
409
421
|
.post(validDataUrl, {
|
|
422
|
+
...otherParams,
|
|
423
|
+
...validDataParams,
|
|
410
424
|
columns: columns,
|
|
411
425
|
data: resultData,
|
|
426
|
+
checkStockNum: isCheckStockNum
|
|
412
427
|
})
|
|
413
428
|
.then((result) => {
|
|
414
429
|
result = result.data;
|