Compare commits

...

2 Commits

Author SHA1 Message Date
162f23fd3b 111 2025-01-04 11:04:27 +08:00
3f7a0f8553 111 2025-01-03 15:31:56 +08:00
9 changed files with 450 additions and 155 deletions

41
.cursorrules Normal file
View File

@ -0,0 +1,41 @@
# 项目背景
这是一个基于RuoYi-Vue的共享空间项目后台管理系统共享空间包含共享茶室、共享棋牌室、共享台球室主要用于管理空间中的智能开关设备、店铺、房间、商户、用户、订单、支付、设备、设备型号、软硬件管理、保洁管理、财务管理、渠道管理、文章管理等。
项目结构:
店铺:商户下可以有多个店铺
房间:空间,包含大厅、茶室、棋牌室、卫生间等、统称房间。
设施:台球、麻将机、房间门、店门等可以安装开关设备的统称为设施。
设备:就是一个开关设备,可以控制设施的开关状态。
# 主要框架
- Vue2
- Element-UI
- Axios
- Vuex
- Vue-Router
# 编码标准
- 变量和函数名使用 camelCase 规范,组件名使用 PascalCase
- 组件的样式使用 scoped 属性,避免样式污染
- 样式使用scss
- props、data、methods、computed、watch 生命周期函数等都使用驼峰命名
- 对于全局能够重复使用的组件,尽量封装成组件,并放在 src/components 目录下
- 对于业务能够重复使用的组件,尽量封装成组件,并放在 src/views/{模块名}/components 目录下
- 所有请求都需要在 src/api/{模块名}.js 文件中定义,并保持统一的命名规范,使用时统一调用
- 业务操作尽量封装成方法或组件
- table中的数据使用columns定义具体可以参考其他组件
- 保持与现有代码风格一致
- 代码需要具有可读性,注释清晰,后续可拓展
- 生成的代码需要自动导入相关依赖,这点很重要
# 项目结构
- src/api 目录下存放接口文件
- src/assets 目录下存放静态资源
- src/components 目录下存放全局组件
- src/views 目录下存放页面
- src/utils 目录下存放工具类
- src/utils/constants.js 目录下存放常量
- src/views/system 目录下存放系统相关页面
# 文档规范
- 使用 JSDoc 格式编写函数和组件的注释

10
jsconfig.json Normal file
View File

@ -0,0 +1,10 @@
{
"compilerOptions": {
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
}
},
"include": ["src/**/*"],
"exclude": ["node_modules"]
}

View File

