apply-clients 3.3.16 → 3.3.17

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