数据概览

This commit is contained in:
Lenovo 2024-07-26 18:16:57 +08:00
parent b8a0d500d2
commit 9a89e76486
8 changed files with 676 additions and 11 deletions

View File

@ -8,10 +8,7 @@ import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.business.domain.BusStoreDayHistoryInfo;
import com.ruoyi.business.domain.BusStoreDayInfo;
import com.ruoyi.business.domain.BusStoreExcelInfo;
import com.ruoyi.business.domain.BusStoreInfo;
import com.ruoyi.business.domain.*;
import com.ruoyi.business.service.IBusReturnVisitInfoService;
import com.ruoyi.business.service.IBusStoreDayInfoService;
import com.ruoyi.business.service.IBusStoreInfoService;
@ -63,6 +60,13 @@ public class BusStoreDayHistoryInfoController extends BaseController
List<BusStoreExcelInfo> list = busStoreDayHistoryInfoService.selectBusStoreDayHistoryInfoList(excelInfo);
return getDataTable(list);
}
@GetMapping("/list1")
public TableDataInfo list1(String account, String expStartTime, String expEndTime)
{
startPage();
List<BusOverviewInfo> list = busStoreDayHistoryInfoService.selectBusStoreDayHistoryInfoList1(account, expStartTime,expEndTime);
return getDataTable(list);
}
@PostMapping("/export")
public void export(Long storeId,String expStartTime,String expEndTime,HttpServletResponse response) throws Exception {

View File

@ -0,0 +1,134 @@
package com.ruoyi.business.domain;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.util.List;
/**
* 店铺信息对象 bus_store_info
*
* @author ruoyi
* @date 2024-07-03
*/
public class BusOverviewInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
private String account;
private int grantTotal;
private int noGrantTotal;
private int isGrantTotal;
private int orderTotal;
private int commentsTotal;
private int fiveTotal;
private int aiTotal;
private int smsTotal;
private int otherTotal;
private int minusTotal;
private String rate;
private String time;
public String getAccount() {
return account;
}
public void setAccount(String account) {
this.account = account;
}
public int getGrantTotal() {
return grantTotal;
}
public void setGrantTotal(int grantTotal) {
this.grantTotal = grantTotal;
}
public int getNoGrantTotal() {
return noGrantTotal;
}
public void setNoGrantTotal(int noGrantTotal) {
this.noGrantTotal = noGrantTotal;
}
public int getIsGrantTotal() {
return isGrantTotal;
}
public void setIsGrantTotal(int isGrantTotal) {
this.isGrantTotal = isGrantTotal;
}
public int getOrderTotal() {
return orderTotal;
}
public void setOrderTotal(int orderTotal) {
this.orderTotal = orderTotal;
}
public int getCommentsTotal() {
return commentsTotal;
}
public void setCommentsTotal(int commentsTotal) {
this.commentsTotal = commentsTotal;
}
public int getFiveTotal() {
return fiveTotal;
}
public void setFiveTotal(int fiveTotal) {
this.fiveTotal = fiveTotal;
}
public int getAiTotal() {
return aiTotal;
}
public void setAiTotal(int aiTotal) {
this.aiTotal = aiTotal;
}
public int getSmsTotal() {
return smsTotal;
}
public void setSmsTotal(int smsTotal) {
this.smsTotal = smsTotal;
}
public int getOtherTotal() {
return otherTotal;
}
public void setOtherTotal(int otherTotal) {
this.otherTotal = otherTotal;
}
public int getMinusTotal() {
return minusTotal;
}
public void setMinusTotal(int minusTotal) {
this.minusTotal = minusTotal;
}
public String getRate() {
return rate;
}
public void setRate(String rate) {
this.rate = rate;
}
public String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
}

View File

