Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
admin
Commits
ecd76e89
提交
ecd76e89
authored
8月 17, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
功能:租赁联调完成
上级
b49c069b
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
76 行增加
和
14 行删除
+76
-14
rentManageType.ts
src/api/interface/rentManageType.ts
+11
-0
rentManageAPI.ts
src/api/modules/rentManageAPI.ts
+6
-0
index.tsx
src/components/EditableCell/index.tsx
+1
-1
index.tsx
src/components/goods/commonSkuInfo/index.tsx
+3
-3
index.scss
src/pages/rentManage/rentGoods/rentDetail/index.scss
+5
-0
index.tsx
src/pages/rentManage/rentGoods/rentDetail/index.tsx
+36
-6
index.tsx
...nage/rentMode/components/addOrEditRentModeModal/index.tsx
+4
-3
index.tsx
src/pages/rentManage/rentMode/index.tsx
+10
-1
没有找到文件。
src/api/interface/rentManageType.ts
浏览文件 @
ecd76e89
...
...
@@ -35,6 +35,13 @@ export type addRentModeType = InterFunction<
{
modeName
:
string
;
productTypeId
:
number
;
brandInfoId
:
number
;
tag
?:
string
},
any
>
;
//租赁-型号-编辑
export
type
editRentModeType
=
InterFunction
<
{
modeName
:
string
;
productTypeId
:
number
;
brandInfoId
:
number
;
tag
?:
string
;
id
?:
number
},
any
>
;
//租赁-型号-删除
export
type
deleteModeType
=
InterFunction
<
{
id
:
number
},
any
>
;
//租赁-型号-列表
export
type
rentModeListType
=
InterItemFunction
<
{
brandInfoId
?:
number
;
productTypeId
?:
number
},
...
...
@@ -81,13 +88,16 @@ export type addRentGoodsType = InterFunction<
//租赁商品-列表
type
rentGoodsType
=
{
brandInfoId
:
number
;
brandName
:
string
;
deviceModeId
:
number
;
deviceModeName
:
string
;
leasePartsList
:
{
id
:
number
;
name
:
string
;
number
:
number
;
price
:
number
}[];
level
:
number
;
logisticsCompany
:
string
;
maxLeaseTerm
:
number
;
minLeaseTerm
:
number
;
modeOfDelivery
:
number
;
modeOfDeliveryInfo
:
string
;
priceStock
:
{
cashPledge
:
number
;
maxDaysRental
?:
number
;
...
...
@@ -105,6 +115,7 @@ type rentGoodsType = {
productDetails
:
string
;
productParam
:
string
;
productTypeId
:
number
;
productTypeName
:
string
;
resourcesList
:
{
id
:
number
;
type
:
number
;
url
:
string
}[];
returnAddress
:
number
;
sellingPoint
:
string
;
...
...
src/api/modules/rentManageAPI.ts
浏览文件 @
ecd76e89
...
...
@@ -3,8 +3,10 @@ import {
addRentModeType
,
addType
,
batchRemoveWareInfoType
,
deleteModeType
,
editBrandInfoType
,
editLeaseGoodsType
,
editRentModeType
,
getTypeListType
,
leaseGoodsDetailsType
,
leaseGoodsListType
,
...
...
@@ -43,6 +45,10 @@ export class RentManageAPI {
// 租赁-型号-新增
static
addRentMode
:
addRentModeType
=
(
data
)
=>
axios
.
post
(
'/pms/brand/addMode'
,
data
);
//租赁-型号-编辑
static
editRentMode
:
editRentModeType
=
(
data
)
=>
axios
.
post
(
'/pms/brand/editMode'
,
data
);
//租赁-型号-删除
static
deleteMode
:
deleteModeType
=
(
params
)
=>
axios
.
get
(
'/pms/brand/deleteMode'
,
{
params
});
// 租赁-型号-列表
static
getRentModeList
:
rentModeListType
=
(
data
)
=>
axios
.
post
(
'/pms/brand/modeList'
,
data
);
...
...
src/components/EditableCell/index.tsx
浏览文件 @
ecd76e89
...
...
@@ -96,7 +96,7 @@ const EditableCell: React.FC<
style=
{
{
margin
:
0
}
}
rules=
{
rules
}
//valuePropName:当 form setFieldsValue 设置switch不生效时
valuePropName=
{
inputType
===
'switch'
?
'checked'
:
''
}
valuePropName=
{
inputType
===
'switch'
?
'checked'
:
undefined
}
>
{
inputNode
()
}
</
Form
.
Item
>
...
...
src/components/goods/commonSkuInfo/index.tsx
浏览文件 @
ecd76e89
...
...
@@ -291,9 +291,9 @@ const CommonSkuInfo = forwardRef<any, selfProps>(
<
div
className=
'common-sku-info'
>
<
Form
wrapperCol=
{
{
span
:
5
}
}
labelCol=
{
{
span
:
1
}
}
form=
{
form
}
>
{
specificationFormList
.
map
((
v
,
index
)
=>
(
<>
<
div
key=
{
v
.
id
}
>
{
/* 规格项*/
}
<
Row
key=
{
v
.
id
}
>
<
Row
>
<
Col
span=
{
7
}
>
<
Form
.
Item
label=
{
'规格项'
+
(
index
+
1
)
}
...
...
@@ -388,7 +388,7 @@ const CommonSkuInfo = forwardRef<any, selfProps>(
)
:
(
''
)
}
</>
</
div
>
))
}
<
Row
>
<
Col
span=
{
2
}
></
Col
>
...
...
src/pages/rentManage/rentGoods/rentDetail/index.scss
0 → 100644
浏览文件 @
ecd76e89
.rent-detail-introduce
{
img
{
max-width
:
100%
;
}
}
src/pages/rentManage/rentGoods/rentDetail/index.tsx
浏览文件 @
ecd76e89
import
{
useSearchParams
,
useNavigate
}
from
'react-router-dom'
;
import
{
useEffect
,
useState
}
from
'react'
;
import
{
RentManageAPI
,
SystemManageAPI
}
from
'~/api'
;
import
{
OrderManageAPI
,
RentManageAPI
,
SystemManageAPI
}
from
'~/api'
;
import
{
InterDataType
}
from
'~/api/interface'
;
import
{
leaseGoodsDetailsType
}
from
'~/api/interface/rentManageType'
;
import
{
Badge
,
Button
,
Col
,
Descriptions
,
Image
,
Row
,
Switch
,
Table
}
from
'antd'
;
import
{
qualityList
}
from
'~/utils/dictionary'
;
import
'./index.scss'
;
//租赁商品详情返回类型
type
rentGoodsDetailType
=
InterDataType
<
leaseGoodsDetailsType
>
;
...
...
@@ -61,6 +62,9 @@ const RentDetail = () => {
const
[
addressOptionList
,
setAddressOptionList
]
=
useState
<
{
label
:
string
;
value
:
number
;
districtCode
:
string
}[]
>
([]);
const
[
expressOptionList
,
setExpressOptionList
]
=
useState
<
{
label
:
string
;
value
:
string
}[]
>
(
[],
);
//获取租赁商品详情
const
getRentGoodsDetail
=
(
id
:
number
)
=>
{
...
...
@@ -183,6 +187,18 @@ const RentDetail = () => {
}
});
};
//物流公司列表
const
getListExpressInfo
=
()
=>
{
OrderManageAPI
.
listExpressInfo
().
then
(({
result
})
=>
{
if
(
result
)
{
const
optionList
=
result
.
map
((
v
)
=>
({
label
:
v
.
exName
,
value
:
v
.
exCode
,
}));
setExpressOptionList
(
optionList
);
}
});
};
//返回
const
backRoute
=
()
=>
{
...
...
@@ -192,6 +208,7 @@ const RentDetail = () => {
useEffect
(()
=>
{
getLeaseTermInfo
();
getAddressList
();
getListExpressInfo
();
},
[]);
useEffect
(()
=>
{
...
...
@@ -225,9 +242,9 @@ const RentDetail = () => {
</
Descriptions
.
Item
>
</
Descriptions
>
<
Descriptions
title=
'商品属性'
bordered
column=
{
3
}
style=
{
{
marginTop
:
'10px'
}
}
>
<
Descriptions
.
Item
label=
'商品类型'
>
{
rentGoodsDetails
?.
productType
Id
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'商品品牌'
>
{
rentGoodsDetails
?.
brand
InfoId
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'商品型号'
>
{
rentGoodsDetails
?.
deviceMode
Id
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'商品类型'
>
{
rentGoodsDetails
?.
productType
Name
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'商品品牌'
>
{
rentGoodsDetails
?.
brand
Name
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'商品型号'
>
{
rentGoodsDetails
?.
deviceMode
Name
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'商品主图'
>
<
Image
src=
{
rentGoodsDetails
?.
resourcesList
.
find
((
v
)
=>
v
.
type
===
0
)?.
url
}
width=
{
50
}
/>
</
Descriptions
.
Item
>
...
...
@@ -316,8 +333,21 @@ const RentDetail = () => {
<
Descriptions
.
Item
label=
'归还地址'
>
{
addressOptionList
.
find
((
v
)
=>
v
.
value
===
rentGoodsDetails
?.
returnAddress
)?.
label
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'寄出物流'
>
{
rentGoodsDetails
?.
logisticsCompany
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'配送方式'
>
{
rentGoodsDetails
?.
modeOfDelivery
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'寄出物流'
>
{
expressOptionList
.
find
((
v
)
=>
v
.
value
===
rentGoodsDetails
?.
logisticsCompany
)?.
label
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'配送方式'
>
{
rentGoodsDetails
?.
modeOfDeliveryInfo
}
</
Descriptions
.
Item
>
</
Descriptions
>
<
Descriptions
title=
'商品详情页'
column=
{
1
}
style=
{
{
marginTop
:
'10px'
}
}
>
<
Descriptions
.
Item
>
<
div
dangerouslySetInnerHTML=
{
{
__html
:
rentGoodsDetails
?.
productDetails
||
''
}
}
style=
{
{
width
:
'100%'
}
}
className=
'rent-detail-introduce'
></
div
>
</
Descriptions
.
Item
>
</
Descriptions
>
</
div
>
);
...
...
src/pages/rentManage/rentMode/components/addOrEditRentModeModal/index.tsx
浏览文件 @
ecd76e89
...
...
@@ -45,14 +45,15 @@ const AddOrEditRentModeModal: FC<ModalProps & selfProps> = ({
}
return
pre
;
},
[]);
RentManageAPI
.
addRentMode
({
RentManageAPI
[
currentRentMode
?
'editRentMode'
:
'addRentMode'
]
({
productTypeId
:
values
.
productTypeId
,
modeName
:
values
.
modeName
,
tag
:
covertTagList
.
length
?
covertTagList
.
join
(
','
)
:
undefined
,
brandInfoId
,
id
:
currentRentMode
?
currentRentMode
.
id
:
undefined
,
}).
then
(({
code
})
=>
{
if
(
code
===
'200'
)
{
message
.
success
(
'新增成功'
);
message
.
success
(
currentRentMode
?
'编辑成功'
:
'新增成功'
);
form
.
resetFields
();
onOk
();
}
...
...
@@ -131,7 +132,7 @@ const AddOrEditRentModeModal: FC<ModalProps & selfProps> = ({
wrapperCol=
{
{
span
:
19
,
offset
:
index
?
5
:
0
}
}
name=
{
v
.
tagName
}
>
<
Input
placeholder=
'请输入标签名称'
/>
<
Input
placeholder=
'请输入标签名称'
maxLength=
{
30
}
/>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
3
}
offset=
{
1
}
>
...
...
src/pages/rentManage/rentMode/index.tsx
浏览文件 @
ecd76e89
...
...
@@ -93,7 +93,16 @@ const RentMode = () => {
Modal
.
confirm
({
title
:
'提示'
,
content
:
'确认删除该型号?'
,
onOk
:
()
=>
{},
onOk
:
()
=>
{
RentManageAPI
.
deleteMode
({
id
:
record
.
id
}).
then
(({
code
})
=>
{
if
(
code
===
'200'
)
{
if
(
tableData
.
length
===
1
&&
pagination
.
pageNo
!==
1
)
{
pagination
.
pageNo
-=
1
;
}
getModeList
(
brandInfoId
,
query
);
}
});
},
});
};
//型号列表
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论