manage-client 4.1.76 → 4.1.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="basic-main" style="height: 98%">
|
|
3
|
+
<work-busy :is-busy="model.state === '查询'" v-show="model.state === '查询'"></work-busy>
|
|
4
|
+
<criteria-paged :model="model" :pager='false' v-ref:paged>
|
|
5
|
+
<criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
|
|
6
|
+
<p class="bg-info text-center" style="padding: 8px;">应收实收月报表</p>
|
|
7
|
+
<div class="form-group" v-if="!$parent.$parent.data.f_files_path"></div>
|
|
8
|
+
<div novalidate class="form-horizontal select-overspread container-fluid auto" partial >
|
|
9
|
+
<div class="row">
|
|
10
|
+
<div class="col-sm-2 form-group" >
|
|
11
|
+
<label class="font_normal_body" for="startDate">开始日期:</label>
|
|
12
|
+
<datepicker id="startDate" placeholder="开始日期" style="width: 60%"
|
|
13
|
+
v-model="model.startDate"
|
|
14
|
+
:value.sync="model.startDate"
|
|
15
|
+
:disabled-days-of-Week="[]"
|
|
16
|
+
:format="'yyyy-MM-dd HH:mm:ss'"
|
|
17
|
+
:show-reset-button="reset">
|
|
18
|
+
</datepicker>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="col-sm-2 form-group" >
|
|
21
|
+
<label class="font_normal_body" for="endDate">结束日期:</label>
|
|
22
|
+
<datepicker id="endDate" placeholder="结束日期" style="width: 60%"
|
|
23
|
+
v-model="model.endDate"
|
|
24
|
+
:value.sync="model.endDate"
|
|
25
|
+
:disabled-days-of-Week="[]"
|
|
26
|
+
:format="'yyyy-MM-dd HH:mm:ss'"
|
|
27
|
+
:show-reset-button="reset">
|
|
28
|
+
</datepicker>
|
|
29
|
+
</div>
|
|
30
|
+
<res-select-group :initres="$parent.$parent.initres" :show-component="['company','department','operator']" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
|
|
31
|
+
<!--<div class="col-sm-4">-->
|
|
32
|
+
<!--<label class="font_normal_body"> 公司 </label>-->
|
|
33
|
+
<!--<right-tree @re-res="$parent.$parent.getRes"></right-tree>-->
|
|
34
|
+
<!--</div>-->
|
|
35
|
+
<!--<div class="col-sm-4">-->
|
|
36
|
+
<!--<label class="font_normal_body"> 部门 </label>-->
|
|
37
|
+
<!--<res-select restype='department'-->
|
|
38
|
+
<!--is-mul="false"-->
|
|
39
|
+
<!--@res-select="$parent.$parent.getdep"-->
|
|
40
|
+
<!--:parentresid="$parent.$parent.depresid"-->
|
|
41
|
+
<!--:initresid='$parent.$parent.depid'>-->
|
|
42
|
+
<!--</res-select>-->
|
|
43
|
+
<!--</div>-->
|
|
44
|
+
<div style = "float:right;">
|
|
45
|
+
<button class="button_search" @click="$parent.$parent.searchData()">查询</button>
|
|
46
|
+
<report-print id='gasprice' top='3cm' left='0' width='100%' height='100%' :preview="true"></report-print>
|
|
47
|
+
<report-excel id='gasprice'></report-excel>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
<!--<div class="span" style = "float:right;">-->
|
|
51
|
+
|
|
52
|
+
<!--</div>-->
|
|
53
|
+
</div>
|
|
54
|
+
</criteria>
|
|
55
|
+
<div partial='list' v-el:handcollect id='gasprice' style="overflow-y: scroll">
|
|
56
|
+
<table class='tableprint' style="margin: 0px auto" v-if="!$parent.data.f_files_path">
|
|
57
|
+
<thead>
|
|
58
|
+
<tr>
|
|
59
|
+
<th colspan='15' style="font-weight: bold; text-align: center;">
|
|
60
|
+
<h3 style="text-align: center">应收实收月报表</h3>
|
|
61
|
+
</th>
|
|
62
|
+
</tr>
|
|
63
|
+
<tr>
|
|
64
|
+
<th colspan='15' style="font-weight: normal; text-align: center;">
|
|
65
|
+
开始时间:{{model.model.startDate}}
|
|
66
|
+
结束时间:{{ model.model.endDate }}
|
|
67
|
+
</th>
|
|
68
|
+
</tr>
|
|
69
|
+
<tr>
|
|
70
|
+
<th colspan='15' style="font-weight: normal; text-align: center;">
|
|
71
|
+
打印时间:{{{$parent.printTime}}}
|
|
72
|
+
</th>
|
|
73
|
+
</tr>
|
|
74
|
+
<tr>
|
|
75
|
+
<th colspan='15' style="font-weight: normal; text-align: center;">
|
|
76
|
+
<div>
|
|
77
|
+
<span v-show="$parent.orgname.trim()!=''">公司:{{$parent.orgname}}</span>
|
|
78
|
+
<span v-show="$parent.depname.trim()!=''"> 部门:{{$parent.depname}}</span>
|
|
79
|
+
</div>
|
|
80
|
+
</th>
|
|
81
|
+
</tr>
|
|
82
|
+
</thead>
|
|
83
|
+
<tr>
|
|
84
|
+
<td colspan='15' style="font-weight: normal;" id="test">
|
|
85
|
+
{{{ model.data.substring(26,model.data.length-8) }}}
|
|
86
|
+
</td>
|
|
87
|
+
</tr>
|
|
88
|
+
<tfoot>
|
|
89
|
+
<tr style="text-align: left">
|
|
90
|
+
<th colspan='5' style="font-weight: normal; text-align: left;">
|
|
91
|
+
收款人:
|
|
92
|
+
</th>
|
|
93
|
+
<th colspan='5' style="font-weight: normal; text-align: left;">
|
|
94
|
+
审核人:
|
|
95
|
+
</th>
|
|
96
|
+
<th colspan='5' style="font-weight: normal; text-align: left;">
|
|
97
|
+
经手人:
|
|
98
|
+
</th>
|
|
99
|
+
</tr>
|
|
100
|
+
</tfoot>
|
|
101
|
+
</table>
|
|
102
|
+
{{{ $parent.reportStr}}}
|
|
103
|
+
</div>
|
|
104
|
+
</criteria-paged>
|
|
105
|
+
<modal :show.sync="show" v-ref:modal small backdrop="false">
|
|
106
|
+
<header slot="modal-header" class="modal-header">
|
|
107
|
+
<h4 class="modal-title">输入文件名称</h4>
|
|
108
|
+
</header>
|
|
109
|
+
<article slot="modal-body" class="modal-body">
|
|
110
|
+
<div class="form-group">
|
|
111
|
+
<input type="text" class="form-control" v-model="filename" placeholder='保存的文件名'>
|
|
112
|
+
</div>
|
|
113
|
+
</article>
|
|
114
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
115
|
+
<button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
|
|
116
|
+
<button v-show="show" type="button" class="btn btn-success" @click='confirm(filename)'>确认</button>
|
|
117
|
+
</footer>
|
|
118
|
+
</modal>
|
|
119
|
+
</div>
|
|
120
|
+
</template>
|
|
121
|
+
|
|
122
|
+
<script>
|
|
123
|
+
import { DataModel } from 'vue-client'
|
|
124
|
+
import co from 'co'
|
|
125
|
+
let saveFile = function * (self) {
|
|
126
|
+
// 线验证文件是否重名
|
|
127
|
+
let count = yield self.$resetpost('api/af-revenue/sql/manageSingleTable',
|
|
128
|
+
{data: {tablename: 't_report_record', condition: `f_files_name = '${self.filename}'`}},
|
|
129
|
+
{resolveMsg: null, rejectMsg: null})
|
|
130
|
+
if (count.data.length > 0) {
|
|
131
|
+
self.$showAlert('无法保存,文件名重名', 'warning', 3000)
|
|
132
|
+
return
|
|
133
|
+
}
|
|
134
|
+
let saveBack = yield self.$resetpost('api/af-revenue/logic/saveReport', {f_files_content: self.$refs.paged.$els.handcollect.innerHTML,
|
|
135
|
+
f_files_name: self.filename, f_files_type: self.data.f_report_type, f_component_name: 'manage-bus-summary',
|
|
136
|
+
f_operator: this.$login.f.name, f_query_month: `${self.model.model.startDate}-${self.model.model.endDate}`,
|
|
137
|
+
f_outlets: this.$login.f.depname})
|
|
138
|
+
if (saveBack.data.status === 'succeed') {
|
|
139
|
+
self.show = false
|
|
140
|
+
self.filename = ''
|
|
141
|
+
// 后台保存完成,通知刷新
|
|
142
|
+
self.$dispatch('save-success', self.filename)
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
export default {
|
|
146
|
+
title: '应收实收月报表',
|
|
147
|
+
props: ['data'],
|
|
148
|
+
data () {
|
|
149
|
+
return {
|
|
150
|
+
printTime: this.$login.toStandardTimeString(),
|
|
151
|
+
depresid: [],
|
|
152
|
+
userresid: [],
|
|
153
|
+
initres: {
|
|
154
|
+
org:[this.$login.f.orgid],
|
|
155
|
+
dep:[],
|
|
156
|
+
user:[]
|
|
157
|
+
},
|
|
158
|
+
f_orgid: this.$login.f.orgid,
|
|
159
|
+
f_depid: this.$login.f.depids,
|
|
160
|
+
f_operatorid: this.$login.f.id,
|
|
161
|
+
operatorid: [],
|
|
162
|
+
depid: [],
|
|
163
|
+
orgname: '',
|
|
164
|
+
depname: '',
|
|
165
|
+
operatorname: '',
|
|
166
|
+
orgCondtionStr: '1=1',
|
|
167
|
+
model: new DataModel('api/af-revenue/report/gatReceivabl', {startDate: 'this.model.startDate', endDate: 'this.model.endDate',
|
|
168
|
+
f_orgid: 'this.model.f_orgid'}),
|
|
169
|
+
reportStr: null,
|
|
170
|
+
show: false,
|
|
171
|
+
spans: ''
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
ready () {
|
|
175
|
+
this.$refs.paged.$refs.criteria.model.startDate = this.$login.toStandardDateString() + ' 00:00:00'
|
|
176
|
+
this.$refs.paged.$refs.criteria.model.endDate = this.$login.toStandardDateString() + ' 23:59:59'
|
|
177
|
+
// this.$refs.paged.$refs.criteria.search()
|
|
178
|
+
},
|
|
179
|
+
methods: {
|
|
180
|
+
searchData () {
|
|
181
|
+
this.$refs.paged.$refs.criteria.search()
|
|
182
|
+
},
|
|
183
|
+
selfSearch (args) {
|
|
184
|
+
this.printTime = this.$login.toStandardTimeString()
|
|
185
|
+
let orgstr = this.orgCondtionStr
|
|
186
|
+
args.condition = `${args.condition} ` + orgstr
|
|
187
|
+
this.$refs.paged.$refs.criteria.model.f_orgid = '1=1 '+orgstr
|
|
188
|
+
this.$refs.paged.search(args)
|
|
189
|
+
},
|
|
190
|
+
getRes (condition, obj) {
|
|
191
|
+
this.orgCondtionStr = condition
|
|
192
|
+
this.orgname = obj.orgnames[0]
|
|
193
|
+
this.depname = obj.depnames[0]
|
|
194
|
+
},
|
|
195
|
+
// getdep (obj, val) {
|
|
196
|
+
// // this.depname = val[0]
|
|
197
|
+
// this.userresid = obj
|
|
198
|
+
// this.f_depid = obj
|
|
199
|
+
// },
|
|
200
|
+
// getuser ( obj, val) {
|
|
201
|
+
// this.operatorname = val[0]
|
|
202
|
+
// this.f_operatorid = obj
|
|
203
|
+
// },
|
|
204
|
+
|
|
205
|
+
// 根据文件路径获取储存的报表内容
|
|
206
|
+
getFileContent (path) {
|
|
207
|
+
this.$resetpost('api/af-revenue/logic/getReportFileContent', {f_files_path: path}, {resolveMsg: null, rejectMsg: null}).then((res) => {
|
|
208
|
+
this.reportStr = res.data.filecontent
|
|
209
|
+
this.model.state = '正确'
|
|
210
|
+
})
|
|
211
|
+
},
|
|
212
|
+
confirm () {
|
|
213
|
+
if (!this.filename || this.filename === '') {
|
|
214
|
+
this.$showAlert('无法保存,文件名不能为空', 'warning', 3000)
|
|
215
|
+
}
|
|
216
|
+
let saveGen = saveFile(this)
|
|
217
|
+
co(saveGen)
|
|
218
|
+
},
|
|
219
|
+
close () {
|
|
220
|
+
this.show = false
|
|
221
|
+
},
|
|
222
|
+
// 将报表保存成文件
|
|
223
|
+
confirmReport () {
|
|
224
|
+
this.show = true
|
|
225
|
+
this.filename = this.data.f_report_name + this.$login.toStandardDateString()
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
watch: {
|
|
229
|
+
'data' (val) {
|
|
230
|
+
if (val.f_files_path) {
|
|
231
|
+
this.getFileContent(val.f_files_path)
|
|
232
|
+
} else {
|
|
233
|
+
this.reportStr = null
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
'model.data' (val) {
|
|
237
|
+
let tab = document.getElementById('test')
|
|
238
|
+
if (tab && tab.children && tab.children[0]) {
|
|
239
|
+
var tds = tab.children[0].getElementsByTagName('td')
|
|
240
|
+
var num = 0
|
|
241
|
+
for (let td of tds) {
|
|
242
|
+
let span = td.getAttribute('colspan')
|
|
243
|
+
num = num + ((span ? span : 1) - 0)
|
|
244
|
+
}
|
|
245
|
+
this.spans = num
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
computed: {
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
</script>
|
|
253
|
+
<style scoped>
|
|
254
|
+
.noborder{
|
|
255
|
+
border: none;
|
|
256
|
+
}
|
|
257
|
+
</style>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
import echarts from 'echarts'
|
|
3
|
+
import MagLoadParams from '../../stores/MagLoadParams'
|
|
4
|
+
import MagGetSaleParam from '../../stores/MagGetSaleParams'
|
|
5
|
+
|
|
6
|
+
/** **************************收费组件注册******************************/
|
|
7
|
+
|
|
8
|
+
export default function () {
|
|
9
|
+
Vue.prototype.$echarts = echarts
|
|
10
|
+
Vue.use(MagLoadParams)
|
|
11
|
+
Vue.use(MagGetSaleParam)
|
|
12
|
+
// 应收实收月报表
|
|
13
|
+
Vue.component('manage-receivable', (resolve) => {
|
|
14
|
+
require(['./ManageReceivable'], resolve)
|
|
15
|
+
})
|
|
16
|
+
}
|