feat:2.45需求开发
This commit is contained in:
parent
6d802a4f07
commit
915498379d
@ -73,6 +73,7 @@ const { account } = storeToRefs(useAccount());
|
|||||||
const { memberJob, memberList: list } = useJob();
|
const { memberJob, memberList: list } = useJob();
|
||||||
const qrcode = ref('');
|
const qrcode = ref('');
|
||||||
const corpId = ref('')
|
const corpId = ref('')
|
||||||
|
const customerId = ref('')
|
||||||
|
|
||||||
const friends = computed(() => {
|
const friends = computed(() => {
|
||||||
const memberList = Array.isArray(team.value?.memberList) ? team.value.memberList : [];
|
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 });
|
const res = await api('getTeamData', { teamId, corpId });
|
||||||
if (res && res.data) {
|
if (res && res.data) {
|
||||||
team.value = 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 {
|
} else {
|
||||||
toast(res?.message || '获取团队信息失败')
|
toast(res?.message || '获取团队信息失败')
|
||||||
}
|
}
|
||||||
@ -113,9 +123,10 @@ function backHome() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
useLoad(options => {
|
useLoad(options => {
|
||||||
|
customerId.value = options.customerId || '';
|
||||||
corpId.value = options.corpId;
|
corpId.value = options.corpId;
|
||||||
if (options.teamId && options.corpId) {
|
if (options.teamId && options.corpId) {
|
||||||
getTeam(options.corpId, options.teamId);
|
getTeam(options.corpId, options.teamId, options.customerId);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -164,7 +164,7 @@ async function addArchive() {
|
|||||||
if (res && res.success) {
|
if (res && res.success) {
|
||||||
uni.$emit('reloadTeamCustomers')
|
uni.$emit('reloadTeamCustomers')
|
||||||
uni.redirectTo({
|
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 {
|
} else {
|
||||||
toast(res?.message || '新增档案失败');
|
toast(res?.message || '新增档案失败');
|
||||||
|
|||||||
@ -115,7 +115,7 @@ const page = ref(1);
|
|||||||
const more = ref(false)
|
const more = ref(false)
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const qrcode = computed(() => team.value && Array.isArray(team.value.qrcodes) ? team.value.qrcodes[0] : null)
|
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 tempShowField = ref(null);
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
|
|||||||
@ -43,6 +43,7 @@ const type = ref('');
|
|||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const timeTitle = ref('');
|
const timeTitle = ref('');
|
||||||
const canEdit = ref(false)
|
const canEdit = ref(false)
|
||||||
|
const nextTypes = ref([]);
|
||||||
|
|
||||||
const formData = computed(() => ({ ...record.value, ...form.value }));
|
const formData = computed(() => ({ ...record.value, ...form.value }));
|
||||||
const displayFormItems = computed(() => {
|
const displayFormItems = computed(() => {
|
||||||
@ -90,12 +91,25 @@ async function addHealthRecord() {
|
|||||||
const res = await api('addMedicalRecord', data);
|
const res = await api('addMedicalRecord', data);
|
||||||
if (res && res.success) {
|
if (res && res.success) {
|
||||||
await toast('保存成功');
|
await toast('保存成功');
|
||||||
|
const isFill = await fillNext();
|
||||||
|
if(isFill) return;
|
||||||
uni.navigateBack();
|
uni.navigateBack();
|
||||||
} else {
|
} else {
|
||||||
toast(res?.message || '保存失败');
|
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() {
|
async function updateHealthRecord() {
|
||||||
if (Object.keys(form.value).length === 0) {
|
if (Object.keys(form.value).length === 0) {
|
||||||
uni.navigateBack();
|
uni.navigateBack();
|
||||||
@ -162,6 +176,8 @@ onLoad(options => {
|
|||||||
customerId.value = options.customerId || '';
|
customerId.value = options.customerId || '';
|
||||||
corpId.value = options.corpId;
|
corpId.value = options.corpId;
|
||||||
teamId.value = options.teamId;
|
teamId.value = options.teamId;
|
||||||
|
const nextTypeStr = typeof options.nextTypes === 'string' ? options.nextTypes : '';
|
||||||
|
nextTypes.value = nextTypeStr.split(',');
|
||||||
uni.setNavigationBarTitle({ title: id.value ? '编辑健康档案' : '新增健康档案' })
|
uni.setNavigationBarTitle({ title: id.value ? '编辑健康档案' : '新增健康档案' })
|
||||||
})
|
})
|
||||||
useLoad(options => {
|
useLoad(options => {
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<view v-if="currentTeam" class="w-0 flex-grow mr-5text-base text-white truncate">
|
<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>
|
||||||
<view v-if="team && team.supportPatientForward === 'YES'"
|
<view v-if="team && team.supportPatientForward === 'YES'"
|
||||||
class="relative flex-shrink-0 flex items-center bg-white rounded-sm px-10">
|
class="relative flex-shrink-0 flex items-center bg-white rounded-sm px-10">
|
||||||
@ -49,7 +49,7 @@
|
|||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</view>
|
</view>
|
||||||
<view class="text-base text-gray leading-normal">
|
<view class="text-base text-gray leading-normal">
|
||||||
{{ item.leaderCorp || item.corpName || '' }}
|
{{ item.licenseHospitalName || item.leaderCorp || item.corpName || '' }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex">
|
<view class="flex">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user