apply-clients 3.5.5-8 → 3.5.5-9

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 (48) hide show
  1. package/build/dev-server.js +6 -15
  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/AppCheckTakePic.vue +168 -168
  6. package/src/components/android/Process/AppServiceControl.vue +1755 -1755
  7. package/src/components/product/Function/Service/FunctionServiceControl.vue +497 -497
  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/PcZhihuanManagement.vue +160 -160
  11. package/src/components/product/Print/BuildOrder/buildOrderList.vue +339 -339
  12. package/src/components/product/Process/Processes/contractModel.vue +424 -424
  13. package/src/components/product/Process/Processes/selectApply.vue +251 -251
  14. package/src/components/product/Process/Processes/selectBcakApply.vue +250 -250
  15. package/src/components/product/Supervisory/SupervisoryList.vue +452 -452
  16. package/src/filiale/dingcheng/pc/SupervisoryList.vue +441 -441
  17. package/src/filiale/fugou/android/AppAddMaterialScience.vue +444 -440
  18. package/src/filiale/fugou/android/AppAddReplacement.vue +341 -341
  19. package/src/filiale/fugou/android/AppChargeManagement.vue +739 -739
  20. package/src/filiale/fugou/android/AppZhihuanManagement.vue +230 -230
  21. package/src/filiale/fugou/pc/AddReplacement.vue +340 -340
  22. package/src/filiale/fugou/pc/ApplyChargeList.vue +480 -480
  23. package/src/filiale/fugou/pc/addMaterialScience.vue +481 -481
  24. package/src/filiale/fugou/pc/addressAndUserinfoManagement.vue +216 -216
  25. package/src/filiale/fugou/pc/chargeReport.vue +143 -143
  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/main.js +1 -2
  45. package/src/test/SessionTestServlet.java +69 -0
  46. package/webapp/WEB-INF/web.xml +52 -0
  47. package/webapp/session-test.jsp +59 -0
  48. package/~/chatbot/main.py +0 -57
