|
@@ -1,6 +1,6 @@
|
|
|
|
|
|
|
|
<template>
|
|
<template>
|
|
|
- <ele-modal width="1160px" :visible="visible" v-if="visible" :append-to-body="true" :close-on-click-modal="true"
|
|
|
|
|
|
|
+ <ele-modal width="1260px" :visible="visible" v-if="visible" :append-to-body="true" :close-on-click-modal="true"
|
|
|
custom-class="ele-dialog-form" title="选择物料" @update:visible="updateVisible">
|
|
custom-class="ele-dialog-form" title="选择物料" @update:visible="updateVisible">
|
|
|
<header-title title="基本信息"></header-title>
|
|
<header-title title="基本信息"></header-title>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
@@ -42,6 +42,22 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <el-tabs v-model="tabsValue" type="card" closable @tab-click="handleTab" @tab-remove="removeTab">
|
|
|
|
|
+ <el-tab-pane v-for="(item, index) in tabsList" :key="index" :label="item.name" :name="item.workCenterId">
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ </el-tab-pane>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <el-tab-pane label="添加工序" name="add" :closable="false" >
|
|
|
|
|
+ </el-tab-pane>
|
|
|
|
|
+ </el-tabs>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
<header-title title="物料BOM">
|
|
<header-title title="物料BOM">
|
|
|
<div>
|
|
<div>
|
|
|
<el-button size="small" icon="el-icon-plus" class="ele-btn-icon" type="primary"
|
|
<el-button size="small" icon="el-icon-plus" class="ele-btn-icon" type="primary"
|
|
@@ -130,12 +146,29 @@
|
|
|
</div>
|
|
</div>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
|
|
|
<!-- 物料Bom -->
|
|
<!-- 物料Bom -->
|
|
|
<MaterialAdd :visible.sync="materialShow" :data="current" :categoryId="categoryId" @done="done"
|
|
<MaterialAdd :visible.sync="materialShow" :data="current" :categoryId="categoryId" @done="done"
|
|
|
ref="materialAddRef">
|
|
ref="materialAddRef">
|
|
|
</MaterialAdd>
|
|
</MaterialAdd>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 添加工序 -->
|
|
|
|
|
+
|
|
|
|
|
+ <ele-modal width="1720px" :visible="addDialog" :append-to-body="true" :close-on-click-modal="true"
|
|
|
|
|
+ @update:visible="closeAdd">
|
|
|
|
|
+ <Production :tableData="tableData" ref="ProductionCom" />
|
|
|
|
|
+ <template v-slot:footer>
|
|
|
|
|
+ <el-button @click="closeAdd">取消</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="addParamrter">
|
|
|
|
|
+ 添加
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </ele-modal>
|
|
|
|
|
+
|
|
|
</ele-modal>
|
|
</ele-modal>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -146,11 +179,13 @@ import { pageList } from '@/api/technology/version/version.js';
|
|
|
import { getCategoryBom } from '@/api/material/product';
|
|
import { getCategoryBom } from '@/api/material/product';
|
|
|
import { bomDelete } from '@/api/material/BOM';
|
|
import { bomDelete } from '@/api/material/BOM';
|
|
|
import factorySelect from '@/components/CommomSelect/factory-select.vue';
|
|
import factorySelect from '@/components/CommomSelect/factory-select.vue';
|
|
|
|
|
+import Production from '@/views/technology/route/components/production/index.vue'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
MaterialAdd,
|
|
MaterialAdd,
|
|
|
- factorySelect
|
|
|
|
|
|
|
+ factorySelect,
|
|
|
|
|
+ Production
|
|
|
},
|
|
},
|
|
|
props: {
|
|
props: {
|
|
|
// 弹窗是否打开
|
|
// 弹窗是否打开
|
|
@@ -247,7 +282,13 @@ export default {
|
|
|
|
|
|
|
|
current: null,
|
|
current: null,
|
|
|
|
|
|
|
|
- materialShow: false
|
|
|
|
|
|
|
+ materialShow: false,
|
|
|
|
|
+
|
|
|
|
|
+ tabsList: [],
|
|
|
|
|
+ tableData: [],
|
|
|
|
|
+
|
|
|
|
|
+ addDialog: false,
|
|
|
|
|
+ tabsValue: null
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -308,6 +349,46 @@ export default {
|
|
|
this.getCategoryBomFn();
|
|
this.getCategoryBomFn();
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
+ handleTab() {
|
|
|
|
|
+ if(this.tabsValue == 'add') {
|
|
|
|
|
+ this.tableData = this.tabsList
|
|
|
|
|
+ this.addDialog = true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ removeTab(targetName) {
|
|
|
|
|
+
|
|
|
|
|
+ let tabs = this.tabsList;
|
|
|
|
|
+ let activeName = this.tabsValue;
|
|
|
|
|
+ if (activeName === targetName) {
|
|
|
|
|
+ tabs.forEach((tab, index) => {
|
|
|
|
|
+ if (tab.workCenterId === targetName) {
|
|
|
|
|
+ let nextTab = tabs[index + 1] || tabs[index - 1];
|
|
|
|
|
+ if (nextTab) {
|
|
|
|
|
+ activeName = nextTab.name;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ this.tabsValue = activeName;
|
|
|
|
|
+ this.tabsList = tabs.filter(tab => tab.workCenterId !== targetName);
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ /*关闭选择参数*/
|
|
|
|
|
+ closeAdd() {
|
|
|
|
|
+ this.$refs.ProductionCom.$refs.table.setSelectedRows([]);
|
|
|
|
|
+ this.addDialog = false;
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ addParamrter() {
|
|
|
|
|
+ let arr = this.$refs.ProductionCom.selection;
|
|
|
|
|
+ this.tabsList = arr
|
|
|
|
|
+ this.addDialog = false;
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
watch: {
|
|
watch: {
|
|
@@ -330,4 +411,9 @@ export default {
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
|
+</style>
|
|
|
|
|
|