apply-clients 3.5.5-6 → 3.5.5-7

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 (63) hide show
  1. package/build/dev-server.js +9 -5
  2. package/package.json +1 -1
  3. package/src/App.vue +25 -25
  4. package/src/apply.js +141 -141
  5. package/src/components/android/AppTakePic.vue +182 -182
  6. package/src/components/product/Function/Service/FunctionServiceControl.vue +497 -497
  7. package/src/components/product/Material/MaterialDetailed.vue +268 -268
  8. package/src/components/product/MaterialsManage/MaterialsBase.vue +181 -181
  9. package/src/components/product/MaterialsManage/MaterialsManage.vue +60 -60
  10. package/src/components/product/Process/Processes/contractModel.vue +454 -458
  11. package/src/components/product/ServiceView.vue +1028 -1028
  12. package/src/components/product/Supervisory/SupervisoryList.vue +452 -452
  13. package/src/filiale/dingcheng/pc/SupervisoryList.vue +441 -441
  14. package/src/filiale/fugou/android/AppAddMaterialScience.vue +440 -440
  15. package/src/filiale/fugou/android/AppDevicesManagement.vue +519 -519
  16. package/src/filiale/fugou/android/AppInstallationDetails.vue +541 -541
  17. package/src/filiale/fugou/android/AppServiceControl.vue +1836 -1836
  18. package/src/filiale/fugou/android/printCharge.vue +162 -162
  19. package/src/filiale/fugou/android.js +16 -16
  20. package/src/filiale/fugou/pc/ExplorationSelect.vue +525 -525
  21. package/src/filiale/fugou/pc/ServiceControl.vue +1705 -1705
  22. package/src/filiale/fugou/pc/ServiceView.vue +941 -941
  23. package/src/filiale/fugou/pc/devicesManagement.vue +483 -483
  24. package/src/filiale/fugou/pc/printChargepc.vue +148 -148
  25. package/src/filiale/fugou/pc.js +16 -17
  26. package/src/filiale/gongyi/android/AppAddMaterialScience.vue +493 -493
  27. package/src/filiale/gongyi/android/AppDisclosurerecord.vue +214 -214
  28. package/src/filiale/gongyi/android/AppInstallationDetails.vue +500 -500
  29. package/src/filiale/gongyi/android/AppLegacyIssues.vue +309 -309
  30. package/src/filiale/gongyi/android/AppSign.vue +170 -170
  31. package/src/filiale/gongyi/android/AppSupplementalAgreement.vue +298 -298
  32. package/src/filiale/gongyi/android.js +18 -18
  33. package/src/filiale/gongyi/pc/ApplyUpload.vue +371 -371
  34. package/src/filiale/gongyi/pc/PcAddLogs.vue +221 -221
  35. package/src/filiale/gongyi/pc/PcDisclosurerecord.vue +218 -218
  36. package/src/filiale/gongyi/pc/PcLegacyIssues.vue +309 -309
  37. package/src/filiale/gongyi/pc/SupervisoryServiceControl.vue +894 -894
  38. package/src/filiale/gongyi/pc/SupervisoryServiceView.vue +1005 -1005
  39. package/src/filiale/gongyi/pc/addMaterialScience.vue +575 -575
  40. package/src/filiale/gongyi/pc/chargeManagement.vue +765 -765
  41. package/src/filiale/gongyi/pc/supplementalAgreement.vue +277 -277
  42. package/src/filiale/gongyi/pc.js +24 -24
  43. package/src/filiale/hongda/pc/SupervisoryList.vue +422 -422
  44. package/src/filiale/jingyang/pc/SupervisoryList.vue +459 -459
  45. package/src/filiale/qianneng/android/AppChargeManagement.vue +686 -686
  46. package/src/filiale/qianneng/android.js +15 -15
  47. package/src/filiale/qianneng/pc/ApplyMaterialDetailed.vue +261 -261
  48. package/src/filiale/qianneng/pc/InstallFunction.vue +188 -188
  49. package/src/filiale/qianneng/pc.js +29 -29
  50. package/src/filiale/ruihua/pc/ServiceControl.vue +1966 -1966
  51. package/src/filiale/yangchunboneng/android/AppChargeManagement.vue +520 -520
  52. package/src/filiale/yangchunboneng/android/AppDevicesManagement.vue +645 -645
  53. package/src/filiale/yangchunboneng/android/AppServiceControl.vue +1703 -1703
  54. package/src/filiale/yangchunboneng/pc/ExplorationSelect.vue +547 -547
  55. package/src/filiale/yangchunboneng/pc/ServiceControl.vue +2112 -2112
  56. package/src/filiale/yangchunboneng/pc/ServiceView.vue +1007 -1007
  57. package/src/filiale/yangchunboneng/pc/SupervisoryList.vue +605 -605
  58. package/src/filiale/yangchunboneng/pc/SupervisoryListNew.vue +683 -683
  59. package/src/filiale/yangchunboneng/pc/chargeManagement.vue +1053 -1053
  60. package/src/filiale/yangchunboneng/pc/devicesManagement.vue +574 -574
  61. package/src/main.js +3 -3
  62. package/~/chatbot/main.py +57 -0
  63. package/src/filiale/fugou/pc/SupervisoryServiceControl.vue +0 -881
