StepThird.vue 37 KB

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