Files
PropertyDeployment/resources/Web/MicroCommunityMallWeb/html/js/chunk-384820fa.ad6b3f4f.js
Anfioo adfd019d2d 江门
1
2026-02-01 15:37:55 +08:00

2 lines
9.7 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-384820fa"],{"0b3b":function(e,a,t){"use strict";t.r(a);var s=function(){var e=this,a=e._self._c;return a("div",{staticClass:"animated fadeInRight"},[a("el-row",[a("el-col",{attrs:{span:24}},[a("div",{staticClass:"ibox"},[a("div",{staticClass:"ibox-title"},[a("h5",[e._v(e._s(e.$t("company.title")))]),a("div",{staticClass:"ibox-tools"})]),a("div",{staticClass:"ibox-content"},[a("form",{staticClass:"wizard-big wizard clearfix",attrs:{id:"component",role:"application",novalidate:"novalidate"}},[a("p",{staticStyle:{color:"red"}},[e._v(e._s(e.companyInfo.errorInfo))]),a("div",{staticClass:"steps clearfix"},[a("ul",{attrs:{role:"tablist"}},[a("li",{class:{current:1==e.step,disabled:1!=e.step},staticStyle:{width:"50%"},attrs:{role:"tab"}},[a("a",[e._v(e._s(e.$t("company.shopInfo")))])]),a("li",{class:{current:2==e.step,disabled:2!=e.step},staticStyle:{width:"50%"},attrs:{role:"tab"}},[a("a",[e._v(e._s(e.$t("company.notice")))])])])]),a("div",{staticClass:"content clearfix"},[a("h1",{staticClass:"title current",attrs:{tabindex:"-1"}},[e._v(e._s(e.$t("company.basicInfo")))]),a("div",{class:{no_display:1!=e.step}},[a("company-base",{ref:"companyBase"})],1),a("h1",{staticClass:"title",attrs:{id:"component-h-2",tabindex:"-1"}},[e._v(e._s(e.$t("company.notice")))]),a("div",{class:{no_display:2!=e.step}},[a("company-readme",{ref:"companyReadme"})],1)]),a("div",{staticClass:"actions clearfix"},[a("ul",{attrs:{role:"menu","aria-label":"Pagination"}},[a("li",{class:{disabled:1==e.step},attrs:{"aria-disabled":"true"}},[a("a",{attrs:{role:"menuitem"},on:{click:function(a){return e.previous()}}},[e._v(e._s(e.$t("company.previous")))])]),a("li",{class:{no_display:2==e.step}},[a("a",{attrs:{role:"menuitem"},on:{click:function(a){return e.next()}}},[e._v(e._s(e.$t("company.next")))])]),a("li",{class:{no_display:2!=e.step}},[a("a",{attrs:{role:"menuitem"},on:{click:function(a){return e.finish()}}},[e._v(e._s(e.$t("company.submit")))])])])])])])])])],1)],1)},o=[],n=function(){var e=this,a=e._self._c;return a("div",{staticClass:"padding-left"},[a("fieldset",{staticClass:"body current",attrs:{role:"tabpanel","aria-labelledby":"component-h-0","aria-hidden":"false"}},[a("h2",[e._v(e._s(e.$t("companyBase.completeShopInfo")))]),a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form",{attrs:{"label-width":"120px"}},[a("el-form-item",{attrs:{label:e.$t("companyBase.companyName"),required:""}},[a("el-input",{attrs:{placeholder:e.$t("companyBase.companyNamePlaceholder")},model:{value:e.companyBaseInfo.name,callback:function(a){e.$set(e.companyBaseInfo,"name",a)},expression:"companyBaseInfo.name"}})],1),a("el-form-item",{attrs:{label:e.$t("companyBase.shopType"),required:""}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("companyBase.shopTypePlaceholder")},model:{value:e.companyBaseInfo.shopType,callback:function(a){e.$set(e.companyBaseInfo,"shopType",a)},expression:"companyBaseInfo.shopType"}},e._l(e.companyBaseInfo.shopTypes,(function(e){return a("el-option",{key:e.shopTypeId,attrs:{label:e.typeName,value:e.shopTypeId}})})),1)],1),a("el-form-item",{attrs:{label:e.$t("companyBase.shopName"),required:""}},[a("el-input",{attrs:{placeholder:e.$t("companyBase.shopNamePlaceholder")},model:{value:e.companyBaseInfo.shopName,callback:function(a){e.$set(e.companyBaseInfo,"shopName",a)},expression:"companyBaseInfo.shopName"}})],1),a("el-form-item",{attrs:{label:e.$t("companyBase.shopArea"),required:""}},[a("el-row",{attrs:{gutter:10}},[a("el-col",{attrs:{span:8}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("companyBase.provincePlaceholder")},on:{change:function(a){return e.getProv(e.selectProv)}},model:{value:e.selectProv,callback:function(a){e.selectProv=a},expression:"selectProv"}},e._l(e.provs,(function(e){return a("el-option",{key:e.areaCode,attrs:{label:e.areaName,value:e.areaCode}})})),1)],1),a("el-col",{attrs:{span:8}},[""!=e.selectProv?a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("companyBase.cityPlaceholder")},on:{change:function(a){return e.getCity(e.selectCity)}},model:{value:e.selectCity,callback:function(a){e.selectCity=a},expression:"selectCity"}},e._l(e.citys,(function(e){return a("el-option",{key:e.areaCode,attrs:{label:e.areaName,value:e.areaCode}})})),1):e._e()],1),a("el-col",{attrs:{span:8}},[""!=e.selectCity?a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("companyBase.areaPlaceholder")},on:{change:function(a){return e.getArea(e.selectArea)}},model:{value:e.selectArea,callback:function(a){e.selectArea=a},expression:"selectArea"}},e._l(e.areas,(function(e){return a("el-option",{key:e.areaCode,attrs:{label:e.areaName,value:e.areaCode}})})),1):e._e()],1)],1)],1),a("el-form-item",{attrs:{label:e.$t("companyBase.shopAddress"),required:""}},[a("el-input",{attrs:{placeholder:e.$t("companyBase.shopAddressPlaceholder")},model:{value:e.companyBaseInfo.address,callback:function(a){e.$set(e.companyBaseInfo,"address",a)},expression:"companyBaseInfo.address"}})],1),a("el-form-item",{attrs:{label:e.$t("companyBase.contactPhone"),required:""}},[a("el-input",{attrs:{placeholder:e.$t("companyBase.contactPhonePlaceholder")},model:{value:e.companyBaseInfo.tel,callback:function(a){e.$set(e.companyBaseInfo,"tel",a)},expression:"companyBaseInfo.tel"}})],1)],1)],1),a("el-col",{attrs:{span:10,offset:2}},[a("div",{staticClass:"text-center"},[a("div",{staticStyle:{"margin-top":"20px"}},[a("i",{staticClass:"el-icon-office-building",staticStyle:{"font-size":"240px",color:"#e5e5e5"}})])])])],1)],1)])},c=[],r=t("b775");function l(e){return new Promise((a,t)=>{Object(r["a"])({url:"/company/getAreas",method:"get",params:e}).then(e=>{const t=e.data;a(t)}).catch(e=>{t(e)})})}function i(e){return new Promise((a,t)=>{Object(r["a"])({url:"/shopType.queryShopType",method:"get",params:e}).then(e=>{const t=e.data;a(t)}).catch(e=>{t(e)})})}function p(e){return new Promise((a,t)=>{Object(r["a"])({url:"/shop.pcReplenishStoreAndShop",method:"post",data:e}).then(e=>{const t=e.data;a(t)}).catch(e=>{t(e)})})}var d={name:"CompanyBase",data(){return{companyBaseInfo:{name:"",shopName:"",areaAddress:"",address:"",tel:"",storeTypeCd:"800900000005",nearbyLandmarks:"无",areaCode:"",shopType:"",shopTypes:[]},areas:[],provs:[],citys:[],selectProv:"",selectCity:"",selectArea:"",allCity:[]}},created(){this._initArea("101","0"),this._listShopTypes(),console.log(this.allCity)},watch:{companyBaseInfo:{deep:!0,handler(){this.$emit("company","notifyCompanyInfo",this.companyBaseInfo)}}},methods:{getProv(e){this._initArea("202",e)},getCity(e){this._initArea("303",e)},getArea(e){this.companyBaseInfo.areaAddress="",this.provs&&(this.provs.forEach(e=>{e.areaCode==this.selectProv&&(this.companyBaseInfo.areaAddress=e.areaName)}),this.citys.forEach(e=>{e.areaCode==this.selectCity&&(this.companyBaseInfo.areaAddress+=e.areaName)}),this.areas.forEach(e=>{e.areaCode==this.selectArea&&(this.companyBaseInfo.areaAddress+=e.areaName)}),this.companyBaseInfo.areaCode=e)},async _initArea(e,a){try{const t=await l({areaLevel:e,parentAreaCode:a}),s=t.data||[];"101"===e?this.provs=s:"202"===e?this.citys=s:this.areas=s}catch(t){console.error("获取地区失败:",t),this.$message.error(this.$t("common.getAreaFailed"))}},async _listShopTypes(){try{const e=await i({page:1,row:100});this.companyBaseInfo.shopTypes=e.data||[]}catch(e){console.error("获取店铺类型失败:",e)}}}},m=d,y=(t("6774"),t("2877")),h=Object(y["a"])(m,n,c,!1,null,"0c27ffda",null),f=h.exports,u=function(){var e=this,a=e._self._c;return a("div",{staticClass:"padding-left"},[a("fieldset",{staticClass:"body",attrs:{id:"component-p-2",role:"tabpanel","aria-labelledby":"component-h-2","aria-hidden":"true"}},[a("h4",[e._v(e._s(e.$t("companyReadme.notice")))]),a("div",{staticStyle:{"max-height":"500px","overflow-y":"auto"}},[a("div",{domProps:{innerHTML:e._s(e.companyReadmeInfo.content)}})]),a("br"),a("el-checkbox",{model:{value:e.companyReadmeInfo.acceptTerms,callback:function(a){e.$set(e.companyReadmeInfo,"acceptTerms",a)},expression:"companyReadmeInfo.acceptTerms"}},[e._v(" "+e._s(e.$t("companyReadme.agreeNotice"))+" ")])],1)])},v=[],b={name:"CompanyReadme",data(){return{companyReadmeInfo:{acceptTerms:!1,content:""}}},created(){this._loadReadmeText()},watch:{companyReadmeInfo:{deep:!0,handler(){this.$emit("company","notifyCompanyReadme",this.companyReadmeInfo)}}},methods:{async _loadReadmeText(){try{const e=await(void 0)({page:1,row:1});e.data&&e.data.length>0&&(this.companyReadmeInfo.content=e.data[0].merchantProtocol)}catch(e){console.error("获取协议内容失败:",e)}}}},C=b,I=(t("ed33"),Object(y["a"])(C,u,v,!1,null,"315dacdc",null)),_=I.exports,B={name:"Company",components:{CompanyBase:f,CompanyReadme:_},data(){return{step:1,companyInfo:{name:"",shopName:"",areaAddress:"",address:"",tel:"",storeTypeCd:"800900000005",nearbyLandmarks:"无",areaCode:"",shopType:"",acceptTerms:!1,errorInfo:""}}},created(){},methods:{handleCompanyInfo(e){Object.assign(this.companyInfo,e)},handleCompanyReadme(e){Object.assign(this.companyInfo,e)},next(){this.step<2&&(this.step=this.step+1)},previous(){this.step>1&&(this.step=this.step-1)},async finish(){if(this.validateAcceptTerms())if(this.companyInfo.acceptTerms)try{const e=await p(this.companyInfo);0===e.code?this.$router.push("/"):this.$message.error(e.msg)}catch(e){console.error("请求失败:",e),this.companyInfo.errorInfo=e.message}else this.$message.error(this.$t("company.agreeNoticeRequired"));else this.$message.error(this.$t("company.pleaseReadNotice"))},validateAcceptTerms(){return!0}}},$=B,g=(t("3bc7"),Object(y["a"])($,s,o,!1,null,"19a547cd",null));a["default"]=g.exports},"3bc7":function(e,a,t){"use strict";t("4e6d")},"3f0c":function(e,a,t){},"4dc7":function(e,a,t){},"4e6d":function(e,a,t){},6774:function(e,a,t){"use strict";t("4dc7")},ed33:function(e,a,t){"use strict";t("3f0c")}}]);
//# sourceMappingURL=chunk-384820fa.ad6b3f4f.js.map