提交 d0045868 编写于 作者: yi.li's avatar yi.li

Merge branch 'dev-market-20200813' of...

Merge branch 'dev-market-20200813' of 192.168.110.53:com.pica.cloud.education.frontend/pica.cloud.web-education-admin into dev-market-20200813
......@@ -689,6 +689,8 @@
this.fileIntrList = this.getImges(goodsList[0].medicImgList,2)
this.isMedic = this.formData.goodsType == 5 ? true : false
this.formData.stock = this.formData.goodsStock
console.log(this.formData.otc)
this.formData.otc1 = this.formData.otc ? '1' : '0'
if(this.isMedic){
this.getLever(5,2,1)
}
......@@ -775,7 +777,9 @@
this.twoLever = res.data || this.defaultArr()
}else if(type == 3){
this.threeLever = res.data.length > 0 ? res.data : this.defaultArr()
// res.data = res.data.push({categoryName: "其他",id:-1})
res.data = res.data.length > 0 ? res.data.concat([{categoryName: "其他",id:-1}]) : this.defaultArr()
this.threeLever = res.data
if(!parm){
this.formData.categoryIdLevel3 = ''
this.formData.categoryIdLevel4 = ''
......@@ -783,14 +787,15 @@
}
}else if(type == 4){
this.fourLever = res.data.length > 0 ? res.data : this.defaultArr()
res.data = res.data.length > 0 ? res.data.concat([{categoryName: "其他",id:-1}]) : this.defaultArr()
this.fourLever = res.data
if(!parm){
this.formData.categoryIdLevel4 = ''
this.formData.categoryIdLevel5 = ''
}
}else if(type == 5){
this.fiveLever = res.data.length > 0 ? res.data : this.defaultArr()
res.data = res.data.length > 0 ? res.data.concat([{categoryName: "其他",id:-1}]) : this.defaultArr()
this.fiveLever = res.data
}
});
},
......@@ -818,11 +823,11 @@
type: 'warning'
});
}
this.formData.stock -= this.stock.num
this.formData.stock = this.formData.goodsStock - this.stock.num
this.formData.decrStock = Number(this.stock.num)
this.formData.incrStock = ''
}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.goodsStock)
this.formData.incrStock = Number(this.stock.num)
this.formData.decrStock = ''
}
......@@ -869,7 +874,7 @@
this.isSpecification_url = this.formData.specificationImages.length == 0 ? false : true
this.formData.categoryId = this.formData.goodsType
this.formData.otc = this.formData.otc1 == 1 ? true : false
this.isgoodStock = this.formData.goodsStock > 0 ? true : false
this.isgoodStock = this.formData.stock > 0 ? true : false
console.log(this.isgoodStock)
if(this.isMedic){
if(!this.isgoodsImages){
......@@ -1007,7 +1012,7 @@
// return;
}
if (!isLt2M) {
vm.$message.error("图片大小不符合规范,请根据规范上传图片 ");
vm.$message.error("图片大小请控制在2M以内 ");
return;
}
let _img = new FileReader();
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册