设计变更审批
This commit is contained in:
@ -8,13 +8,13 @@ VITE_APP_ENV = 'development'
|
|||||||
# 李陈杰 209
|
# 李陈杰 209
|
||||||
# VITE_APP_BASE_API = 'http://192.168.110.209:8899'
|
# 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.180:8899'
|
||||||
# 罗成
|
# 罗成
|
||||||
# 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'
|
||||||
# 无人机接口地址
|
# 无人机接口地址
|
||||||
|
|
||||||
|
@ -84,10 +84,10 @@ export interface ProgressCategoryVO {
|
|||||||
*/
|
*/
|
||||||
remark: string;
|
remark: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 子对象
|
* 子对象
|
||||||
*/
|
*/
|
||||||
children: ProgressCategoryVO[];
|
children: ProgressCategoryVO[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProgressCategoryForm extends BaseEntity {
|
export interface ProgressCategoryForm extends BaseEntity {
|
||||||
@ -95,7 +95,8 @@ export interface ProgressCategoryForm extends BaseEntity {
|
|||||||
* 主键id
|
* 主键id
|
||||||
*/
|
*/
|
||||||
id?: string | number;
|
id?: string | number;
|
||||||
|
constructionPrice?: string | number;
|
||||||
|
ownerPrice?: string | number;
|
||||||
/**
|
/**
|
||||||
* 父类别id
|
* 父类别id
|
||||||
*/
|
*/
|
||||||
@ -175,11 +176,9 @@ export interface ProgressCategoryForm extends BaseEntity {
|
|||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
remark?: string;
|
remark?: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProgressCategoryQuery {
|
export interface ProgressCategoryQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 父类别id
|
* 父类别id
|
||||||
*/
|
*/
|
||||||
@ -255,11 +254,8 @@ export interface ProgressCategoryQuery {
|
|||||||
*/
|
*/
|
||||||
status?: string;
|
status?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 日期范围参数
|
* 日期范围参数
|
||||||
*/
|
*/
|
||||||
params?: any;
|
params?: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -74,14 +74,14 @@
|
|||||||
link
|
link
|
||||||
icon="Upload"
|
icon="Upload"
|
||||||
@click="handleAddChange(scope.row)"
|
@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
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
link
|
link
|
||||||
icon="View"
|
icon="View"
|
||||||
v-if="scope.row.status != 'draft'"
|
v-if="scope.row.auditStatus != 'draft'"
|
||||||
v-hasPermi="['design:designChange:query']"
|
v-hasPermi="['design:designChange:query']"
|
||||||
@click="handleViewInfo(scope.row)"
|
@click="handleViewInfo(scope.row)"
|
||||||
>查看</el-button
|
>查看</el-button
|
||||||
@ -238,6 +238,7 @@ const handleViewInfo = (row) => {
|
|||||||
path: `/approval/drawing/indexEdit`,
|
path: `/approval/drawing/indexEdit`,
|
||||||
query: {
|
query: {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
|
costEstimation: row.costEstimation,
|
||||||
type: 'view'
|
type: 'view'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1,15 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="p-4 bg-gray-50 designChangeForm">
|
<div class="p-4 bg-gray-50">
|
||||||
<div class="max-w-4xl mx-auto">
|
<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">
|
<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-form
|
<el-form
|
||||||
@ -150,53 +157,94 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</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>
|
</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"
|
||||||
|
>
|
||||||
|
<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>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="Leave" lang="ts">
|
<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;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
import { useUserStoreHook } from '@/store/modules/user';
|
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 { design_change_reason_type } = toRefs<any>(proxy?.useDict('design_change_reason_type'));
|
||||||
const route = useRoute();
|
|
||||||
const router = useRouter();
|
|
||||||
// 获取用户 store
|
// 获取用户 store
|
||||||
const userStore = useUserStoreHook();
|
const userStore = useUserStoreHook();
|
||||||
// 从 store 中获取项目列表和当前选中的项目
|
// 从 store 中获取项目列表和当前选中的项目
|
||||||
const currentProject = computed(() => userStore.selectedProject);
|
const currentProject = computed(() => userStore.selectedProject);
|
||||||
const buttonLoading = ref(false);
|
const buttonLoading = ref(false);
|
||||||
const volumeCatalogList = ref([]);
|
const loading = ref(true);
|
||||||
const blueprintListAll = ref([]);
|
|
||||||
let volumeMap = new Map();
|
|
||||||
//路由参数
|
//路由参数
|
||||||
const routeParams = ref<Record<string, any>>({});
|
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 leaveFormRef = ref<ElFormInstance>();
|
||||||
const dialog = reactive({
|
const dialog = reactive({
|
||||||
visible: false,
|
visible: false,
|
||||||
title: '',
|
title: '',
|
||||||
isEdit: false
|
isEdit: false
|
||||||
});
|
});
|
||||||
const fileVoList = ref([]);
|
const submitFormData = ref<StartProcessBo>({
|
||||||
const designId = ref('');
|
businessId: '',
|
||||||
|
flowCode: '',
|
||||||
|
variables: {}
|
||||||
|
});
|
||||||
|
const taskVariables = ref<Record<string, any>>({});
|
||||||
|
|
||||||
const initFormData = {
|
const initFormData = {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
projectId: currentProject.value?.id,
|
projectId: currentProject.value?.id,
|
||||||
@ -243,55 +291,35 @@ const data = reactive({
|
|||||||
rules: {
|
rules: {
|
||||||
// 卷册号
|
// 卷册号
|
||||||
volumeNo: [{ required: true, message: '请请选择卷册号', trigger: 'change' }],
|
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 { form, rules } = toRefs(data);
|
||||||
|
const handleClose = () => {
|
||||||
/** 表单重置 */
|
dialogVisible.visible = false;
|
||||||
const reset = () => {
|
flowCode.value = '';
|
||||||
form.value = { ...initFormData };
|
buttonLoading.value = false;
|
||||||
leaveFormRef.value?.resetFields();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//返回
|
const fileVoList = ref([]);
|
||||||
const goBack = () => {
|
const designId = ref('');
|
||||||
proxy.$tab.closePage(route);
|
let volumeMap = new Map();
|
||||||
router.go(-1);
|
|
||||||
};
|
const handleSelect = (val) => {
|
||||||
/** 提交按钮 */
|
let obj = volumeMap.get(val);
|
||||||
const submitForm = () => {
|
console.log('🚀 ~ handleSelect ~ obj:', obj);
|
||||||
var changeReason = '';
|
|
||||||
if (form.value.changeReason && form.value.changeReason.length > 0) {
|
fileVoList.value = obj.fileVoList;
|
||||||
changeReason = form.value.changeReason.join(',');
|
designId.value = obj.design;
|
||||||
}
|
form.value.volumeName = obj.volumeName;
|
||||||
var saveFile = '';
|
form.value.specialty = obj.specialty;
|
||||||
if (form.value.saveFile && form.value.saveFile.length > 0) {
|
form.value.specialtyName = obj.specialtyName;
|
||||||
saveFile = form.value.saveFile.join(',');
|
form.value.extendDetail.subName = obj.designSubitem;
|
||||||
}
|
|
||||||
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 blueprintListAll = ref([]);
|
||||||
const getBlueprintList = async () => {
|
const getBlueprintList = async () => {
|
||||||
const res = await blueprintList(designId.value);
|
const res = await blueprintList(designId.value);
|
||||||
blueprintListAll.value = res.data;
|
blueprintListAll.value = res.data;
|
||||||
@ -302,17 +330,17 @@ const handleRadio = (val) => {
|
|||||||
getBlueprintList();
|
getBlueprintList();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const handleSelect = (val) => {
|
|
||||||
let obj = volumeMap.get(val);
|
/** 表单重置 */
|
||||||
fileVoList.value = obj.fileVoList;
|
const reset = () => {
|
||||||
designId.value = obj.design;
|
form.value = { ...initFormData };
|
||||||
form.value.volumeName = obj.volumeName;
|
leaveFormRef.value?.resetFields();
|
||||||
form.value.specialty = obj.specialty;
|
|
||||||
form.value.specialtyName = obj.specialtyName;
|
|
||||||
form.value.extendDetail.subName = obj.designSubitem;
|
|
||||||
};
|
};
|
||||||
|
const volumeCatalogList = ref([]);
|
||||||
|
|
||||||
/** 获取详情 */
|
/** 获取详情 */
|
||||||
const getInfo = () => {
|
const getInfo = () => {
|
||||||
|
loading.value = true;
|
||||||
buttonLoading.value = false;
|
buttonLoading.value = false;
|
||||||
nextTick(async () => {
|
nextTick(async () => {
|
||||||
const res = await getDesignChange(routeParams.value.id);
|
const res = await getDesignChange(routeParams.value.id);
|
||||||
@ -320,27 +348,127 @@ const getInfo = () => {
|
|||||||
if (form.value.changeReason.length > 0) {
|
if (form.value.changeReason.length > 0) {
|
||||||
form.value.changeReason = form.value.changeReason.split(',');
|
form.value.changeReason = form.value.changeReason.split(',');
|
||||||
}
|
}
|
||||||
|
loading.value = false;
|
||||||
buttonLoading.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(() => {
|
onMounted(() => {
|
||||||
nextTick(async () => {
|
nextTick(async () => {
|
||||||
routeParams.value = proxy.$route.query;
|
routeParams.value = route.query;
|
||||||
reset();
|
reset();
|
||||||
getList();
|
loading.value = false;
|
||||||
if (routeParams.value.type != 'add') {
|
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();
|
getInfo();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.designChangeForm {
|
|
||||||
.el-select {
|
|
||||||
width: 300px !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* 全局样式 */
|
/* 全局样式 */
|
||||||
:root {
|
:root {
|
||||||
--primary: #409eff;
|
--primary: #409eff;
|
||||||
|
446
src/views/design/designChange/indexEdit1.vue
Normal file
446
src/views/design/designChange/indexEdit1.vue
Normal 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>
|
@ -88,12 +88,16 @@ const buttonLoading = ref(false);
|
|||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
//路由参数
|
//路由参数
|
||||||
const routeParams = ref<Record<string, any>>({});
|
const routeParams = ref<Record<string, any>>({});
|
||||||
const flowCodeOptions = [
|
const flowCodeOptions = ref([
|
||||||
{
|
{
|
||||||
value: currentProject.value?.id + '_designchanged',
|
value: currentProject.value?.id + '_designchanged',
|
||||||
label: '变更图纸审批'
|
label: '变更图纸审批'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: currentProject.value?.id + '_moneydesignchanged',
|
||||||
|
label: '资金设计变更审批'
|
||||||
}
|
}
|
||||||
];
|
]);
|
||||||
|
|
||||||
const flowCode = ref<string>('');
|
const flowCode = ref<string>('');
|
||||||
const status = ref<string>('');
|
const status = ref<string>('');
|
||||||
@ -129,6 +133,7 @@ const initFormData = {
|
|||||||
fileUrl: undefined,
|
fileUrl: undefined,
|
||||||
fileType: undefined,
|
fileType: undefined,
|
||||||
fileSuffix: undefined,
|
fileSuffix: undefined,
|
||||||
|
costEstimation: undefined,
|
||||||
originalName: undefined,
|
originalName: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
fileId: undefined
|
fileId: undefined
|
||||||
@ -144,6 +149,7 @@ const data = reactive({
|
|||||||
fileSuffix: undefined,
|
fileSuffix: undefined,
|
||||||
fileStatus: undefined,
|
fileStatus: undefined,
|
||||||
originalName: undefined,
|
originalName: undefined,
|
||||||
|
costEstimation: undefined,
|
||||||
newest: undefined,
|
newest: undefined,
|
||||||
params: {}
|
params: {}
|
||||||
},
|
},
|
||||||
@ -182,8 +188,13 @@ const getInfo = () => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
buttonLoading.value = false;
|
buttonLoading.value = false;
|
||||||
nextTick(async () => {
|
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);
|
Object.assign(form.value, res.data);
|
||||||
|
if (res.data.costEstimation) form.value.status = res.data.auditStatus;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
buttonLoading.value = false;
|
buttonLoading.value = false;
|
||||||
});
|
});
|
||||||
@ -248,6 +259,8 @@ const approvalVerifyOpen = async () => {
|
|||||||
// 图纸上传成功之后 开始提交
|
// 图纸上传成功之后 开始提交
|
||||||
const submit = async (status, data) => {
|
const submit = async (status, data) => {
|
||||||
form.value = 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') {
|
if (status === 'draft') {
|
||||||
buttonLoading.value = false;
|
buttonLoading.value = false;
|
||||||
proxy?.$modal.msgSuccess('暂存成功');
|
proxy?.$modal.msgSuccess('暂存成功');
|
||||||
@ -255,7 +268,13 @@ const submit = async (status, data) => {
|
|||||||
proxy.$router.go(-1);
|
proxy.$router.go(-1);
|
||||||
} else {
|
} else {
|
||||||
if ((form.value.status === '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;
|
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;
|
dialogVisible.visible = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -275,6 +294,8 @@ onMounted(() => {
|
|||||||
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') {
|
||||||
getInfo();
|
getInfo();
|
||||||
|
} else {
|
||||||
|
form.value.costEstimation = routeParams.value.costEstimation;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -277,11 +277,11 @@ const submit = async (businessId, cb) => {
|
|||||||
cb();
|
cb();
|
||||||
formData.subprojectName = subProjectMap.get(formData.subprojectId);
|
formData.subprojectName = subProjectMap.get(formData.subprojectId);
|
||||||
formData.drawingreviewId = businessId;
|
formData.drawingreviewId = businessId;
|
||||||
const res = await drawingreviewReceipts(formData);
|
// const res = await drawingreviewReceipts(formData);
|
||||||
if (res.code === 200) {
|
// if (res.code === 200) {
|
||||||
// // 提交成功处理逻辑
|
// 提交成功处理逻辑
|
||||||
// console.log('提交成功');
|
// console.log('提交成功');
|
||||||
}
|
// }
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getSubProject();
|
getSubProject();
|
||||||
|
@ -31,7 +31,18 @@
|
|||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<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>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="info" plain icon="Sort" @click="handleToggleExpandAll">展开/折叠</el-button>
|
<el-button type="info" plain icon="Sort" @click="handleToggleExpandAll">展开/折叠</el-button>
|
||||||
@ -48,7 +59,7 @@
|
|||||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||||
>
|
>
|
||||||
<!-- <el-table-column label="父类别id" prop="parentId" /> -->
|
<!-- <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">
|
<el-table-column label="计量方式" align="center" prop="unitType">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<dict-tag :options="progress_unit_type" :value="row.unitType" v-if="row.parentId != 0" />
|
<dict-tag :options="progress_unit_type" :value="row.unitType" v-if="row.parentId != 0" />
|
||||||
@ -60,17 +71,27 @@
|
|||||||
{{ row.parentId == 0 ? '' : row.unit }}
|
{{ row.parentId == 0 ? '' : row.unit }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="综合单价" align="center" prop="unitPrice">
|
<el-table-column label="综合单价(业主)" align="center" prop="ownerPrice">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{ row.parentId == 0 ? '' : row.unitPrice }}
|
{{ row.parentId == 0 ? '' : row.ownerPrice }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="产值金额" align="center" prop="outputValue">
|
<el-table-column label="综合单价(分包)" align="center" prop="constructionPrice">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{ row.parentId == 0 ? '' : row.outputValue }}
|
{{ row.parentId == 0 ? '' : row.constructionPrice }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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 }">
|
<template #default="{ row }">
|
||||||
{{ row.parentId == 0 ? '' : row.total }}
|
{{ row.parentId == 0 ? '' : row.total }}
|
||||||
</template>
|
</template>
|
||||||
@ -91,7 +112,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
<!-- 添加或修改分项工程单价对话框 -->
|
<!-- 添加或修改分项工程单价对话框 -->
|
||||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
<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-form-item label="父类别" prop="parentId" v-if="!form.id">
|
||||||
<el-tree-select
|
<el-tree-select
|
||||||
v-model="form.parentId"
|
v-model="form.parentId"
|
||||||
@ -113,12 +134,15 @@
|
|||||||
<el-form-item label="计量单位" prop="unit">
|
<el-form-item label="计量单位" prop="unit">
|
||||||
<el-input v-model="form.unit" placeholder="请输入计量单位" />
|
<el-input v-model="form.unit" placeholder="请输入计量单位" />
|
||||||
</el-form-item>
|
</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-form-item label="数量" prop="total" v-if="isDisabled">
|
||||||
<el-input v-model="form.total" placeholder="请输入数量" />
|
<el-input v-model="form.total" placeholder="请输入数量" />
|
||||||
</el-form-item>
|
</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-form-item label="关联数据" prop="workType" v-if="!form.id">
|
||||||
<el-select v-model="form.workType" placeholder="请选择关联数据">
|
<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" />
|
<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 showSearch = ref(true);
|
||||||
const isExpandAll = ref(true);
|
const isExpandAll = ref(true);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
const file = ref();
|
||||||
const queryFormRef = ref<ElFormInstance>();
|
const queryFormRef = ref<ElFormInstance>();
|
||||||
const progressCategoryFormRef = ref<ElFormInstance>();
|
const progressCategoryFormRef = ref<ElFormInstance>();
|
||||||
const progressCategoryTableRef = ref<ElTableInstance>();
|
const progressCategoryTableRef = ref<ElTableInstance>();
|
||||||
@ -194,6 +218,8 @@ const initFormData: ProgressCategoryForm = {
|
|||||||
name: undefined,
|
name: undefined,
|
||||||
unitType: undefined,
|
unitType: undefined,
|
||||||
unit: undefined,
|
unit: undefined,
|
||||||
|
constructionPrice: undefined,
|
||||||
|
ownerPrice: undefined,
|
||||||
unitPrice: undefined,
|
unitPrice: undefined,
|
||||||
outputValue: undefined,
|
outputValue: undefined,
|
||||||
total: undefined,
|
total: undefined,
|
||||||
@ -236,7 +262,9 @@ const data = reactive<PageData<ProgressCategoryForm, ProgressCategoryQuery>>({
|
|||||||
unitPrice: [{ required: true, message: '综合单价不能为空', trigger: 'blur' }],
|
unitPrice: [{ required: true, message: '综合单价不能为空', trigger: 'blur' }],
|
||||||
outputValue: [{ required: true, message: '产值金额不能为空', trigger: 'blur' }],
|
outputValue: [{ required: true, message: '产值金额不能为空', trigger: 'blur' }],
|
||||||
isDelay: [{ 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 getTreeselect = async () => {
|
||||||
const res = await listProgressCategory(queryParams.value);
|
const res = await listProgressCategory(queryParams.value);
|
||||||
@ -366,12 +399,13 @@ 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 fileName = treeRef.value.getCheckedNodes()[0].pathNodes[0].label;
|
||||||
proxy?.download(
|
proxy?.download(
|
||||||
'/progress/progressCategory/export',
|
'/progress/progressCategory/export',
|
||||||
{
|
{
|
||||||
ids: ids
|
ids: ids
|
||||||
},
|
},
|
||||||
`qualityInspection_${new Date().getTime()}.xlsx`,
|
`${fileName}分项工程单价导入.xlsx`,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user