提交 25baee5c authored 作者: 郑伟娜's avatar 郑伟娜

修改获取默认模板

上级 fa06f119
...@@ -138,6 +138,10 @@ ...@@ -138,6 +138,10 @@
goodsaftersale: { goodsaftersale: {
type: Object, type: Object,
required: true required: true
},
option: {
type: Number,
required: true
} }
}, },
data() { data() {
...@@ -237,6 +241,14 @@ ...@@ -237,6 +241,14 @@
GetFreight(params).then(res => { GetFreight(params).then(res => {
if(res.data) { if(res.data) {
this.freightOptions = res.data; this.freightOptions = res.data;
if (this.option == 0) {
for (let i = 0; i < this.freightOptions.length; i++) {
if (this.freightOptions[i].is_default == 1) {
this.goodsAfterSaleForm.freight_id = this.freightOptions[i].id
}
}
}
}else { }else {
this.freightOptions = '' this.freightOptions = ''
} }
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
</div> </div>
</div> </div>
<!-- 售后及服务 --> <!-- 售后及服务 -->
<Goodsaftersale class="floor-item" style="box-shadow:none;" ref="goodsaftersale" :goodsaftersale="goodsaftersale" /> <Goodsaftersale class="floor-item" style="box-shadow:none;" ref="goodsaftersale" :goodsaftersale="goodsaftersale" :option="option" />
<div class="submit-type-con"> <div class="submit-type-con">
...@@ -201,7 +201,7 @@ ...@@ -201,7 +201,7 @@
created() { created() {
// option 商品的id // option 商品的id
//debugger //debugger
this.option = Number(this.$route.query.goods_id) this.option = Number(this.$route.query.goods_id) || 0
if( this.option && this.option !== 0 ) { if( this.option && this.option !== 0 ) {
let data = { goodsId: this.option}; let data = { goodsId: this.option};
getGoodsNew(data).then(res => { getGoodsNew(data).then(res => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论