apply-clients 7.1.36-yuchuan-13 → 7.1.36-yuchuan-16
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/android.html +28 -28
- package/build/dev-server.js +10 -28
- package/index.html +39 -39
- package/package.json +2 -2
- package/src/apply.js +1 -0
- package/src/applyAndroid.js +97 -97
- package/src/components/android/AppSign.vue +0 -1
- package/src/components/android/AppUpload.vue +275 -275
- package/src/components/android/Ignition/VentilationIgnition.vue +1 -1
- package/src/components/android/Ignition/VentilationIgnitionHandle.vue +1 -1
- package/src/components/android/Process/AppExplorationUser.vue +2 -2
- package/src/components/android/Process/AppServiceControl.vue +6 -6
- package/src/components/android/Process/Processes/AppInstallationDetails.vue +2 -2
- package/src/components/android/Sign/AppSignTask.vue +1 -1
- package/src/components/android/Supervisory/AppProcessSupervisory.vue +1 -1
- package/src/components/android/Task/GuanXianJianShe/AppExplorationGuanXian.vue +2 -2
- package/src/components/android/Task/ShiGongXinXi/AppShowBuildUser.vue +2 -2
- package/src/components/android/Task/yiban/AppShowDone.vue +2 -2
- package/src/components/android/Task/yiban/ShowDone.vue +95 -95
- package/src/components/android/Task/yiban/satisfactionShow.vue +166 -166
- package/src/components/android/newPackage/customerServiceManager.vue +1 -1
- package/src/components/android/newPackage/projectPrice.vue +1 -1
- package/src/components/product/ApplyCharge/ApplyChargeList.vue +1101 -1101
- package/src/components/product/ApplyGaiXianCharge/ApplyGaiXianViewList.vue +272 -272
- package/src/components/product/ApplyGuanXian/GuanXianCaiLiao.vue +236 -236
- package/src/components/product/ApplyGuanXian/GuanXianExplorationSelect.vue +2 -2
- package/src/components/product/ApplyGuanXian/GuanXianExplorationUser.vue +1 -1
- package/src/components/product/ApplyGuanXian/GuanXianSupervisoryhCart.vue +119 -119
- package/src/components/product/ApplyMap/AMapLocation.vue +870 -870
- package/src/components/product/ApplyMap/AmapUtil.js +37 -37
- package/src/components/product/ApplyMap/ApplyDragaboutList.vue +223 -223
- package/src/components/product/ApplyMap/ApplyInputSearch.vue +212 -212
- package/src/components/product/ApplyMap/ApplyMapCom.vue +82 -82
- package/src/components/product/ApplyMap/ApplyMapLocation.vue +862 -862
- package/src/components/product/Function/InstallFunction.vue +1 -1
- package/src/components/product/Function/InstallInfoSelect.vue +2 -2
- package/src/components/product/Function/Service/FunctionServiceControl.vue +586 -586
- package/src/components/product/GongJianPush/ApplyPushList.vue +191 -191
- package/src/components/product/GongJianPush/ApplyPushManage.vue +91 -91
- package/src/components/product/Ignition/IgnitionListManage.vue +602 -602
- package/src/components/product/Ignition/IgnitionRecord.vue +380 -380
- package/src/components/product/List/OldShowDevices.vue +2 -2
- package/src/components/product/List/ShowAllActivity.vue +2 -2
- package/src/components/product/List/ShowDevices.vue +2 -2
- package/src/components/product/Process/ExplorationSelect.vue +2 -2
- package/src/components/product/Process/ExplorationUser.vue +1 -1
- package/src/components/product/Process/New1ExplorationUser.vue +2 -2
- package/src/components/product/Process/NewExplorationSelect.vue +2 -2
- package/src/components/product/Process/NewExplorationUser.vue +1 -1
- package/src/components/product/Process/Processes/InstallationDetails.vue +4 -4
- package/src/components/product/Process/Processes/Print/printCharge.vue +250 -250
- package/src/components/product/Process/Processes/Print/printGaiXianCharge.vue +244 -244
- package/src/components/product/Process/Processes/chargeManagement.vue +704 -704
- package/src/components/product/Process/Processes/devicesManagement.vue +393 -393
- package/src/components/product/Process/Processes/newDevicesManagement.vue +413 -413
- package/src/components/product/Process/Processes/selectChaiChuUserinfo.vue +2 -2
- package/src/components/product/Process/Processes/selectOldUserinfo.vue +2 -2
- package/src/components/product/Process/Processes/selectUserinfo.vue +3 -3
- package/src/components/product/Process/Service/ServiceControl.vue +6 -6
- package/src/components/product/ServiceView.vue +644 -644
- package/src/components/product/Supervisory/NewSupervisoryhCart.vue +175 -175
- package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +1 -1
- package/src/components/product/Supervisory/SupervisoryControl.vue +116 -116
- package/src/components/product/Supervisory/SupervisoryList.vue +2 -2
- package/src/components/product/Supervisory/SupervisoryhCart.vue +119 -119
- package/src/components/product/Supervisory/YiBanSupervisoryList.vue +2 -2
- package/src/components/product/VueUtils/ApplyUpload.vue +285 -294
- package/src/components/product/records/AdjustmentRecordList.vue +162 -162
- package/src/main.js +27 -27
|
@@ -1,393 +1,393 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="col-sm-12" style="margin: 20px 0px;">
|
|
3
|
-
<data-grid :model="model" v-ref:grid class="list_area table_sy" style="padding: 0px">
|
|
4
|
-
<template partial='head'>
|
|
5
|
-
<tr>
|
|
6
|
-
<th class="textNoLineBreak">序号</th>
|
|
7
|
-
<th class="textNoLineBreak">编号</th>
|
|
8
|
-
<th class="textNoLineBreak">设备数</th>
|
|
9
|
-
<th class="textNoLineBreak">
|
|
10
|
-
<button
|
|
11
|
-
type="button"
|
|
12
|
-
class="btn btn-info head-but"
|
|
13
|
-
@click="$parent.$parent.openDevicesModal()"
|
|
14
|
-
:disabled="$parent.$parent.mark === 1"
|
|
15
|
-
>添加</button>
|
|
16
|
-
</th>
|
|
17
|
-
</tr>
|
|
18
|
-
</template>
|
|
19
|
-
<template partial='body'>
|
|
20
|
-
<tr>
|
|
21
|
-
<td style="text-align: center;">
|
|
22
|
-
<nobr>{{$index+1}}</nobr>
|
|
23
|
-
</td>
|
|
24
|
-
<td style="text-align: center;">
|
|
25
|
-
<nobr>{{row.f_userinfo_id}}</nobr>
|
|
26
|
-
</td>
|
|
27
|
-
<td style="text-align: center;">
|
|
28
|
-
<nobr>{{row.amount}}</nobr>
|
|
29
|
-
</td>
|
|
30
|
-
<td style="text-align: center;">
|
|
31
|
-
<nobr>
|
|
32
|
-
<button
|
|
33
|
-
type="button"
|
|
34
|
-
name="button"
|
|
35
|
-
class="btn btn-link"
|
|
36
|
-
@click="$parent.$parent.openDevicesModal(row)"
|
|
37
|
-
>
|
|
38
|
-
{{$parent.$parent.mark === 1 ? '查看' : '修正'}}
|
|
39
|
-
</button>
|
|
40
|
-
<button
|
|
41
|
-
type="button" name="button" class="btn btn-link"
|
|
42
|
-
@click="$parent.$parent.deleteUserinfo(row)"
|
|
43
|
-
v-if="$parent.$parent.showDeleteUserInfo"
|
|
44
|
-
:disabled="$parent.$parent.mark === 1"
|
|
45
|
-
>
|
|
46
|
-
删除
|
|
47
|
-
</button>
|
|
48
|
-
</nobr>
|
|
49
|
-
</td>
|
|
50
|
-
</tr>
|
|
51
|
-
</template>
|
|
52
|
-
</data-grid>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
<modal v-if="showDevices" :show.sync="showDevices" v-ref:modal :large="true" :backdrop="false" title="表具设备信息">
|
|
56
|
-
<header slot="modal-header" class="modal-header">
|
|
57
|
-
<button type="button" class="close" @click="closeDevices"><span>×</span></button>
|
|
58
|
-
<h4 class="modal-title">表具设备信息</h4>
|
|
59
|
-
</header>
|
|
60
|
-
<article slot="modal-body" class="modal-body clearfix">
|
|
61
|
-
<div v-for="(i, item) in devicesinfo" class="form-group col-sm-12 panel panel-info">
|
|
62
|
-
<div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
|
|
63
|
-
<div class="col-sm-6 text-left">设备{{$index+1}}信息</div>
|
|
64
|
-
<div class="col-sm-6 text-right"><button
|
|
65
|
-
class="button_delete button_spacing"
|
|
66
|
-
v-if="!item.id && mark !== 1"
|
|
67
|
-
@click.prevent="deleteDevicesinfo(i)"
|
|
68
|
-
>删除</button></div>
|
|
69
|
-
<div class="col-sm-6 text-right"><button
|
|
70
|
-
class="button_delete button_spacing"
|
|
71
|
-
v-if="item.id && showDeleteUserInfo && mark !== 1"
|
|
72
|
-
@click.prevent="deleteDevices(item.id)"
|
|
73
|
-
>删除</button></div>
|
|
74
|
-
</div>
|
|
75
|
-
<div class="form-group col-sm-6" :class="[!item.f_devices_type ? 'has-error' : '']">
|
|
76
|
-
<label class="col-sm-4 control-label">设备类型:</label>
|
|
77
|
-
<div class="col-sm-8">
|
|
78
|
-
<input-select
|
|
79
|
-
class="select select_list"
|
|
80
|
-
:value.sync="item.f_devices_type"
|
|
81
|
-
v-model="item.f_devices_type"
|
|
82
|
-
:options="devicesType"
|
|
83
|
-
:disable="mark === 1"
|
|
84
|
-
:valueSingle="true"></input-select>
|
|
85
|
-
</div>
|
|
86
|
-
</div>
|
|
87
|
-
<div class="form-group col-sm-6">
|
|
88
|
-
<label class="col-sm-4 control-label">设备编号:</label>
|
|
89
|
-
<div class="col-sm-8">
|
|
90
|
-
<input class="form-control input_view" style=""
|
|
91
|
-
placeholder="设备编号"
|
|
92
|
-
v-model="item.f_devices_no"
|
|
93
|
-
:value="item.f_devices_no"
|
|
94
|
-
:readonly="mark === 1"/>
|
|
95
|
-
</div>
|
|
96
|
-
</div>
|
|
97
|
-
<div class="form-group col-sm-6">
|
|
98
|
-
<label class="col-sm-4 control-label">设备品牌:</label>
|
|
99
|
-
<div class="col-sm-8">
|
|
100
|
-
<input class="form-control input_view" style=""
|
|
101
|
-
placeholder="设备品牌"
|
|
102
|
-
v-model="item.f_brand"
|
|
103
|
-
:value="item.f_brand"
|
|
104
|
-
:readonly="mark === 1"/>
|
|
105
|
-
</div>
|
|
106
|
-
</div>
|
|
107
|
-
<div class="form-group col-sm-6">
|
|
108
|
-
<label class="col-sm-4 control-label">设备型号:</label>
|
|
109
|
-
<div class="col-sm-8">
|
|
110
|
-
<input class="form-control input_view" style=""
|
|
111
|
-
placeholder="设备型号"
|
|
112
|
-
v-model="item.f_devices_model"
|
|
113
|
-
:value="item.f_devices_model"
|
|
114
|
-
:readonly="mark === 1"/>
|
|
115
|
-
</div>
|
|
116
|
-
</div>
|
|
117
|
-
<div class="form-group col-sm-6" :class="[!item.f_devices_num ? 'has-error' : '']">
|
|
118
|
-
<label class="col-sm-4 control-label">设备数量:</label>
|
|
119
|
-
<div class="col-sm-8">
|
|
120
|
-
<input class="form-control input_view" style="" type="number"
|
|
121
|
-
placeholder="设备数量"
|
|
122
|
-
v-model="item.f_devices_num"
|
|
123
|
-
:value="item.f_devices_num"
|
|
124
|
-
:readonly="mark === 1"/>
|
|
125
|
-
</div>
|
|
126
|
-
</div>
|
|
127
|
-
<div class="form-group col-sm-6">
|
|
128
|
-
<label class="col-sm-4 control-label">设备功率:</label>
|
|
129
|
-
<div class="col-sm-8">
|
|
130
|
-
<input class="form-control input_view" style=""
|
|
131
|
-
placeholder="设备功率"
|
|
132
|
-
type="number"
|
|
133
|
-
v-model="item.f_devices_tonnage"
|
|
134
|
-
:value="item.f_devices_tonnage"
|
|
135
|
-
:readonly="mark === 1"/>
|
|
136
|
-
</div>
|
|
137
|
-
</div>
|
|
138
|
-
<div class="form-group col-sm-6">
|
|
139
|
-
<label class="col-sm-4 control-label">安装日期:</label>
|
|
140
|
-
<div class="col-sm-8">
|
|
141
|
-
<input class="form-control input_view" style=""
|
|
142
|
-
placeholder="安装日期"
|
|
143
|
-
v-model="item.f_install_date"
|
|
144
|
-
:value="installdate(item.f_install_date)"
|
|
145
|
-
readonly/>
|
|
146
|
-
</div>
|
|
147
|
-
</div>
|
|
148
|
-
<div class="form-group col-sm-6" :class="[item.f_devices_tonnage && !item.f_devices_tonnage_unit ? 'has-error' : '']">
|
|
149
|
-
<label class="col-sm-4 control-label">功率单位:</label>
|
|
150
|
-
<div class="col-sm-8">
|
|
151
|
-
<input class="form-control input_view" style=""
|
|
152
|
-
placeholder="功率单位"
|
|
153
|
-
v-model="item.f_devices_tonnage_unit"
|
|
154
|
-
:value="item.f_devices_tonnage_unit"
|
|
155
|
-
:readonly="mark === 1"/>
|
|
156
|
-
</div>
|
|
157
|
-
</div>
|
|
158
|
-
</div>
|
|
159
|
-
|
|
160
|
-
</article>
|
|
161
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
162
|
-
<template v-if="mark !== 1">
|
|
163
|
-
<button type="button" class="btn btn-primary" @click="pushDevice()">添加设备</button>
|
|
164
|
-
<button type="button" class="btn btn-primary" @click="addDevice(device)" :disabled="disabledBut">确认</button>
|
|
165
|
-
</template>
|
|
166
|
-
</footer>
|
|
167
|
-
</modal>
|
|
168
|
-
</div>
|
|
169
|
-
</template>
|
|
170
|
-
<script>
|
|
171
|
-
import {getNowDate,isEmpty} from '../../../Util'
|
|
172
|
-
import {PagedList} from 'vue-client'
|
|
173
|
-
import Vue from 'vue'
|
|
174
|
-
import {HttpResetClass} from 'vue-client'
|
|
175
|
-
// Date格式化
|
|
176
|
-
Date.prototype.Format = function (fmt) {
|
|
177
|
-
var o = {
|
|
178
|
-
'M+': this.getMonth() + 1, // 月份
|
|
179
|
-
'd+': this.getDate(), // 日
|
|
180
|
-
'H+': this.getHours(), // 小时
|
|
181
|
-
'm+': this.getMinutes(), // 分
|
|
182
|
-
's+': this.getSeconds(), // 秒
|
|
183
|
-
'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
|
|
184
|
-
'S': this.getMilliseconds() // 毫秒
|
|
185
|
-
}
|
|
186
|
-
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
|
|
187
|
-
for (var k in o) {
|
|
188
|
-
if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
|
|
189
|
-
}
|
|
190
|
-
return fmt
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
export default {
|
|
194
|
-
title: '设备管理',
|
|
195
|
-
props: {
|
|
196
|
-
selectdata: {
|
|
197
|
-
type: Object
|
|
198
|
-
},
|
|
199
|
-
mark: {
|
|
200
|
-
type: Number,
|
|
201
|
-
default: 0
|
|
202
|
-
}
|
|
203
|
-
},
|
|
204
|
-
data () {
|
|
205
|
-
return {
|
|
206
|
-
model: {
|
|
207
|
-
data: null
|
|
208
|
-
},
|
|
209
|
-
devicesinfo: [],
|
|
210
|
-
device: '',
|
|
211
|
-
showDevices: false
|
|
212
|
-
}
|
|
213
|
-
},
|
|
214
|
-
ready () {
|
|
215
|
-
this.search()
|
|
216
|
-
},
|
|
217
|
-
methods: {
|
|
218
|
-
async deleteUserinfo (row) {
|
|
219
|
-
let res = await this.$showMessage('此操作不可撤回,您确定要删除这条记录吗?')
|
|
220
|
-
if (res === 'cancel') {
|
|
221
|
-
return
|
|
222
|
-
}
|
|
223
|
-
let data = {
|
|
224
|
-
login: this.$login.f,
|
|
225
|
-
userinfo: row,
|
|
226
|
-
selectdata: this.selectdata
|
|
227
|
-
}
|
|
228
|
-
res = await this.$resetpost('rs/logic/applyDeleteUserinfo', {data:data}, {
|
|
229
|
-
resolveMsg: null,
|
|
230
|
-
rejectMsg: '删除失败!!!'
|
|
231
|
-
})
|
|
232
|
-
|
|
233
|
-
this.$dispatch('breakControl', this.selectdata)
|
|
234
|
-
},
|
|
235
|
-
async deleteDevices (index) {
|
|
236
|
-
this.$resetdelete(`rs/entity/t_devices`, {id: index}, {
|
|
237
|
-
resolveMsg: '删除成功',
|
|
238
|
-
rejectMsg: '删除失败'
|
|
239
|
-
}).then(async (res) => { //发送请求
|
|
240
|
-
let data = {
|
|
241
|
-
old_id: index
|
|
242
|
-
}
|
|
243
|
-
let res1 = await this.$resetpost(
|
|
244
|
-
`rs/logic/applydeleteDevice`,
|
|
245
|
-
{data: data},
|
|
246
|
-
{resolveMsg: null, rejectMsg: '设备添加失败!!!'}
|
|
247
|
-
)
|
|
248
|
-
|
|
249
|
-
this.$dispatch('breakControl', this.selectdata)
|
|
250
|
-
})
|
|
251
|
-
},
|
|
252
|
-
deleteDevicesinfo (index) {
|
|
253
|
-
this.devicesinfo.splice(index, 1)
|
|
254
|
-
},
|
|
255
|
-
async addDevice (row) {
|
|
256
|
-
if(this.devicesinfo.length > 0) {
|
|
257
|
-
let data = {
|
|
258
|
-
selectdata: this.selectdata,
|
|
259
|
-
devicesinfo: this.devicesinfo,
|
|
260
|
-
user: this.$login.f,
|
|
261
|
-
f_userinfo_id: row ? row.f_userinfo_id : ''
|
|
262
|
-
}
|
|
263
|
-
let res = await this.$resetpost(
|
|
264
|
-
`rs/logic/applyAddDevice`,
|
|
265
|
-
{data: data},
|
|
266
|
-
{resolveMsg: null, rejectMsg: '设备添加失败!!!'}
|
|
267
|
-
)
|
|
268
|
-
}
|
|
269
|
-
this.$dispatch('breakControl', this.selectdata)
|
|
270
|
-
},
|
|
271
|
-
pushDevice () {
|
|
272
|
-
this.devicesinfo.push({})
|
|
273
|
-
},
|
|
274
|
-
async openDevicesModal (row) {
|
|
275
|
-
this.device = ''
|
|
276
|
-
if (row) {
|
|
277
|
-
this.device = row
|
|
278
|
-
let data = {
|
|
279
|
-
tablename: 't_devices',
|
|
280
|
-
condition: `f_userinfo_id = '${row.f_userinfo_id}'`
|
|
281
|
-
}
|
|
282
|
-
let http = new HttpResetClass()
|
|
283
|
-
let res = await http.load(
|
|
284
|
-
'POST',
|
|
285
|
-
`rs/sql/applySingleTable`,
|
|
286
|
-
{data: data},
|
|
287
|
-
{resolveMsg: null, rejectMsg: '设备查询失败!!!'}
|
|
288
|
-
)
|
|
289
|
-
this.devicesinfo = res.data
|
|
290
|
-
} else {
|
|
291
|
-
this.pushDevice()
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
this.showDevices = true
|
|
295
|
-
},
|
|
296
|
-
async search () {
|
|
297
|
-
let http = new HttpResetClass()
|
|
298
|
-
let data= {}
|
|
299
|
-
if(this.selectdata.is_modify=='是'){
|
|
300
|
-
data = {
|
|
301
|
-
condition: `ui.f_old_process_id = '${this.selectdata.f_process_id}' or ui.f_process_id = '${this.selectdata.f_process_id}' or ui.f_userinfo_id = '${this.selectdata.f_userinfo_id}'`
|
|
302
|
-
}
|
|
303
|
-
}else{
|
|
304
|
-
data = {
|
|
305
|
-
condition: `ui.f_old_process_id = '${this.selectdata.f_process_id}' or ui.f_process_id = '${this.selectdata.f_process_id}' `
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
let res = await http.load('POST', 'rs/sql/getUserInfoDevicesAmount', {data:data}, {
|
|
309
|
-
resolveMsg: null,
|
|
310
|
-
rejectMsg: '获取设备失败!!!'
|
|
311
|
-
})
|
|
312
|
-
this.model.data = res.data
|
|
313
|
-
|
|
314
|
-
// 更改安装处数
|
|
315
|
-
for (const item of this.selectdata.fields) {
|
|
316
|
-
if (item.label === '安装处数') {
|
|
317
|
-
item.value = this.model.data.length
|
|
318
|
-
this.selectdata[item.field] = this.model.data.length
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
},
|
|
322
|
-
// 关闭对话框
|
|
323
|
-
closeDevices() {
|
|
324
|
-
this.showDevices = false
|
|
325
|
-
this.devicesinfo = []
|
|
326
|
-
|
|
327
|
-
this.search()
|
|
328
|
-
}
|
|
329
|
-
},
|
|
330
|
-
events: {
|
|
331
|
-
},
|
|
332
|
-
computed: {
|
|
333
|
-
showDeleteUserInfo () {
|
|
334
|
-
return (this.selectdata.f_apply_type === '非民用报建' &&
|
|
335
|
-
(this.selectdata.defname === '报建受理' || this.selectdata.defname === '现场勘察' || this.selectdata.defname === '收费标准' || this.selectdata.defname === '报装缴费')) ||
|
|
336
|
-
(this.selectdata.f_apply_type === '设备拆除' && this.selectdata.defname === '销户')
|
|
337
|
-
},
|
|
338
|
-
disabledBut () {
|
|
339
|
-
let disabledBut = true
|
|
340
|
-
disabledBut = this.devicesinfo.every(item => {
|
|
341
|
-
if (isEmpty(item.f_devices_tonnage)) {
|
|
342
|
-
return !isEmpty(item.f_devices_type) && !isEmpty(item.f_devices_num)
|
|
343
|
-
}
|
|
344
|
-
return !isEmpty(item.f_devices_type) && !isEmpty(item.f_devices_num) && !isEmpty(item.f_devices_tonnage) && !isEmpty(item.f_devices_tonnage_unit)
|
|
345
|
-
})
|
|
346
|
-
return !disabledBut
|
|
347
|
-
},
|
|
348
|
-
// 安装人
|
|
349
|
-
installperson () {
|
|
350
|
-
return function (f_input_person) {
|
|
351
|
-
if (isEmpty(f_input_person)) {
|
|
352
|
-
return this.$login.f.name
|
|
353
|
-
}
|
|
354
|
-
return f_input_person
|
|
355
|
-
}
|
|
356
|
-
},
|
|
357
|
-
installdate() {
|
|
358
|
-
return function (f_install_date) {
|
|
359
|
-
if (isEmpty(f_install_date)) {
|
|
360
|
-
return new Date().Format('yyyy-MM-dd HH:mm:ss')
|
|
361
|
-
}
|
|
362
|
-
return f_install_date
|
|
363
|
-
}
|
|
364
|
-
},
|
|
365
|
-
devicesType() {
|
|
366
|
-
return this.$appdata.getParam("设备类型")
|
|
367
|
-
}
|
|
368
|
-
},
|
|
369
|
-
watch: {
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
</script>
|
|
373
|
-
<style scoped>
|
|
374
|
-
.textNoLineBreak {
|
|
375
|
-
white-space: nowrap;
|
|
376
|
-
}
|
|
377
|
-
.input_view{
|
|
378
|
-
background-color: #ffffff;
|
|
379
|
-
border-radius: 2px;
|
|
380
|
-
border: solid 1px #c7c7c7!important;
|
|
381
|
-
color: #333333!important;
|
|
382
|
-
font-size: 15px!important;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
.input_view[readonly]{
|
|
386
|
-
border: 1px solid #DDD!important;
|
|
387
|
-
color:#ACA899!important;
|
|
388
|
-
}
|
|
389
|
-
.input_view:disabled{
|
|
390
|
-
border: 1px solid #DDD!important;
|
|
391
|
-
color:#ACA899!important;
|
|
392
|
-
}
|
|
393
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="col-sm-12" style="margin: 20px 0px;">
|
|
3
|
+
<data-grid :model="model" v-ref:grid class="list_area table_sy" style="padding: 0px">
|
|
4
|
+
<template partial='head'>
|
|
5
|
+
<tr>
|
|
6
|
+
<th class="textNoLineBreak">序号</th>
|
|
7
|
+
<th class="textNoLineBreak">编号</th>
|
|
8
|
+
<th class="textNoLineBreak">设备数</th>
|
|
9
|
+
<th class="textNoLineBreak">
|
|
10
|
+
<button
|
|
11
|
+
type="button"
|
|
12
|
+
class="btn btn-info head-but"
|
|
13
|
+
@click="$parent.$parent.openDevicesModal()"
|
|
14
|
+
:disabled="$parent.$parent.mark === 1"
|
|
15
|
+
>添加</button>
|
|
16
|
+
</th>
|
|
17
|
+
</tr>
|
|
18
|
+
</template>
|
|
19
|
+
<template partial='body'>
|
|
20
|
+
<tr>
|
|
21
|
+
<td style="text-align: center;">
|
|
22
|
+
<nobr>{{$index+1}}</nobr>
|
|
23
|
+
</td>
|
|
24
|
+
<td style="text-align: center;">
|
|
25
|
+
<nobr>{{row.f_userinfo_id}}</nobr>
|
|
26
|
+
</td>
|
|
27
|
+
<td style="text-align: center;">
|
|
28
|
+
<nobr>{{row.amount}}</nobr>
|
|
29
|
+
</td>
|
|
30
|
+
<td style="text-align: center;">
|
|
31
|
+
<nobr>
|
|
32
|
+
<button
|
|
33
|
+
type="button"
|
|
34
|
+
name="button"
|
|
35
|
+
class="btn btn-link"
|
|
36
|
+
@click="$parent.$parent.openDevicesModal(row)"
|
|
37
|
+
>
|
|
38
|
+
{{$parent.$parent.mark === 1 ? '查看' : '修正'}}
|
|
39
|
+
</button>
|
|
40
|
+
<button
|
|
41
|
+
type="button" name="button" class="btn btn-link"
|
|
42
|
+
@click="$parent.$parent.deleteUserinfo(row)"
|
|
43
|
+
v-if="$parent.$parent.showDeleteUserInfo"
|
|
44
|
+
:disabled="$parent.$parent.mark === 1"
|
|
45
|
+
>
|
|
46
|
+
删除
|
|
47
|
+
</button>
|
|
48
|
+
</nobr>
|
|
49
|
+
</td>
|
|
50
|
+
</tr>
|
|
51
|
+
</template>
|
|
52
|
+
</data-grid>
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
<modal v-if="showDevices" :show.sync="showDevices" v-ref:modal :large="true" :backdrop="false" title="表具设备信息">
|
|
56
|
+
<header slot="modal-header" class="modal-header">
|
|
57
|
+
<button type="button" class="close" @click="closeDevices"><span>×</span></button>
|
|
58
|
+
<h4 class="modal-title">表具设备信息</h4>
|
|
59
|
+
</header>
|
|
60
|
+
<article slot="modal-body" class="modal-body clearfix">
|
|
61
|
+
<div v-for="(i, item) in devicesinfo" class="form-group col-sm-12 panel panel-info">
|
|
62
|
+
<div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
|
|
63
|
+
<div class="col-sm-6 text-left">设备{{$index+1}}信息</div>
|
|
64
|
+
<div class="col-sm-6 text-right"><button
|
|
65
|
+
class="button_delete button_spacing"
|
|
66
|
+
v-if="!item.id && mark !== 1"
|
|
67
|
+
@click.prevent="deleteDevicesinfo(i)"
|
|
68
|
+
>删除</button></div>
|
|
69
|
+
<div class="col-sm-6 text-right"><button
|
|
70
|
+
class="button_delete button_spacing"
|
|
71
|
+
v-if="item.id && showDeleteUserInfo && mark !== 1"
|
|
72
|
+
@click.prevent="deleteDevices(item.id)"
|
|
73
|
+
>删除</button></div>
|
|
74
|
+
</div>
|
|
75
|
+
<div class="form-group col-sm-6" :class="[!item.f_devices_type ? 'has-error' : '']">
|
|
76
|
+
<label class="col-sm-4 control-label">设备类型:</label>
|
|
77
|
+
<div class="col-sm-8">
|
|
78
|
+
<input-select
|
|
79
|
+
class="select select_list"
|
|
80
|
+
:value.sync="item.f_devices_type"
|
|
81
|
+
v-model="item.f_devices_type"
|
|
82
|
+
:options="devicesType"
|
|
83
|
+
:disable="mark === 1"
|
|
84
|
+
:valueSingle="true"></input-select>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
<div class="form-group col-sm-6">
|
|
88
|
+
<label class="col-sm-4 control-label">设备编号:</label>
|
|
89
|
+
<div class="col-sm-8">
|
|
90
|
+
<input class="form-control input_view" style=""
|
|
91
|
+
placeholder="设备编号"
|
|
92
|
+
v-model="item.f_devices_no"
|
|
93
|
+
:value="item.f_devices_no"
|
|
94
|
+
:readonly="mark === 1"/>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
<div class="form-group col-sm-6">
|
|
98
|
+
<label class="col-sm-4 control-label">设备品牌:</label>
|
|
99
|
+
<div class="col-sm-8">
|
|
100
|
+
<input class="form-control input_view" style=""
|
|
101
|
+
placeholder="设备品牌"
|
|
102
|
+
v-model="item.f_brand"
|
|
103
|
+
:value="item.f_brand"
|
|
104
|
+
:readonly="mark === 1"/>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
<div class="form-group col-sm-6">
|
|
108
|
+
<label class="col-sm-4 control-label">设备型号:</label>
|
|
109
|
+
<div class="col-sm-8">
|
|
110
|
+
<input class="form-control input_view" style=""
|
|
111
|
+
placeholder="设备型号"
|
|
112
|
+
v-model="item.f_devices_model"
|
|
113
|
+
:value="item.f_devices_model"
|
|
114
|
+
:readonly="mark === 1"/>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
<div class="form-group col-sm-6" :class="[!item.f_devices_num ? 'has-error' : '']">
|
|
118
|
+
<label class="col-sm-4 control-label">设备数量:</label>
|
|
119
|
+
<div class="col-sm-8">
|
|
120
|
+
<input class="form-control input_view" style="" type="number"
|
|
121
|
+
placeholder="设备数量"
|
|
122
|
+
v-model="item.f_devices_num"
|
|
123
|
+
:value="item.f_devices_num"
|
|
124
|
+
:readonly="mark === 1"/>
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
<div class="form-group col-sm-6">
|
|
128
|
+
<label class="col-sm-4 control-label">设备功率:</label>
|
|
129
|
+
<div class="col-sm-8">
|
|
130
|
+
<input class="form-control input_view" style=""
|
|
131
|
+
placeholder="设备功率"
|
|
132
|
+
type="number"
|
|
133
|
+
v-model="item.f_devices_tonnage"
|
|
134
|
+
:value="item.f_devices_tonnage"
|
|
135
|
+
:readonly="mark === 1"/>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
<div class="form-group col-sm-6">
|
|
139
|
+
<label class="col-sm-4 control-label">安装日期:</label>
|
|
140
|
+
<div class="col-sm-8">
|
|
141
|
+
<input class="form-control input_view" style=""
|
|
142
|
+
placeholder="安装日期"
|
|
143
|
+
v-model="item.f_install_date"
|
|
144
|
+
:value="installdate(item.f_install_date)"
|
|
145
|
+
readonly/>
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
<div class="form-group col-sm-6" :class="[item.f_devices_tonnage && !item.f_devices_tonnage_unit ? 'has-error' : '']">
|
|
149
|
+
<label class="col-sm-4 control-label">功率单位:</label>
|
|
150
|
+
<div class="col-sm-8">
|
|
151
|
+
<input class="form-control input_view" style=""
|
|
152
|
+
placeholder="功率单位"
|
|
153
|
+
v-model="item.f_devices_tonnage_unit"
|
|
154
|
+
:value="item.f_devices_tonnage_unit"
|
|
155
|
+
:readonly="mark === 1"/>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
|
|
160
|
+
</article>
|
|
161
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
162
|
+
<template v-if="mark !== 1">
|
|
163
|
+
<button type="button" class="btn btn-primary" @click="pushDevice()">添加设备</button>
|
|
164
|
+
<button type="button" class="btn btn-primary" @click="addDevice(device)" :disabled="disabledBut">确认</button>
|
|
165
|
+
</template>
|
|
166
|
+
</footer>
|
|
167
|
+
</modal>
|
|
168
|
+
</div>
|
|
169
|
+
</template>
|
|
170
|
+
<script>
|
|
171
|
+
import {getNowDate,isEmpty} from '../../../Util'
|
|
172
|
+
import {PagedList} from 'vue-client'
|
|
173
|
+
import Vue from 'vue'
|
|
174
|
+
import {HttpResetClass} from 'vue-client'
|
|
175
|
+
// Date格式化
|
|
176
|
+
Date.prototype.Format = function (fmt) {
|
|
177
|
+
var o = {
|
|
178
|
+
'M+': this.getMonth() + 1, // 月份
|
|
179
|
+
'd+': this.getDate(), // 日
|
|
180
|
+
'H+': this.getHours(), // 小时
|
|
181
|
+
'm+': this.getMinutes(), // 分
|
|
182
|
+
's+': this.getSeconds(), // 秒
|
|
183
|
+
'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
|
|
184
|
+
'S': this.getMilliseconds() // 毫秒
|
|
185
|
+
}
|
|
186
|
+
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
|
|
187
|
+
for (var k in o) {
|
|
188
|
+
if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
|
|
189
|
+
}
|
|
190
|
+
return fmt
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export default {
|
|
194
|
+
title: '设备管理',
|
|
195
|
+
props: {
|
|
196
|
+
selectdata: {
|
|
197
|
+
type: Object
|
|
198
|
+
},
|
|
199
|
+
mark: {
|
|
200
|
+
type: Number,
|
|
201
|
+
default: 0
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
data () {
|
|
205
|
+
return {
|
|
206
|
+
model: {
|
|
207
|
+
data: null
|
|
208
|
+
},
|
|
209
|
+
devicesinfo: [],
|
|
210
|
+
device: '',
|
|
211
|
+
showDevices: false
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
ready () {
|
|
215
|
+
this.search()
|
|
216
|
+
},
|
|
217
|
+
methods: {
|
|
218
|
+
async deleteUserinfo (row) {
|
|
219
|
+
let res = await this.$showMessage('此操作不可撤回,您确定要删除这条记录吗?')
|
|
220
|
+
if (res === 'cancel') {
|
|
221
|
+
return
|
|
222
|
+
}
|
|
223
|
+
let data = {
|
|
224
|
+
login: this.$login.f,
|
|
225
|
+
userinfo: row,
|
|
226
|
+
selectdata: this.selectdata
|
|
227
|
+
}
|
|
228
|
+
res = await this.$resetpost('rs/logic/applyDeleteUserinfo', {data:data}, {
|
|
229
|
+
resolveMsg: null,
|
|
230
|
+
rejectMsg: '删除失败!!!'
|
|
231
|
+
})
|
|
232
|
+
|
|
233
|
+
this.$dispatch('breakControl', this.selectdata)
|
|
234
|
+
},
|
|
235
|
+
async deleteDevices (index) {
|
|
236
|
+
this.$resetdelete(`rs/entity/t_devices`, {id: index}, {
|
|
237
|
+
resolveMsg: '删除成功',
|
|
238
|
+
rejectMsg: '删除失败'
|
|
239
|
+
}).then(async (res) => { //发送请求
|
|
240
|
+
let data = {
|
|
241
|
+
old_id: index
|
|
242
|
+
}
|
|
243
|
+
let res1 = await this.$resetpost(
|
|
244
|
+
`rs/logic/applydeleteDevice`,
|
|
245
|
+
{data: data},
|
|
246
|
+
{resolveMsg: null, rejectMsg: '设备添加失败!!!'}
|
|
247
|
+
)
|
|
248
|
+
|
|
249
|
+
this.$dispatch('breakControl', this.selectdata)
|
|
250
|
+
})
|
|
251
|
+
},
|
|
252
|
+
deleteDevicesinfo (index) {
|
|
253
|
+
this.devicesinfo.splice(index, 1)
|
|
254
|
+
},
|
|
255
|
+
async addDevice (row) {
|
|
256
|
+
if(this.devicesinfo.length > 0) {
|
|
257
|
+
let data = {
|
|
258
|
+
selectdata: this.selectdata,
|
|
259
|
+
devicesinfo: this.devicesinfo,
|
|
260
|
+
user: this.$login.f,
|
|
261
|
+
f_userinfo_id: row ? row.f_userinfo_id : ''
|
|
262
|
+
}
|
|
263
|
+
let res = await this.$resetpost(
|
|
264
|
+
`rs/logic/applyAddDevice`,
|
|
265
|
+
{data: data},
|
|
266
|
+
{resolveMsg: null, rejectMsg: '设备添加失败!!!'}
|
|
267
|
+
)
|
|
268
|
+
}
|
|
269
|
+
this.$dispatch('breakControl', this.selectdata)
|
|
270
|
+
},
|
|
271
|
+
pushDevice () {
|
|
272
|
+
this.devicesinfo.push({})
|
|
273
|
+
},
|
|
274
|
+
async openDevicesModal (row) {
|
|
275
|
+
this.device = ''
|
|
276
|
+
if (row) {
|
|
277
|
+
this.device = row
|
|
278
|
+
let data = {
|
|
279
|
+
tablename: 't_devices',
|
|
280
|
+
condition: `f_userinfo_id = '${row.f_userinfo_id}'`
|
|
281
|
+
}
|
|
282
|
+
let http = new HttpResetClass()
|
|
283
|
+
let res = await http.load(
|
|
284
|
+
'POST',
|
|
285
|
+
`rs/sql/applySingleTable`,
|
|
286
|
+
{data: data},
|
|
287
|
+
{resolveMsg: null, rejectMsg: '设备查询失败!!!'}
|
|
288
|
+
)
|
|
289
|
+
this.devicesinfo = res.data
|
|
290
|
+
} else {
|
|
291
|
+
this.pushDevice()
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
this.showDevices = true
|
|
295
|
+
},
|
|
296
|
+
async search () {
|
|
297
|
+
let http = new HttpResetClass()
|
|
298
|
+
let data= {}
|
|
299
|
+
if(this.selectdata.is_modify=='是'){
|
|
300
|
+
data = {
|
|
301
|
+
condition: `ui.f_old_process_id = '${this.selectdata.f_process_id}' or ui.f_process_id = '${this.selectdata.f_process_id}' or ui.f_userinfo_id = '${this.selectdata.f_userinfo_id}'`
|
|
302
|
+
}
|
|
303
|
+
}else{
|
|
304
|
+
data = {
|
|
305
|
+
condition: `ui.f_old_process_id = '${this.selectdata.f_process_id}' or ui.f_process_id = '${this.selectdata.f_process_id}' `
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
let res = await http.load('POST', 'rs/sql/getUserInfoDevicesAmount', {data:data}, {
|
|
309
|
+
resolveMsg: null,
|
|
310
|
+
rejectMsg: '获取设备失败!!!'
|
|
311
|
+
})
|
|
312
|
+
this.model.data = res.data
|
|
313
|
+
|
|
314
|
+
// 更改安装处数
|
|
315
|
+
for (const item of this.selectdata.fields) {
|
|
316
|
+
if (item.label === '安装处数') {
|
|
317
|
+
item.value = this.model.data.length
|
|
318
|
+
this.selectdata[item.field] = this.model.data.length
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
// 关闭对话框
|
|
323
|
+
closeDevices() {
|
|
324
|
+
this.showDevices = false
|
|
325
|
+
this.devicesinfo = []
|
|
326
|
+
|
|
327
|
+
this.search()
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
events: {
|
|
331
|
+
},
|
|
332
|
+
computed: {
|
|
333
|
+
showDeleteUserInfo () {
|
|
334
|
+
return (this.selectdata.f_apply_type === '非民用报建' &&
|
|
335
|
+
(this.selectdata.defname === '报建受理' || this.selectdata.defname === '现场勘察' || this.selectdata.defname === '收费标准' || this.selectdata.defname === '报装缴费')) ||
|
|
336
|
+
(this.selectdata.f_apply_type === '设备拆除' && this.selectdata.defname === '销户')
|
|
337
|
+
},
|
|
338
|
+
disabledBut () {
|
|
339
|
+
let disabledBut = true
|
|
340
|
+
disabledBut = this.devicesinfo.every(item => {
|
|
341
|
+
if (isEmpty(item.f_devices_tonnage)) {
|
|
342
|
+
return !isEmpty(item.f_devices_type) && !isEmpty(item.f_devices_num)
|
|
343
|
+
}
|
|
344
|
+
return !isEmpty(item.f_devices_type) && !isEmpty(item.f_devices_num) && !isEmpty(item.f_devices_tonnage) && !isEmpty(item.f_devices_tonnage_unit)
|
|
345
|
+
})
|
|
346
|
+
return !disabledBut
|
|
347
|
+
},
|
|
348
|
+
// 安装人
|
|
349
|
+
installperson () {
|
|
350
|
+
return function (f_input_person) {
|
|
351
|
+
if (isEmpty(f_input_person)) {
|
|
352
|
+
return this.$login.f.name
|
|
353
|
+
}
|
|
354
|
+
return f_input_person
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
installdate() {
|
|
358
|
+
return function (f_install_date) {
|
|
359
|
+
if (isEmpty(f_install_date)) {
|
|
360
|
+
return new Date().Format('yyyy-MM-dd HH:mm:ss')
|
|
361
|
+
}
|
|
362
|
+
return f_install_date
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
devicesType() {
|
|
366
|
+
return this.$appdata.getParam("设备类型")
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
watch: {
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
</script>
|
|
373
|
+
<style scoped>
|
|
374
|
+
.textNoLineBreak {
|
|
375
|
+
white-space: nowrap;
|
|
376
|
+
}
|
|
377
|
+
.input_view{
|
|
378
|
+
background-color: #ffffff;
|
|
379
|
+
border-radius: 2px;
|
|
380
|
+
border: solid 1px #c7c7c7!important;
|
|
381
|
+
color: #333333!important;
|
|
382
|
+
font-size: 15px!important;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.input_view[readonly]{
|
|
386
|
+
border: 1px solid #DDD!important;
|
|
387
|
+
color:#ACA899!important;
|
|
388
|
+
}
|
|
389
|
+
.input_view:disabled{
|
|
390
|
+
border: 1px solid #DDD!important;
|
|
391
|
+
color:#ACA899!important;
|
|
392
|
+
}
|
|
393
|
+
</style>
|