3833b07.js 15 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([[74],{525:function(e,t,r){},661:function(e,t,r){"use strict";r(525)},778:function(e,t,r){"use strict";r.r(t);r(18);var n=r(6),o=(r(30),{data:function(){return{pageInfo:{page:1,size:20,total:0},headerBar:{revenue:0,trusteeship:0,refund:0,revenueCount:0,trusteeshipCount:0,refundCount:0},title:"",activeName:"1",orderType:"",tableData:[],queryData:{}}},mounted:function(){if(!this.queryDataFormat())return!1;this.getHeaderBar(),this.getTableData()},methods:{getTableData:function(){var e=this;return Object(n.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$post("/api/admin/order/get_orders",e.queryData).then((function(t){var data=t.data;1===t.status&&(e.tableData=data.orders,e.pageInfo.total=data.count)}));case 1:case"end":return t.stop()}}),t)})))()},getHeaderBar:function(){var e=this;return Object(n.a)(regeneratorRuntime.mark((function t(){var data;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.queryData.start_time&&e.queryData.end_time&&e.queryData.product_type){t.next=3;break}return e.$message.error("参数异常"),t.abrupt("return");case 3:data={start_time:e.queryData.start_time,end_time:e.queryData.end_time,product_type:e.queryData.product_type},e.$post("/api/admin/ReportForm/getFormBar",data).then((function(t){var data=t.data;if(1===t.status){e.headerBar.trusteeship=(1*data.trusteeshipAmount).toFixed(2),e.headerBar.refund=(1*data.refundAmount).toFixed(2),e.headerBar.trusteeshipCount=data.trusteeshipCount,e.headerBar.refundCount=data.refundCount;var r=data.trusteeshipCount-data.refundCount;e.headerBar.revenue=(1*data.revenue).toFixed(2),e.headerBar.revenueCount=r>0?r:0}}));case 5:case"end":return t.stop()}}),t)})))()},exportList:function(){var e=this;return Object(n.a)(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=window.location.host+"/api/admin/order/export?product_type="+e.queryData.product_type+"&start_time="+e.queryData.start_time+"&end_time="+e.queryData.end_time+"&date_type="+e.queryData.date_type+"&status="+e.queryData.status+"&artificial_mark=0",""!==e.orderType?r+="&order_type="+e.orderType:r+="&active_name=all",window.location.href="https://"+r;case 3:case"end":return t.stop()}}),t)})))()},onClickPage:function(){this.queryDataFormat(),this.getTableData()},handleClick:function(e,t){"2"===e.name?this.orderType="1":"3"===e.name?this.orderType="8":this.orderType="",this.queryDataFormat(),this.getTableData()},queryDataFormat:function(){var e=this.$route.query;if("{}"===JSON.stringify(e))return this.$message.error("参数不正确"),!1;this.orderType=""!==this.orderType?this.orderType:e.orderType||this.orderType;var data={view:"platform",product_type:e.product_type,start_time:e.start_time,end_time:e.end_time,date_type:e.date_type||2,status:401,artificial_mark:0,page:this.pageInfo.page,page_size:this.pageInfo.size};return""!==this.orderType?data.order_type=this.orderType:data.order_type=1,this.formatTitle(data.product_type),this.queryData=data,!0},formatTitle:function(e){var title="";switch(e*=1){case 2:title="整包";break;case 4:title="雇佣";break;case 9:title="云端";break;case 11:title="会员";break;case 12:title="认证";break;case 55:title="查看联系方式"}this.title=title+"项目详情"},formatDate:function(time){if("0"===time)return"--";var e=new Date(1e3*time),t=e.getFullYear(),r=e.getMonth()+1,n=e.getDate(),o=e.getHours(),l=e.getMinutes(),_=e.getSeconds();return o<10&&(o="0"+o),l<10&&(l="0"+l),_<10&&(_="0"+_),t+"-"+r+"-"+n+" "+o+":"+l+":"+_}}}),l=(r(661),r(4)),component=Object(l.a)(o,(function(){var e=this,t=e._self._c;return t("div",[t("div",{staticClass:"i-title"},[e._v(e._s(e.title))]),e._v(" "),t("div",[t("el-tabs",{attrs:{type:"card"},on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[t("el-tab-pane",{attrs:{label:"实际营收",name:"1"}},[t("div",{staticClass:"header-bar"},[t("div",[t("el-row",[t("el-col",{attrs:{span:3}},[t("span",{staticClass:"text-title"},[e._v("实际营收")])]),e._v(" "),t("el-col",{attrs:{span:3,offset:1}},[t("span",{staticClass:"text-title"},[e._v("托管")])]),e._v(" "),t("el-col",{attrs:{span:3,offset:1}},[t("span",{staticClass:"text-title"},[e._v("退款")])])],1)],1),e._v(" "),t("div",[t("el-row",[t("el-col",{attrs:{span:3}},[t("span",{staticClass:"red"},[e._v(e._s(e.headerBar.revenue))])]),e._v(" "),t("el-col",{attrs:{span:3,offset:1}},[t("span",{staticClass:"red"},[e._v(e._s(e.headerBar.trusteeship))])]),e._v(" "),t("el-col",{attrs:{span:3,offset:1}},[t("span",{staticClass:"green"},[e._v(e._s(e.headerBar.refund))])])],1)],1),e._v(" "),t("div",[t("el-row",[t("el-col",{attrs:{span:3}},[t("span",[e._v("共"+e._s(e.headerBar.revenueCount)+"笔")])]),e._v(" "),t("el-col",{attrs:{span:3,offset:1}},[t("span",[e._v("共"+e._s(e.headerBar.trusteeshipCount)+"笔")])]),e._v(" "),t("el-col",{attrs:{span:3,offset:1}},[t("span",[e._v("共"+e._s(e.headerBar.refundCount)+"笔")])])],1)],1)])]),e._v(" "),t("el-tab-pane",{attrs:{label:"托管",name:"2"}},[t("div",{staticClass:"header-bar"},[t("div",[t("el-row",[t("el-col",{attrs:{span:3}},[t("span",{staticClass:"text-title"},[e._v("实际营收")])]),e._v(" "),t("el-col",{attrs:{span:3,offset:1}},[t("span",{staticClass:"text-title"},[e._v("托管")])]),e._v(" "),t("el-col",{attrs:{span:3,offset:1}},[t("span",{staticClass:"text-title"},[e._v("退款")])])],1)],1),e._v(" "),t("div",[t("el-row",[t("el-col",{attrs:{span:3}},[t("span",{staticClass:"red"},[e._v(e._s(e.headerBar.revenue))])]),e._v(" "),t("el-col",{attrs:{span:3,offset:1}},[t("span",{staticClass:"red"},[e._v(e._s(e.headerBar.trusteeship))])]),e._v(" "),t("el-col",{attrs:{span:3,offset:1}},[t("span",{staticClass:"green"},[e._v(e._s(e.headerBar.refund))])])],1)],1),e._v(" "),t("div",[t("el-row",[t("el-col",{attrs:{span:3}},[t("span",[e._v("共"+e._s(e.headerBar.revenueCount)+"笔")])]),e._v(" "),t("el-col",{attrs:{span:3,offset:1}},[t("span",[e._v("共"+e._s(e.headerBar.trusteeshipCount)+"笔")])]),e._v(" "),t("el-col",{attrs:{span:3,offset:1}},[t("span",[e._v("共"+e._s(e.headerBar.refundCount)+"笔")])])],1)],1)])]),e._v(" "),t("el-tab-pane",{attrs:{label:"退款",name:"3"}},[t("div",{staticClass:"header-bar"},[t("div",[t("el-row",[t("el-col",{attrs:{span:3}},[t("span",{staticClass:"text-title"},[e._v("实际营收")])]),e._v(" "),t("el-col",{attrs:{span:3,offset:1}},[t("span",{staticClass:"text-title"},[e._v("托管")])]),e._v(" "),t("el-col",{attrs:{span:3,offset:1}},[t("span",{staticClass:"text-title"},[e._v("退款")])])],1)],1),e._v(" "),t("div",[t("el-row",[t("el-col",{attrs:{span:3}},[t("span",{staticClass:"red"},[e._v(e._s(e.headerBar.revenue))])]),e._v(" "),t("el-col",{attrs:{span:3,offset:1}},[t("span",{staticClass:"red"},[e._v(e._s(e.headerBar.trusteeship))])]),e._v(" "),t("el-col",{attrs:{span:3,offset:1}},[t("span",{staticClass:"green"},[e._v(e._s(e.headerBar.refund))])])],1)],1),e._v(" "),t("div",[t("el-row",[t("el-col",{attrs:{span:3}},[t("span",[e._v("共"+e._s(e.headerBar.revenueCount)+"笔")])]),e._v(" "),t("el-col",{attrs:{span:3,offset:1}},[t("span",[e._v("共"+e._s(e.headerBar.trusteeshipCount)+"笔")])]),e._v(" "),t("el-col",{attrs:{span:3,offset:1}},[t("span",[e._v("共"+e._s(e.headerBar.refundCount)+"笔")])])],1)],1)])])],1)],1),e._v(" "),t("div",{staticStyle:{"text-align":"right","margin-bottom":"10px"}},[t("el-button",{staticClass:"export-excel",attrs:{type:"primary"},on:{click:e.exportList}},[e._v("导出报表")])],1),e._v(" "),t("div",[t("el-table",{attrs:{data:e.tableData,border:"",width:"100%"}},[t("el-table-column",{attrs:{label:"订单名称"},scopedSlots:e._u([{key:"default",fn:function(r){return[t("span",{staticClass:"lblue point"},[t("nuxt-link",{attrs:{target:"_blank",to:{path:"/main/orders_detail?id="+r.row.order_no}}},[e._v(e._s(r.row.product_title))])],1)]}}])}),e._v(" "),t("el-table-column",{attrs:{label:"用户"},scopedSlots:e._u([{key:"default",fn:function(r){return[t("a",{staticClass:"link-type",attrs:{href:r.row.user_url,target:"_blank"}},[e._v(e._s(r.row.user_info.nickname)+"("+e._s(r.row.uid)+")")])]}}])}),e._v(" "),t("el-table-column",{attrs:{label:"实际金额"},scopedSlots:e._u([{key:"default",fn:function(r){return["admin_confirm"!=r.row.channel?[13==r.row.product_type?t("div",[8==r.row.order_type?t("span",[e._v(e._s((r.row.real_amount/100).toFixed(2))+"\n ")]):4==r.row.order_type?["balance"!=r.row.channel?t("span",{staticClass:"red"},[e._v("\n +"+e._s((r.row.real_amount/100).toFixed(2))+"\n ")]):t("span",[e._v("\n +"+e._s((r.row.real_amount/100).toFixed(2))+"\n ")])]:t("span",[e._v(e._s((r.row.real_amount/100).toFixed(2)))])],2):200==r.row.product_type?t("div",[t("span",{staticClass:"green"},[e._v("\n "+e._s((r.row.real_amount/100).toFixed(2))+"\n ")])]):3==r.row.product_type||300==r.row.product_type?t("div",[41266==r.row.operator_uid?t("div",[e._v("\n +"+e._s((r.row.real_amount/100).toFixed(2))+"\n ")]):t("div",[t("span",{staticClass:"red"},[e._v("+"+e._s((r.row.real_amount/100).toFixed(2)))])])]):8==r.row.product_type?t("div",["balance"!=r.row.channel?t("span",{staticClass:"red"},[e._v("\n +"+e._s((r.row.real_amount/100).toFixed(2))+"\n ")]):t("span",[e._v("\n +"+e._s((r.row.real_amount/100).toFixed(2))+"\n ")])]):4==r.row.product_type?t("div",[8==r.row.order_type||5==r.row.order_type?t("span",[e._v(e._s((r.row.real_amount/100).toFixed(2)))]):4==r.row.order_type||1==r.row.order_type?["balance"!=r.row.channel?t("span",{staticClass:"red"},[e._v("\n +"+e._s((r.row.real_amount/100).toFixed(2))+"\n ")]):t("span",[e._v("\n +"+e._s((r.row.real_amount/100).toFixed(2))+"\n ")])]:t("span",[e._v(e._s((r.row.real_amount/100).toFixed(2)))])],2):400==r.row.product_type?t("div",[8==r.row.order_type?t("span",[e._v(e._s((r.row.real_amount/100).toFixed(2)))]):1==r.row.order_type?["balance"!=r.row.channel?t("span",{staticClass:"red"},[e._v("\n +"+e._s((r.row.real_amount/100).toFixed(2))+"\n ")]):t("span",[e._v("\n +"+e._s((r.row.real_amount/100).toFixed(2))+"\n ")])]:t("span",[e._v(e._s((r.row.real_amount/100).toFixed(2)))])],2):9==r.row.product_type?t("div",[8==r.row.order_type?t("span",[e._v(e._s((r.row.real_amount/100).toFixed(2)))]):5==r.row.order_type?[("balance"!=r.row.channel&&r.row.channel,t("span",[e._v("\n "+e._s((r.row.real_amount/100).toFixed(2))+"\n ")]))]:1==r.row.order_type?["balance"!=r.row.channel?t("span",{staticClass:"red"},[e._v("\n +"+e._s((r.row.real_amount/100).toFixed(2))+"\n ")]):t("span",[e._v("\n +"+e._s((r.row.real_amount/100).toFixed(2))+"\n ")])]:t("span",[e._v(e._s((r.row.real_amount/100).toFixed(2)))])],2):2==r.row.product_type?t("div",[8==r.row.order_type?t("span",[e._v(e._s((r.row.real_amount/100).toFixed(2)))]):5==r.row.order_type?[("balance"!=r.row.channel&&r.row.channel,t("span",[e._v("\n "+e._s((r.row.real_amount/100).toFixed(2))+"\n ")]))]:1==r.row.order_type?["balance"!=r.row.channel&&"qingtuanbao"!=r.row.channel?t("span",{staticClass:"red"},[e._v("\n +"+e._s((r.row.real_amount/100).toFixed(2))+"\n ")]):t("span",[e._v("\n +"+e._s((r.row.real_amount/100).toFixed(2))+"\n ")])]:7==r.row.order_type?["balance"!=r.row.channel&&"qingtuanbao"!=r.row.channel?t("span",{staticClass:"green"},[e._v("\n "+e._s((r.row.real_amount/100).toFixed(2))+"\n ")]):t("span",[e._v("\n "+e._s((r.row.real_amount/100).toFixed(2))+"\n ")])]:t("span",[e._v(e._s((r.row.real_amount/100).toFixed(2)))])],2):(r.row.product_type,t("div",["balance"!=r.row.channel?t("span",{staticClass:"red"},[e._v("\n +"+e._s((r.row.real_amount/100).toFixed(2))+"\n ")]):t("span",[e._v("\n +"+e._s((r.row.real_amount/100).toFixed(2))+"\n ")])]))]:["41266"!=r.row.operator_uid?t("div",[parseInt(r.row.real_amount)>0?t("span",{staticClass:"red"},[e._v("+"+e._s((r.row.real_amount/100).toFixed(2)))]):0==parseInt(r.row.real_amount)?t("span",[e._v(e._s((r.row.real_amount/100).toFixed(2)))]):t("span",{staticClass:"green"},[e._v(e._s((r.row.real_amount/100).toFixed(2)))])]):t("div",[parseInt(r.row.real_amount)>0?t("span",[e._v("+"+e._s((r.row.real_amount/100).toFixed(2)))]):(parseInt(r.row.real_amount),t("span",[e._v(e._s((r.row.real_amount/100).toFixed(2)))]))])]]}}])}),e._v(" "),t("el-table-column",{attrs:{prop:"channel_name",label:"支付方式"}}),e._v(" "),t("el-table-column",{attrs:{prop:"order_state_name",label:"订单状态"}}),e._v(" "),t("el-table-column",{attrs:{prop:"",label:"创建时间"},scopedSlots:e._u([{key:"default",fn:function(r){return[t("span",[e._v(e._s(e.formatDate(r.row.created_at)))])]}}])}),e._v(" "),t("el-table-column",{attrs:{prop:"name",label:"到账时间"},scopedSlots:e._u([{key:"default",fn:function(r){return[t("span",[e._v(e._s(e.formatDate(r.row.pay_time)))])]}}])}),e._v(" "),t("el-table-column",{attrs:{prop:"",label:"订单编号"},scopedSlots:e._u([{key:"default",fn:function(r){return[t("nuxt-link",{attrs:{target:"_blank",to:{path:"/main/orders_detail?id="+r.row.order_no}}},[e._v(e._s(r.row.order_no)+"\n ")])]}}])}),e._v(" "),t("el-table-column",{attrs:{prop:"out_order_id",label:"支付编号"}}),e._v(" "),t("el-table-column",{attrs:{width:"100",label:"订单类型"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.product_type_name))]}}])}),e._v(" "),t("el-table-column",{attrs:{prop:"order_type_name",label:"交易类型"},scopedSlots:e._u([{key:"default",fn:function(r){return[t("span",[e._v(e._s(r.row.order_type_name))])]}}])}),e._v(" "),t("el-table-column",{attrs:{label:"关联项目"},scopedSlots:e._u([{key:"default",fn:function(r){return[t("a",{attrs:{href:r.row.related_project.url?r.row.related_project.url:"#",target:"_blank"}},[t("span",{staticClass:"lblue"},[e._v(e._s(r.row.related_project.name?r.row.related_project.name:"--"))])])]}}])}),e._v(" "),t("el-table-column",{attrs:{prop:"operator_uid",label:"人工"},scopedSlots:e._u([{key:"default",fn:function(r){return[r.row.operator_info.nickname?t("span",[e._v(e._s(r.row.operator_info.nickname))]):e._e(),e._v(" "),t("span",[e._v("("+e._s(r.row.operator_uid)+")")])]}}])})],1)],1),e._v(" "),t("div",[t("el-pagination",{attrs:{"current-page":e.pageInfo.page,"page-size":e.pageInfo.size,layout:"total, prev, pager, next",total:e.pageInfo.total},on:{"current-change":e.onClickPage,"update:currentPage":function(t){return e.$set(e.pageInfo,"page",t)},"update:current-page":function(t){return e.$set(e.pageInfo,"page",t)}}})],1)])}),[],!1,null,"7ba11be9",null);t.default=component.exports}}]);