fix: 挂账管理更新,邀请列表更新,店铺配置更新

This commit is contained in:
2025-03-10 18:33:42 +08:00
parent 34068cf8dd
commit 89fe9b7639
31 changed files with 3292 additions and 202 deletions

View File

@@ -0,0 +1,218 @@
<template>
<div>
<el-dialog
title="账单还款记录"
v-model="dialogVisible"
:close-on-click-modal="false"
width="70%"
@close="reset"
>
<div class="search">
<el-form :model="query" inline label-position="left">
<el-form-item>
<el-input v-model="query.paymentMethod" placeholder="支付方式" style="" />
</el-form-item>
<el-form-item>
<el-button @click="reset">重置</el-button>
<el-button type="primary" @click="getTableData">查询</el-button>
</el-form-item>
</el-form>
</div>
<div class="head-container">
<el-table v-loading="tableData.loading" :data="tableData.data">
<el-table-column label="支付方式" prpo="paymentMethod">
<template v-slot="scope">
<div>{{ scope.row.paymentMethod ? scope.row.paymentMethod : "-" }}</div>
</template>
</el-table-column>
<el-table-column label="支付金额" prpo="repaymentAmount">
<template v-slot="scope">
<div>{{ scope.row.repaymentAmount ? scope.row.repaymentAmount : "-" }}</div>
</template>
</el-table-column>
<el-table-column label="备注" prpo="remark">
<template v-slot="scope">
<div>{{ scope.row.remark ? scope.row.remark : "-" }}</div>
</template>
</el-table-column>
<el-table-column label="操作时间" prop="createTime" />
</el-table>
</div>
<div class="head-container">
<el-pagination
:total="tableData.total"
:current-page="query.page"
:page-size="query.size"
layout="total, sizes, prev, pager, next, jumper"
@current-change="paginationChange"
@size-change="sizeChange"
/>
</div>
</el-dialog>
</div>
</template>
<script>
import creditPayApi from "@/api/order/credit-pay-recoders";
export default {
data() {
return {
dialogVisible: false,
query: {
creditBuyerId: "",
paymentMethod: "",
orderId: "",
page: 1,
size: 10,
},
resetQuery: null,
tableData: {
data: [],
loading: false,
total: 0,
},
};
},
mounted() {
this.resetQuery = { ...this.query };
},
methods: {
/**
* 查询
*/
async getTableData() {
// eslint-disable-next-line no-unused-vars, prefer-const
let params = {
creditBuyerId: this.query.creditBuyerId,
value: this.query.value,
page: this.query.page,
size: this.query.size,
paymentMethod: this.query.paymentMethod,
};
if (this.query.orderId) {
params.orderId = this.query.orderId;
}
// eslint-disable-next-line prefer-const
let res = await creditPayApi.page(params);
this.tableData.loading = false;
this.tableData.data = res.records;
this.tableData.total = res.totalRow * 1;
},
/**
* 打开
* @param row
*/
show(row, orderId) {
this.query = { ...this.resetQuery };
this.dialogVisible = true;
this.query.creditBuyerId = row.id;
this.query.orderId = orderId;
this.getTableData();
},
/**
* 分页大小改变
* @param e
*/
sizeChange(e) {
this.query.size = e;
this.getTableData();
},
/**
* 分页回调
* @param e
*/
paginationChange(e) {
this.query.page = e;
this.getTableData();
},
/**
* 关闭
*/
close() {
this.dialogVisible = false;
},
/**
* 重置
*/
reset() {
this.query.paymentMethod = "";
this.getTableData();
},
},
};
</script>
<style scoped lang="scss">
.shop_list {
display: flex;
flex-wrap: wrap;
.item_wrap {
$size: 80px;
.item {
$radius: 4px;
width: $size;
height: $size;
border-radius: $radius;
overflow: hidden;
position: relative;
margin-right: 10px;
margin-top: 10px;
&:hover {
cursor: pointer;
}
&::after {
content: attr(data-index);
font-size: 12px;
height: 20px;
display: flex;
padding: 0 10px;
border-radius: 0 0 $radius 0;
align-items: center;
background-color: rgba(0, 0, 0, 0.3);
backdrop-filter: blur(10px);
color: #fff;
position: absolute;
top: 0;
left: 0;
z-index: 10;
}
&::before {
content: "删除";
font-size: 12px;
width: 100%;
height: 20px;
display: flex;
padding: 0 10px;
align-items: center;
justify-content: center;
background-color: rgba(0, 0, 0, 0.3);
backdrop-filter: blur(10px);
color: #fff;
position: absolute;
bottom: 0;
left: 0;
z-index: 10;
transition: all 0.1s ease-in-out;
}
}
.name {
width: $size;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
</style>

View File

@@ -0,0 +1,190 @@
<template>
<div>
<el-dialog
:show-close="false"
:close-on-click-modal="false"
:visible.sync="dialogVisible"
width="30%"
center
>
<div slot="title" class="dialog-title">{{ form.id ? "编辑" : "创建" }}挂账人</div>
<div class="content">
<el-form ref="form" :model="form" :rules="rules" label-width="120px" label-position="left">
<el-form-item label="状态" prop="status" style="width: 100%">
<el-switch v-model="form.status" :active-value="1" :inactive-value="0" />
</el-form-item>
<el-form-item label="挂账人" prop="debtor" style="width: 100%">
<el-input v-model="form.debtor" placeholder="请输入挂账人名称" />
</el-form-item>
<el-form-item label="手机号" prop="mobile" style="width: 100%">
<el-input
v-model="form.mobile"
placeholder="请输入手机号"
oninput="value= value.replace(/[^0-9]/g, '')"
maxlength="11"
/>
</el-form-item>
<el-form-item label="职位" prop="position" style="width: 100%">
<el-input v-model="form.position" placeholder="请输入职位" />
</el-form-item>
<el-form-item label="挂账额度" prop="creditAmount" style="width: 100%">
<el-input
v-model="form.creditAmount"
placeholder=""
oninput="value= value.replace(/[^\d|\.]/g, '')"
>
<template slot="prepend"></template>
</el-input>
</el-form-item>
<el-form-item label="还款方式" style="width: 100%">
<el-radio-group v-model="form.repaymentMethod" :disabled="isExist(form.id)">
<el-radio v-for="item in repaymentMethodList" :key="item.value" :label="item.value">
{{ item.label }}
</el-radio>
</el-radio-group>
<div style="font-size: 12px; color: #999">一经创建无法更改还款方式</div>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" :loading="loading" @click="onSubmitHandle"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import creditOrderApi from "@/api/order/credit-order";
export default {
// eslint-disable-next-line vue/require-prop-types
props: ["couponId"],
data() {
return {
dialogVisible: false,
loading: false,
repaymentMethodList: [
{ label: "按总金额还款", value: "total" },
{ label: "按订单还款", value: "order" },
],
form: {
id: "",
shopId: "",
status: 0,
debtor: "",
mobile: "",
position: "",
creditAmount: "",
repaymentMethod: "total",
},
rules: {
debtor: [
{
required: true,
message: "请输入挂账人名称",
trigger: "blur",
},
],
mobile: [
{
required: true,
message: "请输入手机号",
trigger: "blur",
},
],
position: [
{
required: true,
message: "请输入职位",
trigger: "blur",
},
],
creditAmount: [
{
required: true,
message: "请输入挂账额度",
trigger: "blur",
},
],
},
resetForm: null,
};
},
mounted() {
this.resetForm = { ...this.form };
},
methods: {
/**
* 校验是否存在
*/
isExist(val) {
if (val) {
return true;
} else {
return false;
}
},
/**
* 确定
*/
async onSubmitHandle() {
this.$refs.form.validate(async (valid) => {
if (valid) {
try {
this.loading = true;
if (!this.form.shopId) {
this.form.shopId = localStorage.getItem("shopId");
}
let res;
if (!this.form.id) {
res = await addCreditBuyer(this.form);
} else {
res = await editCreditBuyer(this.form);
}
this.$notify({
title: "成功",
message: `${this.form.id ? "编辑" : "添加"}成功`,
type: "success",
});
this.dialogVisible = false;
this.loading = false;
this.$emit("success", res);
} catch (error) {
this.loading = false;
}
}
});
},
/**
* 打开详情
* @param row
*/
show(row) {
if (row && row.id) {
this.form = row;
} else {
this.form = this.resetForm;
}
this.form.status = Number(this.form.status);
this.dialogVisible = true;
this.$refs.form.resetFields();
},
/**
* 关闭
*/
close() {
this.dialogVisible = false;
},
},
};
</script>
<style scoped lang="scss">
.dialog-title {
text-align: left;
}
</style>

View File

@@ -0,0 +1,193 @@
<!-- eslint-disable vue/no-use-v-if-with-v-for -->
<template>
<div>
<el-dialog
:show-close="false"
:visible.sync="dialogVisible"
:close-on-click-modal="false"
width="30%"
center
>
<div slot="title" class="dialog-title">挂账还款</div>
<div class="content">
<div v-if="form.repaymentMethod == 'total' && !form.creditBuyerId" class="credit_info">
<div>挂账人{{ form.debtor }}</div>
<div>挂账金额{{ form.owedAmount || 0 }}</div>
<div>账户余额: {{ form.accountBalance || 0 }}</div>
</div>
<el-form ref="form" :model="form" :rules="rules" label-width="120px" label-position="left">
<el-form-item
v-if="form.repaymentMethod == 'total' && !form.creditBuyerId"
label="还款方式"
style="width: 100%"
>
<el-radio-group v-model="form.repaymentMethod">
<el-radio
v-for="item in repaymentMethodList"
v-if="form.repaymentMethod == item.value"
:key="item.value"
:label="item.value"
>
{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="还款金额" prop="repaymentAmount" style="width: 100%">
<el-input
v-model="form.repaymentAmount"
placeholder=""
oninput="value= value.replace(/[^\d|\.]/g, '')"
>
<template slot="prepend"></template>
</el-input>
</el-form-item>
<el-form-item label="支付方式" prop="paymentMethod" style="width: 100%">
<el-input v-model="form.paymentMethod" placeholder="请输入支付方式" />
</el-form-item>
<el-form-item label="备注" prop="remark" style="width: 100%">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" :loading="loading" @click="onSubmitHandle"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import creditOrderApi from "@/api/order/credit-order";
import _ from "lodash";
export default {
// eslint-disable-next-line vue/require-prop-types
props: ["couponId"],
data() {
return {
dialogVisible: false,
loading: false,
repaymentMethodList: [
{ label: "按总金额还款", value: "total" },
{ label: "按订单还款", value: "order" },
],
form: {
id: "",
creditBuyerId: "",
orderId: "",
repaymentMethod: "",
repaymentAmount: "",
paymentMethod: "",
remark: "",
},
rules: {
repaymentAmount: [
{
required: true,
message: "请输入还款金额",
trigger: "blur",
},
],
paymentMethod: [
{
required: true,
message: "请输入支付方式",
trigger: "blur",
},
],
},
resetForm: null,
};
},
mounted() {
this.resetForm = { ...this.form };
},
methods: {
/**
* 确定
*/
// eslint-disable-next-line no-undef
onSubmitHandle: _.debounce(function async() {
this.$refs.form.validate(async (valid) => {
if (valid) {
try {
this.loading = true;
// if (!this.form.shopId) { this.form.shopId = localStorage.getItem('shopId') }
let res;
if (this.form.repaymentMethod === "total") {
res = await creditRePayment(this.form);
} else {
res = await creditPayment(this.form);
}
this.$notify({
title: "成功",
message: res.repaymentMsg,
type: "success",
});
this.dialogVisible = false;
this.loading = false;
this.$emit("success", res);
} catch (error) {
this.loading = false;
console.log(error);
}
}
});
}, 1000),
/**
* 打开
* @param row
*/
show(row, order) {
this.form = { ...this.resetForm };
if (row.creditBuyerId) {
this.form.creditBuyerId = row.creditBuyerId;
this.form.orderId = order.id;
} else {
this.form.id = row.id;
}
this.form.repaymentMethod = row.repaymentMethod;
this.form.debtor = row.debtor;
this.form.owedAmount = row.owedAmount;
this.form.accountBalance = row.accountBalance;
this.dialogVisible = true;
},
/**
* 关闭
*/
close() {
this.dialogVisible = false;
},
reset() {
this.query = { ...this.resetQuery };
},
},
};
</script>
<style scoped lang="scss">
.credit_info {
width: 100%;
background: #f7f7fa;
border-radius: 3px 3px 3px 3px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 15px 25px;
box-sizing: border-box;
margin-bottom: 30px;
view {
font-weight: 400;
font-size: 14px;
color: #000000;
}
}
.dialog-title {
text-align: left;
}
</style>

View File

@@ -0,0 +1,475 @@
<!-- eslint-disable vue/valid-v-bind -->
<template>
<div class="app-container">
<div class="head-container">
<el-form :model="query" inline label-position="left">
<el-form-item>
<el-radio-group v-model="timeValue" @change="timeChange">
<el-radio-button label="">全部</el-radio-button>
<el-radio-button label="0">今天</el-radio-button>
<el-radio-button label="-1">昨天</el-radio-button>
<el-radio-button label="-7">最近7天</el-radio-button>
<el-radio-button label="-30">最近30天</el-radio-button>
<el-radio-button label="week">本周</el-radio-button>
<el-radio-button label="month">本月</el-radio-button>
<el-radio-button label="custom">自定义</el-radio-button>
</el-radio-group>
<el-date-picker
v-if="timeValue == 'custom'"
v-model="query.createdAt"
type="daterange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']"
value-format="yyyy-MM-dd HH:mm:ss"
/>
</el-form-item>
<template>
<el-form-item>
<el-select v-model="query.status" placeholder="全部状态" clearable style="width: 140px">
<el-option
v-for="item in statusList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</template>
<el-form-item>
<el-button type="primary" @click="search">查询</el-button>
<el-button @click="resetHandle">重置</el-button>
</el-form-item>
</el-form>
</div>
<div class="head-container">
<div class="collect_wrap">
<div v-for="(item, index) in payCountList" :key="index" class="item">
<div class="icon_wrap" :style="{ backgroundColor: `rgba(${item.color},0.5)` }">
<el-icon :color="`rgba(${item.color},1)`" :size="18">
<InfoFilled v-if="item.icon == 'info'" />
<Check v-if="item.icon == 'check'" />
<Warning v-if="item.icon == 'warning'" />
<Plus v-if="item.icon == 'plus'" />
</el-icon>
</div>
<div class="info">
<div class="m">{{ item.amount }}</div>
<div class="t">{{ item.label }}{{ index == 0 ? item.count + "笔" : "" }}</div>
</div>
</div>
</div>
</div>
<div class="head-container">
<el-table v-loading="tableData.loading" :data="tableData.data">
<el-table-column label="创建日期" prop="createTime" />
<el-table-column label="订单号" prop="orderId" />
<el-table-column label="应付金额" prop="payAmount">
<template v-slot="scope">{{ "¥" + scope.row.payAmount || "-" }}</template>
</el-table-column>
<el-table-column label="已付款金额" prop="paidAmount">
<template v-slot="scope">{{ "¥" + scope.row.paidAmount || "-" }}</template>
</el-table-column>
<el-table-column label="待付款金额" prop="unpaidAmount">
<template v-slot="scope">{{ "¥" + scope.row.unpaidAmount || "-" }}</template>
</el-table-column>
<el-table-column label="状态" prop="salesAmount">
<template v-slot="scope">
{{
scope.row.status == "unpaid"
? "未付款"
: scope.row.status == "partial"
? "部分支付"
: scope.row.status == "paid"
? "已付款"
: ""
}}
</template>
</el-table-column>
<el-table-column label="付款方式" prop="lastPaymentMethod">
<template v-slot="scope">{{ scope.row.lastPaymentMethod }}</template>
</el-table-column>
<el-table-column label="备注" prop="remark">
<template v-slot="scope">{{ scope.row.remark }}</template>
</el-table-column>
<el-table-column label="付款时间" prop="lastPaymentTime" />
<el-table-column label="操作" width="200">
<template v-slot="scope">
<el-button
type="text"
:style="{ color: repaymentMethod == 'total' ? '#999' : '' }"
@click="openDialog(scope.row, 'payment')"
>
付款
</el-button>
<el-button type="text" @click="openDialog(scope.row, 'paymentRecord')">
账单付款记录
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="head-container">
<el-pagination
:total="tableData.total"
:current-page="query.page"
:page-size="query.size"
layout="total, sizes, prev, pager, next, jumper"
@current-change="paginationChange"
@size-change="sizeChange"
/>
</div>
<!-- 还款 -->
<creditRepayment ref="creditRepayment" @success="resetHandle" />
<!-- 还款记录 -->
<creditRepaymentRecord ref="creditRepaymentRecord" @success="resetHandle" />
</div>
</template>
<script>
import creditRepayment from "./components/detail/credit_repayment.vue";
import creditRepaymentRecord from "./components/detail/credit_RePaymentRecord.vue";
import dayjs from "dayjs";
import creditOrderApi from "@/api/order/credit-order";
export default {
components: { creditRepayment, creditRepaymentRecord },
filters: {},
data() {
return {
timeValue: "",
resetQuery: null,
repaymentMethod: "",
statusList: [
{ label: "未付款", value: "unpaid" },
{ label: "部分支付", value: "partial" },
{ label: "已付款", value: "paid" },
],
query: {
page: 1,
size: 10,
creditBuyerId: "",
createdAt: [],
status: "",
},
tableData: {
data: [],
loading: false,
total: 0,
},
downloadLoading: false,
payCountList: [
{ label: "总交易", icon: "info", color: "201, 120, 236", amount: 0, count: 0 },
{ label: "已支付金额", icon: "check", color: "70, 181, 24", amount: 0 },
{ label: "待支付金额", icon: "plus", color: "248, 110, 16", amount: 0 },
{ label: "待支付笔数", icon: "warning", color: "254, 180, 38", amount: 0 },
],
payCountTotal: 0,
};
},
mounted() {
console.log(this.$route.query);
this.query.creditBuyerId = this.$route.query.id;
this.repaymentMethod = this.$route.query.repaymentMethod;
this.resetQuery = { ...this.query };
// repaymentMethod
this.getTableData();
// this.tbShopCategoryGet()
},
methods: {
search() {
this.query.page = 1;
this.getTableData();
},
/**
* 获取明细数据
*/
async getTableData() {
this.tableData.loading = true;
try {
this.creditDetailSummary();
// eslint-disable-next-line prefer-const
let params = {
page: this.query.page,
size: this.query.size,
status: this.query.status,
creditBuyerId: this.query.creditBuyerId,
};
if (this.query.createdAt.length > 0) {
params.beginDate = this.query.createdAt[0].substring(0, 10);
params.endDate = this.query.createdAt[1].substring(0, 10);
}
// eslint-disable-next-line prefer-const
let res = await creditOrderApi.page(params);
this.tableData.loading = false;
this.tableData.data = res.records;
this.tableData.total = res.totalRow * 1;
} catch (error) {
console.log(error);
}
},
/**
* 获取明细统计
*/
async creditDetailSummary() {
try {
// eslint-disable-next-line prefer-const
let params = {
page: this.query.page,
size: this.query.size,
status: this.query.status,
creditBuyerId: this.query.creditBuyerId,
};
if (this.query.createdAt.length > 0) {
params.beginDate = this.query.createdAt[0].substring(0, 10);
params.endDate = this.query.createdAt[1].substring(0, 10);
}
// eslint-disable-next-line prefer-const
let res = await creditOrderApi.summary(params);
this.payCountList[0].amount = res.payAmountTotal;
this.payCountList[0].count = res.count;
this.payCountList[1].amount = res.paidAmountTotal;
this.payCountList[2].amount = res.unpaidAmountTotal;
this.payCountList[3].amount = res.unpaidCount;
} catch (error) {
console.log(error);
}
},
/**
* 操作
*/
openDialog(row, type) {
if (type === "payment" && this.repaymentMethod === "order") {
this.$refs.creditRepayment.show(
{ creditBuyerId: this.query.creditBuyerId, repaymentMethod: this.repaymentMethod },
row
);
} else if (type === "paymentRecord") {
this.$refs.creditRepaymentRecord.show(
{ id: this.query.creditBuyerId, repaymentMethod: this.repaymentMethod },
row.orderId
);
}
},
/**
* 切换时间
* @param e
*/
timeChange(e) {
const format = ["YYYY-MM-DD 00:00:00", "YYYY-MM-DD 23:59:59"];
switch (e) {
case "":
// 全部
this.query.createdAt = [];
break;
case "0":
// 今天
this.query.createdAt = [dayjs().format(format[0]), dayjs().format(format[1])];
break;
case "-1":
// 昨天
this.query.createdAt = [
dayjs().add(-1, "d").format(format[0]),
dayjs().add(-1, "d").format(format[1]),
];
break;
case "-7":
// 最近7天
this.query.createdAt = [
dayjs().add(-7, "d").format(format[0]),
dayjs().format(format[1]),
];
break;
case "-30":
// 最近7天
this.query.createdAt = [
dayjs().add(-30, "d").format(format[0]),
dayjs().format(format[1]),
];
break;
case "week":
// 本周
this.query.createdAt = [
dayjs().startOf("week").format(format[0]),
dayjs().endOf("week").format(format[1]),
];
break;
case "month":
// 本周
this.query.createdAt = [
dayjs().startOf("month").format(format[0]),
dayjs().endOf("month").format(format[1]),
];
break;
case "custom":
// 自定义
this.query.createdAt = [];
break;
default:
break;
}
},
/**
* 重置查询
*/
resetHandle() {
this.timeValue = "";
this.query = { ...this.resetQuery };
this.getTableData();
},
/**
* 分页大小改变
* @param e
*/
sizeChange(e) {
console.log(e);
this.query.size = e;
this.getTableData();
},
/**
* 分页回调
* @param e
*/
paginationChange(e) {
this.query.page = e;
this.getTableData();
},
},
};
</script>
<style scoped lang="scss">
.collect_wrap {
display: flex;
gap: 14px;
justify-content: space-between;
.item {
background-size: 100% 100%;
width: 255px;
display: flex;
align-items: center;
background-color: #fff;
padding: 20px;
border-radius: 7px 7px 7px 7px;
.icon_wrap {
$size: 34px;
$border: 6px;
width: $size;
height: $size;
display: flex;
align-items: center;
justify-content: center;
background-color: var(--bg-color);
border-radius: 50%;
position: relative;
> div {
width: 24px;
height: 24px;
background-color: #fff;
border-radius: 50%;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
}
&::after {
content: "";
width: $size + $border;
height: $size + $border;
border-radius: 50%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: var(--bg-color);
opacity: 0.3;
}
.icon {
font-size: 32px;
position: absolute;
left: 1px;
right: 0;
top: 1px;
bottom: 0;
margin: auto;
}
.img {
width: 20px;
height: 20px;
}
}
.info {
flex: 1;
display: flex;
flex-direction: column;
padding-left: 10px;
.m {
font-weight: bold;
}
.t {
font-size: 12px;
color: #999;
padding-top: 4px;
}
}
}
}
.refund {
color: #ff9731;
font-weight: bold;
}
.table_order_info {
.order_no {
color: #999;
}
.type {
color: #e6a23c;
}
}
.goods_info {
.row {
display: flex;
&:not(:first-child) {
margin-top: 10px;
}
.cover {
width: 40px;
height: 40px;
}
.info {
flex: 1;
display: flex;
flex-direction: column;
padding-left: 10px;
.sku {
color: #999;
}
}
}
}
</style>

View File

@@ -116,16 +116,22 @@ async function handleEditClick(row: IObject) {
console.log({ ...row });
editModalRef.value?.setFormData({ ...row, url: [row.url] });
}
1;
const router = useRouter();
// 其他工具栏
function handleToolbarClick(name: string) {
console.log(name);
if (name === "custom1") {
ElMessage.success("点击了自定义1按钮");
}
}
function handleToolbarClick(name: string, row: any) {}
// 其他操作列
async function handleOperatClick(data: IOperatData) {
if (data.name == "detail") {
router.push({
path: "/credit-detail",
query: {
id: data.row.id,
repaymentMethod: data.row.repaymentMethod,
},
});
return;
}
console.log(data);
}
</script>

View File

@@ -1,6 +1,6 @@
<template>
<!-- 交班模块 -->
<div style="padding: 15px">
<!-- 交班模块 -->
<!-- 搜索 -->
<my-search></my-search>
<!-- 表格 -->