text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-56e1cfa1"],{"312e":function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"pad_5"},[a("div",{staticClass:"query_fields"},[a("el-form",{ref:"queryForm",staticClass:"demo-form-inline",attrs:{inline:!0,model:e.queryForm,size:"mini"}},[a("el-form-item",{attrs:{label:"机构名称",prop:"agentName"}},[a("el-input",{staticClass:"wid_140",attrs:{placeholder:"请输入机构名称"},model:{value:e.queryForm.agentName,callback:function(t){e.$set(e.queryForm,"agentName",t)},expression:"queryForm.agentName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"收益周期",prop:"month"}},[a("el-date-picker",{staticClass:"wid_140",attrs:{type:"month","value-format":"yyyy-MM",placeholder:"请选择时间"},model:{value:e.queryForm.month,callback:function(t){e.$set(e.queryForm,"month",t)},expression:"queryForm.month"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"收益状态",prop:"revenue_status"}},[a("el-select",{staticClass:"wid_140",attrs:{placeholder:"请选择收益状态"},model:{value:e.queryForm.revenue_status,callback:function(t){e.$set(e.queryForm,"revenue_status",t)},expression:"queryForm.revenue_status"}},e._l(e.queryForm.revenue_statuss,function(e,t){return a("el-option",{key:t,attrs:{label:e.value,value:e.id}})}),1)],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.queryData}},[e._v("查询")]),e._v(" "),a("el-button",{attrs:{type:"success",size:"mini"},on:{click:function(t){return e.resetData("queryForm")}}},[e._v("重置")]),e._v(" "),a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.handle_refresh}},[e._v("刷新")])],1)],1)],1),e._v(" "),a("div",[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.tableLoading,expression:"tableLoading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData,border:"",stripe:""}},[a("el-table-column",{attrs:{prop:"agentName",label:"机构名称",width:""}}),e._v(" "),a("el-table-column",{attrs:{prop:"",label:"机构地区",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n             "+e._s(t.row.province+t.row.city)+"\n           ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"accountMonthTotal",label:"出行收益(元)",width:""}}),e._v(" "),a("el-table-column",{attrs:{prop:"virtualMonthTotal",label:"贝壳收益(元)",width:""}}),e._v(" "),a("el-table-column",{attrs:{prop:"totalAmont",label:"总收益(元)",width:""}}),e._v(" "),a("el-table-column",{attrs:{prop:"month",label:"收益周期",width:""}}),e._v(" "),a("el-table-column",{attrs:{prop:"revenue_status",label:"收益状态",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[1==t.row.revenue_status?a("span",[e._v("待开票")]):2==t.row.revenue_status?a("span",[e._v("已开票")]):3==t.row.revenue_status?a("span",[e._v("已发放")]):4==t.row.revenue_status?a("span",[e._v("待发放")]):5==t.row.revenue_status?a("span",[e._v("财务拒绝")]):e._e()]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"",label:"操作",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[1==t.row.revenue_status||5==t.row.revenue_status?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.handle_upload(t.row)}}},[e._v("上传发票")]):a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.view_upload(t.row)}}},[e._v("查看发票")])]}}])})],1),e._v(" "),a("div",{staticClass:"block mar_t10"},[a("el-pagination",{attrs:{"current-page":e.currentPage,total:e.pageTotal,background:"",layout:"total, prev, pager, next, jumper"},on:{"current-change":e.handleCurrentChange}})],1)],1),e._v(" "),a("el-dialog",{directives:[{name:"loading",rawName:"v-loading",value:e.invoice_loading,expression:"invoice_loading"}],attrs:{title:"上传发票",visible:e.add_dialog,width:"30%",center:"","element-loading-text":"拼命加载中","element-loading-spinner":"el-icon-loading","element-loading-background":"rgba(0, 0, 0, 0.8)"},on:{"update:visible":function(t){e.add_dialog=t}}},[a("div",{staticClass:"wid_b75"},[a("el-upload",{ref:"uploadRef",attrs:{action:"#","http-request":e.handleUpload,"before-upload":e.beforeInvoiceUpload,"list-type":"picture-card","on-preview":e.handlePictureCardPreview,"on-remove":e.handleRemove,"on-exceed":e.limitTip,limit:1}},[a("i",{staticClass:"el-icon-plus"})]),e._v(" "),a("el-dialog",{staticClass:"invoiceimg_wrap",attrs:{title:"查看发票",visible:e.invoiceDialogVisible,"append-to-body":"",center:"",top:"10vh"},on:{"update:visible":function(t){e.invoiceDialogVisible=t}}},[a("img",{attrs:{width:"100%",src:e.dialogImageUrl,alt:""}})])],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"mini"},on:{click:function(t){e.add_dialog=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.saveData}},[e._v("确 定")])],1)]),e._v(" "),a("el-dialog",{directives:[{name:"loading",rawName:"v-loading",value:e.view_loading,expression:"view_loading"}],attrs:{title:"查看发票",visible:e.view_dialog,width:"30%",center:"","element-loading-text":"拼命加载中","element-loading-spinner":"el-icon-loading","element-loading-background":"rgba(0, 0, 0, 0.8)"},on:{"update:visible":function(t){e.view_dialog=t}}},[a("img",{attrs:{width:"100%",src:e.viewImageUrl,alt:""}}),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"mini"},on:{click:function(t){e.view_dialog=!1}}},[e._v("取 消")])],1)])],1)},n=[],o=(a("7f7f"),a("db72")),l=a("2f62"),s=a("cf45"),r=(a("bc3a"),a("3438")),c=a.n(r),u={name:"agentAccount",data:function(){return{cos:"",Bucket:"",Region:"",tableLoading:!1,view_loading:!1,invoice_loading:!1,tableData:[],queryForm:{agentName:"",month:"",revenue_statuss:[{id:1,value:"待开票"},{id:2,value:"已开票"},{id:3,value:"已发放"},{id:4,value:"待发放"},{id:5,value:"财务拒绝"}],revenue_status:""},pageTotal:0,currentPage:1,add_dialog:!1,view_dialog:!1,invoiceDialogVisible:!1,dialogImageUrl:"",viewImageUrl:"",agent_accountid:"",_key:""}},created:function(){this.getTableDataList(1),this.getCOSParam()},computed:Object(o["a"])({},Object(l["b"])(["name","roles"])),methods:{getCOSParam:function(){var e=this;this.$http.post("".concat(s["a"].baseUrl,"/agentAccount/getCosKey")).then(function(t){if("0000"==t.data.code){var a=t.data.data.liveList;e.cos=new c.a({AppId:a.Appid,SecretId:a.SecretId,SecretKey:a.SecretKey}),e.Bucket=a.Bucket,e.Region=a.Region}}).catch(function(e){console.log(e)})},getTableDataList:function(e){var t=this,a={data:{signInUserId:this.$store.getters.userId,signInRoleId:this.$store.getters.roleId,pageNum:e,pageSize:10,agentName:this.queryForm.agentName,month:this.queryForm.month,revenue_status:this.queryForm.revenue_status}};this.tableLoading=!0,this.$http.post("".concat(s["a"].baseUrl,"/agentAccount/getAgentAccount"),a).then(function(e){"0000"==e.data.code&&(console.log(e),t.tableData=e.data.data.agentAccountList,t.pageTotal=e.data.data.page.pageTotal,t.tableLoading=!1)}).catch(function(e){})},queryData:function(){this.getTableDataList(1),this.currentPage=1},handle_refresh:function(){this.getTableDataList(this.currentPage)},beforeInvoiceUpload:function(e){var t="image/jpeg"===e.type||"image/png"===e.type;if(!t)return this.m_message("只能上传图片","warning"),!1},handleUpload:function(e){var t=this,a=e.file;if(a){var i=a.name,n=(a.size,a.type,(new Date).getTime(),"InvoiceImg/"+(new Date).getTime()+i);this._key=n,t.invoice_loading=!0,t.cos.sliceUploadFile({Bucket:t.Bucket,Region:t.Region,Key:n,Body:a,onProgress:function(e){console.log(e)}},function(e,a){200==a.statusCode&&(t.invoice_loading=!1)})}},handlePictureCardPreview:function(e){this.dialogImageUrl=e.url,this.invoiceDialogVisible=!0},handleRemove:function(e,t){console.log(e,t)},limitTip:function(){this.m_message("只能上传一张","warning")},handle_upload:function(e){this.dialogImageUrl="",this.add_dialog=!0,this.agent_accountid=e.agent_accountid},saveData:function(){var e=this,t={data:{agent_accountid:this.agent_accountid+"",invoice_url:"/"+this._key}};this.invoice_loading=!0,this.$http.post("".concat(s["a"].baseUrl,"/agentAccount/uploadInvoice"),t).then(function(t){"0000"==t.data.code&&(e.invoice_loading=!1,e.add_dialog=!1,e.m_message(t.data.msg,"success"),e.$refs.uploadRef.clearFiles(),e.getTableDataList(1))}).catch(function(e){})},view_upload:function(e){var t=this,a={data:{agent_accountid:e.agent_accountid+""}};this.viewImageUrl="",this.view_dialog=!0,this.view_loading=!0,this.$http.post("".concat(s["a"].baseUrl,"/agentAccount/checkInvoices"),a).then(function(e){"0000"==e.data.code&&(t.viewImageUrl=e.data.data.agentAccount.invoice_url,t.view_loading=!1)}).catch(function(e){})},changeProfitState:function(e){},handleCurrentChange:function(e){this.currentPage=e,this.getTableDataList(e)},resetData:function(e){this.$refs[e].resetFields()},m_message:function(e,t){this.$message({message:e,type:t})}}},d=u,g=(a("b187"),a("51c7"),a("2877")),v=Object(g["a"])(d,i,n,!1,null,"73ffa3da",null);t["default"]=v.exports},"51c7":function(e,t,a){"use strict";var i=a("8c69"),n=a.n(i);n.a},"6bdb":function(e,t,a){},"8c69":function(e,t,a){},b187:function(e,t,a){"use strict";var i=a("6bdb"),n=a.n(i);n.a}}]);