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 QRCode from 'qrcodejs2'
import { listFavorable, getFavorable,getcardFavorable,getcount,getcountList, delFavorable, addFavorable, updateFavorable } from "@/api/EventMarketing/cardFavorable"; import { listFavorable, getFavorable,getcardFavorable,getcount,getcountList, delFavorable, addFavorable, updateFavorable } from "@/api/EventMarketing/cardFavorable";
import { getoilName, } from "@/api/EventMarketing/activeConsumption"; import { getoilName, } from "@/api/EventMarketing/activeConsumption";
import {deleteById} from "@/api/EventMarketing/oilBlock";
export default { export default {
name: "Favorable", name: "Favorable",
data() { data() {
@ -597,12 +598,13 @@ export default {
}); });
}, },
handleDelete1(data){ handleDelete1(data){
delFavorable(data.id).then(res => {
if (res.code==200){ this.$modal.confirm('确定删除此条优惠券信息?').then(function() {
this.$modal.msgSuccess("删除成功"); return delFavorable(data.id);
this.getList(); }).then(() => {
} this.$modal.msgSuccess("删除成功");
}) this.getList();
}).catch(() => {});
}, },
// //
cancel() { cancel() {
@ -698,19 +700,28 @@ export default {
}, },
async ordai(row){ async ordai(row){
// //
await getcardFavorable(row.id).then(res=>{ // await getcardFavorable(row.id).then(res=>{
console.log(res) // console.log(res)
if(res.code == 200){ // if(res.code == 200){
this.form = res.data; // this.form = res.data;
this.form.isonline = 1 // this.form.isonline = 1
} //
}) // }
// // })
await updateFavorable(this.form).then(response => { this.$modal.confirm('确定下线此条优惠券信息?').then(function() {
return updateFavorable({id:row.id,isonline:1});
}).then(() => {
console.log(111)
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); 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-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> <template slot="append">/</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="满足金额" prop="rechargeBalance"> <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> <template slot="append"></template>
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -296,6 +296,7 @@
<script> <script>
import { getList,oilName,addList,eitList,getById,getoilnum,getstatistics,deleteById} from "@/api/EventMarketing/oilBlock"; import { getList,oilName,addList,eitList,getById,getoilnum,getstatistics,deleteById} from "@/api/EventMarketing/oilBlock";
import {deletedelById} from "@/api/EventMarketing/SaveBlock";
export default { export default {
dicts: ['oil_type'], dicts: ['oil_type'],
name: 'index', name: 'index',
@ -327,8 +328,8 @@
oilList:[], oilList:[],
ruleForm:{ ruleForm:{
oilType:2, oilType:2,
lockupPrice: 0 , lockupPrice: "" ,
rechargeBalance:0, rechargeBalance:"",
incomeLitres:0, incomeLitres:0,
points:'', points:'',
status:'0', status:'0',
@ -497,12 +498,13 @@
this.centerDialogVisible = false this.centerDialogVisible = false
}, },
handleDelete(data){ handleDelete(data){
deleteById(data.id).then(res => {
if (res.code == 200) { this.$modal.confirm('确定删除此条电子囤油卡信息?').then(function() {
this.$message.success('删除成功') return deleteById(data.id);
this.getList() }).then(() => {
} this.getlist()
}) this.$modal.msgSuccess("删除成功");
}).catch(() => {});
}, },
handleUpdate(data){ handleUpdate(data){
getById(data.id).then(res=>{ getById(data.id).then(res=>{

View File

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