This commit is contained in:
zmj 2024-05-15 18:36:33 +08:00
parent c5a5557da8
commit 39a49b1b43
2 changed files with 17 additions and 9 deletions

View File

@ -722,7 +722,7 @@
})
},
submit() {
// console.log(this.formData)
console.log(this.formData)
this.$refs.formData.validate().then(res => {
this.handAdd()
}).catch(errors => {
@ -768,6 +768,12 @@
this.showSet = option.showSet ? JSON.parse(option.showSet) : this.showSet
this.isSet2()
this.formData.delivery_way = this.$store.state.app.userInfo?.mer_info.delivery_way.split(',')
if (this.formData.delivery_way.length == 1) {
this.checkboxList1 = this.checkboxList1.filter(item => {
return item.value == this.formData.delivery_free[0]
})
}
if (option.product_id) {
this.formData.product_id = option.product_id
this.mode = 'edit'
@ -781,9 +787,18 @@
delete this.formData.image_list
if (!this.formData.imageList) this.formData.imageList = []
this.oldToNew(this.formData)
if (this.formData.delivery_free.length == 1) {
this.checkboxList1 = this.checkboxList1.filter(item => {
return item.value == this.formData.delivery_free[0]
})
}
console.log(this.formData, 'formDATA')
})
}
console.log(JSON.parse(option.formData))
},
onBackPress: function(e) {
this.showlay = true

View File

@ -256,13 +256,11 @@
uni.$u.toast(errList[0])
return
}
console.log(this.attrValue)
//
this.formData.attr[0].detail = []
this.attrValue.forEach(item => {
typeof(item.detail) == 'object' ?
item.detail[' '] = item.sku: (item.detail = {}, item.detail[' '] = item.sku)
console.log(this.formData.attr)
this.formData.attr[0].detail.push(item.sku)
})
this.formData.attrValue = this.attrValue
@ -270,11 +268,7 @@
item.is_use = item.is_use ? '0' : '1'
})
let that = this
// this.formData.attrValue.forEach((item, index) => {
// item.detail. = this.formData.attr[index].value
// item.sku = this.formData.attr[index].value
// })
console.log(this.formData.attrValue)
this.formData.spec_type = this.formData.attrValue.length > 1 ? '1' : '0'
uni.redirectTo({
url: `/pages/product/addGoodDetail/addGoodDetail?mer_id=${that.mer_id}&&formData=${JSON.stringify(that.formData) }&&showSet=${true}`
@ -302,7 +296,6 @@
detail: [],
})
}
console.log(this.formData)
}
}