apply-clients 3.5.6-2 → 3.5.6-21

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.
Files changed (25) hide show
  1. package/build/dev-server.js +4 -4
  2. package/package.json +1 -1
  3. package/src/filiale/dingcheng/android/AppInstallationDetails.vue +477 -478
  4. package/src/filiale/dingcheng/pc/InstallationDetails.vue +607 -608
  5. package/src/filiale/fugou/android/AppDevicesManagement.vue +516 -521
  6. package/src/filiale/fugou/android/AppInstallationDetails.vue +541 -542
  7. package/src/filiale/fugou/pc/ServiceControl.vue +9 -0
  8. package/src/filiale/gongyi/pc/chargeManagement.vue +765 -765
  9. package/src/filiale/jinhuang/pc/Applybatchdispatch.vue +770 -0
  10. package/src/filiale/jinhuang/pc/ContractList.vue +222 -220
  11. package/src/filiale/jinhuang/pc/ServiceControl.vue +2016 -2016
  12. package/src/filiale/jinhuang/pc/SupervisoryList.vue +478 -459
  13. package/src/filiale/jinhuang/pc.js +2 -1
  14. package/src/filiale/shexian/android/AppServiceControl.vue +18 -1
  15. package/src/filiale/yangchunboneng/android/AppChargeManagement.vue +1 -1
  16. package/src/filiale/yangchunboneng/android/AppInstallationMaterial.vue +1 -1
  17. package/src/filiale/yangchunboneng/android/AppOtherChargeList.vue +281 -0
  18. package/src/filiale/yangchunboneng/android/AppServiceControl.vue +4 -0
  19. package/src/filiale/yangchunboneng/android.js +2 -1
  20. package/src/filiale/yangchunboneng/pc/ExplorationSelect.vue +622 -612
  21. package/src/filiale/yangchunboneng/pc/InstallInfoSelect.vue +400 -365
  22. package/src/filiale/yangchunboneng/pc/ServiceControl.vue +4 -0
  23. package/src/filiale/yangchunboneng/pc/SupervisoryList.vue +30 -3
  24. package/src/filiale/yangchunboneng/pc/chargeManagement.vue +9 -6
  25. package/src/main.js +1 -1
