常熟吴彦祖 3 months ago
parent
commit
792291c799
  1. 3
      src/api/automatedWarehouse/palletPacking.js
  2. 57
      src/views/modules/automatedWarehouse/palletSorting.vue

3
src/api/automatedWarehouse/palletPacking.js

@ -75,3 +75,6 @@ export const completePalletAssemblyForFenJian = data => createAPI(`/wcsIntegrati
// 调用空托盘到指定站点(选择区域、站点、栈板类型)- rqrq
export const callEmptyPalletToStation = data => createAPI(`/wcsIntegration/callEmptyPalletToStation`,'post',data)
// 结束分拣(下达预约送货任务到Z104区域,并更新pallet_detail的wcs_flag为1)- rqrq
export const finishSorting = data => createAPI(`/wcsIntegration/finishSorting`,'post',data)

57
src/views/modules/automatedWarehouse/palletSorting.vue

@ -30,6 +30,9 @@
spellcheck="false"
ref="palletInput"
/>
<button class="action-btn secondary" style="flex: 0.25; margin: 0;" @click="handleFinishSorting" :disabled="finishSortingLoading">
{{ finishSortingLoading ? '处理中...' : '结束分拣' }}
</button>
<!-- <button-->
<!-- class="action-btn secondary"-->
<!-- style="flex: 0.25; margin: 0;"-->
@ -432,7 +435,8 @@ import {
getAvailableAgvStations,
callPalletToStation,
completePalletAssemblyForFenJian,
getAvailablePositionsForLayer
getAvailablePositionsForLayer,
finishSorting
} from '../../../api/automatedWarehouse/palletPacking'
export default {
@ -502,6 +506,7 @@ export default {
editPositionLoading: false, //
callPalletLoading: false, // Call
completeAssemblyLoading: false, //
finishSortingLoading: false, // - rqrq
};
},
methods: {
@ -1447,6 +1452,56 @@ export default {
showDetailModal(){
this.detailModalVisible=true;
},
// - rqrq
handleFinishSorting() {
if (!this.palletCode) {
this.$message.error('请先扫描栈板');
return;
}
//
// if (!this.detailList || this.detailList.length === 0) {
// this.$message.error('');
// return;
// }
// - rqrq
this.$confirm('确认结束分拣并将栈板送至缓存区(Z104)吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.doFinishSorting();
}).catch(() => {
//
});
},
// - rqrq
doFinishSorting() {
// loading - rqrq
this.finishSortingLoading = true;
finishSorting({
site: this.site,
palletId: this.palletCode
}).then(({ data }) => {
if (data.code === 0) {
this.$message.success('结束分拣成功,已创建送货任务');
// - rqrq
this.resetPage();
} else {
this.$message.error(data.msg || '结束分拣失败');
}
}).catch(error => {
console.error('结束分拣失败:', error);
this.$message.error('结束分拣失败');
}).finally(() => {
// - rqrq
this.finishSortingLoading = false;
});
},
},
mounted() {
this.$nextTick(() => {

Loading…
Cancel
Save