apply-clients 3.0.2 → 3.0.5-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist.zip +0 -0
  2. package/index.html +1 -1
  3. package/package.json +4 -3
  4. package/src/App.vue +126 -15
  5. package/src/apply.js +18 -0
  6. package/src/bootstrap/fonts/PingFangSC-Regular.ttf +0 -0
  7. package/src/bootstrap/less/bootstrap.less +1 -2
  8. package/src/bootstrap/less/standard.less +208 -0
  9. package/src/components/Util.js +4 -0
  10. package/src/components/app_apply/FieldExploration.vue +2 -2
  11. package/src/components/app_apply/Ventilation.vue +2 -2
  12. package/src/components/image/doc.jpg +0 -0
  13. package/src/components/image/excel.jpg +0 -0
  14. package/src/components/image/pdf.jpg +0 -0
  15. package/src/components/image//345/233/276/345/261/20212.png +0 -0
  16. package/src/components/image//345/233/276/345/261/20213.png +0 -0
  17. package/src/components/image//345/233/276/345/261/20216.png +0 -0
  18. package/src/components/image//345/244/232/350/276/271/345/275/2422.png +0 -0
  19. package/src/components/image//345/244/232/350/276/271/345/275/2422/346/213/267/350/264/235.png +0 -0
  20. package/src/components/image//346/244/255/345/234/2062.png +0 -0
  21. package/src/components/image//346/244/255/345/234/2065.png +0 -0
  22. package/src/components/image//346/244/255/345/234/2065/346/213/267/350/264/235.png +0 -0
  23. package/src/components/image//346/244/255/345/234/2065/346/213/267/350/264/2352.png +0 -0
  24. package/src/components/image//346/244/255/345/234/2065/346/213/267/350/264/2353.png +0 -0
  25. package/src/components/image//347/273/2044.png +0 -0
  26. package/src/components/image//347/273/2045.png +0 -0
  27. package/src/components/image//347/273/2046.png +0 -0
  28. package/src/components/image//350/257/235/345/212/241/347/273/237/350/256/241/346/225/260/346/215/256/345/261/225/347/244/272.png +0 -0
  29. package/src/components/product/Function/InstallFunction.vue +9 -8
  30. package/src/components/product/Function/InstallInfoSelect.vue +98 -69
  31. package/src/components/product/Function/Service/FunctionServiceControl.vue +81 -3
  32. package/src/components/product/Function/functions/AddContract.vue +161 -139
  33. package/src/components/product/Function/functions/BuyerMessage.vue +522 -0
  34. package/src/components/product/Function/functions/InstallFee.vue +1117 -891
  35. package/src/components/product/MaterialBatchList.vue +109 -0
  36. package/src/components/product/MaterialBatchManage.vue +34 -0
  37. package/src/components/product/Procedures/ProceduresDataGrid.vue +1022 -0
  38. package/src/components/product/Process/ExplorationSelect.vue +208 -73
  39. package/src/components/product/Process/ExplorationUser.vue +94 -42
  40. package/src/components/product/Process/MaterialUseList.vue +159 -0
  41. package/src/components/product/Process/ModifyUserFiles.vue +15 -5
  42. package/src/components/product/Process/ProcessInfo/history_control.vue +139 -110
  43. package/src/components/product/Process/Processes/ApplyUpload.vue +279 -0
  44. package/src/components/product/Process/Processes/CustomerMaterialMessage.vue +501 -212
  45. package/src/components/product/Process/Processes/CustomerRecordMessage.vue +949 -753
  46. package/src/components/product/Process/Processes/ProjectSettlement.vue +549 -35
  47. package/src/components/product/Process/Processes/ReceiveBatch.vue +314 -168
  48. package/src/components/product/Process/Processes/Service/ApplyChangeHistory.vue +105 -0
  49. package/src/components/product/Process/Processes/Service/ApplyChargeSearch.vue +44 -16
  50. package/src/components/product/Process/Processes/Service/ServiceControl.vue +2495 -1008
  51. package/src/components/product/Process/Processes/Upload.vue +532 -0
  52. package/src/components/product/Process/ShowBackReason.vue +1 -1
  53. package/src/components/product/ServiceView.vue +364 -124
  54. package/src/components/product/Statistics/ApplyStatisticsROOT.vue +27 -0
  55. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +212 -23
  56. package/src/components/product/Supervisory/SupervisoryControl.vue +79 -29
  57. package/src/components/product/Supervisory/SupervisoryList.vue +182 -41
  58. package/src/components/product/Supervisory/SupervisoryhCart.vue +4 -2
  59. package/src/components/product/VueUtils/Tree.vue +330 -0
  60. package/src/components/product/VueUtils/rightview/InstallCardList2.vue +29 -38
  61. package/src/main.js +2 -0
  62. package/src/stores/ApplyLoadParams.js +1 -1
  63. package/src/stores/PagedListLogic.js +173 -0
  64. package/.npmignore +0 -12
  65. package/node_modules.7z +0 -0
  66. package/yarn.lock +0 -9008
@@ -1,891 +1,1117 @@
1
- <template>
2
- <div class="col-sm-12 auto select-overspread">
3
- <div class="auto select-overspread">
4
- <div class="panel panel-info">
5
- <div class="panel-heading auto">
6
- <h3 class="panel-title" style="display: inline-table">报装收费</h3>
7
- <button v-if="showfee" type="button" style="float: right" class="btn btn-link" @click.stop="printFee()">打印</button>
8
- </div>
9
- </div>
10
- </div>
11
- <!--打印报表html-->
12
- <div v-show="false">
13
- <div class="row" style="display: flex;justify-content: center;" id='bill-fee'>
14
- {{{bill}}}
15
- </div>
16
- <report-print id='bill-fee' top='15mm' left='5mm' width='90%' height='70%' :showbtn="false" preview="true" v-ref:reportprint></report-print>
17
- </div>
18
-
19
-
20
- <div class="col-sm-12">
21
- <span class="col-sm-6" v-show="!($login.f.f_fengongsi.includes('彩虹'))">流程编号:{{model.f_process_id}}</span>
22
- <span class="col-sm-3" v-show="!($login.f.f_fengongsi.includes('彩虹'))">报建编号:{{model.f_apply_num}}</span>
23
- <span class="col-sm-3" v-show="!($login.f.f_fengongsi.includes('彩虹'))">合同编号:{{model.f_contract_number}}</span>
24
- <!--<span class="col-sm-3" v-show="!($login.f.f_fengongsi.includes('彩虹'))">缴费类型(未定):{{}}元</span>-->
25
- <!--<span class="col-sm-3" v-show="!($login.f.f_fengongsi.includes('彩虹'))">合同总金额:{{model.f_total_cost}}元</span>-->
26
- <span class="col-sm-3" v-show="!($login.f.f_fengongsi.includes('彩虹'))">合同金额:{{model.f_contract_money}}元</span>
27
- <span class="col-sm-3" v-show="!($login.f.f_fengongsi.includes('彩虹'))">减免金额:{{model.f_jmhj_cost}}元</span>
28
- <span class="col-sm-3" v-show="!($login.f.f_fengongsi.includes('彩虹'))">应交金额:{{model.f_budget_money}}元</span>
29
- <span class="col-sm-3" v-show="!($login.f.f_fengongsi.includes('彩虹'))">首付:{{model.f_payments}}元</span>
30
- <span class="col-sm-3" v-show="!($login.f.f_fengongsi.includes('彩虹'))">进度款:{{model.f_pro_payment}}元</span>
31
- <span class="col-sm-3" v-show="!($login.f.f_fengongsi.includes('彩虹'))">尾款:{{model.f_end_payment}}元</span>
32
- <span class="col-sm-3" v-show="!($login.f.f_fengongsi.includes('彩虹'))">追加款:{{model.f_additional_payment}}元</span>
33
- <span class="col-sm-3" v-show="!($login.f.f_fengongsi.includes('彩虹'))">累计缴费金额:{{model.f_cumulative_money}}元</span>
34
- <span class="col-sm-3" v-show="!($login.f.f_fengongsi.includes('彩虹'))">未结总金额:{{model.f_unaccounts_money}}元</span>
35
- <span class="col-sm-3"
36
- v-show="!($login.f.f_fengongsi.includes('彩虹'))">累计开票金额:{{model.f_cumulative_invoicing}}元</span>
37
- <span class="col-sm-3"
38
- v-show="!($login.f.f_fengongsi.includes('彩虹'))">未开票金额:{{model.f_residual_invoicing}}元</span>
39
- </div>
40
- <div class="col-sm-12">
41
- <button type="button" v-show="!showfee" class="btn btn-warning col-sm-2 pull-right" @click="add()">新增收费</button>
42
- </div>
43
- <div class="col-sm-12" style="height: auto">
44
- <div class="form-inline auto" style="margin-bottom: 5px;">
45
- </div>
46
- <div class="col-sm-12 span recordTable" style="margin-top: 10px;min-height: 350px">
47
- <partial-view v-ref:single-load>
48
- <data-grid :model="model" v-ref:grid>
49
- <template partial='head'>
50
- <tr>
51
- <th>序号</th>
52
- <th>收费金额(元)</th>
53
- <th>金额大写</th>
54
- <th>付款方式</th>
55
- <th>缴费状态</th>
56
- <th>收费人员</th>
57
- <th>收费项目</th>
58
- <th>票据类型</th>
59
- <th>发票号码</th>
60
- <th>是否冲正</th>
61
- <th>冲正发票号</th>
62
- <th>日期</th>
63
- <th>备注</th>
64
- <th v-show="!$parent.$parent.$parent.showfee">操作</th>
65
- </tr>
66
- </template>
67
- <template partial='body'>
68
- <td style="text-align: center">{{$index+1}}</td>
69
- <td style="text-align: center">{{row.f_charge_money}}</td>
70
- <td style="text-align: center">{{row.f_amount_words}}</td>
71
- <td style="text-align: center">{{row.f_payment_method}}</td>
72
- <td style="text-align: center">{{row.f_charging_status}}</td>
73
- <td style="text-align: center">{{row.f_charge_collectors}}</td>
74
- <td style="text-align: center">{{row.f_charge_item}}</td>
75
- <td style="text-align: center">{{row.f_bill_style}}</td>
76
- <td style="text-align: center">{{row.f_invoice_num}}</td>
77
- <td style="text-align: center">{{row.f_is_correct}}</td>
78
- <td style="text-align: center">{{row.f_correct_num}}</td>
79
- <td style="text-align: center">{{row.f_charge_date}}</td>
80
- <td style="text-align: center">{{row.f_charge_remarks}}</td>
81
- <td class="flex-around" v-show="!$parent.$parent.$parent.showfee">
82
- <button v-show="false" type="button" name="button" class="btn btn-link"
83
- @click.stop="$parent.$parent.$parent.tomakeup(row)">补开票据
84
- </button>
85
- <button v-if="(row.f_invoice_num !== '' && row.f_invoice_num !== null )||( row.f_correct_num !== '' && row.f_correct_num !== null)" type="button" name="button" class="btn btn-link"
86
- @click.stop="$parent.$parent.$parent.seeeticket(row)">查看票据
87
- </button>
88
- <button type="button" name="button" class="btn btn-link"
89
- @click.stop="$parent.$parent.$parent.tovoid(row)">冲正
90
- </button>
91
- </td>
92
- </template>
93
- </data-grid>
94
- </partial-view>
95
- </div>
96
- </div>
97
-
98
- <!--<div class="form-group col-sm-12">-->
99
- <!--<div class="col-sm-2">-->
100
- <!--<label class="control-label col-sm-12">收费备注:</label>-->
101
- <!--</div>-->
102
- <!--<div class="col-sm-10">-->
103
- <!--<textarea class="form-control" rows="3" v-model="model.f_payfee_remarks"></textarea>-->
104
- <!--</div>-->
105
- <!--</div>-->
106
- <div class="form-group col-sm-12">
107
- <div class="col-sm-6">
108
- <label class="control-label col-sm-4">分公司:</label>
109
- <div class="col-sm-8">
110
- <input class="form-control" type="text" v-model="model.f_filiale" disabled>
111
- </div>
112
- </div>
113
- <div class="col-sm-6">
114
- <label class="control-label col-sm-4">操作日期:</label>
115
- <div class="col-sm-8">
116
- <input class="form-control" type="text" v-model="model.f_payfee_date" disabled>
117
- </div>
118
- </div>
119
- </div>
120
- <div class="form-group col-sm-12">
121
- <div class="col-sm-6">
122
- <label class="control-label col-sm-4">部门:</label>
123
- <div class="col-sm-8">
124
- <input class="form-control" type="text" v-model="model.f_payfee_department" disabled>
125
- </div>
126
- </div>
127
- <div class="col-sm-6">
128
- <label class="control-label col-sm-4">操作人:</label>
129
- <div class="col-sm-8">
130
- <input class="form-control" type="text" v-model="model.f_payfee_operator" disabled>
131
- </div>
132
- </div>
133
- </div>
134
-
135
-
136
- <!-- <div class="from-group col-sm-12">
137
- <center>
138
- <button type="button" @click="goback()" class="btn btn-primary" style="width:80px; margin-left:50px;"
139
- :disabled="$v.invalid">
140
- 保存
141
- </button>
142
- <button type="button" @click="reset()" class="btn btn-warning" style="width:80px; margin-left:50px;">
143
- 撤销
144
- </button>
145
- </center>
146
- </div>-->
147
- <modal :show.sync="showpay" v-ref:modal backdrop="false">
148
- <header slot="modal-header" class="modal-header">
149
- <button type="button" class="close" @click="close"><span>&times;</span></button>
150
- <h4 class="modal-title">新增收费</h4>
151
- </header>
152
- <article slot="modal-body" class="modal-body">
153
- <div v-if="showpay">
154
- <div class="from-group">
155
- <label>合同金额(元)</label>
156
- <input type="text" class="form-control" v-model="model.f_contract_money" readonly>
157
- </div>
158
- <div class="from-group">
159
- <label>累计缴费金额(元)</label>
160
- <input type="text" class="form-control" v-model="model.f_cumulative_money" readonly>
161
- </div>
162
- <div class="from-group">
163
- <label>未结总金额(元)</label>
164
- <input type="text" class="form-control" v-model="model.f_unaccounts_money" readonly>
165
- </div>
166
- <div class="from-group">
167
- <label>金额(元)</label>
168
- <input type="text" :placeholder=model.f_unaccounts_money class="form-control"
169
- v-model="addItem.f_charge_money" @blur="check()">
170
- </div>
171
- <div class="from-group">
172
- <label>收费项目</label>
173
- <input-select v-model="addItem.f_charge_item" :options='chargeitems' :value.sync="addItem.f_charge_item" :valueSingle="true"></input-select>
174
- </div>
175
- <div class="from-group">
176
- <label>票据类型</label>
177
- <input-select v-model="addItem.f_bill_style" :options='billstyles' :value.sync="addItem.f_bill_style" :valueSingle="true"></input-select>
178
- </div>
179
- <div class="from-group">
180
- <label>付款方式</label>
181
- <input-select v-model="addItem.f_payment_method" :options='paymenttypes' :value.sync="addItem.f_payment_method" :valueSingle="true"></input-select>
182
- </div>
183
- <div class="from-group">
184
- <label>金额大写</label>
185
- <input type="text" class="form-control" v-model="getCapital" readonly>
186
- </div>
187
- <!--<div class="from-group">-->
188
- <!--<label>缴费类型</label>-->
189
-
190
- <!--<v-select :options="f_payment_type"-->
191
- <!--v-model="addItem.f_payment_typed" :value.sync="addItem.f_payment_typed" close-on-select>-->
192
- <!--</v-select>-->
193
- <!--</div>-->
194
- <div class="from-group" v-show = "false">
195
- <label>交费日期</label>
196
- <div>
197
- <datepicker width="600.76px;"
198
- disabled = "disabled"
199
- :value.sync="addItem.f_charge_date"
200
- :format="'yyyy-MM-dd'"
201
- v-model="addItem.f_charge_date" readonly="readonly"
202
- :show-reset-button="reset">
203
- </datepicker>
204
- </div>
205
- </div>
206
-
207
-
208
- <div class="from-group">
209
- <label>备注</label>
210
- <input type="text" class="form-control" v-model="addItem.f_charge_remarks">
211
- <!--<input-select :value.sync="addItem.f_charge_remarks" v-model="addItem.f_charge_remarks"-->
212
- <!--:options='feeoptions' @change="change" close-on-select></input-select>-->
213
- </div>
214
- </div>
215
- </article>
216
- <footer slot="modal-footer" class="modal-footer">
217
- <button v-show="showpay" type="button" class="btn btn-default" @click='close'>取消</button>
218
- <button v-show="showpay" type="button" class="btn btn-success" @click='confirm'>确认</button>
219
- </footer>
220
- </modal>
221
- <modal :show.sync="showbuyerinfo" v-ref:modal backdrop="false">
222
-
223
- <header slot="modal-header" class="modal-header">
224
- <button type="button" class="close" @click="closebuyerinfo"><span>&times;</span></button>
225
- <h4 class="modal-title">打印电子发票,请请选择购货方信息</h4>
226
- </header>
227
- <article slot="modal-body" class="modal-body">
228
- <div v-if="showbuyerinfo">
229
-
230
- <div class="col-sm-12 span recordTable" style="margin-top: 10px;min-height: 350px">
231
- <partial-view v-ref:single-load>
232
- <data-grid :model="buyerinfo" v-ref:grid>
233
- <template partial='head'>
234
- <tr>
235
- <th>序号</th>
236
- <th>购货方名称</th>
237
- <th>购货方纳税人识别号</th>
238
- <th>购货方地址、电话</th>
239
- <th>购货方开户行及账号</th>
240
- <th>购货方电子邮箱</th>
241
- <th>操作</th>
242
- </tr>
243
- </template>
244
- <template partial='body'>
245
- <td style="text-align: center">{{$index+1}}</td>
246
- <td style="text-align: center">{{row.f_buyer_name}}</td>
247
- <td style="text-align: center">{{row.f_buyer_identify}}</td>
248
- <td style="text-align: center">{{row.f_buyer_addphone}}</td>
249
- <td style="text-align: center">{{row.f_buyer_bank}}</td>
250
- <td style="text-align: center">{{row.f_buyer_email}}</td>
251
- <td style="text-align: center" >
252
- <button type="button" class="btn btn-success" @click='$parent.$parent.$parent.$parent.confirmbuyerinfo(row)'>选择</button>
253
- </td>
254
- </template>
255
- </data-grid>
256
- </partial-view>
257
- </div>
258
- </div>
259
- </article>
260
- <footer slot="modal-footer" class="modal-footer">
261
- <button v-show="showbuyerinfo" type="button" class="btn btn-default" @click='closebuyerinfo'>取消</button>
262
-
263
- </footer>
264
-
265
- </modal>
266
-
267
- </div>
268
- </template>
269
- <script>
270
- import {HttpResetClass} from 'vue-client'
271
- import InputAndSelect from "vue-client/src/vue-strap/src/InputAndSelect";
272
- import { DataModel } from 'vue-client'
273
-
274
- let gen = function* (self, val) {
275
- val.f_actualfee_type = val.f_actualfee_type[0]
276
- val.f_bill_type = val.f_bill_type[0]
277
- yield self.$resetpost('rs/logic/saveentity', {data: {tablename: 't_apply', parameters: val}})
278
- delete val.id
279
- self.$resetpost('rs/logic/saveentity', {data: {tablename: 't_record', parameters: val}})
280
- .then(() => {
281
- self.reset()
282
- })
283
- }
284
- export default {
285
- components: {InputAndSelect},
286
- title: '报装收费',
287
- data() {
288
- return {
289
- showpay: false, // 新增收费模态框开关
290
- showbuyerinfo: false, // 新增收费模态框开关
291
- selectsellid: null, //需要打票收费id
292
- buyerinfo:{
293
- id:'',
294
- f_buyer_name: '',
295
- f_buyer_identify: '',
296
- f_buyer_addphone: '',
297
- f_buyer_bank: '',
298
- f_buyer_email: '',
299
- rows: [] // 购货方信息
300
- },
301
- addItem: null, // 模态框数据
302
- model: {
303
- f_apply_num: '',//报建编号
304
- f_process_id: '',//流程ID
305
- f_payments: '',//首付
306
- f_pro_payment: '',//进度款
307
- f_end_payment: '',//尾款
308
- f_additional_payment: '',//追加款
309
- f_jmhj_cost: '',//减免金额
310
- subcost: 0, // 剩余付款
311
- f_total_cost: 0, // 总费用
312
- f_payfee_operator: '',//操作人
313
- f_payfee_department: '',//操作部门
314
- f_filiale: '',//分公司
315
- f_payfee_date: '',//操作日期
316
- f_contract_number: '',//合同编号
317
- f_cumulative_money: '',//累计缴费金额
318
- f_budget_money: '',//应交金额
319
- f_contract_money: '',//合同金额
320
- f_unaccounts_money: '',//未结总金额
321
- f_cumulative_invoicing: '',//--累计开票金额--
322
- f_residual_invoicing: '',//剩余开票金额
323
- f_main_contract_num: 0,//主合同编号
324
- rows: [] // 付费数据数组
325
- },
326
- f_payment_type: [
327
- {label: '分期', value: '分期'},
328
- {label: '一次付清', value: '一次付清'}
329
- ],
330
- chargemoney:0,
331
- chargeitems: this.$appdata.getParam('收费项目'),
332
- billstyles: this.$appdata.getParam('票据类型'),
333
- paymenttypes: this.$appdata.getParam('缴费类型'),
334
- bill: '' // 票数据
335
- }
336
- },
337
- props: ['infee', 'showfee'],
338
- ready() {
339
- this.load() // 初始化数据
340
- // console.log('this.model',this.model)
341
- // this.model.f_payfee_operator = this.$login.f.name
342
- // this.model.f_payfee_department = this.$login.f.f_parentname
343
- // this.model.f_filiale = this.$login.f.f_fengongsi
344
- // this.model.f_payfee_date = this.$login.toStandardDateString()
345
- // this.infee.f_actualfee_type = [this.infee.f_actualfee_type ? this.infee.f_actualfee_type : '']
346
- // this.infee.f_bill_type = [this.infee.f_bill_type ? this.infee.f_bill_type : '']
347
- // this.model = Object.assign({}, this.model, this.infee)
348
- // this.model.f_actualfee = '0'
349
- // this.model.f_actualfee_type = '现金缴费'
350
- // delete this.model.id
351
- },
352
- methods: {
353
- confirmbuyerinfo (args) {
354
- let drawbilldata = {
355
- sellid : this.selectsellid,
356
- buyerid : args.id,
357
- operator: this.$login.f.name
358
- }
359
- this.closebuyerinfo()
360
- this.$resetpost('rs/logic/applyDrawBill', {data: drawbilldata}, {resolveMsg: null, rejectMsg: "开发票失败"})
361
- .then((res) => {
362
- if (res.data.status === 200){
363
- let n = 0
364
- var id = setInterval(async ()=>{
365
- if(n>=3){
366
- this.$showMessage('电子票延迟,请稍后查看!')
367
- clearInterval(id)
368
- }
369
- if (this.seeeticket(res.data) === 'success'){
370
- clearInterval(id)
371
- this.load()
372
- }
373
- n++
374
- this.$showAlert('电子发票开票中,请稍后...', 'info',3000)
375
- },3000)
376
- }
377
- })
378
- },
379
- // 打印信息
380
- async printFee () {
381
- let res = await this.$resetpost('rs/report/printFee',{data: this.model}, {resolveMsg: null, rejectMsg: "提取数据出错,请重试!"})
382
- this.bill = res.data
383
- this.$nextTick(()=>{
384
- this.$refs.reportprint.print()
385
- })
386
- },
387
- // 输入金额校验
388
- check() {
389
- console.log('check')
390
- let re = /^[+-]?\d+(\.\d+)?$/ //判断字符串是否为数字
391
- if (!this.addItem.f_charge_money) {//判断缴费金额是否为空
392
- console.log('check1')
393
- this.addItem.f_charge_money = this.model.f_unaccounts_money
394
- } else {
395
- if (!re.test(this.addItem.f_charge_money)) {
396
- this.$showMessage("请输入数字")
397
- this.addItem.f_charge_money = ''
398
- return false
399
- }
400
- }
401
-
402
-
403
- return true
404
- },
405
- change() {
406
- // 解决模态框数据不刷新的问题
407
- if (this.addItem.f_charge_remarks === '开户费') {
408
- this.addItem.f_charge_money = this.infee.f_account_cost ? this.infee.f_account_cost : 0
409
- }
410
- if (this.addItem.f_charge_remarks === '入户安装费') {
411
- this.addItem.f_charge_money = this.infee.f_construction_cost ? this.infee.f_construction_cost : 0
412
- }
413
- if (this.addItem.f_charge_remarks === '材料费') {
414
- this.addItem.f_charge_money = this.infee.f_material_cost ? this.infee.f_material_cost : 0
415
- }
416
- if (this.addItem.f_charge_remarks === '人工费') {
417
- this.addItem.f_charge_money = this.infee.f_labor_cost ? this.infee.f_labor_cost : 0
418
- }
419
- if (this.addItem.f_charge_remarks === '改管费') {
420
- this.addItem.f_charge_money = this.infee.f_change_pipeline_cost ? this.infee.f_change_pipeline_cost : 0
421
- }
422
- if (this.addItem.f_charge_remarks === '设备安装费') {
423
- this.addItem.f_charge_money = this.infee.f_sbaz_cost ? this.infee.f_sbaz_cost : 0
424
- }
425
- },
426
- // 小写转换大写
427
- smalltoBIG(n) {
428
- let fraction = ['角', '分'];
429
- let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
430
- let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
431
- let head = n < 0 ? '欠' : '';
432
- n = Math.abs(n);
433
-
434
- let s = '';
435
-
436
- for (var i = 0; i < fraction.length; i++) {
437
- s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
438
- }
439
- s = s || '整';
440
- n = Math.floor(n);
441
-
442
- for (var i = 0; i < unit[0].length && n > 0; i++) {
443
- let p = '';
444
- for (var j = 0; j < unit[1].length && n > 0; j++) {
445
- p = digit[n % 10] + unit[1][j] + p;
446
- n = Math.floor(n / 10);
447
- }
448
- s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
449
- }
450
- return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
451
- },
452
- //新增收费 开启模态框
453
- add() {
454
- this.addItem = null
455
- this.showpay = true
456
- },
457
- // 关闭模态框
458
- close() {
459
- this.showpay = false
460
- this.addItem = null
461
- },
462
- // 关闭模态框
463
- closebuyerinfo() {
464
- this.showbuyerinfo = false
465
- this.selectsellid = null
466
- },
467
- // 模态框确定按钮保存数据
468
-
469
- //
470
- // f_cumulative_money: 0,//累计缴费金额
471
- // f_unaccounts_money: '',//未结总金额
472
- // f_cumulative_invoicing: '',//--累计开票金额--
473
- // f_residual_invoicing: '',//剩余开票金额
474
- async confirm() {
475
- let flag = this.check()
476
- if (!flag) {
477
- return
478
- }
479
- console.log('f_charge_money' + Number(this.addItem.f_charge_money))
480
- console.log('f_unaccounts_money' + Number(this.model.f_unaccounts_money))
481
-
482
- if (Number(this.addItem.f_charge_money) > Number(this.model.f_unaccounts_money)) {
483
- this.$showMessage("缴费金额不能大于剩余金额")
484
- } else if (this.addItem.f_charge_money == 0) {
485
- this.$showMessage("不能缴费0元")
486
- } else {
487
-
488
-
489
- // 累计缴费金额
490
- let flag1 = this.accAdd(Number(this.addItem.f_charge_money), Number(this.model.f_cumulative_money))
491
- // 未结金额
492
- let flag2 = this.accSub(Number(this.model.f_unaccounts_money), Number(this.addItem.f_charge_money))
493
-
494
-
495
- if (this.addItem.f_payment_typed == '') {
496
- this.addItem.f_payment_typed = '分期'
497
- console.log('为空')
498
- }
499
- let http = new HttpResetClass()
500
-
501
- // this.addItem.f_charge_money = this.addItem.f_charge_money
502
- // this.addItem.f_amount_words = this.addItem.f_amount_words
503
- // this.addItem.f_payment_type = this.addItem.f_payment_typed
504
- this.addItem.f_charge_collectors = this.$login.f.name
505
- // this.addItem.f_charge_date = this.addItem.f_charge_date
506
- // this.addItem.f_charge_remarks = this.addItem.f_charge_remarks
507
- this.addItem.f_filiale = this.$login.f.f_fengongsi
508
- this.addItem.f_process_id = this.infee.f_process_id
509
- this.addItem.f_apply_num = this.infee.f_apply_num
510
- this.model.rows.push(this.addItem)
511
- this.addItem.f_charging_status = '有效'
512
- this.addItem.f_is_correct = '否'
513
- let chargemoney= this.addItem.f_charge_money
514
- let chargeitem = this.addItem.f_f_charge_item
515
- let chargeremarks = this.addItem.f_charge_remarks?this.addItem.f_charge_remarks:''
516
- let chargebillstyle = this.addItem.f_bill_style
517
- this.chargemoney=this.addItem.f_charge_money
518
- let data = {
519
- tablename: 't_charge_record',
520
- parameters: this.addItem
521
- }
522
- // 生成收费记录的id
523
- let sellid = ''
524
- await http.load('POST', 'rs/logic/saveentity', {data: data}, {resolveMsg: null, rejectMsg: "添加失败"})
525
- .then((res) => {
526
- sellid = res.data.id
527
- this.close()
528
- })
529
-
530
-
531
- data = {
532
- f_cumulative_money: flag1,
533
- f_unaccounts_money: flag2,
534
- f_apply_num: this.infee.f_apply_num
535
- }
536
- await http.load('POST', 'rs/logic/updatechargemoney', {data: data}, {resolveMsg: null, rejectMsg: "添加累计金额失败"})
537
- .then((res) => {
538
- this.close()
539
- this.load()
540
- })
541
- console.log(this.model.f_cumulative_invoicing)
542
- console.log(chargemoney)
543
- console.log(this.model.f_cumulative_invoicing)
544
- console.log(this.model.f_residual_invoicing)
545
- if (this.$appdata.getSingleValue('默认打印票据') && this.$appdata.getSingleValue('默认打印票据') === '是'){
546
- this.$showMessage('是否打票据', ['confirm', 'cancel']).then((res) => {
547
- if (res === 'confirm') {
548
- console.log('打印票据')
549
- if (chargebillstyle === '电子发票') {
550
- this.selectsellid = sellid
551
- this.showbuyerinfo = true
552
-
553
- }
554
- } else {
555
- this.goback()
556
- }
557
- })
558
- }
559
- }
560
- },
561
- async invoice(val){
562
- console.log('打印票据')
563
- if (val.f_bill_style === '电子发票') {
564
- this.selectsellid = val.id
565
- this.showbuyerinfo = true
566
- /*this.$resetpost('rs/logic/applyDrawBill', {data: {sellid:val.id,operator:this.$login.f.name}}, {resolveMsg: null, rejectMsg: "开发票失败"})
567
- .then((res) => {
568
-
569
- if (res.data.status === 200){
570
- let n = 0
571
- var id = setInterval(async ()=>{
572
- if(n>=3){
573
- this.$showMessage('电子票延迟,请稍后在票据管理中查看!')
574
- clearInterval(id)
575
- }
576
- if (this.seeeticket(res.data) === 'success'){
577
- clearInterval(id)
578
- this.load()
579
- }
580
- n++
581
- this.$showAlert('电子发票开票中,请稍后...', 'info',3000)
582
- },3000)
583
- }else {
584
- this.$showAlert('电子发票开票失败', 'warning',3000)
585
- }
586
-
587
- })*/
588
- }
589
- /*let http = new HttpResetClass()
590
- let invoiceInterface = true//开发票接口的结果
591
- let flag1 = this.accAdd(Number(this.chargemoney), Number(this.model.f_cumulative_invoicing))
592
- let flag2 = this.accSub(Number(this.model.f_residual_invoicing), Number(this.chargemoney))
593
-
594
- if (invoiceInterface) {
595
- let data = {
596
- f_cumulative_invoicing: flag1,
597
- f_residual_invoicing: flag2,
598
- f_apply_num: this.infee.f_apply_num,
599
- f_invoice_num: '123'//发票号码,
600
- }
601
- await http.load('POST', 'rs/logic/updateinvoicemoney', {data: data}, {
602
- resolveMsg: null,
603
- rejectMsg: "修改开票金额失败"
604
- })
605
- .then((res) => {
606
- this.close()
607
- this.load()
608
- })
609
-
610
-
611
- } else {
612
- this.$showMessage('开发票失败')
613
- }*/
614
- },
615
-
616
- goback() {
617
- this.$dispatch('hiddenbtn')
618
- this.showview = false
619
- },
620
- async tovoid(val) {
621
- if (val.f_is_correct==='是' || val.f_charging_status !== '有效') {
622
- this.$showMessage('已冲正过,不能操作!')
623
- } else {
624
- this.$resetpost('rs/logic/applyCancelDrawBill', {data: {sellid:val.id}}, {
625
- resolveMsg: null,
626
- rejectMsg: '冲正失败'
627
- }).then((res) => {
628
- if (res.data.status === 200 ){
629
- if (val.f_bill_style === '电子发票') {
630
- let n = 0
631
- var id = setInterval(async ()=>{
632
- if(n>=3){
633
- this.$showMessage('电子票延迟,请稍后查看!')
634
- clearInterval(id)
635
- }
636
- if (this.seeeticket(res.data) === 'success'){
637
- clearInterval(id)
638
- this.load()
639
- }
640
- n++
641
- this.$showAlert('电子发票开票中,请稍后...', 'info',3000)
642
- },3000)
643
- }else {
644
- this.$showAlert('冲正成功','success',2000)
645
- }
646
- this.load()
647
- }
648
- })
649
-
650
- /*
651
- let correctionInterface = true//冲正接口的结果
652
- if (correctionInterface) {
653
- let http = new HttpResetClass()
654
- let data = {
655
- tablename: 't_charge_record',
656
- condition: `id = '${val.id}'`
657
- }
658
- let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
659
- resolveMsg: null,
660
- rejectMsg: '获取付款数据失败'
661
- })
662
- let flag1 = this.accSub(Number(this.model.f_cumulative_money), Number(val.f_charge_money)) //累计缴费金额
663
- let flag2 = this.accAdd(Number(this.model.f_unaccounts_money), Number(val.f_charge_money))//未结总金额
664
- let flag3 = Number(this.model.f_cumulative_invoicing)//--累计开票金额--
665
- let flag4 = Number(this.model.f_residual_invoicing)//剩余开票金额
666
- if (res.data[0].f_invoice_num) {
667
- flag3 = this.accSub(Number(this.model.f_cumulative_invoicing), Number(val.f_charge_money))
668
- flag4 = this.accAdd(Number(this.model.f_residual_invoicing), Number(val.f_charge_money))
669
- }
670
- data = {
671
- f_cumulative_money: flag1,
672
- f_unaccounts_money: flag2,
673
- f_cumulative_invoicing: flag3,
674
- f_residual_invoicing: flag4,
675
- f_apply_num: this.infee.f_apply_num,
676
- id: val.id
677
- }
678
- this.$resetpost('rs/logic/tovoidcharge', data, {resolveMsg: '冲正成功', rejectMsg: '冲正失败'}).then((res) => {
679
- this.load()
680
- })
681
- } else {
682
- this.$showMessage('冲正接口调用失败!')
683
- }*/
684
- }
685
- },
686
- tomakeup(val) {
687
- if (val.f_invoice_num ) {
688
- this.$showMessage('此记录有票据,不能操作!')
689
- }else{
690
- this.invoice(val)
691
- }
692
- },
693
- //根据票据流水号查看票据
694
- async seeeticket(val) {
695
- console.log('该票据流水号为:',val.f_fpqqlsh)
696
- var eticketData = await this.$resetpost('rs/sql/querySingleTable', {data:{items: 'f_bill_url,f_url_code',tablename: 't_eticket', condition: `f_serial_number=${val.f_fpqqlsh}` }}, {resolveMsg: null, rejectMsg: null})
697
- console.log('eticketData:',eticketData)
698
- var data = eticketData.data[0]
699
- if(data.f_bill_url && data.f_bill_url != ''){
700
- console.log(data)
701
- var auth = data.f_bill_url.split("/")
702
- console.log("截取",auth)
703
- var authCode = auth[auth.length-1]
704
- var url = `https://${auth[2]}/ent-views/fpExtract/get_fapiao.html?pwd=${data.f_url_code}&authCode=${authCode}`
705
- this.$showAlert('开票成功!', 'success',500)
706
- window.open(url)
707
- return 'success'
708
- }
709
- return 'fail'
710
- },
711
- accSub(arg1, arg2) {
712
- var r1, r2, m, n;
713
- try {
714
- r1 = arg1.toString().split(".")[1].length
715
- } catch (e) {
716
- r1 = 0
717
- }
718
- try {
719
- r2 = arg2.toString().split(".")[1].length
720
- } catch (e) {
721
- r2 = 0
722
- }
723
- m = Math.pow(10, Math.max(r1, r2));
724
- //last modify by deeka
725
- //动态控制精度长度
726
- n = (r1 >= r2) ? r1 : r2;
727
- return ((arg1 * m - arg2 * m) / m).toFixed(n);
728
- },
729
- reset() {
730
- this.$dispatch('close')
731
- this.$dispatch('selfsearch')
732
- },
733
- accAdd(arg1, arg2) {
734
- var r1, r2, m;
735
- try {
736
- r1 = arg1.toString().split(".")[1].length
737
- } catch (e) {
738
- r1 = 0
739
- }
740
- try {
741
- r2 = arg2.toString().split(".")[1].length
742
- } catch (e) {
743
- r2 = 0
744
- }
745
- m = Math.pow(10, Math.max(r1, r2))
746
- return (arg1 * m + arg2 * m) / m
747
- },
748
-
749
- // 获取数据
750
- async load() {
751
- let http = new HttpResetClass()
752
- let data = {
753
- tablename: 't_apply',
754
- condition: `f_process_id = '${this.infee.f_process_id}'`
755
- //
756
- }
757
- //获取报建信息
758
- let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {resolveMsg: null, rejectMsg: '获取报建信息失败'})
759
- Object.assign(this.model,this.model, res.data[0])
760
- data = {
761
- tablename: 't_charge_record',
762
- condition: `f_process_id = '${this.infee.f_process_id}'`
763
- }
764
- //获取付款详情信息
765
- res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {resolveMsg: null, rejectMsg: '获取付款数据失败'})
766
- // 去除付款时间的时分秒
767
- for (var i = 0; i < res.data.length; i++) {
768
- res.data[i].f_charge_date = res.data[i].f_charge_date.substring(0, 11)
769
- }
770
- this.model.rows = res.data
771
-
772
- //获取购货方信息
773
- data = {
774
- tablename: 't_buyer_info',
775
- condition: `f_process_id = '${this.infee.f_process_id}' and f_apply_num = '${this.infee.f_apply_num}'`
776
- }
777
- res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {resolveMsg: null, rejectMsg: '获取购货方信息失败'})
778
- this.buyerinfo.rows = res.data
779
-
780
- /*
781
- data = {
782
- tablename: 't_contract',
783
- condition: `processid = '${this.infee.f_process_id}'`
784
- }
785
-
786
- res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {resolveMsg: null, rejectMsg: '获取主合同编号失败'})
787
- for (var i = 0; i < res.data.length; i++) {
788
- if (res.data[i].f_contract_number) {
789
- this.model.f_main_contract_num = res.data[i].f_contract_number
790
- }
791
- }
792
-
793
-
794
- data = {
795
- tablename: 't_apply',
796
- condition: `f_apply_num = '${this.infee.f_apply_num}'`
797
- }
798
-
799
- res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {resolveMsg: null, rejectMsg: '获取累计数据失败'})
800
- this.model.f_cumulative_money = Number(res.data[0].f_cumulative_money)
801
- this.model.chargemoney = Number(res.data[0].f_cumulative_money)
802
- this.model.f_unaccounts_money = Number(res.data[0].f_unaccounts_money)
803
- this.model.f_cumulative_invoicing = Number(res.data[0].f_cumulative_invoicing)
804
- this.model.f_residual_invoicing = Number(res.data[0].f_residual_invoicing)*/
805
- }
806
- // confirm() {
807
- // // this.model.f_change_pipeline_cost = this.model.f_change_pipeline_cost
808
- // // this.model.f_material_cost = this.model.f_material_cost
809
- // // this.model.f_labor_cost = this.model.f_labor_cost
810
- // // this.model.f_sbaz_cost = this.model.f_sbaz_cost
811
- // // this.model.f_construction_cost = this.model.f_construction_cost
812
- // // this.model.f_total_cost = this.model.f_total_cost
813
- //
814
- // this.model.f_fee = this.model.f_actualfee
815
- // this.model.f_actualfee = Number(this.infee.f_actualfee) + Number(this.model.f_actualfee)
816
- // this.model.f_paytype = this.model.f_actualfee_type
817
- // this.model.f_payfeedate = this.model.f_payfee_date
818
- // this.model.f_payer = this.model.f_actualfee_user
819
- // this.model.applyid = this.model.id
820
- // this.model.f_state = '已交款'
821
- // this.model.f_operator = this.model.f_payfee_operator
822
- // this.model.f_date = this.model.f_payfee_date
823
- // this.model.f_department = this.model.f_payfee_department
824
- // // this.model.f_filiale = this.model.f_filiale
825
- // this.model.f_operat_type = '报建收费'
826
- // this.model.f_state = '有效'
827
- // this.model.f_describe = this.model.f_user_name + '缴费' + this.model.f_fee
828
- // console.log('输出model', this.model)
829
- // let getGen = gen(this, this.model)
830
- // co(getGen)
831
- // this.$dispatch('searchcard')
832
- // this.$dispatch('hiddenbtn')
833
- // },
834
- // reset() {
835
- // this.$dispatch('hiddenbtn')
836
- // // this.$dispatch('hiddenbtn')
837
- // }
838
- // },
839
-
840
- },
841
- computed: {
842
- // 计算大写
843
- getCapital() {
844
- if (this.addItem.f_charge_money) {
845
- this.addItem.f_amount_words = this.smalltoBIG(Number(this.addItem.f_charge_money))
846
- }
847
-
848
- return this.addItem.f_amount_words
849
- },
850
- subcost() {
851
- let temp = Number(this.model.f_total_cost)
852
- let temp2 = 0
853
- for (var i = 0; i < this.model.rows.length; i++) {
854
- temp2 += Number(this.model.rows[i].f_fee)
855
- }
856
- this.model.f_cumulative_money = Math.round(temp2 * 100) / 100
857
- this.model.subcost = Math.round((temp - temp2) * 100) / 100
858
- if (this.model.f_cumulative_money && this.model.f_jmhj_cost) {
859
- temp = Math.round((temp - Number(this.model.f_jmhj_cost)) * 100) / 100
860
- }
861
- this.model.subcost = Math.round((temp - temp2) * 100) / 100
862
- return this.model.subcost
863
- },
864
- // totalcost () {
865
- // this.model.f_total_cost = Number(this.model.f_construction_cost) + Number(this.model.f_material_cost)
866
- // + Number(this.model.f_labor_cost) + Number(this.model.f_change_pipeline_cost)
867
- // + Number(this.model.f_sbaz_cost) - Number(this.model.f_jmhj_cost)
868
- // return this.model.f_total_cost
869
- // },
870
- aaa() {
871
- this.model.f_jmhj_cost = Number(this.model.f_total_cost) - Number(this.model.f_actualfee)
872
- return this.model.f_jmhj_cost
873
- },
874
- feeoptions() {
875
- return this.$appdata.getParam('费用类型')
876
- },
877
- dayin() {
878
- return this.$appdata.getParam('打印格式')
879
- },
880
- jiaofei() {
881
- return this.$appdata.getParam('付款方式')
882
- // return [{label: '全部', value: ''}, ...AppData.getParam('缴费类型')]
883
- }
884
- },
885
- watch : {
886
- 'infee' (val) {
887
- this.load()
888
- }
889
- },
890
- }
891
- </script>
1
+ <template>
2
+ <div class="col-sm-12 auto select-overspread">
3
+ <div class="auto select-overspread">
4
+ <div class="panel panel-info">
5
+ <div class="panel-heading auto">
6
+ <h3 class="panel-title" style="display: inline-table">报装收费</h3>
7
+ <button v-if="showfee && showprint" type="button" style="float: right" class="btn btn-link" @click.stop="printFee()">打印</button>
8
+ </div>
9
+ </div>
10
+ </div>
11
+ <!--打印报表html-->
12
+ <div v-show="false">
13
+ <div class="row" style="display: flex;justify-content: center;" id='bill-fee2'>
14
+ {{{bill}}}
15
+ </div>
16
+ <report-print id='bill-fee2' top='15mm' left='5mm' width='90%' height='70%' :showbtn="false" preview="true" v-ref:reportprint></report-print>
17
+ </div>
18
+
19
+
20
+ <div class="col-sm-12">
21
+ <div class="col-sm-3 " v-show="!($login.f.f_fengongsi.includes('彩虹'))">
22
+ <label class="control-label-justify control-label col-sm-4" style=" margin-top: 7px;">合同编号:</label>
23
+ <div class="col-sm-8">
24
+ <input class="form-control" style="background-color: #f7fbff;" property="请输入" v-model="model.f_contract_number" readonly/>
25
+ </div>
26
+ </div>
27
+ <div class="col-sm-3 " v-show="!($login.f.f_fengongsi.includes('彩虹'))">
28
+ <label class="control-label-justify control-label col-sm-4" style=" margin-top: 7px;">合同金额:</label>
29
+ <div class="col-sm-8">
30
+ <input class="form-control" style="background-color: #f7fbff;" property="请输入" v-model="model.f_contract_money" readonly/>
31
+ </div>
32
+ </div>
33
+ <div class="col-sm-3 " v-show="!($login.f.f_fengongsi.includes('彩虹'))">
34
+ <label class="control-label-justify control-label col-sm-4" style=" margin-top: 7px;">减免金额:</label>
35
+ <div class="col-sm-8">
36
+ <input class="form-control" style="background-color: #f7fbff;" property="请输入" v-model="model.f_jmhj_cost" readonly/>
37
+ </div>
38
+ </div>
39
+ <div class="col-sm-3 " v-show="!($login.f.f_fengongsi.includes('彩虹'))">
40
+ <label class="control-label-justify control-label col-sm-4" style=" margin-top: 7px;">应交金额:</label>
41
+ <div class="col-sm-8">
42
+ <input class="form-control" style="background-color: #f7fbff;" property="请输入" v-model="model.f_budget_money" readonly/>
43
+ </div>
44
+ </div>
45
+ <div class="col-sm-3 " v-show="!($login.f.f_fengongsi.includes('彩虹'))">
46
+ <label class="control-label-justify control-label col-sm-4" style=" margin-top: 7px;">首付:</label>
47
+ <div class="col-sm-8">
48
+ <input class="form-control" style="background-color: #f7fbff;" property="请输入" v-model="model.f_payments" readonly/>
49
+ </div>
50
+ </div>
51
+ <div class="col-sm-3 " v-show="!($login.f.f_fengongsi.includes('彩虹'))">
52
+ <label class="control-label-justify control-label col-sm-4" style=" margin-top: 7px;">进度款:</label>
53
+ <div class="col-sm-8">
54
+ <input class="form-control" style="background-color: #f7fbff;" property="请输入" v-model="model.f_pro_payment" readonly/>
55
+ </div>
56
+ </div>
57
+ <div class="col-sm-3 " v-show="!($login.f.f_fengongsi.includes('彩虹'))">
58
+ <label class="control-label-justify control-label col-sm-4" style=" margin-top: 7px;">尾款:</label>
59
+ <div class="col-sm-8">
60
+ <input class="form-control" style="background-color: #f7fbff;" property="请输入" v-model="model.f_end_payment" readonly/>
61
+ </div>
62
+ </div>
63
+ <div class="col-sm-3 " v-show="!($login.f.f_fengongsi.includes('彩虹'))">
64
+ <label class="control-label-justify control-label col-sm-4" style=" margin-top: 7px;">追加款:</label>
65
+ <div class="col-sm-8">
66
+ <input class="form-control" style="background-color: #f7fbff;" property="请输入" v-model="model.f_additional_payment" readonly/>
67
+ </div>
68
+ </div>
69
+ <div class="col-sm-3 " v-show="!($login.f.f_fengongsi.includes('彩虹'))">
70
+ <label class="control-label-justify control-label col-sm-4" style=" margin-top: 7px;">累计缴费金额:</label>
71
+ <div class="col-sm-8">
72
+ <input class="form-control" style="background-color: #f7fbff;" property="请输入" v-model="model.f_cumulative_money" readonly/>
73
+ </div>
74
+ </div>
75
+ <div class="col-sm-3 " v-show="!($login.f.f_fengongsi.includes('彩虹'))">
76
+ <label class="control-label-justify control-label col-sm-4" style=" margin-top: 7px;">未结总金额:</label>
77
+ <div class="col-sm-8">
78
+ <input class="form-control" style="background-color: #f7fbff;" property="请输入" v-model="model.f_unaccounts_money" readonly/>
79
+ </div>
80
+ </div>
81
+ <div class="col-sm-3 " v-show="!($login.f.f_fengongsi.includes('彩虹'))">
82
+ <label class="control-label-justify control-label col-sm-4" style=" margin-top: 7px;">累计开票金额:</label>
83
+ <div class="col-sm-8">
84
+ <!--<input class="form-control" style="background-color: #f7fbff;" property="请输入" v-model="model.f_cumulative_invoicing" readonly/>-->
85
+ <input class="form-control" style="background-color: #f7fbff;" property="请输入" v-model="model.f_cumulative_invoicing" readonly/>
86
+ </div>
87
+ </div>
88
+ <div class="col-sm-3 " v-show="!($login.f.f_fengongsi.includes('彩虹'))">
89
+ <label class="control-label-justify control-label col-sm-4" style=" margin-top: 7px;">未开票金额:</label>
90
+ <div class="col-sm-8">
91
+ <input class="form-control" style="background-color: #f7fbff;" property="请输入" v-model="model.f_residual_invoicing" readonly/>
92
+ </div>
93
+ </div>
94
+ <!--<span class="col-sm-3" v-show="!($login.f.f_fengongsi.includes('彩虹'))">合同编号:{{model.f_contract_number}}</span>-->
95
+ <!--&lt;!&ndash;<span class="col-sm-3" v-show="!($login.f.f_fengongsi.includes('彩虹'))">缴费类型(未定):{{}}元</span>&ndash;&gt;-->
96
+ <!--&lt;!&ndash;<span class="col-sm-3" v-show="!($login.f.f_fengongsi.includes('彩虹'))">合同总金额:{{model.f_total_cost}}元</span>&ndash;&gt;-->
97
+ <!--<span class="col-sm-3" v-show="!($login.f.f_fengongsi.includes('彩虹'))">合同金额:{{model.f_contract_money}}元</span>-->
98
+ <!--<span class="col-sm-3" v-show="!($login.f.f_fengongsi.includes('彩虹'))">减免金额:{{model.f_jmhj_cost}}元</span>-->
99
+ <!--<span class="col-sm-3" v-show="!($login.f.f_fengongsi.includes('彩虹'))">应交金额:{{model.f_budget_money}}元</span>-->
100
+ <!--<span class="col-sm-3" v-show="!($login.f.f_fengongsi.includes('彩虹'))">首付:{{model.f_payments}}元</span>-->
101
+ <!--<span class="col-sm-3" v-show="!($login.f.f_fengongsi.includes('彩虹'))">进度款:{{model.f_pro_payment}}元</span>-->
102
+ <!--<span class="col-sm-3" v-show="!($login.f.f_fengongsi.includes('彩虹'))">尾款:{{model.f_end_payment}}元</span>-->
103
+ <!--<span class="col-sm-3" v-show="!($login.f.f_fengongsi.includes('彩虹'))">追加款:{{model.f_additional_payment}}元</span>-->
104
+ <!--<span class="col-sm-3" v-show="!($login.f.f_fengongsi.includes('彩虹'))">累计缴费金额:{{model.f_cumulative_money}}元</span>-->
105
+ <!--<span class="col-sm-3" v-show="!($login.f.f_fengongsi.includes('彩虹'))">未结总金额:{{model.f_unaccounts_money}}元</span>-->
106
+ <!--<span class="col-sm-3"-->
107
+ <!--v-show="!($login.f.f_fengongsi.includes('彩虹'))">累计开票金额:{{model.f_cumulative_invoicing}}元</span>-->
108
+ <!--<span class="col-sm-3"-->
109
+ <!--v-show="!($login.f.f_fengongsi.includes('彩虹'))">未开票金额:{{model.f_residual_invoicing}}元</span>-->
110
+ </div>
111
+ <div class="col-sm-12">
112
+ <!--<button type="button" v-show="!showfee" class="btn btn-success col-sm-2" @click="load()">刷新</button>-->
113
+ <h5 class="col-sm-6" style="color: red;text-align: center" v-show="showMsg" >提醒:有补充协议</h5>
114
+ <button type="button" class="btn btn-warning col-sm-2" style="text-align: center" @click="showProtocol" v-show="showMsg">查看补充协议</button>
115
+ <button type="button" v-show="!showfee && showprint" class="btn btn-warning col-sm-2 pull-right" @click="add()">新增收费</button>
116
+ </div>
117
+ <div class="col-sm-12" style="height: auto">
118
+ <div class="form-inline auto" style="margin-bottom: 5px;">
119
+ </div>
120
+ <div class="col-sm-12 span recordTable" style="margin-top: 10px;">
121
+ <partial-view v-ref:single-load>
122
+ <data-grid :model="model" v-ref:grid>
123
+ <template partial='head'>
124
+ <tr>
125
+ <th><nobr>序号</nobr></th>
126
+ <th><nobr>收费金额(元)</nobr></th>
127
+ <th><nobr>金额大写</nobr></th>
128
+ <th><nobr>付款方式</nobr></th>
129
+ <th><nobr>缴费状态</nobr></th>
130
+ <th><nobr>收费人员</nobr></th>
131
+ <th><nobr>收费日期</nobr></th>
132
+ <th><nobr>收费项目</nobr></th>
133
+ <th><nobr>票据类型</nobr></th>
134
+ <th><nobr>发票号码</nobr></th>
135
+ <th><nobr>是否冲正</nobr></th>
136
+ <th><nobr>冲正发票号</nobr></th>
137
+ <th><nobr>冲正人</nobr></th>
138
+ <th><nobr>冲正日期</nobr></th>
139
+ <th><nobr>备注</nobr></th>
140
+ <th v-show="!$parent.$parent.$parent.showfee">操作</th>
141
+ </tr>
142
+ </template>
143
+ <template partial='body'>
144
+ <td style="text-align: center">{{$index+1}}</td>
145
+ <td style="text-align: center">{{row.f_charge_money}}</td>
146
+ <td style="text-align: center">{{row.f_amount_words}}</td>
147
+ <td style="text-align: center">{{row.f_payment_method}}</td>
148
+ <td style="text-align: center">{{row.f_charging_status}}</td>
149
+ <td style="text-align: center">{{row.f_charge_collectors}}</td>
150
+ <td style="text-align: center">{{row.f_charge_date}}</td>
151
+ <td style="text-align: center">{{row.f_charge_item}}</td>
152
+ <td style="text-align: center">{{row.f_bill_style}}</td>
153
+ <td style="text-align: center">{{row.f_invoice_num}}</td>
154
+ <td style="text-align: center">{{row.f_is_correct}}</td>
155
+ <td style="text-align: center">{{row.f_correct_num}}</td>
156
+ <td style="text-align: center">{{row.f_correct_person}}</td>
157
+ <td style="text-align: center">{{row.f_correct_date}}</td>
158
+ <td style="text-align: center">{{row.f_charge_remarks}}</td>
159
+ <td class="flex-around" v-show="!$parent.$parent.$parent.showfee">
160
+ <button v-show="false" type="button" name="button" class="btn btn-link"
161
+ @click.stop="$parent.$parent.$parent.tomakeup(row)">补开票据
162
+ </button>
163
+ <button v-if="(row.f_invoice_num !== '' && row.f_invoice_num !== null )||( row.f_correct_num !== '' && row.f_correct_num !== null)" type="button" name="button" class="btn btn-link"
164
+ @click.stop="$parent.$parent.$parent.seeeticket(row)">查看票据
165
+ </button>
166
+ <button type="button" name="button" class="btn btn-link"
167
+ @click.stop="$parent.$parent.$parent.tovoid(row)" v-if="row.f_is_correct=='否' && $parent.$parent.$parent.showprint && $parent.$parent.$parent.hasFlag">冲正
168
+ </button>
169
+ </td>
170
+ </template>
171
+ </data-grid>
172
+ </partial-view>
173
+ </div>
174
+ </div>
175
+
176
+
177
+ <!-- onetomany新增模态框 -->
178
+ <modal :show.sync="showadd" v-ref:modal backdrop="false" class="auto">
179
+ <header slot="modal-header" class="modal-header auto">
180
+ <button type="button" class="close" @click="closeadd"><span>&times;</span></button>
181
+ </header>
182
+ <article slot="modal-body" class="modal-body auto">
183
+ <addcontract :addcontract = "infee" :edit="false" v-if="showadd"></addcontract>
184
+ </article>
185
+ <footer slot="modal-footer" class="modal-footer auto">
186
+ </footer>
187
+ </modal>
188
+
189
+ <!--<div class="form-group col-sm-12">-->
190
+ <!--<div class="col-sm-2">-->
191
+ <!--<label class="control-label col-sm-12">收费备注:</label>-->
192
+ <!--</div>-->
193
+ <!--<div class="col-sm-10">-->
194
+ <!--<textarea class="form-control" rows="3" v-model="model.f_payfee_remarks"></textarea>-->
195
+ <!--</div>-->
196
+ <!--</div>-->
197
+ <!--<div class="form-group col-sm-12">-->
198
+ <!--<div class="col-sm-6">-->
199
+ <!--<label class="control-label col-sm-4">分公司:</label>-->
200
+ <!--<div class="col-sm-8">-->
201
+ <!--<input class="form-control" type="text" v-model="model.f_filiale" disabled>-->
202
+ <!--</div>-->
203
+ <!--</div>-->
204
+ <!--<div class="col-sm-6">-->
205
+ <!--<label class="control-label col-sm-4">操作日期:</label>-->
206
+ <!--<div class="col-sm-8">-->
207
+ <!--<input class="form-control" type="text" v-model="model.f_payfee_date" disabled>-->
208
+ <!--</div>-->
209
+ <!--</div>-->
210
+ <!--</div>-->
211
+ <!--<div class="form-group col-sm-12">-->
212
+ <!--<div class="col-sm-6">-->
213
+ <!--<label class="control-label col-sm-4">部门:</label>-->
214
+ <!--<div class="col-sm-8">-->
215
+ <!--<input class="form-control" type="text" v-model="model.f_payfee_department" disabled>-->
216
+ <!--</div>-->
217
+ <!--</div>-->
218
+ <!--<div class="col-sm-6">-->
219
+ <!--<label class="control-label col-sm-4">操作人:</label>-->
220
+ <!--<div class="col-sm-8">-->
221
+ <!--<input class="form-control" type="text" v-model="model.f_payfee_operator" disabled>-->
222
+ <!--</div>-->
223
+ <!--</div>-->
224
+ <!--</div>-->
225
+
226
+
227
+ <!-- <div class="from-group col-sm-12">
228
+ <center>
229
+ <button type="button" @click="goback()" class="btn btn-primary" style="width:80px; margin-left:50px;"
230
+ :disabled="$v.invalid">
231
+ 保存
232
+ </button>
233
+ <button type="button" @click="reset()" class="btn btn-warning" style="width:80px; margin-left:50px;">
234
+ 撤销
235
+ </button>
236
+ </center>
237
+ </div>-->
238
+ <modal :show.sync="showpay" v-ref:modal backdrop="false">
239
+ <header slot="modal-header" class="modal-header">
240
+ <button type="button" class="close" @click="close"><span>&times;</span></button>
241
+ <h4 class="modal-title">新增收费</h4>
242
+ </header>
243
+ <article slot="modal-body" class="modal-body">
244
+ <div v-if="showpay">
245
+ <div class="from-group">
246
+ <label>合同金额(元)</label>
247
+ <input type="text" class="form-control" v-model="model.f_contract_money" readonly>
248
+ </div>
249
+ <div class="from-group">
250
+ <label>累计缴费金额(元)</label>
251
+ <input type="text" class="form-control" v-model="model.f_cumulative_money" readonly>
252
+ </div>
253
+ <div class="from-group">
254
+ <label>未结总金额(元)</label>
255
+ <input type="text" class="form-control" v-model="model.f_unaccounts_money" readonly>
256
+ </div>
257
+ <div class="from-group">
258
+ <label>金额(元)</label>
259
+ <input type="text" :placeholder=model.f_unaccounts_money class="form-control"
260
+ v-model="addItem.f_charge_money" @blur="check()">
261
+ </div>
262
+ <div class="from-group">
263
+ <label>收费项目</label>
264
+ <input-select v-model="addItem.f_charge_item" :options='chargeitems' :value.sync="addItem.f_charge_item" :valueSingle="true"></input-select>
265
+ </div>
266
+ <div class="from-group">
267
+ <label>票据类型</label>
268
+ <input-select v-model="addItem.f_bill_style" :options='billstyles' :value.sync="addItem.f_bill_style" :valueSingle="true"></input-select>
269
+ </div>
270
+ <div class="from-group">
271
+ <label>报装付款方式</label>
272
+ <input-select v-model="addItem.f_payment_method" :options='paymenttypes' :value.sync="addItem.f_payment_method" :valueSingle="true"></input-select>
273
+ </div>
274
+ <div class="from-group">
275
+ <label>金额大写</label>
276
+ <input type="text" class="form-control" v-model="getCapital" readonly>
277
+ </div>
278
+ <!--<div class="from-group">-->
279
+ <!--<label>缴费类型</label>-->
280
+
281
+ <!--<v-select :options="f_payment_type"-->
282
+ <!--v-model="addItem.f_payment_typed" :value.sync="addItem.f_payment_typed" close-on-select>-->
283
+ <!--</v-select>-->
284
+ <!--</div>-->
285
+ <div class="from-group" v-show = "false">
286
+ <label>交费日期</label>
287
+ <div>
288
+ <datepicker width="600.76px;"
289
+ disabled = "disabled"
290
+ :value.sync="addItem.f_charge_date"
291
+ :format="'yyyy-MM-dd'"
292
+ v-model="addItem.f_charge_date" readonly="readonly"
293
+ :show-reset-button="reset">
294
+ </datepicker>
295
+ </div>
296
+ </div>
297
+
298
+
299
+ <div class="from-group">
300
+ <label>备注</label>
301
+ <input type="text" class="form-control" v-model="addItem.f_charge_remarks">
302
+ <!--<input-select :value.sync="addItem.f_charge_remarks" v-model="addItem.f_charge_remarks"-->
303
+ <!--:options='feeoptions' @change="change" close-on-select></input-select>-->
304
+ </div>
305
+ </div>
306
+ </article>
307
+ <footer slot="modal-footer" class="modal-footer">
308
+ <button v-show="showpay" type="button" class="btn btn-default" @click='close'>取消</button>
309
+ <button v-show="showpay" type="button" class="btn btn-success" @click='confirm'>确认</button>
310
+ </footer>
311
+ </modal>
312
+ <modal :show.sync="showbuyerinfo" v-ref:modal backdrop="false">
313
+
314
+ <header slot="modal-header" class="modal-header">
315
+ <button type="button" class="close" @click="closebuyerinfo"><span>&times;</span></button>
316
+ <h4 class="modal-title">打印电子发票,请请选择购货方信息</h4>
317
+ </header>
318
+ <article slot="modal-body" class="modal-body">
319
+ <div v-if="showbuyerinfo">
320
+
321
+ <div class="col-sm-12 span recordTable" style="margin-top: 10px;min-height: 350px">
322
+ <partial-view v-ref:single-load>
323
+ <data-grid :model="buyerinfo" v-ref:grid>
324
+ <template partial='head'>
325
+ <tr>
326
+ <th>序号</th>
327
+ <th>购货方名称</th>
328
+ <th>购货方纳税人识别号</th>
329
+ <th>购货方地址、电话</th>
330
+ <th>购货方开户行及账号</th>
331
+ <th>购货方电子邮箱</th>
332
+ <th>操作</th>
333
+ </tr>
334
+ </template>
335
+ <template partial='body'>
336
+ <td style="text-align: center">{{$index+1}}</td>
337
+ <td style="text-align: center">{{row.f_buyer_name}}</td>
338
+ <td style="text-align: center">{{row.f_buyer_identify}}</td>
339
+ <td style="text-align: center">{{row.f_buyer_addphone}}</td>
340
+ <td style="text-align: center">{{row.f_buyer_bank}}</td>
341
+ <td style="text-align: center">{{row.f_buyer_email}}</td>
342
+ <td style="text-align: center" >
343
+ <button type="button" class="btn btn-success" @click='$parent.$parent.$parent.$parent.confirmbuyerinfo(row)'>选择</button>
344
+ </td>
345
+ </template>
346
+ </data-grid>
347
+ </partial-view>
348
+ </div>
349
+ </div>
350
+ </article>
351
+ <footer slot="modal-footer" class="modal-footer">
352
+ <button v-show="showbuyerinfo" type="button" class="btn btn-default" @click='closebuyerinfo'>取消</button>
353
+
354
+ </footer>
355
+
356
+ </modal>
357
+
358
+ </div>
359
+ </template>
360
+ <script>
361
+ import {HttpResetClass} from 'vue-client'
362
+ import InputAndSelect from "vue-client/src/vue-strap/src/InputAndSelect";
363
+ import { DataModel } from 'vue-client'
364
+
365
+ let gen = function* (self, val) {
366
+ val.f_actualfee_type = val.f_actualfee_type[0]
367
+ val.f_bill_type = val.f_bill_type[0]
368
+ yield self.$resetpost('rs/logic/saveentity', {data: {tablename: 't_apply', parameters: val}})
369
+ delete val.id
370
+ self.$resetpost('rs/logic/saveentity', {data: {tablename: 't_record', parameters: val}})
371
+ .then(() => {
372
+ self.reset()
373
+ })
374
+ }
375
+ export default {
376
+ components: {InputAndSelect},
377
+ title: '报装收费',
378
+ data() {
379
+ return {
380
+ hasFlag:false,
381
+ intervalId:null, // 定时查询
382
+ showadd:false, // 补充协议模态框控制
383
+ showMsg:false, // 显示补充协议提示语
384
+ showpay: false, // 新增收费模态框开关
385
+ showbuyerinfo: false, // 新增收费模态框开关
386
+ selectsellid: null, //需要打票收费id
387
+ buyerinfo:{
388
+ id:'',
389
+ f_buyer_name: '',
390
+ f_buyer_identify: '',
391
+ f_buyer_addphone: '',
392
+ f_buyer_bank: '',
393
+ f_buyer_email: '',
394
+ rows: [] // 购货方信息
395
+ },
396
+ addItem: null, // 模态框数据
397
+ model: {
398
+ f_apply_num: '',//报建编号
399
+ f_process_id: '',//流程ID
400
+ f_payments: '',//首付
401
+ f_pro_payment: '',//进度款
402
+ f_end_payment: '',//尾款
403
+ f_additional_payment: '',//追加款
404
+ f_jmhj_cost: '',//减免金额
405
+ subcost: 0, // 剩余付款
406
+ f_total_cost: 0, // 总费用
407
+ f_payfee_operator: '',//操作人
408
+ f_payfee_department: '',//操作部门
409
+ f_filiale: '',//分公司
410
+ f_payfee_date: '',//操作日期
411
+ f_contract_number: '',//合同编号
412
+ f_cumulative_money: '',//累计缴费金额
413
+ f_budget_money: '',//应交金额
414
+ f_contract_money: '',//合同金额
415
+ f_unaccounts_money: '',//未结总金额
416
+ f_cumulative_invoicing: '',//--累计开票金额--
417
+ f_residual_invoicing: '',//剩余开票金额
418
+ f_main_contract_num: 0,//主合同编号
419
+ rows: [] // 付费数据数组
420
+ },
421
+ f_payment_type: [
422
+ {label: '分期', value: '分期'},
423
+ {label: '一次付清', value: '一次付清'}
424
+ ],
425
+ chargemoney:0,
426
+ chargeitems: this.$appdata.getParam('收费项目'),
427
+ billstyles: this.$appdata.getParam('票据类型'),
428
+ paymenttypes: this.$appdata.getParam('报装付款方式'),
429
+ bill: '' // 票数据
430
+ }
431
+ },
432
+ // props: ['infee', 'showfee'],
433
+ props:{
434
+ infee: {
435
+ typr: Object,
436
+ default: {}
437
+ },
438
+ showfee: {
439
+ type: Boolean,
440
+ default: false
441
+ },
442
+ showprint: {
443
+ type: Boolean,
444
+ default: true
445
+ }
446
+ },
447
+ ready() {
448
+ if(this.$login.f.rolesnames.includes("报装收费冲正权限")){
449
+ this.hasFlag = true
450
+ }
451
+ this.load()
452
+ this.intervalId = setInterval(() => {
453
+ this.load()
454
+ }, 10000)
455
+ // 初始化数据
456
+ // console.log('this.model',this.model)
457
+ // this.model.f_payfee_operator = this.$login.f.name
458
+ // this.model.f_payfee_department = this.$login.f.f_parentname
459
+ // this.model.f_filiale = this.$login.f.f_fengongsi
460
+ // this.model.f_payfee_date = this.$login.toStandardDateString()
461
+ // this.infee.f_actualfee_type = [this.infee.f_actualfee_type ? this.infee.f_actualfee_type : '']
462
+ // this.infee.f_bill_type = [this.infee.f_bill_type ? this.infee.f_bill_type : '']
463
+ // this.model = Object.assign({}, this.model, this.infee)
464
+ // this.model.f_actualfee = '0'
465
+ // this.model.f_actualfee_type = '现金缴费'
466
+ // delete this.model.id
467
+ },
468
+ beforeDestroy () {
469
+ clearInterval(this.intervalId)
470
+ },
471
+ methods: {
472
+ // 显示补充协议
473
+ async showProtocol(){
474
+ this.showadd = true
475
+ //获取购货方信息
476
+ // http = new HttpResetClass()
477
+ // data = {
478
+ // tablename: 't_buyer_info',
479
+ // condition: `f_process_id = '${this.infee.f_process_id}' and f_apply_num = '${this.infee.f_apply_num}'`
480
+ // }
481
+ // let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {resolveMsg: null, rejectMsg: '获取购货方信息失败'})
482
+ },
483
+ async printbill (sellid) {
484
+ let result = await this.$resetpost('rs/report/billReport',{data: {condition:`f_sell_id = ${sellid}`}}, {resolveMsg: null, rejectMsg: "提取数据出错,请重试!"})
485
+ this.bill = result.data
486
+ this.$nextTick(()=>{
487
+ this.$refs.reportprint.print()
488
+ })
489
+ },
490
+ confirmbuyerinfo (args) {
491
+ let drawbilldata = {
492
+ sellid : this.selectsellid,
493
+ buyerid : args.id,
494
+ operator: this.$login.f.name
495
+ }
496
+ this.closebuyerinfo()
497
+ this.$resetpost('rs/logic/applyDrawBill', {data: drawbilldata}, {resolveMsg: "开票发送成功", rejectMsg: null})
498
+ .then((res) => {
499
+ if (res.data.status === 200){
500
+ this.$showAlert('申请开具增值税电子发票成功,请稍后到报建功能中【报建收费】中查看电子发票', 'success',5000)
501
+ /*let n = 0
502
+ var id = setInterval(async ()=>{
503
+ if(n>=3){
504
+ this.$showMessage('电子票延迟,请稍后查看!')
505
+ clearInterval(id)
506
+ }
507
+ if (this.seeeticket(res.data) === 'success'){
508
+ clearInterval(id)
509
+ this.load()
510
+ }
511
+ n++
512
+ this.$showAlert('电子发票开票中,请稍后...', 'info',3000)
513
+ },3000)*/
514
+ }else {
515
+ this.$showAlert('电子发票开票失败,失败代码为:' + res.data.status , 'warning',3000)
516
+ }
517
+ })
518
+ },
519
+ // 打印信息
520
+ async printFee () {
521
+ // 将所有null转为空字符串
522
+ let printdata = this.model
523
+ for (var k in printdata) {
524
+ if (printdata[k] == null){
525
+ printdata[k] = ''
526
+ }
527
+ }
528
+ let res = await this.$resetpost('rs/report/printFee',{data: printdata}, {resolveMsg: null, rejectMsg: "提取数据出错,请重试!"})
529
+ this.bill = res.data
530
+ this.$nextTick(()=>{
531
+ this.$refs.reportprint.print()
532
+ })
533
+ },
534
+ // 关闭模态框
535
+ closeadd(){
536
+ this.showadd = false
537
+ },
538
+ // 输入金额校验
539
+ check() {
540
+ console.log('check')
541
+ let re = /^[+-]?\d+(\.\d+)?$/ //判断字符串是否为数字
542
+ if (!this.addItem.f_charge_money) {//判断缴费金额是否为空
543
+ console.log('check1')
544
+ this.addItem.f_charge_money = this.model.f_unaccounts_money
545
+ } else {
546
+ if (!re.test(this.addItem.f_charge_money)) {
547
+ this.$showMessage("请输入数字")
548
+ this.addItem.f_charge_money = ''
549
+ return false
550
+ }
551
+ }
552
+
553
+
554
+ return true
555
+ },
556
+ change() {
557
+ // 解决模态框数据不刷新的问题
558
+ if (this.addItem.f_charge_remarks === '开户费') {
559
+ this.addItem.f_charge_money = this.infee.f_account_cost ? this.infee.f_account_cost : 0
560
+ }
561
+ if (this.addItem.f_charge_remarks === '入户安装费') {
562
+ this.addItem.f_charge_money = this.infee.f_construction_cost ? this.infee.f_construction_cost : 0
563
+ }
564
+ if (this.addItem.f_charge_remarks === '材料费') {
565
+ this.addItem.f_charge_money = this.infee.f_material_cost ? this.infee.f_material_cost : 0
566
+ }
567
+ if (this.addItem.f_charge_remarks === '人工费') {
568
+ this.addItem.f_charge_money = this.infee.f_labor_cost ? this.infee.f_labor_cost : 0
569
+ }
570
+ if (this.addItem.f_charge_remarks === '改管费') {
571
+ this.addItem.f_charge_money = this.infee.f_change_pipeline_cost ? this.infee.f_change_pipeline_cost : 0
572
+ }
573
+ if (this.addItem.f_charge_remarks === '设备安装费') {
574
+ this.addItem.f_charge_money = this.infee.f_sbaz_cost ? this.infee.f_sbaz_cost : 0
575
+ }
576
+ },
577
+ // 小写转换大写
578
+ smalltoBIG(n) {
579
+ let fraction = ['角', '分'];
580
+ let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
581
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
582
+ let head = n < 0 ? '欠' : '';
583
+ n = Math.abs(n);
584
+
585
+ let s = '';
586
+
587
+ for (var i = 0; i < fraction.length; i++) {
588
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
589
+ }
590
+ s = s || '整';
591
+ n = Math.floor(n);
592
+
593
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
594
+ let p = '';
595
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
596
+ p = digit[n % 10] + unit[1][j] + p;
597
+ n = Math.floor(n / 10);
598
+ }
599
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
600
+ }
601
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
602
+ },
603
+ //新增收费 开启模态框
604
+ add() {
605
+ this.addItem = {}
606
+ if(this.infee.f_pay_type){
607
+ // this.paymenttypes= [{label: this.infee.f_pay_type, value: this.infee.f_pay_type}, ...this.$appdata.getParam('付款方式'),]
608
+ this.addItem.f_payment_method = ''
609
+ this.addItem.f_payment_method = this.infee.f_pay_type
610
+ this.addItem.f_charge_remarks = this.infee.f_remarks
611
+ }
612
+ this.showpay = true
613
+ },
614
+ // 关闭模态框
615
+ close() {
616
+ this.showpay = false
617
+ this.addItem = null
618
+ },
619
+ // 关闭模态框
620
+ closebuyerinfo() {
621
+ this.showbuyerinfo = false
622
+ this.selectsellid = null
623
+ },
624
+ // 模态框确定按钮保存数据
625
+
626
+ //
627
+ // f_cumulative_money: 0,//累计缴费金额
628
+ // f_unaccounts_money: '',//未结总金额
629
+ // f_cumulative_invoicing: '',//--累计开票金额--
630
+ // f_residual_invoicing: '',//剩余开票金额
631
+ async confirm() {
632
+ let flag = this.check()
633
+ if (!flag) {
634
+ return
635
+ }
636
+ console.log('f_charge_money' + Number(this.addItem.f_charge_money))
637
+ console.log('f_unaccounts_money' + Number(this.model.f_unaccounts_money))
638
+
639
+ if (Number(this.addItem.f_charge_money) > Number(this.model.f_unaccounts_money)) {
640
+ this.$showMessage("缴费金额不能大于剩余金额")
641
+ } else if (this.addItem.f_charge_money == 0) {
642
+ this.$showMessage("不能缴费0元")
643
+ } else {
644
+ //获取购货方信息
645
+ http = new HttpResetClass()
646
+ data = {
647
+ tablename: 't_buyer_info',
648
+ condition: `f_process_id = '${this.infee.f_process_id}' and f_apply_num = '${this.infee.f_apply_num}'`
649
+ }
650
+ let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {resolveMsg: null, rejectMsg: '获取购货方信息失败'})
651
+ this.buyerinfo.rows = res.data
652
+ if (this.buyerinfo.rows.length < 1 && this.addItem.f_bill_style === '增值税电子发票' && this.$appdata.getSingleValue('默认打印票据') === '是'){
653
+ this.$showAlert('未找到购买方信息,请去报建功能"购买方信息"中完善购买方信息后再收费','info',2000)
654
+ return
655
+ }
656
+
657
+ // 累计缴费金额
658
+ let flag1 = this.accAdd(Number(this.addItem.f_charge_money), Number(this.model.f_cumulative_money))
659
+ // 未结金额
660
+ let flag2 = this.accSub(Number(this.model.f_unaccounts_money), Number(this.addItem.f_charge_money))
661
+
662
+
663
+ if (this.addItem.f_payment_typed == '') {
664
+ this.addItem.f_payment_typed = '分期'
665
+ console.log('为空')
666
+ }
667
+ let http = new HttpResetClass()
668
+
669
+ // this.addItem.f_charge_money = this.addItem.f_charge_money
670
+ // this.addItem.f_amount_words = this.addItem.f_amount_words
671
+ // this.addItem.f_payment_type = this.addItem.f_payment_typed
672
+ this.addItem.f_charge_collectors = this.$login.f.name
673
+ // this.addItem.f_charge_date = this.addItem.f_charge_date
674
+ // this.addItem.f_charge_remarks = this.addItem.f_charge_remarks
675
+ this.addItem.f_filiale = this.$login.f.f_fengongsi
676
+ this.addItem.f_process_id = this.infee.f_process_id
677
+ this.addItem.f_apply_num = this.infee.f_apply_num
678
+ this.model.rows.push(this.addItem)
679
+ this.addItem.f_charging_status = '有效'
680
+ this.addItem.f_is_correct = '否'
681
+ let chargemoney= this.addItem.f_charge_money
682
+ let chargeitem = this.addItem.f_f_charge_item
683
+ let chargeremarks = this.addItem.f_charge_remarks?this.addItem.f_charge_remarks:''
684
+ let chargebillstyle = this.addItem.f_bill_style
685
+ this.chargemoney=this.addItem.f_charge_money
686
+ let data = {
687
+ tablename: 't_charge_record',
688
+ parameters: this.addItem
689
+ }
690
+ // 生成收费记录的id
691
+ let sellid = ''
692
+ await http.load('POST', 'rs/logic/saveentity', {data: data}, {resolveMsg: null, rejectMsg: "添加失败"})
693
+ .then((res) => {
694
+ sellid = res.data.id
695
+ this.close()
696
+ })
697
+
698
+
699
+ data = {
700
+ f_cumulative_money: flag1,
701
+ f_unaccounts_money: flag2,
702
+ f_apply_num: this.infee.f_apply_num
703
+ }
704
+ await http.load('POST', 'rs/logic/updatechargemoney', {data: data}, {resolveMsg: null, rejectMsg: "添加累计金额失败"})
705
+ .then((res) => {
706
+ this.close()
707
+ this.load()
708
+ })
709
+ console.log(this.model.f_cumulative_invoicing)
710
+ console.log(chargemoney)
711
+ console.log(this.model.f_cumulative_invoicing)
712
+ console.log(this.model.f_residual_invoicing)
713
+ if (this.$appdata.getSingleValue('默认打印票据') && this.$appdata.getSingleValue('默认打印票据') === '是'){
714
+ this.$showMessage('是否打票据', ['confirm', 'cancel']).then((res) => {
715
+ if (res === 'confirm') {
716
+ console.log('打印票据')
717
+ if (chargebillstyle === '增值税电子发票') {
718
+ this.selectsellid = sellid
719
+ this.showbuyerinfo = true
720
+
721
+ }else {
722
+ this.printbill(sellid)
723
+ }
724
+ } else {
725
+ this.goback()
726
+ }
727
+ })
728
+ }
729
+ }
730
+ },
731
+ async invoice(val){
732
+ console.log('打印票据')
733
+ if (val.f_bill_style === '增值税电子发票') {
734
+ this.selectsellid = val.id
735
+ this.showbuyerinfo = true
736
+ /*this.$resetpost('rs/logic/applyDrawBill', {data: {sellid:val.id,operator:this.$login.f.name}}, {resolveMsg: null, rejectMsg: "开发票失败"})
737
+ .then((res) => {
738
+
739
+ if (res.data.status === 200){
740
+ let n = 0
741
+ var id = setInterval(async ()=>{
742
+ if(n>=3){
743
+ this.$showMessage('电子票延迟,请稍后在票据管理中查看!')
744
+ clearInterval(id)
745
+ }
746
+ if (this.seeeticket(res.data) === 'success'){
747
+ clearInterval(id)
748
+ this.load()
749
+ }
750
+ n++
751
+ this.$showAlert('电子发票开票中,请稍后...', 'info',3000)
752
+ },3000)
753
+ }else {
754
+ this.$showAlert('电子发票开票失败', 'warning',3000)
755
+ }
756
+
757
+ })*/
758
+ }
759
+ /*let http = new HttpResetClass()
760
+ let invoiceInterface = true//开发票接口的结果
761
+ let flag1 = this.accAdd(Number(this.chargemoney), Number(this.model.f_cumulative_invoicing))
762
+ let flag2 = this.accSub(Number(this.model.f_residual_invoicing), Number(this.chargemoney))
763
+
764
+ if (invoiceInterface) {
765
+ let data = {
766
+ f_cumulative_invoicing: flag1,
767
+ f_residual_invoicing: flag2,
768
+ f_apply_num: this.infee.f_apply_num,
769
+ f_invoice_num: '123'//发票号码,
770
+ }
771
+ await http.load('POST', 'rs/logic/updateinvoicemoney', {data: data}, {
772
+ resolveMsg: null,
773
+ rejectMsg: "修改开票金额失败"
774
+ })
775
+ .then((res) => {
776
+ this.close()
777
+ this.load()
778
+ })
779
+
780
+
781
+ } else {
782
+ this.$showMessage('开发票失败')
783
+ }*/
784
+ },
785
+
786
+ goback() {
787
+ this.$dispatch('hiddenbtn')
788
+ this.showview = false
789
+ },
790
+ async tovoid(val) {
791
+ if (val.f_is_correct==='是' || val.f_charging_status !== '有效' || val.f_is_correct==='冲正中') {
792
+ this.$showMessage('已冲正或正在冲正,不能操作!')
793
+ } else {
794
+ this.$resetpost('rs/logic/applyCancelDrawBill', {data: {sellid:val.id,cancelperson:this.$login.f.name}}, {
795
+ resolveMsg: null,
796
+ rejectMsg: '冲正失败'
797
+ }).then((res) => {
798
+ if (res.data.status === 200 ){
799
+ if (res.data.resultmsg !== ''){
800
+ // 如果res.data.resultmsg 有值则说明冲正未成功
801
+ this.$showAlert(res.data.resultmsg, 'warning',2000)
802
+ }else {
803
+ if (val.f_bill_style === '增值税电子发票') {
804
+ this.$showAlert('申请增值税电子发票冲正成功,请稍后到报建功能中【报建收费】中查看电子发票', 'success',5000)
805
+ /*let n = 0
806
+ var id = setInterval(async ()=>{
807
+ if(n>=3){
808
+ this.$showMessage('电子票延迟,请稍后查看!')
809
+ clearInterval(id)
810
+ }
811
+ if (this.seeeticket(res.data) === 'success'){
812
+ clearInterval(id)
813
+ this.load()
814
+ }
815
+ n++
816
+ this.$showAlert('电子发票开票中,请稍后...', 'info',3000)
817
+ },3000)*/
818
+ }else {
819
+ this.$showAlert('冲正成功','success',2000)
820
+ }
821
+ }
822
+ this.load()
823
+ } else {
824
+ this.$showAlert('冲正失败', 'warning',5000)
825
+ }
826
+ })
827
+
828
+ /*
829
+ let correctionInterface = true//冲正接口的结果
830
+ if (correctionInterface) {
831
+ let http = new HttpResetClass()
832
+ let data = {
833
+ tablename: 't_charge_record',
834
+ condition: `id = '${val.id}'`
835
+ }
836
+ let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
837
+ resolveMsg: null,
838
+ rejectMsg: '获取付款数据失败'
839
+ })
840
+ let flag1 = this.accSub(Number(this.model.f_cumulative_money), Number(val.f_charge_money)) //累计缴费金额
841
+ let flag2 = this.accAdd(Number(this.model.f_unaccounts_money), Number(val.f_charge_money))//未结总金额
842
+ let flag3 = Number(this.model.f_cumulative_invoicing)//--累计开票金额--
843
+ let flag4 = Number(this.model.f_residual_invoicing)//剩余开票金额
844
+ if (res.data[0].f_invoice_num) {
845
+ flag3 = this.accSub(Number(this.model.f_cumulative_invoicing), Number(val.f_charge_money))
846
+ flag4 = this.accAdd(Number(this.model.f_residual_invoicing), Number(val.f_charge_money))
847
+ }
848
+ data = {
849
+ f_cumulative_money: flag1,
850
+ f_unaccounts_money: flag2,
851
+ f_cumulative_invoicing: flag3,
852
+ f_residual_invoicing: flag4,
853
+ f_apply_num: this.infee.f_apply_num,
854
+ id: val.id
855
+ }
856
+ this.$resetpost('rs/logic/tovoidcharge', data, {resolveMsg: '冲正成功', rejectMsg: '冲正失败'}).then((res) => {
857
+ this.load()
858
+ })
859
+ } else {
860
+ this.$showMessage('冲正接口调用失败!')
861
+ }*/
862
+ }
863
+ },
864
+ tomakeup(val) {
865
+ if (val.f_invoice_num ) {
866
+ this.$showMessage('此记录有票据,不能操作!')
867
+ }else{
868
+ this.invoice(val)
869
+ }
870
+ },
871
+ //根据票据流水号查看票据
872
+ async seeeticket(val) {
873
+ console.log('该票据流水号为:',val.f_fpqqlsh)
874
+ var eticketData = await this.$resetpost('rs/sql/querySingleTable', {data:{items: 'f_bill_url,f_url_code',tablename: 't_eticket', condition: `f_serial_number=${val.f_fpqqlsh}` }}, {resolveMsg: null, rejectMsg: null})
875
+ console.log('eticketData:',eticketData)
876
+ var data = eticketData.data[0]
877
+ if(data.f_bill_url && data.f_bill_url != ''){
878
+ console.log(data)
879
+ var auth = data.f_bill_url.split("/")
880
+ console.log("截取",auth)
881
+ var authCode = auth[auth.length-1]
882
+ var url = `https://${auth[2]}/ent-views/fpExtract/get_fapiao.html?pwd=${data.f_url_code}&authCode=${authCode}`
883
+ this.$showAlert('开票成功!', 'success',500)
884
+ window.open(url)
885
+ return 'success'
886
+ }
887
+ return 'fail'
888
+ },
889
+ accSub(arg1, arg2) {
890
+ var r1, r2, m, n;
891
+ try {
892
+ r1 = arg1.toString().split(".")[1].length
893
+ } catch (e) {
894
+ r1 = 0
895
+ }
896
+ try {
897
+ r2 = arg2.toString().split(".")[1].length
898
+ } catch (e) {
899
+ r2 = 0
900
+ }
901
+ m = Math.pow(10, Math.max(r1, r2));
902
+ //last modify by deeka
903
+ //动态控制精度长度
904
+ n = (r1 >= r2) ? r1 : r2;
905
+ return ((arg1 * m - arg2 * m) / m).toFixed(n);
906
+ },
907
+ reset() {
908
+ this.$dispatch('close')
909
+ this.$dispatch('selfsearch')
910
+ },
911
+ accAdd(arg1, arg2) {
912
+ var r1, r2, m;
913
+ try {
914
+ r1 = arg1.toString().split(".")[1].length
915
+ } catch (e) {
916
+ r1 = 0
917
+ }
918
+ try {
919
+ r2 = arg2.toString().split(".")[1].length
920
+ } catch (e) {
921
+ r2 = 0
922
+ }
923
+ m = Math.pow(10, Math.max(r1, r2))
924
+ return (arg1 * m + arg2 * m) / m
925
+ },
926
+
927
+ // 获取数据
928
+ async load() {
929
+ let http = new HttpResetClass()
930
+ let data = {
931
+ tablename: 't_apply',
932
+ condition: `f_process_id = '${this.infee.f_process_id}'`
933
+ //
934
+ }
935
+ //获取报建信息
936
+ let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {resolveMsg: null, rejectMsg: '获取报建信息失败'})
937
+ Object.assign(this.model,this.model, res.data[0])
938
+
939
+ // 获取补充协议
940
+ let data2 = {
941
+ tablename: 't_contract',
942
+ condition: ` f_contract_type = '补充协议' and f_process_id = '${this.infee.f_process_id}' and f_contract_type = '补充协议'`
943
+ }
944
+ //获取补充协议请求
945
+ await http.load('POST', 'rs/sql/singleTable', {data: data2}, {resolveMsg: null, rejectMsg: '获取补充协议失败'}).then((res2)=>{
946
+ if(res2.data.length>0){
947
+ this.showMsg = true
948
+ }else{
949
+ this.showMsg = false
950
+ }
951
+ })
952
+
953
+ data = {
954
+ tablename: 't_charge_record',
955
+ condition: `f_process_id = '${this.infee.f_process_id}'`
956
+ }
957
+ //获取付款详情信息
958
+ res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {resolveMsg: null, rejectMsg: '获取付款数据失败'})
959
+
960
+ // 去除付款时间的时分秒
961
+ for (var i = 0; i < res.data.length; i++) {
962
+ res.data[i].f_charge_date = res.data[i].f_charge_date.substring(0, 11)
963
+ }
964
+ this.model.rows = res.data
965
+
966
+ //获取购货方信息
967
+ data = {
968
+ tablename: 't_buyer_info',
969
+ condition: `f_process_id = '${this.infee.f_process_id}' and f_apply_num = '${this.infee.f_apply_num}'`
970
+ }
971
+ res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {resolveMsg: null, rejectMsg: '获取购货方信息失败'})
972
+ this.buyerinfo.rows = res.data
973
+
974
+ /*
975
+ data = {
976
+ tablename: 't_contract',
977
+ condition: `processid = '${this.infee.f_process_id}'`
978
+ }
979
+
980
+ res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {resolveMsg: null, rejectMsg: '获取主合同编号失败'})
981
+ for (var i = 0; i < res.data.length; i++) {
982
+ if (res.data[i].f_contract_number) {
983
+ this.model.f_main_contract_num = res.data[i].f_contract_number
984
+ }
985
+ }
986
+
987
+
988
+ data = {
989
+ tablename: 't_apply',
990
+ condition: `f_apply_num = '${this.infee.f_apply_num}'`
991
+ }
992
+
993
+ res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {resolveMsg: null, rejectMsg: '获取累计数据失败'})
994
+ this.model.f_cumulative_money = Number(res.data[0].f_cumulative_money)
995
+ this.model.chargemoney = Number(res.data[0].f_cumulative_money)
996
+ this.model.f_unaccounts_money = Number(res.data[0].f_unaccounts_money)
997
+ this.model.f_cumulative_invoicing = Number(res.data[0].f_cumulative_invoicing)
998
+ this.model.f_residual_invoicing = Number(res.data[0].f_residual_invoicing)*/
999
+ await this.getBallot()
1000
+ this.getPay()
1001
+ },
1002
+ // 累计缴费金额
1003
+ async getPay(){
1004
+ if(!this.selectdata) return
1005
+ let http = new HttpResetClass()
1006
+ let data = {
1007
+ columnname: 'f_charge_money',
1008
+ tablename: 't_charge_record',
1009
+ condition: `f_charging_status='有效' and f_process_id = '${this.selectdata.f_process_id}'`
1010
+ }
1011
+ let res = await http.load('POST', 'rs/sql/getSum', {data: data}, {resolveMsg: null, rejectMsg: '获取缴费金额获取失败'})
1012
+ debugger
1013
+ this.model.f_cumulative_money = res.data[0].f_charge_money
1014
+ this.model.f_unaccounts_money = Number(this.model.f_contract_money) - this.model.f_cumulative_money
1015
+ return this.model.f_cumulative_money
1016
+ },
1017
+ // 累计开票金额
1018
+ async getBallot(){
1019
+ if(!this.selectdata) return
1020
+ let http = new HttpResetClass()
1021
+ let data = {
1022
+ columnname: 'f_charge_money',
1023
+ tablename: 't_charge_record',
1024
+ condition: `f_charging_status='有效' and f_process_id = '${this.selectdata.f_process_id}' and (f_invoice_num !='' or f_invoice_num is not null)`
1025
+ }
1026
+ let res = await http.load('POST', 'rs/sql/getSum', {data: data}, {resolveMsg: null, rejectMsg: '获取累计缴费金额获取失败'})
1027
+ this.model.f_cumulative_invoicing = res.data[0].f_charge_money?res.data[0].f_charge_money:0
1028
+ this.model.f_residual_invoicing = Number(this.model.f_cumulative_money) - this.model.f_cumulative_invoicing
1029
+ return this.model.f_cumulative_invoicing
1030
+ },
1031
+ // confirm() {
1032
+ // // this.model.f_change_pipeline_cost = this.model.f_change_pipeline_cost
1033
+ // // this.model.f_material_cost = this.model.f_material_cost
1034
+ // // this.model.f_labor_cost = this.model.f_labor_cost
1035
+ // // this.model.f_sbaz_cost = this.model.f_sbaz_cost
1036
+ // // this.model.f_construction_cost = this.model.f_construction_cost
1037
+ // // this.model.f_total_cost = this.model.f_total_cost
1038
+ //
1039
+ // this.model.f_fee = this.model.f_actualfee
1040
+ // this.model.f_actualfee = Number(this.infee.f_actualfee) + Number(this.model.f_actualfee)
1041
+ // this.model.f_paytype = this.model.f_actualfee_type
1042
+ // this.model.f_payfeedate = this.model.f_payfee_date
1043
+ // this.model.f_payer = this.model.f_actualfee_user
1044
+ // this.model.applyid = this.model.id
1045
+ // this.model.f_state = '已交款'
1046
+ // this.model.f_operator = this.model.f_payfee_operator
1047
+ // this.model.f_date = this.model.f_payfee_date
1048
+ // this.model.f_department = this.model.f_payfee_department
1049
+ // // this.model.f_filiale = this.model.f_filiale
1050
+ // this.model.f_operat_type = '报建收费'
1051
+ // this.model.f_state = '有效'
1052
+ // this.model.f_describe = this.model.f_user_name + '缴费' + this.model.f_fee
1053
+ // console.log('输出model', this.model)
1054
+ // let getGen = gen(this, this.model)
1055
+ // co(getGen)
1056
+ // this.$dispatch('searchcard')
1057
+ // this.$dispatch('hiddenbtn')
1058
+ // },
1059
+ // reset() {
1060
+ // this.$dispatch('hiddenbtn')
1061
+ // // this.$dispatch('hiddenbtn')
1062
+ // }
1063
+ // },
1064
+
1065
+ },
1066
+ computed: {
1067
+ // 计算大写
1068
+ getCapital() {
1069
+ if (this.addItem.f_charge_money) {
1070
+ this.addItem.f_amount_words = this.smalltoBIG(Number(this.addItem.f_charge_money))
1071
+ }
1072
+
1073
+ return this.addItem.f_amount_words
1074
+ },
1075
+ // subcost() {
1076
+ // let temp = Number(this.model.f_total_cost)
1077
+ // let temp2 = 0
1078
+ // for (var i = 0; i < this.model.rows.length; i++) {
1079
+ // temp2 += Number(this.model.rows[i].f_fee)
1080
+ // }
1081
+ // this.model.f_cumulative_money = Math.round(temp2 * 100) / 100
1082
+ // this.model.subcost = Math.round((temp - temp2) * 100) / 100
1083
+ // if (this.model.f_cumulative_money && this.model.f_jmhj_cost) {
1084
+ // temp = Math.round((temp - Number(this.model.f_jmhj_cost)) * 100) / 100
1085
+ // }
1086
+ // this.model.subcost = Math.round((temp - temp2) * 100) / 100
1087
+ // return this.model.subcost
1088
+ // },
1089
+ // totalcost () {
1090
+ // this.model.f_total_cost = Number(this.model.f_construction_cost) + Number(this.model.f_material_cost)
1091
+ // + Number(this.model.f_labor_cost) + Number(this.model.f_change_pipeline_cost)
1092
+ // + Number(this.model.f_sbaz_cost) - Number(this.model.f_jmhj_cost)
1093
+ // return this.model.f_total_cost
1094
+ // },
1095
+ // aaa() {
1096
+ // this.model.f_jmhj_cost = Number(this.model.f_total_cost) - Number(this.model.f_actualfee)
1097
+ // return this.model.f_jmhj_cost
1098
+ // },
1099
+ feeoptions() {
1100
+ return this.$appdata.getParam('费用类型')
1101
+ },
1102
+ dayin() {
1103
+ return this.$appdata.getParam('打印格式')
1104
+ },
1105
+ jiaofei() {
1106
+ return this.$appdata.getParam('付款方式')
1107
+ // return [{label: '全部', value: ''}, ...AppData.getParam('缴费类型')]
1108
+ }
1109
+ },
1110
+ watch : {
1111
+ 'infee.f_process_id' (val) {
1112
+ this.load()
1113
+ },
1114
+ deep:true
1115
+ },
1116
+ }
1117
+ </script>