刘阳 7 maanden geleden
bovenliggende
commit
cf9cc38508
2 gewijzigde bestanden met toevoegingen van 227 en 103 verwijderingen
  1. 190 68
      pages/msg/interviewInvitation.vue
  2. 37 35
      pages/talentSearch/resumeDetail.vue

+ 190 - 68
pages/msg/interviewInvitation.vue

@@ -17,7 +17,8 @@
 					<view class="cell-label">面试职位</view>
 					<view class="cell-input" hover-class="cell-hover" @click="position = true">
 						<view class="m-ellipsis">
-							{{ selectedJob ? selectedJob.title + ' · ' + selectedJob.salary : '请选择职位' }}</view>
+							{{ selectedJob ? selectedJob.ruleClassifyName + ' · ' + selectedJob.salaryRange : '请选择职位' }}
+						</view>
 						<image class="cell-icon" src="/static/images/msg/down_arrow.svg" mode="aspectFit"></image>
 					</view>
 				</view>
@@ -47,7 +48,7 @@
 			<view class="card-box" style="padding: 0;">
 				<view class="note">
 					<view class="note-label note-time">面试日期</view>
-					<uni-calendar class="uni-calendar--hook" :showMonth="false" @change="change"
+					<uni-calendar class="uni-calendar--hook" :startDate="date" :showMonth="false" @change="change"
 						@monthSwitch="monthSwitch" />
 				</view>
 			</view>
@@ -82,15 +83,15 @@
 				<scroll-view class="pop-card" scroll-y>
 					<view class="pop-card-item" v-for="(item, index) in jobList" :key="index" @click="chooseJob(item)">
 						<u-radio-group v-model="popRadioValue">
-							<u-radio :name="item.id"></u-radio>
+							<u-radio :name="item.ruleClassifyId"></u-radio>
 						</u-radio-group>
-						<view>{{ item.title }}</view>
+						<view>{{ item.ruleClassifyName }}</view>
 						<view class="pop-tag">
 							{{ item.city }}
 							<u-line color="#999999" direction="col" length="20rpx" margin="10rpx"></u-line>
-							{{ item.edu }}
+							{{ item.education }}
 							<u-line color="#999999" direction="col" length="20rpx" margin="10rpx"></u-line>
-							{{ item.salary }}
+							{{ item.salaryRange }}
 						</view>
 					</view>
 				</scroll-view>
@@ -120,14 +121,11 @@
 			<view class="pop-content">
 				<view class="pop-title">选择面试方式</view>
 				<view class="pop-method">
-					<view 
-						v-for="(item,i) in methodList" 
-						:key="i" 
-						class="method-item" 
+					<view v-for="(item,i) in methodList" :key="i" class="method-item"
 						:class="methodActiveIndex == i?'active-item':''" @click="changeMethod(i,item)">{{ item }}
 					</view>
 					<view class="method-text">
-						<textarea placeholder-class="pop-placeholder-text" placeholder="粘贴会议邀请信息">
+						<textarea placeholder-class="pop-placeholder-text" v-model="onlineMsg" placeholder="粘贴会议邀请信息">
 						</textarea>
 					</view>
 				</view>
@@ -186,49 +184,7 @@
 				textareaValue: '',
 				textareaLength: 0,
 				popRadioValue: '',
-				jobList: [{
-						id: 1,
-						title: '亚马逊运营',
-						city: '深圳',
-						edu: '本科',
-						salary: '24-36k·16薪'
-					},
-					{
-						id: 2,
-						title: '跨境电商专员',
-						city: '广州',
-						edu: '大专',
-						salary: '15-25k·14薪'
-					},
-					{
-						id: 3,
-						title: '亚马逊运营',
-						city: '深圳',
-						edu: '本科',
-						salary: '24-36k·16薪'
-					},
-					{
-						id: 4,
-						title: '跨境电商专员',
-						city: '广州',
-						edu: '大专',
-						salary: '15-25k·14薪'
-					},
-					{
-						id: 5,
-						title: '亚马逊运营',
-						city: '深圳',
-						edu: '本科',
-						salary: '24-36k·16薪'
-					},
-					{
-						id: 6,
-						title: '跨境电商专员',
-						city: '广州',
-						edu: '大专',
-						salary: '15-25k·14薪'
-					}
-				],
+				jobList: {},
 				selectedJob: '',
 				selectedAddress: '',
 				person: false,