@ -1,6 +1,6 @@
import request from '@/utils/request'
// 查询退款订单列表
// 查询退款列表
export function listRefund(query) {
return request({
url: '/system/refund/list',
@ -9,7 +9,7 @@ export function listRefund(query) {
})
}
// 查询退款订单详细
// 查询退款详细
export function getRefund(id) {
return request({
url: '/system/refund/' + id,
@ -17,7 +17,7 @@ export function getRefund(id) {
})
}
// 新增退款订单
// 新增退款
export function addRefund(data) {
return request({
url: '/system/refund',
@ -26,7 +26,7 @@ export function addRefund(data) {
})
}
// 修改退款订单
// 修改退款
export function updateRefund(data) {
return request({
url: '/system/refund',
@ -35,7 +35,7 @@ export function updateRefund(data) {
})
}
// 删除退款订单
// 删除退款
export function delRefund(id) {
return request({
url: '/system/refund/' + id,

44
src/api/system/refund2.js Normal file
View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询退款订单列表
export function listRefund(query) {
return request({
url: '/system/refund/list',
method: 'get',
params: query
})
}
// 查询退款订单详细
export function getRefund(id) {
return request({
url: '/system/refund/' + id,
method: 'get'
})
}
// 新增退款订单
export function addRefund(data) {
return request({
url: '/system/refund',
method: 'post',
data: data
})
}
// 修改退款订单
export function updateRefund(data) {
return request({
url: '/system/refund',
method: 'put',
data: data
})
}
// 删除退款订单
export function delRefund(id) {
return request({
url: '/system/refund/' + id,
method: 'delete'
})
}

View File

@ -39,6 +39,9 @@ import VueMeta from 'vue-meta'
import DictData from '@/components/DictData'
// 行内表单组件
import FormCol from '@/components/FormCol/index.vue'
// 过滤器
import filter from "@/utils/filter";
filter(Vue);
// 全局方法挂载
Vue.prototype.getDicts = getDicts

30
src/utils/filter.js Normal file
View File

@ -0,0 +1,30 @@
const filters = {
// 金钱显示,保留两位小数
money(num) {
return filters.fix2(num);
},
// 缺省值
defaultValue(data) {
return data == null ? '--' : data;
},
fix2(num) {
if (num == null) {
return num;
}
return num.toFixed(2);
},
fix10(num) {
if (num == null) {
return num;
}
return num.toFixed(10);
},
dv(data) {
return filters.defaultValue(data);
}
}
export default (vm) => {
Object.keys(filters).forEach(key => {
vm.filter(key, filters[key])
})
}

View File

@ -73,48 +73,94 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="onSortChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="订单号" width="150" align="center" prop="orderNo" />
<el-table-column label="支付单号" width="150" align="center" prop="outTradeNo" />
<el-table-column label="用户" align="center" prop="realName" />
<el-table-column label="手机号" align="center" prop="phone" />
<el-table-column label="支付时间" align="center" prop="payTime" width="90">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.payTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="支付方式" align="center" prop="payType">
<template slot-scope="scope">
<dict-tag :options="dict.type.ss_pay_type" :value="scope.row.payType"/>
</template>
</el-table-column>
<el-table-column label="支付状态" align="center" prop="paid">
<template slot-scope="scope">
<dict-tag :options="dict.type.et_order_pay_status" :value="scope.row.paid"/>
</template>
</el-table-column>
<el-table-column label="类型" align="center" prop="type">
<template slot-scope="scope">
<dict-tag :options="dict.type.ss_order_type" :value="scope.row.type"/>
</template>
</el-table-column>
<el-table-column label="订单总金额" align="center" prop="totalFee" />
<el-table-column label="实际支付金额" align="center" prop="payFee" />
<el-table-column label="订单时长" align="center" prop="duration" />
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.ss_order_status" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="手续费" align="center" prop="handlingCharge" />
<el-table-column label="服务费" align="center" prop="platformServiceFee" />
<el-table-column label="支付渠道" align="center" prop="channelName" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
</template>
</el-table-column>
<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 === 'id'">
{{d.row[column.key]}}
</template>
<template v-else-if="column.key === 'payTime'">
<span>{{ parseTime(d.row.payTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
<template v-else-if="column.key === 'payType'">
<dict-tag :options="dict.type.ss_pay_type" :value="d.row[column.key]"/>
</template>
<template v-else-if="column.key === 'paid'">
<dict-tag :options="dict.type.et_order_pay_status" :value="d.row[column.key]"/>
</template>
<template v-else-if="column.key === 'type'">
<dict-tag :options="dict.type.ss_order_type" :value="d.row[column.key]"/>
</template>
<template v-else-if="column.key === 'totalFee' || column.key === 'payFee' || column.key === 'handlingCharge' || column.key === 'platformServiceFee'">
{{d.row[column.key] | dv}}
</template>
<template v-else-if="column.key === 'duration'">
{{d.row[column.key] | dv}} 小时
</template>
<template v-else-if="column.key === 'status'">
<dict-tag :options="dict.type.ss_order_status" :value="d.row[column.key]"/>
</template>
<template v-else>
{{d.row[column.key]}}
</template>
</template>
</el-table-column>
</template>
</el-table>
<!-- <el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange">-->
<!-- <el-table-column type="selection" width="55" align="center" />-->
<!-- <el-table-column label="订单号" width="150" align="center" prop="orderNo" />-->
<!-- <el-table-column label="用户" align="center" prop="userName" />-->
<!-- <el-table-column label="支付单号" width="150" align="center" prop="outTradeNo" />-->
<!--&lt;!&ndash; <el-table-column label="手机号" align="center" prop="phone" />&ndash;&gt;-->
<!-- <el-table-column label="支付时间" align="center" prop="payTime" width="90">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.payTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="支付方式" align="center" prop="payType">-->
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.ss_pay_type" :value="scope.row.payType"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="支付状态" align="center" prop="paid">-->
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.et_order_pay_status" :value="scope.row.paid"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="类型" align="center" prop="type">-->
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.ss_order_type" :value="scope.row.type"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="订单总金额" align="center" prop="totalFee" />-->
<!-- <el-table-column label="实际支付金额" align="center" prop="payFee" />-->
<!-- <el-table-column label="订单时长" align="center" prop="duration" />-->
<!-- <el-table-column label="状态" align="center" prop="status">-->
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.ss_order_status" :value="scope.row.status"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="手续费" align="center" prop="handlingCharge" />-->
<!-- <el-table-column label="服务费" align="center" prop="platformServiceFee" />-->
<!-- <el-table-column label="支付渠道" align="center" prop="channelName" />-->
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<pagination
v-show="total>0"
@ -208,12 +254,39 @@
<script>
import { listOrder, getOrder, delOrder, addOrder, updateOrder } from "@/api/system/order";
import { $showColumns } from '@/utils/mixins';
import {parseTime} from "../../../utils/ruoyi";
//
const defaultSort = {
prop: "createTime",
order: "descending"
}
export default {
name: "Order",
mixins: [$showColumns],
dicts: ['ss_order_status', 'ss_pay_type', 'rl_distribution_mode', 'rl_rental_unit','ss_order_type','et_order_pay_status'],
data() {
return {
//
columns: [
{key: 'orderNo', visible: true, label: '订单号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'userName', visible: true, label: '用户', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'outTradeNo', visible: true, label: '支付单号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'payTime', visible: true, label: '支付时间', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'payType', visible: true, label: '支付方式', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'paid', visible: true, label: '支付状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'type', visible: true, label: '类型', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'totalFee', visible: true, label: '订单总金额', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'payFee', visible: true, label: '实际支付金额', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'duration', visible: true, label: '订单时长', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'status', visible: true, label: '状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'handlingCharge', visible: true, label: '手续费', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'platformServiceFee', visible: true, label: '服务费', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'channelName', visible: true, label: '支付渠道', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
],
//
orderSorts: ['ascending', 'descending', null],
//
loading: true,
//
@ -232,10 +305,13 @@ export default {
title: "",
//
open: false,
defaultSort,
//
queryParams: {
pageNum: 1,
pageSize: 10,
orderByColumn: defaultSort.prop,
isAsc: defaultSort.order,
orderNo: null,
outTradeNo: null,
userId: null,
@ -293,6 +369,18 @@ export default {
this.getList();
},
methods: {
parseTime,
/** 当排序按钮被点击时触发 **/
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;

View File

@ -1,31 +1,6 @@
<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' && !deptId">
<el-select
v-model="queryParams.deptId"
filterable
placeholder="选择代理商"
style="width: 120px"
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="areaId" v-if="userName == 'admin' && !deptId">
<el-select v-model="queryParams.areaId" filterable placeholder="请选择运营区" clearable>
<el-option
v-for="item in areaOptions"
:key="item.areaId"
:label="item.areaName"
:value="item.areaId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="退款单号" prop="refundNo">
<el-input
v-model="queryParams.refundNo"
@ -34,22 +9,40 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="关联订单" prop="orderNo">
<el-form-item label="订单" prop="orderNo">
<el-input
v-model="queryParams.orderNo"
placeholder="请输入关联订单"
placeholder="请输入订单"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="用户" prop="userName">
<!-- <el-form-item label="用户ID" prop="userId">-->
<!-- <el-input-->
<!-- v-model="queryParams.userId"-->
<!-- placeholder="请输入用户ID"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="用户名" prop="userName">
<el-input
v-model="queryParams.userName"
placeholder="请输入用户"
placeholder="请输入用户"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable @change="handleQuery">
<el-option
v-for="dict in dict.type.ss_refund_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="退款金额" prop="amount">
<el-input
v-model="queryParams.amount"
@ -58,14 +51,30 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="退款说明" prop="itemDesc">
<el-form-item label="退款结果" prop="refundResult">
<el-input
v-model="queryParams.itemDesc"
placeholder="请输入退款项目说明"
v-model="queryParams.refundResult"
placeholder="请输入退款结果"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="商户" prop="merchantId">
<el-input
v-model="queryParams.merchantId"
placeholder="请输入商户"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="操作时间" prop="operTime">
<el-date-picker clearable
v-model="queryParams.operTime"
type="date"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择操作时间">
</el-date-picker>
</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>
@ -83,23 +92,39 @@
v-hasPermi="['system:refund:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="refundList" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="refundList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="onSortChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="区域" align="center" prop="areaName" />
<el-table-column label="退款单号" align="center" prop="refundNo" />
<el-table-column label="关联订单" align="center" prop="orderNo" />
<el-table-column label="用户" align="center" prop="userName" />
<el-table-column label="退款金额" align="center" prop="amount" />
<el-table-column label="退款原因" align="center" prop="reason" />
<el-table-column label="退款时间" align="center" prop="createTime" width="180">
<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="itemDesc" />
<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 === 'id'">
{{d.row[column.key]}}
</template>
<template v-else-if="column.key === 'amount'">
{{d.row[column.key] | dv}}
</template>
<template v-else-if="column.key === 'status'">
<dict-tag :options="dict.type.ss_refund_status" :value="d.row[column.key]"/>
</template>
<template v-else>
{{d.row[column.key]}}
</template>
</template>
</el-table-column>
</template>
</el-table>
<pagination
@ -110,9 +135,51 @@
@pagination="getList"
/>
<!-- 添加或修改退款订单对话框 -->
<!-- 添加或修改退款对话框 -->
<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="refundNo">
<el-input v-model="form.refundNo" placeholder="请输入退款单号" />
</el-form-item>
<el-form-item label="订单号" prop="orderNo">
<el-input v-model="form.orderNo" placeholder="请输入订单号" />
</el-form-item>
<el-form-item label="用户ID" prop="userId">
<el-input v-model="form.userId" placeholder="请输入用户ID" />
</el-form-item>
<el-form-item label="用户名" prop="userName">
<el-input v-model="form.userName" placeholder="请输入用户名" />
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="form.status" placeholder="请选择状态">
<el-option
v-for="dict in dict.type.ss_refund_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="退款金额" prop="amount">
<el-input v-model="form.amount" placeholder="请输入退款金额" />
</el-form-item>
<el-form-item label="退款原因" prop="reason">
<el-input v-model="form.reason" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="退款结果" prop="refundResult">
<el-input v-model="form.refundResult" placeholder="请输入退款结果" />
</el-form-item>
<el-form-item label="商户" prop="merchantId">
<el-input v-model="form.merchantId" placeholder="请输入商户" />
</el-form-item>
<el-form-item label="操作时间" prop="operTime">
<el-date-picker clearable
v-model="form.operTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择操作时间">
</el-date-picker>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -124,22 +191,37 @@
<script>
import { listRefund, getRefund, delRefund, addRefund, updateRefund } from "@/api/system/refund";
// import { optionselect as getAreaOptionselect } from '@/api/system/area'
// import { listDept2 } from '@/api/system/dept'
import { $showColumns } from '@/utils/mixins';
//
const defaultSort = {
prop: "createTime",
order: "descending"
}
export default {
name: "Refund",
props: {
// id
deptId: {
type: Number,
default: null,
}
},
mixins: [$showColumns],
dicts: ['ss_refund_status'],
data() {
return {
//
columns: [
{key: 'id', visible: true, label: '主键', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'refundNo', visible: true, label: '退款单号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'orderNo', visible: true, label: '订单号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
// {key: 'userId', visible: true, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'userName', visible: true, label: '用户名', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'status', visible: true, label: '状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'amount', visible: true, label: '退款金额', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'reason', visible: true, label: '退款原因', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'refundResult', visible: true, label: '退款结果', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
// {key: 'merchant', visible: true, label: '', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'operTime', visible: true, label: '操作时间', minWidth: "120", sortable: false, overflow: false, align: 'center', width: null},
],
//
orderSorts: ['ascending', 'descending', null],
//
loading: true,
userName: undefined,
//
ids: [],
//
@ -150,31 +232,36 @@ export default {
showSearch: true,
//
total: 0,
// 退
// 退
refundList: [],
areaOptions: [],
deptOptions:[],
//
title: "",
//
open: false,
defaultSort,
//
queryParams: {
pageNum: 1,
pageSize: 20,
deptId: this.deptId,
orderByColumn: defaultSort.prop,
isAsc: defaultSort.order,
refundNo: null,
orderNo: null,
userId: null,
userName: null,
status: null,
amount: null,
itemDesc: null
reason: null,
refundResult: null,
merchantId: null,
operTime: null
},
//
form: {},
//
rules: {
orderNo: [
{ required: true, message: "关联订单不能为空", trigger: "blur" }
{ required: true, message: "订单不能为空", trigger: "blur" }
],
userId: [
{ required: true, message: "用户ID不能为空", trigger: "blur" }
@ -183,26 +270,21 @@ export default {
};
},
created() {
console.log("当前用户信息:",this.$store.state.user.name)
this.userName = this.$store.state.user.name;
// this.getDeptList()
this.getList();
// this.getAreaList();
},
methods: {
// getDeptList() {
// listDept2({ status: "0", pageNum: 1, pageSize: 999 }).then((response) => {
// this.deptOptions = response.rows;
// });
// },
// /** */
// getAreaList() {
// getAreaOptionselect().then(response => {
// this.areaOptions = response.data;
// });
// },
/** 查询退款订单列表 */
/** 当排序按钮被点击时触发 **/
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;
listRefund(this.queryParams).then(response => {
@ -223,14 +305,14 @@ export default {
refundNo: null,
orderNo: null,
userId: null,
userName: null,
status: null,
amount: null,
dispatchFee: null,
manageFee: null,
ridingFee: null,
appointmentFee: null,
reason: null,
createTime: null,
itemDesc: null
refundResult: null,
merchantId: null,
operTime: null
};
this.resetForm("form");
},
@ -254,7 +336,7 @@ export default {
handleAdd() {
this.reset();
this.open = true;
this.title = "添加退款订单";
this.title = "添加退款";
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -263,7 +345,7 @@ export default {
getRefund(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改退款订单";
this.title = "修改退款";
});
},
/** 提交按钮 */
@ -289,7 +371,7 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除退款订单编号为"' + ids + '"的数据项?').then(function() {
this.$modal.confirm('是否确认删除退款编号为"' + ids + '"的数据项?').then(function() {
return delRefund(ids);
}).then(() => {
this.getList();

View File

@ -106,7 +106,7 @@
{{d.row[column.key]}}
</template>
<template v-else-if="column.key === 'status'">
<dict-tag :options="dict.type.e_store_status" :value="d.row[column.key]"/>
<dict-tag :options="dict.type.ss_store_status" :value="d.row[column.key]"/>
</template>
<template v-else-if="column.key === 'picture'">
<image-preview :src="d.row[column.key]" :width="50" :height="50"/>
@ -117,6 +117,18 @@
</template>
</el-table-column>
</template>
<el-table-column label="位置" align="center" prop="location" width="150">
<template slot-scope="scope">
<el-link
type="primary"
@click="openMap(scope.row.lng, scope.row.lat)"
v-if="scope.row.lng && scope.row.lat"
>
{{ scope.row.lng }},{{ scope.row.lat }}
</el-link>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -208,21 +220,6 @@
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="省" prop="province">
<el-input v-model="form.province" placeholder="请输入省" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="市" prop="city">
<el-input v-model="form.city" placeholder="请输入市" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="区县" prop="county">
<el-input v-model="form.county" placeholder="请输入区县" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="客服电话" prop="serverPhone">
<el-input v-model="form.serverPhone" placeholder="请输入客服电话" />
@ -270,7 +267,7 @@ const defaultSort = {
export default {
name: "Store",
mixins: [$showColumns],
dicts: ['e_store_status'],
dicts: ['ss_store_status'],
data() {
return {
//
@ -282,13 +279,8 @@ export default {
{key: 'contactMobile', visible: true, label: '联系电话', minWidth: null, sortable: true, overflow: false, align: 'center', width: 100},
{key: 'picture', visible: true, label: '商户图片', minWidth: null, sortable: true, overflow: false, align: 'center', width: 100},
{key: 'address', visible: true, label: '门店地址', minWidth: null, sortable: true, overflow: false, align: 'center', width: 150},
{key: 'lng', visible: true, label: '定位经度', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'lat', visible: true, label: '定位纬度', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'businessTimeStart', visible: true, label: '营业时间起始', minWidth: "120", sortable: false, overflow: false, align: 'center', width: null},
{key: 'businessTimeEnd', visible: true, label: '营业时间结束', minWidth: "120", sortable: false, overflow: false, align: 'center', width: null},
{key: 'province', visible: true, label: '省', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'city', visible: true, label: '市', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'county', visible: true, label: '区县', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'serverPhone', visible: true, label: '客服电话', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'status', visible: true, label: '状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'wifi', visible: true, label: 'wifi', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
@ -503,6 +495,11 @@ export default {
this.download('system/store/export', {
...this.queryParams
}, `store_${new Date().getTime()}.xlsx`)
},
//
openMap(lng, lat) {
// 使
window.open(`https://uri.amap.com/marker?position=${lng},${lat}&callnative=1`);
}
}
};