|
@ -207,7 +207,11 @@ function WhitelistManagement() { |
|
|
.validateFields() |
|
|
.validateFields() |
|
|
.then((res) => { |
|
|
.then((res) => { |
|
|
if (editModal.status === "add") { |
|
|
if (editModal.status === "add") { |
|
|
ajax.addWhiteList(res).then((res) => { |
|
|
|
|
|
|
|
|
ajax.addWhiteList({ |
|
|
|
|
|
...res, |
|
|
|
|
|
effective_begin_date: moment(res.effective_date[0]).format("YY-MM-DD HH:mm:ss"), |
|
|
|
|
|
effective_end_date: moment(res.effective_date[1]).format("YY-MM-DD HH:mm:ss") |
|
|
|
|
|
}).then((res) => { |
|
|
if (res.status === 20000) { |
|
|
if (res.status === 20000) { |
|
|
message.success("添加成功"); |
|
|
message.success("添加成功"); |
|
|
setEditModal({ visible: false }); |
|
|
setEditModal({ visible: false }); |
|
@ -219,7 +223,11 @@ function WhitelistManagement() { |
|
|
}); |
|
|
}); |
|
|
} else if (editModal.status === "edit") { |
|
|
} else if (editModal.status === "edit") { |
|
|
res.id = currentId; |
|
|
res.id = currentId; |
|
|
ajax.editWhiteVehicle(res).then((res) => { |
|
|
|
|
|
|
|
|
ajax.editWhiteVehicle({ |
|
|
|
|
|
...res, |
|
|
|
|
|
effective_begin_date: moment(res.effective_date[0]).format("YY-MM-DD HH:mm:ss"), |
|
|
|
|
|
effective_end_date: moment(res.effective_date[1]).format("YY-MM-DD HH:mm:ss") |
|
|
|
|
|
}).then((res) => { |
|
|
if (res.status === 20000) { |
|
|
if (res.status === 20000) { |
|
|
message.success("编辑成功"); |
|
|
message.success("编辑成功"); |
|
|
setEditModal({ visible: false }); |
|
|
setEditModal({ visible: false }); |
|
@ -263,7 +271,7 @@ function WhitelistManagement() { |
|
|
</Col> |
|
|
</Col> |
|
|
<Col span="4_8" style={{ width: "30%" }}> |
|
|
<Col span="4_8" style={{ width: "30%" }}> |
|
|
<Form.Item label="状态" name="status"> |
|
|
<Form.Item label="状态" name="status"> |
|
|
<Select |
|
|
|
|
|
|
|
|
<Select |
|
|
options={[ |
|
|
options={[ |
|
|
{ label: "全部", value: '0' }, |
|
|
{ label: "全部", value: '0' }, |
|
|
{ label: "启用", value: '1' }, |
|
|
{ label: "启用", value: '1' }, |
|
@ -343,7 +351,7 @@ function WhitelistManagement() { |
|
|
rules={[{ required: true }]} |
|
|
rules={[{ required: true }]} |
|
|
name="plate_color" |
|
|
name="plate_color" |
|
|
> |
|
|
> |
|
|
<Select disabled={editModal.status === "edit"} options={sysConfig.plateColor}/> |
|
|
|
|
|
|
|
|
<Select disabled={editModal.status === "edit"} options={sysConfig.plateColor} /> |
|
|
</Form.Item> |
|
|
</Form.Item> |
|
|
</Col> |
|
|
</Col> |
|
|
<Col span={12}> |
|
|
<Col span={12}> |
|
|