查看审核状态问题
This commit is contained in:
@ -3,7 +3,8 @@ import { Modal, Descriptions, Spin } from 'antd';
|
|||||||
import { useSupplierDetailModal } from '@/components/SupplierDetailModalContext/SupplierDetailModalContext';
|
import { useSupplierDetailModal } from '@/components/SupplierDetailModalContext/SupplierDetailModalContext';
|
||||||
|
|
||||||
import { coscoAccessWorkCategory } from '../services'
|
import { coscoAccessWorkCategory } from '../services'
|
||||||
|
//字典
|
||||||
|
import { getDictList } from '@/servers/api/dicts'
|
||||||
//数据接口
|
//数据接口
|
||||||
interface Data {
|
interface Data {
|
||||||
coscoAccessWork: coscoAccessWorks;
|
coscoAccessWork: coscoAccessWorks;
|
||||||
@ -25,6 +26,7 @@ interface coscoAccessWorks {
|
|||||||
orgName: string;
|
orgName: string;
|
||||||
reviewStatusText: string;
|
reviewStatusText: string;
|
||||||
approveStatusText: string;
|
approveStatusText: string;
|
||||||
|
approveStatus: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ViewModal: React.FC<{
|
const ViewModal: React.FC<{
|
||||||
@ -36,11 +38,21 @@ const ViewModal: React.FC<{
|
|||||||
const [data, setData] = useState<Data | null>(null);
|
const [data, setData] = useState<Data | null>(null);
|
||||||
const supplierDetailModal = useSupplierDetailModal();
|
const supplierDetailModal = useSupplierDetailModal();
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
|
const [approveTypeMap, setApproveTypeMap] = useState<{ [code: string]: string }>({});
|
||||||
|
|
||||||
//初始化
|
//初始化
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (record.id) {
|
if (record.id) {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
|
getDictList('approve_type').then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
const map: { [code: string]: string } = {};
|
||||||
|
res.data.forEach((item: { code: string, dicName: string }) => {
|
||||||
|
map[item.code] = item.dicName;
|
||||||
|
});
|
||||||
|
setApproveTypeMap(map);
|
||||||
|
}
|
||||||
|
})
|
||||||
coscoAccessWorkCategory(record.id).then((res) => {
|
coscoAccessWorkCategory(record.id).then((res) => {
|
||||||
const { code, data } = res;
|
const { code, data } = res;
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
@ -73,8 +85,7 @@ const ViewModal: React.FC<{
|
|||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="审批结果">{ approveTypeMap[data.coscoAccessWork.approveStatus] || data.coscoAccessWork.approveStatus}</Descriptions.Item>
|
||||||
<Descriptions.Item label="审批结果">{data.coscoAccessWork.approveStatusText}</Descriptions.Item>
|
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
)}</Spin>
|
)}</Spin>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
@ -3,7 +3,8 @@ import { Modal, Descriptions, Spin } from 'antd';
|
|||||||
import { useSupplierDetailModal } from '@/components/SupplierDetailModalContext/SupplierDetailModalContext';
|
import { useSupplierDetailModal } from '@/components/SupplierDetailModalContext/SupplierDetailModalContext';
|
||||||
|
|
||||||
import { coscoAccessWorkCategory } from '../services'
|
import { coscoAccessWorkCategory } from '../services'
|
||||||
|
//字典
|
||||||
|
import { getDictList } from '@/servers/api/dicts'
|
||||||
//数据接口
|
//数据接口
|
||||||
interface Data {
|
interface Data {
|
||||||
coscoAccessWork: coscoAccessWorks;
|
coscoAccessWork: coscoAccessWorks;
|
||||||
@ -25,6 +26,8 @@ interface coscoAccessWorks {
|
|||||||
orgName: string;
|
orgName: string;
|
||||||
reviewStatusText: string;
|
reviewStatusText: string;
|
||||||
approveStatusText: string;
|
approveStatusText: string;
|
||||||
|
approveStatus: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const ViewModal: React.FC<{
|
const ViewModal: React.FC<{
|
||||||
@ -36,11 +39,21 @@ const ViewModal: React.FC<{
|
|||||||
const [data, setData] = useState<Data | null>(null);
|
const [data, setData] = useState<Data | null>(null);
|
||||||
const supplierDetailModal = useSupplierDetailModal();
|
const supplierDetailModal = useSupplierDetailModal();
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
|
const [approveTypeMap, setApproveTypeMap] = useState<{ [code: string]: string }>({});
|
||||||
|
|
||||||
//初始化
|
//初始化
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (record.id) {
|
if (record.id) {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
|
getDictList('approve_type').then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
const map: { [code: string]: string } = {};
|
||||||
|
res.data.forEach((item: { code: string, dicName: string }) => {
|
||||||
|
map[item.code] = item.dicName;
|
||||||
|
});
|
||||||
|
setApproveTypeMap(map);
|
||||||
|
}
|
||||||
|
})
|
||||||
coscoAccessWorkCategory(record.id).then((res) => {
|
coscoAccessWorkCategory(record.id).then((res) => {
|
||||||
const { code, data } = res;
|
const { code, data } = res;
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
@ -54,7 +67,7 @@ const ViewModal: React.FC<{
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal title="查看详情" visible={visible} footer={null} onCancel={onCancel}>
|
<Modal title="查看详情" visible={visible} footer={null} onCancel={onCancel}>
|
||||||
<Spin spinning={loading}>
|
<Spin spinning={loading}>
|
||||||
{data && (
|
{data && (
|
||||||
<Descriptions bordered column={1}>
|
<Descriptions bordered column={1}>
|
||||||
<Descriptions.Item label="准入单位">{data.coscoAccessWork.orgName}</Descriptions.Item>
|
<Descriptions.Item label="准入单位">{data.coscoAccessWork.orgName}</Descriptions.Item>
|
||||||
@ -73,11 +86,11 @@ const ViewModal: React.FC<{
|
|||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="审批结果">{approveTypeMap[data.coscoAccessWork.approveStatus] || data.coscoAccessWork.approveStatus}</Descriptions.Item>
|
||||||
<Descriptions.Item label="审批结果">{data.coscoAccessWork.approveStatusText}</Descriptions.Item>
|
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
)}</Spin>
|
)}</Spin>
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3,7 +3,8 @@ import { Modal, Descriptions, Spin } from 'antd';
|
|||||||
import { useSupplierDetailModal } from '@/components/SupplierDetailModalContext/SupplierDetailModalContext';
|
import { useSupplierDetailModal } from '@/components/SupplierDetailModalContext/SupplierDetailModalContext';
|
||||||
|
|
||||||
import { coscoAccessWork } from '../services'
|
import { coscoAccessWork } from '../services'
|
||||||
|
//字典
|
||||||
|
import { getDictList } from '@/servers/api/dicts'
|
||||||
//数据接口
|
//数据接口
|
||||||
interface Data {
|
interface Data {
|
||||||
coscoAccessWork: coscoAccessWorks;
|
coscoAccessWork: coscoAccessWorks;
|
||||||
@ -38,6 +39,7 @@ interface coscoAccessWorks {
|
|||||||
startTime: string;
|
startTime: string;
|
||||||
endTime: string;
|
endTime: string;
|
||||||
reviewStatusText: string;
|
reviewStatusText: string;
|
||||||
|
approveStatus: string;
|
||||||
accessType: string;
|
accessType: string;
|
||||||
accessDesc: string;
|
accessDesc: string;
|
||||||
approveStatusText: string;
|
approveStatusText: string;
|
||||||
@ -52,11 +54,21 @@ const ViewModal: React.FC<{
|
|||||||
const [data, setData] = useState<Data | null>(null);
|
const [data, setData] = useState<Data | null>(null);
|
||||||
const supplierDetailModal = useSupplierDetailModal();
|
const supplierDetailModal = useSupplierDetailModal();
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
|
const [approveTypeMap, setApproveTypeMap] = useState<{ [code: string]: string }>({});
|
||||||
|
|
||||||
//初始化
|
//初始化
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (record) {
|
if (record) {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
|
getDictList('approve_type').then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
const map: { [code: string]: string } = {};
|
||||||
|
res.data.forEach((item: { code: string, dicName: string }) => {
|
||||||
|
map[item.code] = item.dicName;
|
||||||
|
});
|
||||||
|
setApproveTypeMap(map);
|
||||||
|
}
|
||||||
|
})
|
||||||
coscoAccessWork(record).then((res) => {
|
coscoAccessWork(record).then((res) => {
|
||||||
const { code, data } = res;
|
const { code, data } = res;
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
@ -132,7 +144,7 @@ const ViewModal: React.FC<{
|
|||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label="审批结果">{data.coscoAccessWork.approveStatusText}</Descriptions.Item>
|
<Descriptions.Item label="审批结果">{ approveTypeMap[data.coscoAccessWork.approveStatus] || data.coscoAccessWork.approveStatus}</Descriptions.Item>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -3,7 +3,8 @@ import { Modal, Descriptions, Spin } from 'antd';
|
|||||||
import { useSupplierDetailModal } from '@/components/SupplierDetailModalContext/SupplierDetailModalContext';
|
import { useSupplierDetailModal } from '@/components/SupplierDetailModalContext/SupplierDetailModalContext';
|
||||||
|
|
||||||
import { coscoAccessWork } from '../services'
|
import { coscoAccessWork } from '../services'
|
||||||
|
//字典
|
||||||
|
import { getDictList } from '@/servers/api/dicts'
|
||||||
//数据接口
|
//数据接口
|
||||||
interface Data {
|
interface Data {
|
||||||
coscoAccessWork: coscoAccessWorks;
|
coscoAccessWork: coscoAccessWorks;
|
||||||
@ -38,6 +39,7 @@ interface coscoAccessWorks {
|
|||||||
startTime: string;
|
startTime: string;
|
||||||
endTime: string;
|
endTime: string;
|
||||||
reviewStatusText: string;
|
reviewStatusText: string;
|
||||||
|
approveStatus: string;
|
||||||
accessType: string;
|
accessType: string;
|
||||||
accessDesc: string;
|
accessDesc: string;
|
||||||
approveStatusText: string;
|
approveStatusText: string;
|
||||||
@ -52,11 +54,20 @@ const ViewModal: React.FC<{
|
|||||||
const [data, setData] = useState<Data | null>(null);
|
const [data, setData] = useState<Data | null>(null);
|
||||||
const supplierDetailModal = useSupplierDetailModal();
|
const supplierDetailModal = useSupplierDetailModal();
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
|
const [approveTypeMap, setApproveTypeMap] = useState<{ [code: string]: string }>({});
|
||||||
//初始化
|
//初始化
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (record.id) {
|
if (record.id) {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
|
getDictList('approve_type').then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
const map: { [code: string]: string } = {};
|
||||||
|
res.data.forEach((item: { code: string, dicName: string }) => {
|
||||||
|
map[item.code] = item.dicName;
|
||||||
|
});
|
||||||
|
setApproveTypeMap(map);
|
||||||
|
}
|
||||||
|
})
|
||||||
coscoAccessWork(record.id)
|
coscoAccessWork(record.id)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const { code, data } = res;
|
const { code, data } = res;
|
||||||
@ -135,7 +146,7 @@ const ViewModal: React.FC<{
|
|||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label="审批结果">{data.coscoAccessWork.approveStatusText}</Descriptions.Item>
|
<Descriptions.Item label="审批结果">{ approveTypeMap[data.coscoAccessWork.approveStatus] || data.coscoAccessWork.approveStatus}</Descriptions.Item>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -3,6 +3,8 @@ import { Modal, Descriptions, Spin } from 'antd';
|
|||||||
|
|
||||||
import { coscoAccessWork } from '../services'
|
import { coscoAccessWork } from '../services'
|
||||||
import { useSupplierDetailModal } from '@/components/SupplierDetailModalContext/SupplierDetailModalContext';
|
import { useSupplierDetailModal } from '@/components/SupplierDetailModalContext/SupplierDetailModalContext';
|
||||||
|
//字典
|
||||||
|
import { getDictList } from '@/servers/api/dicts'
|
||||||
|
|
||||||
//数据接口
|
//数据接口
|
||||||
interface Data {
|
interface Data {
|
||||||
@ -38,6 +40,7 @@ interface coscoAccessWorks {
|
|||||||
startTime: string;
|
startTime: string;
|
||||||
endTime: string;
|
endTime: string;
|
||||||
reviewStatusText: string;
|
reviewStatusText: string;
|
||||||
|
approveStatus: string;
|
||||||
accessType: string;
|
accessType: string;
|
||||||
accessDesc: string;
|
accessDesc: string;
|
||||||
approveStatusText: string;
|
approveStatusText: string;
|
||||||
@ -52,11 +55,21 @@ const ViewModal: React.FC<{
|
|||||||
const [data, setData] = useState<Data | null>(null);
|
const [data, setData] = useState<Data | null>(null);
|
||||||
const supplierDetailModal = useSupplierDetailModal();
|
const supplierDetailModal = useSupplierDetailModal();
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
|
const [approveTypeMap, setApproveTypeMap] = useState<{ [code: string]: string }>({});
|
||||||
|
|
||||||
//初始化
|
//初始化
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (record.id) {
|
if (record.id) {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
|
getDictList('approve_type').then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
const map: { [code: string]: string } = {};
|
||||||
|
res.data.forEach((item: { code: string, dicName: string }) => {
|
||||||
|
map[item.code] = item.dicName;
|
||||||
|
});
|
||||||
|
setApproveTypeMap(map);
|
||||||
|
}
|
||||||
|
})
|
||||||
coscoAccessWork(record.id)
|
coscoAccessWork(record.id)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const { code, data } = res;
|
const { code, data } = res;
|
||||||
@ -135,7 +148,7 @@ const ViewModal: React.FC<{
|
|||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label="审批结果">{data.coscoAccessWork.approveStatusText}</Descriptions.Item>
|
<Descriptions.Item label="审批结果">{approveTypeMap[data.coscoAccessWork.approveStatus] || data.coscoAccessWork.approveStatus}</Descriptions.Item>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -5,7 +5,6 @@ import { SearchOutlined, DeleteOutlined } from "@ant-design/icons";
|
|||||||
//umi 相关
|
//umi 相关
|
||||||
import { connect } from 'umi';
|
import { connect } from 'umi';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import AccessDepartmentSelect from "@/components/AccessDepartmentSelect"
|
|
||||||
//接口
|
//接口
|
||||||
import { getExitInfoPage } from "../services";
|
import { getExitInfoPage } from "../services";
|
||||||
import { useSupplierDetailModal } from '@/components/SupplierDetailModalContext/SupplierDetailModalContext';
|
import { useSupplierDetailModal } from '@/components/SupplierDetailModalContext/SupplierDetailModalContext';
|
||||||
@ -133,6 +132,9 @@ const ViewBlacklistModal: React.FC<ViewBlacklistModalProps> = ({
|
|||||||
loading={loading}
|
loading={loading}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
pagination={{ ...tableProps.pagination, total: pagination.total }}
|
pagination={{ ...tableProps.pagination, total: pagination.total }}
|
||||||
|
onChange={(pagination) => {
|
||||||
|
getList(pagination.current, pagination.pageSize);
|
||||||
|
}}
|
||||||
style={{ flex: 1, minHeight: 'calc(100vh - 350px)' }}
|
style={{ flex: 1, minHeight: 'calc(100vh - 350px)' }}
|
||||||
scroll={{ y: 'calc(100vh - 350px)' }}
|
scroll={{ y: 'calc(100vh - 350px)' }}
|
||||||
/>
|
/>
|
||||||
|
@ -5,7 +5,6 @@ import { SearchOutlined, DeleteOutlined } from "@ant-design/icons";
|
|||||||
//umi 相关
|
//umi 相关
|
||||||
import { connect } from 'umi';
|
import { connect } from 'umi';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import AccessDepartmentSelect from "@/components/AccessDepartmentSelect"
|
|
||||||
//接口
|
//接口
|
||||||
import { getExitInfoPage } from "../services";
|
import { getExitInfoPage } from "../services";
|
||||||
import { useSupplierDetailModal } from '@/components/SupplierDetailModalContext/SupplierDetailModalContext';
|
import { useSupplierDetailModal } from '@/components/SupplierDetailModalContext/SupplierDetailModalContext';
|
||||||
@ -133,6 +132,9 @@ const ViewBlacklistModal: React.FC<ViewBlacklistModalProps> = ({
|
|||||||
loading={loading}
|
loading={loading}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
pagination={{ ...tableProps.pagination, total: pagination.total }}
|
pagination={{ ...tableProps.pagination, total: pagination.total }}
|
||||||
|
onChange={(pagination) => {
|
||||||
|
getList(pagination.current, pagination.pageSize);
|
||||||
|
}}
|
||||||
style={{ flex: 1, minHeight: 'calc(100vh - 350px)' }}
|
style={{ flex: 1, minHeight: 'calc(100vh - 350px)' }}
|
||||||
scroll={{ y: 'calc(100vh - 350px)' }}
|
scroll={{ y: 'calc(100vh - 350px)' }}
|
||||||
/>
|
/>
|
||||||
|
Reference in New Issue
Block a user