(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e86e45c2"],{7029:function(e,t,a){"use strict";var n=a("934e"),o=a.n(n);o.a},"934e":function(e,t,a){},be4f:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"brand_content"},[a("div",{staticClass:"brand_header"},[a("span",{on:{click:e.goBack}},[a("Icon",{attrs:{type:"md-arrow-back",size:"18",color:"#1890FF"}})],1),a("span",[e._v("Excel批量上传商标")])]),a("div",{staticClass:"brand_content_upload"},[e._m(0),a("div",[a("Upload",{attrs:{action:"","before-upload":e.beforeUpload}},[a("Button",{attrs:{icon:"ios-cloud-upload-outline"}},[e._v("上传Csv文件")]),e._v(" "+e._s(e.note)+" ")],1),a("Button",{attrs:{type:"primary"},on:{click:e.check}},[e._v("发布")])],1)]),a("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,modelName:"upload",metaName:"upload_info",packageName:"trademark",tblheight:e.adjustHeight-120,isMulti:"",refvalidatemethod:e.validmethod,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onexec:e.onexec,oninitbtn:e.oninitbtn}}),a("Modal",{attrs:{title:"提示"},on:{"on-ok":e.ok,"on-cancel":e.cancel},model:{value:e.modal1,callback:function(t){e.modal1=t},expression:"modal1"}},[a("p",[e._v("是否发布所有商标？")])])],1)},o=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("p",[e._v(" 第一次上传请下载 "),a("a",{attrs:{href:"https://gsb-zc.oss-cn-beijing.aliyuncs.com/%E5%95%86%E6%A0%87%E6%A8%A1%E7%89%88.csv",download:"商标上传模版.csv"}},[e._v("商标上传模板")]),e._v(" ，并严格按模板提供内容填入商标信息。 ")])}],c=(a("7f7f"),a("ac6a"),a("c1df")),s=a.n(c),r=a("06d3"),i=a("7e1e"),l=a("c276"),u={components:{BizTable:r["a"]},data:function(){return{note:"点击上传Csv文件",publishdata:[],modal1:!1}},methods:{goBack:function(){this.$router.go(-1)},beforeUpload:function(e){var t=this;return Object(l["e"])(e).then((function(e){e.forEach((function(e){e.channel_name=t.$store.state.user.userobj.company.name,e.channel_code=t.$store.state.user.userobj.company.id,e.execlName=e.name})),t.publishdata=e,t.note="文件已上传"})).catch((function(e){t.$Notice.warning({title:"上传出错",desc:"请检查文件格式"})})),!1},check:function(){if(0===this.publishdata.length)return this.$Message.warning("先上传文件");this.modal1=!0},ok:function(){this.publish()},cancel:function(){},publish:function(){var e=this;Object(i["f"])("/web/trademark/trademarkCtl/publish",this.publishdata).then((function(t){-200!=t.data.status?(e.note="点击上传Csv文件",e.$Message.success("发布成功"),e.$refs.bt.fetchData()):(e.$Message.error("发布失败"),console.log("details err:",t))})).catch((function(t){e.$Message.error("发布失败"),console.log("details err:",t)}))},onexec:function(e,t){"info"===e&&this.$router.push({name:"originmanage_order",query:{id:t.id}})},formatCol:function(e,t,a){var n=e[t];return"created_at"===t?n=s()(n).format("YYYY-MM-DD"):"status"===t&&(n=0==n?"处理中":"处理完成"),n}},mounted:function(){},watch:{}},d=u,f=(a("7029"),a("2877")),h=Object(f["a"])(d,n,o,!1,null,"3307938e",null);t["default"]=h.exports}}]);