Commit 31580809 authored by 前端-许佳敏's avatar 前端-许佳敏

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

parents 3afb22e1 bb2ecf61
import React, { Component } from 'react';
class ModalContainer extends Component {
state = {
visible: false
}
handleCancel = () => {
this.setState({
visible: false
})
}
show = () => {
this.setState({
visible: true
})
}
render() {
const { visible } = this.state;
const { children } = this.props;
return (
children({
visible: visible,
show: this.show,
cancel: this.handleCancel
})
)
}
}
export default ModalContainer;
......@@ -57,6 +57,7 @@ const Details = (props: any) => {
const [payPlanList, setpayPlanList] = useState<any>([])
const [contractText, setcontractText] = useState<any>([])
const [signatureLogId, setsignatureLogId] = useState<any>('') // 签署地址id
const [state, setstate] = useState<any>(false);
const [targetOffset, setTargetOffset] = useState<number | undefined>(undefined);
const [contractAbstract, setcontractAbstract] = useState('');
......@@ -144,7 +145,8 @@ const Details = (props: any) => {
if (info.file.response) {
const { code } = info.file.response;
console.log(code);
message.info(info.file.response.message);
message.info('上传成功');
setstate(true);
}
;
if (info.file.status !== 'uploading') {
......@@ -193,10 +195,6 @@ const Details = (props: any) => {
/* 审核 */
const onFinish = (values: any) => {
values.contractId = contractId;
let msg = message.loading({
content: '正在操作',
duration: 0,
});
console.log('Success:', values);
let fn: any;
switch (type) {
......@@ -215,32 +213,42 @@ const Details = (props: any) => {
default:
break;
}
fn(values).then(res => {
console.log(res);
if (res.code === 1000) {
setIsModalVisible(!Visible)
setTimeout(() => {
switch (type) {
case 'submitExamine':
history.push('/memberCenter/contract/coordination/pageToBeSubmitExamine')
break;
case 'levelexamine':
history.push('/memberCenter/contract/coordination/pageToBeExamineOne')
break;
case 'pageToBeExamineTwo':
history.push('/memberCenter/contract/coordination/pageToBeExamineTwo')
break;
case 'Sign':
history.push('/memberCenter/contract/coordination/Sign')
break;
default:
break;
}
}, 2000);
}
}).finally(() => {
msg();
});
if (type === 'Sign' && !state) {
console.log(type, state)
message.warning('请先上传合同');
return;
} else {
let msg = message.loading({
content: '正在操作',
duration: 0,
});
fn(values).then(res => {
console.log(res);
if (res.code === 1000) {
setIsModalVisible(!Visible)
setTimeout(() => {
switch (type) {
case 'submitExamine':
history.push('/memberCenter/contract/coordination/pageToBeSubmitExamine')
break;
case 'levelexamine':
history.push('/memberCenter/contract/coordination/pageToBeExamineOne')
break;
case 'pageToBeExamineTwo':
history.push('/memberCenter/contract/coordination/pageToBeExamineTwo')
break;
case 'Sign':
history.push('/memberCenter/contract/coordination/Sign')
break;
default:
break;
}
}, 2000);
}
}).finally(() => {
msg();
});
}
};
const onFinishFailed = (errorInfo: any) => {
......
......@@ -59,10 +59,6 @@ const Add: React.FC<{}> = (props: any) => {
basics: basicsVO.data,
detailList: detailList,
}
console.log('====================================');
console.log(data);
console.log('====================================');
return;
PublicApi.postContractApplyAmountSave(data).then(res => {
console.log(res);
if (res.code === 1000) {
......
......@@ -43,7 +43,7 @@ const List: React.FC<Iprops> = (props: Iprops) => {
)
}
}
], { fetchStatusListApi: PublicApi.getMemberRectifyManageStatusList, key: 'outerStatus' })
], { fetchStatusListApi: PublicApi.getMemberRectifyStatusList, key: 'outerStatus' })
const handleFetch = async (params) => {
const result = fetchListData(PublicApi.getMemberRectifyManagePage, params);
......
......@@ -28,7 +28,7 @@ export default function useColumns<T>(columnsList: ColumnsType<T>, actionColumn?
const defaultOptions = useMemo(() => options, [options])
const fetchStatusOptions = useCallback(async () => {
const defaultApi = defaultOptions && defaultOptions.fetchStatusListApi || PublicApi.getMemberRectifySummaryStatusList
const defaultApi = defaultOptions && defaultOptions.fetchStatusListApi || PublicApi.getMemberRectifyStatusList
const { code, data } = await defaultApi();
if (code === 1000) {
const formatedData = data.map((_item) => ({label: _item.message, value: _item.code}));
......
......@@ -4,17 +4,17 @@ import { unixChangeRender } from "@/pages/procurement/callForBids/addNewBid/cons
/** 参数字段转换为form数据 */
export const fieldTransformRender = (params) => {
let result: any = {}
result['inviteTenderId'] = params.inviteTender.id
result['inviteTenderCode'] = params.inviteTender.code
result['remark'] = params.inviteTender.remark
result['memberName'] = params.inviteTender.memberName
result['inviteTenderArea'] = params.inviteTender.inviteTenderAreaList.map(item => item.provinceName + '' + item.cityName).join('/')
result['createTime'] = unixChangeRender(params.inviteTender.createTime)
result['registerStartTime'] = unixChangeRender(params.inviteTender.registerStartTime)
result['registerEndTime'] = unixChangeRender(params.inviteTender.registerEndTime)
result['registerRequirement'] = params.inviteTender.registerRequirement
result['registerNeedFile'] = params.inviteTender.registerFile
result['inviteTenderMember'] = params.memberName
result['inviteTenderId'] = params.id
result['inviteTenderCode'] = params.code
result['remark'] = params.remark
result['memberName'] = params.memberName
result['inviteTenderArea'] = params.inviteTenderAreaList.map(item => item.provinceName + '' + item.cityName).join('/')
result['createTime'] = unixChangeRender(params.createTime)
result['registerStartTime'] = unixChangeRender(params.registerStartTime)
result['registerEndTime'] = unixChangeRender(params.registerEndTime)
result['registerRequirement'] = params.registerRequirement
result['registerNeedFile'] = params.registerFile
result['inviteTenderMember'] = params.submitTenderMemberName
result['submitTenderOutStatus'] = TenderOutStateTexts[params.submitTenderOutStatus]
result['submitTenderInStatus'] = TenderInStateTexts[params.submitTenderInStatus]
......
......@@ -34,7 +34,7 @@ const AddBidRegister:React.FC<AddBidRegisterProps> = (props) => {
useEffect(() => {
if(id) {
PublicApi.getPurchaseSubmitTenderGetInviteTender({ inviteTenderId: id }).then(res => {
PublicApi.getPurchaseInviteTenderGetInviteTenderRegister({ inviteTenderId: id }).then(res => {
if(res.code === 1000) {
// 转换字段渲染
const fixedData = fieldTransformRender(res.data)
......
......@@ -80,25 +80,21 @@ const ReadyQualifityCheckedDetail: React.FC = () => {
itemRender: () => null,
fileList,
onChange(info) {
if (info.file.status !== 'uploading') {
}
if (info.file.status === 'done') {
setFileList(() => info.fileList.map(item => {
if(item?.response) {
return {
...item.response.data,
name: item.response.data.name.split('/').pop()
}
} else {
return {
...item,
}
}
}))
} else if (info.file.status === 'error') {
if (info.file.status === 'error') {
message.error(`${info.file.name} 上传失败`);
}
setFileList(() => info.fileList.map(item => {
if(item?.response) {
return {
...item.response.data,
name: item.response.data.name.split('/').pop()
}
} else {
return {
...item,
}
}
}))
},
beforeUpload(file) {
if(file.name.length > 100) {
......
......@@ -36,7 +36,7 @@ const Message: React.FC<{}> = () => {
}
const handleRead = async (id: number, url: string) => {
const { data, code } = await PublicApi.postReportMessageMemberRead({id: id}, {ctlType: 'none'})
const { data, code } = await PublicApi.postMessageMessageMemberRead({id: id}, {ctlType: 'none'})
if(url) {
if(/http/.test(url)) {
location.href = url
......
......@@ -48,42 +48,6 @@ const Detail = () => {
}
}, [purchaseBiddingMessageSupplier])
// const ws = useRef<WebSocket | null>(null);
// const webSocketInit = useCallback(() => {
// if (SOCKET_URL && (!ws.current || ws.current.readyState === 3) && userInfo) {
// const url = `${SOCKET_URL}/message/websocket?memberId=${userInfo.memberId}&roleId=${userInfo.memberRoleId}&token=${userInfo.token}&source=${1}`;
// console.log(url)
// ws.current = new WebSocket(url);
// // ws.current.onopen = (e) => {}
// ws.current.onmessage = (e) => {
// const data = JSON.parse(e.data);
// console.log(data)
// const _data = data.data;
// if(data.action === 'purchase_bidding_message_supplier' && _data.id == onlineId){
// const _obj = {
// ranking: _data.ranking,
// minLowPrice : _data.minPrice,
// quotationDesks : _data.awardProcesss
// }
// fetchDataSource(_obj);
// }
// };
// ws.current.onclose = (e) => {
// console.log("关闭连接")
// }
// ws.current.onerror = (e) => {
// console.log("socket 出错")
// }
// }
// }, [ws]);
// useEffect(() => {
// webSocketInit();
// return () => {
// ws.current?.close();
// };
// }, [ws, webSocketInit]);
const fetchDataSource = async (socketObj?: any) => {
const params = {
id,
......
......@@ -58,51 +58,6 @@ const Management = () => {
}
}, [purchaseBiddingMessage])
// const ws = useRef<WebSocket | null>(null);
// const webSocketInit = useCallback(() => {
// if (SOCKET_URL && (!ws.current || ws.current.readyState === 3) && userInfo) {
// const url = `${SOCKET_URL}/message/websocket?memberId=${userInfo.memberId}&roleId=${userInfo.memberRoleId}&token=${userInfo.token}&source=${1}`;
// console.log(url)
// ws.current = new WebSocket(url);
// // ws.current.onopen = (e) => {}
// ws.current.onmessage = (e) => {
// const data = JSON.parse(e.data);
// console.log(data)
// const _data = data.data;
// if (data.action === 'purchase_bidding_message' && _data.id == id) {
// let _dynamic = { ...dynamic };
// _dynamic.count = _data.count;
// _dynamic.id = _data.id;
// _dynamic.memberName = _data.memberName;
// _dynamic.minPrice = _data.minPrice;
// setDynamic(_dynamic);
// setQueryPriceDynamics(_data.queryPriceDynamics);
// setSignupMembers(_data.sginUpInfos);
// setAwardProcess(_data.awardProcesss);
// setLowestList({
// type: 'min',
// title: '最低价',
// list: _data.awardProcesss ? _data.awardProcesss.map((item) => { return { type: 'min', time: formatTimeString(item.peportTime, 'HH:mm:ss'), value: priceFormat(item.sumPice, 0) } }) : []
// })
// }
// };
// ws.current.onclose = (e) => {
// console.log(e)
// console.log("关闭连接")
// }
// ws.current.onerror = (e) => {
// console.log("socket 出错")
// }
// }
// }, [ws]);
// useEffect(() => {
// webSocketInit();
// return () => {
// ws.current?.close();
// };
// }, [ws, webSocketInit]);
const fetchDataSource = async () => {
const params = {
id,
......
......@@ -178,12 +178,16 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
id
}).then(res => {
const { data } = res
const _orderProductRequests = data.orderModel > 30 ? procurementRenderField(data.orderProductRequests) : data.orderProductRequests
setInitFormValue({
...data,
// 判断是否合同下单
orderProductRequests: data.orderModel > 30 ? procurementRenderField(data.orderProductRequests) : data.orderProductRequests,
orderProductRequests: [],
deliveryTime: formatTimeString(data.deliveryTime)
})
// setTimeout(() => {
// addSchemaAction.setFieldValue('orderProductRequests', _orderProductRequests)
// }, 1000)
setFormLoading(false)
})
}
......@@ -652,6 +656,7 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
}
})
})
removeContractColumn()
} else if (
value === OrderModalType.PURCHASE_ENQUIRY_CONTRACT_ORDER ||
value === OrderModalType.PURCHASE_BIDDING_CONTRACT_ORDER ||
......@@ -665,6 +670,7 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
prefix: editable && pageStatus === PageStatus.ADD ? materialAddButton : '',
}
})
// }, 500)
showContractColumn()
} else {
......@@ -676,6 +682,7 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
}
})
// }, 500)
removeContractColumn()
}
// 选择某种类型时, 需显示对应的订单类型
ctx.setFieldValue('type', orderTypeLabelMap()[value])
......
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