This commit is contained in:
ljx
2025-08-22 22:51:22 +08:00
parent e182b87f02
commit ba037ac2cd
7 changed files with 137 additions and 135 deletions

View File

@ -47,7 +47,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">
<el-table-column prop="unitPrice" label="单价" align="center">
<template #default="scope">
<el-input-number
:model-value="scope.row.unitPrice"
@ -84,7 +84,7 @@
<script setup lang="ts">
import { useUserStoreHook } from '@/store/modules/user';
import { listBillofquantitiesLimitList, obtainAllVersionNumbers, sheetList, updatePrice, importExcelFile } from '@/api/contract/index';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { proxy } = getCurrentInstance() as any;
const userStore = useUserStoreHook();
const currentProject = computed(() => userStore.selectedProject);
@ -97,6 +97,7 @@ const options = ref<any[]>([]);
const sheets = ref<any[]>([]);
const tableData = ref<any[]>([]);
const isExpandAll = ref(false);
const reviewStatus = ref('');
//获取版本号
const getVersionNums = async () => {
@ -113,6 +114,7 @@ const getVersionNums = async () => {
options.value = res.data;
if (res.data.length > 0) {
queryForm.value.versions = res.data[0].versions;
reviewStatus.value = res.data[0].status;
getSheetName();
} else {
@ -138,11 +140,11 @@ const changeVersions = () => {
//选择表名
const changeSheet = () => {
getTableData();
getTableData();
};
//获取表名
const getSheetName = async () => {
const getSheetName = async () => {
try {
const params = {
projectId: currentProject.value?.id,
@ -182,14 +184,10 @@ const getTableData = async () => {
};
const res = await listBillofquantitiesLimitList(params);
if (res.code == 200) {
tableData.value = [res.data[0]];
tableData.value = res.data;
}
} catch (error) {
console.log(error);
ElMessage({
message: '获取表格失败',
type: 'error'
});
tableData.value = [];
loading.value = false;
} finally {
@ -273,16 +271,19 @@ const handleExport = () => {
);
};
// 审批
function clickApprovalSheet() {
proxy.$tab.closePage(proxy.$route);
proxy.$router.push({
const clickApprovalSheet = () => {
proxy.$tab.closePage(proxy?.$route);
proxy?.$router.push({
path: `/approval/contractLimitPrice/indexEdit`,
query: {
id: '',
type: 'update'
projectId: currentProject.value?.id,
versions: queryForm.value.versions,
sheet: queryForm.value.sheet,
type: 'update',
status: reviewStatus.value
}
});
}
};
onUnmounted(() => {
listeningProject();
});