Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
admin-ci-test
Commits
cbc9ec4c
提交
cbc9ec4c
authored
8月 11, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop'
上级
e116a820
e5426815
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
50 行增加
和
9 行删除
+50
-9
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+1
-1
rentManageType.ts
src/api/interface/rentManageType.ts
+4
-2
rentManageAPI.ts
src/api/modules/rentManageAPI.ts
+3
-0
index.tsx
...nage/rentMode/components/addOrEditRentModeModal/index.tsx
+20
-4
index.tsx
src/pages/rentManage/rentMode/index.tsx
+22
-1
router.tsx
src/router/router.tsx
+0
-1
没有找到文件。
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
cbc9ec4c
...
...
@@ -14,4 +14,4 @@ patches:
images
:
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin
newTag
:
69a87f6953407401ad1c17c2d6e409c4f5d581f
7
newTag
:
3a749ea2e3a262da9a2cb007572e635db473603
7
src/api/interface/rentManageType.ts
浏览文件 @
cbc9ec4c
...
...
@@ -31,7 +31,9 @@ export type listBrandInfoType = InterItemFunction<
>
;
//租赁-型号-新增
export
type
addRentModeType
=
InterFunction
<
{
modeName
:
string
;
brandInfoId
:
number
;
productTypeId
:
number
},
export
type
addRentModeType
=
InterFunction
<
{
modeName
:
string
;
productTypeId
:
number
},
any
>
;
//租赁-型号-列表
export
type
rentModeListType
=
InterItemFunction
<
{
brandInfoId
?:
number
;
productTypeId
?:
number
},
any
>
;
src/api/modules/rentManageAPI.ts
浏览文件 @
cbc9ec4c
...
...
@@ -5,6 +5,7 @@ import {
getTypeListType
,
listBrandInfoType
,
rentMakeAddType
,
rentModeListType
,
rentTypeEditType
,
rentTypeRemoveType
,
}
from
'~/api/interface/rentManageType'
;
...
...
@@ -34,4 +35,6 @@ export class RentManageAPI {
// 租赁-型号-新增
static
addRentMode
:
addRentModeType
=
(
data
)
=>
axios
.
post
(
'/pms/brand/addMode'
,
data
);
// 租赁-型号-列表
static
getRentModeList
:
rentModeListType
=
(
data
)
=>
axios
.
post
(
'/pms/brand/modeList'
,
data
);
}
src/pages/rentManage/rentMode/components/addOrEditRentModeModal/index.tsx
浏览文件 @
cbc9ec4c
...
...
@@ -18,9 +18,17 @@ const AddOrEditRentModeModal: FC<ModalProps & selfProps> = ({ open, onOk, onCanc
const
[
rentTypeList
,
setRentTypeList
]
=
useState
<
rentTypeListType
>
([]);
const
handleOk
=
()
=>
{
onOk
();
form
.
validateFields
().
then
((
values
)
=>
{
RentManageAPI
.
addRentMode
({
...
values
}).
then
(({
code
})
=>
{
if
(
code
===
'200'
)
{
form
.
resetFields
();
onOk
();
}
});
});
};
const
handleCancel
=
()
=>
{
form
.
resetFields
();
onCancel
();
};
//获取类型列表
...
...
@@ -37,7 +45,11 @@ const AddOrEditRentModeModal: FC<ModalProps & selfProps> = ({ open, onOk, onCanc
return
(
<
Modal
open=
{
open
}
onOk=
{
handleOk
}
onCancel=
{
handleCancel
}
title=
'新增型号'
>
<
Form
form=
{
form
}
>
<
Form
.
Item
label=
'所属类别'
>
<
Form
.
Item
label=
'所属类别'
name=
'productTypeId'
rules=
{
[{
required
:
true
,
message
:
'请选择所属类别'
}]
}
>
<
Select
placeholder=
'请选择所属类别'
>
{
rentTypeList
.
map
((
v
)
=>
(
<
Select
.
Option
key=
{
v
.
id
}
value=
{
v
.
id
}
>
...
...
@@ -46,8 +58,12 @@ const AddOrEditRentModeModal: FC<ModalProps & selfProps> = ({ open, onOk, onCanc
))
}
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
label=
'型号名称'
>
<
Input
placeholder=
'请输入型号名称'
/>
<
Form
.
Item
label=
'型号名称'
name=
'modeName'
rules=
{
[{
required
:
true
,
message
:
'请输入型号名称'
}]
}
>
<
Input
placeholder=
'请输入型号名称'
maxLength=
{
30
}
/>
</
Form
.
Item
>
</
Form
>
</
Modal
>
...
...
src/pages/rentManage/rentMode/index.tsx
浏览文件 @
cbc9ec4c
...
...
@@ -3,7 +3,9 @@ import { Button, Table } from 'antd';
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
ColumnsType
}
from
'antd/es/table/InternalTable'
;
import
AddOrEditRentModeModal
from
'~/pages/rentManage/rentMode/components/addOrEditRentModeModal'
;
import
{
useState
}
from
'react'
;
import
{
useEffect
,
useState
}
from
'react'
;
import
{
RentManageAPI
}
from
'~/api'
;
import
{
PaginationProps
}
from
'~/api/interface'
;
const
RentMode
=
()
=>
{
const
tableColumns
:
ColumnsType
<
any
>
=
[
...
...
@@ -40,6 +42,11 @@ const RentMode = () => {
];
const
[
addOrEditRentModelModalShow
,
setAddOrEditRentModelModalShow
]
=
useState
<
boolean
>
(
false
);
const
[
pagination
,
setPagination
]
=
useState
<
PaginationProps
&
{
totalCount
:
number
}
>
({
pageNo
:
1
,
pageSize
:
10
,
totalCount
:
0
,
});
//新增,编辑型号弹窗
const
addOrEditRentModelClick
=
()
=>
{
...
...
@@ -51,6 +58,20 @@ const RentMode = () => {
const
addOrEditRentModelModalOk
=
()
=>
{
setAddOrEditRentModelModalShow
(
true
);
};
//类型列表
const
getModeList
=
()
=>
{
RentManageAPI
.
getRentModeList
({
pageNo
:
pagination
.
pageNo
,
pageSize
:
pagination
.
pageSize
,
}).
then
(({
result
})
=>
{
pagination
.
totalCount
=
result
.
totalCount
;
setPagination
({
...
pagination
});
});
};
useEffect
(()
=>
{
getModeList
();
},
[]);
return
(
<
div
className=
'rent-model'
>
<
SearchBox
...
...
src/router/router.tsx
浏览文件 @
cbc9ec4c
...
...
@@ -905,7 +905,6 @@ export const routerList: Array<RouteObjectType> = [
id
:
2210
,
title
:
'积分列表'
,
icon
:
<
MacCommandOutlined
/>,
develop
:
true
,
},
},
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论