10.11 委托项目功能优化
This commit is contained in:
@ -158,7 +158,7 @@ export default [
|
||||
icon: 'form',
|
||||
path: '/Project/EntrustAssign',
|
||||
routes: [
|
||||
{//管理员-代理
|
||||
{//管理员-代理 采购经理(查看委托记录)
|
||||
name: 'manager',
|
||||
path: '/Project/EntrustAssign/Manager',
|
||||
component: './Project/EntrustAssign/manager',
|
||||
|
@ -4,7 +4,7 @@ import ProTable, { ProColumns, ActionType } from '@ant-design/pro-table';
|
||||
import { multipleTypeTransform, proTableValueEnum, returnDictVal } from '@/utils/CommonUtils';
|
||||
import { getPage, agreeEntrust, queryEntrust, recallEntrust, refuseEntrust, aginstEntrust, assignEntrust, queryTree } from './service';
|
||||
import './styles.less';
|
||||
import { getDicData, getSessionUserData } from '@/utils/session';
|
||||
import { getDicData, getSessionRoleData, getSessionUserData } from '@/utils/session';
|
||||
import FileDown from '@/utils/Download';
|
||||
import { btnAuthority } from '@/utils/authority';
|
||||
import { downloadFile } from '@/utils/DownloadUtils';
|
||||
@ -178,6 +178,8 @@ const entrust: React.FC<{}> = () => {
|
||||
pageNo: 1,
|
||||
pageSize: 10
|
||||
});
|
||||
//当前登录人角色
|
||||
const roleCode = getSessionRoleData().roleCode;
|
||||
|
||||
//委托列表
|
||||
const columns: ProColumns<any>[] = [
|
||||
@ -185,7 +187,7 @@ const entrust: React.FC<{}> = () => {
|
||||
{ title: '委托方', dataIndex: 'purchaser', width: '10%', search: false },
|
||||
{ title: '项目名称', dataIndex: 'projectName', },
|
||||
{ title: '方案编号', dataIndex: 'projectNumber', width: '10%', search: false },
|
||||
{ title: '接收时间', dataIndex: 'createDate', width: '10%', valueType: 'dateTime', search: false },
|
||||
{ title: roleCode == "ebtp-purchase" ? '委托时间' : '接收时间', dataIndex: 'createDate', width: '10%', valueType: 'dateTime', search: false },
|
||||
{ title: '采购方式', dataIndex: 'procurementMode', width: '10%', valueEnum: proTableValueEnum(dictData['procurement_mode=entrust']) },
|
||||
{ title: '标的类型', dataIndex: 'procurementType', width: '10%', hideInTable: typeVisible, search: false, render: (_, record) => multipleTypeTransform(record.procurementType, proTableValueEnum(dictData['procurement_type=entrust'])) },
|
||||
{
|
||||
@ -208,6 +210,7 @@ const entrust: React.FC<{}> = () => {
|
||||
{
|
||||
title: '操作', width: '12%',
|
||||
valueType: 'option',
|
||||
hideInTable: roleCode == "ebtp-purchase",//采购经理无操作列
|
||||
render: (_, record) => {
|
||||
if (record.status === 1) {
|
||||
return (
|
||||
@ -668,7 +671,7 @@ const entrust: React.FC<{}> = () => {
|
||||
}
|
||||
return (
|
||||
<Spin spinning={spin} key='spin'>
|
||||
<PageHeader title="委托管理" />
|
||||
<PageHeader title={roleCode == "ebtp-purchase" ? "查看委托记录" : "委托管理"} />
|
||||
<div style={{ maxHeight: innerHeight - 130, height: innerHeight - 130 }} className='xsy-entrust bgCWhite' key='fenpai-div'>
|
||||
<ProTable
|
||||
actionRef={actionRef}//action触发后更新表格
|
||||
@ -679,22 +682,26 @@ const entrust: React.FC<{}> = () => {
|
||||
className='tableSearch'
|
||||
size='small'
|
||||
search={{ labelWidth: 'auto', span: 6 }}
|
||||
request={(params) =>
|
||||
getPage({
|
||||
request={async (params) => {
|
||||
let params_1 = {
|
||||
...params,
|
||||
basePageRequest: { pageNo: pageData.pageNo, pageSize: pageData.pageSize },
|
||||
agencyCompany: getSessionUserData().organizationId//机构id
|
||||
}).then((res) => {
|
||||
const result = {
|
||||
data: res.data.records,
|
||||
total: res.data.total,
|
||||
success: res.success,
|
||||
pageSize: res.data.size,
|
||||
current: res.data.current
|
||||
}
|
||||
return result;
|
||||
})
|
||||
}
|
||||
}
|
||||
if (roleCode == "ebtp-purchase") {//采购经理
|
||||
params_1["purchasingManager"] = getSessionUserData().userId;//当前登录账号
|
||||
} else if (roleCode == "ebtp-agency-admin") {//代理机构管理员
|
||||
params_1["agencyCompany"] = getSessionUserData().organizationId //机构id
|
||||
}
|
||||
const res = await getPage(params_1);
|
||||
const result_1 = {
|
||||
data: res.data.records,
|
||||
total: res.data.total,
|
||||
success: res.success,
|
||||
pageSize: res.data.size,
|
||||
current: res.data.current
|
||||
};
|
||||
return result_1;
|
||||
}}
|
||||
pagination={{
|
||||
defaultPageSize: 10,
|
||||
showSizeChanger: false,
|
||||
|
Reference in New Issue
Block a user