apply-clients 3.5.4-83 → 3.5.4-84

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 (47) hide show
  1. package/build/dev-server.js +5 -9
  2. package/package.json +1 -1
  3. package/src/App.vue +25 -25
  4. package/src/applyAndroid.js +72 -72
  5. package/src/components/android/AppTakePic.vue +182 -181
  6. package/src/components/android/Process/Processes/AppChargeManagement.vue +635 -635
  7. package/src/components/android/Process/Processes/AppChargeManagementNew.vue +635 -635
  8. package/src/components/product/Material/MaterialDetailed.vue +268 -268
  9. package/src/components/product/Process/ExplorationSelect.vue +497 -497
  10. package/src/components/product/Process/Processes/chargeManagement.vue +656 -656
  11. package/src/filiale/baiyin/android/ByDeviceManagement.vue +916 -916
  12. package/src/filiale/fugou/android/AppAddMaterialScience.vue +448 -448
  13. package/src/filiale/fugou/android/AppDevicesManagement.vue +519 -519
  14. package/src/filiale/fugou/android/AppInstallationDetails.vue +541 -541
  15. package/src/filiale/fugou/android/AppServiceControl.vue +1845 -1843
  16. package/src/filiale/fugou/android/AppZhihuanManagement.vue +197 -191
  17. package/src/filiale/fugou/android/printCharge.vue +162 -0
  18. package/src/filiale/fugou/android.js +16 -15
  19. package/src/filiale/fugou/pc/ExplorationSelect.vue +525 -525
  20. package/src/filiale/fugou/pc/ServiceControl.vue +1705 -1703
  21. package/src/filiale/fugou/pc/ServiceView.vue +941 -941
  22. package/src/filiale/fugou/pc/devicesManagement.vue +483 -483
  23. package/src/filiale/fugou/pc/printChargepc.vue +148 -0
  24. package/src/filiale/fugou/pc.js +14 -13
  25. package/src/filiale/gongyi/android/AppAddMaterialScience.vue +493 -493
  26. package/src/filiale/jinhuang/pc/ServiceControl.vue +1925 -1925
  27. package/src/filiale/jinhuang/pc/addressAndUserinfoManagement.vue +203 -203
  28. package/src/filiale/jinhuang/pc/chargeManagementNew.vue +589 -589
  29. package/src/filiale/jinhuang/pc.js +8 -8
  30. package/src/filiale/qianneng/android/AppChargeManagement.vue +686 -686
  31. package/src/filiale/qianneng/android.js +15 -15
  32. package/src/filiale/qianneng/pc/Applydetail.vue +378 -378
  33. package/src/filiale/qianneng/pc/InstallFunction.vue +188 -188
  34. package/src/filiale/siyangRH/android/AppAddMaterialScience.vue +466 -466
  35. package/src/filiale/yangchunboneng/android/AppChargeManagement.vue +527 -527
  36. package/src/filiale/yangchunboneng/android/AppDevicesManagement.vue +639 -639
  37. package/src/filiale/yangchunboneng/android/AppServiceControl.vue +1681 -1681
  38. package/src/filiale/yangchunboneng/pc/ExplorationSelect.vue +548 -548
  39. package/src/filiale/yangchunboneng/pc/ServiceControl.vue +2075 -2075
  40. package/src/filiale/yangchunboneng/pc/chargeManagement.vue +1059 -1059
  41. package/src/filiale/yongzhouch/pc/ApplyUpload.vue +327 -327
  42. package/src/filiale/yongzhouch/pc/ExplorationSelect.vue +490 -490
  43. package/src/filiale/yongzhouch/pc/InstallationDetails.vue +610 -610
  44. package/src/filiale/yongzhouch/pc/ServiceControl.vue +1943 -1943
  45. package/src/filiale/yongzhouch/pc/devicesManagement.vue +488 -488
  46. package/src/filiale/yongzhouch/pc.js +10 -10
  47. package/src/main.js +3 -3
