apply-clients 4.1.81 → 4.1.85
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 +1 -1
- package/src/apply.js +78 -78
- package/src/components/product/ApplyCharge/ApplyChargeList.vue +251 -251
- package/src/components/product/Function/InstallInfoSelect.vue +294 -294
- package/src/components/product/Function/functions/StopInstall.vue +112 -112
- package/src/components/product/Process/ExplorationSelect.vue +373 -373
- package/src/components/product/Process/Processes/InstallationDetails.vue +513 -513
- package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +1555 -1555
- package/src/components/product/Process/Processes/chargeManagement.vue +540 -540
- package/src/components/product/Process/Processes/selectUserinfo.vue +205 -205
- package/src/components/product/Process/Processes/splitMaterial.vue +358 -358
- package/src/components/product/Process/Service/ServiceControl.vue +7 -3
- package/src/components/product/Process/ShowBackReason.vue +33 -33
- package/src/components/product/ServiceView.vue +802 -802
- package/src/components/product/Stop/StopApplyList.vue +257 -257
- package/src/components/product/Supervisory/SupervisoryControl.vue +121 -121
- package/src/components/product/Supervisory/SupervisoryList.vue +221 -221
- package/yarn-error.log +9175 -0
|
@@ -1,358 +1,358 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="col-sm-12" style="margin: 20px 0px;">
|
|
3
|
-
<data-grid :model="model" v-ref:grid class="list_area table_sy" style="padding: 0px">
|
|
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">材料备注</th>
|
|
14
|
-
<th class="textNoLineBreak">
|
|
15
|
-
<button
|
|
16
|
-
type="button"
|
|
17
|
-
class="btn btn-info head-but"
|
|
18
|
-
:disabled="$parent.$parent.mark === 1"
|
|
19
|
-
@click="$parent.$parent.showSupplement = !$parent.$parent.showSupplement"
|
|
20
|
-
>添加材料
|
|
21
|
-
</button>
|
|
22
|
-
<button v-if="$parent.$parent.mark !== 1" type="button" class="btn btn-info head-but"
|
|
23
|
-
@click="$parent.$parent.showFileModal()">导入</button>
|
|
24
|
-
<a v-if="$parent.$parent.mark !== 1" type="button" class="btn btn-info head-but"
|
|
25
|
-
href="/apply/download/excel/中盛材料批量导入.xlsx" download>模板下载</a>
|
|
26
|
-
</th>
|
|
27
|
-
</tr>
|
|
28
|
-
</template>
|
|
29
|
-
<template partial='body'>
|
|
30
|
-
<tr>
|
|
31
|
-
<td style="text-align: center;">
|
|
32
|
-
<nobr>{{ $index + 1 }}</nobr>
|
|
33
|
-
</td>
|
|
34
|
-
<td style="text-align: center;">
|
|
35
|
-
<nobr>{{ row.f_material_name }}</nobr>
|
|
36
|
-
</td>
|
|
37
|
-
<td style="text-align: center;">
|
|
38
|
-
<nobr>{{ row.f_material_style }}</nobr>
|
|
39
|
-
</td>
|
|
40
|
-
<td style="text-align: center;">
|
|
41
|
-
<nobr>{{ row.f_material_price }}</nobr>
|
|
42
|
-
</td>
|
|
43
|
-
<td style="text-align: center;">
|
|
44
|
-
<nobr>{{ row.f_material_unit }}</nobr>
|
|
45
|
-
</td>
|
|
46
|
-
<td style="text-align: center;">
|
|
47
|
-
<nobr>{{ row.f_material_number }}</nobr>
|
|
48
|
-
</td>
|
|
49
|
-
<td style="text-align: center;">
|
|
50
|
-
<nobr>{{ row.f_price_sum }}</nobr>
|
|
51
|
-
</td>
|
|
52
|
-
<td style="text-align: center;">
|
|
53
|
-
<nobr>{{ row.f_material_remarks }}</nobr>
|
|
54
|
-
</td>
|
|
55
|
-
<td style="text-align: center;">
|
|
56
|
-
<nobr>
|
|
57
|
-
<button
|
|
58
|
-
type="button"
|
|
59
|
-
name="button"
|
|
60
|
-
class="btn btn-link"
|
|
61
|
-
:disabled="$parent.$parent.mark === 1 || row.f_material_status === '作废'"
|
|
62
|
-
@click="$parent.$parent.showInvalidModal(row)"
|
|
63
|
-
>{{ row.f_material_status === '作废' ? '已作废' : '作废' }}
|
|
64
|
-
</button>
|
|
65
|
-
</nobr>
|
|
66
|
-
</td>
|
|
67
|
-
</tr>
|
|
68
|
-
</template>
|
|
69
|
-
</data-grid>
|
|
70
|
-
|
|
71
|
-
<validator name="v">
|
|
72
|
-
<modal v-if="showSupplement" :show.sync="showSupplement" v-ref:modal :large="true" :backdrop="false">
|
|
73
|
-
<header slot="modal-header" class="modal-header">
|
|
74
|
-
<button type="button" class="close" @click="closeModal"><span>×</span></button>
|
|
75
|
-
<h4 class="modal-title">预算材料</h4>
|
|
76
|
-
</header>
|
|
77
|
-
<article slot="modal-body" class="modal-body clearfix">
|
|
78
|
-
<div class="form-group col-sm-12" :class="[$v.f_material_name.required ? 'has-error' : '']">
|
|
79
|
-
<label class="col-sm-2 control-label">材料名称:</label>
|
|
80
|
-
<div class="col-sm-10">
|
|
81
|
-
<input type="text"
|
|
82
|
-
class="form-control input_view"
|
|
83
|
-
v-validate:f_material_name="['required']"
|
|
84
|
-
style="width: 100%"
|
|
85
|
-
v-model="material.f_material_name"/>
|
|
86
|
-
</div>
|
|
87
|
-
</div>
|
|
88
|
-
<div class="form-group col-sm-12" :class="[$v.f_material_style.required ? 'has-error' : '']">
|
|
89
|
-
<label class="col-sm-2 control-label">材料型号:</label>
|
|
90
|
-
<div class="col-sm-10">
|
|
91
|
-
<input type="text"
|
|
92
|
-
class="form-control input_view"
|
|
93
|
-
v-validate:f_material_style="['required']"
|
|
94
|
-
v-model="material.f_material_style"/>
|
|
95
|
-
</div>
|
|
96
|
-
</div>
|
|
97
|
-
<div class="form-group col-sm-12" :class="[$v.f_material_price.required ? 'has-error' : '']">
|
|
98
|
-
<label class="col-sm-2 control-label">材料单价:</label>
|
|
99
|
-
<div class="col-sm-10">
|
|
100
|
-
<input type="number"
|
|
101
|
-
class="form-control input_view"
|
|
102
|
-
style="width: 100%"
|
|
103
|
-
v-validate:f_material_price="['required']"
|
|
104
|
-
v-model="material.f_material_price"/>
|
|
105
|
-
</div>
|
|
106
|
-
</div>
|
|
107
|
-
<div class="form-group col-sm-12">
|
|
108
|
-
<label class="col-sm-2 control-label">材料单位:</label>
|
|
109
|
-
<div class="col-sm-10">
|
|
110
|
-
<input type="text"
|
|
111
|
-
class="form-control input_view"
|
|
112
|
-
style="width: 100%"
|
|
113
|
-
v-model="material.f_material_unit"/>
|
|
114
|
-
</div>
|
|
115
|
-
</div>
|
|
116
|
-
<div class="form-group col-sm-12" :class="[$v.f_material_number.required ? 'has-error' : '']">
|
|
117
|
-
<label class="col-sm-2 control-label">材料数量:</label>
|
|
118
|
-
<div class="col-sm-10">
|
|
119
|
-
<input type="number"
|
|
120
|
-
class="form-control input_view"
|
|
121
|
-
style="width: 100%"
|
|
122
|
-
v-validate:f_material_number="['required']"
|
|
123
|
-
v-model="material.f_material_number"/>
|
|
124
|
-
</div>
|
|
125
|
-
</div>
|
|
126
|
-
<div class="form-group col-sm-12">
|
|
127
|
-
<label class="col-sm-2 control-label">材料备注:</label>
|
|
128
|
-
<div class="col-sm-10">
|
|
129
|
-
<input type="text"
|
|
130
|
-
class="form-control input_view"
|
|
131
|
-
style="width: 100%"
|
|
132
|
-
v-model="material.f_material_remarks"/>
|
|
133
|
-
</div>
|
|
134
|
-
</div>
|
|
135
|
-
</article>
|
|
136
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
137
|
-
<button type="button" class="btn btn-primary" :disabled='!$v.valid' @click="savematerial()">新增材料</button>
|
|
138
|
-
</footer>
|
|
139
|
-
</modal>
|
|
140
|
-
|
|
141
|
-
<modal v-if="showInvalid" :show.sync="showInvalid" v-ref:modal :large="true" :backdrop="false" title="作废材料">
|
|
142
|
-
<header slot="modal-header" class="modal-header">
|
|
143
|
-
<button type="button" class="close" @click="closeModal"><span>×</span></button>
|
|
144
|
-
<h4 class="modal-title">作废协议</h4>
|
|
145
|
-
</header>
|
|
146
|
-
<article slot="modal-body" class="modal-body clearfix">
|
|
147
|
-
<div class="form-group col-sm-12">
|
|
148
|
-
<label class="col-sm-2 control-label">材料名称:</label>
|
|
149
|
-
<div class="col-sm-10">
|
|
150
|
-
<input type="text"
|
|
151
|
-
readonly
|
|
152
|
-
class="form-control input_view"
|
|
153
|
-
style="width: 100%"
|
|
154
|
-
v-model="material.f_material_name"/>
|
|
155
|
-
</div>
|
|
156
|
-
</div>
|
|
157
|
-
<div class="form-group col-sm-12">
|
|
158
|
-
<label class="col-sm-2 control-label">材料型号:</label>
|
|
159
|
-
<div class="col-sm-10">
|
|
160
|
-
<input type="text"
|
|
161
|
-
readonly
|
|
162
|
-
class="form-control input_view"
|
|
163
|
-
v-validate:f_material_style="['required']"
|
|
164
|
-
v-model="material.f_material_style"/>
|
|
165
|
-
</div>
|
|
166
|
-
</div>
|
|
167
|
-
<div class="form-group col-sm-12">
|
|
168
|
-
<label class="col-sm-2 control-label">材料单价:</label>
|
|
169
|
-
<div class="col-sm-10">
|
|
170
|
-
<input type="number"
|
|
171
|
-
readonly
|
|
172
|
-
class="form-control input_view"
|
|
173
|
-
style="width: 100%"
|
|
174
|
-
v-model="material.f_material_price"/>
|
|
175
|
-
</div>
|
|
176
|
-
</div>
|
|
177
|
-
<div class="form-group col-sm-12">
|
|
178
|
-
<label class="col-sm-2 control-label">材料单位:</label>
|
|
179
|
-
<div class="col-sm-10">
|
|
180
|
-
<input type="text"
|
|
181
|
-
readonly
|
|
182
|
-
class="form-control input_view"
|
|
183
|
-
style="width: 100%"
|
|
184
|
-
v-model="material.f_material_unit"/>
|
|
185
|
-
</div>
|
|
186
|
-
</div>
|
|
187
|
-
<div class="form-group col-sm-12">
|
|
188
|
-
<label class="col-sm-2 control-label">材料数量:</label>
|
|
189
|
-
<div class="col-sm-10">
|
|
190
|
-
<input type="number"
|
|
191
|
-
readonly
|
|
192
|
-
class="form-control input_view"
|
|
193
|
-
style="width: 100%"
|
|
194
|
-
v-model="material.f_material_number"/>
|
|
195
|
-
</div>
|
|
196
|
-
</div>
|
|
197
|
-
<div class="form-group col-sm-12">
|
|
198
|
-
<label class="col-sm-2 control-label">材料备注:</label>
|
|
199
|
-
<div class="col-sm-10">
|
|
200
|
-
<input type="text"
|
|
201
|
-
readonly
|
|
202
|
-
class="form-control input_view"
|
|
203
|
-
style="width: 100%"
|
|
204
|
-
v-model="material.f_material_remarks"/>
|
|
205
|
-
</div>
|
|
206
|
-
</div>
|
|
207
|
-
<div class="form-group col-sm-12" :class="[$v.f_material_void_remarks.required ? 'has-error' : '']">
|
|
208
|
-
<label class="col-sm-2 control-label">作废原因:</label>
|
|
209
|
-
<div class="col-sm-10">
|
|
210
|
-
<input type="text" style="width: 100%"
|
|
211
|
-
class="form-control input_view"
|
|
212
|
-
v-validate:f_material_void_remarks="['required']"
|
|
213
|
-
v-model="material.f_material_void_remarks"/>
|
|
214
|
-
</div>
|
|
215
|
-
</div>
|
|
216
|
-
</article>
|
|
217
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
218
|
-
<button type="button" class="btn btn-primary" :disabled='!$v.valid' @click="invalidmaterial()">确认作废</button>
|
|
219
|
-
</footer>
|
|
220
|
-
</modal>
|
|
221
|
-
</validator>
|
|
222
|
-
</div>
|
|
223
|
-
|
|
224
|
-
<modal :show.sync="showFile" v-ref:modal backdrop="true" title="选择文件">
|
|
225
|
-
<header slot="modal-header" class="modal-header">
|
|
226
|
-
<button type="button" class="close" @click="closeModal"><span>×</span></button>
|
|
227
|
-
<h4 class="modal-title">选择文件</h4>
|
|
228
|
-
</header>
|
|
229
|
-
<article slot="modal-body" class="modal-body">
|
|
230
|
-
<div class="form-group">
|
|
231
|
-
<file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" multiple v-ref:file></file-upload>
|
|
232
|
-
</div>
|
|
233
|
-
</article>
|
|
234
|
-
<footer slot="modal-footer" class="modal-footer"></footer>
|
|
235
|
-
</modal>
|
|
236
|
-
</template>
|
|
237
|
-
<script>
|
|
238
|
-
import {getNowDate, isEmpty} from '../../../Util'
|
|
239
|
-
import {PagedList} from 'vue-client'
|
|
240
|
-
import {HttpResetClass} from 'vue-client'
|
|
241
|
-
|
|
242
|
-
export default {
|
|
243
|
-
title: '拆改材料',
|
|
244
|
-
props: {
|
|
245
|
-
selectdata: {
|
|
246
|
-
type: Object
|
|
247
|
-
},
|
|
248
|
-
mark: {
|
|
249
|
-
type: Number,
|
|
250
|
-
default: 0
|
|
251
|
-
}
|
|
252
|
-
},
|
|
253
|
-
data() {
|
|
254
|
-
return {
|
|
255
|
-
showFile: false,
|
|
256
|
-
showSupplement: false,
|
|
257
|
-
showInvalid: false,
|
|
258
|
-
model: {
|
|
259
|
-
data: null
|
|
260
|
-
},
|
|
261
|
-
material: {}
|
|
262
|
-
}
|
|
263
|
-
},
|
|
264
|
-
ready() {
|
|
265
|
-
this.search()
|
|
266
|
-
},
|
|
267
|
-
methods: {
|
|
268
|
-
showFileModal() {
|
|
269
|
-
this.showFile = !this.showFile
|
|
270
|
-
},
|
|
271
|
-
async invalidmaterial() {
|
|
272
|
-
let http = new HttpResetClass()
|
|
273
|
-
let data = {
|
|
274
|
-
selectdata: this.selectdata,
|
|
275
|
-
user: this.$login.f,
|
|
276
|
-
material: this.material
|
|
277
|
-
}
|
|
278
|
-
let res = await http.load('POST', 'rs/logic/deleteApplyMaterial', {data: data}, {
|
|
279
|
-
resolveMsg: null,
|
|
280
|
-
rejectMsg: '作废失败'
|
|
281
|
-
})
|
|
282
|
-
this.$dispatch('breakControl', this.selectdata)
|
|
283
|
-
},
|
|
284
|
-
showInvalidModal(row) {
|
|
285
|
-
this.material = row
|
|
286
|
-
this.showInvalid = true
|
|
287
|
-
},
|
|
288
|
-
async savematerial() {
|
|
289
|
-
let http = new HttpResetClass()
|
|
290
|
-
let data = {
|
|
291
|
-
material: this.material,
|
|
292
|
-
user: this.$login.f,
|
|
293
|
-
selectdata: this.selectdata
|
|
294
|
-
}
|
|
295
|
-
let res = await http.load('POST', 'rs/logic/addApplyMaterial', {data: data}, {
|
|
296
|
-
resolveMsg: null,
|
|
297
|
-
rejectMsg: '添加失败'
|
|
298
|
-
})
|
|
299
|
-
this.$dispatch('breakControl', this.selectdata)
|
|
300
|
-
},
|
|
301
|
-
async search() {
|
|
302
|
-
let http = new HttpResetClass()
|
|
303
|
-
let data = {
|
|
304
|
-
tablename: 't_material_apply',
|
|
305
|
-
condition: `f_process_id = '${this.selectdata.f_process_id}'`
|
|
306
|
-
}
|
|
307
|
-
let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
|
|
308
|
-
resolveMsg: null,
|
|
309
|
-
rejectMsg: 'null'
|
|
310
|
-
})
|
|
311
|
-
this.model.data = res.data
|
|
312
|
-
},
|
|
313
|
-
closeModal() {
|
|
314
|
-
this.showFile = false
|
|
315
|
-
this.showSupplement = false
|
|
316
|
-
this.showInvalid = false
|
|
317
|
-
this.material = {}
|
|
318
|
-
this.search()
|
|
319
|
-
}
|
|
320
|
-
},
|
|
321
|
-
events: {
|
|
322
|
-
async 'onFileUpload'(file, result) {
|
|
323
|
-
let data = {
|
|
324
|
-
selectdata: this.selectdata,
|
|
325
|
-
filepath: result.f_downloadpath,
|
|
326
|
-
user: this.$login.f,
|
|
327
|
-
mark: this.mark
|
|
328
|
-
}
|
|
329
|
-
let res = await this.$resetpost(`rs/logic/importMaterials`, {data:data}, {resolveMsg: null, rejectMsg: '导入失败', silent: true}, 0)
|
|
330
|
-
this.$showMessage(res.data);
|
|
331
|
-
if (this.mark !== 0) {
|
|
332
|
-
this.$dispatch('breakControl', this.selectdata)
|
|
333
|
-
}
|
|
334
|
-
this.closeModal()
|
|
335
|
-
}
|
|
336
|
-
},
|
|
337
|
-
computed: {
|
|
338
|
-
materialType() {
|
|
339
|
-
return this.$appdata.getParam('材料型号')
|
|
340
|
-
}
|
|
341
|
-
},
|
|
342
|
-
watch: {}
|
|
343
|
-
}
|
|
344
|
-
</script>
|
|
345
|
-
<style scoped>
|
|
346
|
-
.textNoLineBreak {
|
|
347
|
-
white-space: nowrap;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
.head-but {
|
|
351
|
-
margin-left: 5px;
|
|
352
|
-
height: 34px;
|
|
353
|
-
/*background-color: #6aa6e2;*/
|
|
354
|
-
border-radius: 4px;
|
|
355
|
-
font-family: PingFang;
|
|
356
|
-
color: #ffffff;
|
|
357
|
-
}
|
|
358
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="col-sm-12" style="margin: 20px 0px;">
|
|
3
|
+
<data-grid :model="model" v-ref:grid class="list_area table_sy" style="padding: 0px">
|
|
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">材料备注</th>
|
|
14
|
+
<th class="textNoLineBreak">
|
|
15
|
+
<button
|
|
16
|
+
type="button"
|
|
17
|
+
class="btn btn-info head-but"
|
|
18
|
+
:disabled="$parent.$parent.mark === 1"
|
|
19
|
+
@click="$parent.$parent.showSupplement = !$parent.$parent.showSupplement"
|
|
20
|
+
>添加材料
|
|
21
|
+
</button>
|
|
22
|
+
<button v-if="$parent.$parent.mark !== 1" type="button" class="btn btn-info head-but"
|
|
23
|
+
@click="$parent.$parent.showFileModal()">导入</button>
|
|
24
|
+
<a v-if="$parent.$parent.mark !== 1" type="button" class="btn btn-info head-but"
|
|
25
|
+
href="/apply/download/excel/中盛材料批量导入.xlsx" download>模板下载</a>
|
|
26
|
+
</th>
|
|
27
|
+
</tr>
|
|
28
|
+
</template>
|
|
29
|
+
<template partial='body'>
|
|
30
|
+
<tr>
|
|
31
|
+
<td style="text-align: center;">
|
|
32
|
+
<nobr>{{ $index + 1 }}</nobr>
|
|
33
|
+
</td>
|
|
34
|
+
<td style="text-align: center;">
|
|
35
|
+
<nobr>{{ row.f_material_name }}</nobr>
|
|
36
|
+
</td>
|
|
37
|
+
<td style="text-align: center;">
|
|
38
|
+
<nobr>{{ row.f_material_style }}</nobr>
|
|
39
|
+
</td>
|
|
40
|
+
<td style="text-align: center;">
|
|
41
|
+
<nobr>{{ row.f_material_price }}</nobr>
|
|
42
|
+
</td>
|
|
43
|
+
<td style="text-align: center;">
|
|
44
|
+
<nobr>{{ row.f_material_unit }}</nobr>
|
|
45
|
+
</td>
|
|
46
|
+
<td style="text-align: center;">
|
|
47
|
+
<nobr>{{ row.f_material_number }}</nobr>
|
|
48
|
+
</td>
|
|
49
|
+
<td style="text-align: center;">
|
|
50
|
+
<nobr>{{ row.f_price_sum }}</nobr>
|
|
51
|
+
</td>
|
|
52
|
+
<td style="text-align: center;">
|
|
53
|
+
<nobr>{{ row.f_material_remarks }}</nobr>
|
|
54
|
+
</td>
|
|
55
|
+
<td style="text-align: center;">
|
|
56
|
+
<nobr>
|
|
57
|
+
<button
|
|
58
|
+
type="button"
|
|
59
|
+
name="button"
|
|
60
|
+
class="btn btn-link"
|
|
61
|
+
:disabled="$parent.$parent.mark === 1 || row.f_material_status === '作废'"
|
|
62
|
+
@click="$parent.$parent.showInvalidModal(row)"
|
|
63
|
+
>{{ row.f_material_status === '作废' ? '已作废' : '作废' }}
|
|
64
|
+
</button>
|
|
65
|
+
</nobr>
|
|
66
|
+
</td>
|
|
67
|
+
</tr>
|
|
68
|
+
</template>
|
|
69
|
+
</data-grid>
|
|
70
|
+
|
|
71
|
+
<validator name="v">
|
|
72
|
+
<modal v-if="showSupplement" :show.sync="showSupplement" v-ref:modal :large="true" :backdrop="false">
|
|
73
|
+
<header slot="modal-header" class="modal-header">
|
|
74
|
+
<button type="button" class="close" @click="closeModal"><span>×</span></button>
|
|
75
|
+
<h4 class="modal-title">预算材料</h4>
|
|
76
|
+
</header>
|
|
77
|
+
<article slot="modal-body" class="modal-body clearfix">
|
|
78
|
+
<div class="form-group col-sm-12" :class="[$v.f_material_name.required ? 'has-error' : '']">
|
|
79
|
+
<label class="col-sm-2 control-label">材料名称:</label>
|
|
80
|
+
<div class="col-sm-10">
|
|
81
|
+
<input type="text"
|
|
82
|
+
class="form-control input_view"
|
|
83
|
+
v-validate:f_material_name="['required']"
|
|
84
|
+
style="width: 100%"
|
|
85
|
+
v-model="material.f_material_name"/>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
<div class="form-group col-sm-12" :class="[$v.f_material_style.required ? 'has-error' : '']">
|
|
89
|
+
<label class="col-sm-2 control-label">材料型号:</label>
|
|
90
|
+
<div class="col-sm-10">
|
|
91
|
+
<input type="text"
|
|
92
|
+
class="form-control input_view"
|
|
93
|
+
v-validate:f_material_style="['required']"
|
|
94
|
+
v-model="material.f_material_style"/>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
<div class="form-group col-sm-12" :class="[$v.f_material_price.required ? 'has-error' : '']">
|
|
98
|
+
<label class="col-sm-2 control-label">材料单价:</label>
|
|
99
|
+
<div class="col-sm-10">
|
|
100
|
+
<input type="number"
|
|
101
|
+
class="form-control input_view"
|
|
102
|
+
style="width: 100%"
|
|
103
|
+
v-validate:f_material_price="['required']"
|
|
104
|
+
v-model="material.f_material_price"/>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
<div class="form-group col-sm-12">
|
|
108
|
+
<label class="col-sm-2 control-label">材料单位:</label>
|
|
109
|
+
<div class="col-sm-10">
|
|
110
|
+
<input type="text"
|
|
111
|
+
class="form-control input_view"
|
|
112
|
+
style="width: 100%"
|
|
113
|
+
v-model="material.f_material_unit"/>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
<div class="form-group col-sm-12" :class="[$v.f_material_number.required ? 'has-error' : '']">
|
|
117
|
+
<label class="col-sm-2 control-label">材料数量:</label>
|
|
118
|
+
<div class="col-sm-10">
|
|
119
|
+
<input type="number"
|
|
120
|
+
class="form-control input_view"
|
|
121
|
+
style="width: 100%"
|
|
122
|
+
v-validate:f_material_number="['required']"
|
|
123
|
+
v-model="material.f_material_number"/>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
<div class="form-group col-sm-12">
|
|
127
|
+
<label class="col-sm-2 control-label">材料备注:</label>
|
|
128
|
+
<div class="col-sm-10">
|
|
129
|
+
<input type="text"
|
|
130
|
+
class="form-control input_view"
|
|
131
|
+
style="width: 100%"
|
|
132
|
+
v-model="material.f_material_remarks"/>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
</article>
|
|
136
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
137
|
+
<button type="button" class="btn btn-primary" :disabled='!$v.valid' @click="savematerial()">新增材料</button>
|
|
138
|
+
</footer>
|
|
139
|
+
</modal>
|
|
140
|
+
|
|
141
|
+
<modal v-if="showInvalid" :show.sync="showInvalid" v-ref:modal :large="true" :backdrop="false" title="作废材料">
|
|
142
|
+
<header slot="modal-header" class="modal-header">
|
|
143
|
+
<button type="button" class="close" @click="closeModal"><span>×</span></button>
|
|
144
|
+
<h4 class="modal-title">作废协议</h4>
|
|
145
|
+
</header>
|
|
146
|
+
<article slot="modal-body" class="modal-body clearfix">
|
|
147
|
+
<div class="form-group col-sm-12">
|
|
148
|
+
<label class="col-sm-2 control-label">材料名称:</label>
|
|
149
|
+
<div class="col-sm-10">
|
|
150
|
+
<input type="text"
|
|
151
|
+
readonly
|
|
152
|
+
class="form-control input_view"
|
|
153
|
+
style="width: 100%"
|
|
154
|
+
v-model="material.f_material_name"/>
|
|
155
|
+
</div>
|
|
156
|
+
</div>
|
|
157
|
+
<div class="form-group col-sm-12">
|
|
158
|
+
<label class="col-sm-2 control-label">材料型号:</label>
|
|
159
|
+
<div class="col-sm-10">
|
|
160
|
+
<input type="text"
|
|
161
|
+
readonly
|
|
162
|
+
class="form-control input_view"
|
|
163
|
+
v-validate:f_material_style="['required']"
|
|
164
|
+
v-model="material.f_material_style"/>
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
<div class="form-group col-sm-12">
|
|
168
|
+
<label class="col-sm-2 control-label">材料单价:</label>
|
|
169
|
+
<div class="col-sm-10">
|
|
170
|
+
<input type="number"
|
|
171
|
+
readonly
|
|
172
|
+
class="form-control input_view"
|
|
173
|
+
style="width: 100%"
|
|
174
|
+
v-model="material.f_material_price"/>
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
<div class="form-group col-sm-12">
|
|
178
|
+
<label class="col-sm-2 control-label">材料单位:</label>
|
|
179
|
+
<div class="col-sm-10">
|
|
180
|
+
<input type="text"
|
|
181
|
+
readonly
|
|
182
|
+
class="form-control input_view"
|
|
183
|
+
style="width: 100%"
|
|
184
|
+
v-model="material.f_material_unit"/>
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
<div class="form-group col-sm-12">
|
|
188
|
+
<label class="col-sm-2 control-label">材料数量:</label>
|
|
189
|
+
<div class="col-sm-10">
|
|
190
|
+
<input type="number"
|
|
191
|
+
readonly
|
|
192
|
+
class="form-control input_view"
|
|
193
|
+
style="width: 100%"
|
|
194
|
+
v-model="material.f_material_number"/>
|
|
195
|
+
</div>
|
|
196
|
+
</div>
|
|
197
|
+
<div class="form-group col-sm-12">
|
|
198
|
+
<label class="col-sm-2 control-label">材料备注:</label>
|
|
199
|
+
<div class="col-sm-10">
|
|
200
|
+
<input type="text"
|
|
201
|
+
readonly
|
|
202
|
+
class="form-control input_view"
|
|
203
|
+
style="width: 100%"
|
|
204
|
+
v-model="material.f_material_remarks"/>
|
|
205
|
+
</div>
|
|
206
|
+
</div>
|
|
207
|
+
<div class="form-group col-sm-12" :class="[$v.f_material_void_remarks.required ? 'has-error' : '']">
|
|
208
|
+
<label class="col-sm-2 control-label">作废原因:</label>
|
|
209
|
+
<div class="col-sm-10">
|
|
210
|
+
<input type="text" style="width: 100%"
|
|
211
|
+
class="form-control input_view"
|
|
212
|
+
v-validate:f_material_void_remarks="['required']"
|
|
213
|
+
v-model="material.f_material_void_remarks"/>
|
|
214
|
+
</div>
|
|
215
|
+
</div>
|
|
216
|
+
</article>
|
|
217
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
218
|
+
<button type="button" class="btn btn-primary" :disabled='!$v.valid' @click="invalidmaterial()">确认作废</button>
|
|
219
|
+
</footer>
|
|
220
|
+
</modal>
|
|
221
|
+
</validator>
|
|
222
|
+
</div>
|
|
223
|
+
|
|
224
|
+
<modal :show.sync="showFile" v-ref:modal backdrop="true" title="选择文件">
|
|
225
|
+
<header slot="modal-header" class="modal-header">
|
|
226
|
+
<button type="button" class="close" @click="closeModal"><span>×</span></button>
|
|
227
|
+
<h4 class="modal-title">选择文件</h4>
|
|
228
|
+
</header>
|
|
229
|
+
<article slot="modal-body" class="modal-body">
|
|
230
|
+
<div class="form-group">
|
|
231
|
+
<file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" multiple v-ref:file></file-upload>
|
|
232
|
+
</div>
|
|
233
|
+
</article>
|
|
234
|
+
<footer slot="modal-footer" class="modal-footer"></footer>
|
|
235
|
+
</modal>
|
|
236
|
+
</template>
|
|
237
|
+
<script>
|
|
238
|
+
import {getNowDate, isEmpty} from '../../../Util'
|
|
239
|
+
import {PagedList} from 'vue-client'
|
|
240
|
+
import {HttpResetClass} from 'vue-client'
|
|
241
|
+
|
|
242
|
+
export default {
|
|
243
|
+
title: '拆改材料',
|
|
244
|
+
props: {
|
|
245
|
+
selectdata: {
|
|
246
|
+
type: Object
|
|
247
|
+
},
|
|
248
|
+
mark: {
|
|
249
|
+
type: Number,
|
|
250
|
+
default: 0
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
data() {
|
|
254
|
+
return {
|
|
255
|
+
showFile: false,
|
|
256
|
+
showSupplement: false,
|
|
257
|
+
showInvalid: false,
|
|
258
|
+
model: {
|
|
259
|
+
data: null
|
|
260
|
+
},
|
|
261
|
+
material: {}
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
ready() {
|
|
265
|
+
this.search()
|
|
266
|
+
},
|
|
267
|
+
methods: {
|
|
268
|
+
showFileModal() {
|
|
269
|
+
this.showFile = !this.showFile
|
|
270
|
+
},
|
|
271
|
+
async invalidmaterial() {
|
|
272
|
+
let http = new HttpResetClass()
|
|
273
|
+
let data = {
|
|
274
|
+
selectdata: this.selectdata,
|
|
275
|
+
user: this.$login.f,
|
|
276
|
+
material: this.material
|
|
277
|
+
}
|
|
278
|
+
let res = await http.load('POST', 'rs/logic/deleteApplyMaterial', {data: data}, {
|
|
279
|
+
resolveMsg: null,
|
|
280
|
+
rejectMsg: '作废失败'
|
|
281
|
+
})
|
|
282
|
+
this.$dispatch('breakControl', this.selectdata)
|
|
283
|
+
},
|
|
284
|
+
showInvalidModal(row) {
|
|
285
|
+
this.material = row
|
|
286
|
+
this.showInvalid = true
|
|
287
|
+
},
|
|
288
|
+
async savematerial() {
|
|
289
|
+
let http = new HttpResetClass()
|
|
290
|
+
let data = {
|
|
291
|
+
material: this.material,
|
|
292
|
+
user: this.$login.f,
|
|
293
|
+
selectdata: this.selectdata
|
|
294
|
+
}
|
|
295
|
+
let res = await http.load('POST', 'rs/logic/addApplyMaterial', {data: data}, {
|
|
296
|
+
resolveMsg: null,
|
|
297
|
+
rejectMsg: '添加失败'
|
|
298
|
+
})
|
|
299
|
+
this.$dispatch('breakControl', this.selectdata)
|
|
300
|
+
},
|
|
301
|
+
async search() {
|
|
302
|
+
let http = new HttpResetClass()
|
|
303
|
+
let data = {
|
|
304
|
+
tablename: 't_material_apply',
|
|
305
|
+
condition: `f_process_id = '${this.selectdata.f_process_id}'`
|
|
306
|
+
}
|
|
307
|
+
let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
|
|
308
|
+
resolveMsg: null,
|
|
309
|
+
rejectMsg: 'null'
|
|
310
|
+
})
|
|
311
|
+
this.model.data = res.data
|
|
312
|
+
},
|
|
313
|
+
closeModal() {
|
|
314
|
+
this.showFile = false
|
|
315
|
+
this.showSupplement = false
|
|
316
|
+
this.showInvalid = false
|
|
317
|
+
this.material = {}
|
|
318
|
+
this.search()
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
events: {
|
|
322
|
+
async 'onFileUpload'(file, result) {
|
|
323
|
+
let data = {
|
|
324
|
+
selectdata: this.selectdata,
|
|
325
|
+
filepath: result.f_downloadpath,
|
|
326
|
+
user: this.$login.f,
|
|
327
|
+
mark: this.mark
|
|
328
|
+
}
|
|
329
|
+
let res = await this.$resetpost(`rs/logic/importMaterials`, {data:data}, {resolveMsg: null, rejectMsg: '导入失败', silent: true}, 0)
|
|
330
|
+
this.$showMessage(res.data);
|
|
331
|
+
if (this.mark !== 0) {
|
|
332
|
+
this.$dispatch('breakControl', this.selectdata)
|
|
333
|
+
}
|
|
334
|
+
this.closeModal()
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
computed: {
|
|
338
|
+
materialType() {
|
|
339
|
+
return this.$appdata.getParam('材料型号')
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
watch: {}
|
|
343
|
+
}
|
|
344
|
+
</script>
|
|
345
|
+
<style scoped>
|
|
346
|
+
.textNoLineBreak {
|
|
347
|
+
white-space: nowrap;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.head-but {
|
|
351
|
+
margin-left: 5px;
|
|
352
|
+
height: 34px;
|
|
353
|
+
/*background-color: #6aa6e2;*/
|
|
354
|
+
border-radius: 4px;
|
|
355
|
+
font-family: PingFang;
|
|
356
|
+
color: #ffffff;
|
|
357
|
+
}
|
|
358
|
+
</style>
|