fix:生产工单TAB栏点击优化

This commit is contained in:
zhangxuanming 2025-01-17 10:26:29 +08:00
parent 92391ddab2
commit 6e5b8747d8
3 changed files with 24 additions and 6 deletions

View File

@ -157,7 +157,6 @@ export default {
this.workorderbomList = response.rows; this.workorderbomList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
console.log(this.form,'160')
}); });
}, },
// //

View File

@ -393,12 +393,12 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<el-tabs type="border-card" v-if="form.workorderId != null"> <el-tabs type="border-card" v-if="form.workorderId != null" v-model="activeName" @tab-click="handleClickTab">
<el-tab-pane label="BOM组成"> <el-tab-pane label="BOM组成" name="bom">
<Workorderbom ref="bomlist" :optType="optType" :workorder="form" @handleAddSub="handleSubAdd" ></Workorderbom> <Workorderbom ref="bomlist" :optType="optType" :workorder="form" @handleAddSub="handleSubAdd" ></Workorderbom>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="物料需求"> <el-tab-pane label="物料需求" name="item">
<WorkorderItemList ref="itemlist" :workorder="form"></WorkorderItemList> <WorkorderItemList ref="itemlist" :workorder="form" :itemStatus="itemStatus"></WorkorderItemList>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -436,6 +436,8 @@ export default {
}, },
data() { data() {
return { return {
itemStatus: false,
activeName: 'bom',
// //
autoGenFlag:false, autoGenFlag:false,
optType: undefined, optType: undefined,
@ -525,6 +527,13 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
handleClickTab(tab) {
if (tab.name == 'item') {
this.itemStatus = true
} else {
this.itemStatus = false
}
},
/** 查询生产工单列表 */ /** 查询生产工单列表 */
getList() { getList() {
this.loading = true; this.loading = true;

View File

@ -62,11 +62,21 @@
}, },
props: { props: {
optType: undefined, optType: undefined,
workorder: undefined workorder: undefined,
itemStatus: undefined
}, },
created() { created() {
this.getList(); this.getList();
}, },
watch: {
itemStatus: {
handler(newVal, oldVal) {
if (newVal) {
this.getList()
}
}
}
},
methods: { methods: {
/** 查询生产工单BOM组成列表 */ /** 查询生产工单BOM组成列表 */
getList() { getList() {