apply-clients 3.5.4-7 → 3.5.4-71

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 (105) hide show
  1. package/build/dev-server.js +7 -11
  2. package/package.json +2 -2
  3. package/src/App.vue +25 -25
  4. package/src/apply.js +2 -3
  5. package/src/applyAndroid.js +2 -0
  6. package/src/assets//344/270/213/350/275/275.png +0 -0
  7. package/src/components/android/AppCheckTakePic.vue +168 -0
  8. package/src/components/android/Process/AppServiceControl.vue +4 -0
  9. package/src/components/android/Process/Processes/AppAddMaterialScience.vue +493 -493
  10. package/src/components/android/Process/Processes/AppChargeManagementNew.vue +637 -0
  11. package/src/components/android/Process/Processes/AppInstallationDetails.vue +480 -480
  12. package/src/components/image/dxf.png +0 -0
  13. package/src/components/product/Function/Service/FunctionServiceControl.vue +1 -1
  14. package/src/components/product/Material/MaterialDetailed.vue +1 -1
  15. package/src/components/product/MaterialsManage/MaterialsBase.vue +5 -1
  16. package/src/components/product/MaterialsManage/MaterialsManage.vue +2 -2
  17. package/src/components/product/PcZhihuanManagement.vue +160 -0
  18. package/src/components/product/Process/ExplorationSelect.vue +4 -1
  19. package/src/components/product/Process/ExplorationUser.vue +1 -0
  20. package/src/components/product/Process/Processes/addMaterialScience.vue +471 -471
  21. package/src/components/product/Process/Processes/chargeManagement.vue +1 -1
  22. package/src/components/product/ServiceView.vue +22 -1
  23. package/src/components/product/Supervisory/SupervisoryControl.vue +141 -140
  24. package/src/components/product/Supervisory/SupervisoryList.vue +452 -452
  25. package/src/filiale/baiyin/android/AppServiceControl.vue +1762 -0
  26. package/src/filiale/baiyin/android/ByAddMaterialScience.vue +823 -0
  27. package/src/filiale/baiyin/android/ByDeviceManagement.vue +916 -0
  28. package/src/filiale/baiyin/android.js +8 -0
  29. package/src/filiale/fugou/android/AppAddMaterialScience.vue +442 -0
  30. package/src/filiale/fugou/android/AppChargeManagement.vue +126 -12
  31. package/src/filiale/fugou/android/AppDevicesManagement.vue +519 -0
  32. package/src/filiale/fugou/android/AppInstallationDetails.vue +541 -0
  33. package/src/filiale/fugou/android/AppServiceControl.vue +21 -4
  34. package/src/filiale/fugou/android/AppZhihuanManagement.vue +191 -0
  35. package/src/filiale/fugou/android.js +6 -1
  36. package/src/filiale/fugou/pc/ExplorationSelect.vue +515 -0
  37. package/src/filiale/fugou/pc/InstallationDetails.vue +44 -32
  38. package/src/filiale/fugou/pc/ServiceControl.vue +124 -379
  39. package/src/filiale/fugou/pc/addMaterialScience.vue +482 -0
  40. package/src/filiale/fugou/pc/devicesManagement.vue +483 -0
  41. package/src/filiale/fugou/pc.js +4 -1
  42. package/src/filiale/gongyi/android/AppAddMaterialScience.vue +20 -8
  43. package/src/filiale/gongyi/android/AppDisclosurerecord.vue +214 -0
  44. package/src/filiale/gongyi/android/AppInstallationDetails.vue +15 -10
  45. package/src/filiale/gongyi/android/AppLegacyIssues.vue +309 -0
  46. package/src/filiale/gongyi/android/AppSign.vue +16 -3
  47. package/src/filiale/gongyi/android/AppSupplementalAgreement.vue +298 -0
  48. package/src/filiale/gongyi/android.js +3 -0
  49. package/src/filiale/gongyi/pc/ApplyUpload.vue +31 -39
  50. package/src/filiale/gongyi/pc/PcAddLogs.vue +12 -4
  51. package/src/filiale/gongyi/pc/PcDisclosurerecord.vue +218 -0
  52. package/src/filiale/gongyi/pc/PcLegacyIssues.vue +309 -0
  53. package/src/filiale/gongyi/pc/SupervisoryServiceControl.vue +1 -1
  54. package/src/filiale/gongyi/pc/SupervisoryServiceView.vue +1005 -0
  55. package/src/filiale/gongyi/pc/addMaterialScience.vue +43 -7
  56. package/src/filiale/gongyi/pc/chargeManagement.vue +765 -0
  57. package/src/filiale/gongyi/pc/supplementalAgreement.vue +277 -0
  58. package/src/filiale/gongyi/pc.js +6 -1
  59. package/src/filiale/hongda/pc/SupervisoryList.vue +13 -0
  60. package/src/filiale/jinhuang/pc/ServiceControl.vue +1925 -0
  61. package/src/filiale/jinhuang/pc/chargeManagementNew.vue +589 -0
  62. package/src/filiale/jinhuang/pc.js +7 -0
  63. package/src/filiale/qianneng/android/AppChargeManagement.vue +686 -0
  64. package/src/filiale/qianneng/android/AppExplorationUser.vue +38 -0
  65. package/src/filiale/qianneng/android/AppInstallationDetails.vue +20 -11
  66. package/src/filiale/qianneng/android.js +2 -1
  67. package/src/filiale/qianneng/pc/ApplyUpload.vue +5 -4
  68. package/src/filiale/qianneng/pc/Applybatchdispatch.vue +11 -6
  69. package/src/filiale/qianneng/pc/Applydetail.vue +0 -5
  70. package/src/filiale/qianneng/pc/InstallFunction.vue +2 -2
  71. package/src/filiale/qianneng/pc/InstallationDetails.vue +32 -4
  72. package/src/filiale/qianneng/pc/ServiceControl.vue +1 -0
  73. package/src/filiale/qianneng/pc/printactivatecard.vue +6 -6
  74. package/src/filiale/ruihua/pc/InstallationDetails.vue +610 -610
  75. package/src/filiale/ruihua/pc/ServiceControl.vue +20 -0
  76. package/src/filiale/ruihua/pc/printVentilation.vue +21 -6
  77. package/src/filiale/ruihua/pc.js +12 -12
  78. package/src/filiale/shexian/android/AppServiceControl.vue +12 -2
  79. package/src/filiale/shexian/android/AppTakePic.vue +15 -55
  80. package/src/filiale/siyangRH/android/AppAddMaterialScience.vue +0 -2
  81. package/src/filiale/siyangRH/pc/chargeManagement.vue +810 -0
  82. package/src/filiale/siyangRH/pc.js +1 -0
  83. package/src/filiale/yangchunboneng/android/AppChargeManagement.vue +16 -1
  84. package/src/filiale/yangchunboneng/android/AppDevicesManagement.vue +32 -2
  85. package/src/filiale/yangchunboneng/android/AppExplorationUser.vue +518 -506
  86. package/src/filiale/yangchunboneng/android/AppInstallationMaterial.vue +1083 -1092
  87. package/src/filiale/yangchunboneng/android/AppServiceControl.vue +34 -1
  88. package/src/filiale/yangchunboneng/android/AppSuperServiceControl.vue +1524 -1524
  89. package/src/filiale/yangchunboneng/android/AppUpload.vue +205 -136
  90. package/src/filiale/yangchunboneng/android/MaterIialOne.vue +156 -144
  91. package/src/filiale/yangchunboneng/android.js +20 -20
  92. package/src/filiale/yangchunboneng/pc/ApplyUpload.vue +392 -375
  93. package/src/filiale/yangchunboneng/pc/ExplorationSelect.vue +59 -19
  94. package/src/filiale/yangchunboneng/pc/ExplorationUser.vue +191 -0
  95. package/src/filiale/yangchunboneng/pc/InstallInfoSelect.vue +365 -365
  96. package/src/filiale/yangchunboneng/pc/ServiceControl.vue +206 -2
  97. package/src/filiale/yangchunboneng/pc/SupervisoryControlNew.vue +142 -0
  98. package/src/filiale/yangchunboneng/pc/SupervisoryList.vue +590 -535
  99. package/src/filiale/yangchunboneng/pc/SupervisoryListNew.vue +628 -0
  100. package/src/filiale/yangchunboneng/pc/SupervisoryServiceControl.vue +902 -0
  101. package/src/filiale/yangchunboneng/pc/SupervisoryServiceControlNew.vue +901 -0
  102. package/src/filiale/yangchunboneng/pc/SupervisoryServiceView.vue +1117 -0
  103. package/src/filiale/yangchunboneng/pc/chargeManagement.vue +111 -13
  104. package/src/filiale/yangchunboneng/pc.js +24 -18
  105. package/src/main.js +1 -1
