保证金为0想自动算已支付
This commit is contained in:
@ -5,8 +5,8 @@ import ProTable from '@ant-design/pro-table';
|
||||
import { digitalConversionAmount } from '@/utils/NumberUtils';
|
||||
import { nowExceedSpecifiedTime } from '@/utils/DateUtils';
|
||||
import { getURLInformation, isNotEmpty } from '@/utils/CommonUtils';
|
||||
import { cancelOrder, getByOrderId, paySuccess, payTenderFile, saveGenerateOrder, woPay } from '../service';
|
||||
import { getProMethod, getSessionProjectData } from '@/utils/session';
|
||||
import { cancelOrder, getByOrderId, paySuccess, payTenderFile, saveGenerateOrder, woPay ,queryMarginFees} from '../service';
|
||||
import { getProMethod, getSessionProjectData} from '@/utils/session';
|
||||
import { isEmpty } from 'lodash';
|
||||
import { getAllFlowName, getAllFlowNameByRoomType, getbidQualification, moduleName } from '@/utils/FlowUtils';
|
||||
import { btnAuthority } from '@/utils/authority';
|
||||
@ -64,6 +64,8 @@ const IParticipate: React.FC = () => {
|
||||
//沃支付遮罩
|
||||
const [spinningModelLoading, setSpinningModelLoading] = useState<boolean>(false);
|
||||
const [form] = Form.useForm();
|
||||
// 存储sectionId列表的状态
|
||||
let sectionIds = '';
|
||||
useEffect(() => {
|
||||
init();
|
||||
}, []);
|
||||
@ -260,7 +262,17 @@ const IParticipate: React.FC = () => {
|
||||
*/
|
||||
const settlementOnOk = async () => {
|
||||
setSpinningModelLoading(true);
|
||||
if (Number(totalOrderAmount) === 0) {
|
||||
let zeroAmountItems = "";
|
||||
//查询biz_bid_expenses表 根据projectId和sectionIds 查询保证金费用是否为0
|
||||
queryMarginFees({ projectId: projectId, sectionIds: sectionIds }).then(res => {
|
||||
if (res.code === 200) {
|
||||
if (res.data) {
|
||||
//amount 为0的数据
|
||||
zeroAmountItems = res.data.filter(item => item.amount === 0);
|
||||
}
|
||||
}
|
||||
})
|
||||
if (Number(totalOrderAmount) === 0 || zeroAmountItems !== null) {
|
||||
paySuccess(orderNumber).then(res => {
|
||||
if (res.data) {
|
||||
message.success('支付成功!');
|
||||
@ -298,7 +310,7 @@ const IParticipate: React.FC = () => {
|
||||
}
|
||||
}).finally(() => setSpinningModelLoading(false));
|
||||
setOrderSpinning(false);
|
||||
}
|
||||
};
|
||||
Modal.confirm({
|
||||
title: '告知',
|
||||
content: <div>即将离开本系统跳转至【沃钱包-收银台】进行支付,在【沃钱包-收银台】支付前请仔细核对支付信息(包括:<span style={{ color: 'red', fontSize: 30 }}>商品名称、商户名称、订单号、订单金额</span>)是否与本系统订单信息一致。如若需要更改订单,请<span style={{ color: 'red', fontSize: 30 }}>关闭</span>【沃钱包-收银台】页面。</div>,
|
||||
@ -482,7 +494,7 @@ const IParticipate: React.FC = () => {
|
||||
}
|
||||
/**
|
||||
* 勾选计算金额
|
||||
* @param selectedRows
|
||||
* @param selectedRows
|
||||
*/
|
||||
const calculate = (selectedRows: any) => {
|
||||
let num = 0;
|
||||
@ -524,4 +536,4 @@ const IParticipate: React.FC = () => {
|
||||
</>
|
||||
)
|
||||
}
|
||||
export default IParticipate
|
||||
export default IParticipate
|
||||
|
@ -7,11 +7,11 @@
|
||||
* @FilePath: \ebtp-cloud-frontend\src\pages\IParticipate\service.ts
|
||||
*/
|
||||
|
||||
import request from "@/utils/request";
|
||||
import request from '@/utils/request';
|
||||
|
||||
/**
|
||||
* 获取购标信息
|
||||
* @param id
|
||||
* @param id
|
||||
*/
|
||||
export async function payTenderFile(id: string | null, roomType:any) {
|
||||
return request('/api/biz-service-ebtp-tender/v1/supplier_register/pay_tender_file/' + id + '?roomType=' + roomType);
|
||||
@ -41,7 +41,7 @@ export async function woPay(orderId: any) {
|
||||
}
|
||||
/**
|
||||
* 取消订单
|
||||
* @param id
|
||||
* @param id
|
||||
*/
|
||||
export async function cancelOrder(id: any) {
|
||||
return request('/api/biz-service-ebtp-expenses/v1/bizbidorder/cancelOrder/' + id, {
|
||||
@ -61,4 +61,10 @@ export function paySuccess (id:any){
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//保证金费用查询
|
||||
export async function queryMarginFees(params?: any) {
|
||||
return request(`/api/biz-service-ebtp-expenses/v1/bizbidexpenses/queryMarginFees`,{
|
||||
method:'POST',
|
||||
data:{...params,},
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user