|
|
@ -196,9 +196,9 @@ const FormModal = (props) => { |
|
|
|
} |
|
|
|
// 处理日期时间 |
|
|
|
const handelDate = (data, type) => { |
|
|
|
if (data && data['rules']?.length) { |
|
|
|
// console.log(data.rules); |
|
|
|
data['rules'].map(item => { |
|
|
|
if (data && data?.source['rules']?.length) { |
|
|
|
console.log(data.rules); |
|
|
|
data.source['rules'].map(item => { |
|
|
|
if (item.cdate) { |
|
|
|
if (type == 1) { |
|
|
|
item["cdate"] = moment(item["cdate"]).format('YYYY-MM-DD HH:mm:ss'); |
|
|
@ -222,7 +222,7 @@ const FormModal = (props) => { |
|
|
|
//校验数据 |
|
|
|
if(handleFormValidation(data,0)&&handleFormValidation(data,1)){ |
|
|
|
let newData = handelDate(data, 1) |
|
|
|
ajax.deleteChangeRules({source:data}).then(res => { |
|
|
|
ajax.deleteChangeRules({source:newData}).then(res => { |
|
|
|
if (res.status === 20000) { |
|
|
|
setGetEditVisible(false) |
|
|
|
getData() |
|
|
|