update
This commit is contained in:
@@ -561,6 +561,20 @@ const merchant = {
|
||||
data: data
|
||||
});
|
||||
},
|
||||
finshReply: async (data) => {
|
||||
return request({
|
||||
url: '/index/task/finshReply',
|
||||
method: Method.POST,
|
||||
data: data
|
||||
});
|
||||
},
|
||||
getBackinfo: async (data) => {
|
||||
return request({
|
||||
url: '/index/task/getBackinfo',
|
||||
method: Method.POST,
|
||||
data: data
|
||||
});
|
||||
},
|
||||
}
|
||||
|
||||
export default merchant;
|
||||
|
||||
@@ -19,6 +19,7 @@ const {task} = defineProps({
|
||||
default: {}
|
||||
}
|
||||
});
|
||||
let tempPage = 0;
|
||||
const po = reactive({
|
||||
id: task.id,
|
||||
});
|
||||
@@ -38,9 +39,16 @@ const {loading, pagination, initFetchData, fetchData} = useTableQuery({
|
||||
callback: (data) => {
|
||||
if (data.rows.length === 0) {
|
||||
} else {
|
||||
tempPage = pagination.current;
|
||||
vo.info = data.info;
|
||||
vo.total = data.total;
|
||||
vo.rows.push(...data.rows);
|
||||
vo.rows = Array.from(
|
||||
vo.rows.reduce((map, item) => {
|
||||
map.set(item.id, item);
|
||||
return map;
|
||||
}, new Map()).values()
|
||||
)
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -53,7 +61,7 @@ const send = async () => {
|
||||
Message.success(msg);
|
||||
form.content = null;
|
||||
form.images.length = 0;
|
||||
await fetchData();
|
||||
pagination.current = tempPage;
|
||||
}
|
||||
|
||||
const handleScroll = ({target}) => {
|
||||
@@ -96,6 +104,10 @@ const addIntervention = async () => {
|
||||
</x-image>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
:class="[v.status===0?'text_warn':'',v.status===1?'text_success':'',v.status===-1?'text_error':'', 'text_info']">
|
||||
{{ v.status_text }}
|
||||
</div>
|
||||
<div class="msg-state text-[14px] text-[#1D2129] mt-[4px]">
|
||||
已读
|
||||
</div>
|
||||
@@ -220,4 +232,21 @@ const addIntervention = async () => {
|
||||
.chat-left {
|
||||
|
||||
}
|
||||
|
||||
.text_info {
|
||||
font-size: 12px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.text_success {
|
||||
color: rgba(0, 180, 42, 1);
|
||||
}
|
||||
|
||||
.text_warn {
|
||||
color: rgba(255, 125, 0, 1);
|
||||
}
|
||||
|
||||
.text_error {
|
||||
color: rgba(245, 63, 63, 1);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
<script setup>
|
||||
import {ref} from "vue";
|
||||
import XSelect from "../XSelect/index.vue";
|
||||
import Information from "./Information.vue";
|
||||
import dayjs from "dayjs";
|
||||
import Api from "../../api/index.js";
|
||||
import {Message} from "@arco-design/web-vue";
|
||||
|
||||
const InformationRef = ref();
|
||||
const {task} = defineProps({
|
||||
task: {
|
||||
type: Object,
|
||||
@@ -11,6 +15,28 @@ const {task} = defineProps({
|
||||
});
|
||||
const visible = defineModel('visible');
|
||||
const emits = defineEmits(['success']);
|
||||
|
||||
const getStatus = () => Promise.resolve({
|
||||
data: [
|
||||
{
|
||||
id: 0,
|
||||
name: '待回复',
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '已回复',
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
const changeStatus = async () => {
|
||||
const {msg} = await Api.merchant.finshReply({
|
||||
id: task.id,
|
||||
status: 1,
|
||||
});
|
||||
Message.success(msg);
|
||||
emits('success');
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -26,12 +52,14 @@ const emits = defineEmits(['success']);
|
||||
</a-alert>
|
||||
<div class="flex">
|
||||
<div class="p-[20px] bg-[#F2F3F5] flex-grow min-h-[800px] relative">
|
||||
<Information :task="task" v-if="task?.id" @success="emits('success')"></Information>
|
||||
<Information ref="InformationRef" :task="task" v-if="visible && task?.id"
|
||||
@success="emits('success')"></Information>
|
||||
</div>
|
||||
<div class="w-[280px] h-auto flex flex-col bg-[#F2F3F5] gap-[20px]" v-if="task">
|
||||
<div class="bg-white p-[20px]">
|
||||
<div class="mb-[20px] text-[16px]">进度管理</div>
|
||||
<x-select placeholder="待回复" api=""></x-select>
|
||||
<x-select v-model:model-value="task.is_reply" placeholder="待回复" :api="getStatus"
|
||||
@change="changeStatus" :init="true"></x-select>
|
||||
<a-divider></a-divider>
|
||||
<div class="mb-[20px] text-[16px]">进度管理</div>
|
||||
<div class="grid grid-cols-2 gap-y-[12px]">
|
||||
|
||||
@@ -34,7 +34,7 @@ watch(
|
||||
if (val) {
|
||||
MaterialSourceRef.value.getMaterialList();
|
||||
targetList.length = 0;
|
||||
material.material.forEach(v => uploadSuccess(v));
|
||||
material.material?.forEach(v => uploadSuccess(v));
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
80
src/pages/merchant/components/FastSetting.vue
Normal file
80
src/pages/merchant/components/FastSetting.vue
Normal file
@@ -0,0 +1,80 @@
|
||||
<script setup>
|
||||
import {reactive, ref} from "vue";
|
||||
import {Message} from "@arco-design/web-vue";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const visible = ref(false);
|
||||
const emits = defineEmits(['success']);
|
||||
const {startTime, endTime} = defineProps({
|
||||
startTime: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
endTime: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
});
|
||||
|
||||
const form = reactive({
|
||||
startTime: null,
|
||||
type: 0,
|
||||
diff: 30,
|
||||
endTime: null,
|
||||
});
|
||||
|
||||
const setTime = () => {
|
||||
const unit = form.type === 0 ? 'minute' : 'hour';
|
||||
form.startTime = dayjs(startTime).add(form.diff, unit).format('YYYY-MM-DD HH:mm');
|
||||
form.endTime = dayjs(endTime).add(form.diff, unit).format('YYYY-MM-DD HH:mm');
|
||||
}
|
||||
|
||||
const open = () => {
|
||||
if (startTime === null || endTime === null) {
|
||||
Message.warning('请先设置任务时间段');
|
||||
return;
|
||||
}
|
||||
visible.value = true;
|
||||
setTime();
|
||||
}
|
||||
|
||||
const success = () => {
|
||||
emits('success', form);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div @click="open">
|
||||
<slot></slot>
|
||||
</div>
|
||||
|
||||
<a-modal
|
||||
@ok="success"
|
||||
title="快速设置"
|
||||
title-align="start"
|
||||
v-model:visible="visible">
|
||||
<a-form layout="vertical">
|
||||
<a-form-item label="任务可接时间段">
|
||||
<a-input disabled v-model:model-value="form.startTime"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="在任务可接时段的开始时间和结束时间,各自增加">
|
||||
<div class="flex w-full gap-3">
|
||||
<a-input-number :precision="0" :min="0" v-model:model-value="form.diff"
|
||||
@change="setTime"></a-input-number>
|
||||
<a-radio-group type="button" class="flex-shrink-0" v-model:model-value="form.type"
|
||||
@change="setTime">
|
||||
<a-radio :value="0">分钟</a-radio>
|
||||
<a-radio :value="1">小时</a-radio>
|
||||
</a-radio-group>
|
||||
</div>
|
||||
</a-form-item>
|
||||
<a-form-item label="回填时间段为" v-model:model-value="form.endTime">
|
||||
<a-input disabled v-model:model-value="form.endTime"></a-input>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
@@ -34,7 +34,7 @@ const edit = () => {
|
||||
title-align="start"
|
||||
title="素材">
|
||||
<div class="grid grid-cols-4">
|
||||
<div v-for="(v, index) in material.material_arr" :key="index"
|
||||
<div v-for="(v, index) in material.material" :key="index"
|
||||
class="flex flex-col justify-center items-center gap-[10px]">
|
||||
<x-image :src="v" :hide-delete="true"></x-image>
|
||||
素材{{ index }}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<script setup>
|
||||
import {ref} from 'vue';
|
||||
import {reactive, ref} from 'vue';
|
||||
import RefuseModal from "../../task-center/components/RefuseModal.vue";
|
||||
import OriginTag from "../../../../../components/OriginTag/index.vue";
|
||||
import Api from "../../../../../api/index.js";
|
||||
import {Message} from "@arco-design/web-vue";
|
||||
|
||||
const columns = [
|
||||
{
|
||||
@@ -20,38 +22,86 @@ const columns = [
|
||||
slotName: 'backStatus',
|
||||
},
|
||||
];
|
||||
const {item} = defineProps({
|
||||
item: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
});
|
||||
const visible = ref(false);
|
||||
const data = reactive([]);
|
||||
|
||||
const getData = async () => {
|
||||
const {data: _data} = await Api.merchant.getBackinfo({id: item.id});
|
||||
data.length = 0;
|
||||
data.push(..._data);
|
||||
}
|
||||
|
||||
const passTask = async (id, task_backfill_id) => {
|
||||
const {msg} = await Api.merchant.passTask({
|
||||
id: id,
|
||||
task_backfill_id: task_backfill_id,
|
||||
});
|
||||
Message.success(msg);
|
||||
await getData();
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-link :hoverable="false" @click="visible=true">查看回填</a-link>
|
||||
<a-link :hoverable="false" @click="() => {
|
||||
visible=true;
|
||||
getData();
|
||||
}">查看回填
|
||||
</a-link>
|
||||
|
||||
<a-modal
|
||||
title-align="start"
|
||||
title="查看回填"
|
||||
:width="800"
|
||||
v-model:visible="visible">
|
||||
<a-table
|
||||
:pagination="false"
|
||||
:data="[{},{}]"
|
||||
:data="data"
|
||||
:columns="columns">
|
||||
<template v-slot:backData>
|
||||
<a-link :hoverable="false" href="https://baidu.com">https://baidu.com</a-link>
|
||||
</template>
|
||||
|
||||
<template v-slot:action>
|
||||
<div class="flex gap-[16px] justify-center items-center">
|
||||
<a-link :hoverable="false" status="success">通过</a-link>
|
||||
|
||||
<RefuseModal></RefuseModal>
|
||||
<template v-slot:backData="{record}">
|
||||
<div class="flex flex-col">
|
||||
<a-link v-for="v in record.back.content_arr" :hoverable="false" :href="v">{{ v }}</a-link>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-slot:backStatus>
|
||||
<template v-slot:action="{record}">
|
||||
<div class="flex gap-[16px] justify-center items-center">
|
||||
<a-popconfirm content="确定通过吗?" @ok="passTask(item.id, record.back.id)">
|
||||
<a-link :hoverable="false" status="success"
|
||||
:disabled="!(record.back_status===2)">通过
|
||||
</a-link>
|
||||
</a-popconfirm>
|
||||
|
||||
<RefuseModal :taskId="item.id"
|
||||
:task="record"
|
||||
@success="getData"
|
||||
:disabled="!(record.back_status===2)"></RefuseModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-slot:backStatus="{record}">
|
||||
<div>
|
||||
<OriginTag color="rgb(var(--success-6))">已通过</OriginTag>
|
||||
<OriginTag color="rgb(var(--orange-6))">在此之前完成审核</OriginTag>
|
||||
<OriginTag color="rgb(var(--arcoblue-6))">等待回填</OriginTag>
|
||||
<OriginTag color="var(--color-neutral-4)">/</OriginTag>
|
||||
<OriginTag color="var(--color-neutral-4)" v-if="record.back_status === 0">
|
||||
\
|
||||
</OriginTag>
|
||||
<OriginTag color="rgb(var(--arcoblue-6))"
|
||||
v-if="record.back_status === 1 || record.back_status === 5">
|
||||
{{ record.back_status_text }}
|
||||
</OriginTag>
|
||||
<OriginTag color="rgb(var(--success-6))" v-if="record.back_status === 2">
|
||||
{{ record.back_status_text }}
|
||||
</OriginTag>
|
||||
<OriginTag color="rgb(var(--orange-6))" v-if="record.back_status === 3">
|
||||
{{ record.back_status_text }}
|
||||
</OriginTag>
|
||||
<OriginTag color="rgb(var(--danger-6))" v-if="record.back_status === 4">
|
||||
{{ record.back_status_text }}
|
||||
</OriginTag>
|
||||
</div>
|
||||
</template>
|
||||
</a-table>
|
||||
|
||||
@@ -5,6 +5,7 @@ import useTableQuery from "../../../../hooks/useTableQuery.js";
|
||||
import Api from "../../../../api/index.js";
|
||||
import LookBackfillModal from "./components/look-backfill-modal.vue";
|
||||
import Chat from "../../../../components/Chat/index.vue";
|
||||
import Settlement from "../task-center/components/Settlement.vue";
|
||||
|
||||
const columns = [
|
||||
{
|
||||
@@ -165,8 +166,8 @@ const {loading, pagination, initFetchData} = useTableQuery({
|
||||
已完成
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:htsj>
|
||||
<look-backfill-modal></look-backfill-modal>
|
||||
<template v-slot:htsj="{record}">
|
||||
<look-backfill-modal :item="record"></look-backfill-modal>
|
||||
</template>
|
||||
<template v-slot:drfk="{record}">
|
||||
<a-badge :count="record.is_read" dot :dotStyle="{ width: '10px', height: '10px' }">
|
||||
@@ -178,9 +179,8 @@ const {loading, pagination, initFetchData} = useTableQuery({
|
||||
</a-link>
|
||||
</a-badge>
|
||||
</template>
|
||||
<template v-slot:zfzt="{rowIndex}">
|
||||
<a-link v-if="rowIndex%2===0" :hoverable="false" status="success">确认结算</a-link>
|
||||
<a-link v-else :hoverable="false" status="success" disabled>已结算</a-link>
|
||||
<template v-slot:zfzt="{record}">
|
||||
<settlement :task="record" :disabled="record.is_settlement > 0"></settlement>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@ import Api from "../../../../../api/index.js";
|
||||
import XSelect from "../../../../../components/XSelect/index.vue";
|
||||
import XTimePicker from "../../../../../components/XTimePicker/XTimePicker.vue";
|
||||
import {dayjs} from "@arco-design/web-vue/es/_utils/date.js";
|
||||
import FastSetting from "../../../components/FastSetting.vue";
|
||||
|
||||
const {form, index} = defineProps({
|
||||
form: {
|
||||
@@ -44,7 +45,12 @@ const getDisabledTime = (date) => {
|
||||
v-model:end="po.end_time">
|
||||
</x-time-picker>
|
||||
<div class="ml-[6px]">之间</div>
|
||||
<a-button type="primary" class="ml-[38px]">一键快速设置</a-button>
|
||||
<FastSetting :start-time="form.start_time" :end-time="form.end_time" @success="(val) => {
|
||||
po.start_time = val.startTime;
|
||||
po.end_time = val.endTime;
|
||||
}">
|
||||
<a-button type="primary" class="ml-[38px]">一键快速设置</a-button>
|
||||
</FastSetting>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="回填内容">
|
||||
|
||||
@@ -88,7 +88,7 @@ defineExpose({
|
||||
</a-textarea>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="其他原因截图" field="refund_images">
|
||||
<a-form-item label="拒绝原因截图" field="refund_images">
|
||||
<div class="flex gap-[12px]">
|
||||
<x-image
|
||||
class="flex-shrink-0"
|
||||
|
||||
@@ -13,6 +13,7 @@ import {Message} from "@arco-design/web-vue";
|
||||
import EffectManagementModal from "./components/effectManagementModal.vue";
|
||||
import Settlement from "./components/Settlement.vue";
|
||||
import Chat from "../../../../components/Chat/index.vue";
|
||||
import TooltipTag from "../../../../components/TooltipTag/index.vue";
|
||||
|
||||
const route = useRoute();
|
||||
const taskId = ref(null);
|
||||
@@ -136,13 +137,21 @@ const passTask = async (id, task_backfill_id) => {
|
||||
:columns="columns"
|
||||
class="w-full mt-[20px]">
|
||||
<template v-slot:status="{record}">
|
||||
<a-tag v-if="record.status === 0" color="red">待上传素材</a-tag>
|
||||
<a-tag v-if="record.status === 1" color="orangered">素材审核中</a-tag>
|
||||
<a-tag v-if="record.status === 2" color="orangered">重新上传素材</a-tag>
|
||||
<a-tag v-if="record.status === 3" color="gray">待领取</a-tag>
|
||||
<a-tag v-if="record.status === 4" color="green">已领取</a-tag>
|
||||
<a-tag v-if="record.status === 5" color="green">已结算</a-tag>
|
||||
<a-tag v-if="record.status === 6" color="arcoblue">已终止</a-tag>
|
||||
<TooltipTag v-if="record.status === 0" color="red" :content="record.check_remark">待上传素材
|
||||
</TooltipTag>
|
||||
<TooltipTag v-if="record.status === 1" color="orangered" :content="record.check_remark">素材审核中
|
||||
</TooltipTag>
|
||||
<TooltipTag v-if="record.status === 2" color="orangered" :content="record.check_remark">
|
||||
重新上传素材
|
||||
</TooltipTag>
|
||||
<TooltipTag v-if="record.status === 3" color="gray" :content="record.check_remark">待领取
|
||||
</TooltipTag>
|
||||
<TooltipTag v-if="record.status === 4" color="green" :content="record.check_remark">已领取
|
||||
</TooltipTag>
|
||||
<TooltipTag v-if="record.status === 5" color="green" :content="record.check_remark">已结算
|
||||
</TooltipTag>
|
||||
<TooltipTag v-if="record.status === 6" color="arcoblue" :content="record.check_remark">已终止
|
||||
</TooltipTag>
|
||||
</template>
|
||||
|
||||
<template v-slot:content="{record}">
|
||||
@@ -160,12 +169,12 @@ const passTask = async (id, task_backfill_id) => {
|
||||
<div class="flex gap-[16px] justify-center items-center">
|
||||
<a-popconfirm content="确定通过吗?" @ok="passTask(record.id, item.back.id)">
|
||||
<a-link :hoverable="false" status="success"
|
||||
:disabled="!(item.back_status===2 || item.back_status===4)">通过
|
||||
:disabled="!(item.back_status===2)">通过
|
||||
</a-link>
|
||||
</a-popconfirm>
|
||||
|
||||
<RefuseModal :taskId="record.id" :task="item" @success="fetchData"
|
||||
:disabled="!(item.back_status===2 || item.back_status===4)"></RefuseModal>
|
||||
:disabled="!(item.back_status===2)"></RefuseModal>
|
||||
</div>
|
||||
<a-divider v-if="index+1 !== record.task_content.length"></a-divider>
|
||||
</div>
|
||||
@@ -177,7 +186,8 @@ const passTask = async (id, task_backfill_id) => {
|
||||
<OriginTag color="var(--color-neutral-4)" v-if="item.back_status === 0">
|
||||
\
|
||||
</OriginTag>
|
||||
<OriginTag color="rgb(var(--arcoblue-6))" v-if="item.back_status === 1">
|
||||
<OriginTag color="rgb(var(--arcoblue-6))"
|
||||
v-if="item.back_status === 1 || item.back_status === 5">
|
||||
{{ item.back_status_text }}
|
||||
</OriginTag>
|
||||
<OriginTag color="rgb(var(--success-6))" v-if="item.back_status === 2">
|
||||
|
||||
@@ -92,6 +92,7 @@ const success = async () => {
|
||||
data: vo.rows.filter(v => v.status !== 1).map(v => v.childrenMaterial.map(k => ({
|
||||
id: k.id,
|
||||
title: k.title,
|
||||
material: k.material,
|
||||
content: k.content,
|
||||
tags: k.tags,
|
||||
}))).flat()
|
||||
@@ -147,7 +148,7 @@ const success = async () => {
|
||||
<div class="flex gap-[12px]" v-for="v in record.childrenMaterial">
|
||||
<add-material
|
||||
ref="AddMaterialRef"
|
||||
@success="fetchData"
|
||||
@success="val => v.material = val"
|
||||
:id="po.id"
|
||||
:material="v">
|
||||
<div class="add-materials">
|
||||
@@ -161,8 +162,8 @@ const success = async () => {
|
||||
:id="po.id">
|
||||
<x-image-small-list
|
||||
:preview="false"
|
||||
v-if="v.material_arr.length>0"
|
||||
:list="v.material_arr">
|
||||
v-if="v.material.length>0"
|
||||
:list="v.material">
|
||||
</x-image-small-list>
|
||||
</view-material>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user