优化
This commit is contained in:
@ -5,7 +5,7 @@ VITE_APP_TITLE = 煤科建管平台
|
|||||||
VITE_APP_ENV = 'development'
|
VITE_APP_ENV = 'development'
|
||||||
|
|
||||||
# 开发环境
|
# 开发环境
|
||||||
VITE_APP_BASE_API = 'http://192.168.110.149:8899'
|
VITE_APP_BASE_API = 'http://192.168.110.180:8899'
|
||||||
# 李陈杰 209
|
# 李陈杰 209
|
||||||
|
|
||||||
# VITE_APP_BASE_API = 'http://192.168.110.209:8899'
|
# VITE_APP_BASE_API = 'http://192.168.110.209:8899'
|
||||||
|
@ -93,7 +93,7 @@ export const isSubmit = (id): AxiosPromise => {
|
|||||||
*/
|
*/
|
||||||
export const getMonthInfo = (query): AxiosPromise<MonthPlanVO> => {
|
export const getMonthInfo = (query): AxiosPromise<MonthPlanVO> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/out/monthPlan/monthInfo',
|
url: '/out/monthPlan/monthInfo/' + query.id,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
|
@ -133,7 +133,7 @@
|
|||||||
></el-col>
|
></el-col>
|
||||||
<el-col :span="12" :offset="0"
|
<el-col :span="12" :offset="0"
|
||||||
><el-form-item label="供应商" prop="supplier">
|
><el-form-item label="供应商" prop="supplier">
|
||||||
<el-select v-model="form.supplierId" value-key="id" placeholder="请选择供应商" clearable filterable @change="">
|
<el-select v-model="form.supplierId" value-key="id" placeholder="请选择供应商" clearable filterable @change="getPlanList">
|
||||||
<el-option v-for="item in supplierOptions" :key="item.id" :label="item.supplierName" :value="item.id"> </el-option>
|
<el-option v-for="item in supplierOptions" :key="item.id" :label="item.supplierName" :value="item.id"> </el-option>
|
||||||
</el-select> </el-form-item
|
</el-select> </el-form-item
|
||||||
></el-col>
|
></el-col>
|
||||||
@ -145,7 +145,14 @@
|
|||||||
></el-col>
|
></el-col>
|
||||||
<el-col :span="12" :offset="0">
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="需求计划" prop="planId">
|
<el-form-item label="需求计划" prop="planId">
|
||||||
<el-select v-model="form.planId" value-key="id" placeholder="请选择需求计划" multiple filterable :disabled="!form.mrpBaseId">
|
<el-select
|
||||||
|
v-model="form.planId"
|
||||||
|
value-key="id"
|
||||||
|
placeholder="请选择需求计划"
|
||||||
|
multiple
|
||||||
|
filterable
|
||||||
|
:disabled="!form.mrpBaseId && !form.supplierId"
|
||||||
|
>
|
||||||
<el-option v-for="item in planList" :key="item.id" :label="item.name" :value="item.id"> </el-option>
|
<el-option v-for="item in planList" :key="item.id" :label="item.name" :value="item.id"> </el-option>
|
||||||
</el-select> </el-form-item
|
</el-select> </el-form-item
|
||||||
></el-col>
|
></el-col>
|
||||||
@ -498,13 +505,16 @@ const submitForm = () => {
|
|||||||
|
|
||||||
const getPlanList = async () => {
|
const getPlanList = async () => {
|
||||||
form.value.planId = '';
|
form.value.planId = '';
|
||||||
const res = await getBatch({
|
if (form.value.mrpBaseId && form.value.supplierId) {
|
||||||
pageNum: 1,
|
const res = await getBatch({
|
||||||
pageSize: 10,
|
pageNum: 1,
|
||||||
projectId: currentProject.value?.id,
|
pageSize: 10,
|
||||||
mrpBaseId: form.value.mrpBaseId
|
projectId: currentProject.value?.id,
|
||||||
});
|
mrpBaseId: form.value.mrpBaseId,
|
||||||
planList.value = res.rows;
|
supplierId: form.value.supplierId
|
||||||
|
});
|
||||||
|
planList.value = res.rows;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const getBatchList = async () => {
|
const getBatchList = async () => {
|
||||||
|
@ -272,6 +272,7 @@ const handleDelete = async (row?: MonthPlanVO) => {
|
|||||||
const handleAudit = async (row?: MonthPlanVO) => {
|
const handleAudit = async (row?: MonthPlanVO) => {
|
||||||
proxy?.$tab.openPage('/approval/monthPlan/indexEdit', '审核月度产值计划', {
|
proxy?.$tab.openPage('/approval/monthPlan/indexEdit', '审核月度产值计划', {
|
||||||
planMonth: row?.planMonth,
|
planMonth: row?.planMonth,
|
||||||
|
id: row?.id,
|
||||||
type: 'update'
|
type: 'update'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -104,6 +104,7 @@ 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 { getMonthInfo, isSubmit } from '@/api/out/monthPlan';
|
import { getMonthInfo, isSubmit } from '@/api/out/monthPlan';
|
||||||
|
import { id } from 'element-plus/es/locale/index.mjs';
|
||||||
// 获取用户 store
|
// 获取用户 store
|
||||||
const userStore = useUserStoreHook();
|
const userStore = useUserStoreHook();
|
||||||
// 从 store 中获取项目列表和当前选中的项目
|
// 从 store 中获取项目列表和当前选中的项目
|
||||||
@ -169,14 +170,11 @@ const getInfo = () => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
buttonLoading.value = false;
|
buttonLoading.value = false;
|
||||||
nextTick(async () => {
|
nextTick(async () => {
|
||||||
console.log('🚀 ~ routeParams.value:', routeParams.value.businessId);
|
routeParams.value.businessId ? routeParams.value.businessId.split('_')[0] : currentProject.value?.id;
|
||||||
const projectId = routeParams.value.businessId ? routeParams.value.businessId.split('_')[0] : currentProject.value?.id;
|
const res = await getMonthInfo({ id: routeParams.value.id });
|
||||||
const res = await getMonthInfo({ projectId: projectId, planMonth: routeParams.value.planMonth });
|
|
||||||
form.value = res.data as any;
|
form.value = res.data as any;
|
||||||
|
|
||||||
console.log('🚀 ~ getInfo ~ form.value:', form.value[0].projectId);
|
|
||||||
form.value[0].mid = form.value[0].id;
|
form.value[0].mid = form.value[0].id;
|
||||||
form.value[0].id = form.value[0].projectId + '_' + form.value[0].planMonth;
|
form.value[0].id = form.value[0].projectId + '_plan';
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
buttonLoading.value = false;
|
buttonLoading.value = false;
|
||||||
});
|
});
|
||||||
@ -239,12 +237,12 @@ 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 {
|
||||||
const res = await isSubmit(data[0]?.mid);
|
// const res = await isSubmit(data[0]?.mid);
|
||||||
|
|
||||||
if (!res.data) {
|
// if (!res.data) {
|
||||||
proxy?.$modal.msgError('三种计划产值必须填写');
|
// proxy?.$modal.msgError('三种计划产值必须填写');
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
if ((form.value[0]?.planAuditStatus === 'draft' && (flowCode.value === '' || flowCode.value === null)) || routeParams.value.type === 'add') {
|
if ((form.value[0]?.planAuditStatus === '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;
|
||||||
@ -261,12 +259,9 @@ const submit = async (status, data) => {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nextTick(async () => {
|
nextTick(async () => {
|
||||||
routeParams.value = proxy.$route.query;
|
routeParams.value = proxy.$route.query;
|
||||||
console.log('🚀 ~ proxy.$route.query:', proxy.$route.query);
|
|
||||||
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') {
|
||||||
console.log('🚀 ~ routeParams.value:', routeParams.value);
|
|
||||||
|
|
||||||
getInfo();
|
getInfo();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -34,15 +34,13 @@
|
|||||||
<el-table-column :show-overflow-tooltip="true" prop="flowName" align="center" label="流程定义名称"></el-table-column>
|
<el-table-column :show-overflow-tooltip="true" prop="flowName" align="center" label="流程定义名称"></el-table-column>
|
||||||
<el-table-column align="center" prop="flowCode" label="流程定义编码"></el-table-column>
|
<el-table-column align="center" prop="flowCode" label="流程定义编码"></el-table-column>
|
||||||
<el-table-column align="center" prop="categoryName" label="流程分类"></el-table-column>
|
<el-table-column align="center" prop="categoryName" label="流程分类"></el-table-column>
|
||||||
<el-table-column align="center" prop="version" label="版本号" width="90">
|
|
||||||
<template #default="scope"> v{{ scope.row.version }}.0</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="center" prop="nodeName" label="任务名称"></el-table-column>
|
<el-table-column align="center" prop="nodeName" label="任务名称"></el-table-column>
|
||||||
<el-table-column align="center" label="流程状态" min-width="70">
|
<el-table-column align="center" label="流程状态" min-width="70">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="wf_business_status" :value="scope.row.flowStatus"></dict-tag>
|
<dict-tag :options="wf_business_status" :value="scope.row.flowStatus"></dict-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column align="center" prop="updateTime" label="更新时间" width="150"></el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="200">
|
<el-table-column label="操作" align="center" width="200">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="primary" size="small" icon="View" @click="handleView(scope.row)">查看</el-button>
|
<el-button type="primary" size="small" icon="View" @click="handleView(scope.row)">查看</el-button>
|
||||||
|
Reference in New Issue
Block a user