Browse Source

一些bug

master
常熟吴彦祖 3 months ago
parent
commit
2eae4b403c
  1. 4
      src/api/automatedWarehouse/palletPacking.js
  2. 36
      src/views/modules/automatedWarehouse/palletAssembly.vue
  3. 44
      src/views/modules/automatedWarehouse/palletPacking.vue

4
src/api/automatedWarehouse/palletPacking.js

@ -30,6 +30,10 @@ export const updatePalletDetailPosition = data => createAPI(`/wcsIntegration/upd
// 获取AGV站点列表 - AI制作 // 获取AGV站点列表 - AI制作
export const getAgvStations = data => createAPI(`/wcsIntegration/getAgvStations`,'post',data) export const getAgvStations = data => createAPI(`/wcsIntegration/getAgvStations`,'post',data)
// 获取可用的AGV站点列表(已在后台过滤状态和类型)- AI制作
// 参数:statusDb - 站点状态(0-空闲,1-有货),不传则返回所有正式站点
export const getAvailableAgvStations = data => createAPI(`/wcsIntegration/getAvailableAgvStations`,'post',data)
// 根据起点站点获取可达目标站点 - AI制作 // 根据起点站点获取可达目标站点 - AI制作
export const getTargetStations = data => createAPI(`/wcsIntegration/getTargetStations`,'post',data) export const getTargetStations = data => createAPI(`/wcsIntegration/getTargetStations`,'post',data)

36
src/views/modules/automatedWarehouse/palletAssembly.vue

@ -353,6 +353,7 @@ import {
getPalletTypeAreas, getPalletTypeAreas,
updatePalletTypeAndAutoSort, updatePalletTypeAndAutoSort,
getAgvStations, getAgvStations,
getAvailableAgvStations,
callPalletToStation, callPalletToStation,
completePalletAssembly completePalletAssembly
} from '../../../api/automatedWarehouse/palletPacking' } from '../../../api/automatedWarehouse/palletPacking'
@ -637,24 +638,29 @@ export default {
this.selectedCallStartStation = ''; this.selectedCallStartStation = '';
this.selectedCallTargetStation = ''; this.selectedCallTargetStation = '';
// AGV
getAgvStations({}).then(({ data }) => {
if (data.code === 0) {
const allStations = data.stations || [];
// statusDb1
this.callStartStationOptions = allStations.filter(station =>
station.statusDb === 1 && station.stationType === '正式站点'
);
// statusDb0
this.callTargetStationOptions = allStations.filter(station =>
station.statusDb === 0 && station.stationType === '正式站点'
);
//
getAvailableAgvStations({ statusDb: 1 }).then(({ data }) => {
if (data && data.code === 0) {
this.callStartStationOptions = data.stations || [];
console.log('起始站点列表:', this.callStartStationOptions);
} else {
this.$message.error(data.msg || '获取起始站点列表失败');
}
}).catch(error => {
console.error('获取起始站点列表失败:', error);
this.$message.error('获取起始站点列表失败');
});
//
getAvailableAgvStations({ statusDb: 0 }).then(({ data }) => {
if (data && data.code === 0) {
this.callTargetStationOptions = data.stations || [];
} else { } else {
this.$message.error(data.msg || '获取站点列表失败');
this.$message.error(data.msg || '获取目标站点列表失败');
} }
}).catch(error => { }).catch(error => {
console.error('获取站点列表失败:', error);
this.$message.error('获取站点列表失败');
console.error('获取目标站点列表失败:', error);
this.$message.error('获取目标站点列表失败');
}); });
}, },

44
src/views/modules/automatedWarehouse/palletPacking.vue

@ -408,6 +408,7 @@ import {
getLayersForEdit, getLayersForEdit,
updatePalletDetailPosition, updatePalletDetailPosition,
getAgvStations, getAgvStations,
getAvailableAgvStations,
callPalletToStation, callPalletToStation,
callPalletToStationWithUpdateZuPan, callPalletToStationWithUpdateZuPan,
getPalletInfo, getPalletInfo,
@ -710,23 +711,28 @@ export default {
this.selectedCallTargetStation = ''; this.selectedCallTargetStation = '';
// AGV // AGV
getAgvStations({}).then(({ data }) => {
if (data.code === 0) {
const allStations = data.stations || [];
// statusDb1
this.callStartStationOptions = allStations.filter(station =>
station.statusDb === 1 && station.stationType === '正式站点'
);
// statusDb0
this.callTargetStationOptions = allStations.filter(station =>
station.statusDb === 0 && station.stationType === '正式站点'
);
//
getAvailableAgvStations({ statusDb: 1 }).then(({ data }) => {
if (data && data.code === 0) {
this.callStartStationOptions = data.stations || [];
} else { } else {
this.$message.error(data.msg || '获取站点列表失败');
this.$message.error(data.msg || '获取起始站点列表失败');
} }
}).catch(error => { }).catch(error => {
console.error('获取站点列表失败:', error);
this.$message.error('获取站点列表失败');
console.error('获取起始站点列表失败:', error);
this.$message.error('获取起始站点列表失败');
});
//
getAvailableAgvStations({ statusDb: 0 }).then(({ data }) => {
if (data && data.code === 0) {
this.callTargetStationOptions = data.stations || [];
} else {
this.$message.error(data.msg || '获取目标站点列表失败');
}
}).catch(error => {
console.error('获取目标站点列表失败:', error);
this.$message.error('获取目标站点列表失败');
}); });
}, },
@ -1056,13 +1062,11 @@ export default {
this.selectedTargetArea = ''; this.selectedTargetArea = '';
this.transportAreaOptions = []; this.transportAreaOptions = [];
// AGVstatusDb = 0
getAgvStations({}).then(({ data }) => {
//
getAvailableAgvStations({ statusDb: 0 }).then(({ data }) => {
if (data.code === 0) { if (data.code === 0) {
// statusDb0stationType''
const freeStations = (data.stations || []).filter(station =>
station.statusDb === 0 && station.stationType === '正式站点'
);
// 使
const freeStations = data.stations || [];
console.log('空闲且为正式站点的数量:', freeStations.length); console.log('空闲且为正式站点的数量:', freeStations.length);

Loading…
Cancel
Save