|
@@ -162,7 +162,7 @@ export default {
|
|
const { goodsId, title, picUrl, exchangeShow, multiSku, value, exchangePrice, cost, quantity, description, skuList } = res.data
|
|
const { goodsId, title, picUrl, exchangeShow, multiSku, value, exchangePrice, cost, quantity, description, skuList } = res.data
|
|
this.addData = {
|
|
this.addData = {
|
|
value: accDiv(value, 100),
|
|
value: accDiv(value, 100),
|
|
- cost: accDiv(cost, 100),
|
|
|
|
|
|
+ cost: cost == '' || cost == null ? '' : accDiv(cost, 100),
|
|
goodsId, title, picUrl, exchangeShow, multiSku, exchangePrice, quantity, description, skuList
|
|
goodsId, title, picUrl, exchangeShow, multiSku, exchangePrice, quantity, description, skuList
|
|
}
|
|
}
|
|
if (multiSku && skuList instanceof Array && skuList.length > 0) {
|
|
if (multiSku && skuList instanceof Array && skuList.length > 0) {
|
|
@@ -188,8 +188,8 @@ export default {
|
|
const { value, cost, description, ...rest } = this.addData
|
|
const { value, cost, description, ...rest } = this.addData
|
|
addGoods({...rest, ...{
|
|
addGoods({...rest, ...{
|
|
value: accMul(value, 100),
|
|
value: accMul(value, 100),
|
|
- cost: accMul(cost, 100),
|
|
|
|
- exchangePrice: accMul(value, 1000),
|
|
|
|
|
|
+ cost: cost == '' || cost == null ? '' : accMul(cost, 100),
|
|
|
|
+ exchangePrice: accMul(value, 10),
|
|
description: encodeURI(description)
|
|
description: encodeURI(description)
|
|
}}).then(res => {
|
|
}}).then(res => {
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|