Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
07fc52f6
提交
07fc52f6
编写于
6月 26, 2021
作者:
minghao.wu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feature: 商品详情页增加起购件数和购买上限字段
上级
88a695c9
变更
2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
49 行增加
和
2 行删除
+49
-2
create-good.vue
src/views/goods/create-good.vue
+44
-0
forms.js
src/views/goods/forms.js
+5
-2
未找到文件。
src/views/goods/create-good.vue
浏览文件 @
07fc52f6
...
...
@@ -691,6 +691,35 @@
</el-col>
</el-form-item>
</div>
<div
class=
"inline"
>
<el-form-item
label=
"最小起购件数"
prop=
"name"
class=
"required-label"
>
<el-col
:span=
"20"
>
<div
class=
"stock-com"
>
<span
class=
"sp sp-l"
@
click=
"minusCount(1)"
><i
class=
"el-icon-minus"
></i></span>
<span
class=
"sp sp-c"
>
{{
formData
.
leastCount
}}
</span>
<span
class=
"sp sp-r"
@
click=
"plusCount(1)"
><i
class=
"el-icon-plus"
></i></span>
</div>
<p
class=
"error-message"
v-if=
"formData.leastCount
<
=
0
"
>
最小起购件数不能为0
</p>
</el-col>
</el-form-item>
</div>
<div
class=
"inline"
>
<el-form-item
label=
"单次购买上限"
prop=
"name"
class=
"required-label"
>
<el-col
:span=
"20"
>
<div
class=
"stock-com"
>
<span
class=
"sp sp-l"
@
click=
"minusCount(2)"
><i
class=
"el-icon-minus"
></i></span>
<span
class=
"sp sp-c"
>
{{
formData
.
mostCount
}}
</span>
<span
class=
"sp sp-r"
@
click=
"plusCount(2)"
><i
class=
"el-icon-plus"
></i></span>
</div>
<p
class=
"error-message"
v-if=
"formData.mostCount === 0"
>
单次购买上限不能为0
</p>
<p
class=
"error-message"
v-if=
"formData.mostCount
<
=
-1
"
>
单次购买上限已无限制
</p>
</el-col>
</el-form-item>
</div>
<div
class=
"inline"
>
<el-form-item
label=
"第三方商品编码"
prop=
"externalGoodsCode"
>
<el-col
:span=
"20"
>
...
...
@@ -1453,6 +1482,21 @@
argument
[
3
]
&&
argument
[
3
].
destroy
();
// vm.slide2.oriUrl = "";
},
// 单次购买上限和最大购买数
minusCount
(
type
)
{
if
(
type
===
1
)
{
this
.
formData
.
leastCount
-=
1
}
else
if
(
type
===
2
)
{
this
.
formData
.
mostCount
-=
1
}
},
plusCount
(
type
)
{
if
(
type
===
1
)
{
this
.
formData
.
leastCount
+=
1
}
else
if
(
type
===
2
)
{
this
.
formData
.
mostCount
+=
1
}
},
// 上传七牛
doUploadQiNiu
(
file
){
...
...
src/views/goods/forms.js
浏览文件 @
07fc52f6
...
...
@@ -60,10 +60,13 @@ const form = {
optPrice
:
''
,
goodsStock
:
0
,
stock
:
0
,
externalGoodsCode
:
''
externalGoodsCode
:
''
,
leastCount
:
1
,
mostCount
:
-
1
,
incrType
:
1
};
export
const
originForm1
=
form1
;
export
const
originForm2
=
form2
;
export
const
originForm
=
form
;
\ No newline at end of file
export
const
originForm
=
form
;
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录