From 5a80a60227011398c8fe306d4adcdd09297d21e2 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期四, 23 十月 2025 18:04:46 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/send_coupon' into send_coupon
---
manager/src/views/activity-prize/prize.vue | 49 ++++++++++++++++++++++++++++++++++---------------
1 files changed, 34 insertions(+), 15 deletions(-)
diff --git a/manager/src/views/activity-prize/prize.vue b/manager/src/views/activity-prize/prize.vue
index a2050a3..dbf27ac 100644
--- a/manager/src/views/activity-prize/prize.vue
+++ b/manager/src/views/activity-prize/prize.vue
@@ -588,6 +588,7 @@
handleRowClick(currentRow ,oldCurrentRow){
this.prizeFrom.couponId = currentRow.id;
this.showCoupon = currentRow.couponName;
+ console.log(this.prizeFrom.couponId)
},
getCouponDataList() {
// 鑾峰彇鏁版嵁
@@ -595,7 +596,6 @@
getPlatformCouponList(this.couponSearchForm).then((res) => {
this.couponLoading = false;
if (res.success) {
- console.log(res);
this.couponData = res.result.records;
this.couponTotal = res.result.total;
}
@@ -701,7 +701,7 @@
this.modelShow = false
this.submitLoading = false
this.showCoupon = '';
- this.$refs.form.resetFields()
+
},
getPage(){
this.loading = true;
@@ -723,10 +723,13 @@
this.infoModalShow = false;
},
openEdit(row){
+ this.$refs.form.resetFields();
+ //閲嶇疆id
//闇�瑕佸垽鏂槸鍚﹀彲浠ョ紪杈�
canUpDatePrizeDraw(row.id).then(res =>{
if (res.code === 200){
if (res.state){
+ console.log(res.data)
this.modelShow = true;
this.modelTitle = "缂栬緫濂栧搧";
this.prizeFrom ={
@@ -758,6 +761,9 @@
},
openAdd(){
this.$refs.form.resetFields()
+ //閲嶇疆id
+ this.prizeFrom.id = null;
+
this.modelShow = true;
this.modelTitle = "鏂板濂栧搧";
//娓呴櫎琛ㄥ崟鐘舵��.
@@ -767,28 +773,41 @@
this.imgTempUrl = null;
this.showCoupon = null;
},
- delById(row){
- del(row.id).then(res=>{
- if (res.code === 200){
- this.$Message.success(res.msg)
- }else {
- this.$Message.error(res.msg)
+ async delById(row){
+ let status = false
+ await canUpDatePrizeDraw(row.id).then(res => {
+
+ if (res.code === 200) {
+ status = res.state;
+
}
- this.getPage()
- })
+ });
+ if (status){
+ await del(row.id).then(res=>{
+ if (res.code === 200){
+ this.$Message.success(res.msg)
+ }else {
+ this.$Message.error(res.msg)
+ }
+ this.getPage()
+ })
+ }else {
+ this.$Message.error("璇ュ鍝佸湪鎶藉娲诲姩涓棤娉曞垹闄�!")
+ }
+
},
// 鑾峰彇瀵屾枃鏈紪杈戝櫒鐨勫唴瀹�
// 鍒濆鍖栨暟鎹�
init() {
this.getPage()
},
- changePage(){
- this.searchForm.pageNumber = 1
- this.searchForm.pageSize = pageSize
+ changePage(v){
+ this.searchForm.pageNumber = v;
this.getPage()
},
- changePageSize(){
- this.searchForm.pageNumber = page
+ changePageSize(v){
+ this.searchForm.pageNumber = 1;
+ this.searchForm.pageSize = v;
this.getPage()
},
couponChangePage(v) {
--
Gitblit v1.8.0