Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
admin
Commits
a2d16a64
提交
a2d16a64
authored
8月 07, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
功能:租赁商品新增
上级
0eec203c
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
164 行增加
和
49 行删除
+164
-49
index.scss
...e/rentGoods/rentAddOrEdit/components/goodsInfo/index.scss
+7
-0
index.tsx
...ge/rentGoods/rentAddOrEdit/components/goodsInfo/index.tsx
+57
-0
index.tsx
...age/rentGoods/rentAddOrEdit/components/rentAttr/index.tsx
+38
-3
index.tsx
...age/rentGoods/rentAddOrEdit/components/rentInfo/index.tsx
+10
-44
index.scss
...age/rentGoods/rentAddOrEdit/components/skuInfo/index.scss
+7
-0
index.tsx
...nage/rentGoods/rentAddOrEdit/components/skuInfo/index.tsx
+37
-0
index.tsx
src/pages/mallManage/rentGoods/rentAddOrEdit/index.tsx
+8
-2
没有找到文件。
src/pages/mallManage/rentGoods/rentAddOrEdit/components/goodsInfo/index.scss
0 → 100644
浏览文件 @
a2d16a64
.goods-info
{
&
-title
{
font-size
:
15px
;
font-weight
:
bold
;
line-height
:
40px
;
}
}
src/pages/mallManage/rentGoods/rentAddOrEdit/components/goodsInfo/index.tsx
0 → 100644
浏览文件 @
a2d16a64
import
{
Form
,
Input
,
Radio
}
from
'antd'
;
import
'./index.scss'
;
const
GoodsInfo
=
()
=>
{
const
qualityList
=
[
{
label
:
'全新'
,
value
:
0
,
},
{
label
:
'99新'
,
value
:
1
,
},
{
label
:
'95新'
,
value
:
2
,
},
{
label
:
'90新'
,
value
:
3
,
},
{
label
:
'80新'
,
value
:
4
,
},
];
return
(
<
div
className=
'goods-info'
>
<
div
className=
'goods-info-title'
>
商品信息
</
div
>
<
Form
labelCol=
{
{
span
:
2
}
}
wrapperCol=
{
{
span
:
10
}
}
>
<
Form
.
Item
label=
'商品标题'
>
<
Input
placeholder=
'请输入商品标题'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'商品卖点'
>
<
Input
placeholder=
'请输入商品卖点'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'商品成新'
>
<
Radio
.
Group
>
{
qualityList
.
map
((
v
,
index
)
=>
(
<
Radio
value=
{
v
.
value
}
key=
{
index
}
>
{
v
.
label
}
</
Radio
>
))
}
</
Radio
.
Group
>
</
Form
.
Item
>
<
Form
.
Item
label=
'商品状态'
>
<
Radio
.
Group
>
<
Radio
value=
{
1
}
>
上架
</
Radio
>
<
Radio
value=
{
0
}
>
下架
</
Radio
>
</
Radio
.
Group
>
</
Form
.
Item
>
</
Form
>
</
div
>
);
};
export
default
GoodsInfo
;
src/pages/mallManage/rentGoods/rentAddOrEdit/components/rentAttr/index.tsx
浏览文件 @
a2d16a64
...
...
@@ -2,7 +2,9 @@ import './index.scss';
import
{
Button
,
Cascader
,
Form
,
Radio
,
Table
}
from
'antd'
;
import
EditableCell
from
'~/components/EditableCell'
;
import
{
useState
}
from
'react'
;
import
{
MinusOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
MinusOutlined
,
PlusOutlined
,
UploadOutlined
}
from
'@ant-design/icons'
;
import
{
Uploader
}
from
'~/components/uploader'
;
import
RichText
from
'~/components/richText'
;
type
EditableTableProps
=
Parameters
<
typeof
Table
>
[
0
];
type
ColumnTypes
=
Exclude
<
EditableTableProps
[
'columns'
],
undefined
>
;
...
...
@@ -51,11 +53,24 @@ const RentAttr = () => {
render
:
(
_text
:
string
,
_record
:
any
,
index
:
number
)
=>
(
<>
{
index
===
parameterTableData
.
length
-
1
?
(
<
Button
icon=
{
<
PlusOutlined
/>
}
type=
'primary'
></
Button
>
<
Button
icon=
{
<
PlusOutlined
/>
}
type=
'primary'
onClick=
{
addParameterDataEvent
}
style=
{
{
marginRight
:
'10px'
}
}
></
Button
>
)
:
(
''
)
}
{
index
?
(
<
Button
type=
'primary'
icon=
{
<
MinusOutlined
/>
}
onClick=
{
deleteParameterDataEvent
}
></
Button
>
)
:
(
''
)
}
{
index
?
<
Button
type=
'primary'
icon=
{
<
MinusOutlined
/>
}
></
Button
>
:
''
}
</>
),
},
...
...
@@ -78,6 +93,13 @@ const RentAttr = () => {
});
const
[
parameterTableData
,
setParameterTableData
]
=
useState
<
any
>
([{
id
:
1
}]);
//商品参数新增
const
addParameterDataEvent
=
()
=>
{
setParameterTableData
([...
parameterTableData
,
{
id
:
parameterTableData
.
length
+
1
}]);
};
//商品参数删除
const
deleteParameterDataEvent
=
()
=>
{};
return
(
<
div
className=
'rent-attr'
>
<
div
className=
'rent-attr-title'
>
商品属性
</
div
>
...
...
@@ -110,6 +132,19 @@ const RentAttr = () => {
></
Table
>
</
Form
>
</
Form
.
Item
>
<
Form
.
Item
label=
'商品图片'
>
<
Uploader
fileUpload
listType=
'picture-card'
>
<
UploadOutlined
/>
</
Uploader
>
</
Form
.
Item
>
<
Form
.
Item
label=
'商品视频'
>
<
Uploader
fileUpload
listType=
'picture-card'
>
<
UploadOutlined
/>
</
Uploader
>
</
Form
.
Item
>
<
Form
.
Item
label=
'商品详情页'
>
<
RichText
richTextContent=
''
/>
</
Form
.
Item
>
</
Form
>
</
div
>
);
...
...
src/pages/mallManage/rentGoods/rentAddOrEdit/components/rentInfo/index.tsx
浏览文件 @
a2d16a64
import
{
Form
,
Input
,
Radio
}
from
'antd'
;
import
{
Form
,
Select
}
from
'antd'
;
import
'./index.scss'
;
const
RentInfo
=
()
=>
{
const
qualityList
=
[
{
label
:
'全新'
,
value
:
0
,
},
{
label
:
'99新'
,
value
:
1
,
},
{
label
:
'95新'
,
value
:
2
,
},
{
label
:
'90新'
,
value
:
3
,
},
{
label
:
'80新'
,
value
:
4
,
},
];
return
(
<
div
className=
'rent-info'
>
<
div
className=
'rent-info-title'
>
商品
信息
</
div
>
<
div
className=
'rent-info-title'
>
租赁
信息
</
div
>
<
Form
labelCol=
{
{
span
:
2
}
}
wrapperCol=
{
{
span
:
10
}
}
>
<
Form
.
Item
label=
'商品标题'
>
<
Input
placeholder=
'请输入商品标题'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'商品卖点'
>
<
Input
placeholder=
'请输入商品卖点'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'商品成新'
>
<
Radio
.
Group
>
{
qualityList
.
map
((
v
,
index
)
=>
(
<
Radio
value=
{
v
.
value
}
key=
{
index
}
>
{
v
.
label
}
</
Radio
>
))
}
</
Radio
.
Group
>
<
Form
.
Item
label=
'最低租期'
>
<
Select
placeholder=
'请选择租期'
>
<
Select
.
Option
>
11
</
Select
.
Option
>
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
label=
'商品状态'
>
<
Radio
.
Group
>
<
Radio
value=
{
1
}
>
上架
</
Radio
>
<
Radio
value=
{
0
}
>
下架
</
Radio
>
</
Radio
.
Group
>
<
Form
.
Item
label=
'最高租期'
>
<
Select
placeholder=
'请选择租期'
>
<
Select
.
Option
>
11
</
Select
.
Option
>
</
Select
>
</
Form
.
Item
>
</
Form
>
</
div
>
...
...
src/pages/mallManage/rentGoods/rentAddOrEdit/components/skuInfo/index.scss
0 → 100644
浏览文件 @
a2d16a64
.sku-info
{
&
-title
{
font-size
:
15px
;
font-weight
:
bold
;
line-height
:
40px
;
}
}
src/pages/mallManage/rentGoods/rentAddOrEdit/components/skuInfo/index.tsx
0 → 100644
浏览文件 @
a2d16a64
import
'./index.scss'
;
import
{
Button
,
Col
,
Row
,
Table
}
from
'antd'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
ColumnsType
}
from
'antd/es/table/InternalTable'
;
const
SkuInfo
=
()
=>
{
const
skuTableColumns
:
ColumnsType
<
any
>
=
[
{
title
:
'版本'
,
align
:
'center'
,
},
{
title
:
'是否缺货'
,
align
:
'center'
,
},
{
title
:
'押金'
,
align
:
'center'
,
},
];
return
(
<
div
className=
'sku-info'
>
<
div
className=
'sku-info-title'
>
价格库存信息
</
div
>
<
Row
>
<
Col
span=
{
1
}
></
Col
>
<
Col
span=
{
22
}
>
<
div
>
<
Button
type=
'primary'
icon=
{
<
PlusOutlined
/>
}
style=
{
{
marginBottom
:
'10px'
}
}
>
新增规格
</
Button
>
<
Table
bordered
columns=
{
skuTableColumns
}
/>
</
div
>
</
Col
>
</
Row
>
</
div
>
);
};
export
default
SkuInfo
;
src/pages/mallManage/rentGoods/rentAddOrEdit/index.tsx
浏览文件 @
a2d16a64
import
RentInfo
from
'./components/rent
Info'
;
import
GoodsInfo
from
'./components/goods
Info'
;
import
RentAttr
from
'./components/rentAttr'
;
import
RentInfo
from
'./components/rentInfo'
;
import
SkuInfo
from
'./components/skuInfo'
;
const
RentAddOrEdit
=
()
=>
{
return
(
<
div
className=
'rent-create-edit'
>
{
/*商品信息*/
}
<
Rent
Info
/>
<
Goods
Info
/>
{
/*商品属性*/
}
<
RentAttr
/>
{
/*租赁信息*/
}
<
RentInfo
/>
{
/*价格库存信息*/
}
<
SkuInfo
/>
</
div
>
);
};
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论