@@ -242,24 +198,70 @@
 				selected: [],
 				// 选择时间
 				isShowTime: false,
-				selectedTime:'',
+				selectedTime: '',
 				timeValue: [0, 0, 0],
-				hours: Array.from({length: 12}, (_, i) => i + 1),
-				minutes: Array.from({length: 60}, (_, i) => i),
+				hours: Array.from({
+					length: 12
+				}, (_, i) => i + 1),
+				minutes: Array.from({
+					length: 60
+				}, (_, i) => i),
 				meridiem: ['AM', 'PM'],
-				methodList:['腾讯会议','钉钉','微信视频','电话面试'],
-				methodActiveIndex:0,
-				selecteMethodText:'',
-				rules:false,
-				isCancel:true
+				methodList: ['腾讯会议', '钉钉', '微信视频', '电话面试'],
+				methodActiveIndex: 0,
+				selecteMethodText: '',
+				rules: false,
+				isCancel: true,
+				postPushId: "",
+
+				interviewDateTime: "",
+				resumesId: "",
+				companyId: "",
+				remarks: "",
+				detailedAddress: "",
+				address: "",
+				detailTime: "",
+				onlineType: "",
+				onlineMsg: "",
+				hrPhone: "",
+				interviewerId: "",
+				hrName: "",
+				signTime: "",
+				date: "",
+				time: ""
+
+
 			};
 		},
 		components: {
 			navBar
 		},
