设计变更审批
This commit is contained in:
@ -31,7 +31,18 @@
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Export" @click="handleExport">导出</el-button>
|
||||
<file-upload
|
||||
upload-url="/progress/progressCategory/import"
|
||||
v-model="file"
|
||||
:limit="1"
|
||||
:file-type="['xls', 'xlsx']"
|
||||
:on-upload-success="handleSuccess"
|
||||
>
|
||||
<el-button type="primary" plain icon="Compass">导入</el-button>
|
||||
</file-upload>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Filter" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="info" plain icon="Sort" @click="handleToggleExpandAll">展开/折叠</el-button>
|
||||
@ -48,7 +59,7 @@
|
||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||
>
|
||||
<!-- <el-table-column label="父类别id" prop="parentId" /> -->
|
||||
<el-table-column label="类别名称" prop="name" />
|
||||
<el-table-column label="类别名称" prop="name" width="230" />
|
||||
<el-table-column label="计量方式" align="center" prop="unitType">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="progress_unit_type" :value="row.unitType" v-if="row.parentId != 0" />
|
||||
@ -60,17 +71,27 @@
|
||||
{{ row.parentId == 0 ? '' : row.unit }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="综合单价" align="center" prop="unitPrice">
|
||||
<el-table-column label="综合单价(业主)" align="center" prop="ownerPrice">
|
||||
<template #default="{ row }">
|
||||
{{ row.parentId == 0 ? '' : row.unitPrice }}
|
||||
{{ row.parentId == 0 ? '' : row.ownerPrice }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="产值金额" align="center" prop="outputValue">
|
||||
<el-table-column label="综合单价(分包)" align="center" prop="constructionPrice">
|
||||
<template #default="{ row }">
|
||||
{{ row.parentId == 0 ? '' : row.outputValue }}
|
||||
{{ row.parentId == 0 ? '' : row.constructionPrice }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总数量/百分比" align="center" prop="total">
|
||||
<el-table-column label="产值金额(业主)" align="center" prop="ownerOutputValue">
|
||||
<template #default="{ row }">
|
||||
{{ row.parentId == 0 ? '' : row.ownerOutputValue }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="产值金额(分包)" align="center" prop="constructionOutputValue">
|
||||
<template #default="{ row }">
|
||||
{{ row.parentId == 0 ? '' : row.constructionOutputValue }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总数量" align="center" prop="total">
|
||||
<template #default="{ row }">
|
||||
{{ row.parentId == 0 ? '' : row.total }}
|
||||
</template>
|
||||
@ -91,7 +112,7 @@
|
||||
</el-card>
|
||||
<!-- 添加或修改分项工程单价对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="progressCategoryFormRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form ref="progressCategoryFormRef" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="父类别" prop="parentId" v-if="!form.id">
|
||||
<el-tree-select
|
||||
v-model="form.parentId"
|
||||
@ -113,12 +134,15 @@
|
||||
<el-form-item label="计量单位" prop="unit">
|
||||
<el-input v-model="form.unit" placeholder="请输入计量单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="综合单价(业主)" prop="ownerPrice">
|
||||
<el-input v-model="form.ownerPrice" placeholder="请输入综合单价(业主)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="综合单价(分包)" prop="constructionPrice">
|
||||
<el-input v-model="form.constructionPrice" placeholder="请输入综合单价(分包)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数量" prop="total" v-if="isDisabled">
|
||||
<el-input v-model="form.total" placeholder="请输入数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="综合单价" prop="unitPrice">
|
||||
<el-input v-model="form.unitPrice" placeholder="请输入综合单价" />
|
||||
</el-form-item>
|
||||
<el-form-item label="关联数据" prop="workType" v-if="!form.id">
|
||||
<el-select v-model="form.workType" placeholder="请选择关联数据">
|
||||
<el-option v-for="dict in progress_work_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
@ -175,7 +199,7 @@ const buttonLoading = ref(false);
|
||||
const showSearch = ref(true);
|
||||
const isExpandAll = ref(true);
|
||||
const loading = ref(false);
|
||||
|
||||
const file = ref();
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const progressCategoryFormRef = ref<ElFormInstance>();
|
||||
const progressCategoryTableRef = ref<ElTableInstance>();
|
||||
@ -194,6 +218,8 @@ const initFormData: ProgressCategoryForm = {
|
||||
name: undefined,
|
||||
unitType: undefined,
|
||||
unit: undefined,
|
||||
constructionPrice: undefined,
|
||||
ownerPrice: undefined,
|
||||
unitPrice: undefined,
|
||||
outputValue: undefined,
|
||||
total: undefined,
|
||||
@ -236,7 +262,9 @@ const data = reactive<PageData<ProgressCategoryForm, ProgressCategoryQuery>>({
|
||||
unitPrice: [{ required: true, message: '综合单价不能为空', trigger: 'blur' }],
|
||||
outputValue: [{ required: true, message: '产值金额不能为空', trigger: 'blur' }],
|
||||
isDelay: [{ required: true, message: '是否超期不能为空', trigger: 'blur' }],
|
||||
status: [{ required: true, message: '完成状态不能为空', trigger: 'change' }]
|
||||
status: [{ required: true, message: '完成状态不能为空', trigger: 'change' }],
|
||||
constructionPrice: [{ required: true, message: '综合单价(分包)不能为空', trigger: 'change' }],
|
||||
ownerPrice: [{ required: true, message: '综合单价(业主)不能为空', trigger: 'change' }]
|
||||
}
|
||||
});
|
||||
|
||||
@ -276,6 +304,11 @@ const getList = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
const handleSuccess = () => {
|
||||
console.log(111);
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
};
|
||||
|
||||
/** 查询分项工程单价下拉树结构 */
|
||||
const getTreeselect = async () => {
|
||||
const res = await listProgressCategory(queryParams.value);
|
||||
@ -366,12 +399,13 @@ const handleUpdate = async (row: ProgressCategoryVO) => {
|
||||
|
||||
const handleExport = async () => {
|
||||
const ids = treeRef.value.getCheckedNodes()[0].pathNodes[0].childrenData.map((item) => item.matrixId);
|
||||
const fileName = treeRef.value.getCheckedNodes()[0].pathNodes[0].label;
|
||||
proxy?.download(
|
||||
'/progress/progressCategory/export',
|
||||
{
|
||||
ids: ids
|
||||
},
|
||||
`qualityInspection_${new Date().getTime()}.xlsx`,
|
||||
`${fileName}分项工程单价导入.xlsx`,
|
||||
true
|
||||
);
|
||||
};
|
||||
|
Reference in New Issue
Block a user