StepFirst.vue 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959
  1. <template>
  2. <!--填写注册信息-->
  3. <div class="section" @click="onHideBox">
  4. <div class="mobile-register">
  5. <!--<div class="x-form-set-header">-->
  6. <!--<h4>企业基本信息</h4>-->
  7. <!--</div>-->
  8. <div class="wrap-title"><span class="line"></span>企业基本信息</div>
  9. <div class="">
  10. <div class="row clearfix" style="margin: 0 0.25rem;line-height: 0.7rem;padding: 0.2rem 0;border-bottom: 1px solid #dcdcdc">
  11. <label class="mobile-x-required pull-left" style="margin-bottom: 0;text-align: right;width: 1.8rem">企业名称:</label>
  12. <div class="mobile-x-input-kuang pull-left" style="margin-bottom: 0">
  13. <input :class="!validName.isValidTypeName || !validName.isValidName?'form-control error-box-border':'form-control'" type="text" @input="nameTypeCheck()" @change="nameCheck(3)" :disabled="!loginData.isSelf" v-model="data.name" name="name" required="" placeholder="填写营业执照上的企业名称">
  14. <div class="mobile-x-text-help" v-show="validName.isValidTypeName && validName.isValidName && !validName.init">
  15. <i class="glyphicon glyphicon-ok x-icon-left"></i>
  16. </div>
  17. </div>
  18. </div>
  19. <div class="col-sm-5 mobile-x-text-info" v-show="!validName.isValidTypeName && !validName.init">
  20. <p>
  21. <i class="fa fa-info-circle"></i>请填写正确的企业名称,2~99个字符
  22. </p>
  23. </div>
  24. <div class="col-sm-5 mobile-x-text-info" v-show="!validName.isValidName && !validName.init">
  25. <p>
  26. <i class="fa fa-info-circle"></i>注册的企业名称已存在,请联系管理员
  27. </p>
  28. </div>
  29. </div>
  30. <div class="">
  31. <div class="row clearfix" style="margin:0 0.25rem;line-height: 0.7rem;padding: 0.2rem 0;border-bottom: 1px solid #dcdcdc">
  32. <label class="mobile-x-required pull-left" style="margin-bottom: 0;text-align: right;width: 1.8rem">营业执照号:</label>
  33. <div class="mobile-x-input-kuang pull-left" style="margin-bottom: 0">
  34. <input type="text" :class="!validLicence.isValidLicence?'form-control error-box-border':'form-control x-input'" :disabled="!loginData.isSelf" @input="validLicence.init=false" @change="licenceCheck(3)" v-model="data.licenceId" name="name" required="" placeholder="请填写营业执照上的注册号">
  35. <div class="mobile-x-text-help" v-show="validLicence.isValidLicence && !validLicence.init">
  36. <i class="glyphicon glyphicon-ok x-icon-left"></i>
  37. </div>
  38. </div>
  39. </div>
  40. <div class="col-sm-5 mobile-x-text-info" v-show="!validLicence.isValidLicence && !validLicence.init"><p><i class="fa fa-info-circle"></i>请填写营业执照上的注册号</p></div>
  41. </div>
  42. <div class="row">
  43. <div class="row clearfix" style="margin:0 0.25rem;line-height: 0.7rem;padding: 0.2rem 0;">
  44. <label class="mobile-x-required pull-left" style="margin-bottom: 0;text-align: right;width: 1.8rem">注册地址:</label>
  45. <div class="mobile-x-input-kuang pull-left" style="margin-bottom: 0">
  46. <input type="text" readonly aria-haspopup="true" aria-expanded="false" @click="onShowAddress" v-model="data.address" class="form-control" name="name" required="" placeholder="填写总部所在地详细地址" style="background-color: transparent;">
  47. <!--<span class="fa fa-map-marker mobile-fa-map-marker"></span>-->
  48. <div class="mobile-x-text-help" v-show="validAddress.isValidAddress && !validAddress.init">
  49. <i class="glyphicon glyphicon-ok x-icon-left"></i>
  50. </div>
  51. <div class="mobile-x-text-help" v-show="!validAddress.isValidAddress && validAddress.init" >
  52. <i class="glyphicon glyphicon-chevron-right x-icon-left" style="color: #999"></i>
  53. </div>
  54. </div>
  55. </div>
  56. <div class="mobile-modal mobile-fiexd-modal" v-show="showAddressBox" @click.stop="">
  57. <div @mouseenter="isInAddressBox = true"
  58. @mouseleave="isInAddressBox = false"
  59. style="display: block;"
  60. class="dropdown-menu mobile-x-union-menu" aria-labelledby="address">
  61. <div class="mobile-x-union-header clearfix">
  62. <div>省份</div>
  63. <div>城市</div>
  64. <div>县区</div>
  65. </div>
  66. <div class="mobile-x-union-list clearfix">
  67. <ul class="mobile-list-unstyled">
  68. <li v-for="province in cityData.province"
  69. :class="province == address.currentProvince ? 'active' : ''"
  70. v-text="province"
  71. @click.stop="getCity(province)"></li>
  72. </ul>
  73. <ul class="mobile-list-unstyled">
  74. <li v-for="city in cityData.city"
  75. :class="city == address.currentCity ? 'active' : ''"
  76. v-text="city"
  77. @click.stop="getDistrict(city)"></li>
  78. </ul>
  79. <ul class="mobile-list-unstyled">
  80. <li v-for="district in cityData.district"
  81. v-text="district"
  82. :class="district == address.currentDistrict ? 'active' : ''"
  83. @click.stop="chooseDistrict(district)"></li>
  84. </ul>
  85. </div>
  86. <div class="mobile-x-item-ext2">详细地址</div>
  87. <div class="mobile-x-item-ext">
  88. <div class="form-group">
  89. <div class="col-sm-12">
  90. <textarea id="street" name="street" rows="4" v-model="address.detail" @input.stop="onDetailAddressInput" class="form-control x-input" placeholder="xx路xx大厦xx栋xx楼xx室"></textarea>
  91. </div>
  92. </div>
  93. <div class="text-right">
  94. <a class="register-btn btn-submit" @click.stop="submitAddress">确定</a> <a @click="showAddressBox = false" class="register-btn btn-console">取消</a>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. <div class="col-sm-5" v-show="!validAddress.isValidAddress && !validAddress.init"><p><i class="fa fa-info-circle"></i>填写总部所在地详细地址</p></div>
  100. </div>
  101. </div>
  102. <div class="row next-btn"><button class="btn" style="background: rgb(63, 132, 246);width: 90%; color: #fff;border-radius: 4px" :style="loginData.isSelf && !isValid ? 'opacity: .65;':''" @click="sectionChange(2)">下一步</button></div>
  103. <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
  104. <div class="mobile-modal" v-if="showBangdingPage">
  105. <div class="BangdingPageAlert">
  106. <div class="BangdingPageAlertTitle">该企业<span>已注册优软账号</span>,如希望使用当前企业进行开店申请,请先申请<span>企业绑定</span>!</div>
  107. <div class="BangdingPageAlertBtn">
  108. <span @click="resetOnkeyDown()">重新输入</span>
  109. <span @click="toBindenterprise()">立即绑定</span>
  110. <!--<nuxt-link tag="span" to="/mobile/user/bindEnterprise">立即绑定</nuxt-link>-->
  111. </div>
  112. </div>
  113. </div>
  114. </div>
  115. </template>
  116. <script>
  117. import { RemindBox } from '~components/mobile/common'
  118. export default {
  119. data () {
  120. return {
  121. showBangdingPage: false,
  122. timeoutCount: 0,
  123. collectResult: '',
  124. data: {
  125. name: '',
  126. // lawPerson: '',
  127. // url: '',
  128. licenceId: '',
  129. address: ''
  130. // linkman: '',
  131. // phone: '',
  132. // email: '',
  133. // fax: '',
  134. // website: '',
  135. // profession: '',
  136. // logoUrl: '',
  137. // tagsData: []
  138. },
  139. validName: {
  140. isValidTypeName: true,
  141. isValidName: true,
  142. init: true
  143. },
  144. // validUpload: {
  145. // isValidUpload: true,
  146. // init: true
  147. // },
  148. validLicence: {
  149. isValidLicence: true,
  150. init: true
  151. },
  152. validAddress: {
  153. isValidAddress: true,
  154. init: true
  155. },
  156. // validLawPerson: {
  157. // isValidLawPerson: true,
  158. // init: true
  159. // },
  160. // validPhone: {
  161. // isValidPhone: true,
  162. // init: true
  163. // },
  164. // validEmail: {
  165. // isValidEmail: true,
  166. // init: true
  167. // },
  168. // validFax: {
  169. // isValidFax: true,
  170. // init: true
  171. // },
  172. // validLogo: {
  173. // isValidLogo: true,
  174. // init: true
  175. // },
  176. isValid: false,
  177. // isPdf: false,
  178. showAddressBox: false,
  179. isInAddressBox: false,
  180. // showProfessionBox: false,
  181. // isInProfessionBox: false,
  182. temCityData: {},
  183. cityData: {
  184. province: [],
  185. city: [],
  186. district: []
  187. },
  188. address: {
  189. currentProvince: '',
  190. currentCity: '',
  191. currentDistrict: '',
  192. detail: ''
  193. }
  194. // tempProfession: {},
  195. // professionData: {
  196. // profession: [],
  197. // detail: [],
  198. // thirdDetail: []
  199. // },
  200. // currentProfession: {
  201. // profession: '',
  202. // detail: '',
  203. // thirdDetail: ''
  204. // },
  205. // tag: ''
  206. }
  207. },
  208. props: ['loginData', 'enterpriseData', 'businessImgUrl'],
  209. watch: {
  210. enterpriseData: function (val, oldVal) {
  211. if (val.name) { // 个人
  212. this.initData(val)
  213. this.nameCheck(3)
  214. this.nameTypeCheck()
  215. this.licenceCheck(3)
  216. this.addressCheck()
  217. // this.imgUrlCheck()
  218. // this.lawPersonCheck()
  219. // this.phoneCheck()
  220. // this.emailCheck()
  221. // this.faxCheck()
  222. this.checkFullData()
  223. this.submitRegisterData()
  224. }
  225. if (val.uu) { // 企业
  226. this.initData(val)
  227. // this.nameCheck(3)
  228. // this.nameTypeCheck()
  229. // this.licenceCheck(3)
  230. this.enAddressCheck()
  231. // this.imgUrlCheck()
  232. // this.lawPersonCheck()
  233. // this.phoneCheck()
  234. // this.emailCheck()
  235. // this.faxCheck()
  236. // this.checkFullData()
  237. this.submitRegisterData()
  238. }
  239. }
  240. // businessImgUrl: function (val, oldVal) {
  241. // this.data.url = val
  242. // this.checkFullData()
  243. // this.submitRegisterData()
  244. // }
  245. },
  246. mounted () {
  247. this.$http.get('/data/city.json').then(response => {
  248. this.temCityData = response.data
  249. for (let province in response.data) {
  250. this.cityData.province.push(province)
  251. }
  252. for (let item in this.temCityData['北京']) {
  253. this.cityData.city.push(item)
  254. }
  255. this.cityData.district = this.temCityData['北京']['北京市']
  256. this.address.currentProvince = '北京'
  257. this.address.currentCity = '北京市'
  258. this.address.currentDistrict = '东城区'
  259. })
  260. // this.$http.get('/data/profession.json').then(response => {
  261. // this.tempProfession = response.data
  262. // for (let profession in response.data) {
  263. // this.professionData.profession.push(profession)
  264. // }
  265. // })
  266. },
  267. methods: {
  268. toBindenterprise() {
  269. this.$http.get('/basic/enterprise/findByName/' + encodeURIComponent(this.data.name)).then(response => {
  270. let status
  271. if (response.data) {
  272. status = 1
  273. } else {
  274. status = 2
  275. }
  276. this.$router.push(`/mobile/user/bindEnterprise?name=${response.data.name}&businessCode=${response.data.businessCode}&showStatus=${status}`)
  277. })
  278. },
  279. resetOnkeyDown: function() {
  280. this.showBangdingPage = false
  281. this.data.name = ''
  282. },
  283. initData: function (val) {
  284. this.data.name = val.spaceName || val.enName || val.name || ''
  285. this.data.licenceId = val.businessCode || val.licenceId || val.enBussinessCode || ''
  286. this.data.address = val.address || val.enAddress || ''
  287. },
  288. sectionChange: function (type) {
  289. // this.nameCheck(3, () => {
  290. if (!this.isValid) {
  291. // this.nameCheck(3)
  292. if (!this.validName.isValidName) {
  293. this.showBangdingPage = true
  294. } else {
  295. this.timeoutCount++
  296. this.collectResult = '请填写正确的注册信息'
  297. }
  298. // this.$message.error('请填写正确的注册信息')
  299. } else {
  300. if (this.enterpriseData.uu) {
  301. this.enCheckFullData()
  302. } else {
  303. this.checkFullData()
  304. }
  305. let enterprise = this.data
  306. // enterprise.tagsData = enterprise.tagsData.toString()
  307. // if (typeof this.data.tagsData === 'string') {
  308. // this.data.tagsData = this.data.tagsData.split(',')
  309. // }
  310. let data = {}
  311. data.enterprise = enterprise
  312. data.isValidRegister = this.isValid
  313. // data.url = this.data.url
  314. enterprise.enIsRead = false
  315. // enterprise.enBussinessCodeImage = this.data.url
  316. // 个人用户,提交保存缓存企业信息
  317. if (this.loginData.isSelf) {
  318. this.$http.post('/basic/user/userCacheEnterprise', enterprise)
  319. this.$emit('isSelfCacheDataAction', enterprise)
  320. } else { // 企业用户,更新当前企业信息,主要是更新企业地址
  321. this.enterpriseData.enAddress = this.data.address
  322. this.$http.post('/basic/enterprise/' + this.enterpriseData.uu + '/updateInfo', this.enterpriseData)
  323. }
  324. this.$emit('registerAction', data)
  325. this.$emit('sectionEvent', type)
  326. // this.$emit('businessImgUrlAction', this.data.url)
  327. }
  328. // })
  329. },
  330. // upload: function (e) {
  331. // let file = e.target.files[0]
  332. // this.validUpload.init = false
  333. // if (file.size > 5 * 1024 * 1024) {
  334. // this.validUpload.isValidUpload = false
  335. // } else {
  336. // this.validUpload.isValidUpload = true
  337. // if (file.type !== 'application/pdf') {
  338. // this.isPdf = false
  339. // let param = new FormData()
  340. // param.append('file', file, file.name)
  341. // param.append('chunk', '0')
  342. // let config = {
  343. // headers: {'Content-Type': 'multipart/form-data'}
  344. // }
  345. // this.$http.post('/api/images', param, config)
  346. // .then(response => {
  347. // this.data.url = response.data[0].path
  348. // this.$emit('businessImgUrlAction', this.data.url)
  349. // }, err => {
  350. // console.log(err)
  351. // this.validUpload.isValidUpload = false
  352. // })
  353. // } else {
  354. // let param = new FormData()
  355. // param.append('file', file, file.name)
  356. // let config = {
  357. // headers: {'Content-Type': file.type}
  358. // }
  359. // this.$http.post('/file', param, config)
  360. // .then(response => {
  361. // this.isPdf = true
  362. // this.data.url = response.data[0].path
  363. // this.$emit('businessImgUrlAction', this.data.url)
  364. // }, err => {
  365. // console.log(err)
  366. // this.validUpload.isValidUpload = false
  367. // })
  368. // }
  369. // }
  370. // this.validCheck()
  371. // },
  372. // uploadLogo: function (e) {
  373. // this.validLogo.init = false
  374. // let file = e.target.files[0]
  375. // if (file.size > 100 * 1024) {
  376. // this.validLogo.isValidLogo = false
  377. // // this.$message.error('图片请勿超过100Kb')
  378. // } else {
  379. // let param = new FormData()
  380. // param.append('file', file, file.name)
  381. // let config = {
  382. // headers: {'Content-Type': file.type}
  383. // }
  384. // this.$http.post('/api/images', param, config)
  385. // .then(response => {
  386. // this.validLogo.isValidLogo = true
  387. // this.data.logoUrl = response.data[0].path
  388. // }, err => {
  389. // console.log(err)
  390. // this.$message.error('图片上传失败')
  391. // })
  392. // }
  393. // },
  394. validCheck: function () {
  395. this.isValid =
  396. // this.validUpload.isValidUpload && !this.validUpload.init &&
  397. this.validName.isValidTypeName && !this.validName.init && this.validName.isValidName &&
  398. this.validLicence.isValidLicence && !this.validLicence.init &&
  399. this.validAddress.isValidAddress && !this.validAddress.init
  400. // this.validLawPerson.isValidLawPerson && !this.validLawPerson.init &&
  401. // (this.validPhone.init || this.validPhone.isValidPhone) &&
  402. // (this.validEmail.init || this.validEmail.isValidEmail) &&
  403. // (this.validFax.init || this.validFax.isValidFax)
  404. },
  405. enValidCheck: function () {
  406. this.isValid = this.validAddress.isValidAddress && !this.validAddress.init
  407. },
  408. checkFullData: function () {
  409. this.isValid =
  410. // this.validUpload.isValidUpload &&
  411. this.validName.isValidTypeName && this.validName.isValidName &&
  412. this.validLicence.isValidLicence &&
  413. this.validAddress.isValidAddress
  414. // this.validLawPerson.isValidLawPerson
  415. },
  416. enCheckFullData: function () {
  417. this.isValid = this.validAddress.isValidAddress
  418. },
  419. // 企业名称字符验证
  420. nameTypeCheck: function () {
  421. this.validName.isValidTypeName = this.data.name !== '' && this.data.name.length >= 2 && this.data.name.length <= 99 && this.commonValid(this.data.name)
  422. this.validName.init = false
  423. },
  424. // 企业名称是否已存在验证
  425. nameCheck: function (num) {
  426. if (num > 0) {
  427. this.$http.post('/basic/enterprise/register/valid/name?name=' + this.data.name)
  428. .then(response => {
  429. if (response.data.code !== 12) {
  430. this.validName.init = false
  431. this.validName.isValidName = response.data.success
  432. this.validCheck()
  433. // cb && cb()
  434. } else {
  435. this.nameCheck(num - 1)
  436. }
  437. })
  438. }
  439. },
  440. // imgUrlCheck: function () {
  441. // this.validUpload.init = false
  442. // this.validUpload.isValidUpload = this.data.url !== ''
  443. // },
  444. licenceCheck: function (num) {
  445. if ((/^[\S-]{1,255}$/).test(this.data.licenceId)) {
  446. if (num > 0) {
  447. this.$http.post('/basic/enterprise/register/valid/businessCode?businessCode=' + this.data.licenceId)
  448. .then(response => {
  449. if (response.data.code !== 12) {
  450. this.validLicence.init = false
  451. this.validLicence.isValidLicence = response.data.success && this.data.licenceId
  452. this.validCheck()
  453. } else {
  454. // this.validLicence.init = tmpInit
  455. this.licenceCheck(num - 1)
  456. }
  457. })
  458. }
  459. } else {
  460. this.validLicence.init = false
  461. this.validLicence.isValidLicence = false
  462. this.validCheck()
  463. }
  464. },
  465. // 个人地址校验
  466. addressCheck: function () {
  467. this.validAddress.init = false
  468. this.validAddress.isValidAddress = this.data.address !== ''
  469. this.validCheck()
  470. },
  471. // 企业地址校验
  472. enAddressCheck: function () {
  473. this.validAddress.init = false
  474. this.validAddress.isValidAddress = this.data.address !== ''
  475. this.enValidCheck()
  476. },
  477. // lawPersonCheck: function () {
  478. // this.validLawPerson.init = false
  479. // this.validLawPerson.isValidLawPerson = (/^\S{1,255}$/).test(this.data.lawPerson)
  480. // this.validCheck()
  481. // },
  482. // phoneCheck: function () {
  483. // this.validPhone.init = false
  484. // this.validPhone.isValidPhone = (/^[\d-]{8,}$/).test(this.data.phone) || this.data.phone === ''
  485. // this.validCheck()
  486. // },
  487. // emailCheck: function () {
  488. // this.validEmail.init = false
  489. // this.validEmail.isValidEmail = (/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/).test(this.data.email) || this.data.email === ''
  490. // this.validCheck()
  491. // },
  492. // faxCheck: function () {
  493. // this.validFax.init = false
  494. // this.validFax.isValidFax = (/^(([\0]\d{2,3}-)?(0\d{2,3})-)(\d{7,8})(-(\d{3,}))?$/).test(this.data.fax) || this.data.fax === ''
  495. // this.validCheck()
  496. // },
  497. commonValid: function (str) {
  498. return str.indexOf(' ') === -1
  499. },
  500. submitRegisterData: function () {
  501. let enterprise = this.data
  502. let data = {}
  503. data.enterprise = enterprise
  504. data.isValidRegister = this.isValid
  505. // data.url = this.data.url
  506. this.$emit('registerAction', data)
  507. },
  508. onHideBox: function () {
  509. this.onHideAddress()
  510. // this.onHideProfession()
  511. },
  512. onShowAddress: function () {
  513. if (this.showAddressBox) {
  514. this.onHideAddress()
  515. } else {
  516. this.showAddressBox = true
  517. this.isClickInputAddress = true
  518. }
  519. },
  520. onHideAddress: function () {
  521. if (!this.isInAddressBox && !this.isClickInputAddress) {
  522. this.showAddressBox = false
  523. }
  524. this.isClickInputAddress = false
  525. },
  526. // onShowProfession: function () {
  527. // if (this.showProfessionBox) {
  528. // this.onHideProfession()
  529. // } else {
  530. // this.showProfessionBox = true
  531. // this.isClickInputProfession = true
  532. // }
  533. // },
  534. // onHideProfession: function () {
  535. // if (!this.isInProfessionBox && !this.isClickInputProfession) {
  536. // this.showProfessionBox = false
  537. // }
  538. // this.isClickInputProfession = false
  539. // },
  540. getCity: function (province) {
  541. this.cityData.city = []
  542. this.address.currentCity = ''
  543. this.cityData.district = []
  544. this.address.currentDistrict = ''
  545. this.address.currentProvince = province
  546. for (let item in this.temCityData[province]) {
  547. this.cityData.city.push(item)
  548. }
  549. },
  550. getDistrict: function (city) {
  551. this.address.currentCity = city
  552. this.address.currentDistrict = ''
  553. this.cityData.district = this.temCityData[this.address.currentProvince][city]
  554. },
  555. chooseDistrict: function (district) {
  556. this.address.currentDistrict = district
  557. },
  558. submitAddress: function () {
  559. if (this.address.currentDistrict !== '' && this.address.currentCity !== '' && this.address.currentProvince !== '') {
  560. if (this.address.detail !== '') {
  561. this.data.address = this.address.currentProvince + this.address.currentCity + this.address.currentDistrict + this.address.detail
  562. this.showAddressBox = false
  563. if (this.enterpriseData.uu) {
  564. this.enAddressCheck()
  565. } else {
  566. this.addressCheck()
  567. }
  568. } else {
  569. this.timeoutCount++
  570. this.collectResult = '请输入详细地址'
  571. // this.$message.error('请输入详细地址')
  572. }
  573. } else {
  574. this.timeoutCount++
  575. this.collectResult = '请选择省、市、区'
  576. }
  577. },
  578. // getProfessionDetail: function (profession) {
  579. // this.currentProfession.profession = profession
  580. // this.currentProfession.detail = ''
  581. // this.professionData.detail = []
  582. // this.currentProfession.thirdDetail = ''
  583. // this.professionData.thirdDetail = []
  584. // let _this = this
  585. // _this.professionData.detail = []
  586. // for (let item in this.tempProfession[profession]) {
  587. // if (typeof this.tempProfession[profession][item] !== 'object') {
  588. // _this.professionData.detail.push(this.tempProfession[profession][item])
  589. // } else {
  590. // _this.professionData.detail.push(item)
  591. // }
  592. // }
  593. // },
  594. // chooseProfessionDetail: function (detail) {
  595. // this.currentProfession.detail = detail
  596. // this.currentProfession.thirdDetail = ''
  597. // this.professionData.thirdDetail = []
  598. // if (typeof this.tempProfession[this.currentProfession.profession][detail] !== 'object') {
  599. // this.data.profession = detail
  600. // this.showProfessionBox = false
  601. // } else {
  602. // this.professionData.thirdDetail = this.tempProfession[this.currentProfession.profession][detail]
  603. // }
  604. // },
  605. // chooseProfessionThirdDetail: function (thirdDetail) {
  606. // this.currentProfession.thirdDetail = thirdDetail
  607. // this.data.profession = thirdDetail
  608. // this.showProfessionBox = false
  609. // },
  610. // tagCheck: function () {
  611. // if (this.tag.length > 10) {
  612. // this.tag = this.tag.substring(0, 10)
  613. // }
  614. // },
  615. // addTags: function () {
  616. // let flag = true
  617. // let _this = this
  618. // if (!this.tag || this.tag === '') {
  619. // flag = false
  620. // } else {
  621. // this.data.tagsData.forEach(function (item) {
  622. // if (item === _this.tag) {
  623. // flag = false
  624. // }
  625. // })
  626. // }
  627. // if (flag) {
  628. // this.data.tagsData.push(this.tag)
  629. // this.tag = ''
  630. // } else {
  631. // this.tag = ''
  632. // }
  633. // },
  634. // removeTag: function (index) {
  635. // this.data.tagsData.splice(index, 1)
  636. // },
  637. onDetailAddressInput: function () {
  638. this.address.detail = this.address.detail.trim()
  639. }
  640. },
  641. components: {
  642. RemindBox
  643. }
  644. }
  645. </script>
  646. <style scoped lang="scss">
  647. .BangdingPageAlert {
  648. position: absolute;
  649. background: #fff;
  650. width: 95%;
  651. left: 0;
  652. right: 0;
  653. margin: 0 auto;
  654. height: 2.4rem;
  655. border-radius: 5px;
  656. font-size: 0.28rem;
  657. top: 50%;
  658. margin-top: -1.2rem;
  659. }
  660. .BangdingPageAlert .BangdingPageAlertTitle {
  661. margin: 0.4rem;
  662. line-height: 0.4rem
  663. }
  664. .BangdingPageAlert .BangdingPageAlertTitle span {
  665. color: #3f84f6;
  666. }
  667. .BangdingPageAlert .BangdingPageAlertBtn {
  668. border-top: 1px solid #d3d3d3;
  669. }
  670. .BangdingPageAlert .BangdingPageAlertBtn span {
  671. font-size: 0.32rem;
  672. color: #999;
  673. text-align: center;
  674. width: 50%;
  675. line-height: 0.74rem;
  676. height: 0.74rem;
  677. display: inline-block;
  678. }
  679. .BangdingPageAlert .BangdingPageAlertBtn span:nth-child(1) {
  680. border-right: 1px solid #d3d3d3;
  681. }
  682. .BangdingPageAlert .BangdingPageAlertBtn span:nth-child(2) {
  683. color: #3f84f6;
  684. }
  685. .mobile-register {
  686. border: 1px solid #d3d3d3;
  687. margin: 0.2rem 0.2rem;
  688. border-radius: 5px;
  689. background: #fff;
  690. /*padding-bottom: 0.3rem;*/
  691. }
  692. .mobile-register input[type="file"] {
  693. display: block;
  694. }
  695. .wrap-title {
  696. color: #333;
  697. font-size: 0.28rem;
  698. border-bottom: 1px solid #d3d3d3;
  699. height: 0.5rem;
  700. text-align: left;
  701. padding: 0 0 0.1rem 0.05rem;
  702. margin: 0.17rem 0.25rem 0.13rem 0.25rem;
  703. line-height: 0.5rem;
  704. .line{
  705. width: 0.05rem;
  706. background: #3f84f6;
  707. display: inline-block;
  708. vertical-align: top;
  709. margin-right: 0.08rem;
  710. height: 0.28rem;
  711. margin-top: 0.09rem;
  712. }
  713. }
  714. .mobile-x-required {
  715. font-size: 0.28rem;
  716. color: #226ce7;
  717. }
  718. .mobile-x-input-kuang {
  719. margin-bottom: 0.15rem;
  720. position: relative;
  721. input {
  722. font-size: 0.24rem;
  723. padding-right: 0rem;
  724. padding-left: 0rem;
  725. height: 0.7rem;
  726. line-height: 0.7rem;
  727. width: 4.5rem
  728. }
  729. .mobile-x-text-help {
  730. position: absolute;
  731. right: 0rem;
  732. top: 0rem;
  733. }
  734. }
  735. .mobile-x-text-info {
  736. color: red;
  737. font-size:0.24rem;
  738. }
  739. .mobile-fa-map-marker {
  740. position: absolute;
  741. top: 0.2rem;
  742. left: 0.5rem;
  743. }
  744. .mobile-fiexd-modal {
  745. .dropdown-menu{
  746. width: 100%;
  747. top: auto;
  748. bottom: 0.98rem;
  749. padding: 0;
  750. border-radius: 0;
  751. border: 0;
  752. overflow-y: auto;
  753. max-height: 8rem;
  754. padding-bottom: 0.4rem;
  755. .mobile-x-union-header {
  756. font-size: 0.24rem;
  757. border-bottom: 1px solid #d3d3d3;
  758. line-height: 0.5rem;
  759. }
  760. }
  761. }
  762. .previewImg {
  763. max-height: 200px;
  764. max-width: 200px;
  765. margin-top: 5px;
  766. }
  767. .mobile-x-union-header>div,.mobile-x-union-list ul {
  768. float: left;
  769. width: 2.5rem;
  770. border-right: 0.01rem solid #e4ecf3;
  771. }
  772. .mobile-x-union-list ul {
  773. height: 7rem;
  774. margin: 0;
  775. overflow-y: auto;
  776. border-bottom: 1px solid #d3d3d3;
  777. }
  778. .mobile-x-union-menu .mobile-x-item-ext {
  779. .col-sm-12 {
  780. margin: 0px;
  781. padding: 0 10px;
  782. }
  783. }
  784. .mobile-x-item-ext2 {
  785. padding: 10px
  786. }
  787. .mobile-x-union-list ul:last-child, .mobile-x-union-header>div:last-child {
  788. border-right-width: 0
  789. }
  790. .mobile-x-union-header>div,.mobile-x-union-list>ul>li {
  791. white-space: nowrap;
  792. padding: 2px 5px;
  793. cursor: pointer;
  794. }
  795. .mobile-x-union-list>ul>li:hover,.mobile-x-union-list>ul>li.active {
  796. background: #fee9c7;
  797. }
  798. .mobile-x-input {
  799. border-color: #ccc;
  800. border-radius: 0;
  801. box-shadow: none;
  802. }
  803. textarea.form-control {
  804. height: auto;
  805. }
  806. .text-right {
  807. text-align: right;
  808. }
  809. .register-btn {
  810. padding: 5px 10px;
  811. font-size: 12px;
  812. line-height: 1.5;
  813. }
  814. .btn-submit {
  815. background: #5078cb;
  816. color: #fff;
  817. }
  818. .btn-console {
  819. border: 1px solid #ccc;
  820. background: #fff;
  821. color: #888;
  822. margin-left: 5px;
  823. transition: all .2s ease-in-out;
  824. }
  825. .btn-console:hover {
  826. border: 1px solid #adadad;
  827. background: #e6e6e6;
  828. color: #333;
  829. }
  830. .mobile-x-text-help {
  831. color: green;
  832. }
  833. .mobile-register .row .upload-area {
  834. width: 130px;
  835. height: 130px;
  836. left: 15px;
  837. padding: 0;
  838. z-index: 100;
  839. }
  840. .error-box-border {
  841. border-color: #f4645f!important;
  842. }
  843. .x-btn-blank:hover, .x-btn-blank[disabled] {
  844. border: 1px solid #adadad;
  845. background: #e6e6e6;
  846. color: #333;
  847. }
  848. .mobile-register .row .auto-width {
  849. width: auto!important;
  850. }
  851. .select-dot input {
  852. background: url("/images/all/dot.png") no-repeat;
  853. background-position-x: 353px;
  854. background-position-y: 10px;
  855. }
  856. .mobile-register .row .logo-text {
  857. font-size: 12px;
  858. width: 180px;
  859. position: relative;
  860. top: 5px;
  861. left: 175px;
  862. text-align: center;
  863. color: #999;
  864. line-height: 20px;
  865. }
  866. .logo-img-area {
  867. width: 130px;
  868. height: 130px;
  869. }
  870. .logo-img-area .preview-logo-img {
  871. max-width: 130px;
  872. max-height: 130px;
  873. }
  874. .no-tags {
  875. float: left;
  876. padding: 2px 14px;
  877. line-height: 20px;
  878. border: #5078cb 1px solid;
  879. border-radius: 5px;
  880. font-size: 12px;
  881. margin: 0 3px;
  882. background: #5078cb;
  883. color: #fff;
  884. margin-top: 5px;
  885. }
  886. .mobile-register .row .add-tag-btn {
  887. position: absolute;
  888. right: 24px;
  889. color: #5078cb;
  890. font-size: 12px;
  891. cursor: pointer;
  892. }
  893. .mobile-register .row .tags-box {
  894. margin-top: 15px;
  895. }
  896. .mobile-register .row p {
  897. color: red;
  898. }
  899. .mobile-register .row .form-control:focus{
  900. border-color: #5078cb;
  901. box-shadow: none;
  902. }
  903. .x-input:focus, .x-input-blank:focus {
  904. border-color: #5078cb;
  905. box-shadow: none;
  906. }
  907. .mobile-register .row {
  908. margin: 0px;
  909. padding:0;
  910. }
  911. .mobile-register .row .tags-list ul{
  912. list-style: none;
  913. }
  914. .mobile-register .row .tags-list ul li {
  915. display: inline-block;
  916. padding: 2px 14px;
  917. line-height: 20px;
  918. border: #5078cb 1px solid;
  919. border-radius: 5px;
  920. font-size: 12px;
  921. color: #5078cb;
  922. margin: 0 3px;
  923. }
  924. .mobile-register .row .tags-list ul li i{
  925. font-size: 12px;
  926. color: red;
  927. position: relative;
  928. top: -3px;
  929. right: -12px;
  930. }
  931. .mobile-register .row .tags-lists {
  932. margin-top: 10px;
  933. }
  934. .mobile-register .row .tags-lists em {
  935. font-style: inherit;
  936. margin-left: 163px;
  937. font-size: 12px;
  938. color: #999;
  939. }
  940. .mobile-register .row .tags-lists span {
  941. float: left;
  942. padding: 2px 14px;
  943. line-height: 20px;
  944. border: #5078cb 1px solid;
  945. border-radius: 5px;
  946. font-size: 12px;
  947. color: #5078cb;
  948. margin: 0 3px;
  949. }
  950. .mobile-register .row .x-text-tip {
  951. color: #777;
  952. margin-top: 15px;
  953. }
  954. .mobile-register .row .x-text-tip i {
  955. margin-right: 5px;
  956. }
  957. </style>