材料管理
This commit is contained in:
@ -24,7 +24,7 @@
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['materials:company:add']">新增 </el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@ -36,7 +36,7 @@
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['materials:company:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['materials:company:export']">导出 </el-button>
|
||||
</el-col>
|
||||
@ -49,24 +49,20 @@
|
||||
<!-- <el-table-column label="主键id" align="center" prop="id" v-if="true" /> -->
|
||||
<el-table-column label="序号" type="index" width="60" align="center" />
|
||||
<el-table-column label="公司名称" align="center" prop="companyName" />
|
||||
<el-table-column label="负责人" align="center" prop="principal" />
|
||||
<el-table-column label="负责人电话" align="center" prop="principalPhone" />
|
||||
<el-table-column label="公司状态" align="center" prop="status">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="sys_normal_disable" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="资质情况" align="center" prop="qualification" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column label="创建时间" align="center" prop="createdAt" width="180" />
|
||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-space wrap>
|
||||
<el-button link type="success" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['materials:company:edit']">修改 </el-button>
|
||||
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['materials:company:remove']">删除 </el-button>
|
||||
</el-space>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
@ -134,7 +130,7 @@ const dialog = reactive<DialogOption>({
|
||||
const initFormData: CompanyForm = {
|
||||
id: undefined,
|
||||
companyName: undefined,
|
||||
projectId: currentProject.value.id,
|
||||
projectId: currentProject.value.goId,
|
||||
status: undefined,
|
||||
remark: undefined,
|
||||
qualification: undefined,
|
||||
@ -147,7 +143,7 @@ const data = reactive<PageData<CompanyForm, CompanyQuery>>({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
companyName: undefined,
|
||||
projectId: currentProject.value.id,
|
||||
projectId: currentProject.value.goId,
|
||||
status: undefined,
|
||||
qualification: undefined,
|
||||
principalPhone: undefined,
|
||||
@ -168,8 +164,8 @@ const { queryParams, form, rules } = toRefs(data);
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listCompany(queryParams.value);
|
||||
companyList.value = res.rows;
|
||||
total.value = res.total;
|
||||
companyList.value = res.data.list;
|
||||
total.value = res.data.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
@ -261,7 +257,7 @@ const handleExport = () => {
|
||||
|
||||
//监听项目id刷新数据
|
||||
const listeningProject = watch(
|
||||
() => currentProject.value.id,
|
||||
() => currentProject.value.goId,
|
||||
(nid, oid) => {
|
||||
queryParams.value.projectId = nid;
|
||||
form.value.projectId = nid;
|
||||
|
Reference in New Issue
Block a user