This commit is contained in:
faiz 2024-11-12 11:28:45 +08:00
parent 66fd3aeb16
commit 4a982d220b
2 changed files with 280 additions and 196 deletions

View File

@ -55,13 +55,13 @@
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="uid" label="用户ID" min-width="120" /> <el-table-column prop="user.uid" label="用户ID" min-width="120" />
<el-table-column prop="nickname" label="用户姓名" min-width="120" /> <el-table-column prop="user.nickname" label="用户姓名" min-width="120" />
<el-table-column prop="account" label="用户电话" min-width="120" /> <el-table-column prop="user.phone" label="用户电话" min-width="120" />
<el-table-column prop="card_id" label="用户身份证号" min-width="120" /> <el-table-column prop="user.card_id" label="用户身份证号" min-width="120" />
<el-table-column prop="create_time" label="账单日期" min-width="120" /> <el-table-column prop="create_time" label="账单日期" min-width="120" />
<el-table-column <el-table-column
prop="brokerage_price" prop="cz_price"
label="成长值" label="成长值"
min-width="120" min-width="120"
/> />

View File

@ -1,7 +1,13 @@
<template> <template>
<div class="divBox"> <div class="divBox">
<div class="selCard"> <div class="selCard">
<el-form :model="tableFrom" ref="searchForm" size="small" label-width="85px" :inline="true"> <el-form
:model="tableFrom"
ref="searchForm"
size="small"
label-width="85px"
:inline="true"
>
<el-form-item label="选择时间:"> <el-form-item label="选择时间:">
<el-date-picker <el-date-picker
v-model="timeVal" v-model="timeVal"
@ -12,7 +18,7 @@
@change="onchangeTime" @change="onchangeTime"
clearable clearable
:picker-options="pickerOptions" :picker-options="pickerOptions"
style="width: 280px;" style="width: 280px"
/> />
</el-form-item> </el-form-item>
<el-form-item v-if="type == 0" label="审核状态:" prop="status"> <el-form-item v-if="type == 0" label="审核状态:" prop="status">
@ -117,11 +123,13 @@
@change="onchangeAuditTime" @change="onchangeAuditTime"
clearable clearable
:picker-options="pickerOptions" :picker-options="pickerOptions"
style="width: 280px;" style="width: 280px"
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" size="small" @click="getList(1)">搜索</el-button> <el-button type="primary" size="small" @click="getList(1)"
>搜索</el-button
>
<el-button size="small" @click="searchReset()">重置</el-button> <el-button size="small" @click="searchReset()">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -131,7 +139,7 @@
<el-tabs <el-tabs
v-if="headeNum.length > 0" v-if="headeNum.length > 0"
v-model="type" v-model="type"
@tab-click="getList(1),resetStatus()" @tab-click="getList(1), resetStatus()"
> >
<el-tab-pane <el-tab-pane
v-for="(item, index) in headeNum" v-for="(item, index) in headeNum"
@ -152,12 +160,12 @@
label="ID" label="ID"
min-width="60" min-width="60"
/> />
<el-table-column <el-table-column label="店铺名称" min-width="100">
label="店铺名称"
min-width="100"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{(scope.row.merchant&&scope.row.merchant.mer_name) || scope.row.mer_name}}</span> <span>{{
(scope.row.merchant && scope.row.merchant.mer_name) ||
scope.row.mer_name
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="ext.com.name" label="企业名称" min-width="150" /> <el-table-column prop="ext.com.name" label="企业名称" min-width="150" />
@ -168,7 +176,13 @@
min-width="100" min-width="100"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.type==10?'保证金':scope.row.type==30?'技术服务费':'上架费' }}</span> <span>{{
scope.row.type == 10
? "保证金"
: scope.row.type == 30
? "技术服务费"
: "上架费"
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column v-if="type!=0" key="10" label="店铺类型" min-width="120"> <!-- <el-table-column v-if="type!=0" key="10" label="店铺类型" min-width="120">
@ -187,23 +201,23 @@
}}</span> }}</span>
</template> </template>
</el-table-column> --> </el-table-column> -->
<el-table-column <el-table-column label="商户姓名" min-width="100">
label="商户姓名"
min-width="100"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{(scope.row.merchant&&scope.row.merchant.real_name) || scope.row.real_name}}</span> <span>{{
(scope.row.merchant && scope.row.merchant.real_name) ||
scope.row.real_name
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
v-if="type == 0 || type==10" v-if="type == 0 || type == 10"
key="20" key="20"
prop="margin" prop="margin"
label="保证金余额" label="保证金余额"
min-width="80" min-width="80"
/> />
<el-table-column <el-table-column
v-if="type == 0 || type==10" v-if="type == 0 || type == 10"
key="1" key="1"
:prop="type == 0 ? 'merchant.ot_margin' : 'ot_margin'" :prop="type == 0 ? 'merchant.ot_margin' : 'ot_margin'"
label="保证金额度" label="保证金额度"
@ -304,7 +318,11 @@
min-width="150" min-width="150"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.marginOrder && scope.row.marginOrder[0] && scope.row.marginOrder[0]['create_time'] }}</span> <span>{{
scope.row.marginOrder &&
scope.row.marginOrder[0] &&
scope.row.marginOrder[0]["create_time"]
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -324,7 +342,13 @@
min-width="100" min-width="100"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.is_service == 1 ? scope.row.service_cost : (scope.row.ot_service_cost-scope.row.service_cost).toFixed(2) }}</span> <span>{{
scope.row.is_service == 1
? scope.row.service_cost
: (scope.row.ot_service_cost - scope.row.service_cost).toFixed(
2
)
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -334,7 +358,11 @@
min-width="100" min-width="100"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.is_goods == 1 ? scope.row.goods_cost : (scope.row.ot_goods_cost-scope.row.goods_cost).toFixed(2) }}</span> <span>{{
scope.row.is_goods == 1
? scope.row.goods_cost
: (scope.row.ot_goods_cost - scope.row.goods_cost).toFixed(2)
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column <!-- <el-table-column
@ -355,7 +383,13 @@
<el-table-column label="状态" min-width="120" v-if="type == 2"> <el-table-column label="状态" min-width="120" v-if="type == 2">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 0 待审核 -2 失败 1 同意 --> <!-- 0 待审核 -2 失败 1 同意 -->
<span>{{ scope.row.status == 0 ? '待审核':scope.row.status == 1 ? '同意': '失败' }}</span> <span>{{
scope.row.status == 0
? "待审核"
: scope.row.status == 1
? "同意"
: "失败"
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -366,15 +400,14 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<div class="demo-image__preview"> <div class="demo-image__preview">
<el-image :src="scope.row.image" :preview-src-list="[scope.row.image]" /> <el-image
:src="scope.row.image"
:preview-src-list="[scope.row.image]"
/>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="操作" min-width="150" fixed="right">
label="操作"
min-width="150"
fixed="right"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-if="type == 0" v-if="type == 0"
@ -398,7 +431,7 @@
>保证金扣费</el-button >保证金扣费</el-button
> >
<el-button <el-button
v-if="type == 10 || type==30 || type==40" v-if="type == 10 || type == 30 || type == 40"
type="text" type="text"
size="small" size="small"
@click="viewOffRecords(scope.row.mer_id)" @click="viewOffRecords(scope.row.mer_id)"
@ -422,11 +455,14 @@
>操作记录</el-button >操作记录</el-button
> >
<el-button <el-button
v-if="(type == 2 || type == 3 || type == 4) && scope.row.status == 0" v-if="
(type == 2 || type == 3 || type == 4) && scope.row.status == 0
"
type="text" type="text"
size="small" size="small"
@click="offline(scope.row.order_id)" @click="offline(scope.row.order_id)"
>财务审核</el-button> >财务审核</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -475,8 +511,10 @@
<div class="label_item"> <div class="label_item">
<span class="label_title">扣费金额</span> <span class="label_title">扣费金额</span>
{{ {{
(marginData.financial_account.pay_price - (
marginData.merchant.margin).toFixed(2) marginData.financial_account.pay_price -
marginData.merchant.margin
).toFixed(2)
}} }}
</div> </div>
<div class="label_item"> <div class="label_item">
@ -488,7 +526,7 @@
{{ marginData.financial_type == 3 ? "线下退回" : "线上退回" }} {{ marginData.financial_type == 3 ? "线下退回" : "线上退回" }}
</div> </div>
<div class="label_item"> <div class="label_item">
<span class="label_title" >应退回保证金金额</span> <span class="label_title">应退回保证金金额</span>
{{ marginData.extract_money }} {{ marginData.extract_money }}
</div> </div>
</div> </div>
@ -497,22 +535,41 @@
<div class="section"> <div class="section">
<div class="title">收款信息</div> <div class="title">收款信息</div>
<div class="label_list"> <div class="label_list">
<template v-if="marginData.financial_account && marginData.financial_account.account"> <template
<div class="label_item" v-if="marginData.financial_account.account.name"> v-if="
marginData.financial_account &&
marginData.financial_account.account
"
>
<div
class="label_item"
v-if="marginData.financial_account.account.name"
>
<span class="label_title">收款人姓名</span> <span class="label_title">收款人姓名</span>
{{ marginData.financial_account.account.name }} {{ marginData.financial_account.account.name }}
</div> </div>
<div class="label_item" v-if="marginData.financial_account.account.code"> <div
class="label_item"
v-if="marginData.financial_account.account.code"
>
<span class="label_title">开户银行</span> <span class="label_title">开户银行</span>
{{ marginData.financial_account.account.code }} {{ marginData.financial_account.account.code }}
</div> </div>
<div class="label_item" v-if="marginData.financial_account.account.pic"> <div
class="label_item"
v-if="marginData.financial_account.account.pic"
>
<template v-if="marginData.financial_account.account.type == 1"> <template v-if="marginData.financial_account.account.type == 1">
<span class="label_title">银行账号</span> <span class="label_title">银行账号</span>
{{ marginData.financial_account.account.pic }} {{ marginData.financial_account.account.pic }}
</template> </template>
<img v-else-if="marginData.financial_account.account.type == 2" :src="marginData.financial_account.account.pic" style="width:120px;height:120px;" alt=""> <img
v-else-if="marginData.financial_account.account.type == 2"
:src="marginData.financial_account.account.pic"
style="width: 120px; height: 120px"
alt=""
/>
</div> </div>
</template> </template>
<div class="label_item"> <div class="label_item">
@ -545,11 +602,15 @@
<el-table-column label="标题" min-width="90" prop="title" /> <el-table-column label="标题" min-width="90" prop="title" />
<el-table-column prop="number" label="金额" min-width="60"> <el-table-column prop="number" label="金额" min-width="60">
<template scope="scope"> <template scope="scope">
<span v-if="scope.row.pm == 1" style="color:#13ce66">+{{scope.row.number}}</span> <span v-if="scope.row.pm == 1" style="color: #13ce66"
<span v-else style="color:rgb(237, 64, 20)">-{{scope.row.number}}</span> >+{{ scope.row.number }}</span
>
<span v-else style="color: rgb(237, 64, 20)"
>-{{ scope.row.number }}</span
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="balance" label="保证金结余" min-width="90" /> <el-table-column prop="balance" label="结余" min-width="90" />
<el-table-column label="备注" min-width="120" prop="mark" /> <el-table-column label="备注" min-width="120" prop="mark" />
<el-table-column prop="create_time" label="操作时间" min-width="120" /> <el-table-column prop="create_time" label="操作时间" min-width="120" />
</el-table> </el-table>
@ -577,7 +638,9 @@
<el-table :data="tableOffData.data" :loading="loading" size="small"> <el-table :data="tableOffData.data" :loading="loading" size="small">
<el-table-column label="序号" min-width="50"> <el-table-column label="序号" min-width="50">
<template scope="scope"> <template scope="scope">
<span>{{ scope.$index+(tableOffFrom.page - 1) * tableOffFrom.limit + 1 }}</span> <span>{{
scope.$index + (tableOffFrom.page - 1) * tableOffFrom.limit + 1
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="缴费截图" min-width="90" prop="image"> <el-table-column label="缴费截图" min-width="90" prop="image">
@ -586,11 +649,16 @@
v-if="scope.row.image" v-if="scope.row.image"
style="width: 30px; height: 30px" style="width: 30px; height: 30px"
:src="scope.row.image" :src="scope.row.image"
:preview-src-list="[scope.row.image]"> :preview-src-list="[scope.row.image]"
>
</el-image> </el-image>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="pay_price" label="支付金额" min-width="60"></el-table-column> <el-table-column
prop="pay_price"
label="支付金额"
min-width="60"
></el-table-column>
<el-table-column label="备注" min-width="100" prop="mark" /> <el-table-column label="备注" min-width="100" prop="mark" />
<el-table-column prop="status" label="审核状态" min-width="80"> <el-table-column prop="status" label="审核状态" min-width="80">
<template scope="scope"> <template scope="scope">
@ -614,7 +682,6 @@
</div> </div>
</template> </template>
<script> <script>
import { import {
marginLstApi, marginLstApi,
marginServiceLstApi, marginServiceLstApi,
@ -633,9 +700,9 @@ import {
getMerCateApi, getMerCateApi,
marginRefundInfo, marginRefundInfo,
marginDeductionRecord, marginDeductionRecord,
marginofflineLstRecord marginofflineLstRecord,
} from "@/api/merchant"; } from "@/api/merchant";
import timeOptions from '@/utils/timeOptions'; import timeOptions from "@/utils/timeOptions";
import { fromList } from "@/libs/constants.js"; import { fromList } from "@/libs/constants.js";
import { roterPre } from "@/settings"; import { roterPre } from "@/settings";
export default { export default {
@ -658,18 +725,18 @@ export default {
type: "10", type: "10",
tableOffFrom: { tableOffFrom: {
page: 1, page: 1,
limit: 20 limit: 20,
}, },
tableOffData: { tableOffData: {
total: 0, total: 0,
data: [] data: [],
}, },
statusMode:{ statusMode: {
'0':'待审核', 0: "待审核",
'1':'审核通过', 1: "审核通过",
'-1':'失败', "-1": "失败",
'-2':'审核拒绝', "-2": "审核拒绝",
'20':'已退款' 20: "已退款",
}, },
headeNum: [ headeNum: [
{ {
@ -732,7 +799,7 @@ export default {
}, },
autoUpdate: true, autoUpdate: true,
timeVal: [], timeVal: [],
auditVal:[], auditVal: [],
recordId: "", recordId: "",
marginData: { marginData: {
merchant: {}, merchant: {},
@ -746,17 +813,17 @@ export default {
this.getList(""); this.getList("");
}, },
methods: { methods: {
resetStatus(){ resetStatus() {
this.tableFrom.status = '' this.tableFrom.status = "";
}, },
/**重置 */ /**重置 */
searchReset(){ searchReset() {
this.timeVal = [] this.timeVal = [];
this.auditVal = [] this.auditVal = [];
this.tableFrom.date = "" this.tableFrom.date = "";
this.tableFrom.pay_time = "" this.tableFrom.pay_time = "";
this.$refs.searchForm.resetFields() this.$refs.searchForm.resetFields();
this.getList(1) this.getList(1);
}, },
// //
onchangeTime(e) { onchangeTime(e) {
@ -792,12 +859,12 @@ export default {
}); });
}, },
handleOffSizeChange(val) { handleOffSizeChange(val) {
this.tableFrom.limit = val this.tableFrom.limit = val;
this.getOffRecordList() this.getOffRecordList();
}, },
pageOffChange(page) { pageOffChange(page) {
this.tableFrom.page = page this.tableFrom.page = page;
this.getOffRecordList() this.getOffRecordList();
}, },
// //
getList(num) { getList(num) {
@ -814,7 +881,8 @@ export default {
this.listLoading = false; this.listLoading = false;
this.$message.error(res.message); this.$message.error(res.message);
}) })
: this.type == 2 ? marginDepositLstApi(this.tableFrom) // : this.type == 2
? marginDepositLstApi(this.tableFrom) //
.then((res) => { .then((res) => {
this.tableData.data = res.data.list; this.tableData.data = res.data.list;
this.tableData.total = res.data.count; this.tableData.total = res.data.count;
@ -824,7 +892,8 @@ export default {
this.listLoading = false; this.listLoading = false;
this.$message.error(res.message); this.$message.error(res.message);
}) })
: this.type == 3 ? marginServiceDepositLstApi(this.tableFrom) // : this.type == 3
? marginServiceDepositLstApi(this.tableFrom) //
.then((res) => { .then((res) => {
this.tableData.data = res.data.list; this.tableData.data = res.data.list;
this.tableData.total = res.data.count; this.tableData.total = res.data.count;
@ -834,7 +903,8 @@ export default {
this.listLoading = false; this.listLoading = false;
this.$message.error(res.message); this.$message.error(res.message);
}) })
: this.type == 4 ? marginGoodsDepositLstApi(this.tableFrom) // : this.type == 4
? marginGoodsDepositLstApi(this.tableFrom) //
.then((res) => { .then((res) => {
this.tableData.data = res.data.list; this.tableData.data = res.data.list;
this.tableData.total = res.data.count; this.tableData.total = res.data.count;
@ -844,7 +914,8 @@ export default {
this.listLoading = false; this.listLoading = false;
this.$message.error(res.message); this.$message.error(res.message);
}) })
: this.type == 30 ? marginServiceLstApi(this.tableFrom) // : this.type == 30
? marginServiceLstApi(this.tableFrom) //
.then((res) => { .then((res) => {
this.tableData.data = res.data.list; this.tableData.data = res.data.list;
this.tableData.total = res.data.count; this.tableData.total = res.data.count;
@ -854,7 +925,8 @@ export default {
this.listLoading = false; this.listLoading = false;
this.$message.error(res.message); this.$message.error(res.message);
}) })
: this.type == 40 ? marginGoodsLstApi(this.tableFrom) // : this.type == 40
? marginGoodsLstApi(this.tableFrom) //
.then((res) => { .then((res) => {
this.tableData.data = res.data.list; this.tableData.data = res.data.list;
this.tableData.total = res.data.count; this.tableData.total = res.data.count;
@ -895,6 +967,12 @@ export default {
getRecordList(id) { getRecordList(id) {
this.recordLoading = true; this.recordLoading = true;
this.recordId = id; this.recordId = id;
let types = {
10: "mer_margin",
30: "mer_service",
40: "mer_goods",
};
this.recordFrom.type = types[this.type] || this.type;
marginDeductionRecord(id, this.recordFrom) marginDeductionRecord(id, this.recordFrom)
.then((res) => { .then((res) => {
this.recordData.data = res.data.list; this.recordData.data = res.data.list;
@ -908,23 +986,25 @@ export default {
}, },
// //
viewOffRecords(id) { viewOffRecords(id) {
this.tableOffFrom.page = 1 this.tableOffFrom.page = 1;
this.tableOffFrom.type = this.type this.tableOffFrom.type = this.type;
this.offRecord = true this.offRecord = true;
this.getOffRecordList(id) this.getOffRecordList(id);
}, },
// //
getOffRecordList(id) { getOffRecordList(id) {
const that = this const that = this;
that.loading = true that.loading = true;
marginofflineLstRecord(id,that.tableOffFrom).then(async(res) => { marginofflineLstRecord(id, that.tableOffFrom)
that.tableOffData.data = res.data.list .then(async (res) => {
that.tableOffData.total = res.data.count that.tableOffData.data = res.data.list;
that.loading = false that.tableOffData.total = res.data.count;
}).catch((res) => { that.loading = false;
that.loading = false
that.$message.error(res.message)
}) })
.catch((res) => {
that.loading = false;
that.$message.error(res.message);
});
}, },
// //
handleAudit(id) { handleAudit(id) {
@ -952,11 +1032,15 @@ export default {
}, },
// 线 // 线
offline(id) { offline(id) {
this.type == 2? this.type == 2
this.$modalForm(marginPaymentApi(id)).then(() => this.getList("")) ? this.$modalForm(marginPaymentApi(id)).then(() => this.getList(""))
: this.type == 3 ? : this.type == 3
this.$modalForm(marginServicePaymentApi(id)).then(() => this.getList("")) ? this.$modalForm(marginServicePaymentApi(id)).then(() =>
:this.$modalForm(marginGoodsPaymentApi(id)).then(() => this.getList("")) this.getList("")
)
: this.$modalForm(marginGoodsPaymentApi(id)).then(() =>
this.getList("")
);
}, },
// 退 // 退
handleRecord(id) { handleRecord(id) {
@ -975,11 +1059,11 @@ export default {
.section { .section {
padding: 15px 0 30px; padding: 15px 0 30px;
border-bottom: 1px dashed #eeeeee; border-bottom: 1px dashed #eeeeee;
&:last-child{ &:last-child {
padding-top: 30px; padding-top: 30px;
border-bottom: none; border-bottom: none;
} }
.title{ .title {
padding-left: 10px; padding-left: 10px;
border-left: 3px solid var(--prev-color-primary); border-left: 3px solid var(--prev-color-primary);
font-size: 14px; font-size: 14px;
@ -998,11 +1082,11 @@ export default {
display: flex; display: flex;
flex: 0 0 calc(100% / 2); flex: 0 0 calc(100% / 2);
color: #606266; color: #606266;
.label_title{ .label_title {
color: #909399; color: #909399;
} }
} }
::v-deep .el-card__header{ ::v-deep .el-card__header {
border-bottom: none; border-bottom: none;
padding-bottom: 0; padding-bottom: 0;
} }