This commit is contained in:
parent
ae65a5d711
commit
7d3193f836
|
|
@ -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() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue