apply-clients 3.5.4-87 → 3.5.4-89

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 (62) hide show
  1. package/app/src/main/java/com/example/phonechatbot/MainActivity.java +50 -0
  2. package/build/dev-server.js +9 -5
  3. package/package.json +3 -3
  4. package/src/App.vue +3 -3
  5. package/src/components/android/AppTakePic.vue +182 -182
  6. package/src/components/product/Function/Service/FunctionServiceControl.vue +497 -497
  7. package/src/components/product/Material/MaterialDetailed.vue +268 -268
  8. package/src/components/product/MaterialsManage/MaterialsBase.vue +181 -181
  9. package/src/components/product/MaterialsManage/MaterialsManage.vue +60 -60
  10. package/src/components/product/ServiceView.vue +1026 -1026
  11. package/src/components/product/Supervisory/SupervisoryList.vue +452 -452
  12. package/src/filiale/baiyin/android/ByAddMaterialScience.vue +824 -824
  13. package/src/filiale/dingcheng/pc/SupervisoryList.vue +441 -441
  14. package/src/filiale/fugou/android/AppAddMaterialScience.vue +440 -440
  15. package/src/filiale/fugou/android/AppDevicesManagement.vue +519 -519
  16. package/src/filiale/fugou/android/AppInstallationDetails.vue +541 -541
  17. package/src/filiale/fugou/android/AppServiceControl.vue +1845 -1845
  18. package/src/filiale/fugou/android/AppZhihuanManagement.vue +197 -197
  19. package/src/filiale/fugou/android/printCharge.vue +162 -162
  20. package/src/filiale/fugou/android.js +16 -16
  21. package/src/filiale/fugou/pc/ExplorationSelect.vue +525 -525
  22. package/src/filiale/fugou/pc/ServiceControl.vue +1705 -1705
  23. package/src/filiale/fugou/pc/ServiceView.vue +941 -941
  24. package/src/filiale/fugou/pc/chargeReport.vue +143 -0
  25. package/src/filiale/fugou/pc/devicesManagement.vue +483 -483
  26. package/src/filiale/fugou/pc/printChargepc.vue +148 -148
  27. package/src/filiale/fugou/pc.js +15 -14
  28. package/src/filiale/gongyi/android/AppAddMaterialScience.vue +493 -493
  29. package/src/filiale/gongyi/android/AppDisclosurerecord.vue +214 -214
  30. package/src/filiale/gongyi/android/AppInstallationDetails.vue +500 -500
  31. package/src/filiale/gongyi/android/AppLegacyIssues.vue +309 -309
  32. package/src/filiale/gongyi/android/AppSign.vue +170 -170
  33. package/src/filiale/gongyi/android/AppSupplementalAgreement.vue +298 -298
  34. package/src/filiale/gongyi/android.js +18 -18
  35. package/src/filiale/gongyi/pc/ApplyUpload.vue +371 -371
  36. package/src/filiale/gongyi/pc/PcAddLogs.vue +221 -221
  37. package/src/filiale/gongyi/pc/PcDisclosurerecord.vue +218 -218
  38. package/src/filiale/gongyi/pc/PcLegacyIssues.vue +309 -309
  39. package/src/filiale/gongyi/pc/SupervisoryServiceControl.vue +894 -894
  40. package/src/filiale/gongyi/pc/SupervisoryServiceView.vue +1005 -1005
  41. package/src/filiale/gongyi/pc/addMaterialScience.vue +575 -575
  42. package/src/filiale/gongyi/pc/chargeManagement.vue +765 -765
  43. package/src/filiale/gongyi/pc/supplementalAgreement.vue +277 -277
  44. package/src/filiale/gongyi/pc.js +24 -24
  45. package/src/filiale/hongda/pc/SupervisoryList.vue +422 -422
  46. package/src/filiale/jingyang/pc/SupervisoryList.vue +459 -459
  47. package/src/filiale/qianneng/android/AppChargeManagement.vue +686 -686
  48. package/src/filiale/qianneng/android.js +15 -15
  49. package/src/filiale/qianneng/pc/ApplyMaterialDetailed.vue +261 -261
  50. package/src/filiale/qianneng/pc/Applydetail.vue +378 -378
  51. package/src/filiale/qianneng/pc/InstallFunction.vue +188 -188
  52. package/src/filiale/qianneng/pc.js +29 -29
  53. package/src/filiale/yangchunboneng/android/AppChargeManagement.vue +527 -527
  54. package/src/filiale/yangchunboneng/android/AppDevicesManagement.vue +639 -639
  55. package/src/filiale/yangchunboneng/android/AppServiceControl.vue +1681 -1681
  56. package/src/filiale/yangchunboneng/pc/ExplorationSelect.vue +548 -548
  57. package/src/filiale/yangchunboneng/pc/ServiceControl.vue +2075 -2075
  58. package/src/filiale/yangchunboneng/pc/SupervisoryList.vue +590 -590
  59. package/src/filiale/yangchunboneng/pc/SupervisoryListNew.vue +628 -628
  60. package/src/filiale/yangchunboneng/pc/chargeManagement.vue +1059 -1059
  61. package/src/main.js +3 -3
  62. package/~/chatbot/main.py +57 -0
