apply-clients 3.5.4-65 → 3.5.4-67

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 +9 -5
  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 -1025
  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 +515 -515
  15. package/src/filiale/fugou/pc/InstallationDetails.vue +647 -647
  16. package/src/filiale/fugou/pc/ServiceControl.vue +1702 -1702
  17. package/src/filiale/fugou/pc/addMaterialScience.vue +482 -482
  18. package/src/filiale/fugou/pc/devicesManagement.vue +483 -483
  19. package/src/filiale/fugou/pc.js +10 -10
  20. package/src/filiale/gongyi/android/AppAddMaterialScience.vue +493 -493
  21. package/src/filiale/gongyi/android/AppDisclosurerecord.vue +214 -214
  22. package/src/filiale/gongyi/android/AppInstallationDetails.vue +500 -500
  23. package/src/filiale/gongyi/android/AppLegacyIssues.vue +309 -309
  24. package/src/filiale/gongyi/android/AppSign.vue +170 -157
  25. package/src/filiale/gongyi/android/AppSupplementalAgreement.vue +298 -298
  26. package/src/filiale/gongyi/android.js +18 -18
  27. package/src/filiale/gongyi/pc/ApplyUpload.vue +371 -378
  28. package/src/filiale/gongyi/pc/PcAddLogs.vue +221 -217
  29. package/src/filiale/gongyi/pc/PcDisclosurerecord.vue +218 -218
  30. package/src/filiale/gongyi/pc/PcLegacyIssues.vue +309 -314
  31. package/src/filiale/gongyi/pc/SupervisoryServiceControl.vue +894 -894
  32. package/src/filiale/gongyi/pc/SupervisoryServiceView.vue +1005 -1005
  33. package/src/filiale/gongyi/pc/addMaterialScience.vue +575 -564
  34. package/src/filiale/gongyi/pc/chargeManagement.vue +765 -763
  35. package/src/filiale/gongyi/pc/supplementalAgreement.vue +277 -277
  36. package/src/filiale/gongyi/pc.js +24 -24
  37. package/src/filiale/hongda/pc/SupervisoryList.vue +422 -422
  38. package/src/filiale/qianneng/android/AppChargeManagement.vue +686 -686
  39. package/src/filiale/qianneng/android.js +15 -15
  40. package/src/filiale/qianneng/pc/Applydetail.vue +378 -378
  41. package/src/filiale/qianneng/pc/InstallFunction.vue +188 -188
  42. package/src/filiale/yangchunboneng/android/AppChargeManagement.vue +526 -526
  43. package/src/filiale/yangchunboneng/android/AppDevicesManagement.vue +639 -639
  44. package/src/filiale/yangchunboneng/android/AppInstallationMaterial.vue +2 -0
  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,482 +1,482 @@
