Commit aa3b7613 by 王悦

update

parent 4c4d9b18
.demo-upload-list{display:inline-block;width:60px;height:60px;text-align:center;line-height:60px;border:1px solid transparent;border-radius:4px;overflow:hidden;background:#fff;position:relative;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.2);box-shadow:0 1px 1px rgba(0,0,0,.2);margin-right:4px}.demo-upload-list img{width:100%;height:100%}.demo-upload-list-cover{display:none;position:absolute;top:0;bottom:0;left:0;right:0;background:rgba(0,0,0,.6)}.demo-upload-list:hover .demo-upload-list-cover{display:block}.demo-upload-list-cover i{color:#fff;font-size:20px;cursor:pointer;margin:0 2px}.line[data-v-a9ce7684]{display:inline-block;width:3px;height:12px;margin-right:5px;background:#1966ff}.title[data-v-a9ce7684]{display:inline-block;margin-right:16px;font-size:13px;font-weight:700;color:#333;margin-bottom:10px} .demo-upload-list{display:inline-block;width:60px;height:60px;text-align:center;line-height:60px;border:1px solid transparent;border-radius:4px;overflow:hidden;background:#fff;position:relative;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.2);box-shadow:0 1px 1px rgba(0,0,0,.2);margin-right:4px}.demo-upload-list img{width:100%;height:100%}.demo-upload-list-cover{display:none;position:absolute;top:0;bottom:0;left:0;right:0;background:rgba(0,0,0,.6)}.demo-upload-list:hover .demo-upload-list-cover{display:block}.demo-upload-list-cover i{color:#fff;font-size:20px;cursor:pointer;margin:0 2px}.line[data-v-0f59018b]{display:inline-block;width:3px;height:12px;margin-right:5px;background:#1966ff}.title[data-v-0f59018b]{display:inline-block;margin-right:16px;font-size:13px;font-weight:700;color:#333;margin-bottom:10px}
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html><html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/ccc.png"><title></title><link href="/css/chunk-148cd3a8.0676f2ca.css" rel="prefetch"><link href="/css/chunk-14b9857b.0dc416de.css" rel="prefetch"><link href="/css/chunk-2c359864.0dc416de.css" rel="prefetch"><link href="/css/chunk-3385141a.0dc416de.css" rel="prefetch"><link href="/css/chunk-356a65ce.a35226dc.css" rel="prefetch"><link href="/css/chunk-4a1e7798.535cbb8d.css" rel="prefetch"><link href="/css/chunk-605962ce.d38c164f.css" rel="prefetch"><link href="/css/chunk-635bdee9.1e75f0e2.css" rel="prefetch"><link href="/css/chunk-6ab78853.938207ad.css" rel="prefetch"><link href="/css/chunk-715d9afb.b0b38a5a.css" rel="prefetch"><link href="/css/chunk-a2c78c42.992e1c54.css" rel="prefetch"><link href="/js/chunk-148cd3a8.0f3799ee.js" rel="prefetch"><link href="/js/chunk-14b9857b.3aebcae3.js" rel="prefetch"><link href="/js/chunk-2c359864.13a5f6bb.js" rel="prefetch"><link href="/js/chunk-3385141a.a56dd4c4.js" rel="prefetch"><link href="/js/chunk-356a65ce.399fb968.js" rel="prefetch"><link href="/js/chunk-4a1e7798.27c465f2.js" rel="prefetch"><link href="/js/chunk-4fe8dd4f.cb8ca135.js" rel="prefetch"><link href="/js/chunk-605962ce.52e77608.js" rel="prefetch"><link href="/js/chunk-635bdee9.8f52cf9b.js" rel="prefetch"><link href="/js/chunk-6ab78853.6713f816.js" rel="prefetch"><link href="/js/chunk-715d9afb.6edc071c.js" rel="prefetch"><link href="/js/chunk-a2c78c42.391028e0.js" rel="prefetch"><link href="/css/app.11089a5f.css" rel="preload" as="style"><link href="/css/chunk-vendors.1d90d08d.css" rel="preload" as="style"><link href="/js/app.f47f4bd3.js" rel="preload" as="script"><link href="/js/chunk-vendors.7eaa5557.js" rel="preload" as="script"><link href="/css/chunk-vendors.1d90d08d.css" rel="stylesheet"><link href="/css/app.11089a5f.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but iview-admin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/js/chunk-vendors.7eaa5557.js"></script><script src="/js/app.f47f4bd3.js"></script></body></html> <!DOCTYPE html><html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/ccc.png"><title></title><link href="/css/chunk-148cd3a8.0676f2ca.css" rel="prefetch"><link href="/css/chunk-14b9857b.0dc416de.css" rel="prefetch"><link href="/css/chunk-1ce03049.80459bac.css" rel="prefetch"><link href="/css/chunk-2c359864.0dc416de.css" rel="prefetch"><link href="/css/chunk-3385141a.0dc416de.css" rel="prefetch"><link href="/css/chunk-356a65ce.a35226dc.css" rel="prefetch"><link href="/css/chunk-4a1e7798.535cbb8d.css" rel="prefetch"><link href="/css/chunk-605962ce.d38c164f.css" rel="prefetch"><link href="/css/chunk-635bdee9.1e75f0e2.css" rel="prefetch"><link href="/css/chunk-6ab78853.938207ad.css" rel="prefetch"><link href="/css/chunk-a2c78c42.992e1c54.css" rel="prefetch"><link href="/js/chunk-148cd3a8.0f3799ee.js" rel="prefetch"><link href="/js/chunk-14b9857b.3aebcae3.js" rel="prefetch"><link href="/js/chunk-1ce03049.174d7bf6.js" rel="prefetch"><link href="/js/chunk-2c359864.13a5f6bb.js" rel="prefetch"><link href="/js/chunk-3385141a.a56dd4c4.js" rel="prefetch"><link href="/js/chunk-356a65ce.399fb968.js" rel="prefetch"><link href="/js/chunk-4a1e7798.27c465f2.js" rel="prefetch"><link href="/js/chunk-4fe8dd4f.cb8ca135.js" rel="prefetch"><link href="/js/chunk-605962ce.52e77608.js" rel="prefetch"><link href="/js/chunk-635bdee9.8f52cf9b.js" rel="prefetch"><link href="/js/chunk-6ab78853.6713f816.js" rel="prefetch"><link href="/js/chunk-a2c78c42.391028e0.js" rel="prefetch"><link href="/css/app.11089a5f.css" rel="preload" as="style"><link href="/css/chunk-vendors.1d90d08d.css" rel="preload" as="style"><link href="/js/app.3fb84033.js" rel="preload" as="script"><link href="/js/chunk-vendors.7eaa5557.js" rel="preload" as="script"><link href="/css/chunk-vendors.1d90d08d.css" rel="stylesheet"><link href="/css/app.11089a5f.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but iview-admin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/js/chunk-vendors.7eaa5557.js"></script><script src="/js/app.3fb84033.js"></script></body></html>
\ No newline at end of file \ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1ce03049"],{"2bfb1":function(e,t,n){"use strict";n("78f8")},6028:function(e,t,n){"use strict";n("991c")},7299:function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{"background-color":"white",width:"100%",height:"auto",padding:"16px"}},[n("Row",[n("div",{staticClass:"line"}),n("div",{staticClass:"title"},[e._v("标源基本信息")]),n("Form",{ref:"form",attrs:{model:e.formInline,rules:e.ruleInline,inline:"","label-width":100,"label-position":"left"}},[n("Col",{staticStyle:{"margin-left":"10px"},attrs:{span:"24"}},[n("FormItem",{attrs:{label:"商标名称",prop:"name"}},[n("Input",{staticStyle:{width:"180px"},attrs:{disabled:e.edit},model:{value:e.formInline.name,callback:function(t){e.$set(e.formInline,"name",t)},expression:"formInline.name"}})],1),n("FormItem",{staticStyle:{"margin-left":"200px"},attrs:{label:"申请号",prop:"code"}},[n("Input",{staticStyle:{width:"180px"},attrs:{disabled:e.edit},model:{value:e.formInline.code,callback:function(t){e.$set(e.formInline,"code",e._n(t))},expression:"formInline.code"}})],1)],1),n("Col",{staticStyle:{"margin-left":"10px"},attrs:{span:"24"}},[n("FormItem",{attrs:{label:"卖家底价",prop:"business_quoted_price"}},[n("Input",{staticStyle:{width:"180px"},model:{value:e.formInline.business_quoted_price,callback:function(t){e.$set(e.formInline,"business_quoted_price",e._n(t))},expression:"formInline.business_quoted_price"}})],1),n("FormItem",{staticStyle:{"margin-left":"200px"},attrs:{label:"卖家姓名",prop:"contacts"}},[n("Input",{staticStyle:{width:"180px"},model:{value:e.formInline.contacts,callback:function(t){e.$set(e.formInline,"contacts",e._n(t))},expression:"formInline.contacts"}})],1)],1),n("Col",{staticStyle:{"margin-left":"10px"},attrs:{span:"24"}},[n("FormItem",{attrs:{label:"卖家电话",prop:"mobile"}},[n("Input",{staticStyle:{width:"180px"},attrs:{maxlength:11},model:{value:e.formInline.mobile,callback:function(t){e.$set(e.formInline,"mobile",t)},expression:"formInline.mobile"}})],1),n("FormItem",{staticStyle:{"margin-left":"200px"},attrs:{label:"商标类型",prop:"TmType"}},[n("Select",{staticStyle:{width:"180px"},attrs:{disabled:e.edit},on:{"on-change":e.onchange},model:{value:e.formInline.TmType,callback:function(t){e.$set(e.formInline,"TmType",t)},expression:"formInline.TmType"}},[n("Option",{attrs:{value:"SELECTED"}},[e._v("甄选商标")]),n("Option",{attrs:{value:"BARGAIN"}},[e._v("特价商标")]),n("Option",{attrs:{value:"STORY"}},[e._v("品牌商标")])],1)],1)],1),n("Col",{staticStyle:{"margin-left":"10px"},attrs:{span:"24"}},[n("FormItem",{attrs:{label:"转让类型"}},[n("Select",{staticStyle:{width:"180px"},model:{value:e.formInline.type,callback:function(t){e.$set(e.formInline,"type",t)},expression:"formInline.type"}},[n("Option",{attrs:{value:"经营不善"}},[e._v("经营不善")]),n("Option",{attrs:{value:"企业转型"}},[e._v("企业转型")]),n("Option",{attrs:{value:"其他"}},[e._v("其他")])],1)],1)],1)],1),n("div",{staticClass:"line"}),n("div",{staticClass:"title"},[e._v("图文信息")]),n("Form",{directives:[{name:"show",rawName:"v-show",value:"STORY"!==e.formInline.TmType,expression:"formInline.TmType!=='STORY'"}],ref:"form1",attrs:{model:e.formInline,rules:e.ruleInline1,inline:"","label-width":100,"label-position":"left"}},[n("div",[n("FormItem",{attrs:{label:"商标介绍",prop:"tmDetailSummary"}},[n("Input",{staticStyle:{width:"600px",height:"auto"},attrs:{type:"textarea",autosize:{minRows:1,maxRows:10},placeholder:"建议输入200-300字"},model:{value:e.formInline.tmDetailSummary,callback:function(t){e.$set(e.formInline,"tmDetailSummary",t)},expression:"formInline.tmDetailSummary"}})],1)],1),n("div",[n("FormItem",{attrs:{label:"商标图样",prop:"tmMainPic"}},[n("Uploads",{attrs:{multiple:!1,accept:"image/png, image/jpeg, image/jpg"},model:{value:e.formInline.tmMainPic,callback:function(t){e.$set(e.formInline,"tmMainPic",t)},expression:"formInline.tmMainPic"}}),n("span",[e._v("图片尺寸500*282,纯白色,需上传1张")])],1)],1),n("div",[n("FormItem",{attrs:{label:"商品图",prop:"goods_pic_url"}},[n("Uploads",{attrs:{multiple:!0,accept:"image/png, image/jpeg, image/jpg"},model:{value:e.formInline.goods_pic_url,callback:function(t){e.$set(e.formInline,"goods_pic_url",t)},expression:"formInline.goods_pic_url"}}),n("span",[e._v("图片尺寸960*540,至少上传3张")])],1)],1)]),n("Form",{directives:[{name:"show",rawName:"v-show",value:"STORY"===e.formInline.TmType,expression:"formInline.TmType==='STORY'"}],ref:"form2",attrs:{model:e.formInline,rules:e.ruleInline2,inline:"","label-width":110,"label-position":"left"}},[n("div",[n("FormItem",{attrs:{label:"品牌商标理念",prop:"tmBrandSlogan"}},[n("Input",{staticStyle:{width:"600px"},attrs:{maxlength:10,placeholder:"最多可输入15字"},model:{value:e.formInline.tmBrandSlogan,callback:function(t){e.$set(e.formInline,"tmBrandSlogan",t)},expression:"formInline.tmBrandSlogan"}})],1)],1),n("div",[n("FormItem",{attrs:{label:"品牌介绍",prop:"tmBrandDescription"}},[n("Input",{staticStyle:{width:"600px",height:"auto"},attrs:{type:"textarea",autosize:{minRows:1,maxRows:10},placeholder:"建议输入150字左右"},model:{value:e.formInline.tmBrandDescription,callback:function(t){e.$set(e.formInline,"tmBrandDescription",t)},expression:"formInline.tmBrandDescription"}})],1)],1),n("div",[n("FormItem",{attrs:{label:"首页主图",prop:"tmBrandThumbnail"}},[n("Uploads",{attrs:{multiple:!1,accept:"image/png, image/jpeg, image/jpg"},model:{value:e.formInline.tmBrandThumbnail,callback:function(t){e.$set(e.formInline,"tmBrandThumbnail",t)},expression:"formInline.tmBrandThumbnail"}}),n("span",[e._v("图片尺寸390*520,需上传1张")])],1)],1),n("div",[n("FormItem",{attrs:{label:"列表页缩略图",prop:"tmThumbnail"}},[n("Uploads",{attrs:{multiple:!1,accept:"image/png, image/jpeg, image/jpg"},model:{value:e.formInline.tmThumbnail,callback:function(t){e.$set(e.formInline,"tmThumbnail",t)},expression:"formInline.tmThumbnail"}}),n("span",[e._v("309*316、309*270、309*398、309*286, 4种⼤⼩任选")])],1)],1),n("div",[n("FormItem",{attrs:{label:"详情页主图",prop:"tmBrandMainPic"}},[n("Uploads",{attrs:{multiple:!1,accept:"image/png, image/jpeg, image/jpg"},model:{value:e.formInline.tmBrandMainPic,callback:function(t){e.$set(e.formInline,"tmBrandMainPic",t)},expression:"formInline.tmBrandMainPic"}}),n("span",[e._v("图片尺寸960*540,需上传1张")])],1)],1),n("div",[n("FormItem",{attrs:{label:"详情页轮播图",prop:"tmBannerPic"}},[n("Uploads",{attrs:{multiple:!0,accept:"image/png, image/jpeg, image/jpg"},model:{value:e.formInline.tmBannerPic,callback:function(t){e.$set(e.formInline,"tmBannerPic",t)},expression:"formInline.tmBannerPic"}}),n("span",[e._v("图片尺寸960*540,至少上传3张")])],1)],1),n("div",[n("FormItem",{attrs:{label:"详情页介绍长图",prop:"tmBrandPage"}},[n("Uploads",{attrs:{multiple:!1,accept:"image/png, image/jpeg, image/jpg"},model:{value:e.formInline.tmBrandPage,callback:function(t){e.$set(e.formInline,"tmBrandPage",t)},expression:"formInline.tmBrandPage"}}),n("span",[e._v("需上传1张,以阿⾥云提供的设计模板为准,背景⾊要求为 #FFFFFF")])],1)],1)]),n("Col",{staticStyle:{"margin-top":"20px",width:"70%","text-align":"right"}},[n("Button",{on:{click:e.cancel}},[e._v("取消")]),n("Button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary"},on:{click:e.updateinfo}},[e._v("申请上架")])],1)],1)],1)},a=[],r=(n("28a5"),n("c5f6"),n("7f7f"),function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._l(e.ups,(function(t,i){return n("div",{key:"d"+i,staticClass:"demo-upload-list"},["finished"===t.status?[n("img",{attrs:{src:t.url}}),n("div",{staticClass:"demo-upload-list-cover"},[n("Icon",{attrs:{type:"ios-eye-outline"},nativeOn:{click:function(n){return e.handleView(t.url)}}}),n("Icon",{attrs:{type:"ios-trash-outline"},nativeOn:{click:function(n){return e.handleRemove(t)}}})],1)]:[t.showProgress?n("Progress",{attrs:{percent:50,"hide-info":""}}):e._e()]],2)})),n("Upload",{ref:"upload",staticStyle:{display:"inline-block",width:"58px"},attrs:{data:e.d,"show-upload-list":!1,"on-success":e.handleSuccess,accept:e.accept,format:e.formatArray,"max-size":2048,"on-format-error":e.handleFormatError,"on-exceeded-size":e.handleMaxSize,"before-upload":e.handleBeforeUpload,multiple:e.multiple,type:"drag",action:e.action}},[n("div",{staticStyle:{width:"58px",height:"58px","line-height":"58px"}},[n("Icon",{attrs:{type:"ios-camera",size:"20"}})],1)]),n("Modal",{attrs:{title:"View Image","z-index":2e3},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[e.visible?n("img",{staticStyle:{width:"100%"},attrs:{src:e.imgName}}):e._e()])],2)}),l=[],o=(n("ac6a"),n("a481"),n("60b7")),s=n("c8c0"),m=n.n(s),c={name:"uploads",components:{},props:["value","format","multiple","accept"],model:{prop:"value",event:"change"},data:function(){return{key:"",imgName:"",visible:!1,uploadList:[],result:this.value,d:{},action:"",defaultimg:m.a}},methods:{loadXML:function(e){var t=null;if(!window.DOMParser&&window.ActiveXObject)for(var n=["MSXML.2.DOMDocument.6.0","MSXML.2.DOMDocument.3.0","Microsoft.XMLDOM"],i=0;i<n.length;i++)try{t=new ActiveXObject(n[i]),t.async=!1,t.loadXML(e);break}catch(r){}else{if(!(window.DOMParser&&document.implementation&&document.implementation.createDocument))return null;try{var a=new DOMParser;t=a.parseFromString(e,"text/xml")}catch(r){console.log(r)}}return t},handleView:function(e){this.imgName=e,this.visible=!0},handleRemove:function(e){var t=this.uploadList;this.uploadList.splice(t.indexOf(e),1);var n=this.result.split(","),i=n.filter((function(t){return t!=e.url}));this.result=i.join(","),this.$emit("change",this.result)},handleSuccess:function(e,t,n){console.log("/////////////////////////////////////////",n);var i=this.loadXML(e),a=i.documentElement.getElementsByTagName("Key")[0].textContent;console.log("===================",a);var r=this.uploadList.filter((function(e){return e&&e.url&&""!=e.url}));r=r.map((function(e){return e.url})),r.push(a),this.multiple?this.result=r.join(","):this.result=a,console.log("upload...",this.result),this.$emit("change",this.result)},handleFormatError:function(e){this.$Notice.warning({title:"The file format is incorrect",desc:"File format of "+e.name+" is incorrect, please select jpg or png."})},handleMaxSize:function(e){this.$Notice.warning({title:"Exceeding file size limit",desc:"File "+e.name+" is too large, no more than 2M."})},handleBeforeUpload:function(e){var t=this,n="/web/common/uploadCtl/getOssConfigAli";return Object(o["a"])(n,null).then((function(n){if(200==n.status){var i=n.data;t.key=i.filedir,t.d["key"]="key",t.d["Bucket"]=i.Bucket,t.d["OSSAccessKeyId"]=i.OSSAccessKeyId,t.d["Signature"]=i.Signature,t.d["policy"]=i.policy,t.d["success_action_status"]=201,t.action=i.url,t.result="";var a=new Date,r="zc_"+Math.round(500*Math.random())+a.getMonth()+a.getTime()+a.getFullYear()+a.getDate()+a.getHours()+a.getMinutes()+a.getSeconds()+a.getMilliseconds()+e.name.replace(" ","");t.d.key=t.key+"/"+r}else console.log("cofig fetch failuer")}))}},created:function(){},computed:{ups:function(){var e=this,t=[],n=this.uploadList.map((function(t){if(console.log(t),"finished"==t.status&&t.response){var n=e.loadXML(t.response),i=n.documentElement.getElementsByTagName("Key")[0].textContent;return{name:t.name,url:i,status:t.status}}return t})),i=t.concat(n);return i},formatArray:function(){return this.format?this.format.split(","):["jpg","jpeg","png","json"]}},mounted:function(){this.$refs.upload.fileList=[],this.uploadList=this.$refs.upload.fileList},watch:{value:function(e){var t=this;if(this.result=e,this.uploadList=[],this.result&&""!=this.result){console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>."),console.log(this.result);var n=10;this.result.split(",").forEach((function(e){t.uploadList.push({name:n++,url:e,status:"finished"})}))}}}},u=c,p=(n("2bfb1"),n("2877")),d=Object(p["a"])(u,r,l,!1,null,null,null),f=d.exports,g=n("7e1e"),h={name:"addtm",props:{},components:{Uploads:f},data:function(){return{edit:!1,formInline:{name:"",code:"",business_quoted_price:"",contacts:"",mobile:"",type:"",TmType:"",tmDetailSummary:"",goods_pic_url:"",pic_url:"",tmBrandSlogan:"",tmMainPic:"",tmBrandDescription:"",tmBrandThumbnail:"",tmBrandMainPic:"",tmThumbnail:"",tmBannerPic:"",tmBrandPage:""},ruleInline:{name:[{required:!0,message:"请输入商标名称",trigger:"blur"}],contacts:[{required:!0,message:"请输入卖家姓名",trigger:"blur"}],TmType:[{required:!0,message:"请选择商标类型",trigger:"change"}],code:[{required:!0,type:"number",message:"请输入申请号",trigger:"blur"}],business_quoted_price:[{required:!0,type:"number",message:"请输入价格",trigger:"blur"}],mobile:[{required:!0,pattern:/^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/,message:"请输入电话",trigger:"blur"}]},ruleInline1:{tmDetailSummary:[{required:!0,message:"请输入商标介绍",trigger:"blur"}],tmMainPic:[{required:!0,message:"请上传图片",trigger:"change"}],goods_pic_url:[{required:!0,message:"至少上传3张图片",trigger:"change"}]},ruleInline2:{tmBrandSlogan:[{required:!0,message:"请输入品牌商标理念",trigger:"blur"}],tmBrandDescription:[{required:!0,message:"请输入品牌介绍",trigger:"blur"}],tmBrandThumbnail:[{required:!0,message:"请上传图片",trigger:"change"}],tmBrandMainPic:[{required:!0,message:"请上传图片",trigger:"change"}],tmThumbnail:[{required:!0,message:"请上传图片",trigger:"change"}],tmBannerPic:[{required:!0,message:"至少上传1张图片",trigger:"change"}],tmBrandPage:[{required:!0,message:"请上传图片",trigger:"change"}]}}},mounted:function(){var e=this.$route.params;if(e.name){this.edit=!0;var t=e.TradeTmDetailJson||{};this.formInline={name:e.name,code:Number(e.code),business_quoted_price:Number(e.business_quoted_price),contacts:e.contacts,mobile:e.mobile,type:e.type,TmType:e.TmType,tmDetailSummary:t.tmDetailSummary,goods_pic_url:t.tmDetailPic,pic_url:e.pic_url,tmBrandSlogan:t.tmBrandSlogan,tmBrandDescription:t.tmBrandDescription,tmBrandThumbnail:t.tmBrandThumbnail,tmThumbnail:t.tmThumbnail,tmBrandMainPic:t.tmBrandMainPic,tmBannerPic:t.tmBannerPic,tmBrandPage:t.tmBrandPage,tmMainPic:t.tmMainPic}}},computed:{},methods:{deepclone:function(e){var t=JSON.stringify(e);return JSON.parse(t)},cancel:function(){this.$router.go(-1)},onchange:function(e){},updateinfo:function(){var e=this;this.$refs.form.validate((function(t){if(t){"STORY"===e.formInline.TmType?e.$refs.form2.validate((function(t){if(t){var i=e.formInline.tmBannerPic.split(",").length;if(i<3)return alert("至少上传3张轮播图"),!1;n()}})):e.$refs.form1.validate((function(t){if(t){var i=e.formInline.goods_pic_url.split(",").length;if(i<3)return alert("至少上传3张商品图"),!1;n()}}));var n=function(){var t={id:e.$route.params.id,name:e.formInline.name,code:e.formInline.code,business_quoted_price:e.formInline.business_quoted_price,contacts:e.formInline.contacts,mobile:e.formInline.mobile,type:e.formInline.type,TmType:e.formInline.TmType,pic_url:e.formInline.tmMainPic||e.formInline.tmBrandThumbnail,TradeTmDetailJson:{tmMainPic:e.formInline.tmMainPic,tmDetailSummary:e.formInline.tmDetailSummary,tmDetailPic:e.formInline.goods_pic_url||e.formInline.tmBannerPic,tmBrandSlogan:e.formInline.tmBrandSlogan,tmBrandDescription:e.formInline.tmBrandDescription,tmBrandThumbnail:e.formInline.tmBrandThumbnail,tmBrandMainPic:e.formInline.tmBrandMainPic,tmThumbnail:e.formInline.tmThumbnail,tmBannerPic:e.formInline.tmBannerPic,tmBrandPage:e.formInline.tmBrandPage}};Object(g["f"])("/web/trademark/trademarkCtl/addpublish",t).then((function(t){1==t.data.status?(e.$Message.success(t.data.msg),e.$router.go(-1)):e.$Message.error(t.data.msg)}))}}}))}}},b=h,I=(n("6028"),Object(p["a"])(b,i,a,!1,null,"0f59018b",null));t["default"]=I.exports},"78f8":function(e,t,n){},"991c":function(e,t,n){}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-715d9afb"],{"2bfb1":function(e,t,n){"use strict";n("78f8")},6681:function(e,t,n){},7299:function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{"background-color":"white",width:"100%",height:"auto",padding:"16px"}},[n("Row",[n("div",{staticClass:"line"}),n("div",{staticClass:"title"},[e._v("标源基本信息")]),n("Form",{ref:"form",attrs:{model:e.formInline,rules:e.ruleInline,inline:"","label-width":100,"label-position":"left"}},[n("Col",{staticStyle:{"margin-left":"10px"},attrs:{span:"24"}},[n("FormItem",{attrs:{label:"商标名称",prop:"name"}},[n("Input",{staticStyle:{width:"180px"},attrs:{disabled:e.edit},model:{value:e.formInline.name,callback:function(t){e.$set(e.formInline,"name",t)},expression:"formInline.name"}})],1),n("FormItem",{staticStyle:{"margin-left":"200px"},attrs:{label:"申请号",prop:"code"}},[n("Input",{staticStyle:{width:"180px"},attrs:{disabled:e.edit},model:{value:e.formInline.code,callback:function(t){e.$set(e.formInline,"code",e._n(t))},expression:"formInline.code"}})],1)],1),n("Col",{staticStyle:{"margin-left":"10px"},attrs:{span:"24"}},[n("FormItem",{attrs:{label:"卖家底价",prop:"business_quoted_price"}},[n("Input",{staticStyle:{width:"180px"},model:{value:e.formInline.business_quoted_price,callback:function(t){e.$set(e.formInline,"business_quoted_price",e._n(t))},expression:"formInline.business_quoted_price"}})],1),n("FormItem",{staticStyle:{"margin-left":"200px"},attrs:{label:"卖家姓名",prop:"contacts"}},[n("Input",{staticStyle:{width:"180px"},model:{value:e.formInline.contacts,callback:function(t){e.$set(e.formInline,"contacts",e._n(t))},expression:"formInline.contacts"}})],1)],1),n("Col",{staticStyle:{"margin-left":"10px"},attrs:{span:"24"}},[n("FormItem",{attrs:{label:"卖家电话",prop:"mobile"}},[n("Input",{staticStyle:{width:"180px"},attrs:{maxlength:11},model:{value:e.formInline.mobile,callback:function(t){e.$set(e.formInline,"mobile",t)},expression:"formInline.mobile"}})],1),n("FormItem",{staticStyle:{"margin-left":"200px"},attrs:{label:"商标类型",prop:"TmType"}},[n("Select",{staticStyle:{width:"180px"},attrs:{disabled:e.edit},on:{"on-change":e.onchange},model:{value:e.formInline.TmType,callback:function(t){e.$set(e.formInline,"TmType",t)},expression:"formInline.TmType"}},[n("Option",{attrs:{value:"SELECTED"}},[e._v("甄选商标")]),n("Option",{attrs:{value:"BARGAIN"}},[e._v("特价商标")]),n("Option",{attrs:{value:"STORY"}},[e._v("品牌商标")])],1)],1)],1),n("Col",{staticStyle:{"margin-left":"10px"},attrs:{span:"24"}},[n("FormItem",{attrs:{label:"转让类型"}},[n("Select",{staticStyle:{width:"180px"},model:{value:e.formInline.type,callback:function(t){e.$set(e.formInline,"type",t)},expression:"formInline.type"}},[n("Option",{attrs:{value:"经营不善"}},[e._v("经营不善")]),n("Option",{attrs:{value:"企业转型"}},[e._v("企业转型")]),n("Option",{attrs:{value:"其他"}},[e._v("其他")])],1)],1)],1)],1),n("div",{staticClass:"line"}),n("div",{staticClass:"title"},[e._v("图文信息")]),n("Form",{directives:[{name:"show",rawName:"v-show",value:"STORY"!==e.formInline.TmType,expression:"formInline.TmType!=='STORY'"}],ref:"form1",attrs:{model:e.formInline,rules:e.ruleInline1,inline:"","label-width":100,"label-position":"left"}},[n("div",[n("FormItem",{attrs:{label:"商标介绍",prop:"tmDetailSummary"}},[n("Input",{staticStyle:{width:"600px",height:"auto"},attrs:{type:"textarea",autosize:{minRows:1,maxRows:10},placeholder:"建议输入200-300字"},model:{value:e.formInline.tmDetailSummary,callback:function(t){e.$set(e.formInline,"tmDetailSummary",t)},expression:"formInline.tmDetailSummary"}})],1)],1),n("div",[n("FormItem",{attrs:{label:"商标图样",prop:"tmMainPic"}},[n("Uploads",{attrs:{multiple:!1,accept:"image/png, image/jpeg, image/jpg"},model:{value:e.formInline.tmMainPic,callback:function(t){e.$set(e.formInline,"tmMainPic",t)},expression:"formInline.tmMainPic"}}),n("span",[e._v("图片尺寸500*282,纯白色,需上传1张")])],1)],1),n("div",[n("FormItem",{attrs:{label:"商品图",prop:"goods_pic_url"}},[n("Uploads",{attrs:{multiple:!0,accept:"image/png, image/jpeg, image/jpg"},model:{value:e.formInline.goods_pic_url,callback:function(t){e.$set(e.formInline,"goods_pic_url",t)},expression:"formInline.goods_pic_url"}}),n("span",[e._v("图片尺寸960*540,至少上传3张")])],1)],1)]),n("Form",{directives:[{name:"show",rawName:"v-show",value:"STORY"===e.formInline.TmType,expression:"formInline.TmType==='STORY'"}],ref:"form2",attrs:{model:e.formInline,rules:e.ruleInline2,inline:"","label-width":110,"label-position":"left"}},[n("div",[n("FormItem",{attrs:{label:"品牌商标理念",prop:"tmBrandSlogan"}},[n("Input",{staticStyle:{width:"600px"},attrs:{maxlength:10,placeholder:"最多可输入15字"},model:{value:e.formInline.tmBrandSlogan,callback:function(t){e.$set(e.formInline,"tmBrandSlogan",t)},expression:"formInline.tmBrandSlogan"}})],1)],1),n("div",[n("FormItem",{attrs:{label:"品牌介绍",prop:"tmBrandDescription"}},[n("Input",{staticStyle:{width:"600px",height:"auto"},attrs:{type:"textarea",autosize:{minRows:1,maxRows:10},placeholder:"建议输入150字左右"},model:{value:e.formInline.tmBrandDescription,callback:function(t){e.$set(e.formInline,"tmBrandDescription",t)},expression:"formInline.tmBrandDescription"}})],1)],1),n("div",[n("FormItem",{attrs:{label:"首页主图",prop:"tmBrandThumbnail"}},[n("Uploads",{attrs:{multiple:!1,accept:"image/png, image/jpeg, image/jpg"},model:{value:e.formInline.tmBrandThumbnail,callback:function(t){e.$set(e.formInline,"tmBrandThumbnail",t)},expression:"formInline.tmBrandThumbnail"}}),n("span",[e._v("图片尺寸390*520,需上传1张")])],1)],1),n("div",[n("FormItem",{attrs:{label:"列表页缩略图",prop:"tmThumbnail"}},[n("Uploads",{attrs:{multiple:!1,accept:"image/png, image/jpeg, image/jpg"},model:{value:e.formInline.tmThumbnail,callback:function(t){e.$set(e.formInline,"tmThumbnail",t)},expression:"formInline.tmThumbnail"}}),n("span",[e._v("309*316、309*270、309*398、309*286, 4种⼤⼩任选")])],1)],1),n("div",[n("FormItem",{attrs:{label:"详情页主图",prop:"tmBrandMainPic"}},[n("Uploads",{attrs:{multiple:!1,accept:"image/png, image/jpeg, image/jpg"},model:{value:e.formInline.tmBrandMainPic,callback:function(t){e.$set(e.formInline,"tmBrandMainPic",t)},expression:"formInline.tmBrandMainPic"}}),n("span",[e._v("图片尺寸960*540,需上传1张")])],1)],1),n("div",[n("FormItem",{attrs:{label:"详情页轮播图",prop:"tmBannerPic"}},[n("Uploads",{attrs:{multiple:!0,accept:"image/png, image/jpeg, image/jpg"},model:{value:e.formInline.tmBannerPic,callback:function(t){e.$set(e.formInline,"tmBannerPic",t)},expression:"formInline.tmBannerPic"}}),n("span",[e._v("图片尺寸960*540,至少上传3张")])],1)],1),n("div",[n("FormItem",{attrs:{label:"详情页介绍长图",prop:"tmBrandPage"}},[n("Uploads",{attrs:{multiple:!1,accept:"image/png, image/jpeg, image/jpg"},model:{value:e.formInline.tmBrandPage,callback:function(t){e.$set(e.formInline,"tmBrandPage",t)},expression:"formInline.tmBrandPage"}}),n("span",[e._v("需上传1张,以阿⾥云提供的设计模板为准,背景⾊要求为 #FFFFFF")])],1)],1)]),n("Col",{staticStyle:{"margin-top":"20px",width:"70%","text-align":"right"}},[n("Button",{on:{click:e.cancel}},[e._v("取消")]),n("Button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary"},on:{click:e.updateinfo}},[e._v("申请上架")])],1)],1)],1)},a=[],r=(n("28a5"),n("c5f6"),n("7f7f"),function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._l(e.ups,(function(t,i){return n("div",{key:"d"+i,staticClass:"demo-upload-list"},["finished"===t.status?[n("img",{attrs:{src:t.url}}),n("div",{staticClass:"demo-upload-list-cover"},[n("Icon",{attrs:{type:"ios-eye-outline"},nativeOn:{click:function(n){return e.handleView(t.url)}}}),n("Icon",{attrs:{type:"ios-trash-outline"},nativeOn:{click:function(n){return e.handleRemove(t)}}})],1)]:[t.showProgress?n("Progress",{attrs:{percent:50,"hide-info":""}}):e._e()]],2)})),n("Upload",{ref:"upload",staticStyle:{display:"inline-block",width:"58px"},attrs:{data:e.d,"show-upload-list":!1,"on-success":e.handleSuccess,accept:e.accept,format:e.formatArray,"max-size":2048,"on-format-error":e.handleFormatError,"on-exceeded-size":e.handleMaxSize,"before-upload":e.handleBeforeUpload,multiple:e.multiple,type:"drag",action:e.action}},[n("div",{staticStyle:{width:"58px",height:"58px","line-height":"58px"}},[n("Icon",{attrs:{type:"ios-camera",size:"20"}})],1)]),n("Modal",{attrs:{title:"View Image","z-index":2e3},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[e.visible?n("img",{staticStyle:{width:"100%"},attrs:{src:e.imgName}}):e._e()])],2)}),l=[],o=(n("ac6a"),n("a481"),n("60b7")),s=n("c8c0"),m=n.n(s),c={name:"uploads",components:{},props:["value","format","multiple","accept"],model:{prop:"value",event:"change"},data:function(){return{key:"",imgName:"",visible:!1,uploadList:[],result:this.value,d:{},action:"",defaultimg:m.a}},methods:{loadXML:function(e){var t=null;if(!window.DOMParser&&window.ActiveXObject)for(var n=["MSXML.2.DOMDocument.6.0","MSXML.2.DOMDocument.3.0","Microsoft.XMLDOM"],i=0;i<n.length;i++)try{t=new ActiveXObject(n[i]),t.async=!1,t.loadXML(e);break}catch(r){}else{if(!(window.DOMParser&&document.implementation&&document.implementation.createDocument))return null;try{var a=new DOMParser;t=a.parseFromString(e,"text/xml")}catch(r){console.log(r)}}return t},handleView:function(e){this.imgName=e,this.visible=!0},handleRemove:function(e){var t=this.uploadList;this.uploadList.splice(t.indexOf(e),1);var n=this.result.split(","),i=n.filter((function(t){return t!=e.url}));this.result=i.join(","),this.$emit("change",this.result)},handleSuccess:function(e,t,n){console.log("/////////////////////////////////////////",n);var i=this.loadXML(e),a=i.documentElement.getElementsByTagName("Key")[0].textContent;console.log("===================",a);var r=this.uploadList.filter((function(e){return e&&e.url&&""!=e.url}));r=r.map((function(e){return e.url})),r.push(a),this.multiple?this.result=r.join(","):this.result=a,console.log("upload...",this.result),this.$emit("change",this.result)},handleFormatError:function(e){this.$Notice.warning({title:"The file format is incorrect",desc:"File format of "+e.name+" is incorrect, please select jpg or png."})},handleMaxSize:function(e){this.$Notice.warning({title:"Exceeding file size limit",desc:"File "+e.name+" is too large, no more than 2M."})},handleBeforeUpload:function(e){var t=this,n="/web/common/uploadCtl/getOssConfigAli";return Object(o["a"])(n,null).then((function(n){if(200==n.status){var i=n.data;t.key=i.filedir,t.d["key"]="key",t.d["Bucket"]=i.Bucket,t.d["OSSAccessKeyId"]=i.OSSAccessKeyId,t.d["Signature"]=i.Signature,t.d["policy"]=i.policy,t.d["success_action_status"]=201,t.action=i.url,t.result="";var a=new Date,r="zc_"+Math.round(500*Math.random())+a.getMonth()+a.getTime()+a.getFullYear()+a.getDate()+a.getHours()+a.getMinutes()+a.getSeconds()+a.getMilliseconds()+e.name.replace(" ","");t.d.key=t.key+"/"+r}else console.log("cofig fetch failuer")}))}},created:function(){},computed:{ups:function(){var e=this,t=[],n=this.uploadList.map((function(t){if(console.log(t),"finished"==t.status&&t.response){var n=e.loadXML(t.response),i=n.documentElement.getElementsByTagName("Key")[0].textContent;return{name:t.name,url:i,status:t.status}}return t})),i=t.concat(n);return i},formatArray:function(){return this.format?this.format.split(","):["jpg","jpeg","png","json"]}},mounted:function(){this.$refs.upload.fileList=[],this.uploadList=this.$refs.upload.fileList},watch:{value:function(e){var t=this;if(this.result=e,this.uploadList=[],this.result&&""!=this.result){console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>."),console.log(this.result);var n=10;this.result.split(",").forEach((function(e){t.uploadList.push({name:n++,url:e,status:"finished"})}))}}}},u=c,d=(n("2bfb1"),n("2877")),p=Object(d["a"])(u,r,l,!1,null,null,null),f=p.exports,g=n("7e1e"),h={name:"addtm",props:{},components:{Uploads:f},data:function(){return{edit:!1,formInline:{name:"",code:"",business_quoted_price:"",contacts:"",mobile:"",type:"",TmType:"",tmDetailSummary:"",goods_pic_url:"",pic_url:"",tmBrandSlogan:"",tmMainPic:"",tmBrandDescription:"",tmBrandThumbnail:"",tmBrandMainPic:"",tmThumbnail:"",tmBannerPic:"",tmBrandPage:""},ruleInline:{name:[{required:!0,message:"请输入商标名称",trigger:"blur"}],contacts:[{required:!0,message:"请输入卖家姓名",trigger:"blur"}],TmType:[{required:!0,message:"请选择商标类型",trigger:"change"}],code:[{required:!0,type:"number",message:"请输入申请号",trigger:"blur"}],business_quoted_price:[{required:!0,type:"number",message:"请输入价格",trigger:"blur"}],mobile:[{required:!0,pattern:/^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/,message:"请输入电话",trigger:"blur"}]},ruleInline1:{tmDetailSummary:[{required:!0,message:"请输入商标介绍",trigger:"blur"}],tmMainPic:[{required:!0,message:"请上传图片",trigger:"change"}],goods_pic_url:[{required:!0,message:"至少上传3张图片",trigger:"change"}]},ruleInline2:{tmBrandSlogan:[{required:!0,message:"请输入品牌商标理念",trigger:"blur"}],tmBrandDescription:[{required:!0,message:"请输入品牌介绍",trigger:"blur"}],tmBrandThumbnail:[{required:!0,message:"请上传图片",trigger:"change"}],tmBrandMainPic:[{required:!0,message:"请上传图片",trigger:"change"}],tmThumbnail:[{required:!0,message:"请上传图片",trigger:"change"}],tmBannerPic:[{required:!0,message:"至少上传1张图片",trigger:"change"}],tmBrandPage:[{required:!0,message:"请上传图片",trigger:"change"}]}}},mounted:function(){var e=this.$route.params;if(e.name){this.edit=!0;var t=e.TradeTmDetailJson||{};this.formInline={name:e.name,code:Number(e.code),business_quoted_price:Number(e.business_quoted_price),contacts:e.contacts,mobile:e.mobile,type:e.type,TmType:e.TmType,tmDetailSummary:t.tmDetailSummary,goods_pic_url:t.tmDetailPic,pic_url:e.pic_url,tmBrandSlogan:t.tmBrandSlogan,tmBrandDescription:t.tmBrandDescription,tmBrandThumbnail:t.tmBrandThumbnail,tmThumbnail:t.tmThumbnail,tmBrandMainPic:t.tmBrandMainPic,tmBannerPic:t.tmBannerPic,tmBrandPage:t.tmBrandPage,tmMainPic:t.tmMainPic}}},computed:{},methods:{deepclone:function(e){var t=JSON.stringify(e);return JSON.parse(t)},cancel:function(){this.$router.go(-1)},onchange:function(e){},updateinfo:function(){var e=this;this.$refs.form.validate((function(t){if(t){"STORY"===e.formInline.TmType?e.$refs.form2.validate((function(t){if(t){var i=e.formInline.tmBannerPic.split(",").length;if(i<3)return alert("至少上传3张轮播图"),!1;n()}})):e.$refs.form1.validate((function(t){if(t){var i=e.formInline.goods_pic_url.split(",").length;if(i<3)return alert("至少上传3张商品图"),!1;n()}}));var n=function(){var t=[e.formInline.tmBannerPic,e.formInline.tmBannerPic,e.formInline.tmBannerPic],n={id:e.$route.params.id,name:e.formInline.name,code:e.formInline.code,business_quoted_price:e.formInline.business_quoted_price,contacts:e.formInline.contacts,mobile:e.formInline.mobile,type:e.formInline.type,TmType:e.formInline.TmType,pic_url:e.formInline.tmMainPic||e.formInline.tmBrandThumbnail,TradeTmDetailJson:{tmMainPic:e.formInline.tmMainPic,tmDetailSummary:e.formInline.tmDetailSummary,tmDetailPic:e.formInline.goods_pic_url||t.join(","),tmBrandSlogan:e.formInline.tmBrandSlogan,tmBrandDescription:e.formInline.tmBrandDescription,tmBrandThumbnail:e.formInline.tmBrandThumbnail,tmBrandMainPic:e.formInline.tmBrandMainPic,tmThumbnail:e.formInline.tmThumbnail,tmBannerPic:e.formInline.tmBannerPic,tmBrandPage:e.formInline.tmBrandPage}};Object(g["f"])("/web/trademark/trademarkCtl/addpublish",n).then((function(t){1==t.data.status?(e.$Message.success(t.data.msg),e.$router.go(-1)):e.$Message.error(t.data.msg)}))}}}))}}},b=h,I=(n("e6d0"),Object(d["a"])(b,i,a,!1,null,"a9ce7684",null));t["default"]=I.exports},"78f8":function(e,t,n){},e6d0:function(e,t,n){"use strict";n("6681")}}]);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment