apply-clients 6.0.3 → 6.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/dev-server.js +72 -72
- package/package.json +1 -1
- package/src/components/apply/base/rightview/InstallCardList2.vue +267 -268
- package/src/components/apply/base/rightview/carddetail/BuildFeeDetail2.vue +77 -77
- package/src/components/apply/base/rightview/carddetail/ChangeFeeDetail2.vue +116 -116
- package/src/components/apply/base/rightview/carddetail/ReduceFeeDetail2.vue +1 -1
- package/src/components/build/Install/InstallFee/AddContract.vue +257 -257
- package/src/components/build/Install/InstallFee/InstallFee.vue +929 -929
- package/src/components/build/Install/InstallFee/PreparationFee.vue +223 -223
- package/src/components/build/Install/InstallFee/PrestoreFee.vue +630 -630
- package/src/components/build/Install/Process/CustomerBuildingMessage.vue +251 -251
- package/src/components/build/Install/Process/CustomerEquipmentMessage.vue +172 -172
- package/src/components/build/Install/Process/CustomerFile.vue +423 -423
- package/src/components/build/Install/Process/CustomerMaterialMessage.vue +414 -414
- package/src/components/build/Install/Process/CustomerRecordMessage.vue +749 -749
- package/src/components/build/Install/Process/FeeNormeAndContratSigne.vue +376 -376
- package/src/components/build/Install/Process/MeterType.vue +379 -379
- package/src/components/build/Install/Process/PlaceControler.vue +304 -304
- package/src/components/build/Install/Process/zhongran/ZR_Construction.vue +388 -388
- package/src/components/build/Install/Process/zhongran/ZR_MaterialPlan.vue +259 -259
- package/src/components/build/Install/Process/zhongran/ZR_MaterialPlanExamine.vue +243 -243
- package/src/components/build/Install/Process/zhongran/ZR_PlaceControler.vue +426 -426
- package/src/components/build/Install/Process/zhongran/ZR_TestDesign.vue +441 -441
- package/src/components/build/Install/ProcessInfo/ApplyRecordCancel.vue +135 -135
- package/src/components/build/Install/bill/BillGZKMakeInfo.vue +58 -58
- package/src/components/build/Install/bill/BillQRKMakeInfo.vue +79 -79
- package/src/components/build/Install/bill/BillXSDMakeInfo.vue +206 -206
- package/src/main.js +25 -25
|
@@ -1,630 +1,630 @@
|
|
|
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">预付扣款</h3>
|
|
7
|
-
</div>
|
|
8
|
-
</div>
|
|
9
|
-
</div>
|
|
10
|
-
|
|
11
|
-
<span class="col-sm-1"></span><span class="col-sm-3">预付款总金额:{{sum}}元</span><span class="col-sm-3">预付款余额:{{subcost}}元</span>
|
|
12
|
-
<button type="button" class="btn btn-warning col-sm-3 col-sm-offset-3" @click="add()">新增扣款</button>
|
|
13
|
-
<div class="col-sm-12" style="height: auto">
|
|
14
|
-
<div class="form-inline auto" style="margin-bottom: 5px;">
|
|
15
|
-
</div>
|
|
16
|
-
<div class="col-sm-12 span recordTable" style="margin-top: 10px;min-height: 500px">
|
|
17
|
-
<partial-view v-ref:single-load>
|
|
18
|
-
<data-grid :model="model" v-ref:grid>
|
|
19
|
-
<template partial='head'>
|
|
20
|
-
<tr>
|
|
21
|
-
<th>序号</th>
|
|
22
|
-
<th>扣款金额(元)</th>
|
|
23
|
-
<th>金额大写</th>
|
|
24
|
-
<th>收费项</th>
|
|
25
|
-
<th>缴费类型</th>
|
|
26
|
-
<th>收费人员</th>
|
|
27
|
-
<th>日期</th>
|
|
28
|
-
<th>备注</th>
|
|
29
|
-
<!--<th>操作</th>-->
|
|
30
|
-
</tr>
|
|
31
|
-
</template>
|
|
32
|
-
<template partial='body'>
|
|
33
|
-
<td style="text-align: center">{{$index+1}}</td>
|
|
34
|
-
<td style="text-align: center">{{row.f_fee}}</td>
|
|
35
|
-
<td style="text-align: center">{{row.f_capital}}</td>
|
|
36
|
-
<td style="text-align: center">
|
|
37
|
-
<nobr>{{row.f_charging_item}}</nobr>
|
|
38
|
-
</td>
|
|
39
|
-
<td style="text-align: center">{{row.f_payfee_way}}</td>
|
|
40
|
-
<td style="text-align: center">{{row.f_operator}}</td>
|
|
41
|
-
<td style="text-align: center">{{row.f_payfeedate}}</td>
|
|
42
|
-
<td style="text-align: center">{{row.f_payfee_remarks}}</td>
|
|
43
|
-
<!--<td class="flex-around">-->
|
|
44
|
-
<!--<!–<button type="button" name="button" class="btn btn-link"–>-->
|
|
45
|
-
<!--<!–@click.stop="$parent.$parent.$parent.modifyParam(row,'修改')">修改–>-->
|
|
46
|
-
<!--<!–</button>–>-->
|
|
47
|
-
<!--<button type="button" name="button" class="btn btn-link"-->
|
|
48
|
-
<!--@click.stop="$parent.$parent.$parent.deleteItem(row)">删除-->
|
|
49
|
-
<!--</button>-->
|
|
50
|
-
<!--</td>-->
|
|
51
|
-
</template>
|
|
52
|
-
</data-grid>
|
|
53
|
-
</partial-view>
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
|
|
57
|
-
<!--<div class="form-group col-sm-12">-->
|
|
58
|
-
<!--<div class="col-sm-2">-->
|
|
59
|
-
<!--<label class="control-label col-sm-12">收费备注:</label>-->
|
|
60
|
-
<!--</div>-->
|
|
61
|
-
<!--<div class="col-sm-10">-->
|
|
62
|
-
<!--<textarea class="form-control" rows="3" v-model="model.f_payfee_remarks"></textarea>-->
|
|
63
|
-
<!--</div>-->
|
|
64
|
-
<!--</div>-->
|
|
65
|
-
<div class="form-group col-sm-12">
|
|
66
|
-
<div class="col-sm-6">
|
|
67
|
-
<label class="control-label col-sm-4">分公司:</label>
|
|
68
|
-
<div class="col-sm-8">
|
|
69
|
-
<input class="form-control" type="text" v-model="model.f_filiale" disabled>
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
72
|
-
<div class="col-sm-6">
|
|
73
|
-
<label class="control-label col-sm-4">操作日期:</label>
|
|
74
|
-
<div class="col-sm-8">
|
|
75
|
-
<input class="form-control" type="text" v-model="model.f_payfee_date" disabled>
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
</div>
|
|
79
|
-
<div class="form-group col-sm-12">
|
|
80
|
-
<div class="col-sm-6">
|
|
81
|
-
<label class="control-label col-sm-4">部门:</label>
|
|
82
|
-
<div class="col-sm-8">
|
|
83
|
-
<input class="form-control" type="text" v-model="model.f_payfee_department" disabled>
|
|
84
|
-
</div>
|
|
85
|
-
</div>
|
|
86
|
-
<div class="col-sm-6">
|
|
87
|
-
<label class="control-label col-sm-4">操作人:</label>
|
|
88
|
-
<div class="col-sm-8">
|
|
89
|
-
<input class="form-control" type="text" v-model="model.f_payfee_operator" disabled>
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
<!--<div class="from-group col-sm-12">-->
|
|
94
|
-
<!--<center>-->
|
|
95
|
-
<!--<button type="button" @click="confirm()" class="btn btn-primary" style="width:80px; margin-left:50px;"-->
|
|
96
|
-
<!--:disabled="$v.invalid">-->
|
|
97
|
-
<!--保存-->
|
|
98
|
-
<!--</button>-->
|
|
99
|
-
<!--<button type="button" @click="reset()" class="btn btn-warning" style="width:80px; margin-left:50px;">-->
|
|
100
|
-
<!--撤销-->
|
|
101
|
-
<!--</button>-->
|
|
102
|
-
<!--</center>-->
|
|
103
|
-
<!--</div>-->
|
|
104
|
-
<modal :show.sync="showpay" v-ref:modal backdrop="false">
|
|
105
|
-
<header slot="modal-header" class="modal-header">
|
|
106
|
-
<button type="button" class="close" @click="close"><span>×</span></button>
|
|
107
|
-
<h4 class="modal-title">新增收费</h4>
|
|
108
|
-
</header>
|
|
109
|
-
<article slot="modal-body" class="modal-body">
|
|
110
|
-
<div v-if="showpay">
|
|
111
|
-
<validator name="validator">
|
|
112
|
-
<div class="from-group">
|
|
113
|
-
<label>总金额(元)</label>
|
|
114
|
-
<input type="text" class="form-control" v-model="addItem.f_fee" readonly>
|
|
115
|
-
</div>
|
|
116
|
-
<div class="from-group">
|
|
117
|
-
<label>总金额大写</label>
|
|
118
|
-
<input type="text" class="form-control" v-model="getCapital" readonly>
|
|
119
|
-
</div>
|
|
120
|
-
<!--<div class="from-group">-->
|
|
121
|
-
<!--<label>交费日期</label>-->
|
|
122
|
-
<!--<div>-->
|
|
123
|
-
<!--<datepicker width="600.76px;"-->
|
|
124
|
-
<!--:value.sync="addItem.f_payfeedate"-->
|
|
125
|
-
<!--:format="'yyyy-MM-dd'"-->
|
|
126
|
-
<!--v-model="addItem.f_payfeedate" readonly="readonly"-->
|
|
127
|
-
<!--:show-reset-button="reset">-->
|
|
128
|
-
<!--</datepicker>-->
|
|
129
|
-
<!--</div>-->
|
|
130
|
-
<!--</div>-->
|
|
131
|
-
<div class="from-group">
|
|
132
|
-
<label>收费项 </label>
|
|
133
|
-
<div>
|
|
134
|
-
<label v-for="item in charging_item"><input type="checkbox"
|
|
135
|
-
@change="checkedValue($index)"/>{{item.label}} </label>
|
|
136
|
-
</div>
|
|
137
|
-
</div>
|
|
138
|
-
<div class="from-group" v-if="!infee.f_apply_type.includes('个人')">
|
|
139
|
-
<label>缴费户数 :</label>
|
|
140
|
-
<input type="text" v-model="addItem.f_pay_number">
|
|
141
|
-
</div>
|
|
142
|
-
<div class="from-group">
|
|
143
|
-
<label>其它费用名称:</label>
|
|
144
|
-
<input class="form-control" v-model="addItem.f_payfee_name">
|
|
145
|
-
<div>
|
|
146
|
-
<label>其它费用金额(元):</label>
|
|
147
|
-
<input class="form-control" v-model="addItem.f_payfee_money">
|
|
148
|
-
</div>
|
|
149
|
-
</div>
|
|
150
|
-
<div class="from-group">
|
|
151
|
-
<label>缴费类型</label>
|
|
152
|
-
<v-select :options="jiaofei"
|
|
153
|
-
v-validate:addItem.f_payfee_way[0] v-model="addItem.f_payfee_way"
|
|
154
|
-
:value.sync="addItem.f_payfee_way" close-on-select>
|
|
155
|
-
</v-select>
|
|
156
|
-
</div>
|
|
157
|
-
</validator>
|
|
158
|
-
</div>
|
|
159
|
-
</article>
|
|
160
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
161
|
-
<button v-show="showpay" type="button" class="btn btn-default" @click='close'>取消</button>
|
|
162
|
-
<button v-show="showpay" type="button" class="btn btn-success" @click='confirm'>确认</button>
|
|
163
|
-
</footer>
|
|
164
|
-
</modal>
|
|
165
|
-
<billxsd v-show="false" v-ref:billxsdx :billinfo="billinfo" :billselect="billselect" :info="info"></billxsd>
|
|
166
|
-
</div>
|
|
167
|
-
</template>
|
|
168
|
-
<script>
|
|
169
|
-
import {DataModel} from 'vue-client'
|
|
170
|
-
import {HttpResetClass} from 'vue-client'
|
|
171
|
-
import InputAndSelect from "vue-client/src/vue-strap/src/InputAndSelect";
|
|
172
|
-
import * as Util from '../../../Util'
|
|
173
|
-
|
|
174
|
-
let gen = function* (self, val) {
|
|
175
|
-
val.f_actualfee_type = val.f_actualfee_type[0]
|
|
176
|
-
val.f_bill_type = val.f_bill_type[0]
|
|
177
|
-
yield self.$resetpost('rs/logic/saveentity', {data:{tablename:'t_apply',parameters:val}})
|
|
178
|
-
delete val.id
|
|
179
|
-
self.$resetpost('rs/logic/saveentity', {data:{tablename:'t_record',parameters:val}})
|
|
180
|
-
.then(() => {
|
|
181
|
-
self.reset()
|
|
182
|
-
})
|
|
183
|
-
}
|
|
184
|
-
export default {
|
|
185
|
-
components: {InputAndSelect},
|
|
186
|
-
title: '报装收费',
|
|
187
|
-
data() {
|
|
188
|
-
return {
|
|
189
|
-
f_billnumber: '',
|
|
190
|
-
temp: [], // 票据信息
|
|
191
|
-
billinfo: {}, // 票据信息
|
|
192
|
-
number: {}, // 单值表获取的销售单编号信息
|
|
193
|
-
sum: 0, // 总共预付款
|
|
194
|
-
billinfo: null, // 打印票据准备
|
|
195
|
-
billselect: {f_process_id:this.infee.f_process_id}, // 打印票据准备
|
|
196
|
-
info: null, // 打印票据准备
|
|
197
|
-
charging_item: [{label: '开户费', value: false},
|
|
198
|
-
{label: '入户安装费', value: false},
|
|
199
|
-
{label: '人工费', value: false},
|
|
200
|
-
{label: '改管费', value: false},
|
|
201
|
-
{label: '材料费', value: false},
|
|
202
|
-
{label: '设备安装费', value: false}],
|
|
203
|
-
showpay: false, // 新增收费模态框开关
|
|
204
|
-
addItem: {
|
|
205
|
-
f_fee: 0,
|
|
206
|
-
f_pay_number: 1, // 缴费户数默认为1
|
|
207
|
-
f_payfee_money: 0, // 其它费用
|
|
208
|
-
}, // 模态框数据
|
|
209
|
-
model: {
|
|
210
|
-
f_payfee_operator: '',
|
|
211
|
-
f_payfee_department: '',
|
|
212
|
-
f_filiale: '',
|
|
213
|
-
f_payfee_date: '',
|
|
214
|
-
rows: [] // 付费数据数组
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
},
|
|
218
|
-
props: ['infee'],
|
|
219
|
-
ready() {
|
|
220
|
-
this.load() // 初始化数据
|
|
221
|
-
this.model.f_payfee_operator = this.$login.f.name
|
|
222
|
-
this.model.f_payfee_department = this.$login.f.f_parentname
|
|
223
|
-
this.model.f_filiale = this.$login.f.f_fengongsi
|
|
224
|
-
this.model.f_payfee_date = this.$login.toStandardDateString()
|
|
225
|
-
},
|
|
226
|
-
methods: {
|
|
227
|
-
// 选中
|
|
228
|
-
checkedValue(index) {
|
|
229
|
-
this.charging_item[index].value = !this.charging_item[index].value
|
|
230
|
-
if (this.charging_item[index].label === '开户费' && this.charging_item[index].value === true) {
|
|
231
|
-
this.addItem.f_fee = this.addItem.f_fee ? this.addItem.f_fee : 0
|
|
232
|
-
this.infee.f_account_cost = this.infee.f_account_cost ? this.infee.f_account_cost : 0
|
|
233
|
-
this.addItem.f_fee = Number(this.addItem.f_fee) + (Number(this.infee.f_account_cost) * Number(this.addItem.f_pay_number))
|
|
234
|
-
|
|
235
|
-
// 加入到票据中
|
|
236
|
-
let bill = {
|
|
237
|
-
f_commodity_name: this.charging_item[index].label,
|
|
238
|
-
f_price: this.infee.f_account_cost,
|
|
239
|
-
f_quantity: this.addItem.f_pay_number,
|
|
240
|
-
f_money: Number(this.infee.f_account_cost) * Number(this.addItem.f_pay_number),
|
|
241
|
-
f_sale_money: Number(this.infee.f_account_cost) * Number(this.addItem.f_pay_number)
|
|
242
|
-
}
|
|
243
|
-
this.temp.push(bill)
|
|
244
|
-
} else if (this.charging_item[index].label === '开户费' && this.charging_item[index].value === false) {
|
|
245
|
-
this.addItem.f_fee = Number(this.addItem.f_fee) - (Number(this.infee.f_account_cost) * Number(this.addItem.f_pay_number))
|
|
246
|
-
this.temp.forEach((item, x) => {
|
|
247
|
-
if (item.f_commodity_name === this.charging_item[index].label) {
|
|
248
|
-
this.temp.splice(x, 1)
|
|
249
|
-
}
|
|
250
|
-
})
|
|
251
|
-
}
|
|
252
|
-
if (this.charging_item[index].label === '入户安装费' && this.charging_item[index].value === true) {
|
|
253
|
-
this.addItem.f_fee = this.addItem.f_fee ? this.addItem.f_fee : 0
|
|
254
|
-
this.infee.f_construction_cost = this.infee.f_construction_cost ? this.infee.f_construction_cost : 0
|
|
255
|
-
this.addItem.f_fee = Number(this.addItem.f_fee) + (Number(this.infee.f_construction_cost) * Number(this.addItem.f_pay_number))
|
|
256
|
-
|
|
257
|
-
// 加入到票据中
|
|
258
|
-
let bill = {
|
|
259
|
-
f_commodity_name: this.charging_item[index].label,
|
|
260
|
-
f_price: this.infee.f_construction_cost,
|
|
261
|
-
f_quantity: this.addItem.f_pay_number,
|
|
262
|
-
f_money: Number(this.infee.f_construction_cost) * Number(this.addItem.f_pay_number),
|
|
263
|
-
f_sale_money: Number(this.infee.f_construction_cost) * Number(this.addItem.f_pay_number)
|
|
264
|
-
}
|
|
265
|
-
this.temp.push(bill)
|
|
266
|
-
} else if (this.charging_item[index].label === '入户安装费' && this.charging_item[index].value === false) {
|
|
267
|
-
this.addItem.f_fee = Number(this.addItem.f_fee) - (Number(this.infee.f_construction_cost) * Number(this.addItem.f_pay_number))
|
|
268
|
-
this.temp.forEach((item, x) => {
|
|
269
|
-
if (item.f_commodity_name === this.charging_item[index].label) {
|
|
270
|
-
this.temp.splice(x, 1)
|
|
271
|
-
}
|
|
272
|
-
})
|
|
273
|
-
}
|
|
274
|
-
if (this.charging_item[index].label === '材料费' && this.charging_item[index].value === true) {
|
|
275
|
-
this.addItem.f_fee = this.addItem.f_fee ? this.addItem.f_fee : 0
|
|
276
|
-
this.infee.f_material_cost = this.infee.f_material_cost ? this.infee.f_material_cost : 0
|
|
277
|
-
this.addItem.f_fee = Number(this.addItem.f_fee) + (Number(this.infee.f_material_cost) * Number(this.addItem.f_pay_number))
|
|
278
|
-
|
|
279
|
-
// 加入到票据中
|
|
280
|
-
let bill = {
|
|
281
|
-
f_commodity_name: this.charging_item[index].label,
|
|
282
|
-
f_price: this.infee.f_material_cost,
|
|
283
|
-
f_quantity: this.addItem.f_pay_number,
|
|
284
|
-
f_money: Number(this.infee.f_material_cost) * Number(this.addItem.f_pay_number),
|
|
285
|
-
f_sale_money: Number(this.infee.f_material_cost) * Number(this.addItem.f_pay_number)
|
|
286
|
-
}
|
|
287
|
-
this.temp.push(bill)
|
|
288
|
-
} else if (this.charging_item[index].label === '材料费' && this.charging_item[index].value === false) {
|
|
289
|
-
this.addItem.f_fee = Number(this.addItem.f_fee) - (Number(this.infee.f_material_cost) * Number(this.addItem.f_pay_number))
|
|
290
|
-
this.temp.forEach((item, x) => {
|
|
291
|
-
if (item.f_commodity_name === this.charging_item[index].label) {
|
|
292
|
-
this.temp.splice(x, 1)
|
|
293
|
-
}
|
|
294
|
-
})
|
|
295
|
-
}
|
|
296
|
-
if (this.charging_item[index].label === '人工费' && this.charging_item[index].value === true) {
|
|
297
|
-
this.addItem.f_fee = this.addItem.f_fee ? this.addItem.f_fee : 0
|
|
298
|
-
this.infee.f_labor_cost = this.infee.f_labor_cost ? this.infee.f_labor_cost : 0
|
|
299
|
-
this.addItem.f_fee = Number(this.addItem.f_fee) + (Number(this.infee.f_labor_cost) * Number(this.addItem.f_pay_number))
|
|
300
|
-
|
|
301
|
-
// 加入到票据中
|
|
302
|
-
let bill = {
|
|
303
|
-
f_commodity_name: this.charging_item[index].label,
|
|
304
|
-
f_price: this.infee.f_labor_cost,
|
|
305
|
-
f_quantity: this.addItem.f_pay_number,
|
|
306
|
-
f_money: Number(this.infee.f_labor_cost) * Number(this.addItem.f_pay_number),
|
|
307
|
-
f_sale_money: Number(this.infee.f_labor_cost) * Number(this.addItem.f_pay_number)
|
|
308
|
-
}
|
|
309
|
-
this.temp.push(bill)
|
|
310
|
-
} else if (this.charging_item[index].label === '人工费' && this.charging_item[index].value === false) {
|
|
311
|
-
this.addItem.f_fee = Number(this.addItem.f_fee) - (Number(this.infee.f_labor_cost) * Number(this.addItem.f_pay_number))
|
|
312
|
-
this.temp.forEach((item, x) => {
|
|
313
|
-
if (item.f_commodity_name === this.charging_item[index].label) {
|
|
314
|
-
this.temp.splice(x, 1)
|
|
315
|
-
}
|
|
316
|
-
})
|
|
317
|
-
}
|
|
318
|
-
if (this.charging_item[index].label === '改管费' && this.charging_item[index].value === true) {
|
|
319
|
-
this.addItem.f_fee = this.addItem.f_fee ? this.addItem.f_fee : 0
|
|
320
|
-
this.infee.f_change_pipeline_cost = this.infee.f_change_pipeline_cost ? this.infee.f_change_pipeline_cost : 0
|
|
321
|
-
this.addItem.f_fee = Number(this.addItem.f_fee) + (Number(this.infee.f_change_pipeline_cost) * Number(this.addItem.f_pay_number))
|
|
322
|
-
|
|
323
|
-
// 加入到票据中
|
|
324
|
-
let bill = {
|
|
325
|
-
f_commodity_name: this.charging_item[index].label,
|
|
326
|
-
f_price: this.infee.f_change_pipeline_cost,
|
|
327
|
-
f_quantity: this.addItem.f_pay_number,
|
|
328
|
-
f_money: Number(this.infee.f_change_pipeline_cost) * Number(this.addItem.f_pay_number),
|
|
329
|
-
f_sale_money: Number(this.infee.f_change_pipeline_cost) * Number(this.addItem.f_pay_number)
|
|
330
|
-
}
|
|
331
|
-
this.temp.push(bill)
|
|
332
|
-
} else if (this.charging_item[index].label === '改管费' && this.charging_item[index].value === false) {
|
|
333
|
-
this.addItem.f_fee = Number(this.addItem.f_fee) - (Number(this.infee.f_change_pipeline_cost) * Number(this.addItem.f_pay_number))
|
|
334
|
-
this.temp.forEach((item, x) => {
|
|
335
|
-
if (item.f_commodity_name === this.charging_item[index].label) {
|
|
336
|
-
this.temp.splice(x, 1)
|
|
337
|
-
}
|
|
338
|
-
})
|
|
339
|
-
}
|
|
340
|
-
if (this.charging_item[index].label === '设备安装费' && this.charging_item[index].value === true) {
|
|
341
|
-
this.addItem.f_fee = this.addItem.f_fee ? this.addItem.f_fee : 0
|
|
342
|
-
this.infee.f_sbaz_cost = this.infee.f_sbaz_cost ? this.infee.f_sbaz_cost : 0
|
|
343
|
-
this.addItem.f_fee = Number(this.addItem.f_fee) + (Number(this.infee.f_sbaz_cost) * Number(this.addItem.f_pay_number))
|
|
344
|
-
|
|
345
|
-
// 加入到票据中
|
|
346
|
-
let bill = {
|
|
347
|
-
f_commodity_name: this.charging_item[index].label,
|
|
348
|
-
f_price: this.infee.f_sbaz_cost,
|
|
349
|
-
f_quantity: this.addItem.f_pay_number,
|
|
350
|
-
f_money: Number(this.infee.f_sbaz_cost) * Number(this.addItem.f_pay_number),
|
|
351
|
-
f_sale_money: Number(this.infee.f_sbaz_cost) * Number(this.addItem.f_pay_number)
|
|
352
|
-
}
|
|
353
|
-
this.temp.push(bill)
|
|
354
|
-
} else if (this.charging_item[index].label === '设备安装费' && this.charging_item[index].value === false) {
|
|
355
|
-
this.addItem.f_fee = Number(this.addItem.f_fee) - (Number(this.infee.f_sbaz_cost) * Number(this.addItem.f_pay_number))
|
|
356
|
-
this.temp.forEach((item, x) => {
|
|
357
|
-
if (item.f_commodity_name === this.charging_item[index].label) {
|
|
358
|
-
this.temp.splice(x, 1)
|
|
359
|
-
}
|
|
360
|
-
})
|
|
361
|
-
}
|
|
362
|
-
},
|
|
363
|
-
// 小写转换大写
|
|
364
|
-
smalltoBIG(n) {
|
|
365
|
-
let fraction = ['角', '分'];
|
|
366
|
-
let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
367
|
-
let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
|
|
368
|
-
let head = n < 0 ? '欠' : '';
|
|
369
|
-
n = Math.abs(n);
|
|
370
|
-
|
|
371
|
-
let s = '';
|
|
372
|
-
|
|
373
|
-
for (var i = 0; i < fraction.length; i++) {
|
|
374
|
-
s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
|
|
375
|
-
}
|
|
376
|
-
s = s || '整';
|
|
377
|
-
n = Math.floor(n);
|
|
378
|
-
|
|
379
|
-
for (var i = 0; i < unit[0].length && n > 0; i++) {
|
|
380
|
-
let p = '';
|
|
381
|
-
for (var j = 0; j < unit[1].length && n > 0; j++) {
|
|
382
|
-
p = digit[n % 10] + unit[1][j] + p;
|
|
383
|
-
n = Math.floor(n / 10);
|
|
384
|
-
}
|
|
385
|
-
s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
|
|
386
|
-
}
|
|
387
|
-
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
|
|
388
|
-
}
|
|
389
|
-
,
|
|
390
|
-
//新增收费 开启模态框
|
|
391
|
-
add() {
|
|
392
|
-
this.addItem.f_fee = 0
|
|
393
|
-
this.showpay = true
|
|
394
|
-
}
|
|
395
|
-
,
|
|
396
|
-
// 关闭模态框
|
|
397
|
-
close() {
|
|
398
|
-
this.showpay = false
|
|
399
|
-
this.addItem.f_fee = 0
|
|
400
|
-
this.addItem.f_capital = ''
|
|
401
|
-
this.addItem.f_payfee_name = ''
|
|
402
|
-
this.addItem.f_payfee_money = 0
|
|
403
|
-
this.addItem.f_pay_number = 1
|
|
404
|
-
for (let i = 0; i < this.charging_item.length; i++) {
|
|
405
|
-
this.charging_item[i].value = false
|
|
406
|
-
}
|
|
407
|
-
},
|
|
408
|
-
// 处理数字,例如: 1 转换成 001
|
|
409
|
-
handle() {
|
|
410
|
-
while (this.number.value.length < 3) {
|
|
411
|
-
this.number.value = '0' + this.number.value
|
|
412
|
-
}
|
|
413
|
-
},
|
|
414
|
-
// 输入金额校验
|
|
415
|
-
check(){
|
|
416
|
-
let re = /^[+-]?\d+(\.\d+)?$/ //判断字符串是否为数字
|
|
417
|
-
if (!re.test(this.addItem.f_payfee_money)){
|
|
418
|
-
this.$showMessage("请输入数字")
|
|
419
|
-
this.addItem.f_payfee_money=''
|
|
420
|
-
return false
|
|
421
|
-
}
|
|
422
|
-
return true
|
|
423
|
-
},
|
|
424
|
-
// 模态框确定按钮保存数据
|
|
425
|
-
async confirm() {
|
|
426
|
-
if(this.check()===false){
|
|
427
|
-
return
|
|
428
|
-
}
|
|
429
|
-
// 构造字符串
|
|
430
|
-
let str = ''
|
|
431
|
-
for (let i = 0; i < this.charging_item.length; i++) {
|
|
432
|
-
if (this.charging_item[i].value === true) {
|
|
433
|
-
str += this.charging_item[i].label
|
|
434
|
-
str += ','
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
// this.addItem.f_payfeedate = Util.toStandardDateString()
|
|
438
|
-
this.addItem.f_charging_item = str.substring(0, str.length - 1) // 去掉最后一个逗号
|
|
439
|
-
this.addItem.f_payfee_way = typeof this.addItem.f_payfee_way === 'object' ? this.addItem.f_payfee_way[0] : ''
|
|
440
|
-
this.addItem.processid = this.infee.f_process_id
|
|
441
|
-
this.addItem.applyid = this.infee.f_apply_num
|
|
442
|
-
this.addItem.f_operator = this.$login.f.name
|
|
443
|
-
this.addItem.f_department = this.$login.f.f_parentname
|
|
444
|
-
this.addItem.f_filiale = this.$login.f.f_fengongsi
|
|
445
|
-
this.addItem.f_fee = Number(this.addItem.f_fee)
|
|
446
|
-
|
|
447
|
-
this.addItem.f_payfee_remarks = this.addItem.f_payfee_money ? '其它费用(' + this.addItem.f_payfee_name + '):' + this.addItem.f_payfee_money + '元' : ''
|
|
448
|
-
// this.model.rows.push(this.addItem)
|
|
449
|
-
let http = new HttpResetClass()
|
|
450
|
-
await http.load('POST', 'rs/logic/saveentity', {data:{tablename:'t_paydetail',parameters:this.addItem}}, {resolveMsg: null, rejectMsg: "添加失败"})
|
|
451
|
-
|
|
452
|
-
// 组织数据打印票据
|
|
453
|
-
let http2 = new HttpResetClass()
|
|
454
|
-
let data2 = {
|
|
455
|
-
tablename: 't_singlevalue',
|
|
456
|
-
condition: `name = '销售单编号'`
|
|
457
|
-
}
|
|
458
|
-
let res2 = await http2.load('POST', 'rs/sql/
|
|
459
|
-
resolveMsg: null,
|
|
460
|
-
rejectMsg: "获取销售单编号失败"
|
|
461
|
-
}, {silent: true})
|
|
462
|
-
this.number = res2.data[0]
|
|
463
|
-
this.handle()
|
|
464
|
-
// let temp = {}
|
|
465
|
-
// let data = {
|
|
466
|
-
// condition: '1=1',
|
|
467
|
-
// this.billinfo= {
|
|
468
|
-
// f_billnumber: 'XS-' + Util.toStandardDateString2() + '-' + this.number.value,
|
|
469
|
-
// f_date: Util.toStandardDateString(),
|
|
470
|
-
// f_remark: ' ',
|
|
471
|
-
// f_username: this.$login.f.name
|
|
472
|
-
// },
|
|
473
|
-
this.$refs.billxsdx.billinfo = {
|
|
474
|
-
f_billnumber: 'XS-' + Util.toStandardDateString2() + '-' + this.number.value,
|
|
475
|
-
f_date: Util.toStandardDateString(),
|
|
476
|
-
f_remark: ' ',
|
|
477
|
-
f_username: this.$login.f.name
|
|
478
|
-
}
|
|
479
|
-
this.f_billnumber = 'XS-' + Util.toStandardDateString2() + '-' + this.number.value
|
|
480
|
-
this.$refs.billxsdx.info = this.temp
|
|
481
|
-
// }
|
|
482
|
-
// }
|
|
483
|
-
this.$refs.billxsdx.load()
|
|
484
|
-
setTimeout(()=>{
|
|
485
|
-
this.$refs.billxsdx.billprint()
|
|
486
|
-
},5000)
|
|
487
|
-
// t_pay
|
|
488
|
-
// http = new HttpResetClass()
|
|
489
|
-
// await http.load('POST', 'rs/logic/insertpaydipetail', this.addItem, {resolveMsg: null, rejectMsg: "添加失败"})
|
|
490
|
-
|
|
491
|
-
// let bill = await new DataModel('rs/report/xiaoshoudan', {data})
|
|
492
|
-
// http = new HttpResetClass()
|
|
493
|
-
// await http.load('POST', 'rs/report/xiaoshoudan', data, {resolveMsg: null, rejectMsg: "票据打印失败"})
|
|
494
|
-
|
|
495
|
-
this.updateNumber()
|
|
496
|
-
this.close()
|
|
497
|
-
this.load()
|
|
498
|
-
},
|
|
499
|
-
// 更新 单据编号
|
|
500
|
-
async updateNumber() {
|
|
501
|
-
let http = new HttpResetClass()
|
|
502
|
-
this.number.value = String(Number(this.number.value) + 1)
|
|
503
|
-
await http.load('POST', 'rs/logic/updatesinglevalue', {data: this.number}, {
|
|
504
|
-
resolveMsg: null,
|
|
505
|
-
rejectMsg: "存储销售单编号失败"
|
|
506
|
-
})
|
|
507
|
-
http = new HttpResetClass()
|
|
508
|
-
let billinfo = Object.assign({}, this.infee, this.temp)
|
|
509
|
-
delete billinfo.id
|
|
510
|
-
// 票据类型
|
|
511
|
-
billinfo.f_bill_type = '销售单'
|
|
512
|
-
billinfo.f_billnumber = this.f_billnumber
|
|
513
|
-
billinfo.f_date = Util.toStandardDateString(),
|
|
514
|
-
billinfo.f_username = this.$login.f.name
|
|
515
|
-
billinfo.f_remark = ' '
|
|
516
|
-
for(let i = 0;i<this.temp.length;i++){
|
|
517
|
-
this.temp[i].f_sale_money=String(this.temp[i].f_sale_money)
|
|
518
|
-
}
|
|
519
|
-
let data = {
|
|
520
|
-
billinfo: billinfo,
|
|
521
|
-
array: this.temp
|
|
522
|
-
}
|
|
523
|
-
await http.load('POST', 'rs/logic/makebillrecord', {data: data}, {resolveMsg: null, rejectMsg: "票据记录存储失败"})
|
|
524
|
-
}
|
|
525
|
-
,
|
|
526
|
-
// 获取数据
|
|
527
|
-
async load() {
|
|
528
|
-
let http = new HttpResetClass()
|
|
529
|
-
let data = {
|
|
530
|
-
columnname: 'f_preparation_fee',
|
|
531
|
-
tablename: 't_preparationfee',
|
|
532
|
-
condition: `processid = '${this.infee.f_process_id}'`
|
|
533
|
-
}
|
|
534
|
-
let res = await
|
|
535
|
-
http.load('POST', 'rs/sql/getSum', {data: data}, {resolveMsg: null, rejectMsg: '获取总金额失败'})
|
|
536
|
-
this.sum = Math.round(res.data[0].f_preparation_fee * 100) / 100;
|
|
537
|
-
data = {
|
|
538
|
-
tablename: 't_paydetail',
|
|
539
|
-
condition: `processid = '${this.infee.f_process_id}'`
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
res = await
|
|
543
|
-
http.load('POST', 'rs/sql/
|
|
544
|
-
// 去除付款时间的时分秒
|
|
545
|
-
for (var i = 0; i < res.data.length; i++) {
|
|
546
|
-
res.data[i].f_payfeedate = res.data[i].f_payfeedate.substring(0, 11)
|
|
547
|
-
}
|
|
548
|
-
this.model.rows = res.data
|
|
549
|
-
}
|
|
550
|
-
,
|
|
551
|
-
}
|
|
552
|
-
,
|
|
553
|
-
watch: {
|
|
554
|
-
'addItem.f_pay_number'() {
|
|
555
|
-
let sum = 0
|
|
556
|
-
this.charging_item.forEach((item) => {
|
|
557
|
-
if (item.value == true) {
|
|
558
|
-
if (item.label === '开户费') {
|
|
559
|
-
sum += Number(this.infee.f_account_cost)
|
|
560
|
-
}
|
|
561
|
-
if (item.label === '入户安装费') {
|
|
562
|
-
sum += Number(this.infee.f_construction_cost)
|
|
563
|
-
}
|
|
564
|
-
if (item.label === '材料费') {
|
|
565
|
-
sum += Number(this.infee.f_material_cost)
|
|
566
|
-
}
|
|
567
|
-
if (item.label === '人工费') {
|
|
568
|
-
sum += Number(this.infee.f_labor_cost)
|
|
569
|
-
}
|
|
570
|
-
if (item.label === '改管费') {
|
|
571
|
-
sum += Number(this.infee.f_change_pipeline_cost)
|
|
572
|
-
}
|
|
573
|
-
if (item.label === '设备安装费') {
|
|
574
|
-
sum += Number(this.infee.f_sbaz_cost)
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
})
|
|
578
|
-
if (this.addItem.f_pay_number) {
|
|
579
|
-
this.addItem.f_fee = (Number(sum) * Number(this.addItem.f_pay_number)) + Number(this.addItem.f_payfee_money)
|
|
580
|
-
} else {
|
|
581
|
-
this.addItem.f_fee = Number(sum) + Number(this.addItem.f_payfee_money)
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
}
|
|
585
|
-
,
|
|
586
|
-
'addItem.f_payfee_money'(new_v, old_v) {
|
|
587
|
-
if (old_v && !isNaN(Number(old_v))) {
|
|
588
|
-
this.addItem.f_fee = Number(this.addItem.f_fee) - Number(old_v)
|
|
589
|
-
}
|
|
590
|
-
if (new_v && !isNaN(Number(new_v))) {
|
|
591
|
-
this.addItem.f_fee = Number(this.addItem.f_fee) + Number(new_v)
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
,
|
|
596
|
-
computed: {
|
|
597
|
-
// 计算大写
|
|
598
|
-
getCapital() {
|
|
599
|
-
if (this.addItem.f_fee) {
|
|
600
|
-
this.addItem.f_capital = this.smalltoBIG(Number(this.addItem.f_fee))
|
|
601
|
-
}
|
|
602
|
-
return this.addItem.f_capital
|
|
603
|
-
},
|
|
604
|
-
subcost() {
|
|
605
|
-
let temp = this.sum;
|
|
606
|
-
for (var i = 0; i < this.model.rows.length; i++) {
|
|
607
|
-
temp = Number(temp) - Number(this.model.rows[i].f_fee)
|
|
608
|
-
}
|
|
609
|
-
return temp
|
|
610
|
-
},
|
|
611
|
-
// totalcost () {
|
|
612
|
-
// this.model.f_total_cost = Number(this.model.f_construction_cost) + Number(this.model.f_material_cost)
|
|
613
|
-
// + Number(this.model.f_labor_cost) + Number(this.model.f_change_pipeline_cost)
|
|
614
|
-
// + Number(this.model.f_sbaz_cost) - Number(this.model.f_jmhj_cost)
|
|
615
|
-
// return this.model.f_total_cost
|
|
616
|
-
// },
|
|
617
|
-
feeoptions() {
|
|
618
|
-
return this.$appdata.getParam('费用类型')
|
|
619
|
-
}
|
|
620
|
-
,
|
|
621
|
-
dayin() {
|
|
622
|
-
return this.$appdata.getParam('打印格式')
|
|
623
|
-
}
|
|
624
|
-
,
|
|
625
|
-
jiaofei() {
|
|
626
|
-
return this.$appdata.getParam('缴费类型')
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
</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">预付扣款</h3>
|
|
7
|
+
</div>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<span class="col-sm-1"></span><span class="col-sm-3">预付款总金额:{{sum}}元</span><span class="col-sm-3">预付款余额:{{subcost}}元</span>
|
|
12
|
+
<button type="button" class="btn btn-warning col-sm-3 col-sm-offset-3" @click="add()">新增扣款</button>
|
|
13
|
+
<div class="col-sm-12" style="height: auto">
|
|
14
|
+
<div class="form-inline auto" style="margin-bottom: 5px;">
|
|
15
|
+
</div>
|
|
16
|
+
<div class="col-sm-12 span recordTable" style="margin-top: 10px;min-height: 500px">
|
|
17
|
+
<partial-view v-ref:single-load>
|
|
18
|
+
<data-grid :model="model" v-ref:grid>
|
|
19
|
+
<template partial='head'>
|
|
20
|
+
<tr>
|
|
21
|
+
<th>序号</th>
|
|
22
|
+
<th>扣款金额(元)</th>
|
|
23
|
+
<th>金额大写</th>
|
|
24
|
+
<th>收费项</th>
|
|
25
|
+
<th>缴费类型</th>
|
|
26
|
+
<th>收费人员</th>
|
|
27
|
+
<th>日期</th>
|
|
28
|
+
<th>备注</th>
|
|
29
|
+
<!--<th>操作</th>-->
|
|
30
|
+
</tr>
|
|
31
|
+
</template>
|
|
32
|
+
<template partial='body'>
|
|
33
|
+
<td style="text-align: center">{{$index+1}}</td>
|
|
34
|
+
<td style="text-align: center">{{row.f_fee}}</td>
|
|
35
|
+
<td style="text-align: center">{{row.f_capital}}</td>
|
|
36
|
+
<td style="text-align: center">
|
|
37
|
+
<nobr>{{row.f_charging_item}}</nobr>
|
|
38
|
+
</td>
|
|
39
|
+
<td style="text-align: center">{{row.f_payfee_way}}</td>
|
|
40
|
+
<td style="text-align: center">{{row.f_operator}}</td>
|
|
41
|
+
<td style="text-align: center">{{row.f_payfeedate}}</td>
|
|
42
|
+
<td style="text-align: center">{{row.f_payfee_remarks}}</td>
|
|
43
|
+
<!--<td class="flex-around">-->
|
|
44
|
+
<!--<!–<button type="button" name="button" class="btn btn-link"–>-->
|
|
45
|
+
<!--<!–@click.stop="$parent.$parent.$parent.modifyParam(row,'修改')">修改–>-->
|
|
46
|
+
<!--<!–</button>–>-->
|
|
47
|
+
<!--<button type="button" name="button" class="btn btn-link"-->
|
|
48
|
+
<!--@click.stop="$parent.$parent.$parent.deleteItem(row)">删除-->
|
|
49
|
+
<!--</button>-->
|
|
50
|
+
<!--</td>-->
|
|
51
|
+
</template>
|
|
52
|
+
</data-grid>
|
|
53
|
+
</partial-view>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<!--<div class="form-group col-sm-12">-->
|
|
58
|
+
<!--<div class="col-sm-2">-->
|
|
59
|
+
<!--<label class="control-label col-sm-12">收费备注:</label>-->
|
|
60
|
+
<!--</div>-->
|
|
61
|
+
<!--<div class="col-sm-10">-->
|
|
62
|
+
<!--<textarea class="form-control" rows="3" v-model="model.f_payfee_remarks"></textarea>-->
|
|
63
|
+
<!--</div>-->
|
|
64
|
+
<!--</div>-->
|
|
65
|
+
<div class="form-group col-sm-12">
|
|
66
|
+
<div class="col-sm-6">
|
|
67
|
+
<label class="control-label col-sm-4">分公司:</label>
|
|
68
|
+
<div class="col-sm-8">
|
|
69
|
+
<input class="form-control" type="text" v-model="model.f_filiale" disabled>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
<div class="col-sm-6">
|
|
73
|
+
<label class="control-label col-sm-4">操作日期:</label>
|
|
74
|
+
<div class="col-sm-8">
|
|
75
|
+
<input class="form-control" type="text" v-model="model.f_payfee_date" disabled>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
<div class="form-group col-sm-12">
|
|
80
|
+
<div class="col-sm-6">
|
|
81
|
+
<label class="control-label col-sm-4">部门:</label>
|
|
82
|
+
<div class="col-sm-8">
|
|
83
|
+
<input class="form-control" type="text" v-model="model.f_payfee_department" disabled>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
<div class="col-sm-6">
|
|
87
|
+
<label class="control-label col-sm-4">操作人:</label>
|
|
88
|
+
<div class="col-sm-8">
|
|
89
|
+
<input class="form-control" type="text" v-model="model.f_payfee_operator" disabled>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
<!--<div class="from-group col-sm-12">-->
|
|
94
|
+
<!--<center>-->
|
|
95
|
+
<!--<button type="button" @click="confirm()" class="btn btn-primary" style="width:80px; margin-left:50px;"-->
|
|
96
|
+
<!--:disabled="$v.invalid">-->
|
|
97
|
+
<!--保存-->
|
|
98
|
+
<!--</button>-->
|
|
99
|
+
<!--<button type="button" @click="reset()" class="btn btn-warning" style="width:80px; margin-left:50px;">-->
|
|
100
|
+
<!--撤销-->
|
|
101
|
+
<!--</button>-->
|
|
102
|
+
<!--</center>-->
|
|
103
|
+
<!--</div>-->
|
|
104
|
+
<modal :show.sync="showpay" v-ref:modal backdrop="false">
|
|
105
|
+
<header slot="modal-header" class="modal-header">
|
|
106
|
+
<button type="button" class="close" @click="close"><span>×</span></button>
|
|
107
|
+
<h4 class="modal-title">新增收费</h4>
|
|
108
|
+
</header>
|
|
109
|
+
<article slot="modal-body" class="modal-body">
|
|
110
|
+
<div v-if="showpay">
|
|
111
|
+
<validator name="validator">
|
|
112
|
+
<div class="from-group">
|
|
113
|
+
<label>总金额(元)</label>
|
|
114
|
+
<input type="text" class="form-control" v-model="addItem.f_fee" readonly>
|
|
115
|
+
</div>
|
|
116
|
+
<div class="from-group">
|
|
117
|
+
<label>总金额大写</label>
|
|
118
|
+
<input type="text" class="form-control" v-model="getCapital" readonly>
|
|
119
|
+
</div>
|
|
120
|
+
<!--<div class="from-group">-->
|
|
121
|
+
<!--<label>交费日期</label>-->
|
|
122
|
+
<!--<div>-->
|
|
123
|
+
<!--<datepicker width="600.76px;"-->
|
|
124
|
+
<!--:value.sync="addItem.f_payfeedate"-->
|
|
125
|
+
<!--:format="'yyyy-MM-dd'"-->
|
|
126
|
+
<!--v-model="addItem.f_payfeedate" readonly="readonly"-->
|
|
127
|
+
<!--:show-reset-button="reset">-->
|
|
128
|
+
<!--</datepicker>-->
|
|
129
|
+
<!--</div>-->
|
|
130
|
+
<!--</div>-->
|
|
131
|
+
<div class="from-group">
|
|
132
|
+
<label>收费项 </label>
|
|
133
|
+
<div>
|
|
134
|
+
<label v-for="item in charging_item"><input type="checkbox"
|
|
135
|
+
@change="checkedValue($index)"/>{{item.label}} </label>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
<div class="from-group" v-if="!infee.f_apply_type.includes('个人')">
|
|
139
|
+
<label>缴费户数 :</label>
|
|
140
|
+
<input type="text" v-model="addItem.f_pay_number">
|
|
141
|
+
</div>
|
|
142
|
+
<div class="from-group">
|
|
143
|
+
<label>其它费用名称:</label>
|
|
144
|
+
<input class="form-control" v-model="addItem.f_payfee_name">
|
|
145
|
+
<div>
|
|
146
|
+
<label>其它费用金额(元):</label>
|
|
147
|
+
<input class="form-control" v-model="addItem.f_payfee_money">
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
<div class="from-group">
|
|
151
|
+
<label>缴费类型</label>
|
|
152
|
+
<v-select :options="jiaofei"
|
|
153
|
+
v-validate:addItem.f_payfee_way[0] v-model="addItem.f_payfee_way"
|
|
154
|
+
:value.sync="addItem.f_payfee_way" close-on-select>
|
|
155
|
+
</v-select>
|
|
156
|
+
</div>
|
|
157
|
+
</validator>
|
|
158
|
+
</div>
|
|
159
|
+
</article>
|
|
160
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
161
|
+
<button v-show="showpay" type="button" class="btn btn-default" @click='close'>取消</button>
|
|
162
|
+
<button v-show="showpay" type="button" class="btn btn-success" @click='confirm'>确认</button>
|
|
163
|
+
</footer>
|
|
164
|
+
</modal>
|
|
165
|
+
<billxsd v-show="false" v-ref:billxsdx :billinfo="billinfo" :billselect="billselect" :info="info"></billxsd>
|
|
166
|
+
</div>
|
|
167
|
+
</template>
|
|
168
|
+
<script>
|
|
169
|
+
import {DataModel} from 'vue-client'
|
|
170
|
+
import {HttpResetClass} from 'vue-client'
|
|
171
|
+
import InputAndSelect from "vue-client/src/vue-strap/src/InputAndSelect";
|
|
172
|
+
import * as Util from '../../../Util'
|
|
173
|
+
|
|
174
|
+
let gen = function* (self, val) {
|
|
175
|
+
val.f_actualfee_type = val.f_actualfee_type[0]
|
|
176
|
+
val.f_bill_type = val.f_bill_type[0]
|
|
177
|
+
yield self.$resetpost('rs/logic/saveentity', {data:{tablename:'t_apply',parameters:val}})
|
|
178
|
+
delete val.id
|
|
179
|
+
self.$resetpost('rs/logic/saveentity', {data:{tablename:'t_record',parameters:val}})
|
|
180
|
+
.then(() => {
|
|
181
|
+
self.reset()
|
|
182
|
+
})
|
|
183
|
+
}
|
|
184
|
+
export default {
|
|
185
|
+
components: {InputAndSelect},
|
|
186
|
+
title: '报装收费',
|
|
187
|
+
data() {
|
|
188
|
+
return {
|
|
189
|
+
f_billnumber: '',
|
|
190
|
+
temp: [], // 票据信息
|
|
191
|
+
billinfo: {}, // 票据信息
|
|
192
|
+
number: {}, // 单值表获取的销售单编号信息
|
|
193
|
+
sum: 0, // 总共预付款
|
|
194
|
+
billinfo: null, // 打印票据准备
|
|
195
|
+
billselect: {f_process_id:this.infee.f_process_id}, // 打印票据准备
|
|
196
|
+
info: null, // 打印票据准备
|
|
197
|
+
charging_item: [{label: '开户费', value: false},
|
|
198
|
+
{label: '入户安装费', value: false},
|
|
199
|
+
{label: '人工费', value: false},
|
|
200
|
+
{label: '改管费', value: false},
|
|
201
|
+
{label: '材料费', value: false},
|
|
202
|
+
{label: '设备安装费', value: false}],
|
|
203
|
+
showpay: false, // 新增收费模态框开关
|
|
204
|
+
addItem: {
|
|
205
|
+
f_fee: 0,
|
|
206
|
+
f_pay_number: 1, // 缴费户数默认为1
|
|
207
|
+
f_payfee_money: 0, // 其它费用
|
|
208
|
+
}, // 模态框数据
|
|
209
|
+
model: {
|
|
210
|
+
f_payfee_operator: '',
|
|
211
|
+
f_payfee_department: '',
|
|
212
|
+
f_filiale: '',
|
|
213
|
+
f_payfee_date: '',
|
|
214
|
+
rows: [] // 付费数据数组
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
props: ['infee'],
|
|
219
|
+
ready() {
|
|
220
|
+
this.load() // 初始化数据
|
|
221
|
+
this.model.f_payfee_operator = this.$login.f.name
|
|
222
|
+
this.model.f_payfee_department = this.$login.f.f_parentname
|
|
223
|
+
this.model.f_filiale = this.$login.f.f_fengongsi
|
|
224
|
+
this.model.f_payfee_date = this.$login.toStandardDateString()
|
|
225
|
+
},
|
|
226
|
+
methods: {
|
|
227
|
+
// 选中
|
|
228
|
+
checkedValue(index) {
|
|
229
|
+
this.charging_item[index].value = !this.charging_item[index].value
|
|
230
|
+
if (this.charging_item[index].label === '开户费' && this.charging_item[index].value === true) {
|
|
231
|
+
this.addItem.f_fee = this.addItem.f_fee ? this.addItem.f_fee : 0
|
|
232
|
+
this.infee.f_account_cost = this.infee.f_account_cost ? this.infee.f_account_cost : 0
|
|
233
|
+
this.addItem.f_fee = Number(this.addItem.f_fee) + (Number(this.infee.f_account_cost) * Number(this.addItem.f_pay_number))
|
|
234
|
+
|
|
235
|
+
// 加入到票据中
|
|
236
|
+
let bill = {
|
|
237
|
+
f_commodity_name: this.charging_item[index].label,
|
|
238
|
+
f_price: this.infee.f_account_cost,
|
|
239
|
+
f_quantity: this.addItem.f_pay_number,
|
|
240
|
+
f_money: Number(this.infee.f_account_cost) * Number(this.addItem.f_pay_number),
|
|
241
|
+
f_sale_money: Number(this.infee.f_account_cost) * Number(this.addItem.f_pay_number)
|
|
242
|
+
}
|
|
243
|
+
this.temp.push(bill)
|
|
244
|
+
} else if (this.charging_item[index].label === '开户费' && this.charging_item[index].value === false) {
|
|
245
|
+
this.addItem.f_fee = Number(this.addItem.f_fee) - (Number(this.infee.f_account_cost) * Number(this.addItem.f_pay_number))
|
|
246
|
+
this.temp.forEach((item, x) => {
|
|
247
|
+
if (item.f_commodity_name === this.charging_item[index].label) {
|
|
248
|
+
this.temp.splice(x, 1)
|
|
249
|
+
}
|
|
250
|
+
})
|
|
251
|
+
}
|
|
252
|
+
if (this.charging_item[index].label === '入户安装费' && this.charging_item[index].value === true) {
|
|
253
|
+
this.addItem.f_fee = this.addItem.f_fee ? this.addItem.f_fee : 0
|
|
254
|
+
this.infee.f_construction_cost = this.infee.f_construction_cost ? this.infee.f_construction_cost : 0
|
|
255
|
+
this.addItem.f_fee = Number(this.addItem.f_fee) + (Number(this.infee.f_construction_cost) * Number(this.addItem.f_pay_number))
|
|
256
|
+
|
|
257
|
+
// 加入到票据中
|
|
258
|
+
let bill = {
|
|
259
|
+
f_commodity_name: this.charging_item[index].label,
|
|
260
|
+
f_price: this.infee.f_construction_cost,
|
|
261
|
+
f_quantity: this.addItem.f_pay_number,
|
|
262
|
+
f_money: Number(this.infee.f_construction_cost) * Number(this.addItem.f_pay_number),
|
|
263
|
+
f_sale_money: Number(this.infee.f_construction_cost) * Number(this.addItem.f_pay_number)
|
|
264
|
+
}
|
|
265
|
+
this.temp.push(bill)
|
|
266
|
+
} else if (this.charging_item[index].label === '入户安装费' && this.charging_item[index].value === false) {
|
|
267
|
+
this.addItem.f_fee = Number(this.addItem.f_fee) - (Number(this.infee.f_construction_cost) * Number(this.addItem.f_pay_number))
|
|
268
|
+
this.temp.forEach((item, x) => {
|
|
269
|
+
if (item.f_commodity_name === this.charging_item[index].label) {
|
|
270
|
+
this.temp.splice(x, 1)
|
|
271
|
+
}
|
|
272
|
+
})
|
|
273
|
+
}
|
|
274
|
+
if (this.charging_item[index].label === '材料费' && this.charging_item[index].value === true) {
|
|
275
|
+
this.addItem.f_fee = this.addItem.f_fee ? this.addItem.f_fee : 0
|
|
276
|
+
this.infee.f_material_cost = this.infee.f_material_cost ? this.infee.f_material_cost : 0
|
|
277
|
+
this.addItem.f_fee = Number(this.addItem.f_fee) + (Number(this.infee.f_material_cost) * Number(this.addItem.f_pay_number))
|
|
278
|
+
|
|
279
|
+
// 加入到票据中
|
|
280
|
+
let bill = {
|
|
281
|
+
f_commodity_name: this.charging_item[index].label,
|
|
282
|
+
f_price: this.infee.f_material_cost,
|
|
283
|
+
f_quantity: this.addItem.f_pay_number,
|
|
284
|
+
f_money: Number(this.infee.f_material_cost) * Number(this.addItem.f_pay_number),
|
|
285
|
+
f_sale_money: Number(this.infee.f_material_cost) * Number(this.addItem.f_pay_number)
|
|
286
|
+
}
|
|
287
|
+
this.temp.push(bill)
|
|
288
|
+
} else if (this.charging_item[index].label === '材料费' && this.charging_item[index].value === false) {
|
|
289
|
+
this.addItem.f_fee = Number(this.addItem.f_fee) - (Number(this.infee.f_material_cost) * Number(this.addItem.f_pay_number))
|
|
290
|
+
this.temp.forEach((item, x) => {
|
|
291
|
+
if (item.f_commodity_name === this.charging_item[index].label) {
|
|
292
|
+
this.temp.splice(x, 1)
|
|
293
|
+
}
|
|
294
|
+
})
|
|
295
|
+
}
|
|
296
|
+
if (this.charging_item[index].label === '人工费' && this.charging_item[index].value === true) {
|
|
297
|
+
this.addItem.f_fee = this.addItem.f_fee ? this.addItem.f_fee : 0
|
|
298
|
+
this.infee.f_labor_cost = this.infee.f_labor_cost ? this.infee.f_labor_cost : 0
|
|
299
|
+
this.addItem.f_fee = Number(this.addItem.f_fee) + (Number(this.infee.f_labor_cost) * Number(this.addItem.f_pay_number))
|
|
300
|
+
|
|
301
|
+
// 加入到票据中
|
|
302
|
+
let bill = {
|
|
303
|
+
f_commodity_name: this.charging_item[index].label,
|
|
304
|
+
f_price: this.infee.f_labor_cost,
|
|
305
|
+
f_quantity: this.addItem.f_pay_number,
|
|
306
|
+
f_money: Number(this.infee.f_labor_cost) * Number(this.addItem.f_pay_number),
|
|
307
|
+
f_sale_money: Number(this.infee.f_labor_cost) * Number(this.addItem.f_pay_number)
|
|
308
|
+
}
|
|
309
|
+
this.temp.push(bill)
|
|
310
|
+
} else if (this.charging_item[index].label === '人工费' && this.charging_item[index].value === false) {
|
|
311
|
+
this.addItem.f_fee = Number(this.addItem.f_fee) - (Number(this.infee.f_labor_cost) * Number(this.addItem.f_pay_number))
|
|
312
|
+
this.temp.forEach((item, x) => {
|
|
313
|
+
if (item.f_commodity_name === this.charging_item[index].label) {
|
|
314
|
+
this.temp.splice(x, 1)
|
|
315
|
+
}
|
|
316
|
+
})
|
|
317
|
+
}
|
|
318
|
+
if (this.charging_item[index].label === '改管费' && this.charging_item[index].value === true) {
|
|
319
|
+
this.addItem.f_fee = this.addItem.f_fee ? this.addItem.f_fee : 0
|
|
320
|
+
this.infee.f_change_pipeline_cost = this.infee.f_change_pipeline_cost ? this.infee.f_change_pipeline_cost : 0
|
|
321
|
+
this.addItem.f_fee = Number(this.addItem.f_fee) + (Number(this.infee.f_change_pipeline_cost) * Number(this.addItem.f_pay_number))
|
|
322
|
+
|
|
323
|
+
// 加入到票据中
|
|
324
|
+
let bill = {
|
|
325
|
+
f_commodity_name: this.charging_item[index].label,
|
|
326
|
+
f_price: this.infee.f_change_pipeline_cost,
|
|
327
|
+
f_quantity: this.addItem.f_pay_number,
|
|
328
|
+
f_money: Number(this.infee.f_change_pipeline_cost) * Number(this.addItem.f_pay_number),
|
|
329
|
+
f_sale_money: Number(this.infee.f_change_pipeline_cost) * Number(this.addItem.f_pay_number)
|
|
330
|
+
}
|
|
331
|
+
this.temp.push(bill)
|
|
332
|
+
} else if (this.charging_item[index].label === '改管费' && this.charging_item[index].value === false) {
|
|
333
|
+
this.addItem.f_fee = Number(this.addItem.f_fee) - (Number(this.infee.f_change_pipeline_cost) * Number(this.addItem.f_pay_number))
|
|
334
|
+
this.temp.forEach((item, x) => {
|
|
335
|
+
if (item.f_commodity_name === this.charging_item[index].label) {
|
|
336
|
+
this.temp.splice(x, 1)
|
|
337
|
+
}
|
|
338
|
+
})
|
|
339
|
+
}
|
|
340
|
+
if (this.charging_item[index].label === '设备安装费' && this.charging_item[index].value === true) {
|
|
341
|
+
this.addItem.f_fee = this.addItem.f_fee ? this.addItem.f_fee : 0
|
|
342
|
+
this.infee.f_sbaz_cost = this.infee.f_sbaz_cost ? this.infee.f_sbaz_cost : 0
|
|
343
|
+
this.addItem.f_fee = Number(this.addItem.f_fee) + (Number(this.infee.f_sbaz_cost) * Number(this.addItem.f_pay_number))
|
|
344
|
+
|
|
345
|
+
// 加入到票据中
|
|
346
|
+
let bill = {
|
|
347
|
+
f_commodity_name: this.charging_item[index].label,
|
|
348
|
+
f_price: this.infee.f_sbaz_cost,
|
|
349
|
+
f_quantity: this.addItem.f_pay_number,
|
|
350
|
+
f_money: Number(this.infee.f_sbaz_cost) * Number(this.addItem.f_pay_number),
|
|
351
|
+
f_sale_money: Number(this.infee.f_sbaz_cost) * Number(this.addItem.f_pay_number)
|
|
352
|
+
}
|
|
353
|
+
this.temp.push(bill)
|
|
354
|
+
} else if (this.charging_item[index].label === '设备安装费' && this.charging_item[index].value === false) {
|
|
355
|
+
this.addItem.f_fee = Number(this.addItem.f_fee) - (Number(this.infee.f_sbaz_cost) * Number(this.addItem.f_pay_number))
|
|
356
|
+
this.temp.forEach((item, x) => {
|
|
357
|
+
if (item.f_commodity_name === this.charging_item[index].label) {
|
|
358
|
+
this.temp.splice(x, 1)
|
|
359
|
+
}
|
|
360
|
+
})
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
// 小写转换大写
|
|
364
|
+
smalltoBIG(n) {
|
|
365
|
+
let fraction = ['角', '分'];
|
|
366
|
+
let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
367
|
+
let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
|
|
368
|
+
let head = n < 0 ? '欠' : '';
|
|
369
|
+
n = Math.abs(n);
|
|
370
|
+
|
|
371
|
+
let s = '';
|
|
372
|
+
|
|
373
|
+
for (var i = 0; i < fraction.length; i++) {
|
|
374
|
+
s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
|
|
375
|
+
}
|
|
376
|
+
s = s || '整';
|
|
377
|
+
n = Math.floor(n);
|
|
378
|
+
|
|
379
|
+
for (var i = 0; i < unit[0].length && n > 0; i++) {
|
|
380
|
+
let p = '';
|
|
381
|
+
for (var j = 0; j < unit[1].length && n > 0; j++) {
|
|
382
|
+
p = digit[n % 10] + unit[1][j] + p;
|
|
383
|
+
n = Math.floor(n / 10);
|
|
384
|
+
}
|
|
385
|
+
s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
|
|
386
|
+
}
|
|
387
|
+
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
|
|
388
|
+
}
|
|
389
|
+
,
|
|
390
|
+
//新增收费 开启模态框
|
|
391
|
+
add() {
|
|
392
|
+
this.addItem.f_fee = 0
|
|
393
|
+
this.showpay = true
|
|
394
|
+
}
|
|
395
|
+
,
|
|
396
|
+
// 关闭模态框
|
|
397
|
+
close() {
|
|
398
|
+
this.showpay = false
|
|
399
|
+
this.addItem.f_fee = 0
|
|
400
|
+
this.addItem.f_capital = ''
|
|
401
|
+
this.addItem.f_payfee_name = ''
|
|
402
|
+
this.addItem.f_payfee_money = 0
|
|
403
|
+
this.addItem.f_pay_number = 1
|
|
404
|
+
for (let i = 0; i < this.charging_item.length; i++) {
|
|
405
|
+
this.charging_item[i].value = false
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
// 处理数字,例如: 1 转换成 001
|
|
409
|
+
handle() {
|
|
410
|
+
while (this.number.value.length < 3) {
|
|
411
|
+
this.number.value = '0' + this.number.value
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
// 输入金额校验
|
|
415
|
+
check(){
|
|
416
|
+
let re = /^[+-]?\d+(\.\d+)?$/ //判断字符串是否为数字
|
|
417
|
+
if (!re.test(this.addItem.f_payfee_money)){
|
|
418
|
+
this.$showMessage("请输入数字")
|
|
419
|
+
this.addItem.f_payfee_money=''
|
|
420
|
+
return false
|
|
421
|
+
}
|
|
422
|
+
return true
|
|
423
|
+
},
|
|
424
|
+
// 模态框确定按钮保存数据
|
|
425
|
+
async confirm() {
|
|
426
|
+
if(this.check()===false){
|
|
427
|
+
return
|
|
428
|
+
}
|
|
429
|
+
// 构造字符串
|
|
430
|
+
let str = ''
|
|
431
|
+
for (let i = 0; i < this.charging_item.length; i++) {
|
|
432
|
+
if (this.charging_item[i].value === true) {
|
|
433
|
+
str += this.charging_item[i].label
|
|
434
|
+
str += ','
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
// this.addItem.f_payfeedate = Util.toStandardDateString()
|
|
438
|
+
this.addItem.f_charging_item = str.substring(0, str.length - 1) // 去掉最后一个逗号
|
|
439
|
+
this.addItem.f_payfee_way = typeof this.addItem.f_payfee_way === 'object' ? this.addItem.f_payfee_way[0] : ''
|
|
440
|
+
this.addItem.processid = this.infee.f_process_id
|
|
441
|
+
this.addItem.applyid = this.infee.f_apply_num
|
|
442
|
+
this.addItem.f_operator = this.$login.f.name
|
|
443
|
+
this.addItem.f_department = this.$login.f.f_parentname
|
|
444
|
+
this.addItem.f_filiale = this.$login.f.f_fengongsi
|
|
445
|
+
this.addItem.f_fee = Number(this.addItem.f_fee)
|
|
446
|
+
|
|
447
|
+
this.addItem.f_payfee_remarks = this.addItem.f_payfee_money ? '其它费用(' + this.addItem.f_payfee_name + '):' + this.addItem.f_payfee_money + '元' : ''
|
|
448
|
+
// this.model.rows.push(this.addItem)
|
|
449
|
+
let http = new HttpResetClass()
|
|
450
|
+
await http.load('POST', 'rs/logic/saveentity', {data:{tablename:'t_paydetail',parameters:this.addItem}}, {resolveMsg: null, rejectMsg: "添加失败"})
|
|
451
|
+
|
|
452
|
+
// 组织数据打印票据
|
|
453
|
+
let http2 = new HttpResetClass()
|
|
454
|
+
let data2 = {
|
|
455
|
+
tablename: 't_singlevalue',
|
|
456
|
+
condition: `name = '销售单编号'`
|
|
457
|
+
}
|
|
458
|
+
let res2 = await http2.load('POST', 'rs/sql/applysingleTable', {data: data2}, {
|
|
459
|
+
resolveMsg: null,
|
|
460
|
+
rejectMsg: "获取销售单编号失败"
|
|
461
|
+
}, {silent: true})
|
|
462
|
+
this.number = res2.data[0]
|
|
463
|
+
this.handle()
|
|
464
|
+
// let temp = {}
|
|
465
|
+
// let data = {
|
|
466
|
+
// condition: '1=1',
|
|
467
|
+
// this.billinfo= {
|
|
468
|
+
// f_billnumber: 'XS-' + Util.toStandardDateString2() + '-' + this.number.value,
|
|
469
|
+
// f_date: Util.toStandardDateString(),
|
|
470
|
+
// f_remark: ' ',
|
|
471
|
+
// f_username: this.$login.f.name
|
|
472
|
+
// },
|
|
473
|
+
this.$refs.billxsdx.billinfo = {
|
|
474
|
+
f_billnumber: 'XS-' + Util.toStandardDateString2() + '-' + this.number.value,
|
|
475
|
+
f_date: Util.toStandardDateString(),
|
|
476
|
+
f_remark: ' ',
|
|
477
|
+
f_username: this.$login.f.name
|
|
478
|
+
}
|
|
479
|
+
this.f_billnumber = 'XS-' + Util.toStandardDateString2() + '-' + this.number.value
|
|
480
|
+
this.$refs.billxsdx.info = this.temp
|
|
481
|
+
// }
|
|
482
|
+
// }
|
|
483
|
+
this.$refs.billxsdx.load()
|
|
484
|
+
setTimeout(()=>{
|
|
485
|
+
this.$refs.billxsdx.billprint()
|
|
486
|
+
},5000)
|
|
487
|
+
// t_pay
|
|
488
|
+
// http = new HttpResetClass()
|
|
489
|
+
// await http.load('POST', 'rs/logic/insertpaydipetail', this.addItem, {resolveMsg: null, rejectMsg: "添加失败"})
|
|
490
|
+
|
|
491
|
+
// let bill = await new DataModel('rs/report/xiaoshoudan', {data})
|
|
492
|
+
// http = new HttpResetClass()
|
|
493
|
+
// await http.load('POST', 'rs/report/xiaoshoudan', data, {resolveMsg: null, rejectMsg: "票据打印失败"})
|
|
494
|
+
|
|
495
|
+
this.updateNumber()
|
|
496
|
+
this.close()
|
|
497
|
+
this.load()
|
|
498
|
+
},
|
|
499
|
+
// 更新 单据编号
|
|
500
|
+
async updateNumber() {
|
|
501
|
+
let http = new HttpResetClass()
|
|
502
|
+
this.number.value = String(Number(this.number.value) + 1)
|
|
503
|
+
await http.load('POST', 'rs/logic/updatesinglevalue', {data: this.number}, {
|
|
504
|
+
resolveMsg: null,
|
|
505
|
+
rejectMsg: "存储销售单编号失败"
|
|
506
|
+
})
|
|
507
|
+
http = new HttpResetClass()
|
|
508
|
+
let billinfo = Object.assign({}, this.infee, this.temp)
|
|
509
|
+
delete billinfo.id
|
|
510
|
+
// 票据类型
|
|
511
|
+
billinfo.f_bill_type = '销售单'
|
|
512
|
+
billinfo.f_billnumber = this.f_billnumber
|
|
513
|
+
billinfo.f_date = Util.toStandardDateString(),
|
|
514
|
+
billinfo.f_username = this.$login.f.name
|
|
515
|
+
billinfo.f_remark = ' '
|
|
516
|
+
for(let i = 0;i<this.temp.length;i++){
|
|
517
|
+
this.temp[i].f_sale_money=String(this.temp[i].f_sale_money)
|
|
518
|
+
}
|
|
519
|
+
let data = {
|
|
520
|
+
billinfo: billinfo,
|
|
521
|
+
array: this.temp
|
|
522
|
+
}
|
|
523
|
+
await http.load('POST', 'rs/logic/makebillrecord', {data: data}, {resolveMsg: null, rejectMsg: "票据记录存储失败"})
|
|
524
|
+
}
|
|
525
|
+
,
|
|
526
|
+
// 获取数据
|
|
527
|
+
async load() {
|
|
528
|
+
let http = new HttpResetClass()
|
|
529
|
+
let data = {
|
|
530
|
+
columnname: 'f_preparation_fee',
|
|
531
|
+
tablename: 't_preparationfee',
|
|
532
|
+
condition: `processid = '${this.infee.f_process_id}'`
|
|
533
|
+
}
|
|
534
|
+
let res = await
|
|
535
|
+
http.load('POST', 'rs/sql/getSum', {data: data}, {resolveMsg: null, rejectMsg: '获取总金额失败'})
|
|
536
|
+
this.sum = Math.round(res.data[0].f_preparation_fee * 100) / 100;
|
|
537
|
+
data = {
|
|
538
|
+
tablename: 't_paydetail',
|
|
539
|
+
condition: `processid = '${this.infee.f_process_id}'`
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
res = await
|
|
543
|
+
http.load('POST', 'rs/sql/applysingleTable', {data: data}, {resolveMsg: null, rejectMsg: '获取付款数据失败'})
|
|
544
|
+
// 去除付款时间的时分秒
|
|
545
|
+
for (var i = 0; i < res.data.length; i++) {
|
|
546
|
+
res.data[i].f_payfeedate = res.data[i].f_payfeedate.substring(0, 11)
|
|
547
|
+
}
|
|
548
|
+
this.model.rows = res.data
|
|
549
|
+
}
|
|
550
|
+
,
|
|
551
|
+
}
|
|
552
|
+
,
|
|
553
|
+
watch: {
|
|
554
|
+
'addItem.f_pay_number'() {
|
|
555
|
+
let sum = 0
|
|
556
|
+
this.charging_item.forEach((item) => {
|
|
557
|
+
if (item.value == true) {
|
|
558
|
+
if (item.label === '开户费') {
|
|
559
|
+
sum += Number(this.infee.f_account_cost)
|
|
560
|
+
}
|
|
561
|
+
if (item.label === '入户安装费') {
|
|
562
|
+
sum += Number(this.infee.f_construction_cost)
|
|
563
|
+
}
|
|
564
|
+
if (item.label === '材料费') {
|
|
565
|
+
sum += Number(this.infee.f_material_cost)
|
|
566
|
+
}
|
|
567
|
+
if (item.label === '人工费') {
|
|
568
|
+
sum += Number(this.infee.f_labor_cost)
|
|
569
|
+
}
|
|
570
|
+
if (item.label === '改管费') {
|
|
571
|
+
sum += Number(this.infee.f_change_pipeline_cost)
|
|
572
|
+
}
|
|
573
|
+
if (item.label === '设备安装费') {
|
|
574
|
+
sum += Number(this.infee.f_sbaz_cost)
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
})
|
|
578
|
+
if (this.addItem.f_pay_number) {
|
|
579
|
+
this.addItem.f_fee = (Number(sum) * Number(this.addItem.f_pay_number)) + Number(this.addItem.f_payfee_money)
|
|
580
|
+
} else {
|
|
581
|
+
this.addItem.f_fee = Number(sum) + Number(this.addItem.f_payfee_money)
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
}
|
|
585
|
+
,
|
|
586
|
+
'addItem.f_payfee_money'(new_v, old_v) {
|
|
587
|
+
if (old_v && !isNaN(Number(old_v))) {
|
|
588
|
+
this.addItem.f_fee = Number(this.addItem.f_fee) - Number(old_v)
|
|
589
|
+
}
|
|
590
|
+
if (new_v && !isNaN(Number(new_v))) {
|
|
591
|
+
this.addItem.f_fee = Number(this.addItem.f_fee) + Number(new_v)
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
,
|
|
596
|
+
computed: {
|
|
597
|
+
// 计算大写
|
|
598
|
+
getCapital() {
|
|
599
|
+
if (this.addItem.f_fee) {
|
|
600
|
+
this.addItem.f_capital = this.smalltoBIG(Number(this.addItem.f_fee))
|
|
601
|
+
}
|
|
602
|
+
return this.addItem.f_capital
|
|
603
|
+
},
|
|
604
|
+
subcost() {
|
|
605
|
+
let temp = this.sum;
|
|
606
|
+
for (var i = 0; i < this.model.rows.length; i++) {
|
|
607
|
+
temp = Number(temp) - Number(this.model.rows[i].f_fee)
|
|
608
|
+
}
|
|
609
|
+
return temp
|
|
610
|
+
},
|
|
611
|
+
// totalcost () {
|
|
612
|
+
// this.model.f_total_cost = Number(this.model.f_construction_cost) + Number(this.model.f_material_cost)
|
|
613
|
+
// + Number(this.model.f_labor_cost) + Number(this.model.f_change_pipeline_cost)
|
|
614
|
+
// + Number(this.model.f_sbaz_cost) - Number(this.model.f_jmhj_cost)
|
|
615
|
+
// return this.model.f_total_cost
|
|
616
|
+
// },
|
|
617
|
+
feeoptions() {
|
|
618
|
+
return this.$appdata.getParam('费用类型')
|
|
619
|
+
}
|
|
620
|
+
,
|
|
621
|
+
dayin() {
|
|
622
|
+
return this.$appdata.getParam('打印格式')
|
|
623
|
+
}
|
|
624
|
+
,
|
|
625
|
+
jiaofei() {
|
|
626
|
+
return this.$appdata.getParam('缴费类型')
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
</script>
|