Commit 4df60ee1 by 李伟康

提交

1 parent 33bed63e
......@@ -701,14 +701,12 @@ export default {
this.$set(this.searchFormData[2], 'optionList', this.$common.utils.deepClone(merchantNameList))
},
formatterNumber (goodsList, key) {
console.log(goodsList)
formatterNumber (cell, key) {
const str = []
// goodsList && goodsList.map(e => {
// console.log(e[key])
// str.push(key != 'goodsStock' ? (e[key] / 100).toFixed(2) : e[key])
// })
return str.join(',')
cell?.goodsList.map(e => {
str.push(key != 'goodsStock' ? (e[key] / 100).toFixed(2) : e[key])
})
return str.length > 0 ? str.join(',') : '--'
}
}
}
......
......@@ -1209,7 +1209,6 @@ export default {
selectedList: [],
selectedProInfo: [],
// selectedProInfo: {},
specificationDetailList: [],
nameToValSpecsList: [],
activityInfo: {},
......@@ -1575,7 +1574,7 @@ export default {
{
validator: (rule, value, callback) => {
const { dataset: { index } } = event.target || event.srcElement
if (typeof index == 'undefined' && value) return callback()
if (typeof index == 'undefined' && value > -1) return callback()
const { activityPrice } = this.editForm.goodsList[index],
{ selectedProInfo } = this
......@@ -1592,7 +1591,7 @@ export default {
{
validator: (rule, value, callback) => {
const { dataset: { index } } = event.target || event.srcElement
if (typeof index == 'undefined' && value) return callback()
if (typeof index == 'undefined' && value > -1) return callback()
const { crowdFundingPrice } = this.editForm.goodsList[index],
{ selectedProInfo } = this
if (!crowdFundingPrice) return callback(new Error('请先填写众筹价'))
......@@ -1607,7 +1606,7 @@ export default {
{
validator: (rule, value, callback) => {
const { dataset: { index } } = event.target || event.srcElement
if (typeof index == 'undefined' && value) return callback()
if (typeof index == 'undefined' && value > -1) return callback()
if (value < 1) return callback(new Error('请设置活动库存'))
},
trigger: 'change'
......@@ -2437,12 +2436,9 @@ export default {
},
formatAppend (val, target, index, isInt) {
let str = String(val)
if (isInt) {
val = Math.floor(val)
console.log(val)
}
if (str.indexOf('.') > 0) val = Number(str.slice(0, str.indexOf('.') + 3))
this.editForm.goodsList[index][target] = Math.abs(val)
if (isInt) val = Math.floor(val)
if (str.split('.').length) val = str.slice(0, str.indexOf('.') + 3)
this.editForm.goodsList[index][target] = val < 0 ? 1 : val
},
handleSingleSelectConfirm (list) {
let { editForm: { goodsList } } = this,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!