Commit 79223dae authored by yanzhengyang's avatar yanzhengyang

新增差旅报销列表导出

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