@@ -1,542 +1,541 @@
1
- <template>
2
- <div>
3
- <list :model="model" partial='list'>
4
- <div partial class="auto app-text panel">
5
- <div class="panel-body panel-self">
6
- <div class="row">
7
- <p class="col-xs-3 text-left font"><b>气表类型</b></p>
8
- <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_meter_classify }}</p>
9
- </div>
10
- <div class="row">
11
- <p class="col-xs-3 text-left font"><b>气表品牌</b></p>
12
- <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_gasbrand }}</p>
13
- </div>
14
- <div class="row">
15
- <p class="col-xs-3 text-left font"><b>气表型号</b></p>
16
- <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_gasmodel }}</p>
17
- </div>
18
- <div class="row">
19
- <p class="col-xs-3 text-left font"><b>表号</b></p>
20
- <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_meternumber }}</p>
21
- </div>
22
- <div class="row">
23
- <p class="col-xs-3 text-left font"><b>安装位置</b></p>
24
- <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_position }}</p>
25
- </div>
26
- <div class="row">
27
- <p class="col-xs-3 text-left font"><b>安装人</b></p>
28
- <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_install_person }}</p>
29
- </div>
30
- <div class="row">
31
- <p class="col-xs-3 text-left font"><b>安装时间</b></p>
32
- <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_install_date }}</p>
33
- </div>
34
- <div class="row text-right">
35
- <button class="btn btn-info"
36
- :disabled="(row.f_cumulative_payment_money < $parent.$parent.selectdata.f_price && ($parent.$parent.selectdata.f_apply_type === '散户集体报建' || $parent.$parent.selectdata.f_apply_type === '煤改气报建')) || $parent.$parent.mark === 1"
37
- @click.prevent="$parent.$parent.showUserFileModal(row)">
38
- {{row.f_userfiles_num > 0 ? '修正' : '添加'}}
39
- </button>
40
- </div>
41
- </div>
42
- </div>
43
- </list>
44
-
45
- <modal v-if="showUserFile" :show.sync="showUserFile" v-ref:modal :large="true" :backdrop="false" title="安装明细" width="100%">
46
- <header slot="modal-header" class="modal-header">
47
- <button type="button" class="close" @click="closeUserFile"><span>&times;</span></button>
48
- <h4 class="modal-title">安装明细</h4>
49
- </header>
50
- <article slot="modal-body" class="modal-body clearfix">
51
- <!-- <div class="form-group row vertical-center">
52
- <label class="col-xs-4 control-label">地址信息:</label>
53
- <div class="col-xs-8">
54
- <input class="form-control input_view" style=""
55
- v-model="useradders.f_address"
56
- :value="useradders.f_address"
57
- :readonly="true"/>
58
- </div>
59
- </div>-->
60
-
61
- <div v-for="(i, item) in userinfo.userfiles" class="form-group col-xs-12 panel panel-info">
62
- <div class="panel-heading head row" style="background-color: #e8f4ff;margin-bottom: 10px">
63
- <div class="col-xs-6 text-left">表具{{$index+1}}信息</div>
64
- <div class="col-xs-6 text-right">
65
- <svg @click="scanCode()" style="width: 25px;height: 25px;margin-right: 10px" t="1636095770822" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2457" width="64" height="64">
66
- <path d="M928.016126 543.908618 95.983874 543.908618c-17.717453 0-31.994625-14.277171-31.994625-31.994625S78.26642 479.919368 95.983874 479.919368l832.032253 0c17.717453 0 31.994625 14.277171 31.994625 31.994625S945.73358 543.908618 928.016126 543.908618z" p-id="2458"></path>
67
- <path d="M832.032253 928.016126 639.892491 928.016126c-17.717453 0-31.994625-14.277171-31.994625-31.994625s14.277171-31.994625 31.994625-31.994625l191.967747 0c17.717453 0 31.994625-14.277171 31.994625-31.994625l0-159.973123c0-17.717453 14.277171-31.994625 31.994625-31.994625s31.994625 14.277171 31.994625 31.994625l0 159.973123C928.016126 884.840585 884.840585 928.016126 832.032253 928.016126z" p-id="2459"></path>
68
- <path d="M351.94087 928.016126l-159.973123 0c-52.980346 0-95.983874-43.003528-95.983874-95.983874l0-159.973123c0-17.717453 14.277171-31.994625 31.994625-31.994625S159.973123 654.341676 159.973123 672.05913l0 159.973123c0 17.717453 14.449185 31.994625 31.994625 31.994625l159.973123 0c17.717453 0 31.994625 14.277171 31.994625 31.994625C383.935495 913.738955 369.658324 928.016126 351.94087 928.016126z" p-id="2460"></path>
69
- <path d="M127.978498 383.935495c-17.717453 0-31.994625-14.277171-31.994625-31.994625l0-159.973123c0-52.980346 43.003528-95.983874 95.983874-95.983874l159.973123 0c17.717453 0 31.994625 14.277171 31.994625 31.994625S369.658324 159.973123 351.94087 159.973123l-159.973123 0c-17.545439 0-31.994625 14.449185-31.994625 31.994625l0 159.973123C159.973123 369.658324 145.695952 383.935495 127.978498 383.935495z" p-id="2461"></path>
70
- <path d="M896.021502 383.935495c-17.717453 0-31.994625-14.277171-31.994625-31.994625l0-159.973123c0-17.545439-14.277171-31.994625-31.994625-31.994625L639.892491 159.973123c-17.717453 0-31.994625-14.277171-31.994625-31.994625s14.277171-31.994625 31.994625-31.994625l191.967747 0c52.980346 0 95.983874 43.003528 95.983874 95.983874l0 159.973123C928.016126 369.658324 913.738955 383.935495 896.021502 383.935495z" p-id="2462"></path>
71
- </svg>
72
- </div>
73
- </div>
74
- <div class="form-group row vertical-center" :class="item.f_gasbrand_id ? '':'has-error'">
75
- <label class="col-xs-4 control-label">气表品牌:</label>
76
- <div class="col-xs-8">
77
- <input-select
78
- class="select select_list"
79
- :value.sync="item.gasbrand"
80
- v-model="item.gasbrand"
81
- :options="meterbrands"
82
- @change="gasbrandChange(i)"
83
- :valueSingle="true"></input-select>
84
- </div>
85
- </div>
86
- <div class="form-group row vertical-center" :class="item.f_gasmodel_id ? '':'has-error'">
87
- <label class="col-xs-4 control-label">气表型号:</label>
88
- <div class="col-xs-8">
89
- <input-select
90
- class="select select_list"
91
- :value.sync="item.gasmodel"
92
- v-model="item.gasmodel"
93
- :options="item.gasbrand.gasmodel"
94
- @change="gasmodelChange(i)"
95
- :valueSingle="true"></input-select>
96
- </div>
97
- </div>
98
- <div class="form-group row vertical-center" :class="item.f_meternumber ? '':'has-error'">
99
- <label class="col-xs-4 control-label">表&emsp;&emsp;号:</label>
100
- <div class="col-xs-8">
101
- <input class="form-control input_view" style=""
102
- placeholder="表号"
103
- v-model="item.f_meternumber"
104
- type="number"
105
- οnkeyup="this.value=this.value.replace(/\s+/g,'')"
106
- :value="item.f_meternumber"
107
- @change="meternumberValidate(i)"
108
- :readonly="false"/>
109
- </div>
110
- </div>
111
- <div class="form-group row vertical-center">
112
- <label class="col-xs-4 control-label ">表&ensp;封&ensp;号:</label>
113
- <div class="col-xs-8">
114
- <input class="form-control input_view" style=""
115
- placeholder="表封号"
116
- v-model="item.f_metertitles"
117
- :value="item.f_metertitles"
118
- :readonly="false"/>
119
- </div>
120
- </div>
121
- <div class="form-group row vertical-center">
122
- <label class="col-xs-4 control-label ">防盗卡号1:</label>
123
- <div class="col-xs-8">
124
- <input class="form-control input_view" style=""
125
- placeholder="防盗卡号1"
126
- v-model="item.f_defendcard"
127
- :value="item.f_defendcard"
128
- :readonly="false"/>
129
- </div>
130
- </div>
131
- <div class="form-group row vertical-center">
132
- <label class="col-xs-4 control-label ">防盗卡号2:</label>
133
- <div class="col-xs-8">
134
- <input class="form-control input_view" style=""
135
- placeholder="防盗卡号2"
136
- v-model="item.f_defendcard_two"
137
- :value="item.f_defendcard_two"
138
- :readonly="false"/>
139
- </div>
140
- </div>
141
- <div class="form-group row vertical-center">
142
- <label class="col-xs-4 control-label">表&ensp;读&ensp;数:</label>
143
- <div class="col-xs-8">
144
- <input class="form-control input_view" style=""
145
- type="number"
146
- placeholder="表读数"
147
- v-model="item.f_meter_base"
148
- :value="item.f_meter_base"
149
- :readonly="false"/>
150
- </div>
151
- </div>
152
- <div class="form-group row vertical-center">
153
- <label class="col-xs-4 control-label">初始底数:</label>
154
- <div class="col-xs-8">
155
- <input class="form-control input_view" style=""
156
- type="number"
157
- v-model="item.f_initial_base"
158
- :value="item.f_initial_base"
159
- placeholder="初始底数"
160
- :readonly="false"/>
161
- </div>
162
- </div>
163
- <div class="form-group row vertical-center">
164
- <label class="col-xs-4 control-label">表&emsp;&emsp;向:</label>
165
- <div class="col-xs-8">
166
- <input-select
167
- class="select select_list"
168
- :value.sync="item.f_aroundmeter"
169
- v-model="item.f_aroundmeter"
170
- :options="aroundmeters"
171
- :valueSingle="true"></input-select>
172
- </div>
173
- </div>
174
- <div class="form-group row vertical-center">
175
- <label class="col-xs-4 control-label">安装位置:</label>
176
- <div class="col-xs-8">
177
- <input-select
178
- class="select select_list"
179
- :value.sync="item.f_position"
180
- v-model="item.f_position"
181
- :options="positions"
182
- :valueSingle="true"></input-select>
183
- </div>
184
- </div>
185
- <div class="form-group row vertical-center">
186
- <label class="col-xs-4 control-label">安&ensp;装&ensp;人:</label>
187
- <div class="col-xs-8">
188
- <input class="form-control input_view" style=""
189
- v-model="item.f_install_person"
190
- :value.sync="installperson(item.f_install_person)"
191
- placeholder="安装人"
192
- />
193
- <!-- <input-select-->
194
- <!-- class="select select_list"-->
195
- <!-- :value.sync="item.f_install_person"-->
196
- <!-- v-model="item.f_install_person"-->
197
- <!-- :options="installperson"-->
198
- <!-- :valueSingle="true"></input-select>-->
199
- </div>
200
- </div>
201
- <div class="form-group row vertical-center">
202
- <label class="col-xs-4 control-label">安装日期:</label>
203
- <div class="col-xs-8">
204
- <!-- <input class="form-control input_view" style=""
205
- v-model="item.f_install_date"
206
- :value.sync="installdate(item.f_install_date)"
207
- placeholder="安装日期"
208
- />-->
209
- <datepicker
210
- placeholder="安装日期"
211
- :value.sync="item.f_install_date"
212
- v-model="item.f_install_date"
213
- format="yyyy-MM-dd"
214
- :default="true"
215
- :show-reset-button="reset">
216
- </datepicker>
217
- </div>
218
- </div>
219
- <div class="form-group row vertical-center">
220
- <label class="col-xs-4 control-label">生产日期:</label>
221
- <div class="col-xs-8">
222
- <!-- <input class="form-control input_view" style=""
223
- v-model="item.f_factory_date"
224
- :value.sync="installdate(item.f_factory_date)"
225
- placeholder="生产日期"
226
- />-->
227
- <datepicker
228
- placeholder="安装日期"
229
- :value.sync="item.f_factory_date"
230
- v-model="item.f_factory_date"
231
- format="yyyy-MM-dd"
232
- :default="true"
233
- :show-reset-button="reset">
234
- </datepicker>
235
- </div>
236
- </div>
237
- </div>
238
-
239
- </article>
240
- <footer slot="modal-footer" class="modal-footer">
241
- <!-- 去除一户多表 -->
242
- <button type="button" class="btn btn-primary" @click="addUserFile" v-if="false">添加表具</button>
243
- <button type="button" class="btn btn-primary" @click="saveUserFile">确认</button>
244
- </footer>
245
- </modal>
246
- </div>
247
-
248
- </template>
249
- <script>
250
- import Vue from 'vue'
251
- import {PagedList} from 'vue-client'
252
- import {HttpResetClass} from 'vue-client'
253
- import {isEmpty} from '../../../components/Util'
254
- // Date格式化
255
- Date.prototype.Format = function (fmt) {
256
- var o = {
257
- 'M+': this.getMonth() + 1, // 月份
258
- 'd+': this.getDate(), // 日
259
- 'H+': this.getHours(), // 小时
260
- 'm+': this.getMinutes(), // 分
261
- 's+': this.getSeconds(), // 秒
262
- 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
263
- 'S': this.getMilliseconds() // 毫秒
264
- }
265
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
266
- for (var k in o) {
267
- if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
268
- }
269
- return fmt
270
- }
271
-
272
- export default {
273
- title: '安装明细',
274
- props: {
275
- selectdata: {
276
- type: Object
277
- },
278
- mark: {
279
- type: Number,
280
- default: 0
281
- }
282
- },
283
- data () {
284
- return {
285
- showUserFile: false,
286
- model: {
287
- rows: null
288
- },
289
- meterbrands: [], // 气表品牌
290
- useradders: null,
291
- userinfo: {}
292
- }
293
- },
294
- ready () {
295
- this.search()
296
- this.getMeterbrands()
297
- },
298
- methods: {
299
- async scanCode () {
300
- console.log('===============扫码===================')
301
- HostApp.__this__ = this,
302
- HostApp.scanCode({callback: "javascript:HostApp.__this__.getCode();"})
303
- await this.getCode()
304
- },
305
- async getCode () {
306
- let code = HostApp.getCode().data;
307
- this.userinfo.userfiles[0].f_meternumber = code
308
- },
309
- // 删除未保存的表具
310
- async deleteUserFile (index) {
311
- this.userinfo.userfiles.splice(index, 1)
312
- },
313
- // 追加表具
314
- addUserFile() {
315
- this.userinfo.userfiles.push({})
316
- },
317
- // 保存档案
318
- async saveUserFile() {
319
- // 检查必填项
320
- for (let i = 0; i < this.userinfo.userfiles.length; i++) {
321
- let userfile = this.userinfo.userfiles[i]
322
- if (userfile.f_gasbrand_id === null || userfile.f_gasbrand_id === '') {
323
- this.$showMessage(`表具${i+1}气表品牌没有选择!!!`)
324
- return
325
- }
326
- if (userfile.f_gasmodel_id === null || userfile.f_gasmodel_id === '') {
327
- this.$showMessage(`表具${i+1}气表型号没有选择!!!`)
328
- return
329
- }
330
- if (userfile.f_meternumber === null || userfile.f_meternumber === '') {
331
- this.$showMessage(`表具${i+1}表号没有填写!!!`)
332
- return
333
- }
334
- }
335
- let data = {
336
- // user: {"f_show_department_name":"","parentname":"营业厅","functions":[{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","parentname":"客服系统","icon":"/images/lefticon/档案管理.png","hasright":false,"resourcetype":"function","parentid":"27","children":[{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","parentname":"档案管理","link":"address-manage","hasright":true,"resourcetype":"function","parentid":"212","children":[],"selfid":"33664","name":"地址管理","templatename":"functionedit","id":"33663","position":"5","fullname":"资源管理.功能模块.客服系统.档案管理.地址管理","fullid":"3.21.27.212.33663","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","parentname":"档案管理","link":"file-user-files","hasright":true,"resourcetype":"function","parentid":"212","children":[],"selfid":"237","name":"用户档案","templatename":"functionedit","id":"236","position":"8","fullname":"资源管理.功能模块.客服系统.档案管理.用户档案","fullid":"3.21.27.212.236","tablename":"t_function"}],"selfid":"213","name":"档案管理","templatename":"functionedit","id":"212","position":"2","fullname":"资源管理.功能模块.客服系统.档案管理","fullid":"3.21.27.212","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","parentname":"客服系统","icon":"/images/lefticon/综合业务.png","hasright":false,"resourcetype":"function","parentid":"27","children":[{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","parentname":"综合业务","link":"param-manage","hasright":true,"resourcetype":"function","parentid":"284","children":[],"selfid":"303","name":"参数管理","templatename":"functionedit","id":"302","position":"3","fullname":"资源管理.功能模块.客服系统.综合业务.参数管理","fullid":"3.21.27.284.302","tablename":"t_function"}],"selfid":"285","name":"综合业务","templatename":"functionedit","id":"284","position":"5","fullname":"资源管理.功能模块.客服系统.综合业务","fullid":"3.21.27.284","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"客服系统","icon":"/images/lefticon/报建系统.png","hasright":true,"resourcetype":"function","parentid":"27","f_parentname":"客服系统","children":[{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"报建业务","link":"install-function","hasright":true,"resourcetype":"function","parentid":"34673","f_parentname":"报建业务","children":[],"selfid":"34680","name":"功能业务","templatename":"functionedit","id":"34679","position":"1","fullname":"资源管理.功能模块.客服系统.报建业务.功能业务","fullid":"3.21.27.34673.34679","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"报建业务","link":"exploration-user","hasright":true,"resourcetype":"function","parentid":"34673","f_parentname":"报建业务","children":[],"selfid":"34686","name":"流程业务","templatename":"functionedit","id":"34685","position":"2","fullname":"资源管理.功能模块.客服系统.报建业务.流程业务","fullid":"3.21.27.34673.34685","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"报建业务","link":"supervisory-control","hasright":true,"resourcetype":"function","parentid":"34673","f_parentname":"报建业务","children":[],"selfid":"34692","name":"流程监控","templatename":"functionedit","id":"34691","position":"3","fullname":"资源管理.功能模块.客服系统.报建业务.流程监控","fullid":"3.21.27.34673.34691","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"报建业务","link":"apply-charge-search","hasright":true,"resourcetype":"function","parentid":"34673","f_parentname":"报建业务","children":[],"selfid":"34698","name":"收费明细","templatename":"functionedit","id":"34697","position":"4","fullname":"资源管理.功能模块.客服系统.报建业务.收费明细","fullid":"3.21.27.34673.34697","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"报建业务","link":"order-apply","hasright":true,"resourcetype":"function","parentid":"34673","f_parentname":"报建业务","children":[],"selfid":"34704","name":"预约申请","templatename":"functionedit","id":"34703","position":"5","fullname":"资源管理.功能模块.客服系统.报建业务.预约申请","fullid":"3.21.27.34673.34703","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"报建业务","link":"stop-apply","hasright":true,"resourcetype":"function","parentid":"34673","f_parentname":"报建业务","children":[],"selfid":"34710","name":"终止报建","templatename":"functionedit","id":"34709","position":"6","fullname":"资源管理.功能模块.客服系统.报建业务.终止报建","fullid":"3.21.27.34673.34709","tablename":"t_function"}],"selfid":"34674","name":"报建业务","templatename":"functionedit","id":"34673","position":"11","fullname":"资源管理.功能模块.客服系统.报建业务","fullid":"3.21.27.34673","tablename":"t_function"}],"qrcode":"/rs/user/getQRcode?QRCODE=406b-1630284429661-03197","rolesnames":"营业厅报装,设计部报装,市场部报装,工程部报装,运营部报装,财务部报装","roles":"34751,34757,34763,34769,34775,35326","f_sex":"男","f_icon":"tree_user","fullnames":"河南亿星集团实业有限公司.周口市天然气有限公司.营业厅.报建测试","dir":"zhoukou","userid":"406b-1630284429661-03197","accesstime":"1630409418399","parentid":"34715","f_show_rolestr":"","fullids":"30463.10101.34715.34781.","number":"10101","f_idnumber":{},"selfid":"34782","templatename":"useredit","logindate":"2021-08-30 16:36:39","id":"34781","state":"在职","tablename":"t_user","deptype":"部门","depids":"34715","loginid":"15","imgid":{},"f_user_telephone":{},"rolestr":"营业厅报装,设计部报装,市场部报装,工程部报装,运营部报装,财务部报装","deps":"营业厅","loginnum":"0","f_age":{},"resourcetype":"user","orgid":"10101","f_department_name":"营业厅","ename":"bjcs","deleted":"false","entitytype":"t_user","f_description":{},"loginip":"192.168.66.138","name":"报建测试","position":"1","orgs":"周口市天然气有限公司","f_role_name":"营业厅报装 设计部报装 市场部报装 工程部报装 运营部报装 财务部报装 ","f_allArea":[],"f_gasman":[],"lics":[]},
337
- user: Vue.user,
338
- useradders: this.useradders,
339
- userinfo: this.userinfo,
340
- selectdata: this.selectdata
341
- }
342
- let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/addInstallationDetails`, {data:data}, {
343
- // let res = await this.$resetpost(`rs/logic/addInstallationDetails`, {data:data}, {
344
- resolveMsg: null,
345
- rejectMsg: '表具添加失败!!!'
346
- })
347
-
348
- this.closeUserFile()
349
- this.search()
350
- // this.$dispatch('breakControl')
351
- },
352
- // 检查表号是否存在
353
- async meternumberValidate(i) {
354
- if (!this.userinfo.userfiles[i].f_gasbrand_id) {
355
- this.userinfo.userfiles[i].f_meternumber = ''
356
- this.$showMessage('请先选择气表品牌!!!')
357
- return
358
- }
359
- if (this.userinfo.userfiles[i].f_gasbrand_id && this.userinfo.userfiles[i].f_meternumber) {
360
- let data = {
361
- f_meternumber: this.userinfo.userfiles[i].f_meternumber,
362
- f_gasbrand_id: this.userinfo.userfiles[i].f_gasbrand_id
363
- }
364
- if (this.userinfo.userfiles[i].f_userfiles_id) {
365
- data.f_userfiles_id = this.userinfo.userfiles[i].f_userfiles_id
366
- }
367
- let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/meterbrandsNumberValidate`, {data:data}, {
368
- // let res = await this.$resetpost(`rs/logic/meterbrandsNumberValidate`, {data:data}, {
369
- resolveMsg: null,
370
- rejectMsg: '表号验证失败!!'
371
- })
372
- if (res.data) {
373
- this.userinfo.userfiles[i].f_meternumber = ''
374
- this.$showMessage('表号已存在!!')
375
- }
376
- }
377
- },
378
- // 选择气表型号
379
- gasmodelChange(i) {
380
- if (this.userinfo.userfiles[i].gasmodel) {
381
- this.userinfo.userfiles[i].f_gasmodel_id = this.userinfo.userfiles[i].gasmodel.id
382
- }
383
- },
384
- // 选择气表品牌
385
- gasbrandChange(i) {
386
- // 清空已保存的气表型号
387
- this.userinfo.userfiles[i].f_gasmodel_id = null
388
- this.userinfo.userfiles[i].gasmodel = null
389
-
390
- if (this.userinfo.userfiles[i].gasbrand) {
391
- // 气表品牌id
392
- this.userinfo.userfiles[i].f_gasbrand_id = this.userinfo.userfiles[i].gasbrand.id
393
- // 气表分类
394
- this.userinfo.userfiles[i].f_meter_classify = this.userinfo.userfiles[i].gasbrand.f_meter_type
395
- }
396
- },
397
- // 打开安装明细
398
- async showUserFileModal (row) {
399
- this.useradders = row
400
-
401
- let http = new HttpResetClass()
402
- let data = {
403
- condition: `f_userinfo_id='${row.f_userinfo_id}'`
404
- }
405
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/getUserinfoAndUserfiles`, {data:data}, {
406
- // let res = await http.load('POST', `rs/logic/getUserinfoAndUserfiles`, {data:data}, {
407
- resolveMsg: null,
408
- rejectMsg: null
409
- })
410
-
411
- this.userinfo = res.data
412
-
413
- // 已有表具的 气表信息补充
414
- for (let i = 0; i < this.userinfo.userfiles.length; i++) {
415
- for (const item of this.meterbrands) {
416
- if (item.value.id === this.userinfo.userfiles[i].f_gasbrand_id) {
417
- // this.userinfo.userfiles[i].gasbrand = item.value // 防止双向绑定失败
418
- Vue.set(this.userinfo.userfiles[i], 'gasbrand', item.value)
419
- }
420
- }
421
- if (this.userinfo.userfiles[i].gasbrand) {
422
- for (const item of this.userinfo.userfiles[i].gasbrand.gasmodel) {
423
- if (item.value.id === this.userinfo.userfiles[i].f_gasmodel_id) {
424
- // this.userinfo.userfiles[i].gasmodel = item.value
425
- Vue.set(this.userinfo.userfiles[i], 'gasmodel', item.value)
426
- }
427
- }
428
- }
429
- }
430
-
431
- this.showUserFile = true
432
- },
433
- // 获取气表品牌
434
- async getMeterbrands() {
435
- let http = new HttpResetClass()
436
- let data = {
437
- f_orgid: Vue.user.orgid
438
- // f_orgid: '10101'
439
- }
440
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/getMeterbrands`, {data:data}, {
441
- // let res = await http.load('POST', `rs/logic/getMeterbrands`, {data:data}, {
442
- resolveMsg: null,
443
- rejectMsg: null
444
- })
445
- this.meterbrands = res.data
446
- },
447
- // 查询
448
- async search () {
449
- var tablestate=''
450
- if(this.selectdata.f_sub_state==='完工'){
451
- tablestate='正常'
452
- }else{
453
- tablestate='待开通'
454
- }
455
- let http = new HttpResetClass()
456
- let data = {
457
- condition: `ua.f_process_id = '${this.selectdata.f_process_id}'`,
458
- condValue : tablestate
459
- }
460
-
461
- if (this.selectdata.f_apply_type === '居民团体单户报建' || this.selectdata.f_apply_type === '其他报建' || this.selectdata.f_apply_type === '增容报建' || this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建') {
462
- data.condition = `ui.f_userinfo_id = '${this.selectdata.f_userinfo_id}'`
463
- }
464
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/getAddresAndUserinfoAndUserfilesAmount`, {data:data}, {
465
- // let res = await http.load('POST', `rs/sql/getAddresAndUserinfoAndUserfilesAmount`, {data:data}, {
466
- resolveMsg: null,
467
- rejectMsg: null
468
- })
469
- this.model.rows = res.data
470
- if (this.selectdata.f_apply_type === '居民团体用户报建') {
471
- let f_installed_households = 0
472
- for (const item of res.data) {
473
- if (item.f_userfiles_num > 0) {
474
- f_installed_households++
475
- }
476
- }
477
- let f_uninstalled_households = this.selectdata.f_apply_count - f_installed_households
478
- for (const item of this.selectdata.fields) {
479
- if (item.label === '已安装户数') {
480
- item.value = f_installed_households
481
- }
482
- if (item.label === '未安装户数') {
483
- item.value = f_uninstalled_households
484
- }
485
- }
486
- }
487
- },
488
- // 关闭安装明细
489
- closeUserFile() {
490
- this.showUserFile = false
491
- this.useradders = null
492
- this.userinfo = {}
493
- this.search()
494
- },
495
- },
496
- events: {
497
- },
498
- computed: {
499
- // 安装人
500
- installperson() {
501
- return function (f_install_person) {
502
- if (isEmpty(f_install_person)) {
503
- return Vue.user.name
504
- }
505
- return f_install_person
506
- }
507
- },
508
- installdate() {
509
- return function (f_install_date) {
510
- if (isEmpty(f_install_date)) {
511
- return new Date().Format('yyyy-MM-dd HH:mm:ss')
512
- }
513
- return f_install_date
514
- }
515
- },
516
- // 表向
517
- aroundmeters() {
518
- return this.$appdata.getParam('左右表')
519
- },
520
- // 安装位置
521
- positions() {
522
- return this.$appdata.getParam('安装位置')
523
- }
524
- },
525
- watch: {
526
- }
527
- }
528
- </script>
529
- <style scoped>
530
- .vertical-center {
531
- display: flex;
532
- align-items: center;
533
- text-align: center;
534
- }
535
- /*清除model中的浮动*/
536
- .clearfix:after,.clearfix:before{
537
- display: table;
538
- }
539
- .clearfix:after{
540
- clear: both;
541
- }
542
- </style>
1
+ <template>
2
+ <div>
3
+ <list :model="model" partial='list'>
4
+ <div partial class="auto app-text panel">
5
+ <div class="panel-body panel-self">
6
+ <div class="row">
7
+ <p class="col-xs-3 text-left font"><b>气表类型</b></p>
8
+ <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_meter_classify }}</p>
9
+ </div>
10
+ <div class="row">
11
+ <p class="col-xs-3 text-left font"><b>气表品牌</b></p>
12
+ <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_gasbrand }}</p>
13
+ </div>
14
+ <div class="row">
15
+ <p class="col-xs-3 text-left font"><b>气表型号</b></p>
16
+ <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_gasmodel }}</p>
17
+ </div>
18
+ <div class="row">
19
+ <p class="col-xs-3 text-left font"><b>表号</b></p>
20
+ <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_meternumber }}</p>
21
+ </div>
22
+ <div class="row">
23
+ <p class="col-xs-3 text-left font"><b>安装位置</b></p>
24
+ <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_position }}</p>
25
+ </div>
26
+ <div class="row">
27
+ <p class="col-xs-3 text-left font"><b>安装人</b></p>
28
+ <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_install_person }}</p>
29
+ </div>
30
+ <div class="row">
31
+ <p class="col-xs-3 text-left font"><b>安装时间</b></p>
32
+ <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_install_date }}</p>
33
+ </div>
34
+ <div class="row text-right">
35
+ <button class="btn btn-info"
36
+ :disabled="(row.f_cumulative_payment_money < $parent.$parent.selectdata.f_price && ($parent.$parent.selectdata.f_apply_type === '散户集体报建' || $parent.$parent.selectdata.f_apply_type === '煤改气报建')) || $parent.$parent.mark === 1"
37
+ @click.prevent="$parent.$parent.showUserFileModal(row)">
38
+ {{row.f_userfiles_num > 0 ? '修正' : '添加'}}
39
+ </button>
40
+ </div>
41
+ </div>
42
+ </div>
43
+ </list>
44
+
45
+ <modal v-if="showUserFile" :show.sync="showUserFile" v-ref:modal :large="true" :backdrop="false" title="安装明细" width="100%">
46
+ <header slot="modal-header" class="modal-header">
47
+ <button type="button" class="close" @click="closeUserFile"><span>&times;</span></button>
48
+ <h4 class="modal-title">安装明细</h4>
49
+ </header>
50
+ <article slot="modal-body" class="modal-body clearfix">
51
+ <!-- <div class="form-group row vertical-center">
52
+ <label class="col-xs-4 control-label">地址信息:</label>
53
+ <div class="col-xs-8">
54
+ <input class="form-control input_view" style=""
55
+ v-model="useradders.f_address"
56
+ :value="useradders.f_address"
57
+ :readonly="true"/>
58
+ </div>
59
+ </div>-->
60
+
61
+ <div v-for="(i, item) in userinfo.userfiles" class="form-group col-xs-12 panel panel-info">
62
+ <div class="panel-heading head row" style="background-color: #e8f4ff;margin-bottom: 10px">
63
+ <div class="col-xs-6 text-left">表具{{$index+1}}信息</div>
64
+ <div class="col-xs-6 text-right">
65
+ <svg @click="scanCode()" style="width: 25px;height: 25px;margin-right: 10px" t="1636095770822" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2457" width="64" height="64">
66
+ <path d="M928.016126 543.908618 95.983874 543.908618c-17.717453 0-31.994625-14.277171-31.994625-31.994625S78.26642 479.919368 95.983874 479.919368l832.032253 0c17.717453 0 31.994625 14.277171 31.994625 31.994625S945.73358 543.908618 928.016126 543.908618z" p-id="2458"></path>
67
+ <path d="M832.032253 928.016126 639.892491 928.016126c-17.717453 0-31.994625-14.277171-31.994625-31.994625s14.277171-31.994625 31.994625-31.994625l191.967747 0c17.717453 0 31.994625-14.277171 31.994625-31.994625l0-159.973123c0-17.717453 14.277171-31.994625 31.994625-31.994625s31.994625 14.277171 31.994625 31.994625l0 159.973123C928.016126 884.840585 884.840585 928.016126 832.032253 928.016126z" p-id="2459"></path>
68
+ <path d="M351.94087 928.016126l-159.973123 0c-52.980346 0-95.983874-43.003528-95.983874-95.983874l0-159.973123c0-17.717453 14.277171-31.994625 31.994625-31.994625S159.973123 654.341676 159.973123 672.05913l0 159.973123c0 17.717453 14.449185 31.994625 31.994625 31.994625l159.973123 0c17.717453 0 31.994625 14.277171 31.994625 31.994625C383.935495 913.738955 369.658324 928.016126 351.94087 928.016126z" p-id="2460"></path>
69
+ <path d="M127.978498 383.935495c-17.717453 0-31.994625-14.277171-31.994625-31.994625l0-159.973123c0-52.980346 43.003528-95.983874 95.983874-95.983874l159.973123 0c17.717453 0 31.994625 14.277171 31.994625 31.994625S369.658324 159.973123 351.94087 159.973123l-159.973123 0c-17.545439 0-31.994625 14.449185-31.994625 31.994625l0 159.973123C159.973123 369.658324 145.695952 383.935495 127.978498 383.935495z" p-id="2461"></path>
70
+ <path d="M896.021502 383.935495c-17.717453 0-31.994625-14.277171-31.994625-31.994625l0-159.973123c0-17.545439-14.277171-31.994625-31.994625-31.994625L639.892491 159.973123c-17.717453 0-31.994625-14.277171-31.994625-31.994625s14.277171-31.994625 31.994625-31.994625l191.967747 0c52.980346 0 95.983874 43.003528 95.983874 95.983874l0 159.973123C928.016126 369.658324 913.738955 383.935495 896.021502 383.935495z" p-id="2462"></path>
71
+ </svg>
72
+ </div>
73
+ </div>
74
+ <div class="form-group row vertical-center" :class="item.f_gasbrand_id ? '':'has-error'">
75
+ <label class="col-xs-4 control-label">气表品牌:</label>
76
+ <div class="col-xs-8">
77
+ <input-select
78
+ class="select select_list"
79
+ :value.sync="item.gasbrand"
80
+ v-model="item.gasbrand"
81
+ :options="meterbrands"
82
+ @change="gasbrandChange(i)"
83
+ :valueSingle="true"></input-select>
84
+ </div>
85
+ </div>
86
+ <div class="form-group row vertical-center" :class="item.f_gasmodel_id ? '':'has-error'">
87
+ <label class="col-xs-4 control-label">气表型号:</label>
88
+ <div class="col-xs-8">
89
+ <input-select
90
+ class="select select_list"
91
+ :value.sync="item.gasmodel"
92
+ v-model="item.gasmodel"
93
+ :options="item.gasbrand.gasmodel"
94
+ @change="gasmodelChange(i)"
95
+ :valueSingle="true"></input-select>
96
+ </div>
97
+ </div>
98
+ <div class="form-group row vertical-center" :class="item.f_meternumber ? '':'has-error'">
99
+ <label class="col-xs-4 control-label">表&emsp;&emsp;号:</label>
100
+ <div class="col-xs-8">
101
+ <input class="form-control input_view" style=""
102
+ placeholder="表号"
103
+ v-model="item.f_meternumber"
104
+ type="number"
105
+ οnkeyup="this.value=this.value.replace(/\s+/g,'')"
106
+ :value="item.f_meternumber"
107
+ @change="meternumberValidate(i)"
108
+ :readonly="false"/>
109
+ </div>
110
+ </div>
111
+ <div class="form-group row vertical-center">
112
+ <label class="col-xs-4 control-label ">表&ensp;封&ensp;号:</label>
113
+ <div class="col-xs-8">
114
+ <input class="form-control input_view" style=""
115
+ placeholder="表封号"
116
+ v-model="item.f_metertitles"
117
+ :value="item.f_metertitles"
118
+ :readonly="false"/>
119
+ </div>
120
+ </div>
121
+ <div class="form-group row vertical-center">
122
+ <label class="col-xs-4 control-label ">防盗卡号1:</label>
123
+ <div class="col-xs-8">
124
+ <input class="form-control input_view" style=""
125
+ placeholder="防盗卡号1"
126
+ v-model="item.f_defendcard"
127
+ :value="item.f_defendcard"
128
+ :readonly="false"/>
129
+ </div>
130
+ </div>
131
+ <div class="form-group row vertical-center">
132
+ <label class="col-xs-4 control-label ">防盗卡号2:</label>
133
+ <div class="col-xs-8">
134
+ <input class="form-control input_view" style=""
135
+ placeholder="防盗卡号2"
136
+ v-model="item.f_defendcard_two"
137
+ :value="item.f_defendcard_two"
138
+ :readonly="false"/>
139
+ </div>
140
+ </div>
141
+ <div class="form-group row vertical-center">
142
+ <label class="col-xs-4 control-label">表&ensp;读&ensp;数:</label>
143
+ <div class="col-xs-8">
144
+ <input class="form-control input_view" style=""
145
+ type="number"
146
+ placeholder="表读数"
147
+ v-model="item.f_meter_base"
148
+ :value="item.f_meter_base"
149
+ :readonly="false"/>
150
+ </div>
151
+ </div>
152
+ <div class="form-group row vertical-center">
153
+ <label class="col-xs-4 control-label">初始底数:</label>
154
+ <div class="col-xs-8">
155
+ <input class="form-control input_view" style=""
156
+ type="number"
157
+ v-model="item.f_initial_base"
158
+ :value="item.f_initial_base"
159
+ placeholder="初始底数"
160
+ :readonly="false"/>
161
+ </div>
162
+ </div>
163
+ <div class="form-group row vertical-center">
164
+ <label class="col-xs-4 control-label">表&emsp;&emsp;向:</label>
165
+ <div class="col-xs-8">
166
+ <input-select
167
+ class="select select_list"
168
+ :value.sync="item.f_aroundmeter"
169
+ v-model="item.f_aroundmeter"
170
+ :options="aroundmeters"
171
+ :valueSingle="true"></input-select>
172
+ </div>
173
+ </div>
174
+ <div class="form-group row vertical-center">
175
+ <label class="col-xs-4 control-label">安装位置:</label>
176
+ <div class="col-xs-8">
177
+ <input-select
178
+ class="select select_list"
179
+ :value.sync="item.f_position"
180
+ v-model="item.f_position"
181
+ :options="positions"
182
+ :valueSingle="true"></input-select>
183
+ </div>
184
+ </div>
185
+ <div class="form-group row vertical-center">
186
+ <label class="col-xs-4 control-label">安&ensp;装&ensp;人:</label>
187
+ <div class="col-xs-8">
188
+ <input class="form-control input_view" style=""
189
+ v-model="item.f_install_person"
190
+ :value.sync="installperson(item.f_install_person)"
191
+ placeholder="安装人"
192
+ />
193
+ <!-- <input-select-->
194
+ <!-- class="select select_list"-->
195
+ <!-- :value.sync="item.f_install_person"-->
196
+ <!-- v-model="item.f_install_person"-->
197
+ <!-- :options="installperson"-->
198
+ <!-- :valueSingle="true"></input-select>-->
199
+ </div>
200
+ </div>
201
+ <div class="form-group row vertical-center">
202
+ <label class="col-xs-4 control-label">安装日期:</label>
203
+ <div class="col-xs-8">
204
+ <!-- <input class="form-control input_view" style=""
205
+ v-model="item.f_install_date"
206
+ :value.sync="installdate(item.f_install_date)"
207
+ placeholder="安装日期"
208
+ />-->
209
+ <datepicker
210
+ placeholder="安装日期"
211
+ :value.sync="item.f_install_date"
212
+ v-model="item.f_install_date"
213
+ format="yyyy-MM-dd"
214
+ :default="true"
215
+ :show-reset-button="reset">
216
+ </datepicker>
217
+ </div>
218
+ </div>
219
+ <div class="form-group row vertical-center">
220
+ <label class="col-xs-4 control-label">生产日期:</label>
221
+ <div class="col-xs-8">
222
+ <!-- <input class="form-control input_view" style=""
223
+ v-model="item.f_factory_date"
224
+ :value.sync="installdate(item.f_factory_date)"
225
+ placeholder="生产日期"
226
+ />-->
227
+ <datepicker
228
+ placeholder="安装日期"
229
+ :value.sync="item.f_factory_date"
230
+ v-model="item.f_factory_date"
231
+ format="yyyy-MM-dd"
232
+ :default="true"
233
+ :show-reset-button="reset">
234
+ </datepicker>
235
+ </div>
236
+ </div>
237
+ </div>
238
+
239
+ </article>
240
+ <footer slot="modal-footer" class="modal-footer">
241
+ <!-- 去除一户多表 -->
242
+ <button type="button" class="btn btn-primary" @click="addUserFile" v-if="false">添加表具</button>
243
+ <button type="button" class="btn btn-primary" @click="saveUserFile">确认</button>
244
+ </footer>
245
+ </modal>
246
+ </div>
247
+
248
+ </template>
249
+ <script>
250
+ import Vue from 'vue'
251
+ import {PagedList} from 'vue-client'
252
+ import {HttpResetClass} from 'vue-client'
253
+ import {isEmpty} from '../../../components/Util'
254
+ // Date格式化
255
+ Date.prototype.Format = function (fmt) {
256
+ var o = {
257
+ 'M+': this.getMonth() + 1, // 月份
258
+ 'd+': this.getDate(), // 日
259
+ 'H+': this.getHours(), // 小时
260
+ 'm+': this.getMinutes(), // 分
261
+ 's+': this.getSeconds(), // 秒
262
+ 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
263
+ 'S': this.getMilliseconds() // 毫秒
264
+ }
265
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
266
+ for (var k in o) {
267
+ if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
268
+ }
269
+ return fmt
270
+ }
271
+
272
+ export default {
273
+ title: '安装明细',
274
+ props: {
275
+ selectdata: {
276
+ type: Object
277
+ },
278
+ mark: {
279
+ type: Number,
280
+ default: 0
281
+ }
282
+ },
283
+ data () {
284
+ return {
285
+ showUserFile: false,
286
+ model: {
287
+ rows: null
288
+ },
289
+ meterbrands: [], // 气表品牌
290
+ useradders: null,
291
+ userinfo: {}
292
+ }
293
+ },
294
+ ready () {
295
+ this.search()
296
+ this.getMeterbrands()
297
+ },
298
+ methods: {
299
+ async scanCode () {
300
+ console.log('===============扫码===================')
301
+ HostApp.__this__ = this,
302
+ HostApp.scanCode({callback: "javascript:HostApp.__this__.getCode();"})
303
+ await this.getCode()
304
+ },
305
+ async getCode () {
306
+ let code = HostApp.getCode().data;
307
+ this.userinfo.userfiles[0].f_meternumber = code
308
+ },
309
+ // 删除未保存的表具
310
+ async deleteUserFile (index) {
311
+ this.userinfo.userfiles.splice(index, 1)
312
+ },
313
+ // 追加表具
314
+ addUserFile() {
315
+ this.userinfo.userfiles.push({})
316
+ },
317
+ // 保存档案
318
+ async saveUserFile() {
319
+ // 检查必填项
320
+ for (let i = 0; i < this.userinfo.userfiles.length; i++) {
321
+ let userfile = this.userinfo.userfiles[i]
322
+ if (userfile.f_gasbrand_id === null || userfile.f_gasbrand_id === '') {
323
+ this.$showMessage(`表具${i+1}气表品牌没有选择!!!`)
324
+ return
325
+ }
326
+ if (userfile.f_gasmodel_id === null || userfile.f_gasmodel_id === '') {
327
+ this.$showMessage(`表具${i+1}气表型号没有选择!!!`)
328
+ return
329
+ }
330
+ if (userfile.f_meternumber === null || userfile.f_meternumber === '') {
331
+ this.$showMessage(`表具${i+1}表号没有填写!!!`)
332
+ return
333
+ }
334
+ }
335
+ let data = {
336
+ // user: {"f_show_department_name":"","parentname":"营业厅","functions":[{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","parentname":"客服系统","icon":"/images/lefticon/档案管理.png","hasright":false,"resourcetype":"function","parentid":"27","children":[{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","parentname":"档案管理","link":"address-manage","hasright":true,"resourcetype":"function","parentid":"212","children":[],"selfid":"33664","name":"地址管理","templatename":"functionedit","id":"33663","position":"5","fullname":"资源管理.功能模块.客服系统.档案管理.地址管理","fullid":"3.21.27.212.33663","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","parentname":"档案管理","link":"file-user-files","hasright":true,"resourcetype":"function","parentid":"212","children":[],"selfid":"237","name":"用户档案","templatename":"functionedit","id":"236","position":"8","fullname":"资源管理.功能模块.客服系统.档案管理.用户档案","fullid":"3.21.27.212.236","tablename":"t_function"}],"selfid":"213","name":"档案管理","templatename":"functionedit","id":"212","position":"2","fullname":"资源管理.功能模块.客服系统.档案管理","fullid":"3.21.27.212","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","parentname":"客服系统","icon":"/images/lefticon/综合业务.png","hasright":false,"resourcetype":"function","parentid":"27","children":[{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","parentname":"综合业务","link":"param-manage","hasright":true,"resourcetype":"function","parentid":"284","children":[],"selfid":"303","name":"参数管理","templatename":"functionedit","id":"302","position":"3","fullname":"资源管理.功能模块.客服系统.综合业务.参数管理","fullid":"3.21.27.284.302","tablename":"t_function"}],"selfid":"285","name":"综合业务","templatename":"functionedit","id":"284","position":"5","fullname":"资源管理.功能模块.客服系统.综合业务","fullid":"3.21.27.284","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"客服系统","icon":"/images/lefticon/报建系统.png","hasright":true,"resourcetype":"function","parentid":"27","f_parentname":"客服系统","children":[{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"报建业务","link":"install-function","hasright":true,"resourcetype":"function","parentid":"34673","f_parentname":"报建业务","children":[],"selfid":"34680","name":"功能业务","templatename":"functionedit","id":"34679","position":"1","fullname":"资源管理.功能模块.客服系统.报建业务.功能业务","fullid":"3.21.27.34673.34679","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"报建业务","link":"exploration-user","hasright":true,"resourcetype":"function","parentid":"34673","f_parentname":"报建业务","children":[],"selfid":"34686","name":"流程业务","templatename":"functionedit","id":"34685","position":"2","fullname":"资源管理.功能模块.客服系统.报建业务.流程业务","fullid":"3.21.27.34673.34685","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"报建业务","link":"supervisory-control","hasright":true,"resourcetype":"function","parentid":"34673","f_parentname":"报建业务","children":[],"selfid":"34692","name":"流程监控","templatename":"functionedit","id":"34691","position":"3","fullname":"资源管理.功能模块.客服系统.报建业务.流程监控","fullid":"3.21.27.34673.34691","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"报建业务","link":"apply-charge-search","hasright":true,"resourcetype":"function","parentid":"34673","f_parentname":"报建业务","children":[],"selfid":"34698","name":"收费明细","templatename":"functionedit","id":"34697","position":"4","fullname":"资源管理.功能模块.客服系统.报建业务.收费明细","fullid":"3.21.27.34673.34697","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"报建业务","link":"order-apply","hasright":true,"resourcetype":"function","parentid":"34673","f_parentname":"报建业务","children":[],"selfid":"34704","name":"预约申请","templatename":"functionedit","id":"34703","position":"5","fullname":"资源管理.功能模块.客服系统.报建业务.预约申请","fullid":"3.21.27.34673.34703","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"报建业务","link":"stop-apply","hasright":true,"resourcetype":"function","parentid":"34673","f_parentname":"报建业务","children":[],"selfid":"34710","name":"终止报建","templatename":"functionedit","id":"34709","position":"6","fullname":"资源管理.功能模块.客服系统.报建业务.终止报建","fullid":"3.21.27.34673.34709","tablename":"t_function"}],"selfid":"34674","name":"报建业务","templatename":"functionedit","id":"34673","position":"11","fullname":"资源管理.功能模块.客服系统.报建业务","fullid":"3.21.27.34673","tablename":"t_function"}],"qrcode":"/rs/user/getQRcode?QRCODE=406b-1630284429661-03197","rolesnames":"营业厅报装,设计部报装,市场部报装,工程部报装,运营部报装,财务部报装","roles":"34751,34757,34763,34769,34775,35326","f_sex":"男","f_icon":"tree_user","fullnames":"河南亿星集团实业有限公司.周口市天然气有限公司.营业厅.报建测试","dir":"zhoukou","userid":"406b-1630284429661-03197","accesstime":"1630409418399","parentid":"34715","f_show_rolestr":"","fullids":"30463.10101.34715.34781.","number":"10101","f_idnumber":{},"selfid":"34782","templatename":"useredit","logindate":"2021-08-30 16:36:39","id":"34781","state":"在职","tablename":"t_user","deptype":"部门","depids":"34715","loginid":"15","imgid":{},"f_user_telephone":{},"rolestr":"营业厅报装,设计部报装,市场部报装,工程部报装,运营部报装,财务部报装","deps":"营业厅","loginnum":"0","f_age":{},"resourcetype":"user","orgid":"10101","f_department_name":"营业厅","ename":"bjcs","deleted":"false","entitytype":"t_user","f_description":{},"loginip":"192.168.66.138","name":"报建测试","position":"1","orgs":"周口市天然气有限公司","f_role_name":"营业厅报装 设计部报装 市场部报装 工程部报装 运营部报装 财务部报装 ","f_allArea":[],"f_gasman":[],"lics":[]},
337
+ user: Vue.user,
338
+ useradders: this.useradders,
339
+ userinfo: this.userinfo,
340
+ selectdata: this.selectdata
341
+ }
342
+ let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/addInstallationDetails`, {data:data}, {
343
+ // let res = await this.$resetpost(`rs/logic/addInstallationDetails`, {data:data}, {
344
+ resolveMsg: null,
345
+ rejectMsg: '表具添加失败!!!'
346
+ })
347
+
348
+ this.closeUserFile()
349
+ this.search()
350
+ // this.$dispatch('breakControl')
351
+ },
352
+ // 检查表号是否存在
353
+ async meternumberValidate(i) {
354
+ if (!this.userinfo.userfiles[i].f_gasbrand_id) {
355
+ this.userinfo.userfiles[i].f_meternumber = ''
356
+ this.$showMessage('请先选择气表品牌!!!')
357
+ return
358
+ }
359
+ if (this.userinfo.userfiles[i].f_gasbrand_id && this.userinfo.userfiles[i].f_meternumber) {
360
+ let data = {
361
+ f_meternumber: this.userinfo.userfiles[i].f_meternumber,
362
+ f_gasbrand_id: this.userinfo.userfiles[i].f_gasbrand_id
363
+ }
364
+ if (this.userinfo.userfiles[i].f_userfiles_id) {
365
+ data.f_userfiles_id = this.userinfo.userfiles[i].f_userfiles_id
366
+ }
367
+ let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/meterbrandsNumberValidate`, {data:data}, {
368
+ // let res = await this.$resetpost(`rs/logic/meterbrandsNumberValidate`, {data:data}, {
369
+ resolveMsg: null,
370
+ rejectMsg: '表号验证失败!!'
371
+ })
372
+ if (res.data) {
373
+ this.userinfo.userfiles[i].f_meternumber = ''
374
+ this.$showMessage('表号已存在!!')
375
+ }
376
+ }
377
+ },
378
+ // 选择气表型号
379
+ gasmodelChange(i) {
380
+ if (this.userinfo.userfiles[i].gasmodel) {
381
+ this.userinfo.userfiles[i].f_gasmodel_id = this.userinfo.userfiles[i].gasmodel.id
382
+ }
383
+ },
384
+ // 选择气表品牌
385
+ gasbrandChange(i) {
386
+ // 清空已保存的气表型号
387
+ this.userinfo.userfiles[i].f_gasmodel_id = null
388
+ this.userinfo.userfiles[i].gasmodel = null
389
+
390
+ if (this.userinfo.userfiles[i].gasbrand) {
391
+ // 气表品牌id
392
+ this.userinfo.userfiles[i].f_gasbrand_id = this.userinfo.userfiles[i].gasbrand.id
393
+ // 气表分类
394
+ this.userinfo.userfiles[i].f_meter_classify = this.userinfo.userfiles[i].gasbrand.f_meter_type
395
+ }
396
+ },
397
+ // 打开安装明细
398
+ async showUserFileModal (row) {
399
+ this.useradders = row
400
+
401
+ let http = new HttpResetClass()
402
+ let data = {
403
+ condition: `f_userinfo_id='${row.f_userinfo_id}'`
404
+ }
405
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/getUserinfoAndUserfiles`, {data:data}, {
406
+ // let res = await http.load('POST', `rs/logic/getUserinfoAndUserfiles`, {data:data}, {
407
+ resolveMsg: null,
408
+ rejectMsg: null
409
+ })
410
+
411
+ this.userinfo = res.data
412
+
413
+ // 已有表具的 气表信息补充
414
+ for (let i = 0; i < this.userinfo.userfiles.length; i++) {
415
+ for (const item of this.meterbrands) {
416
+ if (item.value.id === this.userinfo.userfiles[i].f_gasbrand_id) {
417
+ // this.userinfo.userfiles[i].gasbrand = item.value // 防止双向绑定失败
418
+ Vue.set(this.userinfo.userfiles[i], 'gasbrand', item.value)
419
+ }
420
+ }
421
+ if (this.userinfo.userfiles[i].gasbrand) {
422
+ for (const item of this.userinfo.userfiles[i].gasbrand.gasmodel) {
423
+ if (item.value.id === this.userinfo.userfiles[i].f_gasmodel_id) {
424
+ // this.userinfo.userfiles[i].gasmodel = item.value
425
+ Vue.set(this.userinfo.userfiles[i], 'gasmodel', item.value)
426
+ }
427
+ }
428
+ }
429
+ }
430
+
431
+ this.showUserFile = true
432
+ },
433
+ // 获取气表品牌
434
+ async getMeterbrands() {
435
+ let http = new HttpResetClass()
436
+ let data = {
437
+ f_orgid: Vue.user.orgid
438
+ // f_orgid: '10101'
439
+ }
440
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/getMeterbrands`, {data:data}, {
441
+ // let res = await http.load('POST', `rs/logic/getMeterbrands`, {data:data}, {
442
+ resolveMsg: null,
443
+ rejectMsg: null
444
+ })
445
+ this.meterbrands = res.data
446
+ },
447
+ // 查询
448
+ async search () {
449
+ var tablestate=''
450
+ if(this.selectdata.f_sub_state==='完工'){
451
+ tablestate='正常'
452
+ }else{
453
+ tablestate='待开通'
454
+ }
455
+ let http = new HttpResetClass()
456
+ let data = {
457
+ condition: `ua.f_process_id = '${this.selectdata.f_process_id}'`,
458
+ condValue : tablestate
459
+ }
460
+
461
+ if (this.selectdata.f_apply_type === '居民团体单户报建' || this.selectdata.f_apply_type === '团购转散户' ||this.selectdata.f_apply_type === '其他报建' || this.selectdata.f_apply_type === '增容报建' || this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建') {
462
+ data.condition = `ui.f_userinfo_id = '${this.selectdata.f_userinfo_id}'`
463
+ }
464
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/getAddresAndUserinfoAndUserfilesAmount`, {data:data}, {
465
+ resolveMsg: null,
466
+ rejectMsg: null
467
+ })
468
+ this.model.rows = res.data
469
+ if (this.selectdata.f_apply_type === '居民团体用户报建') {
470
+ let f_installed_households = 0
471
+ for (const item of res.data) {
472
+ if (item.f_userfiles_num > 0) {
473
+ f_installed_households++
474
+ }
475
+ }
476
+ let f_uninstalled_households = this.selectdata.f_apply_count - f_installed_households
477
+ for (const item of this.selectdata.fields) {
478
+ if (item.label === '已安装户数') {
479
+ item.value = f_installed_households
480
+ }
481
+ if (item.label === '未安装户数') {
482
+ item.value = f_uninstalled_households
483
+ }
484
+ }
485
+ }
486
+ },
487
+ // 关闭安装明细
488
+ closeUserFile() {
489
+ this.showUserFile = false
490
+ this.useradders = null
491
+ this.userinfo = {}
492
+ this.search()
493
+ },
494
+ },
495
+ events: {
496
+ },
497
+ computed: {
498
+ // 安装人
499
+ installperson() {
500
+ return function (f_install_person) {
501
+ if (isEmpty(f_install_person)) {
502
+ return Vue.user.name
503
+ }
504
+ return f_install_person
505
+ }
506
+ },
507
+ installdate() {
508
+ return function (f_install_date) {
509
+ if (isEmpty(f_install_date)) {
510
+ return new Date().Format('yyyy-MM-dd HH:mm:ss')
511
+ }
512
+ return f_install_date
513
+ }
514
+ },
515
+ // 表向
516
+ aroundmeters() {
517
+ return this.$appdata.getParam('左右表')
518
+ },
519
+ // 安装位置
520
+ positions() {
521
+ return this.$appdata.getParam('安装位置')
522
+ }
523
+ },
524
+ watch: {
525
+ }
526
+ }
527
+ </script>
528
+ <style scoped>
529
+ .vertical-center {
530
+ display: flex;
531
+ align-items: center;
532
+ text-align: center;
533
+ }
534
+ /*清除model中的浮动*/
535
+ .clearfix:after,.clearfix:before{
536
+ display: table;
537
+ }
538
+ .clearfix:after{
539
+ clear: both;
540
+ }
541
+ </style>