This commit is contained in:
cun-nan 2024-03-08 15:15:34 +08:00
parent 1b0c493806
commit ec1c438668
3 changed files with 40 additions and 27 deletions

View File

@ -385,6 +385,7 @@
import QRCode from 'qrcodejs2'
import { listFavorable, getFavorable,getcardFavorable,getcount,getcountList, delFavorable, addFavorable, updateFavorable } from "@/api/EventMarketing/cardFavorable";
import { getoilName, } from "@/api/EventMarketing/activeConsumption";
import {deleteById} from "@/api/EventMarketing/oilBlock";
export default {
name: "Favorable",
data() {
@ -597,12 +598,13 @@ export default {
});
},
handleDelete1(data){
delFavorable(data.id).then(res => {
if (res.code==200){
this.$modal.msgSuccess("删除成功");
this.getList();
}
})
this.$modal.confirm('确定删除此条优惠券信息?').then(function() {
return delFavorable(data.id);
}).then(() => {
this.$modal.msgSuccess("删除成功");
this.getList();
}).catch(() => {});
},
//
cancel() {
@ -698,19 +700,28 @@ export default {
},
async ordai(row){
//
await getcardFavorable(row.id).then(res=>{
console.log(res)
if(res.code == 200){
this.form = res.data;
this.form.isonline = 1
}
})
//
await updateFavorable(this.form).then(response => {
// await getcardFavorable(row.id).then(res=>{
// console.log(res)
// if(res.code == 200){
// this.form = res.data;
// this.form.isonline = 1
//
// }
// })
this.$modal.confirm('确定下线此条优惠券信息?').then(function() {
return updateFavorable({id:row.id,isonline:1});
}).then(() => {
console.log(111)
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
}).catch(() => {console.log(222)});
//
// await updateFavorable(this.form).then(response => {
// this.$modal.msgSuccess("");
// this.open = false;
// this.getList();
// });
},

View File

@ -222,12 +222,12 @@
<el-form-item label="锁价单价" prop="lockupPrice">
<el-input v-model="ruleForm.lockupPrice" min="1">
<el-input v-model="ruleForm.lockupPrice" min="1" placeholder="请输入锁价单价">
<template slot="append">/</template>
</el-input>
</el-form-item>
<el-form-item label="满足金额" prop="rechargeBalance">
<el-input v-model="ruleForm.rechargeBalance" min="1">
<el-input v-model="ruleForm.rechargeBalance" min="1" placeholder="请输入满足金额">
<template slot="append"></template>
</el-input>
</el-form-item>
@ -296,6 +296,7 @@
<script>
import { getList,oilName,addList,eitList,getById,getoilnum,getstatistics,deleteById} from "@/api/EventMarketing/oilBlock";
import {deletedelById} from "@/api/EventMarketing/SaveBlock";
export default {
dicts: ['oil_type'],
name: 'index',
@ -327,8 +328,8 @@
oilList:[],
ruleForm:{
oilType:2,
lockupPrice: 0 ,
rechargeBalance:0,
lockupPrice: "" ,
rechargeBalance:"",
incomeLitres:0,
points:'',
status:'0',
@ -497,12 +498,13 @@
this.centerDialogVisible = false
},
handleDelete(data){
deleteById(data.id).then(res => {
if (res.code == 200) {
this.$message.success('删除成功')
this.getList()
}
})
this.$modal.confirm('确定删除此条电子囤油卡信息?').then(function() {
return deleteById(data.id);
}).then(() => {
this.getlist()
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
handleUpdate(data){
getById(data.id).then(res=>{

View File

@ -141,7 +141,7 @@ public class CardFuelDieselController extends BaseController {
* @return 删除结果
*/
@DeleteMapping("/{id}")
public ResponseObject delete(@PathVariable("id") Long id) {
public ResponseObject delete(@PathVariable Integer id) {
return getSuccessResult(this.cardFuelDieselService.removeById(id));
}