StepThird.vue 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108
  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-show="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. if (response.data.length > 0 && response.data instanceof Array) {
  381. this.similarKeys[index] = response.data
  382. }
  383. if (response.data.length > 0 && response.data instanceof Array) {
  384. this.showSimilarKey.flag = true
  385. this.showSimilarKey.index = index
  386. }
  387. })
  388. },
  389. changedName: function (brand, index, keyIndex) {
  390. brand.name = this.similarKeys[index][keyIndex].nameCn
  391. this.showSimilarKey.flag = false
  392. this.onCheck(brand)
  393. },
  394. setKeyActive: function (e) {
  395. e.target.setAttribute('class', 'active')
  396. },
  397. setKeyDefault: function (e) {
  398. e.target.setAttribute('class', '')
  399. },
  400. submitApply: function () {
  401. if (this.loginData.isSelf) {
  402. if (!this.registerData.isValidRegister) {
  403. this.$message.error('请输入正确的注册信息')
  404. } else if (!this.checkData.checked) {
  405. this.$message.error('您还没有勾选相关条款')
  406. } else {
  407. this.registerSelf()
  408. }
  409. } else {
  410. if (!this.checkData.checked) {
  411. this.$message.error('您还没有勾选相关条款')
  412. } else {
  413. this.storeApply(this.loginData.enterprise.uu)
  414. }
  415. }
  416. },
  417. registerSelf: function () {
  418. this.showLoading = true
  419. this.$http.post('/basic/enterprise/register?filePath=' + this.registerData.url, this.registerData.enterprise)
  420. .then(response => {
  421. if (response.data.success) {
  422. this.isSelfRegisterSuccess = true
  423. this.$http.delete('basic/user/userCacheEnterprise')
  424. this.$http.get('/user/authentication/reflash')
  425. .then(() => {
  426. this.$http.get(`/user/authentication/` + response.data.data.enuu).then(() => {
  427. this.$store.dispatch('loadUserInfo')
  428. this.loginData.isSelf = false
  429. this.loginData.enterprise.uu = response.data.data.enuu
  430. this.storeApply(response.data.data.enuu)
  431. // window.location.reload()
  432. this.showLoading = false
  433. })
  434. }
  435. )
  436. } else {
  437. this.isSelfRegisterSuccess = false
  438. this.showLoading = false
  439. this.$message.error(response.data.message || '企业注册失败,请重新填写信息')
  440. }
  441. }, err => {
  442. console.log(err)
  443. this.isSelfRegisterSuccess = false
  444. this.showLoading = false
  445. this.$message.error('企业注册失败,请重新填写信息')
  446. })
  447. },
  448. storeApply: function (enuu) {
  449. this.showLoading = true
  450. let validCode = 0
  451. if (this.businessLicenseUrl === '') {
  452. this.$message.error('请上传营业执照')
  453. this.showLoading = false
  454. } else {
  455. if (this.brands[0].name === '') {
  456. validCode = 1
  457. } else if (this.brands[0].url === '') {
  458. validCode = 2
  459. }
  460. if (validCode === 0 || this.tab === 'DISTRIBUTION') {
  461. let qualifications = []
  462. qualifications.push({
  463. type: 'BUSINESS_LICENSE',
  464. resourceUrl: this.businessLicenseUrl,
  465. isPdf: this.isPdf(this.businessLicenseUrl)
  466. })
  467. if (this.taxPayerUrl !== '') {
  468. qualifications.push({
  469. type: 'TAX_PAYER',
  470. resourceUrl: this.taxPayerUrl,
  471. isPdf: this.isPdf(this.taxPayerUrl)
  472. })
  473. }
  474. if (this.taxPayerUrl !== '') {
  475. qualifications.push({
  476. type: 'TAX_REGISTRATION',
  477. resourceUrl: this.taxRegistrationUrl,
  478. isPdf: this.isPdf(this.taxRegistrationUrl)
  479. })
  480. }
  481. // console.log(qualifications)
  482. let tmpBrands = []
  483. this.brands.forEach(function (item) {
  484. if (item.name !== '' && item.url !== '') {
  485. tmpBrands.push(item)
  486. }
  487. })
  488. this.$http.post('/store-service/applications', {
  489. brands: tmpBrands,
  490. qualifications: qualifications,
  491. type: this.tab
  492. }).then(response => {
  493. this.showLoading = false
  494. if (response.data.success) {
  495. this.btnDisabled = true
  496. this.$message.success('感谢您对优软商城的支持,我们会尽快对您提交的信息进行审核,预计审核时间为3个工作日,审核结果将以站内消息及邮件形式通知您!')
  497. } else {
  498. this.btnDisabled = true
  499. this.$message.error('开通店铺异常,请前往我的店铺查看店铺开通进度')
  500. }
  501. this.$http.post('/basic/enterprise/openVendor/' + enuu)
  502. .then(() => {
  503. this.$http.get('/user/authentication/reflash')
  504. .then(() => {
  505. this.$http.get(`/user/authentication/` + enuu).then(() => {
  506. this.$store.dispatch('loadUserInfo')
  507. })
  508. })
  509. })
  510. window.setTimeout(function () {
  511. window.location.href = '/vendor#/store-apply/wait'
  512. }, 3000)
  513. }, err => {
  514. console.log(err)
  515. this.$http.post('/basic/enterprise/openVendorSetRead/' + enuu)
  516. this.$message.error('开通店铺失败')
  517. this.showLoading = false
  518. })
  519. } else {
  520. if (validCode === 1) {
  521. this.$message.error('请添加品牌信息')
  522. this.showLoading = false
  523. } else if (validCode === 2) {
  524. this.$message.error('请上传品牌图片')
  525. this.showLoading = false
  526. }
  527. }
  528. }
  529. },
  530. addBrand: function () {
  531. this.brands.push({
  532. type: 'BRAND',
  533. name: '',
  534. url: '',
  535. isPdf: false,
  536. brandUuid: ''
  537. })
  538. this.similarKeys.push([])
  539. },
  540. deleteBrand: function (index) {
  541. this.brands.splice(index, 1)
  542. this.similarKeys.splice(index, 1)
  543. },
  544. isPdf: function (url) {
  545. return url.substring(url.length - 4, url.length) === '.pdf'
  546. },
  547. reflashEnterprise: function (enuu, url) {
  548. this.$http.post('/basic/enterprise/openVendor/' + enuu)
  549. .then(() => {
  550. this.$http.get('/user/authentication/reflash')
  551. .then(() => {
  552. this.$http.get(`/user/authentication/` + enuu).then(() => {
  553. this.$store.dispatch('loadUserInfo')
  554. window.location.href = url
  555. })
  556. }
  557. )
  558. })
  559. },
  560. goProduct: function (baseUrl) {
  561. if (this.loginData.isSelf) {
  562. if (!this.registerData.isValidRegister) {
  563. this.$message.error('请输入正确的注册信息')
  564. } else if (!this.checkData.checked) {
  565. this.$message.error('您还没有勾选相关条款')
  566. } else {
  567. this.showLoading = true
  568. this.$http.post('/basic/enterprise/register?filePath=' + this.registerData.url, this.registerData.enterprise)
  569. .then(response => {
  570. if (response.data.success) {
  571. this.isSelfRegisterSuccess = true
  572. this.$http.delete('basic/user/userCacheEnterprise')
  573. this.reflashEnterprise(response.data.data.enuu, baseUrl || '/vendor#/vendor_upload')
  574. } else {
  575. this.isSelfRegisterSuccess = false
  576. this.$message.error(response.data.message || '企业注册失败,请重新填写信息')
  577. }
  578. this.showLoading = false
  579. }, err => {
  580. console.log(err)
  581. this.isSelfRegisterSuccess = false
  582. this.showLoading = false
  583. this.$message.error('企业注册失败,请重新填写信息')
  584. })
  585. }
  586. } else {
  587. if (!this.checkData.checked) {
  588. this.$message.error('您还没有勾选相关条款')
  589. } else {
  590. this.reflashEnterprise(this.loginData.enterprise.uu, baseUrl || '/vendor#/vendor_upload')
  591. }
  592. }
  593. },
  594. goBrandApply: function () {
  595. this.showBrandNameInvalid = false
  596. this.goProduct('/vendor#/brand/apply/')
  597. }
  598. }
  599. }
  600. </script>
  601. <style scoped>
  602. .com-input{
  603. width: 100%;
  604. height: 100%;
  605. text-align: center;
  606. position: absolute;
  607. bottom: 0;
  608. left: 0;
  609. opacity: 0;
  610. display: inline-block !important;
  611. }
  612. .el-upload-list--picture-card .el-upload-list__item{
  613. width: 160px;
  614. height: 120px;
  615. top: 69px;
  616. }
  617. div.vendor_store_apply {
  618. margin: 0 auto;
  619. width: 1026px;
  620. background-color: #FFFFFF;
  621. margin-bottom: 20px;
  622. margin-top: 25px;
  623. }
  624. div.vendor_store_apply .com_row {
  625. padding: 0 40px;
  626. min-height: 40px;
  627. }
  628. div.vendor_store_apply .title_row {
  629. margin-bottom: 20px;
  630. border-bottom: #e8e8e8 1px solid;
  631. }
  632. div.vendor_store_apply .custom_col {
  633. margin: 0;
  634. padding: 0;
  635. }
  636. div.vendor_store_apply .custom_col img.previewImage {
  637. max-width: 160px;
  638. max-height: 120px;
  639. cursor: pointer;
  640. /*padding: 0 30px;*/
  641. }
  642. div.vendor_store_apply .row h2 {
  643. padding: 10px 0;
  644. font-size: 16px;
  645. font-weight: 500;
  646. color: #000000;
  647. }
  648. div.vendor_store_apply .row span {
  649. display: block;
  650. padding: 10px 0;
  651. font-size: 14px;
  652. color: #000000;
  653. }
  654. div.vendor_store_apply #file_upload {
  655. width: 100px;
  656. height: 100px;
  657. border:1px solid #CDCDCD;
  658. /*background: url("static/img/vendor/images/upload.png");*/
  659. }
  660. div.vendor_store_apply #upload_qualification {
  661. width: 100px;
  662. height: 100px;
  663. opacity: 0;
  664. }
  665. div.vendor_store_apply .custom_tab {
  666. margin: 0 15px;
  667. width: 90px;
  668. text-align: center;
  669. }
  670. div.vendor_store_apply .nav li.custom_tab.active>a,
  671. div.vendor_store_apply .nav li.custom_tab.active>a:focus,
  672. div.vendor_store_apply .nav li.custom_tab.active>a:hover {
  673. border: 1px solid #5078CB;
  674. border-bottom-color: transparent;
  675. color: #5078cb;
  676. }
  677. div.vendor_store_apply .uploadify-button {
  678. display: block;
  679. }
  680. div.vendor_store_apply .custom_col .show_image_area {
  681. height: 120px;
  682. display: flex;
  683. justify-content: center;
  684. align-items: center;
  685. }
  686. .nav-tabs{
  687. height: 41px;
  688. background: none;
  689. padding: 0 40px;
  690. }
  691. .nav-tabs>li>a{
  692. border-radius: 0;
  693. color: #333;
  694. }
  695. div.vendor_store_apply .btn-primary{
  696. background: #5078cb;
  697. border-radius: 0;
  698. }
  699. div.vendor_store_apply .btn-primary:hover{
  700. background: #3f7ae3;
  701. }
  702. div.vendor_store_apply .com_row .col-md-2{
  703. width: 120px;
  704. }
  705. div.vendor_store_apply .com_row .col-md-10 span{
  706. color: #666;
  707. }
  708. /*修改的样式*/
  709. div.vendor_store_apply .custom_col .show_image_area{
  710. position: relative;
  711. overflow: hidden;
  712. }
  713. .hover-show{
  714. position: absolute;
  715. width: 100%;
  716. height: 100%;
  717. top: 120px;
  718. left: 0;
  719. background: rgba(0,0,0,.5);
  720. }
  721. div.vendor_store_apply .custom_col .show_image_area .hover-show{
  722. top: 0;
  723. }
  724. .hover-show .delete{
  725. padding: 0;
  726. width: 30px;
  727. height: 30px;
  728. float: right;
  729. text-align: center;
  730. }
  731. .hover-show .delete:hover{
  732. cursor: pointer;
  733. }
  734. .hover-show .delete i{
  735. color: #fff;
  736. font-size: 18px;
  737. }
  738. .hover-show a{
  739. display: inline-block;
  740. width: 100%;
  741. height: 60px;
  742. font-size: 14px;
  743. color: #fff;
  744. text-align: center;
  745. line-height: 60px;
  746. }
  747. .hover-show a i{
  748. margin-right: 5px;
  749. font-size: 16px;
  750. }
  751. .brand-type{
  752. line-height: 34px;
  753. font-size: 14px;
  754. margin: 20px 20px 5px 20px;
  755. }
  756. .brand-type .brand-small-img{
  757. position: relative;
  758. width: 84px;
  759. height: 84px;
  760. overflow: hidden;
  761. text-align: center;
  762. border: #e8e8e8 1px solid;
  763. }
  764. .brand-type .brand-small-img .preview img{
  765. max-width: 84px;
  766. max-height: 84px;
  767. }
  768. .brand-type em{
  769. color: #ff0000;
  770. }
  771. .brand-type .col-md-7,.brand-type .col-md-1{
  772. margin-top: 25px;
  773. }
  774. .brand-small-upload .file-text,.brand-type .brand-small-img{
  775. float: left;
  776. }
  777. .brand-small-upload .file-text{
  778. width: 120px;
  779. margin-left: 10px;
  780. line-height: 20px;
  781. margin-top: 6%;
  782. }
  783. .brand-small-upload .delete{
  784. float: right;
  785. text-align: center;
  786. line-height: 84px;
  787. }
  788. .brand-small-upload .delete i{
  789. font-size: 18px;
  790. color: #5078cb;
  791. }
  792. .brand-small-upload .delete:hover{
  793. cursor: pointer;
  794. }
  795. .brand-small-upload .delete:hover i{
  796. color: #f00;
  797. }
  798. .brand-small-upload .brand-small-img .hover-show{
  799. top: 0;
  800. }
  801. .brand-small-upload .brand-small-img .hover-show{
  802. }
  803. .brand-small-upload .brand-small-img .hover-show span i{
  804. color: #fff;
  805. }
  806. .brand-small-upload .brand-small-img .hover-show span.delete{
  807. line-height: 30px;
  808. padding: 0;
  809. }
  810. .brand-small-upload .brand-small-img .hover-show a{
  811. line-height: 30px;
  812. height: 30px;
  813. }
  814. .tab-content {
  815. border: 1px #5078CB solid;
  816. padding-bottom: 30px;
  817. }
  818. .tab-content .com_row{
  819. margin:40px 0 0;
  820. border-bottom: #ccc 1px dashed;
  821. padding-bottom: 40px !important;
  822. }
  823. .tab-content .com_row .col-md-12{
  824. color: #999;
  825. margin-top: 20px;
  826. font-size: 12px;
  827. padding-left: 50px;
  828. }
  829. .brand-small-upload .col-md-12{
  830. color: #999;
  831. font-size: 12px;
  832. padding-left: 0;
  833. }
  834. .tab-content .com_row .col-md-12 em,.brand-small-upload .col-md-12 em{
  835. color: #f00;
  836. }
  837. .add-brand{
  838. text-align: center;
  839. border-bottom: #ccc 1px dashed;
  840. margin: 0 0 20px 0;
  841. height: 34px;
  842. }
  843. .add-brand a{
  844. font-size: 14px;
  845. color: #5078cb;
  846. width: 200px;
  847. height: 15px;
  848. display: inline-block;
  849. border: #ccc 1px dashed;
  850. border-top: 0;
  851. border-bottom-left-radius: 50px;
  852. border-bottom-right-radius: 50px;
  853. margin-top: 31px;
  854. background: #fff;
  855. line-height: 15px;
  856. text-decoration: none;
  857. }
  858. .add-brand a i{
  859. margin-right: 5px;
  860. font-size: 20px;
  861. vertical-align: middle;
  862. }
  863. .add-brand a em{
  864. position: relative;
  865. top: -10px;
  866. font-weight: bold;
  867. font-style: inherit;
  868. }
  869. .add-brand a:hover em{
  870. color: #d32526;
  871. text-decoration: none;
  872. }
  873. .unpass-reason {
  874. margin: 0 40px;
  875. line-height: 34px;
  876. }
  877. /* 预览框 end */
  878. .brand-type .dropdown-menu {
  879. width: 95%;
  880. }
  881. .brand-type .dropdown-menu li {
  882. font-size: 14px;
  883. }
  884. .com-del-box{
  885. position: fixed;
  886. z-index: 1000;
  887. height: auto;
  888. opacity: 1;
  889. background-color: white;
  890. width: 310px;
  891. -webkit-box-shadow: 0 5px 15px rgba(0,0,0,.5);
  892. -moz-box-shadow: 0 5px 15px rgba(0,0,0,.5);
  893. -o-box-shadow: 0 5px 15px rgba(0,0,0,.5);
  894. box-shadow: 0 5px 15px rgba(0,0,0,.5);
  895. margin: -155px 0 0 -75px;
  896. top: 55%;
  897. left: 43%;
  898. }
  899. .com-del-box .title{
  900. height: 30px;
  901. background-color: #5078cb;
  902. text-align: right;
  903. padding-right: 15px;
  904. line-height: 30px;
  905. }
  906. .com-del-box .title a{
  907. color: white;
  908. font-size: 16px;
  909. }
  910. .com-del-box .content{
  911. width: 100%;
  912. text-align: center;
  913. margin: 0 auto;
  914. }
  915. .com-del-box .content p{
  916. line-height: 50px;
  917. font-size: 14px;
  918. padding-top: 10px;
  919. }
  920. .com-del-box .content p i{
  921. color: #5078cb;
  922. font-size: 16px;
  923. margin-right: 10px;
  924. }
  925. .com-del-box .content div{
  926. width: 100%;
  927. text-align: center;
  928. margin: 0 auto;
  929. }
  930. .com-del-box .content div a{
  931. width: 55px;
  932. height: 26px;
  933. line-height: 26px;
  934. display: inline-block;
  935. text-align: center;
  936. font-size: 14px;
  937. }
  938. .com-del-box .content div a:first-child{
  939. background: #b4b5b9;
  940. color: #333;
  941. margin-right: 10px;
  942. }
  943. .com-del-box .content div a:last-child{
  944. background: #5078cb;
  945. color: #fff;
  946. }
  947. .com-del-box .content div a:hover{
  948. background: #3f7ae3;
  949. color: #fff;
  950. }
  951. div.vendor_store_apply .custom_col .show_image_area{
  952. width: 160px;
  953. border: #dcdcdc 1px solid;
  954. margin: 0 10px 0 0;
  955. padding: 0;
  956. }
  957. div.vendor_store_apply .tab-content .custom_col{
  958. width: 280px;
  959. }
  960. div.vendor_store_apply .tab-content .custom_col:first-child{
  961. margin-left: 50px;
  962. }
  963. div.vendor_store_apply .custom_col .row .col-md-5:last-child{
  964. width: 110px;
  965. }
  966. div.vendor_store_apply .custom_col .row .col-md-5:last-child span{
  967. margin-top: 85% !important;
  968. padding-bottom: 0 !important;
  969. }
  970. .hoverShow{
  971. position: absolute;
  972. width: 30px;
  973. height: 30px;
  974. top: 0px;
  975. right: 0;
  976. background: rgba(0,0,0,.4);
  977. display: none;
  978. }
  979. div.vendor_store_apply .custom_col .show_image_area:hover .hoverShow{
  980. display: block;
  981. }
  982. div.vendor_store_apply .custom_col .show_image_area .deleteImg{
  983. position: absolute;
  984. right: 7px;
  985. top: 0;
  986. display: inline-block;
  987. padding: 0;
  988. margin-top: 6px;
  989. font-size: 18px;
  990. color: #fff;
  991. }
  992. .hover-show a{
  993. color: #fff;
  994. text-decoration: none;
  995. }
  996. .hover-show a:hover, .hover-show a:active, .hover-show a:focus{
  997. color: #fff;
  998. text-decoration: none;
  999. }
  1000. /* .dropdown-menu>.active>a, .dropdown-menu>.active>a:focus, .dropdown-menu>.active>a:hover {
  1001. color: #fff;
  1002. }*/
  1003. .dropdown-menu {
  1004. display: block;
  1005. left: 14px;
  1006. }
  1007. /*
  1008. radio
  1009. */
  1010. .radioLabel {
  1011. line-height: 20px;
  1012. cursor: pointer;
  1013. }
  1014. .radioLabel label{
  1015. width: 16px;
  1016. height: 16px;
  1017. background: url("/images/messageBoard/radio.png");
  1018. background-position: 0 -1px;
  1019. vertical-align: middle;
  1020. margin-bottom: 0 !important;
  1021. margin-right: 0 !important;
  1022. cursor: pointer;
  1023. }
  1024. .radioLabel input[type="radio"]:checked + label {
  1025. background-position: -19px -1px;
  1026. }
  1027. .radioLabel input[type="radio"] + label + span {
  1028. margin-left: 5px;
  1029. }
  1030. .radioLabel input[type="radio"]:checked + label{
  1031. color: #5078cb;
  1032. }
  1033. .radioLabel input[type="radio"]{
  1034. display: none;
  1035. }
  1036. .radioLabel span {
  1037. font-weight: bold;
  1038. font-size: 18px;
  1039. color: #5e5e5e;
  1040. }
  1041. .radioCheck {
  1042. padding-top: 35px;
  1043. padding-left: 30px;
  1044. padding-bottom: 35px;
  1045. }
  1046. .radioCheck .radioLabel:first-child {
  1047. margin-right: 10px;
  1048. }
  1049. .btn-area {
  1050. margin-top: 20px;
  1051. text-align: center;
  1052. }
  1053. .btn-area span {
  1054. height: 35px;
  1055. line-height: 35px;
  1056. border: 1px solid #5078cb;
  1057. padding: 0 62px;
  1058. font-size: 16px;
  1059. display: inline-block;
  1060. color: #5078cb;
  1061. cursor: pointer;
  1062. background: #fff;
  1063. }
  1064. .btn-area span:first-child{
  1065. margin-right: 16px;
  1066. }
  1067. .btn-area span:last-child{
  1068. background: #5078cb;
  1069. color: #fff;
  1070. }
  1071. /* .btn-area span:hover {
  1072. }*/
  1073. .loading {
  1074. position: fixed;
  1075. top: 0;
  1076. left: 0;
  1077. right: 0;
  1078. width: 100%;
  1079. height: 100%;
  1080. z-index: 1000;
  1081. text-align: center;
  1082. }
  1083. .loading img {
  1084. position: relative;
  1085. top: 40%;
  1086. }
  1087. .btn-area .btn-disabled {
  1088. cursor: not-allowed;
  1089. opacity: .5;
  1090. }
  1091. </style>