特易招,招聘小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

379 lines
8.6 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
  1. <template>
  2. <!-- 实名认证 -->
  3. <view class="page">
  4. <navbar title="企业认证"
  5. leftClick
  6. @leftClick="$utils.navigateBack"/>
  7. <view class="info-tips">
  8. 完成企业认证<text
  9. @click="$refs.configPopup.open('permission_authentic_company')">
  10. 您将获得企业认证平台特权
  11. </text>
  12. </view>
  13. <view style="color: red;" v-if="status == 2">
  14. 已驳回原因{{form.remark}}
  15. </view>
  16. <view class="form">
  17. <view class="form-item">
  18. <view class="label">
  19. 职位名称
  20. </view>
  21. <input type="text" class="form-input"
  22. placeholder="请输入职位名称"
  23. v-model="form.career"/>
  24. </view>
  25. <view class="form-item">
  26. <view class="label">
  27. 企业名称
  28. </view>
  29. <input type="text" class="form-input"
  30. placeholder="请输入企业名称"
  31. v-model="form.companyName"/>
  32. </view>
  33. <view class="form-item"
  34. @click="selectAddr">
  35. <view class="label">
  36. 企业地址
  37. </view>
  38. <input type="text" class="form-input"
  39. placeholder="请输入企业地址"
  40. disabled
  41. v-model="form.companyAddress"/>
  42. </view>
  43. <view class="form-item">
  44. <view class="label">
  45. 法定代表人
  46. </view>
  47. <input type="text" class="form-input"
  48. placeholder="请输入法定代表人"
  49. v-model="form.legalPerson"/>
  50. </view>
  51. <view class="form-item">
  52. <view class="label">
  53. 社会统一新信用代码
  54. </view>
  55. <input type="text" class="form-input"
  56. placeholder="请输入社会统一新信用代码"
  57. v-model="form.socialCode"/>
  58. </view>
  59. <view class="form-item">
  60. <view class="title">
  61. 请上传工商营业执照
  62. </view>
  63. <view class="tips">
  64. 只能上传jpgpng,且不能超过1MB
  65. </view>
  66. </view>
  67. <view class="form-item">
  68. <uv-upload
  69. :fileList="fileList"
  70. :maxCount="1"
  71. width="690rpx"
  72. height="280rpx"
  73. multiple
  74. name="fileList"
  75. @afterRead="afterRead"
  76. @delete="deleteImage">
  77. <view class="upload">
  78. <image src="../static/auth/cart.png"
  79. mode="aspectFit"
  80. style="width: 390rpx;height: 280rpx;" />
  81. <view class="btn-add">
  82. 点击上传
  83. </view>
  84. </view>
  85. </uv-upload>
  86. </view>
  87. <view class="form-item">
  88. <view class="tips"
  89. style="text-align: center;padding: 20rpx 0;">
  90. (确保文字清晰可辨避免遮挡不全反光)
  91. </view>
  92. </view>
  93. <view class="form-item">
  94. <view class="title">
  95. 授权书选填
  96. </view>
  97. </view>
  98. <view class="form-item">
  99. <uv-upload
  100. :fileList="authFileList"
  101. :maxCount="1"
  102. width="280rpx"
  103. height="280rpx"
  104. multiple
  105. name="authFileList"
  106. @afterRead="afterRead"
  107. @delete="deleteImage">
  108. </uv-upload>
  109. </view>
  110. </view>
  111. <view v-if="status==0" class="uni-color-btn" @click="sumbit">
  112. 认证
  113. </view>
  114. <view v-if="status==1 && !isExpiringSoon" class="uni-uncolor-btn">
  115. 已审核通过
  116. </view>
  117. <view v-if="status==1 && isExpiringSoon" class="uni-color-btn" @click="sumbit">
  118. {{expireText}}
  119. </view>
  120. <view v-if="status==2" class="uni-redcolor-btn" @click="sumbit">
  121. 已驳回,请重新提交
  122. </view>
  123. <view class="config">
  124. <uv-checkbox-group
  125. v-model="checkboxValue"
  126. shape="circle">
  127. <view class="content">
  128. <view
  129. style="display: flex;">
  130. <uv-checkbox
  131. size="40rpx"
  132. icon-size="30rpx"
  133. activeColor="#3796F8"
  134. :name="1"
  135. ></uv-checkbox>
  136. 阅读并同意我们的<text
  137. @click="$refs.configPopup.open('service_authentic_company')">
  138. 企业认证服务协议
  139. </text>
  140. </view>
  141. </view>
  142. </uv-checkbox-group>
  143. </view>
  144. <configPopup ref="configPopup"/>
  145. </view>
  146. </template>
  147. <script>
  148. export default {
  149. data() {
  150. return {
  151. checkboxValue : [],
  152. form : {
  153. companyAddress : '',
  154. career : '',//职位
  155. },
  156. fileList: [],
  157. status : 0,
  158. authFileList : [],
  159. isExpiringSoon: false, // 是否即将过期或已过期
  160. expireText: '认证即将过期,重新认证', // 过期状态文案
  161. }
  162. },
  163. onLoad() {
  164. this.getAuthenticationCompany();
  165. },
  166. methods: {
  167. //我的服务-查询企业实名认证信息
  168. getAuthenticationCompany(){
  169. this.$api('getAuthenticationCompany', {}, res =>{
  170. if(res.code == 200 && res.result){
  171. this.form = res.result;
  172. this.status = this.form.status || 0;
  173. // 检查validTime是否即将过期或已过期
  174. if(this.form.validTime && this.status == 1) {
  175. const validTime = new Date(this.form.validTime);
  176. const currentTime = new Date();
  177. const sevenDaysLater = new Date();
  178. sevenDaysLater.setDate(currentTime.getDate() + 7);
  179. // 如果已过期或7天内过期,允许重新认证
  180. if(validTime <= sevenDaysLater) {
  181. this.isExpiringSoon = true;
  182. // 设置过期状态文案
  183. if(validTime <= currentTime) {
  184. this.expireText = '认证已过期,重新认证';
  185. } else {
  186. this.expireText = '认证即将过期,重新认证';
  187. }
  188. }
  189. }
  190. this.fileList = this.form.businessLicense ? this.form.businessLicense
  191. .split(',').map(url => {
  192. return {
  193. url
  194. }
  195. }) : []
  196. this.authFileList = this.form.authorizationBook ? this.form.authorizationBook.split(',').map(url => {
  197. return {
  198. url
  199. }
  200. }) : []
  201. }
  202. })
  203. },
  204. deleteImage(e){
  205. this[e.name].splice(e.index, 1)
  206. },
  207. afterRead(e){
  208. let self = this
  209. e.file.forEach(file => {
  210. self.$Oss.ossUpload(file.url).then(url => {
  211. self[e.name].push({
  212. url
  213. })
  214. })
  215. })
  216. },
  217. //提交企业认证信息 :lzx
  218. sumbit(){
  219. if(!this.checkboxValue.length){
  220. return uni.showToast({
  221. title: '请先同意企业认证服务协议',
  222. icon:'none'
  223. })
  224. }
  225. this.form.businessLicense = this.fileList.map((item) => item.url).join(",")
  226. if(this.$utils.verificationAll(this.form,{
  227. career : '请输入您的职位',
  228. companyName : '请输入企业名称',
  229. companyAddress : '请选择企业地址',
  230. legalPerson : '请输入企业法人',
  231. socialCode : '请输入社会统一信用代码',
  232. businessLicense : '工商营业执照不能为空',
  233. })) {
  234. return
  235. }
  236. // 清理不需要给后端的字段
  237. delete this.form.createBy
  238. delete this.form.createTime
  239. delete this.form.updateBy
  240. delete this.form.updateTime
  241. delete this.form.userId
  242. delete this.form.validTime
  243. this.$api('addAuthenticationCompany', this.form, res =>{
  244. if(res.code == 200){
  245. uni.showToast({
  246. title:'提交成功!等待审核',
  247. icon: 'none'
  248. })
  249. setTimeout(uni.navigateBack,1000,-1)
  250. }
  251. })
  252. },
  253. //地图上选择地址
  254. selectAddr() {
  255. uni.chooseLocation({
  256. success: (res) => {
  257. //经纬度信息
  258. this.form.latitude = res.latitude
  259. this.form.longitude = res.longitude
  260. // if (res.name) { //用户直接选择城市的逻辑
  261. if (!res.address && res.name) { //用户直接选择城市的逻辑
  262. return this.form.companyAddress = res.name
  263. }
  264. if (res.address || res.name) {
  265. return this.form.companyAddress = res.address + res.name
  266. }
  267. this.form.companyAddress = '' //用户啥都没选就点击勾选
  268. this.form.latitude = ''
  269. this.form.longitude = ''
  270. }
  271. });
  272. },
  273. }
  274. }
  275. </script>
  276. <style scoped lang="scss">
  277. .page{
  278. background-color: #fff;
  279. min-height: 100vh;
  280. padding-bottom: 100rpx;
  281. .info-tips{
  282. width: 100%;
  283. padding: 30rpx 0;
  284. background-color: #f3f3f3;
  285. text-align: center;
  286. text{
  287. color: $uni-color;
  288. }
  289. }
  290. .form {
  291. padding: 30rpx;
  292. .form-item{
  293. .label{
  294. padding: 20rpx 0;
  295. }
  296. .form-input{
  297. border: 1px solid $uni-color;
  298. background: rgba($uni-color, 0.1);
  299. padding: 10rpx 20rpx;
  300. font-size: 28rpx;
  301. }
  302. .title{
  303. font-weight: 900;
  304. margin-top: 50rpx;
  305. padding: 10rpx 0;
  306. }
  307. .tips{
  308. font-size: 26rpx;
  309. color: #777;
  310. padding-bottom: 20rpx;
  311. }
  312. }
  313. .upload{
  314. display: flex;
  315. justify-content: center;
  316. align-items: center;
  317. width: 690rpx;
  318. background-color: #f3f3f3;
  319. border-radius: 10rpx;
  320. .btn-add{
  321. margin: auto;
  322. padding: 10rpx 20rpx;
  323. background-color: $uni-color;
  324. color: #fff;
  325. border-radius: 10rpx;
  326. }
  327. }
  328. }
  329. .config{
  330. font-size: 26rpx;
  331. line-height: 40rpx;
  332. width: 100%;
  333. display: flex;
  334. justify-content: center;
  335. .content{
  336. width: 100%;
  337. display: flex;
  338. flex-direction: column;
  339. align-items: center;
  340. }
  341. text{
  342. color: $uni-color;
  343. }
  344. }
  345. }
  346. </style>