text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[92],{"/Twv":function(e,t,a){"use strict";a.r(t);a("g9YV");var n,l,r,o=a("wCAj"),i=(a("IzEo"),a("bx4M")),c=(a("bP8k"),a("gFTJ")),s=(a("/zsF"),a("PArb")),m=(a("2qtc"),a("kLXV")),p=(a("14J3"),a("BMrR")),u=(a("+L6B"),a("2/Rp")),d=(a("Pwec"),a("CtXQ")),f=(a("jCWc"),a("kPKH")),b=a("2Taf"),h=a.n(b),E=a("vZ4D"),g=a.n(E),I=a("l4Ni"),v=a.n(I),y=a("ujKo"),w=a.n(y),M=a("MhPg"),k=a.n(M),C=(a("tU7J"),a("wFql")),Y=a("q1tI"),S=a.n(Y),P=a("MuoO"),R=a("zHco"),D=(a("/iVF"),a("wd/R")),z=a.n(D),x=a("hotG");function F(e){return function(){var t,a=w()(e);if(q()){var n=w()(this).constructor;t=Reflect.construct(a,arguments,n)}else t=a.apply(this,arguments);return v()(this,t)}}function q(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}var B=C["a"].Title,O=(n=Object(P["connect"])(function(e){var t=e.preMainInfo,a=e.loading;return{preMainInfo:t,loading:a.models.preMainInfo}}),n((r=function(e){k()(a,e);var t=F(a);function a(){var e;h()(this,a);for(var n=arguments.length,l=new Array(n),r=0;r<n;r++)l[r]=arguments[r];return e=t.call.apply(t,[this].concat(l)),e.state={visible:!1,showVisible:!1,url:"",preMainInfo:{}},e.columns=[{title:"\u8bb0\u5f55\u540d",dataIndex:"recordname",render:function(e){var t=/\.{1}[a-z]{1,}$/;return null!==t.exec(e)?S.a.createElement("span",null,e.slice(0,t.exec(e).index)):S.a.createElement("span",null,e)}},{title:"\u4e0a\u4f20\u65e5\u671f",dataIndex:"recorddate",render:function(e){return S.a.createElement("span",null,z()(e).format("YYYY-MM-DD"))}},{title:"\u64cd\u4f5c",render:function(t,a){return S.a.createElement(Y["Fragment"],null,S.a.createElement("a",{onClick:function(){return e.previewItem(t,a)}},"\u67e5\u770b"))}}],e.previewItem=function(t){var a=e.props.dispatch,n=t.filepath;if(void 0!==n&&null!==n){var l=n.substring(n.lastIndexOf(".")+1);if("pdf"===l)a({type:"preMainInfo/getOssPdf",payload:{osspath:n},callback:function(t){if(console.log(t),400===t.code)notification.open({message:"\u6253\u5f00\u5931\u8d25",description:t.data});else{var a=t.data;e.setState({url:a}),console.log(a),window.open(a)}}});else{var r="https://www.smlq.vip/api/cert_report/getFileStream?osspath=".concat(n);window.open(r)}}},e.handleOk=function(t){console.log(t);var a=e.props,n=a.dispatch,l=(a.match,sessionStorage.getItem("preMainInfono"));n({type:"preMainInfo/remove",payload:{preMainInfono:l}}),e.setState({visible:!1})},e.handleCancel=function(t){console.log(t),e.setState({visible:!1})},e.deletepreMainInfo=function(){e.setState({visible:!0})},e.back=function(){window.close()},e.showCancel=function(){e.setState({showVisible:!1})},e.getPlaceFromCode=function(e){var t="".concat(e.substring(0,2),"0000"),a="".concat(e.substring(0,4),"00"),n=e,l=x["a"].find(function(e){return e.value===t});if(void 0===l)return S.a.createElement("span",null,n);var r=l.children.find(function(e){return e.value===a}),o=r.children.find(function(e){return e.value===n});return S.a.createElement("span",null,l.label,"/",r.label,"/",o.label)},e}return g()(a,[{key:"componentWillMount",value:function(){var e=this,t=sessionStorage.getItem("prereportno"),a=this.props.dispatch;a({type:"preMainInfo/getPremaininfo",payload:{prereportno:t},callback:function(t){200===t.code&&e.setState({preMainInfo:t.data})}}),a({type:"preMainInfo/getPreRecord",payload:{prereportno:t}})}},{key:"render",value:function(){var e=this.props,t=e.preMainInfo.preRecordData,a=e.loading,n=this.state,l=n.showVisible,r=n.url,b=n.preMainInfo;return S.a.createElement(R["a"],{loading:a},S.a.createElement(i["a"],{bordered:!1},S.a.createElement(p["a"],{gutter:16},S.a.createElement(f["a"],{span:3},S.a.createElement(B,{level:3},"\u7533\u8bf7\u8be6\u60c5")),S.a.createElement(f["a"],{span:19}),S.a.createElement(f["a"],{span:2},S.a.createElement(u["a"],{type:"primary",style:{marginLeft:8,paddingLeft:0,paddingRight:15},onClick:this.back},S.a.createElement(d["a"],{style:{paddingLeft:5},type:"close"}),"\u5173\u95ed"))),S.a.createElement(m["a"],{title:"\u786e\u8ba4",visible:this.state.visible,onOk:this.handleOk,onCancel:this.handleCancel},S.a.createElement("p",null,"\u662f\u5426\u64a4\u9500")),S.a.createElement(s["a"],{style:{marginBottom:32}}),S.a.createElement(c["a"],{size:"large",title:"\u4e1a\u52a1\u4fe1\u606f",style:{marginBottom:32},bordered:!0},S.a.createElement(c["a"].Item,{label:"\u59d4\u6258\u7f16\u53f7"},b.reportno20),S.a.createElement(c["a"].Item,{label:"\u67e5\u8be2\u5bc6\u7801"},b.randomcode),S.a.createElement(c["a"].Item,{label:"\u59d4\u6258\u65e5\u671f"},z()(b.preMainInfodate).format("YYYY-MM-DD")),S.a.createElement(c["a"].Item,{label:"\u7533\u8bf7\u4eba"},b.applicant),S.a.createElement(c["a"].Item,{label:"\u8054\u7cfb\u4eba"},b.applicantname),S.a.createElement(c["a"].Item,{label:"\u8054\u7cfb\u7535\u8bdd"},b.applicanttel),S.a.createElement(c["a"].Item,{label:"\u4ee3\u7406\u4eba"},b.agent),S.a.createElement(c["a"].Item,{label:"\u8054\u7cfb\u4eba"},b.agentname),S.a.createElement(c["a"].Item,{label:"\u8054\u7cfb\u7535\u8bdd"},b.agenttel),S.a.createElement(c["a"].Item,{label:"\u4ed8\u6b3e\u4eba"},b.payer),S.a.createElement(c["a"].Item,{label:"\u68c0\u9a8c\u8d39"},b.price),S.a.createElement(c["a"].Item,{label:"\u8239\u540d\u6807\u8bc6"},b.shipname),S.a.createElement(c["a"].Item,{label:"\u62a5\u5173\u53f7"},b.customsNo),S.a.createElement(c["a"].Item,{label:"\u6d77\u5173\u90e8\u95e8"},b.customsName)),S.a.createElement(s["a"],{style:{marginBottom:32}}),S.a.createElement(c["a"],{size:"large",title:"\u68c0\u67e5\u5bf9\u8c61",style:{marginBottom:32},bordered:!0},S.a.createElement(c["a"].Item,{label:"\u68c0\u9a8c\u673a\u6784"},b.namec),S.a.createElement(c["a"].Item,{label:"\u4fd7\u540d"},b.chineselocalname),S.a.createElement(c["a"].Item,{label:"\u7533\u62a5\u6570\u91cf\u548c\u5355\u4f4d"},void 0===b.quantityd||null===b.quantityd?"":b.quantityd+b.unit),S.a.createElement(c["a"].Item,{label:"\u5230\u8fbe\u5730\u70b9"},void 0===b.inspplace1||null===b.inspplace1?"":this.getPlaceFromCode(b.inspplace1)),S.a.createElement(c["a"].Item,{label:"\u8be6\u7ec6\u5730\u5740"},b.inspplace2),S.a.createElement(c["a"].Item,{label:"\u9884\u62a5\u65e5\u671f"},z()(b.inspdate).format("YYYY-MM-DD"))),S.a.createElement(c["a"],{size:"large",title:"\u7533\u8bf7\u9879\u76ee",style:{marginBottom:32},bordered:!0},S.a.createElement(c["a"].Item,{label:"\u7533\u8bf7\u9879\u76ee"},b.inspway),S.a.createElement(c["a"].Item,{label:"\u68c0\u9a8c\u5907\u6ce8"},b.inspwaymemo1))),S.a.createElement(i["a"],{bordered:!1,title:"\u9644\u4ef6"},S.a.createElement("div",null,S.a.createElement(o["a"],{size:"middle",loading:a,dataSource:t,columns:this.columns,rowKey:"recordname",pagination:{showQuickJumper:!0,showSizeChanger:!0}}))),S.a.createElement(m["a"],{title:"\u8bb0\u5f55\u8be6\u60c5",visible:l,onCancel:this.showCancel,footer:null,style:{top:10},width:800},S.a.createElement("embed",{src:r,width:"700",height:"700",type:"application/pdf"})))}}]),a}(Y["Component"]),l=r))||l);t["default"]=O}}]);