fix:问题修复

This commit is contained in:
huxuejian 2026-09-03 17:35:08 +08:00
parent 24ee4a48f5
commit 01ee09524b
3 changed files with 64 additions and 10 deletions

View File

@ -47,13 +47,8 @@
<view class="section mt-20"> <view class="section mt-20">
<view class="section-title">回访结果</view> <view class="section-title">回访结果</view>
<view class="result-box"> <view class="result-box">
<textarea <textarea v-model="form.result" class="result-textarea" placeholder="请填写回访结果" maxlength="500"
v-model="form.result" :disabled="!(editable || canEditResult)" />
class="result-textarea"
placeholder="请填写回访结果"
maxlength="500"
:disabled="!(editable || canEditResult)"
/>
</view> </view>
</view> </view>
@ -191,8 +186,9 @@ const mobiles = computed(() => {
if (Array.isArray(cached.mobiles)) arr.push(...cached.mobiles.map(String)); if (Array.isArray(cached.mobiles)) arr.push(...cached.mobiles.map(String));
} }
const cleaned = arr.map((i) => String(i || '').trim()).filter(Boolean); const cleaned = arr.map((i) => String(i || '').trim()).filter(Boolean);
if (!cleaned.includes('13800000000')) cleaned.push('13800000000'); const { mobile, phone1, phone2, phone3 } = customer.value || {};
return Array.from(new Set(cleaned)); cleaned.push(mobile, phone1, phone2, phone3)
return Array.from(new Set(cleaned.filter(i => typeof i === 'string' && i.trim())));
}); });
function getUserId() { function getUserId() {
@ -319,7 +315,13 @@ async function getTodo() {
return; return;
} }
todo.value = res.data && typeof res.data === 'object' ? res.data : null; todo.value = res.data && typeof res.data === 'object' ? res.data : null;
if (todo.value.customerId && !customer.value) {
getCustomer(todo.value.customerId)
}
await loadUserNameMap(String(todo.value?.executeTeamId || '')); await loadUserNameMap(String(todo.value?.executeTeamId || ''));
if (todo.value && todo.value.creatorUserId && !userNameMap.value[todo.value.creatorUserId]) {
getCorpMember(todo.value.creatorUserId)
}
const parsed = parseTodoMethod(todo.value?.todoMethod); const parsed = parseTodoMethod(todo.value?.todoMethod);
if (parsed.todoMethod) { if (parsed.todoMethod) {
@ -335,6 +337,14 @@ async function getTodo() {
form.result = String(todo.value?.result || '') || ''; form.result = String(todo.value?.result || '') || '';
} }
async function getCustomer(_id) {
const res = await api('getMemberInfo', { params: { _id } })
const [data] = res && Array.isArray(res.data) ? res.data : [];
if (data) {
customer.value = data
}
}
function toggleMethod(v) { function toggleMethod(v) {
if (!editable.value) return; if (!editable.value) return;
todoMethod.value = v; todoMethod.value = v;
@ -420,6 +430,14 @@ async function save() {
setTimeout(() => uni.navigateBack(), 300); setTimeout(() => uni.navigateBack(), 300);
} }
async function getCorpMember(userId) {
const res = await api('getCorpMemberByUserId', { userId });
const [data] = res && Array.isArray(res.data) ? res.data : [];
if (data && data.userid && data.anotherName) {
userNameMap.value[data.userid] = data.anotherName
}
}
function remove() { function remove() {
if (!canRemove.value) return; if (!canRemove.value) return;
uni.showModal({ uni.showModal({
@ -445,13 +463,16 @@ function remove() {
height: 100vh; height: 100vh;
background: #f6f7f8; background: #f6f7f8;
} }
.scroll { .scroll {
height: 100vh; height: 100vh;
} }
.section { .section {
background: #fff; background: #fff;
padding: 24rpx 30rpx; padding: 24rpx 30rpx;
} }
.border-top { .border-top {
border-top: 1px solid #e5e7eb; border-top: 1px solid #e5e7eb;
} }
@ -461,11 +482,13 @@ function remove() {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.head-title { .head-title {
font-size: 32rpx; font-size: 32rpx;
font-weight: 600; font-weight: 600;
color: #111827; color: #111827;
} }
.head-tag { .head-tag {
flex-shrink: 0; flex-shrink: 0;
font-size: 24rpx; font-size: 24rpx;
@ -474,23 +497,28 @@ function remove() {
background: #f3f4f6; background: #f3f4f6;
color: #6b7280; color: #6b7280;
} }
.tag-processing { .tag-processing {
background: #fee2e2; background: #fee2e2;
color: #ef4444; color: #ef4444;
} }
.tag-notStart { .tag-notStart {
background: #dbeafe; background: #dbeafe;
color: #2563eb; color: #2563eb;
} }
.tag-treated { .tag-treated {
background: #dcfce7; background: #dcfce7;
color: #16a34a; color: #16a34a;
} }
.tag-cancelled, .tag-cancelled,
.tag-expired { .tag-expired {
background: #f3f4f6; background: #f3f4f6;
color: #6b7280; color: #6b7280;
} }
.head-content { .head-content {
margin-top: 24rpx; margin-top: 24rpx;
font-size: 28rpx; font-size: 28rpx;
@ -502,21 +530,25 @@ function remove() {
font-size: 28rpx; font-size: 28rpx;
color: #6b7280; color: #6b7280;
} }
.sub-content { .sub-content {
margin-top: 24rpx; margin-top: 24rpx;
font-size: 28rpx; font-size: 28rpx;
color: #6b7280; color: #6b7280;
line-height: 44rpx; line-height: 44rpx;
} }
.file-line { .file-line {
margin-top: 12rpx; margin-top: 12rpx;
font-size: 28rpx; font-size: 28rpx;
line-height: 40rpx; line-height: 40rpx;
} }
.file-type { .file-type {
color: #111827; color: #111827;
margin-right: 12rpx; margin-right: 12rpx;
} }
.file-name { .file-name {
color: #2563eb; color: #2563eb;
} }
@ -526,21 +558,25 @@ function remove() {
font-weight: 600; font-weight: 600;
color: #111827; color: #111827;
} }
.method-row { .method-row {
display: flex; display: flex;
align-items: center; align-items: center;
margin-top: 24rpx; margin-top: 24rpx;
} }
.radio { .radio {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
margin-right: 20rpx; margin-right: 20rpx;
} }
.method-label { .method-label {
font-size: 28rpx; font-size: 28rpx;
color: #111827; color: #111827;
margin-right: 20rpx; margin-right: 20rpx;
} }
.method-select { .method-select {
margin-left: auto; margin-left: auto;
width: 400rpx; width: 400rpx;
@ -552,6 +588,7 @@ function remove() {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.method-value { .method-value {
font-size: 28rpx; font-size: 28rpx;
color: #111827; color: #111827;
@ -560,6 +597,7 @@ function remove() {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.method-value.muted { .method-value.muted {
color: #9ca3af; color: #9ca3af;
} }
@ -569,10 +607,12 @@ function remove() {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.kv-left { .kv-left {
font-size: 28rpx; font-size: 28rpx;
color: #6b7280; color: #6b7280;
} }
.kv-right { .kv-right {
font-size: 28rpx; font-size: 28rpx;
color: #111827; color: #111827;
@ -582,6 +622,7 @@ function remove() {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.kv-right.link { .kv-right.link {
color: #2563eb; color: #2563eb;
text-decoration: underline; text-decoration: underline;
@ -590,12 +631,14 @@ function remove() {
.mt-20 { .mt-20 {
margin-top: 20rpx; margin-top: 20rpx;
} }
.result-box { .result-box {
margin-top: 24rpx; margin-top: 24rpx;
padding: 20rpx; padding: 20rpx;
border: 1px solid #e5e7eb; border: 1px solid #e5e7eb;
border-radius: 16rpx; border-radius: 16rpx;
} }
.result-textarea { .result-textarea {
width: 100%; width: 100%;
min-height: 160rpx; min-height: 160rpx;
@ -604,19 +647,24 @@ function remove() {
color: #111827; color: #111827;
box-sizing: border-box; box-sizing: border-box;
} }
.meta { .meta {
font-size: 28rpx; font-size: 28rpx;
} }
.meta-row { .meta-row {
margin-top: 24rpx; margin-top: 24rpx;
} }
.meta-row:first-child { .meta-row:first-child {
margin-top: 0; margin-top: 0;
} }
.meta-key { .meta-key {
color: #6b7280; color: #6b7280;
margin-right: 12rpx; margin-right: 12rpx;
} }
.meta-val { .meta-val {
color: #6b7280; color: #6b7280;
} }
@ -633,6 +681,7 @@ function remove() {
padding: 30rpx; padding: 30rpx;
box-shadow: 0 -8rpx 24rpx rgba(0, 0, 0, 0.06); box-shadow: 0 -8rpx 24rpx rgba(0, 0, 0, 0.06);
} }
.footer-btn { .footer-btn {
flex: 0 0 auto; flex: 0 0 auto;
min-width: 260rpx; min-width: 260rpx;
@ -641,18 +690,22 @@ function remove() {
border-radius: 16rpx; border-radius: 16rpx;
font-size: 28rpx; font-size: 28rpx;
} }
.footer-btn::after { .footer-btn::after {
border: none; border: none;
} }
.footer-btn.plain { .footer-btn.plain {
background: #fff; background: #fff;
color: #2563eb; color: #2563eb;
border: 1px solid #2563eb; border: 1px solid #2563eb;
} }
.footer-btn.plain.danger { .footer-btn.plain.danger {
color: #ef4444; color: #ef4444;
border-color: #ef4444; border-color: #ef4444;
} }
.footer-btn.primary { .footer-btn.primary {
background: #2563eb; background: #2563eb;
color: #fff; color: #fff;

View File

@ -124,7 +124,6 @@ const eventTypeLabel = computed(() => getTodoEventTypeLabel(form.eventType));
const mobiles = computed(() => { const mobiles = computed(() => {
const arr = []; const arr = [];
if (archiveMobile.value) arr.push(String(archiveMobile.value)); if (archiveMobile.value) arr.push(String(archiveMobile.value));
if (!arr.includes('13800000000')) arr.push('13800000000');
return arr; return arr;
}); });

View File

@ -40,6 +40,7 @@ const urlsConfig = {
getHlwHospitalList: 'getHlwHospitalList', getHlwHospitalList: 'getHlwHospitalList',
updateAutoAcceptConsult: 'updateAutoAcceptConsult', updateAutoAcceptConsult: 'updateAutoAcceptConsult',
getAutoAcceptConsult: 'getAutoAcceptConsult', getAutoAcceptConsult: 'getAutoAcceptConsult',
getCorpMemberByUserId: 'getCorpMemberByUserId'
}, },
knowledgeBase: { knowledgeBase: {
@ -104,6 +105,7 @@ const urlsConfig = {
updateMedicalRecord: 'updateMedicalRecord', updateMedicalRecord: 'updateMedicalRecord',
removeMedicalRecord: 'removeMedicalRecord', removeMedicalRecord: 'removeMedicalRecord',
getCustomerMedicalRecord: 'getCustomerMedicalRecord', getCustomerMedicalRecord: 'getCustomerMedicalRecord',
getMemberInfo: "getMemberInfo",
// 客户阶段 // 客户阶段
getCustomerType: 'getCustomerType', getCustomerType: 'getCustomerType',
}, },