chunk-443e47f8.34f98a48.js 18.1 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-443e47f8"],{"6b1f":function(t,e,a){"use strict";a.d(e,"f",(function(){return r})),a.d(e,"b",(function(){return n})),a.d(e,"d",(function(){return s})),a.d(e,"a",(function(){return o})),a.d(e,"h",(function(){return l})),a.d(e,"g",(function(){return d})),a.d(e,"c",(function(){return m})),a.d(e,"i",(function(){return h})),a.d(e,"e",(function(){return c}));var i=a("b775");function r(t){return Object(i["a"])({url:"/local/getOrganization",method:"get",params:t})}function n(t){return Object(i["a"])({url:"/local/organization",method:"post",data:t})}function s(t){return Object(i["a"])({url:"/local/shopbrand",method:"get",params:t})}function o(t){return Object(i["a"])({url:"/local/brands",method:"post",data:t})}function l(t){return Object(i["a"])({url:"/local/upbrands",method:"post",data:t})}function d(t){return Object(i["a"])({url:"/local/getShopInfo",method:"get",params:t})}function m(t){return Object(i["a"])({url:"/local/addShopInfo",method:"post",data:t})}function h(t){return Object(i["a"])({url:"/system/goodsNew/uploadImage",method:"post",data:t})}function c(t){return Object(i["a"])({url:"/local/cate",method:"get",params:t})}},"79ef":function(t,e,a){"use strict";a("f608")},b176:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"fill-brand-inf"},[a("div",{staticClass:"logo-bg"},[t._e()]),t._v(" "),a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix steps",attrs:{slot:"header"},slot:"header"},[a("el-steps",{attrs:{active:1,"align-center":"","finish-status":"success"}},[a("el-step",{attrs:{title:"填写主体信息"}}),t._v(" "),a("el-step",{attrs:{title:"填写品牌信息"}}),t._v(" "),a("el-step",{attrs:{title:"填写店铺信息"}}),t._v(" "),a("el-step",{attrs:{title:"提交入驻审核"}})],1)],1),t._v(" "),a("div",{staticClass:"main-con"},[a("el-form",{ref:"brandForm",attrs:{model:t.brandForm,rules:t.brandRules,"label-width":"180px"}},[a("el-form-item",{attrs:{label:"经营品牌类型:"}},[a("el-radio-group",{on:{change:t.chooseBrandType},model:{value:t.brandForm.brand_type,callback:function(e){t.$set(t.brandForm,"brand_type",e)},expression:"brandForm.brand_type"}},[a("el-radio",{attrs:{label:1}},[t._v("自有品牌")]),t._v(" "),a("el-radio",{attrs:{label:2}},[t._v("品牌厂商授权")]),t._v(" "),a("el-radio",{attrs:{label:3}},[t._v("无品牌")])],1)],1),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:3!==t.brandForm.brand_type,expression:"brandForm.brand_type !== 3"}],staticClass:"spe-brand-text"},[t._v("\n            品牌一\n          ")]),t._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:3!==t.brandForm.brand_type,expression:"brandForm.brand_type !== 3"}],attrs:{label:"品牌中文名:",prop:"brand_cn"}},[a("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:""},model:{value:t.brandForm.brand_cn,callback:function(e){t.$set(t.brandForm,"brand_cn",e)},expression:"brandForm.brand_cn"}})],1),t._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:3!==t.brandForm.brand_type,expression:"brandForm.brand_type !== 3"}],attrs:{label:"品牌英文名:",prop:"brand_en"}},[a("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:""},model:{value:t.brandForm.brand_en,callback:function(e){t.$set(t.brandForm,"brand_en",e)},expression:"brandForm.brand_en"}})],1),t._v(" "),3!==t.brandForm.brand_type?a("el-form-item",{ref:"logoImg",attrs:{label:"品牌LOGO:",prop:"brand_logo"}},[a("div",{staticStyle:{width:"100%",height:"100%",display:"flex","flex-direction":"row","justify-content":"normal"}},[a("div",{staticStyle:{"padding-right":"6px"}},[a("el-upload",{staticClass:"uploadData",attrs:{action:"#","list-type":"picture-card","http-request":t.uploadLogoImgs,limit:2,"on-exceed":t.showTip,"before-upload":t.beforeUpLogoImg,"on-preview":t.handlePictureCardPreview,"on-remove":t.handleRemove,"file-list":t.brandImgFileList}},[a("i",{staticClass:"el-icon-plus"})]),t._v(" "),a("el-dialog",{attrs:{visible:t.dialogVisible},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("img",{attrs:{width:"100%",src:t.dialogImageUrl,alt:""}})])],1),t._v(" "),a("div",[a("span",{staticClass:"tips-text"},[a("i",{staticClass:"el-icon-warning h-warning"})])]),t._v(" "),a("div",{staticStyle:{width:"380px","line-height":"24px","padding-top":"6px"}},[a("span",{staticClass:"tips-text"},[t._v("必须与商标图文一致。文件大小在500KB以内,支持png,jpg格式,最多可上传2张")])])])]):t._e(),t._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:3!==t.brandForm.brand_type,expression:"brandForm.brand_type !== 3"}],attrs:{label:"品牌商标注册号:",prop:"brand_number"}},[a("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:""},model:{value:t.brandForm.brand_number,callback:function(e){t.$set(t.brandForm,"brand_number",e)},expression:"brandForm.brand_number"}})],1),t._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:3!==t.brandForm.brand_type,expression:"brandForm.brand_type !== 3"}],attrs:{label:"品牌类型:",prop:"brand_range"}},[a("el-radio-group",{model:{value:t.brandForm.brand_range,callback:function(e){t.$set(t.brandForm,"brand_range",e)},expression:"brandForm.brand_range"}},[a("el-radio",{attrs:{label:1}},[t._v("国内品牌")]),t._v(" "),a("el-radio",{attrs:{label:2}},[t._v("国外品牌")])],1)],1),t._v(" "),2===t.brandForm.brand_type?a("el-form-item",{attrs:{label:"品牌方授权书:",prop:"brand_auth"}},[a("div",{staticStyle:{width:"100%",height:"100%",display:"flex","flex-direction":"row","justify-content":"normal"}},[a("div",{staticStyle:{"padding-right":"6px"}},[a("el-upload",{staticClass:"uploadData",attrs:{action:"#","list-type":"picture-card","http-request":t.uploadFactoryImgs,"before-upload":t.beforeUpImg,"on-preview":t.handlePictureCardPreview2,"on-remove":t.handleRemove2,"file-list":t.factoryImgFileList}},[a("i",{staticClass:"el-icon-plus"})]),t._v(" "),a("el-dialog",{attrs:{visible:t.dialogVisible2},on:{"update:visible":function(e){t.dialogVisible2=e}}},[a("img",{attrs:{width:"100%",src:t.dialogImageUrl2,alt:""}})])],1),t._v(" "),a("div",[a("span",{staticClass:"tips-text"},[a("i",{staticClass:"el-icon-warning h-warning"})])]),t._v(" "),a("div",{staticStyle:{width:"380px","line-height":"24px","padding-top":"6px"}},[a("span",{staticClass:"tips-text"},[t._v("品牌方给予企业的授权书。文件大小在2MB以内,支持png,jpg格式")])])])]):t._e(),t._v(" "),2===t.brandForm.brand_type?a("el-form-item",{attrs:{label:"授权有效期至:",prop:"brand_auth_time"}},[a("el-date-picker",{staticStyle:{width:"300px"},attrs:{type:"date",placeholder:"选择日期"},on:{change:t.validityConcrete},model:{value:t.validityConcreteTime,callback:function(e){t.validityConcreteTime=e},expression:"validityConcreteTime"}}),t._v(" "),a("el-checkbox",{staticStyle:{"padding-left":"15px"},on:{change:t.validityLongTerm},model:{value:t.validityLongTermVal,callback:function(e){t.validityLongTermVal=e},expression:"validityLongTermVal"}},[t._v("长期\n            ")])],1):t._e(),t._v(" "),3!==t.brandForm.brand_type?a("el-form-item",{attrs:{label:"品牌经营授权:",prop:"brand_business_auth"}},[a("div",{staticStyle:{width:"100%",height:"100%",display:"flex","flex-direction":"row","justify-content":"normal"}},[a("div",{staticStyle:{"padding-right":"6px"}},[a("el-upload",{staticClass:"uploadData",attrs:{action:"#","http-request":t.uploadShopImgs,"list-type":"picture-card",limit:2,"on-exceed":t.showTip,"before-upload":t.beforeUpImg,"on-preview":t.handlePictureCardPreview3,"on-remove":t.handleRemove3,"file-list":t.shopImgFileList}},[a("i",{staticClass:"el-icon-plus"})]),t._v(" "),a("el-dialog",{attrs:{visible:t.dialogVisible3},on:{"update:visible":function(e){t.dialogVisible3=e}}},[a("img",{attrs:{width:"100%",src:t.dialogImageUrl3,alt:""}})])],1),t._v(" "),a("div",[a("span",{staticClass:"tips-text"},[a("i",{staticClass:"el-icon-warning h-warning"})])]),t._v(" "),a("div",{staticStyle:{width:"380px","line-height":"24px","padding-top":"6px"}},[a("span",{staticClass:"tips-text"},[t._v("授权在云仓平台经营此品牌。文件大小在2MB以内,支持png,jpg格式,最多可上传2张")])])])]):t._e(),t._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:3!==t.brandForm.brand_type,expression:"brandForm.brand_type !== 3"}],attrs:{label:""}},[a("div",{staticStyle:{width:"100%",height:"100%",display:"flex","flex-direction":"row","justify-content":"normal"}},[a("a",{staticClass:"download-Template-btn",attrs:{href:t.downTemplatehttp}},[a("i",{staticClass:"el-icon-download"}),t._v("下载模板")]),t._v(" "),a("div",[a("span",{staticClass:"tips-text"},[a("i",{staticClass:"el-icon-warning h-warning"})])]),t._v(" "),a("div",{staticStyle:{width:"380px","line-height":"24px","padding-top":"6px"}},[a("span",{staticClass:"tips-text"},[t._v("请您点击下载授权书模板,打印并签字盖章,拍照上传。\n              如暂时无法上传该授权,可选择【无品牌】,稍后在店铺信息里面完善品牌信息")])])])]),t._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:3!==t.brandForm.brand_type,expression:"brandForm.brand_type !== 3"}]},[a("el-button",{staticStyle:{"margin-right":"40px"},attrs:{type:"primary"},on:{click:t.back}},[t._v("上一步")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.next("brandForm")}}},[t._v("下一步")])],1)],1),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:!t.hasBrand,expression:"!hasBrand"}],staticClass:"no-brand"},[a("p",[t._v("您当前选择的是无品牌")]),t._v(" "),a("p",[t._v("这不会影响您入驻的审核")]),t._v(" "),a("p",[t._v("入驻成功后,您可以在店铺信息里,添加您的品牌")]),t._v(" "),a("div",{staticClass:"no-brand-btn"},[a("el-button",{staticStyle:{"margin-right":"40px"},attrs:{type:"primary"},on:{click:t.back}},[t._v("上一步")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.noBrandNext}},[t._v("下一步")])],1)])],1)])],1)},r=[],n=(a("28a5"),a("6b1f")),s={name:"FillBrandInf",data:function(){var t=this,e=function(e,a,i){2===t.brandForm.brand_type&&null===t.validityConcreteTime&&!1===t.validityLongTermVal?i(new Error("授权有效期具体时间和长期必须填写其中一个")):i()},a=function(e,a,i){t.brandImgFileList.length>0?i():0===t.brandImgFileList.length&&i(new Error("品牌logo图片至少上传一张"))},i=function(e,a,i){t.shopImgFileList.length>0?i():0===t.shopImgFileList.length&&i(new Error("品牌logo图片至少上传一张"))};return{shopTemplatehttp:"http://img3.jxhh.com/shop/brand.doc",factoryTemplatehttp:"http://img3.jxhh.com/shop/factory.doc",hasBrand:!0,dialogImageUrl:"",dialogVisible:!1,dialogImageUrl2:"",dialogVisible2:!1,dialogImageUrl3:"",dialogVisible3:!1,validityConcreteTime:null,validityLongTermVal:!1,downTemplatehttp:"",brandImgFileList:[],factoryImgFileList:[],shopImgFileList:[],brandForm:{id:0,brand_type:1,brand_cn:"",brand_en:"",brand_logo:"",brand_number:"",brand_range:"",brand_auth_time:"",brand_auth:"",brand_business_auth:""},brandRules:{brand_cn:[{required:!0,message:"品牌中文名称不能为空",trigger:"blur"}],brand_logo:[{required:!0,message:"品牌logo图片至少上传一张",validator:a}],brand_range:[{required:!0,message:"品牌类型需要选择其一",trigger:"blur"}],brand_auth:[{required:!0,message:"品牌授权至少上传一张图片"}],brand_auth_time:[{validator:e,required:!0,trigger:"change"}],brand_business_auth:[{required:!0,message:"品牌经营授权至少上传一张图片",validator:i}]}}},watch:{factoryImgFileList:{handler:function(t,e){var a=this;2===this.brandForm.brand_type&&(this.$refs.brandForm.validateField("brand_auth"),0!==t.length&&this.$nextTick((function(){a.$refs.brandForm.clearValidate("brand_auth")})))},deep:!0}},created:function(){this.getBrands()},mounted:function(){this.downTemplatehttp=this.factoryTemplatehttp},methods:{beforeUpImg:function(t){var e=t.size/1024/1024>2;return"image/png"!==t.type&&"image/jpg"!==t.type&&"image/jpeg"!=t.type?(this.$message({message:"上传图片格式只支持jpg/png格式",type:"warning"}),!1):e?(this.$message({message:"上传图片大小不能超过2M",type:"warning"}),!1):void 0},beforeUpLogoImg:function(t){var e=t.size/1024>500;return"image/png"!==t.type&&"image/jpg"!==t.type&&"image/jpeg"!=t.type?(this.$message({message:"上传图片格式只支持jpg/png格式",type:"warning"}),!1):e?(this.$message({message:"上传图片大小不能超过500 kb",type:"warning"}),!1):void 0},uploadLogoImgs:function(t){var e=this;this.getBase64(t.file).then((function(t){var a=t.split(",");e.Base64img=a[1];var i={img_data:e.Base64img};Object(n["i"])(i).then((function(t){t&&1===t.code&&(e.brandImgFileList.push({url:t.data.image_url}),e.$message({type:"success",message:"上传成功"}),e.$refs.brandForm.clearValidate("brand_logo"))}))}))},uploadShopImgs:function(t){var e=this;this.getBase64(t.file).then((function(t){var a=t.split(",");e.Base64img=a[1];var i={img_data:e.Base64img};Object(n["i"])(i).then((function(t){t&&1===t.code&&(e.shopImgFileList.push({url:t.data.image_url}),e.$message({type:"success",message:"上传成功"}),e.$refs.brandForm.clearValidate("brand_business_auth"))}))}))},uploadFactoryImgs:function(t){var e=this;this.getBase64(t.file).then((function(t){var a=t.split(",");e.Base64img=a[1];var i={img_data:e.Base64img};Object(n["i"])(i).then((function(t){t&&1===t.code&&(e.factoryImgFileList.push({url:t.data.image_url}),e.$message({type:"success",message:"上传成功"}))}))}))},getBase64:function(t){return new Promise((function(e,a){var i=new FileReader,r="";i.readAsDataURL(t),i.onload=function(){r=i.result},i.onerror=function(t){a(t)},i.onloadend=function(){e(r)}}))},chooseBrandType:function(){this.downTemplatehttp="",1===this.brandForm.brand_type?(this.hasBrand=!0,this.downTemplatehttp=this.shopTemplatehttp):2===this.brandForm.brand_type?(this.hasBrand=!0,this.downTemplatehttp=this.factoryTemplatehttp,this.factoryImgFileList=[],this.brandForm.brand_auth="",this.brand_auth_time="",this.validityConcreteTime=null,this.validityLongTermVal=!1):3===this.brandForm.brand_type&&(this.hasBrand=!1)},clearImg:function(){this.brandImgFileList=[],this.factoryImgFileList=[],this.shopImgFileList=[],this.brandForm.brand_logo="",this.brandForm.brand_auth="",this.brandForm.brand_business_auth="",this.brand_auth_time="",this.validityConcreteTime=null,this.validityLongTermVal=!1},handlePictureCardPreview:function(t){this.dialogImageUrl=t.url,this.dialogVisible=!0},handleRemove:function(t,e){for(var a=0;a<this.brandImgFileList.length;a++)t.uid===this.brandImgFileList[a].uid&&this.brandImgFileList.splice(a,1)},handlePictureCardPreview2:function(t){this.dialogImageUrl2=t.url,this.dialogVisible2=!0},handleRemove2:function(t){for(var e=0;e<this.factoryImgFileList.length;e++)t.uid===this.factoryImgFileList[e].uid&&this.factoryImgFileList.splice(e,1)},handlePictureCardPreview3:function(t){this.dialogImageUrl3=t.url,this.dialogVisible3=!0},handleRemove3:function(t){for(var e=0;e<this.shopImgFileList.length;e++)t.uid===this.shopImgFileList[e].uid&&this.shopImgFileList.splice(e,1)},validityConcrete:function(){this.validityConcreteTime&&(this.validityLongTermVal=!1)},validityLongTerm:function(){this.validityLongTermVal&&(this.validityConcreteTime=null)},getBrands:function(){var t=this;Object(n["d"])().then((function(e){if(1===e.code&&e.data){t.brandForm=e.data[0];var a={},i=[];if(t.brandForm.brand_logo.indexOf(",")>0){i=t.brandForm.brand_logo.split(",");for(var r=0;r<i.length;r++)a={},a.url=i[r],t.brandImgFileList.push(a)}else a.url=t.brandForm.brand_logo,t.brandImgFileList=[],t.brandImgFileList.push(a);var n={},s=[];if(t.brandForm.brand_auth.indexOf(",")>0){s=t.brandForm.brand_auth.split(",");for(var o=0;o<s.length;o++)n={},n.url=s[o],t.factoryImgFileList.push(n)}else n.url=t.brandForm.brand_auth,t.factoryImgFileList=[],t.factoryImgFileList.push(n);var l={},d=[];if(t.brandForm.brand_business_auth.indexOf(",")>0){d=t.brandForm.brand_business_auth.split(",");for(var m=0;m<d.length;m++)l={},l.url=d[m],t.shopImgFileList.push(l)}else l.url=t.brandForm.brand_business_auth,t.shopImgFileList=[],t.shopImgFileList.push(l);0===t.brandForm.brand_auth_time?t.validityLongTermVal=!0:t.validityConcreteTime=t.toStandTime(t.brandForm.brand_auth_time)}}))},toStandTime:function(t){var e=new Date(1e3*t),a=e.getFullYear()+"-",i=(e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1)+"-",r=(e.getDate()<10?"0"+e.getDate():e.getDate())+" ",n=(e.getHours()<10?"0"+e.getHours():e.getHours())+":",s=(e.getMinutes()<10?"0"+e.getMinutes():e.getMinutes())+":",o=e.getSeconds()<10?"0"+e.getSeconds():e.getSeconds();return a+i+r+n+s+o},showTip:function(t,e){this.$message({message:"最多上传2张图片",type:"warning"})},back:function(){this.$router.push("/fillMainInf")},next:function(t){var e=this;if(this.validityLongTermVal?this.brandForm.brand_auth_time=this.validityLongTermVal-0-1:!1===this.validityLongTermVal&&this.validityConcreteTime?this.brandForm.brand_auth_time=new Date(this.validityConcreteTime).getTime()/1e3:this.brandForm.brand_auth_time="",this.brandImgFileList.length>0){for(var a=0;a<this.brandImgFileList.length;a++)0===a?this.brandForm.brand_logo=this.brandImgFileList[a].url:this.brandForm.brand_logo+=","+this.brandImgFileList[a].url;this.brandForm.brand_register_cert=this.brandImgFileList[0].url}if(this.factoryImgFileList.length>0)for(var i=0;i<this.factoryImgFileList.length;i++)0===i?this.brandForm.brand_auth=this.factoryImgFileList[i].url:this.brandForm.brand_auth+=","+this.factoryImgFileList[i].url;if(this.shopImgFileList.length>0)for(var r=0;r<this.shopImgFileList.length;r++)0===r?this.brandForm.brand_business_auth=this.shopImgFileList[r].url:this.brandForm.brand_business_auth+=","+this.shopImgFileList[r].url;this.$refs[t].validate((function(t){if(t){var a={},i=[];i.push(e.brandForm),0===e.brandForm.id?(a.brands=i,Object(n["a"])(a).then((function(t){e.$router.push("/fillShopInf")}))):Object(n["h"])(i).then((function(t){1===t.code?e.$router.push("/fillShopInf"):0===t.code&&(t.msg?e.$message({message:t.msg,type:"error"}):e.$message({message:"数据出错啦!",type:"error"}))}))}}))},noBrandNext:function(){this.$router.push("/fillShopInf")}}},o=s,l=(a("79ef"),a("2877")),d=Object(l["a"])(o,i,r,!1,null,"bf858674",null);e["default"]=d.exports},f608:function(t,e,a){}}]);