@bit-sun/business-component 2.2.14 → 2.2.15
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/components/Business/AddSelectBusiness/index.d.ts +1 -0
- package/dist/components/Business/BsLayouts/utils.d.ts +0 -4
- package/dist/index.esm.js +327 -43
- package/dist/index.js +327 -42
- package/dist/utils/LocalstorageUtils.d.ts +9 -1
- package/dist/utils/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/Business/AddSelectBusiness/index.md +40 -4
- package/src/components/Business/AddSelectBusiness/index.tsx +233 -0
- package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +3 -3
- package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +5 -6
- package/src/components/Business/BsLayouts/utils.tsx +1 -24
- package/src/components/Business/JsonQueryTable/index.tsx +11 -11
- package/src/components/Business/SearchSelect/BusinessUtils.ts +2 -2
- package/src/components/Functional/AddSelect/index.tsx +36 -2
- package/src/utils/LocalstorageUtils.ts +33 -1
- package/src/utils/index.ts +1 -0
- package/src/utils/requestUtils.ts +5 -7
|
@@ -4,10 +4,6 @@
|
|
|
4
4
|
export declare const matchPath: (pathname: any, options: {} | undefined, pathToRegexp: any) => never;
|
|
5
5
|
export declare const searchMenuData: (router: any, name?: any, callBack: any) => void;
|
|
6
6
|
export declare const setMenuTreeData: (routesData: Array<any>) => void;
|
|
7
|
-
export declare function handleUserID(): any;
|
|
8
|
-
export declare function handleAccountID(): any;
|
|
9
|
-
export declare function handleUserName(): any;
|
|
10
|
-
export declare function handleUserPhone(): any;
|
|
11
7
|
export declare const setLoginOutPath: () => void;
|
|
12
8
|
export declare const getBreadcrumbNameMap: (menuData: any) => {};
|
|
13
9
|
export declare const ergodicMenuRoutes: (routes: any) => any[];
|
package/dist/index.esm.js
CHANGED
|
@@ -37,6 +37,7 @@ var ENUM = {
|
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
+
var resposne = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}');
|
|
40
41
|
// 存储表头
|
|
41
42
|
var setConfigTableColumns = function setConfigTableColumns(configvalue, tableCode) {
|
|
42
43
|
var config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
|
|
@@ -68,10 +69,42 @@ var getConfigTableColumns = function getConfigTableColumns(tableCode) {
|
|
|
68
69
|
return [];
|
|
69
70
|
};
|
|
70
71
|
var getCurrentTenantId = function getCurrentTenantId() {
|
|
71
|
-
return localStorage.getItem('current_tenant_id') ||
|
|
72
|
+
return localStorage.getItem('current_tenant_id') || 1;
|
|
72
73
|
};
|
|
74
|
+
function getEmployeeId() {
|
|
75
|
+
var _resposne$employeeRes;
|
|
76
|
+
return (resposne === null || resposne === void 0 ? void 0 : (_resposne$employeeRes = resposne.employeeResVo) === null || _resposne$employeeRes === void 0 ? void 0 : _resposne$employeeRes.id) || 2;
|
|
77
|
+
}
|
|
78
|
+
function getEmployeeCode() {
|
|
79
|
+
var _resposne$employeeRes2;
|
|
80
|
+
return resposne === null || resposne === void 0 ? void 0 : (_resposne$employeeRes2 = resposne.employeeResVo) === null || _resposne$employeeRes2 === void 0 ? void 0 : _resposne$employeeRes2.employeeNumber;
|
|
81
|
+
}
|
|
82
|
+
function getSessionId() {
|
|
83
|
+
return (resposne === null || resposne === void 0 ? void 0 : resposne.sessionId) || '';
|
|
84
|
+
}
|
|
85
|
+
function getAccountId() {
|
|
86
|
+
var _resposne$accountPers;
|
|
87
|
+
return (resposne === null || resposne === void 0 ? void 0 : (_resposne$accountPers = resposne.accountPersonDetail) === null || _resposne$accountPers === void 0 ? void 0 : _resposne$accountPers.accountId) || -1;
|
|
88
|
+
}
|
|
89
|
+
function getUserId() {
|
|
90
|
+
var _resposne$accountPers2;
|
|
91
|
+
return (_resposne$accountPers2 = resposne.accountPersonDetail) === null || _resposne$accountPers2 === void 0 ? void 0 : _resposne$accountPers2.username;
|
|
92
|
+
}
|
|
93
|
+
function getAccountID() {
|
|
94
|
+
var _resposne$accountPers3;
|
|
95
|
+
return resposne === null || resposne === void 0 ? void 0 : (_resposne$accountPers3 = resposne.accountPersonDetail) === null || _resposne$accountPers3 === void 0 ? void 0 : _resposne$accountPers3.id;
|
|
96
|
+
}
|
|
97
|
+
function getUserName() {
|
|
98
|
+
var _resposne$accountPers4;
|
|
99
|
+
return resposne === null || resposne === void 0 ? void 0 : (_resposne$accountPers4 = resposne.accountPersonDetail) === null || _resposne$accountPers4 === void 0 ? void 0 : _resposne$accountPers4.employeeName;
|
|
100
|
+
}
|
|
101
|
+
function handleUserPhone() {
|
|
102
|
+
var _resposne$person;
|
|
103
|
+
var str = (resposne === null || resposne === void 0 ? void 0 : (_resposne$person = resposne.person) === null || _resposne$person === void 0 ? void 0 : _resposne$person.phone) || '';
|
|
104
|
+
var enStr = str && str.slice(0, 3) + '****' + str.slice(str.length - 4);
|
|
105
|
+
return enStr;
|
|
106
|
+
}
|
|
73
107
|
|
|
74
|
-
var resposne = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}');
|
|
75
108
|
function handleRequestAuthHeader(config) {
|
|
76
109
|
var _config$url, _config$url2;
|
|
77
110
|
// https://www.kdocs.cn/l/coNbPpjamr5v这个表格里面涉及的接口,接口请求头里需要添加参数:x-biz-code 值就是列表里的code
|
|
@@ -87,11 +120,10 @@ function handleRequestAuthHeader(config) {
|
|
|
87
120
|
}
|
|
88
121
|
// 处理请求头
|
|
89
122
|
var handleRequestHeader = function handleRequestHeader(config) {
|
|
90
|
-
|
|
91
|
-
config.headers['
|
|
92
|
-
config.headers['x-
|
|
93
|
-
config.headers['x-
|
|
94
|
-
config.headers['x-tenant-id'] = getCurrentTenantId() || 1;
|
|
123
|
+
config.headers['sso-sessionid'] = getSessionId();
|
|
124
|
+
config.headers['x-account-id'] = getAccountId();
|
|
125
|
+
config.headers['x-employee-id'] = getEmployeeId();
|
|
126
|
+
config.headers['x-tenant-id'] = getCurrentTenantId();
|
|
95
127
|
if (localStorage.getItem('x-user-auth-context')) {
|
|
96
128
|
config.headers['x-user-auth-context'] = localStorage.getItem('x-user-auth-context');
|
|
97
129
|
}
|
|
@@ -9872,6 +9904,11 @@ var formatTreeDataSource = function formatTreeDataSource(reData, position, chang
|
|
|
9872
9904
|
}) || [];
|
|
9873
9905
|
changeSearchForm[changePosition].field.props.treeData = formatData;
|
|
9874
9906
|
};
|
|
9907
|
+
var initTableCode = {
|
|
9908
|
+
'sku': ['skuSelect-tableOptionsToChoosePartCode', 'skuSelect-tableSelectedItemPartCode'],
|
|
9909
|
+
'skc': ['skcSelect-tableOptionsToChoosePartCode', 'skcSelect-tableSelectedItemPartCode'],
|
|
9910
|
+
'spu': [['spuSelect-tableOptionsToChoosePartCode', 'spuSelect-tableSelectedItemPartCode']]
|
|
9911
|
+
};
|
|
9875
9912
|
var Option$1 = Select.Option;
|
|
9876
9913
|
var AddSelect = function AddSelect(props) {
|
|
9877
9914
|
var value = props.value,
|
|
@@ -10050,8 +10087,8 @@ var AddSelect = function AddSelect(props) {
|
|
|
10050
10087
|
_useState46 = _slicedToArray(_useState45, 2),
|
|
10051
10088
|
showToChooseColumns = _useState46[0],
|
|
10052
10089
|
setShowToChooseColumns = _useState46[1];
|
|
10053
|
-
var codeToChoose = tableCodeList[0] ||
|
|
10054
|
-
var codeSelected = tableCodeList[1] ||
|
|
10090
|
+
var codeToChoose = tableCodeList[0] || initTableCode[businessType][0];
|
|
10091
|
+
var codeSelected = tableCodeList[1] || initTableCode[businessType][1];
|
|
10055
10092
|
useEffect(function () {
|
|
10056
10093
|
setTableColumns(modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableColumns);
|
|
10057
10094
|
}, [modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableColumns]);
|
|
@@ -10482,6 +10519,28 @@ var AddSelect = function AddSelect(props) {
|
|
|
10482
10519
|
formatSource(x, 3, 6, tableSearchForm, ['id', 'name']);
|
|
10483
10520
|
});
|
|
10484
10521
|
}
|
|
10522
|
+
if (businessType == 'spu') {
|
|
10523
|
+
Promise.all([loadSelectSource("/user/orgViewNode/listNoPage", {
|
|
10524
|
+
'qp-employeeId-eq': getEmployeeId(),
|
|
10525
|
+
'qp-orgViewCode-eq': 'business-organizational-view',
|
|
10526
|
+
'ctl-withDefaultOrg': true
|
|
10527
|
+
}), loadSelectSource("/items/brand/queryBrandList", {
|
|
10528
|
+
pageSize: 5000,
|
|
10529
|
+
currentPage: 1,
|
|
10530
|
+
'ctl-withAuth': true
|
|
10531
|
+
}), loadSelectSource("/items/category/queryCategoryTree", {
|
|
10532
|
+
pageSize: 5000,
|
|
10533
|
+
currentPage: 1
|
|
10534
|
+
}), loadSelectSource("/items/class/withProperty", {
|
|
10535
|
+
pageSize: 5000,
|
|
10536
|
+
currentPage: 1
|
|
10537
|
+
})]).then(function (x) {
|
|
10538
|
+
formatSource(x, 0, 2, tableSearchForm, ['targetId', 'name']);
|
|
10539
|
+
formatSource(x, 1, 3, tableSearchForm, ['id', 'name']);
|
|
10540
|
+
formatTreeDataSource(x, 2, 4, tableSearchForm);
|
|
10541
|
+
formatSource(x, 3, 5, tableSearchForm, ['id', 'name']);
|
|
10542
|
+
});
|
|
10543
|
+
}
|
|
10485
10544
|
}, [businessType]);
|
|
10486
10545
|
useEffect(function () {
|
|
10487
10546
|
if (value) {
|
|
@@ -13469,7 +13528,6 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
13469
13528
|
}, modalTableBusProps);
|
|
13470
13529
|
}
|
|
13471
13530
|
if (type === 'shopFile2') {
|
|
13472
|
-
var _JSON$parse, _JSON$parse$employeeR;
|
|
13473
13531
|
requestConfig = _objectSpread2({
|
|
13474
13532
|
url: "".concat(prefixUrl.selectPrefix, "/store/page"),
|
|
13475
13533
|
filter: 'qp-name,code-orGroup,like',
|
|
@@ -13512,7 +13570,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
13512
13570
|
}
|
|
13513
13571
|
}];
|
|
13514
13572
|
Promise.all([loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/orgView/getTree/sales-organizational-view"), {
|
|
13515
|
-
'qp-employeeCode-eq': (
|
|
13573
|
+
'qp-employeeCode-eq': getEmployeeCode(),
|
|
13516
13574
|
'qp-realOrg-eq': true,
|
|
13517
13575
|
'qp-status-eq': 10
|
|
13518
13576
|
})]).then(function (x) {
|
|
@@ -14010,6 +14068,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
|
|
|
14010
14068
|
_useState2 = _slicedToArray(_useState, 2),
|
|
14011
14069
|
value = _useState2[0],
|
|
14012
14070
|
setValue = _useState2[1];
|
|
14071
|
+
//注⚠️:自定义过表头的请记得传tableCodeList参数
|
|
14013
14072
|
var initialSelectColumn = [{
|
|
14014
14073
|
title: 'SKU编码',
|
|
14015
14074
|
width: 150,
|
|
@@ -14347,6 +14406,7 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
|
|
|
14347
14406
|
setPropertyList(data);
|
|
14348
14407
|
}).catch(function (err) {});
|
|
14349
14408
|
}, []);
|
|
14409
|
+
//注⚠️:自定义过表头的请记得传tableCodeList参数
|
|
14350
14410
|
var initialSelectColumn = [{
|
|
14351
14411
|
title: 'SKC编码',
|
|
14352
14412
|
width: 150,
|
|
@@ -14597,6 +14657,250 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
|
|
|
14597
14657
|
modalTableProps: modalTableProps
|
|
14598
14658
|
})));
|
|
14599
14659
|
};
|
|
14660
|
+
var AddSpuSelect = function AddSpuSelect(parProps) {
|
|
14661
|
+
var selectProps = {
|
|
14662
|
+
mode: 'multiple'
|
|
14663
|
+
};
|
|
14664
|
+
var _useState7 = useState((selectProps === null || selectProps === void 0 ? void 0 : selectProps.mode) ? [] : null),
|
|
14665
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
14666
|
+
value = _useState8[0],
|
|
14667
|
+
setValue = _useState8[1];
|
|
14668
|
+
//注⚠️:自定义过表头的请记得传tableCodeList参数
|
|
14669
|
+
var initialSelectColumn = [{
|
|
14670
|
+
title: '商品编码',
|
|
14671
|
+
width: 150,
|
|
14672
|
+
dataIndex: 'itemCode'
|
|
14673
|
+
}, {
|
|
14674
|
+
title: '商品名称',
|
|
14675
|
+
width: 200,
|
|
14676
|
+
ellipsis: {
|
|
14677
|
+
showTitle: false
|
|
14678
|
+
},
|
|
14679
|
+
render: function render(text) {
|
|
14680
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
14681
|
+
placement: "topLeft",
|
|
14682
|
+
title: text
|
|
14683
|
+
}, text);
|
|
14684
|
+
},
|
|
14685
|
+
dataIndex: 'name'
|
|
14686
|
+
}, {
|
|
14687
|
+
title: '数量',
|
|
14688
|
+
width: 100,
|
|
14689
|
+
isInputItem: true,
|
|
14690
|
+
dataIndex: 'count'
|
|
14691
|
+
}, {
|
|
14692
|
+
title: '所属组织',
|
|
14693
|
+
dataIndex: 'ownOrgSignName'
|
|
14694
|
+
}, {
|
|
14695
|
+
title: '品牌',
|
|
14696
|
+
dataIndex: 'brandName'
|
|
14697
|
+
}, {
|
|
14698
|
+
title: '类目',
|
|
14699
|
+
dataIndex: 'categoryText'
|
|
14700
|
+
}, {
|
|
14701
|
+
title: '品类',
|
|
14702
|
+
dataIndex: 'className'
|
|
14703
|
+
}];
|
|
14704
|
+
var mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps);
|
|
14705
|
+
var props = {
|
|
14706
|
+
buttonText: parProps.buttonText || '新增',
|
|
14707
|
+
buttonProps: parProps.buttonProps || {},
|
|
14708
|
+
tableCodeList: parProps.tableCodeList || [],
|
|
14709
|
+
value: value,
|
|
14710
|
+
// labelInValue: true, // 非必填 默认为false
|
|
14711
|
+
requestConfig: _objectSpread2({
|
|
14712
|
+
url: "/items/item",
|
|
14713
|
+
filter: 'qp-itemCode,name-orGroup,like',
|
|
14714
|
+
otherParams: {
|
|
14715
|
+
'qp-approveStatus-eq': 1,
|
|
14716
|
+
sorter: 'desc-id'
|
|
14717
|
+
},
|
|
14718
|
+
mappingTextField: 'name',
|
|
14719
|
+
mappingValueField: 'itemCode'
|
|
14720
|
+
}, parProps.requestConfig),
|
|
14721
|
+
selectProps: selectProps,
|
|
14722
|
+
onChange: function onChange(value) {
|
|
14723
|
+
console.log(value);
|
|
14724
|
+
setValue(value);
|
|
14725
|
+
},
|
|
14726
|
+
beforeShowModal: parProps === null || parProps === void 0 ? void 0 : parProps.beforeShowModal,
|
|
14727
|
+
onSaveCallback: parProps.onSaveCallback,
|
|
14728
|
+
businessType: 'spu'
|
|
14729
|
+
// onSaveCallback: (rows) => {
|
|
14730
|
+
// console.log('save call', rows);
|
|
14731
|
+
// // return Promise.resolve(true);
|
|
14732
|
+
// // return Promise.reject('FAILE')
|
|
14733
|
+
// }
|
|
14734
|
+
};
|
|
14735
|
+
|
|
14736
|
+
var modalTableProps = {
|
|
14737
|
+
modalTableTitle: '选择商品',
|
|
14738
|
+
tableSearchForm: [{
|
|
14739
|
+
name: 'qp-itemCode-like',
|
|
14740
|
+
label: '商品编码'
|
|
14741
|
+
}, {
|
|
14742
|
+
name: 'qp-name-like',
|
|
14743
|
+
label: '商品名称'
|
|
14744
|
+
}, {
|
|
14745
|
+
name: 'qp-ownOrgSign-in',
|
|
14746
|
+
type: 'select',
|
|
14747
|
+
label: '所属组织',
|
|
14748
|
+
field: {
|
|
14749
|
+
type: 'select',
|
|
14750
|
+
props: {
|
|
14751
|
+
mode: 'multiple',
|
|
14752
|
+
notFoundContent: '暂无数据',
|
|
14753
|
+
allowClear: true,
|
|
14754
|
+
showSearch: true,
|
|
14755
|
+
showArrow: true,
|
|
14756
|
+
maxTagCount: 1,
|
|
14757
|
+
optionFilterProp: 'children',
|
|
14758
|
+
filterOption: function filterOption(input, option) {
|
|
14759
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
14760
|
+
}
|
|
14761
|
+
}
|
|
14762
|
+
}
|
|
14763
|
+
}, {
|
|
14764
|
+
name: 'qp-brandId-in',
|
|
14765
|
+
type: 'select',
|
|
14766
|
+
label: '品牌',
|
|
14767
|
+
field: {
|
|
14768
|
+
type: 'select',
|
|
14769
|
+
props: {
|
|
14770
|
+
mode: 'multiple',
|
|
14771
|
+
notFoundContent: '暂无数据',
|
|
14772
|
+
allowClear: true,
|
|
14773
|
+
showSearch: true,
|
|
14774
|
+
showArrow: true,
|
|
14775
|
+
maxTagCount: 1,
|
|
14776
|
+
optionFilterProp: 'children',
|
|
14777
|
+
filterOption: function filterOption(input, option) {
|
|
14778
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
14779
|
+
}
|
|
14780
|
+
}
|
|
14781
|
+
}
|
|
14782
|
+
}, {
|
|
14783
|
+
name: 'qp-categoryId-in',
|
|
14784
|
+
type: 'treeSelect',
|
|
14785
|
+
label: '类目',
|
|
14786
|
+
field: {
|
|
14787
|
+
type: 'treeSelect',
|
|
14788
|
+
props: {
|
|
14789
|
+
treeData: [],
|
|
14790
|
+
treeCheckable: true,
|
|
14791
|
+
showSearch: true,
|
|
14792
|
+
allowClear: true,
|
|
14793
|
+
showArrow: true,
|
|
14794
|
+
treeNodeFilterProp: 'title',
|
|
14795
|
+
treeDefaultExpandAll: true,
|
|
14796
|
+
maxTagCount: 1,
|
|
14797
|
+
placeholder: '请选择',
|
|
14798
|
+
style: {
|
|
14799
|
+
width: '100%'
|
|
14800
|
+
},
|
|
14801
|
+
dropdownStyle: {
|
|
14802
|
+
maxHeight: 400,
|
|
14803
|
+
maxWidth: 100,
|
|
14804
|
+
overflow: 'auto'
|
|
14805
|
+
}
|
|
14806
|
+
}
|
|
14807
|
+
}
|
|
14808
|
+
}, {
|
|
14809
|
+
name: 'qp-classId-in',
|
|
14810
|
+
type: 'select',
|
|
14811
|
+
label: '品类',
|
|
14812
|
+
field: {
|
|
14813
|
+
type: 'select',
|
|
14814
|
+
props: {
|
|
14815
|
+
mode: 'multiple',
|
|
14816
|
+
notFoundContent: '暂无数据',
|
|
14817
|
+
allowClear: true,
|
|
14818
|
+
showSearch: true,
|
|
14819
|
+
showArrow: true,
|
|
14820
|
+
maxTagCount: 1,
|
|
14821
|
+
optionFilterProp: 'children',
|
|
14822
|
+
filterOption: function filterOption(input, option) {
|
|
14823
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
14824
|
+
}
|
|
14825
|
+
}
|
|
14826
|
+
}
|
|
14827
|
+
}],
|
|
14828
|
+
tableColumns: [{
|
|
14829
|
+
title: '商品编码',
|
|
14830
|
+
width: 150,
|
|
14831
|
+
dataIndex: 'itemCode'
|
|
14832
|
+
}, {
|
|
14833
|
+
title: '商品名称',
|
|
14834
|
+
width: 200,
|
|
14835
|
+
ellipsis: {
|
|
14836
|
+
showTitle: false
|
|
14837
|
+
},
|
|
14838
|
+
render: function render(text) {
|
|
14839
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
14840
|
+
placement: "topLeft",
|
|
14841
|
+
title: text
|
|
14842
|
+
}, text);
|
|
14843
|
+
},
|
|
14844
|
+
dataIndex: 'name'
|
|
14845
|
+
}, {
|
|
14846
|
+
title: '所属组织',
|
|
14847
|
+
width: 100,
|
|
14848
|
+
ellipsis: {
|
|
14849
|
+
showTitle: false
|
|
14850
|
+
},
|
|
14851
|
+
render: function render(text) {
|
|
14852
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
14853
|
+
placement: "topLeft",
|
|
14854
|
+
title: text
|
|
14855
|
+
}, text);
|
|
14856
|
+
},
|
|
14857
|
+
dataIndex: 'ownOrgSignName'
|
|
14858
|
+
}, {
|
|
14859
|
+
title: '品牌',
|
|
14860
|
+
width: 100,
|
|
14861
|
+
ellipsis: {
|
|
14862
|
+
showTitle: false
|
|
14863
|
+
},
|
|
14864
|
+
render: function render(text) {
|
|
14865
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
14866
|
+
placement: "topLeft",
|
|
14867
|
+
title: text
|
|
14868
|
+
}, text);
|
|
14869
|
+
},
|
|
14870
|
+
dataIndex: 'brandName'
|
|
14871
|
+
}, {
|
|
14872
|
+
title: '类目',
|
|
14873
|
+
width: 100,
|
|
14874
|
+
ellipsis: {
|
|
14875
|
+
showTitle: false
|
|
14876
|
+
},
|
|
14877
|
+
render: function render(text) {
|
|
14878
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
14879
|
+
placement: "topLeft",
|
|
14880
|
+
title: text
|
|
14881
|
+
}, text);
|
|
14882
|
+
},
|
|
14883
|
+
dataIndex: 'categoryName'
|
|
14884
|
+
}, {
|
|
14885
|
+
title: '品类',
|
|
14886
|
+
width: 100,
|
|
14887
|
+
ellipsis: {
|
|
14888
|
+
showTitle: false
|
|
14889
|
+
},
|
|
14890
|
+
render: function render(text) {
|
|
14891
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
14892
|
+
placement: "topLeft",
|
|
14893
|
+
title: text
|
|
14894
|
+
}, text);
|
|
14895
|
+
},
|
|
14896
|
+
dataIndex: 'className'
|
|
14897
|
+
}],
|
|
14898
|
+
selectColumn: mTpSelectColumn
|
|
14899
|
+
};
|
|
14900
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(AddSelect, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
14901
|
+
modalTableProps: modalTableProps
|
|
14902
|
+
})));
|
|
14903
|
+
};
|
|
14600
14904
|
|
|
14601
14905
|
var CommodityEntry = function CommodityEntry(props) {
|
|
14602
14906
|
var dataValidationRef = useRef();
|
|
@@ -18515,24 +18819,6 @@ var setMenuTreeData = function setMenuTreeData(routesData) {
|
|
|
18515
18819
|
if (_ret === "continue") continue;
|
|
18516
18820
|
}
|
|
18517
18821
|
};
|
|
18518
|
-
function handleUserID() {
|
|
18519
|
-
var _JSON$parse, _JSON$parse$accountPe;
|
|
18520
|
-
return (_JSON$parse = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}')) === null || _JSON$parse === void 0 ? void 0 : (_JSON$parse$accountPe = _JSON$parse.accountPersonDetail) === null || _JSON$parse$accountPe === void 0 ? void 0 : _JSON$parse$accountPe.username;
|
|
18521
|
-
}
|
|
18522
|
-
function handleAccountID() {
|
|
18523
|
-
var _JSON$parse2, _JSON$parse2$accountP;
|
|
18524
|
-
return (_JSON$parse2 = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}')) === null || _JSON$parse2 === void 0 ? void 0 : (_JSON$parse2$accountP = _JSON$parse2.accountPersonDetail) === null || _JSON$parse2$accountP === void 0 ? void 0 : _JSON$parse2$accountP.id;
|
|
18525
|
-
}
|
|
18526
|
-
function handleUserName() {
|
|
18527
|
-
var _JSON$parse3, _JSON$parse3$accountP;
|
|
18528
|
-
return (_JSON$parse3 = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}')) === null || _JSON$parse3 === void 0 ? void 0 : (_JSON$parse3$accountP = _JSON$parse3.accountPersonDetail) === null || _JSON$parse3$accountP === void 0 ? void 0 : _JSON$parse3$accountP.employeeName;
|
|
18529
|
-
}
|
|
18530
|
-
function handleUserPhone() {
|
|
18531
|
-
var _JSON$parse4, _JSON$parse4$accountP, _JSON$parse4$accountP2;
|
|
18532
|
-
var str = ((_JSON$parse4 = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}')) === null || _JSON$parse4 === void 0 ? void 0 : (_JSON$parse4$accountP = _JSON$parse4.accountPersonDetail) === null || _JSON$parse4$accountP === void 0 ? void 0 : (_JSON$parse4$accountP2 = _JSON$parse4$accountP.person) === null || _JSON$parse4$accountP2 === void 0 ? void 0 : _JSON$parse4$accountP2.phone) || '';
|
|
18533
|
-
var enStr = str && str.slice(0, 3) + '****' + str.slice(str.length - 4);
|
|
18534
|
-
return enStr;
|
|
18535
|
-
}
|
|
18536
18822
|
var setLoginOutPath = function setLoginOutPath() {
|
|
18537
18823
|
if (window.__POWERED_BY_WUJIE__) {
|
|
18538
18824
|
var _window$$wujie;
|
|
@@ -18919,7 +19205,7 @@ var LoginModal = (function (props) {
|
|
|
18919
19205
|
onClick: function onClick() {
|
|
18920
19206
|
form.validateFields().then(function (res) {
|
|
18921
19207
|
axios({
|
|
18922
|
-
url: "/bop/api/account/changePassWord/".concat(
|
|
19208
|
+
url: "/bop/api/account/changePassWord/".concat(getAccountID()),
|
|
18923
19209
|
method: 'patch',
|
|
18924
19210
|
params: res
|
|
18925
19211
|
}).then(function (res) {
|
|
@@ -18939,7 +19225,7 @@ var LoginModal = (function (props) {
|
|
|
18939
19225
|
span: 20
|
|
18940
19226
|
},
|
|
18941
19227
|
initialValues: {
|
|
18942
|
-
username:
|
|
19228
|
+
username: getUserId()
|
|
18943
19229
|
}
|
|
18944
19230
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
18945
19231
|
label: "\u8D26\u53F7",
|
|
@@ -19021,21 +19307,20 @@ var GlobalHeaderRight = function GlobalHeaderRight(_ref) {
|
|
|
19021
19307
|
};
|
|
19022
19308
|
var loginOut = /*#__PURE__*/function () {
|
|
19023
19309
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
19024
|
-
var
|
|
19310
|
+
var sessionId;
|
|
19025
19311
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
19026
19312
|
while (1) {
|
|
19027
19313
|
switch (_context.prev = _context.next) {
|
|
19028
19314
|
case 0:
|
|
19029
19315
|
_context.next = 2;
|
|
19030
|
-
return
|
|
19316
|
+
return getSessionId();
|
|
19031
19317
|
case 2:
|
|
19032
|
-
|
|
19033
|
-
|
|
19034
|
-
_context.next = 6;
|
|
19318
|
+
sessionId = _context.sent;
|
|
19319
|
+
_context.next = 5;
|
|
19035
19320
|
return outLogin({
|
|
19036
19321
|
sessionId: sessionId
|
|
19037
19322
|
});
|
|
19038
|
-
case
|
|
19323
|
+
case 5:
|
|
19039
19324
|
// @ts-ignore
|
|
19040
19325
|
if (BUILD_TYPE) {
|
|
19041
19326
|
message.success('退出登录成功');
|
|
@@ -19045,7 +19330,7 @@ var GlobalHeaderRight = function GlobalHeaderRight(_ref) {
|
|
|
19045
19330
|
} else {
|
|
19046
19331
|
setLoginOutPath();
|
|
19047
19332
|
}
|
|
19048
|
-
case
|
|
19333
|
+
case 6:
|
|
19049
19334
|
case "end":
|
|
19050
19335
|
return _context.stop();
|
|
19051
19336
|
}
|
|
@@ -19070,7 +19355,7 @@ var GlobalHeaderRight = function GlobalHeaderRight(_ref) {
|
|
|
19070
19355
|
src: Morentouxiang32
|
|
19071
19356
|
})), /*#__PURE__*/React.createElement("div", {
|
|
19072
19357
|
className: 'userDownTopC'
|
|
19073
|
-
},
|
|
19358
|
+
}, getUserName()), /*#__PURE__*/React.createElement("div", {
|
|
19074
19359
|
className: 'userDownTopB'
|
|
19075
19360
|
}, handleUserPhone())), /*#__PURE__*/React.createElement("div", {
|
|
19076
19361
|
className: 'userDownB'
|
|
@@ -19105,7 +19390,7 @@ var GlobalHeaderRight = function GlobalHeaderRight(_ref) {
|
|
|
19105
19390
|
className: 'rcom_c'
|
|
19106
19391
|
}, /*#__PURE__*/React.createElement("div", {
|
|
19107
19392
|
className: 'rcom_ct'
|
|
19108
|
-
},
|
|
19393
|
+
}, getUserName()), /*#__PURE__*/React.createElement("div", {
|
|
19109
19394
|
className: 'rcom_cb'
|
|
19110
19395
|
}, handleUserPhone())), /*#__PURE__*/React.createElement("div", {
|
|
19111
19396
|
className: 'rcom_r'
|
|
@@ -30326,8 +30611,7 @@ function hanleCallbackValue(codeProps, value, customerFields) {
|
|
|
30326
30611
|
return newCodeProps;
|
|
30327
30612
|
}
|
|
30328
30613
|
function isAdmin() {
|
|
30329
|
-
var
|
|
30330
|
-
var username = (_JSON$parse = JSON.parse(localStorage.getItem('userInfo') || '{}')) === null || _JSON$parse === void 0 ? void 0 : (_JSON$parse$accountPe = _JSON$parse.accountPersonDetail) === null || _JSON$parse$accountPe === void 0 ? void 0 : _JSON$parse$accountPe.username;
|
|
30614
|
+
var username = getUserId();
|
|
30331
30615
|
return username === 'admin' || username === 'uiuiui';
|
|
30332
30616
|
}
|
|
30333
30617
|
var JsonQueryTable = /*#__PURE__*/React.memo(function (props) {
|
|
@@ -30456,4 +30740,4 @@ var JsonQueryTable = /*#__PURE__*/React.memo(function (props) {
|
|
|
30456
30740
|
}, "setting"));
|
|
30457
30741
|
});
|
|
30458
30742
|
|
|
30459
|
-
export { AddSelect, AddSkcSelect, AddSkuSelect, BillEntry, index$5 as BsLayout, BsSulaQueryTable, BusinessSearchSelect$1 as BusinessSearchSelect, index$1 as BusinessTreeSearchSelect, index as CheckOneUser, ColumnSettingTable, CommodityEntry, DataImport, DataValidation, index$3 as DetailPageWrapper, ExportIcon, GuideWrapper, index$4 as HomePageWrapper, JsonQueryTable, index$6 as MoreTreeTable, QueryMutipleInput, SearchSelect, index$2 as StateFlow, ColumnSettingSulaTable as SulaColumnSettingTable, TableColumnSetting, TreeSearchSelect };
|
|
30743
|
+
export { AddSelect, AddSkcSelect, AddSkuSelect, AddSpuSelect, BillEntry, index$5 as BsLayout, BsSulaQueryTable, BusinessSearchSelect$1 as BusinessSearchSelect, index$1 as BusinessTreeSearchSelect, index as CheckOneUser, ColumnSettingTable, CommodityEntry, DataImport, DataValidation, index$3 as DetailPageWrapper, ExportIcon, GuideWrapper, index$4 as HomePageWrapper, JsonQueryTable, index$6 as MoreTreeTable, QueryMutipleInput, SearchSelect, index$2 as StateFlow, ColumnSettingSulaTable as SulaColumnSettingTable, TableColumnSetting, TreeSearchSelect };
|