退料、维修、维修审核页面
This commit is contained in:
parent
0e4b980e49
commit
e00afb3606
|
|
@ -126,3 +126,14 @@ export function updatePrintStatus(id) {
|
||||||
data: {id: id},
|
data: {id: id},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//退料查询
|
||||||
|
export function getBackQueryList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/material/back_apply_info/getBackQueryList',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -118,3 +118,22 @@ export function getRepairProjectListApi(query) {
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//维修查询
|
||||||
|
export function getRepairQueryList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/material/repair/getRepairQueryList',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//维修审核查询
|
||||||
|
export function getRepairAuditQueryList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/material/repair/getRepairAuditQueryList',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,17 +10,97 @@
|
||||||
maxlength="20"
|
maxlength="20"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="施工类型" prop="lineTypes">
|
||||||
<el-form-item prop="materialType">
|
<el-select
|
||||||
<el-select v-model="queryParams.materialType" placeholder="请选择物品种类" clearable filterable>
|
v-model="queryParams.lineTypes"
|
||||||
|
placeholder="请选择施工类型"
|
||||||
|
multiple
|
||||||
|
collapse-tags
|
||||||
|
style="width: 240px"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
@change="handleLineTypeChange"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in materialTypeList"
|
v-for="item in lineTypeOptions"
|
||||||
:key="dict.value"
|
:key="item.value"
|
||||||
:label="dict.label"
|
:label="item.label"
|
||||||
:value="dict.label"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="物资类型" prop="materialType">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.materialType"
|
||||||
|
placeholder="请选择物资类型"
|
||||||
|
style="width: 240px"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
@change="handleMaterialTypeChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in materialTypeOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物资名称" prop="typeName">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.typeName"
|
||||||
|
placeholder="请选择物资名称"
|
||||||
|
style="width: 240px"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
@change="handleTypeNameChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in typeNameOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="规格型号" prop="typeModelName">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.typeModelName"
|
||||||
|
placeholder="请选择规格型号"
|
||||||
|
style="width: 240px"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in typeModelNameOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="机具类型" prop="jiJuType">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.jiJuType"
|
||||||
|
placeholder="请选择机具类型"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
>
|
||||||
|
<el-option label="施工机具" :value="1" />
|
||||||
|
<el-option label="安全工器具" :value="2" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<!-- <el-form-item prop="materialType">-->
|
||||||
|
<!-- <el-select v-model="queryParams.materialType" placeholder="请选择物品种类" clearable filterable>-->
|
||||||
|
<!-- <el-option-->
|
||||||
|
<!-- v-for="dict in materialTypeList"-->
|
||||||
|
<!-- :key="dict.value"-->
|
||||||
|
<!-- :label="dict.label"-->
|
||||||
|
<!-- :value="dict.label"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-select>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
|
||||||
<el-form-item prop="isAssets">
|
<el-form-item prop="isAssets">
|
||||||
<el-select v-model="queryParams.isAssets" placeholder="是否固定资产" clearable>
|
<el-select v-model="queryParams.isAssets" placeholder="是否固定资产" clearable>
|
||||||
|
|
@ -29,34 +109,34 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item prop="materialName">
|
<!-- <el-form-item prop="materialName">-->
|
||||||
<el-select
|
<!-- <el-select-->
|
||||||
v-model="queryParams.materialName"
|
<!-- v-model="queryParams.materialName"-->
|
||||||
placeholder="请选择设备类型"
|
<!-- placeholder="请选择设备类型"-->
|
||||||
clearable
|
<!-- clearable-->
|
||||||
filterable
|
<!-- filterable-->
|
||||||
@change="handleMaModel"
|
<!-- @change="handleMaModel"-->
|
||||||
>
|
<!-- >-->
|
||||||
<el-option
|
<!-- <el-option-->
|
||||||
v-for="dict in materialNameList"
|
<!-- v-for="dict in materialNameList"-->
|
||||||
:key="dict.value"
|
<!-- :key="dict.value"-->
|
||||||
:label="dict.label"
|
<!-- :label="dict.label"-->
|
||||||
:value="dict.label"
|
<!-- :value="dict.label"-->
|
||||||
/>
|
<!-- />-->
|
||||||
</el-select>
|
<!-- </el-select>-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
|
|
||||||
|
|
||||||
<el-form-item prop="materialModel">
|
<!-- <el-form-item prop="materialModel">-->
|
||||||
<el-select v-model="queryParams.materialModel" placeholder="请选择规格型号" clearable filterable>
|
<!-- <el-select v-model="queryParams.materialModel" placeholder="请选择规格型号" clearable filterable>-->
|
||||||
<el-option
|
<!-- <el-option-->
|
||||||
v-for="dict in materialModelList"
|
<!-- v-for="dict in materialModelList"-->
|
||||||
:key="dict.value"
|
<!-- :key="dict.value"-->
|
||||||
:label="dict.label"
|
<!-- :label="dict.label"-->
|
||||||
:value="dict.label"
|
<!-- :value="dict.label"-->
|
||||||
/>
|
<!-- />-->
|
||||||
</el-select>
|
<!-- </el-select>-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
|
|
||||||
<el-form-item prop="maStatus">
|
<el-form-item prop="maStatus">
|
||||||
<el-select v-model="queryParams.maStatus" placeholder="请选择设备状态" clearable filterable>
|
<el-select v-model="queryParams.maStatus" placeholder="请选择设备状态" clearable filterable>
|
||||||
|
|
@ -100,6 +180,7 @@
|
||||||
<el-table-column label="设备类型" align="center" prop="materialName" sortable show-overflow-tooltip />
|
<el-table-column label="设备类型" align="center" prop="materialName" sortable show-overflow-tooltip />
|
||||||
<el-table-column label="规格型号" align="center" prop="materialModel" sortable show-overflow-tooltip />
|
<el-table-column label="规格型号" align="center" prop="materialModel" sortable show-overflow-tooltip />
|
||||||
<el-table-column label="设备编号" align="center" prop="maCode" />
|
<el-table-column label="设备编号" align="center" prop="maCode" />
|
||||||
|
<el-table-column label="机具类型" align="center" prop="jiJuTypeStr" sortable show-overflow-tooltip />
|
||||||
<el-table-column label="设备状态" align="center" prop="statusName" sortable show-overflow-tooltip />
|
<el-table-column label="设备状态" align="center" prop="statusName" sortable show-overflow-tooltip />
|
||||||
<el-table-column label="固定资产编号" align="center" prop="assetsCode" width="200px" sortable
|
<el-table-column label="固定资产编号" align="center" prop="assetsCode" width="200px" sortable
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
|
|
@ -522,6 +603,7 @@ import { getToken } from '@/utils/auth'
|
||||||
import QRCode from 'qrcodejs2'
|
import QRCode from 'qrcodejs2'
|
||||||
import html2canvas from 'html2canvas'
|
import html2canvas from 'html2canvas'
|
||||||
import { formatTime } from '@/utils/bonus'
|
import { formatTime } from '@/utils/bonus'
|
||||||
|
import {getLintTypeList, getMaterialTypeList} from "@/api/stquery/stquery";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Device',
|
name: 'Device',
|
||||||
|
|
@ -575,10 +657,16 @@ export default {
|
||||||
keyWord: undefined,
|
keyWord: undefined,
|
||||||
isAssets: undefined,
|
isAssets: undefined,
|
||||||
maStatus: null,
|
maStatus: null,
|
||||||
materialType: '',
|
typeName: null, //物资名称
|
||||||
materialName: '',
|
typeModelName: null, //规格型号
|
||||||
materialModel: ''
|
lineTypes: [], //线路类型多选数组
|
||||||
|
materialType: null,
|
||||||
|
jiJuType:null
|
||||||
},
|
},
|
||||||
|
lineTypeOptions: [], // 线路类型选项
|
||||||
|
materialTypeOptions: [], // 物资类型选项
|
||||||
|
typeNameOptions:[],
|
||||||
|
typeModelNameOptions:[],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryTeam: {
|
queryTeam: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
|
|
@ -648,10 +736,14 @@ export default {
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getZichanType()
|
this.getZichanType()
|
||||||
this.getDeviceType()
|
// this.getDeviceType()
|
||||||
this.getKeeperData()
|
this.getKeeperData()
|
||||||
this.getRepairerData()
|
this.getRepairerData()
|
||||||
this.getList()
|
this.getList()
|
||||||
|
//线路类型下拉
|
||||||
|
this.getLintTypeList()
|
||||||
|
this.getMaterialTypeList()
|
||||||
|
this.getDeviceType()
|
||||||
},
|
},
|
||||||
// watch: {
|
// watch: {
|
||||||
// // 监听 form.qrCode 的变化,如果有值就生成二维码
|
// // 监听 form.qrCode 的变化,如果有值就生成二维码
|
||||||
|
|
@ -665,6 +757,120 @@ export default {
|
||||||
|
|
||||||
// },
|
// },
|
||||||
methods: {
|
methods: {
|
||||||
|
async getLintTypeList() {
|
||||||
|
try {
|
||||||
|
const res = await getLintTypeList()
|
||||||
|
if (res.code === 200 && res.data) {
|
||||||
|
// 根据后端返回的数据结构进行调整
|
||||||
|
this.lineTypeOptions = res.data.map(item => {
|
||||||
|
// 如果返回的是对象数组,根据实际字段调整
|
||||||
|
return {
|
||||||
|
value: item.typeId,
|
||||||
|
label: item.typeName
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.error('获取施工类型下拉失败')
|
||||||
|
this.lineTypeOptions = [] // 失败时设置为空数组
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('获取施工类型下拉列表失败:', error)
|
||||||
|
this.$message.error('获取施工类型下拉列表失败')
|
||||||
|
this.lineTypeOptions = [] // 异常时设置为空数组
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 线路类型变化处理
|
||||||
|
async handleLineTypeChange(selectedLineTypes) {
|
||||||
|
// 清空物资类型选择
|
||||||
|
this.queryParams.materialType = null
|
||||||
|
this.materialTypeOptions=[]
|
||||||
|
this.queryParams.typeName=null
|
||||||
|
this.typeNameOptions=[]
|
||||||
|
this.queryParams.typeModelName=null
|
||||||
|
this.typeModelNameOptions=[]
|
||||||
|
|
||||||
|
if (!selectedLineTypes || selectedLineTypes.length === 0) {
|
||||||
|
this.materialTypeOptions = []
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取物资类型数据
|
||||||
|
await this.getMaterialTypeList(selectedLineTypes)
|
||||||
|
},
|
||||||
|
async getMaterialTypeList(lineTypes) {
|
||||||
|
const params = {
|
||||||
|
constructionType:lineTypes
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
// 调用接口获取物资类型数据
|
||||||
|
const res = await getMaterialTypeList(params)
|
||||||
|
|
||||||
|
if (res.code === 200 && res.data) {
|
||||||
|
// 处理返回的物资类型数据
|
||||||
|
const materialTypes = res.data.map(item => ({
|
||||||
|
value: item.typeId,
|
||||||
|
label: item.typeName
|
||||||
|
}))
|
||||||
|
|
||||||
|
// 更新选项并缓存
|
||||||
|
this.materialTypeOptions = materialTypes
|
||||||
|
} else {
|
||||||
|
this.$message.error('获取物资类型失败')
|
||||||
|
this.materialTypeOptions = []
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('获取物资类型列表失败:', error)
|
||||||
|
this.$message.error('获取物资类型列表失败')
|
||||||
|
this.materialTypeOptions = []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async handleMaterialTypeChange(e){
|
||||||
|
this.queryParams.typeName=null
|
||||||
|
this.typeNameOptions=[]
|
||||||
|
this.queryParams.typeModelName=null
|
||||||
|
this.typeModelNameOptions=[]
|
||||||
|
getDeviceType({ level: 3, typeId:e }).then(response => {
|
||||||
|
let matNameRes = response.data
|
||||||
|
this.typeNameOptions = matNameRes.map((item) => {
|
||||||
|
return {
|
||||||
|
label: item.typeName,
|
||||||
|
value: item.typeId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async handleTypeNameChange(e){
|
||||||
|
this.queryParams.typeModelName=null
|
||||||
|
this.typeModelNameOptions=[]
|
||||||
|
getDeviceType({ level: 4, typeId:e }).then(response => {
|
||||||
|
let matNameRes = response.data
|
||||||
|
this.typeModelNameOptions = matNameRes.map((item) => {
|
||||||
|
return {
|
||||||
|
label: item.typeName,
|
||||||
|
value: item.typeId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getDeviceType() {
|
||||||
|
getDeviceType({ level: 3 }).then(response => {
|
||||||
|
let matNameRes = response.data
|
||||||
|
this.typeNameOptions = matNameRes.map((item) => {
|
||||||
|
return {
|
||||||
|
label: item.typeName,
|
||||||
|
value: item.typeId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
getDeviceType({ level: 4 }).then(response => {
|
||||||
|
let matModelRes = response.data
|
||||||
|
this.typeModelNameOptions = matModelRes.map((item) => {
|
||||||
|
return {
|
||||||
|
label: item.typeName,
|
||||||
|
value: item.typeId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
async getKeeperData() {
|
async getKeeperData() {
|
||||||
const itemName = 'ku_guan_role_ids'
|
const itemName = 'ku_guan_role_ids'
|
||||||
let roleIdsTemp = []
|
let roleIdsTemp = []
|
||||||
|
|
@ -724,35 +930,35 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
getDeviceType() {
|
// getDeviceType() {
|
||||||
getDeviceType({ level: 2, skipPermission: 1 }).then(response => {
|
// getDeviceType({ level: 2, skipPermission: 1 }).then(response => {
|
||||||
let matTypeRes = response.data
|
// let matTypeRes = response.data
|
||||||
this.materialTypeList = matTypeRes.map((item) => {
|
// this.materialTypeList = matTypeRes.map((item) => {
|
||||||
return {
|
// return {
|
||||||
label: item.typeName,
|
// label: item.typeName,
|
||||||
value: item.typeId
|
// value: item.typeId
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
})
|
// })
|
||||||
getDeviceType({ level: 3, skipPermission: 1 }).then(response => {
|
// getDeviceType({ level: 3, skipPermission: 1 }).then(response => {
|
||||||
let matNameRes = response.data
|
// let matNameRes = response.data
|
||||||
this.materialNameList = matNameRes.map((item) => {
|
// this.materialNameList = matNameRes.map((item) => {
|
||||||
return {
|
// return {
|
||||||
label: item.typeName,
|
// label: item.typeName,
|
||||||
value: item.typeId
|
// value: item.typeId
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
})
|
// })
|
||||||
getDeviceType({ level: 4, skipPermission: 1 }).then(response => {
|
// getDeviceType({ level: 4, skipPermission: 1 }).then(response => {
|
||||||
let matModelRes = response.data
|
// let matModelRes = response.data
|
||||||
this.materialModelList = matModelRes.map((item) => {
|
// this.materialModelList = matModelRes.map((item) => {
|
||||||
return {
|
// return {
|
||||||
label: item.typeName,
|
// label: item.typeName,
|
||||||
value: item.typeId
|
// value: item.typeId
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
})
|
// })
|
||||||
},
|
// },
|
||||||
|
|
||||||
// change设备类型
|
// change设备类型
|
||||||
handleMaModel(e) {
|
handleMaModel(e) {
|
||||||
|
|
@ -790,7 +996,19 @@ export default {
|
||||||
/** 查询岗位列表 */
|
/** 查询岗位列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getListDevice(this.queryParams).then(response => {
|
const params = {
|
||||||
|
isAssets:this.queryParams.isAssets,
|
||||||
|
maStatus:this.queryParams.maStatus,
|
||||||
|
keyWord: this.queryParams.keyWord,
|
||||||
|
typeNameId: this.queryParams.typeName,
|
||||||
|
typeModelNameId: this.queryParams.typeModelName,
|
||||||
|
constructionTypes:this.queryParams.lineTypes,
|
||||||
|
materialTypeId:this.queryParams.materialType,
|
||||||
|
jiJuTypeStr:this.queryParams.jiJuType,
|
||||||
|
pageSize: this.queryParams.pageSize,
|
||||||
|
pageNum: this.queryParams.pageNum
|
||||||
|
}
|
||||||
|
getListDevice(params).then(response => {
|
||||||
this.deviceList = response.rows
|
this.deviceList = response.rows
|
||||||
this.total = response.total
|
this.total = response.total
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
|
@ -1185,7 +1403,18 @@ export default {
|
||||||
try {
|
try {
|
||||||
let fileName = `设备管理_${formatTime(new Date())}.xLsx`
|
let fileName = `设备管理_${formatTime(new Date())}.xLsx`
|
||||||
let url = '/material/ma_machine/export'
|
let url = '/material/ma_machine/export'
|
||||||
const params = { ...this.queryParams }
|
const params = {
|
||||||
|
isAssets:this.queryParams.isAssets,
|
||||||
|
maStatus:this.queryParams.maStatus,
|
||||||
|
keyWord: this.queryParams.keyWord,
|
||||||
|
typeNameId: this.queryParams.typeName,
|
||||||
|
typeModelNameId: this.queryParams.typeModelName,
|
||||||
|
constructionTypes:this.queryParams.lineTypes,
|
||||||
|
materialTypeId:this.queryParams.materialType,
|
||||||
|
jiJuTypeStr:this.queryParams.jiJuType,
|
||||||
|
pageSize: this.queryParams.pageSize,
|
||||||
|
pageNum: this.queryParams.pageNum
|
||||||
|
}
|
||||||
console.log('🚀 ~ 导出 ~ params:', params)
|
console.log('🚀 ~ 导出 ~ params:', params)
|
||||||
this.download(url, params, fileName)
|
this.download(url, params, fileName)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,288 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||||
|
<el-form-item prop="time">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="queryParams.time"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
type="daterange"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
style="width: 240px"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="keyWord">
|
||||||
|
<el-input
|
||||||
|
maxlength="50"
|
||||||
|
v-model="queryParams.keyWord"
|
||||||
|
placeholder="请输入关键字"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="unitId">
|
||||||
|
<treeselect
|
||||||
|
v-model="queryParams.unitId"
|
||||||
|
:options="unitList" :normalizer="normalizer"
|
||||||
|
:show-count="true" style="width: 240px" :disable-branch-nodes="true"
|
||||||
|
noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果"
|
||||||
|
placeholder="请选择退料单位" @select="unitChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="proId">
|
||||||
|
<treeselect
|
||||||
|
v-model="queryParams.proId"
|
||||||
|
:options="proList" :normalizer="normalizer"
|
||||||
|
:show-count="true" style="width: 240px" :disable-branch-nodes="true"
|
||||||
|
noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果"
|
||||||
|
placeholder="请选择退料工程" @select="proChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="typeId">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.typeId"
|
||||||
|
placeholder="请选择物资名称"
|
||||||
|
style="width: 240px"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
@change="handleTypeNameChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in typeNameOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="typeModelId">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.typeModelId"
|
||||||
|
placeholder="请选择规格型号"
|
||||||
|
style="width: 240px"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in typeModelNameOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</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-table border :data="tableList" v-loading="loading" ref="multipleTable" row-key="qrId">
|
||||||
|
<el-table-column label="序号" align="center" type="index" width="70">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="机具名称" align="center" prop="typeName" show-overflow-tooltip/>
|
||||||
|
<el-table-column label="机具规格" align="center" prop="typeModelName" show-overflow-tooltip/>
|
||||||
|
<el-table-column label="退料单号" align="center" prop="code" width="150" show-overflow-tooltip/>
|
||||||
|
<el-table-column label="设备编码" align="center" prop="maCode" width="150" show-overflow-tooltip/>
|
||||||
|
<el-table-column label="退料数量" align="center" prop="backNum" width="100" show-overflow-tooltip/>
|
||||||
|
<el-table-column label="退料人" align="center" prop="backPerson" width="100" show-overflow-tooltip/>
|
||||||
|
<el-table-column label="退料日期" align="center" prop="createTime" width="160" show-overflow-tooltip/>
|
||||||
|
<el-table-column label="退料单位" align="center" prop="unitName" show-overflow-tooltip/>
|
||||||
|
<el-table-column label="退料工程" align="center" prop="proName" show-overflow-tooltip/>
|
||||||
|
</el-table>
|
||||||
|
<pagination :total="total"
|
||||||
|
v-show="total > 0"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
|
import {getBackQueryList, getProjectList, getUnitList} from "@/api/back";
|
||||||
|
import {getDeviceType} from "@/api/ma/device";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Code',
|
||||||
|
dicts: ['qr_box_type'],
|
||||||
|
components: {Treeselect},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
total: 0, // 总条数
|
||||||
|
loading: false, // 遮罩层
|
||||||
|
showSearch: true, // 显示搜索条件
|
||||||
|
tableList: [], // 列表数据源
|
||||||
|
queryTime: [], // 日期数据源
|
||||||
|
selectList: [], // 列表选中数据
|
||||||
|
// 列表查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
bindStatus: '',
|
||||||
|
endTime: '',
|
||||||
|
keyWord: '',
|
||||||
|
startTime: '',
|
||||||
|
typeId:undefined,
|
||||||
|
typeModelId: undefined
|
||||||
|
},
|
||||||
|
unitList: [],
|
||||||
|
proList: [],
|
||||||
|
typeNameOptions:[],
|
||||||
|
typeModelNameOptions:[]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
const end = new Date()
|
||||||
|
let start = new Date()
|
||||||
|
start.setMonth(start.getMonth() - 1)
|
||||||
|
this.queryParams.time = [this.format(start), this.format(end)]
|
||||||
|
this.getList()
|
||||||
|
this.GetUnitData()
|
||||||
|
this.GetProData()
|
||||||
|
this.getDeviceType()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
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}`
|
||||||
|
},
|
||||||
|
unitChange(val){
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.GetProData()
|
||||||
|
},500)
|
||||||
|
},
|
||||||
|
// 获取 工程名称 列表数据
|
||||||
|
async GetProData() {
|
||||||
|
const params = {
|
||||||
|
unitId: this.queryParams.unitId,
|
||||||
|
}
|
||||||
|
const res = await getProjectList(params)
|
||||||
|
this.proList = res.data;
|
||||||
|
this.queryParams.proId=null
|
||||||
|
},
|
||||||
|
// 获取 来往单位 列表数据
|
||||||
|
async GetUnitData() {
|
||||||
|
const params = {
|
||||||
|
// projectId: this.queryParams.proId /* */,
|
||||||
|
}
|
||||||
|
const res = await getUnitList(params)
|
||||||
|
this.unitList = res.data
|
||||||
|
},
|
||||||
|
proChange(val){
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.GetUnitData()
|
||||||
|
},500)
|
||||||
|
},
|
||||||
|
async handleTypeNameChange(e){
|
||||||
|
this.queryParams.typeModelName=null
|
||||||
|
this.typeModelNameOptions=[]
|
||||||
|
getDeviceType({ level: 4, typeId:e }).then(response => {
|
||||||
|
let matNameRes = response.data
|
||||||
|
this.typeModelNameOptions = matNameRes.map((item) => {
|
||||||
|
return {
|
||||||
|
label: item.typeName,
|
||||||
|
value: item.typeId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getDeviceType() {
|
||||||
|
getDeviceType({ level: 3 }).then(response => {
|
||||||
|
let matNameRes = response.data
|
||||||
|
this.typeNameOptions = matNameRes.map((item) => {
|
||||||
|
return {
|
||||||
|
label: item.typeName,
|
||||||
|
value: item.typeId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
getDeviceType({ level: 4 }).then(response => {
|
||||||
|
let matModelRes = response.data
|
||||||
|
this.typeModelNameOptions = matModelRes.map((item) => {
|
||||||
|
return {
|
||||||
|
label: item.typeName,
|
||||||
|
value: item.typeId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取列表
|
||||||
|
async getList() {
|
||||||
|
this.loading = true
|
||||||
|
if (this.queryParams.time && this.queryParams.time.length > 0) {
|
||||||
|
this.queryParams.startTime = this.queryParams.time[0]
|
||||||
|
this.queryParams.endTime = this.queryParams.time[1]
|
||||||
|
}else{
|
||||||
|
this.queryParams.startTime=undefined
|
||||||
|
this.queryParams.endTime=undefined
|
||||||
|
}
|
||||||
|
const res = await getBackQueryList(this.queryParams)
|
||||||
|
this.tableList = res.data.rows
|
||||||
|
this.total = res.data.total
|
||||||
|
this.loading = false
|
||||||
|
},
|
||||||
|
// 搜索按钮
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
// 重置按钮
|
||||||
|
resetQuery() {
|
||||||
|
this.$refs.multipleTable.clearSelection();
|
||||||
|
this.queryTime = []
|
||||||
|
this.resetForm('queryForm')
|
||||||
|
this.queryParams.pageNum = 1
|
||||||
|
this.queryParams.endTime = ''
|
||||||
|
this.queryParams.pageSize = 10
|
||||||
|
this.queryParams.startTime = ''
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
/** 转换菜单数据结构 */
|
||||||
|
normalizer(node) {
|
||||||
|
if (node.children && !node.children.length) {
|
||||||
|
delete node.children;
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
id: node.id,
|
||||||
|
label: node.name,
|
||||||
|
children: node.children,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.uploadImg {
|
||||||
|
padding-top: 20px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boxCode {
|
||||||
|
margin-top: 10px;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
font-size: 33px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep.el-table .fixed-width .el-button--mini {
|
||||||
|
width: 60px !important;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,271 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||||
|
<el-form-item prop="time">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="queryParams.time"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
type="daterange"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
style="width: 240px"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="keyWord">
|
||||||
|
<el-input
|
||||||
|
maxlength="50"
|
||||||
|
v-model="queryParams.keyWord"
|
||||||
|
placeholder="请输入关键字"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="typeId">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.typeId"
|
||||||
|
placeholder="请选择物资名称"
|
||||||
|
style="width: 240px"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
@change="handleTypeNameChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in typeNameOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="typeModelId">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.typeModelId"
|
||||||
|
placeholder="请选择规格型号"
|
||||||
|
style="width: 240px"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in typeModelNameOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</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-table border :data="tableList" v-loading="loading" ref="multipleTable" row-key="qrId">
|
||||||
|
<el-table-column label="序号" align="center" type="index" width="70">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="审核提交时间" align="center" prop="createTime" show-overflow-tooltip/>
|
||||||
|
<el-table-column label="维修单号" align="center" prop="repairCode" show-overflow-tooltip/>
|
||||||
|
<el-table-column label="机具名称" align="center" prop="type" show-overflow-tooltip/>
|
||||||
|
<el-table-column label="规格型号" align="center" prop="typeName" show-overflow-tooltip/>
|
||||||
|
<el-table-column label="退料数量" align="center" prop="repairNum" show-overflow-tooltip/>
|
||||||
|
<el-table-column label="合格数量" align="center" prop="repairedNum" show-overflow-tooltip/>
|
||||||
|
<el-table-column label="报废数量" align="center" prop="scrapNum" show-overflow-tooltip/>
|
||||||
|
</el-table>
|
||||||
|
<pagination :total="total"
|
||||||
|
v-show="total > 0"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
|
import {getBackQueryList, getProjectList, getUnitList} from "@/api/back";
|
||||||
|
import {getDeviceType} from "@/api/ma/device";
|
||||||
|
import {getRepairAuditQueryList, getRepairQueryList} from "@/api/repair/repair";
|
||||||
|
import dict from "@/utils/dict";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Code',
|
||||||
|
dicts: ['qr_box_type'],
|
||||||
|
components: {Treeselect},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
total: 0, // 总条数
|
||||||
|
loading: false, // 遮罩层
|
||||||
|
showSearch: true, // 显示搜索条件
|
||||||
|
tableList: [], // 列表数据源
|
||||||
|
queryTime: [], // 日期数据源
|
||||||
|
selectList: [], // 列表选中数据
|
||||||
|
// 列表查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
bindStatus: '',
|
||||||
|
endTime: '',
|
||||||
|
keyWord: '',
|
||||||
|
startTime: '',
|
||||||
|
typeId:undefined,
|
||||||
|
typeModelId: undefined
|
||||||
|
},
|
||||||
|
unitList: [],
|
||||||
|
proList: [],
|
||||||
|
typeNameOptions:[],
|
||||||
|
typeModelNameOptions:[]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
const end = new Date()
|
||||||
|
let start = new Date()
|
||||||
|
start.setMonth(start.getMonth() - 1)
|
||||||
|
this.queryParams.time = [this.format(start), this.format(end)]
|
||||||
|
this.getList()
|
||||||
|
this.GetUnitData()
|
||||||
|
this.GetProData()
|
||||||
|
this.getDeviceType()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
dict,
|
||||||
|
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}`
|
||||||
|
},
|
||||||
|
unitChange(val){
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.GetProData()
|
||||||
|
},500)
|
||||||
|
},
|
||||||
|
// 获取 工程名称 列表数据
|
||||||
|
async GetProData() {
|
||||||
|
const params = {
|
||||||
|
unitId: this.queryParams.unitId,
|
||||||
|
}
|
||||||
|
const res = await getProjectList(params)
|
||||||
|
this.proList = res.data;
|
||||||
|
this.queryParams.proId=null
|
||||||
|
},
|
||||||
|
// 获取 来往单位 列表数据
|
||||||
|
async GetUnitData() {
|
||||||
|
const params = {
|
||||||
|
// projectId: this.queryParams.proId /* */,
|
||||||
|
}
|
||||||
|
const res = await getUnitList(params)
|
||||||
|
this.unitList = res.data
|
||||||
|
},
|
||||||
|
proChange(val){
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.GetUnitData()
|
||||||
|
},500)
|
||||||
|
},
|
||||||
|
async handleTypeNameChange(e){
|
||||||
|
this.queryParams.typeModelName=null
|
||||||
|
this.typeModelNameOptions=[]
|
||||||
|
getDeviceType({ level: 4, typeId:e }).then(response => {
|
||||||
|
let matNameRes = response.data
|
||||||
|
this.typeModelNameOptions = matNameRes.map((item) => {
|
||||||
|
return {
|
||||||
|
label: item.typeName,
|
||||||
|
value: item.typeId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getDeviceType() {
|
||||||
|
getDeviceType({ level: 3 }).then(response => {
|
||||||
|
let matNameRes = response.data
|
||||||
|
this.typeNameOptions = matNameRes.map((item) => {
|
||||||
|
return {
|
||||||
|
label: item.typeName,
|
||||||
|
value: item.typeId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
getDeviceType({ level: 4 }).then(response => {
|
||||||
|
let matModelRes = response.data
|
||||||
|
this.typeModelNameOptions = matModelRes.map((item) => {
|
||||||
|
return {
|
||||||
|
label: item.typeName,
|
||||||
|
value: item.typeId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取列表
|
||||||
|
async getList() {
|
||||||
|
this.loading = true
|
||||||
|
if (this.queryParams.time && this.queryParams.time.length > 0) {
|
||||||
|
this.queryParams.startTime = this.queryParams.time[0]
|
||||||
|
this.queryParams.endTime = this.queryParams.time[1]
|
||||||
|
}else{
|
||||||
|
this.queryParams.startTime=undefined
|
||||||
|
this.queryParams.endTime=undefined
|
||||||
|
}
|
||||||
|
const res = await getRepairAuditQueryList(this.queryParams)
|
||||||
|
this.tableList = res.data.rows
|
||||||
|
this.total = res.data.total
|
||||||
|
this.loading = false
|
||||||
|
},
|
||||||
|
// 搜索按钮
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
// 重置按钮
|
||||||
|
resetQuery() {
|
||||||
|
this.$refs.multipleTable.clearSelection();
|
||||||
|
this.queryTime = []
|
||||||
|
this.resetForm('queryForm')
|
||||||
|
this.queryParams.pageNum = 1
|
||||||
|
this.queryParams.endTime = ''
|
||||||
|
this.queryParams.pageSize = 10
|
||||||
|
this.queryParams.startTime = ''
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
/** 转换菜单数据结构 */
|
||||||
|
normalizer(node) {
|
||||||
|
if (node.children && !node.children.length) {
|
||||||
|
delete node.children;
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
id: node.id,
|
||||||
|
label: node.name,
|
||||||
|
children: node.children,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.uploadImg {
|
||||||
|
padding-top: 20px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boxCode {
|
||||||
|
margin-top: 10px;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
font-size: 33px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep.el-table .fixed-width .el-button--mini {
|
||||||
|
width: 60px !important;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,306 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||||
|
<el-form-item prop="time">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="queryParams.time"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
type="daterange"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
style="width: 240px"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="keyWord">
|
||||||
|
<el-input
|
||||||
|
maxlength="50"
|
||||||
|
v-model="queryParams.keyWord"
|
||||||
|
placeholder="请输入关键字"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="unitId">
|
||||||
|
<treeselect
|
||||||
|
v-model="queryParams.unitId"
|
||||||
|
:options="unitList" :normalizer="normalizer"
|
||||||
|
:show-count="true" style="width: 240px" :disable-branch-nodes="true"
|
||||||
|
noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果"
|
||||||
|
placeholder="请选择退料单位" @select="unitChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="proId">
|
||||||
|
<treeselect
|
||||||
|
v-model="queryParams.proId"
|
||||||
|
:options="proList" :normalizer="normalizer"
|
||||||
|
:show-count="true" style="width: 240px" :disable-branch-nodes="true"
|
||||||
|
noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果"
|
||||||
|
placeholder="请选择退料工程" @select="proChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="typeId">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.typeId"
|
||||||
|
placeholder="请选择物资名称"
|
||||||
|
style="width: 240px"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
@change="handleTypeNameChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in typeNameOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="typeModelId">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.typeModelId"
|
||||||
|
placeholder="请选择规格型号"
|
||||||
|
style="width: 240px"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in typeModelNameOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</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-table border :data="tableList" v-loading="loading" ref="multipleTable" row-key="qrId">
|
||||||
|
<el-table-column label="序号" align="center" type="index" width="70">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="维修时间" align="center" prop="repairTime" show-overflow-tooltip/>
|
||||||
|
<el-table-column label="维修单号" align="center" prop="repairCode" show-overflow-tooltip/>
|
||||||
|
<el-table-column label="退料单号" align="center" prop="backCode" show-overflow-tooltip/>
|
||||||
|
<el-table-column label="退料单位" align="center" prop="backUnit" show-overflow-tooltip/>
|
||||||
|
<el-table-column label="退料工程" align="center" prop="backPro" show-overflow-tooltip/>
|
||||||
|
<el-table-column label="机具名称" align="center" prop="type" show-overflow-tooltip/>
|
||||||
|
<el-table-column label="规格型号" align="center" prop="typeName" show-overflow-tooltip/>
|
||||||
|
<el-table-column label="单位" align="center" prop="unit" width="80" show-overflow-tooltip/>
|
||||||
|
<el-table-column
|
||||||
|
label="任务状态"
|
||||||
|
align="center"
|
||||||
|
prop="repairStatus"
|
||||||
|
width="100"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template v-slot="scope">
|
||||||
|
<span :style="{ color: scope.row.repairStatus === '维修完成' ? 'green' : 'orange' }">
|
||||||
|
{{ scope.row.repairStatus }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="报修数量" align="center" prop="repairNum" width="80" show-overflow-tooltip/>
|
||||||
|
<el-table-column label="已修数量" align="center" prop="repairedNum" width="80" show-overflow-tooltip/>
|
||||||
|
<el-table-column label="报废数量" align="center" prop="scrapNum" width="80" show-overflow-tooltip/>
|
||||||
|
</el-table>
|
||||||
|
<pagination :total="total"
|
||||||
|
v-show="total > 0"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
|
import {getBackQueryList, getProjectList, getUnitList} from "@/api/back";
|
||||||
|
import {getDeviceType} from "@/api/ma/device";
|
||||||
|
import {getRepairQueryList} from "@/api/repair/repair";
|
||||||
|
import dict from "@/utils/dict";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Code',
|
||||||
|
dicts: ['qr_box_type'],
|
||||||
|
components: {Treeselect},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
total: 0, // 总条数
|
||||||
|
loading: false, // 遮罩层
|
||||||
|
showSearch: true, // 显示搜索条件
|
||||||
|
tableList: [], // 列表数据源
|
||||||
|
queryTime: [], // 日期数据源
|
||||||
|
selectList: [], // 列表选中数据
|
||||||
|
// 列表查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
bindStatus: '',
|
||||||
|
endTime: '',
|
||||||
|
keyWord: '',
|
||||||
|
startTime: '',
|
||||||
|
typeId:undefined,
|
||||||
|
typeModelId: undefined
|
||||||
|
},
|
||||||
|
unitList: [],
|
||||||
|
proList: [],
|
||||||
|
typeNameOptions:[],
|
||||||
|
typeModelNameOptions:[]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
const end = new Date()
|
||||||
|
let start = new Date()
|
||||||
|
start.setMonth(start.getMonth() - 1)
|
||||||
|
this.queryParams.time = [this.format(start), this.format(end)]
|
||||||
|
this.getList()
|
||||||
|
this.GetUnitData()
|
||||||
|
this.GetProData()
|
||||||
|
this.getDeviceType()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
dict,
|
||||||
|
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}`
|
||||||
|
},
|
||||||
|
unitChange(val){
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.GetProData()
|
||||||
|
},500)
|
||||||
|
},
|
||||||
|
// 获取 工程名称 列表数据
|
||||||
|
async GetProData() {
|
||||||
|
const params = {
|
||||||
|
unitId: this.queryParams.unitId,
|
||||||
|
}
|
||||||
|
const res = await getProjectList(params)
|
||||||
|
this.proList = res.data;
|
||||||
|
this.queryParams.proId=null
|
||||||
|
},
|
||||||
|
// 获取 来往单位 列表数据
|
||||||
|
async GetUnitData() {
|
||||||
|
const params = {
|
||||||
|
// projectId: this.queryParams.proId /* */,
|
||||||
|
}
|
||||||
|
const res = await getUnitList(params)
|
||||||
|
this.unitList = res.data
|
||||||
|
},
|
||||||
|
proChange(val){
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.GetUnitData()
|
||||||
|
},500)
|
||||||
|
},
|
||||||
|
async handleTypeNameChange(e){
|
||||||
|
this.queryParams.typeModelName=null
|
||||||
|
this.typeModelNameOptions=[]
|
||||||
|
getDeviceType({ level: 4, typeId:e }).then(response => {
|
||||||
|
let matNameRes = response.data
|
||||||
|
this.typeModelNameOptions = matNameRes.map((item) => {
|
||||||
|
return {
|
||||||
|
label: item.typeName,
|
||||||
|
value: item.typeId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getDeviceType() {
|
||||||
|
getDeviceType({ level: 3 }).then(response => {
|
||||||
|
let matNameRes = response.data
|
||||||
|
this.typeNameOptions = matNameRes.map((item) => {
|
||||||
|
return {
|
||||||
|
label: item.typeName,
|
||||||
|
value: item.typeId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
getDeviceType({ level: 4 }).then(response => {
|
||||||
|
let matModelRes = response.data
|
||||||
|
this.typeModelNameOptions = matModelRes.map((item) => {
|
||||||
|
return {
|
||||||
|
label: item.typeName,
|
||||||
|
value: item.typeId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取列表
|
||||||
|
async getList() {
|
||||||
|
this.loading = true
|
||||||
|
if (this.queryParams.time && this.queryParams.time.length > 0) {
|
||||||
|
this.queryParams.startTime = this.queryParams.time[0]
|
||||||
|
this.queryParams.endTime = this.queryParams.time[1]
|
||||||
|
}else{
|
||||||
|
this.queryParams.startTime=undefined
|
||||||
|
this.queryParams.endTime=undefined
|
||||||
|
}
|
||||||
|
const res = await getRepairQueryList(this.queryParams)
|
||||||
|
this.tableList = res.data.rows
|
||||||
|
this.total = res.data.total
|
||||||
|
this.loading = false
|
||||||
|
},
|
||||||
|
// 搜索按钮
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
// 重置按钮
|
||||||
|
resetQuery() {
|
||||||
|
this.$refs.multipleTable.clearSelection();
|
||||||
|
this.queryTime = []
|
||||||
|
this.resetForm('queryForm')
|
||||||
|
this.queryParams.pageNum = 1
|
||||||
|
this.queryParams.endTime = ''
|
||||||
|
this.queryParams.pageSize = 10
|
||||||
|
this.queryParams.startTime = ''
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
/** 转换菜单数据结构 */
|
||||||
|
normalizer(node) {
|
||||||
|
if (node.children && !node.children.length) {
|
||||||
|
delete node.children;
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
id: node.id,
|
||||||
|
label: node.name,
|
||||||
|
children: node.children,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.uploadImg {
|
||||||
|
padding-top: 20px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boxCode {
|
||||||
|
margin-top: 10px;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
font-size: 33px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep.el-table .fixed-width .el-button--mini {
|
||||||
|
width: 60px !important;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -105,7 +105,7 @@
|
||||||
|
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="tableList" ref="multipleTable" row-key="id" @selection-change="handleSelectionChange" border>
|
<el-table v-loading="loading" :data="tableList" ref="multipleTable" row-key="id" @selection-change="handleSelectionChange" border>
|
||||||
<el-table-column type="selection" width="55"></el-table-column>
|
<el-table-column type="selection" width="45"></el-table-column>
|
||||||
<el-table-column label="序号" align="center" width="70" type="index">
|
<el-table-column label="序号" align="center" width="70" type="index">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
||||||
|
|
@ -197,7 +197,7 @@
|
||||||
>查看</span>
|
>查看</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="140">
|
<el-table-column label="操作" align="center" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="primary" @click="handleDownload(scope.row)">下载</el-button>
|
<el-button size="mini" type="primary" @click="handleDownload(scope.row)">下载</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@
|
||||||
placeholder="请选择物资类型"
|
placeholder="请选择物资类型"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
clearable
|
clearable
|
||||||
|
filterable
|
||||||
@change="handleMaterialTypeChange"
|
@change="handleMaterialTypeChange"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
|
|
@ -57,6 +58,7 @@
|
||||||
placeholder="请选择物资名称"
|
placeholder="请选择物资名称"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
clearable
|
clearable
|
||||||
|
filterable
|
||||||
@change="handleTypeNameChange"
|
@change="handleTypeNameChange"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
|
|
@ -81,6 +83,7 @@
|
||||||
placeholder="请选择规格型号"
|
placeholder="请选择规格型号"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
clearable
|
clearable
|
||||||
|
filterable
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in typeModelNameOptions"
|
v-for="item in typeModelNameOptions"
|
||||||
|
|
@ -1001,11 +1004,17 @@ export default {
|
||||||
};
|
};
|
||||||
|
|
||||||
const currentTime = formatTime(new Date());
|
const currentTime = formatTime(new Date());
|
||||||
|
let param = {
|
||||||
|
keyWord: this.queryParams.keyWord,
|
||||||
|
typeNameId: this.queryParams.typeName,
|
||||||
|
typeModelNameId: this.queryParams.typeModelName,
|
||||||
|
constructionTypes:this.queryParams.lineTypes,
|
||||||
|
materialTypeId:this.queryParams.materialType,
|
||||||
|
jiJuType:this.queryParams.jiJuType
|
||||||
|
}
|
||||||
this.download(
|
this.download(
|
||||||
'material/complex_query/exportRetainedEquipmentList',
|
'material/complex_query/exportRetainedEquipmentList',
|
||||||
{
|
param,
|
||||||
...this.queryParams,
|
|
||||||
},
|
|
||||||
`综合查询_保有设备总量_${currentTime}.xlsx`,
|
`综合查询_保有设备总量_${currentTime}.xlsx`,
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue