(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-9badb61a"],{9081:function(t,e,a){},be4f:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"brand_content"},[a("div",{staticClass:"brand_header"},[a("span",{on:{click:t.goBack}},[a("Icon",{attrs:{type:"md-arrow-back",size:"18",color:"#1890FF"}})],1),a("span",[t._v("Excel批量上传商标")])]),a("div",{staticClass:"brand_content_upload"},[t._m(0),a("div",[a("Upload",{attrs:{action:"","before-upload":t.beforeUpload}},[a("Button",{attrs:{icon:"ios-cloud-upload-outline"}},[t._v("上传Csv文件")]),t._v(" "+t._s(t.note)+" ")],1),a("Button",{attrs:{type:"primary"},on:{click:t.check}},[t._v("发布")])],1)]),a("BizTable",{ref:"bt",attrs:{formatCol:t.formatCol,modelName:"upload",metaName:"upload_info",packageName:"trademark",tblheight:t.adjustHeight-120,isMulti:"",refvalidatemethod:t.validmethod,savebefore:t.beforesave,editbefore:t.beforedit,addbefore:t.beforeadd},on:{onexec:t.onexec,oninitbtn:t.oninitbtn}}),a("Modal",{attrs:{title:"提示"},on:{"on-ok":t.ok,"on-cancel":t.cancel},model:{value:t.modal1,callback:function(e){t.modal1=e},expression:"modal1"}},[a("p",[t._v("是否发布所有商标？")])])],1)},o=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("p",[t._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"}},[t._v("商标上传模板")]),t._v(" ，并严格按模板提供内容填入商标信息。 ")])}],c=(a("7f7f"),a("ac6a"),a("c1df")),r=a.n(c),s=a("06d3"),i=a("7e1e"),l=a("c276"),d={components:{BizTable:s["a"]},data:function(){return{note:"点击上传Csv文件",publishdata:[],modal1:!1}},methods:{goBack:function(){this.$router.go(-1)},beforeUpload:function(t){var e=this;return Object(l["e"])(t).then((function(t){t.forEach((function(t){t.channel_name=e.$store.state.user.userobj.company.name,t.channel_code=e.$store.state.user.userobj.company.id,t.execlName=t.name})),e.publishdata=t,e.note="文件已上传"})).catch((function(t){e.$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 t=this;Object(i["f"])("/web/trademark/trademarkCtl/publish",this.publishdata).then((function(e){-200!=e.data.status?(t.note="点击上传Csv文件",t.$Message.success("发布成功"),t.$refs.bt.fetchData()):(t.$Message.error("发布失败"),console.log("details err:",e))})).catch((function(e){t.$Message.error("发布失败"),console.log("details err:",e)}))},onexec:function(t,e){var a=this;"info"===t&&Object(i["f"])("/web/trademark/trademarkCtl/getidlist",{upload_id:e.id}).then((function(t){if(-200!=t.data.status){var e=t.data.data.map((function(t){return t.trademark_id}));a.$router.push({name:"originmanage_order",query:{ids:e}})}else console.log("details err:",t)})).catch((function(t){console.log("details err:",t)}))},formatCol:function(t,e,a){var n=t[e];return"created_at"===e?n=r()(n).format("YYYY-MM-DD"):"status"===e&&(n=0==n?"处理中":"处理完成"),n}},mounted:function(){},watch:{}},u=d,f=(a("c202"),a("2877")),h=Object(f["a"])(u,n,o,!1,null,"3ff09ce0",null);e["default"]=h.exports},c202:function(t,e,a){"use strict";var n=a("9081"),o=a.n(n);o.a}}]);