Commit 4df60ee1 by 李伟康

提交

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