(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-b0846ada"],{"14f6":function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"e",(function(){return r})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return o})),n.d(t,"a",(function(){return l}));var i=n("284b"),a=function(e){return i.a.request({url:"manager/postbox/list",method:"GET",params:e})},r=function(e){return i.a.request({url:"manager/postbox/valid",method:"POST",data:e})},s=function(e){return i.a.request({url:"manager/postbox/ruleValid",method:"POST",data:e})},o=function(e){return i.a.request({url:"manager/postbox/insert",method:"POST",data:e})},l=function(e){return i.a.request({url:"manager/postbox/delete/".concat(e),method:"DELETE"})}},"6bf2":function(e,t,n){"use strict";n.r(t);n("4160"),n("a630"),n("d81d"),n("fb6a"),n("b0c0"),n("d3b7"),n("ac1f"),n("3ca3"),n("5319"),n("159b"),n("e6cf"),n("96cf");var i=n("1da1"),a=n("5530"),r=n("10bd"),s=n("989b"),o=n("14f6"),l=n("2f62"),c={name:"FileUpload",data:function(){return{options:[],sidebarMenu:["pending","synchronized"],isIndex:0,showBadge:!1,queryInfo:{invoiceNum:"",supplier:"",pageNo:1,pageSize:10,isSend:"0",proxyId:""},tableData:[],isSearch:!0,total:0,loginId:"",isSend:"0",fileuploadDialg:!1,showButton:!0,helpDialog:!1,tipTitle:"en"==this.$i18n.locale?"Remind":"提示",tipSure:"en"==this.$i18n.locale?"Sure":"确定",tipCancel:"en"==this.$i18n.locale?"Cancel":"取消",tipDelete:"en"==this.$i18n.locale?"Delete current invoice?":"是否删除当前发票?",tipUpSuccess:"en"==this.$i18n.locale?"File imported successfully!":"导入文件成功!",tipError1:"en"==this.$i18n.locale?"The 'Synchronizing' invoices cannot be deleted.":"不可删除'同步中'发票",tipError2:"en"==this.$i18n.locale?"The 'Synchronized' invoices cannot be deleted.":"不可删除'已同步'发票",tipError3:"en"==this.$i18n.locale?"System Error":"系统错误",tipOK:"en"==this.$i18n.locale?"OK":"确定",tipUpErr:"en"==this.$i18n.locale?"Invalid invoice, pls reach out to the contact person for support.":"请上传合规发票,如有问题可联系支持人员。",tipUpErr2:"en"==this.$i18n.locale?"X receipts be uploaded,Y of them be recognized.":"上传X张票据,识别Y张发票。",languageData:{heloYou:"为你提供帮助",useage:"使用说明"},helpList:[{title:"帮助标题1",titleEn:"Help Title 1"},{title:"帮助标题2",titleEn:"Help Title 2"}],currentLanguage:this.$i18n.locale}},created:function(){var e=this.$route.params.queryInfo;void 0===e||(this.queryInfo=e,this.queryInfo.isSend=0,this.queryInfo.pageNo=1,this.queryInfo.pageSize=10)},computed:Object(a.a)({},Object(l.d)("user",["userInfo"])),mounted:function(){this.initTable(),this.initProxyList(),this.loginId=this.userInfo.email},methods:{showHelp:function(){var e=this;this.helpDialog=!0,Object(r.A)().then((function(t){200==t.status&&(e.helpList=t.result.map((function(t){return{itemTitle:"en"==e.currentLanguage?"".concat(t.titleEn):"".concat(t.title)}})))}))},goHelpDeTail:function(e){},selectionState:function(e){0==e?(this.queryInfo.isSend=e,this.isSend=e,this.showButton=!0):(this.queryInfo.isSend="1,2,9",this.isSend="1,2,9",this.showButton=!1),this.isIndex=e,this.queryInfo.pageNo=1,this.initTable()},upLoadFile:function(e){var t=this,n=new FormData;Array.from(e).forEach((function(e){n.append("files",e)})),n.append("proxyId",this.queryInfo.proxyId),this.$file.uploadFile(n,"api/manager/postbox/scanFiles").then((function(e){200===e.status?0==e.result.length?t.$confirm("提示标题",{title:t.tipTitle,message:t.tipUpErr,confirmButtonText:t.tipOK,showConfirmButton:!0,showCancelButton:!1,type:"warning"}).then((function(){})):e.result.length!=e.message?t.$confirm("提示标题",{title:t.tipTitle,message:t.tipUpErr2.replace("X",e.message).replace("Y",e.result.length),confirmButtonText:t.tipOK,showConfirmButton:!0,showCancelButton:!1,type:"warning"}).then((function(){t.$message.success(t.tipUpSuccess),t.$router.push({name:"invoiceDetail",params:{proxyId:t.queryInfo.proxyId,detail:e.result,viewType:1,queryInfo:t.queryInfo}})})):(t.$message.success(t.tipUpSuccess),t.$router.push({name:"invoiceDetail",params:{proxyId:t.queryInfo.proxyId,detail:e.result,viewType:1,queryInfo:t.queryInfo}})):t.$confirm("提示标题",{title:t.tipTitle,message:t.tipUpErr,confirmButtonText:t.tipOK,showConfirmButton:!0,showCancelButton:!1,type:"warning"}).then((function(){}))})).catch((function(e){t.$message.error(e.message)}))},goDetail:function(e){var t=[];t.push(e),this.$router.push({name:"invoiceDetail",params:{detail:t,viewType:2,queryInfo:this.queryInfo,proxyId:this.queryInfo.proxyId}})},deleteById:function(e){var t=this;return Object(i.a)(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,t.$confirm(t.tipDelete,t.tipTitle,{confirmButtonText:t.tipSure,cancelButtonText:t.tipCancel,type:"warning"});case 3:if("confirm"!=n.sent){n.next=15;break}return n.prev=5,n.next=8,Object(o.a)(e.id);case 8:200==(i=n.sent).status?(t.$message.success(i.message),t.initTable()):401==i.status?t.$message.error(t.tipError1):402==i.status?t.$message.error(t.tipError2):t.$message.error(t.tipError3),n.next=15;break;case 12:n.prev=12,n.t0=n.catch(5),t.$message.error(n.t0.message);case 15:n.next=19;break;case 17:n.prev=17,n.t1=n.catch(0);case 19:case"end":return n.stop()}}),n,null,[[0,17],[5,12]])})))()},chooseFile:function(){this.$refs.fileupload.click()},getBase64:function(e){return new Promise((function(t,n){var i=new FileReader;i.readAsDataURL(e),i.onload=function(e){t(e.target.result)}}))},uploadAvater:function(e){var t=this;return Object(i.a)(regeneratorRuntime.mark((function n(){var i,a,r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(i=e.target.files[0],e.target.value="",a=i.name.slice(-3),(r=new FormData).append("file",i),r.append("proxyId",t.queryInfo.proxyId),"jpg"==a||"png"==a)try{s.a.uploadFile(r,"api/manager/postbox/scanImg").then((function(e){switch(e.status){case 200:t.$message.success("导入文件成功!"),t.$router.push({name:"invoiceDetail",params:{proxyId:t.queryInfo.proxyId,detail:e.result,suffix:a,file:i,viewType:1}});break;case 201:t.$message.warning("错误的文件类型,请上传jpg,png文件");break;case 202:t.$message.warning("非电子发票文件");break;case 203:t.$message.warning("发票已存在");break;case 204:t.$message.warning("其他小票不可处理");break;case 500:t.$message.warning("系统错误");break;default:t.$message.warning("未知错误")}})).catch((function(e){}))}catch(e){}else"pdf"==a||"ofd"==a?s.a.uploadFile(r,"api/manager/postbox/scanPdf").then((function(e){200==e.status&&(t.$message.success("导入文件成功!"),t.$router.push({name:"invoiceDetail",params:{proxyId:t.queryInfo.proxyId,detail:e.result,suffix:a,file:i,viewType:1}}))})).catch((function(e){switch(e.status){case 201:t.$message.warning("错误的文件类型,请上传PDF,OFD文件");break;case 202:t.$message.warning("非电子发票文件");break;case 203:t.$message.warning("发票已存在");break;case 204:t.$message.warning("其他小票不可处理");break;case 500:t.$message.warning("系统错误");break;default:t.$message.warning("未知错误")}})):t.$message.warning("文件类型错误");case 7:case"end":return n.stop()}}),n)})))()},reset:function(){this.queryInfo.invoiceNum="",this.queryInfo.supplier="",this.queryInfo.pageNo=1,this.queryInfo.pageSize=10},goBack:function(){this.queryInfo={invoiceNum:"",supplier:"",pageNo:1,pageSize:10,isSend:this.isSend,proxyId:""},this.initTable()},searchByQueryInfo:function(){this.initTable()},changeHandle:function(){this.reset(),this.initTable()},initProxyList:function(){var e=this;Object(r.J)().then((function(t){200==t.status&&(e.options=t.result.map((function(e){return{proxyId:"".concat(e.proxyId),proxyUser:"".concat(e.proxyUser)}})))}))},initTable:function(){var e=this;Object(o.b)(this.queryInfo).then((function(t){200==t.status&&(e.tableData=t.result.data,e.total=t.result.pagination.total)})).catch((function(t){e.$message.error(t.message)}))},handleSizeChange:function(e){this.queryInfo.pageSize=e,this.initTable()},handleCurrentChange:function(e){this.queryInfo.pageNo=e,this.initTable()}}},u=(n("95de"),n("2877")),p=Object(u.a)(c,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"AIImageCheck"},[n("SidebarList",{attrs:{sidebarMenu:e.sidebarMenu,isIndex:e.isIndex},on:{buttonClick:e.selectionState}}),n("div",{directives:[{name:"show",rawName:"v-show",value:e.isSearch,expression:"isSearch"}],staticClass:"bgc"},[n("div",{staticClass:"d-flex a-center m-bottom-1"},[n("FeesInput",{attrs:{santakLabel:e.$t("invoiceNo"),fieldName:"invoiceNum",field:"queryInfo",width:"200","label-width":"120",defaultValue:e.queryInfo.invoiceNum}}),n("FeesInput",{attrs:{santakLabel:e.$t("supplier2"),fieldName:"supplier",field:"queryInfo",width:"200",labelWidth:"130",defaultValue:e.queryInfo.supplier}}),n("div",{staticClass:"d-flex"},[n("FeesButton",{attrs:{text:e.$t("search"),icon:"el-icon-search"},on:{buttonClick:e.searchByQueryInfo}}),n("FeesButton",{attrs:{text:e.$t("reset"),icon:"el-icon-download"},on:{buttonClick:e.reset}})],1),n("div",{staticStyle:{width:"10px"}}),e._v(" "+e._s(e.$t("agent"))+" "),n("div",{staticStyle:{width:"5px"}}),n("el-select",{attrs:{placeholder:e.$t("choose")},on:{change:e.changeHandle},model:{value:e.queryInfo.proxyId,callback:function(t){e.$set(e.queryInfo,"proxyId",t)},expression:"queryInfo.proxyId"}},e._l(e.options,(function(e){return n("el-option",{key:e.proxyId,attrs:{label:e.proxyUser,value:e.proxyId}})})),1),n("div",{staticStyle:{width:"10px"}}),n("FeesButton",{attrs:{text:e.$t("back"),icon:"el-icon-back"},on:{buttonClick:e.goBack}}),n("div",{staticStyle:{width:"20px"}})],1)]),n("div",{staticClass:"bg-fff p-left-2 h100",staticStyle:{"min-height":"500px"}},[n("div",{staticClass:"m-bottom-2 p-top-1 d-flex"},[e.showButton?n("FeesButton",{attrs:{text:e.$t("fileUpload"),icon:"el-icon-upload2",dataUpdateDialog:""},on:{buttonClick:function(t){e.fileuploadDialg=!e.fileuploadDialg}}}):e._e()],1),n("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData,stripe:"",border:""}},[n("el-table-column",{attrs:{label:e.$t("operate"),fixed:"",width:"140","header-align":"center",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("span",{staticClass:"text-color cursor",on:{click:function(n){return e.goDetail(t.row)}}},[e._v(" "+e._s(e.$t("view"))+" ")]),n("span",{staticClass:"link-text-color m-left-1 cursor c-red",on:{click:function(n){return e.deleteById(t.row)}}},[e._v(" "+e._s(e.$t("delete"))+" ")])]}}])}),n("el-table-column",{attrs:{prop:"buyer",label:e.$t("buyer"),"header-align":"center",width:"200",align:"center"}}),n("el-table-column",{attrs:{prop:"title",label:e.$t("invoiceType"),width:"160",align:"center","header-align":"center"}}),n("el-table-column",{attrs:{prop:"supplier",label:e.$t("supplier2"),width:"240","header-align":"center",align:"center"}}),n("el-table-column",{attrs:{prop:"invoiceCode",label:e.$t("invoiceCode"),width:"200",align:"center"}}),n("el-table-column",{attrs:{prop:"invoiceNum",label:e.$t("invoiceNo"),width:"200",align:"center"}}),n("el-table-column",{attrs:{prop:"invoiceDate",label:e.$t("invoiceDate"),align:"center","header-align":"center",width:"140"}}),n("el-table-column",{attrs:{prop:"preTax",label:e.$t("netAmount"),width:"120","header-align":"center",align:"right"}}),n("el-table-column",{attrs:{prop:"tax",label:e.$t("tax"),"header-align":"center",align:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.tax)+" ")]}}])}),n("el-table-column",{attrs:{prop:"invoiceMoney",label:e.$t("totalAmount"),width:"120","header-align":"center",align:"right"}}),n("el-table-column",{attrs:{prop:"validStatus",label:e.$t("validStatus"),align:"center",width:"120","header-align":"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("div",[e._v(" "+e._s(1==t.row.validStatus?e.$t("verified"):e.$t("unVerified"))+" ")])]}}])}),n("el-table-column",{attrs:{prop:"isSend",label:e.$t("sendStatus"),align:"center",width:"120","header-align":"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[0==t.row.isSend?n("div",{staticStyle:{color:"#909399"}},[e._v(" "+e._s(e.$t("unSent"))+" ")]):1==t.row.isSend||9==t.row.isSend?n("div",{staticStyle:{color:"#67c23a"}},[e._v(" "+e._s(e.$t("synchronizing"))+" ")]):2==t.row.isSend?n("div",{staticStyle:{color:"#f05a3f"}},[e._v(" "+e._s(e.$t("synchronized"))+" ")]):e._e()]}}])})],1),n("div",{staticClass:"m-y-1"},[n("el-pagination",{attrs:{background:"","current-page":e.queryInfo.pageNo,"page-size":e.queryInfo.pageSize,"page-sizes":[10,20,30,50],layout:" prev, pager, next,total, sizes, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange,"update:currentPage":function(t){return e.$set(e.queryInfo,"pageNo",t)},"update:current-page":function(t){return e.$set(e.queryInfo,"pageNo",t)}}}),n("input",{ref:"fileupload",staticStyle:{display:"none"},attrs:{type:"file",name:""},on:{change:function(t){return e.uploadAvater(t)}}})],1),n("el-dialog",{attrs:{title:e.$t("chooseFile"),visible:e.fileuploadDialg,width:"400px"},on:{"update:visible":function(t){e.fileuploadDialg=t}}},[n("div",{staticClass:"upload-wrapper"},[n("Upload",{attrs:{title:e.$t("uploadMess"),multiple:!0},on:{change:e.upLoadFile}})],1)]),n("el-dialog",{attrs:{title:e.$t("create"),visible:e.helpDialog,"before-close":e.dialogCancle},on:{"update:visible":function(t){e.helpDialog=t}}},[n("div",{staticClass:"help-page"},[n("div",{staticClass:"help-bg"},[n("div",{staticClass:"tips1"},[e._v(" 1111 ")]),n("div",{staticClass:"tips2"},[e._v(" 2222 ")])]),n("div",{staticClass:"common-item"},e._l(e.helpList,(function(t,i){return n("div",{key:i,staticClass:"common-wrap",on:{click:function(n){return e.goDeTail(t)}}},[n("div",[n("div",{staticClass:"d-flex"},[n("div",{staticClass:"text-number"},[n("img",{staticStyle:{width:"20px",height:"20px","margin-top":"3px"},attrs:{src:"/images/list.png",alt:"list",loading:"lazy"}})]),n("div",[e._v(" "+e._s(t.itemTitle)+" ")])])]),n("img",{staticStyle:{"object-fit":"contain"},attrs:{src:"/images/chevron.png",alt:"chevron"}})])})),0)])])],1)],1)}),[],!1,null,"052813ce",null);t.default=p.exports},"78d8":function(e,t,n){},"95de":function(e,t,n){"use strict";var i=n("78d8");n.n(i).a}}]);