manage-client 4.0.13 → 4.0.15
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 +1 -1
- package/src/components/sale/filesquery/RecordInfoQuery.vue +1 -1
- package/src/filiale/tongchuan/BusinessClassify.vue +386 -0
- package/src/filiale/tongchuan/DepartmentPrick.vue +292 -0
- package/src/filiale/tongchuan/GasPrice.vue +13 -39
- package/src/filiale/tongchuan/ManageBusSummary.vue +8 -9
- package/src/filiale/tongchuan/ManageHandInputtor.vue +261 -0
- package/src/filiale/tongchuan/ManageSellType.vue +267 -0
- package/src/filiale/tongchuan/ManageUserCount.vue +369 -0
- package/src/filiale/tongchuan/MarketMonth.vue +297 -0
- package/src/filiale/tongchuan/SaleMonthReport.vue +155 -0
- package/src/filiale/tongchuan/UserClassify.vue +249 -0
- package/src/filiale/tongchuan/reportManage.js +34 -1
- package/src/filiale/xihu/NewQueryInstruct.vue +665 -0
- package/src/filiale/xihu/webmeterManage.js +6 -0
- package/src/filiale/yangchun/RecordInfoQuery.vue +1 -1
package/package.json
CHANGED
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="basic-main" style="height: 100%">
|
|
3
|
+
<criteria-paged :model="model" :pager='false' v-ref:paged>
|
|
4
|
+
<criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
|
|
5
|
+
<div novalidate class="form-horizontal select-overspread container-fluid auto" partial >
|
|
6
|
+
<div class="row">
|
|
7
|
+
<div class="col-sm-3" >
|
|
8
|
+
<label class="font_normal_body" for="startDate">月开始日期:</label>
|
|
9
|
+
<datepicker id="startDate" placeholder="月开始日期" style="width: 60%"
|
|
10
|
+
v-model="model.startDate"
|
|
11
|
+
:value.sync="model.startDate"
|
|
12
|
+
:disabled-days-of-Week="[]"
|
|
13
|
+
:format="'yyyy-MM-dd 00:00:00'"
|
|
14
|
+
:show-reset-button="reset">
|
|
15
|
+
</datepicker>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="col-sm-3" >
|
|
18
|
+
<label class="font_normal_body" for="endDate">月结束日期:</label>
|
|
19
|
+
<datepicker id="endDate" placeholder="月结束日期" style="width: 60%"
|
|
20
|
+
v-model="model.endDate"
|
|
21
|
+
:value.sync="model.endDate"
|
|
22
|
+
:disabled-days-of-Week="[]"
|
|
23
|
+
:format="'yyyy-MM-dd 23:59:59'"
|
|
24
|
+
:show-reset-button="reset">
|
|
25
|
+
</datepicker>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="col-sm-3" >
|
|
28
|
+
<label class="font_normal_body" for="yearStartDate">年开始日期:</label>
|
|
29
|
+
<datepicker id="yearStartDate" placeholder="年开始日期" style="width: 60%"
|
|
30
|
+
v-model="model.yearStartDate"
|
|
31
|
+
:value.sync="model.yearStartDate"
|
|
32
|
+
:disabled-days-of-Week="[]"
|
|
33
|
+
:format="'yyyy-MM-dd 00:00:00'"
|
|
34
|
+
:show-reset-button="reset">
|
|
35
|
+
</datepicker>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="col-sm-3" >
|
|
38
|
+
<label class="font_normal_body" for="yearEndDate">年结束日期:</label>
|
|
39
|
+
<datepicker id="yearEndDate" placeholder="年结束日期" style="width: 60%"
|
|
40
|
+
v-model="model.yearEndDate"
|
|
41
|
+
:value.sync="model.yearEndDate"
|
|
42
|
+
:disabled-days-of-Week="[]"
|
|
43
|
+
:format="'yyyy-MM-dd 23:59:59'"
|
|
44
|
+
:show-reset-button="reset">
|
|
45
|
+
</datepicker>
|
|
46
|
+
</div>
|
|
47
|
+
<res-select-group :show-component="['company']" :initres="$parent.$parent.initres" :selectin="true" :cascade =true @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
|
|
48
|
+
<div class="col-sm-3 form-group">
|
|
49
|
+
<label class="font_normal_body" for="dep" >部  门:</label>
|
|
50
|
+
<v-select id="dep" style="width: 60%"
|
|
51
|
+
:multiple="true"
|
|
52
|
+
@change="$parent.$parent.getDep"
|
|
53
|
+
:value.sync="model.f_depid"
|
|
54
|
+
v-model="model.f_depid"
|
|
55
|
+
:options='$parent.$parent.depresid' placeholder='请选择'
|
|
56
|
+
condition="f_depid in {}">
|
|
57
|
+
</v-select>
|
|
58
|
+
|
|
59
|
+
</div>
|
|
60
|
+
<div class="col-sm-3 form-group">
|
|
61
|
+
<label class="font_normal_body" for="oper">人  员:</label>
|
|
62
|
+
<v-select id="oper" style="width: 60%"
|
|
63
|
+
:multiple="true"
|
|
64
|
+
@change="$parent.$parent.getOpe"
|
|
65
|
+
:value.sync="model.f_operatorid"
|
|
66
|
+
v-model="model.f_operatorid"
|
|
67
|
+
:options='$parent.$parent.userresid' placeholder='请选择'
|
|
68
|
+
condition="f_operatorid in {}">
|
|
69
|
+
</v-select>
|
|
70
|
+
</div>
|
|
71
|
+
<div class="col-sm-3 form-group">
|
|
72
|
+
<label class="font_normal_body" for="oper1">格式一</label>
|
|
73
|
+
<input type="radio" name="reportStyle" id="oper1" v-model="$parent.$parent.reportStyle" value="1">
|
|
74
|
+
<label class="font_normal_body" for="oper2">格式二</label>
|
|
75
|
+
<input type="radio" name="reportStyle" id="oper2" v-model="$parent.$parent.reportStyle" value="2">
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
<div class="span" style = "float:right;">
|
|
79
|
+
<button class="button_search" @click="$parent.$parent.searchData()">查询</button>
|
|
80
|
+
<report-print id='gasprice' top='3cm' left='0' width='100%' height='100%' :preview="true"></report-print>
|
|
81
|
+
<report-excel id='gasprice'></report-excel>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</criteria>
|
|
85
|
+
<div partial='list' v-el:handcollect id='gasprice' style="overflow-y: scroll">
|
|
86
|
+
<table class='tableprint' style="margin: 0px auto">
|
|
87
|
+
<thead>
|
|
88
|
+
<tr>
|
|
89
|
+
<th :colspan='$parent.tablen' style="font-weight: normal; text-align: left;">
|
|
90
|
+
<h3 style="text-align: center">营业分类统计</h3>
|
|
91
|
+
</th>
|
|
92
|
+
</tr>
|
|
93
|
+
<tr>
|
|
94
|
+
<th :colspan='$parent.tablen' style="font-weight: normal; text-align: center;">
|
|
95
|
+
时间区间:{{$refs.criteria.model.startDate}} - {{ $refs.criteria.model.endDate }}<br/>
|
|
96
|
+
打印时间:{{$parent.printTime}}
|
|
97
|
+
</th>
|
|
98
|
+
</tr>
|
|
99
|
+
<tr>
|
|
100
|
+
<th :colspan='$parent.tablen' style="font-weight: normal; text-align: center;">
|
|
101
|
+
<div>
|
|
102
|
+
<span v-show="$parent.orgname[0]">公司:{{$parent.orgname}}</span>
|
|
103
|
+
<span v-show="$parent.depname[0]"> 部门:{{$parent.depname}}</span>
|
|
104
|
+
<span v-show="$parent.operatorname[0]">人员:{{$parent.operatorname}}</span>
|
|
105
|
+
</div>
|
|
106
|
+
</th>
|
|
107
|
+
</tr>
|
|
108
|
+
</thead>
|
|
109
|
+
<tr>
|
|
110
|
+
<td :colspan='$parent.tablen' class="noborder">
|
|
111
|
+
{{{ model.data.substring(26,model.data.length-8) }}}
|
|
112
|
+
</td>
|
|
113
|
+
</tr>
|
|
114
|
+
<tfoot>
|
|
115
|
+
<tr style="text-align: left">
|
|
116
|
+
<th :colspan='Math.floor($parent.tablen/3)'>财务审核:</th>
|
|
117
|
+
<th :colspan='Math.round($parent.tablen/3)'>收款审核:</th>
|
|
118
|
+
<th :colspan='Math.round($parent.tablen/3)'>收款员:</th>
|
|
119
|
+
</tr>
|
|
120
|
+
</tfoot>
|
|
121
|
+
</table>
|
|
122
|
+
</div>
|
|
123
|
+
</criteria-paged>
|
|
124
|
+
</div>
|
|
125
|
+
</template>
|
|
126
|
+
|
|
127
|
+
<script>
|
|
128
|
+
import {DataModel, HttpResetClass} from 'vue-client'
|
|
129
|
+
import co from 'co'
|
|
130
|
+
let getorg = async function (self) {
|
|
131
|
+
new HttpResetClass().load("POST",'api/af-revenue/sql/singleTableParam',
|
|
132
|
+
{
|
|
133
|
+
data: {
|
|
134
|
+
items: 'name label,id value',
|
|
135
|
+
tablename: 't_department',
|
|
136
|
+
condition: `1=1`
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{resolveMsg: null, rejectMsg: null})
|
|
140
|
+
.then((res) => {
|
|
141
|
+
self.depresid = res.data
|
|
142
|
+
})
|
|
143
|
+
new HttpResetClass().load("POST",'api/af-revenue/sql/singleTableParam',
|
|
144
|
+
{
|
|
145
|
+
data: {
|
|
146
|
+
items: 'name label,id value',
|
|
147
|
+
tablename: 't_user',
|
|
148
|
+
condition: `state = '在职' and f_department_name is not null`
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
{resolveMsg: null, rejectMsg: null})
|
|
152
|
+
.then((res) => {
|
|
153
|
+
self.userresid = res.data
|
|
154
|
+
})
|
|
155
|
+
}
|
|
156
|
+
export default {
|
|
157
|
+
title: '营业分类统计',
|
|
158
|
+
props: ['data'],
|
|
159
|
+
data () {
|
|
160
|
+
return {
|
|
161
|
+
printTime: this.$login.toStandardTimeString(),
|
|
162
|
+
depresid: [],
|
|
163
|
+
userresid: [],
|
|
164
|
+
initres: {
|
|
165
|
+
org:[this.$login.f.orgid],
|
|
166
|
+
dep:[],
|
|
167
|
+
user:[]
|
|
168
|
+
},
|
|
169
|
+
f_orgid: this.$login.f.orgid,
|
|
170
|
+
f_depid: this.$login.f.depids,
|
|
171
|
+
f_operatorid: this.$login.f.id,
|
|
172
|
+
operatorid: [],
|
|
173
|
+
depid: [],
|
|
174
|
+
tablen:0,
|
|
175
|
+
reportStyle: 1,
|
|
176
|
+
orgname: '',
|
|
177
|
+
depname: '',
|
|
178
|
+
operatorname: '',
|
|
179
|
+
orgCondtionStr: '1=1',
|
|
180
|
+
model: new DataModel('api/af-revenue/report/BusinessClassify', {
|
|
181
|
+
startDate: 'this.model.startDate',
|
|
182
|
+
endDate: 'this.model.endDate',
|
|
183
|
+
yearStartDate: 'this.model.yearStartDate',
|
|
184
|
+
yearEndDate: 'this.model.yearEndDate',
|
|
185
|
+
f_orgid: 'this.model.f_orgid'}),
|
|
186
|
+
reportStr: null,
|
|
187
|
+
show: false,
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
ready () {
|
|
191
|
+
getorg(this)
|
|
192
|
+
this.$refs.paged.$refs.criteria.model.startDate = this.$login.toStandardDateString() + ' 00:00:00'
|
|
193
|
+
this.$refs.paged.$refs.criteria.model.endDate = this.$login.toStandardDateString() + ' 23:59:59'
|
|
194
|
+
console.log(this.$login.f)
|
|
195
|
+
},
|
|
196
|
+
methods: {
|
|
197
|
+
adjustParams(startDateStr,endDateStr) {
|
|
198
|
+
const now = new Date()
|
|
199
|
+
const todayStart = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 0, 0, 0)
|
|
200
|
+
|
|
201
|
+
const startDate = new Date(startDateStr)
|
|
202
|
+
const endDate = new Date(endDateStr)
|
|
203
|
+
let result
|
|
204
|
+
if (startDate < todayStart && endDate >= todayStart) {
|
|
205
|
+
// startDate 在今天之前,endDate 在今天或之后
|
|
206
|
+
let splitDates = 2
|
|
207
|
+
let month = now.getMonth() + 1
|
|
208
|
+
let date = now.getDate()
|
|
209
|
+
const yesterday = new Date(now);
|
|
210
|
+
yesterday.setDate(yesterday.getDate() - 1);
|
|
211
|
+
let month2 = yesterday.getMonth() + 1
|
|
212
|
+
let date2 = yesterday.getDate()
|
|
213
|
+
result = {
|
|
214
|
+
splitDates: splitDates,
|
|
215
|
+
yesterdayEnd: (yesterday.getFullYear() + '-' + (month2 < 10 ? '0' + month2 : month2) + '-' + (date2 < 10 ? '0' + date2 : date2) + ' 23:59:59'),
|
|
216
|
+
todayStart: now.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date) + ' 00:00:00'
|
|
217
|
+
}
|
|
218
|
+
} else if (startDate >= todayStart && endDate >= todayStart) {
|
|
219
|
+
// startDate 和 endDate 都在今天或之后
|
|
220
|
+
let splitDates = 0
|
|
221
|
+
result = {
|
|
222
|
+
splitDates: splitDates
|
|
223
|
+
}
|
|
224
|
+
} else {
|
|
225
|
+
// startDate 和 endDate 都在今天之前
|
|
226
|
+
let splitDates = 1
|
|
227
|
+
result = {
|
|
228
|
+
splitDates: splitDates
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
function padZero(num) {
|
|
232
|
+
return num.toString().padStart(2, '0');
|
|
233
|
+
}
|
|
234
|
+
return result;
|
|
235
|
+
},
|
|
236
|
+
searchData () {
|
|
237
|
+
this.$refs.paged.$refs.criteria.search()
|
|
238
|
+
},
|
|
239
|
+
getDep(val){
|
|
240
|
+
this.depname = this.depresid.filter(x => x.value ==val).map(x=>x.label).toString()
|
|
241
|
+
console.log('dep',this.depname )
|
|
242
|
+
},
|
|
243
|
+
getOpe(val){
|
|
244
|
+
this.operatorname = this.userresid.filter(x => x.value ==val).map(x=>x.label).toString()
|
|
245
|
+
console.log('dep',this.operatorname )
|
|
246
|
+
},
|
|
247
|
+
distinctJson(obj){
|
|
248
|
+
let at = []
|
|
249
|
+
for (let i = 0; i < obj.length; i++) {
|
|
250
|
+
let flag = false
|
|
251
|
+
if (i == 0 ) {
|
|
252
|
+
at.push(obj[i])
|
|
253
|
+
} else {
|
|
254
|
+
for (let j = 0; j < at.length; j++) {
|
|
255
|
+
if (JSON.stringify(obj[i]) == JSON.stringify(at[j])) {
|
|
256
|
+
flag = true
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
if (!flag) {
|
|
260
|
+
at.push(obj[i])
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
return at
|
|
265
|
+
},
|
|
266
|
+
selfSearch (args) {
|
|
267
|
+
console.log('---------------->', this.reportStyle)
|
|
268
|
+
this.printTime = this.$login.toStandardTimeString()
|
|
269
|
+
let orgcondition = '1=1'
|
|
270
|
+
let orgstr = this.orgCondtionStr
|
|
271
|
+
if (this.f_orgid) {
|
|
272
|
+
orgcondition += orgstr
|
|
273
|
+
}
|
|
274
|
+
orgcondition += ' and ' + args.condition
|
|
275
|
+
this.$refs.paged.$refs.criteria.model.f_orgid = orgcondition
|
|
276
|
+
let monthObj = null
|
|
277
|
+
let yearObj = null
|
|
278
|
+
if (this.$refs.paged.$refs.criteria.model.startDate && this.$refs.paged.$refs.criteria.model.endDate ) {
|
|
279
|
+
monthObj = this.adjustParams(this.$refs.paged.$refs.criteria.model.startDate, this.$refs.paged.$refs.criteria.model.endDate)
|
|
280
|
+
}
|
|
281
|
+
if (this.$refs.paged.$refs.criteria.model.yearStartDate && this.$refs.paged.$refs.criteria.model.yearEndDate) {
|
|
282
|
+
yearObj = this.adjustParams(this.$refs.paged.$refs.criteria.model.yearStartDate, this.$refs.paged.$refs.criteria.model.yearEndDate)
|
|
283
|
+
}
|
|
284
|
+
console.log('========', monthObj)
|
|
285
|
+
console.log('========', yearObj)
|
|
286
|
+
if (this.reportStyle == '1') {
|
|
287
|
+
let load = new HttpResetClass()
|
|
288
|
+
let params = {
|
|
289
|
+
startDate: args.model.startDate,
|
|
290
|
+
endDate: args.model.endDate,
|
|
291
|
+
monthRealTime: 0,
|
|
292
|
+
yearRealTime: 0,
|
|
293
|
+
monthRealStart: '',
|
|
294
|
+
monthHistoryEnd: '',
|
|
295
|
+
yearRealStart: '',
|
|
296
|
+
yearHistoryEnd: '',
|
|
297
|
+
yearStartDate: args.model.yearStartDate,
|
|
298
|
+
yearEndDate: args.model.yearEndDate,
|
|
299
|
+
f_orgid: orgcondition
|
|
300
|
+
}
|
|
301
|
+
if (monthObj && monthObj.splitDates === 2) {
|
|
302
|
+
params.monthRealTime = monthObj.splitDates
|
|
303
|
+
params.monthRealStart = monthObj.todayStart
|
|
304
|
+
params.monthHistoryEnd = monthObj.yesterdayEnd
|
|
305
|
+
} else if (monthObj) {
|
|
306
|
+
params.monthRealTime = monthObj.splitDates
|
|
307
|
+
}
|
|
308
|
+
if (yearObj && yearObj.splitDates === 2) {
|
|
309
|
+
params.yearRealTime = yearObj.splitDates
|
|
310
|
+
params.yearRealStart = yearObj.todayStart
|
|
311
|
+
params.yearHistoryEnd = yearObj.yesterdayEnd
|
|
312
|
+
} else if (yearObj) {
|
|
313
|
+
params.yearRealTime = yearObj.splitDates
|
|
314
|
+
}
|
|
315
|
+
load.load("POST", 'api/af-revenue/sql/UserCountNum',
|
|
316
|
+
{data: params},
|
|
317
|
+
{resolveMsg: null, rejectMsg: null})
|
|
318
|
+
.then((res) => {
|
|
319
|
+
let info = res.data
|
|
320
|
+
let gasproperties = info.map(item => {return {f_gasproperties: item.f_gasproperties}})
|
|
321
|
+
let district = info.map(item => {
|
|
322
|
+
return { f_gasproperties: item.f_gasproperties, f_district: item.f_district }
|
|
323
|
+
})
|
|
324
|
+
let meter_type = info.map(item => {
|
|
325
|
+
return { f_meter_type: item.f_meter_type }
|
|
326
|
+
})
|
|
327
|
+
this.model.url = 'api/af-revenue/report/BusinessClassify'
|
|
328
|
+
this.$refs.paged.$refs.criteria.model.f_orgid = {
|
|
329
|
+
left1: JSON.stringify(this.distinctJson(gasproperties)),
|
|
330
|
+
left2: JSON.stringify(this.distinctJson(district)),
|
|
331
|
+
left3: JSON.stringify(this.distinctJson(meter_type)),
|
|
332
|
+
infoall: JSON.stringify(info)
|
|
333
|
+
}
|
|
334
|
+
this.$refs.paged.search(args)
|
|
335
|
+
})
|
|
336
|
+
} else {
|
|
337
|
+
this.model.params.monthRealTime = 0
|
|
338
|
+
this.model.params.yearRealTime = 0
|
|
339
|
+
this.model.params.monthRealStart = ''
|
|
340
|
+
this.model.params.monthHistoryEnd = ''
|
|
341
|
+
this.model.params.yearRealStart = ''
|
|
342
|
+
this.model.params.yearHistoryEnd = ''
|
|
343
|
+
if (monthObj && monthObj.splitDates === 2) {
|
|
344
|
+
this.model.params.monthRealTime = monthObj.splitDates
|
|
345
|
+
this.model.params.monthRealStart = monthObj.todayStart
|
|
346
|
+
this.model.params.monthHistoryEnd = monthObj.yesterdayEnd
|
|
347
|
+
}else if (monthObj) {
|
|
348
|
+
this.model.params.monthRealTime = monthObj.splitDates
|
|
349
|
+
}
|
|
350
|
+
if (yearObj && yearObj.splitDates === 2) {
|
|
351
|
+
this.model.params.yearRealTime = yearObj.splitDates
|
|
352
|
+
this.model.params.yearRealStart = yearObj.todayStart
|
|
353
|
+
this.model.params.yearHistoryEnd = yearObj.yesterdayEnd
|
|
354
|
+
}else if (yearObj) {
|
|
355
|
+
this.model.params.yearRealTime = yearObj.splitDates
|
|
356
|
+
}
|
|
357
|
+
this.model.url = 'api/af-revenue/report/BusinessClassifyTwo'
|
|
358
|
+
this.$refs.paged.search(args)
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
getRes (condition, obj) {
|
|
362
|
+
this.orgCondtionStr = condition
|
|
363
|
+
this.orgname = obj.orgnames[0]
|
|
364
|
+
this.depname = obj.depnames[0]
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
watch: {
|
|
368
|
+
'model.data' (val) {
|
|
369
|
+
if (val) {
|
|
370
|
+
this.tablen = val.split('</tr>').map(item => item.split('</td>').length-1).reduce((x, y) => x > y ? x : y)
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
'reportStyle'(val) {
|
|
374
|
+
this.$refs.paged.$refs.criteria.search()
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
computed: {
|
|
378
|
+
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
</script>
|
|
382
|
+
<style scoped>
|
|
383
|
+
.noborder{
|
|
384
|
+
border: none;
|
|
385
|
+
}
|
|
386
|
+
</style>
|