BOM隐藏

yangwl
A0010407 1 year ago
parent d4a7e01b07
commit 4c3d0e0770

@ -106,13 +106,18 @@
<ItemSelect ref="itemSelect" @onSelected="onItemSelectedEquipment" > </ItemSelect>
</el-form-item>
</el-col>
<el-col :span="12">
<!-- <el-col :span="12">
<el-form-item label="BOM材料" prop="material">
<el-input v-model="form.material" placeholder="请选择BOM材料" >
<el-button slot="append" @click="handleSelectBom" icon="el-icon-search"></el-button>
</el-input>
<ItemSelectBom ref="itemSelectBom" @onSelected="onItemSelectedBom" ></ItemSelectBom>
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item label="BOM材料" prop="material">
<el-input v-model="form.material" placeholder="请BOM材料" />
</el-form-item>
</el-col>
</el-row>
<el-row>
@ -141,10 +146,10 @@
<script>
import { listProcesscontent, getProcesscontent, delProcesscontent, addProcesscontent, updateProcesscontent } from "@/api/technology/processcontent";
import ItemSelect from "./single.vue";
import ItemSelectBom from "./singleBom.vue";
// import ItemSelectBom from "./singleBom.vue";
export default {
name: "Processcontent",
components: {ItemSelect,ItemSelectBom},
components: {ItemSelect},
data() {
return {
//
@ -210,29 +215,29 @@ export default {
}
}
},
onItemSelectedBom(obj){
if(obj != undefined && obj != null){
console.log('返回',obj);
if(this.form.material == null){
//obj = obj.slice(1);
console.log("if获取的",obj);
console.log("if获取的material",this.form.material);
this.form.material = obj;
}else{
console.log("else获取的",obj);
console.log("else获取的material",this.form.material);
this.form.material = this.form.material +","+obj;
}
}
},
// onItemSelectedBom(obj){
// if(obj != undefined && obj != null){
// console.log('',obj);
// if(this.form.material == null){
// //obj = obj.slice(1);
// console.log("if",obj);
// console.log("ifmaterial",this.form.material);
// this.form.material = obj;
// }else{
// console.log("else",obj);
// console.log("elsematerial",this.form.material);
// this.form.material = this.form.material +","+obj;
// }
// }
// },
//
handleSelectEquipment(){
this.$refs.itemSelect.showFlag = true;
},
//
handleSelectBom(){
this.$refs.itemSelectBom.showFlag = true;
},
// //
// handleSelectBom(){
// this.$refs.itemSelectBom.showFlag = true;
// },
/** 查询生产工序内容列表 */
getList() {
this.loading = true;

@ -110,13 +110,18 @@
<ItemSelect ref="itemSelect" @onSelected="onItemSelectedEquipment" > </ItemSelect>
</el-form-item>
</el-col>
<el-col :span="12">
<!-- <el-col :span="12">
<el-form-item label="BOM材料" prop="material">
<el-input v-model="form.material" placeholder="请选择BOM材料" >
<el-button slot="append" @click="handleSelectBom" icon="el-icon-search"></el-button>
</el-input>
<ItemSelectBom ref="itemSelectBom" @onSelected="onItemSelectedBom" ></ItemSelectBom>
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item label="BOM材料" prop="material">
<el-input v-model="form.material" placeholder="请输入BOM材料" />
</el-form-item>
</el-col>
</el-row>
<el-row>
@ -169,10 +174,10 @@
<script>
import { listProcesscontent, getProcesscontent, delProcesscontent, addProcesscontent, updateProcesscontent } from "@/api/technology/recipecontent";
import ItemSelect from "./single.vue";
import ItemSelectBom from "./singleBom.vue";
// import ItemSelectBom from "./singleBom.vue";
export default {
name: "Processcontent",
components: {ItemSelect,ItemSelectBom},
components: {ItemSelect},
data() {
return {
//
@ -322,29 +327,29 @@ export default {
}
}
},
onItemSelectedBom(obj){
if(obj != undefined && obj != null){
console.log('返回',obj);
if(this.form.material == null){
//obj = obj.slice(1);
console.log("if获取的",obj);
console.log("if获取的material",this.form.material);
this.form.material = obj;
}else{
console.log("else获取的",obj);
console.log("else获取的material",this.form.material);
this.form.material = this.form.material +","+obj;
}
}
},
// onItemSelectedBom(obj){
// if(obj != undefined && obj != null){
// console.log('',obj);
// if(this.form.material == null){
// //obj = obj.slice(1);
// console.log("if",obj);
// console.log("ifmaterial",this.form.material);
// this.form.material = obj;
// }else{
// console.log("else",obj);
// console.log("elsematerial",this.form.material);
// this.form.material = this.form.material +","+obj;
// }
// }
// },
//
handleSelectEquipment(){
this.$refs.itemSelect.showFlag = true;
},
//
handleSelectBom(){
this.$refs.itemSelectBom.showFlag = true;
},
// handleSelectBom(){
// this.$refs.itemSelectBom.showFlag = true;
// },
/** 删除按钮操作 */
handleDelete(row) {
const contentIds = row.contentId || this.ids;

Loading…
Cancel
Save