Commit d172d5a5 authored by LeeJiancong's avatar LeeJiancong

'推送最新'

parent 6f549e9c
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-15 10:31:55
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-10-14 15:16:33
* @LastEditTime: 2020-10-16 14:51:25
*/
import React, { Component, useState, useEffect } from 'react';
import ReactDOM from 'react-dom'
......@@ -141,16 +141,28 @@ const diaLogForm: React.FC<ListProps> = (props) => {
const FormSumbit = (values: any) => {
let id = history.location.query.id
let value = { ...values }
if(value.designateList.length === 1 && JSON.stringify(value.designateList[0]) === '{}'){
delete value.designateList
}
if (id == 0) {
PublicApi.postLogisticsFreightTemplateAdd(value).then(res => { })
PublicApi.postLogisticsFreightTemplateAdd(value).then(res => {
if(res.code === 1000){
setTimeout(() => {
history.goBack()
}, 1000)
}
})
} else {
value.id = Number(id)
PublicApi.postLogisticsFreightTemplateUpdate(value).then(res => { })
PublicApi.postLogisticsFreightTemplateUpdate(value).then(res => {
if(res.code === 1000){
setTimeout(() => {
history.goBack()
}, 1000)
}
})
}
setTimeout(() => {
history.goBack()
}, 1000)
}
const onSearch = () => {
......
EyePreview/*
/*
* @Author: LeeJiancong
* @Date: 2020-07-14 15:07:34
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-08-19 11:03:37
* @LastEditTime: 2020-10-16 14:29:56
*/
import React, { Component, ReactNode, useRef, useState } from 'react'
import { history } from 'umi'
......
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