You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
18 KiB
1 lines
18 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-efc05028"],{"00dd":function(e,t,n){},"14f6":function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),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 c}));var a=n("284b"),i=function(e){return a.a.request({url:"manager/postbox/list",method:"GET",params:e})},r=function(e){return a.a.request({url:"manager/postbox/valid",method:"POST",data:e})},s=function(e){return a.a.request({url:"manager/postbox/ruleValid",method:"POST",data:e})},o=function(e){return a.a.request({url:"manager/postbox/insert",method:"POST",data:e})},c=function(e){return a.a.request({url:"manager/postbox/delete/".concat(e),method:"DELETE"})}},"241d":function(e,t,n){"use strict";var a=n("00dd");n.n(a).a},"59c8":function(e,t,n){},"5afc":function(e,t,n){"use strict";var a=n("f4db");n.n(a).a},"5dfc":function(e,t,n){"use strict";var a=n("59c8");n.n(a).a},"7eb6":function(e,t,n){"use strict";var a={name:"img-preview",props:{imgItem:{type:Object}},created:function(){},data:function(){return{}}},i=(n("5dfc"),n("2877")),r=Object(i.a)(a,(function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"img-preview"},[t("div",{staticClass:"ticketAllocate-right d-flex flex-direction"},[t("div",{staticClass:"cursor c-fff w100 d-flex a-center j-center img-title"},[this._t("title")],2),t("div",{staticClass:"flex-1 d-flex a-center j-fe img-container"},[this._t("image")],2),t("div",{staticClass:"cursor img-tips c-fff w100 d-flex a-center j-fe p-right-2"},[this._t("date")],2),t("div",{staticClass:" img-footer mainColor cursor c-fff w100 d-flex a-center j-center downloadYU"},[this._t("footer")],2)])])}),[],!1,null,"66fde0f3",null);t.a=r.exports},c163:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n("a18c");function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;a.a.go(e)}},c82e:function(e,t,n){"use strict";var a=n("dc68");n.n(a).a},da7f:function(e,t,n){"use strict";n.r(t);n("99af"),n("4de4"),n("4160"),n("caad"),n("c975"),n("d81d"),n("b0c0"),n("b64b"),n("ac1f"),n("2532"),n("1276"),n("159b"),n("96cf");var a=n("1da1"),i=n("5530"),r=n("fa7d"),s=n("14f6"),o={name:"form-field",data:function(){return{statusWhiteList:["未处理","已处理","暂挂","退票"]}},props:["formGroup","orderField","statusStr","statusPending"],created:function(){},computed:{isInputDisabled:function(){var e=this.statusStr;return this.statusWhiteList.includes(e)},isInputShow:function(){var e=this.statusPending;return this.statusWhiteList.includes(e)}},methods:{remoteMethod:function(e){this.$emit("blurSearch",e)},updateOrderField:function(){"10101"==this.orderField.ticketCode&&(this.orderField.tax=0)},changeItem:function(e,t){this.$emit("change",e,t)}}},c=(n("5afc"),n("c82e"),n("2877")),u=Object(c.a)(o,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"form-field"},e._l(e.formGroup,(function(t,a){return n("div",{directives:[{name:"show",rawName:"v-show",value:"状态"!==t.keyCn||!e.isInputShow,expression:"item.keyCn !== '状态' || !isInputShow"}],key:a,staticClass:"formGroups",class:{required:t.isRequired}},[n("label",{attrs:{for:t.key}},[e._v(e._s(e.$t(t.key)))]),n("div",{staticClass:"m-top-1"},["input"==t.type&&"组织"!==t.keyCn?n("el-input",{staticStyle:{width:"80%",color:"#000"},attrs:{id:t.key,type:"text",disabled:t.disabled},model:{value:e.orderField[t.key],callback:function(n){e.$set(e.orderField,t.key,n)},expression:"orderField[item['key']]"}}):e._e(),"input"==t.type&&"组织"==t.keyCn?n("el-input",{staticStyle:{width:"80%",color:"#000"},attrs:{id:t.name,type:"text",disabled:t.disabled},model:{value:e.orderField[t.name],callback:function(n){e.$set(e.orderField,t.name,n)},expression:"orderField[item['name']]"}}):"select"==t.type?n("el-select",{staticStyle:{width:"80% !important"},attrs:{disabled:t.disabled,filterable:""},on:{change:function(n){return e.changeItem(n,t.keyCn)}},model:{value:e.orderField[t.key],callback:function(n){e.$set(e.orderField,t.key,n)},expression:"orderField[item['key']]"}},e._l(t.options,(function(e,a){return n("el-option",{key:a,attrs:{label:e[t.labelKey],value:e[t.labelValue]}})})),1):"blur"==t.type?n("el-select",{staticStyle:{width:"80% !important"},attrs:{disabled:t.disabled,filterable:"",remote:"","reserve-keyword":"","remote-method":e.remoteMethod,placeholder:"请输入"},model:{value:e.orderField[t.key],callback:function(n){e.$set(e.orderField,t.key,n)},expression:"orderField[item['key']]"}},e._l(t.options,(function(e,a){return n("el-option",{key:a,attrs:{label:e[t.labelKey],value:e[t.labelValue]}})})),1):"date"==t.type?n("el-date-picker",{staticStyle:{width:"80% !important"},attrs:{disabled:t.disabled,"value-format":"yyyy年MM月dd日",type:"date",placeholder:e.$t("chooseDate")},model:{value:e.orderField[t.key],callback:function(n){e.$set(e.orderField,t.key,n)},expression:"orderField[item['key']]"}}):e._e()],1)])})),0)}),[],!1,null,"19e0b4bc",null).exports,l=[{key:"invoiceDate",keyCn:"发票日期",type:"date"},{key:"netAmount",keyCn:"税前金额",type:"input"},{key:"tax",keyCn:"税额",type:"input"},{key:"totalAmount",keyCn:"发票金额",type:"input"},{key:"currency",keyCn:"币种",type:"input",disabled:!1},{key:"buyer",keyCn:"购买方",type:"input"},{key:"buyerCode",keyCn:"购买方税号",type:"input"},{key:"invoiceCode",keyCn:"发票代码",type:"input"},{key:"invoiceNo",keyCn:"发票号码",type:"input"},{key:"supplier",keyCn:"供应商",type:"input"},{key:"sellerCode",keyCn:"供应商税号",type:"input"},{key:"invoiceType",keyCn:"发票类型",type:"input"}],d=[{key:"invoiceNo",keyCn:"单据编号",type:"input"},{key:"invoiceType",keyCn:"发票类型",type:"input"},{key:"invoiceDate",keyCn:"发票日期",type:"date"},{key:"currency",keyCn:"币种",type:"input",disabled:!1},{key:"totalAmount",keyCn:"发票金额",type:"input"},{key:"invoiceCode",keyCn:"发票代码",type:"input"},{key:"consumeType",keyCn:"消费类型",type:"input"},{key:"station_geton",keyCn:"出发地",type:"input"},{key:"station_getoff",keyCn:"到达地",type:"input"},{key:"train_number",keyCn:"交通工具编号",type:"input"},{key:"seat",keyCn:"座位等级",type:"input"},{key:"ext05",keyCn:"乘客姓名",type:"input"}],p=[{key:"invoiceNo",keyCn:"单据编号",type:"input"},{key:"invoiceType",keyCn:"发票类型",type:"input"},{key:"invoiceDate",keyCn:"发票日期",type:"date"},{key:"currency",keyCn:"币种",type:"input"},{key:"totalAmount",keyCn:"发票金额",type:"input"},{key:"invoiceCode",keyCn:"发票代码",type:"input"},{key:"consumeType",keyCn:"消费类型",type:"input"}],y=n("7eb6"),f=(n("c163"),n("2f62")),m={name:"ElectronicInvoice",components:{imgPreview:y.a,formComponent:u},data:function(){return{activeTab:"",tabs:[],tabIndex:1,periodOptions:[],imgList:[],dialogImageUrl:"",isHidden:!1,dialogVisible:!1,options:[],formGroup:[],type:"",rate:0,subjectOptions:[],activeName:"1",statusStr:this.$route.query.statusStr||"",statusPending:this.$route.query.statusPending||"",userId:"",viewType:"",proxyId:"",clickFlag:!0,queryInfo:{},invoice_type_list:{10101:"增值税普通发票",10100:"增值税专用发票",10102:"增值税电子普通发票",30100:"形式发票",30101:"收据",10506:"航空运输电子客票行程单"},traffic_type_list:{10500:"交通票10500",10503:"交通票10503",10505:"交通票10505","10505a":"交通票10505a",10506:"交通票10506"},quota_type_list:{10200:"定额发票10200",10507:"定额发票10507"},tipTitle:"en"==this.$i18n.locale?"Remind":"提示",tipSure:"en"==this.$i18n.locale?"Save":"确定",tipCancel:"en"==this.$i18n.locale?"Cancel":"取消",tipSave:"en"==this.$i18n.locale?"Too fast clicks":"点击的太快了"}},created:function(){var e=this;setTimeout((function(){e.activeTab=1}),200),this.userId=localStorage.getItem("userId");var t=this.$route.params.detail;this.proxyId=this.$route.params.proxyId,this.viewType=this.$route.params.viewType,this.queryInfo=this.$route.params.queryInfo,t.forEach((function(t){if(t.name=e.tabIndex++,"en"==e.$i18n.locale?t.ext02=t.messEn:t.ext02=t.messCn,1==e.viewType)t.isSend=0,t.createTime=Object(r.c)(new Date,!0);else{var n=Object(r.c)(t.createTime,!0);t.createTime=n}var a=JSON.parse(t.dataJson).details,i=a.station_geton,s=a.station_getoff,o=a.train_number,c=a.seat,u=a.name,y=a.remark;if("please select"===t.invoiceDate||"请选择"===t.invoiceDate||""===t.invoiceDate)t.invoiceDate="";else{var f=Object(r.a)(t.invoiceDate);t.invoiceDate=f}var m=t.invoiceTypeCode||t.ticketType;if(Object.keys(e.traffic_type_list).includes(m))e.formGroup=d.map((function(e){return"invoiceDate"==e.key&&("10200"==t.invoiceTypeCode||"10200"==t.ticketType||"10507"==t.invoiceTypeCode||"10507"==t.ticketType)||"descr"==e.key?e.disabled=!1:e.disabled=!0,e})),t.station_geton=i,t.station_getoff=s,t.train_number=o,t.seat=c,t.ext05=u,t.remark=y,t.invoiceNo=t.invoiceNum,t.totalAmount=t.invoiceMoney;else if(Object.keys(e.quota_type_list).includes(m))e.formGroup=p.map((function(e){return"invoiceDate"==e.key&&("10200"==t.invoiceTypeCode||"10200"==t.ticketType||"10507"==t.invoiceTypeCode||"10507"==t.ticketType)||"descr"==e.key?e.disabled=!1:e.disabled=!0,e})),t.invoiceNo=t.invoiceNum,t.totalAmount=t.invoiceMoney;else{e.formGroup=l.map((function(e){return"invoiceDate"!=e.key||"10200"!=t.invoiceTypeCode&&"10200"!=t.ticketType&&"10507"!=t.invoiceTypeCode&&"10507"!=t.ticketType?e.disabled=!0:e.disabled=!1,e}));var v=JSON.parse(t.dataJson).details,b=v.seller_tax_id,k=v.buyer_tax_id;t.sellerCode=b,t.buyerCode=k,t.netAmount=t.preTax,t.invoiceNo=t.invoiceNum,t.totalAmount=t.invoiceMoney}})),this.tabs=t},mounted:function(){this.type=this.$route.query.type},computed:Object(i.a)({},Object(f.d)("user",["userInfo"])),methods:{ruleValid:function(e){var t=this;return Object(a.a)(regeneratorRuntime.mark((function n(){var a,i,o,c,u,l,d,p,y,f,m,v,b;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(""!=e.invoiceDate||"10200"!=e.invoiceTypeCode&&"10200"!=e.ticketType&&"10507"!=e.invoiceTypeCode&&"10507"!=e.ticketType){n.next=3;break}return t.$message.warning("发票日期必填"),n.abrupt("return");case 3:return e.userId=t.proxyId,""!=e.invoiceDate&&(e.invoiceDate=Object(r.b)(e.invoiceDate,!0)),t.clickFlag=!1,e.expenseTypeId=1,n.next=9,Object(s.e)(e);case 9:return 200!=(a=n.sent).status&&(a.result=e),a.result.userId=t.proxyId,n.next=14,Object(s.c)(a.result);case 14:i=n.sent,o=i.result.data,n.t0=i.status,n.next=200===n.t0?19:201===n.t0?21:202===n.t0?28:500===n.t0?35:37;break;case 19:return t.handleSave(i.result.data),n.abrupt("break",38);case 21:for(p in c=t.handleTipsMessage(i.result.checked.messageList),u=c.split("<br/>"),l=[],d=t.$createElement,u)l.push(d("p",null,u[p]));return t.$confirm("提示标题",{title:t.tipTitle,message:d("div",null,l),confirmButtonText:t.tipSure,showConfirmButton:!0,showCancelButton:!1,dangerouslyUseHTMLString:!0,type:"warning"}).then((function(e){"confirm"==e&&t.handleSave(o)})),n.abrupt("break",38);case 28:for(b in y=t.handleTipsMessage(i.result.checked.messageList),f=y.split("<br/>"),m=[],v=t.$createElement,f)m.push(v("p",null,f[b]));return t.$confirm("提示标题",{title:t.tipTitle,message:v("div",null,m),cancelButtonText:t.tipCancel,showConfirmButton:!1,showCancelButton:!0,type:"warning"}).then((function(){})),n.abrupt("break",38);case 35:return t.$message.warning(i.message),n.abrupt("break",38);case 37:return n.abrupt("break",38);case 38:return t.clickFlag=!0,n.abrupt("return");case 40:case"end":return n.stop()}}),n)})))()},ruleValid_bak:function(){var e=this;return Object(a.a)(regeneratorRuntime.mark((function t(){var n,a,i,o,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.orderField.userId=e.proxyId,e.orderField.invoiceDate=Object(r.b)(e.orderField.invoiceDate,!0),t.next=4,Object(s.e)(e.orderField);case 4:if(200!=(n=t.sent).status){t.next=27;break}return n.result.userId=e.proxyId,t.next=9,Object(s.c)(n.result);case 9:a=t.sent,i=a.result.data,t.t0=a.status,t.next=200===t.t0?14:201===t.t0?16:202===t.t0?19:500===t.t0?22:24;break;case 14:return e.handleSave(a.result.data),t.abrupt("break",25);case 16:return o=e.handleTipsMessage(a.result.checked.messageList),e.$confirm(o,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!1,dangerouslyUseHTMLString:!0,type:"warning"}).then((function(t){"confirm"==t&&e.handleSave(i)})),t.abrupt("break",25);case 19:return c=e.handleTipsMessage(a.result.checked.messageList),e.$confirm(c,"提示",{confirmButtonText:"确定",showCancelButton:!1,type:"warning"}).then((function(){})),t.abrupt("break",25);case 22:return e.$message.warning(a.message),t.abrupt("break",25);case 24:return t.abrupt("break",25);case 25:t.next=28;break;case 27:e.$message.warning("验真失败");case 28:return t.abrupt("return");case 29:case"end":return t.stop()}}),t)})))()},saveInvoice:function(){var e=this;if(this.clickFlag){var t=this.tabs.filter((function(t){return t.name===e.activeTab}));this.ruleValid(t[0])}else this.$message.warning(this.tipSave)},removeTab:function(e){if(this.tabs.length<=1)this.$message.warning("至少需要保留一个标签页");else{var t=this.tabs,n=this.activeTab;n===e&&t.forEach((function(a,i){if(a.name===e){var r=t[i+1]||t[i-1];r&&(n=r.name)}})),this.activeTab=n,this.tabs=t.filter((function(t){return t.name!==e}))}},handleTipsMessage:function(e){var t="en"==this.$i18n.locale?"【Warning】":"【警告】",n="en"==this.$i18n.locale?"【Forbidden】":"【禁止】",a="en"==this.$i18n.locale?"【Reminder】":"【提醒】",i="";return e.map((function(e){return 2==e.level&&(e.label=t+"- "),3==e.level&&(e.label=n+"- "),4==e.level&&(e.label=a+"- "),e})).forEach((function(e){i+="".concat(e.label," ").concat(e.message," <br/>")})),i},goBack:function(){this.$router.push({name:"FileUpload",params:{queryInfo:this.queryInfo}})},handleSave:function(e){var t=this;return Object(a.a)(regeneratorRuntime.mark((function n(){var a;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e.userId=t.proxyId,n.next=3,Object(s.d)(e);case 3:200==(a=n.sent).status?(t.$message.success(a.message),t.tabs.length<=1?t.$router.push({name:"FileUpload",params:{queryInfo:t.queryInfo}}):t.removeTab(t.activeTab)):t.$message.warning(a.message);case 5:case"end":return n.stop()}}),n)})))()},download:function(e){var t=e.imgPath,n=t.indexOf("api"),a=t.substring(n),i=t.split("/"),r=i[i.length-1];this.$file.downloadFile(a,{},r)}}},v=(n("241d"),Object(c.a)(m,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ElectronicInvoice p2"},[n("div",{staticClass:"w100 j-sb d-flex m-bottom-2 a-center p-relative"},[n("div",{staticClass:"f20 f-weight"},[e._v(" "+e._s(e.$t("invoiceDetail"))+" ")]),n("div",{staticClass:"d-flex"},[n("FeesButton",{attrs:{text:e.$t("back"),icon:"el-icon-back"},on:{buttonClick:e.goBack}}),"1"==e.viewType?n("FeesButton",{attrs:{text:e.$t("save")},on:{buttonClick:e.saveInvoice}}):e._e()],1)]),n("el-tabs",{attrs:{type:"card",closable:""},on:{"tab-remove":e.removeTab},model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},e._l(e.tabs,(function(t){return n("el-tab-pane",{key:t.name,attrs:{label:t.title,name:t.name,closable:e.tabs.length>1}},[n("div",{staticClass:"d-flex"},[n("div",{staticClass:"flex-4"},[""!=t.ext02&&"image"!=e.type?n("el-alert",{attrs:{title:t.ext02,type:"warning",closable:!1,"show-icon":""}}):e._e(),n("div",{staticClass:"m-top-2 d-flex",class:{col4:e.isHidden},staticStyle:{"flex-wrap":"wrap"}},[n("formComponent",{attrs:{statusPending:e.statusPending,statusStr:e.statusStr,formGroup:e.formGroup,orderField:t}})],1)],1),n("div",{staticClass:"m-right-2 splitLine"}),n("div",{staticClass:"flex-2",staticStyle:{"max-height":"650px",background:"#c0c2c4"}},[n("div",{staticClass:"m-right-2 h100 w100 d-flex a-center j-center flex-direction"},[n("imgPreview",{staticClass:"w100 h100",staticStyle:{margin:"0 !important"},attrs:{imgItem:{}},scopedSlots:e._u([{key:"title",fn:function(){return[e._v(" "+e._s(t.title)+" ")]},proxy:!0},{key:"image",fn:function(){return[n("el-image",{attrs:{src:t.imgPath,"preview-src-list":[t.imgPath]}})]},proxy:!0},{key:"date",fn:function(){return[e._v(" "+e._s(e.$t("uploaded"))+":"+e._s(t.createTime)+" ")]},proxy:!0},{key:"footer",fn:function(){return[n("span",{on:{click:function(n){return e.download(t)}}},[e._v(e._s(e.$t("downLoadPic")))])]},proxy:!0}],null,!0)})],1)])])])})),1),n("el-dialog",{attrs:{visible:e.dialogVisible},on:{"update:visible":function(t){e.dialogVisible=t}}},[n("img",{attrs:{width:"100%",src:e.dialogImageUrl,alt:""}})])],1)}),[],!1,null,"47c33514",null));t.default=v.exports},dc68:function(e,t,n){},f4db:function(e,t,n){},fa7d:function(e,t,n){"use strict";n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return r}));n("99af"),n("ac1f"),n("4d90"),n("5319");function a(e,t){if(""==e||!e)return"";var n=new Date(e),a=n.getFullYear(),i=n.getMonth()+1+"";i=i.padStart(2,0);var r=n.getDate()+"";r=r.padStart(2,0);var s=n.getHours()+"";s=s.padStart(2,0);var o=n.getMinutes()+"",c=n.getSeconds()+"";return o=o.padStart(2,0),c=c.padStart(2,0),"nyrsf"==t?"".concat(a,"-").concat(i,"-").concat(r," ").concat(s,":").concat(o):"month"==t?"".concat(a,"-").concat(i):"nowtime"==t?"".concat(a,"-").concat(i,"-").concat(r," ").concat(s,":").concat(o,":").concat(c):t?"".concat(a,"-").concat(i,"-").concat(r):"".concat(a,"年-").concat(i,"月-").concat(r,"日 ").concat(s,":").concat(o,":").concat(c)}function i(e){var t=new Date(e),n=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0");return"".concat(n,"年").concat(a,"月").concat(i,"日")}function r(e){return e.replace(/(\d{4})年(\d{1,2})月(\d{1,2})日/,(function(e,t,n,a){return"".concat(t,"-").concat(n.padStart(2,"0"),"-").concat(a.padStart(2,"0"))}))}}}]);
|