Compare commits
9 Commits
dd6be18b7b
...
8c4897c849
Author | SHA1 | Date | |
---|---|---|---|
8c4897c849 | |||
bc4ed94ddb | |||
fed0c963fc | |||
d14b303899 | |||
8f0af93d04 | |||
61cbf02877 | |||
e27bf9bfba | |||
9156c4387d | |||
8bc6a04bbe |
|
@ -5,10 +5,10 @@ VUE_APP_TITLE = 共享电动车管理系统
|
|||
ENV = 'development'
|
||||
|
||||
# 共享电动车管理系统/开发环境
|
||||
VUE_APP_BASE_API = 'https://dche.ccttiot.com/prod-api'
|
||||
# VUE_APP_BASE_API = 'https://dche.ccttiot.com/prod-api'
|
||||
# VUE_APP_BASE_API = 'https://che.chuangtewl.com/prod-api'
|
||||
|
||||
# VUE_APP_BASE_API = 'http://192.168.2.75:8088'
|
||||
VUE_APP_BASE_API = 'http://localhost:8088'
|
||||
|
||||
# 路由懒加载
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
|
|
|
@ -5,8 +5,8 @@ VUE_APP_TITLE = 共享电动车管理系统
|
|||
ENV = 'production'
|
||||
|
||||
# 共享电动车管理系统/生产环境
|
||||
# VUE_APP_BASE_API = 'https://dche.ccttiot.com/prod-api'
|
||||
VUE_APP_BASE_API = 'https://che.chuangtewl.com/prod-api'
|
||||
VUE_APP_BASE_API = 'https://dche.ccttiot.com/prod-api'
|
||||
# VUE_APP_BASE_API = 'https://che.chuangtewl.com/prod-api'
|
||||
|
||||
# 小程序外链跳转设备
|
||||
VUE_APP_WX_DEVICE_URL = 'weixin://dl/business/?appid=wx4d178f8c80348214&env_version=release'
|
||||
|
|
44
src/api/system/channel.js
Normal file
44
src/api/system/channel.js
Normal file
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询充值渠道列表
|
||||
export function listChannel(query) {
|
||||
return request({
|
||||
url: '/system/channel/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询充值渠道详细
|
||||
export function getChannel(channelId) {
|
||||
return request({
|
||||
url: '/system/channel/' + channelId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增充值渠道
|
||||
export function addChannel(data) {
|
||||
return request({
|
||||
url: '/system/channel',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改充值渠道
|
||||
export function updateChannel(data) {
|
||||
return request({
|
||||
url: '/system/channel',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除充值渠道
|
||||
export function delChannel(channelId) {
|
||||
return request({
|
||||
url: '/system/channel/' + channelId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
44
src/api/system/channelWithdraw.js
Normal file
44
src/api/system/channelWithdraw.js
Normal file
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询提现渠道列表
|
||||
export function listChannelWithdraw(query) {
|
||||
return request({
|
||||
url: '/ss/channelWithdraw/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询提现渠道详细
|
||||
export function getChannelWithdraw(channelId) {
|
||||
return request({
|
||||
url: '/ss/channelWithdraw/' + channelId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增提现渠道
|
||||
export function addChannelWithdraw(data) {
|
||||
return request({
|
||||
url: '/ss/channelWithdraw',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改提现渠道
|
||||
export function updateChannelWithdraw(data) {
|
||||
return request({
|
||||
url: '/ss/channelWithdraw',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除提现渠道
|
||||
export function delChannelWithdraw(channelId) {
|
||||
return request({
|
||||
url: '/ss/channelWithdraw/' + channelId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -42,3 +42,12 @@ export function delCoupon(couponId) {
|
|||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 派发优惠券
|
||||
export function issueCoupon(data) {
|
||||
return request({
|
||||
url: '/system/coupon/issue',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
|
|
@ -9,6 +9,15 @@ export function listHardwareVersion(query) {
|
|||
})
|
||||
}
|
||||
|
||||
// 查询硬件版本列表 排除父节点
|
||||
export function listHardwareVersionExcludeParent(query) {
|
||||
return request({
|
||||
url: '/system/hardwareVersion/list/exclude',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询硬件版本详细
|
||||
export function getHardwareVersion(id) {
|
||||
return request({
|
||||
|
|
31
src/components/FormCol/index.vue
Normal file
31
src/components/FormCol/index.vue
Normal file
|
@ -0,0 +1,31 @@
|
|||
<template>
|
||||
<el-col :span="span">
|
||||
<el-form-item :label="label" :prop="prop" :label-width="labelWidth">
|
||||
<slot></slot>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'FormCol',
|
||||
props: {
|
||||
span: {
|
||||
type: Number,
|
||||
default: 24
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
prop: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
labelWidth: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -37,6 +37,8 @@ import ImageUpload from "@/components/ImageUpload"
|
|||
import ImagePreview from "@/components/ImagePreview"
|
||||
// 字典标签组件
|
||||
import DictTag from '@/components/DictTag'
|
||||
// 行内表单组件
|
||||
import FormCol from '@/components/FormCol/index.vue'
|
||||
// 头部标签组件
|
||||
import VueMeta from 'vue-meta'
|
||||
// 字典数据组件
|
||||
|
@ -71,6 +73,7 @@ Vue.component('ImageUpload', ImageUpload)
|
|||
Vue.component('ImagePreview', ImagePreview)
|
||||
Vue.component('AreaMap', AreaMap)
|
||||
Vue.component('Map', Map)
|
||||
Vue.component('FormCol', FormCol)
|
||||
|
||||
Vue.use(directive)
|
||||
Vue.use(plugins)
|
||||
|
|
|
@ -134,6 +134,20 @@ export const dynamicRoutes = [
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/user/user/userName',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['user:user:list'],
|
||||
children: [
|
||||
{
|
||||
path: 'index/:userName',
|
||||
component: () => import('@/views/user/user'),
|
||||
name: 'Data',
|
||||
meta: { title: 'APP用户信息', activeMenu: '/system/user' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/system/device/sn',
|
||||
component: Layout,
|
||||
|
|
53
src/utils/mixins.js
Normal file
53
src/utils/mixins.js
Normal file
|
@ -0,0 +1,53 @@
|
|||
|
||||
// 充值服务费
|
||||
export const $serviceType = {
|
||||
computed: {
|
||||
// 服务费单位
|
||||
serviceUnit() {
|
||||
return (type) => {
|
||||
return type === '2' ? '元' : '%';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 提现服务费
|
||||
export const $withdrawServiceType = {
|
||||
computed: {
|
||||
// 提现服务费单位
|
||||
withdrawServiceUnit() {
|
||||
return (type) => {
|
||||
return type === '2' ? '元' : '%';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 显隐列
|
||||
**/
|
||||
export const $showColumns = {
|
||||
data() {
|
||||
return {
|
||||
columns: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
showColumns() {
|
||||
if (this.columns == null) {
|
||||
return [];
|
||||
}
|
||||
return this.columns.filter(item => item.visible);
|
||||
},
|
||||
isShow() {
|
||||
return (key) => {
|
||||
if (this.columns == null) {
|
||||
return false;
|
||||
}
|
||||
let column = this.columns.find(item => item.key === key);
|
||||
return column != null && column.visible;
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
270
src/views/system/channel/index.vue
Normal file
270
src/views/system/channel/index.vue
Normal file
|
@ -0,0 +1,270 @@
|
|||
<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="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入渠道名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:channel:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="channelList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="ID" align="center" prop="channelId" width="80"/>
|
||||
<el-table-column label="渠道名称" align="center" prop="name"/>
|
||||
<el-table-column label="图片" align="center" prop="picture" width="100">
|
||||
<image-preview slot-scope="d" :src="d.row.picture" :width="32" :height="32"/>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否启用" align="center" prop="enabled">
|
||||
<template slot-scope="d">
|
||||
<el-switch v-model="d.row.enabled" @change="(nv) => {onChangeEnabled(d.row, nv)}"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="渠道成本" align="center" prop="costRate">
|
||||
<template slot-scope="d">{{d.row.costRate | money}} %</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:channel:edit']"
|
||||
>修改</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改充值渠道对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="7em">
|
||||
<form-col :span="span" label="渠道名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入渠道名称" disabled readonly/>
|
||||
</form-col>
|
||||
<form-col :span="span" label="图片" prop="picture">
|
||||
<image-upload v-model="form.picture" :limit="1"/>
|
||||
</form-col>
|
||||
<form-col :span="span" label="是否启用" prop="enabled">
|
||||
<el-switch v-model="form.enabled" />
|
||||
</form-col>
|
||||
<form-col :span="span" label="渠道成本" prop="costRate">
|
||||
<el-input v-model.number="form.costRate" placeholder="请输入充值成本率" :min="0">
|
||||
<template #suffix>%</template>
|
||||
</el-input>
|
||||
</form-col>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listChannel, getChannel, delChannel, addChannel, updateChannel } from "@/api/system/channel";
|
||||
import { $serviceType, $withdrawServiceType } from '@/utils/mixins'
|
||||
|
||||
export default {
|
||||
name: "Channel",
|
||||
mixins: [$serviceType, $withdrawServiceType],
|
||||
dicts: ['withdraw_service_type', 'service_type'],
|
||||
data() {
|
||||
return {
|
||||
span: 24,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 充值渠道表格数据
|
||||
channelList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: null,
|
||||
enabled: null,
|
||||
serviceRate: null,
|
||||
costRate: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
name: [
|
||||
{required: true, message: '渠道名称不能为空', target: 'blur'}
|
||||
],
|
||||
enabled: [
|
||||
{required: true, type: 'boolean', message: '是否启用不能为空', target: 'blur'}
|
||||
],
|
||||
costRate: [
|
||||
{required: true, type: 'number', message: '成本不能为空', target: 'blur'}
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
parseNumber(val) {
|
||||
if (val == null) {
|
||||
return null;
|
||||
}
|
||||
return parseFloat(val);
|
||||
},
|
||||
// 更新是否启用
|
||||
onChangeEnabled(row, enabled) {
|
||||
if (row == null) {
|
||||
return this.$message.warning("参数错误");
|
||||
}
|
||||
updateChannel({channelId: row.channelId, enabled: enabled}).catch(() => {
|
||||
row.enabled = !enabled;
|
||||
})
|
||||
},
|
||||
onChangeWithdrawEnabled(row, enabled) {
|
||||
if (row == null) {
|
||||
return this.$message.warning("参数错误");
|
||||
}
|
||||
updateChannel({channelId: row.channelId, withdrawEnabled: enabled}).catch(() => {
|
||||
row.withdrawEnabled = !enabled;
|
||||
})
|
||||
},
|
||||
/** 查询充值渠道列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listChannel(this.queryParams).then(response => {
|
||||
this.channelList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
channelId: null,
|
||||
name: null,
|
||||
enabled: null,
|
||||
serviceRate: null,
|
||||
costRate: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.channelId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加充值渠道";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const channelId = row.channelId || this.ids
|
||||
getChannel(channelId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改充值渠道";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.channelId != null) {
|
||||
updateChannel(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addChannel(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const channelIds = row.channelId || this.ids;
|
||||
this.$modal.confirm('是否确认删除充值渠道编号为"' + channelIds + '"的数据项?').then(function() {
|
||||
return delChannel(channelIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/channel/export', {
|
||||
...this.queryParams
|
||||
}, `channel_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
385
src/views/system/channelWithdraw/index.vue
Normal file
385
src/views/system/channelWithdraw/index.vue
Normal file
|
@ -0,0 +1,385 @@
|
|||
<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="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入渠道名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="账户类型" prop="accountType">
|
||||
<el-select v-model="queryParams.accountType" placeholder="请选择对应账户类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.account_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="服务费收取类型" prop="serviceType" label-width="8em">
|
||||
<el-select v-model="queryParams.serviceType" placeholder="请选择服务费收取类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.withdraw_service_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用" prop="enabled">
|
||||
<el-radio-group v-model="queryParams.enabled">
|
||||
<el-radio-button :label="true">是</el-radio-button>
|
||||
<el-radio-button :label="false">否</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['ss:channelWithdraw:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="channelWithdrawList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="onSortChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<template v-for="column of showColumns">
|
||||
<el-table-column
|
||||
:key="column.key"
|
||||
:label="column.label"
|
||||
:prop="column.key"
|
||||
:align="column.align"
|
||||
:min-width="column.minWidth"
|
||||
:sort-orders="orderSorts"
|
||||
:sortable="column.sortable"
|
||||
:show-overflow-tooltip="column.overflow"
|
||||
:width="column.width"
|
||||
>
|
||||
<template slot-scope="d">
|
||||
<template v-if="column.key === 'channelId'">
|
||||
{{d.row[column.key]}}
|
||||
</template>
|
||||
<template v-else-if="column.key === 'accountType'">
|
||||
<dict-tag :options="dict.type.account_type" :value="d.row[column.key]"/>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'enabled'">
|
||||
<el-switch v-model="d.row.enabled" @change="(nv ) =>{onChangeEnabled(d.row, nv)}"/>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'serviceType'">
|
||||
<dict-tag :options="dict.type.withdraw_service_type" :value="d.row.serviceType"/>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'serviceRate'">
|
||||
{{d.row.serviceRate | money}} {{withdrawServiceUnit(d.row.serviceType)}}
|
||||
</template>
|
||||
<template v-else-if="column.key === 'costRate'">
|
||||
{{d.row.costRate | money}} %
|
||||
</template>
|
||||
<template v-else-if="column.key === 'picture'">
|
||||
<image-preview :src="d.row.picture" :width="32" :height="32"/>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'minAmount' || column.key === 'maxAmount'">
|
||||
{{d.row[column.key] | money}} 元
|
||||
</template>
|
||||
<template v-else>
|
||||
{{d.row[column.key]}}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['ss:channelWithdraw:edit']"
|
||||
>修改</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改提现渠道对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<form-col :span="span * 2" label="图片" prop="picture">
|
||||
<image-upload v-model="form.picture" :limit="1"/>
|
||||
</form-col>
|
||||
<form-col :span="span" label="渠道名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入渠道名称" />
|
||||
</form-col>
|
||||
<form-col :span="span" label="账户类型" prop="accountType">
|
||||
<el-select v-model="form.accountType" style="width: 100%">
|
||||
<el-option
|
||||
v-for="dict in dict.type.account_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</form-col>
|
||||
<!-- <form-col :span="span * 2" label="服务费收取方式" label-width="9em" prop="serviceType">-->
|
||||
<!-- <el-radio-group v-model="form.serviceType">-->
|
||||
<!-- <el-radio v-for="dict in dict.type.withdraw_service_type" :key="dict.value" :label="dict.value">{{dict.label}}</el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<!-- </form-col>-->
|
||||
<form-col :span="span" label="服务费" prop="serviceRate">
|
||||
<el-input v-model.number="form.serviceRate" :min="0" type="number">
|
||||
<template #suffix>
|
||||
{{withdrawServiceUnit(form.withdrawType)}}
|
||||
</template>
|
||||
</el-input>
|
||||
</form-col>
|
||||
<form-col :span="span" label="渠道成本" prop="costRate">
|
||||
<el-input v-model.number="form.costRate" placeholder="请输入充值成本率" :min="0" type="number">
|
||||
<template #suffix>%</template>
|
||||
</el-input>
|
||||
</form-col>
|
||||
<form-col :span="span" label="单笔最低" prop="minAmount">
|
||||
<el-input v-model.number="form.minAmount" placeholder="请输入单笔最低提现金额" :min="0" type="number">
|
||||
<template #suffix>元</template>
|
||||
</el-input>
|
||||
</form-col>
|
||||
<form-col :span="span" label="单笔最高" prop="maxAmount">
|
||||
<el-input v-model.number="form.maxAmount" placeholder="请输入单笔最高提现金额" :min="0" type="number">
|
||||
<template #suffix>元</template>
|
||||
</el-input>
|
||||
</form-col>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listChannelWithdraw, getChannelWithdraw, delChannelWithdraw, addChannelWithdraw, updateChannelWithdraw } from "@/api/system/channelWithdraw";
|
||||
import { $showColumns, $withdrawServiceType } from '@/utils/mixins'
|
||||
import { updateBill } from '@/api/system/withdraw'
|
||||
|
||||
// 默认排序字段
|
||||
const defaultSort = {
|
||||
prop: "channelId",
|
||||
order: "descending"
|
||||
}
|
||||
|
||||
export default {
|
||||
name: "ChannelWithdraw",
|
||||
mixins: [$showColumns, $withdrawServiceType],
|
||||
dicts: ['account_type', 'withdraw_service_type'],
|
||||
data() {
|
||||
return {
|
||||
span: 12,
|
||||
// 字段列表
|
||||
columns: [
|
||||
{key: 'channelId', visible: true, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"},
|
||||
{key: 'name', visible: true, label: '渠道名称', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'picture', visible: true, label: '图片', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
||||
{key: 'enabled', visible: true, label: '是否启用', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'accountType', visible: true, label: '对应账户类型', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'serviceType', visible: true, label: '服务费收取类型', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'serviceRate', visible: true, label: '服务费', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'costRate', visible: true, label: '渠道成本', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'minAmount', visible: true, label: '单笔最低', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'maxAmount', visible: true, label: '单笔最高', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
],
|
||||
// 排序方式
|
||||
orderSorts: ['ascending', 'descending', null],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 提现渠道表格数据
|
||||
channelWithdrawList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
defaultSort,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
orderByColumn: defaultSort.prop,
|
||||
isAsc: defaultSort.order,
|
||||
channelId: null,
|
||||
name: null,
|
||||
accountType: null,
|
||||
serviceType: null,
|
||||
enabled: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: "渠道名称不能为空", trigger: "blur" }
|
||||
],
|
||||
accountType: [
|
||||
{ required: true, message: "对应账户类型不能为空", trigger: "change" }
|
||||
],
|
||||
serviceType: [
|
||||
{ required: true, message: "服务费收取类型不能为空", trigger: "change" }
|
||||
],
|
||||
serviceRate: [
|
||||
{ required: true, message: "服务费不能为空", trigger: "blur" }
|
||||
],
|
||||
enabled: [
|
||||
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
||||
],
|
||||
costRate: [
|
||||
{ required: true, message: "渠道成本不允许为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
onChangeEnabled(row, enabled) {
|
||||
updateChannelWithdraw({channelId: row.channelId, enabled: enabled}).catch(() => {
|
||||
row.enabled = !enabled;
|
||||
})
|
||||
},
|
||||
/** 当排序按钮被点击时触发 **/
|
||||
onSortChange(column) {
|
||||
if (column.order == null) {
|
||||
this.queryParams.orderByColumn = defaultSort.prop;
|
||||
this.queryParams.isAsc = defaultSort.order;
|
||||
} else {
|
||||
this.queryParams.orderByColumn = column.prop;
|
||||
this.queryParams.isAsc = column.order;
|
||||
}
|
||||
this.getList();
|
||||
},
|
||||
/** 查询提现渠道列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listChannelWithdraw(this.queryParams).then(response => {
|
||||
this.channelWithdrawList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
channelId: null,
|
||||
name: null,
|
||||
accountType: null,
|
||||
serviceType: null,
|
||||
serviceRate: null,
|
||||
enabled: null,
|
||||
costRate: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.channelId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加提现渠道";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const channelId = row.channelId || this.ids
|
||||
getChannelWithdraw(channelId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改提现渠道";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.channelId != null) {
|
||||
updateChannelWithdraw(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addChannelWithdraw(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const channelIds = row.channelId || this.ids;
|
||||
this.$modal.confirm('是否确认删除提现渠道编号为"' + channelIds + '"的数据项?').then(function() {
|
||||
return delChannelWithdraw(channelIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('ss/channelWithdraw/export', {
|
||||
...this.queryParams
|
||||
}, `channelWithdraw_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -19,14 +19,6 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="用户" prop="userName">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.userName"-->
|
||||
<!-- placeholder="请输入用户"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
|
||||
<el-option
|
||||
|
@ -92,6 +84,8 @@
|
|||
<el-table v-loading="loading" :data="couponList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="优惠券id" align="center" prop="couponId" />
|
||||
<el-table-column label="运营区" align="center" prop="areaName" />
|
||||
<el-table-column label="名称" align="center" prop="name" />
|
||||
<el-table-column label="类型" align="center" prop="type">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.et_coupon_type" :value="scope.row.type"/>
|
||||
|
@ -103,21 +97,28 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="折扣比例" align="center" prop="discountPercent" :formatter="formatDiscountPercent"/>
|
||||
<el-table-column label="运营区" align="center" prop="areaName" />
|
||||
<!-- <el-table-column label="用户" align="center" prop="userName" />-->
|
||||
<el-table-column label="抵扣金额" align="center" prop="discountAmount" :formatter="formatDiscountAmount"/>
|
||||
<!-- <el-table-column label="有效时间" align="center" prop="expirationTime" width="180">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ parseTime(scope.row.expirationTime, '{y}-{m}-{d}') }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="零售价" align="center" prop="retailPrice" :formatter="formatRetailPrice"/>
|
||||
<el-table-column label="原价" align="center" prop="originalPrice" :formatter="formatOriginalPrice"/>
|
||||
<el-table-column label="有效期" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ formatValidity(scope.row.validityValue, scope.row.validityUnit) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column label="操作" align="center" width="150" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-present"
|
||||
@click="distributeCoupons(scope.row)"
|
||||
v-hasPermi="['system:coupon:present']"
|
||||
>派发</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
|
@ -147,6 +148,20 @@
|
|||
<!-- 添加或修改优惠券对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="运营区" prop="areaId">
|
||||
<el-select v-model="form.areaId">
|
||||
<el-option
|
||||
filterable
|
||||
v-for="item in areaOptions"
|
||||
:key="item.areaId"
|
||||
:label="item.areaName"
|
||||
:value="item.areaId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="类型" prop="type">
|
||||
<el-select v-model="form.type" placeholder="请选择类型">
|
||||
<el-option
|
||||
|
@ -157,25 +172,51 @@
|
|||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="折扣比例" prop="discountPercent">
|
||||
<el-input v-model="form.discountPercent" placeholder="请输入折扣比例" />
|
||||
<el-form-item label="次数" prop="limitNum" v-if="form.type == 3 || form.type == 4">
|
||||
<el-select v-model="form.limitNum" placeholder="请选择次数">
|
||||
<el-option
|
||||
v-for="dict in dict.type.et_coupon_time_limit"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="运营区" prop="areaId">
|
||||
<el-input v-model="form.areaId" placeholder="请输入运营区" />
|
||||
<el-form-item label="折扣比例" prop="discountPercent" v-if="form.type == 3">
|
||||
<el-input-number v-model='form.discountPercent' :precision="2" :step="0.1" />%
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="用户" prop="userId">-->
|
||||
<!-- <el-input v-model="form.userId" placeholder="请输入用户" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="抵扣金额" prop="discountAmount">
|
||||
<el-input v-model="form.discountAmount" placeholder="请输入抵扣金额" />
|
||||
<el-form-item label="抵扣金额" prop="discountAmount" v-if="form.type == 4">
|
||||
<el-input-number v-model='form.discountAmount' :precision="2" :step="0.1" />元
|
||||
</el-form-item>
|
||||
<el-form-item label="有效时间" prop="expirationTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.expirationTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择有效时间">
|
||||
</el-date-picker>
|
||||
<el-form-item label="零售价" prop="retailPrice">
|
||||
<el-input-number v-model='form.retailPrice' :precision="2" :step="0.1" />元
|
||||
</el-form-item>
|
||||
<el-form-item label="原价" prop="originalPrice">
|
||||
<el-input-number v-model='form.originalPrice' :precision="2" :step="0.1" />元
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否热门" prop="isHot">
|
||||
<el-switch v-model="form.isHot" class="drawer-switch" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="描述" prop="descr">
|
||||
<el-input v-model="form.descr" type="textarea" placeholder="用于前端展示" />
|
||||
</el-form-item>
|
||||
<el-form-item label="有效期" prop="validityValue">
|
||||
<el-input v-model="form.validityValue" placeholder="请输入有效期" type="number">
|
||||
<template #append>
|
||||
<el-select v-model="form.validityUnit" placeholder="请选择时间单位" style="width: 6em">
|
||||
<el-option
|
||||
v-for="dict in dict.type.et_validity_unit"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
|
@ -183,21 +224,80 @@
|
|||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="title3" :visible.sync="open3" width="1000px" append-to-body>
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="手机号码" prop="phonenumber">
|
||||
<el-input
|
||||
v-model="queryParams.phonenumber"
|
||||
placeholder="请输入手机号码"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQueryUser">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange2">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="用户名称" align="center" key="userName" prop="userName" width="100" />
|
||||
<el-table-column label="手机号" align="center" key="phonenumber" prop="phonenumber" width="100" />
|
||||
<el-table-column label="移动端" align="center" key="appName" prop="appName" width="120" />
|
||||
<el-table-column label="最后登录时间" align="center" prop="createTime" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.loginDate) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="注册时间" align="center" prop="createTime" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" key="status" >
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.status"
|
||||
active-value="0"
|
||||
inactive-value="1"
|
||||
@change="handleStatusChange(scope.row)"
|
||||
></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否实名" align="center" prop="isAuthentication">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.et_user_is_authentication" :value="scope.row.isAuthentication" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitIssueForm">派 发</el-button>
|
||||
<el-button @click="cancel3">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listCoupon, getCoupon, delCoupon, addCoupon, updateCoupon } from "@/api/system/coupon";
|
||||
import { listCoupon, getCoupon, delCoupon, addCoupon, updateCoupon, issueCoupon } from '@/api/system/coupon'
|
||||
import { optionselect as getAreaOptionselect } from '@/api/system/area'
|
||||
import { changeUserStatus, listUser } from '@/api/user/user'
|
||||
|
||||
export default {
|
||||
name: "Coupon",
|
||||
dicts: ['et_coupon_type', 'et_coupon_status','et_coupon_time_limit','sys_normal_disable'],
|
||||
dicts: ['et_coupon_type', 'et_coupon_status','et_coupon_time_limit','sys_normal_disable','et_validity_unit','et_user_is_authentication'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
userIds: [],
|
||||
couponId: null,
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
|
@ -210,8 +310,16 @@ export default {
|
|||
couponList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
title3: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
open3: false,
|
||||
// 分区列表
|
||||
areaOptions:[],
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
// 用户表格数据
|
||||
userList: null,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
|
@ -221,6 +329,11 @@ export default {
|
|||
areaId: null,
|
||||
userId: null,
|
||||
discountAmount: null,
|
||||
retailPrice: null,
|
||||
originalPrice: null,
|
||||
descr: null,
|
||||
validityValue: null,
|
||||
validityUnit: null,
|
||||
expirationTime: null,
|
||||
status: null
|
||||
},
|
||||
|
@ -228,16 +341,87 @@ export default {
|
|||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
// userId: [
|
||||
// { required: true, message: "用户不能为空", trigger: "blur" }
|
||||
// ],
|
||||
areaId: [
|
||||
{ required: true, message: '运营区不能为空', trigger: 'blur' },
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '名称不能为空', trigger: 'blur' },
|
||||
],
|
||||
type: [
|
||||
{ required: true, message: '类型不能为空', trigger: 'change' },
|
||||
],
|
||||
retailPrice: [
|
||||
{ required: true, message: '零售价不能为空', trigger: 'blur' },
|
||||
],
|
||||
validityValue: [
|
||||
{ required: true, message: '有效期值不能为空', trigger: 'blur' },
|
||||
],
|
||||
validityUnit: [
|
||||
{ required: true, message: '有效期单位不能为空', trigger: 'change' },
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
getAreaOptionselect().then(response => {
|
||||
this.areaOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 用户状态修改
|
||||
handleStatusChange(row) {
|
||||
let text = row.status === "0" ? "启用" : "停用";
|
||||
this.$modal.confirm('确认要"' + text + '""' + row.userName + '"用户吗?').then(function() {
|
||||
return changeUserStatus(row.userId, row.status);
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess(text + "成功");
|
||||
}).catch(function() {
|
||||
row.status = row.status === "0" ? "1" : "0";
|
||||
});
|
||||
},
|
||||
/** 派发优惠券 */
|
||||
distributeCoupons(row){
|
||||
this.couponId = row.couponId;
|
||||
this.reset();
|
||||
this.open3 = true;
|
||||
this.title3 = "派发优惠券";
|
||||
this.resetQuery();
|
||||
listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
this.userList = response.rows;
|
||||
this.total = response.total;
|
||||
}
|
||||
);
|
||||
},
|
||||
// 方法:将 discountPercent 转换为整数格式用于显示
|
||||
convertDiscountPercentToInteger() {
|
||||
// 判断 discountPercent 是否为空或不是数值
|
||||
if (this.form.discountPercent !== null && this.form.discountPercent !== '' && !isNaN(this.form.discountPercent)) {
|
||||
this.form.discountPercent = Math.round(this.form.discountPercent * 100);
|
||||
} else {
|
||||
this.form.discountPercent = ''; // 如果为空或不是数值,设为默认显示
|
||||
}
|
||||
},
|
||||
formatValidity(value, unit) {
|
||||
if (value == null || unit == null) {
|
||||
return '';
|
||||
}
|
||||
const unitLabel = this.dict.type.et_validity_unit.find(item => item.value === unit)?.label || '';
|
||||
const formattedUnitLabel = (unitLabel === '月' || unitLabel === '季度') ? `个${unitLabel}` : unitLabel;
|
||||
return formattedUnitLabel ? `${value}${formattedUnitLabel}` : '';
|
||||
},
|
||||
formatOriginalPrice(row){
|
||||
if (row.originalPrice === null || row.originalPrice === '') {
|
||||
return '';
|
||||
}
|
||||
return row.originalPrice + '元';
|
||||
},
|
||||
formatRetailPrice(row){
|
||||
if (row.retailPrice === null || row.retailPrice === '') {
|
||||
return '';
|
||||
}
|
||||
return row.retailPrice + '元';
|
||||
},
|
||||
formatDiscountAmount(row){
|
||||
if (row.discountAmount === null || row.discountAmount === '') {
|
||||
return '';
|
||||
|
@ -265,6 +449,11 @@ export default {
|
|||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 取消按钮
|
||||
cancel3() {
|
||||
this.open3 = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
|
@ -285,6 +474,14 @@ export default {
|
|||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
handleQueryUser(){
|
||||
this.loading = true;
|
||||
listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
this.userList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
|
@ -296,6 +493,11 @@ export default {
|
|||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
handleSelectionChange2(selection) {
|
||||
this.userIds = selection.map(item => item.userId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
|
@ -308,6 +510,8 @@ export default {
|
|||
const couponId = row.couponId || this.ids
|
||||
getCoupon(couponId).then(response => {
|
||||
this.form = response.data;
|
||||
this.form.isHot = this.form.isHot === 'true';
|
||||
this.convertDiscountPercentToInteger(); // 转换为显示格式
|
||||
this.open = true;
|
||||
this.title = "修改优惠券";
|
||||
});
|
||||
|
@ -316,6 +520,13 @@ export default {
|
|||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
// 判断 discountPercent 是否为空或不是数值
|
||||
if (this.form.discountPercent !== null && this.form.discountPercent !== '' && !isNaN(this.form.discountPercent)) {
|
||||
// 把 discountPercent 转换为小数格式
|
||||
this.form.discountPercent = this.form.discountPercent / 100;
|
||||
} else {
|
||||
this.form.discountPercent = null; // 如果为空或不是数值,设为 null 或者默认值
|
||||
}
|
||||
if (this.form.couponId != null) {
|
||||
updateCoupon(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
|
@ -332,6 +543,16 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
/** 提交派发 */
|
||||
submitIssueForm() {
|
||||
const userId = this.userIds;
|
||||
// console.log("userId---------------",userId)
|
||||
// console.log("this.couponId============",this.couponId)
|
||||
issueCoupon({userIds:userId, couponId:this.couponId}).then(response => {
|
||||
this.open3 = false;
|
||||
this.$modal.msgSuccess("派发成功");
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const couponIds = row.couponId || this.ids;
|
||||
|
|
|
@ -463,7 +463,7 @@ export default {
|
|||
showSearch: true,
|
||||
// 表格树数据
|
||||
deptList: [],
|
||||
appUserId: null,
|
||||
// appUserId: null,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 运营商树选项
|
||||
|
@ -718,10 +718,10 @@ export default {
|
|||
// this.form.isProfitSharing = this.form.isProfitSharing === 'true';
|
||||
this.form.isUsePlatformApp = this.form.isUsePlatformApp === 'true';
|
||||
console.log("userName==========="+response.data.userName)
|
||||
this.appUserId = this.form.appUserId;
|
||||
if(response.data.userName){
|
||||
this.form.appUserId = response.data.userName;
|
||||
}
|
||||
// this.appUserId = this.form.appUserId;
|
||||
// if(response.data.userName){
|
||||
// this.form.appUserId = response.data.userName;
|
||||
// }
|
||||
listArea({ pageNum: 1, pageSize: 999}).then(response => {
|
||||
this.areaOptions = response.rows;
|
||||
});
|
||||
|
|
|
@ -809,7 +809,7 @@
|
|||
</el-date-picker>
|
||||
</el-row>
|
||||
<!-- <el-row style="margin-bottom: 0.5em">
|
||||
|
||||
|
||||
</el-row> -->
|
||||
<location-map
|
||||
v-if="showPlaceSearchMap && tripRouteStr != ''"
|
||||
|
@ -904,8 +904,8 @@ import {
|
|||
import { listDept2 } from "@/api/system/dept";
|
||||
import {
|
||||
getHardwareVersion,
|
||||
listHardwareVersion,
|
||||
} from "@/api/system/hardwareVersion";
|
||||
listHardwareVersion, listHardwareVersionExcludeParent
|
||||
} from '@/api/system/hardwareVersion'
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
||||
|
@ -936,6 +936,7 @@ export default {
|
|||
return {
|
||||
userName: undefined,
|
||||
activeIndex: "1",
|
||||
isUpdating: false, // 标志位
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
loading2: true,
|
||||
|
@ -1032,8 +1033,8 @@ export default {
|
|||
window.removeEventListener("scroll", this.handleScroll, true);
|
||||
},
|
||||
created() {
|
||||
listHardwareVersion(this.queryParams).then((response) => {
|
||||
this.hardwareVersionOptions = response.rows;
|
||||
listHardwareVersionExcludeParent(this.queryParams).then((response) => {
|
||||
this.hardwareVersionOptions = response.data;
|
||||
this.loading2 = false;
|
||||
});
|
||||
console.log("当前用户信息:", this.$store.state.user.name);
|
||||
|
@ -1072,13 +1073,19 @@ export default {
|
|||
},
|
||||
watch: {
|
||||
"form.modelId": function (newVal) {
|
||||
this.fetchData(newVal);
|
||||
if (!this.isUpdating) {
|
||||
this.fetchData(newVal);
|
||||
}
|
||||
},
|
||||
"form.deptId": function (newVal) {
|
||||
this.fetchData2(newVal);
|
||||
if (!this.isUpdating) {
|
||||
this.fetchData2(newVal);
|
||||
}
|
||||
},
|
||||
"form.areaId": function (newVal) {
|
||||
this.fetchData3(newVal);
|
||||
if (!this.isUpdating) {
|
||||
this.fetchData3(newVal);
|
||||
}
|
||||
},
|
||||
"form.hardwareVersionId": function (hardwareVersionId) {
|
||||
if (hardwareVersionId) {
|
||||
|
@ -1156,8 +1163,8 @@ export default {
|
|||
/** 当选择车型时调用 */
|
||||
fetchData(modelId) {
|
||||
if (modelId) {
|
||||
this.isUpdating = true; // 设置标志位
|
||||
getModel(modelId).then((response) => {
|
||||
// console.log("根据车型id查询运营商=========",response.data)
|
||||
this.areaOptions = response.data.areaList;
|
||||
let areaOptions = response.data.areaList;
|
||||
if (response.data.operator) {
|
||||
|
@ -1168,6 +1175,8 @@ export default {
|
|||
areaOptions.length > 0
|
||||
? (this.form.areaId = areaOptions[0].areaId)
|
||||
: (this.form.areaId = null);
|
||||
}).finally(() => {
|
||||
this.isUpdating = false; // 清除标志位
|
||||
});
|
||||
} else {
|
||||
this.reset2();
|
||||
|
@ -1176,8 +1185,8 @@ export default {
|
|||
/** 当选择运营商时 根据运营商id,获取运营区和型号 */
|
||||
fetchData2(deptId) {
|
||||
if (deptId) {
|
||||
this.isUpdating = true; // 设置标志位
|
||||
selectAreaListByDeptId(deptId).then((response) => {
|
||||
console.log("根据运营商id,获取运营区和型号=========", response.data);
|
||||
this.areaOptions = response.data.areaList;
|
||||
let areaOptions = response.data.areaList;
|
||||
areaOptions.length > 0
|
||||
|
@ -1188,6 +1197,8 @@ export default {
|
|||
modelOptions.length > 0
|
||||
? (this.form.modelId = modelOptions[0].modelId)
|
||||
: (this.form.modelId = null);
|
||||
}).finally(() => {
|
||||
this.isUpdating = false; // 清除标志位
|
||||
});
|
||||
} else {
|
||||
this.reset2();
|
||||
|
@ -1198,18 +1209,17 @@ export default {
|
|||
/** 当选择运营区时 根据运营区id,获取运营商和型号 */
|
||||
fetchData3(areaId) {
|
||||
if (areaId) {
|
||||
selectDeptByAreaId(areaId).then((response) => {
|
||||
console.log("根据运营商id,获取运营区和型号=========", response.data);
|
||||
this.form.deptId = response.data.sysDept.deptId;
|
||||
// this.areaOptions = response.data.areaList;
|
||||
// let areaOptions = response.data.areaList;
|
||||
// areaOptions.length > 0 ? this.form.areaId = areaOptions[0].areaId : this.form.areaId = null;
|
||||
this.modelOptions = response.data.modelList;
|
||||
let modelOptions = response.data.modelList;
|
||||
modelOptions.length > 0
|
||||
? (this.form.modelId = modelOptions[0].modelId)
|
||||
: (this.form.modelId = null);
|
||||
});
|
||||
this.isUpdating = true; // 设置标志位
|
||||
selectDeptByAreaId(areaId).then((response) => {
|
||||
this.form.deptId = response.data.sysDept.deptId;
|
||||
this.modelOptions = response.data.modelList;
|
||||
let modelOptions = response.data.modelList;
|
||||
modelOptions.length > 0
|
||||
? (this.form.modelId = modelOptions[0].modelId)
|
||||
: (this.form.modelId = null);
|
||||
}).finally(() => {
|
||||
this.isUpdating = false; // 清除标志位
|
||||
});
|
||||
} else {
|
||||
this.reset2();
|
||||
}
|
||||
|
@ -1483,13 +1493,13 @@ export default {
|
|||
endTime: this.formatDate(this.endTime),
|
||||
};
|
||||
this.showPlaceSearchMap=false
|
||||
|
||||
|
||||
gettrajectory(data).then((response) => {
|
||||
this.tripRouteStr = response.data;
|
||||
// this.re
|
||||
this.showPlaceSearchMap=true
|
||||
setTimeout(() => {
|
||||
|
||||
|
||||
this.$refs.map.trajectory();
|
||||
}, 600);
|
||||
|
||||
|
|
|
@ -55,8 +55,11 @@
|
|||
<el-table-column label="应用运营区" align="center" prop="areaName"/>
|
||||
<el-table-column label="套餐名称" align="center" prop="name" />
|
||||
<el-table-column label="说明" :show-overflow-tooltip="true" align="center" prop="instructions" />
|
||||
<!-- <el-table-column label="时间(小时)" align="center" prop="time" />
|
||||
<el-table-column label="费用(元)" align="center" prop="fee" /> -->
|
||||
<el-table-column label="价格说明" align="left" prop="description" >
|
||||
<template slot-scope="scope">
|
||||
<div v-html="appUserNameFormatter(scope.row.description)"></div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status" />
|
||||
|
@ -475,6 +478,9 @@ export default {
|
|||
});
|
||||
},
|
||||
methods: {
|
||||
appUserNameFormatter(value){
|
||||
return value ? value.split(',').join('<br>') : '';
|
||||
},
|
||||
getAreaListByDeptId(deptId){
|
||||
console.log('---------------deptId:', deptId)
|
||||
if(deptId){
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<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="areaId" v-if="userName == 'admin'">
|
||||
<el-select v-model="queryParams.areaId" filterable placeholder="请选择运营区" clearable>
|
||||
<el-select v-model="queryParams.areaId" filterable placeholder="请选择运营区" style="width: 9em" clearable>
|
||||
<el-option
|
||||
v-for="item in areaOptions"
|
||||
:key="item.areaId"
|
||||
|
@ -15,18 +15,19 @@
|
|||
<el-input
|
||||
v-model="queryParams.orderNo"
|
||||
placeholder="请输入关联订单号"
|
||||
style="width: 12em"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="第三方交易单号" label-width="100" prop="outTradeNo">
|
||||
<el-input
|
||||
v-model="queryParams.outTradeNo"
|
||||
placeholder="请输入第三方交易单号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="第三方交易单号" label-width="100" prop="outTradeNo">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.outTradeNo"-->
|
||||
<!-- placeholder="请输入第三方交易单号"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="收支类型" prop="type">
|
||||
<el-select style="width: 100px" v-model="queryParams.type" placeholder="请选择收支类型" clearable>
|
||||
<el-option
|
||||
|
@ -47,20 +48,20 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付方式" prop="payType">
|
||||
<el-select style="width: 150px" v-model="queryParams.payType" placeholder="请选择业务类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.et_pay_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="支付方式" prop="payType">-->
|
||||
<!-- <el-select style="width: 150px" v-model="queryParams.payType" placeholder="请选择业务类型" clearable>-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in dict.type.et_pay_type"-->
|
||||
<!-- :key="dict.value"-->
|
||||
<!-- :label="dict.label"-->
|
||||
<!-- :value="dict.value"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="交易时间">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
style="width: 220px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
|
@ -68,6 +69,16 @@
|
|||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="型号" prop="modelId" >
|
||||
<el-select v-model="queryParams.modelId" filterable placeholder="请选择型号" style="width: 8em" clearable>
|
||||
<el-option
|
||||
v-for="item in modelOptions"
|
||||
:key="item.modelId"
|
||||
:label="item.model"
|
||||
:value="item.modelId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
|
@ -98,8 +109,15 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="区域" align="center" prop="areaName" />
|
||||
<el-table-column label="所属人" align="center" prop="owner" />
|
||||
<el-table-column label="关联订单号" width="260" align="center" prop="orderNo" />
|
||||
<el-table-column label="第三方交易单号" width="250" align="center" prop="outTradeNo" />
|
||||
<!-- <el-table-column label="关联订单号" width="180" align="center" prop="orderNo" />-->
|
||||
<el-table-column align="center" label="关联订单号" width="180" prop="orderNo">
|
||||
<template slot-scope="scope">
|
||||
<router-link :to="'/system/order/index/' + scope.row.orderNo" class="link-type">
|
||||
<span>{{ scope.row.orderNo }}</span>
|
||||
</router-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="第三方交易单号" width="180" align="center" prop="outTradeNo" />-->
|
||||
<el-table-column label="收支类型" align="center" prop="type">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.et_flow_type" :value="scope.row.type"/>
|
||||
|
@ -110,22 +128,23 @@
|
|||
<dict-tag :options="dict.type.et_business_type" :value="scope.row.busType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交易金额" align="center" prop="amount" :formatter="formatAmount"/>
|
||||
<el-table-column label="支付手续费" align="center" prop="handlingCharge" :formatter="formatAmount"/>
|
||||
<el-table-column label="平台服务费" align="center" prop="platformServiceFee" :formatter="formatAmount"/>
|
||||
<el-table-column label="账变金额" align="center" prop="operatorDividend" :formatter="formatAmount"/>
|
||||
<!-- <el-table-column label="交易金额" align="center" prop="amount" :formatter="formatAmount"/>-->
|
||||
<!-- <el-table-column label="支付手续费" align="center" prop="handlingCharge" :formatter="formatAmount"/>-->
|
||||
<!-- <el-table-column label="平台服务费" align="center" prop="platformServiceFee" :formatter="formatAmount"/>-->
|
||||
<el-table-column label="账变金额" align="left" prop="operatorDividend" :formatter="formatAmount2"/>
|
||||
<el-table-column label="运营商结余" align="center" prop="operatorBalance" :formatter="formatAmount"/>
|
||||
<!-- <el-table-column label="合伙人分账" align="center" prop="partnerDividend" :formatter="formatAmount"/>-->
|
||||
<el-table-column label="支付方式" align="center" prop="payType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.et_pay_type" :value="scope.row.payType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.et_flow_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="支付方式" align="center" prop="payType">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.et_pay_type" :value="scope.row.payType"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="状态" align="center" prop="status">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.et_flow_status" :value="scope.row.status"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="车型" align="center" prop="model" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
|
@ -205,6 +224,7 @@
|
|||
<script>
|
||||
import { listFlow, getFlow, delFlow, addFlow, updateFlow } from "@/api/system/flow";
|
||||
import { optionselect as getAreaOptionselect } from '@/api/system/area'
|
||||
import { listModel } from '@/api/system/model'
|
||||
|
||||
export default {
|
||||
name: "Flow",
|
||||
|
@ -222,6 +242,7 @@ export default {
|
|||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
areaOptions: [],
|
||||
modelOptions: [],
|
||||
// 选中数组
|
||||
userName: undefined,
|
||||
// 日期范围
|
||||
|
@ -239,6 +260,7 @@ export default {
|
|||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
areaId: null,
|
||||
modelId: null,
|
||||
orderNo: null,
|
||||
outTradeNo: null,
|
||||
type: null,
|
||||
|
@ -262,8 +284,14 @@ export default {
|
|||
this.userName = this.$store.state.user.name;
|
||||
this.getList();
|
||||
this.getAreaList();
|
||||
this.getModelList();
|
||||
},
|
||||
methods: {
|
||||
getModelList() { // getAreaOptionselect()
|
||||
listModel(this.queryParams).then(response => {
|
||||
this.modelOptions = response.rows;
|
||||
});
|
||||
},
|
||||
/** 查询字典类型列表 */
|
||||
getAreaList() {
|
||||
getAreaOptionselect().then(response => {
|
||||
|
@ -274,6 +302,19 @@ export default {
|
|||
const key = column.property;
|
||||
return parseFloat(row[key] || 0).toFixed(2);
|
||||
},
|
||||
formatAmount2(row) {
|
||||
if (row.operatorDividend == null) return '';
|
||||
// 将值转换为字符串,检查是否带有 "-"
|
||||
let amount = parseFloat(row.operatorDividend).toFixed(2);
|
||||
|
||||
// 如果带有 "-",则直接返回原值
|
||||
if (amount.startsWith('-')) {
|
||||
return amount;
|
||||
}
|
||||
|
||||
// 如果不带 "-",在前面加上 "+"
|
||||
return `+${amount}`;
|
||||
},
|
||||
/** 查询资金流水列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
|
|
|
@ -100,6 +100,14 @@
|
|||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:hardwareVersion:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-if="scope.row.parentId == 0"
|
||||
@click="handleAddChild(scope.row)"
|
||||
v-hasPermi="['system:hardwareVersion:edit']"
|
||||
>新增</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
|
@ -254,7 +262,16 @@ export default {
|
|||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加硬件版本";
|
||||
this.form.parentId = 0;
|
||||
this.title = "添加批次版本";
|
||||
},
|
||||
/** 添加子版本 */
|
||||
handleAddChild(row) {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
console.log("row:",row)
|
||||
this.form.parentId = row.id;
|
||||
this.title = "添加子版本";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
|
|
|
@ -87,37 +87,64 @@
|
|||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="订单id" align="center" prop="orderId" />-->
|
||||
<el-table-column label="区域" align="center" prop="area" />
|
||||
<el-table-column label="订单号" align="center" prop="orderNo" width="200"/>
|
||||
<el-table-column label="用户" align="center" prop="userName" width="100"/>
|
||||
<el-table-column label="设备SN" align="center" prop="sn" >
|
||||
<el-table-column label="订单号" align="center" prop="orderNo" width="120"/>
|
||||
<el-table-column label="用户" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<router-link :to="'/system/device/sn/index/' + scope.row.sn" class="link-type">
|
||||
<span>{{ scope.row.sn }}</span>
|
||||
<router-link :to="'/user/user/userName/index/' + scope.row.userName" class="link-type">
|
||||
<span>{{ scope.row.userName }}</span>
|
||||
</router-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="车牌号" align="center" prop="vehicleNum" >
|
||||
<el-table-column label="设备信息" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<router-link :to="'/system/device/vehicleNum/index/' + scope.row.vehicleNum" class="link-type">
|
||||
<span>{{ scope.row.vehicleNum }}</span>
|
||||
</router-link>
|
||||
<div>
|
||||
<router-link :to="'/system/device/sn/index/' + scope.row.sn" class="link-type">
|
||||
<span>SN: {{ scope.row.sn }}</span>
|
||||
</router-link>
|
||||
<br />
|
||||
<router-link :to="'/system/device/vehicleNum/index/' + scope.row.vehicleNum" class="link-type">
|
||||
<span>车牌号: {{ scope.row.vehicleNum }}</span>
|
||||
</router-link>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="设备SN" align="center" prop="sn" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <router-link :to="'/system/device/sn/index/' + scope.row.sn" class="link-type">-->
|
||||
<!-- <span>{{ scope.row.sn }}</span>-->
|
||||
<!-- </router-link>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="车牌号" align="center" prop="vehicleNum" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <router-link :to="'/system/device/vehicleNum/index/' + scope.row.vehicleNum" class="link-type">-->
|
||||
<!-- <span>{{ scope.row.vehicleNum }}</span>-->
|
||||
<!-- </router-link>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.et_order_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="90">
|
||||
<el-table-column label="创建时间/开始骑行" align="center" width="135">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开始骑行" align="center" prop="unlockTime" width="90">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.unlockTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
<div>
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span><br />
|
||||
<span>{{ parseTime(scope.row.unlockTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="创建时间" align="center" prop="createTime" width="90">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="开始骑行" align="center" prop="unlockTime" width="90">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ parseTime(scope.row.unlockTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="结束骑行" align="center" prop="returnTime" width="90">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.returnTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
|
@ -134,9 +161,23 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="金额(元)" align="center" prop="totalFee" width="70"/>
|
||||
<el-table-column label="备注" align="center" prop="mark" />
|
||||
<el-table-column label="订单时长" align="center" prop="duration" :formatter="formatDuration"/>
|
||||
<el-table-column label="距离" align="center" prop="distance" :formatter="formatDistance"/>
|
||||
<!-- <el-table-column label="备注" align="center" prop="mark" />-->
|
||||
<!-- <el-table-column label="交易金额" align="center" prop="amount" :formatter="formatAmount"/>-->
|
||||
<el-table-column label="手续费" align="center" prop="handlingCharge" :formatter="formatAmount"/>
|
||||
<el-table-column label="成本" align="center" prop="handlingCharge" :formatter="formatAmount"/>
|
||||
<el-table-column label="服务费" align="center" prop="platformServiceFee" :formatter="formatAmount"/>
|
||||
<el-table-column label="到账金额" align="center" prop="platformServiceFee" :formatter="formatAmount"/>
|
||||
<!-- <el-table-column label="订单时长" align="center" prop="duration" :formatter="formatDuration"/>-->
|
||||
<!-- <el-table-column label="距离" align="center" prop="distance" :formatter="formatDistance"/>-->
|
||||
<el-table-column label="订单信息" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
<span>时长: {{ formatDuration(scope.row) }}</span><br />
|
||||
<span>距离: {{ formatDistance(scope.row) }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" width="150" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
|
@ -560,6 +601,10 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
formatAmount(row, column) {
|
||||
const key = column.property;
|
||||
return parseFloat(row[key] || 0).toFixed(2);
|
||||
},
|
||||
confirmDeduction(){
|
||||
// 扣款金额 1. 退剩余押金
|
||||
this.$refs["form4"].validate(valid => {
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="scope.row.rechargeType == '2' && !scope.row.isRefunded"
|
||||
v-if="scope.row.rechargeType == '2' && !scope.row.isRefunded && scope.row.depositDeduction == '0'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
|
|
|
@ -47,12 +47,13 @@
|
|||
<el-table-column label="时间" align="center" prop="day" />
|
||||
<el-table-column label="运营商" align="center" prop="deptName" />
|
||||
<el-table-column label="运营区" align="center" prop="areaName" />
|
||||
<el-table-column label="累计营收" align="center" prop="income" />
|
||||
<el-table-column label="运营商分账" align="center" prop="deptFee" />
|
||||
<el-table-column label="合伙人分账" align="center" prop="partnerFee" />
|
||||
<el-table-column label="订单收入" align="center" prop="payFee" />
|
||||
<el-table-column label="退款" align="center" prop="refundFee" />
|
||||
<el-table-column label="手续费" align="center" prop="serviceFee" />
|
||||
<el-table-column label="平台服务费" align="center" prop="platformServiceFee" />
|
||||
<el-table-column label="骑行订单" align="center" prop="ridingFee" />
|
||||
<el-table-column label="调度费用" align="center" prop="dispatchFee" />
|
||||
<el-table-column label="累计营收" align="center" prop="income" />
|
||||
<el-table-column label="运营商分账" align="center" prop="income" />
|
||||
<el-table-column label="合伙人分账" align="center" prop="partnerFee" />
|
||||
</el-table>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -149,7 +149,6 @@
|
|||
<template slot-scope="scope">
|
||||
<span class="link-type" @click="handleBandSysUser(scope.row.userId)">
|
||||
<div v-html="appUserNameFormatter(scope.row.appUserName)"></div>
|
||||
<!-- {{ appUserNameFormatter(scope.row.appUserName) }}-->
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
|
@ -170,28 +170,25 @@
|
|||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="提现详细" :visible.sync="open3" width="700px" append-to-body>
|
||||
<el-dialog title="提现详细" :visible.sync="open3" width="1000px" append-to-body>
|
||||
<el-form ref="form3" :model="form3" label-width="100px" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="申请人:">{{ form3.owner }}</el-form-item>
|
||||
<el-form-item label="区域:">{{ form3.areaName }}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="提现金额:"><span style="color: red;font-weight: 700">{{ form3.amount + form3.handlingCharge }}</span> 元</el-form-item>
|
||||
<el-form-item label="支付手续费:"><span style="color: red;font-weight: 700">{{ form3.handlingCharge }}</span> 元</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="实际到账:"><span style="color: red;font-weight: 700">{{ form3.amount }}</span> 元</el-form-item>
|
||||
<el-form-item label="运营商结余:"><span style="color: red;font-weight: 700">{{ form3.operatorBalance }}</span> 元</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="申请时间:">{{ form3.createTime }}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="状态:">
|
||||
<dict-tag :options="dict.type.et_flow_status" :value="form3.status"/>
|
||||
</el-form-item>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="申请人:">{{ form3.owner }}</el-form-item>
|
||||
<el-form-item label="区域:">{{ form3.areaName }}</el-form-item>
|
||||
<el-form-item label="提现金额:"><span style="font-weight: 700">{{ form3.amount + form3.handlingCharge }}</span> 元</el-form-item>
|
||||
<el-form-item label="支付手续费:"><span style="font-weight: 700">{{ form3.handlingCharge }}</span> 元</el-form-item>
|
||||
<el-form-item label="实际到账:"><span style="color: red;font-weight: 700">{{ form3.amount }}</span> 元</el-form-item>
|
||||
<el-form-item label="运营商结余:"><span style="font-weight: 700">{{ form3.operatorBalance }}</span> 元</el-form-item>
|
||||
<el-form-item label="申请时间:">{{ form3.createTime }}</el-form-item>
|
||||
<el-form-item label="状态:">
|
||||
<dict-tag :options="dict.type.et_flow_status" :value="form3.status"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<img :src="collectionCode" alt="收款码" style="max-width: 100%; height: auto;">
|
||||
</el-col>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="驳回原因" prop="rejectReason">
|
||||
|
@ -213,7 +210,7 @@
|
|||
<script>
|
||||
import { listFlow, getFlow, delFlow, updateFlow, withdraw, rejectWithdraw } from '@/api/system/flow'
|
||||
import { optionselect as getAreaOptionselect } from '@/api/system/area'
|
||||
import { getDeptByToken, listDept, listDept2 } from '@/api/system/dept'
|
||||
import { getDept, getDeptByToken, listDept, listDept2 } from '@/api/system/dept'
|
||||
|
||||
export default {
|
||||
name: "Flow",
|
||||
|
@ -308,6 +305,7 @@ export default {
|
|||
// 表单参数
|
||||
form: {},
|
||||
form3: {},
|
||||
collectionCode:null,
|
||||
// 表单校验
|
||||
rules: {
|
||||
amount: [
|
||||
|
@ -352,9 +350,12 @@ export default {
|
|||
},
|
||||
/** 审核 */
|
||||
handleEdit(row) {
|
||||
this.open3 = true;
|
||||
this.form3 = row;
|
||||
this.view = false;
|
||||
getDept(row.ownerId).then(response => {
|
||||
this.collectionCode = response.data.collectionCode;
|
||||
this.open3 = true;
|
||||
this.form3 = row;
|
||||
this.view = false;
|
||||
});
|
||||
},
|
||||
/** 通过 */
|
||||
pass(){
|
||||
|
@ -508,20 +509,24 @@ export default {
|
|||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.el-select {
|
||||
.el-input__inner{
|
||||
color: red;
|
||||
}
|
||||
.el-select {
|
||||
.el-input__inner{
|
||||
color: red;
|
||||
}
|
||||
|
||||
}
|
||||
.el-input{
|
||||
.el-input__inner{
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
.el-input{
|
||||
.el-input__inner{
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
.amoun-tips{
|
||||
color: red;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.el-dialog__body {
|
||||
padding: 0px 20px !important;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -145,22 +145,22 @@
|
|||
<dict-tag :options="dict.type.et_user_is_authentication" :value="scope.row.isAuthentication" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="240"
|
||||
class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
plain
|
||||
type="text"
|
||||
icon="el-icon-present"
|
||||
@click="distributeCoupons(scope.row)"
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>派发优惠券</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="操作"-->
|
||||
<!-- align="center"-->
|
||||
<!-- width="240"-->
|
||||
<!-- class-name="small-padding fixed-width">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- plain-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-present"-->
|
||||
<!-- @click="distributeCoupons(scope.row)"-->
|
||||
<!-- v-hasPermi="['system:user:edit']"-->
|
||||
<!-- >派发优惠券</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
|
@ -318,6 +318,7 @@
|
|||
</el-form-item>
|
||||
<el-table v-loading="loading" :data="couponList" @selection-change="handleSelectionChange2">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="运营区" align="center" prop="areaName" />
|
||||
<el-table-column label="类型" align="center" prop="type">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.et_coupon_type" :value="scope.row.type"/>
|
||||
|
@ -329,14 +330,9 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="折扣比例" align="center" prop="discountPercent" :formatter="formatDiscountPercent"/>
|
||||
<el-table-column label="运营区" align="center" prop="areaName" />
|
||||
<el-table-column label="用户" align="center" prop="userName" width="120"/>
|
||||
<el-table-column label="抵扣金额" align="center" prop="discountAmount" :formatter="formatDiscountAmount"/>
|
||||
<el-table-column label="有效期" align="center" prop="validityValue" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ formatValidity(scope.row)}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零售价" align="center" prop="retailPrice" :formatter="formatRetailPrice"/>
|
||||
<el-table-column label="原价" align="center" prop="originalPrice" :formatter="formatOriginalPrice"/>
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
|
||||
|
@ -504,6 +500,10 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
const userName = this.$route.params && this.$route.params.userName;
|
||||
if (userName != null) {
|
||||
this.queryParams.userName = userName;
|
||||
}
|
||||
this.getList();
|
||||
this.getAreaList();
|
||||
this.getConfigKey("sys.user.initPassword").then(response => {
|
||||
|
@ -519,6 +519,18 @@ export default {
|
|||
this.areaOptions = response.data;
|
||||
});
|
||||
},
|
||||
formatOriginalPrice(row){
|
||||
if (row.originalPrice === null || row.originalPrice === '') {
|
||||
return '';
|
||||
}
|
||||
return row.originalPrice + '元';
|
||||
},
|
||||
formatRetailPrice(row){
|
||||
if (row.retailPrice === null || row.retailPrice === '') {
|
||||
return '';
|
||||
}
|
||||
return row.retailPrice + '元';
|
||||
},
|
||||
formatValidity(row){
|
||||
let selectDictLabel = this.selectDictLabel(this.dict.type.et_validity_unit, row.validityUnit)
|
||||
if (selectDictLabel != null) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user