优化盘点管理导出模板功能,新增盘点任务ID参数传递,添加下载模板前的任务选择验证提示,调整任务名称列最小宽度
This commit is contained in:
@@ -91,8 +91,12 @@ const handleExceed = () => {
|
||||
|
||||
// 下载模板
|
||||
const onDownloadTemplate = async () => {
|
||||
if (!countId.value) {
|
||||
ElMessage.warning('请先选择盘点任务');
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const res = await exportInventoryCountTemplate();
|
||||
const res = await exportInventoryCountTemplate(countId.value);
|
||||
const blob = new Blob([res.data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
const link = document.createElement('a');
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<el-table :data="tableData.data" style="width: 100%" v-loading="tableData.loading" border>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="countNo" label="盘点编号" width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="title" label="任务名称" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="title" label="任务名称" min-width="40" show-overflow-tooltip />
|
||||
<el-table-column prop="countTypeText" label="盘点类型" width="100" align="center">
|
||||
<template #default="scope">
|
||||
<el-tag :type="getCountTypeTag(scope.row.countType)">{{ scope.row.countTypeText || getCountTypeLabel(scope.row.countType) }}</el-tag>
|
||||
|
||||
Reference in New Issue
Block a user