Merge remote-tracking branch 'origin/feature/mall_product' into feature/mall_product_new
# Conflicts: # yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderRespVO.javapull/4/head^2
|
@ -1,10 +1,13 @@
|
|||
package cn.iocoder.yudao.module.shop.controller.admin.recharge.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 订单 Response VO")
|
||||
|
@ -19,7 +22,9 @@ public class RechargeOrderRespVO extends RechargeOrderBaseVO {
|
|||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
@Schema(description = "创建时间")
|
||||
private String stringCreateTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime stringCreateTime;
|
||||
@Schema(description = "档次")
|
||||
private String grade;
|
||||
|
||||
|
|
|
@ -1457,8 +1457,8 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
|||
orderDO.setUserPhone(StringUtils.isEmpty(request.getUserPhone()) ? user.getMobile() : request.getUserPhone());
|
||||
orderDO.setConfirmPhone(StringUtils.isEmpty(request.getConfirmPhone()) ? user.getMobile() : request.getConfirmPhone());
|
||||
orderDO.setTotalNum(orderInfos.size());
|
||||
// BigDecimal sum = new BigDecimal(orderInfos.stream().mapToDouble(OrderContentRequest.OrderInfo::getGearAmount).sum());
|
||||
BigDecimal sum = new BigDecimal("0.01");
|
||||
BigDecimal sum = new BigDecimal(orderInfos.stream().mapToDouble(OrderContentRequest.OrderInfo::getGearAmount).sum());
|
||||
// BigDecimal sum = new BigDecimal("0.01");
|
||||
orderDO.setTotalPrice(sum);
|
||||
orderDO.setPayPrice(sum);
|
||||
orderDO.setPayTime(LocalDateTime.now());
|
||||
|
|
|
@ -192,8 +192,7 @@ public class RechargeOrderServiceImpl implements RechargeOrderService {
|
|||
}
|
||||
}
|
||||
orderDO.setGrade(grade.toString());
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
orderDO.setStringCreateTime(orderDO.getCreateTime().format(formatter));
|
||||
orderDO.setStringCreateTime(orderDO.getCreateTime());
|
||||
}
|
||||
|
||||
return rechargeOrderRespVOS;
|
||||
|
@ -222,8 +221,7 @@ public class RechargeOrderServiceImpl implements RechargeOrderService {
|
|||
}
|
||||
}
|
||||
orderDO.setGrade(grade.toString());
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
orderDO.setStringCreateTime(orderDO.getCreateTime().format(formatter));
|
||||
orderDO.setStringCreateTime(orderDO.getCreateTime());
|
||||
}
|
||||
|
||||
return new PageResult<>(page.getRecords(), page.getTotal());
|
||||
|
@ -308,8 +306,7 @@ public class RechargeOrderServiceImpl implements RechargeOrderService {
|
|||
}
|
||||
}
|
||||
orderDO.setGrade(grade.toString());
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
orderDO.setStringCreateTime(orderDO.getCreateTime().format(formatter));
|
||||
orderDO.setStringCreateTime(orderDO.getCreateTime());
|
||||
}
|
||||
|
||||
return rechargeOrderRespVOS;
|
||||
|
|
|
@ -88,7 +88,7 @@ public class DeptController {
|
|||
|
||||
@Operation(summary = "批量组织架构导入")
|
||||
@PostMapping(value = "/batch/import", name = "批量组织架构导入")
|
||||
public CommonResult<Boolean> batchImport(@RequestParam("file") MultipartFile file) throws IOException {
|
||||
public CommonResult<Boolean> batchImport(@RequestParam("file") MultipartFile file){
|
||||
deptService.batchImport(file);
|
||||
return success(true);
|
||||
}
|
||||
|
|
|
@ -117,5 +117,5 @@ public interface DeptService {
|
|||
*/
|
||||
void validateDeptList(Collection<Long> ids);
|
||||
|
||||
void batchImport(MultipartFile file) throws IOException;
|
||||
void batchImport(MultipartFile file);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
|||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
||||
import cn.iocoder.yudao.framework.tenant.core.util.TenantUtils;
|
||||
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.BatchImportVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptCreateReqVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptListReqVO;
|
||||
|
@ -19,7 +18,6 @@ import cn.iocoder.yudao.module.system.util.TransactionalService;
|
|||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.excel.context.AnalysisContext;
|
||||
import com.alibaba.excel.event.AnalysisEventListener;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
@ -28,9 +26,8 @@ import com.google.common.collect.Multimap;
|
|||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
|
@ -325,87 +322,65 @@ public class DeptServiceImpl implements DeptService {
|
|||
private static List<DeptDO> deptDOS4 = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void batchImport(MultipartFile file) throws IOException {
|
||||
List<BatchImportVO> list = ExcelUtils.read(file, BatchImportVO.class);
|
||||
public void batchImport(MultipartFile file){
|
||||
|
||||
try {
|
||||
EasyExcel.read(file.getInputStream(), BatchImportVO.class, new AnalysisEventListener<BatchImportVO>() {
|
||||
List<BatchImportVO> deptList = ExcelUtils.read(file, BatchImportVO.class);
|
||||
|
||||
private final List<BatchImportVO> deptList = new ArrayList<>(10000);
|
||||
|
||||
@Override
|
||||
public void invoke(BatchImportVO o, AnalysisContext analysisContext) {
|
||||
deptList.add(o);
|
||||
if (deptList.size() % 15 == 0) {
|
||||
batchInsert();
|
||||
deptList.clear();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doAfterAllAnalysed(AnalysisContext analysisContext) {
|
||||
if (CollectionUtils.isNotEmpty(deptList)) {
|
||||
batchInsert();
|
||||
}
|
||||
}
|
||||
|
||||
private void batchInsert() {
|
||||
Map<String, List<BatchImportVO>> collect = deptList.stream().collect(Collectors.groupingBy(BatchImportVO::getHierarchy));
|
||||
List<BatchImportVO> batchImportVOS1 = collect.get("1");
|
||||
List<BatchImportVO> batchImportVOS2 = collect.get("2");
|
||||
List<BatchImportVO> batchImportVOS3 = collect.get("3");
|
||||
List<BatchImportVO> batchImportVOS4 = collect.get("4");
|
||||
transactionalService.run(() -> {
|
||||
// 装入层级1
|
||||
BatchImportVO batchImportVO1 = batchImportVOS1.get(0);
|
||||
DeptDO deptDO1 = new DeptDO();
|
||||
deptDO1.setParentId(0L);
|
||||
deptDO1.setName(batchImportVO1.getDepName());
|
||||
deptDO1.setParentOrganizationName(batchImportVO1.getDepName());
|
||||
deptDO1.setCharacteristic(batchImportVO1.getCharacteristic());
|
||||
deptMapper.insert(deptDO1);
|
||||
deptDO1.setParentOrganizationIds(deptDO1.getId().toString());
|
||||
deptMapper.updateById(deptDO1);
|
||||
// 装入层级2
|
||||
for (BatchImportVO batchImportVO : batchImportVOS2) {
|
||||
DeptDO deptDO2 = new DeptDO();
|
||||
deptDO2.setName(batchImportVO.getDepName());
|
||||
deptDO2.setParentId(deptDO1.getId());
|
||||
deptDO2.setParentOrganizationName(deptDO1.getName() + "," + batchImportVO.getDepName());
|
||||
deptDO2.setCharacteristic(batchImportVO.getCharacteristic());
|
||||
deptMapper.insert(deptDO2);
|
||||
deptDO2.setParentOrganizationIds(deptDO1.getId() + "," + deptDO2.getId());
|
||||
deptMapper.updateById(deptDO2);
|
||||
deptDOS2.add(deptDO2);
|
||||
}
|
||||
// 装入层级3
|
||||
for (BatchImportVO batchImportVO : batchImportVOS3) {
|
||||
DeptDO deptDO3 = new DeptDO();
|
||||
deptDO3.setName(batchImportVO.getDepName());
|
||||
List<DeptDO> collect1 = deptDOS2.stream().filter(e -> e.getCharacteristic().equals(batchImportVO.getCharacteristic())).collect(Collectors.toList());
|
||||
DeptDO deptDO = collect1.get(0);
|
||||
deptDO3.setParentId(deptDO.getId());
|
||||
deptDO3.setParentOrganizationName(deptDO.getName() + "," + batchImportVO.getDepName());
|
||||
deptMapper.insert(deptDO3);
|
||||
deptDO3.setParentOrganizationIds(deptDO.getId() + "," + deptDO3.getId());
|
||||
deptMapper.updateById(deptDO3);
|
||||
deptDOS3.add(deptDO3);
|
||||
}
|
||||
// 装入层级4
|
||||
for (BatchImportVO batchImportVO : batchImportVOS4) {
|
||||
DeptDO deptDO4 = new DeptDO();
|
||||
deptDO4.setName(batchImportVO.getDepName());
|
||||
List<DeptDO> collect1 = deptDOS3.stream().filter(e -> e.getCharacteristic().equals(batchImportVO.getCharacteristic())).collect(Collectors.toList());
|
||||
DeptDO deptDO = collect1.get(0);
|
||||
deptDO4.setParentId(deptDO.getId());
|
||||
deptDO4.setParentOrganizationName(deptDO.getName() + "," + batchImportVO.getDepName());
|
||||
deptMapper.insert(deptDO4);
|
||||
deptDO4.setParentOrganizationIds(deptDO.getId() + "," + deptDO4.getId());
|
||||
deptMapper.updateById(deptDO4);
|
||||
deptDOS3.add(deptDO4);
|
||||
}
|
||||
});
|
||||
}
|
||||
}).sheet().headRowNumber(1).doRead();
|
||||
Map<String, List<BatchImportVO>> collect = deptList.stream().collect(Collectors.groupingBy(BatchImportVO::getHierarchy));
|
||||
List<BatchImportVO> batchImportVOS1 = collect.get("1");
|
||||
List<BatchImportVO> batchImportVOS2 = collect.get("2");
|
||||
List<BatchImportVO> batchImportVOS3 = collect.get("3");
|
||||
List<BatchImportVO> batchImportVOS4 = collect.get("4");
|
||||
// 装入层级1
|
||||
BatchImportVO batchImportVO1 = batchImportVOS1.get(0);
|
||||
DeptDO deptDO1 = new DeptDO();
|
||||
deptDO1.setParentId(0L);
|
||||
deptDO1.setName(batchImportVO1.getDepName());
|
||||
deptDO1.setParentOrganizationName(batchImportVO1.getDepName());
|
||||
deptDO1.setCharacteristic(batchImportVO1.getCharacteristic());
|
||||
deptMapper.insert(deptDO1);
|
||||
deptDO1.setParentOrganizationIds(deptDO1.getId().toString());
|
||||
deptMapper.update(deptDO1,Wrappers.<DeptDO>lambdaUpdate().eq(DeptDO::getId,deptDO1.getId()));
|
||||
// 装入层级2
|
||||
for (BatchImportVO batchImportVO : batchImportVOS2) {
|
||||
DeptDO deptDO2 = new DeptDO();
|
||||
deptDO2.setName(batchImportVO.getDepName());
|
||||
deptDO2.setParentId(deptDO1.getId());
|
||||
deptDO2.setParentOrganizationName(deptDO1.getParentOrganizationName() + "," + batchImportVO.getDepName());
|
||||
deptDO2.setCharacteristic(batchImportVO.getCharacteristic());
|
||||
deptMapper.insert(deptDO2);
|
||||
deptDO2.setParentOrganizationIds(deptDO1.getParentOrganizationIds() + "," + deptDO2.getId());
|
||||
deptMapper.update(deptDO2,Wrappers.<DeptDO>lambdaUpdate().eq(DeptDO::getId,deptDO2.getId()));
|
||||
deptDOS2.add(deptDO2);
|
||||
}
|
||||
// 装入层级3
|
||||
for (BatchImportVO batchImportVO : batchImportVOS3) {
|
||||
DeptDO deptDO3 = new DeptDO();
|
||||
deptDO3.setName(batchImportVO.getDepName());
|
||||
List<DeptDO> collect1 = deptDOS2.stream().filter(e -> e.getCharacteristic().equals(batchImportVO.getRelation())).collect(Collectors.toList());
|
||||
DeptDO deptDO = collect1.get(0);
|
||||
deptDO3.setParentId(deptDO.getId());
|
||||
deptDO3.setParentOrganizationName(deptDO.getParentOrganizationName() + "," + batchImportVO.getDepName());
|
||||
deptDO3.setCharacteristic(batchImportVO.getCharacteristic());
|
||||
deptMapper.insert(deptDO3);
|
||||
deptDO3.setParentOrganizationIds(deptDO.getParentOrganizationIds() + "," + deptDO3.getId());
|
||||
deptMapper.update(deptDO3,Wrappers.<DeptDO>lambdaUpdate().eq(DeptDO::getId,deptDO3.getId()));
|
||||
deptDOS3.add(deptDO3);
|
||||
}
|
||||
// 装入层级4
|
||||
for (BatchImportVO batchImportVO : batchImportVOS4) {
|
||||
DeptDO deptDO4 = new DeptDO();
|
||||
deptDO4.setName(batchImportVO.getDepName());
|
||||
List<DeptDO> collect1 = deptDOS3.stream().filter(e -> e.getCharacteristic().equals(batchImportVO.getRelation())).collect(Collectors.toList());
|
||||
DeptDO deptDO = collect1.get(0);
|
||||
deptDO4.setParentId(deptDO.getId());
|
||||
deptDO4.setParentOrganizationName(deptDO.getParentOrganizationName() + "," + batchImportVO.getDepName());
|
||||
deptMapper.insert(deptDO4);
|
||||
deptDO4.setParentOrganizationIds(deptDO.getParentOrganizationIds() + "," + deptDO4.getId());
|
||||
deptMapper.update(deptDO4,Wrappers.<DeptDO>lambdaUpdate().eq(DeptDO::getId,deptDO4.getId()));
|
||||
deptDOS4.add(deptDO4);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
log.error("导入组织架构失败!", e);
|
||||
} finally {
|
||||
|
|
|
@ -0,0 +1,155 @@
|
|||
<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="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"/>
|
||||
</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"
|
||||
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="nickname">
|
||||
<el-input v-model="queryParams.nickname" 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:export']">导出</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" prop="orderId" />
|
||||
<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="orderId" />
|
||||
<el-table-column label="加入时间" align="center" prop="payTime" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.payTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="成交定单数" align="center" prop="orderId" />
|
||||
<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>
|
||||
<!-- 分页组件 -->
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"/>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getRechargeOrderPage,
|
||||
exportRechargeOrderExcel
|
||||
} from '@/api/shop/rechargeOrder';
|
||||
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
|
||||
import ElementForm from "@/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue";
|
||||
|
||||
export default {
|
||||
name: "MemberRecharge",
|
||||
computed: {
|
||||
DICT_TYPE() {
|
||||
return DICT_TYPE
|
||||
}
|
||||
},
|
||||
components: {
|
||||
ElementForm
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 订单列表
|
||||
list: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
orderId: null,
|
||||
tenantName: null,
|
||||
payTime: [],
|
||||
nickname: null
|
||||
},
|
||||
statusDictDatas: getDictDatas(DICT_TYPE.PAY_STATUS),
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
// 执行查询
|
||||
getRechargeOrderPage(this.queryParams).then(response => {
|
||||
this.list = response.data.list;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
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,160 @@
|
|||
<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="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"/>
|
||||
</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"
|
||||
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>
|
||||
<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:export']">导出</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" prop="orderId" />
|
||||
<el-table-column label="订单支付时间" align="center" prop="payTime" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.payTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="commissionPrice" />
|
||||
<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"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单状态" align="center" prop="paid">
|
||||
<template v-slot="scope">
|
||||
<dict-tag :type="DICT_TYPE.PAY_STATUS" :value="scope.row.paid"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"/>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getRechargeOrderPage,
|
||||
exportRechargeOrderExcel
|
||||
} from '@/api/shop/rechargeOrder';
|
||||
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
|
||||
import ElementForm from "@/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue";
|
||||
|
||||
export default {
|
||||
name: "MemberRecharge",
|
||||
computed: {
|
||||
DICT_TYPE() {
|
||||
return DICT_TYPE
|
||||
}
|
||||
},
|
||||
components: {
|
||||
ElementForm
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 订单列表
|
||||
list: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
orderId: null,
|
||||
tenantName: null,
|
||||
payTime: [],
|
||||
nickname: null
|
||||
},
|
||||
statusDictDatas: getDictDatas(DICT_TYPE.PAY_STATUS),
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.paid = 1
|
||||
// 执行查询
|
||||
getRechargeOrderPage(this.queryParams).then(response => {
|
||||
this.list = response.data.list;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
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>
|
|
@ -20,6 +20,11 @@
|
|||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
||||
v-hasPermi="['system:dept:create']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="info" icon="el-icon-upload2" size="mini" @click="handleImport"
|
||||
v-hasPermi="['system:dept:export']">导入
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="info" plain icon="el-icon-sort" size="mini" @click="toggleExpandAll">展开/折叠</el-button>
|
||||
</el-col>
|
||||
|
@ -104,6 +109,22 @@
|
|||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 商户导入对话框 -->
|
||||
<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" :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">
|
||||
<span>仅允许导入xls、xlsx格式文件。</span>
|
||||
</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>
|
||||
|
||||
|
@ -115,6 +136,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|||
import {CommonStatusEnum} from '@/utils/constants'
|
||||
import { getDictDatas, DICT_TYPE } from '@/utils/dict'
|
||||
import {listSimpleUsers} from "@/api/system/user";
|
||||
import {getBaseHeader} from '@/utils/request';
|
||||
|
||||
export default {
|
||||
name: "SystemDept",
|
||||
|
@ -141,6 +163,19 @@ export default {
|
|||
refreshTable: true,
|
||||
// 是否展开
|
||||
expand: false,
|
||||
submitLoading: false,
|
||||
upload: {
|
||||
// 是否显示弹出层(用户导入)
|
||||
open: false,
|
||||
// 弹出层标题(用户导入)
|
||||
title: '商户导入',
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 设置上传的请求头部
|
||||
headers: getBaseHeader(),
|
||||
// 上传的地址
|
||||
url: process.env.VUE_APP_BASE_API + '/admin-api/system/dept/batch/import'
|
||||
},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
name: undefined,
|
||||
|
@ -189,6 +224,29 @@ export default {
|
|||
});
|
||||
},
|
||||
methods: {
|
||||
submitFileForm() {
|
||||
this.$refs.upload.submit();
|
||||
},
|
||||
/** 导入按钮操作 */
|
||||
handleImport() {
|
||||
this.upload.title = '推广员导入';
|
||||
this.upload.open = true;
|
||||
},
|
||||
// 文件上传中处理
|
||||
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();
|
||||
this.getList();
|
||||
},
|
||||
/** 查询组织列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
|
|
|
@ -62,3 +62,17 @@ export function memberTopUp(data) {
|
|||
export function memberApplyRefund(data) {
|
||||
return request.post('api/order/member/memberApplyRefund',data);
|
||||
}
|
||||
|
||||
/**
|
||||
* "获取当前登录账号为推广员的推广会员记录
|
||||
*/
|
||||
export function promoterOrderInfo(data) {
|
||||
return request.post('api/order/member/promoterOrderInfo',data);
|
||||
}
|
||||
|
||||
/**
|
||||
* "获取当前登录发展会员数量统计
|
||||
*/
|
||||
export function promoterOrderCount(type) {
|
||||
return request.get(`api/order/member/promoterOrderCount?type=${type}`);
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<view class="box">
|
||||
<u-navbar autoBack title="发展会员业绩" bgColor="rgba(255,255,255,0)" :placeholder="true" leftIconSize="40"
|
||||
leftIconColor="#fff" titleStyle="font-size:35rpx;color:#fff">
|
||||
<view slot="right">
|
||||
<!-- <view slot="right">
|
||||
<u-icon name="more-dot-fill" color="#fff"></u-icon>
|
||||
</view>
|
||||
</view> -->
|
||||
</u-navbar>
|
||||
<u-sticky bgColor="#fff">
|
||||
<u-tabs @change="handleChange" :list="list" itemStyle=" padding-left: 46rpx; padding-right: 46rpx; height: 46px;" lineColor="#DA2E55" lineWidth="48rpx" lineHeight="10rpx" :activeStyle="activeStyle" :inactiveStyle="inactiveStyle"></u-tabs>
|
||||
|
@ -16,7 +16,7 @@
|
|||
<image src="../../static/images/money1.png" ></image>
|
||||
<text>总计金额</text>
|
||||
</view>
|
||||
<view class="money_right"><text>¥</text>2400</view>
|
||||
<view class="money_right"><text>¥</text>{{orderDetail.totalAmount}}</view>
|
||||
</view>
|
||||
<view class="money_statistics">
|
||||
<view class="money_left">
|
||||
|
@ -24,7 +24,7 @@
|
|||
<view class="segmentation" style="background: linear-gradient(0deg, #FFFFFF 0%, #FFE0C5 47%, #FFFFFF 100%);"></view>
|
||||
<text>已发展会员个数</text>
|
||||
</view>
|
||||
<view class="money_right" style="color: #FF4800;">10个</view>
|
||||
<view class="money_right" style="color: #FF4800;">{{orderDetail.memberCount}}个</view>
|
||||
<image class="fillet" src="../../static/images/fillet1.png" ></image>
|
||||
</view>
|
||||
<view class="money_statistics">
|
||||
|
@ -33,7 +33,7 @@
|
|||
<view class="segmentation" style="background: linear-gradient(0deg, #FFFFFF 0%, #C8EFFF 47%, #FFFFFF 100%);"></view>
|
||||
<text>提成比例</text>
|
||||
</view>
|
||||
<view class="money_right" style="color: #1082FF;">5%</view>
|
||||
<view class="money_right" style="color: #1082FF;">{{orderDetail.memberCommission}}%</view>
|
||||
<image class="fillet" src="../../static/images/fillet2.png" ></image>
|
||||
</view>
|
||||
<view class="money_statistics">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<view class="segmentation" style="background: linear-gradient(0deg, #FFFFFF 0%, #CEF0DA 47%, #FFFFFF 100%);"></view>
|
||||
<text>预计提成金额</text>
|
||||
</view>
|
||||
<view class="money_right" style="color: #32A84F;">120</view>
|
||||
<view class="money_right" style="color: #32A84F;">{{parseFloat(orderDetail.totalAmount*(parseFloat(orderDetail.memberCommission) / 100))}}</view>
|
||||
<image class="fillet" src="../../static/images/fillet3.png" ></image>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -51,27 +51,23 @@
|
|||
流水明细
|
||||
</view>
|
||||
<view class="turnover_list">
|
||||
<u-list
|
||||
height="500"
|
||||
@scrolltolower="scrolltolower"
|
||||
>
|
||||
<u-list-item
|
||||
v-for="(item, index) in orderData"
|
||||
:key="index"
|
||||
>
|
||||
<view class="list_item">
|
||||
<view>
|
||||
<view class="item_radius"></view>
|
||||
<text>客户1</text>
|
||||
<text>{{item.nickname}}</text>
|
||||
</view>
|
||||
<text>¥640.00</text>
|
||||
</view>
|
||||
<view class="list_item">
|
||||
<view>
|
||||
<view class="item_radius"></view>
|
||||
<text>客户1</text>
|
||||
<text>¥{{item.payPrice}}</text>
|
||||
</view>
|
||||
<text>¥640.00</text>
|
||||
</view>
|
||||
<view class="list_item">
|
||||
<view>
|
||||
<view class="item_radius"></view>
|
||||
<text>客户1</text>
|
||||
</view>
|
||||
<text>¥640.00</text>
|
||||
</view>
|
||||
</u-list-item>
|
||||
</u-list>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -80,11 +76,12 @@
|
|||
|
||||
<script>
|
||||
import {
|
||||
memberGradeInfo
|
||||
promoterOrderInfo,
|
||||
promoterOrderCount
|
||||
} from '@/api/member.js';
|
||||
|
||||
export default {
|
||||
name: "member_loding",
|
||||
name: "sale_performance",
|
||||
data() {
|
||||
return {
|
||||
activeStyle:{
|
||||
|
@ -107,7 +104,14 @@
|
|||
name: '上月'
|
||||
}, {
|
||||
name: '累计'
|
||||
}]
|
||||
}],
|
||||
pageData:{
|
||||
pageNo:1,
|
||||
pageSize:10
|
||||
},
|
||||
orderDetail:{},
|
||||
orderData:[],
|
||||
total:0
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -116,14 +120,32 @@
|
|||
uni.showLoading({
|
||||
title: '加载中'
|
||||
});
|
||||
|
||||
await this.orderCount(0)
|
||||
await this.orderInfo(false)
|
||||
} finally {
|
||||
uni.hideLoading();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleChange(index){
|
||||
|
||||
async scrolltolower() {
|
||||
if(this.total>this.orderData.length){
|
||||
this.pageData.pageNo++
|
||||
await this.orderInfo(true)
|
||||
}
|
||||
},
|
||||
async orderInfo(bool=true){
|
||||
const res = await promoterOrderInfo(this.pageData)
|
||||
this.orderData = bool? this.orderData.concat(res.data.list):this.orderData = res.data.list
|
||||
this.total = res.data.total
|
||||
},
|
||||
async orderCount(index){
|
||||
const res = await promoterOrderCount(index+1)
|
||||
this.orderDetail = res.data
|
||||
},
|
||||
async handleChange(value){
|
||||
this.pageData.pageNo = 1
|
||||
await this.orderCount(value.index)
|
||||
await this.orderInfo(false)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |