Compare commits

...

20 Commits

Author SHA1 Message Date
Jruome 1a49815b43 Merge remote-tracking branch 'origin/master' 2023-06-16 11:40:51 +08:00
Jruome d707770dac Merge remote-tracking branch 'origin/test' 2023-06-16 11:37:35 +08:00
Jruome f3a61cb8dd 管理端 推广员导出 2023-06-16 11:37:00 +08:00
tangqian 96f0f60549 Merge branch 'feature/mall_product' into test 2023-06-16 11:29:25 +08:00
tangqian f0d3b5a72d fix:推广员导出 2023-06-16 11:29:14 +08:00
tangqian 82f9e16fe3 Merge remote-tracking branch 'origin/test' into test 2023-06-16 11:20:55 +08:00
tangqian 1f44abfe66 Merge branch 'feature/mall_product' into test 2023-06-16 11:20:45 +08:00
Jruome 5085f63772 管理端 推广员导入 2023-06-16 11:14:35 +08:00
tangqian c923cc93f0 fix:推广员导出 2023-06-16 10:53:43 +08:00
tangqian 581e6b74ae Merge branch 'feature/mall_product' into test 2023-06-16 10:37:41 +08:00
tangqian 3a9b7376f2 fix:推广员导出 2023-06-16 10:37:28 +08:00
tangqian 6f7d2767e4 Merge branch 'feature/mall_product' into test 2023-06-16 09:47:02 +08:00
tangqian b7dcf93fb3 fix:扫物业码和后台注册推广员的时候 user表的中推广员id默认为自己 2023-06-16 09:46:49 +08:00
tangqian 94bf7664ab Merge branch 'feature/mall_product' into test 2023-06-16 09:14:37 +08:00
tangqian 538daff555 fix:扫物业码和后台注册推广员的时候 user表的中推广员id默认为自己 2023-06-15 17:43:08 +08:00
tangqian 692263438c fix:修改用于测试跳转金额 2023-06-15 14:07:00 +08:00
Jruome 27d4c6b2ee Merge remote-tracking branch 'origin/test' 2023-06-15 10:34:18 +08:00
Jruome 4391cfb64a 管理端 数据统计样式修改 2023-06-15 10:33:52 +08:00
tangqian 0a3e68c0d1 Merge branch 'feature/mall_product' into test 2023-06-15 09:41:52 +08:00
tangqian d092e0c23f Merge branch 'feature/mall_product' into test 2023-06-14 18:17:33 +08:00
13 changed files with 136 additions and 56 deletions

View File

@ -20,10 +20,10 @@ public class PageParam implements Serializable {
@Min(value = 1, message = "页码最小值为 1") @Min(value = 1, message = "页码最小值为 1")
private Integer pageNo = PAGE_NO; private Integer pageNo = PAGE_NO;
@Schema(description = "每页条数,最大值为 1000", required = true, example = "10") @Schema(description = "每页条数,最大值为 10000", required = true, example = "10")
@NotNull(message = "每页条数不能为空") @NotNull(message = "每页条数不能为空")
@Min(value = 1, message = "每页条数最小值为 1") @Min(value = 1, message = "每页条数最小值为 1")
@Max(value = 100, message = "每页条数最大值为 1000") @Max(value = 10000, message = "每页条数最大值为 10000")
private Integer pageSize = PAGE_SIZE; private Integer pageSize = PAGE_SIZE;
} }

View File

