webpackJsonp([24],{NY9N:function(t,e){},WvRy:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=a("CCn6"),r={name:"index",components:{page:a("kmJW").a},data:function(){return{nowPage:1,total:0,limit:10,useTypeList:[{id:0,value:"未使用"},{id:1,value:"已使用"},{id:2,value:"禁用"}],searchFrom:{user_id:"",out_trade_no:"",status:0},list:[]}},filters:{filterStatus:function(t){var e="";return 0===t?e="未使用":1===t?e="已使用":2===t&&(e="禁用"),e}},mounted:function(){this.getList()},methods:{onPageChange:function(t){this.nowPage=t,this.getList()},onSizeChange:function(t){this.nowPage=1,this.limit=t,this.getList()},getList:function(){var t=this,e={limit:this.limit,page:this.nowPage};this.searchFrom.user_id&&(e.user_id=this.searchFrom.user_id),(this.searchFrom.status||0===this.searchFrom.status)&&(e.status=this.searchFrom.status),this.searchFrom.out_trade_no&&(e.out_trade_no=this.searchFrom.out_trade_no),Object(s._21)(e).then(function(e){t.total=e.total,t.list=e.list?e.list:[]})}}},o={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"refund"},[a("el-form",{ref:"searchFrom",attrs:{model:t.searchFrom,"label-width":"100px"}},[a("el-row",[a("el-col",{attrs:{span:4}},[a("el-form-item",{attrs:{label:"用户ID"}},[a("el-input",{model:{value:t.searchFrom.user_id,callback:function(e){t.$set(t.searchFrom,"user_id",e)},expression:"searchFrom.user_id"}})],1)],1),t._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"订单号"}},[a("el-input",{model:{value:t.searchFrom.out_trade_no,callback:function(e){t.$set(t.searchFrom,"out_trade_no",e)},expression:"searchFrom.out_trade_no"}})],1)],1),t._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"使用状态"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},on:{change:t.getList},model:{value:t.searchFrom.status,callback:function(e){t.$set(t.searchFrom,"status",e)},expression:"searchFrom.status"}},t._l(t.useTypeList,function(t){return a("el-option",{key:t.id,attrs:{label:t.value,value:t.id}})}))],1)],1),t._v(" "),a("el-col",{attrs:{span:4}},[a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:t.getList}},[t._v("搜索")])],1)],1)],1)],1),t._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.list}},[a("el-table-column",{attrs:{prop:"coupon_no",label:"优惠券码"}}),t._v(" "),a("el-table-column",{attrs:{prop:"out_trade_no",label:"订单号"}}),t._v(" "),a("el-table-column",{attrs:{label:"用户信息","min-width":"140",className:"userInfo"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("img",{staticClass:"avatar",attrs:{src:e.row.user_avatar}}),t._v("\n        "+t._s(e.row.user_nickname)+"(ID:"+t._s(e.row.user_id)+")\n      ")]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"优惠券金额"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n        "+t._s(parseFloat(e.row.money/100))+"元\n      ")]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"使用状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n        "+t._s(t._f("filterStatus")(e.row.status))+"\n      ")]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"use_at",label:"使用时间"}})],1),t._v(" "),a("page",{attrs:{nowPage:t.nowPage,total:t.total},on:{pageChange:t.onPageChange,sizeChange:t.onSizeChange}})],1)},staticRenderFns:[]};var l=a("VU/8")(r,o,!1,function(t){a("NY9N"),a("qLMv")},"data-v-201fa58b",null);e.default=l.exports},qLMv:function(t,e){}});