1 line
5.3 KiB
JavaScript
1 line
5.3 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d22ccf1"],{f58d:function(e,t,s){"use strict";s.r(t);var a=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"divBox"},[s("div",{staticClass:"selCard"},[s("el-form",{ref:"searchForm",attrs:{model:e.tableFromIssue,size:"small","label-width":"85px",inline:!0}},[s("el-form-item",{attrs:{label:"使用状态:",prop:"status"}},[s("el-select",{staticClass:"selWidth",attrs:{placeholder:"请选择状态",clearable:""},on:{change:e.getIssueList},model:{value:e.tableFromIssue.status,callback:function(t){e.$set(e.tableFromIssue,"status",t)},expression:"tableFromIssue.status"}},[s("el-option",{attrs:{label:"全部",value:""}}),e._v(" "),s("el-option",{attrs:{label:"已使用",value:"1"}}),e._v(" "),s("el-option",{attrs:{label:"未使用",value:"0"}}),e._v(" "),s("el-option",{attrs:{label:"已过期",value:"2"}})],1)],1),e._v(" "),s("el-form-item",{attrs:{label:"领取人:",prop:"username"}},[s("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入领取人",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.getIssueList(t)}},model:{value:e.tableFromIssue.username,callback:function(t){e.$set(e.tableFromIssue,"username",t)},expression:"tableFromIssue.username"}})],1),e._v(" "),s("el-form-item",{attrs:{label:"优惠劵:",prop:"coupon_id"}},[s("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入优惠劵ID",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.getIssueList(t)}},model:{value:e.tableFromIssue.coupon_id,callback:function(t){e.$set(e.tableFromIssue,"coupon_id",t)},expression:"tableFromIssue.coupon_id"}})],1),e._v(" "),s("el-form-item",{attrs:{label:"获取方式:",prop:"type"}},[s("el-select",{staticClass:"selWidth",attrs:{placeholder:"请选择状态",clearable:""},on:{change:e.getIssueList},model:{value:e.tableFromIssue.type,callback:function(t){e.$set(e.tableFromIssue,"type",t)},expression:"tableFromIssue.type"}},[s("el-option",{attrs:{label:"全部",value:""}}),e._v(" "),s("el-option",{attrs:{label:"自己领取",value:"receive"}}),e._v(" "),s("el-option",{attrs:{label:"后台发送",value:"send"}}),e._v(" "),s("el-option",{attrs:{label:"新人",value:"new"}}),e._v(" "),s("el-option",{attrs:{label:"买赠送",value:"buy"}})],1)],1),e._v(" "),s("el-form-item",[s("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.getIssueList}},[e._v("搜索")]),e._v(" "),s("el-button",{attrs:{size:"small"},on:{click:function(t){return e.searchReset()}}},[e._v("重置")])],1)],1)],1),e._v(" "),s("el-card",{staticClass:"mt14"},[s("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.Loading,expression:"Loading"}],attrs:{data:e.issueData.data,size:"small"}},[s("el-table-column",{attrs:{prop:"coupon_id",label:"ID","min-width":"80"}}),e._v(" "),s("el-table-column",{attrs:{prop:"coupon_title",label:"优惠券名称","min-width":"150"}}),e._v(" "),s("el-table-column",{attrs:{label:"领取人","min-width":"200"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.user?s("span",[e._v(e._s(e._f("filterEmpty")(t.row.user.nickname)))]):s("span",[e._v("未知")])]}}])}),e._v(" "),s("el-table-column",{attrs:{prop:"coupon_price",label:"面值","min-width":"100"}}),e._v(" "),s("el-table-column",{attrs:{prop:"use_min_price",label:"最低消费额","min-width":"120"}}),e._v(" "),s("el-table-column",{attrs:{prop:"start_time",label:"开始使用时间","min-width":"150"}}),e._v(" "),s("el-table-column",{attrs:{prop:"end_time",label:"结束使用时间","min-width":"150"}}),e._v(" "),s("el-table-column",{attrs:{label:"获取方式","min-width":"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("span",[e._v(e._s(e._f("failFilter")(t.row.type)))])]}}])}),e._v(" "),s("el-table-column",{attrs:{label:"状态","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("span",[e._v(e._s(e._f("statusFilter")(t.row.status)))])]}}])})],1),e._v(" "),s("div",{staticClass:"block"},[s("el-pagination",{attrs:{background:"","page-size":e.tableFromIssue.limit,"current-page":e.tableFromIssue.page,layout:"total, prev, pager, next, jumper",total:e.issueData.total},on:{"size-change":e.handleSizeChangeIssue,"current-change":e.pageChangeIssue}})],1)],1)],1)},l=[],n=s("b7be"),i=s("83d6"),r={name:"CouponUser",filters:{failFilter:function(e){var t={receive:"自己领取",send:"后台发送",give:"满赠",new:"新人",buy:"买赠送"};return t[e]},statusFilter:function(e){var t={0:"未使用",1:"已使用",2:"已过期"};return t[e]}},data:function(){return{Loading:!1,roterPre:i["roterPre"],tableFromIssue:{page:1,limit:10,coupon_id:"",status:"",username:"",type:""},issueData:{data:[],total:0}}},mounted:function(){this.getIssueList()},methods:{searchReset:function(){this.$refs.searchForm.resetFields(),this.getIssueList(1)},getIssueList:function(){var e=this;this.Loading=!0,Object(n["X"])(this.tableFromIssue).then((function(t){e.issueData.data=t.data.list,e.issueData.total=t.data.count,e.Loading=!1})).catch((function(t){e.Loading=!1,e.$message.error(t.message)}))},pageChangeIssue:function(e){this.tableFromIssue.page=e,this.getIssueList()},handleSizeChangeIssue:function(e){this.tableFromIssue.limit=e,this.getIssueList()}}},o=r,u=s("2877"),c=Object(u["a"])(o,a,l,!1,null,"03bcf378",null);t["default"]=c.exports}}]); |