'123'
This commit is contained in:
parent
f3d00a2c50
commit
789ac20f7c
|
@ -5,6 +5,7 @@ import com.ruoyi.common.annotation.Log;
|
|||
import com.ruoyi.common.constant.CacheConstants;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.core.redis.RedisLock;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
|
@ -419,12 +420,11 @@ public class storageLocationController extends BaseController
|
|||
* 获取操作记录
|
||||
*/
|
||||
@GetMapping("/listOperlog")
|
||||
public AjaxResult listOperlog(Operlog operlog)
|
||||
public TableDataInfo listOperlog(Operlog operlog)
|
||||
{
|
||||
AjaxResult ajaxResult = new AjaxResult();
|
||||
List<Operlog> operlogData = storageLocationService.selectOperlogs(operlog);
|
||||
ajaxResult.put("operlogData",operlogData);
|
||||
return ajaxResult;
|
||||
startPage();
|
||||
List<Operlog> list = storageLocationService.selectOperlogs(operlog);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/*===========================================操作记录==========================================================*/
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.ruoyi.storageLocation.domain;
|
||||
|
||||
public class Operlog {
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
public class Operlog extends BaseEntity {
|
||||
private String operlog_id;
|
||||
private String operlog_kw;
|
||||
private String operlog_date;
|
||||
|
|
|
@ -143,7 +143,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select operlog_date,operlog_user_name,operlog_event,operlog_zlh,operlog_xingh
|
||||
,operlog_guig,operlog_diany,operlog_ms
|
||||
from operlog
|
||||
where operlog_kw = #{operlog_kw} order by operlog_date desc
|
||||
<where>
|
||||
<if test="operlog_kw != null and operlog_kw != ''">
|
||||
AND operlog_kw = #{operlog_kw}
|
||||
</if>
|
||||
<if test="operlog_user_name != null and operlog_user_name != ''">
|
||||
AND operlog_user_name like concat('%', #{operlog_user_name}, '%')
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and datediff(d, operlog_date, #{params.beginTime}) <![CDATA[<=]]> 0
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and datediff(d, operlog_date, #{params.endTime}) <![CDATA[>=]]> 0
|
||||
</if>
|
||||
</where>
|
||||
order by operlog_date desc
|
||||
</select>
|
||||
|
||||
<select id="selectYlrStorageLocation" parameterType="java.lang.String" resultType="StorageLocation">
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
<el-tag size="mini" type="success" @click="openDialog(item)">空闲</el-tag>
|
||||
</span>
|
||||
<span v-if = "item.materialState=='1'">
|
||||
<el-tag size="mini" type="danger">已用</el-tag>
|
||||
<el-tag size="mini" type="danger" @click="openUpdDialog(item)">已用</el-tag>
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :span="2" :contentStyle='contentStyle' :labelStyle='labelStyle'>
|
||||
|
@ -136,7 +136,7 @@
|
|||
<el-tag size="mini" type="success" @click="openDialog(item)">空闲</el-tag>
|
||||
</span>
|
||||
<span v-if = "item.materialState=='1'">
|
||||
<el-tag size="mini" type="danger">已用</el-tag>
|
||||
<el-tag size="mini" type="danger" @click="openUpdDialog(item)">已用</el-tag>
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :span="2" :contentStyle='contentStyle' :labelStyle='labelStyle'>
|
||||
|
@ -425,7 +425,7 @@
|
|||
|
||||
// 取消按钮
|
||||
cancel(form) {
|
||||
if(form.userName){
|
||||
if(!form.userName){
|
||||
cancelStorageLocation(this.form).then(response => {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
|
|
|
@ -1,13 +1,38 @@
|
|||
<template>
|
||||
<div>
|
||||
<h1>{{ materialBhProp }}</h1>
|
||||
|
||||
<el-form :inline="true" :model="queryParams" class="demo-form-inline">
|
||||
<el-form-item label="库位">
|
||||
<span style="font-size: 20px;color: #1682e6">{{ materialBhProp }}</span>
|
||||
<el-input v-model="queryParams.operlog_kw" v-if="false"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作时间">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
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']"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作人">
|
||||
<el-input v-model="queryParams.operlog_user_name" placeholder="操作人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="search()">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
:data="operlogData"
|
||||
v-loading="loading"
|
||||
height="500"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="operlog_date"
|
||||
label="时间"
|
||||
label="操作时间"
|
||||
width="200"
|
||||
fixed>
|
||||
</el-table-column>
|
||||
|
@ -51,6 +76,13 @@
|
|||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getOperlogData"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -63,8 +95,18 @@ import { listOperlog } from "@/api/storageLocation/operlog";
|
|||
data() {
|
||||
return {
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
operlog_kw: null,
|
||||
operlog_date: null,
|
||||
operlog_user_name: null
|
||||
},
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
operlogData: [],
|
||||
}
|
||||
},
|
||||
|
@ -80,11 +122,20 @@ import { listOperlog } from "@/api/storageLocation/operlog";
|
|||
methods: {
|
||||
/*获取操作记录*/
|
||||
getOperlogData() {
|
||||
this.loading = true;
|
||||
this.queryParams.operlog_kw = this._props.materialBhProp;
|
||||
this.operlogData = [];
|
||||
listOperlog(this.queryParams).then(response => {
|
||||
this.operlogData = response.operlogData;
|
||||
listOperlog(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
this.operlogData = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
//查询
|
||||
search(){
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getOperlogData();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue