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