manage-client 4.1.57 → 4.1.58-lsrh

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.
@@ -21,7 +21,7 @@ var qtx = 'http://123.57.3.66:31467/'
21
21
  // var fuwu = 'http://203.57.101.233:9001'
22
22
  var bendi = 'http://123.57.3.66:31467/'
23
23
  // var bendi = 'http://119.187.112.234:8400/'
24
- var wode = 'http://192.168.50.67:31567/'
24
+ var wode = 'http://123.57.3.66:31467/'
25
25
  // 192.168.
26
26
  // var str = 'http://127.0.0.1:8080/manage', str2 = 'http://192.168.50.199:8300'
27
27
  // var str = 'http://192.168.10.233:8300', str2 = 'http://192.168.10.14:8300'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "manage-client",
3
- "version": "4.1.57",
3
+ "version": "4.1.58-lsrh",
4
4
  "description": "经营管控模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -0,0 +1,226 @@
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
+ <p class="bg-info text-center" style="padding: 8px;">物联网用气汇总</p>
6
+ <div class="form-group" v-if="!$parent.$parent.data.f_files_path"></div>
7
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial >
8
+ <div class="row">
9
+ <div class="col-sm-4" >
10
+ <label class="font_normal_body" for="startDate">开始日期:</label>
11
+ <datepicker id="startDate" placeholder="开始日期" style="width: 60%"
12
+ v-model="model.startDate"
13
+ :value.sync="model.startDate"
14
+ :disabled-days-of-Week="[]"
15
+ :format="'yyyy-MM-dd HH:mm:ss'"
16
+ :show-reset-button="reset">
17
+ </datepicker>
18
+ </div>
19
+ <div class="col-sm-4" >
20
+ <label class="font_normal_body" for="endDate">结束日期:</label>
21
+ <datepicker id="endDate" placeholder="结束日期" style="width: 60%"
22
+ v-model="model.endDate"
23
+ :value.sync="model.endDate"
24
+ :disabled-days-of-Week="[]"
25
+ :format="'yyyy-MM-dd HH:mm:ss'"
26
+ :show-reset-button="reset">
27
+ </datepicker>
28
+ </div>
29
+ <div class="col-sm-4">
30
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;公司&nbsp;&nbsp;&nbsp;</label>
31
+ <right-tree @re-res="$parent.$parent.getRes"></right-tree>
32
+ </div>
33
+ </div>
34
+ <div class="span" style = "float:right;">
35
+ <button class="button_search" @click="$parent.$parent.searchData()">查询</button>
36
+ <report-print id='gasprice' top='3cm' left='0' width='100%' height='100%' :preview="true"></report-print>
37
+ <report-excel id='gasprice'></report-excel>
38
+ </div>
39
+ </div>
40
+ </criteria>
41
+ <div partial='list' v-el:handcollect id='gasprice' style="overflow-y: scroll">
42
+ <table class='tableprint' style="margin: 0px auto" v-if="!$parent.data.f_files_path">
43
+ <thead>
44
+ <tr>
45
+ <th colspan='5' style="font-weight: normal; text-align: left;">
46
+ <h3 style="text-align: center">物联网用气汇总</h3>
47
+ </th>
48
+ </tr>
49
+ <tr>
50
+ <th colspan='5' style="font-weight: normal; text-align: center;">
51
+ 开始时间:{{model.model.startDate}}&nbsp;&nbsp;&nbsp;
52
+ 结束时间:{{ model.model.endDate }}
53
+ </th>
54
+ </tr>
55
+ <tr>
56
+ <th colspan='5' style="font-weight: normal; text-align: center;">
57
+ 打印时间:{{{$parent.printTime}}}
58
+ </th>
59
+ </tr>
60
+ <tr>
61
+ <th colspan='5' style="font-weight: normal; text-align: center;">
62
+ <div>
63
+ <span v-show="$parent.orgname.trim()!=''">公司:{{$parent.orgname}}</span>
64
+ <span v-show="$parent.depname.trim()!=''"> 部门:{{$parent.depname}}</span>
65
+ <span v-show="$parent.operatorname.trim()!=''">人员:{{$parent.operatorname}}</span>
66
+ </div>
67
+ </th>
68
+ </tr>
69
+ </thead>
70
+ <tr>
71
+ <td colspan='5'>
72
+ {{{ model.data.substring(26,model.data.length-8) }}}
73
+ </td>
74
+ </tr>
75
+ <tfoot>
76
+ <tr style="text-align: left">
77
+ <th colspan='2'>财务审核:</th>
78
+ <th colspan='2'>收款审核:</th>
79
+ <th colspan='1'>收款员:</th>
80
+ </tr>
81
+ </tfoot>
82
+ </table>
83
+ {{{ $parent.reportStr}}}
84
+ </div>
85
+ </criteria-paged>
86
+ <modal :show.sync="show" v-ref:modal small backdrop="false">
87
+ <header slot="modal-header" class="modal-header">
88
+ <h4 class="modal-title">输入文件名称</h4>
89
+ </header>
90
+ <article slot="modal-body" class="modal-body">
91
+ <div class="form-group">
92
+ <input type="text" class="form-control" v-model="filename" placeholder='保存的文件名'>
93
+ </div>
94
+ </article>
95
+ <footer slot="modal-footer" class="modal-footer">
96
+ <button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
97
+ <button v-show="show" type="button" class="btn btn-success" @click='confirm(filename)'>确认</button>
98
+ </footer>
99
+ </modal>
100
+ </div>
101
+ </template>
102
+
103
+ <script>
104
+ import { DataModel } from 'vue-client'
105
+ import co from 'co'
106
+ let saveFile = function * (self) {
107
+ // 线验证文件是否重名
108
+ let count = yield self.$resetpost('api/af-revenue/sql/manageSingleTable',
109
+ {data: {tablename: 't_report_record', condition: `f_files_name = '${self.filename}'`}},
110
+ {resolveMsg: null, rejectMsg: null})
111
+ if (count.data.length > 0) {
112
+ self.$showAlert('无法保存,文件名重名', 'warning', 3000)
113
+ return
114
+ }
115
+ let saveBack = yield self.$resetpost('api/af-revenue/logic/saveReport', {f_files_content: self.$refs.paged.$els.handcollect.innerHTML,
116
+ f_files_name: self.filename, f_files_type: self.data.f_report_type, f_component_name: 'manage-bus-summary',
117
+ f_operator: this.$login.f.name, f_query_month: `${self.model.model.startDate}-${self.model.model.endDate}`,
118
+ f_outlets: this.$login.f.depname})
119
+ if (saveBack.data.status === 'succeed') {
120
+ self.show = false
121
+ self.filename = ''
122
+ // 后台保存完成,通知刷新
123
+ self.$dispatch('save-success', self.filename)
124
+ }
125
+ }
126
+ export default {
127
+ title: '物联网用气汇总',
128
+ props: ['data'],
129
+ data () {
130
+ return {
131
+ printTime: this.$login.toStandardTimeString(),
132
+ depresid: [],
133
+ userresid: [],
134
+ f_orgid: this.$login.f.orgid,
135
+ f_depid: this.$login.f.depids,
136
+ f_operatorid: this.$login.f.id,
137
+ operatorid: [],
138
+ depid: [],
139
+ orgname: '',
140
+ depname: '',
141
+ operatorname: '',
142
+ f_inputtor:[],
143
+ f_user_type:'',
144
+ orgCondtionStr: '1=1',
145
+ model: new DataModel('api/af-revenue/report/gaswebmeterMoney', {startDate: 'this.model.startDate', endDate: 'this.model.endDate',
146
+ f_orgid: 'this.model.f_orgid'}),
147
+ reportStr: null,
148
+ show: false
149
+ }
150
+ },
151
+ ready () {
152
+ this.$refs.paged.$refs.criteria.model.startDate = this.$login.toStandardDateString() + ' 00:00:00'
153
+ this.$refs.paged.$refs.criteria.model.endDate = this.$login.toStandardDateString() + ' 23:59:59'
154
+ this.$refs.paged.$refs.criteria.search()
155
+ console.log(this.$login.f)
156
+ },
157
+ methods: {
158
+ searchData () {
159
+ this.$refs.paged.$refs.criteria.search()
160
+ },
161
+ selfSearch (args) {
162
+ let orgcondition = `f_orgid in ('${this.f_orgid}')`
163
+ this.$refs.paged.$refs.criteria.model.f_orgid = orgcondition
164
+ this.$refs.paged.search(args)
165
+ },
166
+ getRes (obj) {
167
+ this.orgname = obj.res[0]
168
+ this.depresid = obj.resids
169
+ this.f_orgid = obj.resids
170
+ },
171
+ getdep (obj, val) {
172
+ // this.depname = val[0]
173
+ this.userresid = obj
174
+ this.f_depid = obj
175
+ },
176
+ getuser ( obj, val) {
177
+ this.operatorname = val[0]
178
+ this.f_operatorid = obj
179
+ },
180
+ // 根据文件路径获取储存的报表内容
181
+ getFileContent (path) {
182
+ this.$resetpost('api/af-revenue/logic/getReportFileContent', {f_files_path: path}, {resolveMsg: null, rejectMsg: null}).then((res) => {
183
+ this.reportStr = res.data.filecontent
184
+ this.model.state = '正确'
185
+ })
186
+ },
187
+ confirm () {
188
+ if (!this.filename || this.filename === '') {
189
+ this.$showAlert('无法保存,文件名不能为空', 'warning', 3000)
190
+ }
191
+ let saveGen = saveFile(this)
192
+ co(saveGen)
193
+ },
194
+ close () {
195
+ this.show = false
196
+ },
197
+ // 将报表保存成文件
198
+ confirmReport () {
199
+ this.show = true
200
+ this.filename = this.data.f_report_name + this.$login.toStandardDateString()
201
+ },
202
+ },
203
+ watch: {
204
+ 'data' (val) {
205
+ if (val.f_files_path) {
206
+ this.getFileContent(val.f_files_path)
207
+ } else {
208
+ this.reportStr = null
209
+ }
210
+ }
211
+ },
212
+ computed: {
213
+ usertypes() {
214
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('用户类型')]
215
+ },
216
+ inputtor() {
217
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('抄表员')]
218
+ },
219
+ }
220
+ }
221
+ </script>
222
+ <style scoped>
223
+ .noborder{
224
+ border: none;
225
+ }
226
+ </style>
@@ -18,6 +18,9 @@
18
18
  <tabs header="小区汇总(机表)" v-if="permission('小区汇总(机表)')">
