chunk-0cc7a090.8d9b1080.js 4.0 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0cc7a090"],{"21d7":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container",attrs:{id:"refund"}},[a("div",{directives:[{name:"loading",rawName:"v-loading.fullscreen.lock",value:e.loadingFull,expression:"loadingFull",modifiers:{fullscreen:!0,lock:!0}}]}),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.showMachRefund}},[e._v("批量退款")]),e._v(" "),a("el-table",{ref:"listTable",staticClass:"table",attrs:{border:"",stripe:"","header-cell-style":{background:"#eef1f9"},data:e.list},on:{"selection-change":e.refundMulSelect}},[a("el-table-column",{attrs:{type:"selection",width:"50",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"order_num",label:"订单号"}}),e._v(" "),a("el-table-column",{attrs:{prop:"get_user",label:"客户昵称"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row.get_user;return[e._v(e._s(a.nickname))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"get_user",label:"客户手机号"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row.get_user;return[e._v(e._s(a.mobile))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"wait_back_money",label:"待退款金额"}})],1),e._v(" "),a("pagination",{attrs:{total:e.tableTotal,limit:e.listQuery.page_size,page:e.listQuery.page_index},on:{pagination:e.changePagination,"update:limit":e.changePagination}}),e._v(" "),a("el-dialog",{staticClass:"dialog_remark",attrs:{title:"退款备注",visible:e.dialog_remark,"show-close":!1,"close-on-click-modal":!1,width:"520px"},on:{"update:visible":function(t){e.dialog_remark=t}}},[a("el-input",{staticClass:"textarea_h",attrs:{type:"textarea",maxlength:"250","show-word-limit":""},model:{value:e.remark,callback:function(t){e.remark=t},expression:"remark"}}),e._v(" "),a("div",{staticClass:"dialog_btn_box"},[a("el-button",{on:{click:e.resetMulSeclect}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.submitRefund}},[e._v("确定")])],1)],1)],1)},i=[],l=a("c7eb"),s=(a("96cf"),a("1da1")),r=(a("7f7f"),a("20d6"),a("e2d6")),o={data:function(){return{loadingFull:!1,listQuery:{page_index:1,page_size:10},list:[],tableTotal:0,mulSelection:[],dialog_remark:!1,remark:""}},created:function(){this.getList()},methods:{getrefund:function(){var e=this;Object(r["a"])({page_index:1,page_size:20}).then((function(t){var a=t.data.total;setTimeout((function(){var t=e.$store.state.unreadMessage.findIndex((function(e){return"finance_refund"===e.name}));e.$store.commit("unreadMessage/UNREAD_MESSAGE_NUM_CHANGE",{index:t,num:a})}),567)}))},getList:function(){var e=Object(s["a"])(Object(l["a"])().mark((function e(){var t=this;return Object(l["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.loadingFull=!0,e.next=3,Object(r["a"])(this.listQuery).then((function(e){t.loadingFull=!1,200===e.code?(t.list=e.data.list,t.tableTotal=e.data.total):t.$message.error(e.message)})).catch((function(e){t.loadingFull=!1}));case 3:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),changePagination:function(e){var t=e.page,a=e.limit;this.listQuery.page_size=a,this.listQuery.page_index=t,this.getList()},refundMulSelect:function(e){var t=[];e.map((function(e){t.push(e.id)})),this.mulSelection=t},showMachRefund:function(){if(this.mulSelection.length<1)return this.$message.error("请先选择退款订单"),!1;this.dialog_remark=!0},showOneRefund:function(e){this.mulSelection=[e.id],this.dialog_remark=!0},submitRefund:function(){var e=this;this.loadingFull=!0,Object(r["b"])({data:this.mulSelection,remark:this.remark}).then((function(t){e.loadingFull=!1,200===t.code&&(e.resetMulSeclect(),e.getList(),e.getrefund(),e.$message.success(t.message))})).catch((function(t){e.loadingFull=!1}))},resetMulSeclect:function(){this.remark="",this.mulSelection=[],this.dialog_remark=!1}}},c=o,u=(a("3955"),a("2877")),d=Object(u["a"])(c,n,i,!1,null,null,null);t["default"]=d.exports},3955:function(e,t,a){"use strict";a("b5c7")},b5c7:function(e,t,a){}}]);