@bit-sun/business-component 2.0.19 → 2.0.22
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 -3
- package/dist/index.js +16 -3
- package/package.json +1 -1
- package/src/components/Business/AddSelectBusiness/index.tsx +2 -1
- package/src/components/Functional/AddSelect/index.md +1 -0
- package/src/components/Functional/BillEntry/index.tsx +4 -4
- package/src/components/Functional/SearchSelect/index.tsx +7 -1
package/dist/index.esm.js
CHANGED
|
@@ -3574,7 +3574,17 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
3574
3574
|
var searchParams = {};
|
|
3575
3575
|
|
|
3576
3576
|
if (typeof selectParamsKey === 'string') {
|
|
3577
|
-
|
|
3577
|
+
var selectParamsInitValue = initVal;
|
|
3578
|
+
|
|
3579
|
+
if (labelInValue) {
|
|
3580
|
+
selectParamsInitValue = Array.isArray(initVal) ? initVal.map(function (i) {
|
|
3581
|
+
return i.value || i.key;
|
|
3582
|
+
}).join(',') : initVal;
|
|
3583
|
+
} else {
|
|
3584
|
+
selectParamsInitValue = Array.isArray(initVal) ? initVal.join(',') : initVal;
|
|
3585
|
+
}
|
|
3586
|
+
|
|
3587
|
+
searchParams = v ? _defineProperty({}, selectParamsInitKey, selectParamsInitValue) : _defineProperty({}, selectParamsKey, searchValue);
|
|
3578
3588
|
}
|
|
3579
3589
|
|
|
3580
3590
|
if (Array.isArray(selectParamsKey)) {
|
|
@@ -5631,7 +5641,9 @@ var InputElement = function InputElement(_ref) {
|
|
|
5631
5641
|
var onSerchdata = function onSerchdata(name) {
|
|
5632
5642
|
axios.get("/items/sku/pager/v2?".concat(stringify({
|
|
5633
5643
|
'skuCodeAndSkuName': name,
|
|
5634
|
-
'pageSize': 100
|
|
5644
|
+
'pageSize': 100,
|
|
5645
|
+
'qp-combination-eq': false,
|
|
5646
|
+
'qp-approveStatus-eq': 1
|
|
5635
5647
|
}))).then(function (_ref2) {
|
|
5636
5648
|
var data = _ref2.data,
|
|
5637
5649
|
status = _ref2.status;
|
|
@@ -8109,7 +8121,8 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
|
|
|
8109
8121
|
url: "/items/sku/pager/v2",
|
|
8110
8122
|
filter: 'qp-name-like',
|
|
8111
8123
|
otherParams: {
|
|
8112
|
-
'qp-combination-eq': false
|
|
8124
|
+
'qp-combination-eq': false,
|
|
8125
|
+
'qp-approveStatus-eq': 1
|
|
8113
8126
|
},
|
|
8114
8127
|
mappingTextField: 'name',
|
|
8115
8128
|
mappingValueField: 'skuCode'
|
package/dist/index.js
CHANGED
|
@@ -3586,7 +3586,17 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3586
3586
|
var searchParams = {};
|
|
3587
3587
|
|
|
3588
3588
|
if (typeof selectParamsKey === 'string') {
|
|
3589
|
-
|
|
3589
|
+
var selectParamsInitValue = initVal;
|
|
3590
|
+
|
|
3591
|
+
if (labelInValue) {
|
|
3592
|
+
selectParamsInitValue = Array.isArray(initVal) ? initVal.map(function (i) {
|
|
3593
|
+
return i.value || i.key;
|
|
3594
|
+
}).join(',') : initVal;
|
|
3595
|
+
} else {
|
|
3596
|
+
selectParamsInitValue = Array.isArray(initVal) ? initVal.join(',') : initVal;
|
|
3597
|
+
}
|
|
3598
|
+
|
|
3599
|
+
searchParams = v ? _defineProperty({}, selectParamsInitKey, selectParamsInitValue) : _defineProperty({}, selectParamsKey, searchValue);
|
|
3590
3600
|
}
|
|
3591
3601
|
|
|
3592
3602
|
if (Array.isArray(selectParamsKey)) {
|
|
@@ -5643,7 +5653,9 @@ var InputElement = function InputElement(_ref) {
|
|
|
5643
5653
|
var onSerchdata = function onSerchdata(name) {
|
|
5644
5654
|
axios__default['default'].get("/items/sku/pager/v2?".concat(querystring.stringify({
|
|
5645
5655
|
'skuCodeAndSkuName': name,
|
|
5646
|
-
'pageSize': 100
|
|
5656
|
+
'pageSize': 100,
|
|
5657
|
+
'qp-combination-eq': false,
|
|
5658
|
+
'qp-approveStatus-eq': 1
|
|
5647
5659
|
}))).then(function (_ref2) {
|
|
5648
5660
|
var data = _ref2.data,
|
|
5649
5661
|
status = _ref2.status;
|
|
@@ -8121,7 +8133,8 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
|
|
|
8121
8133
|
url: "/items/sku/pager/v2",
|
|
8122
8134
|
filter: 'qp-name-like',
|
|
8123
8135
|
otherParams: {
|
|
8124
|
-
'qp-combination-eq': false
|
|
8136
|
+
'qp-combination-eq': false,
|
|
8137
|
+
'qp-approveStatus-eq': 1
|
|
8125
8138
|
},
|
|
8126
8139
|
mappingTextField: 'name',
|
|
8127
8140
|
mappingValueField: 'skuCode'
|
package/package.json
CHANGED
|
@@ -23,6 +23,7 @@ export const AddSkuSelect = (parProps: any) => {
|
|
|
23
23
|
filter: 'qp-name-like', // 过滤参数 支持'qp-name-like'和['qp-name-like', 'qp-code-like']两种结构
|
|
24
24
|
otherParams: {
|
|
25
25
|
'qp-combination-eq': false,
|
|
26
|
+
'qp-approveStatus-eq': 1,
|
|
26
27
|
}, // 默认参数
|
|
27
28
|
mappingTextField: 'name',
|
|
28
29
|
mappingValueField: 'skuCode',
|
|
@@ -244,7 +245,7 @@ export const AddSkuSelect = (parProps: any) => {
|
|
|
244
245
|
return basePackUnit.name || basePackUnit.unitCode
|
|
245
246
|
}
|
|
246
247
|
|
|
247
|
-
|
|
248
|
+
|
|
248
249
|
return <></>
|
|
249
250
|
},
|
|
250
251
|
},
|
|
@@ -30,6 +30,7 @@ export default () => {
|
|
|
30
30
|
filter: 'qp-name-like', // 过滤参数 支持'qp-name-like'和['qp-name-like', 'qp-code-like']两种结构
|
|
31
31
|
otherParams: {
|
|
32
32
|
'qp-combination-eq': false,
|
|
33
|
+
'qp-approveStatus-eq': 1,
|
|
33
34
|
}, // 默认参数
|
|
34
35
|
mappingTextField: 'name',
|
|
35
36
|
mappingValueField: 'skuCode',
|
|
@@ -19,7 +19,7 @@ const InputElement = ({
|
|
|
19
19
|
|
|
20
20
|
const onSerchdata = (name: any) => {
|
|
21
21
|
axios
|
|
22
|
-
.get(`/items/sku/pager/v2?${stringify({ 'skuCodeAndSkuName': name, 'pageSize': 100 })}`)
|
|
22
|
+
.get(`/items/sku/pager/v2?${stringify({ 'skuCodeAndSkuName': name, 'pageSize': 100, 'qp-combination-eq': false, 'qp-approveStatus-eq': 1 })}`)
|
|
23
23
|
.then(({ data, status }: any) => {
|
|
24
24
|
if (status === 200) {
|
|
25
25
|
if (data.status === '0') {
|
|
@@ -423,7 +423,7 @@ const BillEntry: React.FC = ({ onSaveCallback }) => {
|
|
|
423
423
|
return basePackUnit.name || basePackUnit.unitCode
|
|
424
424
|
}
|
|
425
425
|
|
|
426
|
-
|
|
426
|
+
|
|
427
427
|
return <></>
|
|
428
428
|
},
|
|
429
429
|
},
|
|
@@ -520,7 +520,7 @@ const BillEntry: React.FC = ({ onSaveCallback }) => {
|
|
|
520
520
|
return (
|
|
521
521
|
<div className='add_select'>
|
|
522
522
|
<div className='add_select_quick_header'>
|
|
523
|
-
<div className='add_select_quick_header_title'><div>快速录入</div><Button type="primary" onClick={() => {
|
|
523
|
+
<div className='add_select_quick_header_title'><div>快速录入</div><Button type="primary" onClick={() => {
|
|
524
524
|
onSaveCallback(data)
|
|
525
525
|
}}>提交</Button></div>
|
|
526
526
|
<span><span>*</span> 快捷键:【Tab】-跳格切换;【Shift+←、→】-当前行左、右移动;【 ↑、↓】-当前列上、下移动;【ctrl+Delete】-删除当前行;</span>
|
|
@@ -544,4 +544,4 @@ const BillEntry: React.FC = ({ onSaveCallback }) => {
|
|
|
544
544
|
);
|
|
545
545
|
};
|
|
546
546
|
|
|
547
|
-
export default BillEntry;
|
|
547
|
+
export default BillEntry;
|
|
@@ -71,7 +71,13 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
71
71
|
// 优化搜索参数 支持传多个
|
|
72
72
|
let searchParams = {};
|
|
73
73
|
if (typeof selectParamsKey === 'string') {
|
|
74
|
-
|
|
74
|
+
let selectParamsInitValue = initVal
|
|
75
|
+
if(labelInValue) {
|
|
76
|
+
selectParamsInitValue = Array.isArray(initVal)? initVal.map((i: any) => i.value || i.key).join(','): initVal
|
|
77
|
+
} else {
|
|
78
|
+
selectParamsInitValue = Array.isArray(initVal)? initVal.join(','): initVal
|
|
79
|
+
}
|
|
80
|
+
searchParams = v ? { [selectParamsInitKey]: selectParamsInitValue } : { [selectParamsKey]: searchValue }
|
|
75
81
|
}
|
|
76
82
|
if (Array.isArray(selectParamsKey)) {
|
|
77
83
|
selectParamsKey.forEach((i: any) => {
|