|
|
@@ -58,10 +58,35 @@
|
|
|
<el-button size="small" type="primary" @click="onExport" style="margin-left: 50px;">导出</el-button>
|
|
|
</el-row>
|
|
|
</el-card>
|
|
|
+ <el-card style="margin: 20px 0;">
|
|
|
+ <p>财务费用明细导出</p>
|
|
|
+ <el-form label-width="80px" class="queryForm">
|
|
|
+ <el-row style="margin-bottom: 15px;">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="签单时间">
|
|
|
+ <el-date-picker
|
|
|
+ style="margin-left: 20px;"
|
|
|
+ v-model="costDate"
|
|
|
+ type="daterange"
|
|
|
+ size="mini"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <el-row>
|
|
|
+ <el-button size="small" type="primary" @click="onCostExport" style="margin-left: 50px;">导出</el-button>
|
|
|
+ </el-row>
|
|
|
+ </el-card>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import KtButton from "@/views/Core/KtButton";
|
|
|
+ import {receivableExcelExport} from "../../../http/moudules/letter";
|
|
|
export default {
|
|
|
components: {
|
|
|
KtButton,
|
|
|
@@ -73,6 +98,7 @@
|
|
|
optionsStatus:[],
|
|
|
date: '',
|
|
|
audit: '0',
|
|
|
+ costDate: ''
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
@@ -112,6 +138,27 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ onCostExport() {
|
|
|
+ if (this.costDate == '') {
|
|
|
+ this.$message.error('请选择时间')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$api.letter.receivableExcelExport({
|
|
|
+ signStartDate: this.costDate[0],
|
|
|
+ signEndDate: this.costDate[1],
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ let url = process.env.BASE_URL + res.msg;
|
|
|
+ let a = document.createElement("a");
|
|
|
+ a.href = url;
|
|
|
+ a.download = "导出文件.xlsx";
|
|
|
+ a.click();
|
|
|
+ window.URL.revokeObjectURL(url);
|
|
|
+ } else {
|
|
|
+ this.$message.error(data.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 导出excel
|
|
|
handlePrint(){
|
|
|
if(this.queryForm.date!=null){
|