diff --git a/pages/archive/archive-result.vue b/pages/archive/archive-result.vue
index e6ce3be..b06a305 100644
--- a/pages/archive/archive-result.vue
+++ b/pages/archive/archive-result.vue
@@ -104,15 +104,15 @@ async function getTeam(corpId, teamId, customerId) {
const res = await api('getTeamData', { teamId, corpId });
if (res && res.data) {
team.value = res.data;
- const qrcode = team.value && Array.isArray(team.value.qrcodes) ? team.value.qrcodes[0] : null;
- const healthTempList = qrcode && Array.isArray(qrcode.healthTempList) ? qrcode.healthTempList : [];
- const types = healthTempList.filter(i => typeof i.templateType === 'string' && i.templateType.trim() && i.archiveRecommend === true).map(i => i.templateType);
- if (types.length && customerId) {
- const nextType = types[0];
- const nextTypes = types.slice(1);
- const url = `/pages/health/record?type=${nextType}&teamId=${teamId}&corpId=${corpId}&customerId=${customerId}&nextTypes=${nextTypes.join(',')}`
- uni.navigateTo({ url });
- }
+ // const qrcode = team.value && Array.isArray(team.value.qrcodes) ? team.value.qrcodes[0] : null;
+ // const healthTempList = qrcode && Array.isArray(qrcode.healthTempList) ? qrcode.healthTempList : [];
+ // const types = healthTempList.filter(i => typeof i.templateType === 'string' && i.templateType.trim() && i.archiveRecommend === true).map(i => i.templateType);
+ // if (types.length && customerId) {
+ // const nextType = types[0];
+ // const nextTypes = types.slice(1);
+ // const url = `/pages/health/record?type=${nextType}&teamId=${teamId}&corpId=${corpId}&customerId=${customerId}&nextTypes=${nextTypes.join(',')}`
+ // uni.navigateTo({ url });
+ // }
} else {
toast(res?.message || '获取团队信息失败')
}
diff --git a/pages/archive/edit-archive.vue b/pages/archive/edit-archive.vue
index 08919b7..9685b53 100644
--- a/pages/archive/edit-archive.vue
+++ b/pages/archive/edit-archive.vue
@@ -26,7 +26,6 @@ import dayjs from 'dayjs';
import useGuard from '@/hooks/useGuard';
import useAccount from '@/store/account';
import api from '@/utils/api';
-import { set } from "@/utils/cache";
import { toast, confirm as uniConfirm } from '@/utils/widget';
import validate from '@/utils/validate';
@@ -163,9 +162,7 @@ async function addArchive() {
const res = await api('addCustomer', { params });
if (res && res.success) {
uni.$emit('reloadTeamCustomers')
- uni.redirectTo({
- url: `/pages/archive/archive-result?corpId=${corpId.value}&teamId=${teamId.value}&customerId=${res.data.id}`
- })
+ getTeam(corpId.value, teamId.value, res.data.id);
} else {
toast(res?.message || '新增档案失败');
}
@@ -202,7 +199,6 @@ async function init() {
await getCustomer();
} else {
const res = await getArchives();
- console.log('res:', res)
if (res.length > 0) {
visible.value = true;
}
@@ -281,6 +277,26 @@ async function getReferenceCustomer() {
referenceCustomer.value = res && res.data ? res.data : null;
}
+async function getTeam(corpId, teamId, customerId) {
+ const res = await api('getTeamData', { teamId, corpId });
+ if (res && res.data) {
+ const team = res.data;
+ const qrcode = team && Array.isArray(team.qrcodes) ? team.qrcodes[0] : null;
+ const healthTempList = qrcode && Array.isArray(qrcode.healthTempList) ? qrcode.healthTempList : [];
+ const types = healthTempList.filter(i => typeof i.templateType === 'string' && i.templateType.trim() && i.archiveRecommend === true).map(i => i.templateType);
+ if (types.length && customerId) {
+ const nextType = types[0];
+ const nextTypes = types.slice(1);
+ const url = `/pages/health/record?type=${nextType}&teamId=${teamId}&corpId=${corpId}&customerId=${customerId}&nextTypes=${nextTypes.join(',')}&source=afterArchive`
+ uni.redirectTo({ url });
+ }
+ } else {
+ uni.redirectTo({
+ url: `/pages/archive/archive-result?corpId=${corpId}&teamId=${teamId}&customerId=${customerId}`
+ })
+ }
+}
+
onLoad(options => {
teamId.value = options.teamId;
diff --git a/pages/archive/verify-name-popup.vue b/pages/archive/verify-name-popup.vue
index 2ba55a2..2a7fe9f 100644
--- a/pages/archive/verify-name-popup.vue
+++ b/pages/archive/verify-name-popup.vue
@@ -11,8 +11,12 @@
{{ nameSet.pre }}
{{ nameSet.middle }}
-
+
+
+
+
@@ -42,6 +46,7 @@ const props = defineProps({
const popup = ref()
const inputName = ref('')
const focus = ref(false)
+const firstInputName = computed(() => inputName.value.trim()[0] || '')
const placeholder = computed(() => '请输入姓名' + (props.customer.maskName ? `(${props.customer.maskName})` : ''));
const nameSet = computed(() => {
const name = props.customer && typeof props.customer.name === 'string' ? props.customer.name.trim() : ''
@@ -86,6 +91,7 @@ watch(() => props.visible, n => {