StepThird.vue 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099
  1. <template>
  2. <!--最后一步-->
  3. <div class="section">
  4. <div class="step-last">
  5. <!-- <h4 class="h4">免费开店</h4>
  6. <p class="title">申请开店完全免费,一个企业只能开一家店,申请到正式开通预计需1-3个工作日。了解更多请看《开店规则》</p>-->
  7. </div>
  8. <div class="radioCheck">
  9. <label for="1" class="radioLabel">
  10. <input type="radio" v-model="selectFlag" name="role" value="open" id="1"/>
  11. <label for="1" class="txtContact"></label>
  12. <span>免费开店</span>
  13. </label>
  14. <label for="2" class="radioLabel">
  15. <input type="radio" v-model="selectFlag" name="role" value="seller" id="2" checked/>
  16. <label for="2" class="txtContact"></label>
  17. <span>暂不开店直接寄售</span>
  18. </label>
  19. </div>
  20. <!--导入店铺模板-->
  21. <div class="container vendor_store_apply" v-show="selectFlag == 'open'">
  22. <div>
  23. <!-- Nav tabs -->
  24. <ul class="nav nav-tabs">
  25. <li><div style="height: 39px;line-height: 39px;font-size: 14px;">店铺类型:</div></li>
  26. <li class="custom_tab" :class="{active: tab == 'ORIGINAL_FACTORY'}" @click="toggleTab('ORIGINAL_FACTORY')">
  27. <a href="javascript:void(0)">原厂</a>
  28. </li>
  29. <li class="custom_tab" :class="{active: tab == 'AGENCY'}" @click="toggleTab('AGENCY')">
  30. <a href="javascript:void(0)">代理商</a>
  31. </li>
  32. <li class="custom_tab" :class="{active: tab == 'DISTRIBUTION'}" @click="toggleTab('DISTRIBUTION')">
  33. <a href="javascript:void(0)">经销商</a>
  34. </li>
  35. </ul>
  36. <!-- Tab panes -->
  37. <div class="tab-content">
  38. <!-- 原厂 -->
  39. <div role="tabpanel" class="tab-pane" v-if="tab == 'ORIGINAL_FACTORY'" :class="{active: tab == 'ORIGINAL_FACTORY'}">
  40. <div class="row com_row">
  41. <div class="col-md-4 custom_col">
  42. <div class="row" style="margin: 0;">
  43. <div class="col-md-5 col-md-offset-1 show_image_area show_image">
  44. <upload :typeData="'BUSINESS_LICENSE'" :url="businessLicenseUrl" @uploadAction="onUpload"></upload>
  45. </div>
  46. <div class="col-md-5" style="padding: 0;">
  47. <span style="margin-top: 50%;padding-right: 20px;">营业执照<em style="color: #FF0000;">*</em></span>
  48. </div>
  49. </div>
  50. </div>
  51. <div class="col-md-4 custom_col">
  52. <div class="row" style="margin: 0;">
  53. <div class="col-md-5 col-md-offset-1 show_image_area show_image">
  54. <upload :typeData="'TAX_PAYER'" @uploadAction="onUpload"></upload>
  55. </div>
  56. <div class="col-md-5" style="padding: 0;">
  57. <span style="margin-top: 50%;padding-right: 20px;">纳税人证明</span>
  58. </div>
  59. </div>
  60. </div>
  61. <div class="col-md-4 custom_col">
  62. <div class="row" style="margin: 0;">
  63. <div class="col-md-5 col-md-offset-1 show_image_area show_image">
  64. <upload :typeData="'TAX_REGISTRATION'" @uploadAction="onUpload"></upload>
  65. </div>
  66. <div class="col-md-5" style="padding: 0;">
  67. <span style="margin-top: 50%;padding-right: 20px;">税务登记证</span>
  68. </div>
  69. </div>
  70. </div>
  71. <div class="col-md-12"><em>* </em>如已上传最新版营业执照(三证合一),则其他两证无需上传 ; 仅支持JPG、PNG、GIF、PDF格式,每张大小不超过3M</div>
  72. </div>
  73. <!--增加品牌-->
  74. <div class="brand-type row" v-for="(brand, index) in brands">
  75. <div class="col-md-1">品牌{{index+1}}<em v-if="index == 0">*</em></div>
  76. <div class="col-md-7">
  77. <input type="text" v-model="brand.name"
  78. @input="onBrandInput(brand, index)"
  79. @blur.stop.prevent="onBrandChanged(brand, index)"
  80. class="form-control" name="brandName" autocomplete="off" placeholder="请输入英文品牌或中文品牌,如:松下; panasonic等"/>
  81. <ul class="dropdown-menu"
  82. v-show="showSimilarKey.flag && showSimilarKey.index == index"
  83. @mouseenter="showFlag = true"
  84. @mouseleave="showFlag = false">
  85. <li @mouseenter="setKeyActive"
  86. @mouseleave="setKeyDefault"
  87. @click.stop.prevent="changedName(brand, index, key_index)"
  88. v-for="(key, key_index) in similarKeys[index]">
  89. <a v-text="key.nameCn">
  90. <!--<strong>C</strong>apital Advan<strong>c</strong>ed-->
  91. </a>
  92. </li>
  93. </ul>
  94. </div>
  95. <div class="brand-small-upload col-md-4">
  96. <div class="brand-small-img">
  97. <upload :typeData="index" @uploadAction="onUpload"></upload>
  98. </div>
  99. <div class="file-text">品牌logo/商标注册原件/授权说明书</div>
  100. <div v-show="brands.length > 1" @click="deleteBrand(index)" class="delete" title="删除"><i class="fa fa-trash"></i></div>
  101. <div class="col-md-12"><em v-if="index == 0">*</em>仅支持JPG、PNG、GIF、PDF格式,大小不超过3M</div>
  102. </div>
  103. </div>
  104. <div class="add-brand row">
  105. <a href="javascript:void(0)" title="增加品牌" @click="addBrand"><em><i class="fa fa-plus-circle"></i>增加品牌</em></a>
  106. </div>
  107. <div class="unpass-reason row" style="display: none">
  108. 原因:<span style="color: #d32526;">原因</span>
  109. </div>
  110. </div>
  111. <!--原厂end-->
  112. <!--代理商 begin-->
  113. <div role="tabpanel" class="tab-pane" v-if="tab == 'AGENCY'" :class="{active: tab == 'AGENCY'}">
  114. <div class="row com_row">
  115. <div class="col-md-4 custom_col">
  116. <div class="row" style="margin: 0;">
  117. <div class="col-md-5 col-md-offset-1 show_image_area show_image">
  118. <upload :typeData="'BUSINESS_LICENSE'" :url="businessLicenseUrl" @uploadAction="onUpload"></upload>
  119. </div>
  120. <div class="col-md-5" style="padding: 0;">
  121. <span style="margin-top: 50%;padding-right: 20px;">营业执照<em style="color: #FF0000;">*</em></span>
  122. </div>
  123. </div>
  124. </div>
  125. <div class="col-md-4 custom_col">
  126. <div class="row" style="margin: 0;">
  127. <div class="col-md-5 col-md-offset-1 show_image_area show_image">
  128. <upload :typeData="'TAX_PAYER'" @uploadAction="onUpload"></upload>
  129. </div>
  130. <div class="col-md-5" style="padding: 0;">
  131. <span style="margin-top: 50%;padding-right: 20px;">纳税人证明</span>
  132. </div>
  133. </div>
  134. </div>
  135. <div class="col-md-4 custom_col">
  136. <div class="row" style="margin: 0;">
  137. <div class="col-md-5 col-md-offset-1 show_image_area show_image">
  138. <upload :typeData="'TAX_REGISTRATION'" @uploadAction="onUpload"></upload>
  139. </div>
  140. <div class="col-md-5" style="padding: 0;">
  141. <span style="margin-top: 50%;padding-right: 20px;">税务登记证</span>
  142. </div>
  143. </div>
  144. </div>
  145. <div class="col-md-12"><em>* </em>如已上传最新版营业执照(三证合一),则其他两证无需上传 ; 仅支持JPG、PNG、GIF、PDF格式,每张大小不超过3M</div>
  146. </div>
  147. <!--增加品牌-->
  148. <div class="brand-type row" v-for="(brand, index) in brands">
  149. <div class="col-md-1">品牌{{index+1}}<em>*</em></div>
  150. <div class="col-md-7">
  151. <input type="text" v-model="brand.name"
  152. @input="onBrandInput(brand, index)"
  153. @blur.stop.prevent="onBrandChanged(brand, index)"
  154. class="form-control" name="brandName" autocomplete="off" placeholder="请输入英文品牌或中文品牌,如:松下; panasonic等"/>
  155. <ul class="dropdown-menu"
  156. v-show="showSimilarKey.flag && showSimilarKey.index == index"
  157. @mouseenter="showFlag = true"
  158. @mouseleave="showFlag = false">
  159. <li @mouseenter="setKeyActive"
  160. @mouseleave="setKeyDefault"
  161. v-for="(key, key_index) in similarKeys[index]">
  162. <a v-text="key.nameCn" @click.stop.prevent="changedName(brand, index, key_index)">
  163. <!--<strong>C</strong>apital Advan<strong>c</strong>ed-->
  164. </a>
  165. </li>
  166. </ul>
  167. </div>
  168. <div class="brand-small-upload col-md-4">
  169. <div class="brand-small-img">
  170. <upload :typeData="index" @uploadAction="onUpload"></upload>
  171. </div>
  172. <div class="file-text">代理资格证/代理授权书</div>
  173. <div v-show="brands.length > 1" @click="deleteBrand(index)" class="delete" title="删除"><i class="fa fa-trash"></i></div>
  174. <div class="col-md-12"> <em>*</em>仅支持JPG、PNG、GIF、PDF格式,大小不超过3M</div>
  175. </div>
  176. </div>
  177. <div class="add-brand row">
  178. <a href="javascript:void(0)" title="增加品牌" @click="addBrand"><em><i class="fa fa-plus-circle"></i>增加品牌</em></a>
  179. </div>
  180. <div class="unpass-reason row" style="display: none">
  181. 原因:<span style="color: #d32526;">原因</span>
  182. </div>
  183. </div>
  184. <!--代理商 end-->
  185. <!--经销商 begin-->
  186. <div role="tabpanel" class="tab-pane" v-if="tab == 'DISTRIBUTION'" :class="{active: tab == 'DISTRIBUTION'}">
  187. <div class="row com_row">
  188. <div class="col-md-4 custom_col">
  189. <div class="row" style="margin: 0;">
  190. <div class="col-md-5 col-md-offset-1 show_image_area show_image">
  191. <upload :typeData="'BUSINESS_LICENSE'" :url="businessLicenseUrl" @uploadAction="onUpload"></upload>
  192. </div>
  193. <div class="col-md-5" style="padding: 0;">
  194. <span style="margin-top: 50%;padding-right: 20px;">营业执照<em style="color: #FF0000;">*</em></span>
  195. </div>
  196. </div>
  197. </div>
  198. <div class="col-md-4 custom_col">
  199. <div class="row" style="margin: 0;">
  200. <div class="col-md-5 col-md-offset-1 show_image_area show_image">
  201. <upload :typeData="'TAX_PAYER'" @uploadAction="onUpload"></upload>
  202. </div>
  203. <div class="col-md-5" style="padding: 0;">
  204. <span style="margin-top: 50%;padding-right: 20px;">纳税人证明</span>
  205. </div>
  206. </div>
  207. </div>
  208. <div class="col-md-4 custom_col">
  209. <div class="row" style="margin: 0;">
  210. <div class="col-md-5 col-md-offset-1 show_image_area show_image">
  211. <upload :typeData="'TAX_REGISTRATION'" @uploadAction="onUpload"></upload>
  212. </div>
  213. <div class="col-md-5" style="padding: 0;">
  214. <span style="margin-top: 50%;padding-right: 20px;">税务登记证</span>
  215. </div>
  216. </div>
  217. </div>
  218. <div class="col-md-12"><em>* </em>如已上传最新版营业执照(三证合一),则其他两证无需上传 ; 仅支持JPG、PNG、GIF、PDF格式,每张大小不超过3M</div>
  219. </div>
  220. </div>
  221. <!--经销商 end-->
  222. </div>
  223. <!-- Submit button -->
  224. <!-- <div style="padding: 28px 40px;">
  225. <button type="button" class="btn btn-primary" style="float: right" @click="submitApply">提交申请</button>
  226. <div class="clear-fix"></div>
  227. </div>-->
  228. </div>
  229. <!--删除上传图片-->
  230. <div class="com-del-box" style="display: none">
  231. <div class="title">
  232. <a><i class="fa fa-close fa-lg"></i></a>
  233. </div>
  234. <div class="content">
  235. <p><i class="fa fa-exclamation-circle"></i>是否删除选中信息</p>
  236. <div><a>取消</a><a>确认</a></div>
  237. </div>
  238. </div>
  239. <!--删除品牌图片-->
  240. <div class="com-del-box" style="display: none">
  241. <div class="title">
  242. <a><i class="fa fa-close fa-lg"></i></a>
  243. </div>
  244. <div class="content">
  245. <p><i class="fa fa-exclamation-circle"></i>品牌信息为重要信息,确定删除吗?</p>
  246. <div><a>取消</a><a>确认</a></div>
  247. </div>
  248. </div>
  249. <!--提示框-->
  250. <div class="com-del-box" v-if="showBrandNameInvalid">
  251. <div class="title">
  252. <a @click="showBrandNameInvalid = false"><i class="fa fa-close fa-lg"></i></a>
  253. </div>
  254. <div class="content">
  255. <p style="line-height: 20px;margin-top: 10px;padding:0 10px">非常抱歉,目前暂无此品牌!<br>若直接前往“品牌申请”,我们将为您先开通寄售功能,待申请通过后再提交开店申请。</p>
  256. <p style="line-height: 20px;">前往<a @click="goBrandApply()" target="_blank" style="color: #5078CB">品牌申请&nbsp;<i class="fa fa-arrow-right"></i></a></p>
  257. </div>
  258. </div>
  259. </div>
  260. <!--<div class="step-last">
  261. <h4 class="h4">库存寄售</h4>
  262. <p class="title">无需开店,即可发布贵司仓库里的滞销产品,优软商城代为销售,匿名清仓无压力<button class="no-apply" @click="goProduct">暂不开店,直接寄售</button></p>
  263. </div>-->
  264. <div class="row btn-area">
  265. <span @click="sectionChange(2)">上一步</span>
  266. <span @click="btnDisabled?'':selectFlag == 'open'?submitApply():goProduct()" :class="btnDisabled?'btn-disabled':''">提交申请</span>
  267. </div>
  268. <div class="loading" v-if="showLoading">
  269. <img src="/images/all/loading.gif" alt="">
  270. </div>
  271. </div>
  272. </template>
  273. <script>
  274. import Upload from '~components/common/upload/upload.vue'
  275. export default {
  276. data () {
  277. return {
  278. tab: 'ORIGINAL_FACTORY',
  279. brands: [{
  280. type: 'BRAND',
  281. name: '',
  282. url: '',
  283. isPdf: false,
  284. brandUuid: ''
  285. }],
  286. businessLicenseUrl: '',
  287. taxPayerUrl: '',
  288. taxRegistrationUrl: '',
  289. // defaultBusinessUrl: '',
  290. showBrandNameInvalid: false,
  291. similarKeys: [[]],
  292. showSimilarKey: {
  293. flag: false,
  294. index: 0
  295. },
  296. showFlag: false,
  297. isSelfRegisterSuccess: true,
  298. selectFlag: 'open',
  299. showLoading: false,
  300. btnDisabled: false
  301. }
  302. },
  303. props: [
  304. 'checkData',
  305. 'registerData',
  306. 'loginData',
  307. 'enterpriseData',
  308. 'businessImgUrl'
  309. ],
  310. watch: {
  311. enterpriseData: function (val, oldVal) {
  312. if (val !== {}) {
  313. this.businessLicenseUrl = val.url || val.businessCodeImage || ''
  314. // this.defaultBusinessUrl = val.enBussinessCodeImage || ''
  315. }
  316. },
  317. businessImgUrl: function (val, oldVal) {
  318. this.businessLicenseUrl = val
  319. }
  320. },
  321. components: {
  322. Upload
  323. },
  324. computed: {
  325. user () {
  326. return this.$store.state.option.user
  327. }
  328. },
  329. methods: {
  330. sectionChange: function (type) {
  331. this.$emit('sectionEvent', type)
  332. },
  333. toggleTab (t) {
  334. this.tab = t
  335. this.brands = [{
  336. type: 'BRAND',
  337. name: '',
  338. url: '',
  339. isPdf: false,
  340. brandUuid: ''
  341. }]
  342. },
  343. onUpload: function (obj) {
  344. if (obj.type === 'BUSINESS_LICENSE') {
  345. // this.businessLicenseUrl = obj.url
  346. this.businessLicenseUrl = obj.url
  347. if (obj.url !== '') {
  348. this.$emit('businessImgUrlAction', this.businessLicenseUrl)
  349. }
  350. } else if (obj.type === 'TAX_PAYER') {
  351. this.taxPayerUrl = obj.url
  352. } else if (obj.type === 'TAX_REGISTRATION') {
  353. this.taxRegistrationUrl = obj.url
  354. } else if (typeof obj.type === 'number') {
  355. this.brands[obj.type].url = obj.url
  356. }
  357. },
  358. onBrandChanged: function (item, index) {
  359. this.showSimilarKey.flag = this.showFlag
  360. if (!this.showFlag) {
  361. this.onCheck(item)
  362. }
  363. },
  364. onCheck: function (item, index) {
  365. if (item.name && item.name !== '') {
  366. this.$http.get('/api/product/brand', {params: {name: item.name, op: 'by_name'}})
  367. .then(response => {
  368. item.brandUuid = response.data.uuid
  369. item.isPdf = item.url.substring(item.url.length - 4, item.url.length) === '.pdf'
  370. }, err => {
  371. console.log(err)
  372. this.showBrandNameInvalid = true
  373. })
  374. }
  375. },
  376. onBrandInput: function (brand, index) {
  377. this.showSimilarKey.flag = false
  378. this.$http.get('/search/similarBrands?keyword=' + brand.name)
  379. .then(response => {
  380. this.similarKeys[index] = response.data
  381. if (response.data.length > 0) {
  382. this.showSimilarKey.flag = true
  383. this.showSimilarKey.index = index
  384. }
  385. })
  386. },
  387. changedName: function (brand, index, keyIndex) {
  388. brand.name = this.similarKeys[index][keyIndex].nameCn
  389. this.showSimilarKey.flag = false
  390. this.onCheck(brand)
  391. },
  392. setKeyActive: function (e) {
  393. e.target.setAttribute('class', 'active')
  394. },
  395. setKeyDefault: function (e) {
  396. e.target.setAttribute('class', '')
  397. },
  398. submitApply: function () {
  399. if (this.loginData.isSelf) {
  400. if (!this.registerData.isValidRegister) {
  401. this.$message.error('请输入正确的注册信息')
  402. } else if (!this.checkData.checked) {
  403. this.$message.error('您还没有勾选相关条款')
  404. } else {
  405. this.registerSelf()
  406. }
  407. } else {
  408. if (!this.checkData.checked) {
  409. this.$message.error('您还没有勾选相关条款')
  410. } else {
  411. this.storeApply(this.loginData.enterprise.uu)
  412. }
  413. }
  414. },
  415. registerSelf: function () {
  416. this.$http.post('/basic/enterprise/register?filePath=' + this.registerData.url, this.registerData.enterprise)
  417. .then(response => {
  418. if (response.data.success) {
  419. this.isSelfRegisterSuccess = true
  420. this.$http.delete('basic/user/userCacheEnterprise')
  421. this.$http.get('/user/authentication/reflash')
  422. .then(() => {
  423. this.$http.get(`/user/authentication/` + response.data.data.enuu).then(() => {
  424. this.$store.dispatch('loadUserInfo')
  425. this.loginData.isSelf = false
  426. this.loginData.enterprise.uu = response.data.data.enuu
  427. this.storeApply(response.data.data.enuu)
  428. // window.location.reload()
  429. })
  430. }
  431. )
  432. } else {
  433. this.isSelfRegisterSuccess = false
  434. this.$message.error('企业注册失败,请重新填写信息')
  435. }
  436. }, err => {
  437. console.log(err)
  438. this.isSelfRegisterSuccess = false
  439. this.$message.error('企业注册失败,请重新填写信息')
  440. })
  441. },
  442. storeApply: function (enuu) {
  443. this.showLoading = true
  444. let validCode = 0
  445. if (this.businessLicenseUrl === '') {
  446. this.$message.error('请上传营业执照')
  447. this.showLoading = false
  448. } else {
  449. if (this.brands[0].name === '') {
  450. validCode = 1
  451. } else if (this.brands[0].url === '') {
  452. validCode = 2
  453. }
  454. if (validCode === 0 || this.tab === 'DISTRIBUTION') {
  455. let qualifications = []
  456. qualifications.push({
  457. type: 'BUSINESS_LICENSE',
  458. resourceUrl: this.businessLicenseUrl,
  459. isPdf: this.isPdf(this.businessLicenseUrl)
  460. })
  461. if (this.taxPayerUrl !== '') {
  462. qualifications.push({
  463. type: 'TAX_PAYER',
  464. resourceUrl: this.taxPayerUrl,
  465. isPdf: this.isPdf(this.taxPayerUrl)
  466. })
  467. }
  468. if (this.taxPayerUrl !== '') {
  469. qualifications.push({
  470. type: 'TAX_REGISTRATION',
  471. resourceUrl: this.taxRegistrationUrl,
  472. isPdf: this.isPdf(this.taxRegistrationUrl)
  473. })
  474. }
  475. // console.log(qualifications)
  476. let tmpBrands = []
  477. this.brands.forEach(function (item) {
  478. if (item.name !== '' && item.url !== '') {
  479. tmpBrands.push(item)
  480. }
  481. })
  482. this.$http.post('/store-service/applications', {
  483. brands: tmpBrands,
  484. qualifications: qualifications,
  485. type: this.tab
  486. }).then(response => {
  487. this.showLoading = false
  488. if (response.data.success) {
  489. this.btnDisabled = true
  490. this.$message.success('感谢您对优软商城的支持,我们会尽快对您提交的信息进行审核,预计审核时间为3个工作日,审核结果将以站内消息及邮件形式通知您!')
  491. } else {
  492. this.btnDisabled = true
  493. this.$message.error('开通店铺异常,请前往我的店铺查看店铺开通进度')
  494. }
  495. this.$http.post('/basic/enterprise/openVendor/' + enuu)
  496. .then(() => {
  497. this.$http.get('/user/authentication/reflash')
  498. .then(() => {
  499. this.$http.get(`/user/authentication/` + enuu).then(() => {
  500. this.$store.dispatch('loadUserInfo')
  501. })
  502. })
  503. })
  504. window.setTimeout(function () {
  505. window.location.href = '/vendor#/store-apply/wait'
  506. }, 3000)
  507. }, err => {
  508. console.log(err)
  509. this.$http.post('/basic/enterprise/openVendorSetRead/' + enuu)
  510. this.$message.error('开通店铺失败')
  511. this.showLoading = false
  512. })
  513. } else {
  514. if (validCode === 1) {
  515. this.$message.error('请添加品牌信息')
  516. this.showLoading = false
  517. } else if (validCode === 2) {
  518. this.$message.error('请上传品牌图片')
  519. this.showLoading = false
  520. }
  521. }
  522. }
  523. },
  524. addBrand: function () {
  525. this.brands.push({
  526. type: 'BRAND',
  527. name: '',
  528. url: '',
  529. isPdf: false,
  530. brandUuid: ''
  531. })
  532. this.similarKeys.push([])
  533. },
  534. deleteBrand: function (index) {
  535. this.brands.splice(index, 1)
  536. this.similarKeys.splice(index, 1)
  537. },
  538. isPdf: function (url) {
  539. return url.substring(url.length - 4, url.length) === '.pdf'
  540. },
  541. reflashEnterprise: function (enuu, url) {
  542. this.$http.post('/basic/enterprise/openVendor/' + enuu)
  543. .then(() => {
  544. this.$http.get('/user/authentication/reflash')
  545. .then(() => {
  546. this.$http.get(`/user/authentication/` + enuu).then(() => {
  547. this.$store.dispatch('loadUserInfo')
  548. window.location.href = url
  549. })
  550. }
  551. )
  552. })
  553. },
  554. goProduct: function (baseUrl) {
  555. if (this.loginData.isSelf) {
  556. if (!this.registerData.isValidRegister) {
  557. this.$message.error('请输入正确的注册信息')
  558. } else if (!this.checkData.checked) {
  559. this.$message.error('您还没有勾选相关条款')
  560. } else {
  561. this.$http.post('/basic/enterprise/register?filePath=' + this.registerData.url, this.registerData.enterprise)
  562. .then(response => {
  563. if (response.data.success) {
  564. this.isSelfRegisterSuccess = true
  565. this.$http.delete('basic/user/userCacheEnterprise')
  566. this.reflashEnterprise(response.data.data.enuu, baseUrl || '/vendor#/vendor_upload')
  567. } else {
  568. this.isSelfRegisterSuccess = false
  569. this.$message.error('企业注册失败,请重新填写信息')
  570. }
  571. }, err => {
  572. console.log(err)
  573. this.isSelfRegisterSuccess = false
  574. this.$message.error('企业注册失败,请重新填写信息')
  575. })
  576. }
  577. } else {
  578. if (!this.checkData.checked) {
  579. this.$message.error('您还没有勾选相关条款')
  580. } else {
  581. this.reflashEnterprise(this.loginData.enterprise.uu, baseUrl || '/vendor#/vendor_upload')
  582. }
  583. }
  584. },
  585. goBrandApply: function () {
  586. this.showBrandNameInvalid = false
  587. this.goProduct('/vendor#/brand/apply/')
  588. }
  589. }
  590. }
  591. </script>
  592. <style scoped>
  593. .com-input{
  594. width: 100%;
  595. height: 100%;
  596. text-align: center;
  597. position: absolute;
  598. bottom: 0;
  599. left: 0;
  600. opacity: 0;
  601. display: inline-block !important;
  602. }
  603. .el-upload-list--picture-card .el-upload-list__item{
  604. width: 160px;
  605. height: 120px;
  606. top: 69px;
  607. }
  608. div.vendor_store_apply {
  609. margin: 0 auto;
  610. width: 1026px;
  611. background-color: #FFFFFF;
  612. margin-bottom: 20px;
  613. margin-top: 25px;
  614. }
  615. div.vendor_store_apply .com_row {
  616. padding: 0 40px;
  617. min-height: 40px;
  618. }
  619. div.vendor_store_apply .title_row {
  620. margin-bottom: 20px;
  621. border-bottom: #e8e8e8 1px solid;
  622. }
  623. div.vendor_store_apply .custom_col {
  624. margin: 0;
  625. padding: 0;
  626. }
  627. div.vendor_store_apply .custom_col img.previewImage {
  628. max-width: 160px;
  629. max-height: 120px;
  630. cursor: pointer;
  631. /*padding: 0 30px;*/
  632. }
  633. div.vendor_store_apply .row h2 {
  634. padding: 10px 0;
  635. font-size: 16px;
  636. font-weight: 500;
  637. color: #000000;
  638. }
  639. div.vendor_store_apply .row span {
  640. display: block;
  641. padding: 10px 0;
  642. font-size: 14px;
  643. color: #000000;
  644. }
  645. div.vendor_store_apply #file_upload {
  646. width: 100px;
  647. height: 100px;
  648. border:1px solid #CDCDCD;
  649. /*background: url("static/img/vendor/images/upload.png");*/
  650. }
  651. div.vendor_store_apply #upload_qualification {
  652. width: 100px;
  653. height: 100px;
  654. opacity: 0;
  655. }
  656. div.vendor_store_apply .custom_tab {
  657. margin: 0 15px;
  658. width: 90px;
  659. text-align: center;
  660. }
  661. div.vendor_store_apply .nav li.custom_tab.active>a,
  662. div.vendor_store_apply .nav li.custom_tab.active>a:focus,
  663. div.vendor_store_apply .nav li.custom_tab.active>a:hover {
  664. border: 1px solid #5078CB;
  665. border-bottom-color: transparent;
  666. color: #5078cb;
  667. }
  668. div.vendor_store_apply .uploadify-button {
  669. display: block;
  670. }
  671. div.vendor_store_apply .custom_col .show_image_area {
  672. height: 120px;
  673. display: flex;
  674. justify-content: center;
  675. align-items: center;
  676. }
  677. .nav-tabs{
  678. height: 41px;
  679. background: none;
  680. padding: 0 40px;
  681. }
  682. .nav-tabs>li>a{
  683. border-radius: 0;
  684. color: #333;
  685. }
  686. div.vendor_store_apply .btn-primary{
  687. background: #5078cb;
  688. border-radius: 0;
  689. }
  690. div.vendor_store_apply .btn-primary:hover{
  691. background: #3f7ae3;
  692. }
  693. div.vendor_store_apply .com_row .col-md-2{
  694. width: 120px;
  695. }
  696. div.vendor_store_apply .com_row .col-md-10 span{
  697. color: #666;
  698. }
  699. /*修改的样式*/
  700. div.vendor_store_apply .custom_col .show_image_area{
  701. position: relative;
  702. overflow: hidden;
  703. }
  704. .hover-show{
  705. position: absolute;
  706. width: 100%;
  707. height: 100%;
  708. top: 120px;
  709. left: 0;
  710. background: rgba(0,0,0,.5);
  711. }
  712. div.vendor_store_apply .custom_col .show_image_area .hover-show{
  713. top: 0;
  714. }
  715. .hover-show .delete{
  716. padding: 0;
  717. width: 30px;
  718. height: 30px;
  719. float: right;
  720. text-align: center;
  721. }
  722. .hover-show .delete:hover{
  723. cursor: pointer;
  724. }
  725. .hover-show .delete i{
  726. color: #fff;
  727. font-size: 18px;
  728. }
  729. .hover-show a{
  730. display: inline-block;
  731. width: 100%;
  732. height: 60px;
  733. font-size: 14px;
  734. color: #fff;
  735. text-align: center;
  736. line-height: 60px;
  737. }
  738. .hover-show a i{
  739. margin-right: 5px;
  740. font-size: 16px;
  741. }
  742. .brand-type{
  743. line-height: 34px;
  744. font-size: 14px;
  745. margin: 20px 20px 5px 20px;
  746. }
  747. .brand-type .brand-small-img{
  748. position: relative;
  749. width: 84px;
  750. height: 84px;
  751. overflow: hidden;
  752. text-align: center;
  753. border: #e8e8e8 1px solid;
  754. }
  755. .brand-type .brand-small-img .preview img{
  756. max-width: 84px;
  757. max-height: 84px;
  758. }
  759. .brand-type em{
  760. color: #ff0000;
  761. }
  762. .brand-type .col-md-7,.brand-type .col-md-1{
  763. margin-top: 25px;
  764. }
  765. .brand-small-upload .file-text,.brand-type .brand-small-img{
  766. float: left;
  767. }
  768. .brand-small-upload .file-text{
  769. width: 120px;
  770. margin-left: 10px;
  771. line-height: 20px;
  772. margin-top: 6%;
  773. }
  774. .brand-small-upload .delete{
  775. float: right;
  776. text-align: center;
  777. line-height: 84px;
  778. }
  779. .brand-small-upload .delete i{
  780. font-size: 18px;
  781. color: #5078cb;
  782. }
  783. .brand-small-upload .delete:hover{
  784. cursor: pointer;
  785. }
  786. .brand-small-upload .delete:hover i{
  787. color: #f00;
  788. }
  789. .brand-small-upload .brand-small-img .hover-show{
  790. top: 0;
  791. }
  792. .brand-small-upload .brand-small-img .hover-show{
  793. }
  794. .brand-small-upload .brand-small-img .hover-show span i{
  795. color: #fff;
  796. }
  797. .brand-small-upload .brand-small-img .hover-show span.delete{
  798. line-height: 30px;
  799. padding: 0;
  800. }
  801. .brand-small-upload .brand-small-img .hover-show a{
  802. line-height: 30px;
  803. height: 30px;
  804. }
  805. .tab-content {
  806. border: 1px #5078CB solid;
  807. padding-bottom: 30px;
  808. }
  809. .tab-content .com_row{
  810. margin:40px 0 0;
  811. border-bottom: #ccc 1px dashed;
  812. padding-bottom: 40px !important;
  813. }
  814. .tab-content .com_row .col-md-12{
  815. color: #999;
  816. margin-top: 20px;
  817. font-size: 12px;
  818. padding-left: 50px;
  819. }
  820. .brand-small-upload .col-md-12{
  821. color: #999;
  822. font-size: 12px;
  823. padding-left: 0;
  824. }
  825. .tab-content .com_row .col-md-12 em,.brand-small-upload .col-md-12 em{
  826. color: #f00;
  827. }
  828. .add-brand{
  829. text-align: center;
  830. border-bottom: #ccc 1px dashed;
  831. margin: 0 0 20px 0;
  832. height: 34px;
  833. }
  834. .add-brand a{
  835. font-size: 14px;
  836. color: #5078cb;
  837. width: 200px;
  838. height: 15px;
  839. display: inline-block;
  840. border: #ccc 1px dashed;
  841. border-top: 0;
  842. border-bottom-left-radius: 50px;
  843. border-bottom-right-radius: 50px;
  844. margin-top: 31px;
  845. background: #fff;
  846. line-height: 15px;
  847. text-decoration: none;
  848. }
  849. .add-brand a i{
  850. margin-right: 5px;
  851. font-size: 20px;
  852. vertical-align: middle;
  853. }
  854. .add-brand a em{
  855. position: relative;
  856. top: -10px;
  857. font-weight: bold;
  858. font-style: inherit;
  859. }
  860. .add-brand a:hover em{
  861. color: #d32526;
  862. text-decoration: none;
  863. }
  864. .unpass-reason {
  865. margin: 0 40px;
  866. line-height: 34px;
  867. }
  868. /* 预览框 end */
  869. .brand-type .dropdown-menu {
  870. width: 95%;
  871. }
  872. .brand-type .dropdown-menu li {
  873. font-size: 14px;
  874. }
  875. .com-del-box{
  876. position: fixed;
  877. z-index: 1000;
  878. height: auto;
  879. opacity: 1;
  880. background-color: white;
  881. width: 310px;
  882. -webkit-box-shadow: 0 5px 15px rgba(0,0,0,.5);
  883. -moz-box-shadow: 0 5px 15px rgba(0,0,0,.5);
  884. -o-box-shadow: 0 5px 15px rgba(0,0,0,.5);
  885. box-shadow: 0 5px 15px rgba(0,0,0,.5);
  886. margin: -155px 0 0 -75px;
  887. top: 55%;
  888. left: 43%;
  889. }
  890. .com-del-box .title{
  891. height: 30px;
  892. background-color: #5078cb;
  893. text-align: right;
  894. padding-right: 15px;
  895. line-height: 30px;
  896. }
  897. .com-del-box .title a{
  898. color: white;
  899. font-size: 16px;
  900. }
  901. .com-del-box .content{
  902. width: 100%;
  903. text-align: center;
  904. margin: 0 auto;
  905. }
  906. .com-del-box .content p{
  907. line-height: 50px;
  908. font-size: 14px;
  909. padding-top: 10px;
  910. }
  911. .com-del-box .content p i{
  912. color: #5078cb;
  913. font-size: 16px;
  914. margin-right: 10px;
  915. }
  916. .com-del-box .content div{
  917. width: 100%;
  918. text-align: center;
  919. margin: 0 auto;
  920. }
  921. .com-del-box .content div a{
  922. width: 55px;
  923. height: 26px;
  924. line-height: 26px;
  925. display: inline-block;
  926. text-align: center;
  927. font-size: 14px;
  928. }
  929. .com-del-box .content div a:first-child{
  930. background: #b4b5b9;
  931. color: #333;
  932. margin-right: 10px;
  933. }
  934. .com-del-box .content div a:last-child{
  935. background: #5078cb;
  936. color: #fff;
  937. }
  938. .com-del-box .content div a:hover{
  939. background: #3f7ae3;
  940. color: #fff;
  941. }
  942. div.vendor_store_apply .custom_col .show_image_area{
  943. width: 160px;
  944. border: #dcdcdc 1px solid;
  945. margin: 0 10px 0 0;
  946. padding: 0;
  947. }
  948. div.vendor_store_apply .tab-content .custom_col{
  949. width: 280px;
  950. }
  951. div.vendor_store_apply .tab-content .custom_col:first-child{
  952. margin-left: 50px;
  953. }
  954. div.vendor_store_apply .custom_col .row .col-md-5:last-child{
  955. width: 110px;
  956. }
  957. div.vendor_store_apply .custom_col .row .col-md-5:last-child span{
  958. margin-top: 85% !important;
  959. padding-bottom: 0 !important;
  960. }
  961. .hoverShow{
  962. position: absolute;
  963. width: 30px;
  964. height: 30px;
  965. top: 0px;
  966. right: 0;
  967. background: rgba(0,0,0,.4);
  968. display: none;
  969. }
  970. div.vendor_store_apply .custom_col .show_image_area:hover .hoverShow{
  971. display: block;
  972. }
  973. div.vendor_store_apply .custom_col .show_image_area .deleteImg{
  974. position: absolute;
  975. right: 7px;
  976. top: 0;
  977. display: inline-block;
  978. padding: 0;
  979. margin-top: 6px;
  980. font-size: 18px;
  981. color: #fff;
  982. }
  983. .hover-show a{
  984. color: #fff;
  985. text-decoration: none;
  986. }
  987. .hover-show a:hover, .hover-show a:active, .hover-show a:focus{
  988. color: #fff;
  989. text-decoration: none;
  990. }
  991. /* .dropdown-menu>.active>a, .dropdown-menu>.active>a:focus, .dropdown-menu>.active>a:hover {
  992. color: #fff;
  993. }*/
  994. .dropdown-menu {
  995. display: block;
  996. left: 14px;
  997. }
  998. /*
  999. radio
  1000. */
  1001. .radioLabel {
  1002. line-height: 20px;
  1003. cursor: pointer;
  1004. }
  1005. .radioLabel label{
  1006. width: 16px;
  1007. height: 16px;
  1008. background: url("/images/messageBoard/radio.png");
  1009. background-position: 0 -1px;
  1010. vertical-align: middle;
  1011. margin-bottom: 0 !important;
  1012. margin-right: 0 !important;
  1013. cursor: pointer;
  1014. }
  1015. .radioLabel input[type="radio"]:checked + label {
  1016. background-position: -19px -1px;
  1017. }
  1018. .radioLabel input[type="radio"] + label + span {
  1019. margin-left: 5px;
  1020. }
  1021. .radioLabel input[type="radio"]:checked + label{
  1022. color: #5078cb;
  1023. }
  1024. .radioLabel input[type="radio"]{
  1025. display: none;
  1026. }
  1027. .radioLabel span {
  1028. font-weight: bold;
  1029. font-size: 18px;
  1030. color: #5e5e5e;
  1031. }
  1032. .radioCheck {
  1033. padding-top: 35px;
  1034. padding-left: 30px;
  1035. padding-bottom: 35px;
  1036. }
  1037. .radioCheck .radioLabel:first-child {
  1038. margin-right: 10px;
  1039. }
  1040. .btn-area {
  1041. margin-top: 20px;
  1042. text-align: center;
  1043. }
  1044. .btn-area span {
  1045. height: 35px;
  1046. line-height: 35px;
  1047. border: 1px solid #5078cb;
  1048. padding: 0 62px;
  1049. font-size: 16px;
  1050. display: inline-block;
  1051. color: #5078cb;
  1052. cursor: pointer;
  1053. background: #fff;
  1054. }
  1055. .btn-area span:first-child{
  1056. margin-right: 16px;
  1057. }
  1058. .btn-area span:last-child{
  1059. background: #5078cb;
  1060. color: #fff;
  1061. }
  1062. /* .btn-area span:hover {
  1063. }*/
  1064. .loading {
  1065. position: fixed;
  1066. top: 0;
  1067. left: 0;
  1068. right: 0;
  1069. width: 100%;
  1070. height: 100%;
  1071. z-index: 1000;
  1072. text-align: center;
  1073. }
  1074. .loading img {
  1075. position: relative;
  1076. top: 40%;
  1077. }
  1078. .btn-area .btn-disabled {
  1079. cursor: not-allowed;
  1080. opacity: .5;
  1081. }
  1082. </style>