商品列表编辑报错
This commit is contained in:
parent
669cf35f85
commit
4d3100a2ae
@ -348,8 +348,10 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function commitOpa() {
|
function commitOpa() {
|
||||||
for (let index = 0; index < data.skusList.length; index++) {
|
let skus = JSON.parse(JSON.stringify(data.skusList))
|
||||||
let item = data.skusList[index]
|
for (let index = 0; index < skus.length; index++) {
|
||||||
|
let item = skus[index]
|
||||||
|
Reflect.deleteProperty(item, "mx_goods_skus")
|
||||||
item.freight_cost = item.freight_cost || 0
|
item.freight_cost = item.freight_cost || 0
|
||||||
if(!item.goods_cost || item.goods_cost * 1 == 0) {
|
if(!item.goods_cost || item.goods_cost * 1 == 0) {
|
||||||
// return ElMessage({ type: 'info', message: '商品成本必填' })
|
// return ElMessage({ type: 'info', message: '商品成本必填' })
|
||||||
@ -363,7 +365,7 @@ export default {
|
|||||||
let params = {
|
let params = {
|
||||||
...data.itemInfo
|
...data.itemInfo
|
||||||
}
|
}
|
||||||
params.skus = data.skusList || []
|
params.skus = skus || []
|
||||||
params.images = imgs
|
params.images = imgs
|
||||||
if(data.opaType == 'add') {
|
if(data.opaType == 'add') {
|
||||||
post(`/api/goods`, params).then(() => {
|
post(`/api/goods`, params).then(() => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user