@ -1,8 +1,6 @@
package com.ruoyi.business.mapper;
import com.ruoyi.business.domain.BusStoreDayHistoryInfo;
import com.ruoyi.business.domain.BusStoreDayInfo;
import com.ruoyi.business.domain.BusStoreExcelInfo;
import com.ruoyi.business.domain.*;
import org.apache.ibatis.annotations.Param;
import java.time.LocalDateTime;
@ -39,6 +37,8 @@ public interface BusStoreDayHistoryInfoMapper
* @return 结果
*/
public int insertBusStoreDayHistoryInfo(BusStoreDayHistoryInfo busStoreDayHistoryInfo);
public BusOverviewInfo getCount(@Param("ids") List<Long> ids, @Param("expStartTime") String expStartTime, @Param("expEndTime") String expEndTime);
public List<BusIntegralRecord> getIntegralCount(@Param("account") String account, @Param("expStartTime") String expStartTime, @Param("expEndTime") String expEndTime);
/**
* 修改店铺单日信息

View File

@ -1,5 +1,6 @@
package com.ruoyi.business.service;
import com.ruoyi.business.domain.BusOverviewInfo;
import com.ruoyi.business.domain.BusStoreDayHistoryInfo;
import com.ruoyi.business.domain.BusStoreExcelInfo;
@ -28,6 +29,7 @@ public interface IBusStoreDayHistoryInfoService
* @return 店铺单日信息集合
*/
public List<BusStoreExcelInfo> selectBusStoreDayHistoryInfoList(BusStoreExcelInfo busStoreExcelInfo);
public List<BusOverviewInfo> selectBusStoreDayHistoryInfoList1(String account, String expStartTime, String expEndTime);
/**
* 新增店铺单日信息

View File

@ -1,9 +1,7 @@
package com.ruoyi.business.service.impl;
import com.ruoyi.business.domain.BusStoreDayHistoryInfo;
import com.ruoyi.business.domain.BusStoreDayInfo;
import com.ruoyi.business.domain.BusStoreExcelInfo;
import com.ruoyi.business.domain.BusStoreInfo;
import com.ruoyi.business.domain.*;
import com.ruoyi.business.mapper.BusAgentInfoMapper;
import com.ruoyi.business.mapper.BusStoreDayHistoryInfoMapper;
import com.ruoyi.business.mapper.BusStoreDayInfoMapper;
import com.ruoyi.business.mapper.BusStoreInfoMapper;
@ -12,11 +10,17 @@ import com.ruoyi.business.service.IBusStoreDayInfoService;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* 店铺单日信息Service业务层处理
@ -31,6 +35,8 @@ public class BusStoreDayHistoryInfoServiceImpl implements IBusStoreDayHistoryInf
private BusStoreDayHistoryInfoMapper busStoreDayHistoryInfoMapper;
@Autowired
private BusStoreInfoMapper storeInfoMapper;
@Autowired
private BusAgentInfoMapper agentInfoMapper;
/**
* 查询店铺单日信息
@ -67,6 +73,82 @@ public class BusStoreDayHistoryInfoServiceImpl implements IBusStoreDayHistoryInf
return busStoreDayHistoryInfoMapper.selectBusStoreDayHistoryInfoList(busStoreExcelInfo);
}
@Override
public List<BusOverviewInfo> selectBusStoreDayHistoryInfoList1(String account, String expStartTime, String expEndTime) {
BusAgentInfo agentInfo = new BusAgentInfo();
agentInfo.setDelStatus("1");
if (StringUtils.isNotEmpty(account)) {
agentInfo.setAgentAccount(account);
}
List<BusAgentInfo> agentInfoList = agentInfoMapper.selectBusAgentInfoList(agentInfo);
List<BusOverviewInfo> data = new ArrayList<>();
for (BusAgentInfo info : agentInfoList) {
BusOverviewInfo overviewInfo = new BusOverviewInfo();
overviewInfo.setAccount(info.getAgentAccount());
BusStoreInfo storeInfo = new BusStoreInfo();
storeInfo.setBindUser(info.getAgentAccount());
List<BusStoreInfo> l = storeInfoMapper.selectBusStoreInfoList(storeInfo);
overviewInfo.setGrantTotal(l.size());
BusStoreInfo storeInfo1 = new BusStoreInfo();
storeInfo1.setGrantStatus("2");
storeInfo1.setBindUser(info.getAgentAccount());
List<BusStoreInfo> li = storeInfoMapper.selectBusStoreInfoList(storeInfo1);
overviewInfo.setNoGrantTotal(li.size());
BusStoreInfo storeInfo2 = new BusStoreInfo();
storeInfo2.setGrantStatus("1");
storeInfo2.setBindUser(info.getAgentAccount());
List<BusStoreInfo> lis = storeInfoMapper.selectBusStoreInfoList(storeInfo2);
overviewInfo.setNoGrantTotal(lis.size());
List<Long> ids = new ArrayList<>();
for (BusStoreInfo busStoreInfo : l) {
ids.add(busStoreInfo.getId());
}
if (ids.size() > 0) {
BusOverviewInfo busOverviewInfo = busStoreDayHistoryInfoMapper.getCount(ids, expStartTime, expEndTime);
overviewInfo.setOrderTotal(busOverviewInfo.getOrderTotal());
overviewInfo.setCommentsTotal(busOverviewInfo.getCommentsTotal());
overviewInfo.setFiveTotal(busOverviewInfo.getFiveTotal());
}
List<BusIntegralRecord> recordList = busStoreDayHistoryInfoMapper.getIntegralCount(info.getAgentAccount(),expStartTime,expEndTime);
overviewInfo.setMinusTotal(recordList.size());
if (recordList.size() > 0) {
List<BusIntegralRecord> recordList1 = new ArrayList<>();
List<BusIntegralRecord> recordList2 = new ArrayList<>();
List<BusIntegralRecord> recordList3 = new ArrayList<>();
for (BusIntegralRecord record : recordList) {
if (record.getAgentRemark() != null && "sms".equals(record.getAgentRemark())) {
recordList1.add(record);
}else if (record.getAgentRemark() != null && "AI".equals(record.getAgentRemark())){
recordList2.add(record);
}else if (record.getAgentRemark() != null && "其他".equals(record.getAgentRemark())){
recordList3.add(record);
}
}
overviewInfo.setSmsTotal(recordList1.size());
overviewInfo.setAiTotal(recordList2.size());
overviewInfo.setOtherTotal(recordList3.size());
}
//好评数量/消耗数量
if (overviewInfo.getMinusTotal() == 0 || overviewInfo.getCommentsTotal() == 0){
overviewInfo.setRate("0");
}else {
BigDecimal b = new BigDecimal(overviewInfo.getCommentsTotal()).divide(new BigDecimal(overviewInfo.getMinusTotal()),2, RoundingMode.HALF_UP);
overviewInfo.setRate(b.toString());
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
overviewInfo.setTime(sdf.format(new Date()));
data.add(overviewInfo);
}
return data;
}
/**
* 新增店铺单日信息
*

View File

@ -17,10 +17,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
</resultMap>
<resultMap type="BusIntegralRecord" id="BusIntegralRecordResult">
<result property="id" column="id" />
<result property="account" column="account" />
<result property="platform" column="platform" />
<result property="updateType" column="update_type" />
<result property="integralUpdateNum" column="Integral_update_num" />
<result property="integralUpdateTime" column="Integral_update_time" />
<result property="integralBalance" column="Integral_balance" />
<result property="agentRemark" column="agent_remark" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectBusStoreDayHistoryInfoVo">
select id, store_id, last_order_num, last_positive_reviews_num, last_five_star_reviews_num, last_return_visit_num, last_return_visit_rate, today_return_visit_num, score, create_time from bus_store_day_history_info
</sql>
<sql id="selectBusIntegralRecordVo">
select id, account, platform, update_type, Integral_update_num, Integral_update_time, Integral_balance, agent_remark, remark from bus_integral_record
</sql>
<sql id="selectBusStoreDayHistoryInfoVo1">
SELECT
a.store_id as storeId,
@ -53,6 +69,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</select>
<select id="getCount" resultType="com.ruoyi.business.domain.BusOverviewInfo">
select ifnull(sum(last_order_num),0) as orderTotal,
ifnull(sum(last_positive_reviews_num),0) as commentsTotal,
ifnull(sum(last_five_star_reviews_num),0) as fiveTotal
from bus_store_day_history_info
<where>
1=1
<if test="ids != null">
and store_id in
<foreach collection="ids" open="(" close=")" item="id" separator="," index="i">
#{id}
</foreach>
</if>
<if test="expStartTime != null and expStartTime != '' and expEndTime != null and expEndTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d') between #{expStartTime} and #{expEndTime}
</if>
</where>
</select>
<select id="getIntegralCount" resultMap="BusIntegralRecordResult">
<include refid="selectBusIntegralRecordVo"/>
<where> 1=1
<if test="expStartTime != null and expStartTime != '' and expEndTime != null and expEndTime != ''">
and DATE_FORMAT(Integral_update_time,'%Y-%m-%d') between #{expStartTime} and #{expEndTime}
</if>
<if test="account != null">and account=#{account}</if>
and update_type = '消耗账分' and agent_remark is not null
</where>
</select>
<insert id="insertBusStoreDayHistoryInfo" parameterType="BusStoreDayHistoryInfo">
insert into bus_store_day_history_info
<trim prefix="(" suffix=")" suffixOverrides=",">

View File

@ -9,6 +9,14 @@ export function listInfo(query) {
})
}
export function listInfo1(query) {
return request({
url: '/excel/info/list1',
method: 'get',
params: query
})
}
// 查询店铺单日历史信息详细
export function getInfo(id) {
return request({

View File

@ -0,0 +1,389 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="结算时间" prop="start_time">
<el-date-picker
v-model="timeRange1"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="expireTimeOPtion"
align="right">
</el-date-picker>
</el-form-item>
<el-form-item label="账号" prop="account">
<el-input
v-model="queryParams.account"
placeholder="请输入账号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</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="['system:info:add']"-->
<!-- >新增</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- v-hasPermi="['system:info:edit']"-->
<!-- >修改</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- v-hasPermi="['system:info:remove']"-->
<!-- >删除</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- @click="handleExport"-->
<!-- v-hasPermi="['system:info:export']"-->
<!-- >导出</el-button>-->
<!-- </el-col>-->
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
<!-- </el-row>-->
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" type="index" width="50" >
<template slot-scope="scope">
{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column label="账号" align="center" prop="account" />
<el-table-column label="营销源总数" align="center" prop="grantTotal" />
<el-table-column label="失效总数" align="center" prop="noGrantTotal" />
<el-table-column label="在营销总数" align="center" prop="isGrantTotal" />
<el-table-column label="订单数量" align="center" prop="orderTotal" />
<el-table-column label="好评数量" align="center" prop="commentsTotal" />
<el-table-column label="五星数量" align="center" prop="fiveTotal" />
<el-table-column label="AI数量" align="center" prop="aiTotal" />
<el-table-column label="短信数量" align="center" prop="smsTotal" />
<el-table-column label="通过数量" align="center" prop="otherTotal" />
<el-table-column label="消耗数量" align="center" prop="minusTotal" />
<el-table-column label="营销比(%)" align="center" prop="rate" />
<el-table-column label="结算时间" align="center" prop="time" />
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-mouse"-->
<!-- @click="export1(scope.row)"-->
<!-- >导出</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改店铺单日历史信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="店铺id" prop="storeId">
<el-input v-model="form.storeId" placeholder="请输入店铺id" />
</el-form-item>
<el-form-item label="昨日订单量" prop="lastOrderNum">
<el-input v-model="form.lastOrderNum" placeholder="请输入昨日订单量" />
</el-form-item>
<el-form-item label="昨日好评量" prop="lastPositiveReviewsNum">
<el-input v-model="form.lastPositiveReviewsNum" placeholder="请输入昨日好评量" />
</el-form-item>
<el-form-item label="昨日五星量" prop="lastFiveStarReviewsNum">
<el-input v-model="form.lastFiveStarReviewsNum" placeholder="请输入昨日五星量" />
</el-form-item>
<el-form-item label="昨日回访量" prop="lastReturnVisitNum">
<el-input v-model="form.lastReturnVisitNum" placeholder="请输入昨日回访量" />
</el-form-item>
<el-form-item label="昨日回访比50%" prop="lastReturnVisitRate">
<el-input v-model="form.lastReturnVisitRate" placeholder="请输入昨日回访比50%" />
</el-form-item>
<el-form-item label="今日回访量" prop="todayReturnVisitNum">
<el-input v-model="form.todayReturnVisitNum" placeholder="请输入今日回访量" />
</el-form-item>
<el-form-item label="评分" prop="score">
<el-input v-model="form.score" placeholder="请输入评分" />
</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>
<el-dialog :visible.sync="open1" width="800px" append-to-body>
<el-form ref="form1" :model="form1" label-width="150px">
<el-form-item label="导出时段" prop="start_time">
<el-date-picker
v-model="timeRange1"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="expireTimeOPtion"
align="right">
</el-date-picker>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitExport"> </el-button>
<el-button @click="cancel1"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listInfo1, getInfo, delInfo, addInfo, updateInfo } from "@/api/statistics/excel";
export default {
name: "Info",
data() {
return {
expireTimeOPtion: {
disabledDate(time) {
let curDate = (new Date()).getTime();
let date1 = 16 * 24 * 3600 * 1000;
let date2 = curDate-date1;
return time.getTime() > Date.now()-8.64e7 || time.getTime() < date2;
// return time.getTime() > Date.now() - 8.64e7; //-8.64e7
}
},
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
infoList: [],
//
title: "",
//
open: false,
open1: false,
timeRange1: ['',''],
queryParams1: {
storeId: undefined,
storeName: undefined,
expStartTime: undefined,
expEndTime: undefined
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
storeId: null,
lastOrderNum: null,
lastPositiveReviewsNum: null,
lastFiveStarReviewsNum: null,
lastReturnVisitNum: null,
lastReturnVisitRate: null,
todayReturnVisitNum: null,
score: null,
expStartTime: null,
expEndTime: null,
account: null
},
//
form: {},
form1: {},
//
rules: {
timeRange1: [
{ required: true, message: "时间不能为空", trigger: "blur" }
]
}
};
},
created() {
this.getList();
},
methods: {
/** 查询店铺单日历史信息列表 */
getList() {
this.loading = true;
listInfo1(this.queryParams).then(response => {
this.infoList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
cancel1() {
this.open1 = false;
this.reset1();
},
reset1() {
this.timeRange1 = ['',''];
this.form1= {};
this.resetForm("form1");
},
export1(row) {
this.open1 = true;
this.form1.id = row.storeId;
this.form1.name = row.storeName;
},
submitExport: function() {
if(this.timeRange1==undefined || this.timeRange1.length == 0){
this.$modal.msgSuccess("请填写时段!");
return
}
this.form1.exportStartTime = this.timeRange1[0]
this.form1.exportEndTime = this.timeRange1[1]
this.$refs["form1"].validate(valid => {
if (valid) {
this.queryParams1.expStartTime = this.form1.exportStartTime;
this.queryParams1.expEndTime = this.form1.exportEndTime;
this.queryParams1.storeId = this.form1.id;
this.queryParams1.storeName = this.form1.name;
this.handleExport(this.queryParams1);
this.cancel1();
}
});
},
//
reset() {
this.form = {
id: null,
storeId: null,
lastOrderNum: null,
lastPositiveReviewsNum: null,
lastFiveStarReviewsNum: null,
lastReturnVisitNum: null,
lastReturnVisitRate: null,
todayReturnVisitNum: null,
score: null,
createTime: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.queryParams.expStartTime = this.timeRange1[0];
this.queryParams.expEndTime = this.timeRange1[1];
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.timeRange1 = ['',''];
this.queryParams.account=undefined;
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加店铺单日历史信息";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getInfo(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改店铺单日历史信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateInfo(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addInfo(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除店铺单日历史信息编号为"' + ids + '"的数据项?').then(function() {
return delInfo(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
// handleExport() {
// this.download('system/info/export', {
// ...this.queryParams
// }, `info_${new Date().getTime()}.xlsx`)
// }
handleExport(data) {
this.download('excel/info/export', {
...this.queryParams1
}, data.storeName+`_${new Date().getTime()}.xlsx`)
}
}
};
</script>