代码提交

This commit is contained in:
jiang 2025-11-28 09:57:19 +08:00
parent d43f527728
commit c7f07d2586
6 changed files with 413 additions and 321 deletions

View File

@ -161,6 +161,7 @@
</el-form>
<el-card class="content-box">
<el-row>
<el-col :span="24" style="text-align: right;">
<el-button
@ -171,6 +172,14 @@
>
新增装备
</el-button>
<el-button
type="primary"
size="mini"
@click="handleImport"
v-show=" !isAddVisible"
>
批量导入
</el-button>
</el-col>
</el-row>
<!-- 表格 -->
@ -202,13 +211,17 @@
</el-table-column>
<el-table-column prop="name" label="装备名称" show-overflow-tooltip align="center" min-width="100"/>
<el-table-column prop="specificationModel" label="规格型号" show-overflow-tooltip align="center" min-width="100"/>
<el-table-column prop="specificationModel" label="规格型号" show-overflow-tooltip align="center"
min-width="100"
/>
<el-table-column prop="originalCode" label="装备原始编码" show-overflow-tooltip align="center" min-width="100"/>
<el-table-column prop="unit" label="计量单位" show-overflow-tooltip align="center" min-width="100"/>
<el-table-column prop="manufacturer" label="生产厂家" show-overflow-tooltip align="center" min-width="100"/>
<el-table-column prop="productionDate" label="出厂日期" show-overflow-tooltip align="center" min-width="100"/>
<!-- <el-table-column prop="orderNumber" label="采购日期" align="center"/>-->
<el-table-column prop="originalValue" label="资产原值(元)" show-overflow-tooltip align="center" min-width="100"/>
<el-table-column prop="originalValue" label="资产原值(元)" show-overflow-tooltip align="center"
min-width="100"
/>
<!-- <el-table-column prop="orderNumber" label="最大使用年限(年)" align="center"/>-->
<!-- <el-table-column prop="orderNumber" label="下次维保日期" align="center"/>-->
<el-table-column prop="province" label="所属省份" show-overflow-tooltip align="center" min-width="100"/>
@ -222,7 +235,9 @@
<span style="color: #00a288; cursor: pointer" @click="handleView(row, 2)">查看</span>
</template>
</el-table-column>
<el-table-column prop="inspectionReports" label="定期检验报告" show-overflow-tooltip align="center" min-width="100">
<el-table-column prop="inspectionReports" label="定期检验报告" show-overflow-tooltip align="center"
min-width="100"
>
<template v-slot="{ row }">
<span style="color: #00a288; cursor: pointer" @click="handleView(row, 3)">查看</span>
</template>
@ -304,7 +319,7 @@
<!-- 弹框 -->
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="40%">
<el-table :data="dialogList" fit highlight-current-row style="width: 100%" :max-height="500">
<el-table-column type="index" width="55" label="序号" align="center" />
<el-table-column type="index" width="55" label="序号" align="center"/>
<el-table-column label="附件名称" prop="fileName" align="center">
<!-- 插槽 -->
<template v-slot="{ row }">
@ -317,7 +332,43 @@
<el-button @click="dialogVisible = false"> </el-button>
</span>
</el-dialog>
<el-dialog
:title="upload.title"
:visible.sync="upload.open"
width="400px"
append-to-body
>
<el-upload
ref="upload"
:limit="1"
accept=".xlsx, .xls"
:headers="upload.headers"
:action="upload.url + '?orderId=' + orderId"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:auto-upload="false"
drag
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<span>仅允许导入xlsxlsx格式文件</span>
<el-link
type="primary"
:underline="false"
style="font-size: 12px; vertical-align: baseline"
@click="importTemplate"
>下载模板
</el-link
>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button>
</div>
</el-dialog>
</div>
@ -334,6 +385,7 @@ import {
removeDeviceApi
} from '@/api/EquipmentEntryApply'
import { getManufacturerSelectApi } from '@/api/EquipmentLedger/index.js'
import { getToken } from '@/utils/auth'
export default {
name: 'EquipmentInput',
@ -342,7 +394,7 @@ export default {
created() {
console.log(this.$route)
this.orderId = this.$route.query && this.$route.query.orderId
this.isAddVisible = this.$route.query && this.$route.query.isAddVisible == 'true'
this.isAddVisible = this.$route.query && this.$route.query.isAddVisible
this.isApprovalVisible = this.$route.query && this.$route.query.isApprovalVisible
if (!this.orderId) {
this.pageTitle = '新增设备录入'
@ -367,6 +419,20 @@ export default {
//
tableData: [],
total: 0,
upload: {
//
open: false,
//
title: '',
//
isUploading: false,
//
//
headers: { Authorization: 'Bearer ' + getToken() },
//
url: process.env.VUE_APP_BASE_API + '/material-mall/order/importData'
},
queryParams: {
orderCreateUser: '',
orderCreateTime: '',
@ -391,7 +457,7 @@ export default {
quantity: 1
},
isViewMode: false, //
pageTitle:'',
pageTitle: '',
submitButtonText: '',
columns: [
{ key: 26, label: `特征项1`, prop: 'featureItem1', visible: true },
@ -411,11 +477,11 @@ export default {
{ key: 40, label: `特征项8`, prop: 'featureItem8', visible: true },
{ key: 41, label: `特征值8`, prop: 'featureValue8', visible: true },
{ key: 42, label: `特征项9`, prop: 'featureItem9', visible: true },
{ key: 43, label: `特征值9`, prop: 'featureValue9', visible: true },
{ key: 43, label: `特征值9`, prop: 'featureValue9', visible: true }
],
dialogVisible: false,
dialogTitle: '',
dialogList: [],
dialogList: []
}
},
watch: {
@ -429,6 +495,22 @@ export default {
this.getManufacturerSelectList()
},
methods: {
//
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true
},
//
handleFileSuccess(response, file, fileList) {
this.upload.open = false
this.upload.isUploading = false
this.$refs.upload.clearFiles()
this.$alert('<div style=\'overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;\'>' + response.msg + '</div>', '导入结果', { dangerouslyUseHTMLString: true })
this.getList()
},
//
submitFileForm() {
this.$refs.upload.submit()
},
//
getManufacturerSelectList() {
getManufacturerSelectApi().then((res) => {
@ -525,7 +607,7 @@ export default {
* 处理表单提交
*/
handleSubmit() {
if(this.isSubmit) return
if (this.isSubmit) return
this.isSubmit = true
const loading = this.$loading()
equipmentSubmitApiNew({ id: this.orderId, status: 0 }).then(res => {
@ -582,7 +664,10 @@ export default {
}
}
},
handleImport() {
this.upload.title = '导入'
this.upload.open = true
},
//
editRowInfo(row) {
// this.orderId = orderId.toString()
@ -638,7 +723,7 @@ export default {
this.dialogList = row.purchaseInvoices || []
}
this.dialogVisible = true
},
}
}
}
</script>
@ -742,9 +827,10 @@ export default {
}
}
&.el-table--striped .el-table__body tr.el-table__row:hover>td.el-table__cell {
&.el-table--striped .el-table__body tr.el-table__row:hover > td.el-table__cell {
background-color: #CCF1E9 !important;
}
.el-table__body tr.hover-row > td.el-table__cell {
background-color: #ccf1e9 !important;
}

View File

@ -44,7 +44,7 @@
</el-col>
</el-row>
<div class="table-container" style="flex: 1; overflow-y: auto;">
<el-table :data="tableData" style="width: 100%" border stripe >
<el-table :data="tableData" style="width: 100%" border stripe>
<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="操作类型">
@ -124,7 +124,8 @@
</el-row>
<div class="dialog-table">
<table border="1" cellspacing="0" cellpadding="6"
style="width: 100%; border-collapse: collapse; text-align: center;">
style="width: 100%; border-collapse: collapse; text-align: center;"
>
<thead>
<tr>
<th style="width: 100px;">序号</th>
@ -142,7 +143,7 @@
<td>{{ item.devName }}</td>
<td>{{ item.devModel }}</td>
<td>{{ item.devCode }}</td>
<td>{{item.devNum}}</td>
<td>{{ item.devNum }}</td>
</tr>
</tbody>
</table>
@ -164,7 +165,7 @@
</template>
<script>
import {getRoamRecordListAPI, getOutRecordListAPI} from '@/api/EquipmentRoamRecord'
import { getRoamRecordListAPI, getOutRecordListAPI } from '@/api/EquipmentRoamRecord'
import vueEasyPrint from 'vue-easy-print'
export default {
@ -220,10 +221,10 @@ export default {
//
async onHandleOutRecord(row) {
const {changeUnit, useUint, proName, devNum, id, createUser, createTime} = row
this.outRecordParams = {changeUnit, useUint, proName, devNum, createUser, createTime}
const { changeUnit, useUint, proName, devNum, id, createUser, createTime } = row
this.outRecordParams = { changeUnit, useUint, proName, devNum, createUser, createTime }
this.recordId = id
const res = await getOutRecordListAPI({id})
const res = await getOutRecordListAPI({ id })
this.outRecordData = res.data
this.outRecordVisible = true
},
@ -235,7 +236,7 @@ export default {
//
onHandleReset() {
this.queryParams = {keyWord: '', type: '', startTime: '', endTime: '', pageNum: 1, pageSize: 10}
this.queryParams = { keyWord: '', type: '', startTime: '', endTime: '', pageNum: 1, pageSize: 10 }
this.dateRange = []
this.getRoamRecordList()
},
@ -248,13 +249,13 @@ export default {
{
...this.queryParams
},
`装备流转记录.xlsx`
`维修记录_${new Date().getTime()}.xlsx`
)
},
//
onHandleDownload() {
this.download('material-mall/decChange/exportDetails', {id: this.recordId}, `出库记录单.xlsx`)
this.download('material-mall/decChange/exportDetails', { id: this.recordId }, `出库记录单.xlsx`)
},
//

View File

@ -258,7 +258,7 @@ export default {
{
...this.queryParams
},
`装备流转记录.xlsx`
`出库记录_${new Date().getTime()}.xlsx`
)
},

View File

@ -259,7 +259,7 @@ export default {
{
...this.queryParams
},
`装备流转记录.xlsx`
`退役记录_${new Date().getTime()}.xlsx`
)
},

View File

@ -6,12 +6,13 @@
<el-row>
<el-col :span="12">
<el-form-item prop="keyword" label="关键字">
<el-input clearable style="width: 240px" placeholder="请输入关键字" v-model.trim="queryParams.keyWord" />
<el-input clearable style="width: 240px" placeholder="请输入关键字" v-model.trim="queryParams.keyWord"/>
</el-form-item>
<el-form-item label="操作时间">
<el-date-picker v-model="dateRange" type="datetimerange" range-separator="" style="width: 240px"
value-format="yyyy-MM-dd" end-placeholder="结束日期" start-placeholder="开始日期" />
value-format="yyyy-MM-dd" end-placeholder="结束日期" start-placeholder="开始日期"
/>
</el-form-item>
</el-col>
<el-col :span="12" style="text-align: right;">
@ -31,9 +32,9 @@
</el-col>
</el-row>
<div class="table-container">
<el-table :data="tableData" style="width: 100%" border stripe >
<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 :data="tableData" style="width: 100%" border stripe>
<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">
@ -41,7 +42,7 @@
</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="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>
@ -51,17 +52,17 @@
<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" type="success">在库</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" type="waring"> 维修</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="changeStatus" label="流转后状态">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag v-if="scope.row.status == 1" size="mini" type="success">在库</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" type="waring"> 维修</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 label="地址">
<template #default="scope">
<!-- 拼接省++空值显示为空字符串避免出现undefined -->
@ -72,7 +73,7 @@
}}
</template>
</el-table-column>
<el-table-column align="center" show-overflow-tooltip prop="devNum" 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)">
@ -85,7 +86,8 @@
<div class="pagination-container-fage" style="flex-shrink: 0;">
<pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getRoamRecordList" />
@pagination="getRoamRecordList"
/>
</div>
</el-card>
<!-- 出库记录单 -->
@ -115,7 +117,9 @@
</el-col>
</el-row>
<div class="dialog-table">
<table border="1" cellspacing="0" cellpadding="6" style="width: 100%; border-collapse: collapse; text-align: center;">
<table border="1" cellspacing="0" cellpadding="6"
style="width: 100%; border-collapse: collapse; text-align: center;"
>
<thead>
<tr>
<th style="width: 100px;">序号</th>
@ -134,7 +138,7 @@
<td>{{ item.devName }}</td>
<td>{{ item.devModel }}</td>
<td>{{ item.devCode }}</td>
<td>{{item.devNum}}</td>
<td>{{ item.devNum }}</td>
<td>
{{ item.useStartTime ? item.useStartTime : '-' }}
@ -245,7 +249,7 @@ export default {
{
...this.queryParams
},
`装备流转记录.xlsx`
`退库记录_${new Date().getTime()}.xlsx`
)
},
@ -282,7 +286,6 @@ export default {
}
.button-group {
float: right;
margin-left: 10px;
@ -296,9 +299,10 @@ export default {
margin-bottom: 20px;
border-radius: 8px;
padding: 0;
::v-deep .el-card__body {
padding: 20px !important;
}
}
}
.content-box {
@ -367,7 +371,7 @@ export default {
}
}
&.el-table--striped .el-table__body tr.el-table__row:hover>td.el-table__cell {
&.el-table--striped .el-table__body tr.el-table__row:hover > td.el-table__cell {
background-color: #CCF1E9 !important;
}
}
@ -418,7 +422,7 @@ export default {
}
}
&.el-table--striped .el-table__body tr.el-table__row:hover>td.el-table__cell {
&.el-table--striped .el-table__body tr.el-table__row:hover > td.el-table__cell {
background-color: #CCF1E9 !important;
}
@ -432,6 +436,7 @@ export default {
}
}
}
table {
width: 100%;
border-collapse: collapse; /* ✅ 连起来的关键 */

View File

@ -4,7 +4,7 @@
<el-row :gutter="20">
<!--部门数据-->
<el-col :span="4" :xs="24">
<el-col :span="5" :xs="24">
<div class="head-container">
<el-input v-model="deptName" placeholder="请输入部门名称" clearable size="small" prefix-icon="el-icon-search"
style="margin-bottom: 20px"
@ -22,7 +22,7 @@
<!--用户数据-->
<!-- 查询条件卡片-->
<el-col :span="20" :xs="24">
<el-col :span="19" :xs="24">
<div class="card-container">
<div class="card-header query-header">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"