apply-clients 3.5.6-21 → 3.5.6-22

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