Merge remote-tracking branch 'origin/master'

This commit is contained in:
齐天大圣 2024-03-06 16:42:57 +08:00
commit 7293a918a5
3 changed files with 22 additions and 9 deletions

View File

@ -235,8 +235,7 @@
label="有效期(天)" label="有效期(天)"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span > <el-input-number v-model="scope.row.giftCardTime" controls-position="right" :min="1" :max="9999"></el-input-number> </span> <span > <el-input-number v-model="scope.row.giftCardTime" controls-position="right" :min="1" :max="9999"></el-input-number> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column

View File

@ -134,6 +134,12 @@
v-if="scope.row.isonline == 0" v-if="scope.row.isonline == 0"
@click="ordai(scope.row)" @click="ordai(scope.row)"
>下线</el-button> >下线</el-button>
<el-button
size="mini"
type="text"
v-if="scope.row.isonline == 1"
@click="handleDelete1(scope.row)"
>删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -589,6 +595,14 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
handleDelete1(data){
delFavorable(data.id).then(res => {
if (res.code==200){
this.$modal.msgSuccess("删除成功");
this.getList();
}
})
},
// //
cancel() { cancel() {
this.open = false; this.open = false;
@ -681,9 +695,9 @@ export default {
}) })
}, },
ordai(row){ async ordai(row){
// //
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;
@ -691,7 +705,7 @@ export default {
} }
}) })
// //
updateFavorable(this.form).then(response => { await updateFavorable(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();

View File

@ -97,12 +97,12 @@ public class CardFavorableController extends BaseController {
/** /**
* 删除数据 * 删除数据
* *
* @param idList 主键结合 * @param id 主键结合
* @return 删除结果 * @return 删除结果
*/ */
@DeleteMapping @DeleteMapping("/{id}")
public ResponseObject delete(@RequestParam("idList") List<Long> idList) { public ResponseObject delete(@PathVariable Integer id) {
return getSuccessResult(this.cardFavorableService.removeByIds(idList)); return getSuccessResult(this.cardFavorableService.removeById(id));
} }
/** /**