Commit 426be222 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix:处理销售待审核订单修改价格总价显示异常,处理待确认回单发货是否完成不需要提示,处理线下支付线上确认凭证上传完毕才能提交支付

parent ac4310b1
......@@ -246,7 +246,7 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
if(current === 1) {
const payOrderUrls = formRef.current.urlList
const checkedId = checked.id
if (!payOrderUrls || payOrderUrls.length === 0) {
if (!payOrderUrls || payOrderUrls.length === 0 || payOrderUrls.includes('')) {
message.error('请先上传凭证')
return;
}
......
......@@ -287,10 +287,9 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
// 确认全部发货单已收到回单
const handelReciveReturnOrder = async () => {
const res = await PublicApi.getOrderIsDeliveryCompleted({id: data.id})
const { code } = res
const res = await PublicApi.getOrderIsDeliveryCompleted({id: data.id}, {ctlType: "none"})
let tip = ''
if(code === 1000)
if(res.data)
tip = '是否确认本单全部发货单已收到回单?'
else
tip = '您还有未发货的商品,是否确认全部发货都已完成?'
......@@ -306,10 +305,9 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
// 继续发货
const handleContinueDeliver = async () => {
const res = await PublicApi.getOrderIsDeliveryCompleted({id: data.id})
const { code } = res
const res = await PublicApi.getOrderIsDeliveryCompleted({id: data.id}, {ctlType: 'none'})
let tip = ''
if(code === 1000)
if(res.data)
tip = '您商品都已发货.是否确认还需要继续发货?'
else
tip = '是否继续发货?'
......
......@@ -97,12 +97,12 @@ export const MoneyTotalBox = ({ dataSource, isEditData }) => {
modelRef.current.setVisible(true)
}
const [amountMoney, setAmountMoney] = useState<number>(sumPrice || sum + freePrice)
const [amountMoney, setAmountMoney] = useState<number>((sumPrice*1000)/1000 || (sum*1000 + freePrice*1000)/1000)
// 总计金额
useEffect(() => {
console.log(sumPrice || (sum*1000 + freePrice*1000)/1000, 'iiiiii')
setAmountMoney(() => sumPrice || (sum*1000 + freePrice*1000)/1000)
console.log((sumPrice*1000)/1000 || (sum*1000 + freePrice*1000)/1000, 'iiiiii')
setAmountMoney(() => (sumPrice*1000)/1000 || (sum*1000 + freePrice*1000)/1000)
}, [sum, freePrice, sumPrice])
const handleConfirm = () => {
......
import React, { useState, useCallback, useRef } from 'react';
import { OrderDetailContext } from '../../../_public/order/context';
import { PublicApi } from '@/services/api';
import { Button } from 'antd';
import OrderDetailHeader from '@/pages/transaction/components/OrderDetailHeader';
import OrderDetailWrapper from '@/pages/transaction/components/OrderDetailWrapper';
import PreLoading from '@/components/PreLoading';
import { useOrderDetail } from '../../../_public/order/effects/useOrderDetail';
import ApprovedOrderModal from '../../../components/approvedOrderModal';
import { history } from 'umi'
import { useHttpRequest } from '@/hooks/useHttpRequest';
import OrderDetailSection from '../../../components/orderDetailSection';
const ReadyConfirmReturnOrderDetail: React.FC = () => {
const { formContext, id, detailList } = useOrderDetail({type: 'saleOrder'})
const { run, loading } = useHttpRequest(PublicApi.postOrderReceiptOrderConfirmedAll)
// 提交表单
const handleSubmit = useCallback(async () => {
const params = {
id: Number(id),
state: 1
}
const result = await run(params)
if (result.code === 1000) {
history.goBack()
}
}, [])
return (
<div>
<OrderDetailContext.Provider value={formContext}>
<OrderDetailHeader
detailList={detailList}
detailData={formContext.data}
// extraRight={
// <Button type='primary' onClick={handleSubmit} loading={loading}>
// 确认全部已回单
// </Button>
// }
/>
<OrderDetailWrapper>
<PreLoading loading={!formContext.data} active paragraph={{rows: 6}}>
<OrderDetailSection formContext={formContext} type='saleOrder'/>
</PreLoading>
</OrderDetailWrapper>
</OrderDetailContext.Provider>
</div>
);
};
export default ReadyConfirmReturnOrderDetail;
\ No newline at end of file
import React, { useState, useCallback, useRef } from 'react';
import { OrderDetailContext } from '../../../_public/order/context';
import { PublicApi } from '@/services/api';
import { Button } from 'antd';
import OrderDetailHeader from '@/pages/transaction/components/OrderDetailHeader';
import OrderDetailWrapper from '@/pages/transaction/components/OrderDetailWrapper';
import PreLoading from '@/components/PreLoading';
import { useOrderDetail } from '../../../_public/order/effects/useOrderDetail';
import ApprovedOrderModal from '../../../components/approvedOrderModal';
import { history } from 'umi'
import { useHttpRequest } from '@/hooks/useHttpRequest';
import OrderDetailSection from '../../../components/orderDetailSection';
const ReadyConfirmReturnOrderDetail: React.FC = () => {
const { formContext, id, detailList } = useOrderDetail({type: 'saleOrder'})
const { run, loading } = useHttpRequest(PublicApi.postOrderReceiptOrderConfirmedAll)
// 提交表单
// const handleSubmit = useCallback(async () => {
// const params = {
// id: Number(id),
// state: 1
// }
// const result = await run(params)
// if (result.code === 1000) {
// history.goBack()
// }
// }, [])
const handleSubmit = () => {
const deleveBox = document.querySelector('#deleveBox') as any
window.scrollTo(0, deleveBox.offsetTop)
}
return (
<div>
<OrderDetailContext.Provider value={formContext}>
<OrderDetailHeader
detailList={detailList}
detailData={formContext.data}
extraRight={
<Button type='primary' onClick={handleSubmit} loading={loading}>
确认全部已回单
</Button>
}
/>
<OrderDetailWrapper>
<PreLoading loading={!formContext.data} active paragraph={{rows: 6}}>
<OrderDetailSection formContext={formContext} type='saleOrder'/>
</PreLoading>
</OrderDetailWrapper>
</OrderDetailContext.Provider>
</div>
);
};
export default ReadyConfirmReturnOrderDetail;
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