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

fix:

parent ecd67f1d
...@@ -7,6 +7,7 @@ import { GlobalConfig } from '@/global/config' ...@@ -7,6 +7,7 @@ import { GlobalConfig } from '@/global/config'
import { orderTypeLabel } from '../constant' import { orderTypeLabel } from '../constant'
import { formatTimeString } from '@/utils' import { formatTimeString } from '@/utils'
import StatusColors from '../../../components/StatusColors' import StatusColors from '../../../components/StatusColors'
import { message } from 'antd'
interface OrderDetailHookProps { interface OrderDetailHookProps {
// 采购、销售 // 采购、销售
...@@ -42,9 +43,11 @@ export const useOrderDetail = (options: OrderDetailHookProps) => { ...@@ -42,9 +43,11 @@ export const useOrderDetail = (options: OrderDetailHookProps) => {
const reloadFormData = useCallback(() => { const reloadFormData = useCallback(() => {
if (id) { if (id) {
const fn = type === 'purchaseOrder' ? PublicApi.getOrderProcurementOrderDetails : PublicApi.getOrderPurchaseOrderDetails const fn = type === 'purchaseOrder' ? PublicApi.getOrderProcurementOrderDetails : PublicApi.getOrderPurchaseOrderDetails
fn({ id }).then(({ data, code }) => { fn({ id }, { ctlType: "none" }).then(res => {
if (code === 1000) { if (res.code === 1000) {
setFormData(data) setFormData(res.data)
} else {
message.error(res.message)
} }
}) })
} }
......
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