|
@@ -3,7 +3,7 @@
|
|
|
<el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
|
|
|
<!-- 搜索框-->
|
|
|
<el-form-item label="合同编号" prop="contractNo">
|
|
|
- <el-input size="small" v-model="searchForm.contractNo" placeholder="请输入客户名称" clearable></el-input>
|
|
|
+ <el-input size="small" v-model="searchForm.contractNo" placeholder="请输入合同编号" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="合同名称" prop="contractName">
|
|
@@ -97,7 +97,7 @@
|
|
|
</el-form>
|
|
|
|
|
|
<div class="bg-white top">
|
|
|
- <vxe-toolbar :refresh="{query: refreshList}" import export print custom>
|
|
|
+ <vxe-toolbar :refresh="{query: refreshList}" export print custom>
|
|
|
<template #buttons>
|
|
|
<el-button v-if="hasPermission('cw:workContract:add')" type="primary" size="small" icon="el-icon-plus" @click="add()">新建</el-button>
|
|
|
<el-button v-if="hasPermission('cw:workContract:del')" type="danger" size="small" hidden icon="el-icon-delete" @click="del()" plain>删除</el-button>
|
|
@@ -118,6 +118,14 @@
|
|
|
:menu-config="{}"
|
|
|
:print-config="{}"
|
|
|
@sort-change="sortChangeHandle"
|
|
|
+ :export-config="{
|
|
|
+ remote: true,
|
|
|
+ filename: `兴光会计合同数据${moment(new Date()).format('YYYY-MM-DD')}`,
|
|
|
+ sheetName: `兴光会计合同数据${moment(new Date()).format('YYYY-MM-DD')}`,
|
|
|
+ exportMethod: exportMethod,
|
|
|
+ types: ['xlsx'],
|
|
|
+ modes: ['current', 'selected', 'all']
|
|
|
+ }"
|
|
|
:sort-config="{remote:true}"
|
|
|
:data="dataList"
|
|
|
:checkbox-config="{}">
|
|
@@ -132,7 +140,7 @@
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
<vxe-column min-width="150" align="center" title="合同编号" field="contractNo"></vxe-column>
|
|
|
- <vxe-column min-width="150" align="center" title="客户名称" field="clientContactsName"></vxe-column>
|
|
|
+ <vxe-column min-width="150" align="center" title="委托方" field="clientContactsName"></vxe-column>
|
|
|
<vxe-column min-width="150" align="center" title="案卷号" field="filedNo"></vxe-column>
|
|
|
<vxe-column min-width="150" align="center" title="签约日期" field="signingDate"></vxe-column>
|
|
|
<vxe-column min-width="150" align="center" title="合同金额(元)" field="contractAmount"></vxe-column>
|
|
@@ -985,6 +993,31 @@
|
|
|
}
|
|
|
}
|
|
|
return false
|
|
|
+ },
|
|
|
+ // 自定义服务端导出
|
|
|
+ exportMethod ({ options }) {
|
|
|
+ // 传给服务端的参数
|
|
|
+ const params = {
|
|
|
+ 'current': this.tablePage.currentPage,
|
|
|
+ 'size': this.tablePage.pageSize,
|
|
|
+ 'orders': this.tablePage.orders,
|
|
|
+ ...this.searchForm,
|
|
|
+ filename: options.filename,
|
|
|
+ sheetName: options.sheetName,
|
|
|
+ isHeader: options.isHeader,
|
|
|
+ original: options.original,
|
|
|
+ mode: options.mode,
|
|
|
+ selectIds: options.mode === 'selected' ? options.data.map(item => item.id) : [],
|
|
|
+ exportFields: options.columns.map(column => column.property)
|
|
|
+ }
|
|
|
+ return this.contractInfoService.exportFile(params).then((res) => {
|
|
|
+ // 将二进制流文件写入excel表,以下为重要步骤
|
|
|
+ this.$utils.downloadExcel(res.data, options.filename)
|
|
|
+ }).catch(function (err) {
|
|
|
+ if (err.response) {
|
|
|
+ console.log(err.response)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|