材料站修改
This commit is contained in:
parent
fd4e0736ac
commit
aebd03168f
|
|
@ -619,6 +619,16 @@ export const getTeamNumSecondListApi = data => {
|
|||
})
|
||||
}
|
||||
|
||||
// 班组库存日志二级页面-列表
|
||||
export const getTeamNumSecondListNoPageApi = data => {
|
||||
return request({
|
||||
url: '/material/material_maMachine/getTeamNumSecondListNoPage',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 班组库存日志三级页面-列表
|
||||
export const getTeamNumThirdApi = data => {
|
||||
return request({
|
||||
|
|
|
|||
|
|
@ -161,6 +161,9 @@
|
|||
<el-form-item>
|
||||
<el-button icon="el-icon-download" size="mini" @click="handleDialogUserExport">导出</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="success" icon="el-icon-printer" size="mini" @click="handlePrint">打印</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="useRecordList">
|
||||
|
|
@ -176,8 +179,8 @@
|
|||
<el-table-column label="领料人" align="center" prop="leasePerson" :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="usNum" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="库存" align="center" prop="usNum" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作" align="center" width="100" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" v-if="scope.row.manageType==0" style="margin-bottom: 10px" type="primary" @click="handleView(scope.row)">
|
||||
|
|
@ -196,6 +199,44 @@
|
|||
/>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 二级打印页面 -->
|
||||
<el-dialog :visible.sync="openPrint" width="1090px" title="打印预览" append-to-body>
|
||||
<div style="height: 500px; overflow-y: scroll; padding: 0 20px" v-loading="openLoading">
|
||||
<vue-easy-print tableShow ref="remarksPrintRef" class="print">
|
||||
<table class="print-table" style="margin-top: 20px; width: 100%; border-collapse: collapse" border>
|
||||
<thead>
|
||||
<tr>
|
||||
<th align="center" style="width: 50px;">序号</th>
|
||||
<th align="center" style="width: 150px;">班组名称</th>
|
||||
<th align="center" style="width: 150px;">领料单号</th>
|
||||
<th align="center" style="width: 80px;">领料人</th>
|
||||
<th align="center" style="width: 150px;">机具名称</th>
|
||||
<th align="center">规格型号</th>
|
||||
<th align="center" style="width: 70px;">单位</th>
|
||||
<th align="center" style="width: 120px;">库存</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in useRecordListNoPage" :key="index">
|
||||
<td align="center">{{ index + 1 }}</td>
|
||||
<td align="center">{{ item.teamName }}</td>
|
||||
<td align="center">{{ item.code }}</td>
|
||||
<td align="center">{{ item.leasePerson }}</td>
|
||||
<td align="center">{{ item.typeName }}</td>
|
||||
<td align="center">{{ item.typeModelName }}</td>
|
||||
<td align="center">{{ item.unitName }}</td>
|
||||
<td align="center">{{ item.usNum }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</vue-easy-print>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer" style="text-align: center">
|
||||
<el-button type="primary" @click="print">打 印</el-button>
|
||||
<el-button @click="openPrint = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 三级页面 -->
|
||||
<el-dialog :title="titleThree" :visible.sync="openUseRecordThree" width="800px" append-to-body>
|
||||
<el-form :model="dialogUseQueryThree" ref="dialogUseQueryThree" size="small" :inline="true" label-width="80px">
|
||||
|
|
@ -247,11 +288,12 @@
|
|||
import TreeSelect from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import QRCodeView from '@/components/QRCodeView'
|
||||
import { getTeamNumListApi,getTeamNumSecondListApi, getTeamNumThirdApi,getImpUnitListApi, getDepartListByImpUnitApi, getProListByDepartApi, getTeamList, getSubUnitList } from '@/api/materialsStation'
|
||||
|
||||
import { getTeamNumListApi,getTeamNumSecondListApi, getTeamNumThirdApi,getImpUnitListApi, getDepartListByImpUnitApi, getProListByDepartApi, getTeamList, getSubUnitList,getTeamNumSecondListNoPageApi } from '@/api/materialsStation'
|
||||
import vueEasyPrint from 'vue-easy-print'
|
||||
import printJS from 'print-js'
|
||||
export default {
|
||||
name: 'TeamStorage',
|
||||
components: { TreeSelect, QRCodeView },
|
||||
components: { TreeSelect, QRCodeView,vueEasyPrint },
|
||||
data() {
|
||||
return {
|
||||
showSearch: true,
|
||||
|
|
@ -277,6 +319,7 @@ export default {
|
|||
keyWord: undefined
|
||||
},
|
||||
useRecordList: [],
|
||||
useRecordListNoPage: [],
|
||||
dialogUserTotal: 0,
|
||||
loading: false,
|
||||
title: '库存查看',
|
||||
|
|
@ -294,6 +337,8 @@ export default {
|
|||
proOptions: [], // 工程下拉
|
||||
subUnitOptions: [], // 分包单位下拉
|
||||
teamOptions: [], // 班组下拉
|
||||
openPrint: false, // 打印页面开关
|
||||
openLoading: false, // 打印页面加载
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
@ -503,11 +548,40 @@ export default {
|
|||
this.dialogUserTotal = response.data.total
|
||||
})
|
||||
},
|
||||
|
||||
/** 查询在用设备列表(不分页) */
|
||||
getUserRecordsNoPage() {
|
||||
getTeamNumSecondListNoPageApi(this.dialogUseQuery).then(response => {
|
||||
this.useRecordListNoPage = response.data.rows
|
||||
})
|
||||
},
|
||||
/** 搜索在用按钮操作 */
|
||||
handleDialogUseQuery() {
|
||||
this.dialogUseQuery.pageNum = 1
|
||||
this.getUserRecords()
|
||||
},
|
||||
|
||||
//二级页面打印
|
||||
async handlePrint() {
|
||||
this.openPrint = true
|
||||
this.openLoading = true;
|
||||
try {
|
||||
const res = await getTeamNumSecondListNoPageApi(this.dialogUseQuery)
|
||||
this.useRecordListNoPage = res.data.rows
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ handleLld ~ error:', error)
|
||||
} finally {
|
||||
this.openLoading = false
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
//二级页面打印
|
||||
print() {
|
||||
this.$refs.remarksPrintRef.print()
|
||||
},
|
||||
|
||||
|
||||
//三级页面查看
|
||||
handleView(row) {
|
||||
this.openUseRecordThree = true
|
||||
|
|
@ -522,7 +596,7 @@ export default {
|
|||
this.dialogUserThreeTotal = response.data.total
|
||||
})
|
||||
},
|
||||
/** 搜索在用按钮操作 */
|
||||
/** 搜索在用按钮操作 */
|
||||
handleDialogUseQueryThree() {
|
||||
this.dialogUseQueryThree.pageNum = 1
|
||||
this.getTeamNumThird()
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@
|
|||
|
||||
<!-- 租赁费用明细 -->
|
||||
<el-table :data="leaseList" max-height="500px">
|
||||
<el-table-column label="租赁费用明细" align="center" >
|
||||
<el-table-column label="租赁(超期)费用明细" align="center" >
|
||||
<el-table-column label="序号" align="center" type="index" width="60" />
|
||||
<el-table-column label="单位名称" align="center" prop="unitName" :show-overflow-tooltip="true" width="150" />
|
||||
<el-table-column label="设备名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
|
||||
|
|
@ -179,6 +179,11 @@
|
|||
<el-table-column label="规格型号" align="center" prop="modelName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="计量单位" align="center" prop="mtUnitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="丢失数量" align="center" prop="num" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="原值(元)" align="center" prop="buyPrice" :show-overflow-tooltip="true" >
|
||||
<template slot-scope="scope" v-show="scope.row.buyPrice">
|
||||
{{ scope.row.buyPrice.toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="丢失费用(元)" align="center" prop="costs" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope" v-show="scope.row.costs">
|
||||
{{ scope.row.costs.toFixed(2) }}
|
||||
|
|
@ -301,6 +306,7 @@ export default {
|
|||
|
||||
async loadTeamList() {
|
||||
try {
|
||||
this.selectedTeams = [] // 清空已选择的班组
|
||||
const params = {
|
||||
proId: this.selectedProject,
|
||||
}
|
||||
|
|
@ -424,7 +430,17 @@ export default {
|
|||
unitNames.push(data.unitName)
|
||||
}
|
||||
if(data.unitName && data.actualExitTime){
|
||||
actualTimeAndNames.push(`${data.unitName} ( ${data.actualExitTime} ) `)
|
||||
const timeAndName = `${data.unitName} ( ${data.actualExitTime} )`;
|
||||
// 检查是否已存在该元素,不存在才添加
|
||||
if(!actualTimeAndNames.includes(timeAndName)) {
|
||||
actualTimeAndNames.push(timeAndName);
|
||||
}
|
||||
}else if(data.unitName && !data.actualExitTime){
|
||||
const timeAndName = `${data.unitName} ( 暂无 )`;
|
||||
// 检查是否已存在该元素,不存在才添加
|
||||
if(!actualTimeAndNames.includes(timeAndName)) {
|
||||
actualTimeAndNames.push(timeAndName);
|
||||
}
|
||||
}
|
||||
|
||||
// 累计维修和报废费用
|
||||
|
|
|
|||
Loading…
Reference in New Issue