Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
admin
Commits
99f1a8a3
提交
99f1a8a3
authored
7月 29, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复:新增sku规格图片删除400问题
上级
b0ac8d10
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
193 行增加
和
6 行删除
+193
-6
commonType.ts
src/api/interface/commonType.ts
+6
-0
systemManageType.ts
src/api/interface/systemManageType.ts
+42
-1
common.ts
src/api/modules/common.ts
+5
-0
systemManage.ts
src/api/modules/systemManage.ts
+1
-1
index.tsx
...sAddOrEditOrDetail/components/skuAddOrEditModal/index.tsx
+4
-1
index.tsx
...yManage/companyDetail/components/addPeopleModal/index.tsx
+28
-0
index.scss
...pages/systemManage/companyManage/companyDetail/index.scss
+9
-0
index.tsx
src/pages/systemManage/companyManage/companyDetail/index.tsx
+98
-3
没有找到文件。
src/api/interface/commonType.ts
浏览文件 @
99f1a8a3
...
@@ -157,3 +157,9 @@ export type batchRemoveBannerInfo = InterFunction<any, NonNullable<unknown>>;
...
@@ -157,3 +157,9 @@ export type batchRemoveBannerInfo = InterFunction<any, NonNullable<unknown>>;
export
type
removeBannerInfo
=
InterFunction
<
{
id
:
number
},
NonNullable
<
unknown
>>
;
export
type
removeBannerInfo
=
InterFunction
<
{
id
:
number
},
NonNullable
<
unknown
>>
;
// V1.0.1-banner-排序交换
// V1.0.1-banner-排序交换
export
type
exchangeBannerInfo
=
InterFunction
<
Array
<
any
>
,
NonNullable
<
unknown
>>
;
export
type
exchangeBannerInfo
=
InterFunction
<
Array
<
any
>
,
NonNullable
<
unknown
>>
;
//手机号筛选小程序用户
export
type
getUserAccountByPhoneNumType
=
InterFunction
<
{
phoneNum
:
string
},
{
id
:
number
;
nickName
:
string
;
userName
:
string
}
>
;
src/api/interface/systemManageType.ts
浏览文件 @
99f1a8a3
...
@@ -202,7 +202,48 @@ export type getCompanyInfoByIdType = InterFunction<
...
@@ -202,7 +202,48 @@ export type getCompanyInfoByIdType = InterFunction<
}
}
>
;
>
;
//单位-成员列表
//单位-成员列表
export
type
listCompanyMembersType
=
InterItemFunction
<
{
companyInfoId
:
number
},
any
>
;
export
type
listCompanyMembersType
=
InterItemFunction
<
{
companyInfoId
:
number
},
{
accountStatus
:
number
;
accountType
:
number
;
companyAuthStatus
:
number
;
companyName
:
string
;
cooperationTagVOS
:
{
createTime
:
string
;
id
:
number
;
tagDescription
:
string
;
tagImg
:
string
;
tagName
:
string
;
tagRequire
:
string
;
}[];
createTime
:
string
;
deleted
:
number
;
email
:
string
;
id
:
number
;
inviteCount
:
number
;
leader
:
number
;
nickName
:
string
;
phoneNum
:
string
;
portType
:
number
;
realNameAuthStatus
:
number
;
remark
:
string
;
source
:
number
;
uid
:
string
;
userImg
:
string
;
userName
:
string
;
userRcdVO
:
{
createTime
:
string
;
id
:
number
;
rcdNickname
:
string
;
rcdUserId
:
number
;
rcdUserName
:
string
;
remark
:
string
;
userAccountId
:
number
;
};
userSex
:
number
;
}[]
>
;
//账号权限-列表
//账号权限-列表
export
type
listRoleInfoPageType
=
InterItemFunction
<
export
type
listRoleInfoPageType
=
InterItemFunction
<
...
...
src/api/modules/common.ts
浏览文件 @
99f1a8a3
...
@@ -3,6 +3,7 @@ import {
...
@@ -3,6 +3,7 @@ import {
BackEndLoginType
,
BackEndLoginType
,
batchRemoveBannerInfo
,
batchRemoveBannerInfo
,
exchangeBannerInfo
,
exchangeBannerInfo
,
getUserAccountByPhoneNumType
,
insertBannerInfo
,
insertBannerInfo
,
insertModuleInfo
,
insertModuleInfo
,
listBannerInfoPage
,
listBannerInfoPage
,
...
@@ -70,4 +71,8 @@ export class CommonAPI {
...
@@ -70,4 +71,8 @@ export class CommonAPI {
// V1.0.1-banner-排序交换
// V1.0.1-banner-排序交换
static
exchangeBannerInfo
:
exchangeBannerInfo
=
(
params
)
=>
static
exchangeBannerInfo
:
exchangeBannerInfo
=
(
params
)
=>
axios
.
post
(
'/release/module/exchangeBannerInfo'
,
params
);
axios
.
post
(
'/release/module/exchangeBannerInfo'
,
params
);
//手机号筛选小程序用户
static
getUserAccountByPhoneNum
:
getUserAccountByPhoneNumType
=
(
params
)
=>
axios
.
get
(
'/userapp/user-account/getUserAccountByPhoneNum'
,
{
params
});
}
}
src/api/modules/systemManage.ts
浏览文件 @
99f1a8a3
...
@@ -69,7 +69,7 @@ export class SystemManageAPI {
...
@@ -69,7 +69,7 @@ export class SystemManageAPI {
axios
.
get
(
'/pms/webDevice/getSecondDistrictInfo'
,
{
params
});
axios
.
get
(
'/pms/webDevice/getSecondDistrictInfo'
,
{
params
});
//单位-成员列表
//单位-成员列表
static
getListCompanyMembers
:
listCompanyMembersType
=
(
params
)
=>
static
getListCompanyMembers
:
listCompanyMembersType
=
(
params
)
=>
axios
.
pos
t
(
'/userapp/company/listCompanyMembers'
,
{
params
});
axios
.
ge
t
(
'/userapp/company/listCompanyMembers'
,
{
params
});
//账号权限-列表
//账号权限-列表
static
getListRoleInfoPage
:
listRoleInfoPageType
=
(
data
)
=>
static
getListRoleInfoPage
:
listRoleInfoPageType
=
(
data
)
=>
...
...
src/pages/mallManage/mallGoods/goodsAddOrEditOrDetail/components/skuAddOrEditModal/index.tsx
浏览文件 @
99f1a8a3
...
@@ -283,7 +283,10 @@ const SkuAddOrEditModal: FC<ModalProps & selfProps> = ({
...
@@ -283,7 +283,10 @@ const SkuAddOrEditModal: FC<ModalProps & selfProps> = ({
//规格值上传图片返回
//规格值上传图片返回
const
uploadSuccess
=
(
record
:
goodsSpecValuesType
,
value
:
any
)
=>
{
const
uploadSuccess
=
(
record
:
goodsSpecValuesType
,
value
:
any
)
=>
{
const
tableIndex
:
number
=
tableData
.
findIndex
((
v
)
=>
v
.
id
===
record
.
id
);
const
tableIndex
:
number
=
tableData
.
findIndex
((
v
)
=>
v
.
id
===
record
.
id
);
goodsSpecValuesForm
.
setFieldValue
(
'specValueImage'
+
record
.
id
,
value
[
0
].
url
);
goodsSpecValuesForm
.
setFieldValue
(
'specValueImage'
+
record
.
id
,
value
.
length
?
value
[
0
].
url
:
undefined
,
);
if
(
tableIndex
!==
-
1
)
{
if
(
tableIndex
!==
-
1
)
{
tableData
[
tableIndex
].
fileList
=
value
;
tableData
[
tableIndex
].
fileList
=
value
;
setTableData
([...
tableData
]);
setTableData
([...
tableData
]);
...
...
src/pages/systemManage/companyManage/companyDetail/components/addPeopleModal/index.tsx
0 → 100644
浏览文件 @
99f1a8a3
import
{
FC
}
from
'react'
;
import
{
Form
,
Modal
,
ModalProps
,
Select
}
from
'antd'
;
import
{
CommonAPI
}
from
'~/api'
;
interface
selfProps
{
onOk
:
()
=>
void
;
}
const
AddPeopleModal
:
FC
<
ModalProps
&
selfProps
>
=
({
open
,
onCancel
,
onOk
})
=>
{
const
handleOk
=
()
=>
{
onOk
();
};
//select 搜索
const
selectSearchEvent
=
(
value
:
string
)
=>
{
CommonAPI
.
getUserAccountByPhoneNum
({
phoneNum
:
value
}).
then
(({
result
})
=>
{});
};
return
(
<
Modal
open=
{
open
}
title=
'添加成员'
onOk=
{
handleOk
}
onCancel=
{
onCancel
}
>
<
Form
>
<
Form
.
Item
label=
'成员'
>
<
Select
placeholder=
'请输入成员手机号码'
showSearch
onSearch=
{
selectSearchEvent
}
></
Select
>
</
Form
.
Item
>
</
Form
>
</
Modal
>
);
};
export
default
AddPeopleModal
;
src/pages/systemManage/companyManage/companyDetail/index.scss
浏览文件 @
99f1a8a3
.company-detail
{
.company-detail
{
position
:
relative
;
&
-info
{
&
-info
{
margin-bottom
:
20px
;
margin-bottom
:
20px
;
}
}
...
@@ -8,5 +9,13 @@
...
@@ -8,5 +9,13 @@
font-weight
:
bold
;
font-weight
:
bold
;
font-size
:
14px
;
font-size
:
14px
;
}
}
&
-operate
{
margin-bottom
:
10px
;
}
}
&
-operate
{
position
:
absolute
;
right
:
0
;
top
:
0
;
}
}
}
}
src/pages/systemManage/companyManage/companyDetail/index.tsx
浏览文件 @
99f1a8a3
import
{
useSearchParams
}
from
'react-router-dom'
;
import
{
useSearchParams
}
from
'react-router-dom'
;
import
{
useEffect
,
useState
}
from
'react'
;
import
{
useEffect
,
useState
}
from
'react'
;
import
{
SystemManageAPI
}
from
'~/api'
;
import
{
SystemManageAPI
}
from
'~/api'
;
import
{
InterDataType
}
from
'~/api/interface'
;
import
{
InterDataType
,
PaginationProps
}
from
'~/api/interface'
;
import
{
getCompanyInfoByIdType
}
from
'~/api/interface/systemManageType'
;
import
{
getCompanyInfoByIdType
,
listCompanyMembersType
}
from
'~/api/interface/systemManageType'
;
import
{
Button
,
Descriptions
,
Table
}
from
'antd'
;
import
{
Button
,
Descriptions
,
Table
}
from
'antd'
;
import
'./index.scss'
;
import
'./index.scss'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
AddPeopleModal
from
'./components/addPeopleModal'
;
//单位详情-返回类型
//单位详情-返回类型
type
companyDetailType
=
InterDataType
<
getCompanyInfoByIdType
>
;
type
companyDetailType
=
InterDataType
<
getCompanyInfoByIdType
>
;
//单位-成员列表返回类型
type
companyMembersType
=
InterDataType
<
listCompanyMembersType
>
[
'list'
];
const
CompanyDetail
=
()
=>
{
const
CompanyDetail
=
()
=>
{
const
[
searchParams
]
=
useSearchParams
();
const
[
searchParams
]
=
useSearchParams
();
const
tableColumns
:
ColumnsType
<
companyMembersType
[
0
]
>
=
[
{
title
:
'uid'
,
align
:
'center'
,
dataIndex
:
'uid'
,
},
{
title
:
'姓名'
,
align
:
'center'
,
dataIndex
:
'userName'
,
},
{
title
:
'手机号'
,
align
:
'center'
,
dataIndex
:
'phoneNum'
,
},
{
title
:
'操作'
,
align
:
'center'
,
width
:
'15%'
,
render
:
()
=>
(
<>
<
Button
type=
'link'
>
转让
</
Button
>
<
Button
type=
'link'
>
解绑
</
Button
>
</>
),
},
];
const
[
companyId
,
setCompanyId
]
=
useState
<
number
>
(
-
1
);
const
[
companyId
,
setCompanyId
]
=
useState
<
number
>
(
-
1
);
const
[
companyDetail
,
setCompanyDetail
]
=
useState
<
companyDetailType
>
();
const
[
companyDetail
,
setCompanyDetail
]
=
useState
<
companyDetailType
>
();
const
[
pagination
,
setPagination
]
=
useState
<
PaginationProps
&
{
totalCount
:
number
}
>
({
pageNo
:
1
,
pageSize
:
10
,
totalCount
:
0
,
});
const
[
listCompanyMembers
,
setListCompanyMembers
]
=
useState
<
companyMembersType
>
();
const
[
addPeopleModalShow
,
setAddPeopleModalShow
]
=
useState
<
boolean
>
(
false
);
//单位详情
//单位详情
const
getCompanyDetailInfo
=
(
id
:
number
)
=>
{
const
getCompanyDetailInfo
=
(
id
:
number
)
=>
{
...
@@ -19,10 +62,39 @@ const CompanyDetail = () => {
...
@@ -19,10 +62,39 @@ const CompanyDetail = () => {
setCompanyDetail
(
result
);
setCompanyDetail
(
result
);
});
});
};
};
//单位成员列表
const
getListCompanyMembers
=
(
companyInfoId
:
number
)
=>
{
SystemManageAPI
.
getListCompanyMembers
({
companyInfoId
,
pageNo
:
pagination
.
pageNo
,
pageSize
:
pagination
.
pageSize
,
}).
then
(({
result
})
=>
{
pagination
.
totalCount
=
result
.
totalCount
;
setPagination
(
pagination
);
setListCompanyMembers
(
result
.
list
||
[]);
});
};
//分页
const
paginationChange
=
(
pageNo
:
number
,
pageSize
:
number
)
=>
{
pagination
.
pageNo
=
pageNo
;
pagination
.
pageSize
=
pageSize
;
getListCompanyMembers
(
companyId
);
};
//添加成员弹窗
const
addPeopleClick
=
()
=>
{
setAddPeopleModalShow
(
true
);
};
const
addPeopleModalOk
=
()
=>
{
setAddPeopleModalShow
(
false
);
};
const
addPeopleModalCancel
=
()
=>
{
setAddPeopleModalShow
(
false
);
};
useEffect
(()
=>
{
useEffect
(()
=>
{
setCompanyId
(
Number
(
searchParams
.
get
(
'id'
)));
setCompanyId
(
Number
(
searchParams
.
get
(
'id'
)));
getCompanyDetailInfo
(
Number
(
searchParams
.
get
(
'id'
)));
getCompanyDetailInfo
(
Number
(
searchParams
.
get
(
'id'
)));
getListCompanyMembers
(
Number
(
searchParams
.
get
(
'id'
)));
},
[]);
},
[]);
return
(
return
(
...
@@ -39,11 +111,34 @@ const CompanyDetail = () => {
...
@@ -39,11 +111,34 @@ const CompanyDetail = () => {
</
div
>
</
div
>
<
div
className=
'company-detail-people'
>
<
div
className=
'company-detail-people'
>
<
div
className=
'company-detail-people-title'
>
成员信息
</
div
>
<
div
className=
'company-detail-people-title'
>
成员信息
</
div
>
<
Table
bordered
/>
<
div
className=
'company-detail-people-operate'
>
<
Button
type=
'primary'
icon=
{
<
PlusOutlined
></
PlusOutlined
>
}
onClick=
{
addPeopleClick
}
>
添加成员
</
Button
>
</
div
>
<
Table
bordered
columns=
{
tableColumns
}
dataSource=
{
listCompanyMembers
}
pagination=
{
{
total
:
pagination
.
totalCount
,
pageSize
:
pagination
.
pageSize
,
current
:
pagination
.
pageNo
,
showSizeChanger
:
true
,
showQuickJumper
:
true
,
onChange
:
(
page
:
number
,
pageSize
:
number
)
=>
paginationChange
(
page
,
pageSize
),
showTotal
:
(
total
,
range
)
=>
`当前 ${range[0]}-${range[1]} 条记录 / 共 ${total} 条数据`
,
}
}
/>
</
div
>
</
div
>
<
div
className=
'company-detail-operate'
>
<
div
className=
'company-detail-operate'
>
<
Button
type=
'primary'
>
返回
</
Button
>
<
Button
type=
'primary'
>
返回
</
Button
>
</
div
>
</
div
>
<
AddPeopleModal
open=
{
addPeopleModalShow
}
onCancel=
{
addPeopleModalCancel
}
onOk=
{
addPeopleModalOk
}
/>
</
div
>
</
div
>
);
);
};
};
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论