Commit 9e8552ef authored by linweijiong's avatar linweijiong

Merge branch 'jinfa-20221102' into 'jinfa-20221102'

fix:报表bug以及终止订单第一次未传id问题 See merge request project/jinfa-platform!522
parents a6ccd870 5f2e4744
......@@ -73,6 +73,7 @@ const SaleOrder: React.FC<SaleOrderProps> = () => {
const pauseRef = useRef<any>({})
const orderIds = useRef<number[]>([])
const [pageLoading, setPageLoding] = useState<boolean>(false)
const [orderId, setOrderId] = useState<any>()
const [payChartVisible, setPayChartVisible] = useState<boolean>(false)
const [payForm] = Form.useForm();
const [payModel, setPayModel] = useState<'web'|'app'|'miniapp'|null>('web')
......@@ -147,7 +148,7 @@ const SaleOrder: React.FC<SaleOrderProps> = () => {
// 提交中止
const handleSubmitPause = () => {
pauseActions.submit().then(async ({values}: any) => {
const result = await runPause({ orderId: values.id, reason: values.auditOpinion })
const result = await runPause({ orderId: orderId, reason: values.auditOpinion })
if (result.code === 1000) {
pauseRef.current.setVisible(false)
setTimeout(() => {
......@@ -240,6 +241,7 @@ const SaleOrder: React.FC<SaleOrderProps> = () => {
const handleSuspend = (r) => {
pauseRef.current.setVisible(true)
pauseActions.setFieldValue('id', r.orderId)
setOrderId(r.orderId)
pauseActions.setFieldValue('state', 1)
}
......
......@@ -29,6 +29,10 @@ interface ExportFileProps {
export const handleExportFile = async (props: ExportFileProps) => {
const { api, params, options } = props
let exportParams = ''
if(params?.categoryCode){
let list = params?.categoryCode
params.categoryCode = list[list.length - 1]
}
Object.keys(params).forEach(item => {
if (params[item]) {
exportParams += `&${item}=${params[item]}`
......
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