招标一览审核

This commit is contained in:
Teo
2025-08-22 22:57:45 +08:00
parent 9584ab4baa
commit ea56d292ec
6 changed files with 93 additions and 47 deletions

View File

@ -9,14 +9,14 @@
@handleApprovalRecord="handleApprovalRecord"
:buttonLoading="buttonLoading"
:id="form.id"
:status="form.auditStatus"
:status="form.status"
:pageType="routeParams.type"
/>
</el-card>
<!-- 表单区域 -->
<el-card class="rounded-lg shadow-sm bg-white border border-gray-100 transition-all hover:shadow-md overflow-hidden">
<div class="p-4 bg-gradient-to-r from-blue-50 to-indigo-50 border-b border-gray-100">
<h3 class="text-lg font-semibold text-gray-800">施工产值</h3>
<h3 class="text-lg font-semibold text-gray-800">招标一览</h3>
</div>
<div class="p-6">
<el-table ref="tableRef" v-loading="loading" :data="tableData" row-key="id" border lazy default-expand-all>
@ -24,18 +24,7 @@
<el-table-column prop="name" label="工程或费用名称" />
<el-table-column prop="unit" label="单位" />
<el-table-column prop="quantity" label="数量" />
<el-table-column prop="remark" label="单价" align="center">
<template #default="scope">
<el-input-number
:model-value="scope.row.unitPrice"
@change="(val) => (scope.row.unitPrice = val)"
:precision="2"
:step="0.1"
:controls="false"
v-if="scope.row.quantity && scope.row.quantity != 0"
/>
</template>
</el-table-column>
<el-table-column prop="unitPrice" label="单价" align="center" />
<el-table-column prop="price" label="总价" align="center">
<template #default="scope">
{{ scope.row.price }}
@ -90,6 +79,8 @@ const { design_change_reason_type } = toRefs<any>(proxy?.useDict('design_change_
import { getKnowledgeDocument } from '@/api/design/technicalStandard';
import { getConstructionValue } from '@/api/out/constructionValue';
import { workScheduleListDetail } from '@/api/progress/plan';
import { sheetList } from '@/api/contract';
import { getApproval, getTableList } from '@/api/tender';
// 获取用户 store
const userStore = useUserStoreHook();
// 从 store 中获取项目列表和当前选中的项目
@ -111,11 +102,15 @@ const approvalRecordRef = ref<InstanceType<typeof ApprovalRecord>>();
//按钮组件
const flowCodeOptions = [
{
value: currentProject.value?.id + '_constructionValue',
label: '施工产值审批'
value: currentProject.value?.id + '_bLimitEquipmentList',
label: '招标一览审批'
}
];
const sheets = ref([]);
const queryForm = ref({
versions: '',
sheet: ''
});
const leaveFormRef = ref<ElFormInstance>();
const dialog = reactive({
visible: false,
@ -133,17 +128,10 @@ const taskVariables = ref<Record<string, any>>({});
const initFormData = {
id: undefined,
projectId: currentProject.value?.id,
matrixName: undefined,
progressCategoryName: undefined,
artificialNum: undefined,
planNum: undefined,
planDate: undefined,
uavNum: undefined,
confirmNum: undefined,
outValue: undefined,
reportDate: undefined,
reportDateId: undefined,
auditStatus: undefined
versions: undefined,
sheet: undefined,
type: undefined,
status: undefined
};
const data = reactive({
form: { ...initFormData },
@ -164,12 +152,43 @@ const reset = () => {
};
/** 获取详情 */
const getInfo = () => {
const getInfo = async () => {
loading.value = true;
buttonLoading.value = false;
nextTick(async () => {
const res = await getConstructionValue(routeParams.value.id);
Object.assign(form.value, res.data);
try {
const params = {
projectId: currentProject.value?.id,
versions: form.value.versions
};
const res = await sheetList(params);
if (res.code == 200) {
sheets.value = res.data;
if (res.data.length > 0) {
queryForm.value.sheet = res.data[0];
} else {
queryForm.value.sheet = '';
}
try {
const res = await getTableList(form.value);
if (res.code == 200) {
tableData.value = res.data;
}
} catch (error) {
console.log(error);
}
}
} catch (error) {
console.log(error);
}
getApproval(form.value.versions).then((res) => {
form.value.status = res.data.status;
});
if (routeParams.value.type === 'approval') {
form.value.id = routeParams.value.id;
} else {
form.value.id = routeParams.value.id + '_' + routeParams.value.activeTab;
}
loading.value = false;
buttonLoading.value = false;
});
@ -227,7 +246,7 @@ const submit = async (status, data) => {
proxy.$tab.closePage(proxy.$route);
proxy.$router.go(-1);
} else {
if ((form.value.auditStatus === 'draft' && (flowCode.value === '' || flowCode.value === null)) || routeParams.value.type === 'add') {
if ((form.value.status === 'draft' && (flowCode.value === '' || flowCode.value === null)) || routeParams.value.type === 'add') {
flowCode.value = flowCodeOptions[0].value;
dialogVisible.visible = true;
return;
@ -247,6 +266,13 @@ onMounted(() => {
reset();
loading.value = false;
if (routeParams.value.type === 'update' || routeParams.value.type === 'view' || routeParams.value.type === 'approval') {
if (routeParams.value.type === 'approval') {
form.value.versions = routeParams.value.id.split('_')[0];
form.value.type = routeParams.value.id.split('_')[1];
} else {
form.value.versions = routeParams.value.id;
form.value.type = routeParams.value.activeTab;
}
getInfo();
}
});