1
- <template>
2
- <div>
3
- <data-grid :model="onetomany" class="list_area table_sy">
4
- <template partial='head'>
5
- <tr>
6
- <th class="textNoLineBreak">序号</th>
7
- <th class="textNoLineBreak">材料名称</th>
8
- <th class="textNoLineBreak">材料型号</th>
9
- <th class="textNoLineBreak">材料单位</th>
10
- <th class="textNoLineBreak">材料数量</th>
11
- <th class="textNoLineBreak">材料编号</th>
12
- <th class="textNoLineBreak">材料标识</th>
13
- <th class="textNoLineBreak">用户编号</th>
14
- <th class="textNoLineBreak">
15
- <button class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal('室内施工')">室内施工</button>
16
- <button class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal('地埋施工')">地埋施工</button>
17
- <button type="button" class="btn btn-info head-but" v-if="$parent.$parent.mark === 0"
18
- @click="$parent.$parent.showFile = !$parent.$parent.showFile">导入</button>
19
- <a type="button" class="btn btn-info head-but" v-if="$parent.$parent.mark === 0"
20
- href="/apply/download/excel/材料明细.xlsx" download>模板下载</a>
21
- </th>
22
- </tr>
23
- </template>
24
- <template partial='body'>
25
- <tr>
26
- <td style="text-align: center;">
27
- <nobr>{{$index+1}}</nobr>
28
- </td>
29
- <td style="text-align: center;">
30
- <nobr>{{row.f_material_name}}</nobr>
31
- </td>
32
- <td style="text-align: center;">
33
- <nobr>{{row.f_material_style}}</nobr>
34
- </td>
35
- <td style="text-align: center;">
36
- <nobr>{{row.f_material_unit}}</nobr>
37
- </td>
38
- <td style="text-align: center;">
39
- <nobr>{{row.f_material_number}}</nobr>
40
- </td>
41
- <td style="text-align: center;">
42
- <nobr>{{row.f_bjq_sid}}</nobr>
43
- </td>
44
- <td style="text-align: center;">
45
- <nobr>{{row.f_material_code}}</nobr>
46
- </td>
47
- <td style="text-align: center;">
48
- <nobr>{{row.f_userinfo_code}}</nobr>
49
- </td>
50
- <td style="text-align: center;">
51
- <button type="button" class="button_search button_spacing" @click="$parent.$parent.updateMaterial($index,row)">修改</button>
52
- <button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除</button>
53
- </td>
54
- </tr>
55
- </template>
56
- </data-grid>
57
- <modal v-if="showFile" :show.sync="showFile" v-ref:modal :backdrop="false" title="选择文件">
58
- <header slot="modal-header" class="modal-header">
59
- <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
60
- <h4 class="modal-title">选择文件</h4>
61
- </header>
62
- <article slot="modal-body" class="modal-body">
63
- <div class="form-group">
64
- <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" v-ref:file></file-upload>
65
- </div>
66
- </article>
67
- <footer slot="modal-footer" class="modal-footer"></footer>
68
- </modal>
69
- <modal v-if="showMaterialModal" :show.sync="showMaterialModal" style="overflow: auto" v-ref:modal :large="true"
70
- :backdrop="false" :title="title">
71
- <header slot="modal-header" class="modal-header">
72
- <button type="button" class="close" @click="closeMaterials"><span>&times;</span></button>
73
- <h4 class="modal-title">{{title}}</h4>
74
- </header>
75
- <article slot="modal-body" class="modal-body clearfix">
76
- <data-grid v-if=" title==='新增'&& showtype == '室内施工'&& indoormaterials.rows.length > 0 " :model="indoormaterials" class="list_area table_sy">
77
- <template partial='head'>
78
- <tr>
79
- <th class="textNoLineBreak" colspan="5">室内材料</th>
80
- </tr>
81
- <tr>
82
- <th class="textNoLineBreak">材料名称</th>
83
- <th class="textNoLineBreak">材料型号</th>
84
- <th class="textNoLineBreak">材料单位</th>
85
- <th class="textNoLineBreak">是否选择</th>
86
- <th class="textNoLineBreak">材料数量</th>
87
- </tr>
88
- </template>
89
- <template partial='body' >
90
- <tr>
91
- <td style="text-align: center;">
92
- <nobr>{{row.f_material_name}}</nobr>
93
- </td>
94
- <td style="text-align: center;">
95
- <nobr>{{row.f_material_style}}</nobr>
96
- </td>
97
- <td style="text-align: center;">
98
- <nobr>{{row.f_material_unit}}</nobr>
99
- </td>
100
- <td style="text-align: center;">
101
- <input type="checkbox" v-model="row.f_is_check" :value.sync="row.f_is_check"/>
102
- </td>
103
- <td style="text-align: center;">
104
- <input class="form-control input_view" type="number"
105
- placeholder="设备数量"
106
- v-model="row.f_material_number"
107
- :value.sync="row.f_material_number"
108
- />
109
- </td>
110
- </tr>
111
- </template>
112
- </data-grid>
113
- <data-grid v-if=" title==='新增'&& showtype == '地埋施工'&& undergroundmaterials.rows.length > 0 " :model="undergroundmaterials" class="list_area table_sy">
114
- <template partial='head'>
115
- <tr>
116
- <th class="textNoLineBreak" colspan="5">地埋材料</th>
117
- </tr>
118
- <tr>
119
- <th class="textNoLineBreak">材料名称</th>
120
- <th class="textNoLineBreak">材料型号</th>
121
- <th class="textNoLineBreak">材料单位</th>
122
- <th class="textNoLineBreak">是否选择</th>
123
- <th class="textNoLineBreak">材料数量</th>
124
- </tr>
125
- </template>
126
- <template partial='body' >
127
- <tr>
128
- <td style="text-align: center;">
129
- <nobr>{{row.f_material_name}}</nobr>
130
- </td>
131
- <td style="text-align: center;">
132
- <nobr>{{row.f_material_style}}</nobr>
133
- </td>
134
- <td style="text-align: center;">
135
- <nobr>{{row.f_material_unit}}</nobr>
136
- </td>
137
- <td style="text-align: center;">
138
- <input type="checkbox" v-model="row.f_is_check" :value.sync="row.f_is_check"/>
139
- </td>
140
- <td style="text-align: center;">
141
- <input class="form-control input_view" type="number"
142
- placeholder="设备数量"
143
- v-model="row.f_material_number"
144
- :value.sync="row.f_material_number"
145
- />
146
- </td>
147
- </tr>
148
- </template>
149
- </data-grid>
150
- <div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
151
- <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
152
- <div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
153
- <div class="col-sm-6 text-right"><button
154
- class="button_delete button_spacing"
155
- @click.prevent="deleteDevicesinfo(i)"
156
- v-if="title === '新增'"
157
- >删除</button></div>
158
- </div>
159
- <div class="form-group col-sm-6" v-if="title==='新增'">
160
- <label class="col-sm-4 control-label">选择材料:</label>
161
- <div class="col-sm-8">
162
- <input-select
163
- class="select select_list"
164
- :value.sync="item.material"
165
- v-model="item.material"
166
- :options="meterialOptions"
167
- :disable="mark === 1"
168
- @change="modifyOtherValue(i)"
169
- :valueSingle="true"></input-select>
170
- </div>
171
- </div>
172
- <div class="form-group col-sm-6" :class="[item.f_material_name ? '' : '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_name"
178
- :value="item.f_material_name"
179
- />
180
- </div>
181
- </div>
182
- <div class="form-group col-sm-6" :class="[item.f_material_style ? '' : '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="text"
186
- placeholder="材料型号"
187
- v-model="item.f_material_style"
188
- :value="item.f_material_style"
189
- />
190
- </div>
191
- </div>
192
- <div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
193
- <label class="col-sm-4 control-label">材料单位:</label>
194
- <div class="col-sm-8">
195
- <input class="form-control input_view" style="" type="text"
196
- placeholder="材料单位"
197
- v-model="item.f_material_unit"
198
- :value="item.f_material_unit"
199
- />
200
- </div>
201
- </div>
202
- <div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
203
- <label class="col-sm-4 control-label">材料数量:</label>
204
- <div class="col-sm-8">
205
- <input class="form-control input_view" style="" type="number"
206
- placeholder="设备数量"
207
- v-model="item.f_material_number"
208
- :value="item.f_material_number"
209
- />
210
- </div>
211
- </div>
212
- </div>
213
-
214
- </article>
215
- <footer slot="modal-footer" class="modal-footer">
216
- <template v-if="mark !== 1">
217
- <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
218
- <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()" :disabled="!$v.valid">确认添加</button>
219
- <button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()" :disabled="!$v.valid">确认修改</button>
220
- </template>
221
- </footer>
222
- </modal>
223
- </div>
224
- </template>
225
-
226
- <script>
227
- import {HttpResetClass} from 'vue-client'
228
- import Vue from "vue";
229
- import {isEmpty} from "../../../components/Util";
230
- export default {
231
- name: 'addMaterialScience',
232
- props: {
233
- selectdata: {
234
- type: Object
235
- },
236
- mark: {
237
- type: Number,
238
- default: 0
239
- }
240
- },
241
- data () {
242
- return {
243
- showFile: false,
244
- onetomany: {
245
- rows: []
246
- },
247
- title:'新增',
248
- showMaterialModal:false,
249
- materials:[
250
- ],
251
- meterialOptions:[],
252
- row:{},
253
- bjqChecklag:[],
254
- indoormaterials: {
255
- rows: []
256
- },
257
- undergroundmaterials: {
258
- rows: []
259
- },
260
- showtype:''
261
- }
262
- },
263
- ready(){
264
- this.getOnetoManyData()
265
- },
266
- methods: {
267
- async getOnetoManyData () {
268
- let data = {
269
- tablename: `t_material_apply`,
270
- condition: `f_process_id='${this.selectdata.f_process_id}'`
271
- }
272
- let res = await this.$resetpost(
273
- 'rs/sql/apply_singleTable',
274
- {data: data},
275
- {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
276
- )
277
- this.onetomany.rows = res.data
278
- },
279
- async getMateralOptions () {
280
- this.indoormaterials.rows = []
281
- this.undergroundmaterials.rows = []
282
- let datarow = {
283
- workname: 'materials'
284
- }
285
- let http = new HttpResetClass()
286
- let row = await http.load(
287
- 'POST',
288
- 'rs/logic/ApplyGetConfigs',
289
- {data: datarow},
290
- {resolveMsg: null, rejectMsg: '配置数据获取失败!!!'}
291
- )
292
- if (this.selectdata.f_apply_type == '散户报建'){
293
- this.indoormaterials.rows = row.data['散户报建']['室内材料']
294
- this.undergroundmaterials.rows = row.data['散户报建']['地埋材料']
295
- }else if (this.selectdata.f_apply_type == '工商户报建' && this.selectdata.f_apply_nature == '商业报建' ){
296
- this.indoormaterials.rows = row.data['商业报建']['室内材料']
297
- this.undergroundmaterials.rows = row.data['商业报建']['地埋材料']
298
- }
299
- },
300
- async openMaterialModal (row) {
301
- this.getMateralNames()
302
- this.materials = []
303
- this.getMateralOptions()
304
- this.title = '新增'
305
- this.showtype = row
306
- this.showMaterialModal = true
307
- },
308
- closeFile() {
309
- this.showWork = false
310
- this.showFile = false
311
- // 将选的文件清空
312
- this.$refs.file.$el.querySelector('input').value = ''
313
- this.search()
314
- },
315
- deleteDevicesinfo (index) {
316
- this.materials.splice(index, 1)
317
- },
318
- pushMaterial () {
319
- this.materials.push({
320
- f_material_price:'',
321
- material:'',
322
- f_material_name:'',
323
- f_material_style:'',
324
- f_material_unit:'',
325
- f_material_number:'',
326
- f_bjq_sid:'',
327
- f_material_code:'',
328
- f_userinfo_code:''
329
- })
330
- },
331
- // 获取模态框材料
332
- async getMateralNames () {
333
- let data = {
334
- condition: `1=1`
335
- }
336
- let http = new HttpResetClass()
337
- let res = await http.load(
338
- 'POST',
339
- `rs/sql/getStockMaterial`,
340
- {data: data},
341
- {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
342
- )
343
-
344
- this.meterialOptions = res.data.map(item => {
345
- return {
346
- 'label': `${item.f_material_name}--${item.f_material_style}`,
347
- 'value': item
348
- }
349
- })
350
- },
351
- modifyOtherValue (index){
352
- console.log("进来了",index)
353
- console.log("dddd",this.materials[index].material)
354
- if(this.materials[index].material){
355
- let material = this.materials[index].material
356
- this.materials[index].f_material_price= material.f_material_price
357
- this.materials[index].f_material_name = material.f_material_name
358
- this.materials[index].f_material_style = material.f_material_style
359
- this.materials[index].f_material_unit = material.f_material_unit
360
- this.materials[index].f_material_number = material.f_material_number
361
- this.materials[index].f_material_code = material.f_material_code
362
- this.materials[index].f_userinfo_code = material.f_userinfo_code
363
- }else {
364
- this.materials[index].f_material_price=''
365
- this.materials[index].f_material_name =''
366
- this.materials[index].f_material_style =''
367
- this.materials[index].f_material_unit =''
368
- this.materials[index].f_material_number = ''
369
- this.materials[index].f_material_code =''
370
- this.materials[index].f_userinfo_code = ''
371
- }
372
-
373
- },
374
- // 新增材料
375
- async addMaterial () {
376
- console.log("登录信息:",this.$login.f)
377
- this.title = '新增'
378
-
379
- for (let i = 0; i < this.indoormaterials.rows.length; i++){
380
- let row = this.indoormaterials.rows[i]
381
- if (row.f_is_check && !isEmpty(row.f_material_number)){
382
- this.materials.push(row)
383
- }
384
- }
385
- for (let i = 0; i < this.undergroundmaterials.rows.length; i++){
386
- let row = this.undergroundmaterials.rows[i]
387
- if (row.f_is_check && !isEmpty(row.f_material_number)){
388
- this.materials.push(row)
389
- }
390
- }
391
- let data = {
392
- f_process_id : this.selectdata.f_process_id,
393
- f_operator_id: this.$login.f.id,
394
- f_operator: this.$login.f.name,
395
- f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
396
- f_orgid: this.$login.f.orgid,
397
- f_orgname: this.$login.f.orgs,
398
- materials:this.materials
399
- }
400
- let res = await this.$resetpost(
401
- `rs/logic/saveMaterials`,
402
- data
403
- )
404
- this.closeMaterials()
405
- },
406
- async deleteMaterial (row) {
407
- var show1 = window.confirm('您确定要删除这条记录吗?')
408
- if(show1 != true){
409
- this.closeMaterials()
410
- }else{
411
- debugger
412
- let http = new HttpResetClass()
413
- let res = await http.load(
414
- 'POST',
415
- `rs/logic/deleteMaterial`,
416
- {data: row},
417
- {resolveMsg: null, rejectMsg: '材料删除失败!!!'}
418
- )
419
- this.closeMaterials()
420
- }
421
-
422
- },
423
- async updateMaterial (index,row) {
424
- this.title = '修改'
425
- this.row = row
426
- this.materials[0] = row
427
- this.showMaterialModal = true
428
- },
429
- async updateConfirm () {
430
- let data = this.row
431
- data.f_material_price = this.materials[0].f_material_price
432
- data.f_material_name = this.materials[0].f_material_name
433
- data.f_material_style = this.materials[0].f_material_style
434
- data.f_material_unit = this.materials[0].f_material_unit
435
- data.f_material_number = this.materials[0].f_material_number
436
- data.f_material_code = this.materials[0].f_material_code
437
- data.f_bjq_sid = this.materials[0].f_bjq_sid
438
- data.f_userinfo_code = this.materials[0].f_userinfo_code
439
- let res = await this.$resetpost(
440
- `rs/entity/t_material_apply`,
441
- data
442
- )
443
- this.closeMaterials()
444
- },
445
- sycronizedCode(index,val){
446
- console.log("看看:",index,val)
447
- this.materials[index].f_material_code = val
448
- },
449
- closeMaterials () {
450
- this.getOnetoManyData()
451
- this.showMaterialModal = false
452
- }
453
- },
454
- events: {
455
- 'beforeFileUpload' (file) {
456
- this.showWork = true
457
- },
458
- async 'onFileUpload'(file, result) {
459
- let data = {
460
- selectdata: this.selectdata,
461
- filepath: result.f_downloadpath,
462
- user: this.$login.f
463
- }
464
- try {
465
- let res = await this.$resetpost(`rs/logic/importMaterial`, {data: data}, {
466
- resolveMsg: null,
467
- rejectMsg: '导入失败!!!',
468
- silent: true
469
- }, 0)
470
- } catch (e) {
471
- this.closeFile()
472
- }
473
- this.$dispatch('breakControl', this.selectdata)
474
- }
475
- },
476
- }
477
-
478
- </script>
479
-
480
- <style scoped>
481
-
482
- </style>
1
+ <template>
2
+ <div>
3
+ <data-grid :model="onetomany" class="list_area table_sy">
4
+ <template partial='head'>
5
+ <tr>
6
+ <th class="textNoLineBreak">序号</th>
7
+ <th class="textNoLineBreak">材料名称</th>
8
+ <th class="textNoLineBreak">材料型号</th>
9
+ <th class="textNoLineBreak">材料单位</th>
10
+ <th class="textNoLineBreak">材料数量</th>
11
+ <th class="textNoLineBreak">材料编号</th>
12
+ <th class="textNoLineBreak">材料标识</th>
13
+ <th class="textNoLineBreak">用户编号</th>
14
+ <th class="textNoLineBreak">
15
+ <button class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal('室内施工')">室内施工</button>
16
+ <button class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal('地埋施工')">地埋施工</button>
17
+ <button type="button" class="btn btn-info head-but" v-if="$parent.$parent.mark === 0"
18
+ @click="$parent.$parent.showFile = !$parent.$parent.showFile">导入</button>
19
+ <a type="button" class="btn btn-info head-but" v-if="$parent.$parent.mark === 0"
20
+ href="/apply/download/excel/材料明细.xlsx" download>模板下载</a>
21
+ </th>
22
+ </tr>
23
+ </template>
24
+ <template partial='body'>
25
+ <tr>
26
+ <td style="text-align: center;">
27
+ <nobr>{{$index+1}}</nobr>
28
+ </td>
29
+ <td style="text-align: center;">
30
+ <nobr>{{row.f_material_name}}</nobr>
31
+ </td>
32
+ <td style="text-align: center;">
33
+ <nobr>{{row.f_material_style}}</nobr>
34
+ </td>
35
+ <td style="text-align: center;">
36
+ <nobr>{{row.f_material_unit}}</nobr>
37
+ </td>
38
+ <td style="text-align: center;">
39
+ <nobr>{{row.f_material_number}}</nobr>
40
+ </td>
41
+ <td style="text-align: center;">
42
+ <nobr>{{row.f_bjq_sid}}</nobr>
43
+ </td>
44
+ <td style="text-align: center;">
45
+ <nobr>{{row.f_material_code}}</nobr>
46
+ </td>
47
+ <td style="text-align: center;">
48
+ <nobr>{{row.f_userinfo_code}}</nobr>
49
+ </td>
50
+ <td style="text-align: center;">
51
+ <button type="button" class="button_search button_spacing" @click="$parent.$parent.updateMaterial($index,row)">修改</button>
52
+ <button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除</button>
53
+ </td>
54
+ </tr>
55
+ </template>
56
+ </data-grid>
57
+ <modal v-if="showFile" :show.sync="showFile" v-ref:modal :backdrop="false" title="选择文件">
58
+ <header slot="modal-header" class="modal-header">
59
+ <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
60
+ <h4 class="modal-title">选择文件</h4>
61
+ </header>
62
+ <article slot="modal-body" class="modal-body">
63
+ <div class="form-group">
64
+ <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" v-ref:file></file-upload>
65
+ </div>
66
+ </article>
67
+ <footer slot="modal-footer" class="modal-footer"></footer>
68
+ </modal>
69
+ <modal v-if="showMaterialModal" :show.sync="showMaterialModal" style="overflow: auto" v-ref:modal :large="true"
70
+ :backdrop="false" :title="title">
71
+ <header slot="modal-header" class="modal-header">
72
+ <button type="button" class="close" @click="closeMaterials"><span>&times;</span></button>
73
+ <h4 class="modal-title">{{title}}</h4>
74
+ </header>
75
+ <article slot="modal-body" class="modal-body clearfix">
76
+ <data-grid v-if=" title==='新增'&& showtype == '室内施工'&& indoormaterials.rows.length > 0 " :model="indoormaterials" class="list_area table_sy">
77
+ <template partial='head'>
78
+ <tr>
79
+ <th class="textNoLineBreak" colspan="5">室内材料</th>
80
+ </tr>
81
+ <tr>
82
+ <th class="textNoLineBreak">材料名称</th>
83
+ <th class="textNoLineBreak">材料型号</th>
84
+ <th class="textNoLineBreak">材料单位</th>
85
+ <th class="textNoLineBreak">是否选择</th>
86
+ <th class="textNoLineBreak">材料数量</th>
87
+ </tr>
88
+ </template>
89
+ <template partial='body' >
90
+ <tr>
91
+ <td style="text-align: center;">
92
+ <nobr>{{row.f_material_name}}</nobr>
93
+ </td>
94
+ <td style="text-align: center;">
95
+ <nobr>{{row.f_material_style}}</nobr>
96
+ </td>
97
+ <td style="text-align: center;">
98
+ <nobr>{{row.f_material_unit}}</nobr>
99
+ </td>
100
+ <td style="text-align: center;">
101
+ <input type="checkbox" v-model="row.f_is_check" :value.sync="row.f_is_check"/>
102
+ </td>
103
+ <td style="text-align: center;">
104
+ <input class="form-control input_view" type="number"
105
+ placeholder="设备数量"
106
+ v-model="row.f_material_number"
107
+ :value.sync="row.f_material_number"
108
+ />
109
+ </td>
110
+ </tr>
111
+ </template>
112
+ </data-grid>
113
+ <data-grid v-if=" title==='新增'&& showtype == '地埋施工'&& undergroundmaterials.rows.length > 0 " :model="undergroundmaterials" class="list_area table_sy">
114
+ <template partial='head'>
115
+ <tr>
116
+ <th class="textNoLineBreak" colspan="5">地埋材料</th>
117
+ </tr>
118
+ <tr>
119
+ <th class="textNoLineBreak">材料名称</th>
120
+ <th class="textNoLineBreak">材料型号</th>
121
+ <th class="textNoLineBreak">材料单位</th>
122
+ <th class="textNoLineBreak">是否选择</th>
123
+ <th class="textNoLineBreak">材料数量</th>
124
+ </tr>
125
+ </template>
126
+ <template partial='body' >
127
+ <tr>
128
+ <td style="text-align: center;">
129
+ <nobr>{{row.f_material_name}}</nobr>
130
+ </td>
131
+ <td style="text-align: center;">
132
+ <nobr>{{row.f_material_style}}</nobr>
133
+ </td>
134
+ <td style="text-align: center;">
135
+ <nobr>{{row.f_material_unit}}</nobr>
136
+ </td>
137
+ <td style="text-align: center;">
138
+ <input type="checkbox" v-model="row.f_is_check" :value.sync="row.f_is_check"/>
139
+ </td>
140
+ <td style="text-align: center;">
141
+ <input class="form-control input_view" type="number"
142
+ placeholder="设备数量"
143
+ v-model="row.f_material_number"
144
+ :value.sync="row.f_material_number"
145
+ />
146
+ </td>
147
+ </tr>
148
+ </template>
149
+ </data-grid>
150
+ <div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
151
+ <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
152
+ <div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
153
+ <div class="col-sm-6 text-right"><button
154
+ class="button_delete button_spacing"
155
+ @click.prevent="deleteDevicesinfo(i)"
156
+ v-if="title === '新增'"
157
+ >删除</button></div>
158
+ </div>
159
+ <div class="form-group col-sm-6" v-if="title==='新增'">
160
+ <label class="col-sm-4 control-label">选择材料:</label>
161
+ <div class="col-sm-8">
162
+ <input-select
163
+ class="select select_list"
164
+ :value.sync="item.material"
165
+ v-model="item.material"
166
+ :options="meterialOptions"
167
+ :disable="mark === 1"
168
+ @change="modifyOtherValue(i)"
169
+ :valueSingle="true"></input-select>
170
+ </div>
171
+ </div>
172
+ <div class="form-group col-sm-6" :class="[item.f_material_name ? '' : '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_name"
178
+ :value="item.f_material_name"
179
+ />
180
+ </div>
181
+ </div>
182
+ <div class="form-group col-sm-6" :class="[item.f_material_style ? '' : '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="text"
186
+ placeholder="材料型号"
187
+ v-model="item.f_material_style"
188
+ :value="item.f_material_style"
189
+ />
190
+ </div>
191
+ </div>
192
+ <div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
193
+ <label class="col-sm-4 control-label">材料单位:</label>
194
+ <div class="col-sm-8">
195
+ <input class="form-control input_view" style="" type="text"
196
+ placeholder="材料单位"
197
+ v-model="item.f_material_unit"
198
+ :value="item.f_material_unit"
199
+ />
200
+ </div>
201
+ </div>
202
+ <div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
203
+ <label class="col-sm-4 control-label">材料数量:</label>
204
+ <div class="col-sm-8">
205
+ <input class="form-control input_view" style="" type="number"
206
+ placeholder="设备数量"
207
+ v-model="item.f_material_number"
208
+ :value="item.f_material_number"
209
+ />
210
+ </div>
211
+ </div>
212
+ </div>
213
+
214
+ </article>
215
+ <footer slot="modal-footer" class="modal-footer">
216
+ <template v-if="mark !== 1">
217
+ <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
218
+ <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()" :disabled="!$v.valid">确认添加</button>
219
+ <button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()" :disabled="!$v.valid">确认修改</button>
220
+ </template>
221
+ </footer>
222
+ </modal>
223
+ </div>
224
+ </template>
225
+
226
+ <script>
227
+ import {HttpResetClass} from 'vue-client'
228
+ import Vue from "vue";
229
+ import {isEmpty} from "../../../components/Util";
230
+ export default {
231
+ name: 'addMaterialScience',
232
+ props: {
233
+ selectdata: {
234
+ type: Object
235
+ },
236
+ mark: {
237
+ type: Number,
238
+ default: 0
239
+ }
240
+ },
241
+ data () {
242
+ return {
243
+ showFile: false,
244
+ onetomany: {
245
+ rows: []
246
+ },
247
+ title:'新增',
248
+ showMaterialModal:false,
249
+ materials:[
250
+ ],
251
+ meterialOptions:[],
252
+ row:{},
253
+ bjqChecklag:[],
254
+ indoormaterials: {
255
+ rows: []
256
+ },
257
+ undergroundmaterials: {
258
+ rows: []
259
+ },
260
+ showtype:''
261
+ }
262
+ },
263
+ ready(){
264
+ this.getOnetoManyData()
265
+ },
266
+ methods: {
267
+ async getOnetoManyData () {
268
+ let data = {
269
+ tablename: `t_material_apply`,
270
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
271
+ }
272
+ let res = await this.$resetpost(
273
+ 'rs/sql/apply_singleTable',
274
+ {data: data},
275
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
276
+ )
277
+ this.onetomany.rows = res.data
278
+ },
279
+ async getMateralOptions () {
280
+ this.indoormaterials.rows = []
281
+ this.undergroundmaterials.rows = []
282
+ let datarow = {
283
+ workname: 'materials'
284
+ }
285
+ let http = new HttpResetClass()
286
+ let row = await http.load(
287
+ 'POST',
288
+ 'rs/logic/ApplyGetConfigs',
289
+ {data: datarow},
290
+ {resolveMsg: null, rejectMsg: '配置数据获取失败!!!'}
291
+ )
292
+ if (this.selectdata.f_apply_type == '散户报建'){
293
+ this.indoormaterials.rows = row.data['散户报建']['室内材料']
294
+ this.undergroundmaterials.rows = row.data['散户报建']['地埋材料']
295
+ }else if (this.selectdata.f_apply_type == '工商户报建' && this.selectdata.f_apply_nature == '商业报建' ){
296
+ this.indoormaterials.rows = row.data['商业报建']['室内材料']
297
+ this.undergroundmaterials.rows = row.data['商业报建']['地埋材料']
298
+ }
299
+ },
300
+ async openMaterialModal (row) {
301
+ this.getMateralNames()
302
+ this.materials = []
303
+ this.getMateralOptions()
304
+ this.title = '新增'
305
+ this.showtype = row
306
+ this.showMaterialModal = true
307
+ },
308
+ closeFile() {
309
+ this.showWork = false
310
+ this.showFile = false
311
+ // 将选的文件清空
312
+ this.$refs.file.$el.querySelector('input').value = ''
313
+ this.search()
314
+ },
315
+ deleteDevicesinfo (index) {
316
+ this.materials.splice(index, 1)
317
+ },
318
+ pushMaterial () {
319
+ this.materials.push({
320
+ f_material_price:'',
321
+ material:'',
322
+ f_material_name:'',
323
+ f_material_style:'',
324
+ f_material_unit:'',
325
+ f_material_number:'',
326
+ f_bjq_sid:'',
327
+ f_material_code:'',
328
+ f_userinfo_code:''
329
+ })
330
+ },
331
+ // 获取模态框材料
332
+ async getMateralNames () {
333
+ let data = {
334
+ condition: `1=1`
335
+ }
336
+ let http = new HttpResetClass()
337
+ let res = await http.load(
338
+ 'POST',
339
+ `rs/sql/getStockMaterial`,
340
+ {data: data},
341
+ {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
342
+ )
343
+
344
+ this.meterialOptions = res.data.map(item => {
345
+ return {
346
+ 'label': `${item.f_material_name}--${item.f_material_style}`,
347
+ 'value': item
348
+ }
349
+ })
350
+ },
351
+ modifyOtherValue (index){
352
+ console.log("进来了",index)
353
+ console.log("dddd",this.materials[index].material)
354
+ if(this.materials[index].material){
355
+ let material = this.materials[index].material
356
+ this.materials[index].f_material_price= material.f_material_price
357
+ this.materials[index].f_material_name = material.f_material_name
358
+ this.materials[index].f_material_style = material.f_material_style
359
+ this.materials[index].f_material_unit = material.f_material_unit
360
+ this.materials[index].f_material_number = material.f_material_number
361
+ this.materials[index].f_material_code = material.f_material_code
362
+ this.materials[index].f_userinfo_code = material.f_userinfo_code
363
+ }else {
364
+ this.materials[index].f_material_price=''
365
+ this.materials[index].f_material_name =''
366
+ this.materials[index].f_material_style =''
367
+ this.materials[index].f_material_unit =''
368
+ this.materials[index].f_material_number = ''
369
+ this.materials[index].f_material_code =''
370
+ this.materials[index].f_userinfo_code = ''
371
+ }
372
+
373
+ },
374
+ // 新增材料
375
+ async addMaterial () {
376
+ console.log("登录信息:",this.$login.f)
377
+ this.title = '新增'
378
+
379
+ for (let i = 0; i < this.indoormaterials.rows.length; i++){
380
+ let row = this.indoormaterials.rows[i]
381
+ if (row.f_is_check && !isEmpty(row.f_material_number)){
382
+ this.materials.push(row)
383
+ }
384
+ }
385
+ for (let i = 0; i < this.undergroundmaterials.rows.length; i++){
386
+ let row = this.undergroundmaterials.rows[i]
387
+ if (row.f_is_check && !isEmpty(row.f_material_number)){
388
+ this.materials.push(row)
389
+ }
390
+ }
391
+ let data = {
392
+ f_process_id : this.selectdata.f_process_id,
393
+ f_operator_id: this.$login.f.id,
394
+ f_operator: this.$login.f.name,
395
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
396
+ f_orgid: this.$login.f.orgid,
397
+ f_orgname: this.$login.f.orgs,
398
+ materials:this.materials
399
+ }
400
+ let res = await this.$resetpost(
401
+ `rs/logic/saveMaterials`,
402
+ data
403
+ )
404
+ this.closeMaterials()
405
+ },
406
+ async deleteMaterial (row) {
407
+ var show1 = window.confirm('您确定要删除这条记录吗?')
408
+ if(show1 != true){
409
+ this.closeMaterials()
410
+ }else{
411
+ debugger
412
+ let http = new HttpResetClass()
413
+ let res = await http.load(
414
+ 'POST',
415
+ `rs/logic/deleteMaterial`,
416
+ {data: row},
417
+ {resolveMsg: null, rejectMsg: '材料删除失败!!!'}
418
+ )
419
+ this.closeMaterials()
420
+ }
421
+
422
+ },
423
+ async updateMaterial (index,row) {
424
+ this.title = '修改'
425
+ this.row = row
426
+ this.materials[0] = row
427
+ this.showMaterialModal = true
428
+ },
429
+ async updateConfirm () {
430
+ let data = this.row
431
+ data.f_material_price = this.materials[0].f_material_price
432
+ data.f_material_name = this.materials[0].f_material_name
433
+ data.f_material_style = this.materials[0].f_material_style
434
+ data.f_material_unit = this.materials[0].f_material_unit
435
+ data.f_material_number = this.materials[0].f_material_number
436
+ data.f_material_code = this.materials[0].f_material_code
437
+ data.f_bjq_sid = this.materials[0].f_bjq_sid
438
+ data.f_userinfo_code = this.materials[0].f_userinfo_code
439
+ let res = await this.$resetpost(
440
+ `rs/entity/t_material_apply`,
441
+ data
442
+ )
443
+ this.closeMaterials()
444
+ },
445
+ sycronizedCode(index,val){
446
+ console.log("看看:",index,val)
447
+ this.materials[index].f_material_code = val
448
+ },
449
+ closeMaterials () {
450
+ this.getOnetoManyData()
451
+ this.showMaterialModal = false
452
+ }
453
+ },
454
+ events: {
455
+ 'beforeFileUpload' (file) {
456
+ this.showWork = true
457
+ },
458
+ async 'onFileUpload'(file, result) {
459
+ let data = {
460
+ selectdata: this.selectdata,
461
+ filepath: result.f_downloadpath,
462
+ user: this.$login.f
463
+ }
464
+ try {
465
+ let res = await this.$resetpost(`rs/logic/importMaterial`, {data: data}, {
466
+ resolveMsg: null,
467
+ rejectMsg: '导入失败!!!',
468
+ silent: true
469
+ }, 0)
470
+ } catch (e) {
471
+ this.closeFile()
472
+ }
473
+ this.$dispatch('breakControl', this.selectdata)
474
+ }
475
+ },
476
+ }
477
+
478
+ </script>
479
+
480
+ <style scoped>
481
+
482
+ </style>