apply-clients 6.0.3 → 6.0.4
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/build/dev-server.js +72 -72
- package/package.json +1 -1
- package/src/components/apply/base/rightview/InstallCardList2.vue +267 -268
- package/src/components/apply/base/rightview/carddetail/BuildFeeDetail2.vue +77 -77
- package/src/components/apply/base/rightview/carddetail/ChangeFeeDetail2.vue +116 -116
- package/src/components/apply/base/rightview/carddetail/ReduceFeeDetail2.vue +1 -1
- package/src/components/build/Install/InstallFee/AddContract.vue +257 -257
- package/src/components/build/Install/InstallFee/InstallFee.vue +929 -929
- package/src/components/build/Install/InstallFee/PreparationFee.vue +223 -223
- package/src/components/build/Install/InstallFee/PrestoreFee.vue +630 -630
- package/src/components/build/Install/Process/CustomerBuildingMessage.vue +251 -251
- package/src/components/build/Install/Process/CustomerEquipmentMessage.vue +172 -172
- package/src/components/build/Install/Process/CustomerFile.vue +423 -423
- package/src/components/build/Install/Process/CustomerMaterialMessage.vue +414 -414
- package/src/components/build/Install/Process/CustomerRecordMessage.vue +749 -749
- package/src/components/build/Install/Process/FeeNormeAndContratSigne.vue +376 -376
- package/src/components/build/Install/Process/MeterType.vue +379 -379
- package/src/components/build/Install/Process/PlaceControler.vue +304 -304
- package/src/components/build/Install/Process/zhongran/ZR_Construction.vue +388 -388
- package/src/components/build/Install/Process/zhongran/ZR_MaterialPlan.vue +259 -259
- package/src/components/build/Install/Process/zhongran/ZR_MaterialPlanExamine.vue +243 -243
- package/src/components/build/Install/Process/zhongran/ZR_PlaceControler.vue +426 -426
- package/src/components/build/Install/Process/zhongran/ZR_TestDesign.vue +441 -441
- package/src/components/build/Install/ProcessInfo/ApplyRecordCancel.vue +135 -135
- package/src/components/build/Install/bill/BillGZKMakeInfo.vue +58 -58
- package/src/components/build/Install/bill/BillQRKMakeInfo.vue +79 -79
- package/src/components/build/Install/bill/BillXSDMakeInfo.vue +206 -206
- package/src/main.js +25 -25
|
@@ -1,414 +1,414 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="flex">
|
|
3
|
-
<div class="form-inline auto" style="margin-bottom: 5px;">
|
|
4
|
-
<label>材料查找:</label>
|
|
5
|
-
<input type="text" class="form-control" placeholder='请输入查找的材料名称' v-model="param"
|
|
6
|
-
@keyup.enter="filterParams(param)">
|
|
7
|
-
<button type="button" class="btn btn-primary" @click="filterParams(param)">查询</button>
|
|
8
|
-
<button type="button" class="btn btn-warning" @click="add()" v-show="edit">新增</button>
|
|
9
|
-
<div class="form-inline" style="float: right">
|
|
10
|
-
<button type="button" class="btn btn-warning add-postition" @click="impexcel()" v-show="edit">导入</button>
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|
|
13
|
-
<div class="col-sm-12 span recordTable" style="margin-top: 10px;min-height: 500px">
|
|
14
|
-
<partial-view v-ref:single-load>
|
|
15
|
-
<data-grid :model="model" v-ref:grid>
|
|
16
|
-
<template partial='head'>
|
|
17
|
-
<tr>
|
|
18
|
-
<th>序号</th>
|
|
19
|
-
<th>材料类型</th>
|
|
20
|
-
<th>材料名称</th>
|
|
21
|
-
<th>材料规格</th>
|
|
22
|
-
<th>数量</th>
|
|
23
|
-
<th>单价</th>
|
|
24
|
-
<th>金额</th>
|
|
25
|
-
<th v-show="edit">是否缴费</th>
|
|
26
|
-
<th v-show="edit">操作</th>
|
|
27
|
-
</tr>
|
|
28
|
-
</template>
|
|
29
|
-
<template partial='body'>
|
|
30
|
-
<td>{{$index+1}}</td>
|
|
31
|
-
<td>{{row.f_material_type}}</td>
|
|
32
|
-
<td>{{row.f_material_name}}</td>
|
|
33
|
-
<td>{{row.f_material_spec}}</td>
|
|
34
|
-
<td>{{row.f_quantity}}</td>
|
|
35
|
-
<td>{{row.f_price}}</td>
|
|
36
|
-
<td>{{row.f_money}}</td>
|
|
37
|
-
<!--<td>{{row.f_remarks}}</td>-->
|
|
38
|
-
<td v-show="edit"><input type="checkbox" v-model="row.f_pay" @click="$parent.$parent.$parent.paychange(row)"/></td>
|
|
39
|
-
<td class="flex-around">
|
|
40
|
-
<button type="button" name="button" class="btn btn-link"
|
|
41
|
-
@click.stop="$parent.$parent.$parent.modifyParam(row)" v-show="edit">修改
|
|
42
|
-
</button>
|
|
43
|
-
<button type="button" name="button" class="btn btn-link"
|
|
44
|
-
@click.stop="$parent.$parent.$parent.deleteItem(row)" v-show="edit">删除
|
|
45
|
-
</button>
|
|
46
|
-
</td>
|
|
47
|
-
</template>
|
|
48
|
-
</data-grid>
|
|
49
|
-
</partial-view>
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
<modal :show.sync="show" v-ref:modal backdrop="false">
|
|
53
|
-
<header slot="modal-header" class="modal-header">
|
|
54
|
-
<button type="button" class="close" @click="close"><span>×</span></button>
|
|
55
|
-
<h4 class="modal-title">配置</h4>
|
|
56
|
-
</header>
|
|
57
|
-
<article slot="modal-body" class="modal-body">
|
|
58
|
-
<div class="from-group">
|
|
59
|
-
<label>材料类型</label>
|
|
60
|
-
<input-select class="input-select" :value.sync="selectItem.f_material_type" v-model="selectItem.f_material_type"
|
|
61
|
-
v-ref:customertype
|
|
62
|
-
:options='fmaterialtype'
|
|
63
|
-
@change="fmaterialnames"
|
|
64
|
-
close-on-select></input-select>
|
|
65
|
-
</div>
|
|
66
|
-
<div class="from-group">
|
|
67
|
-
<label>材料名称</label>
|
|
68
|
-
<input-select class="input-select" :value.sync="selectItem.f_material_name" v-model="selectItem.f_material_name"
|
|
69
|
-
v-ref:customertype
|
|
70
|
-
:options='fmaterialname'
|
|
71
|
-
@change="fmaterialspecs"
|
|
72
|
-
close-on-select></input-select>
|
|
73
|
-
<!--<input type="text" class="form-control" v-model="selectItem.f_material_name">-->
|
|
74
|
-
</div>
|
|
75
|
-
<div class="from-group">
|
|
76
|
-
<label>材料规格</label>
|
|
77
|
-
<input-select class="input-select" :value.sync="selectItem.f_material_spec" v-model="selectItem.f_material_spec"
|
|
78
|
-
v-ref:customertype
|
|
79
|
-
:options='fmaterialspec'
|
|
80
|
-
@change="fprice"
|
|
81
|
-
close-on-select></input-select>
|
|
82
|
-
<!--<input type="text" class="form-control" v-model="selectItem.f_material_spec">-->
|
|
83
|
-
</div>
|
|
84
|
-
<div class="from-group">
|
|
85
|
-
<label>单价</label>
|
|
86
|
-
<input-select class="input-select" :value.sync="selectItem.f_price" v-model="selectItem.f_price"
|
|
87
|
-
v-ref:customertype
|
|
88
|
-
:options='fmaterialprice'
|
|
89
|
-
close-on-select></input-select>
|
|
90
|
-
<!--<input type="text" class="form-control" v-model="selectItem.f_price">-->
|
|
91
|
-
</div>
|
|
92
|
-
<div class="from-group">
|
|
93
|
-
<label>数量</label>
|
|
94
|
-
<input type="text" class="form-control" v-model="selectItem.f_quantity">
|
|
95
|
-
</div>
|
|
96
|
-
<div class="from-group">
|
|
97
|
-
<label>金额</label>
|
|
98
|
-
<input type="text" class="form-control" v-model="selectItem.f_money">
|
|
99
|
-
</div>
|
|
100
|
-
<div class="from-group">
|
|
101
|
-
<label>备注</label>
|
|
102
|
-
<input type="text" class="form-control" v-model="selectItem.f_remarks">
|
|
103
|
-
</div>
|
|
104
|
-
</article>
|
|
105
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
106
|
-
<button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
|
|
107
|
-
<button v-show="show" type="button" class="btn btn-success" @click='confirm'>确认</button>
|
|
108
|
-
</footer>
|
|
109
|
-
</modal>
|
|
110
|
-
<modal :show.sync="isShow" v-ref:modal backdrop="false">
|
|
111
|
-
<header slot="modal-header" class="modal-header">
|
|
112
|
-
<button type="button" class="close" @click="closeFile"><span>×</span></button>
|
|
113
|
-
<h4 class="modal-title">材料导入</h4>
|
|
114
|
-
</header>
|
|
115
|
-
<article slot="modal-body" class="modal-body">
|
|
116
|
-
<div class="form-group">
|
|
117
|
-
<file-upload class="my-file-uploader" name="materialExcel"
|
|
118
|
-
action="rs/file/uploadFile" tagname="文件导入" :headers="headers" v-ref:file></file-upload>
|
|
119
|
-
</div>
|
|
120
|
-
</article>
|
|
121
|
-
<footer slot="modal-footer" class="modal-footer"></footer>
|
|
122
|
-
</modal>
|
|
123
|
-
</template>
|
|
124
|
-
|
|
125
|
-
<script>
|
|
126
|
-
import {HttpResetClass} from 'vue-client'
|
|
127
|
-
|
|
128
|
-
let getInfo = async function (self) {
|
|
129
|
-
if (!self.selectdata)
|
|
130
|
-
return
|
|
131
|
-
let data = {
|
|
132
|
-
tablename: 't_material',
|
|
133
|
-
condition: `f_uuuid = '${self.selectdata.f_process_id}' and f_type = '报建'`
|
|
134
|
-
}
|
|
135
|
-
let reset = new HttpResetClass()
|
|
136
|
-
await reset.load('POST', 'rs/sql/
|
|
137
|
-
.then((res) => {
|
|
138
|
-
self.model.rows = []
|
|
139
|
-
self.model.rows = res.data
|
|
140
|
-
// 备份用于查询
|
|
141
|
-
self.params = res.data
|
|
142
|
-
})
|
|
143
|
-
}
|
|
144
|
-
export default {
|
|
145
|
-
title: '材料信息',
|
|
146
|
-
props: ['selectdata','edit'],
|
|
147
|
-
data() {
|
|
148
|
-
return {
|
|
149
|
-
fmaterialtype: [],
|
|
150
|
-
fmaterialname: [],
|
|
151
|
-
fmaterialspec: [],
|
|
152
|
-
fmaterialprice: [],
|
|
153
|
-
headers: {'username': this.$login.f.name, 'blodid': this.selectdata.f_process_id,'fusetype':'报建execl导入材料'},
|
|
154
|
-
params: null,
|
|
155
|
-
record: {},
|
|
156
|
-
selectItem: {},
|
|
157
|
-
model: {
|
|
158
|
-
rows: []
|
|
159
|
-
},
|
|
160
|
-
show: false,
|
|
161
|
-
isShow: false
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
async ready() {
|
|
165
|
-
this.load()
|
|
166
|
-
},
|
|
167
|
-
watch: {
|
|
168
|
-
'selectdata'() {
|
|
169
|
-
this.headers.blodid = this.selectdata.f_process_id
|
|
170
|
-
getInfo(this)
|
|
171
|
-
}
|
|
172
|
-
},
|
|
173
|
-
computed: {
|
|
174
|
-
async fprice(){
|
|
175
|
-
if(this.selectItem.f_material_type && this.selectItem.f_material_name && this.selectItem.f_material_spec){
|
|
176
|
-
this.fmaterialprice = []
|
|
177
|
-
let http = new HttpResetClass()
|
|
178
|
-
let data = {
|
|
179
|
-
columnname: 'f_price',
|
|
180
|
-
tablename: 't_material',
|
|
181
|
-
condition: `f_material_type = '${this.selectItem.f_material_type}' and f_material_name = '${this.selectItem.f_material_name}' and f_material_spec = '${this.selectItem.f_material_spec}' ORDER BY f_price desc`
|
|
182
|
-
}
|
|
183
|
-
let res = await http.load('POST', 'rs/sql/getdistinct', {data: data}, {
|
|
184
|
-
resolveMsg: null,
|
|
185
|
-
rejectMsg: "获取f_material_type失败"
|
|
186
|
-
}, {silent: true})
|
|
187
|
-
res.data.forEach((row) => {
|
|
188
|
-
let temp = {
|
|
189
|
-
label: row.f_price,
|
|
190
|
-
value: row.f_price
|
|
191
|
-
}
|
|
192
|
-
this.fmaterialprice.push(temp)
|
|
193
|
-
})
|
|
194
|
-
}
|
|
195
|
-
},
|
|
196
|
-
async fmaterialnames() {
|
|
197
|
-
if (this.selectItem.f_material_type) {
|
|
198
|
-
this.fmaterialname = []
|
|
199
|
-
let f_material_type = this.selectItem.f_material_type
|
|
200
|
-
let http = new HttpResetClass()
|
|
201
|
-
let data = {
|
|
202
|
-
columnname: 'f_material_name',
|
|
203
|
-
tablename: 't_material',
|
|
204
|
-
condition: `f_material_type = '${f_material_type}'`
|
|
205
|
-
}
|
|
206
|
-
let res = await http.load('POST', 'rs/sql/getdistinct', {data: data}, {
|
|
207
|
-
resolveMsg: null,
|
|
208
|
-
rejectMsg: "获取f_material_name失败"
|
|
209
|
-
}, {silent: true})
|
|
210
|
-
res.data.forEach((row) => {
|
|
211
|
-
let temp = {
|
|
212
|
-
label: row.f_material_name,
|
|
213
|
-
value: row.f_material_name
|
|
214
|
-
}
|
|
215
|
-
this.fmaterialname.push(temp)
|
|
216
|
-
})
|
|
217
|
-
}
|
|
218
|
-
},
|
|
219
|
-
async fmaterialspecs() {
|
|
220
|
-
if (this.selectItem.f_material_name) {
|
|
221
|
-
this.fmaterialspec = []
|
|
222
|
-
let f_material_name = this.selectItem.f_material_name
|
|
223
|
-
let http = new HttpResetClass()
|
|
224
|
-
let data = {
|
|
225
|
-
columnname: 'f_material_spec',
|
|
226
|
-
tablename: 't_material',
|
|
227
|
-
condition: `f_material_name = '${f_material_name}'`
|
|
228
|
-
}
|
|
229
|
-
let res = await http.load('POST', 'rs/sql/getdistinct', {data: data}, {
|
|
230
|
-
resolveMsg: null,
|
|
231
|
-
rejectMsg: "获取f_material_spec失败"
|
|
232
|
-
}, {silent: true})
|
|
233
|
-
res.data.forEach((row) => {
|
|
234
|
-
let temp = {
|
|
235
|
-
label: row.f_material_spec,
|
|
236
|
-
value: row.f_material_spec
|
|
237
|
-
}
|
|
238
|
-
this.fmaterialspec.push(temp)
|
|
239
|
-
})
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
},
|
|
243
|
-
methods: {
|
|
244
|
-
// 父组件更新子组件属性
|
|
245
|
-
updateData(val) {
|
|
246
|
-
this.headers.blodid = val.f_process_id
|
|
247
|
-
this.selectdata = val
|
|
248
|
-
},
|
|
249
|
-
async load(){
|
|
250
|
-
let http = new HttpResetClass()
|
|
251
|
-
let data = {
|
|
252
|
-
columnname: 'f_material_type',
|
|
253
|
-
tablename: 't_material',
|
|
254
|
-
condition: `1=1`
|
|
255
|
-
}
|
|
256
|
-
let res = await http.load('POST', 'rs/sql/getdistinct', {data: data}, {
|
|
257
|
-
resolveMsg: null,
|
|
258
|
-
rejectMsg: null
|
|
259
|
-
}, {silent: true})
|
|
260
|
-
res.data.forEach((row) => {
|
|
261
|
-
let temp = {
|
|
262
|
-
label: row.f_material_type,
|
|
263
|
-
value: row.f_material_type
|
|
264
|
-
}
|
|
265
|
-
this.fmaterialtype.push(temp)
|
|
266
|
-
})
|
|
267
|
-
},
|
|
268
|
-
impexcel() {
|
|
269
|
-
this.isShow = true
|
|
270
|
-
},
|
|
271
|
-
closeFile() {
|
|
272
|
-
this.isShow = false
|
|
273
|
-
// 将选的文件清空
|
|
274
|
-
this.$refs.file.$el.querySelector('input').value = ''
|
|
275
|
-
},
|
|
276
|
-
deleteItem(row) {
|
|
277
|
-
this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
|
|
278
|
-
if (res === 'confirm') {
|
|
279
|
-
this.$resetpost('rs/logic/applyDeleteValue', {tablename: 't_material', id: row.id}).then((res) => {
|
|
280
|
-
getInfo(this)
|
|
281
|
-
})
|
|
282
|
-
}
|
|
283
|
-
})
|
|
284
|
-
},
|
|
285
|
-
filterParams(param) {
|
|
286
|
-
if (param && param !== "") {
|
|
287
|
-
let temp = []
|
|
288
|
-
for (var i = 0; i < this.model.rows.length; i++) {
|
|
289
|
-
if (this.model.rows[i].f_material_name.includes(param)) {
|
|
290
|
-
temp.push(this.model.rows[i])
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
this.model.rows = temp
|
|
294
|
-
} else {
|
|
295
|
-
this.model.rows = this.params
|
|
296
|
-
}
|
|
297
|
-
},
|
|
298
|
-
add() {
|
|
299
|
-
this.show = true
|
|
300
|
-
},
|
|
301
|
-
// 修改按钮
|
|
302
|
-
modifyParam(row) {
|
|
303
|
-
// this.selectItem = row
|
|
304
|
-
this.$set('selectItem.id', row.id)
|
|
305
|
-
this.$set('selectItem.f_uuuid', row.f_uuuid)
|
|
306
|
-
this.$set('selectItem.f_material_type', row.f_material_type)
|
|
307
|
-
this.$set('selectItem.f_material_name', row.f_material_name)
|
|
308
|
-
this.$set('selectItem.f_material_spec', row.f_material_spec)
|
|
309
|
-
this.$set('selectItem.f_quantity', row.f_quantity)
|
|
310
|
-
this.$set('selectItem.f_price', row.f_price)
|
|
311
|
-
this.$set('selectItem.f_money', row.f_money)
|
|
312
|
-
this.$set('selectItem.f_remarks', row.f_remarks)
|
|
313
|
-
this.show = true
|
|
314
|
-
},
|
|
315
|
-
// 缴费情况修改
|
|
316
|
-
paychange(row) {
|
|
317
|
-
let http = new HttpResetClass()
|
|
318
|
-
row.f_pay=!row.f_pay
|
|
319
|
-
http.load('POST','rs/logic/saveentity', {data:{tablename:'t_material',parameters:row}}, {
|
|
320
|
-
resolveMsg: null,
|
|
321
|
-
rejectMsg: "缴费状态更新失败"
|
|
322
|
-
}, {silent: true})
|
|
323
|
-
},
|
|
324
|
-
confirm() {
|
|
325
|
-
// 无主键为插入
|
|
326
|
-
if (!this.selectItem.f_uuuid) {
|
|
327
|
-
this.selectItem.f_type = '报建'
|
|
328
|
-
this.selectItem.f_uuuid = this.selectdata.f_process_id
|
|
329
|
-
let data = {
|
|
330
|
-
tablename: 't_material',
|
|
331
|
-
parameters: this.selectItem
|
|
332
|
-
}
|
|
333
|
-
this.$resetpost('rs/logic/save', {data: data}).then((res) => {
|
|
334
|
-
this.show = false
|
|
335
|
-
// 如果没有id,需要在数组中添加
|
|
336
|
-
getInfo(this)
|
|
337
|
-
this.selectItem = {}
|
|
338
|
-
})
|
|
339
|
-
} else { // 有主键为更新
|
|
340
|
-
let data = {
|
|
341
|
-
tablename: 't_material',
|
|
342
|
-
parameters: this.selectItem
|
|
343
|
-
}
|
|
344
|
-
this.$resetpost('rs/logic/saveentity', {data: data}).then((res) => {
|
|
345
|
-
this.show = false
|
|
346
|
-
// 如果没有id,需要在数组中添加
|
|
347
|
-
getInfo(this)
|
|
348
|
-
this.selectItem = {}
|
|
349
|
-
})
|
|
350
|
-
}
|
|
351
|
-
},
|
|
352
|
-
// 关闭模态框
|
|
353
|
-
close() {
|
|
354
|
-
this.show = false
|
|
355
|
-
this.selectItem = {}
|
|
356
|
-
}
|
|
357
|
-
// modify (row, key) {
|
|
358
|
-
// this.value = row
|
|
359
|
-
// this.key = key
|
|
360
|
-
// },
|
|
361
|
-
// clear (row, key) {
|
|
362
|
-
// if (this.key) {
|
|
363
|
-
// this.model.rows[key] = this.value
|
|
364
|
-
// this.value = null
|
|
365
|
-
// this.key = null
|
|
366
|
-
// }
|
|
367
|
-
// }
|
|
368
|
-
}
|
|
369
|
-
,
|
|
370
|
-
events: {
|
|
371
|
-
onFileUpload: function (file, res) {
|
|
372
|
-
if (!this.selectdata.f_process_id) {
|
|
373
|
-
this.$showMessage("数据异常,导入失败")
|
|
374
|
-
return
|
|
375
|
-
}
|
|
376
|
-
let data = {
|
|
377
|
-
tablename: 'f_material',
|
|
378
|
-
filepath: res.f_downloadpath,
|
|
379
|
-
f_process_id: this.selectdata.f_process_id
|
|
380
|
-
}
|
|
381
|
-
this.$resetpost('rs/logic/materialImport', data, {resolveMsg: '上传成功', rejectMsg: '上传失败'}).then((res) => {
|
|
382
|
-
//this.model.rows = res.data.data
|
|
383
|
-
// for (var i = 0; i < res.data.data.length; i++) {
|
|
384
|
-
// res.data.data[i].t_material.f_pay = res.data.data[i].t_material.t_pay?true:false
|
|
385
|
-
// this.model.rows.push(res.data.data[i].t_material)
|
|
386
|
-
// }
|
|
387
|
-
this.load()
|
|
388
|
-
console.log('dddddddd', this)
|
|
389
|
-
this.closeFile()
|
|
390
|
-
})
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
</script>
|
|
395
|
-
<style scoped>
|
|
396
|
-
.recordTable table tr th {
|
|
397
|
-
font-weight: bold;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
.recordTable table tr:hover {
|
|
401
|
-
background-color: rgb(230, 230, 230);
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
td {
|
|
405
|
-
text-align: center !important
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
.input-select {
|
|
409
|
-
width: 100%;
|
|
410
|
-
height: 34px;
|
|
411
|
-
align-content: center;
|
|
412
|
-
margin-top: 10px;
|
|
413
|
-
}
|
|
414
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex">
|
|
3
|
+
<div class="form-inline auto" style="margin-bottom: 5px;">
|
|
4
|
+
<label>材料查找:</label>
|
|
5
|
+
<input type="text" class="form-control" placeholder='请输入查找的材料名称' v-model="param"
|
|
6
|
+
@keyup.enter="filterParams(param)">
|
|
7
|
+
<button type="button" class="btn btn-primary" @click="filterParams(param)">查询</button>
|
|
8
|
+
<button type="button" class="btn btn-warning" @click="add()" v-show="edit">新增</button>
|
|
9
|
+
<div class="form-inline" style="float: right">
|
|
10
|
+
<button type="button" class="btn btn-warning add-postition" @click="impexcel()" v-show="edit">导入</button>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="col-sm-12 span recordTable" style="margin-top: 10px;min-height: 500px">
|
|
14
|
+
<partial-view v-ref:single-load>
|
|
15
|
+
<data-grid :model="model" v-ref:grid>
|
|
16
|
+
<template partial='head'>
|
|
17
|
+
<tr>
|
|
18
|
+
<th>序号</th>
|
|
19
|
+
<th>材料类型</th>
|
|
20
|
+
<th>材料名称</th>
|
|
21
|
+
<th>材料规格</th>
|
|
22
|
+
<th>数量</th>
|
|
23
|
+
<th>单价</th>
|
|
24
|
+
<th>金额</th>
|
|
25
|
+
<th v-show="edit">是否缴费</th>
|
|
26
|
+
<th v-show="edit">操作</th>
|
|
27
|
+
</tr>
|
|
28
|
+
</template>
|
|
29
|
+
<template partial='body'>
|
|
30
|
+
<td>{{$index+1}}</td>
|
|
31
|
+
<td>{{row.f_material_type}}</td>
|
|
32
|
+
<td>{{row.f_material_name}}</td>
|
|
33
|
+
<td>{{row.f_material_spec}}</td>
|
|
34
|
+
<td>{{row.f_quantity}}</td>
|
|
35
|
+
<td>{{row.f_price}}</td>
|
|
36
|
+
<td>{{row.f_money}}</td>
|
|
37
|
+
<!--<td>{{row.f_remarks}}</td>-->
|
|
38
|
+
<td v-show="edit"><input type="checkbox" v-model="row.f_pay" @click="$parent.$parent.$parent.paychange(row)"/></td>
|
|
39
|
+
<td class="flex-around">
|
|
40
|
+
<button type="button" name="button" class="btn btn-link"
|
|
41
|
+
@click.stop="$parent.$parent.$parent.modifyParam(row)" v-show="edit">修改
|
|
42
|
+
</button>
|
|
43
|
+
<button type="button" name="button" class="btn btn-link"
|
|
44
|
+
@click.stop="$parent.$parent.$parent.deleteItem(row)" v-show="edit">删除
|
|
45
|
+
</button>
|
|
46
|
+
</td>
|
|
47
|
+
</template>
|
|
48
|
+
</data-grid>
|
|
49
|
+
</partial-view>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
<modal :show.sync="show" v-ref:modal backdrop="false">
|
|
53
|
+
<header slot="modal-header" class="modal-header">
|
|
54
|
+
<button type="button" class="close" @click="close"><span>×</span></button>
|
|
55
|
+
<h4 class="modal-title">配置</h4>
|
|
56
|
+
</header>
|
|
57
|
+
<article slot="modal-body" class="modal-body">
|
|
58
|
+
<div class="from-group">
|
|
59
|
+
<label>材料类型</label>
|
|
60
|
+
<input-select class="input-select" :value.sync="selectItem.f_material_type" v-model="selectItem.f_material_type"
|
|
61
|
+
v-ref:customertype
|
|
62
|
+
:options='fmaterialtype'
|
|
63
|
+
@change="fmaterialnames"
|
|
64
|
+
close-on-select></input-select>
|
|
65
|
+
</div>
|
|
66
|
+
<div class="from-group">
|
|
67
|
+
<label>材料名称</label>
|
|
68
|
+
<input-select class="input-select" :value.sync="selectItem.f_material_name" v-model="selectItem.f_material_name"
|
|
69
|
+
v-ref:customertype
|
|
70
|
+
:options='fmaterialname'
|
|
71
|
+
@change="fmaterialspecs"
|
|
72
|
+
close-on-select></input-select>
|
|
73
|
+
<!--<input type="text" class="form-control" v-model="selectItem.f_material_name">-->
|
|
74
|
+
</div>
|
|
75
|
+
<div class="from-group">
|
|
76
|
+
<label>材料规格</label>
|
|
77
|
+
<input-select class="input-select" :value.sync="selectItem.f_material_spec" v-model="selectItem.f_material_spec"
|
|
78
|
+
v-ref:customertype
|
|
79
|
+
:options='fmaterialspec'
|
|
80
|
+
@change="fprice"
|
|
81
|
+
close-on-select></input-select>
|
|
82
|
+
<!--<input type="text" class="form-control" v-model="selectItem.f_material_spec">-->
|
|
83
|
+
</div>
|
|
84
|
+
<div class="from-group">
|
|
85
|
+
<label>单价</label>
|
|
86
|
+
<input-select class="input-select" :value.sync="selectItem.f_price" v-model="selectItem.f_price"
|
|
87
|
+
v-ref:customertype
|
|
88
|
+
:options='fmaterialprice'
|
|
89
|
+
close-on-select></input-select>
|
|
90
|
+
<!--<input type="text" class="form-control" v-model="selectItem.f_price">-->
|
|
91
|
+
</div>
|
|
92
|
+
<div class="from-group">
|
|
93
|
+
<label>数量</label>
|
|
94
|
+
<input type="text" class="form-control" v-model="selectItem.f_quantity">
|
|
95
|
+
</div>
|
|
96
|
+
<div class="from-group">
|
|
97
|
+
<label>金额</label>
|
|
98
|
+
<input type="text" class="form-control" v-model="selectItem.f_money">
|
|
99
|
+
</div>
|
|
100
|
+
<div class="from-group">
|
|
101
|
+
<label>备注</label>
|
|
102
|
+
<input type="text" class="form-control" v-model="selectItem.f_remarks">
|
|
103
|
+
</div>
|
|
104
|
+
</article>
|
|
105
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
106
|
+
<button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
|
|
107
|
+
<button v-show="show" type="button" class="btn btn-success" @click='confirm'>确认</button>
|
|
108
|
+
</footer>
|
|
109
|
+
</modal>
|
|
110
|
+
<modal :show.sync="isShow" v-ref:modal backdrop="false">
|
|
111
|
+
<header slot="modal-header" class="modal-header">
|
|
112
|
+
<button type="button" class="close" @click="closeFile"><span>×</span></button>
|
|
113
|
+
<h4 class="modal-title">材料导入</h4>
|
|
114
|
+
</header>
|
|
115
|
+
<article slot="modal-body" class="modal-body">
|
|
116
|
+
<div class="form-group">
|
|
117
|
+
<file-upload class="my-file-uploader" name="materialExcel"
|
|
118
|
+
action="rs/file/uploadFile" tagname="文件导入" :headers="headers" v-ref:file></file-upload>
|
|
119
|
+
</div>
|
|
120
|
+
</article>
|
|
121
|
+
<footer slot="modal-footer" class="modal-footer"></footer>
|
|
122
|
+
</modal>
|
|
123
|
+
</template>
|
|
124
|
+
|
|
125
|
+
<script>
|
|
126
|
+
import {HttpResetClass} from 'vue-client'
|
|
127
|
+
|
|
128
|
+
let getInfo = async function (self) {
|
|
129
|
+
if (!self.selectdata)
|
|
130
|
+
return
|
|
131
|
+
let data = {
|
|
132
|
+
tablename: 't_material',
|
|
133
|
+
condition: `f_uuuid = '${self.selectdata.f_process_id}' and f_type = '报建'`
|
|
134
|
+
}
|
|
135
|
+
let reset = new HttpResetClass()
|
|
136
|
+
await reset.load('POST', 'rs/sql/applysingleTable', {data: data}, {resolveMsg: null, rejectMsg: '获取材料信息失败'})
|
|
137
|
+
.then((res) => {
|
|
138
|
+
self.model.rows = []
|
|
139
|
+
self.model.rows = res.data
|
|
140
|
+
// 备份用于查询
|
|
141
|
+
self.params = res.data
|
|
142
|
+
})
|
|
143
|
+
}
|
|
144
|
+
export default {
|
|
145
|
+
title: '材料信息',
|
|
146
|
+
props: ['selectdata','edit'],
|
|
147
|
+
data() {
|
|
148
|
+
return {
|
|
149
|
+
fmaterialtype: [],
|
|
150
|
+
fmaterialname: [],
|
|
151
|
+
fmaterialspec: [],
|
|
152
|
+
fmaterialprice: [],
|
|
153
|
+
headers: {'username': this.$login.f.name, 'blodid': this.selectdata.f_process_id,'fusetype':'报建execl导入材料'},
|
|
154
|
+
params: null,
|
|
155
|
+
record: {},
|
|
156
|
+
selectItem: {},
|
|
157
|
+
model: {
|
|
158
|
+
rows: []
|
|
159
|
+
},
|
|
160
|
+
show: false,
|
|
161
|
+
isShow: false
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
async ready() {
|
|
165
|
+
this.load()
|
|
166
|
+
},
|
|
167
|
+
watch: {
|
|
168
|
+
'selectdata'() {
|
|
169
|
+
this.headers.blodid = this.selectdata.f_process_id
|
|
170
|
+
getInfo(this)
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
computed: {
|
|
174
|
+
async fprice(){
|
|
175
|
+
if(this.selectItem.f_material_type && this.selectItem.f_material_name && this.selectItem.f_material_spec){
|
|
176
|
+
this.fmaterialprice = []
|
|
177
|
+
let http = new HttpResetClass()
|
|
178
|
+
let data = {
|
|
179
|
+
columnname: 'f_price',
|
|
180
|
+
tablename: 't_material',
|
|
181
|
+
condition: `f_material_type = '${this.selectItem.f_material_type}' and f_material_name = '${this.selectItem.f_material_name}' and f_material_spec = '${this.selectItem.f_material_spec}' ORDER BY f_price desc`
|
|
182
|
+
}
|
|
183
|
+
let res = await http.load('POST', 'rs/sql/getdistinct', {data: data}, {
|
|
184
|
+
resolveMsg: null,
|
|
185
|
+
rejectMsg: "获取f_material_type失败"
|
|
186
|
+
}, {silent: true})
|
|
187
|
+
res.data.forEach((row) => {
|
|
188
|
+
let temp = {
|
|
189
|
+
label: row.f_price,
|
|
190
|
+
value: row.f_price
|
|
191
|
+
}
|
|
192
|
+
this.fmaterialprice.push(temp)
|
|
193
|
+
})
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
async fmaterialnames() {
|
|
197
|
+
if (this.selectItem.f_material_type) {
|
|
198
|
+
this.fmaterialname = []
|
|
199
|
+
let f_material_type = this.selectItem.f_material_type
|
|
200
|
+
let http = new HttpResetClass()
|
|
201
|
+
let data = {
|
|
202
|
+
columnname: 'f_material_name',
|
|
203
|
+
tablename: 't_material',
|
|
204
|
+
condition: `f_material_type = '${f_material_type}'`
|
|
205
|
+
}
|
|
206
|
+
let res = await http.load('POST', 'rs/sql/getdistinct', {data: data}, {
|
|
207
|
+
resolveMsg: null,
|
|
208
|
+
rejectMsg: "获取f_material_name失败"
|
|
209
|
+
}, {silent: true})
|
|
210
|
+
res.data.forEach((row) => {
|
|
211
|
+
let temp = {
|
|
212
|
+
label: row.f_material_name,
|
|
213
|
+
value: row.f_material_name
|
|
214
|
+
}
|
|
215
|
+
this.fmaterialname.push(temp)
|
|
216
|
+
})
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
async fmaterialspecs() {
|
|
220
|
+
if (this.selectItem.f_material_name) {
|
|
221
|
+
this.fmaterialspec = []
|
|
222
|
+
let f_material_name = this.selectItem.f_material_name
|
|
223
|
+
let http = new HttpResetClass()
|
|
224
|
+
let data = {
|
|
225
|
+
columnname: 'f_material_spec',
|
|
226
|
+
tablename: 't_material',
|
|
227
|
+
condition: `f_material_name = '${f_material_name}'`
|
|
228
|
+
}
|
|
229
|
+
let res = await http.load('POST', 'rs/sql/getdistinct', {data: data}, {
|
|
230
|
+
resolveMsg: null,
|
|
231
|
+
rejectMsg: "获取f_material_spec失败"
|
|
232
|
+
}, {silent: true})
|
|
233
|
+
res.data.forEach((row) => {
|
|
234
|
+
let temp = {
|
|
235
|
+
label: row.f_material_spec,
|
|
236
|
+
value: row.f_material_spec
|
|
237
|
+
}
|
|
238
|
+
this.fmaterialspec.push(temp)
|
|
239
|
+
})
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
methods: {
|
|
244
|
+
// 父组件更新子组件属性
|
|
245
|
+
updateData(val) {
|
|
246
|
+
this.headers.blodid = val.f_process_id
|
|
247
|
+
this.selectdata = val
|
|
248
|
+
},
|
|
249
|
+
async load(){
|
|
250
|
+
let http = new HttpResetClass()
|
|
251
|
+
let data = {
|
|
252
|
+
columnname: 'f_material_type',
|
|
253
|
+
tablename: 't_material',
|
|
254
|
+
condition: `1=1`
|
|
255
|
+
}
|
|
256
|
+
let res = await http.load('POST', 'rs/sql/getdistinct', {data: data}, {
|
|
257
|
+
resolveMsg: null,
|
|
258
|
+
rejectMsg: null
|
|
259
|
+
}, {silent: true})
|
|
260
|
+
res.data.forEach((row) => {
|
|
261
|
+
let temp = {
|
|
262
|
+
label: row.f_material_type,
|
|
263
|
+
value: row.f_material_type
|
|
264
|
+
}
|
|
265
|
+
this.fmaterialtype.push(temp)
|
|
266
|
+
})
|
|
267
|
+
},
|
|
268
|
+
impexcel() {
|
|
269
|
+
this.isShow = true
|
|
270
|
+
},
|
|
271
|
+
closeFile() {
|
|
272
|
+
this.isShow = false
|
|
273
|
+
// 将选的文件清空
|
|
274
|
+
this.$refs.file.$el.querySelector('input').value = ''
|
|
275
|
+
},
|
|
276
|
+
deleteItem(row) {
|
|
277
|
+
this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
|
|
278
|
+
if (res === 'confirm') {
|
|
279
|
+
this.$resetpost('rs/logic/applyDeleteValue', {tablename: 't_material', id: row.id}).then((res) => {
|
|
280
|
+
getInfo(this)
|
|
281
|
+
})
|
|
282
|
+
}
|
|
283
|
+
})
|
|
284
|
+
},
|
|
285
|
+
filterParams(param) {
|
|
286
|
+
if (param && param !== "") {
|
|
287
|
+
let temp = []
|
|
288
|
+
for (var i = 0; i < this.model.rows.length; i++) {
|
|
289
|
+
if (this.model.rows[i].f_material_name.includes(param)) {
|
|
290
|
+
temp.push(this.model.rows[i])
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
this.model.rows = temp
|
|
294
|
+
} else {
|
|
295
|
+
this.model.rows = this.params
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
add() {
|
|
299
|
+
this.show = true
|
|
300
|
+
},
|
|
301
|
+
// 修改按钮
|
|
302
|
+
modifyParam(row) {
|
|
303
|
+
// this.selectItem = row
|
|
304
|
+
this.$set('selectItem.id', row.id)
|
|
305
|
+
this.$set('selectItem.f_uuuid', row.f_uuuid)
|
|
306
|
+
this.$set('selectItem.f_material_type', row.f_material_type)
|
|
307
|
+
this.$set('selectItem.f_material_name', row.f_material_name)
|
|
308
|
+
this.$set('selectItem.f_material_spec', row.f_material_spec)
|
|
309
|
+
this.$set('selectItem.f_quantity', row.f_quantity)
|
|
310
|
+
this.$set('selectItem.f_price', row.f_price)
|
|
311
|
+
this.$set('selectItem.f_money', row.f_money)
|
|
312
|
+
this.$set('selectItem.f_remarks', row.f_remarks)
|
|
313
|
+
this.show = true
|
|
314
|
+
},
|
|
315
|
+
// 缴费情况修改
|
|
316
|
+
paychange(row) {
|
|
317
|
+
let http = new HttpResetClass()
|
|
318
|
+
row.f_pay=!row.f_pay
|
|
319
|
+
http.load('POST','rs/logic/saveentity', {data:{tablename:'t_material',parameters:row}}, {
|
|
320
|
+
resolveMsg: null,
|
|
321
|
+
rejectMsg: "缴费状态更新失败"
|
|
322
|
+
}, {silent: true})
|
|
323
|
+
},
|
|
324
|
+
confirm() {
|
|
325
|
+
// 无主键为插入
|
|
326
|
+
if (!this.selectItem.f_uuuid) {
|
|
327
|
+
this.selectItem.f_type = '报建'
|
|
328
|
+
this.selectItem.f_uuuid = this.selectdata.f_process_id
|
|
329
|
+
let data = {
|
|
330
|
+
tablename: 't_material',
|
|
331
|
+
parameters: this.selectItem
|
|
332
|
+
}
|
|
333
|
+
this.$resetpost('rs/logic/save', {data: data}).then((res) => {
|
|
334
|
+
this.show = false
|
|
335
|
+
// 如果没有id,需要在数组中添加
|
|
336
|
+
getInfo(this)
|
|
337
|
+
this.selectItem = {}
|
|
338
|
+
})
|
|
339
|
+
} else { // 有主键为更新
|
|
340
|
+
let data = {
|
|
341
|
+
tablename: 't_material',
|
|
342
|
+
parameters: this.selectItem
|
|
343
|
+
}
|
|
344
|
+
this.$resetpost('rs/logic/saveentity', {data: data}).then((res) => {
|
|
345
|
+
this.show = false
|
|
346
|
+
// 如果没有id,需要在数组中添加
|
|
347
|
+
getInfo(this)
|
|
348
|
+
this.selectItem = {}
|
|
349
|
+
})
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
// 关闭模态框
|
|
353
|
+
close() {
|
|
354
|
+
this.show = false
|
|
355
|
+
this.selectItem = {}
|
|
356
|
+
}
|
|
357
|
+
// modify (row, key) {
|
|
358
|
+
// this.value = row
|
|
359
|
+
// this.key = key
|
|
360
|
+
// },
|
|
361
|
+
// clear (row, key) {
|
|
362
|
+
// if (this.key) {
|
|
363
|
+
// this.model.rows[key] = this.value
|
|
364
|
+
// this.value = null
|
|
365
|
+
// this.key = null
|
|
366
|
+
// }
|
|
367
|
+
// }
|
|
368
|
+
}
|
|
369
|
+
,
|
|
370
|
+
events: {
|
|
371
|
+
onFileUpload: function (file, res) {
|
|
372
|
+
if (!this.selectdata.f_process_id) {
|
|
373
|
+
this.$showMessage("数据异常,导入失败")
|
|
374
|
+
return
|
|
375
|
+
}
|
|
376
|
+
let data = {
|
|
377
|
+
tablename: 'f_material',
|
|
378
|
+
filepath: res.f_downloadpath,
|
|
379
|
+
f_process_id: this.selectdata.f_process_id
|
|
380
|
+
}
|
|
381
|
+
this.$resetpost('rs/logic/materialImport', data, {resolveMsg: '上传成功', rejectMsg: '上传失败'}).then((res) => {
|
|
382
|
+
//this.model.rows = res.data.data
|
|
383
|
+
// for (var i = 0; i < res.data.data.length; i++) {
|
|
384
|
+
// res.data.data[i].t_material.f_pay = res.data.data[i].t_material.t_pay?true:false
|
|
385
|
+
// this.model.rows.push(res.data.data[i].t_material)
|
|
386
|
+
// }
|
|
387
|
+
this.load()
|
|
388
|
+
console.log('dddddddd', this)
|
|
389
|
+
this.closeFile()
|
|
390
|
+
})
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
</script>
|
|
395
|
+
<style scoped>
|
|
396
|
+
.recordTable table tr th {
|
|
397
|
+
font-weight: bold;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
.recordTable table tr:hover {
|
|
401
|
+
background-color: rgb(230, 230, 230);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
td {
|
|
405
|
+
text-align: center !important
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.input-select {
|
|
409
|
+
width: 100%;
|
|
410
|
+
height: 34px;
|
|
411
|
+
align-content: center;
|
|
412
|
+
margin-top: 10px;
|
|
413
|
+
}
|
|
414
|
+
</style>
|