StepThird.vue 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024
  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. <p class="radioCheck">
  9. <label for="buyer01" class="radioLabel">
  10. <input type="radio" name="role" value="buyer" id="buyer01"/>
  11. <label for="buyer01" class="txtContact"></label>
  12. <span>我是买家</span>
  13. </label>
  14. <label for="buyer02" class="radioLabel">
  15. <input type="radio" name="role" value="seller" id="buyer02" checked/>
  16. <label for="buyer02" class="txtContact"></label>
  17. <span>我是卖家</span>
  18. </label>
  19. </p>
  20. <!--导入店铺模板-->
  21. <div class="container vendor_store_apply">
  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" style="border: 1px #5078CB solid; padding-bottom: 30px;">
  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>*</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;">非常抱歉,目前暂无此品牌!您可在<br/>“品牌申请”中,提出申请。</p>
  256. <p style="line-height: 20px;">前往<a @click="showBrandNameInvalid = false" target="_blank" href="/vendor#/brand/apply/" 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 next-btn" style="margin-top: 20px"><button @click="sectionChange(2)">上一步</button></div>
  265. </div>
  266. </template>
  267. <script>
  268. import Upload from '~components/common/upload/upload.vue'
  269. export default {
  270. data () {
  271. return {
  272. tab: 'ORIGINAL_FACTORY',
  273. brands: [{
  274. type: 'BRAND',
  275. name: '',
  276. url: '',
  277. isPdf: false,
  278. brandUuid: ''
  279. }],
  280. businessLicenseUrl: '',
  281. taxPayerUrl: '',
  282. taxRegistrationUrl: '',
  283. // defaultBusinessUrl: '',
  284. showBrandNameInvalid: false,
  285. similarKeys: [[]],
  286. showSimilarKey: {
  287. flag: false,
  288. index: 0
  289. },
  290. showFlag: false,
  291. isSelfRegisterSuccess: true
  292. }
  293. },
  294. props: [
  295. 'checkData',
  296. 'registerData',
  297. 'loginData',
  298. 'enterpriseData',
  299. 'businessImgUrl'
  300. ],
  301. watch: {
  302. enterpriseData: function (val, oldVal) {
  303. if (val !== {}) {
  304. this.businessLicenseUrl = val.enBussinessCodeImage || ''
  305. // this.defaultBusinessUrl = val.enBussinessCodeImage || ''
  306. }
  307. },
  308. businessImgUrl: function (val, oldVal) {
  309. this.businessLicenseUrl = val
  310. }
  311. },
  312. components: {
  313. Upload
  314. },
  315. computed: {
  316. user () {
  317. return this.$store.state.option.user
  318. }
  319. },
  320. methods: {
  321. sectionChange: function (type) {
  322. this.$emit('sectionEvent', type)
  323. },
  324. toggleTab (t) {
  325. this.tab = t
  326. this.brands = [{
  327. type: 'BRAND',
  328. name: '',
  329. url: '',
  330. isPdf: false,
  331. brandUuid: ''
  332. }]
  333. },
  334. onUpload: function (obj) {
  335. console.log(obj)
  336. if (obj.type === 'BUSINESS_LICENSE') {
  337. // this.businessLicenseUrl = obj.url
  338. this.businessLicenseUrl = obj.url
  339. if (obj.url !== '') {
  340. this.$emit('businessImgUrlAction', this.businessLicenseUrl)
  341. }
  342. } else if (obj.type === 'TAX_PAYER') {
  343. this.taxPayerUrl = obj.url
  344. } else if (obj.type === 'TAX_REGISTRATION') {
  345. this.taxRegistrationUrl = obj.url
  346. } else if (typeof obj.type === 'number') {
  347. this.brands[obj.type].url = obj.url
  348. }
  349. },
  350. onBrandChanged: function (item, index) {
  351. this.showSimilarKey.flag = this.showFlag
  352. if (!this.showFlag) {
  353. this.onCheck(item)
  354. }
  355. },
  356. onCheck: function (item, index) {
  357. if (item.name && item.name !== '') {
  358. this.$http.get('/api/product/brand', {params: {name: item.name, op: 'by_name'}})
  359. .then(response => {
  360. item.brandUuid = response.data.uuid
  361. item.isPdf = item.url.substring(item.url.length - 4, item.url.length) === '.pdf'
  362. }, err => {
  363. console.log(err)
  364. this.showBrandNameInvalid = true
  365. })
  366. }
  367. },
  368. onBrandInput: function (brand, index) {
  369. this.showSimilarKey.flag = false
  370. this.$http.get('/search/similarBrands?keyword=' + brand.name)
  371. .then(response => {
  372. this.similarKeys[index] = response.data
  373. if (response.data.length > 0) {
  374. this.showSimilarKey.flag = true
  375. this.showSimilarKey.index = index
  376. }
  377. })
  378. },
  379. changedName: function (brand, index, keyIndex) {
  380. brand.name = this.similarKeys[index][keyIndex].nameCn
  381. this.showSimilarKey.flag = false
  382. this.onCheck(brand)
  383. },
  384. setKeyActive: function (e) {
  385. e.target.setAttribute('class', 'active')
  386. },
  387. setKeyDefault: function (e) {
  388. e.target.setAttribute('class', '')
  389. },
  390. submitApply: function () {
  391. if (this.loginData.isSelf) {
  392. if (!this.registerData.isValidRegister) {
  393. this.$message.error('请输入正确的注册信息')
  394. } else if (!this.checkData.checked) {
  395. this.$message.error('您还没有勾选相关条款')
  396. } else {
  397. this.registerSelf()
  398. }
  399. } else {
  400. if (!this.checkData.checked) {
  401. this.$message.error('您还没有勾选相关条款')
  402. } else {
  403. this.storeApply()
  404. }
  405. }
  406. },
  407. registerSelf: function () {
  408. this.$http.post('/basic/enterprise/register?filePath=' + this.registerData.url, this.registerData.enterprise)
  409. .then(response => {
  410. if (response.data.success) {
  411. this.isSelfRegisterSuccess = true
  412. this.$http.delete('basic/user/userCacheEnterprise')
  413. this.$http.get('/user/authentication/reflash')
  414. .then(() => {
  415. this.$http.get(`/user/authentication/` + response.data.data.enuu).then(() => {
  416. this.$store.dispatch('loadUserInfo')
  417. this.loginData.isSelf = false
  418. this.storeApply(response.data.data.enuu)
  419. // window.location.reload()
  420. })
  421. }
  422. )
  423. } else {
  424. this.isSelfRegisterSuccess = false
  425. this.$message.error('个人注册失败,请重新填写信息')
  426. }
  427. }, err => {
  428. console.log(err)
  429. this.isSelfRegisterSuccess = false
  430. this.$message.error('个人注册失败,请重新填写信息')
  431. })
  432. },
  433. storeApply: function (enuu) {
  434. let validCode = 0
  435. if (this.businessLicenseUrl === '') {
  436. this.$message.error('请上传营业执照')
  437. } else {
  438. // this.brands.forEach(function (item) {
  439. // })
  440. if (this.brands[0].name === '') {
  441. validCode = 1
  442. } else if (this.brands[0].url === '') {
  443. validCode = 2
  444. }
  445. if (validCode === 0 || this.tab === 'DISTRIBUTION') {
  446. let qualifications = []
  447. qualifications.push({
  448. type: 'BUSINESS_LICENSE',
  449. resourceUrl: this.businessLicenseUrl,
  450. isPdf: this.isPdf(this.businessLicenseUrl)
  451. })
  452. if (this.taxPayerUrl !== '') {
  453. qualifications.push({
  454. type: 'TAX_PAYER',
  455. resourceUrl: this.taxPayerUrl,
  456. isPdf: this.isPdf(this.taxPayerUrl)
  457. })
  458. }
  459. if (this.taxPayerUrl !== '') {
  460. qualifications.push({
  461. type: 'TAX_REGISTRATION',
  462. resourceUrl: this.taxRegistrationUrl,
  463. isPdf: this.isPdf(this.taxRegistrationUrl)
  464. })
  465. }
  466. // console.log(qualifications)
  467. let tmpBrands = []
  468. this.brands.forEach(function (item) {
  469. if (item.name !== '' && item.url !== '') {
  470. tmpBrands.push(item)
  471. }
  472. })
  473. this.$http.post('/store-service/applications', {
  474. brands: tmpBrands,
  475. qualifications: qualifications,
  476. type: this.tab
  477. }).then(response => {
  478. if (response.data.success) {
  479. this.$message.success('感谢您对优软商城的支持,我们会尽快对您提交的信息进行审核,预计审核时间为3个工作日,审核结果将以站内消息及邮件形式通知您!')
  480. this.$http.post('/basic/enterprise/openVendor/' + enuu)
  481. .then(() => {
  482. this.$http.get('/user/authentication/reflash')
  483. .then(() => {
  484. this.$http.get(`/user/authentication/` + enuu).then(() => {
  485. this.$store.dispatch('loadUserInfo')
  486. })
  487. }
  488. )
  489. })
  490. window.setTimeout(function () {
  491. window.location.href = '/vendor#/store-apply/'
  492. }, 3000)
  493. } else {
  494. this.$http.post('/basic/enterprise/openVendorSetRead/' + enuu)
  495. this.$message.error('开通店铺失败')
  496. }
  497. }, err => {
  498. console.log(err)
  499. this.$http.post('/basic/enterprise/openVendorSetRead/' + enuu)
  500. this.$message.error('开通店铺失败')
  501. })
  502. } else {
  503. if (validCode === 1) {
  504. this.$message.error('请添加品牌信息')
  505. } else if (validCode === 2) {
  506. this.$message.error('请上传品牌图片')
  507. }
  508. }
  509. }
  510. },
  511. addBrand: function () {
  512. this.brands.push({
  513. type: 'BRAND',
  514. name: '',
  515. url: '',
  516. isPdf: false,
  517. brandUuid: ''
  518. })
  519. this.similarKeys.push([])
  520. },
  521. deleteBrand: function (index) {
  522. this.brands.splice(index, 1)
  523. this.similarKeys.splice(index, 1)
  524. },
  525. isPdf: function (url) {
  526. return url.substring(url.length - 4, url.length) === '.pdf'
  527. },
  528. reflashEnterprise: function (enuu, url) {
  529. this.$http.post('/basic/enterprise/openVendor/' + enuu)
  530. .then(() => {
  531. this.$http.get('/user/authentication/reflash')
  532. .then(() => {
  533. this.$http.get(`/user/authentication/` + enuu).then(() => {
  534. this.$store.dispatch('loadUserInfo')
  535. window.location.href = url
  536. })
  537. }
  538. )
  539. })
  540. },
  541. goProduct: function () {
  542. if (this.loginData.isSelf) {
  543. if (!this.registerData.isValidRegister) {
  544. this.$message.error('请输入正确的注册信息')
  545. } else if (!this.checkData.checked) {
  546. this.$message.error('您还没有勾选相关条款')
  547. } else {
  548. this.$http.post('/basic/enterprise/register?filePath=' + this.registerData.url, this.registerData.enterprise)
  549. .then(response => {
  550. if (response.data.success) {
  551. this.isSelfRegisterSuccess = true
  552. this.$http.delete('basic/user/userCacheEnterprise')
  553. this.reflashEnterprise(response.data.data.enuu, '/vendor#/vendor_productOn')
  554. } else {
  555. this.isSelfRegisterSuccess = false
  556. this.$message.error('个人注册失败,请重新填写信息')
  557. }
  558. }, err => {
  559. console.log(err)
  560. this.isSelfRegisterSuccess = false
  561. this.$message.error('个人注册失败,请重新填写信息')
  562. })
  563. }
  564. } else {
  565. if (!this.checkData.checked) {
  566. this.$message.error('您还没有勾选相关条款')
  567. } else {
  568. this.reflashEnterprise(this.loginData.enterprise.uu, '/vendor#/vendor_productOn')
  569. }
  570. }
  571. }
  572. }
  573. }
  574. </script>
  575. <style scoped>
  576. .com-input{
  577. width: 100%;
  578. height: 100%;
  579. text-align: center;
  580. position: absolute;
  581. bottom: 0;
  582. left: 0;
  583. opacity: 0;
  584. display: inline-block !important;
  585. }
  586. .el-upload-list--picture-card .el-upload-list__item{
  587. width: 160px;
  588. height: 120px;
  589. top: 69px;
  590. }
  591. div.vendor_store_apply {
  592. margin: 0 auto;
  593. width: 1026px;
  594. background-color: #FFFFFF;
  595. margin-bottom: 20px;
  596. margin-top: 20px;
  597. }
  598. div.vendor_store_apply .com_row {
  599. padding: 0 40px;
  600. min-height: 40px;
  601. }
  602. div.vendor_store_apply .title_row {
  603. margin-bottom: 20px;
  604. border-bottom: #e8e8e8 1px solid;
  605. }
  606. div.vendor_store_apply .custom_col {
  607. margin: 0;
  608. padding: 0;
  609. }
  610. div.vendor_store_apply .custom_col img.previewImage {
  611. max-width: 160px;
  612. max-height: 120px;
  613. cursor: pointer;
  614. /*padding: 0 30px;*/
  615. }
  616. div.vendor_store_apply .row h2 {
  617. padding: 10px 0;
  618. font-size: 16px;
  619. font-weight: 500;
  620. color: #000000;
  621. }
  622. div.vendor_store_apply .row span {
  623. display: block;
  624. padding: 10px 0;
  625. font-size: 14px;
  626. color: #000000;
  627. }
  628. div.vendor_store_apply #file_upload {
  629. width: 100px;
  630. height: 100px;
  631. border:1px solid #CDCDCD;
  632. /*background: url("static/img/vendor/images/upload.png");*/
  633. }
  634. div.vendor_store_apply #upload_qualification {
  635. width: 100px;
  636. height: 100px;
  637. opacity: 0;
  638. }
  639. div.vendor_store_apply .custom_tab {
  640. margin: 0 15px;
  641. width: 90px;
  642. text-align: center;
  643. }
  644. div.vendor_store_apply .nav li.custom_tab.active>a,
  645. div.vendor_store_apply .nav li.custom_tab.active>a:focus,
  646. div.vendor_store_apply .nav li.custom_tab.active>a:hover {
  647. border: 1px solid #5078CB;
  648. border-bottom-color: transparent;
  649. color: #5078cb;
  650. }
  651. div.vendor_store_apply .uploadify-button {
  652. display: block;
  653. }
  654. div.vendor_store_apply .custom_col .show_image_area {
  655. height: 120px;
  656. display: flex;
  657. justify-content: center;
  658. align-items: center;
  659. }
  660. .nav-tabs{
  661. height: 41px;
  662. background: none;
  663. padding: 0 40px;
  664. }
  665. .nav-tabs>li>a{
  666. border-radius: 0;
  667. color: #333;
  668. }
  669. div.vendor_store_apply .btn-primary{
  670. background: #5078cb;
  671. border-radius: 0;
  672. }
  673. div.vendor_store_apply .btn-primary:hover{
  674. background: #3f7ae3;
  675. }
  676. div.vendor_store_apply .com_row .col-md-2{
  677. width: 120px;
  678. }
  679. div.vendor_store_apply .com_row .col-md-10 span{
  680. color: #666;
  681. }
  682. /*修改的样式*/
  683. div.vendor_store_apply .custom_col .show_image_area{
  684. position: relative;
  685. overflow: hidden;
  686. }
  687. .hover-show{
  688. position: absolute;
  689. width: 100%;
  690. height: 100%;
  691. top: 120px;
  692. left: 0;
  693. background: rgba(0,0,0,.5);
  694. }
  695. div.vendor_store_apply .custom_col .show_image_area .hover-show{
  696. top: 0;
  697. }
  698. .hover-show .delete{
  699. padding: 0;
  700. width: 30px;
  701. height: 30px;
  702. float: right;
  703. text-align: center;
  704. }
  705. .hover-show .delete:hover{
  706. cursor: pointer;
  707. }
  708. .hover-show .delete i{
  709. color: #fff;
  710. font-size: 18px;
  711. }
  712. .hover-show a{
  713. display: inline-block;
  714. width: 100%;
  715. height: 60px;
  716. font-size: 14px;
  717. color: #fff;
  718. text-align: center;
  719. line-height: 60px;
  720. }
  721. .hover-show a i{
  722. margin-right: 5px;
  723. font-size: 16px;
  724. }
  725. .brand-type{
  726. line-height: 34px;
  727. font-size: 14px;
  728. margin: 20px 20px 5px 20px;
  729. }
  730. .brand-type .brand-small-img{
  731. position: relative;
  732. width: 84px;
  733. height: 84px;
  734. overflow: hidden;
  735. text-align: center;
  736. border: #e8e8e8 1px solid;
  737. }
  738. .brand-type .brand-small-img .preview img{
  739. max-width: 84px;
  740. max-height: 84px;
  741. }
  742. .brand-type em{
  743. color: #ff0000;
  744. }
  745. .brand-type .col-md-7,.brand-type .col-md-1{
  746. margin-top: 25px;
  747. }
  748. .brand-small-upload .file-text,.brand-type .brand-small-img{
  749. float: left;
  750. }
  751. .brand-small-upload .file-text{
  752. width: 120px;
  753. margin-left: 10px;
  754. line-height: 20px;
  755. margin-top: 6%;
  756. }
  757. .brand-small-upload .delete{
  758. float: right;
  759. text-align: center;
  760. line-height: 84px;
  761. }
  762. .brand-small-upload .delete i{
  763. font-size: 18px;
  764. color: #5078cb;
  765. }
  766. .brand-small-upload .delete:hover{
  767. cursor: pointer;
  768. }
  769. .brand-small-upload .delete:hover i{
  770. color: #f00;
  771. }
  772. .brand-small-upload .brand-small-img .hover-show{
  773. top: 0;
  774. }
  775. .brand-small-upload .brand-small-img .hover-show{
  776. }
  777. .brand-small-upload .brand-small-img .hover-show span i{
  778. color: #fff;
  779. }
  780. .brand-small-upload .brand-small-img .hover-show span.delete{
  781. line-height: 30px;
  782. padding: 0;
  783. }
  784. .brand-small-upload .brand-small-img .hover-show a{
  785. line-height: 30px;
  786. height: 30px;
  787. }
  788. .tab-content .com_row{
  789. margin:40px 0 0;
  790. border-bottom: #ccc 1px dashed;
  791. padding-bottom: 40px !important;
  792. }
  793. .tab-content .com_row .col-md-12{
  794. color: #999;
  795. margin-top: 20px;
  796. font-size: 12px;
  797. padding-left: 50px;
  798. }
  799. .brand-small-upload .col-md-12{
  800. color: #999;
  801. font-size: 12px;
  802. padding-left: 0;
  803. }
  804. .tab-content .com_row .col-md-12 em,.brand-small-upload .col-md-12 em{
  805. color: #f00;
  806. }
  807. .add-brand{
  808. text-align: center;
  809. border-bottom: #ccc 1px dashed;
  810. margin: 0 0 20px 0;
  811. height: 34px;
  812. }
  813. .add-brand a{
  814. font-size: 14px;
  815. color: #5078cb;
  816. width: 200px;
  817. height: 15px;
  818. display: inline-block;
  819. border: #ccc 1px dashed;
  820. border-top: 0;
  821. border-bottom-left-radius: 50px;
  822. border-bottom-right-radius: 50px;
  823. margin-top: 31px;
  824. background: #fff;
  825. line-height: 15px;
  826. text-decoration: none;
  827. }
  828. .add-brand a i{
  829. margin-right: 5px;
  830. font-size: 20px;
  831. vertical-align: middle;
  832. }
  833. .add-brand a em{
  834. position: relative;
  835. top: -10px;
  836. font-weight: bold;
  837. font-style: inherit;
  838. }
  839. .add-brand a:hover em{
  840. color: #d32526;
  841. text-decoration: none;
  842. }
  843. .unpass-reason {
  844. margin: 0 40px;
  845. line-height: 34px;
  846. }
  847. /* 预览框 end */
  848. .brand-type .dropdown-menu {
  849. width: 95%;
  850. }
  851. .brand-type .dropdown-menu li {
  852. font-size: 14px;
  853. }
  854. .com-del-box{
  855. position: fixed;
  856. z-index: 2;
  857. height: 152px;
  858. opacity: 1;
  859. background-color: white;
  860. width: 310px;
  861. -webkit-box-shadow: 0 5px 15px rgba(0,0,0,.5);
  862. box-shadow: 0 5px 15px rgba(0,0,0,.5);
  863. margin: -155px 0 0 -75px;
  864. top: 55%;
  865. left: 50%;
  866. }
  867. .com-del-box .title{
  868. height: 30px;
  869. background-color: #5078cb;
  870. text-align: right;
  871. padding-right: 15px;
  872. line-height: 30px;
  873. }
  874. .com-del-box .title a{
  875. color: white;
  876. font-size: 16px;
  877. }
  878. .com-del-box .content{
  879. width: 100%;
  880. text-align: center;
  881. margin: 0 auto;
  882. }
  883. .com-del-box .content p{
  884. line-height: 50px;
  885. font-size: 14px;
  886. padding-top: 10px;
  887. }
  888. .com-del-box .content p i{
  889. color: #5078cb;
  890. font-size: 16px;
  891. margin-right: 10px;
  892. }
  893. .com-del-box .content div{
  894. width: 100%;
  895. text-align: center;
  896. margin: 0 auto;
  897. }
  898. .com-del-box .content div a{
  899. width: 55px;
  900. height: 26px;
  901. line-height: 26px;
  902. display: inline-block;
  903. text-align: center;
  904. font-size: 14px;
  905. }
  906. .com-del-box .content div a:first-child{
  907. background: #b4b5b9;
  908. color: #333;
  909. margin-right: 10px;
  910. }
  911. .com-del-box .content div a:last-child{
  912. background: #5078cb;
  913. color: #fff;
  914. }
  915. .com-del-box .content div a:hover{
  916. background: #3f7ae3;
  917. color: #fff;
  918. }
  919. div.vendor_store_apply .custom_col .show_image_area{
  920. width: 160px;
  921. border: #dcdcdc 1px solid;
  922. margin: 0 10px 0 0;
  923. padding: 0;
  924. }
  925. div.vendor_store_apply .tab-content .custom_col{
  926. width: 280px;
  927. }
  928. div.vendor_store_apply .tab-content .custom_col:first-child{
  929. margin-left: 50px;
  930. }
  931. div.vendor_store_apply .custom_col .row .col-md-5:last-child{
  932. width: 110px;
  933. }
  934. div.vendor_store_apply .custom_col .row .col-md-5:last-child span{
  935. margin-top: 85% !important;
  936. padding-bottom: 0 !important;
  937. }
  938. .hoverShow{
  939. position: absolute;
  940. width: 30px;
  941. height: 30px;
  942. top: 0px;
  943. right: 0;
  944. background: rgba(0,0,0,.4);
  945. display: none;
  946. }
  947. div.vendor_store_apply .custom_col .show_image_area:hover .hoverShow{
  948. display: block;
  949. }
  950. div.vendor_store_apply .custom_col .show_image_area .deleteImg{
  951. position: absolute;
  952. right: 7px;
  953. top: 0;
  954. display: inline-block;
  955. padding: 0;
  956. margin-top: 6px;
  957. font-size: 18px;
  958. color: #fff;
  959. }
  960. .hover-show a{
  961. color: #fff;
  962. text-decoration: none;
  963. }
  964. .hover-show a:hover, .hover-show a:active, .hover-show a:focus{
  965. color: #fff;
  966. text-decoration: none;
  967. }
  968. /* .dropdown-menu>.active>a, .dropdown-menu>.active>a:focus, .dropdown-menu>.active>a:hover {
  969. color: #fff;
  970. }*/
  971. .dropdown-menu {
  972. display: block;
  973. left: 14px;
  974. }
  975. /*
  976. radio
  977. */
  978. p.radioLabel{
  979. margin-bottom: 10px;
  980. }
  981. .radioLabel {
  982. line-height: 20px;
  983. cursor: pointer;
  984. color: #666;
  985. }
  986. .radioLabel label{
  987. width: 16px;
  988. height: 16px;
  989. background: url("/images/messageBoard/radio.png");
  990. background-position: 0 -1px;
  991. margin-right: 2px;
  992. vertical-align: middle;
  993. margin-bottom: 0 !important;
  994. margin-right: 0 !important;
  995. }
  996. .radioLabel input[type="radio"]:checked + label {
  997. background-position: -19px -1px;
  998. }
  999. .radioLabel input[type="radio"] + label + span {
  1000. margin-left: 5px;
  1001. }
  1002. .radioLabel input[type="radio"]:checked + label + span{
  1003. color: #5078cb;
  1004. }
  1005. .radioLabel input[type="radio"]{
  1006. display: none;
  1007. }
  1008. </style>