@ -167,6 +167,7 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
private StoreOrderMapper storeOrderMapper; private StoreOrderMapper storeOrderMapper;
@Autowired @Autowired
private TenantApi tenantApi; private TenantApi tenantApi;
/** /**
* PC * PC
* *
@ -1187,6 +1188,9 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
// 初始化订单 // 初始化订单
String code = OrderUtil.generateBillNo("MEMBER"); String code = OrderUtil.generateBillNo("MEMBER");
RechargeOrderDO orderDO = initializeOrder(request, code, user, promoterDTO); RechargeOrderDO orderDO = initializeOrder(request, code, user, promoterDTO);
// 用于测试 ---- TODO
addPhoneRecord(orderDO, orderDO.getId().toString());
// 用于测试 ---- TODO
// 获取支付策略 // 获取支付策略
IPayStrategy payStrategy = strategySupport.getPayStrategy(request.getPayType()); IPayStrategy payStrategy = strategySupport.getPayStrategy(request.getPayType());
@ -1319,7 +1323,8 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
}); });
phoneRecordMapper.insertBatch(recordDOS); phoneRecordMapper.insertBatch(recordDOS);
try { try {
phoneRecordService.insertPhone(phoneRecordAdds); // 用于支付测试 TODO
// phoneRecordService.insertPhone(phoneRecordAdds);
} catch (Exception e) { } catch (Exception e) {
log.info("调取提报新增报错{}", e); log.info("调取提报新增报错{}", e);
} }
@ -1538,6 +1543,8 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
orderDO.setPromoterId(user.getPromoterId()); orderDO.setPromoterId(user.getPromoterId());
orderDO.setDeptId(deptId); orderDO.setDeptId(deptId);
orderDO.setTenantId(tenantId); orderDO.setTenantId(tenantId);
// 用于测试 TODO
orderDO.setPaid(1);
rechargeOrderMapper.insert(orderDO); rechargeOrderMapper.insert(orderDO);
List<RechargeOrderInfoDO> infoDOS = new ArrayList<>(); List<RechargeOrderInfoDO> infoDOS = new ArrayList<>();
orderInfos.forEach(info -> { orderInfos.forEach(info -> {

View File

@ -47,28 +47,28 @@ public class WxPayStrategy implements IPayStrategy{
Long requiredTenantId = TenantContextHolder.getRequiredTenantId(); Long requiredTenantId = TenantContextHolder.getRequiredTenantId();
TenantDTO tenant = tenantApi.getTenant(requiredTenantId); TenantDTO tenant = tenantApi.getTenant(requiredTenantId);
InitOrderResponse response = new InitOrderResponse(); InitOrderResponse response = new InitOrderResponse();
WxPayService wxPayService = wxPayOneAutoConfiguration.wxPayOneService(); // WxPayService wxPayService = wxPayOneAutoConfiguration.wxPayOneService();
Assert.notNull(wxPayService, "获取微信支付配置失败!"); // Assert.notNull(wxPayService, "获取微信支付配置失败!");
WxPayUnifiedOrderV3Request wxPayRequest = new WxPayUnifiedOrderV3Request(); // WxPayUnifiedOrderV3Request wxPayRequest = new WxPayUnifiedOrderV3Request();
int sum = orderDO.getPayPrice().multiply(new BigDecimal("100")).intValue(); // int sum = orderDO.getPayPrice().multiply(new BigDecimal("100")).intValue();
wxPayRequest.setAmount(new WxPayUnifiedOrderV3Request.Amount().setTotal(sum)); // wxPayRequest.setAmount(new WxPayUnifiedOrderV3Request.Amount().setTotal(sum));
wxPayRequest.setDescription(tenant.getName()); // wxPayRequest.setDescription(tenant.getName());
wxPayRequest.setOutTradeNo(orderDO.getOrderId()); // wxPayRequest.setOutTradeNo(orderDO.getOrderId());
wxPayRequest.setNotifyUrl(payProperties.getNotifyUrl()); // wxPayRequest.setNotifyUrl(payProperties.getNotifyUrl());
wxPayRequest.setPayer(new WxPayUnifiedOrderV3Request.Payer().setOpenid(openid)); // wxPayRequest.setPayer(new WxPayUnifiedOrderV3Request.Payer().setOpenid(openid));
wxPayRequest.setSceneInfo(new WxPayUnifiedOrderV3Request.SceneInfo().setPayerClientIp(ServletUtils.getClientIP(servletRequest))); // wxPayRequest.setSceneInfo(new WxPayUnifiedOrderV3Request.SceneInfo().setPayerClientIp(ServletUtils.getClientIP(servletRequest)));
wxPayRequest.setAppid(payProperties.getAppId()); // wxPayRequest.setAppid(payProperties.getAppId());
wxPayRequest.setMchid(payProperties.getMchId()); // wxPayRequest.setMchid(payProperties.getMchId());
try { // try {
WxPayUnifiedOrderV3Result wxPayUnifiedOrderV3Result = wxPayService.unifiedOrderV3(TradeTypeEnum.JSAPI, wxPayRequest); // WxPayUnifiedOrderV3Result wxPayUnifiedOrderV3Result = wxPayService.unifiedOrderV3(TradeTypeEnum.JSAPI, wxPayRequest);
WxPayUnifiedOrderV3Result.JsapiResult jsapiResult = wxPayUnifiedOrderV3Result.getPayInfo(TradeTypeEnum.JSAPI, payProperties.getAppId(), payProperties.getMchId(), wxPayService.getConfig().getPrivateKey()); // WxPayUnifiedOrderV3Result.JsapiResult jsapiResult = wxPayUnifiedOrderV3Result.getPayInfo(TradeTypeEnum.JSAPI, payProperties.getAppId(), payProperties.getMchId(), wxPayService.getConfig().getPrivateKey());
InitOrderResponse.JsapiResult jsapiResultNew = new InitOrderResponse.JsapiResult(); // InitOrderResponse.JsapiResult jsapiResultNew = new InitOrderResponse.JsapiResult();
BeanUtils.copyProperties(jsapiResult, jsapiResultNew); // BeanUtils.copyProperties(jsapiResult, jsapiResultNew);
response.setJsapiResult(jsapiResultNew); // response.setJsapiResult(jsapiResultNew);
BeanUtils.copyProperties(wxPayUnifiedOrderV3Result, response); // BeanUtils.copyProperties(wxPayUnifiedOrderV3Result, response);
} catch (Exception e) { // } catch (Exception e) {
log.error(e.getMessage()); // log.error(e.getMessage());
} // }
return response; return response;
} }

View File

@ -107,7 +107,7 @@
a.out_trade_no, a.out_trade_no,
a.pay_time, a.pay_time,
b.nickname, b.nickname,
a.real_name, x.nickname as realName,
a.uid, a.uid,
a.user_phone, a.user_phone,
a.confirm_phone, a.confirm_phone,
@ -124,6 +124,7 @@
left join member_user b on a.promoter_id = b.id 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_dept d on d.id = a.dept_id
left join system_tenant e on e.id = a.tenant_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 refid="baseWhere">
</include> </include>
order by a.pay_time desc order by a.pay_time desc
@ -151,7 +152,7 @@
e.name as tenantName, e.name as tenantName,
a.pay_time, a.pay_time,
a.pay_time as payCompleteTime, a.pay_time as payCompleteTime,
a.real_name, x.nickname as realName,
a.paid, a.paid,
a.user_phone, a.user_phone,
a.confirm_phone, a.confirm_phone,
@ -167,6 +168,7 @@
left join member_user b on a.promoter_id = b.id 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_dept d on d.id = a.dept_id
left join system_tenant e on e.id = a.tenant_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 refid="baseWhere">
</include> </include>
</select> </select>
@ -249,9 +251,9 @@
<if test="data.nickname !=null and data.nickname!=''"> <if test="data.nickname !=null and data.nickname!=''">
and b.nickname like CONCAT('%',#{data.nickname},'%') and b.nickname like CONCAT('%',#{data.nickname},'%')
</if> </if>
<!--<if test="data.realName !=null and data.realName!=''"> <if test="data.realName !=null and data.realName!=''">
and a.real_name like CONCAT('%',#{data.realName},'%') and x.real_name like CONCAT('%',#{data.realName},'%')
</if>--> </if>
<if test="data.userPhone !=null and data.userPhone!=''"> <if test="data.userPhone !=null and data.userPhone!=''">
and a.user_phone like CONCAT('%',#{data.userPhone},'%') and a.user_phone like CONCAT('%',#{data.userPhone},'%')
</if> </if>

View File

@ -5,8 +5,12 @@ import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
import cn.iocoder.yudao.module.system.enums.common.SexEnum; import cn.iocoder.yudao.module.system.enums.common.SexEnum;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import io.swagger.v3.oas.annotations.Parameters; 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 org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag; 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.PageResult;
import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
import cn.iocoder.yudao.module.member.controller.admin.promoter.vo.*; import cn.iocoder.yudao.module.member.controller.admin.promoter.vo.*;
@ -103,6 +109,7 @@ public class PromoterController {
// 导出 Excel // 导出 Excel
ExcelUtils.write(response, "推广员.xls", "数据", PromoterExcelVO.class, list); ExcelUtils.write(response, "推广员.xls", "数据", PromoterExcelVO.class, list);
} }
@GetMapping("/get-import-template") @GetMapping("/get-import-template")
@Operation(summary = "获得导入推广员模板") @Operation(summary = "获得导入推广员模板")
public void importTemplate(HttpServletResponse response) throws IOException { public void importTemplate(HttpServletResponse response) throws IOException {
@ -114,6 +121,7 @@ public class PromoterController {
// 输出 // 输出
ExcelUtils.write(response, "推广员导入模板.xls", "推广员列表", PromoterImportExcelVO.class, list); ExcelUtils.write(response, "推广员导入模板.xls", "推广员列表", PromoterImportExcelVO.class, list);
} }
@PostMapping("/import") @PostMapping("/import")
@Operation(summary = "导入推广员") @Operation(summary = "导入推广员")
// @Parameters({ // @Parameters({
@ -138,6 +146,25 @@ public class PromoterController {
return success(pageResult); 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") @PutMapping("/tenantIgnoreUpdate")
@Operation(summary = "排除祖父更新推广员") @Operation(summary = "排除祖父更新推广员")
@TenantIgnore @TenantIgnore

View File

@ -1,10 +1,7 @@
package cn.iocoder.yudao.module.member.controller.admin.promoter.vo; 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 com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
/** /**
* 广 Excel VO * 广 Excel VO

View File

@ -89,11 +89,14 @@ public class PromoterServiceImpl implements PromoterService {
promoter.setUserId(memberUserDO.getId()); promoter.setUserId(memberUserDO.getId());
promoter.setCreateTime(LocalDateTime.now()); promoter.setCreateTime(LocalDateTime.now());
promoterMapper.insert(promoter); promoterMapper.insert(promoter);
memberUserDO.setPromoterId(memberUserDO.getId());
memberUserService.updateById(memberUserDO);
// 返回 // 返回
return promoter.getId(); return promoter.getId();
} }
@Override @Override
@Transactional
public Long appCreatePromoter(AppPromoterCreateReqVO createReqVO) { public Long appCreatePromoter(AppPromoterCreateReqVO createReqVO) {
//判断手机号是否注册 //判断手机号是否注册
MemberUserDO memberUserDO = memberUserService.getUserByMobile(createReqVO.getMobile()); MemberUserDO memberUserDO = memberUserService.getUserByMobile(createReqVO.getMobile());
@ -127,6 +130,8 @@ public class PromoterServiceImpl implements PromoterService {
promoter.setCreateTime(LocalDateTime.now()); promoter.setCreateTime(LocalDateTime.now());
promoter.setSourceType(createReqVO.getSourceType()); promoter.setSourceType(createReqVO.getSourceType());
promoterMapper.insert(promoter); promoterMapper.insert(promoter);
memberUserDO.setPromoterId(memberUserDO.getId());
memberUserService.updateById(memberUserDO);
// 返回 // 返回
return promoter.getId(); return promoter.getId();
} }
@ -278,6 +283,8 @@ public class PromoterServiceImpl implements PromoterService {
} }
promoter.setDeptId(deptRespDTO.getId()); promoter.setDeptId(deptRespDTO.getId());
promoterMapper.insert(promoter); promoterMapper.insert(promoter);
memberUserDO.setPromoterId(memberUserDO.getId());
memberUserService.updateById(memberUserDO);
respVO.getCreateUsernames().add(importUser.getNickName()); respVO.getCreateUsernames().add(importUser.getNickName());
return; return;
}); });

View File

@ -118,4 +118,11 @@ public interface DeptService {
void validateDeptList(Collection<Long> ids); void validateDeptList(Collection<Long> ids);
void batchImport(MultipartFile file); void batchImport(MultipartFile file);
/**
* tenantId
* @param tenantId
* @return
*/
DeptDO getById(Long tenantId);
} }

