装备退库记录表格修改

This commit is contained in:
cwchen 2025-10-29 15:23:33 +08:00
parent f77d66ab3a
commit b606797112
1 changed files with 148 additions and 95 deletions

View File

@ -1,52 +1,48 @@
<template>
<!-- 装备流转记录 -->
<div class="app-container">
<div class="query-form-container" style="flex-shrink: 0;">
<el-form ref="queryForm" size="small" inline label-width="auto" :model="queryParams">
<el-form-item prop="keyword">
<el-input
clearable
style="width: 240px"
placeholder="请输入关键字"
v-model.trim="queryParams.keyWord"
/>
</el-form-item>
<el-form ref="queryForm" size="small" inline label-width="auto" :model="queryParams">
<el-card class="search-box">
<el-row>
<el-col :span="12">
<el-form-item prop="keyword">
<el-input clearable style="width: 240px" placeholder="请输入关键字" v-model.trim="queryParams.keyWord" />
</el-form-item>
<el-form-item>
<el-date-picker
v-model="dateRange"
type="datetimerange"
range-separator="至"
style="width: 240px"
value-format="yyyy-MM-dd"
end-placeholder="结束日期"
start-placeholder="开始日期"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="onHandleQuery"> 查询</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="onHandleReset">重置</el-button>
</el-form-item>
<el-form-item>
<el-date-picker v-model="dateRange" type="datetimerange" range-separator="" style="width: 240px"
value-format="yyyy-MM-dd" end-placeholder="结束日期" start-placeholder="开始日期" />
</el-form-item>
</el-col>
<el-col :span="12" style="text-align: right;">
<el-button type="primary" icon="el-icon-search" @click="onHandleQuery"> 查询</el-button>
<el-button icon="el-icon-refresh" @click="onHandleReset">重置</el-button>
</el-col>
</el-row>
<el-form-item class="button-group">
<el-button icon="el-icon-refresh" size="mini" @click="onHandleExport">导出数据</el-button>
</el-form-item>
</el-form>
</div>
<div class="table-container" style="flex: 1; overflow-y: auto;">
<el-table :data="tableData" style="width: 100%">
<el-table-column align="center" show-overflow-tooltip type="index" label="序号" width="50"/>
<el-table-column align="center" show-overflow-tooltip prop="createUser" label="操作人"/>
<el-table-column align="center" show-overflow-tooltip prop="type" label="操作类型">
<template slot-scope="scope">
<el-tag size="mini">
{{ typeInfo[scope.row.type] }}
</el-tag>
</template>
</el-table-column>
<el-table-column align="center" show-overflow-tooltip prop="createTime" label="操作时间"/>
<!-- <el-table-column align="center" show-overflow-tooltip prop="changeStatus" label="流转前状态">
</el-card>
</el-form>
<el-card class="content-box">
<el-row>
<el-col :span="24" style="text-align: right;">
<el-button icon="el-icon-download" @click="onHandleExport">导出数据</el-button>
</el-col>
</el-row>
<div class="table-container">
<el-table :data="tableData" style="width: 100%" border stripe height="100%">
<el-table-column align="center" show-overflow-tooltip type="index" label="序号" width="50" />
<el-table-column align="center" show-overflow-tooltip prop="createUser" label="操作人" />
<el-table-column align="center" show-overflow-tooltip prop="type" label="操作类型">
<template slot-scope="scope">
<el-tag size="mini">
{{ typeInfo[scope.row.type] }}
</el-tag>
</template>
</el-table-column>
<el-table-column align="center" show-overflow-tooltip prop="createTime" label="操作时间" />
<!-- <el-table-column align="center" show-overflow-tooltip prop="changeStatus" label="流转前状态">
<template slot-scope="scope">
<el-tag v-if="scope.row.changeStatus == 1" size="mini">在库</el-tag>
<el-tag v-if="scope.row.changeStatus == 2 || scope.row.changeStatus == 3" size="mini">
@ -55,38 +51,34 @@
<el-tag v-if="scope.row.changeStatus == 5" size="mini"> 维修</el-tag>
</template>
</el-table-column>-->
<el-table-column align="center" show-overflow-tooltip prop="changeStatus" label="流转后状态">
<template slot-scope="scope">
<el-tag v-if="scope.row.status == 1" size="mini">在库</el-tag>
<el-tag v-if="scope.row.status == 2 || scope.row.status == 3" size="mini">
在用
</el-tag>
<el-tag v-if="scope.row.status == 5" size="mini"> 维修</el-tag>
</template>
</el-table-column>
<el-table-column align="center" show-overflow-tooltip prop="useUint" label="需求单位"/>
<el-table-column align="center" show-overflow-tooltip prop="proName" label="使用项目"/>
<el-table-column align="center" show-overflow-tooltip prop="proLocation" label="地址"/>
<el-table-column align="center" show-overflow-tooltip prop="devNum" label="装备数量"/>
<el-table-column align="center" show-overflow-tooltip prop="address" label="操作">
<template slot-scope="scope">
<el-button type="text" @click="onHandleOutRecord(scope.row)">
{{ typeInfo[scope.row.type] }}记录单
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="pagination-container-fage" style="flex-shrink: 0;">
<pagination
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getRoamRecordList"
/>
</div>
<el-table-column align="center" show-overflow-tooltip prop="changeStatus" label="流转后状态">
<template slot-scope="scope">
<el-tag v-if="scope.row.status == 1" size="mini">在库</el-tag>
<el-tag v-if="scope.row.status == 2 || scope.row.status == 3" size="mini">
在用
</el-tag>
<el-tag v-if="scope.row.status == 5" size="mini"> 维修</el-tag>
</template>
</el-table-column>
<el-table-column align="center" show-overflow-tooltip prop="useUint" label="需求单位" />
<el-table-column align="center" show-overflow-tooltip prop="proName" label="使用项目" />
<el-table-column align="center" show-overflow-tooltip prop="proLocation" label="地址" />
<el-table-column align="center" show-overflow-tooltip prop="devNum" label="装备数量" />
<el-table-column align="center" show-overflow-tooltip prop="address" label="操作">
<template slot-scope="scope">
<el-button type="text" @click="onHandleOutRecord(scope.row)">
{{ typeInfo[scope.row.type] }}记录单
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="pagination-container-fage" style="flex-shrink: 0;">
<pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getRoamRecordList" />
</div>
</el-card>
<!-- 出库记录单 -->
<el-dialog title="出库记录单" :visible.sync="outRecordVisible" width="80%" append-to-body>
<el-row>
@ -116,11 +108,11 @@
<vue-easy-print ref="recordPrintRef" tableShow style="width: 100%">
<el-table :data="outRecordData" style="width: 100%">
<el-table-column align="center" show-overflow-tooltip type="index" label="序号"/>
<el-table-column align="center" show-overflow-tooltip prop="devName" label="装备名称"/>
<el-table-column align="center" show-overflow-tooltip type="index" label="序号" />
<el-table-column align="center" show-overflow-tooltip prop="devName" label="装备名称" />
<!-- <el-table-column align="center" show-overflow-tooltip prop="createUser" label="装备系列" /> -->
<el-table-column align="center" show-overflow-tooltip prop="devModel" label="规格型号"/>
<el-table-column align="center" show-overflow-tooltip prop="devCode" label="装备编码"/>
<el-table-column align="center" show-overflow-tooltip prop="devModel" label="规格型号" />
<el-table-column align="center" show-overflow-tooltip prop="devCode" label="装备编码" />
</el-table>
</vue-easy-print>
@ -245,7 +237,7 @@ export default {
}
</script>
<style scoped>
<style scoped lang="scss">
.record-row {
margin-bottom: 10px;
font-size: 16px;
@ -255,19 +247,11 @@ export default {
}
.app-container {
background-color: #f5f5f5; /* 设置整体灰色背景 */
display: flex;
flex-direction: column;
}
.query-form-container,
.table-container,
.pagination-container-fage {
background-color: #fff; /* 设置白色背景 */
padding: 10px;
margin-bottom: 20px;
border-radius: 4px;
}
.button-group {
float: right;
@ -278,12 +262,81 @@ export default {
margin-bottom: 0px;
}
.pagination-container {
position: relative;
height: 25px;
margin-bottom: 10px;
margin-top: -16px;
padding: 10px 20px !important;
background:none ;
.search-box {
margin-bottom: 20px;
border-radius: 8px;
padding: 10px 0 20px 0;
}
.content-box {
border-radius: 8px;
height: calc(100vh - 210px);
display: flex;
flex-direction: column;
overflow: hidden;
::v-deep .el-card__body {
display: flex !important;
flex-direction: column !important;
height: 100% !important;
padding: 20px;
}
.el-row:first-child {
margin-bottom: 16px;
flex-shrink: 0;
.el-col {
display: flex;
justify-content: flex-end;
align-items: center;
gap: 12px;
}
}
.table-container {
flex: 1;
overflow: hidden;
margin-bottom: 0;
min-height: 0;
display: flex;
flex-direction: column;
}
.pagination-wrapper {
flex-shrink: 0;
padding-top: 6px;
margin-top: auto;
::v-deep .pagination-container {
padding: 0px 20px !important;
margin-bottom: 30px;
}
}
::v-deep .el-table {
//
&.el-table--striped .el-table__body {
tr.el-table__row--striped td {
background-color: #F6FBFA !important; //
}
}
.el-table__header {
background: #E9F0EE;
th {
background: #E9F0EE !important;
color: #606266;
font-weight: 600;
height: 50px;
}
}
&.el-table--striped .el-table__body tr.el-table__row:hover>td.el-table__cell {
background-color: #CCF1E9 !important;
}
}
}
</style>