Commit ff782602 by 李伟康

提交

1 parent 42ceacf1
...@@ -505,6 +505,7 @@ import glsxCombiForm from '@/components/glsx-combi-form' ...@@ -505,6 +505,7 @@ import glsxCombiForm from '@/components/glsx-combi-form'
import selectGoods from './components/selectGoods' import selectGoods from './components/selectGoods'
import selectMerchantDialog from './components/selectMerchantDialog' import selectMerchantDialog from './components/selectMerchantDialog'
import NP from 'number-precision' import NP from 'number-precision'
import { del } from 'vue'
export default { export default {
name: 'add', name: 'add',
components: { components: {
...@@ -948,7 +949,7 @@ export default { ...@@ -948,7 +949,7 @@ export default {
this.goodsVisible = false this.goodsVisible = false
}, },
handleGoodsConfirm (e) { handleGoodsConfirm (e) {
const {goodsSource} = this.formObj const { goodsSource } = this.formObj
if (this.formObj.smartcarlifeInfoId != e?.id && goodsSource != 3) this.saleMerchantList = [] if (this.formObj.smartcarlifeInfoId != e?.id && goodsSource != 3) this.saleMerchantList = []
let { id, goodsName, goodsImage, minSellPrice, retailPrice, goodsVideo, goodsId } = e || {} let { id, goodsName, goodsImage, minSellPrice, retailPrice, goodsVideo, goodsId } = e || {}
minSellPrice = minSellPrice ? Number(Number(minSellPrice / 100).toFixed(2)) : 0 minSellPrice = minSellPrice ? Number(Number(minSellPrice / 100).toFixed(2)) : 0
...@@ -1039,6 +1040,7 @@ export default { ...@@ -1039,6 +1040,7 @@ export default {
delete obj.retailPrice delete obj.retailPrice
delete obj.coverList delete obj.coverList
delete obj.styleBImgList delete obj.styleBImgList
delete obj.id // 油券默认带了id
let saleMerchantList = this.saleMerchantList.map(item => { let saleMerchantList = this.saleMerchantList.map(item => {
let { merchantId, merchantName, activityPrice, giveIntegral, originalPrice, exchangeIntegralFlag, exchangeIntegral } = item let { merchantId, merchantName, activityPrice, giveIntegral, originalPrice, exchangeIntegralFlag, exchangeIntegral } = item
if (obj.goodsSource == 3) merchantId = item.merchantNo if (obj.goodsSource == 3) merchantId = item.merchantNo
...@@ -1104,7 +1106,7 @@ export default { ...@@ -1104,7 +1106,7 @@ export default {
this.saleMerchantList = res.saleMerchantList?.map(item => { this.saleMerchantList = res.saleMerchantList?.map(item => {
let activityPrice = item.activityPrice ? Number(Number(item.activityPrice / 100).toFixed(2)) : 0 let activityPrice = item.activityPrice ? Number(Number(item.activityPrice / 100).toFixed(2)) : 0
let originalPrice = item.originalPrice ? Number(Number(item.originalPrice / 100).toFixed(2)) : 0 let originalPrice = item.originalPrice ? Number(Number(item.originalPrice / 100).toFixed(2)) : 0
if(res.goodsSource == 3) item.merchantNo = String(item.merchantId) if (res.goodsSource == 3) item.merchantNo = String(item.merchantId)
return { ...item, activityPrice, originalPrice } return { ...item, activityPrice, originalPrice }
}) || [] }) || []
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!