apply-clients 3.5.4-74 → 3.5.4-76

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