2022-03-10 14:24:13 +08:00
|
|
|
|
import React, { PureComponent } from 'react';
|
|
|
|
|
import { Row, Col, Tooltip, Card, List, DatePicker, Button, Statistic } from 'antd';
|
|
|
|
|
import { history } from 'umi';
|
|
|
|
|
// import PageHeaderWrapper from '@/components/PageHeaderWrapper';
|
|
|
|
|
import { connect } from 'dva';
|
|
|
|
|
import './index.less';
|
|
|
|
|
import talkPng from '@/images/talk/talk.png';
|
|
|
|
|
import { routerRedux } from 'dva/router';
|
|
|
|
|
import { RightOutlined } from '@ant-design/icons';
|
|
|
|
|
import moment from 'moment';
|
2022-06-09 14:20:40 +08:00
|
|
|
|
import { followUpAProjectSupplier, getSessionUserData, getRA } from '@/utils/session';
|
2022-03-10 14:24:13 +08:00
|
|
|
|
import { getDefId } from './service';
|
|
|
|
|
import { getURLInformation } from '@/utils/CommonUtils';
|
|
|
|
|
import MainDetail from '@/pages/SystemMessage/message/components/pageDetail'
|
|
|
|
|
import MessageDetail from '@/pages/SystemMessage/message/components/messageDetail'
|
|
|
|
|
import NoticeDetail from '@/pages/notice/noticeList/components/NoticeDetail'
|
|
|
|
|
import IParticipateIn from '@/utils/IParticipateIn'
|
|
|
|
|
import InvitationLetter from '@/utils/InvitationLetter'
|
|
|
|
|
import QuestDetail from '@/pages/SystemMessage/message/components/questDetail'
|
|
|
|
|
import { getQuestList } from '@/pages/SystemMessage/message/service'
|
|
|
|
|
@connect(({ dashboard, loading }) => ({
|
|
|
|
|
...dashboard,
|
|
|
|
|
downlistLoading: loading.effects['dashboard/fetchDowntlist'],
|
|
|
|
|
projectlistLoading: loading.effects['dashboard/fetchprojectRecords'],
|
|
|
|
|
}))
|
|
|
|
|
class supplier extends PureComponent {
|
|
|
|
|
state = {
|
|
|
|
|
datevalue: moment(moment().format('YYYYMM'), 'YYYY-MM'),
|
|
|
|
|
messId: '0', // 消息id
|
|
|
|
|
messageDetail: false, // 消息弹窗
|
|
|
|
|
mainDetail: false, // 澄清弹窗
|
|
|
|
|
detailId: '1', // 公告id
|
|
|
|
|
noticeDetail: false, // 公告弹窗
|
|
|
|
|
joinDetail: false, // 我要参与弹窗
|
|
|
|
|
joinData: '', // 我要参与数据
|
|
|
|
|
invitationDetail: false,
|
|
|
|
|
invitationData: '',
|
|
|
|
|
questData: {},//问卷数据
|
|
|
|
|
questVisible: false, //问卷弹窗
|
|
|
|
|
datestring: moment().format('YYYY-MM'),//我参与的项目日期
|
|
|
|
|
}
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
const paramst = {
|
|
|
|
|
chooseMonth: moment().format('YYYY-MM'),
|
|
|
|
|
}
|
|
|
|
|
this.props.dispatch({
|
|
|
|
|
type: "dashboard/fetchSupplierUpList",
|
|
|
|
|
payload: { ...paramst }
|
|
|
|
|
})
|
|
|
|
|
this.props.dispatch({
|
|
|
|
|
type: "dashboard/fetchSupplierDownLeftList"
|
|
|
|
|
})
|
|
|
|
|
const params = {
|
|
|
|
|
basePageRequest: {
|
|
|
|
|
pageNo: 1,
|
|
|
|
|
pageSize: 4
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.props.dispatch({
|
|
|
|
|
type: "dashboard/fetchSupplierDownRightList",
|
|
|
|
|
payload: { ...params }
|
|
|
|
|
})
|
|
|
|
|
this.props.dispatch({
|
|
|
|
|
type: "dashboard/fetchtlist",
|
|
|
|
|
payload: { limit: 7 }
|
|
|
|
|
})
|
|
|
|
|
this.props.dispatch({
|
|
|
|
|
type: "dashboard/fetchtlistre",
|
|
|
|
|
payload: { pageNo: 1, pageSize: 7 }
|
|
|
|
|
})
|
|
|
|
|
this.props.dispatch({
|
|
|
|
|
type: "dashboard/fetchtClarify",
|
|
|
|
|
payload: { authorizestate: '0', templatetype: '2', size: 6 }
|
|
|
|
|
})
|
|
|
|
|
NTKF_PARAM = {
|
|
|
|
|
siteid: "bl_1000", //企业ID,,为固定值
|
|
|
|
|
settingid: "bl_1000_1492484340268", //接待组ID,为固定值,必填
|
|
|
|
|
uid: getSessionUserData()?.userId,
|
|
|
|
|
uname: getSessionUserData()?.deptName + "-" + getSessionUserData()?.fullName, //用户名,未登录可以为空,但是不能给null,uname赋予的值显示到小能客户端
|
|
|
|
|
isvip: "0", //是否为vip用户,0代表非会员,1代表会员,取值显示到小能客户端
|
|
|
|
|
userlevel: "1", //网站自定义会员级别,1-N,可根据选择判断,取值显示到小能客户端
|
|
|
|
|
erpparam: "abc" //erpparam为erp功能的扩展字段,可选,购买erp功能后用于erp功能集成
|
|
|
|
|
}
|
|
|
|
|
this.clarifyDetail()
|
|
|
|
|
}
|
|
|
|
|
onChange = (date, dateString) => {
|
|
|
|
|
this.setState({
|
|
|
|
|
datevalue: moment(dateString, 'YYYY-MM'),
|
|
|
|
|
datestring: dateString
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
onSearch = () => {
|
|
|
|
|
const { datestring } = this.state;
|
|
|
|
|
this.props.dispatch({
|
|
|
|
|
type: "dashboard/save",
|
|
|
|
|
payload: { staloading: true }
|
|
|
|
|
})
|
|
|
|
|
const params = {
|
|
|
|
|
chooseMonth: datestring
|
|
|
|
|
}
|
|
|
|
|
this.props.dispatch({
|
|
|
|
|
type: "dashboard/fetchSupplierUpList",
|
|
|
|
|
payload: { ...params }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
lookDetail = (id) => { // 消息查看详情
|
|
|
|
|
this.setState({
|
|
|
|
|
messId: id,
|
|
|
|
|
messageDetail: true
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
clarifyDetail = () => { // 澄清查看详情
|
|
|
|
|
this.setState({
|
|
|
|
|
mainDetail: true
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
closeModel = () => { // 关闭消息弹窗
|
|
|
|
|
this.setState({
|
|
|
|
|
messageDetail: false,
|
|
|
|
|
mainDetail: false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
lookInfo = (id) => { // 公告查看
|
|
|
|
|
this.setState({
|
|
|
|
|
detailId: id,
|
|
|
|
|
noticeDetail: true
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
noticeModel = () => { // 公告关闭消息弹窗
|
|
|
|
|
this.setState({
|
|
|
|
|
noticeDetail: false,
|
|
|
|
|
joinDetail: false,
|
|
|
|
|
invitationDetail: false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
toParticipate = async (servicecode) => {//问卷调查弹窗
|
|
|
|
|
const { questId } = JSON.parse(servicecode);
|
|
|
|
|
await getQuestList({ id: questId }).then(res => {
|
|
|
|
|
if (res?.code == 200 && res?.success) {
|
|
|
|
|
this.setState({
|
|
|
|
|
questData: res?.data,
|
|
|
|
|
questVisible: true,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
closeParticipate = () => { // 关闭问卷调查弹窗
|
|
|
|
|
this.setState({
|
|
|
|
|
questVisible: false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
saveProject = async (val) => { // 点击项目跟进存储项目信息
|
|
|
|
|
// let defId = '';//项目流程id
|
|
|
|
|
// await getDefId(val.id).then((res) => {
|
|
|
|
|
// if (res.code == 200) {
|
|
|
|
|
// defId = res.data;
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// let proTypeCode = '';
|
|
|
|
|
// getURLInformation('proTypeCode') != null ? proTypeCode = getURLInformation('proTypeCode') : null;
|
|
|
|
|
// sessionStorage.setItem('proTypeCode', proTypeCode);
|
|
|
|
|
// sessionStorage.setItem('defId', JSON.stringify(defId));
|
|
|
|
|
// sessionStorage.setItem('projectData', JSON.stringify(val));
|
|
|
|
|
await followUpAProjectSupplier(val)
|
|
|
|
|
history.push('/ProjectLayout/Supplier/HomePageSectionList')
|
|
|
|
|
}
|
|
|
|
|
participation = (data) => { // 我要参与
|
|
|
|
|
this.setState({
|
|
|
|
|
joinData: data,
|
|
|
|
|
joinDetail: true
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
noticeInfo = (data) => { // 查看邀请函
|
|
|
|
|
this.setState({
|
|
|
|
|
invitationData: data,
|
|
|
|
|
invitationDetail: true
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
const { supplieruplist, supplierleftlist, supplierrightlist, staloading, tlist, trelist, idList, dateNum } = this.props;
|
2022-07-08 18:29:39 +08:00
|
|
|
|
const { datevalue, messId, messageDetail, mainDetail, detailId, noticeDetail, joinData, joinDetail, invitationData, invitationDetail, questData, questVisible,} = this.state;
|
2022-03-10 14:24:13 +08:00
|
|
|
|
return (
|
|
|
|
|
<>
|
2022-07-08 18:32:59 +08:00
|
|
|
|
{/* <a className="talk" onClick={() => this.initChatUI()}>咨询服务︵<span>8:30</span><span>|</span><span>12:30</span><span>13:00</span><span>|</span><span>17:00</span>︶<img src={talkPng} /></a> */}
|
2022-03-10 14:24:13 +08:00
|
|
|
|
<div className="dashboard" style={{ height: innerHeight - 70, overflow: "hidden" }}>
|
|
|
|
|
<Row className="topt">
|
|
|
|
|
<Col span={8}><Card title="我的消息" bordered={false} className="cardtre" style={{ marginRight: "10px" }} extra={<div className="moret" onClick={() => history.push('/SystemMessage/message')}>更多<RightOutlined /></div>}>
|
|
|
|
|
{trelist != [] && trelist.slice(0,6).map((item, index) => {
|
|
|
|
|
return (
|
|
|
|
|
<div className="messagetre" onClick={() => { item.templatetype == '3' ? this.toParticipate(item.servicecode) : this.lookDetail(item.msgId) }} key={item.id}>
|
|
|
|
|
<div className="round">{index + 1}</div>
|
|
|
|
|
<div className="txt" title={item.title}>{item.title}</div>
|
|
|
|
|
<div className="time">{item.createtime}</div>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
})}
|
|
|
|
|
</Card>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col span={8}><Card title="我参与的项目" bordered={false} className="cardtresupplier" style={{ marginRight: "10px" }} loading={staloading} extra={<div style={{ marginTop: "-14px" }}>
|
|
|
|
|
<DatePicker showNow={false} picker="month" style={{ marginRight: "10px" }} value={datevalue} onChange={this.onChange} allowClear={false} /><Button type="primary" onClick={() => { this.onSearch() }}>确定</Button></div>}>
|
|
|
|
|
{supplieruplist && supplieruplist.map((item) => {
|
|
|
|
|
let routerPath = ''
|
|
|
|
|
if (item.title == '公开招标') {
|
|
|
|
|
routerPath = '/Bid/Involved'
|
|
|
|
|
} else if (item.title == '公开比选') {
|
|
|
|
|
routerPath = '/Comparison/Involved'
|
|
|
|
|
} else if (item.title == '谈判') {
|
|
|
|
|
routerPath = '/Negotiation/Involved'
|
|
|
|
|
} else if (item.title == '招募') {
|
|
|
|
|
routerPath = '/Recruit/Involved'
|
|
|
|
|
} else if (item.title == '询价') {
|
|
|
|
|
routerPath = '/Inquiry/Involved'
|
|
|
|
|
} else if (item.title == '竞拍') {
|
|
|
|
|
routerPath = '/Auction/AuctionMyLookingForInnerShot'
|
|
|
|
|
}
|
|
|
|
|
return (
|
|
|
|
|
<div className="boxrezt" key={item.id} style={{ height: "130px" }}>
|
|
|
|
|
<div className="boxtitle" title={item.title}>
|
|
|
|
|
{item.title}
|
|
|
|
|
<div className="yue">月</div></div>
|
|
|
|
|
<div className="boxcount" onClick={() => history.push(routerPath)}><Statistic value={item.count} /></div>
|
|
|
|
|
<div className="boxdescription" title={item.description}>{item.description}</div>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
}</Card>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col span={8}><Card title="系统公告" bordered={false} className="cardtre" extra={<div className="moret" onClick={() => history.push('/notice/noticeList')}>更多<RightOutlined /></div>}>
|
|
|
|
|
{tlist != [] && tlist.map((item, index) => {
|
|
|
|
|
return (
|
|
|
|
|
<div className="messagetre" onClick={() => { this.lookInfo(item.id) }} key={item.id}>
|
|
|
|
|
<div className="round">{index + 1}</div>
|
|
|
|
|
<div className="txt" title={item.noticeTitle}>{item.noticeTitle}</div>
|
|
|
|
|
<div className="time">{item.updateDate}</div>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
})}</Card></Col>
|
|
|
|
|
</Row>
|
|
|
|
|
<Row className="downt" type="flex" justify="space-around">
|
|
|
|
|
<Col span={17}><Card title="邀请我参与的项目" className="cardtre">
|
|
|
|
|
<List
|
|
|
|
|
size="large"
|
|
|
|
|
bordered={false}
|
|
|
|
|
dataSource={supplierleftlist != [] && supplierleftlist}
|
|
|
|
|
renderItem={item => <List.Item key={item.id} style={{ height: "25%" }}>
|
|
|
|
|
<div className="downtitle" style={{ marginLeft: "0px", width: "69%" }} title={item.projectName}>{item.projectName}
|
|
|
|
|
<div className="downtime">建档时间:{item.createDate}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="downb">
|
|
|
|
|
<Button onClick={() => { this.participation(item) }} style={{ float: "right", marginLeft: "20px" }} type="primary">我要参与</Button>
|
|
|
|
|
<Button onClick={() => { this.noticeInfo(item) }} style={{ float: "right" }} type="primary">查看邀请函</Button>
|
|
|
|
|
</div>
|
|
|
|
|
</List.Item>}
|
|
|
|
|
/></Card></Col>
|
|
|
|
|
<Col span={7}><Card title="进行中的项目" className="cardtre">
|
|
|
|
|
<List
|
|
|
|
|
size="large"
|
|
|
|
|
bordered={false}
|
|
|
|
|
dataSource={supplierrightlist != [] && supplierrightlist}
|
|
|
|
|
renderItem={item => <List.Item className="pointer" key={item.id} onClick={() => {
|
|
|
|
|
this.saveProject({
|
|
|
|
|
"id": item.id,
|
|
|
|
|
"bidMethodDict": item.bidMethodDict,
|
|
|
|
|
"biddingSignDict": item.biddingSignDict,
|
|
|
|
|
"isClientFile": item.isClientFile,
|
|
|
|
|
"isIPassDecode": item.isIPassDecode,
|
|
|
|
|
"isIPassFile": item.isIPassFile,
|
|
|
|
|
"projectName": item.projectName,
|
|
|
|
|
"openTenderForm": item.openTenderForm
|
|
|
|
|
})
|
|
|
|
|
}} style={{ height: "25%" }}>
|
|
|
|
|
{
|
|
|
|
|
item.bidMethodDict == 'procurement_mode_1' ? <div className="downround">招</div> :
|
|
|
|
|
item.bidMethodDict == 'procurement_mode_2' ? <div className="downround">邀</div> :
|
|
|
|
|
item.bidMethodDict == 'procurement_mode_3' ? <div className="downround">比</div> :
|
|
|
|
|
item.bidMethodDict == 'procurement_mode_4' ? <div className="downround">募</div> :
|
|
|
|
|
item.bidMethodDict == 'procurement_mode_5' ? <div className="downround">竞</div> :
|
|
|
|
|
item.bidMethodDict == 'procurement_mode_6' ? <div className="downround">单</div> :
|
|
|
|
|
item.bidMethodDict == 'procurement_mode_7' ? <div className="downround">询</div> :
|
|
|
|
|
item.bidMethodDict == 'procurement_mode_9' ? <div className="downround">单</div> : null
|
|
|
|
|
}
|
|
|
|
|
<div className="downtitle" title={item.projectName}>{item.projectName}
|
|
|
|
|
<div className="downtime">建档时间:{item.createDate}</div></div></List.Item>}
|
|
|
|
|
/></Card></Col>
|
|
|
|
|
</Row>
|
|
|
|
|
</div>
|
|
|
|
|
{
|
|
|
|
|
idList.length > 0 ? <MainDetail clarifyId={idList[0]} dateNum={dateNum} trelist={idList} onCancel={() => { this.closeModel(), this.props.dispatch({ type: "dashboard/fetchtClarify", payload: { authorizestate: '0', templatetype: '2', size: 6 }}) }} modalVisible={mainDetail} /> : null
|
|
|
|
|
}
|
|
|
|
|
{messageDetail ? <MessageDetail messId={messId} onCancel={() => { this.closeModel(), this.props.dispatch({type: "dashboard/fetchtlistre", payload: { pageNo: 1, pageSize: 7 }})}} modalVisible={messageDetail} /> : null }
|
|
|
|
|
{questVisible ? <QuestDetail questData={questData} onCancel={() => { this.closeParticipate(), this.props.dispatch({type: "dashboard/fetchtlistre", payload: { pageNo: 1, pageSize: 7 }}) }} modalVisible={questVisible} /> : null}
|
|
|
|
|
{noticeDetail && <NoticeDetail detailId={detailId} onCancel={() => { this.noticeModel() }} modalVisible={noticeDetail} />}
|
|
|
|
|
{joinData == '' ? null : <IParticipateIn projectData={joinData} setVisible={() => { this.noticeModel() }} visible={joinDetail} />}
|
|
|
|
|
{invitationData == '' ? null : <InvitationLetter projectData={invitationData} setVisible={() => { this.noticeModel() }} visible={invitationDetail} />}
|
|
|
|
|
</>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
export default supplier;
|