@@ -1,541 +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.$dispatch('breakControl')
350
- },
351
- // 检查表号是否存在
352
- async meternumberValidate(i) {
353
- if (!this.userinfo.userfiles[i].f_gasbrand_id) {
354
- this.userinfo.userfiles[i].f_meternumber = ''
355
- this.$showMessage('请先选择气表品牌!!!')
356
- return
357
- }
358
- if (this.userinfo.userfiles[i].f_gasbrand_id && this.userinfo.userfiles[i].f_meternumber) {
359
- let data = {
360
- f_meternumber: this.userinfo.userfiles[i].f_meternumber,
361
- f_gasbrand_id: this.userinfo.userfiles[i].f_gasbrand_id
362
- }
363
- if (this.userinfo.userfiles[i].f_userfiles_id) {
364
- data.f_userfiles_id = this.userinfo.userfiles[i].f_userfiles_id
365
- }
366
- let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/meterbrandsNumberValidate`, {data:data}, {
367
- // let res = await this.$resetpost(`rs/logic/meterbrandsNumberValidate`, {data:data}, {
368
- resolveMsg: null,
369
- rejectMsg: '表号验证失败!!'
370
- })
371
- if (res.data) {
372
- this.userinfo.userfiles[i].f_meternumber = ''
373
- this.$showMessage('表号已存在!!')
374
- }
375
- }
376
- },
377
- // 选择气表型号
378
- gasmodelChange(i) {
379
- if (this.userinfo.userfiles[i].gasmodel) {
380
- this.userinfo.userfiles[i].f_gasmodel_id = this.userinfo.userfiles[i].gasmodel.id
381
- }
382
- },
383
- // 选择气表品牌
384
- gasbrandChange(i) {
385
- // 清空已保存的气表型号
386
- this.userinfo.userfiles[i].f_gasmodel_id = null
387
- this.userinfo.userfiles[i].gasmodel = null
388
-
389
- if (this.userinfo.userfiles[i].gasbrand) {
390
- // 气表品牌id
391
- this.userinfo.userfiles[i].f_gasbrand_id = this.userinfo.userfiles[i].gasbrand.id
392
- // 气表分类
393
- this.userinfo.userfiles[i].f_meter_classify = this.userinfo.userfiles[i].gasbrand.f_meter_type
394
- }
395
- },
396
- // 打开安装明细
397
- async showUserFileModal (row) {
398
- this.useradders = row
399
-
400
- let http = new HttpResetClass()
401
- let data = {
402
- condition: `f_userinfo_id='${row.f_userinfo_id}'`
403
- }
404
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/getUserinfoAndUserfiles`, {data:data}, {
405
- // let res = await http.load('POST', `rs/logic/getUserinfoAndUserfiles`, {data:data}, {
406
- resolveMsg: null,
407
- rejectMsg: null
408
- })
409
-
410
- this.userinfo = res.data
411
-
412
- // 已有表具的 气表信息补充
413
- for (let i = 0; i < this.userinfo.userfiles.length; i++) {
414
- for (const item of this.meterbrands) {
415
- if (item.value.id === this.userinfo.userfiles[i].f_gasbrand_id) {
416
- // this.userinfo.userfiles[i].gasbrand = item.value // 防止双向绑定失败
417
- Vue.set(this.userinfo.userfiles[i], 'gasbrand', item.value)
418
- }
419
- }
420
- if (this.userinfo.userfiles[i].gasbrand) {
421
- for (const item of this.userinfo.userfiles[i].gasbrand.gasmodel) {
422
- if (item.value.id === this.userinfo.userfiles[i].f_gasmodel_id) {
423
- // this.userinfo.userfiles[i].gasmodel = item.value
424
- Vue.set(this.userinfo.userfiles[i], 'gasmodel', item.value)
425
- }
426
- }
427
- }
428
- }
429
-
430
- this.showUserFile = true
431
- },
432
- // 获取气表品牌
433
- async getMeterbrands() {
434
- let http = new HttpResetClass()
435
- let data = {
436
- f_orgid: Vue.user.orgid
437
- // f_orgid: '10101'
438
- }
439
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/getMeterbrands`, {data:data}, {
440
- // let res = await http.load('POST', `rs/logic/getMeterbrands`, {data:data}, {
441
- resolveMsg: null,
442
- rejectMsg: null
443
- })
444
- this.meterbrands = res.data
445
- },
446
- // 查询
447
- async search () {
448
- var tablestate=''
449
- if(this.selectdata.f_sub_state==='完工'){
450
- tablestate='正常'
451
- }else{
452
- tablestate='待开通'
453
- }
454
- let http = new HttpResetClass()
455
- let data = {
456
- condition: `ua.f_process_id = '${this.selectdata.f_process_id}'`,
457
- condValue : tablestate
458
- }
459
-
460
- 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 === '工商业报警器报建') {
461
- data.condition = `ui.f_userinfo_id = '${this.selectdata.f_userinfo_id}'`
462
- }
463
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/getAddresAndUserinfoAndUserfilesAmount`, {data:data}, {
464
- // let res = await http.load('POST', `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>
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.$dispatch('breakControl')
350
+ },
351
+ // 检查表号是否存在
352
+ async meternumberValidate(i) {
353
+ if (!this.userinfo.userfiles[i].f_gasbrand_id) {
354
+ this.userinfo.userfiles[i].f_meternumber = ''
355
+ this.$showMessage('请先选择气表品牌!!!')
356
+ return
357
+ }
358
+ if (this.userinfo.userfiles[i].f_gasbrand_id && this.userinfo.userfiles[i].f_meternumber) {
359
+ let data = {
360
+ f_meternumber: this.userinfo.userfiles[i].f_meternumber,
361
+ f_gasbrand_id: this.userinfo.userfiles[i].f_gasbrand_id
362
+ }
363
+ if (this.userinfo.userfiles[i].f_userfiles_id) {
364
+ data.f_userfiles_id = this.userinfo.userfiles[i].f_userfiles_id
365
+ }
366
+ let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/meterbrandsNumberValidate`, {data:data}, {
367
+ // let res = await this.$resetpost(`rs/logic/meterbrandsNumberValidate`, {data:data}, {
368
+ resolveMsg: null,
369
+ rejectMsg: '表号验证失败!!'
370
+ })
371
+ if (res.data) {
372
+ this.userinfo.userfiles[i].f_meternumber = ''
373
+ this.$showMessage('表号已存在!!')
374
+ }
375
+ }
376
+ },
377
+ // 选择气表型号
378
+ gasmodelChange(i) {
379
+ if (this.userinfo.userfiles[i].gasmodel) {
380
+ this.userinfo.userfiles[i].f_gasmodel_id = this.userinfo.userfiles[i].gasmodel.id
381
+ }
382
+ },
383
+ // 选择气表品牌
384
+ gasbrandChange(i) {
385
+ // 清空已保存的气表型号
386
+ this.userinfo.userfiles[i].f_gasmodel_id = null
387
+ this.userinfo.userfiles[i].gasmodel = null
388
+
389
+ if (this.userinfo.userfiles[i].gasbrand) {
390
+ // 气表品牌id
391
+ this.userinfo.userfiles[i].f_gasbrand_id = this.userinfo.userfiles[i].gasbrand.id
392
+ // 气表分类
393
+ this.userinfo.userfiles[i].f_meter_classify = this.userinfo.userfiles[i].gasbrand.f_meter_type
394
+ }
395
+ },
396
+ // 打开安装明细
397
+ async showUserFileModal (row) {
398
+ this.useradders = row
399
+
400
+ let http = new HttpResetClass()
401
+ let data = {
402
+ condition: `f_userinfo_id='${row.f_userinfo_id}'`
403
+ }
404
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/getUserinfoAndUserfiles`, {data:data}, {
405
+ // let res = await http.load('POST', `rs/logic/getUserinfoAndUserfiles`, {data:data}, {
406
+ resolveMsg: null,
407
+ rejectMsg: null
408
+ })
409
+
410
+ this.userinfo = res.data
411
+
412
+ // 已有表具的 气表信息补充
413
+ for (let i = 0; i < this.userinfo.userfiles.length; i++) {
414
+ for (const item of this.meterbrands) {
415
+ if (item.value.id === this.userinfo.userfiles[i].f_gasbrand_id) {
416
+ // this.userinfo.userfiles[i].gasbrand = item.value // 防止双向绑定失败
417
+ Vue.set(this.userinfo.userfiles[i], 'gasbrand', item.value)
418
+ }
419
+ }
420
+ if (this.userinfo.userfiles[i].gasbrand) {
421
+ for (const item of this.userinfo.userfiles[i].gasbrand.gasmodel) {
422
+ if (item.value.id === this.userinfo.userfiles[i].f_gasmodel_id) {
423
+ // this.userinfo.userfiles[i].gasmodel = item.value
424
+ Vue.set(this.userinfo.userfiles[i], 'gasmodel', item.value)
425
+ }
426
+ }
427
+ }
428
+ }
429
+
430
+ this.showUserFile = true
431
+ },
432
+ // 获取气表品牌
433
+ async getMeterbrands() {
434
+ let http = new HttpResetClass()
435
+ let data = {
436
+ f_orgid: Vue.user.orgid
437
+ // f_orgid: '10101'
438
+ }
439
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/getMeterbrands`, {data:data}, {
440
+ // let res = await http.load('POST', `rs/logic/getMeterbrands`, {data:data}, {
441
+ resolveMsg: null,
442
+ rejectMsg: null
443
+ })
444
+ this.meterbrands = res.data
445
+ },
446
+ // 查询
447
+ async search () {
448
+ var tablestate=''
449
+ if(this.selectdata.f_sub_state==='完工'){
450
+ tablestate='正常'
451
+ }else{
452
+ tablestate='待开通'
453
+ }
454
+ let http = new HttpResetClass()
455
+ let data = {
456
+ condition: `ua.f_process_id = '${this.selectdata.f_process_id}'`,
457
+ condValue : tablestate
458
+ }
459
+
460
+ 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 === '工商业报警器报建') {
461
+ data.condition = `ui.f_userinfo_id = '${this.selectdata.f_userinfo_id}'`
462
+ }
463
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/getAddresAndUserinfoAndUserfilesAmount`, {data:data}, {
464
+ // let res = await http.load('POST', `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>