diff --git a/api/apiRoute.js b/api/apiRoute.js index 37bab48..1cdf8bd 100644 --- a/api/apiRoute.js +++ b/api/apiRoute.js @@ -532,6 +532,90 @@ export default { }) }, + //学生端-学生课程安排-列表 + xy_personCourseSchedule(data = {}) { + let url = '/xy/personCourseSchedule' + return http.get(url, data).then(res => { + return res; + }) + }, + + //学生端-学生课程安排-详情 + xy_personCourseScheduleInfo(data = {}) { + let url = '/xy/personCourseSchedule/info' + return http.get(url, data).then(res => { + return res; + }) + }, + + //学生端-学生课程安排-修改请假状态 + xy_personCourseScheduleEditStatus(data = {}) { + let url = '/xy/personCourseSchedule/editStatus' + return http.post(url, data).then(res => { + return res; + }) + }, + + //学生端-学生课程安排-获取排课日历 + xy_personCourseScheduleGetCalendar(data = {}) { + let url = '/xy/personCourseSchedule/getCalendar' + return http.get(url, data).then(res => { + return res; + }) + }, + + //学生端-学生课程安排-获取学生排课的全部场地列表 + xy_personCourseScheduleGetVenueListAll(data = {}) { + let url = '/xy/personCourseSchedule/getVenueListAll' + return http.get(url, data).then(res => { + return res; + }) + }, + + //学生端-学生课程安排-获取学生排课的全部场地列表 + xy_personCourseScheduleGetMyCoach(data = {}) { + let url = '/xy/personCourseSchedule/getMyCoach' + return http.get(url, data).then(res => { + return res; + }) + }, + + //学生端-学生课程安排-获取学生课程消耗记录列表 + xy_personCourseScheduleGetStudentCourseUsageList(data = {}) { + let url = '/xy/personCourseSchedule/getStudentCourseUsageList' + return http.get(url, data).then(res => { + return res; + }) + }, + + //学生端-获取作业列表 + xy_assignment(data = {}) { + let url = '/xy/assignment' + return http.get(url, data).then(res => { + return res; + }) + }, + //学生端-获取作业详情 + xy_assignmentsInfo(data = {}) { + let url = '/xy/assignment/info' + return http.get(url, data).then(res => { + return res; + }) + }, + + + + //学生端-提交作业 + xy_assignmentSubmitObj(data = {}) { + let url = '/xy/assignment/submitObj' + return http.get(url, data).then(res => { + return res; + }) + }, + + + + diff --git a/common/axios.js b/common/axios.js index 5766b1f..7cf0f5e 100644 --- a/common/axios.js +++ b/common/axios.js @@ -37,7 +37,7 @@ export default { title:'加载中...' }) return new Promise((cback, reject) => { - console.log(Api_url + url) + console.log('请求地址',Api_url + url) uni.request({ url: Api_url + url, data: param, @@ -55,8 +55,8 @@ export default { if (res_code == 200) { if (res_codes == 401) { uni.navigateTo({ - url: '/pages/student/login/login' - }) + url: `/pages/student/login/login?res_codes=${res_codes}` + }) }else{ cback(res.data); } @@ -70,7 +70,7 @@ export default { } else { if (res_codes == 401) { uni.navigateTo({ - url: '/pages/student/login/login' + url: `/pages/student/login/login?res_codes=${res_codes}` }) } else { console.log('400/500', url, error, res) diff --git a/components/AQ/AQTabber.vue b/components/AQ/AQTabber.vue index 87de67a..2c29176 100644 --- a/components/AQ/AQTabber.vue +++ b/components/AQ/AQTabber.vue @@ -157,9 +157,18 @@ //跳转tabBar页面 uni.setStorageSync('tabBerIndex', e.index) console.log('qqq', e.urlPath) - uni.navigateTo({ - url: e.urlPath - }) + + //关闭当前页面跳转新页面 + uni.redirectTo({ + url: e.urlPath + }) + + //关闭全部页面 + // uni.reLaunch({ + // url: e.urlPath + // }) + + console.log('qqq2,执行完了') }else{ this.show = true } diff --git a/main.js b/main.js index 8d266d4..f046e2a 100644 --- a/main.js +++ b/main.js @@ -21,6 +21,60 @@ Vue.prototype.$getimg = Api_url Vue.mixin(minxin) + +/** + * 全局封装跳转方法:this.$navigateTo({ url: 'xxx' }) + * 支持在页面栈 >= 8 层时,关闭全部页面打开页面 + */ +Vue.prototype.$navigateTo = function (options) { + // 只接受 { url: 'xxx' } 的形式作为参数 + if (typeof options !== 'object' || !options.url) { + console.error('跳转参数错误', options); + // uni.showToast({ title: '参数错误', icon: 'none' }); + return; + } + + const url = options.url; // 获取要跳转的页面路径 + const maxStackSize = 4; // 页面栈最大保留数量 + + const pages = getCurrentPages(); // 获取当前页面栈 + const currentPage = pages[pages.length - 1]; + const currentRoute = currentPage.route; + + + console.log('view-页面栈长度:',pages.length) + + // 判断当前页面栈是否已满 + if (pages.length >= maxStackSize) { + // 页面栈已满,使用 reLaunch 关闭所有页面并跳转 + uni.reLaunch({ + url, + success: () => { + // 可选:用于调试 + // console.log('已通过 reLaunch 跳转到:', url); + }, + fail: (err) => { + console.error('reLaunch 跳转失败:', err); + // uni.showToast({ title: '页面跳转失败', icon: 'none' }); + } + }); + } else { + // 页面栈未满,正常使用 navigateTo 正常跳转 + uni.navigateTo({ + url, + success: () => { + // 可选:用于调试 + // console.log('当前页面栈:', getCurrentPages().map(p => p.route)); + }, + fail: (err) => { + console.error('navigateTo 跳转失败:', err); + // uni.showToast({ title: '页面跳转失败', icon: 'none' }); + } + }); + } +}; + + const app = new Vue({ store, ...App diff --git a/pages.json b/pages.json index e4795b8..1bc726a 100644 --- a/pages.json +++ b/pages.json @@ -36,6 +36,15 @@ "navigationBarTextStyle": "white" } }, + { + "path": "pages/student/my/my_coach", + "style": { + "navigationBarTitleText": "我的教练", + "navigationStyle": "default", + "navigationBarBackgroundColor": "#29d3b4", + "navigationBarTextStyle": "white" + } + }, { "path": "pages/student/login/forgot", @@ -481,7 +490,7 @@ "navigationBarTitleText": "线索", "navigationStyle": "default", "navigationBarBackgroundColor": "#292929", - "navigationBarTextStyle": "black" + "navigationBarTextStyle": "white" } }, { diff --git a/pages/coach/class/info.vue b/pages/coach/class/info.vue index d130daf..245ff5d 100644 --- a/pages/coach/class/info.vue +++ b/pages/coach/class/info.vue @@ -322,14 +322,14 @@ //打开课程详情 openViewCourseInfo(item) { let id = item.id - uni.navigateTo({ + this.$navigateTo({ url: `/pages/coach/course/info_list?id=${id}` }) }, //打开学员详情页 openViewStudentInfo(item) { let students_id = item.student.id - uni.navigateTo({ + this.$navigateTo({ url: `/pages/coach/student/info?students_id=${students_id}` }) }, diff --git a/pages/coach/class/list.vue b/pages/coach/class/list.vue index 3da09fb..6ac9e2a 100644 --- a/pages/coach/class/list.vue +++ b/pages/coach/class/list.vue @@ -156,7 +156,7 @@ export default { //打开班级详情页 openViewClassInfo(item){ let class_id = item.id - uni.navigateTo({ + this.$navigateTo({ url: `/pages/coach/class/info?class_id=${class_id}` }) }, diff --git a/pages/coach/course/info.vue b/pages/coach/course/info.vue index 54b244e..4efe2bc 100644 --- a/pages/coach/course/info.vue +++ b/pages/coach/course/info.vue @@ -137,7 +137,7 @@ export default { //打开课时详情页 openViewCourseInfo(item){ - uni.navigateTo({ + this.$navigateTo({ url: '/pages/coach/course/info' }) }, diff --git a/pages/coach/course/info_list.vue b/pages/coach/course/info_list.vue index 43886a4..f6eef69 100644 --- a/pages/coach/course/info_list.vue +++ b/pages/coach/course/info_list.vue @@ -227,7 +227,7 @@ //打开课时详情页 openViewCourseInfo(item) { - uni.navigateTo({ + this.$navigateTo({ url: '/pages/coach/course/info' }) }, @@ -238,7 +238,7 @@ //跳转页面-作业详情 openViewWorkDetails(item) { let id = item.id - uni.navigateTo({ + this.$navigateTo({ url: `/pages/coach/student/work_details?id=${id}` }) }, diff --git a/pages/coach/course/list.vue b/pages/coach/course/list.vue index 872d074..987078e 100644 --- a/pages/coach/course/list.vue +++ b/pages/coach/course/list.vue @@ -233,7 +233,7 @@ //打开课时详情页 openViewCourseInfoList(item) { let id = item.id - uni.navigateTo({ + this.$navigateTo({ url: `/pages/coach/course/info_list?id=${id}` }) }, diff --git a/pages/coach/home/index.vue b/pages/coach/home/index.vue index 0b910eb..f81d44d 100644 --- a/pages/coach/home/index.vue +++ b/pages/coach/home/index.vue @@ -199,14 +199,14 @@ export default { //打开-发布作业页 openObjAddView(){ - uni.navigateTo({ + this.$navigateTo({ url: '/pages/coach/job/add' }) }, //打开作业列表页 openObjListView(){ - uni.navigateTo({ + this.$navigateTo({ url: '/pages/coach/job/list' }) }, @@ -214,7 +214,7 @@ export default { //跳转页面-课程详情 openViewCourseInfoList(item){ let id = item.id - uni.navigateTo({ + this.$navigateTo({ url: `/pages/coach/course/info_list?id=${id}` }) }, @@ -222,7 +222,7 @@ export default { //跳转页面-作业详情 openViewWorkDetails(item){ let id = item.id - uni.navigateTo({ + this.$navigateTo({ url: `/pages/coach/student/work_details?id=${id}` }) }, diff --git a/pages/coach/job/add.vue b/pages/coach/job/add.vue index d15ea19..52f610c 100644 --- a/pages/coach/job/add.vue +++ b/pages/coach/job/add.vue @@ -351,7 +351,8 @@ export default { }) //延迟1s setTimeout(() => { - uni.navigateTo({ + //关闭当前页跳转新页面 + uni.redirectTo({ url: '/pages/coach/home/index' }) }, 1000) diff --git a/pages/coach/job/list.vue b/pages/coach/job/list.vue index 8f31169..dc3c9b4 100644 --- a/pages/coach/job/list.vue +++ b/pages/coach/job/list.vue @@ -130,7 +130,7 @@ export default { //跳转页面-作业详情 openViewWorkDetails(item){ let id = item.id - uni.navigateTo({ + this.$navigateTo({ url: `/pages/coach/student/work_details?id=${id}` }) }, diff --git a/pages/coach/my/arrival_statistics.vue b/pages/coach/my/arrival_statistics.vue index 9c903f1..f39f1b7 100644 --- a/pages/coach/my/arrival_statistics.vue +++ b/pages/coach/my/arrival_statistics.vue @@ -156,7 +156,7 @@ export default { //打开课程详情 openViewCourseInfo(item){ let id= item.id - uni.navigateTo({ + this.$navigateTo({ url: `/pages/coach/course/info_list?id=${id}` }) }, diff --git a/pages/coach/my/due_soon.vue b/pages/coach/my/due_soon.vue index b456977..4b4a5af 100644 --- a/pages/coach/my/due_soon.vue +++ b/pages/coach/my/due_soon.vue @@ -189,13 +189,13 @@ export default { //打开课程详情 openViewCourseInfo(item){ - uni.navigateTo({ + this.$navigateTo({ url: '/pages/coach/course/info' }) }, //打开学员详情页 openViewStudentInfo(item){ - uni.navigateTo({ + this.$navigateTo({ url: '/pages/coach/student/info' }) }, diff --git a/pages/coach/my/exam_results.vue b/pages/coach/my/exam_results.vue index 1e1083c..12b757f 100644 --- a/pages/coach/my/exam_results.vue +++ b/pages/coach/my/exam_results.vue @@ -34,7 +34,7 @@ }, methods: { back() { - uni.navigateTo({ + this.$navigateTo({ url: '/pages/coach/my/teaching_management' }) } diff --git a/pages/coach/my/gotake_exam.vue b/pages/coach/my/gotake_exam.vue index e675ceb..c8f9bff 100644 --- a/pages/coach/my/gotake_exam.vue +++ b/pages/coach/my/gotake_exam.vue @@ -105,7 +105,7 @@ }) const res = await apiRoute.submitTestPaper({optionList: this.optionList,testPaperId: this.testPaperId, id: this.zid}); if(res.code === 1) { - uni.navigateTo({ + this.$navigateTo({ url: '/pages/coach/my/exam_results?error=' + res.data.error + '&success=' + res.data.success + '&num=' + res.data.num }) } else { diff --git a/pages/coach/my/index.vue b/pages/coach/my/index.vue index 26ed68b..ff88060 100644 --- a/pages/coach/my/index.vue +++ b/pages/coach/my/index.vue @@ -152,56 +152,56 @@ export default { //打开到课率统计 openViewArrivalStatistics(){ - uni.navigateTo({ + this.$navigateTo({ url: '/pages/coach/my/arrival_statistics' }) }, //打开即将到期 openViewDueSoon(){ - uni.navigateTo({ + this.$navigateTo({ url: '/pages/coach/my/due_soon' }) }, //打开授课统计 openViewSchoolingStatistics(){ - uni.navigateTo({ + this.$navigateTo({ url: '/pages/coach/my/schooling_statistics' }) }, //打开教研管理 teachingResearchManagement(){ - uni.navigateTo({ + this.$navigateTo({ url: '/pages/coach/my/teaching_management' }) }, //打开意见反馈 openViewFeedback(){ - uni.navigateTo({ + this.$navigateTo({ url: '/pages/common/feedback' }) }, //打开个人资料 openViewMyInfo(){ - uni.navigateTo({ + this.$navigateTo({ url: '/pages/coach/my/info' }) }, //打开设置 openViewSetUp(){ - uni.navigateTo({ + this.$navigateTo({ url: '/pages/coach/my/set_up' }) }, //跳转页面-我的考勤 openViewMyAttendance(){ - uni.navigateTo({ + this.$navigateTo({ url: '/pages/common/my_attendance' }) }, diff --git a/pages/coach/my/schooling_statistics.vue b/pages/coach/my/schooling_statistics.vue index adc0cef..9072f4c 100644 --- a/pages/coach/my/schooling_statistics.vue +++ b/pages/coach/my/schooling_statistics.vue @@ -141,7 +141,7 @@ export default { //打开课时详情页 openViewCourseInfo(item){ - uni.navigateTo({ + this.$navigateTo({ url: '/pages/coach/course/info' }) }, diff --git a/pages/coach/my/set_up.vue b/pages/coach/my/set_up.vue index 0785c35..40ee02d 100644 --- a/pages/coach/my/set_up.vue +++ b/pages/coach/my/set_up.vue @@ -27,12 +27,12 @@ }, privacy_agreement(type){ - uni.navigateTo({ + this.$navigateTo({ url: '/pages/common/privacy_agreement?type='+type }) }, update_pass(){ - uni.navigateTo({ + this.$navigateTo({ url: '/pages/coach/my/update_pass' }) } diff --git a/pages/coach/my/teaching_management.vue b/pages/coach/my/teaching_management.vue index 7b1d912..16826cb 100644 --- a/pages/coach/my/teaching_management.vue +++ b/pages/coach/my/teaching_management.vue @@ -104,7 +104,7 @@ return this.tableTypeName[text] }, info(id) { - uni.navigateTo({ + this.$navigateTo({ url: '/pages/coach/my/teaching_management_info?id=' + id }) }, @@ -127,7 +127,7 @@ }) }, goTake(id,zid) { - uni.navigateTo({ + this.$navigateTo({ url: '/pages/coach/my/gotake_exam?id=' + id + '&zid=' + zid }) } diff --git a/pages/coach/my/update_pass.vue b/pages/coach/my/update_pass.vue index 3544848..99b14fa 100644 --- a/pages/coach/my/update_pass.vue +++ b/pages/coach/my/update_pass.vue @@ -64,7 +64,7 @@ this.tset_style = 2 }, forgot() { - uni.navigateTo({ + this.$navigateTo({ url: '/pages/student/login/forgot' }) }, diff --git a/pages/coach/student/info.vue b/pages/coach/student/info.vue index d8e314b..9540b1d 100644 --- a/pages/coach/student/info.vue +++ b/pages/coach/student/info.vue @@ -292,13 +292,13 @@ export default { //打开课程详情 openViewCourseInfo(item){ - uni.navigateTo({ + this.$navigateTo({ url: '/pages/coach/course/info' }) }, //打开学员详情页 openViewStudentInfo(item){ - uni.navigateTo({ + this.$navigateTo({ url: '/pages/coach/student/info' }) }, @@ -306,14 +306,14 @@ export default { //打开体测报告 openViewPhysicalExamination(item){ let survey_id = item.id - uni.navigateTo({ + this.$navigateTo({ url: `/pages/coach/student/physical_examination?survey_id=${survey_id}` }) }, //打开作业任务 opebViewWorkDetails(item){ - uni.navigateTo({ + this.$navigateTo({ url: '/pages/coach/student/work_details' }) }, diff --git a/pages/common/my_attendance.vue b/pages/common/my_attendance.vue index 7b36c0e..cf71e4b 100644 --- a/pages/common/my_attendance.vue +++ b/pages/common/my_attendance.vue @@ -25,28 +25,35 @@ - - - - + 普通考勤 {{v.status_name}} - 校区:{{v.campus_id_name}} + 校区:{{v.campus_id_name || ''}} 备注:{{v.remarks || ''}} - {{v.attendance_date}} {{v.check_in_time}} - - - {{v.attendance_date}} {{v.check_out_time}} + + + 开始时间:{{ v.attendance_date }} {{ v.check_in_time || '' }} + 结束时间:{{ v.attendance_date }} {{ v.check_out_time || '' }} + + + + + 开始时间:{{ v.attendance_date }} {{v.leave_start_time || ''}} + 结束时间:{{ v.attendance_date }} {{v.leave_end_time || ''}} + + + 签退 + @@ -67,7 +74,21 @@ :key="k" > - + 普通考勤 + + {{v.status_name}} + + + 校区:{{v.campus_id_name}} + + + 备注:{{v.remarks || ''}} + + + {{v.attendance_date}} {{v.check_in_time}} + - + {{v.attendance_date}} {{v.check_out_time}} + 普通考勤 @@ -105,7 +126,21 @@ :key="k" > - + 普通考勤 + + {{v.status_name}} + + + 校区:{{v.campus_id_name}} + + + 备注:{{v.remarks || ''}} + + + {{v.attendance_date}} {{v.check_in_time}} + - + {{v.attendance_date}} {{v.check_out_time}} + 普通考勤 @@ -150,8 +185,69 @@ {{signIn_content}} + + + + + {{ (formData.attendance_date) ? formData.attendance_date : '点击选择' }} + + + + + + + + + + {{ (formData.leave_time) ? formData.leave_time : '点击选择' }} + + + + + + + + + + + @@ -324,6 +423,9 @@ export default { status:'',//考勤状态: present-出勤, absent-缺勤, late-迟到, leave_early-早退,leave-请假,sign_out-签退 remarks:'',//备注 attendance_date:'',//请假/打卡日期 + leave_time:'',//请假时间范围 + leave_start_time:'',//请假开始时间 + leave_end_time:'',//请假结束时间 longitude:'',//经度 latitude:'',//纬度 }, @@ -349,6 +451,16 @@ export default { // }, ],//选择器可选值列表 + //请假日期选择器相关 + showLeaveData:false, + leaveMinDate:'',//请假日期选择器的最小可选日期 + leaveMaxDate:'',//请假日期选择器的最大可选日期 + + //请假开始时间选择器相关 + showLeaveStartTime:false, + + + //详情模态窗 info_show:false,//是否展示|true=是,false=否 info_data:{},//详情数据 @@ -399,11 +511,20 @@ export default { this.userInfo = res.data this.picker_options = [] res.data.cameus_dept_arr.forEach((v,k)=>{ - this.picker_options.push({ - text: v.campus_id_name, - value: v.campus_id - }) + if(v.campus_id){ + this.picker_options.push({ + text: v.campus_id_name, + value: v.campus_id + }) + } }) + + //当前用户没校区时 + if(!this.picker_options.length){ + this.formData.campus_id = 0 + this.formData.campus_id_name = '' + } + console.log(123123,this.picker_options) }, @@ -420,7 +541,17 @@ export default { this.formData.attendance_date = res - }, + + //最小可选的请假日期 + this.leaveMinDate = res + + //最大可选的请假日期 + const minDate = new Date(this.leaveMinDate); + minDate.setMonth(minDate.getMonth() + 6); + const max_year = minDate.getFullYear(); + const max_month = String(minDate.getMonth() + 1).padStart(2, '0'); + const max_day = String(minDate.getDate()).padStart(2, '0'); + this.leaveMaxDate = `${max_year}-${max_month}-${max_day}`; }, //切换tag列表 async segmented(e) { @@ -531,10 +662,19 @@ export default { //打卡签到相关 //显示打卡弹窗 - openSignInShow(status){ + openSignInShow(status,obj={}){ this.formData.status = status + console.log('123123',obj); + let attendance_date = this.formData.attendance_date + if(obj.id){ + this.formData.id = obj.id + attendance_date = obj.attendance_date + }else{ + this.formData.id = '' + } + switch (status){ case 'present': this.signIn_title = `是否确认打卡?` @@ -546,7 +686,7 @@ export default { break; case 'sign_out': this.signIn_title = `是否确认签退?` - this.signIn_content = `${this.formData.attendance_date} 是否确认签退?` + this.signIn_content = `${attendance_date} 是否确认签退?` break; } @@ -571,7 +711,8 @@ export default { //取消按钮 this.closeSignInShow() }else{ - if(!this.formData.campus_id){ + console.log('提交',this.formData) + if(!this.formData.campus_id && this.picker_options.length){ uni.showToast({ title: '请选择校区', icon: 'none' @@ -706,6 +847,10 @@ export default { async submitFormData() { this.closeSignInShow() + if(!this.formData.campus_id && !this.picker_options.length){ + this.formData.campus_id = 0 + } + let param = {...this.formData} let res = await apiRoute.common_attendanceEdit(param) if (res.code != 1) { @@ -773,6 +918,43 @@ export default { return [data]; }, + //请假日期相关 + //监听-请假日期选择 + changeLeaveData(e){ + console.log('请假日期选择',e) + this.formData.attendance_date = e.result + this.cancelLeaveData() + }, + //打开请假日期选择器 + openLeaveData(){ + this.showLeaveData = true + }, + //关闭请假日期选择器 + cancelLeaveData(){ + this.showLeaveData = false + }, + + //监听-请假开始时间选择 + changeLeaveStartTime(e){ + console.log('请假开始时间选择',e) + let leave_start_time = e.startDate.result + let leave_end_time = e.endDate.result + + this.formData.leave_time = `${leave_start_time}-${leave_end_time}` + + this.formData.leave_start_time = leave_start_time + this.formData.leave_end_time = leave_end_time + this.cancelLeaveStartTime() + }, + //打开请假日期选择器 + openLeaveStartTime(){ + this.showLeaveStartTime = true + }, + //关闭请假日期选择器 + cancelLeaveStartTime(){ + this.showLeaveStartTime = false + }, + } } @@ -820,29 +1002,38 @@ export default { .li{ border: 1px solid #5f5f5f; border-radius: 15rpx; - padding: 20rpx 0; + padding: 20rpx 20rpx; display: flex; + justify-content: space-between; align-items: center; gap: 43rpx; .left{ - image{ - width: 174rpx; - height: 174rpx; - border-radius: 24rpx; - background-color: #333333; - } - } - .right{ + width: 70%; display: flex; flex-direction: column; gap: 18rpx; .content{ font-size: 24rpx; + .item{ + display: flex; + flex-direction: column; + } } .content:nth-child(1){ font-size: 28rpx; } } + .right{ + .btn{ + width: 120rpx; + height: 60rpx; + line-height: 60rpx; + border-radius: 8rpx; + color: rgba(255,255,255,1); + font-size: 28rpx; + text-align: center; + } + } } } .title_box{ @@ -856,6 +1047,7 @@ export default { } .section_btn{ + margin-top: 20rpx; display: flex; justify-content: center; display: flex; @@ -901,6 +1093,7 @@ export default { .input-style { text-align: right !important; + .input-title{} } .button_box{ margin-top: 30rpx; diff --git a/pages/common/my_message.vue b/pages/common/my_message.vue index 5ab28e7..58c0f01 100644 --- a/pages/common/my_message.vue +++ b/pages/common/my_message.vue @@ -248,7 +248,7 @@ export default { //跳转页面-系统消息列表 openViewSysMsgList(e){ let hair_staff_id = e.hair_staff_id//发信人id - uni.navigateTo({ + this.$navigateTo({ url: `/pages/common/sys_msg_list?hair_staff_id=${hair_staff_id}` }) }, @@ -271,7 +271,7 @@ export default { to_id = e.personnel_id } - uni.navigateTo({ + this.$navigateTo({ url: `/pages/common/im_chat_info?from_id=${from_id}&to_id=${to_id}` }) } diff --git a/pages/common/sys_msg_list.vue b/pages/common/sys_msg_list.vue index 8e24630..6905270 100644 --- a/pages/common/sys_msg_list.vue +++ b/pages/common/sys_msg_list.vue @@ -134,7 +134,7 @@ export default { openViewArticleInfo(item) { let id = item.id let redirect = item.redirect//重定向地址 - uni.navigateTo({ + this.$navigateTo({ url: `/pages/common/article_info?id=${id}` }) }, diff --git a/pages/market/clue/add_clues.vue b/pages/market/clue/add_clues.vue index b92c090..e318d85 100644 --- a/pages/market/clue/add_clues.vue +++ b/pages/market/clue/add_clues.vue @@ -27,9 +27,9 @@ 基础信息 - + - {{ (formData.source_channel) ? picker_config.source_channel.text : '点击选择' }} + @click="openCicker(`source`)"> + {{ (formData.source) ? picker_config.source.text : '点击选择' }} - + - {{ (formData.source) ? picker_config.source.text : '点击选择' }} + @click="openCicker(`source_channel`)"> + {{ (formData.source_channel) ? picker_config.source_channel.text : '点击选择' }} + @@ -222,15 +226,12 @@ labelColor='#fff' :bottomBorder='false'> - + + {{ (formData.decision_maker) ? picker_config.decision_maker.text : '点击选择' }} + @@ -254,6 +255,7 @@ - + + {{ (formData.distance) ? picker_config.distance.text : '点击选择' }} + + - - + + - - + + @@ -605,7 +605,7 @@ export default { demand:'',//需求 decision_maker:'',//决策人 initial_intent:'',//客户初步意向度: high-高, medium-中, low-低 - status:'',//客户状态: active-活跃, inactive-不活跃, pending-待定 + status:'pending',//客户状态: active-活跃, inactive-不活跃, pending-待定 //六要素信息 purchasing_power:'',//购买力 @@ -663,6 +663,11 @@ export default { text:'', options:[], }, + //决策人 + decision_maker:{ + text:'', + options:[], + }, //所属校区 campus:{ text:'', @@ -672,7 +677,12 @@ export default { status:{ text:'', options:[], - } + }, + //距离 + distance:{ + text:'', + options:[], + }, },//选择器选项配置 // 年月日选择组件 @@ -721,6 +731,8 @@ export default { await this.getDict('initial_intent')//获取字典-客户初步意向度 await this.getDict('cognitive_idea')//获取字典-认知理念 await this.getDict('status')//获取字典-客户状态 + await this.getDict('decision_maker')//获取字典-决策人 + await this.getDict('distance')//获取字典-距离 // this.getStaffList()//获取人员列表 // this.getAreaTree()//获取地区树形结构 }, @@ -851,6 +863,10 @@ export default { case 'cognitive_idea': key = 'cognitive_concept' break; + //决策人 + case 'decision_maker': + key = 'decision_maker' + break; //客户初步意向度 case 'initial_intent': key = 'preliminarycustomerintention' @@ -859,6 +875,11 @@ export default { case 'status': key = 'kh_status' break; + //距离 + case 'distance': + key = 'distance' + break; + } if(!key){ return @@ -952,7 +973,7 @@ export default { return; } - uni.navigateTo({ + this.$navigateTo({ url: `/pages/market/clue/clue_info?resource_sharing_id=${resource_sharing_id}` }) }, @@ -961,7 +982,7 @@ export default { openViewMyMessage(item) { let from_id = this.userInfo.id//发送者的id let to_id = item.customerResource.id//接收者ID - uni.navigateTo({ + this.$navigateTo({ url: `/pages/common/im_chat_info?from_id=${from_id}&to_id=${to_id}` }) }, @@ -1006,7 +1027,32 @@ export default { + //联系电话失去焦点时间 + async handlePhoneBlur(){ + if(!this.formData.phone_number){ + return + } + + this.clientUserList = [] + let param = { + phone_number:this.formData.phone_number + } + let res = await apiRoute.xs_getAllCustomerResources(param) + if(res.code != 1){ + if(res.msg == '暂无数据'){ + return + } + uni.showToast({ + title: res.msg, + icon: 'none' + }) + return + } + console.log('查重',res) + this.clientUserList = res.data + this.openDuplicateCheck() + }, @@ -1106,10 +1152,19 @@ export default { }, //监听-下拉选择器 changeCicker(e) { - console.log('监听-下拉选择器', this.picker_input_name, e) + console.log('监听-下拉选择器', this.picker_input_name, e,this.formData) let input_name = this.picker_input_name this.formData[input_name] = e.value this.picker_config[input_name]['text'] = e.text + + if(input_name == 'source'){ + if(e.value != 1){ + this.formData.source_channel = '0'//0=线下 + }else{ + this.formData.source_channel = ''//线下 + } + } + this.cancelCicker() }, //关闭下拉选择器 @@ -1337,7 +1392,8 @@ export default { //延迟1s执行 setTimeout(() => { //跳转页面-线索列表 - uni.navigateTo({ + //关闭当前页跳转新页面 + uni.redirectTo({ url: `/pages/market/clue/index` }) }, 1000) diff --git a/pages/market/clue/clue_info.vue b/pages/market/clue/clue_info.vue index 1bcae69..78a09b7 100644 --- a/pages/market/clue/clue_info.vue +++ b/pages/market/clue/clue_info.vue @@ -354,14 +354,14 @@ //跳转页面-添加跟进记录 openViewWritingFollowUp() { - uni.navigateTo({ + this.$navigateTo({ url: `/pages/market/clue/writing_followUp` }) }, //跳转页面-编辑客户详情 openViewEditClues(){ let resource_sharing_id = this.resource_sharing_id//共享资源表id - uni.navigateTo({ + this.$navigateTo({ url: `/pages/market/clue/edit_clues?resource_sharing_id=${resource_sharing_id}` }) }, @@ -369,14 +369,14 @@ //跳转页面-客户信息修改记录 openViewEditCluesLog() { let resource_id = this.clientInfo.resource_id - uni.navigateTo({ + this.$navigateTo({ url: `/pages/market/clue/edit_clues_log?resource_id=${resource_id}` }) }, //跳转页面-转接跟进任务 openViewNewTask() { - uni.navigateTo({ + this.$navigateTo({ url: `/pages/market/clue/new_task` }) }, diff --git a/pages/market/clue/edit_clues.vue b/pages/market/clue/edit_clues.vue index fe6aee4..92c5cf6 100644 --- a/pages/market/clue/edit_clues.vue +++ b/pages/market/clue/edit_clues.vue @@ -27,9 +27,9 @@ 基础信息 - + - {{ (formData.source_channel) ? picker_config.source_channel.text : '点击选择' }} + @click="openCicker(`source`)"> + {{ (formData.source) ? picker_config.source.text : '点击选择' }} - + + - {{ (formData.source) ? picker_config.source.text : '点击选择' }} + @click="openCicker(`source_channel`)"> + {{ (formData.source_channel) ? picker_config.source_channel.text : '点击选择' }} + @@ -715,7 +713,17 @@ export default { status:{ text:'', options:[], - } + }, + //决策人 + decision_maker:{ + text:'', + options:[], + }, + //距离 + distance:{ + text:'', + options:[], + }, },//选择器选项配置 // 年月日选择组件 @@ -765,6 +773,8 @@ export default { await this.getDict('initial_intent')//获取字典-客户初步意向度 await this.getDict('cognitive_idea')//获取字典-认知理念 await this.getDict('status')//获取字典-客户状态 + await this.getDict('decision_maker')//获取字典-决策人 + await this.getDict('distance')//获取字典-距离 // this.getStaffList()//获取人员列表 // this.getAreaTree()//获取地区树形结构 @@ -829,9 +839,12 @@ export default { this.picker_config.initial_intent.text = customerResource.initial_intent_name || '点击选择'//客户初步意向度 this.picker_config.status.text = customerResource.status_name || '点击选择'//客户状态 + this.picker_config.decision_maker.text = customerResource.decision_maker || '点击选择'//决策人 + //六要素相关 this.picker_config.purchasing_power.text = sixSpeed.purchase_power_name || '点击选择'//购买力 this.picker_config.cognitive_idea.text = sixSpeed.concept_awareness_name || '点击选择'//认知理念 + this.picker_config.distance.text = sixSpeed.distance || '点击选择'//距离 }, @@ -943,6 +956,10 @@ export default { case 'cognitive_idea': key = 'cognitive_concept' break; + //决策人 + case 'decision_maker': + key = 'decision_maker' + break; //客户初步意向度 case 'initial_intent': key = 'preliminarycustomerintention' @@ -951,6 +968,10 @@ export default { case 'status': key = 'kh_status' break; + //距离 + case 'distance': + key = 'distance' + break; } if(!key){ return @@ -1032,7 +1053,7 @@ export default { //跳转页面-客户详情 openViewClueInfo(item) { let id = item.id - uni.navigateTo({ + this.$navigateTo({ url: `/pages/market/clue/clue_info?id=${id}` }) }, @@ -1040,7 +1061,7 @@ export default { //跳转页面-我的消息 openViewMyMessage(item) { let hair_staff_id = item.hair_staff_id - uni.navigateTo({ + this.$navigateTo({ url: `/pages/common/im_chat_info?hair_staff_id=${hair_staff_id}` }) }, @@ -1075,7 +1096,43 @@ export default { }, + //联系电话失去焦点时间 + async handlePhoneBlur(){ + if(!this.formData.phone_number){ + return + } + + this.clientUserList = [] + + let param = { + phone_number:this.formData.phone_number + } + let res = await apiRoute.xs_getAllCustomerResources(param) + if(res.code != 1){ + if(res.msg == '暂无数据'){ + return + } + uni.showToast({ + title: res.msg, + icon: 'none' + }) + return + } + console.log('查重',res) + + + + this.clientUserList = res.data + + if(this.clientUserList.length == 1){ + if (this.clientUserList[0].id == this.formData.id) { + //查重后的手机号是自己,就不展示查重结果了 + return + } + } + this.openDuplicateCheck() + }, @@ -1180,6 +1237,13 @@ export default { let input_name = this.picker_input_name this.formData[input_name] = e.value this.picker_config[input_name]['text'] = e.text + if(input_name == 'source'){ + if(e.value != 1){ + this.formData.source_channel = '0'//0=线下 + }else{ + this.formData.source_channel = ''//线下 + } + } this.cancelCicker() }, //关闭下拉选择器 @@ -1220,6 +1284,7 @@ export default { }, //表单验证 async validatorForm(data) { + console.log('tijiao',data) //客户基础信息 //来源渠道 @@ -1407,7 +1472,8 @@ export default { //延迟1s执行 setTimeout(() => { //跳转页面-客户详情列表 - uni.navigateTo({ + //关闭当前页跳转新页面 + uni.redirectTo({ url: `/pages/market/clue/clue_info?resource_sharing_id=${this.resource_sharing_id}` }) }, 1000) diff --git a/pages/market/clue/edit_clues_log.vue b/pages/market/clue/edit_clues_log.vue index 76f1f00..7340b68 100644 --- a/pages/market/clue/edit_clues_log.vue +++ b/pages/market/clue/edit_clues_log.vue @@ -9,7 +9,7 @@ type="button" radius="8" height="80" - color="#465cff" + color="#29d3b4" bold="true" @click="segmented"> @@ -25,9 +25,9 @@ > - +