index.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614
  1. <template>
  2. <view>
  3. <view class="text-center text-red bg-white" v-if="form.auditContent&&form.status==3">拒绝理由:{{form.auditContent}}
  4. </view>
  5. <view class="">
  6. <view class=" padding">
  7. <view class=" padding bg">
  8. <u-form :model="form" ref="uForm" label-position="top" :label-style='lableStyle'>
  9. <u-form-item label="企业名称" :border-bottom='false'>
  10. <u-input placeholder="请输入企业名称" v-model="form.companyName" inputAlign="text-align:left" />
  11. </u-form-item>
  12. <view class="margin-bottom" style="width: 100%;height: 1rpx;background: #F2F2F2;"></view>
  13. <u-form-item label="公司规模" :border-bottom='false'>
  14. <u-input placeholder="请输入公司规模" disabled @click="Comshow = true" v-model="form.companyPeople"
  15. inputAlign="text-align:left" />
  16. </u-form-item>
  17. <view class="margin-bottom" style="width: 100%;height: 1rpx;background: #F2F2F2;"></view>
  18. <u-form-item label="公司所在地" :border-bottom='false'>
  19. <u-input placeholder="请选择省市区" :disabled="true" v-model="form.companyAddress1"
  20. @click="selectAddress()" inputAlign="text-align:left" />
  21. <u-input @click="selectAddress()" :disabled="true" placeholder="请选择详细地址"
  22. v-model="form.companyAddress" inputAlign="text-align:left" />
  23. </u-form-item>
  24. <view class="margin-bottom" style="width: 100%;height: 1rpx;background: #F2F2F2;"></view>
  25. <u-form-item label="公司所属行业" :border-bottom='false'>
  26. <u-input placeholder="请选择公司所属行业" v-model="form.companyScope" :disabled="true"
  27. @click="gotoHy()" inputAlign="text-align:left" />
  28. </u-form-item>
  29. <view class="margin-bottom" style="width: 100%;height: 1rpx;background: #F2F2F2;"></view>
  30. <u-form-item label="法人" :border-bottom='false'>
  31. <u-input placeholder="请输入公司法人" v-model="form.companyLegalPerson"
  32. inputAlign="text-align:left" />
  33. </u-form-item>
  34. <view class="margin-bottom" style="width: 100%;height: 1rpx;background: #F2F2F2;"></view>
  35. <u-form-item label="企业邮箱" :border-bottom='false'>
  36. <u-input placeholder="请输入企业邮箱" v-model="form.email" inputAlign="text-align:left" />
  37. </u-form-item>
  38. <view class="margin-bottom" style="width: 100%;height: 1rpx;background: #F2F2F2;"></view>
  39. <u-form-item label="注册资金(万)" :border-bottom='false'>
  40. <u-input placeholder="请输入注册资金(万)" type="number" v-model="form.companyRegisteredFund"
  41. inputAlign="text-align:left" />
  42. </u-form-item>
  43. <view class="margin-bottom" style="width: 100%;height: 1rpx;background: #F2F2F2;"></view>
  44. <u-form-item label="注册时间" :border-bottom='false'>
  45. <u-input placeholder="请输入注册时间" v-model="form.companyCreateTime" inputAlign="text-align:left"
  46. :disabled="true" @click="companyShow=true" />
  47. </u-form-item>
  48. <view class="margin-bottom" style="width: 100%;height: 1rpx;background: #F2F2F2;"></view>
  49. <u-form-item label="公司介绍" :border-bottom='false'>
  50. <u-input type="textarea" style="padding: 10rpx;" :maxlength="-1" height="350"
  51. placeholder="请输入公司介绍" v-model="form.companyDetails" :clearable="false"
  52. inputAlign="text-align:left" />
  53. </u-form-item>
  54. </u-form>
  55. </view>
  56. <view class="yyzz flex justify-center">
  57. <view class="yyzz-box">
  58. <view class="yyzz-box-title">
  59. 营业执照照片
  60. </view>
  61. <view class="yyzz-box-images flex justify-center align-center">
  62. <view class="yyzz-box-images-c flex flex-wrap align-center" @click="addImage(2)">
  63. <block v-if="!form.companyCertification">
  64. <view class="flex align-center justify-center" style="width: 100%;">
  65. <u-icon name="camera" color="#000000" size="65"></u-icon>
  66. </view>
  67. <view class="yyzz-box-images-c-t flex justify-center">
  68. 营业执照照片
  69. </view>
  70. </block>
  71. <block v-else>
  72. <image :src="form.companyCertification" style="width: 100%;height: 100%;" mode="">
  73. </image>
  74. </block>
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. <view class="yyzz flex justify-center" style="margin-bottom: 40rpx;">
  80. <view class="yyzz-box">
  81. <view class="yyzz-box-title">
  82. 企业头像照片
  83. </view>
  84. <view class="yyzz-box-images flex justify-center align-center">
  85. <view class="yyzz-box-images-c flex justify-center flex-wrap" @click="addImage(1)">
  86. <block v-if="!form.companyLogo">
  87. <view class="flex align-center justify-center" style="width: 100%;">
  88. <u-icon name="camera" color="#000000" size="65"></u-icon>
  89. </view>
  90. <view class="yyzz-box-images-c-t flex justify-center">
  91. 企业头像照片
  92. </view>
  93. </block>
  94. <block v-else>
  95. <image :src="form.companyLogo" style="width: 100%;height: 100%;" mode=""></image>
  96. </block>
  97. </view>
  98. </view>
  99. </view>
  100. </view>
  101. <u-button @click="submit" class="margin-top" :custom-style="customStyle" shape="square"
  102. :hair-line="false">提交审核
  103. </u-button>
  104. </view>
  105. </view>
  106. <u-picker v-model="companyShow" mode="time" @confirm="companyConfirm"></u-picker>
  107. <!-- 求职岗位 -->
  108. <u-select z-index="99999999" v-model="postShow" :list="postlist" @confirm="postConfirm"></u-select>
  109. <!-- 区域选择 -->
  110. <u-picker v-model="show" mode="region" @confirm="confirm"></u-picker>
  111. <!-- 招聘信息选择弹窗 -->
  112. <u-popup v-model="zhaoShow" @open="open" style="overflow-y: hidden;" width="80%" height="500rpx"
  113. :closeable="true" mode="center" border-radius="14">
  114. <view class="" style="width: 100%;height: 90%;overflow: hidden;">
  115. <view class="selectTitle">选择</view>
  116. <view class="selectbox flex justify-center">
  117. <view class="selectbox-con">
  118. <view class="flex align-center justify-between margin-bottom">
  119. <view class=" text-bold">岗位</view>
  120. <view class="text-right flex align-center ">
  121. <u-input :disabled="true" @click="getClassifyList()" placeholder="请选择岗位"
  122. v-model="postName" inputAlign="text-align:left" />
  123. <view class="margin-left-sm">
  124. <image src="../../static/images/my/right_icon.png"
  125. style="width: 12upx;height: 21upx;"></image>
  126. </view>
  127. </view>
  128. </view>
  129. </view>
  130. </view>
  131. <view class="selectbox flex justify-center">
  132. <view class="selectbox-con">
  133. <view class="flex align-center justify-between margin-bottom" @click="">
  134. <view class=" text-bold">人数</view>
  135. <view class="text-right flex align-center ">
  136. <u-input type="number" placeholder="请输入人数" v-model="peopleNum"
  137. inputAlign="text-align:left" />
  138. <view class="margin-left-sm">
  139. <image src="../../static/images/my/right_icon.png"
  140. style="width: 12upx;height: 21upx;"></image>
  141. </view>
  142. </view>
  143. </view>
  144. </view>
  145. </view>
  146. <view class="selectbox flex justify-center">
  147. <view @click="okHand" class="selectbox-con flex justify-center align-center"
  148. style="width: 80%;height: 88rpx;border-radius: 20rpx;background-color: #82A9FE;color: #ffffff;">
  149. 确定
  150. </view>
  151. </view>
  152. </view>
  153. </u-popup>
  154. <!-- 公司规模 -->
  155. <u-select v-model="Comshow" :list="comList" value-name="value" label-name="value"
  156. @confirm="comConfirm"></u-select>
  157. </view>
  158. </template>
  159. <script>
  160. import configdata from '../../common/config.js';
  161. export default {
  162. data() {
  163. return {
  164. Comshow: false,
  165. show: false,
  166. form: {
  167. companyName: '', //企业名称
  168. companyLegalPerson: '', //公司规模
  169. companyAddress1: '', //省市区
  170. companyAddress: '', //营业地址
  171. companyScope: '', //经营范围
  172. companyPeople: '', //公司法人
  173. companyRegisteredFund: '', //注册资金
  174. companyCreateTime: '', //注册时间
  175. // companyContent: [], //招聘信息
  176. companyDetails: '', //简介
  177. companyLogo: '',
  178. companyCertification: '', //营业执照
  179. email: '', //企业邮箱
  180. companyLat: '',
  181. companyLng: '',
  182. province: '', //省
  183. city: '', //市
  184. district: '', //区
  185. },
  186. lableStyle: {
  187. color: '#000000',
  188. fontSize: '30upx',
  189. fontWeight: 'bold'
  190. },
  191. customStyle: {
  192. backgroundColor: '#00B88F',
  193. color: '#FFFFFF',
  194. border: 0
  195. },
  196. postlist: [],
  197. companyShow: false,
  198. postShow: false,
  199. zhaoShow: false,
  200. peopleNum: '',
  201. postName: '',
  202. comList: [],
  203. }
  204. },
  205. onLoad() {
  206. this.getCompany()
  207. this.getComList()
  208. },
  209. onShow() {
  210. let that = this
  211. that.Qe = uni.getStorageSync("Qe")
  212. that.geRen = uni.getStorageSync("geRen")
  213. //选择的行业
  214. uni.$on('industry', (info) => {
  215. that.form.companyScope = info.industry
  216. })
  217. },
  218. methods: {
  219. //打开地图选择地址
  220. selectAddress() {
  221. let that = this
  222. uni.chooseLocation({
  223. success(res) {
  224. that.form.companyLat = res.latitude
  225. that.form.companyLng = res.longitude
  226. that.form.companyAddress = res.name
  227. let address = res.address
  228. let reg = /.+?(省|市|自治区|自治州|县|区)/g
  229. let cityarr = address.match(reg)
  230. console.log(cityarr, '222222')
  231. if (cityarr.length > 3) { //刚好是省市区
  232. that.form.province = cityarr[0]
  233. that.form.city = cityarr[1]
  234. that.form.district = cityarr[2]
  235. that.form.companyAddress1 = that.form.province + '' + that.form.city + '' + that.form
  236. .district
  237. } else { //可能是直辖市/自治区/自治州
  238. that.form.province = cityarr[0]
  239. that.form.city = cityarr[0]
  240. that.form.district = cityarr[1]
  241. that.form.companyAddress1 = that.form.province + '' + that.form
  242. .district
  243. }
  244. },
  245. fail(err) {
  246. uni.showToast({
  247. title: '打开地图失败,请重试',
  248. icon: 'none'
  249. })
  250. }
  251. })
  252. },
  253. //跳转至行业选择
  254. gotoHy() {
  255. uni.navigateTo({
  256. url: '/package/jobIntention/industry?type=2'
  257. })
  258. },
  259. //选择公司规模
  260. comConfirm(e) {
  261. this.form.companyPeople = e[0].value
  262. },
  263. //获取公司规模
  264. getComList() {
  265. this.$Request.get("/app/dict/list", {
  266. type: '公司规模 '
  267. }).then(res => {
  268. if (res.code == 0) {
  269. this.comList = res.data
  270. }
  271. })
  272. },
  273. confirm(e) {
  274. this.form.companyAddress1 = e.province.label + '' + e.city.label + '' + e.area.label
  275. },
  276. //清除招聘信息
  277. clearcompanyContent() {
  278. this.form.companyContent = []
  279. },
  280. //确认选择框
  281. okHand() {
  282. let text = this.postName + '' + this.peopleNum + '人'
  283. this.form.companyContent.push(text)
  284. this.zhaoShow = false
  285. },
  286. //重置选择框
  287. open() {
  288. this.peopleNum = ''
  289. this.postName = ''
  290. },
  291. //选择求职岗位
  292. postConfirm(e) {
  293. this.postName = e[0].label
  294. },
  295. //获取求职岗位
  296. getClassifyList() {
  297. let data = {
  298. status: 1
  299. }
  300. this.$Request.get('/app/rule/selectRuleClassifyList', data).then(res => {
  301. if (res.code == 0) {
  302. var arr = []
  303. res.data.forEach((d, index) => {
  304. var data = {}
  305. data.label = d.ruleClassifyName
  306. data.value = d.ruleClassifyId
  307. arr.push(data)
  308. })
  309. this.postlist = arr
  310. this.postShow = true
  311. }
  312. })
  313. },
  314. //获取用户企业实名数据
  315. getCompany() {
  316. this.$Request.get("/app/company/selectCompanyByUserId").then(res => {
  317. if (res.code == 0 && res.data) {
  318. // res.data.companyContent = res.data.companyContent.split(',')
  319. this.form = res.data
  320. if (this.form.province && this.form.city && this.form
  321. .district) {
  322. this.form.companyAddress1 = this.form.province + '' + this.form.city + '' + this.form
  323. .district
  324. }
  325. }
  326. })
  327. },
  328. companyConfirm(e) {
  329. this.form.companyCreateTime = e.year + '-' + e.month + '-' + e.day
  330. },
  331. submit() {
  332. if (!this.form.companyName) {
  333. uni.showToast({
  334. title: '请填写企业名称',
  335. icon: 'none',
  336. duration: 1000
  337. })
  338. return;
  339. }
  340. if (!this.form.companyPeople) {
  341. uni.showToast({
  342. title: '请选择企业规模',
  343. icon: 'none',
  344. duration: 1000
  345. })
  346. return;
  347. }
  348. if (!this.form.companyAddress1) {
  349. uni.showToast({
  350. title: '请选择省市区',
  351. icon: 'none',
  352. duration: 1000
  353. })
  354. return;
  355. }
  356. if (!this.form.companyAddress) {
  357. uni.showToast({
  358. title: '请选择详细地址',
  359. icon: 'none',
  360. duration: 1000
  361. })
  362. return;
  363. }
  364. if (!this.form.companyScope) {
  365. uni.showToast({
  366. title: '请选择公司所属行业',
  367. icon: 'none',
  368. duration: 1000
  369. })
  370. return;
  371. }
  372. if (!this.form.companyLegalPerson) {
  373. uni.showToast({
  374. title: '请输入公司法人',
  375. icon: 'none',
  376. duration: 1000
  377. })
  378. return;
  379. }
  380. if (!this.form.email) {
  381. uni.showToast({
  382. title: '请输入企业邮箱',
  383. icon: 'none',
  384. duration: 1000
  385. })
  386. return;
  387. }
  388. if (!this.form.companyRegisteredFund) {
  389. uni.showToast({
  390. title: '请输入注册资金(万)',
  391. icon: 'none',
  392. duration: 1000
  393. })
  394. return;
  395. }
  396. if (!this.form.companyCreateTime) {
  397. uni.showToast({
  398. title: '请选择注册时间',
  399. icon: 'none',
  400. duration: 1000
  401. })
  402. return;
  403. }
  404. if (!this.form.companyDetails) {
  405. uni.showToast({
  406. title: '请输入公司介绍',
  407. icon: 'none',
  408. duration: 1000
  409. })
  410. return;
  411. }
  412. if (!this.form.companyCertification) {
  413. uni.showToast({
  414. title: '请上传营业执照',
  415. icon: 'none',
  416. duration: 1000
  417. })
  418. return;
  419. }
  420. if (!this.form.companyLogo) {
  421. uni.showToast({
  422. title: '请上传企业头像 ',
  423. icon: 'none',
  424. duration: 1000
  425. })
  426. return;
  427. }
  428. // this.form.companyContent = this.form.companyContent.length!=0?(this.form.companyContent).join(','):[]
  429. let data = this.form
  430. if (this.form.companyId) {
  431. this.$Request.postJson("/app/company/updateCompany", data).then(res => {
  432. if (res.code == 0) {
  433. uni.showToast({
  434. title: '认证修改成功!',
  435. icon: 'none'
  436. })
  437. setTimeout(function() {
  438. uni.navigateBack()
  439. }, 1000)
  440. } else {
  441. uni.showToast({
  442. title: res.msg,
  443. icon: 'none'
  444. })
  445. }
  446. });
  447. } else {
  448. this.$Request.postJson("/app/company/insertCompany", this.form).then(res => {
  449. if (res.code == 0) {
  450. uni.showToast({
  451. title: '认证提交成功!',
  452. icon: 'none'
  453. })
  454. setTimeout(function() {
  455. uni.navigateBack()
  456. }, 1000)
  457. } else {
  458. uni.showToast({
  459. title: res.msg,
  460. icon: 'none'
  461. })
  462. }
  463. });
  464. }
  465. },
  466. addImage(e) {
  467. let that = this
  468. uni.chooseImage({
  469. count: 1,
  470. sourceType: ['album', 'camera'],
  471. success: res => {
  472. for (let i = 0; i < 1; i++) {
  473. this.$queue.showLoading("上传中...");
  474. uni.uploadFile({ // 上传接口
  475. // url:configdata.APIHOST1+'/alioss/upload',
  476. url: 'https://zp.xianmaxiong.com/sqx_fast/alioss/upload',
  477. filePath: res.tempFilePaths[i],
  478. name: 'file',
  479. success: (uploadFileRes) => {
  480. if (e == 1) {
  481. this.form.companyLogo = JSON.parse(uploadFileRes.data).data
  482. } else if (e == 2) {
  483. this.form.companyCertification = JSON.parse(uploadFileRes
  484. .data).data
  485. }
  486. uni.hideLoading();
  487. }
  488. });
  489. }
  490. }
  491. })
  492. },
  493. config: function(name) {
  494. var info = null;
  495. if (name) {
  496. var name2 = name.split("."); //字符分割
  497. if (name2.length > 1) {
  498. info = configdata[name2[0]][name2[1]] || null;
  499. } else {
  500. info = configdata[name] || null;
  501. }
  502. if (info == null) {
  503. let web_config = cache.get("web_config");
  504. if (web_config) {
  505. if (name2.length > 1) {
  506. info = web_config[name2[0]][name2[1]] || null;
  507. } else {
  508. info = web_config[name] || null;
  509. }
  510. }
  511. }
  512. }
  513. return info;
  514. },
  515. }
  516. }
  517. </script>
  518. <style lang="less">
  519. .yyzz {
  520. width: 100%;
  521. // height: 815rpx;
  522. margin-top: 20rpx;
  523. background-color: #FFFFFF;
  524. border-radius: 24rpx;
  525. .yyzz-box {
  526. width: calc(100% - 60rpx);
  527. height: 100%;
  528. padding-bottom: 40rpx;
  529. .yyzz-box-title {
  530. width: 100%;
  531. margin-top: 40rpx;
  532. color: #000000;
  533. font-size: 28rpx;
  534. font-weight: 800;
  535. }
  536. .yyzz-box-images {
  537. width: 100%;
  538. height: 320rpx;
  539. margin-top: 30rpx;
  540. border: 1rpx dashed #353535;
  541. }
  542. .yyzz-box-images-c {
  543. width: 100%;
  544. height: 100%;
  545. align-content: center;
  546. .yyzz-box-images-c-t {
  547. width: 100%;
  548. color: #353535;
  549. font-size: 20rpx;
  550. margin-top: 20rpx;
  551. }
  552. }
  553. }
  554. }
  555. .u-input__textarea {
  556. padding: 10rpx 10rpx !important;
  557. }
  558. .selectTitle {
  559. width: 100%;
  560. text-align: center;
  561. margin-top: 40rpx;
  562. font-weight: bold;
  563. }
  564. .selectbox {
  565. width: 100%;
  566. margin-top: 30rpx;
  567. .selectbox-con {
  568. width: 90%;
  569. }
  570. }
  571. textarea {
  572. background-color: #F7F7F7;
  573. border-radius: 10rpx;
  574. margin-top: 20rpx;
  575. }
  576. page {
  577. background-color: #F7F7F7;
  578. }
  579. .bg {
  580. background-color: #FFFFFF;
  581. border-radius: 24upx;
  582. }
  583. .u-input__input {
  584. color: balck !important;
  585. }
  586. .title_btn {
  587. height: 78upx;
  588. line-height: 78upx;
  589. /* background: #f7f7f7; */
  590. }
  591. </style>