1.优化
This commit is contained in:
parent
d20531cc3d
commit
bb055e971f
|
@ -1,6 +1,16 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="运营商" prop="deptId" v-if="userName == 'admin'">
|
||||
<el-select v-model="queryParams.deptId" placeholder="请选择运营商" clearable>
|
||||
<el-option
|
||||
v-for="item in deptOptions"
|
||||
:key="item.deptId"
|
||||
:label="item.deptName"
|
||||
:value="item.deptId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="标题" prop="title">
|
||||
<el-input
|
||||
v-model="queryParams.title"
|
||||
|
@ -66,6 +76,8 @@
|
|||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="文章id" align="center" prop="articleId" />
|
||||
<el-table-column label="分类" align="center" key="classifyName" prop="classify.classifyName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="运营商" align="center" prop="deptName" />
|
||||
<el-table-column label="运营区" align="center" prop="areaName" />
|
||||
<!-- <el-table-column label="分类" align="center" prop="classifyName">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.article_classify" :value="scope.row.classify"/>-->
|
||||
|
@ -87,6 +99,7 @@
|
|||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="(scope.row.classify.classifyName != '帮助中心' && scope.row.classify.classifyName != '猜你想问' && scope.row.classify.classifyName != '使用问题') || userName == 'admin'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
|
@ -94,6 +107,7 @@
|
|||
v-hasPermi="['system:article:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
v-if="(scope.row.classify.classifyName != '帮助中心' && scope.row.classify.classifyName != '猜你想问' && scope.row.classify.classifyName != '使用问题') || userName == 'admin'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
|
@ -190,7 +204,7 @@ export default {
|
|||
components: { Treeselect },
|
||||
data() {
|
||||
return {
|
||||
// userName: undefined,
|
||||
userName: undefined,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 运营区下拉框
|
||||
|
@ -234,8 +248,8 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
// console.log("当前用户信息:",this.$store.state.user.name)
|
||||
// this.userName = this.$store.state.user.name;
|
||||
console.log("当前用户信息:",this.$store.state.user.name)
|
||||
this.userName = this.$store.state.user.name;
|
||||
this.getList();
|
||||
this.getClassifyTree();
|
||||
},
|
||||
|
|
|
@ -199,6 +199,7 @@
|
|||
} from '@/api/system/articleClassify'
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import { listDept2 } from '@/api/system/dept'
|
||||
|
||||
export default {
|
||||
name: "Dept",
|
||||
|
@ -263,7 +264,7 @@ export default {
|
|||
/** 查询分类列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listDept(this.queryParams).then(response => {
|
||||
listDept2({status: '0',pageNum:1,pageSize:999 }).then(response => {
|
||||
this.deptList = this.handleTree(response.data, "classifyId");
|
||||
this.loading = false;
|
||||
});
|
||||
|
|
|
@ -107,12 +107,17 @@
|
|||
<span class="balance-cell">{{ scope.row.balance }}元</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="收款码" align="center" prop="collectionCode" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.collectionCode" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="200" sortable="custom" :sort-orders="['descending', 'ascending']">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
|
@ -143,17 +148,18 @@
|
|||
@pagination="getList" />
|
||||
|
||||
<!-- 添加或修改运营商对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="运营商名称" label-width="90" prop="deptName">
|
||||
<el-input v-model="form.deptName" style="width: 67%;" placeholder="请输入运营商名称" />
|
||||
<el-form-item label="运营商名称" prop="deptName">
|
||||
<el-input v-model="form.deptName" placeholder="请输入运营商名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="绑定提现账户" prop="phonenumber" label-width="120">
|
||||
<el-select
|
||||
style="width: 80%"
|
||||
ref="headerSearchSelect"
|
||||
v-model="form.appUserId"
|
||||
:remote-method="queryPhonenumber"
|
||||
|
@ -239,7 +245,7 @@
|
|||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="平台服务费(%)" label-width="90" prop="platformServiceFee">
|
||||
<el-input style="width: 65%" v-model="form.platformServiceFee" placeholder="请输入平台服务费" />
|
||||
<el-input style="width: 78%" v-model="form.platformServiceFee" placeholder="请输入平台服务费" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
@ -256,18 +262,25 @@
|
|||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="充值手续费" label-width="90" prop="handlingCharge">
|
||||
<el-input style="width: 65%" v-model="form.handlingCharge" placeholder="请输入充值手续费" />
|
||||
<el-form-item label="充值手续费" prop="handlingCharge">
|
||||
<el-input v-model="form.handlingCharge" placeholder="请输入充值手续费" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="form.handlingChargeType == '1'">
|
||||
<el-form-item label="比例(‰)" label-width="90" >
|
||||
<el-input style="width: 65%" v-model="form.withdrawHandlingCharge" placeholder="请输入手续费" />
|
||||
<el-form-item label="比例(‰)" >
|
||||
<el-input v-model="form.withdrawHandlingCharge" placeholder="请输入手续费" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-else>
|
||||
<el-form-item label="每笔(元)" label-width="90" >
|
||||
<el-input style="width: 65%" v-model="form.withdrawHandlingCharge" placeholder="请输入手续费" />
|
||||
<el-form-item label="每笔(元)" >
|
||||
<el-input v-model="form.withdrawHandlingCharge" placeholder="请输入手续费" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="收款码" prop="collectionCode">
|
||||
<image-upload v-model="form.collectionCode" :limit="1"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -277,26 +290,28 @@
|
|||
<el-switch v-model="form.isUsePlatformApp" class="drawer-switch" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-show="form.isUsePlatformApp != true">
|
||||
<el-form-item label="appid" prop="appid">
|
||||
<el-input style="width: 93%" v-model="form.appid" placeholder="请输入appid" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12" v-show="form.isUsePlatformApp != true">
|
||||
<el-form-item label="appSecret" prop="appSecret">
|
||||
<el-input v-model="form.appSecret" placeholder="请输入appSecret" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-show="form.isUsePlatformApp != true">
|
||||
<el-form-item label="appid" prop="appid">
|
||||
<el-input style="width: 100%" v-model="form.appid" placeholder="请输入appid" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12" v-show="form.isUsePlatformApp != true">
|
||||
<el-form-item label="小程序名称" prop="appName" label-width="90px">
|
||||
<el-input style="width: 93%" v-model="form.appName" placeholder="请输入小程序名称" />
|
||||
<el-input style="width: 100%" v-model="form.appName" placeholder="请输入小程序名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-show="form.isUsePlatformApp != true">
|
||||
<el-form-item label="域名" prop="domain">
|
||||
<el-input style="width: 93%" v-model="form.domain" placeholder="请输入域名" />
|
||||
<el-input style="width: 100%" v-model="form.domain" placeholder="请输入域名" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -305,7 +320,7 @@
|
|||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="商户号" prop="merchantId">
|
||||
<el-input style="width: 93%" v-model="form.merchantId" placeholder="请输入商户号" />
|
||||
<el-input style="width: 100%" v-model="form.merchantId" placeholder="请输入商户号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
@ -675,7 +690,7 @@ export default {
|
|||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加运营商";
|
||||
listDept().then(response => {
|
||||
listDept2({status: '0',pageNum:1,pageSize:999 }).then(response => {
|
||||
// console.log("response=============",response)
|
||||
this.deptOptions = response.data;
|
||||
listArea({ pageNum: 1, pageSize: 999,}).then(response => {
|
||||
|
|
|
@ -343,7 +343,7 @@
|
|||
<script>
|
||||
import { listFee, getFee, delFee, addFee, updateFee } from "@/api/system/fee";
|
||||
import { listArea, selectAreaListByDeptId } from '@/api/system/area'
|
||||
import { listDept, listDeptExcludeChild } from '@/api/system/dept'
|
||||
import { listDept, listDept2, listDeptExcludeChild } from '@/api/system/dept'
|
||||
|
||||
export default {
|
||||
name: "Fee",
|
||||
|
@ -466,8 +466,8 @@ export default {
|
|||
this.userName = this.$store.state.user.name;
|
||||
this.getList();
|
||||
if(this.userName === 'admin'){
|
||||
listDept({status: '0' }).then(response => {
|
||||
this.deptOptions = response.data;
|
||||
listDept2({status: '0',pageNum:1,pageSize:999 }).then(response => {
|
||||
this.deptOptions = response.rows;
|
||||
});
|
||||
}
|
||||
listArea(this.queryParams).then(response => {
|
||||
|
|
|
@ -271,25 +271,65 @@
|
|||
<el-form-item label="计费模板:" >{{ form.rule.name }}</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="form.etRefund">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预约费退款:">{{ formatFee(form.etRefund.appointmentFee) }}</el-form-item>
|
||||
<el-form-item label="调度费退款:">{{ formatFee(form.etRefund.dispatchFee) }}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="骑行费用退款:" >{{ formatFee(form.etRefund.ridingFee) }}</el-form-item>
|
||||
<el-form-item label="停车点外调度费退款:" >{{ formatFee(form.etRefund.manageFee) }}</el-form-item>
|
||||
<el-row v-if="form.etRefunds.length > 0">
|
||||
<el-col :span="24">
|
||||
<el-card v-for="(refund, index) in form.etRefunds" :key="index" class="refund-card">
|
||||
<span style="font-weight: 700">退款{{index+1}}</span>
|
||||
<div class="refund-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预约费退款:">{{ formatFee(refund.appointmentFee) }}</el-form-item>
|
||||
<el-form-item label="运营区外调度费退款:" label-width="100">{{ formatFee(refund.dispatchFee) }}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="骑行费用退款:">{{ formatFee(refund.ridingFee) }}</el-form-item>
|
||||
<el-form-item label="停车点外调度费退款:" label-width="100">{{ formatFee(refund.manageFee) }}</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="退款原因:">{{ refund.reason }}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="退款时间:">{{ refund.createTime }}</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="form.etRefund">
|
||||
<!-- <el-row v-if="form.etRefunds.length > 0">-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item v-for="(refund, index) in form.etRefunds" :key="index" label="预约费退款:">{{ formatFee(refund.appointmentFee) }}</el-form-item>-->
|
||||
<!-- <el-form-item v-for="(refund, index) in form.etRefunds" :key="index" label="调度费退款:">{{ formatFee(refund.dispatchFee) }}</el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item v-for="(refund, index) in form.etRefunds" :key="index" label="骑行费用退款:" >{{ formatFee(refund.ridingFee) }}</el-form-item>-->
|
||||
<!-- <el-form-item v-for="(refund, index) in form.etRefunds" :key="index" label="停车点外调度费退款:" >{{ formatFee(refund.manageFee) }}</el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!--<!– <el-col :span="12">–>-->
|
||||
<!--<!– <el-form-item label="预约费退款:">{{ formatFee(form.etRefund.appointmentFee) }}</el-form-item>–>-->
|
||||
<!--<!– <el-form-item label="调度费退款:">{{ formatFee(form.etRefund.dispatchFee) }}</el-form-item>–>-->
|
||||
<!--<!– </el-col>–>-->
|
||||
<!--<!– <el-col :span="12">–>-->
|
||||
<!--<!– <el-form-item label="骑行费用退款:" >{{ formatFee(form.etRefund.ridingFee) }}</el-form-item>–>-->
|
||||
<!--<!– <el-form-item label="停车点外调度费退款:" >{{ formatFee(form.etRefund.manageFee) }}</el-form-item>–>-->
|
||||
<!--<!– </el-col>–>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- <el-row v-if="form.etRefunds.length > 0">-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item v-for="(refund, index) in etRefunds" :key="index" label="退款原因:">{{ refund.reason }}</el-form-item>-->
|
||||
<!-- <el-form-item v-for="(refund, index) in etRefunds" :key="index" label="退款时间:">{{ refund.createTime }}</el-form-item>-->
|
||||
<!--<!– <el-form-item label="退款原因:">{{ form.etRefund.reason }}</el-form-item>–>-->
|
||||
<!--<!– <el-form-item label="退款时间:">{{ form.etRefund.createTime }}</el-form-item>–>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<el-row v-if="form.etRefunds.length > 0">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="退款原因:">{{ form.etRefund.reason }}</el-form-item>
|
||||
<el-form-item label="退款时间:">{{ form.etRefund.createTime }}</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="form.etRefund">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="结算总费用:">{{ formatFee(form.payFee-form.etRefund.appointmentFee-form.etRefund.dispatchFee-form.etRefund.ridingFee-form.etRefund.manageFee) }}</el-form-item>
|
||||
<el-form-item label="结算总费用:">
|
||||
{{ formatFee(calculateNetFee()) }}
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="结算总费用:">{{ formatFee(form.payFee-form.etRefund.appointmentFee-form.etRefund.dispatchFee-form.etRefund.ridingFee-form.etRefund.manageFee) }}</el-form-item>-->
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
@ -568,6 +608,14 @@ export default {
|
|||
const formattedFee = parseFloat(fee).toFixed(2);
|
||||
return `${formattedFee}元`;
|
||||
},
|
||||
calculateNetFee() {
|
||||
// 计算总退款
|
||||
let totalRefund = this.form.etRefunds.reduce((total, refund) => {
|
||||
return total + refund.appointmentFee + refund.dispatchFee + refund.ridingFee + refund.manageFee;
|
||||
}, 0);
|
||||
// 计算结算总费用
|
||||
return this.form.payFee - totalRefund;
|
||||
},
|
||||
formatStatus(status) {
|
||||
//状态:0-预约中,1-取消预约,2-开始骑行,3-骑行结束,4-订单结束
|
||||
if (!status) return '未知';
|
||||
|
@ -653,6 +701,7 @@ export default {
|
|||
vehicleNum: null,
|
||||
mac: null
|
||||
},
|
||||
etRefunds: [],
|
||||
etRefund: {
|
||||
appointmentFee: null,
|
||||
ridingFee: null,
|
||||
|
@ -794,4 +843,19 @@ export default {
|
|||
.el-dialog:not(.is-fullscreen) {
|
||||
margin-top: 1vh !important;
|
||||
}
|
||||
.refund-card {
|
||||
margin-bottom: 10px; /* 卡片之间的间距 */
|
||||
border: 1px solid #dcdfe6; /* 边框颜色 */
|
||||
border-radius: 4px; /* 边角圆润 */
|
||||
/*padding: 10px; !* 内边距 *!*/
|
||||
}
|
||||
|
||||
.refund-content {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.el-card__body {
|
||||
padding: 10px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
@ -325,7 +325,7 @@ export default {
|
|||
});
|
||||
this.getList();
|
||||
if(this.userName === 'admin'){
|
||||
listDept({status: '0' }).then(response => {
|
||||
listDept({status: '0',pageNum:1,pageSize:999 }).then(response => {
|
||||
this.deptOptions = response.data;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user