From f09c736d261e1ad41d97b6e974a81bb014ef1265 Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期四, 23 十月 2025 17:45:50 +0800
Subject: [PATCH] 页面调整
---
manager/src/views/activity-prize/prize-store.vue | 173 +++++++++++++++++++++++++++++++++++++++++----------------
1 files changed, 124 insertions(+), 49 deletions(-)
diff --git a/manager/src/views/activity-prize/prize-store.vue b/manager/src/views/activity-prize/prize-store.vue
index 5bc9f20..5f3ce34 100644
--- a/manager/src/views/activity-prize/prize-store.vue
+++ b/manager/src/views/activity-prize/prize-store.vue
@@ -107,7 +107,8 @@
type="primary"
class="add-btn"
v-if="row.generateStatus ==='NOT_GENERATE'"
- >鐢熸垚浼樻儬鍗�</Button>
+ >鐢熸垚搴楅摵鎶藉鍔�</Button>
+
<Button
@click="detail(row)"
style="margin-left: 10px;"
@@ -154,20 +155,27 @@
</Modal>
<Modal
- v-model="showCouponStore"
+ v-model="showPrizeClaim"
width="1200"
:mask-closable="false"
@on-cancel="handleCancelCouponStore"
>
<Table
- :loading="couponStoreLoading"
+ :loading="showPrizeClaimLoading"
border
- :columns="couponStoreColumns"
- :data="couponStoreData"
+ :columns="prizeClaimColumns"
+ :data="prizeClaimData"
ref="table"
>
<template slot-scope="{ row }" slot="action">
<Button
+ @click="lookSupplementaryMaterials(row)"
+ type="primary"
+ class="add-btn"
+ :disabled="row.material === 'NOT_GENERATE'"
+ >鏌ョ湅鏉愭枡</Button>
+ <Button
+ style="margin-left: 20px"
@click="generalQrCode(row)"
type="primary"
class="add-btn"
@@ -177,11 +185,11 @@
</Table>
<Row type="flex" justify="center" class="mt_10">
<Page
- :current="storeCouponSingleQuery.pageNumber"
- :total="couponStoreTotal"
- :page-size="storeCouponSingleQuery.pageSize"
- @on-change="couponStoreChangePage"
- @on-page-size-change="couponStoreChangePageSize"
+ :current="prizeClaimQuery.pageNumber"
+ :total="prizeClaimTotal"
+ :page-size="prizeClaimQuery.pageSize"
+ @on-change="prizeCliamChangePage"
+ @on-page-size-change="prizeCliamChangePageSize"
:page-size-opts="[10, 20, 50]"
size="small"
show-total
@@ -269,12 +277,41 @@
<Button type="primary" @click="handleSubmit" :loading="submitLoading">纭畾</Button>
</div>
</Modal>
+ <Modal
+ v-model="dialogVisible2"
+ title="鏉愭枡璇︽儏"
+ width="1200"
+ :mask-closable="false"
+ @on-cancel="handleCancel2">
+ <Row :gutter="16">
+ <Col span="12">
+ <div class="detail-item">
+ <label>鏂囨湰鍐呭锛�</label>
+ <span>{{ detailData.content }}</span>
+ </div>
+ </Col>
+ <Col span="24">
+ <div class="detail-item">
+ <label>鏂囦欢锛�</label>
+ <div v-if="detailData.urlPath" class="detail-image">
+ <img
+ :src="detailData.urlPath" alt="濂栧搧灏侀潰"
+ class="preview-image-limit"
+ >
+ </div>
+ </div>
+ </Col>
+
+ </Row>
+ </Modal>
+
+
</div>
</template>
<script>
import vueQr from "vue-qr";
-import { getPage,add,changeStatus,generateStorePrize} from "@/api/prize-store.js"
+import { getPage,add,changeStatus,generateStorePrize,getClaimPage ,getDetailData} from "@/api/prize-store.js"
import * as API_Activity_Prize from "@/api/activity-prize.js"
import * as API_Order from "@/api/order";
@@ -286,27 +323,28 @@
name: 'CouponManagement',
data() {
return {
+ detailData:{},
QRCodeUrl:"",
showGeneralQrCode:false,
codeLoading:false,
- codeUrl: this.QRcodeBaseUrl+ '/scanpage/couponStore',
+ codeUrl: this.QRcodeBaseUrl+ '/scanpage/prize',
- showCouponStore:false,
- couponStoreTotal:0,
- couponStoreData:[],
- couponStoreLoading:false,
- couponStoreColumns: [
+ showPrizeClaim:false,
+ prizeClaimTotal:0,
+ prizeClaimData:[],
+ showPrizeClaimLoading:false,
+ prizeClaimColumns: [
{
- title: "浼樻儬鍒稿悕绉�",
- key: "couponName",
+ title: "娲诲姩鍚�",
+ key: "prizeActivityName",
width: 200,
align: "center",
tooltip: true
},
{
- title: "浼樻儬鍒哥紪鍙�",
- key: "couponNo",
+ title: "缂栧彿",
+ key: "no",
width: 200,
align: "center",
tooltip: true
@@ -333,7 +371,7 @@
title: "鎿嶄綔",
slot: "action",
align: "center",
- width: 200,
+ width: 400,
fixed: "right"
}
],
@@ -410,10 +448,10 @@
total: 0,
listLoading: false,
submitLoading: false,
- storeCouponSingleQuery:{
+ prizeClaimQuery:{
pageNumber: 1,
pageSize: 10,
- refId:""
+ storePrizeId:""
},
listQuery: {
@@ -433,6 +471,8 @@
dialogVisible: false,
dialogStatus: '',
dialogTitle: '',
+ dialogVisible2: false,
+
// 琛ㄥ崟楠岃瘉瑙勫垯
formRules: {
@@ -508,6 +548,17 @@
}
},
methods: {
+ lookSupplementaryMaterials(row){
+ this.dialogVisible2 = true;
+ getDetailData(row.id).then(res =>{
+ if (res.code === 200){
+ this.detailData = res.data;
+ }
+ })
+
+
+
+ },
closeGeneralQrCode(){
this.showGeneralQrCode = false;
this.QRCodeUrl = '';
@@ -518,15 +569,14 @@
this.codeLoading = true;
this.QRCodeUrl = this.codeUrl + "?id="+ row.id;
-
+ console.log('--------------->',this.QRCodeUrl);
},
detail(row){
- console.log(row)
- this.showCouponStore = true;
- this.storeCouponSingleQuery.refId = row.id
- this.storeCouponSingleQuery.pageSize = 10
- this.storeCouponSingleQuery.pageNumber = 1
- this.getCouponStoreDataList();
+ this.showPrizeClaim = true;
+ this.prizeClaimQuery.storePrizeId = row.id
+ this.prizeClaimQuery.pageSize = 10
+ this.prizeClaimQuery.pageNumber = 1
+ this.getClaimPage();
},
generalStorePrize(row){
generateStorePrize(row.id).then(response => {
@@ -556,16 +606,16 @@
this.getActivityPrizeDataList();
},
- couponStoreChangePage(v) {
+ prizeCliamChangePage(v) {
// 鏀瑰彉椤电爜
- this.storeCouponSingleQuery.pageNumber = v;
- this.getCouponStoreDataList();
+ this.prizeClaimQuery.pageNumber = v;
+ this.getClaimPage();
},
- couponStoreChangePageSize(v) {
+ prizeCliamChangePageSize(v) {
// 鏀瑰彉椤垫暟
- this.storeCouponSingleQuery.pageNumber = 1;
- this.storeCouponSingleQuery.pageSize = v;
- this.getCouponStoreDataList();
+ this.prizeClaimQuery.pageNumber = 1;
+ this.prizeClaimQuery.pageSize = v;
+ this.getClaimPage();
},
handleRowClick(currentRow ,oldCurrentRow){
console.log(currentRow)
@@ -576,15 +626,15 @@
console.log(this.temp.couponId)
},
- getCouponStoreDataList(){
- this.couponStoreLoading = true;
- // API_Activity_Prize(this.storeCouponSingleQuery).then((res) =>{
- // this.couponStoreLoading =false;
- // if (res.code === 200){
- // this.couponStoreData = res.data;
- // this.couponStoreTotal = res.total;
- // }
- // })
+ getClaimPage(){
+ this.showPrizeClaimLoading = true;
+ getClaimPage(this.prizeClaimQuery).then((res) =>{
+ this.showPrizeClaimLoading =false;
+ if (res.code === 200){
+ this.prizeClaimData = res.data;
+ this.prizeClaimTotal = res.total;
+ }
+ })
},
getActivityPrizeDataList() {
@@ -692,11 +742,14 @@
return colorMap[status] || 'default';
},
handleCancelCouponStore(){
- this.showCouponStore = false;
+ this.showPrizeClaim = false;
},
// 寮圭獥鍙栨秷
handleCancel() {
this.dialogVisible = false;
+ },
+ handleCancel2() {
+ this.dialogVisible2 = false;
},
// 鎻愪氦琛ㄥ崟
@@ -714,7 +767,29 @@
}
});
- }
+ },
+ formatDate(date, format = 'YYYY-MM-DD HH:mm:ss') {
+ if (!date) return '';
+
+ const d = new Date(date);
+ if (isNaN(d.getTime())) return '';
+
+ const padZero = (num) => String(num).padStart(2, '0'); // 鏇村彲闈犵殑琛ラ浂鏂规硶
+
+ const year = d.getFullYear();
+ const month = padZero(d.getMonth() + 1); // 鏈堜唤 0-11 鈫� +1
+ const day = padZero(d.getDate());
+ const hours = padZero(d.getHours());
+ const minutes = padZero(d.getMinutes());
+ const seconds = padZero(d.getSeconds());
+ return format
+ .replace('YYYY', year)
+ .replace('MM', month)
+ .replace('DD', day)
+ .replace('HH', hours)
+ .replace('mm', minutes)
+ .replace('ss', seconds);
+ },
},
mounted() {
this.getStoreSelect();
--
Gitblit v1.8.0