apply-clients 3.5.4-67 → 3.5.4-69

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