Commit dd99811c by 前端

开发环境调整

1 parent 93c096dc
...@@ -265,8 +265,8 @@ export default { ...@@ -265,8 +265,8 @@ export default {
confirmPriceChange(e) { confirmPriceChange(e) {
this.batchPrice = e.batchPrice this.batchPrice = e.batchPrice
this.batchCount = e.batchCount this.batchCount = e.batchCount
if (!this.batchPrice && this.batchPrice !== 0 && this.batchPrice !== '0') return this.$message({ if (!this.batchCount && this.batchCount !== 0 && this.batchCount !== '0') return this.$message({
message: '请输入金额', message: '请输入积分',
type: 'error', type: 'error',
customClass: 'msgHierarchy' customClass: 'msgHierarchy'
}); });
......
...@@ -247,8 +247,8 @@ export default { ...@@ -247,8 +247,8 @@ export default {
confirmPriceChange(e) { confirmPriceChange(e) {
this.batchPrice = e.batchPrice this.batchPrice = e.batchPrice
this.batchCount = e.batchCount this.batchCount = e.batchCount
if (!this.batchPrice && this.batchPrice !== 0 && this.batchPrice !== '0') return this.$message({ if (!this.batchCount && this.batchCount !== 0 && this.batchCount !== '0') return this.$message({
message: '请输入金额', message: '请输入积分',
type: 'error', type: 'error',
customClass: 'msgHierarchy' customClass: 'msgHierarchy'
}); });
...@@ -322,16 +322,24 @@ export default { ...@@ -322,16 +322,24 @@ export default {
businessType: 1 businessType: 1
} }
let tip = `确定把 ${item.goodsSkuName} ${operate}?` let tip = `确定把 ${item.goodsSkuName} ${operate}?`
let conversionRateAll
if (isAll) { if (isAll) {
const list = this.getAllData() const list = this.getAllData()
if (!list?.length) return this.$message.error(`请选择要${operate}的商品`) if (!list?.length) return this.$message.error(`请选择要${operate}的商品`)
params.ids = list.map(item => item.id) params.ids = list.map(item => item.id)
conversionRateAll = list.every(item => item.redeemPoints && item.salePrice)
tip = `确定把已选的${list.length}个商品全部${operate}?` tip = `确定把已选的${list.length}个商品全部${operate}?`
} }
console.log(conversionRateAll)
this.$confirm(tip, '提示', { this.$confirm(tip, '提示', {
type: 'warning', type: 'warning',
callback: action => { callback: action => {
if (action == 'confirm') { if (action == 'confirm') {
if (operate == '上架销售' && (!isAll && (!item.redeemPoints || !item.salePrice) ) || (isAll && !conversionRateAll)) {
this.$message.error('请先输入兑换价')
return
}
Api(params).then(res => { Api(params).then(res => {
if (res) { if (res) {
this.$message.success('操作成功') this.$message.success('操作成功')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!