Commit 628cba35 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

Merge branch 'dev-srm' of http://10.0.0.22:3000/lingxi/lingxi-business-paltform into dev-srm

parents 17cdecc2 0176c3dc
......@@ -49,8 +49,8 @@ const NestTable: React.FC<NestTableProps> = (props) => {
expanded ? (
<CaretDownOutlined onClick={e => onExpand(record, e)} />
) : (
<CaretRightOutlined onClick={e => onExpand(record, e)} />
)
<CaretRightOutlined onClick={e => onExpand(record, e)} />
)
}}
pagination={pagination}
{...resetProps}
......@@ -60,4 +60,4 @@ const NestTable: React.FC<NestTableProps> = (props) => {
NestTable.defaultProps = {}
export default NestTable
\ No newline at end of file
export default NestTable
......@@ -54,9 +54,8 @@ const PaymentCard: React.FC<Iprops> = ({
<div className={style.proportion}>{item.payRatio}%</div>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
<div className={style.Price}>¥{item.payAmount}</div>
{/* IsShow && <div onClick={() => like(1, item)} style={{ cursor: 'pointer', fontSize: 12, backgroundColor: '#00B37A', color: '#fff', padding: '4px 8px' }}>请款</div> */}
{
children
children ? children : IsShow && <div onClick={() => like(1, item)} style={{ cursor: 'pointer', fontSize: 12, backgroundColor: '#00B37A', color: '#fff', padding: '4px 8px' }}>请款</div>
}
</div>
<div className={style.warp_List}>
......
......@@ -25,19 +25,23 @@ const PopModal: React.FC<Iprops> = ({
}) => {
const [form] = Form.useForm();
/* 选中 */
const [paymentId, setpaymentId] = useState<any>()
/* 确定 */
const onFinish = (values: any) => {
sessionStorage.setItem('basics', JSON.stringify(basics))
sessionStorage.setItem('list', JSON.stringify(selectRowList))
history.push('/memberCenter/contract/funds/addbill/Add?applyId=' + contractId + '&sourceType=' + 2)
let payid = paymentId ? paymentId : payType[0].id;
history.push('/memberCenter/contract/funds/addbill/Add?applyId=' + contractId + '&sourceType=' + 2 + '&paymentId=' + payid)
}
const onFinishFailed = (errorInfo: any) => {
console.log('Failed:', errorInfo);
};
return (
<Modal
footer={null}
title="提交审核"
title="提交请款单"
visible={ModalVisible}
onOk={() => setDrawerPopModal()}
onCancel={() => setDrawerPopModal()} >
......@@ -55,6 +59,9 @@ const PopModal: React.FC<Iprops> = ({
style={{
width: '290px'
}}
onChange={(value) => {
setpaymentId(value)
}}
>
{
payType.map(item => (
......
......@@ -159,9 +159,6 @@
color: #00B37A;
cursor: pointer;
}
.wrapper :global .ant-input-search .ant-input-group .ant-input {
padding: 0px !important;
}
.wrapper :global .ant-input-search .ant-input-group-addon .ant-input-search-button {
background-color: #F7F8FA;
}
......@@ -188,7 +188,7 @@
.ant-input-search {
.ant-input-group {
.ant-input {
padding: 0px !important;
// padding: 0px !important;
}
}
.ant-input-group-addon {
......
......@@ -361,9 +361,16 @@ const Details = (props: any) => {
current: current,
pageSize: pageSize,
}
setSize(pageSize)
console.log(current, pageSize, size)
getContracInfoList(data)
};
const like = (sourceType, item) => {
console.log(sourceType, item);
// sessionStorage.setItem('basics', JSON.stringify(basics));
// history.push('/memberCenter/contract/funds/addbill/Add?applyId=' + contractId + '&sourceType=' + sourceType + '&paymentId=' + item.id)
}
return (
<div className={style.anchorWrap}>
<Anchor
......@@ -411,7 +418,9 @@ const Details = (props: any) => {
{/* 基本信息 */}
<BasicInfo basicInfo={basicInfo} />
{/* 付款计划 */}
<PaymentCard payPlanList={payPlanList} basics={basicInfo} contractId={contractId} />
<PaymentCard
IsShow={true}
payPlanList={payPlanList} basics={basics} contractId={contractId} />
{/* 执行情况 */}
<div id='docking' className='ant-card ant-card-bordered'>
<div className='ant-card-head'>
......
......@@ -19,7 +19,7 @@ export interface Iprops extends IAntdSchemaFormProps {
const { Text } = Typography;
const situationList: React.FC<Iprops> = ({ contractId }) => {
const [page, setPage] = useState(1);
const [size, setSize] = useState(8);
const [size, setSize] = useState(10);
const [total, setTotal] = useState(0);
const [listLoading, setListLoading] = useState(false);
/* 单据总金额 */
......@@ -226,9 +226,10 @@ const situationList: React.FC<Iprops> = ({ contractId }) => {
columns={columns}
dataSource={data}
loading={listLoading}
pagination={
{
defaultPageSize: 20,
pageSize: size,
total,
onChange: handlePaginationChange
......
......@@ -29,14 +29,13 @@ const Add: React.FC<{}> = (props: any) => {
setid(data.selectRow.id)
console.log(data)
}
useEffect(() => {
// contract
PublicApi.getContractApplyAmountGetDetail({ applyId: paymentId }).then((res) => {
console.log(res)
}).catch((err) => {
// useEffect(() => {
// PublicApi.getContractApplyAmountGetDetail({ applyId: paymentId }).then((res) => {
// console.log(res)
// }).catch((err) => {
});
}, [])
// });
// }, [])
const TabList = [
{
name: '基本信息', components:
......
......@@ -129,19 +129,19 @@ const AddInfo = (props: any) => {
const info = Info;
if (res.code == 1000) {
if (res.data.payPlanList.length != 0) {
res.data.payPlanList.map((item, index) => {
console.log(index)
if (item.id == paymentId) {
const expectPayTime = new Date(item.expectPayTime).getTime();
basicsData.payPlanId = item.id;
basicsData.payRatio = item.payRatio;
for (let i = 0; i < res.data.payPlanList.length; i++) {
if (res.data.payPlanList[i].id == paymentId) {
console.log(1232131);
const expectPayTime = new Date(res.data.payPlanList[i].expectPayTime).getTime();
basicsData.payPlanId = res.data.payPlanList[i].id;
basicsData.payRatio = res.data.payPlanList[i].payRatio;
basicsData.expectPayTime = moment(expectPayTime);
basicsData.payWay = item.payWay;
basicsData.payParam = item.payParam;
basicsData.applyAmount = item.payAmount;
setapplyAmount(item.payAmount)
setIndex(index + 1)
return;
basicsData.payWay = res.data.payPlanList[i].payWay;
basicsData.payParam = res.data.payPlanList[i].payParam;
basicsData.applyAmount = res.data.payPlanList[i].payAmount;
setapplyAmount(res.data.payPlanList[i].payAmount)
setIndex(i + 1)
break;
} else {
const expectPayTime = new Date(res.data.payPlanList[0].expectPayTime).getTime();
basicsData.payPlanId = res.data.payPlanList[0].id;
......@@ -152,7 +152,7 @@ const AddInfo = (props: any) => {
basicsData.applyAmount = res.data.payPlanList[0].payAmount;
setapplyAmount(res.data.payPlanList[0].payAmount)
}
})
}
}
basicsData.contractNo = selectRow.contractNo;
......@@ -183,6 +183,7 @@ const AddInfo = (props: any) => {
const auth = JSON.parse(localStorage.getItem('auth'));
setaccount(auth.account);
setBasics(basicsData)
console.log(basicsData, 'basicsData')
attrValueForm.setFieldsValue(basicsData);
}
})
......
......@@ -33,9 +33,7 @@ const BillDetails = (props: any) => {
const [reason, setDatareason] = useState('');
const [status, setstatus] = useState<any>()
const [ExamineFlag, setExamineFlag] = useState<boolean>(false);
useEffect(() => {
setTargetOffset(window.innerHeight / 6);
}, []);
const handleAnchorClick = (e) => {
e.preventDefault()
}
......@@ -54,6 +52,7 @@ const BillDetails = (props: any) => {
})
/* 获取详情的数据 */
const getDetail = () => {
console.log(applyId, 'applyId')
PublicApi.getContractApplyAmountGetDetail({ applyId }).then(res => {
if (res.code === 1000) {
let { basics, taskStepList } = res.data
......@@ -134,7 +133,7 @@ const BillDetails = (props: any) => {
setIsModalVisible(!isModalVisible);
};
useEffect(() => {
setTargetOffset(window.innerHeight / 6);
setTargetOffset(window.innerHeight / 4);
getDetail()
}, []);
......
......@@ -12,13 +12,14 @@ import moment from 'moment';
const FormList = (props: any) => {
console.log(props)
const { fromData, currentRef, fetchdata } = props;
const [keys, setkeys] = useState<any>(); // 记录上次删除的
const [options, setoptions] = useState<any>([
{
value: 1,
disabled: true
}
])
const [id, setId] = useState<any>(''); // 记录上次的id
const [PlanList, setPlanList] = useState<any>([
{
payNum: '1',
......@@ -30,6 +31,7 @@ const FormList = (props: any) => {
payParam: '',
id: 0,
rowId: 1,
disabled: true
},
]);
......@@ -130,36 +132,43 @@ const FormList = (props: any) => {
/* 添加 */
const addtable = () => {
const data = [...PlanList];
data.push(
{
payNum: '',
payStage: '',
expectPayTime: '',
payRatio: '',
payAmount: '',
payWay: '1',
payParam: '',
id: 0,
rowId: data.length + 1,
},
)
let optionsData = [];
data.map((item, index) => {
console.log(item.payNum, index + 1)
optionsData.push({
value: index + 1,
if (keys) {
data.push(keys);
setkeys('');
} else {
data.push(
{
payNum: data.length + 1,
payStage: '',
expectPayTime: '',
payRatio: '',
payAmount: '',
payWay: '1',
payParam: '',
id: 0,
rowId: data.length + 1,
disabled: false,
},
)
}
let optionsData = data.map((item, index) => {
return {
value: item.payNum ? item.payNum : index + 1,
disabled: item.payNum ? true : false,
})
rowId: item.rowId,
}
})
console.log(optionsData, 'optionsDataadd', options)
console.log('optionsDataadd', data, optionsData, 'optionsList')
setPlanList(data)
setoptions(optionsData)
};
/* 删除 */
const Delete = (elm, idx) => {
const dataSource = [...PlanList];
let List = dataSource.filter((item, index) => index !== idx);
setPlanList(List)
let optionsData = options.map((keys => {
if (elm.payNum == keys.value) {
keys.disabled = false;
......@@ -168,7 +177,8 @@ const FormList = (props: any) => {
...keys
}
}))
console.log(optionsData, 'del')
setkeys(elm);
setPlanList(List)
setoptions(optionsData)
};
......@@ -181,7 +191,7 @@ const FormList = (props: any) => {
break;
case 'payNum':
item[idx].payNum = e;
setId(e);
break;
case 'expectPayTime':
item[idx].expectPayTime = moment(e).format('YYYY-MM-DD HH:mm:ss');
......@@ -199,30 +209,7 @@ const FormList = (props: any) => {
item[idx].payParam = e;
break;
}
let optionsData = [];
if (id) {
optionsData = options.map((keys => {
if (id == keys.value) {
keys.disabled = false;
}
if (keys.value == e) {
keys.disabled = true;
}
return {
...keys
}
}))
} else {
optionsData = options.map((keys => {
if (keys.value == e) {
keys.disabled = true;
}
return {
...keys
}
}))
}
setoptions(optionsData)
setPlanList(item)
}
useEffect(() => {
......
......@@ -11,6 +11,7 @@ const FormList = (props: any) => {
const { currentRef, purchaseMaterielList } = props;
const [dataList, setData] = useState([])
const columnsTab: any = [
{
title: '物料编号/名称', dataIndex: 'materielName', align: 'center',
......
......@@ -10,7 +10,16 @@ const { Option } = Select;
import moment from 'moment';
const FormList = (props: any) => {
const { currentRef, payPlanList } = props;
const [payNumArr, setpayNumArr] = useState<any>([1,])
// const [payNumArr, setpayNumArr] = useState<any>([1,])
const [keys, setkeys] = useState<any>(); // 记录上次删除的
const [options, setoptions] = useState<any>([
{
value: 1,
disabled: true
}
])
const [PlanList, setPlanList] = useState<any>([
]);
/* 显示模态框 */
......@@ -18,14 +27,6 @@ const FormList = (props: any) => {
{
title: '付款次数', dataIndex: 'payNum', align: 'center',
render: (_, item, index) => {
const options = [];
for (let i = 0; i < PlanList.length; i++) {
let Index = payNumArr.indexOf(i + 1);
options.push({
value: i + 1,
disabled: Index == -1 ? false : true
});
}
return (
<Select
style={{ width: 200 }}
......@@ -119,38 +120,61 @@ const FormList = (props: any) => {
/* 添加 */
const addtable = () => {
const data = [...PlanList];
data.push(
{
payNum: '',
payStage: '',
expectPayTime: '',
payRatio: '',
payAmount: '',
payWay: '1',
payParam: '1',
id: 0,
rowId: data.length + 1,
},
)
console.log(data)
if (keys) {
data.push(keys);
setkeys('');
} else {
data.push(
{
payNum: data.length + 1,
payStage: '',
expectPayTime: '',
payRatio: '',
payAmount: '',
payWay: '1',
payParam: '',
id: 0,
rowId: data.length + 1,
disabled: false,
},
)
}
let optionsData = data.map((item, index) => {
return {
value: item.payNum ? item.payNum : index + 1,
disabled: item.payNum ? true : false,
rowId: item.rowId,
}
})
console.log('optionsDataadd', data, optionsData, 'optionsList')
setPlanList(data)
setoptions(optionsData)
};
/* 删除 */
const Delete = (elm, idx) => {
const dataSource = [...PlanList];
const arr = [...payNumArr]
let List = dataSource.filter((item, index) => index !== idx);
let numberArr = arr.filter((item, index) => elm.payNum !== item);
console.log(numberArr);
setpayNumArr(numberArr)
let optionsData = options.map((keys => {
if (elm.payNum == keys.value) {
keys.disabled = false;
}
return {
...keys
}
}))
setkeys(elm);
setPlanList(List)
setoptions(optionsData)
};
/* 选中设置值 */
const onSelectChange = (e, name, idx) => {
console.log(e, name, idx)
let item = [...PlanList];
let NumArr = [...payNumArr]
console.log(item, '哈哈');
// return;
switch (name) {
......@@ -159,7 +183,7 @@ const FormList = (props: any) => {
break;
case 'payNum':
item[idx].payNum = e;
NumArr.push(e);
break;
case 'expectPayTime':
item[idx].expectPayTime = moment(e).format('YYYY-MM-DD HH:mm:ss');
......@@ -177,8 +201,7 @@ const FormList = (props: any) => {
item[idx].payParam = e;
break;
}
NumArr = Array.from(new Set(NumArr))
setpayNumArr(NumArr)
setPlanList(item)
}
useEffect(() => {
......
......@@ -21,311 +21,336 @@ import ThankModal from './components/thank';
import {
BID_EXTERNALSTATE_COLOR,
BID_INTERNALSTATE_COLOR
BID_EXTERNALSTATE_COLOR,
BID_INTERNALSTATE_COLOR
} from '../../constants/purchaseBid';
const transforType = {
1: '是',
0: '否'
1: '是',
0: '否'
}
const TABLINK = [
{ id: 'progressLayout', title: '流转进度' },
{ id: 'winBidMsgLayout', title: '中标通知' },
{ id: 'winBidResultLayout', title: '中标结果' },
{ id: 'basicLayout', title: '基本信息' },
{ id: 'materialLayout', title: '采购物料' },
{ id: 'bidRulesLayout', title: '竞价规则' },
{ id: 'signUpLayout', title: '报名要求' },
{ id: 'conditionLayout', title: '交易条件' },
{ id: 'fileLayout', title: '附件' },
{ id: 'quotationRecordLayout', title: '最低报价记录' },
{ id: 'recordLayout', title: '流转记录' },
{ id: 'progressLayout', title: '流转进度' },
{ id: 'winBidMsgLayout', title: '中标通知', except: ['readySignUp', 'readyBid'] },
{ id: 'winBidResultLayout', title: '中标结果', except: ['readySignUp', 'readyBid'] },
{ id: 'basicLayout', title: '基本信息' },
{ id: 'materialLayout', title: '采购物料' },
{ id: 'bidRulesLayout', title: '竞价规则' },
{ id: 'signUpLayout', title: '报名要求' },
{ id: 'conditionLayout', title: '交易条件' },
{ id: 'fileLayout', title: '附件' },
{ id: 'quotationRecordLayout', title: '最低报价记录' },
{ id: 'recordLayout', title: '流转记录' },
]
const SearchDetail = () => {
const {
query: {
id,
number
},
} = history.location;
// 竞价过程
const [progressVisible, setProgressVisible] = useState<boolean>(false);
const [progressData, setProgressData] = useState<any>([]);
// 详情数据
const [dataSource, setDataSource] = useState<any>({});
// 流转数据数据
const [progressEffect, setProgressEffect] = useState<ProgressValue[]>([]);
// 基本信息数据
const [basicEffect, setBasicEffect] = useState<any>([]);
// 竞价结果数据
const [resultEffect, setResultEffect] = useState<any>([]);
// 竞价规则数据
const [rulesEffect, setRulesEffect] = useState<any>([]);
// 报名要求
const [signUpEffect, setSignUpEffect] = useState<any>([]);
// 交易条件
const [conditionEffect, setConditionEffect] = useState<any>([]);
// 感谢函
const [thankVisAble, seTthankVisAble] = useState<boolean>(false);
const {
query: {
id,
number
},
pathname
} = history.location;
const [pathPci] = useState(pathname.split('/')[pathname.split('/').length - 2]);
// 竞价过程
const [progressVisible, setProgressVisible] = useState<boolean>(false);
const [progressData, setProgressData] = useState<any>([]);
// 详情数据
const [dataSource, setDataSource] = useState<any>({});
// 流转数据数据
const [progressEffect, setProgressEffect] = useState<ProgressValue[]>([]);
// 基本信息数据
const [basicEffect, setBasicEffect] = useState<any>([]);
// 竞价结果数据
const [resultEffect, setResultEffect] = useState<any>([]);
// 竞价规则数据
const [rulesEffect, setRulesEffect] = useState<any>([]);
// 报名要求
const [signUpEffect, setSignUpEffect] = useState<any>([]);
// 交易条件
const [conditionEffect, setConditionEffect] = useState<any>([]);
// 感谢函
const [thankVisAble, seTthankVisAble] = useState<boolean>(false);
const handleProgressEffect = (data: any) => {
let _list = [
{ title: '外部流转', state: 1, logs: data.externalLogStates },
// { title: '内部流转', state: 2, logs: data.interiorLogStates }
];
setProgressEffect(_list);
}
const _tabs = useMemo(() => {
let _list = [];
TABLINK.forEach((item) => {
if (!item.except || !item.except.includes(pathPci)) {
_list.push(item);
}
})
return _list;
}, [pathPci])
const handleBasicEffect = (data: any) => {
setBasicEffect([
{
col: [
{ label: '竞价单号', extra: data.biddingNo, type: 'text' },
{ label: '竞价单摘要', extra: data.details, type: 'text' },
{ label: '外部状态', extra: <StatusTag type={BID_EXTERNALSTATE_COLOR(data.externalState)} title={data.externalStateName} />, type: 'text' },
{ label: '内部状态', extra: <Badge status={BID_INTERNALSTATE_COLOR(data.interiorState)} text={data.interiorStateName} />, type: 'text' },
]
},
{
col: [
{ label: '会员名称', extra: data.createMemberName, type: 'text' },
{
label: '适用地市', extra: data.areas || [], type: 'area', tips: '设置了归属地市后,此商品可根据地市进行筛选,未设置时默认为所有地市'
},
]
},
{
col: [
{ label: '单据时间', extra: formatTimeString(data.createTime), type: 'text' },
]
},
])
}
const handleResultEffect = (data: any) => {
setResultEffect([
{
col: [
{ label: '中标金额(含税)', extra: data?.sumAwardPrice ? ${priceFormat(data?.sumAwardPrice)}` : '-', type: 'text' },
{ label: '中标理由', extra: '价格最低', type: 'text' },
]
},
{
col: [
{ label: '中标公示', extra: data.awardResults, type: 'text' },
]
}
])
}
const handleProgressEffect = (data: any) => {
let _list = [
{ title: '外部流转', state: 1, logs: data.externalLogStates },
// { title: '内部流转', state: 2, logs: data.interiorLogStates }
];
setProgressEffect(_list);
}
const handleRulesEffect = (data: any) => {
setRulesEffect([
{
col: [
{ label: '竞价时间', extra: `${formatTimeString(data.biddingStartTime)} ${formatTimeString(data.biddingEndTime)}`, type: 'text' },
{ label: '起拍价', extra: data.startingPrice ? `¥ ${priceFormat(data.startingPrice)}` : '-', type: 'text', tips: '初始起拍价,首次报价要低于或等于起拍价' },
{ label: '目标价', extra: data.targetPrice ? `¥ ${priceFormat(data.targetPrice)}` : '-', type: 'text', tips: '期望成交价格' },
]
},
{
col: [
{ label: '最小价差', extra: data.minPrice ? `¥ ${priceFormat(data.minPrice)}` : '-', type: 'text', tips: '每次报价降价幅度须大于或等于最小价差' },
{ label: '允许报价次数', extra: data.allowPurchaseCount, type: 'text', tips: '允许每个供应商最多可以报价的次数' },
]
},
{
col: [
{ label: '公开当前最低报价', extra: transforType[data.isOpenPurchase], type: 'text', tips: '选择公开当前最低报价,竞价过程中将供应商所报当前最低价在竞价页面即时公开。', isMix: ['公开当前最低', '报价'] },
{ label: '公开报价排名', extra: transforType[data.isOpenRanking], type: 'text', tips: '选择公开报价排名,竞价过程中将供应商当前报价排名在竞价页面即时公开。' },
]
},
])
}
const handleBasicEffect = (data: any) => {
setBasicEffect([
{
col: [
{ label: '竞价单号', extra: data.biddingNo, type: 'text' },
{ label: '竞价单摘要', extra: data.details, type: 'text' },
{ label: '外部状态', extra: <StatusTag type={BID_EXTERNALSTATE_COLOR(data.externalState)} title={data.externalStateName} />, type: 'text' },
{ label: '内部状态', extra: <Badge status={BID_INTERNALSTATE_COLOR(data.interiorState)} text={data.interiorStateName} />, type: 'text' },
]
},
{
col: [
{ label: '会员名称', extra: data.createMemberName, type: 'text' },
{
label: '适用地市', extra: data.areas || [], type: 'area', tips: '设置了归属地市后,此商品可根据地市进行筛选,未设置时默认为所有地市'
},
]
},
{
col: [
{ label: '单据时间', extra: formatTimeString(data.createTime), type: 'text' },
]
},
])
}
const handleSignUpEffect = (data: any) => {
setSignUpEffect([
{
col: [
{ label: '报名要求时间', extra: `${formatTimeString(data.startSignUp)} ${formatTimeString(data.endSignUp)}`, type: 'text' },
{ label: '报名要求', extra: data.demand, type: 'text' },
]
},
{
col: [
{ label: '报名要求附件', extra: data.demandUrls, type: 'files' },
]
},
])
}
const handleResultEffect = (data: any) => {
setResultEffect([
{
col: [
{ label: '中标金额(含税)', extra: data?.sumAwardPrice ? ${priceFormat(data?.sumAwardPrice)}` : '-', type: 'text' },
{ label: '中标理由', extra: '价格最低', type: 'text' },
]
},
{
col: [
{ label: '中标公示', extra: data.awardResults, type: 'text' },
]
}
])
}
const handleConditionEffect = (data: any) => {
setConditionEffect([
{
col: [
{ label: '交付日期', extra: formatTimeString(data.deliver), type: 'text' },
{ label: '交付地址', extra: data.address, type: 'text' },
{ label: '报价要求', extra: data.offer, type: 'text' },
]
},
{
col: [
{ label: '付款方式', extra: data.paymentType, type: 'text' },
{ label: '税费要求', extra: data.taxes, type: 'text' },
{ label: '物流要求', extra: data.logistics, type: 'text' },
]
},
{
col: [
{ label: '包装要求', extra: data.packRequire, type: 'text' },
{ label: '其他要求', extra: data.otherRequire, type: 'text' },
]
},
])
}
const handleRulesEffect = (data: any) => {
setRulesEffect([
{
col: [
{ label: '竞价时间', extra: `${formatTimeString(data.biddingStartTime)} ${formatTimeString(data.biddingEndTime)}`, type: 'text' },
{ label: '起拍价', extra: data.startingPrice ? `¥ ${priceFormat(data.startingPrice)}` : '-', type: 'text', tips: '初始起拍价,首次报价要低于或等于起拍价' },
{ label: '目标价', extra: data.targetPrice ? `¥ ${priceFormat(data.targetPrice)}` : '-', type: 'text', tips: '期望成交价格' },
]
},
{
col: [
{ label: '最小价差', extra: data.minPrice ? `¥ ${priceFormat(data.minPrice)}` : '-', type: 'text', tips: '每次报价降价幅度须大于或等于最小价差' },
{ label: '允许报价次数', extra: data.allowPurchaseCount, type: 'text', tips: '允许每个供应商最多可以报价的次数' },
]
},
{
col: [
{ label: '公开当前最低报价', extra: transforType[data.isOpenPurchase], type: 'text', tips: '选择公开当前最低报价,竞价过程中将供应商所报当前最低价在竞价页面即时公开。', isMix: ['公开当前最低', '报价'] },
{ label: '公开报价排名', extra: transforType[data.isOpenRanking], type: 'text', tips: '选择公开报价排名,竞价过程中将供应商当前报价排名在竞价页面即时公开。' },
]
},
])
}
const fetchDataSource = async () => {
const params = {
id,
number,
current: '1',
pageSize: '1'
}
PublicApi.getPurchaseOnlineBiddingDetails({ ...params }).then(res => {
if (res.code !== 1000) {
history.goBack();
return;
}
const { data } = res;
setDataSource(data);
handleProgressEffect(data);
handleBasicEffect(data);
handleRulesEffect(data);
handleSignUpEffect(data);
handleConditionEffect(data);
handleResultEffect(data);
if (data.externalState === 99 && data.isPrize != 1 && data.isPrize) {
seTthankVisAble(true)
}
})
PublicApi.getPurchaseOnlineBiddingProcess({ ...params }).then(res => {
if (res.code !== 1000) {
history.goBack();
return;
}
setProgressData(res.data);
})
}
const handleSignUpEffect = (data: any) => {
setSignUpEffect([
{
col: [
{ label: '报名要求时间', extra: `${formatTimeString(data.startSignUp)} ${formatTimeString(data.endSignUp)}`, type: 'text' },
{ label: '报名要求', extra: data.demand, type: 'text' },
]
},
{
col: [
{ label: '报名要求附件', extra: data.demandUrls, type: 'files' },
]
},
])
}
useEffect(() => {
fetchDataSource();
}, [])
const handleConditionEffect = (data: any) => {
setConditionEffect([
{
col: [
{ label: '交付日期', extra: formatTimeString(data.deliver), type: 'text' },
{ label: '交付地址', extra: data.address, type: 'text' },
{ label: '报价要求', extra: data.offer, type: 'text' },
]
},
{
col: [
{ label: '付款方式', extra: data.paymentType, type: 'text' },
{ label: '税费要求', extra: data.taxes, type: 'text' },
{ label: '物流要求', extra: data.logistics, type: 'text' },
]
},
{
col: [
{ label: '包装要求', extra: data.packRequire, type: 'text' },
{ label: '其他要求', extra: data.otherRequire, type: 'text' },
]
},
])
}
const _returnWinBidMsgLayout = useMemo(() => {
return (
<BidCommonLayout layoutId="winBidMsgLayout" title="中标通知" effect={resultEffect} />
)
}, [resultEffect])
const fetchDataSource = async () => {
const params = {
id,
number,
current: '1',
pageSize: '1'
}
PublicApi.getPurchaseOnlineBiddingDetails({ ...params }).then(res => {
if (res.code !== 1000) {
history.goBack();
return;
}
const { data } = res;
setDataSource(data);
handleProgressEffect(data);
handleBasicEffect(data);
handleRulesEffect(data);
handleSignUpEffect(data);
handleConditionEffect(data);
handleResultEffect(data);
if (data.externalState === 99 && data.isPrize != 1 && data.isPrize) {
seTthankVisAble(true)
}
})
PublicApi.getPurchaseOnlineBiddingProcess({ ...params }).then(res => {
if (res.code !== 1000) {
history.goBack();
return;
}
setProgressData(res.data);
})
}
useEffect(() => {
fetchDataSource();
}, [])
const _returnWinBidResultLayout = useMemo(() => {
const _returnWinBidMsgLayout = useMemo(() => {
switch (pathPci) {
case 'readySignUp':
case 'readyBid':
return null;
default:
return (
<TableCommonLayout
layoutId='winBidResultLayout'
layoutTitle='中标结果'
id={id}
number={number}
fetch={PublicApi.getPurchaseOnlineBiddingAwardResultsBidding}
/>
<BidCommonLayout layoutId="winBidMsgLayout" title="中标通知" effect={resultEffect} />
)
}, [id, number])
}
}, [pathPci, resultEffect])
const _returnMaterialLayout = useMemo(() => {
const _returnWinBidResultLayout = useMemo(() => {
switch (pathPci) {
case 'readySignUp':
case 'readyBid':
return null;
default:
return (
<MaterialLayout
id={id}
number={number}
fetch={PublicApi.getPurchaseOnlineBiddingMaterielPage}
layoutTitle='采购物料'
/>
<TableCommonLayout
layoutId='winBidResultLayout'
layoutTitle='中标结果'
id={id}
number={number}
fetch={PublicApi.getPurchaseOnlineBiddingAwardResultsBidding}
/>
)
}, [id, number])
}
}, [id, number, pathPci])
const _returnBidRulesLayout = useMemo(() => {
return (<BidCommonLayout layoutId="bidRulesLayout" title="竞价规则" effect={rulesEffect} />)
}, [rulesEffect])
const _returnMaterialLayout = useMemo(() => {
return (
<MaterialLayout
id={id}
number={number}
fetch={PublicApi.getPurchaseOnlineBiddingMaterielPage}
layoutTitle='采购物料'
/>
)
}, [id, number])
const _returnSignUpLayout = useMemo(() => {
return (<BidCommonLayout layoutId="signUpLayout" title="报名要求" effect={signUpEffect} />)
}, [signUpEffect])
const _returnBidRulesLayout = useMemo(() => {
return (<BidCommonLayout layoutId="bidRulesLayout" title="竞价规则" effect={rulesEffect} />)
}, [rulesEffect])
const _returnConditionLayout = useMemo(() => {
return (<BidCommonLayout layoutId="conditionLayout" title="交易条件" effect={conditionEffect} />)
}, [conditionEffect])
const _returnSignUpLayout = useMemo(() => {
return (<BidCommonLayout layoutId="signUpLayout" title="报名要求" effect={signUpEffect} />)
}, [signUpEffect])
const _returnFileLayout = useMemo(() => {
return (
<BidCommonLayout layoutId="fileLayout" title="附件" effect={
[
{
col: [
{ label: '附件', extra: dataSource.urls, type: 'files' }
]
}
]
} />
)
}, [dataSource])
const _returnLowestQuotationRecordLayout = useMemo(() => {
return (
<LowestQuotationRecordLayout
id={id}
number={number}
layoutId='quotationRecordLayout'
layoutTitle='最低报价记录'
fetch={PublicApi.getPurchaseOnlineBiddingMinimumBidding}
effect={dataSource}
extra={<Button type='link' onClick={() => { setProgressVisible(true) }}>查看竞价过程</Button>}
/>
)
}, [id, number, dataSource])
const _returnConditionLayout = useMemo(() => {
return (<BidCommonLayout layoutId="conditionLayout" title="交易条件" effect={conditionEffect} />)
}, [conditionEffect])
const _returnFileLayout = useMemo(() => {
return (
<BidCommonLayout layoutId="fileLayout" title="附件" effect={
[
{
col: [
{ label: '附件', extra: dataSource.urls, type: 'files' }
]
}
]
} />
)
}, [dataSource])
const _returnLowestQuotationRecordLayout = useMemo(() => {
return (
<Context.Provider value={dataSource}>
<PeripheralLayout
no={dataSource.biddingNo}
tabLink={TABLINK}
components={
<Fragment>
<ProgressLayout effect={progressEffect} />
{_returnWinBidMsgLayout}
{_returnWinBidResultLayout}
<BidCommonLayout layoutId="basicLayout" title="基本信息" effect={basicEffect} />
{_returnMaterialLayout}
{_returnBidRulesLayout}
{_returnSignUpLayout}
{_returnConditionLayout}
{_returnFileLayout}
{_returnLowestQuotationRecordLayout}
<RecordCommonLayout externalColors={BID_EXTERNALSTATE_COLOR} internalColors={BID_INTERNALSTATE_COLOR} />
</Fragment>
}
/>
<BidProgressDrawer
awardProcess={progressData}
visible={progressVisible}
onClose={() => { setProgressVisible(false) }}
/>
<ThankModal
visible={thankVisAble}
detail={dataSource}
onOk={() => { seTthankVisAble(false) }}
/>
</Context.Provider>
<LowestQuotationRecordLayout
id={id}
number={number}
layoutId='quotationRecordLayout'
layoutTitle='最低报价记录'
fetch={PublicApi.getPurchaseOnlineBiddingMinimumBidding}
effect={dataSource}
extra={<Button type='link' onClick={() => { setProgressVisible(true) }}>查看竞价过程</Button>}
/>
)
}, [id, number, dataSource])
return (
<Context.Provider value={dataSource}>
<PeripheralLayout
no={dataSource.biddingNo}
tabLink={_tabs}
components={
<Fragment>
<ProgressLayout effect={progressEffect} />
{_returnWinBidMsgLayout}
{_returnWinBidResultLayout}
<BidCommonLayout layoutId="basicLayout" title="基本信息" effect={basicEffect} />
{_returnMaterialLayout}
{_returnBidRulesLayout}
{_returnSignUpLayout}
{_returnConditionLayout}
{_returnFileLayout}
{_returnLowestQuotationRecordLayout}
<RecordCommonLayout externalColors={BID_EXTERNALSTATE_COLOR} internalColors={BID_INTERNALSTATE_COLOR} />
</Fragment>
}
/>
<BidProgressDrawer
awardProcess={progressData}
visible={progressVisible}
onClose={() => { setProgressVisible(false) }}
/>
<ThankModal
visible={thankVisAble}
detail={dataSource}
onOk={() => { seTthankVisAble(false) }}
/>
</Context.Provider>
)
}
export default SearchDetail;
......@@ -96,7 +96,8 @@ export const formSchema: ISchema = {
"x-component": 'daterange',
"x-component-props": {
showTime: true,
style: { width: "100%" }
style: { width: "100%" },
separator: ' 至 '
},
readOnly: true,
},
......@@ -273,7 +274,7 @@ export const formSchema: ISchema = {
},
properties: {
enclosureUrls: {
type: 'string',
type: 'string',
title: '报名文件',
'x-component': 'FixUpload',
'x-component-props': {
......@@ -283,7 +284,7 @@ export const formSchema: ISchema = {
prefix: 'procurment_onlineBid_',
},
beforeUpload: '{{beforeUpload}}',
onChange: '{{onUploadChange}}',
onChange: '{{onUploadChange}}',
headers: '{{ token }}',
accept: '.xls, .xlsx, .doc, .docx, .wps, .pdf, .jpg, .png, .jpeg',
},
......
......@@ -38,6 +38,13 @@ const SignUpForm = () => {
const getCountryCodeId = async () => {
const res = await PublicApi.getManageCountryAreaGetTelCode()
if (res.code === 1000) {
let _value = ''
for (let i = 0; i < res.data.length; i++) {
if (res.data[i] === '86') {
_value = res.data[i];
break
}
}
return { telPrefix: res.data }
}
return {}
......@@ -104,6 +111,7 @@ const SignUpForm = () => {
member: name,
startSignUp: formatTimeString(data.startSignUp),
endSignUp: formatTimeString(data.endSignUp),
telPrefix: '86'
});
})
}
......@@ -148,4 +156,4 @@ const SignUpForm = () => {
</PageHeaderWrapper>
)
}
export default SignUpForm
\ No newline at end of file
export default SignUpForm
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment