apply-clients 3.5.5-5 → 3.5.5-7

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