apply-clients 3.4.39 → 3.4.51

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 (58) hide show
  1. package/build/dev-server.js +2 -2
  2. package/package.json +1 -1
  3. package/src/android.js +21 -21
  4. package/src/apply.js +113 -113
  5. package/src/applyAndroid.js +53 -53
  6. package/src/components/android/AppServiceView.vue +745 -745
  7. package/src/components/android/AppSign.vue +154 -154
  8. package/src/components/android/Process/AppExplorationUser.vue +507 -507
  9. package/src/components/android/Process/AppServiceControl.vue +1708 -1708
  10. package/src/components/android/Process/Processes/AppAddMaterialScience.vue +477 -477
  11. package/src/components/android/Process/Processes/AppDevicesManagement.vue +519 -519
  12. package/src/components/android/Process/Processes/AppInstallationDetails.vue +482 -482
  13. package/src/components/android/Supervisory/AppSupervisoryCart.vue +156 -156
  14. package/src/components/product/Business/BusinessApply.vue +269 -269
  15. package/src/components/product/Business/CivilApply.vue +269 -269
  16. package/src/components/product/GroupByApply/ApplyGroupByList.vue +253 -253
  17. package/src/components/product/GroupByApply/ApplyGroupByMain.vue +53 -53
  18. package/src/components/product/GroupByApply/ApplyGroupByPaper.vue +376 -376
  19. package/src/components/product/Material/MaterialDetailed.vue +262 -262
  20. package/src/components/product/OldApply/Monitor/MonitorApply.vue +360 -360
  21. package/src/components/product/Print/BuildOrder/printBuildOrder.vue +157 -157
  22. package/src/components/product/Print/IgnitionBill/IgnitionBill.vue +259 -259
  23. package/src/components/product/Print/IgnitionBill/printIgnitionBill.vue +168 -168
  24. package/src/components/product/Process/ExplorationSelect.vue +495 -495
  25. package/src/components/product/Process/ExplorationUser.vue +189 -189
  26. package/src/components/product/Process/Processes/InstallationDetails.vue +610 -610
  27. package/src/components/product/Process/Processes/Print/printCharge.vue +166 -166
  28. package/src/components/product/Process/Processes/addMaterialScience.vue +454 -454
  29. package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +211 -211
  30. package/src/components/product/Process/Processes/chargeManagement.vue +656 -656
  31. package/src/components/product/Process/Processes/devicesManagement.vue +484 -484
  32. package/src/components/product/Process/Service/ServiceControl.vue +1918 -1920
  33. package/src/components/product/ServiceView.vue +981 -981
  34. package/src/components/product/Supervisory/SupervisoryControl.vue +137 -137
  35. package/src/components/product/Supervisory/SupervisoryList.vue +404 -404
  36. package/src/components/product/VueUtils/ApplyUpload.vue +275 -280
  37. package/src/filiale/gehua/pc/ExplorationSelect.vue +483 -483
  38. package/src/filiale/gehua/pc/ServiceControl.vue +1929 -1929
  39. package/src/filiale/gehua/pc/SupervisoryControl.vue +137 -137
  40. package/src/filiale/gehua/pc/SupervisoryServiceControl.vue +890 -890
  41. package/src/filiale/gehua/pc/buildOrderList.vue +339 -0
  42. package/src/filiale/gehua/pc/printBuildOrder.vue +243 -0
  43. package/src/filiale/gehua/pc.js +3 -2
  44. package/src/filiale/guangxi/android/Process/AppExplorationUser.vue +503 -503
  45. package/src/filiale/guangxi/android/Process/Processes/AppAddMaterialScience.vue +470 -470
  46. package/src/filiale/guangxi/android/Process/Processes/AppDevicesManagement.vue +519 -519
  47. package/src/filiale/guangxi/android/Process/Processes/AppInstallationDetails.vue +482 -482
  48. package/src/filiale/guangxi/android/Process/Processes/AppServiceControl.vue +1708 -1708
  49. package/src/filiale/guangxi/android/Process/Processes/AppServiceView.vue +766 -766
  50. package/src/filiale/guangxi/android.js +9 -9
  51. package/src/filiale/guangxi/pc/ApplyCharge/ApplyChargeList.vue +470 -470
  52. package/src/filiale/guangxi/pc/ApplyCharge/chargeManagement.vue +702 -702
  53. package/src/filiale/guangxi/pc/Process/ExplorationSelect.vue +538 -538
  54. package/src/filiale/guangxi/pc/Process/Service/ServiceControl.vue +1922 -1922
  55. package/src/filiale/guangxi/pc/Process/Service/SupervisoryServiceControl.vue +891 -891
  56. package/src/filiale/guangxi/pc/Process/Service/addMaterialScience.vue +482 -482
  57. package/src/filiale/guangxi/pc.js +15 -15
  58. package/src/main.js +1 -4
