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