|
|
@ -98,7 +98,7 @@
|
|
|
|
</el-col>-->
|
|
|
|
</el-col>-->
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="24">
|
|
|
|
<el-form-item label="辅助设备" prop="device">
|
|
|
|
<el-form-item label="辅助设备" prop="device">
|
|
|
|
<el-input v-model="form.device" placeholder="请选择辅助设备" >
|
|
|
|
<el-input v-model="form.device" placeholder="请选择辅助设备" >
|
|
|
|
<el-button slot="append" @click="handleSelectEquipment" icon="el-icon-search"></el-button>
|
|
|
|
<el-button slot="append" @click="handleSelectEquipment" icon="el-icon-search"></el-button>
|
|
|
@ -106,19 +106,16 @@
|
|
|
|
<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-row>
|
|
|
|
<el-form-item label="BOM材料" prop="material">
|
|
|
|
<el-row>
|
|
|
|
<el-input v-model="form.material" placeholder="请选择BOM材料" >
|
|
|
|
<el-col :span="24">
|
|
|
|
<el-button slot="append" @click="handleSelectBom" icon="el-icon-search"></el-button>
|
|
|
|
<el-form-item label="BOM材料" prop="material">
|
|
|
|
</el-input>
|
|
|
|
<el-input v-model="form.material" placeholder="请选择BOM材料" >
|
|
|
|
<ItemSelectBom ref="itemSelectBom" @onSelected="onItemSelectedBom" ></ItemSelectBom>
|
|
|
|
<el-button slot="append" @click="handleSelectBom" icon="el-icon-search"></el-button>
|
|
|
|
</el-form-item>
|
|
|
|
</el-input>
|
|
|
|
</el-col> -->
|
|
|
|
<ItemSelectBom ref="itemSelectBom" @onSelected="onItemSelectedBom" ></ItemSelectBom>
|
|
|
|
<el-col :span="12">
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="BOM材料" prop="material">
|
|
|
|
</el-col>
|
|
|
|
<el-input v-model="form.material" placeholder="请BOM材料" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="24">
|
|
|
|
<el-col :span="24">
|
|
|
@ -146,10 +143,12 @@
|
|
|
|
<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";
|
|
|
|
|
|
|
|
import { Message } from 'element-ui'
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "Processcontent",
|
|
|
|
name: "Processcontent",
|
|
|
|
components: {ItemSelect},
|
|
|
|
components: {ItemSelect,ItemSelectBom},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
// 遮罩层
|
|
|
|
// 遮罩层
|
|
|
@ -171,6 +170,8 @@ export default {
|
|
|
|
// 是否显示弹出层
|
|
|
|
// 是否显示弹出层
|
|
|
|
open: false,
|
|
|
|
open: false,
|
|
|
|
// 查询参数
|
|
|
|
// 查询参数
|
|
|
|
|
|
|
|
checkMaterial :null,
|
|
|
|
|
|
|
|
checkDevice :null,
|
|
|
|
queryParams: {
|
|
|
|
queryParams: {
|
|
|
|
pageNum: 1,
|
|
|
|
pageNum: 1,
|
|
|
|
pageSize: 10,
|
|
|
|
pageSize: 10,
|
|
|
@ -201,43 +202,61 @@ export default {
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
//新增 设备选择弹出框
|
|
|
|
//新增 设备选择弹出框
|
|
|
|
onItemSelectedEquipment(obj){
|
|
|
|
onItemSelectedEquipment(obj){
|
|
|
|
if(obj != undefined && obj != null){
|
|
|
|
|
|
|
|
console.log('返回',obj);
|
|
|
|
|
|
|
|
if(this.form.device == null){
|
|
|
|
if(this.form.device == null){
|
|
|
|
//obj = obj.slice(1);
|
|
|
|
console.log("device是空,if获取的obj",obj);
|
|
|
|
console.log("if获取的",obj);
|
|
|
|
console.log("device是空,if获取的device",this.form.device);
|
|
|
|
console.log("if获取的device",this.form.device);
|
|
|
|
|
|
|
|
this.form.device = obj;
|
|
|
|
this.form.device = obj;
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
console.log("else获取的",obj);
|
|
|
|
if(obj != undefined && obj != null){
|
|
|
|
console.log("else获取的device",this.form.device);
|
|
|
|
const a = obj.split(',');
|
|
|
|
this.form.device = this.form.device +","+obj;
|
|
|
|
const len = obj.split(',').length;
|
|
|
|
|
|
|
|
console.log('切割的数组',obj.split(','));
|
|
|
|
|
|
|
|
a.forEach(item => {
|
|
|
|
|
|
|
|
this.checkDevice = this.form.device.search(item) != -1;
|
|
|
|
|
|
|
|
console.log("check的值",this.checkDevice);
|
|
|
|
|
|
|
|
if(this.checkDevice == true){
|
|
|
|
|
|
|
|
console.log("重复添加",true);
|
|
|
|
|
|
|
|
Message.warning('您已经添加过该设备,请勿重复添加!!!');
|
|
|
|
|
|
|
|
}else if(this.checkDevice == false){
|
|
|
|
|
|
|
|
this.form.device = this.form.device +","+item;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//新增 设备选择弹出框
|
|
|
|
|
|
|
|
onItemSelectedBom(obj){
|
|
|
|
|
|
|
|
if(this.form.material == null){
|
|
|
|
|
|
|
|
console.log("material是空,if获取的obj",obj);
|
|
|
|
|
|
|
|
console.log("material是空,if获取的material",this.form.material);
|
|
|
|
|
|
|
|
this.form.material = obj;
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
if(obj != undefined && obj != null){
|
|
|
|
|
|
|
|
const a = obj.split(',');
|
|
|
|
|
|
|
|
const len = obj.split(',').length;
|
|
|
|
|
|
|
|
console.log('切割的数组',obj.split(','));
|
|
|
|
|
|
|
|
a.forEach(item => {
|
|
|
|
|
|
|
|
this.checkMaterial = this.form.material.search(item) != -1;
|
|
|
|
|
|
|
|
console.log("check的值",this.check);
|
|
|
|
|
|
|
|
if(this.checkMaterial == true){
|
|
|
|
|
|
|
|
console.log("重复添加",true);
|
|
|
|
|
|
|
|
Message.warning('您已经添加过该物料Bom,请勿重复添加!!!');
|
|
|
|
|
|
|
|
}else if(this.checkMaterial == false){
|
|
|
|
|
|
|
|
this.form.material = this.form.material +","+item;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 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(){
|
|
|
|
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;
|
|
|
|