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