apply-clients 3.4.85 → 3.4.88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apply-clients",
3
- "version": "3.4.85",
3
+ "version": "3.4.88",
4
4
  "description": "报建前端模块",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -8,6 +8,7 @@
8
8
  <th class="textNoLineBreak">材料型号</th>
9
9
  <th class="textNoLineBreak">材料单位</th>
10
10
  <th class="textNoLineBreak">材料数量</th>
11
+ <th class="textNoLineBreak">应免数量</th>
11
12
  <th class="textNoLineBreak">材料价格</th>
12
13
  <th class="textNoLineBreak">材料状态</th>
13
14
  <th class="textNoLineBreak">
@@ -33,6 +34,9 @@
33
34
  <td style="text-align: center;">
34
35
  <nobr>{{row.f_material_number}}</nobr>
35
36
  </td>
37
+ <td style="text-align: center;">
38
+ <nobr>{{row.f_quantity_payable}}</nobr>
39
+ </td>
36
40
  <td style="text-align: center;">
37
41
  <nobr>{{row.f_material_price}}</nobr>
38
42
  </td>
@@ -121,6 +125,16 @@
121
125
  />
122
126
  </div>
123
127
  </div>
128
+ <div class="form-group col-sm-6" :class="[item.f_quantity_payable ? '' : 'has-error']">
129
+ <label class="col-sm-4 control-label">应免数量:</label>
130
+ <div class="col-sm-8">
131
+ <input class="form-control input_view" style="" type="number"
132
+ placeholder="应免数量"
133
+ v-model="item.f_quantity_payable"
134
+ :value="item.f_quantity_payable"
135
+ />
136
+ </div>
137
+ </div>
124
138
  <div class="form-group col-sm-6">
125
139
  <label class="col-sm-4 control-label">材料价格:</label>
126
140
  <div class="col-sm-8">
@@ -215,7 +229,8 @@
215
229
  f_material_style: '',
216
230
  f_material_unit: '',
217
231
  f_material_number: '',
218
- f_material_price:''
232
+ f_material_price:'',
233
+ f_quantity_payable:0
219
234
  }
220
235
  ],
221
236
  meterialOptions: [],
@@ -237,7 +252,7 @@
237
252
  }
238
253
  let res = await http.load(
239
254
  'POST',
240
- `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable?aaa=123`,
255
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
241
256
  {data: data},
242
257
  {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
243
258
  )
@@ -253,7 +268,8 @@
253
268
  f_material_style: '',
254
269
  f_material_unit: '',
255
270
  f_material_number: '',
256
- f_material_price:''
271
+ f_material_price:'',
272
+ f_quantity_payable:0
257
273
  }
258
274
  ],
259
275
  this.showMaterialModal = true
@@ -270,7 +286,8 @@
270
286
  f_material_style: '',
271
287
  f_material_unit: '',
272
288
  f_material_number: '',
273
- f_material_price:''
289
+ f_material_price:'',
290
+ f_quantity_payable:0
274
291
  })
275
292
  this.isShow.push(false)
276
293
  },
@@ -301,14 +318,8 @@
301
318
  this.materials[index].f_material_name = material.f_material_name
302
319
  this.materials[index].f_material_style = material.f_material_style
303
320
  this.materials[index].f_material_unit = material.f_material_unit
304
- this.materials[index].f_material_number = material.f_material_number
305
321
  this.materials[index].f_material_price = material.f_material_price
306
- if (material.f_material_name === "报警器-汉威") {
307
- this.isShow[index] = true
308
- } else {
309
- this.isShow[index] = false
310
- }
311
- this.isShow.splice(0, 1, this.isShow[0])
322
+
312
323
  },
313
324
  // 新增材料
314
325
  async addMaterial() {
@@ -358,7 +369,8 @@
358
369
  f_material_style: row.f_material_style,
359
370
  f_material_unit: row.f_material_unit,
360
371
  f_material_number: row.f_material_number,
361
- f_material_price: row.f_material_price
372
+ f_material_price:row.f_material_price,
373
+ f_quantity_payable:row.f_quantity_payable
362
374
  }
363
375
  ]
364
376
  this.showMaterialModal = true
@@ -370,7 +382,7 @@
370
382
  data.f_material_unit = this.materials[0].f_material_unit
371
383
  data.f_material_number = this.materials[0].f_material_number
372
384
  data.f_material_price = this.materials[0].f_material_price
373
-
385
+ data.f_quantity_payable = this.materials[0].f_quantity_payable
374
386
  let http = new HttpResetClass()
375
387
  let res = await http.load(
376
388
  'POST',
@@ -335,7 +335,7 @@ export default {
335
335
  this.$refs.cp.$refs.cri.search()
336
336
  },
337
337
  searchCondition (args) {
338
- args.condition = args.condition + `and (act.defname in ('户外施工','施工审核','工程施工','通气点火','现场勘察')) `
338
+ args.condition = args.condition + `and (act.defname in ('户外施工','施工审核','工程施工','通气点火','现场勘察','安装审核')) `
339
339
  this.model.search(args.condition, args.model)
340
340
  },
341
341
  click (row) {
@@ -0,0 +1,494 @@
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_userinfo_code }}</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_user_name }}</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_user_phone }}</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_address }}</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_userfiles_num === null ? 0 : row.f_userfiles_num}}</p>
25
+ </div>
26
+ <div class="row text-right">
27
+ <button class="btn btn-info"
28
+ :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"
29
+ @click.prevent="$parent.$parent.showUserFileModal(row)">
30
+ {{row.f_userfiles_num > 0 ? '修正' : '添加'}}
31
+ </button>
32
+ </div>
33
+ </div>
34
+ </div>
35
+ </list>
36
+
37
+ <modal v-if="showUserFile" :show.sync="showUserFile" v-ref:modal :large="true" :backdrop="false" title="安装明细" width="100%">
38
+ <header slot="modal-header" class="modal-header">
39
+ <button type="button" class="close" @click="closeUserFile"><span>&times;</span></button>
40
+ <h4 class="modal-title">安装明细</h4>
41
+ </header>
42
+ <article slot="modal-body" class="modal-body clearfix">
43
+ <div class="form-group row vertical-center">
44
+ <label class="col-xs-4 control-label">地址信息:</label>
45
+ <div class="col-xs-8">
46
+ <input class="form-control input_view" style=""
47
+ v-model="useradders.f_address"
48
+ :value="useradders.f_address"
49
+ :readonly="true"/>
50
+ </div>
51
+ </div>
52
+
53
+ <div v-for="(i, item) in userinfo.userfiles" class="form-group col-xs-12 panel panel-info">
54
+ <div class="panel-heading head row" style="background-color: #e8f4ff;margin-bottom: 10px">
55
+ <div class="col-xs-6 text-left">表具{{$index+1}}信息</div>
56
+ <div class="col-xs-6 text-right"><button
57
+ class="btn btn-danger"
58
+ v-if="!item.f_userfiles_id"
59
+ @click.prevent="deleteUserFile(i)"
60
+ >删除</button></div>
61
+ </div>
62
+ <div class="form-group row vertical-center" :class="item.f_gasbrand_id ? '':'has-error'">
63
+ <label class="col-xs-4 control-label">气表品牌:</label>
64
+ <div class="col-xs-8">
65
+ <input-select
66
+ class="select select_list"
67
+ :value.sync="item.gasbrand"
68
+ v-model="item.gasbrand"
69
+ :options="meterbrands"
70
+ @change="gasbrandChange(i)"
71
+ :valueSingle="true"></input-select>
72
+ </div>
73
+ </div>
74
+ <div class="form-group row vertical-center" :class="item.f_gasmodel_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.gasmodel"
80
+ v-model="item.gasmodel"
81
+ :options="item.gasbrand.gasmodel"
82
+ @change="gasmodelChange(i)"
83
+ :valueSingle="true"></input-select>
84
+ </div>
85
+ </div>
86
+ <div class="form-group row vertical-center" :class="item.f_meternumber ? '':'has-error'">
87
+ <label class="col-xs-4 control-label">表&emsp;&emsp;号:</label>
88
+ <div class="col-xs-8">
89
+ <input class="form-control input_view" style=""
90
+ placeholder="表号"
91
+ v-model="item.f_meternumber"
92
+ type="number"
93
+ οnkeyup="this.value=this.value.replace(/\s+/g,'')"
94
+ :value="item.f_meternumber"
95
+ @change="meternumberValidate(i)"
96
+ :readonly="false"/>
97
+ </div>
98
+ <button
99
+ type="button" name="button" class="btn btn-primary" style="float: right;" @click="scan(i)">扫码
100
+ </button>
101
+ </div>
102
+ <div class="form-group row vertical-center">
103
+ <label class="col-xs-4 control-label ">表&ensp;封&ensp;号:</label>
104
+ <div class="col-xs-8">
105
+ <input class="form-control input_view" style=""
106
+ placeholder="表封号"
107
+ v-model="item.f_metertitles"
108
+ :value="item.f_metertitles"
109
+ :readonly="false"/>
110
+ </div>
111
+ </div>
112
+ <div class="form-group row vertical-center">
113
+ <label class="col-xs-4 control-label">表&ensp;读&ensp;数:</label>
114
+ <div class="col-xs-8">
115
+ <input class="form-control input_view" style=""
116
+ onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}"
117
+ type="number"
118
+ placeholder="表读数"
119
+ v-model="item.f_meter_base"
120
+ :value="item.f_meter_base"
121
+ :readonly="false"/>
122
+ </div>
123
+ </div>
124
+ <div class="form-group row vertical-center">
125
+ <label class="col-xs-4 control-label">初始底数:</label>
126
+ <div class="col-xs-8">
127
+ <input class="form-control input_view" style=""
128
+ onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}"
129
+ type="number"
130
+ v-model="item.f_initial_base"
131
+ :value="item.f_initial_base"
132
+ placeholder="初始底数"
133
+ :readonly="false"/>
134
+ </div>
135
+ </div>
136
+ <div class="form-group row vertical-center">
137
+ <label class="col-xs-4 control-label">表&emsp;&emsp;向:</label>
138
+ <div class="col-xs-8">
139
+ <input-select
140
+ class="select select_list"
141
+ :value.sync="item.f_aroundmeter"
142
+ v-model="item.f_aroundmeter"
143
+ :options="aroundmeters"
144
+ :valueSingle="true"></input-select>
145
+ </div>
146
+ </div>
147
+ <div class="form-group row vertical-center">
148
+ <label class="col-xs-4 control-label">安装位置:</label>
149
+ <div class="col-xs-8">
150
+ <input-select
151
+ class="select select_list"
152
+ :value.sync="item.f_position"
153
+ v-model="item.f_position"
154
+ :options="positions"
155
+ :valueSingle="true"></input-select>
156
+ </div>
157
+ </div>
158
+ <div class="form-group row vertical-center">
159
+ <label class="col-xs-4 control-label">安&ensp;装&ensp;人:</label>
160
+ <div class="col-xs-8">
161
+ <input class="form-control input_view" style=""
162
+ v-model="item.f_install_person"
163
+ :value.sync="installperson(item.f_install_person)"
164
+ placeholder="安装人"
165
+ readonly/>
166
+ <!-- <input-select-->
167
+ <!-- class="select select_list"-->
168
+ <!-- :value.sync="item.f_install_person"-->
169
+ <!-- v-model="item.f_install_person"-->
170
+ <!-- :options="installperson"-->
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 class="form-control input_view" style=""
178
+ v-model="item.f_install_date"
179
+ :value.sync="installdate(item.f_install_date)"
180
+ placeholder="安装日期"
181
+ readonly/>
182
+ <!-- <datepicker-->
183
+ <!-- placeholder="安装日期"-->
184
+ <!-- :value.sync="item.f_install_date"-->
185
+ <!-- v-model="item.f_install_date"-->
186
+ <!-- format="yyyy-MM-dd HH:mm:ss"-->
187
+ <!-- :show-reset-button="reset">-->
188
+ <!-- </datepicker>-->
189
+ </div>
190
+ </div>
191
+ </div>
192
+
193
+ </article>
194
+ <footer slot="modal-footer" class="modal-footer">
195
+ <!-- 去除一户多表 -->
196
+ <button type="button" class="btn btn-primary" @click="addUserFile" v-if="false">添加表具</button>
197
+ <button type="button" class="btn btn-primary" @click="saveUserFile">确认</button>
198
+ </footer>
199
+ </modal>
200
+ </div>
201
+
202
+ </template>
203
+ <script>
204
+ import Vue from 'vue'
205
+ import {PagedList} from 'vue-client'
206
+ import {HttpResetClass} from 'vue-client'
207
+ import {isEmpty} from '../../../components/Util'
208
+ // Date格式化
209
+ Date.prototype.Format = function (fmt) {
210
+ var o = {
211
+ 'M+': this.getMonth() + 1, // 月份
212
+ 'd+': this.getDate(), // 日
213
+ 'H+': this.getHours(), // 小时
214
+ 'm+': this.getMinutes(), // 分
215
+ 's+': this.getSeconds(), // 秒
216
+ 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
217
+ 'S': this.getMilliseconds() // 毫秒
218
+ }
219
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
220
+ for (var k in o) {
221
+ if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
222
+ }
223
+ return fmt
224
+ }
225
+
226
+ export default {
227
+ title: '安装明细',
228
+ props: {
229
+ selectdata: {
230
+ type: Object
231
+ },
232
+ mark: {
233
+ type: Number,
234
+ default: 0
235
+ }
236
+ },
237
+ data () {
238
+ return {
239
+ showUserFile: false,
240
+ model: {
241
+ rows: null
242
+ },
243
+ meterbrands: [], // 气表品牌
244
+ useradders: null,
245
+ userinfo: {}
246
+ }
247
+ },
248
+ ready () {
249
+ this.search()
250
+ this.getMeterbrands()
251
+ },
252
+ methods: {
253
+ scan(index) {
254
+ HostApp.__this__ = this,
255
+ HostApp.scanCode({callback: "javascript:HostApp.__this__.getCode("+index+");"})
256
+ },
257
+ getCode(index) {
258
+ var datapa = HostApp.getCode().data;
259
+ console.log(datapa)
260
+ this.userinfo.userfiles[index].f_meternumber = datapa
261
+ },
262
+ // 删除未保存的表具
263
+ async deleteUserFile (index) {
264
+ this.userinfo.userfiles.splice(index, 1)
265
+ },
266
+ // 追加表具
267
+ addUserFile() {
268
+ this.userinfo.userfiles.push({})
269
+ },
270
+ // 保存档案
271
+ async saveUserFile() {
272
+ // 检查必填项
273
+ for (let i = 0; i < this.userinfo.userfiles.length; i++) {
274
+ let userfile = this.userinfo.userfiles[i]
275
+ if (userfile.f_gasbrand_id === null || userfile.f_gasbrand_id === '') {
276
+ this.$showMessage(`表具${i+1}气表品牌没有选择!!!`)
277
+ return
278
+ }
279
+ if (userfile.f_gasmodel_id === null || userfile.f_gasmodel_id === '') {
280
+ this.$showMessage(`表具${i+1}气表型号没有选择!!!`)
281
+ return
282
+ }
283
+ if (userfile.f_meternumber === null || userfile.f_meternumber === '') {
284
+ this.$showMessage(`表具${i+1}表号没有填写!!!`)
285
+ return
286
+ }
287
+ }
288
+ let data = {
289
+ // 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":[]},
290
+ user: Vue.user,
291
+ useradders: this.useradders,
292
+ userinfo: this.userinfo,
293
+ selectdata: this.selectdata
294
+ }
295
+ let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/addInstallationDetails`, {data:data}, {
296
+ // let res = await this.$resetpost(`rs/logic/addInstallationDetails`, {data:data}, {
297
+ resolveMsg: null,
298
+ rejectMsg: '表具添加失败!!!'
299
+ })
300
+
301
+ this.closeUserFile()
302
+ this.$dispatch('breakControl')
303
+ },
304
+ // 检查表号是否存在
305
+ async meternumberValidate(i) {
306
+ if (!this.userinfo.userfiles[i].f_gasbrand_id) {
307
+ this.userinfo.userfiles[i].f_meternumber = ''
308
+ this.$showMessage('请先选择气表品牌!!!')
309
+ return
310
+ }
311
+ if (this.userinfo.userfiles[i].f_gasbrand_id && this.userinfo.userfiles[i].f_meternumber) {
312
+ let data = {
313
+ f_meternumber: this.userinfo.userfiles[i].f_meternumber,
314
+ f_gasbrand_id: this.userinfo.userfiles[i].f_gasbrand_id
315
+ }
316
+ if (this.userinfo.userfiles[i].f_userfiles_id) {
317
+ data.f_userfiles_id = this.userinfo.userfiles[i].f_userfiles_id
318
+ }
319
+ let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/meterbrandsNumberValidate`, {data:data}, {
320
+ // let res = await this.$resetpost(`rs/logic/meterbrandsNumberValidate`, {data:data}, {
321
+ resolveMsg: null,
322
+ rejectMsg: '表号验证失败!!'
323
+ })
324
+ if (res.data) {
325
+ this.userinfo.userfiles[i].f_meternumber = ''
326
+ this.$showMessage('表号已存在!!')
327
+ }
328
+ }
329
+ },
330
+ // 选择气表型号
331
+ gasmodelChange(i) {
332
+ if (this.userinfo.userfiles[i].gasmodel) {
333
+ this.userinfo.userfiles[i].f_gasmodel_id = this.userinfo.userfiles[i].gasmodel.id
334
+ }
335
+ },
336
+ // 选择气表品牌
337
+ gasbrandChange(i) {
338
+ // 清空已保存的气表型号
339
+ this.userinfo.userfiles[i].f_gasmodel_id = null
340
+ this.userinfo.userfiles[i].gasmodel = null
341
+
342
+ if (this.userinfo.userfiles[i].gasbrand) {
343
+ // 气表品牌id
344
+ this.userinfo.userfiles[i].f_gasbrand_id = this.userinfo.userfiles[i].gasbrand.id
345
+ // 气表分类
346
+ this.userinfo.userfiles[i].f_meter_classify = this.userinfo.userfiles[i].gasbrand.f_meter_type
347
+ }
348
+ },
349
+ // 打开安装明细
350
+ async showUserFileModal (row) {
351
+ this.useradders = row
352
+
353
+ let http = new HttpResetClass()
354
+ let data = {
355
+ condition: `f_userinfo_id='${row.f_userinfo_id}'`
356
+ }
357
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/getUserinfoAndUserfiles`, {data:data}, {
358
+ // let res = await http.load('POST', `rs/logic/getUserinfoAndUserfiles`, {data:data}, {
359
+ resolveMsg: null,
360
+ rejectMsg: null
361
+ })
362
+
363
+ this.userinfo = res.data
364
+
365
+ // 已有表具的 气表信息补充
366
+ for (let i = 0; i < this.userinfo.userfiles.length; i++) {
367
+ for (const item of this.meterbrands) {
368
+ if (item.value.id === this.userinfo.userfiles[i].f_gasbrand_id) {
369
+ // this.userinfo.userfiles[i].gasbrand = item.value // 防止双向绑定失败
370
+ Vue.set(this.userinfo.userfiles[i], 'gasbrand', item.value)
371
+ }
372
+ }
373
+ if (this.userinfo.userfiles[i].gasbrand) {
374
+ for (const item of this.userinfo.userfiles[i].gasbrand.gasmodel) {
375
+ if (item.value.id === this.userinfo.userfiles[i].f_gasmodel_id) {
376
+ // this.userinfo.userfiles[i].gasmodel = item.value
377
+ Vue.set(this.userinfo.userfiles[i], 'gasmodel', item.value)
378
+ }
379
+ }
380
+ }
381
+ }
382
+
383
+ this.showUserFile = true
384
+ },
385
+ // 获取气表品牌
386
+ async getMeterbrands() {
387
+ let http = new HttpResetClass()
388
+ let data = {
389
+ f_orgid: Vue.user.orgid
390
+ // f_orgid: '10101'
391
+ }
392
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/getMeterbrands`, {data:data}, {
393
+ // let res = await http.load('POST', `rs/logic/getMeterbrands`, {data:data}, {
394
+ resolveMsg: null,
395
+ rejectMsg: null
396
+ })
397
+ this.meterbrands = res.data
398
+ },
399
+ // 查询
400
+ async search () {
401
+ var tablestate=''
402
+ if(this.selectdata.f_sub_state==='完工'){
403
+ tablestate='正常'
404
+ }else{
405
+ tablestate='待开通'
406
+ }
407
+ let http = new HttpResetClass()
408
+ let data = {
409
+ condition: `ua.f_process_id = '${this.selectdata.f_process_id}'`,
410
+ condValue : tablestate
411
+ }
412
+
413
+ 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 === '工商业报警器报建') {
414
+ data.condition = `ui.f_userinfo_id = '${this.selectdata.f_userinfo_id}'`
415
+ }
416
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/getAddresAndUserinfoAndUserfilesAmount`, {data:data}, {
417
+ // let res = await http.load('POST', `rs/sql/getAddresAndUserinfoAndUserfilesAmount`, {data:data}, {
418
+ resolveMsg: null,
419
+ rejectMsg: null
420
+ })
421
+ this.model.rows = res.data
422
+ if (this.selectdata.f_apply_type === '团购报建') {
423
+ let f_installed_households = 0
424
+ for (const item of res.data) {
425
+ if (item.f_userfiles_num > 0) {
426
+ f_installed_households++
427
+ }
428
+ }
429
+ let f_uninstalled_households = this.selectdata.f_apply_count - f_installed_households
430
+ for (const item of this.selectdata.fields) {
431
+ if (item.label === '已安装户数') {
432
+ item.value = f_installed_households
433
+ }
434
+ if (item.label === '未安装户数') {
435
+ item.value = f_uninstalled_households
436
+ }
437
+ }
438
+ }
439
+ },
440
+ // 关闭安装明细
441
+ closeUserFile() {
442
+ this.showUserFile = false
443
+ this.useradders = null
444
+ this.userinfo = {}
445
+ this.search()
446
+ },
447
+ },
448
+ events: {
449
+ },
450
+ computed: {
451
+ // 安装人
452
+ installperson() {
453
+ return function (f_install_person) {
454
+ if (isEmpty(f_install_person)) {
455
+ return Vue.user.name
456
+ }
457
+ return f_install_person
458
+ }
459
+ },
460
+ installdate() {
461
+ return function (f_install_date) {
462
+ if (isEmpty(f_install_date)) {
463
+ return new Date().Format('yyyy-MM-dd HH:mm:ss')
464
+ }
465
+ return f_install_date
466
+ }
467
+ },
468
+ // 表向
469
+ aroundmeters() {
470
+ return this.$appdata.getParam('左右表')
471
+ },
472
+ // 安装位置
473
+ positions() {
474
+ return this.$appdata.getParam('安装位置')
475
+ }
476
+ },
477
+ watch: {
478
+ }
479
+ }
480
+ </script>
481
+ <style scoped>
482
+ .vertical-center {
483
+ display: flex;
484
+ align-items: center;
485
+ text-align: center;
486
+ }
487
+ /*清除model中的浮动*/
488
+ .clearfix:after,.clearfix:before{
489
+ display: table;
490
+ }
491
+ .clearfix:after{
492
+ clear: both;
493
+ }
494
+ </style>
@@ -2,6 +2,7 @@ import Vue from "vue";
2
2
 
3
3
  let specialComp = {
4
4
  'app-add-material-science': (resolve) => { require(['./android/AppAddMaterialScience'], resolve) },
5
- 'app-exploration-user': (resolve) => { require(['./android/AppExplorationUser'], resolve) }
5
+ 'app-exploration-user': (resolve) => { require(['./android/AppExplorationUser'], resolve) },
6
+ 'app-installation-details': (resolve) => { require(['./android/AppInstallationDetails'], resolve) }
6
7
  }
7
8
  exports.specialComp = specialComp