Compare commits
65 Commits
feature/ma
...
master
Author | SHA1 | Date |
---|---|---|
TanGH | 81e3a97a42 | |
TanGH | acc88820e5 | |
TanGH | f3087008d4 | |
TanGH | 3cb06b2b74 | |
TanGH | cb28d6ba4e | |
TanGH | 047741d04c | |
TanGH | c0b5a4233a | |
Jruome | 1c0376f60c | |
Jruome | f7da38634b | |
tangqian | 877e40d7a0 | |
Jruome | 8a93752fbc | |
tangqian | caaed12df4 | |
Jruome | 2ac2faf592 | |
Jruome | 6fa7a0103f | |
tangqian | 82d5f5408e | |
tangqian | bd806cc2ba | |
tangqian | 5846de1445 | |
tangqian | 18bc18be76 | |
tangqian | 6849a68446 | |
Jruome | acb1e72a57 | |
tangqian | bccc325bda | |
tangqian | 9e1a653dbe | |
tangqian | 714650a275 | |
tangqian | 9bb2ba3740 | |
tangqian | c5c73744f0 | |
tangqian | 7e49674bd4 | |
tangqian | 022b9d2c8f | |
tangqian | 8afd5700ab | |
Jruome | 5ae6e3481c | |
Jruome | 8b78cc917e | |
Jruome | 9d0790a24f | |
tangqian | 322d5aae1a | |
tangqian | 41c099eaf6 | |
tangqian | 66e4a6c6fc | |
Jruome | 7ca2a339b2 | |
Jruome | e85f2e75a7 | |
Jruome | 7910334283 | |
Jruome | a47200d78a | |
tangqian | 1813516c54 | |
axzsd | 2e915fe106 | |
tangqian | 77ffc74c3d | |
tangqian | 8604602f83 | |
tangqian | 5e74237e04 | |
tangqian | ff734c3ac3 | |
tangqian | 29608d4f69 | |
tangqian | 103354947b | |
Jruome | 1a49815b43 | |
Jruome | d707770dac | |
Jruome | f3a61cb8dd | |
tangqian | 96f0f60549 | |
tangqian | 82f9e16fe3 | |
tangqian | 1f44abfe66 | |
Jruome | 5085f63772 | |
tangqian | 581e6b74ae | |
tangqian | 6f7d2767e4 | |
tangqian | 94bf7664ab | |
tangqian | 683c14137c | |
tangqian | 692263438c | |
Jruome | 27d4c6b2ee | |
Jruome | 4391cfb64a | |
tangqian | 0a3e68c0d1 | |
tangqian | d092e0c23f | |
Jruome | e8ab6ea67b | |
Jruome | d415963aa3 | |
tangqian | 0390415a48 |
|
@ -5,7 +5,7 @@ LABEL Author="axzsd" \
|
|||
Description="创盈支付服务端"
|
||||
|
||||
ENV SPRING_PROFILES_ACTIVE="dev"
|
||||
ENV JAVA_OPTIONS "-Xms800m -Xmx800m \
|
||||
ENV JAVA_OPTIONS "-Xms1024m -Xmx2048m \
|
||||
-XX:+HeapDumpOnOutOfMemoryError \
|
||||
-Dfile.encoding=UTF-8 \
|
||||
-Djava.awt.headless=true \
|
||||
|
|
|
@ -20,7 +20,7 @@ services:
|
|||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 800MB
|
||||
memory: 2048MB
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:48080/actuator/health"]
|
||||
timeout: 30s
|
||||
|
|
|
@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.pay.config.WxPayOneAutoConfiguration;
|
|||
import cn.iocoder.yudao.framework.pay.properties.WxPayProperties;
|
||||
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
||||
import cn.iocoder.yudao.module.shop.dal.dataobject.recharge.RechargeOrderDO;
|
||||
import cn.iocoder.yudao.module.shop.dal.mysql.recharge.RechargeOrderMapper;
|
||||
import cn.iocoder.yudao.module.shop.response.member.InitOrderResponse;
|
||||
import cn.iocoder.yudao.module.shop.utils.OrderUtil;
|
||||
import cn.iocoder.yudao.module.system.api.tenant.TenantApi;
|
||||
|
@ -42,6 +43,9 @@ public class WxPayStrategy implements IPayStrategy{
|
|||
@Autowired
|
||||
private TenantApi tenantApi;
|
||||
|
||||
@Autowired
|
||||
private RechargeOrderMapper rechargeOrderMapper;
|
||||
|
||||
@Override
|
||||
public InitOrderResponse pay(RechargeOrderDO orderDO, HttpServletRequest servletRequest,String openid) {
|
||||
Long requiredTenantId = TenantContextHolder.getRequiredTenantId();
|
||||
|
@ -90,6 +94,10 @@ public class WxPayStrategy implements IPayStrategy{
|
|||
log.info("退款回调[{}]", JSONUtil.toJsonPrettyStr(wxPayRefundV3Request));
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage(),e);
|
||||
|
||||
// 退款异常后将充值订单状态重置为未退款(维护阶段,暂不考虑优化代码)
|
||||
orderDO.setRefundStatus(0);
|
||||
rechargeOrderMapper.updateById(orderDO);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -101,10 +101,6 @@ public class ReplenishmentTask {
|
|||
rechargeOrderMapper.updateById(orderDO);
|
||||
// 写入 充值档位记录表
|
||||
storeOrderService.addPhone(orderDO, outTradeNo);
|
||||
} else {
|
||||
orderDO.setIsReplenishment(1);
|
||||
orderDO.setReplenishmentName(map.toString());
|
||||
rechargeOrderMapper.updateById(orderDO);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -149,7 +149,8 @@ public class DeptServiceImpl implements DeptService {
|
|||
});
|
||||
deptMapper.updateBatch(deptDOS, deptDOS.size());
|
||||
deptDO.setName(reqVO.getName());
|
||||
deptDO.setParentOrganizationName(reqVO.getName());
|
||||
DeptDO parentDeptDO = deptMapper.selectById(deptDO.getParentId());
|
||||
deptDO.setParentOrganizationName(parentDeptDO.getParentOrganizationName() + ">" + reqVO.getName());
|
||||
deptMapper.updateById(deptDO);
|
||||
// 发送刷新消息
|
||||
deptProducer.sendDeptRefreshMessage();
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 数据统计(全部)
|
||||
export function statisticsAll(query) {
|
||||
return request({
|
||||
url: '/system/statement/statisticsAll',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -68,6 +68,16 @@ export function getPromoterPage(query) {
|
|||
})
|
||||
}
|
||||
|
||||
// 导出所有推广员 Excel
|
||||
export function allExport(query) {
|
||||
return request({
|
||||
url: '/member/promoter/all-export-excel',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出推广员 Excel
|
||||
export function exportPromoterExcel(query) {
|
||||
return request({
|
||||
|
|
|
@ -1,5 +1,22 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 添加备注
|
||||
export function adminRemark(data) {
|
||||
return request({
|
||||
url: '/shop/recharge-order/adminRemark',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取商户
|
||||
export function getTenantList(data) {
|
||||
return request({
|
||||
url: '/system/statement/getTenantList',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 创建订单
|
||||
export function createRechargeOrder(data) {
|
||||
return request({
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 数据统计(根据租户统计)
|
||||
export function statisticsData(query) {
|
||||
return request({
|
||||
url: '/system/statement/statistics',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 导出数据统计(根据租户统计) Excel
|
||||
export function statement(query) {
|
||||
return request({
|
||||
url: '/system/statement/statement-excel',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
<template>
|
||||
<el-alert v-if="enable()" type="success" show-icon>
|
||||
<template slot="title">
|
||||
<div @click="goToUrl">{{ '【' + title + '】文档地址:' + url }}</div>
|
||||
</template>
|
||||
</el-alert>
|
||||
<!-- <el-alert v-if="enable()" type="success" show-icon>-->
|
||||
<!-- <template slot="title">-->
|
||||
<!-- <div @click="goToUrl">{{ '【' + title + '】文档地址:' + url }}</div>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-alert>-->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="98px">
|
||||
<el-form-item label="商铺名称" prop="tenantName">
|
||||
<el-input v-model="queryParams.tenantName" placeholder="请输入商铺名称" clearable @keyup.enter.native="handleQuery"/>
|
||||
<el-form-item label="商户名称" prop="tenantName">
|
||||
<el-input v-model="queryParams.tenantName" placeholder="请输入商户名称" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单编号" prop="orderId">
|
||||
<el-input v-model="queryParams.orderId" placeholder="请输入订单编号" clearable @keyup.enter.native="handleQuery"/>
|
||||
|
@ -51,7 +51,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="销售金额" align="center" prop="payPrice" />
|
||||
<el-table-column label="提成金额" align="center" prop="commissionPrice" />
|
||||
<el-table-column label="商铺名称" align="center" prop="tenantName" />
|
||||
<el-table-column label="商户名称" align="center" prop="tenantName" />
|
||||
<el-table-column label="支付方式" align="center" prop="payType" >
|
||||
<template v-slot="scope">
|
||||
<dict-tag :type="DICT_TYPE.PAY_TYPE" :value="scope.row.payType"/>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="dashboard-editor-container">
|
||||
<!-- <div class="dashboard-editor-container">-->
|
||||
|
||||
<!-- <panel-group @handleSetLineChartData="handleSetLineChartData" />-->
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
|||
<!-- </el-row>-->
|
||||
|
||||
|
||||
</div>
|
||||
<!-- </div>-->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -35,7 +35,10 @@ import LineChart from './dashboard/LineChart'
|
|||
import RaddarChart from './dashboard/RaddarChart'
|
||||
import PieChart from './dashboard/PieChart'
|
||||
import BarChart from './dashboard/BarChart'
|
||||
|
||||
import creatComment from "@/views/mall/product/comment/creatComment.vue";
|
||||
import {
|
||||
statisticsAll
|
||||
} from '@/api/index';
|
||||
const lineChartData = {
|
||||
newVisitis: {
|
||||
expectedData: [100, 120, 161, 134, 105, 160, 165],
|
||||
|
@ -58,6 +61,7 @@ const lineChartData = {
|
|||
export default {
|
||||
name: 'Index',
|
||||
components: {
|
||||
creatComment,
|
||||
PanelGroup,
|
||||
LineChart,
|
||||
RaddarChart,
|
||||
|
@ -66,9 +70,10 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
lineChartData: lineChartData.newVisitis
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
handleSetLineChartData(type) {
|
||||
this.lineChartData = lineChartData[type]
|
||||
|
@ -78,6 +83,50 @@ export default {
|
|||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.statistics{
|
||||
width: 100%;
|
||||
height: 30%;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
flex-wrap: wrap;
|
||||
border-bottom: 1px solid #e6ebf5;
|
||||
.statistics_item{
|
||||
border-radius: 10px;
|
||||
width: 240px;
|
||||
min-height: 90px;
|
||||
margin: 10px 6%;
|
||||
font-size: 20px;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
word-wrap: break-word;
|
||||
span:nth-of-type(1){
|
||||
margin-left: 20px;
|
||||
}
|
||||
span:nth-of-type(2){
|
||||
margin-left: 40px;
|
||||
}
|
||||
}
|
||||
.totalMoney{
|
||||
background: rgb(77,157,255);
|
||||
}
|
||||
.totalNum{
|
||||
background: rgb(95,212,89);
|
||||
}
|
||||
.totalWithdrawMoney{
|
||||
background: rgb(171,109,234);
|
||||
}
|
||||
.threeTotalNum{
|
||||
background: rgb(255,154,1);
|
||||
}
|
||||
.twoTotalNum{
|
||||
background: rgb(10,193,224);
|
||||
}
|
||||
.oneTotalNum{
|
||||
background: rgb(10,196,160);
|
||||
}
|
||||
}
|
||||
.dashboard-editor-container {
|
||||
padding: 32px;
|
||||
background-color: rgb(240, 242, 245);
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="110px">
|
||||
<el-form-item label="所属组织" prop="deptId">
|
||||
<treeselect style="width: 240px;" v-model="queryParams.deptId" :options="deptOptions" :show-count="true"
|
||||
:clearable="false"
|
||||
placeholder="请选择所属组织" :normalizer="normalizer" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="启用状态" prop="status">-->
|
||||
|
@ -18,7 +17,7 @@
|
|||
<el-input v-model="queryParams.nickname" placeholder="请输入" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="注册来源" prop="sourceType">
|
||||
<el-select v-model="queryParams.sourceType" placeholder="请选择来源" clearable @keyup.enter.native="handleQuery">
|
||||
<el-select v-model="queryParams.sourceType" placeholder="请选择来源" clearable @keyup.enter.native="handleQuery" @clear="()=>{queryParams.sourceType = undefined}">
|
||||
<el-option value="1" label="后台注册"/>
|
||||
<el-option value="2" label="扫码注册"/>
|
||||
</el-select>
|
||||
|
@ -44,10 +43,10 @@
|
|||
<!-- v-hasPermi="['member:promoter:export']">导入-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"-->
|
||||
<!-- v-hasPermi="['member:promoter:export']">导出</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" v-hasPermi="['member:promoter:allExcel']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
|
@ -71,7 +70,7 @@
|
|||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['member:promoter:update']">修改
|
||||
v-hasPermi="['member:promoter:allUpdate']">修改
|
||||
</el-button>
|
||||
<!-- <el-button size="mini" type="text" icon="el-icon-key" @click="handleUpdatePassword(scope.row)"-->
|
||||
<!-- v-hasPermi="['member:promoter:delete']">修改密码-->
|
||||
|
@ -161,7 +160,7 @@ import {
|
|||
createPromoter,
|
||||
tenantIgnoreUpdate,
|
||||
deletePromoter,
|
||||
getPromoter,
|
||||
allExport,
|
||||
getallPage,
|
||||
importTemplate,
|
||||
exportPromoterExcel, updatePassword
|
||||
|
@ -462,11 +461,10 @@ export default {
|
|||
handleExport() {
|
||||
// 处理查询参数
|
||||
let params = {...this.queryParams};
|
||||
params.pageNo = undefined;
|
||||
params.pageSize = undefined;
|
||||
params.pageSize = 999;
|
||||
this.$modal.confirm('是否确认导出所有推广员数据项?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return exportPromoterExcel(params);
|
||||
return allExport(params);
|
||||
}).then(response => {
|
||||
this.$download.excel(response, '推广员.xls');
|
||||
this.exportLoading = false;
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="110px">
|
||||
<el-form-item label="所属组织" prop="deptId">
|
||||
<treeselect style="width: 240px;" v-model="queryParams.deptId" :options="deptOptions" :show-count="true"
|
||||
:clearable="false"
|
||||
placeholder="请选择所属组织" :normalizer="normalizer"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="启用状态" prop="status">
|
||||
|
@ -18,7 +17,7 @@
|
|||
<el-input v-model="queryParams.nickname" placeholder="请输入" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="注册来源" prop="sourceType">
|
||||
<el-select v-model="queryParams.sourceType" placeholder="请选择来源" clearable @keyup.enter.native="handleQuery">
|
||||
<el-select v-model="queryParams.sourceType" placeholder="请选择来源" clearable @keyup.enter.native="handleQuery" @clear="()=>{queryParams.sourceType = undefined}">
|
||||
<el-option value="1" label="后台注册"/>
|
||||
<el-option value="2" label="扫码注册"/>
|
||||
</el-select>
|
||||
|
|
|
@ -10,9 +10,13 @@
|
|||
<el-input v-model="queryParams.paySerialNumber" placeholder="请输入交易流水号" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="下单时间" prop="payTime">
|
||||
<el-date-picker v-model="queryParams.payTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
|
||||
<el-date-picker v-model="queryParams.payTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange"
|
||||
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商户名称" prop="tenantId">
|
||||
<treeselect style="width: 240px;" v-model="queryParams.tenantId" :options="deptOptions" :show-count="true"
|
||||
placeholder="请选择商户名称" :normalizer="normalizer" @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="推广员" prop="nickname">
|
||||
<el-input v-model="queryParams.nickname" placeholder="请输入推广员" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
|
@ -28,11 +32,19 @@
|
|||
<el-option value="1" label="已发货"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付状态" prop="userPhone">
|
||||
<el-form-item label="支付状态" prop="paid">
|
||||
<el-select v-model="queryParams.paid" placeholder="请选择支付状态" clearable style="width: 240px">
|
||||
<el-option v-for="dict in statusDictDatas" :key="parseInt(dict.value)" :label="dict.label" :value="parseInt(dict.value)"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="退款状态" prop="refundStatus">
|
||||
<el-select v-model="queryParams.refundStatus" placeholder="请选择退款状态" clearable @keyup.enter.native="handleQuery">
|
||||
<el-option :value="0" label="未退款"/>
|
||||
<el-option :value="1" label="申请中"/>
|
||||
<el-option :value="2" label="已退款"/>
|
||||
<el-option :value="3" label="退款中"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery" v-hasPermi="['shop:recharge-order:query']">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
|
@ -71,6 +83,7 @@
|
|||
<span>{{ parseTime(scope.row.payTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商户名称" align="center" prop="tenantName" />
|
||||
<el-table-column label="推广员" align="center" prop="parentOrganizationName" >
|
||||
<template v-slot="scope">
|
||||
<span>{{ scope.row.parentOrganizationName }}</span>
|
||||
|
@ -137,7 +150,7 @@ import {
|
|||
createRechargeOrder,
|
||||
updateRechargeOrder,
|
||||
deleteRechargeOrder,
|
||||
getRechargeOrder,
|
||||
getTenantList,
|
||||
updateByIds,
|
||||
getRechargeOrderPage,
|
||||
exportRechargeOrderExcel,
|
||||
|
@ -145,7 +158,9 @@ import {
|
|||
} from '@/api/shop/rechargeOrder';
|
||||
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
|
||||
import ElementForm from "@/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue";
|
||||
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css';
|
||||
import {deletePhoneRecord} from "@/api/shop/phoneRecord";
|
||||
export default {
|
||||
name: "RechargeOrder",
|
||||
computed: {
|
||||
|
@ -154,10 +169,12 @@ export default {
|
|||
}
|
||||
},
|
||||
components: {
|
||||
Treeselect,
|
||||
ElementForm
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
deptOptions:[],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
|
@ -242,8 +259,24 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getTreeselect();
|
||||
},
|
||||
methods: {
|
||||
/** 查询部门下拉树结构 + 岗位下拉 */
|
||||
getTreeselect() {
|
||||
getTenantList().then(response => {
|
||||
// 处理 deptOptions 参数
|
||||
this.deptOptions = response.data
|
||||
});
|
||||
},
|
||||
// 格式化部门的下拉框
|
||||
normalizer(node) {
|
||||
return {
|
||||
id: node.id,
|
||||
label: node.name,
|
||||
children: node.children
|
||||
}
|
||||
},
|
||||
selectable(row,rowIndex) {
|
||||
if(!row.status){
|
||||
return true; //不禁用
|
||||
|
@ -251,10 +284,14 @@ export default {
|
|||
return false; //禁用
|
||||
}
|
||||
},
|
||||
async handleGoods(){
|
||||
handleGoods(){
|
||||
if(this.multipleSelection.length){
|
||||
await updateByIds({ids:this.multipleSelection,status:true})
|
||||
this.getList();
|
||||
this.$modal.confirm('是否更改勾选订单发货状态?').then(()=> {
|
||||
return updateByIds({ids:this.multipleSelection,status:true})
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
}).catch(() => {});
|
||||
}else {
|
||||
this.$modal.msgWarning("请勾选需要更改发货状态的订单")
|
||||
}
|
||||
|
|
|
@ -0,0 +1,368 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="98px">
|
||||
<el-form-item label="订单编号" prop="orderId">
|
||||
<el-input v-model="queryParams.orderId" placeholder="请输入订单号" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="退款类型" prop="refundType">
|
||||
<el-select v-model="queryParams.refundType" placeholder="请选择退款类型" clearable @keyup.enter.native="handleQuery">
|
||||
<el-option v-for="(item,index) in actionSheetList" :key="index" :value="item.value" :label="item.name"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请退款时间" prop="payTime">
|
||||
<el-date-picker v-model="queryParams.payTime" @change="onchangeTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange"
|
||||
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="推广员" prop="nickname">
|
||||
<el-input v-model="queryParams.nickname" placeholder="请输入推广员" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商户名称" prop="tenantId">
|
||||
<treeselect style="width: 240px;" v-model="queryParams.tenantId" :options="deptOptions" :show-count="true"
|
||||
placeholder="请选择商户名称" :normalizer="normalizer" @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员名称" prop="realName">
|
||||
<el-input v-model="queryParams.realName" placeholder="请输入会员名称" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="充值号码" prop="userPhone">
|
||||
<el-input v-model="queryParams.userPhone" placeholder="请输入充值号码" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery" >搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 操作工具栏 -->
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"-->
|
||||
<!-- v-hasPermi="['shop:recharge-order:create']">新增</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
|
||||
v-hasPermi="['shop:recharge-order-refund:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<!-- 列表 -->
|
||||
<el-table v-loading="loading" :data="list" ref="multipleTable" >
|
||||
<el-table-column label="订单编号" align="center" prop="orderId" />
|
||||
<el-table-column label="商户名称" align="center" prop="tenantName" />
|
||||
<el-table-column label="推广员名称" align="center" prop="parentOrganizationName" >
|
||||
<template v-slot="scope">
|
||||
<span>{{ scope.row.parentOrganizationName }}</span>
|
||||
<span v-if="scope.row.nickname!=='' && scope.row.nickname!==null">-{{ scope.row.nickname }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="会员名称" align="center" prop="realName" />
|
||||
<el-table-column label="充值号码" align="center" prop="userPhone" />
|
||||
<el-table-column label="退款类型" align="center" prop="refundName" />
|
||||
<el-table-column label="退款理由" align="center" prop="memberReason" width="180" show-overflow-tooltip/>
|
||||
<el-table-column label="申请退款时间" align="center" prop="payTime" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.applyTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="退款完成时间" align="center" prop="payTime" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.applySucceedTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="adminReason" width="180" show-overflow-tooltip/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding" fixed="right" width="80">
|
||||
<template v-slot="scope">
|
||||
<el-button size="mini" type="text" @click="handleAdd(scope.row)" v-hasPermi="['shop:recharge-order:remark']">添加备注</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<el-dialog title="添加备注" :visible.sync="open" width="500px" v-dialogDrag append-to-body>
|
||||
<el-form ref="form" :model="form" label-width="80px">
|
||||
<el-form-item label="备注" prop="adminReason">
|
||||
<el-input v-model="form.adminReason" placeholder="请输入备注" :autosize="{ minRows: 4}"
|
||||
type="textarea" :rules="[{request:true,message: '请输入备注', trigger: 'blur'}]"/>
|
||||
</el-form-item>
|
||||
</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>
|
||||
<!-- 分页组件 -->
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
createRechargeOrder,
|
||||
updateRechargeOrder,
|
||||
deleteRechargeOrder,
|
||||
getTenantList,
|
||||
updateByIds,
|
||||
getRechargeOrderPage,
|
||||
exportRechargeOrderExcel,
|
||||
refundRechargeOrder,
|
||||
adminRemark
|
||||
} from '@/api/shop/rechargeOrder';
|
||||
import ElementForm from "@/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css';
|
||||
export default {
|
||||
name: "RechargeOrder",
|
||||
components: {
|
||||
Treeselect,
|
||||
ElementForm
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
actionSheetList: [{
|
||||
name: '对活动理解有误',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
name: '同一充值账户',
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
name: '改套餐/转网/销户',
|
||||
value: 3
|
||||
},
|
||||
{
|
||||
name: '下单信息有误',
|
||||
value: 4
|
||||
},
|
||||
{
|
||||
name: '业绩归属错误',
|
||||
value: 5
|
||||
},
|
||||
{
|
||||
name: '重复订单',
|
||||
value: 6
|
||||
},
|
||||
{
|
||||
name: '号码充值失败',
|
||||
value: 7
|
||||
},
|
||||
{
|
||||
name: '等待时间过长',
|
||||
value: 8
|
||||
},
|
||||
{
|
||||
name: '其它原因',
|
||||
value: 9
|
||||
}
|
||||
],
|
||||
deptOptions:[],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 订单列表
|
||||
list: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
refundStatus:2
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
multipleSelection: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getTreeselect();
|
||||
},
|
||||
methods: {
|
||||
onchangeTime(value){
|
||||
this.queryParams.startApplyTime = value[0]
|
||||
this.queryParams.endApplyTime = value[1]
|
||||
},
|
||||
/** 查询部门下拉树结构 + 岗位下拉 */
|
||||
getTreeselect() {
|
||||
getTenantList().then(response => {
|
||||
// 处理 deptOptions 参数
|
||||
this.deptOptions = response.data
|
||||
});
|
||||
},
|
||||
// 格式化部门的下拉框
|
||||
normalizer(node) {
|
||||
return {
|
||||
id: node.id,
|
||||
label: node.name,
|
||||
children: node.children
|
||||
}
|
||||
},
|
||||
selectable(row,rowIndex) {
|
||||
if(!row.status){
|
||||
return true; //不禁用
|
||||
}else {
|
||||
return false; //禁用
|
||||
}
|
||||
},
|
||||
async handleGoods(){
|
||||
if(this.multipleSelection.length){
|
||||
await updateByIds({ids:this.multipleSelection,status:true})
|
||||
this.getList();
|
||||
}else {
|
||||
this.$modal.msgWarning("请勾选需要更改发货状态的订单")
|
||||
}
|
||||
},
|
||||
handleSelectionChange(rows) {
|
||||
const arr = rows.filter(({ status }) => !status );
|
||||
if(arr.length){
|
||||
this.multipleSelection = arr.map(({id}) => id)
|
||||
}else {
|
||||
this.multipleSelection = []
|
||||
}
|
||||
},
|
||||
handleReview(row, status){
|
||||
|
||||
},
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
// 执行查询
|
||||
getRechargeOrderPage(this.queryParams).then(response => {
|
||||
this.list = response.data.list;
|
||||
this.$nextTick(()=>{
|
||||
this.list.forEach((item) => {
|
||||
item.status && this.$refs.multipleTable.toggleRowSelection(item,true);
|
||||
})
|
||||
})
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 取消按钮 */
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
/** 表单重置 */
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
orderId: undefined,
|
||||
uid: undefined,
|
||||
realName: undefined,
|
||||
userPhone: undefined,
|
||||
confirmPhone: undefined,
|
||||
totalNum: undefined,
|
||||
totalPrice: undefined,
|
||||
payPrice: undefined,
|
||||
paid: undefined,
|
||||
payTime: undefined,
|
||||
payEndTime: undefined,
|
||||
payType: undefined,
|
||||
status: undefined,
|
||||
refundStatus: undefined,
|
||||
refundReasonWapImg: undefined,
|
||||
refundReasonWapExplain: undefined,
|
||||
refundReasonWap: undefined,
|
||||
refundReason: undefined,
|
||||
refundReasonTime: undefined,
|
||||
refundPrice: undefined,
|
||||
mark: undefined,
|
||||
remark: undefined,
|
||||
cost: undefined,
|
||||
isChannel: undefined,
|
||||
isRemind: undefined,
|
||||
isSystemDel: undefined,
|
||||
type: undefined,
|
||||
proTotalPrice: undefined,
|
||||
beforePayPrice: undefined,
|
||||
isAlterPrice: undefined,
|
||||
outTradeNo: undefined,
|
||||
paySerialNumber: undefined,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams ={
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
refundStatus:2
|
||||
};
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd(item) {
|
||||
this.reset();
|
||||
this.form.orderId = item.id
|
||||
this.open = true;
|
||||
},
|
||||
/** 退款按钮操作 */
|
||||
handleRefund(row, type) {
|
||||
const id = row.id;
|
||||
this.$modal.confirm('是否退款订单编号为"' + id + '"的数据?').then(function() {
|
||||
return refundRechargeOrder({
|
||||
orderId: id,
|
||||
type: type
|
||||
});
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
adminRemark(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const id = row.id;
|
||||
this.$modal.confirm('是否确认删除订单编号为"' + id + '"的数据项?').then(function() {
|
||||
return deleteRechargeOrder(id);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// 处理查询参数
|
||||
let params = {...this.queryParams};
|
||||
params.pageNo = undefined;
|
||||
params.pageSize = undefined;
|
||||
this.$modal.confirm('是否确认导出所有订单数据项?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return exportRechargeOrderExcel(params);
|
||||
}).then(response => {
|
||||
this.$download.excel(response, '订单.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -0,0 +1,222 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px">
|
||||
<el-form-item label="快速查看" class="width100" prop="type">
|
||||
<el-radio-group v-model="queryParams.type" type="button" class="mr20" size="small" @change="handleChange">
|
||||
<el-radio-button v-for="(item,i) in lookList" :label=i+1 :key="i">{{item.name}}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="选择日期" class="width100" prop="dateLimit">
|
||||
<el-date-picker @change="onchangeTime" v-model="queryParams.dateLimit" :default-time="['00:00:00', '23:59:59']" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" size="small" type="datetimerange" start-placeholder="开始时间"
|
||||
end-placeholder="结束时间" placement="bottom-end" placeholder="自定义时间" style="width: 220px;" ></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="statistics">
|
||||
<div v-for="(item,index) in statisticsList" :key="index" :class="[item.class,'statistics_item']">
|
||||
<span>{{item.name}}</span>
|
||||
<span v-if="index<2">¥{{item.value}}</span>
|
||||
<span v-else>{{item.value}} 单</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
<!-- <div class="dashboard-editor-container">-->
|
||||
|
||||
<!-- <panel-group @handleSetLineChartData="handleSetLineChartData" />-->
|
||||
|
||||
<!-- <el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">-->
|
||||
<!-- <line-chart :chart-data="lineChartData" />-->
|
||||
<!-- </el-row>-->
|
||||
|
||||
<!-- <el-row :gutter="32">-->
|
||||
<!-- <el-col :xs="24" :sm="24" :lg="8">-->
|
||||
<!-- <div class="chart-wrapper">-->
|
||||
<!-- <raddar-chart />-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :xs="24" :sm="24" :lg="8">-->
|
||||
<!-- <div class="chart-wrapper">-->
|
||||
<!-- <pie-chart />-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :xs="24" :sm="24" :lg="8">-->
|
||||
<!-- <div class="chart-wrapper">-->
|
||||
<!-- <bar-chart />-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
|
||||
|
||||
<!-- </div>-->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PanelGroup from '@/views/dashboard/PanelGroup'
|
||||
import LineChart from '@/views/dashboard/LineChart'
|
||||
import RaddarChart from '@/views/dashboard/RaddarChart'
|
||||
import PieChart from '@/views/dashboard/PieChart'
|
||||
import BarChart from '@/views/dashboard/BarChart'
|
||||
import creatComment from "@/views/mall/product/comment/creatComment.vue";
|
||||
import {getTenantId} from '@/utils/auth'
|
||||
import {
|
||||
statisticsAll
|
||||
} from '@/api/index';
|
||||
const lineChartData = {
|
||||
newVisitis: {
|
||||
expectedData: [100, 120, 161, 134, 105, 160, 165],
|
||||
actualData: [120, 82, 91, 154, 162, 140, 145]
|
||||
},
|
||||
messages: {
|
||||
expectedData: [200, 192, 120, 144, 160, 130, 140],
|
||||
actualData: [180, 160, 151, 106, 145, 150, 130]
|
||||
},
|
||||
purchases: {
|
||||
expectedData: [80, 100, 121, 104, 105, 90, 100],
|
||||
actualData: [120, 90, 100, 138, 142, 130, 130]
|
||||
},
|
||||
shoppings: {
|
||||
expectedData: [130, 140, 141, 142, 145, 150, 160],
|
||||
actualData: [120, 82, 91, 154, 162, 140, 130]
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'Index',
|
||||
components: {
|
||||
creatComment,
|
||||
PanelGroup,
|
||||
LineChart,
|
||||
RaddarChart,
|
||||
PieChart,
|
||||
BarChart
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
lineChartData: lineChartData.newVisitis,
|
||||
queryParams: {
|
||||
type:4
|
||||
},
|
||||
// list:[],
|
||||
lookList:[{name:'今日'},{name:'上周'},{name:'上月'},{name:'全部'}],
|
||||
statisticsList:[{name:'总销售金额',class:'totalMoney',value:0},{name:'总退款金额',class:'totalWithdrawMoney',value:0},{name:'总订单数量(单)',class:'totalNum',value:0},{name:'240档订单数量(单)',class:'threeTotalNum',value:0},{name:'400档订单数量(单)',class:'twoTotalNum',value:0},{name:'640档订单数量(单)',class:'oneTotalNum',value:0}],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
handleChange(){
|
||||
this.queryParams ={type:this.queryParams.type}
|
||||
this.getList()
|
||||
},
|
||||
onchangeTime(value){
|
||||
this.queryParams.type = null
|
||||
this.queryParams.startTime = value[0]
|
||||
this.queryParams.endTime = value[1]
|
||||
},
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
// 执行查询
|
||||
statisticsAll({tenantId:getTenantId(),...this.queryParams}).then(response => {
|
||||
this.statisticsList.forEach((item,index) =>{
|
||||
for (let key in response.data){
|
||||
if(item.class === key){
|
||||
item.value = response.data[key] || 0
|
||||
}
|
||||
}
|
||||
})
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams ={
|
||||
type: 4
|
||||
};
|
||||
this.handleQuery();
|
||||
},
|
||||
handleSetLineChartData(type) {
|
||||
this.lineChartData = lineChartData[type]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.statistics{
|
||||
width: 100%;
|
||||
height: 30%;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
flex-wrap: wrap;
|
||||
border-bottom: 1px solid #e6ebf5;
|
||||
.statistics_item{
|
||||
border-radius: 10px;
|
||||
width: 240px;
|
||||
min-height: 90px;
|
||||
margin: 10px 6%;
|
||||
font-size: 20px;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
word-wrap: break-word;
|
||||
span:nth-of-type(1){
|
||||
margin-left: 20px;
|
||||
}
|
||||
span:nth-of-type(2){
|
||||
margin-left: 40px;
|
||||
}
|
||||
}
|
||||
.totalMoney{
|
||||
background: rgb(77,157,255);
|
||||
}
|
||||
.totalNum{
|
||||
background: rgb(95,212,89);
|
||||
}
|
||||
.totalWithdrawMoney{
|
||||
background: rgb(171,109,234);
|
||||
}
|
||||
.threeTotalNum{
|
||||
background: rgb(255,154,1);
|
||||
}
|
||||
.twoTotalNum{
|
||||
background: rgb(10,193,224);
|
||||
}
|
||||
.oneTotalNum{
|
||||
background: rgb(10,196,160);
|
||||
}
|
||||
}
|
||||
.dashboard-editor-container {
|
||||
padding: 32px;
|
||||
background-color: rgb(240, 242, 245);
|
||||
position: relative;
|
||||
|
||||
.chart-wrapper {
|
||||
background: #fff;
|
||||
padding: 16px 16px 0;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:1024px) {
|
||||
.chart-wrapper {
|
||||
padding: 8px;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,271 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="110px">
|
||||
<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="选择日期" class="width100" prop="dateLimit">
|
||||
<el-date-picker @change="onchangeTime" v-model="queryParams.dateLimit" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" size="small" type="datetimerange" start-placeholder="开始时间"
|
||||
end-placeholder="结束时间" placement="bottom-end" placeholder="自定义时间" style="width: 220px;" @keyup.enter.native="handleQuery"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery" >搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 操作工具栏 -->
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"-->
|
||||
<!-- v-hasPermi="['member:promoter:create']">新增-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button type="info" icon="el-icon-upload2" size="mini" @click="handleImport"-->
|
||||
<!-- v-hasPermi="['member:promoter:export']">导入-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<!-- 列表 -->
|
||||
<el-table v-loading="loading" :data="list">
|
||||
<el-table-column label="编号" align="center" type="index"/>
|
||||
<el-table-column label="商户名称" align="center" prop="tenantName"/>
|
||||
<el-table-column label="销售金额" align="center" prop="totalMoney"/>
|
||||
<el-table-column label="订单数量" align="center" prop="totalNum"/>
|
||||
<el-table-column label="退款金额" align="center" prop="totalWithdrawMoney"/>
|
||||
<el-table-column label="240档订单数量" align="center" prop="threeTotalNum"/>
|
||||
<el-table-column label="400档订单数量" align="center" prop="twoTotalNum"/>
|
||||
<el-table-column label="640档订单数量" align="center" prop="oneTotalNum"/>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"/>
|
||||
<!-- 用户导入对话框 -->
|
||||
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
||||
<el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
|
||||
:action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
|
||||
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
<div class="el-upload__tip text-center" slot="tip">
|
||||
<!-- <div class="el-upload__tip" slot="tip">-->
|
||||
<!-- <el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的用户数据-->
|
||||
<!-- </div>-->
|
||||
<span>仅允许导入xls、xlsx格式文件。</span>
|
||||
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;"
|
||||
@click="importTemplate">下载模板
|
||||
</el-link>
|
||||
</div>
|
||||
</el-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitFileForm" :loading="submitLoading" :disabled="submitLoading">确 定</el-button>
|
||||
<el-button @click="upload.open = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
statement,
|
||||
statisticsData
|
||||
} from '@/api/statistics/merchantData';
|
||||
import {getBaseHeader} from '@/utils/request';
|
||||
import {DICT_TYPE} from '@/utils/dict';
|
||||
import Treeselect from '@riophae/vue-treeselect';
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css';
|
||||
import ImageUpload from '@/components/ImageUpload/index.vue';
|
||||
|
||||
export default {
|
||||
name: 'Promoter',
|
||||
computed: {
|
||||
DICT_TYPE() {
|
||||
return DICT_TYPE
|
||||
}
|
||||
},
|
||||
components: {
|
||||
ImageUpload,
|
||||
Treeselect
|
||||
},
|
||||
data() {
|
||||
const validatePass = (rule, value, callback) => {
|
||||
if (value === '') {
|
||||
callback(new Error('请输入密码'));
|
||||
} else {
|
||||
if (this.updatePasswordForm.checkPass !== '') {
|
||||
this.$refs.updatePasswordForm.validateField('checkPass');
|
||||
}
|
||||
callback();
|
||||
}
|
||||
};
|
||||
const validateCheckPass = (rule, value, callback) => {
|
||||
if (value === '') {
|
||||
callback(new Error('请再次输入密码'));
|
||||
} else if (value !== this.updatePasswordForm.password) {
|
||||
callback(new Error('两次输入密码不一致!'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
submitLoading: false,
|
||||
deptOptions: undefined,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 推广员列表
|
||||
list: [],
|
||||
// 弹出层标题
|
||||
title: '',
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 用户导入参数
|
||||
upload: {
|
||||
// 是否显示弹出层(用户导入)
|
||||
open: false,
|
||||
// 弹出层标题(用户导入)
|
||||
title: '推广员导入',
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 是否更新已经存在的用户数据
|
||||
updateSupport: 0,
|
||||
// 设置上传的请求头部
|
||||
headers: getBaseHeader(),
|
||||
// 上传的地址
|
||||
url: process.env.VUE_APP_BASE_API + '/admin-api/member/promoter/import'
|
||||
},
|
||||
updatePasswordForm: {},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 8,
|
||||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
onchangeTime(value){
|
||||
this.queryParams.startTime = value[0]
|
||||
this.queryParams.endTime = value[1]
|
||||
},
|
||||
handleChange(value){
|
||||
this.form.tenantId = value.tenantId
|
||||
},
|
||||
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
// 执行查询
|
||||
statisticsData(this.queryParams).then(response => {
|
||||
this.list = response.data.list;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 取消按钮 */
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
handleUpdatePassword(row) {
|
||||
this.updatePasswordForm = {}
|
||||
this.updatePassword.show = true
|
||||
this.updatePassword.userId = row.userId
|
||||
},
|
||||
/** 表单重置 */
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
deptId: undefined,
|
||||
userId: undefined,
|
||||
};
|
||||
this.resetForm('form');
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm('queryForm');
|
||||
this.queryParams.startTime = undefined;
|
||||
this.queryParams.endTime = undefined;
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// 处理查询参数
|
||||
let params = {...this.queryParams};
|
||||
params.pageSize = 999;
|
||||
this.$modal.confirm('是否确认导出商户分销数据项?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return statement(params);
|
||||
}).then(response => {
|
||||
this.$download.excel(response, '分销数据.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
/** 导入按钮操作 */
|
||||
handleImport() {
|
||||
this.upload.title = '推广员导入';
|
||||
this.upload.open = true;
|
||||
},
|
||||
// /** 下载模板操作 */
|
||||
// importTemplate() {
|
||||
// importTemplate().then(response => {
|
||||
// this.$download.excel(response, '推广员导入模板.xls');
|
||||
// });
|
||||
// },
|
||||
// 文件上传中处理
|
||||
handleFileUploadProgress(event, file, fileList) {
|
||||
this.upload.isUploading = true;
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
if (response.code !== 0) {
|
||||
this.$modal.msgError(response.msg)
|
||||
return;
|
||||
}
|
||||
this.upload.open = false;
|
||||
this.upload.isUploading = false;
|
||||
this.$refs.upload.clearFiles();
|
||||
// 拼接提示语
|
||||
let data = response.data;
|
||||
let text = '创建成功数量:' + data.createUsernames.length;
|
||||
for (const username of data.createUsernames) {
|
||||
text += '<br /> ' + username;
|
||||
}
|
||||
text += '<br />创建失败数量:' + Object.keys(data.failureUsernames).length;
|
||||
for (const username in data.failureUsernames) {
|
||||
text += '<br /> ' + username + ':' + data.failureUsernames[username];
|
||||
}
|
||||
this.$alert(text, '导入结果', {dangerouslyUseHTMLString: true});
|
||||
this.getList();
|
||||
},
|
||||
// 提交上传文件
|
||||
submitFileForm() {
|
||||
this.$refs.upload.submit();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -0,0 +1,221 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px">
|
||||
<el-form-item label="快速查看" class="width100" prop="type">
|
||||
<el-radio-group v-model="queryParams.type" type="button" class="mr20" size="small" @change="handleChange">
|
||||
<el-radio-button v-for="(item,i) in lookList" :label=i+1 :key="i">{{item.name}}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="选择日期" class="width100" prop="dateLimit">
|
||||
<el-date-picker @change="onchangeTime" v-model="queryParams.dateLimit" :default-time="['00:00:00', '23:59:59']" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" size="small" type="datetimerange" start-placeholder="开始时间"
|
||||
end-placeholder="结束时间" placement="bottom-end" placeholder="自定义时间" style="width: 220px;" ></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="statistics">
|
||||
<div v-for="(item,index) in statisticsList" :key="index" :class="[item.class,'statistics_item']">
|
||||
<span>{{item.name}}</span>
|
||||
<span v-if="index<2">¥{{item.value}}</span>
|
||||
<span v-else>{{item.value}} 单</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
<!-- <div class="dashboard-editor-container">-->
|
||||
|
||||
<!-- <panel-group @handleSetLineChartData="handleSetLineChartData" />-->
|
||||
|
||||
<!-- <el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">-->
|
||||
<!-- <line-chart :chart-data="lineChartData" />-->
|
||||
<!-- </el-row>-->
|
||||
|
||||
<!-- <el-row :gutter="32">-->
|
||||
<!-- <el-col :xs="24" :sm="24" :lg="8">-->
|
||||
<!-- <div class="chart-wrapper">-->
|
||||
<!-- <raddar-chart />-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :xs="24" :sm="24" :lg="8">-->
|
||||
<!-- <div class="chart-wrapper">-->
|
||||
<!-- <pie-chart />-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :xs="24" :sm="24" :lg="8">-->
|
||||
<!-- <div class="chart-wrapper">-->
|
||||
<!-- <bar-chart />-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
|
||||
|
||||
<!-- </div>-->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PanelGroup from '@/views/dashboard/PanelGroup'
|
||||
import LineChart from '@/views/dashboard/LineChart'
|
||||
import RaddarChart from '@/views/dashboard/RaddarChart'
|
||||
import PieChart from '@/views/dashboard/PieChart'
|
||||
import BarChart from '@/views/dashboard/BarChart'
|
||||
import creatComment from "@/views/mall/product/comment/creatComment.vue";
|
||||
import {
|
||||
statisticsAll
|
||||
} from '@/api/index';
|
||||
const lineChartData = {
|
||||
newVisitis: {
|
||||
expectedData: [100, 120, 161, 134, 105, 160, 165],
|
||||
actualData: [120, 82, 91, 154, 162, 140, 145]
|
||||
},
|
||||
messages: {
|
||||
expectedData: [200, 192, 120, 144, 160, 130, 140],
|
||||
actualData: [180, 160, 151, 106, 145, 150, 130]
|
||||
},
|
||||
purchases: {
|
||||
expectedData: [80, 100, 121, 104, 105, 90, 100],
|
||||
actualData: [120, 90, 100, 138, 142, 130, 130]
|
||||
},
|
||||
shoppings: {
|
||||
expectedData: [130, 140, 141, 142, 145, 150, 160],
|
||||
actualData: [120, 82, 91, 154, 162, 140, 130]
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'Index',
|
||||
components: {
|
||||
creatComment,
|
||||
PanelGroup,
|
||||
LineChart,
|
||||
RaddarChart,
|
||||
PieChart,
|
||||
BarChart
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
lineChartData: lineChartData.newVisitis,
|
||||
queryParams: {
|
||||
type:4
|
||||
},
|
||||
// list:[],
|
||||
lookList:[{name:'今日'},{name:'上周'},{name:'上月'},{name:'全部'}],
|
||||
statisticsList:[{name:'总销售金额',class:'totalMoney',value:0},{name:'总退款金额',class:'totalWithdrawMoney',value:0},{name:'总订单数量(单)',class:'totalNum',value:0},{name:'240档订单数量(单)',class:'threeTotalNum',value:0},{name:'400档订单数量(单)',class:'twoTotalNum',value:0},{name:'640档订单数量(单)',class:'oneTotalNum',value:0}],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
handleChange(){
|
||||
this.queryParams ={type:this.queryParams.type}
|
||||
this.getList()
|
||||
},
|
||||
onchangeTime(value){
|
||||
this.queryParams.type = null
|
||||
this.queryParams.startTime = value[0]
|
||||
this.queryParams.endTime = value[1]
|
||||
},
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
// 执行查询
|
||||
statisticsAll(this.queryParams).then(response => {
|
||||
this.statisticsList.forEach((item,index) =>{
|
||||
for (let key in response.data){
|
||||
if(item.class === key){
|
||||
item.value = response.data[key] || 0
|
||||
}
|
||||
}
|
||||
})
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams ={
|
||||
type: 4
|
||||
};
|
||||
this.handleQuery();
|
||||
},
|
||||
handleSetLineChartData(type) {
|
||||
this.lineChartData = lineChartData[type]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.statistics{
|
||||
width: 100%;
|
||||
height: 30%;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
flex-wrap: wrap;
|
||||
border-bottom: 1px solid #e6ebf5;
|
||||
.statistics_item{
|
||||
border-radius: 10px;
|
||||
width: 240px;
|
||||
min-height: 90px;
|
||||
margin: 10px 6%;
|
||||
font-size: 20px;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
word-wrap: break-word;
|
||||
span:nth-of-type(1){
|
||||
margin-left: 20px;
|
||||
}
|
||||
span:nth-of-type(2){
|
||||
margin-left: 40px;
|
||||
}
|
||||
}
|
||||
.totalMoney{
|
||||
background: rgb(77,157,255);
|
||||
}
|
||||
.totalNum{
|
||||
background: rgb(95,212,89);
|
||||
}
|
||||
.totalWithdrawMoney{
|
||||
background: rgb(171,109,234);
|
||||
}
|
||||
.threeTotalNum{
|
||||
background: rgb(255,154,1);
|
||||
}
|
||||
.twoTotalNum{
|
||||
background: rgb(10,193,224);
|
||||
}
|
||||
.oneTotalNum{
|
||||
background: rgb(10,196,160);
|
||||
}
|
||||
}
|
||||
.dashboard-editor-container {
|
||||
padding: 32px;
|
||||
background-color: rgb(240, 242, 245);
|
||||
position: relative;
|
||||
|
||||
.chart-wrapper {
|
||||
background: #fff;
|
||||
padding: 16px 16px 0;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:1024px) {
|
||||
.chart-wrapper {
|
||||
padding: 8px;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -347,7 +347,7 @@ export default {
|
|||
if (valid) {
|
||||
if (this.form.id !== undefined) {
|
||||
updateDept(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.$modal.msgSuccess("组织名称修改成功(其他选项暂不支持修改)");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
|
|
|
@ -56,16 +56,16 @@
|
|||
<image src="@/static/images/wecheat.png" ></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="protocol-text">
|
||||
<text>
|
||||
<image src="/static/images/trade.jpg" mode=""></image>
|
||||
电子证照中心
|
||||
</text>
|
||||
<text @click="handleTrade">
|
||||
ICP备案号:渝ICP备2022012409号-1
|
||||
</text>
|
||||
<text class="text">Copyright@2022-2023创盈云网络cyywl.top版权所有</text>
|
||||
</view>
|
||||
<view class="protocol-text">
|
||||
<text @click="handleTrade('证照')">
|
||||
<image src="/static/images/trade.jpg" mode=""></image>
|
||||
电子证照中心
|
||||
</text>
|
||||
<text @click="handleTrade('备案')">
|
||||
ICP备案号:渝ICP备2022012409号-1
|
||||
</text>
|
||||
<text class="text">Copyright@2022-2023创盈云网络cyywl.top版权所有</text>
|
||||
</view>
|
||||
<!-- <view class="hot">
|
||||
<view class="contain"></view>
|
||||
<view class="top">
|
||||
|
@ -371,11 +371,19 @@
|
|||
})
|
||||
},
|
||||
methods: {
|
||||
handleTrade() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/business_license/index'
|
||||
})
|
||||
},
|
||||
handleTrade(value) {
|
||||
switch (value) {
|
||||
case '证照':
|
||||
uni.navigateTo({
|
||||
url: '/pages/business_license/index'
|
||||
})
|
||||
break;
|
||||
case '备案':
|
||||
window.location.href = 'https://beian.miit.gov.cn/'
|
||||
break;
|
||||
}
|
||||
|
||||
},
|
||||
handleCustomer(value){
|
||||
switch (value) {
|
||||
case '电话客服':
|
||||
|
@ -755,6 +763,8 @@
|
|||
</style>
|
||||
<style lang="scss">
|
||||
.box {
|
||||
overflow: auto;
|
||||
padding-bottom: 6%;
|
||||
.header {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
@ -886,7 +896,7 @@
|
|||
// border-radius: 20rpx;
|
||||
.customer{
|
||||
margin: 3% 44rpx;
|
||||
height: 240rpx;
|
||||
height: 310rpx;
|
||||
image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<template>
|
||||
<view class="box">
|
||||
<view class="box-seach">
|
||||
<u-search placeholder="按手机号搜索查询" v-model="keyword" border-color="#F94B78" height="70" margin="0 0 35rpx 0" placeholder-color="#9C9C9C" bg-color="#fff" :show-action="false"></u-search>
|
||||
<u-search placeholder="按手机号搜索查询" v-model="keyword" border-color="#F94B78" height="70" margin="0 0 35rpx 0"
|
||||
placeholder-color="#9C9C9C" bg-color="#fff" :show-action="false"></u-search>
|
||||
</view>
|
||||
<view class="list-item" v-for="(item,index) in memberData" :key="index" @click.stop="handleBack(item)">
|
||||
<view class="item-title">
|
||||
|
@ -12,158 +13,268 @@
|
|||
<button v-show="item.bool && item.refundStatus == 0" @click.stop="handleService(item)">申请退款</button>
|
||||
<view v-show="item.refundStatus != 0">{{list[item.refundStatus]}}</view>
|
||||
</view>
|
||||
<view class="item-text">
|
||||
<view class="item-text">
|
||||
<text>日期:{{$util.timestampToTime(item.stringCreateTime)}}</text>
|
||||
<text>充值档次:{{item.grade}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<u-empty v-show="!memberData.length" text="暂无数据" mode="list"></u-empty>
|
||||
<u-navbar autoBack title="购买记录"></u-navbar>
|
||||
</view>
|
||||
</view>
|
||||
<u-modal :show="serviceShow" @confirm="confirm" @cancel="serviceShow = false" title="申请退款" show-cancel-button
|
||||
confirm-text="确认退款" cancel-text="取消退款">
|
||||
<view class="slot-content">
|
||||
<u--form :model="form" ref="uForm" :rules="rules" label-width="120">
|
||||
<u-form-item label="退款类型" prop="refundName" @click="show = true;">
|
||||
<u--input v-model="form.refundName" disabled disabledColor="#ffffff" placeholder='请选择退款类型'></u--input>
|
||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="退款理由" prop="memberReason"><u--textarea v-model="form.memberReason" maxlength="100"
|
||||
placeholder='请输入退款理由' count autoHeight /></u-form-item>
|
||||
</u--form>
|
||||
</view>
|
||||
</u-modal>
|
||||
<u-empty v-show="!memberData.length" text="暂无数据" mode="list"></u-empty>
|
||||
<u-navbar autoBack title="购买记录"></u-navbar>
|
||||
<u-action-sheet :show="show" :actions="actionSheetList" title="请选择退款类型" @close="show = false"
|
||||
@select="handleSelect">
|
||||
</u-action-sheet>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
memberOrderInfo,memberApplyRefund,memberOrderInfoByPhone
|
||||
memberOrderInfo,
|
||||
memberApplyRefund,
|
||||
memberOrderInfoByPhone
|
||||
} from '@/api/member.js';
|
||||
import { Debounce } from '@/utils/validate.js'
|
||||
import {
|
||||
Debounce
|
||||
} from '@/utils/validate.js'
|
||||
export default {
|
||||
name: "member_record",
|
||||
data() {
|
||||
return {
|
||||
keyword:'',
|
||||
memberData:[],
|
||||
list:['未退款','退款申请中','已退款','退款中']
|
||||
rules: {
|
||||
refundName: [{
|
||||
required: true,
|
||||
message: '请选择退款类型',
|
||||
// 可以单个或者同时写两个触发验证方式
|
||||
trigger: ['change', 'blur'],
|
||||
}],
|
||||
refundType: [{
|
||||
required: true,
|
||||
message: '请选择退款类型',
|
||||
// 可以单个或者同时写两个触发验证方式
|
||||
trigger: ['change', 'blur'],
|
||||
}],
|
||||
memberReason: [{
|
||||
required: true,
|
||||
message: '请输入退款理由',
|
||||
trigger: ['change', 'blur'],
|
||||
}]
|
||||
},
|
||||
show: false,
|
||||
serviceShow: false,
|
||||
keyword: '',
|
||||
memberData: [],
|
||||
form: {
|
||||
refundName: '',
|
||||
refundType: '',
|
||||
memberReason:''
|
||||
},
|
||||
list: ['未退款', '退款申请中', '已退款', '退款中'],
|
||||
actionSheetList: [{
|
||||
name: '对活动理解有误',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
name: '同一充值账户',
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
name: '改套餐/转网/销户',
|
||||
value: 3
|
||||
},
|
||||
{
|
||||
name: '下单信息有误',
|
||||
value: 4
|
||||
},
|
||||
{
|
||||
name: '业绩归属错误',
|
||||
value: 5
|
||||
},
|
||||
{
|
||||
name: '重复订单',
|
||||
value: 6
|
||||
},
|
||||
{
|
||||
name: '号码充值失败',
|
||||
value: 7
|
||||
},
|
||||
{
|
||||
name: '等待时间过长',
|
||||
value: 8
|
||||
},
|
||||
{
|
||||
name: '其它原因',
|
||||
value: 9
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
async onLoad() {
|
||||
await this.getList()
|
||||
},
|
||||
watch:{
|
||||
keyword :Debounce (async function (){
|
||||
if(this.keyword == ''){
|
||||
await this.getList()
|
||||
}else{
|
||||
await this.searchList()
|
||||
watch: {
|
||||
keyword: Debounce(async function() {
|
||||
if (this.keyword == '') {
|
||||
await this.getList()
|
||||
} else {
|
||||
await this.searchList()
|
||||
}
|
||||
},1000)
|
||||
},
|
||||
}, 1000)
|
||||
},
|
||||
methods: {
|
||||
handleBack(item){
|
||||
handleSelect(e) {
|
||||
this.form.refundType = e.value
|
||||
this.form.refundName = e.name
|
||||
},
|
||||
handleBack(item) {
|
||||
uni.navigateTo({
|
||||
url:`/pages/member_back/index?userPhone=${item.userPhone}&grade=${item.grade}`
|
||||
url: `/pages/member_back/index?userPhone=${item.userPhone}&grade=${item.grade}`
|
||||
})
|
||||
},
|
||||
async searchList(){
|
||||
let milliseconds = 2 * 3600 * 1000 // 7200000 毫秒
|
||||
let timestamp = new Date().getTime()
|
||||
const res = await memberOrderInfoByPhone(this.keyword)
|
||||
if(res.data){
|
||||
const arr = res.data.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
bool:item.createTime+milliseconds>timestamp
|
||||
}
|
||||
})
|
||||
this.memberData = arr
|
||||
}else{
|
||||
this.memberData = []
|
||||
}
|
||||
},
|
||||
async getList(){
|
||||
let milliseconds = 2 * 3600 * 1000 // 7200000 毫秒
|
||||
let timestamp = new Date().getTime()
|
||||
const res = await memberOrderInfo()
|
||||
if(res.data){
|
||||
async searchList() {
|
||||
let milliseconds = 2 * 3600 * 1000 // 7200000 毫秒
|
||||
let timestamp = new Date().getTime()
|
||||
const res = await memberOrderInfoByPhone(this.keyword)
|
||||
if (res.data) {
|
||||
const arr = res.data.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
bool:item.createTime+milliseconds>timestamp
|
||||
}
|
||||
})
|
||||
this.memberData = arr
|
||||
}else{
|
||||
return {
|
||||
...item,
|
||||
bool: item.createTime + milliseconds > timestamp
|
||||
}
|
||||
})
|
||||
this.memberData = arr
|
||||
} else {
|
||||
this.memberData = []
|
||||
}
|
||||
},
|
||||
async handleService(item){
|
||||
await memberApplyRefund({orderId:item.id,type:3})
|
||||
this.$util.Tips({
|
||||
title: '申请成功'
|
||||
});
|
||||
await this.getList()
|
||||
async getList() {
|
||||
let milliseconds = 2 * 3600 * 1000 // 7200000 毫秒
|
||||
let timestamp = new Date().getTime()
|
||||
const res = await memberOrderInfo()
|
||||
if (res.data) {
|
||||
const arr = res.data.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
bool: item.createTime + milliseconds > timestamp
|
||||
}
|
||||
})
|
||||
this.memberData = arr
|
||||
} else {
|
||||
this.memberData = []
|
||||
}
|
||||
},
|
||||
async confirm() {
|
||||
this.$refs.uForm.validate().then(async res => {
|
||||
await memberApplyRefund(this.form)
|
||||
this.$util.Tips({
|
||||
title: '申请成功'
|
||||
});
|
||||
this.serviceShow = false
|
||||
await this.getList()
|
||||
}).catch(errors => {
|
||||
uni.$u.toast('校验失败')
|
||||
})
|
||||
},
|
||||
async handleService(item) {
|
||||
this.serviceShow = true
|
||||
this.form = {
|
||||
orderId: item.id,
|
||||
type: 3
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .u-textarea__count{
|
||||
bottom: -26rpx;
|
||||
}
|
||||
.box {
|
||||
margin-top: 10%;
|
||||
padding: 20% 40rpx;
|
||||
background: url(../../static/images/memberBg.png);
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-attachment: fixed;
|
||||
.u-empty{
|
||||
margin-top: 20% !important;
|
||||
::v-deep .u-icon__icon{
|
||||
font-size: 140rpx !important;
|
||||
padding: 20% 40rpx;
|
||||
background: url(../../static/images/memberBg.png);
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-attachment: fixed;
|
||||
|
||||
.u-empty {
|
||||
margin-top: 20% !important;
|
||||
|
||||
::v-deep .u-icon__icon {
|
||||
font-size: 140rpx !important;
|
||||
}
|
||||
|
||||
::v-deep .u-empty__text {
|
||||
font-size: 30rpx !important;
|
||||
}
|
||||
}
|
||||
|
||||
.box-seach {
|
||||
z-index: 999;
|
||||
padding: 0 40rpx;
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
top: 8%;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
margin-bottom: 26rpx;
|
||||
padding: 30rpx 16rpx 25rpx 16rpx;
|
||||
background: #FDF0F1;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.item-title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.item-phone {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 30rpx;
|
||||
color: #E91D51;
|
||||
|
||||
view {
|
||||
border-radius: 3rpx;
|
||||
margin-right: 10rpx;
|
||||
width: 5rpx;
|
||||
height: 12rpx;
|
||||
background: #E91D51;
|
||||
}
|
||||
}
|
||||
::v-deep .u-empty__text{
|
||||
font-size: 30rpx !important;
|
||||
|
||||
button {
|
||||
padding: 6rpx;
|
||||
font-size: 26rpx;
|
||||
background: rgb(22, 155, 213);
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.box-seach{
|
||||
z-index: 999;
|
||||
padding: 0 40rpx;
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
top: 8%;
|
||||
left: 0;
|
||||
}
|
||||
.list-item{
|
||||
margin-bottom: 26rpx;
|
||||
padding: 30rpx 16rpx 25rpx 16rpx;
|
||||
background: #FDF0F1;
|
||||
border-radius: 20rpx;
|
||||
.item-text {
|
||||
padding: 20rpx 12rpx;
|
||||
background: #fff;
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
.item-title{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.item-phone{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 30rpx;
|
||||
color: #E91D51;
|
||||
view{
|
||||
border-radius: 3rpx;
|
||||
margin-right: 10rpx;
|
||||
width: 5rpx;
|
||||
height: 12rpx;
|
||||
background: #E91D51;
|
||||
}
|
||||
}
|
||||
button{
|
||||
padding: 6rpx ;
|
||||
font-size: 26rpx;
|
||||
background: rgb(22,155,213);
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.item-text{
|
||||
padding: 20rpx 12rpx;
|
||||
background: #fff;
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -51,11 +51,11 @@
|
|||
<view class="text">我已阅读并同意 <span class="link" @click="onLinkUserPrivacy">《创盈商城用户协议》</span></view>
|
||||
</div>
|
||||
<view class="protocol-text">
|
||||
<text>
|
||||
<text @click="handleTrade('证照')">
|
||||
<image src="/static/images/trade.jpg" mode=""></image>
|
||||
电子证照中心
|
||||
</text>
|
||||
<text @click="handleTrade">
|
||||
<text @click="handleTrade('备案')">
|
||||
ICP备案号:渝ICP备2022012409号-1
|
||||
</text>
|
||||
<text class="text">Copyright@2022-2023创盈云网络cyywl.top版权所有</text>
|
||||
|
@ -121,10 +121,18 @@
|
|||
|
||||
},
|
||||
methods: {
|
||||
handleTrade() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/business_license/index'
|
||||
})
|
||||
handleTrade(value) {
|
||||
switch (value) {
|
||||
case '证照':
|
||||
uni.navigateTo({
|
||||
url: '/pages/business_license/index'
|
||||
})
|
||||
break;
|
||||
case '备案':
|
||||
window.location.href = 'https://beian.miit.gov.cn/'
|
||||
break;
|
||||
}
|
||||
|
||||
},
|
||||
onLinkUserPrivacy() {
|
||||
uni.navigateTo({
|
||||
|
@ -141,7 +149,7 @@
|
|||
let that = this;
|
||||
if (!that.mobile) return that.$util.Tips({
|
||||
title: '请填写手机号码'
|
||||
});
|
||||
});
|
||||
if (!/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(that.mobile))
|
||||
return that.$util.Tips({
|
||||
title: '请输入正确的手机号码'
|
||||
|
|
Loading…
Reference in New Issue