apply-clients 3.5.1 → 3.5.3

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 (45) hide show
  1. package/build/dev-server.js +142 -133
  2. package/package.json +118 -118
  3. package/src/App.vue +26 -21
  4. package/src/applyAndroid.js +58 -58
  5. package/src/components/android/AppSign.vue +152 -152
  6. package/src/components/android/AppTakePic.vue +181 -181
  7. package/src/components/android/Process/AppChargeList.vue +224 -224
  8. package/src/components/android/Process/AppExplorationUser.vue +508 -508
  9. package/src/components/android/Process/AppOtherChargeList.vue +255 -219
  10. package/src/components/product/Install/ContractCharge.vue +210 -210
  11. package/src/filiale/fugou/android/AppChargeManagement.vue +625 -625
  12. package/src/filiale/hongda/pc/FunctionServiceControl.vue +526 -525
  13. package/src/filiale/qianneng/android/AppExplorationUser.vue +441 -441
  14. package/src/filiale/qianneng/android/AppServiceControl.vue +1608 -1608
  15. package/src/filiale/qianneng/pc/Applybatchdispatch.vue +685 -685
  16. package/src/filiale/qianneng/pc/ExplorationSelect.vue +492 -492
  17. package/src/filiale/qianneng/pc/FunctionServiceControl.vue +521 -521
  18. package/src/filiale/qianneng/pc/InstallInfoSelect.vue +392 -392
  19. package/src/filiale/qianneng/pc/InstallationDetails.vue +561 -561
  20. package/src/filiale/qianneng/pc/ServiceControl.vue +1351 -1340
  21. package/src/filiale/qianneng/pc/SupervisoryList.vue +344 -344
  22. package/src/filiale/qianneng/pc/SupervisoryServiceControl.vue +871 -871
  23. package/src/filiale/qianneng/pc/chargeManagement.vue +656 -656
  24. package/src/filiale/qianneng/pc/printactivatecard.vue +295 -295
  25. package/src/filiale/qianneng/pc/supplementalAgreement.vue +344 -344
  26. package/src/filiale/yangchunboneng/android/AppAddMaterialScience.vue +390 -390
  27. package/src/filiale/yangchunboneng/android/AppChargeManagement.vue +120 -120
  28. package/src/filiale/yangchunboneng/android/AppDevicesManagement.vue +552 -552
  29. package/src/filiale/yangchunboneng/android/AppExplorationUser.vue +507 -507
  30. package/src/filiale/yangchunboneng/android/AppInstallationDetails.vue +492 -492
  31. package/src/filiale/yangchunboneng/android/AppOtherChargeManagement.vue +116 -116
  32. package/src/filiale/yangchunboneng/android/AppServiceControl.vue +1552 -1552
  33. package/src/filiale/yangchunboneng/android/AppTakePic.vue +181 -181
  34. package/src/filiale/yangchunboneng/android/chargesList.vue +170 -170
  35. package/src/filiale/yangchunboneng/android.js +16 -16
  36. package/src/filiale/yangchunboneng/pc/ExplorationSelect.vue +496 -496
  37. package/src/filiale/yangchunboneng/pc/InstallationDetails.vue +609 -609
  38. package/src/filiale/yangchunboneng/pc/ServiceControl.vue +1782 -1782
  39. package/src/filiale/yangchunboneng/pc/ServiceView.vue +1005 -1005
  40. package/src/filiale/yangchunboneng/pc/addMaterialScience.vue +374 -374
  41. package/src/filiale/yangchunboneng/pc/chargeManagement.vue +960 -960
  42. package/src/filiale/yangchunboneng/pc/devicesManagement.vue +511 -511
  43. package/src/filiale/yangchunboneng/pc/otherchargeManagement.vue +214 -214
  44. package/src/filiale/yangchunboneng/pc.js +17 -17
  45. package/src/main.js +23 -23
