Merge remote-tracking branch 'origin/master'

yangwl
wws 1 year ago
commit 442b669145

@ -35,10 +35,18 @@ export function updateEquipment(data) {
}); });
} }
// 删除设备管 // 删除设备管
export function delEquipment(equipmentId) { export function delEquipment(equipmentId) {
return request({ return request({
url: '/wms/equipment/' + equipmentId, url: '/wms/equipment/' + equipmentId,
method: 'delete' method: 'delete'
}); });
} }
// 查询部门下拉树结构
export function treeselect() {
return request({
url: '/wms/equipment/tree',
method: 'get'
})
}

@ -8,7 +8,7 @@
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['mes:pro:processcontent:add']"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@ -19,7 +19,7 @@
size="mini" size="mini"
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['mes:pro:processcontent:edit']"
>修改</el-button> >修改</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@ -30,7 +30,7 @@
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['mes:pro:processcontent:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@ -40,7 +40,7 @@
icon="el-icon-download" icon="el-icon-download"
size="mini" size="mini"
@click="handleExport" @click="handleExport"
v-hasPermi="['mes:pro:processcontent:export']"
>导出</el-button> >导出</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@ -48,7 +48,7 @@
<el-table v-loading="loading" :data="processcontentList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="processcontentList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="顺序编号" align="center" pnpmrop="orderNum" /> <el-table-column label="顺序编号" align="center" prop="orderNum" />
<el-table-column label="步骤说明" width="400px" align="center" prop="contentText" :show-overflow-tooltip="true"/> <el-table-column label="步骤说明" width="400px" align="center" prop="contentText" :show-overflow-tooltip="true"/>
<el-table-column label="辅助设备" align="center" prop="device" :show-overflow-tooltip="true"/> <el-table-column label="辅助设备" align="center" prop="device" :show-overflow-tooltip="true"/>
<el-table-column label="BOM材料" align="center" prop="material" :show-overflow-tooltip="true"/> <el-table-column label="BOM材料" align="center" prop="material" :show-overflow-tooltip="true"/>
@ -60,14 +60,14 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['mes:pro:processcontent:edit']"
>修改</el-button> >修改</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['mes:pro:processcontent:remove']"
>删除</el-button> >删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -100,12 +100,18 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<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-input>
<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="请输入辅助材料" /> <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-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -129,16 +135,16 @@
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<ItemSelect ref="itemSelect" @onSelected="onItemSelected" > </ItemSelect>
</div> </div>
</template> </template>
<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 "@/components/itemSelect/index.vue"; import ItemSelect from "./single.vue";
import ItemSelectBom from "./singleBom.vue";
export default { export default {
name: "Processcontent", name: "Processcontent",
components: { ItemSelect }, components: {ItemSelect,ItemSelectBom},
data() { data() {
return { return {
// //
@ -188,6 +194,45 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
//
onItemSelectedEquipment(obj){
if(obj != undefined && obj != null){
console.log('返回',obj);
if(this.form.device == null){
//obj = obj.slice(1);
console.log("if获取的",obj);
console.log("if获取的device",this.form.device);
this.form.device = obj;
}else{
console.log("else获取的",obj);
console.log("else获取的device",this.form.device);
this.form.device = this.form.device +","+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;
},
/** 查询生产工序内容列表 */ /** 查询生产工序内容列表 */
getList() { getList() {
this.loading = true; this.loading = true;

@ -94,7 +94,8 @@
<dict-tag :options="dict.type.split_merge" :value="scope.row.splitMerge"/> <dict-tag :options="dict.type.split_merge" :value="scope.row.splitMerge"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="线体设备" align="center" prop="workCenter" :show-overflow-tooltip="true"/> <el-table-column label="工作中心" align="center" prop="workCenter" :show-overflow-tooltip="true"/>
<el-table-column label="线体设备" align="center" prop="equipment" :show-overflow-tooltip="true"/>
<el-table-column label="工作时长" align="center" prop="workTime" :show-overflow-tooltip="true"/> <el-table-column label="工作时长" align="center" prop="workTime" :show-overflow-tooltip="true"/>
<el-table-column label="是否启用" align="center" prop="enableFlag"> <el-table-column label="是否启用" align="center" prop="enableFlag">
<template slot-scope="scope"> <template slot-scope="scope">
@ -213,7 +214,16 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span="12">
<el-form-item label="线体设备" prop="equipment">
<el-input v-model="form.equipment" placeholder="请选择线体设备" >
<el-button slot="append" @click="handleSelectEquipment" icon="el-icon-search"></el-button>
</el-input>
<ItemSelect ref="itemSelect" @onSelected="onItemSelectedEquipment" > </ItemSelect>
</el-form-item>
</el-col>
</el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="工序SOP" prop="fileList"> <el-form-item label="工序SOP" prop="fileList">
@ -327,11 +337,12 @@
import { listProcess, getProcess, delProcess, addProcess, updateProcess } from "@/api/technology/process"; import { listProcess, getProcess, delProcess, addProcess, updateProcess } from "@/api/technology/process";
import { listEquipment, getEquipment, delEquipment, addEquipment, updateEquipment } from "@/api/wms/equipment"; import { listEquipment, getEquipment, delEquipment, addEquipment, updateEquipment } from "@/api/wms/equipment";
import Processcontent from "./content.vue"; import Processcontent from "./content.vue";
import ItemSelect from "./single.vue";
export default { export default {
name: "Process", name: "Process",
dicts: ['sys_yes_no','split_merge'], dicts: ['sys_yes_no','split_merge'],
components: {Processcontent}, components: {Processcontent,ItemSelect},
data() { data() {
return { return {
treeData: [{ treeData: [{
@ -355,7 +366,6 @@ export default {
} }
] ]
}], }],
useTypeKey:0,
// //
autoGenFlag:false, autoGenFlag:false,
optType: undefined, optType: undefined,
@ -427,17 +437,11 @@ export default {
}, },
fileList:[], fileList:[],
equipmentId:'', equipmentId:'',
watch: {
equipmentTypeName(val) {
this.$refs.tree.filter(val);
}
}
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.getEquipmentList(); this.getEquipmentList();
}, },
methods: { methods: {
activated(){ activated(){
@ -534,7 +538,8 @@ export default {
equipmentTypeName :null, equipmentTypeName :null,
equipmentTypeCode:null, equipmentTypeCode:null,
equipmentName :null, equipmentName :null,
equipmentCode:null equipmentCode:null,
equipment:null,
}; };
this.autoGenFlag = false; this.autoGenFlag = false;
this.resetForm("form"); this.resetForm("form");
@ -668,7 +673,30 @@ export default {
strs += list[i].url + separator; strs += list[i].url + separator;
} }
return strs != '' ? strs.substr(0, strs.length - 1) : ''; return strs != '' ? strs.substr(0, strs.length - 1) : '';
},
//
onItemSelectedEquipment(obj){
if(obj != undefined && obj != null){
console.log('返回',obj);
if(this.form.equipment == null){
//obj = obj.slice(1);
console.log("if获取的",obj);
console.log("if获取的equipment",this.form.equipment);
this.form.equipment = obj;
console.log("赋值以后的equipment",this.form.equipment);
}else{
console.log("else获取的",obj);
console.log("else获取的equipment",this.form.equipment);
this.form.equipment = this.form.equipment +","+obj;
} }
} }
},
//
handleSelectEquipment(){
this.$refs.itemSelect.showFlag = true;
},
}
}; };
</script> </script>

@ -0,0 +1,301 @@
<template>
<el-dialog title="设备选择"
v-if="showFlag"
:visible.sync="showFlag"
:modal= false
width="1100px"
center
>
<el-row :gutter="20">
<!--分类数据-->
<el-col :span="4" :xs="24">
<div class="head-container">
<el-tree
:data="treeData"
node-key="id"
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="tree"
default-expand-all
@node-click="handleNodeClick"
/>
</div>
</el-col>
<!--设备数据-->
<el-col :span="20" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="设备编码" prop="itemCode">
<el-input
v-model="queryParams.itemCode"
placeholder="请输入设备编码"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备名称" prop="itemName">
<el-input
v-model="queryParams.itemName"
placeholder="请输入设备名称"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="itemList" @selection-change="handleEquipmentSelectionChange" ref="myTable">
<el-table-column width="50" align="center" type="selection">
<!-- <template v-slot="scope">
<el-radio v-model="selectedItemId" :label="scope.row.itemId" @change="handleRowChange(scope.row)">{{""}}</el-radio>
</template> -->
</el-table-column>
<!-- 序号 -->
<el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"></el-table-column>
<el-table-column label="设备编码" align="center" key="itemCode" prop="equipmentCode" v-if="columns[0].visible" >
</el-table-column>
<el-table-column label="设备类型编码" align="center" key="itemTypeCode" prop="equipmentTypeCode" v-if="columns[2].visible" >
</el-table-column>
<el-table-column label="设备名称" align="left" key="itemName" prop="equipmentName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitEquipmentForm"> </el-button>
<el-button @click="showFlag=false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { listEquipment, getEquipment, delEquipment, addEquipment, updateEquipment } from "@/api/wms/equipment";
import { treeselect } from "@/api/wms/equipment";
// import Treeselect from "@riophae/vue-treeselect";
// import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "MdItemSingle",
// components: { Treeselect },
data() {
return {
treeData: [{
id: '1',
label: '设备类别',
children: [{
id: 'equ_type_lg',
label: '料罐'
}, {
id: 'equ_type_cxj',
label: '成型机'
}, {
id: 'equ_type_hf',
label: '烘房'
}, {
id: 'equ_type_spj',
label: '收坯机'
}, {
id: 'equ_type_bzx',
label: '包装线'
}
]
}],
showFlag:false,
//
selectedItemId: undefined,
selectedRows: undefined,
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
itemList: null,
//
itemTypeOptions: undefined,
//
equipmentTypeCode: undefined,
defaultProps: {
id: "id",
label: "label"
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
itemName: undefined,
equipmentTypeCode: undefined,
itemTypeId: 0,
itemCodeGet: '',
},
//
columns: [
{ key: 0, label: `设备编码`, visible: true },
{ key: 1, label: `设备名称`, visible: true },
{ key: 2, label: `设备类型`, visible: true },
]
};
},
created() {
this.getList();
// this.getTreeselect();
},
methods: {
//
reset() {
this.form = {
itemId: null,
itemCode: this.processId,
itemType: null,
};
this.resetForm("form");
},
handleEquipmentSelectionChange (val) {
this.itemList = val
},
//
indexMethod(index){
return index+1 ;
},
//
/** 查询设备编码列表*/
getList() {
this.loading = true;
listEquipment(this.queryParams).then(response => {
this.itemList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
/** 查询分类下拉树结构 */
// getTreeselect() {
// treeselect().then(response => {
// this.itemTypeOptions = response.rows;
// console.log(response.rows);
// num = response.total;
// for (let id of response.rows) {
// if(id == 'equ_type_lg'){
// lable = '';
// }else if(id == 'equ_type_hf'){
// lable = '';
// }else if(id == 'equ_type_cpj'){
// lable = '';
// }else if(id == 'equ_type_bzx'){
// lable = '线';
// }else if(id == 'equ_type_cxj'){
// lable = '';
// }
// }
// });
// },
//
filterNode(value, data) {
console.log(value, data);
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
//
handleNodeClick(data) {
this.queryParams.equipmentTypeCode = data.id;
console.log(this.equipmentTypeCode);
this.handleQuery();
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// handleCurrent(row){
// if(row){
// this.selectedRows = row;
// }
// },
// handleRowDbClick(row){
// if(row){
// this.selectedRows = row;
// this.$emit('onSelected',this.selectedRows);
// this.showFlag = false;
// }
// },
//
handleEquipmentSelectionChange(selection) {
this.ids = selection.map(item => item.equipmentCode);
this.single = selection.length!==1;
this.multiple = !selection.length;
console.log("多选框",this.ids);
},
//
// handleRowChange(row) {
// debugger;
// if(row){
// this.selectedRows = row;
// }
// },
//
// confirmSelect(){
// if(this.selectedItemId ==null || this.selectedItemId==0){
// this.$notify({
// title:'',
// type:'warning',
// message: '!'
// });
// return;
// }
// this.$emit('onSelected',this.selectedRows);
// this.showFlag = false;
// }
//
submitEquipmentForm() {
const data = this.ids;
console.log("数据",data);
const equipmentCode = data.toString();
console.log("拆分数据",equipmentCode);
console.log("原来的数据",this.queryParams.itemCodeGet);
if(this.queryParams.itemCodeGet == ""){
this.queryParams.itemCodeGet = equipmentCode;
}else{
this.queryParams.itemCodeGet = this.queryParams.itemCodeGet + ','+ equipmentCode;
}
this.selectedRows = this.queryParams.itemCodeGet;
this.$emit('onSelected', this.selectedRows);
this.showFlag = false;
this.queryParams.itemCodeGet = "";
},
}
};
</script>

@ -0,0 +1,286 @@
<template>
<el-dialog title="BOM物料选择"
v-if="showFlag"
:visible.sync="showFlag"
:modal= false
width="1100px"
center
>
<el-row :gutter="20">
<!--分类数据-->
<el-col :span="4" :xs="24">
<div class="head-container">
<el-tree
:data="treeData"
node-key="id"
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="tree"
default-expand-all
@node-click="handleNodeClick"
/>
</div>
</el-col>
<!--BOM数据-->
<el-col :span="20" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="BOM物料编码" prop="itemCode">
<el-input
v-model="queryParams.itemCode"
placeholder="请输入BOM物料编码"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="BOM物料名称" prop="itemName">
<el-input
v-model="queryParams.itemName"
placeholder="请输入BOM物料名称"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="itemList" @selection-change="handleBomSelectionChange" ref="myTable">
<el-table-column width="50" align="center" type="selection">
<!-- <template v-slot="scope">
<el-radio v-model="selectedItemId" :label="scope.row.itemId" @change="handleRowChange(scope.row)">{{""}}</el-radio>
</template> -->
</el-table-column>
<!-- 序号 -->
<el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"></el-table-column>
<el-table-column label="BOM物料编码" align="center" key="itemCode" prop="materialCode" v-if="columns[0].visible" >
</el-table-column>
<el-table-column label="BOM物料名称" align="left" key="itemName" prop="materialDesc" v-if="columns[1].visible" :show-overflow-tooltip="true" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitBomForm"> </el-button>
<el-button @click="showFlag=false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { listBom, getBom, delBom, addBom, updateBom } from "@/api/wms/bom";
// import Treeselect from "@riophae/vue-treeselect";
// import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "ItemSingleBom",
// components: { Treeselect },
data() {
return {
treeData: [{
id: '1',
label: 'BOM物料类别',
children: [{
id: 'equ_type_lg',
label: '料罐'
}, {
id: 'equ_type_cxj',
label: '成型机'
}, {
id: 'equ_type_hf',
label: '烘房'
}, {
id: 'equ_type_spj',
label: '收坯机'
}, {
id: 'equ_type_bzx',
label: '包装线'
}
]
}],
showFlag:false,
//
selectedItemId: undefined,
selectedRows: undefined,
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
itemList: null,
//
itemTypeOptions: undefined,
//
materialCode: undefined,
defaultProps: {
id: "id",
label: "label"
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
itemName: undefined,
materialCode: undefined,
itemTypeId: 0,
itemCodeGet: '',
},
//
columns: [
{ key: 0, label: `BOM物料编码`, visible: true },
{ key: 1, label: `BOM物料名称`, visible: true }
]
};
},
created() {
this.getList();
// this.getTreeselect();
},
methods: {
handleEquipmentSelectionChange (val) {
this.itemList = val
},
//
indexMethod(index){
return index+1 ;
},
//
/** 查询设备编码列表*/
getList() {
this.loading = true;
listBom(this.queryParams).then(response => {
this.itemList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
/** 查询分类下拉树结构 */
// getTreeselect() {
// treeselect().then(response => {
// this.itemTypeOptions = response.rows;
// console.log(response.rows);
// num = response.total;
// for (let id of response.rows) {
// if(id == 'equ_type_lg'){
// lable = '';
// }else if(id == 'equ_type_hf'){
// lable = '';
// }else if(id == 'equ_type_cpj'){
// lable = '';
// }else if(id == 'equ_type_bzx'){
// lable = '线';
// }else if(id == 'equ_type_cxj'){
// lable = '';
// }
// }
// });
// },
//
filterNode(value, data) {
console.log(value, data);
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
//
handleNodeClick(data) {
this.queryParams.materialCode = data.id;
console.log(this.materialCode);
this.handleQuery();
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// handleCurrent(row){
// if(row){
// this.selectedRows = row;
// }
// },
// handleRowDbClick(row){
// if(row){
// this.selectedRows = row;
// this.$emit('onSelected',this.selectedRows);
// this.showFlag = false;
// }
// },
//
handleBomSelectionChange(selection) {
this.ids = selection.map(item => item.materialCode);
this.single = selection.length!==1;
this.multiple = !selection.length;
console.log("多选框",this.ids);
},
//
// handleRowChange(row) {
// debugger;
// if(row){
// this.selectedRows = row;
// }
// },
//
// confirmSelect(){
// if(this.selectedItemId ==null || this.selectedItemId==0){
// this.$notify({
// title:'',
// type:'warning',
// message: '!'
// });
// return;
// }
// this.$emit('onSelected',this.selectedRows);
// this.showFlag = false;
// }
//
submitBomForm() {
const data = this.ids;
console.log("数据",data);
const equipmentCode = data.toString();
console.log("拆分数据",materialCode);
console.log("原来的数据",this.queryParams.itemCodeGet);
if(this.queryParams.itemCodeGet == ""){
this.queryParams.itemCodeGet = materialCode;
}else{
this.queryParams.itemCodeGet = this.queryParams.itemCodeGet + ','+ materialCode;
}
this.selectedRows = this.queryParams.itemCodeGet;
this.$emit('onSelected', this.selectedRows);
this.showFlag = false;
this.queryParams.itemCodeGet = "";
},
}
};
</script>

@ -90,10 +90,8 @@
</el-table-column> </el-table-column>
<el-table-column label="设备名称" align="center" prop="equipmentName" /> <el-table-column label="设备名称" align="center" prop="equipmentName" />
<el-table-column label="规格型号" align="center" prop="equipmentSpec" /> <el-table-column label="规格型号" align="center" prop="equipmentSpec" />
<el-table-column label="设备类型ID" align="center" prop="equipmentTypeId" width="100"/>
<el-table-column label="设备类型编码" align="center" prop="equipmentTypeCode" width="100" /> <el-table-column label="设备类型编码" align="center" prop="equipmentTypeCode" width="100" />
<el-table-column label="设备类型名称" align="center" prop="equipmentTypeName" width="100"/> <el-table-column label="设备类型名称" align="center" prop="equipmentTypeName" width="100"/>
<el-table-column label="所属车间ID" align="center" prop="workshopId" width="100"/>
<el-table-column label="所属车间编码" align="center" prop="workshopCode" width="100"/> <el-table-column label="所属车间编码" align="center" prop="workshopCode" width="100"/>
<el-table-column label="所属车间名称" align="center" prop="workshopName" width="100"/> <el-table-column label="所属车间名称" align="center" prop="workshopName" width="100"/>
<el-table-column label="设备状态" align="center" prop="status" /> <el-table-column label="设备状态" align="center" prop="status" />
@ -151,8 +149,15 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="设备类型名称" prop="equipmentTypeName"> <el-form-item label="设备类型" prop="equipmentTypeCode">
<el-input v-model="form.equipmentTypeName" placeholder="请输入设备类型名称" /> <el-select v-model="form.equipmentTypeCode" placeholder="请选择设备类型">
<el-option
v-for="dict in dict.type.equ_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -212,6 +217,7 @@ import EquipmentBoundMaterials from "./equipmentBoundMaterials";
export default { export default {
name: "Equipment", name: "Equipment",
components: {EquipmentBoundMaterials}, components: {EquipmentBoundMaterials},
dicts: ['sys_normal_disable', 'equ_type'],
data() { data() {
return { return {
// //

Loading…
Cancel
Save