招标一览审核
This commit is contained in:
@ -12,9 +12,9 @@ VITE_APP_ENV = 'development'
|
|||||||
# 罗成
|
# 罗成
|
||||||
# VITE_APP_BASE_API = 'http://192.168.110.213:8899'
|
# VITE_APP_BASE_API = 'http://192.168.110.213:8899'
|
||||||
# 朱银
|
# 朱银
|
||||||
# VITE_APP_BASE_API = 'http://192.168.110.149:8899'
|
VITE_APP_BASE_API = 'http://192.168.110.149:8899'
|
||||||
#屈展航
|
#屈展航
|
||||||
VITE_APP_BASE_API = 'http://192.168.110.210:8899'
|
# VITE_APP_BASE_API = 'http://192.168.110.210:8899'
|
||||||
# VITE_APP_BASE_API = 'http://192.168.110.209:8899'
|
# VITE_APP_BASE_API = 'http://192.168.110.209:8899'
|
||||||
# 无人机接口地址
|
# 无人机接口地址
|
||||||
|
|
||||||
|
@ -113,3 +113,12 @@ export const getUnitList = (query: any): AxiosPromise<any> => {
|
|||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//获取审核状态
|
||||||
|
export const getApproval = (id) => {
|
||||||
|
return request({
|
||||||
|
url: '/tender/tenderPlanLimitList/getVersionDetail',
|
||||||
|
method: 'get',
|
||||||
|
params: { versions: id }
|
||||||
|
});
|
||||||
|
};
|
||||||
|
@ -176,22 +176,26 @@ service.interceptors.response.use(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
// 通用下载方法
|
// 通用下载方法
|
||||||
export function download(url: string, params: any, fileName: string, isHeader) {
|
export function download(url: string, params: any, fileName: string, isHeader?: boolean) {
|
||||||
downloadLoadingInstance = ElLoading.service({ text: '正在下载数据,请稍候', background: 'rgba(0, 0, 0, 0.7)' });
|
downloadLoadingInstance = ElLoading.service({ text: '正在下载数据,请稍候', background: 'rgba(0, 0, 0, 0.7)' });
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
return service.post(url, params, {
|
let data={
|
||||||
transformRequest: [
|
transformRequest: [
|
||||||
(params: any) => {
|
(params: any) => {
|
||||||
|
|
||||||
return tansParams(params);
|
return tansParams(params);
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
headers: isHeader?{}:{ 'Content-Type': 'application/x-www-form-urlencoded' },
|
headers: isHeader?{'Content-Type': 'application/json'}:{ 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
}).then(async (resp: any) => {
|
}
|
||||||
|
if (isHeader) delete data.transformRequest;
|
||||||
|
return service
|
||||||
|
.post(url, params, data as any)
|
||||||
|
.then(async (resp: any) => {
|
||||||
const isLogin = blobValidate(resp);
|
const isLogin = blobValidate(resp);
|
||||||
if (isLogin) {
|
if (isLogin) {
|
||||||
console.log("🚀 ~ download ~ resp:", resp)
|
console.log('🚀 ~ download ~ resp:', resp);
|
||||||
const blob = new Blob([resp]);
|
const blob = new Blob([resp]);
|
||||||
FileSaver.saveAs(blob, fileName);
|
FileSaver.saveAs(blob, fileName);
|
||||||
} else {
|
} else {
|
||||||
@ -201,7 +205,8 @@ export function download(url: string, params: any, fileName: string, isHeader) {
|
|||||||
ElMessage.error(errMsg);
|
ElMessage.error(errMsg);
|
||||||
}
|
}
|
||||||
downloadLoadingInstance.close();
|
downloadLoadingInstance.close();
|
||||||
}).catch((r: any) => {
|
})
|
||||||
|
.catch((r: any) => {
|
||||||
console.error(r);
|
console.error(r);
|
||||||
ElMessage.error('下载文件出现错误,请联系管理员!');
|
ElMessage.error('下载文件出现错误,请联系管理员!');
|
||||||
downloadLoadingInstance.close();
|
downloadLoadingInstance.close();
|
||||||
|
@ -153,7 +153,6 @@ import {
|
|||||||
} from '@/api/progress/progressCategory';
|
} from '@/api/progress/progressCategory';
|
||||||
import { ProgressCategoryVO, ProgressCategoryQuery, ProgressCategoryForm } from '@/api/progress/progressCategory/types';
|
import { ProgressCategoryVO, ProgressCategoryQuery, ProgressCategoryForm } from '@/api/progress/progressCategory/types';
|
||||||
import { useUserStoreHook } from '@/store/modules/user';
|
import { useUserStoreHook } from '@/store/modules/user';
|
||||||
import { download } from '@/utils/request';
|
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { progress_unit_type, progress_work_type } = toRefs<any>(proxy?.useDict('progress_unit_type', 'progress_work_type'));
|
const { progress_unit_type, progress_work_type } = toRefs<any>(proxy?.useDict('progress_unit_type', 'progress_work_type'));
|
||||||
@ -367,9 +366,14 @@ const handleUpdate = async (row: ProgressCategoryVO) => {
|
|||||||
|
|
||||||
const handleExport = async () => {
|
const handleExport = async () => {
|
||||||
const ids = treeRef.value.getCheckedNodes()[0].pathNodes[0].childrenData.map((item) => item.matrixId);
|
const ids = treeRef.value.getCheckedNodes()[0].pathNodes[0].childrenData.map((item) => item.matrixId);
|
||||||
const res = await downloadProgressCategory({ ids });
|
proxy?.download(
|
||||||
download('/progress/progressCategory/export', { ids }, '方阵.xlsx', true);
|
'/progress/progressCategory/export',
|
||||||
// window.open(res.data);
|
{
|
||||||
|
ids: ids
|
||||||
|
},
|
||||||
|
`qualityInspection_${new Date().getTime()}.xlsx`,
|
||||||
|
true
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
|
@ -107,7 +107,7 @@ const queryForm = ref({
|
|||||||
sheet: ''
|
sheet: ''
|
||||||
});
|
});
|
||||||
|
|
||||||
const versionsData = ref({});
|
const versionsData = ref<any>({});
|
||||||
|
|
||||||
const activeTab = ref('2');
|
const activeTab = ref('2');
|
||||||
const sheets = ref([]);
|
const sheets = ref([]);
|
||||||
@ -272,9 +272,11 @@ const handleSave = (row: any) => {
|
|||||||
|
|
||||||
/** 审核按钮操作 */
|
/** 审核按钮操作 */
|
||||||
const handleAudit = async () => {
|
const handleAudit = async () => {
|
||||||
proxy?.$tab.openPage('/approval/tenderPlan/indexEdit', '审核招标一览', {
|
proxy?.$tab.openPage('/approval/tenderBidd/indexEdit', '审核招标一览', {
|
||||||
id: queryForm.value.versions,
|
id: queryForm.value.versions,
|
||||||
type: 'update'
|
type: 'update',
|
||||||
|
activeTab: activeTab.value,
|
||||||
|
status: versionsData.value.status
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -9,14 +9,14 @@
|
|||||||
@handleApprovalRecord="handleApprovalRecord"
|
@handleApprovalRecord="handleApprovalRecord"
|
||||||
:buttonLoading="buttonLoading"
|
:buttonLoading="buttonLoading"
|
||||||
:id="form.id"
|
:id="form.id"
|
||||||
:status="form.auditStatus"
|
:status="form.status"
|
||||||
:pageType="routeParams.type"
|
:pageType="routeParams.type"
|
||||||
/>
|
/>
|
||||||
</el-card>
|
</el-card>
|
||||||
<!-- 表单区域 -->
|
<!-- 表单区域 -->
|
||||||
<el-card class="rounded-lg shadow-sm bg-white border border-gray-100 transition-all hover:shadow-md overflow-hidden">
|
<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">
|
<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>
|
||||||
<div class="p-6">
|
<div class="p-6">
|
||||||
<el-table ref="tableRef" v-loading="loading" :data="tableData" row-key="id" border lazy default-expand-all>
|
<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="name" label="工程或费用名称" />
|
||||||
<el-table-column prop="unit" label="单位" />
|
<el-table-column prop="unit" label="单位" />
|
||||||
<el-table-column prop="quantity" 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"
|
|
||||||
@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="price" label="总价" align="center">
|
<el-table-column prop="price" label="总价" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.price }}
|
{{ 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 { getKnowledgeDocument } from '@/api/design/technicalStandard';
|
||||||
import { getConstructionValue } from '@/api/out/constructionValue';
|
import { getConstructionValue } from '@/api/out/constructionValue';
|
||||||
import { workScheduleListDetail } from '@/api/progress/plan';
|
import { workScheduleListDetail } from '@/api/progress/plan';
|
||||||
|
import { sheetList } from '@/api/contract';
|
||||||
|
import { getApproval, getTableList } from '@/api/tender';
|
||||||
// 获取用户 store
|
// 获取用户 store
|
||||||
const userStore = useUserStoreHook();
|
const userStore = useUserStoreHook();
|
||||||
// 从 store 中获取项目列表和当前选中的项目
|
// 从 store 中获取项目列表和当前选中的项目
|
||||||
@ -111,11 +102,15 @@ const approvalRecordRef = ref<InstanceType<typeof ApprovalRecord>>();
|
|||||||
//按钮组件
|
//按钮组件
|
||||||
const flowCodeOptions = [
|
const flowCodeOptions = [
|
||||||
{
|
{
|
||||||
value: currentProject.value?.id + '_constructionValue',
|
value: currentProject.value?.id + '_bLimitEquipmentList',
|
||||||
label: '施工产值审批'
|
label: '招标一览审批'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
const sheets = ref([]);
|
||||||
|
const queryForm = ref({
|
||||||
|
versions: '',
|
||||||
|
sheet: ''
|
||||||
|
});
|
||||||
const leaveFormRef = ref<ElFormInstance>();
|
const leaveFormRef = ref<ElFormInstance>();
|
||||||
const dialog = reactive({
|
const dialog = reactive({
|
||||||
visible: false,
|
visible: false,
|
||||||
@ -133,17 +128,10 @@ const taskVariables = ref<Record<string, any>>({});
|
|||||||
const initFormData = {
|
const initFormData = {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
projectId: currentProject.value?.id,
|
projectId: currentProject.value?.id,
|
||||||
matrixName: undefined,
|
versions: undefined,
|
||||||
progressCategoryName: undefined,
|
sheet: undefined,
|
||||||
artificialNum: undefined,
|
type: undefined,
|
||||||
planNum: undefined,
|
status: undefined
|
||||||
planDate: undefined,
|
|
||||||
uavNum: undefined,
|
|
||||||
confirmNum: undefined,
|
|
||||||
outValue: undefined,
|
|
||||||
reportDate: undefined,
|
|
||||||
reportDateId: undefined,
|
|
||||||
auditStatus: undefined
|
|
||||||
};
|
};
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
form: { ...initFormData },
|
form: { ...initFormData },
|
||||||
@ -164,12 +152,43 @@ const reset = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/** 获取详情 */
|
/** 获取详情 */
|
||||||
const getInfo = () => {
|
const getInfo = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
buttonLoading.value = false;
|
buttonLoading.value = false;
|
||||||
nextTick(async () => {
|
nextTick(async () => {
|
||||||
const res = await getConstructionValue(routeParams.value.id);
|
try {
|
||||||
Object.assign(form.value, res.data);
|
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;
|
loading.value = false;
|
||||||
buttonLoading.value = false;
|
buttonLoading.value = false;
|
||||||
});
|
});
|
||||||
@ -227,7 +246,7 @@ const submit = async (status, data) => {
|
|||||||
proxy.$tab.closePage(proxy.$route);
|
proxy.$tab.closePage(proxy.$route);
|
||||||
proxy.$router.go(-1);
|
proxy.$router.go(-1);
|
||||||
} else {
|
} 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;
|
flowCode.value = flowCodeOptions[0].value;
|
||||||
dialogVisible.visible = true;
|
dialogVisible.visible = true;
|
||||||
return;
|
return;
|
||||||
@ -247,6 +266,13 @@ onMounted(() => {
|
|||||||
reset();
|
reset();
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
if (routeParams.value.type === 'update' || routeParams.value.type === 'view' || routeParams.value.type === 'approval') {
|
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();
|
getInfo();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user