Commit 95048d47a9082d5ba3bcf2df94c82b78f2202be5
1 parent
5554c00a
Exists in
master
fix:优化出入库以及项目填报的功能
Showing
8 changed files
with
138 additions
and
11 deletions
Show diff stats
frontend/front/src/api/service/current.js
@@ -7,3 +7,10 @@ export function accountBalanceExport(date) { | @@ -7,3 +7,10 @@ export function accountBalanceExport(date) { | ||
7 | responseType: 'arraybuffer', | 7 | responseType: 'arraybuffer', |
8 | }) | 8 | }) |
9 | } | 9 | } |
10 | +export function currentAccountDetailsExport(date) { | ||
11 | + return request({ | ||
12 | + url: `${context.portal}/wCurrent/v1/curAccBalDetExport?date=${date}`, | ||
13 | + method: 'get', | ||
14 | + responseType: 'arraybuffer', | ||
15 | + }) | ||
16 | +} |
frontend/front/src/api/service/finance.js
@@ -8,4 +8,11 @@ export function transactionDetailsExport(date) { | @@ -8,4 +8,11 @@ export function transactionDetailsExport(date) { | ||
8 | responseType: 'arraybuffer', | 8 | responseType: 'arraybuffer', |
9 | }) | 9 | }) |
10 | } | 10 | } |
11 | +export function currentAccountDetailsExport(date) { | ||
12 | + return request({ | ||
13 | + url: `${context.portal}/wCurrent/v1/curAccBalDetExport?date=${date}`, | ||
14 | + method: 'get', | ||
15 | + responseType: 'arraybuffer', | ||
16 | + }) | ||
17 | +} | ||
11 | 18 |
frontend/front/src/components/dialog/processingRecordDialog.vue
@@ -2,11 +2,15 @@ | @@ -2,11 +2,15 @@ | ||
2 | <div> | 2 | <div> |
3 | <el-dialog title="处理记录" :visible.sync="dialogTableVisible" @close="handleClose"> | 3 | <el-dialog title="处理记录" :visible.sync="dialogTableVisible" @close="handleClose"> |
4 | <el-table :data="gridData"> | 4 | <el-table :data="gridData"> |
5 | - <el-table-column type="index" property="date" label="序号" width="150"></el-table-column> | ||
6 | - <el-table-column property="f_create_by" label="操作人" width="200"></el-table-column> | 5 | + <el-table-column type="index" property="date" label="序号" width="80" align="center"> |
6 | + <template slot-scope="scope"> | ||
7 | + {{ gridData.length - scope.$index }} | ||
8 | + </template> | ||
9 | + </el-table-column> | ||
10 | + <el-table-column property="f_create_by" label="操作人" width="120"></el-table-column> | ||
7 | <el-table-column property="f_create_time" label="操作时间" width="200"></el-table-column> | 11 | <el-table-column property="f_create_time" label="操作时间" width="200"></el-table-column> |
8 | - <el-table-column property="f_event_type" label="事件类型" width="200"></el-table-column> | ||
9 | - <el-table-column property="fProgressStatus" label="进展情况"></el-table-column> | 12 | + <el-table-column property="f_event_type" label="事件类型" width="200" :show-overflow-tooltip="true"></el-table-column> |
13 | + <el-table-column property="f_progress_status" label="进展情况" :show-overflow-tooltip="true"></el-table-column> | ||
10 | </el-table> | 14 | </el-table> |
11 | <el-row> | 15 | <el-row> |
12 | <el-col :span="24" style="display: flex;justify-content: end;margin-top: 10px"> | 16 | <el-col :span="24" style="display: flex;justify-content: end;margin-top: 10px"> |
frontend/front/src/components/tableSlot/current/accountBalanceDl.vue
1 | <template> | 1 | <template> |
2 | - <div> | ||
3 | - <el-button @click="onClick">正常账户可用余额导出</el-button> | 2 | + <div style="display: inline-block;"> |
3 | + <el-button @click="onClick" size="mini">正常账户可用余额导出</el-button> | ||
4 | +<!-- <el-button @click="onClick">活期账户余额明细导出</el-button>--> | ||
4 | <el-dialog title="正常账户可用余额导出" :visible.sync="dialogVisible" width="30%"> | 5 | <el-dialog title="正常账户可用余额导出" :visible.sync="dialogVisible" width="30%"> |
5 | <el-form> | 6 | <el-form> |
6 | <el-form-item label="日期"> | 7 | <el-form-item label="日期"> |
frontend/front/src/components/tableSlot/current/currentAccountDetail.vue
0 → 100644
@@ -0,0 +1,68 @@ | @@ -0,0 +1,68 @@ | ||
1 | +<template> | ||
2 | + <div style="display: inline-block;"> | ||
3 | + <el-button @click="onClick" size="mini">活期账户余额明细导出</el-button> | ||
4 | + <el-dialog title="活期账户余额明细导出" :visible.sync="dialogVisible" width="30%"> | ||
5 | + <el-form> | ||
6 | + <el-form-item label="日期"> | ||
7 | + <el-date-picker v-model="date" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" | ||
8 | + style="width: calc(100% - 80px);"></el-date-picker> | ||
9 | + </el-form-item> | ||
10 | + </el-form> | ||
11 | + <span slot="footer"> | ||
12 | + <el-button @click="dialogVisible = false">取 消</el-button> | ||
13 | + <el-button type="primary" @click="onSubmit">导 出</el-button> | ||
14 | + </span> | ||
15 | + </el-dialog> | ||
16 | + </div> | ||
17 | +</template> | ||
18 | +<script> | ||
19 | + | ||
20 | +import { currentAccountDetailsExport } from '@/api/service/current' | ||
21 | + | ||
22 | +export default { | ||
23 | + data() { | ||
24 | + return { | ||
25 | + dialogVisible: false, | ||
26 | + date: null | ||
27 | + }; | ||
28 | + }, | ||
29 | + created() { | ||
30 | + let today = new Date(); | ||
31 | + today.setDate(today.getDate() - 1); | ||
32 | + let year = today.getFullYear(); | ||
33 | + let month = ("0" + (today.getMonth() + 1)).slice(-2); | ||
34 | + let day = ("0" + today.getDate()).slice(-2); | ||
35 | + this.date = year + '-' + month + '-' + day; | ||
36 | + }, | ||
37 | + methods: { | ||
38 | + onClick() { | ||
39 | + this.dialogVisible = true; | ||
40 | + }, | ||
41 | + onSubmit() { | ||
42 | + if (!this.date) {this.$message.error('请选择日期!');return false;} | ||
43 | + currentAccountDetailsExport(this.date).then(_ref => { | ||
44 | + let {data, headers} = _ref; | ||
45 | + // 附件下载 | ||
46 | + const blob = new Blob([data]); | ||
47 | + // 附件下载 | ||
48 | + const fileName = decodeURIComponent(headers['content-disposition'].split(';')[1].split('filename=')[1]); | ||
49 | + saveAs(blob, fileName); | ||
50 | + }).catch(err => { | ||
51 | + this.$message.error(`模板下载失败:${err}`); | ||
52 | + }); | ||
53 | + } | ||
54 | + } | ||
55 | +} | ||
56 | +</script> | ||
57 | + | ||
58 | +<style scoped lang='scss'> | ||
59 | +::v-deep { | ||
60 | + .el-dialog__footer { | ||
61 | + text-align: center !important; | ||
62 | + | ||
63 | + .el-button { | ||
64 | + margin-left: 20px; | ||
65 | + } | ||
66 | + } | ||
67 | +} | ||
68 | +</style> |
frontend/front/src/components/tableSlot/projectSubmission/exportRecord.vue
1 | <template> | 1 | <template> |
2 | - <div> | 2 | + <div style="display: inline-block;"> |
3 | <el-button icon="el-icon-upload2" size="mini" @click="handleExport" :loading="loading">导出</el-button> | 3 | <el-button icon="el-icon-upload2" size="mini" @click="handleExport" :loading="loading">导出</el-button> |
4 | </div> | 4 | </div> |
5 | </template> | 5 | </template> |
@@ -29,12 +29,12 @@ export default { | @@ -29,12 +29,12 @@ export default { | ||
29 | fProjectName:this.searchForms.project_name?this.searchForms.project_name:'', | 29 | fProjectName:this.searchForms.project_name?this.searchForms.project_name:'', |
30 | fProjectCategory:this.searchForms.project_category?this.searchForms.project_category:'', | 30 | fProjectCategory:this.searchForms.project_category?this.searchForms.project_category:'', |
31 | fProjectState:this.searchForms.project_state?this.searchForms.project_state:'', | 31 | fProjectState:this.searchForms.project_state?this.searchForms.project_state:'', |
32 | - createTime:this.searchForms.create_time?this.searchForms.create_time:'', | 32 | + createTime:this.searchForms.create_time?this.parseTime(this.searchForms.create_time,"{y}-{m}-{d}"):'', |
33 | fProjectNature:this.searchForms.project_nature?this.searchForms.project_nature:'', | 33 | fProjectNature:this.searchForms.project_nature?this.searchForms.project_nature:'', |
34 | fBusinessScenarios:this.searchForms.business_scenarios?this.searchForms.business_scenarios:'', | 34 | fBusinessScenarios:this.searchForms.business_scenarios?this.searchForms.business_scenarios:'', |
35 | fBusinessModel:this.searchForms.business_model?this.searchForms.business_model:'', | 35 | fBusinessModel:this.searchForms.business_model?this.searchForms.business_model:'', |
36 | fProjectRating:this.searchForms.project_rating?this.searchForms.project_rating:'', | 36 | fProjectRating:this.searchForms.project_rating?this.searchForms.project_rating:'', |
37 | - updateTime:this.searchForms.update_time?this.searchForms.update_time:'' | 37 | + updateTime:this.searchForms.update_time?this.parseTime(this.searchForms.update_time,"{y}-{m}-{d}"):'' |
38 | } | 38 | } |
39 | exportRecordData(params).then((res)=>{ | 39 | exportRecordData(params).then((res)=>{ |
40 | console.log('打印res',res); | 40 | console.log('打印res',res); |
@@ -46,7 +46,6 @@ export default { | @@ -46,7 +46,6 @@ export default { | ||
46 | saveAs(blob, fileName); | 46 | saveAs(blob, fileName); |
47 | this.loading = false; | 47 | this.loading = false; |
48 | }) | 48 | }) |
49 | - console.log('打印this.rows',this.searchForms,this.selectRows) | ||
50 | 49 | ||
51 | }, | 50 | }, |
52 | } | 51 | } |
frontend/front/src/main.js
@@ -12,6 +12,7 @@ import 'moment/locale/zh-cn' | @@ -12,6 +12,7 @@ import 'moment/locale/zh-cn' | ||
12 | import '@/assets/iconfont/iconfont.css' | 12 | import '@/assets/iconfont/iconfont.css' |
13 | import htProcessForecast from '@/views/matter/processForecast/processForecastPage.vue' | 13 | import htProcessForecast from '@/views/matter/processForecast/processForecastPage.vue' |
14 | import HtKanban from '@/components/layouts/HtKanban/index.vue' | 14 | import HtKanban from '@/components/layouts/HtKanban/index.vue' |
15 | +import {parseTime} from '@/utils/common.js' | ||
15 | import './plugs/tableSlot' | 16 | import './plugs/tableSlot' |
16 | 17 | ||
17 | Vue.component('HtProcessForecast', htProcessForecast) | 18 | Vue.component('HtProcessForecast', htProcessForecast) |
@@ -20,7 +21,7 @@ Vue.component('HtKanban', HtKanban) | @@ -20,7 +21,7 @@ Vue.component('HtKanban', HtKanban) | ||
20 | // const { mockXHR } = require('@/utils/static') | 21 | // const { mockXHR } = require('@/utils/static') |
21 | // mockXHR() | 22 | // mockXHR() |
22 | // } | 23 | // } |
23 | - | 24 | +Vue.prototype.parseTime = parseTime; |
24 | Vue.config.productionTip = false | 25 | Vue.config.productionTip = false |
25 | 26 | ||
26 | Object.defineProperty(Vue.prototype, '$http', { | 27 | Object.defineProperty(Vue.prototype, '$http', { |
@@ -0,0 +1,40 @@ | @@ -0,0 +1,40 @@ | ||
1 | +// 日期格式化 | ||
2 | +export function parseTime(time, pattern) { | ||
3 | + if (arguments.length === 0 || !time) { | ||
4 | + return null | ||
5 | + } | ||
6 | + const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}' | ||
7 | + let date | ||
8 | + if (typeof time === 'object') { | ||
9 | + date = time | ||
10 | + } else { | ||
11 | + if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { | ||
12 | + time = parseInt(time) | ||
13 | + } else if (typeof time === 'string') { | ||
14 | + time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm), ''); | ||
15 | + } | ||
16 | + if ((typeof time === 'number') && (time.toString().length === 10)) { | ||
17 | + time = time * 1000 | ||
18 | + } | ||
19 | + date = new Date(time) | ||
20 | + } | ||
21 | + const formatObj = { | ||
22 | + y: date.getFullYear(), | ||
23 | + m: date.getMonth() + 1, | ||
24 | + d: date.getDate(), | ||
25 | + h: date.getHours(), | ||
26 | + i: date.getMinutes(), | ||
27 | + s: date.getSeconds(), | ||
28 | + a: date.getDay() | ||
29 | + } | ||
30 | + const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { | ||
31 | + let value = formatObj[key] | ||
32 | + // Note: getDay() returns 0 on Sunday | ||
33 | + if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] } | ||
34 | + if (result.length > 0 && value < 10) { | ||
35 | + value = '0' + value | ||
36 | + } | ||
37 | + return value || 0 | ||
38 | + }) | ||
39 | + return time_str | ||
40 | +} |