View File

@ -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"));
}
} }

View File

@ -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.context.TenantContextHolder;
import cn.iocoder.yudao.framework.tenant.core.util.TenantUtils; 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.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.permission.vo.role.RoleCreateReqVO;
import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.tenant.*; 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.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.MenuDO;
import cn.iocoder.yudao.module.system.dal.dataobject.permission.RoleDO; import cn.iocoder.yudao.module.system.dal.dataobject.permission.RoleDO;
import cn.iocoder.yudao.module.system.dal.dataobject.tenant.TenantDO; 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())) { if (ObjectUtil.notEqual(tenant.getPackageId(), updateReqVO.getPackageId())) {
updateTenantRoleMenu(tenant.getId(), tenantPackage.getMenuIds()); 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);
} }
/** /**

View File

@ -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 // 导出推广员 Excel
export function exportPromoterExcel(query) { export function exportPromoterExcel(query) {
return request({ return request({

View File

@ -1,8 +1,10 @@
<template> <template>
<div class="app-container"> <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 :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px">
<el-form-item label="快速查看" class="width100" prop="type"> <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-button v-for="(item,i) in lookList" :label=i+1 :key="i">{{item.name}}</el-radio-button>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
@ -15,14 +17,18 @@
<el-button icon="el-icon-refresh" @click="resetQuery"></el-button> <el-button icon="el-icon-refresh" @click="resetQuery"></el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div>
<div class="statistics"> <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>{{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> <span v-else>{{item.value}} </span>
</div> </div>
</div> </div>
</el-card>
</div> </div>
<!-- <div class="dashboard-editor-container">--> <!-- <div class="dashboard-editor-container">-->
@ -97,15 +103,18 @@ export default {
return { return {
lineChartData: lineChartData.newVisitis, lineChartData: lineChartData.newVisitis,
queryParams: { queryParams: {
type:4
}, },
list:[], // list:[],
lookList:[{name:'今日'},{name:'上周'},{name:'上月'},{name:'全部'}], 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() { created() {
this.getList(); this.getList();
}, },
computed:{
},
methods: { methods: {
onchangeTime(value){ onchangeTime(value){
this.queryParams.startTime = value[0] this.queryParams.startTime = value[0]
@ -119,11 +128,10 @@ export default {
this.statisticsList.forEach((item,index) =>{ this.statisticsList.forEach((item,index) =>{
for (let key in response.data){ for (let key in response.data){
if(item.class === key){ if(item.class === key){
item.value = response.data[key] item.value = response.data[key] || 0
} }
} }
}) })
this.list = this.statisticsList
this.loading = false; this.loading = false;
}); });
}, },
@ -133,7 +141,9 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.queryParams ={}; this.queryParams ={
type: 4
};
this.handleQuery(); this.handleQuery();
}, },
handleSetLineChartData(type) { handleSetLineChartData(type) {
@ -150,11 +160,12 @@ export default {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
flex-wrap: wrap; flex-wrap: wrap;
border-bottom: 1px solid #e6ebf5;
.statistics_item{ .statistics_item{
border-radius: 10px; border-radius: 10px;
width: 14%; width: 240px;
min-height: 90px; min-height: 90px;
margin: 10px 8%; margin: 10px 6%;
font-size: 20px; font-size: 20px;
color: #fff; color: #fff;
display: flex; display: flex;

View File

@ -44,10 +44,10 @@
<!-- v-hasPermi="['member:promoter:export']">导入--> <!-- v-hasPermi="['member:promoter:export']">导入-->
<!-- </el-button>--> <!-- </el-button>-->
<!-- </el-col>--> <!-- </el-col>-->
<!-- <el-col :span="1.5">--> <el-col :span="1.5">
<!-- <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"--> <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
<!-- v-hasPermi="['member:promoter:export']">导出</el-button>--> >导出</el-button>
<!-- </el-col>--> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
@ -161,7 +161,7 @@ import {
createPromoter, createPromoter,
tenantIgnoreUpdate, tenantIgnoreUpdate,
deletePromoter, deletePromoter,
getPromoter, allExport,
getallPage, getallPage,
importTemplate, importTemplate,
exportPromoterExcel, updatePassword exportPromoterExcel, updatePassword
@ -462,11 +462,10 @@ export default {
handleExport() { handleExport() {
// //
let params = {...this.queryParams}; let params = {...this.queryParams};
params.pageNo = undefined; params.pageSize = 999;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有推广员数据项?').then(() => { this.$modal.confirm('是否确认导出所有推广员数据项?').then(() => {
this.exportLoading = true; this.exportLoading = true;
return exportPromoterExcel(params); return allExport(params);
}).then(response => { }).then(response => {
this.$download.excel(response, '推广员.xls'); this.$download.excel(response, '推广员.xls');
this.exportLoading = false; this.exportLoading = false;