@@ -1,610 +1,610 @@
1
- <template>
2
- <work-busy :is-busy="showWork" v-show="showWork"></work-busy>
3
-
4
- <div class="col-sm-12" style="margin: 20px 0px;">
5
- <criteria-paged :model="model" v-ref:cp :pager="pager">
6
- <criteria partial='criteria' @condition-changed='$parent.searchCondition' v-ref:cri>
7
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
8
- </div>
9
- </criteria>
10
- <data-grid :model="model" v-ref:grid partial='list' class="list_area table_sy" style="padding: 0px">
11
- <template partial='head'>
12
- <tr>
13
- <th>序号</th>
14
- <th>客户编号</th>
15
- <th>客户名称</th>
16
- <th>客户电话</th>
17
- <th>地址信息</th>
18
- <th v-if="$parent.$parent.$parent.selectdata.f_apply_type === '团购报建'">备注</th>
19
- <th>表具数量</th>
20
- <th>
21
- <template v-if="$parent.$parent.$parent.selectdata.f_apply_type === '团购报建'">
22
- <button type="button" class="btn btn-info head-but" v-if="$parent.$parent.$parent.mark === 0"
23
- @click="$parent.$parent.$parent.showFile = !$parent.$parent.$parent.showFile">导入</button>
24
- <a type="button" class="btn btn-info head-but" v-if="$parent.$parent.$parent.mark === 0"
25
- href="/apply/download/excel/安装明细.xlsx" download>模板下载</a>
26
- <export-excel :data="$parent.$parent.$parent.getCondition"
27
- :field="$parent.$parent.$parent.getfield"
28
- sqlurl="rs/logic/applyExportfile"
29
- sql-name="getInstallableAddress"
30
- template-name='可安装地址'
31
- btn-name="导出可安装"
32
- :choose-col="true"></export-excel>
33
- </template>
34
- </th>
35
- </tr>
36
- </template>
37
- <template partial='body'>
38
- <tr>
39
- <td style="text-align: center;">
40
- <nobr>{{$index+1}}</nobr>
41
- </td>
42
- <td style="text-align: center;">
43
- <nobr>{{row.f_userinfo_code}}</nobr>
44
- </td>
45
- <td style="text-align: center;">
46
- <nobr>{{row.f_user_name}}</nobr>
47
- </td>
48
- <td style="text-align: center;">
49
- <nobr>{{row.f_user_phone}}</nobr>
50
- </td>
51
- <td style="text-align: center;">
52
- <nobr>{{row.f_address}}</nobr>
53
- </td>
54
- <th v-if="$parent.$parent.$parent.selectdata.f_apply_type === '团购报建'">
55
- <nobr>{{row.f_userinfo_comments}}</nobr>
56
- </th>
57
- <td style="text-align: center;">
58
- <nobr>{{row.f_userfiles_num === null ? 0 : row.f_userfiles_num}}</nobr>
59
- </td>
60
- <td style="text-align: center;">
61
- <nobr>
62
- <button
63
- type="button" name="button" class="btn btn-link"
64
- :disabled="row.f_cumulative_payment_money < $parent.$parent.$parent.selectdata.f_price && $parent.$parent.$parent.selectdata.f_apply_type !== '开发商集体报建'"
65
- @click="$parent.$parent.$parent.showUserFileModal(row)">
66
- {{$parent.$parent.$parent.mark === 1 ? '查看' : row.f_userfiles_num > 0 ? '修正' : '添加'}}
67
- </button>
68
- </nobr>
69
- </td>
70
- </tr>
71
- </template>
72
- </data-grid>
73
- </criteria-paged>
74
- </div>
75
- <modal v-if="showFile" :show.sync="showFile" v-ref:modal :backdrop="false" title="选择文件">
76
- <header slot="modal-header" class="modal-header">
77
- <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
78
- <h4 class="modal-title">选择文件</h4>
79
- </header>
80
- <article slot="modal-body" class="modal-body">
81
- <div class="form-group">
82
- <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" v-ref:file></file-upload>
83
- </div>
84
- </article>
85
- <footer slot="modal-footer" class="modal-footer"></footer>
86
- </modal>
87
-
88
- <modal v-if="showUserFile" :show.sync="showUserFile" v-ref:modal :large="true" :backdrop="false" title="安装明细">
89
- <header slot="modal-header" class="modal-header">
90
- <button type="button" class="close" @click="closeUserFile"><span>&times;</span></button>
91
- <h4 class="modal-title">安装明细</h4>
92
- </header>
93
- <article slot="modal-body" class="modal-body clearfix">
94
- <div class="form-group col-sm-12">
95
- <label class="col-sm-2 control-label">地址信息:</label>
96
- <div class="col-sm-10">
97
- <input class="form-control input_view" style=""
98
- v-model="useradders.f_address"
99
- :value="useradders.f_address"
100
- :readonly="true"/>
101
- </div>
102
- </div>
103
-
104
- <div v-for="(i, item) in userinfo.userfiles" class="form-group col-sm-12 panel panel-info">
105
- <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
106
- <div class="col-sm-6 text-left">表具{{$index+1}}信息</div>
107
- <div class="col-sm-6 text-right"><button
108
- class="button_delete button_spacing"
109
- v-if="!item.f_userfiles_id"
110
- @click.prevent="deleteUserFile(i)"
111
- >删除</button></div>
112
- </div>
113
- <div class="form-group col-sm-6" :class="[item.gasbrand ? '' : 'has-error']">
114
- <label class="col-sm-4 control-label">气表品牌:</label>
115
- <div class="col-sm-8">
116
- <input-select
117
- class="select select_list"
118
- :value.sync="item.gasbrand"
119
- v-model="item.gasbrand"
120
- :options="meterbrands"
121
- @change="gasbrandChange(i)"
122
- :disable="mark === 1"
123
- :valueSingle="true"></input-select>
124
- </div>
125
- </div>
126
- <div class="form-group col-sm-6" :class="[item.gasmodel ? '' : 'has-error']">
127
- <label class="col-sm-4 control-label">气表型号:</label>
128
- <div class="col-sm-8">
129
- <input-select
130
- class="select select_list"
131
- :value.sync="item.gasmodel"
132
- v-model="item.gasmodel"
133
- :options.sync="item.gasbrand.gasmodel"
134
- @change="gasmodelChange(i)"
135
- :disable="mark === 1"
136
- :valueSingle="true"></input-select>
137
- </div>
138
- </div>
139
- <div class="form-group col-sm-6" :class="[item.f_meternumber ? '' : 'has-error']">
140
- <label class="col-sm-4 control-label">表&emsp;&emsp;号:</label>
141
- <div class="col-sm-8">
142
- <input class="form-control input_view" style=""
143
- placeholder="表号"
144
- type="number"
145
- οnkeyup="this.value=this.value.replace(/\s+/g,'')"
146
- v-model="item.f_meternumber"
147
- :value="item.f_meternumber"
148
- @change="meternumberValidate(i)"
149
- :readonly="mark === 1"/>
150
- </div>
151
- </div>
152
- <div class="form-group col-sm-6">
153
- <label class="col-sm-4 control-label">表&ensp;封&ensp;号:</label>
154
- <div class="col-sm-8">
155
- <input class="form-control input_view" style=""
156
- placeholder="表封号"
157
- v-model="item.f_metertitles"
158
- :value="item.f_metertitles"
159
- :readonly="mark === 1"/>
160
- </div>
161
- </div>
162
- <div class="form-group col-sm-6">
163
- <label class="col-sm-4 control-label">表&ensp;读&ensp;数:</label>
164
- <div class="col-sm-8">
165
- <input class="form-control input_view" style=""
166
- type="number"
167
- placeholder="表读数"
168
- v-model="item.f_meter_base"
169
- :value="item.f_meter_base"
170
- :readonly="mark === 1"/>
171
- </div>
172
- </div>
173
- <div class="form-group col-sm-6">
174
- <label class="col-sm-4 control-label">初始底数:</label>
175
- <div class="col-sm-8">
176
- <input class="form-control input_view" style=""
177
- type="number"
178
- v-model="item.f_initial_base"
179
- :value="item.f_initial_base"
180
- placeholder="初始底数"
181
- :readonly="mark === 1"/>
182
- </div>
183
- </div>
184
- <div class="form-group col-sm-6">
185
- <label class="col-sm-4 control-label">表&emsp;&emsp;向:</label>
186
- <div class="col-sm-8">
187
- <input-select
188
- class="select select_list"
189
- :value.sync="item.f_aroundmeter"
190
- v-model="item.f_aroundmeter"
191
- :options="aroundmeters"
192
- :disable="mark === 1"
193
- :valueSingle="true"></input-select>
194
- </div>
195
- </div>
196
- <div class="form-group col-sm-6">
197
- <label class="col-sm-4 control-label">安装位置:</label>
198
- <div class="col-sm-8">
199
- <input-select
200
- class="select select_list"
201
- :value.sync="item.f_position"
202
- v-model="item.f_position"
203
- :options="positions"
204
- :disable="mark === 1"
205
- :valueSingle="true"></input-select>
206
- </div>
207
- </div>
208
- <div class="form-group col-sm-6">
209
- <label class="col-sm-4 control-label">安&ensp;装&ensp;人:</label>
210
- <div class="col-sm-8">
211
- <input class="form-control input_view" style=""
212
- v-model="item.f_install_person"
213
- :value.sync="installperson(item.f_install_person)"
214
- placeholder="安装人"
215
- readonly/>
216
- <!-- <input-select-->
217
- <!-- class="select select_list"-->
218
- <!-- :value.sync="item.f_install_person"-->
219
- <!-- v-model="item.f_install_person"-->
220
- <!-- :options="installperson"-->
221
- <!-- :disable="mark === 1"-->
222
- <!-- :valueSingle="true"></input-select>-->
223
- </div>
224
- </div>
225
- <div class="form-group col-sm-6">
226
- <label class="col-sm-4 control-label">安装日期:</label>
227
- <div class="col-sm-8">
228
- <input class="form-control input_view" style=""
229
- v-model="item.f_install_date"
230
- :value.sync="installdate(item.f_install_date)"
231
- placeholder="安装日期"
232
- readonly/>
233
- <!-- <datepicker-->
234
- <!-- placeholder="安装日期"-->
235
- <!-- :value.sync="item.f_install_date"-->
236
- <!-- v-model="item.f_install_date"-->
237
- <!-- format="yyyy-MM-dd HH:mm:ss"-->
238
- <!-- :disabled="mark === 1"-->
239
- <!-- :show-reset-button="reset">-->
240
- <!-- </datepicker>-->
241
- </div>
242
- </div>
243
- </div>
244
-
245
- </article>
246
- <footer slot="modal-footer" class="modal-footer">
247
- <template v-if="mark !== 1">
248
- <!-- 去除一户多表 -->
249
- <button type="button" class="btn btn-primary" @click="addUserFile" v-if="false">添加表具</button>
250
- <button type="button" class="btn btn-primary" @click="saveUserFile" :disabled="!$v.valid">确认</button>
251
- </template>
252
- </footer>
253
- </modal>
254
- </template>
255
- <script>
256
- import Vue from 'vue'
257
- import {PagedList} from 'vue-client'
258
- import {HttpResetClass} from 'vue-client'
259
- import {isEmpty} from "../../../components/Util";
260
- // Date格式化
261
- Date.prototype.Format = function (fmt) {
262
- var o = {
263
- 'M+': this.getMonth() + 1, // 月份
264
- 'd+': this.getDate(), // 日
265
- 'H+': this.getHours(), // 小时
266
- 'm+': this.getMinutes(), // 分
267
- 's+': this.getSeconds(), // 秒
268
- 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
269
- 'S': this.getMilliseconds() // 毫秒
270
- }
271
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
272
- for (var k in o) {
273
- if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
274
- }
275
- return fmt
276
- }
277
-
278
- export default {
279
- title: '安装明细',
280
- props: {
281
- selectdata: {
282
- type: Object
283
- },
284
- mark: {
285
- type: Number,
286
- default: 0
287
- }
288
- },
289
- data () {
290
- return {
291
- showFile: false,
292
- showUserFile: false,
293
- model: new PagedList('rs/sql/getAddresAndUserinfoAndUserfilesAmount', 20, null),
294
- meterbrands: [], // 气表品牌
295
- useradders: null,
296
- userinfo: {},
297
- getfield: {
298
- 'f_address': '地址',
299
- 'f_user_name': '用户姓名/单位名称',
300
- 'f_meternumber': '表号',
301
- 'f_gasbrand': '气表品牌',
302
- 'f_gasmodel': '气表型号',
303
- 'f_metertitles': '表封号',
304
- 'f_meter_base': '表读数',
305
- 'f_initial_base': '初始底数',
306
- 'f_aroundmeter': '表向',
307
- 'f_user_phone': '电话',
308
- 'f_userinfo_comments': '备注',
309
- 'f_position': '安装位置',
310
- 'f_userinfo_code': '用户编号',
311
- 'f_material_name': '材料名称',
312
- 'f_material_style': '材料型号',
313
- 'f_material_price': '材料价格',
314
- 'f_material_unit': '材料单位',
315
- 'f_material_number': '材料数量'
316
- },
317
- showWork: false
318
- }
319
- },
320
- ready () {
321
- this.search()
322
- this.getMeterbrands()
323
- if (this.selectdata.f_apply_type === '团购报建') {
324
- this.notInstalled()
325
- }
326
- },
327
- methods: {
328
- // 删除未保存的表具
329
- async deleteUserFile (index) {
330
- this.userinfo.userfiles.splice(index, 1)
331
- },
332
- // 追加表具
333
- addUserFile() {
334
- this.userinfo.userfiles.push({})
335
- },
336
- // 保存档案
337
- async saveUserFile() {
338
- // 检查必填项
339
- for (let i = 0; i < this.userinfo.userfiles.length; i++) {
340
- let userfile = this.userinfo.userfiles[i]
341
- if (userfile.f_gasbrand_id === null || userfile.f_gasbrand_id === '') {
342
- this.$showMessage(`表具${i+1}气表品牌没有选择!!!`)
343
- return
344
- }
345
- if (userfile.f_gasmodel_id === null || userfile.f_gasmodel_id === '') {
346
- this.$showMessage(`表具${i+1}气表型号没有选择!!!`)
347
- return
348
- }
349
- if (userfile.f_meternumber === null || userfile.f_meternumber === '') {
350
- this.$showMessage(`表具${i+1}表号没有填写!!!`)
351
- return
352
- }
353
- }
354
- let data = {
355
- user: this.$login.f,
356
- useradders: this.useradders,
357
- userinfo: this.userinfo,
358
- selectdata: this.selectdata
359
- }
360
- let res = await this.$resetpost('rs/logic/addInstallationDetails', {data:data}, {
361
- resolveMsg: null,
362
- rejectMsg: '表具添加失败!!!'
363
- })
364
- this.$dispatch('breakControl', this.selectdata)
365
- },
366
- // 检查表号是否存在
367
- async meternumberValidate(i) {
368
- if (!this.userinfo.userfiles[i].f_gasbrand_id) {
369
- this.userinfo.userfiles[i].f_meternumber = ''
370
- this.$showAlert('请先选择气表品牌!!!', 'warning', 3000)
371
- return
372
- }
373
- if (this.userinfo.userfiles[i].f_gasbrand_id && this.userinfo.userfiles[i].f_meternumber) {
374
- let data = {
375
- f_meternumber: this.userinfo.userfiles[i].f_meternumber,
376
- f_gasbrand_id: this.userinfo.userfiles[i].f_gasbrand_id
377
- }
378
- if (this.userinfo.userfiles[i].f_userfiles_id) {
379
- data.f_userfiles_id = this.userinfo.userfiles[i].f_userfiles_id
380
- }
381
- let res = await this.$resetpost('rs/logic/meterbrandsNumberValidate', {data:data}, {
382
- resolveMsg: null,
383
- rejectMsg: '表号验证失败!!'
384
- })
385
- if (res.data) {
386
- this.userinfo.userfiles[i].f_meternumber = ''
387
- this.$showAlert('表号已存在!!', 'warning', 3000)
388
- }
389
- }
390
- },
391
- // 选择气表型号
392
- gasmodelChange(i) {
393
- if (this.userinfo.userfiles[i].gasmodel) {
394
- this.userinfo.userfiles[i].f_gasmodel_id = this.userinfo.userfiles[i].gasmodel.id
395
- }
396
- },
397
- // 选择气表品牌
398
- gasbrandChange(i) {
399
- // 清空已保存的气表型号
400
- this.userinfo.userfiles[i].f_gasmodel_id = null
401
- this.userinfo.userfiles[i].gasmodel = null
402
-
403
- if (this.userinfo.userfiles[i].gasbrand) {
404
- // 气表品牌id
405
- this.userinfo.userfiles[i].f_gasbrand_id = this.userinfo.userfiles[i].gasbrand.id
406
- // 气表分类
407
- this.userinfo.userfiles[i].f_meter_classify = this.userinfo.userfiles[i].gasbrand.f_meter_type
408
- }
409
- },
410
- // 打开安装明细
411
- async showUserFileModal (row) {
412
- this.useradders = row
413
-
414
- let http = new HttpResetClass()
415
- let data = {
416
- condition: `f_userinfo_id = '${row.f_userinfo_id}'`
417
- }
418
- let res = await http.load('POST', 'rs/logic/getUserinfoAndUserfiles', {data:data}, {
419
- resolveMsg: null,
420
- rejectMsg: null
421
- })
422
-
423
- this.userinfo = res.data
424
-
425
- // 已有表具的 气表信息补充
426
- for (let i = 0; i < this.userinfo.userfiles.length; i++) {
427
- for (const item of this.meterbrands) {
428
- if (item.value.id === this.userinfo.userfiles[i].f_gasbrand_id) {
429
- // this.userinfo.userfiles[i].gasbrand = item.value // 防止双向绑定失败
430
- Vue.set(this.userinfo.userfiles[i], 'gasbrand', item.value)
431
- }
432
- }
433
- if (this.userinfo.userfiles[i].gasbrand) {
434
- for (const item of this.userinfo.userfiles[i].gasbrand.gasmodel) {
435
- if (item.value.id === this.userinfo.userfiles[i].f_gasmodel_id) {
436
- // this.userinfo.userfiles[i].gasmodel = item.value
437
- Vue.set(this.userinfo.userfiles[i], 'gasmodel', item.value)
438
- }
439
- }
440
- }
441
- }
442
-
443
- this.showUserFile = true
444
- },
445
- // 获取气表品牌
446
- async getMeterbrands() {
447
- let http = new HttpResetClass()
448
- let data = {
449
- f_orgid: this.$login.f.orgid
450
- }
451
- let res = await http.load('POST', 'rs/logic/getMeterbrands', {data:data}, {
452
- resolveMsg: null,
453
- rejectMsg: null
454
- })
455
- this.meterbrands = res.data
456
- },
457
- async notInstalled () {
458
- let http = new HttpResetClass()
459
- let data = {
460
- condition: `ui.f_process_id = '${this.selectdata.f_process_id}' and uf.f_table_state != '待开通'`
461
- }
462
- let res = await http.load(
463
- 'POST',
464
- 'rs/sql/countApplyUserinfo',
465
- {data: data},
466
- {
467
- resolveMsg: null,
468
- rejectMsg: '安装数量查询失败!!!'
469
- })
470
-
471
- for (const item of this.selectdata.fields) {
472
- if (item.label === '已安装户数') {
473
- item.value = this.selectdata.f_apply_count - res.data[0].num
474
- }
475
- if (item.label === '未安装户数') {
476
- item.value = res.data[0].num
477
- }
478
- }
479
- },
480
- searchCondition (args) {
481
- var tablestate=''
482
- if(this.selectdata.f_sub_state==='完工'){
483
- tablestate='正常'
484
- }else{
485
- tablestate='待开通'
486
- }
487
- 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 === '通气点火') {
488
- args.condition = args.condition + `and ui.f_userinfo_id = '${this.selectdata.f_userinfo_id}'`
489
- } else {
490
- args.condition = args.condition + `and ua.f_process_id = '${this.selectdata.f_process_id}'`
491
- }
492
- this.model.search(args.condition, args.model,tablestate)
493
- },
494
- // 查询
495
- async search () {
496
- this.$refs.cp.$refs.cri.search()
497
- },
498
- // 关闭安装明细
499
- closeUserFile() {
500
- this.showUserFile = false
501
- this.useradders = null
502
- this.userinfo = {}
503
- this.search()
504
- },
505
- // 关闭文件上传对话框
506
- closeFile() {
507
- this.showWork = false
508
- this.showFile = false
509
- // 将选的文件清空
510
- this.$refs.file.$el.querySelector('input').value = ''
511
- this.search()
512
- }
513
- },
514
- events: {
515
- 'beforeFileUpload' (file) {
516
- this.showWork = true
517
- },
518
- async 'onFileUpload'(file, result) {
519
- let data = {
520
- selectdata: this.selectdata,
521
- filepath: result.f_downloadpath,
522
- user: this.$login.f
523
- }
524
- try {
525
- let res = await this.$resetpost(`rs/logic/importAddInstallationDetails`, {data: data}, {
526
- resolveMsg: null,
527
- rejectMsg: '导入失败!!!',
528
- silent: true
529
- }, 0)
530
- } catch (e) {
531
- this.closeFile()
532
- }
533
- this.$dispatch('breakControl', this.selectdata)
534
- }
535
- },
536
- computed: {
537
- pager () {
538
- return this.selectdata.f_apply_type === '团购报建'
539
- },
540
- getCondition () {
541
- let condition = `ua.f_process_id = '${this.selectdata.f_process_id}'`
542
-
543
- return {
544
- condition: condition
545
- }
546
- },
547
- // 安装人
548
- installperson() {
549
- return function (f_install_person) {
550
- if (isEmpty(f_install_person)) {
551
- return this.$login.f.name
552
- }
553
- return f_install_person
554
- }
555
- },
556
- installdate() {
557
- return function (f_install_date) {
558
- if (isEmpty(f_install_date)) {
559
- return new Date().Format('yyyy-MM-dd HH:mm:ss')
560
- }
561
- return f_install_date
562
- }
563
- },
564
- // 表向
565
- aroundmeters() {
566
- return this.$appdata.getParam('左右表')
567
- },
568
- // 安装位置
569
- positions() {
570
- return this.$appdata.getParam('安装位置')
571
- }
572
- },
573
- watch: {
574
- }
575
- }
576
- </script>
577
- <style scoped>
578
- .head-but{
579
- margin-left: 5px;
580
- height: 34px;
581
- /*background-color: #6aa6e2;*/
582
- border-radius: 4px;
583
- font-family: PingFang;
584
- color: #ffffff;
585
- }
586
- /*清除model中的浮动*/
587
- .clearfix:after,.clearfix:before{
588
- display: table;
589
- }
590
- .clearfix:after{
591
- clear: both;
592
- }
593
- .input_view{
594
- padding: 8px;
595
- background-color: #ffffff;
596
- border-radius: 2px;
597
- border: solid 1px #c7c7c7!important;
598
- color: #333333!important;
599
- font-size: 15px!important;
600
- }
601
-
602
- .input_view[readonly]{
603
- border: 1px solid #DDD!important;
604
- color:#ACA899!important;
605
- }
606
- .input_view:disabled{
607
- border: 1px solid #DDD!important;
608
- color:#ACA899!important;
609
- }
610
- </style>
1
+ <template>
2
+ <work-busy :is-busy="showWork" v-show="showWork"></work-busy>
3
+
4
+ <div class="col-sm-12" style="margin: 20px 0px;">
5
+ <criteria-paged :model="model" v-ref:cp :pager="pager">
6
+ <criteria partial='criteria' @condition-changed='$parent.searchCondition' v-ref:cri>
7
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
8
+ </div>
9
+ </criteria>
10
+ <data-grid :model="model" v-ref:grid partial='list' class="list_area table_sy" style="padding: 0px">
11
+ <template partial='head'>
12
+ <tr>
13
+ <th>序号</th>
14
+ <th>客户编号</th>
15
+ <th>客户名称</th>
16
+ <th>客户电话</th>
17
+ <th>地址信息</th>
18
+ <th v-if="$parent.$parent.$parent.selectdata.f_apply_type === '团购报建'">备注</th>
19
+ <th>表具数量</th>
20
+ <th>
21
+ <template v-if="$parent.$parent.$parent.selectdata.f_apply_type === '团购报建'">
22
+ <button type="button" class="btn btn-info head-but" v-if="$parent.$parent.$parent.mark === 0"
23
+ @click="$parent.$parent.$parent.showFile = !$parent.$parent.$parent.showFile">导入</button>
24
+ <a type="button" class="btn btn-info head-but" v-if="$parent.$parent.$parent.mark === 0"
25
+ href="/apply/download/excel/安装明细.xlsx" download>模板下载</a>
26
+ <export-excel :data="$parent.$parent.$parent.getCondition"
27
+ :field="$parent.$parent.$parent.getfield"
28
+ sqlurl="rs/logic/applyExportfile"
29
+ sql-name="getInstallableAddress"
30
+ template-name='可安装地址'
31
+ btn-name="导出可安装"
32
+ :choose-col="true"></export-excel>
33
+ </template>
34
+ </th>
35
+ </tr>
36
+ </template>
37
+ <template partial='body'>
38
+ <tr>
39
+ <td style="text-align: center;">
40
+ <nobr>{{$index+1}}</nobr>
41
+ </td>
42
+ <td style="text-align: center;">
43
+ <nobr>{{row.f_userinfo_code}}</nobr>
44
+ </td>
45
+ <td style="text-align: center;">
46
+ <nobr>{{row.f_user_name}}</nobr>
47
+ </td>
48
+ <td style="text-align: center;">
49
+ <nobr>{{row.f_user_phone}}</nobr>
50
+ </td>
51
+ <td style="text-align: center;">
52
+ <nobr>{{row.f_address}}</nobr>
53
+ </td>
54
+ <th v-if="$parent.$parent.$parent.selectdata.f_apply_type === '团购报建'">
55
+ <nobr>{{row.f_userinfo_comments}}</nobr>
56
+ </th>
57
+ <td style="text-align: center;">
58
+ <nobr>{{row.f_userfiles_num === null ? 0 : row.f_userfiles_num}}</nobr>
59
+ </td>
60
+ <td style="text-align: center;">
61
+ <nobr>
62
+ <button
63
+ type="button" name="button" class="btn btn-link"
64
+ :disabled="row.f_cumulative_payment_money < $parent.$parent.$parent.selectdata.f_price && $parent.$parent.$parent.selectdata.f_apply_type !== '开发商集体报建'"
65
+ @click="$parent.$parent.$parent.showUserFileModal(row)">
66
+ {{$parent.$parent.$parent.mark === 1 ? '查看' : row.f_userfiles_num > 0 ? '修正' : '添加'}}
67
+ </button>
68
+ </nobr>
69
+ </td>
70
+ </tr>
71
+ </template>
72
+ </data-grid>
73
+ </criteria-paged>
74
+ </div>
75
+ <modal v-if="showFile" :show.sync="showFile" v-ref:modal :backdrop="false" title="选择文件">
76
+ <header slot="modal-header" class="modal-header">
77
+ <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
78
+ <h4 class="modal-title">选择文件</h4>
79
+ </header>
80
+ <article slot="modal-body" class="modal-body">
81
+ <div class="form-group">
82
+ <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" v-ref:file></file-upload>
83
+ </div>
84
+ </article>
85
+ <footer slot="modal-footer" class="modal-footer"></footer>
86
+ </modal>
87
+
88
+ <modal v-if="showUserFile" :show.sync="showUserFile" v-ref:modal :large="true" :backdrop="false" title="安装明细">
89
+ <header slot="modal-header" class="modal-header">
90
+ <button type="button" class="close" @click="closeUserFile"><span>&times;</span></button>
91
+ <h4 class="modal-title">安装明细</h4>
92
+ </header>
93
+ <article slot="modal-body" class="modal-body clearfix">
94
+ <div class="form-group col-sm-12">
95
+ <label class="col-sm-2 control-label">地址信息:</label>
96
+ <div class="col-sm-10">
97
+ <input class="form-control input_view" style=""
98
+ v-model="useradders.f_address"
99
+ :value="useradders.f_address"
100
+ :readonly="true"/>
101
+ </div>
102
+ </div>
103
+
104
+ <div v-for="(i, item) in userinfo.userfiles" class="form-group col-sm-12 panel panel-info">
105
+ <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
106
+ <div class="col-sm-6 text-left">表具{{$index+1}}信息</div>
107
+ <div class="col-sm-6 text-right"><button
108
+ class="button_delete button_spacing"
109
+ v-if="!item.f_userfiles_id"
110
+ @click.prevent="deleteUserFile(i)"
111
+ >删除</button></div>
112
+ </div>
113
+ <div class="form-group col-sm-6" :class="[item.gasbrand ? '' : 'has-error']">
114
+ <label class="col-sm-4 control-label">气表品牌:</label>
115
+ <div class="col-sm-8">
116
+ <input-select
117
+ class="select select_list"
118
+ :value.sync="item.gasbrand"
119
+ v-model="item.gasbrand"
120
+ :options="meterbrands"
121
+ @change="gasbrandChange(i)"
122
+ :disable="mark === 1"
123
+ :valueSingle="true"></input-select>
124
+ </div>
125
+ </div>
126
+ <div class="form-group col-sm-6" :class="[item.gasmodel ? '' : 'has-error']">
127
+ <label class="col-sm-4 control-label">气表型号:</label>
128
+ <div class="col-sm-8">
129
+ <input-select
130
+ class="select select_list"
131
+ :value.sync="item.gasmodel"
132
+ v-model="item.gasmodel"
133
+ :options.sync="item.gasbrand.gasmodel"
134
+ @change="gasmodelChange(i)"
135
+ :disable="mark === 1"
136
+ :valueSingle="true"></input-select>
137
+ </div>
138
+ </div>
139
+ <div class="form-group col-sm-6" :class="[item.f_meternumber ? '' : 'has-error']">
140
+ <label class="col-sm-4 control-label">表&emsp;&emsp;号:</label>
141
+ <div class="col-sm-8">
142
+ <input class="form-control input_view" style=""
143
+ placeholder="表号"
144
+ type="number"
145
+ οnkeyup="this.value=this.value.replace(/\s+/g,'')"
146
+ v-model="item.f_meternumber"
147
+ :value="item.f_meternumber"
148
+ @change="meternumberValidate(i)"
149
+ :readonly="mark === 1"/>
150
+ </div>
151
+ </div>
152
+ <div class="form-group col-sm-6">
153
+ <label class="col-sm-4 control-label">表&ensp;封&ensp;号:</label>
154
+ <div class="col-sm-8">
155
+ <input class="form-control input_view" style=""
156
+ placeholder="表封号"
157
+ v-model="item.f_metertitles"
158
+ :value="item.f_metertitles"
159
+ :readonly="mark === 1"/>
160
+ </div>
161
+ </div>
162
+ <div class="form-group col-sm-6">
163
+ <label class="col-sm-4 control-label">表&ensp;读&ensp;数:</label>
164
+ <div class="col-sm-8">
165
+ <input class="form-control input_view" style=""
166
+ type="number"
167
+ placeholder="表读数"
168
+ v-model="item.f_meter_base"
169
+ :value="item.f_meter_base"
170
+ :readonly="mark === 1"/>
171
+ </div>
172
+ </div>
173
+ <div class="form-group col-sm-6">
174
+ <label class="col-sm-4 control-label">初始底数:</label>
175
+ <div class="col-sm-8">
176
+ <input class="form-control input_view" style=""
177
+ type="number"
178
+ v-model="item.f_initial_base"
179
+ :value="item.f_initial_base"
180
+ placeholder="初始底数"
181
+ :readonly="mark === 1"/>
182
+ </div>
183
+ </div>
184
+ <div class="form-group col-sm-6">
185
+ <label class="col-sm-4 control-label">表&emsp;&emsp;向:</label>
186
+ <div class="col-sm-8">
187
+ <input-select
188
+ class="select select_list"
189
+ :value.sync="item.f_aroundmeter"
190
+ v-model="item.f_aroundmeter"
191
+ :options="aroundmeters"
192
+ :disable="mark === 1"
193
+ :valueSingle="true"></input-select>
194
+ </div>
195
+ </div>
196
+ <div class="form-group col-sm-6">
197
+ <label class="col-sm-4 control-label">安装位置:</label>
198
+ <div class="col-sm-8">
199
+ <input-select
200
+ class="select select_list"
201
+ :value.sync="item.f_position"
202
+ v-model="item.f_position"
203
+ :options="positions"
204
+ :disable="mark === 1"
205
+ :valueSingle="true"></input-select>
206
+ </div>
207
+ </div>
208
+ <div class="form-group col-sm-6">
209
+ <label class="col-sm-4 control-label">安&ensp;装&ensp;人:</label>
210
+ <div class="col-sm-8">
211
+ <input class="form-control input_view" style=""
212
+ v-model="item.f_install_person"
213
+ :value.sync="installperson(item.f_install_person)"
214
+ placeholder="安装人"
215
+ readonly/>
216
+ <!-- <input-select-->
217
+ <!-- class="select select_list"-->
218
+ <!-- :value.sync="item.f_install_person"-->
219
+ <!-- v-model="item.f_install_person"-->
220
+ <!-- :options="installperson"-->
221
+ <!-- :disable="mark === 1"-->
222
+ <!-- :valueSingle="true"></input-select>-->
223
+ </div>
224
+ </div>
225
+ <div class="form-group col-sm-6">
226
+ <label class="col-sm-4 control-label">安装日期:</label>
227
+ <div class="col-sm-8">
228
+ <input class="form-control input_view" style=""
229
+ v-model="item.f_install_date"
230
+ :value.sync="installdate(item.f_install_date)"
231
+ placeholder="安装日期"
232
+ readonly/>
233
+ <!-- <datepicker-->
234
+ <!-- placeholder="安装日期"-->
235
+ <!-- :value.sync="item.f_install_date"-->
236
+ <!-- v-model="item.f_install_date"-->
237
+ <!-- format="yyyy-MM-dd HH:mm:ss"-->
238
+ <!-- :disabled="mark === 1"-->
239
+ <!-- :show-reset-button="reset">-->
240
+ <!-- </datepicker>-->
241
+ </div>
242
+ </div>
243
+ </div>
244
+
245
+ </article>
246
+ <footer slot="modal-footer" class="modal-footer">
247
+ <template v-if="mark !== 1">
248
+ <!-- 去除一户多表 -->
249
+ <button type="button" class="btn btn-primary" @click="addUserFile" v-if="false">添加表具</button>
250
+ <button type="button" class="btn btn-primary" @click="saveUserFile" :disabled="!$v.valid">确认</button>
251
+ </template>
252
+ </footer>
253
+ </modal>
254
+ </template>
255
+ <script>
256
+ import Vue from 'vue'
257
+ import {PagedList} from 'vue-client'
258
+ import {HttpResetClass} from 'vue-client'
259
+ import {isEmpty} from "../../../components/Util";
260
+ // Date格式化
261
+ Date.prototype.Format = function (fmt) {
262
+ var o = {
263
+ 'M+': this.getMonth() + 1, // 月份
264
+ 'd+': this.getDate(), // 日
265
+ 'H+': this.getHours(), // 小时
266
+ 'm+': this.getMinutes(), // 分
267
+ 's+': this.getSeconds(), // 秒
268
+ 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
269
+ 'S': this.getMilliseconds() // 毫秒
270
+ }
271
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
272
+ for (var k in o) {
273
+ if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
274
+ }
275
+ return fmt
276
+ }
277
+
278
+ export default {
279
+ title: '安装明细',
280
+ props: {
281
+ selectdata: {
282
+ type: Object
283
+ },
284
+ mark: {
285
+ type: Number,
286
+ default: 0
287
+ }
288
+ },
289
+ data () {
290
+ return {
291
+ showFile: false,
292
+ showUserFile: false,
293
+ model: new PagedList('rs/sql/getAddresAndUserinfoAndUserfilesAmount', 20, null),
294
+ meterbrands: [], // 气表品牌
295
+ useradders: null,
296
+ userinfo: {},
297
+ getfield: {
298
+ 'f_address': '地址',
299
+ 'f_user_name': '用户姓名/单位名称',
300
+ 'f_meternumber': '表号',
301
+ 'f_gasbrand': '气表品牌',
302
+ 'f_gasmodel': '气表型号',
303
+ 'f_metertitles': '表封号',
304
+ 'f_meter_base': '表读数',
305
+ 'f_initial_base': '初始底数',
306
+ 'f_aroundmeter': '表向',
307
+ 'f_user_phone': '电话',
308
+ 'f_userinfo_comments': '备注',
309
+ 'f_position': '安装位置',
310
+ 'f_userinfo_code': '用户编号',
311
+ 'f_material_name': '材料名称',
312
+ 'f_material_style': '材料型号',
313
+ 'f_material_price': '材料价格',
314
+ 'f_material_unit': '材料单位',
315
+ 'f_material_number': '材料数量'
316
+ },
317
+ showWork: false
318
+ }
319
+ },
320
+ ready () {
321
+ this.search()
322
+ this.getMeterbrands()
323
+ if (this.selectdata.f_apply_type === '团购报建') {
324
+ this.notInstalled()
325
+ }
326
+ },
327
+ methods: {
328
+ // 删除未保存的表具
329
+ async deleteUserFile (index) {
330
+ this.userinfo.userfiles.splice(index, 1)
331
+ },
332
+ // 追加表具
333
+ addUserFile() {
334
+ this.userinfo.userfiles.push({})
335
+ },
336
+ // 保存档案
337
+ async saveUserFile() {
338
+ // 检查必填项
339
+ for (let i = 0; i < this.userinfo.userfiles.length; i++) {
340
+ let userfile = this.userinfo.userfiles[i]
341
+ if (userfile.f_gasbrand_id === null || userfile.f_gasbrand_id === '') {
342
+ this.$showMessage(`表具${i+1}气表品牌没有选择!!!`)
343
+ return
344
+ }
345
+ if (userfile.f_gasmodel_id === null || userfile.f_gasmodel_id === '') {
346
+ this.$showMessage(`表具${i+1}气表型号没有选择!!!`)
347
+ return
348
+ }
349
+ if (userfile.f_meternumber === null || userfile.f_meternumber === '') {
350
+ this.$showMessage(`表具${i+1}表号没有填写!!!`)
351
+ return
352
+ }
353
+ }
354
+ let data = {
355
+ user: this.$login.f,
356
+ useradders: this.useradders,
357
+ userinfo: this.userinfo,
358
+ selectdata: this.selectdata
359
+ }
360
+ let res = await this.$resetpost('rs/logic/addInstallationDetails', {data:data}, {
361
+ resolveMsg: null,
362
+ rejectMsg: '表具添加失败!!!'
363
+ })
364
+ this.$dispatch('breakControl', this.selectdata)
365
+ },
366
+ // 检查表号是否存在
367
+ async meternumberValidate(i) {
368
+ if (!this.userinfo.userfiles[i].f_gasbrand_id) {
369
+ this.userinfo.userfiles[i].f_meternumber = ''
370
+ this.$showAlert('请先选择气表品牌!!!', 'warning', 3000)
371
+ return
372
+ }
373
+ if (this.userinfo.userfiles[i].f_gasbrand_id && this.userinfo.userfiles[i].f_meternumber) {
374
+ let data = {
375
+ f_meternumber: this.userinfo.userfiles[i].f_meternumber,
376
+ f_gasbrand_id: this.userinfo.userfiles[i].f_gasbrand_id
377
+ }
378
+ if (this.userinfo.userfiles[i].f_userfiles_id) {
379
+ data.f_userfiles_id = this.userinfo.userfiles[i].f_userfiles_id
380
+ }
381
+ let res = await this.$resetpost('rs/logic/meterbrandsNumberValidate', {data:data}, {
382
+ resolveMsg: null,
383
+ rejectMsg: '表号验证失败!!'
384
+ })
385
+ if (res.data) {
386
+ this.userinfo.userfiles[i].f_meternumber = ''
387
+ this.$showAlert('表号已存在!!', 'warning', 3000)
388
+ }
389
+ }
390
+ },
391
+ // 选择气表型号
392
+ gasmodelChange(i) {
393
+ if (this.userinfo.userfiles[i].gasmodel) {
394
+ this.userinfo.userfiles[i].f_gasmodel_id = this.userinfo.userfiles[i].gasmodel.id
395
+ }
396
+ },
397
+ // 选择气表品牌
398
+ gasbrandChange(i) {
399
+ // 清空已保存的气表型号
400
+ this.userinfo.userfiles[i].f_gasmodel_id = null
401
+ this.userinfo.userfiles[i].gasmodel = null
402
+
403
+ if (this.userinfo.userfiles[i].gasbrand) {
404
+ // 气表品牌id
405
+ this.userinfo.userfiles[i].f_gasbrand_id = this.userinfo.userfiles[i].gasbrand.id
406
+ // 气表分类
407
+ this.userinfo.userfiles[i].f_meter_classify = this.userinfo.userfiles[i].gasbrand.f_meter_type
408
+ }
409
+ },
410
+ // 打开安装明细
411
+ async showUserFileModal (row) {
412
+ this.useradders = row
413
+
414
+ let http = new HttpResetClass()
415
+ let data = {
416
+ condition: `f_userinfo_id = '${row.f_userinfo_id}'`
417
+ }
418
+ let res = await http.load('POST', 'rs/logic/getUserinfoAndUserfiles', {data:data}, {
419
+ resolveMsg: null,
420
+ rejectMsg: null
421
+ })
422
+
423
+ this.userinfo = res.data
424
+
425
+ // 已有表具的 气表信息补充
426
+ for (let i = 0; i < this.userinfo.userfiles.length; i++) {
427
+ for (const item of this.meterbrands) {
428
+ if (item.value.id === this.userinfo.userfiles[i].f_gasbrand_id) {
429
+ // this.userinfo.userfiles[i].gasbrand = item.value // 防止双向绑定失败
430
+ Vue.set(this.userinfo.userfiles[i], 'gasbrand', item.value)
431
+ }
432
+ }
433
+ if (this.userinfo.userfiles[i].gasbrand) {
434
+ for (const item of this.userinfo.userfiles[i].gasbrand.gasmodel) {
435
+ if (item.value.id === this.userinfo.userfiles[i].f_gasmodel_id) {
436
+ // this.userinfo.userfiles[i].gasmodel = item.value
437
+ Vue.set(this.userinfo.userfiles[i], 'gasmodel', item.value)
438
+ }
439
+ }
440
+ }
441
+ }
442
+
443
+ this.showUserFile = true
444
+ },
445
+ // 获取气表品牌
446
+ async getMeterbrands() {
447
+ let http = new HttpResetClass()
448
+ let data = {
449
+ f_orgid: this.$login.f.orgid
450
+ }
451
+ let res = await http.load('POST', 'rs/logic/getMeterbrands', {data:data}, {
452
+ resolveMsg: null,
453
+ rejectMsg: null
454
+ })
455
+ this.meterbrands = res.data
456
+ },
457
+ async notInstalled () {
458
+ let http = new HttpResetClass()
459
+ let data = {
460
+ condition: `ui.f_process_id = '${this.selectdata.f_process_id}' and uf.f_table_state != '待开通'`
461
+ }
462
+ let res = await http.load(
463
+ 'POST',
464
+ 'rs/sql/countApplyUserinfo',
465
+ {data: data},
466
+ {
467
+ resolveMsg: null,
468
+ rejectMsg: '安装数量查询失败!!!'
469
+ })
470
+
471
+ for (const item of this.selectdata.fields) {
472
+ if (item.label === '已安装户数') {
473
+ item.value = this.selectdata.f_apply_count - res.data[0].num
474
+ }
475
+ if (item.label === '未安装户数') {
476
+ item.value = res.data[0].num
477
+ }
478
+ }
479
+ },
480
+ searchCondition (args) {
481
+ var tablestate=''
482
+ if(this.selectdata.f_sub_state==='完工'){
483
+ tablestate='正常'
484
+ }else{
485
+ tablestate='待开通'
486
+ }
487
+ 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 === '通气点火') {
488
+ args.condition = args.condition + `and ui.f_userinfo_id = '${this.selectdata.f_userinfo_id}'`
489
+ } else {
490
+ args.condition = args.condition + `and ua.f_process_id = '${this.selectdata.f_process_id}'`
491
+ }
492
+ this.model.search(args.condition, args.model,tablestate)
493
+ },
494
+ // 查询
495
+ async search () {
496
+ this.$refs.cp.$refs.cri.search()
497
+ },
498
+ // 关闭安装明细
499
+ closeUserFile() {
500
+ this.showUserFile = false
501
+ this.useradders = null
502
+ this.userinfo = {}
503
+ this.search()
504
+ },
505
+ // 关闭文件上传对话框
506
+ closeFile() {
507
+ this.showWork = false
508
+ this.showFile = false
509
+ // 将选的文件清空
510
+ this.$refs.file.$el.querySelector('input').value = ''
511
+ this.search()
512
+ }
513
+ },
514
+ events: {
515
+ 'beforeFileUpload' (file) {
516
+ this.showWork = true
517
+ },
518
+ async 'onFileUpload'(file, result) {
519
+ let data = {
520
+ selectdata: this.selectdata,
521
+ filepath: result.f_downloadpath,
522
+ user: this.$login.f
523
+ }
524
+ try {
525
+ let res = await this.$resetpost(`rs/logic/importAddInstallationDetails`, {data: data}, {
526
+ resolveMsg: null,
527
+ rejectMsg: '导入失败!!!',
528
+ silent: true
529
+ }, 0)
530
+ } catch (e) {
531
+ this.closeFile()
532
+ }
533
+ this.$dispatch('breakControl', this.selectdata)
534
+ }
535
+ },
536
+ computed: {
537
+ pager () {
538
+ return this.selectdata.f_apply_type === '团购报建'
539
+ },
540
+ getCondition () {
541
+ let condition = `ua.f_process_id = '${this.selectdata.f_process_id}'`
542
+
543
+ return {
544
+ condition: condition
545
+ }
546
+ },
547
+ // 安装人
548
+ installperson() {
549
+ return function (f_install_person) {
550
+ if (isEmpty(f_install_person)) {
551
+ return this.$login.f.name
552
+ }
553
+ return f_install_person
554
+ }
555
+ },
556
+ installdate() {
557
+ return function (f_install_date) {
558
+ if (isEmpty(f_install_date)) {
559
+ return new Date().Format('yyyy-MM-dd HH:mm:ss')
560
+ }
561
+ return f_install_date
562
+ }
563
+ },
564
+ // 表向
565
+ aroundmeters() {
566
+ return this.$appdata.getParam('左右表')
567
+ },
568
+ // 安装位置
569
+ positions() {
570
+ return this.$appdata.getParam('安装位置')
571
+ }
572
+ },
573
+ watch: {
574
+ }
575
+ }
576
+ </script>
577
+ <style scoped>
578
+ .head-but{
579
+ margin-left: 5px;
580
+ height: 34px;
581
+ /*background-color: #6aa6e2;*/
582
+ border-radius: 4px;
583
+ font-family: PingFang;
584
+ color: #ffffff;
585
+ }
586
+ /*清除model中的浮动*/
587
+ .clearfix:after,.clearfix:before{
588
+ display: table;
589
+ }
590
+ .clearfix:after{
591
+ clear: both;
592
+ }
593
+ .input_view{
594
+ padding: 8px;
595
+ background-color: #ffffff;
596
+ border-radius: 2px;
597
+ border: solid 1px #c7c7c7!important;
598
+ color: #333333!important;
599
+ font-size: 15px!important;
600
+ }
601
+
602
+ .input_view[readonly]{
603
+ border: 1px solid #DDD!important;
604
+ color:#ACA899!important;
605
+ }
606
+ .input_view:disabled{
607
+ border: 1px solid #DDD!important;
608
+ color:#ACA899!important;
609
+ }
610
+ </style>