@@ -1,477 +1,477 @@
1
- <template>
2
- <div>
3
- <data-grid :model="onetomany" class="list_area table_sy">
4
- <template partial='head'>
5
- <tr>
6
- <th class="textNoLineBreak">序号</th>
7
- <th class="textNoLineBreak">材料名称</th>
8
- <th class="textNoLineBreak">材料型号</th>
9
- <th class="textNoLineBreak">材料单位</th>
10
- <th class="textNoLineBreak">材料数量</th>
11
- <th class="textNoLineBreak">材料编号</th>
12
- <th class="textNoLineBreak">材料标识</th>
13
- <th class="textNoLineBreak">用户编号</th>
14
- <th class="textNoLineBreak">
15
- <button class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal()">添加
16
- </button>
17
- </th>
18
- </tr>
19
- </template>
20
- <template partial='body'>
21
- <tr>
22
- <td style="text-align: center;">
23
- <nobr>{{$index+1}}</nobr>
24
- </td>
25
- <td style="text-align: center;">
26
- <nobr>{{row.f_material_name}}</nobr>
27
- </td>
28
- <td style="text-align: center;">
29
- <nobr>{{row.f_material_style}}</nobr>
30
- </td>
31
- <td style="text-align: center;">
32
- <nobr>{{row.f_material_unit}}</nobr>
33
- </td>
34
- <td style="text-align: center;">
35
- <nobr>{{row.f_material_number}}</nobr>
36
- </td>
37
- <td style="text-align: center;">
38
- <nobr>{{row.f_bjq_sid}}</nobr>
39
- </td>
40
- <td style="text-align: center;">
41
- <nobr>{{row.f_material_code}}</nobr>
42
- </td>
43
- <td style="text-align: center;">
44
- <nobr>{{row.f_userinfo_code}}</nobr>
45
- </td>
46
- <td style="text-align: center;">
47
- <button type="button" class="button_search button_spacing"
48
- @click="$parent.$parent.updateMaterial($index,row)">修改
49
- </button>
50
- <button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除
51
- </button>
52
- </td>
53
- </tr>
54
- </template>
55
- </data-grid>
56
- <modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal :large="true"
57
- :backdrop="false" :title="title">
58
- <header slot="modal-header" class="modal-header">
59
- <button type="button" class="close" @click="closeMaterials"><span>&times;</span></button>
60
- <h4 class="modal-title">{{title}}</h4>
61
- </header>
62
- <article slot="modal-body" class="modal-body clearfix">
63
- <div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
64
- <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
65
- <div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
66
- <div class="col-sm-6 text-right">
67
- <button
68
- class="button_delete button_spacing"
69
- @click.prevent="deleteDevicesinfo(i)"
70
- v-if="title === '新增'"
71
- >删除
72
- </button>
73
- </div>
74
- </div>
75
- <div class="form-group col-sm-6">
76
- <label class="col-sm-4 control-label">选择材料:</label>
77
- <div class="col-sm-8">
78
- <input-select
79
- class="select select_list"
80
- :value.sync="item.material"
81
- v-model="item.material"
82
- :options="meterialOptions"
83
- :disable="mark === 1"
84
- @change="modifyOtherValue(i)"
85
- :valueSingle="true"></input-select>
86
- </div>
87
- </div>
88
- <div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
89
- <label class="col-sm-4 control-label">材料名称:</label>
90
- <div class="col-sm-8">
91
- <input class="form-control input_view" style="" type="text"
92
- placeholder="材料名称"
93
- v-model="item.f_material_name"
94
- :value="item.f_material_name"
95
- />
96
- </div>
97
- </div>
98
- <div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
99
- <label class="col-sm-4 control-label">材料型号:</label>
100
- <div class="col-sm-8">
101
- <input class="form-control input_view" style="" type="text"
102
- placeholder="材料型号"
103
- v-model="item.f_material_style"
104
- :value="item.f_material_style"
105
- />
106
- </div>
107
- </div>
108
- <div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
109
- <label class="col-sm-4 control-label">材料单位:</label>
110
- <div class="col-sm-8">
111
- <input class="form-control input_view" style="" type="text"
112
- placeholder="材料单位"
113
- v-model="item.f_material_unit"
114
- :value="item.f_material_unit"
115
- />
116
- </div>
117
- </div>
118
- <div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
119
- <label class="col-sm-4 control-label">材料数量:</label>
120
- <div class="col-sm-8">
121
- <input class="form-control input_view" style="" type="number"
122
- placeholder="设备数量"
123
- v-model="item.f_material_number"
124
- :value="item.f_material_number"
125
- />
126
- </div>
127
- </div>
128
- <div class="form-group col-sm-6">
129
- <label class="col-sm-4 control-label">材料编号:</label>
130
- <div class="col-sm-8">
131
- <input class="form-control input_view" style="" type="text"
132
- placeholder="材料编号"
133
- v-model="item.f_bjq_sid"
134
- :value="item.f_bjq_sid"
135
- />
136
- </div>
137
- </div>
138
- <div class="form-group col-sm-6">
139
- <label class="col-sm-4 control-label">材料标识:</label>
140
- <div class="col-sm-8">
141
- <input class="form-control input_view" style=""
142
- placeholder="材料标识"
143
- v-model="item.f_material_code"
144
- :value.sync="item.f_material_code"
145
- />
146
- </div>
147
- </div>
148
- <div class="form-group col-sm-6">
149
- <label class="col-sm-4 control-label">用户编号:</label>
150
- <div class="col-sm-8">
151
- <input class="form-control input_view" style=""
152
- placeholder="用户编号"
153
- v-model="item.f_userinfo_code"
154
- :value.sync="item.f_userinfo_code"
155
- />
156
- </div>
157
- </div>
158
- <div class="form-group col-sm-6">
159
- <label class="col-sm-4 control-label"></label>
160
- <div class="col-sm-8">
161
-
162
- </div>
163
- </div>
164
- <div class="form-group col-sm-6">
165
- <label class="col-sm-4 control-label"></label>
166
- <div class="col-sm-8">
167
-
168
- </div>
169
- </div>
170
- <div class="form-group col-sm-6">
171
- <label class="col-sm-4 control-label"></label>
172
- <div class="col-sm-8">
173
-
174
- </div>
175
- </div>
176
- <div class="form-group col-sm-6">
177
- <label class="col-sm-4 control-label"></label>
178
- <div class="col-sm-8">
179
-
180
- </div>
181
- </div>
182
- <div class="form-group col-sm-6">
183
- <label class="col-sm-4 control-label"></label>
184
- <div class="col-sm-8">
185
-
186
- </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
-
192
- </div>
193
- </div>
194
- <div class="form-group col-sm-6">
195
- <label class="col-sm-4 control-label"></label>
196
- <div class="col-sm-8">
197
-
198
- </div>
199
- </div>
200
- <div v-if=" (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建')">
201
- <app-qrcode-reader :istype = fmaterialname :index = i v-show="isShow[i]"></app-qrcode-reader>
202
- </div>
203
- </div>
204
- </article>
205
- <footer slot="modal-footer" class="modal-footer">
206
- <template v-if="mark !== 1">
207
- <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
208
- <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()"
209
- :disabled="!$v.valid">确认添加
210
- </button>
211
- <button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()"
212
- :disabled="!$v.valid">确认修改
213
- </button>
214
- </template>
215
- </footer>
216
- </modal>
217
- </div>
218
- </template>
219
-
220
- <script>
221
- import Vue from 'vue'
222
- import {HttpResetClass} from 'vue-client'
223
-
224
- export default {
225
- name: 'addMaterialScience',
226
- props: {
227
- selectdata: {
228
- type: Object
229
- }
230
- },
231
- data() {
232
- return {
233
- onetomany: {
234
- rows: []
235
- },
236
- title: '新增',
237
- showMaterialModal: false,
238
- materials: [
239
- {
240
- material: '',
241
- f_material_name: '',
242
- f_material_style: '',
243
- f_material_unit: '',
244
- f_material_number: '',
245
- f_bjq_sid: '',
246
- f_material_code: '',
247
- f_userinfo_code:''
248
- }
249
- ],
250
- meterialOptions: [],
251
- row: {},
252
- bjqChecklag:[],
253
- fmaterialname:{},
254
- isShow:[false]
255
- }
256
- },
257
- ready() {
258
- this.getOnetoManyData()
259
- },
260
- methods: {
261
- async getOnetoManyData () {
262
- let http = new HttpResetClass()
263
- let data = {
264
- tablename: `t_material_apply`,
265
- condition: `f_process_id='${this.selectdata.f_process_id}'`
266
- }
267
- let res = await http.load(
268
- 'POST',
269
- `${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable?aaa=123`,
270
- {data: data},
271
- {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
272
- )
273
- this.onetomany.rows = res.data
274
- },
275
- async openMaterialModal() {
276
- this.getMateralNames()
277
- this.title = '新增'
278
- this.materials = [
279
- {
280
- material: '',
281
- f_material_name: '',
282
- f_material_style: '',
283
- f_material_unit: '',
284
- f_material_number: '',
285
- f_bjq_sid: '',
286
- f_material_code: '',
287
- f_userinfo_code: ''
288
- }
289
- ],
290
- this.showMaterialModal = true
291
- this.isShow = [false]
292
- },
293
- deleteDevicesinfo(index) {
294
- this.materials.splice(index, 1)
295
- this.isShow.splice(index, 1)
296
- },
297
- pushMaterial() {
298
- this.materials.push({
299
- material: '',
300
- f_material_name: '',
301
- f_material_style: '',
302
- f_material_unit: '',
303
- f_material_number: '',
304
- f_bjq_sid: '',
305
- f_material_code: '',
306
- f_userinfo_code: ''
307
- })
308
- this.isShow.push(false)
309
- },
310
- // 获取模态框材料
311
- async getMateralNames() {
312
- let data = {
313
- condition: `1=1`
314
- }
315
- let http = new HttpResetClass()
316
- let res = await http.load(
317
- 'POST',
318
- `${this.$androidUtil.getProxyUrl()}/rs/sql/getStockMaterial`,
319
- {data: data},
320
- {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
321
- )
322
-
323
- this.meterialOptions = res.data.map(item => {
324
- return {
325
- 'label': `${item.f_material_name}--${item.f_material_style}`,
326
- 'value': item
327
- }
328
- })
329
- },
330
- modifyOtherValue(index) {
331
- console.log("进来了", index)
332
- console.log("dddd", this.materials[index].material)
333
- let material = this.materials[index].material
334
- this.materials[index].f_material_name = material.f_material_name
335
- this.materials[index].f_material_style = material.f_material_style
336
- this.materials[index].f_material_unit = material.f_material_unit
337
- this.materials[index].f_material_number = material.f_material_number
338
- this.materials[index].f_material_code = material.f_material_code
339
- this.materials[index].f_userinfo_code = material.f_userinfo_code
340
- if (material.f_material_name === "报警器-汉威") {
341
- this.isShow[index] = true
342
- } else {
343
- this.isShow[index] = false
344
- }
345
- this.isShow.splice(0, 1, this.isShow[0])
346
- },
347
- // 新增材料
348
- async addMaterial() {
349
- this.title = '新增'
350
- let data = {
351
- f_process_id: this.selectdata.f_process_id,
352
- f_operator_id: Vue.user.id,
353
- f_operator: Vue.user.name,
354
- f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
355
- f_orgid: Vue.user.orgid,
356
- f_orgname: Vue.user.orgs,
357
- materials: this.materials
358
- }
359
-
360
- //报警器流程 设备编号检验
361
- await this.bjqCheck()
362
- if (this.bjqChecklag.length > 0) {
363
- return
364
- }
365
-
366
- let http = new HttpResetClass()
367
- let res = await http.load(
368
- 'POST',
369
- `${this.$androidUtil.getProxyUrl()}/rs/logic/saveMaterials`,
370
- data
371
- )
372
- this.closeMaterials()
373
- },
374
- async deleteMaterial(row) {
375
- debugger
376
- var show1 = window.confirm('您确定要删除这条记录吗?')
377
- if(show1 != true){
378
- this.closeMaterials()
379
- }else{
380
- let http = new HttpResetClass()
381
- let res = await http.load(
382
- 'POST',
383
- `${this.$androidUtil.getProxyUrl()}/rs/logic/deleteMaterial`,
384
- {data: row},
385
- {resolveMsg: null, rejectMsg: '材料删除失败!!!'}
386
- )
387
- this.closeMaterials()
388
- }
389
- }
390
- ,
391
- async updateMaterial(index, row) {
392
- this.title = '修改'
393
- this.row = row
394
- this.getMateralNames()
395
- this.materials = [
396
- {
397
- material: '',
398
- f_material_name: row.f_material_name,
399
- f_material_style: row.f_material_style,
400
- f_material_unit: row.f_material_unit,
401
- f_material_number: row.f_material_number,
402
- f_material_code: row.f_material_code,
403
- f_bjq_sid: row.f_bjq_sid,
404
- f_userinfo_code: row.f_userinfo_code
405
- }
406
- ]
407
- this.showMaterialModal = true
408
- },
409
- async updateConfirm() {
410
- let data = this.row
411
- data.f_material_name = this.materials[0].f_material_name
412
- data.f_material_style = this.materials[0].f_material_style
413
- data.f_material_unit = this.materials[0].f_material_unit
414
- data.f_material_number = this.materials[0].f_material_number
415
- data.f_material_code = this.materials[0].f_material_code
416
- data.f_bjq_sid = this.materials[0].f_bjq_sid
417
- data.f_userinfo_code=this.materials[0].f_userinfo_code
418
-
419
- //报警器流程 设备编号检验
420
- await this.bjqCheck()
421
- if (this.bjqChecklag.length > 0){
422
- return
423
- }
424
-
425
- let http = new HttpResetClass()
426
- let res = await http.load(
427
- 'POST',
428
- `${this.$androidUtil.getProxyUrl()}/rs/entity/t_material_apply`,
429
- data
430
- )
431
- this.closeMaterials()
432
- },
433
- sycronizedCode(index,val){
434
- console.log("看看:",index,val)
435
- this.materials[index].f_material_code = val
436
- },
437
- closeMaterials() {
438
- this.getOnetoManyData()
439
- this.showMaterialModal = false
440
- },
441
- async bjqCheck(){
442
- //报警器设备型号校验
443
- this.bjqChecklag = [] //初始化
444
- if (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建'){
445
- let bjqinfo = {
446
- f_material_name : "",
447
- f_bjq_sid: ""
448
- }
449
- for (const bjqinfoElement of this.materials) {
450
- bjqinfo.f_bjq_sid = bjqinfoElement.f_bjq_sid
451
- bjqinfo.f_material_name = bjqinfoElement.f_material_name
452
- if (bjqinfo.f_material_name.substr(0,3) === '报警器'){
453
- let http = new HttpResetClass()
454
- let res = await http.load(
455
- 'POST',
456
- // `/rs/logic/bjqcheck`,
457
- `${this.$androidUtil.getProxyUrl()}/ncc/rs/logic/bjqcheck`,
458
- bjqinfo
459
- )
460
- if (res.data.code != 200){
461
- this.bjqChecklag.push(res.data.code)
462
- //this.$showMessage(res.data.msg)
463
- Vue.showAlert(res.data.msg, 'danger', 6000)
464
- return
465
- }
466
- }
467
- }
468
- }
469
- }
470
- }
471
- }
472
-
473
- </script>
474
-
475
- <style scoped>
476
-
477
- </style>
1
+ <template>
2
+ <div>
3
+ <data-grid :model="onetomany" class="list_area table_sy">
4
+ <template partial='head'>
5
+ <tr>
6
+ <th class="textNoLineBreak">序号</th>
7
+ <th class="textNoLineBreak">材料名称</th>
8
+ <th class="textNoLineBreak">材料型号</th>
9
+ <th class="textNoLineBreak">材料单位</th>
10
+ <th class="textNoLineBreak">材料数量</th>
11
+ <th class="textNoLineBreak">材料编号</th>
12
+ <th class="textNoLineBreak">材料标识</th>
13
+ <th class="textNoLineBreak">用户编号</th>
14
+ <th class="textNoLineBreak">
15
+ <button class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal()">添加
16
+ </button>
17
+ </th>
18
+ </tr>
19
+ </template>
20
+ <template partial='body'>
21
+ <tr>
22
+ <td style="text-align: center;">
23
+ <nobr>{{$index+1}}</nobr>
24
+ </td>
25
+ <td style="text-align: center;">
26
+ <nobr>{{row.f_material_name}}</nobr>
27
+ </td>
28
+ <td style="text-align: center;">
29
+ <nobr>{{row.f_material_style}}</nobr>
30
+ </td>
31
+ <td style="text-align: center;">
32
+ <nobr>{{row.f_material_unit}}</nobr>
33
+ </td>
34
+ <td style="text-align: center;">
35
+ <nobr>{{row.f_material_number}}</nobr>
36
+ </td>
37
+ <td style="text-align: center;">
38
+ <nobr>{{row.f_bjq_sid}}</nobr>
39
+ </td>
40
+ <td style="text-align: center;">
41
+ <nobr>{{row.f_material_code}}</nobr>
42
+ </td>
43
+ <td style="text-align: center;">
44
+ <nobr>{{row.f_userinfo_code}}</nobr>
45
+ </td>
46
+ <td style="text-align: center;">
47
+ <button type="button" class="button_search button_spacing"
48
+ @click="$parent.$parent.updateMaterial($index,row)">修改
49
+ </button>
50
+ <button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除
51
+ </button>
52
+ </td>
53
+ </tr>
54
+ </template>
55
+ </data-grid>
56
+ <modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal :large="true"
57
+ :backdrop="false" :title="title">
58
+ <header slot="modal-header" class="modal-header">
59
+ <button type="button" class="close" @click="closeMaterials"><span>&times;</span></button>
60
+ <h4 class="modal-title">{{title}}</h4>
61
+ </header>
62
+ <article slot="modal-body" class="modal-body clearfix">
63
+ <div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
64
+ <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
65
+ <div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
66
+ <div class="col-sm-6 text-right">
67
+ <button
68
+ class="button_delete button_spacing"
69
+ @click.prevent="deleteDevicesinfo(i)"
70
+ v-if="title === '新增'"
71
+ >删除
72
+ </button>
73
+ </div>
74
+ </div>
75
+ <div class="form-group col-sm-6">
76
+ <label class="col-sm-4 control-label">选择材料:</label>
77
+ <div class="col-sm-8">
78
+ <input-select
79
+ class="select select_list"
80
+ :value.sync="item.material"
81
+ v-model="item.material"
82
+ :options="meterialOptions"
83
+ :disable="mark === 1"
84
+ @change="modifyOtherValue(i)"
85
+ :valueSingle="true"></input-select>
86
+ </div>
87
+ </div>
88
+ <div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
89
+ <label class="col-sm-4 control-label">材料名称:</label>
90
+ <div class="col-sm-8">
91
+ <input class="form-control input_view" style="" type="text"
92
+ placeholder="材料名称"
93
+ v-model="item.f_material_name"
94
+ :value="item.f_material_name"
95
+ />
96
+ </div>
97
+ </div>
98
+ <div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
99
+ <label class="col-sm-4 control-label">材料型号:</label>
100
+ <div class="col-sm-8">
101
+ <input class="form-control input_view" style="" type="text"
102
+ placeholder="材料型号"
103
+ v-model="item.f_material_style"
104
+ :value="item.f_material_style"
105
+ />
106
+ </div>
107
+ </div>
108
+ <div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
109
+ <label class="col-sm-4 control-label">材料单位:</label>
110
+ <div class="col-sm-8">
111
+ <input class="form-control input_view" style="" type="text"
112
+ placeholder="材料单位"
113
+ v-model="item.f_material_unit"
114
+ :value="item.f_material_unit"
115
+ />
116
+ </div>
117
+ </div>
118
+ <div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
119
+ <label class="col-sm-4 control-label">材料数量:</label>
120
+ <div class="col-sm-8">
121
+ <input class="form-control input_view" style="" type="number"
122
+ placeholder="设备数量"
123
+ v-model="item.f_material_number"
124
+ :value="item.f_material_number"
125
+ />
126
+ </div>
127
+ </div>
128
+ <div class="form-group col-sm-6">
129
+ <label class="col-sm-4 control-label">材料编号:</label>
130
+ <div class="col-sm-8">
131
+ <input class="form-control input_view" style="" type="text"
132
+ placeholder="材料编号"
133
+ v-model="item.f_bjq_sid"
134
+ :value="item.f_bjq_sid"
135
+ />
136
+ </div>
137
+ </div>
138
+ <div class="form-group col-sm-6">
139
+ <label class="col-sm-4 control-label">材料标识:</label>
140
+ <div class="col-sm-8">
141
+ <input class="form-control input_view" style=""
142
+ placeholder="材料标识"
143
+ v-model="item.f_material_code"
144
+ :value.sync="item.f_material_code"
145
+ />
146
+ </div>
147
+ </div>
148
+ <div class="form-group col-sm-6">
149
+ <label class="col-sm-4 control-label">用户编号:</label>
150
+ <div class="col-sm-8">
151
+ <input class="form-control input_view" style=""
152
+ placeholder="用户编号"
153
+ v-model="item.f_userinfo_code"
154
+ :value.sync="item.f_userinfo_code"
155
+ />
156
+ </div>
157
+ </div>
158
+ <div class="form-group col-sm-6">
159
+ <label class="col-sm-4 control-label"></label>
160
+ <div class="col-sm-8">
161
+
162
+ </div>
163
+ </div>
164
+ <div class="form-group col-sm-6">
165
+ <label class="col-sm-4 control-label"></label>
166
+ <div class="col-sm-8">
167
+
168
+ </div>
169
+ </div>
170
+ <div class="form-group col-sm-6">
171
+ <label class="col-sm-4 control-label"></label>
172
+ <div class="col-sm-8">
173
+
174
+ </div>
175
+ </div>
176
+ <div class="form-group col-sm-6">
177
+ <label class="col-sm-4 control-label"></label>
178
+ <div class="col-sm-8">
179
+
180
+ </div>
181
+ </div>
182
+ <div class="form-group col-sm-6">
183
+ <label class="col-sm-4 control-label"></label>
184
+ <div class="col-sm-8">
185
+
186
+ </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
+
192
+ </div>
193
+ </div>
194
+ <div class="form-group col-sm-6">
195
+ <label class="col-sm-4 control-label"></label>
196
+ <div class="col-sm-8">
197
+
198
+ </div>
199
+ </div>
200
+ <div v-if=" (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建')">
201
+ <app-qrcode-reader :istype = fmaterialname :index = i v-show="isShow[i]"></app-qrcode-reader>
202
+ </div>
203
+ </div>
204
+ </article>
205
+ <footer slot="modal-footer" class="modal-footer">
206
+ <template v-if="mark !== 1">
207
+ <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
208
+ <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()"
209
+ :disabled="!$v.valid">确认添加
210
+ </button>
211
+ <button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()"
212
+ :disabled="!$v.valid">确认修改
213
+ </button>
214
+ </template>
215
+ </footer>
216
+ </modal>
217
+ </div>
218
+ </template>
219
+
220
+ <script>
221
+ import Vue from 'vue'
222
+ import {HttpResetClass} from 'vue-client'
223
+
224
+ export default {
225
+ name: 'addMaterialScience',
226
+ props: {
227
+ selectdata: {
228
+ type: Object
229
+ }
230
+ },
231
+ data() {
232
+ return {
233
+ onetomany: {
234
+ rows: []
235
+ },
236
+ title: '新增',
237
+ showMaterialModal: false,
238
+ materials: [
239
+ {
240
+ material: '',
241
+ f_material_name: '',
242
+ f_material_style: '',
243
+ f_material_unit: '',
244
+ f_material_number: '',
245
+ f_bjq_sid: '',
246
+ f_material_code: '',
247
+ f_userinfo_code:''
248
+ }
249
+ ],
250
+ meterialOptions: [],
251
+ row: {},
252
+ bjqChecklag:[],
253
+ fmaterialname:{},
254
+ isShow:[false]
255
+ }
256
+ },
257
+ ready() {
258
+ this.getOnetoManyData()
259
+ },
260
+ methods: {
261
+ async getOnetoManyData () {
262
+ let http = new HttpResetClass()
263
+ let data = {
264
+ tablename: `t_material_apply`,
265
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
266
+ }
267
+ let res = await http.load(
268
+ 'POST',
269
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable?aaa=123`,
270
+ {data: data},
271
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
272
+ )
273
+ this.onetomany.rows = res.data
274
+ },
275
+ async openMaterialModal() {
276
+ this.getMateralNames()
277
+ this.title = '新增'
278
+ this.materials = [
279
+ {
280
+ material: '',
281
+ f_material_name: '',
282
+ f_material_style: '',
283
+ f_material_unit: '',
284
+ f_material_number: '',
285
+ f_bjq_sid: '',
286
+ f_material_code: '',
287
+ f_userinfo_code: ''
288
+ }
289
+ ],
290
+ this.showMaterialModal = true
291
+ this.isShow = [false]
292
+ },
293
+ deleteDevicesinfo(index) {
294
+ this.materials.splice(index, 1)
295
+ this.isShow.splice(index, 1)
296
+ },
297
+ pushMaterial() {
298
+ this.materials.push({
299
+ material: '',
300
+ f_material_name: '',
301
+ f_material_style: '',
302
+ f_material_unit: '',
303
+ f_material_number: '',
304
+ f_bjq_sid: '',
305
+ f_material_code: '',
306
+ f_userinfo_code: ''
307
+ })
308
+ this.isShow.push(false)
309
+ },
310
+ // 获取模态框材料
311
+ async getMateralNames() {
312
+ let data = {
313
+ condition: `1=1`
314
+ }
315
+ let http = new HttpResetClass()
316
+ let res = await http.load(
317
+ 'POST',
318
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/getStockMaterial`,
319
+ {data: data},
320
+ {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
321
+ )
322
+
323
+ this.meterialOptions = res.data.map(item => {
324
+ return {
325
+ 'label': `${item.f_material_name}--${item.f_material_style}`,
326
+ 'value': item
327
+ }
328
+ })
329
+ },
330
+ modifyOtherValue(index) {
331
+ console.log("进来了", index)
332
+ console.log("dddd", this.materials[index].material)
333
+ let material = this.materials[index].material
334
+ this.materials[index].f_material_name = material.f_material_name
335
+ this.materials[index].f_material_style = material.f_material_style
336
+ this.materials[index].f_material_unit = material.f_material_unit
337
+ this.materials[index].f_material_number = material.f_material_number
338
+ this.materials[index].f_material_code = material.f_material_code
339
+ this.materials[index].f_userinfo_code = material.f_userinfo_code
340
+ if (material.f_material_name === "报警器-汉威") {
341
+ this.isShow[index] = true
342
+ } else {
343
+ this.isShow[index] = false
344
+ }
345
+ this.isShow.splice(0, 1, this.isShow[0])
346
+ },
347
+ // 新增材料
348
+ async addMaterial() {
349
+ this.title = '新增'
350
+ let data = {
351
+ f_process_id: this.selectdata.f_process_id,
352
+ f_operator_id: Vue.user.id,
353
+ f_operator: Vue.user.name,
354
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
355
+ f_orgid: Vue.user.orgid,
356
+ f_orgname: Vue.user.orgs,
357
+ materials: this.materials
358
+ }
359
+
360
+ //报警器流程 设备编号检验
361
+ await this.bjqCheck()
362
+ if (this.bjqChecklag.length > 0) {
363
+ return
364
+ }
365
+
366
+ let http = new HttpResetClass()
367
+ let res = await http.load(
368
+ 'POST',
369
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/saveMaterials`,
370
+ data
371
+ )
372
+ this.closeMaterials()
373
+ },
374
+ async deleteMaterial(row) {
375
+ debugger
376
+ var show1 = window.confirm('您确定要删除这条记录吗?')
377
+ if(show1 != true){
378
+ this.closeMaterials()
379
+ }else{
380
+ let http = new HttpResetClass()
381
+ let res = await http.load(
382
+ 'POST',
383
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/deleteMaterial`,
384
+ {data: row},
385
+ {resolveMsg: null, rejectMsg: '材料删除失败!!!'}
386
+ )
387
+ this.closeMaterials()
388
+ }
389
+ }
390
+ ,
391
+ async updateMaterial(index, row) {
392
+ this.title = '修改'
393
+ this.row = row
394
+ this.getMateralNames()
395
+ this.materials = [
396
+ {
397
+ material: '',
398
+ f_material_name: row.f_material_name,
399
+ f_material_style: row.f_material_style,
400
+ f_material_unit: row.f_material_unit,
401
+ f_material_number: row.f_material_number,
402
+ f_material_code: row.f_material_code,
403
+ f_bjq_sid: row.f_bjq_sid,
404
+ f_userinfo_code: row.f_userinfo_code
405
+ }
406
+ ]
407
+ this.showMaterialModal = true
408
+ },
409
+ async updateConfirm() {
410
+ let data = this.row
411
+ data.f_material_name = this.materials[0].f_material_name
412
+ data.f_material_style = this.materials[0].f_material_style
413
+ data.f_material_unit = this.materials[0].f_material_unit
414
+ data.f_material_number = this.materials[0].f_material_number
415
+ data.f_material_code = this.materials[0].f_material_code
416
+ data.f_bjq_sid = this.materials[0].f_bjq_sid
417
+ data.f_userinfo_code=this.materials[0].f_userinfo_code
418
+
419
+ //报警器流程 设备编号检验
420
+ await this.bjqCheck()
421
+ if (this.bjqChecklag.length > 0){
422
+ return
423
+ }
424
+
425
+ let http = new HttpResetClass()
426
+ let res = await http.load(
427
+ 'POST',
428
+ `${this.$androidUtil.getProxyUrl()}/rs/entity/t_material_apply`,
429
+ data
430
+ )
431
+ this.closeMaterials()
432
+ },
433
+ sycronizedCode(index,val){
434
+ console.log("看看:",index,val)
435
+ this.materials[index].f_material_code = val
436
+ },
437
+ closeMaterials() {
438
+ this.getOnetoManyData()
439
+ this.showMaterialModal = false
440
+ },
441
+ async bjqCheck(){
442
+ //报警器设备型号校验
443
+ this.bjqChecklag = [] //初始化
444
+ if (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建'){
445
+ let bjqinfo = {
446
+ f_material_name : "",
447
+ f_bjq_sid: ""
448
+ }
449
+ for (const bjqinfoElement of this.materials) {
450
+ bjqinfo.f_bjq_sid = bjqinfoElement.f_bjq_sid
451
+ bjqinfo.f_material_name = bjqinfoElement.f_material_name
452
+ if (bjqinfo.f_material_name.substr(0,3) === '报警器'){
453
+ let http = new HttpResetClass()
454
+ let res = await http.load(
455
+ 'POST',
456
+ // `/rs/logic/bjqcheck`,
457
+ `${this.$androidUtil.getProxyUrl()}/ncc/rs/logic/bjqcheck`,
458
+ bjqinfo
459
+ )
460
+ if (res.data.code != 200){
461
+ this.bjqChecklag.push(res.data.code)
462
+ //this.$showMessage(res.data.msg)
463
+ Vue.showAlert(res.data.msg, 'danger', 6000)
464
+ return
465
+ }
466
+ }
467
+ }
468
+ }
469
+ }
470
+ }
471
+ }
472
+
473
+ </script>
474
+
475
+ <style scoped>
476
+
477
+ </style>