diff --git a/src/api/wms/equipment.js b/src/api/wms/equipment.js index c596c4a..e5651f9 100644 --- a/src/api/wms/equipment.js +++ b/src/api/wms/equipment.js @@ -9,6 +9,15 @@ export function listEquipment(query) { }); } +// 查询辅助设备列表 +export function getEquipmentListByCategory(query) { + return request({ + url: '/wms/equipment/getEquipmentListByCategory', + method: 'get', + params: query + }); +} + // 查询设备管理详细 export function getEquipment(equipmentId) { return request({ diff --git a/src/views/wms/equipment/index.vue b/src/views/wms/equipment/index.vue index d17c429..e46b308 100644 --- a/src/views/wms/equipment/index.vue +++ b/src/views/wms/equipment/index.vue @@ -1081,6 +1081,7 @@ import { getSparePartsList, getRightSparePartsList, changeEquipmentStatus, + getEquipmentListByCategory, } from "@/api/wms/equipment"; import { getWorkCenterList, listFactory } from "@/api/wms/factory"; import { listTeamMembers } from "@/api/wms/team"; @@ -1239,6 +1240,7 @@ export default { pageNum: 1, pageSize: 1000, equipmentCategory: null, + equipmentCode: null, }, options: [ { @@ -1501,10 +1503,19 @@ export default { this.options1 = response.rows; }); + getEquipment(equipmentId).then((response) => { + console.log("getEquipment"); + this.form = response.data; + this.rightList = []; + for (let i in response.data.selectedData) { + // 将返回的备品备件列表赋值于穿梭框右边列表 + this.rightList.push(response.data.selectedData[i].spareCode); + } + + this.auxiliaryEquipmentLeftList = []; this.queryAuxiliaryEquipmentParams.equipmentCategory = "0"; - listEquipment(this.queryAuxiliaryEquipmentParams).then((response) => { - console.log("listEquipment"); - this.auxiliaryEquipmentLeftList = []; + this.queryAuxiliaryEquipmentParams.equipmentCode = this.form.equipmentCode; + getEquipmentListByCategory(this.queryAuxiliaryEquipmentParams).then((response) => { for (let i in response.rows) { // 将返回的列表赋值于穿梭框左边列表 this.auxiliaryEquipmentLeftList.push({ @@ -1518,23 +1529,13 @@ export default { console.log(this.auxiliaryEquipmentRightList); }); - getEquipment(equipmentId).then((response) => { - console.log("getEquipment"); - this.form = response.data; - this.rightList = []; - for (let i in response.data.selectedData) { - // 将返回的备品备件列表赋值于穿梭框右边列表 - this.rightList.push(response.data.selectedData[i].spareCode); - } this.auxiliaryEquipmentRightList = []; - console.log(this.auxiliaryEquipmentRightList); for (let i in response.data.selectedEquipmentData) { // 将返回的辅助设备列表赋值于穿梭框右边列表 this.auxiliaryEquipmentRightList.push( response.data.selectedEquipmentData[i].auxiliaryEquipmentCode ); } - console.log(this.auxiliaryEquipmentRightList); if (response.data.imageFiles != null) { var newFiles = [];