fix: 增加删除接口
This commit is contained in:
parent
dcf17e7fd4
commit
d469ab617b
|
@ -1113,11 +1113,16 @@ export const bmExportTaskList = (params) => {
|
|||
return req("get", baseurl + "/mks/admin/v1/settlement_order/export_record/list", params)
|
||||
}
|
||||
|
||||
// 下载excel
|
||||
// 下载 包码 excel task
|
||||
export const bmDownExcel = (id) => {
|
||||
return req("get", baseurl + "/mks/admin/v1/settlement_order/export_record/download/" + id)
|
||||
}
|
||||
|
||||
// 删除 包码 下载内容
|
||||
export const deleteBMDownloadTask = (id) => {
|
||||
return req("delete", baseurl + "/mks/admin/v1/settlement_order/export_record/delete/" + id)
|
||||
}
|
||||
|
||||
// 获取自定义按钮列表
|
||||
export const getDefineButtons = (id) => {
|
||||
return req("get", baseurl + "/plan/getButtonConf/" + id)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import Grid from "@/components/gird/main.js"
|
||||
import TabPage from "@/components/tabPage/main.js"
|
||||
import { useSetState, useUpdateEffect } from "ahooks"
|
||||
import React, { useEffect, useRef } from "react"
|
||||
import { BlockLoading, Notify } from "zent"
|
||||
import { bmExportTaskList, handelResponse, bmDownExcel } from "@/assets/api"
|
||||
import React, { useEffect } from "react"
|
||||
import { BlockLoading, Notify, Sweetalert } from "zent"
|
||||
import { bmExportTaskList, handelResponse, bmDownExcel, deleteBMDownloadTask } from "@/assets/api"
|
||||
|
||||
const tableColumn = [
|
||||
{
|
||||
|
@ -114,7 +114,35 @@ const BmDownload = () => {
|
|||
}
|
||||
)
|
||||
}
|
||||
// 昨天调试完招行项目
|
||||
|
||||
// 删除下载任务
|
||||
const deleteDownLoadTask = (id) => {
|
||||
Sweetalert.confirm({
|
||||
title: "确认信息",
|
||||
content: <p>确认删除该数据?</p>,
|
||||
onConfirm: async () => {
|
||||
deleteBMDownloadTask(id).then((res) => {
|
||||
handelResponse(
|
||||
res,
|
||||
(response, msg) => {
|
||||
if (res.code === 200) {
|
||||
Notify.clear()
|
||||
Notify.success(msg)
|
||||
setState({ isQuery: !state.isQuery })
|
||||
} else {
|
||||
Notify.error(msg)
|
||||
}
|
||||
},
|
||||
(err) => {
|
||||
Notify.error(err)
|
||||
}
|
||||
)
|
||||
})
|
||||
},
|
||||
onCancel: () => {},
|
||||
parentComponent: this
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="key-container" id="dislist">
|
||||
|
@ -152,6 +180,14 @@ const BmDownload = () => {
|
|||
下载
|
||||
</a>
|
||||
)}
|
||||
|
||||
<a
|
||||
className="grid-link"
|
||||
style={{ paddingLeft: "2px", color: "red" }}
|
||||
onClick={() => deleteDownLoadTask(rowData.id)}
|
||||
>
|
||||
删除
|
||||
</a>
|
||||
</span>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue