StepThird.vue 35 KB

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