(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-11e11e1c"],{"6b1f":function(e,t,s){"use strict";s.d(t,"g",(function(){return o})),s.d(t,"i",(function(){return r})),s.d(t,"b",(function(){return a})),s.d(t,"d",(function(){return n})),s.d(t,"a",(function(){return l})),s.d(t,"l",(function(){return c})),s.d(t,"j",(function(){return g})),s.d(t,"c",(function(){return u})),s.d(t,"m",(function(){return m})),s.d(t,"e",(function(){return p})),s.d(t,"h",(function(){return d})),s.d(t,"f",(function(){return h})),s.d(t,"k",(function(){return f}));var i=s("b775");function o(e){return Object(i["a"])({url:"/system/index/getInfo",method:"get",params:e})}function r(e){return Object(i["a"])({url:"/local/getOrganization",method:"get",params:e})}function a(e){return Object(i["a"])({url:"/local/organization",method:"post",data:e})}function n(e){return Object(i["a"])({url:"/local/shopbrand",method:"get",params:e})}function l(e){return Object(i["a"])({url:"/local/brands",method:"post",data:e})}function c(e){return Object(i["a"])({url:"/local/upbrands",method:"post",data:e})}function g(e){return Object(i["a"])({url:"/local/getShopInfo",method:"get",params:e})}function u(e){return Object(i["a"])({url:"/local/addShopInfo",method:"post",data:e})}function m(e){return Object(i["a"])({url:"/system/goodsNew/uploadImage",method:"post",data:e})}function p(e){return Object(i["a"])({url:"/local/cate",method:"get",params:e})}function d(e){return Object(i["a"])({url:"/local/check/businessLicense",method:"get",params:e})}function h(e){return Object(i["a"])({url:"/local/check/idCard",method:"get",params:e})}function f(e){return Object(i["a"])({url:"/local/qualification/list",method:"get",params:e})}},ba53:function(e,t,s){"use strict";s.r(t);var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"fill-store-inf"},[s("div",{staticClass:"logo-bg"},[e._e()]),e._v(" "),s("el-card",{staticClass:"box-card"},[s("div",{staticClass:"clearfix steps",attrs:{slot:"header"},slot:"header"},[s("el-steps",{attrs:{active:2,"align-center":"","finish-status":"success"}},[s("el-step",{attrs:{title:"注册账号"}}),e._v(" "),s("el-step",{attrs:{title:"填写主体信息"}}),e._v(" "),s("el-step",{attrs:{title:"填写店铺信息"}}),e._v(" "),s("el-step",{attrs:{title:"提交入驻审核"}})],1)],1),e._v(" "),s("div",{staticClass:"main-con"},[s("el-form",{ref:"storeForm",attrs:{model:e.storeForm,rules:e.shopRules,"label-width":"180px",size:"small"}},[s("el-form-item",{attrs:{label:"电商平台经验:",prop:"is_business_experience"}},[s("el-radio-group",{model:{value:e.storeForm.is_business_experience,callback:function(t){e.$set(e.storeForm,"is_business_experience",t)},expression:"storeForm.is_business_experience"}},[s("el-radio",{attrs:{label:1}},[e._v("有")]),e._v(" "),s("el-radio",{attrs:{label:0}},[e._v("无")])],1)],1),e._v(" "),s("el-form-item",{attrs:{label:"店铺名称:",prop:"store_name","inline-message":"true"}},[s("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:"请输入店铺名称"},model:{value:e.storeForm.store_name,callback:function(t){e.$set(e.storeForm,"store_name",t)},expression:"storeForm.store_name"}})],1),e._v(" "),s("el-form-item",{attrs:{label:"经营类目:",prop:"scope"}},[s("el-select",{staticStyle:{width:"400px"},attrs:{multiple:"",placeholder:"请选择..."},on:{"remove-tag":e.removeTag,"visible-change":function(t){return e.scopeVisibleChange(t)}},model:{value:e.storeForm.scope,callback:function(t){e.$set(e.storeForm,"scope",t)},expression:"storeForm.scope"}},e._l(e.scopeOptions,(function(e){return s("el-option",{key:e.id,attrs:{label:e.title,value:e.id}})})),1)],1),e._v(" "),s("el-form-item",{attrs:{label:"店铺LOGO:",prop:"shop_logo"}},[s("div",{staticStyle:{width:"100%",height:"100%",display:"flex","flex-direction":"row","justify-content":"normal"}},[s("div",{staticStyle:{"padding-right":"6px"}},[s("el-upload",{class:["uploadData",{"hiden-dom":e.logoImgFileList.length>=1}],attrs:{action:"#","list-type":"picture-card",limit:1,"on-exceed":e.showTip1,"before-upload":e.beforeUpLogoImg,"http-request":e.uploadLogoImgs,"on-preview":e.handlePictureCardPreview,"on-remove":e.handleRemove,"file-list":e.logoImgFileList}},[s("i",{staticClass:"el-icon-plus"})]),e._v(" "),s("el-dialog",{attrs:{visible:e.dialogVisible},on:{"update:visible":function(t){e.dialogVisible=t}}},[s("img",{attrs:{width:"100%",src:e.dialogImageUrl,alt:""}})])],1),e._v(" "),s("div",[s("span",{staticClass:"tips-text"},[s("i",{staticClass:"el-icon-warning h-warning"})])]),e._v(" "),s("div",{staticStyle:{width:"380px","line-height":"24px","padding-top":"6px"}},[s("span",{staticClass:"tips-text"},[e._v("请上传店铺LOGO,文件大小在500KB以内,支持png,jpg格式,最多可上传1张")])])])]),e._v(" "),s("el-form-item",{attrs:{label:"运营负责人:",prop:"emergency_name","inline-message":"true"}},[s("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:"请输入运营负责人姓名"},model:{value:e.storeForm.emergency_name,callback:function(t){e.$set(e.storeForm,"emergency_name",t)},expression:"storeForm.emergency_name"}})],1),e._v(" "),s("el-form-item",{attrs:{label:"联系电话:",prop:"emergency_tel"}},[s("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:"请输入联系电话"},model:{value:e.storeForm.emergency_tel,callback:function(t){e.$set(e.storeForm,"emergency_tel",t)},expression:"storeForm.emergency_tel"}})],1),e._v(" "),s("el-form-item",[s("p",{staticStyle:{width:"580px","line-height":"24px","font-size":"14px",margin:"0"}},[e._v("需要提交特殊产品资质的类目请将资质上传在此处,包括全国工业生产许可证、3C、医疗品械\n 生产许可证、化妆品生产企业许可证等,根据具体类目资质要求提交")])]),e._v(" "),s("el-form-item",{attrs:{label:"其他资质:"}},[s("div",{staticClass:"auth-con"},e._l(e.qualificationList,(function(t,i){return s("div",{key:t.id,staticClass:"single-upload-con"},[s("div",{directives:[{name:"show",rawName:"v-show",value:!t.url,expression:"!item.url"}],staticClass:"single-auth-img el-icon-plus",on:{click:function(t){return e.upPreAuthImg(i)}}}),e._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:t.url,expression:"item.url"}],staticClass:"single-auth-img-con"},[s("img",{staticClass:"auth-spec-img",attrs:{src:t.url,alt:""}}),e._v(" "),s("span",{staticClass:"span-img-del-loading"},[s("span",{staticClass:"span-img-del el-icon-zoom-in zoom-span-block",on:{click:function(s){return e.viewSingleSpecImg(i,t)}}}),e._v(" "),s("span",{staticClass:"span-img-del el-icon-delete del-span-block",on:{click:function(s){return e.delSingleSpecImg(i,t)}}})])]),e._v(" "),s("div",{staticClass:"single-title"},[e._v(e._s(e.authTitleFormatter(t.content)))]),e._v(" "),s("input",{ref:"hxz"+i,refInFor:!0,staticStyle:{display:"none"},attrs:{type:"file",accept:"image/*"},on:{change:function(s){return e.changeIMG(i,t)}}})])})),0)]),e._v(" "),s("el-form-item",{staticClass:"confirm-btn"},[s("div",[s("el-button",{staticStyle:{"margin-right":"40px"},attrs:{type:"primary"},on:{click:e.back}},[e._v("上一步")]),e._v(" "),s("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.next("storeForm")}}},[e._v("提交审核")])],1)])],1)],1)]),e._v(" "),s("el-dialog",{staticClass:"img-dialog-con",attrs:{visible:e.imgDialog,"destroy-on-close":!0,width:"60%",center:"","close-on-click-modal":!1},on:{"update:visible":function(t){e.imgDialog=t}}},[s("img",{staticClass:"img-spe",attrs:{src:e.qualificationUrl,alt:""}})])],1)},o=[],r=(s("1bc7"),s("fc02"),s("6b1f")),a={name:"FillShopInf",data:function(){var e=this,t=function(t,s,i){e.logoImgFileList.length>0?i():0===e.logoImgFileList.length&&i(new Error("店铺logo图片至少上传一张"))},s=function(e,t,s){var i=/^1[3456789]\d{9}$/;i.test(t)?s():s(new Error("手机号码格式有误"))};return{dialogImageUrl:"",dialogVisible:!1,dialogImageUrl2:"",dialogVisible2:!1,logoImgFileList:[],businessImgFileList:[],scopeOptions:[],storeForm:{is_business_experience:0,store_name:"",scope:[],shop_logo:"",business_auth:"",emergency_name:""},shopRules:{store_name:[{required:!0,message:"店铺名称不能为空",trigger:"blur"},{max:36,message:"店铺名称最多输入36个字符",trigger:"blur"}],scope:[{required:!0,message:"经营类目至少选择一种",trigger:"change"}],shop_logo:[{required:!0,message:"店铺Logo至少上传一张图片",validator:t}],emergency_name:[{required:!0,message:"运营负责人不能为空",trigger:"blur"}],emergency_tel:[{required:!0,message:"联系人手机号码不能为空",trigger:"blur"},{required:!0,validator:s,trigger:"blur"}]},qualificationList:[],qualificationUrl:"",imgDialog:!1}},created:function(){var e=this;Object(r["e"])().then((function(t){1==t.code?e.scopeOptions=t.data:e.$message({type:"error",message:t.message?t.message:""})})),Object(r["g"])().then((function(t){1==t.code&&t.data.user?t.data.user.state>0&&e.getShop():e.$message({type:"error",message:t.message?t.message:"获取数据失败"})}))},mounted:function(){},methods:{showTip1:function(e,t){this.$message({message:"最多上传1张图片",type:"warning"})},showTip20:function(e,t){this.$message({message:"最多上传20张图片",type:"warning"})},beforeUpLogoImg:function(e){var t=e.size/1024>500;return"image/png"!==e.type&&"image/jpg"!==e.type&&"image/jpeg"!=e.type?(this.$message({message:"上传图片格式只支持png/png格式",type:"warning"}),!1):t?(this.$message({message:"上传图片大小不能超过500kb",type:"warning"}),!1):void 0},beforeUpBusImg:function(e){var t=e.size/1024/1024>2;return"image/png"!==e.type&&"image/jpg"!==e.type&&"image/jpeg"!=e.type?(this.$message({message:"上传图片格式只支持png/png格式",type:"warning"}),!1):t?(this.$message({message:"上传图片大小不能超过2M",type:"warning"}),!1):void 0},getShop:function(){var e=this;Object(r["j"])().then((function(t){if(1==t.code){if(e.storeForm.scope=[],""===t.data.scope)e.storeForm.scope=[];else{for(var s=t.data.scope.split(","),i=[],o=0;o<s.length;o++)i.push(parseInt(s[o]));e.storeForm=t.data,e.storeForm.scope=i}var r=[],a={};r=e.storeForm.shop_logo.split(","),r.length>0?r.forEach((function(t){a={},t&&(a.url=t,e.logoImgFileList.push(a))})):e.logoImgFileList=[],e.qualificationList=e.storeForm.qualification}else e.$message({type:"error",message:t.message?t.message:""})}))},uploadLogoImgs:function(e){var t=this;this.getBase64(e.file).then((function(e){var s=e.split(",");t.Base64img=s[1];var i={img_data:t.Base64img};Object(r["m"])(i).then((function(e){1==e.code?(t.logoImgFileList.push({url:e.data.image_url}),t.$message({type:"success",message:"上传成功"}),t.$refs.storeForm.clearValidate("shop_logo")):t.$message({type:"error",message:e.message?e.message:"上传失败"})}))}))},uploadBusinessImgs:function(e){console.log(368,e)},handlePictureCardPreview:function(e){this.dialogImageUrl=e.url,this.dialogVisible=!0},handleRemove:function(e,t){for(var s=0;s<this.logoImgFileList.length;s++)e.uid===this.logoImgFileList[s].uid&&this.logoImgFileList.splice(s,1)},handlePictureCardPreview2:function(e){this.dialogImageUrl2=e.url,this.dialogVisible2=!0},handleRemove2:function(e,t){for(var s=0;s<this.businessImgFileList.length;s++)e.uid===this.businessImgFileList[s].uid&&this.businessImgFileList.splice(s,1)},getBase64:function(e){return new Promise((function(t,s){var i=new FileReader,o="";i.readAsDataURL(e),i.onload=function(){o=i.result},i.onerror=function(e){s(e)},i.onloadend=function(){t(o)}}))},back:function(){this.$router.push("/fillMainInf")},next:function(e){var t=this,s=!1;if(this.qualificationList.length>0){for(var i=0;i<this.qualificationList.length;i++)if(!this.qualificationList[i].url){s=!0;break}if(s)return void this.$message({type:"warning",message:"请上传对应资质所需的图片"})}for(var o="",a=0;a<this.storeForm.scope.length;a++)o+=this.storeForm.scope[a]+",";if(this.storeForm.scope=o.substring(0,o.length-1),this.logoImgFileList.length>0)for(var n=0;n<this.logoImgFileList.length;n++)0===n?this.storeForm.shop_logo=this.logoImgFileList[n].url:this.storeForm.shop_logo+=","+this.logoImgFileList[n].url;this.storeForm.qualification_auth=JSON.stringify(this.qualificationList),this.$refs[e].validate((function(e){if(e)Object(r["c"])(t.storeForm).then((function(e){if(1==e.code)t.$router.push("/reviewing");else if(t.$message({type:"error",message:e.message?e.message:"保存失败"}),""===t.storeForm.scope)t.storeForm.scope=[];else{for(var s=t.storeForm.scope.split(","),i=[],o=0;o<s.length;o++)i.push(parseInt(s[o]));t.storeForm.scope=i}}));else if(""===t.storeForm.scope)t.storeForm.scope=[];else{for(var s=t.storeForm.scope.split(","),i=[],o=0;o<s.length;o++)i.push(parseInt(s[o]));t.storeForm.scope=i}}))},removeTag:function(e){var t=this;if(e&&(0==this.storeForm.scope.length&&(this.qualificationList=[]),this.storeForm.scope.length>0)){var s={cate_ids:this.storeForm.scope};Object(r["k"])(s).then((function(e){1==e.code&&(t.qualificationList=e.data?e.data:[])}))}},scopeVisibleChange:function(e){var t=this;if(!e&&Array.isArray(this.storeForm.scope)&&this.storeForm.scope.length>0){var s={cate_ids:this.storeForm.scope};Object(r["k"])(s).then((function(e){1==e.code&&(t.qualificationList=e.data?e.data:[])}))}},upPreAuthImg:function(e){var t="hxz"+e;this.$refs[t][0].value="",this.$refs[t][0].click()},changeIMG:function(e,t){var s=this,i=t,o="hxz"+e,a=this.$refs[o][0].files[0];a.size>3145728?this.$message({type:"error",message:"规格图片不能大于 3 M"}):this.getBase64(a).then((function(e){var t=e.split(",");s.Base64img=t[1];var o={img_data:s.Base64img};Object(r["m"])(o).then((function(e){e&&1==e.code?(i.url=e.data.image_url,s.$message({message:"上传成功",type:"success"})):s.$message({message:"上传失败,请重新上传",type:"error"})}))}))},delSingleSpecImg:function(e,t){t.url&&(t.url="",this.$message({type:"success",message:"删除成功"}))},viewSingleSpecImg:function(e,t){this.imgDialog=!1,t.url&&(this.imgDialog=!0,this.qualificationUrl=t.url)},authTitleFormatter:function(e){var t="";return e&&(t=e.trim()),t}}},n=a,l=(s("ec46"),s("cba8")),c=Object(l["a"])(n,i,o,!1,null,"f4b5db4c",null);t["default"]=c.exports},ec46:function(e,t,s){"use strict";s("efba")},efba:function(e,t,s){}}]);
-
由 yuanyufei 提交于b7b578b0