Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
admin
Commits
3efe0f10
提交
3efe0f10
authored
7月 29, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复:新增sku字段长度限制
上级
51b1d381
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
78 行增加
和
6 行删除
+78
-6
systemManageType.ts
src/api/interface/systemManageType.ts
+19
-1
systemManage.ts
src/api/modules/systemManage.ts
+4
-0
index.tsx
...sAddOrEditOrDetail/components/skuAddOrEditModal/index.tsx
+9
-0
index.tsx
...Goods/goodsAddOrEditOrDetail/components/skuInfo/index.tsx
+2
-1
index.tsx
src/pages/mallManage/mallGoods/goodsDetails/index.tsx
+2
-1
index.tsx
src/pages/mallManage/mallGoods/goodsList/index.tsx
+2
-1
index.scss
...pages/systemManage/companyManage/companyDetail/index.scss
+12
-0
index.tsx
src/pages/systemManage/companyManage/companyDetail/index.tsx
+28
-2
没有找到文件。
src/api/interface/systemManageType.ts
浏览文件 @
3efe0f10
...
...
@@ -185,7 +185,25 @@ export type listCompanyRemove = InterFunction<
NonNullable
<
unknown
>
>
;
//单位-详情
export
type
getCompanyInfoByIdType
=
InterFunction
<
{
id
:
number
},
any
>
;
export
type
getCompanyInfoByIdType
=
InterFunction
<
{
id
:
number
},
{
address
:
string
;
city
:
string
;
companyName
:
string
;
companyType
:
number
;
companyUserName
:
string
;
district
:
string
;
fullName
:
string
;
id
:
number
;
phoneNum
:
string
;
province
:
string
;
remark
:
string
;
}
>
;
//单位-成员列表
export
type
listCompanyMembersType
=
InterItemFunction
<
{
companyInfoId
:
number
},
any
>
;
//账号权限-列表
export
type
listRoleInfoPageType
=
InterItemFunction
<
{
numberOrName
?:
string
},
...
...
src/api/modules/systemManage.ts
浏览文件 @
3efe0f10
...
...
@@ -6,6 +6,7 @@ import {
insertRoleInfoType
,
listBAccountPageType
,
listCompanyAdd
,
listCompanyMembersType
,
listCompanyPage
,
listCompanyRemove
,
listCompanyUpdate
,
...
...
@@ -66,6 +67,9 @@ export class SystemManageAPI {
// 单位-区域
static
getSecondDistrictInfo
:
getSecondDistrictInfo
=
(
params
)
=>
axios
.
get
(
'/pms/webDevice/getSecondDistrictInfo'
,
{
params
});
//单位-成员列表
static
getListCompanyMembers
:
listCompanyMembersType
=
(
params
)
=>
axios
.
post
(
'/userapp/company/listCompanyMembers'
,
{
params
});
//账号权限-列表
static
getListRoleInfoPage
:
listRoleInfoPageType
=
(
data
)
=>
...
...
src/pages/mallManage/mallGoods/goodsAddOrEditOrDetail/components/skuAddOrEditModal/index.tsx
浏览文件 @
3efe0f10
...
...
@@ -41,6 +41,9 @@ const SkuAddOrEditModal: FC<ModalProps & selfProps> = ({
const
salePriceValidator
=
(
_rules
:
any
,
value
:
number
)
=>
{
if
(
!
isEmptyBol
(
value
))
{
if
(
regPriceNumber
(
value
.
toString
()))
{
if
(
value
>
99999999
||
value
<
0
)
{
return
Promise
.
reject
(
new
Error
(
'价格最大为99999999且大于0'
));
}
return
Promise
.
resolve
();
}
else
{
return
Promise
.
reject
(
new
Error
(
'为整数且最多保留两位小数'
));
...
...
@@ -53,6 +56,9 @@ const SkuAddOrEditModal: FC<ModalProps & selfProps> = ({
const
channelPriceValidator
=
(
_rules
:
any
,
value
:
number
)
=>
{
if
(
!
isEmptyBol
(
value
))
{
if
(
regPriceNumber
(
value
.
toString
()))
{
if
(
value
>
99999999
||
value
<
0
)
{
return
Promise
.
reject
(
new
Error
(
'价格最大为99999999且大于0'
));
}
return
Promise
.
resolve
();
}
else
{
return
Promise
.
reject
(
new
Error
(
'为整数且最多保留两位小数'
));
...
...
@@ -65,6 +71,9 @@ const SkuAddOrEditModal: FC<ModalProps & selfProps> = ({
const
stockPriceValidator
=
(
_rules
:
any
,
value
:
number
)
=>
{
if
(
!
isEmptyBol
(
value
))
{
if
(
/^
[
+
]{0,1}(\d
+
)
$/
.
test
(
value
.
toString
()))
{
if
(
value
>
99999999
||
value
<
0
)
{
return
Promise
.
reject
(
new
Error
(
'库存最大为99999999且大于0'
));
}
return
Promise
.
resolve
();
}
else
{
return
Promise
.
reject
(
new
Error
(
'请输入正整数'
));
...
...
src/pages/mallManage/mallGoods/goodsAddOrEditOrDetail/components/skuInfo/index.tsx
浏览文件 @
3efe0f10
...
...
@@ -60,7 +60,8 @@ const SkuInfo: FC<selfProps> = ({
render
:
(
text
:
goodsSpecType
[
'goodsSpecValuesList'
])
=>
text
.
map
((
v
)
=>
(
<
Tag
key=
{
v
.
id
}
>
{
v
.
specValueName
}
(
{
v
.
partNo
}
)
{
v
.
specValueName
}
{
v
.
partNo
?
`(${v.partNo})`
:
''
}
</
Tag
>
)),
},
...
...
src/pages/mallManage/mallGoods/goodsDetails/index.tsx
浏览文件 @
3efe0f10
...
...
@@ -60,7 +60,8 @@ const GoodsDetails = () => {
render
:
(
text
:
detailType
[
'goodsSpecList'
][
0
][
'goodsSpecValuesList'
])
=>
text
.
map
((
v
)
=>
(
<
Tag
key=
{
v
.
id
}
>
{
v
.
specValueName
}
(
{
v
.
partNo
}
)
{
v
.
specValueName
}
{
v
.
partNo
?
`(${v.partNo})`
:
''
}
</
Tag
>
)),
},
...
...
src/pages/mallManage/mallGoods/goodsList/index.tsx
浏览文件 @
3efe0f10
...
...
@@ -71,7 +71,7 @@ const GoodsList = () => {
<
Image
src=
{
text
.
find
((
v
)
=>
v
.
type
===
0
)?.
url
||
''
}
width=
{
50
}
height=
{
50
}
/>
),
},
{
title
:
'商品名称'
,
align
:
'center'
,
dataIndex
:
'tradeName'
},
{
title
:
'商品名称'
,
align
:
'center'
,
dataIndex
:
'tradeName'
,
width
:
'20%'
,
ellipsis
:
true
},
{
title
:
'商品类别'
,
align
:
'center'
,
...
...
@@ -88,6 +88,7 @@ const GoodsList = () => {
title
:
'操作'
,
align
:
'center'
,
dataIndex
:
'id'
,
width
:
'20%'
,
render
:
(
id
:
number
,
record
:
goodsType
[
0
])
=>
(
<>
<
Button
type=
'link'
onClick=
{
()
=>
toEditGoods
(
id
)
}
>
...
...
src/pages/systemManage/companyManage/companyDetail/index.scss
0 → 100644
浏览文件 @
3efe0f10
.company-detail
{
&
-info
{
margin-bottom
:
20px
;
}
&
-people
{
&
-title
{
line-height
:
50px
;
font-weight
:
bold
;
font-size
:
14px
;
}
}
}
src/pages/systemManage/companyManage/companyDetail/index.tsx
浏览文件 @
3efe0f10
import
{
useSearchParams
}
from
'react-router-dom'
;
import
{
useEffect
,
useState
}
from
'react'
;
import
{
SystemManageAPI
}
from
'~/api'
;
import
{
InterDataType
}
from
'~/api/interface'
;
import
{
getCompanyInfoByIdType
}
from
'~/api/interface/systemManageType'
;
import
{
Button
,
Descriptions
,
Table
}
from
'antd'
;
import
'./index.scss'
;
//单位详情-返回类型
type
companyDetailType
=
InterDataType
<
getCompanyInfoByIdType
>
;
const
CompanyDetail
=
()
=>
{
const
[
searchParams
]
=
useSearchParams
();
const
[
companyId
,
setCompanyId
]
=
useState
<
number
>
(
-
1
);
const
[
companyDetail
,
setCompanyDetail
]
=
useState
<
companyDetailType
>
();
//单位详情
const
getCompanyDetailInfo
=
(
id
:
number
)
=>
{
SystemManageAPI
.
getCompanyInfoById
({
id
}).
then
(({
result
})
=>
{});
SystemManageAPI
.
getCompanyInfoById
({
id
}).
then
(({
result
})
=>
{
setCompanyDetail
(
result
);
});
};
useEffect
(()
=>
{
...
...
@@ -17,7 +27,23 @@ const CompanyDetail = () => {
return
(
<
div
className=
'company-detail'
>
<
div
className=
'company-detail-info'
></
div
>
<
div
className=
'company-detail-info'
>
<
Descriptions
title=
'基本信息'
bordered
column=
{
4
}
>
<
Descriptions
.
Item
label=
'单位名称'
>
{
companyDetail
?.
companyName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'详细地址'
>
{
companyDetail
?.
address
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'联系人'
>
{
companyDetail
?.
companyUserName
||
''
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'联系电话'
>
{
companyDetail
?.
phoneNum
||
''
}
</
Descriptions
.
Item
>
</
Descriptions
>
</
div
>
<
div
className=
'company-detail-people'
>
<
div
className=
'company-detail-people-title'
>
成员信息
</
div
>
<
Table
bordered
/>
</
div
>
<
div
className=
'company-detail-operate'
>
<
Button
type=
'primary'
>
返回
</
Button
>
</
div
>
</
div
>
);
};
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论