safecheck-client 3.0.35-44 → 3.0.35-46

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,370 +1,370 @@
1
- <style scoped>
2
- .app-row {
3
- background-color: white;
4
- padding: 10px 10px 0 10px;
5
- border-bottom: 1px solid rgba(235, 235, 235, 0.5);
6
- }
7
- .search_input {
8
- border: 0;
9
- outline: none;
10
- }
11
- .font{
12
- font: 15px PingFang-SC-Medium;
13
- color: #666666;
14
- }
15
- .input-font{
16
- font: 15px PingFang-SC-Medium;
17
- color: #333333;
18
- }
19
- .btn-font{
20
- font:600 16px PingFang-SC-Bold;
21
- color: #499EDF;
22
- }
23
- .btn-color{
24
- background-color: #FFFFFF;
25
- border-radius: 10px ;
26
- border: 1px solid #499EDF;
27
- }
28
- .app-text {
29
- font-size: 12px;
30
- }
31
- .panel-self{
32
- border-radius: 10px;
33
- border:1px solid #499EDF;
34
- background-color: #F8F8F8;
35
- }
36
- </style>
37
-
38
- <template>
39
- <div class="auto">
40
- <criteria-paged :model="model" v-ref:paged>
41
- <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
42
- <div partial>
43
- <p align="center" style="color: maroon" v-if="!$parent.$parent.isHaveJiBiao">只限物联网表进行开关阀操作</p>
44
- <p align="center" style="color: maroon" v-if="$parent.$parent.isHaveJiBiao">只限物联网表和机表进行操作</p>
45
- <form>
46
- <div class="row app-row">
47
- <div class="col-xs-4">
48
- <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
49
- <label for="f_userinfo_code" class="font text-left">用户编号:</label>
50
- </div>
51
- <div class="col-xs-8" >
52
- <input id="f_userinfo_code" class="search_input input-font" v-model="$parent.$parent.f_userinfo_code" />
53
- </div>
54
- </div>
55
- <div class="row app-row">
56
- <div class="col-xs-4">
57
- <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
58
- <label for="f_meternumber" class="font text-left">用户表号:</label>
59
- </div>
60
- <div class="col-xs-8" >
61
- <input id="f_meternumber" class="search_input input-font" style="width: 70%" v-model="$parent.$parent.f_meternumber" />
62
- <button type="button" name="button" class="btn btn-primary" style="width: 25%" @click="$parent.$parent.scan">扫码</button>
63
- </div>
64
- </div>
65
- <div class="row app-row">
66
- <div class="col-xs-4">
67
- <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
68
- <label for="f_enter_number" class="font text-left">入户证号:</label>
69
- </div>
70
- <div class="col-xs-8" >
71
- <input id="f_enter_number" class="search_input input-font" v-model="$parent.$parent.f_enter_number" />
72
- </div>
73
- </div>
74
- <div class="row app-row">
75
- <div class="col-xs-4">
76
- <img src="../../../assets/用户类型.png" style="width: 20px;margin-bottom: 5px" alt="">
77
- <label for="f_valve_state" class="font text-left">阀门状态:</label>
78
- </div>
79
- <div class="col-xs-8" >
80
- <v-select
81
- class="input-font"
82
- placeholder='请选择阀门状态'
83
- :value.sync="$parent.$parent.f_valve_state"
84
- v-model="$parent.$parent.f_valve_state"
85
- :options='$parent.$parent.valvestates'
86
- close-on-select
87
- clear-button>
88
- </v-select>
89
- </div>
90
- </div>
91
- <div class="row app-row" v-if="$parent.$parent.isHaveJiBiao">
92
- <div class="col-xs-4">
93
- <img src="../../../assets/用户类型.png" style="width: 20px;margin-bottom: 5px" alt="">
94
- <label for="f_meternumber" class="font text-left">气表类型:</label>
95
- </div>
96
- <div class="col-xs-8" >
97
- <v-select
98
- class="input-font"
99
- placeholder='请选择气表类型'
100
- :value.sync="$parent.$parent.f_meter_type"
101
- v-model="$parent.$parent.f_meter_type"
102
- :options='$parent.$parent.meterTypeOptions'
103
- close-on-select
104
- clear-button>
105
- </v-select>
106
- </div>
107
- </div>
108
- <div class="row text-center" style="margin-top: 20px;">
109
- <button type="button" class="btn btn-lg btn-font btn-color" style="width: 45%;" @click="search">查询</button>
110
- </div>
111
- <div style="height:30px;"></div>
112
- </form>
113
- </div>
114
- </criteria>
115
- <list :model="model" partial='list'>
116
- <div partial>
117
- <div class="auto app-text" style="margin-top: 5px;">
118
- <div class="panel" style="padding: 10px 10px 5px 10px;">
119
- <div class="panel-body panel-self">
120
- <div class="col-xs-12">
121
- <p class="panel-title col-xs-5 text-left font" style="float: left"><b>用户编号:</b></p>
122
- <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_userinfo_code }}</p>
123
- </div>
124
- <div class="col-xs-12">
125
- <p class="panel-title col-xs-5 text-left font" style="float: left"><b>用户名称:</b></p>
126
- <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_user_name }}</p>
127
- </div>
128
- <div class="col-xs-12">
129
- <p class="panel-title col-xs-5 text-left font"><b>用户类型:</b></p>
130
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_user_type }}
131
- </p>
132
- </div>
133
- <div class="col-xs-12">
134
- <p class="panel-title col-xs-5 text-left font"><b>用户电话:</b></p>
135
- <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_user_phone }}
136
- </p>
137
- </div>
138
- <div class="col-xs-12">
139
- <p class="panel-title text-left font" style="float: left"><b>用户地址:</b></p>
140
- <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_address }}</p>
141
- </div>
142
- <div class="col-xs-12">
143
- <p class="panel-title col-xs-5 text-left font" style="float: left"><b>入户证号:</b></p>
144
- <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_enter_number }}</p>
145
- </div>
146
- <div class="col-xs-12">
147
- <p class="panel-title col-xs-5 text-left font"><b>燃气表号:</b></p>
148
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_meternumber }}</p>
149
- </div>
150
- <div class="col-xs-12">
151
- <p class="panel-title col-xs-5 text-left font"><b>左右表:</b></p>
152
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_aroundmeter }}</p>
153
- </div>
154
- <div class="col-xs-12">
155
- <p class="panel-title col-xs-5 text-left font"><b>气表品牌:</b></p>
156
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_meter_brand }}</p>
157
- </div>
158
- <div class="col-xs-12">
159
- <p class="panel-title col-xs-5 text-left font"><b>气表类型:</b></p>
160
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_meter_type }}</p>
161
- </div>
162
- <!--<div class="col-xs-12">-->
163
- <!--<p class="panel-title col-xs-5 text-left font"><b>累计气量:</b></p>-->
164
- <!--<p class="panel-title col-xs-7 text-left input-font">{{ row.f_meter_base }}</p>-->
165
- <!--</div>-->
166
- <!--<div class="col-xs-12">-->
167
- <!--<p class="panel-title col-xs-5 text-left font"><b>预存余额:</b></p>-->
168
- <!--<p class="panel-title col-xs-7 text-left input-font">{{ row.f_balance_amount }}</p>-->
169
- <!--</div>-->
170
- <div class="col-xs-6" v-if="row.f_meter_type == '物联网表'">
171
- <p class="panel-title col-xs-5 text-left font"><b>阀门状态</b></p>
172
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_valve_state }}</p>
173
- </div>
174
- <div class="col-xs-6" v-if="row.f_meter_type == '物联网表'">
175
- <button class="btn btn-font btn-color" type="button" style="width: 28%;padding: 2px 5px;" v-if="row.f_valve_state == '关阀'" @click="$parent.$parent.$parent.openvalve(row)">开阀</button>
176
- <button class="btn btn-font btn-color" type="button" style="width: 28%;padding: 2px 5px;" v-if="row.f_valve_state == '开阀'" @click="$parent.$parent.$parent.clonevalve(row)">关阀</button>
177
- <button class="btn btn-font btn-color" type="button" style="width: 28%;padding: 2px 5px;" v-if="row.f_meter_brand.includes('西美')" @click="$parent.$parent.$parent.clearBarrier(row)">清除障碍</button>
178
- </div>
179
- <div class="col-xs-6" v-if="row.f_meter_type == '机表'">
180
- <button class="btn btn-font btn-color" type="button" style="width: 50%;padding: 2px 5px;" @click="$parent.$parent.$parent.goVindicate(row)">档案维护</button>
181
- </div>
182
- <div class="col-xs-12" v-if="row.f_meter_type == '物联网表'">
183
- <p class="panel-title col-xs-5 text-left font"><b>最后上报日期</b></p>
184
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_insert_date }}</p>
185
- </div>
186
- </div>
187
- </div>
188
- </div>
189
- </div>
190
- </list>
191
- </criteria-paged>
192
- <modal :show.sync="showModal">
193
- <div slot="modal-header" class="modal-header">
194
- <h4 class="modal-title">
195
- {{modalTitle}}
196
- </h4>
197
- </div>
198
- <div slot="modal-body" class="modal-body">
199
- <div class="row" style="margin-top: 6px">
200
- <textarea id="el_ca_txt" v-model.trim="f_comments" style="border-radius:4px;width: 100%;" placeholder="请输入开关阀原因" >
201
- </textarea>
202
- </div>
203
- </div>
204
- <div slot="modal-footer" class="modal-footer">
205
- <button type="button" class="btn btn-default" @click="showModal = false">取消</button>
206
- <button type="button" class="btn btn-success" @click="openOrCloneValveMethod(istype)">{{istype}}</button>
207
- </div>
208
- </modal>
209
- </div>
210
- </template>
211
-
212
- <script>
213
- import LocalPagedList from '../../../plugins/LocalPagedList'
214
- import Vue from 'vue'
215
- import { PagedList } from 'vue-client'
216
- import PhoneUpUserinfo from './PhoneUpUserinfo'
217
- import {isEmpty} from '../../../components/Util.js'
218
-
219
-
220
- export default {
221
- title: '开关阀',
222
- data () {
223
- return {
224
- model: Vue.android ? new PagedList(`${this.$androidUtil.getProxyUrl()}/rs/sql/SwitchValveSeachUser`, 5) : new PagedList( 'AndroidRest/rs/sql/SwitchValveSeachUser',5),
225
- f_meternumber: '',
226
- f_userinfo_code: '',
227
- f_operator: Vue.user.name,
228
- filialeid: Vue.user.orgid,
229
- // f_operator: '温艺轩',
230
- // filialeid: '453',
231
- type: '',
232
- showModal: false,
233
- modalTitle: '', //开关阀标题
234
- f_comments: '', //开关阀原因
235
- istype: '', //
236
- thisOneData: '', //当前操作的用户
237
- f_meter_type: '',
238
- f_enter_number:'',// 入户证号
239
- f_valve_state:'',// 阀门状态
240
- condition: '',
241
- isHaveJiBiao: false,
242
- meterTypeOptions: [{label: '全部', value: ''}, {label: '物联网表', value: '物联网表'}, {label: '机表', value: '机表'}],
243
- valvestates: [{label: '全部', value: ''}, {label: '开阀', value: '开阀'}, {label: '关阀', value: '关阀'}]
244
- }
245
- },
246
- ready () {
247
- this.isHaveJiBiao = this.$appdata.getSingleValue('开关阀是否查询机表') === '是'
248
- if (this.isHaveJiBiao) {
249
- this.condition = " and f_meter_type in ('物联网表', '机表')"
250
- } else {
251
- this.condition = " and f_meter_type in ('物联网表')"
252
- }
253
- },
254
- methods: {
255
- scan(){
256
- HostApp.__this__=this,
257
- HostApp.old_scanCode({callback:"javascript:HostApp.__this__.getCode();"})
258
- },
259
- getCode(){
260
- const datapa = HostApp.old_getCode().data;
261
- //tag
262
- this.$refs.paged.$refs.cri.model.f_meter_no = datapa
263
- },
264
- clearBarrier(val){
265
- // 127.0.0.1:8445
266
- // 参数
267
- let datas = {
268
- moduleName:"XiMeiSystem", // 固定值
269
- content:{
270
- tradeCode:"3015",// 固定值
271
- appid: "yysf", // 固定值
272
- partner: "cqsemay_bcts", // 固定值
273
- version:"v1", // 固定值
274
- tasked:this.getuuid(), // 任务id
275
- notifyUrl:"http://192.168.2.10:8445/webmeter/rs/logic/XiMeiSystemCallBack", // 固定值
276
- meterNo: val.f_meternumber,// 表号
277
- signType:" MD5" //固定值
278
- },
279
- title: "清除异常", // 固定值
280
- type: "清除异常", // 固定值
281
- inputtor:this.f_operator, // 操作人
282
- userId:val.f_userfiles_id, // 表档案ID
283
- dataId: null // 操作记录ID
284
- }
285
- this.$resetpost(`${this.$androidUtil.getProxyUrl()}/webmeter/rs/logic/syncSaveSetParamsTemplate`, {data: datas},{resolveMsg: `清理成功`, rejectMsg: `清理失败`}).then(res => {
286
- })
287
- },
288
- getuuid(){
289
- let uuidA = '';
290
- var s = [];
291
- var hexDigits = '0123456789abcdef';
292
- for (var i = 0; i < 36; i++) {
293
- s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
294
- }
295
- s[14] = '4';
296
- s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1);
297
- s[8] = s[13] = s[18] = s[23] = '-';
298
- uuidA = s.join('');
299
- return uuidA;
300
- },
301
- selfSearch () {
302
- //tag
303
- // let condition = ` uf.f_filialeid = '${this.filialeid}'`
304
- let condition = ` 1=1 `
305
- condition += this.condition
306
- condition += ` and f_filialeid = '${this.filialeid}'`
307
- condition += this.f_meternumber ? ` and f_meternumber = '${this.f_meternumber}'` : ""
308
- condition += this.f_userinfo_code ? ` and f_userinfo_code = '${this.f_userinfo_code}'` : ""
309
- condition += this.f_enter_number ? ` and f_enter_number = '${this.f_enter_number}'` : ""
310
- condition += !isEmpty(this.f_valve_state) ? ` and f_valve_state = '${this.f_valve_state}'` : ""
311
- condition += this.f_meter_type != '' && this.f_meter_type != [] ? ` and f_meter_type = '${this.f_meter_type}'` : ""
312
- console.log(condition)
313
- //tag
314
- this.model.search(condition)
315
- },
316
- openvalve (val) {
317
- //tag
318
- this.modalTitle = '对表号为'+ val.f_meternumber+'开阀'
319
- this.istype = '开阀'
320
- this.showModal = true;
321
- this.thisOneData = val;
322
- },
323
- clonevalve (val) {
324
- //tag
325
- this.modalTitle = '对表号为'+ val.f_meternumber+'关阀'
326
- this.istype = '关阀'
327
- this.showModal = true;
328
- this.thisOneData = val;
329
- },
330
- openOrCloneValveMethod (msg) {
331
- if (this.f_comments=='') {
332
- return this.$showMessage("请输入开关阀原因")
333
- }
334
- var data = {
335
- instructType: '阀门控制',
336
- instructTitle: `手动${msg}`,
337
- condition: `t_userfiles.f_userfiles_id='${this.thisOneData.f_userfiles_id}'`,
338
- meterBrandName: this.thisOneData.f_alias, // 气表别名
339
- f_instruct_state: '待发送',
340
- inputtor: this.f_operator,
341
- reasonInfo: this.f_comments, //操作原因
342
- meternumberf: this.thisOneData.f_meternumber, //表号
343
- contentData: {isOpen: msg=='开阀' ? 1 : 0}, // oper 为true 时为开阀 false 为关阀
344
- }
345
- this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/iot_saveInstruct`, {data: data}).then((row) => {
346
- this.$showMessage(`${msg}指令发送成功,请等候2分钟进行查询`)
347
- //tag
348
- this.thisOneData = '';
349
- this.istype = '';
350
- this.f_comments = '';
351
- this.showModal = false
352
- this.selfSearch()
353
- })
354
- },
355
- // 档案维护
356
- goVindicate(row) {
357
- console.log(row)
358
- var pardate = {
359
- title:'档案维护',
360
- safe:true
361
- }
362
- this.$dispatch('gotoson',pardate)
363
- this.$goto('PhoneUpUserinfo', {f_userinfo_id: row.f_userinfo_id},'self')
364
- }
365
- },
366
- components: {
367
- 'PhoneUpUserinfo': PhoneUpUserinfo
368
- }
369
- }
370
- </script>
1
+ <style scoped>
2
+ .app-row {
3
+ background-color: white;
4
+ padding: 10px 10px 0 10px;
5
+ border-bottom: 1px solid rgba(235, 235, 235, 0.5);
6
+ }
7
+ .search_input {
8
+ border: 0;
9
+ outline: none;
10
+ }
11
+ .font{
12
+ font: 15px PingFang-SC-Medium;
13
+ color: #666666;
14
+ }
15
+ .input-font{
16
+ font: 15px PingFang-SC-Medium;
17
+ color: #333333;
18
+ }
19
+ .btn-font{
20
+ font:600 16px PingFang-SC-Bold;
21
+ color: #499EDF;
22
+ }
23
+ .btn-color{
24
+ background-color: #FFFFFF;
25
+ border-radius: 10px ;
26
+ border: 1px solid #499EDF;
27
+ }
28
+ .app-text {
29
+ font-size: 12px;
30
+ }
31
+ .panel-self{
32
+ border-radius: 10px;
33
+ border:1px solid #499EDF;
34
+ background-color: #F8F8F8;
35
+ }
36
+ </style>
37
+
38
+ <template>
39
+ <div class="auto">
40
+ <criteria-paged :model="model" v-ref:paged>
41
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
42
+ <div partial>
43
+ <p align="center" style="color: maroon" v-if="!$parent.$parent.isHaveJiBiao">只限物联网表进行开关阀操作</p>
44
+ <p align="center" style="color: maroon" v-if="$parent.$parent.isHaveJiBiao">只限物联网表和机表进行操作</p>
45
+ <form>
46
+ <div class="row app-row">
47
+ <div class="col-xs-4">
48
+ <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
49
+ <label for="f_userinfo_code" class="font text-left">用户编号:</label>
50
+ </div>
51
+ <div class="col-xs-8" >
52
+ <input id="f_userinfo_code" class="search_input input-font" v-model="$parent.$parent.f_userinfo_code" />
53
+ </div>
54
+ </div>
55
+ <div class="row app-row">
56
+ <div class="col-xs-4">
57
+ <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
58
+ <label for="f_meternumber" class="font text-left">用户表号:</label>
59
+ </div>
60
+ <div class="col-xs-8" >
61
+ <input id="f_meternumber" class="search_input input-font" style="width: 70%" v-model="$parent.$parent.f_meternumber" />
62
+ <button type="button" name="button" class="btn btn-primary" style="width: 25%" @click="$parent.$parent.scan">扫码</button>
63
+ </div>
64
+ </div>
65
+ <div class="row app-row">
66
+ <div class="col-xs-4">
67
+ <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
68
+ <label for="f_enter_number" class="font text-left">入户证号:</label>
69
+ </div>
70
+ <div class="col-xs-8" >
71
+ <input id="f_enter_number" class="search_input input-font" v-model="$parent.$parent.f_enter_number" />
72
+ </div>
73
+ </div>
74
+ <div class="row app-row">
75
+ <div class="col-xs-4">
76
+ <img src="../../../assets/用户类型.png" style="width: 20px;margin-bottom: 5px" alt="">
77
+ <label for="f_valve_state" class="font text-left">阀门状态:</label>
78
+ </div>
79
+ <div class="col-xs-8" >
80
+ <v-select
81
+ class="input-font"
82
+ placeholder='请选择阀门状态'
83
+ :value.sync="$parent.$parent.f_valve_state"
84
+ v-model="$parent.$parent.f_valve_state"
85
+ :options='$parent.$parent.valvestates'
86
+ close-on-select
87
+ clear-button>
88
+ </v-select>
89
+ </div>
90
+ </div>
91
+ <div class="row app-row" v-if="$parent.$parent.isHaveJiBiao">
92
+ <div class="col-xs-4">
93
+ <img src="../../../assets/用户类型.png" style="width: 20px;margin-bottom: 5px" alt="">
94
+ <label for="f_meternumber" class="font text-left">气表类型:</label>
95
+ </div>
96
+ <div class="col-xs-8" >
97
+ <v-select
98
+ class="input-font"
99
+ placeholder='请选择气表类型'
100
+ :value.sync="$parent.$parent.f_meter_type"
101
+ v-model="$parent.$parent.f_meter_type"
102
+ :options='$parent.$parent.meterTypeOptions'
103
+ close-on-select
104
+ clear-button>
105
+ </v-select>
106
+ </div>
107
+ </div>
108
+ <div class="row text-center" style="margin-top: 20px;">
109
+ <button type="button" class="btn btn-lg btn-font btn-color" style="width: 45%;" @click="search">查询</button>
110
+ </div>
111
+ <div style="height:30px;"></div>
112
+ </form>
113
+ </div>
114
+ </criteria>
115
+ <list :model="model" partial='list'>
116
+ <div partial>
117
+ <div class="auto app-text" style="margin-top: 5px;">
118
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
119
+ <div class="panel-body panel-self">
120
+ <div class="col-xs-12">
121
+ <p class="panel-title col-xs-5 text-left font" style="float: left"><b>用户编号:</b></p>
122
+ <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_userinfo_code }}</p>
123
+ </div>
124
+ <div class="col-xs-12">
125
+ <p class="panel-title col-xs-5 text-left font" style="float: left"><b>用户名称:</b></p>
126
+ <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_user_name }}</p>
127
+ </div>
128
+ <div class="col-xs-12">
129
+ <p class="panel-title col-xs-5 text-left font"><b>用户类型:</b></p>
130
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_user_type }}
131
+ </p>
132
+ </div>
133
+ <div class="col-xs-12">
134
+ <p class="panel-title col-xs-5 text-left font"><b>用户电话:</b></p>
135
+ <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_user_phone }}
136
+ </p>
137
+ </div>
138
+ <div class="col-xs-12">
139
+ <p class="panel-title text-left font" style="float: left"><b>用户地址:</b></p>
140
+ <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_address }}</p>
141
+ </div>
142
+ <div class="col-xs-12">
143
+ <p class="panel-title col-xs-5 text-left font" style="float: left"><b>入户证号:</b></p>
144
+ <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_enter_number }}</p>
145
+ </div>
146
+ <div class="col-xs-12">
147
+ <p class="panel-title col-xs-5 text-left font"><b>燃气表号:</b></p>
148
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_meternumber }}</p>
149
+ </div>
150
+ <div class="col-xs-12">
151
+ <p class="panel-title col-xs-5 text-left font"><b>左右表:</b></p>
152
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_aroundmeter }}</p>
153
+ </div>
154
+ <div class="col-xs-12">
155
+ <p class="panel-title col-xs-5 text-left font"><b>气表品牌:</b></p>
156
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_meter_brand }}</p>
157
+ </div>
158
+ <div class="col-xs-12">
159
+ <p class="panel-title col-xs-5 text-left font"><b>气表类型:</b></p>
160
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_meter_type }}</p>
161
+ </div>
162
+ <!--<div class="col-xs-12">-->
163
+ <!--<p class="panel-title col-xs-5 text-left font"><b>累计气量:</b></p>-->
164
+ <!--<p class="panel-title col-xs-7 text-left input-font">{{ row.f_meter_base }}</p>-->
165
+ <!--</div>-->
166
+ <!--<div class="col-xs-12">-->
167
+ <!--<p class="panel-title col-xs-5 text-left font"><b>预存余额:</b></p>-->
168
+ <!--<p class="panel-title col-xs-7 text-left input-font">{{ row.f_balance_amount }}</p>-->
169
+ <!--</div>-->
170
+ <div class="col-xs-6" v-if="row.f_meter_type == '物联网表'">
171
+ <p class="panel-title col-xs-5 text-left font"><b>阀门状态</b></p>
172
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_valve_state }}</p>
173
+ </div>
174
+ <div class="col-xs-6" v-if="row.f_meter_type == '物联网表'">
175
+ <button class="btn btn-font btn-color" type="button" style="width: 28%;padding: 2px 5px;" v-if="row.f_valve_state == '关阀'" @click="$parent.$parent.$parent.openvalve(row)">开阀</button>
176
+ <button class="btn btn-font btn-color" type="button" style="width: 28%;padding: 2px 5px;" v-if="row.f_valve_state == '开阀'" @click="$parent.$parent.$parent.clonevalve(row)">关阀</button>
177
+ <button class="btn btn-font btn-color" type="button" style="width: 28%;padding: 2px 5px;" v-if="row.f_meter_brand.includes('西美')" @click="$parent.$parent.$parent.clearBarrier(row)">清除障碍</button>
178
+ </div>
179
+ <div class="col-xs-6" v-if="row.f_meter_type == '机表'">
180
+ <button class="btn btn-font btn-color" type="button" style="width: 50%;padding: 2px 5px;" @click="$parent.$parent.$parent.goVindicate(row)">档案维护</button>
181
+ </div>
182
+ <div class="col-xs-12" v-if="row.f_meter_type == '物联网表'">
183
+ <p class="panel-title col-xs-5 text-left font"><b>最后上报日期</b></p>
184
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_insert_date }}</p>
185
+ </div>
186
+ </div>
187
+ </div>
188
+ </div>
189
+ </div>
190
+ </list>
191
+ </criteria-paged>
192
+ <modal :show.sync="showModal">
193
+ <div slot="modal-header" class="modal-header">
194
+ <h4 class="modal-title">
195
+ {{modalTitle}}
196
+ </h4>
197
+ </div>
198
+ <div slot="modal-body" class="modal-body">
199
+ <div class="row" style="margin-top: 6px">
200
+ <textarea id="el_ca_txt" v-model.trim="f_comments" style="border-radius:4px;width: 100%;" placeholder="请输入开关阀原因" >
201
+ </textarea>
202
+ </div>
203
+ </div>
204
+ <div slot="modal-footer" class="modal-footer">
205
+ <button type="button" class="btn btn-default" @click="showModal = false">取消</button>
206
+ <button type="button" class="btn btn-success" @click="openOrCloneValveMethod(istype)">{{istype}}</button>
207
+ </div>
208
+ </modal>
209
+ </div>
210
+ </template>
211
+
212
+ <script>
213
+ import LocalPagedList from '../../../plugins/LocalPagedList'
214
+ import Vue from 'vue'
215
+ import { PagedList } from 'vue-client'
216
+ import PhoneUpUserinfo from './PhoneUpUserinfo'
217
+ import {isEmpty} from '../../../components/Util.js'
218
+
219
+
220
+ export default {
221
+ title: '开关阀',
222
+ data () {
223
+ return {
224
+ model: Vue.android ? new PagedList(`${this.$androidUtil.getProxyUrl()}/rs/sql/SwitchValveSeachUser`, 5) : new PagedList( 'AndroidRest/rs/sql/SwitchValveSeachUser',5),
225
+ f_meternumber: '',
226
+ f_userinfo_code: '',
227
+ f_operator: Vue.user.name,
228
+ filialeid: Vue.user.orgid,
229
+ // f_operator: '温艺轩',
230
+ // filialeid: '453',
231
+ type: '',
232
+ showModal: false,
233
+ modalTitle: '', //开关阀标题
234
+ f_comments: '', //开关阀原因
235
+ istype: '', //
236
+ thisOneData: '', //当前操作的用户
237
+ f_meter_type: '',
238
+ f_enter_number:'',// 入户证号
239
+ f_valve_state:'',// 阀门状态
240
+ condition: '',
241
+ isHaveJiBiao: false,
242
+ meterTypeOptions: [{label: '全部', value: ''}, {label: '物联网表', value: '物联网表'}, {label: '机表', value: '机表'}],
243
+ valvestates: [{label: '全部', value: ''}, {label: '开阀', value: '开阀'}, {label: '关阀', value: '关阀'}]
244
+ }
245
+ },
246
+ ready () {
247
+ this.isHaveJiBiao = this.$appdata.getSingleValue('开关阀是否查询机表') === '是'
248
+ if (this.isHaveJiBiao) {
249
+ this.condition = " and f_meter_type in ('物联网表', '机表')"
250
+ } else {
251
+ this.condition = " and f_meter_type in ('物联网表')"
252
+ }
253
+ },
254
+ methods: {
255
+ scan(){
256
+ HostApp.__this__=this,
257
+ HostApp.old_scanCode({callback:"javascript:HostApp.__this__.getCode();"})
258
+ },
259
+ getCode(){
260
+ const datapa = HostApp.old_getCode().data;
261
+ //tag
262
+ this.$refs.paged.$refs.cri.model.f_meter_no = datapa
263
+ },
264
+ clearBarrier(val){
265
+ // 127.0.0.1:8445
266
+ // 参数
267
+ let datas = {
268
+ moduleName:"XiMeiSystem", // 固定值
269
+ content:{
270
+ tradeCode:"3015",// 固定值
271
+ appid: "yysf", // 固定值
272
+ partner: "cqsemay_bcts", // 固定值
273
+ version:"v1", // 固定值
274
+ tasked:this.getuuid(), // 任务id
275
+ notifyUrl:"http://192.168.2.10:8445/webmeter/rs/logic/XiMeiSystemCallBack", // 固定值
276
+ meterNo: val.f_meternumber,// 表号
277
+ signType:" MD5" //固定值
278
+ },
279
+ title: "清除异常", // 固定值
280
+ type: "清除异常", // 固定值
281
+ inputtor:this.f_operator, // 操作人
282
+ userId:val.f_userfiles_id, // 表档案ID
283
+ dataId: null // 操作记录ID
284
+ }
285
+ this.$resetpost(`${this.$androidUtil.getProxyUrl()}/webmeter/rs/logic/syncSaveSetParamsTemplate`, {data: datas},{resolveMsg: `清理成功`, rejectMsg: `清理失败`}).then(res => {
286
+ })
287
+ },
288
+ getuuid(){
289
+ let uuidA = '';
290
+ var s = [];
291
+ var hexDigits = '0123456789abcdef';
292
+ for (var i = 0; i < 36; i++) {
293
+ s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
294
+ }
295
+ s[14] = '4';
296
+ s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1);
297
+ s[8] = s[13] = s[18] = s[23] = '-';
298
+ uuidA = s.join('');
299
+ return uuidA;
300
+ },
301
+ selfSearch () {
302
+ //tag
303
+ // let condition = ` uf.f_filialeid = '${this.filialeid}'`
304
+ let condition = ` 1=1 `
305
+ condition += this.condition
306
+ condition += ` and f_filialeid = '${this.filialeid}'`
307
+ condition += this.f_meternumber ? ` and f_meternumber = '${this.f_meternumber}'` : ""
308
+ condition += this.f_userinfo_code ? ` and f_userinfo_code = '${this.f_userinfo_code}'` : ""
309
+ condition += this.f_enter_number ? ` and f_enter_number = '${this.f_enter_number}'` : ""
310
+ condition += !isEmpty(this.f_valve_state) ? ` and f_valve_state = '${this.f_valve_state}'` : ""
311
+ condition += this.f_meter_type != '' && this.f_meter_type != [] ? ` and f_meter_type = '${this.f_meter_type}'` : ""
312
+ console.log(condition)
313
+ //tag
314
+ this.model.search(condition)
315
+ },
316
+ openvalve (val) {
317
+ //tag
318
+ this.modalTitle = '对表号为'+ val.f_meternumber+'开阀'
319
+ this.istype = '开阀'
320
+ this.showModal = true;
321
+ this.thisOneData = val;
322
+ },
323
+ clonevalve (val) {
324
+ //tag
325
+ this.modalTitle = '对表号为'+ val.f_meternumber+'关阀'
326
+ this.istype = '关阀'
327
+ this.showModal = true;
328
+ this.thisOneData = val;
329
+ },
330
+ openOrCloneValveMethod (msg) {
331
+ if (this.f_comments=='') {
332
+ return this.$showMessage("请输入开关阀原因")
333
+ }
334
+ var data = {
335
+ instructType: '阀门控制',
336
+ instructTitle: `手动${msg}`,
337
+ condition: `t_userfiles.f_userfiles_id='${this.thisOneData.f_userfiles_id}'`,
338
+ meterBrandName: this.thisOneData.f_alias, // 气表别名
339
+ f_instruct_state: '待发送',
340
+ inputtor: this.f_operator,
341
+ reasonInfo: this.f_comments, //操作原因
342
+ meternumberf: this.thisOneData.f_meternumber, //表号
343
+ contentData: {isOpen: msg=='开阀' ? 1 : 0}, // oper 为true 时为开阀 false 为关阀
344
+ }
345
+ this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/iot_saveInstruct`, {data: data}).then((row) => {
346
+ this.$showMessage(`${msg}指令发送成功,请等候2分钟进行查询`)
347
+ //tag
348
+ this.thisOneData = '';
349
+ this.istype = '';
350
+ this.f_comments = '';
351
+ this.showModal = false
352
+ this.selfSearch()
353
+ })
354
+ },
355
+ // 档案维护
356
+ goVindicate(row) {
357
+ console.log(row)
358
+ var pardate = {
359
+ title:'档案维护',
360
+ safe:true
361
+ }
362
+ this.$dispatch('gotoson',pardate)
363
+ this.$goto('PhoneUpUserinfo', {f_userinfo_id: row.f_userinfo_id},'self')
364
+ }
365
+ },
366
+ components: {
367
+ 'PhoneUpUserinfo': PhoneUpUserinfo
368
+ }
369
+ }
370
+ </script>