apply-clients 3.5.6-1 → 3.5.6-3
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 +5 -5
- package/package.json +1 -1
- package/src/components/android/Process/AppServiceControl.vue +1760 -1760
- package/src/components/product/Function/Service/FunctionServiceControl.vue +497 -497
- package/src/components/product/Install/ContractCharge.vue +210 -210
- package/src/filiale/fugou/android/AppAddMaterialScience.vue +444 -444
- package/src/filiale/fugou/android/AppAddReplacement.vue +512 -512
- package/src/filiale/fugou/android/AppZhihuanManagement.vue +242 -242
- package/src/filiale/fugou/pc/AddReplacement.vue +511 -511
- package/src/filiale/fugou/pc/ApplyChargeList.vue +554 -554
- package/src/filiale/fugou/pc/Applybatchdispatch.vue +754 -754
- package/src/filiale/fugou/pc/InstallationDetails.vue +646 -646
- package/src/filiale/fugou/pc/ServiceControl.vue +1732 -1732
- package/src/filiale/fugou/pc/addMaterialScience.vue +481 -481
- package/src/filiale/fugou/pc.js +19 -19
- package/src/filiale/gongyi/pc/addressAndUserinfoManagement.vue +187 -187
- package/src/filiale/gongyi/pc.js +25 -25
- package/src/filiale/hongda/pc/addMaterialScience.vue +723 -723
- package/src/filiale/jinhuang/android/AppAddMaterialScience.vue +635 -635
- package/src/filiale/jinhuang/android/AppServiceControl.vue +1842 -1842
- package/src/filiale/jinhuang/android.js +7 -7
- package/src/filiale/jinhuang/pc/ExplorationSelect.vue +511 -511
- package/src/filiale/jinhuang/pc/ServiceControl.vue +2016 -2016
- package/src/filiale/jinhuang/pc/SupervisoryList.vue +459 -459
- package/src/filiale/jinhuang/pc/addMaterialScience.vue +638 -638
- package/src/filiale/jinhuang/pc.js +12 -12
- package/src/filiale/qianneng/pc/Applybatchdispatch.vue +786 -786
- package/src/filiale/qianneng/pc/ServiceControl.vue +1387 -1387
- package/src/filiale/ruihua/pc/ServiceControl.vue +1973 -1973
- package/src/filiale/shexian/android/AppServiceControl.vue +1785 -1763
- package/src/filiale/shexian/android/AppSign.vue +152 -152
- package/src/filiale/yangchunboneng/android/AppChargeManagement.vue +527 -527
- package/src/filiale/yangchunboneng/android/AppContractCharge.vue +222 -222
- package/src/filiale/yangchunboneng/android/AppInstallationMaterial.vue +1144 -1144
- package/src/filiale/yangchunboneng/android/AppServiceControl.vue +1879 -1879
- package/src/filiale/yangchunboneng/android.js +21 -21
- package/src/filiale/yangchunboneng/pc/ApplyUpload.vue +392 -392
- package/src/filiale/yangchunboneng/pc/ExplorationSelect.vue +612 -612
- package/src/filiale/yangchunboneng/pc/SupervisoryControl.vue +141 -141
- package/src/filiale/yangchunboneng/pc/buildOrderList.vue +421 -421
- package/src/filiale/yangchunboneng/pc/printBuildOrder.vue +175 -175
- package/src/filiale/yangchunboneng/pc.js +29 -29
- package/src/main.js +3 -3
|
@@ -1,723 +1,723 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<data-grid :model="onetomany" class="list_area table_sy">
|
|
4
|
-
<template partial='head'>
|
|
5
|
-
<tr>
|
|
6
|
-
<th class="textNoLineBreak">序号</th>
|
|
7
|
-
<th class="textNoLineBreak">材料名称</th>
|
|
8
|
-
<th class="textNoLineBreak">材料型号</th>
|
|
9
|
-
<th class="textNoLineBreak">材料单位</th>
|
|
10
|
-
<th class="textNoLineBreak">材料价格</th>
|
|
11
|
-
<th class="textNoLineBreak">材料数量</th>
|
|
12
|
-
<th class="textNoLineBreak">应免数量</th>
|
|
13
|
-
<th class="textNoLineBreak">应收金额</th>
|
|
14
|
-
<th class="textNoLineBreak">材料状态</th>
|
|
15
|
-
|
|
16
|
-
<th class="textNoLineBreak">
|
|
17
|
-
<button v-if="$parent.$parent.mark === 0" class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal()">添加</button>
|
|
18
|
-
<button v-if="$parent.$parent.mark === 0 && $parent.$parent.selectdata.defname === '营业厅缴费' " class="button_new button_spacing" type="button" @click="$parent.$parent.chargeMaterial()">收费</button>
|
|
19
|
-
<button v-if="$parent.$parent.mark === 0 && ($parent.$parent.selectdata.defname === '安装审核' ||$parent.$parent.selectdata.defname === '改装审核' ) " class="button_new button_spacing" type="button" @click="$parent.$parent.updatequantity()">全部取消</button>
|
|
20
|
-
</th>
|
|
21
|
-
</tr>
|
|
22
|
-
</template>
|
|
23
|
-
<template partial='body'>
|
|
24
|
-
<tr>
|
|
25
|
-
<td style="text-align: center;">
|
|
26
|
-
<nobr>{{$index+1}}</nobr>
|
|
27
|
-
</td>
|
|
28
|
-
<td style="text-align: center;">
|
|
29
|
-
<nobr>{{row.f_material_name}}</nobr>
|
|
30
|
-
</td>
|
|
31
|
-
<td style="text-align: center;">
|
|
32
|
-
<nobr>{{row.f_material_style}}</nobr>
|
|
33
|
-
</td>
|
|
34
|
-
<td style="text-align: center;">
|
|
35
|
-
<nobr>{{row.f_material_unit}}</nobr>
|
|
36
|
-
</td>
|
|
37
|
-
<td style="text-align: center;">
|
|
38
|
-
<nobr>{{row.f_material_price}}</nobr>
|
|
39
|
-
</td>
|
|
40
|
-
<td style="text-align: center;">
|
|
41
|
-
<nobr>{{row.f_material_number}}</nobr>
|
|
42
|
-
</td>
|
|
43
|
-
<td style="text-align: center;">
|
|
44
|
-
<nobr>{{row.f_quantity_payable}}</nobr>
|
|
45
|
-
</td>
|
|
46
|
-
<td style="text-align: center;">
|
|
47
|
-
<nobr>{{row.money}}</nobr>
|
|
48
|
-
</td>
|
|
49
|
-
<td style="text-align: center;">
|
|
50
|
-
<nobr>{{row.f_material_type}}</nobr>
|
|
51
|
-
</td>
|
|
52
|
-
<td style="text-align: center;">
|
|
53
|
-
<button v-if = 'row.f_quantity_payable != 0 &&($parent.$parent.selectdata.defname === "安装审核" ||$parent.$parent.selectdata.defname === "改装审核" ) ' type="button" class="button_search button_spacing" @click="$parent.$parent.updateConfirm(0,row)">取消减免</button>
|
|
54
|
-
<button v-if = 'row.f_quantity_payable == 0 && ($parent.$parent.selectdata.defname === "安装审核" ||$parent.$parent.selectdata.defname === "改装审核" )' type="button" class="button_search button_spacing" @click="$parent.$parent.updateConfirm(row.f_material_number,row)">减免</button>
|
|
55
|
-
<button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除</button>
|
|
56
|
-
<button type="button" v-if="$parent.$parent.selectdata.defname === '财务审核' " class="button_delete button_spacing" @click="$parent.$parent.margeInfo(row)">修改</button>
|
|
57
|
-
</td>
|
|
58
|
-
</tr>
|
|
59
|
-
</template>
|
|
60
|
-
</data-grid>
|
|
61
|
-
<span>合计:{{pricesum}}</span>
|
|
62
|
-
<!-- <modal v-if="showFile" :show.sync="showFile" v-ref:modal :backdrop="false" title="选择文件">
|
|
63
|
-
<header slot="modal-header" class="modal-header">
|
|
64
|
-
<button type="button" class="close" @click="closeFile"><span>×</span></button>
|
|
65
|
-
<h4 class="modal-title">选择文件</h4>
|
|
66
|
-
</header>
|
|
67
|
-
<article slot="modal-body" class="modal-body">
|
|
68
|
-
<div class="form-group">
|
|
69
|
-
<file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" v-ref:file></file-upload>
|
|
70
|
-
</div>
|
|
71
|
-
</article>
|
|
72
|
-
<footer slot="modal-footer" class="modal-footer"></footer>
|
|
73
|
-
</modal>-->
|
|
74
|
-
<modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal :large="true"
|
|
75
|
-
:backdrop="false" :title="title">
|
|
76
|
-
<header slot="modal-header" class="modal-header">
|
|
77
|
-
<button type="button" class="close" @click="closeMaterials"><span>×</span></button>
|
|
78
|
-
<h4 class="modal-title">{{title}}</h4>
|
|
79
|
-
</header>
|
|
80
|
-
<article slot="modal-body" class="modal-body clearfix">
|
|
81
|
-
<div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
|
|
82
|
-
<div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
|
|
83
|
-
<div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
|
|
84
|
-
<div class="col-sm-6 text-right"><button
|
|
85
|
-
class="button_delete button_spacing"
|
|
86
|
-
@click.prevent="deleteDevicesinfo(i)"
|
|
87
|
-
v-if="title === '新增'"
|
|
88
|
-
>删除</button></div>
|
|
89
|
-
</div>
|
|
90
|
-
<div class="form-group col-sm-6">
|
|
91
|
-
<label class="col-sm-4 control-label">选择材料:</label>
|
|
92
|
-
<div class="col-sm-8">
|
|
93
|
-
<input-select
|
|
94
|
-
class="select select_list"
|
|
95
|
-
:value.sync="item.material"
|
|
96
|
-
v-model="item.material"
|
|
97
|
-
:options="meterialOptions"
|
|
98
|
-
:disable="mark === 1"
|
|
99
|
-
@change="modifyOtherValue(i)"
|
|
100
|
-
:valueSingle="true"></input-select>
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
<div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
|
|
104
|
-
<label class="col-sm-4 control-label">材料名称:</label>
|
|
105
|
-
<div class="col-sm-8">
|
|
106
|
-
<input class="form-control input_view" style="" type="text"
|
|
107
|
-
placeholder="材料名称"
|
|
108
|
-
v-model="item.f_material_name"
|
|
109
|
-
:value="item.f_material_name"
|
|
110
|
-
/>
|
|
111
|
-
</div>
|
|
112
|
-
</div>
|
|
113
|
-
<div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
|
|
114
|
-
<label class="col-sm-4 control-label">材料型号:</label>
|
|
115
|
-
<div class="col-sm-8">
|
|
116
|
-
<input class="form-control input_view" style="" type="text"
|
|
117
|
-
placeholder="材料型号"
|
|
118
|
-
v-model="item.f_material_style"
|
|
119
|
-
:value="item.f_material_style"
|
|
120
|
-
/>
|
|
121
|
-
</div>
|
|
122
|
-
</div>
|
|
123
|
-
<div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
|
|
124
|
-
<label class="col-sm-4 control-label">材料单位:</label>
|
|
125
|
-
<div class="col-sm-8">
|
|
126
|
-
<input class="form-control input_view" style="" type="text"
|
|
127
|
-
placeholder="材料单位"
|
|
128
|
-
v-model="item.f_material_unit"
|
|
129
|
-
:value="item.f_material_unit"
|
|
130
|
-
/>
|
|
131
|
-
</div>
|
|
132
|
-
</div>
|
|
133
|
-
<div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
|
|
134
|
-
<label class="col-sm-4 control-label">材料数量:</label>
|
|
135
|
-
<div class="col-sm-8">
|
|
136
|
-
<input class="form-control input_view" style="" type="number"
|
|
137
|
-
placeholder="材料数量"
|
|
138
|
-
v-model="item.f_material_number"
|
|
139
|
-
:value="item.f_material_number"
|
|
140
|
-
/>
|
|
141
|
-
</div>
|
|
142
|
-
</div>
|
|
143
|
-
<div class="form-group col-sm-6" :class="[item.f_quantity_payable ? '' : 'has-error']">
|
|
144
|
-
<label class="col-sm-4 control-label">应免数量:</label>
|
|
145
|
-
<div class="col-sm-8">
|
|
146
|
-
<input class="form-control input_view" style="" type="number"
|
|
147
|
-
placeholder="应免数量"
|
|
148
|
-
v-model="item.f_quantity_payable"
|
|
149
|
-
:value="item.f_material_number"
|
|
150
|
-
/>
|
|
151
|
-
</div>
|
|
152
|
-
</div>
|
|
153
|
-
<div class="form-group col-sm-6">
|
|
154
|
-
<label class="col-sm-4 control-label">材料价格:</label>
|
|
155
|
-
<div class="col-sm-8">
|
|
156
|
-
<input class="form-control input_view" style="" type="text"
|
|
157
|
-
placeholder="材料价格"
|
|
158
|
-
v-model="item.f_material_price"
|
|
159
|
-
:value="item.f_material_price"
|
|
160
|
-
/>
|
|
161
|
-
</div>
|
|
162
|
-
</div>
|
|
163
|
-
</div>
|
|
164
|
-
|
|
165
|
-
</article>
|
|
166
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
167
|
-
<template v-if="mark !== 1">
|
|
168
|
-
<button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
|
|
169
|
-
<button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()" :disabled="!$v.valid">确认添加</button>
|
|
170
|
-
</template>
|
|
171
|
-
</footer>
|
|
172
|
-
</modal>
|
|
173
|
-
<modal v-if="showCharge" :show.sync="showCharge" v-ref:modal :backdrop="false" title="材料收费">
|
|
174
|
-
<header slot="modal-header" class="modal-header">
|
|
175
|
-
<button type="button" class="close" @click="closeModal"><span>×</span></button>
|
|
176
|
-
<h4 class="modal-title">材料收费</h4>
|
|
177
|
-
</header>
|
|
178
|
-
<article slot="modal-body" class="modal-body clearfix">
|
|
179
|
-
<div class="form-group col-sm-12">
|
|
180
|
-
<label class="col-sm-2 control-label">收费项目:</label>
|
|
181
|
-
<div class="col-sm-10">
|
|
182
|
-
<input type="text"
|
|
183
|
-
class="form-control input_view"
|
|
184
|
-
style="width: 100%"
|
|
185
|
-
readonly
|
|
186
|
-
v-model="charge.f_payment_term" />
|
|
187
|
-
</div>
|
|
188
|
-
</div>
|
|
189
|
-
<div class="form-group col-sm-12">
|
|
190
|
-
<label class="col-sm-2 control-label">应收金额:</label>
|
|
191
|
-
<div class="col-sm-10">
|
|
192
|
-
<input type="text"
|
|
193
|
-
class="form-control input_view"
|
|
194
|
-
style="width: 100%"
|
|
195
|
-
readonly
|
|
196
|
-
v-model="charge.f_amount_receivable" />
|
|
197
|
-
</div>
|
|
198
|
-
</div>
|
|
199
|
-
<div class="form-group col-sm-12">
|
|
200
|
-
<label class="col-sm-2 control-label">减免金额:</label>
|
|
201
|
-
<div class="col-sm-10">
|
|
202
|
-
<input type="text"
|
|
203
|
-
class="form-control input_view"
|
|
204
|
-
style="width: 100%"
|
|
205
|
-
readonly
|
|
206
|
-
v-model="charge.f_deduction_amount" />
|
|
207
|
-
</div>
|
|
208
|
-
</div>
|
|
209
|
-
<div class="form-group col-sm-12">
|
|
210
|
-
<label class="col-sm-2 control-label">实收金额:</label>
|
|
211
|
-
<div class="col-sm-10">
|
|
212
|
-
<input type="text"
|
|
213
|
-
class="form-control input_view"
|
|
214
|
-
style="width: 100%"
|
|
215
|
-
readonly
|
|
216
|
-
v-model="charge.f_charge_money" />
|
|
217
|
-
</div>
|
|
218
|
-
</div>
|
|
219
|
-
<div class="form-group col-sm-12">
|
|
220
|
-
<label class="col-sm-2 control-label">付款方式:</label>
|
|
221
|
-
<div class="col-sm-10">
|
|
222
|
-
<input-select
|
|
223
|
-
placeholder='请选择' width="100%"
|
|
224
|
-
v-model="charge.f_payment_method"
|
|
225
|
-
:value.sync="charge.f_payment_method"
|
|
226
|
-
:options='paymentMethod'
|
|
227
|
-
class="select select_list"
|
|
228
|
-
:value-single="true"
|
|
229
|
-
close-on-select ></input-select>
|
|
230
|
-
</div>
|
|
231
|
-
</div>
|
|
232
|
-
<div class="form-group col-sm-12">
|
|
233
|
-
<label class="col-sm-2 control-label">金额大写:</label>
|
|
234
|
-
<div class="col-sm-10">
|
|
235
|
-
<input type="text"
|
|
236
|
-
class="form-control input_view"
|
|
237
|
-
style="width: 100%"
|
|
238
|
-
:value="smalltoBIG(charge.f_charge_money)"
|
|
239
|
-
readonly
|
|
240
|
-
v-model="charge.f_amount_words" />
|
|
241
|
-
</div>
|
|
242
|
-
</div>
|
|
243
|
-
<div class="form-group col-sm-12">
|
|
244
|
-
<label class="col-sm-2 control-label">收费人员:</label>
|
|
245
|
-
<div class="col-sm-10">
|
|
246
|
-
<input type="text"
|
|
247
|
-
class="form-control input_view"
|
|
248
|
-
style="width: 100%"
|
|
249
|
-
readonly
|
|
250
|
-
v-model="charge.f_charge_collectors" />
|
|
251
|
-
</div>
|
|
252
|
-
</div>
|
|
253
|
-
</article>
|
|
254
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
255
|
-
<button type="button" class="btn btn-primary" @click="invalidApplyCharge()">确认收费</button>
|
|
256
|
-
</footer>
|
|
257
|
-
</modal>
|
|
258
|
-
<!-- -->
|
|
259
|
-
<modal v-if="showMargeInfo" :show.sync="showMargeInfo" v-ref:modal :backdrop="false" title="修改">
|
|
260
|
-
<header slot="modal-header" class="modal-header">
|
|
261
|
-
<button type="button" class="close" @click="closeMargeModal"><span>×</span></button>
|
|
262
|
-
<h4 class="modal-title">修改</h4>
|
|
263
|
-
</header>
|
|
264
|
-
<article slot="modal-body" class="modal-body clearfix">
|
|
265
|
-
<div class="form-group col-sm-6">
|
|
266
|
-
<label class="col-sm-4 control-label">选择材料:</label>
|
|
267
|
-
<div class="col-sm-8">
|
|
268
|
-
<input-select
|
|
269
|
-
class="select select_list"
|
|
270
|
-
:value.sync="materia"
|
|
271
|
-
v-model=" materia"
|
|
272
|
-
:options="meterialOptions"
|
|
273
|
-
@change="modifyOther()"
|
|
274
|
-
:valueSingle="true"></input-select>
|
|
275
|
-
</div>
|
|
276
|
-
</div>
|
|
277
|
-
<div class="form-group col-sm-6">
|
|
278
|
-
<label class="col-sm-4 control-label">材料名称:</label>
|
|
279
|
-
<div class="col-sm-8">
|
|
280
|
-
<input type="text"
|
|
281
|
-
class="form-control input_view"
|
|
282
|
-
style="width: 100%"
|
|
283
|
-
v-model="material.f_material_name" />
|
|
284
|
-
</div>
|
|
285
|
-
</div>
|
|
286
|
-
<div class="form-group col-sm-6">
|
|
287
|
-
<label class="col-sm-4 control-label">材料价格:</label>
|
|
288
|
-
<div class="col-sm-8">
|
|
289
|
-
<input type="text"
|
|
290
|
-
class="form-control input_view"
|
|
291
|
-
style="width: 100%"
|
|
292
|
-
v-model="material.f_material_price" />
|
|
293
|
-
</div>
|
|
294
|
-
</div>
|
|
295
|
-
<div class="form-group col-sm-6">
|
|
296
|
-
<label class="col-sm-4 control-label">材料数量:</label>
|
|
297
|
-
<div class="col-sm-8">
|
|
298
|
-
<input type="text"
|
|
299
|
-
class="form-control input_view"
|
|
300
|
-
style="width: 100%"
|
|
301
|
-
v-model="material.materialNumber" />
|
|
302
|
-
</div>
|
|
303
|
-
</div>
|
|
304
|
-
<div class="form-group col-sm-6">
|
|
305
|
-
<label class="col-sm-4 control-label">应免数量:</label>
|
|
306
|
-
<div class="col-sm-8">
|
|
307
|
-
<input type="text"
|
|
308
|
-
class="form-control input_view"
|
|
309
|
-
style="width: 100%"
|
|
310
|
-
v-model="material.exemptedNumber" />
|
|
311
|
-
</div>
|
|
312
|
-
</div>
|
|
313
|
-
</article>
|
|
314
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
315
|
-
<button type="button" class="btn btn-primary" @click="ModifyInfo()">确认</button>
|
|
316
|
-
</footer>
|
|
317
|
-
</modal>
|
|
318
|
-
</div>
|
|
319
|
-
</template>
|
|
320
|
-
|
|
321
|
-
<script>
|
|
322
|
-
import {HttpResetClass} from 'vue-client'
|
|
323
|
-
import Vue from "vue";
|
|
324
|
-
import {toStandardTimeString} from '../../../components/Util'
|
|
325
|
-
export default {
|
|
326
|
-
name: '材料添加',
|
|
327
|
-
props: {
|
|
328
|
-
selectdata: {
|
|
329
|
-
type: Object
|
|
330
|
-
},
|
|
331
|
-
mark: {
|
|
332
|
-
type: Number,
|
|
333
|
-
default: 0
|
|
334
|
-
}
|
|
335
|
-
},
|
|
336
|
-
data () {
|
|
337
|
-
return {
|
|
338
|
-
showFile: false,
|
|
339
|
-
showMargeInfo: false,
|
|
340
|
-
onetomany: {
|
|
341
|
-
rows: []
|
|
342
|
-
},
|
|
343
|
-
title:'新增',
|
|
344
|
-
showMaterialModal:false,
|
|
345
|
-
materials:[
|
|
346
|
-
{
|
|
347
|
-
material:'',
|
|
348
|
-
f_material_name:'',
|
|
349
|
-
f_material_style:'',
|
|
350
|
-
f_material_unit:'',
|
|
351
|
-
f_material_number:'',
|
|
352
|
-
f_material_price:'',
|
|
353
|
-
f_quantity_payable:0
|
|
354
|
-
}
|
|
355
|
-
],
|
|
356
|
-
meterialOptions:[],
|
|
357
|
-
row:{},
|
|
358
|
-
pricesum:'',
|
|
359
|
-
showCharge:false,
|
|
360
|
-
charge:{
|
|
361
|
-
f_payment_term:'',
|
|
362
|
-
f_charge_money:'',
|
|
363
|
-
f_payment_method:'',
|
|
364
|
-
f_amount_words:'',
|
|
365
|
-
f_charge_collectors:'',
|
|
366
|
-
f_amount_receivable:'',
|
|
367
|
-
f_deduction_amount:''
|
|
368
|
-
},
|
|
369
|
-
payment_type:'',
|
|
370
|
-
materia:'',
|
|
371
|
-
material:{
|
|
372
|
-
materialNumber:'',
|
|
373
|
-
exemptedNumber:'',
|
|
374
|
-
f_material_name:'',
|
|
375
|
-
f_material_price:'',
|
|
376
|
-
id:''
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
},
|
|
380
|
-
ready(){
|
|
381
|
-
this.$nextTick(() => {
|
|
382
|
-
this.getOnetoManyData()
|
|
383
|
-
})
|
|
384
|
-
},
|
|
385
|
-
methods: {
|
|
386
|
-
async getOnetoManyData () {
|
|
387
|
-
let data = {
|
|
388
|
-
tablename: `t_material_apply`,
|
|
389
|
-
condition: `f_process_id='${this.selectdata.f_process_id}'`
|
|
390
|
-
}
|
|
391
|
-
let http = new HttpResetClass()
|
|
392
|
-
let res = await http.load('post',
|
|
393
|
-
'rs/sql/apply_singleTable',
|
|
394
|
-
{data: data},
|
|
395
|
-
{resolveMsg: null, rejectMsg: 'onetomany查询失败'}
|
|
396
|
-
)
|
|
397
|
-
// foreach遍历res.data数组
|
|
398
|
-
res.data.forEach((item) => {
|
|
399
|
-
let num= (item.f_material_number*1)-(item.f_quantity_payable*1)
|
|
400
|
-
let price=num*(item.f_material_price*1)
|
|
401
|
-
//将price放回res.data数组
|
|
402
|
-
item.money=price.toFixed(2)
|
|
403
|
-
})
|
|
404
|
-
this.onetomany.rows = res.data
|
|
405
|
-
console.log('材料信息', this.onetomany.rows)
|
|
406
|
-
},
|
|
407
|
-
async openMaterialModal () {
|
|
408
|
-
this.getMateralNames()
|
|
409
|
-
this.title = '新增'
|
|
410
|
-
this.materials = [
|
|
411
|
-
{
|
|
412
|
-
material:'',
|
|
413
|
-
f_material_name:'',
|
|
414
|
-
f_material_style:'',
|
|
415
|
-
f_material_unit:'',
|
|
416
|
-
f_material_number:'',
|
|
417
|
-
f_material_price:'',
|
|
418
|
-
f_quantity_payable:0
|
|
419
|
-
}
|
|
420
|
-
],
|
|
421
|
-
this.showMaterialModal = true
|
|
422
|
-
},
|
|
423
|
-
closeFile() {
|
|
424
|
-
this.showWork = false
|
|
425
|
-
this.showFile = false
|
|
426
|
-
// 将选的文件清空
|
|
427
|
-
this.$refs.file.$el.querySelector('input').value = ''
|
|
428
|
-
this.search()
|
|
429
|
-
},
|
|
430
|
-
deleteDevicesinfo (index) {
|
|
431
|
-
this.materials.splice(index, 1)
|
|
432
|
-
},
|
|
433
|
-
pushMaterial () {
|
|
434
|
-
this.materials.push({
|
|
435
|
-
material:'',
|
|
436
|
-
f_material_name:'',
|
|
437
|
-
f_material_style:'',
|
|
438
|
-
f_material_unit:'',
|
|
439
|
-
f_material_number:'',
|
|
440
|
-
f_material_price:'',
|
|
441
|
-
f_quantity_payable:0
|
|
442
|
-
})
|
|
443
|
-
},
|
|
444
|
-
// 获取模态框材料
|
|
445
|
-
async getMateralNames () {
|
|
446
|
-
let data = {
|
|
447
|
-
condition: `1=1`
|
|
448
|
-
}
|
|
449
|
-
let http = new HttpResetClass()
|
|
450
|
-
let res = await http.load(
|
|
451
|
-
'POST',
|
|
452
|
-
`rs/sql/getStockMaterial`,
|
|
453
|
-
{data: data},
|
|
454
|
-
{resolveMsg: null, rejectMsg: '材料查询失败!!!'}
|
|
455
|
-
)
|
|
456
|
-
|
|
457
|
-
this.meterialOptions = res.data.map(item => {
|
|
458
|
-
return {
|
|
459
|
-
'label': `${item.f_material_name}--${item.f_material_style}--${item.f_material_unit}--${item.f_material_code}`,
|
|
460
|
-
'value': item
|
|
461
|
-
}
|
|
462
|
-
})
|
|
463
|
-
},
|
|
464
|
-
modifyOther (){
|
|
465
|
-
console.log(this.materia)
|
|
466
|
-
this.material.f_material_name =this.materia.f_material_name
|
|
467
|
-
this.material.f_material_price =this.materia.f_material_price
|
|
468
|
-
},
|
|
469
|
-
modifyOtherValue (index){
|
|
470
|
-
console.log("进来了",index)
|
|
471
|
-
console.log("dddd",this.materials[index].material)
|
|
472
|
-
let material = this.materials[index].material
|
|
473
|
-
this.materials[index].f_material_name = material.f_material_name
|
|
474
|
-
this.materials[index].f_material_style = material.f_material_style
|
|
475
|
-
this.materials[index].f_material_unit = material.f_material_unit
|
|
476
|
-
this.materials[index].f_material_price = material.f_material_price
|
|
477
|
-
},
|
|
478
|
-
// 新增材料
|
|
479
|
-
async addMaterial () {
|
|
480
|
-
console.log("登录信息:",this.$login.f)
|
|
481
|
-
this.title = '新增'
|
|
482
|
-
let data = {
|
|
483
|
-
f_process_id : this.selectdata.f_process_id,
|
|
484
|
-
f_operator_id: this.$login.f.id,
|
|
485
|
-
f_operator: this.$login.f.name,
|
|
486
|
-
f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
|
|
487
|
-
f_orgid: this.$login.f.orgid,
|
|
488
|
-
f_orgname: this.$login.f.orgs,
|
|
489
|
-
materials:this.materials
|
|
490
|
-
}
|
|
491
|
-
let res = await this.$resetpost(
|
|
492
|
-
`rs/logic/saveMaterials`,
|
|
493
|
-
data
|
|
494
|
-
)
|
|
495
|
-
this.closeMaterials()
|
|
496
|
-
},
|
|
497
|
-
margeInfo(row){
|
|
498
|
-
this.getMateralNames()
|
|
499
|
-
this.showMargeInfo=true
|
|
500
|
-
this.material.materialNumber=row.f_material_number
|
|
501
|
-
this.material.exemptedNumber=row.f_quantity_payable
|
|
502
|
-
this.material.f_material_name=row.f_material_name
|
|
503
|
-
this.material.f_material_price=row.f_material_price
|
|
504
|
-
this.material.id=row.id
|
|
505
|
-
},
|
|
506
|
-
async ModifyInfo() {
|
|
507
|
-
//修改材料数量,减免数量
|
|
508
|
-
let data = {
|
|
509
|
-
f_process_id : this.selectdata.f_process_id,
|
|
510
|
-
material: this.material
|
|
511
|
-
}
|
|
512
|
-
let http = new HttpResetClass()
|
|
513
|
-
let res = await http.load(
|
|
514
|
-
'POST',
|
|
515
|
-
`rs/logic/ModifyMaterial`,
|
|
516
|
-
{data: data},
|
|
517
|
-
{resolveMsg: null, rejectMsg: '材料删除失败!!!'}
|
|
518
|
-
)
|
|
519
|
-
this.showMargeInfo=false
|
|
520
|
-
this.getOnetoManyData()
|
|
521
|
-
},
|
|
522
|
-
async deleteMaterial (row) {
|
|
523
|
-
var show1 = window.confirm('您确定要删除这条记录吗?')
|
|
524
|
-
if(show1 != true){
|
|
525
|
-
this.closeMaterials()
|
|
526
|
-
}else{
|
|
527
|
-
let http = new HttpResetClass()
|
|
528
|
-
let res = await http.load(
|
|
529
|
-
'POST',
|
|
530
|
-
`rs/logic/deleteMaterial`,
|
|
531
|
-
{data: row},
|
|
532
|
-
{resolveMsg: null, rejectMsg: '材料删除失败!!!'}
|
|
533
|
-
)
|
|
534
|
-
this.closeMaterials()
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
},
|
|
538
|
-
async updateMaterial (index,row) {
|
|
539
|
-
this.title = '修改'
|
|
540
|
-
this.row = row
|
|
541
|
-
this.getMateralNames()
|
|
542
|
-
this.materials = [
|
|
543
|
-
{
|
|
544
|
-
material:'',
|
|
545
|
-
f_material_name:row.f_material_name,
|
|
546
|
-
f_material_style:row.f_material_style,
|
|
547
|
-
f_material_unit:row.f_material_unit,
|
|
548
|
-
f_material_number:row.f_material_number,
|
|
549
|
-
f_material_price:row.f_material_price,
|
|
550
|
-
f_quantity_payable:row.f_quantity_payable
|
|
551
|
-
}
|
|
552
|
-
]
|
|
553
|
-
this.showMaterialModal = true
|
|
554
|
-
},
|
|
555
|
-
async updateConfirm (num,row) {
|
|
556
|
-
let data = row
|
|
557
|
-
data.f_quantity_payable = num
|
|
558
|
-
let res = await this.$resetpost(
|
|
559
|
-
`apply/rs/entity/t_material_apply`,
|
|
560
|
-
data
|
|
561
|
-
)
|
|
562
|
-
this.closeMaterials()
|
|
563
|
-
},
|
|
564
|
-
closeMaterials () {
|
|
565
|
-
this.getOnetoManyData()
|
|
566
|
-
this.showMaterialModal = false
|
|
567
|
-
},
|
|
568
|
-
// 金额转大写
|
|
569
|
-
smalltoBIG(n) {
|
|
570
|
-
let fraction = ['角', '分'];
|
|
571
|
-
let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
572
|
-
let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
|
|
573
|
-
let head = n < 0 ? '欠' : '';
|
|
574
|
-
n = Math.abs(n);
|
|
575
|
-
|
|
576
|
-
let s = '';
|
|
577
|
-
|
|
578
|
-
for (var i = 0; i < fraction.length; i++) {
|
|
579
|
-
s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
|
|
580
|
-
}
|
|
581
|
-
s = s || '整';
|
|
582
|
-
n = Math.floor(n);
|
|
583
|
-
|
|
584
|
-
for (var i = 0; i < unit[0].length && n > 0; i++) {
|
|
585
|
-
let p = '';
|
|
586
|
-
for (var j = 0; j < unit[1].length && n > 0; j++) {
|
|
587
|
-
p = digit[n % 10] + unit[1][j] + p;
|
|
588
|
-
n = Math.floor(n / 10);
|
|
589
|
-
}
|
|
590
|
-
s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
|
|
591
|
-
}
|
|
592
|
-
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
|
|
593
|
-
},
|
|
594
|
-
// 材料收费
|
|
595
|
-
chargeMaterial () {
|
|
596
|
-
this.showCharge = true
|
|
597
|
-
// 应收金额
|
|
598
|
-
this.charge.f_amount_receivable = this.pricesum
|
|
599
|
-
this.charge.f_payment_method='现金缴费'
|
|
600
|
-
// 减免金额
|
|
601
|
-
this.charge.f_deduction_amount = this.selectdata.f_material_amount?this.selectdata.f_material_amount:0
|
|
602
|
-
// 实收金额
|
|
603
|
-
this.charge.f_charge_money = (this.pricesum - this.charge.f_deduction_amount).toFixed(2)
|
|
604
|
-
this.charge.f_charge_collectors = this.$login.f.name
|
|
605
|
-
if(this.selectdata.f_apply_type=='改装报建'){
|
|
606
|
-
this.charge.f_payment_term='改装材料费'
|
|
607
|
-
}else if(this.selectdata.f_apply_type=='散户报建'){
|
|
608
|
-
this.charge.f_payment_term='新装材料费'
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
},
|
|
612
|
-
closeMargeModal(){
|
|
613
|
-
this.material.materialNumber=''
|
|
614
|
-
this.material.exemptedNumber=''
|
|
615
|
-
this.material.f_material_name=''
|
|
616
|
-
this.material.f_material_price=''
|
|
617
|
-
this.material.id=''
|
|
618
|
-
this.materia=''
|
|
619
|
-
this.showMargeInfo=false
|
|
620
|
-
},
|
|
621
|
-
closeModal(){
|
|
622
|
-
this.showCharge = false
|
|
623
|
-
if(this.selectdata.f_apply_type=='改装报建'){
|
|
624
|
-
this.payment_type='改装材料费'
|
|
625
|
-
}else if(this.selectdata.f_apply_type=='散户报建'){
|
|
626
|
-
this.payment_type='新装材料费'
|
|
627
|
-
}
|
|
628
|
-
this.charge = {
|
|
629
|
-
f_payment_term:this.payment_type,
|
|
630
|
-
f_charge_money:'',
|
|
631
|
-
f_payment_method:'',
|
|
632
|
-
f_amount_words:'',
|
|
633
|
-
f_charge_collectors:'',
|
|
634
|
-
f_amount_receivable:'',
|
|
635
|
-
f_deduction_amount:''
|
|
636
|
-
}
|
|
637
|
-
},
|
|
638
|
-
invalidApplyCharge (){
|
|
639
|
-
this.$showMessage('确定是否收费?', ['confirm', 'cancel']).then(res=>{
|
|
640
|
-
if (res==='confirm'){
|
|
641
|
-
let http = new HttpResetClass()
|
|
642
|
-
this.charge.f_charge_status = '有效', // 缴费状态
|
|
643
|
-
this.charge.f_charge_date = toStandardTimeString(), // 缴费时间
|
|
644
|
-
this.charge.f_charge_collectors = this.$login.f.name, // 收费人员
|
|
645
|
-
this.charge.f_charge_collectors_id = this.$login.f.id, // 收费人员
|
|
646
|
-
this.charge.f_process_id = this.selectdata.f_process_id, // 报建流程id
|
|
647
|
-
this.charge.f_filiale = this.$login.f.orgs, // 分公司
|
|
648
|
-
this.charge.f_filialeid = this.$login.f.orgid, // 分公司id
|
|
649
|
-
this.charge.f_orgid = this.$login.f.orgid, // 组织id
|
|
650
|
-
this.charge.f_orgname = this.$login.f.orgs, // 组织
|
|
651
|
-
this.charge.f_depid = this.$login.f.depids, // 部门id
|
|
652
|
-
this.charge.f_depname = this.$login.f.f_department_name // 部门
|
|
653
|
-
http.load('post','apply/rs/entity/t_charge_record',this.charge,{rejectMsg:null,resolveMsg:'收费成功!!'}).then(res=>{
|
|
654
|
-
http.load('post','rs/logic/updatematerial',{data:{condition:` f_material_type = '已收费' `,f_process_id: this.selectdata.f_process_id}},{rejectMsg:null,resolveMsg:null}).then(row=>{
|
|
655
|
-
if (row.data.code == '200'){
|
|
656
|
-
this.$dispatch('initializtionView')
|
|
657
|
-
}
|
|
658
|
-
})
|
|
659
|
-
})
|
|
660
|
-
}
|
|
661
|
-
})
|
|
662
|
-
},
|
|
663
|
-
updatequantity () {
|
|
664
|
-
let http = new HttpResetClass()
|
|
665
|
-
http.load('post','rs/logic/updatematerial',{data:{condition:` f_quantity_payable = '0' `,f_process_id: this.selectdata.f_process_id}},{rejectMsg:null,resolveMsg:'全部取消减免成功!!'}).then(res=>{
|
|
666
|
-
if (res.data.code == '200'){
|
|
667
|
-
this.getOnetoManyData()
|
|
668
|
-
}
|
|
669
|
-
})
|
|
670
|
-
}
|
|
671
|
-
},
|
|
672
|
-
events: {
|
|
673
|
-
'beforeFileUpload' (file) {
|
|
674
|
-
this.showWork = true
|
|
675
|
-
},
|
|
676
|
-
async 'onFileUpload'(file, result) {
|
|
677
|
-
let data = {
|
|
678
|
-
selectdata: this.selectdata,
|
|
679
|
-
filepath: result.f_downloadpath,
|
|
680
|
-
user: this.$login.f
|
|
681
|
-
}
|
|
682
|
-
try {
|
|
683
|
-
let res = await this.$resetpost(`rs/logic/importMaterial`, {data: data}, {
|
|
684
|
-
resolveMsg: null,
|
|
685
|
-
rejectMsg: '导入失败!!!',
|
|
686
|
-
silent: true
|
|
687
|
-
}, 0)
|
|
688
|
-
} catch (e) {
|
|
689
|
-
this.closeFile()
|
|
690
|
-
}
|
|
691
|
-
this.$dispatch('breakControl', this.selectdata)
|
|
692
|
-
}
|
|
693
|
-
},
|
|
694
|
-
watch: {
|
|
695
|
-
'onetomany.rows'(){
|
|
696
|
-
let res = this.onetomany.rows
|
|
697
|
-
this.pricesum = 0
|
|
698
|
-
if (res.length>0){
|
|
699
|
-
let s = 0
|
|
700
|
-
for (let row of res){
|
|
701
|
-
let num = row.f_material_price * (row.f_material_number - row.f_quantity_payable )
|
|
702
|
-
s += num
|
|
703
|
-
}
|
|
704
|
-
//保留一位小数
|
|
705
|
-
this.pricesum = parseFloat(s.toFixed(1))
|
|
706
|
-
|
|
707
|
-
}else {
|
|
708
|
-
this.pricesum = 0
|
|
709
|
-
}
|
|
710
|
-
}
|
|
711
|
-
},
|
|
712
|
-
computed: {
|
|
713
|
-
paymentMethod() {
|
|
714
|
-
return this.$appdata.getParam("付款方式")
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
</script>
|
|
720
|
-
|
|
721
|
-
<style scoped>
|
|
722
|
-
|
|
723
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<data-grid :model="onetomany" class="list_area table_sy">
|
|
4
|
+
<template partial='head'>
|
|
5
|
+
<tr>
|
|
6
|
+
<th class="textNoLineBreak">序号</th>
|
|
7
|
+
<th class="textNoLineBreak">材料名称</th>
|
|
8
|
+
<th class="textNoLineBreak">材料型号</th>
|
|
9
|
+
<th class="textNoLineBreak">材料单位</th>
|
|
10
|
+
<th class="textNoLineBreak">材料价格</th>
|
|
11
|
+
<th class="textNoLineBreak">材料数量</th>
|
|
12
|
+
<th class="textNoLineBreak">应免数量</th>
|
|
13
|
+
<th class="textNoLineBreak">应收金额</th>
|
|
14
|
+
<th class="textNoLineBreak">材料状态</th>
|
|
15
|
+
|
|
16
|
+
<th class="textNoLineBreak">
|
|
17
|
+
<button v-if="$parent.$parent.mark === 0" class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal()">添加</button>
|
|
18
|
+
<button v-if="$parent.$parent.mark === 0 && $parent.$parent.selectdata.defname === '营业厅缴费' " class="button_new button_spacing" type="button" @click="$parent.$parent.chargeMaterial()">收费</button>
|
|
19
|
+
<button v-if="$parent.$parent.mark === 0 && ($parent.$parent.selectdata.defname === '安装审核' ||$parent.$parent.selectdata.defname === '改装审核' ) " class="button_new button_spacing" type="button" @click="$parent.$parent.updatequantity()">全部取消</button>
|
|
20
|
+
</th>
|
|
21
|
+
</tr>
|
|
22
|
+
</template>
|
|
23
|
+
<template partial='body'>
|
|
24
|
+
<tr>
|
|
25
|
+
<td style="text-align: center;">
|
|
26
|
+
<nobr>{{$index+1}}</nobr>
|
|
27
|
+
</td>
|
|
28
|
+
<td style="text-align: center;">
|
|
29
|
+
<nobr>{{row.f_material_name}}</nobr>
|
|
30
|
+
</td>
|
|
31
|
+
<td style="text-align: center;">
|
|
32
|
+
<nobr>{{row.f_material_style}}</nobr>
|
|
33
|
+
</td>
|
|
34
|
+
<td style="text-align: center;">
|
|
35
|
+
<nobr>{{row.f_material_unit}}</nobr>
|
|
36
|
+
</td>
|
|
37
|
+
<td style="text-align: center;">
|
|
38
|
+
<nobr>{{row.f_material_price}}</nobr>
|
|
39
|
+
</td>
|
|
40
|
+
<td style="text-align: center;">
|
|
41
|
+
<nobr>{{row.f_material_number}}</nobr>
|
|
42
|
+
</td>
|
|
43
|
+
<td style="text-align: center;">
|
|
44
|
+
<nobr>{{row.f_quantity_payable}}</nobr>
|
|
45
|
+
</td>
|
|
46
|
+
<td style="text-align: center;">
|
|
47
|
+
<nobr>{{row.money}}</nobr>
|
|
48
|
+
</td>
|
|
49
|
+
<td style="text-align: center;">
|
|
50
|
+
<nobr>{{row.f_material_type}}</nobr>
|
|
51
|
+
</td>
|
|
52
|
+
<td style="text-align: center;">
|
|
53
|
+
<button v-if = 'row.f_quantity_payable != 0 &&($parent.$parent.selectdata.defname === "安装审核" ||$parent.$parent.selectdata.defname === "改装审核" ) ' type="button" class="button_search button_spacing" @click="$parent.$parent.updateConfirm(0,row)">取消减免</button>
|
|
54
|
+
<button v-if = 'row.f_quantity_payable == 0 && ($parent.$parent.selectdata.defname === "安装审核" ||$parent.$parent.selectdata.defname === "改装审核" )' type="button" class="button_search button_spacing" @click="$parent.$parent.updateConfirm(row.f_material_number,row)">减免</button>
|
|
55
|
+
<button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除</button>
|
|
56
|
+
<button type="button" v-if="$parent.$parent.selectdata.defname === '财务审核' " class="button_delete button_spacing" @click="$parent.$parent.margeInfo(row)">修改</button>
|
|
57
|
+
</td>
|
|
58
|
+
</tr>
|
|
59
|
+
</template>
|
|
60
|
+
</data-grid>
|
|
61
|
+
<span>合计:{{pricesum}}</span>
|
|
62
|
+
<!-- <modal v-if="showFile" :show.sync="showFile" v-ref:modal :backdrop="false" title="选择文件">
|
|
63
|
+
<header slot="modal-header" class="modal-header">
|
|
64
|
+
<button type="button" class="close" @click="closeFile"><span>×</span></button>
|
|
65
|
+
<h4 class="modal-title">选择文件</h4>
|
|
66
|
+
</header>
|
|
67
|
+
<article slot="modal-body" class="modal-body">
|
|
68
|
+
<div class="form-group">
|
|
69
|
+
<file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" v-ref:file></file-upload>
|
|
70
|
+
</div>
|
|
71
|
+
</article>
|
|
72
|
+
<footer slot="modal-footer" class="modal-footer"></footer>
|
|
73
|
+
</modal>-->
|
|
74
|
+
<modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal :large="true"
|
|
75
|
+
:backdrop="false" :title="title">
|
|
76
|
+
<header slot="modal-header" class="modal-header">
|
|
77
|
+
<button type="button" class="close" @click="closeMaterials"><span>×</span></button>
|
|
78
|
+
<h4 class="modal-title">{{title}}</h4>
|
|
79
|
+
</header>
|
|
80
|
+
<article slot="modal-body" class="modal-body clearfix">
|
|
81
|
+
<div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
|
|
82
|
+
<div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
|
|
83
|
+
<div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
|
|
84
|
+
<div class="col-sm-6 text-right"><button
|
|
85
|
+
class="button_delete button_spacing"
|
|
86
|
+
@click.prevent="deleteDevicesinfo(i)"
|
|
87
|
+
v-if="title === '新增'"
|
|
88
|
+
>删除</button></div>
|
|
89
|
+
</div>
|
|
90
|
+
<div class="form-group col-sm-6">
|
|
91
|
+
<label class="col-sm-4 control-label">选择材料:</label>
|
|
92
|
+
<div class="col-sm-8">
|
|
93
|
+
<input-select
|
|
94
|
+
class="select select_list"
|
|
95
|
+
:value.sync="item.material"
|
|
96
|
+
v-model="item.material"
|
|
97
|
+
:options="meterialOptions"
|
|
98
|
+
:disable="mark === 1"
|
|
99
|
+
@change="modifyOtherValue(i)"
|
|
100
|
+
:valueSingle="true"></input-select>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
<div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
|
|
104
|
+
<label class="col-sm-4 control-label">材料名称:</label>
|
|
105
|
+
<div class="col-sm-8">
|
|
106
|
+
<input class="form-control input_view" style="" type="text"
|
|
107
|
+
placeholder="材料名称"
|
|
108
|
+
v-model="item.f_material_name"
|
|
109
|
+
:value="item.f_material_name"
|
|
110
|
+
/>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
<div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
|
|
114
|
+
<label class="col-sm-4 control-label">材料型号:</label>
|
|
115
|
+
<div class="col-sm-8">
|
|
116
|
+
<input class="form-control input_view" style="" type="text"
|
|
117
|
+
placeholder="材料型号"
|
|
118
|
+
v-model="item.f_material_style"
|
|
119
|
+
:value="item.f_material_style"
|
|
120
|
+
/>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
<div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
|
|
124
|
+
<label class="col-sm-4 control-label">材料单位:</label>
|
|
125
|
+
<div class="col-sm-8">
|
|
126
|
+
<input class="form-control input_view" style="" type="text"
|
|
127
|
+
placeholder="材料单位"
|
|
128
|
+
v-model="item.f_material_unit"
|
|
129
|
+
:value="item.f_material_unit"
|
|
130
|
+
/>
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
<div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
|
|
134
|
+
<label class="col-sm-4 control-label">材料数量:</label>
|
|
135
|
+
<div class="col-sm-8">
|
|
136
|
+
<input class="form-control input_view" style="" type="number"
|
|
137
|
+
placeholder="材料数量"
|
|
138
|
+
v-model="item.f_material_number"
|
|
139
|
+
:value="item.f_material_number"
|
|
140
|
+
/>
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
<div class="form-group col-sm-6" :class="[item.f_quantity_payable ? '' : 'has-error']">
|
|
144
|
+
<label class="col-sm-4 control-label">应免数量:</label>
|
|
145
|
+
<div class="col-sm-8">
|
|
146
|
+
<input class="form-control input_view" style="" type="number"
|
|
147
|
+
placeholder="应免数量"
|
|
148
|
+
v-model="item.f_quantity_payable"
|
|
149
|
+
:value="item.f_material_number"
|
|
150
|
+
/>
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
<div class="form-group col-sm-6">
|
|
154
|
+
<label class="col-sm-4 control-label">材料价格:</label>
|
|
155
|
+
<div class="col-sm-8">
|
|
156
|
+
<input class="form-control input_view" style="" type="text"
|
|
157
|
+
placeholder="材料价格"
|
|
158
|
+
v-model="item.f_material_price"
|
|
159
|
+
:value="item.f_material_price"
|
|
160
|
+
/>
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
</article>
|
|
166
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
167
|
+
<template v-if="mark !== 1">
|
|
168
|
+
<button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
|
|
169
|
+
<button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()" :disabled="!$v.valid">确认添加</button>
|
|
170
|
+
</template>
|
|
171
|
+
</footer>
|
|
172
|
+
</modal>
|
|
173
|
+
<modal v-if="showCharge" :show.sync="showCharge" v-ref:modal :backdrop="false" title="材料收费">
|
|
174
|
+
<header slot="modal-header" class="modal-header">
|
|
175
|
+
<button type="button" class="close" @click="closeModal"><span>×</span></button>
|
|
176
|
+
<h4 class="modal-title">材料收费</h4>
|
|
177
|
+
</header>
|
|
178
|
+
<article slot="modal-body" class="modal-body clearfix">
|
|
179
|
+
<div class="form-group col-sm-12">
|
|
180
|
+
<label class="col-sm-2 control-label">收费项目:</label>
|
|
181
|
+
<div class="col-sm-10">
|
|
182
|
+
<input type="text"
|
|
183
|
+
class="form-control input_view"
|
|
184
|
+
style="width: 100%"
|
|
185
|
+
readonly
|
|
186
|
+
v-model="charge.f_payment_term" />
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
<div class="form-group col-sm-12">
|
|
190
|
+
<label class="col-sm-2 control-label">应收金额:</label>
|
|
191
|
+
<div class="col-sm-10">
|
|
192
|
+
<input type="text"
|
|
193
|
+
class="form-control input_view"
|
|
194
|
+
style="width: 100%"
|
|
195
|
+
readonly
|
|
196
|
+
v-model="charge.f_amount_receivable" />
|
|
197
|
+
</div>
|
|
198
|
+
</div>
|
|
199
|
+
<div class="form-group col-sm-12">
|
|
200
|
+
<label class="col-sm-2 control-label">减免金额:</label>
|
|
201
|
+
<div class="col-sm-10">
|
|
202
|
+
<input type="text"
|
|
203
|
+
class="form-control input_view"
|
|
204
|
+
style="width: 100%"
|
|
205
|
+
readonly
|
|
206
|
+
v-model="charge.f_deduction_amount" />
|
|
207
|
+
</div>
|
|
208
|
+
</div>
|
|
209
|
+
<div class="form-group col-sm-12">
|
|
210
|
+
<label class="col-sm-2 control-label">实收金额:</label>
|
|
211
|
+
<div class="col-sm-10">
|
|
212
|
+
<input type="text"
|
|
213
|
+
class="form-control input_view"
|
|
214
|
+
style="width: 100%"
|
|
215
|
+
readonly
|
|
216
|
+
v-model="charge.f_charge_money" />
|
|
217
|
+
</div>
|
|
218
|
+
</div>
|
|
219
|
+
<div class="form-group col-sm-12">
|
|
220
|
+
<label class="col-sm-2 control-label">付款方式:</label>
|
|
221
|
+
<div class="col-sm-10">
|
|
222
|
+
<input-select
|
|
223
|
+
placeholder='请选择' width="100%"
|
|
224
|
+
v-model="charge.f_payment_method"
|
|
225
|
+
:value.sync="charge.f_payment_method"
|
|
226
|
+
:options='paymentMethod'
|
|
227
|
+
class="select select_list"
|
|
228
|
+
:value-single="true"
|
|
229
|
+
close-on-select ></input-select>
|
|
230
|
+
</div>
|
|
231
|
+
</div>
|
|
232
|
+
<div class="form-group col-sm-12">
|
|
233
|
+
<label class="col-sm-2 control-label">金额大写:</label>
|
|
234
|
+
<div class="col-sm-10">
|
|
235
|
+
<input type="text"
|
|
236
|
+
class="form-control input_view"
|
|
237
|
+
style="width: 100%"
|
|
238
|
+
:value="smalltoBIG(charge.f_charge_money)"
|
|
239
|
+
readonly
|
|
240
|
+
v-model="charge.f_amount_words" />
|
|
241
|
+
</div>
|
|
242
|
+
</div>
|
|
243
|
+
<div class="form-group col-sm-12">
|
|
244
|
+
<label class="col-sm-2 control-label">收费人员:</label>
|
|
245
|
+
<div class="col-sm-10">
|
|
246
|
+
<input type="text"
|
|
247
|
+
class="form-control input_view"
|
|
248
|
+
style="width: 100%"
|
|
249
|
+
readonly
|
|
250
|
+
v-model="charge.f_charge_collectors" />
|
|
251
|
+
</div>
|
|
252
|
+
</div>
|
|
253
|
+
</article>
|
|
254
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
255
|
+
<button type="button" class="btn btn-primary" @click="invalidApplyCharge()">确认收费</button>
|
|
256
|
+
</footer>
|
|
257
|
+
</modal>
|
|
258
|
+
<!-- -->
|
|
259
|
+
<modal v-if="showMargeInfo" :show.sync="showMargeInfo" v-ref:modal :backdrop="false" title="修改">
|
|
260
|
+
<header slot="modal-header" class="modal-header">
|
|
261
|
+
<button type="button" class="close" @click="closeMargeModal"><span>×</span></button>
|
|
262
|
+
<h4 class="modal-title">修改</h4>
|
|
263
|
+
</header>
|
|
264
|
+
<article slot="modal-body" class="modal-body clearfix">
|
|
265
|
+
<div class="form-group col-sm-6">
|
|
266
|
+
<label class="col-sm-4 control-label">选择材料:</label>
|
|
267
|
+
<div class="col-sm-8">
|
|
268
|
+
<input-select
|
|
269
|
+
class="select select_list"
|
|
270
|
+
:value.sync="materia"
|
|
271
|
+
v-model=" materia"
|
|
272
|
+
:options="meterialOptions"
|
|
273
|
+
@change="modifyOther()"
|
|
274
|
+
:valueSingle="true"></input-select>
|
|
275
|
+
</div>
|
|
276
|
+
</div>
|
|
277
|
+
<div class="form-group col-sm-6">
|
|
278
|
+
<label class="col-sm-4 control-label">材料名称:</label>
|
|
279
|
+
<div class="col-sm-8">
|
|
280
|
+
<input type="text"
|
|
281
|
+
class="form-control input_view"
|
|
282
|
+
style="width: 100%"
|
|
283
|
+
v-model="material.f_material_name" />
|
|
284
|
+
</div>
|
|
285
|
+
</div>
|
|
286
|
+
<div class="form-group col-sm-6">
|
|
287
|
+
<label class="col-sm-4 control-label">材料价格:</label>
|
|
288
|
+
<div class="col-sm-8">
|
|
289
|
+
<input type="text"
|
|
290
|
+
class="form-control input_view"
|
|
291
|
+
style="width: 100%"
|
|
292
|
+
v-model="material.f_material_price" />
|
|
293
|
+
</div>
|
|
294
|
+
</div>
|
|
295
|
+
<div class="form-group col-sm-6">
|
|
296
|
+
<label class="col-sm-4 control-label">材料数量:</label>
|
|
297
|
+
<div class="col-sm-8">
|
|
298
|
+
<input type="text"
|
|
299
|
+
class="form-control input_view"
|
|
300
|
+
style="width: 100%"
|
|
301
|
+
v-model="material.materialNumber" />
|
|
302
|
+
</div>
|
|
303
|
+
</div>
|
|
304
|
+
<div class="form-group col-sm-6">
|
|
305
|
+
<label class="col-sm-4 control-label">应免数量:</label>
|
|
306
|
+
<div class="col-sm-8">
|
|
307
|
+
<input type="text"
|
|
308
|
+
class="form-control input_view"
|
|
309
|
+
style="width: 100%"
|
|
310
|
+
v-model="material.exemptedNumber" />
|
|
311
|
+
</div>
|
|
312
|
+
</div>
|
|
313
|
+
</article>
|
|
314
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
315
|
+
<button type="button" class="btn btn-primary" @click="ModifyInfo()">确认</button>
|
|
316
|
+
</footer>
|
|
317
|
+
</modal>
|
|
318
|
+
</div>
|
|
319
|
+
</template>
|
|
320
|
+
|
|
321
|
+
<script>
|
|
322
|
+
import {HttpResetClass} from 'vue-client'
|
|
323
|
+
import Vue from "vue";
|
|
324
|
+
import {toStandardTimeString} from '../../../components/Util'
|
|
325
|
+
export default {
|
|
326
|
+
name: '材料添加',
|
|
327
|
+
props: {
|
|
328
|
+
selectdata: {
|
|
329
|
+
type: Object
|
|
330
|
+
},
|
|
331
|
+
mark: {
|
|
332
|
+
type: Number,
|
|
333
|
+
default: 0
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
data () {
|
|
337
|
+
return {
|
|
338
|
+
showFile: false,
|
|
339
|
+
showMargeInfo: false,
|
|
340
|
+
onetomany: {
|
|
341
|
+
rows: []
|
|
342
|
+
},
|
|
343
|
+
title:'新增',
|
|
344
|
+
showMaterialModal:false,
|
|
345
|
+
materials:[
|
|
346
|
+
{
|
|
347
|
+
material:'',
|
|
348
|
+
f_material_name:'',
|
|
349
|
+
f_material_style:'',
|
|
350
|
+
f_material_unit:'',
|
|
351
|
+
f_material_number:'',
|
|
352
|
+
f_material_price:'',
|
|
353
|
+
f_quantity_payable:0
|
|
354
|
+
}
|
|
355
|
+
],
|
|
356
|
+
meterialOptions:[],
|
|
357
|
+
row:{},
|
|
358
|
+
pricesum:'',
|
|
359
|
+
showCharge:false,
|
|
360
|
+
charge:{
|
|
361
|
+
f_payment_term:'',
|
|
362
|
+
f_charge_money:'',
|
|
363
|
+
f_payment_method:'',
|
|
364
|
+
f_amount_words:'',
|
|
365
|
+
f_charge_collectors:'',
|
|
366
|
+
f_amount_receivable:'',
|
|
367
|
+
f_deduction_amount:''
|
|
368
|
+
},
|
|
369
|
+
payment_type:'',
|
|
370
|
+
materia:'',
|
|
371
|
+
material:{
|
|
372
|
+
materialNumber:'',
|
|
373
|
+
exemptedNumber:'',
|
|
374
|
+
f_material_name:'',
|
|
375
|
+
f_material_price:'',
|
|
376
|
+
id:''
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
ready(){
|
|
381
|
+
this.$nextTick(() => {
|
|
382
|
+
this.getOnetoManyData()
|
|
383
|
+
})
|
|
384
|
+
},
|
|
385
|
+
methods: {
|
|
386
|
+
async getOnetoManyData () {
|
|
387
|
+
let data = {
|
|
388
|
+
tablename: `t_material_apply`,
|
|
389
|
+
condition: `f_process_id='${this.selectdata.f_process_id}'`
|
|
390
|
+
}
|
|
391
|
+
let http = new HttpResetClass()
|
|
392
|
+
let res = await http.load('post',
|
|
393
|
+
'rs/sql/apply_singleTable',
|
|
394
|
+
{data: data},
|
|
395
|
+
{resolveMsg: null, rejectMsg: 'onetomany查询失败'}
|
|
396
|
+
)
|
|
397
|
+
// foreach遍历res.data数组
|
|
398
|
+
res.data.forEach((item) => {
|
|
399
|
+
let num= (item.f_material_number*1)-(item.f_quantity_payable*1)
|
|
400
|
+
let price=num*(item.f_material_price*1)
|
|
401
|
+
//将price放回res.data数组
|
|
402
|
+
item.money=price.toFixed(2)
|
|
403
|
+
})
|
|
404
|
+
this.onetomany.rows = res.data
|
|
405
|
+
console.log('材料信息', this.onetomany.rows)
|
|
406
|
+
},
|
|
407
|
+
async openMaterialModal () {
|
|
408
|
+
this.getMateralNames()
|
|
409
|
+
this.title = '新增'
|
|
410
|
+
this.materials = [
|
|
411
|
+
{
|
|
412
|
+
material:'',
|
|
413
|
+
f_material_name:'',
|
|
414
|
+
f_material_style:'',
|
|
415
|
+
f_material_unit:'',
|
|
416
|
+
f_material_number:'',
|
|
417
|
+
f_material_price:'',
|
|
418
|
+
f_quantity_payable:0
|
|
419
|
+
}
|
|
420
|
+
],
|
|
421
|
+
this.showMaterialModal = true
|
|
422
|
+
},
|
|
423
|
+
closeFile() {
|
|
424
|
+
this.showWork = false
|
|
425
|
+
this.showFile = false
|
|
426
|
+
// 将选的文件清空
|
|
427
|
+
this.$refs.file.$el.querySelector('input').value = ''
|
|
428
|
+
this.search()
|
|
429
|
+
},
|
|
430
|
+
deleteDevicesinfo (index) {
|
|
431
|
+
this.materials.splice(index, 1)
|
|
432
|
+
},
|
|
433
|
+
pushMaterial () {
|
|
434
|
+
this.materials.push({
|
|
435
|
+
material:'',
|
|
436
|
+
f_material_name:'',
|
|
437
|
+
f_material_style:'',
|
|
438
|
+
f_material_unit:'',
|
|
439
|
+
f_material_number:'',
|
|
440
|
+
f_material_price:'',
|
|
441
|
+
f_quantity_payable:0
|
|
442
|
+
})
|
|
443
|
+
},
|
|
444
|
+
// 获取模态框材料
|
|
445
|
+
async getMateralNames () {
|
|
446
|
+
let data = {
|
|
447
|
+
condition: `1=1`
|
|
448
|
+
}
|
|
449
|
+
let http = new HttpResetClass()
|
|
450
|
+
let res = await http.load(
|
|
451
|
+
'POST',
|
|
452
|
+
`rs/sql/getStockMaterial`,
|
|
453
|
+
{data: data},
|
|
454
|
+
{resolveMsg: null, rejectMsg: '材料查询失败!!!'}
|
|
455
|
+
)
|
|
456
|
+
|
|
457
|
+
this.meterialOptions = res.data.map(item => {
|
|
458
|
+
return {
|
|
459
|
+
'label': `${item.f_material_name}--${item.f_material_style}--${item.f_material_unit}--${item.f_material_code}`,
|
|
460
|
+
'value': item
|
|
461
|
+
}
|
|
462
|
+
})
|
|
463
|
+
},
|
|
464
|
+
modifyOther (){
|
|
465
|
+
console.log(this.materia)
|
|
466
|
+
this.material.f_material_name =this.materia.f_material_name
|
|
467
|
+
this.material.f_material_price =this.materia.f_material_price
|
|
468
|
+
},
|
|
469
|
+
modifyOtherValue (index){
|
|
470
|
+
console.log("进来了",index)
|
|
471
|
+
console.log("dddd",this.materials[index].material)
|
|
472
|
+
let material = this.materials[index].material
|
|
473
|
+
this.materials[index].f_material_name = material.f_material_name
|
|
474
|
+
this.materials[index].f_material_style = material.f_material_style
|
|
475
|
+
this.materials[index].f_material_unit = material.f_material_unit
|
|
476
|
+
this.materials[index].f_material_price = material.f_material_price
|
|
477
|
+
},
|
|
478
|
+
// 新增材料
|
|
479
|
+
async addMaterial () {
|
|
480
|
+
console.log("登录信息:",this.$login.f)
|
|
481
|
+
this.title = '新增'
|
|
482
|
+
let data = {
|
|
483
|
+
f_process_id : this.selectdata.f_process_id,
|
|
484
|
+
f_operator_id: this.$login.f.id,
|
|
485
|
+
f_operator: this.$login.f.name,
|
|
486
|
+
f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
|
|
487
|
+
f_orgid: this.$login.f.orgid,
|
|
488
|
+
f_orgname: this.$login.f.orgs,
|
|
489
|
+
materials:this.materials
|
|
490
|
+
}
|
|
491
|
+
let res = await this.$resetpost(
|
|
492
|
+
`rs/logic/saveMaterials`,
|
|
493
|
+
data
|
|
494
|
+
)
|
|
495
|
+
this.closeMaterials()
|
|
496
|
+
},
|
|
497
|
+
margeInfo(row){
|
|
498
|
+
this.getMateralNames()
|
|
499
|
+
this.showMargeInfo=true
|
|
500
|
+
this.material.materialNumber=row.f_material_number
|
|
501
|
+
this.material.exemptedNumber=row.f_quantity_payable
|
|
502
|
+
this.material.f_material_name=row.f_material_name
|
|
503
|
+
this.material.f_material_price=row.f_material_price
|
|
504
|
+
this.material.id=row.id
|
|
505
|
+
},
|
|
506
|
+
async ModifyInfo() {
|
|
507
|
+
//修改材料数量,减免数量
|
|
508
|
+
let data = {
|
|
509
|
+
f_process_id : this.selectdata.f_process_id,
|
|
510
|
+
material: this.material
|
|
511
|
+
}
|
|
512
|
+
let http = new HttpResetClass()
|
|
513
|
+
let res = await http.load(
|
|
514
|
+
'POST',
|
|
515
|
+
`rs/logic/ModifyMaterial`,
|
|
516
|
+
{data: data},
|
|
517
|
+
{resolveMsg: null, rejectMsg: '材料删除失败!!!'}
|
|
518
|
+
)
|
|
519
|
+
this.showMargeInfo=false
|
|
520
|
+
this.getOnetoManyData()
|
|
521
|
+
},
|
|
522
|
+
async deleteMaterial (row) {
|
|
523
|
+
var show1 = window.confirm('您确定要删除这条记录吗?')
|
|
524
|
+
if(show1 != true){
|
|
525
|
+
this.closeMaterials()
|
|
526
|
+
}else{
|
|
527
|
+
let http = new HttpResetClass()
|
|
528
|
+
let res = await http.load(
|
|
529
|
+
'POST',
|
|
530
|
+
`rs/logic/deleteMaterial`,
|
|
531
|
+
{data: row},
|
|
532
|
+
{resolveMsg: null, rejectMsg: '材料删除失败!!!'}
|
|
533
|
+
)
|
|
534
|
+
this.closeMaterials()
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
},
|
|
538
|
+
async updateMaterial (index,row) {
|
|
539
|
+
this.title = '修改'
|
|
540
|
+
this.row = row
|
|
541
|
+
this.getMateralNames()
|
|
542
|
+
this.materials = [
|
|
543
|
+
{
|
|
544
|
+
material:'',
|
|
545
|
+
f_material_name:row.f_material_name,
|
|
546
|
+
f_material_style:row.f_material_style,
|
|
547
|
+
f_material_unit:row.f_material_unit,
|
|
548
|
+
f_material_number:row.f_material_number,
|
|
549
|
+
f_material_price:row.f_material_price,
|
|
550
|
+
f_quantity_payable:row.f_quantity_payable
|
|
551
|
+
}
|
|
552
|
+
]
|
|
553
|
+
this.showMaterialModal = true
|
|
554
|
+
},
|
|
555
|
+
async updateConfirm (num,row) {
|
|
556
|
+
let data = row
|
|
557
|
+
data.f_quantity_payable = num
|
|
558
|
+
let res = await this.$resetpost(
|
|
559
|
+
`apply/rs/entity/t_material_apply`,
|
|
560
|
+
data
|
|
561
|
+
)
|
|
562
|
+
this.closeMaterials()
|
|
563
|
+
},
|
|
564
|
+
closeMaterials () {
|
|
565
|
+
this.getOnetoManyData()
|
|
566
|
+
this.showMaterialModal = false
|
|
567
|
+
},
|
|
568
|
+
// 金额转大写
|
|
569
|
+
smalltoBIG(n) {
|
|
570
|
+
let fraction = ['角', '分'];
|
|
571
|
+
let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
572
|
+
let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
|
|
573
|
+
let head = n < 0 ? '欠' : '';
|
|
574
|
+
n = Math.abs(n);
|
|
575
|
+
|
|
576
|
+
let s = '';
|
|
577
|
+
|
|
578
|
+
for (var i = 0; i < fraction.length; i++) {
|
|
579
|
+
s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
|
|
580
|
+
}
|
|
581
|
+
s = s || '整';
|
|
582
|
+
n = Math.floor(n);
|
|
583
|
+
|
|
584
|
+
for (var i = 0; i < unit[0].length && n > 0; i++) {
|
|
585
|
+
let p = '';
|
|
586
|
+
for (var j = 0; j < unit[1].length && n > 0; j++) {
|
|
587
|
+
p = digit[n % 10] + unit[1][j] + p;
|
|
588
|
+
n = Math.floor(n / 10);
|
|
589
|
+
}
|
|
590
|
+
s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
|
|
591
|
+
}
|
|
592
|
+
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
|
|
593
|
+
},
|
|
594
|
+
// 材料收费
|
|
595
|
+
chargeMaterial () {
|
|
596
|
+
this.showCharge = true
|
|
597
|
+
// 应收金额
|
|
598
|
+
this.charge.f_amount_receivable = this.pricesum
|
|
599
|
+
this.charge.f_payment_method='现金缴费'
|
|
600
|
+
// 减免金额
|
|
601
|
+
this.charge.f_deduction_amount = this.selectdata.f_material_amount?this.selectdata.f_material_amount:0
|
|
602
|
+
// 实收金额
|
|
603
|
+
this.charge.f_charge_money = (this.pricesum - this.charge.f_deduction_amount).toFixed(2)
|
|
604
|
+
this.charge.f_charge_collectors = this.$login.f.name
|
|
605
|
+
if(this.selectdata.f_apply_type=='改装报建'){
|
|
606
|
+
this.charge.f_payment_term='改装材料费'
|
|
607
|
+
}else if(this.selectdata.f_apply_type=='散户报建'){
|
|
608
|
+
this.charge.f_payment_term='新装材料费'
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
},
|
|
612
|
+
closeMargeModal(){
|
|
613
|
+
this.material.materialNumber=''
|
|
614
|
+
this.material.exemptedNumber=''
|
|
615
|
+
this.material.f_material_name=''
|
|
616
|
+
this.material.f_material_price=''
|
|
617
|
+
this.material.id=''
|
|
618
|
+
this.materia=''
|
|
619
|
+
this.showMargeInfo=false
|
|
620
|
+
},
|
|
621
|
+
closeModal(){
|
|
622
|
+
this.showCharge = false
|
|
623
|
+
if(this.selectdata.f_apply_type=='改装报建'){
|
|
624
|
+
this.payment_type='改装材料费'
|
|
625
|
+
}else if(this.selectdata.f_apply_type=='散户报建'){
|
|
626
|
+
this.payment_type='新装材料费'
|
|
627
|
+
}
|
|
628
|
+
this.charge = {
|
|
629
|
+
f_payment_term:this.payment_type,
|
|
630
|
+
f_charge_money:'',
|
|
631
|
+
f_payment_method:'',
|
|
632
|
+
f_amount_words:'',
|
|
633
|
+
f_charge_collectors:'',
|
|
634
|
+
f_amount_receivable:'',
|
|
635
|
+
f_deduction_amount:''
|
|
636
|
+
}
|
|
637
|
+
},
|
|
638
|
+
invalidApplyCharge (){
|
|
639
|
+
this.$showMessage('确定是否收费?', ['confirm', 'cancel']).then(res=>{
|
|
640
|
+
if (res==='confirm'){
|
|
641
|
+
let http = new HttpResetClass()
|
|
642
|
+
this.charge.f_charge_status = '有效', // 缴费状态
|
|
643
|
+
this.charge.f_charge_date = toStandardTimeString(), // 缴费时间
|
|
644
|
+
this.charge.f_charge_collectors = this.$login.f.name, // 收费人员
|
|
645
|
+
this.charge.f_charge_collectors_id = this.$login.f.id, // 收费人员
|
|
646
|
+
this.charge.f_process_id = this.selectdata.f_process_id, // 报建流程id
|
|
647
|
+
this.charge.f_filiale = this.$login.f.orgs, // 分公司
|
|
648
|
+
this.charge.f_filialeid = this.$login.f.orgid, // 分公司id
|
|
649
|
+
this.charge.f_orgid = this.$login.f.orgid, // 组织id
|
|
650
|
+
this.charge.f_orgname = this.$login.f.orgs, // 组织
|
|
651
|
+
this.charge.f_depid = this.$login.f.depids, // 部门id
|
|
652
|
+
this.charge.f_depname = this.$login.f.f_department_name // 部门
|
|
653
|
+
http.load('post','apply/rs/entity/t_charge_record',this.charge,{rejectMsg:null,resolveMsg:'收费成功!!'}).then(res=>{
|
|
654
|
+
http.load('post','rs/logic/updatematerial',{data:{condition:` f_material_type = '已收费' `,f_process_id: this.selectdata.f_process_id}},{rejectMsg:null,resolveMsg:null}).then(row=>{
|
|
655
|
+
if (row.data.code == '200'){
|
|
656
|
+
this.$dispatch('initializtionView')
|
|
657
|
+
}
|
|
658
|
+
})
|
|
659
|
+
})
|
|
660
|
+
}
|
|
661
|
+
})
|
|
662
|
+
},
|
|
663
|
+
updatequantity () {
|
|
664
|
+
let http = new HttpResetClass()
|
|
665
|
+
http.load('post','rs/logic/updatematerial',{data:{condition:` f_quantity_payable = '0' `,f_process_id: this.selectdata.f_process_id}},{rejectMsg:null,resolveMsg:'全部取消减免成功!!'}).then(res=>{
|
|
666
|
+
if (res.data.code == '200'){
|
|
667
|
+
this.getOnetoManyData()
|
|
668
|
+
}
|
|
669
|
+
})
|
|
670
|
+
}
|
|
671
|
+
},
|
|
672
|
+
events: {
|
|
673
|
+
'beforeFileUpload' (file) {
|
|
674
|
+
this.showWork = true
|
|
675
|
+
},
|
|
676
|
+
async 'onFileUpload'(file, result) {
|
|
677
|
+
let data = {
|
|
678
|
+
selectdata: this.selectdata,
|
|
679
|
+
filepath: result.f_downloadpath,
|
|
680
|
+
user: this.$login.f
|
|
681
|
+
}
|
|
682
|
+
try {
|
|
683
|
+
let res = await this.$resetpost(`rs/logic/importMaterial`, {data: data}, {
|
|
684
|
+
resolveMsg: null,
|
|
685
|
+
rejectMsg: '导入失败!!!',
|
|
686
|
+
silent: true
|
|
687
|
+
}, 0)
|
|
688
|
+
} catch (e) {
|
|
689
|
+
this.closeFile()
|
|
690
|
+
}
|
|
691
|
+
this.$dispatch('breakControl', this.selectdata)
|
|
692
|
+
}
|
|
693
|
+
},
|
|
694
|
+
watch: {
|
|
695
|
+
'onetomany.rows'(){
|
|
696
|
+
let res = this.onetomany.rows
|
|
697
|
+
this.pricesum = 0
|
|
698
|
+
if (res.length>0){
|
|
699
|
+
let s = 0
|
|
700
|
+
for (let row of res){
|
|
701
|
+
let num = row.f_material_price * (row.f_material_number - row.f_quantity_payable )
|
|
702
|
+
s += num
|
|
703
|
+
}
|
|
704
|
+
//保留一位小数
|
|
705
|
+
this.pricesum = parseFloat(s.toFixed(1))
|
|
706
|
+
|
|
707
|
+
}else {
|
|
708
|
+
this.pricesum = 0
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
},
|
|
712
|
+
computed: {
|
|
713
|
+
paymentMethod() {
|
|
714
|
+
return this.$appdata.getParam("付款方式")
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
</script>
|
|
720
|
+
|
|
721
|
+
<style scoped>
|
|
722
|
+
|
|
723
|
+
</style>
|