feat:2.45需求开发

This commit is contained in:
huxuejian 2026-05-22 16:46:01 +08:00
parent 6d802a4f07
commit 915498379d
5 changed files with 33 additions and 6 deletions

View File

@ -73,6 +73,7 @@ const { account } = storeToRefs(useAccount());
const { memberJob, memberList: list } = useJob();
const qrcode = ref('');
const corpId = ref('')
const customerId = ref('')
const friends = computed(() => {
const memberList = Array.isArray(team.value?.memberList) ? team.value.memberList : [];
@ -99,10 +100,19 @@ async function getQrcode(userid) {
}
}
async function getTeam(corpId, teamId) {
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 });
}
} else {
toast(res?.message || '获取团队信息失败')
}
@ -113,9 +123,10 @@ function backHome() {
}
useLoad(options => {
customerId.value = options.customerId || '';
corpId.value = options.corpId;
if (options.teamId && options.corpId) {
getTeam(options.corpId, options.teamId);
getTeam(options.corpId, options.teamId, options.customerId);
}
})

View File

@ -164,7 +164,7 @@ async function addArchive() {
if (res && res.success) {
uni.$emit('reloadTeamCustomers')
uni.redirectTo({
url: `/pages/archive/archive-result?corpId=${corpId.value}&teamId=${teamId.value}`
url: `/pages/archive/archive-result?corpId=${corpId.value}&teamId=${teamId.value}&customerId=${res.data.id}`
})
} else {
toast(res?.message || '新增档案失败');

View File

@ -115,7 +115,7 @@ const page = ref(1);
const more = ref(false)
const loading = ref(false);
const qrcode = computed(() => team.value && Array.isArray(team.value.qrcodes) ? team.value.qrcodes[0] : null)
const healthTempList = computed(() => qrcode.value && Array.isArray(qrcode.value.healthTempList) ? qrcode.value.healthTempList.map(i => ({ label: tempType[i.templateType], value: i.templateType })).filter(i => i.label) : [])
const healthTempList = computed(() => qrcode.value && Array.isArray(qrcode.value.healthTempList) ? qrcode.value.healthTempList.map(i => ({ enable: i.enable, label: tempType[i.templateType], value: i.templateType })).filter(i => i.label && i.enable) : [])
const tempShowField = ref(null);
const config = {

View File

@ -43,6 +43,7 @@ const type = ref('');
const visible = ref(false);
const timeTitle = ref('');
const canEdit = ref(false)
const nextTypes = ref([]);
const formData = computed(() => ({ ...record.value, ...form.value }));
const displayFormItems = computed(() => {
@ -90,12 +91,25 @@ async function addHealthRecord() {
const res = await api('addMedicalRecord', data);
if (res && res.success) {
await toast('保存成功');
const isFill = await fillNext();
if(isFill) return;
uni.navigateBack();
} else {
toast(res?.message || '保存失败');
}
}
async function fillNext() {
const nextType = nextTypes.value[0];
const types = nextTypes.value.slice(1);
if (nextType) {
const url = `/pages/health/record?type=${nextType}&teamId=${teamId.value}&corpId=${corpId.value}&customerId=${customerId.value}&nextTypes=${types.join(',')}`
uni.redirectTo({ url });
return true
}
return false
}
async function updateHealthRecord() {
if (Object.keys(form.value).length === 0) {
uni.navigateBack();
@ -162,6 +176,8 @@ onLoad(options => {
customerId.value = options.customerId || '';
corpId.value = options.corpId;
teamId.value = options.teamId;
const nextTypeStr = typeof options.nextTypes === 'string' ? options.nextTypes : '';
nextTypes.value = nextTypeStr.split(',');
uni.setNavigationBarTitle({ title: id.value ? '编辑健康档案' : '新增健康档案' })
})
useLoad(options => {

View File

@ -22,7 +22,7 @@
</view>
<div class="flex items-center">
<view v-if="currentTeam" class="w-0 flex-grow mr-5text-base text-white truncate">
{{ currentTeam.leaderCorp || currentTeam.corpName || '' }}
{{ currentTeam.licenseHospitalName || currentTeam.leaderCorp || currentTeam.corpName || '' }}
</view>
<view v-if="team && team.supportPatientForward === 'YES'"
class="relative flex-shrink-0 flex items-center bg-white rounded-sm px-10">
@ -49,7 +49,7 @@
{{ item.name }}
</view>
<view class="text-base text-gray leading-normal">
{{ item.leaderCorp || item.corpName || '' }}
{{ item.licenseHospitalName || item.leaderCorp || item.corpName || '' }}
</view>
</view>
<view class="flex">