问题 11 操作记录页

This commit is contained in:
wangshuai 2024-07-16 15:40:15 +08:00
parent 4df97547b2
commit 3cea0fbe6d
3 changed files with 176 additions and 0 deletions

View File

@ -4,12 +4,15 @@ import com.ruoyi.common.constant.CacheConstants;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.LoginBody;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.uuid.IdUtils;
import com.ruoyi.system.service.ISmsService;
import com.ruoyi.system.service.ISysConfigService;
import com.ruoyi.system.service.ISysUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.RandomStringUtils;
@ -36,6 +39,9 @@ public class SmsController {
@Autowired
private ISmsService iSmsService;
@Autowired
private ISysUserService userService;
@PostMapping("/sendSms")
@ApiOperation("短信发送接口")
public AjaxResult sendSms(@RequestBody LoginBody loginBody) {
@ -43,6 +49,10 @@ public class SmsController {
if(StringUtils.isEmpty(phone)){
return AjaxResult.error("请输入手机号码!");
}
SysUser user = userService.selectUserByPhone(phone);
if(user == null){
throw new ServiceException("手机号不存在,请重新输入!");
}
AjaxResult ajax = AjaxResult.success();
boolean captchaEnabled = configService.selectCaptchaEnabled();
ajax.put("captchaEnabled", captchaEnabled);

View File

@ -0,0 +1,10 @@
import request from '@/utils/request'
// 查询免运营订单信息列表
export function listInfo(query) {
return request({
url: '/business/operation/list',
method: 'get',
params: query
})
}

View File

@ -0,0 +1,156 @@
<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="storeCode">
<el-input
v-model="queryParams.storeCode"
placeholder="请输入标识"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="店铺名称" prop="storeName" >
<el-input
v-model="queryParams.storeName"
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">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
<el-table-column label="序号" align="center" prop="id" />
<el-table-column label="店铺名称" align="center" prop="storeName" />
<el-table-column label="店铺标识" align="center" prop="storeCode" />
<el-table-column label="操作账户" align="center" prop="updateUser" />
<el-table-column label="操作状态" align="center" prop="operationStatus" />
<el-table-column label="时间" align="center" prop="updateTime" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { listInfo } from "@/api/statistics/operation";
export default {
name: "Info",
data() {
return {
//
loading: true,
formLoading: true,
//
ids: [],
//
formIds: [],
//
single: true,
//
multiple: true,
//
singleForm: true,
//
multipleForm: true,
//
showSearch: true,
//
total: 0,
formTotal: 0,
//
infoList: [],
//
formList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
storeCode: null,
storeName: null
},
//
formParams: {
pageNum: 1,
pageSize: 5,
storeCode: null,
orderNo: null
},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询免运营订单信息列表 */
getList() {
this.loading = true;
listInfo(this.queryParams).then(response => {
this.infoList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.formReset();
},
//
reset() {
this.form = {
pageNum: 1,
pageSize: 10,
storeCode: null,
storeName: null
};
this.resetForm("form");
},
formReset() {
this.form = {
orderIds: []
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 导出按钮操作 */
handleExport() {
this.download('system/info/export', {
...this.queryParams
}, `info_${new Date().getTime()}.xlsx`)
}
}
};
</script>