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