履约验收
This commit is contained in:
BIN
public/templates/lvys-template-C.docx
Normal file
BIN
public/templates/lvys-template-C.docx
Normal file
Binary file not shown.
BIN
public/templates/lyys-template-A.docx
Normal file
BIN
public/templates/lyys-template-A.docx
Normal file
Binary file not shown.
BIN
public/templates/lyys-template-B.docx
Normal file
BIN
public/templates/lyys-template-B.docx
Normal file
Binary file not shown.
@@ -189,9 +189,9 @@ const form = reactive({
|
||||
acceptDate: '',
|
||||
acceptContents: [] as any[],
|
||||
acceptTeam: [
|
||||
{ name: '', deptCode: '', deptName: '', roleType: '' },
|
||||
{ name: '', deptCode: '', deptName: '', roleType: '' },
|
||||
{ name: '', deptCode: '', deptName: '', roleType: '' },
|
||||
{ name: '', deptCode: '', deptName: '', teacherNo: '', roleType: '' },
|
||||
{ name: '', deptCode: '', deptName: '', teacherNo: '', roleType: '' },
|
||||
{ name: '', deptCode: '', deptName: '', teacherNo: '', roleType: '' },
|
||||
] as any[],
|
||||
templateFileIds: [] as string[],
|
||||
acceptAddress: '',
|
||||
@@ -206,6 +206,15 @@ watch(() => props.modelValue, (val) => {
|
||||
if (!props.canFill && form.acceptType === '1') {
|
||||
form.acceptType = '2'
|
||||
}
|
||||
// 编辑回显:校内成员根据 name/deptCode/deptName/teacherNo 构建 userList 供 org-selector 显示
|
||||
if (Array.isArray(form.acceptTeam)) {
|
||||
form.acceptTeam.forEach((m: any) => {
|
||||
const isIn = m.roleType === 'LEADER_IN' || m.roleType === 'MEMBER_IN'
|
||||
if (isIn && (m.name || m.teacherNo) && !(m.userList && m.userList.length)) {
|
||||
m.userList = buildUserListFromTeamItem(m)
|
||||
}
|
||||
})
|
||||
}
|
||||
}, { deep: true })
|
||||
watch(form, () => emit('update:modelValue', { ...form }), { deep: true })
|
||||
// 金额≥30万时,默认选中上传方式
|
||||
@@ -239,7 +248,7 @@ watch(() => form.templateFileIds, (arr) => {
|
||||
}, { immediate: true, deep: true })
|
||||
|
||||
const addTeam = () => {
|
||||
form.acceptTeam.push({ name: '', deptCode: '', deptName: '', roleType: '' })
|
||||
form.acceptTeam.push({ name: '', deptCode: '', deptName: '', teacherNo: '', roleType: '' })
|
||||
}
|
||||
|
||||
const removeTeam = (idx: number) => {
|
||||
@@ -254,7 +263,9 @@ const onCopyFromBatch = (n: number | null) => {
|
||||
name: m.name || '',
|
||||
deptCode: m.deptCode || '',
|
||||
deptName: m.deptName || '',
|
||||
teacherNo: m.teacherNo || '',
|
||||
roleType: m.roleType || '',
|
||||
userList: buildUserListFromTeamItem(m),
|
||||
}))
|
||||
}
|
||||
copyFromBatch.value = null
|
||||
@@ -279,6 +290,22 @@ const onRoleChange = (idx: number, val: string) => {
|
||||
}
|
||||
}
|
||||
|
||||
/** 从接口返回的成员项构建 org-selector 所需的 userList(编辑回显用) */
|
||||
const buildUserListFromTeamItem = (t: any) => {
|
||||
if (!t?.name && !t?.teacherNo) return []
|
||||
return [
|
||||
{
|
||||
id: t.teacherNo || t.name,
|
||||
name: t.name || '',
|
||||
type: 'user',
|
||||
deptCode: t.deptCode,
|
||||
deptName: t.deptName,
|
||||
teacherNo: t.teacherNo,
|
||||
realName: t.name,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
const onTeamUserChange = (idx: number, list: any[]) => {
|
||||
const m = form.acceptTeam[idx]
|
||||
if (!m) return
|
||||
@@ -287,11 +314,13 @@ const onTeamUserChange = (idx: number, list: any[]) => {
|
||||
m.name = u.name || u.realName || ''
|
||||
m.deptCode = u.deptCode || u.commonDeptCode || ''
|
||||
m.deptName = u.deptName || u.commonDeptName || ''
|
||||
m.teacherNo = u.teacherNo ?? u.username ?? u.id ?? ''
|
||||
m.userList = list
|
||||
} else {
|
||||
m.name = ''
|
||||
m.deptCode = ''
|
||||
m.deptName = ''
|
||||
m.teacherNo = ''
|
||||
m.userList = []
|
||||
}
|
||||
}
|
||||
|
||||
@@ -287,12 +287,13 @@ const loadBatchDetails = async () => {
|
||||
name: t.name,
|
||||
deptCode: t.deptCode,
|
||||
deptName: t.deptName,
|
||||
teacherNo: t.teacherNo || '',
|
||||
roleType: t.roleType || '',
|
||||
})),
|
||||
}
|
||||
if (batchForms[b.batch].acceptTeam.length < 3) {
|
||||
while (batchForms[b.batch].acceptTeam.length < 3) {
|
||||
batchForms[b.batch].acceptTeam.push({ name: '', deptCode: '', deptName: '' })
|
||||
batchForms[b.batch].acceptTeam.push({ name: '', deptCode: '', deptName: '', teacherNo: '', roleType: '' })
|
||||
}
|
||||
}
|
||||
if (acceptanceItems.value.length && (!batchForms[b.batch].acceptContents || batchForms[b.batch].acceptContents.length === 0)) {
|
||||
|
||||
Reference in New Issue
Block a user