canyin-project/ybcy/views/channel/index/static/js/chunk-f15720a6.c00c9340.js

1 line
8.4 KiB
JavaScript
Raw Permalink Normal View History

2024-11-01 16:07:54 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f15720a6"],{1561:function(e,t,a){"use strict";var r=a("f429"),n=a.n(r);n.a},1707:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"outmain ba_f heighthv pad_20 bor_rad5"},[e._m(0),a("div",{staticClass:"flex-bet pad_lr_20"},[a("div",[a("el-button",{attrs:{type:"primary",size:"medium"},on:{click:e.handleEdit}},[e._v("创建活动")])],1),a("div")]),a("div",{staticClass:"tabledata mar_t20"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:e.list,"element-loading-text":e.elementLoadingText,stripe:""}},[a("el-table-column",{attrs:{prop:"name",label:"兑换码名称"}}),a("el-table-column",{attrs:{prop:"time",label:"活动时间",width:"280"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v(e._s(t.row.startTime))]),a("div",[e._v(e._s(t.row.endTime))])]}}])}),a("el-table-column",{attrs:{prop:"couponNum",label:"优惠券数量"}}),a("el-table-column",{attrs:{prop:"stock",label:"已兑换/剩余库存"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.salesNum)+"/")]),a("span",[e._v(e._s(t.row.stock))])]}}])}),a("el-table-column",{attrs:{prop:"limitType",label:"使用限制"},scopedSlots:e._u([{key:"default",fn:function(t){return["1"==t.row.limitType?a("div",[e._v("不限制")]):a("div",[e._v("每人可用 "+e._s(t.row.maxNum)+" 个")])]}}])}),a("el-table-column",{attrs:{prop:"display",label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-switch",{attrs:{"active-value":"1","inactive-value":"2"},on:{change:function(a){return e.changeSwitch(t.row)}},model:{value:t.row.display,callback:function(a){e.$set(t.row,"display",a)},expression:"scope.row.display"}})]}}])}),a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"flex"},[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.handleEdit(t.row)}}},[e._v("编辑")]),a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.handleList(t.row)}}},[e._v("兑换码列表")]),a("el-button",{attrs:{type:"text"}},[a("a",{attrs:{href:e.handelExport(t.row)}},[e._v("导出")])]),a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.handleDelete(t.row)}}},[e._v("删除")])],1)]}}])})],1),a("el-pagination",{attrs:{background:"",layout:"prev, pager, next",total:e.page.total,"page-size":e.page.pagesize,"current-page":e.page.currentPage},on:{"update:currentPage":function(t){return e.$set(e.page,"currentPage",t)},"update:current-page":function(t){return e.$set(e.page,"currentPage",t)},"current-change":e.handleCurrentChange}}),a("edit",{ref:"edit",on:{fetchData:e.fetchData}})],1)])},n=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"shuju_title mar_b20"},[a("div",{staticClass:"shuju_title_text"},[a("span",[e._v("兑换码")])])])}],s=(a("d81d"),a("96cf"),a("1da1")),i=a("5530"),o=a("7cb7"),c=a("4e63"),l=a("365c"),u=a("2f62"),d={components:{Edit:c["a"]},created:function(){this.fetchData()},computed:Object(i["a"])({},Object(u["d"])(["storeId"])),data:function(){return{list:[],listLoading:!1,selectRows:"",elementLoadingText:"正在加载...",page:{total:0,size:10,currentPage:1}}},methods:{fetchData:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){var a,r,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.listLoading=!0,t.next=3,Object(o["v"])({page:e.page.currentPage,storeId:e.storeId});case 3:a=t.sent,r=a.data,n=a.count,e.list=r,e.page.total=n,e.listLoading=!1;case 9:case"end":return t.stop()}}),t)})))()},handleCurrentChange:function(e){this.page.currentPage=e,this.fetchData()},handleList:function(e){e.id?this.$refs["edit"].showEdit(e):this.$refs["edit"].showEdit()},changeSwitch:function(e){var t=this;return Object(s["a"])(regeneratorRuntime.mark((function a(){var r,n;return regener