BOM隐藏

master
A0010407 1 year ago
parent d4a7e01b07
commit 4c3d0e0770

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

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

Loading…
Cancel
Save