telephone-clients 4.0.0-1-28 → 4.0.0-1-29

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.
@@ -1,343 +1,343 @@
1
- <template >
2
- <div id="pc-finduser-page1" class="aaa4" style="background-color: #f8f8f8">
3
- <criteria-paged :model="model" v-ref:paged >
4
- <criteria partial='criteria' v-ref:criteria @condition-changed='$parent.search'>
5
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
- <div class="row" style="margin:10px 10px 0 10px">
7
- <div class="form-group col-sm-4" >
8
- <label class="font_normal_body" style="width:55%">电话号码:</label>
9
- <input type="text" class="input_search" v-model="model.f_user_phone" placeholder='电话号码'
10
- condition="ti.f_user_phone like '%{}%'"
11
- :size="model.f_user_phone ? model.f_user_phone.length : 8" style="height: 95%;width: 90%"></input>
12
- </div>
13
- <div class="form-group col-sm-4" >
14
- <label class="font_normal_body" style="width:55%">用户编号:</label>
15
- <input type="text" class="input_search" v-model="model.f_userinfo_code" placeholder='用户编号'
16
- condition="ti.f_userinfo_code like '%{}%'"
17
- :size="model.f_userinfo_code ? model.f_userinfo_code.length : 8" style="height: 95%;width: 90%"></input>
18
- </div>
19
- <div class="form-group col-sm-4">
20
- <button type="button" name="button" class="button_spacing button_search" style="float: right" @click="search()">查询</button>
21
- <button type="button" name="button" style="background-color: #5ac0d9;border-radius: 4px;" class="button_spacing button_search" @click="$parent.$parent.clear()">清空</button>
22
- <div style="float: right" class="button_spacing":class="{'button_shrink_bottom':$parent.$parent.button_bottom, 'button_shrink_top':!$parent.$parent.button_bottom}" @click="$parent.$parent.showFormRowItems()"></div>
23
- </div>
24
- <div class="row" v-if="$parent.$parent.form_items_show">
25
- <div class="form-group col-sm-4">
26
- <label class="font_normal_body" style="width:55%">表号:</label>
27
- <input type="text" class="input_search" v-model="model.f_meternumber" placeholder='表号'
28
- condition="tu.f_meternumber like '%{}%'"
29
- :size="model.f_meternumber ? model.f_meternumber.length : 8" style="height: 95%;width: 90%"></input>
30
- </div>
31
- <div class="form-group col-sm-4" >
32
- <label class="font_normal_body" style="width:55%">用户名称:</label>
33
- <input type="text" class="input_search" v-model="model.f_user_name" placeholder='姓名'
34
- condition="ti.f_user_name like '%{}%'"
35
- :size="model.f_user_name ? model.f_user_name.length * 2 : 4" style="height: 95%;width: 90%"></input>
36
- </div>
37
- <div class="form-group col-sm-4" >
38
- <label class="font_normal_body" style="width:55%">用户地址:</label>
39
- <input type="text" class="input_search" v-model="model.f_address" placeholder='地址'
40
- condition="ta.f_address like '%{}%'"
41
- :size="model.f_address ? model.f_address.length * 2 : 4" style="height: 95%;width: 90%" ></input>
42
- </div>
43
- <div class="form-group col-sm-4" v-if="$parent.$parent.enter_number_show">
44
- <label class="font_normal_body" style="width:55%">入户证号:</label>
45
- <input type="text" class="input_search" v-model="model.f_enter_number" placeholder='入户证号'
46
- condition="ta.f_enter_number like '%{}%'"
47
- style="height: 95%;width: 90%"></input>
48
- </div>
49
- <div class="form-group col-sm-4" v-if="$parent.$parent.residential_area_show">
50
- <label class="font_normal_body" style="width:55%">小区:</label>
51
- <input type="text" class="input_search" v-model="model.f_residential_area" placeholder='小区'
52
- condition="ta.f_residential_area like '%{}%'"
53
- style="height: 95%;width: 90%"></input>
54
- </div>
55
- <div class="form-group col-sm-4" v-if="$parent.$parent.building_show">
56
- <label class="font_normal_body" style="width:55%">楼栋:</label>
57
- <input type="text" class="input_search" v-model="model.f_building" placeholder='楼栋'
58
- condition="ta.f_building = '{}'"
59
- style="height: 95%;width: 90%"></input>
60
- </div>
61
- <div class="form-group col-sm-4" v-if="$parent.$parent.unit_show">
62
- <label class="font_normal_body" style="width:55%">单元:</label>
63
- <input type="text" class="input_search" v-model="model.f_unit" placeholder='单元'
64
- condition="ta.f_unit = '{}'"
65
- style="height: 95%;width: 90%"></input>
66
- </div>
67
- <div class="form-group col-sm-4" v-if="$parent.$parent.floor_show">
68
- <label class="font_normal_body" style="width:55%">楼层:</label>
69
- <input type="text" class="input_search" v-model="model.f_floor" placeholder='楼层'
70
- condition="ta.f_floor = '{}'"
71
- style="height: 95%;width: 90%"></input>
72
- </div>
73
- <div class="form-group col-sm-4" v-if="$parent.$parent.room_show">
74
- <label class="font_normal_body" style="width:55%">房间号:</label>
75
- <input type="text" class="input_search" v-model="model.f_room" placeholder='房间号'
76
- condition="ta.f_room = '{}'"
77
- style="height: 95%;width: 90%"></input>
78
- </div>
79
- </div>
80
- <!-- <div class="form-group col-sm-2" >-->
81
- <!-- <v-select :value.sync="model.f_residential_area" :options='$parent.$parent.areaselected' placeholder='小区' close-on-select width="90%"-->
82
- <!-- :size="model.f_residential_area?model.f_residential_area.length * 2 : 4" class="select select_list form-group" v-model='model.f_residential_area' condition="ta.f_residential_area like '%{}%'" :search='true'></v-select>-->
83
- <!-- </div>-->
84
-
85
- </div>
86
- </div>
87
- </criteria>
88
- <list :model='model' partial='list' style="background-color: #f8f8f8;overflow: auto;">
89
- <div partial class="panel panel-default well" style="margin: 15px 10px 0 10px;background-color: #ffffff;border-radius: 8px;border: solid 1px #dddddd;">
90
- <div class="panel-body inbg" :class="{aaa: $parent.$parent.$parent.tempnumber === row.f_userinfo_code}">
91
- <div class="row">
92
- <div class="col-sm-4">
93
- <label style="color: #666666">用户编号:</label> {{row.f_userinfo_code}}
94
- </div>
95
- <div class="col-sm-4">
96
- <label style="color: #666666">用户姓名:</label> {{row.f_user_name}}
97
- </div>
98
- <div class="col-sm-4">
99
- <label style="color: #666666">用户状态: </label>{{row.f_user_state}}
100
- </div>
101
-
102
- </div>
103
- <div class="row">
104
- <div class="col-sm-4">
105
- <label style="color: #666666">用户电话:</label> {{row.f_user_phone}}
106
- </div>
107
- <div class="col-sm-4">
108
- <label style="color: #666666">用户类别: </label>{{row.f_user_type}}
109
- </div>
110
- <div class="col-sm-4">
111
- <label style="color: #666666">账户结余: </label>{{row.f_balance}}
112
- </div>
113
- </div>
114
- <div class="row">
115
- <div class="col-sm-6" v-if="$parent.$parent.$parent.enter_number_show">
116
- <label style="color: #666666">入户证号: </label>{{row.f_enter_number}}
117
- </div>
118
- <div class="col-sm-6" v-if="$parent.$parent.$parent.createfile_date">
119
- <label style="color: #666666">建档日期: </label>{{row.f_createfile_date}}
120
- </div>
121
- <div class="col-sm-6" v-if="$parent.$parent.$parent.f_inputtor_show">
122
- <label style="color: #666666">抄表人员: </label>{{row.f_inputtor}}
123
- </div>
124
- <div class="col-sm-12">
125
- <label style="color: #666666">详细地址: </label>{{row.f_address}}
126
- </div>
127
- <div class="col-sm-6">
128
- <label style="color: #666666">区域信息: </label>{{row.f_slice_area}}
129
- </div>
130
-
131
- </div>
132
- <div class="row">
133
- <div class="col-sm-6" v-if="$parent.$parent.$parent.isText">
134
- <button type="button" name="button" class="btn btn-link"
135
- @click.stop="$parent.$parent.$parent.bind(row)">绑定</button>
136
- </div>
137
- </div>
138
- </div>
139
- </div>
140
- </list>
141
- </criteria-paged>
142
- </div>
143
- </template>
144
-
145
- <script>
146
- import {HttpResetClass, PagedList} from 'vue-client'
147
- export default {
148
- title: '查询用户',
149
- data () {
150
- return {
151
- model: new PagedList('af-telephone/rs/sql/tel_getUserInfoAdress', 10),
152
- show: false,
153
- row: Object,
154
- tempnumber: '',
155
- rows:[],
156
- enter_number_show:false,
157
- createfile_date:false,
158
- f_inputtor_show:false,
159
- residential_area_show:true,
160
- building_show:true,
161
- unit_show:true,
162
- room_show:true,
163
- floor_show:true,
164
- show_btn:true,
165
- button_bottom:true,
166
- form_items_show:false
167
- }
168
- },
169
- props: {
170
- isText: {
171
- type: Boolean,
172
- default: false
173
- },
174
- user: {},
175
- callObj:{
176
- type: Object
177
- },
178
- },
179
- methods: {
180
- clear(){
181
- //清空查询条件
182
- this.$refs.paged.$refs.criteria.model={}
183
- },
184
- // 获取该组件配置文件
185
- getTelFindUserConfig(){
186
- let http = new HttpResetClass()
187
- http.load('GET', `/af-telephone/rs/vue`, {}, {resolveMsg: null, rejectMsg: null}).then(res=>{
188
- if (res.data.TelFindUser){
189
- let telconfig = res.data.TelFindUser.data
190
- if(telconfig.criteria){
191
- telconfig.criteria.forEach((item)=>{
192
- if(item.name =='入户证号'){
193
- this.enter_number_show = item.ifshow
194
- }
195
- if(item.name =='建档日期'){
196
- this.createfile_date = item.ifshow
197
- }
198
- if(item.name =='抄表员'){
199
- this.f_inputtor_show = item.ifshow
200
- }
201
- if(item.name =='小区'){
202
- this.residential_area_show = item.ifshow
203
- }
204
- if(item.name =='楼栋'){
205
- this.building_show = item.ifshow
206
- }
207
- if(item.name =='单元'){
208
- this.unit_show = item.ifshow
209
- }
210
- if(item.name =='房间号'){
211
- this.room_show = item.ifshow
212
- }
213
- if(item.name =='楼层'){
214
- this.floor_show = item.ifshow
215
- }
216
-
217
- })
218
- }
219
- }
220
- })
221
- },
222
- search (args) {
223
- if (this.$login.f.orgid == 165 && this.$login.f.fullnames.indexOf("汉中")!= -1){
224
- args.condition += ` and ti.f_user_state = '正常'`
225
- }else if(this.$login.f.orgid == 46997 && this.$login.f.fullnames.indexOf("铜川市天然气")!= -1){
226
- args.condition += ` and ti.f_user_state = '正常'`
227
- }else {
228
- args.condition += ` and ti.f_filialeid = '${this.$login.f.orgid}' and ti.f_user_state in('正常','停用','预备')`
229
- }
230
- this.model.search(args.condition, args.model)
231
- },
232
- //展示表单项
233
- showFormRowItems(){
234
- this.button_bottom = !this.button_bottom
235
- this.form_items_show = !this.form_items_show
236
- },
237
- bind (row) {
238
- //tag
239
- },
240
- teleNoQuery (teleNo) {
241
- this.$refs.paged.$refs.criteria.model.f_user_phone = teleNo
242
- this.$refs.paged.$refs.criteria.search()
243
- }
244
- },
245
- ready(){
246
- this.getTelFindUserConfig()
247
- this.$refs.paged.$refs.criteria.search()
248
- },
249
- watch: {
250
- // 原代码
251
- // 'callObj.callNum' () {
252
- // // 查找用户的 业务逻辑
253
- // let http = new HttpResetClass()
254
- // http.load('POST', 'af-telephone/rs/sql/tel_getUserInfoAdress', {data: {
255
- // condition: `(f_user_phone = '${this.callObj.callNum}' or f_zuhu_phone = '${this.callObj.callNum}' or f_rent_phone = '${this.callObj.callNum}') and ti.f_user_state = '正常' `,
256
- // }},{resolveMsg: null, rejectMsg: null}).then((req) => {
257
- // this.model.rows = req.data
258
- // this.model.state = '正确'
259
- // })
260
- // },
261
- // 测试用户电话回显异常bug
262
- 'callObj' () {
263
- // console.log('监听到用户手机号');
264
- if(this.callObj.callNum !==''){
265
- // console.log('号码非空');
266
- // 查找用户的 业务逻辑
267
- let http = new HttpResetClass()
268
- http.load('POST', 'af-telephone/rs/sql/tel_getUserInfoAdress', {data: {
269
- condition: `(f_user_phone = '${this.callObj.callNum}' or f_zuhu_phone = '${this.callObj.callNum}' or f_rent_phone = '${this.callObj.callNum}') and ti.f_user_state = '正常' `,
270
- }},{resolveMsg: null, rejectMsg: null}).then((req) => {
271
- this.model.rows = req.data
272
- this.model.state = '正确'
273
- })
274
- }
275
- },
276
- 'user' (val) {
277
- // this.$resetpost('af-telephone/rs/sql/singleTable', {data: { tablename: 't_userinfo', condition: "f_user_name='" + this.user.name + "' and f_userinfo_id=" + this.user.userId }}).then((req) => {
278
- // this.row = req.data
279
- // })
280
- if (val.name === '' && val.userId === '') { // 用户未绑定
281
- // 清空查询条件
282
- Object.keys(this.$refs.paged.$refs.criteria.model).forEach((key) => {
283
- this.$refs.paged.$refs.criteria.model[key] = ''
284
- })
285
- this.model.rows = []
286
- this.model.state = '错误'
287
- this.model.error = '未找到用户或用户未绑定'
288
- this.$emit('find-error', '未找到用户或用户未绑定')
289
- return
290
- }
291
- this.$refs.paged.$refs.criteria.model.f_user_name = this.user.name
292
- this.$refs.paged.$refs.criteria.model.f_userinfo_id = this.user.userId
293
- this.$refs.paged.$refs.criteria.search()
294
- // this.model.search(`f_user_name = '${this.user.name}' and f_userinfo_id = ${this.user.userId}`, this.model)
295
- },
296
- 'model.state' (val) {
297
- if (val === '正确' && this.model.rows.length === 1) {
298
- this.$emit('find-one', this.model.rows[0])
299
- }
300
- }
301
- },
302
- events: {
303
- //点击用户信息后变色
304
- 'select-changed' :function (val) {
305
- this.tempnumber = val.val.f_userinfo_code
306
- }
307
- }
308
- }
309
- </script>
310
- <style scoped>
311
- label {
312
- width: 80px;
313
- }
314
- #pc-finduser-page .form-input-group {
315
- margin: 5px 0px;
316
- height: auto;
317
- }
318
- .themeOne .span{
319
- overflow-y: scroll;
320
- }
321
- .pager{
322
- margin: 5px 0px !important;
323
- background-color: #f8f8f8;
324
- }
325
- .inbg{
326
- font-family: PingFang-SC-Medium;
327
- font-size: 14px;
328
- font-weight: normal;
329
- font-stretch: normal;
330
- line-height: 18px;
331
- letter-spacing: 0px;
332
- color: #333333;
333
- }
334
- .aaa{
335
- background-color: #d8eafb;
336
- }
337
- </style>
338
- <style>
339
- #pc-finduser-page1 ul{
340
- margin: 5px 0px !important;
341
- background-color: #f8f8f8 !important;
342
- }
343
- </style>
1
+ <template >
2
+ <div id="pc-finduser-page1" class="aaa4" style="background-color: #f8f8f8">
3
+ <criteria-paged :model="model" v-ref:paged >
4
+ <criteria partial='criteria' v-ref:criteria @condition-changed='$parent.search'>
5
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
+ <div class="row" style="margin:10px 10px 0 10px">
7
+ <div class="form-group col-sm-4" >
8
+ <label class="font_normal_body" style="width:55%">电话号码:</label>
9
+ <input type="text" class="input_search" v-model="model.f_user_phone" placeholder='电话号码'
10
+ condition="ti.f_user_phone like '%{}%'"
11
+ :size="model.f_user_phone ? model.f_user_phone.length : 8" style="height: 95%;width: 90%"></input>
12
+ </div>
13
+ <div class="form-group col-sm-4" >
14
+ <label class="font_normal_body" style="width:55%">用户编号:</label>
15
+ <input type="text" class="input_search" v-model="model.f_userinfo_code" placeholder='用户编号'
16
+ condition="ti.f_userinfo_code like '%{}%'"
17
+ :size="model.f_userinfo_code ? model.f_userinfo_code.length : 8" style="height: 95%;width: 90%"></input>
18
+ </div>
19
+ <div class="form-group col-sm-4">
20
+ <button type="button" name="button" class="button_spacing button_search" style="float: right" @click="search()">查询</button>
21
+ <button type="button" name="button" style="background-color: #5ac0d9;border-radius: 4px;" class="button_spacing button_search" @click="$parent.$parent.clear()">清空</button>
22
+ <div style="float: right" class="button_spacing":class="{'button_shrink_bottom':$parent.$parent.button_bottom, 'button_shrink_top':!$parent.$parent.button_bottom}" @click="$parent.$parent.showFormRowItems()"></div>
23
+ </div>
24
+ <div class="row" v-if="$parent.$parent.form_items_show">
25
+ <div class="form-group col-sm-4">
26
+ <label class="font_normal_body" style="width:55%">表号:</label>
27
+ <input type="text" class="input_search" v-model="model.f_meternumber" placeholder='表号'
28
+ condition="tu.f_meternumber like '%{}%'"
29
+ :size="model.f_meternumber ? model.f_meternumber.length : 8" style="height: 95%;width: 90%"></input>
30
+ </div>
31
+ <div class="form-group col-sm-4" >
32
+ <label class="font_normal_body" style="width:55%">用户名称:</label>
33
+ <input type="text" class="input_search" v-model="model.f_user_name" placeholder='姓名'
34
+ condition="ti.f_user_name like '%{}%'"
35
+ :size="model.f_user_name ? model.f_user_name.length * 2 : 4" style="height: 95%;width: 90%"></input>
36
+ </div>
37
+ <div class="form-group col-sm-4" >
38
+ <label class="font_normal_body" style="width:55%">用户地址:</label>
39
+ <input type="text" class="input_search" v-model="model.f_address" placeholder='地址'
40
+ condition="ta.f_address like '%{}%'"
41
+ :size="model.f_address ? model.f_address.length * 2 : 4" style="height: 95%;width: 90%" ></input>
42
+ </div>
43
+ <div class="form-group col-sm-4" v-if="$parent.$parent.enter_number_show">
44
+ <label class="font_normal_body" style="width:55%">入户证号:</label>
45
+ <input type="text" class="input_search" v-model="model.f_enter_number" placeholder='入户证号'
46
+ condition="ta.f_enter_number like '%{}%'"
47
+ style="height: 95%;width: 90%"></input>
48
+ </div>
49
+ <div class="form-group col-sm-4" v-if="$parent.$parent.residential_area_show">
50
+ <label class="font_normal_body" style="width:55%">小区:</label>
51
+ <input type="text" class="input_search" v-model="model.f_residential_area" placeholder='小区'
52
+ condition="ta.f_residential_area like '%{}%'"
53
+ style="height: 95%;width: 90%"></input>
54
+ </div>
55
+ <div class="form-group col-sm-4" v-if="$parent.$parent.building_show">
56
+ <label class="font_normal_body" style="width:55%">楼栋:</label>
57
+ <input type="text" class="input_search" v-model="model.f_building" placeholder='楼栋'
58
+ condition="ta.f_building = '{}'"
59
+ style="height: 95%;width: 90%"></input>
60
+ </div>
61
+ <div class="form-group col-sm-4" v-if="$parent.$parent.unit_show">
62
+ <label class="font_normal_body" style="width:55%">单元:</label>
63
+ <input type="text" class="input_search" v-model="model.f_unit" placeholder='单元'
64
+ condition="ta.f_unit = '{}'"
65
+ style="height: 95%;width: 90%"></input>
66
+ </div>
67
+ <div class="form-group col-sm-4" v-if="$parent.$parent.floor_show">
68
+ <label class="font_normal_body" style="width:55%">楼层:</label>
69
+ <input type="text" class="input_search" v-model="model.f_floor" placeholder='楼层'
70
+ condition="ta.f_floor = '{}'"
71
+ style="height: 95%;width: 90%"></input>
72
+ </div>
73
+ <div class="form-group col-sm-4" v-if="$parent.$parent.room_show">
74
+ <label class="font_normal_body" style="width:55%">房间号:</label>
75
+ <input type="text" class="input_search" v-model="model.f_room" placeholder='房间号'
76
+ condition="ta.f_room = '{}'"
77
+ style="height: 95%;width: 90%"></input>
78
+ </div>
79
+ </div>
80
+ <!-- <div class="form-group col-sm-2" >-->
81
+ <!-- <v-select :value.sync="model.f_residential_area" :options='$parent.$parent.areaselected' placeholder='小区' close-on-select width="90%"-->
82
+ <!-- :size="model.f_residential_area?model.f_residential_area.length * 2 : 4" class="select select_list form-group" v-model='model.f_residential_area' condition="ta.f_residential_area like '%{}%'" :search='true'></v-select>-->
83
+ <!-- </div>-->
84
+
85
+ </div>
86
+ </div>
87
+ </criteria>
88
+ <list :model='model' partial='list' style="background-color: #f8f8f8;overflow: auto;">
89
+ <div partial class="panel panel-default well" style="margin: 15px 10px 0 10px;background-color: #ffffff;border-radius: 8px;border: solid 1px #dddddd;">
90
+ <div class="panel-body inbg" :class="{aaa: $parent.$parent.$parent.tempnumber === row.f_userinfo_code}">
91
+ <div class="row">
92
+ <div class="col-sm-4">
93
+ <label style="color: #666666">用户编号:</label> {{row.f_userinfo_code}}
94
+ </div>
95
+ <div class="col-sm-4">
96
+ <label style="color: #666666">用户姓名:</label> {{row.f_user_name}}
97
+ </div>
98
+ <div class="col-sm-4">
99
+ <label style="color: #666666">用户状态: </label>{{row.f_user_state}}
100
+ </div>
101
+
102
+ </div>
103
+ <div class="row">
104
+ <div class="col-sm-4">
105
+ <label style="color: #666666">用户电话:</label> {{row.f_user_phone}}
106
+ </div>
107
+ <div class="col-sm-4">
108
+ <label style="color: #666666">用户类别: </label>{{row.f_user_type}}
109
+ </div>
110
+ <div class="col-sm-4">
111
+ <label style="color: #666666">账户结余: </label>{{row.f_balance}}
112
+ </div>
113
+ </div>
114
+ <div class="row">
115
+ <div class="col-sm-6" v-if="$parent.$parent.$parent.enter_number_show">
116
+ <label style="color: #666666">入户证号: </label>{{row.f_enter_number}}
117
+ </div>
118
+ <div class="col-sm-6" v-if="$parent.$parent.$parent.createfile_date">
119
+ <label style="color: #666666">建档日期: </label>{{row.f_createfile_date}}
120
+ </div>
121
+ <div class="col-sm-6" v-if="$parent.$parent.$parent.f_inputtor_show">
122
+ <label style="color: #666666">抄表人员: </label>{{row.f_inputtor}}
123
+ </div>
124
+ <div class="col-sm-12">
125
+ <label style="color: #666666">详细地址: </label>{{row.f_address}}
126
+ </div>
127
+ <div class="col-sm-6">
128
+ <label style="color: #666666">区域信息: </label>{{row.f_slice_area}}
129
+ </div>
130
+
131
+ </div>
132
+ <div class="row">
133
+ <div class="col-sm-6" v-if="$parent.$parent.$parent.isText">
134
+ <button type="button" name="button" class="btn btn-link"
135
+ @click.stop="$parent.$parent.$parent.bind(row)">绑定</button>
136
+ </div>
137
+ </div>
138
+ </div>
139
+ </div>
140
+ </list>
141
+ </criteria-paged>
142
+ </div>
143
+ </template>
144
+
145
+ <script>
146
+ import {HttpResetClass, PagedList} from 'vue-client'
147
+ export default {
148
+ title: '查询用户',
149
+ data () {
150
+ return {
151
+ model: new PagedList('af-telephone/rs/sql/tel_getUserInfoAdress', 10),
152
+ show: false,
153
+ row: Object,
154
+ tempnumber: '',
155
+ rows:[],
156
+ enter_number_show:false,
157
+ createfile_date:false,
158
+ f_inputtor_show:false,
159
+ residential_area_show:true,
160
+ building_show:true,
161
+ unit_show:true,
162
+ room_show:true,
163
+ floor_show:true,
164
+ show_btn:true,
165
+ button_bottom:true,
166
+ form_items_show:false
167
+ }
168
+ },
169
+ props: {
170
+ isText: {
171
+ type: Boolean,
172
+ default: false
173
+ },
174
+ user: {},
175
+ callObj:{
176
+ type: Object
177
+ },
178
+ },
179
+ methods: {
180
+ clear(){
181
+ //清空查询条件
182
+ this.$refs.paged.$refs.criteria.model={}
183
+ },
184
+ // 获取该组件配置文件
185
+ getTelFindUserConfig(){
186
+ let http = new HttpResetClass()
187
+ http.load('GET', `/af-telephone/rs/vue`, {}, {resolveMsg: null, rejectMsg: null}).then(res=>{
188
+ if (res.data.TelFindUser){
189
+ let telconfig = res.data.TelFindUser.data
190
+ if(telconfig.criteria){
191
+ telconfig.criteria.forEach((item)=>{
192
+ if(item.name =='入户证号'){
193
+ this.enter_number_show = item.ifshow
194
+ }
195
+ if(item.name =='建档日期'){
196
+ this.createfile_date = item.ifshow
197
+ }
198
+ if(item.name =='抄表员'){
199
+ this.f_inputtor_show = item.ifshow
200
+ }
201
+ if(item.name =='小区'){
202
+ this.residential_area_show = item.ifshow
203
+ }
204
+ if(item.name =='楼栋'){
205
+ this.building_show = item.ifshow
206
+ }
207
+ if(item.name =='单元'){
208
+ this.unit_show = item.ifshow
209
+ }
210
+ if(item.name =='房间号'){
211
+ this.room_show = item.ifshow
212
+ }
213
+ if(item.name =='楼层'){
214
+ this.floor_show = item.ifshow
215
+ }
216
+
217
+ })
218
+ }
219
+ }
220
+ })
221
+ },
222
+ search (args) {
223
+ if (this.$login.f.orgid == 165 && this.$login.f.fullnames.indexOf("汉中")!= -1){
224
+ args.condition += ` and ti.f_user_state = '正常'`
225
+ }else if(this.$login.f.orgid == 46997 && this.$login.f.fullnames.indexOf("铜川市天然气")!= -1){
226
+ args.condition += ` and ti.f_user_state = '正常'`
227
+ }else {
228
+ args.condition += ` and ti.f_filialeid = '${this.$login.f.orgid}' and ti.f_user_state in('正常','停用','预备')`
229
+ }
230
+ this.model.search(args.condition, args.model)
231
+ },
232
+ //展示表单项
233
+ showFormRowItems(){
234
+ this.button_bottom = !this.button_bottom
235
+ this.form_items_show = !this.form_items_show
236
+ },
237
+ bind (row) {
238
+ //tag
239
+ },
240
+ teleNoQuery (teleNo) {
241
+ this.$refs.paged.$refs.criteria.model.f_user_phone = teleNo
242
+ this.$refs.paged.$refs.criteria.search()
243
+ }
244
+ },
245
+ ready(){
246
+ this.getTelFindUserConfig()
247
+ this.$refs.paged.$refs.criteria.search()
248
+ },
249
+ watch: {
250
+ // 原代码
251
+ // 'callObj.callNum' () {
252
+ // // 查找用户的 业务逻辑
253
+ // let http = new HttpResetClass()
254
+ // http.load('POST', 'af-telephone/rs/sql/tel_getUserInfoAdress', {data: {
255
+ // condition: `(f_user_phone = '${this.callObj.callNum}' or f_zuhu_phone = '${this.callObj.callNum}' or f_rent_phone = '${this.callObj.callNum}') and ti.f_user_state = '正常' `,
256
+ // }},{resolveMsg: null, rejectMsg: null}).then((req) => {
257
+ // this.model.rows = req.data
258
+ // this.model.state = '正确'
259
+ // })
260
+ // },
261
+ // 测试用户电话回显异常bug
262
+ 'callObj' () {
263
+ // console.log('监听到用户手机号');
264
+ if(this.callObj.callNum !==''){
265
+ // console.log('号码非空');
266
+ // 查找用户的 业务逻辑
267
+ let http = new HttpResetClass()
268
+ http.load('POST', 'af-telephone/rs/sql/tel_getUserInfoAdress', {data: {
269
+ condition: `(f_user_phone = '${this.callObj.callNum}' or f_zuhu_phone = '${this.callObj.callNum}' or f_rent_phone = '${this.callObj.callNum}') and ti.f_user_state = '正常' `,
270
+ }},{resolveMsg: null, rejectMsg: null}).then((req) => {
271
+ this.model.rows = req.data
272
+ this.model.state = '正确'
273
+ })
274
+ }
275
+ },
276
+ 'user' (val) {
277
+ // this.$resetpost('af-telephone/rs/sql/singleTable', {data: { tablename: 't_userinfo', condition: "f_user_name='" + this.user.name + "' and f_userinfo_id=" + this.user.userId }}).then((req) => {
278
+ // this.row = req.data
279
+ // })
280
+ if (val.name === '' && val.userId === '') { // 用户未绑定
281
+ // 清空查询条件
282
+ Object.keys(this.$refs.paged.$refs.criteria.model).forEach((key) => {
283
+ this.$refs.paged.$refs.criteria.model[key] = ''
284
+ })
285
+ this.model.rows = []
286
+ this.model.state = '错误'
287
+ this.model.error = '未找到用户或用户未绑定'
288
+ this.$emit('find-error', '未找到用户或用户未绑定')
289
+ return
290
+ }
291
+ this.$refs.paged.$refs.criteria.model.f_user_name = this.user.name
292
+ this.$refs.paged.$refs.criteria.model.f_userinfo_id = this.user.userId
293
+ this.$refs.paged.$refs.criteria.search()
294
+ // this.model.search(`f_user_name = '${this.user.name}' and f_userinfo_id = ${this.user.userId}`, this.model)
295
+ },
296
+ 'model.state' (val) {
297
+ if (val === '正确' && this.model.rows.length === 1) {
298
+ this.$emit('find-one', this.model.rows[0])
299
+ }
300
+ }
301
+ },
302
+ events: {
303
+ //点击用户信息后变色
304
+ 'select-changed' :function (val) {
305
+ this.tempnumber = val.val.f_userinfo_code
306
+ }
307
+ }
308
+ }
309
+ </script>
310
+ <style scoped>
311
+ label {
312
+ width: 80px;
313
+ }
314
+ #pc-finduser-page .form-input-group {
315
+ margin: 5px 0px;
316
+ height: auto;
317
+ }
318
+ .themeOne .span{
319
+ overflow-y: scroll;
320
+ }
321
+ .pager{
322
+ margin: 5px 0px !important;
323
+ background-color: #f8f8f8;
324
+ }
325
+ .inbg{
326
+ font-family: PingFang-SC-Medium;
327
+ font-size: 14px;
328
+ font-weight: normal;
329
+ font-stretch: normal;
330
+ line-height: 18px;
331
+ letter-spacing: 0px;
332
+ color: #333333;
333
+ }
334
+ .aaa{
335
+ background-color: #d8eafb;
336
+ }
337
+ </style>
338
+ <style>
339
+ #pc-finduser-page1 ul{
340
+ margin: 5px 0px !important;
341
+ background-color: #f8f8f8 !important;
342
+ }
343
+ </style>