This commit is contained in:
2025-09-06 19:15:47 +08:00
parent 6380ee505f
commit 178f44a5a3
9 changed files with 47 additions and 48 deletions

View File

@ -170,11 +170,12 @@ const getInfo = () => {
loading.value = true;
buttonLoading.value = false;
nextTick(async () => {
routeParams.value.businessId ? routeParams.value.businessId.split('_')[0] : currentProject.value?.id;
const res = await getMonthInfo({ id: routeParams.value.id });
console.log(routeParams.value);
// routeParams.value.businessId ? routeParams.value.businessId.split('_')[0] : routeParams.value.id;
const res = await getMonthInfo({ id: routeParams.value.id.split('_')[0] });
form.value = res.data as any;
form.value[0].mid = form.value[0].id;
form.value[0].id = form.value[0].projectId + '_plan';
form.value[0].id = form.value[0].id + '_plan';
loading.value = false;
buttonLoading.value = false;
});
@ -194,7 +195,7 @@ const submitFlow = async () => {
const handleStartWorkFlow = async (data: LeaveForm) => {
try {
submitFormData.value.flowCode = flowCode.value;
submitFormData.value.businessId = currentProject.value?.id + '_' + form.value[0]?.planMonth;
submitFormData.value.businessId = routeParams.value.id + '_plan';
//流程变量
taskVariables.value = {
@ -213,8 +214,6 @@ const handleStartWorkFlow = async (data: LeaveForm) => {
};
//审批记录
const handleApprovalRecord = () => {
console.log(form.value[0]?.id);
approvalRecordRef.value.init(form.value[0]?.id);
};
//提交回调
@ -229,20 +228,12 @@ const approvalVerifyOpen = async () => {
// 图纸上传成功之后 开始提交
const submit = async (status, data) => {
form.value = data;
console.log(form.value);
if (status === 'draft') {
buttonLoading.value = false;
proxy?.$modal.msgSuccess('暂存成功');
proxy.$tab.closePage(proxy.$route);
proxy.$router.go(-1);
} else {
// const res = await isSubmit(data[0]?.mid);
// if (!res.data) {
// proxy?.$modal.msgError('三种计划产值必须填写');
// return;
// }
if ((form.value[0]?.planAuditStatus === 'draft' && (flowCode.value === '' || flowCode.value === null)) || routeParams.value.type === 'add') {
flowCode.value = flowCodeOptions[0].value;
dialogVisible.visible = true;