1 line
5.8 KiB
JavaScript
1 line
5.8 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d224d32"],{e27f:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"outmain ba_f heighthv pad_20 bor_rad5"},[e._m(0),r("div",{staticClass:"flex-bet pad_lr_20"},[r("div",[r("el-button",{attrs:{type:"primary",size:"medium"},on:{click:e.handleEdit}},[e._v("创建活动")])],1),r("div")]),r("div",{staticClass:"tabledata mar_t20"},[r("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:""}},[r("el-table-column",{attrs:{prop:"name",label:"活动名称"}}),r("el-table-column",{attrs:{prop:"time",label:"活动时间",width:"280"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",[e._v(e._s(t.row.startTime))]),r("div",[e._v(e._s(t.row.endTime))])]}}])}),r("el-table-column",{attrs:{prop:"time",label:"领取门槛"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",[e._v("订单满"+e._s(t.row.orderMoney)+"元")])]}}])}),r("el-table-column",{attrs:{prop:"money",label:"优惠内容"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",{directives:[{name:"show",rawName:"v-show",value:"1"==t.row.isBalance,expression:"scope.row.isBalance=='1'"}]},[e._v("送"+e._s(t.row.balance)+"元")]),r("div",{directives:[{name:"show",rawName:"v-show",value:"1"==t.row.isIntegral,expression:"scope.row.isIntegral=='1'"}]},[e._v("送"+e._s(t.row.integral)+"积分")]),r("div",{directives:[{name:"show",rawName:"v-show",value:"1"==t.row.isGrowth,expression:"scope.row.isGrowth=='1'"}]},[e._v("送"+e._s(t.row.growth)+"成长值")])]}}])}),r("el-table-column",{attrs:{prop:"type",label:"适用门店"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",{directives:[{name:"show",rawName:"v-show",value:"1"==t.row.storeType,expression:"scope.row.storeType=='1'"}]},[e._v("仅本店可用")]),r("div",{directives:[{name:"show",rawName:"v-show",value:"2"==t.row.storeType,expression:"scope.row.storeType=='2'"}]},[e._v("全店通用")]),r("div",{directives:[{name:"show",rawName:"v-show",value:"3"==t.row.storeType,expression:"scope.row.storeType=='3'"}]},[e._v("指定门店可用")])]}}])}),r("el-table-column",{attrs:{prop:"display",label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-switch",{attrs:{"active-value":"1","inactive-value":"2"},on:{change:function(r){return e.changeSwitch(t.row)}},model:{value:t.row.display,callback:function(r){e.$set(t.row,"display",r)},expression:"scope.row.display"}})]}}])}),r("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",{staticClass:"flex"},[r("el-button",{attrs:{type:"text"},on:{click:function(r){return e.handleEdit(t.row)}}},[e._v("编辑")]),r("el-button",{attrs:{type:"text"},on:{click:function(r){return e.handleDelete(t.row)}}},[e._v("删除")])],1)]}}])})],1),r("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}})],1)])},n=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"shuju_title mar_b20"},[r("div",{staticClass:"shuju_title_text"},[r("span",[e._v("支付有礼活动列表")])])])}],s=(r("d81d"),r("96cf"),r("1da1")),o=r("5530"),i=r("7cb7"),c=r("2f62"),l={created:function(){this.fetchData()},computed:Object(o["a"])({},Object(c["d"])(["storeId"])),data:function(){return{list:[],listLoading:!0,selectRows:"",elementLoadingText:"正在加载...",page:{total:0,size:10,currentPage:1}}},methods:{fetchData:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){var r,a,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.listLoading=!0,t.next=3,Object(i["Rb"])({page:e.page.currentPage,storeId:e.storeId});case 3:r=t.sent,a=r.data,n=r.count,e.list=a,e.page.total=n,e.listLoading=!1;case 9:case"end":return t.stop()}}),t)})))()},handleCurrentChange:function(e){this.page.currentPage=e,this.fetchData()},changeSwitch:function(e){var t=this;return Object(s["a"])(regeneratorRuntime.mark((function r(){var a,n;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,Object(i["Fb"])({id:e.id,display:e.display,type:1,storeId:t.storeId});case 2:a=r.sent,n=a.msg,t.$baseMessage(n,"success"),t.fetchData();case 6:case"end":return r.stop()}}),r)})))()},handleDelete:function(e){var t=this;if(e.id)this.$baseConfirm("你确定要删除当前项吗",null,Object(s["a"])(regeneratorRuntime.mark((function r(){var a,n;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,Object(i["Fb"])({id:e.id,type:2,storeId:t.storeId});case 2:a=r.sent,n=a.msg,t.$baseMessage(n,"success"),t.fetchData();case 6:case"end":return r.stop()}}),r)}))));else{if(!(this.selectRows.length>0))return this.$baseMessage("未选中任何行","error"),!1;var r=this.selectRows.map((function(e){return e.id}));this.$baseConfirm("你确定要删除选中项吗",null,Object(s["a"])(regeneratorRuntime.mark((function e(){var a,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(i["Fb"])({id:r,type:2,storeId:t.storeId});case 2:a=e.sent,n=a.msg,t.$baseMessage(n,"success"),t.fetchData();case 6:case"end":return e.stop()}}),e)}))))}},handletj:function(){this.$router.push({path:"customertongji"})},handleEdit:function(e){e.id?this.$router.push("/storeorderCourtesylistAdd?id=".concat(e.id)):this.$router.push({path:"storeorderCourtesylistAdd"})}}},u=l,d=r("2877"),p=Object(d["a"])(u,a,n,!1,null,null,null);t["default"]=p.exports}}]); |