|
|
|
@ -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("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;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
//新增 设备选择弹出框
|
|
|
|
|
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;
|
|
|
|
|