Merge branch 'developer' of ssh://code.cyweb.top:30033/scj/zhxy/v3/cloud-ui into developer
This commit is contained in:
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.
BIN
public/templates/lyys-template-C.docx
Normal file
BIN
public/templates/lyys-template-C.docx
Normal file
Binary file not shown.
@@ -76,3 +76,19 @@ export function delObj(id: string | number) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代理汇总(按条件统计各代理的项目数、预算金额、合同金额)
|
||||||
|
*/
|
||||||
|
export function getAgentSummary(params?: {
|
||||||
|
deptCode?: string
|
||||||
|
planStartDate?: string
|
||||||
|
planEndDate?: string
|
||||||
|
hasAcceptEvaluation?: string
|
||||||
|
}) {
|
||||||
|
return request({
|
||||||
|
url: '/purchase/purchasingagent/summary',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -76,6 +76,20 @@ export function submitObj(obj: any) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分配招标代理(指定或随机),仅学校统一采购或部门自行采购且委托采购中心采购时可用
|
||||||
|
* @param applyId 采购申请ID
|
||||||
|
* @param mode random | designated
|
||||||
|
* @param agentId 指定模式时的代理ID
|
||||||
|
*/
|
||||||
|
export function assignAgent(applyId: number | string, mode: 'random' | 'designated', agentId?: string) {
|
||||||
|
return request({
|
||||||
|
url: '/purchase/purchasingapply/assign-agent',
|
||||||
|
method: 'post',
|
||||||
|
data: { id: Number(applyId), mode, agentId: agentId || undefined }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改采购申请
|
* 修改采购申请
|
||||||
* @param obj 对象数据
|
* @param obj 对象数据
|
||||||
|
|||||||
@@ -135,14 +135,22 @@ export function getAcceptanceItems(acceptanceType: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 下载履约验收模板
|
* 导出履约验收评价表(仅填写模式可导出)
|
||||||
|
* 单期返回 docx,exportAll=true 时返回全部期数 zip
|
||||||
*/
|
*/
|
||||||
export function downloadPerformanceAcceptanceTemplate(purchaseId: string, batch?: number) {
|
export function downloadPerformanceAcceptanceTemplate(
|
||||||
|
purchaseId: string,
|
||||||
|
batch?: number,
|
||||||
|
exportAll?: boolean
|
||||||
|
) {
|
||||||
|
const params: Record<string, any> = { purchaseId }
|
||||||
|
if (exportAll === true) params.exportAll = true
|
||||||
|
else if (batch != null) params.batch = batch
|
||||||
return request({
|
return request({
|
||||||
url: '/purchase/purchasingAccept/export-performance-acceptance-template',
|
url: '/purchase/purchasingAccept/export-performance-acceptance-template',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: { purchaseId, batch },
|
params,
|
||||||
responseType: 'blob' // 重要:用于文件下载
|
responseType: 'blob'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
30
src/api/recruit/recruitMajorCategory.ts
Normal file
30
src/api/recruit/recruitMajorCategory.ts
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
import request from "/@/utils/request"
|
||||||
|
|
||||||
|
// ========== 基础CRUD接口 ==========
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询列表数据
|
||||||
|
* @param query - 查询参数对象
|
||||||
|
* @returns Promise<分页数据>
|
||||||
|
*/
|
||||||
|
export function fetchList(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/recruit/recruitMajorCategory/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取专业类目树结构
|
||||||
|
* @param obj - 查询参数对象(包含ID等)
|
||||||
|
* @returns Promise<数据详情>
|
||||||
|
*/
|
||||||
|
export function majorCateTree(obj?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/recruit/recruitMajorCategory/majorCateTree',
|
||||||
|
method: 'get',
|
||||||
|
params: obj
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
@@ -176,7 +176,6 @@ const dataRules = reactive({
|
|||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
}],
|
}],
|
||||||
path: [{validator: rule.overLength, trigger: 'blur'}, {required: true, message: '路径不能为空', trigger: 'blur'}],
|
path: [{validator: rule.overLength, trigger: 'blur'}, {required: true, message: '路径不能为空', trigger: 'blur'}],
|
||||||
icon: [{validator: rule.overLength, trigger: 'blur'}, {required: true, message: '图标不能为空', trigger: 'blur'}],
|
|
||||||
permission: [{validator: rule.overLength, trigger: 'blur'}, {
|
permission: [{validator: rule.overLength, trigger: 'blur'}, {
|
||||||
required: true,
|
required: true,
|
||||||
message: '权限代码不能为空',
|
message: '权限代码不能为空',
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="visible"
|
v-model="visible"
|
||||||
:title="dialogTitle"
|
:title="dialogTitle"
|
||||||
width="50%"
|
width="80%"
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:close-on-press-escape="false"
|
:close-on-press-escape="false"
|
||||||
@@ -122,7 +122,13 @@ defineExpose({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.role-group {
|
.role-group {
|
||||||
|
width: 100%;
|
||||||
|
flex: 0 0 100%;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px 12px;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
@@ -137,8 +143,9 @@ defineExpose({
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
align-items: flex-start;
|
||||||
|
|
||||||
/* 每个按钮独立边框,换行后左侧也有边线 */
|
/* 每个分组内按钮可换行,分组之间不重叠 */
|
||||||
:deep(.el-radio-button) {
|
:deep(.el-radio-button) {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,8 +39,8 @@
|
|||||||
icon="Files"
|
icon="Files"
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
|
@click="openSummaryDialog"
|
||||||
>
|
>
|
||||||
代理汇总
|
代理汇总
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
@@ -119,19 +119,165 @@
|
|||||||
|
|
||||||
<!-- 编辑、新增表单对话框 -->
|
<!-- 编辑、新增表单对话框 -->
|
||||||
<FormDialog ref="formDialogRef" @refresh="getDataList" />
|
<FormDialog ref="formDialogRef" @refresh="getDataList" />
|
||||||
|
|
||||||
|
<!-- 代理汇总弹窗 -->
|
||||||
|
<el-dialog
|
||||||
|
v-model="summaryDialogVisible"
|
||||||
|
title="代理数据汇总"
|
||||||
|
width="85%"
|
||||||
|
destroy-on-close
|
||||||
|
class="agent-summary-dialog"
|
||||||
|
>
|
||||||
|
<el-form :model="summaryQuery" inline class="summary-query-form">
|
||||||
|
<el-form-item label="需求部门">
|
||||||
|
<el-select
|
||||||
|
v-model="summaryQuery.deptCode"
|
||||||
|
placeholder="请选择"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
style="width: 200px"
|
||||||
|
>
|
||||||
|
<el-option v-for="d in deptOptions" :key="d.value" :label="d.label" :value="d.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="计划采购开始时间">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="summaryQuery.planStartDate"
|
||||||
|
type="date"
|
||||||
|
placeholder="请选择"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
style="width: 180px"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="计划采购结束时间">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="summaryQuery.planEndDate"
|
||||||
|
type="date"
|
||||||
|
placeholder="请选择"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
style="width: 180px"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否履约评价">
|
||||||
|
<el-select v-model="summaryQuery.hasAcceptEvaluation" placeholder="请选择" clearable style="width: 140px">
|
||||||
|
<el-option label="已履约评价" value="1" />
|
||||||
|
<el-option label="未履约评价" value="0" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="Search" @click="querySummary">查询</el-button>
|
||||||
|
<el-button @click="clearSummaryQuery">清空</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-table
|
||||||
|
:data="summaryList"
|
||||||
|
v-loading="summaryLoading"
|
||||||
|
border
|
||||||
|
stripe
|
||||||
|
max-height="400"
|
||||||
|
class="summary-table"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||||
|
<el-table-column prop="agentName" label="代理机构" min-width="200" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="projectCount" label="代理项目" width="100" align="center" />
|
||||||
|
<el-table-column prop="budgetAmount" label="预算金额" width="140" align="right">
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ formatMoney(row.budgetAmount) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="contractAmount" label="合同(成交)金额" width="140" align="right">
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ formatMoney(row.contractAmount) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts" name="PurchaseAgent">
|
<script setup lang="ts" name="PurchaseAgent">
|
||||||
import { ref, reactive, defineAsyncComponent } from 'vue'
|
import { ref, reactive, defineAsyncComponent } from 'vue'
|
||||||
import { BasicTableProps, useTable } from "/@/hooks/table";
|
import { BasicTableProps, useTable } from "/@/hooks/table";
|
||||||
import { getPage, delObj } from "/@/api/finance/purchaseagent";
|
import { getPage, delObj, getAgentSummary } from "/@/api/finance/purchaseagent";
|
||||||
|
import { deptTree } from '/@/api/admin/dept';
|
||||||
import { useMessage, useMessageBox } from "/@/hooks/message";
|
import { useMessage, useMessageBox } from "/@/hooks/message";
|
||||||
import { List, Document, EditPen, Clock, Search } from '@element-plus/icons-vue'
|
import { List, Document, EditPen, Clock, Search } from '@element-plus/icons-vue'
|
||||||
|
|
||||||
// 引入组件
|
// 引入组件
|
||||||
const FormDialog = defineAsyncComponent(() => import('./form.vue'));
|
const FormDialog = defineAsyncComponent(() => import('./form.vue'));
|
||||||
|
|
||||||
|
/** 代理汇总弹窗 */
|
||||||
|
const summaryDialogVisible = ref(false);
|
||||||
|
const summaryLoading = ref(false);
|
||||||
|
const summaryList = ref<any[]>([]);
|
||||||
|
const summaryQuery = reactive({
|
||||||
|
deptCode: '',
|
||||||
|
planStartDate: '',
|
||||||
|
planEndDate: '',
|
||||||
|
hasAcceptEvaluation: '',
|
||||||
|
});
|
||||||
|
const deptOptions = ref<{ label: string; value: string }[]>([]);
|
||||||
|
|
||||||
|
const flattenDept = (nodes: any[], list: { label: string; value: string }[]) => {
|
||||||
|
if (!nodes || !Array.isArray(nodes)) return;
|
||||||
|
nodes.forEach((n: any) => {
|
||||||
|
const code = n.deptId ?? n.id ?? n.deptCode;
|
||||||
|
const name = n.name ?? n.deptName ?? '';
|
||||||
|
if (code != null && String(code)) list.push({ label: name || String(code), value: String(code) });
|
||||||
|
if (n.children?.length) flattenDept(n.children, list);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const openSummaryDialog = async () => {
|
||||||
|
summaryDialogVisible.value = true;
|
||||||
|
if (deptOptions.value.length === 0) {
|
||||||
|
try {
|
||||||
|
const res = await deptTree();
|
||||||
|
const tree = res?.data ?? res ?? [];
|
||||||
|
const list: { label: string; value: string }[] = [];
|
||||||
|
flattenDept(Array.isArray(tree) ? tree : [], list);
|
||||||
|
deptOptions.value = list;
|
||||||
|
} catch (_) {
|
||||||
|
deptOptions.value = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
querySummary();
|
||||||
|
};
|
||||||
|
|
||||||
|
const querySummary = async () => {
|
||||||
|
summaryLoading.value = true;
|
||||||
|
try {
|
||||||
|
const res = await getAgentSummary({
|
||||||
|
deptCode: summaryQuery.deptCode || undefined,
|
||||||
|
planStartDate: summaryQuery.planStartDate || undefined,
|
||||||
|
planEndDate: summaryQuery.planEndDate || undefined,
|
||||||
|
hasAcceptEvaluation: summaryQuery.hasAcceptEvaluation || undefined,
|
||||||
|
});
|
||||||
|
summaryList.value = res?.data && Array.isArray(res.data) ? res.data : [];
|
||||||
|
} catch (_) {
|
||||||
|
summaryList.value = [];
|
||||||
|
} finally {
|
||||||
|
summaryLoading.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const clearSummaryQuery = () => {
|
||||||
|
summaryQuery.deptCode = '';
|
||||||
|
summaryQuery.planStartDate = '';
|
||||||
|
summaryQuery.planEndDate = '';
|
||||||
|
summaryQuery.hasAcceptEvaluation = '';
|
||||||
|
querySummary();
|
||||||
|
};
|
||||||
|
|
||||||
|
const formatMoney = (v: any) => {
|
||||||
|
if (v == null || v === '') return '—';
|
||||||
|
const n = Number(v);
|
||||||
|
if (Number.isNaN(n)) return String(v);
|
||||||
|
return n.toLocaleString('zh-CN', { minimumFractionDigits: 0, maximumFractionDigits: 2 });
|
||||||
|
};
|
||||||
|
|
||||||
// 定义变量内容
|
// 定义变量内容
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const formDialogRef = ref()
|
const formDialogRef = ref()
|
||||||
|
|||||||
@@ -59,8 +59,17 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 上传方式 -->
|
<!-- 上传方式:先模版下载,再上传 -->
|
||||||
<template v-if="form.acceptType === '2'">
|
<template v-if="form.acceptType === '2'">
|
||||||
|
<el-col :span="12" class="mb20">
|
||||||
|
<el-form-item label="模版下载">
|
||||||
|
<el-link type="primary" :href="lyysTemplateUrl" :download="lyysTemplateDownloadName" target="_blank">
|
||||||
|
<el-icon><Download /></el-icon>
|
||||||
|
{{ lyysTemplateLabel }}
|
||||||
|
</el-link>
|
||||||
|
<!-- <div class="el-form-item__tip">下载后填写并上传;模板文件:templates/lyys-template-{{ projectTypeKey }}.docx</div>-->
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="履约验收模版" prop="templateFileIds">
|
<el-form-item label="履约验收模版" prop="templateFileIds">
|
||||||
<UploadFile
|
<UploadFile
|
||||||
@@ -164,6 +173,14 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, computed, watch } from 'vue'
|
import { ref, reactive, computed, watch } from 'vue'
|
||||||
import type { FormInstance, FormRules } from 'element-plus'
|
import type { FormInstance, FormRules } from 'element-plus'
|
||||||
|
import { Download } from '@element-plus/icons-vue'
|
||||||
|
|
||||||
|
/** 项目类型 A:货物 B:工程 C:服务,与 public/templates/lyys-template-A|B|C.docx 对应 */
|
||||||
|
const LYYS_TEMPLATE_MAP: Record<string, { label: string }> = {
|
||||||
|
A: { label: '履约验收表模板(货物)' },
|
||||||
|
B: { label: '履约验收表模板(工程)' },
|
||||||
|
C: { label: '履约验收表模板(服务)' },
|
||||||
|
}
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
@@ -171,11 +188,13 @@ const props = withDefaults(
|
|||||||
canFill: boolean
|
canFill: boolean
|
||||||
readonly?: boolean
|
readonly?: boolean
|
||||||
purchaseId?: string
|
purchaseId?: string
|
||||||
|
/** 项目类型 A:货物 B:工程 C:服务,用于模版下载 */
|
||||||
|
projectType?: string
|
||||||
acceptanceItems?: any[]
|
acceptanceItems?: any[]
|
||||||
batchNum?: number
|
batchNum?: number
|
||||||
previousBatchesTeams?: { batch: number; team: any[] }[]
|
previousBatchesTeams?: { batch: number; team: any[] }[]
|
||||||
}>(),
|
}>(),
|
||||||
{ readonly: false, canFill: true, purchaseId: '', batchNum: 1, previousBatchesTeams: () => [] }
|
{ readonly: false, canFill: true, purchaseId: '', projectType: 'A', batchNum: 1, previousBatchesTeams: () => [] }
|
||||||
)
|
)
|
||||||
|
|
||||||
const emit = defineEmits(['update:modelValue'])
|
const emit = defineEmits(['update:modelValue'])
|
||||||
@@ -184,14 +203,19 @@ const formRef = ref<FormInstance>()
|
|||||||
const templateFileIdsStr = ref('')
|
const templateFileIdsStr = ref('')
|
||||||
const copyFromBatch = ref<number | null>(null)
|
const copyFromBatch = ref<number | null>(null)
|
||||||
|
|
||||||
|
const projectTypeKey = computed(() => (props.projectType === 'A' || props.projectType === 'B' || props.projectType === 'C' ? props.projectType : 'A'))
|
||||||
|
const lyysTemplateLabel = computed(() => LYYS_TEMPLATE_MAP[projectTypeKey.value]?.label || LYYS_TEMPLATE_MAP.A.label)
|
||||||
|
const lyysTemplateDownloadName = computed(() => `${lyysTemplateLabel.value}.docx`)
|
||||||
|
const lyysTemplateUrl = computed(() => `/templates/lyys-template-${projectTypeKey.value}.docx`)
|
||||||
|
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
acceptType: '1',
|
acceptType: '1',
|
||||||
acceptDate: '',
|
acceptDate: '',
|
||||||
acceptContents: [] as any[],
|
acceptContents: [] as any[],
|
||||||
acceptTeam: [
|
acceptTeam: [
|
||||||
{ name: '', deptCode: '', deptName: '', roleType: '' },
|
{ name: '', deptCode: '', deptName: '', teacherNo: '', roleType: '' },
|
||||||
{ name: '', deptCode: '', deptName: '', roleType: '' },
|
{ name: '', deptCode: '', deptName: '', teacherNo: '', roleType: '' },
|
||||||
{ name: '', deptCode: '', deptName: '', roleType: '' },
|
{ name: '', deptCode: '', deptName: '', teacherNo: '', roleType: '' },
|
||||||
] as any[],
|
] as any[],
|
||||||
templateFileIds: [] as string[],
|
templateFileIds: [] as string[],
|
||||||
acceptAddress: '',
|
acceptAddress: '',
|
||||||
@@ -206,6 +230,15 @@ watch(() => props.modelValue, (val) => {
|
|||||||
if (!props.canFill && form.acceptType === '1') {
|
if (!props.canFill && form.acceptType === '1') {
|
||||||
form.acceptType = '2'
|
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 })
|
}, { deep: true })
|
||||||
watch(form, () => emit('update:modelValue', { ...form }), { deep: true })
|
watch(form, () => emit('update:modelValue', { ...form }), { deep: true })
|
||||||
// 金额≥30万时,默认选中上传方式
|
// 金额≥30万时,默认选中上传方式
|
||||||
@@ -239,7 +272,7 @@ watch(() => form.templateFileIds, (arr) => {
|
|||||||
}, { immediate: true, deep: true })
|
}, { immediate: true, deep: true })
|
||||||
|
|
||||||
const addTeam = () => {
|
const addTeam = () => {
|
||||||
form.acceptTeam.push({ name: '', deptCode: '', deptName: '', roleType: '' })
|
form.acceptTeam.push({ name: '', deptCode: '', deptName: '', teacherNo: '', roleType: '' })
|
||||||
}
|
}
|
||||||
|
|
||||||
const removeTeam = (idx: number) => {
|
const removeTeam = (idx: number) => {
|
||||||
@@ -254,7 +287,9 @@ const onCopyFromBatch = (n: number | null) => {
|
|||||||
name: m.name || '',
|
name: m.name || '',
|
||||||
deptCode: m.deptCode || '',
|
deptCode: m.deptCode || '',
|
||||||
deptName: m.deptName || '',
|
deptName: m.deptName || '',
|
||||||
|
teacherNo: m.teacherNo || '',
|
||||||
roleType: m.roleType || '',
|
roleType: m.roleType || '',
|
||||||
|
userList: buildUserListFromTeamItem(m),
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
copyFromBatch.value = null
|
copyFromBatch.value = null
|
||||||
@@ -279,6 +314,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 onTeamUserChange = (idx: number, list: any[]) => {
|
||||||
const m = form.acceptTeam[idx]
|
const m = form.acceptTeam[idx]
|
||||||
if (!m) return
|
if (!m) return
|
||||||
@@ -287,11 +338,13 @@ const onTeamUserChange = (idx: number, list: any[]) => {
|
|||||||
m.name = u.name || u.realName || ''
|
m.name = u.name || u.realName || ''
|
||||||
m.deptCode = u.deptCode || u.commonDeptCode || ''
|
m.deptCode = u.deptCode || u.commonDeptCode || ''
|
||||||
m.deptName = u.deptName || u.commonDeptName || ''
|
m.deptName = u.deptName || u.commonDeptName || ''
|
||||||
|
m.teacherNo = u.teacherNo ?? u.username ?? u.id ?? ''
|
||||||
m.userList = list
|
m.userList = list
|
||||||
} else {
|
} else {
|
||||||
m.name = ''
|
m.name = ''
|
||||||
m.deptCode = ''
|
m.deptCode = ''
|
||||||
m.deptName = ''
|
m.deptName = ''
|
||||||
|
m.teacherNo = ''
|
||||||
m.userList = []
|
m.userList = []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,12 +133,18 @@ const syncFormFromModel = (val: Record<string, any> | undefined) => {
|
|||||||
|
|
||||||
const loadContractOptions = async () => {
|
const loadContractOptions = async () => {
|
||||||
if (contractLoaded.value || contractLoading.value) return
|
if (contractLoaded.value || contractLoading.value) return
|
||||||
|
if (form.hasContract !== '1') return
|
||||||
contractLoading.value = true
|
contractLoading.value = true
|
||||||
try {
|
try {
|
||||||
const res = await getContracts(props.purchaseId ? { id: props.purchaseId } : {})
|
const res = await getContracts(props.purchaseId ? { id: props.purchaseId } : {})
|
||||||
const list = res?.data
|
const list = res?.data
|
||||||
contractOptions.value = Array.isArray(list) ? list : []
|
contractOptions.value = Array.isArray(list) ? list : []
|
||||||
contractLoaded.value = true
|
contractLoaded.value = true
|
||||||
|
// 回显时:列表中含当前合同,用其供应商名称填充(若尚未有值)
|
||||||
|
if (form.contractId) {
|
||||||
|
const c = contractOptions.value.find((it: any) => it.id === form.contractId)
|
||||||
|
if (c?.supplierName) form.supplierName = c.supplierName
|
||||||
|
}
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
contractOptions.value = []
|
contractOptions.value = []
|
||||||
} finally {
|
} finally {
|
||||||
@@ -152,7 +158,17 @@ const onContractSelectVisibleChange = (visible: boolean) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(() => props.modelValue, syncFormFromModel, { deep: true, immediate: true })
|
watch(
|
||||||
|
() => props.modelValue,
|
||||||
|
(val) => {
|
||||||
|
syncFormFromModel(val)
|
||||||
|
// 回显:已有合同ID时主动加载合同列表,以便下拉显示合同名称(后端已排除“其他申请”的合同,当前申请合同会在列表中)
|
||||||
|
if (form.hasContract === '1' && form.contractId && props.purchaseId && !contractLoaded.value && !contractLoading.value) {
|
||||||
|
loadContractOptions()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ deep: true, immediate: true }
|
||||||
|
)
|
||||||
// resetKey 变化时强制用 modelValue 覆盖内部 form,并重置合同列表以便重新拉取
|
// resetKey 变化时强制用 modelValue 覆盖内部 form,并重置合同列表以便重新拉取
|
||||||
watch(() => props.resetKey, () => {
|
watch(() => props.resetKey, () => {
|
||||||
syncFormFromModel(props.modelValue)
|
syncFormFromModel(props.modelValue)
|
||||||
|
|||||||
@@ -63,6 +63,7 @@
|
|||||||
:can-fill="canFillForm"
|
:can-fill="canFillForm"
|
||||||
:readonly="false"
|
:readonly="false"
|
||||||
:purchase-id="String(purchaseId)"
|
:purchase-id="String(purchaseId)"
|
||||||
|
:project-type="acceptProjectType"
|
||||||
:acceptance-items="acceptanceItems"
|
:acceptance-items="acceptanceItems"
|
||||||
:batch-num="b.batch"
|
:batch-num="b.batch"
|
||||||
:previous-batches-teams="getPreviousBatchesTeams(b.batch)"
|
:previous-batches-teams="getPreviousBatchesTeams(b.batch)"
|
||||||
@@ -82,16 +83,22 @@
|
|||||||
<template #footer>
|
<template #footer>
|
||||||
<span>
|
<span>
|
||||||
<el-button @click="handleClose">关 闭</el-button>
|
<el-button @click="handleClose">关 闭</el-button>
|
||||||
<!-- 下载履约验收模板按钮 -->
|
<!-- 仅填写履约验收评价表模式可导出;单期 docx,全部期数 zip -->
|
||||||
<el-dropdown split-button type="primary" @click="handleDownloadTemplate" @command="handleDownloadTemplateCommand">
|
<el-dropdown
|
||||||
下载履约模板
|
v-if="showExportDropdown"
|
||||||
|
split-button
|
||||||
|
type="primary"
|
||||||
|
@click="handleDownloadTemplate"
|
||||||
|
@command="handleDownloadTemplateCommand"
|
||||||
|
>
|
||||||
|
导出履约验收评价表
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item command="current" :disabled="!activeBatchId">
|
<el-dropdown-item command="current" :disabled="!canExportCurrentBatch">
|
||||||
下载当前期({{ activeTab }}期)
|
下载当前期({{ activeTab }}期)
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item command="all" :disabled="batches.length === 0">
|
<el-dropdown-item command="all" :disabled="!canExportAllBatches">
|
||||||
下载全部期数
|
下载全部期数(zip)
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
@@ -165,6 +172,20 @@ const activeBatchId = computed(() => {
|
|||||||
return b?.id || ''
|
return b?.id || ''
|
||||||
})
|
})
|
||||||
|
|
||||||
|
/** 项目类型 A:货物 B:工程 C:服务,用于批次表单模版下载 */
|
||||||
|
const acceptProjectType = computed(() => applyInfo.value?.projectType || rowProjectType.value || 'A')
|
||||||
|
|
||||||
|
/** 当前期是否为「填写履约验收评价表」模式,仅此模式可导出 */
|
||||||
|
const canExportCurrentBatch = computed(() => batchForms[Number(activeTab.value)]?.acceptType === '1')
|
||||||
|
/** 是否存在任一批次为填写模式(可导出全部期数 zip) */
|
||||||
|
const canExportAllBatches = computed(() =>
|
||||||
|
batches.value.some((b: any) => batchForms[b.batch]?.acceptType === '1')
|
||||||
|
)
|
||||||
|
/** 仅在有批次且至少一期为填写模式时显示导出下拉 */
|
||||||
|
const showExportDropdown = computed(
|
||||||
|
() => mainTab.value === 'batch' && batches.value.length > 0 && (canExportCurrentBatch.value || canExportAllBatches.value)
|
||||||
|
)
|
||||||
|
|
||||||
const getPreviousBatchesTeams = (batchNum: number) => {
|
const getPreviousBatchesTeams = (batchNum: number) => {
|
||||||
const list: { batch: number; team: any[] }[] = []
|
const list: { batch: number; team: any[] }[] = []
|
||||||
for (let n = 1; n < batchNum; n++) {
|
for (let n = 1; n < batchNum; n++) {
|
||||||
@@ -287,12 +308,13 @@ const loadBatchDetails = async () => {
|
|||||||
name: t.name,
|
name: t.name,
|
||||||
deptCode: t.deptCode,
|
deptCode: t.deptCode,
|
||||||
deptName: t.deptName,
|
deptName: t.deptName,
|
||||||
|
teacherNo: t.teacherNo || '',
|
||||||
roleType: t.roleType || '',
|
roleType: t.roleType || '',
|
||||||
})),
|
})),
|
||||||
}
|
}
|
||||||
if (batchForms[b.batch].acceptTeam.length < 3) {
|
if (batchForms[b.batch].acceptTeam.length < 3) {
|
||||||
while (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)) {
|
if (acceptanceItems.value.length && (!batchForms[b.batch].acceptContents || batchForms[b.batch].acceptContents.length === 0)) {
|
||||||
@@ -399,48 +421,61 @@ const handleClose = () => {
|
|||||||
emit('refresh')
|
emit('refresh')
|
||||||
}
|
}
|
||||||
|
|
||||||
// 下载履约验收模板
|
// 导出履约验收评价表(仅填写模式可导出)
|
||||||
const handleDownloadTemplate = async () => {
|
const handleDownloadTemplate = async () => {
|
||||||
if (!purchaseId.value) {
|
if (!purchaseId.value) {
|
||||||
useMessage().error('请先选择采购项目')
|
useMessage().error('请先选择采购项目')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (!canExportCurrentBatch.value) {
|
||||||
// 默认下载当前期
|
useMessage().error('仅填写履约验收评价表模式可导出,请先选择该模式并保存')
|
||||||
|
return
|
||||||
|
}
|
||||||
await downloadTemplateForBatch(Number(activeTab.value))
|
await downloadTemplateForBatch(Number(activeTab.value))
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理下拉菜单命令
|
|
||||||
const handleDownloadTemplateCommand = async (command: string) => {
|
const handleDownloadTemplateCommand = async (command: string) => {
|
||||||
if (!purchaseId.value) {
|
if (!purchaseId.value) {
|
||||||
useMessage().error('请先选择采购项目')
|
useMessage().error('请先选择采购项目')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (command === 'current') {
|
if (command === 'current') {
|
||||||
|
if (!canExportCurrentBatch.value) {
|
||||||
|
useMessage().error('当前期未选择填写履约验收评价表模式,无法导出')
|
||||||
|
return
|
||||||
|
}
|
||||||
await downloadTemplateForBatch(Number(activeTab.value))
|
await downloadTemplateForBatch(Number(activeTab.value))
|
||||||
} else if (command === 'all') {
|
} else if (command === 'all') {
|
||||||
// 下载全部期数的模板
|
if (!canExportAllBatches.value) {
|
||||||
for (const batch of batches.value) {
|
useMessage().error('没有填写模式的分期可导出')
|
||||||
await downloadTemplateForBatch(batch.batch)
|
return
|
||||||
}
|
}
|
||||||
useMessage().success(`已触发${batches.value.length}期模板下载`)
|
await downloadAllBatchesAsZip()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 为指定批次下载模板
|
|
||||||
const downloadTemplateForBatch = async (batchNum: number) => {
|
const downloadTemplateForBatch = async (batchNum: number) => {
|
||||||
try {
|
try {
|
||||||
const response = await downloadPerformanceAcceptanceTemplate(String(purchaseId.value), batchNum)
|
const response = await downloadPerformanceAcceptanceTemplate(String(purchaseId.value), batchNum)
|
||||||
|
const fileName = `履约验收表-${purchaseId.value}-第${batchNum}期.docx`
|
||||||
// 使用项目中现有的工具函数处理文件下载
|
|
||||||
const fileName = `履约验收表-${purchaseId.value}-第${batchNum}期-${new Date().getTime()}.docx`;
|
|
||||||
handleBlobFile(response, fileName)
|
handleBlobFile(response, fileName)
|
||||||
|
useMessage().success(`第${batchNum}期导出成功`)
|
||||||
useMessage().success(`第${batchNum}期履约模板下载成功`)
|
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.error('下载模板失败:', error)
|
console.error('导出失败:', error)
|
||||||
useMessage().error(error?.msg || '下载履约模板失败')
|
useMessage().error(error?.msg || '导出失败')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const downloadAllBatchesAsZip = async () => {
|
||||||
|
try {
|
||||||
|
const response = await downloadPerformanceAcceptanceTemplate(String(purchaseId.value), undefined, true)
|
||||||
|
const fileName = `履约验收表-${purchaseId.value}-全部期数.zip`
|
||||||
|
handleBlobFile(response, fileName)
|
||||||
|
const count = batches.value.filter((b: any) => batchForms[b.batch]?.acceptType === '1').length
|
||||||
|
useMessage().success(`已导出${count}期,请查收 zip 文件`)
|
||||||
|
} catch (error: any) {
|
||||||
|
console.error('导出全部期数失败:', error)
|
||||||
|
useMessage().error(error?.msg || '导出全部期数失败')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -403,6 +403,17 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 查看时:招标代理(与实施采购信息同风格:分割线+标签值同行) -->
|
||||||
|
<div v-if="isViewMode && dataForm.agentName" class="implement-info-block mb20">
|
||||||
|
<el-divider content-position="left">招标代理</el-divider>
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="12" class="mb16">
|
||||||
|
<div class="view-label">代理名称</div>
|
||||||
|
<div class="view-value">{{ dataForm.agentName }}</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- 查看时:实施采购信息 -->
|
<!-- 查看时:实施采购信息 -->
|
||||||
<div v-if="isViewMode && (dataForm.implementType || viewImplementPurchaseFiles.length)" class="implement-info-block mb20">
|
<div v-if="isViewMode && (dataForm.implementType || viewImplementPurchaseFiles.length)" class="implement-info-block mb20">
|
||||||
<el-divider content-position="left">实施采购信息</el-divider>
|
<el-divider content-position="left">实施采购信息</el-divider>
|
||||||
@@ -616,6 +627,8 @@ const dataForm = reactive({
|
|||||||
implementType: '',
|
implementType: '',
|
||||||
fileFlowInstId: '',
|
fileFlowInstId: '',
|
||||||
fileFlowStatus: '',
|
fileFlowStatus: '',
|
||||||
|
agentId: '',
|
||||||
|
agentName: '',
|
||||||
});
|
});
|
||||||
/** 查看时展示的采购文件列表(实施采购上传的 type=130) */
|
/** 查看时展示的采购文件列表(实施采购上传的 type=130) */
|
||||||
const viewImplementPurchaseFiles = ref<{ id: string; fileTitle?: string; createTime?: string; remark?: string }[]>([]);
|
const viewImplementPurchaseFiles = ref<{ id: string; fileTitle?: string; createTime?: string; remark?: string }[]>([]);
|
||||||
@@ -1147,6 +1160,8 @@ async function loadDetail(applyId: string | number) {
|
|||||||
implementType: detail.implementType ?? '',
|
implementType: detail.implementType ?? '',
|
||||||
fileFlowInstId: detail.fileFlowInstId ?? '',
|
fileFlowInstId: detail.fileFlowInstId ?? '',
|
||||||
fileFlowStatus: detail.fileFlowStatus ?? '',
|
fileFlowStatus: detail.fileFlowStatus ?? '',
|
||||||
|
agentId: detail.agentId ?? '',
|
||||||
|
agentName: detail.agentName ?? '',
|
||||||
});
|
});
|
||||||
setCategoryCodePath();
|
setCategoryCodePath();
|
||||||
currentStep.value = 0;
|
currentStep.value = 0;
|
||||||
|
|||||||
@@ -336,6 +336,61 @@
|
|||||||
|
|
||||||
<!-- 实施采购:iframe 嵌入 implement.vue,供列表与流程页面使用 -->
|
<!-- 实施采购:iframe 嵌入 implement.vue,供列表与流程页面使用 -->
|
||||||
<ImplementForm ref="implementFormRef" @refresh="getDataList" />
|
<ImplementForm ref="implementFormRef" @refresh="getDataList" />
|
||||||
|
|
||||||
|
<!-- 分配代理弹窗 -->
|
||||||
|
<el-dialog
|
||||||
|
v-model="assignAgentDialogVisible"
|
||||||
|
title="分配代理"
|
||||||
|
width="420px"
|
||||||
|
destroy-on-close
|
||||||
|
@close="assignAgentForm.agentId = ''; assignAgentForm.mode = 'designated'"
|
||||||
|
>
|
||||||
|
<el-form label-width="90px">
|
||||||
|
<el-form-item label="分配方式">
|
||||||
|
<el-radio-group v-model="assignAgentForm.mode">
|
||||||
|
<el-radio label="designated">指定</el-radio>
|
||||||
|
<el-radio label="random">随机</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="assignAgentForm.mode === 'designated'" label="招标代理">
|
||||||
|
<el-select
|
||||||
|
v-model="assignAgentForm.agentId"
|
||||||
|
placeholder="请选择招标代理"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
style="width: 100%"
|
||||||
|
:loading="agentListLoading"
|
||||||
|
>
|
||||||
|
<el-option v-for="item in agentList" :key="item.id" :label="item.agentName" :value="item.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="assignAgentCurrentRow?.agentName" label="当前代理">
|
||||||
|
<span>{{ assignAgentCurrentRow.agentName }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<span>
|
||||||
|
<el-button @click="assignAgentDialogVisible = false">取消</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="assignAgentForm.mode === 'random'"
|
||||||
|
type="primary"
|
||||||
|
:loading="assignAgentSubmitting"
|
||||||
|
@click="handleAssignAgentRandom"
|
||||||
|
>
|
||||||
|
随机分配
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-else
|
||||||
|
type="primary"
|
||||||
|
:loading="assignAgentSubmitting"
|
||||||
|
:disabled="!assignAgentForm.agentId"
|
||||||
|
@click="handleAssignAgentDesignated"
|
||||||
|
>
|
||||||
|
确定
|
||||||
|
</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -343,7 +398,8 @@
|
|||||||
import { ref, reactive, defineAsyncComponent, onMounted } from 'vue'
|
import { ref, reactive, defineAsyncComponent, onMounted } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { BasicTableProps, useTable } from "/@/hooks/table";
|
import { BasicTableProps, useTable } from "/@/hooks/table";
|
||||||
import { getPage, delObj, submitObj, getArchiveDownloadUrl, getApplyTemplateDownloadUrl, getFileApplyTemplateDownloadUrl } from "/@/api/finance/purchasingrequisition";
|
import { getPage, delObj, submitObj, getArchiveDownloadUrl, getApplyTemplateDownloadUrl, getFileApplyTemplateDownloadUrl, assignAgent } from "/@/api/finance/purchasingrequisition";
|
||||||
|
import { getPage as getAgentPage } from '/@/api/finance/purchaseagent';
|
||||||
import { useMessage, useMessageBox } from "/@/hooks/message";
|
import { useMessage, useMessageBox } from "/@/hooks/message";
|
||||||
import { getDicts } from '/@/api/admin/dict';
|
import { getDicts } from '/@/api/admin/dict';
|
||||||
import { getTree } from '/@/api/finance/purchasingcategory';
|
import { getTree } from '/@/api/finance/purchasingcategory';
|
||||||
@@ -382,6 +438,75 @@ const currFlowCommentType = ref<'apply' | 'file'>('apply')
|
|||||||
|
|
||||||
const implementFormRef = ref()
|
const implementFormRef = ref()
|
||||||
|
|
||||||
|
/** 分配代理弹窗 */
|
||||||
|
const assignAgentDialogVisible = ref(false)
|
||||||
|
const assignAgentCurrentRow = ref<any>(null)
|
||||||
|
const assignAgentForm = reactive({ mode: 'designated' as 'designated' | 'random', agentId: '' })
|
||||||
|
const agentList = ref<any[]>([])
|
||||||
|
const agentListLoading = ref(false)
|
||||||
|
const assignAgentSubmitting = ref(false)
|
||||||
|
|
||||||
|
const openAssignAgentDialog = async (row: any) => {
|
||||||
|
assignAgentCurrentRow.value = row
|
||||||
|
assignAgentForm.mode = 'designated'
|
||||||
|
assignAgentForm.agentId = ''
|
||||||
|
assignAgentDialogVisible.value = true
|
||||||
|
agentListLoading.value = true
|
||||||
|
try {
|
||||||
|
const res = await getAgentPage({ size: 500, current: 1 })
|
||||||
|
const records = res?.data?.records ?? res?.records ?? []
|
||||||
|
agentList.value = Array.isArray(records) ? records : []
|
||||||
|
} catch (_) {
|
||||||
|
agentList.value = []
|
||||||
|
} finally {
|
||||||
|
agentListLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleAssignAgentRandom = async () => {
|
||||||
|
const row = assignAgentCurrentRow.value
|
||||||
|
const id = row?.id ?? row?.purchaseId
|
||||||
|
if (id == null || id === '') {
|
||||||
|
useMessage().warning('无法获取申请单ID')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
assignAgentSubmitting.value = true
|
||||||
|
try {
|
||||||
|
await assignAgent(Number(id), 'random')
|
||||||
|
useMessage().success('随机分配代理成功')
|
||||||
|
assignAgentDialogVisible.value = false
|
||||||
|
getDataList()
|
||||||
|
} catch (e: any) {
|
||||||
|
useMessage().error(e?.msg || '随机分配代理失败')
|
||||||
|
} finally {
|
||||||
|
assignAgentSubmitting.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleAssignAgentDesignated = async () => {
|
||||||
|
const row = assignAgentCurrentRow.value
|
||||||
|
const id = row?.id ?? row?.purchaseId
|
||||||
|
if (id == null || id === '') {
|
||||||
|
useMessage().warning('无法获取申请单ID')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!assignAgentForm.agentId) {
|
||||||
|
useMessage().warning('请选择招标代理')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
assignAgentSubmitting.value = true
|
||||||
|
try {
|
||||||
|
await assignAgent(Number(id), 'designated', assignAgentForm.agentId)
|
||||||
|
useMessage().success('指定代理成功')
|
||||||
|
assignAgentDialogVisible.value = false
|
||||||
|
getDataList()
|
||||||
|
} catch (e: any) {
|
||||||
|
useMessage().error(e?.msg || '指定代理失败')
|
||||||
|
} finally {
|
||||||
|
assignAgentSubmitting.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义响应式表格数据
|
* 定义响应式表格数据
|
||||||
*/
|
*/
|
||||||
@@ -561,6 +686,12 @@ const getActionMenuItems = (row: any) => {
|
|||||||
icon: Download,
|
icon: Download,
|
||||||
visible: () => true,
|
visible: () => true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
command: 'assignAgent',
|
||||||
|
label: '分配代理',
|
||||||
|
icon: Collection,
|
||||||
|
visible: () => row?.purchaseMode === '2' || (row?.purchaseMode === '0' && row?.purchaseType === '4'),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -591,6 +722,9 @@ const handleMoreCommand = (command: string, row: any) => {
|
|||||||
case 'downloadFileApply':
|
case 'downloadFileApply':
|
||||||
handleDownloadFileApply(row);
|
handleDownloadFileApply(row);
|
||||||
break;
|
break;
|
||||||
|
case 'assignAgent':
|
||||||
|
openAssignAgentDialog(row);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -208,7 +208,7 @@
|
|||||||
<el-table-column label="家长电话1" align="center" prop="parentTelOne" show-overflow-tooltip></el-table-column>
|
<el-table-column label="家长电话1" align="center" prop="parentTelOne" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="家长电话2" align="center" prop="parentTelTwo" show-overflow-tooltip></el-table-column>
|
<el-table-column label="家长电话2" align="center" prop="parentTelTwo" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="remarks" label="备注" align="center" show-overflow-tooltip />
|
<el-table-column prop="remarks" label="备注" align="center" show-overflow-tooltip />
|
||||||
<el-table-column label="操作" width="100" align="center" fixed="right">
|
<el-table-column label="操作" width="300" align="center" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="hasAuth('recruit_newstucheckin_edit')"
|
v-if="hasAuth('recruit_newstucheckin_edit')"
|
||||||
@@ -219,6 +219,19 @@
|
|||||||
>
|
>
|
||||||
报到
|
报到
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
|
<el-button
|
||||||
|
v-if="hasAuth('recruit_recruitstudentsignup_leaveSchool')"
|
||||||
|
type="primary"
|
||||||
|
link
|
||||||
|
icon="EditPen"
|
||||||
|
@click="handleLeaveSchool(scope.row, false)"
|
||||||
|
>
|
||||||
|
退档
|
||||||
|
</el-button>
|
||||||
|
<el-button v-if="hasAuth('recruit_leaveSchool_force')" type="primary" link icon="EditPen" @click="handleLeaveSchool(scope.row, true)">
|
||||||
|
强制退档
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -240,7 +253,7 @@
|
|||||||
import { ref, reactive, onMounted, defineAsyncComponent } from 'vue'
|
import { ref, reactive, onMounted, defineAsyncComponent } from 'vue'
|
||||||
import { useAuth } from '/@/hooks/auth'
|
import { useAuth } from '/@/hooks/auth'
|
||||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||||
import { useMessage } from '/@/hooks/message'
|
import {useMessage, useMessageBox} from '/@/hooks/message'
|
||||||
import { fetchList } from '/@/api/recruit/newstucheckin'
|
import { fetchList } from '/@/api/recruit/newstucheckin'
|
||||||
import { getDictsByTypes } from '/@/api/admin/dict'
|
import { getDictsByTypes } from '/@/api/admin/dict'
|
||||||
import { useDict } from '/@/hooks/dict'
|
import { useDict } from '/@/hooks/dict'
|
||||||
@@ -251,6 +264,7 @@ import { getList } from '/@/api/recruit/recruitstudentplangroup'
|
|||||||
import DetailPopover from '/@/components/DetailPopover/index.vue'
|
import DetailPopover from '/@/components/DetailPopover/index.vue'
|
||||||
import ClickableTag from '/@/components/ClickableTag/index.vue'
|
import ClickableTag from '/@/components/ClickableTag/index.vue'
|
||||||
import { InfoFilled, CircleCheck, CircleClose, DocumentChecked, Warning, Clock } from '@element-plus/icons-vue'
|
import { InfoFilled, CircleCheck, CircleClose, DocumentChecked, Warning, Clock } from '@element-plus/icons-vue'
|
||||||
|
import {leaveSchool} from "/@/api/recruit/recruitstudentsignup";
|
||||||
|
|
||||||
const StuCheckIn = defineAsyncComponent(() => import('./stu-check-in.vue'))
|
const StuCheckIn = defineAsyncComponent(() => import('./stu-check-in.vue'))
|
||||||
const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue'))
|
const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue'))
|
||||||
@@ -430,6 +444,19 @@ const init = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleLeaveSchool = (row: any, force: any) => {
|
||||||
|
var str = force? '强制' : '';
|
||||||
|
useMessageBox()
|
||||||
|
.confirm('是否确认'+str+'办理退档操作?请谨慎操作')
|
||||||
|
.then(() => {
|
||||||
|
return leaveSchool({ 'id':row.id,'force':force });
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
message.success('操作成功');
|
||||||
|
getDataList();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
|
|||||||
129
src/views/recruit/recruitMajorCategory/index.vue
Normal file
129
src/views/recruit/recruitMajorCategory/index.vue
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
<template>
|
||||||
|
<div class="layout-padding">
|
||||||
|
<div class="layout-padding-auto layout-padding-view">
|
||||||
|
|
||||||
|
<!-- 操作按钮区域 -->
|
||||||
|
<el-row>
|
||||||
|
<div class="mb8" style="width: 100%">
|
||||||
|
<right-toolbar
|
||||||
|
v-model:showSearch="showSearch"
|
||||||
|
:export="'recruit_recruitMajorCategory_export'"
|
||||||
|
@exportExcel="exportExcel"
|
||||||
|
class="ml10 mr20"
|
||||||
|
style="float: right;"
|
||||||
|
@queryTable="getDataList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 数据表格区域 -->
|
||||||
|
<el-table
|
||||||
|
:data="state.dataList"
|
||||||
|
v-loading="state.loading"
|
||||||
|
border
|
||||||
|
:cell-style="tableStyle.cellStyle"
|
||||||
|
:header-cell-style="tableStyle.headerCellStyle"
|
||||||
|
@selection-change="selectionChangHandle"
|
||||||
|
@sort-change="sortChangeHandle"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" label="#" width="40" />
|
||||||
|
<el-table-column
|
||||||
|
prop="oneCategory"
|
||||||
|
label="一级类目"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="twoCategory"
|
||||||
|
label="二级类目"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="oneTitle"
|
||||||
|
label="一级类目名称"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="twoTitle"
|
||||||
|
label="二级类目"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<!-- 分页组件 -->
|
||||||
|
<pagination
|
||||||
|
@size-change="sizeChangeHandle"
|
||||||
|
@current-change="currentChangeHandle"
|
||||||
|
v-bind="state.pagination"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 导入excel弹窗 (需要在 upms-biz/resources/file 下维护模板) -->
|
||||||
|
<upload-excel
|
||||||
|
ref="excelUploadRef"
|
||||||
|
title="导入"
|
||||||
|
url="/recruit/recruitMajorCategory/import"
|
||||||
|
temp-url="/admin/sys-file/local/file/recruitMajorCategory.xlsx"
|
||||||
|
@refreshDataList="getDataList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts" name="systemRecruitMajorCategory">
|
||||||
|
// ========== 导入声明 ==========
|
||||||
|
import { BasicTableProps, useTable } from "/@/hooks/table";
|
||||||
|
import { fetchList } from "/@/api/recruit/recruitMajorCategory";
|
||||||
|
|
||||||
|
// ========== 组件声明 ==========
|
||||||
|
// 异步加载表单弹窗组件
|
||||||
|
|
||||||
|
// ========== 字典数据 ==========
|
||||||
|
|
||||||
|
// ========== 组件引用 ==========
|
||||||
|
const excelUploadRef = ref(); // Excel上传弹窗引用
|
||||||
|
const queryRef = ref(); // 查询表单引用
|
||||||
|
|
||||||
|
// ========== 响应式数据 ==========
|
||||||
|
const showSearch = ref(true); // 是否显示搜索区域
|
||||||
|
const selectObjs = ref([]) as any; // 表格多选数据
|
||||||
|
const multiple = ref(true); // 是否多选
|
||||||
|
|
||||||
|
// ========== 表格状态 ==========
|
||||||
|
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||||
|
queryForm: {}, // 查询参数
|
||||||
|
pageList: fetchList // 分页查询方法
|
||||||
|
});
|
||||||
|
|
||||||
|
// ========== Hook引用 ==========
|
||||||
|
// 表格相关Hook
|
||||||
|
const {
|
||||||
|
getDataList,
|
||||||
|
currentChangeHandle,
|
||||||
|
sizeChangeHandle,
|
||||||
|
sortChangeHandle,
|
||||||
|
downBlobFile,
|
||||||
|
tableStyle
|
||||||
|
} = useTable(state);
|
||||||
|
|
||||||
|
// ========== 方法定义 ==========
|
||||||
|
/**
|
||||||
|
* 重置查询条件
|
||||||
|
*/
|
||||||
|
const resetQuery = () => {
|
||||||
|
// 清空搜索条件
|
||||||
|
queryRef.value?.resetFields();
|
||||||
|
// 清空多选
|
||||||
|
selectObjs.value = [];
|
||||||
|
// 重新查询
|
||||||
|
getDataList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表格多选事件处理
|
||||||
|
* @param objs 选中的数据行
|
||||||
|
*/
|
||||||
|
const selectionChangHandle = (objs: { id: string }[]) => {
|
||||||
|
selectObjs.value = objs.map(({ id }) => id);
|
||||||
|
multiple.value = !objs.length;
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
||||||
@@ -1,253 +1,189 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" v-model="visible" width="800px">
|
||||||
:title="!dataForm.id ? '新增' : '修改'"
|
<el-form :model="dataForm" :rules="dataRule" ref="dataFormRef" @keyup.enter="dataFormSubmit" label-width="100px">
|
||||||
:close-on-click-modal="false"
|
<el-form-item label="招生计划" prop="groupId">
|
||||||
v-model="visible"
|
<el-select v-model="dataForm.groupId" filterable placeholder="请选择招生计划">
|
||||||
width="800px"
|
<el-option v-for="item in planList" :key="item.id" :label="item.groupName" :value="item.id"> </el-option>
|
||||||
>
|
</el-select>
|
||||||
<el-form :model="dataForm" :rules="dataRule" ref="dataFormRef" @keyup.enter="dataFormSubmit"
|
</el-form-item>
|
||||||
label-width="100px">
|
<el-form-item label="专业序号" prop="majorCode">
|
||||||
|
<el-input v-model="dataForm.majorCode" placeholder="专业序号"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="专业名称" prop="majorName">
|
||||||
|
<el-input v-model="dataForm.majorName" placeholder="专业名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="专业规范名称" class="form-item-cascader">
|
||||||
|
<el-cascader v-model="chooseMajorCate" :options="majorCateTreeData" @change="handleChange" style="width: 100%" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="所属学院" prop="deptCode">
|
||||||
|
<el-select v-model="dataForm.deptCode" filterable placeholder="请选择">
|
||||||
|
<el-option v-for="item in deptList" :key="item.deptCode" :label="item.deptName" :value="item.deptCode"> </el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="学制" prop="learnYear">
|
||||||
|
<el-select v-model="dataForm.learnYear" filterable placeholder="请选择学制">
|
||||||
|
<el-option v-for="item in majorYears" :key="item.value" :label="item.label" :value="item.value"> </el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="层次" prop="majorLevel">
|
||||||
|
<el-select v-model="dataForm.majorLevel" filterable placeholder="请选择层次">
|
||||||
|
<el-option v-for="item in ccList" :key="item.label" :label="item.label" :value="item.label"> </el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="中德班" prop="isZd">
|
||||||
|
<el-radio-group v-model="dataForm.isZd">
|
||||||
|
<el-radio v-for="item in yes_no_type" :key="item.value" :label="item.value">{{ item.label }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="订单班" prop="isOrder">
|
||||||
|
<el-radio-group v-model="dataForm.isOrder">
|
||||||
|
<el-radio v-for="item in yes_no_type" :key="item.value" :label="item.value">{{ item.label }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="联院班" prop="isUnion">
|
||||||
|
<el-radio-group v-model="dataForm.isUnion">
|
||||||
|
<el-radio v-for="item in yes_no_type" :key="item.value" :label="item.value">{{ item.label }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-form-item label="正式专业代码" prop="stuworkMajorCode">
|
||||||
|
<el-select v-model="dataForm.stuworkMajorCode" filterable placeholder="请选择正式专业代码">
|
||||||
|
<el-option v-for="item in offcialZydmList" :key="item.majorCode" :label="item.majorCodeAndName" :value="item.majorCode"> </el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="初中费用" prop="czFee">
|
||||||
|
<el-input-number v-model="dataForm.czFee" controls-position="right" :min="0" :max="999999" :precision="2" placeholder="请输入初中费用">
|
||||||
|
</el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="高中费用" prop="gzFee">
|
||||||
|
<el-input-number v-model="dataForm.gzFee" controls-position="right" :min="0" :max="999999" :precision="2" placeholder="请输入高中费用">
|
||||||
|
</el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="技职校费用" prop="jzxFee">
|
||||||
|
<el-input-number v-model="dataForm.jzxFee" controls-position="right" :min="0" :max="999999" :precision="2" placeholder="请输入技职校费用">
|
||||||
|
</el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
<el-form-item label="招生计划" prop="groupId">
|
<el-form-item label="排序" prop="sort">
|
||||||
<el-select v-model="dataForm.groupId" filterable placeholder="请选择招生计划">
|
<el-input-number :min="0" :max="999" v-model="dataForm.sort" placeholder="排序"></el-input-number>
|
||||||
<el-option
|
</el-form-item>
|
||||||
v-for="item in planList"
|
<el-form-item label="备注" prop="remarks">
|
||||||
:key="item.id"
|
<el-input type="textarea" :rows="3" placeholder="请输入备注信息" v-model="dataForm.remarks"></el-input>
|
||||||
:label="item.groupName"
|
</el-form-item>
|
||||||
:value="item.id">
|
</el-form>
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="专业代码" prop="majorCode">
|
|
||||||
<el-input v-model="dataForm.majorCode" placeholder="专业代码"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="专业名称" prop="majorName">
|
|
||||||
<el-input v-model="dataForm.majorName" placeholder="专业名称"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="所属学院" prop="deptCode">
|
|
||||||
<el-select v-model="dataForm.deptCode" filterable placeholder="请选择">
|
|
||||||
<el-option
|
|
||||||
v-for="item in deptList"
|
|
||||||
:key="item.deptCode"
|
|
||||||
:label="item.deptName"
|
|
||||||
:value="item.deptCode">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="学制" prop="learnYear">
|
|
||||||
<el-select v-model="dataForm.learnYear" filterable placeholder="请选择学制">
|
|
||||||
<el-option
|
|
||||||
v-for="item in majorYears"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="层次" prop="majorLevel">
|
|
||||||
<el-select v-model="dataForm.majorLevel" filterable placeholder="请选择层次">
|
|
||||||
<el-option
|
|
||||||
v-for="item in ccList"
|
|
||||||
:key="item.label"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.label">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="中德班" prop="isZd">
|
|
||||||
<el-radio-group v-model="dataForm.isZd">
|
|
||||||
<el-radio v-for="item in yes_no_type" :key="item.value" :label="item.value">{{ item.label }}</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="订单班" prop="isOrder">
|
|
||||||
<el-radio-group v-model="dataForm.isOrder">
|
|
||||||
<el-radio v-for="item in yes_no_type" :key="item.value" :label="item.value">{{ item.label }}</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="联院班" prop="isUnion">
|
|
||||||
<el-radio-group v-model="dataForm.isUnion">
|
|
||||||
<el-radio v-for="item in yes_no_type" :key="item.value" :label="item.value">{{ item.label }}</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-form-item label="正式专业代码" prop="stuworkMajorCode">
|
|
||||||
<el-select v-model="dataForm.stuworkMajorCode" filterable placeholder="请选择正式专业代码">
|
|
||||||
<el-option
|
|
||||||
v-for="item in offcialZydmList"
|
|
||||||
:key="item.majorCode"
|
|
||||||
:label="item.majorCodeAndName"
|
|
||||||
:value="item.majorCode">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="初中费用" prop="czFee">
|
|
||||||
<el-input-number
|
|
||||||
v-model="dataForm.czFee"
|
|
||||||
controls-position="right"
|
|
||||||
:min="0"
|
|
||||||
:max="999999"
|
|
||||||
:precision="2"
|
|
||||||
placeholder="请输入初中费用"
|
|
||||||
>
|
|
||||||
</el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="高中费用" prop="gzFee">
|
|
||||||
<el-input-number
|
|
||||||
v-model="dataForm.gzFee"
|
|
||||||
controls-position="right"
|
|
||||||
:min="0"
|
|
||||||
:max="999999"
|
|
||||||
:precision="2"
|
|
||||||
placeholder="请输入高中费用"
|
|
||||||
>
|
|
||||||
</el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="技职校费用" prop="jzxFee">
|
|
||||||
<el-input-number
|
|
||||||
v-model="dataForm.jzxFee"
|
|
||||||
controls-position="right"
|
|
||||||
:min="0"
|
|
||||||
:max="999999"
|
|
||||||
:precision="2"
|
|
||||||
placeholder="请输入技职校费用" >
|
|
||||||
</el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-form-item label="排序" prop="sort">
|
|
||||||
<el-input-number :min="0" :max="999" v-model="dataForm.sort" placeholder="排序"></el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="备注" prop="remarks">
|
|
||||||
<el-input type="textarea" :rows="3" placeholder="请输入备注信息" v-model="dataForm.remarks"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button @click="visible = false">取消</el-button>
|
<el-button @click="visible = false">取消</el-button>
|
||||||
<el-button type="primary" @click="dataFormSubmit" v-if="canSubmit">确定</el-button>
|
<el-button type="primary" @click="dataFormSubmit" v-if="canSubmit">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, nextTick } from 'vue'
|
import { ref, reactive, nextTick } from 'vue';
|
||||||
import { ElNotification } from 'element-plus'
|
import { ElNotification } from 'element-plus';
|
||||||
import { addObj, getObj, putObj } from '/@/api/recruit/recruitstudentplan'
|
import { addObj, getObj, putObj } from '/@/api/recruit/recruitstudentplan';
|
||||||
import { getDeptList } from '/@/api/basic/basicclass'
|
import { getDeptList } from '/@/api/basic/basicclass';
|
||||||
import { getList } from '/@/api/recruit/recruitstudentplangroup'
|
import { getList } from '/@/api/recruit/recruitstudentplangroup';
|
||||||
import { getMajorNameList } from '/@/api/basic/major'
|
import { getMajorNameList } from '/@/api/basic/major';
|
||||||
import { getDictsByTypes } from '/@/api/admin/dict'
|
import { getDictsByTypes } from '/@/api/admin/dict';
|
||||||
import { useDict } from '/@/hooks/dict'
|
import { useDict } from '/@/hooks/dict';
|
||||||
|
import { majorCateTree } from '/@/api/recruit/recruitMajorCategory';
|
||||||
|
|
||||||
// Emits
|
// Emits
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: 'refreshDataList'): void
|
(e: 'refreshDataList'): void;
|
||||||
}>()
|
}>();
|
||||||
|
|
||||||
// 字典数据
|
// 字典数据
|
||||||
const { yes_no_type } = useDict('yes_no_type')
|
const { yes_no_type } = useDict('yes_no_type');
|
||||||
|
|
||||||
// 表单引用
|
// 表单引用
|
||||||
const dataFormRef = ref()
|
const dataFormRef = ref();
|
||||||
|
|
||||||
// 响应式数据
|
// 响应式数据
|
||||||
const visible = ref(false)
|
const visible = ref(false);
|
||||||
const canSubmit = ref(false)
|
const canSubmit = ref(false);
|
||||||
const cityPlanIdList = ref<any[]>([])
|
const cityPlanIdList = ref<any[]>([]);
|
||||||
const offcialZydmList = ref<any[]>([])
|
const offcialZydmList = ref<any[]>([]);
|
||||||
const planList = ref<any[]>([])
|
const planList = ref<any[]>([]);
|
||||||
const deptList = ref<any[]>([])
|
const deptList = ref<any[]>([]);
|
||||||
const ccList = ref<any[]>([])
|
const ccList = ref<any[]>([]);
|
||||||
const majorYears = ref<any[]>([])
|
const majorYears = ref<any[]>([]);
|
||||||
const tuitionFeeList = ref<any[]>([])
|
const tuitionFeeList = ref<any[]>([]);
|
||||||
|
const majorCateTreeData = ref<any[]>([]);
|
||||||
|
const chooseMajorCate = ref<any[]>([]);
|
||||||
|
|
||||||
const dataForm = reactive({
|
const dataForm = reactive({
|
||||||
id: "",
|
id: '',
|
||||||
groupId: "",
|
groupId: '',
|
||||||
majorCode: "",
|
majorCode: '',
|
||||||
majorName: "",
|
standardMajorCode: '',
|
||||||
deptCode: "",
|
standardMajorTwoCode: '',
|
||||||
learnYear: "",
|
majorName: '',
|
||||||
majorLevel: "",
|
deptCode: '',
|
||||||
isZd: "0",
|
learnYear: '',
|
||||||
isOrder: "0",
|
majorLevel: '',
|
||||||
remarks: "",
|
isZd: '0',
|
||||||
stuworkMajorCode: "",
|
isOrder: '0',
|
||||||
isUnion: "0",
|
remarks: '',
|
||||||
tuitionFee: 0,
|
stuworkMajorCode: '',
|
||||||
czFee: 0,
|
isUnion: '0',
|
||||||
gzFee: 0,
|
tuitionFee: 0,
|
||||||
jzxFee: 0,
|
czFee: 0,
|
||||||
sort: 0
|
gzFee: 0,
|
||||||
})
|
jzxFee: 0,
|
||||||
|
sort: 0,
|
||||||
|
});
|
||||||
|
|
||||||
const dataRule = {
|
const dataRule = {
|
||||||
majorCode: [
|
majorCode: [
|
||||||
{ required: true, message: '专业代码不能为空', trigger: 'blur' },
|
{ required: true, message: '专业代码不能为空', trigger: 'blur' },
|
||||||
{ min: 1, max: 6, message: '专业代码长度不大于6个字符', trigger: 'blur' }
|
{ min: 1, max: 6, message: '专业代码长度不大于6个字符', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
tuitionFee: [
|
tuitionFee: [{ required: true, message: '学费不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '学费不能为空', trigger: 'blur' }
|
majorName: [
|
||||||
],
|
{ required: true, message: '专业名称不能为空', trigger: 'blur' },
|
||||||
majorName: [
|
{ min: 1, max: 200, message: '专业名称长度不大于200个字符', trigger: 'blur' },
|
||||||
{ required: true, message: '专业名称不能为空', trigger: 'blur' },
|
],
|
||||||
{ min: 1, max: 200, message: '专业名称长度不大于200个字符', trigger: 'blur' }
|
groupId: [{ required: true, message: '招生计划不能为空', trigger: 'blur' }],
|
||||||
],
|
learnYear: [{ required: true, message: '学制不能为空', trigger: 'blur' }],
|
||||||
groupId: [
|
deptCode: [{ required: true, message: '学院不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '招生计划不能为空', trigger: 'blur' }
|
majorLevel: [{ required: true, message: '层次不能为空', trigger: 'blur' }],
|
||||||
],
|
isOrder: [{ required: true, message: '订单班不能为空', trigger: 'blur' }],
|
||||||
learnYear: [
|
isZd: [{ required: true, message: '订单班不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '学制不能为空', trigger: 'blur' }
|
isUnion: [{ required: true, message: '联院班不能为空', trigger: 'blur' }],
|
||||||
],
|
czFee: [
|
||||||
deptCode: [
|
{ required: true, message: '初中费用不能为空', trigger: 'blur' },
|
||||||
{ required: true, message: '学院不能为空', trigger: 'blur' }
|
{ type: 'number', min: 0, message: '初中费用不能小于0', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
majorLevel: [
|
gzFee: [
|
||||||
{ required: true, message: '层次不能为空', trigger: 'blur' }
|
{ required: true, message: '高中费用不能为空', trigger: 'blur' },
|
||||||
],
|
{ type: 'number', min: 0, message: '高中费用不能小于0', trigger: 'blur' },
|
||||||
isOrder: [
|
],
|
||||||
{ required: true, message: '订单班不能为空', trigger: 'blur' }
|
jzxFee: [
|
||||||
],
|
{ required: true, message: '技职校费用不能为空', trigger: 'blur' },
|
||||||
isZd: [
|
{ type: 'number', min: 0, message: '技职校费用不能小于0', trigger: 'blur' },
|
||||||
{ required: true, message: '订单班不能为空', trigger: 'blur' }
|
],
|
||||||
],
|
remarks: [{ min: 1, max: 100, message: '备注长度不大于100个字符', trigger: 'blur' }],
|
||||||
isUnion: [
|
};
|
||||||
{ required: true, message: '联院班不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
czFee: [
|
|
||||||
{ required: true, message: '初中费用不能为空', trigger: 'blur' },
|
|
||||||
{ type: 'number', min: 0, message: '初中费用不能小于0', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
gzFee: [
|
|
||||||
{ required: true, message: '高中费用不能为空', trigger: 'blur' },
|
|
||||||
{ type: 'number', min: 0, message: '高中费用不能小于0', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
jzxFee: [
|
|
||||||
{ required: true, message: '技职校费用不能为空', trigger: 'blur' },
|
|
||||||
{ type: 'number', min: 0, message: '技职校费用不能小于0', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
remarks: [
|
|
||||||
{ min: 1, max: 100, message: '备注长度不大于100个字符', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断市平台招生专业是否占用,占用不可选
|
* 判断市平台招生专业是否占用,占用不可选
|
||||||
@@ -261,143 +197,174 @@ const dataRule = {
|
|||||||
|
|
||||||
// 设置费用默认值
|
// 设置费用默认值
|
||||||
const setFeeDefaults = () => {
|
const setFeeDefaults = () => {
|
||||||
if (tuitionFeeList.value.length > 0) {
|
if (tuitionFeeList.value.length > 0) {
|
||||||
// 初中费用:字典值 1
|
// 初中费用:字典值 1
|
||||||
const czFeeItem = tuitionFeeList.value.find((item: any) => item.label === '1')
|
const czFeeItem = tuitionFeeList.value.find((item: any) => item.label === '1');
|
||||||
|
|
||||||
if (czFeeItem) {
|
if (czFeeItem) {
|
||||||
dataForm.czFee = Number(czFeeItem.value) || 0
|
dataForm.czFee = Number(czFeeItem.value) || 0;
|
||||||
}
|
}
|
||||||
// 高中费用:字典值 2
|
// 高中费用:字典值 2
|
||||||
const gzFeeItem = tuitionFeeList.value.find((item: any) => item.label === '2')
|
const gzFeeItem = tuitionFeeList.value.find((item: any) => item.label === '2');
|
||||||
if (gzFeeItem) {
|
if (gzFeeItem) {
|
||||||
dataForm.gzFee = Number(gzFeeItem.value) || 0
|
dataForm.gzFee = Number(gzFeeItem.value) || 0;
|
||||||
}
|
}
|
||||||
// 技职校费用:字典值 3
|
// 技职校费用:字典值 3
|
||||||
const jzxFeeItem = tuitionFeeList.value.find((item: any) => item.label === '3')
|
const jzxFeeItem = tuitionFeeList.value.find((item: any) => item.label === '3');
|
||||||
if (jzxFeeItem) {
|
if (jzxFeeItem) {
|
||||||
dataForm.jzxFee = Number(jzxFeeItem.value) || 0
|
dataForm.jzxFee = Number(jzxFeeItem.value) || 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// 初始化数据
|
// 初始化数据
|
||||||
const initData = (id: string | null) => {
|
const initData = (id: string | null) => {
|
||||||
// 查询二级学院信息
|
// 查询二级学院信息
|
||||||
getDeptList().then((data: any) => {
|
getDeptList().then((data: any) => {
|
||||||
deptList.value = data.data
|
deptList.value = data.data;
|
||||||
})
|
});
|
||||||
|
|
||||||
// 获取招生计划列表
|
// 获取招生计划列表
|
||||||
getList().then((data: any) => {
|
getList().then((data: any) => {
|
||||||
planList.value = data.data
|
planList.value = data.data;
|
||||||
// 新增时,默认选中第一个招生计划
|
// 新增时,默认选中第一个招生计划
|
||||||
if (!id && data.data && data.data.length > 0) {
|
if (!id && data.data && data.data.length > 0) {
|
||||||
dataForm.groupId = data.data[0]?.id || ''
|
dataForm.groupId = data.data[0]?.id || '';
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
// 获取正式专业代码列表
|
// 获取正式专业代码列表
|
||||||
getMajorNameList().then((data: any) => {
|
getMajorNameList().then((data: any) => {
|
||||||
offcialZydmList.value = data.data
|
offcialZydmList.value = data.data;
|
||||||
})
|
});
|
||||||
|
|
||||||
// 获取数据字典(一次获取多个)
|
// 获取数据字典(一次获取多个)
|
||||||
getDictsByTypes(['basic_major_years', 'basic_major_level', 'tuition_fee']).then((res: any) => {
|
getDictsByTypes(['basic_major_years', 'basic_major_level', 'tuition_fee']).then((res: any) => {
|
||||||
majorYears.value = res.data?.basic_major_years || []
|
majorYears.value = res.data?.basic_major_years || [];
|
||||||
ccList.value = res.data?.basic_major_level || []
|
ccList.value = res.data?.basic_major_level || [];
|
||||||
tuitionFeeList.value = res.data?.tuition_fee || []
|
tuitionFeeList.value = res.data?.tuition_fee || [];
|
||||||
|
|
||||||
// 新增时,根据学费字典设置费用默认值
|
// 新增时,根据学费字典设置费用默认值
|
||||||
if (!id) {
|
if (!id) {
|
||||||
setFeeDefaults()
|
setFeeDefaults();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
|
||||||
|
//查询专业目录树结构
|
||||||
|
majorCateTree({}).then((res: any) => {
|
||||||
|
majorCateTreeData.value = res.data;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
// 表单提交
|
// 表单提交
|
||||||
const dataFormSubmit = () => {
|
const dataFormSubmit = () => {
|
||||||
// if (dataForm.cityPlanId != null) {
|
// if (dataForm.cityPlanId != null) {
|
||||||
// cityPlanIdList.value.forEach(e => {
|
// cityPlanIdList.value.forEach(e => {
|
||||||
// if (e.id == dataForm.cityPlanId) {
|
// if (e.id == dataForm.cityPlanId) {
|
||||||
// dataForm.cityPlanName = e.schoolMajorName
|
// dataForm.cityPlanName = e.schoolMajorName
|
||||||
// dataForm.cityPlanYear = e.educational
|
// dataForm.cityPlanYear = e.educational
|
||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
// }
|
// }
|
||||||
dataFormRef.value?.validate((valid: boolean) => {
|
dataFormRef.value?.validate((valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
canSubmit.value = false
|
canSubmit.value = false;
|
||||||
if (dataForm.id) {
|
if (dataForm.id) {
|
||||||
putObj(dataForm).then(() => {
|
putObj(dataForm)
|
||||||
ElNotification.success({
|
.then(() => {
|
||||||
title: '成功',
|
ElNotification.success({
|
||||||
message: '修改成功'
|
title: '成功',
|
||||||
})
|
message: '修改成功',
|
||||||
visible.value = false
|
});
|
||||||
emit('refreshDataList')
|
visible.value = false;
|
||||||
}).catch(() => {
|
emit('refreshDataList');
|
||||||
canSubmit.value = true
|
})
|
||||||
})
|
.catch(() => {
|
||||||
} else {
|
canSubmit.value = true;
|
||||||
addObj(dataForm).then(() => {
|
});
|
||||||
ElNotification.success({
|
} else {
|
||||||
title: '成功',
|
addObj(dataForm)
|
||||||
message: '添加成功'
|
.then(() => {
|
||||||
})
|
ElNotification.success({
|
||||||
visible.value = false
|
title: '成功',
|
||||||
emit('refreshDataList')
|
message: '添加成功',
|
||||||
}).catch(() => {
|
});
|
||||||
canSubmit.value = true
|
visible.value = false;
|
||||||
})
|
emit('refreshDataList');
|
||||||
}
|
})
|
||||||
}
|
.catch(() => {
|
||||||
})
|
canSubmit.value = true;
|
||||||
}
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleChange = (value: any) => {
|
||||||
|
dataForm.standardMajorCode = value[0];
|
||||||
|
dataForm.standardMajorTwoCode = value[1];
|
||||||
|
};
|
||||||
|
|
||||||
// 初始化方法
|
// 初始化方法
|
||||||
const init = (id: string | null) => {
|
const init = (id: string | null) => {
|
||||||
visible.value = true
|
visible.value = true;
|
||||||
canSubmit.value = true
|
canSubmit.value = true;
|
||||||
dataForm.id = ""
|
dataForm.id = '';
|
||||||
|
|
||||||
// 重置表单数据
|
// 重置表单数据
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
dataFormRef.value?.resetFields()
|
dataFormRef.value?.resetFields();
|
||||||
})
|
});
|
||||||
|
|
||||||
initData(id)
|
initData(id);
|
||||||
|
|
||||||
// 获取详情数据
|
// 获取详情数据
|
||||||
if (id) {
|
if (id) {
|
||||||
dataForm.id = id
|
dataForm.id = id;
|
||||||
getObj(id).then((response: any) => {
|
getObj(id)
|
||||||
if (response && response.data) {
|
.then((response: any) => {
|
||||||
Object.assign(dataForm, response.data)
|
if (response && response.data) {
|
||||||
// 获取市平台对应年份下的招生计划
|
Object.assign(dataForm, response.data);
|
||||||
// getCityPlan({ id: dataForm.id }).then((data: any) => {
|
if (dataForm.standardMajorCode && dataForm.standardMajorTwoCode) {
|
||||||
// cityPlanIdList.value = data.data
|
chooseMajorCate.value = [dataForm.standardMajorCode, dataForm.standardMajorTwoCode];
|
||||||
// })
|
}else{
|
||||||
}
|
chooseMajorCate.value = [];
|
||||||
}).catch(() => {
|
}
|
||||||
// 错误处理
|
// 获取市平台对应年份下的招生计划
|
||||||
})
|
// getCityPlan({ id: dataForm.id }).then((data: any) => {
|
||||||
} else {
|
// cityPlanIdList.value = data.data
|
||||||
// 新增模式:initData 中已处理默认招生计划和费用默认值
|
// })
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
.catch(() => {
|
||||||
|
// 错误处理
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// 新增模式:initData 中已处理默认招生计划和费用默认值
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// 暴露方法给父组件
|
// 暴露方法给父组件
|
||||||
defineExpose({
|
defineExpose({
|
||||||
init
|
init,
|
||||||
})
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.form-item-cascader {
|
||||||
|
:deep(.el-form-item__content) {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
:deep(.el-cascader) {
|
||||||
|
width: 100%;
|
||||||
|
min-width: 360px;
|
||||||
|
}
|
||||||
|
}
|
||||||
.dialog-footer {
|
.dialog-footer {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
.el-row {
|
.el-row {
|
||||||
margin-bottom: 18px !important;
|
margin-bottom: 18px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog title="招生计划专业调整" append-to-body width="70%" :close-on-click-modal="false" v-model="visible">
|
<el-dialog title="招生计划专业调整" append-to-body width="98%" :close-on-click-modal="false" v-model="visible">
|
||||||
<el-form :model="dataForm" ref="dataFormRef" class="mb4">
|
<el-form :model="dataForm" ref="dataFormRef" class="mb4">
|
||||||
<el-form-item label="招生计划名称" prop="groupName">
|
<el-form-item label="招生计划名称" prop="groupName">
|
||||||
<el-input v-model="dataForm.groupName" placeholder="招生计划名称" disabled style="width: 200px"></el-input>
|
<el-input v-model="dataForm.groupName" placeholder="招生计划名称" disabled style="width: 200px"></el-input>
|
||||||
|
|||||||
@@ -923,9 +923,10 @@ const majorChange = (id: string) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 退学
|
// 退学
|
||||||
const handleUpdate = (id: string, groupId: string, feeAgency: string) => {
|
const handleUpdate = (id: string, groupId: string, feeAgency: string,force:booleam) => {
|
||||||
messageBox.confirm('是否确认办理退学操作?请谨慎操作').then(() => {
|
var str=force?"强制":"";
|
||||||
return leaveSchool({ id, groupId, feeAgency })
|
messageBox.confirm('是否确认'+str+'办理退档操作?请谨慎操作').then(() => {
|
||||||
|
return leaveSchool({ id, groupId, feeAgency ,force})
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
message.success('操作成功')
|
message.success('操作成功')
|
||||||
getDataList()
|
getDataList()
|
||||||
@@ -1018,10 +1019,16 @@ const getActionMenuItems = (row: any) => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
command: 'leaveSchool',
|
command: 'leaveSchool',
|
||||||
label: '退学',
|
label: '退档',
|
||||||
icon: Close,
|
icon: Close,
|
||||||
visible: () => hasAuth('recruit_recruitstudentsignup_leaveSchool') && row.canQuit
|
visible: () => hasAuth('recruit_recruitstudentsignup_leaveSchool') && row.canQuit
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
command: 'forceLeaveSchool',
|
||||||
|
label: '强制退档',
|
||||||
|
icon: Close,
|
||||||
|
visible: () => hasAuth('recruit_leaveSchool_force') && row.canQuit
|
||||||
|
},
|
||||||
// 复学
|
// 复学
|
||||||
{
|
{
|
||||||
command: 'reEntry',
|
command: 'reEntry',
|
||||||
@@ -1081,7 +1088,10 @@ const handleMoreCommand = (command: string, row: any) => {
|
|||||||
addOrUpdateHandle(row.id, 1)
|
addOrUpdateHandle(row.id, 1)
|
||||||
break
|
break
|
||||||
case 'leaveSchool':
|
case 'leaveSchool':
|
||||||
handleUpdate(row.id, row.groupId, row.feeAgency)
|
handleUpdate(row.id, row.groupId, row.feeAgency,false)
|
||||||
|
break
|
||||||
|
case 'forceLeaveSchool':
|
||||||
|
handleUpdate(row.id, row.groupId, row.feeAgency, true)
|
||||||
break
|
break
|
||||||
case 'reEntry':
|
case 'reEntry':
|
||||||
reEntry(row.id)
|
reEntry(row.id)
|
||||||
|
|||||||
Reference in New Issue
Block a user