From 1bab91761f86ce8fe457e48662387877b8150bd0 Mon Sep 17 00:00:00 2001 From: lijie_ycrj <1540286404@qq.com> Date: Sat, 8 Nov 2025 16:21:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B8=AE=E6=89=B6=E7=AD=9B=E9=80=89=E3=80=81?= =?UTF-8?q?=E5=B8=AE=E6=89=B6=E8=B7=9F=E8=BF=9B=E6=8E=A5=E5=8F=A3=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packageB/priority/helpFilter.vue | 336 +++++++++++++++++-------------- packageB/priority/helpFollow.vue | 167 ++++++++++----- utils/request.js | 5 + 3 files changed, 302 insertions(+), 206 deletions(-) diff --git a/packageB/priority/helpFilter.vue b/packageB/priority/helpFilter.vue index 3e1ea06..948a7d8 100644 --- a/packageB/priority/helpFilter.vue +++ b/packageB/priority/helpFilter.vue @@ -28,31 +28,31 @@ 帮扶类型: - + 帮扶人员: - + 所属区域: - - + 开始时间: - + 结束时间: @@ -65,21 +65,20 @@ - 共7条记录 + 共{{totalNum}}条记录 - - + {{item.name}} - {{item.type}} + {{getTaskTypeLabelByValue(item.task_type)}} - + @@ -90,7 +89,7 @@ {{item.phone}} - + @@ -98,10 +97,10 @@ - {{item.idCard}} + {{item.id_card}} - + @@ -109,10 +108,10 @@ - {{item.helpArea}} + {{item.dept_name}} - + @@ -120,10 +119,10 @@ - {{item.helperName}} + {{item.create_by_name}} - + @@ -131,10 +130,10 @@ - {{item.helpUnit}} + {{item.create_by_dept_name}} - + @@ -142,10 +141,10 @@ - {{item.assistanceDate}} + {{item.follow_date}} - + @@ -153,7 +152,7 @@ - {{item.nextContact}} + {{item.next_contact_date}} @@ -163,13 +162,13 @@ - + @@ -412,11 +436,13 @@ image width: 160rpx font-size: 28rpx color: #404040 + flex-shrink: 0 .input, .picker background: #FFFFFF flex: 1 + min-width: 0 .list-box margin-top: 40rpx .con-box @@ -456,9 +482,13 @@ image .item-label font-size: 26rpx color: #B3B3B3 + width: 130rpx .item-right font-size: 26rpx color: #737373 + overflow: hidden + text-overflow: ellipsis + white-space: nowrap .form-btns margin-top:30rpx .form-box-btn diff --git a/packageB/priority/helpFollow.vue b/packageB/priority/helpFollow.vue index 630d2d6..f1adc0a 100644 --- a/packageB/priority/helpFollow.vue +++ b/packageB/priority/helpFollow.vue @@ -7,7 +7,7 @@ 人员姓名 - 王小美 + {{personInfo.name}} @@ -16,7 +16,7 @@ 帮扶类型 - 招聘岗位推荐 + {{personInfo.taskType}} @@ -32,22 +32,22 @@ - + - - + + - - + + - - + + @@ -75,12 +75,13 @@ - 共7条记录 + 共{{followListNum}}条记录 - - + + + @@ -93,39 +94,22 @@ import config from "@/config.js" const title = ref(''); const formData = reactive({ + goalPersonId:'', followDate: '', - followMethod: '', - followContent: '', - followResult: '', + followWay: '', + content: '', + result: '', nextPlan: '', nextContactDate: '' }) -const followMethods = [{ - "value": 0, - "text": "电话" -}, { - "value": 1, - "text": "面谈" -}, { - "value": 2, - "text": "微信" -}, { - "value": 3, - "text": "邮件" -}] -const list2=[{ - title: '买家下单', - desc: '跟进方式:电话\n跟进人:新生社区管理员\n跟进内容:内容内容内容' -}, { - title: '卖家发货', - desc: '跟进方式:电话\n跟进人:新生社区管理员\n跟进内容:内容内容内容' -}, { - title: '买家签收', - desc: '跟进方式:电话\n跟进人:新生社区管理员\n跟进内容:内容内容内容' -}, { - title: '交易完成', - desc: '跟进方式:电话\n跟进人:新生社区管理员\n跟进内容:内容内容内容' -}] +const personInfo=ref({ + goalPersonId:'', + name:'', + taskType:'' +}) +const followWays = ref([]) +const followList = ref([]) +const followListNum=ref(0) const active=ref(null) // 表单引用 const formRef = ref(null) @@ -138,19 +122,19 @@ const rules = { errorMessage: '请选择跟进日期' }] }, - followMethod: { + followWay: { rules: [{ required: true, errorMessage: '请选择跟进方式' }] }, - followContent: { + content: { rules: [{ required: true, errorMessage: '请填写跟进内容' }] }, - followResult: { + result: { rules: [{ required: true, errorMessage: '请填写跟进结果' @@ -164,31 +148,108 @@ const getBackgroundStyle = (imageName) => ({ backgroundPosition: 'center', // 居中 backgroundRepeat: 'no-repeat' }); -const trainVideoImgUrl=config.trainVideoImgUrl - -// 事件处理 -const onDateChange = (field, e) => { - formData[field] = e.detail.value +const onFollowDateChange = (e)=>{ + formData.followDate=e } - const onMethodChange = (e) => { + formData.followWay=e +} +// 事件处理 +const onDateChange = ( e) => { + formData.nextContactDate=e +} +function getFollowList(){ + let header={ + 'Authorization':uni.getStorageSync('Padmin-Token'), + 'Content-Type': "application/x-www-form-urlencoded" + } + let params={ + goalPersonId:personInfo.value.goalPersonId + } + $api.myRequest('/dispatch/assist/records/getFollowList', params,'get',9100,header).then((resData) => { + console.log("resData",resData) + if(resData && resData.code == 200){ + if(resData.data && resData.data.length>0){ + followListNum.value=resData.data.length + resData.data.forEach(item=>{ + const obj={ + title:item.followDate, + desc:`跟进方式:${getFollowWaysLabelByValue(item.followWay)}\n跟进人:${item.createByName}\n跟进内容:${item.content}` + } + followList.value.push(obj) + }) + } + + } + }); } +function getDictionary(){ + $api.myRequest('/system/public/dict/data/type/assist_follow_way').then((resData) => { + if(resData && resData.code == 200){ + resData.data.forEach(item=>{ + const obj = { + value: item.dictValue, + text: item.dictLabel + } + followWays.value.push(obj) + }) + } + }); +} +function getFollowWaysLabelByValue(value) { + if (!Array.isArray(followWays.value)) { + return '' + } + const item = followWays.value.find(item => item.value === String(value)) + return item ? item.text : '暂无跟进方式' +} const handleSubmit = () => { formRef.value?.validate() .then(() => { - uni.showToast({ title: '校验通过', icon: 'success' }); + let header={ + 'Authorization':uni.getStorageSync('Padmin-Token') + } + formData.goalPersonId=personInfo.value.goalPersonId + $api.myRequest('/dispatch/assist/records/addRecords', formData,'post',9100,header).then((resData) => { + console.log("resData",resData) + if(resData && resData.code == 200){ + handleReset() + uni.showToast({ + title: '保存成功', + icon: 'success', + duration: 2000 + }); + }else{ + uni.showToast({ + title: resData.msg, + icon: 'none', + duration: 2000 + }); + } + + }); }) .catch((errors) => { console.log('校验失败:', errors); - uni.showToast({ title: '请填写必填项', icon: 'none' }); }); }; const handleReset = () => { + formData.followDate = ''; + formData.followWay = ''; + formData.content = ''; + formData.result = ''; + formData.nextPlan = ''; + formData.nextContactDate = ''; } -onLoad(() => { +onLoad((options) => { + personInfo.value.goalPersonId=options.id + personInfo.value.name=options.name + personInfo.value.taskType=options.taskType + getDictionary() + getFollowList() }); diff --git a/utils/request.js b/utils/request.js index 8e448e6..ab07299 100644 --- a/utils/request.js +++ b/utils/request.js @@ -217,7 +217,12 @@ export function myRequest(url, data = {}, method = 'GET', port = 9100, headers = } // 处理业务错误 if (resData.data?.code === 401 || resData.data?.code === 402) { + uni.navigateTo({ + url:'/packageB/login?flag=nw' + }) + // navTo('/packageB/login?flag=nw'); useUserStore().logOut() + } // 显示具体的错误信息 const errorMsg = msg || '请求出现异常,请联系工作人员'