StepThird.vue 37 KB

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