工厂选择+设备选择

master
A0010407 1 year ago
parent 0f4f8ec394
commit 13dd814849

@ -50,3 +50,11 @@ export function treeselect() {
method: 'get'
})
}
// 查询设备类型
export function getEquipmentTypeList() {
return request({
url: '/wms/equipment/getEquipmentTypeList',
method: 'get'
});
}

@ -1,6 +1,6 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="108px">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="98px">
<el-form-item label="设备编码" prop="equipmentCode">
<el-input
v-model="queryParams.equipmentCode"
@ -17,13 +17,16 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备类型编码" prop="equipmentTypeCode">
<el-input
<el-form-item label="设备类型" prop="equipmentTypeCode">
<el-select
v-model="queryParams.equipmentTypeCode"
placeholder="请输入设备类型编码"
placeholder="请选择设备类型"
@change="$forceUpdate()"
clearable
@keyup.enter.native="handleQuery"
/>
style="width:205px"
@keyup.enter.native="handleQuery">
<el-option v-for="item in equipmentTypeOption" :key="item.equipmentTypeCode" :label="item.equipmentTypeName" :value="item.equipmentTypeCode"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
@ -97,8 +100,8 @@
>{{scope.row.equipmentCode}}</el-button>
</template>
</el-table-column>
<el-table-column label="设备名称" align="center" prop="equipmentName" />
<el-table-column label="规格型号" align="center" prop="equipmentSpec" />
<el-table-column label="设备名称" align="center" prop="equipmentName" width="120"/>
<el-table-column label="规格型号" align="center" prop="equipmentSpec" width="120"/>
<el-table-column label="设备类型编码" align="center" prop="equipmentTypeCode" width="120" />
<el-table-column label="设备类型名称" align="center" prop="equipmentTypeName" width="120"/>
<el-table-column label="所属工作中心编码" align="center" prop="workshopCode" width="150"/>
@ -391,13 +394,14 @@
</template>
<script>
import { listEquipment, getEquipment, delEquipment, addEquipment, updateEquipment} from "@/api/wms/equipment";
import { listEquipment, getEquipment, delEquipment, addEquipment, updateEquipment,getEquipmentTypeList} from "@/api/wms/equipment";
import { getWorkCenterList,listFactory} from "@/api/wms/factory";
export default {
name: "Equipment",
dicts: ['sys_normal_disable', 'equ_type'],
data() {
return {
equipmentTypeOption:[],
workCenter:[],
options1: [],
value: '',
@ -466,8 +470,17 @@ export default {
},
created() {
this.getList();
this.getEquipmentType();
},
methods: {
/** 查询设备分类 */
getEquipmentType() {
getEquipmentTypeList().then(response => {
console.log(response.rows);
this.equipmentTypeOption = response.rows;
console.log(this.treeData1);
});
},
selectWorkCenter(){
this.form.workshopCode = this.form.workCenter;
},

@ -18,15 +18,15 @@
/>
</el-form-item>
<el-form-item label="启用状态" prop="status">
<el-input
<el-select
v-model="queryParams.status"
placeholder="请输入启用状态(1/0)"
placeholder="请选择启用状态"
@change="$forceUpdate()"
clearable
@keyup.enter.native="handleQuery"
/>
<!-- <el-select v-model="form.status" placeholder="请选择是否启用" @change="$forceUpdate()" clearable>
style="width:205px"
@keyup.enter.native="handleQuery">
<el-option v-for="item in options" :key="item.status" :label="item.label" :value="item.status"></el-option>
</el-select> -->
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
@ -71,7 +71,7 @@
<el-table-column label="创建时间" align="center" prop="createTime" />
<el-table-column prop="status" label="是否启用" align="center" >
<template slot-scope="scope">
{{ scope.row.status == 1 ? "是" : "否" }}
{{ scope.row.status == 1 ? "启用" : "停用" }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@ -177,10 +177,10 @@ export default {
},
options: [{
status: "1",
label: ''
label: '启用'
}, {
status: "0",
label: ''
label: '停用'
}],
//
form: {},

Loading…
Cancel
Save