manage-client 3.2.34 → 3.2.35

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.
@@ -0,0 +1,380 @@
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <div class="basic-main" @keyup.enter="search">
4
+ <criteria-paged :model="model" v-ref:paged>
5
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri >
6
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
+ <div class="row">
8
+ <div class="col-sm-2 form-group">
9
+
10
+ <label for="startDate" class="font_normal_body" title="归属日期">开始日期</label>
11
+ <datepicker id="startDate" placeholder="开始日期" style="width:60%"
12
+ v-model="model.startDate"
13
+ :value.sync="model.startDate"
14
+ :format="'yyyy-MM-dd HH:mm:ss'"
15
+ :show-reset-button="true"
16
+ >
17
+ </datepicker>
18
+ </div>
19
+ <div class="col-sm-2 form-group">
20
+ <label for="endDate" class="font_normal_body" title="归属日期">结束日期</label>
21
+ <datepicker id="endDate" placeholder="结束日期" style="width:60%"
22
+ v-model="model.endDate"
23
+ :value.sync="model.endDate"
24
+ :format="'yyyy-MM-dd HH:mm:ss'"
25
+ :show-reset-button="true"
26
+ >
27
+ </datepicker>
28
+ </div>
29
+ <div class="span" style="float:right;">
30
+ <button class="button_search button_spacing" @click="search()">查询</button>
31
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
32
+
33
+ <export-excel :data="$parent.$parent.getCondition"
34
+ :field="$parent.$parent.getfield"
35
+ :footer="$parent.$parent.footer"
36
+ :header="$parent.$parent.other"
37
+ sqlurl="rs/logic/exportfile"
38
+ sql-name="areaChargeQuery"
39
+ template-name='小区汇总'
40
+ :choose-col="true"></export-excel>
41
+
42
+ <print-data :sum-field="$parent.$parent.getfield" :model="$parent.model" :field="$parent.$parent.getfield"
43
+ :defaultfield="$parent.$parent.defaultfield"
44
+ titletable="小区汇总"
45
+ :sumsmodel="$parent.$parent.sumsmodel"></print-data>
46
+ <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,
47
+ 'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
48
+
49
+ </div>
50
+ </div>
51
+ <div class="row" v-show="$parent.$parent.criteriaShow">
52
+ <res-select-group :initres="$parent.$parent.initres"
53
+ :showComponent="['company','department','operator']"
54
+ @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
55
+ <div class="col-sm-2 form-group">
56
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;小区&nbsp;&nbsp;&nbsp;</label>
57
+ <v-select :value.sync="model.f_residential_area"
58
+ class="select_list select"
59
+ enter-push
60
+ multiple
61
+ condition="f_residential_area in {}"
62
+ v-model="model.f_residential_area"
63
+ style="width: 60%"
64
+ :options='$parent.$parent.residentialArea' placeholder='选择小区'
65
+ close-on-select>
66
+
67
+ </v-select>
68
+ </div>
69
+ <div class="col-sm-2 form-group">
70
+ <label class="font_normal_body">客户类型</label>
71
+ <v-select :value.sync="model.f_user_type"
72
+ @change="$parent.$parent.userTypeChange()"
73
+ :options='$parent.$parent.usertypes' placeholder='请选择' v-model="model.f_user_type"
74
+ condition="f_user_type = '{}'"
75
+ close-on-select></v-select>
76
+ </div>
77
+ <div class="col-sm-2 form-group">
78
+ <label class="font_normal_body">用气性质</label>
79
+ <v-select :value.sync="model.f_gasproperties" v-model="model.f_gasproperties"
80
+ :options='$parent.$parent.gasproperties' placeholder='请选择'
81
+ condition="f_gasproperties = '{}'"
82
+ close-on-select></v-select>
83
+ </div>
84
+ <div class="col-sm-2 form-group">
85
+ <label class="font_normal_body">气表类型</label>
86
+ <v-select :value.sync="model.f_meter_type" multiple
87
+ :options='$parent.$parent.metertypes' placeholder='请选择' v-model="model.f_meter_type"
88
+ condition="f_meter_type in {}"
89
+ close-on-select></v-select>
90
+ </div>
91
+
92
+ </div>
93
+ </div>
94
+ </criteria>
95
+
96
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
97
+ <template partial='head'>
98
+ <tr>
99
+ <th>
100
+ <nobr>序号</nobr>
101
+ </th>
102
+ <th>
103
+ <nobr>小区</nobr>
104
+ </th>
105
+ <th>
106
+ <nobr>单价</nobr>
107
+ </th>
108
+ <th>
109
+ <nobr>购气方量</nobr>
110
+ </th>
111
+ <th>
112
+ <nobr>购气金额</nobr>
113
+ </th>
114
+ <th>
115
+ <nobr>备&nbsp;&nbsp;&nbsp;&nbsp;注</nobr>
116
+ </th>
117
+ </tr>
118
+ </template>
119
+ <template partial='body'>
120
+ <td style="text-align:center">
121
+ <nobr>{{$index+1}}</nobr>
122
+ </td>
123
+ <td style="text-align: center;">
124
+ <nobr>{{row.f_residential_area}}</nobr>
125
+ </td>
126
+ <td style="text-align: center;">
127
+ <nobr>{{row.f_price}}</nobr>
128
+ </td>
129
+ <td style="text-align: center;">
130
+ <nobr>{{row.f_gas}}</nobr>
131
+ </td>
132
+ <td style="text-align: center;">
133
+ <nobr>{{row.f_money}}</nobr>
134
+ </td>
135
+ <td style="text-align: center;">
136
+ <nobr></nobr>
137
+ </td>
138
+ </template>
139
+ <template partial='foot'></template>
140
+ </data-grid>
141
+ </criteria-paged>
142
+ <table class="table-hover">
143
+ <tr style="position: relative" class="table-bordered">
144
+ <td
145
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
146
+ 汇总信息
147
+ </td>
148
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
149
+ 购气方量合计:&emsp;{{sumsmodel.f_gas}}
150
+ </td>
151
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
152
+ 购气金额合计:&emsp;{{sumsmodel.f_money}}
153
+ </td>
154
+ </tr>
155
+ </table>
156
+ </div>
157
+ </div>
158
+ </template>
159
+
160
+ <script>
161
+ import {HttpResetClass, PagedList} from 'vue-client'
162
+ import exportConfig from '../config/exportConfig'
163
+
164
+ let readySomething = async function (self) {
165
+ self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString() + ' 00:00:00'
166
+ self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString() + ' 23:59:59'
167
+ // self.$refs.paged.$refs.cri.search()
168
+ self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
169
+ await self.$MagLoadParams.loadParam()
170
+ self.initParams()
171
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
172
+ }
173
+ export default {
174
+ title: '小区收费查询',
175
+ data() {
176
+ return {
177
+ config: {
178
+ defaultPrint: []
179
+ },
180
+ other:[],
181
+ footer:[],
182
+ //f_price_name:[],
183
+ gasproperties:[],
184
+ data: {},
185
+ rowdata:{},
186
+ initres: {
187
+ org:[this.$login.f.orgid],
188
+ dep:[],
189
+ user:[]
190
+ },
191
+ model: new PagedList('rs/sql/areaChargeQuery', 20, {startDate: 'this.model.startDate', endDate: 'this.model.endDate'}, {
192
+ f_gas: 0,
193
+ f_money: 0
194
+ }),
195
+ criteriaShow: false,
196
+ orgCondtionStr: '',
197
+ // 下拉框
198
+ meterbrands: [],
199
+ pricenames: [],
200
+ prices: [],
201
+ area: [],
202
+ //合计数据
203
+ defaultfield: [],
204
+ //小区
205
+ residentialArea: [],
206
+ sumsmodel: {},
207
+ f_filialeid: this.$login.f.f_orgid,
208
+ allorgid:[],
209
+ tempfalg :false,
210
+ lastorgstr:''
211
+ }
212
+ },
213
+ ready() {
214
+ this.getaddress()
215
+ readySomething(this).then(() => {
216
+ this.$emit('ready')
217
+ }).catch((error) => {
218
+ this.$emit('error', error)
219
+ })
220
+ },
221
+ methods: {
222
+
223
+ getotherfooter(){
224
+ // this.$refs.paged.$refs.cri.$refs.exports.otherData=[];
225
+ // this.$refs.paged.$refs.cri.$refs.exports.footerData=[];
226
+ this.other=[];
227
+ this.footer=[];
228
+ let exportdata = this.getCondition;
229
+ let otherInData=[];
230
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
231
+ let footerData=[],exportfield=this.getfield;
232
+ footerData.push("合计");
233
+ let self =this;
234
+ for(var field in self.sumsmodel){
235
+ footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
236
+ }
237
+ this.footer.push(footerData);
238
+ this.other.push(otherInData);
239
+ },
240
+ async getaddress(){
241
+ console.log('开始获取小区')
242
+ let HttpReset = new HttpResetClass()
243
+ var data = await HttpReset.load('POST', 'rs/sql/manage_getarealist', {
244
+ data: {
245
+ condition: `1=1 and s.f_filialeid = '${this.$login.f.orgid}'`
246
+ }
247
+ }, {resolveMsg: null, rejectMsg: '获取小区失败!'})
248
+ console.log('小区',data)
249
+ let house = [{label: '全部', value: ''}]
250
+ for (let row of data.data){
251
+ console.log('开始保存小区')
252
+ house.push({label: row.f_residential_area, value: row.f_residential_area})
253
+ }
254
+ this.residentialArea = house
255
+ },
256
+ //把数据库查询数据转换为下拉数据
257
+ calculate(rows){
258
+ let data = []
259
+ rows.forEach((row, n) => {
260
+ data[n] = {label: row.f_residential_area, value: row.id}
261
+ })
262
+ return data
263
+ },
264
+
265
+ search(){
266
+ this.$refs.paged.$refs.cri.search()
267
+ },
268
+ cancel() {
269
+ this.show = false
270
+ },
271
+ showmsg(obj){
272
+ this.rowdata=obj
273
+ this.show=true
274
+ },
275
+ userTypeChange () {
276
+ this.gasproperties=[]
277
+ if(this.$refs.paged.$refs.cri.model !==null) {
278
+ this.$refs.paged.$refs.cri.model.f_gasproperties=''
279
+
280
+ console.log("查看客户类型是什么",this.$refs.paged.$refs.cri.model.f_user_type[0])
281
+ this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.cri.model.f_user_type[0])
282
+ // this.gasproperties.push({label: '全部', value: ''})
283
+ }
284
+ else{
285
+ this.gasproperties =[{label: '全部', value: ''}]
286
+ }
287
+ },
288
+ initParams() {
289
+ // 初始化气表品牌
290
+ let brandArr = []
291
+ this.$MagGetSaleParam.getGasbrand().forEach((item) => {
292
+ let temp = {}
293
+ temp.label = item.label
294
+ temp.value = item.value.f_meter_brand
295
+ brandArr.push(temp)
296
+ })
297
+ this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
298
+ //初始化气表价格
299
+ this.prices = this.$MagGetSaleParam.getPrices();
300
+ },
301
+ selfSearch(args) {
302
+ console.log('开始时间',this.$refs.paged.$refs.cri.model.startDate)
303
+ if (this.$refs.paged.$refs.cri.model.startDate === '' || this.$refs.paged.$refs.cri.model.endDate === ''){
304
+ this.$showAlert('请先选择开始时间、结束时间,再进行查询操作!', 'warning', 3000)
305
+ } else {
306
+ //小区查询条件
307
+ let f_orgstr = this.orgCondtionStr
308
+ args.condition = `${args.condition} ` + f_orgstr
309
+ this.model.search(args.condition, args.model)
310
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
311
+ }
312
+ },
313
+ clear() {
314
+ //清空部门和人员
315
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
316
+ //部门和人员变为全选
317
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].$children[0].isSelectAll = false
318
+ this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
319
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
320
+ this.$refs.paged.$refs.cri.model[key] = []
321
+ })
322
+
323
+ },
324
+ show() {
325
+ this.criteriaShow = true
326
+ },
327
+ hidden() {
328
+ this.criteriaShow = !this.criteriaShow
329
+ },
330
+ async getRes(condition,obj) {
331
+ this.orgCondtionStr = condition
332
+ this.orgname = obj.orgnames[0]
333
+ this.depname = obj.depnames[0]
334
+
335
+ },
336
+ async updateParams() {
337
+ await this.$MagLoadParams.loadParam(this.f_filialeid)
338
+ this.inputtores = [];
339
+ this.inputtores.push({label: "全部", value: ""})
340
+ if(this.allorgid!=null){
341
+ this.allorgid.forEach((res)=>{
342
+ this.inputtores = this.inputtores.concat(this.$MagGetSaleParam.getresinputtor(res));
343
+ })
344
+ }
345
+ this.initParams()
346
+ },
347
+ },
348
+ events:{
349
+
350
+ },
351
+ watch: {
352
+ 'model'(val) {
353
+ },
354
+ sumsmodel:{
355
+ handler: function(val) {
356
+ this.getotherfooter();
357
+ },
358
+ deep: true
359
+ }
360
+ },
361
+ computed: {
362
+ getCondition() {
363
+ return {
364
+ startDate: this.$refs.paged.$refs.cri.model.startDate,
365
+ endDate: this.$refs.paged.$refs.cri.model.endDate,
366
+ condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr
367
+ }
368
+ },
369
+ getfield() {
370
+ return exportConfig.areaChargeQueryConfig
371
+ },
372
+ usertypes() {
373
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('用户类型')]
374
+ },
375
+ metertypes() {
376
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('气表类型')]
377
+ }
378
+ }
379
+ }
380
+ </script>