This commit is contained in:
2025-08-21 21:39:21 +08:00
parent 1cdd24271c
commit 594de41607
4 changed files with 601 additions and 84 deletions

View File

@ -15,13 +15,6 @@
<el-form-item label="企业名称" prop="supplierName">
<el-input v-model="queryParams.supplierName" placeholder="请输入企业名称" clearable style="width: 200px" />
</el-form-item>
<el-form-item label="审核状态" prop="state">
<el-select v-model="queryParams.state" placeholder="请选择状态" clearable>
<el-option label="待审核" value="0"></el-option>
<el-option label="已通过" value="1"></el-option>
<el-option label="未通过" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
@ -38,32 +31,16 @@
<el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['supplierInput:supplierInput:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['supplierInput:supplierInput:edit']"
>修改</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Delete"
:disabled="multiple"
@click="handleDelete()"
v-hasPermi="['supplierInput:supplierInput:remove']"
>删除</el-button
>
</el-col>
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['supplierInput:supplierInput:export']">导出</el-button>
</el-col>
</el-col> -->
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
</template>
<!-- 数据表格 -->
<el-table v-loading="loading" :data="supplierInputList" @selection-change="handleSelectionChange" border>
<el-table-column type="selection" width="100%" align="center" />
<el-table-column type="index" label="序号" align="center" width="60" />
<el-table-column label="企业登记注册类型" align="center" prop="supplierType" width="140" />
<el-table-column label="企业名称" align="center" prop="supplierName" width="180" />
<el-table-column label="法定代表人" align="center" prop="supplierPerson" width="120" />
@ -72,11 +49,9 @@
<el-table-column label="负责人电话" align="center" prop="personPhone" width="120" />
<el-table-column label="纳税规模" align="center" prop="taxScale" width="120" />
<el-table-column label="资质等级" align="center" prop="supplierLivel" width="120" />
<el-table-column label="审核状态" align="center" prop="state" width="120">
<el-table-column label="流程状态" align="center">
<template #default="scope">
<el-tag :type="scope.row.state === '1' ? 'success' : scope.row.state === '2' ? 'danger' : 'warning'">
{{ scope.row.state === '1' ? '已通过' : scope.row.state === '2' ? '未通过' : '待审核' }}
</el-tag>
<dict-tag :options="wf_business_status" :value="scope.row.state" />
</template>
</el-table-column>
<el-table-column label="入库资料" align="center" prop="inputFile" width="120">
@ -86,34 +61,30 @@
</el-link>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120">
<el-table-column label="操作" align="center" fixed="right" width="240">
<template #default="scope">
<el-tooltip content="修改" placement="top">
<el-button
link
type="primary"
icon="Edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['supplierInput:supplierInput:edit']"
></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button
link
type="primary"
icon="Delete"
@click="handleDelete(scope.row)"
v-hasPermi="['supplierInput:supplierInput:remove']"
></el-button>
</el-tooltip>
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['supplierInput:supplierInput:edit']"
>修改</el-button
>
<el-button link type="primary" icon="edit" @click="handleAudit(scope.row)" v-if="scope.row.state == 'draft' || scope.row.state == 'back'"
>审核</el-button
>
<el-button link type="primary" icon="View" v-if="scope.row.state != '2' && scope.row.state != 'draft'" @click="handleAuditView(scope.row)"
>查看流程</el-button
>
<!-- <el-button
link
type="primary"
icon="Delete"
@click="handleDelete(scope.row)"
v-hasPermi="['supplierInput:supplierInput:remove']"
></el-button> -->
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
</el-card>
<!-- 新增/修改对话框 -->
<el-dialog :title="dialog.title" v-model="dialog.visible" width="950px" append-to-body>
<el-form ref="supplierInputFormRef" :model="form" :rules="rules" label-width="200px">
@ -249,7 +220,6 @@
</el-form-item>
</el-col>
</el-row>
<!-- 第十行安全生产许可证有效期仅劳务类型显示 -->
<el-row :gutter="20" class="mb-4" v-if="form.supplierType === '劳务'">
<el-col :span="12">
@ -261,7 +231,6 @@
<!-- 空列占位 -->
</el-col>
</el-row>
<!-- 第十一行注册人员数量仅劳务类型显示 -->
<el-row :gutter="20" class="mb-4" v-if="form.supplierType === '劳务'">
<el-col :span="12">
@ -282,7 +251,6 @@
<!-- 空列占位 -->
</el-col>
</el-row>
<!-- 第十二行职称人员数量仅劳务类型显示 -->
<el-row :gutter="20" class="mb-4" v-if="form.supplierType === '劳务'">
<el-col :span="12">
@ -303,7 +271,6 @@
<!-- 空列占位 -->
</el-col>
</el-row>
<!-- 第十四行入库资料上传 -->
<el-row class="mb-4">
<el-col :span="24">
@ -342,7 +309,6 @@
</el-col>
</el-row>
</el-form>
<!-- 对话框底部按钮 -->
<template #footer>
<div class="dialog-footer">
@ -362,10 +328,8 @@ import { SupplierInputVO, SupplierInputQuery, SupplierInputForm, PageData, Dialo
import Pagination from '@/components/Pagination/index.vue';
import RightToolbar from '@/components/RightToolbar/index.vue';
import FileUpload from '@/components/FileUpload/index.vue';
// 实例代理
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { wf_business_status } = toRefs<any>(proxy?.useDict('wf_business_status'));
// 组件引用
const fileUploadRef = ref<InstanceType<typeof FileUpload> | null>(null);
const queryFormRef = ref<ElFormInstance>();
@ -414,7 +378,7 @@ const initFormData: any = {
personnelNumber: undefined, // 后端返回的拼接字符串如“5,6,7,8”
fileId: undefined,
inputFile: undefined,
state: '0', // 新增默认待审核
// state: '0', // 新增默认待审核
// 新增:用于表单输入的单独字段
build1: undefined, // 一建建造师
build2: undefined, // 二建建造师
@ -577,6 +541,28 @@ const splitBackEndStrToForm = (resData: any) => {
form.value.personnelNumber4 = personnelArr[3] || undefined; // 其他职称人员
}
};
/** 审核过程按钮操作 */
const handleAudit = async (row) => {
proxy.$tab.closePage(proxy.$route);
proxy.$router.push({
path: `/approval/supplierInput/indexEdit`,
query: {
id: row.id,
type: 'update'
}
});
};
/** 查看按钮操作 */
const handleAuditView = async (row) => {
proxy.$tab.closePage(proxy.$route);
proxy.$router.push({
path: `/approval/supplierInput/indexEdit`,
query: {
id: row.id,
type: 'view'
}
});
};
/** 文件选择变更 */
const change = () => {
fileUrl.value = '';