This commit is contained in:
hayu 2025-09-17 20:04:30 +08:00
parent ae65a5d711
commit 7d3193f836
1 changed files with 63 additions and 19 deletions

View File

@ -45,7 +45,7 @@
clearable clearable
filterable filterable
style="width: 240px" style="width: 240px"
@change="getTeamList" @change="getTeamListAndSubUnit"
> >
<el-option <el-option
v-for="item in proOptions" v-for="item in proOptions"
@ -63,6 +63,7 @@
clearable clearable
filterable filterable
style="width: 240px" style="width: 240px"
@change="getTeamList"
> >
<el-option <el-option
v-for="item in subUnitOptions" v-for="item in subUnitOptions"
@ -150,24 +151,27 @@
<div class="tip-num">{{ tipForm.countNum || 0 }}</div> <div class="tip-num">{{ tipForm.countNum || 0 }}</div>
<div class="tip-text">计件类总保有量</div> <div class="tip-text">计件类总保有量</div>
</div> </div>
<div class="tip-box">
<div class="tip-num">{{ tipForm.ropeNum || 0 }}</div>
<div class="tip-text">绳索类总保有量</div>
</div>
<div class="tip-box"> <div class="tip-box">
<div class="tip-num">{{ tipForm.inCountNum || 0 }}</div> <div class="tip-num">{{ tipForm.inCountNum || 0 }}</div>
<div class="tip-text">计件类站内数量</div> <div class="tip-text">计件类站内数量</div>
</div> </div>
<div class="tip-box">
<div class="tip-num">{{ tipForm.inRopeNum || 0 }}</div>
<div class="tip-text">绳索类站内数量</div>
</div>
<div class="tip-box"> <div class="tip-box">
<div class="tip-num">{{ tipForm.useCountNum || 0 }}</div> <div class="tip-num">{{ tipForm.useCountNum || 0 }}</div>
<div class="tip-text">计件类在用数量</div> <div class="tip-text">计件类在用数量</div>
</div> </div>
<div class="tip-box">
<div class="tip-num">{{ tipForm.ropeNum || 0 }}</div>
<div class="tip-text">绳索类总保有量</div>
</div>
<div class="tip-box">
<div class="tip-num">{{ tipForm.inRopeNum || 0 }}</div>
<div class="tip-text">绳索类站内数量</div>
</div>
<div class="tip-box"> <div class="tip-box">
<div class="tip-num">{{ tipForm.useRopeNum || 0 }}</div> <div class="tip-num">{{ tipForm.useRopeNum || 0 }}</div>
<div class="tip-text">绳索类在用数量</div> <div class="tip-text">绳索类在用数量</div>
@ -357,13 +361,6 @@ export default {
this.getDeviceType() this.getDeviceType()
}, },
methods: { methods: {
// async getSelect() {
// await this.getImpUnitOptions()
// await this.handleImpUnitChange()
// await this.handleDepartChange()
// await this.getTeamList()
// await this.getSubUnitList()
// },
/** 获取分公司下拉 */ /** 获取分公司下拉 */
async getImpUnitOptions() { async getImpUnitOptions() {
try { try {
@ -389,7 +386,7 @@ export default {
teamName:this.queryParams.teamName, teamName:this.queryParams.teamName,
subUnitName:this.queryParams.subUnitName, subUnitName:this.queryParams.subUnitName,
} }
const res = await getDepartListByImpUnitApi({ params }) const res = await getDepartListByImpUnitApi(params)
this.departOptions = res.data.map(item => ({ this.departOptions = res.data.map(item => ({
label: item.departName, // label: item.departName, //
value: item.departName value: item.departName
@ -422,6 +419,48 @@ export default {
} }
}, },
/** 项目部选择变化,加载工程 */ /** 项目部选择变化,加载工程 */
async getTeamListAndSubUnit() {
this.queryParams.teamName = null //
this.teamOptions = [] //
try {
//
const params = {
impUnitName: this.queryParams.impUnitName, //
departName: this.queryParams.departName, //
proName: this.queryParams.proName,
teamName:this.queryParams.teamName,
subUnitName:this.queryParams.subUnitName,
}
const res = await getTeamList(params)
this.teamOptions = res.data.map(item => ({
label: item.teamName, //
value: item.teamName
}))
} catch (e) {
console.error('获取班组下拉失败:', e)
}
this.queryParams.subUnitName = null //
this.subUnitOptions = [] //
try {
//
const params = {
impUnitName: this.queryParams.impUnitName, //
departName: this.queryParams.departName, //
proName: this.queryParams.proName,
teamName:this.queryParams.teamName,
subUnitName:this.queryParams.subUnitName,
}
const res = await getSubUnitList(params)
this.subUnitOptions = res.data.map(item => ({
label: item.subUnitName,
value: item.subUnitName
}))
} catch (e) {
console.error('获取分包单位下拉失败:', e)
}
},
async getTeamList() { async getTeamList() {
this.queryParams.teamName = null // this.queryParams.teamName = null //
this.teamOptions = [] // this.teamOptions = [] //
@ -441,7 +480,7 @@ export default {
value: item.teamName value: item.teamName
})) }))
} catch (e) { } catch (e) {
console.error('获取工程下拉失败:', e) console.error('获取班组下拉失败:', e)
} }
}, },
async getSubUnitList() { async getSubUnitList() {
@ -463,7 +502,7 @@ export default {
value: item.subUnitName value: item.subUnitName
})) }))
} catch (e) { } catch (e) {
console.error('获取工程下拉失败:', e) console.error('获取分包单位下拉失败:', e)
} }
}, },
getDeviceType() { getDeviceType() {
@ -536,6 +575,11 @@ export default {
this.resetForm('queryForm') this.resetForm('queryForm')
this.handleQuery() this.handleQuery()
this.handleMaModel() this.handleMaModel()
this.getImpUnitOptions()
this.handleImpUnitChange()
this.handleDepartChange()
this.getTeamList()
this.getSubUnitList()
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {