计划管理-经营计划管理页面
parent
c7c5181dec
commit
63bd22df44
@ -0,0 +1,3 @@
|
|||||||
|
<svg width="14" height="16" viewBox="0 0 14 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M12.625 15.7125H1.05C0.475 15.7125 0 15.2375 0 14.6625V3.1375C0 2.5625 0.475 2.0875 1.05 2.0875H1.575V3.6625C1.575 4.2375 2.05 4.7125 2.625 4.7125H11.0375C11.6125 4.7125 12.0875 4.2375 12.0875 3.6625V2.0875H12.6125C13.1875 2.0875 13.6625 2.5625 13.6625 3.1375V14.6625C13.675 15.2375 13.2 15.7125 12.625 15.7125ZM10.275 8.5875C9.9625 8.2875 9.4625 8.2875 9.15 8.5875L6.3375 11.2625L5.025 10.0125C4.7125 9.7125 4.2125 9.7125 3.9 10.0125C3.5875 10.3125 3.5875 10.7875 3.9 11.075L5.775 12.85C6.0875 13.15 6.5875 13.15 6.9 12.85L10.275 9.65C10.5875 9.3625 10.5875 8.8875 10.275 8.5875ZM9.4625 3.6625H4.2125C3.6375 3.6625 3.1625 3.1875 3.1625 2.6125V2.0875C5.2625 0.55 5.2875 0.525 5.8375 0H7.925C8.4375 0.4875 8.425 0.55 10.5125 2.0875V2.6125C10.5125 3.2 10.05 3.6625 9.4625 3.6625ZM6.8375 1.05C6.2625 1.05 5.7875 1.525 5.7875 2.1C5.7875 2.675 6.2625 3.15 6.8375 3.15C7.4125 3.15 7.8875 2.675 7.8875 2.1C7.8875 1.5125 7.4125 1.05 6.8375 1.05Z" fill="white"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
@ -0,0 +1,55 @@
|
|||||||
|
import React, { useState } from 'react';
|
||||||
|
import { Card, Row, Col, Statistic, Progress, Button, Space } from 'antd';
|
||||||
|
import styles from './PlanManage.less';
|
||||||
|
import BusinessPlanManagement from './components/BusinessPlanManagement';
|
||||||
|
import ProductionPlanManagement from './components/ProductionPlanManagement';
|
||||||
|
import PlanApprovalProcess from './components/PlanApprovalProcess';
|
||||||
|
|
||||||
|
const PlanManage = () => {
|
||||||
|
const [activeModule, setActiveModule] = useState('businessPlan');
|
||||||
|
|
||||||
|
const handleModuleClick = (module) => {
|
||||||
|
setActiveModule(module)
|
||||||
|
}
|
||||||
|
|
||||||
|
const renderModule = () => {
|
||||||
|
switch (activeModule) {
|
||||||
|
case 'businessPlan':
|
||||||
|
return <BusinessPlanManagement />;
|
||||||
|
case 'productionPlan':
|
||||||
|
return <ProductionPlanManagement />;
|
||||||
|
case 'planApprovalProcess':
|
||||||
|
return <PlanApprovalProcess />;
|
||||||
|
default:
|
||||||
|
return <BusinessPlanManagement />;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={styles.container}>
|
||||||
|
<div className={styles.TopButton}>
|
||||||
|
<Button
|
||||||
|
className={`${styles.TopButtonItem} ${activeModule === "businessPlan" ? styles.active : ""}`}
|
||||||
|
onClick={() => handleModuleClick("businessPlan")}
|
||||||
|
>经营计划管理
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
className={`${styles.TopButtonItem} ${activeModule === "productionPlan" ? styles.active : ""}`}
|
||||||
|
onClick={() => handleModuleClick("productionPlan")}
|
||||||
|
>生产计划管理
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
className={`${styles.TopButtonItem} ${activeModule === "planApprovalProcess" ? styles.active : ""}`}
|
||||||
|
onClick={() => handleModuleClick("planApprovalProcess")}
|
||||||
|
>计划审批流程
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
<div className={styles.content}>
|
||||||
|
{renderModule()}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default PlanManage;
|
||||||
@ -0,0 +1,65 @@
|
|||||||
|
.container {
|
||||||
|
width: 100%;
|
||||||
|
height: 89vh;
|
||||||
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
.TopButton {
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
width: 100%;
|
||||||
|
padding: 10px 30px;
|
||||||
|
display: flex;
|
||||||
|
gap: 24px;
|
||||||
|
margin-left: 6px;
|
||||||
|
|
||||||
|
.TopButtonItem {
|
||||||
|
background-color: transparent !important;
|
||||||
|
color: #333333 !important;
|
||||||
|
font-family: 'PingFang SC', sans-serif !important;
|
||||||
|
font-weight: 500 !important;
|
||||||
|
font-size: 14px !important;
|
||||||
|
line-height: 100% !important;
|
||||||
|
border-radius: 8px !important;
|
||||||
|
padding: 6px 10px !important;
|
||||||
|
height: auto !important;
|
||||||
|
border: none !important;
|
||||||
|
box-shadow: none !important;
|
||||||
|
position: relative !important;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: #333333 !important;
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
color: #006665 !important;
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
color: #006665 !important;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
bottom: -10px;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 4px;
|
||||||
|
background-color: #006665;
|
||||||
|
border-radius: 0;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
// ======== 内容区域样式 ========
|
||||||
|
flex: 1; // ======== 占据剩余空间 ========
|
||||||
|
overflow-y: auto; // ======== 允许垂直滚动 ========
|
||||||
|
padding: 0; // ======== 无内边距 ========
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,319 @@
|
|||||||
|
import { deleteByPrimaryKeyForProUser, selectByPrimaryKeyForProUser, insertForProUser, updateForProUser, deleteByMapForProUser,updateByMapForProUser, getOneForProUser,getAllForProUser,queryPageForProUser, countForProUser, insertBatchForProUser, deleteBatchForProUser,updateBatchForProUser, resetPwdForProUser } from '@/services/system/api_prouser';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
namespace: 'PlanManage',
|
||||||
|
|
||||||
|
state: {
|
||||||
|
params: {},
|
||||||
|
data: {
|
||||||
|
list: [],
|
||||||
|
pagination: {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
effects: {
|
||||||
|
*delete_by_primarykey_for_prouser({ payload, callback }, { select, call, put }) {
|
||||||
|
const response = yield call(deleteByPrimaryKeyForProUser, payload)
|
||||||
|
yield put({
|
||||||
|
type: 'deleteByPrimaryKeyForProUser',
|
||||||
|
payload: response
|
||||||
|
})
|
||||||
|
|
||||||
|
if (!response.success) {
|
||||||
|
callback && callback(response)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const params = yield select(state => state.prouser.params)
|
||||||
|
const responseData = yield call(queryPageForProUser, params)
|
||||||
|
yield put({
|
||||||
|
type: 'queryPageForProUser',
|
||||||
|
payload: responseData
|
||||||
|
})
|
||||||
|
|
||||||
|
if (callback) callback(response)
|
||||||
|
},
|
||||||
|
*select_by_primarykey_for_prouser({ payload, callback }, { call, put }) {
|
||||||
|
const response = yield call(selectByPrimaryKeyForProUser, payload)
|
||||||
|
yield put({
|
||||||
|
type: 'selectByPrimaryKeyForProUser',
|
||||||
|
payload: response
|
||||||
|
})
|
||||||
|
|
||||||
|
if (callback) callback(response)
|
||||||
|
},
|
||||||
|
*insert_for_prouser({ payload, callback }, { select, call, put }) {
|
||||||
|
const response = yield call(insertForProUser, payload)
|
||||||
|
yield put({
|
||||||
|
type: 'insertForProUser',
|
||||||
|
payload: response
|
||||||
|
})
|
||||||
|
|
||||||
|
if (!response.success) {
|
||||||
|
callback && callback(response)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const params = yield select(state => state.prouser.params)
|
||||||
|
const responseData = yield call(queryPageForProUser, params)
|
||||||
|
yield put({
|
||||||
|
type: 'queryPageForProUser',
|
||||||
|
payload: responseData
|
||||||
|
})
|
||||||
|
|
||||||
|
if (callback) callback(response)
|
||||||
|
},
|
||||||
|
*update_for_prouser({ payload, callback }, { select, call, put }) {
|
||||||
|
const response = yield call(updateForProUser, payload)
|
||||||
|
yield put({
|
||||||
|
type: 'updateForProUser',
|
||||||
|
payload: response
|
||||||
|
})
|
||||||
|
|
||||||
|
if (!response.success) {
|
||||||
|
callback && callback(response)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const params = yield select(state => state.prouser.params)
|
||||||
|
const responseData = yield call(queryPageForProUser, params)
|
||||||
|
yield put({
|
||||||
|
type: 'queryPageForProUser',
|
||||||
|
payload: responseData
|
||||||
|
})
|
||||||
|
|
||||||
|
if (callback) callback(response)
|
||||||
|
},
|
||||||
|
*delete_by_map_for_prouser({ payload, callback }, { select, call, put }) {
|
||||||
|
const response = yield call(deleteByMapForProUser, payload);
|
||||||
|
yield put({
|
||||||
|
type: 'deleteByMapForProUser',
|
||||||
|
payload: response,
|
||||||
|
});
|
||||||
|
|
||||||
|
const params = yield select(state => state.prouser.params);
|
||||||
|
const responsedata = yield call(queryPageForProUser, params);
|
||||||
|
yield put({
|
||||||
|
type: 'queryPageForProUser',
|
||||||
|
payload: responsedata,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (callback) callback(response);
|
||||||
|
},
|
||||||
|
*update_by_map_for_prouser({ payload, callback }, { select, call, put }) {
|
||||||
|
const response = yield call(updateByMapForProUser, payload);
|
||||||
|
yield put({
|
||||||
|
type: 'updateByMapForProUser',
|
||||||
|
payload: response,
|
||||||
|
});
|
||||||
|
|
||||||
|
const params = yield select(state => state.prouser.params);
|
||||||
|
const responsedata = yield call(queryPageForProUser, params);
|
||||||
|
yield put({
|
||||||
|
type: 'queryPageForProUser',
|
||||||
|
payload: responsedata,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (callback) callback(response);
|
||||||
|
},
|
||||||
|
*get_one_for_prouser({ payload, callback }, { call, put }) {
|
||||||
|
const response = yield call(getOneForProUser, payload);
|
||||||
|
yield put({
|
||||||
|
type: 'getOneForProUser',
|
||||||
|
payload: response,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (callback) callback(response);
|
||||||
|
},
|
||||||
|
*get_all_for_prouser({ payload, callback }, { call, put }) {
|
||||||
|
const response = yield call(getAllForProUser, payload);
|
||||||
|
yield put({
|
||||||
|
type: 'getAllForProUser',
|
||||||
|
payload: response,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (callback) callback(response);
|
||||||
|
},
|
||||||
|
*query_page_for_prouser({ payload, callback }, { select, call, put }) {
|
||||||
|
const params = yield select(state => state.prouser.params);
|
||||||
|
const newParams = payload?.resetFlag ? payload : {...params, ...payload};
|
||||||
|
yield put({
|
||||||
|
type: 'setQueryPageByParams',
|
||||||
|
payload: newParams,
|
||||||
|
});
|
||||||
|
const response = yield call(queryPageForProUser, newParams);
|
||||||
|
yield put({
|
||||||
|
type: 'queryPageForProUser',
|
||||||
|
payload: response,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (callback) callback(response);
|
||||||
|
},
|
||||||
|
*count_for_prouser({ payload, callback }, { call, put }) {
|
||||||
|
const response = yield call(countForProUser, payload);
|
||||||
|
yield put({
|
||||||
|
type: 'countForProUser',
|
||||||
|
payload: response,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (callback) callback(response);
|
||||||
|
},
|
||||||
|
*insert_batch_for_prouser({ payload, callback }, { select, call, put }) {
|
||||||
|
const response = yield call(insertBatchForProUser, payload);
|
||||||
|
yield put({
|
||||||
|
type: 'insertBatchForProUser',
|
||||||
|
payload: response,
|
||||||
|
});
|
||||||
|
|
||||||
|
const params = yield select(state => state.prouser.params);
|
||||||
|
const responsedata = yield call(queryPageForProUser, params);
|
||||||
|
yield put({
|
||||||
|
type: 'queryPageForProUser',
|
||||||
|
payload: responsedata,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (callback) callback(response);
|
||||||
|
},
|
||||||
|
*delete_batch_for_prouser({ payload, callback }, { select, call, put }) {
|
||||||
|
const response = yield call(deleteBatchForProUser, payload);
|
||||||
|
yield put({
|
||||||
|
type: 'deleteBatchForProUser',
|
||||||
|
payload: response,
|
||||||
|
});
|
||||||
|
|
||||||
|
const params = yield select(state => state.prouser.params);
|
||||||
|
const responsedata = yield call(queryPageForProUser, params);
|
||||||
|
yield put({
|
||||||
|
type: 'queryPageForProUser',
|
||||||
|
payload: responsedata,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (callback) callback(response);
|
||||||
|
},
|
||||||
|
*update_batch_for_prouser({ payload, callback }, { select, call, put }) {
|
||||||
|
const response = yield call(updateBatchForProUser, payload);
|
||||||
|
yield put({
|
||||||
|
type: 'updateBatchForProUser',
|
||||||
|
payload: response,
|
||||||
|
});
|
||||||
|
|
||||||
|
const params = yield select(state => state.prouser.params);
|
||||||
|
const responsedata = yield call(queryPageForProUser, params);
|
||||||
|
yield put({
|
||||||
|
type: 'queryPageForProUser',
|
||||||
|
payload: responsedata,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (callback) callback(response);
|
||||||
|
},
|
||||||
|
*resetpwd_for_prouser({ payload, callback }, { select, call, put }) {
|
||||||
|
const response = yield call(resetPwdForProUser, payload);
|
||||||
|
yield put({
|
||||||
|
type: 'resetPwdForProUser',
|
||||||
|
payload: response,
|
||||||
|
});
|
||||||
|
|
||||||
|
const params = yield select(state => state.prouser.params);
|
||||||
|
const responsedata = yield call(queryPageForProUser, params);
|
||||||
|
yield put({
|
||||||
|
type: 'queryPageForProUser',
|
||||||
|
payload: responsedata,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (callback) callback(response);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
reducers: {
|
||||||
|
setQueryPageByParams(state, { payload }) {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
params: {...payload},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
deleteByPrimaryKeyForProUser(state, action) {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
data: action.payload,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
selectByPrimaryKeyForProUser(state, action) {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
data: action.payload,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
insertForProUser(state, action) {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
data: action.payload,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
updateForProUser(state, action) {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
data: action.payload,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
deleteByMapForProUser(state, action) {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
data: action.payload,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
updateByMapForProUser(state, action) {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
data: action.payload,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
getOneForProUser(state, action) {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
data: action.payload,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
getAllForProUser(state, action) {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
data: action.payload,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
queryPageForProUser(state, action) {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
data: action.payload,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
countForProUser(state, action) {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
data: action.payload,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
insertBatchForProUser(state, action) {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
data: action.payload,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
deleteBatchForProUser(state, action) {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
data: action.payload,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
updateBatchForProUser(state, action) {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
data: action.payload,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
resetPwdForProUser(state, action) {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
data: action.payload,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
Loading…
Reference in New Issue