This commit is contained in:
parent
3dd8891972
commit
f6db2c8ba0
|
|
@ -153,7 +153,7 @@ export const getLeaseInfoDetailsNoPageListApi = data => {
|
|||
})
|
||||
}
|
||||
|
||||
// 工器具退料记录-详情
|
||||
// 工器具领料记录-详情
|
||||
export const getSecondLeaseInfoApi = data => {
|
||||
return request({
|
||||
url: '/material/lease_apply_info/getSecondLeaseInfo',
|
||||
|
|
@ -162,6 +162,33 @@ export const getSecondLeaseInfoApi = data => {
|
|||
})
|
||||
}
|
||||
|
||||
// 工器具退料记录-列表
|
||||
export const getBackInfoDetailsApi = data => {
|
||||
return request({
|
||||
url: '/material/back_apply_info/getBackInfoDetails',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 工器具退料记录-合计
|
||||
export const getBackInfoDetailsNoPageListApi = data => {
|
||||
return request({
|
||||
url: '/material/back_apply_info/getBackInfoDetailsNoPageList',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 工器具退料记录-详情
|
||||
export const getSecondBackInfoApi = data => {
|
||||
return request({
|
||||
url: '/material/back_apply_info/getSecondBackInfo',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 工器具台账管理-列表
|
||||
export const getRetainedEquipmentListApi = data => {
|
||||
return request({
|
||||
|
|
|
|||
|
|
@ -41,26 +41,26 @@
|
|||
<span v-else>{{ (queryParams.pageNum - 1) * 10 + scope.$index }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工器具名称" align="center" prop="constructionType" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="工器具名称" align="center" prop="materialName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="规格型号" align="center" prop="typeName" :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">
|
||||
<el-table-column label="退料数量" align="center" prop="backNum" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<!-- 当 manageType 为 '编码' 时,使用可点击的 span -->
|
||||
<span class="clickText" v-if="scope.row.manageType == '编码'" @click="openRecords(scope.row)">
|
||||
{{ scope.row.storeNum }}
|
||||
<span class="clickText" v-if="scope.row.manageType == '0'" @click="openRecords(scope.row)">
|
||||
{{ scope.row.backNum }}
|
||||
</span>
|
||||
<!-- 否则,直接显示数字 -->
|
||||
<span v-else>
|
||||
{{ scope.row.storeNum }}
|
||||
{{ scope.row.backNum }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="退料日期" align="center" prop="leaseTime" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料班组" align="center" prop="leasePer" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料工程" align="center" prop="leasePro" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料人" align="center" prop="leasePeo" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作人" align="center" prop="out" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料日期" align="center" prop="backTime" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料班组" align="center" prop="teamName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料工程" align="center" prop="proName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料人" align="center" prop="backPerson" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作人" align="center" prop="createBy" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料单号" align="center" prop="code" :show-overflow-tooltip="true" />
|
||||
</el-table>
|
||||
<pagination
|
||||
|
|
@ -100,15 +100,15 @@
|
|||
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="typeModelName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="入库数量" align="center" prop="storeNum" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="原值(元)" align="center" prop="buyPrice" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="机具名称" align="center" prop="materialName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="规格型号" align="center" prop="typeName" :show-overflow-tooltip="true" />
|
||||
<!-- <el-table-column label="入库数量" align="center" prop="storeNum" :show-overflow-tooltip="true" /> -->
|
||||
<!-- <el-table-column label="原值(元)" align="center" prop="buyPrice" :show-overflow-tooltip="true" /> -->
|
||||
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="库管员" align="center" prop="maKeeper" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作人" align="center" prop="inputUser" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="入库时间" align="center" prop="inputTime" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="入库方式" align="center" prop="inputType" :show-overflow-tooltip="true" />
|
||||
<!-- <el-table-column label="库管员" align="center" prop="maKeeper" :show-overflow-tooltip="true" /> -->
|
||||
<el-table-column label="退料人员" align="center" prop="backPerson" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料时间" align="center" prop="backTime" :show-overflow-tooltip="true" />
|
||||
<!-- <el-table-column label="入库方式" align="center" prop="inputType" :show-overflow-tooltip="true" /> -->
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="dialogTotal > 0"
|
||||
|
|
@ -122,11 +122,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getRetainedEquipmentListApi,
|
||||
getRetainedEquipmentListNoPageApi,
|
||||
getStorageInfoListApi
|
||||
} from '@/api/stquery/stquery'
|
||||
import { getBackInfoDetailsApi, getBackInfoDetailsNoPageListApi, getSecondBackInfoApi } from '@/api/equipment'
|
||||
export default {
|
||||
name: '',
|
||||
dicts: [],
|
||||
|
|
@ -164,7 +160,7 @@ export default {
|
|||
pageSize: 10,
|
||||
keyWord: undefined
|
||||
},
|
||||
dialogTotal: 0,
|
||||
dialogTotal: 0
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
@ -176,12 +172,13 @@ export default {
|
|||
this.loading = true
|
||||
const params = {
|
||||
keyWord: this.queryParams.keyWord,
|
||||
typeName: this.queryParams.typeName,
|
||||
typeModelName: this.queryParams.typeModelName,
|
||||
startTime: this.queryParams.timeRange ? this.queryParams.timeRange[0] : null,
|
||||
endTime: this.queryParams.timeRange ? this.queryParams.timeRange[1] : null,
|
||||
pageSize: this.queryParams.pageSize,
|
||||
pageNum: this.queryParams.pageNum
|
||||
}
|
||||
const res = await getRetainedEquipmentListApi(params)
|
||||
try {
|
||||
const res = await getBackInfoDetailsApi(params)
|
||||
if (res.data.rows.length > 0) {
|
||||
this.tableList = res.data.rows
|
||||
} else {
|
||||
|
|
@ -194,26 +191,16 @@ export default {
|
|||
typeName: this.queryParams.typeName,
|
||||
typeModelName: this.queryParams.typeModelName
|
||||
}
|
||||
const response = await getRetainedEquipmentListNoPageApi(param)
|
||||
const response = await getBackInfoDetailsNoPageListApi(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,
|
||||
pendingScrapNum: response.data.pendingScrapNum || 0,
|
||||
scrapNum: response.data.scrapNum || 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 || ''
|
||||
backNum: response.data.backNum || 0,
|
||||
}
|
||||
this.tableList.unshift(obj)
|
||||
console.log(this.tableList)
|
||||
this.loading = false
|
||||
} catch (error) {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
indexContinuationForTable(num, size) {
|
||||
let number = (num - 1) * size
|
||||
|
|
@ -230,13 +217,13 @@ export default {
|
|||
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
if (rowIndex === 0 && columnIndex == 0) {
|
||||
let rowspan = 1
|
||||
let colspan = 7
|
||||
let colspan = 3
|
||||
return { rowspan, colspan }
|
||||
}
|
||||
// 解决偏移的重要代码
|
||||
// 重点在 else if 判断必须加因为合并单元格数据会出现偏移、
|
||||
// 否则如果是 第二行 的 第二列 那么隐藏原有第二行 的 第二列的数据使他隐藏
|
||||
else if (rowIndex === 0 && columnIndex < 7) {
|
||||
else if (rowIndex === 0 && columnIndex < 3) {
|
||||
return {
|
||||
rowspan: 0,
|
||||
colspan: 0
|
||||
|
|
@ -256,7 +243,7 @@ export default {
|
|||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
'material/complex_query/exportRetainedEquipmentList',
|
||||
'material/back_apply_info/exportBackInfoDetails',
|
||||
{
|
||||
...this.queryParams
|
||||
},
|
||||
|
|
@ -268,11 +255,12 @@ export default {
|
|||
this.openRecord = true
|
||||
this.dialogQuery.keyWord = ''
|
||||
this.dialogQuery.typeId = row.typeId
|
||||
this.dialogQuery.parentId = row.parentId
|
||||
this.getStoreCodeList()
|
||||
},
|
||||
/** 查询在库编码列表 */
|
||||
getStoreCodeList() {
|
||||
getStorageInfoListApi(this.dialogQuery).then(response => {
|
||||
getSecondBackInfoApi(this.dialogQuery).then(response => {
|
||||
this.dialogList = response.data.rows
|
||||
this.dialogTotal = response.data.total
|
||||
})
|
||||
|
|
@ -284,7 +272,7 @@ export default {
|
|||
},
|
||||
handleDialogStoreExport() {
|
||||
this.download(
|
||||
'material/complex_query/exportStorageInfoList',
|
||||
'material/back_apply_info/exportSecondBackInfo',
|
||||
{ ...this.dialogQuery },
|
||||
`综合查询_在库设备_${new Date().getTime()}.xlsx`
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue