Explorar el Código

面试时间限制:不得小于当前时间

Xiao_123 hace 1 mes
padre
commit
c2ae5076c4

+ 2 - 0
pagesA/interview/components/item.vue

@@ -25,6 +25,8 @@
 				</view>
         <view>联系电话:{{ val.person?.phone ?? '未填写' }}</view>
 				<view>面试时间:{{ timesTampChange(val.time, 'Y-M-D h:m') }}</view>
+				<view v-if="val.status === '4'">反馈内容:{{ val.evaluate }}</view>
+				<view v-if="val.status === '5' || val.status === '99'">{{ val.status === '5' ? '爽约' : '取消' }}原因:{{ val.reason }}</view>
 			</view>
 
 			<view class="sub-li-bottom ss-m-t-20">

+ 1 - 1
pagesA/interview/index.vue

@@ -149,7 +149,7 @@ const loadingMore = () => {
 	height: 0 !important;
 }
 :deep(.segmented-control) {
-	overflow: auto;
+	overflow: auto !important;
 }
 :deep(.segmented-control__item) {
 	white-space: nowrap !important;

+ 31 - 1
pagesB/InviteInterview/index.vue

@@ -2,7 +2,14 @@
 	<view style="padding: 30rpx;">
 		<uni-forms ref="formRef" :modelValue="formData" :rules="formRules" validateTrigger="bind" label-width="80px" label-align="right" label-position="left">
 			<uni-forms-item name="time" label="面试时间" required>
-				<uni-datetime-picker v-model="formData.time" type="datetime" :border="true" returnType="timestamp" :hide-second="true" />
+				<uni-datetime-picker
+					v-model="formData.time"
+					type="datetime"
+					:border="true"
+					returnType="timestamp"
+					:hide-second="true"
+					@change="handleDate"
+				 />
 			</uni-forms-item>
 			<uni-forms-item name="jobId" label="招聘职位" required>
 				<view style="max-width: calc(100vw - 110px);">
@@ -84,6 +91,18 @@ const handleChangeJob = (e) => {
 	if (channerl.value && Object.keys(channerl.value).length > 0) formData.value.positionInfo = job
 }
 
+const handleDate = (val) => {
+	const selectedDate = new Date(val)
+  const currentDate = new Date()
+  if (selectedDate < currentDate) {
+		uni.showToast({
+			title: '面试时间不得小于当前时间',
+      icon: 'none',
+			duration: 2000
+    })
+  }
+}
+
 const channerl = ref({})
 onLoad(async (options) => {
 	// 编辑面试、重新邀约
@@ -136,6 +155,17 @@ const handleSubmit = async () => {
 	const valid = await unref(formRef).validate()
 	if (!valid) return
 
+	const selectedDate = new Date(formData.value.time)
+  const currentDate = new Date()
+  if (selectedDate < currentDate) {
+		uni.showToast({
+			title: '面试时间不得小于当前时间',
+      icon: 'none',
+			duration: 2000
+    })
+		return
+  }
+
 	uni.showLoading({ title: '提交中' })
 	try {
 		await saveInterviewInvite(formData.value)

+ 4 - 0
utils/request.js

@@ -96,6 +96,7 @@ http.interceptors.request.use(
 		if (config.custom.auth && !useUserStore.isLogin) {
 			uni.showToast({
 				title:'请先登录',
+				duration: 2000,
 				icon: 'none'
 			})
 			showAuthModal()
@@ -209,6 +210,7 @@ http.interceptors.response.use(
 					uni.showToast({
 						title: response.data.msg || '服务器开小差啦,请稍后再试~',
 						icon: 'none',
+						duration: 2000,
 						mask: true,
 					});
 				}
@@ -221,6 +223,7 @@ http.interceptors.response.use(
       uni.showToast({
 				title: response.config.custom.successMsg,
 				icon: 'none',
+				duration: 2000,
 			});
 		}
 
@@ -368,6 +371,7 @@ const handleAuthorized = () => {
   useUserStore.handleLogout(true);
   uni.showToast({
 		title:'请先登录',
+		duration: 2000,
 		icon: 'none'
 	})
 	const msg = useUserStore.isLogin ? '您的登陆已过期' : '请先登录'