@@ -1,493 +1,493 @@
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">
14
- <button class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal()">添加
15
- </button>
16
- </th>
17
- </tr>
18
- </template>
19
- <template partial='body'>
20
- <tr>
21
- <td style="text-align: center;">
22
- <nobr>{{$index+1}}</nobr>
23
- </td>
24
- <td style="text-align: center;">
25
- <nobr>{{row.f_material_name}}</nobr>
26
- </td>
27
- <td style="text-align: center;">
28
- <nobr>{{row.f_material_style}}</nobr>
29
- </td>
30
- <td style="text-align: center;">
31
- <nobr>{{row.f_material_unit}}</nobr>
32
- </td>
33
- <td style="text-align: center;">
34
- <nobr>{{row.f_material_number}}</nobr>
35
- </td>
36
- <td style="text-align: center;">
37
- <nobr>{{row.f_use_number}}</nobr>
38
- </td>
39
- <td style="text-align: center;">
40
- <nobr>{{row.f_back_number}}</nobr>
41
- </td>
42
-
43
- <td style="text-align: center;">
44
- <button type="button" class="button_search button_spacing"
45
- @click="$parent.$parent.updateMaterial($index,row)">修改
46
- </button>
47
- <button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除
48
- </button>
49
- </td>
50
- </tr>
51
- </template>
52
- </data-grid>
53
- <modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal :large="true"
54
- :backdrop="false" :title="title">
55
- <header slot="modal-header" class="modal-header">
56
- <button type="button" class="close" @click="closeMaterials"><span>&times;</span></button>
57
- <h4 class="modal-title">{{title}}</h4>
58
- </header>
59
- <article slot="modal-body" class="modal-body clearfix">
60
- <div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
61
- <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
62
- <div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
63
- <div class="col-sm-6 text-right">
64
- <button
65
- class="button_delete button_spacing"
66
- @click.prevent="deleteDevicesinfo(i)"
67
- v-if="title === '新增'"
68
- >删除
69
- </button>
70
- </div>
71
- </div>
72
- <div class="form-group col-sm-6">
73
- <label class="col-sm-4 control-label">选择材料:</label>
74
- <div class="col-sm-8">
75
- <input-select
76
- class="select select_list"
77
- :value.sync="item.material"
78
- v-model="item.material"
79
- :options="meterialOptions"
80
- :disable="mark === 1"
81
- @change="modifyOtherValue(i)"
82
- :valueSingle="true"></input-select>
83
- </div>
84
- </div>
85
- <div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
86
- <label class="col-sm-4 control-label">材料名称:</label>
87
- <div class="col-sm-8">
88
- <input class="form-control input_view" style="" type="text"
89
- placeholder="材料名称"
90
- v-model="item.f_material_name"
91
- :value="item.f_material_name"
92
- />
93
- </div>
94
- </div>
95
- <div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
96
- <label class="col-sm-4 control-label">材料型号:</label>
97
- <div class="col-sm-8">
98
- <input class="form-control input_view" style="" type="text"
99
- placeholder="材料型号"
100
- v-model="item.f_material_style"
101
- :value="item.f_material_style"
102
- />
103
- </div>
104
- </div>
105
- <div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
106
- <label class="col-sm-4 control-label">材料单位:</label>
107
- <div class="col-sm-8">
108
- <input class="form-control input_view" style="" type="text"
109
- placeholder="材料单位"
110
- v-model="item.f_material_unit"
111
- :value="item.f_material_unit"
112
- />
113
- </div>
114
- </div>
115
- <div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
116
- <label class="col-sm-4 control-label">材料数量:</label>
117
- <div class="col-sm-8">
118
- <input class="form-control input_view" style="" type="number"
119
- placeholder="材料数量"
120
- v-model="item.f_material_number"
121
- :value.sync="item.f_material_number"
122
- />
123
- </div>
124
- </div>
125
- <div class="form-group col-sm-6" :class="[item.f_use_number ? '' : 'has-error']">
126
- <label class="col-sm-4 control-label">使用数量:</label>
127
- <div class="col-sm-8">
128
- <input class="form-control input_view" style="" type="number"
129
- placeholder="使用数量"
130
- v-model="item.f_use_number"
131
- :value.sync="item.f_use_number"
132
- />
133
- </div>
134
- </div>
135
- <div class="form-group col-sm-6" :class="[item.f_back_number ? '' : 'has-error']">
136
- <label class="col-sm-4 control-label">退库数量:</label>
137
- <div class="col-sm-8">
138
- <input class="form-control input_view" style=""
139
- type="number"
140
- placeholder="退库数量"
141
- v-model="item.f_back_number"
142
- :value.sync="item.f_back_number"
143
- />
144
- </div>
145
- </div>
146
- <div class="form-group col-sm-6">
147
- <label class="col-sm-4 control-label"></label>
148
- <div class="col-sm-8">
149
-
150
- </div>
151
- </div>
152
- <div class="form-group col-sm-6">
153
- <label class="col-sm-4 control-label"></label>
154
- <div class="col-sm-8">
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 v-if=" (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建')">
189
- <app-qrcode-reader :istype = fmaterialname :index = i v-show="isShow[i]"></app-qrcode-reader>
190
- </div>
191
- </div>
192
- </article>
193
- <footer slot="modal-footer" class="modal-footer">
194
- <template v-if="mark !== 1">
195
- <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
196
- <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()"
197
- :disabled="!$v.valid">确认添加
198
- </button>
199
- <button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()"
200
- :disabled="!$v.valid">确认修改
201
- </button>
202
- </template>
203
- </footer>
204
- </modal>
205
- </div>
206
- </template>
207
-
208
- <script>
209
- import Vue from 'vue'
210
- import {HttpResetClass} from 'vue-client'
211
-
212
- export default {
213
- name: 'addMaterialScience',
214
- props: {
215
- selectdata: {
216
- type: Object
217
- }
218
- },
219
- data() {
220
- return {
221
- onetomany: {
222
- rows: []
223
- },
224
- title: '新增',
225
- showMaterialModal: false,
226
- materials: [
227
- {
228
- f_use_number:'',
229
- f_back_number:'',
230
- f_material_price: '',
231
- material: '',
232
- f_material_name: '',
233
- f_material_style: '',
234
- f_material_unit: '',
235
- f_material_number: '',
236
- f_bjq_sid: '',
237
- f_material_code: '',
238
- f_userinfo_code:''
239
- }
240
- ],
241
- meterialOptions: [],
242
- row: {},
243
- bjqChecklag:[],
244
- fmaterialname:{},
245
- isShow:[false]
246
- }
247
- },
248
- ready() {
249
- this.getOnetoManyData()
250
- },
251
- methods: {
252
- async getOnetoManyData () {
253
- let http = new HttpResetClass()
254
- let data = {
255
- tablename: `t_material_apply`,
256
- condition: `f_process_id='${this.selectdata.f_process_id}'`
257
- }
258
- let res = await http.load(
259
- 'POST',
260
- `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable?aaa=123`,
261
- {data: data},
262
- {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
263
- )
264
- this.onetomany.rows = res.data
265
- },
266
- async openMaterialModal() {
267
- this.getMateralNames()
268
- this.title = '新增'
269
- this.materials = [
270
- {
271
- f_material_price: '',
272
- material: '',
273
- f_material_name: '',
274
- f_material_style: '',
275
- f_material_unit: '',
276
- f_material_number:'',
277
- f_use_number:'',
278
- f_back_number:'',
279
- f_bjq_sid: '',
280
- f_material_code: '',
281
- f_userinfo_code: ''
282
- }
283
- ],
284
- this.showMaterialModal = true
285
- this.isShow = [false]
286
- },
287
- deleteDevicesinfo(index) {
288
- this.materials.splice(index, 1)
289
- this.isShow.splice(index, 1)
290
- },
291
- pushMaterial() {
292
- this.materials.push({
293
- f_material_price: '',
294
- material: '',
295
- f_material_name: '',
296
- f_material_style: '',
297
- f_material_unit: '',
298
- f_material_number: '',
299
- f_use_number:'',
300
- f_back_number:'',
301
- f_bjq_sid: '',
302
- f_material_code: '',
303
- f_userinfo_code: ''
304
- })
305
- this.isShow.push(false)
306
- },
307
- // 获取模态框材料
308
- async getMateralNames() {
309
- let data = {
310
- condition: `1=1`
311
- }
312
- let http = new HttpResetClass()
313
- let res = await http.load(
314
- 'POST',
315
- `${this.$androidUtil.getProxyUrl()}/rs/sql/getStockMaterial`,
316
- {data: data},
317
- {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
318
- )
319
-
320
- this.meterialOptions = res.data.map(item => {
321
- return {
322
- 'label': `${item.parname}-${item.f_material_name}-${item.f_material_style}`,
323
- 'value': item
324
- }
325
- })
326
- },
327
- modifyOtherValue(index) {
328
- console.log("进来了", index)
329
- console.log("dddd", this.materials[index].material)
330
- let material = this.materials[index].material
331
- this.materials[index].f_material_price = material.f_material_price
332
- this.materials[index].f_material_name = material.f_material_name
333
- this.materials[index].f_material_style = material.f_material_style
334
- this.materials[index].f_material_unit = material.f_material_unit
335
- this.materials[index].f_material_number = material.f_material_number
336
- this.materials[index].f_use_number= material.f_use_number
337
- this.materials[index].f_back_number= material.f_back_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
- //自动计算退库数量
351
- for (let i = 0; i < this.materials.length; i++) {
352
- if(this.materials[i].f_material_number===''||this.materials[i].f_material_number==null){
353
- this.$showAlert(`${this.materials[i].f_material_name}未填写数量`, 'warning', 3000)
354
- return
355
- }
356
- if(this.materials[i].f_use_number===''||this.materials[i].f_use_number==null){
357
- this.materials[i].f_use_number=0
358
- }
359
- this.materials[i].f_back_number =Number(this.materials[i].f_material_number)-Number(this.materials[i].f_use_number)
360
- }
361
- let data = {
362
- f_process_id: this.selectdata.f_process_id,
363
- f_operator_id: Vue.user.id,
364
- f_operator: Vue.user.name,
365
- f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
366
- f_orgid: Vue.user.orgid,
367
- f_orgname: Vue.user.orgs,
368
- materials: this.materials
369
- }
370
-
371
- //报警器流程 设备编号检验
372
- await this.bjqCheck()
373
- if (this.bjqChecklag.length > 0) {
374
- return
375
- }
376
-
377
- let http = new HttpResetClass()
378
- let res = await http.load(
379
- 'POST',
380
- `${this.$androidUtil.getProxyUrl()}/rs/logic/saveMaterials`,
381
- data
382
- )
383
- this.closeMaterials()
384
- },
385
- async deleteMaterial(row) {
386
- debugger
387
- var show1 = window.confirm('您确定要删除这条记录吗?')
388
- if(show1 != true){
389
- this.closeMaterials()
390
- }else{
391
- let http = new HttpResetClass()
392
- let res = await http.load(
393
- 'POST',
394
- `${this.$androidUtil.getProxyUrl()}/rs/logic/deleteMaterial`,
395
- {data: row},
396
- {resolveMsg: null, rejectMsg: '材料删除失败!!!'}
397
- )
398
- this.closeMaterials()
399
- }
400
- }
401
- ,
402
- async updateMaterial(index, row) {
403
- this.title = '修改'
404
- this.row = row
405
- this.getMateralNames()
406
- this.materials = [
407
- {
408
- material: '',
409
- f_material_price: row.f_material_price,
410
- f_material_name: row.f_material_name,
411
- f_material_style: row.f_material_style,
412
- f_material_unit: row.f_material_unit,
413
- f_material_number: row.f_material_number,
414
- f_use_number: row.f_use_number,
415
- f_back_number: row.f_back_number,
416
- f_material_code: row.f_material_code,
417
- f_bjq_sid: row.f_bjq_sid,
418
- f_userinfo_code: row.f_userinfo_code
419
- }
420
- ]
421
- this.showMaterialModal = true
422
- },
423
- async updateConfirm() {
424
- let data = this.row
425
- data.f_material_price = this.materials[0].f_material_price
426
- data.f_material_name = this.materials[0].f_material_name
427
- data.f_material_style = this.materials[0].f_material_style
428
- data.f_material_unit = this.materials[0].f_material_unit
429
- data.f_material_number = this.materials[0].f_material_number
430
- data.f_use_number = this.materials[0].f_use_number==''?0:this.materials[0].f_use_number
431
- data.f_back_number = Number(data.f_material_number)-Number(data.f_use_number)
432
- data.f_material_code = this.materials[0].f_material_code
433
- data.f_bjq_sid = this.materials[0].f_bjq_sid
434
- data.f_userinfo_code=this.materials[0].f_userinfo_code
435
- //报警器流程 设备编号检验
436
- await this.bjqCheck()
437
- if (this.bjqChecklag.length > 0){
438
- return
439
- }
440
-
441
- let http = new HttpResetClass()
442
- let res = await http.load(
443
- 'POST',
444
- `${this.$androidUtil.getProxyUrl()}/rs/entity/t_material_apply`,
445
- data
446
- )
447
- this.closeMaterials()
448
- },
449
- sycronizedCode(index,val){
450
- console.log("看看:",index,val)
451
- this.materials[index].f_material_code = val
452
- },
453
- closeMaterials() {
454
- this.getOnetoManyData()
455
- this.showMaterialModal = false
456
- },
457
- async bjqCheck(){
458
- //报警器设备型号校验
459
- this.bjqChecklag = [] //初始化
460
- if (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建'){
461
- let bjqinfo = {
462
- f_material_name : "",
463
- f_bjq_sid: ""
464
- }
465
- for (const bjqinfoElement of this.materials) {
466
- bjqinfo.f_bjq_sid = bjqinfoElement.f_bjq_sid
467
- bjqinfo.f_material_name = bjqinfoElement.f_material_name
468
- if (bjqinfo.f_material_name.substr(0,3) === '报警器'){
469
- let http = new HttpResetClass()
470
- let res = await http.load(
471
- 'POST',
472
- // `/rs/logic/bjqcheck`,
473
- `${this.$androidUtil.getProxyUrl()}/ncc/rs/logic/bjqcheck`,
474
- bjqinfo
475
- )
476
- if (res.data.code != 200){
477
- this.bjqChecklag.push(res.data.code)
478
- //this.$showMessage(res.data.msg)
479
- Vue.showAlert(res.data.msg, 'danger', 6000)
480
- return
481
- }
482
- }
483
- }
484
- }
485
- }
486
- }
487
- }
488
-
489
- </script>
490
-
491
- <style scoped>
492
-
493
- </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">
14
+ <button class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal()">添加
15
+ </button>
16
+ </th>
17
+ </tr>
18
+ </template>
19
+ <template partial='body'>
20
+ <tr>
21
+ <td style="text-align: center;">
22
+ <nobr>{{$index+1}}</nobr>
23
+ </td>
24
+ <td style="text-align: center;">
25
+ <nobr>{{row.f_material_name}}</nobr>
26
+ </td>
27
+ <td style="text-align: center;">
28
+ <nobr>{{row.f_material_style}}</nobr>
29
+ </td>
30
+ <td style="text-align: center;">
31
+ <nobr>{{row.f_material_unit}}</nobr>
32
+ </td>
33
+ <td style="text-align: center;">
34
+ <nobr>{{row.f_material_number}}</nobr>
35
+ </td>
36
+ <td style="text-align: center;">
37
+ <nobr>{{row.f_use_number}}</nobr>
38
+ </td>
39
+ <td style="text-align: center;">
40
+ <nobr>{{row.f_back_number}}</nobr>
41
+ </td>
42
+
43
+ <td style="text-align: center;">
44
+ <button type="button" class="button_search button_spacing"
45
+ @click="$parent.$parent.updateMaterial($index,row)">修改
46
+ </button>
47
+ <button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除
48
+ </button>
49
+ </td>
50
+ </tr>
51
+ </template>
52
+ </data-grid>
53
+ <modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal :large="true"
54
+ :backdrop="false" :title="title">
55
+ <header slot="modal-header" class="modal-header">
56
+ <button type="button" class="close" @click="closeMaterials"><span>&times;</span></button>
57
+ <h4 class="modal-title">{{title}}</h4>
58
+ </header>
59
+ <article slot="modal-body" class="modal-body clearfix">
60
+ <div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
61
+ <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
62
+ <div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
63
+ <div class="col-sm-6 text-right">
64
+ <button
65
+ class="button_delete button_spacing"
66
+ @click.prevent="deleteDevicesinfo(i)"
67
+ v-if="title === '新增'"
68
+ >删除
69
+ </button>
70
+ </div>
71
+ </div>
72
+ <div class="form-group col-sm-6">
73
+ <label class="col-sm-4 control-label">选择材料:</label>
74
+ <div class="col-sm-8">
75
+ <input-select
76
+ class="select select_list"
77
+ :value.sync="item.material"
78
+ v-model="item.material"
79
+ :options="meterialOptions"
80
+ :disable="mark === 1"
81
+ @change="modifyOtherValue(i)"
82
+ :valueSingle="true"></input-select>
83
+ </div>
84
+ </div>
85
+ <div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
86
+ <label class="col-sm-4 control-label">材料名称:</label>
87
+ <div class="col-sm-8">
88
+ <input class="form-control input_view" style="" type="text"
89
+ placeholder="材料名称"
90
+ v-model="item.f_material_name"
91
+ :value="item.f_material_name"
92
+ />
93
+ </div>
94
+ </div>
95
+ <div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
96
+ <label class="col-sm-4 control-label">材料型号:</label>
97
+ <div class="col-sm-8">
98
+ <input class="form-control input_view" style="" type="text"
99
+ placeholder="材料型号"
100
+ v-model="item.f_material_style"
101
+ :value="item.f_material_style"
102
+ />
103
+ </div>
104
+ </div>
105
+ <div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
106
+ <label class="col-sm-4 control-label">材料单位:</label>
107
+ <div class="col-sm-8">
108
+ <input class="form-control input_view" style="" type="text"
109
+ placeholder="材料单位"
110
+ v-model="item.f_material_unit"
111
+ :value="item.f_material_unit"
112
+ />
113
+ </div>
114
+ </div>
115
+ <div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
116
+ <label class="col-sm-4 control-label">材料数量:</label>
117
+ <div class="col-sm-8">
118
+ <input class="form-control input_view" style="" type="number"
119
+ placeholder="材料数量"
120
+ v-model="item.f_material_number"
121
+ :value.sync="item.f_material_number"
122
+ />
123
+ </div>
124
+ </div>
125
+ <div class="form-group col-sm-6" :class="[item.f_use_number ? '' : 'has-error']">
126
+ <label class="col-sm-4 control-label">使用数量:</label>
127
+ <div class="col-sm-8">
128
+ <input class="form-control input_view" style="" type="number"
129
+ placeholder="使用数量"
130
+ v-model="item.f_use_number"
131
+ :value.sync="item.f_use_number"
132
+ />
133
+ </div>
134
+ </div>
135
+ <div class="form-group col-sm-6" :class="[item.f_back_number ? '' : 'has-error']">
136
+ <label class="col-sm-4 control-label">退库数量:</label>
137
+ <div class="col-sm-8">
138
+ <input class="form-control input_view" style=""
139
+ type="number"
140
+ placeholder="退库数量"
141
+ v-model="item.f_back_number"
142
+ :value.sync="item.f_back_number"
143
+ />
144
+ </div>
145
+ </div>
146
+ <div class="form-group col-sm-6">
147
+ <label class="col-sm-4 control-label"></label>
148
+ <div class="col-sm-8">
149
+
150
+ </div>
151
+ </div>
152
+ <div class="form-group col-sm-6">
153
+ <label class="col-sm-4 control-label"></label>
154
+ <div class="col-sm-8">
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 v-if=" (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建')">
189
+ <app-qrcode-reader :istype = fmaterialname :index = i v-show="isShow[i]"></app-qrcode-reader>
190
+ </div>
191
+ </div>
192
+ </article>
193
+ <footer slot="modal-footer" class="modal-footer">
194
+ <template v-if="mark !== 1">
195
+ <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
196
+ <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()"
197
+ :disabled="!$v.valid">确认添加
198
+ </button>
199
+ <button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()"
200
+ :disabled="!$v.valid">确认修改
201
+ </button>
202
+ </template>
203
+ </footer>
204
+ </modal>
205
+ </div>
206
+ </template>
207
+
208
+ <script>
209
+ import Vue from 'vue'
210
+ import {HttpResetClass} from 'vue-client'
211
+
212
+ export default {
213
+ name: 'addMaterialScience',
214
+ props: {
215
+ selectdata: {
216
+ type: Object
217
+ }
218
+ },
219
+ data() {
220
+ return {
221
+ onetomany: {
222
+ rows: []
223
+ },
224
+ title: '新增',
225
+ showMaterialModal: false,
226
+ materials: [
227
+ {
228
+ f_use_number:'',
229
+ f_back_number:'',
230
+ f_material_price: '',
231
+ material: '',
232
+ f_material_name: '',
233
+ f_material_style: '',
234
+ f_material_unit: '',
235
+ f_material_number: '',
236
+ f_bjq_sid: '',
237
+ f_material_code: '',
238
+ f_userinfo_code:''
239
+ }
240
+ ],
241
+ meterialOptions: [],
242
+ row: {},
243
+ bjqChecklag:[],
244
+ fmaterialname:{},
245
+ isShow:[false]
246
+ }
247
+ },
248
+ ready() {
249
+ this.getOnetoManyData()
250
+ },
251
+ methods: {
252
+ async getOnetoManyData () {
253
+ let http = new HttpResetClass()
254
+ let data = {
255
+ tablename: `t_material_apply`,
256
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
257
+ }
258
+ let res = await http.load(
259
+ 'POST',
260
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable?aaa=123`,
261
+ {data: data},
262
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
263
+ )
264
+ this.onetomany.rows = res.data
265
+ },
266
+ async openMaterialModal() {
267
+ this.getMateralNames()
268
+ this.title = '新增'
269
+ this.materials = [
270
+ {
271
+ f_material_price: '',
272
+ material: '',
273
+ f_material_name: '',
274
+ f_material_style: '',
275
+ f_material_unit: '',
276
+ f_material_number:'',
277
+ f_use_number:'',
278
+ f_back_number:'',
279
+ f_bjq_sid: '',
280
+ f_material_code: '',
281
+ f_userinfo_code: ''
282
+ }
283
+ ],
284
+ this.showMaterialModal = true
285
+ this.isShow = [false]
286
+ },
287
+ deleteDevicesinfo(index) {
288
+ this.materials.splice(index, 1)
289
+ this.isShow.splice(index, 1)
290
+ },
291
+ pushMaterial() {
292
+ this.materials.push({
293
+ f_material_price: '',
294
+ material: '',
295
+ f_material_name: '',
296
+ f_material_style: '',
297
+ f_material_unit: '',
298
+ f_material_number: '',
299
+ f_use_number:'',
300
+ f_back_number:'',
301
+ f_bjq_sid: '',
302
+ f_material_code: '',
303
+ f_userinfo_code: ''
304
+ })
305
+ this.isShow.push(false)
306
+ },
307
+ // 获取模态框材料
308
+ async getMateralNames() {
309
+ let data = {
310
+ condition: `1=1`
311
+ }
312
+ let http = new HttpResetClass()
313
+ let res = await http.load(
314
+ 'POST',
315
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/getStockMaterial`,
316
+ {data: data},
317
+ {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
318
+ )
319
+
320
+ this.meterialOptions = res.data.map(item => {
321
+ return {
322
+ 'label': `${item.parname}-${item.f_material_name}-${item.f_material_style}`,
323
+ 'value': item
324
+ }
325
+ })
326
+ },
327
+ modifyOtherValue(index) {
328
+ console.log("进来了", index)
329
+ console.log("dddd", this.materials[index].material)
330
+ let material = this.materials[index].material
331
+ this.materials[index].f_material_price = material.f_material_price
332
+ this.materials[index].f_material_name = material.f_material_name
333
+ this.materials[index].f_material_style = material.f_material_style
334
+ this.materials[index].f_material_unit = material.f_material_unit
335
+ this.materials[index].f_material_number = material.f_material_number
336
+ this.materials[index].f_use_number= material.f_use_number
337
+ this.materials[index].f_back_number= material.f_back_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
+ //自动计算退库数量
351
+ for (let i = 0; i < this.materials.length; i++) {
352
+ if(this.materials[i].f_material_number===''||this.materials[i].f_material_number==null){
353
+ this.$showAlert(`${this.materials[i].f_material_name}未填写数量`, 'warning', 3000)
354
+ return
355
+ }
356
+ if(this.materials[i].f_use_number===''||this.materials[i].f_use_number==null){
357
+ this.materials[i].f_use_number=0
358
+ }
359
+ this.materials[i].f_back_number =Number(this.materials[i].f_material_number)-Number(this.materials[i].f_use_number)
360
+ }
361
+ let data = {
362
+ f_process_id: this.selectdata.f_process_id,
363
+ f_operator_id: Vue.user.id,
364
+ f_operator: Vue.user.name,
365
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
366
+ f_orgid: Vue.user.orgid,
367
+ f_orgname: Vue.user.orgs,
368
+ materials: this.materials
369
+ }
370
+
371
+ //报警器流程 设备编号检验
372
+ await this.bjqCheck()
373
+ if (this.bjqChecklag.length > 0) {
374
+ return
375
+ }
376
+
377
+ let http = new HttpResetClass()
378
+ let res = await http.load(
379
+ 'POST',
380
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/saveMaterials`,
381
+ data
382
+ )
383
+ this.closeMaterials()
384
+ },
385
+ async deleteMaterial(row) {
386
+ debugger
387
+ var show1 = window.confirm('您确定要删除这条记录吗?')
388
+ if(show1 != true){
389
+ this.closeMaterials()
390
+ }else{
391
+ let http = new HttpResetClass()
392
+ let res = await http.load(
393
+ 'POST',
394
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/deleteMaterial`,
395
+ {data: row},
396
+ {resolveMsg: null, rejectMsg: '材料删除失败!!!'}
397
+ )
398
+ this.closeMaterials()
399
+ }
400
+ }
401
+ ,
402
+ async updateMaterial(index, row) {
403
+ this.title = '修改'
404
+ this.row = row
405
+ this.getMateralNames()
406
+ this.materials = [
407
+ {
408
+ material: '',
409
+ f_material_price: row.f_material_price,
410
+ f_material_name: row.f_material_name,
411
+ f_material_style: row.f_material_style,
412
+ f_material_unit: row.f_material_unit,
413
+ f_material_number: row.f_material_number,
414
+ f_use_number: row.f_use_number,
415
+ f_back_number: row.f_back_number,
416
+ f_material_code: row.f_material_code,
417
+ f_bjq_sid: row.f_bjq_sid,
418
+ f_userinfo_code: row.f_userinfo_code
419
+ }
420
+ ]
421
+ this.showMaterialModal = true
422
+ },
423
+ async updateConfirm() {
424
+ let data = this.row
425
+ data.f_material_price = this.materials[0].f_material_price
426
+ data.f_material_name = this.materials[0].f_material_name
427
+ data.f_material_style = this.materials[0].f_material_style
428
+ data.f_material_unit = this.materials[0].f_material_unit
429
+ data.f_material_number = this.materials[0].f_material_number
430
+ data.f_use_number = this.materials[0].f_use_number==''?0:this.materials[0].f_use_number
431
+ data.f_back_number = Number(data.f_material_number)-Number(data.f_use_number)
432
+ data.f_material_code = this.materials[0].f_material_code
433
+ data.f_bjq_sid = this.materials[0].f_bjq_sid
434
+ data.f_userinfo_code=this.materials[0].f_userinfo_code
435
+ //报警器流程 设备编号检验
436
+ await this.bjqCheck()
437
+ if (this.bjqChecklag.length > 0){
438
+ return
439
+ }
440
+
441
+ let http = new HttpResetClass()
442
+ let res = await http.load(
443
+ 'POST',
444
+ `${this.$androidUtil.getProxyUrl()}/rs/entity/t_material_apply`,
445
+ data
446
+ )
447
+ this.closeMaterials()
448
+ },
449
+ sycronizedCode(index,val){
450
+ console.log("看看:",index,val)
451
+ this.materials[index].f_material_code = val
452
+ },
453
+ closeMaterials() {
454
+ this.getOnetoManyData()
455
+ this.showMaterialModal = false
456
+ },
457
+ async bjqCheck(){
458
+ //报警器设备型号校验
459
+ this.bjqChecklag = [] //初始化
460
+ if (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建'){
461
+ let bjqinfo = {
462
+ f_material_name : "",
463
+ f_bjq_sid: ""
464
+ }
465
+ for (const bjqinfoElement of this.materials) {
466
+ bjqinfo.f_bjq_sid = bjqinfoElement.f_bjq_sid
467
+ bjqinfo.f_material_name = bjqinfoElement.f_material_name
468
+ if (bjqinfo.f_material_name.substr(0,3) === '报警器'){
469
+ let http = new HttpResetClass()
470
+ let res = await http.load(
471
+ 'POST',
472
+ // `/rs/logic/bjqcheck`,
473
+ `${this.$androidUtil.getProxyUrl()}/ncc/rs/logic/bjqcheck`,
474
+ bjqinfo
475
+ )
476
+ if (res.data.code != 200){
477
+ this.bjqChecklag.push(res.data.code)
478
+ //this.$showMessage(res.data.msg)
479
+ Vue.showAlert(res.data.msg, 'danger', 6000)
480
+ return
481
+ }
482
+ }
483
+ }
484
+ }
485
+ }
486
+ }
487
+ }
488
+
489
+ </script>
490
+
491
+ <style scoped>
492
+
493
+ </style>