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