2024-12-16 17:59:18 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="app-container" id="">
|
|
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
|
2025-01-22 17:38:39 +08:00
|
|
|
<el-form-item prop="time">
|
2024-12-16 17:59:18 +08:00
|
|
|
<el-date-picker
|
|
|
|
|
v-model="queryParams.time"
|
|
|
|
|
range-separator="至"
|
|
|
|
|
start-placeholder="开始日期"
|
|
|
|
|
end-placeholder="结束日期"
|
|
|
|
|
type="daterange"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
2024-12-20 18:33:52 +08:00
|
|
|
style="width: 220px"
|
2024-12-16 17:59:18 +08:00
|
|
|
></el-date-picker>
|
|
|
|
|
</el-form-item>
|
2025-01-22 17:38:39 +08:00
|
|
|
<el-form-item prop="keyWord">
|
2024-12-16 17:59:18 +08:00
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.keyWord"
|
|
|
|
|
placeholder="请输入关键字"
|
|
|
|
|
clearable :maxlength="20"
|
2024-12-20 18:33:52 +08:00
|
|
|
style="width: 220px"
|
2024-12-16 17:59:18 +08:00
|
|
|
/>
|
2024-12-26 18:48:11 +08:00
|
|
|
</el-form-item>
|
2025-01-22 17:38:39 +08:00
|
|
|
<el-form-item prop="typeName">
|
2024-12-16 17:59:18 +08:00
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.typeName"
|
|
|
|
|
placeholder="请输入物资名称"
|
|
|
|
|
clearable :maxlength="20"
|
2024-12-20 18:33:52 +08:00
|
|
|
style="width: 220px"
|
2025-06-09 17:36:15 +08:00
|
|
|
/>
|
2024-12-16 17:59:18 +08:00
|
|
|
</el-form-item>
|
2025-01-22 17:38:39 +08:00
|
|
|
<el-form-item prop="typeModelName">
|
2024-12-16 17:59:18 +08:00
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.typeModelName"
|
|
|
|
|
placeholder="请输入规格型号"
|
|
|
|
|
clearable :maxlength="20"
|
2024-12-20 18:33:52 +08:00
|
|
|
style="width: 220px"
|
2024-12-16 17:59:18 +08:00
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
2025-01-22 17:38:39 +08:00
|
|
|
<el-form-item prop="inputType">
|
2024-12-20 18:33:52 +08:00
|
|
|
<el-select
|
|
|
|
|
v-model="queryParams.inputType"
|
2024-12-16 17:59:18 +08:00
|
|
|
filterable clearable
|
2024-12-20 18:33:52 +08:00
|
|
|
style="width: 220px"
|
2025-01-22 17:38:39 +08:00
|
|
|
placeholder="请选择入库类型"
|
2024-12-16 17:59:18 +08:00
|
|
|
>
|
|
|
|
|
<el-option
|
2024-12-20 18:33:52 +08:00
|
|
|
v-for="item in inputTypeList"
|
2024-12-16 17:59:18 +08:00
|
|
|
:key="item.id"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.id"
|
|
|
|
|
>
|
|
|
|
|
</el-option>
|
2024-12-20 18:33:52 +08:00
|
|
|
</el-select>
|
2024-12-16 17:59:18 +08:00
|
|
|
</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-button
|
|
|
|
|
type="warning"
|
|
|
|
|
plain
|
|
|
|
|
icon="el-icon-download"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleExport"
|
|
|
|
|
>导出</el-button
|
2024-12-26 18:48:11 +08:00
|
|
|
>
|
2024-12-16 17:59:18 +08:00
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
2024-12-26 18:48:11 +08:00
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
|
<el-table v-loading="loading" :data="tableList" border>
|
2024-12-16 17:59:18 +08:00
|
|
|
<el-table-column label="序号" align="center" width="80" type="index">
|
2024-12-26 18:48:11 +08:00
|
|
|
<template scope="scope">
|
2024-12-16 17:59:18 +08:00
|
|
|
<span>{{ (queryParams.pageNum - 1) * 10 + scope.$index+1 }}</span>
|
2024-12-26 18:48:11 +08:00
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
2024-12-16 17:59:18 +08:00
|
|
|
<el-table-column label="物资名称" align="center" prop="typeName" :show-overflow-tooltip="true"/>
|
|
|
|
|
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true"/>
|
2025-06-09 17:36:15 +08:00
|
|
|
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true"/>
|
2024-12-27 10:15:11 +08:00
|
|
|
<el-table-column label="计量单位" align="center" prop="unit" :show-overflow-tooltip="true"/>
|
|
|
|
|
<el-table-column label="入库数量" align="center" prop="inputNum" :show-overflow-tooltip="true"></el-table-column>
|
2024-12-20 18:33:52 +08:00
|
|
|
<el-table-column label="入库人员" align="center" prop="inputUser" :show-overflow-tooltip="true"></el-table-column>
|
|
|
|
|
<el-table-column label="入库时间" align="center" prop="inputTime" :show-overflow-tooltip="true"></el-table-column>
|
2024-12-25 18:02:54 +08:00
|
|
|
<el-table-column label="入库单号" align="center" prop="inputCode" :show-overflow-tooltip="true">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span class="clickText" v-if="scope.row.inputType=='新购入库'" @click="jumpInput(scope.row.inputCode)">{{ scope.row.inputCode }}</span>
|
2024-12-26 18:48:11 +08:00
|
|
|
<span class="clickText" v-if="scope.row.inputType=='修试入库'" @click="jumpRepairInput(scope.row.inputCode)">{{ scope.row.inputCode }}</span>
|
2024-12-25 18:02:54 +08:00
|
|
|
</template>
|
2024-12-26 18:48:11 +08:00
|
|
|
</el-table-column>
|
2024-12-20 18:33:52 +08:00
|
|
|
<el-table-column label="入库类型" align="center" prop="inputType" :show-overflow-tooltip="true"></el-table-column>
|
2024-12-26 18:48:11 +08:00
|
|
|
<el-table-column label="入库方式" align="center" prop="inputStyle" :show-overflow-tooltip="true"/>
|
|
|
|
|
</el-table>
|
2024-12-16 17:59:18 +08:00
|
|
|
<pagination
|
|
|
|
|
v-show="total > 0"
|
|
|
|
|
:total="total"
|
|
|
|
|
:page.sync="queryParams.pageNum"
|
|
|
|
|
:limit.sync="queryParams.pageSize"
|
|
|
|
|
:page-sizes="[5, 10, 15, 20, 30]"
|
|
|
|
|
@pagination="getList"
|
2024-12-26 18:48:11 +08:00
|
|
|
/>
|
2024-12-16 17:59:18 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {
|
2024-12-20 18:33:52 +08:00
|
|
|
getInputRecordListApi
|
2024-12-26 18:48:11 +08:00
|
|
|
} from '@/api/stquery/stquery';
|
2024-12-16 17:59:18 +08:00
|
|
|
export default {
|
2025-05-14 09:31:18 +08:00
|
|
|
name: 'DeviceInBound',
|
2024-12-16 17:59:18 +08:00
|
|
|
dicts: [],
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
// 遮罩层
|
|
|
|
|
loading: false,
|
|
|
|
|
// 选中数组
|
|
|
|
|
ids: [],
|
|
|
|
|
// 弹出层标题
|
|
|
|
|
title: '查看',
|
|
|
|
|
// 非单个禁用
|
|
|
|
|
single: true,
|
|
|
|
|
// 非多个禁用
|
|
|
|
|
multiple: true,
|
|
|
|
|
// 显示搜索条件
|
2024-12-26 18:48:11 +08:00
|
|
|
showSearch: true,
|
2025-06-16 17:01:16 +08:00
|
|
|
inputTypeList:[{id:'新购入库',name:'新购入库'},{id:'修试入库',name:'修试入库'},{id:'盘点2入库',name:'盘点入库'},{id:'未知入库类型',name:'未知入库类型'}],
|
2024-12-16 17:59:18 +08:00
|
|
|
// 总条数
|
|
|
|
|
total: 0,
|
|
|
|
|
// 主表格数据
|
2024-12-26 18:48:11 +08:00
|
|
|
tableList: [],
|
2024-12-16 17:59:18 +08:00
|
|
|
// 查询参数
|
|
|
|
|
queryParams: {
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
time: null,
|
|
|
|
|
keyWord: null,
|
2024-12-26 18:48:11 +08:00
|
|
|
typeName: null, //物资名称
|
|
|
|
|
typeModelName: null, //物资名称
|
|
|
|
|
|
|
|
|
|
},
|
2024-12-16 17:59:18 +08:00
|
|
|
}
|
|
|
|
|
},
|
2024-12-26 18:48:11 +08:00
|
|
|
created() {
|
2025-07-18 12:00:38 +08:00
|
|
|
const end = new Date()
|
|
|
|
|
let start = new Date()
|
|
|
|
|
start.setMonth(start.getMonth() - 1)
|
|
|
|
|
this.queryParams.time = [this.format(start), this.format(end)]
|
2024-12-16 17:59:18 +08:00
|
|
|
this.getList()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2025-07-18 12:00:38 +08:00
|
|
|
format(date) {
|
|
|
|
|
const y = date.getFullYear()
|
|
|
|
|
const m = String(date.getMonth() + 1).padStart(2, '0')
|
|
|
|
|
const day = String(date.getDate()).padStart(2, '0')
|
|
|
|
|
return `${y}-${m}-${day}`
|
|
|
|
|
},
|
2024-12-16 17:59:18 +08:00
|
|
|
// 获取列表
|
|
|
|
|
async getList() {
|
|
|
|
|
this.loading = true
|
|
|
|
|
const params = {
|
|
|
|
|
keyWord: this.queryParams.keyWord,
|
2024-12-20 18:33:52 +08:00
|
|
|
inputType: this.queryParams.inputType,
|
2024-12-27 10:15:11 +08:00
|
|
|
typeName: this.queryParams.typeName,
|
|
|
|
|
typeModelName: this.queryParams.typeModelName,
|
2024-12-16 17:59:18 +08:00
|
|
|
startTime: this.queryParams.time && this.queryParams.time[0],
|
|
|
|
|
endTime: this.queryParams.time && this.queryParams.time[1],
|
|
|
|
|
pageSize: this.queryParams.pageSize,
|
|
|
|
|
pageNum: this.queryParams.pageNum
|
|
|
|
|
}
|
2024-12-20 18:33:52 +08:00
|
|
|
const res = await getInputRecordListApi(params)
|
2024-12-16 17:59:18 +08:00
|
|
|
this.loading = false
|
|
|
|
|
if(res.data.rows.length>0){
|
|
|
|
|
this.tableList = res.data.rows;
|
|
|
|
|
// let obj = {
|
|
|
|
|
// leaseNum: res.data.rows[0].projUsingDto.totalLeaseNum||0,
|
|
|
|
|
// backNum: res.data.rows[0].projUsingDto.totalBackNum||0,
|
|
|
|
|
// usNum: res.data.rows[0].projUsingDto.totalUsNum||0,
|
|
|
|
|
// usPrice: res.data.rows[0].projUsingDto.totalUsPrice||0,
|
|
|
|
|
// totalPrice: res.data.rows[0].projUsingDto.totalTotalPrice||0,
|
|
|
|
|
// isSltName:''
|
|
|
|
|
// }
|
2024-12-26 18:48:11 +08:00
|
|
|
// this.tableList.unshift(obj)
|
2024-12-16 17:59:18 +08:00
|
|
|
}else{
|
|
|
|
|
this.tableList=[]
|
|
|
|
|
}
|
|
|
|
|
this.total = res.data.total;
|
|
|
|
|
},
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
|
handleQuery() {
|
|
|
|
|
this.queryParams.pageNum = 1
|
|
|
|
|
this.getList()
|
2024-12-26 18:48:11 +08:00
|
|
|
},
|
2024-12-16 17:59:18 +08:00
|
|
|
/** 重置按钮操作 */
|
2024-12-26 18:48:11 +08:00
|
|
|
resetQuery() {
|
2025-07-18 12:00:38 +08:00
|
|
|
const end = new Date()
|
|
|
|
|
let start = new Date()
|
|
|
|
|
start.setMonth(start.getMonth() - 1)
|
|
|
|
|
this.queryParams.time = [this.format(start), this.format(end)]
|
2024-12-16 17:59:18 +08:00
|
|
|
this.resetForm('queryForm')
|
|
|
|
|
this.handleQuery()
|
2024-12-26 18:48:11 +08:00
|
|
|
},
|
2024-12-16 17:59:18 +08:00
|
|
|
/** 导出按钮操作 */
|
|
|
|
|
handleExport() {
|
2025-06-09 17:36:15 +08:00
|
|
|
const formatTime = (date) => {
|
|
|
|
|
const year = date.getFullYear();
|
|
|
|
|
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
|
|
|
const day = String(date.getDate()).padStart(2, '0');
|
|
|
|
|
const hours = String(date.getHours()).padStart(2, '0');
|
|
|
|
|
const minutes = String(date.getMinutes()).padStart(2, '0');
|
|
|
|
|
const seconds = String(date.getSeconds()).padStart(2, '0');
|
|
|
|
|
return `${year}${month}${day}_${hours}${minutes}${seconds}`;
|
|
|
|
|
};
|
|
|
|
|
|
2025-07-18 12:00:38 +08:00
|
|
|
const params = {
|
|
|
|
|
keyWord: this.queryParams.keyWord,
|
|
|
|
|
inputType: this.queryParams.inputType,
|
|
|
|
|
typeName: this.queryParams.typeName,
|
|
|
|
|
typeModelName: this.queryParams.typeModelName,
|
|
|
|
|
startTime: this.queryParams.time && this.queryParams.time[0],
|
|
|
|
|
endTime: this.queryParams.time && this.queryParams.time[1],
|
|
|
|
|
pageSize: this.queryParams.pageSize,
|
|
|
|
|
pageNum: this.queryParams.pageNum
|
|
|
|
|
}
|
2025-06-09 17:36:15 +08:00
|
|
|
const currentTime = formatTime(new Date());
|
2024-12-16 17:59:18 +08:00
|
|
|
this.download(
|
2024-12-20 18:33:52 +08:00
|
|
|
'material/complex_query/exportInputRecord',
|
2024-12-16 17:59:18 +08:00
|
|
|
{
|
2025-07-18 12:00:38 +08:00
|
|
|
...params,
|
2024-12-16 17:59:18 +08:00
|
|
|
},
|
2025-06-09 17:36:15 +08:00
|
|
|
`综合查询_入库记录_${currentTime}.xlsx`,
|
2024-12-16 17:59:18 +08:00
|
|
|
)
|
2024-12-25 18:02:54 +08:00
|
|
|
},
|
|
|
|
|
// 跳转新购待入库
|
|
|
|
|
jumpInput(code){
|
|
|
|
|
this.$router.push({ path: "/purchase/goodsEntry", query: {'code':code} });
|
|
|
|
|
},
|
|
|
|
|
// 跳转修试后入库
|
|
|
|
|
jumpRepairInput(code){
|
2024-12-26 18:48:11 +08:00
|
|
|
this.$router.push({ path: "/repair/testedInBound", query: {'code':code} });
|
2024-12-25 18:02:54 +08:00
|
|
|
},
|
2024-12-16 17:59:18 +08:00
|
|
|
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
::v-deep.el-table .fixed-width .el-button--mini {
|
|
|
|
|
width: 60px !important;
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
}
|
|
|
|
|
.clickText {
|
|
|
|
|
color: #02a7f0;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
</style>
|