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

@@ -48,7 +48,8 @@ const reset = () => {
<a-row :gutter="24">
<template v-for="(item, index) in config" :key="index">
<a-col :span="item.span || 8">
<a-form-item :label="item.label" :class="Math.ceil((index+1) / 3) !== Math.ceil(config.length / 3) ? 'mb20' : ''">
<a-form-item :label="item.label"
:class="Math.ceil((index+1) / 3) !== Math.ceil(config.length / 3) ? 'mb20' : ''">
<template v-if="item.type === FROM_TYPE.INPUT">
<a-input
class="w-full"
@@ -69,7 +70,10 @@ const reset = () => {
<template v-if="item.type === FROM_TYPE.DATETIME">
<a-range-picker
class="w-full"
@change="(v) => from[item.key] = `${v[0]}~${v[1]}`">
@change="(v) => {
from[item.start] = v[0];
from[item.end] = v[1];
}">
</a-range-picker>
</template>
@@ -121,6 +125,7 @@ const reset = () => {
:deep(.arco-form-item) {
margin-bottom: 0;
}
:deep(.arco-form-item-label) {
@apply whitespace-nowrap;
}

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);
}
});
}