综合查询前端页面绘制
This commit is contained in:
parent
b128c9e416
commit
1fa605c876
|
|
@ -0,0 +1,74 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询工程机具使用列表
|
||||
export function getProjUsingRecordListApi(query) {
|
||||
return request({
|
||||
url: '/material/complex_query/getProjUsingRecordList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 查询工程机具使用列表-无分页
|
||||
export function getProjUsingRecordListNoPage(query) {
|
||||
return request({
|
||||
url: '/material/complex_query/getProjUsingRecordListNoPage',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 设备使用追溯查询列表
|
||||
export function getMachineHistoryRecordListApi(query) {
|
||||
return request({
|
||||
url: '/material/complex_query/getMachineHistoryRecordList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ $base-sub-menu-background:#000c17;
|
|||
$base-sub-menu-hover:#001528;
|
||||
*/
|
||||
|
||||
$base-sidebar-width: 200px;
|
||||
$base-sidebar-width: 240px;
|
||||
|
||||
// the :export directive is the magic sauce for webpack
|
||||
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import './assets/icons' // icon
|
|||
import './permission' // permission control
|
||||
import { getDicts } from '@/api/system/dict/data'
|
||||
import { getConfigKey } from '@/api/system/config'
|
||||
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from '@/utils/bonus'
|
||||
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree,indexContinuation } from '@/utils/bonus'
|
||||
// 分页组件
|
||||
import Pagination from '@/components/Pagination'
|
||||
// 自定义表格工具组件
|
||||
|
|
@ -50,6 +50,7 @@ Vue.prototype.selectDictLabels = selectDictLabels
|
|||
Vue.prototype.download = download
|
||||
Vue.prototype.downloadJson = downloadJson
|
||||
Vue.prototype.handleTree = handleTree
|
||||
Vue.prototype.indexContinuation = indexContinuation
|
||||
Vue.prototype.globalUrl = global_
|
||||
// 全局组件挂载
|
||||
Vue.component('DictTag', DictTag)
|
||||
|
|
|
|||
|
|
@ -232,3 +232,8 @@ export function tansParams(params) {
|
|||
export function blobValidate(data) {
|
||||
return data.type !== 'application/json'
|
||||
}
|
||||
|
||||
// 处理表格索引延续问题
|
||||
export function indexContinuation(num, size) {
|
||||
return (num - 1) * size + 1
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,216 @@
|
|||
<template>
|
||||
<div class="app-container" id="">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
|
||||
<el-form-item label="时间范围" 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 label="关键字" prop="keyWord">
|
||||
<el-input
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable :maxlength="20"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物资名称" prop="typeName">
|
||||
<el-input
|
||||
v-model="queryParams.typeName"
|
||||
placeholder="请输入物资名称"
|
||||
clearable :maxlength="20"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格型号" prop="typeModelName">
|
||||
<el-input
|
||||
v-model="queryParams.typeModelName"
|
||||
placeholder="请输入规格型号"
|
||||
clearable :maxlength="20"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入库类型" prop="">
|
||||
<!-- <el-select
|
||||
v-model="queryParams.isSlt"
|
||||
filterable clearable
|
||||
style="width: 240px"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in sltList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</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-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
<el-table v-loading="loading" :data="tableList" border>
|
||||
<el-table-column label="序号" align="center" width="80" type="index">
|
||||
<template scope="scope">
|
||||
<span>{{ (queryParams.pageNum - 1) * 10 + scope.$index+1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<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="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>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:page-sizes="[5, 10, 15, 20, 30]"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getMachineHistoryRecordListApi
|
||||
} from '@/api/stquery/stquery';
|
||||
export default {
|
||||
name: '',
|
||||
dicts: [],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 弹出层标题
|
||||
title: '查看',
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
sltList:[{id:'0',name:'未结算'},{id:'1',name:'已结算'}],
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 主表格数据
|
||||
tableList: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
time: null,
|
||||
keyWord: null,
|
||||
typeName: null, //物资名称
|
||||
typeModelName: null, //物资名称
|
||||
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 获取列表
|
||||
async getList() {
|
||||
this.loading = true
|
||||
const params = {
|
||||
unitId: this.queryParams.unitId,
|
||||
proId: this.queryParams.proId,
|
||||
keyWord: this.queryParams.keyWord,
|
||||
isSlt: this.queryParams.isSlt,
|
||||
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)
|
||||
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:''
|
||||
// }
|
||||
// this.tableList.unshift(obj)
|
||||
}else{
|
||||
this.tableList=[]
|
||||
}
|
||||
this.total = res.data.total;
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams.time=[]
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
'material/complex_query/exportProjUsingRecord',
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`综合查询_工程机具使用_${new Date().getTime()}.xlsx`,
|
||||
)
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
</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>
|
||||
|
|
@ -0,0 +1,291 @@
|
|||
<template>
|
||||
<div class="app-container" id="">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
|
||||
<el-form-item label="时间范围" 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 label="关键字" prop="keyWord">
|
||||
<el-input
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable :maxlength="20"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="往来单位" prop="unitId">
|
||||
<el-cascader v-model="unitId"
|
||||
:show-all-levels="false"
|
||||
:options="unitList"
|
||||
:props="selectTreeProps"
|
||||
filterable
|
||||
clearable
|
||||
collapse-tags
|
||||
@change="unitChange"
|
||||
placeholder="请选择往来单位"
|
||||
></el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="工程名称" prop="proId">
|
||||
<el-cascader v-model="projectId"
|
||||
:show-all-levels="false"
|
||||
:options="proList"
|
||||
:props="selectTreeProps"
|
||||
filterable clearable
|
||||
collapse-tags
|
||||
@change="proChange"
|
||||
placeholder="请选择工程名称"
|
||||
></el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="物资名称" prop="typeName">
|
||||
<el-input
|
||||
v-model="queryParams.typeName"
|
||||
placeholder="请输入物资名称"
|
||||
clearable :maxlength="20"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格型号" prop="typeModelName">
|
||||
<el-input
|
||||
v-model="queryParams.typeModelName"
|
||||
placeholder="请输入规格型号"
|
||||
clearable :maxlength="20"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库方式" prop="">
|
||||
<!-- <el-select
|
||||
v-model="queryParams.isSlt"
|
||||
filterable clearable
|
||||
style="width: 240px"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in sltList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</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-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
<el-table v-loading="loading" :data="tableList" border>
|
||||
<el-table-column label="序号" align="center" width="80" type="index">
|
||||
<template scope="scope">
|
||||
<span>{{ (queryParams.pageNum - 1) * 10 + scope.$index+1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工程名称" align="center" prop="proName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="往来单位" align="center" prop="unitName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="协议号" align="center" prop="agreementCode" :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="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>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:page-sizes="[5, 10, 15, 20, 30]"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getMachineHistoryRecordListApi
|
||||
} from '@/api/stquery/stquery';
|
||||
import {
|
||||
getProjectList,
|
||||
getUnitList,
|
||||
} from '@/api/back/index.js'
|
||||
export default {
|
||||
name: '',
|
||||
dicts: [],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 弹出层标题
|
||||
title: '查看',
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
selectTreeProps: {
|
||||
children: 'children',
|
||||
label: 'name',
|
||||
// multiple: false,
|
||||
value: 'id',
|
||||
// multiple: true,
|
||||
},
|
||||
unitId: null,
|
||||
projectId: null,
|
||||
unitList: [],
|
||||
proList: [],
|
||||
sltList:[{id:'0',name:'未结算'},{id:'1',name:'已结算'}],
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 主表格数据
|
||||
tableList: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
time: null,
|
||||
keyWord: null,
|
||||
typeName: null, //物资名称
|
||||
typeModelName: null //
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initSelectData()
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
initSelectData() {
|
||||
this.GetUnitData()
|
||||
this.GetProData()
|
||||
},
|
||||
// 获取 来往单位 列表数据
|
||||
async GetUnitData() {
|
||||
const params = {
|
||||
projectId: this.queryParams.proId /* */,
|
||||
}
|
||||
const res = await getUnitList(params)
|
||||
this.unitList = res.data
|
||||
},
|
||||
unitChange(val){
|
||||
if(val&&val.length>0){
|
||||
this.queryParams.unitId=this.unitId[this.unitId.length - 1]
|
||||
}else if(val&&val.length==0){
|
||||
this.queryParams.unitId=""
|
||||
}
|
||||
this.GetProData()
|
||||
},
|
||||
// 获取 工程名称 列表数据
|
||||
async GetProData() {
|
||||
const params = { unitId: this.queryParams.unitId}
|
||||
const res = await getProjectList(params)
|
||||
this.proList = res.data
|
||||
},
|
||||
proChange(val){
|
||||
if(val&&val.length>0){
|
||||
this.queryParams.proId=this.projectId[this.projectId.length - 1]
|
||||
}else if(val&&val.length==0){
|
||||
this.queryParams.proId=""
|
||||
}
|
||||
this.GetUnitData()
|
||||
},
|
||||
|
||||
// 获取列表
|
||||
async getList() {
|
||||
this.loading = true
|
||||
const params = {
|
||||
unitId: this.queryParams.unitId,
|
||||
proId: this.queryParams.proId,
|
||||
keyWord: this.queryParams.keyWord,
|
||||
isSlt: this.queryParams.isSlt,
|
||||
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)
|
||||
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:''
|
||||
// }
|
||||
// this.tableList.unshift(obj)
|
||||
}else{
|
||||
this.tableList=[]
|
||||
}
|
||||
this.total = res.data.total;
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams.time=[]
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
'material/complex_query/exportProjUsingRecord',
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`综合查询_工程机具使用_${new Date().getTime()}.xlsx`,
|
||||
)
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
</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>
|
||||
|
|
@ -0,0 +1,636 @@
|
|||
<template>
|
||||
<div class="app-container" id="">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-input
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable :maxlength="20"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物资名称" prop="typeName">
|
||||
<el-input
|
||||
v-model="queryParams.typeName"
|
||||
placeholder="请输入物资名称"
|
||||
clearable :maxlength="20"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格型号" prop="typeModelName">
|
||||
<el-input
|
||||
v-model="queryParams.typeModelName"
|
||||
placeholder="请输入规格型号"
|
||||
clearable :maxlength="20"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</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
|
||||
>
|
||||
<!-- <span style="margin-left: 20px; color: red"
|
||||
>保有量=在库+在用+在修+修试后待入库</span
|
||||
> -->
|
||||
</el-form-item>
|
||||
</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-->
|
||||
<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="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="storeNum" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<!-- 当 manageType 为 '编码' 时,使用可点击的 span -->
|
||||
<span v-if="scope.row.manageType === '编码'" class="clickText" @click="openRecords(scope.row)">
|
||||
|
||||
</span>
|
||||
<!-- 否则,直接显示数字 -->
|
||||
<span v-else>
|
||||
{{ scope.row.storeNum }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="在用数量" align="center" prop="useNum" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.manageType === '编码'" class="clickText" @click="openUserRecords(scope.row)">
|
||||
{{ scope.row.useNum }}
|
||||
</span>
|
||||
<!-- 否则,直接显示数字 -->
|
||||
<span v-else>
|
||||
{{ scope.row.useNum }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="在修数量" align="center" prop="repairNum" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.manageType === '编码'" class="clickText" @click="openRepairRecords(scope.row)">
|
||||
{{ scope.row.repairNum }}
|
||||
</span>
|
||||
<!-- 否则,直接显示数字 -->
|
||||
<span v-else>
|
||||
{{ scope.row.repairNum }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="新购待入库" align="center" prop="inputNum" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.manageType === '编码'" class="clickText" @click="openPurchaseRecords(scope.row)">
|
||||
{{ scope.row.inputNum }}
|
||||
</span>
|
||||
<!-- 否则,直接显示数字 -->
|
||||
<span v-else>
|
||||
{{ scope.row.inputNum }}
|
||||
</span>
|
||||
<!-- <span class="clickText" @click="openPurchaseRecords(scope.row)">{{ scope.row.inputNum }}</span> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="修试后待入库" align="center" prop="repairInputNum" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.manageType === '编码'" class="clickText" @click="openTestedRecords(scope.row)">
|
||||
{{ scope.row.repairInputNum }}
|
||||
</span>
|
||||
<!-- 否则,直接显示数字 -->
|
||||
<span v-else>
|
||||
{{ scope.row.repairInputNum }}
|
||||
</span>
|
||||
<!-- <span class="clickText" @click="openTestedRecords(scope.row)">{{ scope.row.repairInputNum }}</span> -->
|
||||
</template>
|
||||
</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="" :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>
|
||||
|
||||
|
||||
|
||||
<el-table-column label="管理模式" align="center" prop="manageType" :show-overflow-tooltip="true"/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:page-sizes="[5, 10, 15, 20, 30]"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 在库编码设备弹窗-->
|
||||
<el-dialog :title="title" :visible.sync="openRecord" width="1200px" append-to-body>
|
||||
<el-form :model="dialogQuery" ref="dialogQuery" size="small" :inline="true" label-width="80px">
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-input
|
||||
v-model="dialogQuery.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable :maxlength="30"
|
||||
style="width: 240px"/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary"
|
||||
icon="el-icon-search" size="mini"
|
||||
@click="handleDialogQuery"
|
||||
>查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="dialogList">
|
||||
<el-table-column label="序号" align="center" width="80" type="index" :index="indexContinuation(dialogQuery.pageNum, dialogQuery.pageSize)">
|
||||
</el-table-column>
|
||||
<el-table-column label="机具名称" align="center" prop="typeName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="规格型号" align="center" prop="modelName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="原值(元)" align="center" prop="modelName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="库管员" align="center" prop="maCode" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="操作人" align="center" prop="maCode" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="入库时间" align="center" prop="maCode" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="入库方式" align="center" prop="maCode" :show-overflow-tooltip="true"/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="dialogTotal > 0"
|
||||
:total="dialogTotal"
|
||||
:page.sync="dialogQuery.pageNum"
|
||||
:limit.sync="dialogQuery.pageSize"
|
||||
@pagination="getStoreCodeList"
|
||||
/>
|
||||
</el-dialog>
|
||||
<!-- 在用编码设备弹窗-->
|
||||
<el-dialog :title="title" :visible.sync="openUseRecord" width="1200px" append-to-body>
|
||||
<el-form :model="dialogUseQuery" ref="dialogUseQuery" size="small" :inline="true" label-width="80px">
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-input
|
||||
v-model="dialogUseQuery.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable :maxlength="20"
|
||||
style="width: 240px"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleDialogUseQuery"
|
||||
>查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="useRecordList">
|
||||
<el-table-column label="序号" align="center" width="80" type="index"
|
||||
:index="indexContinuation(dialogUseQuery.pageNum, dialogUseQuery.pageSize)">
|
||||
</el-table-column>
|
||||
<el-table-column label="机具名称" align="center" prop="typeName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="规格型号" align="center" prop="modelName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="原值(元)" align="center" prop="modelName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="库管员" align="center" prop="" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="操作人" align="center" prop="" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="出库时间" align="center" prop="" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="领料单号" align="center" prop="" :show-overflow-tooltip="true"/>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="dialogUserTotal > 0"
|
||||
:total="dialogUserTotal"
|
||||
:page.sync="dialogUseQuery.pageNum"
|
||||
:limit.sync="dialogUseQuery.pageSize"
|
||||
@pagination="getUserRecords"
|
||||
/>
|
||||
</el-dialog>
|
||||
<!-- 在修编码设备弹窗-->
|
||||
<el-dialog :title="title" :visible.sync="openRepairRecord" width="1200px" append-to-body>
|
||||
<el-form :model="dialogRepairQuery" ref="dialogRepairQuery" size="small" :inline="true" label-width="80px">
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-input
|
||||
v-model="dialogRepairQuery.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable :maxlength="20"
|
||||
style="width: 240px"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleDialogRepairQuery"
|
||||
>查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="repairRecordList">
|
||||
<el-table-column label="序号" align="center" width="80" type="index"
|
||||
:index="indexContinuation(dialogRepairQuery.pageNum, dialogRepairQuery.pageSize)">
|
||||
</el-table-column>
|
||||
<el-table-column label="机具名称" align="center" prop="typeName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="规格型号" align="center" prop="modelName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="原值(元)" align="center" prop="modelName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="维修员" align="center" prop="" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="操作人" align="center" prop="" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="退料时间" align="center" prop="" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="维修单号" align="center" prop="" :show-overflow-tooltip="true"/>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="dialogRepairTotal > 0"
|
||||
:total="dialogRepairTotal"
|
||||
:page.sync="dialogRepairQuery.pageNum"
|
||||
:limit.sync="dialogRepairQuery.pageSize"
|
||||
@pagination="getRepairRecords"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 新购待入库设备弹窗-->
|
||||
<el-dialog :title="title" :visible.sync="openPurchaseRecord" width="1200px" append-to-body>
|
||||
<el-form :model="dialogPurchaseQuery" ref="dialogPurchaseQuery" size="small" :inline="true" label-width="80px">
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-input
|
||||
v-model="dialogPurchaseQuery.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable :maxlength="20"
|
||||
style="width: 240px"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleDialogPurchaseQuery"
|
||||
>查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="purchaseRecordList">
|
||||
<el-table-column label="序号" align="center" width="80" type="index"
|
||||
:index="indexContinuation(dialogPurchaseQuery.pageNum, dialogPurchaseQuery.pageSize)">
|
||||
</el-table-column>
|
||||
<el-table-column label="机具名称" align="center" prop="typeName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="规格型号" align="center" prop="modelName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="原值(元)" align="center" prop="modelName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="库管员" align="center" prop="" :show-overflow-tooltip="true"/>
|
||||
<!-- <el-table-column label="操作人" align="center" prop="" :show-overflow-tooltip="true"/> -->
|
||||
<el-table-column label="验收完成时间" align="center" prop="" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="新购待入库单号" align="center" prop="" :show-overflow-tooltip="true"/>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="dialogPurchaseTotal > 0"
|
||||
:total="dialogPurchaseTotal"
|
||||
:page.sync="dialogPurchaseQuery.pageNum"
|
||||
:limit.sync="dialogPurchaseQuery.pageSize"
|
||||
@pagination="getPurchaseRecords"
|
||||
/>
|
||||
</el-dialog>
|
||||
<!-- 新购待入库设备弹窗-->
|
||||
<el-dialog :title="title" :visible.sync="openTestedRecord" width="1200px" append-to-body>
|
||||
<el-form :model="dialogTestedQuery" ref="dialogTestedQuery" size="small" :inline="true" label-width="80px">
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-input
|
||||
v-model="dialogTestedQuery.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable :maxlength="20"
|
||||
style="width: 240px"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleDialogTestedQuery"
|
||||
>查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="testedRecordList">
|
||||
<el-table-column label="序号" align="center" width="80" type="index"
|
||||
:index="indexContinuation(dialogTestedQuery.pageNum, dialogTestedQuery.pageSize)">
|
||||
</el-table-column>
|
||||
<el-table-column label="机具名称" align="center" prop="typeName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="规格型号" align="center" prop="modelName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="原值(元)" align="center" prop="modelName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="库管员" align="center" prop="" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="维修员" align="center" prop="" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="修试提交时间" align="center" prop="" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="修试待入库单号" align="center" prop="" :show-overflow-tooltip="true"/>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="dialogTestedTotal > 0"
|
||||
:total="dialogTestedTotal"
|
||||
:page.sync="dialogTestedQuery.pageNum"
|
||||
:limit.sync="dialogTestedQuery.pageSize"
|
||||
@pagination="getTestedRecords"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import {
|
||||
// statusList,
|
||||
// exportList,
|
||||
// getUnitData,getUseMaCode,
|
||||
// getProData, getTypeKeeper,
|
||||
// getUserRecords,getAllRecords,
|
||||
// } from '@/api/stquery/deviceStatusRecord'
|
||||
// import {getRecords} from "@/api/claimAndRefund/secondStore";
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
dicts: [],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 弹出层标题
|
||||
title: '查看',
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 主表格数据
|
||||
tableList: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
keyWord: null,
|
||||
typeName: null, //物资名称
|
||||
typeModelName: null //规格型号
|
||||
},
|
||||
|
||||
//在库弹窗
|
||||
openRecord: false,
|
||||
dialogList: [], //在库编码设备列表
|
||||
dialogQuery: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
keyWord: undefined,
|
||||
},
|
||||
dialogTotal: 0,
|
||||
//在用弹窗
|
||||
openUseRecord: false,
|
||||
dialogUseQuery: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
keyWord: undefined,
|
||||
},
|
||||
useRecordList: [], //在用设备列表
|
||||
dialogUserTotal: 0,
|
||||
//在修弹窗
|
||||
openRepairRecord: false,
|
||||
dialogRepairQuery: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
keyWord: undefined,
|
||||
},
|
||||
repairRecordList: [], //在修设备列表
|
||||
dialogRepairTotal: 0,
|
||||
|
||||
//新购待入库弹窗
|
||||
openPurchaseRecord: false,
|
||||
dialogPurchaseQuery: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
keyWord: undefined,
|
||||
},
|
||||
purchaseRecordList: [], //新购待入库设备列表
|
||||
dialogPurchaseTotal: 0,
|
||||
|
||||
//修试待入库弹窗
|
||||
openTestedRecord: false,
|
||||
dialogTestedQuery: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
keyWord: undefined,
|
||||
},
|
||||
testedRecordList: [], //修试待入库设备列表
|
||||
dialogTestedTotal: 0,
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
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
|
||||
},
|
||||
indexContinuationForTable(num, size) {
|
||||
let number = (num - 1) * size
|
||||
console.log(number)
|
||||
if(number==0){
|
||||
return "合计"
|
||||
}else{
|
||||
return number
|
||||
}
|
||||
},
|
||||
// 合并单元格 rowIndex=行数 columnIndex=列数
|
||||
// 这里是合并table的除表头外的第一行的第二列 + 除表头外的第二行的第二列
|
||||
// 注意列数和行数从 0 开始
|
||||
objectSpanMethod ({ row, column, rowIndex, columnIndex }) {
|
||||
if (rowIndex === 0 && columnIndex == 0) {
|
||||
let rowspan = 1
|
||||
let colspan = 7
|
||||
return { rowspan, colspan }
|
||||
}
|
||||
// 解决偏移的重要代码
|
||||
// 重点在 else if 判断必须加因为合并单元格数据会出现偏移、
|
||||
// 否则如果是 第二行 的 第二列 那么隐藏原有第二行 的 第二列的数据使他隐藏
|
||||
else if (rowIndex === 0 && columnIndex < 7) {
|
||||
return {
|
||||
rowspan: 0,
|
||||
colspan: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// this.download(
|
||||
// 'material/storageStatus/export',
|
||||
// {
|
||||
// ...this.queryParams,
|
||||
// },
|
||||
// `综合查询_机具仓储状态_${new Date().getTime()}.xlsx`,
|
||||
// )
|
||||
},
|
||||
// ------------------
|
||||
//查看在库编码数据
|
||||
openRecords(row) {
|
||||
this.openRecord = true
|
||||
this.dialogQuery.keyWord = ""
|
||||
this.getStoreCodeList()
|
||||
},
|
||||
/** 查询在库编码列表 */
|
||||
getStoreCodeList() {
|
||||
getUseMaCode(this.dialogQuery).then((response) => {
|
||||
this.dialogList = response.data.rows
|
||||
this.dialogTotal = response.data.total
|
||||
})
|
||||
},
|
||||
/** 搜索在库按钮操作 */
|
||||
handleDialogQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getStoreCodeList()
|
||||
},
|
||||
// ------------------
|
||||
//查看在用设备
|
||||
openUserRecords(row) {
|
||||
this.openUseRecord = true
|
||||
// this.dialogUseQuery.typeId= row.typeId
|
||||
this.dialogUseQuery.keyWord = "";
|
||||
this.getUserRecords()
|
||||
},
|
||||
/** 查询在用设备列表 */
|
||||
getUserRecords() {
|
||||
getUserRecords(this.dialogUseQuery).then((response) => {
|
||||
this.useRecordList = response.data.rows
|
||||
this.dialogUserTotal = response.data.total
|
||||
})
|
||||
},
|
||||
/** 搜索在用按钮操作 */
|
||||
handleDialogUseQuery() {
|
||||
this.dialogUseQuery.pageNum = 1
|
||||
this.getUserRecords()
|
||||
},
|
||||
// ------------------
|
||||
//查看在修设备
|
||||
openRepairRecords(row) {
|
||||
this.openRepairRecord = true
|
||||
// this.dialogUseQuery.typeId= row.typeId
|
||||
this.dialogRepairQuery.pageNum = 1;
|
||||
this.dialogRepairQuery.keyWord = "";
|
||||
this.getRepairRecords()
|
||||
},
|
||||
/** 查询在修设备列表 */
|
||||
getRepairRecords() {
|
||||
getRepairRecordApi(this.dialogRepairQuery).then((response) => {
|
||||
this.repairRecordList = response.data.rows
|
||||
this.dialogRepairTotal = response.data.total
|
||||
})
|
||||
},
|
||||
/** 搜索在修按钮操作 */
|
||||
handleDialogRepairQuery() {
|
||||
this.dialogRepairQuery.pageNum = 1
|
||||
this.getRepairRecords()
|
||||
},
|
||||
// ------------------
|
||||
//查看新购入库设备
|
||||
openPurchaseRecords(row) {
|
||||
this.openPurchaseRecord = true
|
||||
// this.dialogUseQuery.typeId= row.typeId
|
||||
this.dialogPurchaseQuery.pageNum = 1;
|
||||
this.dialogPurchaseQuery.keyWord = "";
|
||||
this.getPurchaseRecords()
|
||||
},
|
||||
/** 查询新购入库设备列表 */
|
||||
getPurchaseRecords() {
|
||||
getPurchaseRecordApi(this.dialogPurchaseQuery).then((response) => {
|
||||
this.purchaseRecordList = response.data.rows
|
||||
this.dialogPurchaseTotal = response.data.total
|
||||
})
|
||||
},
|
||||
/** 搜索新购入库按钮操作 */
|
||||
handleDialogPurchaseQuery() {
|
||||
this.dialogPurchaseQuery.pageNum = 1
|
||||
this.getPurchaseRecords()
|
||||
},
|
||||
// ------------------
|
||||
//查看修试入库设备
|
||||
openTestedRecords(row) {
|
||||
this.openTestedRecord = true
|
||||
// this.dialogUseQuery.typeId= row.typeId
|
||||
this.dialogTestedQuery.pageNum = 1;
|
||||
this.dialogTestedQuery.keyWord = "";
|
||||
this.getTestedRecords()
|
||||
},
|
||||
/** 查询修试入库设备列表 */
|
||||
getTestedRecords() {
|
||||
getTestedRecordApi(this.dialogTestedQuery).then((response) => {
|
||||
this.testedRecordList = response.data.rows
|
||||
this.dialogTestedTotal = response.data.total
|
||||
})
|
||||
},
|
||||
/** 搜索修试入库按钮操作 */
|
||||
handleDialogTestedQuery() {
|
||||
this.dialogTestedQuery.pageNum = 1
|
||||
this.getTestedRecords()
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
</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>
|
||||
|
|
@ -0,0 +1,275 @@
|
|||
<template>
|
||||
<div class="app-container" id="">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
|
||||
<el-form-item label="时间范围" 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 label="关键字" prop="keyWord">
|
||||
<el-input
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable :maxlength="20"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="往来单位" prop="unitId">
|
||||
<el-cascader v-model="unitId"
|
||||
:show-all-levels="false"
|
||||
:options="unitList"
|
||||
:props="selectTreeProps"
|
||||
filterable
|
||||
clearable
|
||||
collapse-tags
|
||||
@change="unitChange"
|
||||
placeholder="请选择往来单位"
|
||||
></el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="工程名称" prop="proId">
|
||||
<el-cascader v-model="projectId"
|
||||
:show-all-levels="false"
|
||||
:options="proList"
|
||||
:props="selectTreeProps"
|
||||
filterable clearable
|
||||
collapse-tags
|
||||
@change="proChange"
|
||||
placeholder="请选择工程名称"
|
||||
></el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="物资名称" prop="typeName">
|
||||
<el-input
|
||||
v-model="queryParams.typeName"
|
||||
placeholder="请输入物资名称"
|
||||
clearable :maxlength="20"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备状态" prop="statusName">
|
||||
<el-select
|
||||
v-model="queryParams.statusName"
|
||||
filterable clearable
|
||||
style="width: 240px"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</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-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
<el-table v-loading="loading" :data="tableList" border>
|
||||
<el-table-column label="序号" align="center" width="80" type="index">
|
||||
<template scope="scope">
|
||||
<span>{{ (queryParams.pageNum - 1) * 10 + scope.$index+1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="协议号" align="center" prop="agreementCode" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="工程名称" align="center" prop="proName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="往来单位" align="center" prop="unitName" :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="unit" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="领用人员" align="center" prop="leaseMan" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="领用时间" align="center" prop="leaseDate" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="退料人员" align="center" prop="backMan" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="退料时间" align="center" prop="backDate" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="当前状态" align="center" prop="statusName" :show-overflow-tooltip="true"/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:page-sizes="[5, 10, 15, 20, 30]"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getMachineHistoryRecordListApi
|
||||
} from '@/api/stquery/stquery';
|
||||
import {
|
||||
getProjectList,
|
||||
getUnitList,
|
||||
} from '@/api/back/index.js'
|
||||
export default {
|
||||
name: '',
|
||||
dicts: [],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 弹出层标题
|
||||
title: '查看',
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
selectTreeProps: {
|
||||
children: 'children',
|
||||
label: 'name',
|
||||
// multiple: false,
|
||||
value: 'id',
|
||||
// multiple: true,
|
||||
},
|
||||
unitId: null,
|
||||
projectId: null,
|
||||
unitList: [],
|
||||
proList: [],
|
||||
statusList:[{id:'在用',name:'在用'},{id:'在退',name:'在退'}],
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 主表格数据
|
||||
tableList: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
time: null,
|
||||
keyWord: null,
|
||||
typeName: null, //物资名称
|
||||
statusName: null //状态
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initSelectData()
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
initSelectData() {
|
||||
this.GetUnitData()
|
||||
this.GetProData()
|
||||
},
|
||||
// 获取 来往单位 列表数据
|
||||
async GetUnitData() {
|
||||
const params = {
|
||||
projectId: this.queryParams.proId /* */,
|
||||
}
|
||||
const res = await getUnitList(params)
|
||||
this.unitList = res.data
|
||||
},
|
||||
unitChange(val){
|
||||
if(val&&val.length>0){
|
||||
this.queryParams.unitId=this.unitId[this.unitId.length - 1]
|
||||
}else if(val&&val.length==0){
|
||||
this.queryParams.unitId=""
|
||||
}
|
||||
this.GetProData()
|
||||
},
|
||||
// 获取 工程名称 列表数据
|
||||
async GetProData() {
|
||||
const params = { unitId: this.queryParams.unitId}
|
||||
const res = await getProjectList(params)
|
||||
this.proList = res.data
|
||||
},
|
||||
proChange(val){
|
||||
if(val&&val.length>0){
|
||||
this.queryParams.proId=this.projectId[this.projectId.length - 1]
|
||||
}else if(val&&val.length==0){
|
||||
this.queryParams.proId=""
|
||||
}
|
||||
this.GetUnitData()
|
||||
},
|
||||
|
||||
// 获取列表
|
||||
async getList() {
|
||||
this.loading = true
|
||||
const params = {
|
||||
unitId: this.queryParams.unitId,
|
||||
proId: this.queryParams.proId,
|
||||
keyWord: this.queryParams.keyWord,
|
||||
typeName: this.queryParams.typeName,
|
||||
statusName: this.queryParams.statusName,
|
||||
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)
|
||||
this.loading = false
|
||||
if(res.data.rows.length>0){
|
||||
this.tableList = res.data.rows;
|
||||
}else{
|
||||
this.tableList=[]
|
||||
}
|
||||
this.total = res.data.total;
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams.time=[]
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
'material/complex_query/exportMachineHistoryRecord',
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`综合查询_设备使用追溯_${new Date().getTime()}.xlsx`,
|
||||
)
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
</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>
|
||||
|
|
@ -0,0 +1,326 @@
|
|||
<template>
|
||||
<div class="app-container" id="">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
|
||||
<el-form-item label="时间范围" 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 label="关键字" prop="keyWord">
|
||||
<el-input
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable :maxlength="20"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="往来单位" prop="unitId">
|
||||
<el-cascader v-model="unitId"
|
||||
:show-all-levels="false"
|
||||
:options="unitList"
|
||||
:props="selectTreeProps"
|
||||
filterable
|
||||
clearable
|
||||
collapse-tags
|
||||
@change="unitChange"
|
||||
placeholder="请选择往来单位"
|
||||
></el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="工程名称" prop="proId">
|
||||
<el-cascader v-model="projectId"
|
||||
:show-all-levels="false"
|
||||
:options="proList"
|
||||
:props="selectTreeProps"
|
||||
filterable clearable
|
||||
collapse-tags
|
||||
@change="proChange"
|
||||
placeholder="请选择工程名称"
|
||||
></el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="物资名称" prop="typeName">
|
||||
<el-input
|
||||
v-model="queryParams.typeName"
|
||||
placeholder="请输入物资名称"
|
||||
clearable :maxlength="20"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="结算状态" prop="isSlt">
|
||||
<el-select
|
||||
v-model="queryParams.isSlt"
|
||||
filterable clearable
|
||||
style="width: 240px"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in sltList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</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-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
<el-table v-loading="loading" :data="tableList" border :span-method="objectSpanMethod">
|
||||
<!-- houseName type typeName typeModelName unitName storeNum manageType useNum 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="agreementCode" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="工程名称" align="center" prop="proName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="往来单位" align="center" prop="unitName" :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="unit" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="领用数量" align="center" prop="leaseNum" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="归还数量" align="center" prop="backNum" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="在用数量" align="center" prop="usNum" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="在用总价值(元)" align="center" prop="usPrice" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="投入总价值(元)" align="center" prop="totalPrice" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="协议状态" align="center" prop="isSltName" :show-overflow-tooltip="true"/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:page-sizes="[5, 10, 15, 20, 30]"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getProjUsingRecordListApi,getProjUsingRecordListNoPage
|
||||
} from '@/api/stquery/stquery';
|
||||
import {
|
||||
getProjectList,
|
||||
getUnitList,
|
||||
} from '@/api/back/index.js'
|
||||
export default {
|
||||
name: '',
|
||||
dicts: [],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 弹出层标题
|
||||
title: '查看',
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
selectTreeProps: {
|
||||
children: 'children',
|
||||
label: 'name',
|
||||
// multiple: false,
|
||||
value: 'id',
|
||||
// multiple: true,
|
||||
},
|
||||
unitId: null,
|
||||
projectId: null,
|
||||
unitList: [],
|
||||
proList: [],
|
||||
sltList:[{id:'0',name:'未结算'},{id:'1',name:'已结算'}],
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 主表格数据
|
||||
tableList: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
time: null,
|
||||
keyWord: null,
|
||||
typeName: null, //物资名称
|
||||
isSlt: null //结算状态
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initSelectData()
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
initSelectData() {
|
||||
this.GetUnitData()
|
||||
this.GetProData()
|
||||
},
|
||||
// 获取 来往单位 列表数据
|
||||
async GetUnitData() {
|
||||
const params = {
|
||||
projectId: this.queryParams.proId /* */,
|
||||
}
|
||||
const res = await getUnitList(params)
|
||||
this.unitList = res.data
|
||||
},
|
||||
unitChange(val){
|
||||
if(val&&val.length>0){
|
||||
this.queryParams.unitId=this.unitId[this.unitId.length - 1]
|
||||
}else if(val&&val.length==0){
|
||||
this.queryParams.unitId=""
|
||||
}
|
||||
this.GetProData()
|
||||
},
|
||||
// 获取 工程名称 列表数据
|
||||
async GetProData() {
|
||||
const params = { unitId: this.queryParams.unitId}
|
||||
const res = await getProjectList(params)
|
||||
this.proList = res.data
|
||||
},
|
||||
proChange(val){
|
||||
if(val&&val.length>0){
|
||||
this.queryParams.proId=this.projectId[this.projectId.length - 1]
|
||||
}else if(val&&val.length==0){
|
||||
this.queryParams.proId=""
|
||||
}
|
||||
this.GetUnitData()
|
||||
},
|
||||
|
||||
// 获取列表
|
||||
async getList() {
|
||||
this.loading = true
|
||||
const params = {
|
||||
unitId: this.queryParams.unitId,
|
||||
proId: this.queryParams.proId,
|
||||
keyWord: this.queryParams.keyWord,
|
||||
typeName: this.queryParams.typeName,
|
||||
isSlt: this.queryParams.isSlt,
|
||||
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 getProjUsingRecordListApi(params)
|
||||
if(res.data.rows.length>0){
|
||||
this.tableList = res.data.rows;
|
||||
}else{
|
||||
this.tableList=[]
|
||||
}
|
||||
this.total = res.data.total;
|
||||
let param = {
|
||||
unitId: this.queryParams.unitId,
|
||||
proId: this.queryParams.proId,
|
||||
keyWord: this.queryParams.keyWord,
|
||||
typeName: this.queryParams.typeName,
|
||||
isSlt: this.queryParams.isSlt,
|
||||
startTime: this.queryParams.time && this.queryParams.time[0],
|
||||
endTime: this.queryParams.time && this.queryParams.time[1]
|
||||
}
|
||||
const response = await getProjUsingRecordListNoPage(param)
|
||||
let obj = {
|
||||
leaseNum: response.data.totalLeaseNum||0,
|
||||
backNum: response.data.totalBackNum||0,
|
||||
usNum: response.data.totalUsNum||0,
|
||||
usPrice: response.data.totalUsPrice||0,
|
||||
totalPrice: response.data.totalTotalPrice||0,
|
||||
isSltName:''
|
||||
}
|
||||
this.tableList.unshift(obj)
|
||||
console.log(this.tableList)
|
||||
this.loading = false
|
||||
|
||||
},
|
||||
indexContinuationForTable(num, size) {
|
||||
let number = (num - 1) * size
|
||||
console.log(number)
|
||||
if(number==0){
|
||||
return "合计"
|
||||
}else{
|
||||
return number
|
||||
}
|
||||
},
|
||||
// 合并单元格 rowIndex=行数 columnIndex=列数
|
||||
// 这里是合并table的除表头外的第一行的第二列 + 除表头外的第二行的第二列
|
||||
// 注意列数和行数从 0 开始
|
||||
objectSpanMethod ({ row, column, rowIndex, columnIndex }) {
|
||||
if (rowIndex === 0 && columnIndex == 0) {
|
||||
let rowspan = 1
|
||||
let colspan = 7
|
||||
return { rowspan, colspan }
|
||||
}
|
||||
// 解决偏移的重要代码
|
||||
// 重点在 else if 判断必须加因为合并单元格数据会出现偏移、
|
||||
// 否则如果是 第二行 的 第二列 那么隐藏原有第二行 的 第二列的数据使他隐藏
|
||||
else if (rowIndex === 0 && columnIndex < 7) {
|
||||
return {
|
||||
rowspan: 0,
|
||||
colspan: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams.time=[]
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
'material/complex_query/exportProjUsingRecord',
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`综合查询_工程机具使用_${new Date().getTime()}.xlsx`,
|
||||
)
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
</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>
|
||||
Loading…
Reference in New Issue