|
|
|
@ -768,6 +768,8 @@ export default {
|
|
|
|
|
getGoodsAreaoptionList().then(res=>{ |
|
|
|
|
const data = res.data.data; |
|
|
|
|
this.areaoption = data |
|
|
|
|
console.log("this.areaoption>>>>>>>>>>>>>",this.areaoption |
|
|
|
|
); |
|
|
|
|
}) |
|
|
|
|
getTemplateData("9").then(res=>{ |
|
|
|
|
console.log(res.data.data); |
|
|
|
@ -925,16 +927,16 @@ export default {
|
|
|
|
|
if (!this.form.id) { |
|
|
|
|
console.log("this.form>>>>>>>", this.form); |
|
|
|
|
console.log("this.optioner>>>>>>>", this.optioner); |
|
|
|
|
if (!!this.form.goodsAreaId && this.form.goodsAreaId.length > 1){ |
|
|
|
|
//这里需要截取最后一个ID |
|
|
|
|
let a = this.form.goodsAreaId; |
|
|
|
|
this.form.goodsAreaId = a[a.length - 1]; |
|
|
|
|
} |
|
|
|
|
this.optioner.map(item => { |
|
|
|
|
if (item.id == this.form.goodsAreaId) { |
|
|
|
|
this.form.goodsAreaName = item.headline |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
// if (!!this.form.goodsAreaId && this.form.goodsAreaId.length > 1){ |
|
|
|
|
// //这里需要截取最后一个ID |
|
|
|
|
// let a = this.form.goodsAreaId; |
|
|
|
|
// this.form.goodsAreaId = a[a.length - 1]; |
|
|
|
|
// } |
|
|
|
|
// this.optioner.map(item => { |
|
|
|
|
// if (item.id == this.form.goodsAreaId) { |
|
|
|
|
// this.form.goodsAreaName = item.headline |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
add(this.form).then(() => { |
|
|
|
|
this.box = false; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|