From b1950817e42e2c91c65876e73f4705d3afe314a7 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期二, 30 九月 2025 17:12:46 +0800
Subject: [PATCH] 店铺材料
---
seller/src/api/prize-store.js | 11 +
/dev/null | 353 -----------------------------------
seller/src/views/activity/store-prize-proof.vue | 204 ++++++++++++++++++++
3 files changed, 215 insertions(+), 353 deletions(-)
diff --git a/seller/src/api/prize-store.js b/seller/src/api/prize-store.js
new file mode 100644
index 0000000..a4248ce
--- /dev/null
+++ b/seller/src/api/prize-store.js
@@ -0,0 +1,11 @@
+import service from "../libs/axios";
+
+export const getPage = (params) =>{
+ return service({
+ url: "/lmk/scan-prize/page",
+ method: "GET",
+ params: params
+ })
+}
+
+
diff --git a/seller/src/views/activity/store-prize-proof b/seller/src/views/activity/store-prize-proof
deleted file mode 100644
index f2f462d..0000000
--- a/seller/src/views/activity/store-prize-proof
+++ /dev/null
@@ -1,353 +0,0 @@
-<template>
- <div class="search">
- <Card>
- <Button style="margin-bottom: 10px" @click="back()">杩斿洖</Button>
- <Form
- ref="searchForm"
- :model="searchForm"
- inline
- :label-width="75"
- class="search-form mb_10"
- >
- <Form-item label="浼樻儬鍒稿悕绉�" prop="couponName">
- <Input
- type="text"
- v-model="searchForm.couponName"
- placeholder="璇疯緭鍏ヤ紭鎯犲埜鍚嶇О"
- clearable
- style="width: 200px"
- />
- </Form-item>
- <Form-item label="浼氬憳鍚嶇О" prop="memberName">
- <Input
- type="text"
- v-model="searchForm.memberName"
- placeholder="璇疯緭鍏ヤ細鍛樺悕绉�"
- clearable
- style="width: 200px"
- />
- </Form-item>
- <Form-item label="鑾峰彇鏂瑰紡" prop="getType">
- <Select
- v-model="searchForm.getType"
- placeholder="璇烽�夋嫨"
- clearable
- style="width: 200px"
- >
- <Option value="FREE">鍏嶈垂鑾峰彇</Option>
- <Option value="ACTIVITY">娲诲姩鑾峰彇</Option>
- </Select>
- </Form-item>
- <Form-item label="浼樻儬鍒哥姸鎬�" prop="memberCouponStatus">
- <Select
- v-model="searchForm.memberCouponStatus"
- placeholder="璇烽�夋嫨"
- clearable
- style="width: 200px"
- >
- <Option value="NEW">宸查鍙�</Option>
- <Option value="USED">宸蹭娇鐢�</Option>
- <Option value="EXPIRE">宸茶繃鏈�</Option>
- <Option value="CLOSED">宸蹭綔搴�</Option>
- </Select>
- </Form-item>
- <Form-item label="娲诲姩鏃堕棿">
- <DatePicker
- v-model="selectDate"
- type="daterange"
- clearable
- placeholder="閫夋嫨璧峰鏃堕棿"
- style="width: 200px"
- ></DatePicker>
- </Form-item>
- <Button
- @click="handleSearch"
- type="primary"
- icon="ios-search"
- class="search-btn"
- >鎼滅储</Button
- >
- <Button
- @click="queryExportCoupon"
- type="primary"
- class="search-btn">
- 瀵煎嚭棰嗗彇璁板綍
- </Button>
- </Form>
- <Table
- v-if="refreshTable"
- :loading="loading"
- border
- :columns="columns"
- :data="data"
- ref="table"
- class="mt_10"
- @on-selection-change="changeSelect"
- >
- </Table>
- <Row type="flex" justify="end" class="mt_10">
- <Page
- :current="searchForm.pageNumber"
- :total="total"
- :page-size="searchForm.pageSize"
- @on-change="changePage"
- @on-page-size-change="changePageSize"
- :page-size-opts="[10, 20, 50]"
- size="small"
- show-total
- show-elevator
- show-sizer
- ></Page>
- </Row>
- </Card>
- </div>
-</template>
-<script>
- export default {
- name: "store-prize-proof",
- data() {
- return {
- loading: true, // 琛ㄥ崟鍔犺浇鐘舵��
- searchForm: {
- // 鎼滅储妗嗗垵濮嬪寲瀵硅薄
- pageNumber: 1, // 褰撳墠椤垫暟
- pageSize: 10, // 椤甸潰澶у皬
- sort: "create_time", // 榛樿鎺掑簭瀛楁
- order: "desc", // 榛樿鎺掑簭鏂瑰紡
- getType: "", // 榛樿鎺掑簭鏂瑰紡
- couponId: this.$route.query.couponId, // 浼樻儬鍒竔d
- },
- selectList: [], // 澶氶�夋暟鎹�
- selectCount: 0, // 澶氶�夎鏁�
- columns: [
- // 琛ㄥご
- {
- title: "浼氬憳鍚嶇О",
- key: "memberName",
- minWidth: 130,
- fixed: "left",
- },
- {
- title: "浼樻儬鍒稿悕绉�",
- key: "couponName",
- minWidth: 100,
- tooltip: true,
- },
- {
- title: "鍙戝竷搴楅摵",
- key: "storeName",
- minWidth: 100,
- render: (h, params) => {
- return h("div", (params.row.storeName === 'platform' && "骞冲彴") || params.row.storeName);
- },
- },
- {
- title: "闈㈤/鎶樻墸",
- key: "price",
- width: 100,
- render: (h, params) => {
- if (params.row.price) {
-
- return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
-
- } else {
- return h("div", params.row.discount + "鎶�");
- }
- },
- },
-
- {
- title: "浣跨敤闂ㄦ",
- key: "consumeThreshold",
- width: 130,
- },
- {
- title: "鑾峰彇鏂瑰紡",
- width: 120,
- key: "getType",
- render: (h, params) => {
- if (params.row.getType === "FREE") {
- return h("Tag", { props: { color: "red" } }, "鍏嶈垂鑾峰彇");
- } else if (params.row.getType === "ACTIVITY") {
- return h("Tag", { props: { color: "volcano" } }, "娲诲姩鑾峰彇");
- } else if (params.row.getType === "INSIDE") {
- return h("Tag", { props: { color: "lime" } }, "鍐呰喘");
- } else {
- return h("Tag", { props: { color: "purple" } }, "鏈煡");
- }
- },
- },
- {
- title: "浼氬憳浼樻儬鍒哥姸鎬�",
- width: 130,
- key: "memberCouponStatus",
- render: (h, params) => {
- return memberPromotionsStatusRender(
- h,
- params.row.memberCouponStatus
- );
- },
- },
- {
- title: "浼樻儬鍒哥被鍨�",
- key: "couponType",
- width: 120,
- render: (h, params) => {
- if (params.row.couponType === "DISCOUNT") {
- return h("Tag", { props: { color: "orange" } }, "鎵撴姌");
- } else if (params.row.couponType === "PRICE") {
- return h("Tag", { props: { color: "magenta" } }, "鍑忓厤鐜伴噾");
- } else {
- return h("Tag", { props: { color: "purple" } }, "鏈煡");
- }
- },
- },
- {
- title: "鍝佺被鎻忚堪",
- key: "scopeType",
- width: 120,
- render: (h, params) => {
- return promotionsScopeTypeRender(h, params);
- },
- },
- {
- title: "鏈夋晥鏃堕棿",
- width: 150,
- render: (h, params) => {
- if (
- params?.row?.getType === "ACTIVITY" &&
- params?.row?.rangeDayType === "DYNAMICTIME"
- ) {
- return h("div", "闀挎湡鏈夋晥");
- } else if (params?.row?.startTime && params?.row?.endTime) {
- return h("div", {
- domProps: {
- innerHTML:
- params.row.startTime + "<br/>" + params.row.endTime,
- },
- });
- }
- },
- },
- ],
- data: [], // 琛ㄥ崟鏁版嵁
- total: 0, // 琛ㄥ崟鏁版嵁鎬绘暟
- refreshTable: true, // 淇敼閫変腑鐘舵�佸悗鍒锋柊琛ㄦ牸
- selectDate: [], //閫変腑鐨勪俊鎭�
- };
- },
- props: {
- promotionStatus: {
- type: String,
- default: "",
- },
- },
- watch: {
- $route(e) {
- // 鐩戝惉璺敱锛屽弬鏁板彉鍖栬皟鍙栨帴鍙�
- this.searchForm.couponId = e.query.couponId;
- if (this.couponId) {
- this.getDataList();
- } else {
- this.$refs.form.resetFields();
- }
- },
- },
- methods: {
- queryExportCoupon(){
- console.log(this.selectDate.length === 0);
-
- if(this.selectDate.length === 0){
- this.$Message.error("蹇呴』閫夋嫨鏃堕棿鑼冨洿锛屾悳绱㈠悗杩涜瀵煎嚭锛�");
- this.searchForm.startTime = null;
- this.searchForm.endTime = null;
- }else{
- this.searchForm.startTime = this.selectDate[0].getTime();
- this.searchForm.endTime = this.selectDate[1].getTime();
- queryExportCoupon(this.searchForm).then(res =>{
- const blob = new Blob([res], {
- type: "application/vnd.ms-excel;charset=utf-8",
- });
- //瀵逛簬<a>鏍囩锛屽彧鏈� Firefox 鍜� Chrome锛堝唴鏍革級 鏀寔 download 灞炴��
- //IE10浠ヤ笂鏀寔blob浣嗘槸渚濈劧涓嶆敮鎸乨ownload
- if ("download" in document.createElement("a")) {
- //鏀寔a鏍囩download鐨勬祻瑙堝櫒
- const link = document.createElement("a"); //鍒涘缓a鏍囩
- link.download = "浼樻儬鍒搁鍙栬褰�.xlsx"; //a鏍囩娣诲姞灞炴��
- link.style.display = "none";
- link.href = URL.createObjectURL(blob);
- document.body.appendChild(link);
- link.click(); //鎵ц涓嬭浇
- URL.revokeObjectURL(link.href); //閲婃斁url
- document.body.removeChild(link); //閲婃斁鏍囩
- } else {
- navigator.msSaveBlob(blob, fileName);
- }
- })
- }
-
- },
- back() {
- this.$store.commit("removeTag", "coupon-receive");
- this.$router.go(-1);
- },
- check() {
- // 閫変腑鐨勪紭鎯犲埜
- this.$emit("selected", this.selectList);
- },
- // 鍒濆鍖栨暟鎹�
- init() {
- this.getDataList();
- },
- changePage(v) {
- // 鏀瑰彉椤电爜
- this.searchForm.pageNumber = v;
- this.getDataList();
- },
- changePageSize(v) {
- // 鏀瑰彉椤垫暟
- this.searchForm.pageNumber = 1;
- this.searchForm.pageSize = v;
- this.getDataList();
- },
- handleSearch() {
- // 鎼滅储
- this.searchForm.pageNumber = 1;
- this.searchForm.pageSize = 10;
- this.getDataList();
- },
- /**
- * 閫夋嫨浼樻儬鍒�
- */
- changeSelect(e) {
- this.selectList = e;
- this.selectCount = e.length;
- if (this.getType === "ACTIVITY") this.check();
- },
- getDataList() {
- // 鑾峰彇鏁版嵁
- this.loading = true;
- if (this.selectDate && this.selectDate[0] && this.selectDate[1]) {
- this.searchForm.startTime = this.selectDate[0].getTime();
- this.searchForm.endTime = this.selectDate[1].getTime();
- } else {
- this.searchForm.startTime = null;
- this.searchForm.endTime = null;
- }
- getCouponReceiveList(this.searchForm).then((res) => {
- this.loading = false;
- if (res.success) {
- console.log(res);
- this.data = res.result.records;
- this.total = res.result.total;
- }
- });
- this.total = this.data.length;
- this.loading = false;
- },
- },
- mounted() {
- this.init();
- },
- };
-</script>
diff --git a/seller/src/views/activity/store-prize-proof.vue b/seller/src/views/activity/store-prize-proof.vue
new file mode 100644
index 0000000..9dfd315
--- /dev/null
+++ b/seller/src/views/activity/store-prize-proof.vue
@@ -0,0 +1,204 @@
+<template>
+ <div class="search">
+ <Card>
+ <Form
+ ref="searchForm"
+ :model="searchForm"
+ inline
+ :label-width="75"
+ class="search-form mb_10"
+ >
+ <Form-item label="浼樻儬鍒稿悕绉�" prop="couponName">
+ <Input
+ type="text"
+ v-model="searchForm.couponName"
+ placeholder="璇疯緭鍏ヤ紭鎯犲埜鍚嶇О"
+ clearable
+ style="width: 200px"
+ />
+ </Form-item>
+ <Form-item label="浼氬憳鍚嶇О" prop="memberName">
+ <Input
+ type="text"
+ v-model="searchForm.memberName"
+ placeholder="璇疯緭鍏ヤ細鍛樺悕绉�"
+ clearable
+ style="width: 200px"
+ />
+ </Form-item>
+ <Form-item label="鑾峰彇鏂瑰紡" prop="getType">
+ <Select
+ v-model="searchForm.getType"
+ placeholder="璇烽�夋嫨"
+ clearable
+ style="width: 200px"
+ >
+ <Option value="FREE">鍏嶈垂鑾峰彇</Option>
+ <Option value="ACTIVITY">娲诲姩鑾峰彇</Option>
+ </Select>
+ </Form-item>
+ <Form-item label="浼樻儬鍒哥姸鎬�" prop="memberCouponStatus">
+ <Select
+ v-model="searchForm.memberCouponStatus"
+ placeholder="璇烽�夋嫨"
+ clearable
+ style="width: 200px"
+ >
+ <Option value="NEW">宸查鍙�</Option>
+ <Option value="USED">宸蹭娇鐢�</Option>
+ <Option value="EXPIRE">宸茶繃鏈�</Option>
+ <Option value="CLOSED">宸蹭綔搴�</Option>
+ </Select>
+ </Form-item>
+ <Form-item label="娲诲姩鏃堕棿">
+ <DatePicker
+ v-model="selectDate"
+ type="daterange"
+ clearable
+ placeholder="閫夋嫨璧峰鏃堕棿"
+ style="width: 200px"
+ ></DatePicker>
+ </Form-item>
+ <Button
+ @click="handleSearch"
+ type="primary"
+ icon="ios-search"
+ class="search-btn"
+ >鎼滅储</Button
+ >
+ <Button
+ @click="queryExportCoupon"
+ type="primary"
+ class="search-btn">
+ 瀵煎嚭棰嗗彇璁板綍
+ </Button>
+ </Form>
+ <Table
+ v-if="refreshTable"
+ :loading="loading"
+ border
+ :columns="columns"
+ :data="data"
+ ref="table"
+ class="mt_10"
+ @on-selection-change="changeSelect"
+ >
+ </Table>
+ <Row type="flex" justify="end" class="mt_10">
+ <Page
+ :current="searchForm.pageNumber"
+ :total="total"
+ :page-size="searchForm.pageSize"
+ @on-change="changePage"
+ @on-page-size-change="changePageSize"
+ :page-size-opts="[10, 20, 50]"
+ size="small"
+ show-total
+ show-elevator
+ show-sizer
+ ></Page>
+ </Row>
+ </Card>
+ </div>
+</template>
+<script>
+import { getPage } from "@/api/prize-store.js"
+export default {
+ name: "store-prize-proof",
+ data() {
+ return {
+ loading: true, // 琛ㄥ崟鍔犺浇鐘舵��
+ searchForm: {
+ // 鎼滅储妗嗗垵濮嬪寲瀵硅薄
+ pageNumber: 1, // 褰撳墠椤垫暟
+ pageSize: 10, // 椤甸潰澶у皬
+ },
+ selectList: [], // 澶氶�夋暟鎹�
+ selectCount: 0, // 澶氶�夎鏁�
+ columns: [
+ // 琛ㄥご
+ {
+ title: "浼氬憳鍚嶇О",
+ key: "memberName",
+ minWidth: 130,
+ fixed: "left",
+ },
+ {
+ title: "浼樻儬鍒稿悕绉�",
+ key: "couponName",
+ minWidth: 100,
+ tooltip: true,
+ },
+ {
+ title: "鍙戝竷搴楅摵",
+ key: "storeName",
+ minWidth: 100,
+ render: (h, params) => {
+ return h("div", (params.row.storeName === 'platform' && "骞冲彴") || params.row.storeName);
+ },
+ },
+ ],
+ data: [], // 琛ㄥ崟鏁版嵁
+ total: 0, // 琛ㄥ崟鏁版嵁鎬绘暟
+ refreshTable: true, // 淇敼閫変腑鐘舵�佸悗鍒锋柊琛ㄦ牸
+ selectDate: [], //閫変腑鐨勪俊鎭�
+ };
+ },
+ methods: {
+
+ // 鍒濆鍖栨暟鎹�
+ init() {
+ this.getDataList();
+ },
+ changePage(v) {
+ // 鏀瑰彉椤电爜
+ this.searchForm.pageNumber = v;
+ this.getDataList();
+ },
+ changePageSize(v) {
+ // 鏀瑰彉椤垫暟
+ this.searchForm.pageNumber = 1;
+ this.searchForm.pageSize = v;
+ this.getDataList();
+ },
+ handleSearch() {
+ // 鎼滅储
+ this.searchForm.pageNumber = 1;
+ this.searchForm.pageSize = 10;
+ this.getDataList();
+ },
+ /**
+ * 閫夋嫨浼樻儬鍒�
+ */
+ changeSelect(e) {
+ this.selectList = e;
+ this.selectCount = e.length;
+ if (this.getType === "ACTIVITY") this.check();
+ },
+ getDataList() {
+ // 鑾峰彇鏁版嵁
+ this.loading = true;
+ if (this.selectDate && this.selectDate[0] && this.selectDate[1]) {
+ this.searchForm.startTime = this.selectDate[0].getTime();
+ this.searchForm.endTime = this.selectDate[1].getTime();
+ } else {
+ this.searchForm.startTime = null;
+ this.searchForm.endTime = null;
+ }
+ getPage(this.searchForm).then((res) => {
+ this.loading = false;
+ if (res.code === 200) {
+ console.log(res);
+ this.data = res.data.records;
+ this.total = res.data.total;
+ }
+ });
+ this.total = this.data.length;
+ this.loading = false;
+ },
+ },
+ mounted() {
+ this.init();
+ },
+};
+</script>
--
Gitblit v1.8.0