90457e8.js 34 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([[46],{500:function(e,t,r){},503:function(e,t,r){},504:function(e,t,r){},505:function(e,t,r){},639:function(e,t,r){"use strict";r(500)},642:function(e,t,r){"use strict";r(503)},643:function(e,t,r){"use strict";r(504)},644:function(e,t,r){"use strict";r(505)},726:function(e,t,r){"use strict";r.r(t);r(71),r(18);var n,o=r(10),l=r(6),c=(r(30),{props:{action:{},pro:{},back:{type:Object}},data:function(){return{search:{pagesize:15,page:0,total:0},user_invoice_fileList:[],loading:!1,ruleForm:{type:1,is_income:2}}},computed:{},watch:{},created:function(){},mounted:function(){var e=this;return Object(l.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getInfo();case 2:case"end":return t.stop()}}),t)})))()},methods:{handleClose:function(){this.back.drawer_obj.user_invoice_add=!1,this.back.drawer_obj.id=""},getInfo:function(){var e=this;return Object(l.a)(regeneratorRuntime.mark((function t(){var r,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e.pro)){t.next=6;break}return t.next=4,e.$post("/uapi/pub/info/user/user_invoice/admin_info",{id:r});case 4:1==(n=t.sent).status&&(n.data.file&&(e.user_invoice_fileList=[{name:"发票文件",url:n.data.file}]),e.ruleForm=n.data);case 6:case"end":return t.stop()}}),t)})))()},add:function(){var e=this;return Object(l.a)(regeneratorRuntime.mark((function t(){var data,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.loading=!0,data=e.ruleForm,t.next=4,e.$post("/uapi/pub/info/user/user_invoice/admin_add",data);case 4:r=t.sent,e.loading=!1,1==r.status&&(e.$message.success("添加成功"),e.back.drawer_obj.user_invoice_add=!1,e.back.drawer_obj.id="",e.back.getList());case 7:case"end":return t.stop()}}),t)})))()},handleExceed:function(e,t){this.$message.warning("只能上传一个文件")},upload_success:function(e,t,r,n){if(1!=e.status){if(1==n){for(var o=[],i=0;i<r.length;i++){1==r[i].response.status&&o.push(r[i])}this.user_invoice_fileList=o,this.ruleForm.file=""}this.$message.error(e.info)}else 1==n&&(this.user_invoice_fileList=r,this.ruleForm.file=e.data.url)},upload_remove:function(e,t,r){1==r&&(this.user_invoice_fileList=t,this.ruleForm.file="")}}}),_=(r(639),r(4)),d=Object(_.a)(c,(function(){var e=this,t=e._self._c;return t("el-drawer",{ref:"drawer_close",attrs:{title:"上传发票",size:"600px","append-to-body":!1,"destroy-on-close":!0,visible:!0,"modal-append-to-body":!1,"before-close":e.handleClose,wrapperClosable:!1}},[t("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"qs-form-add",staticStyle:{padding:"20px"},attrs:{"label-width":"100px"}},[t("el-form-item",{attrs:{label:"销售方"}},[t("el-input",{model:{value:e.ruleForm.sale_company_name,callback:function(t){e.$set(e.ruleForm,"sale_company_name",t)},expression:"ruleForm.sale_company_name"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"购买方"}},[t("el-input",{model:{value:e.ruleForm.buy_company_name,callback:function(t){e.$set(e.ruleForm,"buy_company_name",t)},expression:"ruleForm.buy_company_name"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"发票金额"}},[t("el-input",{model:{value:e.ruleForm.money,callback:function(t){e.$set(e.ruleForm,"money",t)},expression:"ruleForm.money"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"发票号码"}},[t("el-input",{model:{value:e.ruleForm.tax_number,callback:function(t){e.$set(e.ruleForm,"tax_number",t)},expression:"ruleForm.tax_number"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"备注信息"}},[t("el-input",{model:{value:e.ruleForm.memo,callback:function(t){e.$set(e.ruleForm,"memo",t)},expression:"ruleForm.memo"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"发票类型"}},[t("el-radio-group",{model:{value:e.ruleForm.type,callback:function(t){e.$set(e.ruleForm,"type",t)},expression:"ruleForm.type"}},[t("el-radio",{attrs:{label:1}},[e._v("普票")]),e._v(" "),t("el-radio",{attrs:{label:2}},[e._v("专票")])],1)],1),e._v(" "),t("el-form-item",{attrs:{label:"税率"}},[t("el-radio-group",{model:{value:e.ruleForm.type_child,callback:function(t){e.$set(e.ruleForm,"type_child",t)},expression:"ruleForm.type_child"}},[t("el-radio",{attrs:{label:21}},[e._v("1个点")]),e._v(" "),t("el-radio",{attrs:{label:22}},[e._v("3个点")]),e._v(" "),t("el-radio",{attrs:{label:23}},[e._v("6个点")])],1)],1),e._v(" "),t("el-form-item",{attrs:{label:"业务类型"}},[t("el-radio-group",{model:{value:e.ruleForm.is_income,callback:function(t){e.$set(e.ruleForm,"is_income",t)},expression:"ruleForm.is_income"}},[t("el-radio",{attrs:{label:1}},[e._v("进账")]),e._v(" "),t("el-radio",{attrs:{label:2}},[e._v("出账")])],1)],1),e._v(" "),t("el-form-item",{attrs:{label:"发票文件"}},[t("el-upload",{staticClass:"upload-demo",attrs:{action:"/uapi/pub/upload",data:{type:"invoice"},"on-success":function(t,r,n){return e.upload_success(t,r,n,1)},"on-remove":function(t,r){return e.upload_remove(t,r,1)},accept:"application/pdf,image/jpeg,image/gif,image/png",multiple:"","on-exceed":e.handleExceed,limit:1,"file-list":e.user_invoice_fileList}},[t("div",{staticStyle:{display:"flex","align-items":"center"}},[t("div",[t("el-button",{attrs:{size:"small",type:"primary"}},[e._v("点击上传")])],1)])])],1),e._v(" "),t("el-form-item",[t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.add()}}},[e._v("保存")])],1)],1)],1)}),[],!1,null,"f86624ba",null).exports,m=r(441),f=r(582),v={props:{action:{},pro:{},back:{type:Object},fp_info:{type:Object}},data:function(){return{search:{pagesize:15,page:0,total:0},loading:!0,list:[]}},computed:{},watch:{},created:function(){},mounted:function(){this.getList()},methods:{qx_g_order:function(e){var t=this;return Object(l.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:t.$confirm("是否确认取消关联?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(l.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t.loading=!0,r.next=3,t.$post("/uapi/pub/info/order/user_order/qx_g_order",{order_no:e.order_no,invoice_id:t.pro});case 3:if(1!=r.sent.status){r.next=8;break}return t.$message({type:"success",message:"成功!"}),r.next=8,t.getList();case 8:t.loading=!1;case 9:case"end":return r.stop()}}),r)})))).catch((function(){t.$message({type:"info",message:"已取消删除"})}));case 1:case"end":return r.stop()}}),r)})))()},handleClose:function(){this.back.drawer_obj.order_settlement=!1,this.back.drawer_obj.id=""},g_order:function(){var e=this;return Object(l.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$prompt("请输入关联的订单编号","提示",{confirmButtonText:"确定",cancelButtonText:"取消"}).then(function(){var t=Object(l.a)(regeneratorRuntime.mark((function t(r){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.value,e.loading=!0,t.next=4,e.$post("/uapi/pub/info/order/user_order/bd_invoice_id",{id:e.pro,order_no:n});case 4:if(1!=t.sent.status){t.next=9;break}return e.$message({type:"success",message:"关联成功!"}),t.next=9,e.getList();case 9:e.loading=!1;case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(){e.$message({type:"info",message:"已取消关联"})}));case 1:case"end":return t.stop()}}),t)})))()},getList:function(){var e=this;return Object(l.a)(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,e.$post("/uapi/pub/info/order/user_order/invoice_order_list",{id:e.pro});case 3:r=t.sent,e.loading=!1,1==r.status&&(e.list=r.data.list,e.search.total=r.data.total);case 6:case"end":return t.stop()}}),t)})))()},page_event:function(e){this.search.page=e,this.getList()}}},h=v,w=(r(642),Object(_.a)(h,(function(){var e=this,t=e._self._c;return t("el-drawer",{ref:"drawer_close",attrs:{title:"关联订单(发票总价:¥".concat(e.fp_info.money,")"),size:"60%","append-to-body":!1,"destroy-on-close":!0,visible:!0,"modal-append-to-body":!1,"before-close":e.handleClose,wrapperClosable:!1}},[t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"block",staticStyle:{padding:"20px"}},[t("div",{staticStyle:{display:"flex","justify-content":"space-between"}},[t("div"),e._v(" "),t("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.g_order}},[e._v("关联订单")])],1),e._v(" "),t("el-table",{attrs:{"row-key":"id","show-summary":"",data:e.list}},[t("el-table-column",{attrs:{prop:"title",width:"400px",label:"订单名称"},scopedSlots:e._u([{key:"default",fn:function(r){return[t("a",{staticStyle:{color:"#006eff"},attrs:{href:"/main/orders_detail/?id=".concat(r.row.order_no),target:"_blank"}},[e._v(e._s(r.row.product_title))])]}}])}),e._v(" "),t("el-table-column",{attrs:{prop:"amount",label:"订单金额"},scopedSlots:e._u([{key:"default",fn:function(r){return[t("span",[e._v(e._s(r.row.amount))])]}}])}),e._v(" "),t("el-table-column",{attrs:{prop:"title",label:"关联项目"},scopedSlots:e._u([{key:"default",fn:function(r){return[t("a",{staticStyle:{color:"#006eff"},attrs:{href:r.row.project_url,target:"_blank"}},[e._v(e._s(r.row.project_name))])]}}])}),e._v(" "),t("el-table-column",{attrs:{prop:"title",label:"订单编号"},scopedSlots:e._u([{key:"default",fn:function(r){return[t("span",[e._v(e._s(r.row.order_no))])]}}])}),e._v(" "),t("el-table-column",{attrs:{prop:"title",width:"100px",fixed:"right",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(r){return[t("el-button",{attrs:{type:"text"},on:{click:function(t){return e.qx_g_order(r.row)}}},[e._v("取消关联")])]}}])})],1)],1)])}),[],!1,null,"4d4ebc75",null).exports),y={props:{back:{type:Object}},data:function(){return{show_info:!1,show_info_data:{apply_content:{}},loading:!0,list:[],user_account:{},search:{page:1,status:1,total:0,pagesize:10},user_invoice_fileList:[],user_invoice:{},status:[]}},mounted:function(){var e=this;return Object(l.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.get_status(),e.getList();case 2:case"end":return t.stop()}}),t)})))()},methods:{page_event:function(e){this.search.page=e,this.getList()},getList_:function(e){var t=this;return Object(l.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:t.search.status=e,t.search.page=0,t.getList();case 3:case"end":return r.stop()}}),r)})))()},get_status:function(){var e=this;return Object(l.a)(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,e.$post("/uapi/pub/info/user/user_invoice_order/get_status",e.search);case 3:r=t.sent,e.loading=!1,1==r.status&&(e.status=r.data.list);case 6:case"end":return t.stop()}}),t)})))()},handleClose:function(){this.back.drawer_obj.user_invoice_order_all=!1,this.back.drawer_obj.id="",this.back.get_status()},show_info_dialog:function(e){var t=this;return Object(l.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:t.user_invoice_fileList=[],t.show_info_data=e,t.show_info_data.file="",t.show_info=!0;case 4:case"end":return r.stop()}}),r)})))()},getList:function(){var e=this;return Object(l.a)(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,e.$post("/uapi/pub/info/user/user_invoice_order/all_admin",e.search);case 3:1==(r=t.sent).status&&(e.list=r.data.list,e.search.total=r.data.total),e.loading=!1;case 6:case"end":return t.stop()}}),t)})))()},user_invoice_order_submit:function(){var e=this;return Object(l.a)(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,e.$post("/uapi/pub/info/user/user_invoice_order/submit_admin",{type_child:e.show_info_data.type_child,id:e.show_info_data.id,tax_number:e.show_info_data.tax_number,file:e.show_info_data.file});case 3:if(1!=(r=t.sent).status){t.next=11;break}return e.list=r.data.list,t.next=8,e.getList();case 8:return t.next=10,e.get_status();case 10:e.show_info=!1;case 11:e.loading=!1;case 12:case"end":return t.stop()}}),t)})))()},cancel:function(e){var t=this;return Object(l.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:t.$confirm("是否确认取消开票?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(l.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t.$post("/uapi/pub/info/user/user_invoice_order/cancel_admin",{id:e.id});case 2:1==r.sent.status&&(t.$message({type:"success",message:"撤销成功!"}),t.getList(),t.get_status());case 4:case"end":return r.stop()}}),r)})))).catch((function(){t.$message({type:"info",message:"已取消"})}));case 1:case"end":return r.stop()}}),r)})))()},upload_success:function(e,t,r,n){if(1!=e.status){if(1==n){for(var o=[],i=0;i<r.length;i++){1==r[i].response.status&&o.push(r[i])}this.user_invoice_fileList=o,this.show_info_data.file=""}this.$message.error(e.info)}else 1==n&&(this.user_invoice_fileList=r,this.show_info_data.file=e.data.url)},upload_remove:function(e,t,r){1==r&&(this.user_invoice_fileList=t)},handleExceed:function(e,t){this.$message.warning("只能上传一个文件")}}},x=(r(643),Object(_.a)(y,(function(){var e=this,t=e._self._c;return t("el-drawer",{ref:"drawer_close",attrs:{title:"待开票",size:"80%","append-to-body":!1,"destroy-on-close":!0,visible:!0,"modal-append-to-body":!1,"before-close":e.handleClose,wrapperClosable:!1}},[t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{padding:"20px"}},[t("div",{staticClass:"qs_search",staticStyle:{"margin-bottom":"10px"}},[e._l(e.status,(function(r){return t("el-tag",{key:r.id,attrs:{type:r.id===e.search.status?"success":"info"},on:{click:function(t){return e.getList_(r.id)}}},[e._v(e._s(r.name)+"\n ")])})),e._v(" "),t("div",{staticClass:"flex_1"})],2),e._v(" "),t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.list}},[t("el-table-column",{attrs:{prop:"company_name",label:"公司名称"}}),e._v(" "),t("el-table-column",{attrs:{label:"开票用户",prop:"uid"},scopedSlots:e._u([{key:"default",fn:function(r){return[t("a",{attrs:{href:r.row.user_link,target:"_blank"}},[e._v(e._s(r.row.uid))])]}}])}),e._v(" "),t("el-table-column",{attrs:{prop:"money",label:"开票金额"}}),e._v(" "),t("el-table-column",{attrs:{prop:"address",label:"状态"},scopedSlots:e._u([{key:"default",fn:function(r){return[t("span",{style:"color: ".concat(r.row.status_obj.color)},[e._v(e._s(r.row.status_obj.name))])]}}])}),e._v(" "),t("el-table-column",{attrs:{prop:"addtime",label:"申请时间"}}),e._v(" "),t("el-table-column",{attrs:{prop:"admin_uid",label:"开票人"},scopedSlots:e._u([{key:"default",fn:function(r){return[t("a",{attrs:{target:"_blank",href:"https://www.proginn.com/rooter/user/".concat(r.row.admin_uid)}},[e._v(e._s(r.row.admin_uid))])]}}])}),e._v(" "),t("el-table-column",{attrs:{prop:"addtime",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(r){return[t("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(t){return e.show_info_dialog(r.row)}}},[e._v("开票明细")]),e._v(" "),1==r.row.status?t("el-button",{attrs:{size:"mini",type:"info"},on:{click:function(t){return e.cancel(r.row)}}},[e._v("撤销开票")]):e._e()]}}])})],1),e._v(" "),t("el-pagination",{staticStyle:{"margin-top":"10px"},attrs:{background:"",layout:"total,prev, pager, next","page-size":e.search.pagesize,total:e.search.total},on:{"current-change":e.page_event}}),e._v(" "),t("el-dialog",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{"append-to-body":!0,"close-on-click-modal":!1,title:"开票明细",width:"1200px",visible:e.show_info},on:{"update:visible":function(t){e.show_info=t}}},[t("div",{staticStyle:{display:"flex","flex-flow":"row","justify-content":"space-between"}},[t("div",{staticStyle:{width:"400px"}},[t("el-divider",[e._v("客户信息")]),e._v(" "),t("div",{staticClass:"user_account",staticStyle:{display:"flex","flex-flow":"column"}},[t("el-form",{attrs:{"label-width":"80px"}},[t("el-form-item",{attrs:{label:"名称"}},[e._v(e._s(e.show_info_data.apply_content.company_name))]),e._v(" "),t("el-form-item",{attrs:{label:"税号"}},[e._v(e._s(e.show_info_data.apply_content.tax_number))]),e._v(" "),t("el-form-item",{attrs:{label:"单位地址"}},[e._v(e._s(e.show_info_data.apply_content.company_address))]),e._v(" "),t("el-form-item",{attrs:{label:"电话号码"}},[e._v(e._s(e.show_info_data.apply_content.company_tel))]),e._v(" "),t("el-form-item",{attrs:{label:"开户银行"}},[e._v(e._s(e.show_info_data.apply_content.address))]),e._v(" "),t("el-form-item",{attrs:{label:"银行账号"}},[e._v(e._s(e.show_info_data.apply_content.bank_number))]),e._v(" "),t("el-form-item",{attrs:{label:"邮箱"}},[e._v(e._s(e.show_info_data.apply_content.email))])],1)],1),e._v(" "),t("el-divider",[e._v("关联订单")]),e._v(" "),t("div",{staticClass:"user_account",staticStyle:{display:"flex","flex-flow":"column"}},[t("el-form",{attrs:{"label-width":"80px"}},e._l(e.show_info_data.g_order,(function(r){return t("el-form-item",{attrs:{label:"订单:"}},[t("a",{attrs:{target:"_blank",href:"/main/orders_detail/?id=".concat(r)}},[e._v(e._s(r))])])})),1)],1)],1),e._v(" "),t("div",{staticStyle:{width:"50px","border-right":"1px solid #DCDFE6"}}),e._v(" "),t("div",{staticStyle:{width:"50%"}},[e.show_info_data.memo?t("el-divider",[e._v("特别说明")]):e._e(),e._v(" "),e.show_info_data.memo?t("div",{staticClass:"user_account",staticStyle:{display:"flex","flex-flow":"column"}},[t("el-form",[t("el-form-item",{domProps:{innerHTML:e._s(e.show_info_data.memo)}})],1)],1):e._e(),e._v(" "),e.show_info_data.memo?t("el-divider",[e._v("发票备注")]):e._e(),e._v(" "),e.show_info_data.memo?t("div",{staticClass:"user_account",staticStyle:{display:"flex","flex-flow":"column"}},[t("el-form",[t("el-form-item",{domProps:{innerHTML:e._s(e.show_info_data.kh_memo)}})],1)],1):e._e(),e._v(" "),t("el-divider",[e._v("开票信息")]),e._v(" "),t("div",{staticClass:"user_account",staticStyle:{display:"flex","flex-flow":"column"}},[t("el-form",{attrs:{"label-width":"80px"}},[t("el-form-item",{attrs:{label:"开票金额"}},[t("span",{staticStyle:{"font-size":"20px","font-weight":"700",color:"red"}},[e._v(e._s(e.show_info_data.money))]),e._v("元\n "),2==e.show_info_data.status&&e.show_info_data.user_invoice.file?t("el-link",{staticStyle:{"margin-left":"30px"},attrs:{href:e.show_info_data.user_invoice.file,type:"success",target:"_blank"}},[e._v("查看发票")]):e._e()],1),e._v(" "),t("el-form-item",{attrs:{label:"发票类型"}},[e._v(e._s(1==e.show_info_data.type?"普票":"专票"))]),e._v(" "),1==e.show_info_data.status?t("el-form-item",{attrs:{label:"发票号码"}},[t("el-input",{staticStyle:{width:"200px"},attrs:{size:"small",placeholder:"发票号码"},model:{value:e.show_info_data.tax_number,callback:function(t){e.$set(e.show_info_data,"tax_number",t)},expression:"show_info_data.tax_number"}})],1):e._e(),e._v(" "),1==e.show_info_data.status?t("el-form-item",{attrs:{label:"发票点数"}},[t("el-radio-group",{model:{value:e.show_info_data.type_child,callback:function(t){e.$set(e.show_info_data,"type_child",t)},expression:"show_info_data.type_child"}},[t("el-radio",{attrs:{label:21}},[e._v("1个点")]),e._v(" "),t("el-radio",{attrs:{label:22}},[e._v("3个点")]),e._v(" "),t("el-radio",{attrs:{label:23}},[e._v("6个点")])],1)],1):e._e(),e._v(" "),1==e.show_info_data.status?t("el-form-item",{attrs:{label:"上传发票"}},[t("el-upload",{staticClass:"upload-demo",attrs:{action:"/uapi/pub/upload",data:{type:"invoice"},"on-success":function(t,r,n){return e.upload_success(t,r,n,1)},"on-remove":function(t,r){return e.upload_remove(t,r,1)},accept:"application/pdf,image/jpeg,image/gif,image/png",multiple:"","on-exceed":e.handleExceed,limit:1,"file-list":e.user_invoice_fileList}},[t("div",{staticStyle:{display:"flex","align-items":"center"}},[t("div",[t("el-button",{attrs:{size:"mini",type:"primary"}},[e._v("点击上传")])],1),e._v(" "),t("div",{staticClass:"el-upload__tip",staticStyle:{"margin-left":"10px"},attrs:{slot:"tip"},slot:"tip"},[e._v("只能上传pdf文件")])])])],1):e._e()],1)],1),e._v(" "),1==e.show_info_data.status?t("el-form",{staticStyle:{"margin-top":"20px"},attrs:{"label-width":"120px"}},[t("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.user_invoice_order_submit}},[e._v("确认开票")])],1):e._e()],1)])])],1)])}),[],!1,null,"5c6ef50c",null).exports),k=(n={props:[],components:{order_settlement:w,user_invoice_add:d,pub_log:m.a,user_settlement:f.a,user_invoice_order_all:x}},Object(o.a)(n,"props",{back:{type:Object}}),Object(o.a)(n,"data",(function(){return{loading:!0,drawer_obj:{user_settlement:!1,order_settlement:!1,user_invoice_add:!1,user_invoice_order_all:!1,id:0,pub_log:!1,obj:{}},user_invoice_order:0,search:{pagesize:15,total:0,status:1,name:"",gd_total:0},status:[],list:[]}})),Object(o.a)(n,"computed",{}),Object(o.a)(n,"watch",{}),Object(o.a)(n,"created",(function(){})),Object(o.a)(n,"mounted",(function(){this.getList(),this.get_status()})),Object(o.a)(n,"methods",{show_user_settlement:function(e){this.drawer_obj.obj=e,this.drawer_obj.id=e.id,this.drawer_obj.user_settlement=!0},show_user_invoice_order_my:function(){this.drawer_obj.obj={},this.drawer_obj.id=0,this.drawer_obj.user_invoice_order_all=!0},show_order_settlement:function(e){this.drawer_obj.obj=e,this.drawer_obj.id=e.id,this.drawer_obj.order_settlement=!0},show_user_invoice_add:function(e){this.drawer_obj.id=e,this.drawer_obj.user_invoice_add=!0},add_memo:function(e){var t=this;return Object(l.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:t.$prompt("请输入备注信息","提示",{confirmButtonText:"确定",cancelButtonText:"取消"}).then(function(){var r=Object(l.a)(regeneratorRuntime.mark((function r(n){var o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=n.value,t.loading=!0,r.next=4,t.$post("/uapi/pub/info/user/user_invoice/add_memo",{id:e,memo:o});case 4:if(1!=r.sent.status){r.next=9;break}return t.$message({type:"success",message:"成功!"}),r.next=9,t.getList();case 9:t.loading=!1;case 10:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}()).catch((function(){t.$message({type:"info",message:"已取消"})}));case 1:case"end":return r.stop()}}),r)})))()},add_gd:function(e){var t=this;return Object(l.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:t.$prompt("请输入原因","提示",{confirmButtonText:"确定",cancelButtonText:"取消"}).then(function(){var r=Object(l.a)(regeneratorRuntime.mark((function r(n){var o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=n.value,t.loading=!0,r.next=4,t.$post("/uapi/pub/info/user/user_invoice/add_gd",{id:e,memo:o});case 4:if(1!=r.sent.status){r.next=9;break}return t.$message({type:"success",message:"成功!"}),r.next=9,t.getList();case 9:t.loading=!1;case 10:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}()).catch((function(){t.$message({type:"info",message:"已取消"})}));case 1:case"end":return r.stop()}}),r)})))()},manager_space:function(e,t){"log"==e?(this.drawer_obj.id=t,this.drawer_obj.pub_log=!0):"del"==e?this.admin_del(t):"agree"==e?this.admin_agree(t):"refuse"==e?this.admin_refuse(t):"edit"==e&&this.show_user_invoice_add(t)},getList:function(){var e=this;return Object(l.a)(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.loading=!0,e.drawer=!1,t.next=4,e.$post("/uapi/pub/info/user/user_invoice/admin_list",e.search);case 4:r=t.sent,e.loading=!1,1==r.status&&(e.list=r.data.list,e.search.total=r.data.total,e.search.pagesize=r.data.pagesize,e.search.gd_total=r.data.gd_total);case 7:case"end":return t.stop()}}),t)})))()},get_status:function(){var e=this;return Object(l.a)(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,e.$post("/uapi/pub/info/user/user_invoice/get_status",e.search);case 3:r=t.sent,e.loading=!1,1==r.status&&(e.status=r.data.list,e.user_invoice_order=r.data.user_invoice_order);case 6:case"end":return t.stop()}}),t)})))()},admin_refuse:function(e){var t=this;return Object(l.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:t.$prompt("请输入拒绝的理由","提示",{confirmButtonText:"确定",cancelButtonText:"取消"}).then(function(){var r=Object(l.a)(regeneratorRuntime.mark((function r(n){var o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=n.value,t.loading=!0,r.next=4,t.$post("/uapi/pub/info/user/user_invoice/admin_refuse",{id:e,reason:o});case 4:if(1!=r.sent.status){r.next=11;break}return t.$message({type:"success",message:"成功!"}),r.next=9,t.getList();case 9:return r.next=11,t.get_status();case 11:t.loading=!1;case 12:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}()).catch((function(){t.$message({type:"info",message:"已取消删除"})}));case 1:case"end":return r.stop()}}),r)})))()},admin_agree:function(e){var t=this;return Object(l.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:t.$confirm("是否确认通过?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(l.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t.loading=!0,r.next=3,t.$post("/uapi/pub/info/user/user_invoice/admin_agree",{id:e});case 3:if(1!=r.sent.status){r.next=10;break}return t.$message({type:"success",message:"成功!"}),r.next=8,t.getList();case 8:return r.next=10,t.get_status();case 10:t.loading=!1;case 11:case"end":return r.stop()}}),r)})))).catch((function(){t.$message({type:"info",message:"已取消删除"})}));case 1:case"end":return r.stop()}}),r)})))()},admin_del:function(e){var t=this;return Object(l.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:t.$confirm("是否确认删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(l.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t.loading=!0,r.next=3,t.$post("/uapi/pub/info/user/user_invoice/admin_del",{id:e});case 3:if(1!=r.sent.status){r.next=8;break}return t.$message({type:"success",message:"成功!"}),r.next=8,t.getList();case 8:t.loading=!1;case 9:case"end":return r.stop()}}),r)})))).catch((function(){t.$message({type:"info",message:"已取消删除"})}));case 1:case"end":return r.stop()}}),r)})))()},page_event:function(e){this.search.page=e,this.getList()},getData_:function(e){this.search.status=e,this.search.page=0,this.getList()},search_:function(){this.search.page=0,this.getList()}}),n),j=k,$=(r(644),Object(_.a)(j,(function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{padding:"20px"}},[t("div",{staticClass:"qs_search",staticStyle:{"margin-bottom":"10px"}},[e._l(e.status,(function(r){return t("el-tag",{key:r.id,attrs:{type:r.id===e.search.status?"success":"info"},on:{click:function(t){return e.getData_(r.id)}}},[e._v(e._s(r.name)+"\n ")])})),e._v(" "),t("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.show_user_invoice_order_my(0)}}},[e._v("待开票"),e.user_invoice_order>0?t("span",[e._v("("+e._s(e.user_invoice_order)+"个)")]):e._e()]),e._v(" "),t("div",{staticClass:"flex_1"})],2),e._v(" "),t("div",{staticClass:"qs_search",staticStyle:{"margin-bottom":"0px",display:"flex","justify-content":"space-between","align-items":"center"}},[t("el-form",{ref:"form",staticStyle:{display:"flex","flex-direction":"row"},attrs:{"label-width":"80px"}},[t("el-form-item",{attrs:{label:"销售方"}},[t("el-input",{attrs:{size:"small"},model:{value:e.search.sale_company_name,callback:function(t){e.$set(e.search,"sale_company_name",t)},expression:"search.sale_company_name"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"购买方"}},[t("el-input",{attrs:{size:"small"},model:{value:e.search.buy_company_name,callback:function(t){e.$set(e.search,"buy_company_name",t)},expression:"search.buy_company_name"}})],1),e._v(" "),t("el-form-item",{attrs:{"label-width":"5px"}},[t("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.search_}},[e._v("查询")]),e._v(" "),t("el-checkbox",{staticStyle:{"margin-left":"15px"},attrs:{"true-label":"1","false-label":"0"},on:{change:e.search_},model:{value:e.search.is_gd,callback:function(t){e.$set(e.search,"is_gd",t)},expression:"search.is_gd"}},[e._v("挂单("+e._s(e.search.gd_total)+"个)")])],1)],1),e._v(" "),t("div",[t("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.show_user_invoice_add(0)}}},[e._v("上传发票")])],1)],1),e._v(" "),t("el-row",[t("el-col",{attrs:{span:24}},[t("el-table",{attrs:{"row-key":"id",data:e.list}},[t("el-table-column",{attrs:{prop:"sale_company_name",width:"220px",label:"销售方"}}),e._v(" "),t("el-table-column",{attrs:{prop:"buy_company_name",width:"220px",label:"购买方"}}),e._v(" "),t("el-table-column",{attrs:{prop:"money",label:"发票金额"},scopedSlots:e._u([{key:"default",fn:function(r){return[t("span",[e._v(e._s(r.row.money))]),e._v(" "),t("br"),e._v(" "),t("a",{staticStyle:{color:"red"},attrs:{target:"_blank",href:r.row.file}},[e._v("查看发票")])]}}])}),e._v(" "),t("el-table-column",{attrs:{prop:"rate",label:"发票点数"},scopedSlots:e._u([{key:"default",fn:function(r){return[t("span",[e._v(e._s(r.row.rate))])]}}])}),e._v(" "),t("el-table-column",{attrs:{prop:"is_income",width:"200px",label:"发票号码"},scopedSlots:e._u([{key:"default",fn:function(r){return[t("span",[e._v(e._s(r.row.tax_number))])]}}])}),e._v(" "),t("el-table-column",{attrs:{prop:"is_income",label:"进账类型"},scopedSlots:e._u([{key:"default",fn:function(r){return[t("span",{style:"color:".concat(r.row.is_income_obj.color)},[e._v(e._s(r.row.is_income_obj.name))])]}}])}),e._v(" "),t("el-table-column",{attrs:{prop:"is_income",label:"发票类型"},scopedSlots:e._u([{key:"default",fn:function(r){return[t("span",[e._v(e._s(r.row.type_obj.name))])]}}])}),e._v(" "),t("el-table-column",{attrs:{prop:"status",label:"审核状态"},scopedSlots:e._u([{key:"default",fn:function(r){return[t("span",{style:"color:".concat(r.row.status_obj.color)},[e._v(e._s(r.row.status_obj.name))])]}}])}),e._v(" "),t("el-table-column",{attrs:{prop:"status",label:"备注"},scopedSlots:e._u([{key:"default",fn:function(r){return[t("el-button",{attrs:{type:"text",size:"small"},on:{click:function(t){return e.manager_space("log",r.row.id)}}},[e._v("查看备注")])]}}])}),e._v(" "),t("el-table-column",{attrs:{prop:"addtime",width:"160px",label:"发票日期"}}),e._v(" "),t("el-table-column",{attrs:{prop:"uid",label:"关联用户"},scopedSlots:e._u([{key:"default",fn:function(r){return[t("a",{staticStyle:{color:"#409EFF"},attrs:{href:r.row.user_link,target:"_blank"}},[e._v(e._s(r.row.uid))])]}}])}),e._v(" "),t("el-table-column",{attrs:{fixed:"right",width:"250px",prop:"uid",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(r){return[1==r.row.order_type?t("el-button",{attrs:{type:"text"},on:{click:function(t){return e.show_user_settlement(r.row)}}},[e._v("关联订单")]):e._e(),e._v(" "),2==r.row.order_type?t("el-button",{attrs:{type:"text"},on:{click:function(t){return e.show_order_settlement(r.row)}}},[e._v("关联订单")]):e._e(),e._v(" "),0==r.row.is_gd?t("el-button",{attrs:{type:"text"},on:{click:function(t){return e.add_gd(r.row.id)}}},[e._v("申请挂单")]):e._e(),e._v(" "),1==r.row.is_gd?t("el-button",{staticStyle:{color:"#E6A23C"},attrs:{type:"text"},on:{click:function(t){return e.add_gd(r.row.id)}}},[e._v("取消挂单")]):e._e(),e._v(" "),t("el-button",{attrs:{type:"text"},on:{click:function(t){return e.add_memo(r.row.id,"添加备注")}}},[e._v("备注")]),e._v(" "),t("el-dropdown",{staticStyle:{"margin-left":"10px"},on:{command:function(t){return e.manager_space(t,r.row.id)}}},[t("el-button",{attrs:{type:"text"}},[e._v("更多")]),e._v(" "),t("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[4!=r.row.status?t("el-dropdown-item",{attrs:{command:"edit"}},[e._v("编辑")]):e._e(),e._v(" "),1==r.row.status?t("el-dropdown-item",{attrs:{command:"agree"}},[e._v("审核通过")]):e._e(),e._v(" "),1==r.row.status?t("el-dropdown-item",{attrs:{command:"refuse"}},[e._v("审核拒绝")]):e._e(),e._v(" "),t("el-dropdown-item",{attrs:{command:"log"}},[e._v("操作日志")]),e._v(" "),4!=r.row.status?t("el-dropdown-item",{attrs:{command:"del"}},[e._v("删除")]):e._e()],1)],1)]}}])})],1)],1)],1),e._v(" "),t("el-pagination",{staticStyle:{"margin-top":"10px"},attrs:{background:"",layout:"prev, pager, next","page-size":e.search.pagesize,total:e.search.total},on:{"current-change":e.page_event}}),e._v(" "),e.drawer_obj.pub_log?t("pub_log",{attrs:{back:this,pro:e.drawer_obj.id,action:"user_invoice"}}):e._e(),e._v(" "),e.drawer_obj.user_settlement?t("user_settlement",{attrs:{fp_info:e.drawer_obj.obj,back:this,pro:e.drawer_obj.id}}):e._e(),e._v(" "),e.drawer_obj.user_invoice_add?t("user_invoice_add",{attrs:{back:this,pro:e.drawer_obj.id}}):e._e(),e._v(" "),e.drawer_obj.order_settlement?t("order_settlement",{attrs:{fp_info:e.drawer_obj.obj,back:this,pro:e.drawer_obj.id}}):e._e(),e._v(" "),e.drawer_obj.user_invoice_order_all?t("user_invoice_order_all",{attrs:{fp_info:e.drawer_obj.obj,back:this,pro:e.drawer_obj.id}}):e._e()],1)}),[],!1,null,"781e7f52",null));t.default=$.exports}}]);