sale-client 3.6.330 → 3.6.331
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Util.js +24 -0
- package/src/components/FilesManage/UserDeviceInfoTest.vue +144 -9
- package/src/filiale/kelai/UserGeneralInfoTest.vue +1 -0
- package/src/filiale/lixianV3/meterinfodetail.vue +247 -0
- package/src/filiale/lixianV3/sale.js +2 -0
- package/src/filiale/qianneng/revenue/sms/AccountBillList.vue +15 -8
- package/src/filiale/qianneng/revenue/sms/MessageReport.vue +2 -1
- package/src/filiale/qingjian/UserBaseInfoNew.vue +686 -0
- package/src/filiale/qingjian/sale.js +1 -0
package/package.json
CHANGED
package/src/Util.js
CHANGED
|
@@ -38,6 +38,30 @@ export function toStandardDateString () {
|
|
|
38
38
|
let date = dt.getDate()
|
|
39
39
|
return dt.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date)
|
|
40
40
|
}
|
|
41
|
+
export function getLastDayOfMonth(dateString) {
|
|
42
|
+
// 解析输入日期字符串
|
|
43
|
+
var parts = dateString.split('-');
|
|
44
|
+
var year = parseInt(parts[0], 10);
|
|
45
|
+
var month = parseInt(parts[1], 10);
|
|
46
|
+
|
|
47
|
+
// 创建一个日期对象,表示下个月的第一天
|
|
48
|
+
var nextMonthFirstDay = new Date(year, month, 1);
|
|
49
|
+
|
|
50
|
+
// 减去一天,得到本月的最后一天
|
|
51
|
+
nextMonthFirstDay.setDate(nextMonthFirstDay.getDate() - 1);
|
|
52
|
+
|
|
53
|
+
// 获取年、月、日
|
|
54
|
+
var lastDay = nextMonthFirstDay.getDate();
|
|
55
|
+
var lastMonth = nextMonthFirstDay.getMonth() + 1; // 月份从0开始,需要加1
|
|
56
|
+
var lastYear = nextMonthFirstDay.getFullYear();
|
|
57
|
+
|
|
58
|
+
// 格式化日期为 YYYY-MM-DD
|
|
59
|
+
var formattedDate = lastYear + '-' +
|
|
60
|
+
(lastMonth < 10 ? '0' + lastMonth : lastMonth) + '-' +
|
|
61
|
+
(lastDay < 10 ? '0' + lastDay : lastDay);
|
|
62
|
+
|
|
63
|
+
return formattedDate;
|
|
64
|
+
}
|
|
41
65
|
|
|
42
66
|
export function toStartAndEndDateString () {
|
|
43
67
|
let dt = new Date()
|
|
@@ -135,6 +135,69 @@
|
|
|
135
135
|
<input class="input_search" style="width:60%" v-model="row.f_comments"/>
|
|
136
136
|
</div>
|
|
137
137
|
</div>
|
|
138
|
+
<!-- 租赁相关-->
|
|
139
|
+
<div class="row auto" style="margin-left: 10px;">
|
|
140
|
+
<div class="col-sm-6 form-group" style="padding-right: 5px;">
|
|
141
|
+
<label class="font_normal_body">是否租赁</label>
|
|
142
|
+
<v-select :value.sync="row.f_is_tenant" v-model="row.f_is_tenant"
|
|
143
|
+
:options='isTenant' placeholder='是否租赁' :value-single="true"
|
|
144
|
+
close-on-select></v-select>
|
|
145
|
+
</div>
|
|
146
|
+
<div style="" class="col-sm-6 form-group" v-if="row.f_is_tenant==='true'">
|
|
147
|
+
<label class="font_normal_body ">租赁时间</label>
|
|
148
|
+
<datepicker placeholder="租赁起始时间" style="width: 60%"
|
|
149
|
+
v-model="row.f_tenant_date"
|
|
150
|
+
:value.sync="row.f_tenant_date"
|
|
151
|
+
:format="'yyyy-MM-dd'">
|
|
152
|
+
</datepicker>
|
|
153
|
+
</div>
|
|
154
|
+
</div>
|
|
155
|
+
<div class="row auto" style="margin-left: 10px;" v-if="row.f_is_tenant==='true'">
|
|
156
|
+
<div class="col-sm-6 form-group" style="padding-right: 5px;" >
|
|
157
|
+
<label class="font_normal_body">租赁单价</label>
|
|
158
|
+
<input class="input_search" style="width:60%" @blur="showTips" v-model="row.f_tenant_price"/>
|
|
159
|
+
</div>
|
|
160
|
+
<div style="" class="col-sm-6 form-group">
|
|
161
|
+
<label class="font_normal_body ">租赁年限</label>
|
|
162
|
+
<input class="input_search" type="number" style="width:60%" v-model="row.f_tenant_liferg" :value.sync="row.f_tenant_liferg" placeholder="将自动计算" disabled/>
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
<div class="row auto" style="margin-left: 10px;" v-if="row.f_is_tenant==='true'">
|
|
166
|
+
<div class="col-sm-12 form-group" style="padding-right: 5px;" >
|
|
167
|
+
<nobr>
|
|
168
|
+
<label class="font_normal_body">计价周期</label></nobr>
|
|
169
|
+
<input class="input_search" style="width:25%" v-model="row.time_year" @input="validateInt"
|
|
170
|
+
@blur="figureYear(row.time_year, row.time_month, row.time_day, row.f_figure_times, row)"
|
|
171
|
+
@change="figureYear(row.time_year, row.time_month, row.time_day, row.f_figure_times, row)"
|
|
172
|
+
placeholder="年"/>
|
|
173
|
+
<input class="input_search" style="width:25%" v-model="row.time_month" @input="validateInt"
|
|
174
|
+
@blur="figureYear(row.time_year, row.time_month, row.time_day, row.f_figure_times, row)"
|
|
175
|
+
@change="figureYear(row.time_year, row.time_month, row.time_day, row.f_figure_times, row)"
|
|
176
|
+
placeholder="月"/>
|
|
177
|
+
<input class="input_search" style="width:25%" v-model="row.time_day" @input="validateInt"
|
|
178
|
+
@blur="figureYear(row.time_year, row.time_month, row.time_day, row.f_figure_times, row)"
|
|
179
|
+
@change="figureYear(row.time_year, row.time_month, row.time_day, row.f_figure_times, row)"
|
|
180
|
+
placeholder="日"/>
|
|
181
|
+
</div>
|
|
182
|
+
</div>
|
|
183
|
+
<div class="row auto" style="margin-left: 10px;" v-if="row.f_is_tenant==='true'&&this.showTip===true">
|
|
184
|
+
<div class="col-sm-12 form-group" style="padding-right: 5px;" >
|
|
185
|
+
<label style="color: red;padding-right: 3px;padding-bottom: 0;margin-bottom: 2px;">*</label>
|
|
186
|
+
<label style="font-size: 1.0rem !important;font-family: PingFang;color: #999999">计价周期填写时不需要全部填写(比如需要计价周期为3月,只需要在月输入框输入3)</label>
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
<div class="row auto" style="margin-left: 10px;" v-if="row.f_is_tenant==='true'">
|
|
190
|
+
<div class="col-sm-12 form-group" style="padding-right: 5px;" >
|
|
191
|
+
<label class="font_normal_body">周期数量</label>
|
|
192
|
+
<input class="input_search" style="width:30%" v-model="row.f_figure_times"
|
|
193
|
+
@input="validateInt"
|
|
194
|
+
@input.stop="figureYear(row.time_year, row.time_month, row.time_day, row.f_figure_times, row)"
|
|
195
|
+
@change="figureYear(row.time_year, row.time_month, row.time_day, row.f_figure_times, row)"
|
|
196
|
+
@blur="figureYear(row.time_year, row.time_month, row.time_day, row.f_figure_times, row)"
|
|
197
|
+
placeholder="周期数量"/>
|
|
198
|
+
</div>
|
|
199
|
+
</div>
|
|
200
|
+
|
|
138
201
|
<div>
|
|
139
202
|
<img style="margin-top: -2px;margin-left: 2px" src="../../../static/images/lefticon/矩形1183.png">
|
|
140
203
|
<a style="font-size: 16px;font-weight: 500;">连接管信息</a> <a
|
|
@@ -174,12 +237,12 @@
|
|
|
174
237
|
</div>
|
|
175
238
|
</div>
|
|
176
239
|
</form>
|
|
177
|
-
<img
|
|
240
|
+
<img src="../../../static/mainicon/deletedevice.png" alt="图片加载失败" class="img-rounded"
|
|
178
241
|
style="width: 60px;padding: 20px;margin-left: -15px;cursor: pointer;"
|
|
179
242
|
@click="deleteDevice($index, row)">
|
|
180
243
|
</div>
|
|
181
244
|
<div class="panel panel-default flex-two-info text-center" style="line-height: 164px;">
|
|
182
|
-
<img
|
|
245
|
+
<img src="../../../static/mainicon/adddevice.png" alt="图片加载失败1" class="img-rounded"
|
|
183
246
|
style="width: 60px;padding: 10px;cursor: pointer;"
|
|
184
247
|
@click="addDevice()">
|
|
185
248
|
</div>
|
|
@@ -225,9 +288,9 @@
|
|
|
225
288
|
<td style="text-align:center">{{row.f_userinfodevices_state}}</td>
|
|
226
289
|
<td style="text-align:center">{{row.f_comments}}</td>
|
|
227
290
|
<td style="text-align: center">
|
|
228
|
-
<img
|
|
229
|
-
|
|
230
|
-
|
|
291
|
+
<img src="../../../static/mainicon/deletedevice.png" alt="图片加载失败" class="img-rounded"
|
|
292
|
+
style="width: 60px;padding: 20px;margin-left: -15px;cursor: pointer;"
|
|
293
|
+
@click="deleteDevice($index, row)">
|
|
231
294
|
</td>
|
|
232
295
|
</tr>
|
|
233
296
|
</table>
|
|
@@ -254,9 +317,10 @@ export default {
|
|
|
254
317
|
title: '表具设备信息',
|
|
255
318
|
data () {
|
|
256
319
|
return {
|
|
320
|
+
showTip: false,
|
|
257
321
|
showTable: false,
|
|
258
|
-
imgdelete: '/
|
|
259
|
-
imgadd: '/
|
|
322
|
+
imgdelete: '../../../static/mainicon/deletedevice.png',
|
|
323
|
+
imgadd: '../../../static/mainicon/adddevice.png',
|
|
260
324
|
devicetypes: this.$appdata.getParam('设备类型'),
|
|
261
325
|
pipetypes: this.$appdata.getParam('管道类型'),
|
|
262
326
|
WatchPurchases: this.$appdata.getParam('购买方式'),
|
|
@@ -268,7 +332,15 @@ export default {
|
|
|
268
332
|
f_expire_date: '',
|
|
269
333
|
f_service_life: 0,
|
|
270
334
|
devicesinfoShow: true,
|
|
271
|
-
ljgDevicesinfoShow: true
|
|
335
|
+
ljgDevicesinfoShow: true,
|
|
336
|
+
//是否租赁
|
|
337
|
+
isTenant: [{label: '是', value: 'true'},{label: '否', value: 'false'}],
|
|
338
|
+
//租赁时间
|
|
339
|
+
f_tenant_date: null,
|
|
340
|
+
//租赁年限
|
|
341
|
+
f_tenant_liferg: null,
|
|
342
|
+
//租赁单价
|
|
343
|
+
f_tenant_price: null,
|
|
272
344
|
}
|
|
273
345
|
},
|
|
274
346
|
props: {
|
|
@@ -301,6 +373,60 @@ export default {
|
|
|
301
373
|
ready () {
|
|
302
374
|
},
|
|
303
375
|
methods: {
|
|
376
|
+
showTips(){
|
|
377
|
+
this.showTip = true
|
|
378
|
+
},
|
|
379
|
+
validateInt(event){
|
|
380
|
+
//整数合法检验
|
|
381
|
+
const value = event.target.value;
|
|
382
|
+
if (!/^\d*$/.test(value)) {
|
|
383
|
+
event.target.value = '';
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
figureYear(year, month, day, times, row){
|
|
387
|
+
year = parseInt(year)
|
|
388
|
+
month = parseInt(month)
|
|
389
|
+
day = parseInt(day)
|
|
390
|
+
times = parseInt(times)
|
|
391
|
+
if(!Number.isInteger(day)){
|
|
392
|
+
day = 0
|
|
393
|
+
}
|
|
394
|
+
if(!Number.isInteger(month)){
|
|
395
|
+
month = 0
|
|
396
|
+
}
|
|
397
|
+
if(!Number.isInteger(year)){
|
|
398
|
+
year = 0
|
|
399
|
+
}
|
|
400
|
+
if(!Number.isInteger(times)){
|
|
401
|
+
times = 0
|
|
402
|
+
}
|
|
403
|
+
console.log('计算依据',year, month, day, times, row)
|
|
404
|
+
const now = new Date();
|
|
405
|
+
const expiry = new Date(now);
|
|
406
|
+
expiry.setFullYear(expiry.getFullYear() + year)
|
|
407
|
+
expiry.setMonth(expiry.getMonth() + month)
|
|
408
|
+
expiry.setDate(expiry.getDate() + day)
|
|
409
|
+
const expiry_format = this.formatDate(expiry)
|
|
410
|
+
const duration = expiry.getTime() - now.getTime()
|
|
411
|
+
const duration_year = duration / (365.25 * 24 * 60 * 60 * 1000);
|
|
412
|
+
const duration_day = duration / (24 * 60 * 60 * 1000);
|
|
413
|
+
console.log('计价周期(年/日)', duration_year.toFixed(2), duration_day.toFixed(0));
|
|
414
|
+
row.f_figure_end_date = expiry
|
|
415
|
+
row.f_figure_circle = duration_day.toFixed(0)
|
|
416
|
+
//租赁年限 = 计价周期 * 周期数量
|
|
417
|
+
const full_duration = duration_year * times
|
|
418
|
+
console.log('租赁年限', full_duration.toFixed(1))
|
|
419
|
+
row.f_tenant_liferg = full_duration.toFixed(1)
|
|
420
|
+
},
|
|
421
|
+
formatDate (date){
|
|
422
|
+
const year = date.getFullYear();
|
|
423
|
+
const month = this.padZero(date.getMonth() + 1);
|
|
424
|
+
const day = this.padZero(date.getDate());
|
|
425
|
+
return `${year}-${month}-${day}`;
|
|
426
|
+
},
|
|
427
|
+
padZero(num) {
|
|
428
|
+
return num.toString().padStart(2, '0');
|
|
429
|
+
},
|
|
304
430
|
showTableBtn () {
|
|
305
431
|
this.showTable = !this.showTable
|
|
306
432
|
console.log('表具信息', this.devicesinfo)
|
|
@@ -356,7 +482,16 @@ export default {
|
|
|
356
482
|
f_devices_type: '家用灶具',
|
|
357
483
|
f_input_person: this.f_input_person,
|
|
358
484
|
f_userinfodevices_state: '正常',
|
|
359
|
-
f_input_date: this.$login.toStandardTimeString()
|
|
485
|
+
f_input_date: this.$login.toStandardTimeString(),
|
|
486
|
+
f_is_tenant: null,
|
|
487
|
+
f_tenant_date: null,
|
|
488
|
+
f_tenant_liferg: null,
|
|
489
|
+
f_tenant_price: null,
|
|
490
|
+
f_figure_circle: null,
|
|
491
|
+
f_figure_times: null,
|
|
492
|
+
time_year: null,
|
|
493
|
+
time_month: null,
|
|
494
|
+
time_day: null
|
|
360
495
|
})
|
|
361
496
|
},
|
|
362
497
|
closeModal () {
|
|
@@ -324,6 +324,7 @@ export default {
|
|
|
324
324
|
})
|
|
325
325
|
if (this.data.meterinfo[0].f_gas_date != null) {
|
|
326
326
|
this.data.addressinfo.f_address_state = '已通气'
|
|
327
|
+
this.data.meterinfo[0].f_open_date = this.data.meterinfo[0].f_gas_date
|
|
327
328
|
}
|
|
328
329
|
// 获取保存数据
|
|
329
330
|
Object.assign(this.fileSaveData, {}, this.$FileManageService.fileSaveBefore(this.data))
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<partial-view v-ref:pv>
|
|
3
|
+
<div class="panel panel-info auto" style="margin-top: auto">
|
|
4
|
+
<div class="panel-heading" style="height: 35px">
|
|
5
|
+
<h4 style="display:inline-block;margin-top: auto">表具信息</h4>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="auto ">
|
|
8
|
+
<div class="row" v-if="data.f_customer">
|
|
9
|
+
<label class = "col-sm-5 " style="color: brown">团缴编号</label>
|
|
10
|
+
<span class = "col-sm-7" style="color: brown">{{data.f_customer?data.f_customer:'无'}}</span>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="row">
|
|
13
|
+
<label class = "col-sm-5 " >气表类型</label>
|
|
14
|
+
<span class = "col-sm-7">{{data?data.f_meter_type:dafault.f_meter_brand}}</span>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="row">
|
|
17
|
+
<label class = "col-sm-5 " >气表品牌</label>
|
|
18
|
+
<span class = "col-sm-7">{{data?data.f_meter_brand:dafault.f_meter_brand}}</span>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="row">
|
|
21
|
+
<label class = "col-sm-5 " >气表型号</label>
|
|
22
|
+
<span class = "col-sm-7">{{data?data.f_meter_style:dafault.f_meter_style}}</span>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="row">
|
|
25
|
+
<label class="col-sm-5" style="color: brown">表具状态</label>
|
|
26
|
+
<span class="col-sm-7" style="color: brown">{{data?data.f_table_state:dafault.f_table_state}}</span>
|
|
27
|
+
</div>
|
|
28
|
+
<div class="row" v-if="data.f_meter_type.includes('物联网') && data.f_collection_type === '按金额'">
|
|
29
|
+
<label class = "col-sm-5 " style="color: brown">系统余额</label>
|
|
30
|
+
<span class = "col-sm-7" style="color: brown">{{data?data.f_balance_amount:dafault.f_balance_amount}}</span>
|
|
31
|
+
</div>
|
|
32
|
+
<div class="row" v-if="data.f_meter_type.includes('物联网') && data.f_collection_type === '按气量'">
|
|
33
|
+
<label class = "col-sm-5 " style="color: brown">系统余量</label>
|
|
34
|
+
<span class = "col-sm-7" style="color: brown">{{data?data.f_balance_gas:dafault.f_balance_gas}}</span>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="row" v-if="data.f_meter_type.includes('物联网') && data.f_collection_type === '按金额'">
|
|
37
|
+
<label class = "col-sm-5 " style="color: brown">表上余额</label>
|
|
38
|
+
<span class = "col-sm-7" style="color: brown">{{data?data.f_jval:dafault.f_jval}}</span>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="row" v-if="data.f_meter_type.includes('物联网') && data.f_collection_type === '按气量'">
|
|
41
|
+
<label class = "col-sm-5 " style="color: brown">表上余量</label>
|
|
42
|
+
<span class = "col-sm-7" style="color: brown">{{data?data.f_jval:dafault.f_jval}}</span>
|
|
43
|
+
</div>
|
|
44
|
+
<div class="row">
|
|
45
|
+
<label class = "col-sm-5 " >初始表底数</label>
|
|
46
|
+
<span class = "col-sm-7" >{{data?data.f_initial_base:dafault.f_initial_base}}</span>
|
|
47
|
+
</div>
|
|
48
|
+
<div class="row">
|
|
49
|
+
<label class = "col-sm-5 " >表当前底数</label>
|
|
50
|
+
<span class = "col-sm-7" >{{data?data.f_meter_base:dafault.f_meter_base}}</span>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="row" v-show="data.f_times">
|
|
53
|
+
<label class = "col-sm-5 " >写卡次数</label>
|
|
54
|
+
<span class = "col-sm-7" >{{data?data.f_times:dafault.f_times}}</span>
|
|
55
|
+
</div>
|
|
56
|
+
<div class="row" v-if="data.f_meter_type.includes('物联网')">
|
|
57
|
+
<label class = "col-sm-5 ">物联网次数</label>
|
|
58
|
+
<span class = "col-sm-7" >{{data?data.f_iot_times:dafault.f_iot_times}}</span>
|
|
59
|
+
</div>
|
|
60
|
+
<div class="row" v-if="data.f_meter_type.includes('物联网')">
|
|
61
|
+
<label class = "col-sm-5 ">表累购金额</label>
|
|
62
|
+
<span class = "col-sm-7" >{{data?data.f_total_fee:dafault.f_total_fee}}</span>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="row" v-if="data.f_meter_type.includes('物联网')">
|
|
65
|
+
<label class = "col-sm-5 ">户累购金额</label>
|
|
66
|
+
<span class = "col-sm-7" >{{data?data.f_total_fee_all:dafault.f_total_fee_all}}</span>
|
|
67
|
+
</div>
|
|
68
|
+
<div class="row" v-if="(data.f_meter_type === '机表' || data.f_meter_type === '物联网表') && data.f_deduction_gas > 0">
|
|
69
|
+
<label class = "col-sm-5 " >剩余抵扣量</label>
|
|
70
|
+
<span class = "col-sm-7" >{{data?data.f_deduction_gas:dafault.f_deduction_gas}}</span>
|
|
71
|
+
</div>
|
|
72
|
+
<div class="row" v-if="data.f_meter_type.includes('卡表')">
|
|
73
|
+
<label class = "col-sm-5 " style="color: brown" >户累购气量</label>
|
|
74
|
+
<span class = "col-sm-7" style="color: brown">{{data?data.f_total_gas_all:dafault.f_total_gas_all}}</span>
|
|
75
|
+
</div>
|
|
76
|
+
<div class="row" v-if="(data.f_meter_brand.includes('数码表'))">
|
|
77
|
+
<label class = "col-sm-5 " style="color: brown" >累购气量</label>
|
|
78
|
+
<span class = "col-sm-7" style="color: brown">{{data?data.f_total_gas:dafault.f_total_gas}}</span>
|
|
79
|
+
</div>
|
|
80
|
+
<div class="row" v-if="data.f_meter_type.includes('卡表') && data.f_meter_type === '气量卡表'">
|
|
81
|
+
<label class = "col-sm-5 " style="color: brown" >累购气量</label>
|
|
82
|
+
<span class = "col-sm-7" style="color: brown">{{data?data.f_total_gas:dafault.f_total_gas}}</span>
|
|
83
|
+
</div>
|
|
84
|
+
<div class="row" v-if="data.f_meter_type.includes('卡表')">
|
|
85
|
+
<label class = "col-sm-5 " style="color: brown">累购金额</label>
|
|
86
|
+
<span class = "col-sm-7" style="color: brown">{{data?data.f_total_fee:dafault.f_total_fee}}</span>
|
|
87
|
+
</div>
|
|
88
|
+
<div class="row" v-if="data.f_meter_type.includes('卡表')">
|
|
89
|
+
<label class = "col-sm-5 " style="color: brown">累购写卡金额</label>
|
|
90
|
+
<span class = "col-sm-7" style="color: brown">{{data?data.f_write_totalfee:dafault.f_total_fee}}</span>
|
|
91
|
+
</div>
|
|
92
|
+
<div class="row">
|
|
93
|
+
<label class = "col-sm-5 " >气表表号</label>
|
|
94
|
+
<span class = "col-sm-7">{{data?data.f_meternumber:dafault.f_meternumber}}</span>
|
|
95
|
+
</div>
|
|
96
|
+
<div class="row" v-if="data.f_meter_type.includes('卡表') || (data.f_meter_type.includes('物联网表') && data.f_hascard==='是')">
|
|
97
|
+
<label class = "col-sm-5 " >卡  号</label>
|
|
98
|
+
<span class = "col-sm-7">{{data?data.f_card_id:dafault.f_card_id}}</span>
|
|
99
|
+
</div>
|
|
100
|
+
<!-- <div class="row" v-if="data.f_meter_type.includes('卡表') || data.f_meter_type.includes('物联网表') && data.f_hascard==='是'">-->
|
|
101
|
+
<!-- <label class = "col-sm-5 " >写卡次数</label>-->
|
|
102
|
+
<!-- <span class = "col-sm-7">{{data?data.f_times:dafault.f_times}}</span>-->
|
|
103
|
+
<!-- </div>-->
|
|
104
|
+
<div class="row">
|
|
105
|
+
<label class = "col-sm-5 " >用气性质</label>
|
|
106
|
+
<span class = "col-sm-7">{{data?data.f_gasproperties:dafault.f_gasproperties}}</span>
|
|
107
|
+
</div>
|
|
108
|
+
<div class="row">
|
|
109
|
+
<label class = "col-sm-5 " >气价名称</label>
|
|
110
|
+
<span class = "col-sm-7">{{data?data.f_price_name:dafault.f_price_name}}</span>
|
|
111
|
+
</div>
|
|
112
|
+
<!--<div class="row" v-if="data.f_balance < 0">-->
|
|
113
|
+
<!--<label class = "col-sm-5 " >账户欠费</label>-->
|
|
114
|
+
<!--<span class = "col-sm-7" title="不包含违约金">{{data?0 - (data.f_balance - 0):dafault.f_balance}}</span>-->
|
|
115
|
+
<!--</div>-->
|
|
116
|
+
<!--<div class="row" v-else>-->
|
|
117
|
+
<!--<label class = "col-sm-5 " >账户余额</label>-->
|
|
118
|
+
<!--<span class = "col-sm-7">{{data?data.f_balance:dafault.f_balance}}</span>-->
|
|
119
|
+
<!--</div>-->
|
|
120
|
+
<div class="row" v-if="data.f_remanent_money > 0">
|
|
121
|
+
<label class = "col-sm-5 " >应补金额</label>
|
|
122
|
+
<span class = "col-sm-7">{{data?data.f_remanent_money:dafault.f_remanent_money}}</span>
|
|
123
|
+
</div>
|
|
124
|
+
<div class="row" v-if="data.f_remanent_gas > 0">
|
|
125
|
+
<label class = "col-sm-5 " >应补气量</label>
|
|
126
|
+
<span class = "col-sm-7">{{data?data.f_remanent_gas:dafault.f_remanent_gas}}</span>
|
|
127
|
+
</div>
|
|
128
|
+
<div class="row">
|
|
129
|
+
<label class = "col-sm-5 " >表  向</label>
|
|
130
|
+
<span class = "col-sm-7">{{data?data.f_aroundmeter:dafault.f_hand_date}}</span>
|
|
131
|
+
</div>
|
|
132
|
+
<div class="row">
|
|
133
|
+
<label class = "col-sm-5 " >抄表册名</label>
|
|
134
|
+
<span class = "col-sm-7">{{data?'['+data.f_book_code + '] '+ (data.f_book_name ? data.f_book_name:''):dafault.f_book_name}}</span>
|
|
135
|
+
</div>
|
|
136
|
+
<div class="row">
|
|
137
|
+
<label class = "col-sm-5 " >抄表册册序号</label>
|
|
138
|
+
<span class = "col-sm-7">{{data?data.f_meter_book_sort:dafault.f_meter_book_sort}}</span>
|
|
139
|
+
</div>
|
|
140
|
+
<div class="row">
|
|
141
|
+
<label class = "col-sm-5 " >安装位置</label>
|
|
142
|
+
<span class = "col-sm-7">{{data?data.f_position:dafault.f_position}}</span>
|
|
143
|
+
</div>
|
|
144
|
+
<div class="row">
|
|
145
|
+
<label class = "col-sm-5 " >置换人员</label>
|
|
146
|
+
<span class = "col-sm-7">{{data?data.f_gas_person:dafault.f_hand_date}}</span>
|
|
147
|
+
</div>
|
|
148
|
+
<div class="row">
|
|
149
|
+
<label class = "col-sm-5 " >置换时间</label>
|
|
150
|
+
<span class = "col-sm-7">{{data?data.f_gas_date.substring(0,7):dafault.f_hand_date}}</span>
|
|
151
|
+
</div>
|
|
152
|
+
<div class="row">
|
|
153
|
+
<label class = "col-sm-5 " >抄表员</label>
|
|
154
|
+
<span class = "col-sm-7">{{data?data.f_inputtor:dafault.f_inputtor}}</span>
|
|
155
|
+
</div>
|
|
156
|
+
<div class="row">
|
|
157
|
+
<label class = "col-sm-5 " >上次抄表日</label>
|
|
158
|
+
<span class = "col-sm-7">{{data?data.f_hand_date.substring(0,7):dafault.f_hand_date}}</span>
|
|
159
|
+
</div>
|
|
160
|
+
<div class="row">
|
|
161
|
+
<label class = "col-sm-5 " >建档日期</label>
|
|
162
|
+
<span class = "col-sm-7">{{data?data.f_input_date.substring(0,7):dafault.f_input_date}}</span>
|
|
163
|
+
</div>
|
|
164
|
+
<div class="row">
|
|
165
|
+
<label class = "col-sm-5 " >备  注</label>
|
|
166
|
+
<span class = "col-sm-7">{{data?data.comments:dafault.comments}}</span>
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
169
|
+
</div>
|
|
170
|
+
</partial-view>
|
|
171
|
+
</template>
|
|
172
|
+
|
|
173
|
+
<script>
|
|
174
|
+
/*用户档案相关信息组件*/
|
|
175
|
+
export default {
|
|
176
|
+
ready () {
|
|
177
|
+
console.log('看看userinfo里面接收的data数据', this.data)
|
|
178
|
+
},
|
|
179
|
+
title: '客户基本信息',
|
|
180
|
+
data () {
|
|
181
|
+
return {
|
|
182
|
+
dafault: {
|
|
183
|
+
f_total_gas_all: 0,
|
|
184
|
+
f_total_fee_all:0,
|
|
185
|
+
f_balance_amount: 0,
|
|
186
|
+
f_balance_gas: 0,
|
|
187
|
+
f_initial_base: 0,
|
|
188
|
+
f_meter_base: 0,
|
|
189
|
+
f_deduction_gas: 0,
|
|
190
|
+
f_total_gas: 0,
|
|
191
|
+
f_total_fee: 0,
|
|
192
|
+
f_card_id: '*****',
|
|
193
|
+
f_times: 0,
|
|
194
|
+
f_iot_times: 0,
|
|
195
|
+
f_meternumber: 0,
|
|
196
|
+
f_gasproperties: '****',
|
|
197
|
+
f_price_name: '****',
|
|
198
|
+
f_meter_brand: '****',
|
|
199
|
+
f_balance: 0,
|
|
200
|
+
f_user_type: '**',
|
|
201
|
+
f_remanent_gas: 0,
|
|
202
|
+
f_position: '****',
|
|
203
|
+
f_inputtor: '****',
|
|
204
|
+
f_jval: 0,
|
|
205
|
+
f_table_state: 0
|
|
206
|
+
},
|
|
207
|
+
model: null
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
props: ['data'],
|
|
211
|
+
methods: {
|
|
212
|
+
dealmsg (val) {
|
|
213
|
+
this.$dispatch('deal-msg', val)
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
watch: {
|
|
217
|
+
'data' (val) {
|
|
218
|
+
console.log('val========', val)
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
</script>
|
|
223
|
+
<style lang="less">
|
|
224
|
+
.row {
|
|
225
|
+
/*border-bottom:1px solid #F2F6FA;*/
|
|
226
|
+
margin-left: 0;
|
|
227
|
+
margin-right: 0;
|
|
228
|
+
}
|
|
229
|
+
// . {
|
|
230
|
+
// height: 23px;
|
|
231
|
+
// border-right: 1px solid #F2F6FA;
|
|
232
|
+
// margin-bottom: 0;
|
|
233
|
+
// text-align: left;
|
|
234
|
+
// }
|
|
235
|
+
// #address {
|
|
236
|
+
// border-left: 1px solid #F2F6FA;
|
|
237
|
+
// }
|
|
238
|
+
// #user-info {
|
|
239
|
+
// padding:6px;
|
|
240
|
+
// span {
|
|
241
|
+
// padding-left: 5px;
|
|
242
|
+
// }
|
|
243
|
+
// }
|
|
244
|
+
// #address1 {
|
|
245
|
+
// border-right: 0;
|
|
246
|
+
// }
|
|
247
|
+
</style>
|
|
@@ -18,4 +18,6 @@ export default function () {
|
|
|
18
18
|
Vue.component('owe-list', (resolve) => { require(['./OweList'], resolve) })
|
|
19
19
|
// 机表收费
|
|
20
20
|
Vue.component('machine-meter-center', (resolve) => { require(['./MachineMeterCenter'], resolve) })
|
|
21
|
+
// 当前选择用户的表具基本信息
|
|
22
|
+
Vue.component('user-meterinfodetail', (resolve) => { require(['./meterinfodetail'], resolve) })
|
|
21
23
|
}
|
|
@@ -73,6 +73,8 @@
|
|
|
73
73
|
<th><nobr>用户编号</nobr></th>
|
|
74
74
|
<th><nobr>用户地址</nobr></th>
|
|
75
75
|
<th><nobr>账期</nobr></th>
|
|
76
|
+
<th><nobr>上期抄表时间</nobr></th>
|
|
77
|
+
<th><nobr>本期抄表时间</nobr></th>
|
|
76
78
|
<th><nobr>起数</nobr></th>
|
|
77
79
|
<th><nobr>止数</nobr></th>
|
|
78
80
|
<th><nobr>用气量</nobr></th>
|
|
@@ -96,6 +98,8 @@
|
|
|
96
98
|
<td style="text-align:center">{{row.f_userinfo_code}}</td>
|
|
97
99
|
<td style="text-align:center">{{row.f_address}}</td>
|
|
98
100
|
<td style="text-align:center">{{row.hand_date}}</td>
|
|
101
|
+
<td style="text-align:center">{{row.f_last_input_date}}</td>
|
|
102
|
+
<td style="text-align:center">{{row.f_input_date}}</td>
|
|
99
103
|
<td style="text-align:center">{{row.f_last_tablebase}}</td>
|
|
100
104
|
<td style="text-align:center">{{row.f_tablebase}}</td>
|
|
101
105
|
<td style="text-align:center">{{row.f_oughtamount}}</td>
|
|
@@ -201,6 +205,8 @@
|
|
|
201
205
|
*/
|
|
202
206
|
import {HttpResetClass, PagedList} from 'vue-client'
|
|
203
207
|
import Vue from 'vue'
|
|
208
|
+
import * as Util from '../../../../Util'
|
|
209
|
+
import {getLastDayOfMonth} from '../../../../Util'
|
|
204
210
|
|
|
205
211
|
// let readySomething = async function (self) {
|
|
206
212
|
// // await self.$LoadParams.loadParam(self.f_filialeid)
|
|
@@ -212,13 +218,12 @@ import Vue from 'vue'
|
|
|
212
218
|
export default {
|
|
213
219
|
data () {
|
|
214
220
|
return {
|
|
215
|
-
model: new PagedList('rs/sql/getAccountUser', 50,
|
|
216
|
-
startDate: 'this.model.startDate',
|
|
217
|
-
endDate: 'this.model.endDate'
|
|
218
|
-
}),
|
|
221
|
+
model: new PagedList('rs/sql/getAccountUser', 50),
|
|
219
222
|
model2: new PagedList('rs/sql/getSendModel', 30, {orderitem: " \'id desc\'"}),
|
|
220
223
|
// 短信模板选择
|
|
221
224
|
infoshow: false,
|
|
225
|
+
startDate: '',
|
|
226
|
+
endDate: '',
|
|
222
227
|
// 下选后其他查询条件
|
|
223
228
|
criteriaShow: false,
|
|
224
229
|
// 短信发送
|
|
@@ -227,8 +232,6 @@ export default {
|
|
|
227
232
|
allshow2: false,
|
|
228
233
|
alldownDate: '',
|
|
229
234
|
sendtimeingdate: '', // 定时发送日期
|
|
230
|
-
startDate: '',
|
|
231
|
-
endDate: '',
|
|
232
235
|
sendtype: '',
|
|
233
236
|
fontSizeNum: 0,
|
|
234
237
|
userdefinedMessage: '',
|
|
@@ -392,8 +395,6 @@ export default {
|
|
|
392
395
|
}
|
|
393
396
|
|
|
394
397
|
this.allshow = false
|
|
395
|
-
this.startDate = this.$refs.paged.$refs.cri.model.startDate
|
|
396
|
-
this.endDate = this.$refs.paged.$refs.cri.model.endDate
|
|
397
398
|
this.model.condition = this.model.condition + " and f_orgid = \'" + Vue.$login.f.orgid + "\'"
|
|
398
399
|
if (this.ids.length !== 0) {
|
|
399
400
|
console.log('ids', this.ids)
|
|
@@ -436,6 +437,12 @@ export default {
|
|
|
436
437
|
console.log('args1:', args)
|
|
437
438
|
args.condition = `${args.condition} and f_user_state = '正常'`
|
|
438
439
|
args.condition = `${args.condition} and f_orgid = '${Vue.$login.f.orgid}'`
|
|
440
|
+
console.log(this.$refs.paged.$refs.cri.model.hand_date + '-01')
|
|
441
|
+
this.startDate = this.$refs.paged.$refs.cri.model.hand_date + '-01'
|
|
442
|
+
this.model.params.startDate = this.$refs.paged.$refs.cri.model.hand_date + '-01'
|
|
443
|
+
// 获取开始时间和结束实际
|
|
444
|
+
this.model.params.endDate = Util.getLastDayOfMonth(this.$refs.paged.$refs.cri.model.hand_date + '-01')
|
|
445
|
+
this.endDate = Util.getLastDayOfMonth(this.$refs.paged.$refs.cri.model.hand_date + '-01')
|
|
439
446
|
console.log('args.model', args.model)
|
|
440
447
|
this.model.search(args.condition, args.model)
|
|
441
448
|
if (this.isFirst) {
|
|
@@ -62,6 +62,7 @@ export default {
|
|
|
62
62
|
},
|
|
63
63
|
events: {
|
|
64
64
|
'create' (condition, userdefinedMessage, downDate, sendtype, startDate, endDate, msg) {
|
|
65
|
+
console.log(startDate,endDate)
|
|
65
66
|
let data = {
|
|
66
67
|
// 短信模板
|
|
67
68
|
userdefinedMessage: msg,
|
|
@@ -91,7 +92,7 @@ export default {
|
|
|
91
92
|
console.log('查看短信返回参数', data)
|
|
92
93
|
console.log(res.data)
|
|
93
94
|
if (res.data.success) {
|
|
94
|
-
this.$showMessage(`成功生成短信${res.data.success}条`)
|
|
95
|
+
this.$showMessage(`成功生成短信${res.data.success}条,生成失败${res.data.fail}条`)
|
|
95
96
|
// this.$refs.list.search()
|
|
96
97
|
this.$refs.message.$refs.paged.$refs.cri.search()
|
|
97
98
|
this.$refs.message.model.condition = 'convert(varchar(10),f_create_date,120) = ' + "'" + this.$login.toStandardDateString() + "'"
|
|
@@ -0,0 +1,686 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="auto">
|
|
3
|
+
<div class="auto form-group-new row">
|
|
4
|
+
<div class="col-sm-6" style="height:auto;width:49%;">
|
|
5
|
+
<p style="font-weight: bold;margin: 0"><img src="../../../static/mainicon/矩形1828.png"/> 基本信息</p>
|
|
6
|
+
<!-- 第一行数据-->
|
|
7
|
+
<div class="col-sm-4">
|
|
8
|
+
<label class="font_normal_body_new">客户编号</label>
|
|
9
|
+
<input class="input-underline" style="width:60%" :value="row.f_userinfo_code" readonly>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="col-sm-4">
|
|
12
|
+
<label class="font_normal_body_new">客户姓名</label>
|
|
13
|
+
<input class="input-underline" style="width:60%" :value="row.f_user_name" readonly>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="col-sm-4">
|
|
16
|
+
<label class="font_normal_body_new">用户状态</label>
|
|
17
|
+
<input class="input-underline" style="width:60%" :value="row.f_user_state" readonly>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="col-sm-8">
|
|
20
|
+
<label class="font_normal_body_new">客户地址</label>
|
|
21
|
+
<input class="input-underline" style="width:80%" :value="row.f_address" readonly>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="col-sm-4">
|
|
24
|
+
<label class="font_normal_body_new">客户电话</label>
|
|
25
|
+
<input class="input-underline" style="width:60%" :value="row.f_user_phone" readonly>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="col-sm-4">
|
|
28
|
+
<label class="font_normal_body_new">客户类型</label>
|
|
29
|
+
<input class="input-underline" style="width:60%" :value="row.f_user_type" readonly>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="col-sm-4">
|
|
32
|
+
<label class="font_normal_body_new">用气性质</label>
|
|
33
|
+
<input class="input-underline" style="width:60%" :value="row.f_gasproperties" readonly>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="col-sm-4">
|
|
36
|
+
<label class="font_normal_body_new">证件类型</label>
|
|
37
|
+
<input class="input-underline" style="width:60%" :value="row.f_credentials" readonly>
|
|
38
|
+
</div>
|
|
39
|
+
<div class="col-sm-8">
|
|
40
|
+
<label class="font_normal_body_new">证件号码</label>
|
|
41
|
+
<input class="input-underline" style="width:80%" :value="row.f_idnumber" readonly>
|
|
42
|
+
</div>
|
|
43
|
+
<div class="col-sm-4">
|
|
44
|
+
<label class="font_normal_body_new">用户状态</label>
|
|
45
|
+
<input class="input-underline" style="width:60%" :value="row.f_user_state" readonly>
|
|
46
|
+
</div>
|
|
47
|
+
<div class="col-sm-4">
|
|
48
|
+
<label class="font_normal_body_new">账户余额</label>
|
|
49
|
+
<input class="input-underline" style="width:60%" :value="row.f_balance" readonly>
|
|
50
|
+
</div>
|
|
51
|
+
<div class="col-sm-4">
|
|
52
|
+
<label class="font_normal_body_new">人 口 数</label>
|
|
53
|
+
<input class="input-underline" style="width:60%" :value="row.f_people_num" readonly>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
</div>
|
|
57
|
+
<div class="col-sm-6" style="height:auto;width:49%;">
|
|
58
|
+
<p style="font-weight: bold;margin: 0"><img src="../../../static/mainicon/矩形1828.png"/> 表具信息</p>
|
|
59
|
+
<div class="col-sm-4">
|
|
60
|
+
<label class="font_normal_body_new">表 号 </label>
|
|
61
|
+
<input class="input-underline" style="width:60%" :value="row.f_meternumber" readonly>
|
|
62
|
+
</div>
|
|
63
|
+
<div class="col-sm-4">
|
|
64
|
+
<label class="font_normal_body_new">气表状态</label>
|
|
65
|
+
<input class="input-underline" style="width:60%" :value="row.f_table_state" readonly>
|
|
66
|
+
</div>
|
|
67
|
+
<div class="col-sm-4">
|
|
68
|
+
<label class="font_normal_body_new">当前底数</label>
|
|
69
|
+
<input class="input-underline" style="width:60%" :value="row.f_meter_base" readonly>
|
|
70
|
+
</div>
|
|
71
|
+
<div class="col-sm-4">
|
|
72
|
+
<label class="font_normal_body_new">气表品牌</label>
|
|
73
|
+
<input class="input-underline" style="width:60%" :value="row.f_meter_brand" readonly>
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
<div class="col-sm-4">
|
|
77
|
+
<label class="font_normal_body_new">气价名称</label>
|
|
78
|
+
<input class="input-underline" style="width:60%" :value="row.f_price_name" readonly>
|
|
79
|
+
</div>
|
|
80
|
+
<div class="col-sm-4">
|
|
81
|
+
<label class="font_normal_body_new">气价类型</label>
|
|
82
|
+
<input class="input-underline" style="width:60%" :value="row.f_price_type" readonly>
|
|
83
|
+
</div>
|
|
84
|
+
<div class="col-sm-4">
|
|
85
|
+
<label class="font_normal_body_new">价格详情</label>
|
|
86
|
+
<input class="input-underline" style="width:60%" :value="row.f_detailprice" readonly>
|
|
87
|
+
</div>
|
|
88
|
+
<div v-if="row.f_meter_type.includes('物联网表')" class="col-sm-4">
|
|
89
|
+
<label class="font_normal_body_new" title="结算方式">计费终端</label>
|
|
90
|
+
<input class="input-underline" style="width:60%" :value="row.f_calculation ? row.f_calculation : '获取异常'"
|
|
91
|
+
readonly>
|
|
92
|
+
</div>
|
|
93
|
+
<div v-if="row.f_meter_type.includes('物联网表')" class="col-sm-4">
|
|
94
|
+
<label class="font_normal_body_new" title="结算方式">结算方式</label>
|
|
95
|
+
<input class="input-underline" style="width:60%" :value="row.f_collection_type ? row.f_collection_type : '获取异常'"
|
|
96
|
+
readonly>
|
|
97
|
+
</div>
|
|
98
|
+
<div v-if="row.f_meter_type.includes('物联网表')" class="col-sm-4">
|
|
99
|
+
<label class="font_normal_body_new" title="最后上报时间">上报时间</label>
|
|
100
|
+
<input class="input-underline" style="width:60%" :value="row.f_meteread_date ? row.f_meteread_date : '暂未上报'"
|
|
101
|
+
readonly>
|
|
102
|
+
</div>
|
|
103
|
+
<div v-if="row.f_meter_type.includes('卡表')" class="col-sm-4">
|
|
104
|
+
<label class="font_normal_body_new">累购气量</label>
|
|
105
|
+
<input class="input-underline" style="width:60%" :value="row.f_total_gas" readonly>
|
|
106
|
+
</div>
|
|
107
|
+
<div class="col-sm-4">
|
|
108
|
+
<label class="font_normal_body_new">累购金额</label>
|
|
109
|
+
<input class="input-underline" style="width:60%" :value="row.total_fee" readonly>
|
|
110
|
+
</div>
|
|
111
|
+
<div v-if="row.f_collection_type == '按气量' && row.f_meter_type.includes('物联网表')">
|
|
112
|
+
<div class="col-sm-4">
|
|
113
|
+
<label class="font_normal_body_new">累购气量</label>
|
|
114
|
+
<input class="input-underline" style="width:60%" :value="row.f_total_gas" readonly>
|
|
115
|
+
</div>
|
|
116
|
+
<div class="col-sm-4">
|
|
117
|
+
<label class="font_normal_body_new">最后结算时间</label>
|
|
118
|
+
<input class="input-underline" style="width:45%" :value="row.f_hand_date ? row.f_hand_date :'暂未上报'" readonly>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
<div v-if="row.f_meter_type.includes('物联网表')">
|
|
122
|
+
<div class="col-sm-4">
|
|
123
|
+
<label class="font_normal_body_new">指令上表次数</label>
|
|
124
|
+
<input class="input-underline" style="width:55%" :value="row.f_iot_times" readonly>
|
|
125
|
+
</div>
|
|
126
|
+
<!-- <div class="col-sm-4">-->
|
|
127
|
+
<!-- <label class="font_normal_body_new">表剩余金额</label>-->
|
|
128
|
+
<!-- <input class="input-underline" style="width:55%" :value="row.f_balance_amount" readonly>-->
|
|
129
|
+
<!-- </div>-->
|
|
130
|
+
<div class="col-sm-4">
|
|
131
|
+
<label class="font_normal_body_new">累计上报次数</label>
|
|
132
|
+
<input class="input-underline" style="width:45%" :value="row.f_meteread_number ? row.f_meteread_number : 0"
|
|
133
|
+
readonly>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
|
|
137
|
+
<div class="col-sm-4" v-if="row.f_calculation.includes('系统结算') && row.f_collection_type == '按气量'">
|
|
138
|
+
<label class="font_normal_body_new">系统剩余气量</label>
|
|
139
|
+
<input class="input-underline" style="width:55%" :value="row.f_balance_gas" readonly>
|
|
140
|
+
</div>
|
|
141
|
+
<div class="col-sm-4" v-if="row.f_calculation.includes('系统结算') && row.f_collection_type == '按金额'">
|
|
142
|
+
<label class="font_normal_body_new">系统剩余金额</label>
|
|
143
|
+
<input class="input-underline" style="width:55%" :value="row.f_balance_amount" readonly>
|
|
144
|
+
</div>
|
|
145
|
+
<div class="col-sm-4" v-if="row.f_calculation.includes('表端结算')">
|
|
146
|
+
<label class="font_normal_body_new">表端上报结余</label>
|
|
147
|
+
<input class="input-underline" style="width:55%" :value="row.f_jval" readonly>
|
|
148
|
+
</div>
|
|
149
|
+
<!-- <div class="col-sm-4" v-if="row.f_calculation.includes('表端结算')">-->
|
|
150
|
+
<!-- <label class="font_normal_body_new">未上表金额</label>-->
|
|
151
|
+
<!-- <input class="input-underline" style="width:55%" :value="row.f_not_amount" readonly>-->
|
|
152
|
+
<!-- </div>-->
|
|
153
|
+
<div class="col-sm-4" v-if="!row.f_calculation.includes('表端结算')">
|
|
154
|
+
<label class="font_normal_body_new">累计用气金额</label>
|
|
155
|
+
<input class="input-underline" style="width:45%" :value="row.f_total_usegas_amount" readonly>
|
|
156
|
+
</div>
|
|
157
|
+
<div v-if="row.f_meter_type.includes('物联网表')" class="col-sm-4">
|
|
158
|
+
<label class="font_normal_body_new">阀门状态</label>
|
|
159
|
+
<input class="input-underline" style="width:60%" :value="row.f_valvestate == 0 ? '已开阀' : '已关阀'" readonly>
|
|
160
|
+
</div>
|
|
161
|
+
<div v-if="row.f_meter_type.includes('物联网表')" class="col-sm-4">
|
|
162
|
+
<label class="font_normal_body_new">阀控状态</label>
|
|
163
|
+
<input class="input-underline" style="width:50%" :value="row.f_network_valve == '1' ? '手动' : '自动'" readonly>
|
|
164
|
+
<span v-if="row.f_network_valve" @click.stop="openModal"
|
|
165
|
+
class=" glyphicon glyphicon-pencil clickchange" title="修改阀控状态">
|
|
166
|
+
</span>
|
|
167
|
+
</div>
|
|
168
|
+
<div v-if="!row.f_meter_type.includes('物联网表')" class="col-sm-4" >
|
|
169
|
+
<label class="font_normal_body_new">写卡次数</label>
|
|
170
|
+
<input class="input-underline" style="width:45%" :value="row.f_times" readonly>
|
|
171
|
+
</div>
|
|
172
|
+
<div v-if="!row.f_meter_type.includes('物联网表')" class="col-sm-4">
|
|
173
|
+
<label class="font_normal_body_new">抄表册名</label>
|
|
174
|
+
<input class="input-underline" style="width:45%"
|
|
175
|
+
:value="(row.f_book_code!=null ? '['+row.f_book_code + '] ' : '') + (row.f_book_name!=null ? row.f_book_name:'')"
|
|
176
|
+
readonly>
|
|
177
|
+
</div>
|
|
178
|
+
<div v-if="!row.f_meter_type.includes('物联网表')" class="col-sm-4">
|
|
179
|
+
<label class="font_normal_body_new">抄表册册序号</label>
|
|
180
|
+
<input class="input-underline" style="width:45%" :value="row.f_meter_book_sort" readonly>
|
|
181
|
+
</div>
|
|
182
|
+
</div>
|
|
183
|
+
<div class="auto" style="float: right;">
|
|
184
|
+
<button class="button_clear " @click="cancelmain()">返回</button>
|
|
185
|
+
<button class="button_search" v-show="buttonshow" type="button" @click="goChargeManage">去收费</button>
|
|
186
|
+
<button v-if="row.f_meter_brand.includes('西美')&&row.f_meter_type.includes('物联网表')"
|
|
187
|
+
class="button_search" type="button" @click="clearBarrier">清除障碍
|
|
188
|
+
</button>
|
|
189
|
+
<button v-if="row.f_meter_type.includes('物联网表')"
|
|
190
|
+
class="button_search" type="button" @click="openUser">开户
|
|
191
|
+
</button>
|
|
192
|
+
<button v-if="row.f_meter_type.includes('物联网表') && valveLimit && (row.f_network_valve === '1' || (row.f_table_state === '停用' && row.f_network_valve === null))"
|
|
193
|
+
class="button_search" type="button" @click="valvecontrol">
|
|
194
|
+
开关阀
|
|
195
|
+
<button v-if="row.f_meter_type.includes('物联网表') && autoValveLimit"
|
|
196
|
+
class="button_search" type="button" @click="zdfk">开关自动阀控
|
|
197
|
+
</button>
|
|
198
|
+
<div
|
|
199
|
+
:class="{'button_shrink_top':criteriaShow,'button_shrink_bottom':!criteriaShow}"
|
|
200
|
+
@click="criteriaShow=!criteriaShow"
|
|
201
|
+
class="button_spacing"
|
|
202
|
+
style="float: right"></div>
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
205
|
+
|
|
206
|
+
<div class="auto row">
|
|
207
|
+
<div class="col-sm-6" style="width:49%;"></div>
|
|
208
|
+
<div class="auto form-group-new">
|
|
209
|
+
<div class="col-sm-6" style="height:auto;width:49%;" v-show="criteriaShow">
|
|
210
|
+
<div class="col-sm-4">
|
|
211
|
+
<label class="font_normal_body_new">气表型号</label>
|
|
212
|
+
<input class="input-underline" style="width:60%" :value="row.f_meter_style" readonly>
|
|
213
|
+
</div>
|
|
214
|
+
<div class="col-sm-4">
|
|
215
|
+
<label class="font_normal_body_new">气表类型</label>
|
|
216
|
+
<input class="input-underline" style="width:60%" :value="row.f_meter_type" readonly>
|
|
217
|
+
</div>
|
|
218
|
+
<div class="col-sm-4">
|
|
219
|
+
<label class="font_normal_body_new">初始底数</label>
|
|
220
|
+
<input class="input-underline" style="width:60%" :value="row.f_initial_base" readonly>
|
|
221
|
+
</div>
|
|
222
|
+
<div class="col-sm-4">
|
|
223
|
+
<label class="font_normal_body_new">左 右 表</label>
|
|
224
|
+
<input class="input-underline" style="width:60%" :value="row.f_aroundmeter" readonly>
|
|
225
|
+
</div>
|
|
226
|
+
<div class="col-sm-4">
|
|
227
|
+
<label class="font_normal_body_new">建表日期</label>
|
|
228
|
+
<input class="input-underline" style="width:60%" :value="row.f_input_date.substring(0,7)" readonly>
|
|
229
|
+
</div>
|
|
230
|
+
<div v-if="devices.length > 0" v-show="false" style="height: auto">
|
|
231
|
+
<p style="font-weight: bold;margin: 0">设备信息</p>
|
|
232
|
+
<div class="panel-heading" style="height: 30px">
|
|
233
|
+
<h4 style="display:inline-block;margin-top: auto">设备信息</h4>
|
|
234
|
+
</div>
|
|
235
|
+
<div v-for="device in devices">
|
|
236
|
+
|
|
237
|
+
<form class="form-horizontal">
|
|
238
|
+
<div class="col-sm-4">
|
|
239
|
+
<label class="font_normal_body_new">设备类型</label>
|
|
240
|
+
<input class="input-underline" style="width:60%" :value="device.f_devices_type" readonly>
|
|
241
|
+
</div>
|
|
242
|
+
<div class="col-sm-4">
|
|
243
|
+
<label class="font_normal_body_new">设备品牌</label>
|
|
244
|
+
<input class="input-underline" style="width:60%" :value="device.f_brand" readonly>
|
|
245
|
+
</div>
|
|
246
|
+
<div class="col-sm-4">
|
|
247
|
+
<label class="font_normal_body_new">设备型号</label>
|
|
248
|
+
<input class="input-underline" style="width:60%" :value="device.f_devices_model" readonly>
|
|
249
|
+
</div>
|
|
250
|
+
<div class="col-sm-4">
|
|
251
|
+
<label class="font_normal_body_new">设备数量</label>
|
|
252
|
+
<input class="input-underline" style="width:60%" :value="device.f_devices_num" readonly>
|
|
253
|
+
</div>
|
|
254
|
+
</form>
|
|
255
|
+
</div>
|
|
256
|
+
</div>
|
|
257
|
+
</div>
|
|
258
|
+
</div>
|
|
259
|
+
</div>
|
|
260
|
+
<!--阀控管理弹框-->
|
|
261
|
+
<modal :show.sync="valve">
|
|
262
|
+
<header slot="modal-header" class="modal-header">
|
|
263
|
+
<button type="button" class="close" @click="close()"><span>×</span></button>
|
|
264
|
+
<h4 class="modal-title" align="center">阀控管理</h4>
|
|
265
|
+
</header>
|
|
266
|
+
<article slot="modal-body" class="modal-body">
|
|
267
|
+
<div class="form-group" style="padding-left: 8px">
|
|
268
|
+
<label >阀控状态</label>
|
|
269
|
+
<div class="col-sm-3" >
|
|
270
|
+
<select v-model="selectedOption" class="input_search">
|
|
271
|
+
<option value="">请选择</option>
|
|
272
|
+
<option v-for="option in networkValveOptions" :value="option">
|
|
273
|
+
{{ option }}
|
|
274
|
+
</option>
|
|
275
|
+
</select>
|
|
276
|
+
</div>
|
|
277
|
+
</div>
|
|
278
|
+
|
|
279
|
+
<div class="form-group " style="padding-left: 8px">
|
|
280
|
+
<label class="font_normal_body" :class="operateReason?'text-info':'text-danger'">操作原因</label>
|
|
281
|
+
<textarea class="form-control" style="width:80%" v-model="operateReason" rows="1"
|
|
282
|
+
placeholder="请填写操作原因"></textarea>
|
|
283
|
+
</div>
|
|
284
|
+
</article>
|
|
285
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
286
|
+
<!-- <button type="button" class="button_search btn-ln fr" :disabled="!operateReason" @click='valveoperate(true,0)' title="屏蔽特殊条件下(充值开阀等)触发的自动开阀指令">强制开阀</button>-->
|
|
287
|
+
<button type="button" class="button_search btn-ln fr" :disabled="!operateReason" @click='valveoperate(true,1)'>开阀</button>
|
|
288
|
+
<!-- <button type="button" class="btn btn-info btn-ln fr" :disabled="!operateReason" @click='valveoperate(false, 0)' title="屏蔽特殊条件下(欠费关阀等)触发的自动开阀指令">强制关阀</button>-->
|
|
289
|
+
<button type="button" class="btn btn-info btn-ln fr" :disabled="!operateReason" @click='valveoperate(false, 1)'>关阀</button>
|
|
290
|
+
</footer>
|
|
291
|
+
</modal>
|
|
292
|
+
|
|
293
|
+
<modal :show.sync="showModal" v-ref:modal backdrop="false">
|
|
294
|
+
<header slot="modal-header" class="modal-header">
|
|
295
|
+
<h4 class="modal-title">修改阀控状态</h4>
|
|
296
|
+
</header>
|
|
297
|
+
<article slot="modal-body" class="modal-body">
|
|
298
|
+
<validator name='v'>
|
|
299
|
+
<form class="form-horizontal select-overspread">
|
|
300
|
+
<div class="row">
|
|
301
|
+
<div class="form-group">
|
|
302
|
+
<label class=" col-sm-3 control-label">阀控状态:</label>
|
|
303
|
+
<div class="col-sm-4">
|
|
304
|
+
<v-select v-model="f_network_valve"
|
|
305
|
+
placeholder='请选择'
|
|
306
|
+
:value.sync="disableModel.f_network_valve"
|
|
307
|
+
:options='f_network_valve'
|
|
308
|
+
:value-single="true"
|
|
309
|
+
close-on-select clear-button>
|
|
310
|
+
</v-select>
|
|
311
|
+
</div>
|
|
312
|
+
</div>
|
|
313
|
+
<div>
|
|
314
|
+
<label class=" col-sm-3 control-label">操作原因:</label>
|
|
315
|
+
<div class="col-sm-8">
|
|
316
|
+
<textarea class="form-control" v-model="disableModel.f_othereason" rows="3"
|
|
317
|
+
placeholder="多行输入"></textarea>
|
|
318
|
+
</div>
|
|
319
|
+
</div>
|
|
320
|
+
</div>
|
|
321
|
+
</form>
|
|
322
|
+
</validator>
|
|
323
|
+
</article>
|
|
324
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
325
|
+
<button type="button" class="button_search" @click='confirm()'>提交</button>
|
|
326
|
+
<button type="button" class="button_clear" @click='close1'>取消</button>
|
|
327
|
+
</footer>
|
|
328
|
+
</modal>
|
|
329
|
+
</div>
|
|
330
|
+
|
|
331
|
+
</template>
|
|
332
|
+
|
|
333
|
+
<script>
|
|
334
|
+
import {HttpResetClass} from 'vue-client'
|
|
335
|
+
import Vue from 'vue'
|
|
336
|
+
|
|
337
|
+
export default {
|
|
338
|
+
title: '基本信息',
|
|
339
|
+
props: {
|
|
340
|
+
row: {
|
|
341
|
+
type: Object,
|
|
342
|
+
default: undefined
|
|
343
|
+
},
|
|
344
|
+
buttonshow: {
|
|
345
|
+
type: Boolean,
|
|
346
|
+
default: true
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
data () {
|
|
350
|
+
return {
|
|
351
|
+
selectedOption: '手动',
|
|
352
|
+
delaySeconds: '',
|
|
353
|
+
networkValveOptions: [
|
|
354
|
+
'手动',
|
|
355
|
+
'自动',
|
|
356
|
+
'1小时后自动',
|
|
357
|
+
'3小时后自动',
|
|
358
|
+
'6小时后自动',
|
|
359
|
+
'12小时后自动'
|
|
360
|
+
],
|
|
361
|
+
showModal: false,
|
|
362
|
+
disableModel: {
|
|
363
|
+
f_othereason: '',
|
|
364
|
+
f_network_valve: ''
|
|
365
|
+
},
|
|
366
|
+
criteriaShow: false,
|
|
367
|
+
devices: [],
|
|
368
|
+
valveLimit: false,
|
|
369
|
+
autoValveLimit: false,
|
|
370
|
+
// 开关阀操作原因
|
|
371
|
+
operateReason: '',
|
|
372
|
+
valve: false,
|
|
373
|
+
showselectncuserinfo: false,
|
|
374
|
+
f_network_valve: this.$appdata.getParam('阀控状态') ? [{
|
|
375
|
+
// label: '全部',
|
|
376
|
+
value: ''
|
|
377
|
+
}, ...this.$appdata.getParam('阀控状态')] : []
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
ready () {
|
|
381
|
+
this.getDevice()
|
|
382
|
+
this.valveLimit = this.$login.r.includes('开关阀权限')
|
|
383
|
+
this.autoValveLimit = this.$login.r.includes('自动阀控权限')
|
|
384
|
+
},
|
|
385
|
+
methods: {
|
|
386
|
+
// 发送请求去数据
|
|
387
|
+
async getDevice () {
|
|
388
|
+
if (this.row) {
|
|
389
|
+
let http = new HttpResetClass()
|
|
390
|
+
let condition = `f_userinfo_id = '${this.row.f_userinfo_id}'`
|
|
391
|
+
let getDevices = await http.load('POST', 'rs/sql/sale_GetDevicesInfo', {data: {condition: condition}}, {
|
|
392
|
+
rejectMsg: '获取设备信息出错!!',
|
|
393
|
+
resolveMsg: null
|
|
394
|
+
})
|
|
395
|
+
this.devices = getDevices.data
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
openModal () {
|
|
399
|
+
this.showModal = true
|
|
400
|
+
},
|
|
401
|
+
async confirm () {
|
|
402
|
+
let operInfo = {
|
|
403
|
+
f_operator: this.$login.f.name,
|
|
404
|
+
f_operatorid: this.$login.f.id,
|
|
405
|
+
f_orgid: this.$login.f.orgid,
|
|
406
|
+
f_orgname: this.$login.f.orgs,
|
|
407
|
+
f_depid: this.$login.f.depids,
|
|
408
|
+
f_depname: this.$login.f.deps,
|
|
409
|
+
f_network_valve: this.disableModel.f_network_valve,
|
|
410
|
+
f_othereason: this.disableModel.f_othereason
|
|
411
|
+
}
|
|
412
|
+
let userlist = [
|
|
413
|
+
{
|
|
414
|
+
f_userinfo_id: this.row.f_userinfo_id,
|
|
415
|
+
f_user_name: this.row.f_user_name,
|
|
416
|
+
f_userfiles_id: this.row.f_userfiles_id,
|
|
417
|
+
f_table_state: this.row.f_table_state
|
|
418
|
+
}
|
|
419
|
+
]
|
|
420
|
+
let param = {
|
|
421
|
+
userlist,
|
|
422
|
+
operInfo
|
|
423
|
+
}
|
|
424
|
+
console.log(param)
|
|
425
|
+
await this.$resetpost('rs/logic/importNetworkValve', {data: param}, {
|
|
426
|
+
rejectMsg: '同步失败',
|
|
427
|
+
resolveMsg: '同步成功'
|
|
428
|
+
})
|
|
429
|
+
this.$emit('search-main')
|
|
430
|
+
this.showModal = false
|
|
431
|
+
},
|
|
432
|
+
|
|
433
|
+
close1 () {
|
|
434
|
+
// 关闭对话框的逻辑
|
|
435
|
+
this.showModal = false
|
|
436
|
+
},
|
|
437
|
+
// 返回
|
|
438
|
+
cancelmain () {
|
|
439
|
+
this.$emit('cancel-main')
|
|
440
|
+
},
|
|
441
|
+
clearBarrier () {
|
|
442
|
+
// 地址
|
|
443
|
+
// 127.0.0.1:8445
|
|
444
|
+
// 参数
|
|
445
|
+
let datas = {
|
|
446
|
+
moduleName: 'XiMeiSystem', // 固定值
|
|
447
|
+
content: {
|
|
448
|
+
tradeCode: '3015', // 固定值
|
|
449
|
+
appid: 'yysf', // 固定值
|
|
450
|
+
partner: 'cqsemay_bcts', // 固定值
|
|
451
|
+
version: 'v1', // 固定值
|
|
452
|
+
tasked: this.getuuid(), // 任务id
|
|
453
|
+
notifyUrl: 'http://192.168.2.10:8445/webmeter/rs/logic/XiMeiSystemCallBack', // 固定值
|
|
454
|
+
meterNo: this.row.f_meternumber, // 表号
|
|
455
|
+
signType: ' MD5' // 固定值
|
|
456
|
+
},
|
|
457
|
+
title: '清除异常', // 固定值
|
|
458
|
+
type: '清除异常', // 固定值
|
|
459
|
+
inputtor: this.row.f_operator, // 操作人
|
|
460
|
+
userId: this.row.f_userfiles_id, // 表档案ID
|
|
461
|
+
dataId: null // 操作记录ID
|
|
462
|
+
}
|
|
463
|
+
this.$resetpost('/webmeter/rs/logic/syncSaveSetParamsTemplate', {data: datas}, {
|
|
464
|
+
resolveMsg: `清理成功`,
|
|
465
|
+
rejectMsg: `清理失败`
|
|
466
|
+
}).then(res => {
|
|
467
|
+
})
|
|
468
|
+
},
|
|
469
|
+
getuuid () {
|
|
470
|
+
let uuidA = ''
|
|
471
|
+
var s = []
|
|
472
|
+
var hexDigits = '0123456789abcdef'
|
|
473
|
+
for (var i = 0; i < 36; i++) {
|
|
474
|
+
s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1)
|
|
475
|
+
}
|
|
476
|
+
s[14] = '4'
|
|
477
|
+
s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1)
|
|
478
|
+
s[8] = s[13] = s[18] = s[23] = '-'
|
|
479
|
+
uuidA = s.join('')
|
|
480
|
+
return uuidA
|
|
481
|
+
},
|
|
482
|
+
async goChargeManage () {
|
|
483
|
+
await this.$copyText(this.row.f_userinfo_code)
|
|
484
|
+
this.$showAlert(`用户编号已复制到剪切板!`, 'success', 2000)
|
|
485
|
+
if (this.row.parentname === 'charge-manage') {
|
|
486
|
+
this.$emit('cancel-re')
|
|
487
|
+
} else {
|
|
488
|
+
try {
|
|
489
|
+
this.$goto('charge-manage', {f: this.$login.f}, 'main')
|
|
490
|
+
} catch (e) {
|
|
491
|
+
}
|
|
492
|
+
try {
|
|
493
|
+
window.parent.dispatchEvent(new CustomEvent('gotoChargeManage', {detail: 'Hello from iframe'}))
|
|
494
|
+
} catch (e) {
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
},
|
|
498
|
+
openUser () {
|
|
499
|
+
this.$showMessage(`是否需要给用户进行开户?`, ['confirm', 'cancel']).then(async (res) => {
|
|
500
|
+
if (res === 'confirm') {
|
|
501
|
+
let data = {
|
|
502
|
+
f_userfiles_id: this.row.f_userfiles_id
|
|
503
|
+
}
|
|
504
|
+
this.$resetpost('rs/logic/startup', data)
|
|
505
|
+
}
|
|
506
|
+
})
|
|
507
|
+
},
|
|
508
|
+
// 阀控管理
|
|
509
|
+
zdfk () {
|
|
510
|
+
let data = {
|
|
511
|
+
inputtor: Vue.$login.f.name,
|
|
512
|
+
inputtorid: Vue.$login.f.id,
|
|
513
|
+
meterBrandName: this.row.f_alias,
|
|
514
|
+
f_userfiles_id: this.row.f_userfiles_id
|
|
515
|
+
}
|
|
516
|
+
if (this.row.f_network_valve !== '1') {
|
|
517
|
+
this.$resetpost('rs/logic/openzdfk', data, {resolveMsg: '关闭自动阀控成功。', rejectMsg: '关闭自动阀控失败!!!'})
|
|
518
|
+
this.row.f_network_valve = '1'
|
|
519
|
+
} else {
|
|
520
|
+
this.$resetpost('rs/logic/closezdfk', data, {resolveMsg: '开启自动阀控成功。', rejectMsg: '开启自动阀控失败!!!'})
|
|
521
|
+
this.row.f_network_valve = null
|
|
522
|
+
}
|
|
523
|
+
},
|
|
524
|
+
// 阀控管理
|
|
525
|
+
valvecontrol () {
|
|
526
|
+
if (this.$login.r.includes('开关阀权限')) {
|
|
527
|
+
this.valve = true
|
|
528
|
+
} else {
|
|
529
|
+
this.$showAlert('您没有【开关阀权限】,请联系管理员!!', 'warning', 3000)
|
|
530
|
+
}
|
|
531
|
+
},
|
|
532
|
+
close () {
|
|
533
|
+
this.valve = false
|
|
534
|
+
this.operateReason = ''
|
|
535
|
+
},
|
|
536
|
+
// 开关阀操作
|
|
537
|
+
async valveoperate (oper, value) {
|
|
538
|
+
let msg = oper ? '开阀' : '关阀'
|
|
539
|
+
let valueState = '自动'
|
|
540
|
+
if (value == 0) {
|
|
541
|
+
valueState = '自动'
|
|
542
|
+
} else {
|
|
543
|
+
valueState = '手动'
|
|
544
|
+
}
|
|
545
|
+
let delaySeconds = 0 // 初始化 delaySeconds 变量
|
|
546
|
+
let currentTime = new Date() // 获取当前时间
|
|
547
|
+
let adjustedTime = new Date(currentTime) // 创建一个新的 Date 对象用于计算延迟后的时间
|
|
548
|
+
|
|
549
|
+
let beijingTime = new Date(currentTime.getTime() + 8 * 60 * 60 * 1000)
|
|
550
|
+
let formattedBeijingTime = beijingTime.toISOString().slice(0, 19).replace('T', ' ')
|
|
551
|
+
|
|
552
|
+
let datas = {
|
|
553
|
+
instructType: '阀门控制',
|
|
554
|
+
instructTitle: `手动${msg}`,
|
|
555
|
+
condition: `t_userfiles.f_userfiles_id='${this.row.f_userfiles_id}'`,
|
|
556
|
+
meterBrandName: this.row.f_alias,
|
|
557
|
+
f_instruct_state: '待发送',
|
|
558
|
+
inputtor: Vue.$login.f.name,
|
|
559
|
+
inputtorid: Vue.$login.f.id,
|
|
560
|
+
reasonInfo: this.operateReason,
|
|
561
|
+
meternumberf: this.row.f_meternumber,
|
|
562
|
+
contentData: { isOpen: oper ? 1 : 0 },
|
|
563
|
+
auto_adjust_option: this.selectedOption,
|
|
564
|
+
delaySeconds: delaySeconds,
|
|
565
|
+
executeDelayedOperation: true,
|
|
566
|
+
f_timestamp: formattedBeijingTime, // 使用北京时间
|
|
567
|
+
f_userfiles_id: this.row.f_userfiles_id,
|
|
568
|
+
f_userinfo_id: this.row.f_userinfo_id
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
let _this = this
|
|
572
|
+
|
|
573
|
+
// 计算延迟时间
|
|
574
|
+
switch (_this.selectedOption) {
|
|
575
|
+
case '1小时后自动':
|
|
576
|
+
delaySeconds = 3600 // 1小时 = 3600秒
|
|
577
|
+
break
|
|
578
|
+
case '3小时后自动':
|
|
579
|
+
delaySeconds = 10800 // 3小时 = 10800秒
|
|
580
|
+
break
|
|
581
|
+
case '6小时后自动':
|
|
582
|
+
delaySeconds = 21600 // 6小时 = 21600秒
|
|
583
|
+
break
|
|
584
|
+
case '12小时后自动':
|
|
585
|
+
delaySeconds = 43200 // 12小时 = 43200秒
|
|
586
|
+
break
|
|
587
|
+
default:
|
|
588
|
+
delaySeconds = 0
|
|
589
|
+
}
|
|
590
|
+
adjustedTime.setSeconds(adjustedTime.getSeconds() + delaySeconds)
|
|
591
|
+
let adjustedBeijingTime = new Date(adjustedTime.getTime() + 8 * 60 * 60 * 1000)
|
|
592
|
+
let formattedAdjustedBeijingTime = adjustedBeijingTime.toISOString().slice(0, 19).replace('T', ' ')
|
|
593
|
+
|
|
594
|
+
// 更新 datas 对象
|
|
595
|
+
datas.delaySeconds = delaySeconds
|
|
596
|
+
datas.f_current_timestamp = formattedAdjustedBeijingTime // 使用延迟后的北京时间
|
|
597
|
+
|
|
598
|
+
await this.$resetpost('rs/sql/iot_searchInstruct', { data: datas }, { warnMsg: null, resolveMsg: null }).then(res => {
|
|
599
|
+
if (res.data.length === 0) {
|
|
600
|
+
_this.$resetpost('rs/logic/iot_saveInstruct', { data: datas }, {
|
|
601
|
+
warnMsg: `确定要进行${msg}操作吗?`,
|
|
602
|
+
resolveMsg: `${msg}成功`,
|
|
603
|
+
rejectMsg: `${msg}失败`
|
|
604
|
+
}).then(res => {
|
|
605
|
+
_this.valve = false
|
|
606
|
+
_this.operateReason = ''
|
|
607
|
+
if (_this.selectedOption !== '手动') {
|
|
608
|
+
_this.$showAlert(`阀控状态将在${_this.selectedOption}后自动调整为“自动”`, 'info', 3000)
|
|
609
|
+
|
|
610
|
+
_this.$resetpost('rs/logic/iot_processDelayedOperations', { data: datas }, { warnMsg: null, resolveMsg: null }).then(res => {
|
|
611
|
+
console.log('延时操作逻辑已执行')
|
|
612
|
+
})
|
|
613
|
+
}
|
|
614
|
+
})
|
|
615
|
+
} else {
|
|
616
|
+
this.$showAlert('存在开关阀待发送的指令,系统不生成同样的待发送指令', 'warning', 3000)
|
|
617
|
+
_this.valve = false
|
|
618
|
+
_this.operateReason = ''
|
|
619
|
+
}
|
|
620
|
+
})
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
},
|
|
624
|
+
watch: {
|
|
625
|
+
'row' () {
|
|
626
|
+
this.getDevice()
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
</script>
|
|
632
|
+
<style scoped lang="less">
|
|
633
|
+
.form-group-new > div {
|
|
634
|
+
height: 3% !important;
|
|
635
|
+
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
.datapanel {
|
|
639
|
+
color: #333;
|
|
640
|
+
background-color: white;
|
|
641
|
+
box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px;
|
|
642
|
+
padding: 10px 30px 10px 30px;
|
|
643
|
+
height: auto;
|
|
644
|
+
border-radius: 15px;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
.text-info {
|
|
648
|
+
color: lightskyblue;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
.text-danger {
|
|
652
|
+
color: red;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
.input-underline {
|
|
656
|
+
border-bottom: 1px solid #dbdbdb;
|
|
657
|
+
border-top: 0px;
|
|
658
|
+
border-left: 0px;
|
|
659
|
+
border-right: 0px;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
.font_normal_body_new {
|
|
663
|
+
font-weight: 100;
|
|
664
|
+
float: left;
|
|
665
|
+
margin-top: 0px;
|
|
666
|
+
font-size: 1.4rem !important;
|
|
667
|
+
line-height: 30px;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
.col-sm-4, .col-sm-8 {
|
|
671
|
+
display: flex;
|
|
672
|
+
align-items: center;
|
|
673
|
+
margin: 7px 0;
|
|
674
|
+
|
|
675
|
+
label {
|
|
676
|
+
line-height: unset;
|
|
677
|
+
margin-bottom: 0;
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
.clickchange:hover {
|
|
682
|
+
color: #3592ef;
|
|
683
|
+
cursor: pointer;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
</style>
|
|
@@ -10,4 +10,5 @@ export default function () {
|
|
|
10
10
|
Vue.component('file-user-files', (resolve) => { require(['./FileUserFiles'], resolve) })
|
|
11
11
|
// 单个表具信息
|
|
12
12
|
Vue.component('file-meter-info', (resolve) => { require(['./MeterinfoTest'], resolve) })
|
|
13
|
+
Vue.component('user-base-info-new', (resolve) => { require(['./UserBaseInfoNew'], resolve) })
|
|
13
14
|
}
|