添加工艺中BOM配置

This commit is contained in:
JinLu.Yin 2022-09-12 22:45:02 +08:00
parent 21c0677161
commit 6f744f7537
2 changed files with 24 additions and 4 deletions

View File

@ -168,6 +168,11 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<el-tabs type="border-card" v-if="form.recordId != null">
<el-tab-pane v-for="(process,index) in processList" :key="index" :label="process.processName">
<Routeproductbom :routeId="form.routeId" :productId="form.productId" :processId="process.processId" :optType="optType"></Routeproductbom>
</el-tab-pane>
</el-tabs>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="cancel" v-if="optType =='view'">返回</el-button> <el-button type="primary" @click="cancel" v-if="optType =='view'">返回</el-button>
<el-button type="primary" @click="submitForm" v-else> </el-button> <el-button type="primary" @click="submitForm" v-else> </el-button>
@ -179,11 +184,13 @@
<script> <script>
import { listRouteproduct, getRouteproduct, delRouteproduct, addRouteproduct, updateRouteproduct, moveRouteproduct } from "@/api/mes/pro/routeproduct"; import { listRouteproduct, getRouteproduct, delRouteproduct, addRouteproduct, updateRouteproduct, moveRouteproduct } from "@/api/mes/pro/routeproduct";
import { listRouteprocess} from "@/api/mes/pro/routeprocess";
import Routeproductbom from "./routeproductbom.vue"
import ItemSelect from "@/components/itemSelect/single.vue"; import ItemSelect from "@/components/itemSelect/single.vue";
export default { export default {
name: "Routeproduct", name: "Routeproduct",
dicts: ['mes_time_type'], dicts: ['mes_time_type'],
components: {ItemSelect}, components: {ItemSelect,Routeproductbom},
data() { data() {
return { return {
// //
@ -200,6 +207,8 @@ export default {
total: 0, total: 0,
// //
routeproductList: [], routeproductList: [],
//
processList: [],
// //
title: "", title: "",
// //
@ -245,6 +254,15 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
//
getProcess(){
let param = {
routeId: this.form.routeId
};
listRouteprocess(param).then(response => {
this.processList = response.rows;
});
},
// //
handleSelectProduct(){ handleSelectProduct(){
this.$refs.itemSelect.showFlag = true; this.$refs.itemSelect.showFlag = true;
@ -283,6 +301,7 @@ export default {
updateBy: null, updateBy: null,
updateTime: null updateTime: null
}; };
this.getProcess();//
this.resetForm("form"); this.resetForm("form");
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */

View File

@ -1,13 +1,13 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" v-if="optType!='view'" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="primary" type="primary"
plain plain
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['mes:pro:proroute:add']" v-hasPermi="['mes:pro:proroute:add']"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
@ -32,7 +32,7 @@
<el-table-column label="规格型号" align="center" prop="specification" /> <el-table-column label="规格型号" align="center" prop="specification" />
<el-table-column label="单位" align="center" prop="unitOfMeasure" /> <el-table-column label="单位" align="center" prop="unitOfMeasure" />
<el-table-column label="用料比例" align="center" prop="quantity" /> <el-table-column label="用料比例" align="center" prop="quantity" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" v-if="optType!='view'" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
@ -112,6 +112,7 @@ export default {
routeId: null, routeId: null,
productId: null, productId: null,
processId: null, processId: null,
optType: null
}, },
data() { data() {
return { return {