综合查询一级列表查询

This commit is contained in:
zzyuan 2024-12-20 18:33:52 +08:00
parent 2d38ccd56d
commit 59e3711a8b
4 changed files with 138 additions and 74 deletions

View File

@ -1,5 +1,22 @@
import request from '@/utils/request'
// 保有设备总量查询
export function getRetainedEquipmentListApi(query) {
return request({
url: '/material/complex_query/getRetainedEquipmentList',
method: 'get',
params: query
})
}
// 保有设备总量查询-无分页
export function getRetainedEquipmentListNoPageApi(query) {
return request({
url: '/material/complex_query/getRetainedEquipmentListNoPage',
method: 'get',
params: query
})
}
// 查询工程机具使用列表
export function getProjUsingRecordListApi(query) {
return request({
@ -28,6 +45,23 @@ export function getMachineHistoryRecordListApi(query) {
}
// 入库记录列表
export function getInputRecordListApi(query) {
return request({
url: '/material/complex_query/getInputRecordList',
method: 'get',
params: query
})
}
// 出库记录列表
export function getOutRecordListApi(query) {
return request({
url: '/material/complex_query/getOutRecordList',
method: 'get',
params: query
})
}

View File

@ -9,7 +9,7 @@
end-placeholder="结束日期"
type="daterange"
value-format="yyyy-MM-dd"
style="width: 240px"
style="width: 220px"
></el-date-picker>
</el-form-item>
<el-form-item label="关键字" prop="keyWord">
@ -17,7 +17,7 @@
v-model="queryParams.keyWord"
placeholder="请输入关键字"
clearable :maxlength="20"
style="width: 240px"
style="width: 220px"
/>
</el-form-item>
<el-form-item label="物资名称" prop="typeName">
@ -25,7 +25,7 @@
v-model="queryParams.typeName"
placeholder="请输入物资名称"
clearable :maxlength="20"
style="width: 240px"
style="width: 220px"
/>
</el-form-item>
<el-form-item label="规格型号" prop="typeModelName">
@ -33,24 +33,24 @@
v-model="queryParams.typeModelName"
placeholder="请输入规格型号"
clearable :maxlength="20"
style="width: 240px"
style="width: 220px"
/>
</el-form-item>
<el-form-item label="入库类型" prop="">
<!-- <el-select
v-model="queryParams.isSlt"
<el-form-item label="入库类型" prop="inputType">
<el-select
v-model="queryParams.inputType"
filterable clearable
style="width: 240px"
style="width: 220px"
placeholder="请选择"
>
<el-option
v-for="item in sltList"
v-for="item in inputTypeList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select> -->
</el-select>
</el-form-item>
<el-form-item>
@ -89,11 +89,11 @@
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true"/>
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true"/>
<el-table-column label="计量单位" align="center" prop="unit" :show-overflow-tooltip="true"/>
<el-table-column label="入库人员" align="center" prop="" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="入库时间" align="center" prop="" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="入库单号" align="center" prop="" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="入库类型" align="center" prop="" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="入库方式" align="center" prop="" :show-overflow-tooltip="true"/>
<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>
<el-table-column label="入库单号" align="center" prop="inputCode" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="入库类型" align="center" prop="inputType" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="入库方式" align="center" prop="inputStyle" :show-overflow-tooltip="true"/>
</el-table>
<pagination
v-show="total > 0"
@ -108,7 +108,7 @@
<script>
import {
getMachineHistoryRecordListApi
getInputRecordListApi
} from '@/api/stquery/stquery';
export default {
name: '',
@ -127,7 +127,7 @@ export default {
multiple: true,
//
showSearch: true,
sltList:[{id:'0',name:'未结算'},{id:'1',name:'已结算'}],
inputTypeList:[{id:'新购入库',name:'新购入库'},{id:'修试后入库',name:'修试后入库'},{id:'盘点入库',name:'盘点入库'}],
//
total: 0,
//
@ -155,13 +155,13 @@ export default {
unitId: this.queryParams.unitId,
proId: this.queryParams.proId,
keyWord: this.queryParams.keyWord,
isSlt: this.queryParams.isSlt,
inputType: this.queryParams.inputType,
startTime: this.queryParams.time && this.queryParams.time[0],
endTime: this.queryParams.time && this.queryParams.time[1],
pageSize: this.queryParams.pageSize,
pageNum: this.queryParams.pageNum
}
const res = await getMachineHistoryRecordListApi(params)
const res = await getInputRecordListApi(params)
this.loading = false
if(res.data.rows.length>0){
this.tableList = res.data.rows;
@ -193,11 +193,11 @@ export default {
/** 导出按钮操作 */
handleExport() {
this.download(
'material/complex_query/exportProjUsingRecord',
'material/complex_query/exportInputRecord',
{
...this.queryParams,
},
`综合查询_工程机具使用_${new Date().getTime()}.xlsx`,
`综合查询_入库记录_${new Date().getTime()}.xlsx`,
)
},

View File

@ -9,7 +9,7 @@
end-placeholder="结束日期"
type="daterange"
value-format="yyyy-MM-dd"
style="width: 240px"
style="width: 200px"
></el-date-picker>
</el-form-item>
<!-- <el-form-item label="关键字" prop="keyWord">
@ -17,7 +17,7 @@
v-model="queryParams.keyWord"
placeholder="请输入关键字"
clearable :maxlength="20"
style="width: 240px"
style="width: 200px"
/>
</el-form-item> -->
<el-form-item label="往来单位" prop="unitId">
@ -48,7 +48,7 @@
v-model="queryParams.typeName"
placeholder="请输入物资名称"
clearable :maxlength="20"
style="width: 240px"
style="width: 200px"
/>
</el-form-item>
<el-form-item label="规格型号" prop="typeModelName">
@ -56,24 +56,24 @@
v-model="queryParams.typeModelName"
placeholder="请输入规格型号"
clearable :maxlength="20"
style="width: 240px"
style="width: 200px"
/>
</el-form-item>
<el-form-item label="出库方式" prop="">
<!-- <el-select
v-model="queryParams.isSlt"
<el-form-item label="出库方式" prop="outStyle">
<el-select
v-model="queryParams.outStyle"
filterable clearable
style="width: 240px"
style="width: 200px"
placeholder="请选择"
>
<el-option
v-for="item in sltList"
v-for="item in outStyleList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select> -->
</el-select>
</el-form-item>
<el-form-item>
@ -114,11 +114,11 @@
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true"/>
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true"/>
<el-table-column label="计量单位" align="center" prop="unit" :show-overflow-tooltip="true"/>
<el-table-column label="出库数量" align="center" prop="" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="出库人员" align="center" prop="" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="出库时间" align="center" prop="" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="领料单号" align="center" prop="" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="出库方式" align="center" prop="" :show-overflow-tooltip="true"/>
<el-table-column label="出库数量" align="center" prop="outNum" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="出库人员" align="center" prop="outUser" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="出库时间" align="center" prop="outTime" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="领料单号" align="center" prop="leaseCode" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="出库方式" align="center" prop="outStyle" :show-overflow-tooltip="true"/>
</el-table>
<pagination
v-show="total > 0"
@ -133,7 +133,7 @@
<script>
import {
getMachineHistoryRecordListApi
getOutRecordListApi
} from '@/api/stquery/stquery';
import {
getProjectList,
@ -167,7 +167,7 @@ export default {
projectId: null,
unitList: [],
proList: [],
sltList:[{id:'0',name:'未结算'},{id:'1',name:'已结算'}],
outStyleList:[{id:'标准箱',name:'标准箱'},{id:'编码',name:'编码'},{id:'二维码',name:'二维码'},{id:'数量',name:'数量'}],
//
total: 0,
//
@ -230,13 +230,13 @@ export default {
unitId: this.queryParams.unitId,
proId: this.queryParams.proId,
keyWord: this.queryParams.keyWord,
isSlt: this.queryParams.isSlt,
outStyle: this.queryParams.outStyle,
startTime: this.queryParams.time && this.queryParams.time[0],
endTime: this.queryParams.time && this.queryParams.time[1],
pageSize: this.queryParams.pageSize,
pageNum: this.queryParams.pageNum
}
const res = await getMachineHistoryRecordListApi(params)
const res = await getOutRecordListApi(params)
this.loading = false
if(res.data.rows.length>0){
this.tableList = res.data.rows;
@ -268,11 +268,11 @@ export default {
/** 导出按钮操作 */
handleExport() {
this.download(
'material/complex_query/exportProjUsingRecord',
'material/complex_query/exportOutRecord',
{
...this.queryParams,
},
`综合查询_工程机具使用_${new Date().getTime()}.xlsx`,
`综合查询_出库记录_${new Date().getTime()}.xlsx`,
)
},

View File

@ -54,19 +54,19 @@
</el-form>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
<el-table v-loading="loading" :data="tableList" :span-method="objectSpanMethod">
<!-- houseName type typeName typeModelName unitName storeNum manageType useNum repairNum inputNum repairInputNum allNum-->
<!-- houseName type typeName typeModelName unitName storeNum manageType usNum repairNum inputNum repairInputNum allNum-->
<el-table-column label="序号" align="center" width="80" type="index">
<template scope="scope">
<span v-if="scope.$index==0">合计</span>
<span v-else>{{ (queryParams.pageNum - 1) * 10 + scope.$index }}</span>
</template>
</el-table-column>
<el-table-column label="仓库信息" align="center" prop="houseName" :show-overflow-tooltip="true"/>
<el-table-column label="施工类型" align="center" prop="" :show-overflow-tooltip="true"/>
<el-table-column label="物资类型" align="center" prop="type" :show-overflow-tooltip="true"/>
<el-table-column label="仓库信息" align="center" prop="whHouseName" :show-overflow-tooltip="true"/>
<el-table-column label="施工类型" align="center" prop="constructionType" :show-overflow-tooltip="true"/>
<el-table-column label="物资类型" align="center" prop="materialType" :show-overflow-tooltip="true"/>
<el-table-column label="物资名称" align="center" prop="typeName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true"/>
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true"/>
<el-table-column label="计量单位" align="center" prop="unit" :show-overflow-tooltip="true"/>
<el-table-column label="在库数量" align="center" prop="storeNum" :show-overflow-tooltip="true">
<template slot-scope="scope">
<!-- manageType '编码' 使用可点击的 span -->
@ -79,14 +79,14 @@
</span>
</template>
</el-table-column>
<el-table-column label="在用数量" align="center" prop="useNum" :show-overflow-tooltip="true">
<el-table-column label="在用数量" align="center" prop="usNum" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.manageType === '编码'" class="clickText" @click="openUserRecords(scope.row)">
{{ scope.row.useNum }}
{{ scope.row.usNum }}
</span>
<!-- 否则直接显示数字 -->
<span v-else>
{{ scope.row.useNum }}
{{ scope.row.usNum }}
</span>
</template>
</el-table-column>
@ -127,11 +127,11 @@
</el-table-column>
<el-table-column label="总保有量" align="center" prop="allNum" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="总保有量资产(万元)" align="center" prop="allCost" :show-overflow-tooltip="true" />
<el-table-column label="总保有量资产(万元)" align="center" prop="totalPrice" :show-overflow-tooltip="true" />
<el-table-column label="成新率" align="center" prop="" :show-overflow-tooltip="true">
<el-table-column label="五年以内" align="center" prop="newRate1" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="五年至十年" align="center" prop="newRate2" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="十年以上" align="center" prop="newRate3" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="五年以内" align="center" prop="fiveReplacementRate" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="五年至十年" align="center" prop="tenReplacementRate" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="十年以上" align="center" prop="tenPlusReplacementRate" :show-overflow-tooltip="true"></el-table-column>
</el-table-column>
@ -371,7 +371,9 @@
// getUserRecords,getAllRecords,
// } from '@/api/stquery/deviceStatusRecord'
// import {getRecords} from "@/api/claimAndRefund/secondStore";
import {
getRetainedEquipmentListApi, getRetainedEquipmentListNoPageApi
} from '@/api/stquery/stquery';
export default {
name: '',
dicts: [],
@ -457,18 +459,46 @@ export default {
},
methods: {
//
async getList() {
// this.loading = true
// const res = await statusList(this.queryParams)
// this.loading = false
// this.tableList = res.data.rows
// this.total = res.data.total
this.tableList = [
{storeNum:9,useNum:19,repairNum:29,inputNum:39,repairInputNum:19,allNum:99,allCost:999,newRate1:"95%",newRate2:"80%",newRate3:"10%"},
{houseName:'机具', type:'张力架线设备', typeName:'牵引机', typeModelName:'SA-QY-80', unitName:'台', storeNum:5,manageType:'编码',useNum:10,repairNum:20,inputNum:20,repairInputNum:20,allNum:75,allCost:750,newRate1:"95%",newRate2:"80%",newRate3:"10%"},
{houseName:'机具', type:'连接器类', typeName:'卸扣', typeModelName:'DG-50', unitName:'只', storeNum:5,manageType:'数量',useNum:100,repairNum:20,inputNum:20,repairInputNum:20,allNum:165,allCost:1650,newRate1:"95%",newRate2:"80%",newRate3:"10%"},
]
this.total = 2
async getList() {
this.loading = true
const params = {
keyWord: this.queryParams.keyWord,
typeName: this.queryParams.typeName,
typeModelName: this.queryParams.typeModelName,
pageSize: this.queryParams.pageSize,
pageNum: this.queryParams.pageNum
}
const res = await getRetainedEquipmentListApi(params)
if(res.data.rows.length>0){
this.tableList = res.data.rows;
}else{
this.tableList=[]
}
this.total = res.data.total;
console.log(this.tableList)
let param = {
keyWord: this.queryParams.keyWord,
typeName: this.queryParams.typeName,
typeModelName: this.queryParams.typeModelName,
}
const response = await getRetainedEquipmentListNoPageApi(param)
let obj = {
// storeNum manageType usNum repairNum inputNum repairInputNum allNum
storeNum: response.data.storeNum||0,
usNum: response.data.usNum||0,
repairNum: response.data.repairNum||0,
inputNum: response.data.inputNum||0,
repairInputNum: response.data.repairInputNum||0,
allNum: response.data.allNum||0,
totalPrice: response.data.totalPrice||0,
fiveReplacementRate: response.data.fiveReplacementRate||0,
tenReplacementRate: response.data.tenReplacementRate||0,
tenPlusReplacementRate: response.data.tenPlusReplacementRate||0,
manageType:response.data.manageType||"",
}
this.tableList.unshift(obj)
console.log(this.tableList)
this.loading = false
},
indexContinuationForTable(num, size) {
let number = (num - 1) * size
@ -510,13 +540,13 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
// this.download(
// 'material/storageStatus/export',
// {
// ...this.queryParams,
// },
// `__${new Date().getTime()}.xlsx`,
// )
this.download(
'material/complex_query/exportRetainedEquipmentList',
{
...this.queryParams,
},
`综合查询_保有设备总量_${new Date().getTime()}.xlsx`,
)
},
// ------------------
//