供应功能修改
This commit is contained in:
parent
28dceae839
commit
5debc7f104
|
|
@ -184,6 +184,15 @@ export function getStatisticsListApi(query) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 供应统计表-二级页面
|
||||||
|
export function getAllDeviceDetailsApi(query) {
|
||||||
|
return request({
|
||||||
|
url: '/material/complex_query/getSecondStatisticsList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 供应统计表-详情
|
// 供应统计表-详情
|
||||||
export function getAllUsDetailsApi(query) {
|
export function getAllUsDetailsApi(query) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
||||||
|
|
@ -20,15 +20,6 @@
|
||||||
style="width: 130px"
|
style="width: 130px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="keyWord">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.keyWord"
|
|
||||||
placeholder="请输入关键字"
|
|
||||||
clearable
|
|
||||||
:maxlength="20"
|
|
||||||
style="width: 240px"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item prop="proName">
|
<el-form-item prop="proName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.proName"
|
v-model="queryParams.proName"
|
||||||
|
|
@ -39,6 +30,13 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item prop="jijuType">
|
||||||
|
<el-select v-model="queryParams.jijuType" placeholder="请选择机具类型" style="width: 240px">
|
||||||
|
<el-option label="施工机具" value="1"></el-option>
|
||||||
|
<el-option label="安全工器具" value="2"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
|
<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 icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
|
@ -64,7 +62,13 @@
|
||||||
:index="indexContinuation(queryParams.pageNum, queryParams.pageSize)"
|
:index="indexContinuation(queryParams.pageNum, queryParams.pageSize)"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="分公司" align="center" prop="impUnitName" min-width="160"/>
|
<el-table-column label="分公司" align="center" prop="impUnitName" min-width="160"/>
|
||||||
<el-table-column label="工程名称" align="center" prop="proName" min-width="160"/>
|
<el-table-column label="工程名称" align="center" prop="proName" min-width="160">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span class="clickText" @click="openDeviceRecords(scope.row)">
|
||||||
|
{{ scope.row.proName }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="机具类型" align="center" prop="jijuType" >
|
<el-table-column label="机具类型" align="center" prop="jijuType" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.jijuType == '施工机具'" effect="plain">施工机具</el-tag>
|
<el-tag v-if="scope.row.jijuType == '施工机具'" effect="plain">施工机具</el-tag>
|
||||||
|
|
@ -98,10 +102,10 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleDialogUseQuery">查询</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleDialogDeviceQuery">查询</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button icon="el-icon-download" size="mini" @click="handleDialogUserExport">导出</el-button>
|
<el-button icon="el-icon-download" size="mini" @click="handleDialogDeviceExport">导出</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
|
|
@ -113,10 +117,13 @@
|
||||||
type="index"
|
type="index"
|
||||||
:index="indexContinuation(dialogDeviceQuery.pageNum, dialogDeviceQuery.pageSize)"
|
:index="indexContinuation(dialogDeviceQuery.pageNum, dialogDeviceQuery.pageSize)"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column label="工程名称" align="center" prop="proName" min-width="160"/>
|
<!-- <el-table-column label="工程名称" align="center" prop="proName" min-width="160"/> -->
|
||||||
<el-table-column label="物资名称" align="center" prop="typeName" />
|
<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="typeModelName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="计量单位" align="center" prop="unit" :show-overflow-tooltip="true" />
|
<el-table-column label="单位" align="center" prop="unit" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="需求数量" align="center" prop="needNum" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="已供数量" align="center" prop="supplyNum" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="差值(已供G-需求F)" align="center" prop="diffNum" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="在用数量" align="center" prop="usNum" :show-overflow-tooltip="true" />
|
<el-table-column label="在用数量" align="center" prop="usNum" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="库存数量" align="center" prop="storeNum" :show-overflow-tooltip="true" />
|
<el-table-column label="库存数量" align="center" prop="storeNum" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="在修数量" align="center" prop="repairNum" :show-overflow-tooltip="true" />
|
<el-table-column label="在修数量" align="center" prop="repairNum" :show-overflow-tooltip="true" />
|
||||||
|
|
@ -140,7 +147,7 @@
|
||||||
:total="dialogDeviceTotal"
|
:total="dialogDeviceTotal"
|
||||||
:page.sync="dialogDeviceQuery.pageNum"
|
:page.sync="dialogDeviceQuery.pageNum"
|
||||||
:limit.sync="dialogDeviceQuery.pageSize"
|
:limit.sync="dialogDeviceQuery.pageSize"
|
||||||
@pagination="getUserRecords"
|
@pagination="getDeviceRecords"
|
||||||
/>
|
/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
|
@ -173,13 +180,7 @@
|
||||||
type="index"
|
type="index"
|
||||||
:index="indexContinuation(dialogUseQuery.pageNum, dialogUseQuery.pageSize)"
|
:index="indexContinuation(dialogUseQuery.pageNum, dialogUseQuery.pageSize)"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column label="工程名称" align="center" prop="proName" width="200" >
|
<el-table-column label="工程名称" align="center" prop="proName" width="200" />
|
||||||
<template slot-scope="scope">
|
|
||||||
<span class="clickText" @click="openUserRecords(scope.row)">
|
|
||||||
{{ scope.row.proName }}
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="机具名称" align="center" prop="typeName" :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="typeModelName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="在用数量" align="center" prop="usNum" :show-overflow-tooltip="true" />
|
<el-table-column label="在用数量" align="center" prop="usNum" :show-overflow-tooltip="true" />
|
||||||
|
|
@ -197,7 +198,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getStatisticsListApi, getAllUsDetailsApi } from '@/api/stquery/stquery'
|
import { getStatisticsListApi, getAllUsDetailsApi,getAllDeviceDetailsApi } from '@/api/stquery/stquery'
|
||||||
export default {
|
export default {
|
||||||
name: 'DeviceStatusRecord',
|
name: 'DeviceStatusRecord',
|
||||||
dicts: [],
|
dicts: [],
|
||||||
|
|
@ -209,7 +210,7 @@ export default {
|
||||||
// 选中数组
|
// 选中数组
|
||||||
ids: [],
|
ids: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: '查看',
|
title: '查看在用明细',
|
||||||
// 非单个禁用
|
// 非单个禁用
|
||||||
single: true,
|
single: true,
|
||||||
// 非多个禁用
|
// 非多个禁用
|
||||||
|
|
@ -225,7 +226,7 @@ export default {
|
||||||
time: [],
|
time: [],
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
keyWord: null,
|
jijuType: null,
|
||||||
proName: null,
|
proName: null,
|
||||||
startTime: null,
|
startTime: null,
|
||||||
endTime: null
|
endTime: null
|
||||||
|
|
@ -247,12 +248,13 @@ export default {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
keyWord: undefined,
|
keyWord: undefined,
|
||||||
typeId: undefined
|
proId: undefined,
|
||||||
|
jijuType: undefined,
|
||||||
},
|
},
|
||||||
deviceRecordList: [], // 二级列表数据
|
deviceRecordList: [], // 二级列表数据
|
||||||
dialogDeviceTotal: 0, // 二级总条数
|
dialogDeviceTotal: 0, // 二级总条数
|
||||||
titleDevice: '查看', // 二级标题
|
titleDevice: '查看', // 二级标题
|
||||||
|
loadingDevice: false, // 二级加载
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
@ -275,7 +277,7 @@ export default {
|
||||||
try {
|
try {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const params = {
|
const params = {
|
||||||
keyWord: this.queryParams.keyWord,
|
jijuType: this.queryParams.jijuType,
|
||||||
proName: this.queryParams.proName,
|
proName: this.queryParams.proName,
|
||||||
pageSize: this.queryParams.pageSize,
|
pageSize: this.queryParams.pageSize,
|
||||||
pageNum: this.queryParams.pageNum,
|
pageNum: this.queryParams.pageNum,
|
||||||
|
|
@ -345,19 +347,20 @@ export default {
|
||||||
// ------------------
|
// ------------------
|
||||||
//查看二级列表
|
//查看二级列表
|
||||||
openDeviceRecords(row) {
|
openDeviceRecords(row) {
|
||||||
this.openUseRecord = true
|
this.openDeviceRecord = true
|
||||||
this.dialogUseQuery.typeId = row.typeId
|
this.dialogDeviceQuery.proId = row.proId
|
||||||
this.dialogUseQuery.keyWord = ''
|
this.dialogDeviceQuery.jijuType = row.jijuType === '施工机具' ? 1 : 2
|
||||||
this.dialogUseQuery.pageNum = 1
|
this.dialogDeviceQuery.keyWord = ''
|
||||||
this.dialogUseQuery.pageSize = 10
|
this.dialogDeviceQuery.pageNum = 1
|
||||||
this.useRecordList = []
|
this.dialogDeviceQuery.pageSize = 10
|
||||||
this.getDevicerRecords()
|
this.deviceRecordList = []
|
||||||
|
this.getDeviceRecords()
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 查询二级弹窗设备列表 */
|
/** 查询二级弹窗设备列表 */
|
||||||
getDevicerRecords() {
|
getDeviceRecords() {
|
||||||
this.loadingDevice = true
|
this.loadingDevice = true
|
||||||
getAllUsDetailsApi(this.dialogDeviceQuery)
|
getAllDeviceDetailsApi(this.dialogDeviceQuery)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.deviceRecordList = response.data.rows
|
this.deviceRecordList = response.data.rows
|
||||||
this.dialogDeviceTotal = response.data.total
|
this.dialogDeviceTotal = response.data.total
|
||||||
|
|
@ -371,7 +374,35 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/** 二级弹窗搜索按钮操作 */
|
||||||
|
handleDialogDeviceQuery() {
|
||||||
|
this.dialogDeviceQuery.pageNum = 1
|
||||||
|
this.getDeviceRecords()
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 二级弹窗导出按钮操作 */
|
||||||
|
handleDialogDeviceExport() {
|
||||||
|
const formatTime = date => {
|
||||||
|
const year = date.getFullYear()
|
||||||
|
const month = String(date.getMonth() + 1).padStart(2, '0')
|
||||||
|
const day = String(date.getDate()).padStart(2, '0')
|
||||||
|
const hours = String(date.getHours()).padStart(2, '0')
|
||||||
|
const minutes = String(date.getMinutes()).padStart(2, '0')
|
||||||
|
const seconds = String(date.getSeconds()).padStart(2, '0')
|
||||||
|
return `${year}${month}${day}_${hours}${minutes}${seconds}`
|
||||||
|
}
|
||||||
|
|
||||||
|
const currentTime = formatTime(new Date())
|
||||||
|
this.download(
|
||||||
|
'material/complex_query/exportSecondStatisticsList',
|
||||||
|
{
|
||||||
|
...this.dialogDeviceQuery,
|
||||||
|
// startTime: this.queryParams.time ? this.queryParams.time[0] : '',
|
||||||
|
// endTime: this.queryParams.time ? this.queryParams.time[1] : '',
|
||||||
|
},
|
||||||
|
`供应统计报表_明细_${currentTime}.xlsx`
|
||||||
|
)
|
||||||
|
},
|
||||||
|
|
||||||
//查看在用设备
|
//查看在用设备
|
||||||
openUserRecords(row) {
|
openUserRecords(row) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue