Commit 79223dae authored by yanzhengyang's avatar yanzhengyang

新增差旅报销列表导出

parent df12633c
......@@ -102,14 +102,6 @@
icon="Plus"
@click="handleAdd"
>出差申请</el-button>
<!-- <el-tooltip content="草稿箱" placement="top">-->
<!-- <el-button-->
<!-- type="text"-->
<!-- plain-->
<!-- @click="handleDraft"-->
<!-- v-hasPermi="['system:project:draft']"-->
<!-- ><img src="@/assets/icons/common/rightone.png" height="38" width="38"/></el-button>-->
<!-- </el-tooltip>-->
<el-tooltip content="导出" placement="top">
<el-button
type="text"
......@@ -166,14 +158,6 @@
<img src="@/assets/icons/common/delete.png" height="32" width="32"/>
</el-button>
</el-tooltip>
<!-- <el-tooltip content="打印报销单" placement="top">-->
<!-- <el-button-->
<!-- link type="text"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- >-->
<!-- <img src="@/assets/icons/common/print.png" height="20" width="20"/>-->
<!-- </el-button>-->
<!-- </el-tooltip>-->
</template>
</el-table-column>
</el-table>
......@@ -324,7 +308,7 @@ function handleExport() {
ids:arr
}
console.log(obj)
proxy.download('/tripApplication/tripApplication/export', obj, `出差申请.xlsx`)
proxy.download('/tripApplication/tripApplication/export', obj, `出差申请列表.xlsx`)
}
}
......
......@@ -88,18 +88,11 @@
<div style="padding-left: 8px ;margin-bottom: 20px;display: flex;width: 100%;align-items: center;justify-content: space-between" >
<span class="bold-text">差旅报销列表</span>
<span>
<!-- <el-button-->
<!-- class="el-button-primary-pain"-->
<!-- plain-->
<!-- icon="Plus"-->
<!-- @click="handleAdd"-->
<!-- v-hasPermi="['system:project:add']"-->
<!-- >报销申请</el-button>-->
<el-tooltip content="导出" placement="top">
<el-button
type="text"
plain
@click="handleDraft"
@click="handleExport"
v-hasPermi="['system:project:draft']"
><img src="@/assets/icons/common/export2.png" height="38" width="38"/></el-button>
</el-tooltip>
......@@ -108,6 +101,7 @@
<!-- 表格数据 -->
<el-table v-loading="loading" :data="tripReimburseList" border style="width: 100%"
@selection-change="handleSelectionChange"
:row-class-name="tableRowClassName">
<el-table-column type="selection" width="40" align="right"/>
<el-table-column label="项目编号" align="center" prop="projectNumber" min-width="150"/>
......@@ -175,9 +169,8 @@ const {proxy} = getCurrentInstance();
const {cost_daily_status, project_type} = proxy.useDict('cost_daily_status', 'project_type');
const tripReimburseList = ref([]);
const open = ref(false);
const loading = ref(true);
const ids = ref([]);
const total = ref(0);
const projectOption = ref([]);
......@@ -278,19 +271,26 @@ function handlePrint(row) {
router.push({path:'/costManage/dailyReimburse/print', query: { id: row.id }});
}
/** 导出按钮操作 */
// function handleExport() {
// proxy.download("system/role/export", {
// ...queryParams.value,
// }, `role_${new Date().getTime()}.xlsx`);
// }
/** 多选框选中数据 */
// function handleSelectionChange(selection) {
// ids.value = selection.map(item => item.roleId);
// single.value = selection.length != 1;
// multiple.value = !selection.length;
// }
function handleSelectionChange(val) {
ids.value = val.map((item)=>{
return item.id
})
}
/** 导出按钮操作 */
function handleExport() {
if (ids.value.length === 0) {
proxy.$message.warning('请选择要导出的数据');
}else {
let arr = ids.value.join(",")
let obj = {
ids:arr
}
console.log(obj)
proxy.download('/FyglTravelOnBusiness/getList/export', obj, `差率报销列表.xlsx`)
}
}
/** 差旅报销详情页 */
function handleView(row) {
......@@ -312,7 +312,6 @@ const tableRowClassName = ({row}) => {
}
return '';
}
onMounted(() => {
getList();
getProjectList();
......
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