{"remainingRequest":"/data/jenkins/workspace/mer.mall2.baibaodun.cn/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/mer.mall2.baibaodun.cn/src/views/coupon/list/index.vue?vue&type=script&lang=js","dependencies":[{"path":"/data/jenkins/workspace/mer.mall2.baibaodun.cn/src/views/coupon/list/index.vue","mtime":1720764823957},{"path":"/data/jenkins/workspace/mer.mall2.baibaodun.cn/node_modules/babel-loader/lib/index.js","mtime":456789000000},{"path":"/data/jenkins/workspace/mer.mall2.baibaodun.cn/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/mer.mall2.baibaodun.cn/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n// +----------------------------------------------------------------------\n// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]\n// +----------------------------------------------------------------------\n// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.\n// +----------------------------------------------------------------------\n// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权\n// +----------------------------------------------------------------------\n// | Author: CRMEB Team \n// +----------------------------------------------------------------------\n\nimport { marketingListApi, couponIssueStatusApi, couponUserListApi, couponDeleteApi } from '@/api/product';\nimport { roterPre } from '@/settings';\nimport { checkPermi } from '@/utils/permission'; // 权限判断函数\nimport { mapGetters } from 'vuex';\nexport default {\n name: 'CouponList',\n data() {\n return {\n Loading: false,\n dialogVisible: false,\n roterPre: roterPre,\n listLoading: false,\n tableData: {\n data: [],\n total: 0,\n },\n tableFrom: {\n page: 1,\n limit: 20,\n status: '',\n name: '',\n type: '',\n useType: '',\n },\n name: '',\n tableFromIssue: {\n page: 1,\n limit: 10,\n couponId: '',\n },\n issueData: {\n data: [],\n total: 0,\n },\n };\n },\n mounted() {\n if (!this.merProductClassify.length) this.$store.dispatch('product/getMerProductClassify');\n if (checkPermi(['merchant:coupon:page:list'])) this.getList();\n },\n computed: {\n ...mapGetters(['merProductClassify']),\n },\n methods: {\n checkPermi,\n seachList() {\n this.tableFrom.page = 1;\n this.getList();\n },\n handleClose() {\n this.dialogVisible = false;\n },\n // 领取记录\n receive(row) {\n this.dialogVisible = true;\n this.tableFromIssue.couponId = row.id;\n this.getIssueList();\n },\n // 列表\n getIssueList() {\n this.Loading = true;\n couponUserListApi(this.tableFromIssue)\n .then((res) => {\n this.issueData.data = res.list;\n this.issueData.total = res.total;\n this.Loading = false;\n })\n .catch((res) => {\n this.Loading = false;\n this.$message.error(res.message);\n });\n },\n pageChangeIssue(page) {\n this.tableFromIssue.page = page;\n this.getIssueList();\n },\n handleSizeChangeIssue(val) {\n this.tableFromIssue.limit = val;\n this.getIssueList();\n },\n // 列表\n getList() {\n this.listLoading = true;\n this.tableFrom.name = encodeURIComponent(this.name);\n marketingListApi(this.tableFrom)\n .then((res) => {\n this.tableData.data = res.list;\n this.tableData.total = res.total;\n this.listLoading = false;\n })\n .catch((res) => {\n this.listLoading = false;\n });\n },\n pageChange(page) {\n this.tableFrom.page = page;\n this.getList();\n },\n handleSizeChange(val) {\n this.tableFrom.limit = val;\n this.getList();\n },\n // 修改状态\n onchangeIsShow(row) {\n couponIssueStatusApi(row.id)\n .then(() => {\n this.$message.success('修改成功');\n this.getList();\n })\n .catch(() => {\n row.status = !row.status;\n });\n },\n handleDelMenu(rowData) {\n this.$modalSure('删除当前数据?').then(() => {\n couponDeleteApi(rowData.id).then((data) => {\n this.$message.success('删除成功');\n this.getList();\n });\n });\n },\n },\n};\n",null]}