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