webpackJsonp([21],{"89rD":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("CCn6"),s={name:"index",components:{page:a("kmJW").a},data:function(){return{nowPage:1,total:0,limit:10,refundTypeList:[{id:0,value:"退款中"},{id:1,value:"退款成功"},{id:2,value:"退款失败"}],searchFrom:{nickname:"",user_id:"",out_trade_no:"",status:1},list:[]}},filters:{filterStatus:function(e){var t="";return 0===e?t="退款中":1===e?t="退款成功":2===e&&(t="退款失败"),t}},mounted:function(){this.getRefundList()},methods:{editComment:function(e,t){var a=this;this.$prompt("","编辑备注",{confirmButtonText:"确定",cancelButtonText:"取消",inputType:"textarea",inputValue:t}).then(function(t){var s=t.value;Object(n.T)(e,"refund",{desc:s}).then(function(e){a.$message({type:"success",message:"编辑备注成功"}),a.getRefundList()})})},onPageChange:function(e){this.nowPage=e,this.getRefundList()},onSizeChange:function(e){this.nowPage=1,this.limit=e,this.getRefundList()},getRefundList:function(){var e=this,t={limit:this.limit,page:this.nowPage};this.searchFrom.nickname&&(t.nickname=this.searchFrom.nickname),this.searchFrom.user_id&&(t.user_id=this.searchFrom.user_id),this.searchFrom.status&&(t.status=this.searchFrom.status),this.searchFrom.out_trade_no&&(t.out_trade_no=this.searchFrom.out_trade_no),Object(n._33)(t).then(function(t){e.total=t.total,e.list=t.list})}}},r={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"refund"},[a("el-form",{ref:"searchFrom",attrs:{model:e.searchFrom,"label-width":"100px"}},[a("el-row",[a("el-col",{attrs:{span:4}},[a("el-form-item",{attrs:{label:"用户昵称"}},[a("el-input",{model:{value:e.searchFrom.nickname,callback:function(t){e.$set(e.searchFrom,"nickname",t)},expression:"searchFrom.nickname"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:4}},[a("el-form-item",{attrs:{label:"用户ID"}},[a("el-input",{model:{value:e.searchFrom.user_id,callback:function(t){e.$set(e.searchFrom,"user_id",t)},expression:"searchFrom.user_id"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"订单编号"}},[a("el-input",{model:{value:e.searchFrom.out_trade_no,callback:function(t){e.$set(e.searchFrom,"out_trade_no",t)},expression:"searchFrom.out_trade_no"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"退款状态"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},on:{change:e.getRefundList},model:{value:e.searchFrom.status,callback:function(t){e.$set(e.searchFrom,"status",t)},expression:"searchFrom.status"}},e._l(e.refundTypeList,function(e){return a("el-option",{key:e.id,attrs:{label:e.value,value:e.id}})}))],1)],1),e._v(" "),a("el-col",{attrs:{span:4}},[a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:e.getRefundList}},[e._v("搜索")])],1)],1)],1)],1),e._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.list}},[a("el-table-column",{attrs:{prop:"refund_no",label:"退款编号"}}),e._v(" "),a("el-table-column",{attrs:{prop:"out_trade_no",label:"订单号"}}),e._v(" "),a("el-table-column",{attrs:{label:"用户信息","min-width":"140",className:"userInfo"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("img",{staticClass:"avatar",attrs:{src:t.row.user_avatar}}),e._v("\n        "+e._s(t.row.user_nickname)+"(ID:"+e._s(t.row.user_id)+")\n      ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"order_money",label:"订单金额"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n        "+e._s(parseFloat(t.row.order_money/100))+"元\n      ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"refund_money",label:"退款金额"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n        "+e._s(parseFloat(t.row.refund_money/100))+"元\n      ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"desc",label:"备注"}}),e._v(" "),a("el-table-column",{attrs:{label:"退款状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n        "+e._s(e._f("filterStatus")(t.row.status))+"\n      ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"success_at",label:"退款成功时间"}}),e._v(" "),e.$store.state.readonly?e._e():a("el-table-column",{attrs:{label:"操作","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"warning",plain:"",size:"mini"},on:{click:function(a){e.editComment(t.row.id,t.row.desc)}}},[e._v("\n          备注\n        ")])]}}])})],1),e._v(" "),a("page",{attrs:{nowPage:e.nowPage,total:e.total},on:{pageChange:e.onPageChange,sizeChange:e.onSizeChange}})],1)},staticRenderFns:[]};var o=a("VU/8")(s,r,!1,function(e){a("awws"),a("Imzv")},"data-v-6e353c94",null);t.default=o.exports},Imzv:function(e,t){},awws:function(e,t){}});