bug
This commit is contained in:
parent
7f990d9b34
commit
5d2a87edb7
@ -638,6 +638,7 @@
|
||||
import { getoiltype,getoilName, listActiveConsumption,listExchange,listLJGoods, getActiveConsumption, delActiveConsumption, addActiveConsumption, updateActiveConsumption,listFavorable,looklook,looklooklook } from "@/api/EventMarketing/activeConsumption";
|
||||
import {listUserGrade} from "@/api/staff/user/usergrade";
|
||||
import {getOilNameList} from "@/api/order/oilnumgun";
|
||||
import {updateExchange} from "@/api/EventMarketing/cardExchange";
|
||||
|
||||
export default {
|
||||
name: "ActiveConsumption",
|
||||
@ -1150,17 +1151,25 @@ export default {
|
||||
});
|
||||
},
|
||||
handleDeletexia(row){
|
||||
getActiveConsumption(row.id).then(response => {
|
||||
// this.form = response.data;
|
||||
let data = response.data
|
||||
data.isonline = 1
|
||||
updateActiveConsumption(data).then(response => {
|
||||
// getActiveConsumption(row.id).then(response => {
|
||||
// // this.form = response.data;
|
||||
// let data = response.data
|
||||
// data.isonline = 1
|
||||
// updateActiveConsumption(data).then(response => {
|
||||
// this.$modal.msgSuccess("下线成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
//
|
||||
// });
|
||||
|
||||
this.$modal.confirm('确定下线此条修改消费有礼活动信息?').then(function() {
|
||||
return updateActiveConsumption({id:row.id,isonline:1});
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess("下线成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
|
||||
});
|
||||
}).catch(() => {});
|
||||
},
|
||||
qiyong(row){
|
||||
if(row.isonline == 1){
|
||||
|
@ -186,8 +186,9 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品数量" prop="productCount">
|
||||
<el-input type="number" placeholder="请输入商品数量" v-model="form.productCount">
|
||||
<el-form-item label="商品数量" prop="productCount" v-if="form.type==0">
|
||||
<el-input placeholder="请输入商品数量" oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"
|
||||
v-model="form.productCount" :min="0" :max="stock" @input="goodsStock">
|
||||
<template slot="append">个</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@ -242,6 +243,8 @@ import {
|
||||
updateExchange,
|
||||
getqueryGoods, exchangeInfo
|
||||
} from '@/api/EventMarketing/cardExchange'
|
||||
import {delFavorable} from "@/api/EventMarketing/cardFavorable";
|
||||
import {getLJGoods} from "@/api/convenienceStore/ljgoods";
|
||||
|
||||
export default {
|
||||
name: 'Exchange',
|
||||
@ -288,6 +291,7 @@ export default {
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
stock:1,
|
||||
// 表单校验
|
||||
rules: {
|
||||
name: [
|
||||
@ -305,9 +309,9 @@ export default {
|
||||
useInstructions: [
|
||||
{ required: true, message: '请输入使用说明', trigger: 'change' }
|
||||
],
|
||||
productCount: [
|
||||
{ required: true, message: '请输入礼品数量', trigger: 'change' }
|
||||
],
|
||||
// productCount: [
|
||||
// { required: true, message: '请输入礼品数量', trigger: 'change' }
|
||||
// ],
|
||||
/*count: [
|
||||
{ required: true, message: '请输入参与次数', trigger: 'change' }
|
||||
],*/
|
||||
@ -326,7 +330,20 @@ export default {
|
||||
change(e){
|
||||
console.log(e)
|
||||
this.form.giftId = e
|
||||
|
||||
getLJGoods(e).then(res => {
|
||||
this.form.productCount = res.data.stock
|
||||
this.stock = res.data.stock
|
||||
this.$forceUpdate()
|
||||
console.log(res.data.stock,111,this.form.productCount)
|
||||
})
|
||||
},
|
||||
goodsStock(val){
|
||||
console.log(val)
|
||||
this.$forceUpdate()
|
||||
if (this.form.productCount>this.stock){
|
||||
this.form.productCount = this.stock
|
||||
return
|
||||
}
|
||||
},
|
||||
qrcodelook(url) {
|
||||
this.loadingdialog = true
|
||||
@ -445,20 +462,32 @@ export default {
|
||||
handleXia(row) {
|
||||
let data = row
|
||||
data.isonline = 1
|
||||
updateExchange(data).then(res => {
|
||||
if (res.code == 200) {
|
||||
// updateExchange(data).then(res => {
|
||||
// if (res.code == 200) {
|
||||
// this.$message.success('下线成功')
|
||||
// this.getList()
|
||||
// }
|
||||
// })
|
||||
this.$modal.confirm('确定下线此条兑换券信息?').then(function() {
|
||||
return updateExchange(data);
|
||||
}).then(() => {
|
||||
this.$message.success('下线成功')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
}).catch(() => {});
|
||||
},
|
||||
handleDelete(data){
|
||||
delExchange(data.id).then(res => {
|
||||
if (res.code == 200) {
|
||||
// delExchange(data.id).then(res => {
|
||||
// if (res.code == 200) {
|
||||
// this.$message.success('删除成功')
|
||||
// this.getList()
|
||||
// }
|
||||
// })
|
||||
this.$modal.confirm('确定删除此条兑换券信息?').then(function() {
|
||||
return delExchange(data.id);
|
||||
}).then(() => {
|
||||
this.$message.success('删除成功')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
}).catch(() => {});
|
||||
},
|
||||
|
||||
/** 上线操作 */
|
||||
|
Loading…
Reference in New Issue
Block a user