diff --git a/pages.json b/pages.json index 063c1d3..1bc726a 100644 --- a/pages.json +++ b/pages.json @@ -490,7 +490,7 @@ "navigationBarTitleText": "线索", "navigationStyle": "default", "navigationBarBackgroundColor": "#292929", - "navigationBarTextStyle": "black" + "navigationBarTextStyle": "white" } }, { 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/market/clue/add_clues.vue b/pages/market/clue/add_clues.vue index d102967..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 @@ -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() }, //关闭下拉选择器 diff --git a/pages/market/clue/edit_clues.vue b/pages/market/clue/edit_clues.vue index f1030a9..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 @@ -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) //客户基础信息 //来源渠道 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 @@ > - +