This commit is contained in:
2025-04-21 10:30:45 +08:00
parent 9731d104f6
commit e89510d7c0
14 changed files with 308 additions and 120 deletions

View File

@@ -1,5 +1,6 @@
import {Modal, Tag} from "@arco-design/web-vue";
import {Message, Modal, Tag} from "@arco-design/web-vue";
import {h} from 'vue';
import Api from "../../api/index.js";
const ModalContent = {
props: {
@@ -30,12 +31,17 @@ const ModalContent = {
]),
h('div', {class: 'text-[14px] text-[rgb(78, 89, 105)]'}, '无法终止')
]);
case 'none':
return () => h('div', {}, [
h('div', {class: 'text-[14px] text-[rgb(78, 89, 105)]'}, '点击终止子任务后,达人将无法再领取子任务'),
h('div', {class: 'text-[14px] text-[#4E5969]'}, '*请商家及时处理已经被接单的子任务,处理完毕后,剩余任务金额将返款至商家钱包')
]);
}
}
}
const openTerminateTask = (type, status_text = '待上传素材') => {
const status = 'success';
const openTerminateTask = ({type = 'none', status_text = '待上传素材', taskId}) => {
const status = type;
Modal.warning({
title: '确认终止子任务',
@@ -45,7 +51,7 @@ const openTerminateTask = (type, status_text = '待上传素材') => {
h(
ModalContent,
{
status: 'success',
status: status,
status_text: status_text
}
),
@@ -53,8 +59,9 @@ const openTerminateTask = (type, status_text = '待上传素材') => {
status: 'danger',
},
okText: status === 'success' ? '确认终止' : '确认',
onOk: () => {
onOk: async () => {
const {code, msg} = await Api.admin.stopTask(taskId);
if (code === 1) Message.success(msg);
}
});
}