@bit-sun/business-component 2.2.14 → 2.2.16
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 +332 -44
- package/dist/index.js +332 -43
- 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 +41 -3
- 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) {
|
|
@@ -10563,7 +10622,11 @@ var AddSelect = function AddSelect(props) {
|
|
|
10563
10622
|
}
|
|
10564
10623
|
handleLoading(isContinue, false);
|
|
10565
10624
|
}).catch(function (Error) {
|
|
10566
|
-
|
|
10625
|
+
if (_typeof(Error) === 'object') {
|
|
10626
|
+
!Error.needThrowError ? null : message.error(Error.message);
|
|
10627
|
+
} else {
|
|
10628
|
+
message.error(Error);
|
|
10629
|
+
}
|
|
10567
10630
|
handleLoading(isContinue, false);
|
|
10568
10631
|
});
|
|
10569
10632
|
} else {
|
|
@@ -13469,7 +13532,6 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
13469
13532
|
}, modalTableBusProps);
|
|
13470
13533
|
}
|
|
13471
13534
|
if (type === 'shopFile2') {
|
|
13472
|
-
var _JSON$parse, _JSON$parse$employeeR;
|
|
13473
13535
|
requestConfig = _objectSpread2({
|
|
13474
13536
|
url: "".concat(prefixUrl.selectPrefix, "/store/page"),
|
|
13475
13537
|
filter: 'qp-name,code-orGroup,like',
|
|
@@ -13512,7 +13574,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
13512
13574
|
}
|
|
13513
13575
|
}];
|
|
13514
13576
|
Promise.all([loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/orgView/getTree/sales-organizational-view"), {
|
|
13515
|
-
'qp-employeeCode-eq': (
|
|
13577
|
+
'qp-employeeCode-eq': getEmployeeCode(),
|
|
13516
13578
|
'qp-realOrg-eq': true,
|
|
13517
13579
|
'qp-status-eq': 10
|
|
13518
13580
|
})]).then(function (x) {
|
|
@@ -14010,6 +14072,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
|
|
|
14010
14072
|
_useState2 = _slicedToArray(_useState, 2),
|
|
14011
14073
|
value = _useState2[0],
|
|
14012
14074
|
setValue = _useState2[1];
|
|
14075
|
+
//注⚠️:自定义过表头的请记得传tableCodeList参数
|
|
14013
14076
|
var initialSelectColumn = [{
|
|
14014
14077
|
title: 'SKU编码',
|
|
14015
14078
|
width: 150,
|
|
@@ -14347,6 +14410,7 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
|
|
|
14347
14410
|
setPropertyList(data);
|
|
14348
14411
|
}).catch(function (err) {});
|
|
14349
14412
|
}, []);
|
|
14413
|
+
//注⚠️:自定义过表头的请记得传tableCodeList参数
|
|
14350
14414
|
var initialSelectColumn = [{
|
|
14351
14415
|
title: 'SKC编码',
|
|
14352
14416
|
width: 150,
|
|
@@ -14597,6 +14661,250 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
|
|
|
14597
14661
|
modalTableProps: modalTableProps
|
|
14598
14662
|
})));
|
|
14599
14663
|
};
|
|
14664
|
+
var AddSpuSelect = function AddSpuSelect(parProps) {
|
|
14665
|
+
var selectProps = {
|
|
14666
|
+
mode: 'multiple'
|
|
14667
|
+
};
|
|
14668
|
+
var _useState7 = useState((selectProps === null || selectProps === void 0 ? void 0 : selectProps.mode) ? [] : null),
|
|
14669
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
14670
|
+
value = _useState8[0],
|
|
14671
|
+
setValue = _useState8[1];
|
|
14672
|
+
//注⚠️:自定义过表头的请记得传tableCodeList参数
|
|
14673
|
+
var initialSelectColumn = [{
|
|
14674
|
+
title: '商品编码',
|
|
14675
|
+
width: 150,
|
|
14676
|
+
dataIndex: 'itemCode'
|
|
14677
|
+
}, {
|
|
14678
|
+
title: '商品名称',
|
|
14679
|
+
width: 200,
|
|
14680
|
+
ellipsis: {
|
|
14681
|
+
showTitle: false
|
|
14682
|
+
},
|
|
14683
|
+
render: function render(text) {
|
|
14684
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
14685
|
+
placement: "topLeft",
|
|
14686
|
+
title: text
|
|
14687
|
+
}, text);
|
|
14688
|
+
},
|
|
14689
|
+
dataIndex: 'name'
|
|
14690
|
+
}, {
|
|
14691
|
+
title: '数量',
|
|
14692
|
+
width: 100,
|
|
14693
|
+
isInputItem: true,
|
|
14694
|
+
dataIndex: 'count'
|
|
14695
|
+
}, {
|
|
14696
|
+
title: '所属组织',
|
|
14697
|
+
dataIndex: 'ownOrgSignName'
|
|
14698
|
+
}, {
|
|
14699
|
+
title: '品牌',
|
|
14700
|
+
dataIndex: 'brandName'
|
|
14701
|
+
}, {
|
|
14702
|
+
title: '类目',
|
|
14703
|
+
dataIndex: 'categoryText'
|
|
14704
|
+
}, {
|
|
14705
|
+
title: '品类',
|
|
14706
|
+
dataIndex: 'className'
|
|
14707
|
+
}];
|
|
14708
|
+
var mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps);
|
|
14709
|
+
var props = {
|
|
14710
|
+
buttonText: parProps.buttonText || '新增',
|
|
14711
|
+
buttonProps: parProps.buttonProps || {},
|
|
14712
|
+
tableCodeList: parProps.tableCodeList || [],
|
|
14713
|
+
value: value,
|
|
14714
|
+
// labelInValue: true, // 非必填 默认为false
|
|
14715
|
+
requestConfig: _objectSpread2({
|
|
14716
|
+
url: "/items/item",
|
|
14717
|
+
filter: 'qp-itemCode,name-orGroup,like',
|
|
14718
|
+
otherParams: {
|
|
14719
|
+
'qp-approveStatus-eq': 1,
|
|
14720
|
+
sorter: 'desc-id'
|
|
14721
|
+
},
|
|
14722
|
+
mappingTextField: 'name',
|
|
14723
|
+
mappingValueField: 'itemCode'
|
|
14724
|
+
}, parProps.requestConfig),
|
|
14725
|
+
selectProps: selectProps,
|
|
14726
|
+
onChange: function onChange(value) {
|
|
14727
|
+
console.log(value);
|
|
14728
|
+
setValue(value);
|
|
14729
|
+
},
|
|
14730
|
+
beforeShowModal: parProps === null || parProps === void 0 ? void 0 : parProps.beforeShowModal,
|
|
14731
|
+
onSaveCallback: parProps.onSaveCallback,
|
|
14732
|
+
businessType: 'spu'
|
|
14733
|
+
// onSaveCallback: (rows) => {
|
|
14734
|
+
// console.log('save call', rows);
|
|
14735
|
+
// // return Promise.resolve(true);
|
|
14736
|
+
// // return Promise.reject('FAILE')
|
|
14737
|
+
// }
|
|
14738
|
+
};
|
|
14739
|
+
|
|
14740
|
+
var modalTableProps = {
|
|
14741
|
+
modalTableTitle: '选择商品',
|
|
14742
|
+
tableSearchForm: [{
|
|
14743
|
+
name: 'qp-itemCode-like',
|
|
14744
|
+
label: '商品编码'
|
|
14745
|
+
}, {
|
|
14746
|
+
name: 'qp-name-like',
|
|
14747
|
+
label: '商品名称'
|
|
14748
|
+
}, {
|
|
14749
|
+
name: 'qp-ownOrgSign-in',
|
|
14750
|
+
type: 'select',
|
|
14751
|
+
label: '所属组织',
|
|
14752
|
+
field: {
|
|
14753
|
+
type: 'select',
|
|
14754
|
+
props: {
|
|
14755
|
+
mode: 'multiple',
|
|
14756
|
+
notFoundContent: '暂无数据',
|
|
14757
|
+
allowClear: true,
|
|
14758
|
+
showSearch: true,
|
|
14759
|
+
showArrow: true,
|
|
14760
|
+
maxTagCount: 1,
|
|
14761
|
+
optionFilterProp: 'children',
|
|
14762
|
+
filterOption: function filterOption(input, option) {
|
|
14763
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
14764
|
+
}
|
|
14765
|
+
}
|
|
14766
|
+
}
|
|
14767
|
+
}, {
|
|
14768
|
+
name: 'qp-brandId-in',
|
|
14769
|
+
type: 'select',
|
|
14770
|
+
label: '品牌',
|
|
14771
|
+
field: {
|
|
14772
|
+
type: 'select',
|
|
14773
|
+
props: {
|
|
14774
|
+
mode: 'multiple',
|
|
14775
|
+
notFoundContent: '暂无数据',
|
|
14776
|
+
allowClear: true,
|
|
14777
|
+
showSearch: true,
|
|
14778
|
+
showArrow: true,
|
|
14779
|
+
maxTagCount: 1,
|
|
14780
|
+
optionFilterProp: 'children',
|
|
14781
|
+
filterOption: function filterOption(input, option) {
|
|
14782
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
14783
|
+
}
|
|
14784
|
+
}
|
|
14785
|
+
}
|
|
14786
|
+
}, {
|
|
14787
|
+
name: 'qp-categoryId-in',
|
|
14788
|
+
type: 'treeSelect',
|
|
14789
|
+
label: '类目',
|
|
14790
|
+
field: {
|
|
14791
|
+
type: 'treeSelect',
|
|
14792
|
+
props: {
|
|
14793
|
+
treeData: [],
|
|
14794
|
+
treeCheckable: true,
|
|
14795
|
+
showSearch: true,
|
|
14796
|
+
allowClear: true,
|
|
14797
|
+
showArrow: true,
|
|
14798
|
+
treeNodeFilterProp: 'title',
|
|
14799
|
+
treeDefaultExpandAll: true,
|
|
14800
|
+
maxTagCount: 1,
|
|
14801
|
+
placeholder: '请选择',
|
|
14802
|
+
style: {
|
|
14803
|
+
width: '100%'
|
|
14804
|
+
},
|
|
14805
|
+
dropdownStyle: {
|
|
14806
|
+
maxHeight: 400,
|
|
14807
|
+
maxWidth: 100,
|
|
14808
|
+
overflow: 'auto'
|
|
14809
|
+
}
|
|
14810
|
+
}
|
|
14811
|
+
}
|
|
14812
|
+
}, {
|
|
14813
|
+
name: 'qp-classId-in',
|
|
14814
|
+
type: 'select',
|
|
14815
|
+
label: '品类',
|
|
14816
|
+
field: {
|
|
14817
|
+
type: 'select',
|
|
14818
|
+
props: {
|
|
14819
|
+
mode: 'multiple',
|
|
14820
|
+
notFoundContent: '暂无数据',
|
|
14821
|
+
allowClear: true,
|
|
14822
|
+
showSearch: true,
|
|
14823
|
+
showArrow: true,
|
|
14824
|
+
maxTagCount: 1,
|
|
14825
|
+
optionFilterProp: 'children',
|
|
14826
|
+
filterOption: function filterOption(input, option) {
|
|
14827
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
14828
|
+
}
|
|
14829
|
+
}
|
|
14830
|
+
}
|
|
14831
|
+
}],
|
|
14832
|
+
tableColumns: [{
|
|
14833
|
+
title: '商品编码',
|
|
14834
|
+
width: 150,
|
|
14835
|
+
dataIndex: 'itemCode'
|
|
14836
|
+
}, {
|
|
14837
|
+
title: '商品名称',
|
|
14838
|
+
width: 200,
|
|
14839
|
+
ellipsis: {
|
|
14840
|
+
showTitle: false
|
|
14841
|
+
},
|
|
14842
|
+
render: function render(text) {
|
|
14843
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
14844
|
+
placement: "topLeft",
|
|
14845
|
+
title: text
|
|
14846
|
+
}, text);
|
|
14847
|
+
},
|
|
14848
|
+
dataIndex: 'name'
|
|
14849
|
+
}, {
|
|
14850
|
+
title: '所属组织',
|
|
14851
|
+
width: 100,
|
|
14852
|
+
ellipsis: {
|
|
14853
|
+
showTitle: false
|
|
14854
|
+
},
|
|
14855
|
+
render: function render(text) {
|
|
14856
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
14857
|
+
placement: "topLeft",
|
|
14858
|
+
title: text
|
|
14859
|
+
}, text);
|
|
14860
|
+
},
|
|
14861
|
+
dataIndex: 'ownOrgSignName'
|
|
14862
|
+
}, {
|
|
14863
|
+
title: '品牌',
|
|
14864
|
+
width: 100,
|
|
14865
|
+
ellipsis: {
|
|
14866
|
+
showTitle: false
|
|
14867
|
+
},
|
|
14868
|
+
render: function render(text) {
|
|
14869
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
14870
|
+
placement: "topLeft",
|
|
14871
|
+
title: text
|
|
14872
|
+
}, text);
|
|
14873
|
+
},
|
|
14874
|
+
dataIndex: 'brandName'
|
|
14875
|
+
}, {
|
|
14876
|
+
title: '类目',
|
|
14877
|
+
width: 100,
|
|
14878
|
+
ellipsis: {
|
|
14879
|
+
showTitle: false
|
|
14880
|
+
},
|
|
14881
|
+
render: function render(text) {
|
|
14882
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
14883
|
+
placement: "topLeft",
|
|
14884
|
+
title: text
|
|
14885
|
+
}, text);
|
|
14886
|
+
},
|
|
14887
|
+
dataIndex: 'categoryName'
|
|
14888
|
+
}, {
|
|
14889
|
+
title: '品类',
|
|
14890
|
+
width: 100,
|
|
14891
|
+
ellipsis: {
|
|
14892
|
+
showTitle: false
|
|
14893
|
+
},
|
|
14894
|
+
render: function render(text) {
|
|
14895
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
14896
|
+
placement: "topLeft",
|
|
14897
|
+
title: text
|
|
14898
|
+
}, text);
|
|
14899
|
+
},
|
|
14900
|
+
dataIndex: 'className'
|
|
14901
|
+
}],
|
|
14902
|
+
selectColumn: mTpSelectColumn
|
|
14903
|
+
};
|
|
14904
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(AddSelect, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
14905
|
+
modalTableProps: modalTableProps
|
|
14906
|
+
})));
|
|
14907
|
+
};
|
|
14600
14908
|
|
|
14601
14909
|
var CommodityEntry = function CommodityEntry(props) {
|
|
14602
14910
|
var dataValidationRef = useRef();
|
|
@@ -18515,24 +18823,6 @@ var setMenuTreeData = function setMenuTreeData(routesData) {
|
|
|
18515
18823
|
if (_ret === "continue") continue;
|
|
18516
18824
|
}
|
|
18517
18825
|
};
|
|
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
18826
|
var setLoginOutPath = function setLoginOutPath() {
|
|
18537
18827
|
if (window.__POWERED_BY_WUJIE__) {
|
|
18538
18828
|
var _window$$wujie;
|
|
@@ -18919,7 +19209,7 @@ var LoginModal = (function (props) {
|
|
|
18919
19209
|
onClick: function onClick() {
|
|
18920
19210
|
form.validateFields().then(function (res) {
|
|
18921
19211
|
axios({
|
|
18922
|
-
url: "/bop/api/account/changePassWord/".concat(
|
|
19212
|
+
url: "/bop/api/account/changePassWord/".concat(getAccountID()),
|
|
18923
19213
|
method: 'patch',
|
|
18924
19214
|
params: res
|
|
18925
19215
|
}).then(function (res) {
|
|
@@ -18939,7 +19229,7 @@ var LoginModal = (function (props) {
|
|
|
18939
19229
|
span: 20
|
|
18940
19230
|
},
|
|
18941
19231
|
initialValues: {
|
|
18942
|
-
username:
|
|
19232
|
+
username: getUserId()
|
|
18943
19233
|
}
|
|
18944
19234
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
18945
19235
|
label: "\u8D26\u53F7",
|
|
@@ -19021,21 +19311,20 @@ var GlobalHeaderRight = function GlobalHeaderRight(_ref) {
|
|
|
19021
19311
|
};
|
|
19022
19312
|
var loginOut = /*#__PURE__*/function () {
|
|
19023
19313
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
19024
|
-
var
|
|
19314
|
+
var sessionId;
|
|
19025
19315
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
19026
19316
|
while (1) {
|
|
19027
19317
|
switch (_context.prev = _context.next) {
|
|
19028
19318
|
case 0:
|
|
19029
19319
|
_context.next = 2;
|
|
19030
|
-
return
|
|
19320
|
+
return getSessionId();
|
|
19031
19321
|
case 2:
|
|
19032
|
-
|
|
19033
|
-
|
|
19034
|
-
_context.next = 6;
|
|
19322
|
+
sessionId = _context.sent;
|
|
19323
|
+
_context.next = 5;
|
|
19035
19324
|
return outLogin({
|
|
19036
19325
|
sessionId: sessionId
|
|
19037
19326
|
});
|
|
19038
|
-
case
|
|
19327
|
+
case 5:
|
|
19039
19328
|
// @ts-ignore
|
|
19040
19329
|
if (BUILD_TYPE) {
|
|
19041
19330
|
message.success('退出登录成功');
|
|
@@ -19045,7 +19334,7 @@ var GlobalHeaderRight = function GlobalHeaderRight(_ref) {
|
|
|
19045
19334
|
} else {
|
|
19046
19335
|
setLoginOutPath();
|
|
19047
19336
|
}
|
|
19048
|
-
case
|
|
19337
|
+
case 6:
|
|
19049
19338
|
case "end":
|
|
19050
19339
|
return _context.stop();
|
|
19051
19340
|
}
|
|
@@ -19070,7 +19359,7 @@ var GlobalHeaderRight = function GlobalHeaderRight(_ref) {
|
|
|
19070
19359
|
src: Morentouxiang32
|
|
19071
19360
|
})), /*#__PURE__*/React.createElement("div", {
|
|
19072
19361
|
className: 'userDownTopC'
|
|
19073
|
-
},
|
|
19362
|
+
}, getUserName()), /*#__PURE__*/React.createElement("div", {
|
|
19074
19363
|
className: 'userDownTopB'
|
|
19075
19364
|
}, handleUserPhone())), /*#__PURE__*/React.createElement("div", {
|
|
19076
19365
|
className: 'userDownB'
|
|
@@ -19105,7 +19394,7 @@ var GlobalHeaderRight = function GlobalHeaderRight(_ref) {
|
|
|
19105
19394
|
className: 'rcom_c'
|
|
19106
19395
|
}, /*#__PURE__*/React.createElement("div", {
|
|
19107
19396
|
className: 'rcom_ct'
|
|
19108
|
-
},
|
|
19397
|
+
}, getUserName()), /*#__PURE__*/React.createElement("div", {
|
|
19109
19398
|
className: 'rcom_cb'
|
|
19110
19399
|
}, handleUserPhone())), /*#__PURE__*/React.createElement("div", {
|
|
19111
19400
|
className: 'rcom_r'
|
|
@@ -30326,8 +30615,7 @@ function hanleCallbackValue(codeProps, value, customerFields) {
|
|
|
30326
30615
|
return newCodeProps;
|
|
30327
30616
|
}
|
|
30328
30617
|
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;
|
|
30618
|
+
var username = getUserId();
|
|
30331
30619
|
return username === 'admin' || username === 'uiuiui';
|
|
30332
30620
|
}
|
|
30333
30621
|
var JsonQueryTable = /*#__PURE__*/React.memo(function (props) {
|
|
@@ -30456,4 +30744,4 @@ var JsonQueryTable = /*#__PURE__*/React.memo(function (props) {
|
|
|
30456
30744
|
}, "setting"));
|
|
30457
30745
|
});
|
|
30458
30746
|
|
|
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 };
|
|
30747
|
+
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 };
|