活动修改
This commit is contained in:
parent
d8eba6ea2e
commit
5b0b69bf97
|
|
@ -106,17 +106,27 @@ export default {
|
|||
methods: {
|
||||
// 切换状态
|
||||
async statusChange(e, row) {
|
||||
try {
|
||||
this.tableData.loading = true
|
||||
const data = { ...row }
|
||||
data.isUseCoupon = e
|
||||
console.log(data.isUseCoupon)
|
||||
await storageupActivate(data)
|
||||
this.getTableData()
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
this.tableData.loading = false
|
||||
if (row.couponName) {
|
||||
try {
|
||||
this.tableData.loading = true
|
||||
const data = { ...row }
|
||||
data.isUseCoupon = e
|
||||
console.log(data.isUseCoupon)
|
||||
await storageupActivate(data)
|
||||
this.getTableData()
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
this.tableData.loading = false
|
||||
}
|
||||
} else {
|
||||
console.log(22)
|
||||
this.$message({
|
||||
message: '请选择优惠劵',
|
||||
type: 'warning'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
},
|
||||
// 重置查询
|
||||
resetHandle() {
|
||||
|
|
|
|||
|
|
@ -64,8 +64,9 @@
|
|||
<div class="name">{{ item.title }}</div>
|
||||
<!-- <el-input style="width: 120px;" v-model="item.num" placeholder='请填写数量'
|
||||
@input="checkIfNum(item)"></el-input> -->
|
||||
<el-button type="text" @click="productIds.splice(index, 1)"
|
||||
style="margin-left: 20px;">删除</el-button>
|
||||
<!-- <el-button type="text" @click="productIds.splice(index, 1)"
|
||||
style="margin-left: 20px;">删除</el-button> -->
|
||||
<el-button type="text" @click="productIds = []" style="margin-left: 20px;">删除</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
|
@ -210,7 +211,11 @@ export default {
|
|||
this.form = { ...obj }
|
||||
// let res = await activate(obj.id)
|
||||
// this.productIds = res
|
||||
console.log(res, '调试1')
|
||||
if (obj.couponName) {
|
||||
this.productIds = [{ title: obj.couponName }]
|
||||
|
||||
}
|
||||
console.log(obj, '调试1')
|
||||
}
|
||||
},
|
||||
close() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue