apply-clients 3.1.55 → 3.1.57
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/App.vue +20 -20
- package/src/apply.js +77 -77
- package/src/components/product/ApplyCharge/ApplyChargeList.vue +316 -316
- package/src/components/product/ApplyCharge/ApplyChargeSearch.vue +26 -26
- package/src/components/product/Function/InstallFunction.vue +165 -165
- package/src/components/product/Function/InstallInfoSelect.vue +278 -278
- package/src/components/product/Function/Service/FunctionServiceControl.vue +262 -262
- package/src/components/product/Function/functions/ChargeManagement.vue +1013 -1013
- package/src/components/product/Order/OrderApply.vue +467 -467
- package/src/components/product/Process/ExplorationSelect.vue +371 -371
- package/src/components/product/Process/ExplorationUser.vue +168 -168
- package/src/components/product/Process/Service/ServiceControl.vue +29 -13
- package/src/components/product/Report/ApplyDevicesList.vue +249 -249
- package/src/components/product/Report/ApplyGongliaoList.vue +239 -239
- package/src/components/product/Report/ApplyReportSearch.vue +26 -26
- package/src/components/product/Report/ReportControl.vue +129 -129
- package/src/components/product/ReportForm/CustomerRecordMessage.vue +1593 -1593
- package/src/components/product/ServiceView.vue +728 -728
- package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +169 -169
- package/src/components/product/Supervisory/SupervisoryControl.vue +132 -132
- package/src/components/product/Supervisory/SupervisoryControl2.vue +132 -132
- package/src/components/product/Supervisory/SupervisoryList.vue +311 -311
- package/src/components/product/Supervisory/SupervisoryList2.vue +368 -368
- package/src/components/product/Supervisory/SupervisoryhCart.vue +105 -105
- package/yarn-error.log +0 -9175
|
@@ -1,1013 +1,1013 @@
|
|
|
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">缴费状态</th>
|
|
15
|
-
<th class="textNoLineBreak">
|
|
16
|
-
<button
|
|
17
|
-
type="button"
|
|
18
|
-
class="btn btn-info head-but"
|
|
19
|
-
@click="$parent.$parent.showChargeModal()"
|
|
20
|
-
:disabled="$parent.$parent.mark === 1 || ($parent.$parent.selectdata.f_cumulative_payment_money >= $parent.$parent.selectdata.f_due_money || $parent.$parent.selectdata.f_surplus_money === 0)"
|
|
21
|
-
>新增收费</button>
|
|
22
|
-
</th>
|
|
23
|
-
</tr>
|
|
24
|
-
</template>
|
|
25
|
-
<template partial='body'>
|
|
26
|
-
<tr>
|
|
27
|
-
<td style="text-align: center;">
|
|
28
|
-
<nobr>{{$index+1}}</nobr>
|
|
29
|
-
</td>
|
|
30
|
-
<td style="text-align: center;">
|
|
31
|
-
<nobr>{{row.f_charge_money}}</nobr>
|
|
32
|
-
</td>
|
|
33
|
-
<td style="text-align: center;">
|
|
34
|
-
<nobr>{{row.f_amount_words}}</nobr>
|
|
35
|
-
</td>
|
|
36
|
-
<td style="text-align: center;">
|
|
37
|
-
<nobr>{{row.f_payment_method}}</nobr>
|
|
38
|
-
</td>
|
|
39
|
-
<td style="text-align: center;">
|
|
40
|
-
<nobr>{{row.f_ticket_number}}</nobr>
|
|
41
|
-
</td>
|
|
42
|
-
<td style="text-align: center;">
|
|
43
|
-
<nobr>{{row.f_operator}}</nobr>
|
|
44
|
-
</td>
|
|
45
|
-
<td style="text-align: center;">
|
|
46
|
-
<nobr>{{row.f_charge_date}}</nobr>
|
|
47
|
-
</td>
|
|
48
|
-
<td style="text-align: center;">
|
|
49
|
-
<nobr>{{row.f_charge_remarks}}</nobr>
|
|
50
|
-
</td>
|
|
51
|
-
<td style="text-align: center;">
|
|
52
|
-
<nobr>{{row.f_charge_state}}</nobr>
|
|
53
|
-
</td>
|
|
54
|
-
<td style="text-align: center;">
|
|
55
|
-
<nobr>
|
|
56
|
-
<button
|
|
57
|
-
type="button"
|
|
58
|
-
name="button"
|
|
59
|
-
class="btn btn-link"
|
|
60
|
-
:disabled="$parent.$parent.mark === 1 || row.f_charge_state === '作废'"
|
|
61
|
-
@click="$parent.$parent.showInvalidModal(row)"
|
|
62
|
-
>作废</button>
|
|
63
|
-
<button
|
|
64
|
-
type="button"
|
|
65
|
-
name="button"
|
|
66
|
-
class="btn btn-link"
|
|
67
|
-
:disabled="$parent.$parent.mark === 1 || row.f_charge_state === '作废'"
|
|
68
|
-
@click="$parent.$parent.updateChargeModal(row)"
|
|
69
|
-
>修改</button>
|
|
70
|
-
</nobr>
|
|
71
|
-
</td>
|
|
72
|
-
</tr>
|
|
73
|
-
</template>
|
|
74
|
-
</data-grid>
|
|
75
|
-
|
|
76
|
-
<modal v-if="showCharge" :show.sync="showCharge" v-ref:modal :large="true" :backdrop="false" title="收费明细">
|
|
77
|
-
<header slot="modal-header" class="modal-header">
|
|
78
|
-
<button type="button" class="close" @click="closeModal"><span>×</span></button>
|
|
79
|
-
<h4 class="modal-title">收费明细</h4>
|
|
80
|
-
</header>
|
|
81
|
-
<article slot="modal-body" class="modal-body clearfix">
|
|
82
|
-
<div v-if="data.f_apply_type === '散户报建'" class="form-group col-sm-12 panel panel-info">
|
|
83
|
-
<div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
|
|
84
|
-
<div class="col-sm-6 text-left">增值产品信息</div>
|
|
85
|
-
</div>
|
|
86
|
-
<div class="form-group col-sm-6">
|
|
87
|
-
<label class="col-sm-4 control-label">增值产品品牌:</label>
|
|
88
|
-
<div class="col-sm-8">
|
|
89
|
-
<input-select
|
|
90
|
-
class="select select_list"
|
|
91
|
-
:value.sync="userfile.devicesinfo.f_brand"
|
|
92
|
-
v-model="userfile.devicesinfo.f_brand"
|
|
93
|
-
:options="brandList"
|
|
94
|
-
:disable="mark === 1"
|
|
95
|
-
:valueSingle="true"></input-select>
|
|
96
|
-
</div>
|
|
97
|
-
</div>
|
|
98
|
-
<div class="form-group col-sm-6">
|
|
99
|
-
<label class="col-sm-4 control-label">增值产品类型:</label>
|
|
100
|
-
<div class="col-sm-8">
|
|
101
|
-
<input-select
|
|
102
|
-
class="select select_list"
|
|
103
|
-
:value.sync="userfile.devicesinfo.f_devices_type"
|
|
104
|
-
v-model="userfile.devicesinfo.f_devices_type"
|
|
105
|
-
:options="devicesType"
|
|
106
|
-
:disable="mark === 1"
|
|
107
|
-
:valueSingle="true"></input-select>
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
<div class="form-group col-sm-6">
|
|
111
|
-
<label class="col-sm-4 control-label">增值产品数量:</label>
|
|
112
|
-
<div class="col-sm-8">
|
|
113
|
-
<input class="form-control input_view" style="" type="number"
|
|
114
|
-
placeholder="设备数量"
|
|
115
|
-
v-model="userfile.devicesinfo.f_devices_num"
|
|
116
|
-
:readonly="mark === 1"/>
|
|
117
|
-
</div>
|
|
118
|
-
</div>
|
|
119
|
-
<div class="form-group col-sm-6">
|
|
120
|
-
<label class="col-sm-4 control-label">安 装 人:</label>
|
|
121
|
-
<div class="col-sm-8">
|
|
122
|
-
<input-select
|
|
123
|
-
class="select select_list"
|
|
124
|
-
v-model="userfile.devicesinfo.f_input_person"
|
|
125
|
-
:options="personList"
|
|
126
|
-
:disable="mark === 1"
|
|
127
|
-
:value.sync = "userfile.devicesinfo.f_input_person"
|
|
128
|
-
:valueSingle="true"></input-select>
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
131
|
-
<div class="form-group col-sm-6">
|
|
132
|
-
<label class="col-sm-4 control-label">安装日期:</label>
|
|
133
|
-
<div class="col-sm-8">
|
|
134
|
-
<datepicker
|
|
135
|
-
placeholder="安装日期"
|
|
136
|
-
:value.sync="userfile.devicesinfo.f_input_date"
|
|
137
|
-
v-model="userfile.devicesinfo.f_input_date"
|
|
138
|
-
format="yyyy-MM-dd HH:mm:ss"
|
|
139
|
-
:value="userfile.devicesinfo.f_input_date"
|
|
140
|
-
:disabled="mark === 1">
|
|
141
|
-
</datepicker>
|
|
142
|
-
</div>
|
|
143
|
-
</div>
|
|
144
|
-
</div>
|
|
145
|
-
<div class="form-group col-sm-12">
|
|
146
|
-
<span>点击刷新按钮刷新应交金额、累计缴费金额、欠费金额</span>
|
|
147
|
-
<button type="button" class="btn btn-primary" @click="apply_data()" style="float: right">刷新</button>
|
|
148
|
-
</div>
|
|
149
|
-
<div class="form-group col-sm-12" :class="charge.f_payment_type ? '':'has-error'">
|
|
150
|
-
<label class="col-sm-2 control-label">付款类型:</label>
|
|
151
|
-
<div class="col-sm-10">
|
|
152
|
-
<input-select
|
|
153
|
-
v-model="charge.f_payment_type"
|
|
154
|
-
placeholder='请选择'
|
|
155
|
-
:value.sync="charge.f_payment_type"
|
|
156
|
-
:options='paymentType'
|
|
157
|
-
class="select select_list"
|
|
158
|
-
:value-single="true"
|
|
159
|
-
@keyup="changeDevice"
|
|
160
|
-
width="100%"
|
|
161
|
-
close-on-select ></input-select>
|
|
162
|
-
</div>
|
|
163
|
-
</div>
|
|
164
|
-
<div v-if="data.f_apply_type === '散户报建' && showDevice" class="form-group col-sm-12 panel panel-info">
|
|
165
|
-
<div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
|
|
166
|
-
<div class="col-sm-6 text-left">设备信息</div>
|
|
167
|
-
</div>
|
|
168
|
-
<div class="form-group col-sm-6">
|
|
169
|
-
<label class="col-sm-4 control-label">增值产品品牌:</label>
|
|
170
|
-
<div class="col-sm-8">
|
|
171
|
-
<input-select
|
|
172
|
-
class="select select_list"
|
|
173
|
-
:value.sync="userfile.devicesinfo.f_brand"
|
|
174
|
-
v-model="userfile.devicesinfo.f_brand"
|
|
175
|
-
:options="brandList"
|
|
176
|
-
:disable="mark === 1"
|
|
177
|
-
:valueSingle="true"></input-select>
|
|
178
|
-
</div>
|
|
179
|
-
</div>
|
|
180
|
-
<div class="form-group col-sm-6">
|
|
181
|
-
<label class="col-sm-4 control-label">增值产品类型:</label>
|
|
182
|
-
<div class="col-sm-8">
|
|
183
|
-
<input-select
|
|
184
|
-
class="select select_list"
|
|
185
|
-
:value.sync="userfile.devicesinfo.f_devices_type"
|
|
186
|
-
v-model="userfile.devicesinfo.f_devices_type"
|
|
187
|
-
:options="devicesType"
|
|
188
|
-
:disable="mark === 1"
|
|
189
|
-
:valueSingle="true"></input-select>
|
|
190
|
-
</div>
|
|
191
|
-
</div>
|
|
192
|
-
<div class="form-group col-sm-6">
|
|
193
|
-
<label class="col-sm-4 control-label">增值产品数量:</label>
|
|
194
|
-
<div class="col-sm-8">
|
|
195
|
-
<input class="form-control input_view" style="" type="number"
|
|
196
|
-
placeholder="设备数量"
|
|
197
|
-
v-model="userfile.devicesinfo.f_devices_num"
|
|
198
|
-
:readonly="mark === 1"/>
|
|
199
|
-
</div>
|
|
200
|
-
</div>
|
|
201
|
-
<div class="form-group col-sm-6">
|
|
202
|
-
<label class="col-sm-4 control-label">安 装 人:</label>
|
|
203
|
-
<div class="col-sm-8">
|
|
204
|
-
<input-select
|
|
205
|
-
class="select select_list"
|
|
206
|
-
v-model="userfile.devicesinfo.f_input_person"
|
|
207
|
-
:options="personList"
|
|
208
|
-
:disable="mark === 1"
|
|
209
|
-
:value.sync = "userfile.devicesinfo.f_input_person"
|
|
210
|
-
:valueSingle="true"></input-select>
|
|
211
|
-
</div>
|
|
212
|
-
</div>
|
|
213
|
-
<div class="form-group col-sm-6">
|
|
214
|
-
<label class="col-sm-4 control-label">安装日期:</label>
|
|
215
|
-
<div class="col-sm-8">
|
|
216
|
-
<datepicker
|
|
217
|
-
placeholder="安装日期"
|
|
218
|
-
:value.sync="userfile.devicesinfo.f_input_date"
|
|
219
|
-
v-model="userfile.devicesinfo.f_input_date"
|
|
220
|
-
format="yyyy-MM-dd HH:mm:ss"
|
|
221
|
-
:value="userfile.devicesinfo.f_input_date"
|
|
222
|
-
:disabled="mark === 1">
|
|
223
|
-
</datepicker>
|
|
224
|
-
</div>
|
|
225
|
-
</div>
|
|
226
|
-
</div>
|
|
227
|
-
<div class="form-group col-sm-12" :class="charge.f_charge_money ? '':'has-error'">
|
|
228
|
-
<label class="col-sm-2 control-label">收费金额:</label>
|
|
229
|
-
<div class="col-sm-10">
|
|
230
|
-
<input type="text"
|
|
231
|
-
class="form-control input_view"
|
|
232
|
-
style="width: 100%"
|
|
233
|
-
placeholder="0.00"
|
|
234
|
-
@keyup="handleInput"
|
|
235
|
-
v-model="charge.f_charge_money" />
|
|
236
|
-
</div>
|
|
237
|
-
</div>
|
|
238
|
-
<div class="form-group col-sm-12" :class="charge.f_payment_method ? '':'has-error'">
|
|
239
|
-
<label class="col-sm-2 control-label">付款方式:</label>
|
|
240
|
-
<div class="col-sm-10">
|
|
241
|
-
<input-select
|
|
242
|
-
v-model="charge.f_payment_method"
|
|
243
|
-
placeholder='请选择'
|
|
244
|
-
:value.sync="charge.f_payment_method"
|
|
245
|
-
:options='paymentMethod'
|
|
246
|
-
class="select select_list"
|
|
247
|
-
:value-single="true"
|
|
248
|
-
width="100%"
|
|
249
|
-
close-on-select ></input-select>
|
|
250
|
-
</div>
|
|
251
|
-
</div>
|
|
252
|
-
<div class="form-group col-sm-12">
|
|
253
|
-
<label class="col-sm-2 control-label">票号:</label>
|
|
254
|
-
<div class="col-sm-10">
|
|
255
|
-
<input type="text"
|
|
256
|
-
class="form-control input_view"
|
|
257
|
-
style="width: 100%"
|
|
258
|
-
placeholder="请输入"
|
|
259
|
-
v-model="charge.f_ticket_number" />
|
|
260
|
-
</div>
|
|
261
|
-
</div>
|
|
262
|
-
<div class="form-group col-sm-12" :class="charge.f_charge_date ? '':'has-error'">
|
|
263
|
-
<label class="col-sm-2 control-label">收费日期:</label>
|
|
264
|
-
<div class="col-sm-10">
|
|
265
|
-
<datepicker
|
|
266
|
-
v-model="charge.f_charge_date"
|
|
267
|
-
placeholder='请选择'
|
|
268
|
-
:value.sync="charge.f_charge_date"
|
|
269
|
-
:format="'yyyy-MM-dd HH:mm:ss'"
|
|
270
|
-
class="select select_list"
|
|
271
|
-
:value-single="true"
|
|
272
|
-
width="100%"
|
|
273
|
-
close-on-select ></datepicker>
|
|
274
|
-
</div>
|
|
275
|
-
</div>
|
|
276
|
-
<div class="form-group col-sm-12">
|
|
277
|
-
<label class="col-sm-2 control-label">金额大写:</label>
|
|
278
|
-
<div class="col-sm-10">
|
|
279
|
-
<input type="text"
|
|
280
|
-
class="form-control input_view"
|
|
281
|
-
style="width: 100%"
|
|
282
|
-
:value="smalltoBIG(0)"
|
|
283
|
-
readonly
|
|
284
|
-
v-model.sync="charge.f_amount_words" />
|
|
285
|
-
</div>
|
|
286
|
-
</div>
|
|
287
|
-
|
|
288
|
-
<div class="form-group col-sm-12">
|
|
289
|
-
<label class="col-sm-2 control-label">应交金额:</label>
|
|
290
|
-
<div class="col-sm-10">
|
|
291
|
-
<input type="number"
|
|
292
|
-
class="form-control input_view"
|
|
293
|
-
style="width: 100%"
|
|
294
|
-
readonly
|
|
295
|
-
v-model="applydata.f_due_money" />
|
|
296
|
-
</div>
|
|
297
|
-
</div>
|
|
298
|
-
<div class="form-group col-sm-12">
|
|
299
|
-
<label class="col-sm-2 control-label">累计缴费金额:</label>
|
|
300
|
-
<div class="col-sm-10">
|
|
301
|
-
<input type="number"
|
|
302
|
-
class="form-control input_view"
|
|
303
|
-
style="width: 100%"
|
|
304
|
-
readonly
|
|
305
|
-
v-model="applydata.f_cumulative_money" />
|
|
306
|
-
</div>
|
|
307
|
-
</div>
|
|
308
|
-
<div class="form-group col-sm-12">
|
|
309
|
-
<label class="col-sm-2 control-label">欠费金额:</label>
|
|
310
|
-
<div class="col-sm-10">
|
|
311
|
-
<input type="number"
|
|
312
|
-
class="form-control input_view"
|
|
313
|
-
style="width: 100%"
|
|
314
|
-
readonly
|
|
315
|
-
v-model="applydata.f_arrears_money" />
|
|
316
|
-
</div>
|
|
317
|
-
</div>
|
|
318
|
-
<div class="form-group col-sm-12">
|
|
319
|
-
<label class="col-sm-2 control-label">备注:</label>
|
|
320
|
-
<div class="col-sm-10">
|
|
321
|
-
<input type="text"
|
|
322
|
-
class="form-control input_view"
|
|
323
|
-
style="width: 100%"
|
|
324
|
-
v-model="charge.f_charge_remarks" />
|
|
325
|
-
</div>
|
|
326
|
-
</div>
|
|
327
|
-
</article>
|
|
328
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
329
|
-
<button type="button" v-if="!showupdateCharge" class="btn btn-primary" @click="saveCharge()">新增收费</button>
|
|
330
|
-
<button type="button" v-if="showupdateCharge" class="btn btn-primary" @click="updateCharge()">确认修改</button>
|
|
331
|
-
</footer>
|
|
332
|
-
</modal>
|
|
333
|
-
<modal v-if="showInvalid" :show.sync="showInvalid" v-ref:modal :large="true" :backdrop="false" title="作废收费">
|
|
334
|
-
<header slot="modal-header" class="modal-header">
|
|
335
|
-
<button type="button" class="close" @click="closeModal"><span>×</span></button>
|
|
336
|
-
<h4 class="modal-title">作废收费</h4>
|
|
337
|
-
</header>
|
|
338
|
-
<article slot="modal-body" class="modal-body clearfix">
|
|
339
|
-
<div v-for="(i, item) in model.userfile.devicesinfo" v-if="data.f_apply_type === '散户报建'" class="form-group col-sm-12 panel panel-info">
|
|
340
|
-
<div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
|
|
341
|
-
<div class="col-sm-6 text-left">增值产品信息</div>
|
|
342
|
-
</div>
|
|
343
|
-
<div class="form-group col-sm-6">
|
|
344
|
-
<label class="col-sm-4 control-label">增值产品品牌:</label>
|
|
345
|
-
<div class="col-sm-8">
|
|
346
|
-
<input-select
|
|
347
|
-
class="select select_list"
|
|
348
|
-
:value.sync="item.f_brand"
|
|
349
|
-
v-model="item.f_brand"
|
|
350
|
-
:options="brandList"
|
|
351
|
-
:disable="true"
|
|
352
|
-
:valueSingle="true"></input-select>
|
|
353
|
-
</div>
|
|
354
|
-
</div>
|
|
355
|
-
<div class="form-group col-sm-6">
|
|
356
|
-
<label class="col-sm-4 control-label">增值产品类型:</label>
|
|
357
|
-
<div class="col-sm-8">
|
|
358
|
-
<input-select
|
|
359
|
-
class="select select_list"
|
|
360
|
-
:value.sync="item.f_devices_type"
|
|
361
|
-
v-model="item.f_devices_type"
|
|
362
|
-
:options="devicesType"
|
|
363
|
-
:disable="true"
|
|
364
|
-
:valueSingle="true"></input-select>
|
|
365
|
-
</div>
|
|
366
|
-
</div>
|
|
367
|
-
<div class="form-group col-sm-6">
|
|
368
|
-
<label class="col-sm-4 control-label">增值产品数量:</label>
|
|
369
|
-
<div class="col-sm-8">
|
|
370
|
-
<input class="form-control input_view" style="" type="number"
|
|
371
|
-
placeholder="增值产品数量"
|
|
372
|
-
v-model="item.f_devices_num"
|
|
373
|
-
:value="item.f_devices_num"
|
|
374
|
-
readonly/>
|
|
375
|
-
</div>
|
|
376
|
-
</div>
|
|
377
|
-
<div class="form-group col-sm-6">
|
|
378
|
-
<label class="col-sm-4 control-label">安 装 人:</label>
|
|
379
|
-
<div class="col-sm-8">
|
|
380
|
-
<input-select
|
|
381
|
-
class="select select_list"
|
|
382
|
-
v-model="item.f_input_person"
|
|
383
|
-
:options="personList"
|
|
384
|
-
:disable="true"
|
|
385
|
-
:value.sync = "item.f_input_person"
|
|
386
|
-
:valueSingle="true"></input-select>
|
|
387
|
-
</div>
|
|
388
|
-
</div>
|
|
389
|
-
<div class="form-group col-sm-6">
|
|
390
|
-
<label class="col-sm-4 control-label">安装日期:</label>
|
|
391
|
-
<div class="col-sm-8">
|
|
392
|
-
<datepicker
|
|
393
|
-
placeholder="安装日期"
|
|
394
|
-
:value.sync="item.f_input_date"
|
|
395
|
-
v-model="item.f_input_date"
|
|
396
|
-
format="yyyy-MM-dd HH:mm:ss"
|
|
397
|
-
:value="item.f_input_date"
|
|
398
|
-
:disabled="true">
|
|
399
|
-
</datepicker>
|
|
400
|
-
</div>
|
|
401
|
-
</div>
|
|
402
|
-
</div>
|
|
403
|
-
<!-- <div class="form-group col-sm-12">-->
|
|
404
|
-
<!-- <label class="col-sm-2 control-label">缴费地址:</label>-->
|
|
405
|
-
<!-- <div class="col-sm-10">-->
|
|
406
|
-
<!-- <input type="text"-->
|
|
407
|
-
<!-- class="form-control input_view"-->
|
|
408
|
-
<!-- style="width: 100%"-->
|
|
409
|
-
<!-- readonly-->
|
|
410
|
-
<!-- v-model="charge.f_useraddres" />-->
|
|
411
|
-
<!-- </div>-->
|
|
412
|
-
<!-- </div>-->
|
|
413
|
-
<div class="form-group col-sm-12">
|
|
414
|
-
<label class="col-sm-2 control-label">付款类型:</label>
|
|
415
|
-
<div class="col-sm-10">
|
|
416
|
-
<input
|
|
417
|
-
type="text"
|
|
418
|
-
v-model="charge.f_payment_type"
|
|
419
|
-
class="form-control input_view"
|
|
420
|
-
style="width: 100%"
|
|
421
|
-
readonly/>
|
|
422
|
-
</div>
|
|
423
|
-
</div>
|
|
424
|
-
<div class="form-group col-sm-12">
|
|
425
|
-
<label class="col-sm-2 control-label">收费金额:</label>
|
|
426
|
-
<div class="col-sm-10">
|
|
427
|
-
<input type="text"
|
|
428
|
-
class="form-control input_view"
|
|
429
|
-
style="width: 100%"
|
|
430
|
-
readonly
|
|
431
|
-
v-model="charge.f_charge_money" />
|
|
432
|
-
</div>
|
|
433
|
-
</div>
|
|
434
|
-
<div class="form-group col-sm-12">
|
|
435
|
-
<label class="col-sm-2 control-label">付款方式:</label>
|
|
436
|
-
<div class="col-sm-10">
|
|
437
|
-
<input type="text"
|
|
438
|
-
class="form-control input_view"
|
|
439
|
-
style="width: 100%"
|
|
440
|
-
readonly
|
|
441
|
-
v-model="charge.f_payment_method" />
|
|
442
|
-
</div>
|
|
443
|
-
</div>
|
|
444
|
-
<div class="form-group col-sm-12">
|
|
445
|
-
<label class="col-sm-2 control-label">金额大写:</label>
|
|
446
|
-
<div class="col-sm-10">
|
|
447
|
-
<input type="text"
|
|
448
|
-
class="form-control input_view"
|
|
449
|
-
style="width: 100%"
|
|
450
|
-
readonly
|
|
451
|
-
v-model="charge.f_amount_words" />
|
|
452
|
-
</div>
|
|
453
|
-
</div>
|
|
454
|
-
<div class="form-group col-sm-12">
|
|
455
|
-
<label class="col-sm-2 control-label">收费人员:</label>
|
|
456
|
-
<div class="col-sm-10">
|
|
457
|
-
<input type="text"
|
|
458
|
-
class="form-control input_view"
|
|
459
|
-
style="width: 100%"
|
|
460
|
-
readonly
|
|
461
|
-
v-model="charge.f_operator" />
|
|
462
|
-
</div>
|
|
463
|
-
</div>
|
|
464
|
-
<div class="form-group col-sm-12" :class="charge.f_void_remarks ? '':'has-error'">
|
|
465
|
-
<label class="col-sm-2 control-label">作废原因:</label>
|
|
466
|
-
<div class="col-sm-10">
|
|
467
|
-
<input type="text"
|
|
468
|
-
class="form-control input_view"
|
|
469
|
-
style="width: 100%"
|
|
470
|
-
v-model="charge.f_void_remarks" />
|
|
471
|
-
</div>
|
|
472
|
-
</div>
|
|
473
|
-
</article>
|
|
474
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
475
|
-
<button type="button" class="btn btn-primary" :disabled="!charge.f_void_remarks" @click="invalidApplyCharge()">确认作废</button>
|
|
476
|
-
</footer>
|
|
477
|
-
</modal>
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
</div>
|
|
481
|
-
</template>
|
|
482
|
-
<script>
|
|
483
|
-
import {getNowDate,isEmpty} from '../../../Util'
|
|
484
|
-
import {PagedList} from 'vue-client'
|
|
485
|
-
import {HttpResetClass} from 'vue-client'
|
|
486
|
-
import Vue from 'vue'
|
|
487
|
-
|
|
488
|
-
export default {
|
|
489
|
-
title: '收费管理',
|
|
490
|
-
props: {
|
|
491
|
-
selectdata: {
|
|
492
|
-
type: Object
|
|
493
|
-
},
|
|
494
|
-
data: {
|
|
495
|
-
type: Object
|
|
496
|
-
},
|
|
497
|
-
mark: {
|
|
498
|
-
type: Number,
|
|
499
|
-
default: 0
|
|
500
|
-
}
|
|
501
|
-
},
|
|
502
|
-
data () {
|
|
503
|
-
return {
|
|
504
|
-
showCharge: false,
|
|
505
|
-
showInvalid: false,
|
|
506
|
-
model: {
|
|
507
|
-
data: null,
|
|
508
|
-
userfile: null
|
|
509
|
-
},
|
|
510
|
-
charge: {
|
|
511
|
-
|
|
512
|
-
},
|
|
513
|
-
applydata: {
|
|
514
|
-
f_due_money: 0.00,
|
|
515
|
-
f_cumulative_money: 0.00,
|
|
516
|
-
f_arrears_money: 0.00
|
|
517
|
-
},
|
|
518
|
-
useraddressList: [],
|
|
519
|
-
chargeUseraddress: null,
|
|
520
|
-
userfile: {
|
|
521
|
-
devicesinfo: null
|
|
522
|
-
},
|
|
523
|
-
personList: [],
|
|
524
|
-
showupdateCharge: false
|
|
525
|
-
}
|
|
526
|
-
},
|
|
527
|
-
ready () {
|
|
528
|
-
this.installPerson()
|
|
529
|
-
this.search()
|
|
530
|
-
// 获取数据
|
|
531
|
-
this.apply_data()
|
|
532
|
-
},
|
|
533
|
-
methods: {
|
|
534
|
-
changeUseraddress() {
|
|
535
|
-
this.charge.f_useraddress_id = this.chargeUseraddress.id
|
|
536
|
-
},
|
|
537
|
-
async invalidApplyCharge() {
|
|
538
|
-
if (this.charge.f_void_remarks.length < 0) {
|
|
539
|
-
this.$showAlert('请输入作废本次收费原因!!!', 'warning', 3000)
|
|
540
|
-
return
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
let http = new HttpResetClass()
|
|
544
|
-
let data = {
|
|
545
|
-
apply: this.data,
|
|
546
|
-
user: this.$login.f,
|
|
547
|
-
charge: this.charge
|
|
548
|
-
}
|
|
549
|
-
console.log("发送的数据:" + JSON.stringify(data))
|
|
550
|
-
try {
|
|
551
|
-
let res = await http.load('POST', 'rs/logic/invalidApplyCharge', {data:data}, {
|
|
552
|
-
resolveMsg: null,
|
|
553
|
-
rejectMsg: null
|
|
554
|
-
})
|
|
555
|
-
this.selectdata = res.data
|
|
556
|
-
} catch (e) {
|
|
557
|
-
this.$showAlert(e.data, 'danger', 3000)
|
|
558
|
-
}
|
|
559
|
-
if (this.data.f_apply_type === '散户报建'){
|
|
560
|
-
this.deleteDevice(this.charge)
|
|
561
|
-
this.refund_data(this.charge)
|
|
562
|
-
}
|
|
563
|
-
this.closeModal()
|
|
564
|
-
this.search()
|
|
565
|
-
},
|
|
566
|
-
showInvalidModal(row) {
|
|
567
|
-
this.charge = row
|
|
568
|
-
if (this.data.f_apply_type === '散户报建'){
|
|
569
|
-
this.openDevicesModal(row)
|
|
570
|
-
}
|
|
571
|
-
this.showInvalid = true
|
|
572
|
-
},
|
|
573
|
-
handleInput(e) {
|
|
574
|
-
// 通过正则过滤小数点后两位
|
|
575
|
-
e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
|
|
576
|
-
this.charge.f_amount_words = this.smalltoBIG(e.target.value)
|
|
577
|
-
},
|
|
578
|
-
async updateChargeModal(row) {
|
|
579
|
-
|
|
580
|
-
this.charge = row
|
|
581
|
-
if (this.data.f_apply_type === '散户报建'){
|
|
582
|
-
await this.openDevicesModal(row)
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
this.showupdateCharge = true
|
|
586
|
-
this.showCharge = true
|
|
587
|
-
},
|
|
588
|
-
async updateCharge() {
|
|
589
|
-
if(this.data.f_apply_type === '散户报建'){
|
|
590
|
-
for (let i = 0; i < this.data.fields.length; i++) {
|
|
591
|
-
if (this.data.fields[i].label === '应交金额') {
|
|
592
|
-
this.data.f_due_money = this.data.fields[i].value
|
|
593
|
-
}
|
|
594
|
-
if (this.data.fields[i].label === '合同价格') {
|
|
595
|
-
this.data.f_contract_money = this.data.fields[i].value
|
|
596
|
-
console.log("合同金额",this.data.f_contract_money)
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
let data = {
|
|
601
|
-
charge: this.charge,
|
|
602
|
-
selectdata: this.data
|
|
603
|
-
}
|
|
604
|
-
console.log()
|
|
605
|
-
if (this.data.f_apply_type === '散户报建' && this.userfile.devicesinfo !== null){
|
|
606
|
-
|
|
607
|
-
data.userfile = this.userfile
|
|
608
|
-
data.user = this.$login.f
|
|
609
|
-
data.userfile.devicesinfo.f_ticket_number = this.charge.f_ticket_number
|
|
610
|
-
}
|
|
611
|
-
let res = await this.$resetpost(
|
|
612
|
-
`rs/logic/updateCharge`,
|
|
613
|
-
data
|
|
614
|
-
)
|
|
615
|
-
this.showCharge = false
|
|
616
|
-
this.showupdateCharge = false
|
|
617
|
-
this.charge = {}
|
|
618
|
-
|
|
619
|
-
this.$dispatch('breakControl', res.data)
|
|
620
|
-
},
|
|
621
|
-
async saveCharge() {
|
|
622
|
-
this.apply_data()
|
|
623
|
-
// if (isEmpty(this.charge.f_useraddress_id) && this.selectdata.f_apply_type !== '开发商集体报建') {
|
|
624
|
-
// this.$showAlert('请选择缴费的地址信息!!!', 'warning', 3000)
|
|
625
|
-
// return
|
|
626
|
-
// }
|
|
627
|
-
if (Number(this.charge.f_charge_money) === 0 || this.charge.f_charge_money === undefined || this.charge.f_charge_money === null) {
|
|
628
|
-
this.$showAlert('单笔收费不能为0元!!!', 'warning', 3000)
|
|
629
|
-
return
|
|
630
|
-
}
|
|
631
|
-
if ((Number(this.charge.f_charge_money) > Number(this.applydata.f_arrears_money)) && this.mark !== 2) {
|
|
632
|
-
this.$showAlert('单笔收费不能超过未交总金额!!!', 'warning', 3000)
|
|
633
|
-
return
|
|
634
|
-
}
|
|
635
|
-
// if (this.selectdata.f_apply_type === '散户集体报建') {
|
|
636
|
-
// if (Number(this.charge.f_charge_money) > Number(this.selectdata.f_price)) {
|
|
637
|
-
// this.$showAlert('单笔收费不能超过单价!!!', 'warning', 3000)
|
|
638
|
-
// return
|
|
639
|
-
// }
|
|
640
|
-
// if (Number(this.charge.f_charge_money) > Number(this.outstandingAmount)) {
|
|
641
|
-
// this.$showAlert('单笔收费不能超过当前用户未结金额!!!', 'warning', 3000)
|
|
642
|
-
// return
|
|
643
|
-
// }
|
|
644
|
-
// }
|
|
645
|
-
if (this.charge.f_payment_method.length < 0) {
|
|
646
|
-
this.$showAlert('请选择付款方式!!!', 'warning', 3000)
|
|
647
|
-
return
|
|
648
|
-
}
|
|
649
|
-
let http = new HttpResetClass()
|
|
650
|
-
let data = {
|
|
651
|
-
selectdata: this.data,
|
|
652
|
-
tablename: 't_charge_record',
|
|
653
|
-
parameters : {
|
|
654
|
-
f_charge_money: this.charge.f_charge_money,
|
|
655
|
-
f_charge_date: this.charge.f_charge_date,
|
|
656
|
-
f_payment_type: this.charge.f_payment_type,
|
|
657
|
-
f_charge_state: '有效',
|
|
658
|
-
f_amount_words: this.charge.f_amount_words,
|
|
659
|
-
f_payment_method: this.charge.f_payment_method,
|
|
660
|
-
f_charge_remarks: this.charge.f_charge_remarks,
|
|
661
|
-
f_ticket_number: this.charge.f_ticket_number,
|
|
662
|
-
f_operator: this.$login.f.name,
|
|
663
|
-
f_operation_date: new Date().Format("yyyy-MM-dd HH:mm:ss"),
|
|
664
|
-
f_company: this.$login.f.orgs,
|
|
665
|
-
f_process_id: this.data.f_process_id
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
if (this.data.f_apply_type === '散户报建' && this.userfile.devicesinfo !== null){
|
|
669
|
-
data.userfile = this.userfile
|
|
670
|
-
data.user = this.$login.f
|
|
671
|
-
data.userfile.devicesinfo.f_ticket_number = this.charge.f_ticket_number
|
|
672
|
-
}
|
|
673
|
-
console.log("开始收费:" + JSON.stringify(data))
|
|
674
|
-
let res
|
|
675
|
-
|
|
676
|
-
res = await http.load('POST', 'rs/logic/addCharge', {data: data}, {
|
|
677
|
-
resolveMsg: null,
|
|
678
|
-
rejectMsg: null
|
|
679
|
-
})
|
|
680
|
-
|
|
681
|
-
if (this.data.f_apply_type === '散户报建' && this.userfile.devicesinfo){
|
|
682
|
-
// this.addDevice()
|
|
683
|
-
}
|
|
684
|
-
this.showCharge = false
|
|
685
|
-
this.charge.f_charge_money = 0
|
|
686
|
-
this.charge.f_amount_words = ''
|
|
687
|
-
this.charge.f_payment_method = ''
|
|
688
|
-
this.charge.f_charge_remarks = ''
|
|
689
|
-
this.charge.f_charge_date = ''
|
|
690
|
-
this.charge.f_ticket_number = ''
|
|
691
|
-
this.$dispatch('breakControl', res.data)
|
|
692
|
-
},
|
|
693
|
-
// 金额转大写
|
|
694
|
-
smalltoBIG(n) {
|
|
695
|
-
let fraction = ['角', '分'];
|
|
696
|
-
let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
697
|
-
let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
|
|
698
|
-
let head = n < 0 ? '欠' : '';
|
|
699
|
-
n = Math.abs(n);
|
|
700
|
-
|
|
701
|
-
let s = '';
|
|
702
|
-
|
|
703
|
-
for (var i = 0; i < fraction.length; i++) {
|
|
704
|
-
s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
|
|
705
|
-
}
|
|
706
|
-
s = s || '整';
|
|
707
|
-
n = Math.floor(n);
|
|
708
|
-
|
|
709
|
-
for (var i = 0; i < unit[0].length && n > 0; i++) {
|
|
710
|
-
let p = '';
|
|
711
|
-
for (var j = 0; j < unit[1].length && n > 0; j++) {
|
|
712
|
-
p = digit[n % 10] + unit[1][j] + p;
|
|
713
|
-
n = Math.floor(n / 10);
|
|
714
|
-
}
|
|
715
|
-
s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
|
|
716
|
-
}
|
|
717
|
-
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
|
|
718
|
-
},
|
|
719
|
-
async getUserAddress() {
|
|
720
|
-
let http = new HttpResetClass()
|
|
721
|
-
let data = {
|
|
722
|
-
condition: '1=1',
|
|
723
|
-
f_process_id: this.selectdata.f_process_id
|
|
724
|
-
}
|
|
725
|
-
let res = await http.load('POST', 'rs/sql/getAddresAndCumulativePayment', {data:data}, {
|
|
726
|
-
resolveMsg: null,
|
|
727
|
-
rejectMsg: null
|
|
728
|
-
})
|
|
729
|
-
|
|
730
|
-
this.useraddressList = res.data
|
|
731
|
-
if (this.selectdata.f_apply_type === '散户集体报建') {
|
|
732
|
-
// 去除累计缴费金额大于等于单价的用户地址
|
|
733
|
-
this.useraddressList = res.data.filter(item => {
|
|
734
|
-
let f_cumulative_payment_money = isEmpty(item.f_cumulative_payment_money) ? 0 : item.f_cumulative_payment_money
|
|
735
|
-
return Number(f_cumulative_payment_money) < Number(isEmpty(this.selectdata.f_price) ? 0 : this.selectdata.f_price)
|
|
736
|
-
})
|
|
737
|
-
}
|
|
738
|
-
|
|
739
|
-
if (this.useraddressList.length > 0) {
|
|
740
|
-
this.useraddressList = this.useraddressList.map(item => {
|
|
741
|
-
return {
|
|
742
|
-
// 有用户姓名地址后拼接姓名
|
|
743
|
-
label: `${item.f_address} ${isEmpty(item.f_user_name) ? '' : '--- ' + item.f_user_name}`,
|
|
744
|
-
value: item
|
|
745
|
-
}
|
|
746
|
-
})
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
},
|
|
750
|
-
async showChargeModal() {
|
|
751
|
-
// this.getUserAddress()
|
|
752
|
-
|
|
753
|
-
this.showCharge = true
|
|
754
|
-
},
|
|
755
|
-
async search () {
|
|
756
|
-
let http = new HttpResetClass()
|
|
757
|
-
let data = {
|
|
758
|
-
tablename: 't_charge_record',
|
|
759
|
-
condition: "f_process_id = '" + this.data.f_process_id + "'"
|
|
760
|
-
}
|
|
761
|
-
let res = await http.load('POST', 'rs/sql/applysingleTable', {data:data}, {
|
|
762
|
-
resolveMsg: null,
|
|
763
|
-
rejectMsg: null
|
|
764
|
-
})
|
|
765
|
-
this.model.data = res.data
|
|
766
|
-
if (this.data.f_apply_type === '散户报建') {
|
|
767
|
-
data = {
|
|
768
|
-
f_process_id: this.data.f_process_id,
|
|
769
|
-
condition: `f_userinfo_id = '${this.data.f_userinfo_id}'`
|
|
770
|
-
}
|
|
771
|
-
res = await http.load('POST', 'rs/sql/getUserFilesAndDevicesAmount', {data: data}, {
|
|
772
|
-
resolveMsg: null,
|
|
773
|
-
rejectMsg: '获取设备失败!!!'
|
|
774
|
-
})
|
|
775
|
-
this.model.userfile = res.data
|
|
776
|
-
}
|
|
777
|
-
},
|
|
778
|
-
async apply_data () {
|
|
779
|
-
for (let i = 0; i < this.data.fields.length; i++) {
|
|
780
|
-
if(this.data.f_apply_type === '散户报建') {
|
|
781
|
-
if (this.data.fields[i].label === '合同价格') {
|
|
782
|
-
this.data.f_contract_money = this.data.fields[i].value
|
|
783
|
-
}
|
|
784
|
-
if (this.data.fields[i].label === '应交金额') {
|
|
785
|
-
this.data.f_due_money = this.data.fields[i].value
|
|
786
|
-
}
|
|
787
|
-
}
|
|
788
|
-
if (this.data.fields[i].label == '应交金额') {
|
|
789
|
-
this.applydata.f_due_money = this.data.fields[i].value
|
|
790
|
-
console.log("应交金额:" + this.data.fields[i].value)
|
|
791
|
-
}
|
|
792
|
-
if (this.data.fields[i].label == '累计缴费金额') {
|
|
793
|
-
this.applydata.f_cumulative_money = this.data.fields[i].value
|
|
794
|
-
}
|
|
795
|
-
if (this.data.fields[i].label == '欠费金额') {
|
|
796
|
-
this.applydata.f_arrears_money = this.data.fields[i].value
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
// let http = new HttpResetClass()
|
|
800
|
-
// let data = {
|
|
801
|
-
// tablename: 't_apply',
|
|
802
|
-
// condition: "f_process_id = '" + this.data.f_process_id + "'"
|
|
803
|
-
// }
|
|
804
|
-
// let res = await http.load('POST', 'rs/sql/applysingleTable', {data:data}, {
|
|
805
|
-
// resolveMsg: null,
|
|
806
|
-
// rejectMsg: null
|
|
807
|
-
// })
|
|
808
|
-
// this.applydata = res.data
|
|
809
|
-
},
|
|
810
|
-
// 更新欠费金额和累计缴费金额
|
|
811
|
-
async update_data () {
|
|
812
|
-
for (let i = 0; i < this.data.fields.length; i++) {
|
|
813
|
-
if (this.data.fields[i].label == '累计缴费金额') {
|
|
814
|
-
this.data.fields[i].value = Number(this.data.f_cumulative_money) + Number(this.charge.f_charge_money)
|
|
815
|
-
this.data.f_cumulative_money = Number(this.data.f_cumulative_money) + Number(this.charge.f_charge_money)
|
|
816
|
-
}
|
|
817
|
-
if (this.data.fields[i].label == '欠费金额') {
|
|
818
|
-
this.data.fields[i].value = Number(this.data.f_arrears_money) - Number(this.charge.f_charge_money)
|
|
819
|
-
this.data.f_arrears_money = Number(this.data.f_arrears_money) - Number(this.charge.f_charge_money)
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
if (this.data.f_apply_type === '散户报建'){
|
|
823
|
-
let http = new HttpResetClass()
|
|
824
|
-
let data = {
|
|
825
|
-
tablename: 't_apply',
|
|
826
|
-
parameters : this.data
|
|
827
|
-
}
|
|
828
|
-
console.log("datasasda",data)
|
|
829
|
-
let res = await http.load('POST', 'rs/logic/currencySaveUpdate', {data: data}, {
|
|
830
|
-
resolveMsg: null,
|
|
831
|
-
rejectMsg: null
|
|
832
|
-
})
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
},
|
|
836
|
-
// 更新欠费金额和累计缴费金额
|
|
837
|
-
async refund_data (row) {
|
|
838
|
-
for (let i = 0; i < this.data.fields.length; i++) {
|
|
839
|
-
if (this.data.fields[i].label == '累计缴费金额') {
|
|
840
|
-
this.data.fields[i].value = Number(this.data.f_cumulative_money) - Number(row.f_charge_money)
|
|
841
|
-
this.data.f_cumulative_money = this.data.fields[i].value
|
|
842
|
-
}
|
|
843
|
-
if (this.data.fields[i].label == '欠费金额') {
|
|
844
|
-
this.data.fields[i].value = Number(this.data.f_arrears_money) + Number(row.f_charge_money)
|
|
845
|
-
this.data.f_arrears_money = this.data.fields[i].value
|
|
846
|
-
}
|
|
847
|
-
}
|
|
848
|
-
},
|
|
849
|
-
async openDevicesModal (row) {
|
|
850
|
-
let data = {
|
|
851
|
-
tablename: 't_devices',
|
|
852
|
-
condition: `f_process_id = '${this.data.f_process_id}' and f_charge_id = '${row.id}' and f_devices_state = '有效'`
|
|
853
|
-
}
|
|
854
|
-
let res = await this.$resetpost(
|
|
855
|
-
`rs/sql/singleTable`,
|
|
856
|
-
{data: data},
|
|
857
|
-
{resolveMsg: null, rejectMsg: '设备查询失败!!!'}
|
|
858
|
-
)
|
|
859
|
-
|
|
860
|
-
if (res.data.length > 0){
|
|
861
|
-
Vue.set(this.model.userfile, 'devicesinfo', res.data)
|
|
862
|
-
Vue.set(this.userfile, 'devicesinfo', res.data[0])
|
|
863
|
-
console.log("设备信息",this.model.userfile.devicesinfo)
|
|
864
|
-
console.log("设备信息",this.userfile.devicesinfo)
|
|
865
|
-
}
|
|
866
|
-
},
|
|
867
|
-
async addDevice () {
|
|
868
|
-
let data = {
|
|
869
|
-
selectdata: this.data,
|
|
870
|
-
userfile: this.userfile,
|
|
871
|
-
user: this.$login.f
|
|
872
|
-
}
|
|
873
|
-
data.userfile.devicesinfo.f_ticket_number = this.charge.f_ticket_number
|
|
874
|
-
console.log("添加设备",data.userfile.devicesinfo)
|
|
875
|
-
let res = await this.$resetpost(
|
|
876
|
-
`rs/logic/applyAddDevice`,
|
|
877
|
-
{data: data},
|
|
878
|
-
{resolveMsg: null, rejectMsg: '设备添加失败!!!'}
|
|
879
|
-
)
|
|
880
|
-
},
|
|
881
|
-
async deleteDevice (row) {
|
|
882
|
-
let data = {
|
|
883
|
-
f_process_id: this.data.f_process_id,
|
|
884
|
-
f_charge_id: row.id,
|
|
885
|
-
user: this.$login.f
|
|
886
|
-
}
|
|
887
|
-
let res = await this.$resetpost(
|
|
888
|
-
`rs/logic/applydeleteDevice`,
|
|
889
|
-
{data: data},
|
|
890
|
-
{resolveMsg: null, rejectMsg: '设备作废失败!!!'}
|
|
891
|
-
)
|
|
892
|
-
},
|
|
893
|
-
// 关闭对话框
|
|
894
|
-
closeModal() {
|
|
895
|
-
this.showCharge = false
|
|
896
|
-
this.showInvalid = false
|
|
897
|
-
this.showupdateCharge = false
|
|
898
|
-
if (this.data.f_apply_type === '散户报建') {
|
|
899
|
-
this.model.userfile = null
|
|
900
|
-
}
|
|
901
|
-
this.charge = {}
|
|
902
|
-
this.userfile.devicesinfo = null
|
|
903
|
-
this.chargeUseraddress = null
|
|
904
|
-
this.search()
|
|
905
|
-
},
|
|
906
|
-
// 安装人
|
|
907
|
-
async installPerson() {
|
|
908
|
-
// return function (f_install_person) {
|
|
909
|
-
// if (isEmpty(f_install_person)) {
|
|
910
|
-
// return this.$login.f.name
|
|
911
|
-
// }
|
|
912
|
-
// return f_install_person
|
|
913
|
-
// }
|
|
914
|
-
console.log("当前数据",this.data)
|
|
915
|
-
console.log("当前数据",this.selectdata)
|
|
916
|
-
if (!this.data){
|
|
917
|
-
this.data = this.selectdata
|
|
918
|
-
}
|
|
919
|
-
let data = {
|
|
920
|
-
source: 'this.getParentByType($organization$).getChildByName($工程部负责人$).getChildren()',
|
|
921
|
-
userid: this.$login.f.id
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
let http = new HttpResetClass()
|
|
925
|
-
let res = await http.load(
|
|
926
|
-
'POST',
|
|
927
|
-
`rs/search`,
|
|
928
|
-
{data: data},
|
|
929
|
-
{resolveMsg: null, rejectMsg: '人员查询失败!!!'}
|
|
930
|
-
)
|
|
931
|
-
|
|
932
|
-
this.personList = res.data.map(item => {
|
|
933
|
-
return {
|
|
934
|
-
label: item.name,
|
|
935
|
-
value: item.name
|
|
936
|
-
}
|
|
937
|
-
})
|
|
938
|
-
},
|
|
939
|
-
expireDate (index) {
|
|
940
|
-
|
|
941
|
-
if (isEmpty(this.userfile.devicesinfo[index].f_make_date) || isEmpty(this.userfile.devicesinfo[index].f_service_life)) {
|
|
942
|
-
return
|
|
943
|
-
}
|
|
944
|
-
let f_make_date = new Date(this.userfile.devicesinfo[index].f_make_date)
|
|
945
|
-
let year = (f_make_date.getFullYear() - 0) + (this.userfile.devicesinfo[index].f_service_life - 0)
|
|
946
|
-
let month = (f_make_date.getMonth() - 0) + 1
|
|
947
|
-
let day = f_make_date.getDate()
|
|
948
|
-
|
|
949
|
-
Vue.set(this.userfile.devicesinfo[index], 'f_expire_date', year + '-' + (month < 10 ? '0' + month : month) + '-' + (day < 10 ? '0' + day : day))
|
|
950
|
-
}
|
|
951
|
-
},
|
|
952
|
-
events: {
|
|
953
|
-
},
|
|
954
|
-
computed: {
|
|
955
|
-
paymentMethod() {
|
|
956
|
-
return this.$appdata.getParam("付款方式")
|
|
957
|
-
},
|
|
958
|
-
paymentType() {
|
|
959
|
-
return this.$appdata.getParam("报建收费类型")
|
|
960
|
-
},
|
|
961
|
-
cumulativePaymentMoney() {
|
|
962
|
-
return isEmpty(this.chargeUseraddress.f_cumulative_payment_money) ? 0 : this.chargeUseraddress.f_cumulative_payment_money
|
|
963
|
-
},
|
|
964
|
-
outstandingAmount() {
|
|
965
|
-
return this.selectdata.f_price - this.cumulativePaymentMoney
|
|
966
|
-
},
|
|
967
|
-
// 安装人
|
|
968
|
-
installperson(f_input_person) {
|
|
969
|
-
return function (f_input_person) {
|
|
970
|
-
if (isEmpty(f_input_person)) {
|
|
971
|
-
return this.$login.f.name
|
|
972
|
-
}
|
|
973
|
-
return f_input_person
|
|
974
|
-
}
|
|
975
|
-
},
|
|
976
|
-
installdate(f_install_date) {
|
|
977
|
-
return function (f_install_date) {
|
|
978
|
-
if (isEmpty(f_install_date)) {
|
|
979
|
-
return new Date().Format('yyyy-MM-dd HH:mm:ss')
|
|
980
|
-
}
|
|
981
|
-
return f_install_date
|
|
982
|
-
}
|
|
983
|
-
},
|
|
984
|
-
installType() {
|
|
985
|
-
return this.$appdata.getParam("安装方式")
|
|
986
|
-
},
|
|
987
|
-
pipeType() {
|
|
988
|
-
return this.$appdata.getParam("管道类型")
|
|
989
|
-
},
|
|
990
|
-
devicesType() {
|
|
991
|
-
return this.$appdata.getParam("设备类型")
|
|
992
|
-
},
|
|
993
|
-
brandList() {
|
|
994
|
-
return this.$appdata.getParam("设备品牌")
|
|
995
|
-
}
|
|
996
|
-
},
|
|
997
|
-
watch: {
|
|
998
|
-
}
|
|
999
|
-
}
|
|
1000
|
-
</script>
|
|
1001
|
-
<style scoped>
|
|
1002
|
-
.textNoLineBreak {
|
|
1003
|
-
white-space: nowrap;
|
|
1004
|
-
}
|
|
1005
|
-
.head-but{
|
|
1006
|
-
margin-left: 5px;
|
|
1007
|
-
height: 34px;
|
|
1008
|
-
/*background-color: #6aa6e2;*/
|
|
1009
|
-
border-radius: 4px;
|
|
1010
|
-
font-family: PingFang;
|
|
1011
|
-
color: #ffffff;
|
|
1012
|
-
}
|
|
1013
|
-
</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">缴费状态</th>
|
|
15
|
+
<th class="textNoLineBreak">
|
|
16
|
+
<button
|
|
17
|
+
type="button"
|
|
18
|
+
class="btn btn-info head-but"
|
|
19
|
+
@click="$parent.$parent.showChargeModal()"
|
|
20
|
+
:disabled="$parent.$parent.mark === 1 || ($parent.$parent.selectdata.f_cumulative_payment_money >= $parent.$parent.selectdata.f_due_money || $parent.$parent.selectdata.f_surplus_money === 0)"
|
|
21
|
+
>新增收费</button>
|
|
22
|
+
</th>
|
|
23
|
+
</tr>
|
|
24
|
+
</template>
|
|
25
|
+
<template partial='body'>
|
|
26
|
+
<tr>
|
|
27
|
+
<td style="text-align: center;">
|
|
28
|
+
<nobr>{{$index+1}}</nobr>
|
|
29
|
+
</td>
|
|
30
|
+
<td style="text-align: center;">
|
|
31
|
+
<nobr>{{row.f_charge_money}}</nobr>
|
|
32
|
+
</td>
|
|
33
|
+
<td style="text-align: center;">
|
|
34
|
+
<nobr>{{row.f_amount_words}}</nobr>
|
|
35
|
+
</td>
|
|
36
|
+
<td style="text-align: center;">
|
|
37
|
+
<nobr>{{row.f_payment_method}}</nobr>
|
|
38
|
+
</td>
|
|
39
|
+
<td style="text-align: center;">
|
|
40
|
+
<nobr>{{row.f_ticket_number}}</nobr>
|
|
41
|
+
</td>
|
|
42
|
+
<td style="text-align: center;">
|
|
43
|
+
<nobr>{{row.f_operator}}</nobr>
|
|
44
|
+
</td>
|
|
45
|
+
<td style="text-align: center;">
|
|
46
|
+
<nobr>{{row.f_charge_date}}</nobr>
|
|
47
|
+
</td>
|
|
48
|
+
<td style="text-align: center;">
|
|
49
|
+
<nobr>{{row.f_charge_remarks}}</nobr>
|
|
50
|
+
</td>
|
|
51
|
+
<td style="text-align: center;">
|
|
52
|
+
<nobr>{{row.f_charge_state}}</nobr>
|
|
53
|
+
</td>
|
|
54
|
+
<td style="text-align: center;">
|
|
55
|
+
<nobr>
|
|
56
|
+
<button
|
|
57
|
+
type="button"
|
|
58
|
+
name="button"
|
|
59
|
+
class="btn btn-link"
|
|
60
|
+
:disabled="$parent.$parent.mark === 1 || row.f_charge_state === '作废'"
|
|
61
|
+
@click="$parent.$parent.showInvalidModal(row)"
|
|
62
|
+
>作废</button>
|
|
63
|
+
<button
|
|
64
|
+
type="button"
|
|
65
|
+
name="button"
|
|
66
|
+
class="btn btn-link"
|
|
67
|
+
:disabled="$parent.$parent.mark === 1 || row.f_charge_state === '作废'"
|
|
68
|
+
@click="$parent.$parent.updateChargeModal(row)"
|
|
69
|
+
>修改</button>
|
|
70
|
+
</nobr>
|
|
71
|
+
</td>
|
|
72
|
+
</tr>
|
|
73
|
+
</template>
|
|
74
|
+
</data-grid>
|
|
75
|
+
|
|
76
|
+
<modal v-if="showCharge" :show.sync="showCharge" v-ref:modal :large="true" :backdrop="false" title="收费明细">
|
|
77
|
+
<header slot="modal-header" class="modal-header">
|
|
78
|
+
<button type="button" class="close" @click="closeModal"><span>×</span></button>
|
|
79
|
+
<h4 class="modal-title">收费明细</h4>
|
|
80
|
+
</header>
|
|
81
|
+
<article slot="modal-body" class="modal-body clearfix">
|
|
82
|
+
<div v-if="data.f_apply_type === '散户报建'" class="form-group col-sm-12 panel panel-info">
|
|
83
|
+
<div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
|
|
84
|
+
<div class="col-sm-6 text-left">增值产品信息</div>
|
|
85
|
+
</div>
|
|
86
|
+
<div class="form-group col-sm-6">
|
|
87
|
+
<label class="col-sm-4 control-label">增值产品品牌:</label>
|
|
88
|
+
<div class="col-sm-8">
|
|
89
|
+
<input-select
|
|
90
|
+
class="select select_list"
|
|
91
|
+
:value.sync="userfile.devicesinfo.f_brand"
|
|
92
|
+
v-model="userfile.devicesinfo.f_brand"
|
|
93
|
+
:options="brandList"
|
|
94
|
+
:disable="mark === 1"
|
|
95
|
+
:valueSingle="true"></input-select>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
<div class="form-group col-sm-6">
|
|
99
|
+
<label class="col-sm-4 control-label">增值产品类型:</label>
|
|
100
|
+
<div class="col-sm-8">
|
|
101
|
+
<input-select
|
|
102
|
+
class="select select_list"
|
|
103
|
+
:value.sync="userfile.devicesinfo.f_devices_type"
|
|
104
|
+
v-model="userfile.devicesinfo.f_devices_type"
|
|
105
|
+
:options="devicesType"
|
|
106
|
+
:disable="mark === 1"
|
|
107
|
+
:valueSingle="true"></input-select>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
<div class="form-group col-sm-6">
|
|
111
|
+
<label class="col-sm-4 control-label">增值产品数量:</label>
|
|
112
|
+
<div class="col-sm-8">
|
|
113
|
+
<input class="form-control input_view" style="" type="number"
|
|
114
|
+
placeholder="设备数量"
|
|
115
|
+
v-model="userfile.devicesinfo.f_devices_num"
|
|
116
|
+
:readonly="mark === 1"/>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
<div class="form-group col-sm-6">
|
|
120
|
+
<label class="col-sm-4 control-label">安 装 人:</label>
|
|
121
|
+
<div class="col-sm-8">
|
|
122
|
+
<input-select
|
|
123
|
+
class="select select_list"
|
|
124
|
+
v-model="userfile.devicesinfo.f_input_person"
|
|
125
|
+
:options="personList"
|
|
126
|
+
:disable="mark === 1"
|
|
127
|
+
:value.sync = "userfile.devicesinfo.f_input_person"
|
|
128
|
+
:valueSingle="true"></input-select>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
<div class="form-group col-sm-6">
|
|
132
|
+
<label class="col-sm-4 control-label">安装日期:</label>
|
|
133
|
+
<div class="col-sm-8">
|
|
134
|
+
<datepicker
|
|
135
|
+
placeholder="安装日期"
|
|
136
|
+
:value.sync="userfile.devicesinfo.f_input_date"
|
|
137
|
+
v-model="userfile.devicesinfo.f_input_date"
|
|
138
|
+
format="yyyy-MM-dd HH:mm:ss"
|
|
139
|
+
:value="userfile.devicesinfo.f_input_date"
|
|
140
|
+
:disabled="mark === 1">
|
|
141
|
+
</datepicker>
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
<div class="form-group col-sm-12">
|
|
146
|
+
<span>点击刷新按钮刷新应交金额、累计缴费金额、欠费金额</span>
|
|
147
|
+
<button type="button" class="btn btn-primary" @click="apply_data()" style="float: right">刷新</button>
|
|
148
|
+
</div>
|
|
149
|
+
<div class="form-group col-sm-12" :class="charge.f_payment_type ? '':'has-error'">
|
|
150
|
+
<label class="col-sm-2 control-label">付款类型:</label>
|
|
151
|
+
<div class="col-sm-10">
|
|
152
|
+
<input-select
|
|
153
|
+
v-model="charge.f_payment_type"
|
|
154
|
+
placeholder='请选择'
|
|
155
|
+
:value.sync="charge.f_payment_type"
|
|
156
|
+
:options='paymentType'
|
|
157
|
+
class="select select_list"
|
|
158
|
+
:value-single="true"
|
|
159
|
+
@keyup="changeDevice"
|
|
160
|
+
width="100%"
|
|
161
|
+
close-on-select ></input-select>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
<div v-if="data.f_apply_type === '散户报建' && showDevice" class="form-group col-sm-12 panel panel-info">
|
|
165
|
+
<div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
|
|
166
|
+
<div class="col-sm-6 text-left">设备信息</div>
|
|
167
|
+
</div>
|
|
168
|
+
<div class="form-group col-sm-6">
|
|
169
|
+
<label class="col-sm-4 control-label">增值产品品牌:</label>
|
|
170
|
+
<div class="col-sm-8">
|
|
171
|
+
<input-select
|
|
172
|
+
class="select select_list"
|
|
173
|
+
:value.sync="userfile.devicesinfo.f_brand"
|
|
174
|
+
v-model="userfile.devicesinfo.f_brand"
|
|
175
|
+
:options="brandList"
|
|
176
|
+
:disable="mark === 1"
|
|
177
|
+
:valueSingle="true"></input-select>
|
|
178
|
+
</div>
|
|
179
|
+
</div>
|
|
180
|
+
<div class="form-group col-sm-6">
|
|
181
|
+
<label class="col-sm-4 control-label">增值产品类型:</label>
|
|
182
|
+
<div class="col-sm-8">
|
|
183
|
+
<input-select
|
|
184
|
+
class="select select_list"
|
|
185
|
+
:value.sync="userfile.devicesinfo.f_devices_type"
|
|
186
|
+
v-model="userfile.devicesinfo.f_devices_type"
|
|
187
|
+
:options="devicesType"
|
|
188
|
+
:disable="mark === 1"
|
|
189
|
+
:valueSingle="true"></input-select>
|
|
190
|
+
</div>
|
|
191
|
+
</div>
|
|
192
|
+
<div class="form-group col-sm-6">
|
|
193
|
+
<label class="col-sm-4 control-label">增值产品数量:</label>
|
|
194
|
+
<div class="col-sm-8">
|
|
195
|
+
<input class="form-control input_view" style="" type="number"
|
|
196
|
+
placeholder="设备数量"
|
|
197
|
+
v-model="userfile.devicesinfo.f_devices_num"
|
|
198
|
+
:readonly="mark === 1"/>
|
|
199
|
+
</div>
|
|
200
|
+
</div>
|
|
201
|
+
<div class="form-group col-sm-6">
|
|
202
|
+
<label class="col-sm-4 control-label">安 装 人:</label>
|
|
203
|
+
<div class="col-sm-8">
|
|
204
|
+
<input-select
|
|
205
|
+
class="select select_list"
|
|
206
|
+
v-model="userfile.devicesinfo.f_input_person"
|
|
207
|
+
:options="personList"
|
|
208
|
+
:disable="mark === 1"
|
|
209
|
+
:value.sync = "userfile.devicesinfo.f_input_person"
|
|
210
|
+
:valueSingle="true"></input-select>
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
<div class="form-group col-sm-6">
|
|
214
|
+
<label class="col-sm-4 control-label">安装日期:</label>
|
|
215
|
+
<div class="col-sm-8">
|
|
216
|
+
<datepicker
|
|
217
|
+
placeholder="安装日期"
|
|
218
|
+
:value.sync="userfile.devicesinfo.f_input_date"
|
|
219
|
+
v-model="userfile.devicesinfo.f_input_date"
|
|
220
|
+
format="yyyy-MM-dd HH:mm:ss"
|
|
221
|
+
:value="userfile.devicesinfo.f_input_date"
|
|
222
|
+
:disabled="mark === 1">
|
|
223
|
+
</datepicker>
|
|
224
|
+
</div>
|
|
225
|
+
</div>
|
|
226
|
+
</div>
|
|
227
|
+
<div class="form-group col-sm-12" :class="charge.f_charge_money ? '':'has-error'">
|
|
228
|
+
<label class="col-sm-2 control-label">收费金额:</label>
|
|
229
|
+
<div class="col-sm-10">
|
|
230
|
+
<input type="text"
|
|
231
|
+
class="form-control input_view"
|
|
232
|
+
style="width: 100%"
|
|
233
|
+
placeholder="0.00"
|
|
234
|
+
@keyup="handleInput"
|
|
235
|
+
v-model="charge.f_charge_money" />
|
|
236
|
+
</div>
|
|
237
|
+
</div>
|
|
238
|
+
<div class="form-group col-sm-12" :class="charge.f_payment_method ? '':'has-error'">
|
|
239
|
+
<label class="col-sm-2 control-label">付款方式:</label>
|
|
240
|
+
<div class="col-sm-10">
|
|
241
|
+
<input-select
|
|
242
|
+
v-model="charge.f_payment_method"
|
|
243
|
+
placeholder='请选择'
|
|
244
|
+
:value.sync="charge.f_payment_method"
|
|
245
|
+
:options='paymentMethod'
|
|
246
|
+
class="select select_list"
|
|
247
|
+
:value-single="true"
|
|
248
|
+
width="100%"
|
|
249
|
+
close-on-select ></input-select>
|
|
250
|
+
</div>
|
|
251
|
+
</div>
|
|
252
|
+
<div class="form-group col-sm-12">
|
|
253
|
+
<label class="col-sm-2 control-label">票号:</label>
|
|
254
|
+
<div class="col-sm-10">
|
|
255
|
+
<input type="text"
|
|
256
|
+
class="form-control input_view"
|
|
257
|
+
style="width: 100%"
|
|
258
|
+
placeholder="请输入"
|
|
259
|
+
v-model="charge.f_ticket_number" />
|
|
260
|
+
</div>
|
|
261
|
+
</div>
|
|
262
|
+
<div class="form-group col-sm-12" :class="charge.f_charge_date ? '':'has-error'">
|
|
263
|
+
<label class="col-sm-2 control-label">收费日期:</label>
|
|
264
|
+
<div class="col-sm-10">
|
|
265
|
+
<datepicker
|
|
266
|
+
v-model="charge.f_charge_date"
|
|
267
|
+
placeholder='请选择'
|
|
268
|
+
:value.sync="charge.f_charge_date"
|
|
269
|
+
:format="'yyyy-MM-dd HH:mm:ss'"
|
|
270
|
+
class="select select_list"
|
|
271
|
+
:value-single="true"
|
|
272
|
+
width="100%"
|
|
273
|
+
close-on-select ></datepicker>
|
|
274
|
+
</div>
|
|
275
|
+
</div>
|
|
276
|
+
<div class="form-group col-sm-12">
|
|
277
|
+
<label class="col-sm-2 control-label">金额大写:</label>
|
|
278
|
+
<div class="col-sm-10">
|
|
279
|
+
<input type="text"
|
|
280
|
+
class="form-control input_view"
|
|
281
|
+
style="width: 100%"
|
|
282
|
+
:value="smalltoBIG(0)"
|
|
283
|
+
readonly
|
|
284
|
+
v-model.sync="charge.f_amount_words" />
|
|
285
|
+
</div>
|
|
286
|
+
</div>
|
|
287
|
+
|
|
288
|
+
<div class="form-group col-sm-12">
|
|
289
|
+
<label class="col-sm-2 control-label">应交金额:</label>
|
|
290
|
+
<div class="col-sm-10">
|
|
291
|
+
<input type="number"
|
|
292
|
+
class="form-control input_view"
|
|
293
|
+
style="width: 100%"
|
|
294
|
+
readonly
|
|
295
|
+
v-model="applydata.f_due_money" />
|
|
296
|
+
</div>
|
|
297
|
+
</div>
|
|
298
|
+
<div class="form-group col-sm-12">
|
|
299
|
+
<label class="col-sm-2 control-label">累计缴费金额:</label>
|
|
300
|
+
<div class="col-sm-10">
|
|
301
|
+
<input type="number"
|
|
302
|
+
class="form-control input_view"
|
|
303
|
+
style="width: 100%"
|
|
304
|
+
readonly
|
|
305
|
+
v-model="applydata.f_cumulative_money" />
|
|
306
|
+
</div>
|
|
307
|
+
</div>
|
|
308
|
+
<div class="form-group col-sm-12">
|
|
309
|
+
<label class="col-sm-2 control-label">欠费金额:</label>
|
|
310
|
+
<div class="col-sm-10">
|
|
311
|
+
<input type="number"
|
|
312
|
+
class="form-control input_view"
|
|
313
|
+
style="width: 100%"
|
|
314
|
+
readonly
|
|
315
|
+
v-model="applydata.f_arrears_money" />
|
|
316
|
+
</div>
|
|
317
|
+
</div>
|
|
318
|
+
<div class="form-group col-sm-12">
|
|
319
|
+
<label class="col-sm-2 control-label">备注:</label>
|
|
320
|
+
<div class="col-sm-10">
|
|
321
|
+
<input type="text"
|
|
322
|
+
class="form-control input_view"
|
|
323
|
+
style="width: 100%"
|
|
324
|
+
v-model="charge.f_charge_remarks" />
|
|
325
|
+
</div>
|
|
326
|
+
</div>
|
|
327
|
+
</article>
|
|
328
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
329
|
+
<button type="button" v-if="!showupdateCharge" class="btn btn-primary" @click="saveCharge()">新增收费</button>
|
|
330
|
+
<button type="button" v-if="showupdateCharge" class="btn btn-primary" @click="updateCharge()">确认修改</button>
|
|
331
|
+
</footer>
|
|
332
|
+
</modal>
|
|
333
|
+
<modal v-if="showInvalid" :show.sync="showInvalid" v-ref:modal :large="true" :backdrop="false" title="作废收费">
|
|
334
|
+
<header slot="modal-header" class="modal-header">
|
|
335
|
+
<button type="button" class="close" @click="closeModal"><span>×</span></button>
|
|
336
|
+
<h4 class="modal-title">作废收费</h4>
|
|
337
|
+
</header>
|
|
338
|
+
<article slot="modal-body" class="modal-body clearfix">
|
|
339
|
+
<div v-for="(i, item) in model.userfile.devicesinfo" v-if="data.f_apply_type === '散户报建'" class="form-group col-sm-12 panel panel-info">
|
|
340
|
+
<div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
|
|
341
|
+
<div class="col-sm-6 text-left">增值产品信息</div>
|
|
342
|
+
</div>
|
|
343
|
+
<div class="form-group col-sm-6">
|
|
344
|
+
<label class="col-sm-4 control-label">增值产品品牌:</label>
|
|
345
|
+
<div class="col-sm-8">
|
|
346
|
+
<input-select
|
|
347
|
+
class="select select_list"
|
|
348
|
+
:value.sync="item.f_brand"
|
|
349
|
+
v-model="item.f_brand"
|
|
350
|
+
:options="brandList"
|
|
351
|
+
:disable="true"
|
|
352
|
+
:valueSingle="true"></input-select>
|
|
353
|
+
</div>
|
|
354
|
+
</div>
|
|
355
|
+
<div class="form-group col-sm-6">
|
|
356
|
+
<label class="col-sm-4 control-label">增值产品类型:</label>
|
|
357
|
+
<div class="col-sm-8">
|
|
358
|
+
<input-select
|
|
359
|
+
class="select select_list"
|
|
360
|
+
:value.sync="item.f_devices_type"
|
|
361
|
+
v-model="item.f_devices_type"
|
|
362
|
+
:options="devicesType"
|
|
363
|
+
:disable="true"
|
|
364
|
+
:valueSingle="true"></input-select>
|
|
365
|
+
</div>
|
|
366
|
+
</div>
|
|
367
|
+
<div class="form-group col-sm-6">
|
|
368
|
+
<label class="col-sm-4 control-label">增值产品数量:</label>
|
|
369
|
+
<div class="col-sm-8">
|
|
370
|
+
<input class="form-control input_view" style="" type="number"
|
|
371
|
+
placeholder="增值产品数量"
|
|
372
|
+
v-model="item.f_devices_num"
|
|
373
|
+
:value="item.f_devices_num"
|
|
374
|
+
readonly/>
|
|
375
|
+
</div>
|
|
376
|
+
</div>
|
|
377
|
+
<div class="form-group col-sm-6">
|
|
378
|
+
<label class="col-sm-4 control-label">安 装 人:</label>
|
|
379
|
+
<div class="col-sm-8">
|
|
380
|
+
<input-select
|
|
381
|
+
class="select select_list"
|
|
382
|
+
v-model="item.f_input_person"
|
|
383
|
+
:options="personList"
|
|
384
|
+
:disable="true"
|
|
385
|
+
:value.sync = "item.f_input_person"
|
|
386
|
+
:valueSingle="true"></input-select>
|
|
387
|
+
</div>
|
|
388
|
+
</div>
|
|
389
|
+
<div class="form-group col-sm-6">
|
|
390
|
+
<label class="col-sm-4 control-label">安装日期:</label>
|
|
391
|
+
<div class="col-sm-8">
|
|
392
|
+
<datepicker
|
|
393
|
+
placeholder="安装日期"
|
|
394
|
+
:value.sync="item.f_input_date"
|
|
395
|
+
v-model="item.f_input_date"
|
|
396
|
+
format="yyyy-MM-dd HH:mm:ss"
|
|
397
|
+
:value="item.f_input_date"
|
|
398
|
+
:disabled="true">
|
|
399
|
+
</datepicker>
|
|
400
|
+
</div>
|
|
401
|
+
</div>
|
|
402
|
+
</div>
|
|
403
|
+
<!-- <div class="form-group col-sm-12">-->
|
|
404
|
+
<!-- <label class="col-sm-2 control-label">缴费地址:</label>-->
|
|
405
|
+
<!-- <div class="col-sm-10">-->
|
|
406
|
+
<!-- <input type="text"-->
|
|
407
|
+
<!-- class="form-control input_view"-->
|
|
408
|
+
<!-- style="width: 100%"-->
|
|
409
|
+
<!-- readonly-->
|
|
410
|
+
<!-- v-model="charge.f_useraddres" />-->
|
|
411
|
+
<!-- </div>-->
|
|
412
|
+
<!-- </div>-->
|
|
413
|
+
<div class="form-group col-sm-12">
|
|
414
|
+
<label class="col-sm-2 control-label">付款类型:</label>
|
|
415
|
+
<div class="col-sm-10">
|
|
416
|
+
<input
|
|
417
|
+
type="text"
|
|
418
|
+
v-model="charge.f_payment_type"
|
|
419
|
+
class="form-control input_view"
|
|
420
|
+
style="width: 100%"
|
|
421
|
+
readonly/>
|
|
422
|
+
</div>
|
|
423
|
+
</div>
|
|
424
|
+
<div class="form-group col-sm-12">
|
|
425
|
+
<label class="col-sm-2 control-label">收费金额:</label>
|
|
426
|
+
<div class="col-sm-10">
|
|
427
|
+
<input type="text"
|
|
428
|
+
class="form-control input_view"
|
|
429
|
+
style="width: 100%"
|
|
430
|
+
readonly
|
|
431
|
+
v-model="charge.f_charge_money" />
|
|
432
|
+
</div>
|
|
433
|
+
</div>
|
|
434
|
+
<div class="form-group col-sm-12">
|
|
435
|
+
<label class="col-sm-2 control-label">付款方式:</label>
|
|
436
|
+
<div class="col-sm-10">
|
|
437
|
+
<input type="text"
|
|
438
|
+
class="form-control input_view"
|
|
439
|
+
style="width: 100%"
|
|
440
|
+
readonly
|
|
441
|
+
v-model="charge.f_payment_method" />
|
|
442
|
+
</div>
|
|
443
|
+
</div>
|
|
444
|
+
<div class="form-group col-sm-12">
|
|
445
|
+
<label class="col-sm-2 control-label">金额大写:</label>
|
|
446
|
+
<div class="col-sm-10">
|
|
447
|
+
<input type="text"
|
|
448
|
+
class="form-control input_view"
|
|
449
|
+
style="width: 100%"
|
|
450
|
+
readonly
|
|
451
|
+
v-model="charge.f_amount_words" />
|
|
452
|
+
</div>
|
|
453
|
+
</div>
|
|
454
|
+
<div class="form-group col-sm-12">
|
|
455
|
+
<label class="col-sm-2 control-label">收费人员:</label>
|
|
456
|
+
<div class="col-sm-10">
|
|
457
|
+
<input type="text"
|
|
458
|
+
class="form-control input_view"
|
|
459
|
+
style="width: 100%"
|
|
460
|
+
readonly
|
|
461
|
+
v-model="charge.f_operator" />
|
|
462
|
+
</div>
|
|
463
|
+
</div>
|
|
464
|
+
<div class="form-group col-sm-12" :class="charge.f_void_remarks ? '':'has-error'">
|
|
465
|
+
<label class="col-sm-2 control-label">作废原因:</label>
|
|
466
|
+
<div class="col-sm-10">
|
|
467
|
+
<input type="text"
|
|
468
|
+
class="form-control input_view"
|
|
469
|
+
style="width: 100%"
|
|
470
|
+
v-model="charge.f_void_remarks" />
|
|
471
|
+
</div>
|
|
472
|
+
</div>
|
|
473
|
+
</article>
|
|
474
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
475
|
+
<button type="button" class="btn btn-primary" :disabled="!charge.f_void_remarks" @click="invalidApplyCharge()">确认作废</button>
|
|
476
|
+
</footer>
|
|
477
|
+
</modal>
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
</div>
|
|
481
|
+
</template>
|
|
482
|
+
<script>
|
|
483
|
+
import {getNowDate,isEmpty} from '../../../Util'
|
|
484
|
+
import {PagedList} from 'vue-client'
|
|
485
|
+
import {HttpResetClass} from 'vue-client'
|
|
486
|
+
import Vue from 'vue'
|
|
487
|
+
|
|
488
|
+
export default {
|
|
489
|
+
title: '收费管理',
|
|
490
|
+
props: {
|
|
491
|
+
selectdata: {
|
|
492
|
+
type: Object
|
|
493
|
+
},
|
|
494
|
+
data: {
|
|
495
|
+
type: Object
|
|
496
|
+
},
|
|
497
|
+
mark: {
|
|
498
|
+
type: Number,
|
|
499
|
+
default: 0
|
|
500
|
+
}
|
|
501
|
+
},
|
|
502
|
+
data () {
|
|
503
|
+
return {
|
|
504
|
+
showCharge: false,
|
|
505
|
+
showInvalid: false,
|
|
506
|
+
model: {
|
|
507
|
+
data: null,
|
|
508
|
+
userfile: null
|
|
509
|
+
},
|
|
510
|
+
charge: {
|
|
511
|
+
|
|
512
|
+
},
|
|
513
|
+
applydata: {
|
|
514
|
+
f_due_money: 0.00,
|
|
515
|
+
f_cumulative_money: 0.00,
|
|
516
|
+
f_arrears_money: 0.00
|
|
517
|
+
},
|
|
518
|
+
useraddressList: [],
|
|
519
|
+
chargeUseraddress: null,
|
|
520
|
+
userfile: {
|
|
521
|
+
devicesinfo: null
|
|
522
|
+
},
|
|
523
|
+
personList: [],
|
|
524
|
+
showupdateCharge: false
|
|
525
|
+
}
|
|
526
|
+
},
|
|
527
|
+
ready () {
|
|
528
|
+
this.installPerson()
|
|
529
|
+
this.search()
|
|
530
|
+
// 获取数据
|
|
531
|
+
this.apply_data()
|
|
532
|
+
},
|
|
533
|
+
methods: {
|
|
534
|
+
changeUseraddress() {
|
|
535
|
+
this.charge.f_useraddress_id = this.chargeUseraddress.id
|
|
536
|
+
},
|
|
537
|
+
async invalidApplyCharge() {
|
|
538
|
+
if (this.charge.f_void_remarks.length < 0) {
|
|
539
|
+
this.$showAlert('请输入作废本次收费原因!!!', 'warning', 3000)
|
|
540
|
+
return
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
let http = new HttpResetClass()
|
|
544
|
+
let data = {
|
|
545
|
+
apply: this.data,
|
|
546
|
+
user: this.$login.f,
|
|
547
|
+
charge: this.charge
|
|
548
|
+
}
|
|
549
|
+
console.log("发送的数据:" + JSON.stringify(data))
|
|
550
|
+
try {
|
|
551
|
+
let res = await http.load('POST', 'rs/logic/invalidApplyCharge', {data:data}, {
|
|
552
|
+
resolveMsg: null,
|
|
553
|
+
rejectMsg: null
|
|
554
|
+
})
|
|
555
|
+
this.selectdata = res.data
|
|
556
|
+
} catch (e) {
|
|
557
|
+
this.$showAlert(e.data, 'danger', 3000)
|
|
558
|
+
}
|
|
559
|
+
if (this.data.f_apply_type === '散户报建'){
|
|
560
|
+
this.deleteDevice(this.charge)
|
|
561
|
+
this.refund_data(this.charge)
|
|
562
|
+
}
|
|
563
|
+
this.closeModal()
|
|
564
|
+
this.search()
|
|
565
|
+
},
|
|
566
|
+
showInvalidModal(row) {
|
|
567
|
+
this.charge = row
|
|
568
|
+
if (this.data.f_apply_type === '散户报建'){
|
|
569
|
+
this.openDevicesModal(row)
|
|
570
|
+
}
|
|
571
|
+
this.showInvalid = true
|
|
572
|
+
},
|
|
573
|
+
handleInput(e) {
|
|
574
|
+
// 通过正则过滤小数点后两位
|
|
575
|
+
e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
|
|
576
|
+
this.charge.f_amount_words = this.smalltoBIG(e.target.value)
|
|
577
|
+
},
|
|
578
|
+
async updateChargeModal(row) {
|
|
579
|
+
|
|
580
|
+
this.charge = row
|
|
581
|
+
if (this.data.f_apply_type === '散户报建'){
|
|
582
|
+
await this.openDevicesModal(row)
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
this.showupdateCharge = true
|
|
586
|
+
this.showCharge = true
|
|
587
|
+
},
|
|
588
|
+
async updateCharge() {
|
|
589
|
+
if(this.data.f_apply_type === '散户报建'){
|
|
590
|
+
for (let i = 0; i < this.data.fields.length; i++) {
|
|
591
|
+
if (this.data.fields[i].label === '应交金额') {
|
|
592
|
+
this.data.f_due_money = this.data.fields[i].value
|
|
593
|
+
}
|
|
594
|
+
if (this.data.fields[i].label === '合同价格') {
|
|
595
|
+
this.data.f_contract_money = this.data.fields[i].value
|
|
596
|
+
console.log("合同金额",this.data.f_contract_money)
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
let data = {
|
|
601
|
+
charge: this.charge,
|
|
602
|
+
selectdata: this.data
|
|
603
|
+
}
|
|
604
|
+
console.log()
|
|
605
|
+
if (this.data.f_apply_type === '散户报建' && this.userfile.devicesinfo !== null){
|
|
606
|
+
|
|
607
|
+
data.userfile = this.userfile
|
|
608
|
+
data.user = this.$login.f
|
|
609
|
+
data.userfile.devicesinfo.f_ticket_number = this.charge.f_ticket_number
|
|
610
|
+
}
|
|
611
|
+
let res = await this.$resetpost(
|
|
612
|
+
`rs/logic/updateCharge`,
|
|
613
|
+
data
|
|
614
|
+
)
|
|
615
|
+
this.showCharge = false
|
|
616
|
+
this.showupdateCharge = false
|
|
617
|
+
this.charge = {}
|
|
618
|
+
|
|
619
|
+
this.$dispatch('breakControl', res.data)
|
|
620
|
+
},
|
|
621
|
+
async saveCharge() {
|
|
622
|
+
this.apply_data()
|
|
623
|
+
// if (isEmpty(this.charge.f_useraddress_id) && this.selectdata.f_apply_type !== '开发商集体报建') {
|
|
624
|
+
// this.$showAlert('请选择缴费的地址信息!!!', 'warning', 3000)
|
|
625
|
+
// return
|
|
626
|
+
// }
|
|
627
|
+
if (Number(this.charge.f_charge_money) === 0 || this.charge.f_charge_money === undefined || this.charge.f_charge_money === null) {
|
|
628
|
+
this.$showAlert('单笔收费不能为0元!!!', 'warning', 3000)
|
|
629
|
+
return
|
|
630
|
+
}
|
|
631
|
+
if ((Number(this.charge.f_charge_money) > Number(this.applydata.f_arrears_money)) && this.mark !== 2) {
|
|
632
|
+
this.$showAlert('单笔收费不能超过未交总金额!!!', 'warning', 3000)
|
|
633
|
+
return
|
|
634
|
+
}
|
|
635
|
+
// if (this.selectdata.f_apply_type === '散户集体报建') {
|
|
636
|
+
// if (Number(this.charge.f_charge_money) > Number(this.selectdata.f_price)) {
|
|
637
|
+
// this.$showAlert('单笔收费不能超过单价!!!', 'warning', 3000)
|
|
638
|
+
// return
|
|
639
|
+
// }
|
|
640
|
+
// if (Number(this.charge.f_charge_money) > Number(this.outstandingAmount)) {
|
|
641
|
+
// this.$showAlert('单笔收费不能超过当前用户未结金额!!!', 'warning', 3000)
|
|
642
|
+
// return
|
|
643
|
+
// }
|
|
644
|
+
// }
|
|
645
|
+
if (this.charge.f_payment_method.length < 0) {
|
|
646
|
+
this.$showAlert('请选择付款方式!!!', 'warning', 3000)
|
|
647
|
+
return
|
|
648
|
+
}
|
|
649
|
+
let http = new HttpResetClass()
|
|
650
|
+
let data = {
|
|
651
|
+
selectdata: this.data,
|
|
652
|
+
tablename: 't_charge_record',
|
|
653
|
+
parameters : {
|
|
654
|
+
f_charge_money: this.charge.f_charge_money,
|
|
655
|
+
f_charge_date: this.charge.f_charge_date,
|
|
656
|
+
f_payment_type: this.charge.f_payment_type,
|
|
657
|
+
f_charge_state: '有效',
|
|
658
|
+
f_amount_words: this.charge.f_amount_words,
|
|
659
|
+
f_payment_method: this.charge.f_payment_method,
|
|
660
|
+
f_charge_remarks: this.charge.f_charge_remarks,
|
|
661
|
+
f_ticket_number: this.charge.f_ticket_number,
|
|
662
|
+
f_operator: this.$login.f.name,
|
|
663
|
+
f_operation_date: new Date().Format("yyyy-MM-dd HH:mm:ss"),
|
|
664
|
+
f_company: this.$login.f.orgs,
|
|
665
|
+
f_process_id: this.data.f_process_id
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
if (this.data.f_apply_type === '散户报建' && this.userfile.devicesinfo !== null){
|
|
669
|
+
data.userfile = this.userfile
|
|
670
|
+
data.user = this.$login.f
|
|
671
|
+
data.userfile.devicesinfo.f_ticket_number = this.charge.f_ticket_number
|
|
672
|
+
}
|
|
673
|
+
console.log("开始收费:" + JSON.stringify(data))
|
|
674
|
+
let res
|
|
675
|
+
|
|
676
|
+
res = await http.load('POST', 'rs/logic/addCharge', {data: data}, {
|
|
677
|
+
resolveMsg: null,
|
|
678
|
+
rejectMsg: null
|
|
679
|
+
})
|
|
680
|
+
|
|
681
|
+
if (this.data.f_apply_type === '散户报建' && this.userfile.devicesinfo){
|
|
682
|
+
// this.addDevice()
|
|
683
|
+
}
|
|
684
|
+
this.showCharge = false
|
|
685
|
+
this.charge.f_charge_money = 0
|
|
686
|
+
this.charge.f_amount_words = ''
|
|
687
|
+
this.charge.f_payment_method = ''
|
|
688
|
+
this.charge.f_charge_remarks = ''
|
|
689
|
+
this.charge.f_charge_date = ''
|
|
690
|
+
this.charge.f_ticket_number = ''
|
|
691
|
+
this.$dispatch('breakControl', res.data)
|
|
692
|
+
},
|
|
693
|
+
// 金额转大写
|
|
694
|
+
smalltoBIG(n) {
|
|
695
|
+
let fraction = ['角', '分'];
|
|
696
|
+
let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
697
|
+
let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
|
|
698
|
+
let head = n < 0 ? '欠' : '';
|
|
699
|
+
n = Math.abs(n);
|
|
700
|
+
|
|
701
|
+
let s = '';
|
|
702
|
+
|
|
703
|
+
for (var i = 0; i < fraction.length; i++) {
|
|
704
|
+
s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
|
|
705
|
+
}
|
|
706
|
+
s = s || '整';
|
|
707
|
+
n = Math.floor(n);
|
|
708
|
+
|
|
709
|
+
for (var i = 0; i < unit[0].length && n > 0; i++) {
|
|
710
|
+
let p = '';
|
|
711
|
+
for (var j = 0; j < unit[1].length && n > 0; j++) {
|
|
712
|
+
p = digit[n % 10] + unit[1][j] + p;
|
|
713
|
+
n = Math.floor(n / 10);
|
|
714
|
+
}
|
|
715
|
+
s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
|
|
716
|
+
}
|
|
717
|
+
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
|
|
718
|
+
},
|
|
719
|
+
async getUserAddress() {
|
|
720
|
+
let http = new HttpResetClass()
|
|
721
|
+
let data = {
|
|
722
|
+
condition: '1=1',
|
|
723
|
+
f_process_id: this.selectdata.f_process_id
|
|
724
|
+
}
|
|
725
|
+
let res = await http.load('POST', 'rs/sql/getAddresAndCumulativePayment', {data:data}, {
|
|
726
|
+
resolveMsg: null,
|
|
727
|
+
rejectMsg: null
|
|
728
|
+
})
|
|
729
|
+
|
|
730
|
+
this.useraddressList = res.data
|
|
731
|
+
if (this.selectdata.f_apply_type === '散户集体报建') {
|
|
732
|
+
// 去除累计缴费金额大于等于单价的用户地址
|
|
733
|
+
this.useraddressList = res.data.filter(item => {
|
|
734
|
+
let f_cumulative_payment_money = isEmpty(item.f_cumulative_payment_money) ? 0 : item.f_cumulative_payment_money
|
|
735
|
+
return Number(f_cumulative_payment_money) < Number(isEmpty(this.selectdata.f_price) ? 0 : this.selectdata.f_price)
|
|
736
|
+
})
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
if (this.useraddressList.length > 0) {
|
|
740
|
+
this.useraddressList = this.useraddressList.map(item => {
|
|
741
|
+
return {
|
|
742
|
+
// 有用户姓名地址后拼接姓名
|
|
743
|
+
label: `${item.f_address} ${isEmpty(item.f_user_name) ? '' : '--- ' + item.f_user_name}`,
|
|
744
|
+
value: item
|
|
745
|
+
}
|
|
746
|
+
})
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
},
|
|
750
|
+
async showChargeModal() {
|
|
751
|
+
// this.getUserAddress()
|
|
752
|
+
|
|
753
|
+
this.showCharge = true
|
|
754
|
+
},
|
|
755
|
+
async search () {
|
|
756
|
+
let http = new HttpResetClass()
|
|
757
|
+
let data = {
|
|
758
|
+
tablename: 't_charge_record',
|
|
759
|
+
condition: "f_process_id = '" + this.data.f_process_id + "'"
|
|
760
|
+
}
|
|
761
|
+
let res = await http.load('POST', 'rs/sql/applysingleTable', {data:data}, {
|
|
762
|
+
resolveMsg: null,
|
|
763
|
+
rejectMsg: null
|
|
764
|
+
})
|
|
765
|
+
this.model.data = res.data
|
|
766
|
+
if (this.data.f_apply_type === '散户报建') {
|
|
767
|
+
data = {
|
|
768
|
+
f_process_id: this.data.f_process_id,
|
|
769
|
+
condition: `f_userinfo_id = '${this.data.f_userinfo_id}'`
|
|
770
|
+
}
|
|
771
|
+
res = await http.load('POST', 'rs/sql/getUserFilesAndDevicesAmount', {data: data}, {
|
|
772
|
+
resolveMsg: null,
|
|
773
|
+
rejectMsg: '获取设备失败!!!'
|
|
774
|
+
})
|
|
775
|
+
this.model.userfile = res.data
|
|
776
|
+
}
|
|
777
|
+
},
|
|
778
|
+
async apply_data () {
|
|
779
|
+
for (let i = 0; i < this.data.fields.length; i++) {
|
|
780
|
+
if(this.data.f_apply_type === '散户报建') {
|
|
781
|
+
if (this.data.fields[i].label === '合同价格') {
|
|
782
|
+
this.data.f_contract_money = this.data.fields[i].value
|
|
783
|
+
}
|
|
784
|
+
if (this.data.fields[i].label === '应交金额') {
|
|
785
|
+
this.data.f_due_money = this.data.fields[i].value
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
if (this.data.fields[i].label == '应交金额') {
|
|
789
|
+
this.applydata.f_due_money = this.data.fields[i].value
|
|
790
|
+
console.log("应交金额:" + this.data.fields[i].value)
|
|
791
|
+
}
|
|
792
|
+
if (this.data.fields[i].label == '累计缴费金额') {
|
|
793
|
+
this.applydata.f_cumulative_money = this.data.fields[i].value
|
|
794
|
+
}
|
|
795
|
+
if (this.data.fields[i].label == '欠费金额') {
|
|
796
|
+
this.applydata.f_arrears_money = this.data.fields[i].value
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
// let http = new HttpResetClass()
|
|
800
|
+
// let data = {
|
|
801
|
+
// tablename: 't_apply',
|
|
802
|
+
// condition: "f_process_id = '" + this.data.f_process_id + "'"
|
|
803
|
+
// }
|
|
804
|
+
// let res = await http.load('POST', 'rs/sql/applysingleTable', {data:data}, {
|
|
805
|
+
// resolveMsg: null,
|
|
806
|
+
// rejectMsg: null
|
|
807
|
+
// })
|
|
808
|
+
// this.applydata = res.data
|
|
809
|
+
},
|
|
810
|
+
// 更新欠费金额和累计缴费金额
|
|
811
|
+
async update_data () {
|
|
812
|
+
for (let i = 0; i < this.data.fields.length; i++) {
|
|
813
|
+
if (this.data.fields[i].label == '累计缴费金额') {
|
|
814
|
+
this.data.fields[i].value = Number(this.data.f_cumulative_money) + Number(this.charge.f_charge_money)
|
|
815
|
+
this.data.f_cumulative_money = Number(this.data.f_cumulative_money) + Number(this.charge.f_charge_money)
|
|
816
|
+
}
|
|
817
|
+
if (this.data.fields[i].label == '欠费金额') {
|
|
818
|
+
this.data.fields[i].value = Number(this.data.f_arrears_money) - Number(this.charge.f_charge_money)
|
|
819
|
+
this.data.f_arrears_money = Number(this.data.f_arrears_money) - Number(this.charge.f_charge_money)
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
if (this.data.f_apply_type === '散户报建'){
|
|
823
|
+
let http = new HttpResetClass()
|
|
824
|
+
let data = {
|
|
825
|
+
tablename: 't_apply',
|
|
826
|
+
parameters : this.data
|
|
827
|
+
}
|
|
828
|
+
console.log("datasasda",data)
|
|
829
|
+
let res = await http.load('POST', 'rs/logic/currencySaveUpdate', {data: data}, {
|
|
830
|
+
resolveMsg: null,
|
|
831
|
+
rejectMsg: null
|
|
832
|
+
})
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
},
|
|
836
|
+
// 更新欠费金额和累计缴费金额
|
|
837
|
+
async refund_data (row) {
|
|
838
|
+
for (let i = 0; i < this.data.fields.length; i++) {
|
|
839
|
+
if (this.data.fields[i].label == '累计缴费金额') {
|
|
840
|
+
this.data.fields[i].value = Number(this.data.f_cumulative_money) - Number(row.f_charge_money)
|
|
841
|
+
this.data.f_cumulative_money = this.data.fields[i].value
|
|
842
|
+
}
|
|
843
|
+
if (this.data.fields[i].label == '欠费金额') {
|
|
844
|
+
this.data.fields[i].value = Number(this.data.f_arrears_money) + Number(row.f_charge_money)
|
|
845
|
+
this.data.f_arrears_money = this.data.fields[i].value
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
},
|
|
849
|
+
async openDevicesModal (row) {
|
|
850
|
+
let data = {
|
|
851
|
+
tablename: 't_devices',
|
|
852
|
+
condition: `f_process_id = '${this.data.f_process_id}' and f_charge_id = '${row.id}' and f_devices_state = '有效'`
|
|
853
|
+
}
|
|
854
|
+
let res = await this.$resetpost(
|
|
855
|
+
`rs/sql/singleTable`,
|
|
856
|
+
{data: data},
|
|
857
|
+
{resolveMsg: null, rejectMsg: '设备查询失败!!!'}
|
|
858
|
+
)
|
|
859
|
+
|
|
860
|
+
if (res.data.length > 0){
|
|
861
|
+
Vue.set(this.model.userfile, 'devicesinfo', res.data)
|
|
862
|
+
Vue.set(this.userfile, 'devicesinfo', res.data[0])
|
|
863
|
+
console.log("设备信息",this.model.userfile.devicesinfo)
|
|
864
|
+
console.log("设备信息",this.userfile.devicesinfo)
|
|
865
|
+
}
|
|
866
|
+
},
|
|
867
|
+
async addDevice () {
|
|
868
|
+
let data = {
|
|
869
|
+
selectdata: this.data,
|
|
870
|
+
userfile: this.userfile,
|
|
871
|
+
user: this.$login.f
|
|
872
|
+
}
|
|
873
|
+
data.userfile.devicesinfo.f_ticket_number = this.charge.f_ticket_number
|
|
874
|
+
console.log("添加设备",data.userfile.devicesinfo)
|
|
875
|
+
let res = await this.$resetpost(
|
|
876
|
+
`rs/logic/applyAddDevice`,
|
|
877
|
+
{data: data},
|
|
878
|
+
{resolveMsg: null, rejectMsg: '设备添加失败!!!'}
|
|
879
|
+
)
|
|
880
|
+
},
|
|
881
|
+
async deleteDevice (row) {
|
|
882
|
+
let data = {
|
|
883
|
+
f_process_id: this.data.f_process_id,
|
|
884
|
+
f_charge_id: row.id,
|
|
885
|
+
user: this.$login.f
|
|
886
|
+
}
|
|
887
|
+
let res = await this.$resetpost(
|
|
888
|
+
`rs/logic/applydeleteDevice`,
|
|
889
|
+
{data: data},
|
|
890
|
+
{resolveMsg: null, rejectMsg: '设备作废失败!!!'}
|
|
891
|
+
)
|
|
892
|
+
},
|
|
893
|
+
// 关闭对话框
|
|
894
|
+
closeModal() {
|
|
895
|
+
this.showCharge = false
|
|
896
|
+
this.showInvalid = false
|
|
897
|
+
this.showupdateCharge = false
|
|
898
|
+
if (this.data.f_apply_type === '散户报建') {
|
|
899
|
+
this.model.userfile = null
|
|
900
|
+
}
|
|
901
|
+
this.charge = {}
|
|
902
|
+
this.userfile.devicesinfo = null
|
|
903
|
+
this.chargeUseraddress = null
|
|
904
|
+
this.search()
|
|
905
|
+
},
|
|
906
|
+
// 安装人
|
|
907
|
+
async installPerson() {
|
|
908
|
+
// return function (f_install_person) {
|
|
909
|
+
// if (isEmpty(f_install_person)) {
|
|
910
|
+
// return this.$login.f.name
|
|
911
|
+
// }
|
|
912
|
+
// return f_install_person
|
|
913
|
+
// }
|
|
914
|
+
console.log("当前数据",this.data)
|
|
915
|
+
console.log("当前数据",this.selectdata)
|
|
916
|
+
if (!this.data){
|
|
917
|
+
this.data = this.selectdata
|
|
918
|
+
}
|
|
919
|
+
let data = {
|
|
920
|
+
source: 'this.getParentByType($organization$).getChildByName($工程部负责人$).getChildren()',
|
|
921
|
+
userid: this.$login.f.id
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
let http = new HttpResetClass()
|
|
925
|
+
let res = await http.load(
|
|
926
|
+
'POST',
|
|
927
|
+
`rs/search`,
|
|
928
|
+
{data: data},
|
|
929
|
+
{resolveMsg: null, rejectMsg: '人员查询失败!!!'}
|
|
930
|
+
)
|
|
931
|
+
|
|
932
|
+
this.personList = res.data.map(item => {
|
|
933
|
+
return {
|
|
934
|
+
label: item.name,
|
|
935
|
+
value: item.name
|
|
936
|
+
}
|
|
937
|
+
})
|
|
938
|
+
},
|
|
939
|
+
expireDate (index) {
|
|
940
|
+
|
|
941
|
+
if (isEmpty(this.userfile.devicesinfo[index].f_make_date) || isEmpty(this.userfile.devicesinfo[index].f_service_life)) {
|
|
942
|
+
return
|
|
943
|
+
}
|
|
944
|
+
let f_make_date = new Date(this.userfile.devicesinfo[index].f_make_date)
|
|
945
|
+
let year = (f_make_date.getFullYear() - 0) + (this.userfile.devicesinfo[index].f_service_life - 0)
|
|
946
|
+
let month = (f_make_date.getMonth() - 0) + 1
|
|
947
|
+
let day = f_make_date.getDate()
|
|
948
|
+
|
|
949
|
+
Vue.set(this.userfile.devicesinfo[index], 'f_expire_date', year + '-' + (month < 10 ? '0' + month : month) + '-' + (day < 10 ? '0' + day : day))
|
|
950
|
+
}
|
|
951
|
+
},
|
|
952
|
+
events: {
|
|
953
|
+
},
|
|
954
|
+
computed: {
|
|
955
|
+
paymentMethod() {
|
|
956
|
+
return this.$appdata.getParam("付款方式")
|
|
957
|
+
},
|
|
958
|
+
paymentType() {
|
|
959
|
+
return this.$appdata.getParam("报建收费类型")
|
|
960
|
+
},
|
|
961
|
+
cumulativePaymentMoney() {
|
|
962
|
+
return isEmpty(this.chargeUseraddress.f_cumulative_payment_money) ? 0 : this.chargeUseraddress.f_cumulative_payment_money
|
|
963
|
+
},
|
|
964
|
+
outstandingAmount() {
|
|
965
|
+
return this.selectdata.f_price - this.cumulativePaymentMoney
|
|
966
|
+
},
|
|
967
|
+
// 安装人
|
|
968
|
+
installperson(f_input_person) {
|
|
969
|
+
return function (f_input_person) {
|
|
970
|
+
if (isEmpty(f_input_person)) {
|
|
971
|
+
return this.$login.f.name
|
|
972
|
+
}
|
|
973
|
+
return f_input_person
|
|
974
|
+
}
|
|
975
|
+
},
|
|
976
|
+
installdate(f_install_date) {
|
|
977
|
+
return function (f_install_date) {
|
|
978
|
+
if (isEmpty(f_install_date)) {
|
|
979
|
+
return new Date().Format('yyyy-MM-dd HH:mm:ss')
|
|
980
|
+
}
|
|
981
|
+
return f_install_date
|
|
982
|
+
}
|
|
983
|
+
},
|
|
984
|
+
installType() {
|
|
985
|
+
return this.$appdata.getParam("安装方式")
|
|
986
|
+
},
|
|
987
|
+
pipeType() {
|
|
988
|
+
return this.$appdata.getParam("管道类型")
|
|
989
|
+
},
|
|
990
|
+
devicesType() {
|
|
991
|
+
return this.$appdata.getParam("设备类型")
|
|
992
|
+
},
|
|
993
|
+
brandList() {
|
|
994
|
+
return this.$appdata.getParam("设备品牌")
|
|
995
|
+
}
|
|
996
|
+
},
|
|
997
|
+
watch: {
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
</script>
|
|
1001
|
+
<style scoped>
|
|
1002
|
+
.textNoLineBreak {
|
|
1003
|
+
white-space: nowrap;
|
|
1004
|
+
}
|
|
1005
|
+
.head-but{
|
|
1006
|
+
margin-left: 5px;
|
|
1007
|
+
height: 34px;
|
|
1008
|
+
/*background-color: #6aa6e2;*/
|
|
1009
|
+
border-radius: 4px;
|
|
1010
|
+
font-family: PingFang;
|
|
1011
|
+
color: #ffffff;
|
|
1012
|
+
}
|
|
1013
|
+
</style>
|