This commit is contained in:
2025-04-29 19:43:06 +08:00
parent dfb552b7ed
commit ff17e84aed
26 changed files with 530 additions and 260 deletions

View File

@@ -1,7 +1,9 @@
import merchant from './merchant.js';
import system from './system.js'; import system from './system.js';
import admin from './admin.js'; import admin from './admin.js';
const Api = { const Api = {
merchant: {...merchant},
system: {...system}, system: {...system},
admin: {...admin}, admin: {...admin},
} }

157
src/api/merchant.js Normal file
View File

@@ -0,0 +1,157 @@
import request from "../utils/request.js";
import Method from "./Method.js";
const merchant = {
sendSms: async (mobile) => {
return request({
url: '/index/login/sendSms',
method: Method.POST,
data: {mobile},
});
},
register: async (data) => {
return request({
url: '/index/login/register',
method: Method.POST,
data: data,
});
},
login: async (data) => {
return request({
url: '/index/login/login',
method: Method.POST,
data: data,
});
},
getMenu: async (data) => {
return request({
url: '/index/business/getMenu',
method: Method.POST,
data: data,
});
},
getPlatformList: async () => {
return request({
url: '/index/task/getPlatformList',
method: Method.POST,
});
},
getMaterialType: async (data) => {
return request({
url: '/index/task/getMaterialType',
method: Method.POST,
data: data,
});
},
getProvince: async () => {
return request({
url: '/index/task/getProvince',
method: Method.POST,
});
},
getSettlementAfter: async () => {
return request({
url: '/index/task/getSettlementAfter',
method: Method.POST,
});
},
getChooseContent: async (data) => {
return request({
url: '/index/task/getChooseContent',
method: Method.POST,
data: data
});
},
getNumberOfReleases: async () => {
return Promise.resolve({
data: [
{
id: 1,
name: '一次'
},
{
id: 2,
name: '两次'
},
{
id: 3,
name: '三次'
},
{
id: 4,
name: '四次'
},
{
id: 5,
name: '五次'
},
]
})
},
getPublicationDuration: async () => {
return Promise.resolve({
data: [
{
id: 5,
name: '5分钟'
},
{
id: 10,
name: '10分钟'
},
{
id: 20,
name: '20分钟'
},
{
id: 30,
name: '30分钟'
},
]
})
},
createTask: async (data) => {
return request({
url: '/index/task/createTask',
method: Method.POST,
data: data,
});
},
getTaskPlatformList: async (data) => {
return request({
url: '/index/task/getPlatformList',
method: Method.POST,
data: data
});
},
getTaskStatusList: async (data) => {
return request({
url: '/index/task/getStatusList',
method: Method.POST,
data: data
});
},
getTaskList: async (data) => {
return request({
url: '/index/task/getTaskList',
method: Method.POST,
data: data
});
},
addWithdrawal: async (data) => {
return request({
url: '/index/business/addWithdrawal',
method: Method.POST,
data: data
});
},
getWithdrawalList: async (data) => {
return request({
url: '/index/business/getWithdrawalList',
method: Method.POST,
data: data
});
},
}
export default merchant;

View File

@@ -43,7 +43,20 @@ const system = {
'Content-Type': 'multipart/form-data; boundary=--------------------------611824495457697861278283' 'Content-Type': 'multipart/form-data; boundary=--------------------------611824495457697861278283'
} }
}); });
} },
uploadFile2: async (file) => {
const formData = new FormData();
formData.append('file', file);
return request({
UN_AES: true,
url: '/index/upload/upload',
method: Method.POST,
data: formData,
headers: {
'Content-Type': 'multipart/form-data; boundary=--------------------------611824495457697861278283'
}
});
},
} }
export default system; export default system;

BIN
src/assets/images/yhk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
src/assets/images/zfb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 818 B

View File

