Commit 735c78f3 authored by 张子雨's avatar 张子雨

feat: 增加提示语

parent 06be53d8
...@@ -33,10 +33,12 @@ const TableList = () => { ...@@ -33,10 +33,12 @@ const TableList = () => {
actionRef.current.reload(); actionRef.current.reload();
}; };
const delAction = async ({ id }) => { const delAction = async ({ id }) => {
const businessCode = await del(id); const data = await del(id);
if (businessCode === '0000') { if (data.businessCode === '0000') {
reload(); reload();
notification.success({ message: '删除成功!' }); notification.success({ message: '删除成功!' });
} else {
notification.error({ message: data.msg || '删除失败' });
} }
}; };
const editAction = async row => { const editAction = async row => {
......
...@@ -42,14 +42,14 @@ export async function supplier() { ...@@ -42,14 +42,14 @@ export async function supplier() {
} }
export async function del(id) { export async function del(id) {
const { businessCode } = await request.post('/api/kdsp/supplier/after-sales-addrs-delete', { const data = await request.post('/api/kdsp/supplier/after-sales-addrs-delete', {
prefix: config.kdspApi, prefix: config.kdspApi,
data: stringify({ id }), data: stringify({ id }),
headers: { headers: {
'Content-Type': 'application/x-www-form-urlencoded', 'Content-Type': 'application/x-www-form-urlencoded',
}, },
}); });
return businessCode; return data;
} }
export async function update(params) { export async function update(params) {
......
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