2024-3-22 基础数据表模块-设备管理-设备类别bug问题+增加设备大类,调整页面

master
A0010407 8 months ago
parent 718990b50d
commit db36f9a98a

@ -68,6 +68,14 @@ export function getEquipmentTypeList() {
});
}
// 查询字典中的设备类型
export function getEquipmentTypeDeptList() {
return request({
url: '/wms/equipment/getEquipmentTypeDeptList',
method: 'get'
});
}
// 查询设备备件
export function getSparePartsList() {
return request({

@ -63,7 +63,7 @@
<el-form-item label="设备类别" prop="equipmentCategory">
<el-select
v-model="queryParams.equipmentCategory"
placeholder="设备类别(组线/设备)"
placeholder="设备类别(大类)"
style="width: 200px"
clearable
>
@ -223,7 +223,7 @@
<el-table-column
align="center"
prop="equipmentCategory"
label="设备类别(组线/设备)"
label="设备类别(大类)"
width="150"
>
<template slot-scope="scope">
@ -456,22 +456,25 @@
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="8">
<el-form-item label="设备类型" prop="equipmentTypeCode">
<el-select
v-model="form.equipmentTypeCode"
placeholder="请选择设备类型"
filterable
style="width: 195px"
>
<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-col>
<el-form-item label="设备类型" prop="equipmentTypeCode">
<el-select
v-model="form.equipmentTypeCode"
placeholder="请选择设备类型"
@change="$forceUpdate()"
@blur="filterEquipmentTypeDept"
clearable
filterable
@keyup.enter.native="handleQuery"
>
<el-option
v-for="item in equipmentTypeDept"
:key="item.equipmentTypeCode"
:label="item.equipmentTypeName"
:value="item.equipmentTypeCode"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="所属工作中心" prop="workCenter">
<template>
@ -590,6 +593,16 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input
v-model="form.remark"
placeholder="请输入备注"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="24">
<el-form-item label="设备二维码" prop="qrFileList">
@ -822,46 +835,12 @@
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button v-if="this.repairRecordSteps > 0" @click="stepLast"
>上一步</el-button
>
<el-button
v-if="
this.repairRecordSteps < 4 && this.form.equipmentCategory == '1'
"
@click="stepNext"
>下一步</el-button
>
<el-button
v-if="
this.repairRecordSteps < 3 && this.form.equipmentCategory == '0'
"
@click="stepNext"
>下一步</el-button
>
<el-button
v-if="
this.repairRecordSteps < 3 && this.form.equipmentCategory == null
"
disabled
>下一步</el-button
>
<el-button
v-if="
this.repairRecordSteps == 4 && this.form.equipmentCategory == '1'
"
type="primary"
@click="submitForm"
> </el-button
>
<el-button
v-if="
this.repairRecordSteps == 3 && this.form.equipmentCategory == '0'
"
type="primary"
@click="submitForm"
> </el-button
>
<el-button v-if="this.repairRecordSteps > 0" @click="stepLast"></el-button>
<el-button v-if="this.repairRecordSteps < 4 && this.form.equipmentCategory == '1'" @click="stepNext"></el-button>
<el-button v-if="this.repairRecordSteps < 3 && this.form.equipmentCategory != '1' " @click="stepNext"></el-button>
<el-button v-if="this.repairRecordSteps < 3 && this.form.equipmentCategory == null" disabled>下一步</el-button>
<el-button v-if="this.repairRecordSteps == 4 && this.form.equipmentCategory == '1' " type="primary" @click="submitForm"> </el-button>
<el-button v-if="this.repairRecordSteps == 3 && this.form.equipmentCategory != '1'" type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
@ -1134,6 +1113,7 @@ import {
getRightSparePartsList,
changeEquipmentStatus,
getEquipmentListByCategory,
getEquipmentTypeDeptList,
} from "@/api/wms/equipment";
import { getWorkCenterList, listFactory } from "@/api/wms/factory";
import { listTeamMembers } from "@/api/wms/team";
@ -1235,6 +1215,7 @@ export default {
qrFileList: [],
barCodeFileList: [],
equipmentTypeOption: [],
equipmentTypeDept: [],
equipmentHeadOption: [],
workCenter: [],
options1: [],
@ -1364,6 +1345,7 @@ export default {
this.getEquipmentType();
this.getEquipmentHead();
this.sparePartsList();
this.selectEquipmentTypeDept();
},
methods: {
//
@ -1382,6 +1364,17 @@ export default {
this.equipmentHeadOption = response.rows;
});
},
/** 查询设备分类字典里面维护的 */
selectEquipmentTypeDept() {
getEquipmentTypeDeptList().then((response) => {
this.equipmentTypeDept = response.rows;
});
},
filterEquipmentTypeDept(even) {
if (even.target.value) {
this.form.equipmentTypeCode = even.target.value;
}
},
/** 查询设备分类 */
getEquipmentType() {
getEquipmentTypeList().then((response) => {
@ -1524,9 +1517,13 @@ export default {
/** 新增按钮操作 */
handleAdd() {
this.reset();
//
this.selectEquipmentTypeDept();
//
getWorkCenterList().then((response) => {
this.options1 = response.data;
});
this.repairRecordSteps = 0;
this.rightList = [];
this.auxiliaryEquipmentLeftList = [];

Loading…
Cancel
Save