19
19
  <residential-query v-if="show.includes('小区汇总(机表)')" @deal-msg="dealMsg"></residential-query>
20
20
  </tabs>
21
+ <tabs header="小区汇总(物联网)" v-if="permission('小区汇总(物联网)')">
22
+ <web-residential-query v-if="show.includes('小区汇总(物联网)')" @deal-msg="dealMsg"></web-residential-query>
23
+ </tabs>
21
24
  <tabs header="小区汇总(卡表)" v-if="permission('小区汇总(卡表)')">
22
25
  <residential-card-query v-if="show.includes('小区汇总(卡表)')" @deal-msg="dealMsg" ></residential-card-query>
23
26
  </tabs>
@@ -0,0 +1,415 @@
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <div class="basic-main">
4
+ <div class="flex">
5
+ <criteria-paged :model="model" v-ref:paged>
6
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
7
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
8
+ <div class="row">
9
+ <div class="col-sm-2 form-group">
10
+ <label for="startDate" class="font_normal_body">开始日期</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">结束日期</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="form-group col-sm-2">
30
+ <label class="font_normal_body">选择小区</label>
31
+ <v-select :value.sync="model.f_residential_area" :value-single="true"
32
+ class="select_list select"
33
+ style="width: 60%"
34
+ v-model="model.f_residential_area"
35
+ :options='$parent.$parent.residentialArea' placeholder='选择小区'
36
+ condition="ud.f_residential_area = '{}'"
37
+ close-on-select search="true">
38
+ </v-select>
39
+ </div>
40
+ <div class="span" style="float:right;">
41
+ <button class="button_search button_spacing" @click="search">查询</button>
42
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
43
+
44
+ <export-excel :data="$parent.$parent.getCondition"
45
+ :field="$parent.$parent.getfield"
46
+ :footer="$parent.$parent.footer"
47
+ :header="$parent.$parent.other"
48
+ sqlurl="api/af-revenue/logic/openapi/exportfile"
49
+ sql-name="residentialquery"
50
+ template-name='小区综合查询(机表)导出'
51
+ :choose-col="true"></export-excel>
52
+ <print-data :sum-field="$parent.$parent.getfield" :model="$parent.model" :field="$parent.$parent.getfield"
53
+ :defaultfield="$parent.$parent.defaultfield"
54
+ titletable="小区综合查询(机表)导出"
55
+ :sumsmodel="$parent.$parent.sumsmodel"></print-data>
56
+ <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
57
+
58
+ </div>
59
+ </div>
60
+ <div class="row" v-show="$parent.$parent.criteriaShow">
61
+ <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
62
+ <div class="col-sm-2 form-group">
63
+ <label class="font_normal_body" >抄&nbsp;&nbsp;表&nbsp;员</label>
64
+ <v-select :value.sync="model.f_inputtor"
65
+ v-model="model.f_inputtor"
66
+ :options='$parent.$parent.inputtores' placeholder='请选择'
67
+ condition="f_inputtor = '{}'"
68
+ close-on-select :search="false">
69
+ </v-select>
70
+ </div>
71
+ <div class="col-sm-2 form-group">
72
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
73
+ <v-select :value.sync="model.f_meter_book" v-model="model.f_meter_book"
74
+ :options='$parent.$parent.meterbooks' placeholder='抄表册'
75
+ style="width:60%"
76
+ close-on-select
77
+ condition="f_meter_book_num = '{}'"></v-select>
78
+ </div>
79
+ </div>
80
+ </div>
81
+ </criteria>
82
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
83
+ <template partial='head'>
84
+ <tr>
85
+ <th>
86
+ <nobr>序号</nobr>
87
+ </th>
88
+ <th>
89
+ <nobr>小区</nobr>
90
+ </th>
91
+ <th>
92
+ <nobr>户数</nobr>
93
+ </th>
94
+ <th>
95
+ <nobr>新建户数</nobr>
96
+ </th>
97
+ <th>
98
+ <nobr>用气金额</nobr>
99
+ </th>
100
+ <th>
101
+ <nobr>用气量</nobr>
102
+ </th>
103
+ <th>
104
+ <nobr>相抵</nobr>
105
+ </th>
106
+ <th>
107
+ <nobr>实收</nobr>
108
+ </th>
109
+ <th>
110
+ <nobr>欠费</nobr>
111
+ </th>
112
+ </tr>
113
+ </template>
114
+ <template partial='body'>
115
+ <td style="text-align:center">
116
+ <nobr>{{$index+1}}</nobr>
117
+ </td>
118
+ <td style="text-align: center;">
119
+ <nobr>{{row.f_residential_area}}</nobr>
120
+ </td>
121
+ <td style="text-align: center;">
122
+ <nobr>{{row.hushu}}</nobr>
123
+ </td>
124
+ <td style="text-align: center;">
125
+ <nobr>{{row.xinhushu}}</nobr>
126
+ </td>
127
+ <td style="text-align: center;">
128
+ <nobr>{{row.f_oughtfee}}</nobr>
129
+ </td>
130
+ <td style="text-align: center;">
131
+ <nobr>{{row.f_oughtamount}}</nobr>
132
+ </td>
133
+ <td style="text-align: center;">
134
+ <nobr>{{row.f_debt_money}}</nobr>
135
+ </td>
136
+ <td style="text-align: center;">
137
+ <nobr>{{row.f_charge_money}}</nobr>
138
+ </td>
139
+ <td style="text-align: center;">
140
+ <nobr>{{row.f_qianfei}}</nobr>
141
+ </td>
142
+ </template>
143
+ <template partial='foot'></template>
144
+ </data-grid>
145
+ </criteria-paged>
146
+ <table class="table-hover">
147
+ <tr style="position: relative" class="table-bordered">
148
+ <td
149
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
150
+ 汇总信息
151
+ </td>
152
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
153
+ 户数合计:&emsp;{{sumsmodel.hushu}}
154
+ </td>
155
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
156
+ 新建户数合计:&emsp;{{sumsmodel.xinhushu}}
157
+ </td>
158
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
159
+ 用气金额合计:&emsp;{{sumsmodel.f_oughtfee}}
160
+ </td>
161
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
162
+ 用气量合计:&emsp;{{sumsmodel.f_oughtamount}}
163
+ </td>
164
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
165
+ 相抵合计:&emsp;{{sumsmodel.f_debt_money}}
166
+ </td>
167
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
168
+ 实收合计:&emsp;{{sumsmodel.f_charge_money}}
169
+ </td>
170
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
171
+ 欠费合计:&emsp;{{sumsmodel.f_qianfei}}
172
+ </td>
173
+ </tr>
174
+ </table>
175
+ </div>
176
+ </div>
177
+ </div>
178
+ </template>
179
+
180
+ <script>
181
+ import {PagedList, HttpResetClass} from 'vue-client'
182
+ import defaultPrint from '../config/DefaultPrint'
183
+ import exportConfig from "../config/exportConfig";
184
+ import plugins from "../../../plugins/GetLoginInfoService";
185
+
186
+ let readySomething = async function (self) {
187
+ self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
188
+ //加载抄表册
189
+ self.$MagGetSaleParam.initinputtor();
190
+ self.getinputtores();
191
+ self.initmeterbook();
192
+
193
+
194
+ self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString() + ' 00:00:00'
195
+ self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString() + ' 23:59:59'
196
+ // await self.$refs.paged.$refs.cri.search()
197
+ await self.$MagLoadParams.loadParam()
198
+ self.initParams()
199
+
200
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
201
+ }
202
+
203
+ export default {
204
+ title: '小区汇总(物联网)',
205
+ data() {
206
+ let model = new PagedList('api/af-revenue/sql/webresidentialquery', 20, {
207
+ startdate: 'this.model.startDate',
208
+ enddate: 'this.model.endDate'
209
+ },{
210
+ hushu:0,
211
+ xinhushu:0,
212
+ f_oughtfee:0,
213
+ f_oughtamount:0,
214
+ f_debt_money:0,
215
+ f_charge_money:0,
216
+ f_qianfei:0
217
+ })
218
+ model.f_filialeid = this.$login.f.orgid
219
+ return {
220
+ //默认打印列
221
+ defaultfield: [],
222
+ config: {
223
+ defaultPrint: ['xinhushu', 'f_oughtfee', 'f_charge_money']
224
+ },
225
+ data: {},
226
+ other: [],
227
+ footer: [],
228
+ initres: {
229
+ org:[this.$login.f.orgid],
230
+ dep:[],
231
+ user:[]
232
+ },
233
+ model: model,
234
+ criteriaShow: false,
235
+ f_filialeid: this.$login.f.orgid,
236
+ orgid: [this.$login.f.orgid],
237
+ //小区
238
+ residentialArea: [],
239
+ orgCondtionStr: '',
240
+ //合计数据
241
+ sumsmodel:{},
242
+ meterbooks:[{label: '全部',value: ''}], //抄表册
243
+ inputtores:[{label: '全部',value: ''}],
244
+ allorgid:[],
245
+ tempfalg :false,
246
+ lastorgstr:'',
247
+ }
248
+ },
249
+ ready() {
250
+ this.getaddress()
251
+ readySomething(this).then(() => {
252
+ this.$emit('ready')
253
+ }).catch((error) => {
254
+ this.$emit('error', error)
255
+ })
256
+ },
257
+ methods: {
258
+ async initmeterbook(orgstr){
259
+ if(orgstr == null ){
260
+ orgstr = this.f_filialeid;
261
+ }
262
+ //获取新的抄表册,先去清理所有的抄表册
263
+ this.$GetSaleParam.meterbooks = [];
264
+ //开始加载新的抄表册
265
+ await this.$LoadParams.loadMeterBook(orgstr)
266
+ this.meterbooks = [{label: '全部', value: ''}, ...this.$GetSaleParam.getMeterBooks()]
267
+ },
268
+ async updateParams() {
269
+ await this.$MagLoadParams.loadParam(this.f_filialeid)
270
+ this.inputtores = [];
271
+ this.inputtores.push({label: "全部", value: ""})
272
+ if(this.allorgid!=null){
273
+ this.allorgid.forEach((res)=>{
274
+ this.inputtores = this.inputtores.concat(this.$MagGetSaleParam.getresinputtor(res));
275
+ })
276
+ }
277
+ },
278
+ getinputtores() {
279
+ // 获取抄表员
280
+ let rs = []
281
+ if (this.$login.f.f_gasman.length > 0) {
282
+ for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
283
+ let temp = {
284
+ label: this.$login.f.f_gasman[i].name,
285
+ value: this.$login.f.f_gasman[i].name
286
+ }
287
+ rs.push(temp)
288
+ }
289
+ }
290
+
291
+ return [{label: '全部', value: ''}, ...rs]
292
+ },
293
+ //加载抄表册
294
+ loadMeterBooks(){
295
+ this.meterbooks = [{label: '全部', value: ''}, ...this.$GetSaleParam.getMeterBooks()]
296
+ },
297
+ getotherfooter() {
298
+ // this.$refs.paged.$refs.cri.$refs.exports.otherData=[];
299
+ // this.$refs.paged.$refs.cri.$refs.exports.footerData=[];
300
+ this.other = [];
301
+ this.footer = [];
302
+ let exportdata = this.getCondition;
303
+ let otherInData = [];
304
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
305
+ let footerData = [], exportfield = this.getfield;
306
+ footerData.push("合计");
307
+ let self = this;
308
+ for (var field in self.sumsmodel) {
309
+ footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
310
+ }
311
+ this.footer.push(footerData);
312
+ this.other.push(otherInData);
313
+ let date = []
314
+ date.push(`起始时间:${this.$refs.paged.$refs.cri.model.startDate}`)
315
+ date.push(`终止时间:${this.$refs.paged.$refs.cri.model.endDate}`)
316
+ this.other.push(date)
317
+ },
318
+ async getaddress() {
319
+ console.log('开始获取小区')
320
+ let HttpReset = new HttpResetClass()
321
+ var data = await HttpReset.load('POST', 'api/af-revenue/sql/manage_getarealist', {
322
+ data: {
323
+ condition: `1=1 and s.f_filialeid = '${this.$login.f.orgid}'`
324
+ }
325
+ }, {resolveMsg: null, rejectMsg: '获取小区失败!'})
326
+ console.log('小区', data)
327
+ let house = [{label: '全部', value: ''}]
328
+ for (let row of data.data) {
329
+ console.log('开始保存小区')
330
+ house.push({label: row.f_residential_area, value: row.f_residential_area})
331
+ }
332
+ this.residentialArea = house
333
+ },
334
+ selfSearch(args) {
335
+ // if (this.orgCondtionStr)
336
+ // args.condition = `${args.condition}` + 'and f_filialeid in ' + this.orgCondtionStr
337
+ // else
338
+ // args.condition = `${args.condition}` + 'and f_filialeid in ' + '(' + this.$login.f.orgid + ')'
339
+
340
+ args.condition = `${args.condition}` + this.orgCondtionStr
341
+ this.model.search(args.condition, args.model)
342
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
343
+ },
344
+ async getRes(condition,obj) {
345
+ console.log(condition,"========")
346
+ this.orgCondtionStr = condition
347
+
348
+ },
349
+ clear() {
350
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
351
+ this.$refs.paged.$refs.cri.model[key] = []
352
+ })
353
+ },
354
+ hidden() {
355
+ this.criteriaShow = !this.criteriaShow
356
+ }
357
+ },
358
+ watch: {
359
+ sumsmodel: {
360
+ handler: function (val) {
361
+ this.getotherfooter();
362
+ },
363
+ deep: true
364
+ },
365
+ async 'orgCondtionStr'(val) {
366
+ this.$refs.paged.$refs.cri.model.f_inputtor = []
367
+ this.$refs.paged.$refs.cri.model.f_meter_book = []
368
+ this.meterbooks = [{label: '全部',value: ''}];
369
+ if(this.lastorgstr != val){
370
+ this.tempfalg = true;
371
+ this.lastorgstr = val;
372
+ }
373
+ if(this.tempfalg && val != null && val!='' && val.indexOf("(")>-1){
374
+ this.tempfalg = false;
375
+ let a = val.substring(val.indexOf("(")+2)
376
+ await this.initmeterbook(a.substring(0,a.indexOf(")")-1));
377
+ }
378
+ let res = val.match(/'(.*?)'/)
379
+ if (res) {
380
+ this.f_filialeid = res[1]
381
+ if(res.input !=null){
382
+ let resorgid = res.input.substring(res.input.indexOf("'"));
383
+ if(resorgid!= null && resorgid!=''){
384
+ resorgid = resorgid.substring(0,resorgid.lastIndexOf("'")+1);
385
+ // resorgid = resorgid.replaceAll("'","");
386
+ resorgid = resorgid.replace(/'/g,"");
387
+ this.allorgid = resorgid.split(",")
388
+ }
389
+ }
390
+ this.updateParams()
391
+ }
392
+ }
393
+ },
394
+ computed: {
395
+
396
+ getCondition() {
397
+ var con = ""
398
+ if (this.orgCondtionStr) {
399
+ con = `${this.$refs.paged.$refs.cri.condition} ` + this.orgCondtionStr
400
+ } else {
401
+ con = `${this.$refs.paged.$refs.cri.condition}`
402
+ }
403
+ return {
404
+ startdate: this.$refs.paged.$refs.cri.model.startDate,
405
+ enddate: this.$refs.paged.$refs.cri.model.endDate,
406
+ condition: con
407
+ }
408
+ },
409
+ getfield() {
410
+ return exportConfig.ResidentialQuery
411
+ }
412
+ }
413
+
414
+ }
415
+ </script>