update
This commit is contained in:
2
.env
2
.env
@@ -1,3 +1,3 @@
|
||||
VITE_API_URL=http://192.168.1.105
|
||||
VITE_API_URL=http://admin.ceshi.guo123.cn
|
||||
VITE_TINYMCE_KEY=agmu6i1c6k7bcp36oenzyz7yi1yplptq7goyx88y1g6ofnqu
|
||||
VITE_AES_KEY=st123456654321st
|
||||
|
||||
@@ -294,6 +294,27 @@ const merchant = {
|
||||
method: Method.POST,
|
||||
data: {id}
|
||||
});
|
||||
},
|
||||
getSettlementBefore: async (data) => {
|
||||
return request({
|
||||
url: '/index/task/getSettlementBefore',
|
||||
method: Method.POST,
|
||||
data: data
|
||||
});
|
||||
},
|
||||
getTaskInfo: async (id) => {
|
||||
return request({
|
||||
url: '/index/task/getTaskInfo',
|
||||
method: Method.POST,
|
||||
data: {id}
|
||||
});
|
||||
},
|
||||
editTask: async (data) => {
|
||||
return request({
|
||||
url: '/index/task/editTask',
|
||||
method: Method.POST,
|
||||
data: data
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
55
src/components/XAutoComplete/index.vue
Normal file
55
src/components/XAutoComplete/index.vue
Normal file
@@ -0,0 +1,55 @@
|
||||
<script setup lang="ts">
|
||||
import {onMounted, reactive} from "vue";
|
||||
|
||||
const {api, fieldName, apiPo, init} = defineProps({
|
||||
api: {
|
||||
type: Function,
|
||||
default: async () => {
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
apiPo: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
fieldName: {
|
||||
type: Object,
|
||||
default: {value: 'id', label: 'name'},
|
||||
},
|
||||
init: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
const list = reactive([]);
|
||||
|
||||
const popupChange = async (visible) => {
|
||||
if (visible) {
|
||||
api && api(apiPo).then(({data}) => {
|
||||
list.length = 0;
|
||||
list.push(...data);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
if (init) api && api(apiPo).then(({data}) => {
|
||||
list.length = 0;
|
||||
list.push(...data.map(v => v.name));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-auto-complete
|
||||
v-bind="$attrs"
|
||||
:data="list"
|
||||
:field-names="fieldName"
|
||||
placeholder="请输入或选择">
|
||||
</a-auto-complete>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
26
src/components/XMention/index.vue
Normal file
26
src/components/XMention/index.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<script setup>
|
||||
const {placeholder} = defineProps({
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '请输入话题'
|
||||
}
|
||||
});
|
||||
const emits = defineEmits(['success']);
|
||||
|
||||
const change = (e) => {
|
||||
emits('success', e.split(' '));
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-mention
|
||||
prefix="#"
|
||||
@change="change"
|
||||
:allow-clear="true"
|
||||
:placeholder="placeholder">
|
||||
</a-mention>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup>
|
||||
import {onMounted, reactive} from "vue";
|
||||
|
||||
const {api, fieldName, apiPo, init} = defineProps({
|
||||
const {api, fieldName, apiPo, init, defaultValue} = defineProps({
|
||||
api: {
|
||||
type: Function,
|
||||
default: async () => {
|
||||
@@ -19,7 +19,11 @@ const {api, fieldName, apiPo, init} = defineProps({
|
||||
init: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
}
|
||||
},
|
||||
defaultValue: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
});
|
||||
const list = reactive([]);
|
||||
|
||||
@@ -45,6 +49,7 @@ onMounted(() => {
|
||||
v-bind="$attrs"
|
||||
:options="list"
|
||||
:field-names="fieldName"
|
||||
:default-value="defaultValue"
|
||||
@popup-visible-change="popupChange"
|
||||
placeholder="请选择">
|
||||
</a-select>
|
||||
|
||||
@@ -14,11 +14,13 @@ const value = computed({
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-time-picker
|
||||
<a-range-picker
|
||||
v-model:model-value="value"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
v-bind="$attrs"
|
||||
show-time
|
||||
type="time-range">
|
||||
</a-time-picker>
|
||||
</a-range-picker>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -25,6 +25,7 @@ const po = defineModel('po');
|
||||
<a-form-item label="回填内容">
|
||||
<XSelect
|
||||
class="w-auto"
|
||||
:init="true"
|
||||
:api-po="{id: form.platform_id}"
|
||||
v-model:model-value="po.content_id"
|
||||
:api="Api.merchant.getChooseContent">
|
||||
|
||||
@@ -2,20 +2,12 @@
|
||||
import Api from "../../../../../api/index.js";
|
||||
import XSelect from "../../../../../components/XSelect/index.vue";
|
||||
import FormTitle from "../../../../../components/FormTitle/index.vue";
|
||||
import {reactive} from "vue";
|
||||
|
||||
const emits = defineEmits(['success']);
|
||||
const po = reactive({
|
||||
platform_id: null,
|
||||
material_id: null,
|
||||
goods_name: '玉桂狗',
|
||||
goods_intro: '可爱捏',
|
||||
children_num: 10,
|
||||
children_price: 10,
|
||||
});
|
||||
const form = defineModel('form');
|
||||
|
||||
const success = () => {
|
||||
emits('success', po);
|
||||
emits('success', form.value);
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -25,38 +17,41 @@ const success = () => {
|
||||
|
||||
<a-form
|
||||
class="mt-[30px]"
|
||||
:model="po"
|
||||
:model="form"
|
||||
:label-col-props="{span: 3}"
|
||||
:wrapper-col-props="{span: 12, offset: 1}">
|
||||
<a-form-item label="投放渠道">
|
||||
<XSelect
|
||||
v-model:model-value="po.platform_id"
|
||||
:init="true"
|
||||
v-model:model-value="form.platform_id"
|
||||
:api="Api.merchant.getPlatformList">
|
||||
</XSelect>
|
||||
</a-form-item>
|
||||
<a-form-item label="素材类型">
|
||||
<XSelect
|
||||
:api-po="{id: po.platform_id}"
|
||||
v-model:model-value="po.material_id"
|
||||
:init="true"
|
||||
v-if="form.platform_id"
|
||||
:api-po="{id: form.platform_id}"
|
||||
v-model:model-value="form.material_id"
|
||||
:api="Api.merchant.getMaterialType">
|
||||
</XSelect>
|
||||
</a-form-item>
|
||||
<a-form-item label="产品名称">
|
||||
<a-input v-model:model-value="po.goods_name" placeholder="请输入产品名称,如:花露水"></a-input>
|
||||
<a-input v-model:model-value="form.goods_name" placeholder="请输入产品名称,如:花露水"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="产品功效">
|
||||
<a-input v-model:model-value="po.goods_intro" placeholder="请输入产品功效,如:驱蚊"></a-input>
|
||||
<a-input v-model:model-value="form.goods_intro" placeholder="请输入产品功效,如:驱蚊"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="包含子任务数量">
|
||||
<a-input v-model:model-value="po.children_num"
|
||||
<a-input v-model:model-value="form.children_num"
|
||||
placeholder="请输入代发的账号数量,最多一个任务可包含50个子任务"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="单个子任务价格">
|
||||
<a-input v-model:model-value="po.children_price" placeholder="请输入单个子任务价格"></a-input>
|
||||
<a-input v-model:model-value="form.children_price" placeholder="请输入单个子任务价格"></a-input>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="案例链接">
|
||||
<a-input disabled placeholder="请输入案例链接">
|
||||
<a-input v-model:model-value="form.case_url" placeholder="请输入案例链接">
|
||||
<template #prepend>http://</template>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
|
||||
@@ -2,22 +2,13 @@
|
||||
import Api from "../../../../../api/index.js";
|
||||
import XSelect from "../../../../../components/XSelect/index.vue";
|
||||
import FormTitle from "../../../../../components/FormTitle/index.vue";
|
||||
import {reactive} from "vue";
|
||||
import UploadOne from "../../../../../components/upload/UploadOne.vue";
|
||||
|
||||
const emits = defineEmits(['success', 'prev']);
|
||||
const po = reactive({
|
||||
fb_num: null,
|
||||
is_identical: 1,
|
||||
duration: null,
|
||||
special_text: null,
|
||||
special_images: null,
|
||||
choose_area: null,
|
||||
machine: 0,
|
||||
});
|
||||
const form = defineModel('form');
|
||||
|
||||
const success = () => {
|
||||
emits('success', po);
|
||||
emits('success', form.value);
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -27,18 +18,19 @@ const success = () => {
|
||||
|
||||
<a-form
|
||||
class="mt-[30px]"
|
||||
:model="po"
|
||||
:model="form"
|
||||
:label-col-props="{span: 4}"
|
||||
:wrapper-col-props="{span: 12, offset: 1}">
|
||||
<a-form-item label="发布次数">
|
||||
<XSelect
|
||||
v-model:model-value="po.fb_num"
|
||||
v-model:model-value="form.fb_num"
|
||||
:init="true"
|
||||
:api="Api.merchant.getNumberOfReleases">
|
||||
</XSelect>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="每次素材是否相同">
|
||||
<a-radio-group v-model:model-value="po.is_identical">
|
||||
<a-radio-group v-model:model-value="form.is_identical">
|
||||
<a-radio :value="1">相同</a-radio>
|
||||
<a-radio :value="0">不同</a-radio>
|
||||
</a-radio-group>
|
||||
@@ -46,27 +38,29 @@ const success = () => {
|
||||
|
||||
<a-form-item label="每次发布间隔时长">
|
||||
<XSelect
|
||||
v-model:model-value="po.duration"
|
||||
v-model:model-value="form.duration"
|
||||
placeholder="无要求"
|
||||
:init="true"
|
||||
:api="Api.merchant.getPublicationDuration">
|
||||
</XSelect>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="特殊要求">
|
||||
<a-input v-model:model-value="po.special_text"
|
||||
<a-input v-model:model-value="form.special_text"
|
||||
placeholder="请输入特殊要求,如:请勿截图,必须下载原图再上传到抖音"></a-input>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="">
|
||||
{{ po.special_images }}
|
||||
<upload-one :file="po.special_images" size="100px" :api="Api.system.uploadFile2"></upload-one>
|
||||
{{ form.special_images }}
|
||||
<upload-one :file="form.special_images" size="100px" :api="Api.system.uploadFile2"></upload-one>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="选择限制 IP">
|
||||
<XSelect
|
||||
multiple
|
||||
:max-tag-count="4"
|
||||
v-model:model-value="po.choose_area"
|
||||
:init="true"
|
||||
v-model:model-value="form.choose_area"
|
||||
:api="Api.merchant.getProvince">
|
||||
</XSelect>
|
||||
</a-form-item>
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
<script setup>
|
||||
import FormTitle from "../../../../../components/FormTitle/index.vue";
|
||||
import {reactive} from "vue";
|
||||
|
||||
const emits = defineEmits(['success', 'prev']);
|
||||
const po = reactive({
|
||||
is_comment: 0,
|
||||
is_top: 0,
|
||||
});
|
||||
const form = defineModel('form');
|
||||
|
||||
const success = () => {
|
||||
emits('success', po);
|
||||
emits('success', form.value);
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -19,12 +15,12 @@ const success = () => {
|
||||
|
||||
<a-form
|
||||
class="mt-[30px]"
|
||||
:model="po"
|
||||
:model="form"
|
||||
:label-col-props="{span: 3}"
|
||||
:wrapper-col-props="{span: 12, offset: 1}">
|
||||
<a-form-item label="是否需要评论"
|
||||
extra="若您的评论内容有营销属性,有概率不可见。达人可多次尝试,但不可作为扣款理由">
|
||||
<a-radio-group v-model:model-value="po.is_comment">
|
||||
<a-radio-group v-model:model-value="form.is_comment">
|
||||
<a-radio :value="0">否</a-radio>
|
||||
<a-radio :value="1">是</a-radio>
|
||||
</a-radio-group>
|
||||
@@ -32,7 +28,7 @@ const success = () => {
|
||||
|
||||
<a-form-item label="评论是否需要置顶"
|
||||
extra="若您的评论内容有营销属性,不建议置顶。各个平台置顶评论都由人工审核,有概率置顶不成功且影响流量">
|
||||
<a-radio-group v-model:model-value="po.is_top">
|
||||
<a-radio-group v-model:model-value="form.is_top">
|
||||
<a-radio :value="0">否</a-radio>
|
||||
<a-radio :value="1">是</a-radio>
|
||||
</a-radio-group>
|
||||
@@ -41,7 +37,7 @@ const success = () => {
|
||||
<a-form-item label="评论内容">
|
||||
<a-input
|
||||
disabled
|
||||
v-model:model-value="po.name"
|
||||
v-model:model-value="form.name"
|
||||
placeholder=""></a-input>
|
||||
</a-form-item>
|
||||
|
||||
|
||||
@@ -1,26 +1,14 @@
|
||||
<script setup>
|
||||
import FormTitle from "../../../../../components/FormTitle/index.vue";
|
||||
import {reactive} from "vue";
|
||||
import Backfill from "./Backfill.vue";
|
||||
import {v4} from "uuid";
|
||||
import XTimePicker from "../../../../../components/XTimePicker/XTimePicker.vue";
|
||||
|
||||
const {form} = defineProps({
|
||||
form: {
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
});
|
||||
const INDEX = ['一', '二', '三'];
|
||||
const emits = defineEmits(['success', 'prev']);
|
||||
const po = reactive({
|
||||
start_time: null,
|
||||
end_time: null,
|
||||
is_other: 0,
|
||||
backfill: []
|
||||
});
|
||||
const form = defineModel('form');
|
||||
|
||||
po.backfill.push({
|
||||
form.value.backfill.push({
|
||||
id: v4(),
|
||||
start_time: null,
|
||||
end_time: null,
|
||||
@@ -28,7 +16,7 @@ po.backfill.push({
|
||||
});
|
||||
|
||||
const addHT = () => {
|
||||
po.backfill.push({
|
||||
form.value.backfill.push({
|
||||
id: v4(),
|
||||
start_time: null,
|
||||
end_time: null,
|
||||
@@ -37,7 +25,7 @@ const addHT = () => {
|
||||
}
|
||||
|
||||
const success = () => {
|
||||
emits('success', po);
|
||||
emits('success', form.value);
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -47,12 +35,12 @@ const success = () => {
|
||||
|
||||
<a-form
|
||||
class="mt-[30px]"
|
||||
:model="po"
|
||||
:model="form"
|
||||
label-align="right"
|
||||
:label-col-props="{span: 4}"
|
||||
:wrapper-col-props="{span: 12, offset: 1}">
|
||||
<a-form-item label="任务可接时间段" extra="达人可在此时段内接受任务,超出将无法领取任务">
|
||||
<x-time-picker v-model:start="po.start_time" v-model:end="po.end_time"></x-time-picker>
|
||||
<x-time-picker v-model:start="form.start_time" v-model:end="form.end_time"></x-time-picker>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item extra="*达人未回传,但不能确定素材是否被发布">
|
||||
@@ -63,18 +51,18 @@ const success = () => {
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<a-radio-group v-model:model-value="po.is_other" direction="vertical">
|
||||
<a-radio-group v-model:model-value="form.is_other" direction="vertical">
|
||||
<a-radio :value="0">该子任务不可被其他达人可领取</a-radio>
|
||||
<a-radio :value="1">该子任务可被其他达人可领取</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
|
||||
|
||||
<a-form-item
|
||||
v-for="(item, index) in po.backfill"
|
||||
v-for="(item, index) in form.backfill"
|
||||
:key="item.id"
|
||||
:label="`第${INDEX[index]}次回填`">
|
||||
<div class="flex flex-col gap-[20px]">
|
||||
<Backfill :form="form" v-model:po="po.backfill[index]"></Backfill>
|
||||
<Backfill :form="form" v-model:po="form.backfill[index]"></Backfill>
|
||||
|
||||
<div class="flex gap-[8px]">
|
||||
<a-button type="outline">
|
||||
@@ -84,8 +72,8 @@ const success = () => {
|
||||
查看指引
|
||||
</a-button>
|
||||
<a-button
|
||||
v-if="po.backfill.length > 1"
|
||||
@click="po.backfill.splice(index, 1)"
|
||||
v-if="form.backfill.length > 1"
|
||||
@click="form.backfill.splice(index, 1)"
|
||||
type="outline"
|
||||
status="danger">
|
||||
<template #icon>
|
||||
@@ -94,7 +82,7 @@ const success = () => {
|
||||
删除
|
||||
</a-button>
|
||||
<a-button
|
||||
v-if="po.backfill.length < 3 && po.backfill.length === index + 1"
|
||||
v-if="form.backfill.length < 3 && form.backfill.length === index + 1"
|
||||
@click="addHT"
|
||||
type="outline">
|
||||
<template #icon>
|
||||
|
||||
@@ -1,28 +1,13 @@
|
||||
<script setup>
|
||||
import FormTitle from "../../../../../components/FormTitle/index.vue";
|
||||
import {reactive} from "vue";
|
||||
import Api from "../../../../../api/index.js";
|
||||
import XSelect from "../../../../../components/XSelect/index.vue";
|
||||
|
||||
const emits = defineEmits(['success', 'prev']);
|
||||
const {form} = defineProps({
|
||||
form: {
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
});
|
||||
const po = reactive({
|
||||
retention_time: null,
|
||||
retention_type: 0,
|
||||
check_time: null,
|
||||
check_type: 0,
|
||||
back_id: null,
|
||||
back_time: null,
|
||||
back_type: 0,
|
||||
});
|
||||
const form = defineModel('form');
|
||||
|
||||
const success = () => {
|
||||
emits('success', po);
|
||||
emits('success', form.value);
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -32,23 +17,23 @@ const success = () => {
|
||||
|
||||
<a-form
|
||||
class="mt-[30px]"
|
||||
:model="po"
|
||||
:model="form"
|
||||
label-align="right"
|
||||
:label-col-props="{span: 3}"
|
||||
:wrapper-col-props="{span: 12, offset: 1}">
|
||||
<a-form-item label="保留时间" extra="达人发布成功后,该内容需要保留多久才可删除">
|
||||
<a-input-number v-model:model-value="po.retention_time" placeholder="请输入保留时间" :min="1"
|
||||
<a-input-number v-model:model-value="form.retention_time" placeholder="请输入保留时间" :min="1"
|
||||
:max="60"></a-input-number>
|
||||
<a-radio-group v-model:model-value="po.retention_type" type="button" class="ml-[10px] flex-shrink-0">
|
||||
<a-radio-group v-model:model-value="form.retention_type" type="button" class="ml-[10px] flex-shrink-0">
|
||||
<a-radio :value="1">分钟</a-radio>
|
||||
<a-radio :value="2">小时</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="审核时间" extra="商家收到每次回填后,多长时间内审核">
|
||||
<a-input-number v-model:model-value="po.check_time" placeholder="请输入保留时间" :min="1"
|
||||
<a-input-number v-model:model-value="form.check_time" placeholder="请输入保留时间" :min="1"
|
||||
:max="60"></a-input-number>
|
||||
<a-radio-group v-model:model-value="po.check_type" type="button" class="ml-[10px] flex-shrink-0">
|
||||
<a-radio-group v-model:model-value="form.check_type" type="button" class="ml-[10px] flex-shrink-0">
|
||||
<a-radio :value="1">分钟</a-radio>
|
||||
<a-radio :value="2">小时</a-radio>
|
||||
</a-radio-group>
|
||||
@@ -60,16 +45,19 @@ const success = () => {
|
||||
<a-form-item label="结算条件" class="whitespace-nowrap">
|
||||
达人回传
|
||||
<XSelect
|
||||
disabled
|
||||
class="mx-[6px]"
|
||||
:init="true"
|
||||
:api-po="{id: form.platform_id}"
|
||||
v-model:model-value="po.back_id"
|
||||
:default-value="form.backfill[0].content_id"
|
||||
v-model:model-value="form.back_id"
|
||||
:api="Api.merchant.getChooseContent">
|
||||
</XSelect>
|
||||
且审核通过
|
||||
</a-form-item>
|
||||
<a-form-item label="结算时间">
|
||||
<a-input v-model:model-value="po.back_time" placeholder="请说入时间"></a-input>
|
||||
<a-radio-group v-model:model-value="po.back_type" type="button"
|
||||
<a-input v-model:model-value="form.back_time" placeholder="请说入时间"></a-input>
|
||||
<a-radio-group v-model:model-value="form.back_type" type="button"
|
||||
class="ml-[10px] flex-shrink-0">
|
||||
<a-radio :value="1">分钟</a-radio>
|
||||
<a-radio :value="2">小时</a-radio>
|
||||
|
||||
@@ -1,21 +1,16 @@
|
||||
<script setup>
|
||||
import FormTitle from "../../../../../components/FormTitle/index.vue";
|
||||
import XAutoComplete from "../../../../../components/XAutoComplete/index.vue";
|
||||
import {onMounted, reactive} from "vue";
|
||||
import {v4} from "uuid";
|
||||
import Api from "../../../../../api/index.js";
|
||||
|
||||
const settltment_after_list = reactive([]);
|
||||
const emits = defineEmits(['success', 'prev']);
|
||||
const po = reactive({
|
||||
settltment_before: [{
|
||||
id: v4(),
|
||||
intro: null,
|
||||
ratio: null,
|
||||
}],
|
||||
});
|
||||
const form = defineModel('form');
|
||||
|
||||
const addHT = () => {
|
||||
po.settltment_before.push({
|
||||
form.value.settltment_before.push({
|
||||
id: v4(),
|
||||
intro: null,
|
||||
ratio: null,
|
||||
@@ -23,7 +18,7 @@ const addHT = () => {
|
||||
}
|
||||
|
||||
const success = () => {
|
||||
emits('success', po);
|
||||
emits('success', form.value);
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
@@ -40,29 +35,35 @@ onMounted(() => {
|
||||
|
||||
<a-form
|
||||
class="mt-[30px]"
|
||||
:model="po"
|
||||
:model="form"
|
||||
label-align="right"
|
||||
:label-col-props="{span: 3}"
|
||||
:wrapper-col-props="{span: 12, offset: 1}">
|
||||
|
||||
<a-form-item label="结算前">
|
||||
<div class="w-full flex justify-between">
|
||||
<div class="max-w-[500px] info" v-if="!po.settltment_before.length>0">
|
||||
<div class="max-w-[500px] info" v-if="!form.settltment_before.length>0">
|
||||
*哪种情况少结算,及对应的扣除比例(当天发其他广告、未按照要求评论、未按照要求回填)建议最少设置一个未按要求发布作品,扣款100%的要求
|
||||
</div>
|
||||
|
||||
<template v-if="po.settltment_before.length>0">
|
||||
<template v-if="form.settltment_before.length>0">
|
||||
<div class="flex flex-col gap-[20px] w-full">
|
||||
<div v-for="(item, index) in po.settltment_before" :key="item.id"
|
||||
<div v-for="(item, index) in form.settltment_before" :key="item.id"
|
||||
class="flex items-center whitespace-nowrap gap-[5px] w-full justify-between">
|
||||
当
|
||||
<a-auto-complete v-model:model-value="item.intro"></a-auto-complete>
|
||||
<x-auto-complete
|
||||
v-model:model-value="item.intro"
|
||||
:init="true"
|
||||
:api="Api.merchant.getSettlementBefore"
|
||||
:apiPo="{platform_id: form.platform_id}">
|
||||
</x-auto-complete>
|
||||
时,扣除
|
||||
<a-input-number class="w-[150px]" v-model:model-value="item.ratio"></a-input-number>
|
||||
<a-input-number class="w-[150px]" v-model:model-value="item.ratio"
|
||||
:max="100"></a-input-number>
|
||||
%金额
|
||||
|
||||
<div class="ml-auto flex gap-[8px]">
|
||||
<a-button @click="po.settltment_before.splice(index, 1)" type="outline"
|
||||
<a-button @click="form.settltment_before.splice(index, 1)" type="outline"
|
||||
status="danger">
|
||||
<template #icon>
|
||||
<icon-minus/>
|
||||
@@ -70,7 +71,7 @@ onMounted(() => {
|
||||
删除
|
||||
</a-button>
|
||||
<a-button
|
||||
:style="{visibility: po.settltment_before.length === index+1 && po.settltment_before.length < 4 ? 'visible' : 'hidden'}"
|
||||
:style="{visibility: form.settltment_before.length === index+1 && form.settltment_before.length < 4 ? 'visible' : 'hidden'}"
|
||||
@click="addHT"
|
||||
type="outline">
|
||||
<template #icon>
|
||||
@@ -84,7 +85,7 @@ onMounted(() => {
|
||||
</template>
|
||||
|
||||
|
||||
<a-button v-if="!po.settltment_before.length>0" @click="addHT" type="outline">添加</a-button>
|
||||
<a-button v-if="!form.settltment_before.length>0" @click="addHT" type="outline">添加</a-button>
|
||||
</div>
|
||||
</a-form-item>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import {toPath} from "../../../../../utils/index.js";
|
||||
const emits = defineEmits(['success', 'init']);
|
||||
|
||||
const success = () => {
|
||||
emits('success', po);
|
||||
emits('success');
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import AddMaterial from "../../components/AddMaterial.vue";
|
||||
import AddComment from "../../components/AddComment.vue";
|
||||
import XImageSmallList from "../../../../components/XImage/XImageSmallList.vue";
|
||||
import ViewMaterial from "../../components/ViewMaterial.vue";
|
||||
import XMention from "../../../../components/XMention/index.vue";
|
||||
import {Message} from "@arco-design/web-vue";
|
||||
|
||||
const route = useRoute();
|
||||
@@ -117,11 +118,11 @@ const success = async () => {
|
||||
</template>
|
||||
<template v-slot:tags="{record}">
|
||||
<div class="flex flex-col gap-[12px]">
|
||||
<a-input
|
||||
v-for="v in record.childrenMaterial"
|
||||
<x-mention
|
||||
placeholder="请输入话题"
|
||||
v-model:model-value="v.tags">
|
||||
</a-input>
|
||||
@success="(e) => v.tags = e"
|
||||
v-for="v in record.childrenMaterial">
|
||||
</x-mention>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:material="{record, rowIndex}">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup>
|
||||
import {reactive, ref} from 'vue';
|
||||
import {onMounted, reactive, ref} from 'vue';
|
||||
import NewTask1 from "./components/new-task-1.vue";
|
||||
import NewTask2 from "./components/new-task-2.vue";
|
||||
import NewTask3 from "./components/new-task-3.vue";
|
||||
@@ -10,10 +10,52 @@ import NewTask7 from "./components/new-task-7.vue";
|
||||
import {useRoute} from "vue-router";
|
||||
import Api from "../../../../api/index.js";
|
||||
import {deleteObjectFields} from "../../../../utils/index.js";
|
||||
import {v4} from "uuid";
|
||||
import {Message} from "@arco-design/web-vue";
|
||||
|
||||
const routes = useRoute();
|
||||
const step = ref(1);
|
||||
const form = reactive({});
|
||||
const form = reactive({
|
||||
id: null,
|
||||
|
||||
platform_id: null,
|
||||
case_url: null,
|
||||
material_id: null,
|
||||
goods_name: '玉桂狗',
|
||||
goods_intro: '可爱捏',
|
||||
children_num: 10,
|
||||
children_price: 10,
|
||||
|
||||
fb_num: null,
|
||||
is_identical: 1,
|
||||
duration: null,
|
||||
special_text: null,
|
||||
special_images: null,
|
||||
choose_area: null,
|
||||
machine: 0,
|
||||
|
||||
is_comment: 0,
|
||||
is_top: 0,
|
||||
|
||||
start_time: null,
|
||||
end_time: null,
|
||||
is_other: 0,
|
||||
backfill: [],
|
||||
|
||||
retention_time: null,
|
||||
retention_type: 0,
|
||||
check_time: null,
|
||||
check_type: 0,
|
||||
back_id: null,
|
||||
back_time: null,
|
||||
back_type: 0,
|
||||
|
||||
settltment_before: [{
|
||||
id: v4(),
|
||||
intro: null,
|
||||
ratio: null,
|
||||
}],
|
||||
});
|
||||
|
||||
const init = () => {
|
||||
step.value = 1;
|
||||
@@ -21,16 +63,29 @@ const init = () => {
|
||||
}
|
||||
|
||||
const success = async (po) => {
|
||||
Object.assign(form, po);
|
||||
|
||||
if (step.value === 6) {
|
||||
const {data} = await Api.merchant.createTask(form);
|
||||
if (form.id) {
|
||||
const {msg} = await Api.merchant.editTask(form);
|
||||
Message.success(msg);
|
||||
} else {
|
||||
const {data} = await Api.merchant.createTask(form);
|
||||
}
|
||||
}
|
||||
|
||||
if (step.value < 8) {
|
||||
step.value++;
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
const {id} = routes.query;
|
||||
if (id) Api.merchant.getTaskInfo(id).then(({data}) => {
|
||||
Object.assign(form, data);
|
||||
form.choose_area = data.choose_area_arr.map(v => Number(v));
|
||||
form.backfill = data.back;
|
||||
form.settltment_before = data.before.map(v => ({...v, ratio: Number(v.ratio)}));
|
||||
});
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -53,12 +108,12 @@ const success = async (po) => {
|
||||
</div>
|
||||
|
||||
<a-card class="flex-grow text-[14px]">
|
||||
<new-task1 v-if="step === 1" @success="success"></new-task1>
|
||||
<new-task2 v-if="step === 2" @success="success" @prev="step--"></new-task2>
|
||||
<new-task3 v-if="step === 3" @success="success" @prev="step--"></new-task3>
|
||||
<new-task4 v-if="step === 4" @success="success" @prev="step--" :form="form"></new-task4>
|
||||
<new-task5 v-if="step === 5" @success="success" @prev="step--" :form="form"></new-task5>
|
||||
<new-task6 v-if="step === 6" @success="success" @prev="step--"></new-task6>
|
||||
<new-task1 v-if="step === 1" @success="success" v-model:form="form"></new-task1>
|
||||
<new-task2 v-if="step === 2" @success="success" @prev="step--" v-model:form="form"></new-task2>
|
||||
<new-task3 v-if="step === 3" @success="success" @prev="step--" v-model:form="form"></new-task3>
|
||||
<new-task4 v-if="step === 4" @success="success" @prev="step--" v-model:form="form"></new-task4>
|
||||
<new-task5 v-if="step === 5" @success="success" @prev="step--" v-model:form="form"></new-task5>
|
||||
<new-task6 v-if="step === 6" @success="success" @prev="step--" v-model:form="form"></new-task6>
|
||||
<new-task7 v-if="step === 7" @success="success" @init="init"></new-task7>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
@@ -198,7 +198,8 @@ const stopTask = async (id) => {
|
||||
</template>
|
||||
<template v-slot:action="{record}">
|
||||
<div class="flex gap-[16px]">
|
||||
<a-link :hoverable="false">编辑</a-link>
|
||||
<a-link :hoverable="false" @click="toPath('/home/task-center/new-task', {id: record.id})">编辑
|
||||
</a-link>
|
||||
<a-link :hoverable="false"
|
||||
@click="record.status >= 2 ? toPath('/home/task-center/look-min-task', {id: record.id}) : Message.warning('审核未通过')">
|
||||
查看子任务
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user