@@ -1,440 +1,444 @@
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
+ v-model="item.material_unique_value"
141
+ :value.sync="item.material_unique_value"
142
+ :options="meterialOptions"
143
+ :disable="mark === 1"
144
+ @change="modifyOtherValue(i)"
145
+ :valueSingle="true">
146
+ </input-select>
147
+ </div>
148
+ </div>
149
+ <div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
150
+ <label class="col-sm-4 control-label">材料名称:</label>
151
+ <div class="col-sm-8">
152
+ <input class="form-control input_view" style="" type="text"
153
+ placeholder="材料名称"
154
+ v-model="item.f_material_name"
155
+ :value="item.f_material_name"
156
+ />
157
+ </div>
158
+ </div>
159
+ <div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
160
+ <label class="col-sm-4 control-label">材料型号:</label>
161
+ <div class="col-sm-8">
162
+ <input class="form-control input_view" style="" type="text"
163
+ placeholder="材料型号"
164
+ v-model="item.f_material_style"
165
+ :value="item.f_material_style"
166
+ />
167
+ </div>
168
+ </div>
169
+ <div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
170
+ <label class="col-sm-4 control-label">材料单位:</label>
171
+ <div class="col-sm-8">
172
+ <input class="form-control input_view" style="" type="text"
173
+ placeholder="材料单位"
174
+ v-model="item.f_material_unit"
175
+ :value="item.f_material_unit"
176
+ />
177
+ </div>
178
+ </div>
179
+ <div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
180
+ <label class="col-sm-4 control-label">材料数量:</label>
181
+ <div class="col-sm-8">
182
+ <input class="form-control input_view" style="" type="number"
183
+ placeholder="设备数量"
184
+ v-model="item.f_material_number"
185
+ :value="item.f_material_number"
186
+ />
187
+ </div>
188
+ </div>
189
+ </div>
190
+
191
+ </article>
192
+ <footer slot="modal-footer" class="modal-footer">
193
+ <template v-if="mark !== 1">
194
+ <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
195
+ <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()"
196
+ :disabled="!$v.valid">确认添加
197
+ </button>
198
+ <button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()"
199
+ :disabled="!$v.valid">确认修改
200
+ </button>
201
+ </template>
202
+ </footer>
203
+ </modal>
204
+ </div>
205
+ </template>
206
+
207
+ <script>
208
+ import Vue from 'vue'
209
+ import {HttpResetClass} from 'vue-client'
210
+ import {isEmpty} from "../../../components/Util";
211
+
212
+ export default {
213
+ name: 'addMaterialScience',
214
+ props: {
215
+ selectdata: {
216
+ type: Object
217
+ }
218
+ },
219
+ data() {
220
+ return {
221
+ onetomany: {
222
+ rows: []
223
+ },
224
+ logotype:"",
225
+ title: '新增',
226
+ showMaterialModal: false,
227
+ materials: [
228
+ ],
229
+ meterialOptions: [],
230
+ row: {},
231
+ fmaterialname:{},
232
+ isShow:[false],
233
+ indoormaterials: {
234
+ rows: []
235
+ },
236
+ undergroundmaterials: {
237
+ rows: []
238
+ },
239
+ showtype:''
240
+ }
241
+ },
242
+ ready() {
243
+ this.getOnetoManyData()
244
+ },
245
+ methods: {
246
+ async getOnetoManyData () {
247
+ let http = new HttpResetClass()
248
+ let data = {
249
+ tablename: `t_material_apply`,
250
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
251
+ }
252
+ let res = await http.load(
253
+ 'POST',
254
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable?aaa=123`,
255
+ {data: data},
256
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
257
+ )
258
+ this.onetomany.rows = res.data
259
+ },
260
+ async getMateralOptions () {
261
+ this.indoormaterials.rows = []
262
+ this.undergroundmaterials.rows = []
263
+ let datarow = {
264
+ workname: 'materials'
265
+ }
266
+ let http = new HttpResetClass()
267
+ let row = await http.load(
268
+ 'POST',
269
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/ApplyGetConfigs`,
270
+ {data: datarow},
271
+ {resolveMsg: null, rejectMsg: '配置数据获取失败!!!'}
272
+ )
273
+ if (this.selectdata.f_apply_type == '散户报建'){
274
+ this.indoormaterials.rows = row.data['散户报建']['室内材料']
275
+ this.undergroundmaterials.rows = row.data['散户报建']['地埋材料']
276
+ }else if (this.selectdata.f_apply_type == '工商户报建' && this.selectdata.f_apply_nature == '商业报建' ){
277
+ this.indoormaterials.rows = row.data['商业报建']['室内材料']
278
+ this.undergroundmaterials.rows = row.data['商业报建']['地埋材料']
279
+ }
280
+ },
281
+ async openMaterialModal(row) {
282
+ await this.getMateralOptions()
283
+ this.materials = []
284
+ await this.getMateralNames()
285
+ this.title = '新增'
286
+ this.showtype = row
287
+ this.logotype=row
288
+ this.showMaterialModal = true
289
+ this.isShow = [false]
290
+ },
291
+ deleteDevicesinfo(index) {
292
+ this.materials.splice(index, 1)
293
+ this.isShow.splice(index, 1)
294
+ },
295
+ pushMaterial() {
296
+ this.materials.push({
297
+ f_material_price: '',
298
+ material: '',
299
+ f_material_name: '',
300
+ f_material_style: '',
301
+ f_material_unit: '',
302
+ f_material_number: '',
303
+ f_bjq_sid: '',
304
+ f_material_code: '',
305
+ f_userinfo_code: ''
306
+ })
307
+ this.isShow.push(false)
308
+ },
309
+ // 获取模态框材料
310
+ async getMateralNames() {
311
+ let data = {
312
+ condition: `1=1`
313
+ }
314
+ let http = new HttpResetClass()
315
+ let res = await http.load(
316
+ 'POST',
317
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/getStockMaterial`,
318
+ {data: data},
319
+ {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
320
+ )
321
+
322
+ this.meterialOptions = res.data.map(item => {
323
+ const uniqueValue = item.f_material_code || `${item.f_material_name}--${item.f_material_style}`;
324
+ return {
325
+ label: `${item.f_material_name}--${item.f_material_style}`,
326
+ value: uniqueValue,
327
+ raw: item
328
+ }
329
+ })
330
+ },
331
+ modifyOtherValue(index) {
332
+ const uniqueValue = this.materials[index].material_unique_value;
333
+ const selected = this.meterialOptions.find(opt => opt.value === uniqueValue);
334
+ if (selected) {
335
+ const material = selected.raw;
336
+ this.materials[index].material = material;
337
+ this.materials[index].f_material_price = material.f_material_price;
338
+ this.materials[index].f_material_name = material.f_material_name;
339
+ this.materials[index].f_material_style = material.f_material_style;
340
+ this.materials[index].f_material_unit = material.f_material_unit;
341
+ this.materials[index].f_material_number = material.f_material_number;
342
+ this.materials[index].f_material_code = material.f_material_code;
343
+ this.materials[index].f_userinfo_code = material.f_userinfo_code;
344
+ }else{
345
+ this.materials[index].f_material_price =''
346
+ this.materials[index].f_material_name = ''
347
+ this.materials[index].f_material_style = ''
348
+ this.materials[index].f_material_unit =''
349
+ this.materials[index].f_material_number = ''
350
+ this.materials[index].f_material_code =''
351
+ this.materials[index].f_userinfo_code =''
352
+ }
353
+ },
354
+ // 新增材料
355
+ async addMaterial() {
356
+ this.title = '新增'
357
+ for (let i = 0; i < this.indoormaterials.rows.length; i++){
358
+ let row = this.indoormaterials.rows[i]
359
+ if (row.f_is_check && !isEmpty(row.f_material_number)){
360
+ this.materials.push(row)
361
+ }
362
+ }
363
+ for (let i = 0; i < this.undergroundmaterials.rows.length; i++){
364
+ let row = this.undergroundmaterials.rows[i]
365
+ if (row.f_is_check && !isEmpty(row.f_material_number)){
366
+ this.materials.push(row)
367
+ }
368
+ }
369
+ let data = {
370
+ f_process_id: this.selectdata.f_process_id,
371
+ f_operator_id: Vue.user.id,
372
+ f_operator: Vue.user.name,
373
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
374
+ f_orgid: Vue.user.orgid,
375
+ f_orgname: Vue.user.orgs,
376
+ materials: this.materials,
377
+ logotype:this.logotype
378
+ }
379
+ let http = new HttpResetClass()
380
+ let res = await http.load(
381
+ 'POST',
382
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/saveMaterials`,
383
+ data
384
+ )
385
+ this.closeMaterials()
386
+ },
387
+ async deleteMaterial(row) {
388
+ debugger
389
+ var show1 = window.confirm('您确定要删除这条记录吗?')
390
+ if(show1 != true){
391
+ this.closeMaterials()
392
+ }else{
393
+ let http = new HttpResetClass()
394
+ let res = await http.load(
395
+ 'POST',
396
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/deleteMaterial`,
397
+ {data: row},
398
+ {resolveMsg: null, rejectMsg: '材料删除失败!!!'}
399
+ )
400
+ this.closeMaterials()
401
+ }
402
+ }
403
+ ,
404
+ async updateMaterial(index, row) {
405
+ this.title = '修改'
406
+ this.row = row
407
+ this.materials[0] = row
408
+ this.showMaterialModal = true
409
+ },
410
+ async updateConfirm() {
411
+ let data = this.row
412
+ data.f_material_price = this.materials[0].f_material_price
413
+ data.f_material_name = this.materials[0].f_material_name
414
+ data.f_material_style = this.materials[0].f_material_style
415
+ data.f_material_unit = this.materials[0].f_material_unit
416
+ data.f_material_number = this.materials[0].f_material_number
417
+ data.f_material_code = this.materials[0].f_material_code
418
+ data.f_bjq_sid = this.materials[0].f_bjq_sid
419
+ data.f_userinfo_code=this.materials[0].f_userinfo_code
420
+
421
+ let http = new HttpResetClass()
422
+ let res = await http.load(
423
+ 'POST',
424
+ `${this.$androidUtil.getProxyUrl()}/rs/entity/t_material_apply`,
425
+ data
426
+ )
427
+ this.closeMaterials()
428
+ },
429
+ sycronizedCode(index,val){
430
+ console.log("看看:",index,val)
431
+ this.materials[index].f_material_code = val
432
+ },
433
+ closeMaterials() {
434
+ this.getOnetoManyData()
435
+ this.showMaterialModal = false
436
+ }
437
+ }
438
+ }
439
+
440
+ </script>
441
+
442
+ <style scoped>
443
+
444
+ </style>