Commit fd7b9b1a authored by honghy's avatar honghy Committed by wux

空运备货-新增无需打包批量操作

parent e8e6f11a
......@@ -915,6 +915,16 @@ export function noNeedPack(orderItemId) {
})
}
// 批量无需打包
export function noNeedPacks(data) {
return request({
url: "/order/order-warehouse-in/no-need-to-packs",
method: "post",
data
})
}
// 完成打包
export function finishPacked(data) {
return request({
......
......@@ -5,6 +5,7 @@
<order-base-info :order="order" stocking></order-base-info>
<div class="flex items-center">
<div class="flex-1 page-title">{{ $t("货物信息") }}</div>
<el-button type="primary" @click="noNeedPacks" :loading="loading">{{$t("无需打包")}}</el-button>
<el-button type="primary" @click="showNewProductDialog = true">{{
$t("添加新品名")
}}</el-button>
......@@ -22,7 +23,10 @@
:data="order.orderItemVOList || []"
default-expand-all
style="width: 100%"
@select="checkboxSelect"
@select-all="checkboxSelect"
>
<el-table-column type="selection" align="center" width="55" fixed="left" />
<!--入仓记录-->
<el-table-column type="expand">
<template slot-scope="props">
......@@ -459,6 +463,7 @@ import {
rollbackDelete,
warehousePictureList,
getPackStatistics,
noNeedPacks
} from "@/api/ecw/order";
import orderBaseInfo from "@/components/OrderBaseInfo";
import WarehouseAreaDialog from "@/components/WarehouseAreaDialog";
......@@ -569,6 +574,9 @@ export default {
showPrintTagDialog: false,
// 统计数据
statistics: {},
// 勾选行
selectedRows: [],
loading: false
};
},
......@@ -682,6 +690,34 @@ export default {
this.getList();
});
},
// 批量打包
noNeedPacks() {
this.$confirm("确认货物无需打包").then(() => {
if (this.selectedRows.length === 0) {
this.$message.error(this.$t("请选择"));
return;
}
var selectedRows = this.selectedRows
var ids = []
for(var i = 0;i<selectedRows.length;i++){
if(this.wareItem(selectedRows[i].orderItemId).packStatus != 1) {
this.$message.error("不能重复打包");
return;
}
ids.push(selectedRows[i].orderItemId)
}
this.loading = true
noNeedPacks(ids).then((res) => {
this.$message.success(this.$t("操作成功"));
this.getList();
this.loading = false
});
})
},
// 选中
checkboxSelect(selection) {
this.selectedRows = selection;
},
onPackageClose() {
this.packageOrderItem = null;
this.packageOrderItem = null;
......@@ -846,7 +882,7 @@ export default {
urls = urls.concat(item.pictureUrls || []);
});
return urls;
},
}
},
};
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment