Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
提交
议题看板
打开侧边栏
jingqi.liu
pica.cloud.web-education-admin
提交
11fe9eeb
提交
11fe9eeb
编写于
8月 26, 2020
作者:
chendeli
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug修复
上级
86834059
变更
1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
27 行增加
和
11 行删除
+27
-11
create-good.vue
src/views/goods/create-good.vue
+27
-11
未找到文件。
src/views/goods/create-good.vue
浏览文件 @
11fe9eeb
...
@@ -379,7 +379,7 @@
...
@@ -379,7 +379,7 @@
<el-col
:span=
"20"
>
<el-col
:span=
"20"
>
<div
class=
"stock-com"
>
<div
class=
"stock-com"
>
<span
class=
"sp sp-l"
@
click=
"changeStock(1)"
:class=
"
{'opac':formData.stock == 0}">
<i
class=
"el-icon-minus"
></i></span>
<span
class=
"sp sp-l"
@
click=
"changeStock(1)"
:class=
"
{'opac':formData.stock == 0}">
<i
class=
"el-icon-minus"
></i></span>
<span
class=
"sp sp-c"
>
{{
formData
.
goodsS
tock
}}
</span>
<span
class=
"sp sp-c"
>
{{
formData
.
s
tock
}}
</span>
<span
class=
"sp sp-r"
@
click=
"changeStock(2)"
><i
class=
"el-icon-plus"
></i></span>
<span
class=
"sp sp-r"
@
click=
"changeStock(2)"
><i
class=
"el-icon-plus"
></i></span>
</div>
</div>
<p
class=
"error-message"
v-if=
"!isgoodStock"
>
库存不能为0
</p>
<p
class=
"error-message"
v-if=
"!isgoodStock"
>
库存不能为0
</p>
...
@@ -690,7 +690,17 @@
...
@@ -690,7 +690,17 @@
this.isMedic = this.formData.goodsType == 5 ? true : false
this.isMedic = this.formData.goodsType == 5 ? true : false
this.formData.stock = this.formData.goodsStock
this.formData.stock = this.formData.goodsStock
if(this.isMedic){
if(this.isMedic){
this.getLever(5,2)
this.getLever(5,2,1)
}
const {categoryIdLevel2,categoryIdLevel3,categoryIdLevel4,categoryIdLevel5} = this.formData
if(categoryIdLevel2 != -1){
this.getLever(categoryIdLevel2,3,1)
}
if(categoryIdLevel3 != -1){
this.getLever(categoryIdLevel3,4,1)
}
if(categoryIdLevel4 != -1){
this.getLever(categoryIdLevel4,5,1)
}
}
console.log(this.formData)
console.log(this.formData)
...
@@ -753,7 +763,7 @@
...
@@ -753,7 +763,7 @@
},
},
//获取分类
//获取分类
getLever(id,type){
getLever(id,type
,parm
){
this.GET("
store
/
category
/
"+id).then(res => {
this.GET("
store
/
category
/
"+id).then(res => {
console.log(res)
console.log(res)
...
@@ -766,13 +776,19 @@
...
@@ -766,13 +776,19 @@
this.twoLever = res.data || this.defaultArr()
this.twoLever = res.data || this.defaultArr()
}else if(type == 3){
}else if(type == 3){
this.threeLever = res.data.length > 0 ? res.data : this.defaultArr()
this.threeLever = res.data.length > 0 ? res.data : this.defaultArr()
this.formData.categoryIdLevel3 = ''
if(!parm){
this.formData.categoryIdLevel4 = ''
this.formData.categoryIdLevel3 = ''
this.formData.categoryIdLevel5 = ''
this.formData.categoryIdLevel4 = ''
this.formData.categoryIdLevel5 = ''
}
}else if(type == 4){
}else if(type == 4){
this.fourLever = res.data.length > 0 ? res.data : this.defaultArr()
this.fourLever = res.data.length > 0 ? res.data : this.defaultArr()
this.formData.categoryIdLevel4 = ''
if(!parm){
this.formData.categoryIdLevel5 = ''
this.formData.categoryIdLevel4 = ''
this.formData.categoryIdLevel5 = ''
}
}else if(type == 5){
}else if(type == 5){
this.fiveLever = res.data.length > 0 ? res.data : this.defaultArr()
this.fiveLever = res.data.length > 0 ? res.data : this.defaultArr()
}
}
...
@@ -803,14 +819,14 @@
...
@@ -803,14 +819,14 @@
});
});
}
}
this.formData.stock -= this.stock.num
this.formData.stock -= this.stock.num
this.formData.decrStock =
this.formData.stock
this.formData.decrStock =
Number(this.stock.num)
this.formData.incrStock = ''
this.formData.incrStock = ''
}else if(this.stock.type == 2){
}else if(this.stock.type == 2){
this.formData.stock = Number(this.stock.num) + Number(this.formData.stock)
this.formData.stock = Number(this.stock.num) + Number(this.formData.stock)
this.formData.incrStock =
this.formData.stock
this.formData.incrStock =
Number(this.stock.num)
this.formData.decrStock = ''
this.formData.decrStock = ''
}
}
this.formData.goodsStock = this.formData.stock
//
this.formData.goodsStock = this.formData.stock
this.stockDio = false
this.stockDio = false
},
},
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录