feat(仓库管理): 添加库位拆分合并功能及界面优化
- 在WarehouseInterlaced组件中添加列级别的拆分/合并切换按钮 - 重构API接口,支持payload参数传递和超时设置 - 在overview页面实现拆分合并操作的处理逻辑 - 优化仓库网格布局和样式,移除右键菜单功能 - 添加操作确认提示和加载状态显示
This commit is contained in:
@@ -15,7 +15,12 @@
|
||||
element-loading-spinner="el-icon-loading">
|
||||
<!-- 导出所有二维码 -->
|
||||
<!-- <button buttonLoading type="primary" @click="exportAllQrcodes">导出二维码</button> -->
|
||||
<WarehouseBird :warehouse-list="warehouseList" @open-init-dialog="openInitDialog" @split-warehouse="handleSplitWarehouse"/>
|
||||
<WarehouseBird
|
||||
:warehouse-list="warehouseList"
|
||||
@open-init-dialog="openInitDialog"
|
||||
@split-warehouse="handleSplitWarehouse"
|
||||
@merge-warehouse="handleMergeWarehouse"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- 未选中节点提示 -->
|
||||
@@ -121,18 +126,51 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 处理分割库位事件
|
||||
*/
|
||||
handleSplitWarehouse(warehouse) {
|
||||
* 处理分割库位事件
|
||||
*/
|
||||
handleSplitWarehouse(payload) {
|
||||
// this.$message.success(`成功分割库位:${warehouse.actualWarehouseCode}`);
|
||||
console.log(warehouse)
|
||||
// splitActualWarehouse(warehouse.actualWarehouseId).then(res => {
|
||||
// this.$message.success(`成功分割库位:${warehouse.actualWarehouseCode}`);
|
||||
// this.getWarehouseList(this.selectedNodeId)
|
||||
// }).catch(err => {
|
||||
// this.$message.error(`分割库位失败:${err.message}`);
|
||||
// })
|
||||
console.log(payload)
|
||||
this.rightLoading = true;
|
||||
const loadingInstance = this.$loading({
|
||||
lock: true,
|
||||
text: '正在转化为小卷库位,这个操作需要一段时间,请稍候...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
splitActualWarehouse(payload).then(res => {
|
||||
this.$message.success(`成功转化为小卷库位`);
|
||||
this.getWarehouseList(this.selectedNodeId)
|
||||
}).catch(err => {
|
||||
this.$message.error(`转化为小卷库位失败:${err.message}`);
|
||||
}).finally(() => {
|
||||
this.rightLoading = false;
|
||||
loadingInstance.close();
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 处理合并库位事件
|
||||
*/
|
||||
handleMergeWarehouse(payload) {
|
||||
this.rightLoading = true;
|
||||
const loadingInstance = this.$loading({
|
||||
lock: true,
|
||||
text: '正在转化为大卷库位,这个操作需要一段时间,请稍候...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
mergeActualWarehouse(payload).then(res => {
|
||||
this.$message.success(`成功转化为大卷库位`);
|
||||
this.getWarehouseList(this.selectedNodeId)
|
||||
}).catch(err => {
|
||||
this.$message.error(`转化为大卷库位失败:${err.message}`);
|
||||
}).finally(() => {
|
||||
this.rightLoading = false;
|
||||
loadingInstance.close();
|
||||
})
|
||||
},
|
||||
|
||||
// 获取树形数据
|
||||
getWarehouseTree() {
|
||||
this.treeLoading = true;
|
||||
|
||||
Reference in New Issue
Block a user