@@ -4,10 +4,14 @@ import {Message, Notification} from "@arco-design/web-vue";
import Api from "../../api/index.js"; import Api from "../../api/index.js";
const verificationCode = defineModel('verificationCode', {type: String}); const verificationCode = defineModel('verificationCode', {type: String});
const {mobile} = defineProps({ const {mobile, api} = defineProps({
mobile: { mobile: {
type: String, type: String,
default: null, default: null,
},
api: {
type: Function,
default: Api.admin.sendSms
} }
}); });
@@ -17,7 +21,7 @@ let timer = null;
const verifyPhone = async () => { const verifyPhone = async () => {
if (/^1[3-9]\d{9}$/.test(mobile)) { if (/^1[3-9]\d{9}$/.test(mobile)) {
if (timer === null) { if (timer === null) {
const {msg, code} = await Api.admin.sendSms(mobile); const {msg, code} = await api(mobile);
if (code === 1) Message.success(msg); if (code === 1) Message.success(msg);
time.value = 10; time.value = 10;
timer = setInterval(() => { timer = setInterval(() => {

View File

@@ -1,5 +1,5 @@
<script setup> <script setup>
import {onMounted, reactive} from "vue"; import {reactive} from "vue";
const {api, fieldName, apiPo} = defineProps({ const {api, fieldName, apiPo} = defineProps({
api: { api: {
@@ -19,12 +19,14 @@ const {api, fieldName, apiPo} = defineProps({
}); });
const list = reactive([]); const list = reactive([]);
onMounted(() => { const popupChange = async (visible) => {
api && api(apiPo).then(({data}) => { if (visible) {
list.length = 0; api && api(apiPo).then(({data}) => {
list.push(...data); list.length = 0;
}); list.push(...data);
}); });
}
}
</script> </script>
<template> <template>
@@ -32,6 +34,7 @@ onMounted(() => {
v-bind="$attrs" v-bind="$attrs"
:options="list" :options="list"
:field-names="fieldName" :field-names="fieldName"
@popup-visible-change="popupChange"
placeholder="请选择"> placeholder="请选择">
</a-select> </a-select>
</template> </template>

View File

@@ -0,0 +1,26 @@
<script setup>
import {computed} from 'vue';
const start = defineModel('start');
const end = defineModel('end');
const value = computed({
get: () => [start.value, end.value],
set: (val) => {
start.value = val[0];
end.value = val[1];
}
});
</script>
<template>
<a-time-picker
v-model:model-value="value"
v-bind="$attrs"
type="time-range">
</a-time-picker>
</template>
<style scoped lang="scss">
</style>

View File

@@ -1,17 +1,21 @@
<script setup> <script setup>
import Api from "../../api/index.js"; import Api from "../../api/index.js";
const {size} = defineProps({ const {size, api} = defineProps({
size: { size: {
type: String, type: String,
default: '100%' default: '100%'
},
api: {
type: Function,
default: Api.system.uploadFile,
} }
}); });
const emits = defineEmits(['success']); const emits = defineEmits(['success']);
const files = defineModel('file'); const files = defineModel('file');
const beforeUpload = (file) => { const beforeUpload = (file) => {
Api.system.uploadFile(file).then(({data}) => { api(file).then(({data}) => {
files.value = data; files.value = data;
emits('success', file); emits('success', file);
}); });

View File

@@ -1,11 +1,21 @@
<script setup> <script setup>
import {ref, reactive} from 'vue'; import {reactive} from 'vue';
import VerificationCode from "../../components/VerificationCode/index.vue"; import VerificationCode from "../../components/VerificationCode/index.vue";
import Api from "../../api/index.js";
import {Message} from "@arco-design/web-vue";
const from = reactive({ const from = reactive({
phone: null, wechat: null,
verificationCode: null, mobile: null,
password: null,
captcha: null,
invite: null,
}); });
const register = async () => {
const {msg} = await Api.merchant.register(from);
Message.success(msg);
}
</script> </script>
<template> <template>
@@ -14,27 +24,28 @@ const from = reactive({
<div class="mt-[30px] flex flex-col gap-[20px]"> <div class="mt-[30px] flex flex-col gap-[20px]">
<a-form layout="vertical"> <a-form layout="vertical">
<a-form-item label="微信号"> <a-form-item label="微信号">
<a-input placeholder="请输入微信号"></a-input> <a-input v-model:model-value="from.wechat" placeholder="请输入微信号"></a-input>
</a-form-item> </a-form-item>
<a-form-item label="手机号"> <a-form-item label="手机号">
<a-input v-model:model-value="from.phone" placeholder="请输入手机号"></a-input> <a-input v-model:model-value="from.mobile" placeholder="请输入手机号"></a-input>
</a-form-item> </a-form-item>
<a-form-item label="验证码"> <a-form-item label="验证码">
<VerificationCode <VerificationCode
:phone="from.phone" :api="Api.merchant.sendSms"
v-model:verification-code="from.verificationCode"> :mobile="from.mobile"
v-model:verification-code="from.captcha">
</VerificationCode> </VerificationCode>
</a-form-item> </a-form-item>
<a-form-item label="登陆密码"> <a-form-item label="登陆密码">
<a-input placeholder="请输入登陆密码"></a-input> <a-input v-model:model-value="from.password" placeholder="请输入登陆密码"></a-input>
</a-form-item> </a-form-item>
<a-form-item label="邀请码(选填)"> <a-form-item label="邀请码(选填)">
<a-input placeholder="请输入邀请码"></a-input> <a-input v-model:model-value="from.invite" placeholder="请输入邀请码"></a-input>
</a-form-item> </a-form-item>
</a-form> </a-form>
</div> </div>
<div class="flex flex-col mt-[30px] gap-[32px]"> <div class="flex flex-col mt-[30px] gap-[32px]">
<a-button type="primary">确认注册</a-button> <a-button type="primary" @click="register">确认注册</a-button>
</div> </div>
</div> </div>
</template> </template>
@@ -42,6 +53,7 @@ const from = reactive({
<style scoped> <style scoped>
.card { .card {
box-shadow: 0 8px 20px 0 rgba(0, 0, 0, 0.1); box-shadow: 0 8px 20px 0 rgba(0, 0, 0, 0.1);
:deep(.arco-form-item-label-col) { :deep(.arco-form-item-label-col) {
line-height: 20px; line-height: 20px;
} }

View File

@@ -1,5 +1,8 @@
<script setup> <script setup>
import {ref, reactive} from 'vue'; import {reactive, ref} from 'vue';
import Api from "../../../api/index.js";
import VerificationCode from "../../../components/VerificationCode/index.vue";
import {Message} from "@arco-design/web-vue";
const visible = ref(false); const visible = ref(false);
const state = reactive({ const state = reactive({
@@ -7,7 +10,12 @@ const state = reactive({
sendTimeout: 0, sendTimeout: 0,
}); });
const form = reactive({ const form = reactive({
name: null type: null,
mobile: null,
captcha: null,
realname: null,
id_card: null,
account: null,
}); });
const sendMessage = () => { const sendMessage = () => {
@@ -20,6 +28,11 @@ const sendMessage = () => {
} }
}, 1000); }, 1000);
} }
const success = async () => {
const {msg} = await Api.merchant.addWithdrawal(form);
Message.success(msg);
}
</script> </script>
<template> <template>
@@ -31,30 +44,29 @@ const sendMessage = () => {
<a-modal <a-modal
title-align="start" title-align="start"
title="添加提现信息" title="添加提现信息"
@ok="success"
v-model:visible="visible"> v-model:visible="visible">
<a-form> <a-form>
<a-tabs type="rounded"> <a-tabs type="rounded">
<a-tab-pane title="添加支付宝" key="1"> <a-tab-pane title="添加支付宝" key="1">
<a-form-item label="收款姓名"> <a-form-item label="收款姓名">
<a-input v-model:model-value="form.name" placeholder="请输入收款人的姓名"></a-input> <a-input v-model:model-value="form.realname" placeholder="请输入收款人的姓名"></a-input>
</a-form-item> </a-form-item>
<a-form-item label="支付宝账号"> <a-form-item label="支付宝账号">
<a-input v-model:model-value="form.name" placeholder="请输入支付宝账号"></a-input> <a-input v-model:model-value="form.account" placeholder="请输入支付宝账号"></a-input>
</a-form-item> </a-form-item>
<a-form-item label="身份证号"> <a-form-item label="身份证号">
<a-input v-model:model-value="form.name" placeholder="请输入身份证号"></a-input> <a-input v-model:model-value="form.id_card" placeholder="请输入身份证号"></a-input>
</a-form-item> </a-form-item>
<a-form-item label="手机号"> <a-form-item label="手机号">
<a-input v-model:model-value="form.name" placeholder="请输入手机号"></a-input> <a-input v-model:model-value="form.mobile" placeholder="请输入手机号"></a-input>
</a-form-item> </a-form-item>
<a-form-item label="验证码"> <a-form-item label="验证码">
<a-input v-model:model-value="form.name" placeholder="请输入验证码"></a-input> <VerificationCode
<a-link :api="Api.merchant.sendSms"
@click="sendMessage" :mobile="form.mobile"
class="whitespace-nowrap ml-[16px]" v-model:verification-code="form.captcha">
:hoverable="false"> </VerificationCode>
{{ state.sendTimeout === 0 ? '获取验证码' : `${state.sendTimeout}s后重试` }}
</a-link>
</a-form-item> </a-form-item>
</a-tab-pane> </a-tab-pane>
<a-tab-pane title="添加银行卡" key="2"> <a-tab-pane title="添加银行卡" key="2">

View File

@@ -1,8 +1,22 @@
<script setup> <script setup>
import ZFBICON from "../../../../../assets/images/zfb.png";
import YHKICON from "../../../../../assets/images/yhk.png";
import {onMounted, reactive} from "vue";
import AddWithdrawalInformationModal from "../../../components/AddWithdrawalInformationModal.vue"; import AddWithdrawalInformationModal from "../../../components/AddWithdrawalInformationModal.vue";
import openWithdrawalStatus from "./openWithdrawalStatus.js"; import openWithdrawalStatus from "./openWithdrawalStatus.js";
import LookWithdrawalInformationModal from "../../../components/LookWithdrawalInformationModal.vue"; import LookWithdrawalInformationModal from "../../../components/LookWithdrawalInformationModal.vue";
import Api from "../../../../../api/index.js";
const withdrawalList = reactive([]);
const getData = async () => {
const {data} = await Api.merchant.getWithdrawalList();
withdrawalList.length = 0;
withdrawalList.push(...data);
}
onMounted(() => {
getData();
});
</script> </script>
<template> <template>
@@ -20,36 +34,13 @@ import LookWithdrawalInformationModal from "../../../components/LookWithdrawalIn
<a-form-item label="提现账户"> <a-form-item label="提现账户">
<a-radio-group> <a-radio-group>
<div class="grid grid-cols-2 gap-[18px]"> <div class="grid grid-cols-2 gap-[18px]">
<a-radio value="1"> <a-radio value="1" v-for="v in withdrawalList">
<div class="flex items-center"> <div class="flex items-center">
<div class="input-card flex w-[306px] items-center"> <div class="input-card flex w-[306px] items-center">
<img class="w-[15px] h-[15px] object-cover test" :src="'123'" alt=""/> <img class="w-[15px] h-[15px] object-cover" :src="v.type === 1 ? ZFBICON : YHKICON"
<div class="ml-[14px]">支付宝</div> alt=""/>
<div class="ml-[12px]">157****7061</div> <div class="ml-[14px]">{{ v.type_text }}</div>
<div class="ml-[12px]">{{ v.mobile }}</div>
<icon-edit class="ml-auto cursor-pointer"/>
</div>
<icon-delete class="ml-[8px]"/>
</div>
</a-radio>
<a-radio value="2">
<div class="flex items-center">
<div class="input-card flex w-[306px] items-center">
<img class="w-[15px] h-[15px] object-cover test" :src="'123'" alt=""/>
<div class="ml-[14px]">支付宝</div>
<div class="ml-[12px]">157****7061</div>
<icon-edit class="ml-auto cursor-pointer"/>
</div>
<icon-delete class="ml-[8px]"/>
</div>
</a-radio>
<a-radio value="3">
<div class="flex items-center">
<div class="input-card flex w-[306px] items-center">
<img class="w-[15px] h-[15px] object-cover test" :src="'123'" alt=""/>
<div class="ml-[14px]">支付宝</div>
<div class="ml-[12px]">157****7061</div>
<icon-edit class="ml-auto cursor-pointer"/> <icon-edit class="ml-auto cursor-pointer"/>
</div> </div>

View File

@@ -1,11 +1,15 @@
<script setup> <script setup>
import {reactive} from 'vue';
import Api from "../../../../../api/index.js"; import Api from "../../../../../api/index.js";
import XSelect from "../../../../../components/XSelect/index.vue"; import XSelect from "../../../../../components/XSelect/index.vue";
import XTimePicker from "../../../../../components/XTimePicker/XTimePicker.vue";
const po = reactive({ const {form} = defineProps({
name: null, form: {
type: Object,
default: {}
}
}); });
const po = defineModel('po');
</script> </script>
<template> <template>
@@ -13,7 +17,7 @@ const po = reactive({
<a-form <a-form
:auto-label-width="true"> :auto-label-width="true">
<a-form-item label="回填时间"> <a-form-item label="回填时间">
<a-time-picker type="time-range"></a-time-picker> <x-time-picker v-model:start="po.start_time" v-model:end="po.end_time"></x-time-picker>
<div class="ml-[6px]">之间</div> <div class="ml-[6px]">之间</div>
<a-button type="primary" class="ml-[38px]">一键快速设置</a-button> <a-button type="primary" class="ml-[38px]">一键快速设置</a-button>
</a-form-item> </a-form-item>
@@ -21,8 +25,9 @@ const po = reactive({
<a-form-item label="回填内容"> <a-form-item label="回填内容">
<XSelect <XSelect
class="w-auto" class="w-auto"
v-model:model-value="po.name" :api-po="{id: form.platform_id}"
:api="Api.system.getSelect"> v-model:model-value="po.content_id"
:api="Api.merchant.getChooseContent">
</XSelect> </XSelect>
</a-form-item> </a-form-item>
</a-form> </a-form>

View File

@@ -6,7 +6,12 @@ import {reactive} from "vue";
const emits = defineEmits(['success']); const emits = defineEmits(['success']);
const po = reactive({ const po = reactive({
name: null, platform_id: null,
material_id: null,
goods_name: '玉桂狗',
goods_intro: '可爱捏',
children_num: 10,
children_price: 10,
}); });
const success = () => { const success = () => {
@@ -25,39 +30,40 @@ const success = () => {
:wrapper-col-props="{span: 12, offset: 1}"> :wrapper-col-props="{span: 12, offset: 1}">
<a-form-item label="投放渠道"> <a-form-item label="投放渠道">
<XSelect <XSelect
v-model:model-value="po.name" v-model:model-value="po.platform_id"
:api="Api.system.getSelect"> :api="Api.merchant.getPlatformList">
</XSelect> </XSelect>
</a-form-item> </a-form-item>
<a-form-item label="素材类型"> <a-form-item label="素材类型">
<XSelect <XSelect
v-model:model-value="po.name" :api-po="{id: po.platform_id}"
:api="Api.system.getSelect"> v-model:model-value="po.material_id"
:api="Api.merchant.getMaterialType">
</XSelect> </XSelect>
</a-form-item> </a-form-item>
<a-form-item label="产品名称"> <a-form-item label="产品名称">
<a-input v-model:model-value="po.name" placeholder="请输入产品名称,如:花露水"></a-input> <a-input v-model:model-value="po.goods_name" placeholder="请输入产品名称,如:花露水"></a-input>
</a-form-item> </a-form-item>
<a-form-item label="产品功效"> <a-form-item label="产品功效">
<a-input v-model:model-value="po.name" placeholder="请输入产品功效,如:驱蚊"></a-input> <a-input v-model:model-value="po.goods_intro" placeholder="请输入产品功效,如:驱蚊"></a-input>
</a-form-item> </a-form-item>
<a-form-item label="包含子任务数量"> <a-form-item label="包含子任务数量">
<a-input v-model:model-value="po.name" <a-input v-model:model-value="po.children_num"
placeholder="请输入代发的账号数量最多一个任务可包含50个子任务"></a-input> placeholder="请输入代发的账号数量最多一个任务可包含50个子任务"></a-input>
</a-form-item> </a-form-item>
<a-form-item label="单个子任务价格"> <a-form-item label="单个子任务价格">
<a-input v-model:model-value="po.name" placeholder="请输入单个子任务价格"></a-input> <a-input v-model:model-value="po.children_price" placeholder="请输入单个子任务价格"></a-input>
</a-form-item> </a-form-item>
<a-form-item label="案例链接"> <a-form-item label="案例链接">
<a-input v-model:model-value="po.name" placeholder="请输入案例链接"> <a-input disabled placeholder="请输入案例链接">
<template #prepend>http://</template> <template #prepend>http://</template>
</a-input> </a-input>
</a-form-item> </a-form-item>
<a-form-item label="素材案例"> <a-form-item label="素材案例">
<div class="flex flex-col gap-[5px]"> <div class="flex flex-col gap-[5px]">
<a-upload :disabled="true" action="/"> <a-upload disabled action="/">
<template #upload-button> <template #upload-button>
<div class="arco-upload-picture-card"> <div class="arco-upload-picture-card">
<div class="arco-upload-picture-card-text"> <div class="arco-upload-picture-card-text">
@@ -73,7 +79,7 @@ const success = () => {
<a-form-item label="任务安全等级"> <a-form-item label="任务安全等级">
<div class="flex flex-col gap-[5px]"> <div class="flex flex-col gap-[5px]">
<div class="flex items-center gap-[36px]"> <div class="flex items-center gap-[36px]">
<a-rate allow-half/> <a-rate allow-half disabled/>
<a-link class="rate-text" :hoverable="false">待评估</a-link> <a-link class="rate-text" :hoverable="false">待评估</a-link>
</div> </div>
<div> <div>
@@ -85,7 +91,7 @@ const success = () => {
<a-form-item label="任务耗时等级"> <a-form-item label="任务耗时等级">
<div class="flex flex-col gap-[5px]"> <div class="flex flex-col gap-[5px]">
<div class="flex items-center gap-[36px]"> <div class="flex items-center gap-[36px]">
<a-rate allow-half/> <a-rate allow-half disabled/>
<a-link class="rate-text" :hoverable="false">待评估</a-link> <a-link class="rate-text" :hoverable="false">待评估</a-link>
</div> </div>
<div> <div>
@@ -101,6 +107,6 @@ const success = () => {
</FormTitle> </FormTitle>
</template> </template>
<style scoped> <style lang="scss" scoped>
</style> </style>

View File

@@ -3,10 +3,17 @@ import Api from "../../../../../api/index.js";
import XSelect from "../../../../../components/XSelect/index.vue"; import XSelect from "../../../../../components/XSelect/index.vue";
import FormTitle from "../../../../../components/FormTitle/index.vue"; import FormTitle from "../../../../../components/FormTitle/index.vue";
import {reactive} from "vue"; import {reactive} from "vue";
import UploadOne from "../../../../../components/upload/UploadOne.vue";
const emits = defineEmits(['success']); const emits = defineEmits(['success', 'prev']);
const po = reactive({ const po = reactive({
name: null, fb_num: null,
is_identical: 1,
duration: null,
special_text: null,
special_images: null,
choose_area: null,
machine: 0,
}); });
const success = () => { const success = () => {
@@ -21,62 +28,55 @@ const success = () => {
<a-form <a-form
class="mt-[30px]" class="mt-[30px]"
:model="po" :model="po"
:label-col-props="{span: 3}" :label-col-props="{span: 4}"
:wrapper-col-props="{span: 12, offset: 1}"> :wrapper-col-props="{span: 12, offset: 1}">
<a-form-item label="发布次数"> <a-form-item label="发布次数">
<XSelect <XSelect
v-model:model-value="po.name" v-model:model-value="po.fb_num"
:api="Api.system.getSelect"> :api="Api.merchant.getNumberOfReleases">
</XSelect> </XSelect>
</a-form-item> </a-form-item>
<a-form-item label="每次素材是否相同"> <a-form-item label="每次素材是否相同">
<a-radio-group> <a-radio-group v-model:model-value="po.is_identical">
<a-radio>相同</a-radio> <a-radio :value="1">相同</a-radio>
<a-radio>不同</a-radio> <a-radio :value="0">不同</a-radio>
</a-radio-group> </a-radio-group>
</a-form-item> </a-form-item>
<a-form-item label="发布次数"> <a-form-item label="每次发布间隔时长">
<XSelect <XSelect
v-model:model-value="po.name" v-model:model-value="po.duration"
:api="Api.system.getSelect"> placeholder="无要求"
:api="Api.merchant.getPublicationDuration">
</XSelect> </XSelect>
</a-form-item> </a-form-item>
<a-form-item label="特殊要求"> <a-form-item label="特殊要求">
<a-input v-model:model-value="po.name" <a-input v-model:model-value="po.special_text"
placeholder="请输入特殊要求,如:请勿截图,必须下载原图再上传到抖音"></a-input> placeholder="请输入特殊要求,如:请勿截图,必须下载原图再上传到抖音"></a-input>
</a-form-item> </a-form-item>
<a-form-item label=""> <a-form-item label="">
<a-upload action="/"> {{ po.special_images }}
<template #upload-button> <upload-one :file="po.special_images" size="100px" :api="Api.system.uploadFile2"></upload-one>
<div class="arco-upload-picture-card">
<div class="arco-upload-picture-card-text">
<IconPlus/>
<div style="margin-top: 10px; font-weight: 600">添加图片</div>
</div>
</div>
</template>
</a-upload>
</a-form-item> </a-form-item>
<a-form-item label="选择限制 IP"> <a-form-item label="选择限制 IP">
<XSelect <XSelect
v-model:model-value="po.name" multiple
:api="Api.system.getSelect"> :max-tag-count="4"
v-model:model-value="po.choose_area"
:api="Api.merchant.getProvince">
</XSelect> </XSelect>
</a-form-item> </a-form-item>
<a-form-item label="每个设备可参加几次"> <a-form-item label="每个设备可参加几次">
<XSelect <a-input-number placeholder="敬请期待" disabled></a-input-number>
v-model:model-value="po.name"
:api="Api.system.getSelect">
</XSelect>
</a-form-item> </a-form-item>
<a-form-item class="mt-[30px]"> <a-form-item class="mt-[30px]">
<a-button class="mr-[24px]" @click="emits('prev')">上一步</a-button>
<a-button type="primary" @click="success">下一步</a-button> <a-button type="primary" @click="success">下一步</a-button>
</a-form-item> </a-form-item>
</a-form> </a-form>

View File

@@ -1,12 +1,11 @@
<script setup> <script setup>
import Api from "../../../../../api/index.js";
import XSelect from "../../../../../components/XSelect/index.vue";
import FormTitle from "../../../../../components/FormTitle/index.vue"; import FormTitle from "../../../../../components/FormTitle/index.vue";
import {reactive} from "vue"; import {reactive} from "vue";
const emits = defineEmits(['success']); const emits = defineEmits(['success', 'prev']);
const po = reactive({ const po = reactive({
name: null, is_comment: 0,
is_top: 0,
}); });
const success = () => { const success = () => {
@@ -25,7 +24,7 @@ const success = () => {
:wrapper-col-props="{span: 12, offset: 1}"> :wrapper-col-props="{span: 12, offset: 1}">
<a-form-item label="是否需要评论" <a-form-item label="是否需要评论"
extra="若您的评论内容有营销属性,有概率不可见。达人可多次尝试,但不可作为扣款理由"> extra="若您的评论内容有营销属性,有概率不可见。达人可多次尝试,但不可作为扣款理由">
<a-radio-group v-model:model-value="po.name"> <a-radio-group v-model:model-value="po.is_comment">
<a-radio :value="0"></a-radio> <a-radio :value="0"></a-radio>
<a-radio :value="1"></a-radio> <a-radio :value="1"></a-radio>
</a-radio-group> </a-radio-group>
@@ -33,7 +32,7 @@ const success = () => {
<a-form-item label="评论是否需要置顶" <a-form-item label="评论是否需要置顶"
extra="若您的评论内容有营销属性,不建议置顶。各个平台置顶评论都由人工审核,有概率置顶不成功且影响流量"> extra="若您的评论内容有营销属性,不建议置顶。各个平台置顶评论都由人工审核,有概率置顶不成功且影响流量">
<a-radio-group v-model:model-value="po.name"> <a-radio-group v-model:model-value="po.is_top">
<a-radio :value="0"></a-radio> <a-radio :value="0"></a-radio>
<a-radio :value="1"></a-radio> <a-radio :value="1"></a-radio>
</a-radio-group> </a-radio-group>
@@ -46,7 +45,8 @@ const success = () => {
placeholder=""></a-input> placeholder=""></a-input>
</a-form-item> </a-form-item>
<a-form-item label="" extra="无需上传,将从商家上传的评论图片中,取第一组素材为案例展示。不允许用户复制或者截图使用,仅作为参考使用"> <a-form-item label=""
extra="无需上传,将从商家上传的评论图片中,取第一组素材为案例展示。不允许用户复制或者截图使用,仅作为参考使用">
<a-upload :disabled="true" action="/"> <a-upload :disabled="true" action="/">
<template #upload-button> <template #upload-button>
<div class="arco-upload-picture-card"> <div class="arco-upload-picture-card">
@@ -59,6 +59,7 @@ const success = () => {
</a-form-item> </a-form-item>
<a-form-item class="mt-[30px]"> <a-form-item class="mt-[30px]">
<a-button class="mr-[24px]" @click="emits('prev')">上一步</a-button>
<a-button type="primary" @click="success">下一步</a-button> <a-button type="primary" @click="success">下一步</a-button>
</a-form-item> </a-form-item>
</a-form> </a-form>

View File

@@ -1,28 +1,38 @@
<script setup> <script setup>
import Api from "../../../../../api/index.js";
import XSelect from "../../../../../components/XSelect/index.vue";
import FormTitle from "../../../../../components/FormTitle/index.vue"; import FormTitle from "../../../../../components/FormTitle/index.vue";
import {reactive} from "vue"; import {reactive} from "vue";
import Backfill from "./Backfill.vue"; import Backfill from "./Backfill.vue";
import {v4} from "uuid"; import {v4} from "uuid";
import XTimePicker from "../../../../../components/XTimePicker/XTimePicker.vue";
const INDEX = ['一', '二', '三']; const {form} = defineProps({
const htList = reactive([]); form: {
htList.push({ type: Object,
id: v4(), default: {}
time: null, }
content: null,
}); });
const emits = defineEmits(['success']); const INDEX = ['一', '二', '三'];
const emits = defineEmits(['success', 'prev']);
const po = reactive({ const po = reactive({
name: null, start_time: null,
end_time: null,
is_other: 0,
backfill: []
});
po.backfill.push({
id: v4(),
start_time: null,
end_time: null,
content_id: null
}); });
const addHT = () => { const addHT = () => {
htList.push({ po.backfill.push({
id: v4(), id: v4(),
time: null, start_time: null,
content: null, end_time: null,
content_id: null
}); });
} }
@@ -39,10 +49,10 @@ const success = () => {
class="mt-[30px]" class="mt-[30px]"
:model="po" :model="po"
label-align="right" label-align="right"
:label-col-props="{span: 3}" :label-col-props="{span: 4}"
:wrapper-col-props="{span: 12, offset: 1}"> :wrapper-col-props="{span: 12, offset: 1}">
<a-form-item label="任务可接时间段" extra="达人可在此时段内接受任务,超出将无法领取任务"> <a-form-item label="任务可接时间段" extra="达人可在此时段内接受任务,超出将无法领取任务">
<a-time-picker type="time-range"></a-time-picker> <x-time-picker v-model:start="po.start_time" v-model:end="po.end_time"></x-time-picker>
</a-form-item> </a-form-item>
<a-form-item extra="*达人未回传,但不能确定素材是否被发布"> <a-form-item extra="*达人未回传,但不能确定素材是否被发布">
@@ -53,18 +63,18 @@ const success = () => {
</div> </div>
</template> </template>
<a-radio-group v-model:model-value="po.name" direction="vertical"> <a-radio-group v-model:model-value="po.is_other" direction="vertical">
<a-radio value="0">该子任务不可被其他达人可领取</a-radio> <a-radio :value="0">该子任务不可被其他达人可领取</a-radio>
<a-radio value="1">该子任务可被其他达人可领取</a-radio> <a-radio :value="1">该子任务可被其他达人可领取</a-radio>
</a-radio-group> </a-radio-group>
</a-form-item> </a-form-item>
<a-form-item <a-form-item
v-for="(item, index) in htList" v-for="(item, index) in po.backfill"
:key="item.id" :key="item.id"
:label="`第${INDEX[index]}次回填`"> :label="`第${INDEX[index]}次回填`">
<div class="flex flex-col gap-[20px]"> <div class="flex flex-col gap-[20px]">
<Backfill></Backfill> <Backfill :form="form" v-model:po="po.backfill[index]"></Backfill>
<div class="flex gap-[8px]"> <div class="flex gap-[8px]">
<a-button type="outline"> <a-button type="outline">
@@ -74,8 +84,8 @@ const success = () => {
查看指引 查看指引
</a-button> </a-button>
<a-button <a-button
v-if="htList.length > 1" v-if="po.backfill.length > 1"
@click="htList.splice(index, 1)" @click="po.backfill.splice(index, 1)"
type="outline" type="outline"
status="danger"> status="danger">
<template #icon> <template #icon>
@@ -84,7 +94,7 @@ const success = () => {
删除 删除
</a-button> </a-button>
<a-button <a-button
v-if="htList.length < 3 && htList.length === index + 1" v-if="po.backfill.length < 3 && po.backfill.length === index + 1"
@click="addHT" @click="addHT"
type="outline"> type="outline">
<template #icon> <template #icon>
@@ -97,6 +107,7 @@ const success = () => {
</a-form-item> </a-form-item>
<a-form-item class="mt-[30px]"> <a-form-item class="mt-[30px]">
<a-button class="mr-[24px]" @click="emits('prev')">上一步</a-button>
<a-button type="primary" @click="success">下一步</a-button> <a-button type="primary" @click="success">下一步</a-button>
</a-form-item> </a-form-item>
</a-form> </a-form>

View File

@@ -1,13 +1,24 @@
<script setup> <script setup>
import FormTitle from "../../../../../components/FormTitle/index.vue"; import FormTitle from "../../../../../components/FormTitle/index.vue";
import {reactive} from "vue"; import {reactive} from "vue";
import MinutesHoursRadio from "../../../../../components/MinutesHoursRadio/index.vue";
import Api from "../../../../../api/index.js"; import Api from "../../../../../api/index.js";
import XSelect from "../../../../../components/XSelect/index.vue"; import XSelect from "../../../../../components/XSelect/index.vue";
const emits = defineEmits(['success']); const emits = defineEmits(['success', 'prev']);
const {form} = defineProps({
form: {
type: Object,
default: {}
}
});
const po = reactive({ const po = reactive({
name: null, retention_time: null,
retention_type: 0,
check_time: null,
check_type: 0,
back_id: null,
back_time: null,
back_type: 0,
}); });
const success = () => { const success = () => {
@@ -26,18 +37,20 @@ const success = () => {
:label-col-props="{span: 3}" :label-col-props="{span: 3}"
:wrapper-col-props="{span: 12, offset: 1}"> :wrapper-col-props="{span: 12, offset: 1}">
<a-form-item label="保留时间" extra="达人发布成功后,该内容需要保留多久才可删除"> <a-form-item label="保留时间" extra="达人发布成功后,该内容需要保留多久才可删除">
<a-input placeholder="请输入保留时间"></a-input> <a-input-number v-model:model-value="po.retention_time" placeholder="请输入保留时间" :min="1"
<a-radio-group type="button" class="ml-[10px] flex-shrink-0"> :max="60"></a-input-number>
<a-radio value="0">分钟</a-radio> <a-radio-group v-model:model-value="po.retention_type" type="button" class="ml-[10px] flex-shrink-0">
<a-radio value="1">小时</a-radio> <a-radio :value="0">分钟</a-radio>
<a-radio :value="1">小时</a-radio>
</a-radio-group> </a-radio-group>
</a-form-item> </a-form-item>
<a-form-item label="审核时间" extra="商家收到每次回填后,多长时间内审核"> <a-form-item label="审核时间" extra="商家收到每次回填后,多长时间内审核">
<a-input placeholder="请输入保留时间"></a-input> <a-input-number v-model:model-value="po.check_time" placeholder="请输入保留时间" :min="1"
<a-radio-group type="button" class="ml-[10px] flex-shrink-0"> :max="60"></a-input-number>
<a-radio value="0">分钟</a-radio> <a-radio-group v-model:model-value="po.check_type" type="button" class="ml-[10px] flex-shrink-0">
<a-radio value="1">小时</a-radio> <a-radio :value="0">分钟</a-radio>
<a-radio :value="1">小时</a-radio>
</a-radio-group> </a-radio-group>
</a-form-item> </a-form-item>
@@ -48,24 +61,26 @@ const success = () => {
达人回传 达人回传
<XSelect <XSelect
class="mx-[6px]" class="mx-[6px]"
v-model:model-value="po.name" :api-po="{id: form.platform_id}"
:api="Api.system.getSelect"> v-model:model-value="po.back_id"
:api="Api.merchant.getChooseContent">
</XSelect> </XSelect>
且审核通过 且审核通过
</a-form-item> </a-form-item>
<a-form-item label="结算时间"> <a-form-item label="结算时间">
<a-input placeholder="请说入时间"></a-input> <a-input v-model:model-value="po.back_time" placeholder="请说入时间"></a-input>
<MinutesHoursRadio class="ml-[10px]"></MinutesHoursRadio> <a-radio-group v-model:model-value="po.back_type" type="button"
class="ml-[10px] flex-shrink-0">
<a-radio :value="0">分钟</a-radio>
<a-radio :value="1">小时</a-radio>
</a-radio-group>
</a-form-item> </a-form-item>
</a-form> </a-form>
</div> </div>
<a-radio-group type="button" class="ml-[10px] flex-shrink-0" style="visibility: hidden">
<a-radio value="0">分钟</a-radio>
<a-radio value="1">小时</a-radio>
</a-radio-group>
</a-form-item> </a-form-item>
<a-form-item class="mt-[30px]"> <a-form-item class="mt-[30px]">
<a-button class="mr-[24px]" @click="emits('prev')">上一步</a-button>
<a-button type="primary" @click="success">下一步</a-button> <a-button type="primary" @click="success">下一步</a-button>
</a-form-item> </a-form-item>
</a-form> </a-form>

View File

@@ -1,27 +1,37 @@
<script setup> <script setup>
import Api from "../../../../../api/index.js";
import XSelect from "../../../../../components/XSelect/index.vue";
import FormTitle from "../../../../../components/FormTitle/index.vue"; import FormTitle from "../../../../../components/FormTitle/index.vue";
import {reactive} from "vue"; import {onMounted, reactive} from "vue";
import {v4} from "uuid"; import {v4} from "uuid";
import Api from "../../../../../api/index.js";
const htList = reactive([]); const settltment_after_list = reactive([]);
const emits = defineEmits(['success']); const emits = defineEmits(['success', 'prev']);
const po = reactive({ const po = reactive({
name: null, settltment_before: [{
id: v4(),
intro: null,
ratio: null,
}],
}); });
const addHT = () => { const addHT = () => {
htList.push({ po.settltment_before.push({
id: v4(), id: v4(),
select: null, intro: null,
money: null, ratio: null,
}); });
} }
const success = () => { const success = () => {
emits('success', po); emits('success', po);
} }
onMounted(() => {
Api.merchant.getSettlementAfter().then(({data}) => {
settltment_after_list.length = 0;
settltment_after_list.push(...data);
});
})
</script> </script>
<template> <template>
@@ -37,33 +47,30 @@ const success = () => {
<a-form-item label="结算前"> <a-form-item label="结算前">
<div class="w-full flex justify-between"> <div class="w-full flex justify-between">
<div class="max-w-[500px] info" v-if="!htList.length>0"> <div class="max-w-[500px] info" v-if="!po.settltment_before.length>0">
*哪种情况少结算及对应的扣除比例当天发其他广告未按照要求评论未按照要求回填建议最少设置一个未按要求发布作品扣款100%的要求 *哪种情况少结算及对应的扣除比例当天发其他广告未按照要求评论未按照要求回填建议最少设置一个未按要求发布作品扣款100%的要求
</div> </div>
<template v-if="htList.length>0"> <template v-if="po.settltment_before.length>0">
<div class="flex flex-col gap-[20px] w-full"> <div class="flex flex-col gap-[20px] w-full">
<div v-for="(item, index) in htList" :key="item.id" <div v-for="(item, index) in po.settltment_before" :key="item.id"
class="flex items-center whitespace-nowrap gap-[5px] w-full justify-between"> class="flex items-center whitespace-nowrap gap-[5px] w-full justify-between">
<XSelect <a-auto-complete v-model:model-value="item.intro"></a-auto-complete>
class="w-auto"
v-model:model-value="po.name"
:api="Api.system.getSelect">
</XSelect>
扣除 扣除
<a-input-number class="w-[150px]"></a-input-number> <a-input-number class="w-[150px]" v-model:model-value="item.ratio"></a-input-number>
%金额 %金额
<div class="ml-auto flex gap-[8px]"> <div class="ml-auto flex gap-[8px]">
<a-button @click="htList.splice(index, 1)" type="outline" status="danger"> <a-button @click="po.settltment_before.splice(index, 1)" type="outline"
status="danger">
<template #icon> <template #icon>
<icon-minus/> <icon-minus/>
</template> </template>
删除 删除
</a-button> </a-button>
<a-button <a-button
:style="{visibility: htList.length === index+1 ? 'visible' : 'hidden'}" :style="{visibility: po.settltment_before.length === index+1 && po.settltment_before.length < 4 ? 'visible' : 'hidden'}"
@click="addHT" @click="addHT"
type="outline"> type="outline">
<template #icon> <template #icon>
@@ -77,22 +84,20 @@ const success = () => {
</template> </template>
<a-button v-if="!htList.length>0" @click="addHT" type="outline">添加</a-button> <a-button v-if="!po.settltment_before.length>0" @click="addHT" type="outline">添加</a-button>
</div> </div>
</a-form-item> </a-form-item>
<a-form-item label="结算后" extra="*如有其他要求,可联系管理员添加"> <a-form-item label="结算后" extra="*如有其他要求,可联系管理员添加">
<div class="max-w-[618px]"> <div class="max-w-[618px]">
<a-checkbox-group> <a-checkbox-group>
<a-checkbox value="1">未到约定期限达人提前删除视频处罚 扣除1点达人信用分</a-checkbox> <a-checkbox v-for="v in settltment_after_list" :value="v.id">{{ v.name }}</a-checkbox>
<a-checkbox value="0">
约定期限内达人不配合删除或者维护评论区扣除1点达人信用分需支付额外费用只保证达人愿意配合
</a-checkbox>
</a-checkbox-group> </a-checkbox-group>
</div> </div>
</a-form-item> </a-form-item>
<a-form-item class="mt-[30px]"> <a-form-item class="mt-[30px]">
<a-button class="mr-[24px]" @click="emits('prev')">上一步</a-button>
<a-button type="primary" @click="success">下一步</a-button> <a-button type="primary" @click="success">下一步</a-button>
</a-form-item> </a-form-item>
</a-form> </a-form>

View File

@@ -1,11 +1,8 @@
<script setup> <script setup>
import Api from "../../../../../api/index.js";
import XSelect from "../../../../../components/XSelect/index.vue";
import FormTitle from "../../../../../components/FormTitle/index.vue"; import FormTitle from "../../../../../components/FormTitle/index.vue";
import {reactive} from "vue"; import {toPath} from "../../../../../utils/index.js";
import {v4} from "uuid";
const emits = defineEmits(['success']); const emits = defineEmits(['success', 'init']);
const success = () => { const success = () => {
emits('success', po); emits('success', po);
@@ -19,8 +16,8 @@ const success = () => {
<a-result title="创建成功" subtitle="任务创建成功" status="success"> <a-result title="创建成功" subtitle="任务创建成功" status="success">
<template #extra> <template #extra>
<a-space> <a-space>
<a-button type="secondary">查看任务</a-button> <a-button type="secondary" @click="toPath('/home/task-center/reward-mission')">查看任务</a-button>
<a-button type="primary">再次创建</a-button> <a-button type="primary" @click="emits('init')">再次创建</a-button>
</a-space> </a-space>
</template> </template>
</a-result> </a-result>

View File

@@ -1,5 +1,5 @@
<script setup> <script setup>
import {ref, reactive} from 'vue'; import {reactive, ref} from 'vue';
import NewTask1 from "./components/new-task-1.vue"; import NewTask1 from "./components/new-task-1.vue";
import NewTask2 from "./components/new-task-2.vue"; import NewTask2 from "./components/new-task-2.vue";
import NewTask3 from "./components/new-task-3.vue"; import NewTask3 from "./components/new-task-3.vue";
@@ -8,14 +8,25 @@ import NewTask5 from "./components/new-task-5.vue";
import NewTask6 from "./components/new-task-6.vue"; import NewTask6 from "./components/new-task-6.vue";
import NewTask7 from "./components/new-task-7.vue"; import NewTask7 from "./components/new-task-7.vue";
import {useRoute} from "vue-router"; import {useRoute} from "vue-router";
import Api from "../../../../api/index.js";
import {deleteObjectFields} from "../../../../utils/index.js";
const routes = useRoute(); const routes = useRoute();
const step = ref(1); const step = ref(7);
const form = reactive({}); const form = reactive({});
const init = () => {
step.value = 1;
deleteObjectFields(form);
}
const success = async (po) => { const success = async (po) => {
Object.assign(form, po); Object.assign(form, po);
if (step.value === 6) {
const {data} = await Api.merchant.createTask(form);
}
if (step.value < 8) { if (step.value < 8) {
step.value++; step.value++;
} }
@@ -24,11 +35,13 @@ const success = async (po) => {
<template> <template>
<div class="mb-[20px]"> <div class="mb-[20px]">
<a-breadcrumb :routes="[{path: '/', label: '任务中心'}, {path: '/', label: '悬赏任务'}, {path: '/', label: '新建任务'}]"> <a-breadcrumb
:routes="[{path: '/', label: '任务中心'}, {path: '/', label: '悬赏任务'}, {path: '/', label: '新建任务'}]">
</a-breadcrumb> </a-breadcrumb>
</div> </div>
<div class="mock-card mb-[20px]"> <div class="mock-card mb-[20px]">
{{ form }}
<a-steps :current="step"> <a-steps :current="step">
<a-step>任务简介</a-step> <a-step>任务简介</a-step>
<a-step>发布管理</a-step> <a-step>发布管理</a-step>
@@ -42,12 +55,12 @@ const success = async (po) => {
<a-card class="flex-grow text-[14px]"> <a-card class="flex-grow text-[14px]">
<new-task1 v-if="step === 1" @success="success"></new-task1> <new-task1 v-if="step === 1" @success="success"></new-task1>
<new-task2 v-if="step === 2" @success="success"></new-task2> <new-task2 v-if="step === 2" @success="success" @prev="step--"></new-task2>
<new-task3 v-if="step === 3" @success="success"></new-task3> <new-task3 v-if="step === 3" @success="success" @prev="step--"></new-task3>
<new-task4 v-if="step === 4" @success="success"></new-task4> <new-task4 v-if="step === 4" @success="success" @prev="step--" :form="form"></new-task4>
<new-task5 v-if="step === 5" @success="success"></new-task5> <new-task5 v-if="step === 5" @success="success" @prev="step--" :form="form"></new-task5>
<new-task6 v-if="step === 6" @success="success"></new-task6> <new-task6 v-if="step === 6" @success="success" @prev="step--"></new-task6>
<new-task7 v-if="step === 7" @success="success"></new-task7> <new-task7 v-if="step === 7" @success="success" @init="init"></new-task7>
</a-card> </a-card>
</template> </template>

View File

@@ -1,5 +1,5 @@
<script setup> <script setup>
import {reactive, computed} from 'vue'; import {computed, reactive} from 'vue';
import Filter from "../../../../components/Filter/index.vue"; import Filter from "../../../../components/Filter/index.vue";
import TooltipTag from "../../../../components/TooltipTag/index.vue"; import TooltipTag from "../../../../components/TooltipTag/index.vue";
import useTableQuery from "../../../../hooks/useTableQuery.js"; import useTableQuery from "../../../../hooks/useTableQuery.js";
@@ -9,11 +9,11 @@ import {toPath} from "../../../../utils/index.js";
const columns = [ const columns = [
{ {
title: '任务编号', title: '任务编号',
dataIndex: 'name', dataIndex: 'code',
}, },
{ {
title: '任务名称', title: '任务名称',
dataIndex: 'name', dataIndex: 'goods_name',
}, },
{ {
title: '发布渠道', title: '发布渠道',
@@ -21,7 +21,7 @@ const columns = [
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'name', dataIndex: 'createtime',
}, },
{ {
title: '当前状态', title: '当前状态',
@@ -30,7 +30,7 @@ const columns = [
}, },
{ {
title: '子任务进度', title: '子任务进度',
dataIndex: 'name', dataIndex: 'end_ratio',
}, },
{ {
title: '消耗金额', title: '消耗金额',
@@ -56,63 +56,35 @@ const columns = [
]; ];
const FilterConfig = computed(() => [ const FilterConfig = computed(() => [
{ {
key: 'wd', key: 'code',
type: 'input', type: 'input',
label: '任务编号', label: '任务编号',
placeholder: '请输入集合编号' placeholder: '请输入集合编号'
}, },
{ {
key: 'wd', key: 'name',
type: 'input', type: 'input',
label: '任务名称', label: '任务名称',
placeholder: '请输入集合名称' placeholder: '请输入集合名称'
}, },
{ {
key: 'wd', key: 'platform',
type: 'select', type: 'select',
label: '任务渠道', label: '任务渠道',
placeholder: '全部', placeholder: '全部',
api: async () => ({ api: async () => Api.merchant.getTaskPlatformList(),
data: [
{
name: '选项一',
id: 1,
},
{
name: '选项二',
id: 2,
},
{
name: '选项三',
id: 3,
},
]
})
}, },
{ {
key: 'wd', key: 'status',
type: 'select', type: 'select',
label: '任务状态', label: '任务状态',
placeholder: '全部', placeholder: '全部',
api: async () => ({ api: async () => Api.merchant.getTaskStatusList(),
data: [
{
name: '选项一',
id: 1,
},
{
name: '选项二',
id: 2,
},
{
name: '选项三',
id: 3,
},
]
})
}, },
{ {
key: 'wd', key: 'datetime',
start: 'start_time',
end: 'end_time',
type: 'datetime', type: 'datetime',
label: '创建时间', label: '创建时间',
placeholder: '全部', placeholder: '全部',
@@ -129,10 +101,9 @@ const po = reactive({
const {loading, pagination, initFetchData} = useTableQuery({ const {loading, pagination, initFetchData} = useTableQuery({
parameter: po, parameter: po,
api: Api.system.getData, api: Api.merchant.getTaskList,
callback: (data) => { callback: (data) => {
Object.assign(vo, data); Object.assign(vo, data);
console.log(vo);
} }
}); });
</script> </script>
@@ -147,7 +118,7 @@ const {loading, pagination, initFetchData} = useTableQuery({
<template #icon> <template #icon>
<icon-plus/> <icon-plus/>
</template> </template>
新建任务 新建任务
</a-button> </a-button>
<a-button> <a-button>
<template #icon> <template #icon>
@@ -167,22 +138,26 @@ const {loading, pagination, initFetchData} = useTableQuery({
:pagination="pagination"> :pagination="pagination">
<template v-slot:status="{record}"> <template v-slot:status="{record}">
<TooltipTag v-if="record.status === 0" color="cyan">待完善</TooltipTag> <TooltipTag v-if="record.status === 0" color="cyan">待完善</TooltipTag>
<TooltipTag v-if="record.status === 1" color="red">未通过</TooltipTag> <TooltipTag v-if="record.status === 1" color="red">审核中</TooltipTag>
<TooltipTag v-if="record.status === -1" color="red">未通过</TooltipTag>
<TooltipTag v-if="record.status === 2" color="magenta">请完善子任务</TooltipTag> <TooltipTag v-if="record.status === 2" color="magenta">请完善子任务</TooltipTag>
<TooltipTag v-if="record.status === 3" color="magenta">待付款</TooltipTag> <TooltipTag v-if="record.status === 3" color="magenta">待付款</TooltipTag>
<TooltipTag v-if="record.status === 4" color="blue">投放中</TooltipTag> <TooltipTag v-if="record.status === 4" color="blue">投放中</TooltipTag>
<TooltipTag v-if="record.status === 5" color="orangered">暂停中</TooltipTag> <TooltipTag v-if="record.status === -2" color="orangered">暂停中</TooltipTag>
<TooltipTag v-if="record.status === 6" color="purple">终止</TooltipTag> <TooltipTag v-if="record.status === -3" color="purple">终止</TooltipTag>
<TooltipTag v-if="record.status === 7" color="green">已完成</TooltipTag> <TooltipTag v-if="record.status === 5" color="green">已完成</TooltipTag>
</template> </template>
<template v-slot:start="{record}"> <template v-slot:start="{record}">
<a-switch></a-switch> <a-switch
:disabled="record.status !== -2 || record.status !== 3"
:model-value="record.status === 4">
</a-switch>
</template> </template>
<template v-slot:money> <template v-slot:money="{record}">
<div class="flex flex-col gap-[8px]"> <div class="flex flex-col gap-[8px]">
<div>120.00 / 600.00(元)</div> <div>{{ record.end_money.toFixed(2) }} / {{ record.total.toFixed(2) }}(元)</div>
<a-progress <a-progress
:percent="200/600" :percent="record.end_money/record.total"
:show-text="false"> :show-text="false">
</a-progress> </a-progress>
</div> </div>

View File

@@ -25,9 +25,16 @@ export const useSystemStore = defineStore("SystemStore", () => {
isRoot.value = _isRoot; isRoot.value = _isRoot;
RoutesTemp.value.length = 0; RoutesTemp.value.length = 0;
// 请求资源 mockRoutes // 请求资源 mockRoutes
const {data} = await Api.admin.getMenu(); if (isRoot.value) { // root
RoutesTemp.value.push(...data); const {data} = await Api.admin.getMenu();
RoutesTemp.value.push(...data);
} else {
const {data} = await Api.merchant.getMenu();
RoutesTemp.value.push(...data);
}
await installRoute(); await installRoute();
} }

View File

@@ -26,7 +26,6 @@ const mockRoutes1 = [
icon: '', icon: '',
meta: { meta: {
name: '任务指派', name: '任务指派',
hidden: true,
}, },
component: 'appointed-task', component: 'appointed-task',
}, },

View File

@@ -21,7 +21,13 @@ export const useUserStore = defineStore("UserStore", () => {
Object.assign(data, _data); Object.assign(data, _data);
} }
} else { // 商户 } else { // 商户
if (form.code) {
// const {data: _data} = await Api.admin.phoneLogin(form);
// Object.assign(data, _data);
} else {
const {data: _data} = await Api.merchant.login(form);
Object.assign(data, _data);
}
} }
// 修改状态 // 修改状态
isLogin.value = true; isLogin.value = true;

View File

@@ -7,3 +7,9 @@ export const toPath = (path) => {
export const VITE_TINYMCE_KEY = () => { export const VITE_TINYMCE_KEY = () => {
return import.meta.env.VITE_TINYMCE_KEY; return import.meta.env.VITE_TINYMCE_KEY;
} }
export const deleteObjectFields = (obj) => {
Object.keys(obj).forEach(key => {
delete obj[key];
});
}