@@ -1,448 +1,448 @@
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">
13
- <button class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal('室内施工')">室内施工
14
- </button>
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_logotype}}</nobr>
39
- </td>
40
- <td style="text-align: center;">
41
- <button type="button" class="button_search button_spacing"
42
- @click="$parent.$parent.updateMaterial($index,row)">修改
43
- </button>
44
- <button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除
45
- </button>
46
- </td>
47
- </tr>
48
- </template>
49
- </data-grid>
50
- <modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal style="overflow: auto" :large="true"
51
- :backdrop="false" :title="title">
52
- <header slot="modal-header" class="modal-header">
53
- <button type="button" class="close" @click="closeMaterials"><span>&times;</span></button>
54
- <h4 class="modal-title">{{title}}</h4>
55
- </header>
56
- <article slot="modal-body" class="modal-body clearfix">
57
- <data-grid v-if=" title==='新增'&& showtype == '室内施工'&& indoormaterials.rows.length > 0 " :model="indoormaterials" class="list_area table_sy">
58
- <template partial='head'>
59
- <tr>
60
- <th class="textNoLineBreak" colspan="5">室内材料</th>
61
- </tr>
62
- <tr>
63
- <th class="textNoLineBreak">材料名称</th>
64
- <th class="textNoLineBreak">材料型号</th>
65
- <th class="textNoLineBreak">材料单位</th>
66
- <th class="textNoLineBreak">是否选择</th>
67
- <th class="textNoLineBreak">材料数量</th>
68
- </tr>
69
- </template>
70
- <template partial='body' >
71
- <tr>
72
- <td style="text-align: center;">
73
- <nobr>{{row.f_material_name}}</nobr>
74
- </td>
75
- <td style="text-align: center;">
76
- <nobr>{{row.f_material_style}}</nobr>
77
- </td>
78
- <td style="text-align: center;">
79
- <nobr>{{row.f_material_unit}}</nobr>
80
- </td>
81
- <td style="text-align: center;">
82
- <input type="checkbox" v-model="row.f_is_check" :value.sync="row.f_is_check"/>
83
- </td>
84
- <td style="text-align: center;">
85
- <input class="form-control input_view" type="number"
86
- placeholder="设备数量"
87
- v-model="row.f_material_number"
88
- :value.sync="row.f_material_number"
89
- />
90
- </td>
91
- </tr>
92
- </template>
93
- </data-grid>
94
- <data-grid v-if=" title==='新增'&& showtype == '地埋施工'&& undergroundmaterials.rows.length > 0 " :model="undergroundmaterials" class="list_area table_sy">
95
- <template partial='head'>
96
- <tr>
97
- <th class="textNoLineBreak" colspan="5">地埋材料</th>
98
- </tr>
99
- <tr>
100
- <th class="textNoLineBreak">材料名称</th>
101
- <th class="textNoLineBreak">材料型号</th>
102
- <th class="textNoLineBreak">材料单位</th>
103
- <th class="textNoLineBreak">是否选择</th>
104
- <th class="textNoLineBreak">材料数量</th>
105
- </tr>
106
- </template>
107
- <template partial='body' >
108
- <tr>
109
- <td style="text-align: center;">
110
- <nobr>{{row.f_material_name}}</nobr>
111
- </td>
112
- <td style="text-align: center;">
113
- <nobr>{{row.f_material_style}}</nobr>
114
- </td>
115
- <td style="text-align: center;">
116
- <nobr>{{row.f_material_unit}}</nobr>
117
- </td>
118
- <td style="text-align: center;">
119
- <input type="checkbox" v-model="row.f_is_check" :value.sync="row.f_is_check"/>
120
- </td>
121
- <td style="text-align: center;">
122
- <input class="form-control input_view" type="number"
123
- placeholder="设备数量"
124
- v-model="row.f_material_number"
125
- :value.sync="row.f_material_number"
126
- />
127
- </td>
128
- </tr>
129
- </template>
130
- </data-grid>
131
- <div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
132
- <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
133
- <div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
134
- <div class="col-sm-6 text-right">
135
- <button
136
- class="button_delete button_spacing"
137
- @click.prevent="deleteDevicesinfo(i)"
138
- v-if="title === '新增'"
139
- >删除
140
- </button>
141
- </div>
142
- </div>
143
- <div class="form-group col-sm-6" v-if="title==='新增'">
144
- <label class="col-sm-4 control-label">选择材料:</label>
145
- <div class="col-sm-8">
146
- <input-select
147
- class="select select_list"
148
- :value.sync="item.material"
149
- v-model="item.material"
150
- :options="meterialOptions"
151
- :disable="mark === 1"
152
- @change="modifyOtherValue(i)"
153
- :valueSingle="true"></input-select>
154
- </div>
155
- </div>
156
- <div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
157
- <label class="col-sm-4 control-label">材料名称:</label>
158
- <div class="col-sm-8">
159
- <input class="form-control input_view" style="" type="text"
160
- placeholder="材料名称"
161
- v-model="item.f_material_name"
162
- :value="item.f_material_name"
163
- />
164
- </div>
165
- </div>
166
- <div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
167
- <label class="col-sm-4 control-label">材料型号:</label>
168
- <div class="col-sm-8">
169
- <input class="form-control input_view" style="" type="text"
170
- placeholder="材料型号"
171
- v-model="item.f_material_style"
172
- :value="item.f_material_style"
173
- />
174
- </div>
175
- </div>
176
- <div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
177
- <label class="col-sm-4 control-label">材料单位:</label>
178
- <div class="col-sm-8">
179
- <input class="form-control input_view" style="" type="text"
180
- placeholder="材料单位"
181
- v-model="item.f_material_unit"
182
- :value="item.f_material_unit"
183
- />
184
- </div>
185
- </div>
186
- <div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
187
- <label class="col-sm-4 control-label">材料数量:</label>
188
- <div class="col-sm-8">
189
- <input class="form-control input_view" style="" type="number"
190
- placeholder="设备数量"
191
- v-model="item.f_material_number"
192
- :value="item.f_material_number"
193
- />
194
- </div>
195
- </div>
196
- </div>
197
-
198
- </article>
199
- <footer slot="modal-footer" class="modal-footer">
200
- <template v-if="mark !== 1">
201
- <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
202
- <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()"
203
- :disabled="!$v.valid">确认添加
204
- </button>
205
- <button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()"
206
- :disabled="!$v.valid">确认修改
207
- </button>
208
- </template>
209
- </footer>
210
- </modal>
211
- </div>
212
- </template>
213
-
214
- <script>
215
- import Vue from 'vue'
216
- import {HttpResetClass} from 'vue-client'
217
- import {isEmpty} from "../../../components/Util";
218
-
219
- export default {
220
- name: 'addMaterialScience',
221
- props: {
222
- selectdata: {
223
- type: Object
224
- }
225
- },
226
- data() {
227
- return {
228
- onetomany: {
229
- rows: []
230
- },
231
- logotype:"",
232
- title: '新增',
233
- showMaterialModal: false,
234
- materials: [
235
- ],
236
- meterialOptions: [],
237
- row: {},
238
- fmaterialname:{},
239
- isShow:[false],
240
- indoormaterials: {
241
- rows: []
242
- },
243
- undergroundmaterials: {
244
- rows: []
245
- },
246
- showtype:''
247
- }
248
- },
249
- ready() {
250
- this.getOnetoManyData()
251
- },
252
- methods: {
253
- async getOnetoManyData () {
254
- let http = new HttpResetClass()
255
- let data = {
256
- tablename: `t_material_apply`,
257
- condition: `f_process_id='${this.selectdata.f_process_id}'`
258
- }
259
- let res = await http.load(
260
- 'POST',
261
- `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable?aaa=123`,
262
- {data: data},
263
- {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
264
- )
265
- this.onetomany.rows = res.data
266
- },
267
- async getMateralOptions () {
268
- this.indoormaterials.rows = []
269
- this.undergroundmaterials.rows = []
270
- let datarow = {
271
- workname: 'materials'
272
- }
273
- let http = new HttpResetClass()
274
- let row = await http.load(
275
- 'POST',
276
- `${this.$androidUtil.getProxyUrl()}/rs/logic/ApplyGetConfigs`,
277
- {data: datarow},
278
- {resolveMsg: null, rejectMsg: '配置数据获取失败!!!'}
279
- )
280
- if (this.selectdata.f_apply_type == '散户报建'){
281
- this.indoormaterials.rows = row.data['散户报建']['室内材料']
282
- this.undergroundmaterials.rows = row.data['散户报建']['地埋材料']
283
- }else if (this.selectdata.f_apply_type == '工商户报建' && this.selectdata.f_apply_nature == '商业报建' ){
284
- this.indoormaterials.rows = row.data['商业报建']['室内材料']
285
- this.undergroundmaterials.rows = row.data['商业报建']['地埋材料']
286
- }
287
- },
288
- async openMaterialModal(row) {
289
- await this.getMateralOptions()
290
- this.materials = []
291
- await this.getMateralNames()
292
- this.title = '新增'
293
- this.showtype = row
294
- this.logotype=row
295
- this.showMaterialModal = true
296
- this.isShow = [false]
297
- },
298
- deleteDevicesinfo(index) {
299
- this.materials.splice(index, 1)
300
- this.isShow.splice(index, 1)
301
- },
302
- pushMaterial() {
303
- this.materials.push({
304
- f_material_price: '',
305
- material: '',
306
- f_material_name: '',
307
- f_material_style: '',
308
- f_material_unit: '',
309
- f_material_number: '',
310
- f_bjq_sid: '',
311
- f_material_code: '',
312
- f_userinfo_code: ''
313
- })
314
- this.isShow.push(false)
315
- },
316
- // 获取模态框材料
317
- async getMateralNames() {
318
- let data = {
319
- condition: `1=1`
320
- }
321
- let http = new HttpResetClass()
322
- let res = await http.load(
323
- 'POST',
324
- `${this.$androidUtil.getProxyUrl()}/rs/sql/getStockMaterial`,
325
- {data: data},
326
- {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
327
- )
328
-
329
- this.meterialOptions = res.data.map(item => {
330
- return {
331
- 'label': `${item.f_material_name}--${item.f_material_style}`,
332
- 'value': item
333
- }
334
- })
335
- },
336
- modifyOtherValue(index) {
337
- console.log("进来了", index)
338
- console.log("dddd", this.materials[index].material)
339
- if(this.materials[index].material){
340
- let material = this.materials[index].material
341
- this.materials[index].f_material_price = material.f_material_price
342
- this.materials[index].f_material_name = material.f_material_name
343
- this.materials[index].f_material_style = material.f_material_style
344
- this.materials[index].f_material_unit = material.f_material_unit
345
- this.materials[index].f_material_number = material.f_material_number
346
- this.materials[index].f_material_code = material.f_material_code
347
- this.materials[index].f_userinfo_code = material.f_userinfo_code
348
- }else{
349
- this.materials[index].f_material_price =''
350
- this.materials[index].f_material_name = ''
351
- this.materials[index].f_material_style = ''
352
- this.materials[index].f_material_unit =''
353
- this.materials[index].f_material_number = ''
354
- this.materials[index].f_material_code =''
355
- this.materials[index].f_userinfo_code =''
356
- }
357
- },
358
- // 新增材料
359
- async addMaterial() {
360
- this.title = '新增'
361
- for (let i = 0; i < this.indoormaterials.rows.length; i++){
362
- let row = this.indoormaterials.rows[i]
363
- if (row.f_is_check && !isEmpty(row.f_material_number)){
364
- this.materials.push(row)
365
- }
366
- }
367
- for (let i = 0; i < this.undergroundmaterials.rows.length; i++){
368
- let row = this.undergroundmaterials.rows[i]
369
- if (row.f_is_check && !isEmpty(row.f_material_number)){
370
- this.materials.push(row)
371
- }
372
- }
373
- let data = {
374
- f_process_id: this.selectdata.f_process_id,
375
- f_operator_id: Vue.user.id,
376
- f_operator: Vue.user.name,
377
- f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
378
- f_orgid: Vue.user.orgid,
379
- f_orgname: Vue.user.orgs,
380
- materials: this.materials,
381
- logotype:this.logotype
382
- }
383
- let http = new HttpResetClass()
384
- let res = await http.load(
385
- 'POST',
386
- `${this.$androidUtil.getProxyUrl()}/rs/logic/saveMaterials`,
387
- data
388
- )
389
- this.closeMaterials()
390
- },
391
- async deleteMaterial(row) {
392
- debugger
393
- var show1 = window.confirm('您确定要删除这条记录吗?')
394
- if(show1 != true){
395
- this.closeMaterials()
396
- }else{
397
- let http = new HttpResetClass()
398
- let res = await http.load(
399
- 'POST',
400
- `${this.$androidUtil.getProxyUrl()}/rs/logic/deleteMaterial`,
401
- {data: row},
402
- {resolveMsg: null, rejectMsg: '材料删除失败!!!'}
403
- )
404
- this.closeMaterials()
405
- }
406
- }
407
- ,
408
- async updateMaterial(index, row) {
409
- this.title = '修改'
410
- this.row = row
411
- this.materials[0] = row
412
- this.showMaterialModal = true
413
- },
414
- async updateConfirm() {
415
- let data = this.row
416
- data.f_material_price = this.materials[0].f_material_price
417
- data.f_material_name = this.materials[0].f_material_name
418
- data.f_material_style = this.materials[0].f_material_style
419
- data.f_material_unit = this.materials[0].f_material_unit
420
- data.f_material_number = this.materials[0].f_material_number
421
- data.f_material_code = this.materials[0].f_material_code
422
- data.f_bjq_sid = this.materials[0].f_bjq_sid
423
- data.f_userinfo_code=this.materials[0].f_userinfo_code
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
- }
442
- }
443
-
444
- </script>
445
-
446
- <style scoped>
447
-
448
- </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">
13
+ <button style="color:black" class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal('室内施工')">室内施工
14
+ </button>
15
+ <button style="color:black" 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_logotype}}</nobr>
39
+ </td>
40
+ <td style="text-align: center;">
41
+ <button type="button" class="button_search button_spacing"
42
+ @click="$parent.$parent.updateMaterial($index,row)">修改
43
+ </button>
44
+ <button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除
45
+ </button>
46
+ </td>
47
+ </tr>
48
+ </template>
49
+ </data-grid>
50
+ <modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal style="overflow: auto" :large="true"
51
+ :backdrop="false" :title="title">
52
+ <header slot="modal-header" class="modal-header">
53
+ <button type="button" class="close" @click="closeMaterials"><span>&times;</span></button>
54
+ <h4 class="modal-title">{{title}}</h4>
55
+ </header>
56
+ <article slot="modal-body" class="modal-body clearfix">
57
+ <data-grid v-if=" title==='新增'&& showtype == '室内施工'&& indoormaterials.rows.length > 0 " :model="indoormaterials" class="list_area table_sy">
58
+ <template partial='head'>
59
+ <tr>
60
+ <th class="textNoLineBreak" colspan="5">室内材料</th>
61
+ </tr>
62
+ <tr>
63
+ <th class="textNoLineBreak">材料名称</th>
64
+ <th class="textNoLineBreak">材料型号</th>
65
+ <th class="textNoLineBreak">材料单位</th>
66
+ <th class="textNoLineBreak">是否选择</th>
67
+ <th class="textNoLineBreak">材料数量</th>
68
+ </tr>
69
+ </template>
70
+ <template partial='body' >
71
+ <tr>
72
+ <td style="text-align: center;">
73
+ <nobr>{{row.f_material_name}}</nobr>
74
+ </td>
75
+ <td style="text-align: center;">
76
+ <nobr>{{row.f_material_style}}</nobr>
77
+ </td>
78
+ <td style="text-align: center;">
79
+ <nobr>{{row.f_material_unit}}</nobr>
80
+ </td>
81
+ <td style="text-align: center;">
82
+ <input type="checkbox" v-model="row.f_is_check" :value.sync="row.f_is_check"/>
83
+ </td>
84
+ <td style="text-align: center;">
85
+ <input class="form-control input_view" type="number"
86
+ placeholder="设备数量"
87
+ v-model="row.f_material_number"
88
+ :value.sync="row.f_material_number"
89
+ />
90
+ </td>
91
+ </tr>
92
+ </template>
93
+ </data-grid>
94
+ <data-grid v-if=" title==='新增'&& showtype == '地埋施工'&& undergroundmaterials.rows.length > 0 " :model="undergroundmaterials" class="list_area table_sy">
95
+ <template partial='head'>
96
+ <tr>
97
+ <th class="textNoLineBreak" colspan="5">地埋材料</th>
98
+ </tr>
99
+ <tr>
100
+ <th class="textNoLineBreak">材料名称</th>
101
+ <th class="textNoLineBreak">材料型号</th>
102
+ <th class="textNoLineBreak">材料单位</th>
103
+ <th class="textNoLineBreak">是否选择</th>
104
+ <th class="textNoLineBreak">材料数量</th>
105
+ </tr>
106
+ </template>
107
+ <template partial='body' >
108
+ <tr>
109
+ <td style="text-align: center;">
110
+ <nobr>{{row.f_material_name}}</nobr>
111
+ </td>
112
+ <td style="text-align: center;">
113
+ <nobr>{{row.f_material_style}}</nobr>
114
+ </td>
115
+ <td style="text-align: center;">
116
+ <nobr>{{row.f_material_unit}}</nobr>
117
+ </td>
118
+ <td style="text-align: center;">
119
+ <input type="checkbox" v-model="row.f_is_check" :value.sync="row.f_is_check"/>
120
+ </td>
121
+ <td style="text-align: center;">
122
+ <input class="form-control input_view" type="number"
123
+ placeholder="设备数量"
124
+ v-model="row.f_material_number"
125
+ :value.sync="row.f_material_number"
126
+ />
127
+ </td>
128
+ </tr>
129
+ </template>
130
+ </data-grid>
131
+ <div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
132
+ <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
133
+ <div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
134
+ <div class="col-sm-6 text-right">
135
+ <button
136
+ class="button_delete button_spacing"
137
+ @click.prevent="deleteDevicesinfo(i)"
138
+ v-if="title === '新增'"
139
+ >删除
140
+ </button>
141
+ </div>
142
+ </div>
143
+ <div class="form-group col-sm-6" v-if="title==='新增'">
144
+ <label class="col-sm-4 control-label">选择材料:</label>
145
+ <div class="col-sm-8">
146
+ <input-select
147
+ class="select select_list"
148
+ :value.sync="item.material"
149
+ v-model="item.material"
150
+ :options="meterialOptions"
151
+ :disable="mark === 1"
152
+ @change="modifyOtherValue(i)"
153
+ :valueSingle="true"></input-select>
154
+ </div>
155
+ </div>
156
+ <div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
157
+ <label class="col-sm-4 control-label">材料名称:</label>
158
+ <div class="col-sm-8">
159
+ <input class="form-control input_view" style="" type="text"
160
+ placeholder="材料名称"
161
+ v-model="item.f_material_name"
162
+ :value="item.f_material_name"
163
+ />
164
+ </div>
165
+ </div>
166
+ <div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
167
+ <label class="col-sm-4 control-label">材料型号:</label>
168
+ <div class="col-sm-8">
169
+ <input class="form-control input_view" style="" type="text"
170
+ placeholder="材料型号"
171
+ v-model="item.f_material_style"
172
+ :value="item.f_material_style"
173
+ />
174
+ </div>
175
+ </div>
176
+ <div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
177
+ <label class="col-sm-4 control-label">材料单位:</label>
178
+ <div class="col-sm-8">
179
+ <input class="form-control input_view" style="" type="text"
180
+ placeholder="材料单位"
181
+ v-model="item.f_material_unit"
182
+ :value="item.f_material_unit"
183
+ />
184
+ </div>
185
+ </div>
186
+ <div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
187
+ <label class="col-sm-4 control-label">材料数量:</label>
188
+ <div class="col-sm-8">
189
+ <input class="form-control input_view" style="" type="number"
190
+ placeholder="设备数量"
191
+ v-model="item.f_material_number"
192
+ :value="item.f_material_number"
193
+ />
194
+ </div>
195
+ </div>
196
+ </div>
197
+
198
+ </article>
199
+ <footer slot="modal-footer" class="modal-footer">
200
+ <template v-if="mark !== 1">
201
+ <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
202
+ <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()"
203
+ :disabled="!$v.valid">确认添加
204
+ </button>
205
+ <button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()"
206
+ :disabled="!$v.valid">确认修改
207
+ </button>
208
+ </template>
209
+ </footer>
210
+ </modal>
211
+ </div>
212
+ </template>
213
+
214
+ <script>
215
+ import Vue from 'vue'
216
+ import {HttpResetClass} from 'vue-client'
217
+ import {isEmpty} from "../../../components/Util";
218
+
219
+ export default {
220
+ name: 'addMaterialScience',
221
+ props: {
222
+ selectdata: {
223
+ type: Object
224
+ }
225
+ },
226
+ data() {
227
+ return {
228
+ onetomany: {
229
+ rows: []
230
+ },
231
+ logotype:"",
232
+ title: '新增',
233
+ showMaterialModal: false,
234
+ materials: [
235
+ ],
236
+ meterialOptions: [],
237
+ row: {},
238
+ fmaterialname:{},
239
+ isShow:[false],
240
+ indoormaterials: {
241
+ rows: []
242
+ },
243
+ undergroundmaterials: {
244
+ rows: []
245
+ },
246
+ showtype:''
247
+ }
248
+ },
249
+ ready() {
250
+ this.getOnetoManyData()
251
+ },
252
+ methods: {
253
+ async getOnetoManyData () {
254
+ let http = new HttpResetClass()
255
+ let data = {
256
+ tablename: `t_material_apply`,
257
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
258
+ }
259
+ let res = await http.load(
260
+ 'POST',
261
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable?aaa=123`,
262
+ {data: data},
263
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
264
+ )
265
+ this.onetomany.rows = res.data
266
+ },
267
+ async getMateralOptions () {
268
+ this.indoormaterials.rows = []
269
+ this.undergroundmaterials.rows = []
270
+ let datarow = {
271
+ workname: 'materials'
272
+ }
273
+ let http = new HttpResetClass()
274
+ let row = await http.load(
275
+ 'POST',
276
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/ApplyGetConfigs`,
277
+ {data: datarow},
278
+ {resolveMsg: null, rejectMsg: '配置数据获取失败!!!'}
279
+ )
280
+ if (this.selectdata.f_apply_type == '散户报建'){
281
+ this.indoormaterials.rows = row.data['散户报建']['室内材料']
282
+ this.undergroundmaterials.rows = row.data['散户报建']['地埋材料']
283
+ }else if (this.selectdata.f_apply_type == '工商户报建' && this.selectdata.f_apply_nature == '商业报建' ){
284
+ this.indoormaterials.rows = row.data['商业报建']['室内材料']
285
+ this.undergroundmaterials.rows = row.data['商业报建']['地埋材料']
286
+ }
287
+ },
288
+ async openMaterialModal(row) {
289
+ await this.getMateralOptions()
290
+ this.materials = []
291
+ await this.getMateralNames()
292
+ this.title = '新增'
293
+ this.showtype = row
294
+ this.logotype=row
295
+ this.showMaterialModal = true
296
+ this.isShow = [false]
297
+ },
298
+ deleteDevicesinfo(index) {
299
+ this.materials.splice(index, 1)
300
+ this.isShow.splice(index, 1)
301
+ },
302
+ pushMaterial() {
303
+ this.materials.push({
304
+ f_material_price: '',
305
+ material: '',
306
+ f_material_name: '',
307
+ f_material_style: '',
308
+ f_material_unit: '',
309
+ f_material_number: '',
310
+ f_bjq_sid: '',
311
+ f_material_code: '',
312
+ f_userinfo_code: ''
313
+ })
314
+ this.isShow.push(false)
315
+ },
316
+ // 获取模态框材料
317
+ async getMateralNames() {
318
+ let data = {
319
+ condition: `1=1`
320
+ }
321
+ let http = new HttpResetClass()
322
+ let res = await http.load(
323
+ 'POST',
324
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/getStockMaterial`,
325
+ {data: data},
326
+ {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
327
+ )
328
+
329
+ this.meterialOptions = res.data.map(item => {
330
+ return {
331
+ 'label': `${item.f_material_name}--${item.f_material_style}`,
332
+ 'value': item
333
+ }
334
+ })
335
+ },
336
+ modifyOtherValue(index) {
337
+ console.log("进来了", index)
338
+ console.log("dddd", this.materials[index].material)
339
+ if(this.materials[index].material){
340
+ let material = this.materials[index].material
341
+ this.materials[index].f_material_price = material.f_material_price
342
+ this.materials[index].f_material_name = material.f_material_name
343
+ this.materials[index].f_material_style = material.f_material_style
344
+ this.materials[index].f_material_unit = material.f_material_unit
345
+ this.materials[index].f_material_number = material.f_material_number
346
+ this.materials[index].f_material_code = material.f_material_code
347
+ this.materials[index].f_userinfo_code = material.f_userinfo_code
348
+ }else{
349
+ this.materials[index].f_material_price =''
350
+ this.materials[index].f_material_name = ''
351
+ this.materials[index].f_material_style = ''
352
+ this.materials[index].f_material_unit =''
353
+ this.materials[index].f_material_number = ''
354
+ this.materials[index].f_material_code =''
355
+ this.materials[index].f_userinfo_code =''
356
+ }
357
+ },
358
+ // 新增材料
359
+ async addMaterial() {
360
+ this.title = '新增'
361
+ for (let i = 0; i < this.indoormaterials.rows.length; i++){
362
+ let row = this.indoormaterials.rows[i]
363
+ if (row.f_is_check && !isEmpty(row.f_material_number)){
364
+ this.materials.push(row)
365
+ }
366
+ }
367
+ for (let i = 0; i < this.undergroundmaterials.rows.length; i++){
368
+ let row = this.undergroundmaterials.rows[i]
369
+ if (row.f_is_check && !isEmpty(row.f_material_number)){
370
+ this.materials.push(row)
371
+ }
372
+ }
373
+ let data = {
374
+ f_process_id: this.selectdata.f_process_id,
375
+ f_operator_id: Vue.user.id,
376
+ f_operator: Vue.user.name,
377
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
378
+ f_orgid: Vue.user.orgid,
379
+ f_orgname: Vue.user.orgs,
380
+ materials: this.materials,
381
+ logotype:this.logotype
382
+ }
383
+ let http = new HttpResetClass()
384
+ let res = await http.load(
385
+ 'POST',
386
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/saveMaterials`,
387
+ data
388
+ )
389
+ this.closeMaterials()
390
+ },
391
+ async deleteMaterial(row) {
392
+ debugger
393
+ var show1 = window.confirm('您确定要删除这条记录吗?')
394
+ if(show1 != true){
395
+ this.closeMaterials()
396
+ }else{
397
+ let http = new HttpResetClass()
398
+ let res = await http.load(
399
+ 'POST',
400
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/deleteMaterial`,
401
+ {data: row},
402
+ {resolveMsg: null, rejectMsg: '材料删除失败!!!'}
403
+ )
404
+ this.closeMaterials()
405
+ }
406
+ }
407
+ ,
408
+ async updateMaterial(index, row) {
409
+ this.title = '修改'
410
+ this.row = row
411
+ this.materials[0] = row
412
+ this.showMaterialModal = true
413
+ },
414
+ async updateConfirm() {
415
+ let data = this.row
416
+ data.f_material_price = this.materials[0].f_material_price
417
+ data.f_material_name = this.materials[0].f_material_name
418
+ data.f_material_style = this.materials[0].f_material_style
419
+ data.f_material_unit = this.materials[0].f_material_unit
420
+ data.f_material_number = this.materials[0].f_material_number
421
+ data.f_material_code = this.materials[0].f_material_code
422
+ data.f_bjq_sid = this.materials[0].f_bjq_sid
423
+ data.f_userinfo_code=this.materials[0].f_userinfo_code
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
+ }
442
+ }
443
+
444
+ </script>
445
+
446
+ <style scoped>
447
+
448
+ </style>