This commit is contained in:
2025-08-23 06:38:08 +08:00
9 changed files with 772 additions and 132 deletions

View File

@ -5,11 +5,23 @@ VITE_APP_TITLE = 煤科建管平台
VITE_APP_ENV = 'development'
# 开发环境
#朱银
# 李陈杰 209
# VITE_APP_BASE_API = 'http://192.168.110.209:8899'
# 曾涛
VITE_APP_BASE_API = 'http://192.168.110.180:8899'
# 罗成
# VITE_APP_BASE_API = 'http://192.168.110.213:8899'
# 朱银
# VITE_APP_BASE_API = 'http://192.168.110.149:8899'
<<<<<<< HEAD
#曾涛
VITE_APP_BASE_API = 'http://192.168.110.171:8899'
=======
#屈展航
# VITE_APP_BASE_API = 'http://192.168.110.210:8899'
# VITE_APP_BASE_API = 'http://192.168.110.209:8899'
>>>>>>> 4d0845ee536a00e15be67ab1e951c803060ae609
# 无人机接口地址
VITE_APP_BASE_DRONE_API = 'http://58.17.134.85:9512'

View File

@ -95,7 +95,8 @@ export interface ProgressCategoryForm extends BaseEntity {
* 主键id
*/
id?: string | number;
constructionPrice?: string | number;
ownerPrice?: string | number;
/**
* 父类别id
*/
@ -175,11 +176,9 @@ export interface ProgressCategoryForm extends BaseEntity {
* 备注
*/
remark?: string;
}
export interface ProgressCategoryQuery {
/**
* 父类别id
*/
@ -260,6 +259,3 @@ export interface ProgressCategoryQuery {
*/
params?: any;
}

View File

@ -74,14 +74,14 @@
link
icon="Upload"
@click="handleAddChange(scope.row)"
v-if="scope.row.status == 'draft' || scope.row.status == 'back'"
v-if="(scope.row.status == 'finish' || scope.row.costEstimation == '0') && scope.row.auditStatus == 'draft'"
>上传</el-button
>
<el-button
type="success"
link
icon="View"
v-if="scope.row.status != 'draft'"
v-if="scope.row.auditStatus != 'draft'"
v-hasPermi="['design:designChange:query']"
@click="handleViewInfo(scope.row)"
>查看</el-button
@ -238,6 +238,7 @@ const handleViewInfo = (row) => {
path: `/approval/drawing/indexEdit`,
query: {
id: row.id,
costEstimation: row.costEstimation,
type: 'view'
}
});

View File

@ -1,15 +1,22 @@
<template>
<div class="p-4 bg-gray-50 designChangeForm">
<div class="p-4 bg-gray-50">
<div class="max-w-4xl mx-auto">
<!-- 顶部按钮区域 -->
<el-card class="mb-4 rounded-lg shadow-sm bg-white border border-gray-100 transition-all hover:shadow-md">
<approvalButton
@submitForm="submitForm"
@approvalVerifyOpen="approvalVerifyOpen"
@handleApprovalRecord="handleApprovalRecord"
:buttonLoading="buttonLoading"
:id="form.id"
:status="form.status"
:pageType="routeParams.type"
/>
</el-card>
<!-- 表单区域 -->
<div v-if="routeParams.type == 'view'" style="width: 100%; text-align: right; margin-bottom: 10px">
<el-button @click="goBack" size="large" class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50 transition-colors"
>返回</el-button
>
</div>
<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-form
@ -150,53 +157,94 @@
</div>
</el-form>
</div>
<div class="flex justify-center gap-4 mt-8">
<el-button
v-if="routeParams.type != 'view'"
@click="goBack"
size="large"
class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50 transition-colors"
>返回</el-button
</el-card>
<!-- 提交组件 -->
<submitVerify ref="submitVerifyRef" :task-variables="taskVariables" @submit-callback="submitCallback" />
<approvalRecord ref="approvalRecordRef"></approvalRecord>
<!-- 流程选择对话框 -->
<el-dialog
draggable
v-model="dialogVisible.visible"
:title="dialogVisible.title"
:before-close="handleClose"
width="500"
class="rounded-lg shadow-lg"
>
<el-button
type="primary"
size="large"
v-if="routeParams.type != 'view'"
@click="submitForm"
class="px-4 py-2 bg-primary text-white rounded-md hover:bg-primary/90 transition-colors"
<div class="p-4">
<p class="text-gray-600 mb-4">请选择要启动的流程</p>
<el-select v-model="flowCode" placeholder="请选择流程" style="width: 100%">
<el-option v-for="item in flowCodeOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
<template #footer>
<div class="dialog-footer p-4 border-t border-gray-100 flex justify-end space-x-3">
<el-button @click="handleClose" class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50 transition-colors"
>取消</el-button
>
<el-button type="primary" @click="submitFlow()" class="px-4 py-2 bg-primary text-white rounded-md hover:bg-primary/90 transition-colors"
>确认</el-button
>
</div>
</el-card>
</template>
</el-dialog>
</div>
</div>
</template>
<script setup name="Leave" lang="ts">
import { LeaveForm } from '@/api/workflow/leave/types';
import { startWorkFlow } from '@/api/workflow/task';
import SubmitVerify from '@/components/Process/submitVerify.vue';
import ApprovalRecord from '@/components/Process/approvalRecord.vue';
import ApprovalButton from '@/components/Process/approvalButton.vue';
import { StartProcessBo } from '@/api/workflow/workflowCommon/types';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
import { useUserStoreHook } from '@/store/modules/user';
import { addDesignChange, getDesignChange, catalogList, blueprintList } from '@/api/design/designChange';
import { getDrawing } from '@/api/design/drawing';
import { updateDesignChange, getDesignChange, catalogList, blueprintList, addDesignChange } from '@/api/design/designChange';
const { design_change_reason_type } = toRefs<any>(proxy?.useDict('design_change_reason_type'));
const route = useRoute();
const router = useRouter();
// 获取用户 store
const userStore = useUserStoreHook();
// 从 store 中获取项目列表和当前选中的项目
const currentProject = computed(() => userStore.selectedProject);
const buttonLoading = ref(false);
const volumeCatalogList = ref([]);
const blueprintListAll = ref([]);
let volumeMap = new Map();
const loading = ref(true);
//路由参数
const routeParams = ref<Record<string, any>>({});
const flowCodeOptions = [
{
value: currentProject.value?.id + '_designchangeddoc',
label: '变更图纸审批'
}
];
const flowCode = ref<string>('');
const status = ref<string>('');
const dialogVisible = reactive<DialogOption>({
visible: false,
title: '流程定义'
});
//提交组件
const submitVerifyRef = ref<InstanceType<typeof SubmitVerify>>();
//审批记录组件
const approvalRecordRef = ref<InstanceType<typeof ApprovalRecord>>();
//按钮组件
const approvalButtonRef = ref<InstanceType<typeof ApprovalButton>>();
const leaveFormRef = ref<ElFormInstance>();
const dialog = reactive({
visible: false,
title: '',
isEdit: false
});
const fileVoList = ref([]);
const designId = ref('');
const submitFormData = ref<StartProcessBo>({
businessId: '',
flowCode: '',
variables: {}
});
const taskVariables = ref<Record<string, any>>({});
const initFormData = {
id: undefined,
projectId: currentProject.value?.id,
@ -243,55 +291,35 @@ const data = reactive({
rules: {
// 卷册号
volumeNo: [{ required: true, message: '请请选择卷册号', trigger: 'change' }],
formNo: [{ required: true, message: '申请单编号不能为空', trigger: 'change' }]
formNo: [{ required: true, message: '申请单编号不能为空', trigger: 'change' }],
costEstimation: [{ required: true, message: '费用不能为空', trigger: 'change' }]
}
});
const { form, rules } = toRefs(data);
/** 表单重置 */
const reset = () => {
form.value = { ...initFormData };
leaveFormRef.value?.resetFields();
const handleClose = () => {
dialogVisible.visible = false;
flowCode.value = '';
buttonLoading.value = false;
};
//返回
const goBack = () => {
proxy.$tab.closePage(route);
router.go(-1);
};
/** 提交按钮 */
const submitForm = () => {
var changeReason = '';
if (form.value.changeReason && form.value.changeReason.length > 0) {
changeReason = form.value.changeReason.join(',');
}
var saveFile = '';
if (form.value.saveFile && form.value.saveFile.length > 0) {
saveFile = form.value.saveFile.join(',');
}
leaveFormRef.value?.validate(async (valid: boolean) => {
if (valid) {
var res;
res = await addDesignChange({ ...form.value, changeReason, saveFile }).finally(() => (buttonLoading.value = false));
if (res.code == 200) {
ElMessage.success('通知成功');
goBack();
} else {
ElMessage.error(res.msg);
}
}
});
};
/** 查询卷册目录列表 */
const getList = async () => {
const res = await catalogList(currentProject.value?.id);
volumeCatalogList.value = res.data;
volumeCatalogList.value.forEach((e) => {
volumeMap.set(e.volumeNumber, e);
});
const fileVoList = ref([]);
const designId = ref('');
let volumeMap = new Map();
const handleSelect = (val) => {
let obj = volumeMap.get(val);
console.log('🚀 ~ handleSelect ~ obj:', obj);
fileVoList.value = obj.fileVoList;
designId.value = obj.design;
form.value.volumeName = obj.volumeName;
form.value.specialty = obj.specialty;
form.value.specialtyName = obj.specialtyName;
form.value.extendDetail.subName = obj.designSubitem;
};
// 获取图纸列表
const blueprintListAll = ref([]);
const getBlueprintList = async () => {
const res = await blueprintList(designId.value);
blueprintListAll.value = res.data;
@ -302,17 +330,17 @@ const handleRadio = (val) => {
getBlueprintList();
}
};
const handleSelect = (val) => {
let obj = volumeMap.get(val);
fileVoList.value = obj.fileVoList;
designId.value = obj.design;
form.value.volumeName = obj.volumeName;
form.value.specialty = obj.specialty;
form.value.specialtyName = obj.specialtyName;
form.value.extendDetail.subName = obj.designSubitem;
/** 表单重置 */
const reset = () => {
form.value = { ...initFormData };
leaveFormRef.value?.resetFields();
};
const volumeCatalogList = ref([]);
/** 获取详情 */
const getInfo = () => {
loading.value = true;
buttonLoading.value = false;
nextTick(async () => {
const res = await getDesignChange(routeParams.value.id);
@ -320,27 +348,127 @@ const getInfo = () => {
if (form.value.changeReason.length > 0) {
form.value.changeReason = form.value.changeReason.split(',');
}
loading.value = false;
buttonLoading.value = false;
});
};
//返回
const goBack = () => {
proxy.$tab.closePage(route);
router.go(-1);
};
/** 提交按钮 */
const submitForm = (status1: string) => {
status.value = status1;
if (routeParams.value.type == 'add') {
var changeReason = '';
if (form.value.changeReason && form.value.changeReason.length > 0) {
changeReason = form.value.changeReason.join(',');
}
var saveFile = '';
if (form.value.saveFile && form.value.saveFile.length > 0) {
saveFile = form.value.saveFile.join(',');
}
}
leaveFormRef.value?.validate(async (valid: boolean) => {
if (valid) {
buttonLoading.value = true;
var res;
res = await addDesignChange({ ...form.value, changeReason, saveFile }).finally(() => (buttonLoading.value = false));
if (res.code == 200) {
if (form.value.costEstimation == '0') {
ElMessage.success('通知成功');
goBack();
} else {
submit(status.value, res.data);
}
} else {
ElMessage.error(res.msg);
}
}
});
};
const submitFlow = async () => {
handleStartWorkFlow(form.value);
dialogVisible.visible = false;
};
//提交申请
const handleStartWorkFlow = async (data: LeaveForm) => {
try {
submitFormData.value.flowCode = flowCode.value;
submitFormData.value.businessId = data.id;
//流程变量
taskVariables.value = {
// leave4/5 使用的流程变量
userList: ['1', '3', '4']
};
submitFormData.value.variables = taskVariables.value;
const resp = await startWorkFlow(submitFormData.value);
if (submitVerifyRef.value) {
buttonLoading.value = false;
submitVerifyRef.value.openDialog(resp.data.taskId);
}
} finally {
buttonLoading.value = false;
}
};
//审批记录
const handleApprovalRecord = () => {
approvalRecordRef.value.init(form.value.id);
};
//提交回调
const submitCallback = async () => {
await proxy.$tab.closePage(route);
router.go(-1);
};
//审批
const approvalVerifyOpen = async () => {
submitVerifyRef.value.openDialog(routeParams.value.taskId, true, routeParams.value.businessId);
// submitVerifyRef.value.openDialog(routeParams.value.taskId);
};
// 图纸上传成功之后 开始提交
const route = useRoute();
const router = useRouter();
const submit = async (status, data) => {
form.value = data;
if (status === 'draft') {
buttonLoading.value = false;
proxy?.$modal.msgSuccess('暂存成功');
proxy.$tab.closePage(route);
router.go(-1);
} else {
if ((form.value.status === 'draft' && (flowCode.value === '' || flowCode.value === null)) || routeParams.value.type === 'add') {
flowCode.value = flowCodeOptions[0].value;
dialogVisible.visible = true;
return;
}
//说明启动过先随意穿个参数
if (flowCode.value === '' || flowCode.value === null) {
flowCode.value = 'xx';
}
console.log(data);
await handleStartWorkFlow(data);
}
};
onMounted(() => {
nextTick(async () => {
routeParams.value = proxy.$route.query;
routeParams.value = route.query;
reset();
getList();
if (routeParams.value.type != 'add') {
loading.value = false;
const res = await catalogList(currentProject.value?.id);
volumeCatalogList.value = res.data;
volumeCatalogList.value.forEach((e) => {
volumeMap.set(e.volumeNumber, e);
});
if (routeParams.value.type === 'update' || routeParams.value.type === 'view' || routeParams.value.type === 'approval') {
getInfo();
}
});
});
</script>
<style scoped lang="scss">
.designChangeForm {
.el-select {
width: 300px !important;
}
}
/* 全局样式 */
:root {
--primary: #409eff;

View File

@ -0,0 +1,446 @@
<template>
<div class="p-4 bg-gray-50 designChangeForm">
<div class="max-w-4xl mx-auto">
<!-- 表单区域 -->
<div v-if="routeParams.type == 'view'" style="width: 100%; text-align: right; margin-bottom: 10px">
<el-button @click="goBack" size="large" class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50 transition-colors"
>返回</el-button
>
</div>
<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>
</div>
<div class="p-6">
<el-form
ref="leaveFormRef"
:disabled="routeParams.type === 'view' || form.status == 'waiting'"
:model="form"
:rules="rules"
label-width="100px"
class="space-y-4"
>
<div class="grid grid-cols-1 gap-4">
<el-row>
<el-col :span="12">
<el-form-item label="申请单编号" prop="formNo">
<el-input v-model="form.formNo" placeholder="请输入申请单编号" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="工程名称" prop="projectName">
<el-input v-model="form.projectName" placeholder="请输入工程名称" /> </el-form-item
></el-col>
<el-col :span="12">
<el-form-item label="原卷册号" prop="volumeNo">
<el-select
id="projectSelect"
v-model="form.volumeNo"
placeholder="请选择原卷册号"
clearable
filterable
@change="handleSelect"
style="width: 150px; margin-right: 20px"
>
<el-option
v-for="project in volumeCatalogList"
:key="project.volumeNumber"
:label="project.volumeNumber"
:value="project.volumeNumber"
/>
</el-select> </el-form-item
></el-col>
<el-col :span="12">
<el-form-item label="提出单位" prop="submitUnit">
<el-input v-model="form.submitUnit" placeholder="请输入提出单位" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="专业" prop="specialtyName">
<el-input disabled v-model="form.specialtyName" placeholder="请输入专业" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="提出日期" prop="submitDate">
<el-date-picker clearable v-model="form.submitDate" type="date" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择提出日期">
</el-date-picker> </el-form-item
></el-col>
<!-- <el-col :span="12">
<el-form-item label="卷册名称" prop="volumeName"> <el-input v-model="form.volumeName" placeholder="请输入卷册名称" /> </el-form-item
></el-col> -->
<el-col :span="12">
<el-form-item label="子项名称" prop="subName">
<el-input disabled v-model="form.extendDetail.subName" placeholder="请输入子项名称" /> </el-form-item
></el-col>
<el-col :span="24">
<el-form-item label="原设计处置" prop="designDisposal">
<el-radio-group v-model="form.extendDetail.designDisposal" @change="handleRadio">
<el-radio value="1" size="large">原图作废</el-radio>
<el-radio value="2" :disabled="!designId" size="large">原图保留部分修改</el-radio>
<el-radio value="3" size="large">原图保留补充设计</el-radio>
</el-radio-group>
</el-form-item></el-col
>
<el-col :span="24" v-if="form.extendDetail.designDisposal == 2">
<el-form-item label="保留文件" prop="saveFile">
<el-checkbox-group v-model="form.saveFile">
<el-checkbox v-for="dict in blueprintListAll" :key="dict.id" :value="dict.id">
{{ dict.fileName }}
</el-checkbox>
</el-checkbox-group>
</el-form-item></el-col
>
<el-col :span="12">
<el-form-item label="设计阶段" prop="designPhase">
<el-input v-model="form.extendDetail.designPhase" placeholder="请输入设计阶段" /> </el-form-item
></el-col>
<el-col :span="24">
<el-form-item label="变更类别" prop="changeCategory">
<el-radio-group v-model="form.extendDetail.changeCategory">
<el-radio value="1" size="large">重大设计变更</el-radio>
<el-radio value="2" size="large">一般设计变更</el-radio>
</el-radio-group>
</el-form-item></el-col
>
<el-col :span="24">
<el-form-item label="实施程序" prop="ImpProcedure">
<el-radio-group v-model="form.extendDetail.ImpProcedure">
<el-radio value="1" size="large">建设单位重新申报初步设计审批</el-radio>
<el-radio value="2" size="large">建设单位送原施工图审查机构审查建设主管部分备案后交付实施</el-radio>
<el-radio value="3" size="large">建设单位确认后交付实施</el-radio>
</el-radio-group>
</el-form-item></el-col
>
<el-col :span="12">
<el-form-item label="更改相关专业" prop="involvingProfessions">
<el-input v-model="form.extendDetail.involvingProfessions" placeholder="请输入更改相关专业" /> </el-form-item
></el-col>
<el-col :span="24">
<el-form-item label="附图" prop="attachmentPic"> <image-upload v-model="form.attachmentPic" :fileSize="100" /> </el-form-item
></el-col>
<el-col :span="24">
<el-form-item label="变更原因" prop="changeReason">
<el-checkbox-group v-model="form.changeReason">
<el-checkbox v-for="dict in design_change_reason_type" :key="dict.value" :value="dict.value">
{{ dict.label }}
</el-checkbox>
</el-checkbox-group>
</el-form-item></el-col
>
<el-col :span="24">
<el-form-item label="变更内容" prop="changeContent">
<el-input v-model="form.changeContent" type="textarea" placeholder="请输入内容" /> </el-form-item
></el-col>
<el-col :span="12">
<el-form-item label="费用" prop="costEstimation">
<el-input v-model="form.costEstimation" type="number" placeholder="请输入费用" /> </el-form-item
></el-col>
<el-col :span="24">
<el-form-item label="变更费用估算表" label-width="110px" prop="costEstimationFile">
<file-upload v-model="form.costEstimationFile" :fileSize="100" /> </el-form-item
></el-col>
<!-- <el-col :span="24">
<el-form-item label="变更文件" prop="fileId"> <file-upload v-model="form.fileId" :fileSize="100" /> </el-form-item
></el-col> -->
<el-col :span="24"
><el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" /> </el-form-item
></el-col>
</el-row>
</div>
</el-form>
</div>
<div class="flex justify-center gap-4 mt-8">
<el-button
v-if="routeParams.type != 'view'"
@click="goBack"
size="large"
class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50 transition-colors"
>返回</el-button
>
<el-button
type="primary"
size="large"
v-if="routeParams.type != 'view'"
@click="submitForm"
class="px-4 py-2 bg-primary text-white rounded-md hover:bg-primary/90 transition-colors"
>确认</el-button
>
</div>
</el-card>
</div>
</div>
</template>
<script setup name="Leave" lang="ts">
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
import { useUserStoreHook } from '@/store/modules/user';
import { addDesignChange, getDesignChange, catalogList, blueprintList } from '@/api/design/designChange';
const { design_change_reason_type } = toRefs<any>(proxy?.useDict('design_change_reason_type'));
const route = useRoute();
const router = useRouter();
// 获取用户 store
const userStore = useUserStoreHook();
// 从 store 中获取项目列表和当前选中的项目
const currentProject = computed(() => userStore.selectedProject);
const buttonLoading = ref(false);
const volumeCatalogList = ref([]);
const blueprintListAll = ref([]);
let volumeMap = new Map();
//路由参数
const routeParams = ref<Record<string, any>>({});
const leaveFormRef = ref<ElFormInstance>();
const dialog = reactive({
visible: false,
title: '',
isEdit: false
});
const fileVoList = ref([]);
const designId = ref('');
const initFormData = {
id: undefined,
projectId: currentProject.value?.id,
formNo: undefined,
projectName: undefined,
submitUnit: undefined,
specialty: undefined,
specialtyName: undefined,
submitDate: undefined,
volumeName: undefined,
volumeNo: undefined,
attachmentPic: undefined,
changeReason: [],
changeContent: undefined,
costEstimation: undefined,
costEstimationFile: undefined,
fileId: undefined,
status: undefined,
remark: undefined,
saveFile: [],
extendDetail: {
changeCategory: undefined,
ImpProcedure: undefined,
involvingProfessions: undefined,
subName: undefined,
designDisposal: undefined,
designPhase: undefined
}
};
const data = reactive({
form: { ...initFormData },
queryParams: {
pageNum: 1,
pageSize: 10,
projectId: currentProject.value?.id,
fileName: undefined,
fileType: undefined,
fileSuffix: undefined,
fileStatus: undefined,
originalName: undefined,
newest: undefined,
params: {}
},
rules: {
// 卷册号
volumeNo: [{ required: true, message: '请请选择卷册号', trigger: 'change' }],
formNo: [{ required: true, message: '申请单编号不能为空', trigger: 'change' }]
}
});
const { form, rules } = toRefs(data);
/** 表单重置 */
const reset = () => {
form.value = { ...initFormData };
leaveFormRef.value?.resetFields();
};
//返回
const goBack = () => {
proxy.$tab.closePage(route);
router.go(-1);
};
/** 提交按钮 */
const submitForm = () => {
var changeReason = '';
if (form.value.changeReason && form.value.changeReason.length > 0) {
changeReason = form.value.changeReason.join(',');
}
var saveFile = '';
if (form.value.saveFile && form.value.saveFile.length > 0) {
saveFile = form.value.saveFile.join(',');
}
leaveFormRef.value?.validate(async (valid: boolean) => {
if (valid) {
var res;
res = await addDesignChange({ ...form.value, changeReason, saveFile }).finally(() => (buttonLoading.value = false));
if (res.code == 200) {
ElMessage.success('通知成功');
goBack();
} else {
ElMessage.error(res.msg);
}
}
});
};
/** 查询卷册目录列表 */
const getList = async () => {
const res = await catalogList(currentProject.value?.id);
volumeCatalogList.value = res.data;
volumeCatalogList.value.forEach((e) => {
volumeMap.set(e.volumeNumber, e);
});
};
// 获取图纸列表
const getBlueprintList = async () => {
const res = await blueprintList(designId.value);
blueprintListAll.value = res.data;
};
const handleRadio = (val) => {
form.value.saveFile = [];
if (val == 2) {
getBlueprintList();
}
};
const handleSelect = (val) => {
let obj = volumeMap.get(val);
fileVoList.value = obj.fileVoList;
designId.value = obj.design;
form.value.volumeName = obj.volumeName;
form.value.specialty = obj.specialty;
form.value.specialtyName = obj.specialtyName;
form.value.extendDetail.subName = obj.designSubitem;
};
/** 获取详情 */
const getInfo = () => {
buttonLoading.value = false;
nextTick(async () => {
const res = await getDesignChange(routeParams.value.id);
Object.assign(form.value, res.data);
if (form.value.changeReason.length > 0) {
form.value.changeReason = form.value.changeReason.split(',');
}
buttonLoading.value = false;
});
};
onMounted(() => {
nextTick(async () => {
routeParams.value = proxy.$route.query;
reset();
getList();
if (routeParams.value.type != 'add') {
getInfo();
}
});
});
</script>
<style scoped lang="scss">
.designChangeForm {
.el-select {
width: 300px !important;
}
}
/* 全局样式 */
:root {
--primary: #409eff;
--primary-light: #66b1ff;
--primary-dark: #3a8ee6;
--success: #67c23a;
--warning: #e6a23c;
--danger: #f56c6c;
--info: #909399;
}
/* 表单样式优化 */
.el-form-item {
.el-form-item__label {
color: #606266;
font-weight: 500;
}
.el-input__inner,
.el-select .el-input__inner {
border-radius: 4px;
transition:
border-color 0.2s,
box-shadow 0.2s;
&:focus {
border-color: var(--primary-light);
box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
}
}
.el-textarea__inner {
border-radius: 4px;
transition:
border-color 0.2s,
box-shadow 0.2s;
&:focus {
border-color: var(--primary-light);
box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
}
}
}
/* 按钮样式优化 */
.el-button {
border-radius: 4px;
transition: all 0.2s;
&.is-primary {
background-color: var(--primary);
border-color: var(--primary);
&:hover {
background-color: var(--primary-light);
border-color: var(--primary-light);
}
&:active {
background-color: var(--primary-dark);
border-color: var(--primary-dark);
}
}
&.is-text {
color: var(--primary);
&:hover {
color: var(--primary-light);
background-color: rgba(64, 158, 255, 0.05);
}
}
}
/* 卡片样式优化 */
.el-card {
transition: all 0.3s ease;
&:hover {
/* transform: translateY(-2px); */
}
}
/* 对话框样式优化 */
.el-dialog {
.el-dialog__header {
background-color: #f5f7fa;
border-bottom: 1px solid #ebeef5;
padding: 15px 20px;
}
.el-dialog__title {
font-size: 16px;
font-weight: 600;
color: #303133;
}
.el-dialog__footer {
padding: 15px 20px;
border-top: 1px solid #ebeef5;
}
}
</style>

View File

@ -88,12 +88,16 @@ const buttonLoading = ref(false);
const loading = ref(true);
//路由参数
const routeParams = ref<Record<string, any>>({});
const flowCodeOptions = [
const flowCodeOptions = ref([
{
value: currentProject.value?.id + '_designchanged',
label: '变更图纸审批'
},
{
value: currentProject.value?.id + '_moneydesignchanged',
label: '资金设计变更审批'
}
];
]);
const flowCode = ref<string>('');
const status = ref<string>('');
@ -129,6 +133,7 @@ const initFormData = {
fileUrl: undefined,
fileType: undefined,
fileSuffix: undefined,
costEstimation: undefined,
originalName: undefined,
remark: undefined,
fileId: undefined
@ -144,6 +149,7 @@ const data = reactive({
fileSuffix: undefined,
fileStatus: undefined,
originalName: undefined,
costEstimation: undefined,
newest: undefined,
params: {}
},
@ -182,8 +188,13 @@ const getInfo = () => {
loading.value = true;
buttonLoading.value = false;
nextTick(async () => {
const res = await getDesignChange(routeParams.value.id);
var id = routeParams.value.id;
if (routeParams.value.type === 'approval') {
id = routeParams.value.id.split('_')[0];
}
const res = await getDesignChange(id);
Object.assign(form.value, res.data);
if (res.data.costEstimation) form.value.status = res.data.auditStatus;
loading.value = false;
buttonLoading.value = false;
});
@ -248,6 +259,8 @@ const approvalVerifyOpen = async () => {
// 图纸上传成功之后 开始提交
const submit = async (status, data) => {
form.value = data;
form.value.id = routeParams.value.type == 'add' ? form.value.id + '_' : form.value.id.split('_')[0];
form.value.status = data.auditStatus ? data.auditStatus : data.status;
if (status === 'draft') {
buttonLoading.value = false;
proxy?.$modal.msgSuccess('暂存成功');
@ -255,7 +268,13 @@ const submit = async (status, data) => {
proxy.$router.go(-1);
} else {
if ((form.value.status === 'draft' && (flowCode.value === '' || flowCode.value === null)) || routeParams.value.type === 'add') {
flowCode.value = flowCodeOptions[0].value;
if (form.value.costEstimation == '0') {
flowCodeOptions.value = [flowCodeOptions.value[0]];
} else {
console.log('🚀 ~ submit ~ flowCodeOptions.value:', flowCodeOptions.value[1]);
flowCodeOptions.value = [flowCodeOptions.value[1]];
}
flowCode.value = flowCodeOptions.value[0].value;
dialogVisible.visible = true;
return;
}
@ -275,6 +294,8 @@ onMounted(() => {
loading.value = false;
if (routeParams.value.type === 'update' || routeParams.value.type === 'view' || routeParams.value.type === 'approval') {
getInfo();
} else {
form.value.costEstimation = routeParams.value.costEstimation;
}
});
});

View File

@ -277,11 +277,11 @@ const submit = async (businessId, cb) => {
cb();
formData.subprojectName = subProjectMap.get(formData.subprojectId);
formData.drawingreviewId = businessId;
const res = await drawingreviewReceipts(formData);
if (res.code === 200) {
// // 提交成功处理逻辑
// const res = await drawingreviewReceipts(formData);
// if (res.code === 200) {
// 提交成功处理逻辑
// console.log('提交成功');
}
// }
};
onMounted(() => {
getSubProject();

View File

@ -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
);
};

View File

@ -38,7 +38,8 @@
<el-button type="primary" @click="handleExport()" v-hasPermi="['tender:tenderPlanLimitList:export']">导出excel</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleAudit()">审核</el-button>
<el-button type="primary" @click="handleAudit('update')" v-if="versionsData.status == 'draft'">审核</el-button>
<el-button type="warning" @click="handleAudit('view')" v-else>查看流程</el-button>
</el-form-item>
</el-form>
</el-card>
@ -58,6 +59,7 @@
:step="0.1"
:controls="false"
v-if="scope.row.quantity && scope.row.quantity != 0"
:disabled="versionsData.status != 'draft'"
/>
</template>
</el-table-column>
@ -271,10 +273,10 @@ const handleSave = (row: any) => {
};
/** 审核按钮操作 */
const handleAudit = async () => {
const handleAudit = async (type) => {
proxy?.$tab.openPage('/approval/tenderBidd/indexEdit', '审核招标一览', {
id: queryForm.value.versions,
type: 'update',
type,
activeTab: activeTab.value,
status: versionsData.value.status
});