Compare commits
20 Commits
683c14137c
...
1a49815b43
Author | SHA1 | Date |
---|---|---|
Jruome | 1a49815b43 | |
Jruome | d707770dac | |
Jruome | f3a61cb8dd | |
tangqian | 96f0f60549 | |
tangqian | f0d3b5a72d | |
tangqian | 82f9e16fe3 | |
tangqian | 1f44abfe66 | |
Jruome | 5085f63772 | |
tangqian | c923cc93f0 | |
tangqian | 581e6b74ae | |
tangqian | 3a9b7376f2 | |
tangqian | 6f7d2767e4 | |
tangqian | b7dcf93fb3 | |
tangqian | 94bf7664ab | |
tangqian | 538daff555 | |
tangqian | 692263438c | |
Jruome | 27d4c6b2ee | |
Jruome | 4391cfb64a | |
tangqian | 0a3e68c0d1 | |
tangqian | d092e0c23f |
|
@ -20,10 +20,10 @@ public class PageParam implements Serializable {
|
|||
@Min(value = 1, message = "页码最小值为 1")
|
||||
private Integer pageNo = PAGE_NO;
|
||||
|
||||
@Schema(description = "每页条数,最大值为 1000", required = true, example = "10")
|
||||
@Schema(description = "每页条数,最大值为 10000", required = true, example = "10")
|
||||
@NotNull(message = "每页条数不能为空")
|
||||
@Min(value = 1, message = "每页条数最小值为 1")
|
||||
@Max(value = 100, message = "每页条数最大值为 1000")
|
||||
@Max(value = 10000, message = "每页条数最大值为 10000")
|
||||
private Integer pageSize = PAGE_SIZE;
|
||||
|
||||
}
|
||||
|
|
|
@ -167,6 +167,7 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
|||
private StoreOrderMapper storeOrderMapper;
|
||||
@Autowired
|
||||
private TenantApi tenantApi;
|
||||
|
||||
/**
|
||||
* 列表(PC)
|
||||
*
|
||||
|
@ -1187,6 +1188,9 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
|||
// 初始化订单
|
||||
String code = OrderUtil.generateBillNo("MEMBER");
|
||||
RechargeOrderDO orderDO = initializeOrder(request, code, user, promoterDTO);
|
||||
// 用于测试 ---- TODO
|
||||
addPhoneRecord(orderDO, orderDO.getId().toString());
|
||||
// 用于测试 ---- TODO
|
||||
// 获取支付策略
|
||||
IPayStrategy payStrategy = strategySupport.getPayStrategy(request.getPayType());
|
||||
|
||||
|
@ -1319,7 +1323,8 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
|||
});
|
||||
phoneRecordMapper.insertBatch(recordDOS);
|
||||
try {
|
||||
phoneRecordService.insertPhone(phoneRecordAdds);
|
||||
// 用于支付测试 TODO
|
||||
// phoneRecordService.insertPhone(phoneRecordAdds);
|
||||
} catch (Exception e) {
|
||||
log.info("调取提报新增报错{}", e);
|
||||
}
|
||||
|
@ -1488,7 +1493,7 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
|||
List<StatementAllReqDataVo> dataVos = mapper.statisticsAll(request.getStartTime(), request.getEndTime());
|
||||
Map<Long, List<StatementAllReqDataVo>> collect = dataVos.stream().collect(Collectors.groupingBy(StatementAllReqDataVo::getTenantId));
|
||||
List<StatisticsPageVo> vos = new ArrayList<>();
|
||||
tenantPage.getList().forEach(e->{
|
||||
tenantPage.getList().forEach(e -> {
|
||||
List<StatementAllReqDataVo> dataVos1 = collect.get(e.getId());
|
||||
StatisticsPageVo vo = new StatisticsPageVo();
|
||||
if (!CollectionUtils.isEmpty(dataVos1)) {
|
||||
|
@ -1538,6 +1543,8 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
|||
orderDO.setPromoterId(user.getPromoterId());
|
||||
orderDO.setDeptId(deptId);
|
||||
orderDO.setTenantId(tenantId);
|
||||
// 用于测试 TODO
|
||||
orderDO.setPaid(1);
|
||||
rechargeOrderMapper.insert(orderDO);
|
||||
List<RechargeOrderInfoDO> infoDOS = new ArrayList<>();
|
||||
orderInfos.forEach(info -> {
|
||||
|
|
|
@ -47,28 +47,28 @@ public class WxPayStrategy implements IPayStrategy{
|
|||
Long requiredTenantId = TenantContextHolder.getRequiredTenantId();
|
||||
TenantDTO tenant = tenantApi.getTenant(requiredTenantId);
|
||||
InitOrderResponse response = new InitOrderResponse();
|
||||
WxPayService wxPayService = wxPayOneAutoConfiguration.wxPayOneService();
|
||||
Assert.notNull(wxPayService, "获取微信支付配置失败!");
|
||||
WxPayUnifiedOrderV3Request wxPayRequest = new WxPayUnifiedOrderV3Request();
|
||||
int sum = orderDO.getPayPrice().multiply(new BigDecimal("100")).intValue();
|
||||
wxPayRequest.setAmount(new WxPayUnifiedOrderV3Request.Amount().setTotal(sum));
|
||||
wxPayRequest.setDescription(tenant.getName());
|
||||
wxPayRequest.setOutTradeNo(orderDO.getOrderId());
|
||||
wxPayRequest.setNotifyUrl(payProperties.getNotifyUrl());
|
||||
wxPayRequest.setPayer(new WxPayUnifiedOrderV3Request.Payer().setOpenid(openid));
|
||||
wxPayRequest.setSceneInfo(new WxPayUnifiedOrderV3Request.SceneInfo().setPayerClientIp(ServletUtils.getClientIP(servletRequest)));
|
||||
wxPayRequest.setAppid(payProperties.getAppId());
|
||||
wxPayRequest.setMchid(payProperties.getMchId());
|
||||
try {
|
||||
WxPayUnifiedOrderV3Result wxPayUnifiedOrderV3Result = wxPayService.unifiedOrderV3(TradeTypeEnum.JSAPI, wxPayRequest);
|
||||
WxPayUnifiedOrderV3Result.JsapiResult jsapiResult = wxPayUnifiedOrderV3Result.getPayInfo(TradeTypeEnum.JSAPI, payProperties.getAppId(), payProperties.getMchId(), wxPayService.getConfig().getPrivateKey());
|
||||
InitOrderResponse.JsapiResult jsapiResultNew = new InitOrderResponse.JsapiResult();
|
||||
BeanUtils.copyProperties(jsapiResult, jsapiResultNew);
|
||||
response.setJsapiResult(jsapiResultNew);
|
||||
BeanUtils.copyProperties(wxPayUnifiedOrderV3Result, response);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
// WxPayService wxPayService = wxPayOneAutoConfiguration.wxPayOneService();
|
||||
// Assert.notNull(wxPayService, "获取微信支付配置失败!");
|
||||
// WxPayUnifiedOrderV3Request wxPayRequest = new WxPayUnifiedOrderV3Request();
|
||||
// int sum = orderDO.getPayPrice().multiply(new BigDecimal("100")).intValue();
|
||||
// wxPayRequest.setAmount(new WxPayUnifiedOrderV3Request.Amount().setTotal(sum));
|
||||
// wxPayRequest.setDescription(tenant.getName());
|
||||
// wxPayRequest.setOutTradeNo(orderDO.getOrderId());
|
||||
// wxPayRequest.setNotifyUrl(payProperties.getNotifyUrl());
|
||||
// wxPayRequest.setPayer(new WxPayUnifiedOrderV3Request.Payer().setOpenid(openid));
|
||||
// wxPayRequest.setSceneInfo(new WxPayUnifiedOrderV3Request.SceneInfo().setPayerClientIp(ServletUtils.getClientIP(servletRequest)));
|
||||
// wxPayRequest.setAppid(payProperties.getAppId());
|
||||
// wxPayRequest.setMchid(payProperties.getMchId());
|
||||
// try {
|
||||
// WxPayUnifiedOrderV3Result wxPayUnifiedOrderV3Result = wxPayService.unifiedOrderV3(TradeTypeEnum.JSAPI, wxPayRequest);
|
||||
// WxPayUnifiedOrderV3Result.JsapiResult jsapiResult = wxPayUnifiedOrderV3Result.getPayInfo(TradeTypeEnum.JSAPI, payProperties.getAppId(), payProperties.getMchId(), wxPayService.getConfig().getPrivateKey());
|
||||
// InitOrderResponse.JsapiResult jsapiResultNew = new InitOrderResponse.JsapiResult();
|
||||
// BeanUtils.copyProperties(jsapiResult, jsapiResultNew);
|
||||
// response.setJsapiResult(jsapiResultNew);
|
||||
// BeanUtils.copyProperties(wxPayUnifiedOrderV3Result, response);
|
||||
// } catch (Exception e) {
|
||||
// log.error(e.getMessage());
|
||||
// }
|
||||
return response;
|
||||
}
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
a.out_trade_no,
|
||||
a.pay_time,
|
||||
b.nickname,
|
||||
a.real_name,
|
||||
x.nickname as realName,
|
||||
a.uid,
|
||||
a.user_phone,
|
||||
a.confirm_phone,
|
||||
|
@ -124,6 +124,7 @@
|
|||
left join member_user b on a.promoter_id = b.id
|
||||
left join system_dept d on d.id = a.dept_id
|
||||
left join system_tenant e on e.id = a.tenant_id
|
||||
left join member_user x on a.uid = x.id
|
||||
<include refid="baseWhere">
|
||||
</include>
|
||||
order by a.pay_time desc
|
||||
|
@ -151,7 +152,7 @@
|
|||
e.name as tenantName,
|
||||
a.pay_time,
|
||||
a.pay_time as payCompleteTime,
|
||||
a.real_name,
|
||||
x.nickname as realName,
|
||||
a.paid,
|
||||
a.user_phone,
|
||||
a.confirm_phone,
|
||||
|
@ -167,6 +168,7 @@
|
|||
left join member_user b on a.promoter_id = b.id
|
||||
left join system_dept d on d.id = a.dept_id
|
||||
left join system_tenant e on e.id = a.tenant_id
|
||||
left join member_user x on a.uid = x.id
|
||||
<include refid="baseWhere">
|
||||
</include>
|
||||
</select>
|
||||
|
@ -249,9 +251,9 @@
|
|||
<if test="data.nickname !=null and data.nickname!=''">
|
||||
and b.nickname like CONCAT('%',#{data.nickname},'%')
|
||||
</if>
|
||||
<!--<if test="data.realName !=null and data.realName!=''">
|
||||
and a.real_name like CONCAT('%',#{data.realName},'%')
|
||||
</if>-->
|
||||
<if test="data.realName !=null and data.realName!=''">
|
||||
and x.real_name like CONCAT('%',#{data.realName},'%')
|
||||
</if>
|
||||
<if test="data.userPhone !=null and data.userPhone!=''">
|
||||
and a.user_phone like CONCAT('%',#{data.userPhone},'%')
|
||||
</if>
|
||||
|
|
|
@ -5,8 +5,12 @@ import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
|||
import cn.iocoder.yudao.module.system.enums.common.SexEnum;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
|
@ -21,11 +25,13 @@ import java.io.IOException;
|
|||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.member.controller.admin.promoter.vo.*;
|
||||
|
@ -98,11 +104,12 @@ public class PromoterController {
|
|||
@PreAuthorize("@ss.hasPermission('member:promoter:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportPromoterExcel(@Valid PromoterExportReqVO exportReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
HttpServletResponse response) throws IOException {
|
||||
List<PromoterExcelVO> list = promoterService.getPromoterList(exportReqVO);
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "推广员.xls", "数据", PromoterExcelVO.class, list);
|
||||
}
|
||||
|
||||
@GetMapping("/get-import-template")
|
||||
@Operation(summary = "获得导入推广员模板")
|
||||
public void importTemplate(HttpServletResponse response) throws IOException {
|
||||
|
@ -114,6 +121,7 @@ public class PromoterController {
|
|||
// 输出
|
||||
ExcelUtils.write(response, "推广员导入模板.xls", "推广员列表", PromoterImportExcelVO.class, list);
|
||||
}
|
||||
|
||||
@PostMapping("/import")
|
||||
@Operation(summary = "导入推广员")
|
||||
// @Parameters({
|
||||
|
@ -123,7 +131,7 @@ public class PromoterController {
|
|||
// @PreAuthorize("@ss.hasPermission('system:user:import')")
|
||||
@TenantIgnore
|
||||
public CommonResult<PromoterImportRespVO> importExcel(@RequestParam("file") MultipartFile file,
|
||||
@RequestParam(value = "updateSupport", required = false, defaultValue = "false") Boolean updateSupport) throws Exception {
|
||||
@RequestParam(value = "updateSupport", required = false, defaultValue = "false") Boolean updateSupport) throws Exception {
|
||||
List<PromoterImportExcelVO> list = ExcelUtils.read(file, PromoterImportExcelVO.class);
|
||||
return success(promoterService.importUserList(list, updateSupport));
|
||||
}
|
||||
|
@ -138,6 +146,25 @@ public class PromoterController {
|
|||
return success(pageResult);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/all-export-excel")
|
||||
@Operation(summary = "导出所有推广员 Excel")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void allExportExcel(@Valid PromoterPageReqVO pageVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
PageResult<PromoterRespVO> pageResult = promoterService.getPromoterPage(pageVO);
|
||||
List<PromoterExcelVO> list = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(pageResult.getList())) {
|
||||
pageResult.getList().forEach(e -> {
|
||||
PromoterExcelVO vo = new PromoterExcelVO();
|
||||
BeanUtils.copyProperties(e, vo);
|
||||
list.add(vo);
|
||||
});
|
||||
}
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "推广员.xls", "数据", PromoterExcelVO.class, list);
|
||||
}
|
||||
|
||||
@PutMapping("/tenantIgnoreUpdate")
|
||||
@Operation(summary = "排除祖父更新推广员")
|
||||
@TenantIgnore
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
package cn.iocoder.yudao.module.member.controller.admin.promoter.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 推广员 Excel VO
|
||||
|
|
|
@ -89,11 +89,14 @@ public class PromoterServiceImpl implements PromoterService {
|
|||
promoter.setUserId(memberUserDO.getId());
|
||||
promoter.setCreateTime(LocalDateTime.now());
|
||||
promoterMapper.insert(promoter);
|
||||
memberUserDO.setPromoterId(memberUserDO.getId());
|
||||
memberUserService.updateById(memberUserDO);
|
||||
// 返回
|
||||
return promoter.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public Long appCreatePromoter(AppPromoterCreateReqVO createReqVO) {
|
||||
//判断手机号是否注册
|
||||
MemberUserDO memberUserDO = memberUserService.getUserByMobile(createReqVO.getMobile());
|
||||
|
@ -127,6 +130,8 @@ public class PromoterServiceImpl implements PromoterService {
|
|||
promoter.setCreateTime(LocalDateTime.now());
|
||||
promoter.setSourceType(createReqVO.getSourceType());
|
||||
promoterMapper.insert(promoter);
|
||||
memberUserDO.setPromoterId(memberUserDO.getId());
|
||||
memberUserService.updateById(memberUserDO);
|
||||
// 返回
|
||||
return promoter.getId();
|
||||
}
|
||||
|
@ -278,6 +283,8 @@ public class PromoterServiceImpl implements PromoterService {
|
|||
}
|
||||
promoter.setDeptId(deptRespDTO.getId());
|
||||
promoterMapper.insert(promoter);
|
||||
memberUserDO.setPromoterId(memberUserDO.getId());
|
||||
memberUserService.updateById(memberUserDO);
|
||||
respVO.getCreateUsernames().add(importUser.getNickName());
|
||||
return;
|
||||
});
|
||||
|
|
|
@ -118,4 +118,11 @@ public interface DeptService {
|
|||
void validateDeptList(Collection<Long> ids);
|
||||
|
||||
void batchImport(MultipartFile file);
|
||||
|
||||
/**
|
||||
* 根据tenantId获取一级部门
|
||||
* @param tenantId
|
||||
* @return
|
||||
*/
|
||||
DeptDO getById(Long tenantId);
|
||||
}
|
||||
|
|
|
@ -147,7 +147,7 @@ public class DeptServiceImpl implements DeptService {
|
|||
deptDOS.forEach(x -> {
|
||||
x.setParentOrganizationName(x.getParentOrganizationName().replace(deptDO.getName(), reqVO.getName()));
|
||||
});
|
||||
deptMapper.updateBatch(deptDOS,deptDOS.size());
|
||||
deptMapper.updateBatch(deptDOS, deptDOS.size());
|
||||
deptDO.setName(reqVO.getName());
|
||||
deptMapper.updateById(deptDO);
|
||||
// 发送刷新消息
|
||||
|
@ -397,4 +397,9 @@ public class DeptServiceImpl implements DeptService {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeptDO getById(Long tenantId) {
|
||||
return deptMapper.selectOne(Wrappers.<DeptDO>lambdaQuery().eq(DeptDO::getTenantId, tenantId).eq(DeptDO::getParentId, 0L).last("limit 1"));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -11,9 +11,11 @@ import cn.iocoder.yudao.framework.tenant.config.TenantProperties;
|
|||
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
||||
import cn.iocoder.yudao.framework.tenant.core.util.TenantUtils;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptCreateReqVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.permission.vo.role.RoleCreateReqVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.tenant.*;
|
||||
import cn.iocoder.yudao.module.system.convert.tenant.TenantConvert;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.dept.DeptDO;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.permission.MenuDO;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.permission.RoleDO;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.tenant.TenantDO;
|
||||
|
@ -168,6 +170,12 @@ public class TenantServiceImpl implements TenantService {
|
|||
if (ObjectUtil.notEqual(tenant.getPackageId(), updateReqVO.getPackageId())) {
|
||||
updateTenantRoleMenu(tenant.getId(), tenantPackage.getMenuIds());
|
||||
}
|
||||
// 同步修改部门信息
|
||||
DeptUpdateReqVO reqVO = new DeptUpdateReqVO();
|
||||
DeptDO dept = deptService.getDept(updateReqVO.getId());
|
||||
reqVO.setName(updateReqVO.getName());
|
||||
reqVO.setId(dept.getId());
|
||||
deptService.updateDept(reqVO);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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,8 +1,10 @@
|
|||
<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" >
|
||||
<el-radio-group v-model="queryParams.type" type="button" class="mr20" size="small" @change="getList">
|
||||
<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>
|
||||
|
@ -15,14 +17,18 @@
|
|||
<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 list" :key="index" :class="[item.class,'statistics_item']">
|
||||
<div v-for="(item,index) in statisticsList" :key="index" :class="[item.class,'statistics_item']">
|
||||
<span>{{item.name}}</span>
|
||||
<span v-if="index<3">¥{{item.value}}</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">-->
|
||||
|
||||
|
@ -97,15 +103,18 @@ export default {
|
|||
return {
|
||||
lineChartData: lineChartData.newVisitis,
|
||||
queryParams: {
|
||||
type:4
|
||||
},
|
||||
list:[],
|
||||
// list:[],
|
||||
lookList:[{name:'今日'},{name:'上周'},{name:'上月'},{name:'全部'}],
|
||||
statisticsList:[{name:'总销售金额',class:'totalMoney'},{name:'总订单数量(单)',class:'totalNum'},{name:'总退款金额',class:'totalWithdrawMoney'},{name:'240档订单数量(单)',class:'threeTotalNum'},{name:'400档订单数量(单)',class:'twoTotalNum'},{name:'640档订单数量(单)',class:'oneTotalNum'}],
|
||||
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();
|
||||
},
|
||||
computed:{
|
||||
},
|
||||
methods: {
|
||||
onchangeTime(value){
|
||||
this.queryParams.startTime = value[0]
|
||||
|
@ -119,11 +128,10 @@ export default {
|
|||
this.statisticsList.forEach((item,index) =>{
|
||||
for (let key in response.data){
|
||||
if(item.class === key){
|
||||
item.value = response.data[key]
|
||||
item.value = response.data[key] || 0
|
||||
}
|
||||
}
|
||||
})
|
||||
this.list = this.statisticsList
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
@ -133,7 +141,9 @@ export default {
|
|||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams ={};
|
||||
this.queryParams ={
|
||||
type: 4
|
||||
};
|
||||
this.handleQuery();
|
||||
},
|
||||
handleSetLineChartData(type) {
|
||||
|
@ -150,11 +160,12 @@ export default {
|
|||
display: flex;
|
||||
justify-content: space-around;
|
||||
flex-wrap: wrap;
|
||||
border-bottom: 1px solid #e6ebf5;
|
||||
.statistics_item{
|
||||
border-radius: 10px;
|
||||
width: 14%;
|
||||
width: 240px;
|
||||
min-height: 90px;
|
||||
margin: 10px 8%;
|
||||
margin: 10px 6%;
|
||||
font-size: 20px;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
|
|
|
@ -44,10 +44,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"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
|
@ -161,7 +161,7 @@ import {
|
|||
createPromoter,
|
||||
tenantIgnoreUpdate,
|
||||
deletePromoter,
|
||||
getPromoter,
|
||||
allExport,
|
||||
getallPage,
|
||||
importTemplate,
|
||||
exportPromoterExcel, updatePassword
|
||||
|
@ -462,11 +462,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;
|
||||
|
|
Loading…
Reference in New Issue