@@ -1,390 +1,390 @@
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">
12
- <button class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal()">添加
13
- </button>
14
- </th>
15
- </tr>
16
- </template>
17
- <template partial='body'>
18
- <tr>
19
- <td style="text-align: center;">
20
- <nobr>{{$index+1}}</nobr>
21
- </td>
22
- <td style="text-align: center;">
23
- <nobr>{{row.f_material_name}}</nobr>
24
- </td>
25
- <td style="text-align: center;">
26
- <nobr>{{row.f_material_style}}</nobr>
27
- </td>
28
- <td style="text-align: center;">
29
- <nobr>{{row.f_material_unit}}</nobr>
30
- </td>
31
- <td style="text-align: center;">
32
- <nobr>{{row.f_material_number}}</nobr>
33
- </td>
34
- <td style="text-align: center;">
35
- <button type="button" class="button_search button_spacing"
36
- @click="$parent.$parent.updateMaterial($index,row)">修改
37
- </button>
38
- <button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除
39
- </button>
40
- </td>
41
- </tr>
42
- </template>
43
- </data-grid>
44
- <modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal :large="true"
45
- :backdrop="false" :title="title">
46
- <header slot="modal-header" class="modal-header">
47
- <button type="button" class="close" @click="closeMaterials"><span>&times;</span></button>
48
- <h4 class="modal-title">{{title}}</h4>
49
- </header>
50
- <article slot="modal-body" class="modal-body clearfix">
51
- <div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
52
- <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
53
- <div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
54
- <div class="col-sm-6 text-right">
55
- <button
56
- class="button_delete button_spacing"
57
- @click.prevent="deleteDevicesinfo(i)"
58
- v-if="title === '新增'"
59
- >删除
60
- </button>
61
- </div>
62
- </div>
63
- <div class="form-group col-sm-6">
64
- <label class="col-sm-4 control-label">选择材料:</label>
65
- <div class="col-sm-8">
66
- <input-select
67
- class="select select_list"
68
- :value.sync="item.material"
69
- v-model="item.material"
70
- :options="meterialOptions"
71
- :disable="mark === 1"
72
- @change="modifyOtherValue(i)"
73
- :valueSingle="true"></input-select>
74
- </div>
75
- </div>
76
- <div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
77
- <label class="col-sm-4 control-label">材料名称:</label>
78
- <div class="col-sm-8">
79
- <input class="form-control input_view" style="" type="text"
80
- placeholder="材料名称"
81
- v-model="item.f_material_name"
82
- :value="item.f_material_name"
83
- />
84
- </div>
85
- </div>
86
- <div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
87
- <label class="col-sm-4 control-label">材料型号:</label>
88
- <div class="col-sm-8">
89
- <input class="form-control input_view" style="" type="text"
90
- placeholder="材料型号"
91
- v-model="item.f_material_style"
92
- :value="item.f_material_style"
93
- />
94
- </div>
95
- </div>
96
- <div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
97
- <label class="col-sm-4 control-label">材料单位:</label>
98
- <div class="col-sm-8">
99
- <input class="form-control input_view" style="" type="text"
100
- placeholder="材料单位"
101
- v-model="item.f_material_unit"
102
- :value="item.f_material_unit"
103
- />
104
- </div>
105
- </div>
106
- <div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
107
- <label class="col-sm-4 control-label">材料数量:</label>
108
- <div class="col-sm-8">
109
- <input class="form-control input_view" style="" type="number"
110
- placeholder="设备数量"
111
- v-model="item.f_material_number"
112
- :value="item.f_material_number"
113
- />
114
- </div>
115
- </div>
116
- </div>
117
- </article>
118
- <footer slot="modal-footer" class="modal-footer">
119
- <template v-if="mark !== 1">
120
- <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
121
- <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()"
122
- :disabled="!$v.valid">确认添加
123
- </button>
124
- <button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()"
125
- :disabled="!$v.valid">确认修改
126
- </button>
127
- </template>
128
- </footer>
129
- </modal>
130
- </div>
131
- </template>
132
-
133
- <script>
134
- import Vue from 'vue'
135
- import {HttpResetClass} from 'vue-client'
136
-
137
- export default {
138
- name: 'addMaterialScience',
139
- props: {
140
- selectdata: {
141
- type: Object
142
- }
143
- },
144
- data() {
145
- return {
146
- onetomany: {
147
- rows: []
148
- },
149
- title: '新增',
150
- showMaterialModal: false,
151
- materials: [
152
- {
153
- material: '',
154
- f_material_name: '',
155
- f_material_style: '',
156
- f_material_unit: '',
157
- f_material_number: '',
158
- f_bjq_sid: '',
159
- f_material_code: '',
160
- f_userinfo_code:''
161
- }
162
- ],
163
- meterialOptions: [],
164
- row: {},
165
- bjqChecklag:[],
166
- fmaterialname:{},
167
- isShow:[false]
168
- }
169
- },
170
- ready() {
171
- this.getOnetoManyData()
172
- },
173
- methods: {
174
- async getOnetoManyData () {
175
- let http = new HttpResetClass()
176
- let data = {
177
- tablename: `t_material_apply`,
178
- condition: `f_process_id='${this.selectdata.f_process_id}'`
179
- }
180
- let res = await http.load(
181
- 'POST',
182
- `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable?aaa=123`,
183
- {data: data},
184
- {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
185
- )
186
- this.onetomany.rows = res.data
187
- },
188
- async openMaterialModal() {
189
- this.getMateralNames()
190
- this.title = '新增'
191
- this.materials = [
192
- {
193
- material: '',
194
- f_material_name: '',
195
- f_material_style: '',
196
- f_material_unit: '',
197
- f_material_number: '',
198
- f_bjq_sid: '',
199
- f_material_code: '',
200
- f_userinfo_code: ''
201
- }
202
- ],
203
- this.showMaterialModal = true
204
- this.isShow = [false]
205
- },
206
- deleteDevicesinfo(index) {
207
- this.materials.splice(index, 1)
208
- this.isShow.splice(index, 1)
209
- },
210
- pushMaterial() {
211
- this.materials.push({
212
- material: '',
213
- f_material_name: '',
214
- f_material_style: '',
215
- f_material_unit: '',
216
- f_material_number: '',
217
- f_bjq_sid: '',
218
- f_material_code: '',
219
- f_userinfo_code: ''
220
- })
221
- this.isShow.push(false)
222
- },
223
- // 获取模态框材料
224
- async getMateralNames() {
225
- let data = {
226
- condition: `1=1`
227
- }
228
- let http = new HttpResetClass()
229
- let res = await http.load(
230
- 'POST',
231
- `${this.$androidUtil.getProxyUrl()}/rs/sql/getStockMaterial`,
232
- {data: data},
233
- {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
234
- )
235
-
236
- this.meterialOptions = res.data.map(item => {
237
- return {
238
- 'label': `${item.f_material_name}--${item.f_material_style}`,
239
- 'value': item
240
- }
241
- })
242
- },
243
- modifyOtherValue(index) {
244
- console.log("进来了", index)
245
- console.log("dddd", this.materials[index].material)
246
- let material = this.materials[index].material
247
- this.materials[index].f_material_name = material.f_material_name
248
- this.materials[index].f_material_style = material.f_material_style
249
- this.materials[index].f_material_unit = material.f_material_unit
250
- this.materials[index].f_material_number = material.f_material_number
251
- this.materials[index].f_material_code = material.f_material_code
252
- this.materials[index].f_userinfo_code = material.f_userinfo_code
253
- if (material.f_material_name === "报警器-汉威") {
254
- this.isShow[index] = true
255
- } else {
256
- this.isShow[index] = false
257
- }
258
- this.isShow.splice(0, 1, this.isShow[0])
259
- },
260
- // 新增材料
261
- async addMaterial() {
262
- this.title = '新增'
263
- let data = {
264
- f_process_id: this.selectdata.f_process_id,
265
- f_operator_id: Vue.user.id,
266
- f_operator: Vue.user.name,
267
- f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
268
- f_orgid: Vue.user.orgid,
269
- f_orgname: Vue.user.orgs,
270
- materials: this.materials
271
- }
272
-
273
- //报警器流程 设备编号检验
274
- await this.bjqCheck()
275
- if (this.bjqChecklag.length > 0) {
276
- return
277
- }
278
-
279
- let http = new HttpResetClass()
280
- let res = await http.load(
281
- 'POST',
282
- `${this.$androidUtil.getProxyUrl()}/apply/rs/logic/saveMaterials`,
283
- data
284
- )
285
- this.closeMaterials()
286
- },
287
- async deleteMaterial(row) {
288
- debugger
289
- var show1 = window.confirm('您确定要删除这条记录吗?')
290
- if(show1 != true){
291
- this.closeMaterials()
292
- }else{
293
- let http = new HttpResetClass()
294
- let res = await http.load(
295
- 'POST',
296
- `${this.$androidUtil.getProxyUrl()}/rs/logic/deleteMaterial`,
297
- {data: row},
298
- {resolveMsg: null, rejectMsg: '材料删除失败!!!'}
299
- )
300
- this.closeMaterials()
301
- }
302
- }
303
- ,
304
- async updateMaterial(index, row) {
305
- this.title = '修改'
306
- this.row = row
307
- this.getMateralNames()
308
- this.materials = [
309
- {
310
- material: '',
311
- f_material_name: row.f_material_name,
312
- f_material_style: row.f_material_style,
313
- f_material_unit: row.f_material_unit,
314
- f_material_number: row.f_material_number,
315
- f_material_code: row.f_material_code,
316
- f_bjq_sid: row.f_bjq_sid,
317
- f_userinfo_code: row.f_userinfo_code
318
- }
319
- ]
320
- this.showMaterialModal = true
321
- },
322
- async updateConfirm() {
323
- let data = this.row
324
- data.f_material_name = this.materials[0].f_material_name
325
- data.f_material_style = this.materials[0].f_material_style
326
- data.f_material_unit = this.materials[0].f_material_unit
327
- data.f_material_number = this.materials[0].f_material_number
328
- data.f_material_code = this.materials[0].f_material_code
329
- data.f_bjq_sid = this.materials[0].f_bjq_sid
330
- data.f_userinfo_code=this.materials[0].f_userinfo_code
331
-
332
- //报警器流程 设备编号检验
333
- await this.bjqCheck()
334
- if (this.bjqChecklag.length > 0){
335
- return
336
- }
337
-
338
- let http = new HttpResetClass()
339
- let res = await http.load(
340
- 'POST',
341
- `${this.$androidUtil.getProxyUrl()}/rs/entity/t_material_apply`,
342
- data
343
- )
344
- this.closeMaterials()
345
- },
346
- sycronizedCode(index,val){
347
- console.log("看看:",index,val)
348
- this.materials[index].f_material_code = val
349
- },
350
- closeMaterials() {
351
- this.getOnetoManyData()
352
- this.showMaterialModal = false
353
- },
354
- async bjqCheck(){
355
- //报警器设备型号校验
356
- this.bjqChecklag = [] //初始化
357
- if (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建'){
358
- let bjqinfo = {
359
- f_material_name : "",
360
- f_bjq_sid: ""
361
- }
362
- for (const bjqinfoElement of this.materials) {
363
- bjqinfo.f_bjq_sid = bjqinfoElement.f_bjq_sid
364
- bjqinfo.f_material_name = bjqinfoElement.f_material_name
365
- if (bjqinfo.f_material_name.substr(0,3) === '报警器'){
366
- let http = new HttpResetClass()
367
- let res = await http.load(
368
- 'POST',
369
- // `/rs/logic/bjqcheck`,
370
- `${this.$androidUtil.getProxyUrl()}/ncc/rs/logic/bjqcheck`,
371
- bjqinfo
372
- )
373
- if (res.data.code != 200){
374
- this.bjqChecklag.push(res.data.code)
375
- //this.$showMessage(res.data.msg)
376
- Vue.showAlert(res.data.msg, 'danger', 6000)
377
- return
378
- }
379
- }
380
- }
381
- }
382
- }
383
- }
384
- }
385
-
386
- </script>
387
-
388
- <style scoped>
389
-
390
- </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">
12
+ <button class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal()">添加
13
+ </button>
14
+ </th>
15
+ </tr>
16
+ </template>
17
+ <template partial='body'>
18
+ <tr>
19
+ <td style="text-align: center;">
20
+ <nobr>{{$index+1}}</nobr>
21
+ </td>
22
+ <td style="text-align: center;">
23
+ <nobr>{{row.f_material_name}}</nobr>
24
+ </td>
25
+ <td style="text-align: center;">
26
+ <nobr>{{row.f_material_style}}</nobr>
27
+ </td>
28
+ <td style="text-align: center;">
29
+ <nobr>{{row.f_material_unit}}</nobr>
30
+ </td>
31
+ <td style="text-align: center;">
32
+ <nobr>{{row.f_material_number}}</nobr>
33
+ </td>
34
+ <td style="text-align: center;">
35
+ <button type="button" class="button_search button_spacing"
36
+ @click="$parent.$parent.updateMaterial($index,row)">修改
37
+ </button>
38
+ <button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除
39
+ </button>
40
+ </td>
41
+ </tr>
42
+ </template>
43
+ </data-grid>
44
+ <modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal :large="true"
45
+ :backdrop="false" :title="title">
46
+ <header slot="modal-header" class="modal-header">
47
+ <button type="button" class="close" @click="closeMaterials"><span>&times;</span></button>
48
+ <h4 class="modal-title">{{title}}</h4>
49
+ </header>
50
+ <article slot="modal-body" class="modal-body clearfix">
51
+ <div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
52
+ <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
53
+ <div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
54
+ <div class="col-sm-6 text-right">
55
+ <button
56
+ class="button_delete button_spacing"
57
+ @click.prevent="deleteDevicesinfo(i)"
58
+ v-if="title === '新增'"
59
+ >删除
60
+ </button>
61
+ </div>
62
+ </div>
63
+ <div class="form-group col-sm-6">
64
+ <label class="col-sm-4 control-label">选择材料:</label>
65
+ <div class="col-sm-8">
66
+ <input-select
67
+ class="select select_list"
68
+ :value.sync="item.material"
69
+ v-model="item.material"
70
+ :options="meterialOptions"
71
+ :disable="mark === 1"
72
+ @change="modifyOtherValue(i)"
73
+ :valueSingle="true"></input-select>
74
+ </div>
75
+ </div>
76
+ <div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
77
+ <label class="col-sm-4 control-label">材料名称:</label>
78
+ <div class="col-sm-8">
79
+ <input class="form-control input_view" style="" type="text"
80
+ placeholder="材料名称"
81
+ v-model="item.f_material_name"
82
+ :value="item.f_material_name"
83
+ />
84
+ </div>
85
+ </div>
86
+ <div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
87
+ <label class="col-sm-4 control-label">材料型号:</label>
88
+ <div class="col-sm-8">
89
+ <input class="form-control input_view" style="" type="text"
90
+ placeholder="材料型号"
91
+ v-model="item.f_material_style"
92
+ :value="item.f_material_style"
93
+ />
94
+ </div>
95
+ </div>
96
+ <div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
97
+ <label class="col-sm-4 control-label">材料单位:</label>
98
+ <div class="col-sm-8">
99
+ <input class="form-control input_view" style="" type="text"
100
+ placeholder="材料单位"
101
+ v-model="item.f_material_unit"
102
+ :value="item.f_material_unit"
103
+ />
104
+ </div>
105
+ </div>
106
+ <div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
107
+ <label class="col-sm-4 control-label">材料数量:</label>
108
+ <div class="col-sm-8">
109
+ <input class="form-control input_view" style="" type="number"
110
+ placeholder="设备数量"
111
+ v-model="item.f_material_number"
112
+ :value="item.f_material_number"
113
+ />
114
+ </div>
115
+ </div>
116
+ </div>
117
+ </article>
118
+ <footer slot="modal-footer" class="modal-footer">
119
+ <template v-if="mark !== 1">
120
+ <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
121
+ <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()"
122
+ :disabled="!$v.valid">确认添加
123
+ </button>
124
+ <button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()"
125
+ :disabled="!$v.valid">确认修改
126
+ </button>
127
+ </template>
128
+ </footer>
129
+ </modal>
130
+ </div>
131
+ </template>
132
+
133
+ <script>
134
+ import Vue from 'vue'
135
+ import {HttpResetClass} from 'vue-client'
136
+
137
+ export default {
138
+ name: 'addMaterialScience',
139
+ props: {
140
+ selectdata: {
141
+ type: Object
142
+ }
143
+ },
144
+ data() {
145
+ return {
146
+ onetomany: {
147
+ rows: []
148
+ },
149
+ title: '新增',
150
+ showMaterialModal: false,
151
+ materials: [
152
+ {
153
+ material: '',
154
+ f_material_name: '',
155
+ f_material_style: '',
156
+ f_material_unit: '',
157
+ f_material_number: '',
158
+ f_bjq_sid: '',
159
+ f_material_code: '',
160
+ f_userinfo_code:''
161
+ }
162
+ ],
163
+ meterialOptions: [],
164
+ row: {},
165
+ bjqChecklag:[],
166
+ fmaterialname:{},
167
+ isShow:[false]
168
+ }
169
+ },
170
+ ready() {
171
+ this.getOnetoManyData()
172
+ },
173
+ methods: {
174
+ async getOnetoManyData () {
175
+ let http = new HttpResetClass()
176
+ let data = {
177
+ tablename: `t_material_apply`,
178
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
179
+ }
180
+ let res = await http.load(
181
+ 'POST',
182
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable?aaa=123`,
183
+ {data: data},
184
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
185
+ )
186
+ this.onetomany.rows = res.data
187
+ },
188
+ async openMaterialModal() {
189
+ this.getMateralNames()
190
+ this.title = '新增'
191
+ this.materials = [
192
+ {
193
+ material: '',
194
+ f_material_name: '',
195
+ f_material_style: '',
196
+ f_material_unit: '',
197
+ f_material_number: '',
198
+ f_bjq_sid: '',
199
+ f_material_code: '',
200
+ f_userinfo_code: ''
201
+ }
202
+ ],
203
+ this.showMaterialModal = true
204
+ this.isShow = [false]
205
+ },
206
+ deleteDevicesinfo(index) {
207
+ this.materials.splice(index, 1)
208
+ this.isShow.splice(index, 1)
209
+ },
210
+ pushMaterial() {
211
+ this.materials.push({
212
+ material: '',
213
+ f_material_name: '',
214
+ f_material_style: '',
215
+ f_material_unit: '',
216
+ f_material_number: '',
217
+ f_bjq_sid: '',
218
+ f_material_code: '',
219
+ f_userinfo_code: ''
220
+ })
221
+ this.isShow.push(false)
222
+ },
223
+ // 获取模态框材料
224
+ async getMateralNames() {
225
+ let data = {
226
+ condition: `1=1`
227
+ }
228
+ let http = new HttpResetClass()
229
+ let res = await http.load(
230
+ 'POST',
231
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/getStockMaterial`,
232
+ {data: data},
233
+ {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
234
+ )
235
+
236
+ this.meterialOptions = res.data.map(item => {
237
+ return {
238
+ 'label': `${item.f_material_name}--${item.f_material_style}`,
239
+ 'value': item
240
+ }
241
+ })
242
+ },
243
+ modifyOtherValue(index) {
244
+ console.log("进来了", index)
245
+ console.log("dddd", this.materials[index].material)
246
+ let material = this.materials[index].material
247
+ this.materials[index].f_material_name = material.f_material_name
248
+ this.materials[index].f_material_style = material.f_material_style
249
+ this.materials[index].f_material_unit = material.f_material_unit
250
+ this.materials[index].f_material_number = material.f_material_number
251
+ this.materials[index].f_material_code = material.f_material_code
252
+ this.materials[index].f_userinfo_code = material.f_userinfo_code
253
+ if (material.f_material_name === "报警器-汉威") {
254
+ this.isShow[index] = true
255
+ } else {
256
+ this.isShow[index] = false
257
+ }
258
+ this.isShow.splice(0, 1, this.isShow[0])
259
+ },
260
+ // 新增材料
261
+ async addMaterial() {
262
+ this.title = '新增'
263
+ let data = {
264
+ f_process_id: this.selectdata.f_process_id,
265
+ f_operator_id: Vue.user.id,
266
+ f_operator: Vue.user.name,
267
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
268
+ f_orgid: Vue.user.orgid,
269
+ f_orgname: Vue.user.orgs,
270
+ materials: this.materials
271
+ }
272
+
273
+ //报警器流程 设备编号检验
274
+ await this.bjqCheck()
275
+ if (this.bjqChecklag.length > 0) {
276
+ return
277
+ }
278
+
279
+ let http = new HttpResetClass()
280
+ let res = await http.load(
281
+ 'POST',
282
+ `${this.$androidUtil.getProxyUrl()}/apply/rs/logic/saveMaterials`,
283
+ data
284
+ )
285
+ this.closeMaterials()
286
+ },
287
+ async deleteMaterial(row) {
288
+ debugger
289
+ var show1 = window.confirm('您确定要删除这条记录吗?')
290
+ if(show1 != true){
291
+ this.closeMaterials()
292
+ }else{
293
+ let http = new HttpResetClass()
294
+ let res = await http.load(
295
+ 'POST',
296
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/deleteMaterial`,
297
+ {data: row},
298
+ {resolveMsg: null, rejectMsg: '材料删除失败!!!'}
299
+ )
300
+ this.closeMaterials()
301
+ }
302
+ }
303
+ ,
304
+ async updateMaterial(index, row) {
305
+ this.title = '修改'
306
+ this.row = row
307
+ this.getMateralNames()
308
+ this.materials = [
309
+ {
310
+ material: '',
311
+ f_material_name: row.f_material_name,
312
+ f_material_style: row.f_material_style,
313
+ f_material_unit: row.f_material_unit,
314
+ f_material_number: row.f_material_number,
315
+ f_material_code: row.f_material_code,
316
+ f_bjq_sid: row.f_bjq_sid,
317
+ f_userinfo_code: row.f_userinfo_code
318
+ }
319
+ ]
320
+ this.showMaterialModal = true
321
+ },
322
+ async updateConfirm() {
323
+ let data = this.row
324
+ data.f_material_name = this.materials[0].f_material_name
325
+ data.f_material_style = this.materials[0].f_material_style
326
+ data.f_material_unit = this.materials[0].f_material_unit
327
+ data.f_material_number = this.materials[0].f_material_number
328
+ data.f_material_code = this.materials[0].f_material_code
329
+ data.f_bjq_sid = this.materials[0].f_bjq_sid
330
+ data.f_userinfo_code=this.materials[0].f_userinfo_code
331
+
332
+ //报警器流程 设备编号检验
333
+ await this.bjqCheck()
334
+ if (this.bjqChecklag.length > 0){
335
+ return
336
+ }
337
+
338
+ let http = new HttpResetClass()
339
+ let res = await http.load(
340
+ 'POST',
341
+ `${this.$androidUtil.getProxyUrl()}/rs/entity/t_material_apply`,
342
+ data
343
+ )
344
+ this.closeMaterials()
345
+ },
346
+ sycronizedCode(index,val){
347
+ console.log("看看:",index,val)
348
+ this.materials[index].f_material_code = val
349
+ },
350
+ closeMaterials() {
351
+ this.getOnetoManyData()
352
+ this.showMaterialModal = false
353
+ },
354
+ async bjqCheck(){
355
+ //报警器设备型号校验
356
+ this.bjqChecklag = [] //初始化
357
+ if (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建'){
358
+ let bjqinfo = {
359
+ f_material_name : "",
360
+ f_bjq_sid: ""
361
+ }
362
+ for (const bjqinfoElement of this.materials) {
363
+ bjqinfo.f_bjq_sid = bjqinfoElement.f_bjq_sid
364
+ bjqinfo.f_material_name = bjqinfoElement.f_material_name
365
+ if (bjqinfo.f_material_name.substr(0,3) === '报警器'){
366
+ let http = new HttpResetClass()
367
+ let res = await http.load(
368
+ 'POST',
369
+ // `/rs/logic/bjqcheck`,
370
+ `${this.$androidUtil.getProxyUrl()}/ncc/rs/logic/bjqcheck`,
371
+ bjqinfo
372
+ )
373
+ if (res.data.code != 200){
374
+ this.bjqChecklag.push(res.data.code)
375
+ //this.$showMessage(res.data.msg)
376
+ Vue.showAlert(res.data.msg, 'danger', 6000)
377
+ return
378
+ }
379
+ }
380
+ }
381
+ }
382
+ }
383
+ }
384
+ }
385
+
386
+ </script>
387
+
388
+ <style scoped>
389
+
390
+ </style>