update
This commit is contained in:
@@ -102,7 +102,7 @@ const merchant = {
|
||||
return Promise.resolve({
|
||||
data: [
|
||||
{
|
||||
id: null,
|
||||
id: 0,
|
||||
name: '不选择'
|
||||
},
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ import {Message} from "@arco-design/web-vue";
|
||||
import Api from "../../api/index.ts";
|
||||
import {QrcodeCanvas} from "qrcode.vue";
|
||||
|
||||
const emits = defineEmits(['success']);
|
||||
const {money} = defineProps({
|
||||
money: {
|
||||
type: Number,
|
||||
@@ -54,7 +55,10 @@ const initQR = async () => {
|
||||
watch(
|
||||
() => visible.value,
|
||||
(val) => {
|
||||
if (!val) clearInterval(timer);
|
||||
if (!val) {
|
||||
clearInterval(timer);
|
||||
emits('success');
|
||||
}
|
||||
},
|
||||
{deep: true}
|
||||
)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import {ref} from "vue";
|
||||
import Alipay from "./Alipay.vue";
|
||||
|
||||
const emits = defineEmits(['success']);
|
||||
const visible = ref(false);
|
||||
const money = ref(null);
|
||||
</script>
|
||||
@@ -32,7 +33,7 @@ const money = ref(null);
|
||||
<template v-slot:footer>
|
||||
<div class="flex gap-[24px] justify-end">
|
||||
<a-button @click="visible=false">取消</a-button>
|
||||
<Alipay :money="money">
|
||||
<Alipay :money="money" @success="emits('success')">
|
||||
<a-button type="primary" @click="visible=false">下一步</a-button>
|
||||
</Alipay>
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,6 @@ let successFun = () => {
|
||||
const open = (options) => {
|
||||
const {props, success} = options;
|
||||
successFun = success;
|
||||
console.log('?????', options)
|
||||
payInfo.value = props.payInfo;
|
||||
visible.value = true;
|
||||
}
|
||||
@@ -41,7 +40,7 @@ defineExpose({
|
||||
title="开始任务"
|
||||
v-model:visible="visible">
|
||||
<a-alert>平台提示:该款项不会直接打给达人,只有您对子任务确认结算后,才会打款给达人</a-alert>
|
||||
<div class="px-[30px] py-[16px] flex flex-col gap-[8px] justify-start items-start" v-if="payInfo">
|
||||
<div class="px-[30px] py-[16px] flex flex-col gap-[8px] justify-start items-start" v-if="payInfo && visible">
|
||||
<div class="text-[#4E5969]">支付详情</div>
|
||||
<div class="flex">
|
||||
<div class="w-[100px]">任务金额(元):</div>
|
||||
@@ -64,7 +63,7 @@ defineExpose({
|
||||
<div class="mt-[5px]">
|
||||
<a-radio
|
||||
:disabled="payInfo.user_money < payInfo?.total_money"
|
||||
:default-checked="payInfo.user_money > payInfo?.total_money">
|
||||
:default-checked="payInfo.user_money >= payInfo?.total_money">
|
||||
钱包余额
|
||||
(可用¥{{ payInfo?.user_money?.toFixed(2) }})
|
||||
</a-radio>
|
||||
@@ -72,7 +71,7 @@ defineExpose({
|
||||
<div v-if="payInfo.user_money < payInfo?.total_money" class="text-[12px] text-[#86909C] pl-[20px]">
|
||||
*余额不足本次任务所需,请充值后再进行支付
|
||||
</div>
|
||||
<go-pay>
|
||||
<go-pay @success="">
|
||||
<a-button class="mt-[20px]" type="primary">去充值
|
||||
</a-button>
|
||||
</go-pay>
|
||||
|
||||
@@ -39,6 +39,10 @@ const getState = async () => {
|
||||
id: 2,
|
||||
name: '异常'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '隐藏'
|
||||
},
|
||||
{
|
||||
id: -1,
|
||||
name: '未通过'
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<script setup>
|
||||
import {reactive} from 'vue';
|
||||
import {h, reactive} from 'vue';
|
||||
import Filter from "../../../../components/Filter/index.vue";
|
||||
import useTableQuery from "../../../../hooks/useTableQuery.js";
|
||||
import Api from "../../../../api/index.js";
|
||||
import TaskPassedReviewModal from "./components/TaskPassedReviewModal.vue";
|
||||
import RejectTaskModal from "./components/RejectTaskModal.vue";
|
||||
import TerminateTask from "../../../../components/TerminateTask/TerminateTask.js";
|
||||
import {toPath} from "../../../../utils/index.js";
|
||||
import TooltipTag from "../../../../components/TooltipTag/index.vue";
|
||||
import {Message, Modal} from "@arco-design/web-vue";
|
||||
|
||||
const columns = [
|
||||
{
|
||||
@@ -131,6 +131,25 @@ const {loading, pagination, initFetchData, fetchData} = useTableQuery({
|
||||
Object.assign(vo, data);
|
||||
}
|
||||
});
|
||||
|
||||
const stopTask = async (id) => {
|
||||
Modal.error({
|
||||
width: 460,
|
||||
title: '确认终止任务',
|
||||
content: h('div', {}, [
|
||||
h('div', {}, '终止任务后,后续达人将无法接单,但不影响已经接单的达人'),
|
||||
h('div', {class: 'text-[#4E5969] text-[14px] mt-[4px]'}, '*请商家及时处理已经被接单的子任务,处理完毕后,剩余任务金额将返款至您钱包')
|
||||
]),
|
||||
okText: '确认终止',
|
||||
okButtonProps: {status: "danger"},
|
||||
hideCancel: false,
|
||||
onOk: async () => {
|
||||
const {msg} = await Api.admin.stopTask(id);
|
||||
Message.success(msg);
|
||||
await fetchData();
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -186,7 +205,7 @@ const {loading, pagination, initFetchData, fetchData} = useTableQuery({
|
||||
@success="fetchData"></RejectTaskModal>
|
||||
<a-link :disabled="!(record.status === 4 || record.status === -2)" :hoverable="false"
|
||||
status="danger" class="ml-auto"
|
||||
@click="TerminateTask({taskId: record.id})">终止
|
||||
@click="stopTask(record.id)">终止
|
||||
</a-link>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -2,9 +2,15 @@
|
||||
import {reactive} from "vue";
|
||||
import Alipay from "../../../../../components/Pay/Alipay.vue";
|
||||
|
||||
const emits = defineEmits(['success']);
|
||||
const form = reactive({
|
||||
money: null,
|
||||
});
|
||||
|
||||
const successPay = () => {
|
||||
form.money = null;
|
||||
emits('success');
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -21,7 +27,7 @@ const form = reactive({
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item class="mt-[40px]">
|
||||
<Alipay :money="form.money"></Alipay>
|
||||
<Alipay :money="form.money" @success="successPay"></Alipay>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</template>
|
||||
|
||||
@@ -103,7 +103,7 @@ const po2 = reactive({
|
||||
wd: null,
|
||||
});
|
||||
|
||||
const {loading, pagination, initFetchData} = useTableQuery({
|
||||
const {loading, pagination, initFetchData, fetchData} = useTableQuery({
|
||||
parameter: po,
|
||||
api: Api.merchant.getRechargeLog,
|
||||
callback: (data) => {
|
||||
@@ -136,6 +136,8 @@ const businessInfo = reactive({
|
||||
const getData = async () => {
|
||||
const {data} = await Api.merchant.getBusinessInfo();
|
||||
Object.assign(businessInfo, data);
|
||||
await fetchData();
|
||||
await fetchData2();
|
||||
}
|
||||
onMounted(() => {
|
||||
getData();
|
||||
@@ -177,7 +179,7 @@ onMounted(() => {
|
||||
<a-card>
|
||||
<a-tabs type="rounded" v-model:active-key="activeKey">
|
||||
<a-tab-pane key="Recharge" title="我的充值">
|
||||
<Recharge></Recharge>
|
||||
<Recharge @success="getData"></Recharge>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="Reflect" title="我的提现">
|
||||
<Reflect :businessInfo="businessInfo" @success="getData"></Reflect>
|
||||
|
||||
Reference in New Issue
Block a user