+
+		onLoad(option) {
+
+
+			if (option.postPushId) {
+				this.postPushId = option.postPushId
+			} else {
+				this.postPushId = 215
+			}
+			if (option.resumesId) {
+				this.resumesId = option.resumesId
+			}
+			if (option.interviewerId) {
+				this.interviewerId = option.interviewerId
+			}
+
+			this.PostPushDetails()
+			this.getCurrentDateTime()
+
+		},
+
 		methods: {
 			change(e) {
-				console.log('change 返回:', e)
+
+				this.interviewDateTime = e.fulldate
+				console.log('change 返回:', this.interviewDateTime)
 			},
 			monthSwitch(e) {
 				console.log('monthSwitchs 返回:', e)
@@ -267,9 +269,40 @@
 			updateLength(e) {
 				this.textareaLength = e.target.value.length
 			},
+
+			//根据传过来的Id查询对应岗位
+			PostPushDetails() {
+				uni.showLoading({
+					title: '加载中'
+				})
+				let data = {
+					postPushId: this.postPushId,
+				}
+				this.$Request.get('/app/postPush/selectPostPushDetails', data).then(res => {
+					if (res.code == 0) {
+						uni.hideLoading()
+						this.jobList = [{
+							...res.data,
+							index: 0 // 添加下标
+						}];
+						this.companyId = res.data.companyId
+						console.log(this.jobList)
+					} else {
+						uni.hideLoading()
+						uni.showModal({
+							title: '提示',
+							content: '数据不存在',
+							showCancel: false,
+							complete(ret) {
+								uni.navigateBack()
+							}
+						})
+					}
+				})
+			},
 			chooseJob(item) {
 				this.selectedJob = item;
-				this.popRadioValue = item.id;
+				this.popRadioValue = item.ruleClassifyId;
 				this.position = false;
 			},
 			// 选择地址  联系人  以及编辑联系人
@@ -284,6 +317,8 @@
 								console.log(data)
 								if (type === 'address') {
 									this.selectedAddress = data.address + data.floor
+									this.detailedAddress = data.floor
+									this.address = data.address
 								} else if (type === 'addPerson') {
 									this.personList.push(data)
 								} else if (type === 'editPerson') {
@@ -299,24 +334,111 @@
 			selectPerson(item) {
 				this.personText = item.name;
 				this.person = false;
+				this.hrPhone = item.phone
 			},
 			bindChange(e) {
+				console.log(e.detail.value)
 				this.timeValue = e.detail.value
 			},
-			changeBtn(){
+			changeBtn() {
+				console.log(this.timeValue)
 				const val = this.timeValue
 				const hour = this.hours[val[0]]
 				const minute = this.minutes[val[1]]
 				const ampm = this.meridiem[val[2]]
 				this.selectedTime = `${hour}:${minute < 10 ? '0' + minute : minute} ${ampm}`
+				console.log(ampm)
+				var hourss = hour
+				if (ampm == "PM") {
+					hourss = hour + 12;
+				}
+				var time = `${hourss}:${minute < 10 ? '0' + minute : minute}`
+				if (this.isTimeGreaterThanNow(time)) {
+					uni.showToast({
+						title: '选择的时间不能早于当前时间',
+						icon: 'none'
+					});
+					this.selectedTime = '';
+					return;
+				}
 				this.isShowTime = false;
 			},
-			changeMethod(i,val){
+
+
+
+			// 判断时间是否大于当前时间(同一天)
+			isTimeGreaterThanNow(selectedTime) {
+				const now = new Date();
+				//const today = `${now.getFullYear()}-${(now.getMonth() + 1).toString().padStart(2, '0')}-${now.getDate().toString().padStart(2, '0')}`;
+
+				const timeString = `${this.interviewDateTime} ${selectedTime}`;
+				const selectedDate = new Date(timeString);
+				console.log(this.interviewDateTime)
+				console.log("选择的日期和时间:", timeString);
+				console.log("选择的日期和时间chuooooo:", selectedDate);
+				console.log("今天的chuooooo:", now);
+				return selectedDate < now;
+			},
+
+			// 获取当前日期和时间(格式:YYYY-MM-DD HH:mm:ss)
+			getCurrentDateTime() {
+				const now = new Date();
+
+				const year = now.getFullYear();
+				const month = (now.getMonth() + 1).toString().padStart(2, '0');
+				const day = now.getDate().toString().padStart(2, '0');
+				const hours = now.getHours().toString().padStart(2, '0');
+				const minutes = now.getMinutes().toString().padStart(2, '0');
+				const seconds = now.getSeconds().toString().padStart(2, '0');
+
+				this.date = `${year}-${month}-${day}`
+				this.time = `${hours}:${minutes}:${seconds}`
+				this.interviewDateTime = `${year}-${month}-${day}`
+				// dateTime: `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`,
+				// fullDate: `${year}年${month}月${day}日`,
+				// fullTime: `${hours}:${minutes}:${seconds}`
+				console.log(this.date)
+
+			},
+
+
+			changeMethod(i, val) {
 				this.methodActiveIndex = i
 				this.selecteMethodText = val
 			},
-			confirmRules(){
-				this.rules = false;
+			confirmRules() {
+				
+				var data = {
+					interviewDateTime: this.interviewDateTime+' 00:00:00',
+					postPushId: this.postPushId,
+					resumesId: this.resumesId|| 255,
+					companyId: this.companyId,
+					remarks: this.textareaValue,
+					detailedAddress: this.detailedAddress,
+					type: this.radioValue,
+					address: this.address,
+					detailTime: this.selectedTime,
+					onlineType: this.selecteMethodText,
+					onlineMsg: this.onlineMsg,
+					interviewerId: this.interviewerId || 1,
+					hrPhone: this.hrPhone,
+					hrName: this.personText,
+				}
+
+				console.log('面试邀约信息====', data);
+
+				//发哦那个面试邀约
+				this.$Request.postJson('/app/interviewRecord/saveInterview', data).then(ret => {
+					if (ret.code == 0) {
+						uni.navigateTo({
+							url: '/pages/msg/im?byUserId=' + this.userEntity
+								.userId + '&chatConversationId=' + ret.data
+								.chatConversationId + '&resumesId=' + this.resumesId + '&postPushId=' +
+								this.postPushId
+						})
+					}
+				})
+
 				setTimeout(() => {
 					this.isCancel = true;
 				}, 200);

+ 37 - 35
pages/talentSearch/resumeDetail.vue

@@ -73,7 +73,8 @@
 				</view>
 
 				<view class="job-expectation">
-					<text class="expectation-text">{{intentions[0].ruleClassifyName || '无'}},{{intentions[0].citys || '无'}}</text>
+					<text
+						class="expectation-text">{{intentions[0].ruleClassifyName || '无'}},{{intentions[0].citys || '无'}}</text>
 					<text class="salary-range">{{intentions[0].salaryRange}}元</text>
 				</view>
 			</view>
@@ -97,8 +98,8 @@
 				</view>
 
 				<view class="experience-list">
-					
-		
+
+
 
 					<view class="experience-item" v-for="(item,index) in workExpList" :key="index">
 						<view class="company-logo">
@@ -112,14 +113,16 @@
 							</view>
 							<view class="company-period-row">
 								<view class="company-name">{{item.companyName}}</view>
-								<view class="work-period">{{item.startTime.slice(0, 7)}} -{{item.endTime.slice(0, 7)}}</view>
+								<view class="work-period">{{item.startTime.slice(0, 7)}} -{{item.endTime.slice(0, 7)}}
+								</view>
 							</view>
 							<view class="job-description">
 								{{item.workContent}}...
 							</view>
 							<view class="skill-tags">
-								<view class="tag" v-for="(imt,index) in item.skills?JSON.parse(item.skills):{}">{{imt}}</view>
-							
+								<view class="tag" v-for="(imt,index) in item.skills?JSON.parse(item.skills):{}">{{imt}}
+								</view>
+
 							</view>
 						</view>
 					</view>
@@ -132,7 +135,7 @@
 					<view class="section-title">
 						<text>教育经历</text>
 					</view>
-			
+
 				</view>
 
 				<view class="education-list">
@@ -142,14 +145,15 @@
 						</view>
 						<view class="education-content">
 							<view class="school-name">{{item.school}}</view>
-							<view class="degree-info">{{item.degree}} • {{item.profession}} • {{item.startTime.slice(0, 4)}}-{{item.endTime.slice(0, 4)}}</view>
+							<view class="degree-info">{{item.degree}} • {{item.profession}} •
+								{{item.startTime.slice(0, 4)}}-{{item.endTime.slice(0, 4)}}</view>
 							<view class="education-description">
 								{{item.detail}}
 							</view>
 						</view>
 					</view>
 
-				
+
 				</view>
 			</view>
 
@@ -162,13 +166,12 @@
 				</view>
 
 				<view class="certificates-grid">
-					<view class="certificate-tag" v-for="skll in skills || {}"
-						:key="index">{{skll.skillName}}</view>
+					<view class="certificate-tag" v-for="skll in skills || {}" :key="index">{{skll.skillName}}</view>
 				</view>
 			</view>
 
 			<!-- 专业技能 -->
-	<!-- 		<view class="skills-section">
+			<!-- 		<view class="skills-section">
 				<view class="section-header">
 					<view class="section-title">
 						<text>专业技能</text>
@@ -202,6 +205,7 @@
 				intentions: "",
 				resumeList: "",
 				skills: "",
+				postPushId:"",
 				workExpList: "",
 				workExpTimes: "",
 				workExps: "",
@@ -268,8 +272,8 @@
 				this.getDetails()
 			}
 			// 获取邀请码保存到本地
-			if (option.invitation) {
-				this.$queue.setData('inviterCode', option.invitation);
+			if (option.postPushId) {
+				this.postPushId=option.postPushId
 			}
 
 
@@ -286,26 +290,24 @@
 
 			contactCandidate() {
 				//去联系
-								this.getDetail()
-								this.$Request.postJson('/app/chat/insertChatConversation', {
-									userId: this.order.userId,
-									focusedUserId: uni.getStorageSync('userId'),
-									postPushId: this.postPushId,
-									resumesId: this.resumesId,
-									// type:2,
-								}).then(ret => {
-									if (ret.code == 0) {
-										uni.navigateTo({
-											url: '/pages/msg/im?byUserId=' + this.order
-												.userId + '&chatConversationId=' + ret.data
-												.chatConversationId + '&resumesId=' + ret
-												.data
-												.resumesId + '&postPushId=' +
-												ret.data.postPushId
-										})
-									}
-								})
-							
+				this.getDetail()
+				this.$Request.postJson('/app/chat/insertChatConversation', {
+					userId: this.userEntity.userId,//会话对象的id
+					focusedUserId: uni.getStorageSync('userId'),//当前登录者Id
+					postPushId: this.postPushId,
+					resumesId: this.resumesId,
+					// type:2,
+				}).then(ret => {
+					if (ret.code == 0) {
+						uni.navigateTo({
+							url: '/pages/msg/im?byUserId=' + this.userEntity
+								.userId + '&chatConversationId=' + ret.data
+								.chatConversationId + '&resumesId=' + this.resumesId + '&postPushId=' +
+								this.postPushId
+						})
+					}
+				})
+
 			},
 			getDetail() {
 				uni.showLoading({
@@ -986,7 +988,7 @@
 					letter-spacing: -0.5px;
 					text-align: left;
 					border-radius: 8rpx;
-					background:#ebebebb5 ;
+					background: #ebebebb5;
 				}
 			}
 		}