This commit is contained in:
bb_pan 2025-05-15 13:35:14 +08:00
parent 378fa34de4
commit 3dd8891972
8 changed files with 191 additions and 212 deletions

View File

@ -160,4 +160,22 @@ export const getSecondLeaseInfoApi = data => {
method: 'get', method: 'get',
params: data params: data
}) })
}
// 工器具台账管理-列表
export const getRetainedEquipmentListApi = data => {
return request({
url: '/material/complex_query/getRetainedEquipmentList',
method: 'get',
params: data
})
}
// 工器具台账管理-合计
export const getRetainedEquipmentListNoPageApi = data => {
return request({
url: '/material/complex_query/getRetainedEquipmentListNoPage',
method: 'get',
params: data
})
} }

View File

@ -10,31 +10,24 @@
label-width="100px" label-width="100px"
> >
<el-row> <el-row>
<el-form-item label="退料班组" prop="unitId"> <el-form-item label="退料班组" prop="teamId">
<treeselect <el-select
v-model="queryParams.unitId" v-model="queryParams.teamId"
:disabled="backId != ''" :disabled="backId != ''"
:options="unitList" placeholder="请选择班组"
:normalizer="normalizer" clearable
:show-count="true"
style="width: 240px"
:disable-branch-nodes="true"
noChildrenText="没有数据了"
noOptionsText="没有数据"
noResultsText="没有搜索结果"
placeholder="请选择退料单位"
@select="unitChange"
/>
<!-- <el-cascader v-model="unitId"
:show-all-levels="false"
:options="unitList"
:props="selectTreeProps"
filterable filterable
clearable style="width: 240px"
collapse-tags @change="changeTeam"
@change="unitChange" >
placeholder="请选择退料单位" <el-option
></el-cascader> --> v-for="(item, index) in teamList"
:key="index"
:label="item.teamName"
:value="item.id"
:data-key="item.id"
/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="退料工程" prop="proId"> <el-form-item label="退料工程" prop="proId">
<treeselect <treeselect
@ -49,25 +42,9 @@
noOptionsText="没有数据" noOptionsText="没有数据"
noResultsText="没有搜索结果" noResultsText="没有搜索结果"
placeholder="请选择退料工程" placeholder="请选择退料工程"
@select="proChange" @select="handleProChange"
/> />
<!-- <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>
<!-- <el-form-item label="协议号" prop="agreementCode">
<el-input
v-model="queryParams.agreementCode"
disabled
style="width: 240px"
></el-input>
</el-form-item> -->
<el-form-item label="退料人" prop="backPerson"> <el-form-item label="退料人" prop="backPerson">
<el-input <el-input
v-model="queryParams.backPerson" v-model="queryParams.backPerson"
@ -138,21 +115,6 @@
</template> </template>
</el-input> </el-input>
</el-col> </el-col>
<!-- <el-cascader
:key="propsKey"
v-model="deviceType"
:show-all-levels="false"
:options="deviceTypeTree"
:props="deviceTypeTreeProps"
filterable
collapse-tags
style="width: 240px"
placeholder="请选择规格型号"
ref="deviceTypeCascader"
popper-class="popper-select"
@change="deviceTypeChange"
></el-cascader> -->
<!-- </el-form-item> -->
<el-form-item label="备注" prop="roleName"> <el-form-item label="备注" prop="roleName">
<el-input <el-input
v-model="queryParams.remark" v-model="queryParams.remark"
@ -210,13 +172,13 @@
</el-table-column> </el-table-column>
<el-table-column label="退料数量" align="center" prop="preNum" min-width="100"> <el-table-column label="退料数量" align="center" prop="preNum" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<div <span
style="color: rgb(2, 167, 240)" style="color: rgb(2, 167, 240); cursor: pointer"
@click="openAddCode(scope.row)" @click="openAddCode(scope.row)"
v-if="scope.row.manageType == 0" v-if="scope.row.manageType == 0"
> >
添加编码 {{ scope.row.preNum > 0 ? scope.row.preNum : '添加编码' }}
</div> </span>
<el-input <el-input
v-if="scope.row.manageType == 1" v-if="scope.row.manageType == 1"
v-model.number="scope.row.preNum" v-model.number="scope.row.preNum"
@ -229,7 +191,7 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="完好数量" align="center" prop="goodNum" min-width="100"> <!-- <el-table-column label="完好数量" align="center" prop="goodNum" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
v-model.number="scope.row.goodNum" v-model.number="scope.row.goodNum"
@ -252,19 +214,19 @@
:disabled="scope.row.manageType == 0" :disabled="scope.row.manageType == 0"
/> />
</template> </template>
</el-table-column> </el-table-column> -->
<!-- <el-table-column label="外观判定11" align="center" prop="apDetection" min-width="120"> <el-table-column label="损坏价值判定" align="center" prop="apDetection" min-width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
v-model.number="scope.row.apDetection" v-model.number="scope.row.apDetection"
placeholder="外观判定" placeholder="损坏价值判定"
type="text" type="text"
clearable clearable
maxlength="20" maxlength="20"
style="width: 100%" style="width: 100%"
/> />
</template> </template>
</el-table-column> --> </el-table-column>
<el-table-column label="备注" align="center" prop="remark" min-width="120"> <el-table-column label="备注" align="center" prop="remark" min-width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
@ -362,25 +324,25 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="外观判定" label="损坏价值判断"
prop="apDetection" prop="apDetection"
align="center" align="center"
width="160" width="160"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-input <el-input
v-model.number="scope.row.apDetection" v-model.number="scope.row.apDetection"
placeholder="外观判定" placeholder="损坏价值判断"
maxlength="20" maxlength="20"
type="text" type="text"
clearable clearable
style="width: 100%" style="width: 100%"
/> --> />
<el-radio-group v-model="scope.row.apDetection"> <!-- <el-radio-group v-model="scope.row.apDetection">
<el-radio label="1">完好</el-radio> <el-radio label="1">完好</el-radio>
<el-radio label="0">损坏</el-radio> <el-radio label="0">损坏</el-radio>
</el-radio-group> </el-radio-group> -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="附件" align="center" width="120" :show-overflow-tooltip="true"> <el-table-column label="附件" align="center" width="120" :show-overflow-tooltip="true">
@ -449,6 +411,7 @@ import {
import { mapState } from 'vuex' import { mapState } from 'vuex'
import { getInfo, h } from '@/api/login' import { getInfo, h } from '@/api/login'
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
import { getBmTeamApi } from '@/api/equipment'
import Treeselect from '@riophae/vue-treeselect' import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css' import '@riophae/vue-treeselect/dist/vue-treeselect.css'
export default { export default {
@ -506,6 +469,7 @@ export default {
// multiple: true, // multiple: true,
}, },
unitList: [], // unitList: [], //
teamList: [], //
proList: [], // proList: [], //
unitId: null, unitId: null,
lastUnitId: null, lastUnitId: null,
@ -513,7 +477,7 @@ export default {
lastProjectId: null, lastProjectId: null,
// //
queryParams: { queryParams: {
unitId: null, teamId: null,
proId: null, proId: null,
agreementId: null, //id agreementId: null, //id
agreementCode: null, //code agreementCode: null, //code
@ -543,10 +507,10 @@ export default {
}, },
// //
queryRules: { queryRules: {
unitId: [ teamId: [
{ {
required: true, required: true,
message: '请选择退料单位', message: '请选择退料班组',
trigger: 'change' trigger: 'change'
} }
], ],
@ -673,14 +637,22 @@ export default {
children: node.children children: node.children
} }
}, },
changeTeam(val) {
console.log('🚀 ~ changeTeam ~ val:', val, this.queryParams)
setTimeout(() => {
this.GetAgreementInfoById()
}, 300)
},
handleProChange(val) {
console.log('🚀 ~ handleProChange ~ val:', val, this.queryParams)
setTimeout(() => {
this.GetAgreementInfoById()
}, 300)
},
// //
async GetUnitData() { async GetUnitData() {
const params = { const res = await getBmTeamApi({ isAll: 0 })
// projectId: this.queryParams.proId /* */, this.teamList = res.data
}
const res = await getUnitList(params)
this.unitList = res.data
this.GetAgreementInfoById()
}, },
unitChange(val) { unitChange(val) {
// if(val&&val.length>0){ // if(val&&val.length>0){
@ -698,22 +670,11 @@ export default {
const params = { const params = {
unitId: this.queryParams.unitId unitId: this.queryParams.unitId
} }
const res = await getProjectList(params) const res = await getProjectList({})
this.proList = res.data this.proList = res.data
this.queryParams.proId = null this.queryParams.proId = null
this.GetAgreementInfoById() this.GetAgreementInfoById()
}, },
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()
setTimeout(() => {
this.GetUnitData()
}, 500)
},
// //
async GetDeviceTypeTreeFn(agreementId) { async GetDeviceTypeTreeFn(agreementId) {
const params = { const params = {
@ -840,16 +801,16 @@ export default {
}, },
// id // id
async GetAgreementInfoById() { async GetAgreementInfoById() {
if (this.queryParams.unitId && this.queryParams.proId) { if (this.queryParams.teamId && this.queryParams.proId) {
const params = { const params = {
unitId: this.queryParams.unitId, teamId: this.queryParams.teamId,
projectId: this.queryParams.proId projectId: this.queryParams.proId
} }
const res = await getAgreementInfoById(params) const res = await getAgreementInfoById(params)
console.log(res) console.log(res)
if (!(res.data && res.data.agreementId)) { if (!(res.data && res.data.agreementId)) {
this.$message.error('当前单位和工程无协议!') // this.$message.error('')
this.queryParams.unitId = null this.queryParams.teamId = null
this.queryParams.proId = null this.queryParams.proId = null
this.equipmentList = [] this.equipmentList = []
this.GetUnitData() this.GetUnitData()
@ -871,7 +832,7 @@ export default {
} }
console.log(res) console.log(res)
const data = res.data const data = res.data
this.queryParams.unitId = data.backApplyInfo.unitId this.queryParams.teamId = data.backApplyInfo.teamId
// this.unitId = this.treeParentsById(this.unitList, this.queryParams.unitId) // this.unitId = this.treeParentsById(this.unitList, this.queryParams.unitId)
this.GetProData() this.GetProData()
setTimeout(() => { setTimeout(() => {
@ -1101,7 +1062,7 @@ export default {
// //
async getMachineById(typeId) { async getMachineById(typeId) {
let param = { let param = {
unitId: this.queryParams.unitId, teamId: this.queryParams.teamId,
proId: this.queryParams.proId, proId: this.queryParams.proId,
typeId: typeId typeId: typeId
} }
@ -1110,7 +1071,7 @@ export default {
this.machineList = res.data this.machineList = res.data
this.machineList.forEach(item => { this.machineList.forEach(item => {
item.bmFileInfos = [] item.bmFileInfos = []
item.apDetection = '1' item.apDetection = ''
}) })
}) })
}, },

View File

@ -9,7 +9,7 @@
width="1090px" width="1090px"
> >
<div id="printcontent" style="height: 600px;overflow-y: scroll;padding: 0 20px;"> <div id="printcontent" style="height: 600px;overflow-y: scroll;padding: 0 20px;">
<!-- <vue-easy-print tableShow ref="printRef"> --> <vue-easy-print tableShow ref="printRef">
<div id="checkId"> <div id="checkId">
<div style="text-align: center;font-weight: 600;font-size: 16px;"> <div style="text-align: center;font-weight: 600;font-size: 16px;">
机具设备退料单 机具设备退料单
@ -25,14 +25,14 @@
</div> </div>
<div class="item" style="width: 50%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;text-align: right;"> <div class="item" style="width: 50%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;text-align: right;">
<div> <div>
<span>退料单位</span><span>{{ rowObj.unitName }}</span> <span>退料班组</span><span>{{ rowObj.teamName }}</span>
</div> </div>
<div> <div>
<span>单号</span><span>{{ rowObj.code }}</span> <span>单号</span><span>{{ rowObj.code }}</span>
</div> </div>
</div> </div>
</div> </div>
<el-table :data="tableData" border style="width: 100%;"> <el-table :data="tableData" border style="width: 100%;padding: 1px 0">
<el-table-column label="编号" align="center" type="index" width="60px"/> <el-table-column label="编号" align="center" type="index" width="60px"/>
<el-table-column label="物资类型" <el-table-column label="物资类型"
align="center" align="center"
@ -106,14 +106,14 @@
</div> </div>
</div> </div>
</div> </div>
<!-- </vue-easy-print> --> </vue-easy-print>
<div> <div>
<el-button type="primary" @click="print">打印</el-button> <el-button type="primary" @click="print">打印</el-button>
</div> </div>
</div> </div>
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
<div style="height: 500px;overflow-y: scroll;padding: 0 20px;"> <div style="height: 500px;overflow-y: scroll;padding: 0 20px;">
<!-- <vue-easy-print tableShow ref="remarksPrintRef"> --> <vue-easy-print tableShow ref="remarksPrintRef">
<div id="checkIdTwo"> <div id="checkIdTwo">
<div class="remarks_box"> <div class="remarks_box">
<div class="remarks_box_title">退料编码明细</div> <div class="remarks_box_title">退料编码明细</div>
@ -136,7 +136,7 @@
</div> </div>
</div> </div>
</div> </div>
<el-table :data="tableSubData" border style="width: 100%;"> <el-table :data="tableSubData" border style="width: 100%;padding: 1px 0">
<el-table-column label="序号" align="center" type="index" width="60px"/> <el-table-column label="序号" align="center" type="index" width="60px"/>
<el-table-column prop="materialType" label="物资类型" align="center"> <el-table-column prop="materialType" label="物资类型" align="center">
</el-table-column> </el-table-column>
@ -164,7 +164,7 @@
</div> </div>
</div> </div>
</div> </div>
<!-- </vue-easy-print> --> </vue-easy-print>
</div> </div>
<div style="margin-top: 10px"> <div style="margin-top: 10px">
<el-button type="primary" @click="remarksPrint">打印</el-button> <el-button type="primary" @click="remarksPrint">打印</el-button>
@ -247,14 +247,14 @@ export default {
this.dialogShowFlag = false; this.dialogShowFlag = false;
}, },
print() { print() {
// this.$refs.printRef.print(); this.$refs.printRef.print();
printJS({ // printJS({
printable: 'checkId', // printable: 'checkId',
type: 'html', // type: 'html',
targetStyles: ['*'], // targetStyles: ['*'],
maxWidth:'1400' // maxWidth:'1400'
// // //
}); // });
console.log(this.rowObj) console.log(this.rowObj)
updatePrintStatus(this.rowObj.id).then(response => { updatePrintStatus(this.rowObj.id).then(response => {
if (response.code === 200) { if (response.code === 200) {
@ -273,14 +273,14 @@ export default {
this.open = true this.open = true
}, },
remarksPrint() { remarksPrint() {
// this.$refs.remarksPrintRef.print(); this.$refs.remarksPrintRef.print();
printJS({ // printJS({
printable: 'checkIdTwo', // printable: 'checkIdTwo',
type: 'html', // type: 'html',
targetStyles: ['*'], // targetStyles: ['*'],
maxWidth:'1400' // maxWidth:'1400'
// // //
}); // });
}, },
} }

View File

@ -43,14 +43,22 @@
></el-option> --> ></el-option> -->
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="unitId"> <el-form-item prop="teamId">
<treeselect <el-select
v-model="queryParams.unitId" v-model="queryParams.teamId"
:options="unitList" :normalizer="normalizer" placeholder="请选择班组"
:show-count="true" style="width: 240px" :disable-branch-nodes="true" clearable
noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果" filterable
placeholder="请选择退料单位" @select="unitChange" style="width: 240px"
/> >
<el-option
v-for="(item, index) in teamList"
:key="index"
:label="item.teamName"
:value="item.id"
:data-key="item.id"
/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item prop="proId"> <el-form-item prop="proId">
<treeselect <treeselect
@ -88,7 +96,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" ></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" ></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="typeList" border @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" /> --> <!-- <el-table-column type="selection" width="55" align="center" /> -->
<!-- <el-table-column label="序号" align="center" width="80" type="index"> <!-- <el-table-column label="序号" align="center" width="80" type="index">
<template scope="scope"> <template scope="scope">
@ -100,7 +108,7 @@
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span> <span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="退料单位" align="center" prop="unitName" :show-overflow-tooltip="true" width="150"/> <el-table-column label="退料班组" align="center" prop="teamName" :show-overflow-tooltip="true" width="150"/>
<el-table-column label="退料工程" align="center" prop="proName" :show-overflow-tooltip="true" width="150"/> <el-table-column label="退料工程" align="center" prop="proName" :show-overflow-tooltip="true" width="150"/>
<el-table-column label="退料单号" align="center" prop="code" :show-overflow-tooltip="true" width="150"/> <el-table-column label="退料单号" align="center" prop="code" :show-overflow-tooltip="true" width="150"/>
<el-table-column label="物资类型" align="center" prop="typeName" :show-overflow-tooltip="true" width="200"/> <el-table-column label="物资类型" align="center" prop="typeName" :show-overflow-tooltip="true" width="200"/>
@ -200,6 +208,7 @@ import {
backApplyRemove, backApplyRemove,
submitBackApply submitBackApply
} from '@/api/back/index.js' } from '@/api/back/index.js'
import { getBmTeamApi } from '@/api/equipment'
// import { getInfo, h } from '@/api/login' // import { getInfo, h } from '@/api/login'
// import { // import {
// getUnitData, // getUnitData,
@ -245,7 +254,7 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
keyWord: '', // keyWord: '', //
unitId: null, //id teamId: '', //id
lotId: '', //id lotId: '', //id
status: '', // status: '', //
typeId: '', // typeId: '', //
@ -293,7 +302,7 @@ export default {
openTextTwo: '', openTextTwo: '',
openTextThree: '', openTextThree: '',
companyId: '', companyId: '',
unitList: [], teamList: [],
proList: [], proList: [],
taskStatusList: [ taskStatusList: [
{ {
@ -336,8 +345,8 @@ export default {
const params = { const params = {
// projectId: this.queryParams.proId /* */, // projectId: this.queryParams.proId /* */,
} }
const res = await getUnitList(params) const res = await getBmTeamApi({ isAll: 0 })
this.unitList = res.data this.teamList = res.data
}, },
unitChange(val){ unitChange(val){
setTimeout(()=>{ setTimeout(()=>{
@ -349,7 +358,7 @@ export default {
const params = { const params = {
unitId: this.queryParams.unitId, unitId: this.queryParams.unitId,
} }
const res = await getProjectList(params) const res = await getProjectList({})
this.proList = res.data; this.proList = res.data;
this.queryParams.proId=null this.queryParams.proId=null
}, },
@ -377,7 +386,9 @@ export default {
this.typeList = res.data.rows this.typeList = res.data.rows
this.total = res.data.total this.total = res.data.total
this.loading = false this.loading = false
} catch (error) {} } catch (error) {
this.loading = false
}
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
@ -388,9 +399,8 @@ export default {
resetQuery() { resetQuery() {
this.queryParams.time = [] this.queryParams.time = []
// this.resetForm("queryForm"); // this.resetForm("queryForm");
this.unitId=null; this.queryParams.teamId = ""
this.projectId=null; this.projectId=null;
this.queryParams.unitId = ""
this.queryParams.proId = "" this.queryParams.proId = ""
this.$refs.queryForm.resetFields() this.$refs.queryForm.resetFields()
this.initSelectData() this.initSelectData()

View File

@ -187,7 +187,7 @@
<div v-if="scope.row.manageType==1">{{ scope.row.preNum }}</div> <div v-if="scope.row.manageType==1">{{ scope.row.preNum }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <!-- <el-table-column
label="完好数量" label="完好数量"
align="center" align="center"
prop="goodNum" prop="goodNum"
@ -200,23 +200,14 @@
prop="badNum" prop="badNum"
min-width="120" min-width="120"
> >
</el-table-column> </el-table-column> -->
<!-- <el-table-column <el-table-column
label="外观判定22" label="损坏价值判定"
align="center" align="center"
prop="apDetection" prop="apDetection"
min-width="120" min-width="120"
> >
<template slot-scope="scope"> </el-table-column>
<el-input
v-model.number="scope.row.apDetection"
placeholder="外观判定"
type="text" :readonly="isView"
clearable maxlength="20"
style="width: 100%"
/>
</template>
</el-table-column> -->
<el-table-column <el-table-column
label="备注" label="备注"
@ -297,19 +288,13 @@
<dict-tag :options="dict.type.ma_machine_status" :value="scope.row.maStatus"/> <dict-tag :options="dict.type.ma_machine_status" :value="scope.row.maStatus"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="外观判定" prop="apDetection" align="center" width="160" :show-overflow-tooltip="true"> <el-table-column label="损坏价值判定" prop="apDetection" align="center" width="160" :show-overflow-tooltip="true">
<template slot-scope="scope"> <!-- <template slot-scope="scope">
<!-- <el-input
v-model.number="scope.row.apDetection"
placeholder="外观判定" maxlength="20"
type="text" clearable :readonly="isView"
style="width: 100%"
/> -->
<el-radio-group v-model="scope.row.apDetection" disabled> <el-radio-group v-model="scope.row.apDetection" disabled>
<el-radio label="1">完好</el-radio> <el-radio label="1">完好</el-radio>
<el-radio label="0">损坏</el-radio> <el-radio label="0">损坏</el-radio>
</el-radio-group> </el-radio-group>
</template> </template> -->
</el-table-column> </el-table-column>
<el-table-column label="附件" align="center" width="100"> <el-table-column label="附件" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
@ -651,7 +636,7 @@ export default {
console.log(res) console.log(res)
const data = res.data const data = res.data
console.log(data) console.log(data)
this.queryParams.unitId = data.backApplyInfo.unitId this.queryParams.teamId = data.backApplyInfo.teamId
this.queryParams.proId = data.backApplyInfo.proId this.queryParams.proId = data.backApplyInfo.proId
this.queryParams.unitName = data.backApplyInfo.unitName this.queryParams.unitName = data.backApplyInfo.unitName
this.queryParams.proName = data.backApplyInfo.proName this.queryParams.proName = data.backApplyInfo.proName
@ -861,7 +846,7 @@ export default {
// //
getMachineById(typeId){ getMachineById(typeId){
let param = { let param = {
unitId:this.queryParams.unitId, teamId:this.queryParams.teamId,
proId:this.queryParams.proId, proId:this.queryParams.proId,
typeId:typeId typeId:typeId
} }

View File

@ -56,7 +56,7 @@
<el-table-column label="在库数量" align="center" prop="storeNum" :show-overflow-tooltip="true"> <el-table-column label="在库数量" align="center" prop="storeNum" :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 == '编码' && scope.row.storeNum > 0" @click="openRecords(scope.row)">
{{ scope.row.storeNum }} {{ scope.row.storeNum }}
</span> </span>
<!-- 否则直接显示数字 --> <!-- 否则直接显示数字 -->
@ -67,13 +67,13 @@
</el-table-column> </el-table-column>
<el-table-column label="在用数量" align="center" prop="usNum" :show-overflow-tooltip="true"> <el-table-column label="在用数量" align="center" prop="usNum" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span class="clickText" @click="openUserRecords(scope.row)"> <span v-if="scope.row.manageType == '编码' && scope.row.usNum > 0" class="clickText" @click="openUserRecords(scope.row)">
{{ scope.row.usNum }} {{ scope.row.usNum }}
</span> </span>
<!-- 否则直接显示数字 --> <!-- 否则直接显示数字 -->
<!-- <span v-else> <span v-else>
{{ scope.row.usNum }} {{ scope.row.usNum }}
</span> --> </span>
</template> </template>
</el-table-column> </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="allNum" :show-overflow-tooltip="true"></el-table-column>
@ -119,13 +119,13 @@
></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="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="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="inputUser" :show-overflow-tooltip="true" />
<el-table-column label="入库时间" align="center" prop="inputTime" :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="inputType" :show-overflow-tooltip="true" /> -->
</el-table> </el-table>
<pagination <pagination
v-show="dialogTotal > 0" v-show="dialogTotal > 0"
@ -169,7 +169,7 @@
<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="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="creator" :show-overflow-tooltip="true" /> <el-table-column label="操作人" align="center" prop="creator" :show-overflow-tooltip="true" />
<el-table-column label="出库时间" align="center" prop="outTime" :show-overflow-tooltip="true" /> <el-table-column label="出库时间" align="center" prop="outTime" :show-overflow-tooltip="true" />
<el-table-column <el-table-column
@ -194,8 +194,8 @@
<script> <script>
import { import {
getRetainedEquipmentListApi, // getRetainedEquipmentListApi,
getRetainedEquipmentListNoPageApi, // getRetainedEquipmentListNoPageApi,
getStorageInfoListApi, getStorageInfoListApi,
getUserRecordListApi, getUserRecordListApi,
getRepairRecordListApi, getRepairRecordListApi,
@ -204,6 +204,7 @@ import {
getToScrapInputListApi, getToScrapInputListApi,
getAuditInputListApi getAuditInputListApi
} from '@/api/stquery/stquery' } from '@/api/stquery/stquery'
import { getRetainedEquipmentListApi, getRetainedEquipmentListNoPageApi } from '@/api/equipment'
export default { export default {
name: '', name: '',
dicts: [], dicts: [],
@ -251,7 +252,7 @@ export default {
keyWord: undefined keyWord: undefined
}, },
useRecordList: [], // useRecordList: [], //
dialogUserTotal: 0, dialogUserTotal: 0
} }
}, },
created() { created() {
@ -268,39 +269,43 @@ export default {
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 getRetainedEquipmentListApi(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 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
} 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
@ -317,13 +322,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 = 6
return { rowspan, colspan } return { rowspan, colspan }
} }
// //
// else if // else if
// 使 // 使
else if (rowIndex === 0 && columnIndex < 7) { else if (rowIndex === 0 && columnIndex < 6) {
return { return {
rowspan: 0, rowspan: 0,
colspan: 0 colspan: 0

View File

@ -15,7 +15,7 @@
<el-option <el-option
v-for="(item, index) in uniteList" v-for="(item, index) in uniteList"
:key="index" :key="index"
:label="item.relName" :label="item.teamName"
:value="item.id" :value="item.id"
:data-key="item.id" :data-key="item.id"
/> />

View File

@ -15,7 +15,7 @@
<el-option <el-option
v-for="(item, index) in uniteList" v-for="(item, index) in uniteList"
:key="index" :key="index"
:label="item.relName" :label="item.teamName"
:value="item.id" :value="item.id"
:data-key="item.id" :data-key="item.id"
/> />