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.total = response.total;
this.loading = false;
console.log(this.form,'160')
});
},
//

View File

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

View File

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